commit d5226fa6dbae0569ee43ecfc08bdcd6770fc4755 Author: Linus Torvalds Date: Sun Jan 26 16:23:03 2020 -0800 Linux 5.5 commit 5cf9ad0e6b164a90581a59609dbf5bda3f5a089c Merge: 9dbca1608709 ebe10026210f Author: Linus Torvalds Date: Sun Jan 26 12:23:04 2020 -0800 Merge tag 'io_uring-5.5-2020-01-26' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Fix for two regressions in this cycle, both reported by the postgresql use case. One removes the added restriction on who can submit IO, making it possible for rings shared across forks to do so. The other fixes an issue for the same kind of use case, where one exiting process would cancel all IO" * tag 'io_uring-5.5-2020-01-26' of git://git.kernel.dk/linux-block: io_uring: don't cancel all work on process exit Revert "io_uring: only allow submit from owning task" commit 9dbca16087099b9d9826011cddfdae2a16404336 Merge: 54343d951838 b72053072c0b Author: Linus Torvalds Date: Sun Jan 26 12:12:36 2020 -0800 Merge tag 'block-5.5-2020-01-26' of git://git.kernel.dk/linux-block Pull block fix from Jens Axboe: "Unfortunately this weekend we had a few last minute reports, one was for block. The partition disable for zoned devices was overly restrictive, it can work (and be supported) just fine for host-aware variants. Here's a fix ensuring that's the case so we don't break existing users of that" * tag 'block-5.5-2020-01-26' of git://git.kernel.dk/linux-block: block: allow partitions on host aware zone devices commit 54343d951838ef4e423de7d124616bf66eca92e7 Merge: b1b298914f3a 04060db41178 Author: Linus Torvalds Date: Sun Jan 26 10:39:09 2020 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two last minute fixes, both in drivers. The fnic one is a highly unlikely condition, but the RDMA one is a recently introduced regression that causes a kernel warning to trigger in every RDMA logon, which would be unsightly if it got into the final release" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: RDMA/isert: Fix a recently introduced regression related to logout scsi: fnic: do not queue commands during fwreset commit b1b298914f3ae226e99c98042c1648f740015724 Merge: a45ea48e2bcd d0cb50185ae9 Author: Linus Torvalds Date: Sun Jan 26 10:33:48 2020 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fix from Al Viro: "Fix a use-after-free in do_last() handling of sysctl_protected_... checks. The use-after-free normally doesn't happen there, but race with rename() and it becomes possible" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: do_last(): fetch directory ->i_mode and ->i_uid before it's too late commit ebe10026210f9ea740b9a050ee84a166690fddde Author: Jens Axboe Date: Sun Jan 26 10:17:12 2020 -0700 io_uring: don't cancel all work on process exit If we're sharing the ring across forks, then one process exiting means that we cancel ALL work and prevent future work. This is overly restrictive. As long as we cancel the work associated with the files from the current task, it's safe to let others persist. Normal fd close on exit will still wait (and cancel) pending work. Fixes: fcb323cc53e2 ("io_uring: io_uring: add support for async work inheriting files") Reported-by: Andres Freund Signed-off-by: Jens Axboe commit b72053072c0bbe9f1cdfe2ffa3c201c185da2201 Author: Christoph Hellwig Date: Sun Jan 26 14:05:43 2020 +0100 block: allow partitions on host aware zone devices Host-aware SMR drives can be used with the commands to explicitly manage zone state, but they can also be used as normal disks. In the former case it makes perfect sense to allow partitions on them, in the latter it does not, just like for host managed devices. Add a check to add_partition to allow partitions on host aware devices, but give up any zone management capabilities in that case, which also catches the previously missed case of adding a partition vs just scanning it. Because sd can rescan the attribute at runtime it needs to check if a disk has partitions, for which a new helper is added to genhd.h. Fixes: 5eac3eb30c9a ("block: Remove partition support for zoned block devices") Reported-by: Borislav Petkov Signed-off-by: Christoph Hellwig Tested-by: Damien Le Moal Reviewed-by: Damien Le Moal Signed-off-by: Jens Axboe commit 73e08e711d9c1d79fae01daed4b0e1fee5f8a275 Author: Jens Axboe Date: Sun Jan 26 09:53:12 2020 -0700 Revert "io_uring: only allow submit from owning task" This ends up being too restrictive for tasks that willingly fork and share the ring between forks. Andres reports that this breaks his postgresql work. Since we're close to 5.5 release, revert this change for now. Cc: stable@vger.kernel.org Fixes: 44d282796f81 ("io_uring: only allow submit from owning task") Reported-by: Andres Freund Signed-off-by: Jens Axboe commit a45ea48e2bcd92c1f678b794f488ca0bda9835b8 Author: David Howells Date: Sun Jan 26 01:02:53 2020 +0000 afs: Fix characters allowed into cell names The afs filesystem needs to prohibit certain characters from cell names, such as '/', as these are used to form filenames in procfs, leading to the following warning being generated: WARNING: CPU: 0 PID: 3489 at fs/proc/generic.c:178 Fix afs_alloc_cell() to disallow nonprintable characters, '/', '@' and names that begin with a dot. Remove the check for "@cell" as that is then redundant. This can be tested by running: echo add foo/.bar 1.2.3.4 >/proc/fs/afs/cells Note that we will also need to deal with: - Names ending in ".invalid" shouldn't be passed to the DNS. - Names that contain non-valid domainname chars shouldn't be passed to the DNS. - DNS replies that say "your-dns-needs-immediate-attention." and replies containing A records that say 127.0.53.53 should be considered invalid. [https://www.icann.org/en/system/files/files/name-collision-mitigation-01aug14-en.pdf] but these need to be dealt with by the kafs-client DNS program rather than the kernel. Reported-by: syzbot+b904ba7c947a37b4b291@syzkaller.appspotmail.com Cc: stable@kernel.org Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit d0cb50185ae942b03c4327be322055d622dc79f6 Author: Al Viro Date: Sun Jan 26 09:29:34 2020 -0500 do_last(): fetch directory ->i_mode and ->i_uid before it's too late may_create_in_sticky() call is done when we already have dropped the reference to dir. Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files) Signed-off-by: Al Viro commit 2821e26f3a0a3872184581caac8115bb02641941 Merge: 84809aaf78b5 6849b5eba196 Author: Linus Torvalds Date: Sat Jan 25 14:32:51 2020 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: - fix ftrace relocation type filtering - relax arch timer version check * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8955/1: virt: Relax arch timer version check during early boot ARM: 8950/1: ftrace/recordmcount: filter relocation types commit 84809aaf78b5b4c2e6478dc6121a1c8fb439a024 Merge: f041eadad750 fa865ba183d6 Author: Linus Torvalds Date: Sat Jan 25 14:19:32 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Off by one in mt76 airtime calculation, from Dan Carpenter. 2) Fix TLV fragment allocation loop condition in iwlwifi, from Luca Coelho. 3) Don't confirm neigh entries when doing ipsec pmtu updates, from Xu Wang. 4) More checks to make sure we only send TSO packets to lan78xx chips that they can actually handle. From James Hughes. 5) Fix ip_tunnel namespace move, from William Dauchy. 6) Fix unintended packet reordering due to cooperation between listification done by GRO and non-GRO paths. From Maxim Mikityanskiy. 7) Add Jakub Kicincki formally as networking co-maintainer. 8) Info leak in airo ioctls, from Michael Ellerman. 9) IFLA_MTU attribute needs validation during rtnl_create_link(), from Eric Dumazet. 10) Use after free during reload in mlxsw, from Ido Schimmel. 11) Dangling pointers are possible in tp->highest_sack, fix from Eric Dumazet. 12) Missing *pos++ in various networking seq_next handlers, from Vasily Averin. 13) CHELSIO_GET_MEM operation neds CAP_NET_ADMIN check, from Michael Ellerman. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (109 commits) firestream: fix memory leaks net: cxgb3_main: Add CAP_NET_ADMIN check to CHELSIO_GET_MEM net: bcmgenet: Use netif_tx_napi_add() for TX NAPI tipc: change maintainer email address net: stmmac: platform: fix probe for ACPI devices net/mlx5e: kTLS, Do not send decrypted-marked SKBs via non-accel path net/mlx5e: kTLS, Remove redundant posts in TX resync flow net/mlx5e: kTLS, Fix corner-case checks in TX resync flow net/mlx5e: Clear VF config when switching modes net/mlx5: DR, use non preemptible call to get the current cpu number net/mlx5: E-Switch, Prevent ingress rate configuration of uplink rep net/mlx5: DR, Enable counter on non-fwd-dest objects net/mlx5: Update the list of the PCI supported devices net/mlx5: Fix lowest FDB pool size net: Fix skb->csum update in inet_proto_csum_replace16(). netfilter: nf_tables: autoload modules from the abort path netfilter: nf_tables: add __nft_chain_type_get() netfilter: nf_tables_offload: fix check the chain offload flag netfilter: conntrack: sctp: use distinct states for new SCTP connections ipv6_route_seq_next should increase position index ... commit f041eadad7504b1364274494548b9716b2ed59ac Merge: a075f23dd4b0 6716cb162deb Author: Linus Torvalds Date: Sat Jan 25 14:08:43 2020 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "A couple of fixes have come in that would be good to include in this release: - A fix for amount of memory on Beaglebone Black. Surfaced now since GRUB2 doesn't update memory size in the booted kernel. - A fix to make SPI interfaces work on am43x-epos-evm. - Small Kconfig fix for OPTEE (adds a depend on MMU) to avoid build failures" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: dts: am43x-epos-evm: set data pin directions for spi0 and spi1 tee: optee: Fix compilation issue with nommu ARM: dts: am335x-boneblack-common: fix memory size commit fa865ba183d61c1ec8cbcab8573159c3b72b89a4 Author: Wenwen Wang Date: Sat Jan 25 14:33:29 2020 +0000 firestream: fix memory leaks In fs_open(), 'vcc' is allocated through kmalloc() and assigned to 'atm_vcc->dev_data.' In the following execution, if an error occurs, e.g., there is no more free channel, an error code EBUSY or ENOMEM will be returned. However, 'vcc' is not deallocated, leading to memory leaks. Note that, in normal cases where fs_open() returns 0, 'vcc' will be deallocated in fs_close(). But, if fs_open() fails, there is no guarantee that fs_close() will be invoked. To fix this issue, deallocate 'vcc' before the error code is returned. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller commit 6badad1c1d354db1f7bc216319d81884411d5098 Merge: 722943a54de9 189c9b1e9453 Author: David S. Miller Date: Sat Jan 25 21:40:39 2020 +0100 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) Missing netlink attribute sanity check for NFTA_OSF_DREG, from Florian Westphal. 2) Use bitmap infrastructure in ipset to fix KASAN slab-out-of-bounds reads, from Jozsef Kadlecsik. 3) Missing initial CLOSED state in new sctp connection through ctnetlink events, from Jiri Wiesner. 4) Missing check for NFT_CHAIN_HW_OFFLOAD in nf_tables offload indirect block infrastructure, from wenxu. 5) Add __nft_chain_type_get() to sanity check family and chain type. 6) Autoload modules from the nf_tables abort path to fix races reported by syzbot. 7) Remove unnecessary skb->csum update on inet_proto_csum_replace16(), from Praveen Chaudhary. ==================== Signed-off-by: David S. Miller commit a075f23dd4b036ebaf918b3af477aa1f249ddfa0 Merge: 93d1a05ea6b2 4cea9037f82a Author: Linus Torvalds Date: Sat Jan 25 10:55:24 2020 -0800 Merge tag 'for-5.5-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "Here's a last minute fix for a regression introduced in this development cycle. There's a small chance of a silent corruption when device replace and NOCOW data writes happen at the same time in one block group. Metadata or COW data writes are unaffected. The extra fixup patch is there to silence an unnecessary warning" * tag 'for-5.5-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: dev-replace: remove warning for unknown return codes when finished btrfs: scrub: Require mandatory block group RO for dev-replace commit 93d1a05ea6b29737715769e2c9551cfe8a5fef22 Merge: d5d359b0ac3f 319d5cce728c Author: Linus Torvalds Date: Sat Jan 25 10:46:07 2020 -0800 Merge tag 'pinctrl-v5.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fix from Linus Walleij: "A single fix for the Intel Sunrisepoint pin controller that makes the interrupts work properly on it" * tag 'pinctrl-v5.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: sunrisepoint: Add missing Interrupt Status register offset commit 722943a54de95343c97c2a9ad658253393632f97 Merge: 3546d8f1bbe9 342508c1c754 Author: David S. Miller Date: Sat Jan 25 13:46:00 2020 +0100 Merge tag 'mlx5-fixes-2020-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2020-01-24 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. Merge conflict: once merge with net-next, a contextual conflict will appear in drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c since the code moved in net-next. To resolve, just delete ALL of the conflicting hunk from net. So sorry for the small mess .. For -stable v5.4: ('net/mlx5: Update the list of the PCI supported devices') ('net/mlx5: Fix lowest FDB pool size') ('net/mlx5e: kTLS, Fix corner-case checks in TX resync flow') ('net/mlx5e: kTLS, Do not send decrypted-marked SKBs via non-accel path') ('net/mlx5: Eswitch, Prevent ingress rate configuration of uplink rep') ('net/mlx5e: kTLS, Remove redundant posts in TX resync flow') ('net/mlx5: DR, Enable counter on non-fwd-dest objects') ('net/mlx5: DR, use non preemptible call to get the current cpu number') ==================== Signed-off-by: David S. Miller commit 4cea9037f82a6deed0f2f61e4054b7ae2519ef87 Author: David Sterba Date: Sat Jan 25 12:35:38 2020 +0100 btrfs: dev-replace: remove warning for unknown return codes when finished The fstests btrfs/011 triggered a warning at the end of device replace, [ 1891.998975] BTRFS warning (device vdd): failed setting block group ro: -28 [ 1892.038338] BTRFS error (device vdd): btrfs_scrub_dev(/dev/vdd, 1, /dev/vdb) failed -28 [ 1892.059993] ------------[ cut here ]------------ [ 1892.063032] WARNING: CPU: 2 PID: 2244 at fs/btrfs/dev-replace.c:506 btrfs_dev_replace_start.cold+0xf9/0x140 [btrfs] [ 1892.074346] CPU: 2 PID: 2244 Comm: btrfs Not tainted 5.5.0-rc7-default+ #942 [ 1892.079956] RIP: 0010:btrfs_dev_replace_start.cold+0xf9/0x140 [btrfs] [ 1892.096576] RSP: 0018:ffffbb58c7b3fd10 EFLAGS: 00010286 [ 1892.098311] RAX: 00000000ffffffe4 RBX: 0000000000000001 RCX: 8888888888888889 [ 1892.100342] RDX: 0000000000000001 RSI: ffff9e889645f5d8 RDI: ffffffff92821080 [ 1892.102291] RBP: ffff9e889645c000 R08: 000001b8878fe1f6 R09: 0000000000000000 [ 1892.104239] R10: ffffbb58c7b3fd08 R11: 0000000000000000 R12: ffff9e88a0017000 [ 1892.106434] R13: ffff9e889645f608 R14: ffff9e88794e1000 R15: ffff9e88a07b5200 [ 1892.108642] FS: 00007fcaed3f18c0(0000) GS:ffff9e88bda00000(0000) knlGS:0000000000000000 [ 1892.111558] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1892.113492] CR2: 00007f52509ff420 CR3: 00000000603dd002 CR4: 0000000000160ee0 [ 1892.115814] Call Trace: [ 1892.116896] btrfs_dev_replace_by_ioctl+0x35/0x60 [btrfs] [ 1892.118962] btrfs_ioctl+0x1d62/0x2550 [btrfs] caused by the previous patch ("btrfs: scrub: Require mandatory block group RO for dev-replace"). Hitting ENOSPC is possible and could happen when the block group is set read-only, preventing NOCOW writes to the area that's being accessed by dev-replace. This has happend with scratch devices of size 12G but not with 5G and 20G, so this is depends on timing and other activity on the filesystem. The whole replace operation is restartable, the space state should be examined by the user in any case. The error code is propagated back to the ioctl caller so the kernel warning is causing false alerts. Signed-off-by: David Sterba commit 3546d8f1bbe992488ed91592cf6bf76e7114791a Author: Michael Ellerman Date: Fri Jan 24 20:41:44 2020 +1100 net: cxgb3_main: Add CAP_NET_ADMIN check to CHELSIO_GET_MEM The cxgb3 driver for "Chelsio T3-based gigabit and 10Gb Ethernet adapters" implements a custom ioctl as SIOCCHIOCTL/SIOCDEVPRIVATE in cxgb_extension_ioctl(). One of the subcommands of the ioctl is CHELSIO_GET_MEM, which appears to read memory directly out of the adapter and return it to userspace. It's not entirely clear what the contents of the adapter memory contains, but the assumption is that it shouldn't be accessible to all users. So add a CAP_NET_ADMIN check to the CHELSIO_GET_MEM case. Put it after the is_offload() check, which matches two of the other subcommands in the same function which also check for is_offload() and CAP_NET_ADMIN. Found by Ilja by code inspection, not tested as I don't have the required hardware. Reported-by: Ilja Van Sprundel Signed-off-by: Michael Ellerman Signed-off-by: David S. Miller commit 148965df1a990af98b2c84092c2a2274c7489284 Author: Florian Fainelli Date: Thu Jan 23 09:49:34 2020 -0800 net: bcmgenet: Use netif_tx_napi_add() for TX NAPI Before commit 7587935cfa11 ("net: bcmgenet: move NAPI initialization to ring initialization") moved the code, this used to be netif_tx_napi_add(), but we lost that small semantic change in the process, restore that. Fixes: 7587935cfa11 ("net: bcmgenet: move NAPI initialization to ring initialization") Signed-off-by: Florian Fainelli Acked-by: Doug Berger Signed-off-by: David S. Miller commit 61b1f2aff41141cd39686285c9b290a07e1e3051 Author: Jon Maloy Date: Thu Jan 23 10:09:39 2020 -0500 tipc: change maintainer email address Reflecting new realities. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit b9f0b2f634c0765999bec5547bc7a4ac08fda3ff Author: Ajay Gupta Date: Wed Jan 22 17:16:35 2020 -0800 net: stmmac: platform: fix probe for ACPI devices Use generic device API to get phy mode to fix probe failure with ACPI based devices. Signed-off-by: Ajay Gupta Signed-off-by: David S. Miller commit d5d359b0ac3ffc319ca93c46a4cfd87093759ad6 Merge: 6381b442836e 996d5d5f89a5 Author: Linus Torvalds Date: Fri Jan 24 19:27:42 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - add sanity checks to USB endpoints in various dirvers - max77650-onkey was missing an OF table which was preventing module autoloading - a revert and a different fix for F54 handling in Synaptics dirver - a fixup for handling register in pm8xxx vibrator driver * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: pm8xxx-vib - fix handling of separate enable register Input: keyspan-remote - fix control-message timeouts Input: max77650-onkey - add of_match table Input: rmi_f54 - read from FIFO in 32 byte blocks Revert "Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers" Input: sur40 - fix interface sanity checks Input: gtco - drop redundant variable reinit Input: gtco - fix extra-descriptor debug message Input: gtco - fix endpoint sanity check Input: aiptek - use descriptors of current altsetting Input: aiptek - fix endpoint sanity check Input: pegasus_notetaker - fix endpoint sanity check Input: sun4i-ts - add a check for devm_thermal_zone_of_sensor_register Input: evdev - convert kzalloc()/vzalloc() to kvzalloc() commit 6716cb162deb9d474095a57d7a515edc13926ea7 Merge: 088307d21620 b0b039515445 Author: Olof Johansson Date: Fri Jan 24 12:05:32 2020 -0800 Merge tag 'omap-for-fixes-whenever-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Few minor fixes for omaps Looks like we have wrong default memory size for beaglebone black, it has at least 512 MB of RAM and not 256 MB. This causes an issue when booted with GRUB2 that does not seem to pass memory info to the kernel. And for am43x-epos-evm the SPI pin directions need to be configured for SPI to work. * tag 'omap-for-fixes-whenever-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am43x-epos-evm: set data pin directions for spi0 and spi1 ARM: dts: am335x-boneblack-common: fix memory size Link: https://lore.kernel.org/r/pull-1579895109-287828@atomide.com Signed-off-by: Olof Johansson commit 088307d216205227baa4707f07c73d1dcb863c9b Merge: 70db729fe1b3 9e0caab8e0f9 Author: Olof Johansson Date: Fri Jan 24 12:05:07 2020 -0800 Merge tag 'tee-optee-fix2-for-5.5' of https://git.linaro.org:/people/jens.wiklander/linux-tee into arm/fixes Fix OP-TEE compile error with nommu * tag 'tee-optee-fix2-for-5.5' of https://git.linaro.org:/people/jens.wiklander/linux-tee: tee: optee: Fix compilation issue with nommu Link: https://lore.kernel.org/r/20200123101310.GA10320@jax Signed-off-by: Olof Johansson commit 342508c1c7540e281fd36151c175ba5ff954a99f Author: Tariq Toukan Date: Mon Jan 20 13:42:00 2020 +0200 net/mlx5e: kTLS, Do not send decrypted-marked SKBs via non-accel path When TCP out-of-order is identified (unexpected tcp seq mismatch), driver analyzes the packet and decides what handling should it get: 1. go to accelerated path (to be encrypted in HW), 2. go to regular xmit path (send w/o encryption), 3. drop. Packets marked with skb->decrypted by the TLS stack in the TX flow skips SW encryption, and rely on the HW offload. Verify that such packets are never sent un-encrypted on the wire. Add a WARN to catch such bugs, and prefer dropping the packet in these cases. Fixes: 46a3ea98074e ("net/mlx5e: kTLS, Enhance TX resync flow") Signed-off-by: Tariq Toukan Signed-off-by: Boris Pismenny Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit 1e92899791358dba94a9db7cc3b6004636b5a2f6 Author: Tariq Toukan Date: Mon Jan 13 14:46:09 2020 +0200 net/mlx5e: kTLS, Remove redundant posts in TX resync flow The call to tx_post_resync_params() is done earlier in the flow, the post of the control WQEs is unnecessarily repeated. Remove it. Fixes: 700ec4974240 ("net/mlx5e: kTLS, Fix missing SQ edge fill") Signed-off-by: Tariq Toukan Signed-off-by: Boris Pismenny Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit ffbd9ca94e2ebbfe802d4b28bab5ba19818de853 Author: Tariq Toukan Date: Sun Jan 12 16:22:14 2020 +0200 net/mlx5e: kTLS, Fix corner-case checks in TX resync flow There are the following cases: 1. Packet ends before start marker: bypass offload. 2. Packet starts before start marker and ends after it: drop, not supported, breaks contract with kernel. 3. packet ends before tls record info starts: drop, this packet was already acknowledged and its record info was released. Add the above as comment in code. Mind possible wraparounds of the TCP seq, replace the simple comparison with a call to the TCP before() method. In addition, remove logic that handles negative sync_len values, as it became impossible. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Fixes: 46a3ea98074e ("net/mlx5e: kTLS, Enhance TX resync flow") Signed-off-by: Tariq Toukan Signed-off-by: Boris Pismenny Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit 3b83b6c2e024d85b770ddb1e19a513b5d7587f6f Author: Dmytro Linkin Date: Mon Jan 13 13:46:13 2020 +0200 net/mlx5e: Clear VF config when switching modes Currently VF in LEGACY mode are not able to go up. Also in OFFLOADS mode, when switching to it first time, VF can go up independently to his representor, which is not expected. Perform clearing of VF config when switching modes and set link state to AUTO as default value. Also, when switching to OFFLOADS mode set link state to DOWN, which allow VF link state to be controlled by its REP. Fixes: 1ab2068a4c66 ("net/mlx5: Implement vports admin state backup/restore") Fixes: 556b9d16d3f5 ("net/mlx5: Clear VF's configuration on disabling SRIOV") Signed-off-by: Dmytro Linkin Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit c0702a4bd41829f05638ec2dab70f6bb8d8010ce Author: Erez Shitrit Date: Sun Jan 12 08:57:59 2020 +0200 net/mlx5: DR, use non preemptible call to get the current cpu number Use raw_smp_processor_id instead of smp_processor_id() otherwise we will get the following trace in debug-kernel: BUG: using smp_processor_id() in preemptible [00000000] code: devlink caller is dr_create_cq.constprop.2+0x31d/0x970 [mlx5_core] Call Trace: dump_stack+0x9a/0xf0 debug_smp_processor_id+0x1f3/0x200 dr_create_cq.constprop.2+0x31d/0x970 genl_family_rcv_msg+0x5fd/0x1170 genl_rcv_msg+0xb8/0x160 netlink_rcv_skb+0x11e/0x340 Fixes: 297cccebdc5a ("net/mlx5: DR, Expose an internal API to issue RDMA operations") Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed commit e401a1848be87123a2b2049addbf21138cb47081 Author: Eli Cohen Date: Sun Jan 12 13:43:37 2020 +0200 net/mlx5: E-Switch, Prevent ingress rate configuration of uplink rep Since the implementation relies on limiting the VF transmit rate to simulate ingress rate limiting, and since either uplink representor or ecpf are not associated with a VF, we limit the rate limit configuration for those ports. 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 b850a82114df9b0ec1d191dc64eed1f20a772e0f Author: Erez Shitrit Date: Wed Jan 8 14:17:32 2020 +0200 net/mlx5: DR, Enable counter on non-fwd-dest objects The current code handles only counters that attached to dest, we still have the cases where we have counter on non-dest, like over drop etc. Fixes: 6a48faeeca10 ("net/mlx5: Add direct rule fs_cmd implementation") Signed-off-by: Hamdan Igbaria Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 505a7f5478062c6cd11e22022d9f1bf64cd8eab3 Author: Meir Lichtinger Date: Thu Dec 12 16:09:33 2019 +0200 net/mlx5: Update the list of the PCI supported devices Add the upcoming ConnectX-7 device ID. Fixes: 85327a9c4150 ("net/mlx5: Update the list of the PCI supported devices") Signed-off-by: Meir Lichtinger Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 93b8a7ecb7287cc9b0196f12a25b57c2462d11dc Author: Paul Blakey Date: Tue Dec 31 17:04:15 2019 +0200 net/mlx5: Fix lowest FDB pool size The pool sizes represent the pool sizes in the fw. when we request a pool size from fw, it will return the next possible group. We track how many pools the fw has left and start requesting groups from the big to the small. When we start request 4k group, which doesn't exists in fw, fw wants to allocate the next possible size, 64k, but will fail since its exhausted. The correct smallest pool size in fw is 128 and not 4k. Fixes: e52c28024008 ("net/mlx5: E-Switch, Add chains and priorities") Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 189c9b1e94539b11c80636bc13e9cf47529e7bba Author: Praveen Chaudhary Date: Thu Jan 23 12:33:28 2020 -0800 net: Fix skb->csum update in inet_proto_csum_replace16(). skb->csum is updated incorrectly, when manipulation for NF_NAT_MANIP_SRC\DST is done on IPV6 packet. Fix: There is no need to update skb->csum in inet_proto_csum_replace16(), because update in two fields a.) IPv6 src/dst address and b.) L4 header checksum cancels each other for skb->csum calculation. Whereas inet_proto_csum_replace4 function needs to update skb->csum, because update in 3 fields a.) IPv4 src/dst address, b.) IPv4 Header checksum and c.) L4 header checksum results in same diff as L4 Header checksum for skb->csum calculation. [ pablo@netfilter.org: a few comestic documentation edits ] Signed-off-by: Praveen Chaudhary Signed-off-by: Zhenggen Xu Signed-off-by: Andy Stracner Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit eb014de4fd418de1a277913cba244e47274fe392 Author: Pablo Neira Ayuso Date: Tue Jan 21 16:48:03 2020 +0100 netfilter: nf_tables: autoload modules from the abort path This patch introduces a list of pending module requests. This new module list is composed of nft_module_request objects that contain the module name and one status field that tells if the module has been already loaded (the 'done' field). In the first pass, from the preparation phase, the netlink command finds that a module is missing on this list. Then, a module request is allocated and added to this list and nft_request_module() returns -EAGAIN. This triggers the abort path with the autoload parameter set on from nfnetlink, request_module() is called and the module request enters the 'done' state. Since the mutex is released when loading modules from the abort phase, the module list is zapped so this is iteration occurs over a local list. Therefore, the request_module() calls happen when object lists are in consistent state (after fulling aborting the transaction) and the commit list is empty. On the second pass, the netlink command will find that it already tried to load the module, so it does not request it again and nft_request_module() returns 0. Then, there is a look up to find the object that the command was missing. If the module was successfully loaded, the command proceeds normally since it finds the missing object in place, otherwise -ENOENT is reported to userspace. This patch also updates nfnetlink to include the reason to enter the abort phase, which is required for this new autoload module rationale. Fixes: ec7470b834fe ("netfilter: nf_tables: store transaction list locally while requesting module") Reported-by: syzbot+29125d208b3dae9a7019@syzkaller.appspotmail.com Signed-off-by: Pablo Neira Ayuso commit 826035498ec14b77b62a44f0cb6b94d45530db6f Author: Pablo Neira Ayuso Date: Tue Jan 21 16:07:00 2020 +0100 netfilter: nf_tables: add __nft_chain_type_get() This new helper function validates that unknown family and chain type coming from userspace do not trigger an out-of-bound array access. Bail out in case __nft_chain_type_get() returns NULL from nft_chain_parse_hook(). Fixes: 9370761c56b6 ("netfilter: nf_tables: convert built-in tables/chains to chain types") Reported-by: syzbot+156a04714799b1d480bc@syzkaller.appspotmail.com Signed-off-by: Pablo Neira Ayuso commit c83de17dd6308fb74696923e5245de0e3c427206 Author: wenxu Date: Sun Jan 19 13:18:30 2020 +0800 netfilter: nf_tables_offload: fix check the chain offload flag In the nft_indr_block_cb the chain should check the flag with NFT_CHAIN_HW_OFFLOAD. Fixes: 9a32669fecfb ("netfilter: nf_tables_offload: support indr block call") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 6381b442836ea3c52eae630b10be8c27c7a17af2 Merge: 3c45d7510cf5 8c17bbf6c8f7 Author: Linus Torvalds Date: Fri Jan 24 09:56:59 2020 -0800 Merge tag 'iommu-fixes-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: "Two fixes: - Fix NULL-ptr dereference bug in Intel IOMMU driver - Properly save and restore AMD IOMMU performance counter registers when testing if they are writable" * tag 'iommu-fixes-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Fix IOMMU perf counter clobbering during init iommu/vt-d: Call __dmar_remove_one_dev_info with valid pointer commit 3c45d7510cf563be2ebc04f6864b70bc69f68cb9 Merge: 274adbff45e3 5d2e5dd5849b Author: Linus Torvalds Date: Fri Jan 24 09:49:20 2020 -0800 Merge tag 'powerpc-5.5-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 5.5: - Fix our hash MMU code to avoid having overlapping ids between user and kernel, which isn't as bad as it sounds but led to crashes on some machines. - A fix for the Power9 XIVE interrupt code, which could return the wrong interrupt state in obscure error conditions. - A minor Kconfig fix for the recently added CONFIG_PPC_UV code. Thanks to Aneesh Kumar K.V, Bharata B Rao, Cédric Le Goater, Frederic Barrat" * tag 'powerpc-5.5-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm/hash: Fix sharing context ids between kernel & userspace powerpc/xive: Discard ESB load value when interrupt is invalid powerpc: Ultravisor: Fix the dependencies for CONFIG_PPC_UV commit 274adbff45e3c26c65b2e103581d2ab5834b0b7c Merge: ab10ae1c3bef 49412f6636ba Author: Linus Torvalds Date: Fri Jan 24 09:38:04 2020 -0800 Merge tag 'drm-fixes-2020-01-24' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This one has a core mst fix and two i915 fixes. amdgpu just enables some hw outside experimental. The panfrost fix is a little bigger than I'd like at this stage but it fixes a fairly fundamental problem with global shared buffers in that driver, and since it's confined to that driver and I've taken a look at it, I think it's fine to get into the tree now, so it can get stable propagated as well. core/mst: - Fix SST branch device handling amdgpu: - enable renoir outside experimental i915: - Avoid overflow with huge userptr objects - uAPI fix to correctly handle negative values in engine->uabi_class/instance (cc: stable) panfrost: - Fix mapping of globally visible BO's (Boris)" * tag 'drm-fixes-2020-01-24' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu: remove the experimental flag for renoir drm/panfrost: Add the panfrost_gem_mapping concept drm/i915: Align engine->uabi_class/instance with i915_drm.h drm/i915/userptr: fix size calculation drm/dp_mst: Handle SST-only branch device case commit ab10ae1c3bef56c29bac61e1201c752221b87b41 Author: Christophe Leroy Date: Thu Jan 23 08:34:18 2020 +0000 lib: Reduce user_access_begin() boundaries in strncpy_from_user() and strnlen_user() The range passed to user_access_begin() by strncpy_from_user() and strnlen_user() starts at 'src' and goes up to the limit of userspace although reads will be limited by the 'count' param. On 32 bits powerpc (book3s/32) access has to be granted for each 256Mbytes segment and the cost increases with the number of segments to unlock. Limit the range with 'count' param. Fixes: 594cc251fdd0 ("make 'user_access_begin()' do 'access_ok()'") Signed-off-by: Christophe Leroy Signed-off-by: Linus Torvalds commit ab658b9fa7a2c467f79eac8b53ea308b8f98113d Author: Jiri Wiesner Date: Sat Jan 18 13:10:50 2020 +0100 netfilter: conntrack: sctp: use distinct states for new SCTP connections The netlink notifications triggered by the INIT and INIT_ACK chunks for a tracked SCTP association do not include protocol information for the corresponding connection - SCTP state and verification tags for the original and reply direction are missing. Since the connection tracking implementation allows user space programs to receive notifications about a connection and then create a new connection based on the values received in a notification, it makes sense that INIT and INIT_ACK notifications should contain the SCTP state and verification tags available at the time when a notification is sent. The missing verification tags cause a newly created netfilter connection to fail to verify the tags of SCTP packets when this connection has been created from the values previously received in an INIT or INIT_ACK notification. A PROTOINFO event is cached in sctp_packet() when the state of a connection changes. The CLOSED and COOKIE_WAIT state will be used for connections that have seen an INIT and INIT_ACK chunk, respectively. The distinct states will cause a connection state change in sctp_packet(). Signed-off-by: Jiri Wiesner Signed-off-by: Pablo Neira Ayuso commit 8c17bbf6c8f70058a66305f2e1982552e6ea7f47 Author: Shuah Khan Date: Thu Jan 23 15:32:14 2020 -0700 iommu/amd: Fix IOMMU perf counter clobbering during init init_iommu_perf_ctr() clobbers the register when it checks write access to IOMMU perf counters and fails to restore when they are writable. Add save and restore to fix it. Signed-off-by: Shuah Khan Fixes: 30861ddc9cca4 ("perf/x86/amd: Add IOMMU Performance Counter resource management") Reviewed-by: Suravee Suthikulpanit Tested-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel commit bf708cfb2f4811d1948a88c41ab96587e84ad344 Author: Jerry Snitselaar Date: Tue Jan 21 17:34:26 2020 -0700 iommu/vt-d: Call __dmar_remove_one_dev_info with valid pointer It is possible for archdata.iommu to be set to DEFER_DEVICE_DOMAIN_INFO or DUMMY_DEVICE_DOMAIN_INFO so check for those values before calling __dmar_remove_one_dev_info. Without a check it can result in a null pointer dereference. This has been seen while booting a kdump kernel on an HP dl380 gen9. Cc: Joerg Roedel Cc: Lu Baolu Cc: David Woodhouse Cc: stable@vger.kernel.org # 5.3+ Cc: linux-kernel@vger.kernel.org Fixes: ae23bfb68f28 ("iommu/vt-d: Detach domain before using a private one") Signed-off-by: Jerry Snitselaar Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 1bbb97b8ce7ddf3a56645636c905cef706706dd9 Author: Qu Wenruo Date: Fri Jan 24 07:58:20 2020 +0800 btrfs: scrub: Require mandatory block group RO for dev-replace [BUG] For dev-replace test cases with fsstress, like btrfs/06[45] btrfs/071, looped runs can lead to random failure, where scrub finds csum error. The possibility is not high, around 1/20 to 1/100, but it's causing data corruption. The bug is observable after commit b12de52896c0 ("btrfs: scrub: Don't check free space before marking a block group RO") [CAUSE] Dev-replace has two source of writes: - Write duplication All writes to source device will also be duplicated to target device. Content: Not yet persisted data/meta - Scrub copy Dev-replace reused scrub code to iterate through existing extents, and copy the verified data to target device. Content: Previously persisted data and metadata The difference in contents makes the following race possible: Regular Writer | Dev-replace ----------------------------------------------------------------- ^ | | Preallocate one data extent | | at bytenr X, len 1M | v | ^ Commit transaction | | Now extent [X, X+1M) is in | v commit root | ================== Dev replace starts ========================= | ^ | | Scrub extent [X, X+1M) | | Read [X, X+1M) | | (The content are mostly garbage | | since it's preallocated) ^ | v | Write back happens for | | extent [X, X+512K) | | New data writes to both | | source and target dev. | v | | ^ | | Scrub writes back extent [X, X+1M) | | to target device. | | This will over write the new data in | | [X, X+512K) | v This race can only happen for nocow writes. Thus metadata and data cow writes are safe, as COW will never overwrite extents of previous transaction (in commit root). This behavior can be confirmed by disabling all fallocate related calls in fsstress (*), then all related tests can pass a 2000 run loop. *: FSSTRESS_AVOID="-f fallocate=0 -f allocsp=0 -f zero=0 -f insert=0 \ -f collapse=0 -f punch=0 -f resvsp=0" I didn't expect resvsp ioctl will fallback to fallocate in VFS... [FIX] Make dev-replace to require mandatory block group RO, and wait for current nocow writes before calling scrub_chunk(). This patch will mostly revert commit 76a8efa171bf ("btrfs: Continue replace when set_block_ro failed") for dev-replace path. The side effect is, dev-replace can be more strict on avaialble space, but definitely worth to avoid data corruption. Reported-by: Filipe Manana Fixes: 76a8efa171bf ("btrfs: Continue replace when set_block_ro failed") Fixes: b12de52896c0 ("btrfs: scrub: Don't check free space before marking a block group RO") Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 623c8d5c74c69a41573da5a38bb59e8652113f56 Merge: 2bec445f9bf3 4fc427e05158 Author: David S. Miller Date: Fri Jan 24 11:42:18 2020 +0100 Merge branch 'netdev-seq_file-next-functions-should-increase-position-index' Vasily Averin says: ==================== netdev: seq_file .next functions should increase position index In Aug 2018 NeilBrown noticed commit 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") "Some ->next functions do not increment *pos when they return NULL... Note that such ->next functions are buggy and should be fixed. A simple demonstration is dd if=/proc/swaps bs=1000 skip=1 Choose any block size larger than the size of /proc/swaps. This will always show the whole last line of /proc/swaps" Described problem is still actual. If you make lseek into middle of last output line following read will output end of last line and whole last line once again. $ dd if=/proc/swaps bs=1 # usual output Filename Type Size Used Priority /dev/dm-0 partition 4194812 97536 -2 104+0 records in 104+0 records out 104 bytes copied $ dd if=/proc/swaps bs=40 skip=1 # last line was generated twice dd: /proc/swaps: cannot skip to specified offset v/dm-0 partition 4194812 97536 -2 /dev/dm-0 partition 4194812 97536 -2 3+1 records in 3+1 records out 131 bytes copied There are lot of other affected files, I've found 30+ including /proc/net/ip_tables_matches and /proc/sysvipc/* This patch-set fixes files related to netdev@ https://bugzilla.kernel.org/show_bug.cgi?id=206283 ==================== Signed-off-by: David S. Miller commit 4fc427e0515811250647d44de38d87d7b0e0790f Author: Vasily Averin Date: Thu Jan 23 10:12:06 2020 +0300 ipv6_route_seq_next should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David S. Miller commit a3ea86739f1bc7e121d921842f0f4a8ab1af94d9 Author: Vasily Averin Date: Thu Jan 23 10:11:35 2020 +0300 rt_cpu_seq_next should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David S. Miller commit 1e3f9f073c47bee7c23e77316b07bc12338c5bba Author: Vasily Averin Date: Thu Jan 23 10:11:28 2020 +0300 neigh_stat_seq_next() should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David S. Miller commit 8bf7092021f283944f0c5f4c364853201c45c611 Author: Vasily Averin Date: Thu Jan 23 10:11:20 2020 +0300 vcc_seq_next should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David S. Miller commit 66018a102f7756cf72db4d2704e1b93969d9d332 Author: Vasily Averin Date: Thu Jan 23 10:11:13 2020 +0300 l2t_seq_next should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David S. Miller commit 70a87287c821e9721b62463777f55ba588ac4623 Author: Vasily Averin Date: Thu Jan 23 10:11:08 2020 +0300 seq_tab_next() should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David S. Miller commit 2bec445f9bf35e52e395b971df48d3e1e5dc704a Author: Eric Dumazet Date: Wed Jan 22 21:03:00 2020 -0800 tcp: do not leave dangling pointers in tp->highest_sack Latest commit 853697504de0 ("tcp: Fix highest_sack and highest_sack_seq") apparently allowed syzbot to trigger various crashes in TCP stack [1] I believe this commit only made things easier for syzbot to find its way into triggering use-after-frees. But really the bugs could lead to bad TCP behavior or even plain crashes even for non malicious peers. I have audited all calls to tcp_rtx_queue_unlink() and tcp_rtx_queue_unlink_and_free() and made sure tp->highest_sack would be updated if we are removing from rtx queue the skb that tp->highest_sack points to. These updates were missing in three locations : 1) tcp_clean_rtx_queue() [This one seems quite serious, I have no idea why this was not caught earlier] 2) tcp_rtx_queue_purge() [Probably not a big deal for normal operations] 3) tcp_send_synack() [Probably not a big deal for normal operations] [1] BUG: KASAN: use-after-free in tcp_highest_sack_seq include/net/tcp.h:1864 [inline] BUG: KASAN: use-after-free in tcp_highest_sack_seq include/net/tcp.h:1856 [inline] BUG: KASAN: use-after-free in tcp_check_sack_reordering+0x33c/0x3a0 net/ipv4/tcp_input.c:891 Read of size 4 at addr ffff8880a488d068 by task ksoftirqd/1/16 CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.5.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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:134 tcp_highest_sack_seq include/net/tcp.h:1864 [inline] tcp_highest_sack_seq include/net/tcp.h:1856 [inline] tcp_check_sack_reordering+0x33c/0x3a0 net/ipv4/tcp_input.c:891 tcp_try_undo_partial net/ipv4/tcp_input.c:2730 [inline] tcp_fastretrans_alert+0xf74/0x23f0 net/ipv4/tcp_input.c:2847 tcp_ack+0x2577/0x5bf0 net/ipv4/tcp_input.c:3710 tcp_rcv_established+0x6dd/0x1e90 net/ipv4/tcp_input.c:5706 tcp_v4_do_rcv+0x619/0x8d0 net/ipv4/tcp_ipv4.c:1619 tcp_v4_rcv+0x307f/0x3b40 net/ipv4/tcp_ipv4.c:2001 ip_protocol_deliver_rcu+0x5a/0x880 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x23b/0x380 net/ipv4/ip_input.c:231 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_local_deliver+0x1e9/0x520 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:442 [inline] ip_rcv_finish+0x1db/0x2f0 net/ipv4/ip_input.c:428 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_rcv+0xe8/0x3f0 net/ipv4/ip_input.c:538 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:5148 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5262 process_backlog+0x206/0x750 net/core/dev.c:6093 napi_poll net/core/dev.c:6530 [inline] net_rx_action+0x508/0x1120 net/core/dev.c:6598 __do_softirq+0x262/0x98c kernel/softirq.c:292 run_ksoftirqd kernel/softirq.c:603 [inline] run_ksoftirqd+0x8e/0x110 kernel/softirq.c:595 smpboot_thread_fn+0x6a3/0xa40 kernel/smpboot.c:165 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 10091: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:521 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slab.c:3263 [inline] kmem_cache_alloc_node+0x138/0x740 mm/slab.c:3575 __alloc_skb+0xd5/0x5e0 net/core/skbuff.c:198 alloc_skb_fclone include/linux/skbuff.h:1099 [inline] sk_stream_alloc_skb net/ipv4/tcp.c:875 [inline] sk_stream_alloc_skb+0x113/0xc90 net/ipv4/tcp.c:852 tcp_sendmsg_locked+0xcf9/0x3470 net/ipv4/tcp.c:1282 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1432 inet_sendmsg+0x9e/0xe0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 __sys_sendto+0x262/0x380 net/socket.c:1998 __do_sys_sendto net/socket.c:2010 [inline] __se_sys_sendto net/socket.c:2006 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:2006 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10095: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x86/0x320 mm/slab.c:3694 kfree_skbmem+0x178/0x1c0 net/core/skbuff.c:645 __kfree_skb+0x1e/0x30 net/core/skbuff.c:681 sk_eat_skb include/net/sock.h:2453 [inline] tcp_recvmsg+0x1252/0x2930 net/ipv4/tcp.c:2166 inet_recvmsg+0x136/0x610 net/ipv4/af_inet.c:838 sock_recvmsg_nosec net/socket.c:886 [inline] sock_recvmsg net/socket.c:904 [inline] sock_recvmsg+0xce/0x110 net/socket.c:900 __sys_recvfrom+0x1ff/0x350 net/socket.c:2055 __do_sys_recvfrom net/socket.c:2073 [inline] __se_sys_recvfrom net/socket.c:2069 [inline] __x64_sys_recvfrom+0xe1/0x1a0 net/socket.c:2069 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a488d040 which belongs to the cache skbuff_fclone_cache of size 456 The buggy address is located 40 bytes inside of 456-byte region [ffff8880a488d040, ffff8880a488d208) The buggy address belongs to the page: page:ffffea0002922340 refcount:1 mapcount:0 mapping:ffff88821b057000 index:0x0 raw: 00fffe0000000200 ffffea00022a5788 ffffea0002624a48 ffff88821b057000 raw: 0000000000000000 ffff8880a488d040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a488cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a488cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a488d000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880a488d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a488d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 853697504de0 ("tcp: Fix highest_sack and highest_sack_seq") Fixes: 50895b9de1d3 ("tcp: highest_sack fix") Fixes: 737ff314563c ("tcp: use sequence distance to detect reordering") Signed-off-by: Eric Dumazet Cc: Cambda Zhu Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Signed-off-by: David S. Miller commit 4d299f183314aa79131abdfa2c528f8807010ea8 Author: Colin Ian King Date: Thu Jan 23 09:27:30 2020 +0000 net/rose: fix spelling mistake "to" -> "too" There is a spelling mistake in a printk message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 43d88774d138496c88920e2bb012f5fd098ee6ad Author: Colin Ian King Date: Thu Jan 23 00:45:55 2020 +0000 caif_usb: fix spelling mistake "to" -> "too" There is a spelling mistake in a pr_warn message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 971485a0d681954677ec6a7ed990359aceabc06e Author: Colin Ian King Date: Thu Jan 23 00:43:28 2020 +0000 ipvs: fix spelling mistake "to" -> "too" There is a spelling mistake in a IP_VS_ERR_RL message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 959b1825d9ab5081f7446ed3f4329384c7818af7 Author: Colin Ian King Date: Thu Jan 23 00:14:29 2020 +0000 i40e: fix spelling mistake "to" -> "too" There is a spelling mistake in a hw_dbg message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 838a860a390547dc6f8bc9d0a77d4ebad1dc8ff1 Merge: 4703d9119972 2a187d033520 Author: Linus Torvalds Date: Thu Jan 23 16:02:00 2020 -0800 Merge tag 'mmc-v5.5-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of MMC host fixes: - sdhci: Fix minimum clock rate for v3 controllers - sdhci-tegra: Fix SDR50 tuning override - sdhci_am654: Fixup tuning issues and support for CQHCI - sdhci_am654: Remove wrong write protect flag" * tag 'mmc-v5.5-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci: fix minimum clock rate for v3 controller mmc: tegra: fix SDR50 tuning override mmc: sdhci_am654: Fix Command Queuing in AM65x mmc: sdhci_am654: Reset Command and Data line after tuning mmc: sdhci_am654: Remove Inverted Write Protect flag commit 49412f6636bab17dbdc25e36d6482013e4188c88 Merge: b52937145d6f 23fe1390c7f1 Author: Dave Airlie Date: Fri Jan 24 08:58:12 2020 +1000 Merge tag 'amd-drm-fixes-5.5-2020-01-23' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.5-2020-01-23: amdgpu: - remove the experimental flag from renoir Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200123191424.3849-1-alexander.deucher@amd.com commit b52937145d6f7cad4957c8df43e89497b6329420 Merge: a48d4a33b6ef 5eec71829ad7 Author: Dave Airlie Date: Fri Jan 24 08:57:37 2020 +1000 Merge tag 'drm-intel-fixes-2020-01-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Avoid overflow with huge userptr objects - uAPI fix to correctly handle negative values in engine->uabi_class/instance (cc: stable) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200123135045.GA12584@jlahtine-desk.ger.corp.intel.com commit 61678d28d4a45ef376f5d02a839cc37509ae9281 Author: Cong Wang Date: Wed Jan 22 15:42:02 2020 -0800 net_sched: fix datalen for ematch syzbot reported an out-of-bound access in em_nbyte. As initially analyzed by Eric, this is because em_nbyte sets its own em->datalen in em_nbyte_change() other than the one specified by user, but this value gets overwritten later by its caller tcf_em_validate(). We should leave em->datalen untouched to respect their choices. I audit all the in-tree ematch users, all of those implement ->change() set em->datalen, so we can just avoid setting it twice in this case. Reported-and-tested-by: syzbot+5af9a90dad568aa9f611@syzkaller.appspotmail.com Reported-by: syzbot+2f07903a5b05e7f36410@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Eric Dumazet Signed-off-by: Cong Wang Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 42c9bdae2366072aa7c4d680c429fcdec22b44f2 Merge: 457bfc0a4bf5 686f85d71d09 Author: David S. Miller Date: Thu Jan 23 21:24:37 2020 +0100 Merge branch 'Fixes-for-SONIC-ethernet-driver' Finn Thain says: ==================== Fixes for SONIC ethernet driver Various SONIC driver problems have become apparent over the years, including tx watchdog timeouts, lost packets and duplicated packets. The problems are mostly caused by bugs in buffer handling, locking and (re-)initialization code. This patch series resolves these problems. This series has been tested on National Semiconductor hardware (macsonic), qemu-system-m68k (macsonic) and qemu-system-mips64el (jazzsonic). The emulated dp8393x device used in QEMU also has bugs. I have fixed the bugs that I know of in a series of patches at, https://github.com/fthain/qemu/commits/sonic Changed since v1: - Minor revisions as described in commit logs. - Deferred net-next patches. Changed since v2: - Minor revisions as described in commit logs. ==================== Signed-off-by: David S. Miller commit 686f85d71d095f1d26b807e23b0f0bfd22042c45 Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Prevent tx watchdog timeout Section 5.5.3.2 of the datasheet says, If FIFO Underrun, Byte Count Mismatch, Excessive Collision, or Excessive Deferral (if enabled) errors occur, transmission ceases. In this situation, the chip asserts a TXER interrupt rather than TXDN. But the handler for the TXDN is the only way that the transmit queue gets restarted. Hence, an aborted transmission can result in a watchdog timeout. This problem can be reproduced on congested link, as that can result in excessive transmitter collisions. Another way to reproduce this is with a FIFO Underrun, which may be caused by DMA latency. In event of a TXER interrupt, prevent a watchdog timeout by restarting transmission. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 772f66421d5aa0b9f256056f513bbc38ac132271 Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Fix CAM initialization Section 4.3.1 of the datasheet says, This bit [TXP] must not be set if a Load CAM operation is in progress (LCAM is set). The SONIC will lock up if both bits are set simultaneously. Testing has shown that the driver sometimes attempts to set LCAM while TXP is set. Avoid this by waiting for command completion before and after giving the LCAM command. After issuing the Load CAM command, poll for !SONIC_CR_LCAM rather than SONIC_INT_LCD, because the SONIC_CR_TXP bit can't be used until !SONIC_CR_LCAM. When in reset mode, take the opportunity to reset the CAM Enable register. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 27e0c31c5f27c1d1a1d9d135c123069f60dcf97b Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Fix command register usage There are several issues relating to command register usage during chip initialization. Firstly, the SONIC sometimes comes out of software reset with the Start Timer bit set. This gets logged as, macsonic macsonic eth0: sonic_init: status=24, i=101 Avoid this by giving the Stop Timer command earlier than later. Secondly, the loop that waits for the Read RRA command to complete has the break condition inverted. That's why the for loop iterates until its termination condition. Call the helper for this instead. Finally, give the Receiver Enable command after clearing interrupts, not before, to avoid the possibility of losing an interrupt. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 3f4b7e6a2be982fd8820a2b54d46dd9c351db899 Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Quiesce SONIC before re-initializing descriptor memory Make sure the SONIC's DMA engine is idle before altering the transmit and receive descriptors. Add a helper for this as it will be needed again. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 89ba879e95582d3bba55081e45b5409e883312ca Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Fix receive buffer replenishment As soon as the driver is finished with a receive buffer it allocs a new one and overwrites the corresponding RRA entry with a new buffer pointer. Problem is, the buffer pointer is split across two word-sized registers. It can't be updated in one atomic store. So this operation races with the chip while it stores received packets and advances its RRP register. This could result in memory corruption by a DMA write. Avoid this problem by adding buffers only at the location given by the RWP register, in accordance with the National Semiconductor datasheet. Re-factor this code into separate functions to calculate a RRA pointer and to update the RWP. Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 94b166349503957079ef5e7d6f667f157aea014a Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Improve receive descriptor status flag check After sonic_tx_timeout() calls sonic_init(), it can happen that sonic_rx() will subsequently encounter a receive descriptor with no flags set. Remove the comment that says that this can't happen. When giving a receive descriptor to the SONIC, clear the descriptor status field. That way, any rx descriptor with flags set can only be a newly received packet. Don't process a descriptor without the LPKT bit set. The buffer is still in use by the SONIC. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit eaabfd19b2c787bbe88dc32424b9a43d67293422 Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Avoid needless receive descriptor EOL flag updates The while loop in sonic_rx() traverses the rx descriptor ring. It stops when it reaches a descriptor that the SONIC has not used. Each iteration advances the EOL flag so the SONIC can keep using more descriptors. Therefore, the while loop has no definite termination condition. The algorithm described in the National Semiconductor literature is quite different. It consumes descriptors up to the one with its EOL flag set (which will also have its "in use" flag set). All freed descriptors are then returned to the ring at once, by adjusting the EOL flags (and link pointers). Adopt the algorithm from datasheet as it's simpler, terminates quickly and avoids a lot of pointless descriptor EOL flag changes. Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 9e311820f67e740f4fb8dcb82b4c4b5b05bdd1a5 Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Fix receive buffer handling The SONIC can sometimes advance its rx buffer pointer (RRP register) without advancing its rx descriptor pointer (CRDA register). As a result the index of the current rx descriptor may not equal that of the current rx buffer. The driver mistakenly assumes that they are always equal. This assumption leads to incorrect packet lengths and possible packet duplication. Avoid this by calling a new function to locate the buffer corresponding to a given descriptor. Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 427db97df1ee721c20bdc9a66db8a9e1da719855 Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Fix interface error stats collection The tx_aborted_errors statistic should count packets flagged with EXD, EXC, FU, or BCM bits because those bits denote an aborted transmission. That corresponds to the bitmask 0x0446, not 0x0642. Use macros for these constants to avoid mistakes. Better to leave out FIFO Underruns (FU) as there's a separate counter for that purpose. Don't lump all these errors in with the general tx_errors counter as that's used for tx timeout events. On the rx side, don't count RDE and RBAE interrupts as dropped packets. These interrupts don't indicate a lost packet, just a lack of resources. When a lack of resources results in a lost packet, this gets reported in the rx_missed_errors counter (along with RFO events). Don't double-count rx_frame_errors and rx_crc_errors. Don't use the general rx_errors counter for events that already have special counters. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit e3885f576196ddfc670b3d53e745de96ffcb49ab Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Use MMIO accessors The driver accesses descriptor memory which is simultaneously accessed by the chip, so the compiler must not be allowed to re-order CPU accesses. sonic_buf_get() used 'volatile' to prevent that. sonic_buf_put() should have done so too but was overlooked. Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 5fedabf5a70be26b19d7520f09f12a62274317c6 Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Clear interrupt flags immediately The chip can change a packet's descriptor status flags at any time. However, an active interrupt flag gets cleared rather late. This allows a race condition that could theoretically lose an interrupt. Fix this by clearing asserted interrupt flags immediately. Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 865ad2f2201dc18685ba2686f13217f8b3a9c52c Author: Finn Thain Date: Thu Jan 23 09:07:26 2020 +1100 net/sonic: Add mutual exclusion for accessing shared state The netif_stop_queue() call in sonic_send_packet() races with the netif_wake_queue() call in sonic_interrupt(). This causes issues like "NETDEV WATCHDOG: eth0 (macsonic): transmit queue 0 timed out". Fix this by disabling interrupts when accessing tx_skb[] and next_tx. Update a comment to clarify the synchronization properties. Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 457bfc0a4bf531487ecc3cf82ec728a5e114fb1e Author: Madalin Bucur Date: Wed Jan 22 16:15:14 2020 +0200 net: fsl/fman: rename IF_MODE_XGMII to IF_MODE_10G As the only 10G PHY interface type defined at the moment the code was developed was XGMII, although the PHY interface mode used was not XGMII, XGMII was used in the code to denote 10G. This patch renames the 10G interface mode to remove the ambiguity. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 72b5917413e19529dd9495852fc10892f749c4ef Merge: 22e984493a41 1d3ca681b9d9 Author: David S. Miller Date: Thu Jan 23 21:17:13 2020 +0100 Merge branch 'net-fsl-fman-address-erratum-A011043' Madalin Bucur says: ==================== net: fsl/fman: address erratum A011043 This addresses a HW erratum on some QorIQ DPAA devices. MDIO reads to internal PCS registers may result in having the MDIO_CFG[MDIO_RD_ER] bit set, even when there is no error and read data (MDIO_DATA[MDIO_DATA]) is correct. Software may get false read error when reading internal PCS registers through MDIO. As a workaround, all internal MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit. When the issue was present, one could see such errors during boot: mdio_bus ffe4e5000: Error while reading PHY0 reg at 3.3 ==================== Signed-off-by: David S. Miller commit 1d3ca681b9d9575ccf696ebc2840a1ebb1fd4074 Author: Madalin Bucur Date: Wed Jan 22 15:20:29 2020 +0200 net/fsl: treat fsl,erratum-a011043 When fsl,erratum-a011043 is set, adjust for erratum A011043: MDIO reads to internal PCS registers may result in having the MDIO_CFG[MDIO_RD_ER] bit set, even when there is no error and read data (MDIO_DATA[MDIO_DATA]) is correct. Software may get false read error when reading internal PCS registers through MDIO. As a workaround, all internal MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 73d527aef68f7644e59f22ce7f9ac75e7b533aea Author: Madalin Bucur Date: Wed Jan 22 15:20:28 2020 +0200 powerpc/fsl/dts: add fsl,erratum-a011043 Add fsl,erratum-a011043 to internal MDIO buses. Software may get false read error when reading internal PCS registers through MDIO. As a workaround, all internal MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 2934d2c67838ba442fbd0b0560ba641044a5ceba Author: Madalin Bucur Date: Wed Jan 22 15:20:27 2020 +0200 dt-bindings: net: add fsl,erratum-a011043 Add an entry for erratum A011043: the MDIO_CFG[MDIO_RD_ER] bit may be falsely set when reading internal PCS registers. MDIO reads to internal PCS registers may result in having the MDIO_CFG[MDIO_RD_ER] bit set, even when there is no error and read data (MDIO_DATA[MDIO_DATA]) is correct. Software may get false read error when reading internal PCS registers through MDIO. As a workaround, all internal MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 22e984493a41bf8081f13d9ed84def3ca8cfd427 Author: Manish Chopra Date: Wed Jan 22 01:43:38 2020 -0800 qlcnic: Fix CPU soft lockup while collecting firmware dump Driver while collecting firmware dump takes longer time to collect/process some of the firmware dump entries/memories. Bigger capture masks makes it worse as it results in larger amount of data being collected and results in CPU soft lockup. Place cond_resched() in some of the driver flows that are expectedly time consuming to relinquish the CPU to avoid CPU soft lockup panic. Signed-off-by: Shahed Shaikh Tested-by: Yonggen Xu Signed-off-by: Manish Chopra Signed-off-by: David S. Miller commit 4703d9119972bf586d2cca76ec6438f819ffa30e Merge: 34597c85be98 00ed452c210a Author: Linus Torvalds Date: Thu Jan 23 11:37:19 2020 -0800 Merge tag 'xarray-5.5' of git://git.infradead.org/users/willy/linux-dax Pull XArray fixes from Matthew Wilcox: "Primarily bugfixes, mostly around handling index wrap-around correctly. A couple of doc fixes and adding missing APIs. I had an oops live on stage at linux.conf.au this year, and it turned out to be a bug in xas_find() which I can't prove isn't triggerable in the current codebase. Then in looking for the bug, I spotted two more bugs. The bots have had a few days to chew on this with no problems reported, and it passes the test-suite (which now has more tests to make sure these problems don't come back)" * tag 'xarray-5.5' of git://git.infradead.org/users/willy/linux-dax: XArray: Add xa_for_each_range XArray: Fix xas_find returning too many entries XArray: Fix xa_find_after with multi-index entries XArray: Fix infinite loop with entry at ULONG_MAX XArray: Add wrappers for nested spinlocks XArray: Improve documentation of search marks XArray: Fix xas_pause at ULONG_MAX commit 34597c85be987cc731a840fa0c9bb969c92bd986 Merge: fa0a4e3b5412 b61387cb732c Author: Linus Torvalds Date: Thu Jan 23 11:23:37 2020 -0800 Merge tag 'trace-v5.5-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Various tracing fixes: - Fix a function comparison warning for a xen trace event macro - Fix a double perf_event linking to a trace_uprobe_filter for multiple events - Fix suspicious RCU warnings in trace event code for using list_for_each_entry_rcu() when the "_rcu" portion wasn't needed. - Fix a bug in the histogram code when using the same variable - Fix a NULL pointer dereference when tracefs lockdown enabled and calling trace_set_default_clock() - A fix to a bug found with the double perf_event linking patch" * tag 'trace-v5.5-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/uprobe: Fix to make trace_uprobe_filter alignment safe tracing: Do not set trace clock if tracefs lockdown is in effect tracing: Fix histogram code when expression has same var as value tracing: trigger: Replace unneeded RCU-list traversals tracing/uprobe: Fix double perf_event linking on multiprobe uprobe tracing: xen: Ordered comparison of function pointers commit fa0a4e3b541257da515def87b84529b3bfd08119 Merge: 3a83c8c81c91 9c1c2b35f1d9 Author: Linus Torvalds Date: Thu Jan 23 11:21:35 2020 -0800 Merge tag 'ceph-for-5.5-rc8' of https://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A fix for a potential use-after-free from Jeff, marked for stable" * tag 'ceph-for-5.5-rc8' of https://github.com/ceph/ceph-client: ceph: hold extra reference to r_parent over life of request commit 3a83c8c81c91fe10e7002c2c0e74b23e80f41f28 Merge: a572582b1a4d 18451f9f9e58 Author: Linus Torvalds Date: Thu Jan 23 11:10:21 2020 -0800 Merge tag 'pm-5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Prevent the kernel from crashing during resume from hibernation if free pages contain leftover data from the restore kernel and init_on_free is set (Alexander Potapenko)" * tag 'pm-5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: hibernate: fix crashes with init_on_free=1 commit a572582b1a4d6c8418739abfdfa5d1796d148d35 Merge: 3c2659bd1db8 5e89cd303e3a Author: Linus Torvalds Date: Thu Jan 23 11:08:15 2020 -0800 Merge tag 'pci-v5.5-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Mark ATS as broken on AMD Navi14 GPU rev 0xc5 (Alex Deucher)" * tag 'pci-v5.5-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken commit 3c2659bd1db81ed6a264a9fc6262d51667d655ad Author: Linus Torvalds Date: Wed Jan 22 12:37:25 2020 -0800 readdir: make user_access_begin() use the real access range In commit 9f79b78ef744 ("Convert filldir[64]() from __put_user() to unsafe_put_user()") I changed filldir to not do individual __put_user() accesses, but instead use unsafe_put_user() surrounded by the proper user_access_begin/end() pair. That make them enormously faster on modern x86, where the STAC/CLAC games make individual user accesses fairly heavy-weight. However, the user_access_begin() range was not really the exact right one, since filldir() has the unfortunate problem that it needs to not only fill out the new directory entry, it also needs to fix up the previous one to contain the proper file offset. It's unfortunate, but the "d_off" field in "struct dirent" is _not_ the file offset of the directory entry itself - it's the offset of the next one. So we end up backfilling the offset in the previous entry as we walk along. But since x86 didn't really care about the exact range, and used to be the only architecture that did anything fancy in user_access_begin() to begin with, the filldir[64]() changes did something lazy, and even commented on it: /* * Note! This range-checks 'previous' (which may be NULL). * The real range was checked in getdents */ if (!user_access_begin(dirent, sizeof(*dirent))) goto efault; and it all worked fine. But now 32-bit ppc is starting to also implement user_access_begin(), and the fact that we faked the range to only be the (possibly not even valid) previous directory entry becomes a problem, because ppc32 will actually be using the range that is passed in for more than just "check that it's user space". This is a complete rewrite of Christophe's original patch. By saving off the record length of the previous entry instead of a pointer to it in the filldir data structures, we can simplify the range check and the writing of the previous entry d_off field. No need for any conditionals in the user accesses themselves, although we retain the conditional EINTR checking for the "was this the first directory entry" signal handling latency logic. Fixes: 9f79b78ef744 ("Convert filldir[64]() from __put_user() to unsafe_put_user()") Link: https://lore.kernel.org/lkml/a02d3426f93f7eb04960a4d9140902d278cab0bb.1579697910.git.christophe.leroy@c-s.fr/ Link: https://lore.kernel.org/lkml/408c90c4068b00ea8f1c41cca45b84ec23d4946b.1579783936.git.christophe.leroy@c-s.fr/ Reported-and-tested-by: Christophe Leroy Signed-off-by: Linus Torvalds commit 2c6b7bcd747201441923a0d3062577a8d1fbd8f8 Author: Linus Torvalds Date: Thu Jan 23 10:05:05 2020 -0800 readdir: be more conservative with directory entry names Commit 8a23eb804ca4 ("Make filldir[64]() verify the directory entry filename is valid") added some minimal validity checks on the directory entries passed to filldir[64](). But they really were pretty minimal. This fleshes out at least the name length check: we used to disallow zero-length names, but really, negative lengths or oevr-long names aren't ok either. Both could happen if there is some filesystem corruption going on. Now, most filesystems tend to use just an "unsigned char" or similar for the length of a directory entry name, so even with a corrupt filesystem you should never see anything odd like that. But since we then use the name length to create the directory entry record length, let's make sure it actually is half-way sensible. Note how POSIX states that the size of a path component is limited by NAME_MAX, but we actually use PATH_MAX for the check here. That's because while NAME_MAX is generally the correct maximum name length (it's 255, for the same old "name length is usually just a byte on disk"), there's nothing in the VFS layer that really cares. So the real limitation at a VFS layer is the total pathname length you can pass as a filename: PATH_MAX. Signed-off-by: Linus Torvalds commit 23fe1390c7f13af417069fc0787f7cc82839a6bd Author: Alex Deucher Date: Wed Jan 22 11:17:24 2020 -0500 drm/amdgpu: remove the experimental flag for renoir Should work properly with the latest sbios on 5.5 and newer kernels. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b0b03951544534d6d9ad4aa2787eefec988fff20 Author: Raag Jadav Date: Sun Jan 19 16:58:59 2020 +0530 ARM: dts: am43x-epos-evm: set data pin directions for spi0 and spi1 Set d0 and d1 pin directions for spi0 and spi1 as per their pinmux. Signed-off-by: Raag Jadav Signed-off-by: Tony Lindgren commit bb48eb9b12a95db9d679025927269d4adda6dbd1 Author: Kristian Evensen Date: Thu Jan 23 13:20:18 2020 +0100 fou: Fix IPv6 netlink policy When submitting v2 of "fou: Support binding FoU socket" (1713cb37bf67), I accidentally sent the wrong version of the patch and one fix was missing. In the initial version of the patch, as well as the version 2 that I submitted, I incorrectly used ".type" for the two V6-attributes. The correct is to use ".len". Reported-by: Dmitry Vyukov Fixes: 1713cb37bf67 ("fou: Support binding FoU socket") Signed-off-by: Kristian Evensen Signed-off-by: David S. Miller commit 5169adbc982400f214bc0bcad1fcc076bd342987 Merge: 1efba987c486 d829229e35f3 Author: David S. Miller Date: Thu Jan 23 14:30:20 2020 +0100 Merge tag 'wireless-drivers-2020-01-23' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.5 Second set of fixes for v5.5. There are quite a few patches, especially on iwlwifi, due to me being on a long break. Libertas also has a security fix and mt76 a build fix. iwlwifi * don't send the PPAG command when PPAG is disabled, since it can cause problems * a few fixes for a HW bug * a fix for RS offload; * a fix for 3168 devices where the NVM tables where the wrong tables were being read * fix a couple of potential memory leaks in TXQ code * disable L0S states in all hardware since our hardware doesn't officially support them anymore (and older versions of the hardware had instability in these states) * remove lar_disable parameter since it has been causing issues for some people who erroneously disable it * force the debug monitor HW to stop also when debug is disabled, since it sometimes stays on and prevents low system power states * don't send IWL_MVM_RXQ_NSSN_SYNC notification due to DMA problems libertas * fix two buffer overflows mt76 * build fix related to CONFIG_MT76_LEDS * fix off by one in bitrates handling ==================== Signed-off-by: David S. Miller commit 1efba987c48629c0c64703bb4ea76ca1a3771d17 Author: Eric Dumazet Date: Wed Jan 22 09:07:35 2020 -0800 tun: add mutex_unlock() call and napi.skb clearing in tun_get_user() If both IFF_NAPI_FRAGS mode and XDP are enabled, and the XDP program consumes the skb, we need to clear the napi.skb (or risk a use-after-free) and release the mutex (or risk a deadlock) WARNING: lock held when returning to user space! 5.5.0-rc6-syzkaller #0 Not tainted ------------------------------------------------ syz-executor.0/455 is leaving the kernel with locks still held! 1 lock held by syz-executor.0/455: #0: ffff888098f6e748 (&tfile->napi_mutex){+.+.}, at: tun_get_user+0x1604/0x3fc0 drivers/net/tun.c:1835 Fixes: 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Petar Penkov Cc: Willem de Bruijn Signed-off-by: David S. Miller commit 971de2e572118c1128bff295341e37b6c8b8f108 Author: Ido Schimmel Date: Wed Jan 22 20:09:52 2020 +0200 mlxsw: spectrum_acl: Fix use-after-free during reload During reload (or module unload), the router block is de-initialized. Among other things, this results in the removal of a default multicast route from each active virtual router (VRF). These default routes are configured during initialization to trap packets to the CPU. In Spectrum-2, unlike Spectrum-1, multicast routes are implemented using ACL rules. Since the router block is de-initialized before the ACL block, it is possible that the ACL rules corresponding to the default routes are deleted while being accessed by the ACL delayed work that queries rules' activity from the device. This can result in a rare use-after-free [1]. Fix this by protecting the rules list accessed by the delayed work with a lock. We cannot use a spinlock as the activity read operation is blocking. [1] [ 123.331662] ================================================================== [ 123.339920] BUG: KASAN: use-after-free in mlxsw_sp_acl_rule_activity_update_work+0x330/0x3b0 [ 123.349381] Read of size 8 at addr ffff8881f3bb4520 by task kworker/0:2/78 [ 123.357080] [ 123.358773] CPU: 0 PID: 78 Comm: kworker/0:2 Not tainted 5.5.0-rc5-custom-33108-gf5df95d3ef41 #2209 [ 123.368898] Hardware name: Mellanox Technologies Ltd. MSN3700C/VMOD0008, BIOS 5.11 10/10/2018 [ 123.378456] Workqueue: mlxsw_core mlxsw_sp_acl_rule_activity_update_work [ 123.385970] Call Trace: [ 123.388734] dump_stack+0xc6/0x11e [ 123.392568] print_address_description.constprop.4+0x21/0x340 [ 123.403236] __kasan_report.cold.8+0x76/0xb1 [ 123.414884] kasan_report+0xe/0x20 [ 123.418716] mlxsw_sp_acl_rule_activity_update_work+0x330/0x3b0 [ 123.444034] process_one_work+0xb06/0x19a0 [ 123.453731] worker_thread+0x91/0xe90 [ 123.467348] kthread+0x348/0x410 [ 123.476847] ret_from_fork+0x24/0x30 [ 123.480863] [ 123.482545] Allocated by task 73: [ 123.486273] save_stack+0x19/0x80 [ 123.490000] __kasan_kmalloc.constprop.6+0xc1/0xd0 [ 123.495379] mlxsw_sp_acl_rule_create+0xa7/0x230 [ 123.500566] mlxsw_sp2_mr_tcam_route_create+0xf6/0x3e0 [ 123.506334] mlxsw_sp_mr_tcam_route_create+0x5b4/0x820 [ 123.512102] mlxsw_sp_mr_table_create+0x3b5/0x690 [ 123.517389] mlxsw_sp_vr_get+0x289/0x4d0 [ 123.521797] mlxsw_sp_fib_node_get+0xa2/0x990 [ 123.526692] mlxsw_sp_router_fib4_event_work+0x54c/0x2d60 [ 123.532752] process_one_work+0xb06/0x19a0 [ 123.537352] worker_thread+0x91/0xe90 [ 123.541471] kthread+0x348/0x410 [ 123.545103] ret_from_fork+0x24/0x30 [ 123.549113] [ 123.550795] Freed by task 518: [ 123.554231] save_stack+0x19/0x80 [ 123.557958] __kasan_slab_free+0x125/0x170 [ 123.562556] kfree+0xd7/0x3a0 [ 123.565895] mlxsw_sp_acl_rule_destroy+0x63/0xd0 [ 123.571081] mlxsw_sp2_mr_tcam_route_destroy+0xd5/0x130 [ 123.576946] mlxsw_sp_mr_tcam_route_destroy+0xba/0x260 [ 123.582714] mlxsw_sp_mr_table_destroy+0x1ab/0x290 [ 123.588091] mlxsw_sp_vr_put+0x1db/0x350 [ 123.592496] mlxsw_sp_fib_node_put+0x298/0x4c0 [ 123.597486] mlxsw_sp_vr_fib_flush+0x15b/0x360 [ 123.602476] mlxsw_sp_router_fib_flush+0xba/0x470 [ 123.607756] mlxsw_sp_vrs_fini+0xaa/0x120 [ 123.612260] mlxsw_sp_router_fini+0x137/0x384 [ 123.617152] mlxsw_sp_fini+0x30a/0x4a0 [ 123.621374] mlxsw_core_bus_device_unregister+0x159/0x600 [ 123.627435] mlxsw_devlink_core_bus_device_reload_down+0x7e/0xb0 [ 123.634176] devlink_reload+0xb4/0x380 [ 123.638391] devlink_nl_cmd_reload+0x610/0x700 [ 123.643382] genl_rcv_msg+0x6a8/0xdc0 [ 123.647497] netlink_rcv_skb+0x134/0x3a0 [ 123.651904] genl_rcv+0x29/0x40 [ 123.655436] netlink_unicast+0x4d4/0x700 [ 123.659843] netlink_sendmsg+0x7c0/0xc70 [ 123.664251] __sys_sendto+0x265/0x3c0 [ 123.668367] __x64_sys_sendto+0xe2/0x1b0 [ 123.672773] do_syscall_64+0xa0/0x530 [ 123.676892] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.682552] [ 123.684238] The buggy address belongs to the object at ffff8881f3bb4500 [ 123.684238] which belongs to the cache kmalloc-128 of size 128 [ 123.698261] The buggy address is located 32 bytes inside of [ 123.698261] 128-byte region [ffff8881f3bb4500, ffff8881f3bb4580) [ 123.711303] The buggy address belongs to the page: [ 123.716682] page:ffffea0007ceed00 refcount:1 mapcount:0 mapping:ffff888236403500 index:0x0 [ 123.725958] raw: 0200000000000200 dead000000000100 dead000000000122 ffff888236403500 [ 123.734646] raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 [ 123.743315] page dumped because: kasan: bad access detected [ 123.749562] [ 123.751241] Memory state around the buggy address: [ 123.756620] ffff8881f3bb4400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 123.764716] ffff8881f3bb4480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 123.772812] >ffff8881f3bb4500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 123.780904] ^ [ 123.785697] ffff8881f3bb4580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 123.793793] ffff8881f3bb4600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 123.801883] ================================================================== Fixes: cf7221a4f5a5 ("mlxsw: spectrum_router: Add Multicast routing support for Spectrum-2") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 5d2e5dd5849b4ef5e8ec35e812cdb732c13cd27e Author: Aneesh Kumar K.V Date: Wed Jan 8 11:14:22 2020 +0530 powerpc/mm/hash: Fix sharing context ids between kernel & userspace Commit 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range") has a bug in the definition of MIN_USER_CONTEXT. The result is that the context id used for the vmemmap and the lowest context id handed out to userspace are the same. The context id is essentially the process identifier as far as the first stage of the MMU translation is concerned. This can result in multiple SLB entries with the same VSID (Virtual Segment ID), accessible to the kernel and some random userspace process that happens to get the overlapping id, which is not expected eg: 07 c00c000008000000 40066bdea7000500 1T ESID= c00c00 VSID= 66bdea7 LLP:100 12 0002000008000000 40066bdea7000d80 1T ESID= 200 VSID= 66bdea7 LLP:100 Even though the user process and the kernel use the same VSID, the permissions in the hash page table prevent the user process from reading or writing to any kernel mappings. It can also lead to SLB entries with different base page size encodings (LLP), eg: 05 c00c000008000000 00006bde0053b500 256M ESID=c00c00000 VSID= 6bde0053b LLP:100 09 0000000008000000 00006bde0053bc80 256M ESID= 0 VSID= 6bde0053b LLP: 0 Such SLB entries can result in machine checks, eg. as seen on a G5: Oops: Machine check, sig: 7 [#1] BE PAGE SIZE=64K MU-Hash SMP NR_CPUS=4 NUMA Power Mac NIP: c00000000026f248 LR: c000000000295e58 CTR: 0000000000000000 REGS: c0000000erfd3d70 TRAP: 0200 Tainted: G M (5.5.0-rcl-gcc-8.2.0-00010-g228b667d8ea1) MSR: 9000000000109032 CR: 24282048 XER: 00000000 DAR: c00c000000612c80 DSISR: 00000400 IRQMASK: 0 ... NIP [c00000000026f248] .kmem_cache_free+0x58/0x140 LR [c088000008295e58] .putname 8x88/0xa Call Trace: .putname+0xB8/0xa .filename_lookup.part.76+0xbe/0x160 .do_faccessat+0xe0/0x380 system_call+0x5c/ex68 This happens with 256MB segments and 64K pages, as the duplicate VSID is hit with the first vmemmap segment and the first user segment, and older 32-bit userspace maps things in the first user segment. On other CPUs a machine check is not seen. Instead the userspace process can get stuck continuously faulting, with the fault never properly serviced, due to the kernel not understanding that there is already a HPTE for the address but with inaccessible permissions. On machines with 1T segments we've not seen the bug hit other than by deliberately exercising it. That seems to be just a matter of luck though, due to the typical layout of the user virtual address space and the ranges of vmemmap that are typically populated. To fix it we add 2 to MIN_USER_CONTEXT. This ensures the lowest context given to userspace doesn't overlap with the VMEMMAP context, or with the context for INVALID_REGION_ID. Fixes: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range") Cc: stable@vger.kernel.org # v5.2+ Reported-by: Christian Marillat Reported-by: Romain Dolbeau Signed-off-by: Aneesh Kumar K.V [mpe: Account for INVALID_REGION_ID, mostly rewrite change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200123102547.11623-1-mpe@ellerman.id.au commit edf9acf5f5663f067e31152c75c1019378ebc505 Merge: 940ba1498665 aa475d935272 Author: David S. Miller Date: Thu Jan 23 11:20:57 2020 +0100 Merge branch 'r8152-serial-fixes' Hayes Wang says: ==================== r8152: serial fixes v3: 1. Fix the typos for patch #5 and #6. 2. Modify the commit message of patch #9. v2: For patch #2, move declaring the variable "ocp_data". v1: These patches are used to fix some issues for RTL8153. ==================== Signed-off-by: David S. Miller commit aa475d935272481c9ffb1ae54eeca5c1819fbe1a Author: Hayes Wang Date: Wed Jan 22 16:02:13 2020 +0800 r8152: disable DelayPhyPwrChg When enabling this, the device would wait an internal signal which wouldn't be triggered. Then, the device couldn't enter P3 mode, so the power consumption is increased. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 19813162895a696c5814d76e5f8fb6203d70f6e0 Author: Hayes Wang Date: Wed Jan 22 16:02:12 2020 +0800 r8152: avoid the MCU to clear the lanwake Avoid the MCU to clear the lanwake after suspending. It may cause the WOL fail. Disable LANWAKE_CLR_EN before suspending. Besides,enable it and reset the lanwake status when resuming or initializing. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit a0246dafe684a6d5ad31ccd59af0334ccf0cc7b2 Author: Hayes Wang Date: Wed Jan 22 16:02:11 2020 +0800 r8152: don't enable U1U2 with USB_SPEED_HIGH for RTL8153B For certain platforms, it causes USB reset periodically. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit d7f1b59655efb5a285d227c8f9853a98eab5c2fd Author: Hayes Wang Date: Wed Jan 22 16:02:10 2020 +0800 r8152: disable test IO for RTL8153B For RTL8153B with QFN32, disable test IO. Otherwise, it may cause abnormal behavior for the device randomly. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 08997b5eec08a2c29367f19a74abdea54b299406 Author: Hayes Wang Date: Wed Jan 22 16:02:09 2020 +0800 r8152: Disable PLA MCU clock speed down PLA MCU clock speed down could only be enabled when tx/rx are disabled. Otherwise, the packet loss may occur. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 809a7fc6593f288d6f820ef6cc57b9d69b5f9474 Author: Hayes Wang Date: Wed Jan 22 16:02:08 2020 +0800 r8152: disable U2P3 for RTL8153B Enable U2P3 may miss zero packet for bulk-in. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 9583a3638dc07cc1878f41265e85ed497f72efcb Author: Hayes Wang Date: Wed Jan 22 16:02:07 2020 +0800 r8152: get default setting of WOL before initializing Initailization would reset runtime suspend by tp->saved_wolopts, so the tp->saved_wolopts should be set before initializing. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit f99cd20eda12b1920ffc284a736437c016b3a5a2 Author: Hayes Wang Date: Wed Jan 22 16:02:06 2020 +0800 r8152: reset flow control patch when linking on for RTL8153B When linking ON, the patch of flow control has to be reset. This makes sure the patch works normally. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit a39142728d0e60a76b67db3cbc187d61fde7b46d Author: Hayes Wang Date: Wed Jan 22 16:02:05 2020 +0800 r8152: fix runtime resume for linking change Fix the runtime resume doesn't work normally for linking change. 1. Reset the settings and status of runtime suspend. 2. Sync the linking status. 3. Poll the linking change. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 940ba14986657a50c15f694efca1beba31fa568f Author: Eric Dumazet Date: Tue Jan 21 23:17:14 2020 -0800 gtp: make sure only SOCK_DGRAM UDP sockets are accepted A malicious user could use RAW sockets and fool GTP using them as standard SOCK_DGRAM UDP sockets. BUG: KMSAN: uninit-value in udp_tunnel_encap_enable include/net/udp_tunnel.h:174 [inline] BUG: KMSAN: uninit-value in setup_udp_tunnel_sock+0x45e/0x6f0 net/ipv4/udp_tunnel.c:85 CPU: 0 PID: 11262 Comm: syz-executor613 Not tainted 5.5.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+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 udp_tunnel_encap_enable include/net/udp_tunnel.h:174 [inline] setup_udp_tunnel_sock+0x45e/0x6f0 net/ipv4/udp_tunnel.c:85 gtp_encap_enable_socket+0x37f/0x5a0 drivers/net/gtp.c:827 gtp_encap_enable drivers/net/gtp.c:844 [inline] gtp_newlink+0xfb/0x1e50 drivers/net/gtp.c:666 __rtnl_newlink net/core/rtnetlink.c:3305 [inline] rtnl_newlink+0x2973/0x3920 net/core/rtnetlink.c:3363 rtnetlink_rcv_msg+0x1153/0x1570 net/core/rtnetlink.c:5424 netlink_rcv_skb+0x451/0x650 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5442 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x1248/0x14d0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x451/0x5f0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x441359 Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fff1cd0ac28 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441359 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8 R10: 00000000004002c8 R11: 0000000000000246 R12: 00000000004020d0 R13: 0000000000402160 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags+0x3c/0x90 mm/kmsan/kmsan.c:144 kmsan_internal_alloc_meta_for_pages mm/kmsan/kmsan_shadow.c:307 [inline] kmsan_alloc_page+0x12a/0x310 mm/kmsan/kmsan_shadow.c:336 __alloc_pages_nodemask+0x57f2/0x5f60 mm/page_alloc.c:4800 alloc_pages_current+0x67d/0x990 mm/mempolicy.c:2207 alloc_pages include/linux/gfp.h:534 [inline] alloc_slab_page+0x111/0x12f0 mm/slub.c:1511 allocate_slab mm/slub.c:1656 [inline] new_slab+0x2bc/0x1130 mm/slub.c:1722 new_slab_objects mm/slub.c:2473 [inline] ___slab_alloc+0x1533/0x1f30 mm/slub.c:2624 __slab_alloc mm/slub.c:2664 [inline] slab_alloc_node mm/slub.c:2738 [inline] slab_alloc mm/slub.c:2783 [inline] kmem_cache_alloc+0xb23/0xd70 mm/slub.c:2788 sk_prot_alloc+0xf2/0x620 net/core/sock.c:1597 sk_alloc+0xf0/0xbe0 net/core/sock.c:1657 inet_create+0x7c7/0x1370 net/ipv4/af_inet.c:321 __sock_create+0x8eb/0xf00 net/socket.c:1420 sock_create net/socket.c:1471 [inline] __sys_socket+0x1a1/0x600 net/socket.c:1513 __do_sys_socket net/socket.c:1522 [inline] __se_sys_socket+0x8d/0xb0 net/socket.c:1520 __x64_sys_socket+0x4a/0x70 net/socket.c:1520 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Eric Dumazet Cc: Pablo Neira Reported-by: syzbot Signed-off-by: David S. Miller commit d836f5c69d87473ff65c06a6123e5b2cf5e56f5b Author: Eric Dumazet Date: Tue Jan 21 22:47:29 2020 -0800 net: rtnetlink: validate IFLA_MTU attribute in rtnl_create_link() rtnl_create_link() needs to apply dev->min_mtu and dev->max_mtu checks that we apply in do_setlink() Otherwise malicious users can crash the kernel, for example after an integer overflow : BUG: KASAN: use-after-free in memset include/linux/string.h:365 [inline] BUG: KASAN: use-after-free in __alloc_skb+0x37b/0x5e0 net/core/skbuff.c:238 Write of size 32 at addr ffff88819f20b9c0 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.5.0-rc1-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x134/0x1a0 mm/kasan/generic.c:192 memset+0x24/0x40 mm/kasan/common.c:108 memset include/linux/string.h:365 [inline] __alloc_skb+0x37b/0x5e0 net/core/skbuff.c:238 alloc_skb include/linux/skbuff.h:1049 [inline] alloc_skb_with_frags+0x93/0x590 net/core/skbuff.c:5664 sock_alloc_send_pskb+0x7ad/0x920 net/core/sock.c:2242 sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2259 mld_newpack+0x1d7/0x7f0 net/ipv6/mcast.c:1609 add_grhead.isra.0+0x299/0x370 net/ipv6/mcast.c:1713 add_grec+0x7db/0x10b0 net/ipv6/mcast.c:1844 mld_send_cr net/ipv6/mcast.c:1970 [inline] mld_ifc_timer_expire+0x3d3/0x950 net/ipv6/mcast.c:2477 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x6c3/0x1790 kernel/time/timer.c:1786 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61 Code: 98 6b ea f9 eb 8a cc cc cc cc cc cc e9 07 00 00 00 0f 00 2d 44 1c 60 00 f4 c3 66 90 e9 07 00 00 00 0f 00 2d 34 1c 60 00 fb f4 cc 55 48 89 e5 41 57 41 56 41 55 41 54 53 e8 4e 5d 9a f9 e8 79 RSP: 0018:ffffffff89807ce8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13266ae RBX: ffffffff8987a1c0 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000006 RDI: ffffffff8987aa54 RBP: ffffffff89807d18 R08: ffffffff8987a1c0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: dffffc0000000000 R13: ffffffff8a799980 R14: 0000000000000000 R15: 0000000000000000 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:690 default_idle_call+0x84/0xb0 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x3c8/0x6e0 kernel/sched/idle.c:269 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:361 rest_init+0x23b/0x371 init/main.c:451 arch_call_rest_init+0xe/0x1b start_kernel+0x904/0x943 init/main.c:784 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:490 x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:471 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:242 The buggy address belongs to the page: page:ffffea00067c82c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 raw: 057ffe0000000000 ffffea00067c82c8 ffffea00067c82c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88819f20b880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88819f20b900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88819f20b980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88819f20ba00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88819f20ba80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 78f7a7566f5eb59321e99b55a6fdb16ea05b37d1 Author: Michael Ellerman Date: Wed Jan 22 15:07:28 2020 +1100 airo: Add missing CAP_NET_ADMIN check in AIROOLDIOCTL/SIOCDEVPRIVATE The driver for Cisco Aironet 4500 and 4800 series cards (airo.c), implements AIROOLDIOCTL/SIOCDEVPRIVATE in airo_ioctl(). The ioctl handler copies an aironet_ioctl struct from userspace, which includes a command. Some of the commands are handled in readrids(), where the user controlled command is converted into a driver-internal value called "ridcode". There are two command values, AIROGWEPKTMP and AIROGWEPKNV, which correspond to ridcode values of RID_WEP_TEMP and RID_WEP_PERM respectively. These commands both have checks that the user has CAP_NET_ADMIN, with the comment that "Only super-user can read WEP keys", otherwise they return -EPERM. However there is another command value, AIRORRID, that lets the user specify the ridcode value directly, with no other checks. This means the user can bypass the CAP_NET_ADMIN check on AIROGWEPKTMP and AIROGWEPKNV. Fix it by moving the CAP_NET_ADMIN check out of the command handling and instead do it later based on the ridcode. That way regardless of whether the ridcode is set via AIROGWEPKTMP or AIROGWEPKNV, or passed in using AIRORID, we always do the CAP_NET_ADMIN check. Found by Ilja by code inspection, not tested as I don't have the required hardware. Reported-by: Ilja Van Sprundel Signed-off-by: Michael Ellerman Signed-off-by: David S. Miller commit d6bce2137f5d6bb1093e96d2f801479099b28094 Author: Michael Ellerman Date: Wed Jan 22 15:07:27 2020 +1100 airo: Fix possible info leak in AIROOLDIOCTL/SIOCDEVPRIVATE The driver for Cisco Aironet 4500 and 4800 series cards (airo.c), implements AIROOLDIOCTL/SIOCDEVPRIVATE in airo_ioctl(). The ioctl handler copies an aironet_ioctl struct from userspace, which includes a command and a length. Some of the commands are handled in readrids(), which kmalloc()'s a buffer of RIDSIZE (2048) bytes. That buffer is then passed to PC4500_readrid(), which has two cases. The else case does some setup and then reads up to RIDSIZE bytes from the hardware into the kmalloc()'ed buffer. Here len == RIDSIZE, pBuf is the kmalloc()'ed buffer: // read the rid length field bap_read(ai, pBuf, 2, BAP1); // length for remaining part of rid len = min(len, (int)le16_to_cpu(*(__le16*)pBuf)) - 2; ... // read remainder of the rid rc = bap_read(ai, ((__le16*)pBuf)+1, len, BAP1); PC4500_readrid() then returns to readrids() which does: len = comp->len; if (copy_to_user(comp->data, iobuf, min(len, (int)RIDSIZE))) { Where comp->len is the user controlled length field. So if the "rid length field" returned by the hardware is < 2048, and the user requests 2048 bytes in comp->len, we will leak the previous contents of the kmalloc()'ed buffer to userspace. Fix it by kzalloc()'ing the buffer. Found by Ilja by code inspection, not tested as I don't have the required hardware. Reported-by: Ilja Van Sprundel Signed-off-by: Michael Ellerman Signed-off-by: David S. Miller commit 9e0caab8e0f96f0af7d1dd388e62f44184a75372 Author: Vincenzo Frascino Date: Fri Jan 10 12:28:07 2020 +0000 tee: optee: Fix compilation issue with nommu The optee driver uses specific page table types to verify if a memory region is normal. These types are not defined in nommu systems. Trying to compile the driver in these systems results in a build error: linux/drivers/tee/optee/call.c: In function ‘is_normal_memory’: linux/drivers/tee/optee/call.c:533:26: error: ‘L_PTE_MT_MASK’ undeclared (first use in this function); did you mean ‘PREEMPT_MASK’? return (pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC; ^~~~~~~~~~~~~ PREEMPT_MASK linux/drivers/tee/optee/call.c:533:26: note: each undeclared identifier is reported only once for each function it appears in linux/drivers/tee/optee/call.c:533:44: error: ‘L_PTE_MT_WRITEALLOC’ undeclared (first use in this function) return (pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC; ^~~~~~~~~~~~~~~~~~~ Make the optee driver depend on MMU to fix the compilation issue. Signed-off-by: Vincenzo Frascino [jw: update commit title] Signed-off-by: Jens Wiklander commit 3adb4eaa1b4cbadc7858679334d19e840e7df6db Author: Andrew Lunn Date: Wed Jan 22 20:23:15 2020 +0100 MAINTAINERS: Make Russell King designated reviewer of phylib phylink and phylib are interconnected. It makes sense for phylib and phy driver patches to be also reviewed by the phylink maintainer. So add Russell King as a designed reviewer of phylib. Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit a48d4a33b6eff9531676008badadbddd19162f74 Merge: def9d2780727 bdefca2d8dc0 Author: Dave Airlie Date: Thu Jan 23 09:57:08 2020 +1000 Merge tag 'drm-misc-fixes-2020-01-22-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes -mst: Fix SST branch device handling (Wayne) -panfrost: Fix mapping of globally visible BO's (Boris) Cc: Wayne Lin CC: Boris Brezillon Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200122213725.GA22099@art_vandelay commit 131701c697e85d5d0726e6152219359639fae98f Merge: 1b4e677f86c7 43108c72cf1d Author: Linus Torvalds Date: Wed Jan 22 12:56:19 2020 -0800 Merge tag 'leds-5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED fixes from Pavel Machek: "Jacek's fix for an uninitialized gpio label is why I'm requesting this pull; it fixes regression in debugging output in sysfs. Others are just bugfixes that should be safe. Everything has been in -next for while" * tag 'leds-5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: lm3532: add pointer to documentation and fix typo leds: rb532: cleanup whitespace ledtrig-pattern: fix email address quoting in MODULE_AUTHOR() led: max77650: add of_match table leds-as3645a: Drop fwnode reference on ignored node leds: gpio: Fix uninitialized gpio label for fwnode based probe commit 1b4e677f86c7f730999223053534973bd0818c3c Merge: dbab40bdb42c 3bf8bdcf3bad Author: Linus Torvalds Date: Wed Jan 22 12:38:10 2020 -0800 Merge tag 'hwmon-for-v5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - In hwmon core, do not use the hwmon parent device for device managed memory allocations, since parent device lifetime may not match hwmon device lifetime. - Fix discrepancy between read and write values in adt7475 driver. - Fix alarms and voltage limits in nct7802 driver. * tag 'hwmon-for-v5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (core) Do not use device managed functions for memory allocations hwmon: (adt7475) Make volt2reg return same reg as reg2volt input hwmon: (nct7802) Fix non-working alarm on voltages hwmon: (nct7802) Fix voltage limits to wrong registers commit 5311a69aaca30fa849c3cc46fb25f75727fb72d0 Author: William Dauchy Date: Tue Jan 21 21:49:54 2020 +0100 net, ip6_tunnel: fix namespaces move in the same manner as commit d0f418516022 ("net, ip_tunnel: fix namespaces move"), fix namespace moving as it was broken since commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnel"), but for ipv6 this time; there is no reason to keep it for ip6_tunnel. Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnel") Signed-off-by: William Dauchy Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 36d79af7fb59d6d9106feb9c1855eb93d6d53fe6 Author: Eric Dumazet Date: Tue Jan 21 11:02:20 2020 -0800 net_sched: use validated TCA_KIND attribute in tc_new_tfilter() sysbot found another issue in tc_new_tfilter(). We probably should use @name which contains the sanitized version of TCA_KIND. BUG: KMSAN: uninit-value in string_nocheck lib/vsprintf.c:608 [inline] BUG: KMSAN: uninit-value in string+0x522/0x690 lib/vsprintf.c:689 CPU: 1 PID: 10753 Comm: syz-executor.1 Not tainted 5.5.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+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 string_nocheck lib/vsprintf.c:608 [inline] string+0x522/0x690 lib/vsprintf.c:689 vsnprintf+0x207d/0x31b0 lib/vsprintf.c:2574 __request_module+0x2ad/0x11c0 kernel/kmod.c:143 tcf_proto_lookup_ops+0x241/0x720 net/sched/cls_api.c:139 tcf_proto_create net/sched/cls_api.c:262 [inline] tc_new_tfilter+0x2a4e/0x5010 net/sched/cls_api.c:2058 rtnetlink_rcv_msg+0xcb7/0x1570 net/core/rtnetlink.c:5415 netlink_rcv_skb+0x451/0x650 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5442 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x1248/0x14d0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x451/0x5f0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45b349 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f88b3948c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f88b39496d4 RCX: 000000000045b349 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000099f R14: 00000000004cb163 R15: 000000000075bfd4 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:82 slab_alloc_node mm/slub.c:2774 [inline] __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4382 __kmalloc_reserve net/core/skbuff.c:141 [inline] __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1174 [inline] netlink_sendmsg+0x7d3/0x14d0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x451/0x5f0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 6f96c3c6904c ("net_sched: fix backward compatibility for TCA_KIND") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Cong Wang Cc: Marcelo Ricardo Leitner Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: David S. Miller commit d39ca2590d10712f412add7a88e1dd467a7246f4 Author: Paolo Abeni Date: Tue Jan 21 16:50:49 2020 +0100 Revert "udp: do rmem bulk free even if the rx sk queue is empty" This reverts commit 0d4a6608f68c7532dcbfec2ea1150c9761767d03. Williem reported that after commit 0d4a6608f68c ("udp: do rmem bulk free even if the rx sk queue is empty") the memory allocated by an almost idle system with many UDP sockets can grow a lot. For stable kernel keep the solution as simple as possible and revert the offending commit. Reported-by: Willem de Bruijn Diagnosed-by: Eric Dumazet Fixes: 0d4a6608f68c ("udp: do rmem bulk free even if the rx sk queue is empty") Signed-off-by: Paolo Abeni Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 43108c72cf1d518f3ce62d3b1c8a9ffa38ddc28b Author: Pavel Date: Sun Jan 5 23:36:58 2020 +0100 leds: lm3532: add pointer to documentation and fix typo Add pointer to datasheet and fix typo in printk message. Signed-off-by: Pavel Machek commit 51eb5a24de9134f6a31a6219d147ea5c388f5200 Author: Pavel Machek Date: Thu Jan 2 22:29:35 2020 +0100 leds: rb532: cleanup whitespace Trivial cleanup removing empty line at wrong place. Signed-off-by: Pavel Machek commit 30d57d55abd7cc2c08ba032f1dc3079b1b42b9dc Author: Pavel Machek Date: Sun Mar 10 19:54:40 2019 +0100 ledtrig-pattern: fix email address quoting in MODULE_AUTHOR() Apparently it is quite easy to forget ">" in quoting of email address. This fixes it. Signed-off-by: Pavel Machek commit 2424415d25a765d4302ddfb4de75427e9294dc09 Author: Bartosz Golaszewski Date: Tue Dec 10 11:08:32 2019 +0100 led: max77650: add of_match table We need the of_match table if we want to use the compatible string in the pmic's child node and get the led driver loaded automatically. Signed-off-by: Bartosz Golaszewski Signed-off-by: Pavel Machek commit 22cb0a76e0059701bce395bd8832ea94342cbf4a Author: Sakari Ailus Date: Wed Dec 4 09:56:42 2019 +0200 leds-as3645a: Drop fwnode reference on ignored node If a node is ignored, do not get a reference to it. Fix the bug by moving fwnode_handle_get() where a reference to an fwnode is saved for clarity. Reported-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Pavel Machek commit 90a8e82d3ca8c1f85ac63f4a94c9b034f05af4ee Author: Jacek Anaszewski Date: Thu Dec 5 22:25:01 2019 +0100 leds: gpio: Fix uninitialized gpio label for fwnode based probe When switching to using generic LED name composition mechanism via devm_led_classdev_register_ext() API the part of code initializing struct gpio_led's template name property was removed alongside. It was however overlooked that the property was also passed to devm_fwnode_get_gpiod_from_child() in place of "label" parameter, which when set to NULL, results in gpio label being initialized to '?'. It could be observed in debugfs and failed to properly identify gpio association with LED consumer. Fix this shortcoming by updating the GPIO label after the LED is registered and its final name is known. Fixes: d7235f5feaa0 ("leds: gpio: Use generic support for composing LED names") Cc: Russell King Reviewed-by: Linus Walleij Signed-off-by: Jacek Anaszewski [fixed comment] Signed-off-by: Pavel Machek commit bda6a35505e28b70d48096c933d5949c9b6caf9a Author: David S. Miller Date: Wed Jan 22 20:38:39 2020 +0100 net: Add Jakub to MAINTAINERS for networking general. Signed-off-by: David S. Miller Acked-by: Jakub Kicinski commit c80794323e82ac6ab45052ebba5757ce47b4b588 Author: Maxim Mikityanskiy Date: Tue Jan 21 15:09:40 2020 +0000 net: Fix packet reordering caused by GRO and listified RX cooperation Commit 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs") introduces batching of GRO_NORMAL packets in napi_frags_finish, and commit 6570bc79c0df ("net: core: use listified Rx for GRO_NORMAL in napi_gro_receive()") adds the same to napi_skb_finish. However, dev_gro_receive (that is called just before napi_{frags,skb}_finish) can also pass skbs to the networking stack: e.g., when the GRO session is flushed, napi_gro_complete is called, which passes pp directly to netif_receive_skb_internal, skipping napi->rx_list. It means that the packet stored in pp will be handled by the stack earlier than the packets that arrived before, but are still waiting in napi->rx_list. It leads to TCP reorderings that can be observed in the TCPOFOQueue counter in netstat. This commit fixes the reordering issue by making napi_gro_complete also use napi->rx_list, so that all packets going through GRO will keep their order. In order to keep napi_gro_flush working properly, gro_normal_list calls are moved after the flush to clear napi->rx_list. iwlwifi calls napi_gro_flush directly and does the same thing that is done by gro_normal_list, so the same change is applied there: napi_gro_flush is moved to be before the flush of napi->rx_list. A few other drivers also use napi_gro_flush (brocade/bna/bnad.c, cortina/gemini.c, hisilicon/hns3/hns3_enet.c). The first two also use napi_complete_done afterwards, which performs the gro_normal_list flush, so they are fine. The latter calls napi_gro_receive right after napi_gro_flush, so it can end up with non-empty napi->rx_list anyway. Fixes: 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs") Signed-off-by: Maxim Mikityanskiy Cc: Alexander Lobakin Cc: Edward Cree Acked-by: Alexander Lobakin Acked-by: Saeed Mahameed Acked-by: Edward Cree Signed-off-by: David S. Miller commit 0ace17d56824165c7f4c68785d6b58971db954dd Author: Richard Palethorpe Date: Tue Jan 21 14:42:58 2020 +0100 can, slip: Protect tty->disc_data in write_wakeup and close with RCU write_wakeup can happen in parallel with close/hangup where tty->disc_data is set to NULL and the netdevice is freed thus also freeing disc_data. write_wakeup accesses disc_data so we must prevent close from freeing the netdev while write_wakeup has a non-NULL view of tty->disc_data. We also need to make sure that accesses to disc_data are atomic. Which can all be done with RCU. This problem was found by Syzkaller on SLCAN, but the same issue is reproducible with the SLIP line discipline using an LTP test based on the Syzkaller reproducer. A fix which didn't use RCU was posted by Hillf Danton. Fixes: 661f7fda21b1 ("slip: Fix deadlock in write_wakeup") Fixes: a8e83b17536a ("slcan: Port write_wakeup deadlock fix from slip") Reported-by: syzbot+017e491ae13c0068598a@syzkaller.appspotmail.com Signed-off-by: Richard Palethorpe Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: Tyler Hall Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: syzkaller@googlegroups.com Signed-off-by: David S. Miller commit 58c8db929db1c1d785a6f5d8f8692e5dbcc35e84 Author: Jakub Sitnicki Date: Tue Jan 21 13:31:47 2020 +0100 net, sk_msg: Don't check if sock is locked when tearing down psock As John Fastabend reports [0], psock state tear-down can happen on receive path *after* unlocking the socket, if the only other psock user, that is sockmap or sockhash, releases its psock reference before tcp_bpf_recvmsg does so: tcp_bpf_recvmsg() psock = sk_psock_get(sk) <- refcnt 2 lock_sock(sk); ... sock_map_free() <- refcnt 1 release_sock(sk) sk_psock_put() <- refcnt 0 Remove the lockdep check for socket lock in psock tear-down that got introduced in 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear down"). [0] https://lore.kernel.org/netdev/5e25dc995d7d_74082aaee6e465b441@john-XPS-13-9370.notmuch/ Fixes: 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear down") Reported-by: syzbot+d73682fcf7fee6982fe3@syzkaller.appspotmail.com Suggested-by: John Fastabend Signed-off-by: Jakub Sitnicki Acked-by: John Fastabend Acked-by: Daniel Borkmann Signed-off-by: David S. Miller commit 6849b5eba1965ceb0cad3a75877ef4569dd3638e Author: Vladimir Murzin Date: Mon Jan 20 15:07:46 2020 +0100 ARM: 8955/1: virt: Relax arch timer version check during early boot Updates to the Generic Timer architecture allow ID_PFR1.GenTimer to have values other than 0 or 1 while still preserving backward compatibility. At the moment, Linux is quite strict in the way it handles this field at early boot and will not configure arch timer if it doesn't find the value 1. Since here use ubfx for arch timer version extraction (hyb-stub build with -march=armv7-a, so it is safe) To help backports (even though the code was correct at the time of writing) Fixes: 8ec58be9f3ff ("ARM: virt: arch_timers: enable access to physical timers") Acked-by: Marc Zyngier Signed-off-by: Vladimir Murzin Signed-off-by: Russell King commit d829229e35f302fd49c052b5c5906c90ecf9911d Author: Emmanuel Grumbach Date: Tue Dec 3 10:08:49 2019 +0200 iwlwifi: mvm: don't send the IWL_MVM_RXQ_NSSN_SYNC notif to Rx queues The purpose of this was to keep all the queues updated with the Rx sequence numbers because unlikely yet possible situations where queues can't understand if a specific packet needs to be dropped or not. Unfortunately, it was reported that this caused issues in our DMA engine. We don't fully understand how this is related, but this is being currently debugged. For now, just don't send this notification to the Rx queues. This de-facto reverts my commit 3c514bf831ac12356b695ff054bef641b9e99593: iwlwifi: mvm: add a loose synchronization of the NSSN across Rx queues This issue was reported here: https://bugzilla.kernel.org/show_bug.cgi?id=204873 https://bugzilla.kernel.org/show_bug.cgi?id=205001 and others maybe. Fixes: 3c514bf831ac ("iwlwifi: mvm: add a loose synchronization of the NSSN across Rx queues") CC: # 5.3+ Signed-off-by: Emmanuel Grumbach Signed-off-by: Kalle Valo commit dbab40bdb42c03ab12096d4aaf2dbef3fb55282c Merge: d96d875ef5dd 1292e972fff2 Author: Linus Torvalds Date: Wed Jan 22 08:30:09 2020 -0800 Merge tag 'io_uring-5.5-2020-01-22' of git://git.kernel.dk/linux-block Pull io_uring fix from Jens Axboe: "This was supposed to have gone in last week, but due to a brain fart on my part, I forgot that we made this struct addition in the 5.5 cycle. So here it is for 5.5, to prevent having a 32 vs 64-bit compatability issue with the files_update command" * tag 'io_uring-5.5-2020-01-22' of git://git.kernel.dk/linux-block: io_uring: fix compat for IORING_REGISTER_FILES_UPDATE commit b61387cb732cf283d318b2165c44913525fe545f Author: Masami Hiramatsu Date: Wed Jan 22 12:23:25 2020 +0900 tracing/uprobe: Fix to make trace_uprobe_filter alignment safe Commit 99c9a923e97a ("tracing/uprobe: Fix double perf_event linking on multiprobe uprobe") moved trace_uprobe_filter on trace_probe_event. However, since it introduced a flexible data structure with char array and type casting, the alignment of trace_uprobe_filter can be broken. This changes the type of the array to trace_uprobe_filter data strucure to fix it. Link: http://lore.kernel.org/r/20200120124022.GA14897@hirez.programming.kicks-ass.net Link: http://lkml.kernel.org/r/157966340499.5107.10978352478952144902.stgit@devnote2 Fixes: 99c9a923e97a ("tracing/uprobe: Fix double perf_event linking on multiprobe uprobe") Suggested-by: Peter Zijlstra Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 17328f218fb760c9c6accc5b52494889243a6b98 Author: Frederic Barrat Date: Mon Jan 13 14:01:18 2020 +0100 powerpc/xive: Discard ESB load value when interrupt is invalid A load on an ESB page returning all 1's means that the underlying device has invalidated the access to the PQ state of the interrupt through mmio. It may happen, for example when querying a PHB interrupt while the PHB is in an error state. In that case, we should consider the interrupt to be invalid when checking its state in the irq_get_irqchip_state() handler. Fixes: da15c03b047d ("powerpc/xive: Implement get_irqchip_state method for XIVE to fix shutdown race") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Frederic Barrat [clg: wrote a commit log, introduced XIVE_ESB_INVALID ] Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200113130118.27969-1-clg@kaod.org commit a2db55dda9cf9c24427ccd5da8792b028ebff46c Author: Bharata B Rao Date: Thu Jan 9 14:50:47 2020 +0530 powerpc: Ultravisor: Fix the dependencies for CONFIG_PPC_UV Let PPC_UV depend only on DEVICE_PRIVATE which in turn will satisfy all the other required dependencies Fixes: 013a53f2d25a ("powerpc: Ultravisor: Add PPC_UV config option") Reported-by: kbuild test robot Signed-off-by: Bharata B Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200109092047.24043-1-bharata@linux.ibm.com commit 9c1c2b35f1d94de8325344c2777d7ee67492db3b Author: Jeff Layton Date: Wed Apr 3 13:16:01 2019 -0400 ceph: hold extra reference to r_parent over life of request Currently, we just assume that it will stick around by virtue of the submitter's reference, but later patches will allow the syscall to return early and we can't rely on that reference at that point. While I'm not aware of any reports of it, Xiubo pointed out that this may fix a use-after-free. If the wait for a reply times out or is canceled via signal, and then the reply comes in after the syscall returns, the client can end up trying to access r_parent without a reference. Take an extra reference to the inode when setting r_parent and release it when releasing the request. Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit bdefca2d8dc0f80bbe49e08bf52a717146490706 Author: Boris Brezillon Date: Wed Jan 15 20:15:54 2020 -0600 drm/panfrost: Add the panfrost_gem_mapping concept With the introduction of per-FD address space, the same BO can be mapped in different address space if the BO is globally visible (GEM_FLINK) and opened in different context or if the dmabuf is self-imported. The current implementation does not take case into account, and attaches the mapping directly to the panfrost_gem_object. Let's create a panfrost_gem_mapping struct and allow multiple mappings per BO. The mappings are refcounted which helps solve another problem where mappings were torn down (GEM handle closed by userspace) while GPU jobs accessing those BOs were still in-flight. Jobs now keep a reference on the mappings they use. v2 (robh): - Minor review comment clean-ups from Steven - Use list_is_singular helper - Just WARN if we add a mapping when madvise state is not WILLNEED. With that, drop the use of object_name_lock. v3 (robh): - Revert returning list iterator in panfrost_gem_mapping_get() Fixes: a5efb4c9a562 ("drm/panfrost: Restructure the GEM object creation") Fixes: 7282f7645d06 ("drm/panfrost: Implement per FD address spaces") Cc: Signed-off-by: Boris Brezillon Signed-off-by: Rob Herring Acked-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200116021554.15090-1-robh@kernel.org commit d0f418516022c32ecceaf4275423e5bd3f8743a9 Author: William Dauchy Date: Tue Jan 21 15:26:24 2020 +0100 net, ip_tunnel: fix namespaces move in the same manner as commit 690afc165bb3 ("net: ip6_gre: fix moving ip6gre between namespaces"), fix namespace moving as it was broken since commit 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata."). Indeed, the ip6_gre commit removed the local flag for collect_md condition, so there is no reason to keep it for ip_gre/ip_tunnel. this patch will fix both ip_tunnel and ip_gre modules. Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.") Signed-off-by: William Dauchy Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller commit bfe02b9f9476bc8784ebb0f78fa244ad15bb15ea Author: Theodore Dubois Date: Mon Jan 20 14:10:53 2020 -0800 tcp: remove redundant assigment to snd_cwnd Not sure how this got in here. git blame says the second assignment was added in 3a9a57f6, but that commit also removed the first assignment. Signed-off-by: Theodore Dubois Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ce896476c65d72b4b99fa09c2f33436b4198f034 Author: James Hughes Date: Mon Jan 20 11:12:40 2020 +0000 net: usb: lan78xx: Add .ndo_features_check As reported by Eric Dumazet, there are still some outstanding cases where the driver does not handle TSO correctly when skb's are over a certain size. Most cases have been fixed, this patch should ensure that forwarded SKB's that are greater than MAX_SINGLE_PACKET_SIZE - TX_OVERHEAD are software segmented and handled correctly. Signed-off-by: James Hughes Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 5b2f1f3070b6447b76174ea8bfb7390dc6253ebd Author: Wen Yang Date: Mon Jan 20 18:04:56 2020 +0800 tcp_bbr: improve arithmetic division in bbr_update_bw() do_div() does a 64-by-32 division. Use div64_long() instead of it if the divisor is long, to avoid truncation to 32-bit. And as a nice side effect also cleans up the function a bit. Signed-off-by: Wen Yang Cc: Eric Dumazet Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit cb626bf566eb4433318d35681286c494f04fedcc Author: Jouni Hogander Date: Mon Jan 20 09:51:03 2020 +0200 net-sysfs: Fix reference count leak Netdev_register_kobject is calling device_initialize. In case of error reference taken by device_initialize is not given up. Drivers are supposed to call free_netdev in case of error. In non-error case the last reference is given up there and device release sequence is triggered. In error case this reference is kept and the release sequence is never started. Fix this by setting reg_state as NETREG_UNREGISTERED if registering fails. This is the rootcause for couple of memory leaks reported by Syzkaller: BUG: memory leak unreferenced object 0xffff8880675ca008 (size 256): comm "netdev_register", pid 281, jiffies 4294696663 (age 6.808s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000058ca4711>] kmem_cache_alloc_trace+0x167/0x280 [<000000002340019b>] device_add+0x882/0x1750 [<000000001d588c3a>] netdev_register_kobject+0x128/0x380 [<0000000011ef5535>] register_netdevice+0xa1b/0xf00 [<000000007fcf1c99>] __tun_chr_ioctl+0x20d5/0x3dd0 [<000000006a5b7b2b>] tun_chr_ioctl+0x2f/0x40 [<00000000f30f834a>] do_vfs_ioctl+0x1c7/0x1510 [<00000000fba062ea>] ksys_ioctl+0x99/0xb0 [<00000000b1c1b8d2>] __x64_sys_ioctl+0x78/0xb0 [<00000000984cabb9>] do_syscall_64+0x16f/0x580 [<000000000bde033d>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [<00000000e6ca2d9f>] 0xffffffffffffffff BUG: memory leak unreferenced object 0xffff8880668ba588 (size 8): comm "kobject_set_nam", pid 286, jiffies 4294725297 (age 9.871s) hex dump (first 8 bytes): 6e 72 30 00 cc be df 2b nr0....+ backtrace: [<00000000a322332a>] __kmalloc_track_caller+0x16e/0x290 [<00000000236fd26b>] kstrdup+0x3e/0x70 [<00000000dd4a2815>] kstrdup_const+0x3e/0x50 [<0000000049a377fc>] kvasprintf_const+0x10e/0x160 [<00000000627fc711>] kobject_set_name_vargs+0x5b/0x140 [<0000000019eeab06>] dev_set_name+0xc0/0xf0 [<0000000069cb12bc>] netdev_register_kobject+0xc8/0x320 [<00000000f2e83732>] register_netdevice+0xa1b/0xf00 [<000000009e1f57cc>] __tun_chr_ioctl+0x20d5/0x3dd0 [<000000009c560784>] tun_chr_ioctl+0x2f/0x40 [<000000000d759e02>] do_vfs_ioctl+0x1c7/0x1510 [<00000000351d7c31>] ksys_ioctl+0x99/0xb0 [<000000008390040a>] __x64_sys_ioctl+0x78/0xb0 [<0000000052d196b7>] do_syscall_64+0x16f/0x580 [<0000000019af9236>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [<00000000bc384531>] 0xffffffffffffffff v3 -> v4: Set reg_state to NETREG_UNREGISTERED if registering fails v2 -> v3: * Replaced BUG_ON with WARN_ON in free_netdev and netdev_release v1 -> v2: * Relying on driver calling free_netdev rather than calling put_device directly in error path Reported-by: syzbot+ad8ca40ecd77896d51e2@syzkaller.appspotmail.com Cc: David Miller Cc: Greg Kroah-Hartman Cc: Lukas Bulwahn Signed-off-by: Jouni Hogander Signed-off-by: David S. Miller commit 62ebaeaedee7591c257543d040677a60e35c7aec Author: Yuki Taguchi Date: Mon Jan 20 13:48:37 2020 +0900 ipv6: sr: remove SKB_GSO_IPXIP6 on End.D* actions After LRO/GRO is applied, SRv6 encapsulated packets have SKB_GSO_IPXIP6 feature flag, and this flag must be removed right after decapulation procedure. Currently, SKB_GSO_IPXIP6 flag is not removed on End.D* actions, which creates inconsistent packet state, that is, a normal TCP/IP packets have the SKB_GSO_IPXIP6 flag. This behavior can cause unexpected fallback to GSO on routing to netdevices that do not support SKB_GSO_IPXIP6. For example, on inter-VRF forwarding, decapsulated packets separated into small packets by GSO because VRF devices do not support TSO for packets with SKB_GSO_IPXIP6 flag, and this degrades forwarding performance. This patch removes encapsulation related GSO flags from the skb right after the End.D* action is applied. Fixes: d7a669dd2f8b ("ipv6: sr: add helper functions for seg6local") Signed-off-by: Yuki Taguchi Signed-off-by: David S. Miller commit 9c5ed2f831c603439c699f8cd69e9998de472526 Merge: 80892772c4ed 4e4362d2bf2a Author: David S. Miller Date: Tue Jan 21 09:25:58 2020 +0100 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2020-01-21 1) Fix packet tx through bpf_redirect() for xfrm and vti interfaces. From Nicolas Dichtel. 2) Do not confirm neighbor when do pmtu update on a virtual xfrm interface. From Xu Wang. 3) Support output_mark for offload ESP packets, this was forgotten when the output_mark was added initially. From Ulrich Weber. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 5eec71829ad7749a8c918f66a91a9bcf6fb4462a Author: Tvrtko Ursulin Date: Thu Jan 16 13:45:08 2020 +0000 drm/i915: Align engine->uabi_class/instance with i915_drm.h In our ABI we have defined I915_ENGINE_CLASS_INVALID_NONE and I915_ENGINE_CLASS_INVALID_VIRTUAL as negative values which creates implicit coupling with type widths used in, also ABI, struct i915_engine_class_instance. One place where we export engine->uabi_class I915_ENGINE_CLASS_INVALID_VIRTUAL is from our our tracepoints. Because the type of the former is u8 in contrast to u16 defined in the ABI, 254 will be returned instead of 65534 which userspace would legitimately expect. Another place is I915_CONTEXT_PARAM_ENGINES. Therefore we need to align the type used to store engine ABI class and instance. v2: * Update the commit message mentioning get_engines and cc stable. (Chris) Signed-off-by: Tvrtko Ursulin Fixes: 6d06779e8672 ("drm/i915: Load balancing across a virtual engine") Cc: Chris Wilson Cc: # v5.3+ Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200116134508.25211-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit 0b3bd0cdc329a1e2e00995cffd61aacf58c87cb4) Signed-off-by: Joonas Lahtinen commit ecc4d2a52df65479de5e333a9065ed02202a400f Author: Matthew Auld Date: Fri Jan 17 13:24:13 2020 +0000 drm/i915/userptr: fix size calculation If we create a rather large userptr object(e.g 1ULL << 32) we might shift past the type-width of num_pages: (int)num_pages << PAGE_SHIFT, resulting in a totally bogus sg_table, which fortunately will eventually manifest as: gen8_ppgtt_insert_huge:463 GEM_BUG_ON(iter->sg->length < page_size) kernel BUG at drivers/gpu/drm/i915/gt/gen8_ppgtt.c:463! v2: more unsigned long prefer I915_GTT_PAGE_SIZE Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl") Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200117132413.1170563-2-matthew.auld@intel.com (cherry picked from commit 8e78871bc1e5efec22c950d3fd24ddb63d4ff28a) Signed-off-by: Joonas Lahtinen commit 04060db41178c7c244f2c7dcd913e7fd331de915 Author: Bart Van Assche Date: Wed Jan 15 20:47:37 2020 -0800 scsi: RDMA/isert: Fix a recently introduced regression related to logout iscsit_close_connection() calls isert_wait_conn(). Due to commit e9d3009cb936 both functions call target_wait_for_sess_cmds() although that last function should be called only once. Fix this by removing the target_wait_for_sess_cmds() call from isert_wait_conn() and by only calling isert_wait_conn() after target_wait_for_sess_cmds(). Fixes: e9d3009cb936 ("scsi: target: iscsi: Wait for all commands to finish before freeing a session"). Link: https://lore.kernel.org/r/20200116044737.19507-1-bvanassche@acm.org Reported-by: Rahul Kundu Signed-off-by: Bart Van Assche Tested-by: Mike Marciniszyn Acked-by: Sagi Grimberg Signed-off-by: Martin K. Petersen commit 0e2209629fec427ba75a6351486153a9feddd36b Author: Hannes Reinecke Date: Thu Jan 16 11:20:53 2020 +0100 scsi: fnic: do not queue commands during fwreset When a link is going down the driver will be calling fnic_cleanup_io(), which will traverse all commands and calling 'done' for each found command. While the traversal is handled under the host_lock, calling 'done' happens after the host_lock is being dropped. As fnic_queuecommand_lck() is being called with the host_lock held, it might well be that it will pick the command being selected for abortion from the above routine and enqueue it for sending, but then 'done' is being called on that very command from the above routine. Which of course confuses the hell out of the scsi midlayer. So fix this by not queueing commands when fnic_cleanup_io is active. Link: https://lore.kernel.org/r/20200116102053.62755-1-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 996d5d5f89a558a3608a46e73ccd1b99f1b1d058 Author: Stephan Gerhold Date: Fri Jan 17 13:40:36 2020 -0800 Input: pm8xxx-vib - fix handling of separate enable register Setting the vibrator enable_mask is not implemented correctly: For regmap_update_bits(map, reg, mask, val) we give in either regs->enable_mask or 0 (= no-op) as mask and "val" as value. But "val" actually refers to the vibrator voltage control register, which has nothing to do with the enable_mask. So we usually end up doing nothing when we really wanted to enable the vibrator. We want to set or clear the enable_mask (to enable/disable the vibrator). Therefore, change the call to always modify the enable_mask and set the bits only if we want to enable the vibrator. Fixes: d4c7c5c96c92 ("Input: pm8xxx-vib - handle separate enable register") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200114183442.45720-1-stephan@gerhold.net Signed-off-by: Dmitry Torokhov commit 1292e972fff2b2d81e139e0c2fe5f50249e78c58 Author: Eugene Syromiatnikov Date: Wed Jan 15 17:35:38 2020 +0100 io_uring: fix compat for IORING_REGISTER_FILES_UPDATE fds field of struct io_uring_files_update is problematic with regards to compat user space, as pointer size is different in 32-bit, 32-on-64-bit, and 64-bit user space. In order to avoid custom handling of compat in the syscall implementation, make fds __u64 and use u64_to_user_ptr in order to retrieve it. Also, align the field naturally and check that no garbage is passed there. Fixes: c3a31e605620c279 ("io_uring: add support for IORING_REGISTER_FILES_UPDATE") Signed-off-by: Eugene Syromiatnikov Signed-off-by: Jens Axboe commit bf24daac8f2bd5b8affaec03c2be1d20bcdd6837 Author: Masami Ichikawa Date: Thu Jan 16 22:12:36 2020 +0900 tracing: Do not set trace clock if tracefs lockdown is in effect When trace_clock option is not set and unstable clcok detected, tracing_set_default_clock() sets trace_clock(ThinkPad A285 is one of case). In that case, if lockdown is in effect, null pointer dereference error happens in ring_buffer_set_clock(). Link: http://lkml.kernel.org/r/20200116131236.3866925-1-masami256@gmail.com Cc: stable@vger.kernel.org Fixes: 17911ff38aa58 ("tracing: Add locked_down checks to the open calls of files created for tracefs") Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1788488 Signed-off-by: Masami Ichikawa Signed-off-by: Steven Rostedt (VMware) commit 8bcebc77e85f3d7536f96845a0fe94b1dddb6af0 Author: Steven Rostedt (VMware) Date: Mon Jan 20 13:07:31 2020 -0500 tracing: Fix histogram code when expression has same var as value While working on a tool to convert SQL syntex into the histogram language of the kernel, I discovered the following bug: # echo 'first u64 start_time u64 end_time pid_t pid u64 delta' >> synthetic_events # echo 'hist:keys=pid:start=common_timestamp' > events/sched/sched_waking/trigger # echo 'hist:keys=next_pid:delta=common_timestamp-$start,start2=$start:onmatch(sched.sched_waking).trace(first,$start2,common_timestamp,next_pid,$delta)' > events/sched/sched_switch/trigger Would not display any histograms in the sched_switch histogram side. But if I were to swap the location of "delta=common_timestamp-$start" with "start2=$start" Such that the last line had: # echo 'hist:keys=next_pid:start2=$start,delta=common_timestamp-$start:onmatch(sched.sched_waking).trace(first,$start2,common_timestamp,next_pid,$delta)' > events/sched/sched_switch/trigger The histogram works as expected. What I found out is that the expressions clear out the value once it is resolved. As the variables are resolved in the order listed, when processing: delta=common_timestamp-$start The $start is cleared. When it gets to "start2=$start", it errors out with "unresolved symbol" (which is silent as this happens at the location of the trace), and the histogram is dropped. When processing the histogram for variable references, instead of adding a new reference for a variable used twice, use the same reference. That way, not only is it more efficient, but the order will no longer matter in processing of the variables. From Tom Zanussi: "Just to clarify some more about what the problem was is that without your patch, we would have two separate references to the same variable, and during resolve_var_refs(), they'd both want to be resolved separately, so in this case, since the first reference to start wasn't part of an expression, it wouldn't get the read-once flag set, so would be read normally, and then the second reference would do the read-once read and also be read but using read-once. So everything worked and you didn't see a problem: from: start2=$start,delta=common_timestamp-$start In the second case, when you switched them around, the first reference would be resolved by doing the read-once, and following that the second reference would try to resolve and see that the variable had already been read, so failed as unset, which caused it to short-circuit out and not do the trigger action to generate the synthetic event: to: delta=common_timestamp-$start,start2=$start With your patch, we only have the single resolution which happens correctly the one time it's resolved, so this can't happen." Link: https://lore.kernel.org/r/20200116154216.58ca08eb@gandalf.local.home Cc: stable@vger.kernel.org Fixes: 067fe038e70f6 ("tracing: Add variable reference handling to hist triggers") Reviewed-by: Tom Zanuss Tested-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit d96d875ef5dd372f533059a44f98e92de9cf0d42 Merge: def9d2780727 394440d46941 Author: Linus Torvalds Date: Mon Jan 20 11:24:13 2020 -0800 Merge tag 'fixes_for_v5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull reiserfs fix from Jan Kara: "A fixup of a recently merged reiserfs fix which has caused problem when xattrs were not compiled in" * tag 'fixes_for_v5.5-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr commit 32c72165dbd0e246e69d16a3ad348a4851afd415 Author: Kadlecsik József Date: Sun Jan 19 22:06:49 2020 +0100 netfilter: ipset: use bitmap infrastructure completely The bitmap allocation did not use full unsigned long sizes when calculating the required size and that was triggered by KASAN as slab-out-of-bounds read in several places. The patch fixes all of them. Reported-by: syzbot+fabca5cbf5e54f3fe2de@syzkaller.appspotmail.com Reported-by: syzbot+827ced406c9a1d9570ed@syzkaller.appspotmail.com Reported-by: syzbot+190d63957b22ef673ea5@syzkaller.appspotmail.com Reported-by: syzbot+dfccdb2bdb4a12ad425e@syzkaller.appspotmail.com Reported-by: syzbot+df0d0f5895ef1f41a65b@syzkaller.appspotmail.com Reported-by: syzbot+b08bd19bb37513357fd4@syzkaller.appspotmail.com Reported-by: syzbot+53cdd0ec0bbabd53370a@syzkaller.appspotmail.com Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 80892772c4edac88c538165d26a0105f19b61c1c Author: xiaofeng.yan Date: Mon Jan 20 14:26:39 2020 +0800 hsr: Fix a compilation error A compliation error happen when building branch 5.5-rc7 In file included from net/hsr/hsr_main.c:12:0: net/hsr/hsr_main.h:194:20: error: two or more data types in declaration specifiers static inline void void hsr_debugfs_rename(struct net_device *dev) So Removed one void. Fixes: 4c2d5e33dcd3 ("hsr: rename debugfs file when interface name is changed") Signed-off-by: xiaofeng.yan Acked-by: Taehee Yoo Signed-off-by: David S. Miller commit 2a187d03352086e300daa2044051db00044cd171 Author: Michał Mirosław Date: Wed Jan 15 10:54:35 2020 +0100 mmc: sdhci: fix minimum clock rate for v3 controller For SDHCIv3+ with programmable clock mode, minimal clock frequency is still base clock / max(divider). Minimal programmable clock frequency is always greater than minimal divided clock frequency. Without this patch, SDHCI uses out-of-spec initial frequency when multiplier is big enough: mmc1: mmc_rescan_try_freq: trying to init card at 468750 Hz [for 480 MHz source clock divided by 1024] The code in sdhci_calc_clk() already chooses a correct SDCLK clock mode. Fixes: c3ed3877625f ("mmc: sdhci: add support for programmable clock mode") Cc: # 4f6aa3264af4: mmc: tegra: Only advertise UHS modes if IO regulator is present Cc: Signed-off-by: Michał Mirosław Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/ffb489519a446caffe7a0a05c4b9372bd52397bb.1579082031.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit 690afc165bb314354667f67157c1a1aea7dc797a Author: Niko Kortstrom Date: Thu Jan 16 11:43:27 2020 +0200 net: ip6_gre: fix moving ip6gre between namespaces Support for moving IPv4 GRE tunnels between namespaces was added in commit b57708add314 ("gre: add x-netns support"). The respective change for IPv6 tunnels, commit 22f08069e8b4 ("ip6gre: add x-netns support") did not drop NETIF_F_NETNS_LOCAL flag so moving them from one netns to another is still denied in IPv6 case. Drop NETIF_F_NETNS_LOCAL flag from ip6gre tunnels to allow moving ip6gre tunnel endpoints between network namespaces. Signed-off-by: Niko Kortstrom Acked-by: Nicolas Dichtel Acked-by: William Tu Signed-off-by: David S. Miller commit def9d2780727cec3313ed3522d0123158d87224d Author: Linus Torvalds Date: Sun Jan 19 16:02:49 2020 -0800 Linux 5.5-rc7 commit 7008ee121089b8193aea918b98850fe87d996508 Merge: 11a827294755 fc585d4a5cf6 Author: Linus Torvalds Date: Sun Jan 19 12:10:28 2020 -0800 Merge tag 'riscv/for-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Paul Walmsley: "Three fixes for RISC-V: - Don't free and reuse memory containing the code that CPUs parked at boot reside in. - Fix rv64 build problems for ubsan and some modules by adding logical and arithmetic shift helpers for 128-bit values. These are from libgcc and are similar to what's present for ARM64. - Fix vDSO builds to clean up their own temporary files" * tag 'riscv/for-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Less inefficient gcc tishift helpers (and export their symbols) riscv: delete temporary files riscv: make sure the cores stay looping in .Lsecondary_park commit 11a827294755ce3d07e14cfe257b3ec16ab56f34 Merge: 5f43644394a9 b2383ad987a6 Author: Linus Torvalds Date: Sun Jan 19 12:03:53 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix non-blocking connect() in x25, from Martin Schiller. 2) Fix spurious decryption errors in kTLS, from Jakub Kicinski. 3) Netfilter use-after-free in mtype_destroy(), from Cong Wang. 4) Limit size of TSO packets properly in lan78xx driver, from Eric Dumazet. 5) r8152 probe needs an endpoint sanity check, from Johan Hovold. 6) Prevent looping in tcp_bpf_unhash() during sockmap/tls free, from John Fastabend. 7) hns3 needs short frames padded on transmit, from Yunsheng Lin. 8) Fix netfilter ICMP header corruption, from Eyal Birger. 9) Fix soft lockup when low on memory in hns3, from Yonglong Liu. 10) Fix NTUPLE firmware command failures in bnxt_en, from Michael Chan. 11) Fix memory leak in act_ctinfo, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (91 commits) cxgb4: reject overlapped queues in TC-MQPRIO offload cxgb4: fix Tx multi channel port rate limit net: sched: act_ctinfo: fix memory leak bnxt_en: Do not treat DSN (Digital Serial Number) read failure as fatal. bnxt_en: Fix ipv6 RFS filter matching logic. bnxt_en: Fix NTUPLE firmware command failures. net: systemport: Fixed queue mapping in internal ring map net: dsa: bcm_sf2: Configure IMP port for 2Gb/sec net: dsa: sja1105: Don't error out on disabled ports with no phy-mode net: phy: dp83867: Set FORCE_LINK_GOOD to default after reset net: hns: fix soft lockup when there is not enough memory net: avoid updating qdisc_xmit_lock_key in netdev_update_lockdep_key() net/sched: act_ife: initalize ife->metalist earlier netfilter: nat: fix ICMP header corruption on ICMP errors net: wan: lapbether.c: Use built-in RCU list checking netfilter: nf_tables: fix flowtable list del corruption netfilter: nf_tables: fix memory leak in nf_tables_parse_netdev_hooks() netfilter: nf_tables: remove WARN and add NLA_STRING upper limits netfilter: nft_tunnel: ERSPAN_VERSION must not be null netfilter: nft_tunnel: fix null-attribute check ... commit 5f43644394a96a8bcd8fc29a8bbd9c40b4465b54 Merge: 8f8972a3127f e64175776d06 Author: Linus Torvalds Date: Sun Jan 19 12:02:06 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: "Two runtime PM fixes and one leak fix" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: iop3xx: Fix memory leak in probe error path i2c: tegra: Properly disable runtime PM on driver's probe error i2c: tegra: Fix suspending in active runtime PM state commit 927d780ee371d7e121cea4fc7812f6ef2cea461c Author: Alex Sverdlin Date: Wed Jan 8 15:57:47 2020 +0100 ARM: 8950/1: ftrace/recordmcount: filter relocation types Scenario 1, ARMv7 ================= If code in arch/arm/kernel/ftrace.c would operate on mcount() pointer the following may be generated: 00000230 : 230: b5f8 push {r3, r4, r5, r6, r7, lr} 232: b500 push {lr} 234: f7ff fffe bl 0 <__gnu_mcount_nc> 234: R_ARM_THM_CALL __gnu_mcount_nc 238: f240 0600 movw r6, #0 238: R_ARM_THM_MOVW_ABS_NC __gnu_mcount_nc 23c: f8d0 1180 ldr.w r1, [r0, #384] ; 0x180 FTRACE currently is not able to deal with it: WARNING: CPU: 0 PID: 0 at .../kernel/trace/ftrace.c:1979 ftrace_bug+0x1ad/0x230() ... CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.116-... #1 ... [] (unwind_backtrace) from [] (show_stack+0x11/0x14) [] (show_stack) from [] (dump_stack+0x81/0xa8) [] (dump_stack) from [] (warn_slowpath_common+0x69/0x90) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x17/0x1c) [] (warn_slowpath_null) from [] (ftrace_bug+0x1ad/0x230) [] (ftrace_bug) from [] (ftrace_process_locs+0x27d/0x444) [] (ftrace_process_locs) from [] (ftrace_init+0x91/0xe8) [] (ftrace_init) from [] (start_kernel+0x34b/0x358) [] (start_kernel) from [<00308095>] (0x308095) ---[ end trace cb88537fdc8fa200 ]--- ftrace failed to modify [] prealloc_fixed_plts+0x8/0x60 actual: 44:f2:e1:36 ftrace record flags: 0 (0) expected tramp: c03143e9 Scenario 2, ARMv4T ================== ftrace: allocating 14435 entries in 43 pages ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:2029 ftrace_bug+0x204/0x310 CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.5 #1 Hardware name: Cirrus Logic EDB9302 Evaluation Board [] (unwind_backtrace) from [] (show_stack+0x20/0x2c) [] (show_stack) from [] (dump_stack+0x20/0x30) [] (dump_stack) from [] (__warn+0xdc/0x104) [] (__warn) from [] (warn_slowpath_null+0x4c/0x5c) [] (warn_slowpath_null) from [] (ftrace_bug+0x204/0x310) [] (ftrace_bug) from [] (ftrace_init+0x3b4/0x4d4) [] (ftrace_init) from [] (start_kernel+0x20c/0x410) [] (start_kernel) from [<00000000>] ( (null)) ---[ end trace 0506a2f5dae6b341 ]--- ftrace failed to modify [] perf_trace_sys_exit+0x5c/0xe8 actual: 1e:ff:2f:e1 Initializing ftrace call sites ftrace record flags: 0 (0) expected tramp: c000fb24 The analysis for this problem has been already performed previously, refer to the link below. Fix the above problems by allowing only selected reloc types in __mcount_loc. The list itself comes from the legacy recordmcount.pl script. Link: https://lore.kernel.org/lkml/56961010.6000806@pengutronix.de/ Cc: stable@vger.kernel.org Fixes: ed60453fa8f8 ("ARM: 6511/1: ftrace: add ARM support for C version of recordmcount") Signed-off-by: Alexander Sverdlin Acked-by: Steven Rostedt (VMware) Signed-off-by: Russell King commit b2383ad987a61bdd3a0a4ec3f343fbf0e3d9067b Author: Rahul Lakkireddy Date: Fri Jan 17 18:21:47 2020 +0530 cxgb4: reject overlapped queues in TC-MQPRIO offload A queue can't belong to multiple traffic classes. So, reject any such configuration that results in overlapped queues for a traffic class. Fixes: b1396c2bd675 ("cxgb4: parse and configure TC-MQPRIO offload") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit c856e2b6fc5c675512e578225ade545c1834f3ee Author: Rahul Lakkireddy Date: Fri Jan 17 18:23:55 2020 +0530 cxgb4: fix Tx multi channel port rate limit T6 can support 2 egress traffic management channels per port to double the total number of traffic classes that can be configured. In this configuration, if the class belongs to the other channel, then all the queues must be bound again explicitly to the new class, for the rate limit parameters on the other channel to take effect. So, always explicitly bind all queues to the port rate limit traffic class, regardless of the traffic management channel that it belongs to. Also, only bind queues to port rate limit traffic class, if all the queues don't already belong to an existing different traffic class. Fixes: 4ec4762d8ec6 ("cxgb4: add TC-MATCHALL classifier egress offload") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 09d4f10a5e78d76a53e3e584f1e6a701b6d24108 Author: Eric Dumazet Date: Sat Jan 18 20:45:06 2020 -0800 net: sched: act_ctinfo: fix memory leak Implement a cleanup method to properly free ci->params BUG: memory leak unreferenced object 0xffff88811746e2c0 (size 64): comm "syz-executor617", pid 7106, jiffies 4294943055 (age 14.250s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ c0 34 60 84 ff ff ff ff 00 00 00 00 00 00 00 00 .4`............. backtrace: [<0000000015aa236f>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] [<0000000015aa236f>] slab_post_alloc_hook mm/slab.h:586 [inline] [<0000000015aa236f>] slab_alloc mm/slab.c:3320 [inline] [<0000000015aa236f>] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3549 [<000000002c946bd1>] kmalloc include/linux/slab.h:556 [inline] [<000000002c946bd1>] kzalloc include/linux/slab.h:670 [inline] [<000000002c946bd1>] tcf_ctinfo_init+0x21a/0x530 net/sched/act_ctinfo.c:236 [<0000000086952cca>] tcf_action_init_1+0x400/0x5b0 net/sched/act_api.c:944 [<000000005ab29bf8>] tcf_action_init+0x135/0x1c0 net/sched/act_api.c:1000 [<00000000392f56f9>] tcf_action_add+0x9a/0x200 net/sched/act_api.c:1410 [<0000000088f3c5dd>] tc_ctl_action+0x14d/0x1bb net/sched/act_api.c:1465 [<000000006b39d986>] rtnetlink_rcv_msg+0x178/0x4b0 net/core/rtnetlink.c:5424 [<00000000fd6ecace>] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477 [<0000000047493d02>] rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5442 [<00000000bdcf8286>] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] [<00000000bdcf8286>] netlink_unicast+0x223/0x310 net/netlink/af_netlink.c:1328 [<00000000fc5b92d9>] netlink_sendmsg+0x2c0/0x570 net/netlink/af_netlink.c:1917 [<00000000da84d076>] sock_sendmsg_nosec net/socket.c:639 [inline] [<00000000da84d076>] sock_sendmsg+0x54/0x70 net/socket.c:659 [<0000000042fb2eee>] ____sys_sendmsg+0x2d0/0x300 net/socket.c:2330 [<000000008f23f67e>] ___sys_sendmsg+0x8a/0xd0 net/socket.c:2384 [<00000000d838e4f6>] __sys_sendmsg+0x80/0xf0 net/socket.c:2417 [<00000000289a9cb1>] __do_sys_sendmsg net/socket.c:2426 [inline] [<00000000289a9cb1>] __se_sys_sendmsg net/socket.c:2424 [inline] [<00000000289a9cb1>] __x64_sys_sendmsg+0x23/0x30 net/socket.c:2424 Fixes: 24ec483cec98 ("net: sched: Introduce act_ctinfo action") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Kevin 'ldir' Darbyshire-Bryant Cc: Cong Wang Cc: Toke Høiland-Jørgensen Acked-by: Kevin 'ldir' Darbyshire-Bryant Signed-off-by: David S. Miller commit fc585d4a5cf614727f64d86550b794bcad29d5c3 Author: Olof Johansson Date: Mon Dec 16 20:06:31 2019 -0800 riscv: Less inefficient gcc tishift helpers (and export their symbols) The existing __lshrti3 was really inefficient, and the other two helpers are also needed to compile some modules. Add the missing versions, and export all of the symbols like arm64 already does. This code is based on the assembly generated by libgcc builds. This fixes a build break triggered by ubsan: riscv64-unknown-linux-gnu-ld: lib/ubsan.o: in function `.L2': ubsan.c:(.text.unlikely+0x38): undefined reference to `__ashlti3' riscv64-unknown-linux-gnu-ld: ubsan.c:(.text.unlikely+0x42): undefined reference to `__ashrti3' Signed-off-by: Olof Johansson [paul.walmsley@sifive.com: use SYM_FUNC_{START,END} instead of ENTRY/ENDPROC; note libgcc origin] Signed-off-by: Paul Walmsley commit 8f8972a3127ff46df62ae30057d29606968ec4aa Merge: 244dc2689085 d70486668cdf Author: Linus Torvalds Date: Sat Jan 18 16:34:17 2020 -0800 Merge tag 'mtd/fixes-for-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD fixes from Miquel Raynal: "Raw NAND: - GPMI: Fix the suspend/resume SPI-NOR: - Fix quad enable on Spansion like flashes - Fix selection of 4-byte addressing opcodes on Spansion" * tag 'mtd/fixes-for-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: gpmi: Restore nfc timing setup after suspend/resume mtd: rawnand: gpmi: Fix suspend/resume problem mtd: spi-nor: Fix quad enable for Spansion like flashes mtd: spi-nor: Fix selection of 4-byte addressing opcodes on Spansion commit 244dc2689085d7ff478f7b61841e62e59bea4557 Merge: 0cc2682d8baa f66d84c8b4db Author: Linus Torvalds Date: Sat Jan 18 13:57:31 2020 -0800 Merge tag 'drm-fixes-2020-01-19' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Back from LCA2020, fixes wasn't too busy last week, seems to have quieten down appropriately, some amdgpu, i915, then a core mst fix and one fix for virtio-gpu and one for rockchip: core mst: - serialize down messages and clear timeslots are on unplug amdgpu: - Update golden settings for renoir - eDP fix i915: - uAPI fix: Remove dash and colon from PMU names to comply with tools/perf - Fix for include file that was indirectly included - Two fixes to make sure VMA are marked active for error capture virtio: - maintain obj reservation lock when submitting cmds rockchip: - increase link rate var size to accommodate rates" * tag 'drm-fixes-2020-01-19' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: Reorder detect_edp_sink_caps before link settings read. drm/amdgpu: update goldensetting for renoir drm/dp_mst: Have DP_Tx send one msg at a time drm/dp_mst: clear time slots for ports invalid drm/i915/pmu: Do not use colons or dashes in PMU names drm/rockchip: fix integer type used for storing dp data rate drm/i915/gt: Mark ring->vma as active while pinned drm/i915/gt: Mark context->state vma as active while pinned drm/i915/gt: Skip trying to unbind in restore_ggtt_mappings drm/i915: Add missing include file drm/virtio: add missing virtio_gpu_array_lock_resv call commit 95f4d9cced96afa9c69b3da8e79e96102c84fc60 Author: Ilie Halip Date: Wed Jan 15 13:32:42 2020 +0200 riscv: delete temporary files Temporary files used in the VDSO build process linger on even after make mrproper: vdso-dummy.o.tmp, vdso.so.dbg.tmp. Delete them once they're no longer needed. Signed-off-by: Ilie Halip Signed-off-by: Paul Walmsley commit 0cc2682d8baaa6c7383e40153afc19239ad28d77 Merge: 7ff15cd0458c a006483b2f97 Author: Linus Torvalds Date: Sat Jan 18 13:02:12 2020 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: - a resctrl fix for uninitialized objects found by debugobjects - a resctrl memory leak fix - fix the unintended re-enabling of the of SME and SEV CPU flags if memory encryption was disabled at bootup via the MSR space" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/CPU/AMD: Ensure clearing of SME/SEV features is maintained x86/resctrl: Fix potential memory leak x86/resctrl: Fix an imbalance in domain_remove_cpu() commit 7ff15cd0458c288afa954de843bb1903c723e5b3 Merge: 9e79c5233290 de95a991bb72 Author: Linus Torvalds Date: Sat Jan 18 13:00:59 2020 -0800 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Ingo Molnar: "Three fixes: fix link failure on Alpha, fix a Sparse warning and annotate/robustify a lockless access in the NOHZ code" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick/sched: Annotate lockless access to last_jiffies_update lib/vdso: Make __cvdso_clock_getres() static time/posix-stubs: Provide compat itimer supoprt for alpha commit 9e79c5233290884d54addb601afc7ece2f70c79e Merge: a186c112c7a4 dc8d37ed304e Author: Linus Torvalds Date: Sat Jan 18 12:57:41 2020 -0800 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull cpu/SMT fix from Ingo Molnar: "Fix a build bug on CONFIG_HOTPLUG_SMT=y && !CONFIG_SYSFS kernels" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/SMT: Fix x86 link error without CONFIG_SYSFS commit a186c112c7a44fefdf9e4208f2b38c31b53f3c1d Merge: b07b9e8d6318 978370956d20 Author: Linus Torvalds Date: Sat Jan 18 12:56:36 2020 -0800 Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS fix from Ingo Molnar: "Fix a thermal throttling race that can result in easy to trigger boot crashes on certain Ice Lake platforms" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce/therm_throt: Do not access uninitialized therm_work commit b07b9e8d631856c9e42af79900527509449206f4 Merge: 124b5547ec1e 2167f1625c2f Author: Linus Torvalds Date: Sat Jan 18 12:55:19 2020 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Tooling fixes, three Intel uncore driver fixes, plus an AUX events fix uncovered by the perf fuzzer" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Remove PCIe3 unit for SNR perf/x86/intel/uncore: Fix missing marker for snr_uncore_imc_freerunning_events perf/x86/intel/uncore: Add PCI ID of IMC for Xeon E3 V5 Family perf: Correctly handle failed perf_get_aux_event() perf hists: Fix variable name's inconsistency in hists__for_each() macro perf map: Set kmap->kmaps backpointer for main kernel map chunks perf report: Fix incorrectly added dimensions as switch perf data file tools lib traceevent: Fix memory leakage in filter_event commit 124b5547ec1e1c935c5cc3dfe9f3c04669ecb5e4 Merge: a1c6f87efc0a 39e7234f00bc Author: Linus Torvalds Date: Sat Jan 18 12:53:28 2020 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "Three fixes: - Fix an rwsem spin-on-owner crash, introduced in v5.4 - Fix a lockdep bug when running out of stack_trace entries, introduced in v5.4 - Docbook fix" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rwsem: Fix kernel crash when spinning on RWSEM_OWNER_UNKNOWN futex: Fix kernel-doc notation warning locking/lockdep: Fix buffer overrun problem in stack_trace[] commit a1c6f87efc0ad67797bc81071b6e6291896d7460 Merge: e2f73d1e52a5 1fd224e35c14 Author: Linus Torvalds Date: Sat Jan 18 12:52:18 2020 -0800 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Ingo Molnar: "Fix a recent regression in the Ingenic SoCs irqchip driver that floods the syslog" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/ingenic: Get rid of the legacy IRQ domain commit e2f73d1e52a5b3c53f11861f31d726168ca92ce6 Merge: ba0f47220384 4911ee401b7c Author: Linus Torvalds Date: Sat Jan 18 12:50:14 2020 -0800 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Three EFI fixes: - Fix a slow-boot-scrolling regression but making sure we use WC for EFI earlycon framebuffer mappings on x86 - Fix a mixed EFI mode boot crash - Disable paging explicitly before entering startup_32() in mixed mode bootup" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efistub: Disable paging at mixed mode entry efi/libstub/random: Initialize pointer variables to zero for mixed mode efi/earlycon: Fix write-combine mapping on x86 commit ba0f47220384ff160c9df93dedbbef26d7b67f7b Merge: 8cac89909a30 463f550fb47b Author: Linus Torvalds Date: Sat Jan 18 12:29:13 2020 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull rseq fixes from Ingo Molnar: "Two rseq bugfixes: - CLONE_VM !CLONE_THREAD didn't work properly, the kernel would end up corrupting the TLS of the parent. Technically a change in the ABI but the previous behavior couldn't resonably have been relied on by applications so this looks like a valid exception to the ABI rule. - Make the RSEQ_FLAG_UNREGISTER ABI behavior consistent with the handling of other flags. This is not thought to impact any applications either" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rseq: Unregister rseq for clone CLONE_VM rseq: Reject unknown flags on rseq unregister commit 8cac89909a30807eb4aba56a0e29f55e3b6df42f Merge: 2324de6fab22 6b3ad6649a4c Author: Linus Torvalds Date: Sat Jan 18 12:23:31 2020 -0800 Merge tag 'for-linus-2020-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread fixes from Christian Brauner: "Here is an urgent fix for ptrace_may_access() permission checking. Commit 69f594a38967 ("ptrace: do not audit capability check when outputing /proc/pid/stat") introduced the ability to opt out of audit messages for accesses to various proc files since they are not violations of policy. While doing so it switched the check from ns_capable() to has_ns_capability{_noaudit}(). That means it switched from checking the subjective credentials (ktask->cred) of the task to using the objective credentials (ktask->real_cred). This is appears to be wrong. ptrace_has_cap() is currently only used in ptrace_may_access() And is used to check whether the calling task (subject) has the CAP_SYS_PTRACE capability in the provided user namespace to operate on the target task (object). According to the cred.h comments this means the subjective credentials of the calling task need to be used. With this fix we switch ptrace_has_cap() to use security_capable() and thus back to using the subjective credentials. As one example where this might be particularly problematic, Jann pointed out that in combination with the upcoming IORING_OP_OPENAT{2} feature, this bug might allow unprivileged users to bypass the capability checks while asynchronously opening files like /proc/*/mem, because the capability checks for this would be performed against kernel credentials. To illustrate on the former point about this being exploitable: When io_uring creates a new context it records the subjective credentials of the caller. Later on, when it starts to do work it creates a kernel thread and registers a callback. The callback runs with kernel creds for ktask->real_cred and ktask->cred. To prevent this from becoming a full-blown 0-day io_uring will call override_cred() and override ktask->cred with the subjective credentials of the creator of the io_uring instance. With ptrace_has_cap() currently looking at ktask->real_cred this override will be ineffective and the caller will be able to open arbitray proc files as mentioned above. Luckily, this is currently not exploitable but would be so once IORING_OP_OPENAT{2} land in v5.6. Let's fix it now. To minimize potential regressions I successfully ran the criu testsuite. criu makes heavy use of ptrace() and extensively hits ptrace_may_access() codepaths and has a good change of detecting any regressions. Additionally, I succesfully ran the ptrace and seccomp kernel tests" * tag 'for-linus-2020-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: ptrace: reintroduce usage of subjective credentials in ptrace_has_cap() commit 2324de6fab2223287da7628ba92dc6cfed4f46ca Merge: 8965de70cbaf 40260b01d029 Author: Linus Torvalds Date: Sat Jan 18 12:18:55 2020 -0800 Merge tag 's390-5.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix printing misleading Secure-IPL enabled message when it is not. - Fix a race condition between host ap bus and guest ap bus doing device reset in crypto code. - Fix sanity check in CCA cipher key function (CCA AES cipher key support), which fails otherwise. * tag 's390-5.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/setup: Fix secure ipl message s390/zcrypt: move ap device reset from bus to driver code s390/zcrypt: Fix CCA cipher key gen with clear key value function commit 7eaecf7963c1c8f62d62c6a8e7c439b0e7f2d365 Author: Florian Westphal Date: Sat Jan 18 11:27:25 2020 +0100 netfilter: nft_osf: add missing check for DREG attribute syzbot reports just another NULL deref crash because of missing test for presence of the attribute. Reported-by: syzbot+cf23983d697c26c34f60@syzkaller.appspotmail.com Fixes: b96af92d6eaf9fadd ("netfilter: nf_tables: implement Passive OS fingerprint module in nft_osf") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8965de70cbafec673417eed423bd5e0e9c244079 Merge: f04dba64d667 28d76df18f0a Author: Linus Torvalds Date: Sat Jan 18 12:12:36 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 fixes in drivers with no impact to core code. The mptfusion fix is enormous because the driver API had to be rethreaded to pass down the necessary iocp pointer, but once that's done a significant chunk of code is deleted. The other two patches are small" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mptfusion: Fix double fetch bug in ioctl scsi: storvsc: Correctly set number of hardware queues for IDE disk scsi: fnic: fix invalid stack access commit f04dba64d667419493d1f9aadd50b19860312b6c Merge: bf3f401db6cb fb85145c0444 Author: Linus Torvalds Date: Sat Jan 18 12:08:57 2020 -0800 Merge tag 'char-misc-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are some small fixes for 5.5-rc7 Included here are: - two lkdtm fixes - coresight build fix - Documentation update for the hw process document All of these have been in linux-next with no reported issues" * tag 'char-misc-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Documentation/process: Add Amazon contact for embargoed hardware issues lkdtm/bugs: fix build error in lkdtm_UNSET_SMEP lkdtm/bugs: Make double-fault test always available coresight: etm4x: Fix unused function warning commit bf3f401db6cbe010095fe3d1e233a5fde54e8b78 Merge: c5fd2c5b8bcd 9fea3a40f6b0 Author: Linus Torvalds Date: Sat Jan 18 12:06:09 2020 -0800 Merge tag 'staging-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver fixes from Greg KH: "Here are some small staging and iio driver fixes for 5.5-rc7 All of them are for some small reported issues. Nothing major, full details in the shortlog. All have been in linux-next with no reported issues" * tag 'staging-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: comedi: ni_routes: allow partial routing information staging: comedi: ni_routes: fix null dereference in ni_find_route_source() iio: light: vcnl4000: Fix scale for vcnl4040 iio: buffer: align the size of scan bytes to size of the largest element iio: chemical: pms7003: fix unmet triggered buffer dependency iio: imu: st_lsm6dsx: Fix selection of ST_LSM6DS3_ID iio: adc: ad7124: Fix DT channel configuration commit c5fd2c5b8bcd274718c3370b39913f68587fb9cc Merge: 25e73aadf297 453495d4e791 Author: Linus Torvalds Date: Sat Jan 18 12:02:33 2020 -0800 Merge tag 'usb-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB driver fixes from Greg KH: "Here are some small USB driver and core fixes for 5.5-rc7 There's one fix for hub wakeup issues and a number of small usb-serial driver fixes and device id updates. The hub fix has been in linux-next for a while with no reported issues, and the usb-serial ones have all passed 0-day with no problems" * tag 'usb-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: serial: quatech2: handle unbound ports USB: serial: keyspan: handle unbound ports USB: serial: io_edgeport: add missing active-port sanity check USB: serial: io_edgeport: handle unbound ports on URB completion USB: serial: ch341: handle unbound port at reset_resume USB: serial: suppress driver bind attributes USB: serial: option: add support for Quectel RM500Q in QDL mode usb: core: hub: Improved device recognition on remote wakeup USB: serial: opticon: fix control-message timeouts USB: serial: option: Add support for Quectel RM500Q USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx commit e02d9c4c68dc0ca08ded9487720bba775c09669b Merge: 5a9ef19454cd d061b2411d5f Author: David S. Miller Date: Sat Jan 18 14:38:30 2020 +0100 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. 3 small bug fix patches. The 1st two are aRFS fixes and the last one fixes a fatal driver load failure on some kernels without PCIe extended config space support enabled. Please also queue these for -stable. Thanks. ==================== Signed-off-by: David S. Miller commit d061b2411d5f3d6272187ab734ce0640827fca13 Author: Michael Chan Date: Fri Jan 17 00:32:47 2020 -0500 bnxt_en: Do not treat DSN (Digital Serial Number) read failure as fatal. DSN read can fail, for example on a kdump kernel without PCIe extended config space support. If DSN read fails, don't set the BNXT_FLAG_DSN_VALID flag and continue loading. Check the flag to see if the stored DSN is valid before using it. Only VF reps creation should fail without valid DSN. Fixes: 03213a996531 ("bnxt: move bp->switch_id initialization to PF probe") Reported-by: Marc Smith Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 6fc7caa84e713f7627e171ab1e7c4b5be0dc9b3d Author: Michael Chan Date: Fri Jan 17 00:32:46 2020 -0500 bnxt_en: Fix ipv6 RFS filter matching logic. Fix bnxt_fltr_match() to match ipv6 source and destination addresses. The function currently only checks ipv4 addresses and will not work corrently on ipv6 filters. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ceb3284c588eee5ea256c70e4d8d7cf399b8134e Author: Michael Chan Date: Fri Jan 17 00:32:45 2020 -0500 bnxt_en: Fix NTUPLE firmware command failures. The NTUPLE related firmware commands are sent to the wrong firmware channel, causing all these commands to fail on new firmware that supports the new firmware channel. Fix it by excluding the 3 NTUPLE firmware commands from the list for the new firmware channel. Fixes: 760b6d33410c ("bnxt_en: Add support for 2nd firmware message channel.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 6b3ad6649a4c75504edeba242d3fd36b3096a57f Author: Christian Brauner Date: Wed Jan 15 14:42:34 2020 +0100 ptrace: reintroduce usage of subjective credentials in ptrace_has_cap() Commit 69f594a38967 ("ptrace: do not audit capability check when outputing /proc/pid/stat") introduced the ability to opt out of audit messages for accesses to various proc files since they are not violations of policy. While doing so it somehow switched the check from ns_capable() to has_ns_capability{_noaudit}(). That means it switched from checking the subjective credentials of the task to using the objective credentials. This is wrong since. ptrace_has_cap() is currently only used in ptrace_may_access() And is used to check whether the calling task (subject) has the CAP_SYS_PTRACE capability in the provided user namespace to operate on the target task (object). According to the cred.h comments this would mean the subjective credentials of the calling task need to be used. This switches ptrace_has_cap() to use security_capable(). Because we only call ptrace_has_cap() in ptrace_may_access() and in there we already have a stable reference to the calling task's creds under rcu_read_lock() there's no need to go through another series of dereferences and rcu locking done in ns_capable{_noaudit}(). As one example where this might be particularly problematic, Jann pointed out that in combination with the upcoming IORING_OP_OPENAT feature, this bug might allow unprivileged users to bypass the capability checks while asynchronously opening files like /proc/*/mem, because the capability checks for this would be performed against kernel credentials. To illustrate on the former point about this being exploitable: When io_uring creates a new context it records the subjective credentials of the caller. Later on, when it starts to do work it creates a kernel thread and registers a callback. The callback runs with kernel creds for ktask->real_cred and ktask->cred. To prevent this from becoming a full-blown 0-day io_uring will call override_cred() and override ktask->cred with the subjective credentials of the creator of the io_uring instance. With ptrace_has_cap() currently looking at ktask->real_cred this override will be ineffective and the caller will be able to open arbitray proc files as mentioned above. Luckily, this is currently not exploitable but will turn into a 0-day once IORING_OP_OPENAT{2} land in v5.6. Fix it now! Cc: Oleg Nesterov Cc: Eric Paris Cc: stable@vger.kernel.org Reviewed-by: Kees Cook Reviewed-by: Serge Hallyn Reviewed-by: Jann Horn Fixes: 69f594a38967 ("ptrace: do not audit capability check when outputing /proc/pid/stat") Signed-off-by: Christian Brauner commit 00ed452c210a0bc1ff3ee79e1ce6b199f00a0638 Author: Matthew Wilcox (Oracle) Date: Sun Jan 12 15:54:10 2020 -0500 XArray: Add xa_for_each_range This function supports iterating over a range of an array. Also add documentation links for xa_for_each_start(). Signed-off-by: Matthew Wilcox (Oracle) commit c44aa5e8ab58b5f4cf473970ec784c3333496a2e Author: Matthew Wilcox (Oracle) Date: Fri Jan 17 22:13:21 2020 -0500 XArray: Fix xas_find returning too many entries If you call xas_find() with the initial index > max, it should have returned NULL but was returning the entry at index. Signed-off-by: Matthew Wilcox (Oracle) Cc: stable@vger.kernel.org commit 19c30f4dd0923ef191f35c652ee4058e91e89056 Author: Matthew Wilcox (Oracle) Date: Fri Jan 17 22:00:41 2020 -0500 XArray: Fix xa_find_after with multi-index entries If the entry is of an order which is a multiple of XA_CHUNK_SIZE, the current detection of sibling entries does not work. Factor out an xas_sibling() function to make xa_find_after() a little more understandable, and write a new implementation that doesn't suffer from the same bug. Signed-off-by: Matthew Wilcox (Oracle) Cc: stable@vger.kernel.org commit 430f24f94c8a174d411a550d7b5529301922e67a Author: Matthew Wilcox (Oracle) Date: Fri Jan 17 17:45:12 2020 -0500 XArray: Fix infinite loop with entry at ULONG_MAX If there is an entry at ULONG_MAX, xa_for_each() will overflow the 'index + 1' in xa_find_after() and wrap around to 0. Catch this case and terminate the loop by returning NULL. Signed-off-by: Matthew Wilcox (Oracle) Cc: stable@vger.kernel.org commit 82a958497dc9120e0e8043da82273baedd255aaf Author: Matthew Wilcox (Oracle) Date: Fri Jan 17 12:36:32 2020 -0500 XArray: Add wrappers for nested spinlocks Some users need to take an xarray lock while holding another xarray lock. Reported-by: Doug Gilbert Signed-off-by: Matthew Wilcox (Oracle) commit f66d84c8b4db9a4f77f29e2d8fd521196c879582 Merge: e33c7ba89263 5a64967a2f3b Author: Dave Airlie Date: Sat Jan 18 12:54:10 2020 +1000 Merge tag 'drm-misc-fixes-2020-01-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes virtio: maintain obj reservation lock when submitting cmds (Gerd) rockchip: increase link rate var size to accommodate rates (Tobias) mst: serialize down messages and clear timeslots are on unplug (Wayne) Cc: Gerd Hoffmann Cc: Tobias Schramm Cc: Wayne Lin Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200116162856.GA11524@art_vandelay commit e33c7ba89263c4bf5d0553907f315dd38751e684 Merge: 16a89856f0a5 88550e1c345c Author: Dave Airlie Date: Sat Jan 18 12:53:53 2020 +1000 Merge tag 'drm-intel-fixes-2020-01-16' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - uAPI fix: Remove dash and colon from PMU names to comply with tools/perf - Fix for include file that was indirectly included - Two fixes to make sure VMA are marked active for error capture Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200116161419.GA13594@jlahtine-desk.ger.corp.intel.com commit db1a079569687eeb7f617a50bbb0474e9e11b64a Author: Wayne Lin Date: Fri Jan 17 14:03:50 2020 +0800 drm/dp_mst: Handle SST-only branch device case [Why] While handling LINK_ADDRESS reply, current code expects a peer device can handle sideband message once the peer device type is reported as DP_PEER_DEVICE_MST_BRANCHING. However, when the connected device is a SST branch case, it can't handle the sideband message(MST_CAP=0 in DPCD 00021h). Current code will try to send LINK_ADDRESS to SST branch device and end up with message timeout and monitor can't display normally. As the result of that, we should take SST branch device into account. [How] According to DP 1.4 spec, we can use Peer_Device_Type as DP_PEER_DEVICE_MST_BRANCHING and Message_Capability_Status as 0 to indicate peer device as a SST-only branch device. Fix following: - Add the function drm_dp_mst_is_dp_mst_end_device() to decide whether a peer device connected to a DFP is mst end device. Which also indicates if the peer device is capable of handling message or not. - Take SST-only branch device case into account in drm_dp_port_set_pdt() and add a new parameter 'new_mcs'. Take sst branch device case as the same case as DP_PEER_DEVICE_DP_LEGACY_CONV and DP_PEER_DEVICE_SST_SINK. All original handling logics remain. - Take SST-only branch device case into account in drm_dp_mst_port_add_connector(). - Fix some parts in drm_dp_mst_handle_link_address_port() to have SST branch device case into consideration. - Fix the arguments of drm_dp_port_set_pdt() in drm_dp_mst_handle_conn_stat(). - Have SST branch device also report connector_status_connected when the ddps is true in drm_dp_mst_detect_port() - Fix the arguments of drm_dp_port_set_pdt() in drm_dp_delayed_destroy_port() Changes since v1:(https://patchwork.kernel.org/patch/11323079/) * Squash previous patch into one patch and merge the commit message here. * Combine the if statements mentioned in comments Fixes: c485e2c97dae ("drm/dp_mst: Refactor pdt setup/teardown, add more locking") Cc: Ville Syrjälä Cc: Harry Wentland Cc: Lyude Paul Signed-off-by: Wayne Lin Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200117060350.26358-2-Wayne.Lin@amd.com commit d70486668cdf51b14a50425ab45fc18677a167b2 Author: Esben Haabendal Date: Fri Jan 17 21:05:37 2020 +0100 mtd: rawnand: gpmi: Restore nfc timing setup after suspend/resume As we reset the GPMI block at resume, the timing parameters setup by a previous exec_op is lost. Rewriting GPMI timing registers on first exec_op after resume fixes the problem. Fixes: ef347c0cfd61 ("mtd: rawnand: gpmi: Implement exec_op") Cc: stable@vger.kernel.org Signed-off-by: Esben Haabendal Acked-by: Han Xu Signed-off-by: Miquel Raynal commit 5bc6bb603b4d0c8802af75e4932232683ab2d761 Author: Esben Haabendal Date: Fri Jan 17 21:05:36 2020 +0100 mtd: rawnand: gpmi: Fix suspend/resume problem On system resume, the gpmi clock must be enabled before accessing gpmi block. Without this, resume causes something like [ 661.348790] gpmi_reset_block(5cbb0f7e): module reset timeout [ 661.348889] gpmi-nand 1806000.gpmi-nand: Error setting GPMI : -110 [ 661.348928] PM: dpm_run_callback(): platform_pm_resume+0x0/0x44 returns -110 [ 661.348961] PM: Device 1806000.gpmi-nand failed to resume: error -110 Fixes: ef347c0cfd61 ("mtd: rawnand: gpmi: Implement exec_op") Cc: stable@vger.kernel.org Signed-off-by: Esben Haabendal Acked-by: Han Xu Signed-off-by: Miquel Raynal commit da2ef8124f20b4ce18d1d3d24fc7b88e687e10bb Author: Michael Walle Date: Thu Jan 16 10:37:00 2020 +0100 mtd: spi-nor: Fix quad enable for Spansion like flashes The commit 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable methods") forgot to actually set the QE bit in some cases. Thus this breaks quad mode accesses to flashes which support readback of the status register-2. Fix it. Fixes: 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable methods") Signed-off-by: Michael Walle Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 440b6d50254bdbd84c2a665c7f53ec69dd741a4f Author: Vignesh Raghavendra Date: Wed Jan 8 10:43:43 2020 +0530 mtd: spi-nor: Fix selection of 4-byte addressing opcodes on Spansion mtd->size is still unassigned when running spansion_post_sfdp_fixups() hook, therefore use nor->params.size to determine the size of flash device. This makes sure that 4-byte addressing opcodes are used on Spansion flashes that are larger than 16MiB and don't have SFDP 4BAIT table populated. Fixes: 92094ebc385e ("mtd: spi-nor: Add spansion_post_sfdp_fixups()") Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal commit 25e73aadf297d78cf528841795cd37bad8320642 Merge: effaf90137e3 44d282796f81 Author: Linus Torvalds Date: Fri Jan 17 11:25:45 2020 -0800 Merge tag 'io_uring-5.5-2020-01-16' of git://git.kernel.dk/linux-block Pull io_uring fixes form Jens Axboe: - Ensure ->result is always set when IO is retried (Bijan) - In conjunction with the above, fix a regression in polled IO issue when retried (me/Bijan) - Don't setup async context for read/write fixed, otherwise we may wrongly map the iovec on retry (me) - Cancel io-wq work if we fail getting mm reference (me) - Ensure dependent work is always initialized correctly (me) - Only allow original task to submit IO, don't allow it from a passed ring fd (me) * tag 'io_uring-5.5-2020-01-16' of git://git.kernel.dk/linux-block: io_uring: only allow submit from owning task io_uring: ensure workqueue offload grabs ring mutex for poll list io_uring: clear req->result always before issuing a read/write request io_uring: be consistent in assigning next work from handler io-wq: cancel work if we fail getting a mm reference io_uring: don't setup async context for read/write fixed commit effaf90137e3a9bb9702746f993f369a53c4185f Merge: ab7541c3addd b35cf1f0bf1f Author: Linus Torvalds Date: Fri Jan 17 11:21:05 2020 -0800 Merge tag 'for-5.5-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes that have been in the works during last twp weeks. All have a user visible effect and are stable material: - scrub: properly update progress after calling cancel ioctl, calling 'resume' would start from the beginning otherwise - fix subvolume reference removal, after moving out of the original path the reference is not recognized and will lead to transaction abort - fix reloc root lifetime checks, could lead to crashes when there's subvolume cleaning running in parallel - fix memory leak when quotas get disabled in the middle of extent accounting - fix transaction abort in case of balance being started on degraded mount on eg. RAID1" * tag 'for-5.5-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: check rw_devices, not num_devices for balance Btrfs: always copy scrub arguments back to user space btrfs: relocation: fix reloc_root lifespan and access btrfs: fix memory leak in qgroup accounting btrfs: do not delete mismatched root refs btrfs: fix invalid removal of root ref btrfs: rework arguments of btrfs_unlink_subvol commit 453495d4e791664e42be2254a6a8acb84b991417 Merge: 9c06ac4c83df 9715a43eea77 Author: Greg Kroah-Hartman Date: Fri Jan 17 19:40:06 2020 +0100 Merge tag 'usb-serial-5.5-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.5-rc7 Here are a few fixes for issues related to unbound port devices which could lead to NULL-pointer dereferences. Notably the bind attributes for usb-serial (port) drivers are removed as almost none of the drivers can handle individual ports going away once they've been bound. Included are also some new device ids. All but the unbound-port fixes have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-5.5-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: quatech2: handle unbound ports USB: serial: keyspan: handle unbound ports USB: serial: io_edgeport: add missing active-port sanity check USB: serial: io_edgeport: handle unbound ports on URB completion USB: serial: ch341: handle unbound port at reset_resume USB: serial: suppress driver bind attributes USB: serial: option: add support for Quectel RM500Q in QDL mode USB: serial: opticon: fix control-message timeouts USB: serial: option: Add support for Quectel RM500Q USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx commit ab7541c3addd344939e76d0636da0048ce24f2db Merge: 07d5ac6a1254 7df1e988c723 Author: Linus Torvalds Date: Fri Jan 17 08:42:02 2020 -0800 Merge tag 'fuse-fixes-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fix from Miklos Szeredi: "Fix a regression in the last release affecting the ftp module of the gvfs filesystem" * tag 'fuse-fixes-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix fuse_send_readpages() in the syncronous read case commit 07d5ac6a12546fd23619ea60b211654efa55db86 Merge: 13b2668d6fc9 e5dbdcb31285 Author: Linus Torvalds Date: Fri Jan 17 08:38:35 2020 -0800 Merge tag 'sound-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This became bigger than I have hoped for rc7. But, the only large LOC is for stm32 fixes that are simple rewriting of register access helpers, while the rest are all nice and small fixes: - A few ASoC fixes for the remaining probe error handling bugs - ALSA sequencer core fix for racy proc file accesses - Revert the option rename of snd-hda-intel to make compatible again - Various device-specific fixes" * tag 'sound-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: seq: Fix racy access for queue timer in proc read ALSA: usb-audio: fix sync-ep altsetting sanity check ASoC: msm8916-wcd-digital: Reset RX interpolation path after use ASoC: msm8916-wcd-analog: Fix MIC BIAS Internal1 ASoC: cros_ec_codec: Make the device acpi compatible ASoC: sti: fix possible sleep-in-atomic ASoC: msm8916-wcd-analog: Fix selected events for MIC BIAS External1 ASoC: hdac_hda: Fix error in driver removal after failed probe ASoC: SOF: Intel: fix HDA codec driver probe with multiple controllers ASoC: SOF: Intel: lower print level to dbg if we will reinit DSP ALSA: dice: fix fallback from protocol extension into limited functionality ALSA: firewire-tascam: fix corruption due to spin lock without restoration in SoftIRQ context ALSA: hda: Rename back to dmic_detect option ASoC: stm32: dfsdm: fix 16 bits record ASoC: stm32: sai: fix possible circular locking ASoC: Fix NULL dereference at freeing ASoC: Intel: bytcht_es8316: Fix Irbis NB41 netbook quirk ASoC: rt5640: Fix NULL dereference on module unload commit 3bf8bdcf3bada771eb12b57f2a30caee69e8ab8d Author: Guenter Roeck Date: Thu Jan 16 10:44:17 2020 -0800 hwmon: (core) Do not use device managed functions for memory allocations The hwmon core uses device managed functions, tied to the hwmon parent device, for various internal memory allocations. This is problematic since hwmon device lifetime does not necessarily match its parent's device lifetime. If there is a mismatch, memory leaks will accumulate until the parent device is released. Fix the problem by managing all memory allocations internally. The only exception is memory allocation for thermal device registration, which can be tied to the hwmon device, along with thermal device registration itself. Fixes: d560168b5d0f ("hwmon: (core) New hwmon registration API") Cc: stable@vger.kernel.org # v4.14.x: 47c332deb8e8: hwmon: Deal with errors from the thermal subsystem Cc: stable@vger.kernel.org # v4.14.x: 74e3512731bd: hwmon: (core) Fix double-free in __hwmon_device_register() Cc: stable@vger.kernel.org # v4.9.x: 3a412d5e4a1c: hwmon: (core) Simplify sysfs attribute name allocation Cc: stable@vger.kernel.org # v4.9.x: 47c332deb8e8: hwmon: Deal with errors from the thermal subsystem Cc: stable@vger.kernel.org # v4.9.x: 74e3512731bd: hwmon: (core) Fix double-free in __hwmon_device_register() Cc: stable@vger.kernel.org # v4.9+ Cc: Martin K. Petersen Signed-off-by: Guenter Roeck commit cf3ca1877574a306c0207cbf7fdf25419d9229df Author: Luuk Paulussen Date: Fri Dec 6 12:16:59 2019 +1300 hwmon: (adt7475) Make volt2reg return same reg as reg2volt input reg2volt returns the voltage that matches a given register value. Converting this back the other way with volt2reg didn't return the same register value because it used truncation instead of rounding. This meant that values read from sysfs could not be written back to sysfs to set back the same register value. With this change, volt2reg will return the same value for every voltage previously returned by reg2volt (for the set of possible input values) Signed-off-by: Luuk Paulussen Link: https://lore.kernel.org/r/20191205231659.1301-1-luuk.paulussen@alliedtelesis.co.nz cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck commit e51a7dda299815e92f43960d620cdfc8dfc144f2 Author: Gilles Buloz Date: Fri Nov 29 10:56:05 2019 +0100 hwmon: (nct7802) Fix non-working alarm on voltages No alarm is reported by /sys/.../inX_alarm In detail: The SMI Voltage status register is the only register giving a status for voltages, but it does not work like the non-SMI status registers used for temperatures and fans. A bit is set for each input crossing a threshold, in both direction, but the "inside" or "outside" limits info is not available. Also this register is cleared on read. Note : this is not explicitly spelled out in the datasheet, but from experiment. As a result if an input is crossing a threshold (min or max in any direction), the alarm is reported only once even if the input is still outside limits. Also if the alarm for another input is read before the one of this input, no alarm is reported at all. Signed-off-by: Gilles Buloz Link: https://lore.kernel.org/r/5de0f566.tBga5POKAgHlmd0p%gilles.buloz@kontron.com Fixes: 3434f3783580 ("hwmon: Driver for Nuvoton NCT7802Y") Signed-off-by: Guenter Roeck commit 7713e62c8623c54dac88d1fa724aa487a38c3efb Author: Gilles Buloz Date: Wed Nov 27 18:09:34 2019 +0100 hwmon: (nct7802) Fix voltage limits to wrong registers in0 thresholds are written to the in2 thresholds registers in2 thresholds to in3 thresholds in3 thresholds to in4 thresholds in4 thresholds to in0 thresholds Signed-off-by: Gilles Buloz Link: https://lore.kernel.org/r/5de0f509.rc0oEvPOMjbfPW1w%gilles.buloz@kontron.com Fixes: 3434f3783580 ("hwmon: Driver for Nuvoton NCT7802Y") Signed-off-by: Guenter Roeck commit 9715a43eea77e42678a1002623f2d9a78f5b81a1 Author: Johan Hovold Date: Fri Jan 17 15:35:26 2020 +0100 USB: serial: quatech2: handle unbound ports Check for NULL port data in the modem- and line-status handlers to avoid dereferencing a NULL pointer in the unlikely case where a port device isn't bound to a driver (e.g. after an allocation failure on port probe). Note that the other (stubbed) event handlers qt2_process_xmit_empty() and qt2_process_flush() would need similar sanity checks in case they are ever implemented. Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver") Cc: stable # 3.5 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 3018dd3fa114b13261e9599ddb5656ef97a1fa17 Author: Johan Hovold Date: Fri Jan 17 10:50:25 2020 +0100 USB: serial: keyspan: handle unbound ports Check for NULL port data in the control URB completion handlers to avoid dereferencing a NULL pointer in the unlikely case where a port device isn't bound to a driver (e.g. after an allocation failure on port probe()). Fixes: 0ca1268e109a ("USB Serial Keyspan: add support for USA-49WG & USA-28XG") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 1568c58d11a7c851bd09341aeefd6a1c308ac40d Author: Johan Hovold Date: Fri Jan 17 10:50:24 2020 +0100 USB: serial: io_edgeport: add missing active-port sanity check The driver receives the active port number from the device, but never made sure that the port number was valid. This could lead to a NULL-pointer dereference or memory corruption in case a device sends data for an invalid port. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit e37d1aeda737a20b1846a91a3da3f8b0f00cf690 Author: Johan Hovold Date: Fri Jan 17 10:50:23 2020 +0100 USB: serial: io_edgeport: handle unbound ports on URB completion Check for NULL port data in the shared interrupt and bulk completion callbacks to avoid dereferencing a NULL pointer in case a device sends data for a port device which isn't bound to a driver (e.g. due to a malicious device having unexpected endpoints or after an allocation failure on port probe). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 4d5ef53f75c22d28f490bcc5c771fcc610a9afa4 Author: Johan Hovold Date: Fri Jan 17 10:50:22 2020 +0100 USB: serial: ch341: handle unbound port at reset_resume Check for NULL port data in reset_resume() to avoid dereferencing a NULL pointer in case the port device isn't bound to a driver (e.g. after a failed control request at port probe). Fixes: 1ded7ea47b88 ("USB: ch341 serial: fix port number changed after resume") Cc: stable # 2.6.30 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit b35cf1f0bf1f2b0b193093338414b9bd63b29015 Author: Josef Bacik Date: Fri Jan 10 11:11:24 2020 -0500 btrfs: check rw_devices, not num_devices for balance The fstest btrfs/154 reports [ 8675.381709] BTRFS: Transaction aborted (error -28) [ 8675.383302] WARNING: CPU: 1 PID: 31900 at fs/btrfs/block-group.c:2038 btrfs_create_pending_block_groups+0x1e0/0x1f0 [btrfs] [ 8675.390925] CPU: 1 PID: 31900 Comm: btrfs Not tainted 5.5.0-rc6-default+ #935 [ 8675.392780] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014 [ 8675.395452] RIP: 0010:btrfs_create_pending_block_groups+0x1e0/0x1f0 [btrfs] [ 8675.402672] RSP: 0018:ffffb2090888fb00 EFLAGS: 00010286 [ 8675.404413] RAX: 0000000000000000 RBX: ffff92026dfa91c8 RCX: 0000000000000001 [ 8675.406609] RDX: 0000000000000000 RSI: ffffffff8e100899 RDI: ffffffff8e100971 [ 8675.408775] RBP: ffff920247c61660 R08: 0000000000000000 R09: 0000000000000000 [ 8675.410978] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffffffe4 [ 8675.412647] R13: ffff92026db74000 R14: ffff920247c616b8 R15: ffff92026dfbc000 [ 8675.413994] FS: 00007fd5e57248c0(0000) GS:ffff92027d800000(0000) knlGS:0000000000000000 [ 8675.416146] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8675.417833] CR2: 0000564aa51682d8 CR3: 000000006dcbc004 CR4: 0000000000160ee0 [ 8675.419801] Call Trace: [ 8675.420742] btrfs_start_dirty_block_groups+0x355/0x480 [btrfs] [ 8675.422600] btrfs_commit_transaction+0xc8/0xaf0 [btrfs] [ 8675.424335] reset_balance_state+0x14a/0x190 [btrfs] [ 8675.425824] btrfs_balance.cold+0xe7/0x154 [btrfs] [ 8675.427313] ? kmem_cache_alloc_trace+0x235/0x2c0 [ 8675.428663] btrfs_ioctl_balance+0x298/0x350 [btrfs] [ 8675.430285] btrfs_ioctl+0x466/0x2550 [btrfs] [ 8675.431788] ? mem_cgroup_charge_statistics+0x51/0xf0 [ 8675.433487] ? mem_cgroup_commit_charge+0x56/0x400 [ 8675.435122] ? do_raw_spin_unlock+0x4b/0xc0 [ 8675.436618] ? _raw_spin_unlock+0x1f/0x30 [ 8675.438093] ? __handle_mm_fault+0x499/0x740 [ 8675.439619] ? do_vfs_ioctl+0x56e/0x770 [ 8675.441034] do_vfs_ioctl+0x56e/0x770 [ 8675.442411] ksys_ioctl+0x3a/0x70 [ 8675.443718] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 8675.445333] __x64_sys_ioctl+0x16/0x20 [ 8675.446705] do_syscall_64+0x50/0x210 [ 8675.448059] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 8675.479187] BTRFS: error (device vdb) in btrfs_create_pending_block_groups:2038: errno=-28 No space left We now use btrfs_can_overcommit() to see if we can flip a block group read only. Before this would fail because we weren't taking into account the usable un-allocated space for allocating chunks. With my patches we were allowed to do the balance, which is technically correct. The test is trying to start balance on degraded mount. So now we're trying to allocate a chunk and cannot because we want to allocate a RAID1 chunk, but there's only 1 device that's available for usage. This results in an ENOSPC. But we shouldn't even be making it this far, we don't have enough devices to restripe. The problem is we're using btrfs_num_devices(), that also includes missing devices. That's not actually what we want, we need to use rw_devices. The chunk_mutex is not needed here, rw_devices changes only in device add, remove or replace, all are excluded by EXCL_OP mechanism. Fixes: e4d8ec0f65b9 ("Btrfs: implement online profile changing") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add stacktrace, update changelog, drop chunk_mutex ] Signed-off-by: David Sterba commit 5afe6ce748c1ea99e0d648153c05075e1ab93afb Author: Filipe Manana Date: Thu Jan 16 11:29:20 2020 +0000 Btrfs: always copy scrub arguments back to user space If scrub returns an error we are not copying back the scrub arguments structure to user space. This prevents user space to know how much progress scrub has done if an error happened - this includes -ECANCELED which is returned when users ask for scrub to stop. A particular use case, which is used in btrfs-progs, is to resume scrub after it is canceled, in that case it relies on checking the progress from the scrub arguments structure and then use that progress in a call to resume scrub. So fix this by always copying the scrub arguments structure to user space, overwriting the value returned to user space with -EFAULT only if copying the structure failed to let user space know that either that copying did not happen, and therefore the structure is stale, or it happened partially and the structure is probably not valid and corrupt due to the partial copy. Reported-by: Graham Cobb Link: https://lore.kernel.org/linux-btrfs/d0a97688-78be-08de-ca7d-bcb4c7fb397e@cobb.uk.net/ Fixes: 06fe39ab15a6a4 ("Btrfs: do not overwrite scrub error with fault error in scrub ioctl") CC: stable@vger.kernel.org # 5.1+ Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Tested-by: Graham Cobb Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 21bdee92c6f8a1609012c616a582001e09b3416d Merge: 33328bfab892 205608749e1e Author: Kalle Valo Date: Fri Jan 17 16:13:47 2020 +0200 Merge tag 'iwlwifi-for-kalle-2020-01-11' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes First batch of fixes intended for v5.5 * Don't send the PPAG command when PPAG is disabled, since it can cause problems; * A few fixes for a HW bug; * A fix for RS offload; * A fix for 3168 devices where the NVM tables where the wrong tables were being read. * Fix a couple of potential memory leaks in TXQ code; * Disable L0S states in all hardware since our hardware doesn't officially support them anymore (and older versions of the hardware had instability in these states); * Remove lar_disable parameter since it has been causing issues for some people who erroneously disable it; * Force the debug monitor HW to stop also when debug is disabled, since it sometimes stays on and prevents low system power states; commit 13b2668d6fc95dcecd11e4f86f47be24fda7da1f Merge: 5ffdff81cff9 a564ac35d605 Author: Linus Torvalds Date: Fri Jan 17 06:03:11 2020 -0800 Merge tag 'gpio-v5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "This reverts the GPIOLIB_IRQCHIP in the ThunderX driver. ThunderX is a piece of Arm-based server chip. I converted the driver to hierarchical gpiochip without access to real silicon and failed miserably since I didn't take MSI's into account. Kevin Hao helpfully stepped in and fixed it properly, let's revert it for v5.5 and put the proper conversion into v5.6" * tag 'gpio-v5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: Revert "gpio: thunderx: Switch to GPIOLIB_IRQCHIP" commit 5ffdff81cff9ae697b1d57fea9a86b6c6ede6078 Merge: 575966e08027 ad6bf88a6c19 Author: Linus Torvalds Date: Fri Jan 17 05:54:18 2020 -0800 Merge tag 'block-5.5-2020-01-16' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Three fixes that should go into this release: - The 32-bit segment size fix that I mentioned last week (Ming) - Use uint for the block size (Mikulas) - A null_blk zone write handling fix (Damien)" * tag 'block-5.5-2020-01-16' of git://git.kernel.dk/linux-block: block: fix an integer overflow in logical block size null_blk: Fix zone write handling block: fix get_max_segment_size() overflow on 32bit arch commit 5a9ef19454cd5daec8041bc7c3c11deb7456d9a0 Author: Florian Fainelli Date: Thu Jan 16 13:08:58 2020 -0800 net: systemport: Fixed queue mapping in internal ring map We would not be transmitting using the correct SYSTEMPORT transmit queue during ndo_select_queue() which looks up the internal TX ring map because while establishing the mapping we would be off by 4, so for instance, when we populate switch port mappings we would be doing: switch port 0, queue 0 -> ring index #0 switch port 0, queue 1 -> ring index #1 ... switch port 0, queue 3 -> ring index #3 switch port 1, queue 0 -> ring index #8 (4 + 4 * 1) ... instead of using ring index #4. This would cause our ndo_select_queue() to use the fallback queue mechanism which would pick up an incorrect ring for that switch port. Fix this by using the correct switch queue number instead of SYSTEMPORT queue number. Fixes: 25c440704661 ("net: systemport: Simplify queue mapping logic") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 8f1880cbe8d0d49ebb7e9ae409b3b96676e5aa97 Author: Florian Fainelli Date: Thu Jan 16 12:55:48 2020 -0800 net: dsa: bcm_sf2: Configure IMP port for 2Gb/sec With the implementation of the system reset controller we lost a setting that is currently applied by the bootloader and which configures the IMP port for 2Gb/sec, the default is 1Gb/sec. This is needed given the number of ports and applications we expect to run so bring back that setting. Fixes: 01b0ac07589e ("net: dsa: bcm_sf2: Add support for optional reset controller line") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 27afe0d34e9121a3d61cc0af9b17c2542dadde24 Author: Vladimir Oltean Date: Thu Jan 16 20:43:27 2020 +0200 net: dsa: sja1105: Don't error out on disabled ports with no phy-mode The sja1105_parse_ports_node function was tested only on device trees where all ports were enabled. Fix this check so that the driver continues to probe only with the ports where status is not "disabled", as expected. Fixes: 8aa9ebccae87 ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 86ffe920e669ec73035e84553e18edf17d16317c Author: Michael Grzeschik Date: Thu Jan 16 14:16:31 2020 +0100 net: phy: dp83867: Set FORCE_LINK_GOOD to default after reset According to the Datasheet this bit should be 0 (Normal operation) in default. With the FORCE_LINK_GOOD bit set, it is not possible to get a link. This patch sets FORCE_LINK_GOOD to the default value after resetting the phy. Signed-off-by: Michael Grzeschik Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2167f1625c2f04a33145f325db0de285630f7bd1 Author: Kan Liang Date: Thu Jan 16 12:02:10 2020 -0800 perf/x86/intel/uncore: Remove PCIe3 unit for SNR The PCIe Root Port driver for CPU Complex PCIe Root Ports are not loaded on SNR. The device ID for SNR PCIe3 unit is used by both uncore driver and the PCIe Root Port driver. If uncore driver is loaded, the PCIe Root Port driver never be probed. Remove the PCIe3 unit for SNR for now. The support for PCIe3 unit will be added later separately. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200116200210.18937-2-kan.liang@linux.intel.com commit fa694ae532836bd2f4cd659e9b4032abaf9fa9e5 Author: Kan Liang Date: Thu Jan 16 12:02:09 2020 -0800 perf/x86/intel/uncore: Fix missing marker for snr_uncore_imc_freerunning_events An Oops during the boot is found on some SNR machines. It turns out this is because the snr_uncore_imc_freerunning_events[] array was missing an end-marker. Fixes: ee49532b38dd ("perf/x86/intel/uncore: Add IMC uncore support for Snow Ridge") Reported-by: Like Xu Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Like Xu Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200116200210.18937-1-kan.liang@linux.intel.com commit e74383045119fb8055cf31cb39e0fe951d67163a Author: Kan Liang Date: Fri Jan 10 12:15:11 2020 -0800 perf/x86/intel/uncore: Add PCI ID of IMC for Xeon E3 V5 Family The IMC uncore support is missed for E3-1585 v5 CPU. Intel Xeon E3 V5 Family has Sky Lake CPU. Add the PCI ID of IMC for Intel Xeon E3 V5 Family. Reported-by: Rosales-fernandez, Carlos Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Rosales-fernandez, Carlos Link: https://lkml.kernel.org/r/1578687311-158748-1-git-send-email-kan.liang@linux.intel.com commit da9ec3d3dd0f1240a48920be063448a2242dbd90 Author: Mark Rutland Date: Mon Jan 6 12:03:39 2020 +0000 perf: Correctly handle failed perf_get_aux_event() Vince reports a worrying issue: | so I was tracking down some odd behavior in the perf_fuzzer which turns | out to be because perf_even_open() sometimes returns 0 (indicating a file | descriptor of 0) even though as far as I can tell stdin is still open. ... and further the cause: | error is triggered if aux_sample_size has non-zero value. | | seems to be this line in kernel/events/core.c: | | if (perf_need_aux_event(event) && !perf_get_aux_event(event, group_leader)) | goto err_locked; | | (note, err is never set) This seems to be a thinko in commit: ab43762ef010967e ("perf: Allow normal events to output AUX data") ... and we should probably return -EINVAL here, as this should only happen when the new event is mis-configured or does not have a compatible aux_event group leader. Fixes: ab43762ef010967e ("perf: Allow normal events to output AUX data") Reported-by: Vince Weaver Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Alexander Shishkin Tested-by: Vince Weaver commit 49edd6a2c456150870ddcef5b7ed11b21d849e13 Author: Yonglong Liu Date: Thu Jan 16 15:41:17 2020 +0800 net: hns: fix soft lockup when there is not enough memory When there is not enough memory and napi_alloc_skb() return NULL, the HNS driver will print error message, and than try again, if the memory is not enough for a while, huge error message and the retry operation will cause soft lockup. When napi_alloc_skb() return NULL because of no memory, we can get a warn_alloc() call trace, so this patch deletes the error message. We already use polling mode to handle irq, but the retry operation will render the polling weight inactive, this patch just return budget when the rx is not completed to avoid dead loop. Fixes: 36eedfde1a36 ("net: hns: Optimize hns_nic_common_poll for better performance") Fixes: b5996f11ea54 ("net: add Hisilicon Network Subsystem basic ethernet support") Signed-off-by: Yonglong Liu Signed-off-by: David S. Miller commit fdb838efa31e1ed9a13ae6ad0b64e30fdbd00570 Author: Johan Hovold Date: Thu Jan 16 17:07:05 2020 +0100 USB: serial: suppress driver bind attributes USB-serial drivers must not be unbound from their ports before the corresponding USB driver is unbound from the parent interface so suppress the bind and unbind attributes. Unbinding a serial driver while it's port is open is a sure way to trigger a crash as any driver state is released on unbind while port hangup is handled on the parent USB interface level. Drivers for multiport devices where ports share a resource such as an interrupt endpoint also generally cannot handle individual ports going away. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 53d374979ef147ab51f5d632dfe20b14aebeccd0 Author: Cong Wang Date: Wed Jan 15 13:02:38 2020 -0800 net: avoid updating qdisc_xmit_lock_key in netdev_update_lockdep_key() syzbot reported some bogus lockdep warnings, for example bad unlock balance in sch_direct_xmit(). They are due to a race condition between slow path and fast path, that is qdisc_xmit_lock_key gets re-registered in netdev_update_lockdep_key() on slow path, while we could still acquire the queue->_xmit_lock on fast path in this small window: CPU A CPU B __netif_tx_lock(); lockdep_unregister_key(qdisc_xmit_lock_key); __netif_tx_unlock(); lockdep_register_key(qdisc_xmit_lock_key); In fact, unlike the addr_list_lock which has to be reordered when the master/slave device relationship changes, queue->_xmit_lock is only acquired on fast path and only when NETIF_F_LLTX is not set, so there is likely no nested locking for it. Therefore, we can just get rid of re-registration of qdisc_xmit_lock_key. Reported-by: syzbot+4ec99438ed7450da6272@syzkaller.appspotmail.com Fixes: ab92d68fc22f ("net: core: add generic lockdep keys") Cc: Taehee Yoo Signed-off-by: Cong Wang Acked-by: Taehee Yoo Signed-off-by: David S. Miller commit 44c23d71599f81a1c7fe8389e0319822dd50c37c Author: Eric Dumazet Date: Wed Jan 15 08:20:39 2020 -0800 net/sched: act_ife: initalize ife->metalist earlier It seems better to init ife->metalist earlier in tcf_ife_init() to avoid the following crash : kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 10483 Comm: syz-executor216 Not tainted 5.5.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:_tcf_ife_cleanup net/sched/act_ife.c:412 [inline] RIP: 0010:tcf_ife_cleanup+0x6e/0x400 net/sched/act_ife.c:431 Code: 48 c1 ea 03 80 3c 02 00 0f 85 94 03 00 00 49 8b bd f8 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8d 67 e8 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 5c 03 00 00 48 bb 00 00 00 00 00 fc ff df 48 8b RSP: 0018:ffffc90001dc6d00 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffffffff864619c0 RCX: ffffffff815bfa09 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000000 RBP: ffffc90001dc6d50 R08: 0000000000000004 R09: fffff520003b8d8e R10: fffff520003b8d8d R11: 0000000000000003 R12: ffffffffffffffe8 R13: ffff8880a79fc000 R14: ffff88809aba0e00 R15: 0000000000000000 FS: 0000000001b51880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000563f52cce140 CR3: 0000000093541000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tcf_action_cleanup+0x62/0x1b0 net/sched/act_api.c:119 __tcf_action_put+0xfa/0x130 net/sched/act_api.c:135 __tcf_idr_release net/sched/act_api.c:165 [inline] __tcf_idr_release+0x59/0xf0 net/sched/act_api.c:145 tcf_idr_release include/net/act_api.h:171 [inline] tcf_ife_init+0x97c/0x1870 net/sched/act_ife.c:616 tcf_action_init_1+0x6b6/0xa40 net/sched/act_api.c:944 tcf_action_init+0x21a/0x330 net/sched/act_api.c:1000 tcf_action_add+0xf5/0x3b0 net/sched/act_api.c:1410 tc_ctl_action+0x390/0x488 net/sched/act_api.c:1465 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5424 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5442 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x58c/0x7d0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:659 ____sys_sendmsg+0x753/0x880 net/socket.c:2330 ___sys_sendmsg+0x100/0x170 net/socket.c:2384 __sys_sendmsg+0x105/0x1d0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg net/socket.c:2424 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2424 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 11a94d7fd80f ("net/sched: act_ife: validate the control action inside init()") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Davide Caratti Reviewed-by: Davide Caratti Acked-by: Cong Wang Signed-off-by: David S. Miller commit a72b6a1ee4d9fde48ad5c308f492ca60df654f19 Merge: 93ad0f969fc7 61177e911dad Author: David S. Miller Date: Fri Jan 17 10:36:07 2020 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter updates for net The following patchset contains Netfilter fixes for net: 1) Fix use-after-free in ipset bitmap destroy path, from Cong Wang. 2) Missing init netns in entry cleanup path of arp_tables, from Florian Westphal. 3) Fix WARN_ON in set destroy path due to missing cleanup on transaction error. 4) Incorrect netlink sanity check in tunnel, from Florian Westphal. 5) Missing sanity check for erspan version netlink attribute, also from Florian. 6) Remove WARN in nft_request_module() that can be triggered from userspace, from Florian Westphal. 7) Memleak in NFTA_HOOK_DEVS netlink parser, from Dan Carpenter. 8) List poison from commit path for flowtables that are added and deleted in the same batch, from Florian Westphal. 9) Fix NAT ICMP packet corruption, from Eyal Birger. ==================== Signed-off-by: David S. Miller commit 39e7234f00bc93613c086ae42d852d5f4147120a Author: Waiman Long Date: Wed Jan 15 10:43:36 2020 -0500 locking/rwsem: Fix kernel crash when spinning on RWSEM_OWNER_UNKNOWN The commit 91d2a812dfb9 ("locking/rwsem: Make handoff writer optimistically spin on owner") will allow a recently woken up waiting writer to spin on the owner. Unfortunately, if the owner happens to be RWSEM_OWNER_UNKNOWN, the code will incorrectly spin on it leading to a kernel crash. This is fixed by passing the proper non-spinnable bits to rwsem_spin_on_owner() so that RWSEM_OWNER_UNKNOWN will be treated as a non-spinnable target. Fixes: 91d2a812dfb9 ("locking/rwsem: Make handoff writer optimistically spin on owner") Reported-by: Christoph Hellwig Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Tested-by: Christoph Hellwig Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200115154336.8679-1-longman@redhat.com commit 319d5cce728cd70897a1306591a252258fc1428d Merge: b3a987b0264d 9608ea6c6613 Author: Linus Walleij Date: Fri Jan 17 09:07:26 2020 +0100 Merge tag 'intel-pinctrl-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into fixes intel-pinctrl for v5.5-3 * Fix Interrupt Status register offset for Intel Sunrisepoint PCH-H. The following is an automated git shortlog grouped by driver: sunrisepoint: - Add missing Interrupt Status register offset commit 44d282796f81eb1debc1d7cb53245b4cb3214cb5 Author: Jens Axboe Date: Thu Jan 16 19:00:24 2020 -0700 io_uring: only allow submit from owning task If the credentials or the mm doesn't match, don't allow the task to submit anything on behalf of this ring. The task that owns the ring can pass the file descriptor to another task, but we don't want to allow that task to submit an SQE that then assumes the ring mm and creds if it needs to go async. Cc: stable@vger.kernel.org Suggested-by: Stefan Metzmacher Signed-off-by: Jens Axboe commit ba9a103f40fc4a3ec7558ec9b0b97d4f92034249 Author: Johan Hovold Date: Mon Jan 13 10:38:57 2020 -0800 Input: keyspan-remote - fix control-message timeouts The driver was issuing synchronous uninterruptible control requests without using a timeout. This could lead to the driver hanging on probe due to a malfunctioning (or malicious) device until the device is physically disconnected. While sleeping in probe the driver prevents other devices connected to the same hub from being added to (or removed from) the bus. The USB upper limit of five seconds per request should be more than enough. Fixes: 99f83c9c9ac9 ("[PATCH] USB: add driver for Keyspan Digital Remote") Signed-off-by: Johan Hovold Reviewed-by: Greg Kroah-Hartman Cc: stable # 2.6.13 Link: https://lore.kernel.org/r/20200113171715.30621-1-johan@kernel.org Signed-off-by: Dmitry Torokhov commit ce535a2efb48d8d4c4e4b97e2764d7cee73d9b55 Author: Bartosz Golaszewski Date: Fri Jan 10 10:22:12 2020 -0800 Input: max77650-onkey - add of_match table We need the of_match table if we want to use the compatible string in the pmic's child node and get the onkey driver loaded automatically. Signed-off-by: Bartosz Golaszewski Signed-off-by: Dmitry Torokhov commit c15f8ba6dc1f6a8330cd89374a21388a5d91f92c Author: Hans Verkuil Date: Thu Jan 16 20:12:53 2020 -0800 Input: rmi_f54 - read from FIFO in 32 byte blocks The F54 Report Data is apparently read through a fifo and for the smbus protocol that means that between reading a block of 32 bytes the rmiaddr shouldn't be incremented. However, changing that causes other non-fifo reads to fail and so that change was reverted. This patch changes just the F54 function and it now reads 32 bytes at a time from the fifo, using the F54_FIFO_OFFSET to update the start address that is used when reading from the fifo. This has only been tested with smbus, not with i2c or spi. But I suspect that the same is needed there since I think similar problems will occur there when reading more than 256 bytes. Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil Reported-by: Timo Kaufmann Link: https://lore.kernel.org/r/20200115124819.3191024-3-hverkuil-cisco@xs4all.nl Signed-off-by: Dmitry Torokhov commit 8ff771f8c8d55d95f102cf88a970e541a8bd6bcf Author: Hans Verkuil Date: Thu Jan 16 20:12:27 2020 -0800 Revert "Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers" This reverts commit a284e11c371e446371675668d8c8120a27227339. This causes problems (drifting cursor) with at least the F11 function that reads more than 32 bytes. The real issue is in the F54 driver, and so this should be fixed there, and not in rmi_smbus.c. So first revert this bad commit, then fix the real problem in F54 in another patch. Signed-off-by: Hans Verkuil Reported-by: Timo Kaufmann Fixes: a284e11c371e ("Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200115124819.3191024-2-hverkuil-cisco@xs4all.nl Signed-off-by: Dmitry Torokhov commit 575966e080270b7574175da35f7f7dd5ecd89ff4 Merge: ef64753c1922 70db729fe1b3 Author: Linus Torvalds Date: Thu Jan 16 19:42:08 2020 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "I've been sitting on these longer than I meant, so the patch count is a bit higher than ideal for this part of the release. There's also some reverts of double-applied patches that brings the diffstat up a bit. With that said, the biggest changes are: - Revert of duplicate i2c device addition on two Aspeed (BMC) Devicetrees. - Move of two device nodes that got applied to the wrong part of the tree on ASpeed G6. - Regulator fix for Beaglebone X15 (adding 12/5V supplies) - Use interrupts for keys on Amlogic SM1 to avoid missed polls In addition to that, there is a collection of smaller DT fixes: - Power supply assignment fixes for i.MX6 - Fix of interrupt line for magnetometer on i.MX8 Librem5 devkit - Build fixlets (selects) for davinci/omap2+ - More interrupt number fixes for Stratix10, Amlogic SM1, etc. - ... and more similar fixes across different platforms And some non-DT stuff: - optee fix to register multiple shared pages properly - Clock calculation fixes for MMP3 - Clock fixes for OMAP as well" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (42 commits) MAINTAINERS: Add myself as the co-maintainer for Actions Semi platforms ARM: dts: imx7: Fix Toradex Colibri iMX7S 256MB NAND flash support ARM: dts: imx6sll-evk: Remove incorrect power supply assignment ARM: dts: imx6sl-evk: Remove incorrect power supply assignment ARM: dts: imx6sx-sdb: Remove incorrect power supply assignment ARM: dts: imx6qdl-sabresd: Remove incorrect power supply assignment ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6DL ARM: omap2plus: select RESET_CONTROLLER ARM: davinci: select CONFIG_RESET_CONTROLLER ARM: dts: aspeed: rainier: Fix fan fault and presence ARM: dts: aspeed: rainier: Remove duplicate i2c busses ARM: dts: aspeed: tacoma: Remove duplicate flash nodes ARM: dts: aspeed: tacoma: Remove duplicate i2c busses ARM: dts: aspeed: tacoma: Fix fsi master node ARM: dts: aspeed-g6: Fix FSI master location ARM: dts: mmp3: Fix the TWSI ranges clk: mmp2: Fix the order of timer mux parents ARM: mmp: do not divide the clock rate arm64: dts: rockchip: Fix IR on Beelink A1 optee: Fix multi page dynamic shm pool alloc ... commit ef64753c1922511e7d81947a8d27e72925a05e2c Merge: f4353c3e2aaf a0af27424734 Author: Linus Torvalds Date: Thu Jan 16 19:25:11 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: "Second collection of clk fixes for the next release. This one includes a fix for PM on TI SoCs with sysc devices and fixes a bunch of clks that are stuck always enabled on Qualcomm SDM845 SoCs. Allwinner SoCs get the usual set of fixes too, mostly correcting drivers to have the right bits that match the hardware. There's also a Samsung and Tegra fix in here to mark a clk critical and avoid a double free. And finally there's a fix for critical clks that silences a big warning splat about trying to enable a clk that couldn't even be prepared" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: ti: dra7-atl: Remove pm_runtime_irq_safe() clk: qcom: gcc-sdm845: Add missing flag to votable GDSCs clk: sunxi-ng: h6-r: Fix AR100/R_APB2 parent order clk: sunxi-ng: h6-r: Simplify R_APB1 clock definition clk: sunxi-ng: sun8i-r: Fix divider on APB0 clock clk: Don't try to enable critical clocks if prepare failed clk: tegra: Fix double-free in tegra_clk_init() clk: samsung: exynos5420: Keep top G3D clocks enabled clk: sunxi-ng: r40: Allow setting parent rate for external clock outputs clk: sunxi-ng: v3s: Fix incorrect number of hw_clks. commit f4353c3e2aaf7f7d3c5a18271b368bf5292854c3 Merge: 0c99ee44b892 57388a2ccb6c Author: Linus Torvalds Date: Thu Jan 16 15:55:30 2020 -0800 Merge tag 'pm-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix a coding mistake in the teo cpuidle governor causing data to be written beyond the last array element (Ikjoon Jang)" * tag 'pm-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: teo: Fix intervals[] array indexing bug commit 70db729fe1b30af89e798d16c1045846753e5448 Author: Manivannan Sadhasivam Date: Tue Jan 14 14:13:47 2020 +0530 MAINTAINERS: Add myself as the co-maintainer for Actions Semi platforms Since I've been doing the maintainership work for couple of cycles, we've decided to add myself as the co-maintainer along with Andreas. Link: https://lore.kernel.org/r/20200114084348.25659-2-manivannan.sadhasivam@linaro.org Cc: "Andreas Färber" Signed-off-by: Manivannan Sadhasivam Acked-by: Andreas Färber Signed-off-by: Olof Johansson commit 18451f9f9e5810b8bd1245c5ae166f257e0e2b9d Author: Alexander Potapenko Date: Thu Jan 16 12:09:34 2020 +0100 PM: hibernate: fix crashes with init_on_free=1 Upon resuming from hibernation, free pages may contain stale data from the kernel that initiated the resume. This breaks the invariant inflicted by init_on_free=1 that freed pages must be zeroed. To deal with this problem, make clear_free_pages() also clear the free pages when init_on_free is enabled. Fixes: 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options") Reported-by: Johannes Stezenbach Signed-off-by: Alexander Potapenko Cc: 5.3+ # 5.3+ Signed-off-by: Rafael J. Wysocki commit a006483b2f97af685f0e60f3a547c9ad4c9b9e94 Author: Tom Lendacky Date: Wed Jan 15 16:05:16 2020 -0600 x86/CPU/AMD: Ensure clearing of SME/SEV features is maintained If the SME and SEV features are present via CPUID, but memory encryption support is not enabled (MSR 0xC001_0010[23]), the feature flags are cleared using clear_cpu_cap(). However, if get_cpu_cap() is later called, these feature flags will be reset back to present, which is not desired. Change from using clear_cpu_cap() to setup_clear_cpu_cap() so that the clearing of the flags is maintained. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Cc: # 4.16.x- Link: https://lkml.kernel.org/r/226de90a703c3c0be5a49565047905ac4e94e8f3.1579125915.git.thomas.lendacky@amd.com commit 0c99ee44b8921b872089a7374c733310d995fd92 Merge: f5ae2ea6347a dfb9a8857f4d Author: Linus Torvalds Date: Thu Jan 16 10:26:40 2020 -0800 Merge tag 'tag-chrome-platform-fixes-for-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform fix from Benson Leung: "One fix in the wilco_ec keyboard backlight driver to allow the EC driver to continue loading in the absence of a backlight module" * tag 'tag-chrome-platform-fixes-for-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: wilco_ec: Fix keyboard backlight probing commit f3eaabbfd093c93d791eb930cc68d9b15246a65e Author: Reinhard Speyerer Date: Tue Jan 14 14:29:23 2020 +0100 USB: serial: option: add support for Quectel RM500Q in QDL mode Add support for Quectel RM500Q in QDL mode. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 24 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0800 Rev= 0.00 S: Manufacturer=Qualcomm CDMA Technologies MSM S: Product=QUSB_BULK_SN:xxxxxxxx S: SerialNumber=xxxxxxxx C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=10 Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms It is assumed that the ZLP flag required for other Qualcomm-based 5G devices also applies to Quectel RM500Q. Signed-off-by: Reinhard Speyerer Cc: stable Signed-off-by: Johan Hovold commit 394440d469413fa9b74f88a11f144d76017221f2 Author: Jeff Mahoney Date: Wed Jan 15 13:00:59 2020 -0500 reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr Commit 60e4cf67a58 (reiserfs: fix extended attributes on the root directory) introduced a regression open_xa_root started returning -EOPNOTSUPP but it was not handled properly in reiserfs_for_each_xattr. When the reiserfs module is built without CONFIG_REISERFS_FS_XATTR, deleting an inode would result in a warning and chowning an inode would also result in a warning and then fail to complete. With CONFIG_REISERFS_FS_XATTR enabled, the xattr root would always be present for read-write operations. This commit handles -EOPNOSUPP in the same way -ENODATA is handled. Fixes: 60e4cf67a582 ("reiserfs: fix extended attributes on the root directory") CC: stable@vger.kernel.org # Commit 60e4cf67a58 was picked up by stable Link: https://lore.kernel.org/r/20200115180059.6935-1-jeffm@suse.com Reported-by: Michael Brunnbauer Signed-off-by: Jeff Mahoney Signed-off-by: Jan Kara commit f571389c0b015e76f91c697c4c1700aba860d34f Author: Michał Mirosław Date: Tue Jan 7 10:47:34 2020 +0100 mmc: tegra: fix SDR50 tuning override Commit 7ad2ed1dfcbe inadvertently mixed up a quirk flag's name and broke SDR50 tuning override. Use correct NVQUIRK_ name. Fixes: 7ad2ed1dfcbe ("mmc: tegra: enable UHS-I modes") Cc: Acked-by: Adrian Hunter Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/9aff1d859935e59edd81e4939e40d6c55e0b55f6.1578390388.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit 61177e911dad660df86a4553eb01c95ece2f6a82 Author: Eyal Birger Date: Tue Jan 14 10:03:50 2020 +0200 netfilter: nat: fix ICMP header corruption on ICMP errors Commit 8303b7e8f018 ("netfilter: nat: fix spurious connection timeouts") made nf_nat_icmp_reply_translation() use icmp_manip_pkt() as the l4 manipulation function for the outer packet on ICMP errors. However, icmp_manip_pkt() assumes the packet has an 'id' field which is not correct for all types of ICMP messages. This is not correct for ICMP error packets, and leads to bogus bytes being written the ICMP header, which can be wrongfully regarded as 'length' bytes by RFC 4884 compliant receivers. Fix by assigning the 'id' field only for ICMP messages that have this semantic. Reported-by: Shmulik Ladkani Fixes: 8303b7e8f018 ("netfilter: nat: fix spurious connection timeouts") Signed-off-by: Eyal Birger Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 93ad0f969fc704959636846fc7f8d1aaf57f523e Author: Madhuparna Bhowmik Date: Wed Jan 15 17:11:01 2020 +0530 net: wan: lapbether.c: Use built-in RCU list checking The only callers of the function lapbeth_get_x25_dev() are lapbeth_rcv() and lapbeth_device_event(). lapbeth_rcv() uses rcu_read_lock() whereas lapbeth_device_event() is called with RTNL held (As mentioned in the comments). Therefore, pass lockdep_rtnl_is_held() as cond argument in list_for_each_entry_rcu(); Signed-off-by: Madhuparna Bhowmik Signed-off-by: David S. Miller commit 335178d5429c4cee61b58f4ac80688f556630818 Author: Florian Westphal Date: Thu Jan 16 12:03:01 2020 +0100 netfilter: nf_tables: fix flowtable list del corruption syzbot reported following crash: list_del corruption, ffff88808c9bb000->prev is LIST_POISON2 (dead000000000122) [..] Call Trace: __list_del_entry include/linux/list.h:131 [inline] list_del_rcu include/linux/rculist.h:148 [inline] nf_tables_commit+0x1068/0x3b30 net/netfilter/nf_tables_api.c:7183 [..] The commit transaction list has: NFT_MSG_NEWTABLE NFT_MSG_NEWFLOWTABLE NFT_MSG_DELFLOWTABLE NFT_MSG_DELTABLE A missing generation check during DELTABLE processing causes it to queue the DELFLOWTABLE operation a second time, so we corrupt the list here: case NFT_MSG_DELFLOWTABLE: list_del_rcu(&nft_trans_flowtable(trans)->list); nf_tables_flowtable_notify(&trans->ctx, because we have two different DELFLOWTABLE transactions for the same flowtable. We then call list_del_rcu() twice for the same flowtable->list. The object handling seems to suffer from the same bug so add a generation check too and only queue delete transactions for flowtables/objects that are still active in the next generation. Reported-by: syzbot+37a6804945a3a13b1572@syzkaller.appspotmail.com Fixes: 3b49e2e94e6eb ("netfilter: nf_tables: add flow table netlink frontend") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit cd77e75b5e4632d05d61fec5383052713c8ede2b Author: Dan Carpenter Date: Thu Jan 16 13:09:31 2020 +0300 netfilter: nf_tables: fix memory leak in nf_tables_parse_netdev_hooks() Syzbot detected a leak in nf_tables_parse_netdev_hooks(). If the hook already exists, then the error handling doesn't free the newest "hook". Reported-by: syzbot+f9d4095107fc8749c69c@syzkaller.appspotmail.com Fixes: b75a3e8371bc ("netfilter: nf_tables: allow netdevice to be used only once per flowtable") Signed-off-by: Dan Carpenter Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 9332d27d7918182add34e8043f6a754530fdd022 Author: Florian Westphal Date: Thu Jan 16 09:06:50 2020 +0100 netfilter: nf_tables: remove WARN and add NLA_STRING upper limits This WARN can trigger because some of the names fed to the module autoload function can be of arbitrary length. Remove the WARN and add limits for all NLA_STRING attributes. Reported-by: syzbot+0e63ae76d117ae1c3a01@syzkaller.appspotmail.com Fixes: 452238e8d5ffd8 ("netfilter: nf_tables: add and use helper for module autoload") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 9ec22d7c6c69146180577f3ad5fdf504beeaee62 Author: Florian Westphal Date: Thu Jan 16 08:58:05 2020 +0100 netfilter: nft_tunnel: ERSPAN_VERSION must not be null Fixes: af308b94a2a4a5 ("netfilter: nf_tables: add tunnel support") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 1c702bf902bd37349f6d91cd7f4b372b1e46d0ed Author: Florian Westphal Date: Thu Jan 16 08:44:11 2020 +0100 netfilter: nft_tunnel: fix null-attribute check else we get null deref when one of the attributes is missing, both must be non-null. Reported-by: syzbot+76d0b80493ac881ff77b@syzkaller.appspotmail.com Fixes: aaecfdb5c5dd8ba ("netfilter: nf_tables: match on tunnel metadata") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ec7470b834fe7b5d7eff11b6677f5d7fdf5e9a91 Author: Pablo Neira Ayuso Date: Mon Jan 13 18:09:58 2020 +0100 netfilter: nf_tables: store transaction list locally while requesting module This patch fixes a WARN_ON in nft_set_destroy() due to missing set reference count drop from the preparation phase. This is triggered by the module autoload path. Do not exercise the abort path from nft_request_module() while preparation phase cleaning up is still pending. WARNING: CPU: 3 PID: 3456 at net/netfilter/nf_tables_api.c:3740 nft_set_destroy+0x45/0x50 [nf_tables] [...] CPU: 3 PID: 3456 Comm: nft Not tainted 5.4.6-arch3-1 #1 RIP: 0010:nft_set_destroy+0x45/0x50 [nf_tables] Code: e8 30 eb 83 c6 48 8b 85 80 00 00 00 48 8b b8 90 00 00 00 e8 dd 6b d7 c5 48 8b 7d 30 e8 24 dd eb c5 48 89 ef 5d e9 6b c6 e5 c5 <0f> 0b c3 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 8b 7f 10 e9 52 RSP: 0018:ffffac4f43e53700 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ffff99d63a154d80 RCX: 0000000001f88e03 RDX: 0000000001f88c03 RSI: ffff99d6560ef0c0 RDI: ffff99d63a101200 RBP: ffff99d617721de0 R08: 0000000000000000 R09: 0000000000000318 R10: 00000000f0000000 R11: 0000000000000001 R12: ffffffff880fabf0 R13: dead000000000122 R14: dead000000000100 R15: ffff99d63a154d80 FS: 00007ff3dbd5b740(0000) GS:ffff99d6560c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00001cb5de6a9000 CR3: 000000016eb6a004 CR4: 00000000001606e0 Call Trace: __nf_tables_abort+0x3e3/0x6d0 [nf_tables] nft_request_module+0x6f/0x110 [nf_tables] nft_expr_type_request_module+0x28/0x50 [nf_tables] nf_tables_expr_parse+0x198/0x1f0 [nf_tables] nft_expr_init+0x3b/0xf0 [nf_tables] nft_dynset_init+0x1e2/0x410 [nf_tables] nf_tables_newrule+0x30a/0x930 [nf_tables] nfnetlink_rcv_batch+0x2a0/0x640 [nfnetlink] nfnetlink_rcv+0x125/0x171 [nfnetlink] netlink_unicast+0x179/0x210 netlink_sendmsg+0x208/0x3d0 sock_sendmsg+0x5e/0x60 ____sys_sendmsg+0x21b/0x290 Update comment on the code to describe the new behaviour. Reported-by: Marco Oliverio Fixes: 452238e8d5ff ("netfilter: nf_tables: add and use helper for module autoload") Signed-off-by: Pablo Neira Ayuso commit e5dbdcb31285a975d623d2bf2c9e7b2940489008 Merge: 60adcfde92fa 85578bbd642f Author: Takashi Iwai Date: Thu Jan 16 14:14:26 2020 +0100 Merge tag 'asoc-fix-v5.5-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.5 This is mostly driver specific fixes, plus an error handling fix in the core. There is a rather large diffstat for the stm32 SAI driver, this is a very large but mostly mechanical update which wraps every register access in the driver to allow a fix to the locking which avoids circular locks, the active change is much smaller and more reasonably sized. commit bd5874da57edd001b35cf28ae737779498c16a56 Author: Alexander Lobakin Date: Wed Jan 15 11:56:52 2020 +0300 net: dsa: tag_qca: fix doubled Tx statistics DSA subsystem takes care of netdev statistics since commit 4ed70ce9f01c ("net: dsa: Refactor transmit path to eliminate duplication"), so any accounting inside tagger callbacks is redundant and can lead to messing up the stats. This bug is present in Qualcomm tagger since day 0. Fixes: cafdc45c949b ("net-next: dsa: add Qualcomm tag RX/TX handler") Reviewed-by: Andrew Lunn Signed-off-by: Alexander Lobakin Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ad32205470919c8e04cdd33e0613bdba50c2376d Author: Alexander Lobakin Date: Wed Jan 15 11:54:38 2020 +0300 net: dsa: tag_gswip: fix typo in tagger name The correct name is GSWIP (Gigabit Switch IP). Typo was introduced in 875138f81d71a ("dsa: Move tagger name into its ops structure") while moving tagger names to their structures. Fixes: 875138f81d71a ("dsa: Move tagger name into its ops structure") Reviewed-by: Andrew Lunn Signed-off-by: Alexander Lobakin Reviewed-by: Florian Fainelli Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 82d5d6a638cbd12b7dfe8acafd9efd87a656cc06 Author: Kunihiko Hayashi Date: Wed Jan 15 13:02:42 2020 +0900 net: ethernet: ave: Avoid lockdep warning When building with PROVE_LOCKING=y, lockdep shows the following dump message. INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. ... Calling device_set_wakeup_enable() directly occurs this issue, and it isn't necessary for initialization, so this patch creates internal function __ave_ethtool_set_wol() and replaces with this in ave_init() and ave_resume(). Fixes: 7200f2e3c9e2 ("net: ethernet: ave: Set initial wol state to disabled") Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 36c67349a1a1c88b9cf11d7ca7762ababdb38867 Author: Yunsheng Lin Date: Wed Jan 15 10:46:45 2020 +0800 net: hns3: pad the short frame before sending to the hardware The hardware can not handle short frames below or equal to 32 bytes according to the hardware user manual, and it will trigger a RAS error when the frame's length is below 33 bytes. This patch pads the SKB when skb->len is below 33 bytes before sending it to hardware. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1712b2fff8c682d145c7889d2290696647d82dab Author: Eric Dumazet Date: Tue Jan 14 13:00:35 2020 -0800 macvlan: use skb_reset_mac_header() in macvlan_queue_xmit() I missed the fact that macvlan_broadcast() can be used both in RX and TX. skb_eth_hdr() makes only sense in TX paths, so we can not use it blindly in macvlan_broadcast() Fixes: 96cc4b69581d ("macvlan: do not assume mac_header is set in macvlan_broadcast()") Signed-off-by: Eric Dumazet Reported-by: Jurgen Van Ham Tested-by: Matteo Croce Signed-off-by: David S. Miller commit 27f4e1e9425e1e98d8e1b690edf06b56cd018bef Author: Faiz Abbas Date: Wed Jan 8 20:03:01 2020 +0530 mmc: sdhci_am654: Fix Command Queuing in AM65x Command Queuing was enabled completely for J721e controllers which lead to partial enablement even for Am65x. Complete CQ implementation for AM65x by adding the irq callback. Fixes: f545702b74f9 ("mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E") Cc: stable@vger.kernel.org Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200108143301.1929-4-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit de31f6ab68a3f548d88686d53514f252d78f61d5 Author: Faiz Abbas Date: Wed Jan 8 20:03:00 2020 +0530 mmc: sdhci_am654: Reset Command and Data line after tuning The tuning data is leftover in the buffer after tuning. This can cause issues in future data commands, especially with CQHCI. Reset the command and data lines after tuning to continue from a clean state. Fixes: 41fd4caeb00b ("mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver") Cc: stable@vger.kernel.org Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200108143301.1929-3-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 4d627c88546a697b07565dbb70d2f9f46a5ee76f Author: Faiz Abbas Date: Wed Jan 8 20:02:59 2020 +0530 mmc: sdhci_am654: Remove Inverted Write Protect flag The MMC/SD controllers on am65x and j721e don't in fact detect the write protect line as inverted. No issues were detected because of this because the sdwp line is not connected on any of the evms. Fix this by removing the flag. Fixes: 1accbced1c32 ("mmc: sdhci_am654: Add Support for 4 bit IP on J721E") Cc: stable@vger.kernel.org Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200108143301.1929-2-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 7df1e988c723a066754090b22d047c3225342152 Author: Miklos Szeredi Date: Thu Jan 16 11:09:36 2020 +0100 fuse: fix fuse_send_readpages() in the syncronous read case Buffered read in fuse normally goes via: -> generic_file_buffered_read() -> fuse_readpages() -> fuse_send_readpages() ->fuse_simple_request() [called since v5.4] In the case of a read request, fuse_simple_request() will return a non-negative bytecount on success or a negative error value. A positive bytecount was taken to be an error and the PG_error flag set on the page. This resulted in generic_file_buffered_read() falling back to ->readpage(), which would repeat the read request and succeed. Because of the repeated read succeeding the bug was not detected with regression tests or other use cases. The FTP module in GVFS however fails the second read due to the non-seekable nature of FTP downloads. Fix by checking and ignoring positive return value from fuse_simple_request(). Reported-by: Ondrej Holy Link: https://gitlab.gnome.org/GNOME/gvfs/issues/441 Fixes: 134831e36bbd ("fuse: convert readpages to simple api") Cc: # v5.4 Signed-off-by: Miklos Szeredi commit 3981f955eb27fd4f52b8cef198091530811229f2 Merge: 567110f147b3 85ddd9c31731 Author: David S. Miller Date: Thu Jan 16 10:04:40 2020 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-01-15 The following pull-request contains BPF updates for your *net* tree. We've added 12 non-merge commits during the last 9 day(s) which contain a total of 13 files changed, 95 insertions(+), 43 deletions(-). The main changes are: 1) Fix refcount leak for TCP time wait and request sockets for socket lookup related BPF helpers, from Lorenz Bauer. 2) Fix wrong verification of ARSH instruction under ALU32, from Daniel Borkmann. 3) Batch of several sockmap and related TLS fixes found while operating more complex BPF programs with Cilium and OpenSSL, from John Fastabend. 4) Fix sockmap to read psock's ingress_msg queue before regular sk_receive_queue() to avoid purging data upon teardown, from Lingpeng Chen. 5) Fix printing incorrect pointer in bpftool's btf_dump_ptr() in order to properly dump a BPF map's value with BTF, from Martin KaFai Lau. ==================== Signed-off-by: David S. Miller commit 11ba820bf163e224bf5dd44e545a66a44a5b1d7a Author: Jens Axboe Date: Wed Jan 15 21:51:17 2020 -0700 io_uring: ensure workqueue offload grabs ring mutex for poll list A previous commit moved the locking for the async sqthread, but didn't take into account that the io-wq workers still need it. We can't use req->in_async for this anymore as both the sqthread and io-wq workers set it, gate the need for locking on io_wq_current_is_worker() instead. Fixes: 8a4955ff1cca ("io_uring: sqthread should grab ctx->uring_lock for submissions") Reported-by: Bijan Mottahedeh Signed-off-by: Jens Axboe commit ad6bf88a6c19a39fb3b0045d78ea880325dfcf15 Author: Mikulas Patocka Date: Wed Jan 15 08:35:25 2020 -0500 block: fix an integer overflow in logical block size Logical block size has type unsigned short. That means that it can be at most 32768. However, there are architectures that can run with 64k pages (for example arm64) and on these architectures, it may be possible to create block devices with 64k block size. For exmaple (run this on an architecture with 64k pages): Mount will fail with this error because it tries to read the superblock using 2-sector access: device-mapper: writecache: I/O is not aligned, sector 2, size 1024, block size 65536 EXT4-fs (dm-0): unable to read superblock This patch changes the logical block size from unsigned short to unsigned int to avoid the overflow. Cc: stable@vger.kernel.org Reviewed-by: Martin K. Petersen Reviewed-by: Ming Lei Signed-off-by: Mikulas Patocka Signed-off-by: Jens Axboe commit 797f3f535d59f05ad12c629338beef6cb801d19e Author: Bijan Mottahedeh Date: Wed Jan 15 18:37:45 2020 -0800 io_uring: clear req->result always before issuing a read/write request req->result is cleared when io_issue_sqe() calls io_read/write_pre() routines. Those routines however are not called when the sqe argument is NULL, which is the case when io_issue_sqe() is called from io_wq_submit_work(). io_issue_sqe() may then examine a stale result if a polled request had previously failed with -EAGAIN: if (ctx->flags & IORING_SETUP_IOPOLL) { if (req->result == -EAGAIN) return -EAGAIN; io_iopoll_req_issued(req); } and in turn cause a subsequently completed request to be re-issued in io_wq_submit_work(). Signed-off-by: Bijan Mottahedeh Signed-off-by: Jens Axboe commit 28d76df18f0ad5bcf5fa48510b225f0ed262a99b Author: Dan Carpenter Date: Tue Jan 14 15:34:14 2020 +0300 scsi: mptfusion: Fix double fetch bug in ioctl Tom Hatskevich reported that we look up "iocp" then, in the called functions we do a second copy_from_user() and look it up again. The problem that could cause is: drivers/message/fusion/mptctl.c 674 /* All of these commands require an interrupt or 675 * are unknown/illegal. 676 */ 677 if ((ret = mptctl_syscall_down(iocp, nonblock)) != 0) ^^^^ We take this lock. 678 return ret; 679 680 if (cmd == MPTFWDOWNLOAD) 681 ret = mptctl_fw_download(arg); ^^^ Then the user memory changes and we look up "iocp" again but a different one so now we are holding the incorrect lock and have a race condition. 682 else if (cmd == MPTCOMMAND) 683 ret = mptctl_mpt_command(arg); The security impact of this bug is not as bad as it could have been because these operations are all privileged and root already has enormous destructive power. But it's still worth fixing. This patch passes the "iocp" pointer to the functions to avoid the second lookup. That deletes 100 lines of code from the driver so it's a nice clean up as well. Link: https://lore.kernel.org/r/20200114123414.GA7957@kadam Reported-by: Tom Hatskevich Reviewed-by: Greg Kroah-Hartman Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 7b571c19d4c0b78d27dd3bf1f3c42e4032390af6 Author: Long Li Date: Mon Jan 13 16:08:36 2020 -0800 scsi: storvsc: Correctly set number of hardware queues for IDE disk Commit 0ed881027690 ("scsi: storvsc: setup 1:1 mapping between hardware queue and CPU queue") introduced a regression for disks attached to IDE. For these disks the host VSP only offers one VMBUS channel. Setting multiple queues can overload the VMBUS channel and result in performance drop for high queue depth workload on system with large number of CPUs. Fix it by leaving the number of hardware queues to 1 (default value) for IDE disks. Fixes: 0ed881027690 ("scsi: storvsc: setup 1:1 mapping between hardware queue and CPU queue") Link: https://lore.kernel.org/r/1578960516-108228-1-git-send-email-longli@linuxonhyperv.com Reviewed-by: Ming Lei Signed-off-by: Long Li Signed-off-by: Martin K. Petersen commit 42ec15ceaea74b5f7a621fc6686cbf69ca66c4cf Author: Arnd Bergmann Date: Tue Jan 7 21:15:49 2020 +0100 scsi: fnic: fix invalid stack access gcc -O3 warns that some local variables are not properly initialized: drivers/scsi/fnic/vnic_dev.c: In function 'fnic_dev_hang_notify': drivers/scsi/fnic/vnic_dev.c:511:16: error: 'a0' is used uninitialized in this function [-Werror=uninitialized] vdev->args[0] = *a0; ~~~~~~~~~~~~~~^~~~~ drivers/scsi/fnic/vnic_dev.c:691:6: note: 'a0' was declared here u64 a0, a1; ^~ drivers/scsi/fnic/vnic_dev.c:512:16: error: 'a1' is used uninitialized in this function [-Werror=uninitialized] vdev->args[1] = *a1; ~~~~~~~~~~~~~~^~~~~ drivers/scsi/fnic/vnic_dev.c:691:10: note: 'a1' was declared here u64 a0, a1; ^~ drivers/scsi/fnic/vnic_dev.c: In function 'fnic_dev_mac_addr': drivers/scsi/fnic/vnic_dev.c:512:16: error: 'a1' is used uninitialized in this function [-Werror=uninitialized] vdev->args[1] = *a1; ~~~~~~~~~~~~~~^~~~~ drivers/scsi/fnic/vnic_dev.c:698:10: note: 'a1' was declared here u64 a0, a1; ^~ Apparently the code relies on the local variables occupying adjacent memory locations in the same order, but this is of course not guaranteed. Use an array of two u64 variables where needed to make it work correctly. I suspect there is also an endianness bug here, but have not digged in deep enough to be sure. Fixes: 5df6d737dd4b ("[SCSI] fnic: Add new Cisco PCI-Express FCoE HBA") Fixes: mmtom ("init/Kconfig: enable -O3 for all arches") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200107201602.4096790-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 20d2292754e72e445abe62b7ac453eb945fc626c Author: Greentime Hu Date: Wed Jan 15 14:54:36 2020 +0800 riscv: make sure the cores stay looping in .Lsecondary_park The code in secondary_park is currently placed in the .init section. The kernel reclaims and clears this code when it finishes booting. That causes the cores parked in it to go to somewhere unpredictable, so we move this function out of init to make sure the cores stay looping there. The instruction bgeu a0, t0, .Lsecondary_park may have "a relocation truncated to fit" issue during linking time. It is because that sections are too far to jump. Let's use tail to jump to the .Lsecondary_park. Signed-off-by: Greentime Hu Reviewed-by: Anup Patel Cc: Andreas Schwab Cc: stable@vger.kernel.org Fixes: 76d2a0493a17d ("RISC-V: Init and Halt Code") Signed-off-by: Paul Walmsley commit 16a89856f0a5d9235961d8d31432c76d650f8c1d Merge: b3a987b0264d 3b7c59754cc2 Author: Dave Airlie Date: Thu Jan 16 11:25:44 2020 +1000 Merge tag 'amd-drm-fixes-5.5-2020-01-15' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.5-2020-01-15: - Update golden settings for renoir - eDP fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200115235141.4149-1-alexander.deucher@amd.com commit 3b7c59754cc22760760a84ebddb8e0b1e8dd871b Author: Mario Kleiner Date: Thu Jan 9 16:20:27 2020 +0100 drm/amd/display: Reorder detect_edp_sink_caps before link settings read. read_current_link_settings_on_detect() on eDP 1.4+ may use the edp_supported_link_rates table which is set up by detect_edp_sink_caps(), so that function needs to be called first. Reviewed-by: Harry Wentland Signed-off-by: Mario Kleiner Cc: Martin Leung Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit f2360e333b5a326747981e82e8e4a7a0584dfc9a Author: Aaron Liu Date: Thu Jan 9 19:37:10 2020 +0800 drm/amdgpu: update goldensetting for renoir Update mmSDMA0_UTCL1_WATERMK golden setting for renoir. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 85ddd9c3173102930c16b0cfe8dbb771af434532 Merge: 0af2ffc93a4b 7361d44896ff Author: Daniel Borkmann Date: Wed Jan 15 23:26:14 2020 +0100 Merge branch 'bpf-sockmap-tls-fixes' John Fastabend says: ==================== To date our usage of sockmap/tls has been fairly simple, the BPF programs did only well-defined pop, push, pull and apply/cork operations. Now that we started to push more complex programs into sockmap we uncovered a series of issues addressed here. Further OpenSSL3.0 version should be released soon with kTLS support so its important to get any remaining issues on BPF and kTLS support resolved. Additionally, I have a patch under development to allow sockmap to be enabled/disabled at runtime for Cilium endpoints. This allows us to stress the map insert/delete with kTLS more than previously where Cilium only added the socket to the map when it entered ESTABLISHED state and never touched it from the control path side again relying on the sockets own close() hook to remove it. To test I have a set of test cases in test_sockmap.c that expose these issues. Once we get fixes here merged and in bpf-next I'll submit the tests to bpf-next tree to ensure we don't regress again. Also I've run these patches in the Cilium CI with OpenSSL (master branch) this will run tools such as netperf, ab, wrk2, curl, etc. to get a broad set of testing. I'm aware of two more issues that we are working to resolve in another couple (probably two) patches. First we see an auth tag corruption in kTLS when sending small 1byte chunks under stress. I've not pinned this down yet. But, guessing because its under 1B stress tests it must be some error path being triggered. And second we need to ensure BPF RX programs are not skipped when kTLS ULP is loaded. This breaks some of the sockmap selftests when running with kTLS. I'll send a follow up for this. v2: I dropped a patch that added !0 size check in tls_push_record this originated from a panic I caught awhile ago with a trace in the crypto stack. But I can not reproduce it anymore so will dig into that and send another patch later if needed. Anyways after a bit of thought it would be nicer if tls/crypto/bpf didn't require special case handling for the !0 size. ==================== Signed-off-by: Daniel Borkmann commit 7361d44896ff20d48bdd502d1a0cd66308055d45 Author: John Fastabend Date: Sat Jan 11 06:12:06 2020 +0000 bpf: Sockmap/tls, fix pop data with SK_DROP return code When user returns SK_DROP we need to reset the number of copied bytes to indicate to the user the bytes were dropped and not sent. If we don't reset the copied arg sendmsg will return as if those bytes were copied giving the user a positive return value. This works as expected today except in the case where the user also pops bytes. In the pop case the sg.size is reduced but we don't correctly account for this when copied bytes is reset. The popped bytes are not accounted for and we return a small positive value potentially confusing the user. The reason this happens is due to a typo where we do the wrong comparison when accounting for pop bytes. In this fix notice the if/else is not needed and that we have a similar problem if we push data except its not visible to the user because if delta is larger the sg.size we return a negative value so it appears as an error regardless. Fixes: 7246d8ed4dcce ("bpf: helper to pop data from messages") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Jonathan Lemon Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20200111061206.8028-9-john.fastabend@gmail.com commit 9aaaa56845a06aeabdd597cbe19492dc01f281ec Author: John Fastabend Date: Sat Jan 11 06:12:05 2020 +0000 bpf: Sockmap/tls, skmsg can have wrapped skmsg that needs extra chaining Its possible through a set of push, pop, apply helper calls to construct a skmsg, which is just a ring of scatterlist elements, with the start value larger than the end value. For example, end start |_0_|_1_| ... |_n_|_n+1_| Where end points at 1 and start points and n so that valid elements is the set {n, n+1, 0, 1}. Currently, because we don't build the correct chain only {n, n+1} will be sent. This adds a check and sg_chain call to correctly submit the above to the crypto and tls send path. Fixes: d3b18ad31f93d ("tls: add bpf support to sk_msg handling") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Jonathan Lemon Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20200111061206.8028-8-john.fastabend@gmail.com commit d468e4775c1c351616947ba0cccc43273963b9b5 Author: John Fastabend Date: Sat Jan 11 06:12:04 2020 +0000 bpf: Sockmap/tls, tls_sw can create a plaintext buf > encrypt buf It is possible to build a plaintext buffer using push helper that is larger than the allocated encrypt buffer. When this record is pushed to crypto layers this can result in a NULL pointer dereference because the crypto API expects the encrypt buffer is large enough to fit the plaintext buffer. Kernel splat below. To resolve catch the cases this can happen and split the buffer into two records to send individually. Unfortunately, there is still one case to handle where the split creates a zero sized buffer. In this case we merge the buffers and unmark the split. This happens when apply is zero and user pushed data beyond encrypt buffer. This fixes the original case as well because the split allocated an encrypt buffer larger than the plaintext buffer and the merge simply moves the pointers around so we now have a reference to the new (larger) encrypt buffer. Perhaps its not ideal but it seems the best solution for a fixes branch and avoids handling these two cases, (a) apply that needs split and (b) non apply case. The are edge cases anyways so optimizing them seems not necessary unless someone wants later in next branches. [ 306.719107] BUG: kernel NULL pointer dereference, address: 0000000000000008 [...] [ 306.747260] RIP: 0010:scatterwalk_copychunks+0x12f/0x1b0 [...] [ 306.770350] Call Trace: [ 306.770956] scatterwalk_map_and_copy+0x6c/0x80 [ 306.772026] gcm_enc_copy_hash+0x4b/0x50 [ 306.772925] gcm_hash_crypt_remain_continue+0xef/0x110 [ 306.774138] gcm_hash_crypt_continue+0xa1/0xb0 [ 306.775103] ? gcm_hash_crypt_continue+0xa1/0xb0 [ 306.776103] gcm_hash_assoc_remain_continue+0x94/0xa0 [ 306.777170] gcm_hash_assoc_continue+0x9d/0xb0 [ 306.778239] gcm_hash_init_continue+0x8f/0xa0 [ 306.779121] gcm_hash+0x73/0x80 [ 306.779762] gcm_encrypt_continue+0x6d/0x80 [ 306.780582] crypto_gcm_encrypt+0xcb/0xe0 [ 306.781474] crypto_aead_encrypt+0x1f/0x30 [ 306.782353] tls_push_record+0x3b9/0xb20 [tls] [ 306.783314] ? sk_psock_msg_verdict+0x199/0x300 [ 306.784287] bpf_exec_tx_verdict+0x3f2/0x680 [tls] [ 306.785357] tls_sw_sendmsg+0x4a3/0x6a0 [tls] test_sockmap test signature to trigger bug, [TEST]: (1, 1, 1, sendmsg, pass,redir,start 1,end 2,pop (1,2),ktls,): Fixes: d3b18ad31f93d ("tls: add bpf support to sk_msg handling") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Jonathan Lemon Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20200111061206.8028-7-john.fastabend@gmail.com commit cf21e9ba1eb86c9333ca5b05b2f1cc94021bcaef Author: John Fastabend Date: Sat Jan 11 06:12:03 2020 +0000 bpf: Sockmap/tls, msg_push_data may leave end mark in place Leaving an incorrect end mark in place when passing to crypto layer will cause crypto layer to stop processing data before all data is encrypted. To fix clear the end mark on push data instead of expecting users of the helper to clear the mark value after the fact. This happens when we push data into the middle of a skmsg and have room for it so we don't do a set of copies that already clear the end flag. Fixes: 6fff607e2f14b ("bpf: sk_msg program helper bpf_msg_push_data") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20200111061206.8028-6-john.fastabend@gmail.com commit 6562e29cf6f0ddd368657d97a8d484ffc30df5ef Author: John Fastabend Date: Sat Jan 11 06:12:02 2020 +0000 bpf: Sockmap, skmsg helper overestimates push, pull, and pop bounds In the push, pull, and pop helpers operating on skmsg objects to make data writable or insert/remove data we use this bounds check to ensure specified data is valid, /* Bounds checks: start and pop must be inside message */ if (start >= offset + l || last >= msg->sg.size) return -EINVAL; The problem here is offset has already included the length of the current element the 'l' above. So start could be past the end of the scatterlist element in the case where start also points into an offset on the last skmsg element. To fix do the accounting slightly different by adding the length of the previous entry to offset at the start of the iteration. And ensure its initialized to zero so that the first iteration does nothing. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Fixes: 6fff607e2f14b ("bpf: sk_msg program helper bpf_msg_push_data") Fixes: 7246d8ed4dcce ("bpf: helper to pop data from messages") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20200111061206.8028-5-john.fastabend@gmail.com commit 33bfe20dd7117dd81fd896a53f743a233e1ad64f Author: John Fastabend Date: Sat Jan 11 06:12:01 2020 +0000 bpf: Sockmap/tls, push write_space updates through ulp updates When sockmap sock with TLS enabled is removed we cleanup bpf/psock state and call tcp_update_ulp() to push updates to TLS ULP on top. However, we don't push the write_space callback up and instead simply overwrite the op with the psock stored previous op. This may or may not be correct so to ensure we don't overwrite the TLS write space hook pass this field to the ULP and have it fixup the ctx. This completes a previous fix that pushed the ops through to the ULP but at the time missed doing this for write_space, presumably because write_space TLS hook was added around the same time. Fixes: 95fa145479fbc ("bpf: sockmap/tls, close can race with map free") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Acked-by: Jonathan Lemon Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20200111061206.8028-4-john.fastabend@gmail.com commit 7e81a35302066c5a00b4c72d83e3ea4cad6eeb5b Author: John Fastabend Date: Sat Jan 11 06:12:00 2020 +0000 bpf: Sockmap, ensure sock lock held during tear down The sock_map_free() and sock_hash_free() paths used to delete sockmap and sockhash maps walk the maps and destroy psock and bpf state associated with the socks in the map. When done the socks no longer have BPF programs attached and will function normally. This can happen while the socks in the map are still "live" meaning data may be sent/received during the walk. Currently, though we don't take the sock_lock when the psock and bpf state is removed through this path. Specifically, this means we can be writing into the ops structure pointers such as sendmsg, sendpage, recvmsg, etc. while they are also being called from the networking side. This is not safe, we never used proper READ_ONCE/WRITE_ONCE semantics here if we believed it was safe. Further its not clear to me its even a good idea to try and do this on "live" sockets while networking side might also be using the socket. Instead of trying to reason about using the socks from both sides lets realize that every use case I'm aware of rarely deletes maps, in fact kubernetes/Cilium case builds map at init and never tears it down except on errors. So lets do the simple fix and grab sock lock. This patch wraps sock deletes from maps in sock lock and adds some annotations so we catch any other cases easier. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20200111061206.8028-3-john.fastabend@gmail.com commit 4da6a196f93b1af7612340e8c1ad8ce71e18f955 Author: John Fastabend Date: Sat Jan 11 06:11:59 2020 +0000 bpf: Sockmap/tls, during free we may call tcp_bpf_unhash() in loop When a sockmap is free'd and a socket in the map is enabled with tls we tear down the bpf context on the socket, the psock struct and state, and then call tcp_update_ulp(). The tcp_update_ulp() call is to inform the tls stack it needs to update its saved sock ops so that when the tls socket is later destroyed it doesn't try to call the now destroyed psock hooks. This is about keeping stacked ULPs in good shape so they always have the right set of stacked ops. However, recently unhash() hook was removed from TLS side. But, the sockmap/bpf side is not doing any extra work to update the unhash op when is torn down instead expecting TLS side to manage it. So both TLS and sockmap believe the other side is managing the op and instead no one updates the hook so it continues to point at tcp_bpf_unhash(). When unhash hook is called we call tcp_bpf_unhash() which detects the psock has already been destroyed and calls sk->sk_prot_unhash() which calls tcp_bpf_unhash() yet again and so on looping and hanging the core. To fix have sockmap tear down logic fixup the stale pointer. Fixes: 5d92e631b8be ("net/tls: partially revert fix transition through disconnect with close") Reported-by: syzbot+83979935eb6304f8cd46@syzkaller.appspotmail.com Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Acked-by: Song Liu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20200111061206.8028-2-john.fastabend@gmail.com commit 5e89cd303e3a4505752952259b9f1ba036632544 Author: Alex Deucher Date: Tue Jan 14 17:09:28 2020 -0600 PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken To account for parts of the chip that are "harvested" (disabled) due to silicon flaws, caches on some AMD GPUs must be initialized before ATS is enabled. ATS is normally enabled by the IOMMU driver before the GPU driver loads, so this cache initialization would have to be done in a quirk, but that's too complex to be practical. For Navi14 (device ID 0x7340), this initialization is done by the VBIOS, but apparently some boards went to production with an older VBIOS that doesn't do it. Disable ATS for those boards. Link: https://lore.kernel.org/r/20200114205523.1054271-3-alexander.deucher@amd.com Bug: https://gitlab.freedesktop.org/drm/amd/issues/1015 See-also: d28ca864c493 ("PCI: Mark AMD Stoney Radeon R7 GPU ATS as broken") See-also: 9b44b0b09dec ("PCI: Mark AMD Stoney GPU ATS as broken") [bhelgaas: squash into one patch, simplify slightly, commit log] Signed-off-by: Alex Deucher Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org commit 567110f147b352020138573a90476a1522210f62 Merge: ddf420390526 4eee13f14dd8 Author: David S. Miller Date: Wed Jan 15 23:11:18 2020 +0100 Merge branch 'stmmac-Fix-selftests-in-Synopsys-AXS101-board' Jose Abreu says: ==================== net: stmmac: Fix selftests in Synopsys AXS101 board Set of fixes for sefltests so that they work in Synopsys AXS101 board. Final output: $ ethtool -t eth0 The test result is PASS The test extra info: 1. MAC Loopback 0 2. PHY Loopback -95 3. MMC Counters 0 4. EEE -95 5. Hash Filter MC 0 6. Perfect Filter UC 0 7. MC Filter 0 8. UC Filter 0 9. Flow Control -95 10. RSS -95 11. VLAN Filtering -95 12. VLAN Filtering (perf) -95 13. Double VLAN Filter -95 14. Double VLAN Filter (perf) -95 15. Flexible RX Parser -95 16. SA Insertion (desc) -95 17. SA Replacement (desc) -95 18. SA Insertion (reg) -95 19. SA Replacement (reg) -95 20. VLAN TX Insertion -95 21. SVLAN TX Insertion -95 22. L3 DA Filtering -95 23. L3 SA Filtering -95 24. L4 DA TCP Filtering -95 25. L4 SA TCP Filtering -95 26. L4 DA UDP Filtering -95 27. L4 SA UDP Filtering -95 28. ARP Offload -95 29. Jumbo Frame 0 30. Multichannel Jumbo -95 31. Split Header -95 Description: 1) Fixes the unaligned accesses that caused CPU halt in Synopsys AXS101 boards. 2) Fixes the VLAN tests when filtering failed to work. 3) Fixes the VLAN Perfect tests when filtering is not available in HW. ==================== Signed-off-by: David S. Miller commit 4eee13f14dd8989e6168e1d69b8804f44c016e04 Author: Jose Abreu Date: Tue Jan 14 17:09:23 2020 +0100 net: stmmac: selftests: Guard VLAN Perfect test against non supported HW When HW does not support perfect filtering the feature will not be enabled in the net_device. Add a check for this to prevent failures. Fixes: 1b2250a04c1f ("net: stmmac: selftests: Add tests for VLAN Perfect Filtering") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit d39b68e5a736afa67d2e9cfb158efdd237d99dbd Author: Jose Abreu Date: Tue Jan 14 17:09:22 2020 +0100 net: stmmac: selftests: Mark as fail when received VLAN ID != expected When the VLAN ID does not match the expected one it means filter failed in HW. Fix it. Fixes: 94e18382003c ("net: stmmac: selftests: Add selftest for VLAN TX Offload") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 0b9f932edc1a461933bfde08e620362e2190e0dd Author: Jose Abreu Date: Tue Jan 14 17:09:21 2020 +0100 net: stmmac: selftests: Make it work in Synopsys AXS101 boards Synopsys AXS101 boards do not support unaligned memory loads or stores. Change the selftests mechanism to explicity: - Not add extra alignment in TX SKB - Use the unaligned version of ether_addr_equal() Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit ddf420390526ede3b9ff559ac89f58cb59d9db2f Author: Colin Ian King Date: Tue Jan 14 14:54:48 2020 +0000 net/wan/fsl_ucc_hdlc: fix out of bounds write on array utdm_info Array utdm_info is declared as an array of MAX_HDLC_NUM (4) elements however up to UCC_MAX_NUM (8) elements are potentially being written to it. Currently we have an array out-of-bounds write error on the last 4 elements. Fix this by making utdm_info UCC_MAX_NUM elements in size. Addresses-Coverity: ("Out-of-bounds write") Fixes: c19b6d246a35 ("drivers/net: support hdlc function for QE-UCC") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 5a64967a2f3bbc01cc708ee43c7b0893089c61c4 Author: Wayne Lin Date: Mon Jan 13 17:36:49 2020 +0800 drm/dp_mst: Have DP_Tx send one msg at a time [Why] Noticed this while testing MST with the 4 ports MST hub from StarTech.com. Sometimes can't light up monitors normally and get the error message as 'sideband msg build failed'. Look into aux transactions, found out that source sometimes will send out another down request before receiving the down reply of the previous down request. On the other hand, in drm_dp_get_one_sb_msg(), current code doesn't handle the interleaved replies case. Hence, source can't build up message completely and can't light up monitors. [How] For good compatibility, enforce source to send out one down request at a time. Add a flag, is_waiting_for_dwn_reply, to determine if the source can send out a down request immediately or not. - Check the flag before calling process_single_down_tx_qlock to send out a msg - Set the flag when successfully send out a down request - Clear the flag when successfully build up a down reply - Clear the flag when find erros during sending out a down request - Clear the flag when find errors during building up a down reply - Clear the flag when timeout occurs during waiting for a down reply - Use drm_dp_mst_kick_tx() to try to send another down request in queue at the end of drm_dp_mst_wait_tx_reply() (attempt to send out messages in queue when errors occur) Cc: Lyude Paul Signed-off-by: Wayne Lin Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200113093649.11755-1-Wayne.Lin@amd.com commit 5a40420e04940c581f736ea3d7588da9b6e99741 Merge: 536dc5df2808 4cc4a1708903 Author: David S. Miller Date: Wed Jan 15 22:44:23 2020 +0100 Merge tag 'batadv-net-for-davem-20200114' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - Fix DAT candidate selection on little endian systems, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 0af2ffc93a4b50948f9dad2786b7f1bd253bf0b9 Author: Daniel Borkmann Date: Wed Jan 15 21:47:33 2020 +0100 bpf: Fix incorrect verifier simulation of ARSH under ALU32 Anatoly has been fuzzing with kBdysch harness and reported a hang in one of the outcomes: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (85) call bpf_get_socket_cookie#46 1: R0_w=invP(id=0) R10=fp0 1: (57) r0 &= 808464432 2: R0_w=invP(id=0,umax_value=808464432,var_off=(0x0; 0x30303030)) R10=fp0 2: (14) w0 -= 810299440 3: R0_w=invP(id=0,umax_value=4294967295,var_off=(0xcf800000; 0x3077fff0)) R10=fp0 3: (c4) w0 s>>= 1 4: R0_w=invP(id=0,umin_value=1740636160,umax_value=2147221496,var_off=(0x67c00000; 0x183bfff8)) R10=fp0 4: (76) if w0 s>= 0x30303030 goto pc+216 221: R0_w=invP(id=0,umin_value=1740636160,umax_value=2147221496,var_off=(0x67c00000; 0x183bfff8)) R10=fp0 221: (95) exit processed 6 insns (limit 1000000) [...] Taking a closer look, the program was xlated as follows: # ./bpftool p d x i 12 0: (85) call bpf_get_socket_cookie#7800896 1: (bf) r6 = r0 2: (57) r6 &= 808464432 3: (14) w6 -= 810299440 4: (c4) w6 s>>= 1 5: (76) if w6 s>= 0x30303030 goto pc+216 6: (05) goto pc-1 7: (05) goto pc-1 8: (05) goto pc-1 [...] 220: (05) goto pc-1 221: (05) goto pc-1 222: (95) exit Meaning, the visible effect is very similar to f54c7898ed1c ("bpf: Fix precision tracking for unbounded scalars"), that is, the fall-through branch in the instruction 5 is considered to be never taken given the conclusion from the min/max bounds tracking in w6, and therefore the dead-code sanitation rewrites it as goto pc-1. However, real-life input disagrees with verification analysis since a soft-lockup was observed. The bug sits in the analysis of the ARSH. The definition is that we shift the target register value right by K bits through shifting in copies of its sign bit. In adjust_scalar_min_max_vals(), we do first coerce the register into 32 bit mode, same happens after simulating the operation. However, for the case of simulating the actual ARSH, we don't take the mode into account and act as if it's always 64 bit, but location of sign bit is different: dst_reg->smin_value >>= umin_val; dst_reg->smax_value >>= umin_val; dst_reg->var_off = tnum_arshift(dst_reg->var_off, umin_val); Consider an unknown R0 where bpf_get_socket_cookie() (or others) would for example return 0xffff. With the above ARSH simulation, we'd see the following results: [...] 1: R1=ctx(id=0,off=0,imm=0) R2_w=invP65535 R10=fp0 1: (85) call bpf_get_socket_cookie#46 2: R0_w=invP(id=0) R10=fp0 2: (57) r0 &= 808464432 -> R0_runtime = 0x3030 3: R0_w=invP(id=0,umax_value=808464432,var_off=(0x0; 0x30303030)) R10=fp0 3: (14) w0 -= 810299440 -> R0_runtime = 0xcfb40000 4: R0_w=invP(id=0,umax_value=4294967295,var_off=(0xcf800000; 0x3077fff0)) R10=fp0 (0xffffffff) 4: (c4) w0 s>>= 1 -> R0_runtime = 0xe7da0000 5: R0_w=invP(id=0,umin_value=1740636160,umax_value=2147221496,var_off=(0x67c00000; 0x183bfff8)) R10=fp0 (0x67c00000) (0x7ffbfff8) [...] In insn 3, we have a runtime value of 0xcfb40000, which is '1100 1111 1011 0100 0000 0000 0000 0000', the result after the shift has 0xe7da0000 that is '1110 0111 1101 1010 0000 0000 0000 0000', where the sign bit is correctly retained in 32 bit mode. In insn4, the umax was 0xffffffff, and changed into 0x7ffbfff8 after the shift, that is, '0111 1111 1111 1011 1111 1111 1111 1000' and means here that the simulation didn't retain the sign bit. With above logic, the updates happen on the 64 bit min/max bounds and given we coerced the register, the sign bits of the bounds are cleared as well, meaning, we need to force the simulation into s32 space for 32 bit alu mode. Verification after the fix below. We're first analyzing the fall-through branch on 32 bit signed >= test eventually leading to rejection of the program in this specific case: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r2 = 808464432 1: R1=ctx(id=0,off=0,imm=0) R2_w=invP808464432 R10=fp0 1: (85) call bpf_get_socket_cookie#46 2: R0_w=invP(id=0) R10=fp0 2: (bf) r6 = r0 3: R0_w=invP(id=0) R6_w=invP(id=0) R10=fp0 3: (57) r6 &= 808464432 4: R0_w=invP(id=0) R6_w=invP(id=0,umax_value=808464432,var_off=(0x0; 0x30303030)) R10=fp0 4: (14) w6 -= 810299440 5: R0_w=invP(id=0) R6_w=invP(id=0,umax_value=4294967295,var_off=(0xcf800000; 0x3077fff0)) R10=fp0 5: (c4) w6 s>>= 1 6: R0_w=invP(id=0) R6_w=invP(id=0,umin_value=3888119808,umax_value=4294705144,var_off=(0xe7c00000; 0x183bfff8)) R10=fp0 (0x67c00000) (0xfffbfff8) 6: (76) if w6 s>= 0x30303030 goto pc+216 7: R0_w=invP(id=0) R6_w=invP(id=0,umin_value=3888119808,umax_value=4294705144,var_off=(0xe7c00000; 0x183bfff8)) R10=fp0 7: (30) r0 = *(u8 *)skb[808464432] BPF_LD_[ABS|IND] uses reserved fields processed 8 insns (limit 1000000) [...] Fixes: 9cbe1f5a32dc ("bpf/verifier: improve register value range tracking with ARSH") Reported-by: Anatoly Trosinenko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115204733.16648-1-daniel@iogearbox.net commit 536dc5df2808efbefc5acee334d3c4f701790ec0 Author: Mohammed Gamal Date: Tue Jan 14 15:09:50 2020 +0200 hv_netvsc: Fix memory leak when removing rndis device kmemleak detects the following memory leak when hot removing a network device: unreferenced object 0xffff888083f63600 (size 256): comm "kworker/0:1", pid 12, jiffies 4294831717 (age 1113.676s) hex dump (first 32 bytes): 00 40 c7 33 80 88 ff ff 00 00 00 00 10 00 00 00 .@.3............ 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... backtrace: [<00000000d4a8f5be>] rndis_filter_device_add+0x117/0x11c0 [hv_netvsc] [<000000009c02d75b>] netvsc_probe+0x5e7/0xbf0 [hv_netvsc] [<00000000ddafce23>] vmbus_probe+0x74/0x170 [hv_vmbus] [<00000000046e64f1>] really_probe+0x22f/0xb50 [<000000005cc35eb7>] driver_probe_device+0x25e/0x370 [<0000000043c642b2>] bus_for_each_drv+0x11f/0x1b0 [<000000005e3d09f0>] __device_attach+0x1c6/0x2f0 [<00000000a72c362f>] bus_probe_device+0x1a6/0x260 [<0000000008478399>] device_add+0x10a3/0x18e0 [<00000000cf07b48c>] vmbus_device_register+0xe7/0x1e0 [hv_vmbus] [<00000000d46cf032>] vmbus_add_channel_work+0x8ab/0x1770 [hv_vmbus] [<000000002c94bb64>] process_one_work+0x919/0x17d0 [<0000000096de6781>] worker_thread+0x87/0xb40 [<00000000fbe7397e>] kthread+0x333/0x3f0 [<000000004f844269>] ret_from_fork+0x3a/0x50 rndis_filter_device_add() allocates an instance of struct rndis_device which never gets deallocated as rndis_filter_device_remove() sets net_device->extension which points to the rndis_device struct to NULL, leaving the rndis_device dangling. Since net_device->extension is eventually freed in free_netvsc_device(), we refrain from setting it to NULL inside rndis_filter_device_remove() Signed-off-by: Mohammed Gamal Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller commit e176b1ba476cf36f723cfcc7a9e57f3cb47dec70 Author: Pengcheng Yang Date: Tue Jan 14 17:23:40 2020 +0800 tcp: fix marked lost packets not being retransmitted When the packet pointed to by retransmit_skb_hint is unlinked by ACK, retransmit_skb_hint will be set to NULL in tcp_clean_rtx_queue(). If packet loss is detected at this time, retransmit_skb_hint will be set to point to the current packet loss in tcp_verify_retransmit_hint(), then the packets that were previously marked lost but not retransmitted due to the restriction of cwnd will be skipped and cannot be retransmitted. To fix this, when retransmit_skb_hint is NULL, retransmit_skb_hint can be reset only after all marked lost packets are retransmitted (retrans_out >= lost_out), otherwise we need to traverse from tcp_rtx_queue_head in tcp_xmit_retransmit_queue(). Packetdrill to demonstrate: // Disable RACK and set max_reordering to keep things simple 0 `sysctl -q net.ipv4.tcp_recovery=0` +0 `sysctl -q net.ipv4.tcp_max_reordering=3` // Establish a connection +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0 +.1 < S 0:0(0) win 32792 +0 > S. 0:0(0) ack 1 <...> +.01 < . 1:1(0) ack 1 win 257 +0 accept(3, ..., ...) = 4 // Send 8 data segments +0 write(4, ..., 8000) = 8000 +0 > P. 1:8001(8000) ack 1 // Enter recovery and 1:3001 is marked lost +.01 < . 1:1(0) ack 1 win 257 +0 < . 1:1(0) ack 1 win 257 +0 < . 1:1(0) ack 1 win 257 // Retransmit 1:1001, now retransmit_skb_hint points to 1001:2001 +0 > . 1:1001(1000) ack 1 // 1001:2001 was ACKed causing retransmit_skb_hint to be set to NULL +.01 < . 1:1(0) ack 2001 win 257 // Now retransmit_skb_hint points to 4001:5001 which is now marked lost // BUG: 2001:3001 was not retransmitted +0 > . 2001:3001(1000) ack 1 Signed-off-by: Pengcheng Yang Acked-by: Neal Cardwell Tested-by: Neal Cardwell Signed-off-by: David S. Miller commit 60adcfde92fa40fcb2dbf7cc52f9b096e0cd109a Author: Takashi Iwai Date: Wed Jan 15 21:37:33 2020 +0100 ALSA: seq: Fix racy access for queue timer in proc read snd_seq_info_timer_read() reads the information of the timer assigned for each queue, but it's done in a racy way which may lead to UAF as spotted by syzkaller. This patch applies the missing q->timer_mutex lock while accessing the timer object as well as a slight code change to adapt the standard coding style. Reported-by: syzbot+2b2ef983f973e5c40943@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20200115203733.26530-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f5ae2ea6347a308cfe91f53b53682ce635497d0d Author: Jari Ruusu Date: Sun Jan 12 15:00:53 2020 +0200 Fix built-in early-load Intel microcode alignment Intel Software Developer's Manual, volume 3, chapter 9.11.6 says: "Note that the microcode update must be aligned on a 16-byte boundary and the size of the microcode update must be 1-KByte granular" When early-load Intel microcode is loaded from initramfs, userspace tool 'iucode_tool' has already 16-byte aligned those microcode bits in that initramfs image. Image that was created something like this: iucode_tool --write-earlyfw=FOO.cpio microcode-files... However, when early-load Intel microcode is loaded from built-in firmware BLOB using CONFIG_EXTRA_FIRMWARE= kernel config option, that 16-byte alignment is not guaranteed. Fix this by forcing all built-in firmware BLOBs to 16-byte alignment. [ If we end up having other firmware with much bigger alignment requirements, we might need to introduce some method for the firmware to specify it, this is the minimal "just increase the alignment a bit to account for this one special case" patch - Linus ] Signed-off-by: Jari Ruusu Cc: Borislav Petkov Cc: Fenghua Yu Cc: Luis Chamberlain Cc: stable@kernel.org Signed-off-by: Linus Torvalds commit a4feff2264dfc144060582df8ac461fa47679b91 Merge: 51d69817519f 051d75d3bb31 Author: Linus Torvalds Date: Wed Jan 15 11:33:53 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull arch/nios2 fixlet from Ley Foon Tan: "Update my nios2 maintainer email" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: MAINTAINERS: Update Ley Foon Tan's email address commit e64175776d06a8ceebbfd349d7e66a4a46ca39ef Author: Krzysztof Kozlowski Date: Mon Jan 13 18:29:54 2020 +0100 i2c: iop3xx: Fix memory leak in probe error path When handling devm_gpiod_get_optional() errors, free the memory already allocated. This fixes Smatch warnings: drivers/i2c/busses/i2c-iop3xx.c:437 iop3xx_i2c_probe() warn: possible memory leak of 'new_adapter' drivers/i2c/busses/i2c-iop3xx.c:442 iop3xx_i2c_probe() warn: possible memory leak of 'new_adapter' Fixes: fdb7e884ad61 ("i2c: iop: Use GPIO descriptors") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 51d69817519f5f00041a1a039277f0367d76c82c Merge: 0174cb6ce944 f3efc406d67e Author: Linus Torvalds Date: Wed Jan 15 11:30:50 2020 -0800 Merge tag 'platform-drivers-x86-v5.5-3' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Andy Shevchenko: - Fix keyboard brightness control for ASUS laptops - Better handling parameters of GPD pocket fan module to avoid thermal shock - Add IDs to PMC platform driver to support Intel Comet Lake - Fix potential dead lock in Mellanox TM FIFO driver and ABI documentation * tag 'platform-drivers-x86-v5.5-3' of git://git.infradead.org/linux-platform-drivers-x86: Documentation/ABI: Add missed attribute for mlxreg-io sysfs interfaces Documentation/ABI: Fix documentation inconsistency for mlxreg-io sysfs interfaces platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0 platform/x86: intel_pmc_core: update Comet Lake platform driver platform/x86: GPD pocket fan: Allow somewhat lower/higher temperature limits platform/x86: GPD pocket fan: Use default values when wrong modparams are given platform/mellanox: fix potential deadlock in the tmfifo driver platform/x86: intel-ips: Use the correct style for SPDX License Identifier commit 0174cb6ce9449ce9b59cb9c6f4f64dc4df3de458 Merge: 84bf39461e61 cb1eeb75cf3d Author: Linus Torvalds Date: Wed Jan 15 10:21:34 2020 -0800 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 build problem for the hisilicon driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: hisilicon/sec2 - Use atomics instead of __sync commit 84bf39461e61f69ebfbfecf39cfda71bf78a7fc1 Merge: 95e20af9fb9c 508c8772760d Author: Linus Torvalds Date: Wed Jan 15 09:58:14 2020 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Fixes for mountpoint_last() bugs (by converting to use of lookup_last()) and an autofs regression fix from this cycle (caused by follow_managed() breakage introduced in barrier fixes series)" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix autofs regression caused by follow_managed() changes reimplement path_mountpoint() with less magic commit 24a49678f5e20f18006e71b90ac1531876b27eb1 Author: Dmitry Osipenko Date: Tue Jan 14 04:34:36 2020 +0300 i2c: tegra: Properly disable runtime PM on driver's probe error One of the recent Tegra I2C commits made a change that resumes runtime PM during driver's probe, but it missed to put the RPM in a case of error. Note that it's not correct to use pm_runtime_status_suspended because it breaks RPM refcounting. Fixes: 8ebf15e9c869 ("i2c: tegra: Move suspend handling to NOIRQ phase") Cc: # v5.4+ Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 9f42de8d4ec2304f10bbc51dc0484f3503d61196 Author: Dmitry Osipenko Date: Tue Jan 14 04:34:35 2020 +0300 i2c: tegra: Fix suspending in active runtime PM state I noticed that sometime I2C clock is kept enabled during suspend-resume. This happens because runtime PM defers dynamic suspension and thus it may happen that runtime PM is in active state when system enters into suspend. In particular I2C controller that is used for CPU's DVFS is often kept ON during suspend because CPU's voltage scaling happens quite often. Fixes: 8ebf15e9c869 ("i2c: tegra: Move suspend handling to NOIRQ phase") Cc: # v5.4+ Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 16c731fed6d8e5615e23d2fd59cfe62eb10d9ff4 Author: Damien Le Moal Date: Thu Jan 9 14:03:55 2020 +0900 null_blk: Fix zone write handling null_zone_write() only allows writing empty and implicitly opened zones. Writing to closed and explicitly opened zones must also be allowed and the zone condition must be transitioned to implicit open if the zone is not explicitly opened already. Fixes: da644b2cc1a4 ("null_blk: add zone open, close, and finish support") Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 9fea3a40f6b07de977a2783270c8c3bc82544d45 Author: Ian Abbott Date: Tue Jan 14 18:25:32 2020 +0000 staging: comedi: ni_routes: allow partial routing information This patch fixes a regression on setting up asynchronous commands to use external trigger sources when board-specific routing information is missing. `ni_find_device_routes()` (called via `ni_assign_device_routes()`) finds the table of register values for the device family and the set of valid routes for the specific board. If both are found, `tables->route_values` is set to point to the table of register values for the device family and `tables->valid_routes` is set to point to the list of valid routes for the specific board. If either is not found, both `tables->route_values` and `tables->valid_routes` are left set at their initial null values (initialized by `ni_assign_device_routes()`) and the function returns `-ENODATA`. Returning an error results in some routing functionality being disabled. Unfortunately, leaving `table->route_values` set to `NULL` also breaks the setting up of asynchronous commands that are configured to use external trigger sources. Calls to `ni_check_trigger_arg()` or `ni_check_trigger_arg_roffs()` while checking the asynchronous command set-up would result in a null pointer dereference if `table->route_values` is `NULL`. The null pointer dereference is fixed in another patch, but it now results in failure to set up the asynchronous command. That is a regression from the behavior prior to commit 347e244884c3 ("staging: comedi: tio: implement global tio/ctr routing") and commit 56d0b826d39f ("staging: comedi: ni_mio_common: implement new routing for TRIG_EXT"). Change `ni_find_device_routes()` to set `tables->route_values` and/or `tables->valid_routes` to valid information even if the other one can only be set to `NULL` due to missing information. The function will still return an error in that case. This should result in `tables->valid_routes` being valid for all currently supported device families even if the board-specific routing information is missing. That should be enough to fix the regression on setting up asynchronous commands to use external triggers for boards with missing routing information. Fixes: 347e244884c3 ("staging: comedi: tio: implement global tio/ctr routing") Fixes: 56d0b826d39f ("staging: comedi: ni_mio_common: implement new routing for TRIG_EXT"). Cc: # 4.20+ Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20200114182532.132058-3-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 01e20b664f808a4f3048ca3f930911fd257209bd Author: Ian Abbott Date: Tue Jan 14 18:25:31 2020 +0000 staging: comedi: ni_routes: fix null dereference in ni_find_route_source() In `ni_find_route_source()`, `tables->route_values` gets dereferenced. However it is possible that `tables->route_values` is `NULL`, leading to a null pointer dereference. `tables->route_values` will be `NULL` if the call to `ni_assign_device_routes()` during board initialization returned an error due to missing device family routing information or missing board-specific routing information. For example, there is currently no board-specific routing information provided for the PCIe-6251 board and several other boards, so those are affected by this bug. The bug is triggered when `ni_find_route_source()` is called via `ni_check_trigger_arg()` or `ni_check_trigger_arg_roffs()` when checking the arguments for setting up asynchronous commands. Fix it by returning `-EINVAL` if `tables->route_values` is `NULL`. Even with this fix, setting up asynchronous commands to use external trigger sources for boards with missing routing information will still fail gracefully. Since `ni_find_route_source()` only depends on the device family routing information, it would be better if that was made available even if the board-specific routing information is missing. That will be addressed by another patch. Fixes: 4bb90c87abbe ("staging: comedi: add interface to ni routing table information") Cc: # 4.20+ Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20200114182532.132058-2-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 8b792f84c6377b27235fef16f5e78a59f890b3e1 Merge: eb507906feaa 85005b82e59f Author: David S. Miller Date: Wed Jan 15 04:16:30 2020 -0800 Merge branch 'mlxsw-Various-fixes' Ido Schimmel says: ==================== mlxsw: Various fixes This patch set contains various fixes for mlxsw. Patch #1 splits the init() callback between Spectrum-2 and Spectrum-3 in order to avoid enforcing the same firmware version for both ASICs, as this can't possibly work. Without this patch the driver cannot boot with the Spectrum-3 ASIC. Patches #2-#3 fix a long standing race condition that was recently exposed while testing the driver on an emulator, which is very slow compared to the actual hardware. The problem is explained in detail in the commit messages. Patch #4 fixes a selftest. Patch #5 prevents offloaded qdiscs from presenting a non-zero backlog to the user when the netdev is down. This is done by clearing the cached backlog in the driver when the netdev goes down. Patch #6 fixes qdisc statistics (backlog and tail drops) to also take into account the multicast traffic classes. v2: * Patches #2-#3: use skb_cow_head() instead of skb_unshare() as suggested by Jakub. Remove unnecessary check regarding headroom * Patches #5-#6: new ==================== Signed-off-by: David S. Miller commit 85005b82e59fa7bb7388b12594ab2067bf73d66c Author: Petr Machata Date: Wed Jan 15 13:53:49 2020 +0200 mlxsw: spectrum_qdisc: Include MC TCs in Qdisc counters mlxsw configures Spectrum in such a way that BUM traffic is passed not through its nominal traffic class TC, but through its MC counterpart TC+8. However, when collecting statistics, Qdiscs only look at the nominal TC and ignore the MC TC. Add two helpers to compute the value for logical TC from the constituents, one for backlog, the other for tail drops. Use them throughout instead of going through the xstats pointer directly. Counters for TX bytes and packets are deduced from packet priority counters, and therefore already include BUM traffic. wred_drop counter is irrelevant on MC TCs, because RED is not enabled on them. Fixes: 7b8195306694 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports") Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ca7609ff3680c51d6c29897f3117aa2ad904f92a Author: Petr Machata Date: Wed Jan 15 13:53:48 2020 +0200 mlxsw: spectrum: Wipe xstats.backlog of down ports Per-port counter cache used by Qdiscs is updated periodically, unless the port is down. The fact that the cache is not updated for down ports is no problem for most counters, which are relative in nature. However, backlog is absolute in nature, and if there is a non-zero value in the cache around the time that the port goes down, that value just stays there. This value then leaks to offloaded Qdiscs that report non-zero backlog even if there (obviously) is no traffic. The HW does not keep backlog of a downed port, so do likewise: as the port goes down, wipe the backlog value from xstats. Fixes: 075ab8adaf4e ("mlxsw: spectrum: Collect tclass related stats periodically") Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit fef6d6704944c7be72fd2b77c021f1aed3d5df0d Author: Petr Machata Date: Wed Jan 15 13:53:47 2020 +0200 selftests: mlxsw: qos_mc_aware: Fix mausezahn invocation Mausezahn does not recognize "own" as a keyword on source IP address. As a result, the MC stream is not running at all, and therefore no UC degradation can be observed even in principle. Fix the invocation, and tighten the test: due to the minimum shaper configured at the MC TCs, we always expect about 20% degradation. Fail the test if it is lower. Fixes: 573363a68f27 ("selftests: mlxsw: Add qos_lib.sh") Signed-off-by: Petr Machata Reported-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 63963d0f9d17be83d0e419e03282847ecc2c3715 Author: Ido Schimmel Date: Wed Jan 15 13:53:46 2020 +0200 mlxsw: switchx2: Do not modify cloned SKBs during xmit The driver needs to prepend a Tx header to each packet it is transmitting. The header includes information such as the egress port and traffic class. The addition of the header requires the driver to modify the SKB's header and therefore it must not be shared. Otherwise, we risk hitting various race conditions. For example, when a packet is flooded (cloned) by the bridge driver to two switch ports swp1 and swp2: t0 - mlxsw_sp_port_xmit() is called for swp1. Tx header is prepended with swp1's port number t1 - mlxsw_sp_port_xmit() is called for swp2. Tx header is prepended with swp2's port number, overwriting swp1's port number t2 - The device processes data buffer from t0. Packet is transmitted via swp2 t3 - The device processes data buffer from t1. Packet is transmitted via swp2 Usually, the device is fast enough and transmits the packet before its Tx header is overwritten, but this is not the case in emulated environments. Fix this by making sure the SKB's header is writable by calling skb_cow_head(). Since the function ensures we have headroom to push the Tx header, the check further in the function can be removed. v2: * Use skb_cow_head() instead of skb_unshare() as suggested by Jakub * Remove unnecessary check regarding headroom Fixes: 31557f0f9755 ("mlxsw: Introduce Mellanox SwitchX-2 ASIC support") Signed-off-by: Ido Schimmel Reported-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 2da51ce75d86ab1f7770ac1391a9a1697ddaa60c Author: Ido Schimmel Date: Wed Jan 15 13:53:45 2020 +0200 mlxsw: spectrum: Do not modify cloned SKBs during xmit The driver needs to prepend a Tx header to each packet it is transmitting. The header includes information such as the egress port and traffic class. The addition of the header requires the driver to modify the SKB's header and therefore it must not be shared. Otherwise, we risk hitting various race conditions. For example, when a packet is flooded (cloned) by the bridge driver to two switch ports swp1 and swp2: t0 - mlxsw_sp_port_xmit() is called for swp1. Tx header is prepended with swp1's port number t1 - mlxsw_sp_port_xmit() is called for swp2. Tx header is prepended with swp2's port number, overwriting swp1's port number t2 - The device processes data buffer from t0. Packet is transmitted via swp2 t3 - The device processes data buffer from t1. Packet is transmitted via swp2 Usually, the device is fast enough and transmits the packet before its Tx header is overwritten, but this is not the case in emulated environments. Fix this by making sure the SKB's header is writable by calling skb_cow_head(). Since the function ensures we have headroom to push the Tx header, the check further in the function can be removed. v2: * Use skb_cow_head() instead of skb_unshare() as suggested by Jakub * Remove unnecessary check regarding headroom Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Reported-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit d58c35ca5202edea02d8201f4acd81e06c98f9b4 Author: Ido Schimmel Date: Wed Jan 15 13:53:44 2020 +0200 mlxsw: spectrum: Do not enforce same firmware version for multiple ASICs In commit a72afb6879bb ("mlxsw: Enforce firmware version for Spectrum-2") I added a required firmware version for Spectrum-2, but missed the fact that mlxsw_sp2_init() is used by both Spectrum-2 and Spectrum-3. This means that the same firmware version will be used for both, which is wrong. Fix this by creating a new init() callback for Spectrum-3. Fixes: a72afb6879bb ("mlxsw: Enforce firmware version for Spectrum-2") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Tested-by: Shalom Toledo Signed-off-by: David S. Miller commit 9c06ac4c83df6d6fbdbf7488fbad822b4002ba19 Author: Keiya Nobuta Date: Thu Jan 9 14:14:48 2020 +0900 usb: core: hub: Improved device recognition on remote wakeup If hub_activate() is called before D+ has stabilized after remote wakeup, the following situation might occur: __ ___________________ / \ / D+ __/ \__/ Hub _______________________________ | ^ ^ ^ | | | | Host _____v__|___|___________|______ | | | | | | | \-- Interrupt Transfer (*3) | | \-- ClearPortFeature (*2) | \-- GetPortStatus (*1) \-- Host detects remote wakeup - D+ goes high, Host starts running by remote wakeup - D+ is not stable, goes low - Host requests GetPortStatus at (*1) and gets the following hub status: - Current Connect Status bit is 0 - Connect Status Change bit is 1 - D+ stabilizes, goes high - Host requests ClearPortFeature and thus Connect Status Change bit is cleared at (*2) - After waiting 100 ms, Host starts the Interrupt Transfer at (*3) - Since the Connect Status Change bit is 0, Hub returns NAK. In this case, port_event() is not called in hub_event() and Host cannot recognize device. To solve this issue, flag change_bits even if only Connect Status Change bit is 1 when got in the first GetPortStatus. This issue occurs rarely because it only if D+ changes during a very short time between GetPortStatus and ClearPortFeature. However, it is fatal if it occurs in embedded system. Signed-off-by: Keiya Nobuta Cc: stable Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200109051448.28150-1-nobuta.keiya@fujitsu.com Signed-off-by: Greg Kroah-Hartman commit eb507906feaaf827395e5f96f2320e0c7731e4ff Merge: 8c4df83fbe60 81c044fc3bdc Author: David S. Miller Date: Wed Jan 15 04:12:00 2020 -0800 Merge tag 'mac80211-for-net-2020-01-15' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A few fixes: * -O3 enablement fallout, thanks to Arnd who ran this * fixes for a few leaks, thanks to Felix * channel 12 regulatory fix for custom regdomains * check for a crash reported by syzbot (NULL function is called on drivers that don't have it) * fix TKIP replay protection after setup with some APs (from Jouni) * restrict obtaining some mesh data to avoid WARN_ONs * fix deadlocks with auto-disconnect (socket owner) * fix radar detection events with multiple devices ==================== Signed-off-by: David S. Miller commit 4e4362d2bf2a49ff44dbbc9585207977ca3d71d0 Author: Ulrich Weber Date: Wed Jan 15 12:11:29 2020 +0100 xfrm: support output_mark for offload ESP packets Commit 9b42c1f179a6 ("xfrm: Extend the output_mark") added output_mark support but missed ESP offload support. xfrm_smark_get() is not called within xfrm_input() for packets coming from esp4_gro_receive() or esp6_gro_receive(). Therefore call xfrm_smark_get() directly within these functions. Fixes: 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.") Signed-off-by: Ulrich Weber Signed-off-by: Steffen Klassert commit 978370956d2046b19313659ce65ed12d5b996626 Author: Chuansheng Liu Date: Tue Jan 7 00:41:16 2020 +0000 x86/mce/therm_throt: Do not access uninitialized therm_work It is relatively easy to trigger the following boot splat on an Ice Lake client platform. The call stack is like: kernel BUG at kernel/timer/timer.c:1152! Call Trace: __queue_delayed_work queue_delayed_work_on therm_throt_process intel_thermal_interrupt ... The reason is that a CPU's thermal interrupt is enabled prior to executing its hotplug onlining callback which will initialize the throttling workqueues. Such a race can lead to therm_throt_process() accessing an uninitialized therm_work, leading to the above BUG at a very early bootup stage. Therefore, unmask the thermal interrupt vector only after having setup the workqueues completely. [ bp: Heavily massage commit message and correct comment formatting. ] Fixes: f6656208f04e ("x86/mce/therm_throt: Optimize notifications of thermal throttle") Signed-off-by: Chuansheng Liu Signed-off-by: Borislav Petkov Acked-by: Tony Luck Link: https://lkml.kernel.org/r/20200107004116.59353-1-chuansheng.liu@intel.com commit a564ac35d60564dd5b509e32afdc04e7aafee40e Author: Kevin Hao Date: Tue Jan 14 16:28:18 2020 +0800 Revert "gpio: thunderx: Switch to GPIOLIB_IRQCHIP" This reverts commit a7fc89f9d5fcc10a5474cfe555f5a9e5df8b0f1f because there are some bugs in this commit, and we don't have a simple way to fix these bugs. So revert this commit to make the thunderx gpio work on the stable kernel at least. We will switch to GPIOLIB_IRQCHIP for thunderx gpio by following patches. Fixes: a7fc89f9d5fc ("gpio: thunderx: Switch to GPIOLIB_IRQCHIP") Signed-off-by: Kevin Hao Link: https://lore.kernel.org/r/20200114082821.14015-2-haokexin@gmail.com Signed-off-by: Linus Walleij commit de95a991bb72e009f47e0c4bbc90fc5f594588d5 Author: Eric Dumazet Date: Wed Dec 4 20:56:19 2019 -0800 tick/sched: Annotate lockless access to last_jiffies_update syzbot (KCSAN) reported a data-race in tick_do_update_jiffies64(): BUG: KCSAN: data-race in tick_do_update_jiffies64 / tick_do_update_jiffies64 write to 0xffffffff8603d008 of 8 bytes by interrupt on cpu 1: tick_do_update_jiffies64+0x100/0x250 kernel/time/tick-sched.c:73 tick_sched_do_timer+0xd4/0xe0 kernel/time/tick-sched.c:138 tick_sched_timer+0x43/0xe0 kernel/time/tick-sched.c:1292 __run_hrtimer kernel/time/hrtimer.c:1514 [inline] __hrtimer_run_queues+0x274/0x5f0 kernel/time/hrtimer.c:1576 hrtimer_interrupt+0x22a/0x480 kernel/time/hrtimer.c:1638 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1110 [inline] smp_apic_timer_interrupt+0xdc/0x280 arch/x86/kernel/apic/apic.c:1135 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 arch_local_irq_restore arch/x86/include/asm/paravirt.h:756 [inline] kcsan_setup_watchpoint+0x1d4/0x460 kernel/kcsan/core.c:436 check_access kernel/kcsan/core.c:466 [inline] __tsan_read1 kernel/kcsan/core.c:593 [inline] __tsan_read1+0xc2/0x100 kernel/kcsan/core.c:593 kallsyms_expand_symbol.constprop.0+0x70/0x160 kernel/kallsyms.c:79 kallsyms_lookup_name+0x7f/0x120 kernel/kallsyms.c:170 insert_report_filterlist kernel/kcsan/debugfs.c:155 [inline] debugfs_write+0x14b/0x2d0 kernel/kcsan/debugfs.c:256 full_proxy_write+0xbd/0x100 fs/debugfs/file.c:225 __vfs_write+0x67/0xc0 fs/read_write.c:494 vfs_write fs/read_write.c:558 [inline] vfs_write+0x18a/0x390 fs/read_write.c:542 ksys_write+0xd5/0x1b0 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x4c/0x60 fs/read_write.c:620 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffffffff8603d008 of 8 bytes by task 0 on cpu 0: tick_do_update_jiffies64+0x2b/0x250 kernel/time/tick-sched.c:62 tick_nohz_update_jiffies kernel/time/tick-sched.c:505 [inline] tick_nohz_irq_enter kernel/time/tick-sched.c:1257 [inline] tick_irq_enter+0x139/0x1c0 kernel/time/tick-sched.c:1274 irq_enter+0x4f/0x60 kernel/softirq.c:354 entering_irq arch/x86/include/asm/apic.h:517 [inline] entering_ack_irq arch/x86/include/asm/apic.h:523 [inline] smp_apic_timer_interrupt+0x55/0x280 arch/x86/kernel/apic/apic.c:1133 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:571 default_idle_call+0x1e/0x40 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x1af/0x280 kernel/sched/idle.c:263 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:355 rest_init+0xec/0xf6 init/main.c:452 arch_call_rest_init+0x17/0x37 start_kernel+0x838/0x85e init/main.c:786 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:490 x86_64_start_kernel+0x72/0x76 arch/x86/kernel/head64.c:471 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.0-rc7+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Use READ_ONCE() and WRITE_ONCE() to annotate this expected race. Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191205045619.204946-1-edumazet@google.com commit 81c044fc3bdc5b7be967cd3682528ea94b58c06a Author: Felix Fietkau Date: Mon Jan 13 19:21:07 2020 +0100 cfg80211: fix page refcount issue in A-MSDU decap The fragments attached to a skb can be part of a compound page. In that case, page_ref_inc will increment the refcount for the wrong page. Fix this by using get_page instead, which calls page_ref_inc on the compound head and also checks for overflow. Fixes: 2b67f944f88c ("cfg80211: reuse existing page fragments in A-MSDU rx") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200113182107.20461-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 24953de0a5e31dcca7e82c8a3c79abc2dfe8fb6e Author: Johannes Berg Date: Mon Jan 13 12:53:59 2020 +0100 cfg80211: check for set_wiphy_params Check if set_wiphy_params is assigned and return an error if not, some drivers (e.g. virt_wifi where syzbot reported it) don't have it. Reported-by: syzbot+e8a797964a4180eb57d5@syzkaller.appspotmail.com Reported-by: syzbot+34b582cf32c1db008f8e@syzkaller.appspotmail.com Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200113125358.ac07f276efff.Ibd85ee1b12e47b9efb00a2adc5cd3fac50da791a@changeid Signed-off-by: Johannes Berg commit df16737d438f534d0cc9948c7c5158f1986c5c87 Author: Felix Fietkau Date: Wed Jan 8 18:06:30 2020 +0100 cfg80211: fix memory leak in cfg80211_cqm_rssi_update The per-tid statistics need to be released after the call to rdev_get_station Cc: stable@vger.kernel.org Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200108170630.33680-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 2a279b34169e9bbf7c240691466420aba75b4175 Author: Felix Fietkau Date: Wed Jan 8 18:06:29 2020 +0100 cfg80211: fix memory leak in nl80211_probe_mesh_link The per-tid statistics need to be released after the call to rdev_get_station Cc: stable@vger.kernel.org Fixes: 5ab92e7fe49a ("cfg80211: add support to probe unexercised mesh link") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200108170630.33680-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 5a128a088a2ab0b5190eeb232b5aa0b1017a0317 Author: Markus Theil Date: Wed Jan 8 12:55:36 2020 +0100 cfg80211: fix deadlocks in autodisconnect work Use methods which do not try to acquire the wdev lock themselves. Cc: stable@vger.kernel.org Fixes: 37b1c004685a3 ("cfg80211: Support all iftypes in autodisconnect_wk") Signed-off-by: Markus Theil Link: https://lore.kernel.org/r/20200108115536.2262-1-markus.theil@tu-ilmenau.de Signed-off-by: Johannes Berg commit e16119655c9e6c4aa5767cd971baa9c491f41b13 Author: Arnd Bergmann Date: Tue Jan 7 21:07:35 2020 +0100 wireless: wext: avoid gcc -O3 warning After the introduction of CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3, the wext code produces a bogus warning: In function 'iw_handler_get_iwstats', inlined from 'ioctl_standard_call' at net/wireless/wext-core.c:1015:9, inlined from 'wireless_process_ioctl' at net/wireless/wext-core.c:935:10, inlined from 'wext_ioctl_dispatch.part.8' at net/wireless/wext-core.c:986:8, inlined from 'wext_handle_ioctl': net/wireless/wext-core.c:671:3: error: argument 1 null where non-null expected [-Werror=nonnull] memcpy(extra, stats, sizeof(struct iw_statistics)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/x86/include/asm/string.h:5, net/wireless/wext-core.c: In function 'wext_handle_ioctl': arch/x86/include/asm/string_64.h:14:14: note: in a call to function 'memcpy' declared here The problem is that ioctl_standard_call() sometimes calls the handler with a NULL argument that would cause a problem for iw_handler_get_iwstats. However, iw_handler_get_iwstats never actually gets called that way. Marking that function as noinline avoids the warning and leads to slightly smaller object code as well. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200107200741.3588770-1-arnd@arndb.de Signed-off-by: Johannes Berg commit 6f601265215a421f425ba3a4850a35861d024643 Author: Jouni Malinen Date: Tue Jan 7 17:35:45 2020 +0200 mac80211: Fix TKIP replay protection immediately after key setup TKIP replay protection was skipped for the very first frame received after a new key is configured. While this is potentially needed to avoid dropping a frame in some cases, this does leave a window for replay attacks with group-addressed frames at the station side. Any earlier frame sent by the AP using the same key would be accepted as a valid frame and the internal RSC would then be updated to the TSC from that frame. This would allow multiple previously transmitted group-addressed frames to be replayed until the next valid new group-addressed frame from the AP is received by the station. Fix this by limiting the no-replay-protection exception to apply only for the case where TSC=0, i.e., when this is for the very first frame protected using the new key, and the local RSC had not been set to a higher value when configuring the key (which may happen with GTK). Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20200107153545.10934-1-j@w1.fi Signed-off-by: Johannes Berg commit 26ec17a1dc5ecdd8d91aba63ead6f8b5ad5dea0d Author: Orr Mazor Date: Sun Dec 22 14:55:31 2019 +0000 cfg80211: Fix radar event during another phy CAC In case a radar event of CAC_FINISHED or RADAR_DETECTED happens during another phy is during CAC we might need to cancel that CAC. If we got a radar in a channel that another phy is now doing CAC on then the CAC should be canceled there. If, for example, 2 phys doing CAC on the same channels, or on comptable channels, once on of them will finish his CAC the other might need to cancel his CAC, since it is no longer relevant. To fix that the commit adds an callback and implement it in mac80211 to end CAC. This commit also adds a call to said callback if after a radar event we see the CAC is no longer relevant Signed-off-by: Orr Mazor Reviewed-by: Sergey Matyukevich Link: https://lore.kernel.org/r/20191222145449.15792-1-Orr.Mazor@tandemg.com [slightly reformat/reword commit message] Signed-off-by: Johannes Berg commit c4b9d655e445a8be0bff624aedea190606b5ebbc Author: Ganapathi Bhat Date: Fri Dec 20 10:14:32 2019 +0000 wireless: fix enabling channel 12 for custom regulatory domain Commit e33e2241e272 ("Revert "cfg80211: Use 5MHz bandwidth by default when checking usable channels"") fixed a broken regulatory (leaving channel 12 open for AP where not permitted). Apply a similar fix to custom regulatory domain processing. Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Link: https://lore.kernel.org/r/1576836859-8945-1-git-send-email-ganapathi.bhat@nxp.com [reword commit message, fix coding style, add a comment] Signed-off-by: Johannes Berg commit 508c8772760d4ef9c1a044519b564710c3684fc5 Author: Al Viro Date: Tue Jan 14 22:09:57 2020 -0500 fix autofs regression caused by follow_managed() changes we need to reload ->d_flags after the call of ->d_manage() - the thing might've been called with dentry still negative and have the damn thing turned positive while we'd waited. Fixes: d41efb522e90 "fs/namei.c: pull positivity check into follow_managed()" Reported-by: Ian Kent Tested-by: Ian Kent Signed-off-by: Al Viro commit c64cd6e34ea340adbb2a0a2f99cc884b96dcdca5 Author: Al Viro Date: Fri Jan 10 17:17:19 2020 -0500 reimplement path_mountpoint() with less magic ... and get rid of a bunch of bugs in it. Background: the reason for path_mountpoint() is that umount() really doesn't want attempts to revalidate the root of what it's trying to umount. The thing we want to avoid actually happen from complete_walk(); solution was to do something parallel to normal path_lookupat() and it both went overboard and got the boilerplate subtly (and not so subtly) wrong. A better solution is to do pretty much what the normal path_lookupat() does, but instead of complete_walk() do unlazy_walk(). All it takes to avoid that ->d_weak_revalidate() call... mountpoint_last() goes away, along with everything it got wrong, and so does the magic around LOOKUP_NO_REVAL. Another source of bugs is that when we traverse mounts at the final location (and we need to do that - umount . expects to get whatever's overmounting ., if any, out of the lookup) we really ought to take care of ->d_manage() - as it is, manual umount of autofs automount in progress can lead to unpleasant surprises for the daemon. Easily solved by using handle_lookup_down() instead of follow_mount(). Tested-by: Ian Kent Signed-off-by: Al Viro commit 78912934f4f7dd7a424159c69bf9bdd46e823781 Author: Jens Axboe Date: Tue Jan 14 22:09:06 2020 -0700 io_uring: be consistent in assigning next work from handler If we pass back dependent work in case of links, we need to always ensure that we call the link setup and work prep handler. If not, we might be missing some setup for the next work item. Signed-off-by: Jens Axboe commit e0bbb3461ae000baec13e8ec5b5063202df228df Author: Jens Axboe Date: Tue Jan 14 22:06:11 2020 -0700 io-wq: cancel work if we fail getting a mm reference If we require mm and user context, mark the request for cancellation if we fail to acquire the desired mm. Signed-off-by: Jens Axboe commit 051d75d3bb31d456a41c7dc8cf2b8bd23a96774f Author: Ley Foon Tan Date: Wed Jan 15 09:33:06 2020 +0800 MAINTAINERS: Update Ley Foon Tan's email address @altera.com email is going to removed. Change to @intel.com email. Signed-off-by: Ley Foon Tan commit 8c4df83fbe60787033c89efbae7b5b9c76e7bb60 Author: Lorenzo Bianconi Date: Tue Jan 14 11:21:16 2020 +0100 net: mvneta: fix dma sync size in mvneta_run_xdp Page pool API will start syncing (if requested) starting from page->dma_addr + pool->p.offset. Fix dma sync length in mvneta_run_xdp since we do not need to account xdp headroom Fixes: 07e13edbb6a6 ("net: mvneta: get rid of huge dma sync in mvneta_rx_refill") Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 86f3f4cd53707ceeec079b83205c8d3c756eca93 Author: Johan Hovold Date: Tue Jan 14 09:27:29 2020 +0100 r8152: add missing endpoint sanity check Add missing endpoint sanity check to probe in order to prevent a NULL-pointer dereference (or slab out-of-bounds access) when retrieving the interrupt-endpoint bInterval on ndo_open() in case a device lacks the expected endpoints. Fixes: 40a82917b1d3 ("net/usb/r8152: enable interrupt transfer") Cc: hayeswang Signed-off-by: Johan Hovold Signed-off-by: David S. Miller commit aeed8aa3874dc15b9d82a6fe796fd7cfbb684448 Author: Masami Hiramatsu Date: Fri Dec 20 11:31:43 2019 +0900 tracing: trigger: Replace unneeded RCU-list traversals With CONFIG_PROVE_RCU_LIST, I had many suspicious RCU warnings when I ran ftracetest trigger testcases. ----- # dmesg -c > /dev/null # ./ftracetest test.d/trigger ... # dmesg | grep "RCU-list traversed" | cut -f 2 -d ] | cut -f 2 -d " " kernel/trace/trace_events_hist.c:6070 kernel/trace/trace_events_hist.c:1760 kernel/trace/trace_events_hist.c:5911 kernel/trace/trace_events_trigger.c:504 kernel/trace/trace_events_hist.c:1810 kernel/trace/trace_events_hist.c:3158 kernel/trace/trace_events_hist.c:3105 kernel/trace/trace_events_hist.c:5518 kernel/trace/trace_events_hist.c:5998 kernel/trace/trace_events_hist.c:6019 kernel/trace/trace_events_hist.c:6044 kernel/trace/trace_events_trigger.c:1500 kernel/trace/trace_events_trigger.c:1540 kernel/trace/trace_events_trigger.c:539 kernel/trace/trace_events_trigger.c:584 ----- I investigated those warnings and found that the RCU-list traversals in event trigger and hist didn't need to use RCU version because those were called only under event_mutex. I also checked other RCU-list traversals related to event trigger list, and found that most of them were called from event_hist_trigger_func() or hist_unregister_trigger() or register/unregister functions except for a few cases. Replace these unneeded RCU-list traversals with normal list traversal macro and lockdep_assert_held() to check the event_mutex is held. Link: http://lkml.kernel.org/r/157680910305.11685.15110237954275915782.stgit@devnote2 Cc: stable@vger.kernel.org Fixes: 30350d65ac567 ("tracing: Add variable support to hist triggers") Reviewed-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 95e20af9fb9ce572129b930967dcb762a318c588 Merge: 452424cdcbca 671c450b6fe0 Author: Linus Torvalds Date: Tue Jan 14 13:33:14 2020 -0800 Merge tag 'nfs-for-5.5-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client bugfixes from Anna Schumaker: "Three NFS over RDMA fixes for bugs Chuck found that can be hit during device removal: - Fix create_qp crash on device unload - Fix completion wait during device removal - Fix oops in receive handler after device removal" * tag 'nfs-for-5.5-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: xprtrdma: Fix oops in Receive handler after device removal xprtrdma: Fix completion wait during device removal xprtrdma: Fix create_qp crash on device unload commit 99c9a923e97a583a38050baa92c9377d73946330 Author: Masami Hiramatsu Date: Fri Jan 10 10:45:39 2020 +0900 tracing/uprobe: Fix double perf_event linking on multiprobe uprobe Fix double perf_event linking to trace_uprobe_filter on multiple uprobe event by moving trace_uprobe_filter under trace_probe_event. In uprobe perf event, trace_uprobe_filter data structure is managing target mm filters (in perf_event) related to each uprobe event. Since commit 60d53e2c3b75 ("tracing/probe: Split trace_event related data from trace_probe") left the trace_uprobe_filter data structure in trace_uprobe, if a trace_probe_event has multiple trace_uprobe (multi-probe event), a perf_event is added to different trace_uprobe_filter on each trace_uprobe. This leads a linked list corruption. To fix this issue, move trace_uprobe_filter to trace_probe_event and link it once on each event instead of each probe. Link: http://lkml.kernel.org/r/157862073931.1800.3800576241181489174.stgit@devnote2 Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Ingo Molnar Cc: "Naveen N . Rao" Cc: Anil S Keshavamurthy Cc: "David S . Miller" Cc: Namhyung Kim Cc: =?utf-8?q?Toke_H=C3=B8iland-J?= =?utf-8?b?w7hyZ2Vuc2Vu?= Cc: Jean-Tsung Hsiao Cc: Jesper Dangaard Brouer Cc: stable@vger.kernel.org Fixes: 60d53e2c3b75 ("tracing/probe: Split trace_event related data from trace_probe") Link: https://lkml.kernel.org/r/20200108171611.GA8472@kernel.org Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit d0695e2351102affd8efae83989056bc4b275917 Author: Changbin Du Date: Sun Jan 12 11:42:31 2020 +0800 tracing: xen: Ordered comparison of function pointers Just as commit 0566e40ce7 ("tracing: initcall: Ordered comparison of function pointers"), this patch fixes another remaining one in xen.h found by clang-9. In file included from arch/x86/xen/trace.c:21: In file included from ./include/trace/events/xen.h:475: In file included from ./include/trace/define_trace.h:102: In file included from ./include/trace/trace_events.h:473: ./include/trace/events/xen.h:69:7: warning: ordered comparison of function \ pointers ('xen_mc_callback_fn_t' (aka 'void (*)(void *)') and 'xen_mc_callback_fn_t') [-Wordered-compare-function-pointers] __field(xen_mc_callback_fn_t, fn) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/trace/trace_events.h:421:29: note: expanded from macro '__field' ^ ./include/trace/trace_events.h:407:6: note: expanded from macro '__field_ext' is_signed_type(type), filter_type); \ ^ ./include/linux/trace_events.h:554:44: note: expanded from macro 'is_signed_type' ^ Fixes: c796f213a6934 ("xen/trace: add multicall tracing") Signed-off-by: Changbin Du Signed-off-by: Steven Rostedt (VMware) commit 4a2f704eb2d831a2d73d7f4cdd54f45c49c3c353 Author: Ming Lei Date: Sat Jan 11 20:57:43 2020 +0800 block: fix get_max_segment_size() overflow on 32bit arch Commit 429120f3df2d starts to take account of segment's start dma address when computing max segment size, and data type of 'unsigned long' is used to do that. However, the segment mask may be 0xffffffff, so the figured out segment size may be overflowed in case of zero physical address on 32bit arch. Fix the issue by returning queue_max_segment_size() directly when that happens. Fixes: 429120f3df2d ("block: fix splitting segments on boundary masks") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Cc: Christoph Hellwig Tested-by: Steven Rostedt (VMware) Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit c742c59e1fbd022b64d91aa9a0092b3a699d653c Author: Sunil Muthuswamy Date: Tue Jan 14 00:52:14 2020 +0000 hv_sock: Remove the accept port restriction Currently, hv_sock restricts the port the guest socket can accept connections on. hv_sock divides the socket port namespace into two parts for server side (listening socket), 0-0x7FFFFFFF & 0x80000000-0xFFFFFFFF (there are no restrictions on client port namespace). The first part (0-0x7FFFFFFF) is reserved for sockets where connections can be accepted. The second part (0x80000000-0xFFFFFFFF) is reserved for allocating ports for the peer (host) socket, once a connection is accepted. This reservation of the port namespace is specific to hv_sock and not known by the generic vsock library (ex: af_vsock). This is problematic because auto-binds/ephemeral ports are handled by the generic vsock library and it has no knowledge of this port reservation and could allocate a port that is not compatible with hv_sock (and legitimately so). The issue hasn't surfaced so far because the auto-bind code of vsock (__vsock_bind_stream) prior to the change 'VSOCK: bind to random port for VMADDR_PORT_ANY' would start walking up from LAST_RESERVED_PORT (1023) and start assigning ports. That will take a large number of iterations to hit 0x7FFFFFFF. But, after the above change to randomize port selection, the issue has started coming up more frequently. There has really been no good reason to have this port reservation logic in hv_sock from the get go. Reserving a local port for peer ports is not how things are handled generally. Peer ports should reflect the peer port. This fixes the issue by lifting the port reservation, and also returns the right peer port. Since the code converts the GUID to the peer port (by using the first 4 bytes), there is a possibility of conflicts, but that seems like a reasonable risk to take, given this is limited to vsock and that only applies to all local sockets. Signed-off-by: Sunil Muthuswamy Signed-off-by: David S. Miller commit f8d7408a4d7f60f8b2df0f81decdc882dd9c20dc Author: Eric Dumazet Date: Mon Jan 13 09:27:11 2020 -0800 net: usb: lan78xx: limit size of local TSO packets lan78xx_tx_bh() makes sure to not exceed MAX_SINGLE_PACKET_SIZE bytes in the aggregated packets it builds, but does nothing to prevent large GSO packets being submitted. Pierre-Francois reported various hangs when/if TSO is enabled. For localy generated packets, we can use netif_set_gso_max_size() to limit the size of TSO packets. Note that forwarded packets could still hit the issue, so a complete fix might require implementing .ndo_features_check for this driver, forcing a software segmentation if the size of the TSO packet exceeds MAX_SINGLE_PACKET_SIZE. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Eric Dumazet Reported-by: RENARD Pierre-Francois Tested-by: RENARD Pierre-Francois Cc: Stefan Wahren Cc: Woojung Huh Cc: Microchip Linux Driver Support Signed-off-by: David S. Miller commit 75718584cb3c64e6269109d4d54f888ac5a5fd15 Author: Vladis Dronov Date: Mon Jan 13 14:00:09 2020 +0100 ptp: free ptp device pin descriptors properly There is a bug in ptp_clock_unregister(), where ptp_cleanup_pin_groups() first frees ptp->pin_{,dev_}attr, but then posix_clock_unregister() needs them to destroy a related sysfs device. These functions can not be just swapped, as posix_clock_unregister() frees ptp which is needed in the ptp_cleanup_pin_groups(). Fix this by calling ptp_cleanup_pin_groups() in ptp_clock_release(), right before ptp is freed. This makes this patch fix an UAF bug in a patch which fixes an UAF bug. Reported-by: Antti Laakso Fixes: a33121e5487b ("ptp: fix the race between the release of ptp_clock and cdev") Link: https://lore.kernel.org/netdev/3d2bd09735dbdaf003585ca376b7c1e5b69a19bd.camel@intel.com/ Signed-off-by: Vladis Dronov Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 7617e9621bf2ca3bb58d5f216cc35c86b029105d Author: Wayne Lin Date: Mon Jan 6 18:21:58 2020 +0800 drm/dp_mst: clear time slots for ports invalid [Why] When change the connection status in a MST topology, mst device which detect the event will send out CONNECTION_STATUS_NOTIFY messgae. e.g. src-mst-mst-sst => src-mst (unplug) mst-sst Currently, under the above case of unplugging device, ports which have been allocated payloads and are no longer in the topology still occupy time slots and recorded in proposed_vcpi[] of topology manager. If we don't clean up the proposed_vcpi[], when code flow goes to try to update payload table by calling drm_dp_update_payload_part1(), we will fail at checking port validation due to there are ports with proposed time slots but no longer in the mst topology. As the result of that, we will also stop updating the DPCD payload table of down stream port. [How] While handling the CONNECTION_STATUS_NOTIFY message, add a detection to see if the event indicates that a device is unplugged to an output port. If the detection is true, then iterrate over all proposed_vcpi[] to see whether a port of the proposed_vcpi[] is still in the topology or not. If the port is invalid, set its num_slots to 0. Thereafter, when try to update payload table by calling drm_dp_update_payload_part1(), we can successfully update the DPCD payload table of down stream port and clear the proposed_vcpi[] to NULL. Changes since v1:(https://patchwork.kernel.org/patch/11275801/) * Invert the conditional to reduce the indenting Reviewed-by: Lyude Paul Signed-off-by: Wayne Lin Signed-off-by: Lyude Paul [removed cc for stable - there's too many patches this depends on for this to backport cleanly] Link: https://patchwork.freedesktop.org/patch/msgid/20200106102158.28261-1-Wayne.Lin@amd.com commit 671c450b6fe0680ea1cb1cf1526d764fdd5a3d3f Author: Chuck Lever Date: Fri Jan 3 11:52:22 2020 -0500 xprtrdma: Fix oops in Receive handler after device removal Since v5.4, a device removal occasionally triggered this oops: Dec 2 17:13:53 manet kernel: BUG: unable to handle page fault for address: 0000000c00000219 Dec 2 17:13:53 manet kernel: #PF: supervisor read access in kernel mode Dec 2 17:13:53 manet kernel: #PF: error_code(0x0000) - not-present page Dec 2 17:13:53 manet kernel: PGD 0 P4D 0 Dec 2 17:13:53 manet kernel: Oops: 0000 [#1] SMP Dec 2 17:13:53 manet kernel: CPU: 2 PID: 468 Comm: kworker/2:1H Tainted: G W 5.4.0-00050-g53717e43af61 #883 Dec 2 17:13:53 manet kernel: Hardware name: Supermicro SYS-6028R-T/X10DRi, BIOS 1.1a 10/16/2015 Dec 2 17:13:53 manet kernel: Workqueue: ib-comp-wq ib_cq_poll_work [ib_core] Dec 2 17:13:53 manet kernel: RIP: 0010:rpcrdma_wc_receive+0x7c/0xf6 [rpcrdma] Dec 2 17:13:53 manet kernel: Code: 6d 8b 43 14 89 c1 89 45 78 48 89 4d 40 8b 43 2c 89 45 14 8b 43 20 89 45 18 48 8b 45 20 8b 53 14 48 8b 30 48 8b 40 10 48 8b 38 <48> 8b 87 18 02 00 00 48 85 c0 75 18 48 8b 05 1e 24 c4 e1 48 85 c0 Dec 2 17:13:53 manet kernel: RSP: 0018:ffffc900035dfe00 EFLAGS: 00010246 Dec 2 17:13:53 manet kernel: RAX: ffff888467290000 RBX: ffff88846c638400 RCX: 0000000000000048 Dec 2 17:13:53 manet kernel: RDX: 0000000000000048 RSI: 00000000f942e000 RDI: 0000000c00000001 Dec 2 17:13:53 manet kernel: RBP: ffff888467611b00 R08: ffff888464e4a3c4 R09: 0000000000000000 Dec 2 17:13:53 manet kernel: R10: ffffc900035dfc88 R11: fefefefefefefeff R12: ffff888865af4428 Dec 2 17:13:53 manet kernel: R13: ffff888466023000 R14: ffff88846c63f000 R15: 0000000000000010 Dec 2 17:13:53 manet kernel: FS: 0000000000000000(0000) GS:ffff88846fa80000(0000) knlGS:0000000000000000 Dec 2 17:13:53 manet kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Dec 2 17:13:53 manet kernel: CR2: 0000000c00000219 CR3: 0000000002009002 CR4: 00000000001606e0 Dec 2 17:13:53 manet kernel: Call Trace: Dec 2 17:13:53 manet kernel: __ib_process_cq+0x5c/0x14e [ib_core] Dec 2 17:13:53 manet kernel: ib_cq_poll_work+0x26/0x70 [ib_core] Dec 2 17:13:53 manet kernel: process_one_work+0x19d/0x2cd Dec 2 17:13:53 manet kernel: ? cancel_delayed_work_sync+0xf/0xf Dec 2 17:13:53 manet kernel: worker_thread+0x1a6/0x25a Dec 2 17:13:53 manet kernel: ? cancel_delayed_work_sync+0xf/0xf Dec 2 17:13:53 manet kernel: kthread+0xf4/0xf9 Dec 2 17:13:53 manet kernel: ? kthread_queue_delayed_work+0x74/0x74 Dec 2 17:13:53 manet kernel: ret_from_fork+0x24/0x30 The proximal cause is that this rpcrdma_rep has a rr_rdmabuf that is still pointing to the old ib_device, which has been freed. The only way that is possible is if this rpcrdma_rep was not destroyed by rpcrdma_ia_remove. Debugging showed that was indeed the case: this rpcrdma_rep was still in use by a completing RPC at the time of the device removal, and thus wasn't on the rep free list. So, it was not found by rpcrdma_reps_destroy(). The fix is to introduce a list of all rpcrdma_reps so that they all can be found when a device is removed. That list is used to perform only regbuf DMA unmapping, replacing that call to rpcrdma_reps_destroy(). Meanwhile, to prevent corruption of this list, I've moved the destruction of temp rpcrdma_rep objects to rpcrdma_post_recvs(). rpcrdma_xprt_drain() ensures that post_recvs (and thus rep_destroy) is not invoked while rpcrdma_reps_unmap is walking rb_all_reps, thus protecting the rb_all_reps list. Fixes: b0b227f071a0 ("xprtrdma: Use an llist to manage free rpcrdma_reps") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 13cb886c591f341a8759f175292ddf978ef903a1 Author: Chuck Lever Date: Fri Jan 3 11:52:17 2020 -0500 xprtrdma: Fix completion wait during device removal I've found that on occasion, "rmmod " will hang while if an NFS is under load. Ensure that ri_remove_done is initialized only just before the transport is woken up to force a close. This avoids the completion possibly getting initialized again while the CM event handler is waiting for a wake-up. Fixes: bebd031866ca ("xprtrdma: Support unplugging an HCA from under an NFS mount") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit b32b9ed493f938e191f790a0991d20b18b38c35b Author: Chuck Lever Date: Fri Jan 3 11:52:12 2020 -0500 xprtrdma: Fix create_qp crash on device unload On device re-insertion, the RDMA device driver crashes trying to set up a new QP: Nov 27 16:32:06 manet kernel: BUG: kernel NULL pointer dereference, address: 00000000000001c0 Nov 27 16:32:06 manet kernel: #PF: supervisor write access in kernel mode Nov 27 16:32:06 manet kernel: #PF: error_code(0x0002) - not-present page Nov 27 16:32:06 manet kernel: PGD 0 P4D 0 Nov 27 16:32:06 manet kernel: Oops: 0002 [#1] SMP Nov 27 16:32:06 manet kernel: CPU: 1 PID: 345 Comm: kworker/u28:0 Tainted: G W 5.4.0 #852 Nov 27 16:32:06 manet kernel: Hardware name: Supermicro SYS-6028R-T/X10DRi, BIOS 1.1a 10/16/2015 Nov 27 16:32:06 manet kernel: Workqueue: xprtiod xprt_rdma_connect_worker [rpcrdma] Nov 27 16:32:06 manet kernel: RIP: 0010:atomic_try_cmpxchg+0x2/0x12 Nov 27 16:32:06 manet kernel: Code: ff ff 48 8b 04 24 5a c3 c6 07 00 0f 1f 40 00 c3 31 c0 48 81 ff 08 09 68 81 72 0c 31 c0 48 81 ff 83 0c 68 81 0f 92 c0 c3 8b 06 0f b1 17 0f 94 c2 84 d2 75 02 89 06 88 d0 c3 53 ba 01 00 00 00 Nov 27 16:32:06 manet kernel: RSP: 0018:ffffc900035abbf0 EFLAGS: 00010046 Nov 27 16:32:06 manet kernel: RAX: 0000000000000000 RBX: 00000000000001c0 RCX: 0000000000000000 Nov 27 16:32:06 manet kernel: RDX: 0000000000000001 RSI: ffffc900035abbfc RDI: 00000000000001c0 Nov 27 16:32:06 manet kernel: RBP: ffffc900035abde0 R08: 000000000000000e R09: ffffffffffffc000 Nov 27 16:32:06 manet kernel: R10: 0000000000000000 R11: 000000000002e800 R12: ffff88886169d9f8 Nov 27 16:32:06 manet kernel: R13: ffff88886169d9f4 R14: 0000000000000246 R15: 0000000000000000 Nov 27 16:32:06 manet kernel: FS: 0000000000000000(0000) GS:ffff88846fa40000(0000) knlGS:0000000000000000 Nov 27 16:32:06 manet kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Nov 27 16:32:06 manet kernel: CR2: 00000000000001c0 CR3: 0000000002009006 CR4: 00000000001606e0 Nov 27 16:32:06 manet kernel: Call Trace: Nov 27 16:32:06 manet kernel: do_raw_spin_lock+0x2f/0x5a Nov 27 16:32:06 manet kernel: create_qp_common.isra.47+0x856/0xadf [mlx4_ib] Nov 27 16:32:06 manet kernel: ? slab_post_alloc_hook.isra.60+0xa/0x1a Nov 27 16:32:06 manet kernel: ? __kmalloc+0x125/0x139 Nov 27 16:32:06 manet kernel: mlx4_ib_create_qp+0x57f/0x972 [mlx4_ib] The fix is to copy the qp_init_attr struct that was just created by rpcrdma_ep_create() instead of using the one from the previous connection instance. Fixes: 98ef77d1aaa7 ("xprtrdma: Send Queue size grows after a reconnect") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 452424cdcbcaf6a2ebaae4301da5a4e1850a941a Merge: 67373994d275 8b7f938e0a03 Author: Linus Torvalds Date: Tue Jan 14 10:22:10 2020 -0800 Merge branch 'parisc-5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "A boot crash fix by Mike Rapoport and a printk fix by Krzysztof Kozlowski" * 'parisc-5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: fix map_pages() to actually populate upper directory parisc: Use proper printk format for resource_size_t commit 67373994d275c78043d7e9256ad31d8ebb9b065d Merge: c21ed4d9a636 060dc911501f Author: Linus Torvalds Date: Tue Jan 14 10:17:15 2020 -0800 Merge tag 'asm-generic-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground Pull asm-generic fixes from Arnd Bergmann: "Here are two bugfixes from Mike Rapoport, both fixing compile-time errors for the nds32 architecture that were recently introduced" * tag 'asm-generic-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground: nds32: fix build failure caused by page table folding updates asm-generic/nds32: don't redefine cacheflush primitives commit c21ed4d9a636500e66642221d3880c3f9569964f Merge: e033e7d4a808 529244bd1afc Author: Linus Torvalds Date: Tue Jan 14 10:14:06 2020 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two simple fixes in the upper drivers (so both fairly core), one in enclosures, which fixes replugging a device into an enclosure slot and one in the disk driver which fixes revalidating a drive with protection information (PI) to make it a non-PI drive ... previously we were still remembering the old PI state. Both fixed issues are quite rare in the field" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: enclosure: Fix stale device oops with hot replug scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI commit e033e7d4a8081852b2cca53e530e2c0f4e6769c0 Merge: 3f1f9a9b715c f52b83b0b1c4 Author: Linus Torvalds Date: Tue Jan 14 09:56:31 2020 -0800 Merge branch 'dhowells' (patches from DavidH) Merge misc fixes from David Howells. Two afs fixes and a key refcounting fix. * dhowells: afs: Fix afs_lookup() to not clobber the version on a new dentry afs: Fix use-after-loss-of-ref keys: Fix request_key() cache commit f52b83b0b1c40ada38df917973ab719a4a753951 Author: David Howells Date: Tue Jan 14 16:16:54 2020 +0000 afs: Fix afs_lookup() to not clobber the version on a new dentry Fix afs_lookup() to not clobber the version set on a new dentry by afs_do_lookup() - especially as it's using the wrong version of the version (we need to use the one given to us by whatever op the dir contents correspond to rather than what's in the afs_vnode). Fixes: 9dd0b82ef530 ("afs: Fix missing dentry data version updating") Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 40a708bd622b78582ae3d280de29b09b50bd04c0 Author: David Howells Date: Tue Jan 14 16:16:25 2020 +0000 afs: Fix use-after-loss-of-ref afs_lookup() has a tracepoint to indicate the outcome of d_splice_alias(), passing it the inode to retrieve the fid from. However, the function gave up its ref on that inode when it called d_splice_alias(), which may have failed and dropped the inode. Fix this by caching the fid. Fixes: 80548b03991f ("afs: Add more tracepoints") Reported-by: Al Viro Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 8379bb84be757d5df2d818509faec5d66adb861d Author: David Howells Date: Tue Jan 14 16:06:14 2020 +0000 keys: Fix request_key() cache When the key cached by request_key() and co. is cleaned up on exit(), the code looks in the wrong task_struct, and so clears the wrong cache. This leads to anomalies in key refcounting when doing, say, a kernel build on an afs volume, that then trigger kasan to report a use-after-free when the key is viewed in /proc/keys. Fix this by making exit_creds() look in the passed-in task_struct rather than in current (the task_struct cleanup code is deferred by RCU and potentially run in another task). Fixes: 7743c48e54ee ("keys: Cache result of request_key*() temporarily in task_struct") Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 3f1f9a9b715cfa5d9933a024807e32b206775f83 Merge: 63d264fe0868 554913f600b4 Author: Linus Torvalds Date: Tue Jan 14 09:22:51 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "11 mm fixes" * emailed patches from Andrew Morton : mm: khugepaged: add trace status description for SCAN_PAGE_HAS_PRIVATE mm: memcg/slab: call flush_memcg_workqueue() only if memcg workqueue is valid mm/page-writeback.c: improve arithmetic divisions mm/page-writeback.c: use div64_ul() for u64-by-unsigned-long divide mm/page-writeback.c: avoid potential division by zero in wb_min_max_ratio() mm, debug_pagealloc: don't rely on static keys too early mm: memcg/slab: fix percpu slab vmstats flushing mm/shmem.c: thp, shmem: fix conflict of above-47bit hint address and PMD alignment mm/huge_memory.c: thp: fix conflict of above-47bit hint address and PMD alignment mm/memory_hotplug: don't free usage map when removing a re-added early section mm, thp: tweak reclaim/compaction effort of local-only and all-node allocations commit fb85145c04447035c07cd609302d6996eb217a1d Author: David Woodhouse Date: Thu Nov 21 14:53:11 2019 +0000 Documentation/process: Add Amazon contact for embargoed hardware issues Signed-off-by: David Woodhouse Link: https://lore.kernel.org/r/da6467d2649339b42339124fd19a8a2f91cc00dd.camel@infradead.org Signed-off-by: Greg Kroah-Hartman commit 0e31e3573f0cd94d7b821117db854187ffc85765 Author: Brendan Higgins Date: Thu Dec 12 16:35:22 2019 -0800 lkdtm/bugs: fix build error in lkdtm_UNSET_SMEP When building ARCH=um with CONFIG_UML_X86=y and CONFIG_64BIT=y we get the build errors: drivers/misc/lkdtm/bugs.c: In function ‘lkdtm_UNSET_SMEP’: drivers/misc/lkdtm/bugs.c:288:8: error: implicit declaration of function ‘native_read_cr4’ [-Werror=implicit-function-declaration] cr4 = native_read_cr4(); ^~~~~~~~~~~~~~~ drivers/misc/lkdtm/bugs.c:290:13: error: ‘X86_CR4_SMEP’ undeclared (first use in this function); did you mean ‘X86_FEATURE_SMEP’? if ((cr4 & X86_CR4_SMEP) != X86_CR4_SMEP) { ^~~~~~~~~~~~ X86_FEATURE_SMEP drivers/misc/lkdtm/bugs.c:290:13: note: each undeclared identifier is reported only once for each function it appears in drivers/misc/lkdtm/bugs.c:297:2: error: implicit declaration of function ‘native_write_cr4’; did you mean ‘direct_write_cr4’? [-Werror=implicit-function-declaration] native_write_cr4(cr4); ^~~~~~~~~~~~~~~~ direct_write_cr4 So specify that this block of code should only build when CONFIG_X86_64=y *AND* CONFIG_UML is unset. Signed-off-by: Brendan Higgins Acked-by: Kees Cook Link: https://lore.kernel.org/r/20191213003522.66450-1-brendanhiggins@google.com Signed-off-by: Greg Kroah-Hartman commit cea23efb4de2d31e72a576026b213e15d6792976 Author: Kees Cook Date: Thu Jan 2 12:29:17 2020 -0800 lkdtm/bugs: Make double-fault test always available Adjust the DOUBLE_FAULT test to always be available (so test harnesses don't have to make exceptions more missing tests), and for the arch-specific tests to "XFAIL" so that test harnesses can reason about expected vs unexpected failures. Fixes: b09511c253e5 ("lkdtm: Add a DOUBLE_FAULT crash type on x86") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/202001021226.751D3F869D@keescook Signed-off-by: Greg Kroah-Hartman commit 500589d8bd73cc4c1fc8dc433b675cea5fe79e86 Author: Arnd Bergmann Date: Fri Dec 13 15:31:07 2019 -0700 coresight: etm4x: Fix unused function warning Some of the newly added code in the etm4x driver is inside of an #ifdef, and some other code is outside of it, leading to a harmless warning when CONFIG_CPU_PM is disabled: drivers/hwtracing/coresight/coresight-etm4x.c:68:13: error: 'etm4_os_lock' defined but not used [-Werror=unused-function] static void etm4_os_lock(struct etmv4_drvdata *drvdata) ^~~~~~~~~~~~ To avoid the warning and simplify the the #ifdef checks, use IS_ENABLED() instead, so the compiler can drop the unused functions without complaining. Fixes: f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states") Signed-off-by: Arnd Bergmann [Fixed capital 'f' in title] Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191213223107.1484-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5e28055f340275a8616eee88ef19186631b4d136 Author: Johan Hovold Date: Mon Jan 13 18:22:13 2020 +0100 USB: serial: opticon: fix control-message timeouts The driver was issuing synchronous uninterruptible control requests without using a timeout. This could lead to the driver hanging on open() or tiocmset() due to a malfunctioning (or malicious) device until the device is physically disconnected. The USB upper limit of five seconds per request should be more than enough. Fixes: 309a057932ab ("USB: opticon: add rts and cts support") Cc: stable # 2.6.39 Cc: Martin Jansen Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 5d1b71226dc4d44b4b65766fa9d74492f9d4587b Author: Johan Hovold Date: Tue Jan 14 09:39:53 2020 +0100 ALSA: usb-audio: fix sync-ep altsetting sanity check The altsetting sanity check in set_sync_ep_implicit_fb_quirk() was checking for there to be at least one altsetting but then went on to access the second one, which may not exist. This could lead to random slab data being used to initialise the sync endpoint in snd_usb_add_endpoint(). Fixes: c75a8a7ae565 ("ALSA: snd-usb: add support for implicit feedback") Fixes: ca10a7ebdff1 ("ALSA: usb-audio: FT C400 sync playback EP to capture EP") Fixes: 5e35dc0338d8 ("ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204") Fixes: 17f08b0d9aaf ("ALSA: usb-audio: add implicit fb quirk for Axe-Fx II") Fixes: 103e9625647a ("ALSA: usb-audio: simplify set_sync_ep_implicit_fb_quirk") Cc: stable # 3.5 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200114083953.1106-1-johan@kernel.org Signed-off-by: Takashi Iwai commit 8b7f938e0a03776124781f19fb22443dfb519cff Author: Mike Rapoport Date: Wed Jan 8 14:58:52 2020 +0200 parisc: fix map_pages() to actually populate upper directory The commit d96885e277b5 ("parisc: use pgtable-nopXd instead of 4level-fixup") converted PA-RISC to use folded page tables, but it missed the conversion of pgd_populate() to pud_populate() in maps_pages() function. This caused the upper page table directory to remain empty and the system would crash as a result. Using pud_populate() that actually populates the page table instead of dummy pgd_populate() fixes the issue. Fixes: d96885e277b5 ("parisc: use pgtable-nopXd instead of 4level-fixup") Reported-by: Meelis Roos Reported-by: Jeroen Roovers Reported-by: Mikulas Patocka Tested-by: Jeroen Roovers Tested-by: Mikulas Patocka Signed-off-by: Mike Rapoport Signed-off-by: Helge Deller commit 4f80b70e1953cb846dbdd1ce72cb17333d4c8d11 Author: Krzysztof Kozlowski Date: Fri Jan 3 17:39:25 2020 +0100 parisc: Use proper printk format for resource_size_t resource_size_t should be printed with its own size-independent format to fix warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): arch/parisc/kernel/drivers.c: In function 'print_parisc_device': arch/parisc/kernel/drivers.c:892:9: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'resource_size_t {aka unsigned int}' [-Wformat=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Helge Deller commit 8aaea2b0428b6aad7c7e22d3fddc31a78bb1d724 Author: Xu Wang Date: Mon Jan 13 09:00:36 2020 +0000 xfrm: interface: do not confirm neighbor when do pmtu update When do IPv6 tunnel PMTU update and calls __ip6_rt_update_pmtu() in the end, we should not call dst_confirm_neigh() as there is no two-way communication. Signed-off-by: Xu Wang Signed-off-by: Steffen Klassert commit f042365dbffea98fb8148c98c700402e8d099f02 Author: Nicolas Dichtel Date: Mon Jan 13 09:32:47 2020 +0100 xfrm interface: fix packet tx through bpf_redirect() With an ebpf program that redirects packets through a xfrm interface, packets are dropped because no dst is attached to skb. This could also be reproduced with an AF_PACKET socket, with the following python script (xfrm1 is a xfrm interface): import socket send_s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, 0) # scapy # p = IP(src='10.100.0.2', dst='10.200.0.1')/ICMP(type='echo-request') # raw(p) req = b'E\x00\x00\x1c\x00\x01\x00\x00@\x01e\xb2\nd\x00\x02\n\xc8\x00\x01\x08\x00\xf7\xff\x00\x00\x00\x00' send_s.sendto(req, ('xfrm1', 0x800, 0, 0)) It was also not possible to send an ip packet through an AF_PACKET socket because a LL header was expected. Let's remove those LL header constraints. Signed-off-by: Nicolas Dichtel Signed-off-by: Steffen Klassert commit 95224166a9032ff5d08fca633d37113078ce7d01 Author: Nicolas Dichtel Date: Mon Jan 13 09:32:46 2020 +0100 vti[6]: fix packet tx through bpf_redirect() With an ebpf program that redirects packets through a vti[6] interface, the packets are dropped because no dst is attached. This could also be reproduced with an AF_PACKET socket, with the following python script (vti1 is an ip_vti interface): import socket send_s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, 0) # scapy # p = IP(src='10.100.0.2', dst='10.200.0.1')/ICMP(type='echo-request') # raw(p) req = b'E\x00\x00\x1c\x00\x01\x00\x00@\x01e\xb2\nd\x00\x02\n\xc8\x00\x01\x08\x00\xf7\xff\x00\x00\x00\x00' send_s.sendto(req, ('vti1', 0x800, 0, 0)) Signed-off-by: Nicolas Dichtel Signed-off-by: Steffen Klassert commit 88550e1c345c6d3f70292fa60d481eb320e11953 Author: Tvrtko Ursulin Date: Fri Jan 10 11:32:53 2020 +0000 drm/i915/pmu: Do not use colons or dashes in PMU names We use PCI device path in the registered PMU name in order to distinguish between multiple GPUs. But since tools/perf reserves a special meaning to dash and colon characters we need to transliterate them to something else. We choose an underscore. v2: * Use strreplace. (Chris) * Dashes are not good either. (Chris) Signed-off-by: Tvrtko Ursulin Reported-by: Dmitry Rogozhkin Fixes: 05488673a4d4 ("drm/i915/pmu: Support multiple GPUs") Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Andi Kleen Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200110113253.12535-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit aebf3b521b34ca49f6e81c667f92364334ca27cf) Signed-off-by: Joonas Lahtinen commit a112adafcb47760feff959ee1ecd10b74d2c5467 Author: Johan Hovold Date: Mon Jan 13 18:23:58 2020 +0100 NFC: pn533: fix bulk-message timeout The driver was doing a synchronous uninterruptible bulk-transfer without using a timeout. This could lead to the driver hanging on probe due to a malfunctioning (or malicious) device until the device is physically disconnected. While sleeping in probe the driver prevents other devices connected to the same hub from being added to (or removed from) the bus. An arbitrary limit of five seconds should be more than enough. Fixes: dbafc28955fa ("NFC: pn533: don't send USB data off of the stack") Signed-off-by: Johan Hovold Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jakub Kicinski commit a9ff44f0e61d074f29770413fef6a5452be7b83e Author: Kristian Evensen Date: Mon Jan 13 14:57:40 2020 +0100 qmi_wwan: Add support for Quectel RM500Q RM500Q is a 5G module from Quectel, supporting both standalone and non-standalone modes. The normal Quectel quirks apply (DTR and dynamic interface numbers). Signed-off-by: Kristian Evensen Acked-by: Bjørn Mork Signed-off-by: Jakub Kicinski commit 63d264fe0868cb755a3a887ee7b7b6e3da786804 Merge: b3a987b0264d bc8a76a152c5 Author: Linus Torvalds Date: Mon Jan 13 18:40:57 2020 -0800 Merge tag 'Intel-CVE-2019-14615' from bundle by Akeem Abodunrin. Merge Intel Gen9 graphics fix from Akeem Abodunrin: "Insufficient control flow in certain data structures for some Intel Processors with Intel Processor Graphics may allow an unauthenticated user to potentially enable information disclosure via local access This provides mitigation for Gen9 hardware. Note that Gen8 is not impacted due to a previously implemented workaround. The mitigation involves using an existing hardware feature to forcibly clear down all EU state at each context switch" * tag 'Intel-CVE-2019-14615' of emailed bundle from Akeem G Abodunrin : drm/i915/gen9: Clear residual context state on context switch commit fd2a89146ae57068e8f86b2fcb91d23a8db6a3c2 Author: Milind Parab Date: Mon Jan 13 03:30:43 2020 +0000 net: macb: fix for fixed-link mode This patch fix the issue with fixed link. With fixed-link device opening fails due to macb_phylink_connect not handling fixed-link mode, in which case no MAC-PHY connection is needed and phylink_connect return success (0), however in current driver attempt is made to search and connect to PHY even for fixed-link. Fixes: 7897b071ac3b ("net: macb: convert to phylink") Signed-off-by: Milind Parab Reviewed-by: Claudiu Beznea Signed-off-by: Jakub Kicinski commit 74566df3a71c1b92da608868cca787557d8be7b2 Author: Jens Axboe Date: Mon Jan 13 19:23:24 2020 -0700 io_uring: don't setup async context for read/write fixed We don't need it, and if we have it, then the retry handler will attempt to copy the non-existent iovec with the inline iovec, with a segment count that doesn't make sense. Fixes: f67676d160c6 ("io_uring: ensure async punted read/write requests copy iovec") Reported-by: Jonathan Lemon Signed-off-by: Jens Axboe commit 554913f600b45d73de12ad58c1ac7baa0f22a703 Author: Yang Shi Date: Mon Jan 13 16:29:36 2020 -0800 mm: khugepaged: add trace status description for SCAN_PAGE_HAS_PRIVATE Commit 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS") introduced a new khugepaged scan result: SCAN_PAGE_HAS_PRIVATE, but the corresponding description for trace events were not added. Link: http://lkml.kernel.org/r/1574793844-2914-1-git-send-email-yang.shi@linux.alibaba.com Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS") Signed-off-by: Yang Shi Cc: Song Liu Cc: Kirill A. Shutemov Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2fe20210fc5f5e62644678b8f927c49f2c6f42a7 Author: Adrian Huang Date: Mon Jan 13 16:29:32 2020 -0800 mm: memcg/slab: call flush_memcg_workqueue() only if memcg workqueue is valid When booting with amd_iommu=off, the following WARNING message appears: AMD-Vi: AMD IOMMU disabled on kernel command-line ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/workqueue.c:2772 flush_workqueue+0x42e/0x450 Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.5.0-rc3-amd-iommu #6 Hardware name: Lenovo ThinkSystem SR655-2S/7D2WRCZ000, BIOS D8E101L-1.00 12/05/2019 RIP: 0010:flush_workqueue+0x42e/0x450 Code: ff 0f 0b e9 7a fd ff ff 4d 89 ef e9 33 fe ff ff 0f 0b e9 7f fd ff ff 0f 0b e9 bc fd ff ff 0f 0b e9 a8 fd ff ff e8 52 2c fe ff <0f> 0b 31 d2 48 c7 c6 e0 88 c5 95 48 c7 c7 d8 ad f0 95 e8 19 f5 04 Call Trace: kmem_cache_destroy+0x69/0x260 iommu_go_to_state+0x40c/0x5ab amd_iommu_prepare+0x16/0x2a irq_remapping_prepare+0x36/0x5f enable_IR_x2apic+0x21/0x172 default_setup_apic_routing+0x12/0x6f apic_intr_mode_init+0x1a1/0x1f1 x86_late_time_init+0x17/0x1c start_kernel+0x480/0x53f secondary_startup_64+0xb6/0xc0 ---[ end trace 30894107c3749449 ]--- x2apic: IRQ remapping doesn't support X2APIC mode x2apic disabled The warning is caused by the calling of 'kmem_cache_destroy()' in free_iommu_resources(). Here is the call path: free_iommu_resources kmem_cache_destroy flush_memcg_workqueue flush_workqueue The root cause is that the IOMMU subsystem runs before the workqueue subsystem, which the variable 'wq_online' is still 'false'. This leads to the statement 'if (WARN_ON(!wq_online))' in flush_workqueue() is 'true'. Since the variable 'memcg_kmem_cache_wq' is not allocated during the time, it is unnecessary to call flush_memcg_workqueue(). This prevents the WARNING message triggered by flush_workqueue(). Link: http://lkml.kernel.org/r/20200103085503.1665-1-ahuang12@lenovo.com Fixes: 92ee383f6daab ("mm: fix race between kmem_cache destroy, create and deactivate") Signed-off-by: Adrian Huang Reported-by: Xiaochun Lee Reviewed-by: Shakeel Butt Cc: Joerg Roedel Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Michal Hocko Cc: Johannes Weiner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a5d1a7f64702c351d1f47ef159a0df8c71be0b0 Author: Wen Yang Date: Mon Jan 13 16:29:29 2020 -0800 mm/page-writeback.c: improve arithmetic divisions Use div64_ul() instead of do_div() if the divisor is unsigned long, to avoid truncation to 32-bit on 64-bit platforms. Link: http://lkml.kernel.org/r/20200102081442.8273-4-wenyang@linux.alibaba.com Signed-off-by: Wen Yang Reviewed-by: Andrew Morton Cc: Qian Cai Cc: Tejun Heo Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3ac946ec9de10ec4b9718ad30703c5e077916a1 Author: Wen Yang Date: Mon Jan 13 16:29:26 2020 -0800 mm/page-writeback.c: use div64_ul() for u64-by-unsigned-long divide The two variables 'numerator' and 'denominator', though they are declared as long, they should actually be unsigned long (according to the implementation of the fprop_fraction_percpu() function) And do_div() does a 64-by-32 division, while the divisor 'denominator' is unsigned long, thus 64-bit on 64-bit platforms. Hence the proper function to call is div64_ul(). Link: http://lkml.kernel.org/r/20200102081442.8273-3-wenyang@linux.alibaba.com Signed-off-by: Wen Yang Reviewed-by: Andrew Morton Cc: Qian Cai Cc: Tejun Heo Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d9e8c651dd979aa666bee15f086745f3ea9c4b3 Author: Wen Yang Date: Mon Jan 13 16:29:23 2020 -0800 mm/page-writeback.c: avoid potential division by zero in wb_min_max_ratio() Patch series "use div64_ul() instead of div_u64() if the divisor is unsigned long". We were first inspired by commit b0ab99e7736a ("sched: Fix possible divide by zero in avg_atom () calculation"), then refer to the recently analyzed mm code, we found this suspicious place. 201 if (min) { 202 min *= this_bw; 203 do_div(min, tot_bw); 204 } And we also disassembled and confirmed it: /usr/src/debug/kernel-4.9.168-016.ali3000/linux-4.9.168-016.ali3000.alios7.x86_64/mm/page-writeback.c: 201 0xffffffff811c37da <__wb_calc_thresh+234>: xor %r10d,%r10d 0xffffffff811c37dd <__wb_calc_thresh+237>: test %rax,%rax 0xffffffff811c37e0 <__wb_calc_thresh+240>: je 0xffffffff811c3800 <__wb_calc_thresh+272> /usr/src/debug/kernel-4.9.168-016.ali3000/linux-4.9.168-016.ali3000.alios7.x86_64/mm/page-writeback.c: 202 0xffffffff811c37e2 <__wb_calc_thresh+242>: imul %r8,%rax /usr/src/debug/kernel-4.9.168-016.ali3000/linux-4.9.168-016.ali3000.alios7.x86_64/mm/page-writeback.c: 203 0xffffffff811c37e6 <__wb_calc_thresh+246>: mov %r9d,%r10d ---> truncates it to 32 bits here 0xffffffff811c37e9 <__wb_calc_thresh+249>: xor %edx,%edx 0xffffffff811c37eb <__wb_calc_thresh+251>: div %r10 0xffffffff811c37ee <__wb_calc_thresh+254>: imul %rbx,%rax 0xffffffff811c37f2 <__wb_calc_thresh+258>: shr $0x2,%rax 0xffffffff811c37f6 <__wb_calc_thresh+262>: mul %rcx 0xffffffff811c37f9 <__wb_calc_thresh+265>: shr $0x2,%rdx 0xffffffff811c37fd <__wb_calc_thresh+269>: mov %rdx,%r10 This series uses div64_ul() instead of div_u64() if the divisor is unsigned long, to avoid truncation to 32-bit on 64-bit platforms. This patch (of 3): The variables 'min' and 'max' are unsigned long and do_div truncates them to 32 bits, which means it can test non-zero and be truncated to zero for division. Fix this issue by using div64_ul() instead. Link: http://lkml.kernel.org/r/20200102081442.8273-2-wenyang@linux.alibaba.com Fixes: 693108a8a667 ("writeback: make bdi->min/max_ratio handling cgroup writeback aware") Signed-off-by: Wen Yang Reviewed-by: Andrew Morton Cc: Qian Cai Cc: Tejun Heo Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e57f8acbbd121ecfb0c9dc13b8b030f86c6bd3b Author: Vlastimil Babka Date: Mon Jan 13 16:29:20 2020 -0800 mm, debug_pagealloc: don't rely on static keys too early Commit 96a2b03f281d ("mm, debug_pagelloc: use static keys to enable debugging") has introduced a static key to reduce overhead when debug_pagealloc is compiled in but not enabled. It relied on the assumption that jump_label_init() is called before parse_early_param() as in start_kernel(), so when the "debug_pagealloc=on" option is parsed, it is safe to enable the static key. However, it turns out multiple architectures call parse_early_param() earlier from their setup_arch(). x86 also calls jump_label_init() even earlier, so no issue was found while testing the commit, but same is not true for e.g. ppc64 and s390 where the kernel would not boot with debug_pagealloc=on as found by our QA. To fix this without tricky changes to init code of multiple architectures, this patch partially reverts the static key conversion from 96a2b03f281d. Init-time and non-fastpath calls (such as in arch code) of debug_pagealloc_enabled() will again test a simple bool variable. Fastpath mm code is converted to a new debug_pagealloc_enabled_static() variant that relies on the static key, which is enabled in a well-defined point in mm_init() where it's guaranteed that jump_label_init() has been called, regardless of architecture. [sfr@canb.auug.org.au: export _debug_pagealloc_enabled_early] Link: http://lkml.kernel.org/r/20200106164944.063ac07b@canb.auug.org.au Link: http://lkml.kernel.org/r/20191219130612.23171-1-vbabka@suse.cz Fixes: 96a2b03f281d ("mm, debug_pagelloc: use static keys to enable debugging") Signed-off-by: Vlastimil Babka Signed-off-by: Stephen Rothwell Cc: Joonsoo Kim Cc: "Kirill A. Shutemov" Cc: Michal Hocko Cc: Vlastimil Babka Cc: Matthew Wilcox Cc: Mel Gorman Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Qian Cai Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a87e2a25dc27131c3cce5e94421622193305638 Author: Roman Gushchin Date: Mon Jan 13 16:29:16 2020 -0800 mm: memcg/slab: fix percpu slab vmstats flushing Currently slab percpu vmstats are flushed twice: during the memcg offlining and just before freeing the memcg structure. Each time percpu counters are summed, added to the atomic counterparts and propagated up by the cgroup tree. The second flushing is required due to how recursive vmstats are implemented: counters are batched in percpu variables on a local level, and once a percpu value is crossing some predefined threshold, it spills over to atomic values on the local and each ascendant levels. It means that without flushing some numbers cached in percpu variables will be dropped on floor each time a cgroup is destroyed. And with uptime the error on upper levels might become noticeable. The first flushing aims to make counters on ancestor levels more precise. Dying cgroups may resume in the dying state for a long time. After kmem_cache reparenting which is performed during the offlining slab counters of the dying cgroup don't have any chances to be updated, because any slab operations will be performed on the parent level. It means that the inaccuracy caused by percpu batching will not decrease up to the final destruction of the cgroup. By the original idea flushing slab counters during the offlining should minimize the visible inaccuracy of slab counters on the parent level. The problem is that percpu counters are not zeroed after the first flushing. So every cached percpu value is summed twice. It creates a small error (up to 32 pages per cpu, but usually less) which accumulates on parent cgroup level. After creating and destroying of thousands of child cgroups, slab counter on parent level can be way off the real value. For now, let's just stop flushing slab counters on memcg offlining. It can't be done correctly without scheduling a work on each cpu: reading and zeroing it during css offlining can race with an asynchronous update, which doesn't expect values to be changed underneath. With this change, slab counters on parent level will become eventually consistent. Once all dying children are gone, values are correct. And if not, the error is capped by 32 * NR_CPUS pages per dying cgroup. It's not perfect, as slab are reparented, so any updates after the reparenting will happen on the parent level. It means that if a slab page was allocated, a counter on child level was bumped, then the page was reparented and freed, the annihilation of positive and negative counter values will not happen until the child cgroup is released. It makes slab counters different from others, and it might want us to implement flushing in a correct form again. But it's also a question of performance: scheduling a work on each cpu isn't free, and it's an open question if the benefit of having more accurate counters is worth it. We might also consider flushing all counters on offlining, not only slab counters. So let's fix the main problem now: make the slab counters eventually consistent, so at least the error won't grow with uptime (or more precisely the number of created and destroyed cgroups). And think about the accuracy of counters separately. Link: http://lkml.kernel.org/r/20191220042728.1045881-1-guro@fb.com Fixes: bee07b33db78 ("mm: memcontrol: flush percpu slab vmstats on kmem offlining") Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 991589974d9c9ecb24ee3799ec8c415c730598a2 Author: Kirill A. Shutemov Date: Mon Jan 13 16:29:13 2020 -0800 mm/shmem.c: thp, shmem: fix conflict of above-47bit hint address and PMD alignment Shmem/tmpfs tries to provide THP-friendly mappings if huge pages are enabled. But it doesn't work well with above-47bit hint address. Normally, the kernel doesn't create userspace mappings above 47-bit, even if the machine allows this (such as with 5-level paging on x86-64). Not all user space is ready to handle wide addresses. It's known that at least some JIT compilers use higher bits in pointers to encode their information. Userspace can ask for allocation from full address space by specifying hint address (with or without MAP_FIXED) above 47-bits. If the application doesn't need a particular address, but wants to allocate from whole address space it can specify -1 as a hint address. Unfortunately, this trick breaks THP alignment in shmem/tmp: shmem_get_unmapped_area() would not try to allocate PMD-aligned area if *any* hint address specified. This can be fixed by requesting the aligned area if the we failed to allocated at user-specified hint address. The request with inflated length will also take the user-specified hint address. This way we will not lose an allocation request from the full address space. [kirill@shutemov.name: fold in a fixup] Link: http://lkml.kernel.org/r/20191223231309.t6bh5hkbmokihpfu@box Link: http://lkml.kernel.org/r/20191220142548.7118-3-kirill.shutemov@linux.intel.com Fixes: b569bab78d8d ("x86/mm: Prepare to expose larger address space to userspace") Signed-off-by: Kirill A. Shutemov Cc: "Willhalm, Thomas" Cc: Dan Williams Cc: "Bruggeman, Otto G" Cc: "Aneesh Kumar K . V" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97d3d0f9a1cf132c63c0b8b8bd497b8a56283dd9 Author: Kirill A. Shutemov Date: Mon Jan 13 16:29:10 2020 -0800 mm/huge_memory.c: thp: fix conflict of above-47bit hint address and PMD alignment Patch series "Fix two above-47bit hint address vs. THP bugs". The two get_unmapped_area() implementations have to be fixed to provide THP-friendly mappings if above-47bit hint address is specified. This patch (of 2): Filesystems use thp_get_unmapped_area() to provide THP-friendly mappings. For DAX in particular. Normally, the kernel doesn't create userspace mappings above 47-bit, even if the machine allows this (such as with 5-level paging on x86-64). Not all user space is ready to handle wide addresses. It's known that at least some JIT compilers use higher bits in pointers to encode their information. Userspace can ask for allocation from full address space by specifying hint address (with or without MAP_FIXED) above 47-bits. If the application doesn't need a particular address, but wants to allocate from whole address space it can specify -1 as a hint address. Unfortunately, this trick breaks thp_get_unmapped_area(): the function would not try to allocate PMD-aligned area if *any* hint address specified. Modify the routine to handle it correctly: - Try to allocate the space at the specified hint address with length padding required for PMD alignment. - If failed, retry without length padding (but with the same hint address); - If the returned address matches the hint address return it. - Otherwise, align the address as required for THP and return. The user specified hint address is passed down to get_unmapped_area() so above-47bit hint address will be taken into account without breaking alignment requirements. Link: http://lkml.kernel.org/r/20191220142548.7118-2-kirill.shutemov@linux.intel.com Fixes: b569bab78d8d ("x86/mm: Prepare to expose larger address space to userspace") Signed-off-by: Kirill A. Shutemov Reported-by: Thomas Willhalm Tested-by: Dan Williams Cc: "Aneesh Kumar K . V" Cc: "Bruggeman, Otto G" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8068df3b60373c390198f660574ea14c8098de57 Author: David Hildenbrand Date: Mon Jan 13 16:29:07 2020 -0800 mm/memory_hotplug: don't free usage map when removing a re-added early section When we remove an early section, we don't free the usage map, as the usage maps of other sections are placed into the same page. Once the section is removed, it is no longer an early section (especially, the memmap is freed). When we re-add that section, the usage map is reused, however, it is no longer an early section. When removing that section again, we try to kfree() a usage map that was allocated during early boot - bad. Let's check against PageReserved() to see if we are dealing with an usage map that was allocated during boot. We could also check against !(PageSlab(usage_page) || PageCompound(usage_page)), but PageReserved() is cleaner. Can be triggered using memtrace under ppc64/powernv: $ mount -t debugfs none /sys/kernel/debug/ $ echo 0x20000000 > /sys/kernel/debug/powerpc/memtrace/enable $ echo 0x20000000 > /sys/kernel/debug/powerpc/memtrace/enable ------------[ cut here ]------------ kernel BUG at mm/slub.c:3969! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=3D64K MMU=3DHash SMP NR_CPUS=3D2048 NUMA PowerNV Modules linked in: CPU: 0 PID: 154 Comm: sh Not tainted 5.5.0-rc2-next-20191216-00005-g0be1dba7b7c0 #61 NIP kfree+0x338/0x3b0 LR section_deactivate+0x138/0x200 Call Trace: section_deactivate+0x138/0x200 __remove_pages+0x114/0x150 arch_remove_memory+0x3c/0x160 try_remove_memory+0x114/0x1a0 __remove_memory+0x20/0x40 memtrace_enable_set+0x254/0x850 simple_attr_write+0x138/0x160 full_proxy_write+0x8c/0x110 __vfs_write+0x38/0x70 vfs_write+0x11c/0x2a0 ksys_write+0x84/0x140 system_call+0x5c/0x68 ---[ end trace 4b053cbd84e0db62 ]--- The first invocation will offline+remove memory blocks. The second invocation will first add+online them again, in order to offline+remove them again (usually we are lucky and the exact same memory blocks will get "reallocated"). Tested on powernv with boot memory: The usage map will not get freed. Tested on x86-64 with DIMMs: The usage map will get freed. Using Dynamic Memory under a Power DLAPR can trigger it easily. Triggering removal (I assume after previously removed+re-added) of memory from the HMC GUI can crash the kernel with the same call trace and is fixed by this patch. Link: http://lkml.kernel.org/r/20191217104637.5509-1-david@redhat.com Fixes: 326e1b8f83a4 ("mm/sparsemem: introduce a SECTION_IS_EARLY flag") Signed-off-by: David Hildenbrand Tested-by: Pingfan Liu Cc: Dan Williams Cc: Oscar Salvador Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc638f329ef605f5c2a57b87dd8e584e9d5f4c2f Author: Vlastimil Babka Date: Mon Jan 13 16:29:04 2020 -0800 mm, thp: tweak reclaim/compaction effort of local-only and all-node allocations THP page faults now attempt a __GFP_THISNODE allocation first, which should only compact existing free memory, followed by another attempt that can allocate from any node using reclaim/compaction effort specified by global defrag setting and madvise. This patch makes the following changes to the scheme: - Before the patch, the first allocation relies on a check for pageblock order and __GFP_IO to prevent excessive reclaim. This however affects also the second attempt, which is not limited to single node. Instead of that, reuse the existing check for costly order __GFP_NORETRY allocations, and make sure the first THP attempt uses __GFP_NORETRY. As a side-effect, all costly order __GFP_NORETRY allocations will bail out if compaction needs reclaim, while previously they only bailed out when compaction was deferred due to previous failures. This should be still acceptable within the __GFP_NORETRY semantics. - Before the patch, the second allocation attempt (on all nodes) was passing __GFP_NORETRY. This is redundant as the check for pageblock order (discussed above) was stronger. It's also contrary to madvise(MADV_HUGEPAGE) which means some effort to allocate THP is requested. After this patch, the second attempt doesn't pass __GFP_THISNODE nor __GFP_NORETRY. To sum up, THP page faults now try the following attempts: 1. local node only THP allocation with no reclaim, just compaction. 2. for madvised VMA's or when synchronous compaction is enabled always - THP allocation from any node with effort determined by global defrag setting and VMA madvise 3. fallback to base pages on any node Link: http://lkml.kernel.org/r/08a3f4dd-c3ce-0009-86c5-9ee51aba8557@suse.cz Fixes: b39d0ee2632d ("mm, page_alloc: avoid expensive reclaim when compaction may not succeed") Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Linus Torvalds Cc: Andrea Arcangeli Cc: Mel Gorman Cc: "Kirill A. Shutemov" Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6282675e6708ec78518cc0e9ad1f1f73d7c5c53d Author: Qu Wenruo Date: Wed Jan 8 13:12:00 2020 +0800 btrfs: relocation: fix reloc_root lifespan and access [BUG] There are several different KASAN reports for balance + snapshot workloads. Involved call paths include: should_ignore_root+0x54/0xb0 [btrfs] build_backref_tree+0x11af/0x2280 [btrfs] relocate_tree_blocks+0x391/0xb80 [btrfs] relocate_block_group+0x3e5/0xa00 [btrfs] btrfs_relocate_block_group+0x240/0x4d0 [btrfs] btrfs_relocate_chunk+0x53/0xf0 [btrfs] btrfs_balance+0xc91/0x1840 [btrfs] btrfs_ioctl_balance+0x416/0x4e0 [btrfs] btrfs_ioctl+0x8af/0x3e60 [btrfs] do_vfs_ioctl+0x831/0xb10 create_reloc_root+0x9f/0x460 [btrfs] btrfs_reloc_post_snapshot+0xff/0x6c0 [btrfs] create_pending_snapshot+0xa9b/0x15f0 [btrfs] create_pending_snapshots+0x111/0x140 [btrfs] btrfs_commit_transaction+0x7a6/0x1360 [btrfs] btrfs_mksubvol+0x915/0x960 [btrfs] btrfs_ioctl_snap_create_transid+0x1d5/0x1e0 [btrfs] btrfs_ioctl_snap_create_v2+0x1d3/0x270 [btrfs] btrfs_ioctl+0x241b/0x3e60 [btrfs] do_vfs_ioctl+0x831/0xb10 btrfs_reloc_pre_snapshot+0x85/0xc0 [btrfs] create_pending_snapshot+0x209/0x15f0 [btrfs] create_pending_snapshots+0x111/0x140 [btrfs] btrfs_commit_transaction+0x7a6/0x1360 [btrfs] btrfs_mksubvol+0x915/0x960 [btrfs] btrfs_ioctl_snap_create_transid+0x1d5/0x1e0 [btrfs] btrfs_ioctl_snap_create_v2+0x1d3/0x270 [btrfs] btrfs_ioctl+0x241b/0x3e60 [btrfs] do_vfs_ioctl+0x831/0xb10 [CAUSE] All these call sites are only relying on root->reloc_root, which can undergo btrfs_drop_snapshot(), and since we don't have real refcount based protection to reloc roots, we can reach already dropped reloc root, triggering KASAN. [FIX] To avoid such access to unstable root->reloc_root, we should check BTRFS_ROOT_DEAD_RELOC_TREE bit first. This patch introduces wrappers that provide the correct way to check the bit with memory barriers protection. Most callers don't distinguish merged reloc tree and no reloc tree. The only exception is should_ignore_root(), as merged reloc tree can be ignored, while no reloc tree shouldn't. [CRITICAL SECTION ANALYSIS] Although test_bit()/set_bit()/clear_bit() doesn't imply a barrier, the DEAD_RELOC_TREE bit has extra help from transaction as a higher level barrier, the lifespan of root::reloc_root and DEAD_RELOC_TREE bit are: NULL: reloc_root is NULL PTR: reloc_root is not NULL 0: DEAD_RELOC_ROOT bit not set DEAD: DEAD_RELOC_ROOT bit set (NULL, 0) Initial state __ | /\ Section A btrfs_init_reloc_root() \/ | __ (PTR, 0) reloc_root initialized /\ | | btrfs_update_reloc_root() | Section B | | (PTR, DEAD) reloc_root has been merged \/ | __ === btrfs_commit_transaction() ==================== | /\ clean_dirty_subvols() | | | Section C (NULL, DEAD) reloc_root cleanup starts \/ | __ btrfs_drop_snapshot() /\ | | Section D (NULL, 0) Back to initial state \/ Every have_reloc_root() or test_bit(DEAD_RELOC_ROOT) caller holds transaction handle, so none of such caller can cross transaction boundary. In Section A, every caller just found no DEAD bit, and grab reloc_root. In the cross section A-B, caller may get no DEAD bit, but since reloc_root is still completely valid thus accessing reloc_root is completely safe. No test_bit() caller can cross the boundary of Section B and Section C. In Section C, every caller found the DEAD bit, so no one will access reloc_root. In the cross section C-D, either caller gets the DEAD bit set, avoiding access reloc_root no matter if it's safe or not. Or caller get the DEAD bit cleared, then access reloc_root, which is already NULL, nothing will be wrong. The memory write barriers are between the reloc_root updates and bit set/clear, the pairing read side is before test_bit. Reported-by: Zygo Blaxell Fixes: d2311e698578 ("btrfs: relocation: Delay reloc tree deletion after merge_reloc_roots") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba [ barriers ] Signed-off-by: David Sterba commit f3efc406d67e6236b513c4302133b0c9be74fd99 Author: Vadim Pasternak Date: Mon Jan 13 16:28:31 2020 +0000 Documentation/ABI: Add missed attribute for mlxreg-io sysfs interfaces Add missed "cpld4_version" attribute. Fixes: 52675da1d087 ("Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces") Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit f4094826779dcafe7087e80850513b923eeefdeb Author: Vadim Pasternak Date: Mon Jan 13 16:28:30 2020 +0000 Documentation/ABI: Fix documentation inconsistency for mlxreg-io sysfs interfaces Fix attribute name from "jtag_enable", which described twice to "cpld3_version", which is expected to be instead of second appearance of "jtag_enable". Fixes: 2752e34442b5 ("Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces") Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 212e7f56605ef9688d0846db60c6c6ec06544095 Author: Florian Westphal Date: Sat Jan 11 23:19:53 2020 +0100 netfilter: arp_tables: init netns pointer in xt_tgdtor_param struct An earlier commit (1b789577f655060d98d20e, "netfilter: arp_tables: init netns pointer in xt_tgchk_param struct") fixed missing net initialization for arptables, but turns out it was incomplete. We can get a very similar struct net NULL deref during error unwinding: general protection fault: 0000 [#1] PREEMPT SMP KASAN RIP: 0010:xt_rateest_put+0xa1/0x440 net/netfilter/xt_RATEEST.c:77 xt_rateest_tg_destroy+0x72/0xa0 net/netfilter/xt_RATEEST.c:175 cleanup_entry net/ipv4/netfilter/arp_tables.c:509 [inline] translate_table+0x11f4/0x1d80 net/ipv4/netfilter/arp_tables.c:587 do_replace net/ipv4/netfilter/arp_tables.c:981 [inline] do_arpt_set_ctl+0x317/0x650 net/ipv4/netfilter/arp_tables.c:1461 Also init the netns pointer in xt_tgdtor_param struct. Fixes: add67461240c1d ("netfilter: add struct net * to target parameters") Reported-by: syzbot+91bdd8eece0f6629ec8b@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a0af2742473425322cc24c79dc4033d74aaf3d81 Merge: ad931a2d56e3 0c545240aebc Author: Stephen Boyd Date: Mon Jan 13 09:55:41 2020 -0800 Merge tag 'sunxi-clk-fixes-for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes Pull Allwinner clk fixes from Maxime Ripard: Our usual set of fixes for Allwinner, to fix the number of reported clocks on the v3s, fixing the external clock on the R40, and some fixes for the AR100 co-processor clocks. * tag 'sunxi-clk-fixes-for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: h6-r: Fix AR100/R_APB2 parent order clk: sunxi-ng: h6-r: Simplify R_APB1 clock definition clk: sunxi-ng: sun8i-r: Fix divider on APB0 clock clk: sunxi-ng: r40: Allow setting parent rate for external clock outputs clk: sunxi-ng: v3s: Fix incorrect number of hw_clks. commit c120959387efa51479056fd01dc90adfba7a590c Author: Cong Wang Date: Fri Jan 10 11:53:08 2020 -0800 netfilter: fix a use-after-free in mtype_destroy() map->members is freed by ip_set_free() right before using it in mtype_ext_cleanup() again. So we just have to move it down. Reported-by: syzbot+4c3cc6dbe7259dbf9054@syzkaller.appspotmail.com Fixes: 40cd63bf33b2 ("netfilter: ipset: Support extensions which need a per data destroy function") Acked-by: Jozsef Kadlecsik Signed-off-by: Cong Wang Signed-off-by: Pablo Neira Ayuso commit 5abd45ea0fc3060f7805e131753fdcbafd6c6618 Author: Matwey V. Kornilov Date: Mon Jan 6 16:09:08 2020 +0300 ARM: dts: am335x-boneblack-common: fix memory size BeagleBone Black series is equipped with 512MB RAM whereas only 256MB is included from am335x-bone-common.dtsi This leads to an issue with unusual setups when devicetree is loaded by GRUB2 directly. Signed-off-by: Matwey V. Kornilov Signed-off-by: Tony Lindgren commit 1fd224e35c1493e9f5d4d932c175616cccce8df9 Author: Paul Cercueil Date: Mon Jan 13 13:33:29 2020 -0300 irqchip/ingenic: Get rid of the legacy IRQ domain Get rid of the legacy IRQ domain and hardcoded IRQ base, since all the Ingenic drivers and platform code have been updated to use devicetree. This also fixes the kernel being flooded with messages like: irq: interrupt-controller@10001000 didn't like hwirq-0x0 to VIRQ8 mapping (rc=-19) Fixes: 8bc7464b5140 ("irqchip: ingenic: Alloc generic chips from IRQ domain"). Signed-off-by: Paul Cercueil Signed-off-by: Thomas Gleixner Tested-by: H. Nikolaus Schaller Tested-by: 周琰杰 (Zhou Yanjie) Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20200113163329.34282-2-paul@crapouillou.net commit accf227de4d211b52c830a58b2df00d5739f2389 Author: Kristian Evensen Date: Mon Jan 13 15:14:05 2020 +0100 USB: serial: option: Add support for Quectel RM500Q RM500Q is a 5G module from Quectel, supporting both standalone and non-standalone modes. Unlike other recent Quectel modems, it is possible to identify the diagnostic interface (bInterfaceProtocol is unique). Thus, there is no need to check for the number of endpoints or reserve interfaces. The interface number is still dynamic though, so matching on interface number is not possible and two entries have to be added to the table. Output from usb-devices with all interfaces enabled (order is diag, nmea, at_port, modem, rmnet and adb): Bus 004 Device 007: ID 2c7c:0800 Quectel Wireless Solutions Co., Ltd. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.20 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x2c7c Quectel Wireless Solutions Co., Ltd. idProduct 0x0800 bcdDevice 4.14 iManufacturer 1 Quectel iProduct 2 LTE-A Module iSerial 3 40046d60 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 328 bNumInterfaces 6 bConfigurationValue 1 iConfiguration 4 DIAG_SER_RMNET bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 224mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 48 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 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 ** UNRECOGNIZED: 05 24 00 10 01 ** UNRECOGNIZED: 05 24 01 00 00 ** UNRECOGNIZED: 04 24 02 02 ** UNRECOGNIZED: 05 24 06 00 00 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x000a 1x 10 bytes bInterval 9 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 ** UNRECOGNIZED: 05 24 00 10 01 ** UNRECOGNIZED: 05 24 01 00 00 ** UNRECOGNIZED: 04 24 02 02 ** UNRECOGNIZED: 05 24 06 00 00 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x000a 1x 10 bytes bInterval 9 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 ** UNRECOGNIZED: 05 24 00 10 01 ** UNRECOGNIZED: 05 24 01 00 00 ** UNRECOGNIZED: 04 24 02 02 ** UNRECOGNIZED: 05 24 06 00 00 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x000a 1x 10 bytes bInterval 9 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 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 5 CDEV Serial Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 9 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8e EP 14 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 6 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x0f EP 15 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 2 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 5 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 66 bInterfaceProtocol 1 iInterface 6 ADB Interface Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x89 EP 9 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 42 bNumDeviceCaps 3 USB 2.0 Extension Device Capability: bLength 7 bDescriptorType 16 bDevCapabilityType 2 bmAttributes 0x00000006 Link Power Management (LPM) Supported SuperSpeed USB Device Capability: bLength 10 bDescriptorType 16 bDevCapabilityType 3 bmAttributes 0x00 wSpeedsSupported 0x000f Device can operate at Low Speed (1Mbps) Device can operate at Full Speed (12Mbps) Device can operate at High Speed (480Mbps) Device can operate at SuperSpeed (5Gbps) bFunctionalitySupport 1 Lowest fully-functional device speed is Full Speed (12Mbps) bU1DevExitLat 1 micro seconds bU2DevExitLat 500 micro seconds ** UNRECOGNIZED: 14 10 0a 00 01 00 00 00 00 11 00 00 30 40 0a 00 b0 40 0a 00 Device Status: 0x0000 (Bus Powered) Signed-off-by: Kristian Evensen Cc: stable Signed-off-by: Johan Hovold commit 85578bbd642f65065039b1765ebe1a867d5435b0 Author: Stephan Gerhold Date: Sun Jan 5 11:27:53 2020 +0100 ASoC: msm8916-wcd-digital: Reset RX interpolation path after use For some reason, attempting to route audio through QDSP6 on MSM8916 causes the RX interpolation path to get "stuck" after playing audio a few times. In this situation, the analog codec part is still working, but the RX path in the digital codec stops working, so you only hear the analog parts powering up. After a reboot everything works again. So far I was not able to reproduce the problem when using lpass-cpu. The downstream kernel driver avoids this by resetting the RX interpolation path after use. In mainline we do something similar for the TX decimator (LPASS_CDC_CLK_TX_RESET_B1_CTL), but the interpolator reset (LPASS_CDC_CLK_RX_RESET_CTL) got lost when the msm8916-wcd driver was split into analog and digital. Fix this problem by adding the reset to msm8916_wcd_digital_enable_interpolator(). Fixes: 150db8c5afa1 ("ASoC: codecs: Add msm8916-wcd digital codec") Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200105102753.83108-1-stephan@gerhold.net Signed-off-by: Mark Brown commit 057efcf9faea4769cf1020677d93d040db9b23f3 Author: Stephan Gerhold Date: Sat Jan 11 17:40:04 2020 +0100 ASoC: msm8916-wcd-analog: Fix MIC BIAS Internal1 MIC BIAS Internal1 is broken at the moment because we always enable the internal rbias resistor to the TX2 line (connected to the headset microphone), rather than enabling the resistor connected to TX1. Move the RBIAS code to pm8916_wcd_analog_enable_micbias_int1/2() to fix this. Fixes: 585e881e5b9e ("ASoC: codecs: Add msm8916-wcd analog codec") Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200111164006.43074-3-stephan@gerhold.net Signed-off-by: Mark Brown commit 877167ef343de2a9be3d31cdd5c41122e61190dd Author: Yu-Hsuan Hsu Date: Sun Jan 12 13:49:00 2020 +0800 ASoC: cros_ec_codec: Make the device acpi compatible Add ACPI entry for cros_ec_codec. Signed-off-by: Yu-Hsuan Hsu Link: https://lore.kernel.org/r/20200112054900.236576-1-yuhsuan@chromium.org Signed-off-by: Mark Brown commit ce780a47c3c01e1e179d0792df6b853a913928f1 Author: Arnaud Pouliquen Date: Mon Jan 13 11:04:00 2020 +0100 ASoC: sti: fix possible sleep-in-atomic Change mutex and spinlock management to avoid sleep in atomic issue. Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200113100400.30472-1-arnaud.pouliquen@st.com Signed-off-by: Mark Brown commit e0beec88397b163c7c4ea6fcfb67e8e07a2671dc Author: Stephan Gerhold Date: Sat Jan 11 17:40:03 2020 +0100 ASoC: msm8916-wcd-analog: Fix selected events for MIC BIAS External1 MIC BIAS External1 sets pm8916_wcd_analog_enable_micbias_ext1() as event handler, which ends up in pm8916_wcd_analog_enable_micbias_ext(). But pm8916_wcd_analog_enable_micbias_ext() only handles the POST_PMU event, which is not specified in the event flags for MIC BIAS External1. This means that the code in the event handler is never actually run. Set SND_SOC_DAPM_POST_PMU as the only event for the handler to fix this. Fixes: 585e881e5b9e ("ASoC: codecs: Add msm8916-wcd analog codec") Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200111164006.43074-2-stephan@gerhold.net Signed-off-by: Mark Brown commit 552b1a85da9f63856e7e341b81c16e0e078204f1 Author: Kai Vehmanen Date: Fri Jan 10 17:57:51 2020 -0600 ASoC: hdac_hda: Fix error in driver removal after failed probe In case system has multiple HDA codecs, and codec probe fails for at least one but not all codecs, driver will end up cancelling a non-initialized timer context upon driver removal. Call trace of typical case: [ 60.593646] WARNING: CPU: 1 PID: 1147 at kernel/workqueue.c:3032 __flush_work+0x18b/0x1a0 [...] [ 60.593670] __cancel_work_timer+0x11f/0x1a0 [ 60.593673] hdac_hda_dev_remove+0x25/0x30 [snd_soc_hdac_hda] [ 60.593674] device_release_driver_internal+0xe0/0x1c0 [ 60.593675] bus_remove_device+0xd6/0x140 [ 60.593677] device_del+0x175/0x3e0 [ 60.593679] ? widget_tree_free.isra.7+0x90/0xb0 [snd_hda_core] [ 60.593680] snd_hdac_device_unregister+0x34/0x50 [snd_hda_core] [ 60.593682] snd_hdac_ext_bus_device_remove+0x2a/0x60 [snd_hda_ext_core] [ 60.593684] hda_dsp_remove+0x26/0x100 [snd_sof_intel_hda_common] [ 60.593686] snd_sof_device_remove+0x84/0xa0 [snd_sof] [ 60.593687] sof_pci_remove+0x10/0x30 [snd_sof_pci] [ 60.593689] pci_device_remove+0x36/0xb0 Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110235751.3404-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2c63bea714780f8e1fc9cb7bc10deda26fada25b Author: Kai Vehmanen Date: Fri Jan 10 17:57:50 2020 -0600 ASoC: SOF: Intel: fix HDA codec driver probe with multiple controllers In case system has multiple HDA controllers, it can happen that same HDA codec driver is used for codecs of multiple controllers. In this case, SOF may fail to probe the HDA driver and SOF initialization fails. SOF HDA code currently relies that a call to request_module() will also run device matching logic to attach driver to the codec instance. However if driver for another HDA controller was already loaded and it already loaded the HDA codec driver, this breaks current logic in SOF. In this case the request_module() SOF does becomes a no-op and HDA Codec driver is not attached to the codec instance sitting on the HDA bus SOF is controlling. Typical scenario would be a system with both external and internal GPUs, with driver of the external GPU loaded first. Fix this by adding similar logic as is used in legacy HDA driver where an explicit device_attach() call is done after request_module(). Also add logic to propagate errors reported by device_attach() back to caller. This also works in the case where drivers are not built as modules. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110235751.3404-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ceca2197b2f1af4cb6e3f32bb7bd2879943406ef Author: Bard liao Date: Fri Jan 10 17:57:48 2020 -0600 ASoC: SOF: Intel: lower print level to dbg if we will reinit DSP We will reinit DSP in a loop when it fails to initialize the first time, as recommended. So, it is not an error before we finally give up. And reorder the trace to make it more readable. Signed-off-by: Bard liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110235751.3404-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 260e41ac4dd3e5acb90be624c03ba7f019615b75 Author: Jerónimo Borque Date: Thu Jan 9 12:23:34 2020 -0300 USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx Add device-ids for the Motorola Solutions TETRA radios MTP3xxx series and MTP85xx series $ lsusb -vd 0cad: Bus 001 Device 009: ID 0cad:9015 Motorola CGISS TETRA PEI interface Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0cad Motorola CGISS idProduct 0x9015 bcdDevice 24.16 iManufacturer 1 iProduct 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0037 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 3 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class 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 0x0040 1x 64 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 0x0040 1x 64 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 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 0x0040 1x 64 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 0x0040 1x 64 bytes bInterval 0 Bus 001 Device 010: ID 0cad:9013 Motorola CGISS TETRA PEI interface Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0cad Motorola CGISS idProduct 0x9013 bcdDevice 24.16 iManufacturer 1 iProduct 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0037 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 3 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class 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 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 0 bInterfaceProtocol 0 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 Signed-off-by: Jerónimo Borque Cc: stable Signed-off-by: Johan Hovold commit c3b040b5c58f9a2de8f672f9e7cb1a8d411b9f23 Author: Tobias Schramm Date: Thu Jan 9 08:31:29 2020 +0100 drm/rockchip: fix integer type used for storing dp data rate commit 2589c4025f13 ("drm/rockchip: Avoid drm_dp_link helpers") changes the type of variables used to store the display port data rate and number of lanes to u8. However u8 is not sufficient to store the link data rate of the display port. This commit reverts the type of data rate to unsigned int. Fixes: 2589c4025f13 ("drm/rockchip: Avoid drm_dp_link helpers") Signed-off-by: Tobias Schramm Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20200109073129.378507-2-t.schramm@manjaro.org commit dce54e861ec74d05cf0b737322700691e81be91b Author: Chris Wilson Date: Fri Jan 10 11:04:02 2020 +0000 drm/i915/gt: Mark ring->vma as active while pinned As we use the active state to keep the vma alive while we are reading its contents during GPU error capture, we need to mark the ring->vma as active during execution if we want to include the rinbuffer in the error state. Reported-by: Lionel Landwerlin Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Lionel Landwerlin Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20200110110402.1231745-3-chris@chris-wilson.co.uk (cherry picked from commit 8ccfc20a7d56d7e16510e6e068ffb7b43c3ac100) Signed-off-by: Joonas Lahtinen commit e2c56d897315c7ddc78f05fae83f2b8df006e0a3 Author: Chris Wilson Date: Fri Jan 10 11:04:01 2020 +0000 drm/i915/gt: Mark context->state vma as active while pinned As we use the active state to keep the vma alive while we are reading its contents during GPU error capture, we need to mark the context->state vma as active during execution if we want to include it in the error state. Reported-by: Lionel Landwerlin Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Lionel Landwerlin Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20200110110402.1231745-2-chris@chris-wilson.co.uk (cherry picked from commit 1b8bfc57267213ddf7f0b03cbd4c40aa65b530d6) Signed-off-by: Joonas Lahtinen commit c3866f54106d4a9175eb3a0c008e73c7d63e8464 Author: Chris Wilson Date: Fri Jan 10 11:04:00 2020 +0000 drm/i915/gt: Skip trying to unbind in restore_ggtt_mappings Currently we first to try to unbind the VMA (and lazily rebind on next use) as an optimisation during restore_ggtt_mappings. Ideally, the only objects in the GGTT upon resume are the pinned kernel objects which can't be unbound and need to be restored. As the unbind interferes with the plan to mark those objects as active for error capture, forgo the optimisation. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200110110402.1231745-1-chris@chris-wilson.co.uk (cherry picked from commit 80e5351df13a5c4e9ecc14a58fa60c84d356ee87) Signed-off-by: Joonas Lahtinen commit ea38aa2ea5b0969776f0a47f174ce928a22be803 Author: YueHaibing Date: Tue Jan 7 21:50:14 2020 +0800 drm/i915: Add missing include file Fix build error: ./drivers/gpu/drm/i915/selftests/i915_random.h: In function i915_prandom_u32_max_state: ./drivers/gpu/drm/i915/selftests/i915_random.h:48:23: error: implicit declaration of function mul_u32_u32; did you mean mul_u64_u32_div? [-Werror=implicit-function-declaration] return upper_32_bits(mul_u32_u32(prandom_u32_state(state), ep_ro)); Reported-by: Hulk Robot Fixes: 7ce5b6850b47 ("drm/i915/selftests: Use mul_u32_u32() for 32b x 32b -> 64b result") Signed-off-by: YueHaibing Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200107135014.36472-1-yuehaibing@huawei.com (cherry picked from commit 62bf5465b26d1f502430b9c654be7d16bf2e242d) Signed-off-by: Joonas Lahtinen commit bc80573ea25bb033a58da81b3ce27205b97c088e Author: Guido Günther Date: Fri Dec 27 11:22:54 2019 +0100 iio: light: vcnl4000: Fix scale for vcnl4040 According to the data sheet the ambient sensor's scale is 0.12 lux/step (not 0.024 lux/step as used by vcnl4200) when the integration time is 80ms. The integration time is currently hardcoded in the driver to that value. See p. 8 in https://www.vishay.com/docs/84307/designingvcnl4040.pdf Fixes: 5a441aade5b3 ("iio: light: vcnl4000 add support for the VCNL4040 proximity and light sensor") Signed-off-by: Guido Günther Reviewed-by: Marco Felsch Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman commit 883f616530692d81cb70f8a32d85c0d2afc05f69 Author: Lars Möllendorf Date: Fri Dec 13 14:50:55 2019 +0100 iio: buffer: align the size of scan bytes to size of the largest element Previous versions of `iio_compute_scan_bytes` only aligned each element to its own length (i.e. its own natural alignment). Because multiple consecutive sets of scan elements are buffered this does not work in case the computed scan bytes do not align with the natural alignment of the first scan element in the set. This commit fixes this by aligning the scan bytes to the natural alignment of the largest scan element in the set. Fixes: 959d2952d124 ("staging:iio: make iio_sw_buffer_preenable much more general.") Signed-off-by: Lars Möllendorf Reviewed-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman commit 217afe63ccf445fc220e5ef480683607b05c0aa5 Author: Tomasz Duszynski Date: Fri Dec 13 22:38:08 2019 +0100 iio: chemical: pms7003: fix unmet triggered buffer dependency IIO triggered buffer depends on IIO buffer which is missing from Kconfig file. This should go unnoticed most of the time because there's a chance something else has already enabled buffers. In some rare cases though one might experience kbuild warnings about unmet direct dependencies and build failures due to missing symbols. Fix this by selecting IIO_BUFFER explicitly. Signed-off-by: Tomasz Duszynski Fixes: a1d642266c14 ("iio: chemical: add support for Plantower PMS7003 sensor") Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman commit fb4fbc8904e786537e29329d791147389e1465a2 Author: Stephan Gerhold Date: Mon Dec 16 13:41:20 2019 +0100 iio: imu: st_lsm6dsx: Fix selection of ST_LSM6DS3_ID At the moment, attempting to probe a device with ST_LSM6DS3_ID (e.g. using the st,lsm6ds3 compatible) fails with: st_lsm6dsx_i2c 1-006b: unsupported whoami [69] ... even though 0x69 is the whoami listed for ST_LSM6DS3_ID. This happens because st_lsm6dsx_check_whoami() also attempts to match unspecified (zero-initialized) entries in the "id" array. ST_LSM6DS3_ID = 0 will therefore match any entry in st_lsm6dsx_sensor_settings (here: the first), because none of them actually have all 12 entries listed in the "id" array. Avoid this by additionally checking if "name" is set, which is only set for valid entries in the "id" array. Note: Although the problem was introduced earlier it did not surface until commit 52f4b1f19679 ("iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1") because ST_LSM6DS3_ID was the first entry in st_lsm6dsx_sensor_settings. Fixes: d068e4a0f921 ("iio: imu: st_lsm6dsx: add support to multiple devices with the same settings") Cc: # 5.4 Acked-by: Lorenzo Bianconi Signed-off-by: Stephan Gerhold Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman commit d7857e4ee1ba69732b16c73b2f2dde83ecd78ee4 Author: Alexandru Tachici Date: Fri Dec 20 12:07:19 2019 +0200 iio: adc: ad7124: Fix DT channel configuration This patch fixes device tree channel configuration. ad7124 driver reads channels configuration from the device tree. It expects to find channel specifications as child nodes. Before this patch ad7124 driver assumed that the child nodes are parsed by for_each_available_child_of_node in the order 0,1,2,3... This is wrong and the real order of the children can be seen by running: dtc -I fs /sys/firmware/devicetree/base on the machine. For example, running this on an rpi 3B+ yields the real children order: 4,2,0,7,5,3,1,6 Before this patch the driver assigned the channel configuration like this: - 0 <- 4 - 1 <- 2 - 2 <- 0 ........ For example, the symptoms can be observed by connecting the 4th channel to a 1V tension and then reading the in_voltage0-voltage19_raw sysfs (multiplied of course by the scale) one would see that channel 0 measures 1V and channel 4 measures only noise. Now the driver uses the reg property of each child in order to correctly identify to which channel the parsed configuration belongs to. Fixes b3af341bbd966: ("iio: adc: Add ad7124 support") Signed-off-by: Alexandru Tachici Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman commit 57388a2ccb6c2f554fee39772886c69b796dde53 Author: Ikjoon Jang Date: Sat Jan 11 01:47:12 2020 +0800 cpuidle: teo: Fix intervals[] array indexing bug Fix a simple bug in rotating array index. Fixes: b26bf6ab716f ("cpuidle: New timer events oriented governor for tickless systems") Signed-off-by: Ikjoon Jang Cc: 5.1+ # 5.1+ Signed-off-by: Rafael J. Wysocki commit 176a7fca81c5090a7240664e3002c106d296bf31 Author: Jian-Hong Pan Date: Mon Dec 30 16:30:45 2019 +0800 platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0 Some of ASUS laptops like UX431FL keyboard backlight cannot be set to brightness 0. According to ASUS' information, the brightness should be 0x80 ~ 0x83. This patch fixes it by following the logic. Fixes: e9809c0b9670 ("asus-wmi: add keyboard backlight support") Signed-off-by: Jian-Hong Pan Reviewed-by: Daniel Drake Signed-off-by: Andy Shevchenko commit 3e2dc6bdb56893bc28257e482e1dbe5d39f313df Author: Takashi Sakamoto Date: Mon Jan 13 17:46:28 2020 +0900 ALSA: dice: fix fallback from protocol extension into limited functionality At failure of attempt to detect protocol extension, ALSA dice driver should be fallback to limited functionality. However it's not. This commit fixes it. Cc: # v4.18+ Fixes: 58579c056c1c9 ("ALSA: dice: use extended protocol to detect available stream formats") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200113084630.14305-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 747d1f076de5a60770011f6e512de43298ec64cb Author: Takashi Sakamoto Date: Mon Jan 13 17:57:19 2020 +0900 ALSA: firewire-tascam: fix corruption due to spin lock without restoration in SoftIRQ context ALSA firewire-tascam driver can bring corruption due to spin lock without restoration of IRQ flag in SoftIRQ context. This commit fixes the bug. Cc: Scott Bahling Cc: # v4.21 Fixes: d7167422433c ("ALSA: firewire-tascam: queue events for change of control surface") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200113085719.26788-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 515ff674bb9bf06186052e352c4587dab8defaf0 Author: Harry Pan Date: Mon Jan 6 17:57:00 2020 +0800 platform/x86: intel_pmc_core: update Comet Lake platform driver Adding new CML CPU model ID into platform driver support list. Signed-off-by: Harry Pan Signed-off-by: Andy Shevchenko commit 1f27dbd8265dbb379926c8f6a4453fe7fe26d7a3 Author: Hans de Goede Date: Mon Jan 6 15:42:19 2020 +0100 platform/x86: GPD pocket fan: Allow somewhat lower/higher temperature limits Allow the user to configure the fan to turn on / speed-up at lower thresholds then before (20 degrees Celcius as minimum instead of 40) and likewise also allow the user to delay the fan speeding-up till the temperature hits 90 degrees Celcius (was 70). Cc: Jason Anderson Reported-by: Jason Anderson Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 6ae01050e49f0080ae30575d9b45a6d4a3d7ee23 Author: Hans de Goede Date: Mon Jan 6 15:42:18 2020 +0100 platform/x86: GPD pocket fan: Use default values when wrong modparams are given Use our default values when wrong module-parameters are given, instead of refusing to load. Refusing to load leaves the fan at the BIOS default setting, which is "Off". The CPU's thermal throttling should protect the system from damage, but not-loading is really not the best fallback in this case. This commit fixes this by re-setting module-parameter values to their defaults if they are out of range, instead of failing the probe with -EINVAL. Cc: stable@vger.kernel.org Cc: Jason Anderson Reported-by: Jason Anderson Fixes: 594ce6db326e ("platform/x86: GPD pocket fan: Use a min-speed of 2 while charging") Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 638bc4ca3d28c25986cce4cbad69d9b8abf1e434 Author: Liming Sun Date: Fri Dec 20 12:04:33 2019 -0500 platform/mellanox: fix potential deadlock in the tmfifo driver This commit fixes the potential deadlock caused by the console Rx and Tx processing at the same time. Rx and Tx both take the console and tmfifo spinlock but in different order which causes potential deadlock. The fix is to use different tmfifo spinlock for Rx and Tx since they protect different resources and it's safe to split the lock. Below is the reported call trace when copying/pasting large string in the console. Rx: _raw_spin_lock_irqsave (hvc lock) __hvc_poll hvc_poll in_intr vring_interrupt mlxbf_tmfifo_rxtx_one_desc (tmfifo lock) mlxbf_tmfifo_rxtx mlxbf_tmfifo_work_rxtx Tx: _raw_spin_lock_irqsave (tmfifo lock) mlxbf_tmfifo_virtio_notify virtqueue_notify virtqueue_kick put_chars hvc_push hvc_write (hvc lock) ... do_tty_write tty_write Fixes: 1357dfd7261f ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc") Cc: # 5.4+ Reviewed-by: David Woods Signed-off-by: Liming Sun Signed-off-by: Andy Shevchenko commit dbff1e07b02d11fae04dd4b1954600baee9e94cc Author: Nishad Kamdar Date: Thu Dec 19 20:00:01 2019 +0530 platform/x86: intel-ips: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to x86 Platform Specific Drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Andy Shevchenko commit 3b675b15571c5342499dec6a0b77d730f1101b62 Author: Gerd Hoffmann Date: Fri Jan 10 10:45:35 2020 +0100 drm/virtio: add missing virtio_gpu_array_lock_resv call When submitting a fenced command we must lock the object reservations because virtio_gpu_queue_fenced_ctrl_buffer() unlocks after adding the fence. Reported-by: Jann Horn Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Tested-by: Jann Horn Link: http://patchwork.freedesktop.org/patch/msgid/20200110094535.23472-1-kraxel@redhat.com commit b3a987b0264d3ddbb24293ebff10eddfc472f653 Author: Linus Torvalds Date: Sun Jan 12 16:55:08 2020 -0800 Linux 5.5-rc6 commit 373adb7313b233d64e21f3f6329fb41a5e6ae180 Merge: 040a3c33623b dc6fcba72f04 Author: Linus Torvalds Date: Sun Jan 12 16:48:39 2020 -0800 Merge tag 'riscv/for-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Paul Walmsley: "Two fixes for RISC-V: - Clear FP registers during boot when FP support is present, rather than when they aren't present - Move the header files associated with the SiFive L2 cache controller to drivers/soc (where the code was recently moved)" * tag 'riscv/for-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fixup obvious bug for fp-regs reset riscv: move sifive_l2_cache.h to include/soc commit dc6fcba72f0435b7884f2e92fd634bb9f78a2c60 Author: Guo Ren Date: Sun Jan 5 10:52:14 2020 +0800 riscv: Fixup obvious bug for fp-regs reset CSR_MISA is defined in Privileged Architectures' spec: 3.1.1 Machine ISA Register misa. Every bit:1 indicate a feature, so we should beqz reset_done when there is no F/D bit in csr_misa register. Signed-off-by: Guo Ren [paul.walmsley@sifive.com: fix typo in commit message] Fixes: 9e80635619b51 ("riscv: clear the instruction cache and all registers when booting") Signed-off-by: Paul Walmsley commit 13cf4cf030183dd9a8731f3fe32456e83b6c7b68 Author: Yash Shah Date: Tue Jan 7 22:09:06 2020 -0800 riscv: move sifive_l2_cache.h to include/soc The commit 9209fb51896f ("riscv: move sifive_l2_cache.c to drivers/soc") moves the sifive L2 cache driver to driver/soc. It did not move the header file along with the driver. Therefore this patch moves the header file to driver/soc Signed-off-by: Yash Shah Reviewed-by: Anup Patel [paul.walmsley@sifive.com: updated to fix the include guard] Fixes: 9209fb51896f ("riscv: move sifive_l2_cache.c to drivers/soc") Signed-off-by: Paul Walmsley commit 040a3c33623ba4bd11588ab0820281b854a3ffaf Merge: 6327edceb62b 55817b340a31 Author: Linus Torvalds Date: Sun Jan 12 09:35:42 2020 -0800 Merge tag 'iommu-fixes-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Two fixes for VT-d and generic IOMMU code to fix teardown on error handling code paths. - Patch for the Intel VT-d driver to fix handling of non-PCI devices - Fix W=1 compile warning in dma-iommu code * tag 'iommu-fixes-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/dma: fix variable 'cookie' set but not used iommu/vt-d: Unlink device if failed to add to group iommu: Remove device link to group on failure iommu/vt-d: Fix adding non-PCI devices to Intel IOMMU commit 555089fdfc37ad65e0ee9b42ca40c238ff546f83 Author: Martin KaFai Lau Date: Fri Jan 10 15:16:44 2020 -0800 bpftool: Fix printing incorrect pointer in btf_dump_ptr For plain text output, it incorrectly prints the pointer value "void *data". The "void *data" is actually pointing to memory that contains a bpf-map's value. The intention is to print the content of the bpf-map's value instead of printing the pointer pointing to the bpf-map's value. In this case, a member of the bpf-map's value is a pointer type. Thus, it should print the "*(void **)data". Fixes: 22c349e8db89 ("tools: bpftool: fix format strings and arguments for jsonw_printf()") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200110231644.3484151-1-kafai@fb.com commit 6327edceb62bc4c91195e2dc6d5574a53005cb5a Merge: 606e9ad20094 cf8ce8b80f8b Author: Linus Torvalds Date: Sat Jan 11 15:40:43 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: "Two driver bugfixes, a documentation fix, and a removal of a spec violation for the bus recovery algorithm in the core" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: fix bus recovery stop mode timing i2c: bcm2835: Store pointer to bus clock dt-bindings: i2c: at91: fix i2c-sda-hold-time-ns documentation for sam9x60 i2c: at91: fix clk_offset for sam9x60 commit 606e9ad20094f6d500166881d301f31a51bc8aa7 Merge: ac61145a725a 457677c70c76 Author: Linus Torvalds Date: Sat Jan 11 15:33:48 2020 -0800 Merge tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread fixes from Christian Brauner: "This contains a series of patches to fix CLONE_SETTLS when used with clone3(). The clone3() syscall passes the tls argument through struct clone_args instead of a register. This means, all architectures that do not implement copy_thread_tls() but still support CLONE_SETTLS via copy_thread() expecting the tls to be located in a register argument based on clone() are currently unfortunately broken. Their tls value will be garbage. The patch series fixes this on all architectures that currently define __ARCH_WANT_SYS_CLONE3. It also adds a compile-time check to ensure that any architecture that enables clone3() in the future is forced to also implement copy_thread_tls(). My ultimate goal is to get rid of the copy_thread()/copy_thread_tls() split and just have copy_thread_tls() at some point in the not too distant future (Maybe even renaming copy_thread_tls() back to simply copy_thread() once the old function is ripped from all arches). This is dependent now on all arches supporting clone3(). While all relevant arches do that now there are still four missing: ia64, m68k, sh and sparc. They have the system call reserved, but not implemented. Once they all implement clone3() we can get rid of ARCH_WANT_SYS_CLONE3 and HAVE_COPY_THREAD_TLS. This series also includes a minor fix for the arm64 uapi headers which caused __NR_clone3 to be missing from the exported user headers. Unfortunately the series came in a little late especially given that it touches a range of architectures. Due to the holidays not all arch maintainers responded in time probably due to their backlog. Will and Arnd have thankfully acked the arm specific changes. Given that the changes are straightforward and rather minimal combined with the fact the that clone3() with CLONE_SETTLS is broken I decided to send them post rc3 nonetheless" * tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: um: Implement copy_thread_tls clone3: ensure copy_thread_tls is implemented xtensa: Implement copy_thread_tls riscv: Implement copy_thread_tls parisc: Implement copy_thread_tls arm: Implement copy_thread_tls arm64: Implement copy_thread_tls arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers commit c9f53049d4a842db6bcd76f597759a0ef5f65c86 Author: Jakub Kicinski Date: Sat Jan 11 06:07:52 2020 -0800 MAINTAINERS: update my email address My Netronome email address may become inactive soon. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit fb0c90ab92cac104576303386421bd90e505e505 Author: Jacob Keller Date: Thu Jan 9 11:08:21 2020 -0800 doc: fix typo of snapshot in documentation A couple of locations accidentally misspelled snapshot as shapshot. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit b0efcae5e12b341e569f971ccd193e31f1d0ffa8 Author: Jacob Keller Date: Thu Jan 9 11:08:20 2020 -0800 devlink: correct misspelling of snapshot The function to obtain a unique snapshot id was mistakenly typo'd as devlink_region_shapshot_id_get. Fix this typo by renaming the function and all of its users. Signed-off-by: Jacob Keller Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 7fba6aea4472f01a404d81a12237ae9a1ff418ce Author: Takashi Iwai Date: Thu Jan 9 09:20:00 2020 +0100 ALSA: hda: Rename back to dmic_detect option We've got quite a few bug reports showing the SOF driver being loaded unintentionally recently, and the reason seems to be that users didn't know the module option change: with the recent kernel, a new option dsp_driver=1 has to be passed to a new module snd-intel-dspcfg instead of snd_hda_intel.dmic_detect=0 option. That is, actually there are two tricky things here: - We changed the whole detection in another module and another option semantics. - The existing option for skipping the DSP probe was also renamed. For avoiding the confusion and giving user more hint, this patch reverts the renamed option dsp_driver back to dmic_detect for snd-hda-intel module, and show the warning about the module option change when the non-default value is passed. Fixes: 82d9d54a6c0e ("ALSA: hda: add Intel DSP configuration / probe code") Link: https://lore.kernel.org/r/20200109082000.26729-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit a5c3a7c0ce1a1cfab15404018933775d7222a517 Merge: 4c582234ab39 a26ad4d5676f Author: David S. Miller Date: Fri Jan 10 23:32:54 2020 -0800 Merge branch 'DP83822-and-DP83TC811-Fixes' Dan Murphy says: ==================== DP83822 and DP83TC811 Fixes Two fixes on net/phy/Kconfig for the TI ethernet PHYs. First fixed the typo in the Kconfig for the DP83TC811 where it incorretly stated that the support was for a DP83TC822 which does not exist. Second fix was to update the DP83822 Kconfig entry to indicate support for the DP83825 devices in the description and the prompt. ==================== Signed-off-by: David S. Miller commit a26ad4d5676f5e28216bea57851ddc4cccaf8861 Author: Dan Murphy Date: Fri Jan 10 14:03:57 2020 -0600 net: phy: DP83822: Update Kconfig with DP83825I support Update the Kconfig description to indicate support for the DP83825I device as well. Fixes: 32b12dc8fde1 ("net: phy: Add DP83825I to the DP83822 driver") Reviewed-by: Andrew Lunn Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit 443180567763789b5b1c36cc2afa06397baf954f Author: Dan Murphy Date: Fri Jan 10 14:03:56 2020 -0600 net: phy: DP83TC811: Fix typo in Kconfig Fix typo in the Kconfig for the DP83TC811 as it indicates support for the DP83TC822 which is incorrect. Fixes: 6d749428788b {"net: phy: DP83TC811: Introduce support for the DP83TC811 phy") Reviewed-by: Andrew Lunn Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit b47611c8c389c3db4b6adeb3d5aa577efa0166df Merge: 41ec98def8d2 3433bdf98d8e Author: Olof Johansson Date: Fri Jan 10 22:12:53 2020 -0800 Merge tag 'v5.5-rockchip-dtsfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes A fix for the Beelink A1 IR receiver setting the correct polarity. * tag 'v5.5-rockchip-dtsfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Fix IR on Beelink A1 Link: https://lore.kernel.org/r/2054603.JKFSmqfO19@phil Signed-off-by: Olof Johansson commit 41ec98def8d2fd03a4c2c29a7afef40846423ca0 Merge: 3f2b5941d335 1c226017d3ec Author: Olof Johansson Date: Fri Jan 10 22:12:33 2020 -0800 Merge tag 'sunxi-fixes-for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes A couple of fixes for GPIO polarity and regulators on the A64 olinuxino. * tag 'sunxi-fixes-for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: a83t: Correct USB3503 GPIOs polarity arm64: dts: allwinner: a64: olinuxino: Fix SDIO supply regulator arm64: dts: allwinner: a64: olinuxino: Fix eMMC supply regulator Link: https://lore.kernel.org/r/582f4fda-38af-43e8-af58-957aee5b9dd8.lettre@localhost Signed-off-by: Olof Johansson commit 3f2b5941d3355f3613dcdf6a575aa0d0874d84d8 Merge: dc64f487f4c4 4b0b97e651ec Author: Olof Johansson Date: Fri Jan 10 22:12:16 2020 -0800 Merge tag 'imx-fixes-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.5, round 2: - Fix i.MX8MM SDMA1 AHB clock setting to remove a "Timeout waiting for CH0" error seen with UART1. - Correct compatible of RV3029 RTC device on imx6q-dhcom board. - Correct interrupt trigger type for magnetometer on board imx8mq-librem5-devkit. - A series from Anson Huang to fix vdd3p0 power supplier for a few NXP development board. - Fix imx6q-icore-mipi board to use 1.5 version of i.Core MX6DL, so that Ethernet interface on the board works properly. - Fix Toradex Colibri board to get NAND flash support back. - Fix SGTL5000 VDDIO regulator connection for imx6q-dhcom, which is connected to PMIC SW2 output rather than a fixed 3V3 rail. - Fix 'reg' of CPU node on imx7ulp to get rid of a warning given by kernel. - Fix endian setting for DCFG on LS1028A SoC, so that register access of DCFG becomes correct. * tag 'imx-fixes-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx7: Fix Toradex Colibri iMX7S 256MB NAND flash support ARM: dts: imx6sll-evk: Remove incorrect power supply assignment ARM: dts: imx6sl-evk: Remove incorrect power supply assignment ARM: dts: imx6sx-sdb: Remove incorrect power supply assignment ARM: dts: imx6qdl-sabresd: Remove incorrect power supply assignment ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6DL arm64: dts: imx8mq-librem5-devkit: use correct interrupt for the magnetometer ARM: dts: imx6q-dhcom: Fix SGTL5000 VDDIO regulator connection ARM: dts: imx7ulp: fix reg of cpu node arm64: dts: imx8mm: Change SDMA1 ahb clock for imx8mm arm64: dts: ls1028a: fix endian setting for dcfg ARM: dts: imx6q-dhcom: fix rtc compatible Link: https://lore.kernel.org/r/20200110011836.GW4456@T480 Signed-off-by: Olof Johansson commit dc64f487f4c4e7a03bfa0a7c0e8e6a49214373d0 Merge: 9f1c2cb3296a 30388cc07572 Author: Olof Johansson Date: Fri Jan 10 22:11:12 2020 -0800 Merge tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/fixes arm-soc: Amlogic fixes for v5.5-rc * tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson-sm1-sei610: add gpio bluetooth interrupt dt-bindings: reset: meson8b: fix duplicate reset IDs soc: amlogic: meson-ee-pwrc: propagate errors from pm_genpd_init() soc: amlogic: meson-ee-pwrc: propagate PD provider registration errors ARM: dts: meson8: fix the size of the PMU registers arm64: dts: meson-sm1-sei610: gpio-keys: switch to IRQs Link: https://lore.kernel.org/r/7hmuaweavi.fsf@baylibre.com Signed-off-by: Olof Johansson commit 4c582234ab3948d08a24c82eb1e00436aabacbc6 Author: Ido Schimmel Date: Thu Jan 9 19:57:41 2020 +0200 devlink: Wait longer before warning about unset port type The commit cited below causes devlink to emit a warning if a type was not set on a devlink port for longer than 30 seconds to "prevent misbehavior of drivers". This proved to be problematic when unregistering the backing netdev. The flow is always: devlink_port_type_clear() // schedules the warning unregister_netdev() // blocking devlink_port_unregister() // cancels the warning The call to unregister_netdev() can block for long periods of time for various reasons: RTNL lock is contended, large amounts of configuration to unroll following dismantle of the netdev, etc. This results in devlink emitting a warning despite the driver behaving correctly. In emulated environments (of future hardware) which are usually very slow, the warning can also be emitted during port creation as more than 30 seconds can pass between the time the devlink port is registered and when its type is set. In addition, syzbot has hit this warning [1] 1974 times since 07/11/19 without being able to produce a reproducer. Probably because reproduction depends on the load or other bugs (e.g., RTNL not being released). To prevent bogus warnings, increase the timeout to 1 hour. [1] https://syzkaller.appspot.com/bug?id=e99b59e9c024a666c9f7450dc162a4b74d09d9cb Fixes: 136bf27fc0e9 ("devlink: add warning in case driver does not set port type") Signed-off-by: Ido Schimmel Reported-by: syzbot+b0a18ed7b08b735d2f41@syzkaller.appspotmail.com Reported-by: Alex Veber Tested-by: Alex Veber Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit dfb9a8857f4decbba8c2206e8877e1d741ee1b47 Author: Daniel Campello Date: Tue Jan 7 11:24:21 2020 -0700 platform/chrome: wilco_ec: Fix keyboard backlight probing The EC on the Wilco platform responds with 0xFF to commands related to the keyboard backlight on the absence of a keyboard backlight module. This change allows the EC driver to continue loading even if the backlight module is not present. Fixes: 119a3cb6d687 ("platform/chrome: wilco_ec: Add keyboard backlight LED support") Signed-off-by: Daniel Campello Signed-off-by: Enric Balletbo i Serra Signed-off-by: Benson Leung commit 6b32391ed675827f8425a414abbc6fbd54ea54fe Author: Johan Hovold Date: Fri Jan 10 12:01:27 2020 -0800 Input: sur40 - fix interface sanity checks Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. This in turn could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: bdb5c57f209c ("Input: add sur40 driver for Samsung SUR40 (aka MS Surface 2.0/Pixelsense)") Signed-off-by: Johan Hovold Acked-by: Vladis Dronov Link: https://lore.kernel.org/r/20191210113737.4016-8-johan@kernel.org Signed-off-by: Dmitry Torokhov commit cea7991144754044c540bf9f974550ea5fec500c Author: Johan Hovold Date: Fri Jan 10 12:01:07 2020 -0800 Input: gtco - drop redundant variable reinit Drop the second, redundant reinitialisation of the endpoint-descriptor pointer from probe. Signed-off-by: Johan Hovold Acked-by: Vladis Dronov Link: https://lore.kernel.org/r/20191210113737.4016-7-johan@kernel.org Signed-off-by: Dmitry Torokhov commit 3563c629fb9a29b08df53747217b89444f4cd32b Author: Johan Hovold Date: Fri Jan 10 12:00:41 2020 -0800 Input: gtco - fix extra-descriptor debug message Make sure to use the current altsetting when printing size of any extra descriptors of the interface. Also fix the s/endpoint/interface/ mixup in the message itself. Signed-off-by: Johan Hovold Acked-by: Vladis Dronov Link: https://lore.kernel.org/r/20191210113737.4016-6-johan@kernel.org Signed-off-by: Dmitry Torokhov commit a8eeb74df5a6bdb214b2b581b14782c5f5a0cf83 Author: Johan Hovold Date: Fri Jan 10 12:00:18 2020 -0800 Input: gtco - fix endpoint sanity check The driver was checking the number of endpoints of the first alternate setting instead of the current one, something which could lead to the driver binding to an invalid interface. This in turn could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 162f98dea487 ("Input: gtco - fix crash on detecting device without endpoints") Signed-off-by: Johan Hovold Acked-by: Vladis Dronov Link: https://lore.kernel.org/r/20191210113737.4016-5-johan@kernel.org Signed-off-by: Dmitry Torokhov commit cfa4f6a99fb183742cace65ec551b444852b8ef6 Author: Johan Hovold Date: Fri Jan 10 11:59:52 2020 -0800 Input: aiptek - use descriptors of current altsetting Make sure to always use the descriptors of the current alternate setting to avoid future issues when accessing fields that may differ between settings. Signed-off-by: Johan Hovold Acked-by: Vladis Dronov Link: https://lore.kernel.org/r/20191210113737.4016-4-johan@kernel.org Signed-off-by: Dmitry Torokhov commit 3111491fca4f01764e0c158c5e0f7ced808eef51 Author: Johan Hovold Date: Fri Jan 10 11:59:32 2020 -0800 Input: aiptek - fix endpoint sanity check The driver was checking the number of endpoints of the first alternate setting instead of the current one, something which could lead to the driver binding to an invalid interface. This in turn could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 8e20cf2bce12 ("Input: aiptek - fix crash on detecting device without endpoints") Signed-off-by: Johan Hovold Acked-by: Vladis Dronov Link: https://lore.kernel.org/r/20191210113737.4016-3-johan@kernel.org Signed-off-by: Dmitry Torokhov commit bcfcb7f9b480dd0be8f0df2df17340ca92a03b98 Author: Johan Hovold Date: Fri Jan 10 11:55:47 2020 -0800 Input: pegasus_notetaker - fix endpoint sanity check The driver was checking the number of endpoints of the first alternate setting instead of the current one, something which could be used by a malicious device (or USB descriptor fuzzer) to trigger a NULL-pointer dereference. Fixes: 1afca2b66aac ("Input: add Pegasus Notetaker tablet driver") Signed-off-by: Johan Hovold Acked-by: Martin Kepplinger Acked-by: Vladis Dronov Link: https://lore.kernel.org/r/20191210113737.4016-2-johan@kernel.org Signed-off-by: Dmitry Torokhov commit 97e24b095348a15ec08c476423c3b3b939186ad7 Author: Chuhong Yuan Date: Fri Jan 10 10:30:04 2020 -0800 Input: sun4i-ts - add a check for devm_thermal_zone_of_sensor_register The driver misses a check for devm_thermal_zone_of_sensor_register(). Add a check to fix it. Fixes: e28d0c9cd381 ("input: convert sun4i-ts to use devm_thermal_zone_of_sensor_register") Signed-off-by: Chuhong Yuan Signed-off-by: Dmitry Torokhov commit 7f439bc2d7e8c8cc4e1bab08ab7fe1bb73c9b268 Author: Miles Chen Date: Thu Jan 2 15:10:16 2020 -0800 Input: evdev - convert kzalloc()/vzalloc() to kvzalloc() We observed a large(order-3) allocation in evdev_open() and it may cause an OOM kernel panic in kzalloc(), before we getting to the vzalloc() fallback. Fix it by converting kzalloc()/vzalloc() to kvzalloc() to avoid the OOM killer logic as we have a vmalloc fallback. InputReader invoked oom-killer: gfp_mask=0x240c2c0 (GFP_KERNEL|__GFP_NOWARN|__GFP_COMP|__GFP_ZERO), nodemask=0, order=3, oom_score_adj=-900 ... (dump_backtrace) from (show_stack+0x18/0x1c) (show_stack) from (dump_stack+0x94/0xa8) (dump_stack) from (dump_header+0x7c/0xe4) (dump_header) from (out_of_memory+0x334/0x348) (out_of_memory) from (__alloc_pages_nodemask+0xe9c/0xeb8) (__alloc_pages_nodemask) from (kmalloc_order_trace+0x34/0x128) (kmalloc_order_trace) from (__kmalloc+0x258/0x36c) (__kmalloc) from (evdev_open+0x5c/0x17c) (evdev_open) from (chrdev_open+0x100/0x204) (chrdev_open) from (do_dentry_open+0x21c/0x354) (do_dentry_open) from (vfs_open+0x58/0x84) (vfs_open) from (path_openat+0x640/0xc98) (path_openat) from (do_filp_open+0x78/0x11c) (do_filp_open) from (do_sys_open+0x130/0x244) (do_sys_open) from (SyS_openat+0x14/0x18) (SyS_openat) from (__sys_trace_return+0x0/0x10) ... Normal: 12488*4kB (UMEH) 6984*8kB (UMEH) 2101*16kB (UMEH) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 139440kB HighMem: 206*4kB (H) 131*8kB (H) 42*16kB (H) 2*32kB (H) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 2608kB ... Kernel panic - not syncing: Out of memory and no killable processes... Signed-off-by: Miles Chen Signed-off-by: Dmitry Torokhov commit ac61145a725ab0411c5f8ed9aeca6202076ecfd8 Merge: 213356fe986f 9e635c2851df Author: Linus Torvalds Date: Fri Jan 10 13:41:16 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fix from Jiri Kosina: "A regression fix for EPOLLOUT handling in hidraw and uhid" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: hidraw, uhid: Always report EPOLLOUT commit 213356fe986faff3580f2c12c14773f53da32768 Merge: 9fb7007de8a2 1530f6f5f580 Author: Linus Torvalds Date: Fri Jan 10 13:29:40 2020 -0800 Merge tag 'usb-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY fixes from Greg KH: "Here are a number of USB and PHY driver fixes for 5.5-rc6 Nothing all that unusual, just the a bunch of small fixes for a lot of different reported issues. The PHY driver fixes are in here as they interacted with the usb drivers. Full details of the patches are in the shortlog, and all of these have been in linux-next with no reported issues" * tag 'usb-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (24 commits) usb: missing parentheses in USE_NEW_SCHEME usb: ohci-da8xx: ensure error return on variable error is set usb: musb: Disable pullup at init usb: musb: fix idling for suspend after disconnect interrupt usb: typec: ucsi: Fix the notification bit offsets USB: Fix: Don't skip endpoint descriptors with maxpacket=0 USB-PD tcpm: bad warning+size, PPS adapters phy/rockchip: inno-hdmi: round clock rate down to closest 1000 Hz usb: chipidea: host: Disable port power only if previously enabled usb: cdns3: should not use the same dev_id for shared interrupt handler usb: dwc3: gadget: Fix request complete check usb: musb: dma: Correct parameter passed to IRQ handler usb: musb: jz4740: Silence error if code is -EPROBE_DEFER usb: udc: tegra: select USB_ROLE_SWITCH USB: core: fix check for duplicate endpoints phy: cpcap-usb: Drop extra write to usb2 register phy: cpcap-usb: Improve host vs docked mode detection phy: cpcap-usb: Prevent USB line glitches from waking up modem phy: mapphone-mdm6600: Fix uninitialized status value regression phy: cpcap-usb: Fix flakey host idling and enumerating of devices ... commit 9fb7007de8a2a80e4b55a850311fca10de62f1b5 Merge: 7da37cd0520e 68faa679b8be Author: Linus Torvalds Date: Fri Jan 10 13:25:24 2020 -0800 Merge tag 'char-misc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fix from Greg KH: "Here is a single fix, for the chrdev core, for 5.5-rc6 There's been a long-standing race condition triggered by syzbot, and occasionally real people, in the chrdev open() path. Will finally took the time to track it down and fix it for real before the holidays. Here's that one patch, it's been in linux-next for a while with no reported issues and it does fix the reported problem" * tag 'char-misc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: chardev: Avoid potential use-after-free in 'chrdev_open()' commit 7da37cd0520e71707a1190022377941b9cec3b0b Merge: 5a96c0bbff86 58dcc5bf4030 Author: Linus Torvalds Date: Fri Jan 10 13:22:11 2020 -0800 Merge tag 'staging-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging fixes from Greg KH: "Here are some small staging driver fixes for 5.5-rc6. Nothing major here, just some small fixes for a comedi driver, the vt6656 driver, and a new device id for the rtl8188eu driver. All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21 staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713 staging: vt6656: set usb_set_intfdata on driver fail. staging: vt6656: remove bool from vnt_radio_power_on ret staging: vt6656: limit reg output to block size staging: vt6656: correct return of vnt_init_registers. staging: vt6656: Fix non zero logical return of, usb_control_msg commit 5a96c0bbff8690afb3a2fcfc80208cd6590f6e88 Merge: 4e4cd21c64da c5ee0b3104e0 Author: Linus Torvalds Date: Fri Jan 10 13:17:21 2020 -0800 Merge tag 'tty-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are two tty/serial driver fixes for 5.5-rc6. The first fixes a much much reported issue with a previous tty port link patch that is in your tree, and the second fixes a problem where the serdev driver would claim ACPI devices that it shouldn't be claiming. Both have been in linux-next for a while with no reported issues" * tag 'tty-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serdev: Don't claim unsupported ACPI serial devices tty: always relink the port commit 4e4cd21c64dadc608e569a15b56e86eb85137fc9 Merge: 30b6487d1519 e17016f6dcb0 Author: Linus Torvalds Date: Fri Jan 10 12:05:26 2020 -0800 Merge tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes that should go into this round. This pull request contains two NVMe fixes via Keith, removal of a dead function, and a fix for the bio op for read truncates (Ming)" * tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block: nvmet: fix per feat data len for get_feature nvme: Translate more status codes to blk_status_t fs: move guard_bio_eod() after bio_set_op_attrs block: remove unused mp_bvec_last_segment commit 30b6487d151981e850de19b2b3feefd9b9791957 Merge: 4936ce17bf7c eacc6dfaea96 Author: Linus Torvalds Date: Fri Jan 10 12:03:12 2020 -0800 Merge tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block Pull io_uring fix from Jens Axboe: "Single fix for this series, fixing a regression with the short read handling. This just removes it, as it cannot safely be done for all cases" * tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block: io_uring: remove punt of short reads to async context commit 4936ce17bf7c4a17a9223a0b7d96c49d62767762 Merge: b1d198c08ccc 82de6a6fb67e Author: Linus Torvalds Date: Fri Jan 10 11:57:10 2020 -0800 Merge tag 'mtd/fixes-for-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD fixes from Miquel Raynal: "MTD: - sm_ftl: Fix NULL pointer warning. Raw NAND: - Cadence: fix compile testing. - STM32: Avoid locking. Onenand: - Fix several sparse/build warnings. SPI-NOR: - Add a flag to fix interaction with Micron parts" * tag 'mtd/fixes-for-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: spi-nor: Fix the writing of the Status Register on micron flashes mtd: sm_ftl: fix NULL pointer warning mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy mtd: onenand: samsung: Fix iomem access with regular memcpy mtd: onenand: omap2: Fix errors in style mtd: cadence: Fix cast to pointer from integer of different size warning mtd: rawnand: stm32_fmc2: avoid to lock the CPU bus commit b1d198c08ccc8fc794384a50c5202dbdf8eba8c6 Merge: 658e1af5eec6 8e85def5723e Author: Linus Torvalds Date: Fri Jan 10 11:52:36 2020 -0800 Merge tag 'sound-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few piled ASoC fixes and usual HD-audio and USB-audio fixups. Some of them are for ASoC core error-handling" * tag 'sound-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda: enable regmap internal locking ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen ALSA: hda/realtek - Set EAPD control to default for ALC222 ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5 ALSA: hda/realtek - Add new codec supported for ALCS1200A ASoC: Intel: boards: Fix compile-testing RT1011/RT5682 ASoC: SOF: imx8: Fix dsp_box offset ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime() ASoC: fsl_audmix: add missed pm_runtime_disable ASoC: stm32: spdifrx: fix input pin state management ASoC: stm32: spdifrx: fix race condition in irq handler ASoC: stm32: spdifrx: fix inconsistent lock state ASoC: core: Fix access to uninitialized list heads ASoC: soc-core: Set dpcm_playback / dpcm_capture ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev ASoC: SOF: Intel: hda: hda-dai: fix oops on hda_link .hw_free ASoC: SOF: fix fault at driver unload after failed probe commit 658e1af5eec6d51f95fa81e61f67d2fe1c6376aa Merge: c23e744b59ef 344fa0bad693 Author: Linus Torvalds Date: Fri Jan 10 11:48:37 2020 -0800 Merge tag 'thermal-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal fix from Daniel Lezcano: "Fix backward compatibility with old DTBs on QCOM tsens (Amit Kucheria)" * tag 'thermal-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: drivers: thermal: tsens: Work with old DTBs commit c23e744b59efcf546b2b16834c68b85248d6bf3b Merge: bef1d88263ff 10674d97c4e2 Author: Linus Torvalds Date: Fri Jan 10 11:46:59 2020 -0800 Merge tag 'pm-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Prevent the cpufreq-dt driver from probing Tegra20/30 (Dmitry Osipenko) and prevent the Intel RAPL power capping driver from crashing during CPU initialization due to a NULL pointer dereference if the processor model in use is not known to it (Harry Pan)" * tag 'pm-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online() cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCs commit 9827c0634e461703abf81e8cc8b7adf5da5886d0 Author: David Ahern Date: Fri Jan 10 09:03:58 2020 -0800 ipv4: Detect rollover in specific fib table dump Sven-Haegar reported looping on fib dumps when 255.255.255.255 route has been added to a table. The looping is caused by the key rolling over from FFFFFFFF to 0. When dumping a specific table only, we need a means to detect when the table dump is done. The key and count saved to cb args are both 0 only at the start of the table dump. If key is 0 and count > 0, then we are in the rollover case. Detect and return to avoid looping. This only affects dumps of a specific table; for dumps of all tables (the case prior to the change in the Fixes tag) inet_dump_fib moved the entry counter to the next table and reset the cb args used by fib_table_dump and fn_trie_dump_leaf, so the rollover ffffffff back to 0 did not cause looping with the dumps. Fixes: effe67926624 ("net: Enable kernel side filtering of route dumps") Reported-by: Sven-Haegar Koch Signed-off-by: David Ahern Signed-off-by: David S. Miller commit b509750f8e87794c97dc199a92ea4e4e47db0b16 Merge: db885e66d268 7bd754c47dd3 Author: David S. Miller Date: Fri Jan 10 11:31:10 2020 -0800 Merge branch 'stmmac-filtering-fixes' Jose Abreu says: ==================== net: stmmac: Filtering fixes Two single fixes for the L3 and L4 filtering in stmmac. 1) Updates the internal status of RSS when disabling it in order to keep internal driver status consistent. 2) Do not lets user add a filter if RSS is enabled because the filter will not work correctly as RSS bypasses this mechanism. ==================== Signed-off-by: David S. Miller commit 7bd754c47dd3ad1b048c9641294b0234fcce2c58 Author: Jose Abreu Date: Fri Jan 10 16:23:53 2020 +0100 net: stmmac: tc: Do not setup flower filtering if RSS is enabled RSS, when enabled, will bypass the L3 and L4 filtering causing it not to work. Add a check before trying to setup the filters. Fixes: 425eabddaf0f ("net: stmmac: Implement L3/L4 Filters using TC Flower") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit e715d74504352968cf24ac95476706bc911a69cd Author: Jose Abreu Date: Fri Jan 10 16:23:52 2020 +0100 net: stmmac: selftests: Update status when disabling RSS We are disabling RSS on HW but not updating the internal private status to the 'disabled' state. This is needed for next tc commit that will check if RSS is disabled before trying to apply filters. Fixes: 4647e021193d ("net: stmmac: selftests: Add selftest for L3/L4 Filters") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit db885e66d268884dc72967279b7e84f522556abc Author: Jakub Kicinski Date: Fri Jan 10 04:38:32 2020 -0800 net/tls: fix async operation Mallesham reports the TLS with async accelerator was broken by commit d10523d0b3d7 ("net/tls: free the record on encryption error") because encryption can return -EINPROGRESS in such setups, which should not be treated as an error. The error is also present in the BPF path (likely copied from there). Reported-by: Mallesham Jatharakonda Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling") Fixes: d10523d0b3d7 ("net/tls: free the record on encryption error") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5c5d22a750d4bcf35e9539dccec397b0edcce176 Author: Jakub Kicinski Date: Fri Jan 10 04:36:55 2020 -0800 net/tls: avoid spurious decryption error with HW resync When device loses sync mid way through a record - kernel has to re-encrypt the part of the record which the device already decrypted to be able to decrypt and authenticate the record in its entirety. The re-encryption piggy backs on the decryption routine, but obviously because the partially decrypted record can't be authenticated crypto API returns an error which is then ignored by tls_device_reencrypt(). Commit 5c5ec6685806 ("net/tls: add TlsDecryptError stat") added a statistic to count decryption errors, this statistic can't be incremented when we see the expected re-encryption error. Move the inc to the caller. Reported-and-tested-by: David Beckett Fixes: 5c5ec6685806 ("net/tls: add TlsDecryptError stat") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2e012c74823629d9db27963c79caa3f5b2010746 Author: Lorenz Bauer Date: Fri Jan 10 13:23:36 2020 +0000 net: bpf: Don't leak time wait and request sockets It's possible to leak time wait and request sockets via the following BPF pseudo code:   sk = bpf_skc_lookup_tcp(...) if (sk) bpf_sk_release(sk) If sk->sk_state is TCP_NEW_SYN_RECV or TCP_TIME_WAIT the refcount taken by bpf_skc_lookup_tcp is not undone by bpf_sk_release. This is because sk_flags is re-used for other data in both kinds of sockets. The check !sock_flag(sk, SOCK_RCU_FREE) therefore returns a bogus result. Check that sk_flags is valid by calling sk_fullsock. Skip checking SOCK_RCU_FREE if we already know that sk is not a full socket. Fixes: edbf8c01de5a ("bpf: add skc_lookup_tcp helper") Fixes: f7355a6c0497 ("bpf: Check sk_fullsock() before returning from bpf_sk_lookup()") Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200110132336.26099-1-lmb@cloudflare.com commit ffd08731b2d632459428612431060cf902324a8d Author: Vincenzo Frascino Date: Thu Nov 28 11:17:19 2019 +0000 lib/vdso: Make __cvdso_clock_getres() static Fix the following sparse warning in the generic vDSO library: linux/lib/vdso/gettimeofday.c:224:5: warning: symbol '__cvdso_clock_getres' was not declared. Should it be static? Make it static and also mark it __maybe_unsed. Fixes: 502a590a170b ("lib/vdso: Move fallback invocation to the callers") Reported-by: Marc Gonzalez Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191128111719.8282-1-vincenzo.frascino@arm.com commit e17016f6dcb047f91a8fc9f46bbf81a21d15ca73 Author: Amit Engel Date: Wed Jan 8 01:47:24 2020 +0900 nvmet: fix per feat data len for get_feature The existing implementation for the get_feature admin-cmd does not use per-feature data len. This patch introduces a new helper function nvmet_feat_data_len(), which is used to calculate per feature data len. Right now we only set data len for fid 0x81 (NVME_FEAT_HOST_ID). Fixes: commit e9061c397839 ("nvmet: Remove the data_len field from the nvmet_req struct") Reviewed-by: Christoph Hellwig Signed-off-by: Amit Engel [endiness, naming, and kernel style fixes] Signed-off-by: Chaitanya Kulkarni Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 35038bffa87da282010b91108cadd13238bb5bbd Author: Keith Busch Date: Fri Dec 6 04:50:44 2019 +0900 nvme: Translate more status codes to blk_status_t Decode interrupted command and not ready namespace nvme status codes to BLK_STS_TARGET. These are not generic IO errors and should use a non-path specific error so that it can use the non-failover retry path. Reported-by: John Meneghini Cc: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 9e635c2851df6caee651e589fbf937b637973c91 Author: Jiri Kosina Date: Fri Jan 10 15:32:51 2020 +0100 HID: hidraw, uhid: Always report EPOLLOUT hidraw and uhid device nodes are always available for writing so we should always report EPOLLOUT and EPOLLWRNORM bits, not only in the cases when there is nothing to read. Reported-by: Linus Torvalds Fixes: be54e7461ffdc ("HID: uhid: Fix returning EPOLLOUT from uhid_char_poll") Fixes: 9f3b61dc1dd7b ("HID: hidraw: Fix returning EPOLLOUT from hidraw_poll") Signed-off-by: Jiri Kosina commit 8e55ea19125b65cffe42747359af99d545e85f2f Author: Olivier Moysan Date: Fri Jan 10 14:11:31 2020 +0100 ASoC: stm32: dfsdm: fix 16 bits record In stm32_afsdm_pcm_cb function, the transfer size is provided in bytes. However, samples are copied as 16 bits words from iio buffer. Divide by two the transfer size, to copy the right number of samples. Fixes: 1e7f6e1c69f0 ("ASoC: stm32: dfsdm: add 16 bits audio record support") Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20200110131131.3191-1-olivier.moysan@st.com Signed-off-by: Mark Brown commit 10674d97c4e266e8c50ce794d1c470c26228d52b Merge: c936069fb59c 3aa3c5882e4f Author: Rafael J. Wysocki Date: Fri Jan 10 10:58:45 2020 +0100 Merge branch 'powercap' * powercap: powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online() commit 529244bd1afc102ab164429d338d310d5d65e60d Author: James Bottomley Date: Wed Jan 8 17:21:32 2020 -0800 scsi: enclosure: Fix stale device oops with hot replug Doing an add/remove/add on a SCSI device in an enclosure leads to an oops caused by poisoned values in the enclosure device list pointers. The reason is because we are keeping the enclosure device across the enclosed device add/remove/add but the current code is doing a device_add/device_del/device_add on it. This is the wrong thing to do in sysfs, so fix it by not doing a device_del on the enclosure device simply because of a hot remove of the drive in the slot. [mkp: added missing email addresses] Fixes: 43d8eb9cfd0a ("[SCSI] ses: add support for enclosure component hot removal") Link: https://lore.kernel.org/r/1578532892.3852.10.camel@HansenPartnership.com Signed-off-by: James Bottomley Reported-by: Luo Jiaxing Tested-by: John Garry Signed-off-by: Martin K. Petersen commit 465f4edaecc6c37f81349233e84d46246bcac11a Author: Xiang Chen Date: Thu Jan 9 09:12:24 2020 +0800 scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI If an attached disk with protection information enabled is reformatted to Type 0 the revalidation code does not clear the original protection type and subsequent accesses will keep setting RDPROTECT/WRPROTECT. Set the protection type to 0 if the disk reports PROT_EN=0 in READ CAPACITY(16). [mkp: commit desc] Fixes: fe542396da73 ("[SCSI] sd: Ensure we correctly disable devices with unknown protection type") Link: https://lore.kernel.org/r/1578532344-101668-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen commit bef1d88263ff769f15aa0e1515cdcede84e61d15 Merge: 6d25ef773538 e163fdb3f7f8 Author: Linus Torvalds Date: Thu Jan 9 21:42:05 2020 -0800 Merge tag 'pstore-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore fix from Kees Cook: "Cengiz Can forwarded a Coverity report about more problems with a rare pstore initialization error path, so the allocation lifetime was rearranged to avoid needing to share the kfree() responsibilities between caller and callee" * tag 'pstore-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/ram: Regularize prz label allocation lifetime commit 6d25ef773538c82445ee2ea849acecc0889cc7f6 Merge: 5e7c1b75bd2a 023b3b0e139f Author: Linus Torvalds Date: Thu Jan 9 21:37:39 2020 -0800 Merge tag 'drm-fixes-2020-01-10' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Pre-LCA pull request I'm not sure how things will look next week, myself and Daniel are at LCA and I'm speaking quite late, so if I get my talk finished I'll probably process fixes. This week has a bunch of i915 fixes, some amdgpu fixes, one sun4i, one core MST, and one core fb_helper fix. More details below: core: - mst Fix NO_STOP_BIT bit offset (Wayne) fb_helper: - fb_helper: Fix bits_per_pixel param set behavior to round up (Geert) sun4i: - Fix RGB_DIV clock min divider on old hardware (Chen-Yu) amdgpu: - Stability fix for raven - Reduce pixel encoding to if max clock is exceeded on HDMI to allow additional high res modes - enable DRIVER_SYNCOBJ_TIMELINE for amdgpu i915: - Fix GitLab issue #446 causing GPU hangs: Do not restore invalid RS state - Fix GitLab issue #846: Restore coarse power gating that was disabled by initial RC66 context corruption security fixes. - Revert f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms") to avoid screen flicker - Fix to fill in unitialized uabi_instance in virtual engine uAPI - Add two missing W/As for ICL and EHL" * tag 'drm-fixes-2020-01-10' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu: add DRIVER_SYNCOBJ_TIMELINE to amdgpu drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded Revert "drm/amdgpu: Set no-retry as default." drm/fb-helper: Round up bits_per_pixel if possible drm/sun4i: tcon: Set RGB DCLK min. divider based on hardware model drm/i915/dp: Disable Port sync mode correctly on teardown drm/i915: Add Wa_1407352427:icl,ehl drm/i915: Add Wa_1408615072 and Wa_1407596294 to icl,ehl drm/i915/gt: Restore coarse power gating drm/i915/gt: Do not restore invalid RS state drm/i915: Limit audio CDCLK>=2*BCLK constraint back to GLK only drm/i915/gt: Mark up virtual engine uabi_instance drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ commit 5e7c1b75bd2a75005313574dd6e5354907005f93 Merge: 4a3033ef6e6b 9554de394b7e Author: Linus Torvalds Date: Thu Jan 9 21:03:54 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "First RDMA subsystem updates for 5.5-rc. A very small set of fixes, most people seem to still be recovering from December! Five small driver fixes: - Fix error flow with MR allocation in bnxt_re - An errata work around for bnxt_re - Misuse of the workqueue API in hfi1 - Protocol error in hfi1 - Regression in 5.5 related to the mmap rework with i40iw" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: i40iw: Remove setting of VMA private data and use rdma_user_mmap_io IB/hfi1: Adjust flow PSN with the correct resync_psn IB/hfi1: Don't cancel unused work item RDMA/bnxt_re: Fix Send Work Entry state check while polling completions RDMA/bnxt_re: Avoid freeing MR resources if dereg fails commit e267371dd376d1b3ebc9f01229845a9656734d97 Merge: e21dba7a4df4 d5ad7a6a7f3c Author: David S. Miller Date: Thu Jan 9 18:46:10 2020 -0800 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2020-01-09 This series contains fixes to e1000e, igb, ixgbe, ixgbevf, i40e and iavf drivers. Brett fixes the validation of the virtchnl queue select bitmaps by comparing the bitmaps against BIT(I40E_MAX_VF_QUEUES). Radoslaw removes the limitation of only 10 filter entries for a VF and allows use of all free RAR entries for the forwarding database, if needed. Cambda Zhu fixes the calculation of queue when restoring flow director filters after resetting the adapter for ixgbe. Manfred Rudigier fixes the SGMIISFP module discovery for 100FX/LX modules for igb. Stefan Assmann fixes iavf where during a VF reset event, MAC filters were not altered, which could lead to a stale filter when an administratively set MAC address is forced by the PF. Adam adds the missing code to set the PHY access flag on X722 devices, which supports accessing PHY registers with the admin queue command. Revert a previous commit for e1000e to use "delayed work" which was causing connections to reset unexpectedly and possible driver crashes. ==================== Signed-off-by: David S. Miller commit e21dba7a4df4d93da237da65a096084b4f2e87b4 Author: Martin Schiller Date: Thu Jan 9 07:31:14 2020 +0100 net/x25: fix nonblocking connect This patch fixes 2 issues in x25_connect(): 1. It makes absolutely no sense to reset the neighbour and the connection state after a (successful) nonblocking call of x25_connect. This prevents any connection from being established, since the response (call accept) cannot be processed. 2. Any further calls to x25_connect() while a call is pending should simply return, instead of creating new Call Request (on different logical channels). This patch should also fix the "KASAN: null-ptr-deref Write in x25_connect" and "BUG: unable to handle kernel NULL pointer dereference in x25_connect" bugs reported by syzbot. Signed-off-by: Martin Schiller Reported-by: syzbot+429c200ffc8772bfe070@syzkaller.appspotmail.com Reported-by: syzbot+eec0c87f31a7c3b66f7b@syzkaller.appspotmail.com Signed-off-by: David S. Miller commit 3249b1e442a1be1a6b9f1026785b519d1443f807 Author: Sergei Shtylyov Date: Wed Jan 8 23:42:42 2020 +0300 sh_eth: check sh_eth_cpu_data::dual_port when dumping registers When adding the sh_eth_cpu_data::dual_port flag I forgot to add the flag checks to __sh_eth_get_regs(), causing the non-existing TSU registers to be dumped by 'ethtool' on the single port Ether controllers having TSU... Fixes: a94cf2a614f8 ("sh_eth: fix TSU init on SH7734/R8A7740") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 023b3b0e139f54a680202790ba801f61aa43a5c8 Merge: ac0c9d3f8ad6 2b2c4a83d69d Author: Dave Airlie Date: Fri Jan 10 11:43:02 2020 +1000 Merge tag 'drm-intel-fixes-2020-01-09-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix GitLab issue #446 causing GPU hangs: Do not restore invalid RS state - Fix GitLab issue #846: Restore coarse power gating that was disabled by initial RC66 context corruption security fixes. - Revert f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms") to avoid screen flicker - Fix to fill in unitialized uabi_instance in virtual engine uAPI - Add two missing W/As for ICL and EHL Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200109133458.GA15558@jlahtine-desk.ger.corp.intel.com commit 4a3033ef6e6bb4c566bd1d556de69b494d76976c Merge: a6a55b52a1b9 aa23ca3d98f7 Author: Linus Torvalds Date: Thu Jan 9 15:43:35 2020 -0800 Merge tag 'gpio-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Here is a host of GPIO fixes for the v5.5 series. The ACPI fix is especially important, see summary below and in the commit for details: - Select GPIOLIB_IRQCHIP on the max77620 GPIO expander - Fix context restore in the Zynq driver - Create a new ACPI quirk handler for disabling wakeups on problematic hardware. - Fix a coding style issue on the mockup device" * tag 'gpio-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism gpiolib: acpi: Turn dmi_system_id table into a generic quirk table gpio: zynq: Fix for bug in zynq_gpio_restore_context API gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP gpio: mockup: fix coding style commit a6a55b52a1b94bc71843d71b7194ec3d9a34ffcf Merge: b5b3159cff66 35c60be22057 Author: Linus Torvalds Date: Thu Jan 9 15:41:54 2020 -0800 Merge tag 'pinctrl-v5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Two fixes for pin control, not much to say about it, it's just regular driver fixes: - Fix erroneous shift in the Meson driver - Make Lochnagar select the GPIOLIB Kconfig symbol" * tag 'pinctrl-v5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: meson: Fix wrong shift value when get drive-strength pinctrl: lochnagar: select GPIOLIB commit b5b3159cff66b5b6830701d318b470d4b3e9a57f Merge: e69ec487b2c7 1021dcf19db1 Author: Linus Torvalds Date: Thu Jan 9 15:37: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: "Just a few small fixups here" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: imx_sc_key - only take the valid data from SCU firmware as key state Input: add safety guards to input_set_keycode() Input: input_event - fix struct padding on sparc64 Input: uinput - always report EPOLLOUT commit e7a5f1f1cd0008e5ad379270a8657e121eedb669 Author: Lingpeng Chen Date: Thu Jan 9 09:48:33 2020 +0800 bpf/sockmap: Read psock ingress_msg before sk_receive_queue Right now in tcp_bpf_recvmsg, sock read data first from sk_receive_queue if not empty than psock->ingress_msg otherwise. If a FIN packet arrives and there's also some data in psock->ingress_msg, the data in psock->ingress_msg will be purged. It is always happen when request to a HTTP1.0 server like python SimpleHTTPServer since the server send FIN packet after data is sent out. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Reported-by: Arika Chen Suggested-by: Arika Chen Signed-off-by: Lingpeng Chen Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200109014833.18951-1-forrest0579@gmail.com commit cf8ce8b80f8bf9669f6ec4e71e16668430febdac Author: Russell King Date: Sun Dec 15 16:39:05 2019 +0000 i2c: fix bus recovery stop mode timing The I2C specification states that tsu:sto for standard mode timing must be at minimum 4us. Pictographically, this is: SCL: ____/~~~~~~~~~ SDA: _________/~~~~ ->| |<- 4us minimum We are currently waiting 2.5us between asserting SCL and SDA, which is in violation of the standard. Adjust the timings to ensure that we meet what is stipulated as the minimum timings to ensure that all devices correctly interpret the STOP bus transition. This is more important than trying to generate a square wave with even duty cycle. Signed-off-by: Russell King Signed-off-by: Wolfram Sang commit a14bf98c045bf119b7e779f186528e38c6428830 Author: Olivier Moysan Date: Thu Jan 9 09:32:54 2020 +0100 ASoC: stm32: sai: fix possible circular locking In current driver, locks can be taken as follows: - Register access: take a lock on regmap config and then on clock. - Master clock provider: take a lock on clock and then on regmap config. This can lead to the circular locking summarized below. Remove peripheral clock management through regmap framework, and manage peripheral clock in driver instead. On register access, lock on clock is taken first, which allows to avoid possible locking issue. [ 6696.561513] ====================================================== [ 6696.567670] WARNING: possible circular locking dependency detected [ 6696.573842] 4.19.49 #866 Not tainted [ 6696.577397] ------------------------------------------------------ [ 6696.583566] pulseaudio/6439 is trying to acquire lock: [ 6696.588697] 87b0a25b (enable_lock){..-.}, at: clk_enable_lock+0x64/0x128 [ 6696.595377] [ 6696.595377] but task is already holding lock: [ 6696.601197] d858f825 (stm32_sai_sub:1342:(sai->regmap_config)->lock){....} ... [ 6696.812513] Possible unsafe locking scenario: [ 6696.812513] [ 6696.818418] CPU0 CPU1 [ 6696.822935] ---- ---- [ 6696.827451] lock(stm32_sai_sub:1342:(sai->regmap_config)->lock); [ 6696.833618] lock(enable_lock); [ 6696.839350] lock(stm32_sai_sub:1342: (sai->regmap_config)->lock); [ 6696.848035] lock(enable_lock); Fixes: 03e78a242a15 ("ASoC: stm32: sai: add h7 support") Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20200109083254.478-1-olivier.moysan@st.com Signed-off-by: Mark Brown commit 82de6a6fb67e16a30ec2f586b1f6976c2d7b4b62 Author: Tudor Ambarus Date: Tue Dec 3 14:50:01 2019 +0000 mtd: spi-nor: Fix the writing of the Status Register on micron flashes Micron flashes do not support 16 bit writes on the Status Register. According to micron datasheets, when using the Write Status Register (01h) command, the chip select should be driven LOW and held LOW until the eighth bit of the last data byte has been latched in, after which it must be driven HIGH. If CS is not driven HIGH, the command is not executed, flag status register error bits are not set, and the write enable latch remains set to 1. This fixes the lock operations on micron flashes. Reported-by: John Garry Fixes: 39d1e3340c73 ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()") Signed-off-by: Tudor Ambarus Tested-by: John Garry Signed-off-by: Miquel Raynal commit de08b5ac10420db597cb24c41b4d8d06cce15ffd Author: Arnd Bergmann Date: Tue Jan 7 22:24:52 2020 +0100 mtd: sm_ftl: fix NULL pointer warning With gcc -O3, we get a new warning: In file included from arch/arm64/include/asm/processor.h:28, from drivers/mtd/sm_ftl.c:8: In function 'memset', inlined from 'sm_read_sector.constprop' at drivers/mtd/sm_ftl.c:250:3: include/linux/string.h:411:9: error: argument 1 null where non-null expected [-Werror=nonnull] return __builtin_memset(p, c, size); >From all I can tell, this cannot happen (the function is called either with a NULL buffer or with a -1 block number but not both), but adding a check makes it more robust and avoids the warning. Fixes: mmtom ("init/Kconfig: enable -O3 for all arches") Signed-off-by: Arnd Bergmann Signed-off-by: Miquel Raynal commit 8bcef0d54067077cf9a6cb129022c77559926e8c Author: Peter Ujfalusi Date: Tue Jan 7 10:45:44 2020 +0200 mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy The commit converting the driver to DMAengine was missing the flags for the memcpy prepare call. It went unnoticed since the omap-dma driver was ignoring them. Fixes: 3ed6a4d1de2c5 (" mtd: onenand: omap2: Convert to use dmaengine for memcp") Reported-by: Aaro Koskinen Signed-off-by: Peter Ujfalusi Tested-by: H. Nikolaus Schaller Tested-by: Aaro Koskinen Signed-off-by: Miquel Raynal commit 14ebf24175df0f216256c8483ee2974f35a1a89c Author: Krzysztof Kozlowski Date: Fri Jan 3 17:41:58 2020 +0100 mtd: onenand: samsung: Fix iomem access with regular memcpy The __iomem memory should be copied with memcpy_fromio. This fixes Sparse warnings like: drivers/mtd/nand/onenand/samsung_mtd.c:678:40: warning: incorrect type in argument 2 (different address spaces) drivers/mtd/nand/onenand/samsung_mtd.c:678:40: expected void const *from drivers/mtd/nand/onenand/samsung_mtd.c:678:40: got void [noderef] *[assigned] p drivers/mtd/nand/onenand/samsung_mtd.c:679:19: warning: incorrect type in assignment (different address spaces) drivers/mtd/nand/onenand/samsung_mtd.c:679:19: expected void [noderef] *[assigned] p drivers/mtd/nand/onenand/samsung_mtd.c:679:19: got unsigned char * Reported-by: kbuild test robot Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal commit 44f45994f438b4f4e0ba977b173980268983c60f Author: Amir Mahdi Ghorbanian Date: Thu Jan 2 12:10:08 2020 -0500 mtd: onenand: omap2: Fix errors in style Correct mispelling, spacing, and coding style flaws caught by checkpatch.pl script in the Omap2 Onenand driver . Signed-off-by: Amir Mahdi Ghorbanian Signed-off-by: Miquel Raynal commit 4aa906f1859614842818dc3b4cb5b27bc35961e2 Author: Vasyl Gomonovych Date: Wed Dec 18 11:57:15 2019 +0200 mtd: cadence: Fix cast to pointer from integer of different size warning Use dma_addr_t type to pass memory address and control data in DMA descriptor fields memory_pointer and ctrl_data_ptr To fix warning: cast to pointer from integer of different size Signed-off-by: Vasyl Gomonovych Acked-by: Olof Johansson Signed-off-by: Miquel Raynal commit 4114b17af41272e14939b000ce8f3ed7ba937e3c Author: Christophe Kerello Date: Mon Dec 16 10:01:55 2019 +0100 mtd: rawnand: stm32_fmc2: avoid to lock the CPU bus We are currently using nand_soft_waitrdy to poll the status of the NAND flash. FMC2 enables the wait feature bit (this feature is mandatory for the sequencer mode). By enabling this feature, we can't poll the status of the NAND flash, the read status command is stucked in FMC2 pipeline until R/B# signal is high, and locks the CPU bus. To avoid to lock the CPU bus, we poll FMC2 ISR register. This register reports the status of the R/B# signal. Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver") Signed-off-by: Christophe Kerello Signed-off-by: Miquel Raynal commit e69ec487b2c7c82ef99b4b15122f58a2a99289a3 Merge: a5f48c7878d2 20eee6e5af35 Author: Linus Torvalds Date: Thu Jan 9 10:51:22 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - fix for OOB in hiddev, from Dmitry Torokhov - _poll API fixes for hidraw, from Marcel Holtmann - functional fix for Steam driver, from Rodrigo Rivas Costa - a few new device IDs / device-specific quirks and other assorted smaller fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: steam: Fix input device disappearing HID: intel-ish-hid: ipc: Add Tiger Lake PCI device ID drivers/hid/hid-multitouch.c: fix a possible null pointer access. HID: wacom: Recognize new MobileStudio Pro PID HID: intel-ish-hid: ipc: add CMP device id HID: hiddev: fix mess in hiddev_open() HID: hid-input: clear unmapped usages HID: Add quirk for incorrect input length on Lenovo Y720 HID: asus: Ignore Asus vendor-page usage-code 0xff events HID: ite: Add USB id match for Acer SW5-012 keyboard dock HID: Add quirk for Xin-Mo Dual Controller HID: Fix slab-out-of-bounds read in hid_field_extract HID: multitouch: Add LG MELF0410 I2C touchscreen support HID: uhid: Fix returning EPOLLOUT from uhid_char_poll HID: hidraw: Fix returning EPOLLOUT from hidraw_poll commit a5f48c7878d2365f6ff7008e9317abbc16f68847 Merge: b07f636fca1c 9546a0b7ce00 Author: Linus Torvalds Date: Thu Jan 9 10:34:07 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Missing netns pointer init in arp_tables, from Florian Westphal. 2) Fix normal tcp SACK being treated as D-SACK, from Pengcheng Yang. 3) Fix divide by zero in sch_cake, from Wen Yang. 4) Len passed to skb_put_padto() is wrong in qrtr code, from Carl Huang. 5) cmd->obj.chunk is leaked in sctp code error paths, from Xin Long. 6) cgroup bpf programs can be released out of order, fix from Roman Gushchin. 7) Make sure stmmac debugfs entry name is changed when device name changes, from Jiping Ma. 8) Fix memory leak in vlan_dev_set_egress_priority(), from Eric Dumazet. 9) SKB leak in lan78xx usb driver, also from Eric Dumazet. 10) Ridiculous TCA_FQ_QUANTUM values configured can cause loops in fq packet scheduler, reject them. From Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (69 commits) tipc: fix wrong connect() return code tipc: fix link overflow issue at socket shutdown netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present netfilter: conntrack: dccp, sctp: handle null timeout argument atm: eni: fix uninitialized variable warning macvlan: do not assume mac_header is set in macvlan_broadcast() net: sch_prio: When ungrafting, replace with FIFO mlxsw: spectrum_qdisc: Ignore grafting of invisible FIFO MAINTAINERS: Remove myself as co-maintainer for qcom-ethqos gtp: fix bad unlock balance in gtp_encap_enable_socket pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM tipc: remove meaningless assignment in Makefile tipc: do not add socket.o to tipc-y twice net: stmmac: dwmac-sun8i: Allow all RGMII modes net: stmmac: dwmac-sunxi: Allow all RGMII modes net: usb: lan78xx: fix possible skb leak net: stmmac: Fixed link does not need MDIO Bus vlan: vlan_changelink() should propagate errors vlan: fix memory leak in vlan_dev_set_egress_priority stmmac: debugfs entry name is not be changed when udev rename device name. ... commit d5ad7a6a7f3c87b278d7e4973b65682be4e588dd Author: Jeff Kirsher Date: Sat Jan 4 23:29:22 2020 -0800 e1000e: Revert "e1000e: Make watchdog use delayed work" This reverts commit 59653e6497d16f7ac1d9db088f3959f57ee8c3db. This is due to this commit causing driver crashes and connections to reset unexpectedly. Signed-off-by: Jeff Kirsher Tested-by: Aaron Brown commit bb37362f34d66f8f563e74a2c97de95c0c1beee5 Author: Adam Ludkiewicz Date: Wed Jan 8 13:44:10 2020 -0800 i40e: Set PHY Access flag on X722 The X722 FW API version 1.9 adds support for accessing PHY registers with Admin Queue Command. This enables reading EEPROM data from (Q)SFP+ transceivers, what was previously possible only on X710 devices. Signed-off-by: Adam Ludkiewicz Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9e05229190380f6b8f702da39aaeb97a0fc80dc3 Author: Stefan Assmann Date: Tue Dec 17 11:29:23 2019 +0100 iavf: remove current MAC address filter on VF reset Currently MAC filters are not altered during a VF reset event. This may lead to a stale filter when an administratively set MAC is forced by the PF. For an administratively set MAC the PF driver deletes the VFs filters, overwrites the VFs MAC address and triggers a VF reset. However the VF driver itself is not aware of the filter removal, which is what the VF reset is for. The VF reset queues all filters present in the VF driver to be re-added to the PF filter list (including the filter for the now stale VF MAC address) and triggers a VIRTCHNL_OP_GET_VF_RESOURCES event, which provides the new MAC address to the VF. When this happens i40e will complain and reject the stale MAC filter, at least in the untrusted VF case. i40e 0000:08:00.0: Setting MAC 3c:fa:fa:fa:fa:01 on VF 0 iavf 0000:08:02.0: Reset warning received from the PF iavf 0000:08:02.0: Scheduling reset task i40e 0000:08:00.0: Bring down and up the VF interface to make this change effective. i40e 0000:08:00.0: VF attempting to override administratively set MAC address, bring down and up the VF interface to resume normal operation i40e 0000:08:00.0: VF 0 failed opcode 10, retval: -1 iavf 0000:08:02.0: Failed to add MAC filter, error IAVF_ERR_NVM To avoid re-adding the stale MAC filter it needs to be removed from the VF driver's filter list before queuing the existing filters. Then during the VIRTCHNL_OP_GET_VF_RESOURCES event the correct filter needs to be added again, at which point the MAC address has been updated. As a bonus this change makes bringing the VF down and up again superfluous for the administratively set MAC case. Signed-off-by: Stefan Assmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5365ec1aeff5b9f2962a9c9b31d63f9dad7e0e2d Author: Manfred Rudigier Date: Wed Dec 4 11:40:26 2019 +0100 igb: Fix SGMII SFP module discovery for 100FX/LX. Changing the link mode should also be done for 100BaseFX SGMII modules, otherwise they just don't work when the default link mode in CTRL_EXT coming from the EEPROM is SERDES. Additionally 100Base-LX SGMII SFP modules are also supported now, which was not the case before. Tested with an i210 using Flexoptix S.1303.2M.G 100FX and S.1303.10.G 100LX SGMII SFP modules. Signed-off-by: Manfred Rudigier Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 4fad78ad6422d9bca62135bbed8b6abc4cbb85b8 Author: Cambda Zhu Date: Wed Nov 27 17:03:55 2019 +0800 ixgbe: Fix calculation of queue with VFs and flow director on interface flap This patch fixes the calculation of queue when we restore flow director filters after resetting adapter. In ixgbe_fdir_filter_restore(), filter's vf may be zero which makes the queue outside of the rx_ring array. The calculation is changed to the same as ixgbe_add_ethtool_fdir_entry(). Signed-off-by: Cambda Zhu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit aa604651d523b1493988d0bf6710339f3ee60272 Author: Radoslaw Tyl Date: Mon Nov 25 15:24:52 2019 +0100 ixgbevf: Remove limit of 10 entries for unicast filter list Currently, though the FDB entry is added to VF, it does not appear in RAR filters. VF driver only allows to add 10 entries. Attempting to add another causes an error. This patch removes limitation and allows use of all free RAR entries for the FDB if needed. Fixes: 46ec20ff7d ("ixgbevf: Add macvlan support in the set rx mode op") Signed-off-by: Radoslaw Tyl Acked-by: Paul Menzel Signed-off-by: Jeff Kirsher commit d9d6a9aed3f66f8ce5fa3ca6ca26007d75032296 Author: Brett Creeley Date: Wed Nov 13 11:28:17 2019 -0800 i40e: Fix virtchnl_queue_select bitmap validation Currently in i40e_vc_disable_queues_msg() we are incorrectly validating the virtchnl queue select bitmaps. The virtchnl_queue_select rx_queues and tx_queue bitmap is being compared against ICE_MAX_VF_QUEUES, but the problem is that these bitmaps can have a value greater than I40E_MAX_VF_QUEUES. Fix this by comparing the bitmaps against BIT(I40E_MAX_VF_QUEUES). Also, add the function i40e_vc_validate_vqs_bitmaps() that checks to see if both virtchnl_queue_select bitmaps are empty along with checking that the bitmaps only have valid bits set. This function can then be used in both the queue enable and disable flows. Suggested-by: Arkady Gilinksky Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f35deaff1b8eadb9897e4fb8b3edc7717f4ec6fa Author: Arnd Bergmann Date: Sat Dec 7 20:10:26 2019 +0100 time/posix-stubs: Provide compat itimer supoprt for alpha Using compat_sys_getitimer and compat_sys_setitimer on alpha causes a link failure in the Alpha tinyconfig and other configurations that turn off CONFIG_POSIX_TIMERS. Use the same #ifdef check for the stub version as well. Fixes: 4c22ea2b9120 ("y2038: use compat_{get,set}_itimer on alpha") Reported-by: Guenter Roeck Reported-by: kbuild test robot Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Link: https://lore.kernel.org/r/20191207191043.656328-1-arnd@arndb.de commit dc8d37ed304eeeea47e65fb9edc1c6c8b0093386 Author: Arnd Bergmann Date: Tue Dec 10 20:56:04 2019 +0100 cpu/SMT: Fix x86 link error without CONFIG_SYSFS When CONFIG_SYSFS is disabled, but CONFIG_HOTPLUG_SMT is enabled, the kernel fails to link: arch/x86/power/cpu.o: In function `hibernate_resume_nonboot_cpu_disable': (.text+0x38d): undefined reference to `cpuhp_smt_enable' arch/x86/power/hibernate.o: In function `arch_resume_nosmt': hibernate.c:(.text+0x291): undefined reference to `cpuhp_smt_enable' hibernate.c:(.text+0x29c): undefined reference to `cpuhp_smt_disable' Move the exported functions out of the #ifdef section into its own with the correct conditions. The patch that caused this is marked for stable backports, so this one may need to be backported as well. Fixes: ec527c318036 ("x86/power: Fix 'nosmt' vs hibernation triple fault during resume") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Reviewed-by: Jiri Kosina Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191210195614.786555-1-arnd@arndb.de commit 40260b01d029ba374637838213af500e03305326 Author: Philipp Rudo Date: Wed Dec 18 11:24:43 2019 +0100 s390/setup: Fix secure ipl message The new machine loader on z15 always creates an IPL Report block and thus sets the IPL_PL_FLAG_IPLSR even when secure boot is disabled. This causes the wrong message being printed at boot. Fix this by checking for IPL_PL_FLAG_SIPL instead. Fixes: 9641b8cc733f ("s390/ipl: read IPL report at early boot") Signed-off-by: Philipp Rudo Signed-off-by: Vasily Gorbik commit 0c874cd04292c7ee22d70eefc341fa2648f41f46 Author: Harald Freudenberger Date: Fri Nov 22 16:30:06 2019 +0100 s390/zcrypt: move ap device reset from bus to driver code This patch moves the reset invocation of an ap device when fresh detected from the ap bus to the probe() function of the driver responsible for this device. The virtualisation of ap devices makes it necessary to remove unconditioned resets on fresh appearing apqn devices. It may be that such a device is already enabled for guest usage. So there may be a race condition between host ap bus and guest ap bus doing the reset. This patch moves the reset from the ap bus to the zcrypt drivers. So if there is no zcrypt driver bound to an ap device - for example the ap device is bound to the vfio device driver - the ap device is untouched passed to the vfio device driver. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 94dd3bada53ee77b80d0aeee5571eeb83654d156 Author: Harald Freudenberger Date: Fri Dec 20 09:06:09 2019 +0100 s390/zcrypt: Fix CCA cipher key gen with clear key value function Regression tests showed that the CCA cipher key function which generates an CCA cipher key with given clear key value does not work correctly. At parsing the reply CPRB two limits are wrong calculated resulting in rejecting the reply as invalid with s390dbf message "_ip_cprb_helper reply with invalid or unknown key block". Fixes: f2bbc96e7cfa ("s390/pkey: add CCA AES cipher key support") Cc: Stable Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit bc8a76a152c5f9ef3b48104154a65a68a8b76946 Author: Akeem G Abodunrin Date: Wed Jan 8 09:25:00 2020 -0800 drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast cleardown of the EU state, by issuing a PIPE_CONTROL with bit 27 set. We can use this in a context batch buffer to explicitly cleardown the state on every context switch. As this workaround is already in place for gen8, we can borrow the code verbatim for Gen9. Signed-off-by: Mika Kuoppala Signed-off-by: Akeem G Abodunrin Cc: Kumar Valsan Prathap Cc: Chris Wilson Cc: Balestrieri Francesco Cc: Bloomfield Jon Cc: Dutt Sudeep commit 83c9c547168e8b914ea6398430473a4de68c52cc Author: Ming Lei Date: Sun Jan 5 09:41:14 2020 +0800 fs: move guard_bio_eod() after bio_set_op_attrs Commit 85a8ce62c2ea ("block: add bio_truncate to fix guard_bio_eod") adds bio_truncate() for handling bio EOD. However, bio_truncate() doesn't use the passed 'op' parameter from guard_bio_eod's callers. So bio_trunacate() may retrieve wrong 'op', and zering pages may not be done for READ bio. Fixes this issue by moving guard_bio_eod() after bio_set_op_attrs() in submit_bh_wbc() so that bio_truncate() can always retrieve correct op info. Meantime remove the 'op' parameter from guard_bio_eod() because it isn't used any more. Cc: Carlos Maiolino Cc: linux-fsdevel@vger.kernel.org Fixes: 85a8ce62c2ea ("block: add bio_truncate to fix guard_bio_eod") Signed-off-by: Ming Lei Fold in kerneldoc and bio_op() change. Signed-off-by: Jens Axboe commit 51bfb1d11d6daf095addf9fe8471c20992caae0b Author: Randy Dunlap Date: Sun Dec 8 20:26:55 2019 -0800 futex: Fix kernel-doc notation warning Fix a kernel-doc warning in kernel/futex.c by adding notation for @ret. ../kernel/futex.c:1187: warning: Function parameter or member 'ret' not described in 'wait_for_owner_exiting' Fixes: 3ef240eaff36 ("futex: Prevent exit livelock") Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/223be78c-f3c8-52df-836d-c5fb8e7907e9@infradead.org commit 4b0b97e651ecf29f20248420b52b6864fbd40bc2 Author: Marcel Ziswiler Date: Wed Jan 8 17:12:31 2020 +0100 ARM: dts: imx7: Fix Toradex Colibri iMX7S 256MB NAND flash support Turns out when introducing the eMMC version the gpmi node required for NAND flash support got enabled exclusively on Colibri iMX7D 512MB. Fixes: f928a4a377e4 ("ARM: dts: imx7: add Toradex Colibri iMX7D 1GB (eMMC) support") Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 9608ea6c6613ced75b2c41703d99f44e6f8849f1 Author: Boyan Ding Date: Wed Jan 1 12:41:20 2020 -0800 pinctrl: sunrisepoint: Add missing Interrupt Status register offset Commit 179e5a6114cc ("pinctrl: intel: Remove default Interrupt Status offset") removes default interrupt status offset of GPIO controllers, with previous commits explicitly providing the previously default offsets. However, the is_offset value in SPTH_COMMUNITY is missing, preventing related irq from being properly detected and handled. Fixes: f702e0b93cdb ("pinctrl: sunrisepoint: Provide Interrupt Status register offset") Link: https://bugzilla.kernel.org/show_bug.cgi?id=205745 Cc: stable@vger.kernel.org Signed-off-by: Boyan Ding Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 3479b2843c78ffb60247f522226ba68f93aee355 Author: Anson Huang Date: Mon Dec 30 09:41:10 2019 +0800 ARM: dts: imx6sll-evk: Remove incorrect power supply assignment The vdd3p0 LDO's input should be from external USB VBUS directly, NOT PMIC's power supply, the vdd3p0 LDO's target output voltage can be controlled by SW, and it requires input voltage to be high enough, with incorrect power supply assigned, if the power supply's voltage is lower than the LDO target output voltage, it will return fail and skip the LDO voltage adjustment, so remove the power supply assignment for vdd3p0 to avoid such scenario. Fixes: 96a9169cf621 ("ARM: dts: imx6sll-evk: Assign corresponding power supply for vdd3p0") Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit b4eb9ef0e29cd28c6fd684e0ab77bda824acb20e Author: Anson Huang Date: Mon Dec 30 09:41:09 2019 +0800 ARM: dts: imx6sl-evk: Remove incorrect power supply assignment The vdd3p0 LDO's input should be from external USB VBUS directly, NOT PMIC's power supply, the vdd3p0 LDO's target output voltage can be controlled by SW, and it requires input voltage to be high enough, with incorrect power supply assigned, if the power supply's voltage is lower than the LDO target output voltage, it will return fail and skip the LDO voltage adjustment, so remove the power supply assignment for vdd3p0 to avoid such scenario. Fixes: 3feea8805d6f ("ARM: dts: imx6sl-evk: Assign corresponding power supply for LDOs") Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit d4918ebb5c256d26696a13e78ac68c146111191a Author: Anson Huang Date: Mon Dec 30 09:41:08 2019 +0800 ARM: dts: imx6sx-sdb: Remove incorrect power supply assignment The vdd3p0 LDO's input should be from external USB VBUS directly, NOT PMIC's power supply, the vdd3p0 LDO's target output voltage can be controlled by SW, and it requires input voltage to be high enough, with incorrect power supply assigned, if the power supply's voltage is lower than the LDO target output voltage, it will return fail and skip the LDO voltage adjustment, so remove the power supply assignment for vdd3p0 to avoid such scenario. Fixes: 37a4bdead109 ("ARM: dts: imx6sx-sdb: Assign corresponding power supply for LDOs") Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 4521de30fbb3f5be0db58de93582ebce72c9d44f Author: Anson Huang Date: Mon Dec 30 09:41:07 2019 +0800 ARM: dts: imx6qdl-sabresd: Remove incorrect power supply assignment The vdd3p0 LDO's input should be from external USB VBUS directly, NOT PMIC's power supply, the vdd3p0 LDO's target output voltage can be controlled by SW, and it requires input voltage to be high enough, with incorrect power supply assigned, if the power supply's voltage is lower than the LDO target output voltage, it will return fail and skip the LDO voltage adjustment, so remove the power supply assignment for vdd3p0 to avoid such scenario. Fixes: 93385546ba36 ("ARM: dts: imx6qdl-sabresd: Assign corresponding power supply for LDOs") Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 20eee6e5af35d9586774e80b6e0b1850e7cc9899 Author: Rodrigo Rivas Costa Date: Tue Jan 7 20:48:13 2020 +0100 HID: steam: Fix input device disappearing The `connected` value for wired devices was not properly initialized, it must be set to `true` upon creation, because wired devices do not generate connection events. When a raw client (the Steam Client) uses the device, the input device is destroyed. Then, when the raw client finishes, it must be recreated. But since the `connected` variable was false this never happended. Signed-off-by: Rodrigo Rivas Costa Signed-off-by: Jiri Kosina commit 4a132f60808ae3a751e107a373f8572012352d3c Author: Jagan Teki Date: Mon Dec 30 17:30:19 2019 +0530 ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6DL The EDIMM STARTER KIT i.Core 1.5 MIPI Evaluation is based on the 1.5 version of the i.Core MX6 cpu module. The 1.5 version differs from the original one for a few details, including the ethernet PHY interface clock provider. With this commit, the ethernet interface works properly: SMSC LAN8710/LAN8720 2188000.ethernet-1:00: attached PHY driver While before using the 1.5 version, ethernet failed to startup do to un-clocked PHY interface: fec 2188000.ethernet eth0: could not attach to PHY Similar fix has merged for i.Core MX6Q but missed to update for DL. Fixes: a8039f2dd089 ("ARM: dts: imx6dl: Add Engicam i.CoreM6 1.5 Quad/Dual MIPI starter kit support") Cc: Jacopo Mondi Signed-off-by: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo commit cb1eeb75cf3dd84ced81333967200583993dfd73 Author: Arnd Bergmann Date: Tue Jan 7 21:08:58 2020 +0100 crypto: hisilicon/sec2 - Use atomics instead of __sync The use of __sync functions for atomic memory access is not supported in the kernel, and can result in a link error depending on configuration: ERROR: "__tsan_atomic32_compare_exchange_strong" [drivers/crypto/hisilicon/sec2/hisi_sec2.ko] undefined! ERROR: "__tsan_atomic64_fetch_add" [drivers/crypto/hisilicon/sec2/hisi_sec2.ko] undefined! Use the kernel's own atomic interfaces instead. This way the debugfs interface actually reads the counter atomically. Fixes: 416d82204df4 ("crypto: hisilicon - add HiSilicon SEC V2 driver") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu commit ac0c9d3f8ad616bc9e57126e9d542bff69de0ce7 Merge: 2c3addd83928 db4ff423cd16 Author: Dave Airlie Date: Thu Jan 9 12:32:05 2020 +1000 Merge tag 'amd-drm-fixes-5.5-2020-01-08' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.5-2020-01-08: amdgpu: - Stability fix for raven - Reduce pixel encoding to if max clock is exceeded on HDMI to allow additional high res modes UAPI: - enable DRIVER_SYNCOBJ_TIMELINE for amdgpu Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200108213649.5485-1-alexander.deucher@amd.com commit 2c3addd839282ec41e7a4079ed2ffce1806fbc54 Merge: c79f46a28239 f30e27779d30 Author: Dave Airlie Date: Thu Jan 9 12:23:57 2020 +1000 Merge tag 'drm-misc-fixes-2020-01-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes mst: Fix NO_STOP_BIT bit offset (Wayne) sun4i: Fix RGB_DIV clock min divider on old hardware (Chen-Yu) fb_helper: Fix bits_per_pixel param set behavior to round up (Geert) Cc: Wayne Lin Cc: Chen-Yu Tsai Cc: Geert Uytterhoeven Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200108205949.GA233273@art_vandelay commit e163fdb3f7f8c62dccf194f3f37a7bcb3c333aa8 Author: Kees Cook Date: Wed Jan 8 10:06:54 2020 -0800 pstore/ram: Regularize prz label allocation lifetime In my attempt to fix a memory leak, I introduced a double-free in the pstore error path. Instead of trying to manage the allocation lifetime between persistent_ram_new() and its callers, adjust the logic so persistent_ram_new() always takes a kstrdup() copy, and leaves the caller's allocation lifetime up to the caller. Therefore callers are _always_ responsible for freeing their label. Before, it only needed freeing when the prz itself failed to allocate, and not in any of the other prz failure cases, which callers would have no visibility into, which is the root design problem that lead to both the leak and now double-free bugs. Reported-by: Cengiz Can Link: https://lore.kernel.org/lkml/d4ec59002ede4aaf9928c7f7526da87c@kernel.wtf Fixes: 8df955a32a73 ("pstore/ram: Fix error-path memory leak in persistent_ram_new() callers") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit 9546a0b7ce0077d827470f603f2522b845ce5954 Author: Tuong Lien Date: Wed Jan 8 09:19:00 2020 +0700 tipc: fix wrong connect() return code The current 'tipc_wait_for_connect()' function does a wait-loop for the condition 'sk->sk_state != TIPC_CONNECTING' to conclude if the socket connecting has done. However, when the condition is met, it returns '0' even in the case the connecting is actually failed, the socket state is set to 'TIPC_DISCONNECTING' (e.g. when the server socket has closed..). This results in a wrong return code for the 'connect()' call from user, making it believe that the connection is established and go ahead with building, sending a message, etc. but finally failed e.g. '-EPIPE'. This commit fixes the issue by changing the wait condition to the 'tipc_sk_connected(sk)', so the function will return '0' only when the connection is really established. Otherwise, either the socket 'sk_err' if any or '-ETIMEDOUT'/'-EINTR' will be returned correspondingly. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 49afb806cb650dd1f06f191994f3aa657d264009 Author: Tuong Lien Date: Wed Jan 8 09:18:15 2020 +0700 tipc: fix link overflow issue at socket shutdown When a socket is suddenly shutdown or released, it will reject all the unreceived messages in its receive queue. This applies to a connected socket too, whereas there is only one 'FIN' message required to be sent back to its peer in this case. In case there are many messages in the queue and/or some connections with such messages are shutdown at the same time, the link layer will easily get overflowed at the 'TIPC_SYSTEM_IMPORTANCE' backlog level because of the message rejections. As a result, the link will be taken down. Moreover, immediately when the link is re-established, the socket layer can continue to reject the messages and the same issue happens... The commit refactors the '__tipc_shutdown()' function to only send one 'FIN' in the situation mentioned above. For the connectionless case, it is unavoidable but usually there is no rejections for such socket messages because they are 'dest-droppable' by default. In addition, the new code makes the other socket states clear (e.g.'TIPC_LISTEN') and treats as a separate case to avoid misbehaving. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit b73a65610b7decff6415d24940722e8aa09195cf Merge: 30780d086a83 22dad713b8a5 Author: David S. Miller Date: Wed Jan 8 15:22:41 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) Missing netns context in arp_tables, from Florian Westphal. 2) Underflow in flowtable reference counter, from wenxu. 3) Fix incorrect ethernet destination address in flowtable offload, from wenxu. 4) Check for status of neighbour entry, from wenxu. 5) Fix NAT port mangling, from wenxu. 6) Unbind callbacks from destroy path to cleanup hardware properly on flowtable removal. 7) Fix missing casting statistics timestamp, add nf_flowtable_time_stamp and use it. 8) NULL pointer exception when timeout argument is null in conntrack dccp and sctp protocol helpers, from Florian Westphal. 9) Possible nul-dereference in ipset with IPSET_ATTR_LINENO, also from Florian. ==================== Signed-off-by: David S. Miller commit 22dad713b8a5ff488e07b821195270672f486eb2 Author: Florian Westphal Date: Wed Jan 8 10:59:38 2020 +0100 netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present The set uadt functions assume lineno is never NULL, but it is in case of ip_set_utest(). syzkaller managed to generate a netlink message that calls this with LINENO attr present: general protection fault: 0000 [#1] PREEMPT SMP KASAN RIP: 0010:hash_mac4_uadt+0x1bc/0x470 net/netfilter/ipset/ip_set_hash_mac.c:104 Call Trace: ip_set_utest+0x55b/0x890 net/netfilter/ipset/ip_set_core.c:1867 nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 nfnetlink_rcv+0x1ba/0x460 net/netfilter/nfnetlink.c:563 pass a dummy lineno storage, its easier than patching all set implementations. This seems to be a day-0 bug. Cc: Jozsef Kadlecsik Reported-by: syzbot+34bd2369d38707f3f4a7@syzkaller.appspotmail.com Fixes: a7b4f989a6294 ("netfilter: ipset: IP set core support") Signed-off-by: Florian Westphal Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 1d9a7acd3d1e74c2d150d8934f7f55bed6d70858 Author: Florian Westphal Date: Mon Jan 6 23:34:17 2020 +0100 netfilter: conntrack: dccp, sctp: handle null timeout argument The timeout pointer can be NULL which means we should modify the per-nets timeout instead. All do this, except sctp and dccp which instead give: general protection fault: 0000 [#1] PREEMPT SMP KASAN net/netfilter/nf_conntrack_proto_dccp.c:682 ctnl_timeout_parse_policy+0x150/0x1d0 net/netfilter/nfnetlink_cttimeout.c:67 cttimeout_default_set+0x150/0x1c0 net/netfilter/nfnetlink_cttimeout.c:368 nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 Reported-by: syzbot+46a4ad33f345d1dd346e@syzkaller.appspotmail.com Fixes: c779e849608a8 ("netfilter: conntrack: remove get_timeout() indirection") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 30780d086a83332adcd9362281201cee7c3d9d19 Author: Arnd Bergmann Date: Tue Jan 7 21:43:59 2020 +0100 atm: eni: fix uninitialized variable warning With -O3, gcc has found an actual unintialized variable stored into an mmio register in two instances: drivers/atm/eni.c: In function 'discard': drivers/atm/eni.c:465:13: error: 'dma[1]' is used uninitialized in this function [-Werror=uninitialized] writel(dma[i*2+1],eni_dev->rx_dma+dma_wr*8+4); ^ drivers/atm/eni.c:465:13: error: 'dma[3]' is used uninitialized in this function [-Werror=uninitialized] Change the code to always write zeroes instead. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 96cc4b69581db68efc9749ef32e9cf8e0160c509 Author: Eric Dumazet Date: Mon Jan 6 12:30:48 2020 -0800 macvlan: do not assume mac_header is set in macvlan_broadcast() Use of eth_hdr() in tx path is error prone. Many drivers call skb_reset_mac_header() before using it, but others do not. Commit 6d1ccff62780 ("net: reset mac header in dev_start_xmit()") attempted to fix this generically, but commit d346a3fae3ff ("packet: introduce PACKET_QDISC_BYPASS socket option") brought back the macvlan bug. Lets add a new helper, so that tx paths no longer have to call skb_reset_mac_header() only to get a pointer to skb->data. Hopefully we will be able to revert 6d1ccff62780 ("net: reset mac header in dev_start_xmit()") and save few cycles in transmit fast path. BUG: KASAN: use-after-free in __get_unaligned_cpu32 include/linux/unaligned/packed_struct.h:19 [inline] BUG: KASAN: use-after-free in mc_hash drivers/net/macvlan.c:251 [inline] BUG: KASAN: use-after-free in macvlan_broadcast+0x547/0x620 drivers/net/macvlan.c:277 Read of size 4 at addr ffff8880a4932401 by task syz-executor947/9579 CPU: 0 PID: 9579 Comm: syz-executor947 Not tainted 5.5.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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_load_n_noabort+0xf/0x20 mm/kasan/generic_report.c:145 __get_unaligned_cpu32 include/linux/unaligned/packed_struct.h:19 [inline] mc_hash drivers/net/macvlan.c:251 [inline] macvlan_broadcast+0x547/0x620 drivers/net/macvlan.c:277 macvlan_queue_xmit drivers/net/macvlan.c:520 [inline] macvlan_start_xmit+0x402/0x77f drivers/net/macvlan.c:559 __netdev_start_xmit include/linux/netdevice.h:4447 [inline] netdev_start_xmit include/linux/netdevice.h:4461 [inline] dev_direct_xmit+0x419/0x630 net/core/dev.c:4079 packet_direct_xmit+0x1a9/0x250 net/packet/af_packet.c:240 packet_snd net/packet/af_packet.c:2966 [inline] packet_sendmsg+0x260d/0x6220 net/packet/af_packet.c:2991 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:659 __sys_sendto+0x262/0x380 net/socket.c:1985 __do_sys_sendto net/socket.c:1997 [inline] __se_sys_sendto net/socket.c:1993 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1993 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x442639 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 5b 10 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc13549e08 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000442639 RDX: 000000000000000e RSI: 0000000020000080 RDI: 0000000000000003 RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000403bb0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 9389: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x163/0x770 mm/slab.c:3665 kmalloc include/linux/slab.h:561 [inline] tomoyo_realpath_from_path+0xc5/0x660 security/tomoyo/realpath.c:252 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x230/0x430 security/tomoyo/file.c:822 tomoyo_inode_getattr+0x1d/0x30 security/tomoyo/tomoyo.c:129 security_inode_getattr+0xf2/0x150 security/security.c:1222 vfs_getattr+0x25/0x70 fs/stat.c:115 vfs_statx_fd+0x71/0xc0 fs/stat.c:145 vfs_fstat include/linux/fs.h:3265 [inline] __do_sys_newfstat+0x9b/0x120 fs/stat.c:378 __se_sys_newfstat fs/stat.c:375 [inline] __x64_sys_newfstat+0x54/0x80 fs/stat.c:375 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9389: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 tomoyo_realpath_from_path+0x1a7/0x660 security/tomoyo/realpath.c:289 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x230/0x430 security/tomoyo/file.c:822 tomoyo_inode_getattr+0x1d/0x30 security/tomoyo/tomoyo.c:129 security_inode_getattr+0xf2/0x150 security/security.c:1222 vfs_getattr+0x25/0x70 fs/stat.c:115 vfs_statx_fd+0x71/0xc0 fs/stat.c:145 vfs_fstat include/linux/fs.h:3265 [inline] __do_sys_newfstat+0x9b/0x120 fs/stat.c:378 __se_sys_newfstat fs/stat.c:375 [inline] __x64_sys_newfstat+0x54/0x80 fs/stat.c:375 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a4932000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1025 bytes inside of 4096-byte region [ffff8880a4932000, ffff8880a4933000) The buggy address belongs to the page: page:ffffea0002924c80 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 raw: 00fffe0000010200 ffffea0002846208 ffffea00028f3888 ffff8880aa402000 raw: 0000000000000000 ffff8880a4932000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a4932300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a4932380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a4932400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a4932480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a4932500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: b863ceb7ddce ("[NET]: Add macvlan driver") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 2f806c2a16b37ed6f90e4d9c1b14e97bb24ab0c2 Merge: cb6f74a1ead4 240ce7f6428f Author: David S. Miller Date: Wed Jan 8 12:45:53 2020 -0800 Merge branch 'net-ungraft-prio' Petr Machata says: ==================== When ungrafting from PRIO, replace child with FIFO When a child Qdisc is removed from one of the PRIO Qdisc's bands, it is replaced unconditionally by a NOOP qdisc. As a result, any traffic hitting that band gets dropped. That is incorrect--no Qdisc was explicitly added when PRIO was created, and after removal, none should have to be added either. In patch #2, this problem is fixed for PRIO by first attempting to create a default Qdisc and only falling back to noop when that fails. This pattern of attempting to create an invisible FIFO, using NOOP only as a fallback, is also seen in some other Qdiscs. The only driver currently offloading PRIO (and thus presumably the only one impacted by this) is mlxsw. Therefore patch #1 extends mlxsw to handle the replacement by an invisible FIFO gracefully. ==================== Signed-off-by: David S. Miller commit 240ce7f6428ff5188b9eedc066e1e4d645b8635f Author: Petr Machata Date: Mon Jan 6 18:01:56 2020 +0000 net: sch_prio: When ungrafting, replace with FIFO When a child Qdisc is removed from one of the PRIO Qdisc's bands, it is replaced unconditionally by a NOOP qdisc. As a result, any traffic hitting that band gets dropped. That is incorrect--no Qdisc was explicitly added when PRIO was created, and after removal, none should have to be added either. Fix PRIO by first attempting to create a default Qdisc and only falling back to noop when that fails. This pattern of attempting to create an invisible FIFO, using NOOP only as a fallback, is also seen in other Qdiscs. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 3971a535b839489e4ea31796cc086e6ce616318c Author: Petr Machata Date: Mon Jan 6 18:01:55 2020 +0000 mlxsw: spectrum_qdisc: Ignore grafting of invisible FIFO The following patch will change PRIO to replace a removed Qdisc with an invisible FIFO, instead of NOOP. mlxsw will see this replacement due to the graft message that is generated. But because FIFO does not issue its own REPLACE message, when the graft operation takes place, the Qdisc that mlxsw tracks under the indicated band is still the old one. The child handle (0:0) therefore does not match, and mlxsw rejects the graft operation, which leads to an extack message: Warning: Offloading graft operation failed. Fix by ignoring the invisible children in the PRIO graft handler. The DESTROY message of the removed Qdisc is going to follow shortly and handle the removal. Fixes: 32dc5efc6cb4 ("mlxsw: spectrum: qdiscs: prio: Handle graft command") Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit cb6f74a1ead4c5ab2431ea6dbecd1447b74f7249 Author: Niklas Cassel Date: Mon Jan 6 17:31:30 2020 +0100 MAINTAINERS: Remove myself as co-maintainer for qcom-ethqos As I am no longer with Linaro, I no longer have access to documentation for this IP. The Linaro email will start bouncing soon. Vinod is fully capable to maintain this driver by himself, therefore remove myself as co-maintainer for qcom-ethqos. Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller commit 90d72256addff9e5f8ad645e8f632750dd1f8935 Author: Eric Dumazet Date: Mon Jan 6 06:45:37 2020 -0800 gtp: fix bad unlock balance in gtp_encap_enable_socket WARNING: bad unlock balance detected! 5.5.0-rc5-syzkaller #0 Not tainted ------------------------------------- syz-executor921/9688 is trying to release lock (sk_lock-AF_INET6) at: [] gtp_encap_enable_socket+0x146/0x400 drivers/net/gtp.c:830 but there are no more locks to release! other info that might help us debug this: 2 locks held by syz-executor921/9688: #0: ffffffff8a4d8840 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:72 [inline] #0: ffffffff8a4d8840 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x405/0xaf0 net/core/rtnetlink.c:5421 #1: ffff88809304b560 (slock-AF_INET6){+...}, at: spin_lock_bh include/linux/spinlock.h:343 [inline] #1: ffff88809304b560 (slock-AF_INET6){+...}, at: release_sock+0x20/0x1c0 net/core/sock.c:2951 stack backtrace: CPU: 0 PID: 9688 Comm: syz-executor921 Not tainted 5.5.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+0x197/0x210 lib/dump_stack.c:118 print_unlock_imbalance_bug kernel/locking/lockdep.c:4008 [inline] print_unlock_imbalance_bug.cold+0x114/0x123 kernel/locking/lockdep.c:3984 __lock_release kernel/locking/lockdep.c:4242 [inline] lock_release+0x5f2/0x960 kernel/locking/lockdep.c:4503 sock_release_ownership include/net/sock.h:1496 [inline] release_sock+0x17c/0x1c0 net/core/sock.c:2961 gtp_encap_enable_socket+0x146/0x400 drivers/net/gtp.c:830 gtp_encap_enable drivers/net/gtp.c:852 [inline] gtp_newlink+0x9fc/0xc60 drivers/net/gtp.c:666 __rtnl_newlink+0x109e/0x1790 net/core/rtnetlink.c:3305 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3363 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5424 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5442 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x58c/0x7d0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:659 ____sys_sendmsg+0x753/0x880 net/socket.c:2330 ___sys_sendmsg+0x100/0x170 net/socket.c:2384 __sys_sendmsg+0x105/0x1d0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg net/socket.c:2424 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2424 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x445d49 Code: e8 bc b7 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 2b 12 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8019074db8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000006dac38 RCX: 0000000000445d49 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000003 RBP: 00000000006dac30 R08: 0000000000000004 R09: 0000000000000000 R10: 0000000000000008 R11: 0000000000000246 R12: 00000000006dac3c R13: 00007ffea687f6bf R14: 00007f80190759c0 R15: 20c49ba5e353f7cf Fixes: e198987e7dd7 ("gtp: fix suspicious RCU usage") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Taehee Yoo Signed-off-by: David S. Miller commit d9e15a2733067c9328fb56d98fe8e574fa19ec31 Author: Eric Dumazet Date: Mon Jan 6 06:10:39 2020 -0800 pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM As diagnosed by Florian : If TCA_FQ_QUANTUM is set to 0x80000000, fq_deueue() can loop forever in : if (f->credit <= 0) { f->credit += q->quantum; goto begin; } ... because f->credit is either 0 or -2147483648. Let's limit TCA_FQ_QUANTUM to no more than 1 << 20 : This max value should limit risks of breaking user setups while fixing this bug. Fixes: afe4fd062416 ("pkt_sched: fq: Fair Queue packet scheduler") Signed-off-by: Eric Dumazet Diagnosed-by: Florian Westphal Reported-by: syzbot+dc9071cc5a85950bdfce@syzkaller.appspotmail.com Signed-off-by: David S. Miller commit b969fee12b6330fd6a0b15337a314d5b5ee56916 Author: Masahiro Yamada Date: Mon Jan 6 16:35:27 2020 +0900 tipc: remove meaningless assignment in Makefile There is no module named tipc_diag. The assignment to tipc_diag-y has no effect. Signed-off-by: Masahiro Yamada Signed-off-by: David S. Miller commit ea04b445a266cddd5d5c653690d9676df020302f Author: Masahiro Yamada Date: Mon Jan 6 16:35:26 2020 +0900 tipc: do not add socket.o to tipc-y twice net/tipc/Makefile adds socket.o twice. tipc-y += addr.o bcast.o bearer.o \ core.o link.o discover.o msg.o \ name_distr.o subscr.o monitor.o name_table.o net.o \ netlink.o netlink_compat.o node.o socket.o eth_media.o \ ^^^^^^^^ topsrv.o socket.o group.o trace.o ^^^^^^^^ Signed-off-by: Masahiro Yamada Signed-off-by: David S. Miller commit f1239d8aa84dad8fe4b6cc1356f40fc8e842db47 Author: Chen-Yu Tsai Date: Mon Jan 6 11:09:45 2020 +0800 net: stmmac: dwmac-sun8i: Allow all RGMII modes Allow all the RGMII modes to be used. This would allow us to represent the hardware better in the device tree with RGMII_ID where in most cases the PHY's internal delay for both RX and TX are used. Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i") Signed-off-by: Chen-Yu Tsai Signed-off-by: David S. Miller commit 52cc73e5404c7ba0cbfc50cb4c265108c84b3d5a Author: Chen-Yu Tsai Date: Mon Jan 6 11:09:22 2020 +0800 net: stmmac: dwmac-sunxi: Allow all RGMII modes Allow all the RGMII modes to be used. This would allow us to represent the hardware better in the device tree with RGMII_ID where in most cases the PHY's internal delay for both RX and TX are used. Fixes: af0bd4e9ba80 ("net: stmmac: sunxi platform extensions for GMAC in Allwinner A20 SoC's") Signed-off-by: Chen-Yu Tsai Signed-off-by: David S. Miller commit 8e85def5723eccea30ebf22645673692ab8cb3e2 Author: Kai Vehmanen Date: Wed Jan 8 20:08:56 2020 +0200 ALSA: hda: enable regmap internal locking This reverts commit 42ec336f1f9d ("ALSA: hda: Disable regmap internal locking"). Without regmap locking, there is a race between snd_hda_codec_amp_init() and PM callbacks issuing regcache_sync(). This was caught by following kernel warning trace: <4> [358.080081] WARNING: CPU: 2 PID: 4157 at drivers/base/regmap/regcache.c:498 regcache_cache_only+0xf5/0x130 [...] <4> [358.080148] Call Trace: <4> [358.080158] snd_hda_codec_amp_init+0x4e/0x100 [snd_hda_codec] <4> [358.080169] snd_hda_codec_amp_init_stereo+0x40/0x80 [snd_hda_codec] Suggested-by: Takashi Iwai BugLink: https://gitlab.freedesktop.org/drm/intel/issues/592 Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200108180856.5194-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 9f1c2cb3296a252bd84d56f80346369bd0d95387 Merge: fe013e2121c6 ffcdc5df08bf Author: Olof Johansson Date: Wed Jan 8 10:24:48 2020 -0800 Merge tag 'aspeed-5.5-devicetree-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/fixes ASPEED device tree fixes for 5.5 Fixes for some badly applied patches that went in to 5.5. There is also a fix for an incorrect i2c address. * tag 'aspeed-5.5-devicetree-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed: rainier: Fix fan fault and presence ARM: dts: aspeed: rainier: Remove duplicate i2c busses ARM: dts: aspeed: tacoma: Remove duplicate flash nodes ARM: dts: aspeed: tacoma: Remove duplicate i2c busses ARM: dts: aspeed: tacoma: Fix fsi master node ARM: dts: aspeed-g6: Fix FSI master location Link: https://lore.kernel.org/r/CACPK8XcjazgORXNZBU1ECMukXG4HA8D9VeDxiSPifDk_iB7_dw@mail.gmail.com Signed-off-by: Olof Johansson commit fe013e2121c63bb2a3d0741d9245679e3f4028d2 Author: Arnd Bergmann Date: Mon Dec 16 14:21:26 2019 +0100 ARM: omap2plus: select RESET_CONTROLLER With the new omap_prm driver added unconditionally, omap2 builds fail when the reset controller subsystem is disabled: drivers/soc/ti/omap_prm.o: In function `omap_prm_probe': omap_prm.c:(.text+0x2d4): undefined reference to `devm_reset_controller_register' Link: https://lore.kernel.org/r/20191216132132.3330811-1-arnd@arndb.de Fixes: 3e99cb214f03 ("soc: ti: add initial PRM driver with reset control support") Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren Signed-off-by: Olof Johansson commit 7afec66e2bf5683d8bfc812cc295313d1b8473bc Author: Arnd Bergmann Date: Tue Dec 10 20:51:44 2019 +0100 ARM: davinci: select CONFIG_RESET_CONTROLLER Selecting RESET_CONTROLLER is actually required, otherwise we can get a link failure in the clock driver: drivers/clk/davinci/psc.o: In function `__davinci_psc_register_clocks': psc.c:(.text+0x9a0): undefined reference to `devm_reset_controller_register' drivers/clk/davinci/psc-da850.o: In function `da850_psc0_init': psc-da850.c:(.text+0x24): undefined reference to `reset_controller_add_lookup' Link: https://lore.kernel.org/r/20191210195202.622734-1-arnd@arndb.de Fixes: f962396ce292 ("ARM: davinci: support multiplatform build for ARM v5") Cc: # v5.4 Signed-off-by: Arnd Bergmann Reviewed-by: Bartosz Golaszewski Reviewed-by: Philipp Zabel Acked-by: Sekhar Nori Signed-off-by: Olof Johansson commit b07f636fca1c8fbba124b0082487c0b3890a0e0c Merge: ae6088216ce4 a430e67d9a2c Author: Linus Torvalds Date: Wed Jan 8 09:26:33 2020 -0800 Merge tag 'tpmdd-next-20200108' of git://git.infradead.org/users/jjs/linux-tpmdd Pull more tpmd fixes from Jarkko Sakkinen: "One critical regression fix (the faulty commit got merged in rc3, but also marked for stable)" * tag 'tpmdd-next-20200108' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm: Handle negative priv->response_len in tpm_common_read() commit 26ef8493e1ab771cb01d27defca2fa1315dc3980 Author: Johannes Thumshirn Date: Wed Jan 8 21:07:32 2020 +0900 btrfs: fix memory leak in qgroup accounting When running xfstests on the current btrfs I get the following splat from kmemleak: unreferenced object 0xffff88821b2404e0 (size 32): comm "kworker/u4:7", pid 26663, jiffies 4295283698 (age 8.776s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 10 ff fd 26 82 88 ff ff ...........&.... 10 ff fd 26 82 88 ff ff 20 ff fd 26 82 88 ff ff ...&.... ..&.... backtrace: [<00000000f94fd43f>] ulist_alloc+0x25/0x60 [btrfs] [<00000000fd023d99>] btrfs_find_all_roots_safe+0x41/0x100 [btrfs] [<000000008f17bd32>] btrfs_find_all_roots+0x52/0x70 [btrfs] [<00000000b7660afb>] btrfs_qgroup_rescan_worker+0x343/0x680 [btrfs] [<0000000058e66778>] btrfs_work_helper+0xac/0x1e0 [btrfs] [<00000000f0188930>] process_one_work+0x1cf/0x350 [<00000000af5f2f8e>] worker_thread+0x28/0x3c0 [<00000000b55a1add>] kthread+0x109/0x120 [<00000000f88cbd17>] ret_from_fork+0x35/0x40 This corresponds to: (gdb) l *(btrfs_find_all_roots_safe+0x41) 0x8d7e1 is in btrfs_find_all_roots_safe (fs/btrfs/backref.c:1413). 1408 1409 tmp = ulist_alloc(GFP_NOFS); 1410 if (!tmp) 1411 return -ENOMEM; 1412 *roots = ulist_alloc(GFP_NOFS); 1413 if (!*roots) { 1414 ulist_free(tmp); 1415 return -ENOMEM; 1416 } 1417 Following the lifetime of the allocated 'roots' ulist, it gets freed again in btrfs_qgroup_account_extent(). But this does not happen if the function is called with the 'BTRFS_FS_QUOTA_ENABLED' flag cleared, then btrfs_qgroup_account_extent() does a short leave and directly returns. Instead of directly returning we should jump to the 'out_free' in order to free all resources as expected. CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Qu Wenruo Signed-off-by: Johannes Thumshirn [ add comment ] Signed-off-by: David Sterba commit 1530f6f5f5806b2abbf2a9276c0db313ae9a0e09 Author: Qi Zhou Date: Sat Jan 4 11:02:01 2020 +0000 usb: missing parentheses in USE_NEW_SCHEME According to bd0e6c9614b9 ("usb: hub: try old enumeration scheme first for high speed devices") the kernel will try the old enumeration scheme first for high speed devices. This can happen when a high speed device is plugged in. But due to missing parentheses in the USE_NEW_SCHEME define, this logic can get messed up and the incorrect result happens. Acked-by: Alan Stern Signed-off-by: Qi Zhou Link: https://lore.kernel.org/r/ht4mtag8ZP-HKEhD0KkJhcFnVlOFV8N8eNjJVRD9pDkkLUNhmEo8_cL_sl7xy9mdajdH-T8J3TFQsjvoYQT61NFjQXy469Ed_BbBw_x4S1E=@protonmail.com [ fixup changelog text - gregkh] Cc: stable Fixes: bd0e6c9614b9 ("usb: hub: try old enumeration scheme first for high speed devices") Signed-off-by: Greg Kroah-Hartman commit ba9b40810bb43e6bf73b395012b98633c03f7f59 Author: Colin Ian King Date: Tue Jan 7 12:39:01 2020 +0000 usb: ohci-da8xx: ensure error return on variable error is set Currently when an error occurs when calling devm_gpiod_get_optional or calling gpiod_to_irq it causes an uninitialized error return in variable 'error' to be returned. Fix this by ensuring the error variable is set from da8xx_ohci->oc_gpio and oc_irq. Thanks to Dan Carpenter for spotting the uninitialized error in the gpiod_to_irq failure case. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: d193abf1c913 ("usb: ohci-da8xx: add vbus and overcurrent gpios") Signed-off-by: Colin Ian King Cc: stable Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200107123901.101190-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 96a0c12843109e5c4d5eb1e09d915fdd0ce31d25 Author: Paul Cercueil Date: Tue Jan 7 09:26:25 2020 -0600 usb: musb: Disable pullup at init The pullup may be already enabled before the driver is initialized. This happens for instance on JZ4740. It has to be disabled at init time, as we cannot guarantee that a gadget driver will be bound to the UDC. Signed-off-by: Paul Cercueil Suggested-by: Bin Liu Cc: stable@vger.kernel.org Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200107152625.857-3-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 5fbf7a2534703fd71159d3d71504b0ad01b43394 Author: Tony Lindgren Date: Tue Jan 7 09:26:24 2020 -0600 usb: musb: fix idling for suspend after disconnect interrupt When disconnected as USB B-device, suspend interrupt should come before diconnect interrupt, because the DP/DM pins are shorter than the VBUS/GND pins on the USB connectors. But we sometimes get a suspend interrupt after disconnect interrupt. In that case we have devctl set to 99 with VBUS still valid and musb_pm_runtime_check_session() wrongly thinks we have an active session. We have no other interrupts after disconnect coming in this case at least with the omap2430 glue. Let's fix the issue by checking the interrupt status again with delayed work for the devctl 99 case. In the suspend after disconnect case the devctl session bit has cleared by then and musb can idle. For a typical USB B-device connect case we just continue with normal interrupts. Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Cc: stable@vger.kernel.org Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200107152625.857-2-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 33786a2801163a5888679ae064b99927fa849a9e Author: Heikki Krogerus Date: Wed Jan 8 16:13:46 2020 +0300 usb: typec: ucsi: Fix the notification bit offsets The bit offsets for the Set Notification Enable command were not considering the reserved bits in the middle. Fixes: 470ce43a1a81 ("usb: typec: ucsi: Remove struct ucsi_control") Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200108131347.43217-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a430e67d9a2c62a8c7b315b99e74de02018d0a96 Author: Tadeusz Struk Date: Tue Jan 7 14:04:48 2020 -0800 tpm: Handle negative priv->response_len in tpm_common_read() The priv->response_length can hold the size of an response or an negative error code, and the tpm_common_read() needs to handle both cases correctly. Changed the type of response_length to signed and accounted for negative value in tpm_common_read(). Cc: stable@vger.kernel.org Fixes: d23d12484307 ("tpm: fix invalid locking in NONBLOCKING mode") Reported-by: Laura Abbott Signed-off-by: Tadeusz Struk Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 423a716cd7be16fb08690760691befe3be97d3fc Author: Josef Bacik Date: Wed Dec 18 17:20:29 2019 -0500 btrfs: do not delete mismatched root refs btrfs_del_root_ref() will simply WARN_ON() if the ref doesn't match in any way, and then continue to delete the reference. This shouldn't happen, we have these values because there's more to the reference than the original root and the sub root. If any of these checks fail, return -ENOENT. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit d49d3287e74ffe55ae7430d1e795e5f9bf7359ea Author: Josef Bacik Date: Wed Dec 18 17:20:28 2019 -0500 btrfs: fix invalid removal of root ref If we have the following sequence of events btrfs sub create A btrfs sub create A/B btrfs sub snap A C mkdir C/foo mv A/B C/foo rm -rf * We will end up with a transaction abort. The reason for this is because we create a root ref for B pointing to A. When we create a snapshot of C we still have B in our tree, but because the root ref points to A and not C we will make it appear to be empty. The problem happens when we move B into C. This removes the root ref for B pointing to A and adds a ref of B pointing to C. When we rmdir C we'll see that we have a ref to our root and remove the root ref, despite not actually matching our reference name. Now btrfs_del_root_ref() allowing this to work is a bug as well, however we know that this inode does not actually point to a root ref in the first place, so we shouldn't be calling btrfs_del_root_ref() in the first place and instead simply look up our dir index for this item and do the rest of the removal. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 045d3967b6920b663fc010ad414ade1b24143bd1 Author: Josef Bacik Date: Wed Dec 18 17:20:27 2019 -0500 btrfs: rework arguments of btrfs_unlink_subvol btrfs_unlink_subvol takes the name of the dentry and the root objectid based on what kind of inode this is, either a real subvolume link or a empty one that we inherited as a snapshot. We need to fix how we unlink in the case for BTRFS_EMPTY_SUBVOL_DIR_OBJECTID in the future, so rework btrfs_unlink_subvol to just take the dentry and handle getting the right objectid given the type of inode this is. There is no functional change here, simply pushing the work into btrfs_unlink_subvol() proper. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 54a6a7dc107da0492a9e84fd7e9a107b3c58138d Author: Kailang Yang Date: Wed Jan 8 16:47:56 2020 +0800 ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen Add quirk to ALC285_FIXUP_SPEAKER2_TO_DAC1, which is the same fixup applied for X1 Carbon 7th gen in commit d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen"). Signed-off-by: Kailang Yang Reviewed-by: Jaroslav Kysela Cc: Signed-off-by: Takashi Iwai commit 9194a1ebbc56d7006835e2b4cacad301201fb832 Author: Kailang Yang Date: Tue Jan 7 17:22:19 2020 +0800 ALSA: hda/realtek - Set EAPD control to default for ALC222 Set EAPD control to verb control. Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai commit ffcdc5df08bfc4f418693b22cf2a1182de3375b4 Author: Brandon Wyman Date: Thu Nov 21 18:33:33 2019 -0600 ARM: dts: aspeed: rainier: Fix fan fault and presence The PCA9552 used for fan fault and presence information is at address 61h, not 60h. Fixes: 2efc118ce3c3 ("ARM: dts: aspeed: rainier: Add i2c devices") Signed-off-by: Brandon Wyman Reviewed-by: Eddie James Signed-off-by: Joel Stanley commit 195cf4dbedce3becda34a29ece232b63eba77221 Author: Joel Stanley Date: Fri Jan 3 10:44:51 2020 +1100 ARM: dts: aspeed: rainier: Remove duplicate i2c busses This is a revert of "ARM: dts: aspeed: rainier: Add i2c devices", which was already applied to the tree. Fixes: 9c44db7096e0 ("ARM: dts: aspeed: rainier: Add i2c devices") Reviewed-by: Jim Wright Tested-by: Jim Wright Signed-off-by: Joel Stanley commit 87c5947ffeec42a4ef72e19b4c822be5d8e09c84 Author: Joel Stanley Date: Tue Dec 24 00:47:34 2019 +1100 ARM: dts: aspeed: tacoma: Remove duplicate flash nodes This is a revert of "ARM: dts: aspeed: tacoma: Enable FMC and SPI devices" which was already applied as part of "ARM: dts: aspeed: Add Tacoma machine". Fixes: 8737481e381c ("ARM: dts: aspeed: tacoma: Enable FMC and SPI devices") Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 265ae459b3ba3da4518c5ca2c89fd85c43723a99 Author: Joel Stanley Date: Tue Dec 24 00:47:33 2019 +1100 ARM: dts: aspeed: tacoma: Remove duplicate i2c busses This is a revert of "ARM: dts: aspeed: tacoma: Enable I2C busses", which was already applied as part of "ARM: dts: aspeed: Add Tacoma machine". Fixes: 606bcdde6724 ("ARM: dts: aspeed: tacoma: Enable I2C busses") Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit e30dcbbcb0ee16ca259f962840fc6246f00cd18e Author: Joel Stanley Date: Tue Dec 24 00:47:32 2019 +1100 ARM: dts: aspeed: tacoma: Fix fsi master node This was broken when applying "ARM: dts: aspeed: tacoma: Add host FSI description". Fixes: a981c93300ef ("ARM: dts: aspeed: tacoma: Add host FSI description") Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 413200017b8e5a603c3d872a62b222bd1e1a7b90 Author: Joel Stanley Date: Tue Dec 24 00:47:35 2019 +1100 ARM: dts: aspeed-g6: Fix FSI master location The FIS nodes were placed incorrectly in the device tree. Fixes: 0fe4e304782c ("ARM: dts: aspeed-g6: Describe FSI masters") Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 8e3366cad2bfe4e669bfd3758110be90b1dc75aa Author: Takashi Iwai Date: Tue Jan 7 08:09:56 2020 +0100 ASoC: Fix NULL dereference at freeing When an ASoC driver with pcm_destruct component ops is freed before the PCM object instantiation (e.g. deferring the probe), it hits an Oops at snd_soc_pcm_component_free() that calls the pcm_destruct ops unconditionally. Fix it by adding a NULL-check of rtd->pcm before calling callbacks. Fixes: c64bfc906600 ("ASoC: soc-core: add new pcm_construct/pcm_destruct") Reported-by: Matthias Brugger Tested-by: Ben Ho Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200107070956.15807-1-tiwai@suse.de Signed-off-by: Mark Brown commit 47240ba0cd09bb6fe6db9889582048324999dfa4 Author: Eric Dumazet Date: Tue Jan 7 10:57:01 2020 -0800 net: usb: lan78xx: fix possible skb leak If skb_linearize() fails, we need to free the skb. TSO makes skb bigger, and this bug might be the reason Raspberry Pi 3B+ users had to disable TSO. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Eric Dumazet Reported-by: RENARD Pierre-Francois Cc: Stefan Wahren Cc: Woojung Huh Cc: Microchip Linux Driver Support Signed-off-by: David S. Miller commit da29f2d84bd10234df570b7f07cbd0166e738230 Author: Jose Abreu Date: Tue Jan 7 13:35:42 2020 +0100 net: stmmac: Fixed link does not need MDIO Bus When using fixed link we don't need the MDIO bus support. Reported-by: Heiko Stuebner Reported-by: kernelci.org bot Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms without PHY") Signed-off-by: Jose Abreu Acked-by: Sriram Dash Tested-by: Patrice Chotard Tested-by: Heiko Stuebner Acked-by: Neil Armstrong Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli # Lamobo R1 (fixed-link + MDIO sub node for roboswitch). Signed-off-by: David S. Miller commit b57e1fff7da1cb228c328905079eeb915d0a34f0 Merge: 96b11e935808 eb8ef2a3c500 Author: David S. Miller Date: Tue Jan 7 13:35:14 2020 -0800 Merge branch 'vlan-rtnetlink-newlink-fixes' Eric Dumazet says: ==================== vlan: rtnetlink newlink fixes First patch fixes a potential memory leak found by syzbot Second patch makes vlan_changelink() aware of errors and report them to user. ==================== Signed-off-by: David S. Miller commit eb8ef2a3c50092bb018077c047b8dba1ce0e78e3 Author: Eric Dumazet Date: Tue Jan 7 01:42:25 2020 -0800 vlan: vlan_changelink() should propagate errors Both vlan_dev_change_flags() and vlan_dev_set_egress_priority() can return an error. vlan_changelink() should not ignore them. Fixes: 07b5b17e157b ("[VLAN]: Use rtnl_link API") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 9bbd917e0bec9aebdbd0c8dbc966caec15eb33e9 Author: Eric Dumazet Date: Tue Jan 7 01:42:24 2020 -0800 vlan: fix memory leak in vlan_dev_set_egress_priority There are few cases where the ndo_uninit() handler might be not called if an error happens while device is initialized. Since vlan_newlink() calls vlan_changelink() before trying to register the netdevice, we need to make sure vlan_dev_uninit() has been called at least once, or we might leak allocated memory. BUG: memory leak unreferenced object 0xffff888122a206c0 (size 32): comm "syz-executor511", pid 7124, jiffies 4294950399 (age 32.240s) hex dump (first 32 bytes): 00 00 00 00 00 00 61 73 00 00 00 00 00 00 00 00 ......as........ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000000eb3bb85>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] [<000000000eb3bb85>] slab_post_alloc_hook mm/slab.h:586 [inline] [<000000000eb3bb85>] slab_alloc mm/slab.c:3320 [inline] [<000000000eb3bb85>] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3549 [<000000007b99f620>] kmalloc include/linux/slab.h:556 [inline] [<000000007b99f620>] vlan_dev_set_egress_priority+0xcc/0x150 net/8021q/vlan_dev.c:194 [<000000007b0cb745>] vlan_changelink+0xd6/0x140 net/8021q/vlan_netlink.c:126 [<0000000065aba83a>] vlan_newlink+0x135/0x200 net/8021q/vlan_netlink.c:181 [<00000000fb5dd7a2>] __rtnl_newlink+0x89a/0xb80 net/core/rtnetlink.c:3305 [<00000000ae4273a1>] rtnl_newlink+0x4e/0x80 net/core/rtnetlink.c:3363 [<00000000decab39f>] rtnetlink_rcv_msg+0x178/0x4b0 net/core/rtnetlink.c:5424 [<00000000accba4ee>] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477 [<00000000319fe20f>] rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5442 [<00000000d51938dc>] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] [<00000000d51938dc>] netlink_unicast+0x223/0x310 net/netlink/af_netlink.c:1328 [<00000000e539ac79>] netlink_sendmsg+0x2c0/0x570 net/netlink/af_netlink.c:1917 [<000000006250c27e>] sock_sendmsg_nosec net/socket.c:639 [inline] [<000000006250c27e>] sock_sendmsg+0x54/0x70 net/socket.c:659 [<00000000e2a156d1>] ____sys_sendmsg+0x2d0/0x300 net/socket.c:2330 [<000000008c87466e>] ___sys_sendmsg+0x8a/0xd0 net/socket.c:2384 [<00000000110e3054>] __sys_sendmsg+0x80/0xf0 net/socket.c:2417 [<00000000d71077c8>] __do_sys_sendmsg net/socket.c:2426 [inline] [<00000000d71077c8>] __se_sys_sendmsg net/socket.c:2424 [inline] [<00000000d71077c8>] __x64_sys_sendmsg+0x23/0x30 net/socket.c:2424 Fixe: 07b5b17e157b ("[VLAN]: Use rtnl_link API") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 96b11e9358080e8b705babd078cefa753109204b Merge: 481a7d154cbb 6d4f151acf9a Author: David S. Miller Date: Tue Jan 7 13:31:23 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-01-07 The following pull-request contains BPF updates for your *net* tree. We've added 2 non-merge commits during the last 1 day(s) which contain a total of 2 files changed, 16 insertions(+), 4 deletions(-). The main changes are: 1) Fix a use-after-free in cgroup BPF due to auto-detachment, from Roman Gushchin. 2) Fix skb out-of-bounds access in ld_abs/ind instruction, from Daniel Borkmann. ==================== Signed-off-by: David S. Miller commit 481a7d154cbbd5ca355cc01cc8969876b240eded Author: Jiping Ma Date: Tue Jan 7 14:34:00 2020 +0800 stmmac: debugfs entry name is not be changed when udev rename device name. Add one notifier for udev changes net device name. Fixes: b6601323ef9e ("net: stmmac: debugfs entry name is not be changed when udev rename") Signed-off-by: Jiping Ma Signed-off-by: David S. Miller commit eacc6dfaea963ef61540abb31ad7829be5eff284 Author: Jens Axboe Date: Tue Jan 7 13:08:56 2020 -0700 io_uring: remove punt of short reads to async context We currently punt any short read on a regular file to async context, but this fails if the short read is due to running into EOF. This is especially problematic since we only do the single prep for commands now, as we don't reset kiocb->ki_pos. This can result in a 4k read on a 1k file returning zero, as we detect the short read and then retry from async context. At the time of retry, the position is now 1k, and we end up reading nothing, and hence return 0. Instead of trying to patch around the fact that short reads can be legitimate and won't succeed in case of retry, remove the logic to punt a short read to async context. Simply return it. Signed-off-by: Jens Axboe commit b583cef5690581fa5f15f373a27f5c023232464a Merge: 850e0a99361b 03729cfa0d54 Author: Olof Johansson Date: Tue Jan 7 11:15:26 2020 -0800 Merge tag 'omap-for-v5.5/fixes-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fixes for omaps for v5.5-rc cycle Here are few fixes for v5.5-rc cycle: - Two corner case fixes related to ti-sysc driver clock issues - Fixes for am57xx dts for pcie gpios - Beagle-x15 regulator dts fix - Fix for wkup_m3_ipc driver race * tag 'omap-for-v5.5/fixes-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: soc: ti: wkup_m3_ipc: Fix race condition with rproc_boot ARM: dts: beagle-x15-common: Model 5V0 regulator ARM: dts: am571x-idk: Fix gpios property to have the correct gpio number ARM: dts: am57xx-beagle-x15/am57xx-idk: Remove "gpios" for endpoint dt nodes bus: ti-sysc: Fix iterating over clocks ARM: OMAP2+: Fix ti_sysc_find_one_clockdomain to check for to_clk_hw_omap Link: https://lore.kernel.org/r/pull-1578418121-413328@atomide.com Signed-off-by: Olof Johansson commit 9554de394b7eee01606e64c3806cd43893f3037e Author: Shiraz Saleem Date: Tue Jan 7 10:22:23 2020 -0600 i40iw: Remove setting of VMA private data and use rdma_user_mmap_io vm_ops is now initialized in ib_uverbs_mmap() with the recent rdma mmap API changes. Earlier it was done in rdma_umap_priv_init() which would not be called unless a driver called rdma_user_mmap_io() in its mmap. i40iw does not use the rdma_user_mmap_io API but sets the vma's vm_private_data to a driver object. This now conflicts with the vm_op rdma_umap_close as priv pointer points to the i40iw driver object instead of the private data setup by core when rdma_user_mmap_io is called. This leads to a crash in rdma_umap_close with a mmap put being called when it should not have. Remove the redundant setting of the vma private_data in i40iw as it is not used. Also move i40iw over to use the rdma_user_mmap_io API. This gives the extra protection of having the mappings zapped when the context is detsroyed. BUG: unable to handle page fault for address: 0000000100000001 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP PTI CPU: 6 PID: 9528 Comm: rping Kdump: loaded Not tainted 5.5.0-rc4+ #117 Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./Q87M-D2H, BIOS F7 01/17/2014 RIP: 0010:rdma_user_mmap_entry_put+0xa/0x30 [ib_core] RSP: 0018:ffffb340c04c7c38 EFLAGS: 00010202 RAX: 00000000ffffffff RBX: ffff9308e7be2a00 RCX: 000000000000cec0 RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000100000001 RBP: ffff9308dc7641f0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: ffffffff8d4414d8 R12: ffff93075182c780 R13: 0000000000000001 R14: ffff93075182d2a8 R15: ffff9308e2ddc840 FS: 0000000000000000(0000) GS:ffff9308fdc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000100000001 CR3: 00000002e0412004 CR4: 00000000001606e0 Call Trace: rdma_umap_close+0x40/0x90 [ib_uverbs] remove_vma+0x43/0x80 exit_mmap+0xfd/0x1b0 mmput+0x6e/0x130 do_exit+0x290/0xcc0 ? get_signal+0x152/0xc40 do_group_exit+0x46/0xc0 get_signal+0x1bd/0xc40 ? prepare_to_wait_event+0x97/0x190 do_signal+0x36/0x630 ? remove_wait_queue+0x60/0x60 ? __audit_syscall_exit+0x1d9/0x290 ? rcu_read_lock_sched_held+0x52/0x90 ? kfree+0x21c/0x2e0 exit_to_usermode_loop+0x4f/0xc3 do_syscall_64+0x1ed/0x270 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fae715a81fd Code: Bad RIP value. RSP: 002b:00007fae6e163cb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: fffffffffffffe00 RBX: 00007fae6e163d30 RCX: 00007fae715a81fd RDX: 0000000000000010 RSI: 00007fae6e163cf0 RDI: 0000000000000003 RBP: 00000000013413a0 R08: 00007fae68000000 R09: 0000000000000017 R10: 0000000000000001 R11: 0000000000000293 R12: 00007fae680008c0 R13: 00007fae6e163cf0 R14: 00007fae717c9804 R15: 00007fae6e163ed0 CR2: 0000000100000001 ---[ end trace b33d58d3a06782cb ]--- RIP: 0010:rdma_user_mmap_entry_put+0xa/0x30 [ib_core] Fixes: b86deba977a9 ("RDMA/core: Move core content from ib_uverbs to ib_core") Link: https://lore.kernel.org/r/20200107162223.1745-1-shiraz.saleem@intel.com Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit db4ff423cd1659580e541a2d4363342f15c14230 Author: Chunming Zhou Date: Tue May 28 10:46:04 2019 +0800 drm/amdgpu: add DRIVER_SYNCOBJ_TIMELINE to amdgpu Can expose it now that the khronos has exposed the vlk extension. Signed-off-by: Chunming Zhou Reviewed-by: Flora Cui Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 840c90fce6c78bc6b2c4cb9e836d70985ed32066 Author: Thomas Anderson Date: Mon Dec 2 13:47:13 2019 -0800 drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded For high-res (8K) or HFR (4K120) displays, using uncompressed pixel formats like YCbCr444 would exceed the bandwidth of HDMI 2.0, so the "interesting" modes would be disabled, leaving only low-res or low framerate modes. This change lowers the pixel encoding to 4:2:2 or 4:2:0 if the max TMDS clock is exceeded. Verified that 8K30 and 4K120 are now available and working with a Samsung Q900R over an HDMI 2.0b link from a Radeon 5700. Reviewed-by: Harry Wentland Signed-off-by: Thomas Anderson Signed-off-by: Alex Deucher commit 7aec9ec1cf324d5c5a8d17b9c78a34c388e5f17b Author: Alex Deucher Date: Mon Jan 6 15:24:47 2020 -0500 Revert "drm/amdgpu: Set no-retry as default." This reverts commit 51bfac71cade386966791a8db87a5912781d249f. This causes stability issues on some raven boards. Revert for now until a proper fix is completed. Bug: https://gitlab.freedesktop.org/drm/amd/issues/934 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206017 Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 55817b340a31951d23d1692db45522560b1d20f9 Author: Qian Cai Date: Mon Jan 6 10:27:27 2020 -0500 iommu/dma: fix variable 'cookie' set but not used The commit c18647900ec8 ("iommu/dma: Relax locking in iommu_dma_prepare_msi()") introduced a compliation warning, drivers/iommu/dma-iommu.c: In function 'iommu_dma_prepare_msi': drivers/iommu/dma-iommu.c:1206:27: warning: variable 'cookie' set but not used [-Wunused-but-set-variable] struct iommu_dma_cookie *cookie; ^~~~~~ Fixes: c18647900ec8 ("iommu/dma: Relax locking in iommu_dma_prepare_msi()") Signed-off-by: Qian Cai Acked-by: Robin Murphy Signed-off-by: Joerg Roedel commit f78947c409204138a4bc0609f98e07ef9d01ac0a Author: Jon Derrick Date: Tue Dec 31 13:24:20 2019 -0700 iommu/vt-d: Unlink device if failed to add to group If the device fails to be added to the group, make sure to unlink the reference before returning. Signed-off-by: Jon Derrick Fixes: 39ab9555c2411 ("iommu: Add sysfs bindings for struct iommu_device") Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 7d4e6ccd1fb09dbfbc49746ca82bd5c25ad4bfe4 Author: Jon Derrick Date: Tue Dec 31 13:24:19 2019 -0700 iommu: Remove device link to group on failure This adds the missing teardown step that removes the device link from the group when the device addition fails. Signed-off-by: Jon Derrick Fixes: 797a8b4d768c5 ("iommu: Handle default domain attach failure") Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel commit 4a350a0ee5b0a14f826fcdf60dd1a3199cafbfd6 Author: Patrick Steinhardt Date: Fri Dec 27 00:56:18 2019 +0100 iommu/vt-d: Fix adding non-PCI devices to Intel IOMMU Starting with commit fa212a97f3a3 ("iommu/vt-d: Probe DMA-capable ACPI name space devices"), we now probe DMA-capable ACPI name space devices. On Dell XPS 13 9343, which has an Intel LPSS platform device INTL9C60 enumerated via ACPI, this change leads to the following warning: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 1 at pci_device_group+0x11a/0x130 CPU: 1 PID: 1 Comm: swapper/0 Tainted: G T 5.5.0-rc3+ #22 Hardware name: Dell Inc. XPS 13 9343/0310JH, BIOS A20 06/06/2019 RIP: 0010:pci_device_group+0x11a/0x130 Code: f0 ff ff 48 85 c0 49 89 c4 75 c4 48 8d 74 24 10 48 89 ef e8 48 ef ff ff 48 85 c0 49 89 c4 75 af e8 db f7 ff ff 49 89 c4 eb a5 <0f> 0b 49 c7 c4 ea ff ff ff eb 9a e8 96 1e c7 ff 66 0f 1f 44 00 00 RSP: 0000:ffffc0d6c0043cb0 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffffa3d1d43dd810 RCX: 0000000000000000 RDX: ffffa3d1d4fecf80 RSI: ffffa3d12943dcc0 RDI: ffffa3d1d43dd810 RBP: ffffa3d1d43dd810 R08: 0000000000000000 R09: ffffa3d1d4c04a80 R10: ffffa3d1d4c00880 R11: ffffa3d1d44ba000 R12: 0000000000000000 R13: ffffa3d1d4383b80 R14: ffffa3d1d4c090d0 R15: ffffa3d1d4324530 FS: 0000000000000000(0000) GS:ffffa3d1d6700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000000460a001 CR4: 00000000003606e0 Call Trace: ? iommu_group_get_for_dev+0x81/0x1f0 ? intel_iommu_add_device+0x61/0x170 ? iommu_probe_device+0x43/0xd0 ? intel_iommu_init+0x1fa2/0x2235 ? pci_iommu_init+0x52/0xe7 ? e820__memblock_setup+0x15c/0x15c ? do_one_initcall+0xcc/0x27e ? kernel_init_freeable+0x169/0x259 ? rest_init+0x95/0x95 ? kernel_init+0x5/0xeb ? ret_from_fork+0x35/0x40 ---[ end trace 28473e7abc25b92c ]--- DMAR: ACPI name space devices didn't probe correctly The bug results from the fact that while we now enumerate ACPI devices, we aren't able to handle any non-PCI device when generating the device group. Fix the issue by implementing an Intel-specific callback that returns `pci_device_group` only if the device is a PCI device. Otherwise, it will return a generic device group. Fixes: fa212a97f3a3 ("iommu/vt-d: Probe DMA-capable ACPI name space devices") Signed-off-by: Patrick Steinhardt Cc: stable@vger.kernel.org # v5.3+ Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit f30e27779d3031a092c2a177b7fb76adccc45241 Author: Geert Uytterhoeven Date: Mon Dec 30 14:27:34 2019 +0100 drm/fb-helper: Round up bits_per_pixel if possible When userspace requests a video mode parameter value that is not supported, frame buffer device drivers should round it up to a supported value, if possible, instead of just rejecting it. This allows applications to quickly scan for supported video modes. Currently this rule is not followed for the number of bits per pixel, causing e.g. "fbset -depth N" to fail, if N is smaller than the current number of bits per pixel. Fix this by returning an error only if bits per pixel is too large, and setting it to the current value otherwise. See also Documentation/fb/framebuffer.rst, Section 2 (Programmer's View of /dev/fb*"). Fixes: 865afb11949e5bf4 ("drm/fb-helper: reject any changes to the fbdev") Cc: stable@vger.kernel.org Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191230132734.4538-1-geert+renesas@glider.be commit 4396393fb96449c56423fb4b351f76e45a6bcaf6 Author: Chen-Yu Tsai Date: Tue Jan 7 15:01:13 2020 +0800 drm/sun4i: tcon: Set RGB DCLK min. divider based on hardware model In commit 0b8e7bbde5e7 ("drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.") it was assumed that all TCON variants support a minimum divider of 1 if only DCLK was used. However, the oldest generation of hardware only supports minimum divider of 4 if only DCLK is used. If a divider of 1 was used on this old hardware, some scrolling artifact would appear. A divider of 2 seemed OK, but a divider of 3 had artifacts as well. Set the minimum divider when outputing to parallel RGB based on the hardware model, with a minimum of 4 for the oldest (A10/A10s/A13/A20) hardware, and a minimum of 1 for the rest. A value is not set for the TCON variants lacking channel 0. This fixes the scrolling artifacts seen on my A13 tablet. Fixes: 0b8e7bbde5e7 ("drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.") Cc: # 5.4.x Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200107070113.28951-1-wens@kernel.org commit 2b2c4a83d69dc9f2b46b8e791f5b8c2451c267bd Author: Manasi Navare Date: Fri Dec 27 19:12:04 2019 -0800 drm/i915/dp: Disable Port sync mode correctly on teardown While clearing the Ports ync mode enable and master select bits we need to clear the register completely instead of using disable masks v3: * Remove reg variable (Matt) v2: * Just write 0 to the reg (Ville) * Rebase Bugzilla: https://gitlab.freedesktop.org/drm/intel/issues/5 Cc: Ville Syrjälä Cc: Jani Nikula Fixes: 51528afe7c5e ("drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence") Signed-off-by: Manasi Navare Reviewed-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191228031204.10189-3-manasi.d.navare@intel.com (cherry picked from commit a3d9382bd439e7be1858abc3d5f014dd55913448) Signed-off-by: Joonas Lahtinen commit 25b79ad51bf04a8aa67b5bccd631fc05f963b8e0 Author: Matt Roper Date: Tue Dec 31 11:07:13 2019 -0800 drm/i915: Add Wa_1407352427:icl,ehl The workaround database now indicates we need to disable psdunit clock gating as well. v3: - Rebase on top of other workarounds that have landed. - Restrict cc:stable tag to 5.2+ since that's when ICL was first officially supported. Bspec: 32354 Bspec: 33450 Bspec: 33451 Suggested-by: Lionel Landwerlin Cc: stable@vger.kernel.org # v5.2+ Cc: Lionel Landwerlin Cc: Lucas De Marchi Cc: Matt Atwood Signed-off-by: Matt Roper Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191231190713.1549533-1-matthew.d.roper@intel.com (cherry picked from commit 1cd21a7c5679015352e8a6f46813aced51d71bb8) Signed-off-by: Joonas Lahtinen commit a7f3ad37f80d0d5eec9dad156964c0dac800a80e Author: Matt Roper Date: Mon Dec 23 17:20:25 2019 -0800 drm/i915: Add Wa_1408615072 and Wa_1407596294 to icl,ehl Workaround database indicates we should disable clock gating of both the vsunit and hsunit. Bspec: 33450 Bspec: 33451 Cc: stable@kernel.vger.org Cc: Lucas De Marchi Cc: Matt Atwood Cc: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224012026.3157766-3-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi (cherry picked from commit b9cf9dac3dac4c1d2a47d34f30ec53c0423cecf8) Signed-off-by: Joonas Lahtinen commit ce69e553b9a4a652830add9906939a8a04d0d585 Author: Chris Wilson Date: Tue Dec 31 12:27:08 2019 +0000 drm/i915/gt: Restore coarse power gating The coarse power gating was disabled as part of commit 2248a28384fe ("drm/i915/gen8+: Add RC6 CTX corruption WA") as a prelude to recover from the context corruption; the power gating itself has no direct impact on the RC6 context corruption. However, that recovery scheme was never implemented due to difficult corner cases, and so we no longer need to keep the power gating disabled. Fixes: 2248a28384fe ("drm/i915/gen8+: Add RC6 CTX corruption WA") Closes: https://gitlab.freedesktop.org/drm/intel/issues/846 Signed-off-by: Chris Wilson Cc: Imre Deak Cc: Mika Kuoppala Cc: Eero Tamminen Cc: Jon Bloomfield Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191231122708.4025916-1-chris@chris-wilson.co.uk (cherry picked from commit 32f408ac3e5d95781f52328a09e5409b01255841) Signed-off-by: Joonas Lahtinen commit 103309977589fe6be0f4314de4925737cdfc146f Author: Chris Wilson Date: Sun Dec 29 18:31:50 2019 +0000 drm/i915/gt: Do not restore invalid RS state Only restore valid resource streamer state from the context image, i.e. avoid restoring if we know the image is invalid. Closes: https://gitlab.freedesktop.org/drm/intel/issues/446 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191229183153.3719869-4-chris@chris-wilson.co.uk Cc: stable@vger.kernel.org (cherry picked from commit ecfcd2da335816516dc27434a65899a77886d80a) Signed-off-by: Joonas Lahtinen commit 457677c70c7672a4586b0b8abc396cc1ecdd376d Author: Amanieu d'Antras Date: Sat Jan 4 13:39:30 2020 +0100 um: Implement copy_thread_tls This is required for clone3 which passes the TLS value through a struct rather than a register. Signed-off-by: Amanieu d'Antras Cc: linux-um@lists.infradead.org Cc: # 5.3.x Link: https://lore.kernel.org/r/20200104123928.1048822-1-amanieu@gmail.com Signed-off-by: Christian Brauner commit dd499f7a7e34270208350a849ef103c0b3ae477f Author: Amanieu d'Antras Date: Thu Jan 2 18:24:13 2020 +0100 clone3: ensure copy_thread_tls is implemented copy_thread implementations handle CLONE_SETTLS by reading the TLS value from the registers containing the syscall arguments for clone. This doesn't work with clone3 since the TLS value is passed in clone_args instead. Signed-off-by: Amanieu d'Antras Cc: # 5.3.x Link: https://lore.kernel.org/r/20200102172413.654385-8-amanieu@gmail.com Signed-off-by: Christian Brauner commit c346b94f8c5d1b7d637522c908209de93305a8eb Author: Amanieu d'Antras Date: Thu Jan 2 18:24:12 2020 +0100 xtensa: Implement copy_thread_tls This is required for clone3 which passes the TLS value through a struct rather than a register. Signed-off-by: Amanieu d'Antras Cc: linux-xtensa@linux-xtensa.org Cc: # 5.3.x Link: https://lore.kernel.org/r/20200102172413.654385-7-amanieu@gmail.com Signed-off-by: Christian Brauner commit 20bda4ed62f507ed72e30e817b43c65fdba60be7 Author: Amanieu d'Antras Date: Thu Jan 2 18:24:11 2020 +0100 riscv: Implement copy_thread_tls This is required for clone3 which passes the TLS value through a struct rather than a register. Signed-off-by: Amanieu d'Antras Cc: linux-riscv@lists.infradead.org Cc: # 5.3.x Link: https://lore.kernel.org/r/20200102172413.654385-6-amanieu@gmail.com Signed-off-by: Christian Brauner commit d2f36c787b2181561d8b95814f8cdad64b348ad7 Author: Amanieu d'Antras Date: Thu Jan 2 18:24:10 2020 +0100 parisc: Implement copy_thread_tls This is required for clone3 which passes the TLS value through a struct rather than a register. Signed-off-by: Amanieu d'Antras Cc: linux-parisc@vger.kernel.org Cc: # 5.3.x Link: https://lore.kernel.org/r/20200102172413.654385-5-amanieu@gmail.com Signed-off-by: Christian Brauner commit 167ee0b82429cb5df272808c7a21370b7c961ab2 Author: Amanieu d'Antras Date: Thu Jan 2 18:24:09 2020 +0100 arm: Implement copy_thread_tls This is required for clone3 which passes the TLS value through a struct rather than a register. Signed-off-by: Amanieu d'Antras Cc: linux-arm-kernel@lists.infradead.org Cc: # 5.3.x Link: https://lore.kernel.org/r/20200102172413.654385-4-amanieu@gmail.com Signed-off-by: Christian Brauner commit a4376f2fbcc8084832f2f114577c8d68234c7903 Author: Amanieu d'Antras Date: Thu Jan 2 18:24:08 2020 +0100 arm64: Implement copy_thread_tls This is required for clone3 which passes the TLS value through a struct rather than a register. Signed-off-by: Amanieu d'Antras Cc: linux-arm-kernel@lists.infradead.org Cc: # 5.3.x Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200102172413.654385-3-amanieu@gmail.com Signed-off-by: Christian Brauner commit 3e3c8ca5a351350031f0f3d5ecedf7048b1b9008 Author: Amanieu d'Antras Date: Thu Jan 2 18:24:07 2020 +0100 arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers Previously this was only defined in the internal headers which resulted in __NR_clone3 not being defined in the user headers. Signed-off-by: Amanieu d'Antras Cc: linux-arm-kernel@lists.infradead.org Cc: # 5.3.x Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200102172413.654385-2-amanieu@gmail.com Signed-off-by: Christian Brauner commit aa23ca3d98f756d5b1e503fb140665fb24a41a38 Author: Hans de Goede Date: Sun Jan 5 17:03:57 2020 +0100 gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism On some laptops enabling wakeup on the GPIO interrupts used for ACPI _AEI event handling causes spurious wakeups. This commit adds a new honor_wakeup option, defaulting to true (our current behavior), which can be used to disable wakeup on troublesome hardware to avoid these spurious wakeups. This is a workaround for an architectural problem with s2idle under Linux where we do not have any mechanism to immediately go back to sleep after wakeup events, other then for embedded-controller events using the standard ACPI EC interface, for details see: https://lore.kernel.org/linux-acpi/61450f9b-cbc6-0c09-8b3a-aff6bf9a0b3c@redhat.com/ One series of laptops which is not able to suspend without this workaround is the HP x2 10 Cherry Trail models, this commit adds a DMI based quirk which makes sets honor_wakeup to false on these models. Cc: stable@vger.kernel.org Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200105160357.97154-3-hdegoede@redhat.com Signed-off-by: Linus Walleij commit 1ad1b54099c231aed8f6f257065c1b322583f264 Author: Hans de Goede Date: Sun Jan 5 17:03:56 2020 +0100 gpiolib: acpi: Turn dmi_system_id table into a generic quirk table Turn the existing run_edge_events_on_boot_blacklist dmi_system_id table into a generic quirk table, storing the quirks in the driver_data ptr. This is a preparation patch for adding other types of (DMI based) quirks. Cc: stable@vger.kernel.org Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200105160357.97154-2-hdegoede@redhat.com Signed-off-by: Linus Walleij commit 3aa3c5882e4fb2274448908aaed605a3ed7dd15d Author: Harry Pan Date: Mon Dec 30 22:36:56 2019 +0800 powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online() RAPL MMIO support depends on the RAPL common driver. During CPU initialization rapl_mmio_cpu_online() is called via CPU hotplug to initialize the MMIO RAPL for the new CPU, but if that CPU is not present in the common RAPL driver's support list, rapl_defaults is NULL and the kernel crashes on an attempt to dereference it: [ 4.188566] BUG: kernel NULL pointer dereference, address: 0000000000000020 ...snip... [ 4.189555] RIP: 0010:rapl_add_package+0x223/0x574 [ 4.189555] Code: b5 a0 31 c0 49 8b 4d 78 48 01 d9 48 8b 0c c1 49 89 4c c6 10 48 ff c0 48 83 f8 05 75 e7 49 83 ff 03 75 15 48 8b 05 09 bc 18 01 <8b> 70 20 41 89 b6 0c 05 00 00 85 f6 75 1a 49 81 c6 18 9 [ 4.189555] RSP: 0000:ffffb3adc00b3d90 EFLAGS: 00010246 [ 4.189555] RAX: 0000000000000000 RBX: 0000000000000098 RCX: 0000000000000000 [ 4.267161] usb 1-1: New USB device found, idVendor=2109, idProduct=2812, bcdDevice= b.e0 [ 4.189555] RDX: 0000000000001000 RSI: 0000000000000000 RDI: ffff9340caafd000 [ 4.189555] RBP: ffffb3adc00b3df8 R08: ffffffffa0246e28 R09: ffff9340caafc000 [ 4.189555] R10: 000000000000024a R11: ffffffff9ff1f6f2 R12: 00000000ffffffed [ 4.189555] R13: ffff9340caa94800 R14: ffff9340caafc518 R15: 0000000000000003 [ 4.189555] FS: 0000000000000000(0000) GS:ffff9340ce200000(0000) knlGS:0000000000000000 [ 4.189555] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4.189555] CR2: 0000000000000020 CR3: 0000000302c14001 CR4: 00000000003606f0 [ 4.189555] Call Trace: [ 4.189555] ? __switch_to_asm+0x40/0x70 [ 4.189555] rapl_mmio_cpu_online+0x47/0x64 [ 4.189555] ? rapl_mmio_write_raw+0x33/0x33 [ 4.281059] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 4.189555] cpuhp_invoke_callback+0x29f/0x66f [ 4.189555] ? __schedule+0x46d/0x6a0 [ 4.189555] cpuhp_thread_fun+0xb9/0x11c [ 4.189555] smpboot_thread_fn+0x17d/0x22f [ 4.297006] usb 1-1: Product: USB2.0 Hub [ 4.189555] ? cpu_report_death+0x43/0x43 [ 4.189555] kthread+0x137/0x13f [ 4.189555] ? cpu_report_death+0x43/0x43 [ 4.189555] ? kthread_blkcg+0x2e/0x2e [ 4.312951] usb 1-1: Manufacturer: VIA Labs, Inc. [ 4.189555] ret_from_fork+0x1f/0x40 [ 4.189555] Modules linked in: [ 4.189555] CR2: 0000000000000020 [ 4.189555] ---[ end trace 01bb812aabc791f4 ]--- To avoid that problem, check rapl_defaults NULL upfront and return an error code if it is NULL. [Note that it does not make sense to even try to allocate memory in that case, because it is not going to be used anyway.] Fixes: 555c45fe0d04 ("int340X/processor_thermal_device: add support for MMIO RAPL") Cc: 5.3+ # 5.3+ Signed-off-by: Harry Pan [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki commit f4b18892dca8e629e0ce192b233579505f8ed343 Author: Kai Vehmanen Date: Tue Dec 31 16:00:07 2019 +0200 drm/i915: Limit audio CDCLK>=2*BCLK constraint back to GLK only Revert changes done in commit f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms"). Audio drivers communicate with i915 over HDA bus multiple times during system boot-up and each of these transactions result in matching get_power/put_power calls to i915, and depending on the platform, a modeset change causing visible flicker. GLK is the only platform with minimum CDCLK significantly lower than BCLK, and thus for GLK setting a higher CDCLK is mandatory. For other platforms, minimum CDCLK is close but below 2*BCLK (e.g. on ICL, CDCLK=176.4kHz with BCLK=96kHz). Spec-wise the constraint should be set, but in practise no communication errors have been reported and the downside if set is the flicker observed at boot-time. Revert to old behaviour until better mechanism to manage probe-time clocks is available. The full CDCLK>=2*BCLK constraint is still enforced at pipe enable time in intel_crtc_compute_min_cdclk(). Bugzilla: https://gitlab.freedesktop.org/drm/intel/issues/913 Fixes: f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms") Signed-off-by: Kai Vehmanen Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191231140007.31728-1-kai.vehmanen@linux.intel.com (cherry picked from commit 1ee48a61aa57dbdbc3cd2808d8b28df40d938e44) Signed-off-by: Joonas Lahtinen commit 1325008f5c8dbc84aa835d98af8447fa0569bc4d Author: Chris Wilson Date: Mon Jan 6 12:39:21 2020 +0000 drm/i915/gt: Mark up virtual engine uabi_instance Be sure to initialise the uabi_instance on the virtual engine to the special invalid value, just in case we ever peek at it from the uAPI. Reported-by: Tvrtko Ursulin Fixes: 750e76b4f9f6 ("drm/i915/gt: Move the [class][inst] lookup for engines onto the GT") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.4+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200106123921.2543886-1-chris@chris-wilson.co.uk (cherry picked from commit f75fc37b5e70b75f21550410f88e2379648120e2) Signed-off-by: Joonas Lahtinen commit 36f2e7207f21a83ca0054116191f119ac64583ab Author: Swapna Manupati Date: Thu Dec 26 17:42:11 2019 +0530 gpio: zynq: Fix for bug in zynq_gpio_restore_context API This patch writes the inverse value of Interrupt Mask Status register into the Interrupt Enable register in zynq_gpio_restore_context API to fix the bug. Fixes: e11de4de28c0 ("gpio: zynq: Add support for suspend resume") Signed-off-by: Swapna Manupati Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli Link: https://lore.kernel.org/r/1577362338-28744-2-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Linus Walleij commit 35c60be220572de7d6605c4318f640d133982040 Author: Qianggui Song Date: Thu Dec 26 10:37:34 2019 +0800 pinctrl: meson: Fix wrong shift value when get drive-strength In meson_pinconf_get_drive_strength, variable bit is calculated by meson_calc_reg_and_bit, this value is the offset from the first pin of a certain bank to current pin, while Meson SoCs use two bits for each pin to depict drive-strength. So a left shift by 1 should be done or node pinconf-pins shows wrong message. Fixes: 6ea3e3bbef37 ("pinctrl: meson: add support of drive-strength-microamp") Signed-off-by: Qianggui Song Link: https://lore.kernel.org/r/20191226023734.9631-1-qianggui.song@amlogic.com Signed-off-by: Linus Walleij commit f7e36e18946b4ec756b9c5cf4fb8891be8d1e4a3 Author: Arnd Bergmann Date: Wed Dec 18 17:36:46 2019 +0100 pinctrl: lochnagar: select GPIOLIB In a rare randconfig build I came across one configuration that does not enable CONFIG_GPIOLIB, which is needed by lochnagar: ERROR: "devm_gpiochip_add_data" [drivers/pinctrl/cirrus/pinctrl-lochnagar.ko] undefined! ERROR: "gpiochip_generic_free" [drivers/pinctrl/cirrus/pinctrl-lochnagar.ko] undefined! ERROR: "gpiochip_generic_request" [drivers/pinctrl/cirrus/pinctrl-lochnagar.ko] undefined! ERROR: "gpiochip_get_data" [drivers/pinctrl/cirrus/pinctrl-lochnagar.ko] undefined! Add another 'select' like all other pinctrl drivers have. Fixes: 0548448b719a ("pinctrl: lochnagar: Add support for the Cirrus Logic Lochnagar") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191218163701.171914-1-arnd@arndb.de Acked-by: Charles Keepax Signed-off-by: Linus Walleij commit c936069fb59c008013affd5672f0f27db2e03005 Merge: c79f46a28239 26a7a47510ed Author: Rafael J. Wysocki Date: Tue Jan 7 10:41:35 2020 +0100 Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq driver fix for v5.5-rc6 from Viresh Kumar: "Blacklist Tegra20/30 for probing by cpufreq-dt driver." * 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCs commit 344fa0bad6932204146d305607790340f2324a90 Author: Amit Kucheria Date: Thu Dec 12 16:08:14 2019 +0530 drivers: thermal: tsens: Work with old DTBs In order for the old DTBs to continue working, the new interrupt code must not return an error if interrupts are not defined. Don't return an error in case of -ENXIO. Fixes: 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support") Suggested-by: Stephan Gerhold Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Bjorn Andersson Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/cea3317c5d793db312064d68b261ad420a4a81b1.1576146898.git.amit.kucheria@linaro.org commit c101fffcd7fa83a851d180721426fe1b7c7daf8e Merge: d76063c506da df55c5586e51 Author: David S. Miller Date: Mon Jan 6 18:24:18 2020 -0800 Merge tag 'mlx5-fixes-2020-01-06' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2020-01-06 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v5.3 ('net/mlx5: Move devlink registration before interfaces load') For -stable v5.4 ('net/mlx5e: Fix hairpin RSS table size') ('net/mlx5: DR, Init lists that are used in rule's member') ('net/mlx5e: Always print health reporter message to dmesg') ('net/mlx5: DR, No need for atomic refcount for internal SW steering resources') ==================== Signed-off-by: David S. Miller commit ae6088216ce4b99b3a4aaaccd2eb2dd40d473d42 Merge: 7ae564122f75 72879ee0c53e Author: Linus Torvalds Date: Mon Jan 6 15:38:38 2020 -0800 Merge tag 'trace-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Various tracing fixes: - kbuild found missing define of MCOUNT_INSN_SIZE for various build configs - Initialize variable to zero as gcc thinks it is used undefined (it really isn't but the code is subtle enough that this doesn't hurt) - Convert from do_div() to div64_ull() to prevent potential divide by zero - Unregister a trace point on error path in sched_wakeup tracer - Use signed offset for archs that can have stext not be first - A simple indentation fix (whitespace error)" * tag 'trace-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix indentation issue kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail tracing: Change offset type to s32 in preempt/irq tracepoints ftrace: Avoid potential division by zero in function profiler tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined tracing: Define MCOUNT_INSN_SIZE when not defined without direct calls tracing: Initialize val to zero in parse_entry of inject code commit df55c5586e5185f890192a6802dc5b46fddd3606 Author: Erez Shitrit Date: Mon Nov 25 10:26:24 2019 +0200 net/mlx5: DR, Init lists that are used in rule's member Whenever adding new member of rule object we attach it to 2 lists, These 2 lists should be initialized first. Fixes: 41d07074154c ("net/mlx5: DR, Expose steering rule functionality") Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed commit 6412bb396a63f28de994b1480edf8e4caf4aa494 Author: Eli Cohen Date: Wed Dec 11 09:17:40 2019 +0200 net/mlx5e: Fix hairpin RSS table size Set hairpin table size to the corret size, based on the groups that would be created in it. Groups are laid out on the table such that a group occupies a range of entries in the table. This implies that the group ranges should have correspondence to the table they are laid upon. The patch cited below made group 1's size to grow hence causing overflow of group range laid on the table. Fixes: a795d8db2a6d ("net/mlx5e: Support RSS for IP-in-IP and IPv6 tunneled packets") Signed-off-by: Eli Cohen Signed-off-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 4ce380ca477507e2f413584cdd99e1698d6682d6 Author: Yevgeny Kliteynik Date: Mon Dec 23 16:16:31 2019 +0200 net/mlx5: DR, No need for atomic refcount for internal SW steering resources No need for an atomic refcounter for the STE and hashtables. These are internal SW steering resources and they are always under domain mutex. This also fixes the following refcount error: refcount_t: addition on 0; use-after-free. WARNING: CPU: 9 PID: 3527 at lib/refcount.c:25 refcount_warn_saturate+0x81/0xe0 Call Trace: dr_table_init_nic+0x10d/0x110 [mlx5_core] mlx5dr_table_create+0xb4/0x230 [mlx5_core] mlx5_cmd_dr_create_flow_table+0x39/0x120 [mlx5_core] __mlx5_create_flow_table+0x221/0x5f0 [mlx5_core] esw_create_offloads_fdb_tables+0x180/0x5a0 [mlx5_core] ... Fixes: 26d688e33f88 ("net/mlx5: DR, Add Steering entry (STE) utilities") Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 1f0593e791ed3fb4074d4470a261cde62d806ed5 Author: Parav Pandit Date: Wed Dec 11 00:35:18 2019 -0600 Revert "net/mlx5: Support lockless FTE read lookups" This reverts commit 7dee607ed0e04500459db53001d8e02f8831f084. During cleanup path, FTE's parent node group is removed which is referenced by the FTE while freeing the FTE. Hence FTE's lockless read lookup optimization done in cited commit is not possible at the moment. Hence, revert the commit. This avoid below KAZAN call trace. [ 110.390896] BUG: KASAN: use-after-free in find_root.isra.14+0x56/0x60 [mlx5_core] [ 110.391048] Read of size 4 at addr ffff888c19e6d220 by task swapper/12/0 [ 110.391219] CPU: 12 PID: 0 Comm: swapper/12 Not tainted 5.5.0-rc1+ [ 110.391222] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 08/02/2014 [ 110.391225] Call Trace: [ 110.391229] [ 110.391246] dump_stack+0x95/0xd5 [ 110.391307] ? find_root.isra.14+0x56/0x60 [mlx5_core] [ 110.391320] print_address_description.constprop.5+0x20/0x320 [ 110.391379] ? find_root.isra.14+0x56/0x60 [mlx5_core] [ 110.391435] ? find_root.isra.14+0x56/0x60 [mlx5_core] [ 110.391441] __kasan_report+0x149/0x18c [ 110.391499] ? find_root.isra.14+0x56/0x60 [mlx5_core] [ 110.391504] kasan_report+0x12/0x20 [ 110.391511] __asan_report_load4_noabort+0x14/0x20 [ 110.391567] find_root.isra.14+0x56/0x60 [mlx5_core] [ 110.391625] del_sw_fte_rcu+0x4a/0x100 [mlx5_core] [ 110.391633] rcu_core+0x404/0x1950 [ 110.391640] ? rcu_accelerate_cbs_unlocked+0x100/0x100 [ 110.391649] ? run_rebalance_domains+0x201/0x280 [ 110.391654] rcu_core_si+0xe/0x10 [ 110.391661] __do_softirq+0x181/0x66c [ 110.391670] irq_exit+0x12c/0x150 [ 110.391675] smp_apic_timer_interrupt+0xf0/0x370 [ 110.391681] apic_timer_interrupt+0xf/0x20 [ 110.391684] [ 110.391695] RIP: 0010:cpuidle_enter_state+0xfa/0xba0 [ 110.391703] Code: 3d c3 9b b5 50 e8 56 75 6e fe 48 89 45 c8 0f 1f 44 00 00 31 ff e8 a6 94 6e fe 45 84 ff 0f 85 f6 02 00 00 fb 66 0f 1f 44 00 00 <45> 85 f6 0f 88 db 06 00 00 4d 63 fe 4b 8d 04 7f 49 8d 04 87 49 8d [ 110.391706] RSP: 0018:ffff888c23a6fce8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 [ 110.391712] RAX: dffffc0000000000 RBX: ffffe8ffff7002f8 RCX: 000000000000001f [ 110.391715] RDX: 1ffff11184ee6cb5 RSI: 0000000040277d83 RDI: ffff888c277365a8 [ 110.391718] RBP: ffff888c23a6fd40 R08: 0000000000000002 R09: 0000000000035280 [ 110.391721] R10: ffff888c23a6fc80 R11: ffffed11847485d0 R12: ffffffffb1017740 [ 110.391723] R13: 0000000000000003 R14: 0000000000000003 R15: 0000000000000000 [ 110.391732] ? cpuidle_enter_state+0xea/0xba0 [ 110.391738] cpuidle_enter+0x4f/0xa0 [ 110.391747] call_cpuidle+0x6d/0xc0 [ 110.391752] do_idle+0x360/0x430 [ 110.391758] ? arch_cpu_idle_exit+0x40/0x40 [ 110.391765] ? complete+0x67/0x80 [ 110.391771] cpu_startup_entry+0x1d/0x20 [ 110.391779] start_secondary+0x2f3/0x3c0 [ 110.391784] ? set_cpu_sibling_map+0x2500/0x2500 [ 110.391795] secondary_startup_64+0xa4/0xb0 [ 110.391841] Allocated by task 290: [ 110.391917] save_stack+0x21/0x90 [ 110.391921] __kasan_kmalloc.constprop.8+0xa7/0xd0 [ 110.391925] kasan_kmalloc+0x9/0x10 [ 110.391929] kmem_cache_alloc_trace+0xf6/0x270 [ 110.391987] create_root_ns.isra.36+0x58/0x260 [mlx5_core] [ 110.392044] mlx5_init_fs+0x5fd/0x1ee0 [mlx5_core] [ 110.392092] mlx5_load_one+0xc7a/0x3860 [mlx5_core] [ 110.392139] init_one+0x6ff/0xf90 [mlx5_core] [ 110.392145] local_pci_probe+0xde/0x190 [ 110.392150] work_for_cpu_fn+0x56/0xa0 [ 110.392153] process_one_work+0x678/0x1140 [ 110.392157] worker_thread+0x573/0xba0 [ 110.392162] kthread+0x341/0x400 [ 110.392166] ret_from_fork+0x1f/0x40 [ 110.392218] Freed by task 2742: [ 110.392288] save_stack+0x21/0x90 [ 110.392292] __kasan_slab_free+0x137/0x190 [ 110.392296] kasan_slab_free+0xe/0x10 [ 110.392299] kfree+0x94/0x250 [ 110.392357] tree_put_node+0x257/0x360 [mlx5_core] [ 110.392413] tree_remove_node+0x63/0xb0 [mlx5_core] [ 110.392469] clean_tree+0x199/0x240 [mlx5_core] [ 110.392525] mlx5_cleanup_fs+0x76/0x580 [mlx5_core] [ 110.392572] mlx5_unload+0x22/0xc0 [mlx5_core] [ 110.392619] mlx5_unload_one+0x99/0x260 [mlx5_core] [ 110.392666] remove_one+0x61/0x160 [mlx5_core] [ 110.392671] pci_device_remove+0x10b/0x2c0 [ 110.392677] device_release_driver_internal+0x1e4/0x490 [ 110.392681] device_driver_detach+0x36/0x40 [ 110.392685] unbind_store+0x147/0x200 [ 110.392688] drv_attr_store+0x6f/0xb0 [ 110.392693] sysfs_kf_write+0x127/0x1d0 [ 110.392697] kernfs_fop_write+0x296/0x420 [ 110.392702] __vfs_write+0x66/0x110 [ 110.392707] vfs_write+0x1a0/0x500 [ 110.392711] ksys_write+0x164/0x250 [ 110.392715] __x64_sys_write+0x73/0xb0 [ 110.392720] do_syscall_64+0x9f/0x3a0 [ 110.392725] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 7dee607ed0e0 ("net/mlx5: Support lockless FTE read lookups") Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit a6f3b62386a02c1e94bfa22c543f82d63f5e631b Author: Michael Guralnik Date: Wed Nov 20 11:43:49 2019 +0200 net/mlx5: Move devlink registration before interfaces load Register devlink before interfaces are added. This will allow interfaces to use devlink while initalizing. For example, call mlx5_is_roce_enabled. Fixes: aba25279c100 ("net/mlx5e: Add TX reporter support") Signed-off-by: Michael Guralnik Signed-off-by: Saeed Mahameed commit 99cda45426c9a2c59bb2f7cb886a405440282455 Author: Eran Ben Elisha Date: Wed Dec 4 14:34:18 2019 +0200 net/mlx5e: Always print health reporter message to dmesg In case a reporter exists, error message is logged only to the devlink tracer. The devlink tracer is a visibility utility only, which user can choose not to monitor. After cited patch, 3rd party monitoring tools that tracks these error message will no longer find them in dmesg, causing a regression. With this patch, error messages are also logged into the dmesg. Fixes: c50de4af1d63 ("net/mlx5e: Generalize tx reporter's functionality") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 554fe75c1b3f679b1eebf193a4e56492837d3f5a Author: Dmytro Linkin Date: Thu Oct 31 18:15:51 2019 +0200 net/mlx5e: Avoid duplicating rule destinations Following scenario easily break driver logic and crash the kernel: 1. Add rule with mirred actions to same device. 2. Delete this rule. In described scenario rule is not added to database and on deletion driver access invalid entry. Example: $ tc filter add dev ens1f0_0 ingress protocol ip prio 1 \ flower skip_sw \ action mirred egress mirror dev ens1f0_1 pipe \ action mirred egress redirect dev ens1f0_1 $ tc filter del dev ens1f0_0 ingress protocol ip prio 1 Dmesg output: [ 376.634396] mlx5_core 0000:82:00.0: mlx5_cmd_check:756:(pid 3439): DESTROY_FLOW_GROUP(0x934) op_mod(0x0) failed, status bad resource state(0x9), syndrome (0x563e2f) [ 376.654983] mlx5_core 0000:82:00.0: del_hw_flow_group:567:(pid 3439): flow steering can't destroy fg 89 of ft 3145728 [ 376.673433] kasan: CONFIG_KASAN_INLINE enabled [ 376.683769] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 376.695229] general protection fault: 0000 [#1] PREEMPT SMP KASAN PTI [ 376.705069] CPU: 7 PID: 3439 Comm: tc Not tainted 5.4.0-rc5+ #76 [ 376.714959] Hardware name: Supermicro SYS-2028TP-DECTR/X10DRT-PT, BIOS 2.0a 08/12/2016 [ 376.726371] RIP: 0010:mlx5_del_flow_rules+0x105/0x960 [mlx5_core] [ 376.735817] Code: 01 00 00 00 48 83 eb 08 e8 28 d9 ff ff 4c 39 e3 75 d8 4c 8d bd c0 02 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 84 04 00 00 48 8d 7d 28 8b 9 d [ 376.761261] RSP: 0018:ffff888847c56db8 EFLAGS: 00010202 [ 376.770054] RAX: dffffc0000000000 RBX: ffff8888582a6da0 RCX: ffff888847c56d60 [ 376.780743] RDX: 0000000000000058 RSI: 0000000000000008 RDI: 0000000000000282 [ 376.791328] RBP: 0000000000000000 R08: fffffbfff0c60ea6 R09: fffffbfff0c60ea6 [ 376.802050] R10: fffffbfff0c60ea5 R11: ffffffff8630752f R12: ffff8888582a6da0 [ 376.812798] R13: dffffc0000000000 R14: ffff8888582a6da0 R15: 00000000000002c0 [ 376.823445] FS: 00007f675f9a8840(0000) GS:ffff88886d200000(0000) knlGS:0000000000000000 [ 376.834971] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 376.844179] CR2: 00000000007d9640 CR3: 00000007d3f26003 CR4: 00000000001606e0 [ 376.854843] Call Trace: [ 376.868542] __mlx5_eswitch_del_rule+0x49/0x300 [mlx5_core] [ 376.877735] mlx5e_tc_del_fdb_flow+0x6ec/0x9e0 [mlx5_core] [ 376.921549] mlx5e_flow_put+0x2b/0x50 [mlx5_core] [ 376.929813] mlx5e_delete_flower+0x5b6/0xbd0 [mlx5_core] [ 376.973030] tc_setup_cb_reoffload+0x29/0xc0 [ 376.980619] fl_reoffload+0x50a/0x770 [cls_flower] [ 377.015087] tcf_block_playback_offloads+0xbd/0x250 [ 377.033400] tcf_block_setup+0x1b2/0xc60 [ 377.057247] tcf_block_offload_cmd+0x195/0x240 [ 377.098826] tcf_block_offload_unbind+0xe7/0x180 [ 377.107056] __tcf_block_put+0xe5/0x400 [ 377.114528] ingress_destroy+0x3d/0x60 [sch_ingress] [ 377.122894] qdisc_destroy+0xf1/0x5a0 [ 377.129993] qdisc_graft+0xa3d/0xe50 [ 377.151227] tc_get_qdisc+0x48e/0xa20 [ 377.165167] rtnetlink_rcv_msg+0x35d/0x8d0 [ 377.199528] netlink_rcv_skb+0x11e/0x340 [ 377.219638] netlink_unicast+0x408/0x5b0 [ 377.239913] netlink_sendmsg+0x71b/0xb30 [ 377.267505] sock_sendmsg+0xb1/0xf0 [ 377.273801] ___sys_sendmsg+0x635/0x900 [ 377.312784] __sys_sendmsg+0xd3/0x170 [ 377.338693] do_syscall_64+0x95/0x460 [ 377.344833] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 377.352321] RIP: 0033:0x7f675e58e090 To avoid this, for every mirred action check if output device was already processed. If so - drop rule with EOPNOTSUPP error. Signed-off-by: Dmytro Linkin Reviewed-by: Roi Dayan Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit c5706c7defc79de68a115b5536376298a8fef111 Author: Dmitry Osipenko Date: Mon Jan 6 04:51:54 2020 +0300 gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP Driver fails to compile in a minimized kernel's configuration because of the missing dependency on GPIOLIB_IRQCHIP. error: ‘struct gpio_chip’ has no member named ‘irq’ 44 | virq = irq_find_mapping(gpio->gpio_chip.irq.domain, offset); Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106015154.12040-1-digetx@gmail.com Signed-off-by: Linus Walleij commit 7ae564122f75337d84c41b3963a6e25e8665dfac Merge: baf4dc829574 aa4a63dd9816 Author: Linus Torvalds Date: Mon Jan 6 14:49:52 2020 -0800 Merge tag 'tpmdd-next-20200106' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpmd fixes from Jarkko Sakkinen: "There has been a bunch of reports (e.g. [*]) reporting that when commit 5b359c7c4372 ("tpm_tis_core: Turn on the TPM before probing IRQ's") and subsequent fixes are applied it causes boot freezes on some machines. Unfortunately hardware where this causes a failure is not widely available (only one I'm aware is Lenovo T490), which means we cannot predict yet how long it will take to properly fix tpm_tis interrupt probing. Thus, the least worst short term action is to revert the code to the state before this commit. In long term we need fix the tpm_tis probing code to work on machines that Stefan's patches were supposed to fix. With these patches reverted nothing fatal happens, TPM is fallbacked to be used in polling mode (which is not in the end too bad because there are no high throughput workloads for TPM). [*] https://bugzilla.kernel.org/show_bug.cgi?id=205935" * tag 'tpmdd-next-20200106' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm: Revert "tpm_tis_core: Turn on the TPM before probing IRQ's" tpm: Revert "tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts" tpm: Revert "tpm_tis: reserve chip for duration of tpm_tis_core_init" commit 6d4f151acf9a4f6fab09b615f246c717ddedcf0c Author: Daniel Borkmann Date: Mon Jan 6 22:51:57 2020 +0100 bpf: Fix passing modified ctx to ld/abs/ind instruction Anatoly has been fuzzing with kBdysch harness and reported a KASAN slab oob in one of the outcomes: [...] [ 77.359642] BUG: KASAN: slab-out-of-bounds in bpf_skb_load_helper_8_no_cache+0x71/0x130 [ 77.360463] Read of size 4 at addr ffff8880679bac68 by task bpf/406 [ 77.361119] [ 77.361289] CPU: 2 PID: 406 Comm: bpf Not tainted 5.5.0-rc2-xfstests-00157-g2187f215eba #1 [ 77.362134] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 77.362984] Call Trace: [ 77.363249] dump_stack+0x97/0xe0 [ 77.363603] print_address_description.constprop.0+0x1d/0x220 [ 77.364251] ? bpf_skb_load_helper_8_no_cache+0x71/0x130 [ 77.365030] ? bpf_skb_load_helper_8_no_cache+0x71/0x130 [ 77.365860] __kasan_report.cold+0x37/0x7b [ 77.366365] ? bpf_skb_load_helper_8_no_cache+0x71/0x130 [ 77.366940] kasan_report+0xe/0x20 [ 77.367295] bpf_skb_load_helper_8_no_cache+0x71/0x130 [ 77.367821] ? bpf_skb_load_helper_8+0xf0/0xf0 [ 77.368278] ? mark_lock+0xa3/0x9b0 [ 77.368641] ? kvm_sched_clock_read+0x14/0x30 [ 77.369096] ? sched_clock+0x5/0x10 [ 77.369460] ? sched_clock_cpu+0x18/0x110 [ 77.369876] ? bpf_skb_load_helper_8+0xf0/0xf0 [ 77.370330] ___bpf_prog_run+0x16c0/0x28f0 [ 77.370755] __bpf_prog_run32+0x83/0xc0 [ 77.371153] ? __bpf_prog_run64+0xc0/0xc0 [ 77.371568] ? match_held_lock+0x1b/0x230 [ 77.371984] ? rcu_read_lock_held+0xa1/0xb0 [ 77.372416] ? rcu_is_watching+0x34/0x50 [ 77.372826] sk_filter_trim_cap+0x17c/0x4d0 [ 77.373259] ? sock_kzfree_s+0x40/0x40 [ 77.373648] ? __get_filter+0x150/0x150 [ 77.374059] ? skb_copy_datagram_from_iter+0x80/0x280 [ 77.374581] ? do_raw_spin_unlock+0xa5/0x140 [ 77.375025] unix_dgram_sendmsg+0x33a/0xa70 [ 77.375459] ? do_raw_spin_lock+0x1d0/0x1d0 [ 77.375893] ? unix_peer_get+0xa0/0xa0 [ 77.376287] ? __fget_light+0xa4/0xf0 [ 77.376670] __sys_sendto+0x265/0x280 [ 77.377056] ? __ia32_sys_getpeername+0x50/0x50 [ 77.377523] ? lock_downgrade+0x350/0x350 [ 77.377940] ? __sys_setsockopt+0x2a6/0x2c0 [ 77.378374] ? sock_read_iter+0x240/0x240 [ 77.378789] ? __sys_socketpair+0x22a/0x300 [ 77.379221] ? __ia32_sys_socket+0x50/0x50 [ 77.379649] ? mark_held_locks+0x1d/0x90 [ 77.380059] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 77.380536] __x64_sys_sendto+0x74/0x90 [ 77.380938] do_syscall_64+0x68/0x2a0 [ 77.381324] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 77.381878] RIP: 0033:0x44c070 [...] After further debugging, turns out while in case of other helper functions we disallow passing modified ctx, the special case of ld/abs/ind instruction which has similar semantics (except r6 being the ctx argument) is missing such check. Modified ctx is impossible here as bpf_skb_load_helper_8_no_cache() and others are expecting skb fields in original position, hence, add check_ctx_reg() to reject any modified ctx. Issue was first introduced back in f1174f77b50c ("bpf/verifier: rework value tracking"). Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Reported-by: Anatoly Trosinenko Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200106215157.3553-1-daniel@iogearbox.net commit baf4dc829574ed9dd8ba33cda0536a50f28937de Merge: ec7b3f5372e2 dcbce5fbcc69 Author: Linus Torvalds Date: Mon Jan 6 14:12:50 2020 -0800 Merge tag 'linux-watchdog-5.5-fixes' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog fixes from Wim Van Sebroeck: - fix module aliases - fix potential build errors - fix missing conversion of imx7ulp_wdt_enable() - fix platform_get_irq() complaints - fix NCT6116D support * tag 'linux-watchdog-5.5-fixes' of git://www.linux-watchdog.org/linux-watchdog: watchdog: orion: fix platform_get_irq() complaints watchdog: rn5t618_wdt: fix module aliases watchdog: tqmx86_wdt: Fix build error watchdog: max77620_wdt: fix potential build errors watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable() watchdog: w83627hf_wdt: Fix support NCT6116D commit d76063c506da79247e626018c9ed0b916d78f358 Merge: 4012a6f2fa56 b585f8602acb Author: David S. Miller Date: Mon Jan 6 14:06:11 2020 -0800 Merge branch 'atlantic-bugfixes' Igor Russkikh says: ==================== Aquantia/Marvell atlantic bugfixes 2020/01 Here is a set of recently discovered bugfixes, ==================== Signed-off-by: David S. Miller commit b585f8602acbe2620212cbedc1760906814ff515 Author: Igor Russkikh Date: Mon Jan 6 14:22:30 2020 +0300 net: atlantic: remove duplicate entries Function entries were duplicated accidentally, removing the dups. Fixes: ea4b4d7fc106 ("net: atlantic: loopback tests via private flags") Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 883daa1854b61fe3d21d7d9bf2c81d26a07d586b Author: Igor Russkikh Date: Mon Jan 6 14:22:29 2020 +0300 net: atlantic: loopback configuration in improper place Initial loopback configuration should be called earlier, before starting traffic on HW blocks. Otherwise depending on race conditions it could be kept disabled. Fixes: ea4b4d7fc106 ("net: atlantic: loopback tests via private flags") Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit ac70957ee19f198a3884e6f506d75b3f6d8a7dc9 Author: Igor Russkikh Date: Mon Jan 6 14:22:28 2020 +0300 net: atlantic: broken link status on old fw Last code/checkpatch cleanup did a copy paste error where code from firmware 3 API logic was moved to firmware 1 logic. This resulted in FW1.x users would never see the link state as active. Fixes: 7b0c342f1f67 ("net: atlantic: code style cleanup") Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit e10360f815ca6367357b2c2cfef17fc663e50f7b Author: Roman Gushchin Date: Fri Dec 27 13:50:34 2019 -0800 bpf: cgroup: prevent out-of-order release of cgroup bpf Before commit 4bfc0bb2c60e ("bpf: decouple the lifetime of cgroup_bpf from cgroup itself") cgroup bpf structures were released with corresponding cgroup structures. It guaranteed the hierarchical order of destruction: children were always first. It preserved attached programs from being released before their propagated copies. But with cgroup auto-detachment there are no such guarantees anymore: cgroup bpf is released as soon as the cgroup is offline and there are no live associated sockets. It means that an attached program can be detached and released, while its propagated copy is still living in the cgroup subtree. This will obviously lead to an use-after-free bug. To reproduce the issue the following script can be used: #!/bin/bash CGROOT=/sys/fs/cgroup mkdir -p ${CGROOT}/A ${CGROOT}/B ${CGROOT}/A/C sleep 1 ./test_cgrp2_attach ${CGROOT}/A egress & A_PID=$! ./test_cgrp2_attach ${CGROOT}/B egress & B_PID=$! echo $$ > ${CGROOT}/A/C/cgroup.procs iperf -s & S_PID=$! iperf -c localhost -t 100 & C_PID=$! sleep 1 echo $$ > ${CGROOT}/B/cgroup.procs echo ${S_PID} > ${CGROOT}/B/cgroup.procs echo ${C_PID} > ${CGROOT}/B/cgroup.procs sleep 1 rmdir ${CGROOT}/A/C rmdir ${CGROOT}/A sleep 1 kill -9 ${S_PID} ${C_PID} ${A_PID} ${B_PID} On the unpatched kernel the following stacktrace can be obtained: [ 33.619799] BUG: unable to handle page fault for address: ffffbdb4801ab002 [ 33.620677] #PF: supervisor read access in kernel mode [ 33.621293] #PF: error_code(0x0000) - not-present page [ 33.622754] Oops: 0000 [#1] SMP NOPTI [ 33.623202] CPU: 0 PID: 601 Comm: iperf Not tainted 5.5.0-rc2+ #23 [ 33.625545] RIP: 0010:__cgroup_bpf_run_filter_skb+0x29f/0x3d0 [ 33.635809] Call Trace: [ 33.636118] ? __cgroup_bpf_run_filter_skb+0x2bf/0x3d0 [ 33.636728] ? __switch_to_asm+0x40/0x70 [ 33.637196] ip_finish_output+0x68/0xa0 [ 33.637654] ip_output+0x76/0xf0 [ 33.638046] ? __ip_finish_output+0x1c0/0x1c0 [ 33.638576] __ip_queue_xmit+0x157/0x410 [ 33.639049] __tcp_transmit_skb+0x535/0xaf0 [ 33.639557] tcp_write_xmit+0x378/0x1190 [ 33.640049] ? _copy_from_iter_full+0x8d/0x260 [ 33.640592] tcp_sendmsg_locked+0x2a2/0xdc0 [ 33.641098] ? sock_has_perm+0x10/0xa0 [ 33.641574] tcp_sendmsg+0x28/0x40 [ 33.641985] sock_sendmsg+0x57/0x60 [ 33.642411] sock_write_iter+0x97/0x100 [ 33.642876] new_sync_write+0x1b6/0x1d0 [ 33.643339] vfs_write+0xb6/0x1a0 [ 33.643752] ksys_write+0xa7/0xe0 [ 33.644156] do_syscall_64+0x5b/0x1b0 [ 33.644605] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix this by grabbing a reference to the bpf structure of each ancestor on the initialization of the cgroup bpf structure, and dropping the reference at the end of releasing the cgroup bpf structure. This will restore the hierarchical order of cgroup bpf releasing, without adding any operations on hot paths. Thanks to Josef Bacik for the debugging and the initial analysis of the problem. Fixes: 4bfc0bb2c60e ("bpf: decouple the lifetime of cgroup_bpf from cgroup itself") Reported-by: Josef Bacik Signed-off-by: Roman Gushchin Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 4012a6f2fa562b4b2884ea96db263caa4c6057a8 Author: Vikas Gupta Date: Mon Jan 6 11:54:02 2020 +0530 firmware: tee_bnxt: Fix multiple call to tee_client_close_context Fix calling multiple tee_client_close_context in case of shm allocation fails. Fixes: 246880958ac9 (“firmware: broadcom: add OP-TEE based BNXT f/w manager”) Signed-off-by: Vikas Gupta Signed-off-by: David S. Miller commit d8dc2c9676e614ef62f54a155b50076888c8a29a Author: Andrew Lunn Date: Sat Jan 4 23:14:51 2020 +0100 net: dsa: mv88e6xxx: Preserve priority when setting CPU port. The 6390 family uses an extended register to set the port connected to the CPU. The lower 5 bits indicate the port, the upper three bits are the priority of the frames as they pass through the switch, what egress queue they should use, etc. Since frames being set to the CPU are typically management frames, BPDU, IGMP, ARP, etc set the priority to 7, the reset default, and the highest. Fixes: 33641994a676 ("net: dsa: mv88e6xxx: Monitor and Management tables") Signed-off-by: Andrew Lunn Tested-by: Chris Healy Signed-off-by: David S. Miller commit 5adcb8b18611c69577fd0f35337ab8d2573712fa Author: Krzysztof Kozlowski Date: Sat Jan 4 16:21:06 2020 +0100 net: ethernet: sxgbe: Rename Samsung to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" name. "SAMSUNG" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 00c0688cecadbf7ac2f5b4cdb36d912a2d3f0cca Author: Krzysztof Kozlowski Date: Sat Jan 4 15:31:43 2020 +0100 net: wan: sdla: Fix cast from pointer to integer of different size Since net_device.mem_start is unsigned long, it should not be cast to int right before casting to pointer. This fixes warning (compile testing on alpha architecture): drivers/net/wan/sdla.c: In function ‘sdla_transmit’: drivers/net/wan/sdla.c:711:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit be7a7729207797476b6666f046d765bdf9630407 Author: Xin Long Date: Sat Jan 4 14:15:02 2020 +0800 sctp: free cmd->obj.chunk for the unprocessed SCTP_CMD_REPLY This patch is to fix a memleak caused by no place to free cmd->obj.chunk for the unprocessed SCTP_CMD_REPLY. This issue occurs when failing to process a cmd while there're still SCTP_CMD_REPLY cmds on the cmd seq with an allocated chunk in cmd->obj.chunk. So fix it by freeing cmd->obj.chunk for each SCTP_CMD_REPLY cmd left on the cmd seq when any cmd returns error. While at it, also remove 'nomem' label. Reported-by: syzbot+107c4aff5f392bf1517f@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit a7869e5f9174f246b662b2db6390bc128a351388 Author: Ying Xue Date: Sat Jan 4 10:48:36 2020 +0800 tipc: eliminate KMSAN: uninit-value in __tipc_nl_compat_dumpit error syzbot found the following crash on: ===================================================== BUG: KMSAN: uninit-value in __nlmsg_parse include/net/netlink.h:661 [inline] BUG: KMSAN: uninit-value in nlmsg_parse_deprecated include/net/netlink.h:706 [inline] BUG: KMSAN: uninit-value in __tipc_nl_compat_dumpit+0x553/0x11e0 net/tipc/netlink_compat.c:215 CPU: 0 PID: 12425 Comm: syz-executor062 Not tainted 5.5.0-rc1-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+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0x128/0x220 mm/kmsan/kmsan_report.c:108 __msan_warning+0x57/0xa0 mm/kmsan/kmsan_instr.c:245 __nlmsg_parse include/net/netlink.h:661 [inline] nlmsg_parse_deprecated include/net/netlink.h:706 [inline] __tipc_nl_compat_dumpit+0x553/0x11e0 net/tipc/netlink_compat.c:215 tipc_nl_compat_dumpit+0x761/0x910 net/tipc/netlink_compat.c:308 tipc_nl_compat_handle net/tipc/netlink_compat.c:1252 [inline] tipc_nl_compat_recv+0x12e9/0x2870 net/tipc/netlink_compat.c:1311 genl_family_rcv_msg_doit net/netlink/genetlink.c:672 [inline] genl_family_rcv_msg net/netlink/genetlink.c:717 [inline] genl_rcv_msg+0x1dd0/0x23a0 net/netlink/genetlink.c:734 netlink_rcv_skb+0x431/0x620 net/netlink/af_netlink.c:2477 genl_rcv+0x63/0x80 net/netlink/genetlink.c:745 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xfa0/0x1100 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x11f0/0x1480 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x1362/0x13f0 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x4f0/0x5e0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x444179 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 1b d8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffd2d6409c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000444179 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000003 RBP: 00000000006ce018 R08: 0000000000000000 R09: 00000000004002e0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401e20 R13: 0000000000401eb0 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:149 [inline] kmsan_internal_poison_shadow+0x5c/0x110 mm/kmsan/kmsan.c:132 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:86 slab_alloc_node mm/slub.c:2774 [inline] __kmalloc_node_track_caller+0xe47/0x11f0 mm/slub.c:4382 __kmalloc_reserve net/core/skbuff.c:141 [inline] __alloc_skb+0x309/0xa50 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] nlmsg_new include/net/netlink.h:888 [inline] tipc_nl_compat_dumpit+0x6e4/0x910 net/tipc/netlink_compat.c:301 tipc_nl_compat_handle net/tipc/netlink_compat.c:1252 [inline] tipc_nl_compat_recv+0x12e9/0x2870 net/tipc/netlink_compat.c:1311 genl_family_rcv_msg_doit net/netlink/genetlink.c:672 [inline] genl_family_rcv_msg net/netlink/genetlink.c:717 [inline] genl_rcv_msg+0x1dd0/0x23a0 net/netlink/genetlink.c:734 netlink_rcv_skb+0x431/0x620 net/netlink/af_netlink.c:2477 genl_rcv+0x63/0x80 net/netlink/genetlink.c:745 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xfa0/0x1100 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x11f0/0x1480 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x1362/0x13f0 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x4f0/0x5e0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ===================================================== The complaint above occurred because the memory region pointed by attrbuf variable was not initialized. To eliminate this warning, we use kcalloc() rather than kmalloc_array() to allocate memory for attrbuf. Reported-by: syzbot+b1fd2bf2c89d8407e15f@syzkaller.appspotmail.com Signed-off-by: Ying Xue Signed-off-by: David S. Miller commit 869bced7a055665e3ddb1ba671a441ce6f997bf1 Author: Hans de Goede Date: Mon Jan 6 12:39:03 2020 +0100 ASoC: Intel: bytcht_es8316: Fix Irbis NB41 netbook quirk When a quirk for the Irbis NB41 netbook was added, to override the defaults for this device, I forgot to add/keep the BYT_CHT_ES8316_SSP0 part of the defaults, completely breaking audio on this netbook. This commit adds the BYT_CHT_ES8316_SSP0 flag to the Irbis NB41 netbook quirk, making audio work again. Cc: stable@vger.kernel.org Cc: russianneuromancer@ya.ru Fixes: aa2ba991c420 ("ASoC: Intel: bytcht_es8316: Add quirk for Irbis NB41 netbook") Reported-and-tested-by: russianneuromancer@ya.ru Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200106113903.279394-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 89b71b3f02d8ae5a08a1dd6f4a2098b7b868d498 Author: Dmitry Osipenko Date: Mon Jan 6 04:47:07 2020 +0300 ASoC: rt5640: Fix NULL dereference on module unload The rt5640->jack is NULL if jack is already disabled at the time of driver's module unloading. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106014707.11378-1-digetx@gmail.com Signed-off-by: Mark Brown commit ec7b3f5372e2f674ce19c23ca8f5a2c103025264 Merge: 5acefdc27b73 09b6636cea4f Author: Linus Torvalds Date: Mon Jan 6 12:34:44 2020 -0800 Merge tag 'spi-fix-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small collection of fixes here, one to make the newly added PTP timestamping code more accurate, a few driver fixes and a fix for the core DT binding to document the fact that we support eight wire buses" * tag 'spi-fix-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: Document Octal mode as valid SPI bus width spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls spi: spi-fsl-dspi: Fix 16-bit word order in 32-bit XSPI mode spi: Don't look at TX buffer for PTP system timestamping spi: uniphier: Fix FIFO threshold commit 5acefdc27b739e68294259c1a89c39d250246554 Merge: b967793c96dd 6f1ff76154b8 Author: Linus Torvalds Date: Mon Jan 6 12:04:31 2020 -0800 Merge tag 'regulator-fix-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Three small fixes here, two the result of Axel Lin's amazing work tracking down inconsistencies in drivers" * tag 'regulator-fix-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: bd70528: Remove .set_ramp_delay for bd70528_ldo_ops regulator: axp20x: Fix axp20x_set_ramp_delay regulator: axp20x: Fix AXP22x ELDO2 regulator enable bitmask commit 68faa679b8be1a74e6663c21c3a9d25d32f1c079 Author: Will Deacon Date: Thu Dec 19 12:02:03 2019 +0000 chardev: Avoid potential use-after-free in 'chrdev_open()' 'chrdev_open()' calls 'cdev_get()' to obtain a reference to the 'struct cdev *' stashed in the 'i_cdev' field of the target inode structure. If the pointer is NULL, then it is initialised lazily by looking up the kobject in the 'cdev_map' and so the whole procedure is protected by the 'cdev_lock' spinlock to serialise initialisation of the shared pointer. Unfortunately, it is possible for the initialising thread to fail *after* installing the new pointer, for example if the subsequent '->open()' call on the file fails. In this case, 'cdev_put()' is called, the reference count on the kobject is dropped and, if nobody else has taken a reference, the release function is called which finally clears 'inode->i_cdev' from 'cdev_purge()' before potentially freeing the object. The problem here is that a racing thread can happily take the 'cdev_lock' and see the non-NULL pointer in the inode, which can result in a refcount increment from zero and a warning: | ------------[ cut here ]------------ | refcount_t: addition on 0; use-after-free. | WARNING: CPU: 2 PID: 6385 at lib/refcount.c:25 refcount_warn_saturate+0x6d/0xf0 | Modules linked in: | CPU: 2 PID: 6385 Comm: repro Not tainted 5.5.0-rc2+ #22 | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 | RIP: 0010:refcount_warn_saturate+0x6d/0xf0 | Code: 05 55 9a 15 01 01 e8 9d aa c8 ff 0f 0b c3 80 3d 45 9a 15 01 00 75 ce 48 c7 c7 00 9c 62 b3 c6 08 | RSP: 0018:ffffb524c1b9bc70 EFLAGS: 00010282 | RAX: 0000000000000000 RBX: ffff9e9da1f71390 RCX: 0000000000000000 | RDX: ffff9e9dbbd27618 RSI: ffff9e9dbbd18798 RDI: ffff9e9dbbd18798 | RBP: 0000000000000000 R08: 000000000000095f R09: 0000000000000039 | R10: 0000000000000000 R11: ffffb524c1b9bb20 R12: ffff9e9da1e8c700 | R13: ffffffffb25ee8b0 R14: 0000000000000000 R15: ffff9e9da1e8c700 | FS: 00007f3b87d26700(0000) GS:ffff9e9dbbd00000(0000) knlGS:0000000000000000 | CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 | CR2: 00007fc16909c000 CR3: 000000012df9c000 CR4: 00000000000006e0 | DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 | DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 | Call Trace: | kobject_get+0x5c/0x60 | cdev_get+0x2b/0x60 | chrdev_open+0x55/0x220 | ? cdev_put.part.3+0x20/0x20 | do_dentry_open+0x13a/0x390 | path_openat+0x2c8/0x1470 | do_filp_open+0x93/0x100 | ? selinux_file_ioctl+0x17f/0x220 | do_sys_open+0x186/0x220 | do_syscall_64+0x48/0x150 | entry_SYSCALL_64_after_hwframe+0x44/0xa9 | RIP: 0033:0x7f3b87efcd0e | Code: 89 54 24 08 e8 a3 f4 ff ff 8b 74 24 0c 48 8b 3c 24 41 89 c0 44 8b 54 24 08 b8 01 01 00 00 89 f4 | RSP: 002b:00007f3b87d259f0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 | RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3b87efcd0e | RDX: 0000000000000000 RSI: 00007f3b87d25a80 RDI: 00000000ffffff9c | RBP: 00007f3b87d25e90 R08: 0000000000000000 R09: 0000000000000000 | R10: 0000000000000000 R11: 0000000000000293 R12: 00007ffe188f504e | R13: 00007ffe188f504f R14: 00007f3b87d26700 R15: 0000000000000000 | ---[ end trace 24f53ca58db8180a ]--- Since 'cdev_get()' can already fail to obtain a reference, simply move it over to use 'kobject_get_unless_zero()' instead of 'kobject_get()', which will cause the racing thread to return -ENXIO if the initialising thread fails unexpectedly. Cc: Hillf Danton Cc: Andrew Morton Cc: Al Viro Reported-by: syzbot+82defefbbd8527e1c2cb@syzkaller.appspotmail.com Signed-off-by: Will Deacon Cc: stable Link: https://lore.kernel.org/r/20191219120203.32691-1-will@kernel.org Signed-off-by: Greg Kroah-Hartman commit c5ee0b3104e0b292d353e63fd31cb8c692645d8c Author: Punit Agrawal Date: Thu Dec 19 19:03:45 2019 +0900 serdev: Don't claim unsupported ACPI serial devices Serdev sub-system claims all ACPI serial devices that are not already initialised. As a result, no device node is created for serial ports on certain boards such as the Apollo Lake based UP2. This has the unintended consequence of not being able to raise the login prompt via serial connection. Introduce a blacklist to reject ACPI serial devices that should not be claimed by serdev sub-system. Add the peripheral ids for Intel HS UART to the blacklist to bring back serial port on SoCs carrying them. Cc: stable@vger.kernel.org Signed-off-by: Punit Agrawal Acked-by: Hans de Goede Acked-by: Johan Hovold Cc: Rob Herring Link: https://lore.kernel.org/r/20191219100345.911093-1-punit1.agrawal@toshiba.co.jp Signed-off-by: Greg Kroah-Hartman commit b967793c96dde15cbcb07fb98238535682cc27f8 Merge: 8f8b69aa501e f01f4ffdfb70 Author: Linus Torvalds Date: Mon Jan 6 10:46:43 2020 -0800 Merge tag 'rtc-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC fixes from Alexandre Belloni: "A few fixes for this cycle. The CMOS AltCentury support broke a few platforms with a recent BIOS so I reverted it. The mt6397 fix is not that critical but good to have. And finally, the sun6i fix repairs WiFi and BT on a few platforms. Summary: - cmos: revert AltCentury support on AMD/Hygon - mt6397: fix alarm register overwrite - sun6i: ensure clock is working on R40" * tag 'rtc-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: cmos: Revert "rtc: Fix the AltCentury value on AMD/Hygon platform" rtc: mt6397: fix alarm register overwrite rtc: sun6i: Add support for RTC clocks on R40 commit 8f8b69aa501e84a0043428467a5a22b55e937cbd Merge: 24cecc377463 7ecc6c1d5c8d Author: Linus Torvalds Date: Mon Jan 6 10:16:48 2020 -0800 Merge tag 'arc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: "Kconfig warning, stale define, duplicate asm-offset entry ..." * tag 'arc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: pt_regs: remove hardcoded registers offset ARC: asm-offsets: remove duplicate entry ARC: mm: drop stale define of __ARCH_USE_5LEVEL_HACK arc: eznps: fix allmodconfig kconfig warning commit 24cecc37746393432d994c0dbc251fb9ac7c5d72 Author: Catalin Marinas Date: Mon Jan 6 14:35:39 2020 +0000 arm64: Revert support for execute-only user mappings The ARMv8 64-bit architecture supports execute-only user permissions by clearing the PTE_USER and PTE_UXN bits, practically making it a mostly privileged mapping but from which user running at EL0 can still execute. The downside, however, is that the kernel at EL1 inadvertently reading such mapping would not trip over the PAN (privileged access never) protection. Revert the relevant bits from commit cab15ce604e5 ("arm64: Introduce execute-only page access permissions") so that PROT_EXEC implies PROT_READ (and therefore PTE_USER) until the architecture gains proper support for execute-only user mappings. Fixes: cab15ce604e5 ("arm64: Introduce execute-only page access permissions") Cc: # 4.9.x- Acked-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Linus Torvalds commit aa4a63dd981682b1742baa01237036e48bc11923 Author: Stefan Berger Date: Tue Nov 26 08:17:53 2019 -0500 tpm: Revert "tpm_tis_core: Turn on the TPM before probing IRQ's" There has been a bunch of reports (one from kernel bugzilla linked) reporting that when this commit is applied it causes on some machines boot freezes. Unfortunately hardware where this commit causes a failure is not widely available (only one I'm aware is Lenovo T490), which means we cannot predict yet how long it will take to properly fix tpm_tis interrupt probing. Thus, the least worst short term action is to revert the code to the state before this commit. In long term we need fix the tpm_tis probing code to work on machines that Stefan's fix was supposed to fix. Fixes: 21df4a8b6018 ("tpm_tis: reserve chip for duration of tpm_tis_core_init") Link: https://bugzilla.kernel.org/show_bug.cgi?id=205935 Cc: stable@vger.kernel.org Cc: Jerry Snitselaar Cc: Dan Williams Tested-by: Dan Williams Tested-by: Xiaoping Zhou Signed-off-by: Stefan Berger Reported-by: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen commit dda8b2af395b2ed508e2ef314ae32e122841b447 Author: Stefan Berger Date: Tue Nov 26 08:17:52 2019 -0500 tpm: Revert "tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts" There has been a bunch of reports (one from kernel bugzilla linked) reporting that when this commit is applied it causes on some machines boot freezes. Unfortunately hardware where this commit causes a failure is not widely available (only one I'm aware is Lenovo T490), which means we cannot predict yet how long it will take to properly fix tpm_tis interrupt probing. Thus, the least worst short term action is to revert the code to the state before this commit. In long term we need fix the tpm_tis probing code to work on machines that Stefan's fix was supposed to fix. Link: https://bugzilla.kernel.org/show_bug.cgi?id=205935 Fixes: 1ea32c83c699 ("tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts") Cc: stable@vger.kernel.org Cc: Jerry Snitselaar Cc: Dan Williams Tested-by: Dan Williams Tested-by: Xiaoping Zhou Signed-off-by: Stefan Berger Reported-by: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen commit 9550f210492c6f88415709002f42a9d15c0e6231 Author: Jarkko Sakkinen Date: Tue Dec 31 01:19:59 2019 +0200 tpm: Revert "tpm_tis: reserve chip for duration of tpm_tis_core_init" Revert a commit, which was included in Linux v5.5-rc3 because it did not properly fix the issues it was supposed to fix. Fixes: 21df4a8b6018 ("tpm_tis: reserve chip for duration of tpm_tis_core_init") Link: https://bugzilla.kernel.org/show_bug.cgi?id=205935 Cc: stable@vger.kernel.org Cc: Jerry Snitselaar Cc: Dan Williams Tested-by: Dan Williams Tested-by: Xiaoping Zhou Signed-off-by: Jarkko Sakkinen commit 850e0a99361b6fd88f8def26f9422a0561654c2f Merge: 8396bdc008fc 5a769f6ff439 Author: Olof Johansson Date: Mon Jan 6 09:20:40 2020 -0800 Merge tag 'tee-optee-fix-for-5.5' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/fixes Fix OP-TEE multi page dynamic shm pool alloc * tag 'tee-optee-fix-for-5.5' of git://git.linaro.org:/people/jens.wiklander/linux-tee: optee: Fix multi page dynamic shm pool alloc Link: https://lore.kernel.org/r/20200103103710.GA3469@jax Signed-off-by: Olof Johansson commit 8396bdc008fc70f4826de8a1d6d48f59dfd6d030 Author: Lubomir Rintel Date: Fri Dec 20 08:14:43 2019 +0100 ARM: dts: mmp3: Fix the TWSI ranges The register blocks don't occupy 4K. In fact, some blocks are packed close to others and assuming they're 4K causes overlaps: pxa2xx-i2c d4033800.i2c: can't request region for resource [mem 0xd4033800-0xd40347ff] Link: https://lore.kernel.org/r/20191220071443.247183-1-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit 8bea5ac0fbc5b2103f8779ddff216122e3c2e1ad Author: Lubomir Rintel Date: Wed Dec 18 20:04:54 2019 +0100 clk: mmp2: Fix the order of timer mux parents Determined empirically, no documentation is available. The OLPC XO-1.75 laptop used parent 1, that one being VCTCXO/4 (65MHz), but thought it's a VCTCXO/2 (130MHz). The mmp2 timer driver, not knowing what is going on, ended up just dividing the rate as of commit f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock")' Link: https://lore.kernel.org/r/20191218190454.420358-3-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Acked-by: Stephen Boyd Signed-off-by: Olof Johansson commit 0bd0f30bbf060891f58866a46083a9931f71787c Author: Lubomir Rintel Date: Wed Dec 18 20:04:53 2019 +0100 ARM: mmp: do not divide the clock rate This was done because the clock driver returned the wrong rate, which is fixed in "clk: mmp2: Fix the order of timer mux parents" patch. Link: https://lore.kernel.org/r/20191218190454.420358-2-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit fbca72c1542b12495512debf9426426a6687dbde Merge: 51d4efab7865 ff3b57417012 Author: Takashi Iwai Date: Mon Jan 6 17:39:15 2020 +0100 Merge tag 'asoc-fix-v5.5-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.5 More fixes that have been collected, nothing super remarkable here - the few core fixes are mainly error handling related as are many of the driver fixes. commit 2548288b4fb059b2da9ceada172ef763077e8a59 Author: Alan Stern Date: Mon Jan 6 10:43:42 2020 -0500 USB: Fix: Don't skip endpoint descriptors with maxpacket=0 It turns out that even though endpoints with a maxpacket length of 0 aren't useful for data transfer, the descriptors do serve other purposes. In particular, skipping them will also skip over other class-specific descriptors for classes such as UVC. This unexpected side effect has caused some UVC cameras to stop working. In addition, the USB spec requires that when isochronous endpoint descriptors are present in an interface's altsetting 0 (which is true on some devices), the maxpacket size _must_ be set to 0. Warning about such things seems like a bad idea. This patch updates an earlier commit which would log a warning and skip these endpoint descriptors. Now we only log a warning, and we don't even do that for isochronous endpoints in altsetting 0. We don't need to worry about preventing endpoints with maxpacket = 0 from ever being used for data transfers; usb_submit_urb() already checks for this. Reported-and-tested-by: Roger Whittaker Fixes: d482c7bb0541 ("USB: Skip endpoints with 0 maxpacket length") Signed-off-by: Alan Stern CC: Laurent Pinchart Link: https://marc.info/?l=linux-usb&m=157790377329882&w=2 Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.2001061040270.1514-100000@iolanthe.rowland.org Signed-off-by: Greg Kroah-Hartman commit 3b722da6672df8392f9c43d7c7e04bddd81d7e37 Author: Stefan Wahren Date: Sat Jan 4 16:13:20 2020 +0100 i2c: bcm2835: Store pointer to bus clock The commit bebff81fb8b9 ("i2c: bcm2835: Model Divider in CCF") introduced a NULL pointer dereference on driver unload. It seems that we can't fetch the bus clock via devm_clk_get in bcm2835_i2c_remove. As an alternative approach store a pointer to the bus clock in the private driver structure. Fixes: bebff81fb8b9 ("i2c: bcm2835: Model Divider in CCF") Signed-off-by: Stefan Wahren Signed-off-by: Wolfram Sang commit 42052d96ae59a702a0b71fafde69fe2cbee23a0e Author: Eugen Hristev Date: Mon Dec 9 10:20:07 2019 +0000 dt-bindings: i2c: at91: fix i2c-sda-hold-time-ns documentation for sam9x60 SAM9X60 also supports i2c-sda-hold-time-ns. Fix the documentation accordingly. Fixes: 2034e3f4c9a5 ("dt-bindings: i2c: at91: add new compatible") Signed-off-by: Eugen Hristev Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit b7169a57982383a81d4227712c894e6ec2516e8c Author: Eugen Hristev Date: Mon Dec 9 10:20:02 2019 +0000 i2c: at91: fix clk_offset for sam9x60 In SAM9X60 datasheet, FLEX_TWI_CWGR register description mentions clock offset of 3 cycles (compared to 4 in eg. SAMA5D3). This is the same offset as in SAMA5D2. Fixes: b00277923743 ("i2c: at91: add new platform support for sam9x60") Suggested-by: Codrin Ciubotariu Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Reviewed-by: Codrin Ciubotariu Signed-off-by: Wolfram Sang commit 3433bdf98d8e9dd923118577dc582216a143e60d Author: Robin Murphy Date: Sun Dec 29 17:48:05 2019 +0000 arm64: dts: rockchip: Fix IR on Beelink A1 Apparently I wasn't paying enough attention... And nor is the lazy test of `cat /dev/lirc0` sufficiently blunder-proof. Oh well, with the correct polarity, let's also hook up a keymap now that one for the standard Beelink remote has handily appeared. Fixes: 79702ded8c2f ("arm64: dts: rockchip: Add Beelink A1") Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/44269c08e2a5d75b03ded87d2eb11621762d8249.1577636223.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit fb46f1b7806977e9135a83eb347e5d82e68233a2 Author: Pablo Neira Ayuso Date: Fri Jan 3 18:10:04 2020 +0100 netfilter: flowtable: add nf_flowtable_time_stamp This patch adds nf_flowtable_time_stamp and updates the existing code to use it. This patch is also implicitly fixing up hardware statistic fetching via nf_flow_offload_stats() where casting to u32 is missing. Use nf_flow_timeout_delta() to fix this. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Pablo Neira Ayuso Acked-by: wenxu commit ad931a2d56e35ff69902f5d7299775e80c35c322 Author: Peter Ujfalusi Date: Thu Nov 14 12:17:18 2019 +0200 clk: ti: dra7-atl: Remove pm_runtime_irq_safe() This is not needed for anything, and prevents proper PM transitions for parent devices which is bad in case of ti-sysc; this effectively kills PM completely. Thus, remove the flag. Suggested-by: Tony Lindgren Signed-off-by: Peter Ujfalusi Link: https://lkml.kernel.org/r/20191114101718.20619-1-peter.ujfalusi@ti.com Reviewed-by: Tony Lindgren Signed-off-by: Stephen Boyd commit d89091a4930ee0d80bee3e259a98513f3a2543ec Author: Stephen Boyd Date: Fri Jan 3 16:19:21 2020 -0800 macb: Don't unregister clks unconditionally The only clk init function in this driver that register a clk is fu540_c000_clk_init(), and thus we need to unregister the clk when this driver is removed on that platform. Other init functions, for example macb_clk_init(), don't register clks and therefore we shouldn't unregister the clks when this driver is removed. Convert this registration path to devm so it gets auto-unregistered when this driver is removed and drop the clk_unregister() calls in driver remove (and error paths) so that we don't erroneously remove a clk from the system that isn't registered by this driver. Otherwise we get strange crashes with a use-after-free when the devm_clk_get() call in macb_clk_init() calls clk_put() on a clk pointer that has become invalid because it is freed in clk_unregister(). Cc: Nicolas Ferre Cc: Yash Shah Reported-by: Guenter Roeck Fixes: c218ad559020 ("macb: Add support for SiFive FU540-C000") Signed-off-by: Stephen Boyd Signed-off-by: David S. Miller commit 15a821f050b243459ee84ca539b9c2af08da3c2c Author: Krzysztof Kozlowski Date: Fri Jan 3 18:25:49 2020 +0100 MAINTAINERS: Drop obsolete entries from Samsung sxgbe ethernet driver The emails to ks.giri@samsung.com and vipul.pandya@samsung.com bounce with 550 error code: host mailin.samsung.com[203.254.224.12] said: 550 5.1.1 Recipient address rejected: User unknown (in reply to RCPT TO command)" Drop Girish K S and Vipul Pandya from sxgbe maintainers entry. Cc: Byungho An Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit ce57785bf91b1ceaef4f4bffed8a47dc0919c8da Author: Carl Huang Date: Fri Jan 3 12:50:16 2020 +0800 net: qrtr: fix len of skb_put_padto in qrtr_node_enqueue The len used for skb_put_padto is wrong, it need to add len of hdr. In qrtr_node_enqueue, local variable size_t len is assign with skb->len, then skb_push(skb, sizeof(*hdr)) will add skb->len with sizeof(*hdr), so local variable size_t len is not same with skb->len after skb_push(skb, sizeof(*hdr)). Then the purpose of skb_put_padto(skb, ALIGN(len, 4)) is to add add pad to the end of the skb's data if skb->len is not aligned to 4, but unfortunately it use len instead of skb->len, at this line, skb->len is 32 bytes(sizeof(*hdr)) more than len, for example, len is 3 bytes, then skb->len is 35 bytes(3 + 32), and ALIGN(len, 4) is 4 bytes, so __skb_put_padto will do nothing after check size(35) < len(4), the correct value should be 36(sizeof(*hdr) + ALIGN(len, 4) = 32 + 4), then __skb_put_padto will pass check size(35) < len(36) and add 1 byte to the end of skb's data, then logic is correct. function of skb_push: void *skb_push(struct sk_buff *skb, unsigned int len) { skb->data -= len; skb->len += len; if (unlikely(skb->data < skb->head)) skb_under_panic(skb, len, __builtin_return_address(0)); return skb->data; } function of skb_put_padto static inline int skb_put_padto(struct sk_buff *skb, unsigned int len) { return __skb_put_padto(skb, len, true); } function of __skb_put_padto static inline int __skb_put_padto(struct sk_buff *skb, unsigned int len, bool free_on_error) { unsigned int size = skb->len; if (unlikely(size < len)) { len -= size; if (__skb_pad(skb, len, free_on_error)) return -ENOMEM; __skb_put(skb, len); } return 0; } Signed-off-by: Carl Huang Signed-off-by: Wen Gong Signed-off-by: David S. Miller commit c79f46a282390e0f5b306007bf7b11a46d529538 Author: Linus Torvalds Date: Sun Jan 5 14:23:27 2020 -0800 Linux 5.5-rc5 commit f11421ba4af706cb4f5703de34fa77fba8472776 Author: Fenghua Yu Date: Thu Jan 2 13:27:06 2020 -0800 drivers/net/b44: Change to non-atomic bit operations on pwol_mask Atomic operations that span cache lines are super-expensive on x86 (not just to the current processor, but also to other processes as all memory operations are blocked until the operation completes). Upcoming x86 processors have a switch to cause such operations to generate a #AC trap. It is expected that some real time systems will enable this mode in BIOS. In preparation for this, it is necessary to fix code that may execute atomic instructions with operands that cross cachelines because the #AC trap will crash the kernel. Since "pwol_mask" is local and never exposed to concurrency, there is no need to set bits in pwol_mask using atomic operations. Directly operate on the byte which contains the bit instead of using __set_bit() to avoid any big endian concern due to type cast to unsigned long in __set_bit(). Suggested-by: Peter Zijlstra Signed-off-by: Fenghua Yu Signed-off-by: Tony Luck Signed-off-by: David S. Miller commit 5e82548e26ef62e257dc2ff37c11acb5eb72728e Author: Georgi Djakov Date: Tue Nov 26 17:34:37 2019 +0200 clk: qcom: gcc-sdm845: Add missing flag to votable GDSCs On sdm845 devices, during boot we see the following warnings (unless we have added 'pd_ignore_unused' to the kernel command line): hlos1_vote_mmnoc_mmu_tbu_sf_gdsc status stuck at 'on' hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc status stuck at 'on' hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc status stuck at 'on' hlos1_vote_aggre_noc_mmu_tbu2_gdsc status stuck at 'on' hlos1_vote_aggre_noc_mmu_tbu1_gdsc status stuck at 'on' hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc status stuck at 'on' hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc status stuck at 'on' As the name of these GDSCs suggests, they are "votable" and in downstream DT, they all have the property "qcom,no-status-check-on-disable", which means that we should not poll the status bit when we disable them. Luckily the VOTABLE flag already exists and it does exactly what we need, so let's make use of it to make the warnings disappear. Fixes: 06391eddb60a ("clk: qcom: Add Global Clock controller (GCC) driver for SDM845") Reported-by: Rob Clark Signed-off-by: Georgi Djakov Link: https://lkml.kernel.org/r/20191126153437.11808-1-georgi.djakov@linaro.org Tested-by: Rob Clark Signed-off-by: Stephen Boyd commit 768fc661d12559b0dbd99d941b3bf28fe92fd365 Merge: 36487907f341 0e194d9da198 Author: Linus Torvalds Date: Sun Jan 5 11:15:31 2020 -0800 Merge tag 'riscv/for-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Paul Walmsley: "Several fixes for RISC-V: - Fix function graph trace support - Prefix the CSR IRQ_* macro names with "RV_", to avoid collisions with macros elsewhere in the Linux kernel tree named "IRQ_TIMER" - Use __pa_symbol() when computing the physical address of a kernel symbol, rather than __pa() - Mark the RISC-V port as supporting GCOV One DT addition: - Describe the L2 cache controller in the FU540 DT file One documentation update: - Add patch acceptance guideline documentation" * tag 'riscv/for-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: Documentation: riscv: add patch acceptance guidelines riscv: prefix IRQ_ macro names with an RV_ namespace clocksource: riscv: add notrace to riscv_sched_clock riscv: ftrace: correct the condition logic in function graph tracer riscv: dts: Add DT support for SiFive L2 cache controller riscv: gcov: enable gcov for RISC-V riscv: mm: use __pa_symbol for kernel symbols commit 5acab91458ceae0e4b15205fda5437631089f7ee Author: Pablo Neira Ayuso Date: Fri Jan 3 14:36:07 2020 +0100 netfilter: nf_tables: unbind callbacks from flowtable destroy path Callback unbinding needs to be done after nf_flow_table_free(), otherwise entries are not removed from the hardware. Update nft_unregister_flowtable_net_hooks() to call nf_unregister_net_hook() instead since the commit/abort paths do not deal with the callback unbinding anymore. Add a comment to nft_flowtable_event() to clarify that flow_offload_netdev_event() already removes the entries before the callback unbinding. Fixes: 8bb69f3b2918 ("netfilter: nf_tables: add flowtable offload control plane") Fixes ff4bf2f42a40 ("netfilter: nf_tables: add nft_unregister_flowtable_hook()") Signed-off-by: Pablo Neira Ayuso Acked-by: wenxu commit 73327d47d2c04214f23217b982a004c22a493c78 Author: wenxu Date: Fri Dec 20 12:14:38 2019 +0800 netfilter: nf_flow_table_offload: fix the nat port mangle. Shift on 32-bit word to define the port number depends on the flow direction. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Fixes: 7acd9378dc652 ("netfilter: nf_flow_table_offload: Correct memcpy size for flow_overload_mangle()") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit f31ad71c44c17e55d9a6fa24f8249a15365cf8b2 Author: wenxu Date: Fri Dec 20 12:14:37 2019 +0800 netfilter: nf_flow_table_offload: check the status of dst_neigh It is better to get the dst_neigh with neigh->lock and check the nud_state is VALID. If there is not neigh previous, the lookup will Create a non NUD_VALID with 00:00:00:00:00:00 mac. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 1b67e50601fabc9589022e6b5e79fd8596c2338e Author: wenxu Date: Fri Dec 20 12:14:36 2019 +0800 netfilter: nf_flow_table_offload: fix incorrect ethernet dst address Ethernet destination for original traffic takes the source ethernet address in the reply direction. For reply traffic, this takes the source ethernet address of the original direction. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 8ca79606cdfde2e37ee4f0707b9d1874a6f0eb38 Author: wenxu Date: Fri Dec 20 17:08:46 2019 +0800 netfilter: nft_flow_offload: fix underflow in flowtable reference counter The .deactivate and .activate interfaces already deal with the reference counter. Otherwise, this results in spurious "Device is busy" errors. Fixes: a3c90f7a2323 ("netfilter: nf_tables: flow offload expression") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 0e194d9da198936fe4fb4c1e031de0f7791c09b8 Author: Paul Walmsley Date: Fri Nov 22 18:33:28 2019 -0800 Documentation: riscv: add patch acceptance guidelines Formalize, in kernel documentation, the patch acceptance policy for arch/riscv. In summary, it states that as maintainers, we plan to only accept patches for new modules or extensions that have been frozen or ratified by the RISC-V Foundation. We've been following these guidelines for the past few months. In the meantime, we've received quite a bit of feedback that it would be helpful to have these guidelines formally documented. Based on a suggestion from Matthew Wilcox, we also add a link to this file to Documentation/process/index.rst, to make this document easier to find. The format of this document has also been changed to align to the format outlined in the maintainer entry profiles, in accordance with comments from Jon Corbet and Dan Williams. Signed-off-by: Paul Walmsley Reviewed-by: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Albert Ou Cc: Krste Asanovic Cc: Andrew Waterman Cc: Matthew Wilcox Cc: Dan Williams Cc: Jonathan Corbet commit 2f3035da4019780250658d1ffe486bc324e04805 Author: Paul Walmsley Date: Fri Dec 20 03:09:49 2019 -0800 riscv: prefix IRQ_ macro names with an RV_ namespace "IRQ_TIMER", used in the arch/riscv CSR header file, is a sufficiently generic macro name that it's used by several source files across the Linux code base. Some of these other files ultimately include the arch/riscv CSR include file, causing collisions. Fix by prefixing the RISC-V csr.h IRQ_ macro names with an RV_ prefix. Fixes: a4c3733d32a72 ("riscv: abstract out CSR names for supervisor vs machine mode") Reported-by: Olof Johansson Acked-by: Olof Johansson Signed-off-by: Paul Walmsley commit 9d05c18e8d7de566ff68f221fcae65e78708dd1d Author: Zong Li Date: Mon Dec 23 16:46:14 2019 +0800 clocksource: riscv: add notrace to riscv_sched_clock When enabling ftrace graph tracer, it gets the tracing clock in ftrace_push_return_trace(). Eventually, it invokes riscv_sched_clock() to get the clock value. If riscv_sched_clock() isn't marked with 'notrace', it will call ftrace_push_return_trace() and cause infinite loop. The result of failure as follow: command: echo function_graph >current_tracer [ 46.176787] Unable to handle kernel paging request at virtual address ffffffe04fb38c48 [ 46.177309] Oops [#1] [ 46.177478] Modules linked in: [ 46.177770] CPU: 0 PID: 256 Comm: $d Not tainted 5.5.0-rc1 #47 [ 46.177981] epc: ffffffe00035e59a ra : ffffffe00035e57e sp : ffffffe03a7569b0 [ 46.178216] gp : ffffffe000d29b90 tp : ffffffe03a756180 t0 : ffffffe03a756968 [ 46.178430] t1 : ffffffe00087f408 t2 : ffffffe03a7569a0 s0 : ffffffe03a7569f0 [ 46.178643] s1 : ffffffe00087f408 a0 : 0000000ac054cda4 a1 : 000000000087f411 [ 46.178856] a2 : 0000000ac054cda4 a3 : 0000000000373ca0 a4 : ffffffe04fb38c48 [ 46.179099] a5 : 00000000153e22a8 a6 : 00000000005522ff a7 : 0000000000000005 [ 46.179338] s2 : ffffffe03a756a90 s3 : ffffffe00032811c s4 : ffffffe03a756a58 [ 46.179570] s5 : ffffffe000d29fe0 s6 : 0000000000000001 s7 : 0000000000000003 [ 46.179809] s8 : 0000000000000003 s9 : 0000000000000002 s10: 0000000000000004 [ 46.180053] s11: 0000000000000000 t3 : 0000003fc815749c t4 : 00000000000efc90 [ 46.180293] t5 : ffffffe000d29658 t6 : 0000000000040000 [ 46.180482] status: 0000000000000100 badaddr: ffffffe04fb38c48 cause: 000000000000000f Signed-off-by: Zong Li Reviewed-by: Steven Rostedt (VMware) [paul.walmsley@sifive.com: cleaned up patch description] Fixes: 92e0d143fdef ("clocksource/drivers/riscv_timer: Provide the sched_clock") Cc: stable@vger.kernel.org Signed-off-by: Paul Walmsley commit 36487907f34131c7e3df5b1e6b30b4e3dfcdc0af Merge: a125bcda2d0a 7312b7069925 Author: Linus Torvalds Date: Sat Jan 4 19:38:51 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "17 fixes" * emailed patches from Andrew Morton : hexagon: define ioremap_uc ocfs2: fix the crash due to call ocfs2_get_dlm_debug once less ocfs2: call journal flush to mark journal as empty after journal recovery when mount mm/hugetlb: defer freeing of huge pages if in non-task context mm/gup: fix memory leak in __gup_benchmark_ioctl mm/oom: fix pgtables units mismatch in Killed process message fs/posix_acl.c: fix kernel-doc warnings hexagon: work around compiler crash hexagon: parenthesize registers in asm predicates fs/namespace.c: make to_mnt_ns() static fs/nsfs.c: include headers for missing declarations fs/direct-io.c: include fs/internal.h for missing prototype mm: move_pages: return valid node id in status if the page is already on the target node memcg: account security cred as well to kmemcg kcov: fix struct layout for kcov_remote_arg mm/zsmalloc.c: fix the migrated zspage statistics. mm/memory_hotplug: shrink zones when offlining memory commit a125bcda2d0aee1d98b51c167aca60fb312572aa Merge: c420ddda506b 8c62ed27a12c Author: Linus Torvalds Date: Sat Jan 4 19:28:30 2020 -0800 Merge tag 'apparmor-pr-2020-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor fixes from John Johansen: - performance regression: only get a label reference if the fast path check fails - fix aa_xattrs_match() may sleep while holding a RCU lock - fix bind mounts aborting with -ENOMEM * tag 'apparmor-pr-2020-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: fix aa_xattrs_match() may sleep while holding a RCU lock apparmor: only get a label reference if the fast path check fails apparmor: fix bind mounts aborting with -ENOMEM commit 57415790f405534e5578d0106d806630c325dcb3 Author: Jens Axboe Date: Fri Jan 3 21:09:35 2020 -0700 block: remove unused mp_bvec_last_segment After commit 85a8ce62c2ea ("block: add bio_truncate to fix guard_bio_eod") this function is unused, remove it. Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 8c62ed27a12c00e3db1c9f04bc0f272bdbb06734 Author: John Johansen Date: Thu Jan 2 05:31:22 2020 -0800 apparmor: fix aa_xattrs_match() may sleep while holding a RCU lock aa_xattrs_match() is unfortunately calling vfs_getxattr_alloc() from a context protected by an rcu_read_lock. This can not be done as vfs_getxattr_alloc() may sleep regardles of the gfp_t value being passed to it. Fix this by breaking the rcu_read_lock on the policy search when the xattr match feature is requested and restarting the search if a policy changes occur. Fixes: 8e51f9087f40 ("apparmor: Add support for attaching profiles via xattr, presence and value") Reported-by: Jia-Ju Bai Reported-by: Al Viro Signed-off-by: John Johansen commit c420ddda506b80ec2686e405698d37fafeea3b7a Merge: 5613970af3f5 bbcc5672b006 Author: Linus Torvalds Date: Sat Jan 4 14:16:57 2020 -0800 Merge tag 'mips_fixes_5.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Paul Burton: "A collection of MIPS fixes: - Fill the struct cacheinfo shared_cpu_map field with sensible values, notably avoiding issues with perf which was unhappy in the absence of these values. - A boot fix for Loongson 2E & 2F machines which was fallout from some refactoring performed this cycle. - A Kconfig dependency fix for the Loongson CPU HWMon driver. - A couple of VDSO fixes, ensuring gettimeofday() behaves appropriately for kernel configurations that don't include support for a clocksource the VDSO can use & fixing the calling convention for the n32 & n64 VDSOs which would previously clobber the $gp/$28 register. - A build fix for vmlinuz compressed images which were inappropriately building with -fsanitize-coverage despite not being part of the kernel proper, then failing to link due to the missing __sanitizer_cov_trace_pc() function. - A couple of eBPF JIT fixes, including disabling it for MIPS32 due to a large number of issues with the code generated there & reflecting ISA dependencies in Kconfig to enforce that systems which don't support the JIT must include the interpreter" * tag 'mips_fixes_5.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Avoid VDSO ABI breakage due to global register variable MIPS: BPF: eBPF JIT: check for MIPS ISA compliance in Kconfig MIPS: BPF: Disable MIPS32 eBPF JIT MIPS: Prevent link failure with kcov instrumentation MIPS: Kconfig: Use correct form for 'depends on' mips: Fix gettimeofday() in the vdso library MIPS: Fix boot on Fuloong2 systems mips: cacheinfo: report shared CPU map commit 7312b70699252074d753c5005fc67266c547bbe3 Author: Nick Desaulniers Date: Sat Jan 4 13:00:26 2020 -0800 hexagon: define ioremap_uc Similar to commit 38e45d81d14e ("sparc64: implement ioremap_uc") define ioremap_uc for hexagon to avoid errors from -Wimplicit-function-definition. Link: http://lkml.kernel.org/r/20191209222956.239798-2-ndesaulniers@google.com Link: https://github.com/ClangBuiltLinux/linux/issues/797 Fixes: e537654b7039 ("lib: devres: add a helper function for ioremap_uc") Signed-off-by: Nick Desaulniers Suggested-by: Nathan Chancellor Acked-by: Brian Cain Cc: Lee Jones Cc: Andy Shevchenko Cc: Tuowen Zhao Cc: Mika Westerberg Cc: Luis Chamberlain Cc: Greg Kroah-Hartman Cc: Alexios Zavras Cc: Allison Randal Cc: Will Deacon Cc: Richard Fontana Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Boqun Feng Cc: Ingo Molnar Cc: Geert Uytterhoeven Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b73eba2a867e10b9b4477738677341f3307c07bb Author: Gang He Date: Sat Jan 4 13:00:22 2020 -0800 ocfs2: fix the crash due to call ocfs2_get_dlm_debug once less Because ocfs2_get_dlm_debug() function is called once less here, ocfs2 file system will trigger the system crash, usually after ocfs2 file system is unmounted. This system crash is caused by a generic memory corruption, these crash backtraces are not always the same, for exapmle, ocfs2: Unmounting device (253,16) on (node 172167785) general protection fault: 0000 [#1] SMP PTI CPU: 3 PID: 14107 Comm: fence_legacy Kdump: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) RIP: 0010:__kmalloc+0xa5/0x2a0 Code: 00 00 4d 8b 07 65 4d 8b RSP: 0018:ffffaa1fc094bbe8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: d310a8800d7a3faf RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000dc0 RDI: ffff96e68fc036c0 RBP: d310a8800d7a3faf R08: ffff96e6ffdb10a0 R09: 00000000752e7079 R10: 000000000001c513 R11: 0000000004091041 R12: 0000000000000dc0 R13: 0000000000000039 R14: ffff96e68fc036c0 R15: ffff96e68fc036c0 FS: 00007f699dfba540(0000) GS:ffff96e6ffd80000(0000) knlGS:00000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f3a9d9b768 CR3: 000000002cd1c000 CR4: 00000000000006e0 Call Trace: ext4_htree_store_dirent+0x35/0x100 [ext4] htree_dirblock_to_tree+0xea/0x290 [ext4] ext4_htree_fill_tree+0x1c1/0x2d0 [ext4] ext4_readdir+0x67c/0x9d0 [ext4] iterate_dir+0x8d/0x1a0 __x64_sys_getdents+0xab/0x130 do_syscall_64+0x60/0x1f0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f699d33a9fb This regression problem was introduced by commit e581595ea29c ("ocfs: no need to check return value of debugfs_create functions"). Link: http://lkml.kernel.org/r/20191225061501.13587-1-ghe@suse.com Fixes: e581595ea29c ("ocfs: no need to check return value of debugfs_create functions") Signed-off-by: Gang He Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: [5.3+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 397eac17f86f404f5ba31d8c3e39ec3124b39fd3 Author: Kai Li Date: Sat Jan 4 13:00:18 2020 -0800 ocfs2: call journal flush to mark journal as empty after journal recovery when mount If journal is dirty when mount, it will be replayed but jbd2 sb log tail cannot be updated to mark a new start because journal->j_flag has already been set with JBD2_ABORT first in journal_init_common. When a new transaction is committed, it will be recored in block 1 first(journal->j_tail is set to 1 in journal_reset). If emergency restart happens again before journal super block is updated unfortunately, the new recorded trans will not be replayed in the next mount. The following steps describe this procedure in detail. 1. mount and touch some files 2. these transactions are committed to journal area but not checkpointed 3. emergency restart 4. mount again and its journals are replayed 5. journal super block's first s_start is 1, but its s_seq is not updated 6. touch a new file and its trans is committed but not checkpointed 7. emergency restart again 8. mount and journal is dirty, but trans committed in 6 will not be replayed. This exception happens easily when this lun is used by only one node. If it is used by multi-nodes, other node will replay its journal and its journal super block will be updated after recovery like what this patch does. ocfs2_recover_node->ocfs2_replay_journal. The following jbd2 journal can be generated by touching a new file after journal is replayed, and seq 15 is the first valid commit, but first seq is 13 in journal super block. logdump: Block 0: Journal Superblock Seq: 0 Type: 4 (JBD2_SUPERBLOCK_V2) Blocksize: 4096 Total Blocks: 32768 First Block: 1 First Commit ID: 13 Start Log Blknum: 1 Error: 0 Feature Compat: 0 Feature Incompat: 2 block64 Feature RO compat: 0 Journal UUID: 4ED3822C54294467A4F8E87D2BA4BC36 FS Share Cnt: 1 Dynamic Superblk Blknum: 0 Per Txn Block Limit Journal: 0 Data: 0 Block 1: Journal Commit Block Seq: 14 Type: 2 (JBD2_COMMIT_BLOCK) Block 2: Journal Descriptor Seq: 15 Type: 1 (JBD2_DESCRIPTOR_BLOCK) No. Blocknum Flags 0. 587 none UUID: 00000000000000000000000000000000 1. 8257792 JBD2_FLAG_SAME_UUID 2. 619 JBD2_FLAG_SAME_UUID 3. 24772864 JBD2_FLAG_SAME_UUID 4. 8257802 JBD2_FLAG_SAME_UUID 5. 513 JBD2_FLAG_SAME_UUID JBD2_FLAG_LAST_TAG ... Block 7: Inode Inode: 8257802 Mode: 0640 Generation: 57157641 (0x3682809) FS Generation: 2839773110 (0xa9437fb6) CRC32: 00000000 ECC: 0000 Type: Regular Attr: 0x0 Flags: Valid Dynamic Features: (0x1) InlineData User: 0 (root) Group: 0 (root) Size: 7 Links: 1 Clusters: 0 ctime: 0x5de5d870 0x11104c61 -- Tue Dec 3 11:37:20.286280801 2019 atime: 0x5de5d870 0x113181a1 -- Tue Dec 3 11:37:20.288457121 2019 mtime: 0x5de5d870 0x11104c61 -- Tue Dec 3 11:37:20.286280801 2019 dtime: 0x0 -- Thu Jan 1 08:00:00 1970 ... Block 9: Journal Commit Block Seq: 15 Type: 2 (JBD2_COMMIT_BLOCK) The following is journal recovery log when recovering the upper jbd2 journal when mount again. syslog: ocfs2: File system on device (252,1) was not unmounted cleanly, recovering it. fs/jbd2/recovery.c:(do_one_pass, 449): Starting recovery pass 0 fs/jbd2/recovery.c:(do_one_pass, 449): Starting recovery pass 1 fs/jbd2/recovery.c:(do_one_pass, 449): Starting recovery pass 2 fs/jbd2/recovery.c:(jbd2_journal_recover, 278): JBD2: recovery, exit status 0, recovered transactions 13 to 13 Due to first commit seq 13 recorded in journal super is not consistent with the value recorded in block 1(seq is 14), journal recovery will be terminated before seq 15 even though it is an unbroken commit, inode 8257802 is a new file and it will be lost. Link: http://lkml.kernel.org/r/20191217020140.2197-1-li.kai4@h3c.com Signed-off-by: Kai Li Reviewed-by: Joseph Qi Reviewed-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c77c0a8ac4c522638a8242fcb9de9496e3cdbb2d Author: Waiman Long Date: Sat Jan 4 13:00:15 2020 -0800 mm/hugetlb: defer freeing of huge pages if in non-task context The following lockdep splat was observed when a certain hugetlbfs test was run: ================================ WARNING: inconsistent lock state 4.18.0-159.el8.x86_64+debug #1 Tainted: G W --------- - - -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. swapper/30/0 [HC0[0]:SC1[1]:HE1:SE0] takes: ffffffff9acdc038 (hugetlb_lock){+.?.}, at: free_huge_page+0x36f/0xaa0 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x14f/0x3b0 _raw_spin_lock+0x30/0x70 __nr_hugepages_store_common+0x11b/0xb30 hugetlb_sysctl_handler_common+0x209/0x2d0 proc_sys_call_handler+0x37f/0x450 vfs_write+0x157/0x460 ksys_write+0xb8/0x170 do_syscall_64+0xa5/0x4d0 entry_SYSCALL_64_after_hwframe+0x6a/0xdf irq event stamp: 691296 hardirqs last enabled at (691296): [] _raw_spin_unlock_irqrestore+0x4b/0x60 hardirqs last disabled at (691295): [] _raw_spin_lock_irqsave+0x22/0x81 softirqs last enabled at (691284): [] irq_enter+0xc3/0xe0 softirqs last disabled at (691285): [] irq_exit+0x23e/0x2b0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(hugetlb_lock); lock(hugetlb_lock); *** DEADLOCK *** : Call Trace: __lock_acquire+0x146b/0x48c0 lock_acquire+0x14f/0x3b0 _raw_spin_lock+0x30/0x70 free_huge_page+0x36f/0xaa0 bio_check_pages_dirty+0x2fc/0x5c0 clone_endio+0x17f/0x670 [dm_mod] blk_update_request+0x276/0xe50 scsi_end_request+0x7b/0x6a0 scsi_io_completion+0x1c6/0x1570 blk_done_softirq+0x22e/0x350 __do_softirq+0x23d/0xad8 irq_exit+0x23e/0x2b0 do_IRQ+0x11a/0x200 common_interrupt+0xf/0xf Both the hugetbl_lock and the subpool lock can be acquired in free_huge_page(). One way to solve the problem is to make both locks irq-safe. However, Mike Kravetz had learned that the hugetlb_lock is held for a linear scan of ALL hugetlb pages during a cgroup reparentling operation. So it is just too long to have irq disabled unless we can break hugetbl_lock down into finer-grained locks with shorter lock hold times. Another alternative is to defer the freeing to a workqueue job. This patch implements the deferred freeing by adding a free_hpage_workfn() work function to do the actual freeing. The free_huge_page() call in a non-task context saves the page to be freed in the hpage_freelist linked list in a lockless manner using the llist APIs. The generic workqueue is used to process the work, but a dedicated workqueue can be used instead if it is desirable to have the huge page freed ASAP. Thanks to Kirill Tkhai for suggesting the use of llist APIs which simplfy the code. Link: http://lkml.kernel.org/r/20191217170331.30893-1-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Mike Kravetz Acked-by: Davidlohr Bueso Acked-by: Michal Hocko Reviewed-by: Kirill Tkhai Cc: Aneesh Kumar K.V Cc: Matthew Wilcox Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7c46c0c0e3d62f2764cd08b90934cd2aaaf8545 Author: Navid Emamdoost Date: Sat Jan 4 13:00:12 2020 -0800 mm/gup: fix memory leak in __gup_benchmark_ioctl In the implementation of __gup_benchmark_ioctl() the allocated pages should be released before returning in case of an invalid cmd. Release pages via kvfree(). [akpm@linux-foundation.org: rework code flow, return -EINVAL rather than -1] Link: http://lkml.kernel.org/r/20191211174653.4102-1-navid.emamdoost@gmail.com Fixes: 714a3a1ebafe ("mm/gup_benchmark.c: add additional pinning methods") Signed-off-by: Navid Emamdoost Reviewed-by: Andrew Morton Reviewed-by: Ira Weiny Reviewed-by: John Hubbard Cc: Keith Busch Cc: Kirill A. Shutemov Cc: Dave Hansen Cc: Dan Williams Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 941f762bcb276259a78e7931674668874ccbda59 Author: Ilya Dryomov Date: Sat Jan 4 13:00:09 2020 -0800 mm/oom: fix pgtables units mismatch in Killed process message pr_err() expects kB, but mm_pgtables_bytes() returns the number of bytes. As everything else is printed in kB, I chose to fix the value rather than the string. Before: [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name ... [ 1878] 1000 1878 217253 151144 1269760 0 0 python ... Out of memory: Killed process 1878 (python) total-vm:869012kB, anon-rss:604572kB, file-rss:4kB, shmem-rss:0kB, UID:1000 pgtables:1269760kB oom_score_adj:0 After: [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name ... [ 1436] 1000 1436 217253 151890 1294336 0 0 python ... Out of memory: Killed process 1436 (python) total-vm:869012kB, anon-rss:607516kB, file-rss:44kB, shmem-rss:0kB, UID:1000 pgtables:1264kB oom_score_adj:0 Link: http://lkml.kernel.org/r/20191211202830.1600-1-idryomov@gmail.com Fixes: 70cb6d267790 ("mm/oom: add oom_score_adj and pgtables to Killed process message") Signed-off-by: Ilya Dryomov Reviewed-by: Andrew Morton Acked-by: David Rientjes Acked-by: Michal Hocko Cc: Edward Chron Cc: David Rientjes Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e39e773ad100ac94f8358d862f20101e802ae54c Author: Randy Dunlap Date: Sat Jan 4 13:00:05 2020 -0800 fs/posix_acl.c: fix kernel-doc warnings Fix kernel-doc warnings in fs/posix_acl.c. Also fix one typo (setgit -> setgid). fs/posix_acl.c:647: warning: Function parameter or member 'inode' not described in 'posix_acl_update_mode' fs/posix_acl.c:647: warning: Function parameter or member 'mode_p' not described in 'posix_acl_update_mode' fs/posix_acl.c:647: warning: Function parameter or member 'acl' not described in 'posix_acl_update_mode' Link: http://lkml.kernel.org/r/29b0dc46-1f28-a4e5-b1d0-ba2b65629779@infradead.org Fixes: 073931017b49d ("posix_acl: Clear SGID bit when setting file permissions") Signed-off-by: Randy Dunlap Acked-by: Andreas Gruenbacher Reviewed-by: Jan Kara Cc: Jan Kara Cc: Andreas Gruenbacher Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63e80314ab7cf4783526d2e44ee57a90514911c9 Author: Nick Desaulniers Date: Sat Jan 4 13:00:02 2020 -0800 hexagon: work around compiler crash Clang cannot translate the string "r30" into a valid register yet. Link: https://github.com/ClangBuiltLinux/linux/issues/755 Link: http://lkml.kernel.org/r/20191028155722.23419-1-ndesaulniers@google.com Signed-off-by: Nick Desaulniers Suggested-by: Sid Manning Reviewed-by: Brian Cain Cc: Allison Randal Cc: Greg Kroah-Hartman Cc: Richard Fontana Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 780a0cfda9006a9a22d6473c2d4c527f5c68eb2e Author: Nick Desaulniers Date: Sat Jan 4 12:59:59 2020 -0800 hexagon: parenthesize registers in asm predicates Hexagon requires that register predicates in assembly be parenthesized. Link: https://github.com/ClangBuiltLinux/linux/issues/754 Link: http://lkml.kernel.org/r/20191209222956.239798-3-ndesaulniers@google.com Signed-off-by: Nick Desaulniers Suggested-by: Sid Manning Acked-by: Brian Cain Cc: Lee Jones Cc: Andy Shevchenko Cc: Tuowen Zhao Cc: Mika Westerberg Cc: Luis Chamberlain Cc: Greg Kroah-Hartman Cc: Alexios Zavras Cc: Allison Randal Cc: Will Deacon Cc: Richard Fontana Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Boqun Feng Cc: Ingo Molnar Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 213921f967cf44a7bceaee5535ff1d0196885076 Author: Eric Biggers Date: Sat Jan 4 12:59:55 2020 -0800 fs/namespace.c: make to_mnt_ns() static Make to_mnt_ns() static to address the following 'sparse' warning: fs/namespace.c:1731:22: warning: symbol 'to_mnt_ns' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20191209234830.156260-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7bebd69ecf10787e6b9559ab780496f54943cc21 Author: Eric Biggers Date: Sat Jan 4 12:59:52 2020 -0800 fs/nsfs.c: include headers for missing declarations Include linux/proc_fs.h and fs/internal.h to address the following 'sparse' warnings: fs/nsfs.c:41:32: warning: symbol 'ns_dentry_operations' was not declared. Should it be static? fs/nsfs.c:145:5: warning: symbol 'open_related_ns' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20191209234822.156179-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b16155a0b01ae999add72b2ad2791b9c66285880 Author: Eric Biggers Date: Sat Jan 4 12:59:49 2020 -0800 fs/direct-io.c: include fs/internal.h for missing prototype Include fs/internal.h to address the following 'sparse' warning: fs/direct-io.c:591:5: warning: symbol 'sb_init_dio_done_wq' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20191209234544.128302-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Reviewed-by: Jan Kara Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0153fc2c7606f101392b682e720a7a456d6c766 Author: Yang Shi Date: Sat Jan 4 12:59:46 2020 -0800 mm: move_pages: return valid node id in status if the page is already on the target node Felix Abecassis reports move_pages() would return random status if the pages are already on the target node by the below test program: int main(void) { const long node_id = 1; const long page_size = sysconf(_SC_PAGESIZE); const int64_t num_pages = 8; unsigned long nodemask = 1 << node_id; long ret = set_mempolicy(MPOL_BIND, &nodemask, sizeof(nodemask)); if (ret < 0) return (EXIT_FAILURE); void **pages = malloc(sizeof(void*) * num_pages); for (int i = 0; i < num_pages; ++i) { pages[i] = mmap(NULL, page_size, PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_POPULATE | MAP_ANONYMOUS, -1, 0); if (pages[i] == MAP_FAILED) return (EXIT_FAILURE); } ret = set_mempolicy(MPOL_DEFAULT, NULL, 0); if (ret < 0) return (EXIT_FAILURE); int *nodes = malloc(sizeof(int) * num_pages); int *status = malloc(sizeof(int) * num_pages); for (int i = 0; i < num_pages; ++i) { nodes[i] = node_id; status[i] = 0xd0; /* simulate garbage values */ } ret = move_pages(0, num_pages, pages, nodes, status, MPOL_MF_MOVE); printf("move_pages: %ld\n", ret); for (int i = 0; i < num_pages; ++i) printf("status[%d] = %d\n", i, status[i]); } Then running the program would return nonsense status values: $ ./move_pages_bug move_pages: 0 status[0] = 208 status[1] = 208 status[2] = 208 status[3] = 208 status[4] = 208 status[5] = 208 status[6] = 208 status[7] = 208 This is because the status is not set if the page is already on the target node, but move_pages() should return valid status as long as it succeeds. The valid status may be errno or node id. We can't simply initialize status array to zero since the pages may be not on node 0. Fix it by updating status with node id which the page is already on. Link: http://lkml.kernel.org/r/1575584353-125392-1-git-send-email-yang.shi@linux.alibaba.com Fixes: a49bd4d71637 ("mm, numa: rework do_pages_move") Signed-off-by: Yang Shi Reported-by: Felix Abecassis Tested-by: Felix Abecassis Suggested-by: Michal Hocko Reviewed-by: John Hubbard Acked-by: Christoph Lameter Acked-by: Michal Hocko Reviewed-by: Vlastimil Babka Cc: Mel Gorman Cc: [4.17+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84029fd04c201a4c7e0b07ba262664900f47c6f5 Author: Shakeel Butt Date: Sat Jan 4 12:59:43 2020 -0800 memcg: account security cred as well to kmemcg The cred_jar kmem_cache is already memcg accounted in the current kernel but cred->security is not. Account cred->security to kmemcg. Recently we saw high root slab usage on our production and on further inspection, we found a buggy application leaking processes. Though that buggy application was contained within its memcg but we observe much more system memory overhead, couple of GiBs, during that period. This overhead can adversely impact the isolation on the system. One source of high overhead we found was cred->security objects, which have a lifetime of at least the life of the process which allocated them. Link: http://lkml.kernel.org/r/20191205223721.40034-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Chris Down Reviewed-by: Roman Gushchin Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a69b83e1ae7f6c5ff2cc310870c1708405d86be2 Author: Andrey Konovalov Date: Sat Jan 4 12:59:39 2020 -0800 kcov: fix struct layout for kcov_remote_arg Make the layout of kcov_remote_arg the same for 32-bit and 64-bit code. This makes it more convenient to write userspace apps that can be compiled into 32-bit or 64-bit binaries and still work with the same 64-bit kernel. Also use proper __u32 types in uapi headers instead of unsigned ints. Link: http://lkml.kernel.org/r/9e91020876029cfefc9211ff747685eba9536426.1575638983.git.andreyknvl@google.com Fixes: eec028c9386ed1a ("kcov: remote coverage support") Signed-off-by: Andrey Konovalov Acked-by: Marco Elver Cc: Greg Kroah-Hartman Cc: Alan Stern Cc: Felipe Balbi Cc: Chunfeng Yun Cc: "Jacky . Cao @ sony . com" Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ac8f05da5174c560de122c499ce5dfb5d0dfbee5 Author: Chanho Min Date: Sat Jan 4 12:59:36 2020 -0800 mm/zsmalloc.c: fix the migrated zspage statistics. When zspage is migrated to the other zone, the zone page state should be updated as well, otherwise the NR_ZSPAGE for each zone shows wrong counts including proc/zoneinfo in practice. Link: http://lkml.kernel.org/r/1575434841-48009-1-git-send-email-chanho.min@lge.com Fixes: 91537fee0013 ("mm: add NR_ZSMALLOC to vmstat") Signed-off-by: Chanho Min Signed-off-by: Jinsuk Choi Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: [4.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit feee6b2989165631b17ac6d4ccdbf6759254e85a Author: David Hildenbrand Date: Sat Jan 4 12:59:33 2020 -0800 mm/memory_hotplug: shrink zones when offlining memory We currently try to shrink a single zone when removing memory. We use the zone of the first page of the memory we are removing. If that memmap was never initialized (e.g., memory was never onlined), we will read garbage and can trigger kernel BUGs (due to a stale pointer): BUG: unable to handle page fault for address: 000000000000353d #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP PTI CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 5.3.0-rc5-next-20190820+ #317 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.4 Workqueue: kacpi_hotplug acpi_hotplug_work_fn RIP: 0010:clear_zone_contiguous+0x5/0x10 Code: 48 89 c6 48 89 c3 e8 2a fe ff ff 48 85 c0 75 cf 5b 5d c3 c6 85 fd 05 00 00 01 5b 5d c3 0f 1f 840 RSP: 0018:ffffad2400043c98 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000200000000 RCX: 0000000000000000 RDX: 0000000000200000 RSI: 0000000000140000 RDI: 0000000000002f40 RBP: 0000000140000000 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000140000 R13: 0000000000140000 R14: 0000000000002f40 R15: ffff9e3e7aff3680 FS: 0000000000000000(0000) GS:ffff9e3e7bb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000353d CR3: 0000000058610000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __remove_pages+0x4b/0x640 arch_remove_memory+0x63/0x8d try_remove_memory+0xdb/0x130 __remove_memory+0xa/0x11 acpi_memory_device_remove+0x70/0x100 acpi_bus_trim+0x55/0x90 acpi_device_hotplug+0x227/0x3a0 acpi_hotplug_work_fn+0x1a/0x30 process_one_work+0x221/0x550 worker_thread+0x50/0x3b0 kthread+0x105/0x140 ret_from_fork+0x3a/0x50 Modules linked in: CR2: 000000000000353d Instead, shrink the zones when offlining memory or when onlining failed. Introduce and use remove_pfn_range_from_zone(() for that. We now properly shrink the zones, even if we have DIMMs whereby - Some memory blocks fall into no zone (never onlined) - Some memory blocks fall into multiple zones (offlined+re-onlined) - Multiple memory blocks that fall into different zones Drop the zone parameter (with a potential dubious value) from __remove_pages() and __remove_section(). Link: http://lkml.kernel.org/r/20191006085646.5768-6-david@redhat.com Fixes: f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded memory to zones until online") [visible after d0dc12e86b319] Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Aneesh Kumar K.V" Cc: Pavel Tatashin Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: Logan Gunthorpe Cc: [5.0+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5613970af3f5f8372c596b138bd64f3918513515 Merge: 50978df311d8 b0b5ce1010ff Author: Linus Torvalds Date: Sat Jan 4 10:49:15 2020 -0800 Merge tag 'dmaengine-fix-5.5-rc5' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "A bunch of fixes for: - uninitialized dma_slave_caps access - virt-dma use after free in vchan_complete() - driver fixes for ioat, k3dma and jz4780" * tag 'dmaengine-fix-5.5-rc5' of git://git.infradead.org/users/vkoul/slave-dma: ioat: ioat_alloc_ring() failure handling. dmaengine: virt-dma: Fix access after free in vchan_complete() dmaengine: k3dma: Avoid null pointer traversal dmaengine: dma-jz4780: Also break descriptor chains on JZ4725B dmaengine: Fix access to uninitialized dma_slave_caps commit 50978df311d85ebf7e6c46e02745315e1ce63d32 Merge: 3a562aee727a ce644cf3fa06 Author: Linus Torvalds Date: Sat Jan 4 10:41:08 2020 -0800 Merge tag 'media/v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - some fixes at CEC core to comply with HDMI 2.0 specs and fix some border cases - a fix at the transmission logic of the pulse8-cec driver - one alignment fix on a data struct at ipu3 when built with 32 bits * tag 'media/v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: intel-ipu3: Align struct ipu3_uapi_awb_fr_config_s to 32 bytes media: pulse8-cec: fix lost cec_transmit_attempt_done() call media: cec: check 'transmit_in_progress', not 'transmitting' media: cec: avoid decrementing transmit_queue_sz if it is 0 media: cec: CEC 2.0-only bcast messages were ignored commit 51d4efab7865e6ea6a4ebcd25b3f03c019515c4c Author: Takashi Iwai Date: Sat Jan 4 12:09:36 2020 +0100 ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5 Bose Companion 5 (with USB ID 05a7:1020) doesn't seem supporting reading back the sample rate, so the existing quirk is needed. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206063 Cc: Link: https://lore.kernel.org/r/20200104110936.14288-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6d9ffcff646bbd0ede6c2a59f4cd28414ecec6e0 Author: Kailang Yang Date: Fri Jan 3 16:24:06 2020 +0800 ALSA: hda/realtek - Add new codec supported for ALCS1200A Add ALCS1200A supported. It was similar as ALC900. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/a9bd3cdaa02d4fa197623448d5c51e50@realtek.com Signed-off-by: Takashi Iwai commit f01f4ffdfb703694035870f94b10f6ef2523f8de Author: Alexandre Belloni Date: Sat Jan 4 05:31:10 2020 +0100 rtc: cmos: Revert "rtc: Fix the AltCentury value on AMD/Hygon platform" There are multiple reports of this patch breaking RTC time setting for AMD platforms. This reverts commit 7ad295d5196a58c22abecef62dd4f99e2f86e831. Cc: Jinke Fan Link: https://lore.kernel.org/r/CABXGCsMLob0DC25JS8wwAYydnDoHBSoMh2_YLPfqm3TTvDE-Zw@mail.gmail.com Fixes: 7ad295d5196a ("rtc: Fix the AltCentury value on AMD/Hygon platform") Link: https://lore.kernel.org/r/20200104043110.707810-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 8bee8084ba03d59004103502c3002bb5c05a129f Merge: fd6988496e79 ee8598ae527e Author: Linus Walleij Date: Sat Jan 4 00:13:24 2020 +0100 Merge tag 'gpio-fixes-for-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.5-rc5 - fix coding style issues introduced in gpio-mockup during merge window commit c4e4fccc5d52d881afaac11d3353265ef4eccb8b Author: Wayne Lin Date: Fri Jan 3 13:50:01 2020 +0800 drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ [Why] According to DP spec, it should shift left 4 digits for NO_STOP_BIT in REMOTE_I2C_READ message. Not 5 digits. In current code, NO_STOP_BIT is always set to zero which means I2C master is always generating a I2C stop at the end of each I2C write transaction while handling REMOTE_I2C_READ sideband message. This issue might have the generated I2C signal not meeting the requirement. Take random read in I2C for instance, I2C master should generate a repeat start to start to read data after writing the read address. This issue will cause the I2C master to generate a stop-start rather than a re-start which is not expected in I2C random read. [How] Correct the shifting value of NO_STOP_BIT for DP_REMOTE_I2C_READ case in drm_dp_encode_sideband_req(). Changes since v1:(https://patchwork.kernel.org/patch/11312667/) * Add more descriptions in commit and cc to stable Fixes: ad7f8a1f9ced ("drm/helper: add Displayport multi-stream helper (v0.6)") Reviewed-by: Harry Wentland Signed-off-by: Wayne Lin Cc: stable@vger.kernel.org Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200103055001.10287-1-Wayne.Lin@amd.com commit b2ff0d510182eb5cc05a65d1b2371af62c4b170c Author: Kaike Wan Date: Thu Dec 19 18:19:20 2019 -0500 IB/hfi1: Adjust flow PSN with the correct resync_psn When a TID RDMA ACK to RESYNC request is received, the flow PSNs for pending TID RDMA WRITE segments will be adjusted with the next flow generation number, based on the resync_psn value extracted from the flow PSN of the TID RDMA ACK packet. The resync_psn value indicates the last flow PSN for which a TID RDMA WRITE DATA packet has been received by the responder and the requester should resend TID RDMA WRITE DATA packets, starting from the next flow PSN. However, if resync_psn points to the last flow PSN for a segment and the next segment flow PSN starts with a new generation number, use of the old resync_psn to adjust the flow PSN for the next segment will lead to miscalculation, resulting in WARN_ON and sge rewinding errors: WARNING: CPU: 4 PID: 146961 at /nfs/site/home/phcvs2/gitrepo/ifs-all/components/Drivers/tmp/rpmbuild/BUILD/ifs-kernel-updates-3.10.0_957.el7.x86_64/hfi1/tid_rdma.c:4764 hfi1_rc_rcv_tid_rdma_ack+0x8f6/0xa90 [hfi1] Modules linked in: ib_ipoib(OE) hfi1(OE) rdmavt(OE) rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfsv3 nfs_acl nfs lockd grace fscache iTCO_wdt iTCO_vendor_support skx_edac intel_powerclamp coretemp intel_rapl iosf_mbi kvm irqbypass crc32_pclmul ghash_clmulni_intel ib_isert iscsi_target_mod target_core_mod aesni_intel lrw gf128mul glue_helper ablk_helper cryptd rpcrdma sunrpc opa_vnic ast ttm ib_iser libiscsi drm_kms_helper scsi_transport_iscsi ipmi_ssif syscopyarea sysfillrect sysimgblt fb_sys_fops drm joydev ipmi_si pcspkr sg drm_panel_orientation_quirks ipmi_devintf lpc_ich i2c_i801 ipmi_msghandler wmi rdma_ucm ib_ucm ib_uverbs acpi_cpufreq acpi_power_meter ib_umad rdma_cm ib_cm iw_cm ip_tables ext4 mbcache jbd2 sd_mod crc_t10dif crct10dif_generic crct10dif_pclmul i2c_algo_bit crct10dif_common crc32c_intel e1000e ib_core ahci libahci ptp libata pps_core nfit libnvdimm [last unloaded: rdmavt] CPU: 4 PID: 146961 Comm: kworker/4:0H Kdump: loaded Tainted: G W OE ------------ 3.10.0-957.el7.x86_64 #1 Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.0X.02.0117.040420182310 04/04/2018 Workqueue: hfi0_0 _hfi1_do_tid_send [hfi1] Call Trace: [] dump_stack+0x19/0x1b [] __warn+0xd8/0x100 [] warn_slowpath_null+0x1d/0x20 [] hfi1_rc_rcv_tid_rdma_ack+0x8f6/0xa90 [hfi1] [] hfi1_kdeth_eager_rcv+0x1dc/0x210 [hfi1] [] ? hfi1_kdeth_expected_rcv+0x1ef/0x210 [hfi1] [] kdeth_process_eager+0x35/0x90 [hfi1] [] handle_receive_interrupt_nodma_rtail+0x17a/0x2b0 [hfi1] [] receive_context_interrupt+0x23/0x40 [hfi1] [] __handle_irq_event_percpu+0x44/0x1c0 [] handle_irq_event_percpu+0x32/0x80 [] handle_irq_event+0x3c/0x60 [] handle_edge_irq+0x7f/0x150 [] handle_irq+0xe4/0x1a0 [] do_IRQ+0x4d/0xf0 [] common_interrupt+0x162/0x162 [] ? swiotlb_map_page+0x49/0x150 [] hfi1_verbs_send_dma+0x291/0xb70 [hfi1] [] ? hfi1_wait_kmem+0xf0/0xf0 [hfi1] [] hfi1_verbs_send+0x126/0x2b0 [hfi1] [] _hfi1_do_tid_send+0x1d3/0x320 [hfi1] [] process_one_work+0x17f/0x440 [] worker_thread+0x126/0x3c0 [] ? manage_workers.isra.25+0x2a0/0x2a0 [] kthread+0xd1/0xe0 [] ? insert_kthread_work+0x40/0x40 [] ret_from_fork_nospec_begin+0x7/0x21 [] ? insert_kthread_work+0x40/0x40 This patch fixes the issue by adjusting the resync_psn first if the flow generation has been advanced for a pending segment. Fixes: 9e93e967f7b4 ("IB/hfi1: Add a function to receive TID RDMA ACK packet") Link: https://lore.kernel.org/r/20191219231920.51069.37147.stgit@awfm-01.aw.intel.com Cc: Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit ca9033ba69c7e3477f207df69867b2ea969197c8 Author: Kaike Wan Date: Thu Dec 19 16:19:41 2019 -0500 IB/hfi1: Don't cancel unused work item In the iowait structure, two iowait_work entries were included to queue a given object: one for normal IB operations, and the other for TID RDMA operations. For non-TID RDMA operations, the iowait_work structure for TID RDMA is initialized to contain a NULL function (not used). When the QP is reset, the function iowait_cancel_work will be called to cancel any pending work. The problem is that this function will call cancel_work_sync() for both iowait_work entries, even though the one for TID RDMA is not used at all. Eventually, the call cascades to __flush_work(), wherein a WARN_ON will be triggered due to the fact that work->func is NULL. The WARN_ON was introduced in commit 4d43d395fed1 ("workqueue: Try to catch flush_work() without INIT_WORK().") This patch fixes the issue by making sure that a work function is present for TID RDMA before calling cancel_work_sync in iowait_cancel_work. Fixes: 4d43d395fed1 ("workqueue: Try to catch flush_work() without INIT_WORK().") Fixes: 5da0fc9dbf89 ("IB/hfi1: Prepare resource waits for dual leg") Link: https://lore.kernel.org/r/20191219211941.58387.39883.stgit@awfm-01.aw.intel.com Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit b54ef37b1ce892fdf6b632d566246d2f2f539910 Author: Liran Alon Date: Fri Jan 3 18:44:59 2020 +0200 net: Google gve: Remove dma_wmb() before ringing doorbell Current code use dma_wmb() to ensure Rx/Tx descriptors are visible to device before writing to doorbell. However, these dma_wmb() are wrong and unnecessary. Therefore, they should be removed. iowrite32be() called from gve_rx_write_doorbell()/gve_tx_put_doorbell() should guaratee that all previous writes to WB/UC memory is visible to device before the write done by iowrite32be(). E.g. On ARM64, iowrite32be() calls __iowmb() which expands to dma_wmb() and only then calls __raw_writel(). Reviewed-by: Si-Wei Liu Signed-off-by: Liran Alon Signed-off-by: David S. Miller commit eed70fd9452fe0fcd1a221731a4333b51a8081f2 Author: Russell King Date: Fri Jan 3 15:13:56 2020 +0000 net: phylink: fix failure to register on x86 systems The kernel test robot reports a boot failure with qemu in 5.5-rc, referencing commit 2203cbf2c8b5 ("net: sfp: move fwnode parsing into sfp-bus layer"). This is caused by phylink_create() being passed a NULL fwnode, causing fwnode_property_get_reference_args() to return -EINVAL. Don't attempt to attach to a SFP bus if we have no fwnode, which avoids this issue. Reported-by: kernel test robot Fixes: 2203cbf2c8b5 ("net: sfp: move fwnode parsing into sfp-bus layer") Signed-off-by: Russell King Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e64b274c95e8b59a74f9398b48422cdcab70dd86 Author: Jesper Dangaard Brouer Date: Fri Jan 3 13:36:22 2020 +0100 doc/net: Update git https URLs in netdev-FAQ documentation DaveM's git tree have been moved into a named subdir 'netdev' to deal with allowing Jakub Kicinski to help co-maintain the trees. Link: https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit cc7e3f63d7299dd1119be39aa187b867d6f8aa17 Author: Hangbin Liu Date: Fri Jan 3 15:41:24 2020 +0800 selftests: loopback.sh: skip this test if the driver does not support The loopback feature is only supported on a few drivers like broadcom, mellanox, etc. The default veth driver has not supported it yet. To avoid returning failed and making the runner feel confused, let's just skip the test on drivers that not support loopback. Fixes: ad11340994d5 ("selftests: Add loopback test") Signed-off-by: Hangbin Liu Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 72879ee0c53e2fc17f443f7b1adcc0d5130cd934 Author: Colin Ian King Date: Sat Dec 21 15:48:25 2019 +0000 tracing: Fix indentation issue There is a declaration that is indented one level too deeply, remove the extraneous tab. Link: http://lkml.kernel.org/r/20191221154825.33073-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (VMware) commit 3a562aee727a7bfbb3a37b1aa934118397dad701 Merge: b6b4aafc99d7 de7999afedff Author: Linus Torvalds Date: Fri Jan 3 12:20:21 2020 -0800 Merge tag 'for-5.5-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few fixes for btrfs: - blkcg accounting problem with compression that could stall writes - setting up blkcg bio for compression crashes due to NULL bdev pointer - fix possible infinite loop in writeback for nocow files (here possible means almost impossible, 13 things that need to happen to trigger it)" * tag 'for-5.5-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix infinite loop during nocow writeback due to race btrfs: fix compressed write bio blkcg attribution btrfs: punt all bios created in btrfs_submit_compressed_write() commit b6b4aafc99d7c8dbf7d9429bf054b591daab1ad0 Merge: bed723519a72 c7d776f85dfe Author: Linus Torvalds Date: Fri Jan 3 12:11:30 2020 -0800 Merge tag 'block-5.5-20200103' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Three fixes in here: - Fix for a missing split on default memory boundary mask (4G) (Ming) - Fix for multi-page read bio truncate (Ming) - Fix for null_blk zone close request handling (Damien)" * tag 'block-5.5-20200103' of git://git.kernel.dk/linux-block: null_blk: Fix REQ_OP_ZONE_CLOSE handling block: fix splitting segments on boundary masks block: add bio_truncate to fix guard_bio_eod commit c5275723580922e5f3264f96751337661a153c7d Author: Selvin Xavier Date: Mon Nov 25 00:39:30 2019 -0800 RDMA/bnxt_re: Fix Send Work Entry state check while polling completions Some adapters need a fence Work Entry to handle retransmission. Currently the driver checks for this condition, only if the Send queue entry is signalled. Implement the condition check, irrespective of the signalled state of the Work queue entries Failure to add the fence can result in access to memory that is already marked as completed, triggering data corruption, transmission failure, IOMMU failures, etc. Fixes: 9152e0b722b2 ("RDMA/bnxt_re: HW workarounds for handling specific conditions") Link: https://lore.kernel.org/r/1574671174-5064-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit bed723519a72c0f68fbfaf68ed5bf55d04e46566 Merge: d9c82fd8c897 8ffdc54b6f4c Author: Linus Torvalds Date: Fri Jan 3 11:21:25 2020 -0800 Merge tag 'kbuild-fixes-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix build error in usr/gen_initramfs_list.sh - fix libelf-dev dependency in deb-pkg build * tag 'kbuild-fixes-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild/deb-pkg: annotate libelf-dev dependency as :native gen_initramfs_list.sh: fix 'bad variable name' error commit 9a4467a6b282a299b932608ac2c9034f8415359f Author: Selvin Xavier Date: Mon Nov 25 00:39:29 2019 -0800 RDMA/bnxt_re: Avoid freeing MR resources if dereg fails The driver returns an error code for MR dereg, but frees the MR structure. When the MR dereg is retried due to previous error, the system crashes as the structure is already freed. BUG: unable to handle kernel NULL pointer dereference at 00000000000001b8 PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 7 PID: 12178 Comm: ib_send_bw Kdump: loaded Not tainted 4.18.0-124.el8.x86_64 #1 Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 1.1.10 03/10/2015 RIP: 0010:__dev_printk+0x2a/0x70 Code: 0f 1f 44 00 00 49 89 d1 48 85 f6 0f 84 f6 2b 00 00 4c 8b 46 70 4d 85 c0 75 04 4c 8b 46 10 48 8b 86 a8 00 00 00 48 85 c0 74 16 <48> 8b 08 0f be 7f 01 48 c7 c2 13 ac ac 83 83 ef 30 e9 10 fe ff ff RSP: 0018:ffffaf7c04607a60 EFLAGS: 00010006 RAX: 00000000000001b8 RBX: ffffa0010c91c488 RCX: 0000000000000246 RDX: ffffaf7c04607a68 RSI: ffffa0010c91caa8 RDI: ffffffff83a788eb RBP: ffffaf7c04607ac8 R08: 0000000000000000 R09: ffffaf7c04607a68 R10: 0000000000000000 R11: 0000000000000001 R12: ffffaf7c04607b90 R13: 000000000000000e R14: 0000000000000000 R15: 00000000ffffa001 FS: 0000146fa1f1cdc0(0000) GS:ffffa0012fac0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000001b8 CR3: 000000007680a003 CR4: 00000000001606e0 Call Trace: dev_err+0x6c/0x90 ? dev_printk_emit+0x4e/0x70 bnxt_qplib_rcfw_send_message+0x594/0x660 [bnxt_re] ? dev_err+0x6c/0x90 bnxt_qplib_free_mrw+0x80/0xe0 [bnxt_re] bnxt_re_dereg_mr+0x2e/0xd0 [bnxt_re] ib_dereg_mr+0x2f/0x50 [ib_core] destroy_hw_idr_uobject+0x20/0x70 [ib_uverbs] uverbs_destroy_uobject+0x2e/0x170 [ib_uverbs] __uverbs_cleanup_ufile+0x6e/0x90 [ib_uverbs] uverbs_destroy_ufile_hw+0x61/0x130 [ib_uverbs] ib_uverbs_close+0x1f/0x80 [ib_uverbs] __fput+0xb7/0x230 task_work_run+0x8a/0xb0 do_exit+0x2da/0xb40 ... RIP: 0033:0x146fa113a387 Code: Bad RIP value. RSP: 002b:00007fff945d1478 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff02 RAX: 0000000000000000 RBX: 000055a248908d70 RCX: 0000000000000000 RDX: 0000146fa1f2b000 RSI: 0000000000000001 RDI: 000055a248906488 RBP: 000055a248909630 R08: 0000000000010000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 000055a248906488 R13: 0000000000000001 R14: 0000000000000000 R15: 000055a2489095f0 Do not free the MR structures, when driver returns error to the stack. Fixes: 872f3578241d ("RDMA/bnxt_re: Add support for MRs with Huge pages") Link: https://lore.kernel.org/r/1574671174-5064-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit d9c82fd8c89766f2cf1e667f663e8e8c25c12aee Merge: 6f2e9c3d2816 43cf75d96409 Author: Linus Torvalds Date: Fri Jan 3 11:17:14 2020 -0800 Merge tag 'for-linus-2020-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread fixes from Christian Brauner: "Here are two fixes: - Panic earlier when global init exits to generate useable coredumps. Currently, when global init and all threads in its thread-group have exited we panic via: do_exit() -> exit_notify() -> forget_original_parent() -> find_child_reaper() This makes it hard to extract a useable coredump for global init from a kernel crashdump because by the time we panic exit_mm() will have already released global init's mm. We now panic slightly earlier. This has been a problem in certain environments such as Android. - Fix a race in assigning and reading taskstats for thread-groups with more than one thread. This patch has been waiting for quite a while since people disagreed on what the correct fix was at first" * tag 'for-linus-2020-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: exit: panic before exit_mm() on global init exit taskstats: fix data-race commit 6f2e9c3d28167b0f27d4be68e9101a9ecf397878 Merge: e35d0165908a 6da3eced8c5f Author: Linus Torvalds Date: Fri Jan 3 11:13:50 2020 -0800 Merge tag 'powerpc-5.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Two more powerpc fixes for 5.5: - One commit to fix a build error when CONFIG_JUMP_LABEL=n, introduced by our recent fix to is_shared_processor(). - A commit marking some SLB related functions as notrace, as tracing them triggers warnings. Thanks to Jason A Donenfeld" * tag 'powerpc-5.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/spinlocks: Include correct header for static key powerpc/mm: Mark get_slice_psize() & slice_addr_is_low() as notrace commit e35d0165908ad2d2bdb76773ef77b551763eedbd Merge: ca78fdeb00fa 48e01504cf53 Author: Linus Torvalds Date: Fri Jan 3 11:10:31 2020 -0800 Merge tag 'sound-5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Nothing to worry at this stage but all nice small changes: - A regression fix for AMD GPU detection in HD-audio - A long-standing sleep-in-atomic fix for an ice1724 device - Usual suspects, the device-specific quirks for HD- and USB-audio" * tag 'sound-5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support code ALSA: hda/realtek - Add Bass Speaker and fixed dac for bass speaker ALSA: hda - Apply sync-write workaround to old Intel platforms, too ALSA: hda/hdmi - fix atpx_present when CLASS is not VGA ALSA: usb-audio: fix set_format altsetting sanity check ALSA: hda/realtek - Add headset Mic no shutup for ALC283 ALSA: usb-audio: set the interface format after resume on Dell WD19 commit ca78fdeb00fa656f09afee977750e85da929d259 Merge: 15f0ec941f4f a6204fc7b83c Author: Linus Torvalds Date: Fri Jan 3 11:08:30 2020 -0800 Merge tag 'drm-fixes-2020-01-03' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "New Years fixes! Mostly amdgpu with a light smattering of arm graphics, and two AGP warning fixes. Quiet as expected, hopefully we don't get a post holiday rush. agp: - two unused variable removed amdgpu: - ATPX regression fix - SMU metrics table locking fixes - gfxoff fix for raven - RLC firmware loading stability fix mediatek: - external display fix - dsi timing fix sun4i: - Fix double-free in connector/encoder cleanup (Stefan) maildp: - Make vtable static (Ben)" * tag 'drm-fixes-2020-01-03' of git://anongit.freedesktop.org/drm/drm: agp: remove unused variable arqsz in agp_3_5_enable() agp: remove unused variable mcapndx drm/amdgpu: correct RLC firmwares loading sequence drm/amdgpu: enable gfxoff for raven1 refresh drm/amdgpu/smu: add metrics table lock for vega20 (v2) drm/amdgpu/smu: add metrics table lock for navi (v2) drm/amdgpu/smu: add metrics table lock for arcturus (v2) drm/amdgpu/smu: add metrics table lock Revert "drm/amdgpu: simplify ATPX detection" drm/arm/mali: make malidp_mw_connector_helper_funcs static drm/sun4i: hdmi: Remove duplicate cleanup calls drm/mediatek: reduce the hbp and hfp for phy timing drm/mediatek: Fix can't get component for external display plane. drm/mediatek: Check return value of mtk_drm_ddp_comp_for_plane. commit 15f0ec941f4f908fefa23a30ded8358977cc1cc0 Author: Jan Stancek Date: Fri Jan 3 18:37:18 2020 +0100 mm/hugetlbfs: fix for_each_hstate() loop in init_hugetlbfs_fs() LTP memfd_create04 started failing for some huge page sizes after v5.4-10135-gc3bfc5dd73c6. The problem is the check introduced to for_each_hstate() loop that should skip default_hstate_idx. Since it doesn't update 'i' counter, all subsequent huge page sizes are skipped as well. Fixes: 8fc312b32b25 ("mm/hugetlbfs: fix error handling when setting up mounts") Signed-off-by: Jan Stancek Reviewed-by: Mike Kravetz Signed-off-by: Linus Torvalds commit 50f9ad607ea891a9308e67b81f774c71736d1098 Author: Kaitao Cheng Date: Tue Dec 31 05:35:30 2019 -0800 kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail In the function, if register_trace_sched_migrate_task() returns error, sched_switch/sched_wakeup_new/sched_wakeup won't unregister. That is why fail_deprobe_sched_switch was added. Link: http://lkml.kernel.org/r/20191231133530.2794-1-pilgrimtao@gmail.com Cc: stable@vger.kernel.org Fixes: 478142c39c8c2 ("tracing: do not grab lock in wakeup latency function tracing") Signed-off-by: Kaitao Cheng Signed-off-by: Steven Rostedt (VMware) commit ee8598ae527ea0408e440c073e0945fc37488fe6 Author: Bartosz Golaszewski Date: Mon Dec 16 17:37:10 2019 +0100 gpio: mockup: fix coding style I have missed two indentation issues in commit 64e7112ee307 ("gpio: mockup: add set_config to support pull up/down"). This commit fixes them. Fixes: 64e7112ee307 ("gpio: mockup: add set_config to support pull up/down") Signed-off-by: Bartosz Golaszewski commit bf44f488e168368cae4139b4b33c3d0aaa11679c Author: Joel Fernandes (Google) Date: Thu Jan 2 14:46:25 2020 -0500 tracing: Change offset type to s32 in preempt/irq tracepoints Discussion in the below link reported that symbols in modules can appear to be before _stext on ARM architecture, causing wrapping with the offsets of this tracepoint. Change the offset type to s32 to fix this. Link: http://lore.kernel.org/r/20191127154428.191095-1-antonio.borneo@st.com Link: http://lkml.kernel.org/r/20200102194625.226436-1-joel@joelfernandes.org Cc: Bjorn Helgaas Cc: David Sterba Cc: Ingo Molnar Cc: Mike Rapoport Cc: "Rafael J. Wysocki" Cc: Sakari Ailus Cc: Antonio Borneo Cc: stable@vger.kernel.org Fixes: d59158162e032 ("tracing: Add support for preempt and irq enable/disable events") Signed-off-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit 8ffdc54b6f4cd718a45802e645bb853e3a46a078 Author: Ard Biesheuvel Date: Mon Dec 30 15:07:47 2019 +0100 kbuild/deb-pkg: annotate libelf-dev dependency as :native Cross compiling the x86 kernel on a non-x86 build machine produces the following error when CONFIG_UNWINDER_ORC is enabled, regardless of whether libelf-dev is installed or not. dpkg-checkbuilddeps: error: Unmet build dependencies: libelf-dev dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting dpkg-buildpackage: warning: (Use -d flag to override.) Since this is a build time dependency for a build tool, we need to depend on the native version of libelf-dev so add the appropriate annotation. Signed-off-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada commit cc976614f59bd8e45de8ce988a6bcb5de711d994 Author: Masahiro Yamada Date: Mon Dec 30 22:20:06 2019 +0900 gen_initramfs_list.sh: fix 'bad variable name' error Prior to commit 858805b336be ("kbuild: add $(BASH) to run scripts with bash-extension"), this shell script was almost always run by bash since bash is usually installed on the system by default. Now, this script is run by sh, which might be a symlink to dash. On such distributions, the following code emits an error: local dev=`LC_ALL=C ls -l "${location}"` You can reproduce the build error, for example by setting CONFIG_INITRAMFS_SOURCE="/dev". GEN usr/initramfs_data.cpio.gz ./usr/gen_initramfs_list.sh: 131: local: 1: bad variable name make[1]: *** [usr/Makefile:61: usr/initramfs_data.cpio.gz] Error 2 This is because `LC_ALL=C ls -l "${location}"` contains spaces. Surrounding it with double-quotes fixes the error. Fixes: 858805b336be ("kbuild: add $(BASH) to run scripts with bash-extension") Reported-by: Jory A. Pratt Signed-off-by: Masahiro Yamada commit ce644cf3fa06504c2c71ab1b794160d54aaccbc0 Author: Sakari Ailus Date: Wed Nov 6 12:57:07 2019 +0100 media: intel-ipu3: Align struct ipu3_uapi_awb_fr_config_s to 32 bytes A struct that needs to be aligned to 32 bytes has a size of 28. Increase the size to 32. This makes elements of arrays of this struct aligned to 32 as well, and other structs where members are aligned to 32 mixing ipu3_uapi_awb_fr_config_s as well as other types. Fixes: commit dca5ef2aa1e6 ("media: staging/intel-ipu3: remove the unnecessary compiler flags") Signed-off-by: Sakari Ailus Tested-by: Bingbu Cao Signed-off-by: Mauro Carvalho Chehab commit 58dcc5bf4030cab548d5c98cd4cd3632a5444d5a Author: Michael Straube Date: Sat Dec 28 15:37:25 2019 +0100 staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21 This device was added to the stand-alone driver on github. Add it to the staging driver as well. Link: https://github.com/lwfinger/rtl8188eu/commit/b9b537aa25a8 Signed-off-by: Michael Straube Cc: stable Link: https://lore.kernel.org/r/20191228143725.24455-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit a9d3a9cedc1330c720e0ddde1978a8e7771da5ab Author: Ian Abbott Date: Fri Dec 27 17:00:54 2019 +0000 staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713 The Advantech PCI-1713 has 32 analog input channels, but an incorrect bit-mask in the definition of the `PCI171X_MUX_CHANH(x)` and PCI171X_MUX_CHANL(x)` macros is causing channels 16 to 31 to be aliases of channels 0 to 15. Change the bit-mask value from 0xf to 0xff to fix it. Note that the channel numbers will have been range checked already, so the bit-mask isn't really needed. Fixes: 92c65e5553ed ("staging: comedi: adv_pci1710: define the mux control register bits") Reported-by: Dmytro Fil Cc: # v4.5+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20191227170054.32051-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit c0bcf9f3f5b661d4ace2a64a79ef661edd2a4dc8 Author: Malcolm Priestley Date: Fri Dec 20 21:15:59 2019 +0000 staging: vt6656: set usb_set_intfdata on driver fail. intfdata will contain stale pointer when the device is detached after failed initialization when referenced in vt6656_disconnect Provide driver access to it here and NULL it. Cc: stable Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/6de448d7-d833-ef2e-dd7b-3ef9992fee0e@gmail.com Signed-off-by: Greg Kroah-Hartman commit 07f59f180ee083c48c32a1e69ae1d0091444d212 Author: Malcolm Priestley Date: Fri Dec 20 21:15:33 2019 +0000 staging: vt6656: remove bool from vnt_radio_power_on ret The driver uses logical only error checking a bool true would flag error. Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/cc52b67c-9ef8-3e57-815a-44d10701919e@gmail.com Signed-off-by: Greg Kroah-Hartman commit 69cc1f925e1aa74b96e2ace67e3453a50d091d2f Author: Malcolm Priestley Date: Fri Dec 20 21:15:24 2019 +0000 staging: vt6656: limit reg output to block size vnt_control_out appears to fail when BBREG is greater than 64 writes. Create new function that will relay an array in no larger than the indicated block size. It appears that this command has always failed but was ignored by driver until the introduction of error checking. Cc: stable # v5.3+ Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/a41f0601-df46-ce6e-ab7c-35e697946e2a@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7de6155c8968a3342d1bef3f7a2084d31ae6e4be Author: Malcolm Priestley Date: Fri Dec 20 21:15:09 2019 +0000 staging: vt6656: correct return of vnt_init_registers. The driver standard error returns remove bool false conditions. Cc: stable # v5.3+ Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/072ec0b3-425f-277e-130c-1e3a116c90d6@gmail.com Signed-off-by: Greg Kroah-Hartman commit 58c3e681b04dd57c70d0dcb7b69fe52d043ff75a Author: Malcolm Priestley Date: Fri Dec 20 21:14:59 2019 +0000 staging: vt6656: Fix non zero logical return of, usb_control_msg Starting with commit 59608cb1de1856 ("staging: vt6656: clean function's error path in usbpipe.c") the usb control functions have returned errors throughout driver with only logical variable checking. However, usb_control_msg return the amount of bytes transferred this means that normal operation causes errors. Correct the return function so only return zero when transfer is successful. Cc: stable # v5.3+ Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/08e88842-6f78-a2e3-a7a0-139fec960b2b@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5a769f6ff439cedc547395a6dc78faa26108f741 Author: Sumit Garg Date: Mon Dec 30 18:52:40 2019 +0530 optee: Fix multi page dynamic shm pool alloc optee_shm_register() expected pages to be passed as an array of page pointers rather than as an array of contiguous pages. So fix that via correctly passing pages as per expectation. Fixes: a249dd200d03 ("tee: optee: Fix dynamic shm pool allocations") Reported-by: Vincent Cao Signed-off-by: Sumit Garg Tested-by: Vincent Cao Signed-off-by: Jens Wiklander commit 1d8f65798240b6577d8c44d20c8ea8f1d429e495 Author: Zong Li Date: Mon Dec 23 16:46:13 2019 +0800 riscv: ftrace: correct the condition logic in function graph tracer The condition should be logical NOT to assign the hook address to parent address. Because the return value 0 of function_graph_enter upon success. Fixes: e949b6db51dc (riscv/function_graph: Simplify with function_graph_enter()) Signed-off-by: Zong Li Reviewed-by: Steven Rostedt (VMware) Cc: stable@vger.kernel.org Signed-off-by: Paul Walmsley commit cfda8617e22a8bf217a613d0b3ba3a38778443ba Author: Yash Shah Date: Fri Jan 3 09:43:20 2020 +0530 riscv: dts: Add DT support for SiFive L2 cache controller Add the L2 cache controller DT node in SiFive FU540 soc-specific DT file Signed-off-by: Yash Shah Reviewed-by: Palmer Dabbelt Signed-off-by: Paul Walmsley commit 0da310e82d3a9bff6ef6b0f2fbf45d1a05cc64fe Author: Zong Li Date: Thu Jan 2 11:09:54 2020 +0800 riscv: gcov: enable gcov for RISC-V This patch enables GCOV code coverage measurement on RISC-V. Lightly tested on QEMU and Hifive Unleashed board, seems to work as expected. Signed-off-by: Zong Li Reviewed-by: Anup Patel Acked-by: Jonathan Corbet Signed-off-by: Paul Walmsley commit ac51e005fe1456a288929a41d71adc6224e912d2 Author: Zong Li Date: Thu Jan 2 11:12:40 2020 +0800 riscv: mm: use __pa_symbol for kernel symbols __pa_symbol is the marcro that should be used for kernel symbols. It is also a pre-requisite for DEBUG_VIRTUAL which will do bounds checking. Signed-off-by: Zong Li Reviewed-by: Anup Patel Signed-off-by: Paul Walmsley commit a6204fc7b83cbe3398f61cf1742b09f66f0ae220 Author: Yunfeng Ye Date: Tue Dec 17 20:22:57 2019 +0800 agp: remove unused variable arqsz in agp_3_5_enable() This patch fix the following warning: drivers/char/agp/isoch.c: In function ‘agp_3_5_enable’: drivers/char/agp/isoch.c:322:13: warning: variable ‘arqsz’ set but not used [-Wunused-but-set-variable] u32 isoch, arqsz; ^~~~~ Signed-off-by: Yunfeng Ye Signed-off-by: Dave Airlie commit 2fec966f593efd076ad1e56d274611cea7d29eec Author: Yunfeng Ye Date: Tue Dec 17 20:21:37 2019 +0800 agp: remove unused variable mcapndx This patch fix the following warning: drivers/char/agp/isoch.c: In function ‘agp_3_5_isochronous_node_enable’: drivers/char/agp/isoch.c:87:5: warning: variable ‘mcapndx’ set but not used [-Wunused-but-set-variable] u8 mcapndx; ^~~~~~~ Signed-off-by: Yunfeng Ye Signed-off-by: Dave Airlie commit e31f7939c1c27faa5d0e3f14519eaf7c89e8a69d Author: Wen Yang Date: Fri Jan 3 11:02:48 2020 +0800 ftrace: Avoid potential division by zero in function profiler The ftrace_profile->counter is unsigned long and do_div truncates it to 32 bits, which means it can test non-zero and be truncated to zero for division. Fix this issue by using div64_ul() instead. Link: http://lkml.kernel.org/r/20200103030248.14516-1-wenyang@linux.alibaba.com Cc: stable@vger.kernel.org Fixes: e330b3bcd8319 ("tracing: Show sample std dev in function profiling") Fixes: 34886c8bc590f ("tracing: add average time in function to function profiler") Signed-off-by: Wen Yang Signed-off-by: Steven Rostedt (VMware) commit b8299d362d0837ae39e87e9019ebe6b736e0f035 Author: Steven Rostedt (VMware) Date: Thu Jan 2 22:02:41 2020 -0500 tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined On some archs with some configurations, MCOUNT_INSN_SIZE is not defined, and this makes the stack tracer fail to compile. Just define it to zero in this case. Link: https://lore.kernel.org/r/202001020219.zvE3vsty%lkp@intel.com Cc: stable@vger.kernel.org Fixes: 4df297129f622 ("tracing: Remove most or all of stack tracer stack size from stack_max_size") Reported-by: kbuild test robot Signed-off-by: Steven Rostedt (VMware) commit d2ccbccb5444e9141b33cf5399927737e9ff1c3d Author: Steven Rostedt (VMware) Date: Thu Jan 2 21:56:44 2020 -0500 tracing: Define MCOUNT_INSN_SIZE when not defined without direct calls In order to handle direct calls along side of function graph tracer, a check is made to see if the address being traced by the function graph tracer is a direct call or not. To get the address used by direct callers, the return address is subtracted by MCOUNT_INSN_SIZE. For some archs with certain configurations, MCOUNT_INSN_SIZE is undefined here. But these should not be using direct calls anyway. Just define MCOUNT_INSN_SIZE to zero in this case. Link: https://lore.kernel.org/r/202001020219.zvE3vsty%lkp@intel.com Reported-by: kbuild test robot Fixes: ff205766dbbee ("ftrace: Fix function_graph tracer interaction with BPF trampoline") Signed-off-by: Steven Rostedt (VMware) commit cd82dbf0d3fdd2474d169fa62631fa8e12e0311c Author: David S. Miller Date: Thu Jan 2 17:45:34 2020 -0800 net: Update GIT url in maintainers. Reported-by: Stephen Rothwell Signed-off-by: David S. Miller commit 7ca4ad5ba886557b67d42242a80f303c3a99ded1 Merge: 90e0a47be934 1f07dcc459d5 Author: Linus Torvalds Date: Thu Jan 2 17:04:43 2020 -0800 Merge tag 'sizeof_field-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull final sizeof_field conversion from Kees Cook: "Remove now unused FIELD_SIZEOF() macro (Kees Cook)" * tag 'sizeof_field-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: kernel.h: Remove unused FIELD_SIZEOF() commit 09b6636cea4f8e419d7cca4155e8695e462535a6 Author: Vignesh Raghavendra Date: Thu Jan 2 15:51:18 2020 +0530 spi: Document Octal mode as valid SPI bus width SPI core supports Octal SPI controllers which have 8 IO lines. Therefore document 8 as a valid option for spi-tx{rx}-bus-width Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200102102118.23318-1-vigneshr@ti.com Signed-off-by: Mark Brown commit 19b61392c5a852b4e8a0bf35aecb969983c5932d Author: wuxu.wu Date: Wed Jan 1 11:39:41 2020 +0800 spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls dw_spi_irq() and dw_spi_transfer_one concurrent calls. I find a panic in dw_writer(): txw = *(u8 *)(dws->tx), when dw->tx==null, dw->len==4, and dw->tx_end==1. When tpm driver's message overtime dw_spi_irq() and dw_spi_transfer_one may concurrent visit dw_spi, so I think dw_spi structure lack of protection. Otherwise dw_spi_transfer_one set dw rx/tx buffer and then open irq, store dw rx/tx instructions and other cores handle irq load dw rx/tx instructions may out of order. [ 1025.321302] Call trace: ... [ 1025.321319] __crash_kexec+0x98/0x148 [ 1025.321323] panic+0x17c/0x314 [ 1025.321329] die+0x29c/0x2e8 [ 1025.321334] die_kernel_fault+0x68/0x78 [ 1025.321337] __do_kernel_fault+0x90/0xb0 [ 1025.321346] do_page_fault+0x88/0x500 [ 1025.321347] do_translation_fault+0xa8/0xb8 [ 1025.321349] do_mem_abort+0x68/0x118 [ 1025.321351] el1_da+0x20/0x8c [ 1025.321362] dw_writer+0xc8/0xd0 [ 1025.321364] interrupt_transfer+0x60/0x110 [ 1025.321365] dw_spi_irq+0x48/0x70 ... Signed-off-by: wuxu.wu Link: https://lore.kernel.org/r/1577849981-31489-1-git-send-email-wuxu.wu@huawei.com Signed-off-by: Mark Brown commit 6f1ff76154b8b36033efcbf6453a71a3d28f52cd Author: Axel Lin Date: Wed Jan 1 10:24:06 2020 +0800 regulator: bd70528: Remove .set_ramp_delay for bd70528_ldo_ops The .set_ramp_delay should be for bd70528_buck_ops only. Setting .set_ramp_delay for for bd70528_ldo_ops causes problem because BD70528_MASK_BUCK_RAMP (0x10) overlaps with BD70528_MASK_LDO_VOLT (0x1f). So setting ramp_delay for LDOs may change the voltage output, fix it. Fixes: 99ea37bd1e7d ("regulator: bd70528: Support ROHM BD70528 regulator block") Signed-off-by: Axel Lin Acked-by: Matti Vaittinen Link: https://lore.kernel.org/r/20200101022406.15176-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit ff3b57417012fcc963ec281f5705bed837e4b1ac Author: Arnd Bergmann Date: Thu Jan 2 14:52:55 2020 +0100 ASoC: Intel: boards: Fix compile-testing RT1011/RT5682 On non-x86, the new driver results in a build failure: sound/soc/intel/boards/cml_rt1011_rt5682.c:14:10: fatal error: asm/cpu_device_id.h: No such file or directory The asm/cpu_device_id.h header is not actually needed here, so don't include it. Signed-off-by: Arnd Bergmann Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200102135322.1841053-1-arnd@arndb.de Signed-off-by: Mark Brown commit 90e0a47be934644944e7c6a29b8fc561be168ee1 Merge: bf6dd9a58eba a5b0dc5a46c2 Author: Linus Torvalds Date: Thu Jan 2 16:46:30 2020 -0800 Merge tag 'gcc-plugins-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc-plugins fix from Kees Cook: "Build flexibility fix: allow builds to disable plugins even when plugins available (Arnd Bergmann)" * tag 'gcc-plugins-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again commit bf6dd9a58ebaba2608d2aebd2a7a704014121f16 Merge: 278b14eb9203 e4ab5ccc357b Author: Linus Torvalds Date: Thu Jan 2 16:42:10 2020 -0800 Merge tag 'seccomp-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp fixes from Kees Cook: "Fixes for seccomp_notify_ioctl uapi sanity from Sargun Dhillon. The bulk of this is fixing the surrounding samples and selftests so that seccomp can correctly validate the seccomp_notify_ioctl buffer as being initially zeroed. Summary: - Fix samples and selftests to zero passed-in buffer - Enforce zeroed buffer checking - Verify buffer sanity check in selftest" * tag 'seccomp-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests/seccomp: Catch garbage on SECCOMP_IOCTL_NOTIF_RECV seccomp: Check that seccomp_notif is zeroed out by the user selftests/seccomp: Zero out seccomp_notif samples/seccomp: Zero out members based on seccomp_notif_sizes commit bbcc5672b0063b0e9d65dc8787a4f09c3b5bb5cc Author: Paul Burton Date: Wed Jan 1 20:50:38 2020 -0800 MIPS: Avoid VDSO ABI breakage due to global register variable Declaring __current_thread_info as a global register variable has the effect of preventing GCC from saving & restoring its value in cases where the ABI would typically do so. To quote GCC documentation: > If the register is a call-saved register, call ABI is affected: the > register will not be restored in function epilogue sequences after the > variable has been assigned. Therefore, functions cannot safely return > to callers that assume standard ABI. When our position independent VDSO is built for the n32 or n64 ABIs all functions it exposes should be preserving the value of $gp/$28 for their caller, but in the presence of the __current_thread_info global register variable GCC stops doing so & simply clobbers $gp/$28 when calculating the address of the GOT. In cases where the VDSO returns success this problem will typically be masked by the caller in libc returning & restoring $gp/$28 itself, but that is by no means guaranteed. In cases where the VDSO returns an error libc will typically contain a fallback path which will now fail (typically with a bad memory access) if it attempts anything which relies upon the value of $gp/$28 - eg. accessing anything via the GOT. One fix for this would be to move the declaration of __current_thread_info inside the current_thread_info() function, demoting it from global register variable to local register variable & avoiding inadvertently creating a non-standard calling ABI for the VDSO. Unfortunately this causes issues for clang, which doesn't support local register variables as pointed out by commit fe92da0f355e ("MIPS: Changed current_thread_info() to an equivalent supported by both clang and GCC") which introduced the global register variable before we had a VDSO to worry about. Instead, fix this by continuing to use the global register variable for the kernel proper but declare __current_thread_info as a simple extern variable when building the VDSO. It should never be referenced, and will cause a link error if it is. This resolves the calling convention issue for the VDSO without having any impact upon the build of the kernel itself for either clang or gcc. Signed-off-by: Paul Burton Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Reported-by: Jason A. Donenfeld Reviewed-by: Jason A. Donenfeld Tested-by: Jason A. Donenfeld Cc: Arnd Bergmann Cc: Christian Brauner Cc: Vincenzo Frascino Cc: # v4.4+ Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 542d0f607e58927541af3a3a7fc3bc6547c493dd Merge: c72a0bc0aa19 2d77bd61a292 Author: David S. Miller Date: Thu Jan 2 16:40:51 2020 -0800 Merge tag 'linux-can-fixes-for-5.5-20200102' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2020-01-02 this is a pull request of 9 patches for net/master. The first 5 patches target all the tcan4x5x driver. The first 3 patches of them are by Dan Murphy and Sean Nyekjaer and improve the device initialization (power on, reset and get device out of standby before register access). The next patch is by Dan Murphy and disables the INH pin device-state if the GPIO is unavailable. The last patch for the tcan4x5x driver is by Gustavo A. R. Silva and fixes an inconsistent PTR_ERR check in the tcan4x5x_parse_config() function. The next patch is by Oliver Hartkopp and targets the generic CAN device infrastructure. It ensures that an initialized headroom in outgoing CAN sk_buffs (e.g. if injected by AF_PACKET). The last 2 patches are by Johan Hovold and fix the kvaser_usb and gs_usb drivers by always using the current alternate setting not blindly the first one. ==================== Signed-off-by: David S. Miller commit 278b14eb920322255bf5b831e2bcfc1bf5999036 Merge: 74f1a299107b 9e5f1c19800b Author: Linus Torvalds Date: Thu Jan 2 16:39:51 2020 -0800 Merge tag 'pstore-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore bug fixes from Kees Cook: - always reset circular buffer state when writing new dump (Aleksandr Yashkin) - fix rare error-path memory leak (Kees Cook) * tag 'pstore-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/ram: Write new dumps to start of recycled zones pstore/ram: Fix error-path memory leak in persistent_ram_new() callers commit c72a0bc0aa19f49160330a65ab77184b5b7d131b Author: Andrew Lunn Date: Thu Jan 2 15:33:34 2020 +0100 net: freescale: fec: Fix ethtool -d runtime PM In order to dump the FECs registers the clocks have to be ticking, otherwise a data abort occurs. Add calls to runtime PM so they are enabled and later disabled. Fixes: e8fcfcd5684a ("net: fec: optimize the clock management to save power") Reported-by: Chris Healy Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 71130f29979c7c7956b040673e6b9d5643003176 Author: Hangbin Liu Date: Thu Jan 2 17:23:45 2020 +0800 vxlan: fix tos value before xmit Before ip_tunnel_ecn_encap() and udp_tunnel_xmit_skb() we should filter tos value by RT_TOS() instead of using config tos directly. vxlan_get_route() would filter the tos to fl4.flowi4_tos but we didn't return it back, as geneve_get_v4_rt() did. So we have to use RT_TOS() directly in function ip_tunnel_ecn_encap(). Fixes: 206aaafcd279 ("VXLAN: Use IP Tunnels tunnel ENC encap API") Fixes: 1400615d64cf ("vxlan: allow setting ipv6 traffic class") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 68aab823c223646fab311f8a6581994facee66a0 Author: Wen Yang Date: Thu Jan 2 17:21:43 2020 +0800 sch_cake: avoid possible divide by zero in cake_enqueue() The variables 'window_interval' is u64 and do_div() truncates it to 32 bits, which means it can test non-zero and be truncated to zero for division. The unit of window_interval is nanoseconds, so its lower 32-bit is relatively easy to exceed. Fix this issue by using div64_u64() instead. Fixes: 7298de9cd725 ("sch_cake: Add ingress mode") Signed-off-by: Wen Yang Cc: Kevin Darbyshire-Bryant Cc: Toke Høiland-Jørgensen Cc: David S. Miller Cc: Cong Wang Cc: cake@lists.bufferbloat.net Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 74f1a299107b9e1a563831a4ba85f769ab577164 Author: Dominik Brodowski Date: Wed Jan 1 20:05:03 2020 +0100 Revert "fs: remove ksys_dup()" This reverts commit 8243186f0cc7 ("fs: remove ksys_dup()") and the subsequent fix for it in commit 2d3145f8d280 ("early init: fix error handling when opening /dev/console"). Trying to use filp_open() and f_dupfd() instead of pseudo-syscalls caused more trouble than what is worth it: it requires accessing vfs internals and it turns out there were other bugs in it too. In particular, the file reference counting was wrong - because unlike the original "open+2*dup" sequence it used "filp_open+3*f_dupfd" and thus had an extra leaked file reference. That in turn then caused odd problems with Androidx86 long after boot becaue of how the extra reference to the console kept the session active even after all file descriptors had been closed. Reported-by: youling 257 Cc: Arvind Sankar Cc: Al Viro Signed-off-by: Dominik Brodowski Signed-off-by: Linus Torvalds commit d8513df2598e5142f8a5c4724f28411936e1dfc7 Author: David S. Miller Date: Thu Jan 2 16:07:38 2020 -0800 net: Correct type of tcp_syncookies sysctl. It can take on the values of '0', '1', and '2' and thus is not a boolean. Signed-off-by: David S. Miller commit 02f4e01ce710fe20d2e5548d52bfdea52efd09d1 Author: Steven Rostedt (VMware) Date: Thu Jan 2 19:04:57 2020 -0500 tracing: Initialize val to zero in parse_entry of inject code gcc produces a variable may be uninitialized warning for "val" in parse_entry(). This is really a false positive, but the code is subtle enough to just initialize val to zero and it's not a fast path to worry about it. Marked for stable to remove the warning in the stable trees as well. Cc: stable@vger.kernel.org Fixes: 6c3edaf9fd6a3 ("tracing: Introduce trace event injection") Reported-by: kbuild test robot Signed-off-by: Steven Rostedt (VMware) commit c9655008e7845bcfdaac10a1ed8554ec167aea88 Author: Pengcheng Yang Date: Mon Dec 30 17:54:41 2019 +0800 tcp: fix "old stuff" D-SACK causing SACK to be treated as D-SACK When we receive a D-SACK, where the sequence number satisfies: undo_marker <= start_seq < end_seq <= prior_snd_una we consider this is a valid D-SACK and tcp_is_sackblock_valid() returns true, then this D-SACK is discarded as "old stuff", but the variable first_sack_index is not marked as negative in tcp_sacktag_write_queue(). If this D-SACK also carries a SACK that needs to be processed (for example, the previous SACK segment was lost), this SACK will be treated as a D-SACK in the following processing of tcp_sacktag_write_queue(), which will eventually lead to incorrect updates of undo_retrans and reordering. Fixes: fd6dad616d4f ("[TCP]: Earlier SACK block verification & simplify access to them") Signed-off-by: Pengcheng Yang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit f7a48b68abd9b20ce1ac6298aaaa3c4d158271dd Author: Baruch Siach Date: Thu Dec 19 11:48:22 2019 +0200 net: dsa: mv88e6xxx: force cmode write on 6141/6341 mv88e6xxx_port_set_cmode() relies on cmode stored in struct mv88e6xxx_port to skip cmode update when the requested value matches the cached value. It turns out that mv88e6xxx_port_hidden_write() might change the port cmode setting as a side effect, so we can't rely on the cached value to determine that cmode update in not necessary. Force cmode update in mv88e6341_port_set_cmode(), to make serdes configuration work again. Other mv88e6xxx_port_set_cmode() callers keep the current behaviour. This fixes serdes configuration of the 6141 switch on SolidRun Clearfog GT-8K. Fixes: 7a3007d22e8 ("net: dsa: mv88e6xxx: fully support SERDES on Topaz family") Reported-by: Denis Odintsov Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a5b0dc5a46c221725c43bd9b01570239a4cd78b1 Author: Arnd Bergmann Date: Wed Dec 11 14:39:28 2019 +0100 gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again I noticed that randconfig builds with gcc no longer produce a lot of ccache hits, unlike with clang, and traced this back to plugins now being enabled unconditionally if they are supported. I am now working around this by adding export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler% to my top-level Makefile. This changes the heuristic that ccache uses to determine whether the plugins are the same after a 'make clean'. However, it also seems that being able to just turn off the plugins is generally useful, at least for build testing it adds noticeable overhead but does not find a lot of bugs additional bugs, and may be easier for ccache users than my workaround. Fixes: 9f671e58159a ("security: Create "kernel hardening" config area") Signed-off-by: Arnd Bergmann Acked-by: Ard Biesheuvel Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20191211133951.401933-1-arnd@arndb.de Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit e4ab5ccc357b978999328fadae164e098c26fa40 Author: Sargun Dhillon Date: Mon Dec 30 12:38:11 2019 -0800 selftests/seccomp: Catch garbage on SECCOMP_IOCTL_NOTIF_RECV This adds logic to the user_notification_basic test to set a member of struct seccomp_notif to an invalid value to ensure that the kernel returns EINVAL if any of the struct seccomp_notif members are set to invalid values. Signed-off-by: Sargun Dhillon Suggested-by: Christian Brauner Link: https://lore.kernel.org/r/20191230203811.4996-1-sargun@sargun.me Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit 2882d53c9c6f3b8311d225062522f03772cf0179 Author: Sargun Dhillon Date: Sat Dec 28 22:24:50 2019 -0800 seccomp: Check that seccomp_notif is zeroed out by the user This patch is a small change in enforcement of the uapi for SECCOMP_IOCTL_NOTIF_RECV ioctl. Specifically, the datastructure which is passed (seccomp_notif) must be zeroed out. Previously any of its members could be set to nonsense values, and we would ignore it. This ensures all fields are set to their zero value. Signed-off-by: Sargun Dhillon Reviewed-by: Christian Brauner Reviewed-by: Aleksa Sarai Acked-by: Tycho Andersen Link: https://lore.kernel.org/r/20191229062451.9467-2-sargun@sargun.me Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit 88c13f8bd71472fbab5338b01d99122908c77e53 Author: Sargun Dhillon Date: Sat Dec 28 22:24:49 2019 -0800 selftests/seccomp: Zero out seccomp_notif The seccomp_notif structure should be zeroed out prior to calling the SECCOMP_IOCTL_NOTIF_RECV ioctl. Previously, the kernel did not check whether these structures were zeroed out or not, so these worked. This patch zeroes out the seccomp_notif data structure prior to calling the ioctl. Signed-off-by: Sargun Dhillon Reviewed-by: Tycho Andersen Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20191229062451.9467-1-sargun@sargun.me Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit 771b894f2f3dfedc2ba5561731fffa0e39b1bbb6 Author: Sargun Dhillon Date: Mon Dec 30 12:35:03 2019 -0800 samples/seccomp: Zero out members based on seccomp_notif_sizes The sizes by which seccomp_notif and seccomp_notif_resp are allocated are based on the SECCOMP_GET_NOTIF_SIZES ioctl. This allows for graceful extension of these datastructures. If userspace zeroes out the datastructure based on its version, and it is lagging behind the kernel's version, it will end up sending trailing garbage. On the other hand, if it is ahead of the kernel version, it will write extra zero space, and potentially cause corruption. Signed-off-by: Sargun Dhillon Suggested-by: Tycho Andersen Link: https://lore.kernel.org/r/20191230203503.4925-1-sargun@sargun.me Fixes: fec7b6690541 ("samples: add an example of seccomp user trap") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit 9e5f1c19800b808a37fb9815a26d382132c26c3d Author: Aleksandr Yashkin Date: Mon Dec 23 18:38:16 2019 +0500 pstore/ram: Write new dumps to start of recycled zones The ram_core.c routines treat przs as circular buffers. When writing a new crash dump, the old buffer needs to be cleared so that the new dump doesn't end up in the wrong place (i.e. at the end). The solution to this problem is to reset the circular buffer state before writing a new Oops dump. Signed-off-by: Aleksandr Yashkin Signed-off-by: Nikolay Merinov Signed-off-by: Ariel Gilman Link: https://lore.kernel.org/r/20191223133816.28155-1-n.merinov@inango-systems.com Fixes: 896fc1f0c4c6 ("pstore/ram: Switch to persistent_ram routines") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit 8df955a32a73315055e0cd187cbb1cea5820394b Author: Kees Cook Date: Mon Dec 30 11:48:10 2019 -0800 pstore/ram: Fix error-path memory leak in persistent_ram_new() callers For callers that allocated a label for persistent_ram_new(), if the call fails, they must clean up the allocation. Suggested-by: Navid Emamdoost Fixes: 1227daa43bce ("pstore/ram: Clarify resource reservation labels") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/lkml/20191211191353.14385-1-navid.emamdoost@gmail.com Signed-off-by: Kees Cook commit ab6a2114433a3b5b555983dcb9b752a85255f04b Author: Shakeel Butt Date: Thu Jan 2 08:58:44 2020 -0800 x86/resctrl: Fix potential memory leak set_cache_qos_cfg() is leaking memory when the given level is not RDT_RESOURCE_L3 or RDT_RESOURCE_L2. At the moment, this function is called with only valid levels but move the allocation after the valid level checks in order to make it more robust and future proof. [ bp: Massage commit message. ] Fixes: 99adde9b370de ("x86/intel_rdt: Enable L2 CDP in MSR IA32_L2_QOS_CFG") Signed-off-by: Shakeel Butt Signed-off-by: Borislav Petkov Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Reinette Chatre Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20200102165844.133133-1-shakeelb@google.com commit c215e48e97d232249a33849fc46fc50311043e11 Author: Douglas Gilbert Date: Sun Dec 29 22:35:44 2019 -0500 USB-PD tcpm: bad warning+size, PPS adapters Augmented Power Delivery Objects (A)PDO_s are used by USB-C PD power adapters to advertize the voltages and currents they support. There can be up to 7 PDO_s but before PPS (programmable power supply) there were seldom more than 4 or 5. Recently Samsung released an optional PPS 45 Watt power adapter (EP-TA485) that has 7 PDO_s. It is for the Galaxy 10+ tablet and charges it quicker than the adapter supplied at purchase. The EP-TA485 causes an overzealous WARN_ON to soil the log plus it miscalculates the number of bytes to read. So this bug has been there for some time but goes undetected for the majority of USB-C PD power adapters on the market today that have 6 or less PDO_s. That may soon change as more USB-C PD adapters with PPS come to market. Tested on a EP-TA485 and an older Lenovo PN: SA10M13950 USB-C 65 Watt adapter (without PPS and has 4 PDO_s) plus several other PD power adapters. Signed-off-by: Douglas Gilbert Reviewed-by: Guenter Roeck Cc: stable Link: https://lore.kernel.org/r/20191230033544.1809-1-dgilbert@interlog.com Signed-off-by: Greg Kroah-Hartman commit 2d77bd61a2927be8f4e00d9478fe6996c47e8d45 Author: Florian Faber Date: Thu Dec 26 19:51:24 2019 +0100 can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode Under load, the RX side of the mscan driver can get stuck while TX still works. Restarting the interface locks up the system. This behaviour could be reproduced reliably on a MPC5121e based system. The patch fixes the return value of the NAPI polling function (should be the number of processed packets, not constant 1) and the condition under which IRQs are enabled again after polling is finished. With this patch, no more lockups were observed over a test period of ten days. Fixes: afa17a500a36 ("net/can: add driver for mscan family & mpc52xx_mscan") Signed-off-by: Florian Faber Cc: linux-stable Signed-off-by: Marc Kleine-Budde commit 2f361cd9474ab2c4ab9ac8db20faf81e66c6279b Author: Johan Hovold Date: Tue Dec 10 12:32:31 2019 +0100 can: gs_usb: gs_usb_probe(): use descriptors of current altsetting Make sure to always use the descriptors of the current alternate setting to avoid future issues when accessing fields that may differ between settings. Signed-off-by: Johan Hovold Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices") Signed-off-by: Marc Kleine-Budde commit 5660493c637c9d83786f1c9297f403eae44177b6 Author: Johan Hovold Date: Tue Dec 10 12:32:30 2019 +0100 can: kvaser_usb: fix interface sanity check Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: aec5fb2268b7 ("can: kvaser_usb: Add support for Kvaser USB hydra family") Cc: stable # 4.19 Cc: Jimmy Assarsson Cc: Christer Beskow Cc: Nicklas Johansson Cc: Martin Henriksson Signed-off-by: Johan Hovold Signed-off-by: Marc Kleine-Budde commit e7153bf70c3496bac00e7e4f395bb8d8394ac0ea Author: Oliver Hartkopp Date: Sat Dec 7 19:34:18 2019 +0100 can: can_dropped_invalid_skb(): ensure an initialized headroom in outgoing CAN sk_buffs KMSAN sysbot detected a read access to an untinitialized value in the headroom of an outgoing CAN related sk_buff. When using CAN sockets this area is filled appropriately - but when using a packet socket this initialization is missing. The problematic read access occurs in the CAN receive path which can only be triggered when the sk_buff is sent through a (virtual) CAN interface. So we check in the sending path whether we need to perform the missing initializations. Fixes: d3b58c47d330d ("can: replace timestamp as unique skb attribute") Reported-by: syzbot+b02ff0707a97e4e79ebb@syzkaller.appspotmail.com Signed-off-by: Oliver Hartkopp Tested-by: Oliver Hartkopp Cc: linux-stable # >= v4.1 Signed-off-by: Marc Kleine-Budde commit 93bdc0eb0b4bb5e7094fd4a95f4a394e4a927e09 Author: Gustavo A. R. Silva Date: Tue Dec 10 09:05:32 2019 -0600 can: tcan4x5x: tcan4x5x_parse_config(): fix inconsistent IS_ERR and PTR_ERR Fix inconsistent IS_ERR and PTR_ERR in tcan4x5x_parse_config(). The proper pointer to be passed as argument is tcan4x5x->device_wake_gpio. This bug was detected with the help of Coccinelle. Fixes: 2de497356955 ("can: tcan45x: Make wake-up GPIO an optional GPIO") Signed-off-by: Gustavo A. R. Silva Acked-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 5a1f8f5e5efa8d536d75ab532714ec248dd6da2b Author: Dan Murphy Date: Thu Dec 12 10:15:36 2019 -0600 can: tcan4x5x: tcan4x5x_parse_config(): Disable the INH pin device-state GPIO is unavailable If the device state GPIO is not connected to the host then disable the INH output from the TCAN device per section 8.3.5 of the data sheet. Signed-off-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit c3083124e6a1c0d6cd4fe3b3f627b488bd3b10c4 Author: Sean Nyekjaer Date: Wed Dec 11 14:58:51 2019 +0100 can: tcan4x5x: tcan4x5x_parse_config(): reset device before register access It's a good idea to reset a ip-block/spi device before using it, this patch will reset the device. And a generic reset function if needed elsewhere. Signed-off-by: Sean Nyekjaer Signed-off-by: Marc Kleine-Budde commit 3814ca3a10be795693e9d95142c69134c6189a9b Author: Dan Murphy Date: Tue Dec 10 10:32:04 2019 -0600 can: tcan4x5x: tcan4x5x_can_probe(): turn on the power before parsing the config The tcan4x5x_parse_config() function now performs action on the device either reading or writing and a reset. If the devive has a switchable power supppy (i.e. regulator is managed) it needs to be turned on. So turn on the regulator if available. If the parsing fails, turn off the regulator. Fixes: 2de497356955 ("can: tcan45x: Make wake-up GPIO an optional GPIO") Signed-off-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 3069ce620daed85e4ef2b0c087dca2509f809470 Author: Sean Nyekjaer Date: Wed Dec 11 14:58:52 2019 +0100 can: tcan4x5x: tcan4x5x_can_probe(): get the device out of standby before register access The m_can tries to detect if Non ISO Operation is available while in standby mode, this function results in the following error: | tcan4x5x spi2.0 (unnamed net_device) (uninitialized): Failed to init module | tcan4x5x spi2.0: m_can device registered (irq=84, version=32) | tcan4x5x spi2.0 can2: TCAN4X5X successfully initialized. When the tcan device comes out of reset it goes in standby mode. The m_can driver tries to access the control register but fails due to the device being in standby mode. So this patch will put the tcan device in normal mode before the m_can driver does the initialization. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Cc: stable@vger.kernel.org Signed-off-by: Sean Nyekjaer Acked-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 02a614499600af836137c3fbc4404cd96365fff2 Author: Markus Theil Date: Tue Dec 3 19:06:44 2019 +0100 mac80211: mesh: restrict airtime metric to peered established plinks The following warning is triggered every time an unestablished mesh peer gets dumped. Checks if a peer link is established before retrieving the airtime link metric. [ 9563.022567] WARNING: CPU: 0 PID: 6287 at net/mac80211/mesh_hwmp.c:345 airtime_link_metric_get+0xa2/0xb0 [mac80211] [ 9563.022697] Hardware name: PC Engines apu2/apu2, BIOS v4.10.0.3 [ 9563.022756] RIP: 0010:airtime_link_metric_get+0xa2/0xb0 [mac80211] [ 9563.022838] Call Trace: [ 9563.022897] sta_set_sinfo+0x936/0xa10 [mac80211] [ 9563.022964] ieee80211_dump_station+0x6d/0x90 [mac80211] [ 9563.023062] nl80211_dump_station+0x154/0x2a0 [cfg80211] [ 9563.023120] netlink_dump+0x17b/0x370 [ 9563.023130] netlink_recvmsg+0x2a4/0x480 [ 9563.023140] ____sys_recvmsg+0xa6/0x160 [ 9563.023154] ___sys_recvmsg+0x93/0xe0 [ 9563.023169] __sys_recvmsg+0x7e/0xd0 [ 9563.023210] do_syscall_64+0x4e/0x140 [ 9563.023217] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Markus Theil Link: https://lore.kernel.org/r/20191203180644.70653-1-markus.theil@tu-ilmenau.de [rewrite commit message] Signed-off-by: Johannes Berg commit 20d4e80d255dd7cfecb53743bc550ebcad04549d Author: John Johansen Date: Wed Dec 18 11:04:07 2019 -0800 apparmor: only get a label reference if the fast path check fails The common fast path check can be done under rcu_read_lock() and doesn't need a reference count on the label. Only take a reference count if entering the slow path. Fixes reported hackbench regression - sha1 79e178a57dae ("Merge tag 'apparmor-pr-2019-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor") hackbench -l (256000/#grp) -g #grp 128 groups 19.679 ±0.90% - previous sha1 01d1dff64662 ("Merge tag 's390-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux") hackbench -l (256000/#grp) -g #grp 128 groups 3.1689 ±3.04% Reported-by: Vincent Guittot Tested-by: Vincent Guittot Tested-by: Sebastian Andrzej Siewior Fixes: bce4e7e9c45e ("apparmor: reduce rcu_read_lock scope for aa_file_perm mediation") Signed-off-by: John Johansen commit 9c95a278ba7ca3ccc111c165cc74cb23c744fc85 Author: Patrick Steinhardt Date: Wed Dec 11 12:44:08 2019 +0100 apparmor: fix bind mounts aborting with -ENOMEM With commit df323337e507 ("apparmor: Use a memory pool instead per-CPU caches, 2019-05-03"), AppArmor code was converted to use memory pools. In that conversion, a bug snuck into the code that polices bind mounts that causes all bind mounts to fail with -ENOMEM, as we erroneously error out if `aa_get_buffer` returns a pointer instead of erroring out when it does _not_ return a valid pointer. Fix the issue by correctly checking for valid pointers returned by `aa_get_buffer` to fix bind mounts with AppArmor. Fixes: df323337e507 ("apparmor: Use a memory pool instead per-CPU caches") Signed-off-by: Patrick Steinhardt Signed-off-by: John Johansen commit efb3ecdcdb47f28b72e312fdca0ff923aa3d19bb Merge: 5041a58d5ba5 2438c3a19dec Author: Greg Kroah-Hartman Date: Thu Jan 2 12:37:40 2020 +0100 Merge tag 'usb-serial-5.5-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.5-rc5 Here's a couple of new modem device ids, including a new quirk for devices that expect zero-length packets. Due to the holidays, only the first one has been in linux-next and with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-5.5-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add ZLP support for 0x1bc7/0x9010 USB: serial: option: add Telit ME910G1 0x110a composition commit 5041a58d5ba5ec62b8126a729d114430a80c835d Merge: c1ffba305dbc 4f510aa10468 Author: Greg Kroah-Hartman Date: Thu Jan 2 12:36:49 2020 +0100 Merge tag 'phy-for-5.5-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 5.5-rc *) Fix error path in cpcap-usb driver when no host driver is loaded to avoid debug serial console from stop working *) Fix to let USB host idle before switching to UART mode in cpcap-usb driver in order to avoid flakey enumeration next time *) Prevent USB line glitches from waking up modem by enabling the USB lines (GPIO mux) after configuring the cpcap-usb PHY *) Improve host vs docked mode detection in cpcap-usb PHY driver to keep VBUS enabled in host mode *) Fix to prevent cpcap-usb PHY driver from enabling the PHY twice *) Increase PHY ready timeout in qcom-qmp PHY as it takes more than 1ms to initialize *) Round clock rate down to closest 1000 Hz in phy-rockchip-inno-hdmi to prevent wrong pixel clock to be used and result in no-signal when configuring a mode on RK3328 * tag 'phy-for-5.5-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: phy/rockchip: inno-hdmi: round clock rate down to closest 1000 Hz phy: cpcap-usb: Drop extra write to usb2 register phy: cpcap-usb: Improve host vs docked mode detection phy: cpcap-usb: Prevent USB line glitches from waking up modem phy: mapphone-mdm6600: Fix uninitialized status value regression phy: cpcap-usb: Fix flakey host idling and enumerating of devices phy: qcom-qmp: Increase PHY ready timeout phy: cpcap-usb: Fix error path when no host driver is loaded commit 0c545240aebc2ccb8f661dc54283a14d64659804 Author: Samuel Holland Date: Sat Dec 28 20:59:22 2019 -0600 clk: sunxi-ng: h6-r: Fix AR100/R_APB2 parent order According to the BSP source code, both the AR100 and R_APB2 clocks have PLL_PERIPH0 as mux index 3, not 2 as it was on previous chips. The pre- divider used for PLL_PERIPH0 should be changed to index 3 to match. This was verified by running a rough benchmark on the AR100 with various clock settings: | mux | pre-divider | iterations/second | clock source | |=====|=============|===================|==============| | 0 | 0 | 19033 (stable) | osc24M | | 2 | 5 | 11466 (unstable) | iosc/osc16M | | 2 | 17 | 11422 (unstable) | iosc/osc16M | | 3 | 5 | 85338 (stable) | pll-periph0 | | 3 | 17 | 27167 (stable) | pll-periph0 | The relative performance numbers all match up (with pll-periph0 running at its default 600MHz). Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard commit 675a6d467b432c8b4a0703ded02e6ef068e0c7e9 Author: Samuel Holland Date: Sat Dec 28 20:59:21 2019 -0600 clk: sunxi-ng: h6-r: Simplify R_APB1 clock definition Like the APB0 clock on previous chips, this is a simple single-parent clock with an M divider. Use the equivalent helper macro instead of writing out the whole clock description manually. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard commit 47d64fef1f3ffbdf960d3330b9865fc9f12fdf84 Author: Samuel Holland Date: Sat Dec 28 20:59:20 2019 -0600 clk: sunxi-ng: sun8i-r: Fix divider on APB0 clock According to the BSP source code, the APB0 clock on the H3 and H5 has a normal M divider, not a power-of-two divider. This matches the hardware in the A83T (as described in both the BSP source code and the manual). Since the A83T and H3/A64 clocks are actually the same, we can merge the definitions. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard commit 866bd5eeaf13a8e008fa7b818fb445bacd4dbdb0 Merge: e7cbcb16fa41 969e11529221 Author: Dave Airlie Date: Thu Jan 2 10:16:04 2020 +1000 Merge tag 'amd-drm-fixes-5.5-2020-01-01' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.5-2020-01-01: amdgpu: - ATPX regression fix - SMU metrics table locking fixes - gfxoff fix for raven - RLC firmware loading stability fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200101151307.5242-1-alexander.deucher@amd.com commit e7cbcb16fa416c26e02c181945ba62de580fca7a Merge: 886a0dc04d73 ac2917b01992 Author: Dave Airlie Date: Thu Jan 2 09:40:54 2020 +1000 Merge tag 'drm-misc-fixes-2019-12-31' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes -sun4i: Fix double-free in connector/encoder cleanup (Stefan) -malidp: Make vtable static (Ben) Cc: Ben Dooks Cc: Stefan Mavrodiev Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191231152503.GA46740@art_vandelay commit 886a0dc04d73f1ff78d206581d3853f3d2ec9435 Merge: fd6988496e79 e18e0f6b7c8f Author: Dave Airlie Date: Thu Jan 2 09:40:03 2020 +1000 Merge tag 'mediatek-drm-fixes-5.5' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes Mediatek DRM fixes for Linux 5.5 Signed-off-by: Dave Airlie From: CK Hu Link: https://patchwork.freedesktop.org/patch/msgid/1577762298.23194.2.camel@mtksdaap41 commit 969e11529221a6a2a787cb3b63ccf9402f8d2e37 Author: Evan Quan Date: Mon Dec 23 16:13:48 2019 +0800 drm/amdgpu: correct RLC firmwares loading sequence Per confirmation with RLC firmware team, the RLC should be unhalted after all RLC related firmwares uploaded. However, in fact the RLC is unhalted immediately after RLCG firmware uploaded. And that may causes unexpected PSP hang on loading the succeeding RLC save restore list related firmwares. So, we correct the firmware loading sequence to load RLC save restore list related firmwares before RLCG ucode. That will help to get around this issue. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 738d2902773e30939a982c8df7a7f94293659810 Merge: c5c928c667cd 04b69426d846 Author: Linus Torvalds Date: Tue Dec 31 11:14:58 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix big endian overflow in nf_flow_table, from Arnd Bergmann. 2) Fix port selection on big endian in nft_tproxy, from Phil Sutter. 3) Fix precision tracking for unbound scalars in bpf verifier, from Daniel Borkmann. 4) Fix integer overflow in socket rcvbuf check in UDP, from Antonio Messina. 5) Do not perform a neigh confirmation during a pmtu update over a tunnel, from Hangbin Liu. 6) Fix DMA mapping leak in dpaa_eth driver, from Madalin Bucur. 7) Various PTP fixes for sja1105 dsa driver, from Vladimir Oltean. 8) Add missing to dummy definition of of_mdiobus_child_is_phy(), from Geert Uytterhoeven * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (54 commits) hsr: fix slab-out-of-bounds Read in hsr_debugfs_rename() net/sched: add delete_empty() to filters and use it in cls_flower tcp: Fix highest_sack and highest_sack_seq ptp: fix the race between the release of ptp_clock and cdev net: dsa: sja1105: Reconcile the meaning of TPID and TPID2 for E/T and P/Q/R/S Documentation: net: dsa: sja1105: Remove text about taprio base-time limitation net: dsa: sja1105: Remove restriction of zero base-time for taprio offload net: dsa: sja1105: Really make the PTP command read-write net: dsa: sja1105: Take PTP egress timestamp by port, not mgmt slot cxgb4/cxgb4vf: fix flow control display for auto negotiation mlxsw: spectrum: Use dedicated policer for VRRP packets mlxsw: spectrum_router: Skip loopback RIFs during MAC validation net: stmmac: dwmac-meson8b: Fix the RGMII TX delay on Meson8b/8m2 SoCs net/sched: act_mirred: Pull mac prior redir to non mac_header_xmit device net_sched: sch_fq: properly set sk->sk_pacing_status bnx2x: Fix accounting of vlan resources among the PFs bnx2x: Use appropriate define for vlan credit of: mdio: Add missing inline to of_mdiobus_child_is_phy() dummy net: phy: aquantia: add suspend / resume ops for AQR105 dpaa_eth: fix DMA mapping leak ... commit c5c928c667cd1e34cbcac6af5b7c2f9f4512d612 Merge: fd6988496e79 6bd5ce6089b5 Author: Linus Torvalds Date: Tue Dec 31 10:51:27 2019 -0800 Merge tag 'tomoyo-fixes-for-5.5' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1 Pull tomoyo fixes from Tetsuo Handa: "Two bug fixes: - Suppress RCU warning at list_for_each_entry_rcu() - Don't use fancy names on sockets" * tag 'tomoyo-fixes-for-5.5' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1: tomoyo: Suppress RCU warning at list_for_each_entry_rcu(). tomoyo: Don't use nifty names on sockets. commit 4f510aa10468954b1da4e94689c38ac6ea8d3627 Author: Jonas Karlman Date: Mon Dec 23 08:49:19 2019 +0000 phy/rockchip: inno-hdmi: round clock rate down to closest 1000 Hz Commit 287422a95fe2 ("drm/rockchip: Round up _before_ giving to the clock framework") changed what rate clk_round_rate() is called with, an additional 999 Hz added to the requsted mode clock. This has caused a regression on RK3328 and presumably also on RK3228 because the inno-hdmi-phy clock requires an exact match of the requested rate in the pre pll config table. When an exact match is not found the parent clock rate (24MHz) is returned to the clk_round_rate() caller. This cause wrong pixel clock to be used and result in no-signal when configuring a mode on RK3328. Fix this by rounding the rate down to closest 1000 Hz in round_rate func, this allows an exact match to be found in pre pll config table. Fixes: 287422a95fe2 ("drm/rockchip: Round up _before_ giving to the clock framework") Signed-off-by: Jonas Karlman Signed-off-by: Kishon Vijay Abraham I commit 04b69426d846cd04ca9acefff1ea39e1c64d2714 Author: Taehee Yoo Date: Sat Dec 28 16:28:09 2019 +0000 hsr: fix slab-out-of-bounds Read in hsr_debugfs_rename() hsr slave interfaces don't have debugfs directory. So, hsr_debugfs_rename() shouldn't be called when hsr slave interface name is changed. Test commands: ip link add dummy0 type dummy ip link add dummy1 type dummy ip link add hsr0 type hsr slave1 dummy0 slave2 dummy1 ip link set dummy0 name ap Splat looks like: [21071.899367][T22666] ap: renamed from dummy0 [21071.914005][T22666] ================================================================== [21071.919008][T22666] BUG: KASAN: slab-out-of-bounds in hsr_debugfs_rename+0xaa/0xb0 [hsr] [21071.923640][T22666] Read of size 8 at addr ffff88805febcd98 by task ip/22666 [21071.926941][T22666] [21071.927750][T22666] CPU: 0 PID: 22666 Comm: ip Not tainted 5.5.0-rc2+ #240 [21071.929919][T22666] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [21071.935094][T22666] Call Trace: [21071.935867][T22666] dump_stack+0x96/0xdb [21071.936687][T22666] ? hsr_debugfs_rename+0xaa/0xb0 [hsr] [21071.937774][T22666] print_address_description.constprop.5+0x1be/0x360 [21071.939019][T22666] ? hsr_debugfs_rename+0xaa/0xb0 [hsr] [21071.940081][T22666] ? hsr_debugfs_rename+0xaa/0xb0 [hsr] [21071.940949][T22666] __kasan_report+0x12a/0x16f [21071.941758][T22666] ? hsr_debugfs_rename+0xaa/0xb0 [hsr] [21071.942674][T22666] kasan_report+0xe/0x20 [21071.943325][T22666] hsr_debugfs_rename+0xaa/0xb0 [hsr] [21071.944187][T22666] hsr_netdev_notify+0x1fe/0x9b0 [hsr] [21071.945052][T22666] ? __module_text_address+0x13/0x140 [21071.945897][T22666] notifier_call_chain+0x90/0x160 [21071.946743][T22666] dev_change_name+0x419/0x840 [21071.947496][T22666] ? __read_once_size_nocheck.constprop.6+0x10/0x10 [21071.948600][T22666] ? netdev_adjacent_rename_links+0x280/0x280 [21071.949577][T22666] ? __read_once_size_nocheck.constprop.6+0x10/0x10 [21071.950672][T22666] ? lock_downgrade+0x6e0/0x6e0 [21071.951345][T22666] ? do_setlink+0x811/0x2ef0 [21071.951991][T22666] do_setlink+0x811/0x2ef0 [21071.952613][T22666] ? is_bpf_text_address+0x81/0xe0 [ ... ] Reported-by: syzbot+9328206518f08318a5fd@syzkaller.appspotmail.com Fixes: 4c2d5e33dcd3 ("hsr: rename debugfs file when interface name is changed") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit a5b72a083da197b493c7ed1e5730d62d3199f7d6 Author: Davide Caratti Date: Sat Dec 28 16:36:58 2019 +0100 net/sched: add delete_empty() to filters and use it in cls_flower Revert "net/sched: cls_u32: fix refcount leak in the error path of u32_change()", and fix the u32 refcount leak in a more generic way that preserves the semantic of rule dumping. On tc filters that don't support lockless insertion/removal, there is no need to guard against concurrent insertion when a removal is in progress. Therefore, for most of them we can avoid a full walk() when deleting, and just decrease the refcount, like it was done on older Linux kernels. This fixes situations where walk() was wrongly detecting a non-empty filter, like it happened with cls_u32 in the error path of change(), thus leading to failures in the following tdc selftests: 6aa7: (filter, u32) Add/Replace u32 with source match and invalid indev 6658: (filter, u32) Add/Replace u32 with custom hash table and invalid handle 74c2: (filter, u32) Add/Replace u32 filter with invalid hash table id On cls_flower, and on (future) lockless filters, this check is necessary: move all the check_empty() logic in a callback so that each filter can have its own implementation. For cls_flower, it's sufficient to check if no IDRs have been allocated. This reverts commit 275c44aa194b7159d1191817b20e076f55f0e620. Changes since v1: - document the need for delete_empty() when TCF_PROTO_OPS_DOIT_UNLOCKED is used, thanks to Vlad Buslov - implement delete_empty() without doing fl_walk(), thanks to Vlad Buslov - squash revert and new fix in a single patch, to be nice with bisect tests that run tdc on u32 filter, thanks to Dave Miller Fixes: 275c44aa194b ("net/sched: cls_u32: fix refcount leak in the error path of u32_change()") Fixes: 6676d5e416ee ("net: sched: set dedicated tcf_walker flag when tp is empty") Suggested-by: Jamal Hadi Salim Suggested-by: Vlad Buslov Signed-off-by: Davide Caratti Reviewed-by: Vlad Buslov Tested-by: Jamal Hadi Salim Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 853697504de043ff0bfd815bd3a64de1dce73dc7 Author: Cambda Zhu Date: Fri Dec 27 16:52:37 2019 +0800 tcp: Fix highest_sack and highest_sack_seq >From commit 50895b9de1d3 ("tcp: highest_sack fix"), the logic about setting tp->highest_sack to the head of the send queue was removed. Of course the logic is error prone, but it is logical. Before we remove the pointer to the highest sack skb and use the seq instead, we need to set tp->highest_sack to NULL when there is no skb after the last sack, and then replace NULL with the real skb when new skb inserted into the rtx queue, because the NULL means the highest sack seq is tp->snd_nxt. If tp->highest_sack is NULL and new data sent, the next ACK with sack option will increase tp->reordering unexpectedly. This patch sets tp->highest_sack to the tail of the rtx queue if it's NULL and new data is sent. The patch keeps the rule that the highest_sack can only be maintained by sack processing, except for this only case. Fixes: 50895b9de1d3 ("tcp: highest_sack fix") Signed-off-by: Cambda Zhu Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit a33121e5487b424339636b25c35d3a180eaa5f5e Author: Vladis Dronov Date: Fri Dec 27 03:26:27 2019 +0100 ptp: fix the race between the release of ptp_clock and cdev In a case when a ptp chardev (like /dev/ptp0) is open but an underlying device is removed, closing this file leads to a race. This reproduces easily in a kvm virtual machine: ts# cat openptp0.c int main() { ... fp = fopen("/dev/ptp0", "r"); ... sleep(10); } ts# uname -r 5.5.0-rc3-46cf053e ts# cat /proc/cmdline ... slub_debug=FZP ts# modprobe ptp_kvm ts# ./openptp0 & [1] 670 opened /dev/ptp0, sleeping 10s... ts# rmmod ptp_kvm ts# ls /dev/ptp* ls: cannot access '/dev/ptp*': No such file or directory ts# ...woken up [ 48.010809] general protection fault: 0000 [#1] SMP [ 48.012502] CPU: 6 PID: 658 Comm: openptp0 Not tainted 5.5.0-rc3-46cf053e #25 [ 48.014624] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), ... [ 48.016270] RIP: 0010:module_put.part.0+0x7/0x80 [ 48.017939] RSP: 0018:ffffb3850073be00 EFLAGS: 00010202 [ 48.018339] RAX: 000000006b6b6b6b RBX: 6b6b6b6b6b6b6b6b RCX: ffff89a476c00ad0 [ 48.018936] RDX: fffff65a08d3ea08 RSI: 0000000000000247 RDI: 6b6b6b6b6b6b6b6b [ 48.019470] ... ^^^ a slub poison [ 48.023854] Call Trace: [ 48.024050] __fput+0x21f/0x240 [ 48.024288] task_work_run+0x79/0x90 [ 48.024555] do_exit+0x2af/0xab0 [ 48.024799] ? vfs_write+0x16a/0x190 [ 48.025082] do_group_exit+0x35/0x90 [ 48.025387] __x64_sys_exit_group+0xf/0x10 [ 48.025737] do_syscall_64+0x3d/0x130 [ 48.026056] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 48.026479] RIP: 0033:0x7f53b12082f6 [ 48.026792] ... [ 48.030945] Modules linked in: ptp i6300esb watchdog [last unloaded: ptp_kvm] [ 48.045001] Fixing recursive fault but reboot is needed! This happens in: static void __fput(struct file *file) { ... if (file->f_op->release) file->f_op->release(inode, file); <<< cdev is kfree'd here if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL && !(mode & FMODE_PATH))) { cdev_put(inode->i_cdev); <<< cdev fields are accessed here Namely: __fput() posix_clock_release() kref_put(&clk->kref, delete_clock) <<< the last reference delete_clock() delete_ptp_clock() kfree(ptp) <<< cdev is embedded in ptp cdev_put module_put(p->owner) <<< *p is kfree'd, bang! Here cdev is embedded in posix_clock which is embedded in ptp_clock. The race happens because ptp_clock's lifetime is controlled by two refcounts: kref and cdev.kobj in posix_clock. This is wrong. Make ptp_clock's sysfs device a parent of cdev with cdev_device_add() created especially for such cases. This way the parent device with its ptp_clock is not released until all references to the cdev are released. This adds a requirement that an initialized but not exposed struct device should be provided to posix_clock_register() by a caller instead of a simple dev_t. This approach was adopted from the commit 72139dfa2464 ("watchdog: Fix the race between the release of watchdog_core_data and cdev"). See details of the implementation in the commit 233ed09d7fda ("chardev: add helper function to register char devs with a struct device"). Link: https://lore.kernel.org/linux-fsdevel/20191125125342.6189-1-vdronov@redhat.com/T/#u Analyzed-by: Stephen Johnston Analyzed-by: Vern Lovejoy Signed-off-by: Vladis Dronov Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 54fa49ee88138756df0fcf867cb1849904710a8c Author: Vladimir Oltean Date: Fri Dec 27 03:11:13 2019 +0200 net: dsa: sja1105: Reconcile the meaning of TPID and TPID2 for E/T and P/Q/R/S For first-generation switches (SJA1105E and SJA1105T): - TPID means C-Tag (typically 0x8100) - TPID2 means S-Tag (typically 0x88A8) While for the second generation switches (SJA1105P, SJA1105Q, SJA1105R, SJA1105S) it is the other way around: - TPID means S-Tag (typically 0x88A8) - TPID2 means C-Tag (typically 0x8100) In other words, E/T tags untagged traffic with TPID, and P/Q/R/S with TPID2. So the patch mentioned below fixed VLAN filtering for P/Q/R/S, but broke it for E/T. We strive for a common code path for all switches in the family, so just lie in the static config packing functions that TPID and TPID2 are at swapped bit offsets than they actually are, for P/Q/R/S. This will make both switches understand TPID to be ETH_P_8021Q and TPID2 to be ETH_P_8021AD. The meaning from the original E/T was chosen over P/Q/R/S because E/T is actually the one with public documentation available (UM10944.pdf). Fixes: f9a1a7646c0d ("net: dsa: sja1105: Reverse TPID and TPID2") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3a323ed7c9c6d60af05bada0efe7a8ef56cf317f Author: Vladimir Oltean Date: Fri Dec 27 03:08:07 2019 +0200 Documentation: net: dsa: sja1105: Remove text about taprio base-time limitation Since commit 86db36a347b4 ("net: dsa: sja1105: Implement state machine for TAS with PTP clock source"), this paragraph is no longer true. So remove it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d00bdc0a8839de9a5c9be5af2a79dbf8e0087689 Author: Vladimir Oltean Date: Fri Dec 27 03:03:54 2019 +0200 net: dsa: sja1105: Remove restriction of zero base-time for taprio offload The check originates from the initial implementation which was not based on PTP time but on a standalone clock source. In the meantime we can now program the PTPSCHTM register at runtime with the dynamic base time (actually with a value that is 200 ns smaller, to avoid writing DELTA=0 in the Schedule Entry Points Parameters Table). And we also have logic for moving the actual base time in the future of the PHC's current time base, so the check for zero serves no purpose, since even if the user will specify zero, that's not what will end up in the static config table where the limitation is. Fixes: 86db36a347b4 ("net: dsa: sja1105: Implement state machine for TAS with PTP clock source") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5a47f588ee2366b2febdc822cdfdcf856cb0a777 Author: Vladimir Oltean Date: Fri Dec 27 03:01:50 2019 +0200 net: dsa: sja1105: Really make the PTP command read-write When activating tc-taprio offload on the switch ports, the TAS state machine will try to check whether it is running or not, but will find both the STARTED and STOPPED bits as false in the sja1105_tas_check_running function. So the function will return -EINVAL (an abnormal situation) and the kernel will keep printing this from the TAS FSM workqueue: [ 37.691971] sja1105 spi0.1: An operation returned -22 The reason is that the underlying function that gets called, sja1105_ptp_commit, does not actually do a SPI_READ, but a SPI_WRITE. So the command buffer remains initialized with zeroes instead of retrieving the hardware state. Fix that. Fixes: 41603d78b362 ("net: dsa: sja1105: Make the PTP command read-write") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9fcf024dd6fae082f05e8c1fcdae23972b2f6971 Author: Vladimir Oltean Date: Fri Dec 27 02:59:54 2019 +0200 net: dsa: sja1105: Take PTP egress timestamp by port, not mgmt slot The PTP egress timestamp N must be captured from register PTPEGR_TS[n], where n = 2 * PORT + TSREG. There are 10 PTPEGR_TS registers, 2 per port. We are only using TSREG=0. As opposed to the management slots, which are 4 in number (SJA1105_NUM_PORTS, minus the CPU port). Any management frame (which includes PTP frames) can be sent to any non-CPU port through any management slot. When the CPU port is not the last port (#4), there will be a mismatch between the slot and the port number. Luckily, the only mainline occurrence with this switch (arch/arm/boot/dts/ls1021a-tsn.dts) does have the CPU port as #4, so the issue did not manifest itself thus far. Fixes: 47ed985e97f5 ("net: dsa: sja1105: Add logic for TX timestamping") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ca59d5a51690d5b9340343dc36792a252e9414ae Author: Vladimir Oltean Date: Sat Dec 28 15:55:36 2019 +0200 spi: spi-fsl-dspi: Fix 16-bit word order in 32-bit XSPI mode When used in Extended SPI mode on LS1021A, the DSPI controller wants to have the least significant 16-bit word written first to the TX FIFO. In fact, the LS1021A reference manual says: 33.5.2.4.2 Draining the TX FIFO When Extended SPI Mode (DSPIx_MCR[XSPI]) is enabled, if the frame size of SPI Data to be transmitted is more than 16 bits, then it causes two Data entries to be popped from TX FIFO simultaneously which are transferred to the shift register. The first of the two popped entries forms the 16 least significant bits of the SPI frame to be transmitted. So given the following TX buffer: +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ | 0x0 | 0x1 | 0x2 | 0x3 | 0x4 | 0x5 | 0x6 | 0x7 | 0x8 | 0x9 | 0xa | 0xb | +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ | 32-bit word 1 | 32-bit word 2 | 32-bit word 3 | +-----------------------+-----------------------+-----------------------+ The correct way that a little-endian system should transmit it on the wire when bits_per_word is 32 is: 0x03020100 0x07060504 0x0b0a0908 But it is actually transmitted as following, as seen with a scope: 0x01000302 0x05040706 0x09080b0a It appears that this patch has been submitted at least once before: https://lkml.org/lkml/2018/9/21/286 but in that case Chuanhua Han did not manage to explain the problem clearly enough and the patch did not get merged, leaving XSPI mode broken. Fixes: 8fcd151d2619 ("spi: spi-fsl-dspi: XSPI FIFO handling (in TCFQ mode)") Cc: Esben Haabendal Cc: Chuanhua Han Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20191228135536.14284-1-olteanv@gmail.com Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 0caeaf6ad532f9be5a768a158627cb31921cc8b7 Author: Rahul Lakkireddy Date: Mon Dec 30 18:14:08 2019 +0530 cxgb4/cxgb4vf: fix flow control display for auto negotiation As per 802.3-2005, Section Two, Annex 28B, Table 28B-2 [1], when _only_ Rx pause is enabled, both symmetric and asymmetric pause towards local device must be enabled. Also, firmware returns the local device's flow control pause params as part of advertised capabilities and negotiated params as part of current link attributes. So, fix up ethtool's flow control pause params fetch logic to read from acaps, instead of linkattr. [1] https://standards.ieee.org/standard/802_3-2005.html Fixes: c3168cabe1af ("cxgb4/cxgbvf: Handle 32-bit fw port capabilities") Signed-off-by: Surendra Mobiya Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 1f07dcc459d5f2c639f185f6e94829a0c79f2b4c Author: Kees Cook Date: Mon Dec 30 12:01:56 2019 -0800 kernel.h: Remove unused FIELD_SIZEOF() Now that all callers of FIELD_SIZEOF() have been converted to sizeof_field(), remove the unused prior macro. Signed-off-by: Kees Cook commit c1ffba305dbcf3fb9ca969c20a97acbddc38f8e9 Author: Guenter Roeck Date: Thu Dec 26 07:57:54 2019 -0800 usb: chipidea: host: Disable port power only if previously enabled On shutdown, ehci_power_off() is called unconditionally to power off each port, even if it was never called to power on the port. For chipidea, this results in a call to ehci_ci_portpower() with a request to power off ports even if the port was never powered on. This results in the following warning from the regulator code. WARNING: CPU: 0 PID: 182 at drivers/regulator/core.c:2596 _regulator_disable+0x1a8/0x210 unbalanced disables for usb_otg2_vbus Modules linked in: CPU: 0 PID: 182 Comm: init Not tainted 5.4.6 #1 Hardware name: Freescale i.MX7 Dual (Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xe0/0x10c) [] (dump_stack) from [] (__warn+0xf4/0x10c) [] (__warn) from [] (warn_slowpath_fmt+0x78/0xbc) [] (warn_slowpath_fmt) from [] (_regulator_disable+0x1a8/0x210) [] (_regulator_disable) from [] (regulator_disable+0x38/0xe8) [] (regulator_disable) from [] (ehci_ci_portpower+0x38/0xdc) [] (ehci_ci_portpower) from [] (ehci_port_power+0x50/0xa4) [] (ehci_port_power) from [] (ehci_silence_controller+0x5c/0xc4) [] (ehci_silence_controller) from [] (ehci_stop+0x3c/0xcc) [] (ehci_stop) from [] (usb_remove_hcd+0xe0/0x19c) [] (usb_remove_hcd) from [] (host_stop+0x38/0xa8) [] (host_stop) from [] (ci_hdrc_remove+0x44/0xe4) ... Keeping track of the power enable state avoids the warning and traceback. Fixes: c8679a2fb8dec ("usb: chipidea: host: add portpower override") Cc: Michael Grzeschik Cc: Peter Chen Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck Acked-by: Peter Chen Link: https://lore.kernel.org/r/20191226155754.25451-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit af58e1fca9840192f14b6f03c59595d64bff9127 Author: Peter Chen Date: Fri Dec 27 17:10:04 2019 +0800 usb: cdns3: should not use the same dev_id for shared interrupt handler Both drd and gadget interrupt handler use the struct cdns3 pointer as dev_id, it causes devm_free_irq at cdns3_gadget_exit doesn't free gadget's interrupt handler, it freed drd's handler. So, when the host interrupt occurs, the gadget's interrupt hanlder is still called, and causes below oops. To fix it, we use gadget's private data priv_dev as interrupt dev_id for gadget. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000380 Mem abort info: ESR = 0x96000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=0000000971d79000 [0000000000000380] pgd=0000000971d6f003, pud=0000000971d6e003, pmd=0000000000000000 Internal error: Oops: 96000006 [#1] PREEMPT SMP Modules linked in: mxc_jpeg_encdec crct10dif_ce fsl_imx8_ddr_perf CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.0-03486-g69f4e7d9c54a-dirty #254 Hardware name: Freescale i.MX8QM MEK (DT) pstate: 00000085 (nzcv daIf -PAN -UAO) pc : cdns3_device_irq_handler+0x1c/0xb8 lr : __handle_irq_event_percpu+0x78/0x2c0 sp : ffff800010003e30 x29: ffff800010003e30 x28: ffff8000129bb000 x27: ffff8000126e9000 x26: ffff0008f61b5600 x25: ffff800011fe1018 x24: ffff8000126ea120 x23: ffff800010003f04 x22: 0000000000000000 x21: 0000000000000093 x20: ffff0008f61b5600 x19: ffff0008f5061a80 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 003d090000000000 x13: 00003d0900000000 x12: 0000000000000000 x11: 00003d0900000000 x10: 0000000000000040 x9 : ffff800012708cb8 x8 : ffff800012708cb0 x7 : ffff0008f7c7a9d0 x6 : 0000000000000000 x5 : ffff0008f7c7a910 x4 : ffff8008ed359000 x3 : ffff800010003f40 x2 : 0000000000000000 x1 : ffff0008f5061a80 x0 : ffff800010161a60 Call trace: cdns3_device_irq_handler+0x1c/0xb8 __handle_irq_event_percpu+0x78/0x2c0 handle_irq_event_percpu+0x40/0x98 handle_irq_event+0x4c/0xd0 handle_fasteoi_irq+0xbc/0x168 generic_handle_irq+0x34/0x50 __handle_domain_irq+0x6c/0xc0 gic_handle_irq+0xd4/0x174 el1_irq+0xb8/0x180 arch_cpu_idle+0x3c/0x230 default_idle_call+0x38/0x40 do_idle+0x20c/0x298 cpu_startup_entry+0x28/0x48 rest_init+0xdc/0xe8 arch_call_rest_init+0x14/0x1c start_kernel+0x48c/0x4b8 Code: aa0103f3 aa1e03e0 d503201f f9409662 (f941c040) ---[ end trace 091dcf4dee011b0e ]--- Kernel panic - not syncing: Fatal exception in interrupt SMP: stopping secondary CPUs Kernel Offset: disabled CPU features: 0x0002,2100600c Memory Limit: none ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Cc: #v5.4 Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/1577437804-18146-1-git-send-email-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit ea0d762775e20aaff7909a3f0866ff1688b1c618 Author: Thinh Nguyen Date: Fri Dec 13 18:40:45 2019 -0800 usb: dwc3: gadget: Fix request complete check We can only check for IN direction if the request had completed. For OUT direction, it's perfectly fine that the host can send less than the setup length. Let's return true fall all cases of OUT direction. Fixes: e0c42ce590fe ("usb: dwc3: gadget: simplify IOC handling") Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/ac5a3593a94fdaa3d92e6352356b5f7a01ccdc7c.1576291140.git.thinhn@synopsys.com Signed-off-by: Greg Kroah-Hartman commit c80d0f4426c7fdc7efd6ae8d8b021dcfc89b4254 Author: Paul Cercueil Date: Mon Dec 16 10:18:43 2019 -0600 usb: musb: dma: Correct parameter passed to IRQ handler The IRQ handler was passed a pointer to a struct dma_controller, but the argument was then casted to a pointer to a struct musb_dma_controller. Fixes: 427c4f333474 ("usb: struct device - replace bus_id with dev_name(), dev_set_name()") Signed-off-by: Paul Cercueil Tested-by: Artur Rojek Cc: stable@vger.kernel.org Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20191216161844.772-2-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit ce03cbcb4b4fd2a3817f32366001f1ca45d213b8 Author: Paul Cercueil Date: Mon Dec 16 10:24:32 2019 -0600 usb: musb: jz4740: Silence error if code is -EPROBE_DEFER Avoid printing any error message if the error code is -EPROBE_DEFER. Signed-off-by: Paul Cercueil Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20191216162432.1256-1-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit f6ece9b0e52a3ec9fa00281a0d4675a36f8da071 Author: Arnd Bergmann Date: Mon Dec 16 14:18:18 2019 +0100 usb: udc: tegra: select USB_ROLE_SWITCH Without this, this new driver fails to link: drivers/usb/gadget/udc/tegra-xudc.o: In function `tegra_xudc_remove': tegra-xudc.c:(.text+0x19d4): undefined reference to `usb_role_switch_unregister' drivers/usb/gadget/udc/tegra-xudc.o: In function `tegra_xudc_probe': tegra-xudc.c:(.text+0x2a34): undefined reference to `usb_role_switch_register' drivers/usb/gadget/udc/tegra-xudc.o: In function `tegra_xudc_usb_role_sw_work': tegra-xudc.c:(.text+0x4b64): undefined reference to `usb_role_switch_get_role' Fixes: 49db427232fe ("usb: gadget: Add UDC driver for tegra XUSB device mode controller") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191216131831.3228566-1-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 3e4f8e21c4f27bcf30a48486b9dcc269512b79ff Author: Johan Hovold Date: Thu Dec 19 17:10:16 2019 +0100 USB: core: fix check for duplicate endpoints Amend the endpoint-descriptor sanity checks to detect all duplicate endpoint addresses in a configuration. Commit 0a8fd1346254 ("USB: fix problems with duplicate endpoint addresses") added a check for duplicate endpoint addresses within a single alternate setting, but did not look for duplicate addresses in other interfaces. The current check would also not detect all duplicate addresses when one endpoint is as a (bi-directional) control endpoint. This specifically avoids overwriting the endpoint entries in struct usb_device when enabling a duplicate endpoint, something which could potentially lead to crashes or leaks, for example, when endpoints are later disabled. Cc: stable Signed-off-by: Johan Hovold Acked-by: Alan Stern Link: https://lore.kernel.org/r/20191219161016.6695-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 273f632912f1b24b642ba5b7eb5022e43a72f3b5 Author: Sudip Mukherjee Date: Fri Dec 27 17:44:34 2019 +0000 tty: always relink the port If the serial device is disconnected and reconnected, it re-enumerates properly but does not link it. fwiw, linking means just saving the port index, so allow it always as there is no harm in saving the same value again even if it tries to relink with the same port. Fixes: fb2b90014d78 ("tty: link tty and port before configuring it as console") Reported-by: Kenneth R. Crudup Signed-off-by: Sudip Mukherjee Cc: stable Link: https://lore.kernel.org/r/20191227174434.12057-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit e278af89f1ba0a9ef20947db6afc2c9afa37e85b Author: Qian Cai Date: Tue Dec 10 22:30:42 2019 -0500 x86/resctrl: Fix an imbalance in domain_remove_cpu() A system that supports resource monitoring may have multiple resources while not all of these resources are capable of monitoring. Monitoring related state is initialized only for resources that are capable of monitoring and correspondingly this state should subsequently only be removed from these resources that are capable of monitoring. domain_add_cpu() calls domain_setup_mon_state() only when r->mon_capable is true where it will initialize d->mbm_over. However, domain_remove_cpu() calls cancel_delayed_work(&d->mbm_over) without checking r->mon_capable resulting in an attempt to cancel d->mbm_over on all resources, even those that never initialized d->mbm_over because they are not capable of monitoring. Hence, it triggers a debugobjects warning when offlining CPUs because those timer debugobjects are never initialized: ODEBUG: assert_init not available (active state 0) object type: timer_list hint: 0x0 WARNING: CPU: 143 PID: 789 at lib/debugobjects.c:484 debug_print_object Hardware name: HP Synergy 680 Gen9/Synergy 680 Gen9 Compute Module, BIOS I40 05/23/2018 RIP: 0010:debug_print_object Call Trace: debug_object_assert_init del_timer try_to_grab_pending cancel_delayed_work resctrl_offline_cpu cpuhp_invoke_callback cpuhp_thread_fun smpboot_thread_fn kthread ret_from_fork Fixes: e33026831bdb ("x86/intel_rdt/mbm: Handle counter overflow") Signed-off-by: Qian Cai Signed-off-by: Borislav Petkov Acked-by: Reinette Chatre Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: john.stultz@linaro.org Cc: sboyd@kernel.org Cc: Cc: Thomas Gleixner Cc: tj@kernel.org Cc: Tony Luck Cc: Vikas Shivappa Cc: x86-ml Link: https://lkml.kernel.org/r/20191211033042.2188-1-cai@lca.pw commit c7d776f85dfe5159ebf621ee1e50e555237b1a25 Author: Damien Le Moal Date: Thu Dec 26 15:54:25 2019 +0900 null_blk: Fix REQ_OP_ZONE_CLOSE handling In order to match ZBC defined behavior, closing an empty zone must result in the "empty" zone condition instead of the "closed" condition. Fixes: da644b2cc1a4 ("null_blk: add zone open, close, and finish support") Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 429120f3df2dba2bf3a4a19f4212a53ecefc7102 Author: Ming Lei Date: Sun Dec 29 10:32:30 2019 +0800 block: fix splitting segments on boundary masks We ran into a problem with a mpt3sas based controller, where we would see random (and hard to reproduce) file corruption). The issue seemed specific to this controller, but wasn't specific to the file system. After a lot of debugging, we find out that it's caused by segments spanning a 4G memory boundary. This shouldn't happen, as the default setting for segment boundary masks is 4G. Turns out there are two issues in get_max_segment_size(): 1) The default segment boundary mask is bypassed 2) The segment start address isn't taken into account when checking segment boundary limit Fix these two issues by removing the bypass of the segment boundary check even if the mask is set to the default value, and taking into account the actual start address of the request when checking if a segment needs splitting. Cc: stable@vger.kernel.org # v5.1+ Reviewed-by: Chris Mason Tested-by: Chris Mason Fixes: dcebd755926b ("block: use bio_for_each_bvec() to compute multi-page bvec count") Signed-off-by: Ming Lei Dropped const on the page pointer, ppc page_to_phys() doesn't mark the page as const... Signed-off-by: Jens Axboe commit de7999afedff02c6631feab3ea726a0e8f8c3d40 Author: Filipe Manana Date: Wed Dec 11 09:01:40 2019 +0000 Btrfs: fix infinite loop during nocow writeback due to race When starting writeback for a range that covers part of a preallocated extent, due to a race with writeback for another range that also covers another part of the same preallocated extent, we can end up in an infinite loop. Consider the following example where for inode 280 we have two dirty ranges: range A, from 294912 to 303103, 8192 bytes range B, from 348160 to 438271, 90112 bytes and we have the following file extent item layout for our inode: leaf 38895616 gen 24544 total ptrs 29 free space 13820 owner 5 (...) item 27 key (280 108 200704) itemoff 14598 itemsize 53 extent data disk bytenr 0 nr 0 type 1 (regular) extent data offset 0 nr 94208 ram 94208 item 28 key (280 108 294912) itemoff 14545 itemsize 53 extent data disk bytenr 10433052672 nr 81920 type 2 (prealloc) extent data offset 0 nr 81920 ram 81920 Then the following happens: 1) Writeback starts for range B (from 348160 to 438271), execution of run_delalloc_nocow() starts; 2) The first iteration of run_delalloc_nocow()'s whil loop leaves us at the extent item at slot 28, pointing to the prealloc extent item covering the range from 294912 to 376831. This extent covers part of our range; 3) An ordered extent is created against that extent, covering the file range from 348160 to 376831 (28672 bytes); 4) We adjust 'cur_offset' to 376832 and move on to the next iteration of the while loop; 5) The call to btrfs_lookup_file_extent() leaves us at the same leaf, pointing to slot 29, 1 slot after the last item (the extent item we processed in the previous iteration); 6) Because we are a slot beyond the last item, we call btrfs_next_leaf(), which releases the search path before doing a another search for the last key of the leaf (280 108 294912); 7) Right after btrfs_next_leaf() released the path, and before it did another search for the last key of the leaf, writeback for the range A (from 294912 to 303103) completes (it was previously started at some point); 8) Upon completion of the ordered extent for range A, the prealloc extent we previously found got split into two extent items, one covering the range from 294912 to 303103 (8192 bytes), with a type of regular extent (and no longer prealloc) and another covering the range from 303104 to 376831 (73728 bytes), with a type of prealloc and an offset of 8192 bytes. So our leaf now has the following layout: leaf 38895616 gen 24544 total ptrs 31 free space 13664 owner 5 (...) item 27 key (280 108 200704) itemoff 14598 itemsize 53 extent data disk bytenr 0 nr 0 type 1 extent data offset 0 nr 8192 ram 94208 item 28 key (280 108 208896) itemoff 14545 itemsize 53 extent data disk bytenr 10433142784 nr 86016 type 1 extent data offset 0 nr 86016 ram 86016 item 29 key (280 108 294912) itemoff 14492 itemsize 53 extent data disk bytenr 10433052672 nr 81920 type 1 extent data offset 0 nr 8192 ram 81920 item 30 key (280 108 303104) itemoff 14439 itemsize 53 extent data disk bytenr 10433052672 nr 81920 type 2 extent data offset 8192 nr 73728 ram 81920 9) After btrfs_next_leaf() returns, we have our path pointing to that same leaf and at slot 30, since it has a key we didn't have before and it's the first key greater then the key that was previously the last key of the leaf (key (280 108 294912)); 10) The extent item at slot 30 covers the range from 303104 to 376831 which is in our target range, so we process it, despite having already created an ordered extent against this extent for the file range from 348160 to 376831. This is because we skip to the next extent item only if its end is less than or equals to the start of our delalloc range, and not less than or equals to the current offset ('cur_offset'); 11) As a result we compute 'num_bytes' as: num_bytes = min(end + 1, extent_end) - cur_offset; = min(438271 + 1, 376832) - 376832 = 0 12) We then call create_io_em() for a 0 bytes range starting at offset 376832; 13) Then create_io_em() enters an infinite loop because its calls to btrfs_drop_extent_cache() do nothing due to the 0 length range passed to it. So no existing extent maps that cover the offset 376832 get removed, and therefore calls to add_extent_mapping() return -EEXIST, resulting in an infinite loop. This loop from create_io_em() is the following: do { btrfs_drop_extent_cache(BTRFS_I(inode), em->start, em->start + em->len - 1, 0); write_lock(&em_tree->lock); ret = add_extent_mapping(em_tree, em, 1); write_unlock(&em_tree->lock); /* * The caller has taken lock_extent(), who could race with us * to add em? */ } while (ret == -EEXIST); Also, each call to btrfs_drop_extent_cache() triggers a warning because the start offset passed to it (376832) is smaller then the end offset (376832 - 1) passed to it by -1, due to the 0 length: [258532.052621] ------------[ cut here ]------------ [258532.052643] WARNING: CPU: 0 PID: 9987 at fs/btrfs/file.c:602 btrfs_drop_extent_cache+0x3f4/0x590 [btrfs] (...) [258532.052672] CPU: 0 PID: 9987 Comm: fsx Tainted: G W 5.4.0-rc7-btrfs-next-64 #1 [258532.052673] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014 [258532.052691] RIP: 0010:btrfs_drop_extent_cache+0x3f4/0x590 [btrfs] (...) [258532.052695] RSP: 0018:ffffb4be0153f860 EFLAGS: 00010287 [258532.052700] RAX: ffff975b445ee360 RBX: ffff975b44eb3e08 RCX: 0000000000000000 [258532.052700] RDX: 0000000000038fff RSI: 0000000000039000 RDI: ffff975b445ee308 [258532.052700] RBP: 0000000000038fff R08: 0000000000000000 R09: 0000000000000001 [258532.052701] R10: ffff975b513c5c10 R11: 00000000e3c0cfa9 R12: 0000000000039000 [258532.052703] R13: ffff975b445ee360 R14: 00000000ffffffef R15: ffff975b445ee308 [258532.052705] FS: 00007f86a821de80(0000) GS:ffff975b76a00000(0000) knlGS:0000000000000000 [258532.052707] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [258532.052708] CR2: 00007fdacf0f3ab4 CR3: 00000001f9d26002 CR4: 00000000003606f0 [258532.052712] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [258532.052717] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [258532.052717] Call Trace: [258532.052718] ? preempt_schedule_common+0x32/0x70 [258532.052722] ? ___preempt_schedule+0x16/0x20 [258532.052741] create_io_em+0xff/0x180 [btrfs] [258532.052767] run_delalloc_nocow+0x942/0xb10 [btrfs] [258532.052791] btrfs_run_delalloc_range+0x30b/0x520 [btrfs] [258532.052812] ? find_lock_delalloc_range+0x221/0x250 [btrfs] [258532.052834] writepage_delalloc+0xe4/0x140 [btrfs] [258532.052855] __extent_writepage+0x110/0x4e0 [btrfs] [258532.052876] extent_write_cache_pages+0x21c/0x480 [btrfs] [258532.052906] extent_writepages+0x52/0xb0 [btrfs] [258532.052911] do_writepages+0x23/0x80 [258532.052915] __filemap_fdatawrite_range+0xd2/0x110 [258532.052938] btrfs_fdatawrite_range+0x1b/0x50 [btrfs] [258532.052954] start_ordered_ops+0x57/0xa0 [btrfs] [258532.052973] ? btrfs_sync_file+0x225/0x490 [btrfs] [258532.052988] btrfs_sync_file+0x225/0x490 [btrfs] [258532.052997] __x64_sys_msync+0x199/0x200 [258532.053004] do_syscall_64+0x5c/0x250 [258532.053007] entry_SYSCALL_64_after_hwframe+0x49/0xbe [258532.053010] RIP: 0033:0x7f86a7dfd760 (...) [258532.053014] RSP: 002b:00007ffd99af0368 EFLAGS: 00000246 ORIG_RAX: 000000000000001a [258532.053016] RAX: ffffffffffffffda RBX: 0000000000000ec9 RCX: 00007f86a7dfd760 [258532.053017] RDX: 0000000000000004 RSI: 000000000000836c RDI: 00007f86a8221000 [258532.053019] RBP: 0000000000021ec9 R08: 0000000000000003 R09: 00007f86a812037c [258532.053020] R10: 0000000000000001 R11: 0000000000000246 R12: 00000000000074a3 [258532.053021] R13: 00007f86a8221000 R14: 000000000000836c R15: 0000000000000001 [258532.053032] irq event stamp: 1653450494 [258532.053035] hardirqs last enabled at (1653450493): [] _raw_spin_unlock_irq+0x29/0x50 [258532.053037] hardirqs last disabled at (1653450494): [] trace_hardirqs_off_thunk+0x1a/0x20 [258532.053039] softirqs last enabled at (1653449852): [] __do_softirq+0x466/0x6bd [258532.053042] softirqs last disabled at (1653449845): [] irq_exit+0xec/0x120 [258532.053043] ---[ end trace 8476fce13d9ce20a ]--- Which results in flooding dmesg/syslog since btrfs_drop_extent_cache() uses WARN_ON() and not WARN_ON_ONCE(). So fix this issue by changing run_delalloc_nocow()'s loop to move to the next extent item when the current extent item ends at at offset less than or equals to the current offset instead of the start offset. Fixes: 80ff385665b7fc ("Btrfs: update nodatacow code v2") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 46bcff2bfc5e6a8c638d3a32e4f6f6fa4bd01461 Author: Dennis Zhou Date: Wed Dec 11 15:20:15 2019 -0800 btrfs: fix compressed write bio blkcg attribution Bio attribution is handled at bio_set_dev() as once we have a device, we have a corresponding request_queue and then can derive the current css. In special cases, we want to attribute to bio to someone else. This can be done by calling bio_associate_blkg_from_css() or kthread_associate_blkcg() depending on the scenario. Btrfs does this for compressed writeback as they are handled by kworkers, so the latter can be done here. Commit 1a41802701ec ("btrfs: drop bio_set_dev where not needed") removes early bio_set_dev() calls prior to submit_stripe_bio(). This breaks the above assumption that we'll have a request_queue when we are doing association. To fix this, switch to using kthread_associate_blkcg(). Without this, we crash in btrfs/024: [ 3052.093088] BUG: kernel NULL pointer dereference, address: 0000000000000510 [ 3052.107013] #PF: supervisor read access in kernel mode [ 3052.107014] #PF: error_code(0x0000) - not-present page [ 3052.107015] PGD 0 P4D 0 [ 3052.107021] Oops: 0000 [#1] SMP [ 3052.138904] CPU: 42 PID: 201270 Comm: kworker/u161:0 Kdump: loaded Not tainted 5.5.0-rc1-00062-g4852d8ac90a9 #712 [ 3052.138905] Hardware name: Quanta Tioga Pass Single Side 01-0032211004/Tioga Pass Single Side, BIOS F08_3A18 12/20/2018 [ 3052.138912] Workqueue: btrfs-delalloc btrfs_work_helper [ 3052.191375] RIP: 0010:bio_associate_blkg_from_css+0x1e/0x3c0 [ 3052.191379] RSP: 0018:ffffc900210cfc90 EFLAGS: 00010282 [ 3052.191380] RAX: 0000000000000000 RBX: ffff88bfe5573c00 RCX: 0000000000000000 [ 3052.191382] RDX: ffff889db48ec2f0 RSI: ffff88bfe5573c00 RDI: ffff889db48ec2f0 [ 3052.191386] RBP: 0000000000000800 R08: 0000000000203bb0 R09: ffff889db16b2400 [ 3052.293364] R10: 0000000000000000 R11: ffff88a07fffde80 R12: ffff889db48ec2f0 [ 3052.293365] R13: 0000000000001000 R14: ffff889de82bc000 R15: ffff889e2b7bdcc8 [ 3052.293367] FS: 0000000000000000(0000) GS:ffff889ffba00000(0000) knlGS:0000000000000000 [ 3052.293368] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3052.293369] CR2: 0000000000000510 CR3: 0000000002611001 CR4: 00000000007606e0 [ 3052.293370] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3052.293371] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3052.293372] PKRU: 55555554 [ 3052.293376] Call Trace: [ 3052.402552] btrfs_submit_compressed_write+0x137/0x390 [ 3052.402558] submit_compressed_extents+0x40f/0x4c0 [ 3052.422401] btrfs_work_helper+0x246/0x5a0 [ 3052.422408] process_one_work+0x200/0x570 [ 3052.438601] ? process_one_work+0x180/0x570 [ 3052.438605] worker_thread+0x4c/0x3e0 [ 3052.438614] kthread+0x103/0x140 [ 3052.460735] ? process_one_work+0x570/0x570 [ 3052.460737] ? kthread_mod_delayed_work+0xc0/0xc0 [ 3052.460744] ret_from_fork+0x24/0x30 Fixes: 1a41802701ec ("btrfs: drop bio_set_dev where not needed") Reported-by: Chris Murphy Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7b62e66cbbfb463a39bf83e30bdbbb4b9e83fa03 Author: Dennis Zhou Date: Wed Dec 11 16:07:06 2019 -0800 btrfs: punt all bios created in btrfs_submit_compressed_write() Compressed writes happen in the background via kworkers. However, this causes bios to be attributed to root bypassing any cgroup limits from the actual writer. We tag the first bio with REQ_CGROUP_PUNT, which will punt the bio to an appropriate cgroup specific workqueue and attribute the IO properly. However, if btrfs_submit_compressed_write() creates a new bio, we don't tag it the same way. Add the appropriate tagging for subsequent bios. Fixes: ec39f7696ccfa ("Btrfs: use REQ_CGROUP_PUNT for worker thread submitted bios") Reviewed-by: Chris Mason Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit dcbce5fbcc69bf2553f650004aad44bf390eca73 Author: Russell King Date: Fri Nov 29 14:51:35 2019 +0000 watchdog: orion: fix platform_get_irq() complaints Fix: orion_wdt f1020300.watchdog: IRQ index 1 not found which is caused by platform_get_irq() now complaining when optional IRQs are not found. Neither interrupt for orion is required, so make them both optional. Signed-off-by: Russell King Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/E1iahcN-0000AT-Co@rmk-PC.armlinux.org.uk Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a76dfb859cd42df6e3d1910659128ffcd2fb6ba2 Author: Andreas Kemnade Date: Fri Dec 13 22:48:02 2019 +0100 watchdog: rn5t618_wdt: fix module aliases Platform device aliases were missing so module autoloading did not work. Signed-off-by: Andreas Kemnade Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191213214802.22268-1-andreas@kemnade.info Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9a6c274ac1c4346f5384f2290caeb42dc674c471 Author: YueHaibing Date: Fri Dec 6 20:42:59 2019 +0800 watchdog: tqmx86_wdt: Fix build error If TQMX86_WDT is y and WATCHDOG_CORE is m, building fails: drivers/watchdog/tqmx86_wdt.o: In function `tqmx86_wdt_probe': tqmx86_wdt.c:(.text+0x46e): undefined reference to `watchdog_init_timeout' tqmx86_wdt.c:(.text+0x4e0): undefined reference to `devm_watchdog_register_device' Select WATCHDOG_CORE to fix this. Reported-by: Hulk Robot Fixes: e3c21e088f89 ("watchdog: tqmx86: Add watchdog driver for the IO controller") Signed-off-by: YueHaibing Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191206124259.25880-1-yuehaibing@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit da9e3f4e30a53cd420cf1e6961c3b4110f0f21f0 Author: David Engraf Date: Wed Nov 27 09:46:17 2019 +0100 watchdog: max77620_wdt: fix potential build errors max77620_wdt uses watchdog core functions. Enable CONFIG_WATCHDOG_CORE to fix potential build errors. Signed-off-by: David Engraf Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191127084617.16937-1-david.engraf@sysgo.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 91ced83c6eab0d17d845d290c0266ed7ad04fa79 Author: Fabio Estevam Date: Wed Nov 20 11:09:16 2019 -0300 watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable() Since commit 747d88a1a88c1b ("watchdog: imx7ulp: Pass the wdog instance in imx7ulp_wdt_enable()") imx7ulp_wdt_enable() accepts a watchdog_device structure, so fix one instance that missed such conversion. This also fixes the following sparse warning: drivers/watchdog/imx7ulp_wdt.c:115:31: warning: incorrect type in argument 1 (different address spaces) drivers/watchdog/imx7ulp_wdt.c:115:31: expected struct watchdog_device *wdog drivers/watchdog/imx7ulp_wdt.c:115:31: got void [noderef] *base Fixes: 747d88a1a88c1 ("watchdog: imx7ulp: Pass the wdog instance inimx7ulp_wdt_enable()") Signed-off-by: Fabio Estevam Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191120140916.25001-1-festevam@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit afcd5b9be566e43f4433ebcdd4de2c4e9054fd65 Author: Srikanth Krishnakar Date: Wed Sep 18 21:34:58 2019 +0530 watchdog: w83627hf_wdt: Fix support NCT6116D We should select nct6116 for the new chip, not nct6102. Signed-off-by: Srikanth Krishnakar Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 205608749e1ef394f513888091e613c5bfccbcca Author: Mehmet Akif Tasova Date: Fri Dec 13 23:35:10 2019 +0300 Revert "iwlwifi: mvm: fix scan config command size" Since v5.4-rc1 was released, iwlwifi started throwing errors when scan commands were sent to the firmware with certain devices (depending on the OTP burned in the device, which contains the list of available channels). For instance: iwlwifi 0000:00:14.3: FW error in SYNC CMD SCAN_CFG_CMD This bug was reported in the ArchLinux bug tracker: https://bugs.archlinux.org/task/64703 And also in a specific case in bugzilla, when the lar_disabled option was set: https://bugzilla.kernel.org/show_bug.cgi?id=205193 Revert the commit that introduced this error, by using the number of channels from the OTP instead of the number of channels that is specified in the FW TLV that tells us how many channels it supports. This reverts commit 06eb547c4ae4382e70d556ba213d13c95ca1801b. Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Mehmet Akif Tasova [ Luca: reworded the commit message a bit. ] Signed-off-by: Luca Coelho commit 1b789577f655060d98d20ed0c6f9fbd469d6ba63 Author: Florian Westphal Date: Fri Dec 27 01:33:10 2019 +0100 netfilter: arp_tables: init netns pointer in xt_tgchk_param struct We get crash when the targets checkentry function tries to make use of the network namespace pointer for arptables. When the net pointer got added back in 2010, only ip/ip6/ebtables were changed to initialize it, so arptables has this set to NULL. This isn't a problem for normal arptables because no existing arptables target has a checkentry function that makes use of par->net. However, direct users of the setsockopt interface can provide any target they want as long as its registered for ARP or UNPSEC protocols. syzkaller managed to send a semi-valid arptables rule for RATEEST target which is enough to trigger NULL deref: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN RIP: xt_rateest_tg_checkentry+0x11d/0xb40 net/netfilter/xt_RATEEST.c:109 [..] xt_check_target+0x283/0x690 net/netfilter/x_tables.c:1019 check_target net/ipv4/netfilter/arp_tables.c:399 [inline] find_check_entry net/ipv4/netfilter/arp_tables.c:422 [inline] translate_table+0x1005/0x1d70 net/ipv4/netfilter/arp_tables.c:572 do_replace net/ipv4/netfilter/arp_tables.c:977 [inline] do_arpt_set_ctl+0x310/0x640 net/ipv4/netfilter/arp_tables.c:1456 Fixes: add67461240c1d ("netfilter: add struct net * to target parameters") Reported-by: syzbot+d7358a458d8a81aee898@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Acked-by: Cong Wang Signed-off-by: Pablo Neira Ayuso commit 6da3eced8c5f3b03340b0c395bacd552c4d52411 Author: Jason A. Donenfeld Date: Mon Dec 23 14:31:47 2019 +0100 powerpc/spinlocks: Include correct header for static key Recently, the spinlock implementation grew a static key optimization, but the jump_label.h header include was left out, leading to build errors: linux/arch/powerpc/include/asm/spinlock.h:44:7: error: implicit declaration of function ‘static_branch_unlikely’ 44 | if (!static_branch_unlikely(&shared_processor)) This commit adds the missing header. mpe: The build break is only seen with CONFIG_JUMP_LABEL=n. Fixes: 656c21d6af5d ("powerpc/shared: Use static key to detect shared processor") Signed-off-by: Jason A. Donenfeld Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191223133147.129983-1-Jason@zx2c4.com commit 060dc911501f6ee222569304f50962172a52b1d6 Author: Mike Rapoport Date: Mon Dec 23 13:00:04 2019 +0200 nds32: fix build failure caused by page table folding updates The commit 7c2763c42326 ("nds32: use pgtable-nopmd instead of 4level-fixup") missed the pmd_off_k() macro which caused the following build error: CC arch/nds32/mm/highmem.o In file included from arch/nds32/include/asm/page.h:57, from include/linux/mm_types_task.h:16, from include/linux/mm_types.h:5, from include/linux/mmzone.h:21, from include/linux/gfp.h:6, from include/linux/xarray.h:14, from include/linux/radix-tree.h:18, from include/linux/fs.h:15, from include/linux/highmem.h:5, from arch/nds32/mm/highmem.c:5: arch/nds32/mm/highmem.c: In function 'kmap_atomic': arch/nds32/include/asm/pgtable.h:360:44: error: passing argument 1 of 'pmd_offset' from incompatible pointer type [-Werror=incompatible-pointer-types] #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address)) ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ arch/nds32/include/asm/memory.h:33:29: note: in definition of macro '__phys_to_virt' #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) ^ arch/nds32/include/asm/pgtable.h:193:55: note: in expansion of macro '__va' #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) ^~~~ include/asm-generic/pgtable-nop4d.h:41:24: note: in expansion of macro 'pgd_val' #define p4d_val(x) (pgd_val((x).pgd)) ^~~~~~~ include/asm-generic/pgtable-nopud.h:50:24: note: in expansion of macro 'p4d_val' #define pud_val(x) (p4d_val((x).p4d)) ^~~~~~~ include/asm-generic/pgtable-nopmd.h:49:24: note: in expansion of macro 'pud_val' #define pmd_val(x) (pud_val((x).pud)) ^~~~~~~ arch/nds32/include/asm/pgtable.h:193:60: note: in expansion of macro 'pmd_val' #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) ^~~~~~~ arch/nds32/include/asm/pgtable.h:190:56: note: in expansion of macro 'pmd_page_kernel' #define pte_offset_kernel(dir, address) ((pte_t *)pmd_page_kernel(*(dir)) + pte_index(address)) ^~~~~~~~~~~~~~~ arch/nds32/mm/highmem.c:52:9: note: in expansion of macro 'pte_offset_kernel' ptep = pte_offset_kernel(pmd_off_k(vaddr), vaddr); ^~~~~~~~~~~~~~~~~ arch/nds32/include/asm/pgtable.h:362:33: note: in expansion of macro 'pgd_offset' #define pgd_offset_k(addr) pgd_offset(&init_mm, addr) ^~~~~~~~~~ arch/nds32/include/asm/pgtable.h:198:39: note: in expansion of macro 'pgd_offset_k' #define pmd_off_k(address) pmd_offset(pgd_offset_k(address), address) ^~~~~~~~~~~~ arch/nds32/mm/highmem.c:52:27: note: in expansion of macro 'pmd_off_k' ptep = pte_offset_kernel(pmd_off_k(vaddr), vaddr); ^~~~~~~~~ In file included from arch/nds32/include/asm/pgtable.h:7, from include/linux/mm.h:99, from include/linux/highmem.h:8, from arch/nds32/mm/highmem.c:5: include/asm-generic/pgtable-nopmd.h:44:42: note: expected 'pud_t *' {aka 'struct *'} but argument is of type 'pgd_t *' {aka 'long unsigned int *'} static inline pmd_t * pmd_offset(pud_t * pud, unsigned long address) ~~~~~~~~^~~ In file included from arch/nds32/include/asm/page.h:57, from include/linux/mm_types_task.h:16, from include/linux/mm_types.h:5, from include/linux/mmzone.h:21, from include/linux/gfp.h:6, from include/linux/xarray.h:14, from include/linux/radix-tree.h:18, from include/linux/fs.h:15, from include/linux/highmem.h:5, from arch/nds32/mm/highmem.c:5: Updating the pmd_off_k() macro to use the correct page table unfolding fixes the issue. Fixes: 7c2763c42326 ("nds32: use pgtable-nopmd instead of 4level-fixup") Link: https://lore.kernel.org/lkml/201912212139.yptX8CsV%25lkp@intel.com/ Reported-by: kbuild test robot Signed-off-by: Mike Rapoport Reviewed-by: Greentime Hu Signed-off-by: Arnd Bergmann commit 4f0bd808134d73184054ad09173821c84f31dd5d Author: Mike Rapoport Date: Mon Dec 23 13:00:03 2019 +0200 asm-generic/nds32: don't redefine cacheflush primitives The commit c296d4dc13ae ("asm-generic: fix a compilation warning") changed asm-generic/cachflush.h to use static inlines instead of macros and as a result the nds32 build with CONFIG_CPU_CACHE_ALIASING=n fails: CC init/main.o In file included from arch/nds32/include/asm/cacheflush.h:43, from include/linux/highmem.h:12, from include/linux/pagemap.h:11, from include/linux/blkdev.h:16, from include/linux/blk-cgroup.h:23, from include/linux/writeback.h:14, from init/main.c:44: include/asm-generic/cacheflush.h:50:20: error: static declaration of 'flush_icache_range' follows non-static declaration static inline void flush_icache_range(unsigned long start, unsigned long end) ^~~~~~~~~~~~~~~~~~ In file included from include/linux/highmem.h:12, from include/linux/pagemap.h:11, from include/linux/blkdev.h:16, from include/linux/blk-cgroup.h:23, from include/linux/writeback.h:14, from init/main.c:44: arch/nds32/include/asm/cacheflush.h:11:6: note: previous declaration of 'flush_icache_range' was here void flush_icache_range(unsigned long start, unsigned long end); ^~~~~~~~~~~~~~~~~~ Surround the inline functions in asm-generic/cacheflush.h by ifdef's so that architectures could override them and add the required overrides to nds32. Fixes: c296d4dc13ae ("asm-generic: fix a compilation warning") Link: https://lore.kernel.org/lkml/201912212139.yptX8CsV%25lkp@intel.com/ Reported-by: kbuild test robot Signed-off-by: Mike Rapoport Reviewed-by: Greentime Hu Signed-off-by: Arnd Bergmann commit 48e01504cf5315cbe6de9b7412e792bfcc3dd9e1 Author: Chris Chiu Date: Mon Dec 30 11:11:18 2019 +0800 ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC ASUS reported that there's an bass speaker in addition to internal speaker and it uses DAC 0x02. It was not enabled in the commit 436e25505f34 ("ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC") which only enables the amplifier and the front speaker. This commit enables the bass speaker on top of the aforementioned work to improve the acoustic experience. Fixes: 436e25505f34 ("ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC") Signed-off-by: Chris Chiu Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20191230031118.95076-1-chiu@endlessm.com Signed-off-by: Takashi Iwai commit fd6988496e79a6a4bdb514a4655d2920209eb85d Author: Linus Torvalds Date: Sun Dec 29 15:29:16 2019 -0800 Linux 5.5-rc4 commit 1479a82d82df68dfac29c72c774cb8bdc17d4eb1 Author: Srinivas Pandruvada Date: Fri Dec 27 13:40:57 2019 -0800 HID: intel-ish-hid: ipc: Add Tiger Lake PCI device ID Added Tiger Lake PCI device ID to the supported device list. Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 3faf6eda74c236bd87eef8e415d976e5a8cd6a5a Merge: bd6f48546b9c acca789a358c Author: David S. Miller Date: Sun Dec 29 12:29:14 2019 -0800 Merge branch 'mlxsw-fixes' Ido Schimmel says: ==================== mlxsw: Couple of fixes This patch set contains two fixes for mlxsw. Please consider both for stable. Patch #1 from Amit fixes a wrong check during MAC validation when creating router interfaces (RIFs). Given a particular order of configuration this can result in the driver refusing to create new RIFs. Patch #2 fixes a wrong trap configuration in which VRRP packets and routing exceptions were policed by the same policer towards the CPU. In certain situations this can prevent VRRP packets from reaching the CPU. ==================== Signed-off-by: David S. Miller commit acca789a358cc960be3937851d7de6591c79d6c2 Author: Ido Schimmel Date: Sun Dec 29 13:40:23 2019 +0200 mlxsw: spectrum: Use dedicated policer for VRRP packets Currently, VRRP packets and packets that hit exceptions during routing (e.g., MTU error) are policed using the same policer towards the CPU. This means, for example, that misconfiguration of the MTU on a routed interface can prevent VRRP packets from reaching the CPU, which in turn can cause the VRRP daemon to assume it is the Master router. Fix this by using a dedicated policer for VRRP packets. Fixes: 11566d34f895 ("mlxsw: spectrum: Add VRRP traps") Signed-off-by: Ido Schimmel Reported-by: Alex Veber Tested-by: Alex Veber Signed-off-by: David S. Miller commit 314bd842d98e1035cc40b671a71e07f48420e58f Author: Amit Cohen Date: Sun Dec 29 13:40:22 2019 +0200 mlxsw: spectrum_router: Skip loopback RIFs during MAC validation When a router interface (RIF) is created the MAC address of the backing netdev is verified to have the same MSBs as existing RIFs. This is required in order to avoid changing existing RIF MAC addresses that all share the same MSBs. Loopback RIFs are special in this regard as they do not have a MAC address, given they are only used to loop packets from the overlay to the underlay. Without this change, an error is returned when trying to create a RIF after the creation of a GRE tunnel that is represented by a loopback RIF. 'rif->dev->dev_addr' points to the GRE device's local IP, which does not share the same MSBs as physical interfaces. Adding an IP address to any physical interface results in: Error: mlxsw_spectrum: All router interface MAC addresses must have the same prefix. Fix this by skipping loopback RIFs during MAC validation. Fixes: 74bc99397438 ("mlxsw: spectrum_router: Veto unsupported RIF MAC addresses") Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a99efa00891b66405ebd25e49868efc701fe1546 Merge: d75663868d60 1833e327a5ea Author: Linus Torvalds Date: Sun Dec 29 10:01:27 2019 -0800 Merge tag 'riscv/for-v5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Paul Walmsley: "One important fix for RISC-V: - Redirect any incoming syscall with an ID less than -1 to sys_ni_syscall, rather than allowing them to fall through into the syscall handler. and two minor build fixes: - Export __asm_copy_{from,to}_user() from where they are defined. This fixes a build error triggered by some randconfigs. - Export flush_icache_all(). I'd resisted this before, since historically we didn't want modules to be able to flush the I$ directly; but apparently everyone else is doing it now" * tag 'riscv/for-v5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: export flush_icache_all to modules riscv: reject invalid syscalls below -1 riscv: fix compile failure with EXPORT_SYMBOL() & !MMU commit d75663868d60f74bda33135fd737a7967532c357 Merge: cc2f36ec7188 98ca480a8f22 Author: Linus Torvalds Date: Sun Dec 29 09:50:57 2019 -0800 Merge tag 'locks-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull /proc/locks formatting fix from Jeff Layton: "This is a trivial fix for a _very_ long standing bug in /proc/locks formatting. Ordinarily, I'd wait for the merge window for something like this, but it is making it difficult to validate some overlayfs fixes. I've also gone ahead and marked this for stable" * tag 'locks-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: print unsigned ino in /proc/locks commit cc2f36ec7188e48c2afb1428fc3ce18884ad634b Merge: bf8d1cd43865 046aca3c25fd Author: Linus Torvalds Date: Sun Dec 29 09:48:47 2019 -0800 Merge tag '5.5-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "One performance fix for large directory searches, and one minor style cleanup noticed by Clang" * tag '5.5-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Optimize readdir on reparse points cifs: Adjust indentation in smb2_open_file commit 98ca480a8f22fdbd768e3dad07024c8d4856576c Author: Amir Goldstein Date: Sun Dec 22 20:45:28 2019 +0200 locks: print unsigned ino in /proc/locks An ino is unsigned, so display it as such in /proc/locks. Cc: stable@vger.kernel.org Signed-off-by: Amir Goldstein Signed-off-by: Jeff Layton commit 0aec96f5897ac16ad9945f531b4bef9a2edd2ebd Author: Takashi Iwai Date: Wed Dec 18 20:26:06 2019 +0100 ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support code Jia-Ju Bai reported a possible sleep-in-atomic scenario in the ice1724 driver with Infrasonic Quartet support code: namely, ice->set_rate callback gets called inside ice->reg_lock spinlock, while the callback in quartet.c holds ice->gpio_mutex. This patch fixes the invalid call: it simply moves the calls of ice->set_rate and ice->set_mclk callbacks outside the spinlock. Reported-by: Jia-Ju Bai Cc: Link: https://lore.kernel.org/r/5d43135e-73b9-a46a-2155-9e91d0dcdf83@gmail.com Link: https://lore.kernel.org/r/20191218192606.12866-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit e0c63812352298efbce2a71483c1dab627d0c288 Author: changzhu Date: Thu Dec 12 13:46:06 2019 +0800 drm/amdgpu: enable gfxoff for raven1 refresh When smu version is larger than 0x41e2b, it will load raven_kicker_rlc.bin.To enable gfxoff for raven_kicker_rlc.bin,it needs to avoid adev->pm.pp_feature &= ~PP_GFXOFF_MASK when it loads raven_kicker_rlc.bin. Signed-off-by: changzhu Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 1c455101c6d10c99b310d6bcf613244c97854012 Author: Alex Deucher Date: Tue Dec 17 09:51:40 2019 -0500 drm/amdgpu/smu: add metrics table lock for vega20 (v2) To protect access to the metrics table. v2: unlock on error Bug: https://gitlab.freedesktop.org/drm/amd/issues/900 Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit e0e384c398d4638e54b6d2098f0ceaafdab870ee Author: Alex Deucher Date: Tue Dec 17 09:50:42 2019 -0500 drm/amdgpu/smu: add metrics table lock for navi (v2) To protect access to the metrics table. v2: unlock on error Bug: https://gitlab.freedesktop.org/drm/amd/issues/900 Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 1da87c9f67c98d552679974dbfc1f0f65b6a0a53 Author: Alex Deucher Date: Tue Dec 17 09:49:52 2019 -0500 drm/amdgpu/smu: add metrics table lock for arcturus (v2) To protect access to the metrics table. v2: unlock on error Bug: https://gitlab.freedesktop.org/drm/amd/issues/900 Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 073d5eef9e043c2b7e3ef12bc6c879b1d248e831 Author: Alex Deucher Date: Tue Dec 17 09:35:01 2019 -0500 drm/amdgpu/smu: add metrics table lock This table is used for lots of things, add it's own lock. Bug: https://gitlab.freedesktop.org/drm/amd/issues/900 Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 5d30ed3c2c74eb123668d0746e23105c8fc8aed3 Author: Alex Deucher Date: Fri Dec 20 18:57:16 2019 -0500 Revert "drm/amdgpu: simplify ATPX detection" This reverts commit f5fda6d89afe6e9cedaa1c3303903c905262f6e8. You can't use BASE_CLASS in pci_get_class. Bug: https://gitlab.freedesktop.org/drm/amd/issues/995 Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 7ecc6c1d5c8dbc713c647512a5267ca0eafe3e1c Author: Eugeniy Paltsev Date: Fri Dec 27 21:03:43 2019 +0300 ARC: pt_regs: remove hardcoded registers offset Replace hardcoded registers offset numbers by calculated via offsetof. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 85a8ce62c2eabe28b9d76ca4eecf37922402df93 Author: Ming Lei Date: Sat Dec 28 07:05:48 2019 +0800 block: add bio_truncate to fix guard_bio_eod Some filesystem, such as vfat, may send bio which crosses device boundary, and the worse thing is that the IO request starting within device boundaries can contain more than one segment past EOD. Commit dce30ca9e3b6 ("fs: fix guard_bio_eod to check for real EOD errors") tries to fix this issue by returning -EIO for this situation. However, this way lets fs user code lose chance to handle -EIO, then sync_inodes_sb() may hang for ever. Also the current truncating on last segment is dangerous by updating the last bvec, given bvec table becomes not immutable any more, and fs bio users may not retrieve the truncated pages via bio_for_each_segment_all() in its .end_io callback. Fixes this issue by supporting multi-segment truncating. And the approach is simpler: - just update bio size since block layer can make correct bvec with the updated bio size. Then bvec table becomes really immutable. - zero all truncated segments for read bio Cc: Carlos Maiolino Cc: linux-fsdevel@vger.kernel.org Fixed-by: dce30ca9e3b6 ("fs: fix guard_bio_eod to check for real EOD errors") Reported-by: syzbot+2b9e54155c8c25d8d165@syzkaller.appspotmail.com Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 1833e327a5ea1d1f356fbf6ded0760c9ff4b0594 Author: Olof Johansson Date: Mon Dec 16 20:07:04 2019 -0800 riscv: export flush_icache_all to modules This is needed by LKDTM (crash dump test module), it calls flush_icache_range(), which on RISC-V turns into flush_icache_all(). On other architectures, the actual implementation is exported, so follow that precedence and export it here too. Fixes build of CONFIG_LKDTM that fails with: ERROR: "flush_icache_all" [drivers/misc/lkdtm/lkdtm.ko] undefined! Signed-off-by: Olof Johansson Signed-off-by: Paul Walmsley commit 556f47ac6083d778843e89aa21b1242eee2693ed Author: David Abdurachmanov Date: Wed Dec 18 10:47:56 2019 +0200 riscv: reject invalid syscalls below -1 Running "stress-ng --enosys 4 -t 20 -v" showed a large number of kernel oops with "Unable to handle kernel paging request at virtual address" message. This happens when enosys stressor starts testing random non-valid syscalls. I forgot to redirect any syscall below -1 to sys_ni_syscall. With the patch kernel oops messages are gone while running stress-ng enosys stressor. Signed-off-by: David Abdurachmanov Fixes: 5340627e3fe0 ("riscv: add support for SECCOMP and SECCOMP_FILTER") Signed-off-by: Paul Walmsley commit 4d47ce158efb7b145c680e79cd33e3c6fd773de4 Author: Luc Van Oostenryck Date: Sun Dec 22 10:26:04 2019 +0100 riscv: fix compile failure with EXPORT_SYMBOL() & !MMU When support for !MMU was added, the declaration of __asm_copy_to_user() & __asm_copy_from_user() were #ifdefed out hence their EXPORT_SYMBOL() give an error message like: .../riscv_ksyms.c:13:15: error: '__asm_copy_to_user' undeclared here .../riscv_ksyms.c:14:15: error: '__asm_copy_from_user' undeclared here Since these symbols are not defined with !MMU it's wrong to export them. Same for __clear_user() (even though this one is also declared in include/asm-generic/uaccess.h and thus doesn't give an error message). Fix this by doing the EXPORT_SYMBOL() directly where these symbols are defined: inside lib/uaccess.S itself. Fixes: 6bd33e1ece52 ("riscv: fix compile failure with EXPORT_SYMBOL() & !MMU") Reported-by: kbuild test robot Cc: Christoph Hellwig Cc: Palmer Dabbelt Cc: Paul Walmsley Signed-off-by: Luc Van Oostenryck Signed-off-by: Paul Walmsley commit bf8d1cd4386535004c4afe7f03d37f9864c9940e Merge: 48a8dd171993 e4dc9a4c31fe Author: Linus Torvalds Date: Fri Dec 27 17:28:41 2019 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four fixes and one spelling update, all in drivers: two in lpfc and the rest in mp3sas, cxgbi and target" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target/iblock: Fix protection error with blocks greater than 512B scsi: libcxgbi: fix NULL pointer dereference in cxgbi_device_destroy() scsi: lpfc: fix spelling mistakes of asynchronous scsi: lpfc: fix build failure with DEBUGFS disabled scsi: mpt3sas: Fix double free in attach error handling commit bd6f48546b9cb7a785344fc78058c420923d7ed8 Author: Martin Blumenstingl Date: Thu Dec 26 20:01:01 2019 +0100 net: stmmac: dwmac-meson8b: Fix the RGMII TX delay on Meson8b/8m2 SoCs GXBB and newer SoCs use the fixed FCLK_DIV2 (1GHz) clock as input for the m250_sel clock. Meson8b and Meson8m2 use MPLL2 instead, whose rate can be adjusted at runtime. So far we have been running MPLL2 with ~250MHz (and the internal m250_div with value 1), which worked enough that we could transfer data with an TX delay of 4ns. Unfortunately there is high packet loss with an RGMII PHY when transferring data (receiving data works fine though). Odroid-C1's u-boot is running with a TX delay of only 2ns as well as the internal m250_div set to 2 - no lost (TX) packets can be observed with that setting in u-boot. Manual testing has shown that the TX packet loss goes away when using the following settings in Linux (the vendor kernel uses the same settings): - MPLL2 clock set to ~500MHz - m250_div set to 2 - TX delay set to 2ns on the MAC side Update the m250_div divider settings to only accept dividers greater or equal 2 to fix the TX delay generated by the MAC. iperf3 results before the change: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 182 MBytes 153 Mbits/sec 514 sender [ 5] 0.00-10.00 sec 182 MBytes 152 Mbits/sec receiver iperf3 results after the change (including an updated TX delay of 2ns): [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-10.00 sec 927 MBytes 778 Mbits/sec 0 sender [ 5] 0.00-10.01 sec 927 MBytes 777 Mbits/sec receiver Fixes: 4f6a71b84e1afd ("net: stmmac: dwmac-meson8b: fix internal RGMII clock configuration") Signed-off-by: Martin Blumenstingl Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 70cf3dc7313207816255b9acb0dffb19dae78144 Author: Shmulik Ladkani Date: Wed Dec 25 10:51:01 2019 +0200 net/sched: act_mirred: Pull mac prior redir to non mac_header_xmit device There's no skb_pull performed when a mirred action is set at egress of a mac device, with a target device/action that expects skb->data to point at the network header. As a result, either the target device is errornously given an skb with data pointing to the mac (egress case), or the net stack receives the skb with data pointing to the mac (ingress case). E.g: # tc qdisc add dev eth9 root handle 1: prio # tc filter add dev eth9 parent 1: prio 9 protocol ip handle 9 basic \ action mirred egress redirect dev tun0 (tun0 is a tun device. result: tun0 errornously gets the eth header instead of the iph) Revise the push/pull logic of tcf_mirred_act() to not rely on the skb_at_tc_ingress() vs tcf_mirred_act_wants_ingress() comparison, as it does not cover all "pull" cases. Instead, calculate whether the required action on the target device requires the data to point at the network header, and compare this to whether skb->data points to network header - and make the push/pull adjustments as necessary. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Shmulik Ladkani Tested-by: Jamal Hadi Salim Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 862dd2a946aa1417f013fb748e2aa0f4349b405b Author: Vladimir Oltean Date: Fri Dec 27 03:24:17 2019 +0200 spi: Don't look at TX buffer for PTP system timestamping The API for PTP system timestamping (associating a SPI transaction with the system time at which it was transferred) is flawed: it assumes that the xfer->tx_buf pointer will always be present. This is, of course, not always the case. So introduce a "progress" variable that denotes how many word have been transferred. Fix the Freescale DSPI driver, the only user of the API so far, in the same patch. Fixes: b42faeee718c ("spi: Add a PTP system timestamp to the transfer structure") Fixes: d6b71dfaeeba ("spi: spi-fsl-dspi: Implement the PTP system timestamping for TCFQ mode") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20191227012417.1057-1-olteanv@gmail.com Signed-off-by: Mark Brown commit 48a8dd171993569cb77dee0882a47abad47d2837 Merge: f4b3974602a5 e31d941c7dd7 Author: Linus Torvalds Date: Fri Dec 27 13:21:06 2019 -0800 Merge tag 'drm-fixes-2019-12-28' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Post-xmas food coma recovery fixes. Only three fixes for i915 since I expect most people are holidaying. i915: - power management rc6 fix - framebuffer tracking fix - display power management ratelimit fix" * tag 'drm-fixes-2019-12-28' of git://anongit.freedesktop.org/drm/drm: drm/i915: Hold reference to intel_frontbuffer as we track activity drm/i915/gt: Ratelimit display power w/a drm/i915/pmu: Ensure monotonic rc6 commit f4b3974602a5b527b22c3a0dc61ba71190ea2aa5 Merge: 1413c361328c 2a1f40adfb54 Author: Linus Torvalds Date: Fri Dec 27 11:30:26 2019 -0800 Merge tag 'linux-kselftest-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: - rseq build failures fixes related to glibc 2.30 compatibility from Mathieu Desnoyers - Kunit fixes and cleanups from SeongJae Park - Fixes to filesystems/epoll, firmware, and livepatch build failures and skip handling. * tag 'linux-kselftest-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: rseq/selftests: Clarify rseq_prepare_unload() helper requirements rseq/selftests: Fix: Namespace gettid() for compatibility with glibc 2.30 rseq/selftests: Turn off timeout setting kunit/kunit_tool_test: Test '--build_dir' option run kunit: Rename 'kunitconfig' to '.kunitconfig' kunit: Place 'test.log' under the 'build_dir' kunit: Create default config in '--build_dir' kunit: Remove duplicated defconfig creation docs/kunit/start: Use in-tree 'kunit_defconfig' selftests: livepatch: Fix it to do root uid check and skip selftests: firmware: Fix it to do root uid check and skip selftests: filesystems/epoll: fix build error commit 1413c361328c3ecd2cfe1e331f7b7d222d0712bc Merge: 534121d289e0 2cb7bfc1ca9a Author: Linus Torvalds Date: Fri Dec 27 11:26:54 2019 -0800 Merge tag 'pm-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Fix compile test of the Tegra devfreq driver (Arnd Bergmann) and remove redundant Kconfig dependencies from multiple devfreq drivers (Leonard Crestez)" * tag 'pm-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / devfreq: tegra: Add COMMON_CLK dependency PM / devfreq: Drop explicit selection of PM_OPP commit 534121d289e06827ee84c9262267ca5ebf1d9fd9 Merge: 0f710a5572ea fd1c4bc6e9b3 Author: Linus Torvalds Date: Fri Dec 27 11:17:08 2019 -0800 Merge tag 'io_uring-5.5-20191226' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - Removal of now unused busy wqe list (Hillf) - Add cond_resched() to io-wq work processing (Hillf) - And then the series that I hinted at from last week, which removes the sqe from the io_kiocb and keeps all sqe handling on the prep side. This guarantees that an opcode can't do the wrong thing and read the sqe more than once. This is unchanged from last week, no issues have been observed with this in testing. Hence I really think we should fold this into 5.5. * tag 'io_uring-5.5-20191226' of git://git.kernel.dk/linux-block: io-wq: add cond_resched() to worker thread io-wq: remove unused busy list from io_sqe io_uring: pass in 'sqe' to the prep handlers io_uring: standardize the prep methods io_uring: read 'count' for IORING_OP_TIMEOUT in prep handler io_uring: move all prep state for IORING_OP_{SEND,RECV}_MGS to prep handler io_uring: move all prep state for IORING_OP_CONNECT to prep handler io_uring: add and use struct io_rw for read/writes io_uring: use u64_to_user_ptr() consistently commit 0f710a5572ea3a0fec36ad0b613f72144d99e830 Merge: 8ae40a6951a7 bf0e5013bc2d Author: Linus Torvalds Date: Fri Dec 27 11:13:18 2019 -0800 Merge tag 'libata-5.5-20191226' of git://git.kernel.dk/linux-block Pull libata fixes from Jens Axboe: "Two things in here: - First half of a series that fixes ahci_brcm, also marked for stable. The other part of the series is going into 5.6 (Florian) - sata_nv regression fix that is also marked for stable (Sascha)" * tag 'libata-5.5-20191226' of git://git.kernel.dk/linux-block: ata: ahci_brcm: Add missing clock management during recovery ata: ahci_brcm: BCM7425 AHCI requires AHCI_HFLAG_DELAY_ENGINE ata: ahci_brcm: Fix AHCI resources management ata: libahci_platform: Export again ahci_platform_able_phys() libata: Fix retrieving of active qcs commit 8ae40a6951a72c59f2f6a0b721ce0e43bbcffcab Merge: a305bd7c9c22 b2c0fcd28772 Author: Linus Torvalds Date: Fri Dec 27 11:09:04 2019 -0800 Merge tag 'block-5.5-20191226' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Only thing here are the changes from Arnd from last week, which now have the appropriate header include to ensure they actually compile if COMPAT is enabled" * tag 'block-5.5-20191226' of git://git.kernel.dk/linux-block: compat_ioctl: block: handle Persistent Reservations compat_ioctl: block: handle add zone open, close and finish ioctl compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES compat_ioctl: block: handle BLKREPORTZONE/BLKRESETZONE pktcdvd: fix regression on 64-bit architectures commit a305bd7c9c22e2f127b0674104acfa8133e3cd26 Merge: 46cf053efec6 286e7beaa4cc Author: Linus Torvalds Date: Fri Dec 27 11:02:48 2019 -0800 Merge tag 'gpio-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "A set of fixes for the v5.5 series: - Fix the build for the Xtensa driver. - Make sure to set up the parent device for mpc8xxx. - Clarify the look-up error message. - Fix the usage of the line direction in the mockup device. - Fix a type warning on the Aspeed driver. - Remove the pointless __exit annotation on the xgs-iproc which is causing a compilation problem. - Fix up emultation of open drain outputs .get_direction() - Fix the IRQ callbacks on the PCA953xx to use bitops and work properly. - Fix the Kconfig on the Tegra driver" * tag 'gpio-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: tegra186: Allow building on Tegra194-only configurations gpio: pca953x: Switch to bitops in IRQ callbacks gpiolib: fix up emulated open drain outputs MAINTAINERS: Append missed file to the database gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove gpio: aspeed: avoid return type warning gpio: mockup: Fix usage of new GPIO_LINE_DIRECTION gpio: Fix error message on out-of-range GPIO in lookup table gpio: mpc8xxx: Add platform device to gpiochip->parent gpio: xtensa: fix driver build commit e79c22695abd3b75a6aecf4ea4b9607e8d82c49c Author: Kailang Yang Date: Thu Dec 19 14:12:15 2019 +0800 ALSA: hda/realtek - Add Bass Speaker and fixed dac for bass speaker Dell has new platform which has dual speaker connecting. They want dual speaker which use same dac for output. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/229c7efa2b474a16b7d8a916cd096b68@realtek.com Signed-off-by: Takashi Iwai commit b0b5ce1010ffc50015eaec72b0028aaae3f526bb Author: Alexander.Barabash@dell.com Date: Wed Dec 25 17:55:30 2019 +0000 ioat: ioat_alloc_ring() failure handling. If dma_alloc_coherent() returns NULL in ioat_alloc_ring(), ring allocation must not proceed. Until now, if the first call to dma_alloc_coherent() in ioat_alloc_ring() returned NULL, the processing could proceed, failing with NULL-pointer dereferencing further down the line. Signed-off-by: Alexander Barabash Acked-by: Dave Jiang Link: https://lore.kernel.org/r/75e9c0e84c3345d693c606c64f8b9ab5@x13pwhopdag1307.AMER.DELL.COM Signed-off-by: Vinod Koul commit e31d941c7dd797df37ea94958638a88723325c30 Merge: 46cf053efec6 e85ade1f50aa Author: Dave Airlie Date: Fri Dec 27 13:13:06 2019 +1000 Merge tag 'drm-intel-fixes-2019-12-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes i915 power and frontbuffer tracking fixes Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87r20vdlrs.fsf@intel.com commit bb3d0b8bf5be61ab1d6f472c43cbf34de17e796b Author: Eric Dumazet Date: Mon Dec 23 11:13:24 2019 -0800 net_sched: sch_fq: properly set sk->sk_pacing_status If fq_classify() recycles a struct fq_flow because a socket structure has been reallocated, we do not set sk->sk_pacing_status immediately, but later if the flow becomes detached. This means that any flow requiring pacing (BBR, or SO_MAX_PACING_RATE) might fallback to TCP internal pacing, which requires a per-socket high resolution timer, and therefore more cpu cycles. Fixes: 218af599fa63 ("tcp: internal implementation for pacing") Signed-off-by: Eric Dumazet Cc: Soheil Hassas Yeganeh Cc: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 4e55a11aa30fd9a6ee1e7f536ee562e1b0b22512 Merge: 3c2f450e553c 5cdc40c7820f Author: David S. Miller Date: Thu Dec 26 15:27:15 2019 -0800 Merge branch 'bnx2x-Bug-fixes' Manish Chopra says: ==================== bnx2x: Bug fixes This series has changes in the area of vlan resources management APIs to fix fw assert issue reported in max vlan configuration testing over the PF. ==================== Signed-off-by: David S. Miller commit 5cdc40c7820ff66c2271e0884bd8ee8f7cfd769b Author: Manish Chopra Date: Mon Dec 23 10:23:09 2019 -0800 bnx2x: Fix accounting of vlan resources among the PFs While testing max vlan configuration on the PF, firmware gets assert as driver was configuring number of vlans more than what is supported per port/engine, it was figured out that there is an implicit vlan (hidden default vlan consuming hardware cam entry resource) which is configured default for all the clients (PF/VFs) on client_init ramrod by the adapter implicitly, so when allocating resources among the PFs this implicit vlan should be considered or total vlan entries should be reduced by one to accommodate that default/implicit vlan entry. Signed-off-by: Manish Chopra Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 0444716a5dd563526e53ae686115987d5d4c249e Author: Manish Chopra Date: Mon Dec 23 10:23:08 2019 -0800 bnx2x: Use appropriate define for vlan credit Although it has same value as MAX_MAC_CREDIT_E2, use MAX_VLAN_CREDIT_E2 appropriately. Signed-off-by: Manish Chopra Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 3c2f450e553ce47fcb0d6141807a8858e3213c9c Merge: 7df2281a174b fa633a0f8919 Author: David S. Miller Date: Thu Dec 26 15:25:04 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-12-23 The following pull-request contains BPF updates for your *net* tree. We've added 2 non-merge commits during the last 1 day(s) which contain a total of 4 files changed, 34 insertions(+), 31 deletions(-). The main changes are: 1) Fix libbpf build when building on a read-only filesystem with O=dir option, from Namhyung Kim. 2) Fix a precision tracking bug for unknown scalars, from Daniel Borkmann. ==================== Signed-off-by: David S. Miller commit 7df2281a174bd0fdbb2211a26914e5440740fcde Author: Geert Uytterhoeven Date: Mon Dec 23 11:03:21 2019 +0100 of: mdio: Add missing inline to of_mdiobus_child_is_phy() dummy If CONFIG_OF_MDIO=n: drivers/net/phy/mdio_bus.c:23: include/linux/of_mdio.h:58:13: warning: ‘of_mdiobus_child_is_phy’ defined but not used [-Wunused-function] static bool of_mdiobus_child_is_phy(struct device_node *child) ^~~~~~~~~~~~~~~~~~~~~~~ Fix this by adding the missing "inline" keyword. Fixes: 0aa4d016c043d16a ("of: mdio: export of_mdiobus_child_is_phy") Signed-off-by: Geert Uytterhoeven Reviewed-by: Andrew Lunn Acked-by: Borislav Petkov Signed-off-by: David S. Miller commit 1c93fb45761e79b3c00080e71523886cefaf351c Author: Madalin Bucur Date: Mon Dec 23 10:06:10 2019 +0200 net: phy: aquantia: add suspend / resume ops for AQR105 The suspend/resume code for AQR107 works on AQR105 too. This patch fixes issues with the partner not seeing the link down when the interface using AQR105 is brought down. Fixes: bee8259dd31f ("net: phy: add driver for aquantia phy") Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit c27569fcd6e1b11bd24361346504f2995a256e4e Author: Madalin Bucur Date: Mon Dec 23 09:39:22 2019 +0200 dpaa_eth: fix DMA mapping leak On the error path some fragments remain DMA mapped. Adding a fix that unmaps all the fragments. Rework cleanup path to be simpler. Fixes: 8151ee88bad5 ("dpaa_eth: use page backed rx buffers") Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 12ead77432f2ce32dea797742316d15c5800cb32 Author: Guenter Roeck Date: Wed Dec 25 08:34:29 2019 -0800 clk: Don't try to enable critical clocks if prepare failed The following traceback is seen if a critical clock fails to prepare. bcm2835-clk 3f101000.cprman: plld: couldn't lock PLL ------------[ cut here ]------------ Enabling unprepared plld_per WARNING: CPU: 1 PID: 1 at drivers/clk/clk.c:1014 clk_core_enable+0xcc/0x2c0 ... Call trace: clk_core_enable+0xcc/0x2c0 __clk_register+0x5c4/0x788 devm_clk_hw_register+0x4c/0xb0 bcm2835_register_pll_divider+0xc0/0x150 bcm2835_clk_probe+0x134/0x1e8 platform_drv_probe+0x50/0xa0 really_probe+0xd4/0x308 driver_probe_device+0x54/0xe8 device_driver_attach+0x6c/0x78 __driver_attach+0x54/0xd8 ... Check return values from clk_core_prepare() and clk_core_enable() and bail out if any of those functions returns an error. Cc: Jerome Brunet Fixes: 99652a469df1 ("clk: migrate the count of orphaned clocks at init") Signed-off-by: Guenter Roeck Link: https://lkml.kernel.org/r/20191225163429.29694-1-linux@roeck-us.net Signed-off-by: Stephen Boyd commit ec34c0157580a68c10dccbdd18c7701f0b317172 Merge: a5bcd72e054a 8cb4ec44de42 Author: David S. Miller Date: Thu Dec 26 13:11:40 2019 -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) Fix endianness issue in flowtable TCP flags dissector, from Arnd Bergmann. 2) Extend flowtable test script with dnat rules, from Florian Westphal. 3) Reject padding in ebtables user entries and validate computed user offset, reported by syzbot, from Florian Westphal. 4) Fix endianness in nft_tproxy, from Phil Sutter. ==================== Signed-off-by: David S. Miller commit a5bcd72e054aabb93ddc51ed8cde36a5bfc50271 Author: Vladyslav Tarasiuk Date: Thu Dec 26 10:41:56 2019 +0200 net/mlxfw: Fix out-of-memory error in mfa2 flash burning The burning process requires to perform internal allocations of large chunks of memory. This memory doesn't need to be contiguous and can be safely allocated by vzalloc() instead of kzalloc(). This patch changes such allocation to avoid possible out-of-memory failure. Fixes: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process") Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Aya Levin Signed-off-by: Leon Romanovsky Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit ea137a89b5ddeb0061df8eef9b8ceca3d04f48b1 Author: Tony Lindgren Date: Sun Dec 22 10:17:04 2019 -0800 phy: cpcap-usb: Drop extra write to usb2 register We are currently writing the same register twice. Let's enable the USB PHY only at the end of the function. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I commit 9492535ecd9b6df89e483ddd05740b3f3d547600 Author: Tony Lindgren Date: Sun Dec 22 10:17:03 2019 -0800 phy: cpcap-usb: Improve host vs docked mode detection When docked to a Motorola lapdock or media dock, we're in USB A-host mode with VBUS provided by the dock. When in regular USB A-host mode, we're providing the VBUS. And in regular USB A-host mode we must also keep kicking the VBUS to keep it active. Let's wait a bit before configuring the USB PHY to allow some time between the ID and VBUS changes. And let's add vbus_provider flag so we can detect docked mode and regularo USB A-host mode better. With better USB A-host mode detection, we can now also just kick the VBUS to keep it enabled and leave out the unnecessary line muxing. We only need to set and clear vbus_provider in the delayed work so no locking is needed for it currently. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I commit 63078b6ba09e842f09df052c5728857389fddcd2 Author: Tony Lindgren Date: Sun Dec 22 10:17:02 2019 -0800 phy: cpcap-usb: Prevent USB line glitches from waking up modem The micro-USB connector on Motorola Mapphone devices can be muxed between the SoC and the mdm6600 modem. But even when used for the SoC, configuring the PHY with ID pin grounded will wake up the modem from idle state. Looks like the issue is probably caused by line glitches. We can prevent the glitches by using a previously unknown mode of the GPIO mux to prevent the USB lines from being connected to the moden while configuring the USB PHY, and enable the USB lines after configuring the PHY. Note that this only prevents waking up mdm6600 as regular USB A-host mode, and does not help when connected to a lapdock. The lapdock specific issue still needs to be debugged separately. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I commit af5d44de571811a151510bfd1236407b7f551cd9 Author: Tony Lindgren Date: Fri Aug 30 14:43:12 2019 -0700 phy: mapphone-mdm6600: Fix uninitialized status value regression Only the used bits get cleared with bitmap_zero() when we call gpiod_get_array_value_cansleep(). We must mask only the bits we're using for ddata->status as the other bits in the bitmap may not be initialized. And let's also drop useless debug code accidentally left over while at it. Fixes: b9762bebc633 ("gpiolib: Pass bitmaps, not integer arrays, to get/set array") Cc: Jacopo Mondi Cc: Janusz Krzysztofik Cc: Linus Walleij Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Scott Cc: NeKit Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I commit 049226b9fd7442149dcbcf55f15408f5973cceda Author: Tony Lindgren Date: Sun Dec 22 10:00:19 2019 -0800 phy: cpcap-usb: Fix flakey host idling and enumerating of devices We must let the USB host idle things properly before we switch to debug UART mode. Otherwise the USB host may never idle after disconnecting devices, and that causes the next enumeration to be flakey. Cc: Jacopo Mondi Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Scott Cc: NeKit Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Fixes: 6d6ce40f63af ("phy: cpcap-usb: Add CPCAP PMIC USB support") Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I commit bf0e5013bc2dcac205417e1252205dca39dfc005 Author: Florian Fainelli Date: Tue Dec 10 10:53:47 2019 -0800 ata: ahci_brcm: Add missing clock management during recovery The downstream implementation of ahci_brcm.c did contain clock management recovery, but until recently, did that outside of the libahci_platform helpers and this was unintentionally stripped out while forward porting the patch upstream. Add the missing clock management during recovery and sleep for 10 milliseconds per the design team recommendations to ensure the SATA PHY controller and AFE have been fully quiesced. Fixes: eb73390ae241 ("ata: ahci_brcm: Recover from failures to identify devices") Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 1a3d78cb6e20779a19388315bd8efefbd8d4a656 Author: Florian Fainelli Date: Tue Dec 10 10:53:46 2019 -0800 ata: ahci_brcm: BCM7425 AHCI requires AHCI_HFLAG_DELAY_ENGINE Set AHCI_HFLAG_DELAY_ENGINE for the BCM7425 AHCI controller thus making it conforming to the 'strict' AHCI implementation which this controller is based on. This solves long link establishment with specific hard drives (e.g.: Seagate ST1000VM002-9ZL1 SC12) that would otherwise have to complete the error recovery handling before finally establishing a succesful SATA link at the desired speed. We re-order the hpriv->flags assignment to also remove the NONCQ quirk since we can set the flag directly. Fixes: 9586114cf1e9 ("ata: ahci_brcmstb: add support MIPS-based platforms") Fixes: 423be77daabe ("ata: ahci_brcmstb: add quirk for broken ncq") Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit c0cdf2ac4b5bf3e5ef2451ea29fb4104278cdabc Author: Florian Fainelli Date: Tue Dec 10 10:53:45 2019 -0800 ata: ahci_brcm: Fix AHCI resources management The AHCI resources management within ahci_brcm.c is a little convoluted, largely because it historically had a dedicated clock that was managed within this file in the downstream tree. Once brough upstream though, the clock was left to be managed by libahci_platform.c which is entirely appropriate. This patch series ensures that the AHCI resources are fetched and enabled before any register access is done, thus avoiding bus errors on platforms which clock gate the controller by default. As a result we need to re-arrange the suspend() and resume() functions in order to avoid accessing registers after the clocks have been turned off respectively before the clocks have been turned on. Finally, we can refactor brcm_ahci_get_portmask() in order to fetch the number of ports from hpriv->mmio which is now accessible without jumping through hoops like we used to do. The commit pointed in the Fixes tag is both old and new enough not to require major headaches for backporting of this patch. Fixes: eba68f829794 ("ata: ahci_brcmstb: rename to support across Broadcom SoC's") Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 84b032dbfdf1c139cd2b864e43959510646975f8 Author: Florian Fainelli Date: Tue Dec 10 10:53:44 2019 -0800 ata: libahci_platform: Export again ahci_platform_able_phys() This reverts commit 6bb86fefa086faba7b60bb452300b76a47cde1a5 ("libahci_platform: Staticize ahci_platform_able_phys()") we are going to need ahci_platform_{enable,disable}_phys() in a subsequent commit for ahci_brcm.c in order to properly control the PHY initialization order. Also make sure the function prototypes are declared in include/linux/ahci_platform.h as a result. Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 095e90e080a502e8737b8694c15f03f16d4df6ab Merge: 57b948e2c9ce 3ed0a1d56390 Author: David S. Miller Date: Wed Dec 25 16:35:35 2019 -0800 Merge branch 'hsr-fix-several-bugs-in-hsr-module' Taehee Yoo says: ==================== hsr: fix several bugs in hsr module 1. The first patch fixes debugfs warning when it's opened when hsr module is being removed. debugfs file is opened, it tries to hold .owner module, but it would print warning messages if it couldn't hold .owner module. In order to avoid the warning message, this patch makes hsr module does not set .owner. Unsetting .owner is safe because these are protected by inode_lock(). 2. The second patch fixes wrong error handling of hsr_dev_finalize() a) hsr_dev_finalize() calls debugfs_create_{dir/file} to create debugfs. it checks NULL pointer but debugfs don't return NULL so it's wrong code. b) hsr_dev_finalize() calls register_netdevice(). so if it fails after register_netdevice(), it should call unregister_netdevice(). But it doesn't. c) debugfs doesn't affect any actual logic of hsr module. So, the failure of creating of debugfs could be ignored. 3. The third patch adds hsr root debugfs directory. When hsr interface is created, it creates debugfs directory in /sys/kernel/debug/. It's a little bit faulty path because if an interface is the same with another directory name in the same path, it will fail. If hsr root directory is existing, the possibility of failure of creating debugfs file will be reduced. 4. The fourth patch adds debugfs rename routine. debugfs directory name is the same with hsr interface name. So hsr interface name is changed, debugfs directory name should be changed too. 5. The fifth patch fixes a race condition in node list add and del. hsr nodes are protected by RCU and there is no write side lock. But node insertions and deletions could be being operated concurrently. So write side locking is needed. 6. The Sixth patch resets network header Tap routine is enabled, below message will be printed. [ 175.852292][ C3] protocol 88fb is buggy, dev veth0 hsr module doesn't set network header for supervision frame. But tap routine validates network header. If network header wasn't set, it resets and warns about it. ==================== Signed-off-by: David S. Miller commit 3ed0a1d563903bdb4b4c36c58c4d9c1bcb23a6e6 Author: Taehee Yoo Date: Sun Dec 22 11:27:08 2019 +0000 hsr: reset network header when supervision frame is created The supervision frame is L2 frame. When supervision frame is created, hsr module doesn't set network header. If tap routine is enabled, dev_queue_xmit_nit() is called and it checks network_header. If network_header pointer wasn't set(or invalid), it resets network_header and warns. In order to avoid unnecessary warning message, resetting network_header is needed. Test commands: ip netns add nst ip link add veth0 type veth peer name veth1 ip link add veth2 type veth peer name veth3 ip link set veth1 netns nst ip link set veth3 netns nst ip link set veth0 up ip link set veth2 up ip link add hsr0 type hsr slave1 veth0 slave2 veth2 ip a a 192.168.100.1/24 dev hsr0 ip link set hsr0 up ip netns exec nst ip link set veth1 up ip netns exec nst ip link set veth3 up ip netns exec nst ip link add hsr1 type hsr slave1 veth1 slave2 veth3 ip netns exec nst ip a a 192.168.100.2/24 dev hsr1 ip netns exec nst ip link set hsr1 up tcpdump -nei veth0 Splat looks like: [ 175.852292][ C3] protocol 88fb is buggy, dev veth0 Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 92a35678ec075100ce666a2fb6969151affb0e5d Author: Taehee Yoo Date: Sun Dec 22 11:26:54 2019 +0000 hsr: fix a race condition in node list insertion and deletion hsr nodes are protected by RCU and there is no write side lock. But node insertions and deletions could be being operated concurrently. So write side locking is needed. Test commands: ip netns add nst ip link add veth0 type veth peer name veth1 ip link add veth2 type veth peer name veth3 ip link set veth1 netns nst ip link set veth3 netns nst ip link set veth0 up ip link set veth2 up ip link add hsr0 type hsr slave1 veth0 slave2 veth2 ip a a 192.168.100.1/24 dev hsr0 ip link set hsr0 up ip netns exec nst ip link set veth1 up ip netns exec nst ip link set veth3 up ip netns exec nst ip link add hsr1 type hsr slave1 veth1 slave2 veth3 ip netns exec nst ip a a 192.168.100.2/24 dev hsr1 ip netns exec nst ip link set hsr1 up for i in {0..9} do for j in {0..9} do for k in {0..9} do for l in {0..9} do arping 192.168.100.2 -I hsr0 -s 00:01:3$i:4$j:5$k:6$l -c1 & done done done done Splat looks like: [ 236.066091][ T3286] list_add corruption. next->prev should be prev (ffff8880a5940300), but was ffff8880a5940d0. [ 236.069617][ T3286] ------------[ cut here ]------------ [ 236.070545][ T3286] kernel BUG at lib/list_debug.c:25! [ 236.071391][ T3286] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 236.072343][ T3286] CPU: 0 PID: 3286 Comm: arping Tainted: G W 5.5.0-rc1+ #209 [ 236.073463][ T3286] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 236.074695][ T3286] RIP: 0010:__list_add_valid+0x74/0xd0 [ 236.075499][ T3286] Code: 48 39 da 75 27 48 39 f5 74 36 48 39 dd 74 31 48 83 c4 08 b8 01 00 00 00 5b 5d c3 48 b [ 236.078277][ T3286] RSP: 0018:ffff8880aaa97648 EFLAGS: 00010286 [ 236.086991][ T3286] RAX: 0000000000000075 RBX: ffff8880d4624c20 RCX: 0000000000000000 [ 236.088000][ T3286] RDX: 0000000000000075 RSI: 0000000000000008 RDI: ffffed1015552ebf [ 236.098897][ T3286] RBP: ffff88809b53d200 R08: ffffed101b3c04f9 R09: ffffed101b3c04f9 [ 236.099960][ T3286] R10: 00000000308769a1 R11: ffffed101b3c04f8 R12: ffff8880d4624c28 [ 236.100974][ T3286] R13: ffff8880d4624c20 R14: 0000000040310100 R15: ffff8880ce17ee02 [ 236.138967][ T3286] FS: 00007f23479fa680(0000) GS:ffff8880d9c00000(0000) knlGS:0000000000000000 [ 236.144852][ T3286] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 236.145720][ T3286] CR2: 00007f4a14bab210 CR3: 00000000a61c6001 CR4: 00000000000606f0 [ 236.146776][ T3286] Call Trace: [ 236.147222][ T3286] hsr_add_node+0x314/0x490 [hsr] [ 236.153633][ T3286] hsr_forward_skb+0x2b6/0x1bc0 [hsr] [ 236.154362][ T3286] ? rcu_read_lock_sched_held+0x90/0xc0 [ 236.155091][ T3286] ? rcu_read_lock_bh_held+0xa0/0xa0 [ 236.156607][ T3286] hsr_dev_xmit+0x70/0xd0 [hsr] [ 236.157254][ T3286] dev_hard_start_xmit+0x160/0x740 [ 236.157941][ T3286] __dev_queue_xmit+0x1961/0x2e10 [ 236.158565][ T3286] ? netdev_core_pick_tx+0x2e0/0x2e0 [ ... ] Reported-by: syzbot+3924327f9ad5f4d2b343@syzkaller.appspotmail.com Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 4c2d5e33dcd3a6333a7895be3b542ff3d373177c Author: Taehee Yoo Date: Sun Dec 22 11:26:39 2019 +0000 hsr: rename debugfs file when interface name is changed hsr interface has own debugfs file, which name is same with interface name. So, interface name is changed, debugfs file name should be changed too. Fixes: fc4ecaeebd26 ("net: hsr: add debugfs support for display node list") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit c6c4ccd7f96993e106dfea7ef18127f972f2db5e Author: Taehee Yoo Date: Sun Dec 22 11:26:27 2019 +0000 hsr: add hsr root debugfs directory In current hsr code, when hsr interface is created, it creates debugfs directory /sys/kernel/debug/. If there is same directory or file name in there, it fails. In order to reduce possibility of failure of creation of debugfs, this patch adds root directory. Test commands: ip link add dummy0 type dummy ip link add dummy1 type dummy ip link add hsr0 type hsr slave1 dummy0 slave2 dummy1 Before this patch: /sys/kernel/debug/hsr0/node_table After this patch: /sys/kernel/debug/hsr/hsr0/node_table Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 1d19e2d53e8ed9e4c98fc95e0067492cda7288b0 Author: Taehee Yoo Date: Sun Dec 22 11:26:15 2019 +0000 hsr: fix error handling routine in hsr_dev_finalize() hsr_dev_finalize() is called to create new hsr interface. There are some wrong error handling codes. 1. wrong checking return value of debugfs_create_{dir/file}. These function doesn't return NULL. If error occurs in there, it returns error pointer. So, it should check error pointer instead of NULL. 2. It doesn't unregister interface if it fails to setup hsr interface. If it fails to initialize hsr interface after register_netdevice(), it should call unregister_netdevice(). 3. Ignore failure of creation of debugfs If creating of debugfs dir and file is failed, creating hsr interface will be failed. But debugfs doesn't affect actual logic of hsr module. So, ignoring this is more correct and this behavior is more general. Fixes: c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 84bb59d773853bc2dda2ac1ef8474c40eb33a3c6 Author: Taehee Yoo Date: Sun Dec 22 11:25:27 2019 +0000 hsr: avoid debugfs warning message when module is remove When hsr module is being removed, debugfs_remove() is called to remove both debugfs directory and file. When module is being removed, module state is changed to MODULE_STATE_GOING then exit() is called. At this moment, module couldn't be held so try_module_get() will be failed. debugfs's open() callback tries to hold the module if .owner is existing. If it fails, warning message is printed. CPU0 CPU1 delete_module() try_stop_module() hsr_exit() open() <-- WARNING debugfs_remove() In order to avoid the warning message, this patch makes hsr module does not set .owner. Unsetting .owner is safe because these are protected by inode_lock(). Test commands: #SHELL1 ip link add dummy0 type dummy ip link add dummy1 type dummy while : do ip link add hsr0 type hsr slave1 dummy0 slave2 dummy1 modprobe -rv hsr done #SHELL2 while : do cat /sys/kernel/debug/hsr0/node_table done Splat looks like: [ 101.223783][ T1271] ------------[ cut here ]------------ [ 101.230309][ T1271] debugfs file owner did not clean up at exit: node_table [ 101.230380][ T1271] WARNING: CPU: 3 PID: 1271 at fs/debugfs/file.c:309 full_proxy_open+0x10f/0x650 [ 101.233153][ T1271] Modules linked in: hsr(-) dummy veth openvswitch nsh nf_conncount nf_nat nf_conntrack nf_d] [ 101.237112][ T1271] CPU: 3 PID: 1271 Comm: cat Tainted: G W 5.5.0-rc1+ #204 [ 101.238270][ T1271] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 101.240379][ T1271] RIP: 0010:full_proxy_open+0x10f/0x650 [ 101.241166][ T1271] Code: 48 c1 ea 03 80 3c 02 00 0f 85 c1 04 00 00 49 8b 3c 24 e8 04 86 7e ff 84 c0 75 2d 4c 8 [ 101.251985][ T1271] RSP: 0018:ffff8880ca22fa38 EFLAGS: 00010286 [ 101.273355][ T1271] RAX: dffffc0000000008 RBX: ffff8880cc6e6200 RCX: 0000000000000000 [ 101.274466][ T1271] RDX: 0000000000000000 RSI: 0000000000000006 RDI: ffff8880c4dd5c14 [ 101.275581][ T1271] RBP: 0000000000000000 R08: fffffbfff2922f5d R09: 0000000000000000 [ 101.276733][ T1271] R10: 0000000000000001 R11: 0000000000000000 R12: ffffffffc0551bc0 [ 101.277853][ T1271] R13: ffff8880c4059a48 R14: ffff8880be50a5e0 R15: ffffffff941adaa0 [ 101.278956][ T1271] FS: 00007f8871cda540(0000) GS:ffff8880da800000(0000) knlGS:0000000000000000 [ 101.280216][ T1271] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 101.282832][ T1271] CR2: 00007f88717cfd10 CR3: 00000000b9440005 CR4: 00000000000606e0 [ 101.283974][ T1271] Call Trace: [ 101.285328][ T1271] do_dentry_open+0x63c/0xf50 [ 101.286077][ T1271] ? open_proxy_open+0x270/0x270 [ 101.288271][ T1271] ? __x64_sys_fchdir+0x180/0x180 [ 101.288987][ T1271] ? inode_permission+0x65/0x390 [ 101.289682][ T1271] path_openat+0x701/0x2810 [ 101.290294][ T1271] ? path_lookupat+0x880/0x880 [ 101.290957][ T1271] ? check_chain_key+0x236/0x5d0 [ 101.291676][ T1271] ? __lock_acquire+0xdfe/0x3de0 [ 101.292358][ T1271] ? sched_clock+0x5/0x10 [ 101.292962][ T1271] ? sched_clock_cpu+0x18/0x170 [ 101.293644][ T1271] ? find_held_lock+0x39/0x1d0 [ 101.305616][ T1271] do_filp_open+0x17a/0x270 [ 101.306061][ T1271] ? may_open_dev+0xc0/0xc0 [ ... ] Fixes: fc4ecaeebd26 ("net: hsr: add debugfs support for display node list") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 57b948e2c9ce58e4fcb687bc285b5b5a2cc66640 Author: Netanel Belgazal Date: Sun Dec 22 09:47:59 2019 +0000 MAINTAINERS: Add additional maintainers to ENA Ethernet driver Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller commit 8385d756e114f2df8568e508902d5f9850817ffb Author: Sascha Hauer Date: Fri Dec 13 09:04:08 2019 +0100 libata: Fix retrieving of active qcs ata_qc_complete_multiple() is called with a mask of the still active tags. mv_sata doesn't have this information directly and instead calculates the still active tags from the started tags (ap->qc_active) and the finished tags as (ap->qc_active ^ done_mask) Since 28361c40368 the hw_tag and tag are no longer the same and the equation is no longer valid. In ata_exec_internal_sg() ap->qc_active is initialized as 1ULL << ATA_TAG_INTERNAL, but in hardware tag 0 is started and this will be in done_mask on completion. ap->qc_active ^ done_mask becomes 0x100000000 ^ 0x1 = 0x100000001 and thus tag 0 used as the internal tag will never be reported as completed. This is fixed by introducing ata_qc_get_active() which returns the active hardware tags and calling it where appropriate. This is tested on mv_sata, but sata_fsl and sata_nv suffer from the same problem. There is another case in sata_nv that most likely needs fixing as well, but this looks a little different, so I wasn't confident enough to change that. Fixes: 28361c403683 ("libata: add extra internal command") Cc: stable@vger.kernel.org Tested-by: Pali Rohár Signed-off-by: Sascha Hauer Add missing export of ata_qc_get_active(), as per Pali. Signed-off-by: Jens Axboe commit 71dd2fe5dec171b34b71603a81bb46c24c498fde Author: Axel Lin Date: Sat Dec 21 16:10:49 2019 +0800 regulator: axp20x: Fix axp20x_set_ramp_delay Current code set incorrect bits when set ramp_delay for AXP20X_DCDC2, fix it. Fixes: d29f54df8b16 ("regulator: axp20x: add support for set_ramp_delay for AXP209") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20191221081049.32490-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 2cb7bfc1ca9a34ca148ed77f5f6f07373312bb0a Merge: 46cf053efec6 5fdb0684b5b0 Author: Rafael J. Wysocki Date: Wed Dec 25 15:15:55 2019 +0100 Merge tag 'devfreq-fixes-for-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq fixes for 5.5-rc4 from Chanwoo Choi: "1. Fix the build error of tegra*-devfreq.c when COMPILE_TEST is enabled. 2. Drop unneeded PM_OPP dependency from each driver in Kconfig." * tag 'devfreq-fixes-for-5.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: tegra: Add COMMON_CLK dependency PM / devfreq: Drop explicit selection of PM_OPP commit 4911ee401b7ceff8f38e0ac597cbf503d71e690c Author: Ard Biesheuvel Date: Tue Dec 24 14:29:09 2019 +0100 x86/efistub: Disable paging at mixed mode entry The EFI mixed mode entry code goes through the ordinary startup_32() routine before jumping into the kernel's EFI boot code in 64-bit mode. The 32-bit startup code must be entered with paging disabled, but this is not documented as a requirement for the EFI handover protocol, and so we should disable paging explicitly when entering the kernel from 32-bit EFI firmware. Signed-off-by: Ard Biesheuvel Cc: Cc: Arvind Sankar Cc: Hans de Goede Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224132909.102540-4-ardb@kernel.org Signed-off-by: Ingo Molnar commit 818c7ce724770fbcdcd43725c81f2b3535f82b76 Author: Hans de Goede Date: Tue Dec 24 14:29:08 2019 +0100 efi/libstub/random: Initialize pointer variables to zero for mixed mode Commit: 0d95981438c3 ("x86: efi/random: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table") causes the drivers/efi/libstub/random.c code to get used on x86 for the first time. But this code was not written with EFI mixed mode in mind (running a 64 bit kernel on 32 bit EFI firmware), this causes the kernel to crash during early boot when running in mixed mode. The problem is that in mixed mode pointers are 64 bit, but when running on a 32 bit firmware, EFI calls which return a pointer value by reference only fill the lower 32 bits of the passed pointer, leaving the upper 32 bits uninitialized which leads to crashes. This commit fixes this by initializing pointers which are passed by reference to EFI calls to NULL before passing them, so that the upper 32 bits are initialized to 0. Signed-off-by: Hans de Goede Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 0d95981438c3 ("x86: efi/random: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table") Link: https://lkml.kernel.org/r/20191224132909.102540-3-ardb@kernel.org Signed-off-by: Ingo Molnar commit d92b54570d24d017d2630e314b525ed792f5aa6c Author: Arvind Sankar Date: Tue Dec 24 14:29:07 2019 +0100 efi/earlycon: Fix write-combine mapping on x86 On x86, until PAT is initialized, WC translates into UC-. Since we calculate and store pgprot_writecombine(PAGE_KERNEL) when earlycon is initialized, this means we actually use UC- mappings instead of WC mappings, which makes scrolling very slow. Instead store a boolean flag to indicate whether we want to use writeback or write-combine mappings, and recalculate the actual pgprot_t we need on every mapping. Once PAT is initialized, we will start using write-combine mappings, which speeds up the scrolling considerably. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Hans de Goede Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 69c1f396f25b ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation") Link: https://lkml.kernel.org/r/20191224132909.102540-2-ardb@kernel.org Signed-off-by: Ingo Molnar commit d91f3057263ceb691ef527e71b41a56b17f6c869 Author: Waiman Long Date: Fri Dec 20 08:51:28 2019 -0500 locking/lockdep: Fix buffer overrun problem in stack_trace[] If the lockdep code is really running out of the stack_trace entries, it is likely that buffer overrun can happen and the data immediately after stack_trace[] will be corrupted. If there is less than LOCK_TRACE_SIZE_IN_LONGS entries left before the call to save_trace(), the max_entries computation will leave it with a very large positive number because of its unsigned nature. The subsequent call to stack_trace_save() will then corrupt the data after stack_trace[]. Fix that by changing max_entries to a signed integer and check for negative value before calling stack_trace_save(). Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Bart Van Assche Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 12593b7467f9 ("locking/lockdep: Reduce space occupied by stack traces") Link: https://lkml.kernel.org/r/20191220135128.14876-1-longman@redhat.com Signed-off-by: Ingo Molnar commit 463f550fb47bede3a5d7d5177f363a6c3b45d50b Author: Mathieu Desnoyers Date: Wed Dec 11 11:17:12 2019 -0500 rseq: Unregister rseq for clone CLONE_VM It has been reported by Google that rseq is not behaving properly with respect to clone when CLONE_VM is used without CLONE_THREAD. It keeps the prior thread's rseq TLS registered when the TLS of the thread has moved, so the kernel can corrupt the TLS of the parent. The approach of clearing the per task-struct rseq registration on clone with CLONE_THREAD flag is incomplete. It does not cover the use-case of clone with CLONE_VM set, but without CLONE_THREAD. Here is the rationale for unregistering rseq on clone with CLONE_VM flag set: 1) CLONE_THREAD requires CLONE_SIGHAND, which requires CLONE_VM to be set. Therefore, just checking for CLONE_VM covers all CLONE_THREAD uses. There is no point in checking for both CLONE_THREAD and CLONE_VM, 2) There is the possibility of an unlikely scenario where CLONE_SETTLS is used without CLONE_VM. In order to be an issue, it would require that the rseq TLS is in a shared memory area. I do not plan on adding CLONE_SETTLS to the set of clone flags which unregister RSEQ, because it would require that we also unregister RSEQ on set_thread_area(2) and arch_prctl(2) ARCH_SET_FS for completeness. So rather than doing a partial solution, it appears better to let user-space explicitly perform rseq unregistration across clone if needed in scenarios where CLONE_VM is not set. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191211161713.4490-3-mathieu.desnoyers@efficios.com Signed-off-by: Ingo Molnar commit 66528a4575eee9f5a5270219894ab6178f146e84 Author: Mathieu Desnoyers Date: Wed Dec 11 11:17:11 2019 -0500 rseq: Reject unknown flags on rseq unregister It is preferrable to reject unknown flags within rseq unregistration rather than to ignore them. It is an oversight caused by the fact that the check for unknown flags is after the rseq unregister flag check. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191211161713.4490-2-mathieu.desnoyers@efficios.com Signed-off-by: Ingo Molnar commit 7f936f2ae4f751697b5bcbd9ba9deab1dcc88450 Merge: 47d0b2fe23d8 0b698c838e84 Author: David S. Miller Date: Tue Dec 24 22:41:07 2019 -0800 Merge branch 's390-qeth-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2019-12-23 please apply the following patch series for qeth to your net tree. This brings two fixes for errors during device initialization, deals with several issues in the vnicc control code, and adds a missing lock. ==================== Signed-off-by: David S. Miller commit 0b698c838e84149b690c7e979f78cccb6f8aa4b9 Author: Julian Wiedmann Date: Mon Dec 23 15:03:26 2019 +0100 s390/qeth: fix initialization on old HW I stumbled over an old OSA model that claims to support DIAG_ASSIST, but then rejects the cmd to query its DIAG capabilities. In the old code this was ok, as the returned raw error code was > 0. Now that we translate the raw codes to errnos, the "rc < 0" causes us to fail the initialization of the device. The fix is trivial: don't bail out when the DIAG query fails. Such an error is not critical, we can still use the device (with a slightly reduced set of features). Fixes: 742d4d40831d ("s390/qeth: convert remaining legacy cmd callbacks") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit d1b9ae1864fc3c000e0eb4af8482d78c63e0915a Author: Alexandra Winter Date: Mon Dec 23 15:03:25 2019 +0100 s390/qeth: vnicc Fix init to default During vnicc_init wanted_char should be compared to cur_char and not to QETH_VNICC_DEFAULT. Without this patch there is no way to enforce the default values as desired values. Note, that it is expected, that a card comes online with default values. This patch was tested with private card firmware. Fixes: caa1f0b10d18 ("s390/qeth: add VNICC enable/disable support") Signed-off-by: Alexandra Winter Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit e8a66d800471e2df7f0b484e2e46898b21d1fa82 Author: Alexandra Winter Date: Mon Dec 23 15:03:24 2019 +0100 s390/qeth: Fix vnicc_is_in_use if rx_bcast not set Symptom: After vnicc/rx_bcast has been manually set to 0, bridge_* sysfs parameters can still be set or written. Only occurs on HiperSockets, as OSA doesn't support changing rx_bcast. Vnic characteristics and bridgeport settings are mutually exclusive. rx_bcast defaults to 1, so manually setting it to 0 should disable bridge_* parameters. Instead it makes sense here to check the supported mask. If the card does not support vnicc at all, bridge commands are always allowed. Fixes: caa1f0b10d18 ("s390/qeth: add VNICC enable/disable support") Signed-off-by: Alexandra Winter Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 68c57bfd52836e31bff33e5e1fc64029749d2c35 Author: Alexandra Winter Date: Mon Dec 23 15:03:23 2019 +0100 s390/qeth: fix false reporting of VNIC CHAR config failure Symptom: Error message "Configuring the VNIC characteristics failed" in dmesg whenever an OSA interface on z15 is set online. The VNIC characteristics get re-programmed when setting a L2 device online. This follows the selected 'wanted' characteristics - with the exception that the INVISIBLE characteristic unconditionally gets switched off. For devices that don't support INVISIBLE (ie. OSA), the resulting IO failure raises a noisy error message ("Configuring the VNIC characteristics failed"). For IQD, INVISIBLE is off by default anyways. So don't unnecessarily special-case the INVISIBLE characteristic, and thereby suppress the misleading error message on OSA devices. Fixes: caa1f0b10d18 ("s390/qeth: add VNICC enable/disable support") Signed-off-by: Alexandra Winter Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 5b6c7b55cfe26224b0f41b1c226d3534c542787f Author: Julian Wiedmann Date: Mon Dec 23 15:03:22 2019 +0100 s390/qeth: lock the card while changing its hsuid qeth_l3_dev_hsuid_store() initially checks the card state, but doesn't take the conf_mutex to ensure that the card stays in this state while being reconfigured. Rework the code to take this lock, and drop a redundant state check in a helper function. Fixes: b333293058aa ("qeth: add support for af_iucv HiperSockets transport") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 8b5026bc16938920e4780b9094c3bf20e1e0939d Author: Julian Wiedmann Date: Mon Dec 23 15:03:21 2019 +0100 s390/qeth: fix qdio teardown after early init error qeth_l?_set_online() goes through a number of initialization steps, and on any error uses qeth_l?_stop_card() to tear down the residual state. The first initialization step is qeth_core_hardsetup_card(). When this fails after having established a QDIO context on the device (ie. somewhere after qeth_mpc_initialize()), qeth_l?_stop_card() doesn't shut down this QDIO context again (since the card state hasn't progressed from DOWN at this stage). Even worse, we then call qdio_free() as final teardown step to free the QDIO data structures - while some of them are still hooked into wider QDIO infrastructure such as the IRQ list. This is inevitably followed by use-after-frees and other nastyness. Fix this by unconditionally calling qeth_qdio_clear_card() to shut down the QDIO context, and also to halt/clear any pending activity on the various IO channels. Remove the naive attempt at handling the teardown in qeth_mpc_initialize(), it clearly doesn't suffice and we're handling it properly now in the wider teardown code. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 47d0b2fe23d840ecbfc187d9ef0ee9e1a229a332 Merge: ff43ae4bd5aa f081042d128a Author: David S. Miller Date: Tue Dec 24 22:28:55 2019 -0800 Merge branch 'disable-neigh-update-for-tunnels-during-pmtu-update' Hangbin Liu says: ==================== disable neigh update for tunnels during pmtu update When we setup a pair of gretap, ping each other and create neighbour cache. Then delete and recreate one side. We will never be able to ping6 to the new created gretap. The reason is when we ping6 remote via gretap, we will call like gre_tap_xmit() - ip_tunnel_xmit() - tnl_update_pmtu() - skb_dst_update_pmtu() - ip6_rt_update_pmtu() - __ip6_rt_update_pmtu() - dst_confirm_neigh() - ip6_confirm_neigh() - __ipv6_confirm_neigh() - n->confirmed = now As the confirmed time updated, in neigh_timer_handler() the check for NUD_DELAY confirm time will pass and the neigh state will back to NUD_REACHABLE. So the old/wrong mac address will be used again. If we do not update the confirmed time, the neigh state will go to neigh->nud_state = NUD_PROBE; then go to NUD_FAILED and re-create the neigh later, which is what IPv4 does. We couldn't remove the ip6_confirm_neigh() directly as we still need it for TCP flows. To fix it, we have to pass a bool parameter to dst_ops.update_pmtu() and only disable neighbor update for tunnels. v5: No code change, upate some commits description v4: No code change, upate some commits description v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. ==================== Signed-off-by: David S. Miller commit f081042d128a0c7acbd67611def62e1b52e2d294 Author: Hangbin Liu Date: Sun Dec 22 10:51:16 2019 +0800 net/dst: do not confirm neighbor for vxlan and geneve pmtu update When do IPv6 tunnel PMTU update and calls __ip6_rt_update_pmtu() in the end, we should not call dst_confirm_neigh() as there is no two-way communication. So disable the neigh confirm for vxlan and geneve pmtu update. v5: No change. v4: No change. v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. Fixes: a93bf0ff4490 ("vxlan: update skb dst pmtu on tx path") Fixes: 52a589d51f10 ("geneve: update skb dst pmtu on tx path") Reviewed-by: Guillaume Nault Tested-by: Guillaume Nault Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 4d42df46d6372ece4cb4279870b46c2ea7304a47 Author: Hangbin Liu Date: Sun Dec 22 10:51:15 2019 +0800 sit: do not confirm neighbor when do pmtu update When do IPv6 tunnel PMTU update and calls __ip6_rt_update_pmtu() in the end, we should not call dst_confirm_neigh() as there is no two-way communication. v5: No change. v4: No change. v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. Reviewed-by: Guillaume Nault Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 8247a79efa2f28b44329f363272550c1738377de Author: Hangbin Liu Date: Sun Dec 22 10:51:14 2019 +0800 vti: do not confirm neighbor when do pmtu update When do IPv6 tunnel PMTU update and calls __ip6_rt_update_pmtu() in the end, we should not call dst_confirm_neigh() as there is no two-way communication. Although vti and vti6 are immune to this problem because they are IFF_NOARP interfaces, as Guillaume pointed. There is still no sense to confirm neighbour here. v5: Update commit description. v4: No change. v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. Reviewed-by: Guillaume Nault Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 7a1592bcb15d71400a98632727791d1e68ea0ee8 Author: Hangbin Liu Date: Sun Dec 22 10:51:13 2019 +0800 tunnel: do not confirm neighbor when do pmtu update When do tunnel PMTU update and calls __ip6_rt_update_pmtu() in the end, we should not call dst_confirm_neigh() as there is no two-way communication. v5: No Change. v4: Update commit description v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. Fixes: 0dec879f636f ("net: use dst_confirm_neigh for UDP, RAW, ICMP, L2TP") Reviewed-by: Guillaume Nault Tested-by: Guillaume Nault Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 07dc35c6e3cc3c001915d05f5bf21f80a39a0970 Author: Hangbin Liu Date: Sun Dec 22 10:51:12 2019 +0800 net/dst: add new function skb_dst_update_pmtu_no_confirm Add a new function skb_dst_update_pmtu_no_confirm() for callers who need update pmtu but should not do neighbor confirm. v5: No change. v4: No change. v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. Reviewed-by: Guillaume Nault Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 6e9105c73f8d2163d12d5dfd762fd75483ed30f5 Author: Hangbin Liu Date: Sun Dec 22 10:51:11 2019 +0800 gtp: do not confirm neighbor when do pmtu update When do IPv6 tunnel PMTU update and calls __ip6_rt_update_pmtu() in the end, we should not call dst_confirm_neigh() as there is no two-way communication. Although GTP only support ipv4 right now, and __ip_rt_update_pmtu() does not call dst_confirm_neigh(), we still set it to false to keep consistency with IPv6 code. v5: No change. v4: No change. v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. Reviewed-by: Guillaume Nault Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 675d76ad0ad5bf41c9a129772ef0aba8f57ea9a7 Author: Hangbin Liu Date: Sun Dec 22 10:51:10 2019 +0800 ip6_gre: do not confirm neighbor when do pmtu update When we do ipv6 gre pmtu update, we will also do neigh confirm currently. This will cause the neigh cache be refreshed and set to REACHABLE before xmit. But if the remote mac address changed, e.g. device is deleted and recreated, we will not able to notice this and still use the old mac address as the neigh cache is REACHABLE. Fix this by disable neigh confirm when do pmtu update v5: No change. v4: No change. v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. Reported-by: Jianlin Shi Reviewed-by: Guillaume Nault Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit bd085ef678b2cc8c38c105673dfe8ff8f5ec0c57 Author: Hangbin Liu Date: Sun Dec 22 10:51:09 2019 +0800 net: add bool confirm_neigh parameter for dst_ops.update_pmtu The MTU update code is supposed to be invoked in response to real networking events that update the PMTU. In IPv6 PMTU update function __ip6_rt_update_pmtu() we called dst_confirm_neigh() to update neighbor confirmed time. But for tunnel code, it will call pmtu before xmit, like: - tnl_update_pmtu() - skb_dst_update_pmtu() - ip6_rt_update_pmtu() - __ip6_rt_update_pmtu() - dst_confirm_neigh() If the tunnel remote dst mac address changed and we still do the neigh confirm, we will not be able to update neigh cache and ping6 remote will failed. So for this ip_tunnel_xmit() case, _EVEN_ if the MTU is changed, we should not be invoking dst_confirm_neigh() as we have no evidence of successful two-way communication at this point. On the other hand it is also important to keep the neigh reachability fresh for TCP flows, so we cannot remove this dst_confirm_neigh() call. To fix the issue, we have to add a new bool parameter for dst_ops.update_pmtu to choose whether we should do neigh update or not. I will add the parameter in this patch and set all the callers to true to comply with the previous way, and fix the tunnel code one by one on later patches. v5: No change. v4: No change. v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. Suggested-by: David Miller Reviewed-by: Guillaume Nault Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit ff43ae4bd5aab8acd3a4a9cf49a2a99cbb1719fb Merge: 7c3125f0a6eb 063c60d39180 Author: David S. Miller Date: Tue Dec 24 16:12:47 2019 -0800 Merge tag 'rxrpc-fixes-20191220' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes Here are a couple of bugfixes plus a patch that makes one of the bugfixes easier: (1) Move the ping and mutex unlock on a new call from rxrpc_input_packet() into rxrpc_new_incoming_call(), which it calls. This means the lock-unlock section is entirely within the latter function. This simplifies patch (2). (2) Don't take the call->user_mutex at all in the softirq path. Mutexes aren't allowed to be taken or released there and a patch was merged that caused a warning to be emitted every time this happened. Looking at the code again, it looks like that taking the mutex isn't actually necessary, as the value of call->state will block access to the call. (3) Fix the incoming call path to check incoming calls earlier to reject calls to RPC services for which we don't have a security key of the appropriate class. This avoids an assertion failure if YFS tries making a secure call to the kafs cache manager RPC service. ==================== Signed-off-by: David S. Miller commit 7c3125f0a6ebc17846c5908ad7d6056d66c1c426 Author: Florian Fainelli Date: Fri Dec 20 11:24:21 2019 -0800 net: dsa: bcm_sf2: Fix IP fragment location and behavior The IP fragment is specified through user-defined field as the first bit of the first user-defined word. We were previously trying to extract it from the user-defined mask which could not possibly work. The ip_frag is also supposed to be a boolean, if we do not cast it as such, we risk overwriting the next fields in CFP_DATA(6) which would render the rule inoperative. Fixes: 7318166cacad ("net: dsa: bcm_sf2: Add support for ethtool::rxnfc") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 61d5d4062876e21331c3d0ba4b02dbd50c06a658 Author: Marcelo Ricardo Leitner Date: Fri Dec 20 15:03:44 2019 -0300 sctp: fix err handling of stream initialization The fix on 951c6db954a1 fixed the issued reported there but introduced another. When the allocation fails within sctp_stream_init() it is okay/necessary to free the genradix. But it is also called when adding new streams, from sctp_send_add_streams() and sctp_process_strreset_addstrm_in() and in those situations it cannot just free the genradix because by then it is a fully operational association. The fix here then is to only free the genradix in sctp_stream_init() and on those other call sites move on with what it already had and let the subsequent error handling to handle it. Tested with the reproducers from this report and the previous one, with lksctp-tools and sctp-tests. Reported-by: syzbot+9a1bc632e78a1a98488b@syzkaller.appspotmail.com Fixes: 951c6db954a1 ("sctp: fix memleak on err handling of stream initialization") Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 9cd34efbd3012171c102910ce17ee632a3cccb44 Author: Kunihiko Hayashi Date: Tue Dec 24 09:58:23 2019 +0900 spi: uniphier: Fix FIFO threshold Rx threshold means the value to inform the receiver when the number of words in Rx FIFO is equal to or more than the value. Similarly, Tx threshold means the value to inform the sender when the number of words in Tx FIFO is equal to or less than the value. The controller triggers the driver to start the transfer. In case of Rx, the driver wants to detect that the specified number of words N are in Rx FIFO, so the value of Rx threshold should be N. In case of Tx, the driver wants to detect that the same number of spaces as Rx are in Tx FIFO, so the value of Tx threshold should be (FIFO size - N). For example, in order for the driver to receive at least 3 words from Rx FIFO, set 3 to Rx threshold. +-+-+-+-+-+-+-+-+ | | | | | |*|*|*| +-+-+-+-+-+-+-+-+ In order for the driver to send at least 3 words to Tx FIFO, because it needs at least 3 spaces, set 8(FIFO size) - 3 = 5 to Tx threshold. +-+-+-+-+-+-+-+-+ |*|*|*|*|*| | | | +-+-+-+-+-+-+-+-+ This adds new function uniphier_spi_set_fifo_threshold() to set threshold value to the register. And more, FIFO counts by 'words', so this renames 'fill_bytes' with 'fill_words', and fixes the calculation using bytes_per_words. Fixes: 37ffab817098 ("spi: uniphier: introduce polling mode") Cc: Keiji Hayashibara Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/1577149107-30670-2-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown commit dcf08d0f8f09081b16f69071dd55d51d5e964e84 Author: Daniel Baluta Date: Fri Dec 20 11:05:31 2019 -0600 ASoC: SOF: imx8: Fix dsp_box offset dsp_box is used to keep DSP initiated messages. The value of dsp_offset is set by the DSP with the first message, so we need a way to bootstrap it in order to get the first message. We do this by setting the correct default dsp_box offset which on i.MX8 is not zero. Very interesting is why it has worked until now. On i.MX8, DSP communicates with ARM core using a shared SDRAM memory area. Actually, there are two shared areas: * SDRAM0 - starting at 0x92400000, size 0x800000 * SDRAM1 - starting at 0x92C00000, size 0x800000 SDRAM0 keeps the data sections, starting with .rodata. By chance fw_ready structure was placed at the beginning of .rodata. dsp_box_base is defined as SDRAM0 + dsp_box_offset and it is placed at the beginning of SDRAM1 (dsp_box_offset should be 0x800000). But because it is zero initialized by default it points to SDRAM0 where by chance the fw_ready was placed in the SOF firmware. Anyhow, SOF commit 7466bee378dd811b ("clk: make freq arrays constant") fw_ready is no longer at the beginning of SDRAM0 and everything shows how lucky we were until now. Fix this by properly setting the default dsp_box offset. Fixes: 202acc565a1f050 ("ASoC: SOF: imx: Add i.MX8 HW support") Signed-off-by: Daniel Baluta Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191220170531.10423-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit dd836ddf4e4e1c7f1eb2ae44783ccd70872ef24e Author: Dragos Tarcatu Date: Wed Dec 4 15:04:47 2019 -0600 ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime() remove_link() is currently calling snd_soc_remove_dai_link() after it has already freed the memory for the link name. But this is later read from snd_soc_get_pcm_runtime() causing a KASAN use-after-free warning. Reorder the cleanups to fix this issue. Reviewed-by: Ranjani Sridharan Signed-off-by: Dragos Tarcatu Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20191204210447.11701-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 77fffa742285f2b587648d6c72b5c705633f146f Author: Chuhong Yuan Date: Tue Dec 3 19:13:03 2019 +0800 ASoC: fsl_audmix: add missed pm_runtime_disable The driver forgets to call pm_runtime_disable in probe failure and remove. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20191203111303.12933-1-hslester96@gmail.com Signed-off-by: Mark Brown commit 3b7658679d88b5628939f9bdc8e613f79cd821f9 Author: Olivier Moysan Date: Wed Dec 4 16:43:33 2019 +0100 ASoC: stm32: spdifrx: fix input pin state management Changing input state in iec capture control is not safe, as the pin state may be changed concurrently by ASoC framework. Remove pin state handling in iec capture control. Note: This introduces a restriction on capture control, when pin sleep state is defined in device tree. In this case channel status can be captured only when an audio stream capture is active. Fixes: f68c2a682d44 ("ASoC: stm32: spdifrx: add power management") Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20191204154333.7152-4-olivier.moysan@st.com Signed-off-by: Mark Brown commit 86e1956af4c863d653136fd6e5694adf2054dbaa Author: Olivier Moysan Date: Wed Dec 4 16:43:32 2019 +0100 ASoC: stm32: spdifrx: fix race condition in irq handler When snd_pcm_stop() is called in interrupt routine, substream context may have already been released. Add protection on substream context. Fixes: 03e4d5d56fa5 ("ASoC: stm32: Add SPDIFRX support") Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20191204154333.7152-3-olivier.moysan@st.com Signed-off-by: Mark Brown commit 2859b1784031b5709446af8f6039c467f136e67d Author: Olivier Moysan Date: Wed Dec 4 16:43:31 2019 +0100 ASoC: stm32: spdifrx: fix inconsistent lock state In current spdifrx driver locks may be requested as follows: - request lock on iec capture control, when starting synchronization. - request lock in interrupt context, when spdifrx stop is called from IRQ handler. Take lock with IRQs disabled, to avoid the possible deadlock. Lockdep report: [ 74.278059] ================================ [ 74.282306] WARNING: inconsistent lock state [ 74.290120] -------------------------------- ... [ 74.314373] CPU0 [ 74.314377] ---- [ 74.314381] lock(&(&spdifrx->lock)->rlock); [ 74.314396] [ 74.314400] lock(&(&spdifrx->lock)->rlock); Fixes: 03e4d5d56fa5 ("ASoC: stm32: Add SPDIFRX support") Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20191204154333.7152-2-olivier.moysan@st.com Signed-off-by: Mark Brown commit 07d22a9bb623714dc3199099c5cce3df6aef496c Author: Takashi Iwai Date: Wed Dec 4 16:14:54 2019 +0100 ASoC: core: Fix access to uninitialized list heads The error path of soc_new_pcm_runtime() invokes soc_free_pcm_runtime() that may cause a few problems. First off, it calls list_del() for rtd->list that may not be initialized. Similarly, snd_soc_pcm_component_free() traverses over the component list that may not be initialized, either. Such access to the uninitialized list head would lead to either a BUG_ON() or a memory corruption. This patch fixes the access to uninitialized list heads by initializing the list heads properly at the beginning before those error paths. Signed-off-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204151454.21643-1-tiwai@suse.de Signed-off-by: Mark Brown commit 218fe9b7ec7f32c10a07539365488d80af7b0084 Author: Daniel Baluta Date: Wed Dec 4 17:13:33 2019 +0200 ASoC: soc-core: Set dpcm_playback / dpcm_capture When converting a normal link to a DPCM link we need to set dpcm_playback / dpcm_capture otherwise playback/capture streams will not be created resulting in errors like this: [ 36.039111] sai1-wm8960-hifi: ASoC: no backend playback stream Fixes: a655de808cbde ("ASoC: core: Allow topology to override machine driver FE DAI link config") Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20191204151333.26625-1-daniel.baluta@nxp.com Signed-off-by: Mark Brown commit 98910e1d61384430a080b4bcf986c3b0cf3fdf46 Author: Colin Ian King Date: Wed Dec 4 12:48:16 2019 +0000 ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev The memory allocation failure check for priv->pd_dev is incorrectly pointer checking priv instead of priv->pd_dev. Fix this. Addresses-Coverity: ("Logically dead code") Fixes: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support") Signed-off-by: Colin Ian King Reviewed-by: Daniel Baluta Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204124816.1415359-1-colin.king@canonical.com Signed-off-by: Mark Brown commit feed8a4fc9d46c3126fb9fcae0e9248270c6321a Author: Antonio Messina Date: Thu Dec 19 15:08:03 2019 +0100 udp: fix integer overflow while computing available space in sk_rcvbuf When the size of the receive buffer for a socket is close to 2^31 when computing if we have enough space in the buffer to copy a packet from the queue to the buffer we might hit an integer overflow. When an user set net.core.rmem_default to a value close to 2^31 UDP packets are dropped because of this overflow. This can be visible, for instance, with failure to resolve hostnames. This can be fixed by casting sk_rcvbuf (which is an int) to unsigned int, similarly to how it is done in TCP. Signed-off-by: Antonio Messina Signed-off-by: David S. Miller commit fd1c4bc6e9b34a5e4fe7a3130a49380ef9d7037c Author: Hillf Danton Date: Tue Dec 24 09:14:29 2019 -0700 io-wq: add cond_resched() to worker thread Reschedule the current IO worker to cut the risk that it is becoming a cpu hog. Signed-off-by: Hillf Danton Signed-off-by: Jens Axboe commit fc666936f3f0faeebe32b5f0b0fc49a6d0087c6c Author: Dmitry Osipenko Date: Tue Dec 10 05:05:12 2019 +0300 clk: tegra: Fix double-free in tegra_clk_init() It's unlikely to happen in practice ever, but makes static checkers happy. Fixes: 535f296d47de ("clk: tegra: Add suspend and resume support on Tegra210") Reported-by: Stephen Boyd Signed-off-by: Dmitry Osipenko Link: https://lkml.kernel.org/r/20191210020512.6088-1-digetx@gmail.com Acked-by: Thierry Reding Signed-off-by: Stephen Boyd commit 67f96ff7c8f073648696eab50fd23ded23441067 Author: Marek Szyprowski Date: Mon Dec 16 14:14:07 2019 +0100 clk: samsung: exynos5420: Keep top G3D clocks enabled In Exynos542x/5800 SoCs, the G3D leaf clocks are located in the G3D power domain. This is similar to the other hardware modules and their power domains. However there is one thing specific to G3D clocks hierarchy. Unlike other hardware modules, the G3D clocks hierarchy doesn't have any gate clock between the TOP part of the hierarchy and the part located in the power domain and some SoC internal busses are sourced directly from the TOP muxes. The consequence of this design if the fact that the TOP part of the hierarchy has to be enabled permanently to ensure proper operation of the SoC power related components (G3D power domain and Exynos Power Management Unit for system suspend/resume). This patch adds an explicit call to clk_prepare_enable() on the last MUX in the TOP part of G3D clock hierarchy to keep it enabled permanently to ensure that the internal busses get their clock regardless of the main G3D clock enablement status. This fixes following imprecise abort issue observed on Odroid XU3/XU4 after enabling Panfrost driver by commit 1a5a85c56402 "ARM: dts: exynos: Add Mali/GPU node on Exynos5420 and enable it on Odroid XU3/4"): panfrost 11800000.gpu: clock rate = 400000000 panfrost 11800000.gpu: failed to get regulator: -517 panfrost 11800000.gpu: regulator init failed -517 Power domain G3D disable failed ... panfrost 11800000.gpu: clock rate = 400000000 8<--- cut here --- Unhandled fault: imprecise external abort (0x1406) at 0x00000000 pgd = (ptrval) [00000000] *pgd=00000000 Internal error: : 1406 [#1] PREEMPT SMP ARM Modules linked in: CPU: 7 PID: 53 Comm: kworker/7:1 Not tainted 5.4.0-rc8-next-20191119-00032-g56f1001191a6 #6923 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events deferred_probe_work_func PC is at panfrost_gpu_soft_reset+0x94/0x110 LR is at ___might_sleep+0x128/0x2dc ... [] (panfrost_gpu_soft_reset) from [] (panfrost_gpu_init+0x10/0x67c) [] (panfrost_gpu_init) from [] (panfrost_device_init+0x158/0x2cc) [] (panfrost_device_init) from [] (panfrost_probe+0x80/0x178) [] (panfrost_probe) from [] (platform_drv_probe+0x48/0x9c) [] (platform_drv_probe) from [] (really_probe+0x1c4/0x474) [] (really_probe) from [] (driver_probe_device+0x78/0x1bc) [] (driver_probe_device) from [] (bus_for_each_drv+0x74/0xb8) [] (bus_for_each_drv) from [] (__device_attach+0xd4/0x16c) [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [] (bus_probe_device) from [] (deferred_probe_work_func+0x4c/0xd0) [] (deferred_probe_work_func) from [] (process_one_work+0x300/0x864) [] (process_one_work) from [] (worker_thread+0x58/0x5a0) [] (worker_thread) from [] (kthread+0x12c/0x160) [] (kthread) from [] (ret_from_fork+0x14/0x20) Exception stack(0xee03dfb0 to 0xee03dff8) ... Code: e594300c e5933020 e3130c01 1a00000f (ebefff50). ---[ end trace badde2b74a65a540 ]--- In the above case, the Panfrost driver disables G3D clocks after failure of getting the needed regulator and return with -EPROVE_DEFER code. This causes G3D power domain disable failure and then, during second probe an imprecise abort is triggered due to undefined power domain state. Fixes: 45f10dabb56b ("clk: samsung: exynos5420: Add SET_RATE_PARENT flag to clocks on G3D path") Fixes: c9f7567aff31 ("clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU") Signed-off-by: Marek Szyprowski Link: https://lkml.kernel.org/r/20191216131407.17225-1-m.szyprowski@samsung.com Acked-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Acked-by: Sylwester Nawrocki Signed-off-by: Stephen Boyd commit fb3c06cfda0db68f6082f05c43d63c1fb1761af0 Author: Luca Coelho Date: Mon Dec 23 13:00:59 2019 +0200 iwlwifi: fw: make pos static in iwl_sar_get_ewrd_table() loop In the for loop where we are supposed to go through the entire table, we are using a non-static local to keep the pos index. This makes each iteration start with 3, so we always access the first item on the table. Fix this by moving the variable outside of the loo so it doesn't lose its value at every iteration. Reported-by: Colin Ian King Signed-off-by: Luca Coelho Fixes: ba3224db7803 ("iwlwifi: mvm: fix an out-of-bound access") Signed-off-by: Luca Coelho commit f06021a18fcf8d8a1e79c5e0a8ec4eb2b038e153 Author: Luca Coelho Date: Mon Dec 16 22:23:15 2019 +0200 iwlwifi: remove lar_disable module parameter This is an old parameter that was used supposed to be used only when LAR was still under development. It should not be used anymore, but, since it's available, end-users have been mangling with it unnecessarily. In some cases it can cause problems because when LAR is supported the driver and the firmware do not expect it to be disabled. Signed-off-by: Luca Coelho commit 990aba28f5001f6e90fdd84e13612b560a75deda Author: Shahar S Matityahu Date: Sun Dec 15 20:06:22 2019 +0200 iwlwifi: dbg: force stop the debug monitor HW The driver is required to stop the debug monitor HW recording regardless of the debug configuration since the driver is responsible to halt the FW DBGC. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit cc894b85abf70d40e9920976c7fadd6ded757c60 Author: Luca Coelho Date: Tue Dec 10 15:18:16 2019 +0200 iwlwifi: pcie: always disable L0S states L0S states have been found to be unstable with our devices and in newer hardware they are not supported at all, so we must always set the L0S_DISABLED bit. Previously we were only disabling L0S states if L1 was supported, because the assumption was that transitions from L0S to L1 state was the problematic case. But now we should never use L0S, so do it regardless of whether L1 is supported or not. Signed-off-by: Luca Coelho commit 3d1b28fd30ab8b87c0935584aff6f9b433939d2c Author: Luca Coelho Date: Tue Dec 10 15:11:36 2019 +0200 iwlwifi: pcie: rename L0S_ENABLED bit to L0S_DISABLED This bit has been misnamed since the initial implementation of the driver. The correct semantics is that setting this bit disables L0S states, and we already clearly use it as such in the code. Rename it to avoid confusion. Signed-off-by: Luca Coelho commit df2378ab0f2a9dd4cf4501268af1902cc4ebacd8 Author: Johannes Berg Date: Wed Dec 11 10:15:52 2019 +0100 iwlwifi: mvm: fix potential SKB leak on TXQ TX When we transmit after TXQ dequeue, we aren't paying attention to the return value of the transmit functions, leading to a potential SKB leak. Refactor the code a bit (and rename ..._tx to ..._tx_sta) to check for this happening. Signed-off-by: Johannes Berg Fixes: cfbc6c4c5b91 ("iwlwifi: mvm: support mac80211 TXQs model") Signed-off-by: Luca Coelho commit b9f726c94224e863d4d3458dfec2e7e1284a39ce Author: Johannes Berg Date: Wed Dec 11 10:09:56 2019 +0100 iwlwifi: mvm: fix SKB leak on invalid queue It used to be the case that if we got here, we wouldn't warn but instead allocate the queue (DQA). With using the mac80211 TXQs model this changed, and we really have nothing to do with the frame here anymore, hence the warning now. However, clearly we missed in coding & review that this is now a pure error path and leaks the SKB if we return 0 instead of an indication that the SKB needs to be freed. Fix this. Signed-off-by: Johannes Berg Fixes: cfbc6c4c5b91 ("iwlwifi: mvm: support mac80211 TXQs model") Signed-off-by: Luca Coelho commit c366b3dbbab14b28d044b94eb9ce77c23482ea35 Author: Takashi Iwai Date: Mon Dec 23 23:18:16 2019 +0100 ALSA: hda - Apply sync-write workaround to old Intel platforms, too Klaus Ethgen reported occasional high CPU usages in his system that seem caused by HD-audio driver. The perf output revealed that it's in the unsolicited event handling in the workqueue, and the problem seems triggered by some communication stall between the controller and the codec at the runtime or system resume. Actually a similar phenomenon was seen in the past for other Intel platforms, and we already applied the workaround to enforce sync-write for CORB/RIRB verbs for Skylake and newer chipsets (commit 2756d9143aa5 "ALSA: hda - Fix intermittent CORB/RIRB stall on Intel chips"). Fortunately, the same workaround is applicable to the old chipset, and the experiment showed the positive effect. Based on the experiment result, this patch enables the sync-write workaround for all Intel chipsets. The only reason I hesitated to apply this workaround was about the possibly slightly higher CPU usage. But if the lack of sync causes a much severer problem even for quite old chip, we should think this would be necessary for all Intel chips. Reported-by: Klaus Ethgen Cc: Link: https://lore.kernel.org/r/20191223171833.GA17053@chua Link: https://lore.kernel.org/r/20191223221816.32572-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit b9fb2de0115bbacab36da31fd10483ea66d9cfab Merge: 46cf053efec6 55347ec340af Author: Ingo Molnar Date: Mon Dec 23 22:27:44 2019 +0100 Merge tag 'perf-urgent-for-mingo-5.5-20191223' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf report/top: Arnaldo Carvalho de Melo: - Fix popup menu for entries in main kernel maps other than the main one, e.g. ".init.text", where a non-initialized pointer was causing segfaults. Jin Yao: - Fix incorrectly added dimensions when switching perf.data file to another via the popup menu. libtraceevent: Hewenliang: - Fix memory leakage in filter_event(). perf hists: Yuya Fujita: - Fix variable name's inconsistency in hists__for_each() macro. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 2a1f40adfb54ca65dc4c93bad444dd23b800a76e Author: Mathieu Desnoyers Date: Fri Dec 20 15:33:18 2019 -0500 rseq/selftests: Clarify rseq_prepare_unload() helper requirements The rseq.h UAPI now documents that the rseq_cs field must be cleared before reclaiming memory that contains the targeted struct rseq_cs, but also that the rseq_cs field must be cleared before reclaiming memory of the code pointed to by the rseq_cs start_ip and post_commit_offset fields. While we can expect that use of dlclose(3) will typically unmap both struct rseq_cs and its associated code at once, nothing would theoretically prevent a JIT from reclaiming the code without reclaiming the struct rseq_cs, which would erroneously allow the kernel to consider new code which is not a rseq critical section as a rseq critical section following a code reclaim. Suggested-by: Florian Weimer Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: Florian Weimer Cc: Thomas Gleixner Cc: Peter Zijlstra (Intel) Cc: "Paul E. McKenney" Cc: Boqun Feng Cc: "H . Peter Anvin" Cc: Paul Turner Cc: Dmitry Vyukov Signed-off-by: Shuah Khan commit 8df34c56321479bfa1ec732c675b686c2b4df412 Author: Mathieu Desnoyers Date: Wed Dec 11 11:17:13 2019 -0500 rseq/selftests: Fix: Namespace gettid() for compatibility with glibc 2.30 glibc 2.30 introduces gettid() in public headers, which clashes with the internal static definition within rseq selftests. Rename gettid() to rseq_gettid() to eliminate this symbol name clash. Reported-by: Tommi T. Rantala Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: Tommi T. Rantala Cc: Thomas Gleixner Cc: Peter Zijlstra (Intel) Cc: "Paul E. McKenney" Cc: Boqun Feng Cc: "H . Peter Anvin" Cc: Paul Turner Cc: Dmitry Vyukov Cc: # v4.18+ Signed-off-by: Shuah Khan commit af9cb29c5488381083b0b5ccdfb3cd931063384a Author: Mathieu Desnoyers Date: Wed Dec 11 11:28:57 2019 -0500 rseq/selftests: Turn off timeout setting As the rseq selftests can run for a long period of time, disable the timeout that the general selftests have. Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: Thomas Gleixner Cc: Peter Zijlstra (Intel) Cc: "Paul E. McKenney" Cc: Boqun Feng Cc: "H . Peter Anvin" Cc: Paul Turner Cc: Dmitry Vyukov Signed-off-by: Shuah Khan commit b1b35201bcf411191986eefdef5f5fb5f41cd879 Author: SeongJae Park Date: Fri Dec 20 05:14:08 2019 +0000 kunit/kunit_tool_test: Test '--build_dir' option run This commit adds kunit tool test for the '--build_dir' option. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 14ee5cfd4512ee3d1e0047d8751450dcc6544070 Author: SeongJae Park Date: Fri Dec 20 05:14:07 2019 +0000 kunit: Rename 'kunitconfig' to '.kunitconfig' This commit renames 'kunitconfig' to '.kunitconfig' so that it can be automatically ignored by git and do not disturb people who want to type 'kernel/' by pressing only the 'k' and then 'tab' key. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 609952c2afc9542b336cf9a72d4a09606e05fa2a Author: SeongJae Park Date: Fri Dec 20 05:14:06 2019 +0000 kunit: Place 'test.log' under the 'build_dir' 'kunit' writes the 'test.log' under the kernel source directory even though a 'build_dir' option is given. As users who use the option might expect the outputs to be placed under the specified directory, this commit modifies the logic to write the log file under the 'build_dir'. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit e3212513a8f07786cb262cf78dfe9c4d0c1b1786 Author: SeongJae Park Date: Fri Dec 20 05:14:05 2019 +0000 kunit: Create default config in '--build_dir' If both '--build_dir' and '--defconfig' are given, the handling of '--defconfig' ignores '--build_dir' option. This commit modifies the behavior to respect '--build_dir' option. Reported-by: Brendan Higgins Suggested-by: Brendan Higgins Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 8c0140facb380da5740182d189be0b0d9deadb3d Author: SeongJae Park Date: Fri Dec 20 05:14:04 2019 +0000 kunit: Remove duplicated defconfig creation '--defconfig' option is handled by the 'main() of the 'kunit.py' but again handled in following 'run_tests()'. This commit removes this duplicated handling of the option in the 'run_tests()'. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 1c68cbadf09f685e1ffc6cc4c9094e67131f9a2f Author: SeongJae Park Date: Fri Dec 20 05:14:03 2019 +0000 docs/kunit/start: Use in-tree 'kunit_defconfig' The kunit doc suggests users to get the default `kunitconfig` from an external git tree. However, the file is already located under the `arch/um/configs/` of the kernel tree. Because the local file is easier to access and maintain, this commit updates the doc to use it. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 05564c29fc943c467abb1f60ef1f0a68c4c424e9 Author: Shuah Khan Date: Mon Dec 16 12:18:40 2019 -0700 selftests: livepatch: Fix it to do root uid check and skip livepatch test configures the system and debug environment to run tests. Some of these actions fail without root access and test dumps several permission denied messages before it exits. Fix test-state.sh to call setup_config instead of set_dynamic_debug as suggested by Petr Mladek Fix it to check root uid and exit with skip code instead. Signed-off-by: Shuah Khan Acked-by: Joe Lawrence Reviewed-by: Petr Mladek Signed-off-by: Shuah Khan commit c65e41538b04e0d64a673828745a00cb68a24371 Author: Shuah Khan Date: Thu Dec 12 18:56:06 2019 -0700 selftests: firmware: Fix it to do root uid check and skip firmware attempts to load test modules that require root access and fail. Fix it to check for root uid and exit with skip code instead. Before this fix: selftests: firmware: fw_run_tests.sh modprobe: ERROR: could not insert 'test_firmware': Operation not permitted You must have the following enabled in your kernel: CONFIG_TEST_FIRMWARE=y CONFIG_FW_LOADER=y CONFIG_FW_LOADER_USER_HELPER=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y not ok 1 selftests: firmware: fw_run_tests.sh # SKIP With this fix: selftests: firmware: fw_run_tests.sh skip all tests: must be run as root not ok 1 selftests: firmware: fw_run_tests.sh # SKIP Signed-off-by: Shuah Khan Reviwed-by: Greg Kroah-Hartman Signed-off-by: Shuah Khan commit 7648dd9fc981cec52df8a635fa2eefc249e138b9 Author: Shuah Khan Date: Tue Dec 10 17:12:33 2019 -0700 selftests: filesystems/epoll: fix build error epoll build fails to find pthread lib. Fix Makefile to use LDLIBS instead of LDFLAGS. LDLIBS is the right flag to use here with -l option when invoking ld. gcc -I../../../../../usr/include/ -lpthread epoll_wakeup_test.c -o .../tools/testing/selftests/filesystems/epoll/epoll_wakeup_test /usr/bin/ld: /tmp/ccaZvJUl.o: in function `kill_timeout': epoll_wakeup_test.c:(.text+0x4dd): undefined reference to `pthread_kill' /usr/bin/ld: epoll_wakeup_test.c:(.text+0x4f2): undefined reference to `pthread_kill' /usr/bin/ld: /tmp/ccaZvJUl.o: in function `epoll9': epoll_wakeup_test.c:(.text+0x6382): undefined reference to `pthread_create' /usr/bin/ld: epoll_wakeup_test.c:(.text+0x64d2): undefined reference to `pthread_create' /usr/bin/ld: epoll_wakeup_test.c:(.text+0x6626): undefined reference to `pthread_join' /usr/bin/ld: epoll_wakeup_test.c:(.text+0x684c): undefined reference to `pthread_tryjoin_np' /usr/bin/ld: epoll_wakeup_test.c:(.text+0x6864): undefined reference to `pthread_kill' /usr/bin/ld: epoll_wakeup_test.c:(.text+0x6878): undefined reference to `pthread_join' Signed-off-by: Shuah Khan commit 1f424e8bd18754d27b15f49359004b0cea344fb5 Author: Hillf Danton Date: Sun Dec 22 22:46:54 2019 +0800 io-wq: remove unused busy list from io_sqe Commit e61df66c69b1 ("io-wq: ensure free/busy list browsing see all items") added a list for io workers in addition to the free and busy lists, not only making worker walk cleaner, but leaving the busy list unused. Let's remove it. Signed-off-by: Hillf Danton Signed-off-by: Jens Axboe commit 046aca3c25fd28da591f59a2dc1a01848e81e0b2 Author: Paulo Alcantara (SUSE) Date: Wed Dec 18 18:11:37 2019 -0300 cifs: Optimize readdir on reparse points When listing a directory with thounsands of files and most of them are reparse points, we simply marked all those dentries for revalidation and then sending additional (compounded) create/getinfo/close requests for each of them. Instead, upon receiving a response from an SMB2_QUERY_DIRECTORY (FileIdFullDirectoryInformation) command, the directory entries that have a file attribute of FILE_ATTRIBUTE_REPARSE_POINT will contain an EaSize field with a reparse tag in it, so we parse it and mark the dentry for revalidation only if it is a DFS or a symlink. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French commit 7935799e041ae10d380d04ea23868240f082bd11 Author: Nathan Chancellor Date: Tue Dec 17 20:04:51 2019 -0700 cifs: Adjust indentation in smb2_open_file Clang warns: ../fs/cifs/smb2file.c:70:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] if (oparms->tcon->use_resilient) { ^ ../fs/cifs/smb2file.c:66:2: note: previous statement is here if (rc) ^ 1 warning generated. This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: 592fafe644bf ("Add resilienthandles mount parm") Link: https://github.com/ClangBuiltLinux/linux/issues/826 Signed-off-by: Nathan Chancellor Signed-off-by: Steve French commit fa633a0f89192379828103957874682d389eae83 Author: Namhyung Kim Date: Mon Dec 23 15:13:26 2019 +0900 libbpf: Fix build on read-only filesystems I got the following error when I tried to build perf on a read-only filesystem with O=dir option. $ cd /some/where/ro/linux/tools/perf $ make O=$HOME/build/perf ... CC /home/namhyung/build/perf/lib.o /bin/sh: bpf_helper_defs.h: Read-only file system make[3]: *** [Makefile:184: bpf_helper_defs.h] Error 1 make[2]: *** [Makefile.perf:778: /home/namhyung/build/perf/libbpf.a] Error 2 make[2]: *** Waiting for unfinished jobs.... LD /home/namhyung/build/perf/libperf-in.o AR /home/namhyung/build/perf/libperf.a PERF_VERSION = 5.4.0 make[1]: *** [Makefile.perf:225: sub-make] Error 2 make: *** [Makefile:70: all] Error 2 It was becaused bpf_helper_defs.h was generated in current directory. Move it to OUTPUT directory. Signed-off-by: Namhyung Kim Signed-off-by: Daniel Borkmann Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191223061326.843366-1-namhyung@kernel.org commit e85ade1f50aae464ce196672faa7a099fd1721ed Author: Chris Wilson Date: Wed Dec 18 10:40:43 2019 +0000 drm/i915: Hold reference to intel_frontbuffer as we track activity Since obj->frontbuffer is no longer protected by the struct_mutex, as we are processing the execbuf, it may be removed. Mark the intel_frontbuffer as rcu protected, and so acquire a reference to the struct as we track activity upon it. Closes: https://gitlab.freedesktop.org/drm/intel/issues/827 Fixes: 8e7cb1799b4f ("drm/i915: Extract intel_frontbuffer active tracking") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: # v5.4+ Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191218104043.3539458-1-chris@chris-wilson.co.uk (cherry picked from commit da42104f589d979bbe402703fd836cec60befae1) Signed-off-by: Jani Nikula commit d39da686c2f3b8518b6933951d53891aa83227d6 Author: Chris Wilson Date: Wed Dec 18 09:35:04 2019 +0000 drm/i915/gt: Ratelimit display power w/a For very light workloads that frequently park, acquiring the display power well (required to prevent the dmc from trashing the system) takes longer than the execution. A good example is the igt_coherency selftest, which is slowed down by an order of magnitude in the worst case with powerwell cycling. To prevent frequent cycling, while keeping our fast soft-rc6, use a timer to delay release of the display powerwell. Fixes: 311770173fac ("drm/i915/gt: Schedule request retirement when timeline idles") References: https://gitlab.freedesktop.org/drm/intel/issues/848 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191218093504.3477048-1-chris@chris-wilson.co.uk (cherry picked from commit 81ff52b705775433a955b2746d37b87bdc89a3d0) Signed-off-by: Jani Nikula commit 74ac57806af124b57af30f2ca9fc9df0afe6269e Author: Tvrtko Ursulin Date: Tue Dec 17 14:20:57 2019 +0000 drm/i915/pmu: Ensure monotonic rc6 Avoid rc6 counter going backward in close to 0% RC6 scenarios like: 15.005477996 114,246,613 ns i915/rc6-residency/ 16.005876662 667,657 ns i915/rc6-residency/ 17.006131417 7,286 ns i915/rc6-residency/ 18.006615031 18,446,744,073,708,914,688 ns i915/rc6-residency/ 19.007158361 18,446,744,073,709,447,168 ns i915/rc6-residency/ 20.007806498 0 ns i915/rc6-residency/ 21.008227495 1,440,403 ns i915/rc6-residency/ There are two aspects to this fix. First is not assuming rc6 value zero means GT is asleep since that can also mean GPU is fully busy and we do not want to enter the estimation path in that case. Second is ensuring monotonicity on the estimation path itself. I suspect what is happening is with extremely rapid park/unpark cycles we get no updates on the real rc6 and therefore have to careful not to unconditionally trust use last known real rc6 when creating a new estimation. v2: * Simplify logic by not tracking the estimate but last reported value. Signed-off-by: Tvrtko Ursulin Fixes: 16ffe73c186b ("drm/i915/pmu: Use GT parked for estimating RC6 while asleep") Cc: Chris Wilson Reviewed-by: Chris Wilson # v1 Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191217142057.1000-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit df6a42053513846475ae1fbd224dfbdbcd0c7010) Signed-off-by: Jani Nikula commit 91a063c956084fb21cf2523bce6892514e3f1799 Author: Michael Ellerman Date: Sat Dec 21 14:16:54 2019 +1100 powerpc/mm: Mark get_slice_psize() & slice_addr_is_low() as notrace These slice routines are called from the SLB miss handler, which can lead to warnings from the IRQ code, because we have not reconciled the IRQ state properly: WARNING: CPU: 72 PID: 30150 at arch/powerpc/kernel/irq.c:258 arch_local_irq_restore.part.0+0xcc/0x100 Modules linked in: CPU: 72 PID: 30150 Comm: ftracetest Not tainted 5.5.0-rc2-gcc9x-g7e0165b2f1a9 #1 NIP: c00000000001d83c LR: c00000000029ab90 CTR: c00000000026cf90 REGS: c0000007eee3b960 TRAP: 0700 Not tainted (5.5.0-rc2-gcc9x-g7e0165b2f1a9) MSR: 8000000000021033 CR: 22242844 XER: 20000000 CFAR: c00000000001d780 IRQMASK: 0 ... NIP arch_local_irq_restore.part.0+0xcc/0x100 LR trace_graph_entry+0x270/0x340 Call Trace: trace_graph_entry+0x254/0x340 (unreliable) function_graph_enter+0xe4/0x1a0 prepare_ftrace_return+0xa0/0x130 ftrace_graph_caller+0x44/0x94 # (get_slice_psize()) slb_allocate_user+0x7c/0x100 do_slb_fault+0xf8/0x300 instruction_access_slb_common+0x140/0x180 Fixes: 48e7b7695745 ("powerpc/64s/hash: Convert SLB miss handlers to C") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191221121337.4894-1-mpe@ellerman.id.au commit d84a7a654a66eead599cfd4f436d1f921e01074f Author: Johannes Berg Date: Thu Dec 5 09:31:07 2019 +0100 iwlwifi: pcie: extend hardware workaround to context-info After more investigation on the hardware side, it appears that the hardware bug regarding 2^32 boundary reaching/crossing also affects other uses of the DMA engine, in particular the ones triggered by the context-info (image loader) mechanism. It also turns out that the bug only affects devices with gen2 TX hardware engine, so we don't need to change context info for gen3. The TX path workarounds are simpler to still keep for both though. Add the workaround to that code as well; this is a lot simpler as we have just a single way to allocate DMA memory there. I made the algorithm recursive (with a small limit) since it's actually (almost) impossible to hit this today - dma_alloc_coherent is currently documented to always return 32-bit addressable memory regardless of the DMA mask for it, and so we could only get REALLY unlucky to get the very last page in that area. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 2763bba6328c53c455d8f7f5302b80030551c31b Author: Haim Dreyfuss Date: Wed Nov 27 14:55:58 2019 -0500 iwlwifi: Don't ignore the cap field upon mcc update When receiving a new MCC driver get all the data about the new country code and its regulatory information. Mistakenly, we ignored the cap field, which includes global regulatory information which should be applies to every channel. Fix it. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho commit ed780545c13a21dc0276807897e2d4fc142e11ac Author: Johannes Berg Date: Thu Nov 21 11:02:31 2019 +0100 iwlwifi: mvm: report TX rate to mac80211 directly for RS offload If we have offloaded rate scaling, which is always true for those devices supporting HE, then report the TX rate directly from the data the firmware gives us, instead of only passing it to mac80211 on frame status only and for it to track it. First of all, this makes us always report the last good rate that the rate scaling algorithm picked, which is better than reporting the last rate for any frame since management frames etc. are sent with very low rates and could interfere. Additionally, this allows us to properly report HE rates, though in case there's a lot of trigger-based traffic, we don't get any choice in the rates and don't report that properly right now. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit b3f20e098293892388d6a0491d6bbb2efb46fbff Author: Luca Coelho Date: Mon Nov 25 13:21:58 2019 +0200 iwlwifi: mvm: fix NVM check for 3168 devices We had a check on !NVM_EXT and then a check for NVM_SDP in the else block of this if. The else block, obviously, could only be reached if using NVM_EXT, so it would never be NVM_SDP. Fix that by checking whether the nvm_type is IWL_NVM instead of checking for !IWL_NVM_EXT to solve this issue. Reported-by: Stefan Sperling Signed-off-by: Luca Coelho commit 4f565ee2999960d541854389e20b78e7105e3afc Author: Luca Coelho Date: Mon Nov 25 11:50:58 2019 +0200 iwlwifi: fix TLV fragment allocation loop In the allocation loop, "pages" will never become zero (because of the DIV_ROUND_UP), so if we can't allocate any size and pages becomes 1, we will keep trying to allocate 1 page until it succeeds. And in that case, as coverity reported, block will never be NULL. Reported-by: coverity-bot Addresses-Coverity-ID: 1487402 ("Control flow issues") Fixes: 14124b25780d ("iwlwifi: dbg_ini: implement monitor allocation flow") Signed-off-by: Luca Coelho Fixes: 14124b25780d ("iwlwifi: dbg_ini: implement monitor allocation flow") Signed-off-by: Luca Coelho commit a89c72ffd07369f5ccc74f0332d2785a7077241d Author: Johannes Berg Date: Thu Nov 14 09:09:34 2019 +0100 iwlwifi: pcie: allocate smaller dev_cmd for TX headers As noted in the previous commit, due to the way we allocate the dev_cmd headers with 324 byte size, and 4/8 byte alignment, the part we use of them (bytes 20..40-68) could still cross a page and thus 2^32 boundary. Address this by using alignment to ensure that the allocation cannot cross a page boundary, on hardware that's affected. To make that not cause more memory consumption, reduce the size of the allocations to the necessary size - we go from 324 bytes in each allocation to 60/68 on gen2 depending on family, and ~120 or so on gen1 (so on gen1 it's a pure reduction in size, since we don't need alignment there). To avoid size and clearing issues, add a new structure that's just the header, and use kmem_cache_zalloc(). Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit c5a4e8eb683c6a80c6907c12acf7b66665ef4b0b Author: Johannes Berg Date: Thu Nov 14 09:26:20 2019 +0100 iwlwifi: pcie: detect the DMA bug and warn if it happens Warn if the DMA bug is going to happen. We don't have a good way of actually aborting in this case and we have workarounds in place for the cases where it happens, but in order to not be surprised add a safety-check and warn. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit c4a786b32621850775dedd1a329de0c060f9c904 Author: Johannes Berg Date: Tue Nov 12 10:32:42 2019 +0100 iwlwifi: pcie: work around DMA hardware bug There's a hardware bug in the flow handler (DMA engine), if the address + len of some TB wraps around a 2^32 boundary, the carry bit is then carried over into the next TB. Work around this by copying the data to a new page when we find this situation, and then copy it in a way that we cannot hit the very end of the page. To be able to free the new page again later we need to chain it to the TSO page, use the last pointer there to make sure we can never use the page fully for DMA, and thus cannot cause the same overflow situation on this page. This leaves a few potential places (where we didn't observe the problem) unaddressed: * The second TB could reach or cross the end of a page (and thus 2^32) due to the way we allocate the dev_cmd for the header * For host commands, a similar thing could happen since they're just kmalloc(). We'll address these in further commits. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 106f7b3bf943d267eb657f34616adcaadb2ab07f Author: Angus Ainslie (Purism) Date: Mon Dec 23 09:12:53 2019 +0100 arm64: dts: imx8mq-librem5-devkit: use correct interrupt for the magnetometer The LSM9DS1 uses a high level interrupt. Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Martin Kepplinger Fixes: eb4ea0857c83 ("arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit") Signed-off-by: Shawn Guo commit fe6a6689d1815b63528796886853890d8ee7f021 Author: Marek Vasut Date: Fri Dec 20 10:11:24 2019 +0100 ARM: dts: imx6q-dhcom: Fix SGTL5000 VDDIO regulator connection The SGTL5000 VDDIO is connected to the PMIC SW2 output, not to a fixed 3V3 rail. Describe this correctly in the DT. Fixes: 52c7a088badd ("ARM: dts: imx6q: Add support for the DHCOM iMX6 SoM and PDK2") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Ludwig Zenz Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo commit 24461d9792c2c706092805ff1b067628933441bd Author: Peter Ujfalusi Date: Fri Dec 20 15:11:00 2019 +0200 dmaengine: virt-dma: Fix access after free in vchan_complete() vchan_vdesc_fini() is freeing up 'vd' so the access to vd->tx_result is via already freed up memory. Move the vchan_vdesc_fini() after invoking the callback to avoid this. Fixes: 09d5b702b0f97 ("dmaengine: virt-dma: store result on dma descriptor") Signed-off-by: Peter Ujfalusi Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20191220131100.21804-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 2f42e05b942fe2fbfb9bbc6e34e1dd8c3ce4f3a4 Author: John Stultz Date: Wed Dec 18 19:09:06 2019 +0000 dmaengine: k3dma: Avoid null pointer traversal In some cases we seem to submit two transactions in a row, which causes us to lose track of the first. If we then cancel the request, we may still get an interrupt, which traverses a null ds_run value. So try to avoid starting a new transaction if the ds_run value is set. While this patch avoids the null pointer crash, I've had some reports of the k3dma driver still getting confused, which suggests the ds_run/ds_done value handling still isn't quite right. However, I've not run into an issue recently with it so I think this patch is worth pushing upstream to avoid the crash. Signed-off-by: John Stultz [add ss tag] Link: https://lore.kernel.org/r/20191218190906.6641-1-john.stultz@linaro.org Signed-off-by: Vinod Koul commit b8ab62ff7199fac8ce27fa4a149929034fabe7f8 Author: Peng Fan Date: Wed Dec 18 12:22:32 2019 +0000 ARM: dts: imx7ulp: fix reg of cpu node According to arm cpus binding doc, " On 32-bit ARM v7 or later systems this property is required and matches the CPU MPIDR[23:0] register bits. Bits [23:0] in the reg cell must be set to bits [23:0] in MPIDR. All other bits in the reg cell must be set to 0. " In i.MX7ULP, the MPIDR[23:0] is 0xf00, not 0, so fix it. Otherwise there will be warning: "DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map" Fixes: 20434dc92c05 ("ARM: dts: imx: add common imx7ulp dtsi support") Signed-off-by: Peng Fan Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 24a572bf67994223e722cadfe663e15ba221882a Author: Adam Ford Date: Mon Dec 16 05:15:30 2019 -0600 arm64: dts: imx8mm: Change SDMA1 ahb clock for imx8mm Using SDMA1 with UART1 is causing a "Timeout waiting for CH0" error. This patch changes to ahb clock from SDMA1_ROOT to AHB which fixes the timeout error. Fixes: a05ea40eb384 ("arm64: dts: imx: Add i.mx8mm dtsi support") Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 33eae7fb2e593fdbaac15d843e2558379c6d1149 Author: Yinbo Zhu Date: Fri Dec 13 10:18:39 2019 +0800 arm64: dts: ls1028a: fix endian setting for dcfg DCFG block uses little endian. Fix it so that register access becomes correct. Signed-off-by: Yinbo Zhu Acked-by: Yangbo Lu Fixes: 8897f3255c9c ("arm64: dts: Add support for NXP LS1028A SoC") Signed-off-by: Shawn Guo commit 7d7778b1396bc9e2a3875009af522beb4ea9355a Author: Alexandre Belloni Date: Fri Dec 13 00:08:14 2019 +0100 ARM: dts: imx6q-dhcom: fix rtc compatible The only correct and documented compatible string for the rv3029 is microcrystal,rv3029. Fix it up. Fixes: 52c7a088badd ("ARM: dts: imx6q: Add support for the DHCOM iMX6 SoM and PDK2") Signed-off-by: Alexandre Belloni Signed-off-by: Shawn Guo commit 5fdb0684b5b0f41402161f068d3d84bf6ed1c3f4 Author: Arnd Bergmann Date: Thu Dec 12 10:56:31 2019 +0900 PM / devfreq: tegra: Add COMMON_CLK dependency Compile-testing this driver fails if CONFIG_COMMON_CLK is not set: drivers/devfreq/tegra30-devfreq.o: In function `tegra_devfreq_target': tegra30-devfreq.c:(.text+0x164): undefined reference to `clk_set_min_rate' Fixes: 35f8dbc72721 ("PM / devfreq: tegra: Enable COMPILE_TEST for the driver") Signed-off-by: Arnd Bergmann Reviewed-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 996fa477d118a11e63f77fbb393173560e5a655d Author: Leonard Crestez Date: Mon Nov 11 20:16:10 2019 +0200 PM / devfreq: Drop explicit selection of PM_OPP CONFIG_PM_OPP is already selected by CONFIG_PM_DEVFREQ since commit b9c69e043266 ("PM / devfreq: Add dependency on PM_OPP"). This means that individual drivers shouldn't "select PM_OPP" explicitly. Signed-off-by: Leonard Crestez [cw00.choi: Edit the patch title] Signed-off-by: Chanwoo Choi commit f54c7898ed1c3c9331376c0337a5049c38f66497 Author: Daniel Borkmann Date: Sun Dec 22 23:37:40 2019 +0100 bpf: Fix precision tracking for unbounded scalars Anatoly has been fuzzing with kBdysch harness and reported a hang in one of the outcomes. Upon closer analysis, it turns out that precise scalar value tracking is missing a few precision markings for unknown scalars: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=invP0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (35) if r0 >= 0xf72e goto pc+0 --> only follow fallthrough 2: R0_w=invP0 R1=ctx(id=0,off=0,imm=0) R10=fp0 2: (35) if r0 >= 0x80fe0000 goto pc+0 --> only follow fallthrough 3: R0_w=invP0 R1=ctx(id=0,off=0,imm=0) R10=fp0 3: (14) w0 -= -536870912 4: R0_w=invP536870912 R1=ctx(id=0,off=0,imm=0) R10=fp0 4: (0f) r1 += r0 5: R0_w=invP536870912 R1_w=inv(id=0) R10=fp0 5: (55) if r1 != 0x104c1500 goto pc+0 --> push other branch for later analysis R0_w=invP536870912 R1_w=inv273421568 R10=fp0 6: R0_w=invP536870912 R1_w=inv273421568 R10=fp0 6: (b7) r0 = 0 7: R0=invP0 R1=inv273421568 R10=fp0 7: (76) if w1 s>= 0xffffff00 goto pc+3 --> only follow goto 11: R0=invP0 R1=inv273421568 R10=fp0 11: (95) exit 6: R0_w=invP536870912 R1_w=inv(id=0) R10=fp0 6: (b7) r0 = 0 propagating r0 7: safe processed 11 insns [...] In the analysis of the second path coming after the successful exit above, the path is being pruned at line 7. Pruning analysis found that both r0 are precise P0 and both R1 are non-precise scalars and given prior path with R1 as non-precise scalar succeeded, this one is therefore safe as well. However, problem is that given condition at insn 7 in the first run, we only followed goto and didn't push the other branch for later analysis, we've never walked the few insns in there and therefore dead-code sanitation rewrites it as goto pc-1, causing the hang depending on the skb address hitting these conditions. The issue is that R1 should have been marked as precise as well such that pruning enforces range check and conluded that new R1 is not in range of old R1. In insn 4, we mark R1 (skb) as unknown scalar via __mark_reg_unbounded() but not mark_reg_unbounded() and therefore regs->precise remains as false. Back in b5dc0163d8fd ("bpf: precise scalar_value tracking"), this was not the case since marking out of __mark_reg_unbounded() had this covered as well. Once in both are set as precise in 4 as they should have been, we conclude that given R1 was in prior fall-through path 0x104c1500 and now is completely unknown, the check at insn 7 concludes that we need to continue walking. Analysis after the fix: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=invP0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (35) if r0 >= 0xf72e goto pc+0 2: R0_w=invP0 R1=ctx(id=0,off=0,imm=0) R10=fp0 2: (35) if r0 >= 0x80fe0000 goto pc+0 3: R0_w=invP0 R1=ctx(id=0,off=0,imm=0) R10=fp0 3: (14) w0 -= -536870912 4: R0_w=invP536870912 R1=ctx(id=0,off=0,imm=0) R10=fp0 4: (0f) r1 += r0 5: R0_w=invP536870912 R1_w=invP(id=0) R10=fp0 5: (55) if r1 != 0x104c1500 goto pc+0 R0_w=invP536870912 R1_w=invP273421568 R10=fp0 6: R0_w=invP536870912 R1_w=invP273421568 R10=fp0 6: (b7) r0 = 0 7: R0=invP0 R1=invP273421568 R10=fp0 7: (76) if w1 s>= 0xffffff00 goto pc+3 11: R0=invP0 R1=invP273421568 R10=fp0 11: (95) exit 6: R0_w=invP536870912 R1_w=invP(id=0) R10=fp0 6: (b7) r0 = 0 7: R0_w=invP0 R1_w=invP(id=0) R10=fp0 7: (76) if w1 s>= 0xffffff00 goto pc+3 R0_w=invP0 R1_w=invP(id=0) R10=fp0 8: R0_w=invP0 R1_w=invP(id=0) R10=fp0 8: (a5) if r0 < 0x2007002a goto pc+0 9: R0_w=invP0 R1_w=invP(id=0) R10=fp0 9: (57) r0 &= -16316416 10: R0_w=invP0 R1_w=invP(id=0) R10=fp0 10: (a6) if w0 < 0x1201 goto pc+0 11: R0_w=invP0 R1_w=invP(id=0) R10=fp0 11: (95) exit 11: R0=invP0 R1=invP(id=0) R10=fp0 11: (95) exit processed 16 insns [...] Fixes: 6754172c208d ("bpf: fix precision tracking in presence of bpf2bpf calls") Reported-by: Anatoly Trosinenko Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191222223740.25297-1-daniel@iogearbox.net commit 46cf053efec6a3a5f343fead837777efe8252a46 Author: Linus Torvalds Date: Sun Dec 22 17:02:23 2019 -0800 Linux 5.5-rc3 commit 9efa3ed504edb1c1fc88dba96fd32168f50ab77c Merge: c60174717544 1edc8eb2e931 Author: Linus Torvalds Date: Sun Dec 22 17:00:04 2019 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Eric's s_inodes softlockup fixes + Jan's fix for recent regression from pipe rework" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: call fsnotify_sb_delete after evict_inodes fs: avoid softlockups in s_inodes iterators pipe: Fix bogus dereference in iov_iter_alignment() commit c60174717544aa8959683d7e19d568309c3a0c65 Merge: a396560706d4 5084bf6b2006 Author: Linus Torvalds Date: Sun Dec 22 10:59:06 2019 -0800 Merge tag 'xfs-5.5-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Fix a few bugs that could lead to corrupt files, fsck complaints, and filesystem crashes: - Minor documentation fixes - Fix a file corruption due to read racing with an insert range operation. - Fix log reservation overflows when allocating large rt extents - Fix a buffer log item flags check - Don't allow administrators to mount with sunit= options that will cause later xfs_repair complaints about the root directory being suspicious because the fs geometry appeared inconsistent - Fix a non-static helper that should have been static" * tag 'xfs-5.5-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: Make the symbol 'xfs_rtalloc_log_count' static xfs: don't commit sunit/swidth updates to disk if that would cause repair failures xfs: split the sunit parameter update into two parts xfs: refactor agfl length computation function libxfs: resync with the userspace libxfs xfs: use bitops interface for buf log item AIL flag check xfs: fix log reservation overflows when allocating large rt extents xfs: stabilize insert range start boundary to avoid COW writeback race xfs: fix Sphinx documentation warning commit a396560706d457058b9f54f184b6f5973c82032c Merge: 44579f35c2d9 23f6b0240534 Author: Linus Torvalds Date: Sun Dec 22 10:41:48 2019 -0800 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 bug fixes from Ted Ts'o: "Ext4 bug fixes, including a regression fix" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: clarify impact of 'commit' mount option ext4: fix unused-but-set-variable warning in ext4_add_entry() jbd2: fix kernel-doc notation warning ext4: use RCU API in debug_print_tree ext4: validate the debug_want_extra_isize mount option at parse time ext4: reserve revoke credits in __ext4_new_inode ext4: unlock on error in ext4_expand_extra_isize() ext4: optimize __ext4_check_dir_entry() ext4: check for directory entries too close to block end ext4: fix ext4_empty_dir() for directories with holes commit 44579f35c2d90dfac5ea27308261318c7750e9b5 Merge: a313c8e056f8 df034c93f15e Author: Linus Torvalds Date: Sun Dec 22 10:36:55 2019 -0800 Merge tag 'block-5.5-20191221' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Let's try this one again, this time without the compat_ioctl changes. We've got those fixed up, but that can go out next week. This contains: - block queue flush lockdep annotation (Bart) - Type fix for bsg_queue_rq() (Bart) - Three dasd fixes (Stefan, Jan) - nbd deadlock fix (Mike) - Error handling bio user map fix (Yang) - iocost fix (Tejun) - sbitmap waitqueue addition fix that affects the kyber IO scheduler (David)" * tag 'block-5.5-20191221' of git://git.kernel.dk/linux-block: sbitmap: only queue kyber's wait callback if not already active block: fix memleak when __blk_rq_map_user_iov() is failed s390/dasd: fix typo in copyright statement s390/dasd: fix memleak in path handling error case s390/dasd/cio: Interpret ccw_device_get_mdc return value correctly block: Fix a lockdep complaint triggered by request queue flushing block: Fix the type of 'sts' in bsg_queue_rq() block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT nbd: fix shutdown and recv work deadlock v2 iocost: over-budget forced IOs should schedule async delay commit a313c8e056f86d13ae95a4aef30715918efff20f Merge: 7214618c60e9 d68321dec1b2 Author: Linus Torvalds Date: Sun Dec 22 10:26:59 2019 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "PPC: - Fix a bug where we try to do an ultracall on a system without an ultravisor KVM: - Fix uninitialised sysreg accessor - Fix handling of demand-paged device mappings - Stop spamming the console on IMPDEF sysregs - Relax mappings of writable memslots - Assorted cleanups MIPS: - Now orphan, James Hogan is stepping down x86: - MAINTAINERS change, so long Radim and thanks for all the fish - supported CPUID fixes for AMD machines without SPEC_CTRL" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: MAINTAINERS: remove Radim from KVM maintainers MAINTAINERS: Orphan KVM for MIPS kvm: x86: Host feature SSBD doesn't imply guest feature AMD_SSBD kvm: x86: Host feature SSBD doesn't imply guest feature SPEC_CTRL_SSBD KVM: PPC: Book3S HV: Don't do ultravisor calls on systems without ultravisor KVM: arm/arm64: Properly handle faulting of device mappings KVM: arm64: Ensure 'params' is initialised when looking up sys register KVM: arm/arm64: Remove excessive permission check in kvm_arch_prepare_memory_region KVM: arm64: Don't log IMP DEF sysreg traps KVM: arm64: Sanely ratelimit sysreg messages KVM: arm/arm64: vgic: Use wrapper function to lock/unlock all vcpus in kvm_vgic_create() KVM: arm/arm64: vgic: Fix potential double free dist->spis in __kvm_vgic_destroy() KVM: arm/arm64: Get rid of unused arg in cpu_init_hyp_mode() commit 7214618c60e947b8cea12b47d8279bd4220f21bc Merge: 78bac77b521b 9209fb51896f Author: Linus Torvalds Date: Sun Dec 22 10:22:47 2019 -0800 Merge tag 'riscv/for-v5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Paul Walmsley: "Several fixes, and one cleanup, for RISC-V. Fixes: - Fix an error in a Kconfig file that resulted in an undefined Kconfig option "CONFIG_CONFIG_MMU" - Fix undefined Kconfig option "CONFIG_CONFIG_MMU" - Fix scratch register clearing in M-mode (affects nommu users) - Fix a mismerge on my part that broke the build for CONFIG_SPARSEMEM_VMEMMAP users Cleanup: - Move SiFive L2 cache-related code to drivers/soc, per request" * tag 'riscv/for-v5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: move sifive_l2_cache.c to drivers/soc riscv: define vmemmap before pfn_to_page calls riscv: fix scratch register clearing in M-mode. riscv: Fix use of undefined config option CONFIG_CONFIG_MMU commit 78bac77b521b032f96077c21241cc5d5668482c5 Merge: 0dd1e3773ae8 4bfeadfc0712 Author: Linus Torvalds Date: Sun Dec 22 09:54:33 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Several nf_flow_table_offload fixes from Pablo Neira Ayuso, including adding a missing ipv6 match description. 2) Several heap overflow fixes in mwifiex from qize wang and Ganapathi Bhat. 3) Fix uninit value in bond_neigh_init(), from Eric Dumazet. 4) Fix non-ACPI probing of nxp-nci, from Stephan Gerhold. 5) Fix use after free in tipc_disc_rcv(), from Tuong Lien. 6) Enforce limit of 33 tail calls in mips and riscv JIT, from Paul Chaignon. 7) Multicast MAC limit test is off by one in qede, from Manish Chopra. 8) Fix established socket lookup race when socket goes from TCP_ESTABLISHED to TCP_LISTEN, because there lacks an intervening RCU grace period. From Eric Dumazet. 9) Don't send empty SKBs from tcp_write_xmit(), also from Eric Dumazet. 10) Fix active backup transition after link failure in bonding, from Mahesh Bandewar. 11) Avoid zero sized hash table in gtp driver, from Taehee Yoo. 12) Fix wrong interface passed to ->mac_link_up(), from Russell King. 13) Fix DSA egress flooding settings in b53, from Florian Fainelli. 14) Memory leak in gmac_setup_txqs(), from Navid Emamdoost. 15) Fix double free in dpaa2-ptp code, from Ioana Ciornei. 16) Reject invalid MTU values in stmmac, from Jose Abreu. 17) Fix refcount leak in error path of u32 classifier, from Davide Caratti. 18) Fix regression causing iwlwifi firmware crashes on boot, from Anders Kaseorg. 19) Fix inverted return value logic in llc2 code, from Chan Shu Tak. 20) Disable hardware GRO when XDP is attached to qede, frm Manish Chopra. 21) Since we encode state in the low pointer bits, dst metrics must be at least 4 byte aligned, which is not necessarily true on m68k. Add annotations to fix this, from Geert Uytterhoeven. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (160 commits) sfc: Include XDP packet headroom in buffer step size. sfc: fix channel allocation with brute force net: dst: Force 4-byte alignment of dst_metrics selftests: pmtu: fix init mtu value in description hv_netvsc: Fix unwanted rx_table reset net: phy: ensure that phy IDs are correctly typed mod_devicetable: fix PHY module format qede: Disable hardware gro when xdp prog is installed net: ena: fix issues in setting interrupt moderation params in ethtool net: ena: fix default tx interrupt moderation interval net/smc: unregister ib devices in reboot_event net: stmmac: platform: Fix MDIO init for platforms without PHY llc2: Fix return statement of llc_stat_ev_rx_null_dsap_xid_c (and _test_c) net: hisilicon: Fix a BUG trigered by wrong bytes_compl net: dsa: ksz: use common define for tag len s390/qeth: don't return -ENOTSUPP to userspace s390/qeth: fix promiscuous mode after reset s390/qeth: handle error due to unsupported transport mode cxgb4: fix refcount init for TC-MQPRIO offload tc-testing: initial tdc selftests for cls_u32 ... commit 0dd1e3773ae8afc4bfdce782bdeffc10f9cae6ec Author: Jan Stancek Date: Sun Dec 22 13:33:24 2019 +0100 pipe: fix empty pipe check in pipe_write() LTP pipeio_1 test is hanging with v5.5-rc2-385-gb8e382a185eb, with read side observing empty pipe and sleeping and write side running out of space and then sleeping as well. In this scenario there are 5 writers and 1 reader. Problem is that after pipe_write() reacquires pipe lock, it re-checks for empty pipe with potentially stale 'head' and doesn't wake up read side anymore. pipe->tail can advance beyond 'head', because there are multiple writers. Use pipe->head for empty pipe check after reacquiring lock to observe current state. Testing: With patch, LTP pipeio_1 ran successfully in loop for 1 hour. Without patch it hanged within a minute. Fixes: 1b6b26ae7053 ("pipe: fix and clarify pipe write wakeup logic") Reported-by: Rachel Sibley Signed-off-by: Jan Stancek Signed-off-by: Linus Torvalds commit d68321dec1b2234fb32f423e32c3af5915eae36c Merge: 19a049f1a44d d89c69f42bf0 Author: Paolo Bonzini Date: Sun Dec 22 13:18:15 2019 +0100 Merge tag 'kvm-ppc-fixes-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master PPC KVM fix for 5.5 - Fix a bug where we try to do an ultracall on a system without an ultravisor. commit 19a049f1a44d18e38a311e723c19c33c81020a30 Author: Paolo Bonzini Date: Wed Dec 4 15:33:35 2019 +0100 MAINTAINERS: remove Radim from KVM maintainers Radim's kernel.org email is bouncing, which I take as a signal that he is not really able to deal with KVM at this time. Make MAINTAINERS match the effective value of KVM's bus factor. Signed-off-by: Paolo Bonzini commit 088e11d4220b4802e23fa00fe610ea89a5094587 Author: James Hogan Date: Sat Dec 21 15:50:13 2019 +0000 MAINTAINERS: Orphan KVM for MIPS I haven't been active for 18 months, and don't have the hardware set up to test KVM for MIPS, so mark it as orphaned and remove myself as maintainer. Hopefully somebody from MIPS can pick this up. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Paul Burton Cc: Ralf Baechle Cc: kvm@vger.kernel.org Cc: linux-mips@vger.kernel.org Signed-off-by: Paolo Bonzini commit 23f6b02405343103791c6a9533d73716cdf0c672 Author: Jan Kara Date: Wed Dec 18 12:12:10 2019 +0100 ext4: clarify impact of 'commit' mount option The description of 'commit' mount option dates back to ext3 times. Update the description to match current meaning for ext4. Reported-by: Paul Richards Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191218111210.14161-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 68d7b2d838f1aff4d46a793a2fae33e8ad19223e Author: Yunfeng Ye Date: Tue Dec 17 22:46:49 2019 +0800 ext4: fix unused-but-set-variable warning in ext4_add_entry() Warning is found when compile with "-Wunused-but-set-variable": fs/ext4/namei.c: In function ‘ext4_add_entry’: fs/ext4/namei.c:2167:23: warning: variable ‘sbi’ set but not used [-Wunused-but-set-variable] struct ext4_sb_info *sbi; ^~~ Fix this by moving the variable @sbi under CONFIG_UNICODE. Signed-off-by: Yunfeng Ye Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/cb5eb904-224a-9701-c38f-cb23514b1fff@huawei.com Signed-off-by: Theodore Ts'o commit b8e382a185ebb1bca66bd541e5a0f858b6b9cbb9 Merge: 4746104a6f59 fe6e096a5bbf Author: Linus Torvalds Date: Sat Dec 21 15:16:56 2019 -0800 Merge tag 'trace-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Fix memory leak on error path of process_system_preds() - Lock inversion fix with updating tgid recording option - Fix histogram compare function on big endian machines - Fix histogram trigger function on big endian machines - Make trace_printk() irq sync on init for kprobe selftest correctness * tag 'trace-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix endianness bug in histogram trigger samples/trace_printk: Wait for IRQ work to finish tracing: Fix lock inversion in trace_event_enable_tgid_record() tracing: Have the histogram compare functions convert to u64 first tracing: Avoid memory leak in process_system_preds() commit 4746104a6f599f213c3d97d8c39032953fd4580f Merge: 60b04df6bfbf c14685547762 Author: Linus Torvalds Date: Sat Dec 21 15:12:26 2019 -0800 Merge tag 'libnvdimm-fix-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Dan Williams: "A minor regression fix. The libnvdimm unit tests were expecting to mock calls to ioremap_nocache() which disappeared in v5.5-rc1. This fix has appeared in -next and collided with some cleanups that Christoph has planned for v5.6, but he will fix up his branch once this goes in. Summary: - Restore the operation of the libnvdimm unit tests after the removal of ioremap_nocache()" * tag 'libnvdimm-fix-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: tools/testing/nvdimm: Fix mock support for ioremap commit fe6e096a5bbf73a142f09c72e7aa2835026eb1a3 Author: Sven Schnelle Date: Wed Dec 18 08:44:27 2019 +0100 tracing: Fix endianness bug in histogram trigger At least on PA-RISC and s390 synthetic histogram triggers are failing selftests because trace_event_raw_event_synth() always writes a 64 bit values, but the reader expects a field->size sized value. On little endian machines this doesn't hurt, but on big endian this makes the reader always read zero values. Link: http://lore.kernel.org/linux-trace-devel/20191218074427.96184-4-svens@linux.ibm.com Cc: stable@vger.kernel.org Fixes: 4b147936fa509 ("tracing: Add support for 'synthetic' events") Acked-by: Tom Zanussi Signed-off-by: Sven Schnelle Signed-off-by: Steven Rostedt (VMware) commit 01f36a554e3ef32f9fc4b81a4437cf08fd0e4742 Author: Sven Schnelle Date: Wed Dec 18 08:44:26 2019 +0100 samples/trace_printk: Wait for IRQ work to finish trace_printk schedules work via irq_work_queue(), but doesn't wait until it was processed. The kprobe_module.tc testcase does: :;: "Load module again, which means the event1 should be recorded";: modprobe trace-printk grep "event1:" trace so the grep which checks the trace file might run before the irq work was processed. Fix this by adding a irq_work_sync(). Link: http://lore.kernel.org/linux-trace-devel/20191218074427.96184-3-svens@linux.ibm.com Cc: stable@vger.kernel.org Fixes: af2a0750f3749 ("selftests/ftrace: Improve kprobe on module testcase to load/unload module") Signed-off-by: Sven Schnelle Signed-off-by: Steven Rostedt (VMware) commit 3a53acf1d9bea11b57c1f6205e3fe73f9d8a3688 Author: Prateek Sood Date: Tue Dec 10 09:15:16 2019 +0000 tracing: Fix lock inversion in trace_event_enable_tgid_record() Task T2 Task T3 trace_options_core_write() subsystem_open() mutex_lock(trace_types_lock) mutex_lock(event_mutex) set_tracer_flag() trace_event_enable_tgid_record() mutex_lock(trace_types_lock) mutex_lock(event_mutex) This gives a circular dependency deadlock between trace_types_lock and event_mutex. To fix this invert the usage of trace_types_lock and event_mutex in trace_options_core_write(). This keeps the sequence of lock usage consistent. Link: http://lkml.kernel.org/r/0101016eef175e38-8ca71caf-a4eb-480d-a1e6-6f0bbc015495-000000@us-west-2.amazonses.com Cc: stable@vger.kernel.org Fixes: d914ba37d7145 ("tracing: Add support for recording tgid of tasks") Signed-off-by: Prateek Sood Signed-off-by: Steven Rostedt (VMware) commit 60b04df6bfbf7e65954c44f7945b381e0fee5b6a Merge: fd7a6d2b8f1d b4adfe55915d Author: Linus Torvalds Date: Sat Dec 21 12:17:14 2019 -0800 Merge tag 's390-5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix unwinding from irq context of interrupted user process. - Add purgatory build missing symbols check. That helped to uncover and fix missing symbols when built with kasan support enabled. - Couple of ftrace fixes. Avoid broken stack trace and fix recursion loop in function_graph tracer. * tag 's390-5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ftrace: save traced function caller s390/unwind: stop gracefully at user mode pt_regs in irq stack s390/purgatory: do not build purgatory with kcov, kasan and friends s390/purgatory: Make sure we fail the build if purgatory has missing symbols s390/ftrace: fix endless recursion in function_graph tracer commit fd7a6d2b8f1d67df76d0e863f003162b931074a1 Merge: c4ff10efe8e4 6cf82d559e1a Author: Linus Torvalds Date: Sat Dec 21 10:52:10 2019 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Misc fixes: a (rare) PSI crash fix, a CPU affinity related balancing fix, and a toning down of active migration attempts" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/cfs: fix spurious active migration sched/fair: Fix find_idlest_group() to handle CPU affinity psi: Fix a division error in psi poll() sched/psi: Fix sampling error and rare div0 crashes with cgroups and high uptime commit c4ff10efe8e487cd35f4475ed2dd1e5e0c6f784a Merge: 6c1c79a5f4ee 9f0bff1180ef Author: Linus Torvalds Date: Sat Dec 21 10:51:00 2019 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc fixes: a BTS fix, a PT NMI handling fix, a PMU sysfs fix and an SRCU annotation" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Add SRCU annotation for pmus list walk perf/x86/intel: Fix PT PMI handling perf/x86/intel/bts: Fix the use of page_private() perf/x86: Fix potential out-of-bounds access commit 6c1c79a5f4eead27465d4d1d97ce230163772a78 Merge: 6210469417fd 28f94a44298c Author: Linus Torvalds Date: Sat Dec 21 10:49:47 2019 -0800 Merge tag 'kbuild-fixes-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix warning in out-of-tree 'make clean' - add READELF variable to the top Makefile - fix broken builds when LINUX_COMPILE_BY contains a backslash - fix build warning in kallsyms - fix NULL pointer access in expr_eq() in Kconfig - fix missing dependency on rsync in deb-pkg build - remove ---help--- from documentation - fix misleading documentation about directory descending * tag 'kbuild-fixes-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: clarify the difference between obj-y and obj-m w.r.t. descending kconfig: remove ---help--- from documentation scripts: package: mkdebian: add missing rsync dependency kconfig: don't crash on NULL expressions in expr_eq() scripts/kallsyms: fix offset overflow of kallsyms_relative_base mkcompile_h: use printf for LINUX_COMPILE_BY mkcompile_h: git rid of UTS_TRUNCATE from LINUX_COMPILE_{BY,HOST} x86/boot: kbuild: allow readelf executable to be specified kbuild: fix 'No such file or directory' warning when cleaning commit 43cf75d96409a20ef06b756877a2e72b10a026fc Author: chenqiwu Date: Thu Dec 19 14:29:53 2019 +0800 exit: panic before exit_mm() on global init exit Currently, when global init and all threads in its thread-group have exited we panic via: do_exit() -> exit_notify() -> forget_original_parent() -> find_child_reaper() This makes it hard to extract a useable coredump for global init from a kernel crashdump because by the time we panic exit_mm() will have already released global init's mm. This patch moves the panic futher up before exit_mm() is called. As was the case previously, we only panic when global init and all its threads in the thread-group have exited. Signed-off-by: chenqiwu Acked-by: Christian Brauner Acked-by: Oleg Nesterov [christian.brauner@ubuntu.com: fix typo, rewrite commit message] Link: https://lore.kernel.org/r/1576736993-10121-1-git-send-email-qiwuchen55@gmail.com Signed-off-by: Christian Brauner commit 28f94a44298c99c0db85539874b62f21d94fcaa7 Author: Masahiro Yamada Date: Thu Dec 19 20:51:00 2019 +0900 kbuild: clarify the difference between obj-y and obj-m w.r.t. descending Kbuild descends into a directory by either 'y' or 'm', but there is an important difference. Kbuild combines the built-in objects into built-in.a in each directory. The built-in.a in the directory visited by obj-y is merged into the built-in.a in the parent directory. This merge happens recursively when Kbuild is ascending back towards the top directory, then built-in objects are linked into vmlinux eventually. This works properly only when the Makefile specifying obj-y is reachable by the chain of obj-y. On the other hand, Kbuild does not take built-in.a from the directory visited by obj-m. This it, all the objects in that directory are supposed to be modular. If Kbuild descends into a directory by obj-m, but the Makefile in the sub-directory specifies obj-y, those objects are just left orphan. The current statement "Kbuild only uses this information to decide that it needs to visit the directory" is misleading. Clarify the difference. Reported-by: Johan Hovold Signed-off-by: Masahiro Yamada Reviewed-by: Johan Hovold commit 6210469417fd967ec72dea56723593beefeecafb Merge: 62af608b4b07 75cf9797006a Author: Linus Torvalds Date: Sat Dec 21 06:49:41 2019 -0800 Merge branch 'parisc-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pul parisc fixes from Helge Deller: "Two build error fixes, one for the soft_offline_page() parameter change and one for a specific KEXEC/KEXEC_FILE configuration, as well as a compiler and a linker warning fix" * 'parisc-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix compiler warnings in debug_core.c parisc: soft_offline_page() now takes the pfn parisc: add missing __init annotation parisc: fix compilation when KEXEC=n and KEXEC_FILE=y commit b2c0fcd28772f99236d261509bcd242135677965 Author: Arnd Bergmann Date: Fri Nov 29 11:28:22 2019 +0100 compat_ioctl: block: handle Persistent Reservations These were added to blkdev_ioctl() in linux-5.5 but not blkdev_compat_ioctl, so add them now. Cc: # v4.4+ Fixes: bbd3e064362e ("block: add an API for Persistent Reservations") Signed-off-by: Arnd Bergmann Fold in followup patch from Arnd with missing pr.h header include. Signed-off-by: Jens Axboe commit 4b43f31d65dac587dae09ee27a48fd68a0cfd8c2 Author: Arnd Bergmann Date: Fri Nov 29 11:28:22 2019 +0100 compat_ioctl: block: handle add zone open, close and finish ioctl These were added to blkdev_ioctl() in linux-5.5 but not blkdev_compat_ioctl, so add them now. Fixes: e876df1fe0ad ("block: add zone open, close and finish ioctl support") Reviewed-by: Damien Le Moal Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe commit 21d37340912d74b1222d43c11aa9dd0687162573 Author: Arnd Bergmann Date: Fri Nov 29 11:28:22 2019 +0100 compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES These were added to blkdev_ioctl() in v4.20 but not blkdev_compat_ioctl, so add them now. Cc: # v4.20+ Fixes: 72cd87576d1d ("block: Introduce BLKGETZONESZ ioctl") Fixes: 65e4e3eee83d ("block: Introduce BLKGETNRZONES ioctl") Reviewed-by: Damien Le Moal Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe commit 673bdf8ce0a387ef585c13b69a2676096c6edfe9 Author: Arnd Bergmann Date: Fri Nov 29 11:28:22 2019 +0100 compat_ioctl: block: handle BLKREPORTZONE/BLKRESETZONE These were added to blkdev_ioctl() but not blkdev_compat_ioctl, so add them now. Cc: # v4.10+ Fixes: 3ed05a987e0f ("blk-zoned: implement ioctls") Reviewed-by: Damien Le Moal Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe commit 257bf4176362c3920250d6b972ccb36edd788487 Author: Arnd Bergmann Date: Mon Dec 9 16:37:24 2019 +0100 pktcdvd: fix regression on 64-bit architectures The support for the compat ioctl did not actually do what it was supposed to do because of a typo, instead it broke native support for CDROM_LAST_WRITTEN and CDROM_SEND_PACKET on all architectures with CONFIG_COMPAT enabled. Fixes: 1b114b0817cc ("pktcdvd: add compat_ioctl handler") Signed-off-by: Arnd Bergmann ---- Please apply for v5.5, I just noticed the regression while rebasing some of the patches I created on top. Signed-off-by: Jens Axboe commit 62af608b4b075871f7214c345c42a2e7a456f35d Merge: 6d04182dd36d d6bd6cf9feb8 Author: Linus Torvalds Date: Sat Dec 21 06:24:56 2019 -0800 Merge tag 'for-linus-5.5b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "This contains two cleanup patches and a small series for supporting reloading the Xen block backend driver" * tag 'for-linus-5.5b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/grant-table: remove multiple BUG_ON on gnttab_interface xen-blkback: support dynamic unbind/bind xen/interface: re-define FRONT/BACK_RING_ATTACH() xenbus: limit when state is forced to closed xenbus: move xenbus_dev_shutdown() into frontend code... xen/blkfront: Adjust indentation in xlvbd_alloc_gendisk commit 6d04182dd36dc5a4dd2e352c1d0f0241e83bd2a0 Merge: 5c741e2583d2 228b607d8ea1 Author: Linus Torvalds Date: Sat Dec 21 06:17:05 2019 -0800 Merge tag 'powerpc-5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Two weeks worth of accumulated fixes: - A fix for a performance regression seen on PowerVM LPARs using dedicated CPUs, caused by our vcpu_is_preempted() returning true even for idle CPUs. - One of the ultravisor support patches broke KVM on big endian hosts in v5.4. - Our KUAP (Kernel User Access Prevention) code missed allowing access in __clear_user(), which could lead to an oops or erroneous SEGV when triggered via PTRACE_GETREGSET. - Two fixes for the ocxl driver, an open/remove race, and a memory leak in an error path. - A handful of other small fixes. Thanks to: Andrew Donnellan, Christian Zigotzky, Christophe Leroy, Christoph Hellwig, Daniel Axtens, David Hildenbrand, Frederic Barrat, Gautham R. Shenoy, Greg Kurz, Ihor Pasichnyk, Juri Lelli, Marcus Comstedt, Mike Rapoport, Parth Shah, Srikar Dronamraju, Vaidyanathan Srinivasan" * tag 'powerpc-5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: KVM: PPC: Book3S HV: Fix regression on big endian hosts powerpc: Fix __clear_user() with KUAP enabled powerpc/pseries/cmm: fix managed page counts when migrating pages between zones powerpc/8xx: fix bogus __init on mmu_mapin_ram_chunk() ocxl: Fix potential memory leak on context creation powerpc/irq: fix stack overflow verification powerpc: Ensure that swiotlb buffer is allocated from low memory powerpc/shared: Use static key to detect shared processor powerpc/vcpu: Assume dedicated processors as non-preempt ocxl: Fix concurrent AFU open and device removal commit 5c741e2583d2e5a3fc148a5e8a2464bbaa45a1d9 Merge: 12ac9a08fc4c a3a57ddad061 Author: Linus Torvalds Date: Sat Dec 21 06:04:12 2019 -0800 Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS fixes from Borislav Petkov: "Three urgent RAS fixes for the AMD side of things: - initialize struct mce.bank so that calculated error severity on AMD SMCA machines is correct - do not send IPIs early during bank initialization, when interrupts are disabled - a fix for when only a subset of MCA banks are enabled, which led to boot hangs on some new AMD CPUs" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Fix possibly incorrect severity calculation on AMD x86/MCE/AMD: Allow Reserved types to be overwritten in smca_banks[] x86/MCE/AMD: Do not use rdmsr_safe_on_cpu() in smca_configure() commit 12ac9a08fc4cb240a28e6690dec016abd298e52f Merge: f1fd1610cbb6 781d8cea68ac Author: Linus Torvalds Date: Sat Dec 21 05:55:35 2019 -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: "One core framework fix to walk the orphan list and match up clks to parents when clk providers register the DT provider after registering all their clks (as they should). Then a handful of driver fixes for the qcom, imx, and at91 drivers. The driver fixes are relatively small fixes for incorrect register settings or missing locks causing race conditions" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: Avoid SMMU/cx gdsc corner cases clk: qcom: gcc-sc7180: Fix setting flag for votable GDSCs clk: Move clk_core_reparent_orphans() under CONFIG_OF clk: at91: fix possible deadlock clk: walk orphan list on clock provider registration clk: imx: pll14xx: fix clk_pll14xx_wait_lock clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table clk: imx: clk-composite-8m: add lock to gate/mux commit 8cc0991c09bfd11fd878b0321a7a06724520d879 Author: Alex Deucher Date: Fri Dec 20 19:17:02 2019 -0500 ALSA: hda/hdmi - fix atpx_present when CLASS is not VGA You can't use PCI_BASE_CLASS with pci_get_class(). This happens to work by luck on devices with PCI_CLASS_DISPLAY_VGA, but misses PCI_CLASS_DISPLAY_OTHER. Add a check for those as well. Fixes: 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") Signed-off-by: Alex Deucher Link: https://lore.kernel.org/r/20191221001702.1338587-1-alexander.deucher@amd.com Signed-off-by: Takashi Iwai commit 4bfeadfc0712bbc8a6556eef6d47cbae1099dea3 Merge: 258a980d1ec2 11a14dc8d7a7 Author: David S. Miller Date: Fri Dec 20 21:56:48 2019 -0800 Merge branch 'sfc-fix-bugs-introduced-by-XDP-patches' Edward Cree says: ==================== sfc: fix bugs introduced by XDP patches Two fixes for bugs introduced by the XDP support in the sfc driver. ==================== Signed-off-by: David S. Miller commit 11a14dc8d7a76d3117896b975c536f1372f2a7c4 Author: Charles McLachlan Date: Fri Dec 20 16:27:10 2019 +0000 sfc: Include XDP packet headroom in buffer step size. Correct a mismatch between rx_page_buf_step and the actual step size used when filling buffer pages. This patch fixes the page overrun that occured when the MTU was set to anything bigger than 1692. Fixes: 3990a8fffbda ("sfc: allocate channels for XDP tx queues") Signed-off-by: Charles McLachlan Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 8700aff089843399f95bc7701ae87b642b35a716 Author: Edward Cree Date: Fri Dec 20 16:26:40 2019 +0000 sfc: fix channel allocation with brute force It was possible for channel allocation logic to get confused between what it had and what it wanted, and end up trying to use the same channel for both PTP and regular TX. This led to a kernel panic: BUG: unable to handle page fault for address: 0000000000047635 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP PTI CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.4.0-rc3-ehc14+ #900 Hardware name: Dell Inc. PowerEdge R710/0M233H, BIOS 6.4.0 07/23/2013 RIP: 0010:native_queued_spin_lock_slowpath+0x188/0x1e0 Code: f3 90 48 8b 32 48 85 f6 74 f6 eb e8 c1 ee 12 83 e0 03 83 ee 01 48 c1 e0 05 48 63 f6 48 05 c0 98 02 00 48 03 04 f5 a0 c6 ed 81 <48> 89 10 8b 42 08 85 c0 75 09 f3 90 8b 42 08 85 c0 74 f7 48 8b 32 RSP: 0018:ffffc90000003d28 EFLAGS: 00010006 RAX: 0000000000047635 RBX: 0000000000000246 RCX: 0000000000040000 RDX: ffff888627a298c0 RSI: 0000000000003ffe RDI: ffff88861f6b8dd4 RBP: ffff8886225c6e00 R08: 0000000000040000 R09: 0000000000000000 R10: 0000000616f080c6 R11: 00000000000000c0 R12: ffff88861f6b8dd4 R13: ffffc90000003dc8 R14: ffff88861942bf00 R15: ffff8886150f2000 FS: 0000000000000000(0000) GS:ffff888627a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000047635 CR3: 000000000200a000 CR4: 00000000000006f0 Call Trace: _raw_spin_lock_irqsave+0x22/0x30 skb_queue_tail+0x1b/0x50 sock_queue_err_skb+0x9d/0xf0 __skb_complete_tx_timestamp+0x9d/0xc0 efx_dequeue_buffer+0x126/0x180 [sfc] efx_xmit_done+0x73/0x1c0 [sfc] efx_ef10_ev_process+0x56a/0xfe0 [sfc] ? tick_sched_do_timer+0x60/0x60 ? timerqueue_add+0x5d/0x70 ? enqueue_hrtimer+0x39/0x90 efx_poll+0x111/0x380 [sfc] ? rcu_accelerate_cbs+0x50/0x160 net_rx_action+0x14a/0x400 __do_softirq+0xdd/0x2d0 irq_exit+0xa0/0xb0 do_IRQ+0x53/0xe0 common_interrupt+0xf/0xf In the long run we intend to rewrite the channel allocation code, but for 'net' fix this by allocating extra_channels, and giving them TX queues, even if we do not in fact need them (e.g. on NICs without MAC TX timestamping), and thereby using simpler logic to assign the channels once they're allocated. Fixes: 3990a8fffbda ("sfc: allocate channels for XDP tx queues") Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 258a980d1ec23e2c786e9536a7dd260bea74bae6 Author: Geert Uytterhoeven Date: Fri Dec 20 14:31:40 2019 +0100 net: dst: Force 4-byte alignment of dst_metrics When storing a pointer to a dst_metrics structure in dst_entry._metrics, two flags are added in the least significant bits of the pointer value. Hence this assumes all pointers to dst_metrics structures have at least 4-byte alignment. However, on m68k, the minimum alignment of 32-bit values is 2 bytes, not 4 bytes. Hence in some kernel builds, dst_default_metrics may be only 2-byte aligned, leading to obscure boot warnings like: WARNING: CPU: 0 PID: 7 at lib/refcount.c:28 refcount_warn_saturate+0x44/0x9a refcount_t: underflow; use-after-free. Modules linked in: CPU: 0 PID: 7 Comm: ksoftirqd/0 Tainted: G W 5.5.0-rc2-atari-01448-g114a1a1038af891d-dirty #261 Stack from 10835e6c: 10835e6c 0038134f 00023fa6 00394b0f 0000001c 00000009 00321560 00023fea 00394b0f 0000001c 001a70f8 00000009 00000000 10835eb4 00000001 00000000 04208040 0000000a 00394b4a 10835ed4 00043aa8 001a70f8 00394b0f 0000001c 00000009 00394b4a 0026aba8 003215a4 00000003 00000000 0026d5a8 00000001 003215a4 003a4361 003238d6 000001f0 00000000 003215a4 10aa3b00 00025e84 003ddb00 10834000 002416a8 10aa3b00 00000000 00000080 000aa038 0004854a Call Trace: [<00023fa6>] __warn+0xb2/0xb4 [<00023fea>] warn_slowpath_fmt+0x42/0x64 [<001a70f8>] refcount_warn_saturate+0x44/0x9a [<00043aa8>] printk+0x0/0x18 [<001a70f8>] refcount_warn_saturate+0x44/0x9a [<0026aba8>] refcount_sub_and_test.constprop.73+0x38/0x3e [<0026d5a8>] ipv4_dst_destroy+0x5e/0x7e [<00025e84>] __local_bh_enable_ip+0x0/0x8e [<002416a8>] dst_destroy+0x40/0xae Fix this by forcing 4-byte alignment of all dst_metrics structures. Fixes: e5fd387ad5b30ca3 ("ipv6: do not overwrite inetpeer metrics prematurely") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit 152044775d0b9a9ed9509caed40efcba2677951d Author: Hangbin Liu Date: Fri Dec 20 15:08:06 2019 +0800 selftests: pmtu: fix init mtu value in description There is no a_r3, a_r4 in the testing topology. It should be b_r1, b_r2. Also b_r1 mtu is 1400 and b_r2 mtu is 1500. Fixes: e44e428f59e4 ("selftests: pmtu: add basic IPv4 and IPv6 PMTU tests") Signed-off-by: Hangbin Liu Acked-by: Stefano Brivio Signed-off-by: David S. Miller commit b0689faa8efc5a3391402d7ae93bd373b7248e51 Author: Haiyang Zhang Date: Thu Dec 19 18:28:10 2019 -0800 hv_netvsc: Fix unwanted rx_table reset In existing code, the receive indirection table, rx_table, is in struct rndis_device, which will be reset when changing MTU, ringparam, etc. User configured receive indirection table values will be lost. To fix this, move rx_table to struct net_device_context, and check netif_is_rxfh_configured(), so rx_table will be set to default only if no user configured value. Fixes: ff4a44199012 ("netvsc: allow get/set of RSS indirection table") Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit 7d49a32a66d2215c5b3bf9bc67c9036ea9904111 Author: Russell King Date: Thu Dec 19 23:24:52 2019 +0000 net: phy: ensure that phy IDs are correctly typed PHY IDs are 32-bit unsigned quantities. Ensure that they are always treated as such, and not passed around as "int"s. Fixes: 13d0ab6750b2 ("net: phy: check return code when requesting PHY driver module") Signed-off-by: Russell King Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d2ed49cf6c13e379c5819aa5ac20e1f9674ebc89 Author: Russell King Date: Thu Dec 19 23:24:47 2019 +0000 mod_devicetable: fix PHY module format When a PHY is probed, if the top bit is set, we end up requesting a module with the string "mdio:-10101110000000100101000101010001" - the top bit is printed to a signed -1 value. This leads to the module not being loaded. Fix the module format string and the macro generating the values for it to ensure that we only print unsigned types and the top bit is always 0/1. We correctly end up with "mdio:10101110000000100101000101010001". Fixes: 8626d3b43280 ("phylib: Support phy module autoloading") Reviewed-by: Andrew Lunn Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 4c8dc00503db24deaf0b89dddfa84b7cba7cd4ce Author: Manish Chopra Date: Thu Dec 19 10:35:16 2019 -0800 qede: Disable hardware gro when xdp prog is installed commit 18c602dee472 ("qede: Use NETIF_F_GRO_HW.") introduced a regression in driver that when xdp program is installed on qede device, device's aggregation feature (hardware GRO) is not getting disabled, which is unexpected with xdp. Fixes: 18c602dee472 ("qede: Use NETIF_F_GRO_HW.") Signed-off-by: Manish Chopra Signed-off-by: Ariel Elior Reviewed-by: Michael Chan Signed-off-by: David S. Miller commit 9f5e508b6486be664bee022a325db66b299151b4 Merge: 28a3b8408f70 41c53caa5a61 Author: David S. Miller Date: Fri Dec 20 21:43:09 2019 -0800 Merge branch 'ena-fixes-of-interrupt-moderation-bugs' Arthur Kiyanovski says: ==================== ena: fixes of interrupt moderation bugs Differences from V1: 1. Updated default tx interrupt moderation to 64us 2. Added "Fixes:" tags. 3. Removed cosmetic changes that are not relevant for these bug fixes This patchset includes a couple of fixes of bugs in the implemenation of interrupt moderation. ==================== Signed-off-by: David S. Miller commit 41c53caa5a61ebc9221b71cc37f4a90549f1121d Author: Arthur Kiyanovski Date: Thu Dec 19 17:40:56 2019 +0200 net: ena: fix issues in setting interrupt moderation params in ethtool Issue 1: -------- Reproduction steps: 1. sudo ethtool -C eth0 rx-usecs 128 2. sudo ethtool -C eth0 adaptive-rx on 3. sudo ethtool -C eth0 adaptive-rx off 4. ethtool -c eth0 expected output: rx-usecs 128 actual output: rx-usecs 0 Reason for issue: In stage 3, ethtool userspace calls first the ena_get_coalesce() handler to get the current value of all properties, and then the ena_set_coalesce() handler. When ena_get_coalesce() is called the adaptive interrupt moderation is still on. There is an if in the code that returns the rx_coalesce_usecs only if the adaptive interrupt moderation is off. And since it is still on, rx_coalesce_usecs is not set, meaning it stays 0. Solution to issue: Remove this if static interrupt moderation intervals have nothing to do with dynamic ones. Issue 2: -------- Reproduction steps: 1. sudo ethtool -C eth0 adaptive-rx on 2. sudo ethtool -C eth0 rx-usecs 128 3. ethtool -c eth0 expected output: rx-usecs 128 actual output: rx-usecs 0 Reason for issue: In stage 2, when ena_set_coalesce() is called, the handler tests if rx adaptive interrupt moderation is on, and if it is, it returns before getting to the part in the function that sets the rx non-adaptive interrupt moderation interval. Solution to issue: Remove the return from the function when rx adaptive interrupt moderation is on. Also cleaned up the fixed code in ena_set_coalesce by grouping together adaptive interrupt moderation toggling, and using && instead of nested ifs. Fixes: b3db86dc4b82 ("net: ena: reimplement set/get_coalesce()") Fixes: 0eda847953d8 ("net: ena: fix retrieval of nonadaptive interrupt moderation intervals") Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 05785adf6e570a068adf0502b61fe2b521d7f0ca Author: Arthur Kiyanovski Date: Thu Dec 19 17:40:55 2019 +0200 net: ena: fix default tx interrupt moderation interval Current default non-adaptive tx interrupt moderation interval is 196 us. This value is too high and might cause the tx queue to fill up. In this commit we set the default non-adaptive tx interrupt moderation interval to 64 us in order to: 1. Reduce the probability of the queue filling-up (when compared to the current default value of 196 us). 2. Reduce unnecessary tx interrupt overhead (which happens if we set the default tx interval to 0). We determined experimentally that 64 us is an optimal value that reduces interrupt rate by more than 20% without affecting performance. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 28a3b8408f70b646e78880a7eb0a97c22ace98d1 Author: Karsten Graul Date: Thu Dec 19 12:51:13 2019 +0100 net/smc: unregister ib devices in reboot_event In the reboot_event handler, unregister the ib devices and enable the IB layer to release the devices before the reboot. Fixes: a33a803cfe64 ("net/smc: guarantee removal of link groups in reboot") Signed-off-by: Karsten Graul Reviewed-by: Ursula Braun Signed-off-by: David S. Miller commit d3e014ec7d5ebe9644b5486bc530b91e62bbf624 Author: Padmanabhan Rajanbabu Date: Thu Dec 19 15:47:01 2019 +0530 net: stmmac: platform: Fix MDIO init for platforms without PHY The current implementation of "stmmac_dt_phy" function initializes the MDIO platform bus data, even in the absence of PHY. This fix will skip MDIO initialization if there is no PHY present. Fixes: 7437127 ("net: stmmac: Convert to phylink and remove phylib logic") Acked-by: Jayati Sahu Signed-off-by: Sriram Dash Signed-off-by: Padmanabhan Rajanbabu Signed-off-by: David S. Miller commit af1c0e4e00f3cc76cb136ebf2e2c04e8b6446285 Author: Chan Shu Tak, Alex Date: Thu Dec 19 14:16:18 2019 +0800 llc2: Fix return statement of llc_stat_ev_rx_null_dsap_xid_c (and _test_c) When a frame with NULL DSAP is received, llc_station_rcv is called. In turn, llc_stat_ev_rx_null_dsap_xid_c is called to check if it is a NULL XID frame. The return statement of llc_stat_ev_rx_null_dsap_xid_c returns 1 when the incoming frame is not a NULL XID frame and 0 otherwise. Hence, a NULL XID response is returned unexpectedly, e.g. when the incoming frame is a NULL TEST command. To fix the error, simply remove the conditional operator. A similar error in llc_stat_ev_rx_null_dsap_test_c is also fixed. Signed-off-by: Chan Shu Tak, Alex Signed-off-by: David S. Miller commit 90b3b339364c76baa2436445401ea9ade040c216 Author: Jiangfeng Xiao Date: Thu Dec 19 10:08:07 2019 +0800 net: hisilicon: Fix a BUG trigered by wrong bytes_compl When doing stress test, we get the following trace: kernel BUG at lib/dynamic_queue_limits.c:26! Internal error: Oops - BUG: 0 [#1] SMP ARM Modules linked in: hip04_eth CPU: 0 PID: 2003 Comm: tDblStackPcap0 Tainted: G O L 4.4.197 #1 Hardware name: Hisilicon A15 task: c3637668 task.stack: de3bc000 PC is at dql_completed+0x18/0x154 LR is at hip04_tx_reclaim+0x110/0x174 [hip04_eth] pc : [] lr : [] psr: 800f0313 sp : de3bdc2c ip : 00000000 fp : c020fb10 r10: 00000000 r9 : c39b4224 r8 : 00000001 r7 : 00000046 r6 : c39b4000 r5 : 0078f392 r4 : 0078f392 r3 : 00000047 r2 : 00000000 r1 : 00000046 r0 : df5d5c80 Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 32c5387d Table: 1e189b80 DAC: 55555555 Process tDblStackPcap0 (pid: 2003, stack limit = 0xde3bc190) Stack: (0xde3bdc2c to 0xde3be000) [] (dql_completed) from [] (hip04_tx_reclaim+0x110/0x174 [hip04_eth]) [] (hip04_tx_reclaim [hip04_eth]) from [] (hip04_rx_poll+0x20/0x388 [hip04_eth]) [] (hip04_rx_poll [hip04_eth]) from [] (net_rx_action+0x120/0x374) [] (net_rx_action) from [] (__do_softirq+0x218/0x318) [] (__do_softirq) from [] (irq_exit+0x88/0xac) [] (irq_exit) from [] (msa_irq_exit+0x11c/0x1d4) [] (msa_irq_exit) from [] (__handle_domain_irq+0x110/0x148) [] (__handle_domain_irq) from [] (gic_handle_irq+0xd4/0x118) [] (gic_handle_irq) from [] (__irq_svc+0x40/0x58) Exception stack(0xde3bdde0 to 0xde3bde28) dde0: 00000000 00008001 c3637668 00000000 00000000 a00f0213 dd3627a0 c0af6380 de00: c086d380 a00f0213 c0a22a50 de3bde6c 00000002 de3bde30 c0558138 c055813c de20: 600f0213 ffffffff [] (__irq_svc) from [] (_raw_spin_unlock_irqrestore+0x44/0x54) Kernel panic - not syncing: Fatal exception in interrupt Pre-modification code: int hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { [...] [1] priv->tx_head = TX_NEXT(tx_head); [2] count++; [3] netdev_sent_queue(ndev, skb->len); [...] } An rx interrupt occurs if hip04_mac_start_xmit just executes to the line 2, tx_head has been updated, but corresponding 'skb->len' has not been added to dql_queue. And then hip04_mac_interrupt->__napi_schedule->hip04_rx_poll->hip04_tx_reclaim In hip04_tx_reclaim, because tx_head has been updated, bytes_compl will plus an additional "skb-> len" which has not been added to dql_queue. And then trigger the BUG_ON(bytes_compl > num_queued - dql->num_completed). To solve the problem described above, we put "netdev_sent_queue(ndev, skb->len);" before "priv->tx_head = TX_NEXT(tx_head);" Fixes: a41ea46a9a12 ("net: hisilicon: new hip04 ethernet driver") Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller commit 4249c507f4cbedbe0afc75a43a8808ee072f87b9 Author: Michael Grzeschik Date: Wed Dec 18 17:01:39 2019 +0100 net: dsa: ksz: use common define for tag len Remove special taglen define KSZ8795_INGRESS_TAG_LEN and use generic KSZ_INGRESS_TAG_LEN instead. Signed-off-by: Michael Grzeschik Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f80742b9c5ec7d3ff029f74da20f9e9fa637c090 Merge: ea8608d401de 39bdbf3e648d Author: David S. Miller Date: Fri Dec 20 21:00:28 2019 -0800 Merge branch 's390-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2019-12-18 please apply the following patch series to your net tree. This brings two fixes for initialization / teardown issues, and one ENOTSUPP cleanup. ==================== Signed-off-by: David S. Miller commit 39bdbf3e648d801596498a5a625fbc9fc1c0002f Author: Julian Wiedmann Date: Wed Dec 18 16:32:28 2019 +0100 s390/qeth: don't return -ENOTSUPP to userspace ENOTSUPP is not uapi, use EOPNOTSUPP instead. Fixes: d66cb37e9664 ("qeth: Add new priority queueing options") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 0f399305cd31e5c813086eaa264f7f47e205c10e Author: Julian Wiedmann Date: Wed Dec 18 16:32:27 2019 +0100 s390/qeth: fix promiscuous mode after reset When managing the promiscuous mode during an RX modeset, qeth caches the current HW state to avoid repeated programming of the same state on each modeset. But while tearing down a device, we forget to clear the cached state. So when the device is later set online again, the initial RX modeset doesn't program the promiscuous mode since we believe it is already enabled. Fix this by clearing the cached state in the tear-down path. Note that for the SBP variant of promiscuous mode, this accidentally works right now because we unconditionally restore the SBP role while re-initializing. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit 2e3d7fa5d29b7ab649fdf8f9533ae0c0888a7fac Author: Julian Wiedmann Date: Wed Dec 18 16:32:26 2019 +0100 s390/qeth: handle error due to unsupported transport mode Along with z/VM NICs, there's additional device types that only support a specific transport mode (eg. external-bridged IQD). Identify the corresponding error code, and raise a fitting error message so that the user knows to adjust their device configuration. On top of that also fix the subsequent error path, so that the rejected cmd doesn't need to wait for a timeout but gets cancelled straight away. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit df034c93f15ee71df231ff9fe311d27ff08a2a52 Author: David Jeffery Date: Tue Dec 17 11:00:24 2019 -0500 sbitmap: only queue kyber's wait callback if not already active Under heavy loads where the kyber I/O scheduler hits the token limits for its scheduling domains, kyber can become stuck. When active requests complete, kyber may not be woken up leaving the I/O requests in kyber stuck. This stuck state is due to a race condition with kyber and the sbitmap functions it uses to run a callback when enough requests have completed. The running of a sbt_wait callback can race with the attempt to insert the sbt_wait. Since sbitmap_del_wait_queue removes the sbt_wait from the list first then sets the sbq field to NULL, kyber can see the item as not on a list but the call to sbitmap_add_wait_queue will see sbq as non-NULL. This results in the sbt_wait being inserted onto the wait list but ws_active doesn't get incremented. So the sbitmap queue does not know there is a waiter on a wait list. Since sbitmap doesn't think there is a waiter, kyber may never be informed that there are domain tokens available and the I/O never advances. With the sbt_wait on a wait list, kyber believes it has an active waiter so cannot insert a new waiter when reaching the domain's full state. This race can be fixed by only adding the sbt_wait to the queue if the sbq field is NULL. If sbq is not NULL, there is already an action active which will trigger the re-running of kyber. Let it run and add the sbt_wait to the wait list if still needing to wait. Reviewed-by: Omar Sandoval Signed-off-by: David Jeffery Reported-by: John Pittman Tested-by: John Pittman Signed-off-by: Jens Axboe commit ea8608d401def015e83c2c32ed6c32996abb3ed2 Author: Rahul Lakkireddy Date: Wed Dec 18 09:19:29 2019 +0530 cxgb4: fix refcount init for TC-MQPRIO offload Properly initialize refcount to 1 when hardware queue arrays for TC-MQPRIO offload have been freshly allocated. Otherwise, following warning is observed. Also fix up error path to only free hardware queue arrays when refcount reaches 0. [ 130.075342] ------------[ cut here ]------------ [ 130.075343] refcount_t: addition on 0; use-after-free. [ 130.075355] WARNING: CPU: 0 PID: 10870 at lib/refcount.c:25 refcount_warn_saturate+0xe1/0x100 [ 130.075356] Modules linked in: sch_mqprio iptable_nat ib_iser libiscsi scsi_transport_iscsi ib_ipoib rdma_ucm ib_umad iw_cxgb4 libcxgb ib_uverbs x86_pkg_temp_thermal cxgb4 igb [ 130.075361] CPU: 0 PID: 10870 Comm: tc Kdump: loaded Not tainted 5.5.0-rc1+ #11 [ 130.075362] Hardware name: Supermicro X9SRE/X9SRE-3F/X9SRi/X9SRi-3F/X9SRE/X9SRE-3F/X9SRi/X9SRi-3F, BIOS 3.2 01/16/2015 [ 130.075363] RIP: 0010:refcount_warn_saturate+0xe1/0x100 [ 130.075364] Code: e8 14 41 c1 ff 0f 0b c3 80 3d 44 f4 10 01 00 0f 85 63 ff ff ff 48 c7 c7 38 9f 83 8c 31 c0 c6 05 2e f4 10 01 01 e8 ef 40 c1 ff <0f> 0b c3 48 c7 c7 10 9f 83 8c 31 c0 c6 05 17 f4 10 01 01 e8 d7 40 [ 130.075365] RSP: 0018:ffffa48d00c0b768 EFLAGS: 00010286 [ 130.075366] RAX: 0000000000000000 RBX: 0000000000000008 RCX: 0000000000000001 [ 130.075366] RDX: 0000000000000001 RSI: 0000000000000096 RDI: ffff8a2e9fa187d0 [ 130.075367] RBP: ffff8a2e93890000 R08: 0000000000000398 R09: 000000000000003c [ 130.075367] R10: 00000000000142a0 R11: 0000000000000397 R12: ffffa48d00c0b848 [ 130.075368] R13: ffff8a2e94746498 R14: ffff8a2e966f7000 R15: 0000000000000031 [ 130.075368] FS: 00007f689015f840(0000) GS:ffff8a2e9fa00000(0000) knlGS:0000000000000000 [ 130.075369] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 130.075369] CR2: 00000000006762a0 CR3: 00000007cf164005 CR4: 00000000001606f0 [ 130.075370] Call Trace: [ 130.075377] cxgb4_setup_tc_mqprio+0xbee/0xc30 [cxgb4] [ 130.075382] ? cxgb4_ethofld_restart+0x50/0x50 [cxgb4] [ 130.075384] ? pfifo_fast_init+0x7e/0xf0 [ 130.075386] mqprio_init+0x5f4/0x630 [sch_mqprio] [ 130.075389] qdisc_create+0x1bf/0x4a0 [ 130.075390] tc_modify_qdisc+0x1ff/0x770 [ 130.075392] rtnetlink_rcv_msg+0x28b/0x350 [ 130.075394] ? rtnl_calcit.isra.32+0x110/0x110 [ 130.075395] netlink_rcv_skb+0xc6/0x100 [ 130.075396] netlink_unicast+0x1db/0x330 [ 130.075397] netlink_sendmsg+0x2f5/0x460 [ 130.075399] ? _copy_from_user+0x2e/0x60 [ 130.075400] sock_sendmsg+0x59/0x70 [ 130.075401] ____sys_sendmsg+0x1f0/0x230 [ 130.075402] ? copy_msghdr_from_user+0xd7/0x140 [ 130.075403] ___sys_sendmsg+0x77/0xb0 [ 130.075404] ? ___sys_recvmsg+0x84/0xb0 [ 130.075406] ? __handle_mm_fault+0x377/0xaf0 [ 130.075407] __sys_sendmsg+0x53/0xa0 [ 130.075409] do_syscall_64+0x44/0x130 [ 130.075412] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 130.075413] RIP: 0033:0x7f688f13af10 [ 130.075414] Code: c3 48 8b 05 82 6f 2c 00 f7 db 64 89 18 48 83 cb ff eb dd 0f 1f 80 00 00 00 00 83 3d 8d d0 2c 00 00 75 10 b8 2e 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ae cc 00 00 48 89 04 24 [ 130.075414] RSP: 002b:00007ffe6c7d9988 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 130.075415] RAX: ffffffffffffffda RBX: 00000000006703a0 RCX: 00007f688f13af10 [ 130.075415] RDX: 0000000000000000 RSI: 00007ffe6c7d99f0 RDI: 0000000000000003 [ 130.075416] RBP: 000000005df38312 R08: 0000000000000002 R09: 0000000000008000 [ 130.075416] R10: 00007ffe6c7d93e0 R11: 0000000000000246 R12: 0000000000000000 [ 130.075417] R13: 00007ffe6c7e9c50 R14: 0000000000000001 R15: 000000000067c600 [ 130.075418] ---[ end trace 8fbb3bf36a8671db ]--- v2: - Move the refcount_set() closer to where the hardware queue arrays are being allocated. - Fix up error path to only free hardware queue arrays when refcount reaches 0. Fixes: 2d0cb84dd973 ("cxgb4: add ETHOFLD hardware queue support") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 55347ec340af401437680fd0e88df6739a967f9f Author: Yuya Fujita Date: Thu Dec 19 08:08:32 2019 +0000 perf hists: Fix variable name's inconsistency in hists__for_each() macro Variable names are inconsistent in hists__for_each macro(). Due to this inconsistency, the macro replaces its second argument with "fmt" regardless of its original name. So far it works because only "fmt" is passed to the second argument. However, this behavior is not expected and should be fixed. Fixes: f0786af536bb ("perf hists: Introduce hists__for_each_format macro") Fixes: aa6f50af822a ("perf hists: Introduce hists__for_each_sort_list macro") Signed-off-by: Yuya Fujita Acked-by: Jiri Olsa Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/OSAPR01MB1588E1C47AC22043175DE1B2E8520@OSAPR01MB1588.jpnprd01.prod.outlook.com Signed-off-by: Arnaldo Carvalho de Melo commit a75af86b6f344f99825cc894596804a91a2ee9cf Author: Arnaldo Carvalho de Melo Date: Wed Dec 18 15:23:14 2019 -0300 perf map: Set kmap->kmaps backpointer for main kernel map chunks When a map is create to represent the main kernel area (vmlinux) with map__new2() we allocate an extra area to store a pointer to the 'struct maps' for the kernel maps, so that we can access that struct when loading ELF files or kallsyms, as we will need to split it in multiple maps, one per kernel module or ELF section (such as ".init.text"). So when map->dso->kernel is non-zero, it is expected that map__kmap(map)->kmaps to be set to the tree of kernel maps (modules, chunks of the main kernel, bpf progs put in place via PERF_RECORD_KSYMBOL, the main kernel). This was not the case when we were splitting the main kernel into chunks for its ELF sections, which ended up making 'perf report --children' processing a perf.data file with callchains to trip on __map__is_kernel(), when we press ENTER to see the popup menu for main histogram entries that starts at a symbol in the ".init.text" ELF section, e.g.: - 8.83% 0.00% swapper [kernel.vmlinux].init.text [k] start_kernel start_kernel cpu_startup_entry do_idle cpuidle_enter cpuidle_enter_state intel_idle Fix it. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/20191218190120.GB13282@kernel.org/ Signed-off-by: Arnaldo Carvalho de Melo commit 0feba17bd7ee3b7e03d141f119049dcc23efa94e Author: Jin Yao Date: Fri Dec 20 09:37:19 2019 +0800 perf report: Fix incorrectly added dimensions as switch perf data file We observed an issue that was some extra columns displayed after switching perf data file in browser. The steps to reproduce: 1. perf record -a -e cycles,instructions -- sleep 3 2. perf report --group 3. In browser, we use hotkey 's' to switch to another perf.data 4. Now in browser, the extra columns 'Self' and 'Children' are displayed. The issue is setup_sorting() executed again after repeat path, so dimensions are added again. This patch checks the last key returned from __cmd_report(). If it's K_SWITCH_INPUT_DATA, skips the setup_sorting(). Fixes: ad0de0971b7f ("perf report: Enable the runtime switching of perf data file") Signed-off-by: Jin Yao Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Feng Tang Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191220013722.20592-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f1fd1610cbb6655883d1838ac79e53301596685d Merge: 3939f2c86657 dbce0b65046d Author: Linus Torvalds Date: Fri Dec 20 13:48:32 2019 -0800 Merge tag 'devicetree-fixes-for-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree fix from Rob Herring: "Add missing 'properties' keyword enclosing 'snps,tso' in snps,dwmac binding" * tag 'devicetree-fixes-for-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: Add missing 'properties' keyword enclosing 'snps,tso' commit f84ae29a6169318f9c929720c49d96323d2bbab9 Author: Hewenliang Date: Mon Dec 9 01:35:49 2019 -0500 tools lib traceevent: Fix memory leakage in filter_event It is necessary to call free_arg(arg) when add_filter_type() returns NULL in filter_event(). Signed-off-by: Hewenliang Reviewed-by: Steven Rostedt (VMware) Cc: Feilong Lin Cc: Tzvetomir Stoyanov Link: http://lore.kernel.org/lkml/20191209063549.59941-1-hewenliang4@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 3939f2c8665721eef8315f42d4c57fb1272aacd6 Merge: a7c88728da3b aa638cfe3e73 Author: Linus Torvalds Date: Fri Dec 20 13:36:49 2019 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Leftover put_cpu() in the perf/smmuv3 error path. - Add Hisilicon TSV110 to spectre-v2 safe list * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: cpu_errata: Add Hisilicon TSV110 to spectre-v2 safe list perf/smmuv3: Remove the leftover put_cpu() in error path commit a7c88728da3bc68c5b3815332d084244303fd254 Merge: f8f04d085974 0c517e6ced03 Author: Linus Torvalds Date: Fri Dec 20 13:33:50 2019 -0800 Merge tag 'drm-fixes-2019-12-21' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Probably the last one before Christmas, I'll see if there is much demand over next few weeks for more fixes, I expect it'll be quiet enough. This has one exynos fix, and a bunch of i915 core and i915 GVT fixes. Summary: exynos: - component delete fix i915: - Fix to drop an unused and harmful display W/A - Fix to define EHL power wells independent of ICL - Fix for priority inversion on bonded requests - Fix in mmio offset calculation of DSB instance - Fix memory leak from get_task_pid when banning clients - Fixes to avoid dereference of uninitialized ops in dma_fence tracing and keep reference to execbuf object until submitted. - vGPU state setting locking fix (Zhenyu) - Fix vGPU display dmabuf as read-only (Zhenyu) - Properly handle vGPU display dmabuf page pin when rendering (Tina) - Fix one guest boot warning to handle guc reset state (Fred)" * tag 'drm-fixes-2019-12-21' of git://anongit.freedesktop.org/drm/drm: drm/exynos: gsc: add missed component_del drm/i915: Fix pid leak with banned clients drm/i915/gem: Keep request alive while attaching fences drm/i915: Fix WARN_ON condition for cursor plane ddb allocation drm/i915/gvt: Fix guest boot warning drm/i915/tgl: Drop Wa#1178 drm/i915/ehl: Define EHL powerwells independently of ICL drm/i915: Set fence_work.ops before dma_fence_init drm/i915: Copy across scheduler behaviour flags across submit fences drm/i915/dsb: Fix in mmio offset calculation of DSB instance drm/i915/gvt: Pin vgpu dma address before using drm/i915/gvt: set guest display buffer as readonly drm/i915/gvt: use vgpu lock for active state setting commit f8f04d085974ae37782c317abd75f770a25e7713 Merge: b371ddb94fae fd6c2e4c063d Author: Linus Torvalds Date: Fri Dec 20 13:30:49 2019 -0800 Merge tag 'io_uring-5.5-20191220' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Here's a set of fixes that should go into 5.5-rc3 for io_uring. This is bigger than I'd like it to be, mainly because we're fixing the case where an application reuses sqe data right after issue. This really must work, or it's confusing. With 5.5 we're flagging us as submit stable for the actual data, this must also be the case for SQEs. Honestly, I'd really like to add another series on top of this, since it cleans it up considerable and prevents any SQE reuse by design. I posted that here: https://lore.kernel.org/io-uring/20191220174742.7449-1-axboe@kernel.dk/T/#u and may still send it your way early next week once it's been looked at and had some more soak time (does pass all regression tests). With that series, we've unified the prep+issue handling, and only the prep phase even has access to the SQE. Anyway, outside of that, fixes in here for a few other issues that have been hit in testing or production" * tag 'io_uring-5.5-20191220' of git://git.kernel.dk/linux-block: io_uring: io_wq_submit_work() should not touch req->rw io_uring: don't wait when under-submitting io_uring: warn about unhandled opcode io_uring: read opcode and user_data from SQE exactly once io_uring: make IORING_OP_TIMEOUT_REMOVE deferrable io_uring: make IORING_OP_CANCEL_ASYNC deferrable io_uring: make IORING_POLL_ADD and IORING_POLL_REMOVE deferrable io_uring: make HARDLINK imply LINK io_uring: any deferred command must have stable sqe data io_uring: remove 'sqe' parameter to the OP helpers that take it io_uring: fix pre-prepped issue with force_nonblock == true io-wq: re-add io_wq_current_is_worker() io_uring: fix sporadic -EFAULT from IORING_OP_RECVMSG io_uring: fix stale comment and a few typos commit 0c517e6ced039b389bbe2d6be757525e52442f64 Merge: 39b7f58f10ba 78d75f5739c4 Author: Dave Airlie Date: Sat Dec 21 06:08:19 2019 +1000 Merge tag 'drm-intel-fixes-2019-12-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix to drop an unused and harmful display W/A - Fix to define EHL power wells independent of ICL - Fix for priority inversion on bonded requests - Fix in mmio offset calculation of DSB instance - Fix memory leak from get_task_pid when banning clients - Fixes to avoid dereference of uninitialized ops in dma_fence tracing and keep reference to execbuf object until submitted. - Includes gvt-fixes-2019-12-18 Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191219124635.GA16068@jlahtine-desk.ger.corp.intel.com commit 39b7f58f10ba27891ee0c18bec808b00613312a2 Merge: d1eef1c61974 84c92365b20a Author: Dave Airlie Date: Sat Dec 21 06:06:51 2019 +1000 Merge tag 'exynos-drm-fixes-for-v5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Just one bug fixup . Make sure to unregister a component for Exynos gscaler driver when the driver is removed. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1576714013-3788-1-git-send-email-inki.dae@samsung.com commit 75cf9797006a3a9f29a3a25c1febd6842a4a9eb2 Author: Helge Deller Date: Fri Dec 20 21:00:19 2019 +0100 parisc: Fix compiler warnings in debug_core.c Fix this compiler warning: kernel/debug/debug_core.c: In function ‘kgdb_cpu_enter’: arch/parisc/include/asm/cmpxchg.h:48:3: warning: value computed is not used [-Wunused-value] 48 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) arch/parisc/include/asm/atomic.h:78:30: note: in expansion of macro ‘xchg’ 78 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ^~~~ kernel/debug/debug_core.c:596:4: note: in expansion of macro ‘atomic_xchg’ 596 | atomic_xchg(&kgdb_active, cpu); | ^~~~~~~~~~~ Signed-off-by: Helge Deller commit 3b7995a98ad76da5597b488fa84aa5a56d43b608 Author: Yang Yingliang Date: Wed Dec 18 16:44:04 2019 +0800 block: fix memleak when __blk_rq_map_user_iov() is failed When I doing fuzzy test, get the memleak report: BUG: memory leak unreferenced object 0xffff88837af80000 (size 4096): comm "memleak", pid 3557, jiffies 4294817681 (age 112.499s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 20 00 00 00 10 01 00 00 00 00 00 00 01 00 00 00 ............... backtrace: [<000000001c894df8>] bio_alloc_bioset+0x393/0x590 [<000000008b139a3c>] bio_copy_user_iov+0x300/0xcd0 [<00000000a998bd8c>] blk_rq_map_user_iov+0x2f1/0x5f0 [<000000005ceb7f05>] blk_rq_map_user+0xf2/0x160 [<000000006454da92>] sg_common_write.isra.21+0x1094/0x1870 [<00000000064bb208>] sg_write.part.25+0x5d9/0x950 [<000000004fc670f6>] sg_write+0x5f/0x8c [<00000000b0d05c7b>] __vfs_write+0x7c/0x100 [<000000008e177714>] vfs_write+0x1c3/0x500 [<0000000087d23f34>] ksys_write+0xf9/0x200 [<000000002c8dbc9d>] do_syscall_64+0x9f/0x4f0 [<00000000678d8e9a>] entry_SYSCALL_64_after_hwframe+0x49/0xbe If __blk_rq_map_user_iov() is failed in blk_rq_map_user_iov(), the bio(s) which is allocated before this failing will leak. The refcount of the bio(s) is init to 1 and increased to 2 by calling bio_get(), but __blk_rq_unmap_user() only decrease it to 1, so the bio cannot be freed. Fix it by calling blk_rq_unmap_user(). Reviewed-by: Bob Liu Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Jens Axboe commit daa400f5a1e581acc1f9a97100574e82a4590e87 Author: Stefan Haberland Date: Thu Dec 19 09:43:52 2019 +0100 s390/dasd: fix typo in copyright statement coypright -> copyright Reported-by: Kate Stewart Signed-off-by: Stefan Haberland Signed-off-by: Jens Axboe commit 00b39f698a4f1ee897227cace2e3937fc4412270 Author: Stefan Haberland Date: Thu Dec 19 09:43:51 2019 +0100 s390/dasd: fix memleak in path handling error case If for whatever reason the dasd_eckd_check_characteristics() function exits after at least some paths have their configuration data allocated those data is never freed again. In the error case the device->private pointer is set to NULL and dasd_eckd_uncheck_device() will exit without freeing the path data because of this NULL pointer. Fix by calling dasd_eckd_clear_conf_data() for error cases. Also use dasd_eckd_clear_conf_data() in dasd_eckd_uncheck_device() to avoid code duplication. Reported-by: Qian Cai Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Signed-off-by: Jens Axboe commit dd4b3c83b9efac10d48a94c61372119fc555a077 Author: Jan Höppner Date: Thu Dec 19 09:43:50 2019 +0100 s390/dasd/cio: Interpret ccw_device_get_mdc return value correctly The max data count (mdc) is an unsigned 16-bit integer value as per AR documentation and is received via ccw_device_get_mdc() for a specific path mask from the CIO layer. The function itself also always returns a positive mdc value or 0 in case mdc isn't supported or couldn't be determined. Though, the comment for this function describes a negative return value to indicate failures. As a result, the DASD device driver interprets the return value of ccw_device_get_mdc() incorrectly. The error case is essentially a dead code path. To fix this behaviour, check explicitly for a return value of 0 and change the comment for ccw_device_get_mdc() accordingly. This fix merely enables the error code path in the DASD functions get_fcx_max_data() and verify_fcx_max_data(). The actual functionality stays the same and is still correct. Reviewed-by: Cornelia Huck Signed-off-by: Jan Höppner Acked-by: Peter Oberparleiter Reviewed-by: Stefan Haberland Signed-off-by: Stefan Haberland Signed-off-by: Jens Axboe commit b3c6a59975415bde29cfd76ff1ab008edbf614a9 Author: Bart Van Assche Date: Tue Dec 17 16:24:35 2019 -0800 block: Fix a lockdep complaint triggered by request queue flushing Avoid that running test nvme/012 from the blktests suite triggers the following false positive lockdep complaint: ============================================ WARNING: possible recursive locking detected 5.0.0-rc3-xfstests-00015-g1236f7d60242 #841 Not tainted -------------------------------------------- ksoftirqd/1/16 is trying to acquire lock: 000000000282032e (&(&fq->mq_flush_lock)->rlock){..-.}, at: flush_end_io+0x4e/0x1d0 but task is already holding lock: 00000000cbadcbc2 (&(&fq->mq_flush_lock)->rlock){..-.}, at: flush_end_io+0x4e/0x1d0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&fq->mq_flush_lock)->rlock); lock(&(&fq->mq_flush_lock)->rlock); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by ksoftirqd/1/16: #0: 00000000cbadcbc2 (&(&fq->mq_flush_lock)->rlock){..-.}, at: flush_end_io+0x4e/0x1d0 stack backtrace: CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.0.0-rc3-xfstests-00015-g1236f7d60242 #841 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: dump_stack+0x67/0x90 __lock_acquire.cold.45+0x2b4/0x313 lock_acquire+0x98/0x160 _raw_spin_lock_irqsave+0x3b/0x80 flush_end_io+0x4e/0x1d0 blk_mq_complete_request+0x76/0x110 nvmet_req_complete+0x15/0x110 [nvmet] nvmet_bio_done+0x27/0x50 [nvmet] blk_update_request+0xd7/0x2d0 blk_mq_end_request+0x1a/0x100 blk_flush_complete_seq+0xe5/0x350 flush_end_io+0x12f/0x1d0 blk_done_softirq+0x9f/0xd0 __do_softirq+0xca/0x440 run_ksoftirqd+0x24/0x50 smpboot_thread_fn+0x113/0x1e0 kthread+0x121/0x140 ret_from_fork+0x3a/0x50 Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit c44a4edb20938c85b64a256661443039f5bffdea Author: Bart Van Assche Date: Tue Dec 17 16:23:29 2019 -0800 block: Fix the type of 'sts' in bsg_queue_rq() This patch fixes the following sparse warnings: block/bsg-lib.c:269:19: warning: incorrect type in initializer (different base types) block/bsg-lib.c:269:19: expected int sts block/bsg-lib.c:269:19: got restricted blk_status_t [usertype] block/bsg-lib.c:286:16: warning: incorrect type in return expression (different base types) block/bsg-lib.c:286:16: expected restricted blk_status_t block/bsg-lib.c:286:16: got int [assigned] sts Cc: Martin Wilck Fixes: d46fe2cb2dce ("block: drop device references in bsg_queue_rq()") Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit 36257d5580419b28bd42de47d20400b04fc1dd2c Author: Helge Deller Date: Fri Dec 20 19:46:17 2019 +0100 parisc: soft_offline_page() now takes the pfn Switch page deallocation table (pdt) driver to use pfn instead of a page pointer in soft_offline_page(). Fixes: feec24a6139d ("mm, soft-offline: convert parameter to pfn") Signed-off-by: Helge Deller commit b371ddb94fae82b6565020639b7db31934043c65 Merge: fce34dec76d9 c18647900ec8 Author: Linus Torvalds Date: Fri Dec 20 10:42:25 2019 -0800 Merge tag 'iommu-fixes-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Fix kmemleak warning in IOVA code - Fix compile warnings on ARM32/64 in dma-iommu code due to dma_mask type mismatches - Make ISA reserved regions relaxable, so that VFIO can assign devices which have such regions defined - Fix mapping errors resulting in IO page-faults in the VT-d driver - Make sure direct mappings for a domain are created after the default domain is updated - Map ISA reserved regions in the VT-d driver with correct permissions - Remove unneeded check for PSI capability in the IOTLB flush code of the VT-d driver - Lockdep fix iommu_dma_prepare_msi() * tag 'iommu-fixes-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/dma: Relax locking in iommu_dma_prepare_msi() iommu/vt-d: Remove incorrect PSI capability check iommu/vt-d: Allocate reserved region for ISA with correct permission iommu: set group default domain before creating direct mappings iommu/vt-d: Fix dmar pte read access not set error iommu/vt-d: Set ISA bridge reserved region as relaxable iommu/dma: Rationalise types for DMA masks iommu/iova: Init the struct iova to fix the possible memleak commit fce34dec76d93311f90f1f077e1eba3605a3771c Merge: d2944d531380 02abbda105f2 Author: Linus Torvalds Date: Fri Dec 20 10:38:21 2019 -0800 Merge tag 'platform-drivers-x86-v5.5-2' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Andy Shevchenko: "Bucket of fixes for PDx86. Note, that there is no ABI breakage in Mellanox driver because it has been introduced in v5.5-rc1, so we can change it. Summary: - Add support of APUv4 and fix an assignment of simswap GPIO - Add Siemens CONNECT X300 to DMI table to avoid stuck during boot - Correct arguments of WMI call on HP Envy x360 15-cp0xxx model - Fix the mlx-bootctl sysfs attributes to be device related" * tag 'platform-drivers-x86-v5.5-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: pcengines-apuv2: Spelling fixes in the driver platform/x86: pcengines-apuv2: detect apuv4 board platform/x86: pcengines-apuv2: fix simswap GPIO assignment platform/x86: pmc_atom: Add Siemens CONNECT X300 to critclk_systems DMI table platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes platform/mellanox: fix the mlx-bootctl sysfs commit d2944d531380110fb060ed0a9888eae91dc5861e Merge: 6398b9fc818e f667216c5c7c Author: Linus Torvalds Date: Fri Dec 20 10:36:49 2019 -0800 Merge tag 'mmc-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fixes from Ulf Hansson: - mtk-sd: Fix tuning for MT8173 HS200/HS400 mode - sdhci: Revert a fix for incorrect switch to HS mode - sdhci-msm: Fixup accesses to the DDR_CONFIG register - sdhci-of-esdhc: Revert a bad fix for erratum A-009204 - sdhci-of-esdhc: Re-implement fix for erratum A-009204 - sdhci-of-esdhc: Fixup P2020 errata handling - sdhci-pci: Disable broken CMDQ on Intel GLK based Lenovo systems * tag 'mmc-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-of-esdhc: re-implement erratum A-009204 workaround mmc: sdhci: Add a quirk for broken command queuing mmc: sdhci: Workaround broken command queuing on Intel GLK mmc: sdhci-of-esdhc: fix P2020 errata handling mmc: sdhci: Update the tuning failed messages to pr_debug level mmc: sdhci-of-esdhc: Revert "mmc: sdhci-of-esdhc: add erratum A-009204 support" mmc: mediatek: fix CMD_TA to 2 for MT8173 HS200/HS400 mode mmc: sdhci-msm: Correct the offset and value for DDR_CONFIG register Revert "mmc: sdhci: Fix incorrect switch to HS mode" commit 6398b9fc818eea79dcd6e70f981ce782da22cdee Merge: 107aff96d36f 4aa37c463764 Author: Linus Torvalds Date: Fri Dec 20 10:11:30 2019 -0800 Merge tag 'char-misc-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char and other driver fixes for 5.5-rc3. The most noticable one is a much-reported fix for a random driver issue that came up from 5.5-rc1 compat_ioctl cleanups. The others are a chunk of habanalab driver fixes and intel_th driver fixes and new device ids. All have been in linux-next with no reported issues" * tag 'char-misc-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: random: don't forget compat_ioctl on urandom intel_th: msu: Fix window switching without windows intel_th: Fix freeing IRQs intel_th: pci: Add Elkhart Lake SOC support intel_th: pci: Add Comet Lake PCH-V support habanalabs: remove variable 'val' set but not used habanalabs: rate limit error msg on waiting for CS commit 107aff96d36fc4bf2a9ad69bc2524e9f53bde7a6 Merge: 1a4ee8673a77 c05c403b1d12 Author: Linus Torvalds Date: Fri Dec 20 10:09:21 2019 -0800 Merge tag 'staging-5.5-rc3' 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 a number of reported issues. The majority here are some fixes for the wfx driver, but also in here is a comedi driver fix found during some code review, and an axis-fifo build dependancy issue to resolve some reported testing problems. All of these have been in linux-next with no reported issues" * tag 'staging-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: wfx: fix wrong error message staging: wfx: fix hif_set_mfp() with big endian hosts staging: wfx: detect race condition in WEP authentication staging: wfx: ensure that retry policy always fallbacks to MCS0 / 1Mbps staging: wfx: fix rate control handling staging: wfx: firmware does not support more than 32 total retries staging: wfx: use boolean appropriately staging: wfx: fix counter overflow staging: wfx: fix case of lack of tx_retry_policies staging: wfx: fix the cache of rate policies on interface reset staging: axis-fifo: add unspecified HAS_IOMEM dependency staging: comedi: gsc_hpdi: check dma_alloc_coherent() return value commit aa638cfe3e7358122a15cb1d295b622aae69e006 Author: Wei Li Date: Fri Dec 20 17:17:10 2019 +0800 arm64: cpu_errata: Add Hisilicon TSV110 to spectre-v2 safe list HiSilicon Taishan v110 CPUs didn't implement CSV2 field of the ID_AA64PFR0_EL1, but spectre-v2 is mitigated by hardware, so whitelist the MIDR in the safe list. Signed-off-by: Wei Li [hanjun: re-write the commit log] Signed-off-by: Hanjun Guo Signed-off-by: Catalin Marinas commit 1a4ee8673a775faf4164e66e03b2bcb0cc915d5d Merge: 7181aba14639 cb47b9f8630a Author: Linus Torvalds Date: Fri Dec 20 09:55:28 2019 -0800 Merge tag 'tty-5.5-rc3' 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 5.5-rc3. Only four small patches here: - atmel serial driver fix - msm_serial driver fix - sprd serial driver fix - tty core port fix The last tty core fix should resolve a long-standing bug with a race at port creation time that some people would see, and Sudip finally tracked down. All of these have been in linux-next with no reported issues" * tag 'tty-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty/serial: atmel: fix out of range clock divider handling tty: link tty and port before configuring it as console serial: sprd: Add clearing break interrupt operation tty: serial: msm_serial: Fix lockup for sysrq and oops commit 7181aba1463909b99a7c5807e5eae40d93d36366 Merge: 7190a23a58b7 6056a0f8ede2 Author: Linus Torvalds Date: Fri Dec 20 09:53:24 2019 -0800 Merge tag 'usb-5.5-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 for some reported issues. Included in here are: - xhci build warning fix - ehci disconnect warning fix - usbip lockup fix and error cleanup fix - typec build fix All of these have been in linux-next with no reported issues" * tag 'usb-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: xhci: Fix build warning seen with CONFIG_PM=n usbip: Fix error path of vhci_recv_ret_submit() usbip: Fix receive error in vhci-hcd when using scatter-gather USB: EHCI: Do not return -EPIPE when hub is disconnected usb: typec: fusb302: Fix an undefined reference to 'extcon_get_state' commit 7190a23a58b7587eadbe53aaffca280882838f35 Merge: 7e0165b2f1a9 9e65527ac3ba Author: Linus Torvalds Date: Fri Dec 20 09:49:05 2019 -0800 Merge tag 'pinctrl-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Sorry that this fixes pull request took a while. Too much christmas business going on. This contains a few really important Intel fixes and some odd fixes: - A host of fixes for the Intel baytrail and cherryview: properly serialize all register accesses and add the irqchip with the gpiochip as we need to, fix some pin lists and initialize the hardware in the right order. - Fix the Aspeed G6 LPC configuration. - Handle a possible NULL pointer exception in the core. - Fix the Kconfig dependencies for the Equilibrium driver" * tag 'pinctrl-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: ingenic: Fixup PIN_CONFIG_OUTPUT config pinctrl: Modify Kconfig to fix linker error pinctrl: pinmux: fix a possible null pointer in pinmux_can_be_used_for_gpio pinctrl: aspeed-g6: Fix LPC/eSPI mux configuration pinctrl: cherryview: Pass irqchip when adding gpiochip pinctrl: cherryview: Add GPIO <-> pin mapping ranges via callback pinctrl: cherryview: Split out irq hw-init into a separate helper function pinctrl: baytrail: Pass irqchip when adding gpiochip pinctrl: baytrail: Add GPIO <-> pin mapping ranges via callback pinctrl: baytrail: Update North Community pin list pinctrl: baytrail: Really serialize all register accesses commit 3529d8c2b353e6e446277ae96a36e7471cb070fc Author: Jens Axboe Date: Thu Dec 19 18:24:38 2019 -0700 io_uring: pass in 'sqe' to the prep handlers This moves the prep handlers outside of the opcode handlers, and allows us to pass in the sqe directly. If the sqe is non-NULL, it means that the request should be prepared for the first time. With the opcode handlers not having access to the sqe at all, we are guaranteed that the prep handler has setup the request fully by the time we get there. As before, for opcodes that need to copy in more data then the io_kiocb allows for, the io_async_ctx holds that info. If a prep handler is invoked with req->io set, it must use that to retain information for later. Finally, we can remove io_kiocb->sqe as well. Signed-off-by: Jens Axboe commit 06b76d44ba25e52711dc7cc4fc75b50907bc6b8e Author: Jens Axboe Date: Thu Dec 19 14:44:26 2019 -0700 io_uring: standardize the prep methods We currently have a mix of use cases. Most of the newer ones are pretty uniform, but we have some older ones that use different calling calling conventions. This is confusing. For the opcodes that currently rely on the req->io->sqe copy saving them from reuse, add a request type struct in the io_kiocb command union to store the data they need. Prepare for all opcodes having a standard prep method, so we can call it in a uniform fashion and outside of the opcode handler. This is in preparation for passing in the 'sqe' pointer, rather than storing it in the io_kiocb. Once we have uniform prep handlers, we can leave all the prep work to that part, and not even pass in the sqe to the opcode handler. This ensures that we don't reuse sqe data inadvertently. Signed-off-by: Jens Axboe commit 02abbda105f25fb634207e7f23a8a4b51fe67ad4 Author: Andy Shevchenko Date: Wed Dec 18 14:48:07 2019 +0200 platform/x86: pcengines-apuv2: Spelling fixes in the driver Mainly does: - capitalize gpio and bios to GPIO and BIOS - capitalize beginning of comments - add periods in multi-line comments Signed-off-by: Andy Shevchenko commit 3d00da1de3ea36ba44f4a7ba76c8c8b16f98204b Author: Enrico Weigelt, metux IT consult Date: Thu Dec 12 14:27:56 2019 +0100 platform/x86: pcengines-apuv2: detect apuv4 board GPIO stuff on APUv4 seems to be the same as on APUv2, so we just need to match on DMI data. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Andy Shevchenko commit d4ac8f83dafec205c5db9b86b21587fba43bc017 Author: Enrico Weigelt, metux IT consult Date: Thu Dec 12 12:23:48 2019 +0100 platform/x86: pcengines-apuv2: fix simswap GPIO assignment The mapping entry has to hold the GPIO line index instead of controller's register number. Fixes: 5037d4ddda31 ("platform/x86: pcengines-apuv2: wire up simswitch gpio as led") Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Andy Shevchenko commit e8796c6c69d129420ee94a1906b18d86b84644d4 Author: Michael Haener Date: Fri Nov 29 10:16:49 2019 +0100 platform/x86: pmc_atom: Add Siemens CONNECT X300 to critclk_systems DMI table The CONNECT X300 uses the PMC clock for on-board components and gets stuck during boot if the clock is disabled. Therefore, add this device to the critical systems list. Tested on CONNECT X300. Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") Signed-off-by: Michael Haener Signed-off-by: Andy Shevchenko commit 133b2acee3871ae6bf123b8fe34be14464aa3d2c Author: Hans de Goede Date: Tue Dec 17 20:06:04 2019 +0100 platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes At least on the HP Envy x360 15-cp0xxx model the WMI interface for HPWMI_FEATURE2_QUERY requires an outsize of at least 128 bytes, otherwise it fails with an error code 5 (HPWMI_RET_INVALID_PARAMETERS): Dec 06 00:59:38 kernel: hp_wmi: query 0xd returned error 0x5 We do not care about the contents of the buffer, we just want to know if the HPWMI_FEATURE2_QUERY command is supported. This commits bumps the buffer size, fixing the error. Fixes: 8a1513b4932 ("hp-wmi: limit hotkey enable") Cc: stable@vger.kernel.org BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703 Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 77dcc95e2048765b616b5308863ab1d4d5a8f720 Author: Liming Sun Date: Wed Dec 18 13:35:27 2019 -0500 platform/mellanox: fix the mlx-bootctl sysfs This is a follow-up commit for the sysfs attributes to change from DRIVER_ATTR to DEVICE_ATTR according to some initial comments. In such case, it's better to point the sysfs path to the device itself instead of the driver. The ABI document is also updated. Fixes: 79e29cb8fbc5 ("platform/mellanox: Add bootctl driver for Mellanox BlueField Soc") Signed-off-by: Liming Sun Signed-off-by: Andy Shevchenko commit 26a61679f10c6f041726411964b172565021c2eb Author: Jens Axboe Date: Fri Dec 20 09:02:01 2019 -0700 io_uring: read 'count' for IORING_OP_TIMEOUT in prep handler Add the count field to struct io_timeout, and ensure the prep handler has read it. Timeout also needs an async context always, set it up in the prep handler if we don't have one. Signed-off-by: Jens Axboe commit e47293fdf98998292a89d516c8f7b8b9eb5c5213 Author: Jens Axboe Date: Fri Dec 20 08:58:21 2019 -0700 io_uring: move all prep state for IORING_OP_{SEND,RECV}_MGS to prep handler Add struct io_sr_msg in our io_kiocb per-command union, and ensure that the send/recvmsg prep handlers have grabbed what they need from the SQE by the time prep is done. Signed-off-by: Jens Axboe commit 3fbb51c18f5c15a23db74c4da79d3d035176c480 Author: Jens Axboe Date: Fri Dec 20 08:51:52 2019 -0700 io_uring: move all prep state for IORING_OP_CONNECT to prep handler Add struct io_connect in our io_kiocb per-command union, and ensure that io_connect_prep() has grabbed what it needs from the SQE. Signed-off-by: Jens Axboe commit 9adbd45d6d32ffc1a03f3c51d72cfc69ebfc2ddb Author: Jens Axboe Date: Fri Dec 20 08:45:55 2019 -0700 io_uring: add and use struct io_rw for read/writes Put the kiocb in struct io_rw, and add the addr/len for the request as well. Use the kiocb->private field for the buffer index for fixed reads and writes. Any use of kiocb->ki_filp is flipped to req->file. It's the same thing, and less confusing. Signed-off-by: Jens Axboe commit 063c60d39180cec7c9317f5acfc3071f8fecd705 Author: David Howells Date: Fri Dec 20 16:17:16 2019 +0000 rxrpc: Fix missing security check on incoming calls Fix rxrpc_new_incoming_call() to check that we have a suitable service key available for the combination of service ID and security class of a new incoming call - and to reject calls for which we don't. This causes an assertion like the following to appear: rxrpc: Assertion failed - 6(0x6) == 12(0xc) is false kernel BUG at net/rxrpc/call_object.c:456! Where call->state is RXRPC_CALL_SERVER_SECURING (6) rather than RXRPC_CALL_COMPLETE (12). Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Reported-by: Marc Dionne Signed-off-by: David Howells commit 13b7955a0252e15265386b229b814152f109b234 Author: David Howells Date: Fri Dec 20 16:20:56 2019 +0000 rxrpc: Don't take call->user_mutex in rxrpc_new_incoming_call() Standard kernel mutexes cannot be used in any way from interrupt or softirq context, so the user_mutex which manages access to a call cannot be a mutex since on a new call the mutex must start off locked and be unlocked within the softirq handler to prevent userspace interfering with a call we're setting up. Commit a0855d24fc22d49cdc25664fb224caee16998683 ("locking/mutex: Complain upon mutex API misuse in IRQ contexts") causes big warnings to be splashed in dmesg for each a new call that comes in from the server. Whilst it *seems* like it should be okay, since the accept path uses trylock, there are issues with PI boosting and marking the wrong task as the owner. Fix this by not taking the mutex in the softirq path at all. It's not obvious that there should be any need for it as the state is set before the first notification is generated for the new call. There's also no particular reason why the link-assessing ping should be triggered inside the mutex. It's not actually transmitted there anyway, but rather it has to be deferred to a workqueue. Further, I don't think that there's any particular reason that the socket notification needs to be done from within rx->incoming_lock, so the amount of time that lock is held can be shortened too and the ping prepared before the new call notification is sent. Fixes: 540b1c48c37a ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg") Signed-off-by: David Howells cc: Peter Zijlstra (Intel) cc: Ingo Molnar cc: Will Deacon cc: Davidlohr Bueso commit f33121cbe91973a08e68e4bde8c3f7e6e4e351c1 Author: David Howells Date: Wed Dec 18 16:38:49 2019 +0000 rxrpc: Unlock new call in rxrpc_new_incoming_call() rather than the caller Move the unlock and the ping transmission for a new incoming call into rxrpc_new_incoming_call() rather than doing it in the caller. This makes it clearer to see what's going on. Suggested-by: Peter Zijlstra Signed-off-by: David Howells Acked-by: Peter Zijlstra (Intel) cc: Ingo Molnar cc: Will Deacon cc: Davidlohr Bueso commit 5084bf6b2006fcd46f1e44e3c51b687507b362e2 Author: Chen Wandun Date: Fri Dec 20 08:07:31 2019 -0800 xfs: Make the symbol 'xfs_rtalloc_log_count' static Fix the following sparse warning: fs/xfs/libxfs/xfs_trans_resv.c:206:1: warning: symbol 'xfs_rtalloc_log_count' was not declared. Should it be static? Fixes: b1de6fc7520f ("xfs: fix log reservation overflows when allocating large rt extents") Signed-off-by: Chen Wandun Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d55e5f5b70dd6214ef81fb2313121b72a7dd2200 Author: Jens Axboe Date: Wed Dec 11 16:12:15 2019 -0700 io_uring: use u64_to_user_ptr() consistently We use it in some spots, but not consistently. Convert the rest over, makes it easier to read as well. No functional changes in this patch. Signed-off-by: Jens Axboe commit ac2917b01992c098b8d4e6837115e3ca347fdd90 Author: Ben Dooks (Codethink) Date: Tue Dec 17 11:53:09 2019 +0000 drm/arm/mali: make malidp_mw_connector_helper_funcs static The malidp_mw_connector_helper_funcs is not referenced by name outside of the file it is in, so make it static to avoid the following warning: drivers/gpu/drm/arm/malidp_mw.c:59:41: warning: symbol 'malidp_mw_connector_helper_funcs' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20191217115309.2133503-1-ben.dooks@codethink.co.uk commit d6bd6cf9feb81737f9f64d2c1acf98fdaacebad1 Author: Aditya Pakki Date: Tue Dec 17 14:53:56 2019 -0600 xen/grant-table: remove multiple BUG_ON on gnttab_interface gnttab_request_version() always sets the gnttab_interface variable and the assertions to check for empty gnttab_interface is unnecessary. The patch eliminates multiple such assertions. Signed-off-by: Aditya Pakki Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit f4eef1b652eeb850a0f44e8f985cc4153a0c0265 Author: Paul Durrant Date: Wed Dec 11 15:29:56 2019 +0000 xen-blkback: support dynamic unbind/bind By simply re-attaching to shared rings during connect_ring() rather than assuming they are freshly allocated (i.e assuming the counters are zero) it is possible for vbd instances to be unbound and re-bound from and to (respectively) a running guest. This has been tested by running: while true; do fio --name=randwrite --ioengine=libaio --iodepth=16 \ --rw=randwrite --bs=4k --direct=1 --size=1G --verify=crc32; done in a PV guest whilst running: while true; do echo vbd-$DOMID-$VBD >unbind; echo unbound; sleep 5; echo vbd-$DOMID-$VBD >bind; echo bound; sleep 3; done in dom0 from /sys/bus/xen-backend/drivers/vbd to continuously unbind and re-bind its system disk image. This is a highly useful feature for a backend module as it allows it to be unloaded and re-loaded (i.e. updated) without requiring domUs to be halted. This was also tested by running: while true; do echo vbd-$DOMID-$VBD >unbind; echo unbound; sleep 5; rmmod xen-blkback; echo unloaded; sleep 1; modprobe xen-blkback; echo bound; cd $(pwd); sleep 3; done in dom0 whilst running the same loop as above in the (single) PV guest. Some (less stressful) testing has also been done using a Windows HVM guest with the latest 9.0 PV drivers installed. Signed-off-by: Paul Durrant Reviewed-by: Juergen Gross Reviewed-by: Roger Pau Monné Signed-off-by: Juergen Gross commit 1ee54195a305fae3955642af8528bdf67496d353 Author: Paul Durrant Date: Wed Dec 11 15:29:55 2019 +0000 xen/interface: re-define FRONT/BACK_RING_ATTACH() Currently these macros are defined to re-initialize a front/back ring (respectively) to values read from the shared ring in such a way that any requests/responses that are added to the shared ring whilst the front/back is detached will be skipped over. This, in general, is not a desirable semantic since most frontend implementations will eventually block waiting for a response which would either never appear or never be processed. Since the macros are currently unused, take this opportunity to re-define them to re-initialize a front/back ring using specified values. This also allows FRONT/BACK_RING_INIT() to be re-defined in terms of FRONT/BACK_RING_ATTACH() using a specified value of 0. NOTE: BACK_RING_ATTACH() will be used directly in a subsequent patch. Signed-off-by: Paul Durrant Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 672b7763cb2c723fd6f92a3879cc60d2fb11e56a Author: Paul Durrant Date: Wed Dec 11 15:29:54 2019 +0000 xenbus: limit when state is forced to closed If a driver probe() fails then leave the xenstore state alone. There is no reason to modify it as the failure may be due to transient resource allocation issues and hence a subsequent probe() may succeed. If the driver supports re-binding then only force state to closed during remove() only in the case when the toolstack may need to clean up. This can be detected by checking whether the state in xenstore has been set to closing prior to device removal. NOTE: Re-bind support is indicated by new boolean in struct xenbus_driver, which defaults to false. Subsequent patches will add support to some backend drivers. Signed-off-by: Paul Durrant Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit c534374ecf044384ddd24474b91fd0d31e720464 Author: Paul Durrant Date: Wed Dec 11 15:29:53 2019 +0000 xenbus: move xenbus_dev_shutdown() into frontend code... ...and make it static xenbus_dev_shutdown() is seemingly intended to cause clean shutdown of PV frontends when a guest is rebooted. Indeed the function waits for a conpletion which is only set by a call to xenbus_frontend_closed(). This patch removes the shutdown() method from backends and moves xenbus_dev_shutdown() from xenbus_probe.c into xenbus_probe_frontend.c, renaming it appropriately and making it static. NOTE: In the case where the backend is running in a driver domain, the toolstack should have already terminated any frontends that may be using it (since Xen does not support re-startable PV driver domains) so xenbus_dev_shutdown() should never be called. Signed-off-by: Paul Durrant Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 589b72894f53124a39d1bb3c0cecaf9dcabac417 Author: Nathan Chancellor Date: Mon Dec 9 13:14:44 2019 -0700 xen/blkfront: Adjust indentation in xlvbd_alloc_gendisk Clang warns: ../drivers/block/xen-blkfront.c:1117:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] nr_parts = PARTS_PER_DISK; ^ ../drivers/block/xen-blkfront.c:1115:3: note: previous statement is here if (err) ^ This is because there is a space at the beginning of this line; remove it so that the indentation is consistent according to the Linux kernel coding style and clang no longer warns. While we are here, the previous line has some trailing whitespace; clean that up as well. Fixes: c80a420995e7 ("xen-blkfront: handle Xen major numbers other than XENVBD") Link: https://github.com/ClangBuiltLinux/linux/issues/791 Signed-off-by: Nathan Chancellor Reviewed-by: Juergen Gross Acked-by: Roger Pau Monné Signed-off-by: Juergen Gross commit cd217ee6867d285ceecd610fa1006975d5c683fa Author: Bjorn Andersson Date: Fri Dec 20 15:47:15 2019 +0530 phy: qcom-qmp: Increase PHY ready timeout It's typical for the QHP PHY to take slightly above 1ms to initialize, so increase the timeout of the PHY ready check to 10ms - as already done in the downstream PCIe driver. Signed-off-by: Bjorn Andersson Tested-by: Evan Green Tested-by: Vinod Koul Signed-off-by: Vinod Koul Signed-off-by: Kishon Vijay Abraham I commit 9209fb51896fe0eef8dfac85afe1f357e9265c0d Author: Christoph Hellwig Date: Thu Nov 7 10:20:39 2019 +0100 riscv: move sifive_l2_cache.c to drivers/soc The sifive_l2_cache.c is in no way related to RISC-V architecture memory management. It is a little stub driver working around the fact that the EDAC maintainers prefer their drivers to be structured in a certain way that doesn't fit the SiFive SOCs. Move the file to drivers/soc and add a Kconfig option for it, as well as the whole drivers/soc boilerplate for CONFIG_SOC_SIFIVE. Fixes: a967a289f169 ("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs") Signed-off-by: Christoph Hellwig Reviewed-by: Borislav Petkov [paul.walmsley@sifive.com: keep the MAINTAINERS change specific to the L2$ controller code] Signed-off-by: Paul Walmsley commit 7b02bf6194887eab2f8912f7284a9e407329a255 Author: Johannes Berg Date: Tue Nov 12 15:18:16 2019 +0100 iwlwifi: pcie: move page tracking into get_page_hdr() Move the tracking that records the page in the SKB for later free (refcount decrement) into the get_page_hdr() function for better code reuse. While at it, also add an assertion that this doesn't overwrite any existing page pointer in the skb. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 160bab43419ebca9ee57219b2ccf02f0fa2c59e8 Author: Gil Adam Date: Thu Nov 7 21:23:21 2019 +0200 iwlwifi: don't send PPAG command if disabled we should not send the PPAG (Per-Platform Antenna Gain) command to FW unless the platform has this ACPI table and it was read and validated during the init flow. also no need to send the command if the feature is disabled, so check if enabled before sending, as if there is no valid table the feature is disabled. Signed-off-by: Gil Adam Signed-off-by: Luca Coelho commit 01f52e16b868ce22069425c69f2c8e3ef4077b5c Author: David Abdurachmanov Date: Wed Dec 18 10:28:11 2019 +0200 riscv: define vmemmap before pfn_to_page calls pfn_to_page & page_to_pfn depend on vmemmap being available before the calls if kernel is configured with CONFIG_SPARSEMEM_VMEMMAP=y. This was caused by NOMMU changes which moved vmemmap definition bellow functions definitions calling pfn_to_page & page_to_pfn. Noticed while compiled 5.5-rc2 kernel for Fedora/RISCV. v2: - Add a comment for vmemmap in source Signed-off-by: David Abdurachmanov Fixes: 6bd33e1ece52 ("riscv: add nommu support") Reviewed-by: Anup Patel Signed-off-by: Paul Walmsley commit d411cf02ed0260dacc4b2fd61dd5040fc2aa97e7 Author: Greentime Hu Date: Thu Dec 19 14:44:59 2019 +0800 riscv: fix scratch register clearing in M-mode. This patch fixes that the sscratch register clearing in M-mode. It cleared sscratch register in M-mode, but it should clear mscratch register. That will cause kernel trap if the CPU core doesn't support S-mode when trying to access sscratch. Fixes: 9e80635619b5 ("riscv: clear the instruction cache and all registers when booting") Signed-off-by: Greentime Hu Reviewed-by: Anup Patel Signed-off-by: Paul Walmsley commit 0312a3d4b43c0045869379affc0e228e36411c78 Author: Andreas Schwab Date: Tue Dec 17 12:15:16 2019 +0100 riscv: Fix use of undefined config option CONFIG_CONFIG_MMU In Kconfig files, config options are written without the CONFIG_ prefix. Fixes: 6bd33e1ece52 ("riscv: add nommu support") Signed-off-by: Andreas Schwab Reviewed-by: Anup Patel Signed-off-by: Paul Walmsley commit 4acb0200ab2b07843e3ef5599add3454c7440f03 Author: Tony Lindgren Date: Fri Dec 20 16:21:40 2019 +0530 phy: cpcap-usb: Fix error path when no host driver is loaded If musb_mailbox() returns an error, we must still continue to finish configuring the phy. Otherwise the phy state may end up only half initialized, and this can cause the debug serial console to stop working. And this will happen if the usb driver musb controller is not loaded. Let's fix the issue by adding helper for cpcap_usb_try_musb_mailbox(). Fixes: 6d6ce40f63af ("phy: cpcap-usb: Add CPCAP PMIC USB support") Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I commit 2438c3a19dec5e98905fd3ffcc2f24716aceda6b Author: Daniele Palmas Date: Thu Dec 19 11:07:07 2019 +0100 USB: serial: option: add ZLP support for 0x1bc7/0x9010 Telit FN980 flashing device 0x1bc7/0x9010 requires zero packet to be sent if out data size is is equal to the endpoint max size. Signed-off-by: Daniele Palmas [ johan: switch operands in conditional ] Cc: stable Signed-off-by: Johan Hovold commit 0141254b0a74b37aa7eb13d42a56adba84d51c73 Author: Johan Hovold Date: Fri Dec 20 10:31:34 2019 +0100 ALSA: usb-audio: fix set_format altsetting sanity check Make sure to check the return value of usb_altnum_to_altsetting() to avoid dereferencing a NULL pointer when the requested alternate settings is missing. The format altsetting number may come from a quirk table and there does not seem to be any other validation of it (the corresponding index is checked however). Fixes: b099b9693d23 ("ALSA: usb-audio: Avoid superfluous usb_set_interface() calls") Cc: stable # 4.18 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191220093134.1248-1-johan@kernel.org Signed-off-by: Takashi Iwai commit 307201a3d4947f1f677a1af56b2972fff40d473c Merge: 615f22f58029 6649a3f33747 Author: David S. Miller Date: Thu Dec 19 17:53:05 2019 -0800 Merge branch 'cls_u32-fix-refcount-leak' Davide Caratti says: ==================== net/sched: cls_u32: fix refcount leak a refcount leak in the error path of u32_change() has been recently introduced. It can be observed with the following commands: [root@f31 ~]# tc filter replace dev eth0 ingress protocol ip prio 97 \ > u32 match ip src 127.0.0.1/32 indev notexist20 flowid 1:1 action drop RTNETLINK answers: Invalid argument We have an error talking to the kernel [root@f31 ~]# tc filter replace dev eth0 ingress protocol ip prio 98 \ > handle 42:42 u32 divisor 256 Error: cls_u32: Divisor can only be used on a hash table. We have an error talking to the kernel [root@f31 ~]# tc filter replace dev eth0 ingress protocol ip prio 99 \ > u32 ht 47:47 Error: cls_u32: Specified hash table not found. We have an error talking to the kernel they all legitimately return -EINVAL; however, they leave semi-configured filters at eth0 tc ingress: [root@f31 ~]# tc filter show dev eth0 ingress filter protocol ip pref 97 u32 chain 0 filter protocol ip pref 97 u32 chain 0 fh 800: ht divisor 1 filter protocol ip pref 98 u32 chain 0 filter protocol ip pref 98 u32 chain 0 fh 801: ht divisor 1 filter protocol ip pref 99 u32 chain 0 filter protocol ip pref 99 u32 chain 0 fh 802: ht divisor 1 With older kernels, filters were unconditionally considered empty (and thus de-refcounted) on the error path of ->change(). After commit 8b64678e0af8 ("net: sched: refactor tp insert/delete for concurrent execution"), filters were considered empty when the walk() function didn't set 'walker.stop' to 1. Finally, with commit 6676d5e416ee ("net: sched: set dedicated tcf_walker flag when tp is empty"), tc filters are considered empty unless the walker function is called with a non-NULL handle. This last change doesn't fit cls_u32 design, because at least the "root hnode" is (almost) always non-NULL, as it's allocated in u32_init(). - patch 1/2 is a proposal to restore the original kernel behavior, where no filter was installed in the error path of u32_change(). - patch 2/2 adds tdc selftests that can be ued to verify the correct behavior of u32 in the error path of ->change(). ==================== Signed-off-by: David S. Miller commit 6649a3f3374720e000ea6d67b79b4df28a7662ba Author: Davide Caratti Date: Wed Dec 18 00:00:05 2019 +0100 tc-testing: initial tdc selftests for cls_u32 - move test "e9a3 - Add u32 with source match" to u32.json, and change the match pattern to catch all hnodes - add testcases for relevant error paths of cls_u32 module Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 275c44aa194b7159d1191817b20e076f55f0e620 Author: Davide Caratti Date: Wed Dec 18 00:00:04 2019 +0100 net/sched: cls_u32: fix refcount leak in the error path of u32_change() when users replace cls_u32 filters with new ones having wrong parameters, so that u32_change() fails to validate them, the kernel doesn't roll-back correctly, and leaves semi-configured rules. Fix this in u32_walk(), avoiding a call to the walker function on filters that don't have a match rule connected. The side effect is, these "empty" filters are not even dumped when present; but that shouldn't be a problem as long as we are restoring the original behaviour, where semi-configured filters were not even added in the error path of u32_change(). Fixes: 6676d5e416ee ("net: sched: set dedicated tcf_walker flag when tp is empty") Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 615f22f58029aa747b12768985e7f91cd053daa2 Author: Aditya Pakki Date: Tue Dec 17 14:43:00 2019 -0600 nfc: s3fwrn5: replace the assertion with a WARN_ON In s3fwrn5_fw_recv_frame, if fw_info->rsp is not empty, the current code causes a crash via BUG_ON. However, s3fwrn5_fw_send_msg does not crash in such a scenario. The patch replaces the BUG_ON by returning the error to the callers and frees up skb. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller commit a019739c1c32cbd07f62b1d84fa57620897464b1 Merge: 0fd260056ef8 ef8a2e27289e Author: David S. Miller Date: Thu Dec 19 17:32:21 2019 -0800 Merge branch 'macb-fix-probing-of-PHY-not-described-in-the-dt' Antoine Tenart says: ==================== net: macb: fix probing of PHY not described in the dt The macb Ethernet driver supports various ways of referencing its network PHY. When a device tree is used the PHY can be referenced with a phy-handle or, if connected to its internal MDIO bus, described in a child node. Some platforms omitted the PHY description while connecting the PHY to the internal MDIO bus and in such cases the MDIO bus has to be scanned "manually" by the macb driver. Prior to the phylink conversion the driver registered the MDIO bus with of_mdiobus_register and then in case the PHY couldn't be retrieved using dt or using phy_find_first (because registering an MDIO bus with of_mdiobus_register masks all PHYs) the macb driver was "manually" scanning the MDIO bus (like mdiobus_register does). The phylink conversion did break this particular case but reimplementing the manual scan of the bus in the macb driver wouldn't be very clean. The solution seems to be registering the MDIO bus based on if the PHYs are described in the device tree or not. There are multiple ways to do this, none is perfect. I chose to check if any of the child nodes of the macb node was a network PHY and based on this to register the MDIO bus with the of_ helper or not. The drawback is boards referencing the PHY through phy-handle, would scan the entire MDIO bus of the macb at boot time (as the MDIO bus would be registered with mdiobus_register). For this solution to work properly of_mdiobus_child_is_phy has to be exported, which means the patch doing so has to be backported to -stable as well. Another possible solution could have been to simply check if the macb node has a child node by counting its sub-nodes. This isn't techically perfect, as there could be other sub-nodes (in practice this should be fine, fixed-link being taken care of in the driver). We could also simply s/of_mdiobus_register/mdiobus_register/ but that could break boards using the PHY description in child node as a selector (which really would be not a proper way to do this...). The real issue here being having PHYs not described in the dt but we have dt backward compatibility, so we have to live with that. ==================== Signed-off-by: David S. Miller commit ef8a2e27289ee1b24e743c4302a053b128e16284 Author: Antoine Tenart Date: Tue Dec 17 18:07:42 2019 +0100 net: macb: fix probing of PHY not described in the dt This patch fixes the case where the PHY isn't described in the device tree. This is due to the way the MDIO bus is registered in the driver: whether the PHY is described in the device tree or not, the bus is registered through of_mdiobus_register. The function masks all the PHYs and only allow probing the ones described in the device tree. Prior to the Phylink conversion this was also done but later on in the driver the MDIO bus was manually scanned to circumvent the fact that the PHY wasn't described. This patch fixes it in a proper way, by registering the MDIO bus based on if the PHY attached to a given interface is described in the device tree or not. Fixes: 7897b071ac3b ("net: macb: convert to phylink") Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 0aa4d016c043d16a282e7e93edf6213a7b954c90 Author: Antoine Tenart Date: Tue Dec 17 18:07:41 2019 +0100 of: mdio: export of_mdiobus_child_is_phy This patch exports of_mdiobus_child_is_phy, allowing to check if a child node is a network PHY. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 8cb4ec44de42b99b92399b4d1daf3dc430ed0186 Author: Phil Sutter Date: Wed Dec 18 00:59:29 2019 +0100 netfilter: nft_tproxy: Fix port selector on Big Endian On Big Endian architectures, u16 port value was extracted from the wrong parts of u32 sreg_port, just like commit 10596608c4d62 ("netfilter: nf_tables: fix mismatch in big-endian system") describes. Fixes: 4ed8eb6570a49 ("netfilter: nf_tables: Add native tproxy support") Signed-off-by: Phil Sutter Acked-by: Florian Westphal Acked-by: Máté Eckl Signed-off-by: Pablo Neira Ayuso commit e608f631f0ba5f1fc5ee2e260a3a35d13107cbfe Author: Florian Westphal Date: Sun Dec 15 03:49:25 2019 +0100 netfilter: ebtables: compat: reject all padding in matches/watchers syzbot reported following splat: BUG: KASAN: vmalloc-out-of-bounds in size_entry_mwt net/bridge/netfilter/ebtables.c:2063 [inline] BUG: KASAN: vmalloc-out-of-bounds in compat_copy_entries+0x128b/0x1380 net/bridge/netfilter/ebtables.c:2155 Read of size 4 at addr ffffc900004461f4 by task syz-executor267/7937 CPU: 1 PID: 7937 Comm: syz-executor267 Not tainted 5.5.0-rc1-syzkaller #0 size_entry_mwt net/bridge/netfilter/ebtables.c:2063 [inline] compat_copy_entries+0x128b/0x1380 net/bridge/netfilter/ebtables.c:2155 compat_do_replace+0x344/0x720 net/bridge/netfilter/ebtables.c:2249 compat_do_ebt_set_ctl+0x22f/0x27e net/bridge/netfilter/ebtables.c:2333 [..] Because padding isn't considered during computation of ->buf_user_offset, "total" is decremented by fewer bytes than it should. Therefore, the first part of if (*total < sizeof(*entry) || entry->next_offset < sizeof(*entry)) will pass, -- it should not have. This causes oob access: entry->next_offset is past the vmalloced size. Reject padding and check that computed user offset (sum of ebt_entry structure plus all individual matches/watchers/targets) is same value that userspace gave us as the offset of the next entry. Reported-by: syzbot+f68108fed972453a0ad4@syzkaller.appspotmail.com Fixes: 81e675c227ec ("netfilter: ebtables: add CONFIG_COMPAT support") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d05d5db815d56a0ce203ed297153d9794dfdcb68 Author: Florian Westphal Date: Fri Dec 13 01:19:58 2019 +0100 selftests: netfilter: extend flowtable test script with dnat rule NAT test currently covers snat (masquerade) only. Also add a dnat rule and then check that a connecting to the to-be-dnated address will work. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c9b3b8207bc487de02cbca968927ba2c2cb46aaf Author: Arnd Bergmann Date: Tue Dec 10 21:24:28 2019 +0100 netfilter: nf_flow_table: fix big-endian integer overflow In some configurations, gcc reports an integer overflow: net/netfilter/nf_flow_table_offload.c: In function 'nf_flow_rule_match': net/netfilter/nf_flow_table_offload.c:80:21: error: unsigned conversion from 'int' to '__be16' {aka 'short unsigned int'} changes value from '327680' to '0' [-Werror=overflow] mask->tcp.flags = TCP_FLAG_RST | TCP_FLAG_FIN; ^~~~~~~~~~~~ From what I can tell, we want the upper 16 bits of these constants, so they need to be shifted in cpu-endian mode. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso commit e4dc9a4c31fe10d1751c542702afc85be8a5c56a Author: Israel Rukshin Date: Wed Dec 11 17:36:02 2019 +0200 scsi: target/iblock: Fix protection error with blocks greater than 512B The sector size of the block layer is 512 bytes, but integrity interval size might be different (in case of 4K block size of the media). At the initiator side the virtual start sector is the one that was originally submitted by the block layer (512 bytes) for the Reftag usage. The initiator converts the Reftag to integrity interval units and sends it to the target. So the target virtual start sector should be calculated at integrity interval units. prepare_fn() and complete_fn() don't remap correctly the Reftag when using incorrect units of the virtual start sector, which leads to the following protection error at the device: "blk_update_request: protection error, dev sdb, sector 2048 op 0x0:(READ) flags 0x10000 phys_seg 1 prio class 0" To fix that, set the seed in integrity interval units. Link: https://lore.kernel.org/r/1576078562-15240-1-git-send-email-israelr@mellanox.com Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Martin K. Petersen commit 71482fde704efdd8c3abe0faf34d922c61e8d76b Author: Varun Prakash Date: Wed Dec 18 19:15:31 2019 +0530 scsi: libcxgbi: fix NULL pointer dereference in cxgbi_device_destroy() If cxgb4i_ddp_init() fails then cdev->cdev2ppm will be NULL, so add a check for NULL pointer before dereferencing it. Link: https://lore.kernel.org/r/1576676731-3068-1-git-send-email-varun@chelsio.com Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit 291c2548458d3a8b326bfa8d7abbba86e036faf7 Author: Colin Ian King Date: Wed Dec 18 08:43:01 2019 +0000 scsi: lpfc: fix spelling mistakes of asynchronous There are spelling mistakes of asynchronous in a lpfc_printf_log message and comments. Fix these. Link: https://lore.kernel.org/r/20191218084301.627555-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: James Smart Signed-off-by: Martin K. Petersen commit 106f41f5a302cb1f36c7543fae6a05de12e96fa4 Author: Steven Rostedt (VMware) Date: Wed Dec 11 15:44:22 2019 -0500 tracing: Have the histogram compare functions convert to u64 first The compare functions of the histogram code would be specific for the size of the value being compared (byte, short, int, long long). It would reference the value from the array via the type of the compare, but the value was stored in a 64 bit number. This is fine for little endian machines, but for big endian machines, it would end up comparing zeros or all ones (depending on the sign) for anything but 64 bit numbers. To fix this, first derference the value as a u64 then convert it to the type being compared. Link: http://lkml.kernel.org/r/20191211103557.7bed6928@gandalf.local.home Cc: stable@vger.kernel.org Fixes: 08d43a5fa063e ("tracing: Add lock-free tracing_map") Acked-by: Tom Zanussi Reported-by: Sven Schnelle Signed-off-by: Steven Rostedt (VMware) commit 79e65c27f09683fbb50c33acab395d0ddf5302d2 Author: Keita Suzuki Date: Wed Dec 11 09:12:58 2019 +0000 tracing: Avoid memory leak in process_system_preds() When failing in the allocation of filter_item, process_system_preds() goes to fail_mem, where the allocated filter is freed. However, this leads to memory leak of filter->filter_string and filter->prog, which is allocated before and in process_preds(). This bug has been detected by kmemleak as well. Fix this by changing kfree to __free_fiter. unreferenced object 0xffff8880658007c0 (size 32): comm "bash", pid 579, jiffies 4295096372 (age 17.752s) hex dump (first 32 bytes): 63 6f 6d 6d 6f 6e 5f 70 69 64 20 20 3e 20 31 30 common_pid > 10 00 00 00 00 00 00 00 00 65 73 00 00 00 00 00 00 ........es...... backtrace: [<0000000067441602>] kstrdup+0x2d/0x60 [<00000000141cf7b7>] apply_subsystem_event_filter+0x378/0x932 [<000000009ca32334>] subsystem_filter_write+0x5a/0x90 [<0000000072da2bee>] vfs_write+0xe1/0x240 [<000000004f14f473>] ksys_write+0xb4/0x150 [<00000000a968b4a0>] do_syscall_64+0x6d/0x1e0 [<000000001a189f40>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 unreferenced object 0xffff888060c22d00 (size 64): comm "bash", pid 579, jiffies 4295096372 (age 17.752s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 e8 d7 41 80 88 ff ff ...........A.... 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000b8c1b109>] process_preds+0x243/0x1820 [<000000003972c7f0>] apply_subsystem_event_filter+0x3be/0x932 [<000000009ca32334>] subsystem_filter_write+0x5a/0x90 [<0000000072da2bee>] vfs_write+0xe1/0x240 [<000000004f14f473>] ksys_write+0xb4/0x150 [<00000000a968b4a0>] do_syscall_64+0x6d/0x1e0 [<000000001a189f40>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 unreferenced object 0xffff888041d7e800 (size 512): comm "bash", pid 579, jiffies 4295096372 (age 17.752s) hex dump (first 32 bytes): 70 bc 85 97 ff ff ff ff 0a 00 00 00 00 00 00 00 p............... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000001e04af34>] process_preds+0x71a/0x1820 [<000000003972c7f0>] apply_subsystem_event_filter+0x3be/0x932 [<000000009ca32334>] subsystem_filter_write+0x5a/0x90 [<0000000072da2bee>] vfs_write+0xe1/0x240 [<000000004f14f473>] ksys_write+0xb4/0x150 [<00000000a968b4a0>] do_syscall_64+0x6d/0x1e0 [<000000001a189f40>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Link: http://lkml.kernel.org/r/20191211091258.11310-1-keitasuzuki.park@sslab.ics.keio.ac.jp Cc: Ingo Molnar Cc: stable@vger.kernel.org Fixes: 404a3add43c9c ("tracing: Only add filter list when needed") Signed-off-by: Keita Suzuki Signed-off-by: Steven Rostedt (VMware) commit 0fd260056ef84ede8f444c66a3820811691fe884 Merge: 6fa9a115fe7c 3123d8018d46 Author: David S. Miller Date: Thu Dec 19 14:20:47 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-12-19 The following pull-request contains BPF updates for your *net* tree. We've added 10 non-merge commits during the last 8 day(s) which contain a total of 21 files changed, 269 insertions(+), 108 deletions(-). The main changes are: 1) Fix lack of synchronization between xsk wakeup and destroying resources used by xsk wakeup, from Maxim Mikityanskiy. 2) Fix pruning with tail call patching, untrack programs in case of verifier error and fix a cgroup local storage tracking bug, from Daniel Borkmann. 3) Fix clearing skb->tstamp in bpf_redirect() when going from ingress to egress which otherwise cause issues e.g. on fq qdisc, from Lorenz Bauer. 4) Fix compile warning of unused proc_dointvec_minmax_bpf_restricted() when only cBPF is present, from Alexander Lobakin. ==================== Signed-off-by: David S. Miller commit 3123d8018d4686cf193806c4e27a9853550ed895 Author: Daniel Borkmann Date: Thu Dec 19 22:19:51 2019 +0100 bpf: Add further test_verifier cases for record_func_key Expand dummy prog generation such that we can easily check on return codes and add few more test cases to make sure we keep on tracking pruning behavior. # ./test_verifier [...] #1066/p XDP pkt read, pkt_data <= pkt_meta', bad access 1 OK #1067/p XDP pkt read, pkt_data <= pkt_meta', bad access 2 OK Summary: 1580 PASSED, 0 SKIPPED, 0 FAILED Also verified that JIT dump of added test cases looks good. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/df7200b6021444fd369376d227de917357285b65.1576789878.git.daniel@iogearbox.net commit cc52d9140aa920d8d61c7f6de3fff5fea6692ea9 Author: Daniel Borkmann Date: Thu Dec 19 22:19:50 2019 +0100 bpf: Fix record_func_key to perform backtracking on r3 While testing Cilium with /unreleased/ Linus' tree under BPF-based NodePort implementation, I noticed a strange BPF SNAT engine behavior from time to time. In some cases it would do the correct SNAT/DNAT service translation, but at a random point in time it would just stop and perform an unexpected translation after SYN, SYN/ACK and stack would send a RST back. While initially assuming that there is some sort of a race condition in BPF code, adding trace_printk()s for debugging purposes at some point seemed to have resolved the issue auto-magically. Digging deeper on this Heisenbug and reducing the trace_printk() calls to an absolute minimum, it turns out that a single call would suffice to trigger / not trigger the seen RST issue, even though the logic of the program itself remains unchanged. Turns out the single call changed verifier pruning behavior to get everything to work. Reconstructing a minimal test case, the incorrect JIT dump looked as follows: # bpftool p d j i 11346 0xffffffffc0cba96c: [...] 21: movzbq 0x30(%rdi),%rax 26: cmp $0xd,%rax 2a: je 0x000000000000003a 2c: xor %edx,%edx 2e: movabs $0xffff89cc74e85800,%rsi 38: jmp 0x0000000000000049 3a: mov $0x2,%edx 3f: movabs $0xffff89cc74e85800,%rsi 49: mov -0x224(%rbp),%eax 4f: cmp $0x20,%eax 52: ja 0x0000000000000062 54: add $0x1,%eax 57: mov %eax,-0x224(%rbp) 5d: jmpq 0xffffffffffff6911 62: mov $0x1,%eax [...] Hence, unexpectedly, JIT emitted a direct jump even though retpoline based one would have been needed since in line 2c and 3a we have different slot keys in BPF reg r3. Verifier log of the test case reveals what happened: 0: (b7) r0 = 14 1: (73) *(u8 *)(r1 +48) = r0 2: (71) r0 = *(u8 *)(r1 +48) 3: (15) if r0 == 0xd goto pc+4 R0_w=inv(id=0,umax_value=255,var_off=(0x0; 0xff)) R1=ctx(id=0,off=0,imm=0) R10=fp0 4: (b7) r3 = 0 5: (18) r2 = 0xffff89cc74d54a00 7: (05) goto pc+3 11: (85) call bpf_tail_call#12 12: (b7) r0 = 1 13: (95) exit from 3 to 8: R0_w=inv13 R1=ctx(id=0,off=0,imm=0) R10=fp0 8: (b7) r3 = 2 9: (18) r2 = 0xffff89cc74d54a00 11: safe processed 13 insns (limit 1000000) [...] Second branch is pruned by verifier since considered safe, but issue is that record_func_key() couldn't have seen the index in line 3a and therefore decided that emitting a direct jump at this location was okay. Fix this by reusing our backtracking logic for precise scalar verification in order to prevent pruning on the slot key. This means verifier will track content of r3 all the way backwards and only prune if both scalars were unknown in state equivalence check and therefore poisoned in the first place in record_func_key(). The range is [x,x] in record_func_key() case since the slot always would have to be constant immediate. Correct verification after fix: 0: (b7) r0 = 14 1: (73) *(u8 *)(r1 +48) = r0 2: (71) r0 = *(u8 *)(r1 +48) 3: (15) if r0 == 0xd goto pc+4 R0_w=invP(id=0,umax_value=255,var_off=(0x0; 0xff)) R1=ctx(id=0,off=0,imm=0) R10=fp0 4: (b7) r3 = 0 5: (18) r2 = 0x0 7: (05) goto pc+3 11: (85) call bpf_tail_call#12 12: (b7) r0 = 1 13: (95) exit from 3 to 8: R0_w=invP13 R1=ctx(id=0,off=0,imm=0) R10=fp0 8: (b7) r3 = 2 9: (18) r2 = 0x0 11: (85) call bpf_tail_call#12 12: (b7) r0 = 1 13: (95) exit processed 15 insns (limit 1000000) [...] And correct corresponding JIT dump: # bpftool p d j i 11 0xffffffffc0dc34c4: [...] 21: movzbq 0x30(%rdi),%rax 26: cmp $0xd,%rax 2a: je 0x000000000000003a 2c: xor %edx,%edx 2e: movabs $0xffff9928b4c02200,%rsi 38: jmp 0x0000000000000049 3a: mov $0x2,%edx 3f: movabs $0xffff9928b4c02200,%rsi 49: cmp $0x4,%rdx 4d: jae 0x0000000000000093 4f: and $0x3,%edx 52: mov %edx,%edx 54: cmp %edx,0x24(%rsi) 57: jbe 0x0000000000000093 59: mov -0x224(%rbp),%eax 5f: cmp $0x20,%eax 62: ja 0x0000000000000093 64: add $0x1,%eax 67: mov %eax,-0x224(%rbp) 6d: mov 0x110(%rsi,%rdx,8),%rax 75: test %rax,%rax 78: je 0x0000000000000093 7a: mov 0x30(%rax),%rax 7e: add $0x19,%rax 82: callq 0x000000000000008e 87: pause 89: lfence 8c: jmp 0x0000000000000087 8e: mov %rax,(%rsp) 92: retq 93: mov $0x1,%eax [...] Also explicitly adding explicit env->allow_ptr_leaks to fixup_bpf_calls() since backtracking is enabled under former (direct jumps as well, but use different test). In case of only tracking different map pointers as in c93552c443eb ("bpf: properly enforce index mask to prevent out-of-bounds speculation"), pruning cannot make such short-cuts, neither if there are paths with scalar and non-scalar types as r3. mark_chain_precision() is only needed after we know that register_is_const(). If it was not the case, we already poison the key on first path and non-const key in later paths are not matching the scalar range in regsafe() either. Cilium NodePort testing passes fine as well now. Note, released kernels not affected. Fixes: d2e4c1e6c294 ("bpf: Constant map key tracking for prog array pokes") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/ac43ffdeb7386c5bd688761ed266f3722bb39823.1576789878.git.daniel@iogearbox.net commit 1148f9adbe71415836a18a36c1b4ece999ab0973 Author: Alexander Lobakin Date: Wed Dec 18 12:18:21 2019 +0300 net, sysctl: Fix compiler warning when only cBPF is present proc_dointvec_minmax_bpf_restricted() has been firstly introduced in commit 2e4a30983b0f ("bpf: restrict access to core bpf sysctls") under CONFIG_HAVE_EBPF_JIT. Then, this ifdef has been removed in ede95a63b5e8 ("bpf: add bpf_jit_limit knob to restrict unpriv allocations"), because a new sysctl, bpf_jit_limit, made use of it. Finally, this parameter has become long instead of integer with fdadd04931c2 ("bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K") and thus, a new proc_dolongvec_minmax_bpf_restricted() has been added. With this last change, we got back to that proc_dointvec_minmax_bpf_restricted() is used only under CONFIG_HAVE_EBPF_JIT, but the corresponding ifdef has not been brought back. So, in configurations like CONFIG_BPF_JIT=y && CONFIG_HAVE_EBPF_JIT=n since v4.20 we have: CC net/core/sysctl_net_core.o net/core/sysctl_net_core.c:292:1: warning: ‘proc_dointvec_minmax_bpf_restricted’ defined but not used [-Wunused-function] 292 | proc_dointvec_minmax_bpf_restricted(struct ctl_table *table, int write, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppress this by guarding it with CONFIG_HAVE_EBPF_JIT again. Fixes: fdadd04931c2 ("bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K") Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191218091821.7080-1-alobakin@dlink.ru commit 7e0165b2f1a912a06e381e91f0f4e495f4ac3736 Merge: 5f096c0ecd53 045f6d7942be Author: Linus Torvalds Date: Thu Dec 19 08:13:04 2019 -0800 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "6 fixes" * emailed patches from Andrew Morton : lib/Kconfig.debug: fix some messed up configurations mm: vmscan: protect shrinker idr replace with CONFIG_MEMCG kasan: don't assume percpu shadow allocations will succeed kasan: use apply_to_existing_page_range() for releasing vmalloc shadow mm/memory.c: add apply_to_existing_page_range() helper kasan: fix crashes on access to memory mapped by vm_map_ram() commit 5f096c0ecd53263a94124bdfa516a29f154e44ed Merge: 4a94c4332334 505b308b6944 Author: Linus Torvalds Date: Thu Dec 19 08:09:43 2019 -0800 Merge tag 'pm-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix a problem related to CPU offline/online and cpufreq governors that in some system configurations may lead to a system-wide deadlock during CPU online" * tag 'pm-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: Avoid leaving stale IRQ work items during CPU offline commit 13eaec4b2adf2657b8167b67e27c97cc7314d923 Author: Darrick J. Wong Date: Wed Dec 11 13:19:06 2019 -0800 xfs: don't commit sunit/swidth updates to disk if that would cause repair failures Alex Lyakas reported[1] that mounting an xfs filesystem with new sunit and swidth values could cause xfs_repair to fail loudly. The problem here is that repair calculates the where mkfs should have allocated the root inode, based on the superblock geometry. The allocation decisions depend on sunit, which means that we really can't go updating sunit if it would lead to a subsequent repair failure on an otherwise correct filesystem. Port from xfs_repair some code that computes the location of the root inode and teach mount to skip the ondisk update if it would cause problems for repair. Along the way we'll update the documentation, provide a function for computing the minimum AGFL size instead of open-coding it, and cut down some indenting in the mount code. Note that we allow the mount to proceed (and new allocations will reflect this new geometry) because we've never screened this kind of thing before. We'll have to wait for a new future incompat feature to enforce correct behavior, alas. Note that the geometry reporting always uses the superblock values, not the incore ones, so that is what xfs_info and xfs_growfs will report. [1] https://lore.kernel.org/linux-xfs/20191125130744.GA44777@bfoster/T/#m00f9594b511e076e2fcdd489d78bc30216d72a7d Reported-by: Alex Lyakas Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 4f5b1b3a8fa07dc8ecedfaf539b3deed8931a73e Author: Darrick J. Wong Date: Wed Dec 18 11:13:16 2019 -0800 xfs: split the sunit parameter update into two parts If the administrator provided a sunit= mount option, we need to validate the raw parameter, convert the mount option units (512b blocks) into the internal unit (fs blocks), and then validate that the (now cooked) parameter doesn't screw anything up on disk. The incore inode geometry computation can depend on the new sunit option, but a subsequent patch will make validating the cooked value depends on the computed inode geometry, so break the sunit update into two steps. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 1cac233cfe71f21e069705a4930c18e48d897be6 Author: Darrick J. Wong Date: Wed Dec 18 11:09:55 2019 -0800 xfs: refactor agfl length computation function Refactor xfs_alloc_min_freelist to accept a NULL @pag argument, in which case it returns the largest possible minimum length. This will be used in an upcoming patch to compute the length of the AGFL at mkfs time. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit af952aeb4a8717fe4c7a872d9699fcfa85aa9e1c Author: Darrick J. Wong Date: Mon Dec 16 11:14:09 2019 -0800 libxfs: resync with the userspace libxfs Prepare to resync the userspace libxfs with the kernel libxfs. There were a few things I missed -- a couple of static inline directory functions that have to be exported for xfs_repair; a couple of directory naming functions that make porting much easier if they're /not/ static inline; and a u16 usage that should have been uint16_t. None of these things are bugs in their own right; this just makes porting xfsprogs easier. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit 826f7e34130a4ce756138540170cbe935c537a47 Author: Brian Foster Date: Tue Dec 17 13:50:26 2019 -0800 xfs: use bitops interface for buf log item AIL flag check The xfs_log_item flags were converted to atomic bitops as of commit 22525c17ed ("xfs: log item flags are racy"). The assert check for AIL presence in xfs_buf_item_relse() still uses the old value based check. This likely went unnoticed as XFS_LI_IN_AIL evaluates to 0 and causes the assert to unconditionally pass. Fix up the check. Signed-off-by: Brian Foster Fixes: 22525c17ed ("xfs: log item flags are racy") Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ca8d0fa7cfb8abc4f623d49df210e0b81b32f626 Merge: e47304232b37 c0fdccfd226a Author: Daniel Borkmann Date: Thu Dec 19 16:20:49 2019 +0100 Merge branch 'bpf-fix-xsk-wakeup' Maxim Mikityanskiy says: ==================== This series addresses the issue described in the commit message of the first patch: lack of synchronization between XSK wakeup and destroying the resources used by XSK wakeup. The idea is similar to napi_synchronize. The series contains fixes for the drivers that implement XSK. v2 incorporates changes suggested by Björn: 1. Call synchronize_rcu in Intel drivers only if the XDP program is being unloaded. 2. Don't forget rcu_read_lock when wakeup is called from xsk_poll. 3. Use xs->zc as the condition to call ndo_xsk_wakeup. ==================== Signed-off-by: Daniel Borkmann commit c0fdccfd226a1424683d3000d9e08384391210a2 Author: Maxim Mikityanskiy Date: Tue Dec 17 16:20:47 2019 +0000 net/ixgbe: Fix concurrency issues between config flow and XSK Use synchronize_rcu to wait until the XSK wakeup function finishes before destroying the resources it uses: 1. ixgbe_down already calls synchronize_rcu after setting __IXGBE_DOWN. 2. After switching the XDP program, call synchronize_rcu to let ixgbe_xsk_wakeup exit before the XDP program is freed. 3. Changing the number of channels brings the interface down. 4. Disabling UMEM sets __IXGBE_TX_DISABLED before closing hardware resources and resetting xsk_umem. Check that bit in ixgbe_xsk_wakeup to avoid using the XDP ring when it's already destroyed. synchronize_rcu is called from ixgbe_txrx_ring_disable. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191217162023.16011-5-maximmi@mellanox.com commit b3873a5be757b44d51af542a50a6f2a3b6f95284 Author: Maxim Mikityanskiy Date: Tue Dec 17 16:20:45 2019 +0000 net/i40e: Fix concurrency issues between config flow and XSK Use synchronize_rcu to wait until the XSK wakeup function finishes before destroying the resources it uses: 1. i40e_down already calls synchronize_rcu. On i40e_down either __I40E_VSI_DOWN or __I40E_CONFIG_BUSY is set. Check the latter in i40e_xsk_wakeup (the former is already checked there). 2. After switching the XDP program, call synchronize_rcu to let i40e_xsk_wakeup exit before the XDP program is freed. 3. Changing the number of channels brings the interface down (see i40e_prep_for_reset and i40e_pf_quiesce_all_vsi). 4. Disabling UMEM sets __I40E_CONFIG_BUSY, too. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191217162023.16011-4-maximmi@mellanox.com commit 9cf88808ad6a0f1e958e00abd9a081295fe6da0c Author: Maxim Mikityanskiy Date: Tue Dec 17 16:20:44 2019 +0000 net/mlx5e: Fix concurrency issues between config flow and XSK After disabling resources necessary for XSK (the XDP program, channels, XSK queues), use synchronize_rcu to wait until the XSK wakeup function finishes, before freeing the resources. Suspend XSK wakeups during switching channels. If the XDP program is being removed, synchronize_rcu before closing the old channels to allow XSK wakeup to complete. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191217162023.16011-3-maximmi@mellanox.com commit 06870682087b58398671e8cdc896cd62314c4399 Author: Maxim Mikityanskiy Date: Tue Dec 17 16:20:42 2019 +0000 xsk: Add rcu_read_lock around the XSK wakeup The XSK wakeup callback in drivers makes some sanity checks before triggering NAPI. However, some configuration changes may occur during this function that affect the result of those checks. For example, the interface can go down, and all the resources will be destroyed after the checks in the wakeup function, but before it attempts to use these resources. Wrap this callback in rcu_read_lock to allow driver to synchronize_rcu before actually destroying the resources. xsk_wakeup is a new function that encapsulates calling ndo_xsk_wakeup wrapped into the RCU lock. After this commit, xsk_poll starts using xsk_wakeup and checks xs->zc instead of ndo_xsk_wakeup != NULL to decide ndo_xsk_wakeup should be called. It also fixes a bug introduced with the need_wakeup feature: a non-zero-copy socket may be used with a driver supporting zero-copy, and in this case ndo_xsk_wakeup should not be called, so the xs->zc check is the correct one. Fixes: 77cd0d7b3f25 ("xsk: add support for need_wakeup flag in AF_XDP rings") Signed-off-by: Maxim Mikityanskiy Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191217162023.16011-2-maximmi@mellanox.com commit 505b308b6944a91fa8437a3fd9f2dab29b5c3c88 Merge: 4c84515da809 85572c2c4a45 Author: Rafael J. Wysocki Date: Thu Dec 19 16:10:52 2019 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: Avoid leaving stale IRQ work items during CPU offline commit 833a20b8d4924b63ef7700e43fe4941963002822 Author: Eugeniy Paltsev Date: Thu Dec 19 16:30:40 2019 +0300 ARC: asm-offsets: remove duplicate entry We define 'PT_user_r25' twice in asm-offsets.c It's not a big issue as we define it to the same value, however let's fix it. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 33328bfab892d676920abb440d41fbf4b16c2717 Author: Stanislaw Gruszka Date: Thu Dec 19 10:35:59 2019 +0100 MAINTAINERS: change Gruszka's email address My RedHat email address does not work any longer. Change to my private one. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 306d5acbfc66e7cccb4d8f91fc857206b8df80d1 Author: Pan Zhang Date: Thu Dec 19 10:45:30 2019 +0800 drivers/hid/hid-multitouch.c: fix a possible null pointer access. 1002 if ((quirks & MT_QUIRK_IGNORE_DUPLICATES) && mt) { 1003 struct input_mt_slot *i_slot = &mt->slots[slotnum]; 1004 1005 if (input_mt_is_active(i_slot) && 1006 input_mt_is_used(mt, i_slot)) 1007 return -EAGAIN; 1008 } We previously assumed 'mt' could be null (see line 1002). The following situation is similar, so add a judgement. Signed-off-by: Pan Zhang Signed-off-by: Benjamin Tissoires commit 66c5d718e5a6f80153b5e8d6ad8ba8e9c3320839 Author: Kailang Yang Date: Mon Dec 9 15:56:15 2019 +0800 ALSA: hda/realtek - Add headset Mic no shutup for ALC283 Chrome machine had humming noise from external speaker plugin at codec D3 state. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/2692449396954c6c968f5b75e2660358@realtek.com Signed-off-by: Takashi Iwai commit f667216c5c7c967c3e568cdddefb51fe606bfe26 Author: Yangbo Lu Date: Thu Dec 19 11:23:35 2019 +0800 mmc: sdhci-of-esdhc: re-implement erratum A-009204 workaround The erratum A-009204 workaround patch was reverted because of incorrect implementation. 8b6dc6b mmc: sdhci-of-esdhc: Revert "mmc: sdhci-of-esdhc: add erratum A-009204 support" This patch is to re-implement the workaround (add a 5 ms delay before setting SYSCTL[RSTD] to make sure all the DMA transfers are finished). Signed-off-by: Yangbo Lu Link: https://lore.kernel.org/r/20191219032335.26528-1-yangbo.lu@nxp.com Fixes: 5dd195522562 ("mmc: sdhci-of-esdhc: add erratum A-009204 support") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 781d8cea68ac41d11a80df2a5f5babd584f86447 Author: Jeffrey Hugo Date: Tue Dec 17 09:19:05 2019 -0800 clk: qcom: Avoid SMMU/cx gdsc corner cases Mark the msm8998 cpu CX gdsc as votable and use the hw control to avoid corner cases with SMMU per hardware documentation. Fixes: 3f7df5baa259 ("clk: qcom: Add MSM8998 GPU Clock Controller (GPUCC) driver") Signed-off-by: Jeffrey Hugo Link: https://lkml.kernel.org/r/20191217171905.5619-1-jeffrey.l.hugo@gmail.com Signed-off-by: Stephen Boyd commit 8d20c39f063ed33012d7461c77fd5b89665e5163 Author: Matthias Kaehlcke Date: Wed Dec 4 12:04:12 2019 -0800 clk: qcom: gcc-sc7180: Fix setting flag for votable GDSCs Commit 17269568f7267 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180") sets the VOTABLE flag in .pwrsts, but it needs to be set in .flags, fix this. Fixes: 17269568f7267 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180") Signed-off-by: Matthias Kaehlcke Link: https://lkml.kernel.org/r/20191204120341.1.I9971817e83ee890d1096c43c5a6ce6ced53d5bd3@changeid Signed-off-by: Stephen Boyd commit 4a94c43323342f1522034d6566c5129a7386a0ab Merge: 80a0c2e511a9 1760eb689ed6 Author: Linus Torvalds Date: Wed Dec 18 17:17:36 2019 -0800 Merge tag 'tpmdd-next-20191219' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpm fixes from Jarkko Sakkinen: "Bunch of fixes for rc3" * tag 'tpmdd-next-20191219' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm/tpm_ftpm_tee: add shutdown call back tpm: selftest: cleanup after unseal with wrong auth/policy test tpm: selftest: add test covering async mode tpm: fix invalid locking in NONBLOCKING mode security: keys: trusted: fix lost handle flush tpm_tis: reserve chip for duration of tpm_tis_core_init KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails KEYS: remove CONFIG_KEYS_COMPAT commit 1760eb689ed68c6746744aff2092bff57c78d907 Author: Pavel Tatashin Date: Wed Dec 4 10:40:38 2019 -0500 tpm/tpm_ftpm_tee: add shutdown call back Add shutdown call back to close existing session with fTPM TA to support kexec scenario. Add parentheses to function names in comments as specified in kdoc. Signed-off-by: Thirupathaiah Annapureddy Signed-off-by: Pavel Tatashin Reviewed-by: Jarkko Sakkinen Tested-by: Sasha Levin Signed-off-by: Jarkko Sakkinen commit 84c92365b20a44c363b95390ea00dfbdd786f031 Author: Chuhong Yuan Date: Mon Nov 18 19:39:55 2019 +0800 drm/exynos: gsc: add missed component_del The driver forgets to call component_del in remove to match component_add in probe. Add the missed call to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Inki Dae commit f596cf0d8062cb5d0a4513a8b3afca318c13be10 Author: Alexander Lobakin Date: Fri Dec 6 11:07:41 2019 +0300 MIPS: BPF: eBPF JIT: check for MIPS ISA compliance in Kconfig It is completely wrong to check for compile-time MIPS ISA revision in the body of bpf_int_jit_compile() as it may lead to get MIPS JIT fully omitted by the CC while the rest system will think that the JIT is actually present and works [1]. We can check if the selected CPU really supports MIPS eBPF JIT at configure time and avoid such situations when kernel can be built without both JIT and interpreter, but with CONFIG_BPF_SYSCALL=y. [1] https://lore.kernel.org/linux-mips/09d713a59665d745e21d021deeaebe0a@dlink.ru/ Fixes: 716850ab104d ("MIPS: eBPF: Initial eBPF support for MIPS32 architecture.") Cc: # v5.2+ Signed-off-by: Alexander Lobakin Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Hassan Naveed Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: Andrii Nakryiko Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Cc: bpf@vger.kernel.org commit f8fffebdea752a25757b906f3dffecf1a59a6194 Author: Paul Burton Date: Thu Dec 5 10:23:18 2019 -0800 MIPS: BPF: Disable MIPS32 eBPF JIT Commit 716850ab104d ("MIPS: eBPF: Initial eBPF support for MIPS32 architecture.") enabled our eBPF JIT for MIPS32 kernels, whereas it has previously only been availailable for MIPS64. It was my understanding at the time that the BPF test suite was passing & JITing a comparable number of tests to our cBPF JIT [1], but it turns out that was not the case. The eBPF JIT has a number of problems on MIPS32: - Most notably various code paths still result in emission of MIPS64 instructions which will cause reserved instruction exceptions & kernel panics when run on MIPS32 CPUs. - The eBPF JIT doesn't account for differences between the O32 ABI used by MIPS32 kernels versus the N64 ABI used by MIPS64 kernels. Notably arguments beyond the first 4 are passed on the stack in O32, and this is entirely unhandled when JITing a BPF_CALL instruction. Stack space must be reserved for arguments even if they all fit in registers, and the callee is free to assume that stack space has been reserved for its use - with the eBPF JIT this is not the case, so calling any function can result in clobbering values on the stack & unpredictable behaviour. Function arguments in eBPF are always 64-bit values which is also entirely unhandled - the JIT still uses a single (32-bit) register per argument. As a result all function arguments are always passed incorrectly when JITing a BPF_CALL instruction, leading to kernel crashes or strange behavior. - The JIT attempts to bail our on use of ALU64 instructions or 64-bit memory access instructions. The code doing this at the start of build_one_insn() incorrectly checks whether BPF_OP() equals BPF_DW, when it should really be checking BPF_SIZE() & only doing so when BPF_CLASS() is one of BPF_{LD,LDX,ST,STX}. This results in false positives that cause more bailouts than intended, and that in turns hides some of the problems described above. - The kernel's cBPF->eBPF translation makes heavy use of 64-bit eBPF instructions that the MIPS32 eBPF JIT bails out on, leading to most cBPF programs not being JITed at all. Until these problems are resolved, revert the enabling of the eBPF JIT on MIPS32 done by commit 716850ab104d ("MIPS: eBPF: Initial eBPF support for MIPS32 architecture."). Note that this does not undo the changes made to the eBPF JIT by that commit, since they are a useful starting point to providing MIPS32 support - they're just not nearly complete. [1] https://lore.kernel.org/linux-mips/MWHPR2201MB13583388481F01A422CE7D66D4410@MWHPR2201MB1358.namprd22.prod.outlook.com/ Signed-off-by: Paul Burton Fixes: 716850ab104d ("MIPS: eBPF: Initial eBPF support for MIPS32 architecture.") Cc: Daniel Borkmann Cc: Hassan Naveed Cc: Tony Ambardar Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Cc: # v5.2+ Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit a4a3893114a41e365274d5fab5d9ff5acc235ff0 Author: Jouni Hogander Date: Mon Dec 9 14:37:07 2019 +0200 MIPS: Prevent link failure with kcov instrumentation __sanitizer_cov_trace_pc() is not linked in and causing link failure if KCOV_INSTRUMENT is enabled. Fix this by disabling instrumentation for compressed image. Signed-off-by: Jouni Hogander Signed-off-by: Paul Burton Cc: Lukas Bulwahn Cc: linux-mips@vger.kernel.org commit b4adfe55915d8363e244e42386d69567db1719b9 Author: Vasily Gorbik Date: Tue Dec 10 13:50:23 2019 +0100 s390/ftrace: save traced function caller A typical backtrace acquired from ftraced function currently looks like the following (e.g. for "path_openat"): arch_stack_walk+0x15c/0x2d8 stack_trace_save+0x50/0x68 stack_trace_call+0x15a/0x3b8 ftrace_graph_caller+0x0/0x1c 0x3e0007e3c98 <- ftraced function caller (should be do_filp_open+0x7c/0xe8) do_open_execat+0x70/0x1b8 __do_execve_file.isra.0+0x7d8/0x860 __s390x_sys_execve+0x56/0x68 system_call+0xdc/0x2d8 Note random "0x3e0007e3c98" stack value as ftraced function caller. This value causes either imprecise unwinder result or unwinding failure. That "0x3e0007e3c98" comes from r14 of ftraced function stack frame, which it haven't had a chance to initialize since the very first instruction calls ftrace code ("ftrace_caller"). (ftraced function might never save r14 as well). Nevertheless according to s390 ABI any function is called with stack frame allocated for it and r14 contains return address. "ftrace_caller" itself is called with "brasl %r0,ftrace_caller". So, to fix this issue simply always save traced function caller onto ftraced function stack frame. Reported-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit eef06cbf670aaa2ccb56c9a7b84042acd657aa5d Author: Vasily Gorbik Date: Wed Dec 11 17:27:31 2019 +0100 s390/unwind: stop gracefully at user mode pt_regs in irq stack Consider reaching user mode pt_regs at the bottom of irq stack graceful unwinder termination. This is the case when irq/mcck/ext interrupt arrives while in user mode. Signed-off-by: Vasily Gorbik commit c23587c92f6e3260fe3b82bb75b38aa2553b9468 Author: Christian Borntraeger Date: Wed Dec 18 09:34:57 2019 +0100 s390/purgatory: do not build purgatory with kcov, kasan and friends the purgatory must not rely on functions from the "old" kernel, so we must disable kasan and friends. We also need to have a separate copy of string.c as the default does not build memcmp with KASAN. Reported-by: kbuild test robot Signed-off-by: Christian Borntraeger Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit cd92ac253063981c96abfc3fdb326e430bd89ea6 Author: Hans de Goede Date: Thu Dec 12 21:53:04 2019 +0100 s390/purgatory: Make sure we fail the build if purgatory has missing symbols Since we link purgatory with -r aka we enable "incremental linking" no checks for unresolved symbols are done while linking the purgatory. This commit adds an extra check for unresolved symbols by calling ld without -r before running objcopy to generate purgatory.ro. This will help us catch missing symbols in the purgatory sooner. Note this commit also removes --no-undefined from LDFLAGS_purgatory as that has no effect. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/lkml/20191212205304.191610-1-hdegoede@redhat.com Tested-by: Philipp Rudo Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik commit 6feeee8efc53035c3195b02068b58ae947538aa4 Author: Sven Schnelle Date: Mon Dec 9 09:03:12 2019 +0100 s390/ftrace: fix endless recursion in function_graph tracer The following sequence triggers a kernel stack overflow on s390x: mount -t tracefs tracefs /sys/kernel/tracing cd /sys/kernel/tracing echo function_graph > current_tracer [crash] This is because preempt_count_{add,sub} are in the list of traced functions, which can be demonstrated by: echo preempt_count_add >set_ftrace_filter echo function_graph > current_tracer [crash] The stack overflow happens because get_tod_clock_monotonic() gets called by ftrace but itself calls preempt_{disable,enable}(), which leads to a endless recursion. Fix this by using preempt_{disable,enable}_notrace(). Fixes: 011620688a71 ("s390/time: ensure get_clock_monotonic() returns monotonic values") Signed-off-by: Sven Schnelle Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit 57177d214ee0816c4436c23d6c933ccb32c571f1 Author: Stefan Mavrodiev Date: Tue Dec 17 14:46:32 2019 +0200 drm/sun4i: hdmi: Remove duplicate cleanup calls When the HDMI unbinds drm_connector_cleanup() and drm_encoder_cleanup() are called. This also happens when the connector and the encoder are destroyed. This double call triggers a NULL pointer exception. The patch fixes this by removing the cleanup calls in the unbind function. Cc: Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support") Signed-off-by: Stefan Mavrodiev Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191217124632.20820-1-stefan@olimex.com commit c7b305267eb77fe47498676e9337324c9653494c Author: Chen-Yu Tsai Date: Wed Dec 18 11:04:31 2019 +0800 clk: sunxi-ng: r40: Allow setting parent rate for external clock outputs One of the uses of the external clock outputs is to provide a stable 32768 Hz clock signal to WiFi and Bluetooth chips. On the R40, the RTC has an internal RC oscillator that is muxed with the external crystal. Allow setting the parent rate for the external clock outputs so that requests for 32768 Hz get passed to the RTC's clock driver to mux in the external crystal if it isn't already muxed correctly. Fixes: cd030a78f7aa ("clk: sunxi-ng: support R40 SoC") Fixes: 01a7ea763fc4 ("clk: sunxi-ng: r40: Force LOSC parent to RTC LOSC output") Cc: Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 6fa9a115fe7ca507ef5618eb753706425741b285 Merge: b7ac893652ca 4772f26db8d1 Author: David S. Miller Date: Wed Dec 18 12:04:18 2019 -0800 Merge branch 'stmmac-fixes' Jose Abreu says: ==================== net: stmmac: Fixes for -net Fixes for stmmac. 1) Fixes the filtering selftests (again) for cases when the number of multicast filters are not enough. 2) Fixes SPH feature for MTU > default. 3) Fixes the behavior of accepting invalid MTU values. 4) Fixes FCS stripping for multi-descriptor packets. 5) Fixes the change of RX buffer size in XGMAC. 6) Fixes RX buffer size alignment. 7) Fixes the 16KB buffer alignment. 8) Fixes the enabling of 16KB buffer size feature. 9) Always arm the TX coalesce timer so that missed interrupts do not cause a TX queue timeout. ==================== Signed-off-by: David S. Miller commit 4772f26db8d1fb568c4862c538344a1b5fb52081 Author: Jose Abreu Date: Wed Dec 18 11:17:43 2019 +0100 net: stmmac: Always arm TX Timer at end of transmission start If TX Coalesce timer is enabled we should always arm it, otherwise we may hit the case where an interrupt is missed and the TX Queue will timeout. Arming the timer does not necessarly mean it will run the tx_clean() because this function is wrapped around NAPI launcher. Fixes: 9125cdd1be11 ("stmmac: add the initial tx coalesce schema") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit b2f3a481c4cd62f78391b836b64c0a6e72b503d2 Author: Jose Abreu Date: Wed Dec 18 11:17:42 2019 +0100 net: stmmac: Enable 16KB buffer size XGMAC supports maximum MTU that can go to 16KB. Lets add this check in the calculation of RX buffer size. Fixes: 7ac6653a085b ("stmmac: Move the STMicroelectronics driver") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 8605131747e7e1fd8f6c9f97a00287aae2b2c640 Author: Jose Abreu Date: Wed Dec 18 11:17:41 2019 +0100 net: stmmac: 16KB buffer must be 16 byte aligned The 16KB RX Buffer must also be 16 byte aligned. Fix it. Fixes: 7ac6653a085b ("stmmac: Move the STMicroelectronics driver") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 8d558f0294fe92e04af192e221d0d0f6a180ee7b Author: Jose Abreu Date: Wed Dec 18 11:17:40 2019 +0100 net: stmmac: RX buffer size must be 16 byte aligned We need to align the RX buffer size to at least 16 byte so that IP doesn't mis-behave. This is required by HW. Changes from v2: - Align UP and not DOWN (David) Fixes: 7ac6653a085b ("stmmac: Move the STMicroelectronics driver") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 11d55fd9975f8e46a0e5e19c14899544e81e1e15 Author: Jose Abreu Date: Wed Dec 18 11:17:39 2019 +0100 net: stmmac: xgmac: Clear previous RX buffer size When switching between buffer sizes we need to clear the previous value. Fixes: d6ddfacd95c7 ("net: stmmac: Add DMA related callbacks for XGMAC2") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 93b5dce401ccd4a688fe1f0d0bf0d97e63cdf921 Author: Jose Abreu Date: Wed Dec 18 11:17:38 2019 +0100 net: stmmac: Only the last buffer has the FCS field Only the last received buffer contains the FCS field. Check for end of packet before trying to strip the FCS field. Fixes: 88ebe2cf7f3f ("net: stmmac: Rework stmmac_rx()") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit eaf4fac478077d4ed57cbca2c044c4b58a96bd98 Author: Jose Abreu Date: Wed Dec 18 11:17:37 2019 +0100 net: stmmac: Do not accept invalid MTU values The maximum MTU value is determined by the maximum size of TX FIFO so that a full packet can fit in the FIFO. Add a check for this in the MTU change callback. Also check if provided and rounded MTU does not passes the maximum limit of 16K. Changes from v2: - Align MTU before checking if its valid Fixes: 7ac6653a085b ("stmmac: Move the STMicroelectronics driver") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 5d626c879e238be9585bd59a61eb606c9408178a Author: Jose Abreu Date: Wed Dec 18 11:17:36 2019 +0100 net: stmmac: Determine earlier the size of RX buffer Split Header feature needs to know the size of RX buffer but current code is determining it too late. Fix this by moving the RX buffer computation to earlier stage. Changes from v2: - Do not try to align already aligned buffer size Fixes: 67afd6d1cfdf ("net: stmmac: Add Split Header support and enable it in XGMAC cores") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 08c965430869ed423921bd9058ae59f75207feb6 Author: Jose Abreu Date: Wed Dec 18 11:17:35 2019 +0100 net: stmmac: selftests: Needs to check the number of Multicast regs When running the MC and UC filter tests we setup a multicast address that its expected to be blocked. If the number of available multicast registers is zero, driver will always pass the multicast packets which will fail the test. Check if available multicast addresses is enough before running the tests. Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit f40ddaa059fdfb472e3aeb733c6220d8e0633a47 Author: Chen-Yu Tsai Date: Wed Dec 18 12:47:20 2019 +0800 regulator: axp20x: Fix AXP22x ELDO2 regulator enable bitmask A copy-paste error was introduced when bitmasks were converted to macros, incorrectly setting the enable bitmask for ELDO2 to the one for ELDO1 for the AXP22x units. Fix it by using the correct macro. On affected boards, ELDO1 and/or ELDO2 are used to power the camera, which is currently unsupported. Fixes: db4a555f7c4c ("regulator: axp20x: use defines for masks") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20191218044720.21990-1-wens@kernel.org Signed-off-by: Mark Brown commit b7ac893652cafadcf669f78452329727e4e255cc Author: Jia-Ju Bai Date: Wed Dec 18 17:21:55 2019 +0800 net: nfc: nci: fix a possible sleep-in-atomic-context bug in nci_uart_tty_receive() The kernel may sleep while holding a spinlock. The function call path (from bottom to top) in Linux 4.19 is: net/nfc/nci/uart.c, 349: nci_skb_alloc in nci_uart_default_recv_buf net/nfc/nci/uart.c, 255: (FUNC_PTR)nci_uart_default_recv_buf in nci_uart_tty_receive net/nfc/nci/uart.c, 254: spin_lock in nci_uart_tty_receive nci_skb_alloc(GFP_KERNEL) can sleep at runtime. (FUNC_PTR) means a function pointer is called. To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC for nci_skb_alloc(). This bug is found by a static analysis tool STCheck written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller commit 921162c81a089aa2f442103290f1af9ba281fc9f Author: Pierre-Louis Bossart Date: Tue Dec 17 18:05:17 2019 -0600 ASoC: SOF: Intel: hda: hda-dai: fix oops on hda_link .hw_free When the PCM_PARAM IPC fails while configuring the FE, the kernel oopses in the HDaudio link DMA .hw_free operation. The root cause is a NULL dma_data since the BE .hw_params was never called by the SOC core. This error can also happen if the HDaudio link DMA configuration IPC fails in the BE .hw_params. This patches makes sure the dma_data is properly saved in .hw_params, and tested before being use in hw_free. GitHub issue: https://github.com/thesofproject/linux/issues/1417 Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218000518.5830-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b06e46427f987bf83dcb6a69516b57276eb8ec0c Author: Kai Vehmanen Date: Tue Dec 17 18:05:16 2019 -0600 ASoC: SOF: fix fault at driver unload after failed probe If sof_machine_check() fails during driver probe, the IPC state is not initialized and this will lead to a NULL dereference at driver unload. Example log is as follows: [ 1535.980630] sof-audio-pci 0000:00:1f.3: error: no matching ASoC machine driver found - aborting probe [ 1535.980631] sof-audio-pci 0000:00:1f.3: error: failed to get machine info -19 [ 1535.980632] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -19 [ 1550.798373] BUG: kernel NULL pointer dereference, address: 0000000000000008 ... [ 1550.798393] Call Trace: [ 1550.798397] snd_sof_ipc_free+0x15/0x30 [snd_sof] [ 1550.798399] snd_sof_device_remove+0x29/0xa0 [snd_sof] [ 1550.798400] sof_pci_remove+0x10/0x30 [snd_sof_pci] Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218000518.5830-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fd6c2e4c063d64511657ad0031a1677b6a914859 Author: Jens Axboe Date: Wed Dec 18 12:19:41 2019 -0700 io_uring: io_wq_submit_work() should not touch req->rw I've been chasing a weird and obscure crash that was userspace stack corruption, and finally narrowed it down to a bit flip that made a stack address invalid. io_wq_submit_work() unconditionally flips the req->rw.ki_flags IOCB_NOWAIT bit, but since it's a generic work handler, this isn't valid. Normal read/write operations own that part of the request, on other types it could be something else. Move the IOCB_NOWAIT clear to the read/write handlers where it belongs. Signed-off-by: Jens Axboe commit 92adc96f8eecd9522a907c197cc3d62e405539fe Author: Hui Wang Date: Wed Dec 18 21:26:50 2019 +0800 ALSA: usb-audio: set the interface format after resume on Dell WD19 Recently we found the headset-mic on the Dell Dock WD19 doesn't work anymore after s3 (s2i or deep), this problem could be workarounded by closing (pcm_close) the app and then reopening (pcm_open) the app, so this bug is not easy to be detected by users. When problem happens, retire_capture_urb() could still be called periodically, but the size of captured data is always 0, it could be a firmware bug on the dock. Anyway I found after resuming, the snd_usb_pcm_prepare() will be called, and if we forcibly run set_format() to set the interface and its endpoint, the capture size will be normal again. This problem and workaound also apply to playback. To fix it in the kernel, add a quirk to let set_format() run forcibly once after resume. Signed-off-by: Hui Wang Cc: Link: https://lore.kernel.org/r/20191218132650.6303-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit e5e884b42639c74b5b57dc277909915c0aefc8bb Author: Wen Huang Date: Thu Nov 28 18:51:04 2019 +0800 libertas: Fix two buffer overflows at parsing bss descriptor add_ie_rates() copys rates without checking the length in bss descriptor from remote AP.when victim connects to remote attacker, this may trigger buffer overflow. lbs_ibss_join_existing() copys rates without checking the length in bss descriptor from remote IBSS node.when victim connects to remote attacker, this may trigger buffer overflow. Fix them by putting the length check before performing copy. This fix addresses CVE-2019-14896 and CVE-2019-14897. This also fix build warning of mixed declarations and code. Reported-by: kbuild test robot Signed-off-by: Wen Huang Signed-off-by: Kalle Valo commit b43e36d75e8727f78892652a25967a1ffa03d1d1 Author: Dan Carpenter Date: Tue Nov 26 07:49:56 2019 +0300 mt76: Off by one in mt76_calc_rx_airtime() The sband->bitrates[] array has "sband->n_bitrates" elements so this check needs to be >= instead of > or we could read beyond the end of the array. These values come from when we call mt76_register_device(): ret = mt76_register_device(&dev->mt76, true, mt7603_rates, ARRAY_SIZE(mt7603_rates)); Here sband->bitrates[] is mt7603_rates[] and ->n_bitrates is the ARRAY_SIZE() Fixes: 5ce09c1a7907 ("mt76: track rx airtime for airtime fairness and survey") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit 43522b78b590356bf0f83dc3e6b72d93f336b086 Merge: ea200dec5128 210de0e996ae Author: Olof Johansson Date: Wed Dec 18 10:39:10 2019 -0800 Merge tag 'socfpga_dts_fix_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/fixes arm64: dts: agilex/stratix10: fix pmu interrupt numbers - Fix incorrect PMU interrupts numbers on the Agilex/Stratix10 platforms * tag 'socfpga_dts_fix_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: agilex/stratix10: fix pmu interrupt numbers Link: https://lore.kernel.org/r/20191218161336.32377-1-dinguyen@kernel.org Signed-off-by: Olof Johansson commit d68f4e43a46ff1f772ff73085f96d44eb4163e9d Author: Arnd Bergmann Date: Mon Dec 16 14:18:42 2019 +0100 mt76: fix LED link time failure The mt76_led_cleanup() function is called unconditionally, which leads to a link error when CONFIG_LEDS is a loadable module or disabled but mt76 is built-in: drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_unregister_device': mac80211.c:(.text+0x2ac): undefined reference to `led_classdev_unregister' Use the same trick that is guarding the registration, using an IS_ENABLED() check for the CONFIG_MT76_LEDS symbol that indicates whether LEDs can be used or not. Fixes: 36f7e2b2bb1d ("mt76: do not use devm API for led classdev") Signed-off-by: Arnd Bergmann Acked-by: Felix Fietkau Signed-off-by: Kalle Valo commit 6056a0f8ede27b296d10ef46f7f677cc9d715371 Author: Guenter Roeck Date: Tue Dec 17 17:19:11 2019 -0800 usb: xhci: Fix build warning seen with CONFIG_PM=n The following build warning is seen if CONFIG_PM is disabled. drivers/usb/host/xhci-pci.c:498:13: warning: unused function 'xhci_pci_shutdown' Fixes: f2c710f7dca8 ("usb: xhci: only set D3hot for pci device") Cc: Henry Lin Cc: stable@vger.kernel.org # all stable releases with f2c710f7dca8 Signed-off-by: Guenter Roeck Acked-by: Mathias Nyman Link: https://lore.kernel.org/r/20191218011911.6907-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit c771256ee7a03d3fb3c0443319ae6249c455849d Author: Olof Johansson Date: Wed Dec 18 09:56:21 2019 -0800 clk: Move clk_core_reparent_orphans() under CONFIG_OF A recent addition exposed a helper that is only used for CONFIG_OF. Move it into the CONFIG_OF zone in this file to make the compiler stop warning about an unused function. Fixes: 66d9506440bb ("clk: walk orphan list on clock provider registration") Signed-off-by: Olof Johansson Link: https://lkml.kernel.org/r/20191217082501.424892072D@mail.kernel.org [sboyd@kernel.org: "Simply" move the function instead] Signed-off-by: Stephen Boyd commit 7c504e65206a4379ff38fe41d21b32b6c2c3e53e Author: Pavel Begunkov Date: Wed Dec 18 19:53:45 2019 +0300 io_uring: don't wait when under-submitting There is no reliable way to submit and wait in a single syscall, as io_submit_sqes() may under-consume sqes (in case of an early error). Then it will wait for not-yet-submitted requests, deadlocking the user in most cases. Don't wait/poll if can't submit all sqes Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 80a0c2e511a97e11d82e0ec11564e2c3fe624b0d Merge: 2187f215ebaa 7c497d799267 Author: Linus Torvalds Date: Wed Dec 18 08:54:15 2019 -0800 Merge tag 'sound-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A slightly high amount at this time, but all good and small fixes: - A PCM core fix that initializes the buffer properly for avoiding information leaks; it is a long-standing minor problem, but good to fix better now - A few ASoC core fixes for the init / cleanup ordering issues that surfaced after the recent refactoring - Lots of SOF and topology-related fixes went in, as usual as such hot topics - Several ASoC codec and platform-specific small fixes: wm89xx, realtek, and max98090, AMD, Intel-SST - A fix for the previous incomplete regression of HD-audio, now hitting Nvidia HDMI - A few HD-audio CA0132 codec fixes" * tag 'sound-5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (27 commits) ALSA: hda - Downgrade error message for single-cmd fallback ASoC: wm8962: fix lambda value ALSA: hda: Fix regression by strip mask fix ALSA: hda/ca0132 - Fix work handling in delayed HP detection ALSA: hda/ca0132 - Avoid endless loop ALSA: hda/ca0132 - Keep power on during processing DSP response ALSA: pcm: Avoid possible info leaks from PCM stream buffers ASoC: Intel: common: work-around incorrect ACPI HID for CML boards ASoC: SOF: Intel: split cht and byt debug window sizes ASoC: SOF: loader: fix snd_sof_fw_parse_ext_data ASoC: SOF: loader: snd_sof_fw_parse_ext_data log warning on unknown header ASoC: simple-card: Don't create separate link when platform is present ASoC: topology: Check return value for soc_tplg_pcm_create() ASoC: topology: Check return value for snd_soc_add_dai_link() ASoC: core: only flush inited work during free ASoC: Intel: bytcr_rt5640: Update quirk for Teclast X89 ASoC: core: Init pcm runtime work early to avoid warnings ASoC: Intel: sst: Add missing include ASoC: max98090: fix possible race conditions ASoC: max98090: exit workaround earlier if PLL is locked ... commit f5d5f5fae4605b66fd17e3c46feb14c6c3372e5c Merge: 8715f05269bf 6d674e28f642 Author: Paolo Bonzini Date: Wed Dec 18 17:47:38 2019 +0100 Merge tag 'kvmarm-fixes-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/arm fixes for .5.5, take #1 - Fix uninitialised sysreg accessor - Fix handling of demand-paged device mappings - Stop spamming the console on IMPDEF sysregs - Relax mappings of writable memslots - Assorted cleanups commit 8715f05269bfbc6453e25e80825d781a82902f8e Author: Jim Mattson Date: Fri Dec 13 16:15:16 2019 -0800 kvm: x86: Host feature SSBD doesn't imply guest feature AMD_SSBD The host reports support for the synthetic feature X86_FEATURE_SSBD when any of the three following hardware features are set: CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] CPUID.80000008H:EBX.AMD_SSBD[bit 24] CPUID.80000008H:EBX.VIRT_SSBD[bit 25] Either of the first two hardware features implies the existence of the IA32_SPEC_CTRL MSR, but CPUID.80000008H:EBX.VIRT_SSBD[bit 25] does not. Therefore, CPUID.80000008H:EBX.AMD_SSBD[bit 24] should only be set in the guest if CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] or CPUID.80000008H:EBX.AMD_SSBD[bit 24] is set on the host. Fixes: 4c6903a0f9d76 ("KVM: x86: fix reporting of AMD speculation bug CPUID leaf") Signed-off-by: Jim Mattson Reviewed-by: Jacob Xu Reviewed-by: Peter Shier Cc: Paolo Bonzini Cc: stable@vger.kernel.org Reported-by: Eric Biggers Signed-off-by: Paolo Bonzini commit 396d2e878f92ec108e4293f1c77ea3bc90b414ff Author: Jim Mattson Date: Fri Dec 13 16:15:15 2019 -0800 kvm: x86: Host feature SSBD doesn't imply guest feature SPEC_CTRL_SSBD The host reports support for the synthetic feature X86_FEATURE_SSBD when any of the three following hardware features are set: CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] CPUID.80000008H:EBX.AMD_SSBD[bit 24] CPUID.80000008H:EBX.VIRT_SSBD[bit 25] Either of the first two hardware features implies the existence of the IA32_SPEC_CTRL MSR, but CPUID.80000008H:EBX.VIRT_SSBD[bit 25] does not. Therefore, CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] should only be set in the guest if CPUID.(EAX=7,ECX=0):EDX.SSBD[bit 31] or CPUID.80000008H:EBX.AMD_SSBD[bit 24] is set on the host. Fixes: 0c54914d0c52a ("KVM: x86: use Intel speculation bugs and features as derived in generic x86 code") Signed-off-by: Jim Mattson Reviewed-by: Jacob Xu Reviewed-by: Peter Shier Cc: Paolo Bonzini Cc: stable@vger.kernel.org Reported-by: Eric Biggers Signed-off-by: Paolo Bonzini commit c18647900ec864d401ba09b3bbd5b34f331f8d26 Author: Robin Murphy Date: Mon Dec 9 19:47:25 2019 +0000 iommu/dma: Relax locking in iommu_dma_prepare_msi() Since commit ece6e6f0218b ("iommu/dma-iommu: Split iommu_dma_map_msi_msg() in two parts"), iommu_dma_prepare_msi() should no longer have to worry about preempting itself, nor being called in atomic context at all. Thus we can downgrade the IRQ-safe locking to a simple mutex to avoid angering the new might_sleep() check in iommu_map(). Reported-by: Qian Cai Tested-by: Jean-Philippe Brucker Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel commit 8ae4bcf4821c18a8fbfa0b2c1df26c1085e9d923 Author: Hanjun Guo Date: Wed Dec 11 14:43:06 2019 +0800 perf/smmuv3: Remove the leftover put_cpu() in error path In smmu_pmu_probe(), there is put_cpu() in the error path, which is wrong because we use raw_smp_processor_id() to get the cpu ID, not get_cpu(), remove it. While we are at it, kill 'out_cpuhp_err' altogether and just return err if we fail to add the hotplug instance. Acked-by: Robin Murphy Acked-by: Will Deacon Signed-off-by: Hanjun Guo Signed-off-by: Catalin Marinas commit f81b846dcd9a1e6d120f73970a9a98b7fcaaffba Author: Lu Baolu Date: Wed Nov 20 14:10:16 2019 +0800 iommu/vt-d: Remove incorrect PSI capability check The PSI (Page Selective Invalidation) bit in the capability register is only valid for second-level translation. Intel IOMMU supporting scalable mode must support page/address selective IOTLB invalidation for first-level translation. Remove the PSI capability check in SVA cache invalidation code. Fixes: 8744daf4b0699 ("iommu/vt-d: Remove global page flush support") Cc: Jacob Pan Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit c05c403b1d123031f86e65e867be2c2e9ee1e7e3 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:40 2019 +0000 staging: wfx: fix wrong error message The driver checks that the number of retries made by the device is coherent with the rate policy. However, this check make sense only if the device has returned RETRY_EXCEEDED. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-11-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 632441134d0f7428211cd2e9aa115b5e830b32b3 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:38 2019 +0000 staging: wfx: fix hif_set_mfp() with big endian hosts struct hif_mib_protected_mgmt_policy is an array of u8. There is no reason to swap its bytes. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-10-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1a6ae3edcd6ae03a7ea5c08856fe79717d96cfb5 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:37 2019 +0000 staging: wfx: detect race condition in WEP authentication Current code has a special case to handle association with WEP. Before to rework the tx data handling, let's try to detect any possible misuse of this code. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 2e12ab7f05093a8595782a598df20455f78a4264 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:36 2019 +0000 staging: wfx: ensure that retry policy always fallbacks to MCS0 / 1Mbps When not using HT mode, minstrel always includes 1Mbps as fallback rate. But, when using HT mode, this fallback is not included. Yet, it seems that it could save some frames. So, this patch add it unconditionally. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit cefc2033627f922e425e4b624b6a152df4ce29d7 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:34 2019 +0000 staging: wfx: fix rate control handling A tx_retry_policy (the equivalent of a list of ieee80211_tx_rate in hardware API) is not able to include a rate multiple time. So currently, the driver merges the identical rates from the policy provided by minstrel (and it try to do the best choice it can in the associated flags) before to sent it to firmware. Until now, when rates are merged, field "count" is set to max(count1, count2). But, it means that the sum of retries for all rates could be far less than initial number of retries. So, this patch changes the value of field "count" to count1 + count2. Thus, sum of all retries for all rates stay the same. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit fcde3e6ba57f754dcd87c9d56bb2b05dc1305486 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:33 2019 +0000 staging: wfx: firmware does not support more than 32 total retries The sum of all retries for a Tx frame cannot be superior to 32. There are 4 rates at most. So this patch limits number of retries per rate to 8. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d77280311d929887fa11b1c3345953f23c5742e2 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:32 2019 +0000 staging: wfx: use boolean appropriately The field 'uploaded' is used as a boolean, so call it a boolean. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 5eee614700e0dc06760bcf5aff840565637cddfc Author: Jérôme Pouiller Date: Tue Dec 17 16:14:30 2019 +0000 staging: wfx: fix counter overflow Some weird behaviors were observed when connection is really good and packets are small. It appears that sometime, number of packets in queues can exceed 255 and generate an overflow in field usage_count. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 89606bb3a9286a64bcdc2e58552edf6e2478c3bc Author: Jérôme Pouiller Date: Tue Dec 17 16:14:29 2019 +0000 staging: wfx: fix case of lack of tx_retry_policies In some rare cases, driver may not have any available tx_retry_policies. In this case, the driver asks to mac80211 to stop sending data. However, it seems that a race is possible and a few frames can be sent to the driver. In this case, driver can't wait for free tx_retry_policies since wfx_tx() must be atomic. So, this patch fix this case by sending these frames with the special policy number 15. The firmware normally use policy 15 to send internal frames (PS-poll, beacons, etc...). So, it is not a so bad fallback. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b0ac999ebe37c931e76fbdffffd7a5b77b2d788e Author: Jérôme Pouiller Date: Tue Dec 17 16:14:27 2019 +0000 staging: wfx: fix the cache of rate policies on interface reset Device and driver maintain a cache of rate policies (aka. tx_retry_policy in hardware API). When hif_reset() is sent to hardware, device resets its cache of rate policies. In order to keep driver in sync, it is necessary to do the same on driver. Note, when driver tries to use a rate policy that has not been defined on device, data is sent at 1Mbps. So, this patch should fix abnormal throughput observed sometime after a reset of the interface. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit fe4e940f0f91b4a506f048b42e00386f5ad322b6 Author: Jason Gerecke Date: Mon Dec 16 10:18:57 2019 -0800 HID: wacom: Recognize new MobileStudio Pro PID A new PID is in use for repaired MobileStudio Pro devices. Add it to the list of devices that need special-casing in wacom_wac_pad_event. Signed-off-by: Jason Gerecke Signed-off-by: Benjamin Tissoires commit abb33ee8a8c0d146b4b2c52937dc86a15ec92d05 Author: Even Xu Date: Tue Dec 17 09:11:18 2019 +0800 HID: intel-ish-hid: ipc: add CMP device id Add Comet Lake H into ishtp support list. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit 18a1b06e5b91d47dc86c0a66a762646ea7c5d141 Author: Dmitry Torokhov Date: Tue Dec 17 14:50:21 2019 -0800 HID: hiddev: fix mess in hiddev_open() The open method of hiddev handler fails to bring the device out of autosuspend state as was promised in 0361a28d3f9a, as it actually has 2 blocks that try to start the transport (call hid_hw_open()) with both being guarded by the "open" counter, so the 2nd block is never executed as the first block increments the counter so it is never at 0 when we check it for the second block. Additionally hiddev_open() was leaving counter incremented on errors, causing the device to never be reopened properly if there was ever an error. Let's fix all of this by factoring out code that creates client structure and powers up the device into a separate function that is being called from usbhid_open() with the "existancelock" being held. Fixes: 0361a28d3f9a ("HID: autosuspend support for USB HID") Signed-off-by: Dmitry Torokhov Signed-off-by: Benjamin Tissoires commit 8f268881d7d278047b00eed54bbb9288dbd6ab23 Author: Masahiro Yamada Date: Tue Dec 17 20:51:51 2019 +0900 kconfig: remove ---help--- from documentation Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over '---help---'"), scripts/checkpatch.pl warns the use of ---help---. Kconfig still supports ---help---, but new code should avoid using it. Let's stop advertising it in documentation. Signed-off-by: Masahiro Yamada commit 75d27ea1abf7af3cc2cdec3513e74f52191605c8 Author: Adrian Hunter Date: Tue Dec 17 11:53:49 2019 +0200 mmc: sdhci: Add a quirk for broken command queuing Command queuing has been reported broken on some systems based on Intel GLK. A separate patch disables command queuing in some cases. This patch adds a quirk for broken command queuing, which enables users with problems to disable command queuing using sdhci module parameters for quirks. Fixes: 8ee82bda230f ("mmc: sdhci-pci: Add CQHCI support for Intel GLK") Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191217095349.14592-2-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit bedf9fc01ff1f40cfd1a79ccacedd9f3cd8e652a Author: Adrian Hunter Date: Tue Dec 17 11:53:48 2019 +0200 mmc: sdhci: Workaround broken command queuing on Intel GLK Command queuing has been reported broken on some Lenovo systems based on Intel GLK. This is likely a BIOS issue, so disable command queuing for Intel GLK if the BIOS vendor string is "LENOVO". Fixes: 8ee82bda230f ("mmc: sdhci-pci: Add CQHCI support for Intel GLK") Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191217095349.14592-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit fe0acab448f68c3146235afe03fb932e242ec94c Author: Yangbo Lu Date: Mon Dec 16 11:18:42 2019 +0800 mmc: sdhci-of-esdhc: fix P2020 errata handling Two previous patches introduced below quirks for P2020 platforms. - SDHCI_QUIRK_RESET_AFTER_REQUEST - SDHCI_QUIRK_BROKEN_TIMEOUT_VAL The patches made a mistake to add them in quirks2 of sdhci_host structure, while they were defined for quirks. host->quirks2 |= SDHCI_QUIRK_RESET_AFTER_REQUEST; host->quirks2 |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; This patch is to fix them. host->quirks |= SDHCI_QUIRK_RESET_AFTER_REQUEST; host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; Fixes: 05cb6b2a66fa ("mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support") Fixes: a46e42712596 ("mmc: sdhci-of-esdhc: add erratum eSDHC5 support") Signed-off-by: Yangbo Lu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191216031842.40068-1-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit 78d75f5739c457ff37cfe5adab1c01bc1f3375e2 Merge: f0f3a6cecf3b 5e822e44cece Author: Joonas Lahtinen Date: Wed Dec 18 11:01:41 2019 +0200 Merge tag 'gvt-fixes-2019-12-18' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2019-12-18 - vGPU state setting locking fix (Zhenyu) - Fix vGPU display dmabuf as read-only (Zhenyu) - Properly handle vGPU display dmabuf page pin when rendering (Tina) - Fix one guest boot warning to handle guc reset state (Fred) Signed-off-by: Joonas Lahtinen From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20191218051657.GA21662@zhen-hp.sh.intel.com commit f0f3a6cecf3b98990985cd42f7bf5a0313894822 Author: Tvrtko Ursulin Date: Tue Dec 17 17:09:33 2019 +0000 drm/i915: Fix pid leak with banned clients Get_pid_task() needs to be paired with a put_pid or we leak a pid reference every time a banned client tries to create a context. v2: * task_pid_nr helper exists! (Chris) Signed-off-by: Tvrtko Ursulin Fixes: b083a0870c79 ("drm/i915: Add per client max context ban limit") Cc: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191217170933.8108-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit ba16a48af797db124ac100417f9229b1650ce1fb) Signed-off-by: Joonas Lahtinen commit a76cf56920966a384b578f7b099bd1f073cc2a92 Author: Chris Wilson Date: Tue Dec 17 13:47:29 2019 +0000 drm/i915/gem: Keep request alive while attaching fences Since commit e5dadff4b093 ("drm/i915: Protect request retirement with timeline->mutex"), the request retirement can happen outside of the struct_mutex serialised only by the timeline->mutex. We drop the timeline->mutex on submitting the request (i915_request_add) so after that point, it is liable to be freed. Make sure our local reference is kept alive until we have finished attaching it to the signalers. (Note that this erodes the argument that i915_request_add should consume the reference, but that is a slightly larger patch!) Fixes: e5dadff4b093 ("drm/i915: Protect request retirement with timeline->mutex") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191217134729.3297818-1-chris@chris-wilson.co.uk (cherry picked from commit e14177f19739d74839eb496a27f5f5d958beaa5b) Signed-off-by: Joonas Lahtinen commit ddd9b5e3e765d8ed5a35786a6cb00111713fe161 Author: Jouni Hogander Date: Tue Dec 17 13:46:34 2019 +0200 net-sysfs: Call dev_hold always in rx_queue_add_kobject Dev_hold has to be called always in rx_queue_add_kobject. Otherwise usage count drops below 0 in case of failure in kobject_init_and_add. Fixes: b8eb718348b8 ("net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject") Reported-by: syzbot Cc: Tetsuo Handa Cc: David Miller Cc: Lukas Bulwahn Signed-off-by: Jouni Hogander Signed-off-by: David S. Miller commit 39f14c00b13c47186739a4cbc7a16e04d7fdbb60 Author: John Hurley Date: Tue Dec 17 11:28:56 2019 +0000 nfp: flower: fix stats id allocation As flower rules are added, they are given a stats ID based on the number of rules that can be supported in firmware. Only after the initial allocation of all available IDs does the driver begin to reuse those that have been released. The initial allocation of IDs was modified to account for multiple memory units on the offloaded device. However, this introduced a bug whereby the counter that controls the IDs could be decremented before the ID was assigned (where it is further decremented). This means that the stats ID could be assigned as -1/0xfffffff which is out of range. Fix this by only decrementing the main counter after the current ID has been assigned. Fixes: 467322e2627f ("nfp: flower: support multiple memory units for filter offloads") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4e2ce6e55050125d313408770d20dbf387dfc79c Author: Ben Dooks (Codethink) Date: Tue Dec 17 11:20:38 2019 +0000 net: dsa: make unexported dsa_link_touch() static dsa_link_touch() is not exported, or defined outside of the file it is in so make it static to avoid the following warning: net/dsa/dsa2.c:127:17: warning: symbol 'dsa_link_touch' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Signed-off-by: David S. Miller commit 9d4b98af8a2eb2ddb7779f2929700b5c174e9cc9 Author: Oleksij Rempel Date: Tue Dec 17 07:51:45 2019 +0100 net: ag71xx: fix compile warnings drivers/net/ethernet/atheros/ag71xx.c: In function 'ag71xx_probe': drivers/net/ethernet/atheros/ag71xx.c:1776:30: warning: passing argument 2 of 'of_get_phy_mode' makes pointer from integer without a cast [-Wint-conversion] In file included from drivers/net/ethernet/atheros/ag71xx.c:33: ./include/linux/of_net.h:15:69: note: expected 'phy_interface_t *' {aka 'enum *'} but argument is of type 'int' Fixes: 0c65b2b90d13c1 ("net: of_get_phy_mode: Change API to solve int/unit warnings") Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 1f26c0d3d24125992ab0026b0dab16c08df947c7 Author: Randy Dunlap Date: Mon Dec 16 18:52:45 2019 -0800 net: fix kernel-doc warning in Fix missing '*' kernel-doc notation that causes this warning: ../include/linux/netdevice.h:1779: warning: bad line: spinlock Fixes: ab92d68fc22f ("net: core: add generic lockdep keys") Signed-off-by: Randy Dunlap Cc: Taehee Yoo Signed-off-by: David S. Miller commit 7c68fa2bddda6d942bd387c9ba5b4300737fd991 Author: Eric Dumazet Date: Mon Dec 16 18:51:03 2019 -0800 net: annotate lockless accesses to sk->sk_pacing_shift sk->sk_pacing_shift can be read and written without lock synchronization. This patch adds annotations to document this fact and avoid future syzbot complains. This might also avoid unexpected false sharing in sk_pacing_shift_update(), as the compiler could remove the conditional check and always write over sk->sk_pacing_shift : if (sk->sk_pacing_shift != val) sk->sk_pacing_shift = val; Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit cad46039e4c99812db067c8ac22a864960e7acc4 Author: Ben Hutchings Date: Tue Dec 17 01:57:40 2019 +0000 net: qlogic: Fix error paths in ql_alloc_large_buffers() ql_alloc_large_buffers() has the usual RX buffer allocation loop where it allocates skbs and maps them for DMA. It also treats failure as a fatal error. There are (at least) three bugs in the error paths: 1. ql_free_large_buffers() assumes that the lrg_buf[] entry for the first buffer that couldn't be allocated will have .skb == NULL. But the qla_buf[] array is not zero-initialised. 2. ql_free_large_buffers() DMA-unmaps all skbs in lrg_buf[]. This is incorrect for the last allocated skb, if DMA mapping failed. 3. Commit 1acb8f2a7a9f ("net: qlogic: Fix memory leak in ql_alloc_large_buffers") added a direct call to dev_kfree_skb_any() after the skb is recorded in lrg_buf[], so ql_free_large_buffers() will double-free it. The bugs are somewhat inter-twined, so fix them all at once: * Clear each entry in qla_buf[] before attempting to allocate an skb for it. This goes half-way to fixing bug 1. * Set the .skb field only after the skb is DMA-mapped. This fixes the rest. Fixes: 1357bfcf7106 ("qla3xxx: Dynamically size the rx buffer queue ...") Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() ...") Fixes: 1acb8f2a7a9f ("net: qlogic: Fix memory leak in ql_alloc_large_buffers") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 951c6db954a1adefab492f6da805decacabbd1a7 Author: Marcelo Ricardo Leitner Date: Mon Dec 16 22:01:16 2019 -0300 sctp: fix memleak on err handling of stream initialization syzbot reported a memory leak when an allocation fails within genradix_prealloc() for output streams. That's because genradix_prealloc() leaves initialized members initialized when the issue happens and SCTP stack will abort the current initialization but without cleaning up such members. The fix here is to always call genradix_free() when genradix_prealloc() fails, for output and also input streams, as it suffers from the same issue. Reported-by: syzbot+772d9e36c490b18d51d1@syzkaller.appspotmail.com Fixes: 2075e50caf5e ("sctp: convert to genradix") Signed-off-by: Marcelo Ricardo Leitner Tested-by: Xin Long Signed-off-by: David S. Miller commit 1edc8eb2e93130e36ac74ac9c80913815a57d413 Author: Eric Sandeen Date: Fri Dec 6 10:55:59 2019 -0600 fs: call fsnotify_sb_delete after evict_inodes When a filesystem is unmounted, we currently call fsnotify_sb_delete() before evict_inodes(), which means that fsnotify_unmount_inodes() must iterate over all inodes on the superblock looking for any inodes with watches. This is inefficient and can lead to livelocks as it iterates over many unwatched inodes. At this point, SB_ACTIVE is gone and dropping refcount to zero kicks the inode out out immediately, so anything processed by fsnotify_sb_delete / fsnotify_unmount_inodes gets evicted in that loop. After that, the call to evict_inodes will evict everything else with a zero refcount. This should speed things up overall, and avoid livelocks in fsnotify_unmount_inodes(). Signed-off-by: Eric Sandeen Reviewed-by: Jan Kara Signed-off-by: Al Viro commit 04646aebd30b99f2cfa0182435a2ec252fcb16d0 Author: Eric Sandeen Date: Fri Dec 6 10:54:23 2019 -0600 fs: avoid softlockups in s_inodes iterators Anything that walks all inodes on sb->s_inodes list without rescheduling risks softlockups. Previous efforts were made in 2 functions, see: c27d82f fs/drop_caches.c: avoid softlockups in drop_pagecache_sb() ac05fbb inode: don't softlockup when evicting inodes but there hasn't been an audit of all walkers, so do that now. This also consistently moves the cond_resched() calls to the bottom of each loop in cases where it already exists. One loop remains: remove_dquot_ref(), because I'm not quite sure how to deal with that one w/o taking the i_lock. Signed-off-by: Eric Sandeen Reviewed-by: Jan Kara Signed-off-by: Al Viro commit 045f6d7942be248fbda6e85b2393f2735695ed39 Author: Changbin Du Date: Tue Dec 17 20:51:56 2019 -0800 lib/Kconfig.debug: fix some messed up configurations Some configuration items are messed up during conflict resolving. For example, STRICT_DEVMEM should not in testing menu, but kunit should. This patch fixes all of them. [akpm@linux-foundation.org: coding style fixes] Link: http://lkml.kernel.org/r/20191209155653.7509-1-changbin.du@gmail.com Signed-off-by: Changbin Du Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 42a9a53bb394a1de2247ef78f0b802ae86798122 Author: Yang Shi Date: Tue Dec 17 20:51:52 2019 -0800 mm: vmscan: protect shrinker idr replace with CONFIG_MEMCG Since commit 0a432dcbeb32 ("mm: shrinker: make shrinker not depend on memcg kmem"), shrinkers' idr is protected by CONFIG_MEMCG instead of CONFIG_MEMCG_KMEM, so it makes no sense to protect shrinker idr replace with CONFIG_MEMCG_KMEM. And in the CONFIG_MEMCG && CONFIG_SLOB case, shrinker_idr contains only shrinker, and it is deferred_split_shrinker. But it is never actually called, since idr_replace() is never compiled due to the wrong #ifdef. The deferred_split_shrinker all the time is staying in half-registered state, and it's never called for subordinate mem cgroups. Link: http://lkml.kernel.org/r/1575486978-45249-1-git-send-email-yang.shi@linux.alibaba.com Fixes: 0a432dcbeb32 ("mm: shrinker: make shrinker not depend on memcg kmem") Signed-off-by: Yang Shi Reviewed-by: Kirill Tkhai Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Shakeel Butt Cc: Roman Gushchin Cc: [5.4+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 253a496d8e57275d458eb3c988470525b0b2c545 Author: Daniel Axtens Date: Tue Dec 17 20:51:49 2019 -0800 kasan: don't assume percpu shadow allocations will succeed syzkaller and the fault injector showed that I was wrong to assume that we could ignore percpu shadow allocation failures. Handle failures properly. Merge all the allocated areas back into the free list and release the shadow, then clean up and return NULL. The shadow is released unconditionally, which relies upon the fact that the release function is able to tolerate pages not being present. Also clean up shadows in the recovery path - currently they are not released, which leaks a bit of memory. Link: http://lkml.kernel.org/r/20191205140407.1874-3-dja@axtens.net Fixes: 3c5c3cfb9ef4 ("kasan: support backing vmalloc space with real shadow memory") Signed-off-by: Daniel Axtens Reported-by: syzbot+82e323920b78d54aaed5@syzkaller.appspotmail.com Reported-by: syzbot+59b7daa4315e07a994f1@syzkaller.appspotmail.com Reviewed-by: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Qian Cai Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e218f1ca3971e5bcaae1fe8e6f007f9a206e32e9 Author: Daniel Axtens Date: Tue Dec 17 20:51:46 2019 -0800 kasan: use apply_to_existing_page_range() for releasing vmalloc shadow kasan_release_vmalloc uses apply_to_page_range to release vmalloc shadow. Unfortunately, apply_to_page_range can allocate memory to fill in page table entries, which is not what we want. Also, kasan_release_vmalloc is called under free_vmap_area_lock, so if apply_to_page_range does allocate memory, we get a sleep in atomic bug: BUG: sleeping function called from invalid context at mm/page_alloc.c:4681 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 15087, name: Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x199/0x216 lib/dump_stack.c:118 ___might_sleep.cold.97+0x1f5/0x238 kernel/sched/core.c:6800 __might_sleep+0x95/0x190 kernel/sched/core.c:6753 prepare_alloc_pages mm/page_alloc.c:4681 [inline] __alloc_pages_nodemask+0x3cd/0x890 mm/page_alloc.c:4730 alloc_pages_current+0x10c/0x210 mm/mempolicy.c:2211 alloc_pages include/linux/gfp.h:532 [inline] __get_free_pages+0xc/0x40 mm/page_alloc.c:4786 __pte_alloc_one_kernel include/asm-generic/pgalloc.h:21 [inline] pte_alloc_one_kernel include/asm-generic/pgalloc.h:33 [inline] __pte_alloc_kernel+0x1d/0x200 mm/memory.c:459 apply_to_pte_range mm/memory.c:2031 [inline] apply_to_pmd_range mm/memory.c:2068 [inline] apply_to_pud_range mm/memory.c:2088 [inline] apply_to_p4d_range mm/memory.c:2108 [inline] apply_to_page_range+0x77d/0xa00 mm/memory.c:2133 kasan_release_vmalloc+0xa7/0xc0 mm/kasan/common.c:970 __purge_vmap_area_lazy+0xcbb/0x1f30 mm/vmalloc.c:1313 try_purge_vmap_area_lazy mm/vmalloc.c:1332 [inline] free_vmap_area_noflush+0x2ca/0x390 mm/vmalloc.c:1368 free_unmap_vmap_area mm/vmalloc.c:1381 [inline] remove_vm_area+0x1cc/0x230 mm/vmalloc.c:2209 vm_remove_mappings mm/vmalloc.c:2236 [inline] __vunmap+0x223/0xa20 mm/vmalloc.c:2299 __vfree+0x3f/0xd0 mm/vmalloc.c:2356 __vmalloc_area_node mm/vmalloc.c:2507 [inline] __vmalloc_node_range+0x5d5/0x810 mm/vmalloc.c:2547 __vmalloc_node mm/vmalloc.c:2607 [inline] __vmalloc_node_flags mm/vmalloc.c:2621 [inline] vzalloc+0x6f/0x80 mm/vmalloc.c:2666 alloc_one_pg_vec_page net/packet/af_packet.c:4233 [inline] alloc_pg_vec net/packet/af_packet.c:4258 [inline] packet_set_ring+0xbc0/0x1b50 net/packet/af_packet.c:4342 packet_setsockopt+0xed7/0x2d90 net/packet/af_packet.c:3695 __sys_setsockopt+0x29b/0x4d0 net/socket.c:2117 __do_sys_setsockopt net/socket.c:2133 [inline] __se_sys_setsockopt net/socket.c:2130 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:2130 do_syscall_64+0xfa/0x780 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Switch to using the apply_to_existing_page_range() helper instead, which won't allocate memory. [akpm@linux-foundation.org: s/apply_to_existing_pages/apply_to_existing_page_range/] Link: http://lkml.kernel.org/r/20191205140407.1874-2-dja@axtens.net Fixes: 3c5c3cfb9ef4 ("kasan: support backing vmalloc space with real shadow memory") Signed-off-by: Daniel Axtens Reported-by: Dmitry Vyukov Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Qian Cai Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be1db4753ee6a0db80a900df9dbbf6ad2acc4bd1 Author: Daniel Axtens Date: Tue Dec 17 20:51:41 2019 -0800 mm/memory.c: add apply_to_existing_page_range() helper apply_to_page_range() takes an address range, and if any parts of it are not covered by the existing page table hierarchy, it allocates memory to fill them in. In some use cases, this is not what we want - we want to be able to operate exclusively on PTEs that are already in the tables. Add apply_to_existing_page_range() for this. Adjust the walker functions for apply_to_page_range to take 'create', which switches them between the old and new modes. This will be used in KASAN vmalloc. [akpm@linux-foundation.org: reduce code duplication] [akpm@linux-foundation.org: s/apply_to_existing_pages/apply_to_existing_page_range/] [akpm@linux-foundation.org: initialize __apply_to_page_range::err] Link: http://lkml.kernel.org/r/20191205140407.1874-1-dja@axtens.net Signed-off-by: Daniel Axtens Cc: Dmitry Vyukov Cc: Uladzislau Rezki (Sony) Cc: Alexander Potapenko Cc: Daniel Axtens Cc: Qian Cai Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d98c9e83b5e7ca78175df1b13ac4a6d460d3962d Author: Andrey Ryabinin Date: Tue Dec 17 20:51:38 2019 -0800 kasan: fix crashes on access to memory mapped by vm_map_ram() With CONFIG_KASAN_VMALLOC=y any use of memory obtained via vm_map_ram() will crash because there is no shadow backing that memory. Instead of sprinkling additional kasan_populate_vmalloc() calls all over the vmalloc code, move it into alloc_vmap_area(). This will fix vm_map_ram() and simplify the code a bit. [aryabinin@virtuozzo.com: v2] Link: http://lkml.kernel.org/r/20191205095942.1761-1-aryabinin@virtuozzo.comLink: http://lkml.kernel.org/r/20191204204534.32202-1-aryabinin@virtuozzo.com Fixes: 3c5c3cfb9ef4 ("kasan: support backing vmalloc space with real shadow memory") Signed-off-by: Andrey Ryabinin Reported-by: Dmitry Vyukov Reviewed-by: Uladzislau Rezki (Sony) Cc: Daniel Axtens Cc: Alexander Potapenko Cc: Daniel Axtens Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d89c69f42bf0fe42d1f52ea9b3dca15b1ade7601 Author: Paul Mackerras Date: Wed Dec 18 11:43:06 2019 +1100 KVM: PPC: Book3S HV: Don't do ultravisor calls on systems without ultravisor Commit 22945688acd4 ("KVM: PPC: Book3S HV: Support reset of secure guest") added a call to uv_svm_terminate, which is an ultravisor call, without any check that the guest is a secure guest or even that the system has an ultravisor. On a system without an ultravisor, the ultracall will degenerate to a hypercall, but since we are not in KVM guest context, the hypercall will get treated as a system call, which could have random effects depending on what happens to be in r0, and could also corrupt the current task's kernel stack. Hence this adds a test for the guest being a secure guest before doing uv_svm_terminate(). Fixes: 22945688acd4 ("KVM: PPC: Book3S HV: Support reset of secure guest") Signed-off-by: Paul Mackerras commit e781573e2fb1b75acdba61dcb9bcbfc16f288442 Author: Jens Axboe Date: Tue Dec 17 19:45:06 2019 -0700 io_uring: warn about unhandled opcode Now that we have all the opcodes handled in terms of command prep and SQE reuse, add a printk_once() to warn about any potentially new and unhandled ones. Signed-off-by: Jens Axboe commit d625c6ee4975000140c57da7e1ff244efefde274 Author: Jens Axboe Date: Tue Dec 17 19:53:05 2019 -0700 io_uring: read opcode and user_data from SQE exactly once If we defer a request, we can't be reading the opcode again. Ensure that the user_data and opcode fields are stable. For the user_data we already have a place for it, for the opcode we can fill a one byte hold and store that as well. For both of them, assign them when we originally read the SQE in io_get_sqring(). Any code that uses sqe->opcode or sqe->user_data is switched to req->opcode and req->user_data. Signed-off-by: Jens Axboe commit b29472ee7b53784f44011069fad15e539fd25bcf Author: Jens Axboe Date: Tue Dec 17 18:50:29 2019 -0700 io_uring: make IORING_OP_TIMEOUT_REMOVE deferrable If we defer this command as part of a link, we have to make sure that the SQE data has been read upfront. Integrate the timeout remove op into the prep handling to make it safe for SQE reuse. Signed-off-by: Jens Axboe commit fbf23849b1724d3ea362e346d0877a8d87978fe6 Author: Jens Axboe Date: Tue Dec 17 18:45:56 2019 -0700 io_uring: make IORING_OP_CANCEL_ASYNC deferrable If we defer this command as part of a link, we have to make sure that the SQE data has been read upfront. Integrate the async cancel op into the prep handling to make it safe for SQE reuse. Signed-off-by: Jens Axboe commit 0969e783e3a8913f79df27286501a6c21e961524 Author: Jens Axboe Date: Tue Dec 17 18:40:57 2019 -0700 io_uring: make IORING_POLL_ADD and IORING_POLL_REMOVE deferrable If we defer these commands as part of a link, we have to make sure that the SQE data has been read upfront. Integrate the poll add/remove into the prep handling to make it safe for SQE reuse. Signed-off-by: Jens Axboe commit ffbb8d6b76910d4f3a2bafeaf68c419011e98d05 Author: Pavel Begunkov Date: Tue Dec 17 20:57:05 2019 +0300 io_uring: make HARDLINK imply LINK The rules are as follows, if IOSQE_IO_HARDLINK is specified, then it's a link and there is no need to set IOSQE_IO_LINK separately, though it could be there. Add proper check and ensure that IOSQE_IO_HARDLINK implies IOSQE_IO_LINK. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8ed8d3c3bc32bf5b442c9f54013b4a47d5cae740 Author: Jens Axboe Date: Mon Dec 16 11:55:28 2019 -0700 io_uring: any deferred command must have stable sqe data We're currently not retaining sqe data for accept, fsync, and sync_file_range. None of these commands need data outside of what is directly provided, hence it can't go stale when the request is deferred. However, it can get reused, if an application reuses SQE entries. Ensure that we retain the information we need and only read the sqe contents once, off the submission path. Most of this is just moving code into a prep and finish function. Signed-off-by: Jens Axboe commit fc4df999e24fc3006441acd4ce6250e6a76ac851 Author: Jens Axboe Date: Tue Dec 10 14:38:45 2019 -0700 io_uring: remove 'sqe' parameter to the OP helpers that take it We pass in req->sqe for all of them, no need to pass it in as the request is always passed in. This is a necessary prep patch to be able to cleanup/fix the request prep path. Signed-off-by: Jens Axboe commit b7bb4f7da0a1a92f142697f1c9ce335e7a44f4b1 Author: Jens Axboe Date: Sun Dec 15 22:13:43 2019 -0700 io_uring: fix pre-prepped issue with force_nonblock == true Some of these code paths assume that any force_nonblock == true issue is not prepped, but that's not true if we did prep as part of link setup earlier. Check if we already have an async context allocate before setting up a new one. Cleanup the async context setup in general, we have a lot of duplicated code there. Fixes: 03b1230ca12a ("io_uring: ensure async punted sendmsg/recvmsg requests copy data") Fixes: f67676d160c6 ("io_uring: ensure async punted read/write requests copy iovec") Signed-off-by: Jens Axboe commit 525b305d61ede489ce2118b000a5dabd6d869dac Author: Jens Axboe Date: Tue Dec 17 14:13:37 2019 -0700 io-wq: re-add io_wq_current_is_worker() This reverts commit 8cdda87a4414, we now have several use csaes for this helper. Reinstate it. Signed-off-by: Jens Axboe commit dbce0b65046d1735d7054c54ec2387dba84ba258 Author: Rob Herring Date: Tue Dec 17 10:27:12 2019 -0600 dt-bindings: Add missing 'properties' keyword enclosing 'snps,tso' DT property definitions must be under a 'properties' keyword. This was missing for 'snps,tso' in an if/then clause. A meta-schema fix will catch future errors like this. Fixes: 7db3545aef5f ("dt-bindings: net: stmmac: Convert the binding to a schemas") Cc: "David S. Miller" Acked-by: Maxime Ripard Signed-off-by: Rob Herring commit 03729cfa0d543bc996bf959e762ec999afc8f3d2 Author: Dave Gerlach Date: Wed Dec 11 22:03:14 2019 -0600 soc: ti: wkup_m3_ipc: Fix race condition with rproc_boot Any user of wkup_m3_ipc calls wkup_m3_ipc_get to get a handle and this checks the value of the static variable m3_ipc_state to see if the wkup_m3 is ready. Currently this is populated during probe before rproc_boot has been called, meaning there is a window of time that wkup_m3_ipc_get can return a valid handle but the wkup_m3 itself is not ready, leading to invalid IPC calls to the wkup_m3 and system instability. To avoid this, move the population of the m3_ipc_state variable until after rproc_boot has succeeded to guarantee a valid and usable handle is always returned. Reported-by: Suman Anna Signed-off-by: Dave Gerlach Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren commit e17e7c498d4f734df93c300441e100818ed58168 Author: Kishon Vijay Abraham I Date: Tue Dec 17 14:21:24 2019 +0530 ARM: dts: beagle-x15-common: Model 5V0 regulator On am57xx-beagle-x15, 5V0 is connected to P16, P17, P18 and P19 connectors. On am57xx-evm, 5V0 regulator is used to get 3V6 regulator which is connected to the COMQ port. Model 5V0 regulator here in order for it to be used in am57xx-evm to model 3V6 regulator. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 040cda8a15210f19da7e29232c897ca6ca6cc950 Merge: daa6eb5a1495 0df36b90c47d Author: David S. Miller Date: Tue Dec 17 14:27:35 2019 -0800 Merge tag 'wireless-drivers-2019-12-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.5 First set of fixes for v5.5. Fixing security issues, some regressions and few major bugs. mwifiex * security fix for handling country Information Elements (CVE-2019-14895) * security fix for handling TDLS Information Elements ath9k * fix endian issue with ath9k_pci_owl_loader mt76 * fix default mac address handling iwlwifi * fix merge damage which lead to firmware crashing during boot on some devices * fix device initialisation regression on some devices ==================== Signed-off-by: David S. Miller commit daa6eb5a149519583c8a8cb31945f06417d21902 Author: Ioana Ciornei Date: Mon Dec 16 17:32:30 2019 +0200 dpaa2-ptp: fix double free of the ptp_qoriq IRQ Upon reusing the ptp_qoriq driver, the ptp_qoriq_free() function was used on the remove path to free any allocated resources. The ptp_qoriq IRQ is among these resources that are freed in ptp_qoriq_free() even though it is also a managed one (allocated using devm_request_threaded_irq). Drop the resource managed version of requesting the IRQ in order to not trigger a double free of the interrupt as below: [ 226.731005] Trying to free already-free IRQ 126 [ 226.735533] WARNING: CPU: 6 PID: 749 at kernel/irq/manage.c:1707 __free_irq+0x9c/0x2b8 [ 226.743435] Modules linked in: [ 226.746480] CPU: 6 PID: 749 Comm: bash Tainted: G W 5.4.0-03629-gfd7102c32b2c-dirty #912 [ 226.755857] Hardware name: NXP Layerscape LX2160ARDB (DT) [ 226.761244] pstate: 40000085 (nZcv daIf -PAN -UAO) [ 226.766022] pc : __free_irq+0x9c/0x2b8 [ 226.769758] lr : __free_irq+0x9c/0x2b8 [ 226.773493] sp : ffff8000125039f0 (...) [ 226.856275] Call trace: [ 226.858710] __free_irq+0x9c/0x2b8 [ 226.862098] free_irq+0x30/0x70 [ 226.865229] devm_irq_release+0x14/0x20 [ 226.869054] release_nodes+0x1b0/0x220 [ 226.872790] devres_release_all+0x34/0x50 [ 226.876790] device_release_driver_internal+0x100/0x1c0 Fixes: d346c9e86d86 ("dpaa2-ptp: reuse ptp_qoriq driver") Cc: Yangbo Lu Signed-off-by: Ioana Ciornei Reviewed-by: Yangbo Lu Signed-off-by: David S. Miller commit 2187f215ebaac73ddbd814696d7c7fa34f0c3de0 Merge: 2d3145f8d280 fbd542971aa1 Author: Linus Torvalds Date: Tue Dec 17 13:27:02 2019 -0800 Merge tag 'for-5.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A mix of regression fixes and regular fixes for stable trees: - fix swapped error messages for qgroup enable/rescan - fixes for NO_HOLES feature with clone range - fix deadlock between iget/srcu lock/synchronize srcu while freeing an inode - fix double lock on subvolume cross-rename - tree log fixes * fix missing data checksums after replaying a log tree * also teach tree-checker about this problem * skip log replay on orphaned roots - fix maximum devices constraints for RAID1C -3 and -4 - send: don't print warning on read-only mount regarding orphan cleanup - error handling fixes" * tag 'for-5.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: send: remove WARN_ON for readonly mount btrfs: do not leak reloc root if we fail to read the fs root btrfs: skip log replay on orphaned roots btrfs: handle ENOENT in btrfs_uuid_tree_iterate btrfs: abort transaction after failed inode updates in create_subvol Btrfs: fix hole extent items with a zero size after range cloning Btrfs: fix removal logic of the tree mod log that leads to use-after-free issues Btrfs: make tree checker detect checksum items with overlapping ranges Btrfs: fix missing data checksums after replaying a log tree btrfs: return error pointer from alloc_test_extent_buffer btrfs: fix devs_max constraints for raid1c3 and raid1c4 btrfs: tree-checker: Fix error format string for size_t btrfs: don't double lock the subvol_sem for rename exchange btrfs: handle error in btrfs_cache_block_group btrfs: do not call synchronize_srcu() in inode_tree_del Btrfs: fix cloning range with a hole when using the NO_HOLES feature btrfs: Fix error messages in qgroup_rescan_init commit 2d3145f8d2809592ef803a30c8a342b5a9e2de9a Author: Linus Torvalds Date: Tue Dec 17 13:10:11 2019 -0800 early init: fix error handling when opening /dev/console The comment says "this should never fail", but it definitely can fail when you have odd initial boot filesystems, or kernel configurations. So get the error handling right: filp_open() returns an error pointer. Reported-by: Jesse Barnes Reported-by: youling 257 Fixes: 8243186f0cc7 ("fs: remove ksys_dup()") Cc: Dominik Brodowski Signed-off-by: Linus Torvalds commit 58d90a04bdcc28e1b34251f4d9c1c4d39d4bba69 Merge: a922f1a9aec1 62a1923cc8fe Author: Linus Torvalds Date: Tue Dec 17 13:08:41 2019 -0800 Merge tag 'regulator-fix-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A small set of fixes for mostly minor issues here, the only real code ones are Wen Yang's fixes for error handling in the core and Christian Marussi's list_voltage() change which is a fix for disruptively bad performance for regulators with continuous voltage control (which are rare)" * tag 'regulator-fix-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: rn5t618: fix module aliases regulator: max77650: add of_match table regulator: core: avoid unneeded .list_voltage calls regulator: s5m8767: Fix a warning message regulator: core: fix regulator_register() error paths to properly release rdev regulator: fix use after free issue commit a922f1a9aec1102a94505622290c0ecf4ef79cec Merge: 9065e0636036 63aa6a692595 Author: Linus Torvalds Date: Tue Dec 17 13:06:31 2019 -0800 Merge tag 'spi-fix-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A relatively large set of fixes here, the biggest part of it is for fallout from the GPIO descriptor rework that affected several of the devices with usable native chip select support. There's also some new PCI IDs for Intel Jasper Lake devices. The conversion to platform_get_irq() in the fsl driver is an incremental fix for build errors introduced on SPARC by the earlier fix for error handling in probe in that driver" * tag 'spi-fix-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: fsl: use platform_get_irq() instead of of_irq_to_resource() spi: nxp-fspi: Ensure width is respected in spi-mem operations spi: spi-ti-qspi: Fix a bug when accessing non default CS spi: fsl: don't map irq during probe spi: spi-cavium-thunderx: Add missing pci_release_regions() spi: sprd: Fix the incorrect SPI register gpiolib: of: Make of_gpio_spi_cs_get_count static spi: fsl: Handle the single hardwired chipselect case gpio: Handle counting of Freescale chipselects spi: fsl: Fix GPIO descriptor support spi: dw: Correct handling of native chipselect spi: cadence: Correct handling of native chipselect spi: pxa2xx: Add support for Intel Jasper Lake commit b1de6fc7520fe12949c070af0e8c0e4044cd3420 Author: Darrick J. Wong Date: Wed Dec 11 13:19:07 2019 -0800 xfs: fix log reservation overflows when allocating large rt extents Omar Sandoval reported that a 4G fallocate on the realtime device causes filesystem shutdowns due to a log reservation overflow that happens when we log the rtbitmap updates. Factor rtbitmap/rtsummary updates into the the tr_write and tr_itruncate log reservation calculation. "The following reproducer results in a transaction log overrun warning for me: mkfs.xfs -f -r rtdev=/dev/vdc -d rtinherit=1 -m reflink=0 /dev/vdb mount -o rtdev=/dev/vdc /dev/vdb /mnt fallocate -l 4G /mnt/foo Reported-by: Omar Sandoval Tested-by: Omar Sandoval Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 9065e0636036e4f8a6f65f9c34ed384e4b776273 Merge: 2abf19327576 af1648984828 Author: Linus Torvalds Date: Tue Dec 17 11:17:03 2019 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Ingo Molnar: "Fix kexec booting with certain EFI memory map layouts" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Update e820 with reserved EFI boot services data to fix kexec breakage commit 2abf193275768ac89f5d93eec7bcacb238168151 Merge: 4340ebd19ff0 e0748539e3d5 Author: Linus Torvalds Date: Tue Dec 17 11:11:08 2019 -0800 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Ingo Molnar: "Add HPET quirks for the Intel 'Coffee Lake H' and 'Ice Lake' platforms" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/intel: Disable HPET on Intel Ice Lake platforms x86/intel: Disable HPET on Intel Coffee Lake H platforms commit 4340ebd19ff031fd97a69ea7e7249c898f2d3e06 Merge: 89c683cd06e0 346da4d2c7ea Author: Linus Torvalds Date: Tue Dec 17 11:09:05 2019 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Fix the guest-nice cpustat values in /proc" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/cputime, proc/stat: Fix incorrect guest nice cpustat value commit 89c683cd06e03dfd3186c4cab1e2a39982c42a48 Merge: 9e8a0d5ff840 57e04eeda515 Author: Linus Torvalds Date: Tue Dec 17 11:03:57 2019 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fixes from Ingo Molnar: "These are all perf tooling changes: most of them are fixes. Note that the large CPU count related fixes go beyond regression fixes, but the IPI-flood symptoms are severe enough that I think justifies their inclusion" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits) perf vendor events s390: Remove name from L1D_RO_EXCL_WRITES description perf vendor events s390: Fix counter long description for DTLB1_GPAGE_WRITES libtraceevent: Allow custom libdir path perf header: Fix false warning when there are no duplicate cache entries perf metricgroup: Fix printing event names of metric group with multiple events perf/x86/pmu-events: Fix Kernel_Utilization metric perf top: Do not bail out when perf_env__read_cpuid() returns ENOSYS perf arch: Make the default get_cpuid() return compatible error tools headers kvm: Sync linux/kvm.h with the kernel sources tools headers UAPI: Update tools's copy of drm.h headers tools headers UAPI: Sync drm/i915_drm.h with the kernel sources perf inject: Fix processing of ID index for injected instruction tracing perf report: Bail out --mem-mode if mem info is not available perf report: Make -F more strict like -s perf report/top TUI: Replace pr_err() with ui__error() libtraceevent: Copy pkg-config file to output folder when using O= libtraceevent: Fix lib installation with O= perf kvm: Clarify the 'perf kvm' -i and -o command line options tools arch x86: Sync asm/cpufeatures.h with the kernel sources perf beauty: Add CLEAR_SIGHAND support for clone's flags arg ... commit 9e8a0d5ff8408b1e54be0546df0b2ca9d04264cd Merge: a114a18c7dbc c571b72e2b84 Author: Linus Torvalds Date: Tue Dec 17 11:00:46 2019 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "Tone down mutex debugging complaints, and annotate/fix spinlock debugging data accesses for KCSAN" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "locking/mutex: Complain upon mutex API misuse in IRQ contexts" locking/spinlock/debug: Fix various data races commit a114a18c7dbc2b7ac5a1379a8dcced6095c52ead Merge: ea200dec5128 a470552ee896 Author: Linus Torvalds Date: Tue Dec 17 10:39:55 2019 -0800 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Protect presistent EFI memory reservations from kexec, fix EFIFB early console, EFI stub graphics output fixes and other misc fixes." * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: Don't attempt to map RCI2 config table if it doesn't exist efi/earlycon: Remap entire framebuffer after page initialization efi: Fix efi_loaded_image_t::unload type efi/gop: Fix memory leak in __gop_query32/64() efi/gop: Return EFI_SUCCESS if a usable GOP was found efi/gop: Return EFI_NOT_FOUND if there are no usable GOPs efi/memreserve: Register reservations as 'reserved' in /proc/iomem commit 0c4eb2a6b3c6b0facd0a3bccda5db22e7b3b6f96 Author: Kishon Vijay Abraham I Date: Tue Dec 17 14:21:23 2019 +0530 ARM: dts: am571x-idk: Fix gpios property to have the correct gpio number commit d23f3839fe97d8dce03d ("ARM: dts: DRA7: Add pcie1 dt node for EP mode") while adding the dt node for EP mode for DRA7 platform, added rc node for am571x-idk and populated gpios property with "gpio3 23". However the GPIO_PCIE_SWRST line is actually connected to "gpio5 18". Fix it here. (The patch adding "gpio3 23" was tested with another am57x board in EP mode which doesn't rely on reset from host). Cc: stable # 4.14+ Fixes: d23f3839fe97d8dce03d ("ARM: dts: DRA7: Add pcie1 dt node for EP mode") Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 81cc0877840f72210e809bbedd6346d686560fc1 Author: Kishon Vijay Abraham I Date: Tue Dec 17 14:21:22 2019 +0530 ARM: dts: am57xx-beagle-x15/am57xx-idk: Remove "gpios" for endpoint dt nodes PERST# line in the PCIE connector is driven by the host mode and not EP mode. The gpios property here is used for driving the PERST# line. Remove gpios property from all endpoint device tree nodes. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 4aa37c463764052c68c5c430af2a67b5d784c1e0 Author: Jason A. Donenfeld Date: Tue Dec 17 18:24:55 2019 +0100 random: don't forget compat_ioctl on urandom Recently, there's been some compat ioctl cleanup, in which large hardcoded lists were replaced with compat_ptr_ioctl. One of these changes involved removing the random.c hardcoded list entries and adding a compat ioctl function pointer to the random.c fops. In the process, urandom was forgotten about, so this commit fixes that oversight. Fixes: 507e4e2b430b ("compat_ioctl: remove /dev/random commands") Cc: Arnd Bergmann Signed-off-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20191217172455.186395-1-Jason@zx2c4.com Signed-off-by: Greg Kroah-Hartman commit e47304232b373362228bf233f17bd12b11c9aafc Author: Daniel Borkmann Date: Tue Dec 17 13:28:16 2019 +0100 bpf: Fix cgroup local storage prog tracking Recently noticed that we're tracking programs related to local storage maps through their prog pointer. This is a wrong assumption since the prog pointer can still change throughout the verification process, for example, whenever bpf_patch_insn_single() is called. Therefore, the prog pointer that was assigned via bpf_cgroup_storage_assign() is not guaranteed to be the same as we pass in bpf_cgroup_storage_release() and the map would therefore remain in busy state forever. Fix this by using the prog's aux pointer which is stable throughout verification and beyond. Fixes: de9cbbaadba5 ("bpf: introduce cgroup storage maps") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Cc: Roman Gushchin Cc: Martin KaFai Lau Link: https://lore.kernel.org/bpf/1471c69eca3022218666f909bc927a92388fd09e.1576580332.git.daniel@iogearbox.net commit c58c1f83436b501d45d4050fd1296d71a9760bcb Author: Roman Penyaev Date: Tue Dec 17 16:54:07 2019 +0100 block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT Non-mq devs do not honor REQ_NOWAIT so give a chance to the caller to repeat request gracefully on -EAGAIN error. The problem is well reproduced using io_uring: mkfs.ext4 /dev/ram0 mount /dev/ram0 /mnt # Preallocate a file dd if=/dev/zero of=/mnt/file bs=1M count=1 # Start fio with io_uring and get -EIO fio --rw=write --ioengine=io_uring --size=1M --direct=1 --name=job --filename=/mnt/file Signed-off-by: Roman Penyaev Signed-off-by: Jens Axboe commit aabb5b833872524eaf28f52187e5987984982264 Author: Suwan Kim Date: Fri Dec 13 11:30:55 2019 +0900 usbip: Fix error path of vhci_recv_ret_submit() If a transaction error happens in vhci_recv_ret_submit(), event handler closes connection and changes port status to kick hub_event. Then hub tries to flush the endpoint URBs, but that causes infinite loop between usb_hub_flush_endpoint() and vhci_urb_dequeue() because "vhci_priv" in vhci_urb_dequeue() was already released by vhci_recv_ret_submit() before a transmission error occurred. Thus, vhci_urb_dequeue() terminates early and usb_hub_flush_endpoint() continuously calls vhci_urb_dequeue(). The root cause of this issue is that vhci_recv_ret_submit() terminates early without giving back URB when transaction error occurs in vhci_recv_ret_submit(). That causes the error URB to still be linked at endpoint list without “vhci_priv". So, in the case of transaction error in vhci_recv_ret_submit(), unlink URB from the endpoint, insert proper error code in urb->status and give back URB. Reported-by: Marek Marczykowski-Górecki Tested-by: Marek Marczykowski-Górecki Signed-off-by: Suwan Kim Cc: stable Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20191213023055.19933-3-suwan.kim027@gmail.com Signed-off-by: Greg Kroah-Hartman commit d986294ee55d719562b20aabe15a39bf8f863415 Author: Suwan Kim Date: Fri Dec 13 11:30:54 2019 +0900 usbip: Fix receive error in vhci-hcd when using scatter-gather When vhci uses SG and receives data whose size is smaller than SG buffer size, it tries to receive more data even if it acutally receives all the data from the server. If then, it erroneously adds error event and triggers connection shutdown. vhci-hcd should check if it received all the data even if there are more SG entries left. So, check if it receivces all the data from the server in for_each_sg() loop. Fixes: ea44d190764b ("usbip: Implement SG support to vhci-hcd and stub driver") Reported-by: Marek Marczykowski-Górecki Tested-by: Marek Marczykowski-Górecki Signed-off-by: Suwan Kim Acked-by: Shuah Khan Cc: stable Link: https://lore.kernel.org/r/20191213023055.19933-2-suwan.kim027@gmail.com Signed-off-by: Greg Kroah-Hartman commit 64cc3f12d1c7dd054a215bc1ff9cc2abcfe35832 Author: Erkka Talvitie Date: Wed Dec 11 10:08:39 2019 +0200 USB: EHCI: Do not return -EPIPE when hub is disconnected When disconnecting a USB hub that has some child device(s) connected to it (such as a USB mouse), then the stack tries to clear halt and reset device(s) which are _already_ physically disconnected. The issue has been reproduced with: CPU: IMX6D5EYM10AD or MCIMX6D5EYM10AE. SW: U-Boot 2019.07 and kernel 4.19.40. CPU: HP Proliant Microserver Gen8. SW: Linux version 4.2.3-300.fc23.x86_64 In this situation there will be error bit for MMF active yet the CERR equals EHCI_TUNE_CERR + halt. Existing implementation interprets this as a stall [1] (chapter 8.4.5). The possible conditions when the MMF will be active + halt can be found from [2] (Table 4-13). Fix for the issue is to check whether MMF is active and PID Code is IN before checking for the stall. If these conditions are true then it is not a stall. What happens after the fix is that when disconnecting a hub with attached device(s) the situation is not interpret as a stall. [1] [https://www.usb.org/document-library/usb-20-specification, usb_20.pdf] [2] [https://www.intel.com/content/dam/www/public/us/en/documents/ technical-specifications/ehci-specification-for-usb.pdf] Signed-off-by: Erkka Talvitie Reviewed-by: Alan Stern Cc: stable Link: https://lore.kernel.org/r/ef70941d5f349767f19c0ed26b0dd9eed8ad81bb.1576050523.git.erkka.talvitie@vincit.fi Signed-off-by: Greg Kroah-Hartman commit 547fc228755d79af648898187e7831a825d4f42c Author: zhong jiang Date: Fri Dec 13 20:16:18 2019 +0800 usb: typec: fusb302: Fix an undefined reference to 'extcon_get_state' Fixes the following compile error: drivers/usb/typec/tcpm/fusb302.o: In function `tcpm_get_current_limit': fusb302.c:(.text+0x3ee): undefined reference to `extcon_get_state' fusb302.c:(.text+0x422): undefined reference to `extcon_get_state' fusb302.c:(.text+0x450): undefined reference to `extcon_get_state' fusb302.c:(.text+0x48c): undefined reference to `extcon_get_state' drivers/usb/typec/tcpm/fusb302.o: In function `fusb302_probe': fusb302.c:(.text+0x980): undefined reference to `extcon_get_extcon_dev' make: *** [vmlinux] Error 1 It is because EXTCON is build as a module, but FUSB302 is not. Suggested-by: Heikki Krogerus Signed-off-by: zhong jiang Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1576239378-50795-1-git-send-email-zhongjiang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 05b686b573cfb35a227c30787083a6631ff0f0c9 Author: Alexander Shishkin Date: Tue Dec 17 13:55:27 2019 +0200 intel_th: msu: Fix window switching without windows Commit 6cac7866c2741 ("intel_th: msu: Add a sysfs attribute to trigger window switch") adds a NULL pointer dereference in the case when there are no windows allocated: > BUG: kernel NULL pointer dereference, address: 0000000000000000 > #PF: supervisor read access in kernel mode > #PF: error_code(0x0000) - not-present page > PGD 0 P4D 0 > Oops: 0000 1 SMP > CPU: 5 PID: 1110 Comm: bash Not tainted 5.5.0-rc1+ #1 > RIP: 0010:msc_win_switch+0xa/0x80 [intel_th_msu] > Call Trace: > ? win_switch_store+0x9b/0xc0 [intel_th_msu] > dev_attr_store+0x17/0x30 > sysfs_kf_write+0x3e/0x50 > kernfs_fop_write+0xda/0x1b0 > __vfs_write+0x1b/0x40 > vfs_write+0xb9/0x1a0 > ksys_write+0x67/0xe0 > __x64_sys_write+0x1a/0x20 > do_syscall_64+0x57/0x1d0 > entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix that by disallowing window switching with multiwindow buffers without windows. Signed-off-by: Alexander Shishkin Fixes: 6cac7866c274 ("intel_th: msu: Add a sysfs attribute to trigger window switch") Reviewed-by: Andy Shevchenko Reported-by: Ammy Yi Tested-by: Ammy Yi Cc: stable@vger.kernel.org # v5.2+ Link: https://lore.kernel.org/r/20191217115527.74383-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ab832e38e4f0f45b16c3633714d868b7ec6b33b4 Author: Alexander Shishkin Date: Tue Dec 17 13:55:26 2019 +0200 intel_th: Fix freeing IRQs Commit aac8da65174a ("intel_th: msu: Start handling IRQs") implicitly relies on the use of devm_request_irq() to subsequently free the irqs on device removal, but in case of the pci_free_irq_vectors() API, the handlers need to be freed before it is called. Therefore, at the moment the driver's remove path trips a BUG_ON(irq_has_action()): > kernel BUG at drivers/pci/msi.c:375! > invalid opcode: 0000 1 SMP > CPU: 2 PID: 818 Comm: rmmod Not tainted 5.5.0-rc1+ #1 > RIP: 0010:free_msi_irqs+0x67/0x1c0 > pci_disable_msi+0x116/0x150 > pci_free_irq_vectors+0x1b/0x20 > intel_th_pci_remove+0x22/0x30 [intel_th_pci] > pci_device_remove+0x3e/0xb0 > device_release_driver_internal+0xf0/0x1c0 > driver_detach+0x4c/0x8f > bus_remove_driver+0x5c/0xd0 > driver_unregister+0x31/0x50 > pci_unregister_driver+0x40/0x90 > intel_th_pci_driver_exit+0x10/0xad6 [intel_th_pci] > __x64_sys_delete_module+0x147/0x290 > ? exit_to_usermode_loop+0xd7/0x120 > do_syscall_64+0x57/0x1b0 > entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix this by explicitly freeing irqs before freeing the vectors. We keep using the devm_* variants because they are still useful in early error paths. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Fixes: aac8da65174a ("intel_th: msu: Start handling IRQs") Reported-by: Ammy Yi Tested-by: Ammy Yi Cc: stable@vger.kernel.org # v5.2+ Link: https://lore.kernel.org/r/20191217115527.74383-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 88385866bab8d5e18c7f45d1023052c783572e03 Author: Alexander Shishkin Date: Tue Dec 17 13:55:25 2019 +0200 intel_th: pci: Add Elkhart Lake SOC support This adds support for Intel Trace Hub in Elkhart Lake. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191217115527.74383-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e4de2a5d51f97a6e720a1c0911f93e2d8c2f1c08 Author: Alexander Shishkin Date: Tue Dec 17 13:55:24 2019 +0200 intel_th: pci: Add Comet Lake PCH-V support This adds Intel(R) Trace Hub PCI ID for Comet Lake PCH-V. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: Link: https://lore.kernel.org/r/20191217115527.74383-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7c497d799267134786afdf719d9230b7d6f77d84 Merge: 475feec0c41a 556672d75ff4 Author: Takashi Iwai Date: Tue Dec 17 14:18:32 2019 +0100 Merge tag 'asoc-fix-v5.5-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.5 A collection of fixes since the merge window, mostly driver specific but there's a few in the core that clean up fallout from the refactorings done in the last cycle. commit cb47b9f8630ae3fa3f5fbd0c7003faba7abdf711 Author: David Engraf Date: Mon Dec 16 09:54:03 2019 +0100 tty/serial: atmel: fix out of range clock divider handling Use MCK_DIV8 when the clock divider is > 65535. Unfortunately the mode register was already written thus the clock selection is ignored. Fix by doing the baud rate calulation before setting the mode. Fixes: 5bf5635ac170 ("tty/serial: atmel: add fractional baud rate support") Signed-off-by: David Engraf Acked-by: Ludovic Desroches Acked-by: Richard Genoud Cc: stable Link: https://lore.kernel.org/r/20191216085403.17050-1-david.engraf@sysgo.com Signed-off-by: Greg Kroah-Hartman commit fb2b90014d782d80d7ebf663e50f96d8c507a73c Author: Sudip Mukherjee Date: Thu Dec 12 13:16:02 2019 +0000 tty: link tty and port before configuring it as console There seems to be a race condition in tty drivers and I could see on many boot cycles a NULL pointer dereference as tty_init_dev() tries to do 'tty->port->itty = tty' even though tty->port is NULL. 'tty->port' will be set by the driver and if the driver has not yet done it before we open the tty device we can get to this situation. By adding some extra debug prints, I noticed that: 6.650130: uart_add_one_port 6.663849: register_console 6.664846: tty_open 6.674391: tty_init_dev 6.675456: tty_port_link_device uart_add_one_port() registers the console, as soon as it registers, the userspace tries to use it and that leads to tty_open() but uart_add_one_port() has not yet done tty_port_link_device() and so tty->port is not yet configured when control reaches tty_init_dev(). Further look into the code and tty_port_link_device() is done by uart_add_one_port(). After registering the console uart_add_one_port() will call tty_port_register_device_attr_serdev() and tty_port_link_device() is called from this. Call add tty_port_link_device() before uart_configure_port() is done and add a check in tty_port_link_device() so that it only links the port if it has not been done yet. Suggested-by: Jiri Slaby Signed-off-by: Sudip Mukherjee Cc: stable Link: https://lore.kernel.org/r/20191212131602.29504-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6cf82d559e1a1d89f06ff4d428aca479c1dd0be6 Author: Vincent Guittot Date: Fri Nov 29 15:04:47 2019 +0100 sched/cfs: fix spurious active migration The load balance can fail to find a suitable task during the periodic check because the imbalance is smaller than half of the load of the waiting tasks. This results in the increase of the number of failed load balance, which can end up to start an active migration. This active migration is useless because the current running task is not a better choice than the waiting ones. In fact, the current task was probably not running but waiting for the CPU during one of the previous attempts and it had already not been selected. When load balance fails too many times to migrate a task, we should relax the contraint on the maximum load of the tasks that can be migrated similarly to what is done with cache hotness. Before the rework, load balance used to set the imbalance to the average load_per_task in order to mitigate such situation. This increased the likelihood of migrating a task but also of selecting a larger task than needed while more appropriate ones were in the list. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1575036287-6052-1-git-send-email-vincent.guittot@linaro.org commit 7ed735c33104f3c6194fbc67e3a8b6e64ae84ad1 Author: Vincent Guittot Date: Wed Dec 4 19:21:40 2019 +0100 sched/fair: Fix find_idlest_group() to handle CPU affinity Because of CPU affinity, the local group can be skipped which breaks the assumption that statistics are always collected for local group. With uninitialized local_sgs, the comparison is meaningless and the behavior unpredictable. This can even end up to use local pointer which is to NULL in this case. If the local group has been skipped because of CPU affinity, we return the idlest group. Fixes: 57abff067a08 ("sched/fair: Rework find_idlest_group()") Reported-by: John Stultz Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: John Stultz Cc: rostedt@goodmis.org Cc: valentin.schneider@arm.com Cc: mingo@redhat.com Cc: mgorman@suse.de Cc: juri.lelli@redhat.com Cc: dietmar.eggemann@arm.com Cc: bsegall@google.com Cc: qais.yousef@arm.com Link: https://lkml.kernel.org/r/1575483700-22153-1-git-send-email-vincent.guittot@linaro.org commit c3466952ca1514158d7c16c9cfc48c27d5c5dc0f Author: Johannes Weiner Date: Tue Dec 3 13:35:24 2019 -0500 psi: Fix a division error in psi poll() The psi window size is a u64 an can be up to 10 seconds right now, which exceeds the lower 32 bits of the variable. We currently use div_u64 for it, which is meant only for 32-bit divisors. The result is garbage pressure sampling values and even potential div0 crashes. Use div64_u64. Signed-off-by: Johannes Weiner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Suren Baghdasaryan Cc: Jingfeng Xie Link: https://lkml.kernel.org/r/20191203183524.41378-3-hannes@cmpxchg.org commit 3dfbe25c27eab7c90c8a7e97b4c354a9d24dd985 Author: Johannes Weiner Date: Tue Dec 3 13:35:23 2019 -0500 sched/psi: Fix sampling error and rare div0 crashes with cgroups and high uptime Jingfeng reports rare div0 crashes in psi on systems with some uptime: [58914.066423] divide error: 0000 [#1] SMP [58914.070416] Modules linked in: ipmi_poweroff ipmi_watchdog toa overlay fuse tcp_diag inet_diag binfmt_misc aisqos(O) aisqos_hotfixes(O) [58914.083158] CPU: 94 PID: 140364 Comm: kworker/94:2 Tainted: G W OE K 4.9.151-015.ali3000.alios7.x86_64 #1 [58914.093722] Hardware name: Alibaba Alibaba Cloud ECS/Alibaba Cloud ECS, BIOS 3.23.34 02/14/2019 [58914.102728] Workqueue: events psi_update_work [58914.107258] task: ffff8879da83c280 task.stack: ffffc90059dcc000 [58914.113336] RIP: 0010:[] [] psi_update_stats+0x1c1/0x330 [58914.122183] RSP: 0018:ffffc90059dcfd60 EFLAGS: 00010246 [58914.127650] RAX: 0000000000000000 RBX: ffff8858fe98be50 RCX: 000000007744d640 [58914.134947] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00003594f700648e [58914.142243] RBP: ffffc90059dcfdf8 R08: 0000359500000000 R09: 0000000000000000 [58914.149538] R10: 0000000000000000 R11: 0000000000000000 R12: 0000359500000000 [58914.156837] R13: 0000000000000000 R14: 0000000000000000 R15: ffff8858fe98bd78 [58914.164136] FS: 0000000000000000(0000) GS:ffff887f7f380000(0000) knlGS:0000000000000000 [58914.172529] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [58914.178467] CR2: 00007f2240452090 CR3: 0000005d5d258000 CR4: 00000000007606f0 [58914.185765] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [58914.193061] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [58914.200360] PKRU: 55555554 [58914.203221] Stack: [58914.205383] ffff8858fe98bd48 00000000000002f0 0000002e81036d09 ffffc90059dcfde8 [58914.213168] ffff8858fe98bec8 0000000000000000 0000000000000000 0000000000000000 [58914.220951] 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [58914.228734] Call Trace: [58914.231337] [] psi_update_work+0x22/0x60 [58914.237067] [] process_one_work+0x189/0x420 [58914.243063] [] worker_thread+0x4e/0x4b0 [58914.248701] [] ? process_one_work+0x420/0x420 [58914.254869] [] kthread+0xe6/0x100 [58914.259994] [] ? kthread_park+0x60/0x60 [58914.265640] [] ret_from_fork+0x39/0x50 [58914.271193] Code: 41 29 c3 4d 39 dc 4d 0f 42 dc <49> f7 f1 48 8b 13 48 89 c7 48 c1 [58914.279691] RIP [] psi_update_stats+0x1c1/0x330 The crashing instruction is trying to divide the observed stall time by the sampling period. The period, stored in R8, is not 0, but we are dividing by the lower 32 bits only, which are all 0 in this instance. We could switch to a 64-bit division, but the period shouldn't be that big in the first place. It's the time between the last update and the next scheduled one, and so should always be around 2s and comfortably fit into 32 bits. The bug is in the initialization of new cgroups: we schedule the first sampling event in a cgroup as an offset of sched_clock(), but fail to initialize the last_update timestamp, and it defaults to 0. That results in a bogusly large sampling period the first time we run the sampling code, and consequently we underreport pressure for the first 2s of a cgroup's life. But worse, if sched_clock() is sufficiently advanced on the system, and the user gets unlucky, the period's lower 32 bits can all be 0 and the sampling division will crash. Fix this by initializing the last update timestamp to the creation time of the cgroup, thus correctly marking the start of the first pressure sampling period in a new cgroup. Reported-by: Jingfeng Xie Signed-off-by: Johannes Weiner Signed-off-by: Peter Zijlstra (Intel) Cc: Suren Baghdasaryan Link: https://lkml.kernel.org/r/20191203183524.41378-2-hannes@cmpxchg.org commit 9f0bff1180efc9ea988fed3fd93da7647151ac8b Author: Sebastian Andrzej Siewior Date: Tue Nov 19 13:14:29 2019 +0100 perf/core: Add SRCU annotation for pmus list walk Since commit 28875945ba98d ("rcu: Add support for consolidated-RCU reader checking") there is an additional check to ensure that a RCU related lock is held while the RCU list is iterated. This section holds the SRCU reader lock instead. Add annotation to list_for_each_entry_rcu() that pmus_srcu must be acquired during the list traversal. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Joel Fernandes (Google) Link: https://lkml.kernel.org/r/20191119121429.zhcubzdhm672zasg@linutronix.de commit 92ca7da4bdc24d63bb0bcd241c11441ddb63b80a Author: Alexander Shishkin Date: Tue Dec 10 12:51:01 2019 +0200 perf/x86/intel: Fix PT PMI handling Commit: ccbebba4c6bf ("perf/x86/intel/pt: Bypass PT vs. LBR exclusivity if the core supports it") skips the PT/LBR exclusivity check on CPUs where PT and LBRs coexist, but also inadvertently skips the active_events bump for PT in that case, which is a bug. If there aren't any hardware events at the same time as PT, the PMI handler will ignore PT PMIs, as active_events reads zero in that case, resulting in the "Uhhuh" spurious NMI warning and PT data loss. Fix this by always increasing active_events for PT events. Fixes: ccbebba4c6bf ("perf/x86/intel/pt: Bypass PT vs. LBR exclusivity if the core supports it") Reported-by: Vitaly Slobodskoy Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexey Budankov Cc: Jiri Olsa Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Link: https://lkml.kernel.org/r/20191210105101.77210-1-alexander.shishkin@linux.intel.com commit ff61541cc6c1962957758ba433c574b76f588d23 Author: Alexander Shishkin Date: Thu Dec 5 17:28:52 2019 +0300 perf/x86/intel/bts: Fix the use of page_private() Commit 8062382c8dbe2 ("perf/x86/intel/bts: Add BTS PMU driver") brought in a warning with the BTS buffer initialization that is easily tripped with (assuming KPTI is disabled): instantly throwing: > ------------[ cut here ]------------ > WARNING: CPU: 2 PID: 326 at arch/x86/events/intel/bts.c:86 bts_buffer_setup_aux+0x117/0x3d0 > Modules linked in: > CPU: 2 PID: 326 Comm: perf Not tainted 5.4.0-rc8-00291-gceb9e77324fa #904 > RIP: 0010:bts_buffer_setup_aux+0x117/0x3d0 > Call Trace: > rb_alloc_aux+0x339/0x550 > perf_mmap+0x607/0xc70 > mmap_region+0x76b/0xbd0 ... It appears to assume (for lost raisins) that PagePrivate() is set, while later it actually tests for PagePrivate() before using page_private(). Make it consistent and always check PagePrivate() before using page_private(). Fixes: 8062382c8dbe2 ("perf/x86/intel/bts: Add BTS PMU driver") Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Jiri Olsa Cc: Vince Weaver Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Link: https://lkml.kernel.org/r/20191205142853.28894-2-alexander.shishkin@linux.intel.com commit 1e69a0efc0bd0e02b8327e7186fbb4a81878ea0b Author: Peter Zijlstra Date: Fri Dec 6 12:50:16 2019 +0100 perf/x86: Fix potential out-of-bounds access UBSAN reported out-of-bound accesses for x86_pmu.event_map(), it's arguments should be < x86_pmu.max_events. Make sure all users observe this constraint. Reported-by: Meelis Roos Signed-off-by: Peter Zijlstra (Intel) Tested-by: Meelis Roos commit 57e04eeda515ee979fec3bc3d64c408feae18acc Merge: 0f60a0bcc1b9 58b3bafff825 Author: Ingo Molnar Date: Tue Dec 17 12:28:02 2019 +0100 Merge tag 'perf-urgent-for-mingo-5.5-20191216' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes: perf top: Arnaldo Carvalho de Melo: - Do not bail out when perf_env__read_cpuid() returns ENOSYS, which has been reported happening on aarch64. perf metricgroup: Kajol Jain: - Fix printing event names of metric group with multiple events vendor events: x86: Ravi Bangoria: - Fix Kernel_Utilization metric. s390: Ed Maste: - Fix counter long description for DTLB1_GPAGE_WRITES and L1D_RO_EXCL_WRITES. perf header: Michael Petlan: - Fix false warning when there are no duplicate cache entries libtraceevent: Sudip Mukherjee: - Allow custom libdir path API headers: Arnaldo Carvalho de Melo: - Sync linux/kvm.h with the kernel sources. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit cde9319e884eb6267a0df446f3c131fe1108defb Author: Jerry Snitselaar Date: Thu Dec 12 22:36:42 2019 -0700 iommu/vt-d: Allocate reserved region for ISA with correct permission Currently the reserved region for ISA is allocated with no permissions. If a dma domain is being used, mapping this region will fail. Set the permissions to DMA_PTE_READ|DMA_PTE_WRITE. Cc: Joerg Roedel Cc: Lu Baolu Cc: iommu@lists.linux-foundation.org Cc: stable@vger.kernel.org # v5.3+ Fixes: d850c2ee5fe2 ("iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions") Signed-off-by: Jerry Snitselaar Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit d360211524bece6db9920f32c91808235290b51c Author: Jerry Snitselaar Date: Tue Dec 10 11:56:06 2019 -0700 iommu: set group default domain before creating direct mappings iommu_group_create_direct_mappings uses group->default_domain, but right after it is called, request_default_domain_for_dev calls iommu_domain_free for the default domain, and sets the group default domain to a different domain. Move the iommu_group_create_direct_mappings call to after the group default domain is set, so the direct mappings get associated with that domain. Cc: Joerg Roedel Cc: Lu Baolu Cc: iommu@lists.linux-foundation.org Cc: stable@vger.kernel.org Fixes: 7423e01741dd ("iommu: Add API to request DMA domain for device") Signed-off-by: Jerry Snitselaar Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel commit 75d18385394f56db76845d91a192532aba421875 Author: Lu Baolu Date: Wed Dec 11 09:40:15 2019 +0800 iommu/vt-d: Fix dmar pte read access not set error If the default DMA domain of a group doesn't fit a device, it will still sit in the group but use a private identity domain. When map/unmap/iova_to_phys come through iommu API, the driver should still serve them, otherwise, other devices in the same group will be impacted. Since identity domain has been mapped with the whole available memory space and RMRRs, we don't need to worry about the impact on it. Link: https://www.spinics.net/lists/iommu/msg40416.html Cc: Jerry Snitselaar Reported-by: Jerry Snitselaar Fixes: 942067f1b6b97 ("iommu/vt-d: Identify default domains replaced with private") Cc: stable@vger.kernel.org # v5.3+ Signed-off-by: Lu Baolu Reviewed-by: Jerry Snitselaar Tested-by: Jerry Snitselaar Signed-off-by: Joerg Roedel commit d55157f6aaca04df4223c2c7a96995ceda016a15 Author: Vandita Kulkarni Date: Mon Dec 16 13:36:19 2019 +0530 drm/i915: Fix WARN_ON condition for cursor plane ddb allocation In some cases like latency[level]==0, wm[level].res_lines>31, min_ddb_alloc can be U16_MAX, exclude it from the WARN_ON. v2: Specify the cases in which we hit U16_MAX, indentation (Ville) Fixes: 10a7e07b68b9 ("drm/i915: Make sure cursor has enough ddb for the selected wm level") Suggested-by: Ville Syrjälä Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191216080619.10945-1-vandita.kulkarni@intel.com (cherry picked from commit 4ba487019d1a196051feefab57f4a393815733b4) Signed-off-by: Joonas Lahtinen commit a11391b6f50689adb22c65df783e09143fafb794 Author: Enrico Weigelt, metux IT consult Date: Mon Dec 16 21:07:19 2019 +0100 scripts: package: mkdebian: add missing rsync dependency We've missed the dependency to rsync, so build fails on minimal containers. Fixes: 59b2bd05f5f4 ("kbuild: add 'headers' target to build up uapi headers in usr/include") Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Masahiro Yamada commit 272a72103012862e3a24ea06635253ead0b6e808 Author: Thomas Hebb Date: Mon Dec 9 00:19:17 2019 -0800 kconfig: don't crash on NULL expressions in expr_eq() NULL expressions are taken to always be true, as implemented by the expr_is_yes() macro and by several other functions in expr.c. As such, they ought to be valid inputs to expr_eq(), which compares two expressions. Signed-off-by: Thomas Hebb Signed-off-by: Masahiro Yamada commit d8018a0e9195ba9f0fb9cf0fd3843807c8b952d5 Author: Alex Williamson Date: Wed Dec 11 13:28:29 2019 -0700 iommu/vt-d: Set ISA bridge reserved region as relaxable Commit d850c2ee5fe2 ("iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions") created a direct-mapped reserved memory region in order to replace the static identity mapping of the ISA address space, where the latter was then removed in commit df4f3c603aeb ("iommu/vt-d: Remove static identity map code"). According to the history of this code and the Kconfig option surrounding it, this direct mapping exists for the benefit of legacy ISA drivers that are not compatible with the DMA API. In conjuntion with commit 9b77e5c79840 ("vfio/type1: check dma map request is within a valid iova range") this change introduced a regression where the vfio IOMMU backend enforces reserved memory regions per IOMMU group, preventing userspace from creating IOMMU mappings conflicting with prescribed reserved regions. A necessary prerequisite for the vfio change was the introduction of "relaxable" direct mappings introduced by commit adfd37382090 ("iommu: Introduce IOMMU_RESV_DIRECT_RELAXABLE reserved memory regions"). These relaxable direct mappings provide the same identity mapping support in the default domain, but also indicate that the reservation is software imposed and may be relaxed under some conditions, such as device assignment. Convert the ISA bridge direct-mapped reserved region to relaxable to reflect that the restriction is self imposed and need not be enforced by drivers such as vfio. Fixes: 1c5c59fbad20 ("iommu/vt-d: Differentiate relaxable and non relaxable RMRRs") Cc: stable@vger.kernel.org # v5.3+ Link: https://lore.kernel.org/linux-iommu/20191211082304.2d4fab45@x1.home Reported-by: cprt Tested-by: cprt Signed-off-by: Alex Williamson Acked-by: Lu Baolu Reviewed-by: Eric Auger Tested-by: Jerry Snitselaar Reviewed-by: Jerry Snitselaar Signed-off-by: Joerg Roedel commit a9920d3bad40201ee8ab1da36bee4674f7e50d69 Author: Tadeusz Struk Date: Thu Dec 12 09:48:59 2019 -0800 tpm: selftest: cleanup after unseal with wrong auth/policy test Unseal with wrong auth or wrong policy test affects DA lockout and eventually causes the tests to fail with: "ProtocolError: TPM_RC_LOCKOUT: rc=0x00000921" when the tests run multiple times. Send tpm clear command after the test to reset the DA counters. Signed-off-by: Tadeusz Struk Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 8f84bddcfac9117564721ead494db7a604fdf861 Author: Tadeusz Struk Date: Thu Dec 12 09:48:53 2019 -0800 tpm: selftest: add test covering async mode Add a test that sends a tpm cmd in an async mode. Currently there is a gap in test coverage with regards to this functionality. Signed-off-by: Tadeusz Struk Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit d23d12484307b40eea549b8a858f5fffad913897 Author: Tadeusz Struk Date: Thu Dec 12 09:48:47 2019 -0800 tpm: fix invalid locking in NONBLOCKING mode When an application sends TPM commands in NONBLOCKING mode the driver holds chip->tpm_mutex returning from write(), which triggers: "WARNING: lock held when returning to user space". To fix this issue the driver needs to release the mutex before returning and acquire it again in tpm_dev_async_work() before sending the command. Cc: stable@vger.kernel.org Fixes: 9e1b74a63f776 (tpm: add support for nonblocking operation) Reported-by: Jeffrin Jose T Tested-by: Jeffrin Jose T Signed-off-by: Tadeusz Struk Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit bd036d2fdd374fa252abfc221e1a1280eee42f89 Author: Robin Murphy Date: Wed Dec 11 18:33:26 2019 +0000 iommu/dma: Rationalise types for DMA masks Since iommu_dma_alloc_iova() combines incoming masks with the u64 bus limit, it makes more sense to pass them around in their native u64 rather than converting to dma_addr_t early. Do that, and resolve the remaining type discrepancy against the domain geometry with a cheeky cast to keep things simple. Signed-off-by: Robin Murphy Reviewed-by: Christoph Hellwig Tested-by: Nathan Chancellor # build Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Joerg Roedel commit 472d26df5e8075eda677b6be730e0fbf434ff2a8 Author: Xiaotao Yin Date: Tue Dec 10 12:27:04 2019 +0800 iommu/iova: Init the struct iova to fix the possible memleak During ethernet(Marvell octeontx2) set ring buffer test: ethtool -G eth1 rx tx following kmemleak will happen sometimes: unreferenced object 0xffff000b85421340 (size 64): comm "ethtool", pid 867, jiffies 4295323539 (age 550.500s) hex dump (first 64 bytes): 80 13 42 85 0b 00 ff ff ff ff ff ff ff ff ff ff ..B............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ ff ff ff ff ff ff ff ff 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: [<000000001b204ddf>] kmem_cache_alloc+0x1b0/0x350 [<00000000d9ef2e50>] alloc_iova+0x3c/0x168 [<00000000ea30f99d>] alloc_iova_fast+0x7c/0x2d8 [<00000000b8bb2f1f>] iommu_dma_alloc_iova.isra.0+0x12c/0x138 [<000000002f1a43b5>] __iommu_dma_map+0x8c/0xf8 [<00000000ecde7899>] iommu_dma_map_page+0x98/0xf8 [<0000000082004e59>] otx2_alloc_rbuf+0xf4/0x158 [<000000002b107f6b>] otx2_rq_aura_pool_init+0x110/0x270 [<00000000c3d563c7>] otx2_open+0x15c/0x734 [<00000000a2f5f3a8>] otx2_dev_open+0x3c/0x68 [<00000000456a98b5>] otx2_set_ringparam+0x1ac/0x1d4 [<00000000f2fbb819>] dev_ethtool+0xb84/0x2028 [<0000000069b67c5a>] dev_ioctl+0x248/0x3a0 [<00000000af38663a>] sock_ioctl+0x280/0x638 [<000000002582384c>] do_vfs_ioctl+0x8b0/0xa80 [<000000004e1a2c02>] ksys_ioctl+0x84/0xb8 The reason: When alloc_iova_mem() without initial with Zero, sometimes fpn_lo will equal to IOVA_ANCHOR by chance, so when return with -ENOMEM(iova32_full) from __alloc_and_insert_iova_range(), the new_iova will not be freed in free_iova_mem(). Fixes: bb68b2fbfbd6 ("iommu/iova: Add rbtree anchor node") Signed-off-by: Xiaotao Yin Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit 45477b3fe3d10376b649b1b85fce72b2f9f1da84 Author: James Bottomley Date: Thu Dec 12 12:58:35 2019 -0500 security: keys: trusted: fix lost handle flush The original code, before it was moved into security/keys/trusted-keys had a flush after the blob unseal. Without that flush, the volatile handles increase in the TPM until it becomes unusable and the system either has to be rebooted or the TPM volatile area manually flushed. Fix by adding back the lost flush, which we now have to export because of the relocation of the trusted key code may cause the consumer to be modular. Signed-off-by: James Bottomley Fixes: 2e19e10131a0 ("KEYS: trusted: Move TPM2 trusted keys code") Reviewed-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit a3a57ddad061acc90bef39635caf2b2330ce8f21 Author: Jan H. Schönherr Date: Tue Dec 10 01:07:30 2019 +0100 x86/mce: Fix possibly incorrect severity calculation on AMD The function mce_severity_amd_smca() requires m->bank to be initialized for correct operation. Fix the one case, where mce_severity() is called without doing so. Fixes: 6bda529ec42e ("x86/mce: Grade uncorrected errors for SMCA-enabled systems") Fixes: d28af26faa0b ("x86/MCE: Initialize mce.bank in the case of a fatal error in mce_no_way_out()") Signed-off-by: Jan H. Schönherr Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Cc: Thomas Gleixner Cc: x86-ml Cc: Yazen Ghannam Link: https://lkml.kernel.org/r/20191210000733.17979-4-jschoenh@amazon.de commit 966af20929ac24360ba3fac5533eb2ab003747da Author: Yazen Ghannam Date: Thu Nov 21 08:15:08 2019 -0600 x86/MCE/AMD: Allow Reserved types to be overwritten in smca_banks[] Each logical CPU in Scalable MCA systems controls a unique set of MCA banks in the system. These banks are not shared between CPUs. The bank types and ordering will be the same across CPUs on currently available systems. However, some CPUs may see a bank as Reserved/Read-as-Zero (RAZ) while other CPUs do not. In this case, the bank seen as Reserved on one CPU is assumed to be the same type as the bank seen as a known type on another CPU. In general, this occurs when the hardware represented by the MCA bank is disabled, e.g. disabled memory controllers on certain models, etc. The MCA bank is disabled in the hardware, so there is no possibility of getting an MCA/MCE from it even if it is assumed to have a known type. For example: Full system: Bank | Type seen on CPU0 | Type seen on CPU1 ------------------------------------------------ 0 | LS | LS 1 | UMC | UMC 2 | CS | CS System with hardware disabled: Bank | Type seen on CPU0 | Type seen on CPU1 ------------------------------------------------ 0 | LS | LS 1 | UMC | RAZ 2 | CS | CS For this reason, there is a single, global struct smca_banks[] that is initialized at boot time. This array is initialized on each CPU as it comes online. However, the array will not be updated if an entry already exists. This works as expected when the first CPU (usually CPU0) has all possible MCA banks enabled. But if the first CPU has a subset, then it will save a "Reserved" type in smca_banks[]. Successive CPUs will then not be able to update smca_banks[] even if they encounter a known bank type. This may result in unexpected behavior. Depending on the system configuration, a user may observe issues enumerating the MCA thresholding sysfs interface. The issues may be as trivial as sysfs entries not being available, or as severe as system hangs. For example: Bank | Type seen on CPU0 | Type seen on CPU1 ------------------------------------------------ 0 | LS | LS 1 | RAZ | UMC 2 | CS | CS Extend the smca_banks[] entry check to return if the entry is a non-reserved type. Otherwise, continue so that CPUs that encounter a known bank type can update smca_banks[]. Fixes: 68627a697c19 ("x86/mce/AMD, EDAC/mce_amd: Enumerate Reserved SMCA bank type") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/20191121141508.141273-1-Yazen.Ghannam@amd.com commit 246ff09f89e54fdf740a8d496176c86743db3ec7 Author: Konstantin Khlebnikov Date: Thu Oct 31 16:04:48 2019 +0300 x86/MCE/AMD: Do not use rdmsr_safe_on_cpu() in smca_configure() ... because interrupts are disabled that early and sending IPIs can deadlock: BUG: sleeping function called from invalid context at kernel/sched/completion.c:99 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1 no locks held by swapper/1/0. irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8b9/0x1ca0 softirqs last enabled at (0): [] copy_process+0x8b9/0x1ca0 softirqs last disabled at (0): [<0000000000000000>] 0x0 Preemption disabled at: [] start_secondary+0x3b/0x190 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.5.0-rc2+ #1 Hardware name: GIGABYTE MZ01-CE1-00/MZ01-CE1-00, BIOS F02 08/29/2018 Call Trace: dump_stack ___might_sleep.cold.92 wait_for_completion ? generic_exec_single rdmsr_safe_on_cpu ? wrmsr_on_cpus mce_amd_feature_init mcheck_cpu_init identify_cpu identify_secondary_cpu smp_store_cpu_info start_secondary secondary_startup_64 The function smca_configure() is called only on the current CPU anyway, therefore replace rdmsr_safe_on_cpu() with atomic rdmsr_safe() and avoid the IPI. [ bp: Update commit message. ] Signed-off-by: Konstantin Khlebnikov Signed-off-by: Borislav Petkov Reviewed-by: Yazen Ghannam Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/157252708836.3876.4604398213417262402.stgit@buzz commit 1c226017d3ec93547b58082bdf778d9db7401c95 Author: Marek Szyprowski Date: Wed Dec 11 15:52:17 2019 +0100 ARM: dts: sun8i: a83t: Correct USB3503 GPIOs polarity Current USB3503 driver ignores GPIO polarity and always operates as if the GPIO lines were flagged as ACTIVE_HIGH. Fix the polarity for the existing USB3503 chip applications to match the chip specification and common convention for naming the pins. The only pin, which has to be ACTIVE_LOW is the reset pin. The remaining are ACTIVE_HIGH. This change allows later to fix the USB3503 driver to properly use generic GPIO bindings and read polarity from DT. Signed-off-by: Marek Szyprowski Signed-off-by: Maxime Ripard commit d3aa8de6b5d0853c43c616586b4e232aa1fa7de9 Author: Brendan Higgins Date: Wed Dec 11 11:27:41 2019 -0800 staging: axis-fifo: add unspecified HAS_IOMEM dependency Currently CONFIG_XIL_AXIS_FIFO=y implicitly depends on CONFIG_HAS_IOMEM=y; consequently, on architectures without IOMEM we get the following build error: ld: drivers/staging/axis-fifo/axis-fifo.o: in function `axis_fifo_probe': drivers/staging/axis-fifo/axis-fifo.c:809: undefined reference to `devm_ioremap_resource' Fix the build error by adding the unspecified dependency. Reported-by: Brendan Higgins Signed-off-by: Brendan Higgins Link: https://lore.kernel.org/r/20191211192742.95699-7-brendanhiggins@google.com Signed-off-by: Greg Kroah-Hartman commit ab42b48f32d4c766420c3499ee9c0289b7028182 Author: Ian Abbott Date: Mon Dec 16 11:08:23 2019 +0000 staging: comedi: gsc_hpdi: check dma_alloc_coherent() return value The "auto-attach" handler function `gsc_hpdi_auto_attach()` calls `dma_alloc_coherent()` in a loop to allocate some DMA data buffers, and also calls it to allocate a buffer for a DMA descriptor chain. However, it does not check the return value of any of these calls. Change `gsc_hpdi_auto_attach()` to return `-ENOMEM` if any of these `dma_alloc_coherent()` calls fail. This will result in the comedi core calling the "detach" handler `gsc_hpdi_detach()` as part of the clean-up, which will call `gsc_hpdi_free_dma()` to free any allocated DMA coherent memory buffers. Cc: #4.6+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20191216110823.216237-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 228b607d8ea1b7d4561945058d5692709099d432 Author: Marcus Comstedt Date: Sun Dec 15 10:49:00 2019 +0100 KVM: PPC: Book3S HV: Fix regression on big endian hosts VCPU_CR is the offset of arch.regs.ccr in kvm_vcpu. arch/powerpc/include/asm/kvm_host.h defines arch.regs as a struct pt_regs, and arch/powerpc/include/asm/ptrace.h defines the ccr field of pt_regs as "unsigned long ccr". Since unsigned long is 64 bits, a 64-bit load needs to be used to load it, unless an endianness specific correction offset is added to access the desired subpart. In this case there is no reason to _not_ use a 64 bit load though. Fixes: 6c85b7bc637b ("powerpc/kvm: Use UV_RETURN ucall to return to ultravisor") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Marcus Comstedt Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191215094900.46740-1-marcus@mc.pp.se commit ad125c6c05921091daf8ac6f01b5665d5401741b Merge: 95bed1a9fb2b 6fc232db9e8c Author: David S. Miller Date: Mon Dec 16 19:26:11 2019 -0800 Merge tag 'mac80211-for-net-2019-10-16' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A handful of fixes: * disable AQL on most drivers, addressing the iwlwifi issues * fix double-free on network namespace changes * fix TID field in frames injected through monitor interfaces * fix ieee80211_calc_rx_airtime() * fix NULL pointer dereference in rfkill (and remove BUG_ON) ==================== Signed-off-by: David S. Miller commit 95bed1a9fb2b7ee13b58d0d29710282a62082a89 Author: Arnd Bergmann Date: Mon Dec 16 00:12:14 2019 +0200 net: dsa: ocelot: add NET_VENDOR_MICROSEMI dependency Selecting MSCC_OCELOT_SWITCH is not possible when NET_VENDOR_MICROSEMI is disabled: WARNING: unmet direct dependencies detected for MSCC_OCELOT_SWITCH Depends on [n]: NETDEVICES [=y] && ETHERNET [=n] && NET_VENDOR_MICROSEMI [=n] && NET_SWITCHDEV [=y] && HAS_IOMEM [=y] Selected by [m]: - NET_DSA_MSCC_FELIX [=m] && NETDEVICES [=y] && HAVE_NET_DSA [=y] && NET_DSA [=y] && PCI [=y] Add a Kconfig dependency on NET_VENDOR_MICROSEMI, which also implies CONFIG_NETDEVICES. Depending on a vendor config violates menuconfig locality for the DSA driver, but is the smallest compromise since all other solutions are much more complicated (see [0]). https://www.spinics.net/lists/netdev/msg618808.html Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family") Signed-off-by: Arnd Bergmann Signed-off-by: Mao Wenan Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5e822e44cecec1ea48925630aa31dfac827fd202 Author: Gao Fred Date: Tue Dec 17 11:19:58 2019 +0800 drm/i915/gvt: Fix guest boot warning Simulate MIA core in reset status once GUC engine is reset. v2: 1. use vgpu_vreg_t() function, 2. clear MIA_IN_RESET after reading. (Zhenyu) v3: add comments. (Zhenyu) Signed-off-by: Gao Fred Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20191216160255.29499-1-fred.gao@intel.com commit 201743b99c0548ffa8ddbd2571b1dcf4d79b73a9 Author: Arnd Bergmann Date: Mon Dec 16 14:16:49 2019 +0100 scsi: lpfc: fix build failure with DEBUGFS disabled A recent change appears to have moved an #endif by accident: drivers/scsi/lpfc/lpfc_debugfs.c:5393:18: error: 'lpfc_debugfs_dumpHBASlim_open' undeclared here (not in a function); did you mean 'lpfc_debugfs_op_dumpHBASlim'? drivers/scsi/lpfc/lpfc_debugfs.c:5394:18: error: 'lpfc_debugfs_lseek' undeclared here (not in a function); did you mean 'lpfc_debugfs_nvme_trc'? drivers/scsi/lpfc/lpfc_debugfs.c:5395:18: error: 'lpfc_debugfs_read' undeclared here (not in a function); did you mean 'lpfc_debug_dump_q'? drivers/scsi/lpfc/lpfc_debugfs.c:5396:18: error: 'lpfc_debugfs_release' undeclared here (not in a function); did you mean 'lpfc_debugfs_terminate'? drivers/scsi/lpfc/lpfc_debugfs.c:5402:18: error: 'lpfc_debugfs_dumpHostSlim_open' undeclared here (not in a function); did you mean 'lpfc_debugfs_op_dumpHostSlim'? Move it back to where it was previously. Fixes: 95bfc6d8ad86 ("scsi: lpfc: Make FW logging dynamically configurable") Link: https://lore.kernel.org/r/20191216131701.3125077-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Reviewed-by: James Smart Signed-off-by: Martin K. Petersen commit ee560e7bbab0c10cf3f0e71997fbc354ab2ee5cb Author: Dan Carpenter Date: Tue Dec 3 12:36:52 2019 +0300 scsi: mpt3sas: Fix double free in attach error handling The caller also calls _base_release_memory_pools() on error so it leads to a number of double frees: drivers/scsi/mpt3sas/mpt3sas_base.c:7207 mpt3sas_base_attach() warn: 'ioc->chain_dma_pool' double freed drivers/scsi/mpt3sas/mpt3sas_base.c:7207 mpt3sas_base_attach() warn: 'ioc->hpr_lookup' double freed drivers/scsi/mpt3sas/mpt3sas_base.c:7207 mpt3sas_base_attach() warn: 'ioc->internal_lookup' double freed drivers/scsi/mpt3sas/mpt3sas_base.c:7207 mpt3sas_base_attach() warn: 'ioc->pcie_sgl_dma_pool' double freed drivers/scsi/mpt3sas/mpt3sas_base.c:7207 mpt3sas_base_attach() warn: 'ioc->reply_dma_pool' double freed drivers/scsi/mpt3sas/mpt3sas_base.c:7207 mpt3sas_base_attach() warn: 'ioc->reply_free_dma_pool' double freed drivers/scsi/mpt3sas/mpt3sas_base.c:7207 mpt3sas_base_attach() warn: 'ioc->reply_post_free_array_dma_pool' double freed drivers/scsi/mpt3sas/mpt3sas_base.c:7207 mpt3sas_base_attach() warn: 'ioc->reply_post_free_dma_pool' double freed drivers/scsi/mpt3sas/mpt3sas_base.c:7207 mpt3sas_base_attach() warn: 'ioc->sense_dma_pool' double freed Fixes: 74522a92bbf0 ("scsi: mpt3sas: Optimize I/O memory consumption in driver.") Link: https://lore.kernel.org/r/20191203093652.gyntgvnkw2udatyc@kili.mountain Signed-off-by: Dan Carpenter Acked-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit e18e0f6b7c8f220774dd68965e8a9b046905acc8 Author: Jitao Shi Date: Fri Dec 13 17:52:15 2019 +0800 drm/mediatek: reduce the hbp and hfp for phy timing There are some extra data transfer in dsi. ex. LPX, hs_prepare, hs_zero, hs_exit and the sof/eof of dsi packet. This signal will enlarge the line time. So the real frame on dsi bus will be lower than calc by video timing. So dsi driver reduces the hbp and hfp to keep the line time. Fixes: 7a5bc4e22ecf ("drm/mediatek: change the dsi phytiming calculate method") Signed-off-by: Jitao Shi Tested-by: Hsin-Yi Wang Tested-by: Enric Balletbo i Serra Signed-off-by: CK Hu commit 21df4a8b6018b842d4db181a8b24166006bad3cd Author: Jerry Snitselaar Date: Wed Dec 11 16:54:55 2019 -0700 tpm_tis: reserve chip for duration of tpm_tis_core_init Instead of repeatedly calling tpm_chip_start/tpm_chip_stop when issuing commands to the tpm during initialization, just reserve the chip after wait_startup, and release it when we are ready to call tpm_chip_register. Cc: Christian Bundy Cc: Dan Williams Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Stefan Berger Cc: stable@vger.kernel.org Cc: linux-integrity@vger.kernel.org Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()") Fixes: 5b359c7c4372 ("tpm_tis_core: Turn on the TPM before probing IRQ's") Suggested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen commit ea200dec51285c82655e50ddb774fdb6b97e784d Merge: 6afa873170a6 e3992af1256a Author: Linus Torvalds Date: Mon Dec 16 16:43:07 2019 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "I didn't get a batch in this weekend, so here's what we queued up last week and today. - A couple of defconfigs add back debugfs -- it used to be implicitly enabled through CONFIG_TRACING, but 0e4a459f56c32d3e ("tracing: Remove unnecessary DEBUG_FS dependency") removed that. - The rest are mostly minor fixlets of the usual kind; some DT tweaks, a headerfile refactor that needs a build fix now, etc" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (30 commits) ARM: bcm: Add missing sentinel to bcm2711_compat[] ARM: shmobile: defconfig: Restore debugfs support bus: ti-sysc: Fix missing reset delay handling ARM: imx: Fix boot crash if ocotp is not found ARM: imx_v6_v7_defconfig: Explicitly restore CONFIG_DEBUG_FS ARM: dts: imx6ul-evk: Fix peripheral regulator arm64: dts: ls1028a: fix reboot node ARM: mmp: include the correct cputype.h ARM: dts: am437x-gp/epos-evm: fix panel compatible arm64: dts: ls1028a: fix typo in TMU calibration data ARM: imx: Correct ocotp id for serial number support of i.MX6ULL/ULZ SoCs ARM: dts: bcm283x: Fix critical trip point ARM: omap2plus_defconfig: Add back DEBUG_FS ARM: omap2plus_defconfig: enable NET_SWITCHDEV ARM: dts: am335x-sancloud-bbe: fix phy mode bus: ti-sysc: Fix missing force mstandby quirk handling reset: Do not register resource data for missing resets reset: Fix {of,devm}_reset_control_array_get kerneldoc return types reset: brcmstb: Remove resource checks dt-bindings: reset: Fix brcmstb-reset example ... commit f37f710353677639bc5d37ee785335994adf2529 Author: Navid Emamdoost Date: Sat Dec 14 19:10:44 2019 -0600 net: gemini: Fix memory leak in gmac_setup_txqs In the implementation of gmac_setup_txqs() the allocated desc_ring is leaked if TX queue base is not aligned. Release it via dma_free_coherent. Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet") Signed-off-by: Navid Emamdoost Reviewed-by: Linus Walleij Signed-off-by: David S. Miller commit 63cc54a6f0736a432b04308a74677ab0ba8a58ee Author: Florian Fainelli Date: Fri Dec 13 12:00:27 2019 -0800 net: dsa: b53: Fix egress flooding settings There were several issues with 53568438e381 ("net: dsa: b53: Add support for port_egress_floods callback") that resulted in breaking connectivity for standalone ports: - both user and CPU ports must allow unicast and multicast forwarding by default otherwise this just flat out breaks connectivity for standalone DSA ports - IP multicast is treated similarly as multicast, but has separate control registers - the UC, MC and IPMC lookup failure register offsets were wrong, and instead used bit values that are meaningful for the B53_IP_MULTICAST_CTRL register Fixes: 53568438e381 ("net: dsa: b53: Add support for port_egress_floods callback") Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit 1865a7b3471e183bca3ea59c3a6c1950cc9c48ee Merge: fd42bfd1bb31 4aaf596148f4 Author: David S. Miller Date: Mon Dec 16 16:07:12 2019 -0800 Merge branch 'vsock-fixes' Stefano Garzarella says: ==================== vsock/virtio: fix null-pointer dereference and related precautions This series mainly solves a possible null-pointer dereference in virtio_transport_recv_listen() introduced with the multi-transport support [PATCH 1]. PATCH 2 adds a WARN_ON check for the same potential issue and a returned error in the virtio_transport_send_pkt_info() function to avoid crashing the kernel. ==================== Signed-off-by: David S. Miller commit 4aaf596148f4b518244cf2b02fafc53ad586dd6b Author: Stefano Garzarella Date: Fri Dec 13 19:48:01 2019 +0100 vsock/virtio: add WARN_ON check on virtio_transport_get_ops() virtio_transport_get_ops() and virtio_transport_send_pkt_info() can only be used on connecting/connected sockets, since a socket assigned to a transport is required. This patch adds a WARN_ON() on virtio_transport_get_ops() to check this requirement, a comment and a returned error on virtio_transport_send_pkt_info(), Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit df18fa14629ae3ae10f51577642113ccc8ce87d1 Author: Stefano Garzarella Date: Fri Dec 13 19:48:00 2019 +0100 vsock/virtio: fix null-pointer dereference in virtio_transport_recv_listen() With multi-transport support, listener sockets are not bound to any transport. So, calling virtio_transport_reset(), when an error occurs, on a listener socket produces the following null-pointer dereference: BUG: kernel NULL pointer dereference, address: 00000000000000e8 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 0 PID: 20 Comm: kworker/0:1 Not tainted 5.5.0-rc1-ste-00003-gb4be21f316ac-dirty #56 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 Workqueue: virtio_vsock virtio_transport_rx_work [vmw_vsock_virtio_transport] RIP: 0010:virtio_transport_send_pkt_info+0x20/0x130 [vmw_vsock_virtio_transport_common] Code: 1f 84 00 00 00 00 00 0f 1f 00 55 48 89 e5 41 57 41 56 41 55 49 89 f5 41 54 49 89 fc 53 48 83 ec 10 44 8b 76 20 e8 c0 ba fe ff <48> 8b 80 e8 00 00 00 e8 64 e3 7d c1 45 8b 45 00 41 8b 8c 24 d4 02 RSP: 0018:ffffc900000b7d08 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff88807bf12728 RCX: 0000000000000000 RDX: ffff88807bf12700 RSI: ffffc900000b7d50 RDI: ffff888035c84000 RBP: ffffc900000b7d40 R08: ffff888035c84000 R09: ffffc900000b7d08 R10: ffff8880781de800 R11: 0000000000000018 R12: ffff888035c84000 R13: ffffc900000b7d50 R14: 0000000000000000 R15: ffff88807bf12724 FS: 0000000000000000(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000e8 CR3: 00000000790f4004 CR4: 0000000000160ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: virtio_transport_reset+0x59/0x70 [vmw_vsock_virtio_transport_common] virtio_transport_recv_pkt+0x5bb/0xe50 [vmw_vsock_virtio_transport_common] ? detach_buf_split+0xf1/0x130 virtio_transport_rx_work+0xba/0x130 [vmw_vsock_virtio_transport] process_one_work+0x1c0/0x300 worker_thread+0x45/0x3c0 kthread+0xfc/0x130 ? current_work+0x40/0x40 ? kthread_park+0x90/0x90 ret_from_fork+0x35/0x40 Modules linked in: sunrpc kvm_intel kvm vmw_vsock_virtio_transport vmw_vsock_virtio_transport_common irqbypass vsock virtio_rng rng_core CR2: 00000000000000e8 ---[ end trace e75400e2ea2fa824 ]--- This happens because virtio_transport_reset() calls virtio_transport_send_pkt_info() that can be used only on connecting/connected sockets. This patch fixes the issue, using virtio_transport_reset_no_sock() instead of virtio_transport_reset() when we are handling a listener socket. Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 1c05839aa973cfae8c3db964a21f9c0eef8fcc21 Author: Mike Christie Date: Sun Dec 8 16:51:50 2019 -0600 nbd: fix shutdown and recv work deadlock v2 This fixes a regression added with: commit e9e006f5fcf2bab59149cb38a48a4817c1b538b4 Author: Mike Christie Date: Sun Aug 4 14:10:06 2019 -0500 nbd: fix max number of supported devs where we can deadlock during device shutdown. The problem occurs if the recv_work's nbd_config_put occurs after nbd_start_device_ioctl has returned and the userspace app has droppped its reference via closing the device and running nbd_release. The recv_work nbd_config_put call would then drop the refcount to zero and try to destroy the config which would try to do destroy_workqueue from the recv work. This patch just has nbd_start_device_ioctl do a flush_workqueue when it wakes so we know after the ioctl returns running works have exited. This also fixes a possible race where we could try to reuse the device while old recv_works are still running. Cc: stable@vger.kernel.org Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs") Signed-off-by: Mike Christie Signed-off-by: Jens Axboe commit d7bd15a138aef3be227818aad9c501e43c89c8c5 Author: Tejun Heo Date: Mon Dec 16 13:34:00 2019 -0800 iocost: over-budget forced IOs should schedule async delay When over-budget IOs are force-issued through root cgroup, iocg_kick_delay() adjusts the async delay accordingly but doesn't actually schedule async throttle for the issuing task. This bug is pretty well masked because sooner or later the offending threads are gonna get directly throttled on regular IOs or have async delay scheduled by mem_cgroup_throttle_swaprate(). However, it can affect control quality on filesystem metadata heavy operations. Let's fix it by invoking blkcg_schedule_throttle() when iocg_kick_delay() says async delay is needed. Signed-off-by: Tejun Heo Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Cc: stable@vger.kernel.org Reported-by: Josef Bacik Signed-off-by: Jens Axboe commit 2c81f0f6d3f52ac222a5dc07a6e5c06e1543e88b Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 bus: ti-sysc: Fix iterating over clocks Commit d878970f6ce1 ("bus: ti-sysc: Add separate functions for handling clocks") separated handling of optional clocks from the main clocks, but introduced an issue where we do not necessarily allocate a slot for both fck and ick clocks, but still assume fixed slots for enumerating over the clocks. Let's fix the issue by ensuring we always have slots for both fck and ick even if we don't use ick, and don't attempt to enumerate optional clocks if not allocated. In the long run we might want to simplify things a bit by only allocating space only for the optional clocks as we have only few devices with optional clocks. Fixes: d878970f6ce1 ("bus: ti-sysc: Add separate functions for handling clocks") Signed-off-by: Tony Lindgren commit 90bdfa0b05e3cc809a7c1aa3b1f162b46ea1b330 Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 ARM: OMAP2+: Fix ti_sysc_find_one_clockdomain to check for to_clk_hw_omap We must bail out early if the clock is not hw_omap. Otherwise we will try to access invalid address with hwclk->clkdm_name: Unable to handle kernel paging request at virtual address ffffffff Internal error: Oops: 27 [#1] ARM ... (strcmp) from [] (clkdm_lookup+0x40/0x60) [] (clkdm_lookup) from [] (ti_sysc_clkdm_init+0x5c/0x64) [] (ti_sysc_clkdm_init) from [] (sysc_probe+0x948/0x117c) [] (sysc_probe) from [] (platform_drv_probe+0x48/0x98) ... Fixes: 2b2f7def058a ("bus: ti-sysc: Add support for missing clockdomain handling") Signed-off-by: Tony Lindgren commit 210de0e996aee8e360ccc9e173fe7f0a7ed2f695 Author: Dinh Nguyen Date: Wed Nov 20 09:15:17 2019 -0600 arm64: dts: agilex/stratix10: fix pmu interrupt numbers Fix up the correct interrupt numbers for the PMU unit on Agilex and Stratix10. Fixes: 78cd6a9d8e15 ("arm64: dts: Add base stratix 10 dtsi") Cc: linux-stable Reported-by: Meng Li Signed-off-by: Dinh Nguyen commit e3992af1256a4fe0b83ac790d4caa58ff731609d Merge: c3e5ac0c9e98 59034b9d6af8 Author: Olof Johansson Date: Mon Dec 16 11:33:29 2019 -0800 Merge tag 'arm-soc/for-5.5/soc-fixes' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains Broadcom ARM-based SoCs machine fixes for 5.5-rc1, please pull the following: - H. Nikolaus adds a missing sentinel entry to the BCM2711 machine descriptor compatible array which would make multiplatform kernels fail to boot * tag 'arm-soc/for-5.5/soc-fixes' of https://github.com/Broadcom/stblinux: ARM: bcm: Add missing sentinel to bcm2711_compat[] Link: https://lore.kernel.org/r/20191216035701.15534-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit c3e5ac0c9e98af139500e64ef413cefcf311eaff Merge: cf21d4fde012 a2315d3aea59 Author: Olof Johansson Date: Mon Dec 16 11:33:13 2019 -0800 Merge tag 'samsung-fixes-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/fixes Samsung fixes for v5.5 1. Restore debugfs support in exynos_defconfig (as now it is not selected as dependency of tracing). Debugfs is required by systemd and several tests. 2. Maintainers updates. * tag 'samsung-fixes-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos_defconfig: Restore debugfs support MAINTAINERS: Include Samsung SoC serial driver in Samsung SoC entry MAINTAINERS: Update Lukasz Luba's email address Link: https://lore.kernel.org/r/20191215121316.32091-1-krzk@kernel.org Signed-off-by: Olof Johansson commit cf21d4fde012969ab6df3fa10976fd7e0bfcd3f7 Merge: 9a4b8148562d fa2cdb1762d1 Author: Olof Johansson Date: Mon Dec 16 11:33:04 2019 -0800 Merge tag 'renesas-fixes-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes Renesas fixes for v5.5 - Restore debugfs support * tag 'renesas-fixes-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: defconfig: Restore debugfs support Link: https://lore.kernel.org/r/20191213213719.18122-1-geert+renesas@glider.be Signed-off-by: Olof Johansson commit a2ea07465c8d7984cc6b8b1f0b3324f9b138094a Author: Daniel Borkmann Date: Mon Dec 16 17:49:00 2019 +0100 bpf: Fix missing prog untrack in release_maps Commit da765a2f5993 ("bpf: Add poke dependency tracking for prog array maps") wrongly assumed that in case of prog load errors, we're cleaning up all program tracking via bpf_free_used_maps(). However, it can happen that we're still at the point where we didn't copy map pointers into the prog's aux section such that env->prog->aux->used_maps is still zero, running into a UAF. In such case, the verifier has similar release_maps() helper that drops references to used maps from its env. Consolidate the release code into __bpf_free_used_maps() and call it from all sides to fix it. Fixes: da765a2f5993 ("bpf: Add poke dependency tracking for prog array maps") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/1c2909484ca524ae9f55109b06f22b6213e76376.1576514756.git.daniel@iogearbox.net commit 6afa873170a612b2b9e392c19c523ed8aae6fbc9 Merge: 4c80ba392bf6 4eac734486fd Author: Linus Torvalds Date: Mon Dec 16 10:06:04 2019 -0800 Merge tag 'linux-kselftest-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: - ftrace and safesetid test fixes from Masami Hiramatsu - Kunit fixes from Brendan Higgins, Iurii Zaikin, and Heidi Fahim - Kselftest framework fixes from SeongJae Park and Michael Ellerman * tag 'linux-kselftest-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kselftest: Support old perl versions kselftest/runner: Print new line in print of timeout log selftests: Fix dangling documentation references to kselftest_module.sh Documentation: kunit: add documentation for kunit_tool Documentation: kunit: fix typos and gramatical errors kunit: testing kunit: Bug fix in test_run_timeout function fs/ext4/inode-test: Fix inode test on 32 bit platforms. selftests: safesetid: Fix Makefile to set correct test program selftests: safesetid: Check the return value of setuid/setgid selftests: safesetid: Move link library to LDLIBS selftests/ftrace: Fix multiple kprobe testcase selftests/ftrace: Do not to use absolute debugfs path selftests/ftrace: Fix ftrace test cases to check unsupported selftests/ftrace: Fix to check the existence of set_ftrace_filter commit 6956eb33abb5deab2cd916b4c31226b57736bc3c Author: Alexandre Belloni Date: Thu Nov 28 11:25:31 2019 +0100 clk: at91: fix possible deadlock Lockdep warns about a possible circular locking dependency because using syscon_node_to_regmap() will make the created regmap get and enable the first clock it can parse from the device tree. This clock is not needed to access the registers and should not be enabled at that time. Use the recently introduced device_node_to_regmap to solve that as it looks up the regmap in the same list but doesn't care about the clocks. Reported-by: Michał Mirosław Signed-off-by: Alexandre Belloni Link: https://lkml.kernel.org/r/20191128102531.817549-1-alexandre.belloni@bootlin.com Tested-by: Michał Mirosław Signed-off-by: Stephen Boyd commit e0ff126ee7ad405c1ef531f9f3db92929de4f20f Author: Jan Kara Date: Mon Dec 16 11:54:32 2019 +0100 pipe: Fix bogus dereference in iov_iter_alignment() We cannot look at 'i->pipe' unless we know the iter is a pipe. Move the ring_size load to a branch in iov_iter_alignment() where we've already checked the iter is a pipe to avoid bogus dereference. Reported-by: syzbot+bea68382bae9490e7dd6@syzkaller.appspotmail.com Fixes: 8cefc107ca54 ("pipe: Use head and tail pointers for the ring, not cursor and length") Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 4c80ba392bf603d468ea827d902f8e7b2505fbf4 Author: Eric Auger Date: Tue Nov 26 18:54:13 2019 +0100 iommu: fix KASAN use-after-free in iommu_insert_resv_region In case the new region gets merged into another one, the nr list node is freed. Checking its type while completing the merge algorithm leads to a use-after-free. Use new->type instead. Fixes: 4dbd258ff63e ("iommu: Revisit iommu_insert_resv_region() implementation") Signed-off-by: Eric Auger Reported-by: Qian Cai Reviewed-by: Jerry Snitselaar Cc: Stable #v5.3+ Signed-off-by: Linus Torvalds commit 7de7de7ca0ae0fc70515ee3154af33af75edae2c Author: Linus Torvalds Date: Sun Dec 15 19:50:23 2019 -0800 Fix root mounting with no mount options The "trivial conversion" in commit cccaa5e33525 ("init: use do_mount() instead of ksys_mount()") was totally broken, since it didn't handle the case of a NULL mount data pointer. And while I had "tested" it (and presumably Dominik had too) that bug was hidden by me having options. Cc: Dominik Brodowski Cc: Arnd Bergmann Reported-by: Ondřej Jirman Reported-by: Guenter Roeck Reported-by: Naresh Kamboju Reported-and-tested-by: Borislav Petkov Tested-by: Chris Clayton Tested-by: Eric Biggers Tested-by: Geert Uytterhoeven Tested-by: Guido Günther Signed-off-by: Linus Torvalds commit 58b3bafff8257c6946df5d6aeb215b8ac839ed2a Author: Ed Maste Date: Thu Dec 12 14:53:46 2019 +0000 perf vendor events s390: Remove name from L1D_RO_EXCL_WRITES description In 7fcfa9a2d9 an unintended prefix "Counter:18 Name:" was removed from the description for L1D_RO_EXCL_WRITES, but the extra name remained in the description. Remove it too. Fixes: 7fcfa9a2d9a7 ("perf list: Fix s390 counter long description for L1D_RO_EXCL_WRITES") Signed-off-by: Ed Maste Cc: Alexander Shishkin Cc: Greentime Hu Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Hu Cc: Peter Zijlstra Cc: Thomas Richter Cc: Vincent Chen Link: http://lore.kernel.org/lkml/20191212145346.5026-1-emaste@freefall.freebsd.org Signed-off-by: Arnaldo Carvalho de Melo commit 28396b7df09b9565f404591c9945eac43526cb3f Author: Ed Maste Date: Thu Dec 12 14:34:46 2019 +0000 perf vendor events s390: Fix counter long description for DTLB1_GPAGE_WRITES The cf_z13 counter DTLB1_GPAGE_WRITES included a prefix 'Counter:132\tName:'. This is incorrect; remove the prefix as with 7fcfa9a2d9 for cf_z14. Signed-off-by: Ed Maste Cc: Alexander Shishkin Cc: Greentime Hu Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Hu Cc: Peter Zijlstra Cc: Thomas Richter Cc: Vincent Chen Link: http://lore.kernel.org/lkml/20191212143446.88582-1-emaste@freefall.freebsd.org Signed-off-by: Arnaldo Carvalho de Melo commit c09982f8e2bae80a66232630ec4ba50afacea486 Author: Sudip Mukherjee Date: Sat Dec 7 11:14:40 2019 +0000 libtraceevent: Allow custom libdir path When I use prefix=/usr and try to install libtraceevent in my laptop it tries to install in /usr/lib64. I am not having any folder as /usr/lib64 and also the debian policy doesnot allow installing in /usr/lib64. It should be in /usr/lib/x86_64-linux-gnu/. Quote: No package for a 64 bit architecture may install files in /usr/lib64/ or in a subdirectory of it. ref: https://www.debian.org/doc/debian-policy/ch-opersys.html Make it more flexible by allowing to mention libdir_relative while installing so that distros can mention the path according to their policy or use the default one. Signed-off-by: Sudipm Mukherjee Reviewed-by: Steven Rostedt (VMware) Cc: Sudipm Mukherjee Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20191207111440.6574-1-sudipm.mukherjee@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 475feec0c41ad71cb7d02f0310e56256606b57c5 Author: Takashi Iwai Date: Mon Dec 16 16:12:24 2019 +0100 ALSA: hda - Downgrade error message for single-cmd fallback We made the error message for the CORB/RIRB communication clearer by upgrading to dev_WARN() so that user can notice better. But this struck us like a boomerang: now it caught syzbot and reported back as a fatal issue although it's not really any too serious bug that worth for stopping the whole system. OK, OK, let's be softy, downgrade it to the standard dev_err() again. Fixes: dd65f7e19c69 ("ALSA: hda - Show the fatal CORB/RIRB error more clearly") Reported-by: syzbot+b3028ac3933f5c466389@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20191216151224.30013-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6bd5ce6089b561f5392460bfb654dea89356ab1b Author: Tetsuo Handa Date: Mon Dec 16 19:16:48 2019 +0900 tomoyo: Suppress RCU warning at list_for_each_entry_rcu(). John Garry has reported that allmodconfig kernel on arm64 causes flood of "RCU-list traversed in non-reader section!!" warning. I don't know what change caused this warning, but this warning is safe because TOMOYO uses SRCU lock instead. Let's suppress this warning by explicitly telling that the caller is holding SRCU lock. Reported-and-tested-by: John Garry Signed-off-by: Tetsuo Handa commit 61e3acd8c693a14fc69b824cb5b08d02cb90a6e7 Author: Andrew Donnellan Date: Tue Dec 10 00:22:21 2019 +1100 powerpc: Fix __clear_user() with KUAP enabled The KUAP implementation adds calls in clear_user() to enable and disable access to userspace memory. However, it doesn't add these to __clear_user(), which is used in the ptrace regset code. As there's only one direct user of __clear_user() (the regset code), and the time taken to set the AMR for KUAP purposes is going to dominate the cost of a quick access_ok(), there's not much point having a separate path. Rename __clear_user() to __arch_clear_user(), and make __clear_user() just call clear_user(). Reported-by: syzbot+f25ecf4b2982d8c7a640@syzkaller-ppc64.appspotmail.com Reported-by: Daniel Axtens Suggested-by: Michael Ellerman Fixes: de78a9c42a79 ("powerpc: Add a framework for Kernel Userspace Access Protection") Signed-off-by: Andrew Donnellan [mpe: Use __arch_clear_user() for the asm version like arm64 & nds32] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191209132221.15328-1-ajd@linux.ibm.com commit e352f576d345e5bf1fb62c8559851448a6c1d9cd Author: David Hildenbrand Date: Mon Dec 16 11:30:58 2019 +0100 powerpc/pseries/cmm: fix managed page counts when migrating pages between zones Commit 63341ab03706 (virtio-balloon: fix managed page counts when migrating pages between zones) fixed a long existing BUG in the virtio-balloon driver when pages would get migrated between zones. I did not try to reproduce on powerpc, but looking at the code, the same should apply to powerpc/cmm ever since it started using the balloon compaction infrastructure (luckily just recently). In case we have to migrate a ballon page to a newpage of another zone, the managed page count of both zones is wrong. Paired with memory offlining (which will adjust the managed page count), we can trigger kernel crashes and all kinds of different symptoms. Fix it by properly adjusting the managed page count when migrating if the zone changed. We'll temporarily modify the totalram page count. If this ever becomes a problem, we can fine tune by providing helpers that don't touch the totalram pages (e.g., adjust_zone_managed_page_count()). Fixes: fe030c9b85e6 ("powerpc/pseries/cmm: Implement balloon compaction") Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191216103058.4958-1-david@redhat.com commit 0601546f23fb70d84b807e73cfe8e789d054c98d Author: Christophe Leroy Date: Sat Dec 14 08:10:29 2019 +0000 powerpc/8xx: fix bogus __init on mmu_mapin_ram_chunk() Remove __init qualifier for mmu_mapin_ram_chunk() as it is called by mmu_mark_initmem_nx() and mmu_mark_rodata_ro() which are not __init functions. At the same time, mark it static as it is only used in this file. Reported-by: kbuild test robot Fixes: a2227a277743 ("powerpc/32: Don't populate page tables for block mapped pages except on the 8xx") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/56648921986a6b3e7315b1fbbf4684f21bd2dea8.1576310997.git.christophe.leroy@c-s.fr commit 63aa6a692595d47a0785297b481072086b9272d2 Author: Christophe Leroy Date: Thu Dec 12 17:47:24 2019 +0000 spi: fsl: use platform_get_irq() instead of of_irq_to_resource() Unlike irq_of_parse_and_map() which has a dummy definition on SPARC, of_irq_to_resource() hasn't. But as platform_get_irq() can be used instead and is generic, use it. Reported-by: kbuild test robot Suggested-by: Mark Brown Fixes: 3194d2533eff ("spi: fsl: don't map irq during probe") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/091a277fd0b3356dca1e29858c1c96983fc9cb25.1576172743.git.christophe.leroy@c-s.fr Signed-off-by: Mark Brown commit 007773e16a6f3f49d1439554078c3ba8af131998 Author: Michael Walle Date: Wed Dec 11 20:57:30 2019 +0100 spi: nxp-fspi: Ensure width is respected in spi-mem operations Make use of a core helper to ensure the desired width is respected when calling spi-mem operators. Otherwise only the SPI controller will be matched with the flash chip, which might lead to wrong widths. Also consider the width specified by the user in the device tree. Fixes: a5356aef6a90 ("spi: spi-mem: Add driver for NXP FlexSPI controller") Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20191211195730.26794-1-michael@walle.cc Signed-off-by: Mark Brown commit 62a1923cc8fe095912e6213ed5de27abbf1de77e Author: Andreas Kemnade Date: Wed Dec 11 23:16:00 2019 +0100 regulator: rn5t618: fix module aliases platform device aliases were missing, preventing autoloading of module. Fixes: 811b700630ff ("regulator: rn5t618: add driver for Ricoh RN5T618 regulators") Signed-off-by: Andreas Kemnade Link: https://lore.kernel.org/r/20191211221600.29438-1-andreas@kemnade.info Signed-off-by: Mark Brown commit 0d3010fa442429f8780976758719af05592ff19f Author: Daniele Palmas Date: Fri Dec 13 14:56:15 2019 +0100 USB: serial: option: add Telit ME910G1 0x110a composition This patch adds the following Telit ME910G1 composition: 0x110a: tty, tty, tty, rmnet Signed-off-by: Daniele Palmas Cc: stable Signed-off-by: Johan Hovold commit 556672d75ff486e0b6786056da624131679e0576 Author: Shengjiu Wang Date: Wed Dec 11 19:57:22 2019 +0800 ASoC: wm8962: fix lambda value According to user manual, it is required that FLL_LAMBDA > 0 in all cases (Integer and Franctional modes). Fixes: 9a76f1ff6e29 ("ASoC: Add initial WM8962 CODEC driver") Signed-off-by: Shengjiu Wang Acked-by: Charles Keepax Link: https://lore.kernel.org/r/1576065442-19763-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 2c92dd20304f505b6ef43d206fff21bda8f1f0ae Author: Faiz Abbas Date: Fri Dec 6 17:13:26 2019 +0530 mmc: sdhci: Update the tuning failed messages to pr_debug level Tuning support in DDR50 speed mode was added in SD Specifications Part1 Physical Layer Specification v3.01. Its not possible to distinguish between v3.00 and v3.01 from the SCR and that is why since commit 4324f6de6d2e ("mmc: core: enable CMD19 tuning for DDR50 mode") tuning failures are ignored in DDR50 speed mode. Cards compatible with v3.00 don't respond to CMD19 in DDR50 and this error gets printed during enumeration and also if retune is triggered at any time during operation. Update the printk level to pr_debug so that these errors don't lead to false error reports. Signed-off-by: Faiz Abbas Cc: stable@vger.kernel.org # v4.4+ Link: https://lore.kernel.org/r/20191206114326.15856-1-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 8b6dc6b2d60221e90703babbc141f063b8a07e72 Author: Rasmus Villemoes Date: Wed Dec 4 09:54:46 2019 +0100 mmc: sdhci-of-esdhc: Revert "mmc: sdhci-of-esdhc: add erratum A-009204 support" This reverts commit 5dd195522562542bc6ebe6e7bd47890d8b7ca93c. First, the fix seems to be plain wrong, since the erratum suggests waiting 5ms before setting setting SYSCTL[RSTD], but this msleep() happens after the call of sdhci_reset() which is where that bit gets set (if SDHCI_RESET_DATA is in mask). Second, walking the whole device tree to figure out if some node has a "fsl,p2020-esdhc" compatible string is hugely expensive - about 70 to 100 us on our mpc8309 board. Walking the device tree is done under a raw_spin_lock, so this is obviously really bad on an -rt system, and a waste of time on all. In fact, since esdhc_reset() seems to get called around 100 times per second, that mpc8309 now spends 0.8% of its time determining that it is not a p2020. Whether those 100 calls/s are normal or due to some other bug or misconfiguration, regularly hitting a 100 us non-preemptible window is unacceptable. Signed-off-by: Rasmus Villemoes Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191204085447.27491-1-linux@rasmusvillemoes.dk Signed-off-by: Ulf Hansson commit 8f34e5bd7024d1ffebddd82d7318b1be17be9e9a Author: Chaotian Jing Date: Wed Dec 4 15:19:58 2019 +0800 mmc: mediatek: fix CMD_TA to 2 for MT8173 HS200/HS400 mode there is a chance that always get response CRC error after HS200 tuning, the reason is that need set CMD_TA to 2. this modification is only for MT8173. Signed-off-by: Chaotian Jing Tested-by: Hsin-Yi Wang Cc: stable@vger.kernel.org Fixes: 1ede5cb88a29 ("mmc: mediatek: Use data tune for CMD line tune") Link: https://lore.kernel.org/r/20191204071958.18553-1-chaotian.jing@mediatek.com Signed-off-by: Ulf Hansson commit fa56ac9792265354b565f28def7164e7d7db2b1e Author: Veerabhadrarao Badiganti Date: Tue Nov 26 10:19:16 2019 +0000 mmc: sdhci-msm: Correct the offset and value for DDR_CONFIG register The DDR_CONFIG register offset got updated after a specific minor version of sdcc V4. This offset change has not been properly taken care of while updating register changes for sdcc V5. Correcting proper offset for this register. Also updating this register value to reflect the recommended RCLK delay. Signed-off-by: Veerabhadrarao Badiganti Link: https://lore.kernel.org/r/0101016ea738ec72-fa0f852d-20f8-474a-80b2-4b0ef63b132c-000000@us-west-2.amazonses.com Fixes: f15358885dda ("mmc: sdhci-msm: Define new Register address map") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 07bcc411567cb96f9d1fc84fff8d387118a2920d Author: Faiz Abbas Date: Thu Nov 28 16:34:22 2019 +0530 Revert "mmc: sdhci: Fix incorrect switch to HS mode" This reverts commit c894e33ddc1910e14d6f2a2016f60ab613fd8b37. This commit aims to treat SD High speed and SDR25 as the same while setting UHS Timings in HOST_CONTROL2 which leads to failures with some SD cards in AM65x. Revert this commit. The issue this commit was trying to fix can be implemented in a platform specific callback instead of common sdhci code. Cc: Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20191128110422.25917-1-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 9e65527ac3bab5480529d1ad07d4d228cc0295cd Author: Paul Cercueil Date: Tue Dec 10 17:44:46 2019 +0100 pinctrl: ingenic: Fixup PIN_CONFIG_OUTPUT config JZ4760 support was added in parallel of the previous patch so this one slipped through. The first SoC to use the new register is the JZ4760 and not the JZ4770, fix it here. Fixes: 7009d046a601 ("pinctrl: ingenic: Handle PIN_CONFIG_OUTPUT config") Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20191210164446.53912-1-paul@crapouillou.net [Folded into OF dependency] Signed-off-by: Linus Walleij commit 286e7beaa4cc7734894ee214569de4669ed9891e Author: Thierry Reding Date: Fri Dec 13 14:00:34 2019 +0100 gpio: tegra186: Allow building on Tegra194-only configurations The driver is compatible with both Tegra186 and Tegra194, but currently it cannot be selected if only Tegra194 support is enabled. Allow builds with only Tegra194 support enabled to select this driver. While at it, select this driver by default on Tegra194 builds because it is an essential part of the system. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191213130034.219227-1-thierry.reding@gmail.com Signed-off-by: Linus Walleij commit 5665a1febfe7bbb8c166fcf16856ef2730f947c0 Author: Matt Roper Date: Thu Dec 12 16:15:10 2019 -0800 drm/i915/tgl: Drop Wa#1178 The TGL workaround database no longer shows Wa #1178 (or anything similar under different workaround names/numbers) so we should be able to drop it. In fact Swati just discovered that applying this workaround is the root cause of some power well enable failures we've been seeing in CI (gitlab issue 498). Once we stop applying this WA, TGL no longer utilizes any of the special handling provided by icl_combo_phy_aux_power_well_ops so we can just drop back to using the standard hsw-style power well ops instead. v3: Drop now-unused _TGL_AUX_ANAOVRD1_C definition too. (Lucas) Closes: https://gitlab.freedesktop.org/drm/intel/issues/498 Fixes: deea06b47574 ("drm/i915/tgl: apply Display WA #1178 to fix type C dongles") Cc: Lucas De Marchi Cc: Swati Sharma Cc: Imre Deak Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191213001511.678070-3-matthew.d.roper@intel.com (cherry picked from commit ab3402581d0fa58e63e36875995f43ab02b4d0a0) Signed-off-by: Joonas Lahtinen commit 2eeab8eb1e3a04a644cbcb8c568c26c66ea12f02 Author: Matt Roper Date: Thu Dec 12 16:15:09 2019 -0800 drm/i915/ehl: Define EHL powerwells independently of ICL Outputs C and D on EHL are combo PHY outputs and thus should not be using the same TC AUX power well handlers as ICL. And even though icl_combo_phy_aux_power_well_ops works okay for EHL/JSL combo PHYs none of its special handling is actually necessary for this platform: * EHL/JSL don't actually need to program PORT_CL_DW12 * Display WA #1178 does not apply to EHL/JSL Thus we can simply drop back to using our standard "hsw-style" power well ops for EHL AUX power wells. Bspec: 4301 Fixes: f722b8c1e2a2 ("drm/i915/ehl: All EHL ports are combo phys") Cc: Jose Souza Cc: Bob Paauwe Cc: Vivek Kasireddy Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191213001511.678070-2-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi (cherry picked from commit e8ab8d669d046a8e9b07707d2f00b9ba3e25d0ae) Signed-off-by: Joonas Lahtinen commit 242bff7fc515d8e5275e5b8cd8c9c85a8d037dbf Author: Chris Wilson Date: Thu Dec 12 15:42:24 2019 +0000 drm/i915: Set fence_work.ops before dma_fence_init Since dma_fence_init may call ops (because of a meaningless trace_dma_fence), we need to set the worker ops prior to that call. Reported-by: Vince Weaver Fixes: 8e458fe2ee05 ("drm/i915: Generalise the clflush dma-worker") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Vince Weaver Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191212154224.1631531-1-chris@chris-wilson.co.uk (cherry picked from commit 1bc9865d8df3e1c6857a27c4b2b8a9ce8f027349) Signed-off-by: Joonas Lahtinen commit 99de95360faa769d970059c5b16abf85c53d7b31 Author: Chris Wilson Date: Tue Dec 10 15:13:32 2019 +0000 drm/i915: Copy across scheduler behaviour flags across submit fences We want the bonded request to have the same scheduler properties as its master so that it is placed at the same depth in the queue. For example, consider we have requests A, B and B', where B & B' are a bonded pair to run in parallel on two engines. A -> B \- B' B will run after A and so may be scheduled on an idle engine and wait on A using a semaphore. B' sees B being executed and so enters the queue on the same engine as A. As B' did not inherit the semaphore-chain from B, it may have higher precedence than A and so preempts execution. However, B' then sits on a semaphore waiting for B, who is waiting for A, who is blocked by B. Ergo B' needs to inherit the scheduler properties from B (i.e. the semaphore chain) so that it is scheduled with the same priority as B and will not be executed ahead of Bs dependencies. Furthermore, to prevent the priorities changing via the expose fence on B', we need to couple in the dependencies for PI. This requires us to relax our sanity-checks that dependencies are strictly in order. v2: Synchronise (B, B') execution on all platforms, regardless of using a scheduler, any no-op syncs should be elided. Fixes: ee1136908e9b ("drm/i915/execlists: Virtual engine bonding") Closes: https://gitlab.freedesktop.org/drm/intel/issues/464 Testcase: igt/gem_exec_balancer/bonded-chain Testcase: igt/gem_exec_balancer/bonded-semaphore Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191210151332.3902215-1-chris@chris-wilson.co.uk (cherry picked from commit c81471f5e95c79c55687282ff6800f112b5d560b) Signed-off-by: Joonas Lahtinen commit fbc44a0b34a10e6cbe86b41617aaff25292d9a4c Author: Animesh Manna Date: Thu Dec 5 18:05:13 2019 +0530 drm/i915/dsb: Fix in mmio offset calculation of DSB instance As the current usage is restricted to first DSB instance per pipe, so existing code could not catch the issue to calculate the mmio offset of different DSB instance per pipe. Corrected the offset calculation. Fixes: a6e58d9a2e04 ("drm/i915/dsb: Check DSB engine status.") Signed-off-by: Animesh Manna Reviewed-by: Anshuman Gupta Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191205123513.22603-1-animesh.manna@intel.com (cherry picked from commit d04a661a2c7169b48782aa5e9d85d4b4383d562e) Signed-off-by: Joonas Lahtinen commit 6fc232db9e8cd50b9b83534de9cd91ace711b2d7 Author: Aditya Pakki Date: Sun Dec 15 09:34:08 2019 -0600 rfkill: Fix incorrect check to avoid NULL pointer dereference In rfkill_register, the struct rfkill pointer is first derefernced and then checked for NULL. This patch removes the BUG_ON and returns an error to the caller in case rfkill is NULL. Signed-off-by: Aditya Pakki Link: https://lore.kernel.org/r/20191215153409.21696-1-pakki001@umn.edu Signed-off-by: Johannes Berg commit 97583f1d43b4f14312745085a7d565f0b76aa4ca Merge: d1eef1c61974 68a1fdf2451f Author: Greg Kroah-Hartman Date: Mon Dec 16 10:12:43 2019 +0100 Merge tag 'misc-habanalabs-fixes-2019-12-14' of git://people.freedesktop.org/~gabbayo/linux into char-misc-linus Oded writes: This tag contains the following fixes: - change dev_err to dev_err_ratelimited in hl_cs_wait_ioctl() as this can be called by the user multiple times and can spam the kernel log. - Eliminate GCC warnings by removing unused variables. * tag 'misc-habanalabs-fixes-2019-12-14' of git://people.freedesktop.org/~gabbayo/linux: habanalabs: remove variable 'val' set but not used habanalabs: rate limit error msg on waiting for CS commit 0b416c3e1345fd696db4c422643468d844410877 Author: Jens Axboe Date: Sun Dec 15 10:57:46 2019 -0700 io_uring: fix sporadic -EFAULT from IORING_OP_RECVMSG If we have to punt the recvmsg to async context, we copy all the context. But since the iovec used can be either on-stack (if small) or dynamically allocated, if it's on-stack, then we need to ensure we reset the iov pointer. If we don't, then we're reusing old stack data, and that can lead to -EFAULTs if things get overwritten. Ensure we retain the right pointers for the iov, and free it as well if we end up having to go beyond UIO_FASTIOV number of vectors. Fixes: 03b1230ca12a ("io_uring: ensure async punted sendmsg/recvmsg requests copy data") Reported-by: 李通洲 Signed-off-by: Jens Axboe commit 26a7a47510ed12cbbce689184c8d6b63062b4fb9 Author: Dmitry Osipenko Date: Mon Nov 18 19:45:08 2019 +0300 cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCs Both NVIDIA Tegra20 and Tegra30 SoCs should be blacklisted because CPU OPPs use supported_hw and thus platdev isn't suitable for these SoCs. Currently cpufreq-dt driver produces a bit annoying warning splats during boot because valid OPPs are not found, this will be fixed once tegra20-cpufreq driver will be update to support cpufreq-dt. The warnings will also happen on older stable kernels using newer device-trees, thus this patch should be backported to stable kernels as well. Cc: Reported-by: Jon Hunter Fixes: 4053aa65c517 ("ARM: tegra: cardhu-a04: Add CPU Operating Performance Points") Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 59034b9d6af8ccc1de0a265ca90b3aa967bae19f Author: H. Nikolaus Schaller Date: Sun Dec 15 08:49:02 2019 +0100 ARM: bcm: Add missing sentinel to bcm2711_compat[] commit 781fa0a95424 ("ARM: bcm: Add support for BCM2711 SoC") breaks boot of many other platforms (e.g. OMAP or i.MX6) if CONFIG_ARCH_BCM2835 is enabled in addition to some multiplatform config (e.g. omap2plus_defconfig). The symptom is that the OMAP based board does not show any activity beyond "Starting Kernel ..." even with earlycon. Reverting the mentioned commit makes it work again. The real fix is to add the missing NULL sentinel to the bcm2711_compat[] variable-length array. Fixes: 781fa0a95424 ("ARM: bcm: Add support for BCM2711 SoC") Acked-by: Stefan Wahren Signed-off-by: H. Nikolaus Schaller Signed-off-by: Florian Fainelli commit d82d47d5d8a6d40bb622cef31b6c6fa09cbd01ea Author: Randy Dunlap Date: Sun Dec 8 20:31:32 2019 -0800 jbd2: fix kernel-doc notation warning Fix kernel-doc warning by inserting a beginning '*' character for the kernel-doc line. ../include/linux/jbd2.h:461: warning: bad line: journal. These are dirty buffers and revoke descriptor blocks. Link: https://lore.kernel.org/r/53e3ce27-ceae-560d-0fd4-f95728a33e12@infradead.org Cc: stable@kernel.org Signed-off-by: Randy Dunlap Signed-off-by: Theodore Ts'o commit 69000d82eee1b41d88afc75861153b7e514bb777 Author: Phong Tran Date: Fri Dec 13 22:33:07 2019 +0700 ext4: use RCU API in debug_print_tree struct ext4_sb_info.system_blks was marked __rcu. But access the pointer without using RCU lock and dereference. Sparse warning with __rcu notation: block_validity.c:139:29: warning: incorrect type in argument 1 (different address spaces) block_validity.c:139:29: expected struct rb_root const * block_validity.c:139:29: got struct rb_root [noderef] * Link: https://lore.kernel.org/r/20191213153306.30744-1-tranmanphong@gmail.com Reviewed-by: Jan Kara Signed-off-by: Phong Tran Signed-off-by: Theodore Ts'o commit d1eef1c619749b2a57e514a3fa67d9a516ffa919 Author: Linus Torvalds Date: Sun Dec 15 15:16:08 2019 -0800 Linux 5.5-rc2 commit 9803387c55f7d2ce69aa64340c5fdc6b3027dbc8 Author: Theodore Ts'o Date: Sun Dec 15 01:09:03 2019 -0500 ext4: validate the debug_want_extra_isize mount option at parse time Instead of setting s_want_extra_size and then making sure that it is a valid value afterwards, validate the field before we set it. This avoids races and other problems when remounting the file system. Link: https://lore.kernel.org/r/20191215063020.GA11512@mit.edu Cc: stable@kernel.org Signed-off-by: Theodore Ts'o Reported-and-tested-by: syzbot+4a39a025912b265cacef@syzkaller.appspotmail.com commit 9603e22104439ddfa6a077f1a0e5d8c662beec6c Merge: 1522d9da40bd dc2316eba73f Author: Linus Torvalds Date: Sun Dec 15 14:58:13 2019 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Doug Ledford: "A small collection of -rc fixes. Mostly. One API addition, but that's because we wanted to use it in a fix. There's also a bug fix that is going to render the 5.5 kernel's soft-RoCE driver incompatible with all soft-RoCE versions prior, but it's required to actually implement the protocol according to the RoCE spec and required in order for the soft-RoCE driver to be able to successfully work with actual RoCE hardware. Summary: - Update Steve Wise info - Fix for soft-RoCE crc calculations (will break back compatibility, but only with the soft-RoCE driver, which has had this bug since it was introduced and it is an on-the-wire bug, but will make soft-RoCE fully compatible with real RoCE hardware) - cma init fixup - counters oops fix - fix for mlx4 init/teardown sequence - fix for mkx5 steering rules - introduce a cleanup API, which isn't a fix, but we want to use it in the next fix - fix for mlx5 memory management that uses API in previous patch" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/mlx5: Fix device memory flows IB/core: Introduce rdma_user_mmap_entry_insert_range() API IB/mlx5: Fix steering rule of drop and count IB/mlx4: Follow mirror sequence of device add during device removal RDMA/counter: Prevent auto-binding a QP which are not tracked with res rxe: correctly calculate iCRC for unaligned payloads Update mailmap info for Steve Wise RDMA/cma: add missed unregister_pernet_subsys in init failure commit d195a66e367b3d24fdd3c3565f37ab7c6882b9d2 Author: Brian Gianforcaro Date: Fri Dec 13 03:09:50 2019 -0800 io_uring: fix stale comment and a few typos - Fix a few typos found while reading the code. - Fix stale io_get_sqring comment referencing s->sqe, the 's' parameter was renamed to 'req', but the comment still holds. Signed-off-by: Brian Gianforcaro Signed-off-by: Jens Axboe commit 1522d9da40bdfe502c91163e6d769332897201fa Merge: b01d7cb41ff5 bc3e8f5d42d5 Author: Linus Torvalds Date: Sun Dec 15 12:27:31 2019 -0800 Merge tag 'riscv/for-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Paul Walmsley: "Two minor build fixes: - Fix builds of the ELF loader when built with 'make -j1' (nommu only) - Fix CONFIG_SOC_SIFIVE builds when CONFIG_TTY is disabled (found during randconfig testing)" * tag 'riscv/for-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: only select serial sifive if TTY is enabled riscv: Fix build dependency for loader commit b01d7cb41ff51b7779977de601a984406e2a5ba9 Merge: 2e6d304515ba c673ec61ade8 Author: Linus Torvalds Date: Sun Dec 15 12:24:44 2019 -0800 Merge tag 'for-linus-5.5b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Two fixes: one for a resource accounting bug in some configurations and a fix for another patch which went into rc1" * tag 'for-linus-5.5b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/balloon: fix ballooned page accounting without hotplug enabled xen-blkback: prevent premature module unload commit aeea5eae4fd54e94d820ed17ea3b238160be723e Author: Sven Schnelle Date: Sun Dec 15 20:09:27 2019 +0100 parisc: add missing __init annotation compilation failed with: MODPOST vmlinux.o WARNING: vmlinux.o(.text.unlikely+0xa0c): Section mismatch in reference from the function walk_lower_bus() to the function .init.text:walk_native_bus() The function walk_lower_bus() references the function __init walk_native_bus(). This is often because walk_lower_bus lacks a __init annotation or the annotation of walk_native_bus is wrong. FATAL: modpost: Section mismatches detected. Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. make[2]: *** [/home/svens/linux/parisc-linux/src/scripts/Makefile.modpost:64: __modpost] Error 1 make[1]: *** [/home/svens/linux/parisc-linux/src/Makefile:1077: vmlinux] Error 2 make[1]: Leaving directory '/home/svens/linux/parisc-linux/build' make: *** [Makefile:179: sub-make] Error 2 Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller commit e16260c21f87b16a33ae8ecac9e8c79f3a8b89bd Author: Sven Schnelle Date: Sun Dec 15 20:10:39 2019 +0100 parisc: fix compilation when KEXEC=n and KEXEC_FILE=y Fix compilation when the CONFIG_KEXEC_FILE=y and CONFIG_KEXEC=n. Reported-by: kbuild test robot Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller commit fd42bfd1bb31f9a521be6b4f1bd89b85abc08d20 Author: Paul Durrant Date: Fri Dec 13 13:20:40 2019 +0000 xen-netback: avoid race that can lead to NULL pointer dereference In function xenvif_disconnect_queue(), the value of queue->rx_irq is zeroed *before* queue->task is stopped. Unfortunately that task may call notify_remote_via_irq(queue->rx_irq) and calling that function with a zero value results in a NULL pointer dereference in evtchn_from_irq(). This patch simply re-orders things, stopping all tasks before zero-ing the irq values, thereby avoiding the possibility of the race. Fixes: 2ac061ce97f4 ("xen/netback: cleanup init and deinit code") Signed-off-by: Paul Durrant Acked-by: Wei Liu Signed-off-by: Jakub Kicinski commit 2e6d304515ba9936d85265ad93dddc4c13c17d06 Merge: 510c9788991c 8243186f0cc7 Author: Linus Torvalds Date: Sun Dec 15 11:36:12 2019 -0800 Merge branch 'remove-ksys-mount-dup' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux Pull ksys_mount() and ksys_dup() removal from Dominik Brodowski: "This small series replaces all in-kernel calls to the userspace-focused ksys_mount() and ksys_dup() with calls to kernel-centric functions: For each replacement of ksys_mount() with do_mount(), one needs to verify that the first and third parameter (char *dev_name, char *type) are strings allocated in kernelspace and that the fifth parameter (void *data) is either NULL or refers to a full page (only occurence in init/do_mounts.c::do_mount_root()). The second and fourth parameters (char *dir_name, unsigned long flags) are passed by ksys_mount() to do_mount() unchanged, and therefore do not require particular care. Moreover, instead of pretending to be userspace, the opening of /dev/console as stdin/stdout/stderr can be implemented using in-kernel functions as well. Thereby, ksys_dup() can be removed for good" [ This doesn't get rid of the special "kernel init runs with KERNEL_DS" case, but it at least removes _some_ of the users of "treat kernel pointers as user pointers for our magical init sequence". One day we'll hopefully be rid of it all, and can initialize our init_thread addr_limit to USER_DS. - Linus ] * 'remove-ksys-mount-dup' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: fs: remove ksys_dup() init: unify opening /dev/console as stdin/stdout/stderr init: use do_mount() instead of ksys_mount() initrd: use do_mount() instead of ksys_mount() devtmpfs: use do_mount() instead of ksys_mount() commit 858ce8ca62ea1530f2779d0e3f934b0176e663c3 Author: Cristian Birsan Date: Fri Dec 13 18:33:11 2019 +0200 net: usb: lan78xx: Fix error message format specifier Display the return code as decimal integer. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Cristian Birsan Signed-off-by: Jakub Kicinski commit 479a0d1376f6d97c60871442911f1394d4446a25 Author: Vishal Kulkarni Date: Fri Dec 13 06:39:39 2019 +0530 cxgb4: Fix kernel panic while accessing sge_info The sge_info debugfs collects offload queue info even when offload capability is disabled and leads to panic. [ 144.139871] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 144.139874] CR2: 0000000000000000 CR3: 000000082d456005 CR4: 00000000001606e0 [ 144.139876] Call Trace: [ 144.139887] sge_queue_start+0x12/0x30 [cxgb4] [ 144.139897] seq_read+0x1d4/0x3d0 [ 144.139906] full_proxy_read+0x50/0x70 [ 144.139913] vfs_read+0x89/0x140 [ 144.139916] ksys_read+0x55/0xd0 [ 144.139924] do_syscall_64+0x5b/0x1d0 [ 144.139933] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 144.139936] RIP: 0033:0x7f4b01493990 Fix this crash by skipping the offload queue access in sge_qinfo when offload capability is disabled Signed-off-by: Herat Ramani Signed-off-by: Vishal Kulkarni Signed-off-by: Jakub Kicinski commit 86434744fedf0cfe07a9eee3f4632c0e25c1d136 Author: Ursula Braun Date: Thu Dec 12 22:35:58 2019 +0100 net/smc: add fallback check to connect() FASTOPEN setsockopt() or sendmsg() may switch the SMC socket to fallback mode. Once fallback mode is active, the native TCP socket functions are called. Nevertheless there is a small race window, when FASTOPEN setsockopt/sendmsg runs in parallel to a connect(), and switch the socket into fallback mode before connect() takes the sock lock. Make sure the SMC-specific connect setup is omitted in this case. This way a syzbot-reported refcount problem is fixed, triggered by different threads running non-blocking connect() and FASTOPEN_KEY setsockopt. Reported-by: syzbot+96d3f9ff6a86d37e44c8@syzkaller.appspotmail.com Fixes: 6d6dd528d5af ("net/smc: fix refcount non-blocking connect() -part 2") Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 9b2079c046a9d6c9c73a4ec33816678565ee01f3 Author: Russell King Date: Fri Dec 13 10:06:30 2019 +0000 net: phylink: fix interface passed to mac_link_up A mismerge between the following two commits: c678726305b9 ("net: phylink: ensure consistent phy interface mode") 27755ff88c0e ("net: phylink: Add phylink_mac_link_{up, down} wrapper functions") resulted in the wrong interface being passed to the mac_link_up() function. Fix this up. Fixes: b4b12b0d2f02 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") Signed-off-by: Russell King Signed-off-by: Jakub Kicinski commit 6dd504b0fd1039c6e5d391e97cf5c4ee592aefcb Author: Thadeu Lima de Souza Cascardo Date: Fri Dec 13 07:39:02 2019 -0300 selftests: net: tls: remove recv_rcvbuf test This test only works when [1] is applied, which was rejected. Basically, the errors are reported and cleared. In this particular case of tls sockets, following reads will block. The test case was originally submitted with the rejected patch, but, then, was included as part of a different patchset, possibly by mistake. [1] https://lore.kernel.org/netdev/20191007035323.4360-2-jakub.kicinski@netronome.com/#t Thanks Paolo Pisati for pointing out the original patchset where this appeared. Fixes: 65190f77424d (selftests/tls: add a test for fragmented messages) Reported-by: Paolo Pisati Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Jakub Kicinski commit 8ed001c966b0dd812a1cc57ae4b9c7b6d1454a25 Merge: 5d485ed88d48 6a902c0f3199 Author: Jakub Kicinski Date: Sat Dec 14 17:16:12 2019 -0800 Merge branch 'gtp-fix-several-bugs-in-gtp-module' Taehee Yoo says: ==================== gtp: fix several bugs in gtp module This patchset fixes several bugs in the GTP module. 1. Do not allow adding duplicate TID and ms_addr pdp context. In the current code, duplicate TID and ms_addr pdp context could be added. So, RX and TX path could find correct pdp context. 2. Fix wrong condition in ->dumpit() callback. ->dumpit() callback is re-called if dump packet size is too big. So, before return, it saves last position and then restart from last dump position. TID value is used to find last dump position. GTP module allows adding zero TID value. But ->dumpit() callback ignores zero TID value. So, dump would not work correctly if dump packet size too big. 3. Fix use-after-free in ipv4_pdp_find(). RX and TX patch always uses gtp->tid_hash and gtp->addr_hash. but while packet processing, these hash pointer would be freed. So, use-after-free would occur. 4. Fix panic because of zero size hashtable GTP hashtable size could be set by user-space. If hashsize is set to 0, hashtable will not work and panic will occur. ==================== Signed-off-by: Jakub Kicinski commit 6a902c0f31993ab02e1b6ea7085002b9c9083b6a Author: Taehee Yoo Date: Wed Dec 11 08:23:48 2019 +0000 gtp: avoid zero size hashtable GTP default hashtable size is 1024 and userspace could set specific hashtable size with IFLA_GTP_PDP_HASHSIZE. If hashtable size is set to 0 from userspace, hashtable will not work and panic will occur. Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 94dc550a5062030569d4aa76e10e50c8fc001930 Author: Taehee Yoo Date: Wed Dec 11 08:23:34 2019 +0000 gtp: fix an use-after-free in ipv4_pdp_find() ipv4_pdp_find() is called in TX packet path of GTP. ipv4_pdp_find() internally uses gtp->tid_hash to lookup pdp context. In the current code, gtp->tid_hash and gtp->addr_hash are freed by ->dellink(), which is gtp_dellink(). But gtp_dellink() would be called while packets are processing. So, gtp_dellink() should not free gtp->tid_hash and gtp->addr_hash. Instead, dev->priv_destructor() would be used because this callback is called after all packet processing safely. Test commands: ip link add veth1 type veth peer name veth2 ip a a 172.0.0.1/24 dev veth1 ip link set veth1 up ip a a 172.99.0.1/32 dev lo gtp-link add gtp1 & gtp-tunnel add gtp1 v1 200 100 172.99.0.2 172.0.0.2 ip r a 172.99.0.2/32 dev gtp1 ip link set gtp1 mtu 1500 ip netns add ns2 ip link set veth2 netns ns2 ip netns exec ns2 ip a a 172.0.0.2/24 dev veth2 ip netns exec ns2 ip link set veth2 up ip netns exec ns2 ip a a 172.99.0.2/32 dev lo ip netns exec ns2 ip link set lo up ip netns exec ns2 gtp-link add gtp2 & ip netns exec ns2 gtp-tunnel add gtp2 v1 100 200 172.99.0.1 172.0.0.1 ip netns exec ns2 ip r a 172.99.0.1/32 dev gtp2 ip netns exec ns2 ip link set gtp2 mtu 1500 hping3 172.99.0.2 -2 --flood & ip link del gtp1 Splat looks like: [ 72.568081][ T1195] BUG: KASAN: use-after-free in ipv4_pdp_find.isra.12+0x130/0x170 [gtp] [ 72.568916][ T1195] Read of size 8 at addr ffff8880b9a35d28 by task hping3/1195 [ 72.569631][ T1195] [ 72.569861][ T1195] CPU: 2 PID: 1195 Comm: hping3 Not tainted 5.5.0-rc1 #199 [ 72.570547][ T1195] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 72.571438][ T1195] Call Trace: [ 72.571764][ T1195] dump_stack+0x96/0xdb [ 72.572171][ T1195] ? ipv4_pdp_find.isra.12+0x130/0x170 [gtp] [ 72.572761][ T1195] print_address_description.constprop.5+0x1be/0x360 [ 72.573400][ T1195] ? ipv4_pdp_find.isra.12+0x130/0x170 [gtp] [ 72.573971][ T1195] ? ipv4_pdp_find.isra.12+0x130/0x170 [gtp] [ 72.574544][ T1195] __kasan_report+0x12a/0x16f [ 72.575014][ T1195] ? ipv4_pdp_find.isra.12+0x130/0x170 [gtp] [ 72.575593][ T1195] kasan_report+0xe/0x20 [ 72.576004][ T1195] ipv4_pdp_find.isra.12+0x130/0x170 [gtp] [ 72.576577][ T1195] gtp_build_skb_ip4+0x199/0x1420 [gtp] [ ... ] [ 72.647671][ T1195] BUG: unable to handle page fault for address: ffff8880b9a35d28 [ 72.648512][ T1195] #PF: supervisor read access in kernel mode [ 72.649158][ T1195] #PF: error_code(0x0000) - not-present page [ 72.649849][ T1195] PGD a6c01067 P4D a6c01067 PUD 11fb07067 PMD 11f939067 PTE 800fffff465ca060 [ 72.652958][ T1195] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 72.653834][ T1195] CPU: 2 PID: 1195 Comm: hping3 Tainted: G B 5.5.0-rc1 #199 [ 72.668062][ T1195] RIP: 0010:ipv4_pdp_find.isra.12+0x86/0x170 [gtp] [ ... ] [ 72.679168][ T1195] Call Trace: [ 72.679603][ T1195] gtp_build_skb_ip4+0x199/0x1420 [gtp] [ 72.681915][ T1195] ? ipv4_pdp_find.isra.12+0x170/0x170 [gtp] [ 72.682513][ T1195] ? lock_acquire+0x164/0x3b0 [ 72.682966][ T1195] ? gtp_dev_xmit+0x35e/0x890 [gtp] [ 72.683481][ T1195] gtp_dev_xmit+0x3c2/0x890 [gtp] [ ... ] Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 94a6d9fb88df43f92d943c32b84ce398d50bf49f Author: Taehee Yoo Date: Wed Dec 11 08:23:17 2019 +0000 gtp: fix wrong condition in gtp_genl_dump_pdp() gtp_genl_dump_pdp() is ->dumpit() callback of GTP module and it is used to dump pdp contexts. it would be re-executed because of dump packet size. If dump packet size is too big, it saves current dump pointer (gtp interface pointer, bucket, TID value) then it restarts dump from last pointer. Current GTP code allows adding zero TID pdp context but dump code ignores zero TID value. So, last dump pointer will not be found. In addition, this patch adds missing rcu_read_lock() in gtp_genl_dump_pdp(). Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 6b01b1d9b2d38dc84ac398bfe9f00baff06a31e5 Author: Taehee Yoo Date: Wed Dec 11 08:23:00 2019 +0000 gtp: do not allow adding duplicate tid and ms_addr pdp context GTP RX packet path lookups pdp context with TID. If duplicate TID pdp contexts are existing in the list, it couldn't select correct pdp context. So, TID value should be unique. GTP TX packet path lookups pdp context with ms_addr. If duplicate ms_addr pdp contexts are existing in the list, it couldn't select correct pdp context. So, ms_addr value should be unique. Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 5d485ed88d48f8101a2067348e267c0aaf4ed486 Author: Mahesh Bandewar Date: Fri Dec 6 15:44:55 2019 -0800 bonding: fix active-backup transition after link failure After the recent fix in commit 1899bb325149 ("bonding: fix state transition issue in link monitoring"), the active-backup mode with miimon initially come-up fine but after a link-failure, both members transition into backup state. Following steps to reproduce the scenario (eth1 and eth2 are the slaves of the bond): ip link set eth1 up ip link set eth2 down sleep 1 ip link set eth2 up ip link set eth1 down cat /sys/class/net/eth1/bonding_slave/state cat /sys/class/net/eth2/bonding_slave/state Fixes: 1899bb325149 ("bonding: fix state transition issue in link monitoring") CC: Jay Vosburgh Signed-off-by: Mahesh Bandewar Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski commit 510c9788991c58827373bca719d8cffa4d65f846 Merge: 07c4b9e9f71a 3d519d6d388b Author: Linus Torvalds Date: Sat Dec 14 16:10:22 2019 -0800 Merge tag 'Wimplicit-fallthrough-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fall through fix from Gustavo Silva: "Fix compile error on sh by marking expected switch fall-through" * tag 'Wimplicit-fallthrough-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: sh: kgdb: Mark expected switch fall-throughs commit a70fd5ac2ea787cafe07b69dadd16b3648ad64ac Author: yangerkun Date: Fri Dec 13 09:49:00 2019 +0800 ext4: reserve revoke credits in __ext4_new_inode It's possible that __ext4_new_inode will release the xattr block, so it will trigger a warning since there is revoke credits will be 0 if the handle == NULL. The below scripts can reproduce it easily. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 3861 at fs/jbd2/revoke.c:374 jbd2_journal_revoke+0x30e/0x540 fs/jbd2/revoke.c:374 ... __ext4_forget+0x1d7/0x800 fs/ext4/ext4_jbd2.c:248 ext4_free_blocks+0x213/0x1d60 fs/ext4/mballoc.c:4743 ext4_xattr_release_block+0x55b/0x780 fs/ext4/xattr.c:1254 ext4_xattr_block_set+0x1c2c/0x2c40 fs/ext4/xattr.c:2112 ext4_xattr_set_handle+0xa7e/0x1090 fs/ext4/xattr.c:2384 __ext4_set_acl+0x54d/0x6c0 fs/ext4/acl.c:214 ext4_init_acl+0x218/0x2e0 fs/ext4/acl.c:293 __ext4_new_inode+0x352a/0x42b0 fs/ext4/ialloc.c:1151 ext4_mkdir+0x2e9/0xbd0 fs/ext4/namei.c:2774 vfs_mkdir+0x386/0x5f0 fs/namei.c:3811 do_mkdirat+0x11c/0x210 fs/namei.c:3834 do_syscall_64+0xa1/0x530 arch/x86/entry/common.c:294 ... ------------------------------------- scripts: mkfs.ext4 /dev/vdb mount /dev/vdb /mnt cd /mnt && mkdir dir && for i in {1..8}; do setfacl -dm "u:user_"$i":rx" dir; done mkdir dir/dir1 && mv dir/dir1 ./ sh repro.sh && add some user [root@localhost ~]# cat repro.sh while [ 1 -eq 1 ]; do rm -rf dir rm -rf dir1/dir1 mkdir dir for i in {1..8}; do setfacl -dm "u:test"$i":rx" dir; done setfacl -m "u:user_9:rx" dir & mkdir dir1/dir1 & done Before exec repro.sh, dir1 has inherit the default acl from dir, and xattr block of dir1 dir is not the same, so the h_refcount of these two dir's xattr block will be 1. Then repro.sh can trigger the warning with the situation show as below. The last h_refcount can be clear with mkdir, and __ext4_new_inode has not reserved revoke credits, so the warning will happened, fix it by reserve revoke credits in __ext4_new_inode. Thread 1 Thread 2 mkdir dir set default acl(will create a xattr block blk1 and the refcount of ext4_xattr_header will be 1) ... mkdir dir1/dir1 ->....->ext4_init_acl ->__ext4_set_acl(set default acl, will reuse blk1, and h_refcount will be 2) setfacl->ext4_set_acl->... ->ext4_xattr_block_set(will create new block blk2 to store xattr) ->__ext4_set_acl(set access acl, since h_refcount of blk1 is 2, will create blk3 to store xattr) ->ext4_xattr_release_block(dec h_refcount of blk1 to 1) ->ext4_xattr_release_block(dec h_refcount and since it is 0, will release the block and trigger the warning) Link: https://lore.kernel.org/r/20191213014900.47228-1-yangerkun@huawei.com Reported-by: Hulk Robot Reviewed-by: Jan Kara Signed-off-by: yangerkun Signed-off-by: Theodore Ts'o commit 7f420d64a08c1dcd65b27be82a27cf2bdb2e7847 Author: Dan Carpenter Date: Fri Dec 13 21:50:11 2019 +0300 ext4: unlock on error in ext4_expand_extra_isize() We need to unlock the xattr before returning on this error path. Cc: stable@kernel.org # 4.13 Fixes: c03b45b853f5 ("ext4, project: expand inode extra size if possible") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20191213185010.6k7yl2tck3wlsdkt@kili.mountain Signed-off-by: Theodore Ts'o commit 707d1a2f601bea6110a5633054253c0cb71b44c1 Author: Theodore Ts'o Date: Sun Dec 8 19:43:46 2019 -0500 ext4: optimize __ext4_check_dir_entry() Make __ext4_check_dir_entry() a bit easier to understand, and reduce the object size of the function by over 11%. Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20191209004346.38526-1-tytso@mit.edu Signed-off-by: Theodore Ts'o commit 109ba779d6cca2d519c5dd624a3276d03e21948e Author: Jan Kara Date: Mon Dec 2 18:02:13 2019 +0100 ext4: check for directory entries too close to block end ext4_check_dir_entry() currently does not catch a case when a directory entry ends so close to the block end that the header of the next directory entry would not fit in the remaining space. This can lead to directory iteration code trying to access address beyond end of current buffer head leading to oops. CC: stable@vger.kernel.org Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191202170213.4761-3-jack@suse.cz Signed-off-by: Theodore Ts'o commit 64d4ce892383b2ad6d782e080d25502f91bf2a38 Author: Jan Kara Date: Mon Dec 2 18:02:12 2019 +0100 ext4: fix ext4_empty_dir() for directories with holes Function ext4_empty_dir() doesn't correctly handle directories with holes and crashes on bh->b_data dereference when bh is NULL. Reorganize the loop to use 'offset' variable all the times instead of comparing pointers to current direntry with bh->b_data pointer. Also add more strict checking of '.' and '..' directory entries to avoid entering loop in possibly invalid state on corrupted filesystems. References: CVE-2019-19037 CC: stable@vger.kernel.org Fixes: 4e19d6b65fb4 ("ext4: allow directory holes") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191202170213.4761-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit 7ae1629d4db0d68d6c332bcb4f0457b4fc7ab4aa Merge: ed56dd8f60cf ee699f89bdba Author: Jakub Kicinski Date: Sat Dec 14 13:01:17 2019 -0800 Merge branch 'bnx2x-bug-fixes' Manish Chopra says: ==================== bnx2x: bug fixes This series has two driver changes, one to fix some unexpected hardware behaviour casued during the parity error recovery in presence of SR-IOV VFs and another one related for fixing resource management in the driver among the PFs configured on an engine. Please consider applying it to "net". V1->V2: ======= Fix the compilation errors reported by kbuild test robot on the patch #1 with CONFIG_BNX2X_SRIOV=n ==================== Signed-off-by: Jakub Kicinski commit ee699f89bdbaa19c399804504241b5c531b48888 Author: Manish Chopra Date: Wed Dec 11 09:59:56 2019 -0800 bnx2x: Fix logic to get total no. of PFs per engine Driver doesn't calculate total number of PFs configured on a given engine correctly which messed up resources in the PFs loaded on that engine, leading driver to exceed configuration of resources (like vlan filters etc.) beyond the limit per engine, which ended up with asserts from the firmware. Signed-off-by: Manish Chopra Signed-off-by: Ariel Elior Signed-off-by: Jakub Kicinski commit 7113f796bbbced2470cd6d7379d50d7a7a78bf34 Author: Manish Chopra Date: Wed Dec 11 09:59:55 2019 -0800 bnx2x: Do not handle requests from VFs after parity Parity error from the hardware will cause PF to lose the state of their VFs due to PF's internal reload and hardware reset following the parity error. Restrict any configuration request from the VFs after the parity as it could cause unexpected hardware behavior, only way for VFs to recover would be to trigger FLR on VFs and reload them. Signed-off-by: Manish Chopra Signed-off-by: Ariel Elior Signed-off-by: Jakub Kicinski commit 07c4b9e9f71aa4bc74009f710fc5a745e10981bf Merge: f61cf8decb37 bba340c79bfe Author: Linus Torvalds Date: Sat Dec 14 12:51:57 2019 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "24 fixes, all in drivers. The lion's share (16) are qla2xxx and the rest are iscsi (3), ufs (2), smarpqi, lpfc and libsas" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (24 commits) scsi: iscsi: Avoid potential deadlock in iscsi_if_rx func scsi: iscsi: Fix a potential deadlock in the timeout handler scsi: smartpqi: Update attribute name to `driver_version` scsi: libsas: stop discovering if oob mode is disconnected scsi: ufs: Disable autohibern8 feature in Cadence UFS scsi: iscsi: qla4xxx: fix double free in probe scsi: ufs: Give an unique ID to each ufs-bsg scsi: qla2xxx: Add debug dump of LOGO payload and ELS IOCB scsi: qla2xxx: Ignore PORT UPDATE after N2N PLOGI scsi: qla2xxx: Don't defer relogin unconditonally scsi: qla2xxx: Send Notify ACK after N2N PLOGI scsi: qla2xxx: Configure local loop for N2N target scsi: qla2xxx: Fix PLOGI payload and ELS IOCB dump length scsi: qla2xxx: Don't call qlt_async_event twice scsi: qla2xxx: Allow PLOGI in target mode scsi: qla2xxx: Change discovery state before PLOGI scsi: qla2xxx: Drop superfluous INIT_WORK of del_work scsi: qla2xxx: Initialize free_work before flushing it scsi: qla2xxx: Use explicit LOGO in target mode scsi: qla2xxx: Ignore NULL pointer in tcm_qla2xxx_free_mcmd ... commit ed56dd8f60cf3d56ca1416288b09eec27bdd5413 Author: Arnd Bergmann Date: Wed Dec 11 13:56:10 2019 +0100 net: ethernet: ti: build cpsw-common for switchdev Without the common part of the driver, the new file fails to link: drivers/net/ethernet/ti/cpsw_new.o: In function `cpsw_probe': cpsw_new.c:(.text+0x312c): undefined reference to `ti_cm_get_macid' Use the same Makefile hack as before, and build cpsw-common.o for any driver that needs it. Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Signed-off-by: Arnd Bergmann Reviewed-by: Grygorii Strashko Signed-off-by: Jakub Kicinski commit 99e9fe2248f9bd86dd10e773c90c9b54055b1d92 Author: Arnd Bergmann Date: Wed Dec 11 13:56:09 2019 +0100 net: ethernet: ti: select PAGE_POOL for switchdev driver The new driver misses a dependency: drivers/net/ethernet/ti/cpsw_new.o: In function `cpsw_rx_handler': cpsw_new.c:(.text+0x259c): undefined reference to `__page_pool_put_page' cpsw_new.c:(.text+0x25d0): undefined reference to `page_pool_alloc_pages' drivers/net/ethernet/ti/cpsw_priv.o: In function `cpsw_fill_rx_channels': cpsw_priv.c:(.text+0x22d8): undefined reference to `page_pool_alloc_pages' cpsw_priv.c:(.text+0x2420): undefined reference to `__page_pool_put_page' drivers/net/ethernet/ti/cpsw_priv.o: In function `cpsw_create_xdp_rxqs': cpsw_priv.c:(.text+0x2624): undefined reference to `page_pool_create' drivers/net/ethernet/ti/cpsw_priv.o: In function `cpsw_run_xdp': cpsw_priv.c:(.text+0x2dc8): undefined reference to `__page_pool_put_page' Other drivers use 'select' for PAGE_POOL, so do the same here. Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Signed-off-by: Arnd Bergmann Acked-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Reviewed-by: Grygorii Strashko Signed-off-by: Jakub Kicinski commit f61cf8decb37e7244247129163bf69b45dd3b1cd Merge: 894554c1ca79 16981742717b Author: Linus Torvalds Date: Sat Dec 14 12:49:20 2019 -0800 Merge tag 'char-misc-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are six small fixes for some reported char/misc driver issues: - fix build warnings with new 'awk' with the raid6 code - four interconnect driver bugfixes - binder fix for reported problem All of these except the binder fix have been in linux-next with no reported issues. The binder fix is "new" but Todd says it is good as he has tested it :)" * tag 'char-misc-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: binder: fix incorrect calculation for num_valid interconnect: qcom: msm8974: Walk the list safely on node removal interconnect: qcom: qcs404: Walk the list safely on node removal interconnect: qcom: sdm845: Walk the list safely on node removal interconnect: qcom: Fix Kconfig indentation lib: raid6: fix awk build warnings commit 894554c1ca793ad96a26b7c9f1eedd043e9e8164 Merge: aff2a52507bf eecd37e105f0 Author: Linus Torvalds Date: Sat Dec 14 12:45:36 2019 -0800 Merge tag 'driver-core-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two small driver core fixes to resolve some reported issues The first is to handle the much-reported (by the build systems) problem that superH does not boot anymore. The second handles an issue in the new platform logic that a number of people ran into with the automated tests in kbuild Both of these have been in linux-next with no reported issues" * tag 'driver-core-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: drivers: Fix boot problem on SuperH of/platform: Unconditionally pause/resume sync state during kernel init commit aff2a52507bfeb4d44d6a69f6f8d7ca3bcb9b50d Merge: a1b85b3bf9f9 4bcd9eae7310 Author: Linus Torvalds Date: Sat Dec 14 12:43:57 2019 -0800 Merge tag 'staging-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO fixes from Greg KH: "Here are a number of small staging and IIO driver fixes for reported issues for 5.5-rc2 Nothing major, a bunch of tiny IIO driver issues resolved, and some staging driver fixes for things that people ran into with 5.5-rc1. Full details are in the shortlog. All of these have been in linux-next with no reported issues" * tag 'staging-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (28 commits) fbtft: Fix the initialization from property algorithm staging: rtl8712: fix interface sanity check staging: rtl8188eu: fix interface sanity check staging: gigaset: add endpoint-type sanity check staging: gigaset: fix illegal free on probe errors staging: gigaset: fix general protection fault on probe staging: vchiq: call unregister_chrdev_region() when driver registration fails staging: exfat: fix multiple definition error of `rename_file' staging/wlan-ng: add CRC32 dependency in Kconfig staging: hp100: Fix build error without ETHERNET staging: fbtft: Do not hardcode SPI CS polarity inversion staging: exfat: properly support discard in clr_alloc_bitmap() staging/octeon: Mark Ethernet driver as BROKEN iio: adc: max9611: Fix too short conversion time delay iio: ad7949: fix channels mixups iio: imu: st_lsm6dsx: do not power-off accel if events are enabled iio: imu: st_lsm6dsx: track hw FIFO buffering with fifo_mask iio: imu: st_lsm6dsx: fix decimation factor estimation iio: imu: inv_mpu6050: fix temperature reporting using bad unit iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting ... commit a1b85b3bf9f9922bdc1428cd2ac4528786a05da7 Merge: 81d559849aa4 3c3caae4cd6e Author: Linus Torvalds Date: Sat Dec 14 12:40:39 2019 -0800 Merge tag 'usb-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB driver fixes for reported issues for 5.5-rc2 There's the usual gadget and xhci fixes, as well as some other problems that syzbot has been finding during it's fuzzing runs. Full details are in the shortlog. All of these have been in linux-next with no reported issues" * tag 'usb-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (21 commits) usb: dwc3: pci: add ID for the Intel Comet Lake -H variant xhci: make sure interrupts are restored to correct state xhci: handle some XHCI_TRUST_TX_LENGTH quirks cases as default behaviour. xhci: Increase STS_HALT timeout in xhci_suspend() usb: xhci: only set D3hot for pci device xhci: fix USB3 device initiated resume race with roothub autosuspend xhci: Fix memory leak in xhci_add_in_port() USB: Fix incorrect DMA allocations for local memory pool drivers usb: gadget: fix wrong endpoint desc usb: dwc3: ep0: Clear started flag on completion usb: dwc3: gadget: Clear started flag for non-IOC usb: dwc3: gadget: Fix logical condition USB: atm: ueagle-atm: add missing endpoint check USB: adutux: fix interface sanity check USB: idmouse: fix interface sanity checks USB: serial: io_edgeport: fix epic endpoint lookup usb: mon: Fix a deadlock in usbmon between mmap and read usb: common: usb-conn-gpio: Don't log an error on probe deferral usb: core: urb: fix URB structure initialization function usb: typec: fix use after free in typec_register_port() ... commit 81d559849aa4d972a2d297840eefdd20c4054131 Merge: f791ede32a14 3e39ce266a27 Author: Linus Torvalds Date: Sat Dec 14 12:34:37 2019 -0800 Merge tag 's390-5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Add support for KASAN_VMALLOC feature. - Remove the last user of problematic diag 0x44 call. - Adjust sampling interval and avoid sample data block overflow condition on pressure in perf code. - Prefer EOPNOTSUPP over ENOTSUPP and comments fixes. * tag 's390-5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/kasan: add KASAN_VMALLOC support s390: remove last diag 0x44 caller s390/uv: use EOPNOTSUPP instead of ENOTSUPP s390/cpum_sf: Avoid SBD overflow condition in irq handler s390/cpum_sf: Adjust sampling interval to avoid hitting sample limits s390/test_unwind: fix spelling mistake "reqister" -> "register" s390/spinlock: remove confusing comment in arch_spin_lock_wait commit f791ede32a14151a313783e1105049a137bc13c8 Merge: 103a022d6bc5 84faa307249b Author: Linus Torvalds Date: Sat Dec 14 12:32:28 2019 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix another build problem for Wireguard without Crypto" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: arm/curve25519 - add arch-specific key generation function commit 103a022d6bc5962947f36414ac5c5d4d3d3aaea3 Merge: 81c64b0bd090 d9191319358d Author: Linus Torvalds Date: Sat Dec 14 11:44:14 2019 -0800 Merge tag '5.5-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cfis fixes from Steve French: "Three small smb3 fixes: this addresses two recent issues reported in additional testing during rc1, a refcount underflow and a problem with an intermittent crash in SMB2_open_init" * tag '5.5-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: CIFS: Close cached root handle only if it has a lease SMB3: Fix crash in SMB2_open_init due to uninitialized field in compounding path smb3: fix refcount underflow warning on unmount when no directory leases commit c39ea5cba5a2e97fc01b78c85208bf31383b399c Author: Haiyang Zhang Date: Wed Dec 11 14:26:27 2019 -0800 hv_netvsc: Fix tx_table init in rndis_set_subchannel() Host can provide send indirection table messages anytime after RSS is enabled by calling rndis_filter_set_rss_param(). So the host provided table values may be overwritten by the initialization in rndis_set_subchannel(). To prevent this problem, move the tx_table initialization before calling rndis_filter_set_rss_param(). Fixes: a6fb6aa3cfa9 ("hv_netvsc: Set tx_table to equal weight after subchannels open") Signed-off-by: Haiyang Zhang Signed-off-by: Jakub Kicinski commit 81c64b0bd0900405b4e55f3d48a2fc7dd5e1676c Merge: e31736d9fae8 35c6cb41686c Author: Linus Torvalds Date: Sat Dec 14 11:13:54 2019 -0800 Merge tag 'ovl-fixes-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix some bugs and documentation" * tag 'ovl-fixes-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: docs: filesystems: overlayfs: Fix restview warnings docs: filesystems: overlayfs: Rename overlayfs.txt to .rst ovl: relax WARN_ON() on rename to self ovl: fix corner case of non-unique st_dev;st_ino ovl: don't use a temp buf for encoding real fh ovl: make sure that real fid is 32bit aligned in memory ovl: fix lookup failure on multi lower squashfs commit f3f2364ea14d1cf6bf966542f31eadcf178f1577 Author: Russell King Date: Tue Dec 10 22:33:05 2019 +0000 net: marvell: mvpp2: phylink requires the link interrupt phylink requires the MAC to report when its link status changes when operating in inband modes. Failure to report link status changes means that phylink has no idea when the link events happen, which results in either the network interface's carrier remaining up or remaining permanently down. For example, with a fiber module, if the interface is brought up and link is initially established, taking the link down at the far end will cut the optical power. The SFP module's LOS asserts, we deactivate the link, and the network interface reports no carrier. When the far end is brought back up, the SFP module's LOS deasserts, but the MAC may be slower to establish link. If this happens (which in my tests is a certainty) then phylink never hears that the MAC has established link with the far end, and the network interface is stuck reporting no carrier. This means the interface is non-functional. Avoiding the link interrupt when we have phylink is basically not an option, so remove the !port->phylink from the test. Fixes: 4bb043262878 ("net: mvpp2: phylink support") Tested-by: Sven Auhagen Tested-by: Antoine Tenart Signed-off-by: Russell King Signed-off-by: Jakub Kicinski commit cd1263b6dcfdf0e938946441295d8fcfe1654d3a Merge: 5c9934b6767b 216808c6ba6d Author: Jakub Kicinski Date: Sat Dec 14 09:57:36 2019 -0800 Merge branch 'tcp-take-care-of-empty-skbs-in-write-queue' Eric Dumazet says: ==================== tcp: take care of empty skbs in write queue We understood recently that TCP sockets could have an empty skb at the tail of the write queue, leading to various problems. This patch series : 1) Make sure we do not send an empty packet since this was unintended and causing crashes in old kernels. 2) Change tcp_write_queue_empty() to not be fooled by the presence of an empty skb. 3) Fix a bug that could trigger suboptimal epoll() application behavior under memory pressure. ==================== Signed-off-by: Jakub Kicinski commit 6fd739c04ffd877641b01371f9fde67901e7f9cb Author: Takashi Iwai Date: Sat Dec 14 18:52:17 2019 +0100 ALSA: hda: Fix regression by strip mask fix The commit e38e486d66e2 ("ALSA: hda: Modify stream stripe mask only when needed") tried to address the regression by the unconditional application of the stripe mask, but this caused yet another regression for the previously working devices. Namely, the patch clears the azx_dev->stripe flag at snd_hdac_stream_clear(), but this may be called multiple times before restarting the stream, so this ended up with clearance of the flag for the whole time. This patch fixes the regression by moving the azx_dev->stripe flag clearance at the counter-part, the close callback of HDMI codec driver instead. Fixes: e38e486d66e2 ("ALSA: hda: Modify stream stripe mask only when needed") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205855 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204477 Cc: Link: https://lore.kernel.org/r/20191214175217.31852-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 42fb6b1d41eb5905d77c06cad2e87b70289bdb76 Author: Takashi Iwai Date: Fri Dec 13 09:51:11 2019 +0100 ALSA: hda/ca0132 - Fix work handling in delayed HP detection CA0132 has the delayed HP jack detection code that is invoked from the unsol handler, but it does a few weird things: it contains the cancel of a work inside the work handler, and yet it misses the cancel-sync call at (runtime-)suspend. This patch addresses those issues. Fixes: 15c2b3cc09a3 ("ALSA: hda/ca0132 - Fix possible workqueue stall") Cc: Link: https://lore.kernel.org/r/20191213085111.22855-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit cb04fc3b6b076f67d228a0b7d096c69ad486c09c Author: Takashi Iwai Date: Fri Dec 13 09:51:10 2019 +0100 ALSA: hda/ca0132 - Avoid endless loop Introduce a timeout to dspio_clear_response_queue() so that it won't be caught in an endless loop even if the hardware doesn't respond properly. Fixes: a73d511c4867 ("ALSA: hda/ca0132: Add unsol handler for DSP and jack detection") Cc: Link: https://lore.kernel.org/r/20191213085111.22855-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 377bc0cfabce0244632dada19060839ced4e6949 Author: Takashi Iwai Date: Fri Dec 13 09:51:09 2019 +0100 ALSA: hda/ca0132 - Keep power on during processing DSP response We need to keep power on while processing the DSP response via unsol event. Each snd_hda_codec_read() call does the power management, so it should work normally, but still it's safer to keep the power up for the whole function. Fixes: a73d511c4867 ("ALSA: hda/ca0132: Add unsol handler for DSP and jack detection") Cc: Link: https://lore.kernel.org/r/20191213085111.22855-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit add9d56d7b3781532208afbff5509d7382fb6efe Author: Takashi Iwai Date: Wed Dec 11 16:57:42 2019 +0100 ALSA: pcm: Avoid possible info leaks from PCM stream buffers The current PCM code doesn't initialize explicitly the buffers allocated for PCM streams, hence it might leak some uninitialized kernel data or previous stream contents by mmapping or reading the buffer before actually starting the stream. Since this is a common problem, this patch simply adds the clearance of the buffer data at hw_params callback. Although this does only zero-clear no matter which format is used, which doesn't mean the silence for some formats, but it should be OK because the intention is just to clear the previous data on the buffer. Reported-by: Lionel Koenig Cc: Link: https://lore.kernel.org/r/20191211155742.3213-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 68a1fdf2451f38b4ada0607eb6e1303f8a02e0b7 Author: Chen Wandun Date: Tue Dec 10 19:06:56 2019 +0800 habanalabs: remove variable 'val' set but not used Fixes gcc '-Wunused-but-set-variable' warning: drivers/misc/habanalabs/goya/goya.c: In function goya_pldm_init_cpu: drivers/misc/habanalabs/goya/goya.c:2195:6: warning: variable val set but not used [-Wunused-but-set-variable] drivers/misc/habanalabs/goya/goya.c: In function goya_hw_init: drivers/misc/habanalabs/goya/goya.c:2505:6: warning: variable val set but not used [-Wunused-but-set-variable] Fixes: 9494a8dd8d22 ("habanalabs: add h/w queues module") Signed-off-by: Chen Wandun Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 018e0e3594f7dcd029d258e368c485e742fa9cdb Author: Oded Gabbay Date: Tue Dec 3 10:12:10 2019 +0200 habanalabs: rate limit error msg on waiting for CS In case a user submits a CS, and the submission fails, and the user doesn't check the return value and instead use the error return value as a valid sequence number of a CS and ask to wait on it, the driver will print an error and return an error code for that wait. The real problem happens if now the user ignores the error of the wait, and try to wait again and again. This can lead to a flood of error messages from the driver and even soft lockup event. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit 16981742717b04644a41052570fb502682a315d2 Author: Todd Kjos Date: Fri Dec 13 12:25:31 2019 -0800 binder: fix incorrect calculation for num_valid For BINDER_TYPE_PTR and BINDER_TYPE_FDA transactions, the num_valid local was calculated incorrectly causing the range check in binder_validate_ptr() to miss out-of-bounds offsets. Fixes: bde4a19fc04f ("binder: use userspace pointer as base of buffer space") Signed-off-by: Todd Kjos Cc: stable Link: https://lore.kernel.org/r/20191213202531.55010-1-tkjos@google.com Signed-off-by: Greg Kroah-Hartman commit fd2ab2f6610b2bec70e626c38de8a4242fa88e48 Author: Masahiro Yamada Date: Mon Dec 9 12:51:48 2019 +0900 scripts/kallsyms: fix offset overflow of kallsyms_relative_base Since commit 5e5c4fa78745 ("scripts/kallsyms: shrink table before sorting it"), kallsyms_relative_base can be larger than _text, which causes overflow when building the 32-bit kernel. https://lkml.org/lkml/2019/12/7/156 This is because _text is, unless --all-symbols is specified, now trimmed from the symbol table before record_relative_base() is called. Handle the offset signedness also for kallsyms_relative_base. Introduce a new helper, output_address(), to reduce the code duplication. Fixes: 5e5c4fa78745 ("scripts/kallsyms: shrink table before sorting it") Reported-by: Olof Johansson Signed-off-by: Masahiro Yamada commit c8f3dea90e38194dae542c5d56e05d30447e58cb Author: Masahiro Yamada Date: Fri Dec 6 22:03:02 2019 +0900 mkcompile_h: use printf for LINUX_COMPILE_BY Commit 858805b336be ("kbuild: add $(BASH) to run scripts with bash-extension") shed light on portability issues. Here is another one. Since commit f07726048d59 ("Fix handling of backlash character in LINUX_COMPILE_BY name"), we must escape a backslash contained in LINUX_COMPILE_BY. This is not working on such distros as Ubuntu. As the POSIX spec [1] says, if any of the operands contain a backslash ( '\' ) character, the results are implementation-defined. The actual shell of /bin/sh could be bash, dash, etc. depending on distros, and the behavior of builtin echo command is different among them. The bash builtin echo, unless -e is given, copies the arguments to stdout without expanding escape sequences (BSD-like behavior). The dash builtin echo, in contrast, adopts System V behavior, which does expand escape sequences without any option given. Even non-builtin /bin/echo behaves differently depending on the system. Due to these variations, echo is considered as a non-portable command. Using printf is the common solution to avoid the portability issue. [1] https://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html Fixes: 858805b336be ("kbuild: add $(BASH) to run scripts with bash-extension") Reported-by: XXing Wei Signed-off-by: Masahiro Yamada commit e8193650bf38bf531f19de36ae3afdee32627191 Author: Masahiro Yamada Date: Fri Dec 6 22:03:01 2019 +0900 mkcompile_h: git rid of UTS_TRUNCATE from LINUX_COMPILE_{BY,HOST} UTS_VERSION is set to struct uts_namespace, hence a too long string should be truncated so it fits in 64 characters. On the other hand, LINUX_COMPILE_BY/HOST are not set to uts_namespace. They are just used in the banners, which do not have specific length limitation. I dug into the git history, but I could not find the reason why these two strings must fit in 64 characters. Remove them. Now that UTS_VERSION is the only user of UTS_TRUNCATE, I squashed it. Signed-off-by: Masahiro Yamada commit eefb8c124fd969e9a174ff2bedff86aa305a7438 Author: Dmitry Golovin Date: Thu Dec 5 00:54:41 2019 +0200 x86/boot: kbuild: allow readelf executable to be specified Introduce a new READELF variable to top-level Makefile, so the name of readelf binary can be specified. Before this change the name of the binary was hardcoded to "$(CROSS_COMPILE)readelf" which might not be present for every toolchain. This allows to build with LLVM Object Reader by using make parameter READELF=llvm-readelf. Link: https://github.com/ClangBuiltLinux/linux/issues/771 Signed-off-by: Dmitry Golovin Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit 216808c6ba6d00169fd2aa928ec3c0e63bef254f Author: Eric Dumazet Date: Thu Dec 12 12:55:31 2019 -0800 tcp: refine rule to allow EPOLLOUT generation under mem pressure At the time commit ce5ec440994b ("tcp: ensure epoll edge trigger wakeup when write queue is empty") was added to the kernel, we still had a single write queue, combining rtx and write queues. Once we moved the rtx queue into a separate rb-tree, testing if sk_write_queue is empty has been suboptimal. Indeed, if we have packets in the rtx queue, we probably want to delay the EPOLLOUT generation at the time incoming packets will free them, making room, but more importantly avoiding flooding application with EPOLLOUT events. Solution is to use tcp_rtx_and_write_queues_empty() helper. Fixes: 75c119afe14f ("tcp: implement rb-tree based retransmit queue") Signed-off-by: Eric Dumazet Cc: Jason Baron Cc: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit ee2aabd3fc2eef4c1a0ebdadccc76fbff74b94fc Author: Eric Dumazet Date: Thu Dec 12 12:55:30 2019 -0800 tcp: refine tcp_write_queue_empty() implementation Due to how tcp_sendmsg() is implemented, we can have an empty skb at the tail of the write queue. Most [1] tcp_write_queue_empty() callers want to know if there is anything to send (payload and/or FIN) Instead of checking if the sk_write_queue is empty, we need to test if tp->write_seq == tp->snd_nxt [1] tcp_send_fin() was the only caller that expected to see if an skb was in the write queue, I have changed the code to reuse the tcp_write_queue_tail() result. Signed-off-by: Eric Dumazet Cc: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit 1f85e6267caca44b30c54711652b0726fadbb131 Author: Eric Dumazet Date: Thu Dec 12 12:55:29 2019 -0800 tcp: do not send empty skb from tcp_write_xmit() Backport of commit fdfc5c8594c2 ("tcp: remove empty skb from write queue in error cases") in linux-4.14 stable triggered various bugs. One of them has been fixed in commit ba2ddb43f270 ("tcp: Don't dequeue SYN/FIN-segments from write-queue"), but we still have crashes in some occasions. Root-cause is that when tcp_sendmsg() has allocated a fresh skb and could not append a fragment before being blocked in sk_stream_wait_memory(), tcp_write_xmit() might be called and decide to send this fresh and empty skb. Sending an empty packet is not only silly, it might have caused many issues we had in the past with tp->packets_out being out of sync. Fixes: c65f7f00c587 ("[TCP]: Simplify SKB data portion allocation with NETIF_F_SG.") Signed-off-by: Eric Dumazet Cc: Christoph Paasch Acked-by: Neal Cardwell Cc: Jason Baron Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit 5c9934b6767b16ba60be22ec3cbd4379ad64170d Author: Eric Dumazet Date: Thu Dec 12 10:32:13 2019 -0800 6pack,mkiss: fix possible deadlock We got another syzbot report [1] that tells us we must use write_lock_irq()/write_unlock_irq() to avoid possible deadlock. [1] WARNING: inconsistent lock state 5.5.0-rc1-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-R} usage. syz-executor826/9605 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8a128718 (disc_data_lock){+-..}, at: sp_get.isra.0+0x1d/0xf0 drivers/net/ppp/ppp_synctty.c:138 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4485 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x33/0x50 kernel/locking/spinlock.c:319 sixpack_close+0x1d/0x250 drivers/net/hamradio/6pack.c:657 tty_ldisc_close.isra.0+0x119/0x1a0 drivers/tty/tty_ldisc.c:489 tty_set_ldisc+0x230/0x6b0 drivers/tty/tty_ldisc.c:585 tiocsetd drivers/tty/tty_io.c:2337 [inline] tty_ioctl+0xe8d/0x14f0 drivers/tty/tty_io.c:2597 vfs_ioctl fs/ioctl.c:47 [inline] file_ioctl fs/ioctl.c:545 [inline] do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732 ksys_ioctl+0xab/0xd0 fs/ioctl.c:749 __do_sys_ioctl fs/ioctl.c:756 [inline] __se_sys_ioctl fs/ioctl.c:754 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 3946 hardirqs last enabled at (3945): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (3945): [] _raw_spin_unlock_irq+0x23/0x80 kernel/locking/spinlock.c:199 hardirqs last disabled at (3946): [] trace_hardirqs_off_thunk+0x1a/0x1c arch/x86/entry/thunk_64.S:42 softirqs last enabled at (2658): [] spin_unlock_bh include/linux/spinlock.h:383 [inline] softirqs last enabled at (2658): [] clusterip_netdev_event+0x46f/0x670 net/ipv4/netfilter/ipt_CLUSTERIP.c:222 softirqs last disabled at (2656): [] spin_lock_bh include/linux/spinlock.h:343 [inline] softirqs last disabled at (2656): [] clusterip_netdev_event+0x1bb/0x670 net/ipv4/netfilter/ipt_CLUSTERIP.c:196 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(disc_data_lock); lock(disc_data_lock); *** DEADLOCK *** 5 locks held by syz-executor826/9605: #0: ffff8880a905e198 (&tty->legacy_mutex){+.+.}, at: tty_lock+0xc7/0x130 drivers/tty/tty_mutex.c:19 #1: ffffffff899a56c0 (rcu_read_lock){....}, at: mutex_spin_on_owner+0x0/0x330 kernel/locking/mutex.c:413 #2: ffff8880a496a2b0 (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:338 [inline] #2: ffff8880a496a2b0 (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x2d/0x1a0 drivers/tty/serial/8250/8250_core.c:116 #3: ffffffff8c104048 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x24/0x330 drivers/tty/serial/8250/8250_port.c:1823 #4: ffff8880a905e090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x22/0x90 drivers/tty/tty_ldisc.c:288 stack backtrace: CPU: 1 PID: 9605 Comm: syz-executor826 Not tainted 5.5.0-rc1-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+0x197/0x210 lib/dump_stack.c:118 print_usage_bug.cold+0x327/0x378 kernel/locking/lockdep.c:3101 valid_state kernel/locking/lockdep.c:3112 [inline] mark_lock_irq kernel/locking/lockdep.c:3309 [inline] mark_lock+0xbb4/0x1220 kernel/locking/lockdep.c:3666 mark_usage kernel/locking/lockdep.c:3554 [inline] __lock_acquire+0x1e55/0x4a00 kernel/locking/lockdep.c:3909 lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4485 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x32/0x50 kernel/locking/spinlock.c:223 sp_get.isra.0+0x1d/0xf0 drivers/net/ppp/ppp_synctty.c:138 sixpack_write_wakeup+0x25/0x340 drivers/net/hamradio/6pack.c:402 tty_wakeup+0xe9/0x120 drivers/tty/tty_io.c:536 tty_port_default_wakeup+0x2b/0x40 drivers/tty/tty_port.c:50 tty_port_tty_wakeup+0x57/0x70 drivers/tty/tty_port.c:387 uart_write_wakeup+0x46/0x70 drivers/tty/serial/serial_core.c:104 serial8250_tx_chars+0x495/0xaf0 drivers/tty/serial/8250/8250_port.c:1761 serial8250_handle_irq.part.0+0x2a2/0x330 drivers/tty/serial/8250/8250_port.c:1834 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1820 [inline] serial8250_default_handle_irq+0xc0/0x150 drivers/tty/serial/8250/8250_port.c:1850 serial8250_interrupt+0xf1/0x1a0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x15d/0x970 kernel/irq/handle.c:149 handle_irq_event_percpu+0x74/0x160 kernel/irq/handle.c:189 handle_irq_event+0xa7/0x134 kernel/irq/handle.c:206 handle_edge_irq+0x25e/0x8d0 kernel/irq/chip.c:830 generic_handle_irq_desc include/linux/irqdesc.h:156 [inline] do_IRQ+0xde/0x280 arch/x86/kernel/irq.c:250 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:607 RIP: 0010:cpu_relax arch/x86/include/asm/processor.h:685 [inline] RIP: 0010:mutex_spin_on_owner+0x247/0x330 kernel/locking/mutex.c:579 Code: c3 be 08 00 00 00 4c 89 e7 e8 e5 06 59 00 4c 89 e0 48 c1 e8 03 42 80 3c 38 00 0f 85 e1 00 00 00 49 8b 04 24 a8 01 75 96 f3 90 2f fe ff ff 0f 0b e8 0d 19 09 00 84 c0 0f 85 ff fd ff ff 48 c7 RSP: 0018:ffffc90001eafa20 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffd7 RAX: 0000000000000000 RBX: ffff88809fd9e0c0 RCX: 1ffffffff13266dd RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000000 RBP: ffffc90001eafa60 R08: 1ffff11013d22898 R09: ffffed1013d22899 R10: ffffed1013d22898 R11: ffff88809e9144c7 R12: ffff8880a905e138 R13: ffff88809e9144c0 R14: 0000000000000000 R15: dffffc0000000000 mutex_optimistic_spin kernel/locking/mutex.c:673 [inline] __mutex_lock_common kernel/locking/mutex.c:962 [inline] __mutex_lock+0x32b/0x13c0 kernel/locking/mutex.c:1106 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1121 tty_lock+0xc7/0x130 drivers/tty/tty_mutex.c:19 tty_release+0xb5/0xe90 drivers/tty/tty_io.c:1665 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x8e7/0x2ef0 kernel/exit.c:797 do_group_exit+0x135/0x360 kernel/exit.c:895 __do_sys_exit_group kernel/exit.c:906 [inline] __se_sys_exit_group kernel/exit.c:904 [inline] __x64_sys_exit_group+0x44/0x50 kernel/exit.c:904 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x43fef8 Code: Bad RIP value. RSP: 002b:00007ffdb07d2338 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043fef8 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00000000004bf730 R08: 00000000000000e7 R09: ffffffffffffffd0 R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006d1180 R14: 0000000000000000 R15: 0000000000000000 Fixes: 6e4e2f811bad ("6pack,mkiss: fix lock inconsistency") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Arnd Bergmann Signed-off-by: Jakub Kicinski commit 8dbd76e79a16b45b2ccb01d2f2e08dbf64e71e40 Author: Eric Dumazet Date: Fri Dec 13 18:20:41 2019 -0800 tcp/dccp: fix possible race __inet_lookup_established() Michal Kubecek and Firo Yang did a very nice analysis of crashes happening in __inet_lookup_established(). Since a TCP socket can go from TCP_ESTABLISH to TCP_LISTEN (via a close()/socket()/listen() cycle) without a RCU grace period, I should not have changed listeners linkage in their hash table. They must use the nulls protocol (Documentation/RCU/rculist_nulls.txt), so that a lookup can detect a socket in a hash list was moved in another one. Since we added code in commit d296ba60d8e2 ("soreuseport: Resolve merge conflict for v4/v6 ordering fix"), we have to add hlist_nulls_add_tail_rcu() helper. Fixes: 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood") Signed-off-by: Eric Dumazet Reported-by: Michal Kubecek Reported-by: Firo Yang Reviewed-by: Michal Kubecek Link: https://lore.kernel.org/netdev/20191120083919.GH27852@unicorn.suse.cz/ Signed-off-by: Jakub Kicinski commit 8f9cc1ee296275d27770245cbd247a4952bbb2be Author: Thomas Falcon Date: Wed Dec 11 09:38:39 2019 -0600 net/ibmvnic: Fix typo in retry check This conditional is missing a bang, with the intent being to break when the retry count reaches zero. Fixes: 476d96ca9cc5 ("ibmvnic: Bound waits for device queries") Suggested-by: Juliet Kim Signed-off-by: Thomas Falcon Signed-off-by: Jakub Kicinski commit 2beb6d2901a3f73106485d560c49981144aeacb1 Author: Hangbin Liu Date: Wed Dec 11 22:20:16 2019 +0800 ipv6/addrconf: only check invalid header values when NETLINK_F_STRICT_CHK is set In commit 4b1373de73a3 ("net: ipv6: addr: perform strict checks also for doit handlers") we add strict check for inet6_rtm_getaddr(). But we did the invalid header values check before checking if NETLINK_F_STRICT_CHK is set. This may break backwards compatibility if user already set the ifm->ifa_prefixlen, ifm->ifa_flags, ifm->ifa_scope in their netlink code. I didn't move the nlmsg_len check because I thought it's a valid check. Reported-by: Jianlin Shi Fixes: 4b1373de73a3 ("net: ipv6: addr: perform strict checks also for doit handlers") Signed-off-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 1021dcf19db1387bc0db26d14bbcba719923a466 Author: Anson Huang Date: Fri Dec 13 14:02:30 2019 -0800 Input: imx_sc_key - only take the valid data from SCU firmware as key state When reading key state from SCU, the response data from SCU firmware is 4 bytes due to MU message protocol, but ONLY the first byte is the key state, other 3 bytes could be some dirty data, so we should ONLY take the first byte as key state to avoid reporting incorrect state. Signed-off-by: Anson Huang Fixes: 688f1dfb69b4 ("Input: keyboard - imx_sc: Add i.MX system controller key support") Link: https://lore.kernel.org/r/1576202909-1661-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Dmitry Torokhov commit 03b06e3f83523ded51aa822f58c083fbde08feb5 Author: Arnd Bergmann Date: Tue Dec 10 20:56:34 2019 +0100 ptp: clockmatrix: add I2C dependency Without I2C, we get a link failure: drivers/ptp/ptp_clockmatrix.o: In function `idtcm_xfer.isra.3': ptp_clockmatrix.c:(.text+0xcc): undefined reference to `i2c_transfer' drivers/ptp/ptp_clockmatrix.o: In function `idtcm_driver_init': ptp_clockmatrix.c:(.init.text+0x14): undefined reference to `i2c_register_driver' drivers/ptp/ptp_clockmatrix.o: In function `idtcm_driver_exit': ptp_clockmatrix.c:(.exit.text+0x10): undefined reference to `i2c_del_driver' Fixes: 3a6ba7dc7799 ("ptp: Add a ptp clock driver for IDT ClockMatrix.") Signed-off-by: Arnd Bergmann Reviewed-by: Vincent Cheng Signed-off-by: Jakub Kicinski commit 6adc4601c2a1ac87b4ab8ed0cb55db6efd0264e8 Author: Jonathan Lemon Date: Tue Dec 10 08:39:46 2019 -0800 bnxt: apply computed clamp value for coalece parameter After executing "ethtool -C eth0 rx-usecs-irq 0", the box becomes unresponsive, likely due to interrupt livelock. It appears that a minimum clamp value for the irq timer is computed, but is never applied. Fix by applying the corrected clamp value. Fixes: 74706afa712d ("bnxt_en: Update interrupt coalescing logic.") Signed-off-by: Jonathan Lemon Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 5133498f4ad1123a5ffd4c08df6431dab882cc32 Author: Lorenz Bauer Date: Fri Dec 13 18:08:17 2019 +0000 bpf: Clear skb->tstamp in bpf_redirect when necessary Redirecting a packet from ingress to egress by using bpf_redirect breaks if the egress interface has an fq qdisc installed. This is the same problem as fixed in 'commit 8203e2d844d3 ("net: clear skb->tstamp in forwarding paths") Clear skb->tstamp when redirecting into the egress path. Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.") Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC") Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/bpf/20191213180817.2510-1-lmb@cloudflare.com commit 692b93af71fb6795887affd6a281e4f91407489f Author: Vivien Didelot Date: Thu Dec 12 12:59:08 2019 -0500 mailmap: add entry for myself I no longer work at Savoir-faire Linux but even though MAINTAINERS is up-to-date, some emails are still sent to my old email address. Signed-off-by: Vivien Didelot Signed-off-by: Jakub Kicinski commit 9c3194dd93b067d0a9fd84d516de69f438dbc9c2 Author: Subash Abhinov Kasiviswanathan Date: Thu Dec 12 04:00:15 2019 +0000 MAINTAINERS: Add maintainers for rmnet Add myself and Sean as maintainers for rmnet driver. Signed-off-by: Sean Tranchetti Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: Jakub Kicinski commit e31736d9fae841e8a1612f263136454af10f476a Merge: 1482e664fe35 e32ea127d81c Author: Linus Torvalds Date: Fri Dec 13 15:05:00 2019 -0800 Merge tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull nios2 fix from Ley Foon Tan: "Fix nios2 ioremap regression" * tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: Fix ioremap commit 1482e664fe353775c48d3f9d3e5059b9853d4d99 Merge: dd79b5361a6a ee9b280e17dc Author: Linus Torvalds Date: Fri Dec 13 15:03:25 2019 -0800 Merge tag 'devicetree-fixes-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree fixes from Rob Herring: - Fix for dependency tracking caused by unittest interaction - Fix some schema errors in Tegra memory controller schema - Update Maxime Ripard's email address - Review fixes to TI cpsw-switch - Add wakeup-source prop for STM32 rproc. Got dropped in the schema conversion. * tag 'devicetree-fixes-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of/platform: Unconditionally pause/resume sync state during kernel init dt-bindings: memory-controllers: tegra: Fix type references dt-bindings: Change maintainer address dt-bindings: net: ti: cpsw-switch: update to fix comments dt-bindings: remoteproc: stm32: add wakeup-source property commit cb222aed03d798fc074be55e59d9a112338ee784 Author: Dmitry Torokhov Date: Fri Dec 13 14:56:16 2019 -0800 Input: add safety guards to input_set_keycode() If we happen to have a garbage in input device's keycode table with values too big we'll end up doing clear_bit() with offset way outside of our bitmaps, damaging other objects within an input device or even outside of it. Let's add sanity checks to the returned old keycodes. Reported-by: syzbot+c769968809f9359b07aa@syzkaller.appspotmail.com Reported-by: syzbot+76f3a30e88d256644c78@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20191207212757.GA245964@dtor-ws Signed-off-by: Dmitry Torokhov commit f729a1b0f8df7091cea3729fc0e414f5326e1163 Author: Arnd Bergmann Date: Fri Dec 13 14:06:58 2019 -0800 Input: input_event - fix struct padding on sparc64 Going through all uses of timeval, I noticed that we screwed up input_event in the previous attempts to fix it: The time fields now match between kernel and user space, but all following fields are in the wrong place. Add the required padding that is implied by the glibc timeval definition to fix the layout, and use a struct initializer to avoid leaking kernel stack data. Fixes: 141e5dcaa735 ("Input: input_event - fix the CONFIG_SPARC64 mixup") Fixes: 2e746942ebac ("Input: input_event - provide override for sparc64") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191213204936.3643476-2-arnd@arndb.de Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit add218099472805a06bc334852d8e2af5d74e4ac Author: Dmitry Torokhov Date: Fri Dec 13 14:03:56 2019 -0800 Input: uinput - always report EPOLLOUT uinput device is always available for writing so we should always report EPOLLOUT and EPOLLWRNORM bits, not only when there is nothing to read from the device. Fixes: d4b675e1b527 ("Input: uinput - fix returning EPOLLOUT from uinput_poll") Reported-by: Linus Torvalds Link: https://lore.kernel.org/r/20191209202254.GA107567@dtor-ws Signed-off-by: Dmitry Torokhov commit dd79b5361a6ab3def4a577843ebfecd75b634c8b Merge: 1d76c0792a0a 63b9b80e9f5b Author: Linus Torvalds Date: Fri Dec 13 14:58:24 2019 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "Some fixes and cleanup patches" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: divide/multiply instead of shifts virtio_balloon: name cleanups virtio-balloon: fix managed page counts when migrating pages between zones commit 1d76c0792a0a12529b4d7b052d511dff9cc1b273 Merge: 3b2ee614cb4a ca01e7987463 Author: Linus Torvalds Date: Fri Dec 13 14:52:03 2019 -0800 Merge tag 'pci-v5.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Fix rockchip outbound ATU issue that prevented Google Kevin Chromebooks from booting (Enric Balletbo i Serra)" * tag 'pci-v5.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: rockchip: Fix IO outbound ATU register number commit 3b2ee614cb4accb75080f00586bd762b0eab219c Merge: 6bd2c87aaffe 8c9312a925ad Author: Linus Torvalds Date: Fri Dec 13 14:45:40 2019 -0800 Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - removal of an old API where all in-kernel users have been converted as of this merge window. - a kdoc fix - a new helper that will make dependencies for the next API conversion a tad easier * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: add helper to check if a client has a driver attached i2c: fix header file kernel-doc warning i2c: remove i2c_new_dummy() API commit 6bd2c87aaffe0b58ce65233fe922b9eb5f7d9a85 Merge: b61c56227bf5 4c84515da809 Author: Linus Torvalds Date: Fri Dec 13 14:43:26 2019 -0800 Merge tag 'pm-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These add PM QoS support to devfreq and fix a few issues in that subsystem, fix two cpuidle issues and do one minor cleanup in there, and address an ACPI power management problem related to devices with special power management requirements, like fans. Specifics: - Add PM QoS support, based on the frequency QoS introduced during the 5.4 cycle, to devfreq (Leonard Crestez). - Fix some assorted devfreq issues (Leonard Crestez). - Fix an unintentional cpuidle behavior change (introduced during the 5.4 cycle) related to the active polling time limit (Marcelo Tosatti). - Fix a recently introduced cpuidle helper function and do a minor cleanup in the cpuidle core (Rafael Wysocki). - Avoid adding devices with special power management requirements, like fans, to the generic ACPI PM domain (Rafael Wysocki)" * tag 'pm-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: Drop unnecessary type cast in cpuidle_poll_time() cpuidle: Fix cpuidle_driver_state_disabled() ACPI: PM: Avoid attaching ACPI PM domain to certain devices cpuidle: use first valid target residency as poll time PM / devfreq: Use PM QoS for sysfs min/max_freq PM / devfreq: Add PM QoS support PM / devfreq: Don't fail devfreq_dev_release if not in list PM / devfreq: Introduce get_freq_range helper PM / devfreq: Set scaling_max_freq to max on OPP notifier error PM / devfreq: Fix devfreq_notifier_call returning errno commit b61c56227bf5a2ca5e146cebcdf50b2e15e4c973 Merge: b2cb931d724b 5815bdfd7f54 Author: Linus Torvalds Date: Fri Dec 13 14:40:38 2019 -0800 Merge tag 'sound-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A small collection of fixes. The main changes are fixes for a couple of regressions in AMD HD-audio and FireWire that were introduced in 5.5-rc1. The rest are small fixes for echoaudio and FireWire, as well as a usual Dell HD-audio fixup" * tag 'sound-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Line-out jack doesn't work on a Dell AIO ALSA: hda/hdmi - Fix duplicate unref of pci_dev ALSA: fireface: fix return value in error path of isochronous resources reservation ALSA: oxfw: fix return value in error path of isochronous resources reservation ALSA: firewire-motu: fix double unlocked 'motu->mutex' ALSA: echoaudio: simplify get_audio_levels commit b2cb931d724b08def6e833541a37b08ebd59ab43 Merge: f1fcd7786ec8 d16f0f614000 Author: Linus Torvalds Date: Fri Dec 13 14:36:45 2019 -0800 Merge tag 'drm-fixes-2019-12-13' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Usual round of rc2 fixes. i915 and amdgpu leading the charge, but a few others in here, including some nouveau fixes, all seems pretty for rc2, but hey it's a Fri 13th pull so I'm sure it'll cause untold bad fortune. dma-buf: - memory leak fix - expand MAINTAINERS scope core: - fix mode matching for drivers not using picture_aspect_ratio nouveau: - panel scaling fix - MST BPC fix - atomic fixes i915: - GPU hang on idle transition - GLK+ FBC corruption fix - non-priv OA access on Tigerlake - HDCP state fix - CI found race fixes amdgpu: - renoir DC fixes - GFX8 fence flush alignment with userspace - Arcturus power profile fix - DC aux + i2c over aux fixes - GPUVM invalidation semaphore fixes - gfx10 golden registers update mgag200: - expand startadd fix panfrost: - devfreq fix - memory fixes mcde: - DSI pointer deref fix" * tag 'drm-fixes-2019-12-13' of git://anongit.freedesktop.org/drm/drm: (51 commits) drm/amdgpu: add invalidate semaphore limit for SRIOV in gmc10 drm/amdgpu: add invalidate semaphore limit for SRIOV and picasso in gmc9 drm/amdgpu: avoid using invalidate semaphore for picasso Revert "drm/amdgpu: dont schedule jobs while in reset" drm/amdgpu: fix license on Kconfig and Makefiles drm/amdgpu/gfx10: update gfx golden settings for navi14 drm/amdgpu/gfx10: update gfx golden settings drm/amdgpu/gfx10: update gfx golden settings for navi14 drm/amdgpu/gfx10: update gfx golden settings drm/i915: Serialise with remote retirement drm/amd/display: include linux/slab.h where needed drm/amd/display: fix undefined struct member reference drm/nouveau/kms/nv50-: fix panel scaling drm/nouveau/kms/nv50-: Limit MST BPC to 8 drm/nouveau/kms/nv50-: Store the bpc we're using in nv50_head_atom drm/nouveau/kms/nv50-: Call outp_atomic_check_view() before handling PBN drm/nouveau: Fix drm-core using atomic code-paths on pre-nv50 hardware drm/nouveau: Move the declaration of struct nouveau_conn_atom up a bit drm/i915/gt: Detect if we miss WaIdleLiteRestore drm/i915/hdcp: Nuke intel_hdcp_transcoder_config() ... commit f1fcd7786ec8e316b69860ab856f29f346a9b301 Merge: 5bd831a469e0 5addeae1bedc Author: Linus Torvalds Date: Fri Dec 13 14:27:19 2019 -0800 Merge tag 'for-linus-20191212' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - stable fix for the bi_size overflow. Not a corruption issue, but a case wher we could merge but disallowed (Andreas) - NVMe pull request via Keith, with various fixes. - MD pull request from Song. - Merge window regression fix for the rq passthrough stats (Logan) - Remove unused blkcg_drain_queue() function (Guoqing) * tag 'for-linus-20191212' of git://git.kernel.dk/linux-block: blk-cgroup: remove blkcg_drain_queue block: fix NULL pointer dereference in account statistics with IDE md: make sure desc_nr less than MD_SB_DISKS md: raid1: check rdev before reference in raid1_sync_request func raid5: need to set STRIPE_HANDLE for batch head block: fix "check bi_size overflow before merge" nvme/pci: Fix read queue count nvme/pci Limit write queue sizes to possible cpus nvme/pci: Fix write and poll queue types nvme/pci: Remove last_cq_head nvme: Namepace identification descriptor list is optional nvme-fc: fix double-free scenarios on hw queues nvme: else following return is not needed nvme: add error message on mismatching controller ids nvme_fc: add module to ops template to allow module references nvmet-loop: Avoid preallocating big SGL for data nvme-fc: Avoid preallocating big SGL for data nvme-rdma: Avoid preallocating big SGL for data commit 5bd831a469e0c8368fe02b21157ea5c731f84967 Merge: 15da849c910d 9e3aa61ae3e0 Author: Linus Torvalds Date: Fri Dec 13 14:24:54 2019 -0800 Merge tag 'io_uring-5.5-20191212' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - A tweak to IOSQE_IO_LINK (also marked for stable) to allow links that don't sever if the result is < 0. This is mostly for linked timeouts, where if we ask for a pure timeout we always get -ETIME. This makes links useless for that case, hence allow a case where it works. - Five minor optimizations to fix and improve cases that regressed since v5.4. - An SQTHREAD locking fix. - A sendmsg/recvmsg iov assignment fix. - Net fix where read_iter/write_iter don't honor IOCB_NOWAIT, and subsequently ensuring that works for io_uring. - Fix a case where for an invalid opcode we might return -EBADF instead of -EINVAL, if the ->fd of that sqe was set to an invalid fd value. * tag 'io_uring-5.5-20191212' of git://git.kernel.dk/linux-block: io_uring: ensure we return -EINVAL on unknown opcode io_uring: add sockets to list of files that support non-blocking issue net: make socket read/write_iter() honor IOCB_NOWAIT io_uring: only hash regular files for async work execution io_uring: run next sqe inline if possible io_uring: don't dynamically allocate poll data io_uring: deferred send/recvmsg should assign iov io_uring: sqthread should grab ctx->uring_lock for submissions io-wq: briefly spin for new work after finishing work io-wq: remove worker->wait waitqueue io_uring: allow unbreakable links commit 15da849c910da05622c75c5741dd6e176a8b6fe2 Merge: 22ff311af9c7 7fc979f8204f Author: Linus Torvalds Date: Fri Dec 13 14:13:15 2019 -0800 Merge tag 'for-5.5/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 multipath by restoring full path selector functionality for bio-based configurations that don't haave a SCSI device handler. - Fix dm-btree removal to ensure non-root btree nodes have at least (max_entries / 3) entries. This resolves userspace thin_check utility's report of "too few entries in btree_node". - Fix both the DM thin-provisioning and dm-clone targets to properly flush the data device prior to metadata commit. This resolves the potential for inconsistency across a power loss event when the data device has a volatile writeback cache. - Small documentation fixes to dm-clone and dm-integrity. * tag 'for-5.5/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: docs: dm-integrity: remove reference to ARC4 dm thin: Flush data device before committing metadata dm thin metadata: Add support for a pre-commit callback dm clone: Flush destination device before committing metadata dm clone metadata: Use a two phase commit dm clone metadata: Track exact changes per transaction dm btree: increase rebalance threshold in __rebalance2() dm: add dm-clone to the documentation index dm mpath: remove harmful bio-based optimization commit 22ff311af9c7d0eca4e9d276e95c4793a6ecf84f Merge: 37d4e84f765b c593642c8be0 Author: Linus Torvalds Date: Fri Dec 13 14:02:12 2019 -0800 Merge tag 'sizeof_field-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull FIELD_SIZEOF conversion from Kees Cook: "A mostly mechanical treewide conversion from FIELD_SIZEOF() to sizeof_field(). This avoids the redundancy of having 2 macros (actually 3) doing the same thing, and consolidates on sizeof_field(). While "field" is not an accurate name, it is the common name used in the kernel, and doesn't result in any unintended innuendo. As there are still users of FIELD_SIZEOF() in -next, I will clean up those during this coming development cycle and send the final old macro removal patch at that time" * tag 'sizeof_field-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: treewide: Use sizeof_field() macro MIPS: OCTEON: Replace SIZEOF_FIELD() macro commit 913e73c77d48aeeb50c16450a653dca9c71ae2e2 Author: Frederic Barrat Date: Mon Dec 9 11:55:13 2019 +0100 ocxl: Fix potential memory leak on context creation If we couldn't fully init a context, we were leaking memory. Fixes: b9721d275cc2 ("ocxl: Allow external drivers to use OpenCAPI contexts") Signed-off-by: Frederic Barrat Acked-by: Andrew Donnellan Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191209105513.8566-1-fbarrat@linux.ibm.com commit 099bc4812f09155da77eeb960a983470249c9ce1 Author: Christophe Leroy Date: Mon Dec 9 06:19:08 2019 +0000 powerpc/irq: fix stack overflow verification Before commit 0366a1c70b89 ("powerpc/irq: Run softirqs off the top of the irq stack"), check_stack_overflow() was called by do_IRQ(), before switching to the irq stack. In that commit, do_IRQ() was renamed __do_irq(), and is now executing on the irq stack, so check_stack_overflow() has just become almost useless. Move check_stack_overflow() call in do_IRQ() to do the check while still on the current stack. Fixes: 0366a1c70b89 ("powerpc/irq: Run softirqs off the top of the irq stack") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e033aa8116ab12b7ca9a9c75189ad0741e3b9b5f.1575872340.git.christophe.leroy@c-s.fr commit 9a4b8148562d76d3c31a937f9b61d32308b5c974 Merge: 89f33b984a51 e709ed70d122 Author: Olof Johansson Date: Fri Dec 13 12:43:33 2019 -0800 Merge tag 'omap-for-v5.5/fixes-rc1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fixes for omap variants for v5.5-rc1 cycle This series of changes contains fixes for issues recently noticed: - The ti-sysc interconnect target module driver needs fixes for mstandby quirk handling and reset delay - We need to configure am335x-sancloud-bbe to use rgmii-id mode because of the phy changes done earlier - NET_SWITCHDEV is no longer selected in Kconfig but a dependency and we must enable CONFIG_NET_SWITCHDEV to have TI_CPSW_SWITCHDEV - We are still relying on DEBUG_FS at least for PM configuration, let's add it back - We need to update compatible for am437x-gp/epos-evm because of the recent changes to use generic panels * tag 'omap-for-v5.5/fixes-rc1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Fix missing reset delay handling ARM: dts: am437x-gp/epos-evm: fix panel compatible ARM: omap2plus_defconfig: Add back DEBUG_FS ARM: omap2plus_defconfig: enable NET_SWITCHDEV ARM: dts: am335x-sancloud-bbe: fix phy mode bus: ti-sysc: Fix missing force mstandby quirk handling Link: https://lore.kernel.org/r/pull-1576254925-709310@atomide.com Signed-off-by: Olof Johansson commit 279b1fed09eaa921379c6f1e3347e4161ef5f76a Merge: d935bd50dd14 2688302bf192 Author: Linus Walleij Date: Fri Dec 13 14:24:41 2019 +0100 Merge tag 'gpio-v5.5-rc2-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.5-rc2 - fix gpio-xtensa build failure - fix a regression in gpio-mockup - fix a gcc warning in gpio-aspeed - fix a section mismatch problem in xgs-iproc - fix a problem with emulated open-drain outputs in gpiolib core - switch to bitops in gpio-pca953x after converting the driver to using bitmap - add a missed file to MAINTAINERS entry commit fbd542971aa1e9ec33212afe1d9b4f1106cd85a1 Author: Anand Jain Date: Thu Dec 5 19:39:07 2019 +0800 btrfs: send: remove WARN_ON for readonly mount We log warning if root::orphan_cleanup_state is not set to ORPHAN_CLEANUP_DONE in btrfs_ioctl_send(). However if the filesystem is mounted as readonly we skip the orphan item cleanup during the lookup and root::orphan_cleanup_state remains at the init state 0 instead of ORPHAN_CLEANUP_DONE (2). So during send in btrfs_ioctl_send() we hit the warning as below. WARN_ON(send_root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE); WARNING: CPU: 0 PID: 2616 at /Volumes/ws/btrfs-devel/fs/btrfs/send.c:7090 btrfs_ioctl_send+0xb2f/0x18c0 [btrfs] :: RIP: 0010:btrfs_ioctl_send+0xb2f/0x18c0 [btrfs] :: Call Trace: :: _btrfs_ioctl_send+0x7b/0x110 [btrfs] btrfs_ioctl+0x150a/0x2b00 [btrfs] :: do_vfs_ioctl+0xa9/0x620 ? __fget+0xac/0xe0 ksys_ioctl+0x60/0x90 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x49/0x130 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reproducer: mkfs.btrfs -fq /dev/sdb mount /dev/sdb /btrfs btrfs subvolume create /btrfs/sv1 btrfs subvolume snapshot -r /btrfs/sv1 /btrfs/ss1 umount /btrfs mount -o ro /dev/sdb /btrfs btrfs send /btrfs/ss1 -f /tmp/f The warning exists because having orphan inodes could confuse send and cause it to fail or produce incorrect streams. The two cases that would cause such send failures, which are already fixed are: 1) Inodes that were unlinked - these are orphanized and remain with a link count of 0. These caused send operations to fail because it expected to always find at least one path for an inode. However this is no longer a problem since send is now able to deal with such inodes since commit 46b2f4590aab ("Btrfs: fix send failure when root has deleted files still open") and treats them as having been completely removed (the state after an orphan cleanup is performed). 2) Inodes that were in the process of being truncated. These resulted in send not knowing about the truncation and potentially issue write operations full of zeroes for the range from the new file size to the old file size. This is no longer a problem because we no longer create orphan items for truncation since commit f7e9e8fc792f ("Btrfs: stop creating orphan items for truncate"). As such before these commits, the WARN_ON here provided a clue in case something went wrong. Instead of being a warning against the root::orphan_cleanup_state value, it could have been more accurate by checking if there were actually any orphan items, and then issue a warning only if any exists, but that would be more expensive to check. Since orphanized inodes no longer cause problems for send, just remove the warning. Reported-by: Christoph Anton Mitterer Link: https://lore.kernel.org/linux-btrfs/21cb5e8d059f6e1496a903fa7bfc0a297e2f5370.camel@scientia.net/ CC: stable@vger.kernel.org # 4.19+ Suggested-by: Filipe Manana Reviewed-by: Filipe Manana Signed-off-by: Anand Jain Signed-off-by: David Sterba commit ca1aa2818a53875cfdd175fb5e9a2984e997cce9 Author: Josef Bacik Date: Fri Dec 6 09:37:18 2019 -0500 btrfs: do not leak reloc root if we fail to read the fs root If we fail to read the fs root corresponding with a reloc root we'll just break out and free the reloc roots. But we remove our current reloc_root from this list higher up, which means we'll leak this reloc_root. Fix this by adding ourselves back to the reloc_roots list so we are properly cleaned up. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9bc574de590510eff899c3ca8dbaf013566b5efe Author: Josef Bacik Date: Fri Dec 6 09:37:17 2019 -0500 btrfs: skip log replay on orphaned roots My fsstress modifications coupled with generic/475 uncovered a failure to mount and replay the log if we hit a orphaned root. We do not want to replay the log for an orphan root, but it's completely legitimate to have an orphaned root with a log attached. Fix this by simply skipping replaying the log. We still need to pin it's root node so that we do not overwrite it while replaying other logs, as we re-read the log root at every stage of the replay. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 714cd3e8cba6841220dce9063a7388a81de03825 Author: Josef Bacik Date: Fri Dec 6 11:39:00 2019 -0500 btrfs: handle ENOENT in btrfs_uuid_tree_iterate If we get an -ENOENT back from btrfs_uuid_iter_rem when iterating the uuid tree we'll just continue and do btrfs_next_item(). However we've done a btrfs_release_path() at this point and no longer have a valid path. So increment the key and go back and do a normal search. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit c7e54b5102bf3614cadb9ca32d7be73bad6cecf0 Author: Josef Bacik Date: Fri Dec 6 09:37:15 2019 -0500 btrfs: abort transaction after failed inode updates in create_subvol We can just abort the transaction here, and in fact do that for every other failure in this function except these two cases. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 147271e35ba267506dde6550f58ccf8d287db3ef Author: Filipe Manana Date: Thu Dec 5 16:58:41 2019 +0000 Btrfs: fix hole extent items with a zero size after range cloning Normally when cloning a file range if we find an implicit hole at the end of the range we assume it is because the NO_HOLES feature is enabled. However that is not always the case. One well known case [1] is when we have a power failure after mixing buffered and direct IO writes against the same file. In such cases we need to punch a hole in the destination file, and if the NO_HOLES feature is not enabled, we need to insert explicit file extent items to represent the hole. After commit 690a5dbfc51315 ("Btrfs: fix ENOSPC errors, leading to transaction aborts, when cloning extents"), we started to insert file extent items representing the hole with an item size of 0, which is invalid and should be 53 bytes (the size of a btrfs_file_extent_item structure), resulting in all sorts of corruptions and invalid memory accesses. This is detected by the tree checker when we attempt to write a leaf to disk. The problem can be sporadically triggered by test case generic/561 from fstests. That test case does not exercise power failure and creates a new filesystem when it starts, so it does not use a filesystem created by any previous test that tests power failure. However the test does both buffered and direct IO writes (through fsstress) and it's precisely that which is creating the implicit holes in files. That happens even before the commit mentioned earlier. I need to investigate why we get those implicit holes to check if there is a real problem or not. For now this change fixes the regression of introducing file extent items with an item size of 0 bytes. Fix the issue by calling btrfs_punch_hole_range() without passing a btrfs_clone_extent_info structure, which ensures file extent items are inserted to represent the hole with a correct item size. We were passing a btrfs_clone_extent_info with a value of 0 for its 'item_size' field, which was causing the insertion of file extent items with an item size of 0. [1] https://www.spinics.net/lists/linux-btrfs/msg75350.html Reported-by: David Sterba Fixes: 690a5dbfc51315 ("Btrfs: fix ENOSPC errors, leading to transaction aborts, when cloning extents") Signed-off-by: Filipe Manana Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 6609fee8897ac475378388238456c84298bff802 Author: Filipe Manana Date: Fri Dec 6 12:27:39 2019 +0000 Btrfs: fix removal logic of the tree mod log that leads to use-after-free issues When a tree mod log user no longer needs to use the tree it calls btrfs_put_tree_mod_seq() to remove itself from the list of users and delete all no longer used elements of the tree's red black tree, which should be all elements with a sequence number less then our equals to the caller's sequence number. However the logic is broken because it can delete and free elements from the red black tree that have a sequence number greater then the caller's sequence number: 1) At a point in time we have sequence numbers 1, 2, 3 and 4 in the tree mod log; 2) The task which got assigned the sequence number 1 calls btrfs_put_tree_mod_seq(); 3) Sequence number 1 is deleted from the list of sequence numbers; 4) The current minimum sequence number is computed to be the sequence number 2; 5) A task using sequence number 2 is at tree_mod_log_rewind() and gets a pointer to one of its elements from the red black tree through a call to tree_mod_log_search(); 6) The task with sequence number 1 iterates the red black tree of tree modification elements and deletes (and frees) all elements with a sequence number less then or equals to 2 (the computed minimum sequence number) - it ends up only leaving elements with sequence numbers of 3 and 4; 7) The task with sequence number 2 now uses the pointer to its element, already freed by the other task, at __tree_mod_log_rewind(), resulting in a use-after-free issue. When CONFIG_DEBUG_PAGEALLOC=y it produces a trace like the following: [16804.546854] general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI [16804.547451] CPU: 0 PID: 28257 Comm: pool Tainted: G W 5.4.0-rc8-btrfs-next-51 #1 [16804.548059] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014 [16804.548666] RIP: 0010:rb_next+0x16/0x50 (...) [16804.550581] RSP: 0018:ffffb948418ef9b0 EFLAGS: 00010202 [16804.551227] RAX: 6b6b6b6b6b6b6b6b RBX: ffff90e0247f6600 RCX: 6b6b6b6b6b6b6b6b [16804.551873] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff90e0247f6600 [16804.552504] RBP: ffff90dffe0d4688 R08: 0000000000000001 R09: 0000000000000000 [16804.553136] R10: ffff90dffa4a0040 R11: 0000000000000000 R12: 000000000000002e [16804.553768] R13: ffff90e0247f6600 R14: 0000000000001663 R15: ffff90dff77862b8 [16804.554399] FS: 00007f4b197ae700(0000) GS:ffff90e036a00000(0000) knlGS:0000000000000000 [16804.555039] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [16804.555683] CR2: 00007f4b10022000 CR3: 00000002060e2004 CR4: 00000000003606f0 [16804.556336] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [16804.556968] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [16804.557583] Call Trace: [16804.558207] __tree_mod_log_rewind+0xbf/0x280 [btrfs] [16804.558835] btrfs_search_old_slot+0x105/0xd00 [btrfs] [16804.559468] resolve_indirect_refs+0x1eb/0xc70 [btrfs] [16804.560087] ? free_extent_buffer.part.19+0x5a/0xc0 [btrfs] [16804.560700] find_parent_nodes+0x388/0x1120 [btrfs] [16804.561310] btrfs_check_shared+0x115/0x1c0 [btrfs] [16804.561916] ? extent_fiemap+0x59d/0x6d0 [btrfs] [16804.562518] extent_fiemap+0x59d/0x6d0 [btrfs] [16804.563112] ? __might_fault+0x11/0x90 [16804.563706] do_vfs_ioctl+0x45a/0x700 [16804.564299] ksys_ioctl+0x70/0x80 [16804.564885] ? trace_hardirqs_off_thunk+0x1a/0x20 [16804.565461] __x64_sys_ioctl+0x16/0x20 [16804.566020] do_syscall_64+0x5c/0x250 [16804.566580] entry_SYSCALL_64_after_hwframe+0x49/0xbe [16804.567153] RIP: 0033:0x7f4b1ba2add7 (...) [16804.568907] RSP: 002b:00007f4b197adc88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [16804.569513] RAX: ffffffffffffffda RBX: 00007f4b100210d8 RCX: 00007f4b1ba2add7 [16804.570133] RDX: 00007f4b100210d8 RSI: 00000000c020660b RDI: 0000000000000003 [16804.570726] RBP: 000055de05a6cfe0 R08: 0000000000000000 R09: 00007f4b197add44 [16804.571314] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4b197add48 [16804.571905] R13: 00007f4b197add40 R14: 00007f4b100210d0 R15: 00007f4b197add50 (...) [16804.575623] ---[ end trace 87317359aad4ba50 ]--- Fix this by making btrfs_put_tree_mod_seq() skip deletion of elements that have a sequence number equals to the computed minimum sequence number, and not just elements with a sequence number greater then that minimum. Fixes: bd989ba359f2ac ("Btrfs: add tree modification log functions") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ad1d8c439978ede77cbf73cbdd11bafe810421a5 Author: Filipe Manana Date: Mon Dec 2 11:01:03 2019 +0000 Btrfs: make tree checker detect checksum items with overlapping ranges Having checksum items, either on the checksums tree or in a log tree, that represent ranges that overlap each other is a sign of a corruption. Such case confuses the checksum lookup code and can result in not being able to find checksums or find stale checksums. So add a check for such case. This is motivated by a recent fix for a case where a log tree had checksum items covering ranges that overlap each other due to extent cloning, and resulted in missing checksums after replaying the log tree. It also helps detect past issues such as stale and outdated checksums due to overlapping, commit 27b9a8122ff71a ("Btrfs: fix csum tree corruption, duplicate and outdated checksums"). CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 40e046acbd2f369cfbf93c3413639c66514cec2d Author: Filipe Manana Date: Thu Dec 5 16:58:30 2019 +0000 Btrfs: fix missing data checksums after replaying a log tree When logging a file that has shared extents (reflinked with other files or with itself), we can end up logging multiple checksum items that cover overlapping ranges. This confuses the search for checksums at log replay time causing some checksums to never be added to the fs/subvolume tree. Consider the following example of a file that shares the same extent at offsets 0 and 256Kb: [ bytenr 13893632, offset 64Kb, len 64Kb ] 0 64Kb [ bytenr 13631488, offset 64Kb, len 192Kb ] 64Kb 256Kb [ bytenr 13893632, offset 0, len 256Kb ] 256Kb 512Kb When logging the inode, at tree-log.c:copy_items(), when processing the file extent item at offset 0, we log a checksum item covering the range 13959168 to 14024704, which corresponds to 13893632 + 64Kb and 13893632 + 64Kb + 64Kb, respectively. Later when processing the extent item at offset 256K, we log the checksums for the range from 13893632 to 14155776 (which corresponds to 13893632 + 256Kb). These checksums get merged with the checksum item for the range from 13631488 to 13893632 (13631488 + 256Kb), logged by a previous fsync. So after this we get the two following checksum items in the log tree: (...) item 6 key (EXTENT_CSUM EXTENT_CSUM 13631488) itemoff 3095 itemsize 512 range start 13631488 end 14155776 length 524288 item 7 key (EXTENT_CSUM EXTENT_CSUM 13959168) itemoff 3031 itemsize 64 range start 13959168 end 14024704 length 65536 The first one covers the range from the second one, they overlap. So far this does not cause a problem after replaying the log, because when replaying the file extent item for offset 256K, we copy all the checksums for the extent 13893632 from the log tree to the fs/subvolume tree, since searching for an checksum item for bytenr 13893632 leaves us at the first checksum item, which covers the whole range of the extent. However if we write 64Kb to file offset 256Kb for example, we will not be able to find and copy the checksums for the last 128Kb of the extent at bytenr 13893632, referenced by the file range 384Kb to 512Kb. After writing 64Kb into file offset 256Kb we get the following extent layout for our file: [ bytenr 13893632, offset 64K, len 64Kb ] 0 64Kb [ bytenr 13631488, offset 64Kb, len 192Kb ] 64Kb 256Kb [ bytenr 14155776, offset 0, len 64Kb ] 256Kb 320Kb [ bytenr 13893632, offset 64Kb, len 192Kb ] 320Kb 512Kb After fsync'ing the file, if we have a power failure and then mount the filesystem to replay the log, the following happens: 1) When replaying the file extent item for file offset 320Kb, we lookup for the checksums for the extent range from 13959168 (13893632 + 64Kb) to 14155776 (13893632 + 256Kb), through a call to btrfs_lookup_csums_range(); 2) btrfs_lookup_csums_range() finds the checksum item that starts precisely at offset 13959168 (item 7 in the log tree, shown before); 3) However that checksum item only covers 64Kb of data, and not 192Kb of data; 4) As a result only the checksums for the first 64Kb of data referenced by the file extent item are found and copied to the fs/subvolume tree. The remaining 128Kb of data, file range 384Kb to 512Kb, doesn't get the corresponding data checksums found and copied to the fs/subvolume tree. 5) After replaying the log userspace will not be able to read the file range from 384Kb to 512Kb, because the checksums are missing and resulting in an -EIO error. The following steps reproduce this scenario: $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt/sdc $ xfs_io -f -c "pwrite -S 0xa3 0 256K" /mnt/sdc/foobar $ xfs_io -c "fsync" /mnt/sdc/foobar $ xfs_io -c "pwrite -S 0xc7 256K 256K" /mnt/sdc/foobar $ xfs_io -c "reflink /mnt/sdc/foobar 320K 0 64K" /mnt/sdc/foobar $ xfs_io -c "fsync" /mnt/sdc/foobar $ xfs_io -c "pwrite -S 0xe5 256K 64K" /mnt/sdc/foobar $ xfs_io -c "fsync" /mnt/sdc/foobar $ mount /dev/sdc /mnt/sdc $ md5sum /mnt/sdc/foobar md5sum: /mnt/sdc/foobar: Input/output error $ dmesg | tail [165305.003464] BTRFS info (device sdc): no csum found for inode 257 start 401408 [165305.004014] BTRFS info (device sdc): no csum found for inode 257 start 405504 [165305.004559] BTRFS info (device sdc): no csum found for inode 257 start 409600 [165305.005101] BTRFS info (device sdc): no csum found for inode 257 start 413696 [165305.005627] BTRFS info (device sdc): no csum found for inode 257 start 417792 [165305.006134] BTRFS info (device sdc): no csum found for inode 257 start 421888 [165305.006625] BTRFS info (device sdc): no csum found for inode 257 start 425984 [165305.007278] BTRFS info (device sdc): no csum found for inode 257 start 430080 [165305.008248] BTRFS warning (device sdc): csum failed root 5 ino 257 off 393216 csum 0x1337385e expected csum 0x00000000 mirror 1 [165305.009550] BTRFS warning (device sdc): csum failed root 5 ino 257 off 393216 csum 0x1337385e expected csum 0x00000000 mirror 1 Fix this simply by deleting first any checksums, from the log tree, for the range of the extent we are logging at copy_items(). This ensures we do not get checksum items in the log tree that have overlapping ranges. This is a long time issue that has been present since we have the clone (and deduplication) ioctl, and can happen both when an extent is shared between different files and within the same file. A test case for fstests follows soon. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit b6293c821ea8fa2a631a2112cd86cd435effeb8b Author: Dan Carpenter Date: Tue Dec 3 14:24:58 2019 +0300 btrfs: return error pointer from alloc_test_extent_buffer Callers of alloc_test_extent_buffer have not correctly interpreted the return value as error pointer, as alloc_test_extent_buffer should behave as alloc_extent_buffer. The self-tests were unaffected but btrfs_find_create_tree_block could call both functions and that would cause problems up in the call chain. Fixes: faa2dbf004e8 ("Btrfs: add sanity tests for new qgroup accounting code") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Dan Carpenter Reviewed-by: David Sterba Signed-off-by: David Sterba commit cf93e15eca0bcb457b6a85b3480c1e379407dd26 Author: David Sterba Date: Wed Nov 27 16:10:54 2019 +0100 btrfs: fix devs_max constraints for raid1c3 and raid1c4 The value 0 for devs_max means to spread the allocated chunks over all available devices, eg. stripe for RAID0 or RAID5. This got mistakenly copied to the RAID1C3/4 profiles. The intention is to have exactly 3 and 4 copies respectively. Fixes: 47e6f7423b91 ("btrfs: add support for 3-copy replication (raid1c3)") Fixes: 8d6fac0087e5 ("btrfs: add support for 4-copy replication (raid1c4)") Signed-off-by: David Sterba commit 994bf9cd78aa382c0c3c70b7cf9c00f7529176c2 Author: Andreas Färber Date: Fri Nov 8 22:38:52 2019 +0100 btrfs: tree-checker: Fix error format string for size_t Argument BTRFS_FILE_EXTENT_INLINE_DATA_START is defined as offsetof(), which returns type size_t, so we need %zu instead of %lu. This fixes a build warning on 32-bit ARM: ../fs/btrfs/tree-checker.c: In function 'check_extent_data_item': ../fs/btrfs/tree-checker.c:230:43: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=] 230 | "invalid item size, have %u expect [%lu, %u)", | ~~^ | long unsigned int | %u Fixes: 153a6d299956 ("btrfs: tree-checker: Check item size before reading file extent type") Acked-by: Geert Uytterhoeven Signed-off-by: Andreas Färber Reviewed-by: David Sterba Signed-off-by: David Sterba commit 943eb3bf25f4a7b745dd799e031be276aa104d82 Author: Josef Bacik Date: Tue Nov 19 13:59:20 2019 -0500 btrfs: don't double lock the subvol_sem for rename exchange If we're rename exchanging two subvols we'll try to lock this lock twice, which is bad. Just lock once if either of the ino's are subvols. Fixes: cdd1fedf8261 ("btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit db8fe64f9ce61d1d89d3c3c34d111a43afb9f053 Author: Josef Bacik Date: Tue Nov 19 13:59:00 2019 -0500 btrfs: handle error in btrfs_cache_block_group We have a BUG_ON(ret < 0) in find_free_extent from btrfs_cache_block_group. If we fail to allocate our ctl we'll just panic, which is not good. Instead just go on to another block group. If we fail to find a block group we don't want to return ENOSPC, because really we got a ENOMEM and that's the root of the problem. Save our return from btrfs_cache_block_group(), and then if we still fail to make our allocation return that ret so we get the right error back. Tested with inject-error.py from bcc. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit f72ff01df9cf5db25c76674cac16605992d15467 Author: Josef Bacik Date: Tue Nov 19 13:59:35 2019 -0500 btrfs: do not call synchronize_srcu() in inode_tree_del Testing with the new fsstress uncovered a pretty nasty deadlock with lookup and snapshot deletion. Process A unlink -> final iput -> inode_tree_del -> synchronize_srcu(subvol_srcu) Process B btrfs_lookup <- srcu_read_lock() acquired here -> btrfs_iget -> find inode that has I_FREEING set -> __wait_on_freeing_inode() We're holding the srcu_read_lock() while doing the iget in order to make sure our fs root doesn't go away, and then we are waiting for the inode to finish freeing. However because the free'ing process is doing a synchronize_srcu() we deadlock. Fix this by dropping the synchronize_srcu() in inode_tree_del(). We don't need people to stop accessing the fs root at this point, we're only adding our empty root to the dead roots list. A larger much more invasive fix is forthcoming to address how we deal with fs roots, but this fixes the immediate problem. Fixes: 76dda93c6ae2 ("Btrfs: add snapshot/subvolume destroy ioctl") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit fa2cdb1762d15f701b83efa60b04f0d04e71bf89 Author: Geert Uytterhoeven Date: Mon Dec 9 11:13:27 2019 +0100 ARM: shmobile: defconfig: Restore debugfs support Since commit 0e4a459f56c32d3e ("tracing: Remove unnecessary DEBUG_FS dependency"), CONFIG_DEBUG_FS is no longer auto-enabled. This breaks booting Debian 9, as systemd needs debugfs: [FAILED] Failed to mount /sys/kernel/debug. See 'systemctl status sys-kernel-debug.mount' for details. [DEPEND] Dependency failed for Local File Systems. ... You are in emergGive root password for maintenance (or press Control-D to continue): Fix this by enabling CONFIG_DEBUG_FS explicitly. See also commit 18977008f44c66bd ("ARM: multi_v7_defconfig: Restore debugfs support"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20191209101327.26571-1-geert+renesas@glider.be commit 4f3882177240a1f55e45a3d241d3121341bead78 Author: Dmitry Torokhov Date: Sat Dec 7 13:05:18 2019 -0800 HID: hid-input: clear unmapped usages We should not be leaving half-mapped usages with potentially invalid keycodes, as that may confuse hidinput_find_key() when the key is located by index, which may end up feeding way too large keycode into the VT keyboard handler and cause OOB write there: BUG: KASAN: global-out-of-bounds in clear_bit include/asm-generic/bitops-instrumented.h:56 [inline] BUG: KASAN: global-out-of-bounds in kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline] BUG: KASAN: global-out-of-bounds in kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495 Write of size 8 at addr ffffffff89a1b2d8 by task syz-executor108/1722 ... kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline] kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495 input_to_handler+0x3b6/0x4c0 drivers/input/input.c:118 input_pass_values.part.0+0x2e3/0x720 drivers/input/input.c:145 input_pass_values drivers/input/input.c:949 [inline] input_set_keycode+0x290/0x320 drivers/input/input.c:954 evdev_handle_set_keycode_v2+0xc4/0x120 drivers/input/evdev.c:882 evdev_do_ioctl drivers/input/evdev.c:1150 [inline] Cc: stable@vger.kernel.org Reported-by: syzbot+19340dff067c2d3835c0@syzkaller.appspotmail.com Signed-off-by: Dmitry Torokhov Tested-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit fcb970581dd900675c4371c2b688a57924a8368c Author: Filipe Manana Date: Thu Dec 5 16:57:39 2019 +0000 Btrfs: fix cloning range with a hole when using the NO_HOLES feature When using the NO_HOLES feature if we clone a range that contains a hole and a temporary ENOSPC happens while dropping extents from the target inode's range, we can end up failing and aborting the transaction with -EEXIST or with a corrupt file extent item, that has a length greater than it should and overlaps with other extents. For example when cloning the following range from inode A to inode B: Inode A: extent A1 extent A2 [ ----------- ] [ hole, implicit, 4MB length ] [ ------------- ] 0 1MB 5MB 6MB Range to clone: [1MB, 6MB) Inode B: extent B1 extent B2 extent B3 extent B4 [ ---------- ] [ --------- ] [ ---------- ] [ ---------- ] 0 1MB 1MB 2MB 2MB 5MB 5MB 6MB Target range: [1MB, 6MB) (same as source, to make it easier to explain) The following can happen: 1) btrfs_punch_hole_range() gets -ENOSPC from __btrfs_drop_extents(); 2) At that point, 'cur_offset' is set to 1MB and __btrfs_drop_extents() set 'drop_end' to 2MB, meaning it was able to drop only extent B2; 3) We then compute 'clone_len' as 'drop_end' - 'cur_offset' = 2MB - 1MB = 1MB; 4) We then attempt to insert a file extent item at inode B with a file offset of 5MB, which is the value of clone_info->file_offset. This fails with error -EEXIST because there's already an extent at that offset (extent B4); 5) We abort the current transaction with -EEXIST and return that error to user space as well. Another example, for extent corruption: Inode A: extent A1 extent A2 [ ----------- ] [ hole, implicit, 10MB length ] [ ------------- ] 0 1MB 11MB 12MB Inode B: extent B1 extent B2 [ ----------- ] [ --------- ] [ ----------------------------- ] 0 1MB 1MB 5MB 5MB 12MB Target range: [1MB, 12MB) (same as source, to make it easier to explain) 1) btrfs_punch_hole_range() gets -ENOSPC from __btrfs_drop_extents(); 2) At that point, 'cur_offset' is set to 1MB and __btrfs_drop_extents() set 'drop_end' to 5MB, meaning it was able to drop only extent B2; 3) We then compute 'clone_len' as 'drop_end' - 'cur_offset' = 5MB - 1MB = 4MB; 4) We then insert a file extent item at inode B with a file offset of 11MB which is the value of clone_info->file_offset, and a length of 4MB (the value of 'clone_len'). So we get 2 extents items with ranges that overlap and an extent length of 4MB, larger then the extent A2 from inode A (1MB length); 5) After that we end the transaction, balance the btree dirty pages and then start another or join the previous transaction. It might happen that the transaction which inserted the incorrect extent was committed by another task so we end up with extent corruption if a power failure happens. So fix this by making sure we attempt to insert the extent to clone at the destination inode only if we are past dropping the sub-range that corresponds to a hole. Fixes: 690a5dbfc51315 ("Btrfs: fix ENOSPC errors, leading to transaction aborts, when cloning extents") Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 37d02592f11bb76e4ab1dcaa5b8a2a0715403207 Author: Nikolay Borisov Date: Mon Nov 18 14:16:44 2019 +0200 btrfs: Fix error messages in qgroup_rescan_init The branch of qgroup_rescan_init which is executed from the mount path prints wrong errors messages. The textual print out in case BTRFS_QGROUP_STATUS_FLAG_RESCAN/BTRFS_QGROUP_STATUS_FLAG_ON are not set are transposed. Fix it by exchanging their place. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit fd0913768701612fc2b8ab9c8a5c019133e8d978 Author: Pavel Balan Date: Wed Nov 27 03:23:29 2019 +0000 HID: Add quirk for incorrect input length on Lenovo Y720 Apply it to the Lenovo Y720 gaming laptop I2C peripheral then. This fixes dmesg being flooded with errors visible on un-suspend in Linux Mint 19 Cinnamon. Example of error log: <...> [ 4.326588] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4) [ 4.326845] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4) [ 4.327095] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4) [ 4.327341] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4) [ 4.327609] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4) <...> Example of fixed log (debug on) <...> [ 3731.333183] i2c_hid i2c-ITE33D1:00: input: 02 00 [ 3731.333581] i2c_hid i2c-ITE33D1:00: input: 02 00 [ 3731.333842] i2c_hid i2c-ITE33D1:00: input: 02 00 [ 3731.334107] i2c_hid i2c-ITE33D1:00: input: 02 00 [ 3731.334367] i2c_hid i2c-ITE33D1:00: input: 02 00 <...> [jkosina@suse.cz: rebase onto more recent codebase] Signed-off-by: Pavel Balan Signed-off-by: Jiri Kosina commit 8fabc623238e68b3ac63c0dd1657bf86c1fa33af Author: Mike Rapoport Date: Wed Dec 4 14:35:24 2019 +0200 powerpc: Ensure that swiotlb buffer is allocated from low memory Some powerpc platforms (e.g. 85xx) limit DMA-able memory way below 4G. If a system has more physical memory than this limit, the swiotlb buffer is not addressable because it is allocated from memblock using top-down mode. Force memblock to bottom-up mode before calling swiotlb_init() to ensure that the swiotlb buffer is DMA-able. Reported-by: Christian Zigotzky Signed-off-by: Mike Rapoport Reviewed-by: Christoph Hellwig Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191204123524.22919-1-rppt@kernel.org commit e5a52a1d15c79bb48a430fb263852263ec1d3f11 Author: Hans Verkuil Date: Sat Dec 7 23:43:23 2019 +0100 media: pulse8-cec: fix lost cec_transmit_attempt_done() call The periodic PING command could interfere with the result of a CEC transmit, causing a lost cec_transmit_attempt_done() call. Signed-off-by: Hans Verkuil Cc: # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab commit ac479b51f3f4aaa852b5d3f00ecfb9290230cf64 Author: Hans Verkuil Date: Wed Dec 11 12:47:57 2019 +0100 media: cec: check 'transmit_in_progress', not 'transmitting' Currently wait_event_interruptible_timeout is called in cec_thread_func() when adap->transmitting is set. But if the adapter is unconfigured while transmitting, then adap->transmitting is set to NULL. But the hardware is still actually transmitting the message, and that's indicated by adap->transmit_in_progress and we should wait until that is finished or times out before transmitting new messages. As the original commit says: adap->transmitting is the userspace view, adap->transmit_in_progress reflects the hardware state. However, if adap->transmitting is NULL and adap->transmit_in_progress is true, then wait_event_interruptible is called (no timeout), which can get stuck indefinitely if the CEC driver is flaky and never marks the transmit-in-progress as 'done'. So test against transmit_in_progress when deciding whether to use the timeout variant or not, instead of testing against adap->transmitting. Signed-off-by: Hans Verkuil Fixes: 32804fcb612b ("media: cec: keep track of outstanding transmits") Cc: # for v4.19 and up Signed-off-by: Mauro Carvalho Chehab commit 95c29d46ab2a517e4c26d0a07300edca6768db17 Author: Hans Verkuil Date: Sat Dec 7 23:48:09 2019 +0100 media: cec: avoid decrementing transmit_queue_sz if it is 0 WARN if transmit_queue_sz is 0 but do not decrement it. The CEC adapter will become unresponsive if it goes below 0 since then it thinks there are 4 billion messages in the queue. Obviously this should not happen, but a driver bug could cause this. Signed-off-by: Hans Verkuil Cc: # for v4.12 and up Signed-off-by: Mauro Carvalho Chehab commit cec935ce69fc386f13959578deb40963ebbb85c3 Author: Hans Verkuil Date: Wed Dec 4 08:52:08 2019 +0100 media: cec: CEC 2.0-only bcast messages were ignored Some messages are allowed to be a broadcast message in CEC 2.0 only, and should be ignored by CEC 1.4 devices. Unfortunately, the check was wrong, causing such messages to be marked as invalid under CEC 2.0. Signed-off-by: Hans Verkuil Cc: # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab commit 656c21d6af5d9279dd7b51ca7a4a71008127044b Author: Srikar Dronamraju Date: Thu Dec 5 14:02:18 2019 +0530 powerpc/shared: Use static key to detect shared processor With the static key shared processor available, is_shared_processor() can return without having to query the lppaca structure. Signed-off-by: Srikar Dronamraju Acked-by: Phil Auld Acked-by: Waiman Long Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191213035036.6913-2-mpe@ellerman.id.au commit 14c73bd344da60abaf7da3ea2e7733ddda35bbac Author: Srikar Dronamraju Date: Thu Dec 5 14:02:17 2019 +0530 powerpc/vcpu: Assume dedicated processors as non-preempt With commit 247f2f6f3c70 ("sched/core: Don't schedule threads on pre-empted vCPUs"), the scheduler avoids preempted vCPUs to schedule tasks on wakeup. This leads to wrong choice of CPU, which in-turn leads to larger wakeup latencies. Eventually, it leads to performance regression in latency sensitive benchmarks like soltp, schbench etc. On Powerpc, vcpu_is_preempted() only looks at yield_count. If the yield_count is odd, the vCPU is assumed to be preempted. However yield_count is increased whenever the LPAR enters CEDE state (idle). So any CPU that has entered CEDE state is assumed to be preempted. Even if vCPU of dedicated LPAR is preempted/donated, it should have right of first-use since they are supposed to own the vCPU. On a Power9 System with 32 cores: # lscpu Architecture: ppc64le Byte Order: Little Endian CPU(s): 128 On-line CPU(s) list: 0-127 Thread(s) per core: 8 Core(s) per socket: 1 Socket(s): 16 NUMA node(s): 2 Model: 2.2 (pvr 004e 0202) Model name: POWER9 (architected), altivec supported Hypervisor vendor: pHyp Virtualization type: para L1d cache: 32K L1i cache: 32K L2 cache: 512K L3 cache: 10240K NUMA node0 CPU(s): 0-63 NUMA node1 CPU(s): 64-127 # perf stat -a -r 5 ./schbench v5.4 v5.4 + patch Latency percentiles (usec) Latency percentiles (usec) 50.0000th: 45 50.0th: 45 75.0000th: 62 75.0th: 63 90.0000th: 71 90.0th: 74 95.0000th: 77 95.0th: 78 *99.0000th: 91 *99.0th: 82 99.5000th: 707 99.5th: 83 99.9000th: 6920 99.9th: 86 min=0, max=10048 min=0, max=96 Latency percentiles (usec) Latency percentiles (usec) 50.0000th: 45 50.0th: 46 75.0000th: 61 75.0th: 64 90.0000th: 72 90.0th: 75 95.0000th: 79 95.0th: 79 *99.0000th: 691 *99.0th: 83 99.5000th: 3972 99.5th: 85 99.9000th: 8368 99.9th: 91 min=0, max=16606 min=0, max=117 Latency percentiles (usec) Latency percentiles (usec) 50.0000th: 45 50.0th: 46 75.0000th: 61 75.0th: 64 90.0000th: 71 90.0th: 75 95.0000th: 77 95.0th: 79 *99.0000th: 106 *99.0th: 83 99.5000th: 2364 99.5th: 84 99.9000th: 7480 99.9th: 90 min=0, max=10001 min=0, max=95 Latency percentiles (usec) Latency percentiles (usec) 50.0000th: 45 50.0th: 47 75.0000th: 62 75.0th: 65 90.0000th: 72 90.0th: 75 95.0000th: 78 95.0th: 79 *99.0000th: 93 *99.0th: 84 99.5000th: 108 99.5th: 85 99.9000th: 6792 99.9th: 90 min=0, max=17681 min=0, max=117 Latency percentiles (usec) Latency percentiles (usec) 50.0000th: 46 50.0th: 45 75.0000th: 62 75.0th: 64 90.0000th: 73 90.0th: 75 95.0000th: 79 95.0th: 79 *99.0000th: 113 *99.0th: 82 99.5000th: 2724 99.5th: 83 99.9000th: 6184 99.9th: 93 min=0, max=9887 min=0, max=111 Performance counter stats for 'system wide' (5 runs): context-switches 43,373 ( +- 0.40% ) 44,597 ( +- 0.55% ) cpu-migrations 1,211 ( +- 5.04% ) 220 ( +- 6.23% ) page-faults 15,983 ( +- 5.21% ) 15,360 ( +- 3.38% ) Waiman Long suggested using static_keys. Fixes: 247f2f6f3c70 ("sched/core: Don't schedule threads on pre-empted vCPUs") Cc: stable@vger.kernel.org # v4.18+ Reported-by: Parth Shah Reported-by: Ihor Pasichnyk Tested-by: Juri Lelli Acked-by: Waiman Long Reviewed-by: Gautham R. Shenoy Signed-off-by: Srikar Dronamraju Acked-by: Phil Auld Reviewed-by: Vaidyanathan Srinivasan Tested-by: Parth Shah [mpe: Move the key and setting of the key to pseries/setup.c] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191213035036.6913-1-mpe@ellerman.id.au commit d5a362149c4db2939a3d97e63fd2108489c60b41 Author: Rahul Tanwar Date: Thu Dec 5 11:01:31 2019 +0800 pinctrl: Modify Kconfig to fix linker error Fix below linker error ld: drivers/pinctrl/pinctrl-equilibrium.o: in function `pinconf_generic_dt_node_to_map_all': pinctrl-equilibrium.c:(.text+0xb): undefined reference to `pinconf_generic_dt_node_to_map' Caused by below commit 1948d5c51dba ("pinctrl: Add pinmux & GPIO controller driver for a new SoC") by adding 'depends on OF' in Kconfig driver entry. Reported-by: Randy Dunlap > Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/ba937f271d1a2173828a2325990d62cb36d61595.1575514110.git.rahul.tanwar@linux.intel.com Acked-by: Randy Dunlap # build-tested Signed-off-by: Linus Walleij commit a64556654b77e109152f97d7965ef1a5b7383035 Merge: 6ba2fd391ac5 b9a19bdbc843 Author: Linus Walleij Date: Fri Dec 13 11:01:10 2019 +0100 Merge tag 'intel-pinctrl-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into fixes intel-pinctrl for v5.5-2 * Fix Baytrail silicon issue by using a global lock * Fix North community pin names that user will assume their functions * Convert Cherryview and Baytrail to pass IRQ chip along with GPIO one The following is an automated git shortlog grouped by driver: baytrail: - Pass irqchip when adding gpiochip - Add GPIO <-> pin mapping ranges via callback - Update North Community pin list - Really serialize all register accesses cherryview: - Pass irqchip when adding gpiochip - Add GPIO <-> pin mapping ranges via callback - Split out irq hw-init into a separate helper function commit 6ba2fd391ac58c1a26874f10c3054a1ea4aca2d0 Author: Alexandre Torgue Date: Wed Dec 4 15:41:06 2019 +0100 pinctrl: pinmux: fix a possible null pointer in pinmux_can_be_used_for_gpio This commit adds a check on ops pointer to avoid a kernel panic when ops->strict is used. Indeed, on some pinctrl driver (at least for pinctrl-stmfx) the pinmux ops is not implemented. Let's assume than gpio can be used in this case. Fixes: 472a61e777fe ("pinctrl/gpio: Take MUX usage into account") Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20191204144106.10876-1-alexandre.torgue@st.com Signed-off-by: Linus Walleij commit 911bde0fe5ccd7e55760be9d6dcc67a8850fcc12 Author: Toke Høiland-Jørgensen Date: Thu Dec 12 12:14:37 2019 +0100 mac80211: Turn AQL into an NL80211_EXT_FEATURE Instead of just having an airtime flag in debugfs, turn AQL into a proper NL80211_EXT_FEATURE, so drivers can turn it on when they are ready, and so we also expose the presence of the feature to userspace. This also has the effect of flipping the default, so drivers have to opt in to using AQL instead of getting it by default with TXQs. To keep functionality the same as pre-patch, we set this feature for ath10k (which is where it is needed the most). While we're at it, split out the debugfs interface so AQL gets its own per-station debugfs file instead of using the 'airtime' file. [Johannes:] This effectively disables AQL for iwlwifi, where it fixes a number of issues: * TSO in iwlwifi is causing underflows and associated warnings in AQL * HE (802.11ax) rates aren't reported properly so at HE rates, AQL could never have a valid estimate (it'd use 6 Mbps instead of up to 2400!) Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20191212111437.224294-1-toke@redhat.com Fixes: 3ace10f5b5ad ("mac80211: Implement Airtime-based Queue Limit (AQL)") Signed-off-by: Johannes Berg commit 4c84515da8099f4bab5d9312a0ffaf40f14aa87b Merge: e8ad8d5108e0 d4d814017697 b9ea0bae260f Author: Rafael J. Wysocki Date: Fri Dec 13 10:29:45 2019 +0100 Merge branches 'pm-cpuidle' and 'acpi-pm' * pm-cpuidle: cpuidle: Drop unnecessary type cast in cpuidle_poll_time() cpuidle: Fix cpuidle_driver_state_disabled() cpuidle: use first valid target residency as poll time * acpi-pm: ACPI: PM: Avoid attaching ACPI PM domain to certain devices commit c07a0254c89e4bb69ca781cd488baa5b628e2754 Author: Hans de Goede Date: Thu Oct 24 13:59:09 2019 +0200 HID: asus: Ignore Asus vendor-page usage-code 0xff events At least on a T100HA an Asus vendor-page usage-code 0xff event is send on every suspend and again on resume, resulting in the following warning: asus 0003:0B05:1807.0002: Unmapped Asus vendor usagepage code 0xff being logged twice on every suspend/resume. This commit silences the "Unmapped Asus vendor usagepage code ..." warning for usage-code 0xff to avoid these warnings being logged. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 8f18eca9ebc57d6b150237033f6439242907e0ba Author: Hans de Goede Date: Tue Nov 19 15:57:11 2019 +0100 HID: ite: Add USB id match for Acer SW5-012 keyboard dock The Acer SW5-012 2-in-1 keyboard dock uses a Synaptics S91028 touchpad which is connected to an ITE 8595 USB keyboard controller chip. This keyboard has the same quirk for its rfkill / airplane mode hotkey as other keyboards with the ITE 8595 chip, 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. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit c62f7cd8ed066a93a243643ebf57ca99f754388e Author: Priit Laes Date: Sun Dec 1 00:22:09 2019 +0200 HID: Add quirk for Xin-Mo Dual Controller Without the quirk, joystick shows up as single controller for both first and second player pads/pins. Signed-off-by: Priit Laes Signed-off-by: Jiri Kosina commit e548f749b096133d6da3dd7235ecfc6bd67be306 Author: Dan Carpenter Date: Tue Nov 26 15:09:39 2019 +0300 mac80211: airtime: Fix an off by one in ieee80211_calc_rx_airtime() This code was copied from mt76 and inherited an off by one bug from there. The > should be >= so that we don't read one element beyond the end of the array. Fixes: db3e1c40cf2f ("mac80211: Import airtime calculation code from mt76") Reported-by: Toke Høiland-Jørgensen Signed-off-by: Dan Carpenter Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20191126120910.ftr4t7me3by32aiz@kili.mountain Signed-off-by: Johannes Berg commit 56cb31e185adb61f930743a9b70e700a43625386 Author: Stefan Bühler Date: Tue Nov 26 11:05:44 2019 +0100 cfg80211: fix double-free after changing network namespace If wdev->wext.keys was initialized it didn't get reset to NULL on unregister (and it doesn't get set in cfg80211_init_wdev either), but wdev is reused if unregister was triggered through cfg80211_switch_netns. The next unregister (for whatever reason) will try to free wdev->wext.keys again. Signed-off-by: Stefan Bühler Link: https://lore.kernel.org/r/20191126100543.782023-1-stefan.buehler@tik.uni-stuttgart.de Signed-off-by: Johannes Berg commit 753ffad3d6243303994227854d951ff5c70fa9e0 Author: Fredrik Olofsson Date: Tue Nov 19 14:34:51 2019 +0100 mac80211: fix TID field in monitor mode transmit Fix overwriting of the qos_ctrl.tid field for encrypted frames injected on a monitor interface. While qos_ctrl.tid is not encrypted, it's used as an input into the encryption algorithm so it's protected, and thus cannot be modified after encryption. For injected frames, the encryption may already have been done in userspace, so we cannot change any fields. Before passing the frame to the driver, the qos_ctrl.tid field is updated from skb->priority. Prior to dbd50a851c50 skb->priority was updated in ieee80211_select_queue_80211(), but this function is no longer always called. Update skb->priority in ieee80211_monitor_start_xmit() so that the value is stored, and when later code 'modifies' the TID it really sets it to the same value as before, preserving the encryption. Fixes: dbd50a851c50 ("mac80211: only allocate one queue when using iTXQs") Signed-off-by: Fredrik Olofsson Link: https://lore.kernel.org/r/20191119133451.14711-1-fredrik.olofsson@anyfinetworks.com [rewrite commit message based on our discussion] Signed-off-by: Johannes Berg commit c673ec61ade89bf2f417960f986bc25671762efb Author: Juergen Gross Date: Thu Dec 12 15:17:50 2019 +0100 xen/balloon: fix ballooned page accounting without hotplug enabled When CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not defined reserve_additional_memory() will set balloon_stats.target_pages to a wrong value in case there are still some ballooned pages allocated via alloc_xenballooned_pages(). This will result in balloon_process() no longer be triggered when ballooned pages are freed in batches. Reported-by: Nicholas Tsirakis Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit fa2ac657f9783f0891b2935490afe9a7fd29d3fa Author: Paul Durrant Date: Tue Dec 10 14:53:05 2019 +0000 xen-blkback: prevent premature module unload Objects allocated by xen_blkif_alloc come from the 'blkif_cache' kmem cache. This cache is destoyed when xen-blkif is unloaded so it is necessary to wait for the deferred free routine used for such objects to complete. This necessity was missed in commit 14855954f636 "xen-blkback: allow module to be cleanly unloaded". This patch fixes the problem by taking/releasing extra module references in xen_blkif_alloc/free() respectively. Signed-off-by: Paul Durrant Reviewed-by: Roger Pau Monné Signed-off-by: Juergen Gross commit d9191319358da13ee6a332fb9bf745f2181a612a Author: Pavel Shilovsky Date: Tue Dec 10 11:44:52 2019 -0800 CIFS: Close cached root handle only if it has a lease SMB2_tdis() checks if a root handle is valid in order to decide whether it needs to close the handle or not. However if another thread has reference for the handle, it may end up with putting the reference twice. The extra reference that we want to put during the tree disconnect is the reference that has a directory lease. So, track the fact that we have a directory lease and close the handle only in that case. Signed-off-by: Pavel Shilovsky Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit e0fc5b1153b81571d6ff80902a54c3eb13319b33 Author: Steve French Date: Mon Dec 9 22:34:10 2019 -0600 SMB3: Fix crash in SMB2_open_init due to uninitialized field in compounding path Ran into an intermittent crash in SMB2_open_init+0x2f6/0x970 due to oparms.cifs_sb not being initialized when called from: smb2_compound_op+0x45d/0x1690 Zero the whole oparms struct in the compounding path before setting up the oparms so we don't risk any uninitialized fields. Fixes: fdef665ba44a ("smb3: fix mode passed in on create for modetosid mount option") Signed-off-by: Steve French Acked-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky commit d16f0f61400074dbc75797ca5ef5c3d50f6c0ddf Merge: 82e50ec8868d f271fe185613 Author: Dave Airlie Date: Fri Dec 13 14:50:01 2019 +1000 Merge tag 'drm-fixes-5.5-2019-12-12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes drm-fixes-5.5-2019-12-12: amdgpu: - DC fixes for renoir - Gfx8 fence flush align with mesa - Power profile fix for arcturus - Freesync fix - DC I2c over aux fix - DC aux defer fix - GPU reset fix - GPUVM invalidation semaphore fixes for PCO and SR-IOV - Golden settings updates for gfx10 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191212223211.8034-1-alexander.deucher@amd.com commit 82e50ec8868db4afe2243f4391c3eca6e8593e2e Merge: 7315c0edb416 750bde2fd4ff Author: Dave Airlie Date: Fri Dec 13 14:44:08 2019 +1000 Merge tag 'drm-intel-fixes-2019-12-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix user reported issue #673: GPU hang on transition to idle - Avoid corruption on the top of the screen on GLK+ by disabling FBC - Fix non-privileged access to OA on Tigerlake - Fix HDCP code not to touch global state when just computing commit - Fix CI splat by saving irqstate around virtual_context_destroy - Serialise context retirement possibly on another CPU Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191212100759.GA22260@jlahtine-desk.ger.corp.intel.com commit 7315c0edb416b9bbfaa51277bd1b3ad35661222a Merge: cdf1d28ced9d 0a5239985a3b Author: Dave Airlie Date: Fri Dec 13 14:32:30 2019 +1000 Merge tag 'drm-misc-next-fixes-2019-12-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes -mgag200: more startadd mitigation (Thomas) -panfrost: devfreq fix + several memory fixes (Steven, Boris) Cc: Boris Brezillon Cc: Steven Price Cc: Thomas Zimmermann Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191212140145.GA145200@art_vandelay commit 9f674c811740b5db4b34668b72d47f6e7b879b0a Author: Tina Zhang Date: Fri Dec 13 11:23:14 2019 +0800 drm/i915/gvt: Pin vgpu dma address before using Dma-buf display uses the vgpu dma address saved in the guest part GGTT table which is updated by vCPU thread. In host side, when the dma address is used by qemu ui thread, gvt-g must make sure the dma address is validated before letting it go to the HW. Invalid guest dma address will easily cause DMA fault and make GPU hang. v2: Rebase Fixes: e546e281d33d ("drm/i915/gvt: Dmabuf support for GVT-g") Acked-by: Zhenyu Wang Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20191212141342.3417-1-tina.zhang@intel.com commit 4fc0a3ca721da2bfbab0fdf248bd76d7e6bc232f Author: Zhenyu Wang Date: Thu Dec 12 16:46:14 2019 +0800 drm/i915/gvt: set guest display buffer as readonly We shouldn't allow write for exposed guest display buffer which doesn't make sense. So explicitly set read only flag for display dmabuf allocated object. Fixes: e546e281d33d ("drm/i915/gvt: Dmabuf support for GVT-g") Cc: Tina Zhang Acked-by: Tina Zhang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20191212084614.1100-1-zhenyuw@linux.intel.com commit d3ab06f432891bfcb9e28a9d183e7f7c50f8d951 Merge: 66d9506440bb c3a5fd15ed0c Author: Stephen Boyd Date: Thu Dec 12 19:00:01 2019 -0800 Merge tag 'imx-clk-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-fixes Pull i.MX clk fixes from Shawn Guo: - Add missing lock to divider in the composite driver for exclusive register access - Add missing sentinel for ulp_div_table in clk-imx7ulp driver - Fix clk_pll14xx_wait_lock() function which calls into readl_poll_timeout() with incorrect parameter * tag 'imx-clk-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx: pll14xx: fix clk_pll14xx_wait_lock clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table clk: imx: clk-composite-8m: add lock to gate/mux commit 66d9506440bb05289eb4867059e7b8c6ed209717 Author: Jerome Brunet Date: Tue Dec 3 09:08:05 2019 +0100 clk: walk orphan list on clock provider registration So far, we walked the orphan list every time a new clock was registered in CCF. This was fine since the clocks were only referenced by name. Now that the clock can be referenced through DT, it is not enough: * Controller A register first a reference clocks from controller B through DT. * Controller B register all its clocks then register the provider. Each time controller B registers a new clock, the orphan list is walked but it can't match since the provider is registered yet. When the provider is finally registered, the orphan list is not walked unless another clock is registered afterward. This can lead to situation where some clocks remain orphaned even if the parent is available. Walking the orphan list on provider registration solves the problem. Reported-by: Jian Hu Fixes: fc0c209c147f ("clk: Allow parents to be specified without string names") Signed-off-by: Jerome Brunet Link: https://lkml.kernel.org/r/20191203080805.104628-1-jbrunet@baylibre.com Signed-off-by: Stephen Boyd commit ee9b280e17dce51c44e1d04d11eb0a4acd0ee1a9 Author: Saravana Kannan Date: Mon Dec 9 11:31:19 2019 -0800 of/platform: Unconditionally pause/resume sync state during kernel init Commit 5e6669387e22 ("of/platform: Pause/resume sync state during init and of_platform_populate()") paused/resumed sync state during init only if Linux had parsed and populated a devicetree. However, the check for that (of_have_populated_dt()) can change after of_platform_default_populate_init() executes. One example of this is when devicetree unittests are enabled. This causes an unmatched pause/resume of sync state. To avoid this, just unconditionally pause/resume sync state during init. Fixes: 5e6669387e22 ("of/platform: Pause/resume sync state during init and of_platform_populate()") Reported-by: kernel test robot Signed-off-by: Saravana Kannan Reviewed-by: Frank Rowand Signed-off-by: Rob Herring commit 70c812106c87981a087fafacab004aee37193405 Author: Rob Herring Date: Wed Dec 11 08:51:01 2019 -0600 dt-bindings: memory-controllers: tegra: Fix type references Json-schema requires a $ref to be under an 'allOf' if there are additional constraints otherwise the additional constraints are ignored. (Note that this behavior will be changed in draft8.) Fixes: 641262f5e1ed ("dt-bindings: memory: Add binding for NVIDIA Tegra30 External Memory Controller") Fixes: 785685b7a106 ("dt-bindings: memory: Add binding for NVIDIA Tegra30 Memory Controller") Fixes: 8da65c377b21 ("dt-bindings: memory: tegra30: Convert to Tegra124 YAML") Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Reviewed-by: Dmitry Osipenko Signed-off-by: Rob Herring commit 5c7404bb30bc5877e578336c58998a999c410622 Author: Maxime Ripard Date: Mon Dec 9 10:32:48 2019 +0100 dt-bindings: Change maintainer address While my email address has changed for a while, all the schemas I contributed still have the old one unfortunately. Update it. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit dc2316eba73ff03da6dde082a372c6b5209304c5 Author: Yishai Hadas Date: Thu Dec 12 12:02:37 2019 +0200 IB/mlx5: Fix device memory flows Fix device memory flows so that only once there will be no live mmaped VA to a given allocation the matching object will be destroyed. This prevents a potential scenario that existing VA that was mmaped by one process might still be used post its deallocation despite that it's owned now by other process. The above is achieved by integrating with IB core APIs to manage mmap/munmap. Only once the refcount will become 0 the DM object and its underlay area will be freed. Fixes: 3b113a1ec3d4 ("IB/mlx5: Support device memory type attribute") Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20191212100237.330654-3-leon@kernel.org Signed-off-by: Doug Ledford commit 7a763d18ff2a75cfd1014800327f4120840bef09 Author: Yishai Hadas Date: Thu Dec 12 12:02:36 2019 +0200 IB/core: Introduce rdma_user_mmap_entry_insert_range() API Introduce rdma_user_mmap_entry_insert_range() API to be used once the required key for the given entry should be in a given range. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20191212100237.330654-2-leon@kernel.org Signed-off-by: Doug Ledford commit bea37414453eb08d4ceffeb60a9d490dbc930cea Author: Eric Biggers Date: Wed Oct 9 16:03:49 2019 -0700 KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails No error code was being set on this error path. Cc: stable@vger.kernel.org Fixes: ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]") Fixes: c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]") Reviewed-by: James Morris Signed-off-by: Eric Biggers Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 601f0093f2647db67be40b62e13cd0660990a7c8 Author: Eric Biggers Date: Wed Oct 9 16:04:43 2019 -0700 KEYS: remove CONFIG_KEYS_COMPAT KEYS_COMPAT now always takes the value of COMPAT && KEYS. But the security/keys/ directory is only compiled if KEYS is enabled, so in practice KEYS_COMPAT is the same as COMPAT. Therefore, remove the unnecessary KEYS_COMPAT and just use COMPAT directly. (Also remove an outdated comment from compat.c.) Reviewed-by: James Morris Signed-off-by: Eric Biggers Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit ca01e7987463e8675f223c366e262e82f633481a Author: Enric Balletbo i Serra Date: Wed Dec 11 10:34:50 2019 +0100 PCI: rockchip: Fix IO outbound ATU register number Since 62240a88004b ("PCI: rockchip: Drop storing driver private outbound resource data), the offset calculation is wrong to access the register number to program the IO outbound ATU. Fix this by computing the ATU IO register number based on the number of MEM registers, not the size of the IO region. This causes 'synchronous external aborts' like the following: mwifiex_pcie 0000:01:00.0: enabling device (0000 -> 0002) mwifiex_pcie: PCI memory map Virt0: 00000000a573ad00 PCI memory map Virt2: 00000000783126c4 Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP Modules linked in: mwifiex_pcie(+) mwifiex uvcvideo cfg80211 atmel_mxt_ts videobuf2_vmalloc ... CPU: 2 PID: 269 Comm: systemd-udevd Not tainted 5.4.0+ #327 Hardware name: Google Kevin (DT) pstate: 60000005 (nZCv daif -PAN -UAO) pc : mwifiex_register_dev+0x264/0x3f8 [mwifiex_pcie] lr : mwifiex_register_dev+0x150/0x3f8 [mwifiex_pcie] sp : ffff800012073860 x29: ffff800012073860 x28: ffff8000100a2e28 x27: ffff8000118b6210 x26: ffff800008f57458 x25: ffff0000ecfda000 x24: 0000000000000001 x23: ffff0000e9905080 x22: ffff800008f5d000 x21: ffff0000eecea078 x20: ffff0000e9905080 x19: ffff0000eecea000 x18: 0000000000000001 x17: 0000000000000000 x16: 0000000000000000 x15: ffffffffffffffff x14: ffff8000118998c8 x13: ffff000000000000 x12: 0000000000000008 x11: 0101010101010101 x10: ffff7f7fffff7fff x9 : 0000000000000000 x8 : ffff0000e3c24240 x7 : 0000000000000000 x6 : ffff0000e3c24148 x5 : ffff0000e3c24148 x4 : ffff0000e7975ec8 x3 : 0000000000000001 x2 : 0000000000002b42 x1 : ffff800012c00008 x0 : ffff0000e9905080 Call trace: mwifiex_register_dev+0x264/0x3f8 [mwifiex_pcie] mwifiex_add_card+0x2f8/0x430 [mwifiex] mwifiex_pcie_probe+0x98/0x148 [mwifiex_pcie] pci_device_probe+0x110/0x1a8 ... Code: a8c67bfd d65f03c0 f942ac01 91002021 (b9400021) Suggested-by: Lorenzo Pieralisi Fixes: 62240a88004b ("PCI: rockchip: Drop storing driver private outbound resource data) Link: https://lore.kernel.org/r/20191211093450.7481-1-enric.balletbo@collabora.com Reported-by: Enric Balletbo i Serra Reported-by: Vicente Bergas Tested-by: Vicente Bergas Signed-off-by: Enric Balletbo i Serra Signed-off-by: Bjorn Helgaas Acked-by: Andrew Murray commit f271fe1856138d402e0438f994ccae95f9044b2c Author: changzhu Date: Tue Dec 10 22:50:16 2019 +0800 drm/amdgpu: add invalidate semaphore limit for SRIOV in gmc10 It may fail to load guest driver in round 2 when using invalidate semaphore for SRIOV. So it needs to avoid using invalidate semaphore for SRIOV. Signed-off-by: changzhu Reviewed-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 90f6452ca58d436de4f69b423ecd75a109aa9766 Author: changzhu Date: Tue Dec 10 22:00:59 2019 +0800 drm/amdgpu: add invalidate semaphore limit for SRIOV and picasso in gmc9 It may fail to load guest driver in round 2 or cause Xstart problem when using invalidate semaphore for SRIOV or picasso. So it needs avoid using invalidate semaphore for SRIOV and picasso. Signed-off-by: changzhu Reviewed-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit ed9085fed9d95d5921582e3c8474f3736c5d2782 Author: Maor Gottlieb Date: Thu Dec 12 11:12:14 2019 +0200 IB/mlx5: Fix steering rule of drop and count There are two flow rule destinations: QP and packet. While users are setting DROP packet rule, the QP should not be set as a destination. Fixes: 3b3233fbf02e ("IB/mlx5: Add flow counters binding support") Signed-off-by: Maor Gottlieb Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20191212091214.315005-4-leon@kernel.org Signed-off-by: Doug Ledford commit 89f988d93c62384758b19323c886db917a80c371 Author: Parav Pandit Date: Thu Dec 12 11:12:13 2019 +0200 IB/mlx4: Follow mirror sequence of device add during device removal Current code device add sequence is: ib_register_device() ib_mad_init() init_sriov_init() register_netdev_notifier() Therefore, the remove sequence should be, unregister_netdev_notifier() close_sriov() mad_cleanup() ib_unregister_device() However it is not above. Hence, make do above remove sequence. Fixes: fa417f7b520ee ("IB/mlx4: Add support for IBoE") Signed-off-by: Parav Pandit Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20191212091214.315005-3-leon@kernel.org Signed-off-by: Doug Ledford commit 33df2f1929df4a1cb13303e344fbf8a75f0dc41f Author: Mark Zhang Date: Thu Dec 12 11:12:12 2019 +0200 RDMA/counter: Prevent auto-binding a QP which are not tracked with res Some QPs (e.g. XRC QP) are not tracked in kernel, in this case they have an invalid res and should not be bound to any dynamically-allocated counter in auto mode. This fixes below call trace: BUG: kernel NULL pointer dereference, address: 0000000000000390 PGD 80000001a7233067 P4D 80000001a7233067 PUD 1a7215067 PMD 0 Oops: 0000 [#1] SMP PTI CPU: 2 PID: 24822 Comm: ibv_xsrq_pingpo Not tainted 5.4.0-rc5+ #21 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014 RIP: 0010:rdma_counter_bind_qp_auto+0x142/0x270 [ib_core] Code: e1 48 85 c0 48 89 c2 0f 84 bc 00 00 00 49 8b 06 48 39 42 48 75 d6 40 3a aa 90 00 00 00 75 cd 49 8b 86 00 01 00 00 48 8b 4a 28 <8b> 80 90 03 00 00 39 81 90 03 00 00 75 b4 85 c0 74 b0 48 8b 04 24 RSP: 0018:ffffc900003f39c0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 RDX: ffff88820020ec00 RSI: 0000000000000004 RDI: ffffffffffffffc0 RBP: 0000000000000001 R08: ffff888224149ff0 R09: ffffc900003f3968 R10: ffffffffffffffff R11: ffff8882249c5848 R12: ffffffffffffffff R13: ffff88821d5aca50 R14: ffff8881f7690800 R15: ffff8881ff890000 FS: 00007fe53a3e1740(0000) GS:ffff888237b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000390 CR3: 00000001a7292006 CR4: 00000000003606a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: _ib_modify_qp+0x3a4/0x3f0 [ib_core] ? lookup_get_idr_uobject.part.8+0x23/0x40 [ib_uverbs] modify_qp+0x322/0x3e0 [ib_uverbs] ib_uverbs_modify_qp+0x43/0x70 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0xb1/0xf0 [ib_uverbs] ib_uverbs_run_method+0x6be/0x760 [ib_uverbs] ? uverbs_disassociate_api+0xd0/0xd0 [ib_uverbs] ib_uverbs_cmd_verbs+0x18d/0x3a0 [ib_uverbs] ? get_acl+0x1a/0x120 ? __alloc_pages_nodemask+0x15d/0x2c0 ib_uverbs_ioctl+0xa7/0x110 [ib_uverbs] do_vfs_ioctl+0xa5/0x610 ksys_ioctl+0x60/0x90 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x48/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 99fa331dc862 ("RDMA/counter: Add "auto" configuration mode support") Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Reviewed-by: Ido Kalir Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20191212091214.315005-2-leon@kernel.org Signed-off-by: Doug Ledford commit 0af67e49b018e7280a4227bfe7b6005bc9d3e442 Author: Manish Chopra Date: Thu Dec 12 06:49:28 2019 -0800 qede: Fix multicast mac configuration Driver doesn't accommodate the configuration for max number of multicast mac addresses, in such particular case it leaves the device with improper/invalid multicast configuration state, causing connectivity issues (in lacp bonding like scenarios). Signed-off-by: Manish Chopra Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 20032b63586ac6c28c936dff696981159913a13f Author: Cristian Birsan Date: Thu Dec 12 13:52:47 2019 +0200 net: usb: lan78xx: Fix suspend/resume PHY register access error Lan78xx driver accesses the PHY registers through MDIO bus over USB connection. When performing a suspend/resume, the PHY registers can be accessed before the USB connection is resumed. This will generate an error and will prevent the device to resume correctly. This patch adds the dependency between the MDIO bus and USB device to allow correct handling of suspend/resume. Fixes: ce85e13ad6ef ("lan78xx: Update to use phylib instead of mii_if_info.") Signed-off-by: Cristian Birsan Signed-off-by: David S. Miller commit 37d4e84f765bb3038ddfeebdc5d1cfd7e1ef688f Merge: ae4b064e2a61 da08e1e1d7c3 Author: Linus Torvalds Date: Thu Dec 12 10:56:37 2019 -0800 Merge tag 'ceph-for-5.5-rc2' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A fix to avoid a corner case when scheduling cap reclaim in batches from Xiubo, a patch to add some observability into cap waiters from Jeff and a couple of cleanups" * tag 'ceph-for-5.5-rc2' of git://github.com/ceph/ceph-client: ceph: add more debug info when decoding mdsmap ceph: switch to global cap helper ceph: trigger the reclaim work once there has enough pending caps ceph: show tasks waiting on caps in debugfs caps file ceph: convert int fields in ceph_mount_options to unsigned int commit 8243186f0cc7c57cf9d6a110cd7315c44e3e0be8 Author: Dominik Brodowski Date: Tue Oct 23 16:24:09 2018 +0200 fs: remove ksys_dup() ksys_dup() is used only at one place in the kernel, namely to duplicate fd 0 of /dev/console to stdout and stderr. The same functionality can be achieved by using functions already available within the kernel namespace. Signed-off-by: Dominik Brodowski commit b49a733d684e0096340b93e9dfd471f0e3ddc06d Author: Dominik Brodowski Date: Tue Oct 23 16:00:10 2018 +0200 init: unify opening /dev/console as stdin/stdout/stderr Merge the two instances where /dev/console is opened as stdin/stdout/stderr. Signed-off-by: Dominik Brodowski commit 89f33b984a51364465b32f8239eeb1daf62a6c03 Merge: 9103bb419aef 7947e3238b64 Author: Olof Johansson Date: Thu Dec 12 09:38:22 2019 -0800 Merge tag 'imx-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.5: - Add missing jedec,spi-nor compatible for imx6ul-14x14-evk board, so that SPI NOR device can be probed. - Fix power button of E60K02 board by removing LDORTC2 regulator. - A couple of fixes on serial number support of i.MX6ULL/ULZ SoCs to remove the boot regression caused by 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs"). - A couple of fixes on LS1028A SoC TMU regarding to calibration data and reboot register configuration. - Fix a regression seen on imx6ul-evk board by marking always-on for the regulator that is shared by many peripherals. - Explicitly restore CONFIG_DEBUG_FS in imx_v6_v7_defconfig. * tag 'imx-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: Fix boot crash if ocotp is not found ARM: imx_v6_v7_defconfig: Explicitly restore CONFIG_DEBUG_FS ARM: dts: imx6ul-evk: Fix peripheral regulator arm64: dts: ls1028a: fix reboot node arm64: dts: ls1028a: fix typo in TMU calibration data ARM: imx: Correct ocotp id for serial number support of i.MX6ULL/ULZ SoCs ARM: dts: e60k02: fix power button ARM: dts: imx6ul: imx6ul-14x14-evk.dtsi: Fix SPI NOR probing Link: https://lore.kernel.org/r/20191212122427.GK15858@dragon Signed-off-by: Olof Johansson commit 85572c2c4a45a541e880e087b5b17a48198b2416 Author: Rafael J. Wysocki Date: Wed Dec 11 11:28:41 2019 +0100 cpufreq: Avoid leaving stale IRQ work items during CPU offline The scheduler code calling cpufreq_update_util() may run during CPU offline on the target CPU after the IRQ work lists have been flushed for it, so the target CPU should be prevented from running code that may queue up an IRQ work item on it at that point. Unfortunately, that may not be the case if dvfs_possible_from_any_cpu is set for at least one cpufreq policy in the system, because that allows the CPU going offline to run the utilization update callback of the cpufreq governor on behalf of another (online) CPU in some cases. If that happens, the cpufreq governor callback may queue up an IRQ work on the CPU running it, which is going offline, and the IRQ work may not be flushed after that point. Moreover, that IRQ work cannot be flushed until the "offlining" CPU goes back online, so if any other CPU calls irq_work_sync() to wait for the completion of that IRQ work, it will have to wait until the "offlining" CPU is back online and that may not happen forever. In particular, a system-wide deadlock may occur during CPU online as a result of that. The failing scenario is as follows. CPU0 is the boot CPU, so it creates a cpufreq policy and becomes the "leader" of it (policy->cpu). It cannot go offline, because it is the boot CPU. Next, other CPUs join the cpufreq policy as they go online and they leave it when they go offline. The last CPU to go offline, say CPU3, may queue up an IRQ work while running the governor callback on behalf of CPU0 after leaving the cpufreq policy because of the dvfs_possible_from_any_cpu effect described above. Then, CPU0 is the only online CPU in the system and the stale IRQ work is still queued on CPU3. When, say, CPU1 goes back online, it will run irq_work_sync() to wait for that IRQ work to complete and so it will wait for CPU3 to go back online (which may never happen even in principle), but (worse yet) CPU0 is waiting for CPU1 at that point too and a system-wide deadlock occurs. To address this problem notice that CPUs which cannot run cpufreq utilization update code for themselves (for example, because they have left the cpufreq policies that they belonged to), should also be prevented from running that code on behalf of the other CPUs that belong to a cpufreq policy with dvfs_possible_from_any_cpu set and so in that case the cpufreq_update_util_data pointer of the CPU running the code must not be NULL as well as for the CPU which is the target of the cpufreq utilization update in progress. Accordingly, change cpufreq_this_cpu_can_update() into a regular function in kernel/sched/cpufreq.c (instead of a static inline in a header file) and make it check the cpufreq_update_util_data pointer of the local CPU if dvfs_possible_from_any_cpu is set for the target cpufreq policy. Also update the schedutil governor to do the cpufreq_this_cpu_can_update() check in the non-fast-switch case too to avoid the stale IRQ work issues. Fixes: 99d14d0e16fa ("cpufreq: Process remote callbacks from any CPU if the platform permits") Link: https://lore.kernel.org/linux-pm/20191121093557.bycvdo4xyinbc5cb@vireshk-i7/ Reported-by: Anson Huang Tested-by: Anson Huang Cc: 4.14+ # 4.14+ Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Tested-by: Peng Fan (i.MX8QXP-MEK) Signed-off-by: Rafael J. Wysocki commit d4d8140176972fdb3f00bffc88e63af781de8d67 Author: Rafael J. Wysocki Date: Wed Dec 11 11:30:50 2019 +0100 cpuidle: Drop unnecessary type cast in cpuidle_poll_time() The data type of the target_residency_ns field in struct cpuidle_state is u64, so it does not need to be cast into u64. Get rid of the unnecessary type cast. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 5addeae1bedc4c126b179f61e43e039bb373581f Author: Guoqing Jiang Date: Thu Dec 12 16:52:00 2019 +0100 blk-cgroup: remove blkcg_drain_queue Since blk_drain_queue had already been removed, so this function is not needed anymore. Signed-off-by: Guoqing Jiang Signed-off-by: Jens Axboe commit 6d674e28f642e3ff676fbae2d8d1b872814d32b6 Author: Marc Zyngier Date: Wed Dec 11 16:56:48 2019 +0000 KVM: arm/arm64: Properly handle faulting of device mappings A device mapping is normally always mapped at Stage-2, since there is very little gain in having it faulted in. Nonetheless, it is possible to end-up in a situation where the device mapping has been removed from Stage-2 (userspace munmaped the VFIO region, and the MMU notifier did its job), but present in a userspace mapping (userpace has mapped it back at the same address). In such a situation, the device mapping will be demand-paged as the guest performs memory accesses. This requires to be careful when dealing with mapping size, cache management, and to handle potential execution of a device mapping. Reported-by: Alexandru Elisei Signed-off-by: Marc Zyngier Tested-by: Alexandru Elisei Reviewed-by: James Morse Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191211165651.7889-2-maz@kernel.org commit e709ed70d122e94cb426b1e1f905829eae19a009 Author: Tony Lindgren Date: Thu Dec 12 08:20:10 2019 -0800 bus: ti-sysc: Fix missing reset delay handling We have dts property for "ti,sysc-delay-us", and we're using it, but the wait after OCP softreset only happens if devices are probed in legacy mode. Let's add a delay after writing the OCP softreset when specified. Fixes: e0db94fe87da ("bus: ti-sysc: Make OCP reset work for sysstatus and sysconfig reset bits") Cc: Keerthy Signed-off-by: Tony Lindgren commit eb45f2110b036e4e35d3f3aaee1c2ccf49d92425 Author: Andrew Jeffery Date: Mon Dec 2 15:31:10 2019 +1030 pinctrl: aspeed-g6: Fix LPC/eSPI mux configuration Early revisions of the AST2600 datasheet are conflicted about the state of the LPC/eSPI strapping bit (SCU510[6]). Conversations with ASPEED determined that the reference pinmux configuration tables were in error and the SCU documentation contained the correct configuration. Update the driver to reflect the state described in the SCU documentation. Fixes: 2eda1cdec49f ("pinctrl: aspeed: Add AST2600 pinmux support") Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191202050110.15340-1-andrew@aj.id.au Signed-off-by: Linus Walleij commit ecb6186cf78803663cbd7c70241bfe1af439ca03 Author: Logan Gunthorpe Date: Tue Dec 10 11:47:04 2019 -0700 block: fix NULL pointer dereference in account statistics with IDE The IDE driver creates some passthru requests which never get submitted to the block layer in such a way that blk_account_io_start() gets called. However, the driver still calls __blk_mq_end_request() in ide_end_rq() which will call blk_account_io_completion() which tries to dereferences req->part which is never set. See ide_prep_sense() for an example of where these requests come from. To fix this, blk_account_io_completion() and blk_account_io_done() should do nothing if req->part is not set. The back trace of this bug is: BUG: kernel NULL pointer dereference, address: 000002ac #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page *pde = 00000000 Oops: 0002 [#1] CPU: 0 PID: 237 Comm: kworker/0:1H Not tainted 5.4.0-rc2-00011-g48d9b0d43105e #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Workqueue: kblockd drive_rq_insert_work EIP: blk_account_io_completion+0x7a/0xf0 Code: 89 54 24 08 31 d2 89 4c 24 04 31 c9 c7 04 24 02 00 00 00 c1 ee 09 e8 f5 21 a6 ff e8 70 5c a7 ff 8b 53 60 8d 04 bd 00 00 00 00 <01> b4 02 ac 02 00 00 8b 9a 88 02 00 00 85 db 74 11 85 d2 74 51 8b EAX: 00000000 EBX: f5b80000 ECX: 00000000 EDX: 00000000 ESI: 00000000 EDI: 00000000 EBP: f3031e70 ESP: f3031e54 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010046 CR0: 80050033 CR2: 000002ac CR3: 03c25000 CR4: 000406d0 Call Trace: blk_update_request+0x85/0x420 ide_end_rq+0x38/0xa0 ide_complete_rq+0x3d/0x70 cdrom_newpc_intr+0x258/0xba0 ide_intr+0x135/0x250 __handle_irq_event_percpu+0x3e/0x250 handle_irq_event_percpu+0x1f/0x50 handle_irq_event+0x32/0x60 handle_level_irq+0x6c/0x110 handle_irq+0x72/0xa0 do_IRQ+0x45/0xad common_interrupt+0x115/0x11c Fixes: 48d9b0d43105 ("block: account statistics for passthrough requests") Reported-by: kernel test robot Signed-off-by: Logan Gunthorpe Signed-off-by: Jens Axboe commit 413fc385a594ea6eb08843be33939057ddfdae76 Author: changzhu Date: Tue Dec 10 10:23:09 2019 +0800 drm/amdgpu: avoid using invalidate semaphore for picasso It may cause timeout waiting for sem acquire in VM flush when using invalidate semaphore for picasso. So it needs to avoid using invalidate semaphore for piasso. Signed-off-by: changzhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit a680aea00d170695d6542150a6f8841b5c2b8f1e Author: Alex Deucher Date: Wed Dec 11 11:39:35 2019 -0500 Revert "drm/amdgpu: dont schedule jobs while in reset" This reverts commit f2efc6e60089c99c342a6b7da47f1037e06c4296. This was fixed properly for 5.5, but came back via 5.4 merge into drm-next, so revert it again. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cccaa5e33525fc07f4a2ce0518e50b9ddf435e47 Author: Dominik Brodowski Date: Tue Oct 23 22:41:09 2018 +0200 init: use do_mount() instead of ksys_mount() In prepare_namespace(), do_mount() can be used instead of ksys_mount() as the first and third argument are const strings in the kernel, the second and fourth argument are passed through anyway, and the fifth argument is NULL. In do_mount_root(), ksys_mount() is called with the first and third argument being already kernelspace strings, which do not need to be copied over from userspace to kernelspace (again). The second and fourth arguments are passed through to do_mount() anyway. The fifth argument, while already residing in kernelspace, needs to be put into a page of its own. Then, do_mount() can be used instead of ksys_mount(). Once this is done, there are no in-kernel users to ksys_mount() left, which can therefore be removed. Signed-off-by: Dominik Brodowski commit d4440aac83d12f87df9bcc51e992b9c28c7f4fa5 Author: Dominik Brodowski Date: Wed Nov 27 20:24:14 2019 +0100 initrd: use do_mount() instead of ksys_mount() All three calls to ksys_mount() in initrd-related kernel code can be switched over to do_mount(): - the first and third arguments are const strings in the kernel, and do not need to be copied over from userspace; - the fifth argument is NULL, and therefore no page needs to be, copied over from userspace; - the second and fourth argument are passed through anyway. Signed-off-by: Dominik Brodowski commit 5e787dbf659fe77d56215be74044f85e01b3920f Author: Dominik Brodowski Date: Tue Oct 23 22:10:35 2018 +0200 devtmpfs: use do_mount() instead of ksys_mount() In devtmpfs, do_mount() can be called directly instead of complex wrapping by ksys_mount(): - the first and third arguments are const strings in the kernel, and do not need to be copied over from userspace; - the fifth argument is NULL, and therefore no page needs to be copied over from userspace; - the second and fourth argument are passed through anyway. Signed-off-by: Dominik Brodowski commit abeb2e9414d7e3a0d8417bc3b13d7172513ea8a0 Author: Yonghan Ye Date: Wed Dec 4 20:00:07 2019 +0800 serial: sprd: Add clearing break interrupt operation A break interrupt will be generated if the RX line was pulled low, which means some abnomal behaviors occurred of the UART. In this case, we still need to clear this break interrupt status, otherwise it will cause irq storm to crash the whole system. Fixes: b7396a38fb28 ("tty/serial: Add Spreadtrum sc9836-uart driver support") Signed-off-by: Yonghan Ye Cc: stable Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/925e51b73099c90158e080b8f5bed9b3b38c4548.1575460601.git.baolin.wang7@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0e4f7f920a5c6bfe5e851e989f27b35a0cc7fb7e Author: Leo Yan Date: Wed Nov 27 22:15:43 2019 +0800 tty: serial: msm_serial: Fix lockup for sysrq and oops As the commit 677fe555cbfb ("serial: imx: Fix recursive locking bug") has mentioned the uart driver might cause recursive locking between normal printing and the kernel debugging facilities (e.g. sysrq and oops). In the commit it gave out suggestion for fixing recursive locking issue: "The solution is to avoid locking in the sysrq case and trylock in the oops_in_progress case." This patch follows the suggestion (also used the exactly same code with other serial drivers, e.g. amba-pl011.c) to fix the recursive locking issue, this can avoid stuck caused by deadlock and print out log for sysrq and oops. Fixes: 04896a77a97b ("msm_serial: serial driver for MSM7K onboard serial peripheral.") Signed-off-by: Leo Yan Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20191127141544.4277-2-leo.yan@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3c3caae4cd6e122472efcf64759ff6392fb6bce2 Author: Heikki Krogerus Date: Thu Dec 12 12:37:13 2019 +0300 usb: dwc3: pci: add ID for the Intel Comet Lake -H variant The original ID that was added for Comet Lake PCH was actually for the -LP (low power) variant even though the constant for it said CMLH. Changing that while at it. Signed-off-by: Heikki Krogerus Acked-by: Felipe Balbi Cc: stable Link: https://lore.kernel.org/r/20191212093713.60614-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1ce74e96c2407df2b5867e5d45a70aacb8923c14 Author: Will Deacon Date: Thu Dec 12 09:40:49 2019 +0000 KVM: arm64: Ensure 'params' is initialised when looking up sys register Commit 4b927b94d5df ("KVM: arm/arm64: vgic: Introduce find_reg_by_id()") introduced 'find_reg_by_id()', which looks up a system register only if the 'id' index parameter identifies a valid system register. As part of the patch, existing callers of 'find_reg()' were ported over to the new interface, but this breaks 'index_to_sys_reg_desc()' in the case that the initial lookup in the vCPU target table fails because we will then call into 'find_reg()' for the system register table with an uninitialised 'param' as the key to the lookup. GCC 10 is bright enough to spot this (amongst a tonne of false positives, but hey!): | arch/arm64/kvm/sys_regs.c: In function ‘index_to_sys_reg_desc.part.0.isra’: | arch/arm64/kvm/sys_regs.c:983:33: warning: ‘params.Op2’ may be used uninitialized in this function [-Wmaybe-uninitialized] | 983 | (u32)(x)->CRn, (u32)(x)->CRm, (u32)(x)->Op2); | [...] Revert the hunk of 4b927b94d5df which breaks 'index_to_sys_reg_desc()' so that the old behaviour of checking the index upfront is restored. Fixes: 4b927b94d5df ("KVM: arm/arm64: vgic: Introduce find_reg_by_id()") Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Link: https://lore.kernel.org/r/20191212094049.12437-1-will@kernel.org commit 3e42fe5c73108a6e68c98bc0df937888e35af97f Author: Georgi Djakov Date: Thu Dec 12 09:53:32 2019 +0200 interconnect: qcom: msm8974: Walk the list safely on node removal As we will remove items off the list using list_del(), we need to use the safe version of list_for_each_entry(). Fixes: 4e60a9568dc6 ("interconnect: qcom: add msm8974 driver") Reported-by: Dmitry Osipenko Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20191212075332.16202-5-georgi.djakov@linaro.org Signed-off-by: Greg Kroah-Hartman commit f39488ea2a75c49634c8611090f58734f61eee7c Author: Georgi Djakov Date: Thu Dec 12 09:53:31 2019 +0200 interconnect: qcom: qcs404: Walk the list safely on node removal As we will remove items off the list using list_del(), we need to use the safe version of list_for_each_entry(). Fixes: 5e4e6c4d3ae0 ("interconnect: qcom: Add QCS404 interconnect provider driver") Reported-by: Dmitry Osipenko Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov Cc: # v5.4 Link: https://lore.kernel.org/r/20191212075332.16202-4-georgi.djakov@linaro.org Signed-off-by: Greg Kroah-Hartman commit b29b8113bb41285eb7ed55ce0c65017b5c0240f7 Author: Georgi Djakov Date: Thu Dec 12 09:53:30 2019 +0200 interconnect: qcom: sdm845: Walk the list safely on node removal As we will remove items off the list using list_del(), we need to use the safe version of list_for_each_entry(). Fixes: b5d2f741077a ("interconnect: qcom: Add sdm845 interconnect provider driver") Reported-by: Dmitry Osipenko Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov Cc: # v5.3+ Link: https://lore.kernel.org/r/20191212075332.16202-3-georgi.djakov@linaro.org Signed-off-by: Greg Kroah-Hartman commit e27da6a6a4da9e5dd711e64cfd9d13ec3cc39d27 Author: Krzysztof Kozlowski Date: Thu Dec 12 09:53:29 2019 +0200 interconnect: qcom: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20191212075332.16202-2-georgi.djakov@linaro.org Signed-off-by: Greg Kroah-Hartman commit e32ea127d81c12882f39c2783d78634597ff21a2 Author: Guenter Roeck Date: Thu Dec 12 16:34:03 2019 +0800 nios2: Fix ioremap Commit 5ace77e0b41a ("nios2: remove __ioremap") removed the following code, with the argument that cacheflag is always 0 and the expression would therefore always be false. if (IS_MAPPABLE_UNCACHEABLE(phys_addr) && IS_MAPPABLE_UNCACHEABLE(last_addr) && !(cacheflag & _PAGE_CACHED)) return (void __iomem *)(CONFIG_NIOS2_IO_REGION_BASE + phys_addr); This did not take the "!" in the expression into account. Result is that nios2 images no longer boot. Restoring the removed code fixes the problem. Fixes: 5ace77e0b41a ("nios2: remove __ioremap") Cc: Christoph Hellwig Signed-off-by: Guenter Roeck Reviewed-by: Christoph Hellwig Signed-off-by: Ley Foon Tan commit 84faa307249b341f6ad8de3e1869d77a65e26669 Author: Jason A. Donenfeld Date: Wed Dec 11 10:26:39 2019 +0100 crypto: arm/curve25519 - add arch-specific key generation function Somehow this was forgotten when Zinc was being split into oddly shaped pieces, resulting in linker errors. The x86_64 glue has a specific key generation implementation, but the Arm one does not. However, it can still receive the NEON speedups by calling the ordinary DH function using the base point. Signed-off-by: Jason A. Donenfeld Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit cdf1d28ced9d7c63502afc409bad3b80198f101a Merge: 5ba047488209 3d1890ef8023 Author: Dave Airlie Date: Thu Dec 12 15:25:38 2019 +1000 Merge branch 'linux-5.5' of git://github.com/skeggsb/linux into drm-fixes Bunch of random nouveau fixes. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Wed Dec 11 20:13:45 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2019-12-11 The following pull-request contains BPF updates for your *net* tree. We've added 8 non-merge commits during the last 1 day(s) which contain a total of 10 files changed, 126 insertions(+), 18 deletions(-). The main changes are: 1) Make BPF trampoline co-exist with ftrace-based tracers, from Alexei. 2) Fix build in minimal configurations, from Arnd. 3) Fix mips, riscv bpf_tail_call limit, from Paul. 4) Fix bpftool segfault, from Toke. 5) Fix samples/bpf, from Daniel. ==================== Signed-off-by: David S. Miller commit 296aec45a676fbaaabdadfaf2bf5812abf762600 Merge: cc90bc684223 3b7436cc9449 Author: Jens Axboe Date: Wed Dec 11 20:49:58 2019 -0700 Merge branch 'md-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-linus Pull MD fixes from Song. * 'md-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: make sure desc_nr less than MD_SB_DISKS md: raid1: check rdev before reference in raid1_sync_request func raid5: need to set STRIPE_HANDLE for batch head commit 5ba0474882095dd737e717507cae16ccd5dc5ee6 Merge: 781d5eb4b4a6 78baee8d3b97 Author: Dave Airlie Date: Thu Dec 12 13:11:58 2019 +1000 Merge tag 'drm-misc-fixes-2019-12-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - Expand dma-buf MAINTAINER scope - Fix mode matching for drivers not using picture_aspect_ratio Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191211212107.GA257983@art_vandelay commit 7947e3238b64c00c396e6f5738f94c4d653bc6a2 Author: Leonard Crestez Date: Tue Dec 10 23:49:28 2019 +0200 ARM: imx: Fix boot crash if ocotp is not found The imx_soc_device_init functions tries to fetch the ocotp regmap in order to soc serial number. If regmap fetch fails then a message is printed but regmap_read is called anyway and the system crashes. Failing to lookup ocotp regmap shouldn't be a fatal boot error so check that the pointer is valid. Only side-effect of ocotp lookup failure now is that serial number will be reported as all-zeros which is acceptable. Cc: stable@vger.kernel.org Fixes: 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs") Signed-off-by: Leonard Crestez Tested-by: Christoph Niedermaier Signed-off-by: Shawn Guo commit ae4b064e2a616b545acf02b8f50cc513b32c7522 Merge: 687dec9b9459 50559800b76a Author: Linus Torvalds Date: Wed Dec 11 18:10:40 2019 -0800 Merge tag 'afs-fixes-20191211' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: "Fixes for AFS plus one patch to make debugging easier: - Fix how addresses are matched to server records. This is currently incorrect which means cache invalidation callbacks from the server don't necessarily get delivered correctly. This causes stale data and metadata to be seen under some circumstances. - Make the dynamic root superblock R/W so that rpm/dnf can reapply the SELinux label to it when upgrading the Fedora filesystem-afs package. If the filesystem is R/O, this fails and the upgrade fails. It might be better in future to allow setxattr from an LSM to bypass the R/O protections, if only for pseudo-filesystems. - Fix the parsing of mountpoint strings. The mountpoint object has to have a terminal dot, whereas the source/device string passed to mount should not. This confuses type-forcing suffix detection leading to the wrong volume variant being mounted. - Make lookups in the dynamic root superblock for creation events (such as mkdir) fail with EOPNOTSUPP rather than something like EEXIST. The dynamic root only allows implicit creation by the ->lookup() method - and only if the target cell exists. - Fix the looking up of an AFS superblock to include the cell in the matching key - otherwise all volumes with the same ID number are treated as the same thing, irrespective of which cell they're in. - Show the volume name of each volume in the volume records displayed in /proc/net/afs//volumes. This proved useful in debugging as it provides a way to map the volume IDs to names, where the names are what appear in /proc/mounts" * tag 'afs-fixes-20191211' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Show volume name in /proc/net/afs//volumes afs: Fix missing cell comparison in afs_test_super() afs: Fix creation calls in the dynamic root to fail with EOPNOTSUPP afs: Fix mountpoint parsing afs: Fix SELinux setting security label on /afs afs: Fix afs_find_server lookups for ipv4 peers commit 46db63abb79524209c15c683feccfba116746757 Author: Leonard Crestez Date: Tue Dec 10 19:34:20 2019 +0200 ARM: imx_v6_v7_defconfig: Explicitly restore CONFIG_DEBUG_FS This is currently off and that's not desirable: default imx config is meant to be generally useful for development and debugging. Running git bisect between v5.4 and v5.5-rc1 finds this started from commit 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") Explicit CONFIG_DEBUG_FS=y was earlier removed by commit c29d541f590c ("ARM: imx_v6_v7_defconfig: Remove unneeded options") A very similar fix was required before: commit 7e9eb6268809 ("ARM: imx_v6_v7_defconfig: Explicitly restore CONFIG_DEBUG_FS") Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit 62cfe242db8c60551f36214ebb8858ce0a543841 Author: Leonard Crestez Date: Wed Dec 11 17:02:47 2019 +0200 ARM: dts: imx6ul-evk: Fix peripheral regulator Many peripherals are affected by gpio5/2, not just sensors. One of those is ethernet phy so network boot is current broken. Fix by renaming reg_sensors and marking it as "always on". Also add a comment asking for careful testing if this is to be made dynamic in the future. The "peri_3v3" naming is similar to imx6sx-sdb and regulator-name is same string as in schematics (VPERI_3V3). Fixes: 09e2b1048954 ("ARM: dts: imx6ul-14x14-evk: Add sensors' GPIO regulator") Signed-off-by: Leonard Crestez Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 3f0fb37b22b460e3dec62bee284932881574acb9 Author: Michael Walle Date: Wed Dec 11 18:11:45 2019 +0100 arm64: dts: ls1028a: fix reboot node The reboot register isn't located inside the DCFG controller, but in its own RST controller. Fix it. Fixes: 8897f3255c9c ("arm64: dts: Add support for NXP LS1028A SoC") Signed-off-by: Michael Walle Acked-by: Li Yang Signed-off-by: Shawn Guo commit c1468554776229d0db69e74a9aaf6f7e7095fd51 Author: Dan Williams Date: Wed Nov 13 16:22:06 2019 -0800 tools/testing/nvdimm: Fix mock support for ioremap After commit d092a8707326 "arch: rely on asm-generic/io.h for default ioremap_* definitions" the ioremap_nocache() symbol has been replaced with ioremap(). Update the mocked symbol list for nvdimm testing. Link: https://lore.kernel.org/r/157369090817.2974548.10148423996292973088.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: d092a8707326 ("arch: rely on asm-generic/io.h for default ioremap_* definitions") Signed-off-by: Dan Williams commit fe3300897cbfd76c6cb825776e5ac0ca50a91ca4 Author: Daniel T. Lee Date: Thu Dec 5 17:01:14 2019 +0900 samples: bpf: fix syscall_tp due to unused syscall Currently, open() is called from the user program and it calls the syscall 'sys_openat', not the 'sys_open'. This leads to an error of the program of user side, due to the fact that the counter maps are zero since no function such 'sys_open' is called. This commit adds the kernel bpf program which are attached to the tracepoint 'sys_enter_openat' and 'sys_enter_openat'. Fixes: 1da236b6be963 ("bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints") Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov commit bba1b2a890253528c45aa66cf856f289a215bfbc Author: Daniel T. Lee Date: Thu Dec 5 17:01:13 2019 +0900 samples: bpf: Replace symbol compare of trace_event Previously, when this sample is added, commit 1c47910ef8013 ("samples/bpf: add perf_event+bpf example"), a symbol 'sys_read' and 'sys_write' has been used without no prefixes. But currently there are no exact symbols with these under kallsyms and this leads to failure. This commit changes exact compare to substring compare to keep compatible with exact symbol or prefixed symbol. Fixes: 1c47910ef8013 ("samples/bpf: add perf_event+bpf example") Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191205080114.19766-2-danieltimlee@gmail.com commit 7f193c2519a3dcfd61cd5e676b2959370f4b15be Author: Alexei Starovoitov Date: Sun Dec 8 16:01:14 2019 -0800 selftests/bpf: Test function_graph tracer and bpf trampoline together Add simple test script to execute funciton graph tracer while BPF trampoline attaches and detaches from the functions being graph traced. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191209000114.1876138-4-ast@kernel.org commit b91e014f078e2e4f24778680e28dbbdecc7f0eb9 Author: Alexei Starovoitov Date: Sun Dec 8 16:01:13 2019 -0800 bpf: Make BPF trampoline use register_ftrace_direct() API Make BPF trampoline attach its generated assembly code to kernel functions via register_ftrace_direct() API. It helps ftrace-based tracers co-exist with BPF trampoline on the same kernel function. It also switches attaching logic from arch specific text_poke to generic ftrace that is available on many architectures. text_poke is still necessary for bpf-to-bpf attach and for bpf_tail_call optimization. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191209000114.1876138-3-ast@kernel.org commit 9e3aa61ae3e01ce1ce6361a41ef725e1f4d1d2bf Author: Jens Axboe Date: Wed Dec 11 15:55:43 2019 -0700 io_uring: ensure we return -EINVAL on unknown opcode If we submit an unknown opcode and have fd == -1, io_op_needs_file() will return true as we default to needing a file. Then when we go and assign the file, we find the 'fd' invalid and return -EBADF. We really should be returning -EINVAL for that case, as we normally do for unsupported opcodes. Change io_op_needs_file() to have the following return values: 0 - does not need a file 1 - does need a file < 0 - error value and use this to pass back the right value for this invalid case. Signed-off-by: Jens Axboe commit d0c2204135a0cdbc607c94c481cf1ccb2f659aa7 Author: Brian Foster Date: Wed Dec 11 13:18:38 2019 -0800 xfs: stabilize insert range start boundary to avoid COW writeback race generic/522 (fsx) occasionally fails with a file corruption due to an insert range operation. The primary characteristic of the corruption is a misplaced insert range operation that differs from the requested target offset. The reason for this behavior is a race between the extent shift sequence of an insert range and a COW writeback completion that causes a front merge with the first extent in the shift. The shift preparation function flushes and unmaps from the target offset of the operation to the end of the file to ensure no modifications can be made and page cache is invalidated before file data is shifted. An insert range operation then splits the extent at the target offset, if necessary, and begins to shift the start offset of each extent starting from the end of the file to the start offset. The shift sequence operates at extent level and so depends on the preparation sequence to guarantee no changes can be made to the target range during the shift. If the block immediately prior to the target offset was dirty and shared, however, it can undergo writeback and move from the COW fork to the data fork at any point during the shift. If the block is contiguous with the block at the start offset of the insert range, it can front merge and alter the start offset of the extent. Once the shift sequence reaches the target offset, it shifts based on the latest start offset and silently changes the target offset of the operation and corrupts the file. To address this problem, update the shift preparation code to stabilize the start boundary along with the full range of the insert. Also update the existing corruption check to fail if any extent is shifted with a start offset behind the target offset of the insert range. This prevents insert from racing with COW writeback completion and fails loudly in the event of an unexpected extent shift. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 99528efd1926f2acfd9660d0f48f528ee9048425 Author: Randy Dunlap Date: Wed Dec 11 13:18:37 2019 -0800 xfs: fix Sphinx documentation warning Fix Sphinx documentation format warning by not indenting so much. Documentation/admin-guide/xfs.rst:257: WARNING: Block quote ends without a blank line; unexpected unindent. Signed-off-by: Randy Dunlap Cc: Darrick J. Wong Cc: linux-xfs@vger.kernel.org Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 687dec9b94599b19e218f89fd034d6449c3ff57c Merge: 6674fdb25a9e ffafde478309 Author: Linus Torvalds Date: Wed Dec 11 12:25:32 2019 -0800 Merge tag 'erofs-for-5.5-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "Mainly address a regression reported by David recently observed together with overlayfs due to the improper return value of listxattr() without xattr. Update outdated expressions in document as well. Summary: - Fix improper return value of listxattr() with no xattr - Keep up documentation with latest code" * tag 'erofs-for-5.5-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: update documentation erofs: zero out when listxattr is called with no xattr commit 6674fdb25a9effc620c95d4c231a6ccc97b2f9b1 Merge: d1c6a2aa02af ff205766dbbe Author: Linus Torvalds Date: Wed Dec 11 12:22:38 2019 -0800 Merge tag 'trace-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Remove code I accidentally applied when doing a minor fix up to a patch, and then using "git commit -a --amend", which pulled in some other changes I was playing with. - Remove an used variable in trace_events_inject code - Fix function graph tracer when it traces a ftrace direct function. It will now ignore tracing a function that has a ftrace direct tramploine attached. This is needed for eBPF to use the ftrace direct code. * tag 'trace-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Fix function_graph tracer interaction with BPF trampoline tracing: remove set but not used variable 'buffer' module: Remove accidental change of module_enable_x() commit d1c6a2aa02af09238ad09493eb3c8685ccc3fe12 Author: Linus Torvalds Date: Wed Dec 11 11:46:19 2019 -0800 pipe: simplify signal handling in pipe_read() and add comments There's no need to separately check for signals while inside the locked region, since we're going to do "wait_event_interruptible()" right afterwards anyway, and the error handling is much simpler there. The check for whether we had already read anything was also redundant, since we no longer do the odd merging of reads when there are pending writers. But perhaps more importantly, this adds commentary about why we still need to wake up possible writers even though we didn't read any data, and why we can skip all the finishing touches now if we get a signal (or had a signal pending) while waiting for more data. [ This is a split-out cleanup from my "make pipe IO use exclusive wait queues" thing, which I can't apply because it triggers a nasty bug in the GNU make jobserver - Linus ] Signed-off-by: Linus Torvalds commit bd95c1445274c5e126ffd8998fbba9f3732a579e Author: Alex Deucher Date: Wed Dec 11 10:09:03 2019 -0500 drm/amdgpu: fix license on Kconfig and Makefiles amdgpu is MIT licensed. Fixes: ec8f24b7faaf3d ("treewide: Add SPDX license identifier - Makefile/Kconfig") Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 69897d3425674b06d1e822f7491d5c40a5ed1a2f Author: Tianci.Yin Date: Wed Dec 11 19:57:43 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings for navi14 add registers: mmPA_SC_BINNER_TIMEOUT_COUNTER and mmPA_SC_ENHANCE_2 Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 847b0d87950867306967d619d7e5a4db03fdb218 Author: Tianci.Yin Date: Wed Dec 11 19:55:49 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings add registers: mmPA_SC_BINNER_TIMEOUT_COUNTER and mmPA_SC_ENHANCE_2 Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 5714a2026f0c6eeea1a51d20a4561088f2ebe9ac Author: Tianci.Yin Date: Wed Dec 11 10:52:14 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings for navi14 add registers: mmSPI_CONFIG_CNTL Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 02cca5769f5e07748c839168dc0b5f21bbacff08 Author: Tianci.Yin Date: Wed Dec 11 10:43:07 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings add registers: mmSPI_CONFIG_CNTL Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 3e39ce266a273e5751e5792aee248cb8d9630c8b Author: Vasily Gorbik Date: Fri Aug 2 12:42:59 2019 +0200 s390/kasan: add KASAN_VMALLOC support Add KASAN_VMALLOC support which now enables vmalloc memory area access checks as well as enables usage of VMAP_STACK under kasan. KASAN_VMALLOC changes the way vmalloc and modules areas shadow memory is handled. With this new approach only top level page tables are pre-populated and lower levels are filled dynamically upon memory allocation. Acked-by: Ilya Leoshkevich Signed-off-by: Vasily Gorbik commit 1b68ac8678a8e9993deebd55014cbe803e78ca02 Author: Heiko Carstens Date: Fri Nov 29 12:59:59 2019 +0100 s390: remove last diag 0x44 caller diag 0x44 is a voluntary undirected yield of a virtual CPU. This has caused a lot of performance issues in the past. There is only one caller left, and that one is only executed if diag 0x9c (directed yield) is not present. Given that all hypervisors implement diag 0x9c anyway, remove the last diag 0x44 to avoid that more callers will be added. Worst case that could happen now, if diag 0x9c is not present, is that a virtual CPU would loop a bit instead of giving its time slice up. diag 0x44 statistics in debugfs are kept and will always be zero, so that user space can tell that there are no calls. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 157309a97015d8b32d65847d8a6d493d1a958e93 Author: Christian Borntraeger Date: Fri Dec 6 08:27:51 2019 +0100 s390/uv: use EOPNOTSUPP instead of ENOTSUPP ENOTSUP is just an internal kernel error and should never reach userspace. The return value of the share function is not exported to userspace, but to avoid giving bad examples let us use EOPNOTSUPP: Suggested-by: Heiko Carstens Acked-by: Janosch Frank Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik commit 0539ad0b22877225095d8adef0c376f52cc23834 Author: Thomas Richter Date: Fri Nov 29 15:24:25 2019 +0100 s390/cpum_sf: Avoid SBD overflow condition in irq handler The s390 CPU Measurement sampling facility has an overflow condition which fires when all entries in a SBD are used. The measurement alert interrupt is triggered and reads out all samples in this SDB. It then tests the successor SDB, if this SBD is not full, the interrupt handler does not read any samples at all from this SDB The design waits for the hardware to fill this SBD and then trigger another meassurement alert interrupt. This scheme works nicely until an perf_event_overflow() function call discards the sample due to a too high sampling rate. The interrupt handler has logic to read out a partially filled SDB when the perf event overflow condition in linux common code is met. This causes the CPUM sampling measurement hardware and the PMU device driver to operate on the same SBD's trailer entry. This should not happen. This can be seen here using this trace: cpumsf_pmu_add: tear:0xb5286000 hw_perf_event_update: sdbt 0xb5286000 full 1 over 0 flush_all:0 hw_perf_event_update: sdbt 0xb5286008 full 0 over 0 flush_all:0 above shows 1. interrupt hw_perf_event_update: sdbt 0xb5286008 full 1 over 0 flush_all:0 hw_perf_event_update: sdbt 0xb5286008 full 0 over 0 flush_all:0 above shows 2. interrupt ... this goes on fine until... hw_perf_event_update: sdbt 0xb5286068 full 1 over 0 flush_all:0 perf_push_sample1: overflow one or more samples read from the IRQ handler are rejected by perf_event_overflow() and the IRQ handler advances to the next SDB and modifies the trailer entry of a partially filled SDB. hw_perf_event_update: sdbt 0xb5286070 full 0 over 0 flush_all:1 timestamp: 14:32:52.519953 Next time the IRQ handler is called for this SDB the trailer entry shows an overflow count of 19 missed entries. hw_perf_event_update: sdbt 0xb5286070 full 1 over 19 flush_all:1 timestamp: 14:32:52.970058 Remove access to a follow on SDB when event overflow happened. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit 39d4a501a9ef55c57b51e3ef07fc2aeed7f30b3b Author: Thomas Richter Date: Thu Nov 28 10:26:41 2019 +0100 s390/cpum_sf: Adjust sampling interval to avoid hitting sample limits Function perf_event_ever_overflow() and perf_event_account_interrupt() are called every time samples are processed by the interrupt handler. However function perf_event_account_interrupt() has checks to avoid being flooded with interrupts (more then 1000 samples are received per task_tick). Samples are then dropped and a PERF_RECORD_THROTTLED is added to the perf data. The perf subsystem limit calculation is: maximum sample frequency := 100000 --> 1 samples per 10 us task_tick = 10ms = 10000us --> 1000 samples per task_tick The work flow is measurement_alert() uses SDBT head and each SBDT points to 511 SDB pages, each with 126 sample entries. After processing 8 SBDs and for each valid sample calling: perf_event_overflow() perf_event_account_interrupts() there is a considerable amount of samples being dropped, especially when the sample frequency is very high and near the 100000 limit. To avoid the high amount of samples being dropped near the end of a task_tick time frame, increment the sampling interval in case of dropped events. The CPU Measurement sampling facility on the s390 supports only intervals, specifiing how many CPU cycles have to be executed before a sample is generated. Increase the interval when the samples being generated hit the task_tick limit. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit 7e914fd17e9a750d8896e5645c84e75e52d77a4b Author: Colin Ian King Date: Mon Dec 2 09:02:15 2019 +0000 s390/test_unwind: fix spelling mistake "reqister" -> "register" There is a spelling mistake in a pr_info message. Fix it. Link: https://lkml.kernel.org/r/20191202090215.28766-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Vasily Gorbik commit b62b6cf170237677ae96001940c54d5c09d0015a Author: Vasily Gorbik Date: Tue Dec 3 17:52:03 2019 +0100 s390/spinlock: remove confusing comment in arch_spin_lock_wait arch_spin_lock_wait does not take steal time into consideration. Signed-off-by: Vasily Gorbik commit 3b7436cc9449d5ff7fa1c1fd5bc3edb6402ff5b8 Author: Yufen Yu Date: Tue Dec 10 15:01:29 2019 +0800 md: make sure desc_nr less than MD_SB_DISKS For super_90_load, we need to make sure 'desc_nr' less than MD_SB_DISKS, avoiding invalid memory access of 'sb->disks'. Fixes: 228fc7d76db6 ("md: avoid invalid memory access for array sb->dev_roles") Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 028288df635f5a9addd48ac4677b720192747944 Author: Zhiqiang Liu Date: Tue Dec 10 10:42:25 2019 +0800 md: raid1: check rdev before reference in raid1_sync_request func In raid1_sync_request func, rdev should be checked before reference. Signed-off-by: Zhiqiang Liu Signed-off-by: Song Liu commit a7ede3d16808b8f3915c8572d783530a82b2f027 Author: Guoqing Jiang Date: Wed Nov 27 17:57:50 2019 +0100 raid5: need to set STRIPE_HANDLE for batch head With commit 6ce220dd2f8ea71d6afc29b9a7524c12e39f374a ("raid5: don't set STRIPE_HANDLE to stripe which is in batch list"), we don't want to set STRIPE_HANDLE flag for sh which is already in batch list. However, the stripe which is the head of batch list should set this flag, otherwise panic could happen inside init_stripe at BUG_ON(sh->batch_head), it is reproducible with raid5 on top of nvdimm devices per Xiao oberserved. Thanks for Xiao's effort to verify the change. Fixes: 6ce220dd2f8ea ("raid5: don't set STRIPE_HANDLE to stripe which is in batch list") Reported-by: Xiao Ni Tested-by: Xiao Ni Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 50559800b76a7a2a46da303100da639536261808 Author: David Howells Date: Wed Dec 11 08:58:59 2019 +0000 afs: Show volume name in /proc/net/afs//volumes Show the name of each volume in /proc/net/afs//volumes to make it easier to work out the name corresponding to a volume ID. This makes it easier to work out which mounts in /proc/mounts correspond to which volume ID. Signed-off-by: David Howells Reviewed-by: Marc Dionne commit 106bc79843c3c6f4f00753d1f46e54e815f99377 Author: David Howells Date: Wed Dec 11 08:06:08 2019 +0000 afs: Fix missing cell comparison in afs_test_super() Fix missing cell comparison in afs_test_super(). Without this, any pair volumes that have the same volume ID will share a superblock, no matter the cell, unless they're in different network namespaces. Normally, most users will only deal with a single cell and so they won't see this. Even if they do look into a second cell, they won't see a problem unless they happen to hit a volume with the same ID as one they've already got mounted. Before the patch: # ls /afs/grand.central.org/archive linuxdev/ mailman/ moin/ mysql/ pipermail/ stage/ twiki/ # ls /afs/kth.se/ linuxdev/ mailman/ moin/ mysql/ pipermail/ stage/ twiki/ # cat /proc/mounts | grep afs none /afs afs rw,relatime,dyn,autocell 0 0 #grand.central.org:root.cell /afs/grand.central.org afs ro,relatime 0 0 #grand.central.org:root.archive /afs/grand.central.org/archive afs ro,relatime 0 0 #grand.central.org:root.archive /afs/kth.se afs ro,relatime 0 0 After the patch: # ls /afs/grand.central.org/archive linuxdev/ mailman/ moin/ mysql/ pipermail/ stage/ twiki/ # ls /afs/kth.se/ admin/ common/ install/ OldFiles/ service/ system/ bakrestores/ home/ misc/ pkg/ src/ wsadmin/ # cat /proc/mounts | grep afs none /afs afs rw,relatime,dyn,autocell 0 0 #grand.central.org:root.cell /afs/grand.central.org afs ro,relatime 0 0 #grand.central.org:root.archive /afs/grand.central.org/archive afs ro,relatime 0 0 #kth.se:root.cell /afs/kth.se afs ro,relatime 0 0 Fixes: ^1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Carsten Jacobi Signed-off-by: David Howells Reviewed-by: Marc Dionne Tested-by: Jonathan Billings cc: Todd DeSantis commit 1da4bd9f9d187f53618890d7b66b9628bbec3c70 Author: David Howells Date: Wed Dec 11 08:56:04 2019 +0000 afs: Fix creation calls in the dynamic root to fail with EOPNOTSUPP Fix the lookup method on the dynamic root directory such that creation calls, such as mkdir, open(O_CREAT), symlink, etc. fail with EOPNOTSUPP rather than failing with some odd error (such as EEXIST). lookup() itself tries to create automount directories when it is invoked. These are cached locally in RAM and not committed to storage. Signed-off-by: David Howells Reviewed-by: Marc Dionne Tested-by: Jonathan Billings commit 4eac734486fd431e0756cc5e929f140911a36a53 Author: SeongJae Park Date: Mon Dec 2 12:42:21 2019 +0100 kselftest: Support old perl versions On an old perl such as v5.10.1, `kselftest/prefix.pl` gives below error message: Can't locate object method "autoflush" via package "IO::Handle" at kselftest/prefix.pl line 10. This commit fixes the error by explicitly specifying the use of the `IO::Handle` package. Signed-off-by: SeongJae Park Acked-by: Kees Cook Signed-off-by: Shuah Khan commit d187801d1a46519d2a322f879f7c8f85c685372e Author: SeongJae Park Date: Mon Dec 2 12:42:20 2019 +0100 kselftest/runner: Print new line in print of timeout log If a timeout failure occurs, kselftest kills the test process and prints the timeout log. If the test process has killed while printing a log that ends with new line, the timeout log can be printed in middle of the test process output so that it can be seems like a comment, as below: # test_process_log not ok 3 selftests: timers: nsleep-lat # TIMEOUT This commit avoids such problem by printing one more line before the TIMEOUT failure log. Signed-off-by: SeongJae Park Acked-by: Kees Cook Signed-off-by: Shuah Khan commit 3a019636e6b00997594f91339411fa6bbd2c6d33 Author: Michael Ellerman Date: Fri Dec 6 14:17:38 2019 +1100 selftests: Fix dangling documentation references to kselftest_module.sh Commit c78fd76f2b67 ("selftests: Move kselftest_module.sh into kselftest/") moved kselftest_module.sh but missed updating a few references to the path in documentation. Fixes: c78fd76f2b67 ("selftests: Move kselftest_module.sh into kselftest/") Signed-off-by: Michael Ellerman Acked-by: Kees Cook Signed-off-by: Shuah Khan commit 158d58335393af3956a9c06f0816ee75ed1f1447 Author: David Howells Date: Mon Dec 9 15:04:45 2019 +0000 afs: Fix mountpoint parsing Each AFS mountpoint has strings that define the target to be mounted. This is required to end in a dot that is supposed to be stripped off. The string can include suffixes of ".readonly" or ".backup" - which are supposed to come before the terminal dot. To add to the confusion, the "fs lsmount" afs utility does not show the terminal dot when displaying the string. The kernel mount source string parser, however, assumes that the terminal dot marks the suffix and that the suffix is always "" and is thus ignored. In most cases, there is no suffix and this is not a problem - but if there is a suffix, it is lost and this affects the ability to mount the correct volume. The command line mount command, on the other hand, is expected not to include a terminal dot - so the problem doesn't arise there. Fix this by making sure that the dot exists and then stripping it when passing the string to the mount configuration. Fixes: bec5eb614130 ("AFS: Implement an autocell mount capability [ver #2]") Reported-by: Jonathan Billings Signed-off-by: David Howells Reviewed-by: Marc Dionne Tested-by: Jonathan Billings commit 9103bb419aef8b908a169ebed0e1c16ae060576a Merge: 96dd4bcbac8a db23808615e2 Author: Olof Johansson Date: Wed Dec 11 08:52:49 2019 -0800 Merge tag 'reset-fixes-for-v5.5-2' of git://git.pengutronix.de/git/pza/linux into arm/fixes Reset controller fixes for v5.5, part 2 Fix the example in the brcmstb-reset device tree bindings, remove a bogus resource alignment check from the reset-brcmstb driver, fix the documented return value type for the reset_control_array_get functions, and fix a devres memory leak when requesting optional, not present reset controls. * tag 'reset-fixes-for-v5.5-2' of git://git.pengutronix.de/git/pza/linux: reset: Do not register resource data for missing resets reset: Fix {of,devm}_reset_control_array_get kerneldoc return types reset: brcmstb: Remove resource checks dt-bindings: reset: Fix brcmstb-reset example Link: https://lore.kernel.org/r/bb59b9f83892aa3c876f5da87890b0496f2dc755.camel@pengutronix.de Signed-off-by: Olof Johansson commit 96dd4bcbac8ab5164ec3f07f9ae1f1611e767417 Merge: 8ecad8c0d1f8 30e647a764d4 Author: Olof Johansson Date: Wed Dec 11 08:52:16 2019 -0800 Merge tag 'arm-soc/for-5.5/devicetree-fixes' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains Broadcom ARM-based SoCs Device Tree fixes for v5.5-rc1, please pull the following: - Nicolas fixes the SoC's dma-range property to cover the full 1GB aperture - Stefan fixes the critical temperature trip point to be set before the firmware performs thermal throttling - Florian fixes the BCM5301X and Cygnus MDIO nodes to have corrected #address-cells and #size-cells properties * tag 'arm-soc/for-5.5/devicetree-fixes' of https://github.com/Broadcom/stblinux: ARM: dts: bcm283x: Fix critical trip point ARM: dts: Cygnus: Fix MDIO node address/size cells ARM: dts: bcm2711: fix soc's node dma-ranges ARM: dts: BCM5301X: Fix MDIO node address/size cells Link: https://lore.kernel.org/r/20191210205850.12442-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 8ecad8c0d1f87d3912c5ce9b65c56c32a38ac527 Author: Arnd Bergmann Date: Tue Dec 10 21:34:00 2019 +0100 ARM: mmp: include the correct cputype.h The file was moved, causing a build error: In file included from /git/arm-soc/arch/arm/mach-mmp/pxa168.c:28: arch/arm/mach-mmp/pxa168.h:22:10: fatal error: cputype.h: No such file or directory Include it from the new location. Link: https://lore.kernel.org/r/20191210203409.2875880-1-arnd@arndb.de Fixes: 32adcaa010fa ("ARM: mmp: move cputype.h to include/linux/soc/") Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson commit c6b16761c6908d3dc167a0a566578b4b0b972905 Author: Tomi Valkeinen Date: Thu Nov 14 11:39:48 2019 +0200 ARM: dts: am437x-gp/epos-evm: fix panel compatible The LCD panel on AM4 GP EVMs and ePOS boards seems to be osd070t1718-19ts. The current dts files say osd057T0559-34ts. Possibly the panel has changed since the early EVMs, or there has been a mistake with the panel type. Update the DT files accordingly. Acked-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Signed-off-by: Tony Lindgren commit c52c91bb9aa6bd8c38dbf9776158e33038aedd43 Author: Vignesh Raghavendra Date: Wed Dec 11 21:22:16 2019 +0530 spi: spi-ti-qspi: Fix a bug when accessing non default CS When switching ChipSelect from default CS0 to any other CS, driver fails to update the bits in system control module register that control which CS is mapped for MMIO access. This causes reads to fail when driver tries to access QSPI flash on CS1/2/3. Fix this by updating appropriate bits whenever active CS changes. Reported-by: Andreas Dannenberg Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20191211155216.30212-1-vigneshr@ti.com Signed-off-by: Mark Brown commit 100a21100bbb2bbc82fc4273e152c96e5c6c5d12 Author: Bartosz Golaszewski Date: Tue Dec 10 11:07:25 2019 +0100 regulator: max77650: add of_match table We need the of_match table if we want to use the compatible string in the pmic's child node and get the regulator driver loaded automatically. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20191210100725.11005-1-brgl@bgdev.pl Signed-off-by: Mark Brown commit 28707826877f84bce0977845ea529cbdd08e4e8d Author: Michael Petlan Date: Sun Dec 8 17:20:56 2019 +0100 perf header: Fix false warning when there are no duplicate cache entries Before this patch, perf expected that there might be NPROC*4 unique cache entries at max, however, it also expected that some of them would be shared and/or of the same size, thus the final number of entries would be reduced to be lower than NPROC*4. In case the number of entries hadn't been reduced (was NPROC*4), the warning was printed. However, some systems might have unusual cache topology, such as the following two-processor KVM guest: cpu level shared_cpu_list size 0 1 0 32K 0 1 0 64K 0 2 0 512K 0 3 0 8192K 1 1 1 32K 1 1 1 64K 1 2 1 512K 1 3 1 8192K This KVM guest has 8 (NPROC*4) unique cache entries, which used to make perf printing the message, although there actually aren't "way too many cpu caches". v2: Removing unused argument. v3: Unifying the way we obtain number of cpus. v4: Removed '& UINT_MAX' construct which is redundant. Signed-off-by: Michael Petlan Acked-by: Jiri Olsa LPU-Reference: 20191208162056.20772-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit eb573e746b9d4f0921dcb2449be3df41dae3caea Author: Kajol Jain Date: Wed Nov 20 14:10:59 2019 +0530 perf metricgroup: Fix printing event names of metric group with multiple events Commit f01642e4912b ("perf metricgroup: Support multiple events for metricgroup") introduced support for multiple events in a metric group. But with the current upstream, metric events names are not printed properly In power9 platform: command:# ./perf stat --metric-only -M translation -C 0 -I 1000 sleep 2 1.000208486 2.000368863 2.001400558 Similarly in skylake platform: command:./perf stat --metric-only -M Power -I 1000 1.000579994 2.002189493 With current upstream version, issue is with event name comparison logic in find_evsel_group(). Current logic is to compare events belonging to a metric group to the events in perf_evlist. Since the break statement is missing in the loop used for comparison between metric group and perf_evlist events, the loop continues to execute even after getting a pattern match, and end up in discarding the matches. Incase of single metric event belongs to metric group, its working fine, because in case of single event once it compare all events it reaches to end of perf_evlist. Example for single metric event in power9 platform: command:# ./perf stat --metric-only -M branches_per_inst -I 1000 sleep 1 1.000094653 0.2 1.001337059 0.0 This patch fixes the issue by making sure once we found all events belongs to that metric event matched in find_evsel_group(), we successfully break from that loop by adding corresponding condition. With this patch: In power9 platform: command:# ./perf stat --metric-only -M translation -C 0 -I 1000 sleep 2 result:# time derat_4k_miss_rate_percent derat_4k_miss_ratio derat_miss_ratio derat_64k_miss_rate_percent derat_64k_miss_ratio dslb_miss_rate_percent islb_miss_rate_percent 1.000135672 0.0 0.3 1.0 0.0 0.2 0.0 0.0 2.000380617 0.0 0.0 0.0 0.0 0.0 0.0 0.0 command:# ./perf stat --metric-only -M Power -I 1000 Similarly in skylake platform: result:# time Turbo_Utilization C3_Core_Residency C6_Core_Residency C7_Core_Residency C2_Pkg_Residency C3_Pkg_Residency C6_Pkg_Residency C7_Pkg_Residency 1.000563580 0.3 0.0 2.6 44.2 21.9 0.0 0.0 0.0 2.002235027 0.4 0.0 2.7 43.0 20.7 0.0 0.0 0.0 Committer testing: Before: [root@seventh ~]# perf stat --metric-only -M Power -I 1000 # time 1.000383223 2.001168182 3.001968545 4.002741200 5.003442022 ^C 5.777687244 [root@seventh ~]# After the patch: [root@seventh ~]# perf stat --metric-only -M Power -I 1000 # time Turbo_Utilization C3_Core_Residency C6_Core_Residency C7_Core_Residency C2_Pkg_Residency C3_Pkg_Residency C6_Pkg_Residency C7_Pkg_Residency 1.000406577 0.4 0.1 1.4 97.0 0.0 0.0 0.0 0.0 2.001481572 0.3 0.0 0.6 97.9 0.0 0.0 0.0 0.0 3.002332585 0.2 0.0 1.0 97.5 0.0 0.0 0.0 0.0 4.003196624 0.2 0.0 0.3 98.6 0.0 0.0 0.0 0.0 5.004063851 0.3 0.0 0.7 97.7 0.0 0.0 0.0 0.0 ^C 5.471260276 0.2 0.0 0.5 49.3 0.0 0.0 0.0 0.0 [root@seventh ~]# [root@seventh ~]# dmesg | grep -i skylake [ 0.187807] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR, full-width counters, Intel PMU driver. [root@seventh ~]# Fixes: f01642e4912b ("perf metricgroup: Support multiple events for metricgroup") Signed-off-by: Kajol Jain Reviewed-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Anju T Sudhakar Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Madhavan Srinivasan Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191120084059.24458-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 0dd674efaf63bc6bfd89909814db618abe1e7039 Author: Ravi Bangoria Date: Wed Dec 4 21:51:21 2019 +0530 perf/x86/pmu-events: Fix Kernel_Utilization metric Kernel Utilization should divide ref cycles spent in kernel with total ref cycles. Signed-off-by: Ravi Bangoria Reviewed-by: Andi Kleen Cc: Alexander Shishkin Cc: Haiyan Song Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191204162121.29998-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 61208e6e1003b3fd8d2d1f2a72ec27be43955c0b Author: Arnaldo Carvalho de Melo Date: Wed Dec 11 10:21:59 2019 -0300 perf top: Do not bail out when perf_env__read_cpuid() returns ENOSYS 'perf top' stopped working on hw architectures that do not provide a get_cpuid() implementation and thus fallback to the weak get_cpuid() default function. This is done because at annotation time we may need it in the arch specific annotation init routine, but that is only being used by arches that do provide a get_cpuid() implementation: $ find tools/ -name "*.[ch]" | xargs grep 'evlist->env' tools/perf/builtin-top.c: top.evlist->env = &perf_env; tools/perf/util/evsel.c: return evsel->evlist->env; tools/perf/util/s390-cpumsf.c: sf->machine_type = s390_cpumsf_get_type(session->evlist->env->cpuid); tools/perf/util/header.c: session->evlist->env = &header->env; tools/perf/util/sample-raw.c: const char *arch_pf = perf_env__arch(evlist->env); $ $ find tools/perf/arch -name "*.[ch]" | xargs grep -w get_cpuid tools/perf/arch/x86/util/auxtrace.c: ret = get_cpuid(buffer, sizeof(buffer)); tools/perf/arch/x86/util/header.c:get_cpuid(char *buffer, size_t sz) tools/perf/arch/powerpc/util/header.c:get_cpuid(char *buffer, size_t sz) tools/perf/arch/s390/util/header.c: * Implementation of get_cpuid(). tools/perf/arch/s390/util/header.c:int get_cpuid(char *buffer, size_t sz) tools/perf/arch/s390/util/header.c: if (buf && get_cpuid(buf, 128)) $ For 'report' or 'script', i.e. tools working on perf.data files, that is setup while reading the header, its just top that needs to explicitely read it at tool start. Fixes: 608127f73779 ("perf top: Initialize perf_env->cpuid, needed by the per arch annotation init routine") Reported-by: John Garry Analysed-by: Jiri Olsa Reviewed-by: Mark Rutland Tested-by: Mark Rutland Tested-by: John Garry # arm64 Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Namhyung Kim Cc: Will Deacon Link: https://lkml.kernel.org/n/tip-lxwjr0cd2eggzx04a780ffrv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 05267c7eac12627fae3f25dfd203bfdb9941f9ca Author: Arnaldo Carvalho de Melo Date: Wed Dec 11 10:09:24 2019 -0300 perf arch: Make the default get_cpuid() return compatible error Some of the functions calling get_cpuid() propagate back the error it returns, and all are using errno (positive) values, make the weak default get_cpuid() function return ENOSYS to be consistent and to allow checking if this is an arch not providing this function or if a provided one is having trouble getting the cpuid, to decide if the warning should be provided to the user or just a debug message should be emitted. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Tested-by: John Garry # arm64 Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Namhyung Kim Cc: Will Deacon Link: https://lkml.kernel.org/n/tip-lxwjr0cd2eggzx04a780ffrv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a2ce3217d3a448e5cf434026131633cf32ed2234 Author: Grygorii Strashko Date: Wed Nov 27 17:55:26 2019 +0200 dt-bindings: net: ti: cpsw-switch: update to fix comments After original patch was merged there were additional comments/requests provided by Rob Herring [1]. Mostly they are related to json-schema usage, and this patch fixes them. Also SPDX-License-Identifier has been changed to (GPL-2.0-only OR BSD-2-Clause) as requested. [1] https://lkml.org/lkml/2019/11/21/875 Fixes: ef63fe72f698 ("dt-bindings: net: ti: add new cpsw switch driver bindings") Signed-off-by: Grygorii Strashko [robh: Remove 2 more maxItems that aren't necessary] Signed-off-by: Rob Herring commit 71bbcd2eaf042ec3f10122e3f3b1be67dbfb1c16 Author: Arnaud Pouliquen Date: Fri Nov 22 13:54:02 2019 +0100 dt-bindings: remoteproc: stm32: add wakeup-source property If the optional wdg interrupt is defined, then this property may be defined. Signed-off-by: Arnaud Pouliquen Signed-off-by: Rob Herring commit bd82873f23c9a6ad834348f8b83f3b6a5bca2c65 Author: Mathias Nyman Date: Wed Dec 11 16:20:07 2019 +0200 xhci: make sure interrupts are restored to correct state spin_unlock_irqrestore() might be called with stale flags after reading port status, possibly restoring interrupts to a incorrect state. If a usb2 port just finished resuming while the port status is read the spin lock will be temporary released and re-acquired in a separate function. The flags parameter is passed as value instead of a pointer, not updating flags properly before the final spin_unlock_irqrestore() is called. Cc: # v3.12+ Fixes: 8b3d45705e54 ("usb: Fix xHCI host issues on remote wakeup.") Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20191211142007.8847-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7ff11162808cc2ec66353fc012c58bb449c892c3 Author: Mathias Nyman Date: Wed Dec 11 16:20:06 2019 +0200 xhci: handle some XHCI_TRUST_TX_LENGTH quirks cases as default behaviour. xhci driver claims it needs XHCI_TRUST_TX_LENGTH quirk for both Broadcom/Cavium and a Renesas xHC controllers. The quirk was inteded for handling false "success" complete event for transfers that had data left untransferred. These transfers should complete with "short packet" events instead. In these two new cases the false "success" completion is reported after a "short packet" if the TD consists of several TRBs. xHCI specs 4.10.1.1.2 say remaining TRBs should report "short packet" as well after the first short packet in a TD, but this issue seems so common it doesn't make sense to add the quirk for all vendors. Turn these events into short packets automatically instead. This gets rid of the "The WARN Successful completion on short TX for slot 1 ep 1: needs XHCI_TRUST_TX_LENGTH quirk" warning in many cases. Cc: Reported-by: Eli Billauer Reported-by: Ard Biesheuvel Tested-by: Eli Billauer Tested-by: Ard Biesheuvel Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20191211142007.8847-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7c67cf6658cec70d8a43229f2ce74ca1443dc95e Author: Kai-Heng Feng Date: Wed Dec 11 16:20:05 2019 +0200 xhci: Increase STS_HALT timeout in xhci_suspend() I've recently observed failed xHCI suspend attempt on AMD Raven Ridge system: kernel: xhci_hcd 0000:04:00.4: WARN: xHC CMD_RUN timeout kernel: PM: suspend_common(): xhci_pci_suspend+0x0/0xd0 returns -110 kernel: PM: pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -110 kernel: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -110 kernel: PM: Device 0000:04:00.4 failed to suspend async: error -110 Similar to commit ac343366846a ("xhci: Increase STS_SAVE timeout in xhci_suspend()") we also need to increase the HALT timeout to make it be able to suspend again. Cc: # 5.2+ Fixes: f7fac17ca925 ("xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic()") Signed-off-by: Kai-Heng Feng Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20191211142007.8847-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f2c710f7dca8457e88b4ac9de2060f011254f9dd Author: Henry Lin Date: Wed Dec 11 16:20:04 2019 +0200 usb: xhci: only set D3hot for pci device Xhci driver cannot call pci_set_power_state() on non-pci xhci host controllers. For example, NVIDIA Tegra XHCI host controller which acts as platform device with XHCI_SPURIOUS_WAKEUP quirk set in some platform hits this issue during shutdown. Cc: Fixes: 638298dc66ea ("xhci: Fix spurious wakeups after S5 on Haswell") Signed-off-by: Henry Lin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20191211142007.8847-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 057d476fff778f1d3b9f861fdb5437ea1a3cfc99 Author: Mathias Nyman Date: Wed Dec 11 16:20:03 2019 +0200 xhci: fix USB3 device initiated resume race with roothub autosuspend A race in xhci USB3 remote wake handling may force device back to suspend after it initiated resume siganaling, causing a missed resume event or warm reset of device. When a USB3 link completes resume signaling and goes to enabled (UO) state a interrupt is issued and the interrupt handler will clear the bus_state->port_remote_wakeup resume flag, allowing bus suspend. If the USB3 roothub thread just finished reading port status before the interrupt, finding ports still in suspended (U3) state, but hasn't yet started suspending the hub, then the xhci interrupt handler will clear the flag that prevented roothub suspend and allow bus to suspend, forcing all port links back to suspended (U3) state. Example case: usb_runtime_suspend() # because all ports still show suspended U3 usb_suspend_both() hub_suspend(); # successful as hub->wakeup_bits not set yet ==> INTERRUPT xhci_irq() handle_port_status() clear bus_state->port_remote_wakeup usb_wakeup_notification() sets hub->wakeup_bits; kick_hub_wq() <== END INTERRUPT hcd_bus_suspend() xhci_bus_suspend() # success as port_remote_wakeup bits cleared Fix this by increasing roothub usage count during port resume to prevent roothub autosuspend, and by making sure bus_state->port_remote_wakeup flag is only cleared after resume completion is visible, i.e. after xhci roothub returned U0 or other non-U3 link state link on a get port status request. Issue rootcaused by Chiasheng Lee Cc: Cc: Lee, Hou-hsun Reported-by: Lee, Chiasheng Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20191211142007.8847-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ce91f1a43b37463f517155bdfbd525eb43adbd1a Author: Mika Westerberg Date: Wed Dec 11 16:20:02 2019 +0200 xhci: Fix memory leak in xhci_add_in_port() When xHCI is part of Alpine or Titan Ridge Thunderbolt controller and the xHCI device is hot-removed as a result of unplugging a dock for example, the driver leaks memory it allocates for xhci->usb3_rhub.psi and xhci->usb2_rhub.psi in xhci_add_in_port() as reported by kmemleak: unreferenced object 0xffff922c24ef42f0 (size 16): comm "kworker/u16:2", pid 178, jiffies 4294711640 (age 956.620s) hex dump (first 16 bytes): 21 00 0c 00 12 00 dc 05 23 00 e0 01 00 00 00 00 !.......#....... backtrace: [<000000007ac80914>] xhci_mem_init+0xcf8/0xeb7 [<0000000001b6d775>] xhci_init+0x7c/0x160 [<00000000db443fe3>] xhci_gen_setup+0x214/0x340 [<00000000fdffd320>] xhci_pci_setup+0x48/0x110 [<00000000541e1e03>] usb_add_hcd.cold+0x265/0x747 [<00000000ca47a56b>] usb_hcd_pci_probe+0x219/0x3b4 [<0000000021043861>] xhci_pci_probe+0x24/0x1c0 [<00000000b9231f25>] local_pci_probe+0x3d/0x70 [<000000006385c9d7>] pci_device_probe+0xd0/0x150 [<0000000070241068>] really_probe+0xf5/0x3c0 [<0000000061f35c0a>] driver_probe_device+0x58/0x100 [<000000009da11198>] bus_for_each_drv+0x79/0xc0 [<000000009ce45f69>] __device_attach+0xda/0x160 [<00000000df201aaf>] pci_bus_add_device+0x46/0x70 [<0000000088a1bc48>] pci_bus_add_devices+0x27/0x60 [<00000000ad9ee708>] pci_bus_add_devices+0x52/0x60 unreferenced object 0xffff922c24ef3318 (size 8): comm "kworker/u16:2", pid 178, jiffies 4294711640 (age 956.620s) hex dump (first 8 bytes): 34 01 05 00 35 41 0a 00 4...5A.. backtrace: [<000000007ac80914>] xhci_mem_init+0xcf8/0xeb7 [<0000000001b6d775>] xhci_init+0x7c/0x160 [<00000000db443fe3>] xhci_gen_setup+0x214/0x340 [<00000000fdffd320>] xhci_pci_setup+0x48/0x110 [<00000000541e1e03>] usb_add_hcd.cold+0x265/0x747 [<00000000ca47a56b>] usb_hcd_pci_probe+0x219/0x3b4 [<0000000021043861>] xhci_pci_probe+0x24/0x1c0 [<00000000b9231f25>] local_pci_probe+0x3d/0x70 [<000000006385c9d7>] pci_device_probe+0xd0/0x150 [<0000000070241068>] really_probe+0xf5/0x3c0 [<0000000061f35c0a>] driver_probe_device+0x58/0x100 [<000000009da11198>] bus_for_each_drv+0x79/0xc0 [<000000009ce45f69>] __device_attach+0xda/0x160 [<00000000df201aaf>] pci_bus_add_device+0x46/0x70 [<0000000088a1bc48>] pci_bus_add_devices+0x27/0x60 [<00000000ad9ee708>] pci_bus_add_devices+0x52/0x60 Fix this by calling kfree() for the both psi objects in xhci_mem_cleanup(). Cc: # 4.4+ Fixes: 47189098f8be ("xhci: parse xhci protocol speed ID list for usb 3.1 usage") Signed-off-by: Mika Westerberg Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20191211142007.8847-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 85862213e75eec2cbc2eae8adb47f7e41918edbb Merge: f8c63edfd789 e5b5da96da50 Author: Greg Kroah-Hartman Date: Wed Dec 11 15:28:37 2019 +0100 Merge tag 'fixes-for-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: USB: fixes for v5.5-rc2 Only four patches here this time around. Three of them are on dwc3 fixing some small bugs related to our 'started' flag. None are major fixes but they're important nevertheless. * tag 'fixes-for-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: gadget: fix wrong endpoint desc usb: dwc3: ep0: Clear started flag on completion usb: dwc3: gadget: Clear started flag for non-IOC usb: dwc3: gadget: Fix logical condition commit 750bde2fd4ffacc297473c36d6fdb29c395b06aa Author: Chris Wilson Date: Thu Nov 21 07:10:41 2019 +0000 drm/i915: Serialise with remote retirement Since retirement may be running in a worker on another CPU, it may be skipped in the local intel_gt_wait_for_idle(). To ensure the state is consistent for our sanity checks upon load, serialise with the remote retirer by waiting on the timeline->mutex. Outside of this use case, e.g. on suspend or module unload, we expect the slack to be picked up by intel_gt_pm_wait_for_idle() and so prefer to put the special case serialisation with retirement in its single user, for now at least. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191121071044.97798-2-chris@chris-wilson.co.uk (cherry picked from commit 2d0fb251360ab7eccbffd99f6933a2a4de678d52) Fixes: 093b92287363 ("drm/i915: Split i915_active.mutex into an irq-safe spinlock for the rbtree") Closes: https://gitlab.freedesktop.org/drm/intel/issues/754 Signed-off-by: Joonas Lahtinen commit 8ec321e96e056de84022c032ffea253431a83c3c Author: Alan Stern Date: Tue Dec 10 16:26:11 2019 -0500 HID: Fix slab-out-of-bounds read in hid_field_extract The syzbot fuzzer found a slab-out-of-bounds bug in the HID report handler. The bug was caused by a report descriptor which included a field with size 12 bits and count 4899, for a total size of 7349 bytes. The usbhid driver uses at most a single-page 4-KB buffer for reports. In the test there wasn't any problem about overflowing the buffer, since only one byte was received from the device. Rather, the bug occurred when the HID core tried to extract the data from the report fields, which caused it to try reading data beyond the end of the allocated buffer. This patch fixes the problem by rejecting any report whose total length exceeds the HID_MAX_BUFFER_SIZE limit (minus one byte to allow for a possible report index). In theory a device could have a report longer than that, but if there was such a thing we wouldn't handle it correctly anyway. Reported-and-tested-by: syzbot+09ef48aa58261464b621@syzkaller.appspotmail.com Signed-off-by: Alan Stern CC: Signed-off-by: Jiri Kosina commit 63b9b80e9f5b2c463d98d6e550e0d0e3ace66033 Author: Michael S. Tsirkin Date: Tue Nov 19 05:25:24 2019 -0500 virtio_balloon: divide/multiply instead of shifts We managed to get confused about the shift direction at least once. Let's switch to division/multiplcation instead. Add a number of pages macro for this purpose. We still keep the order macro around too since this is what alloc/free pages want. Signed-off-by: Michael S. Tsirkin Reviewed-by: Wei Wang Reviewed-by: David Hildenbrand commit 2a946fa1c8bc26df03bacebb6811b656d5e0cf1c Author: Michael S. Tsirkin Date: Tue Nov 19 05:21:47 2019 -0500 virtio_balloon: name cleanups free_page_order is a confusing name. It's not a page order actually, it's the order of the block of memory we are hinting. Rename to hint_block_order. Also, rename SIZE to BYTES to make it clear it's the block size in bytes. Signed-off-by: Michael S. Tsirkin Reviewed-by: Wei Wang Reviewed-by: David Hildenbrand commit 63341ab03706e11a31e3dd8ccc0fbc9beaf723f0 Author: David Hildenbrand Date: Wed Dec 11 12:11:52 2019 +0100 virtio-balloon: fix managed page counts when migrating pages between zones In case we have to migrate a ballon page to a newpage of another zone, the managed page count of both zones is wrong. Paired with memory offlining (which will adjust the managed page count), we can trigger kernel crashes and all kinds of different symptoms. One way to reproduce: 1. Start a QEMU guest with 4GB, no NUMA 2. Hotplug a 1GB DIMM and online the memory to ZONE_NORMAL 3. Inflate the balloon to 1GB 4. Unplug the DIMM (be quick, otherwise unmovable data ends up on it) 5. Observe /proc/zoneinfo Node 0, zone Normal pages free 16810 min 24848885473806 low 18471592959183339 high 36918337032892872 spanned 262144 present 262144 managed 18446744073709533486 6. Do anything that requires some memory (e.g., inflate the balloon some more). The OOM goes crazy and the system crashes [ 238.324946] Out of memory: Killed process 537 (login) total-vm:27584kB, anon-rss:860kB, file-rss:0kB, shmem-rss:00 [ 238.338585] systemd invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0 [ 238.339420] CPU: 0 PID: 1 Comm: systemd Tainted: G D W 5.4.0-next-20191204+ #75 [ 238.340139] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu4 [ 238.341121] Call Trace: [ 238.341337] dump_stack+0x8f/0xd0 [ 238.341630] dump_header+0x61/0x5ea [ 238.341942] oom_kill_process.cold+0xb/0x10 [ 238.342299] out_of_memory+0x24d/0x5a0 [ 238.342625] __alloc_pages_slowpath+0xd12/0x1020 [ 238.343024] __alloc_pages_nodemask+0x391/0x410 [ 238.343407] pagecache_get_page+0xc3/0x3a0 [ 238.343757] filemap_fault+0x804/0xc30 [ 238.344083] ? ext4_filemap_fault+0x28/0x42 [ 238.344444] ext4_filemap_fault+0x30/0x42 [ 238.344789] __do_fault+0x37/0x1a0 [ 238.345087] __handle_mm_fault+0x104d/0x1ab0 [ 238.345450] handle_mm_fault+0x169/0x360 [ 238.345790] do_user_addr_fault+0x20d/0x490 [ 238.346154] do_page_fault+0x31/0x210 [ 238.346468] async_page_fault+0x43/0x50 [ 238.346797] RIP: 0033:0x7f47eba4197e [ 238.347110] Code: Bad RIP value. [ 238.347387] RSP: 002b:00007ffd7c0c1890 EFLAGS: 00010293 [ 238.347834] RAX: 0000000000000002 RBX: 000055d196a20a20 RCX: 00007f47eba4197e [ 238.348437] RDX: 0000000000000033 RSI: 00007ffd7c0c18c0 RDI: 0000000000000004 [ 238.349047] RBP: 00007ffd7c0c1c20 R08: 0000000000000000 R09: 0000000000000033 [ 238.349660] R10: 00000000ffffffff R11: 0000000000000293 R12: 0000000000000001 [ 238.350261] R13: ffffffffffffffff R14: 0000000000000000 R15: 00007ffd7c0c18c0 [ 238.350878] Mem-Info: [ 238.351085] active_anon:3121 inactive_anon:51 isolated_anon:0 [ 238.351085] active_file:12 inactive_file:7 isolated_file:0 [ 238.351085] unevictable:0 dirty:0 writeback:0 unstable:0 [ 238.351085] slab_reclaimable:5565 slab_unreclaimable:10170 [ 238.351085] mapped:3 shmem:111 pagetables:155 bounce:0 [ 238.351085] free:720717 free_pcp:2 free_cma:0 [ 238.353757] Node 0 active_anon:12484kB inactive_anon:204kB active_file:48kB inactive_file:28kB unevictable:0kB iss [ 238.355979] Node 0 DMA free:11556kB min:36kB low:48kB high:60kB reserved_highatomic:0KB active_anon:152kB inactivB [ 238.358345] lowmem_reserve[]: 0 2955 2884 2884 2884 [ 238.358761] Node 0 DMA32 free:2677864kB min:7004kB low:10028kB high:13052kB reserved_highatomic:0KB active_anon:0B [ 238.361202] lowmem_reserve[]: 0 0 72057594037927865 72057594037927865 72057594037927865 [ 238.361888] Node 0 Normal free:193448kB min:99395541895224kB low:73886371836733356kB high:147673348131571488kB reB [ 238.364765] lowmem_reserve[]: 0 0 0 0 0 [ 238.365101] Node 0 DMA: 7*4kB (U) 5*8kB (UE) 6*16kB (UME) 2*32kB (UM) 1*64kB (U) 2*128kB (UE) 3*256kB (UME) 2*512B [ 238.366379] Node 0 DMA32: 0*4kB 1*8kB (U) 2*16kB (UM) 2*32kB (UM) 2*64kB (UM) 1*128kB (U) 1*256kB (U) 1*512kB (U)B [ 238.367654] Node 0 Normal: 1985*4kB (UME) 1321*8kB (UME) 844*16kB (UME) 524*32kB (UME) 300*64kB (UME) 138*128kB (B [ 238.369184] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB [ 238.369915] 130 total pagecache pages [ 238.370241] 0 pages in swap cache [ 238.370533] Swap cache stats: add 0, delete 0, find 0/0 [ 238.370981] Free swap = 0kB [ 238.371239] Total swap = 0kB [ 238.371488] 1048445 pages RAM [ 238.371756] 0 pages HighMem/MovableOnly [ 238.372090] 306992 pages reserved [ 238.372376] 0 pages cma reserved [ 238.372661] 0 pages hwpoisoned In another instance (older kernel), I was able to observe this (negative page count :/): [ 180.896971] Offlined Pages 32768 [ 182.667462] Offlined Pages 32768 [ 184.408117] Offlined Pages 32768 [ 186.026321] Offlined Pages 32768 [ 187.684861] Offlined Pages 32768 [ 189.227013] Offlined Pages 32768 [ 190.830303] Offlined Pages 32768 [ 190.833071] Built 1 zonelists, mobility grouping on. Total pages: -36920272750453009 In another instance (older kernel), I was no longer able to start any process: [root@vm ~]# [ 214.348068] Offlined Pages 32768 [ 215.973009] Offlined Pages 32768 cat /proc/meminfo -bash: fork: Cannot allocate memory [root@vm ~]# cat /proc/meminfo -bash: fork: Cannot allocate memory Fix it by properly adjusting the managed page count when migrating if the zone changed. The managed page count of the zones now looks after unplug of the DIMM (and after deflating the balloon) just like before inflating the balloon (and plugging+onlining the DIMM). We'll temporarily modify the totalram page count. If this ever becomes a problem, we can fine tune by providing helpers that don't touch the totalram pages (e.g., adjust_zone_managed_page_count()). Please note that fixing up the managed page count is only necessary when we adjusted the managed page count when inflating - only if we don't have VIRTIO_BALLOON_F_DEFLATE_ON_OOM. With that feature, the managed page count is not touched when inflating/deflating. Reported-by: Yumei Huang Fixes: 3dcc0571cd64 ("mm: correctly update zone->managed_pages") Cc: # v3.11+ Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Jiang Liu Cc: Andrew Morton Cc: Igor Mammedov Cc: virtualization@lists.linux-foundation.org Signed-off-by: David Hildenbrand Signed-off-by: Michael S. Tsirkin commit b444268801a29b10c9edea037efcf4c7c4db9283 Author: Arnaldo Carvalho de Melo Date: Wed Dec 11 10:06:45 2019 -0300 tools headers kvm: Sync linux/kvm.h with the kernel sources To pick up the changes from: 22945688acd4 ("KVM: PPC: Book3S HV: Support reset of secure guest") No tools changes are caused by this, as the only defines so far used from these files are for syscall arg pretty printing are: $ grep KVM tools/perf/trace/beauty/*.sh tools/perf/trace/beauty/kvm_ioctl.sh:regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*' $ This addresses these tools/perf build warnings: 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 Cc: Adrian Hunter Cc: Bharata B Rao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Link: https://lkml.kernel.org/n/tip-bdbe4x02johhul05a03o27zj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 761bfc33dd7504de951aa7b9db27a3cc5df1fde6 Merge: 0f60a0bcc1b9 6794862a16ef Author: Arnaldo Carvalho de Melo Date: Wed Dec 11 09:58:16 2019 -0300 Merge remote-tracking branch 'torvalds/master' into perf/urgent To pick up BPF fixes to allow a clean 'make -C tools/perf build-test': 7c3977d1e804 libbpf: Fix sym->st_value print on 32-bit arches 1fd450f99272 libbpf: Fix up generation of bpf_helper_defs.h Signed-off-by: Arnaldo Carvalho de Melo commit 5b79bcdf03628a3a9ee04d9cd5fabcf61a8e20be Author: Toke Høiland-Jørgensen Date: Tue Dec 10 19:14:12 2019 +0100 bpftool: Don't crash on missing jited insns or ksyms When the kptr_restrict sysctl is set, the kernel can fail to return jited_ksyms or jited_prog_insns, but still have positive values in nr_jited_ksyms and jited_prog_len. This causes bpftool to crash when trying to dump the program because it only checks the len fields not the actual pointers to the instructions and ksyms. Fix this by adding the missing checks. Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool") Fixes: f84192ee00b7 ("tools: bpftool: resolve calls without using imm field") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191210181412.151226-1-toke@redhat.com commit 4c80c7bc583a87ded5f61906f81256b57c795806 Author: Arnd Bergmann Date: Tue Dec 10 21:35:46 2019 +0100 bpf: Fix build in minimal configurations, again Building with -Werror showed another failure: kernel/bpf/btf.c: In function 'btf_get_prog_ctx_type.isra.31': kernel/bpf/btf.c:3508:63: error: array subscript 0 is above array bounds of 'u8[0]' {aka 'unsigned char[0]'} [-Werror=array-bounds] ctx_type = btf_type_member(conv_struct) + bpf_ctx_convert_map[prog_type] * 2; I don't actually understand why the array is empty, but a similar fix has addressed a related problem, so I suppose we can do the same thing here. Fixes: ce27709b8162 ("bpf: Fix build in minimal configurations") Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191210203553.2941035-1-arnd@arndb.de commit e49e6f6db04e915dccb494ae10fa14888fea6f89 Author: Paul Chaignon Date: Mon Dec 9 19:52:52 2019 +0100 bpf, mips: Limit to 33 tail calls All BPF JIT compilers except RISC-V's and MIPS' enforce a 33-tail calls limit at runtime. In addition, a test was recently added, in tailcalls2, to check this limit. This patch updates the tail call limit in MIPS' JIT compiler to allow 33 tail calls. Fixes: b6bd53f9c4e8 ("MIPS: Add missing file for eBPF JIT.") Reported-by: Mahshid Khezri Signed-off-by: Paul Chaignon Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/b8eb2caac1c25453c539248e56ca22f74b5316af.1575916815.git.paul.chaignon@gmail.com commit 96bc4432f5ade1045521f3b247f516b1478166bd Author: Paul Chaignon Date: Mon Dec 9 19:52:07 2019 +0100 bpf, riscv: Limit to 33 tail calls All BPF JIT compilers except RISC-V's and MIPS' enforce a 33-tail calls limit at runtime. In addition, a test was recently added, in tailcalls2, to check this limit. This patch updates the tail call limit in RISC-V's JIT compiler to allow 33 tail calls. I tested it using the above selftest on an emulated RISCV64. Fixes: 2353ecc6f91f ("bpf, riscv: add BPF JIT for RV64G") Reported-by: Mahshid Khezri Signed-off-by: Paul Chaignon Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/966fe384383bf23a0ee1efe8d7291c78a3fb832b.1575916815.git.paul.chaignon@gmail.com commit 653997eeecef95c3ead4fba1b2d27e6a5854d6cd Author: Ran Bi Date: Wed Dec 11 17:43:54 2019 +0800 rtc: mt6397: fix alarm register overwrite Alarm registers high byte was reserved for other functions. This add mask in alarm registers operation functions. This also fix error condition in interrupt handler. Fixes: fc2979118f3f ("rtc: mediatek: Add MT6397 RTC driver") Signed-off-by: Ran Bi Signed-off-by: Hsin-Hsiung Wang Link: https://lore.kernel.org/r/1576057435-3561-6-git-send-email-hsin-hsiung.wang@mediatek.com Signed-off-by: Alexandre Belloni commit a40c94be2336f3002563c9ae16572143ae3422e2 Author: Paul Cercueil Date: Tue Dec 10 17:55:45 2019 +0100 dmaengine: dma-jz4780: Also break descriptor chains on JZ4725B It turns out that the JZ4725B displays the same buggy behaviour as the JZ4740 that was described in commit f4c255f1a747 ("dmaengine: dma-jz4780: Break descriptor chains on JZ4740"). Work around it by using the same workaround previously used for the JZ4740. Fixes commit f4c255f1a747 ("dmaengine: dma-jz4780: Break descriptor chains on JZ4740") Cc: Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20191210165545.59690-1-paul@crapouillou.net Signed-off-by: Vinod Koul commit 6f7c41374b62fd80bbd8aae3536c43688c54d95e Author: Tetsuo Handa Date: Mon Nov 25 10:46:51 2019 +0900 tomoyo: Don't use nifty names on sockets. syzbot is reporting that use of SOCKET_I()->sk from open() can result in use after free problem [1], for socket's inode is still reachable via /proc/pid/fd/n despite destruction of SOCKET_I()->sk already completed. At first I thought that this race condition applies to only open/getattr permission checks. But James Morris has pointed out that there are more permission checks where this race condition applies to. Thus, get rid of tomoyo_get_socket_name() instead of conditionally bypassing permission checks on sockets. As a side effect of this patch, "socket:[family=\$:type=\$:protocol=\$]" in the policy files has to be rewritten to "socket:[\$]". [1] https://syzkaller.appspot.com/bug?id=73d590010454403d55164cca23bd0565b1eb3b74 Signed-off-by: Tetsuo Handa Reported-by: syzbot Reported-by: James Morris commit 53a256a9b925b47c7e67fc1f16ca41561a7b877c Author: Lukas Wunner Date: Thu Dec 5 12:54:49 2019 +0100 dmaengine: Fix access to uninitialized dma_slave_caps dmaengine_desc_set_reuse() allocates a struct dma_slave_caps on the stack, populates it using dma_get_slave_caps() and then accesses one of its members. However dma_get_slave_caps() may fail and this isn't accounted for, leading to a legitimate warning of gcc-4.9 (but not newer versions): In file included from drivers/spi/spi-bcm2835.c:19:0: drivers/spi/spi-bcm2835.c: In function 'dmaengine_desc_set_reuse': >> include/linux/dmaengine.h:1370:10: warning: 'caps.descriptor_reuse' is used uninitialized in this function [-Wuninitialized] if (caps.descriptor_reuse) { Fix it, thereby also silencing the gcc-4.9 warning. The issue has been present for 4 years but surfaces only now that the first caller of dmaengine_desc_set_reuse() has been added in spi-bcm2835.c. Another user of reusable DMA descriptors has existed for a while in pxa_camera.c, but it sets the DMA_CTRL_REUSE flag directly instead of calling dmaengine_desc_set_reuse(). Nevertheless, tag this commit for stable in case there are out-of-tree users. Fixes: 272420214d26 ("dmaengine: Add DMA_CTRL_REUSE") Reported-by: kbuild test robot Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v4.3+ Link: https://lore.kernel.org/r/ca92998ccc054b4f2bfd60ef3adbab2913171eac.1575546234.git.lukas@wunner.de Signed-off-by: Vinod Koul commit 2688302bf1924ebccab2a3b298dd50b4f744d48d Author: Andy Shevchenko Date: Mon Dec 9 14:35:44 2019 +0200 gpio: pca953x: Switch to bitops in IRQ callbacks Since we have driver converted to use bitmap API we must use traditional bit operations (set_bit(), clear_bit(), etc.) against it. Currently IRQ callbacks are missed in the conversion and thus broken. Let's fix it right here right now. Fixes: 35d13d94893f ("gpio: pca953x: convert to use bitmap API") Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 256efaea1fdc4e38970489197409a26125ee0aaa Author: Russell King Date: Sat Dec 7 16:20:18 2019 +0000 gpiolib: fix up emulated open drain outputs gpiolib has a corner case with open drain outputs that are emulated. When such outputs are outputting a logic 1, emulation will set the hardware to input mode, which will cause gpiod_get_direction() to report that it is in input mode. This is different from the behaviour with a true open-drain output. Unify the semantics here. Cc: Suggested-by: Linus Walleij Signed-off-by: Russell King Signed-off-by: Bartosz Golaszewski commit 44fe5cb32c7599a4059931a98794e0418619aa96 Author: Andy Shevchenko Date: Wed Dec 4 14:31:35 2019 +0200 MAINTAINERS: Append missed file to the database When gpiolib.h internal header had been split to few, the commit 77cb907abe6c ("gpiolib: acpi: Split ACPI stuff to gpiolib-acpi.h") in particular missed the MAINTAINERS database update. Do it here. Fixes: 77cb907abe6c ("gpiolib: acpi: Split ACPI stuff to gpiolib-acpi.h") Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Bartosz Golaszewski commit 961f8209c8d5ef5d33da42e6656d7c8179899da0 Author: Michael Walle Date: Tue Dec 10 00:43:46 2019 +0100 arm64: dts: ls1028a: fix typo in TMU calibration data The temperature sensor may jump backwards because there is a wrong calibration value. Both values have to be monotonically increasing. Fix it. This was tested on a custom board. Fixes: 571cebfe8e2b ("arm64: dts: ls1028a: Add Thermal Monitor Unit node") Signed-off-by: Michael Walle Acked-by: Tang Yuantian Signed-off-by: Shawn Guo commit 9cc7a18bcbd47e82960a059127497ab09c4abd05 Author: Arnd Bergmann Date: Tue Dec 10 20:54:01 2019 +0100 gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove When built into the kernel, the driver causes a link problem: `iproc_gpio_remove' referenced in section `.data' of drivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' of drivers/gpio/gpio-xgs-iproc.o Remove the incorrect annotation. Fixes: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver") Signed-off-by: Arnd Bergmann Reviewed-by: Chris Packham Signed-off-by: Bartosz Golaszewski commit 11e299de3aced4ea23a9fb1fef6c983c8d516302 Author: Arnd Bergmann Date: Tue Dec 10 21:28:31 2019 +0100 gpio: aspeed: avoid return type warning gcc has a hard time tracking whether BUG_ON(1) ends execution or not: drivers/gpio/gpio-aspeed-sgpio.c: In function 'bank_reg': drivers/gpio/gpio-aspeed-sgpio.c:112:1: error: control reaches end of non-void function [-Werror=return-type] Use the simpler BUG() that gcc knows cannot continue. Fixes: f8b410e3695a ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile") Signed-off-by: Arnd Bergmann Acked-by: Andrew Jeffery Signed-off-by: Bartosz Golaszewski commit bc7bc688366a4f2544699e40cce45393b7f24408 Author: Kent Gibson Date: Wed Dec 11 08:46:31 2019 +0800 gpio: mockup: Fix usage of new GPIO_LINE_DIRECTION Restore the external behavior of gpio-mockup to what it was prior to the change to using GPIO_LINE_DIRECTION. Fixes: e42615ec233b ("gpio: Use new GPIO_LINE_DIRECTION") Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 6d44694dc7c72e82e0f45d114a9c9e3f3e2aeab7 Author: Zhenyu Wang Date: Mon Dec 2 15:01:08 2019 +0800 drm/i915/gvt: use vgpu lock for active state setting Need to align with deactivate, should only use vgpu's lock for active state setting instead of gvt lock. Fixes: f25a49ab8ab9 ("drm/i915/gvt: Use vgpu_lock to protect per vgpu access") Cc: Colin Xu Reviewed-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20191202070109.73924-2-zhenyuw@linux.intel.com commit f8c63edfd78905320e86b6b2be2b7a5ac768fa4e Author: Fredrik Noring Date: Tue Dec 10 18:29:05 2019 +0100 USB: Fix incorrect DMA allocations for local memory pool drivers Fix commit 7b81cb6bddd2 ("usb: add a HCD_DMA flag instead of guestimating DMA capabilities") where local memory USB drivers erroneously allocate DMA memory instead of pool memory, causing OHCI Unrecoverable Error, disabled HC died; cleaning up The order between hcd_uses_dma() and hcd->localmem_pool is now arranged as in hcd_buffer_alloc() and hcd_buffer_free(), with the test for hcd->localmem_pool placed first. As an alternative, one might consider adjusting hcd_uses_dma() with static inline bool hcd_uses_dma(struct usb_hcd *hcd) { - return IS_ENABLED(CONFIG_HAS_DMA) && (hcd->driver->flags & HCD_DMA); + return IS_ENABLED(CONFIG_HAS_DMA) && + (hcd->driver->flags & HCD_DMA) && + (hcd->localmem_pool == NULL); } One can also consider unsetting HCD_DMA for local memory pool drivers. Fixes: 7b81cb6bddd2 ("usb: add a HCD_DMA flag instead of guestimating DMA capabilities") Cc: stable Signed-off-by: Fredrik Noring Link: https://lore.kernel.org/r/20191210172905.GA52526@sx9 Signed-off-by: Greg Kroah-Hartman commit 8c9312a925ad859daefd0f443ef3b6dc7157d881 Author: Wolfram Sang Date: Wed Nov 6 22:21:01 2019 +0100 i2c: add helper to check if a client has a driver attached As a preparation for an API conversion, factor out something frequently used in the media subsystem. As an improvement, it bails out on both, NULL and ERRPTR to handle the old and new API. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit c3a5fd15ed0c1494435e4e35fbee734ae46b5073 Author: Peng Fan Date: Mon Dec 9 08:19:55 2019 +0000 clk: imx: pll14xx: fix clk_pll14xx_wait_lock The usage of readl_poll_timeout is wrong, the 3rd parameter(cond) should be "val & LOCK_STATUS" not "val & LOCK_TIMEOUT_US", It is not check whether the pll locked, LOCK_STATUS reflects the mask, not LOCK_TIMEOUT_US. Fixes: 8646d4dcc7fb ("clk: imx: Add PLLs driver for imx8mm soc") Cc: Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 125ad46f3861520fdebd15c38e4bc412a7add01c Author: Christoph Niedermaier Date: Thu Dec 5 09:38:51 2019 +0000 ARM: imx: Correct ocotp id for serial number support of i.MX6ULL/ULZ SoCs After the commit 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs") the kernel doesn't start on i.MX6ULL/ULZ SoC. Tested on next-20191205. For i.MX6ULL/ULZ the variable "ocotp_compat" is set to "fsl,imx6ul-ocotp", but with commit ffbc34bf0e9c ("nvmem: imx-ocotp: Implement i.MX6ULL/ULZ support") and commit f243bc821ee3 ("ARM: dts: imx6ull: Fix i.MX6ULL/ULZ ocotp compatible") the value "fsl,imx6ull-ocotp" is already defined and set in device tree... By setting "ocotp_compat" to "fsl,imx6ull-ocotp" the kernel does boot. Fixes: 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs") Signed-off-by: Christoph Niedermaier Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 346da4d2c7ea39de65487b249aaa4733317a40ec Author: Flavio Leitner Date: Thu Dec 5 03:03:44 2019 +0100 sched/cputime, proc/stat: Fix incorrect guest nice cpustat value The value being used for guest_nice should be CPUTIME_GUEST_NICE and not CPUTIME_USER. Fixes: 26dae145a76c ("procfs: Use all-in-one vtime aware kcpustat accessor") Signed-off-by: Flavio Leitner Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20191205020344.14940-1-frederic@kernel.org Signed-off-by: Ingo Molnar commit 5815bdfd7f54739be9abed1301d55f5e74d7ad1f Author: Hui Wang Date: Wed Dec 11 13:13:21 2019 +0800 ALSA: hda/realtek - Line-out jack doesn't work on a Dell AIO After applying the fixup ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, the Line-out jack works well. And instead of adding a new set of pin definition in the pin_fixup_tbl, we put a more generic matching entry in the fallback_pin_fixup_tbl. Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20191211051321.5883-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 24dee0c7478d1a1e00abdf5625b7f921467325dc Author: Netanel Belgazal Date: Tue Dec 10 11:27:44 2019 +0000 net: ena: fix napi handler misbehavior when the napi budget is zero In netpoll the napi handler could be called with budget equal to zero. Current ENA napi handler doesn't take that into consideration. The napi handler handles Rx packets in a do-while loop. Currently, the budget check happens only after decrementing the budget, therefore the napi handler, in rare cases, could run over MAX_INT packets. In addition to that, this moves all budget related variables to int calculation and stop mixing u32 to avoid ambiguity Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller commit f1ce0a155723cc41d814b350b0e01998f82f7ec1 Merge: ac397934b39f 31e4ccc99eda Author: David S. Miller Date: Tue Dec 10 17:45:04 2019 -0800 Merge branch 'tipc-fix-some-issues' Tuong Lien says: ==================== tipc: fix some issues This series consists of some bug-fixes for TIPC. ==================== Signed-off-by: David S. Miller commit 31e4ccc99eda8a5a7e6902c98bee6e78ffd3edb9 Author: Tuong Lien Date: Tue Dec 10 15:21:05 2019 +0700 tipc: fix use-after-free in tipc_disc_rcv() In the function 'tipc_disc_rcv()', the 'msg_peer_net_hash()' is called to read the header data field but after the message skb has been freed, that might result in a garbage value... This commit fixes it by defining a new local variable to store the data first, just like the other header fields' handling. Fixes: f73b12812a3d ("tipc: improve throughput between nodes in netns") Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit abc9b4e0549b93fdaff56e9532bc49a2d7b04955 Author: Tuong Lien Date: Tue Dec 10 15:21:04 2019 +0700 tipc: fix retrans failure due to wrong destination When a user message is sent, TIPC will check if the socket has faced a congestion at link layer. If that happens, it will make a sleep to wait for the congestion to disappear. This leaves a gap for other users to take over the socket (e.g. multi threads) since the socket is released as well. Also, in case of connectionless (e.g. SOCK_RDM), user is free to send messages to various destinations (e.g. via 'sendto()'), then the socket's preformatted header has to be updated correspondingly prior to the actual payload message building. Unfortunately, the latter action is done before the first action which causes a condition issue that the destination of a certain message can be modified incorrectly in the middle, leading to wrong destination when that message is built. Consequently, when the message is sent to the link layer, it gets stuck there forever because the peer node will simply reject it. After a number of retransmission attempts, the link is eventually taken down and the retransmission failure is reported. This commit fixes the problem by rearranging the order of actions to prevent the race condition from occurring, so the message building is 'atomic' and its header will not be modified by anyone. Fixes: 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit dca4a17d24ee9d878836ce5eb8dc25be1ffa5729 Author: Tuong Lien Date: Tue Dec 10 15:21:03 2019 +0700 tipc: fix potential hanging after b/rcast changing In commit c55c8edafa91 ("tipc: smooth change between replicast and broadcast"), we allow instant switching between replicast and broadcast by sending a dummy 'SYN' packet on the last used link to synchronize packets on the links. The 'SYN' message is an object of link congestion also, so if that happens, a 'SOCK_WAKEUP' will be scheduled to be sent back to the socket... However, in that commit, we simply use the same socket 'cong_link_cnt' counter for both the 'SYN' & normal payload message sending. Therefore, if both the replicast & broadcast links are congested, the counter will be not updated correctly but overwritten by the latter congestion. Later on, when the 'SOCK_WAKEUP' messages are processed, the counter is reduced one by one and eventually overflowed. Consequently, further activities on the socket will only wait for the false congestion signal to disappear but never been met. Because sending the 'SYN' message is vital for the mechanism, it should be done anyway. This commit fixes the issue by marking the message with an error code e.g. 'TIPC_ERR_NO_PORT', so its sending should not face a link congestion, there is no need to touch the socket 'cong_link_cnt' either. In addition, in the event of any error (e.g. -ENOBUFS), we will purge the entire payload message queue and make a return immediately. Fixes: c55c8edafa91 ("tipc: smooth change between replicast and broadcast") Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit d5162f341e9625d00a275d5cbe55432e6627c3bf Author: Tuong Lien Date: Tue Dec 10 15:21:02 2019 +0700 tipc: fix name table rbtree issues The current rbtree for service ranges in the name table is built based on the 'lower' & 'upper' range values resulting in a flaw in the rbtree searching. Some issues have been observed in case of range overlapping: Case #1: unable to withdraw a name entry: After some name services are bound, all of them are withdrawn by user but one remains in the name table forever. This corrupts the table and that service becomes dummy i.e. no real port. E.g. / {22, 22} / / ---> {10, 50} / \ / \ {10, 30} {20, 60} The node {10, 30} cannot be removed since the rbtree searching stops at the node's ancestor i.e. {10, 50}, so starting from it will never reach the finding node. Case #2: failed to send data in some cases: E.g. Two service ranges: {20, 60}, {10, 50} are bound. The rbtree for this service will be one of the two cases below depending on the order of the bindings: {20, 60} {10, 50} <-- / \ / \ / \ / \ {10, 50} NIL <-- NIL {20, 60} (a) (b) Now, try to send some data to service {30}, there will be two results: (a): Failed, no route to host. (b): Ok. The reason is that the rbtree searching will stop at the pointing node as shown above. Case #3: Same as case #2b above but if the data sending's scope is local and the {10, 50} is published by a peer node, then it will result in 'no route to host' even though the other {20, 60} is for example on the local node which should be able to get the data. The issues are actually due to the way we built the rbtree. This commit fixes it by introducing an additional field to each node - named 'max', which is the largest 'upper' of that node subtree. The 'max' value for each subtrees will be propagated correctly whenever a node is inserted/ removed or the tree is rebalanced by the augmented rbtree callbacks. By this way, we can change the rbtree searching appoarch to solve the issues above. Another benefit from this is that we can now improve the searching for a next range matching e.g. in case of multicast, so get rid of the unneeded looping over all nodes in the tree. Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit ac397934b39f93cf6340b5a10aa3426b8242efab Merge: 868afbaca1e2 7e334fc8003c Author: David S. Miller Date: Tue Dec 10 17:37:14 2019 -0800 Merge branch 'bnxt_en-Error-recovery-fixes' Michael Chan says: ==================== bnxt_en: Error recovery fixes. This patch series contains fixes mostly for the error recovery feature and related areas. Please queue the series for -stable also. Thanks. ==================== Signed-off-by: David S. Miller commit 7e334fc8003c7a38372cc98e7be6082670a47d29 Author: Vasundhara Volam Date: Tue Dec 10 02:49:13 2019 -0500 bnxt_en: Add missing devlink health reporters for VFs. The VF driver also needs to create the health reporters since VFs are also involved in firmware reset and recovery. Modify bnxt_dl_register() and bnxt_dl_unregister() so that they can be called by the VFs to register/unregister devlink. Only the PF will register the devlink parameters. With devlink registered, we can now create the health reporters on the VFs. Fixes: 6763c779c2d8 ("bnxt_en: Add new FW devlink_health_reporter") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 937f188c1f4f89b3fa93ba31fc8587dc1fb14a22 Author: Vasundhara Volam Date: Tue Dec 10 02:49:12 2019 -0500 bnxt_en: Fix the logic that creates the health reporters. Fix the logic to properly check the fw capabilities and create the devlink health reporters only when needed. The current code creates the reporters unconditionally as long as bp->fw_health is valid, and that's not correct. Call bnxt_dl_fw_reporters_create() directly from the init and reset code path instead of from bnxt_dl_register(). This allows the reporters to be adjusted when capabilities change. The same applies to bnxt_dl_fw_reporters_destroy(). Fixes: 6763c779c2d8 ("bnxt_en: Add new FW devlink_health_reporter") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0797c10d2d1fa0d6f14612404781b348fc757c3e Author: Vasundhara Volam Date: Tue Dec 10 02:49:11 2019 -0500 bnxt_en: Remove unnecessary NULL checks for fw_health After fixing the allocation of bp->fw_health in the previous patch, the driver will not go through the fw reset and recovery code paths if bp->fw_health allocation fails. So we can now remove the unnecessary NULL checks. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 8280b38e01f71e0f89389ccad3fa43b79e57c604 Author: Vasundhara Volam Date: Tue Dec 10 02:49:10 2019 -0500 bnxt_en: Fix bp->fw_health allocation and free logic. bp->fw_health needs to be allocated for either the firmware initiated reset feature or the driver initiated error recovery feature. The current code is not allocating bp->fw_health for all the necessary cases. This patch corrects the logic to allocate bp->fw_health correctly when needed. If allocation fails, we clear the feature flags. We also add the the missing kfree(bp->fw_health) when the driver is unloaded. If we get an async reset message from the firmware, we also need to make sure that we have a valid bp->fw_health before proceeding. Fixes: 07f83d72d238 ("bnxt_en: Discover firmware error recovery capabilities.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c74751f4c39232c31214ec6a3bc1c7e62f5c728b Author: Vasundhara Volam Date: Tue Dec 10 02:49:09 2019 -0500 bnxt_en: Return error if FW returns more data than dump length If any change happened in the configuration of VF in VM while collecting live dump, there could be a race and firmware can return more data than allocated dump length. Fix it by keeping track of the accumulated core dump length copied so far and abort the copy with error code if the next chunk of core dump will exceed the original dump length. Fixes: 6c5657d085ae ("bnxt_en: Add support for ethtool get dump.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 325f85f37e5b35807d86185bdf2c64d2980c44ba Author: Michael Chan Date: Tue Dec 10 02:49:08 2019 -0500 bnxt_en: Free context memory in the open path if firmware has been reset. This will trigger new context memory to be rediscovered and allocated during the re-probe process after a firmware reset. Without this, the newly reset firmware does not have valid context memory and the driver will eventually fail to allocate some resources. Fixes: ec5d31e3c15d ("bnxt_en: Handle firmware reset status during IF_UP.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0c722ec0a289c7f6b53f89bad1cfb7c4db3f7a62 Author: Michael Chan Date: Tue Dec 10 02:49:07 2019 -0500 bnxt_en: Fix MSIX request logic for RDMA driver. The logic needs to check both bp->total_irqs and the reserved IRQs in hw_resc->resv_irqs if applicable and see if both are enough to cover the L2 and RDMA requested vectors. The current code is only checking bp->total_irqs and can fail in some code paths, such as the TX timeout code path with the RDMA driver requesting vectors after recovery. In this code path, we have not reserved enough MSIX resources for the RDMA driver yet. Fixes: 75720e6323a1 ("bnxt_en: Keep track of reserved IRQs.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 10d59345578a116042c1a5d737a18234aaf3e0e6 Author: Jens Axboe Date: Mon Dec 9 20:16:22 2019 -0700 io_uring: add sockets to list of files that support non-blocking issue In chasing a performance issue between using IORING_OP_RECVMSG and IORING_OP_READV on sockets, tracing showed that we always punt the socket reads to async offload. This is due to io_file_supports_async() not checking for S_ISSOCK on the inode. Since sockets supports the O_NONBLOCK (or MSG_DONTWAIT) flag just fine, add sockets to the list of file types that we can do a non-blocking issue to. Signed-off-by: Jens Axboe commit ebfcd8955c0b52eb793bcbc9e71140e3d0cdb228 Author: Jens Axboe Date: Mon Dec 9 20:58:56 2019 -0700 net: make socket read/write_iter() honor IOCB_NOWAIT The socket read/write helpers only look at the file O_NONBLOCK. not the iocb IOCB_NOWAIT flag. This breaks users like preadv2/pwritev2 and io_uring that rely on not having the file itself marked nonblocking, but rather the iocb itself. Cc: netdev@vger.kernel.org Acked-by: David Miller Signed-off-by: Jens Axboe commit 53108d476a105ab2597d7a4e6040b127829391b5 Author: Jens Axboe Date: Mon Dec 9 20:12:38 2019 -0700 io_uring: only hash regular files for async work execution We hash regular files to avoid having multiple threads hammer on the inode mutex, but it should not be needed on other types of files (like sockets). Signed-off-by: Jens Axboe commit 4a0a7a187453e65bdd24b9ede045b4c36b958868 Author: Jens Axboe Date: Mon Dec 9 20:01:01 2019 -0700 io_uring: run next sqe inline if possible One major use case of linked commands is the ability to run the next link inline, if at all possible. This is done correctly for async offload, but somewhere along the line we lost the ability to do so when we were able to complete a request without having to punt it. Ensure that we do so correctly. Signed-off-by: Jens Axboe commit 392edb45b24337eaa0bc1ecd4e3cf897e662ec61 Author: Jens Axboe Date: Mon Dec 9 17:52:20 2019 -0700 io_uring: don't dynamically allocate poll data This essentially reverts commit e944475e6984. For high poll ops workloads, like TAO, the dynamic allocation of the wait_queue entry for IORING_OP_POLL_ADD adds considerable extra overhead. Go back to embedding the wait_queue_entry, but keep the usage of wait->private for the pointer stashing. Signed-off-by: Jens Axboe commit d96885658d9971fc2c752b8699f17a42ef745db6 Author: Jens Axboe Date: Mon Dec 9 19:35:20 2019 -0700 io_uring: deferred send/recvmsg should assign iov Don't just assign it from the main call path, that can miss the case when we're called from issue deferral. Signed-off-by: Jens Axboe commit 8a4955ff1cca7d4da480774034a16e7c28bafec8 Author: Jens Axboe Date: Mon Dec 9 14:52:35 2019 -0700 io_uring: sqthread should grab ctx->uring_lock for submissions We use the mutex to guard against registered file updates, for instance. Ensure we're safe in accessing that state against concurrent updates. Signed-off-by: Jens Axboe commit e995d5123ed433e37a8d63ac528737c912592e3d Author: Jens Axboe Date: Sat Dec 7 21:06:46 2019 -0700 io-wq: briefly spin for new work after finishing work To avoid going to sleep only to get woken shortly thereafter, spin briefly for new work upon completion of work. Signed-off-by: Jens Axboe commit 506d95ff5d6aa0a099a116c49d3884e29801d843 Author: Jens Axboe Date: Sat Dec 7 21:03:59 2019 -0700 io-wq: remove worker->wait waitqueue We only have one cases of using the waitqueue to wake the worker, the rest are using wake_up_process(). Since we can save some cycles not fiddling with the waitqueue io_wqe_worker(), switch the work activation to task wakeup and get rid of the now unused wait_queue_head_t in struct io_worker. Signed-off-by: Jens Axboe commit 4e88d6e7793f2f445f43bd608828541d7f43b608 Author: Jens Axboe Date: Sat Dec 7 20:59:47 2019 -0700 io_uring: allow unbreakable links Some commands will invariably end in a failure in the sense that the completion result will be less than zero. One such example is timeouts that don't have a completion count set, they will always complete with -ETIME unless cancelled. For linked commands, we sever links and fail the rest of the chain if the result is less than zero. Since we have commands where we know that will happen, add IOSQE_IO_HARDLINK as a stronger link that doesn't sever regardless of the completion result. Note that the link will still sever if we fail submitting the parent request, hard links are only resilient in the presence of completion results for requests that did submit correctly. Cc: stable@vger.kernel.org # v5.4 Reviewed-by: Pavel Begunkov Reported-by: 李通洲 Signed-off-by: Jens Axboe commit c571b72e2b845ca0519670cb7c4b5fe5f56498a5 Author: Davidlohr Bueso Date: Tue Dec 10 14:05:23 2019 -0800 Revert "locking/mutex: Complain upon mutex API misuse in IRQ contexts" This ended up causing some noise in places such as rxrpc running in softirq. The warning is misleading in this case as the mutex trylock and unlock operations are done within the same context; and therefore we need not worry about the PI-boosting issues that comes along with no single-owner lock guarantees. While we don't want to support this in mutexes, there is no way out of this yet; so lets get rid of the WARNs for now, as it is only fair to code that has historically relied on non-preemptible softirq guarantees. In addition, changing the lock type is also unviable: exclusive rwsems have the same issue (just not the WARN_ON) and counting semaphores would introduce a performance hit as mutexes are a lot more optimized. This reverts: a0855d24fc22: ("locking/mutex: Complain upon mutex API misuse in IRQ contexts") Fixes: a0855d24fc22: ("locking/mutex: Complain upon mutex API misuse in IRQ contexts") Signed-off-by: Davidlohr Bueso Tested-by: David Howells Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-afs@lists.infradead.org Cc: linux-fsdevel@vger.kernel.org Cc: will@kernel.org Link: https://lkml.kernel.org/r/20191210220523.28540-1-dave@stgolabs.net Signed-off-by: Ingo Molnar commit b0142d66f4edb8578b7772d6d7ad731836b82ddb Author: Rafael J. Wysocki Date: Tue Dec 10 12:48:35 2019 +0100 cpuidle: Fix cpuidle_driver_state_disabled() It turns out that cpuidle_driver_state_disabled() can be called before registering the cpufreq driver on some platforms, which was not expected when it was introduced and which leads to a NULL pointer dereference when trying to walk the CPUs associated with the given cpuidle driver. Fix the problem by making cpuidle_driver_state_disabled() check if the driver's mask of CPUs associated with it is present and to set CPUIDLE_FLAG_UNUSABLE for the given idle state in the driver's states list if that is not the case to cause __cpuidle_register_device() to set CPUIDLE_STATE_DISABLED_BY_DRIVER for that state for all cpuidle devices registered by it later. Fixes: cbda56d5fefc ("cpuidle: Introduce cpuidle_driver_state_disabled() for driver quirks") Reported-by: Daniel Lezcano Tested-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 07b67280037303845f480590986549b266cb3ad6 Author: Arnd Bergmann Date: Tue Dec 10 20:59:24 2019 +0100 drm/amd/display: include linux/slab.h where needed Calling kzalloc() and related functions requires the linux/slab.h header to be included: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function 'dcn21_ipp_create': drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:679:3: error: implicit declaration of function 'kzalloc'; did you mean 'd_alloc'? [-Werror=implicit-function-declaration] kzalloc(sizeof(struct dcn10_ipp), GFP_KERNEL); A lot of other headers also miss a direct include in this file, but this is the only one that causes a problem for now. Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 3ac61258599b5abe45d97b926d44a79262385bae Author: Randy Dunlap Date: Sun Dec 8 20:35:38 2019 -0800 i2c: fix header file kernel-doc warning Fix kernel-doc warning in . ../include/linux/i2c.h:337: warning: Function parameter or member 'init_irq' not described in 'i2c_client' Signed-off-by: Randy Dunlap Signed-off-by: Wolfram Sang commit 2c2f00ab1641895183488ff2bce53c415344fb87 Author: Wolfram Sang Date: Fri Dec 6 01:23:22 2019 +0100 i2c: remove i2c_new_dummy() API All in-kernel users have been converted to {devm_}i2c_new_dummy_device(). Remove the old API. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Tested-by: Luca Ceresoli Reviewed-by: Luca Ceresoli Signed-off-by: Wolfram Sang commit 1f00534a764aed160652770e0c0a63657c231fde Author: Arnd Bergmann Date: Tue Dec 10 21:30:46 2019 +0100 drm/amd/display: fix undefined struct member reference An initialization was added for two optional struct members. One of these is always present in the dcn20_resource file, but the other one depends on CONFIG_DRM_AMD_DC_DSC_SUPPORT and causes a build failure if that is missing: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:926:14: error: excess elements in struct initializer [-Werror] .num_dsc = 5, Add another #ifdef around the assignment. Fixes: c3d03c5a196f ("drm/amd/display: Include num_vmid and num_dsc within NV14's resource caps") Reviewed-by: Zhan Liu Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 3d519d6d388ba4f9a75d0e0b6f60d890987bc096 Author: Kuninori Morimoto Date: Mon Nov 25 16:16:21 2019 +0900 sh: kgdb: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following error: LINUX/arch/sh/kernel/kgdb.c: In function 'kgdb_arch_handle_exception': LINUX/arch/sh/kernel/kgdb.c:267:6: error: this statement may fall through [-Werror=implicit-fallthrough=] if (kgdb_hex2long(&ptr, &addr)) ^ LINUX/arch/sh/kernel/kgdb.c:269:2: note: here case 'D': ^~~~ Signed-off-by: Kuninori Morimoto Acked-by: Daniel Thompson Signed-off-by: Gustavo A. R. Silva commit 30e647a764d446723a7e0fb08d209e0104f16173 Author: Stefan Wahren Date: Sat Nov 30 13:31:13 2019 +0100 ARM: dts: bcm283x: Fix critical trip point During definition of the CPU thermal zone of BCM283x SoC family there was a misunderstanding of the meaning "criticial trip point" and the thermal throttling range of the VideoCore firmware. The latter one takes effect when the core temperature is at least 85 degree celsius or higher So the current critical trip point doesn't make sense, because the thermal shutdown appears before the firmware has a chance to throttle the ARM core(s). Fix these unwanted shutdowns by increasing the critical trip point to a value which shouldn't be reached with working thermal throttling. Fixes: 0fe4d2181cc4 ("ARM: dts: bcm283x: Add CPU thermal zone with 1 trip point") Signed-off-by: Stefan Wahren Signed-off-by: Florian Fainelli commit ff205766dbbee024a4a716638868d98ffb17748a Author: Alexei Starovoitov Date: Sun Dec 8 16:01:12 2019 -0800 ftrace: Fix function_graph tracer interaction with BPF trampoline Depending on type of BPF programs served by BPF trampoline it can call original function. In such case the trampoline will skip one stack frame while returning. That will confuse function_graph tracer and will cause crashes with bad RIP. Teach graph tracer to skip functions that have BPF trampoline attached. Signed-off-by: Alexei Starovoitov Signed-off-by: Steven Rostedt (VMware) commit a61f810567be0ef101d8bbb65b89ffeac7d62103 Author: YueHaibing Date: Sat Dec 7 11:44:09 2019 +0800 tracing: remove set but not used variable 'buffer' kernel/trace/trace_events_inject.c: In function trace_inject_entry: kernel/trace/trace_events_inject.c:20:22: warning: variable buffer set but not used [-Wunused-but-set-variable] It is never used, so remove it. Link: http://lkml.kernel.org/r/20191207034409.25668-1-yuehaibing@huawei.com Reported-by: Hulk Robot Acked-by: Cong Wang Signed-off-by: YueHaibing Signed-off-by: Steven Rostedt (VMware) commit af74262337faa65d5ac2944553437d3f5fb29123 Author: Steven Rostedt (VMware) Date: Mon Dec 9 10:33:30 2019 -0500 module: Remove accidental change of module_enable_x() When pulling in Divya Indi's patch, I made a minor fix to remove unneeded braces. I commited my fix up via "git commit -a --amend". Unfortunately, I didn't realize I had some changes I was testing in the module code, and those changes were applied to Divya's patch as well. This reverts the accidental updates to the module code. Cc: Jessica Yu Cc: Divya Indi Reported-by: Peter Zijlstra Fixes: e585e6469d6f ("tracing: Verify if trace array exists before destroying it.") Signed-off-by: Steven Rostedt (VMware) commit 6e8aeda224c83c7c7841e143d410b6d0e7bda05e Author: Lukas Wunner Date: Tue Dec 10 14:39:50 2019 +0100 ALSA: hda/hdmi - Fix duplicate unref of pci_dev Nicholas Johnson reports a null pointer deref as well as a refcount underflow upon hot-removal of a Thunderbolt-attached AMD eGPU. He's bisected the issue down to commit 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD"). The commit iterates over PCI devices using pci_get_class() and unreferences each device found, even though pci_get_class() subsequently unreferences the device as well. Fix it. Fixes: 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") Link: https://lore.kernel.org/r/PSXP216MB0438BFEAA0617283A834E11580580@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM/ Reported-and-tested-by: Nicholas Johnson Signed-off-by: Lukas Wunner Reviewed-by: Alex Deucher Cc: Mika Westerberg Cc: Alexander Deucher Cc: Bjorn Helgaas Link: https://lore.kernel.org/r/77aa6c01aefe1ebc4004e87b0bc714f2759f15c4.1575985006.git.lukas@wunner.de Signed-off-by: Takashi Iwai commit e00b59d30506dc9ef91caf2f3c584209cc9f61e4 Author: Tony Lindgren Date: Mon Dec 9 13:41:17 2019 -0800 ARM: omap2plus_defconfig: Add back DEBUG_FS Commit 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") removed select for DEBUG_FS but we still need it at least for enabling deeper idle states for the SoCs. Signed-off-by: Tony Lindgren commit 90d79edc57a5625b9adaf397719e3a760b051167 Author: Grygorii Strashko Date: Wed Dec 4 19:45:33 2019 +0200 ARM: omap2plus_defconfig: enable NET_SWITCHDEV The TI_CPSW_SWITCHDEV definition in Kconfig was changed from "select NET_SWITCHDEV" to "depends on NET_SWITCHDEV", and therefore it is required to explicitelly enable NET_SWITCHDEV config option in omap2plus_defconfig. Fixes: 3727d259ddaf ("arm: omap2plus_defconfig: enable new cpsw switchdev driver") Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit c842b8c4ff9859f750447f3ca08f64b2ed23cebc Author: Mans Rullgard Date: Sun Dec 1 17:07:06 2019 +0000 ARM: dts: am335x-sancloud-bbe: fix phy mode The phy mode should be rgmii-id. For some reason, it used to work with rgmii-txid but doesn't any more. Signed-off-by: Mans Rullgard Signed-off-by: Tony Lindgren commit 93c60483b5feefced92b869d5f97769495bc6313 Author: Tony Lindgren Date: Mon Dec 9 13:55:15 2019 -0800 bus: ti-sysc: Fix missing force mstandby quirk handling Commit 03856e928b0e ("bus: ti-sysc: Handle mstandby quirk and use it for musb") added quirk handling for mstandby quirk but did not consider that we also need a quirk variant for SYSC_QUIRK_FORCE_MSTANDBY. We need to use forced idle mode for both SYSC_QUIRK_SWSUP_MSTANDBY and SYSC_QUIRK_FORCE_MSTANDBY, but SYSC_QUIRK_SWSUP_MSTANDBY also need to additionally also configure no-idle mode when enabled. Fixes: 03856e928b0e ("bus: ti-sysc: Handle mstandby quirk and use it for musb") Signed-off-by: Tony Lindgren commit 7fc979f8204fb763e203d3e716c17d352eb96b35 Author: Eric Biggers Date: Fri Dec 6 19:59:21 2019 -0800 docs: dm-integrity: remove reference to ARC4 ARC4 is no longer considered secure, so it shouldn't be used, even as just an example. Signed-off-by: Eric Biggers Signed-off-by: Mike Snitzer commit 35c6cb41686c4de03d738fd95617a0cf7441bbe1 Author: Amir Goldstein Date: Mon Nov 25 11:51:25 2019 +0200 docs: filesystems: overlayfs: Fix restview warnings Fix only the obvious problems [SzM: add SPDX license line] Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 5356ab06448556a456c7991cbd0fc8234ef84ad0 Author: Amir Goldstein Date: Mon Nov 25 11:51:25 2019 +0200 docs: filesystems: overlayfs: Rename overlayfs.txt to .rst It is already formatted as RST. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 6889ee5a53b8d969aa542047f5ac8acdc0e79a91 Author: Amir Goldstein Date: Fri Dec 6 08:33:36 2019 +0200 ovl: relax WARN_ON() on rename to self In ovl_rename(), if new upper is hardlinked to old upper underneath overlayfs before upper dirs are locked, user will get an ESTALE error and a WARN_ON will be printed. Changes to underlying layers while overlayfs is mounted may result in unexpected behavior, but it shouldn't crash the kernel and it shouldn't trigger WARN_ON() either, so relax this WARN_ON(). Reported-by: syzbot+bb1836a212e69f8e201a@syzkaller.appspotmail.com Fixes: 804032fabb3b ("ovl: don't check rename to self") Cc: # v4.9+ Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 9c6d8f13e9da10a26ad7f0a020ef86e8ef142835 Author: Amir Goldstein Date: Sun Nov 17 17:43:44 2019 +0200 ovl: fix corner case of non-unique st_dev;st_ino On non-samefs overlay without xino, non pure upper inodes should use a pseudo_dev assigned to each unique lower fs and pure upper inodes use the real upper st_dev. It is fine for an overlay pure upper inode to use the same st_dev;st_ino values as the real upper inode, because the content of those two different filesystem objects is always the same. In this case, however: - two filesystems, A and B - upper layer is on A - lower layer 1 is also on A - lower layer 2 is on B Non pure upper overlay inode, whose origin is in layer 1 will have the same st_dev;st_ino values as the real lower inode. This may result with a false positive results of 'diff' between the real lower and copied up overlay inode. Fix this by using the upper st_dev;st_ino values in this case. This breaks the property of constant st_dev;st_ino across copy up of this case. This breakage will be fixed by a later patch. Fixes: 5148626b806a ("ovl: allocate anon bdev per unique lower fs") Cc: stable@vger.kernel.org # v4.17+ Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit ec7bbb53d339250df7d4b042ff93c468535c0a90 Author: Amir Goldstein Date: Fri Nov 15 13:33:04 2019 +0200 ovl: don't use a temp buf for encoding real fh We can allocate maximum fh size and encode into it directly. Suggested-by: Al Viro Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit cbe7fba8edfc8cb8e621599e376f8ac5c224fa72 Author: Amir Goldstein Date: Fri Nov 15 13:33:03 2019 +0200 ovl: make sure that real fid is 32bit aligned in memory Seprate on-disk encoding from in-memory and on-wire resresentation of overlay file handle. In-memory and on-wire we only ever pass around pointers to struct ovl_fh, which encapsulates at offset 3 the on-disk format struct ovl_fb. struct ovl_fb encapsulates at offset 21 the real file handle. That makes sure that the real file handle is always 32bit aligned in-memory when passed down to the underlying filesystem. On-disk format remains the same and store/load are done into correctly aligned buffer. New nfs exported file handles are exported with aligned real fid. Old nfs file handles are copied to an aligned buffer before being decoded. Reported-by: Al Viro Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 7e63c87fc2dcf3be9d3aab82d4a0ea085880bdca Author: Amir Goldstein Date: Thu Nov 14 22:28:41 2019 +0200 ovl: fix lookup failure on multi lower squashfs In the past, overlayfs required that lower fs have non null uuid in order to support nfs export and decode copy up origin file handles. Commit 9df085f3c9a2 ("ovl: relax requirement for non null uuid of lower fs") relaxed this requirement for nfs export support, as long as uuid (even if null) is unique among all lower fs. However, said commit unintentionally also relaxed the non null uuid requirement for decoding copy up origin file handles, regardless of the unique uuid requirement. Amend this mistake by disabling decoding of copy up origin file handle from lower fs with a conflicting uuid. We still encode copy up origin file handles from those fs, because file handles like those already exist in the wild and because they might provide useful information in the future. There is an unhandled corner case described by Miklos this way: - two filesystems, A and B, both have null uuid - upper layer is on A - lower layer 1 is also on A - lower layer 2 is on B In this case bad_uuid won't be set for B, because the check only involves the list of lower fs. Hence we'll try to decode a layer 2 origin on layer 1 and fail. We will deal with this corner case later. Reported-by: Colin Ian King Tested-by: Colin Ian King Link: https://lore.kernel.org/lkml/20191106234301.283006-1-colin.king@canonical.com/ Fixes: 9df085f3c9a2 ("ovl: relax requirement for non null uuid ...") Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 4bcd9eae731083bb724faf68cce6021213308333 Author: Andy Shevchenko Date: Thu Nov 21 16:02:07 2019 +0200 fbtft: Fix the initialization from property algorithm When converting to device property API the commit 8b2d3aeeb7ec ("fbtft: Make use of device property API") mistakenly placed the reading of the first value inside the loop, that jumps over value after initialization sequence or sleep commands. Move the above mentioned reading outside of the loop to restore correct behaviour. Besides that, we are using pre-increment operation which may lead to out of the boundary access at the end of sequence. Thus, allocate buffer with an additional element at the end to prevent out of the boundary access. Fixes: 8b2d3aeeb7ec ("fbtft: Make use of device property API") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191121140207.65089-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit eecd37e105f0137af0d1b726bf61ff35d1d7d2eb Author: Guenter Roeck Date: Tue Dec 3 12:58:52 2019 -0800 drivers: Fix boot problem on SuperH SuperH images crash too eearly to display any console output. Bisect points to commit 507fd01d5333 ("drivers: move the early platform device support to arch/sh"). An analysis of that patch suggests that early_platform_cleanup() is now called at the wrong time. Restoring its call point fixes the problem. Cc: Bartosz Golaszewski Fixes: 507fd01d5333 ("drivers: move the early platform device support to arch/sh") Tested-by: Geert Uytterhoeven Signed-off-by: Guenter Roeck Acked-by: Rob Landley Link: https://lore.kernel.org/r/20191203205852.15659-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 111bf02b8f544f98de53ea1f912ae01f598b161b Author: Chen-Yu Tsai Date: Thu Dec 5 16:50:54 2019 +0800 rtc: sun6i: Add support for RTC clocks on R40 When support for the R40 in the rtc-sun6i driver was split out for a separate compatible string, only the RTC half was covered, and not the clock half. Unfortunately this results in the whole driver not working, as the RTC half expects the clock half to have been initialized. Add support for the clock part as well. The clock part is like the H3, but does not need to export the internal oscillator, nor does it have a gateable LOSC external output. This fixes issues with WiFi and Bluetooth not working on the BPI M2U. Fixes: d6624cc75021 ("rtc: sun6i: Add R40 compatible") Cc: # 5.3.x Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20191205085054.6049-1-wens@kernel.org Signed-off-by: Alexandre Belloni commit 4e64ba3fd181b207c00d392b27ed484b89108dce Author: Amery Song Date: Mon Dec 9 18:48:54 2019 -0600 ASoC: Intel: common: work-around incorrect ACPI HID for CML boards On CML boards with the RT5682 headset codec and RT1011 speaker amplifier, the platform firmware exposes three ACPI HIDs (10EC5682, 10EC1011 and MX98357A). The last HID is a mistake in DSDT tables, which causes the wrong machine driver to be loaded. This patch changes the key used to identify boards and changes the order of entries in the table to load the correct machine driver. The order does matter and should not be modified to work-around this firmware issue. Signed-off-by: Amery Song Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210004854.16845-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f84337c3fb8ff4d533ccbed0d2db4e8587d0ff58 Author: Curtis Malainey Date: Mon Dec 9 18:48:52 2019 -0600 ASoC: SOF: Intel: split cht and byt debug window sizes Turns out SSP 3-5 are only available on cht, to avoid dumping on undefined registers let's split the definition. Signed-off-by: Curtis Malainey Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210004854.16845-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6bb03c21e4bfee29e48e480ee4ca7cb1e12f587c Author: Karol Trzcinski Date: Mon Dec 9 18:48:49 2019 -0600 ASoC: SOF: loader: fix snd_sof_fw_parse_ext_data An error occurs during parsing more than one ext_data from the mailbox, because of invalid data offset handling. Fix by removing the incorrect duplicate increment of the offset. The return value is also reset in the switch case. This does not change the behavior but improves readability - there is no longer a need to check what the return value of get_ext_windows is. Signed-off-by: Karol Trzcinski Signed-off-by: Bartosz Kokoszko Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210004854.16845-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8edc95667646a75f0fc97e08ecb180581fdff300 Author: Karol Trzcinski Date: Mon Dec 9 18:48:48 2019 -0600 ASoC: SOF: loader: snd_sof_fw_parse_ext_data log warning on unknown header Added warning log when found some unknown FW boot ext header, to improve debuggability. Signed-off-by: Karol Trzcinski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210004854.16845-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5525cf07d15f7c7eab619707627c31aa8e39dff1 Author: Daniel Baluta Date: Mon Dec 9 15:53:53 2019 +0200 ASoC: simple-card: Don't create separate link when platform is present In normal sound case all DAIs are detected as CPU-Codec. simple_dai_link_of supports the presence of a platform but it counts it as a CPU DAI resulting in the creation of an extra link. Adding a platform property to a link description like: simple-audio-card,dai-link { cpu { sound-dai = <&sai1>; }; plat { sound-dai = <&dsp>; }; codec { sound-dai = <&wm8960>; } will result in the creation of two links: * sai1 <-> wm8960 * dsp <-> wm8960 which is obviously not what we want. We just want one single link with: * sai1 <-> wm8960 (and platform set to dsp). Signed-off-by: Daniel Baluta Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20191209135353.17427-1-daniel.baluta@nxp.com Signed-off-by: Mark Brown commit a3039aef52d9ffeb67e9211899cd3e8a2953a01f Author: Dragos Tarcatu Date: Mon Dec 9 18:39:39 2019 -0600 ASoC: topology: Check return value for soc_tplg_pcm_create() The return value of soc_tplg_pcm_create() is currently not checked in soc_tplg_pcm_elems_load(). If an error is to occur there, the topology ignores it and continues loading. Fix that by checking the status and rejecting the topology on error. Reviewed-by: Ranjani Sridharan Signed-off-by: Dragos Tarcatu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210003939.15752-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 76d2703649321c296df7ec0dafd50add96215de4 Author: Dragos Tarcatu Date: Mon Dec 9 18:39:38 2019 -0600 ASoC: topology: Check return value for snd_soc_add_dai_link() snd_soc_add_dai_link() might fail. This situation occurs for instance in a very specific use case where a PCM device and a Back End DAI link are given identical names in the topology. When this happens, soc_new_pcm_runtime() fails and then snd_soc_add_dai_link() returns -ENOMEM when called from soc_tplg_fe_link_create(). Because of that, the link will not get added into the card list, so any attempt to remove it later ends up in a panic. Fix that by checking the return status and free the memory in case of an error. Reviewed-by: Ranjani Sridharan Signed-off-by: Dragos Tarcatu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210003939.15752-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e5b5da96da50ef30abb39cb9f694e99366404d24 Author: EJ Hsu Date: Tue Dec 3 23:34:56 2019 -0800 usb: gadget: fix wrong endpoint desc Gadget driver should always use config_ep_by_speed() to initialize usb_ep struct according to usb device's operating speed. Otherwise, usb_ep struct may be wrong if usb devcie's operating speed is changed. The key point in this patch is that we want to make sure the desc pointer in usb_ep struct will be set to NULL when gadget is disconnected. This will force it to call config_ep_by_speed() to correctly initialize usb_ep struct based on the new operating speed when gadget is re-connected later. Reviewed-by: Peter Chen Signed-off-by: EJ Hsu Signed-off-by: Felipe Balbi commit 51ba8b3a0e1ab5240e6ed5b73995d0cf16b05b52 Author: Saravana Kannan Date: Mon Dec 9 11:31:19 2019 -0800 of/platform: Unconditionally pause/resume sync state during kernel init Commit 5e6669387e22 ("of/platform: Pause/resume sync state during init and of_platform_populate()") paused/resumed sync state during init only if Linux had parsed and populated a devicetree. However, the check for that (of_have_populated_dt()) can change after of_platform_default_populate_init() executes. One example of this is when devicetree unittests are enabled. This causes an unmatched pause/resume of sync state. To avoid this, just unconditionally pause/resume sync state during init. Fixes: 5e6669387e22 ("of/platform: Pause/resume sync state during init and of_platform_populate()") Reported-by: kernel test robot Signed-off-by: Saravana Kannan Reviewed-by: Frank Rowand Link: https://lore.kernel.org/r/20191209193119.147056-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 2d7b78f59e020b07fc6338eefe286f54ee2d6773 Author: Thinh Nguyen Date: Wed Nov 27 13:10:54 2019 -0800 usb: dwc3: ep0: Clear started flag on completion Clear ep0's DWC3_EP_TRANSFER_STARTED flag if the END_TRANSFER command is completed. Otherwise, we can't start control transfer again after END_TRANSFER. Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit d3abda5a98a18e524e17fd4085c9f4bd53e9ef53 Author: Thinh Nguyen Date: Wed Nov 27 13:10:47 2019 -0800 usb: dwc3: gadget: Clear started flag for non-IOC Normally the END_TRANSFER command completion handler will clear the DWC3_EP_TRANSFER_STARTED flag. However, if the command was sent without interrupt on completion, then the flag will not be cleared. Make sure to clear the flag in this case. Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 8c7d4b7b3d43c54c0b8c1e4adb917a151c754196 Author: Tejas Joglekar Date: Wed Nov 13 11:45:16 2019 +0530 usb: dwc3: gadget: Fix logical condition This patch corrects the condition to kick the transfer without giving back the requests when either request has remaining data or when there are pending SGs. The && check was introduced during spliting up the dwc3_gadget_ep_cleanup_completed_requests() function. Fixes: f38e35dd84e2 ("usb: dwc3: gadget: split dwc3_gadget_ep_cleanup_completed_requests()") Cc: stable@vger.kernel.org Signed-off-by: Tejas Joglekar Signed-off-by: Felipe Balbi commit c724f776f048538ecfdf53a52b7a522309f5c504 Author: Johan Hovold Date: Tue Dec 10 12:47:51 2019 +0100 staging: rtl8712: fix interface sanity check Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 2865d42c78a9 ("staging: r8712u: Add the new driver to the mainline kernel") Cc: stable # 2.6.37 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191210114751.5119-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 74ca34118a0e05793935d804ccffcedd6eb56596 Author: Johan Hovold Date: Tue Dec 10 12:47:50 2019 +0100 staging: rtl8188eu: fix interface sanity check Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: c2478d39076b ("staging: r8188eu: Add files for new driver - part 20") Cc: stable # 3.12 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191210114751.5119-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 09068c1ad53fb077bdac288869dec2435420bdc4 Author: Johan Hovold Date: Tue Dec 10 12:25:58 2019 +0100 USB: atm: ueagle-atm: add missing endpoint check Make sure that the interrupt interface has an endpoint before trying to access its endpoint descriptors to avoid dereferencing a NULL pointer. The driver binds to the interrupt interface with interface number 0, but must not assume that this interface or its current alternate setting are the first entries in the corresponding configuration arrays. Fixes: b72458a80c75 ("[PATCH] USB: Eagle and ADI 930 usb adsl modem driver") Cc: stable # 2.6.16 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191210112601.3561-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3c11c4bed02b202e278c0f5c319ae435d7fb9815 Author: Johan Hovold Date: Tue Dec 10 12:25:59 2019 +0100 USB: adutux: fix interface sanity check Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 03270634e242 ("USB: Add ADU support for Ontrak ADU devices") Cc: stable # 2.6.19 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191210112601.3561-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 59920635b89d74b9207ea803d5e91498d39e8b69 Author: Johan Hovold Date: Tue Dec 10 12:26:00 2019 +0100 USB: idmouse: fix interface sanity checks Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191210112601.3561-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7c5a2df3367a2c4984f1300261345817d95b71f8 Author: Johan Hovold Date: Tue Dec 10 12:26:01 2019 +0100 USB: serial: io_edgeport: fix epic endpoint lookup Make sure to use the current alternate setting when looking up the endpoints on epic devices to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 6e8cf7751f9f ("USB: add EPIC support to the io_edgeport driver") Cc: stable # 2.6.21 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191210112601.3561-5-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3d1890ef8023e61934e070021b06cc9f417260c0 Author: Ben Skeggs Date: Tue Dec 10 12:15:44 2019 +1000 drm/nouveau/kms/nv50-: fix panel scaling Under certain circumstances, encoder atomic_check() can be entered without adjusted_mode having been reset to the same as mode, which confuses the scaling logic and can lead to a misprogrammed display. Fix this by checking against the user-provided mode directly. Link: https://bugs.freedesktop.org/show_bug.cgi?id=108615 Link: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/issues/464 Signed-off-by: Ben Skeggs commit ae5769d4670982bc483885b120b557a9ffd57527 Author: Lyude Paul Date: Fri Nov 15 16:07:20 2019 -0500 drm/nouveau/kms/nv50-: Limit MST BPC to 8 Noticed this while working on some unrelated CRC stuff. Currently, userspace has very little support for BPCs higher than 8. While this doesn't matter for most things, on MST topologies we need to be careful about ensuring that we do our best to make any given display configuration fit within the bandwidth restraints of the topology, since otherwise less people's monitor configurations will work. Allowing for BPC settings higher than 8 dramatically increases the required bandwidth for displays in most configurations, and consequently makes it a lot less likely that said display configurations will pass the atomic check. In the future we want to fix this correctly by making it so that we adjust the bpp for each display in a topology to be as high as possible, while making sure to lower the bpp of each display in the event that we run out of bandwidth and need to rerun our atomic check. But for now, follow the behavior that both i915 and amdgpu are sticking to. Signed-off-by: Lyude Paul Fixes: 232c9eec417a ("drm/nouveau: Use atomic VCPI helpers for MST") Cc: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li Cc: Sam Ravnborg Cc: Sean Paul Cc: # v5.1+ Signed-off-by: Ben Skeggs commit ac2d9275f371346922b31a388bbaa6a54f1154a4 Author: Lyude Paul Date: Fri Nov 15 16:07:19 2019 -0500 drm/nouveau/kms/nv50-: Store the bpc we're using in nv50_head_atom In order to be able to use bpc values that are different from what the connector reports, we want to be able to store the bpc value we decide on using for an atomic state in nv50_head_atom and refer to that instead of simply using the value that the connector reports throughout the whole atomic check phase and commit phase. This will let us (eventually) implement the max bpc connector property, and will also be needed for limiting the bpc we use on MST displays to 8 in the next commit. Signed-off-by: Lyude Paul Fixes: 232c9eec417a ("drm/nouveau: Use atomic VCPI helpers for MST") Cc: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li Cc: Sean Paul Cc: Laurent Pinchart Cc: # v5.1+ Signed-off-by: Ben Skeggs commit 310d35771ee9040f5744109fc277206ad96ba253 Author: Lyude Paul Date: Fri Nov 15 16:07:18 2019 -0500 drm/nouveau/kms/nv50-: Call outp_atomic_check_view() before handling PBN Since nv50_outp_atomic_check_view() can set crtc_state->mode_changed, we probably should be calling it before handling any PBN changes. Just a precaution. Signed-off-by: Lyude Paul Fixes: 232c9eec417a ("drm/nouveau: Use atomic VCPI helpers for MST") Cc: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li Cc: Sean Paul Cc: Laurent Pinchart Cc: # v5.1+ Signed-off-by: Ben Skeggs commit 64d17f25dcad518461ccf0c260544e1e379c5b35 Author: Hans de Goede Date: Thu Oct 24 10:52:53 2019 +0200 drm/nouveau: Fix drm-core using atomic code-paths on pre-nv50 hardware We do not support atomic modesetting on pre-nv50 hardware, but until now our connector code was setting drm_connector->state on pre-nv50 hardware. This causes the core to enter atomic modesetting paths in at least: 1. drm_connector_get_encoder(), returning connector->state->best_encoder which is always 0, causing us to always report 0 as encoder_id in the drmModeConnector struct returned by drmModeGetConnector(). 2. drm_encoder_get_crtc(), returning NULL because uses_atomic get set, causing us to always report 0 as crtc_id in the drmModeEncoder struct returned by drmModeGetEncoder() Which in turn confuses userspace, at least plymouth thinks that the pipe has changed because of this and tries to reconfigure it unnecessarily. More in general we should not set drm_connector->state in the non-atomic code as this violates the drm-core's expectations. This commit fixes this by using a nouveau_conn_atom struct embedded in the nouveau_connector struct for property handling in the non-atomic case. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1706557 Signed-off-by: Hans de Goede Signed-off-by: Ben Skeggs commit 37a68eab4cd92b507c9e8afd760fdc18e4fecac6 Author: Hans de Goede Date: Thu Oct 24 10:52:52 2019 +0200 drm/nouveau: Move the declaration of struct nouveau_conn_atom up a bit Place the declaration of struct nouveau_conn_atom above that of struct nouveau_connector. This commit makes no changes to the moved block what so ever, it just moves it up a bit. This is a preparation patch to fix some issues with connector handling on pre nv50 displays (which do not use atomic modesetting). Signed-off-by: Hans de Goede Reviewed-by: Lyude Paul Signed-off-by: Ben Skeggs commit a470552ee8965da0fe6fd4df0aa39c4cda652c7c Author: Ard Biesheuvel Date: Tue Dec 10 10:09:45 2019 +0100 efi: Don't attempt to map RCI2 config table if it doesn't exist Commit: 1c5fecb61255aa12 ("efi: Export Runtime Configuration Interface table to sysfs") ... added support for a Dell specific UEFI configuration table, but failed to take into account that mapping the table should not be attempted unless the table actually exists. If it doesn't exist, the code usually fails silently unless pr_debug() prints are enabled. However, on 32-bit PAE x86, the splat below is produced due to the attempt to map the placeholder value EFI_INVALID_TABLE_ADDR which we use for non-existing UEFI configuration tables, and which equals ULONG_MAX. memremap attempted on mixed range 0x00000000ffffffff size: 0x1e WARNING: CPU: 1 PID: 1 at kernel/iomem.c:81 memremap+0x1a3/0x1c0 Modules linked in: CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.2-smp-mine #1 Hardware name: Hewlett-Packard HP Z400 Workstation/0B4Ch, BIOS 786G3 v03.61 03/05/2018 EIP: memremap+0x1a3/0x1c0 ... Call Trace: ? map_properties+0x473/0x473 ? efi_rci2_sysfs_init+0x2c/0x154 ? map_properties+0x473/0x473 ? do_one_initcall+0x49/0x1d4 ? parse_args+0x1e8/0x2a0 ? do_early_param+0x7a/0x7a ? kernel_init_freeable+0x139/0x1c2 ? rest_init+0x8e/0x8e ? kernel_init+0xd/0xf2 ? ret_from_fork+0x2e/0x38 Fix this by checking whether the table exists before attempting to map it. Reported-by: Richard Narron Tested-by: Richard Narron Signed-off-by: Ard Biesheuvel Cc: linux-efi@vger.kernel.org Fixes: 1c5fecb61255aa12 ("efi: Export Runtime Configuration Interface table to sysfs") Link: https://lkml.kernel.org/r/20191210090945.11501-2-ardb@kernel.org Signed-off-by: Ingo Molnar commit db23808615e29d9a04f96806cac56f78b0fee0ef Author: Geert Uytterhoeven Date: Wed Nov 20 15:59:26 2019 +0100 reset: Do not register resource data for missing resets When an optional reset is not present, __devm_reset_control_get() and devm_reset_control_array_get() still register resource data to release the non-existing reset on cleanup, which is futile. Fix this by skipping NULL reset control pointers. Signed-off-by: Geert Uytterhoeven Signed-off-by: Philipp Zabel commit 723c0011c7f6992f57e2c629fa9c89141acc115f Author: Geert Uytterhoeven Date: Wed Nov 20 15:26:13 2019 +0100 reset: Fix {of,devm}_reset_control_array_get kerneldoc return types of_reset_control_array_get() and devm_reset_control_array_get() return struct reset_control pointers, not internal struct reset_control_array pointers, just like all other reset control API calls. Correct the kerneldoc to match the code. Fixes: 17c82e206d2a3cd8 ("reset: Add APIs to manage array of resets") Signed-off-by: Geert Uytterhoeven Signed-off-by: Philipp Zabel commit ce89d8d3a70fa530e16f0b0f8994385a214cd0c0 Author: Florian Fainelli Date: Mon Nov 4 10:15:02 2019 -0800 reset: brcmstb: Remove resource checks The use of IS_ALIGNED() is incorrect, the typical resource we pass looks like this: start: 0x8404318, size: 0x30. When using IS_ALIGNED() we will get the following 0x8404318 & (0x18 - 1) = 0x10 which is definitively not equal to 0, same goes with the size. These two checks would make the driver fail probing. Remove the resource checks, since there should be no constraint on the base addresse or size. Fixes: 77750bc089e4 ("reset: Add Broadcom STB SW_INIT reset controller driver") Signed-off-by: Florian Fainelli Signed-off-by: Philipp Zabel commit 392a9f63058f2cdcec8363b849a25532ee40da9f Author: Florian Fainelli Date: Mon Nov 4 10:15:01 2019 -0800 dt-bindings: reset: Fix brcmstb-reset example The reset controller has a #reset-cells value of 1, so we should see a phandle plus a register identifier, fix the example. Fixes: 0807caf647dd ("dt-bindings: reset: Add document for Broadcom STB reset controller") Signed-off-by: Florian Fainelli Signed-off-by: Philipp Zabel commit 19e6317d24c25ee737c65d1ffb7483bdda4bb54a Author: Pete Zaitcev Date: Wed Dec 4 20:39:41 2019 -0600 usb: mon: Fix a deadlock in usbmon between mmap and read The problem arises because our read() function grabs a lock of the circular buffer, finds something of interest, then invokes copy_to_user() straight from the buffer, which in turn takes mm->mmap_sem. In the same time, the callback mon_bin_vma_fault() is invoked under mm->mmap_sem. It attempts to take the fetch lock and deadlocks. This patch does away with protecting of our page list with any semaphores, and instead relies on the kernel not close the device while mmap is active in a process. In addition, we prohibit re-sizing of a buffer while mmap is active. This way, when (now unlocked) fault is processed, it works with the page that is intended to be mapped-in, and not some other random page. Note that this may have an ABI impact, but hopefully no legitimate program is this wrong. Signed-off-by: Pete Zaitcev Reported-by: syzbot+56f9673bb4cdcbeb0e92@syzkaller.appspotmail.com Reviewed-by: Alan Stern Fixes: 46eb14a6e158 ("USB: fix usbmon BUG trigger") Cc: Link: https://lore.kernel.org/r/20191204203941.3503452b@suzdal.zaitcev.lan Signed-off-by: Greg Kroah-Hartman commit 59120962e4be4f72be537adb17da6881c4b3797c Author: Bryan O'Donoghue Date: Thu Nov 28 13:43:57 2019 +0000 usb: common: usb-conn-gpio: Don't log an error on probe deferral This patch makes the printout of the error message for failing to get a VBUS regulator handle conditional on the error code being something other than -EPROBE_DEFER. Deferral is a normal thing, we don't need an error message for this. Cc: Chunfeng Yun Cc: Nagarjuna Kristam Cc: Linus Walleij Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Bryan O'Donoghue Cc: stable Link: https://lore.kernel.org/r/20191128134358.3880498-2-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1cd17f7f0def31e3695501c4f86cd3faf8489840 Author: Emiliano Ingrassia Date: Wed Nov 27 17:03:55 2019 +0100 usb: core: urb: fix URB structure initialization function Explicitly initialize URB structure urb_list field in usb_init_urb(). This field can be potentially accessed uninitialized and its initialization is coherent with the usage of list_del_init() in usb_hcd_unlink_urb_from_ep() and usb_giveback_urb_bh() and its explicit initialization in usb_hcd_submit_urb() error path. Signed-off-by: Emiliano Ingrassia Cc: stable Link: https://lore.kernel.org/r/20191127160355.GA27196@ingrassia.epigenesys.com Signed-off-by: Greg Kroah-Hartman commit 5c388abefda0d92355714010c0199055c57ab6c7 Author: Wen Yang Date: Tue Nov 26 22:04:52 2019 +0800 usb: typec: fix use after free in typec_register_port() We can't use "port->sw" and/or "port->mux" after it has been freed. Fixes: 23481121c81d ("usb: typec: class: Don't use port parent for getting mux handles") Signed-off-by: Wen Yang Cc: stable Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Heikki Krogerus  Link: https://lore.kernel.org/r/20191126140452.14048-1-wenyang@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit 1848a543191ae32e558bb0a5974ae7c38ebd86fc Author: Wen Yang Date: Sun Nov 24 22:22:36 2019 +0800 usb: roles: fix a potential use after free Free the sw structure only after we are done using it. This patch just moves the put_device() down a bit to avoid the use after free. Fixes: 5c54fcac9a9d ("usb: roles: Take care of driver module reference counting") Signed-off-by: Wen Yang Reviewed-by: Heikki Krogerus Reviewed-by: Peter Chen Cc: stable Cc: Hans de Goede Cc: Chunfeng Yun Cc: Suzuki K Poulose Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191124142236.25671-1-wenyang@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit f26a9e959a7b1588c59f7a919b41b67175b211d8 Author: Chris Wilson Date: Mon Dec 9 02:32:15 2019 +0000 drm/i915/gt: Detect if we miss WaIdleLiteRestore In order to avoid confusing the HW, we must never submit an empty ring during lite-restore, that is we should always advance the RING_TAIL before submitting to stay ahead of the RING_HEAD. Normally this is prevented by keeping a couple of spare NOPs in the request->wa_tail so that on resubmission we can advance the tail. This relies on the request only being resubmitted once, which is the normal condition as it is seen once for ELSP[1] and then later in ELSP[0]. On preemption, the requests are unwound and the tail reset back to the normal end point (as we know the request is incomplete and therefore its RING_HEAD is even earlier). However, if this w/a should fail we would try and resubmit the request with the RING_TAIL already set to the location of this request's wa_tail potentially causing a GPU hang. We can spot when we do try and incorrectly resubmit without advancing the RING_TAIL and spare any embarrassment by forcing the context restore. In the case of preempt-to-busy, we leave the requests running on the HW while we unwind. As the ring is still live, we cannot rewind our rq->tail without forcing a reload so leave it set to rq->wa_tail and only force a reload if we resubmit after a lite-restore. (Normally, the forced reload will be a part of the preemption event.) Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") Closes: https://gitlab.freedesktop.org/drm/intel/issues/673 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Cc: stable@kernel.vger.org Link: https://patchwork.freedesktop.org/patch/msgid/20191209023215.3519970-1-chris@chris-wilson.co.uk (cherry picked from commit 82c69bf58650e644c61aa2bf5100b63a1070fd2f) Signed-off-by: Joonas Lahtinen commit 3ce8209735e120db6f0ef739480e3dc7e2cb6763 Author: Ville Syrjälä Date: Wed Dec 4 20:05:41 2019 +0200 drm/i915/hdcp: Nuke intel_hdcp_transcoder_config() intel_hdcp_transcoder_config() is clobbering some globally visible state in .compute_config(). That is a big no no as .compute_config() is supposed to have no visible side effects when either the commit fails or it's just a TEST_ONLY commit. Inline this stuff into intel_hdcp_enable() so that the state only gets modified when we actually commit the state to the hardware. Cc: Ramalingam C Cc: Jani Nikula Cc: Uma Shankar Fixes: 39e2df090c3c ("drm/i915/hdcp: update current transcoder into intel_hdcp") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191204180549.1267-2-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C (cherry picked from commit 67e1d5ed85a83e232a9e0b995f5778a86722b96e) Signed-off-by: Joonas Lahtinen commit 0eb8e74f7202a4a98bbc0c1adeed3986cf50b66a Author: Ville Syrjälä Date: Wed Nov 27 22:12:09 2019 +0200 drm/i915/fbc: Disable fbc by default on all glk+ We're missing a workaround in the fbc code for all glk+ platforms which can cause corruption around the top of the screen. So enabling fbc by default is a bad idea. I'm not keen to backport the w/a so let's start by disabling fbc by default on all glk+. We'll lift the restriction once the w/a is in place. Cc: stable@vger.kernel.org Cc: Daniel Drake Cc: Paulo Zanoni Cc: Jian-Hong Pan Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst (cherry picked from commit cd8c021b36a66833cefe2c90a79a9e312a2a5690) Signed-off-by: Joonas Lahtinen commit 177e876af8d291d0351db3bae84b483e4722c4a7 Author: Umesh Nerlige Ramappa Date: Fri Dec 6 11:43:39 2019 -0800 drm/i915/perf: Configure OAR for specific context Gen12 supports saving/restoring render counters per context. Apply OAR configuration only for the context that is passed in to perf. v2: - Fix OACTXCONTROL value to only stop/resume counters. - Remove gen12_update_reg_state_unlocked as power state is already applied by the caller. v3: (Lionel) - Move register initialization into the array - Assume a valid oa_config in enable_metric_set Signed-off-by: Umesh Nerlige Ramappa Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL") Reviewed-by: Lionel Landwerlin Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191206194339.31356-2-umesh.nerlige.ramappa@intel.com (cherry picked from commit ccdeed497042676e13fc1625e2a341880eff5da5) Signed-off-by: Joonas Lahtinen commit 2a264a0fd4dc9aa7900fd181c3a6464027cb4df1 Author: Umesh Nerlige Ramappa Date: Fri Dec 6 11:43:38 2019 -0800 drm/i915/perf: Allow non-privileged access when OA buffer is not sampled SAMPLE_OA_REPORT enables sampling of OA reports from the OA buffer. Since reports from OA buffer had system wide visibility, collecting samples from the OA buffer was a privileged operation on previous platforms. Prior to TGL, it was also necessary to sample the OA buffer to normalize reports from MI REPORT PERF COUNT. TGL has a dedicated OAR unit to sample perf reports for a specific render context. This removes the necessity to sample OA buffer. - If not sampling the OA buffer, allow non-privileged access. An earlier patch allows the non-privilege access: https://patchwork.freedesktop.org/patch/337716/?series=68582&rev=1 - Clear up the path for non-privileged access in this patch Signed-off-by: Umesh Nerlige Ramappa Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL") Reviewed-by: Lionel Landwerlin Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191206194339.31356-1-umesh.nerlige.ramappa@intel.com (cherry picked from commit 322d56aa3145a28445907ecc638a2c3aa3295c6b) Signed-off-by: Joonas Lahtinen commit 78baee8d3b976a6a6a2c208e3a36d3f1e6297e6c Author: Daniel Vetter Date: Wed Dec 4 22:51:05 2019 +0100 MAINTAINERS: Match on dma_buf|fence|resv anywhere I've spent a bit too much time reviewing all kinds of users all over the kernel for this buffer sharing infrastructure. And some of it is at least questionable. Make sure we at least see when this stuff flies by. Acked-by: Alex Deucher Acked-by: Thierry Reding Acked-by: Sumit Semwal Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Cc: Sumit Semwal Cc: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Link: https://patchwork.freedesktop.org/patch/msgid/20191204215105.874074-1-daniel.vetter@ffwll.ch commit ed9ed5a89acba51b82bdff61144d4e4a4245ec8a Author: Johan Hovold Date: Mon Dec 2 09:56:10 2019 +0100 staging: gigaset: add endpoint-type sanity check Add missing endpoint-type sanity checks to probe. This specifically prevents a warning in USB core on URB submission when fuzzing USB descriptors. Signed-off-by: Johan Hovold Cc: stable Link: https://lore.kernel.org/r/20191202085610.12719-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 84f60ca7b326ed8c08582417493982fe2573a9ad Author: Johan Hovold Date: Mon Dec 2 09:56:09 2019 +0100 staging: gigaset: fix illegal free on probe errors The driver failed to initialise its receive-buffer pointer, something which could lead to an illegal free on late probe errors. Fix this by making sure to clear all driver data at allocation. Fixes: 2032e2c2309d ("usb_gigaset: code cleanup") Cc: stable # 2.6.33 Cc: Tilman Schmidt Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191202085610.12719-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 53f35a39c3860baac1e5ca80bf052751cfb24a99 Author: Johan Hovold Date: Mon Dec 2 09:56:08 2019 +0100 staging: gigaset: fix general protection fault on probe Fix a general protection fault when accessing the endpoint descriptors which could be triggered by a malicious device due to missing sanity checks on the number of endpoints. Reported-by: syzbot+35b1c403a14f5c89eba7@syzkaller.appspotmail.com Fixes: 07dc1f9f2f80 ("[PATCH] isdn4linux: Siemens Gigaset drivers - M105 USB DECT adapter") Cc: stable # 2.6.17 Cc: Hansjoerg Lipp Cc: Tilman Schmidt Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191202085610.12719-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit d2cdb20507fe2079a146459f9718b45d78cbbe61 Author: Marcelo Diop-Gonzalez Date: Tue Dec 3 10:39:21 2019 -0500 staging: vchiq: call unregister_chrdev_region() when driver registration fails This undoes the previous call to alloc_chrdev_region() on failure, and is probably what was meant originally given the label name. Signed-off-by: Marcelo Diop-Gonzalez Cc: stable Fixes: 187ac53e590c ("staging: vchiq_arm: rework probe and init functions") Reviewed-by: Dan Carpenter Reviewed-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20191203153921.70540-1-marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman commit 1af73a25e6e7d9f2f1e2a14259cc9ffce6d8f6d4 Author: Brendan Higgins Date: Wed Dec 4 15:45:22 2019 -0800 staging: exfat: fix multiple definition error of `rename_file' `rename_file' was exported but not properly namespaced causing a multiple definition error because `rename_file' is already defined in fs/hostfs/hostfs_user.c: ld: drivers/staging/exfat/exfat_core.o: in function `rename_file': drivers/staging/exfat/exfat_core.c:2327: multiple definition of `rename_file'; fs/hostfs/hostfs_user.o:fs/hostfs/hostfs_user.c:350: first defined here make: *** [Makefile:1077: vmlinux] Error 1 This error can be reproduced on ARCH=um by selecting: CONFIG_EXFAT_FS=y CONFIG_HOSTFS=y Add a namespace prefix exfat_* to fix this error. Reported-by: Brendan Higgins Signed-off-by: Brendan Higgins Cc: stable Cc: Valdis Kletnieks Tested-by: David Gow Reviewed-by: David Gow Link: https://lore.kernel.org/r/20191204234522.42855-1-brendanhiggins@google.com Signed-off-by: Greg Kroah-Hartman commit 2740bd3351cd5a4351f458aabaa1c9b77de3867b Author: Kay Friedrich Date: Wed Nov 27 12:24:57 2019 +0100 staging/wlan-ng: add CRC32 dependency in Kconfig wlan-ng uses the function crc32_le, but CRC32 wasn't a dependency of wlan-ng Co-developed-by: Michael Kupfer Signed-off-by: Michael Kupfer Signed-off-by: Kay Friedrich Link: https://lore.kernel.org/r/20191127112457.2301-1-kay.friedrich@fau.de Signed-off-by: Greg Kroah-Hartman commit 2f4d984b9544e03ef9435a750f4cc7de1df61051 Author: YueHaibing Date: Wed Nov 13 10:13:06 2019 +0800 staging: hp100: Fix build error without ETHERNET It should depends on ETHERNET, otherwise building fails: drivers/staging/hp/hp100.o: In function `hp100_pci_remove': hp100.c:(.text+0x165): undefined reference to `unregister_netdev' hp100.c:(.text+0x214): undefined reference to `free_netdev' Fixes: 52340b82cf1a ("hp100: Move 100BaseVG AnyLAN driver to staging") Signed-off-by: YueHaibing Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20191113021306.35464-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 453a4b6d8e1bdff2b8e1f56f4b8a8ef6d36b0e77 Author: Linus Walleij Date: Thu Dec 5 00:32:30 2019 +0100 staging: fbtft: Do not hardcode SPI CS polarity inversion The current use of the mode flag SPI_CS_HIGH is fragile: it overwrites anything already assigned by the SPI core. Assign ^= SPI_CS_HIGH since we might be active high already, and that is usually the case with GPIOs used for chip select, even if they are in practice active low. Add a comment clarifying why ^= SPI_CS_HIGH is the right choice here. Reported-by: Mark Brown Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191204233230.22309-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1184fd9966702a5a1cea73bdb6fe646b961c387c Author: Andrea Righi Date: Thu Dec 5 16:29:13 2019 +0100 staging: exfat: properly support discard in clr_alloc_bitmap() Currently the discard code in clr_alloc_bitmap() is just dead code. Move code around so that the discard operation is properly attempted when enabled. Signed-off-by: Andrea Righi Link: https://lore.kernel.org/r/20191205152913.GJ3276@xps-13 Signed-off-by: Greg Kroah-Hartman commit a58d37bce0d21cf7fbd589384c619e465ef2f927 Author: Frederic Barrat Date: Mon Jun 24 16:41:48 2019 +0200 ocxl: Fix concurrent AFU open and device removal If an ocxl device is unbound through sysfs at the same time its AFU is being opened by a user process, the open code may dereference freed stuctures, which can lead to kernel oops messages. You'd have to hit a tiny time window, but it's possible. It's fairly easy to test by making the time window bigger artificially. Fix it with a combination of 2 changes: - when an AFU device is found in the IDR by looking for the device minor number, we should hold a reference on the device until after the context is allocated. A reference on the AFU structure is kept when the context is allocated, so we can release the reference on the device after the context allocation. - with the fix above, there's still another even tinier window, between the time the AFU device is found in the IDR and the reference on the device is taken. We can fix this one by removing the IDR entry earlier, when the device setup is removed, instead of waiting for the 'release' device callback. With proper locking around the IDR. Fixes: 75ca758adbaf ("ocxl: Create a clear delineation between ocxl backend & frontend") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Frederic Barrat Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190624144148.32022-1-fbarrat@linux.ibm.com commit 7d42b7961b9198efc75ee5192eab7d03e691d692 Author: Guenter Roeck Date: Mon Dec 2 06:18:36 2019 -0800 staging/octeon: Mark Ethernet driver as BROKEN The code doesn't compile due to incompatible pointer errors such as drivers/staging/octeon/ethernet-tx.c:649:50: error: passing argument 1 of 'cvmx_wqe_get_grp' from incompatible pointer type This is due to mixing, for example, cvmx_wqe_t with 'struct cvmx_wqe'. Unfortunately, one can not just revert the primary offending commit, as doing so results in secondary errors. This is made worse by the fact that the "removed" typedefs still exist and are used widely outside the staging directory, making the entire set of "remove typedef" changes pointless and wrong. Reflect reality and mark the driver as BROKEN. Fixes: ef1fe6b7369a ("staging: octeon: remove typedef declaration for cvmx_wqe") Fixes: 73aef0c9d2c6 ("staging: octeon: remove typedef declaration for cvmx_helper_link_info") Cc: Wambui Karuga Cc: Julia Lawall Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20191202141836.9363-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 0df36b90c47d93295b7e393da2d961b2f3b6cde4 Author: Luca Coelho Date: Thu Dec 5 09:03:54 2019 +0200 iwlwifi: pcie: move power gating workaround earlier in the flow We need to reset the NIC after setting the bits to enable power gating and that cannot be done too late in the flow otherwise it cleans other registers and things that were already configured, causing initialization to fail. In order to fix this, move the function to the common code in trans.c so it can be called directly from there at an earlier point, just after the reset we already do during initialization. Fixes: 9a47cb988338 ("iwlwifi: pcie: add workaround for power gating in integrated 22000") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205719 Cc: stable@ver.kernel.org # 5.4+ Reported-by: Anders Kaseorg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit db5cce1afc8d2475d2c1c37c2a8267dd0e151526 Author: Anders Kaseorg Date: Mon Dec 2 17:09:20 2019 -0500 Revert "iwlwifi: assign directly to iwl_trans->cfg in QuZ detection" This reverts commit 968dcfb4905245dc64d65312c0d17692fa087b99. Both that commit and commit 809805a820c6445f7a701ded24fdc6bbc841d1e4 attempted to fix the same bug (dead assignments to the local variable cfg), but they did so in incompatible ways. When they were both merged, independently of each other, the combination actually caused the bug to reappear, leading to a firmware crash on boot for some cards. https://bugzilla.kernel.org/show_bug.cgi?id=205719 Signed-off-by: Anders Kaseorg Acked-by: Luca Coelho Signed-off-by: Kalle Valo commit cc90bc68422318eb8e75b15cd74bc8d538a7df29 Author: Andreas Gruenbacher Date: Mon Dec 9 20:11:14 2019 +0100 block: fix "check bi_size overflow before merge" This partially reverts commit e3a5d8e386c3fb973fa75f2403622a8f3640ec06. Commit e3a5d8e386c3 ("check bi_size overflow before merge") adds a bio_full check to __bio_try_merge_page. This will cause __bio_try_merge_page to fail when the last bi_io_vec has been reached. Instead, what we want here is only the bi_size overflow check. Fixes: e3a5d8e386c3 ("block: check bi_size overflow before merge") Cc: stable@vger.kernel.org # v5.4+ Reviewed-by: Ming Lei Signed-off-by: Andreas Gruenbacher Signed-off-by: Jens Axboe commit 868afbaca1e2a7923e48b5e8c07be34660525db5 Author: Stephan Gerhold Date: Mon Dec 9 19:53:43 2019 +0100 NFC: nxp-nci: Fix probing without ACPI devm_acpi_dev_add_driver_gpios() returns -ENXIO if CONFIG_ACPI is disabled (e.g. on device tree platforms). In this case, nxp-nci will silently fail to probe. The other NFC drivers only log a debug message if devm_acpi_dev_add_driver_gpios() fails. Do the same in nxp-nci to fix this problem. Fixes: ad0acfd69add ("NFC: nxp-nci: Get rid of code duplication in ->probe()") Cc: Andy Shevchenko Signed-off-by: Stephan Gerhold Acked-by: Andy Shevchenko Signed-off-by: David S. Miller commit 281393894af9cc3f9483204475014e89d728987c Author: Steve French Date: Mon Dec 9 19:47:10 2019 -0600 smb3: fix refcount underflow warning on unmount when no directory leases Fix refcount underflow warning when unmounting to servers which didn't grant directory leases. [ 301.680095] refcount_t: underflow; use-after-free. [ 301.680192] WARNING: CPU: 1 PID: 3569 at lib/refcount.c:28 refcount_warn_saturate+0xb4/0xf3 ... [ 301.682139] Call Trace: [ 301.682240] close_shroot+0x97/0xda [cifs] [ 301.682351] SMB2_tdis+0x7c/0x176 [cifs] [ 301.682456] ? _get_xid+0x58/0x91 [cifs] [ 301.682563] cifs_put_tcon.part.0+0x99/0x202 [cifs] [ 301.682637] ? ida_free+0x99/0x10a [ 301.682727] ? cifs_umount+0x3d/0x9d [cifs] [ 301.682829] cifs_put_tlink+0x3a/0x50 [cifs] [ 301.682929] cifs_umount+0x44/0x9d [cifs] Fixes: 72e73c78c446 ("cifs: close the shared root handle on tree disconnect") Signed-off-by: Steve French Acked-by: Ronnie Sahlberg Reviewed-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky Reported-and-tested-by: Arthur Marsh commit bba340c79bfe3644829db5c852fdfa9e33837d6d Author: Bo Wu Date: Wed Nov 20 13:26:17 2019 +0000 scsi: iscsi: Avoid potential deadlock in iscsi_if_rx func In iscsi_if_rx func, after receiving one request through iscsi_if_recv_msg func, iscsi_if_send_reply will be called to try to reply to the request in a do-while loop. If the iscsi_if_send_reply function keeps returning -EAGAIN, a deadlock will occur. For example, a client only send msg without calling recvmsg func, then it will result in the watchdog soft lockup. The details are given as follows: sock_fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ISCSI); retval = bind(sock_fd, (struct sock addr*) & src_addr, sizeof(src_addr); while (1) { state_msg = sendmsg(sock_fd, &msg, 0); //Note: recvmsg(sock_fd, &msg, 0) is not processed here. } close(sock_fd); watchdog: BUG: soft lockup - CPU#7 stuck for 22s! [netlink_test:253305] Sample time: 4000897528 ns(HZ: 250) Sample stat: curr: user: 675503481560, nice: 321724050, sys: 448689506750, idle: 4654054240530, iowait: 40885550700, irq: 14161174020, softirq: 8104324140, st: 0 deta: user: 0, nice: 0, sys: 3998210100, idle: 0, iowait: 0, irq: 1547170, softirq: 242870, st: 0 Sample softirq: TIMER: 992 SCHED: 8 Sample irqstat: irq 2: delta 1003, curr: 3103802, arch_timer CPU: 7 PID: 253305 Comm: netlink_test Kdump: loaded Tainted: G OE Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 pstate: 40400005 (nZcv daif +PAN -UAO) pc : __alloc_skb+0x104/0x1b0 lr : __alloc_skb+0x9c/0x1b0 sp : ffff000033603a30 x29: ffff000033603a30 x28: 00000000000002dd x27: ffff800b34ced810 x26: ffff800ba7569f00 x25: 00000000ffffffff x24: 0000000000000000 x23: ffff800f7c43f600 x22: 0000000000480020 x21: ffff0000091d9000 x20: ffff800b34eff200 x19: ffff800ba7569f00 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0001000101000100 x13: 0000000101010000 x12: 0101000001010100 x11: 0001010101010001 x10: 00000000000002dd x9 : ffff000033603d58 x8 : ffff800b34eff400 x7 : ffff800ba7569200 x6 : ffff800b34eff400 x5 : 0000000000000000 x4 : 00000000ffffffff x3 : 0000000000000000 x2 : 0000000000000001 x1 : ffff800b34eff2c0 x0 : 0000000000000300 Call trace: __alloc_skb+0x104/0x1b0 iscsi_if_rx+0x144/0x12bc [scsi_transport_iscsi] netlink_unicast+0x1e0/0x258 netlink_sendmsg+0x310/0x378 sock_sendmsg+0x4c/0x70 sock_write_iter+0x90/0xf0 __vfs_write+0x11c/0x190 vfs_write+0xac/0x1c0 ksys_write+0x6c/0xd8 __arm64_sys_write+0x24/0x30 el0_svc_common+0x78/0x130 el0_svc_handler+0x38/0x78 el0_svc+0x8/0xc Link: https://lore.kernel.org/r/EDBAAA0BBBA2AC4E9C8B6B81DEEE1D6915E3D4D2@dggeml505-mbx.china.huawei.com Signed-off-by: Bo Wu Reviewed-by: Zhiqiang Liu Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit 5480e299b5ae57956af01d4839c9fc88a465eeab Author: Bart Van Assche Date: Mon Dec 9 09:34:57 2019 -0800 scsi: iscsi: Fix a potential deadlock in the timeout handler Some time ago the block layer was modified such that timeout handlers are called from thread context instead of interrupt context. Make it safe to run the iSCSI timeout handler in thread context. This patch fixes the following lockdep complaint: ================================ WARNING: inconsistent lock state 5.5.1-dbg+ #11 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. kworker/7:1H/206 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff88802d9827e8 (&(&session->frwd_lock)->rlock){+.?.}, at: iscsi_eh_cmd_timed_out+0xa6/0x6d0 [libiscsi] {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x106/0x240 _raw_spin_lock+0x38/0x50 iscsi_check_transport_timeouts+0x3e/0x210 [libiscsi] call_timer_fn+0x132/0x470 __run_timers.part.0+0x39f/0x5b0 run_timer_softirq+0x63/0xc0 __do_softirq+0x12d/0x5fd irq_exit+0xb3/0x110 smp_apic_timer_interrupt+0x131/0x3d0 apic_timer_interrupt+0xf/0x20 default_idle+0x31/0x230 arch_cpu_idle+0x13/0x20 default_idle_call+0x53/0x60 do_idle+0x38a/0x3f0 cpu_startup_entry+0x24/0x30 start_secondary+0x222/0x290 secondary_startup_64+0xa4/0xb0 irq event stamp: 1383705 hardirqs last enabled at (1383705): [] _raw_spin_unlock_irq+0x2c/0x50 hardirqs last disabled at (1383704): [] _raw_spin_lock_irq+0x18/0x50 softirqs last enabled at (1383690): [] iscsi_queuecommand+0x76a/0xa20 [libiscsi] softirqs last disabled at (1383682): [] iscsi_queuecommand+0x118/0xa20 [libiscsi] other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&session->frwd_lock)->rlock); lock(&(&session->frwd_lock)->rlock); *** DEADLOCK *** 2 locks held by kworker/7:1H/206: #0: ffff8880d57bf928 ((wq_completion)kblockd){+.+.}, at: process_one_work+0x472/0xab0 #1: ffff88802b9c7de8 ((work_completion)(&q->timeout_work)){+.+.}, at: process_one_work+0x476/0xab0 stack backtrace: CPU: 7 PID: 206 Comm: kworker/7:1H Not tainted 5.5.1-dbg+ #11 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 Workqueue: kblockd blk_mq_timeout_work Call Trace: dump_stack+0xa5/0xe6 print_usage_bug.cold+0x232/0x23b mark_lock+0x8dc/0xa70 __lock_acquire+0xcea/0x2af0 lock_acquire+0x106/0x240 _raw_spin_lock+0x38/0x50 iscsi_eh_cmd_timed_out+0xa6/0x6d0 [libiscsi] scsi_times_out+0xf4/0x440 [scsi_mod] scsi_timeout+0x1d/0x20 [scsi_mod] blk_mq_check_expired+0x365/0x3a0 bt_iter+0xd6/0xf0 blk_mq_queue_tag_busy_iter+0x3de/0x650 blk_mq_timeout_work+0x1af/0x380 process_one_work+0x56d/0xab0 worker_thread+0x7a/0x5d0 kthread+0x1bc/0x210 ret_from_fork+0x24/0x30 Fixes: 287922eb0b18 ("block: defer timeouts to a workqueue") Cc: Christoph Hellwig Cc: Keith Busch Cc: Lee Duncan Cc: Chris Leech Cc: Link: https://lore.kernel.org/r/20191209173457.187370-1-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit a2bdd0c904da12b223c8d7218e98138d4e6d9f4f Author: Paul Menzel Date: Mon Dec 9 16:06:53 2019 +0100 scsi: smartpqi: Update attribute name to `driver_version` The file name in the documentation is currently incorrect, so fix it. Link: https://lore.kernel.org/r/fe264d62-0371-ea59-b66a-6d855290ce65@molgen.mpg.de Fixes: 6d90615f1346 ("scsi: smartpqi: add sysfs entries") Signed-off-by: Paul Menzel Signed-off-by: Martin K. Petersen commit f70267f379b5e5e11bdc5d72a56bf17e5feed01f Author: Jason Yan Date: Fri Dec 6 09:11:18 2019 +0800 scsi: libsas: stop discovering if oob mode is disconnected The discovering of sas port is driven by workqueue in libsas. When libsas is processing port events or phy events in workqueue, new events may rise up and change the state of some structures such as asd_sas_phy. This may cause some problems such as follows: ==>thread 1 ==>thread 2 ==>phy up ==>phy_up_v3_hw() ==>oob_mode = SATA_OOB_MODE; ==>phy down quickly ==>hisi_sas_phy_down() ==>sas_ha->notify_phy_event() ==>sas_phy_disconnected() ==>oob_mode = OOB_NOT_CONNECTED ==>workqueue wakeup ==>sas_form_port() ==>sas_discover_domain() ==>sas_get_port_device() ==>oob_mode is OOB_NOT_CONNECTED and device is wrongly taken as expander This at last lead to the panic when libsas trying to issue a command to discover the device. [183047.614035] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000058 [183047.622896] Mem abort info: [183047.625762] ESR = 0x96000004 [183047.628893] Exception class = DABT (current EL), IL = 32 bits [183047.634888] SET = 0, FnV = 0 [183047.638015] EA = 0, S1PTW = 0 [183047.641232] Data abort info: [183047.644189] ISV = 0, ISS = 0x00000004 [183047.648100] CM = 0, WnR = 0 [183047.651145] user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000b7df67be [183047.657834] [0000000000000058] pgd=0000000000000000 [183047.662789] Internal error: Oops: 96000004 [#1] SMP [183047.667740] Process kworker/u16:2 (pid: 31291, stack limit = 0x00000000417c4974) [183047.675208] CPU: 0 PID: 3291 Comm: kworker/u16:2 Tainted: G W OE 4.19.36-vhulk1907.1.0.h410.eulerosv2r8.aarch64 #1 [183047.687015] Hardware name: N/A N/A/Kunpeng Desktop Board D920S10, BIOS 0.15 10/22/2019 [183047.695007] Workqueue: 0000:74:02.0_disco_q sas_discover_domain [183047.700999] pstate: 20c00009 (nzCv daif +PAN +UAO) [183047.705864] pc : prep_ata_v3_hw+0xf8/0x230 [hisi_sas_v3_hw] [183047.711510] lr : prep_ata_v3_hw+0xb0/0x230 [hisi_sas_v3_hw] [183047.717153] sp : ffff00000f28ba60 [183047.720541] x29: ffff00000f28ba60 x28: ffff8026852d7228 [183047.725925] x27: ffff8027dba3e0a8 x26: ffff8027c05fc200 [183047.731310] x25: 0000000000000000 x24: ffff8026bafa8dc0 [183047.736695] x23: ffff8027c05fc218 x22: ffff8026852d7228 [183047.742079] x21: ffff80007c2f2940 x20: ffff8027c05fc200 [183047.747464] x19: 0000000000f80800 x18: 0000000000000010 [183047.752848] x17: 0000000000000000 x16: 0000000000000000 [183047.758232] x15: ffff000089a5a4ff x14: 0000000000000005 [183047.763617] x13: ffff000009a5a50e x12: ffff8026bafa1e20 [183047.769001] x11: ffff0000087453b8 x10: ffff00000f28b870 [183047.774385] x9 : 0000000000000000 x8 : ffff80007e58f9b0 [183047.779770] x7 : 0000000000000000 x6 : 000000000000003f [183047.785154] x5 : 0000000000000040 x4 : ffffffffffffffe0 [183047.790538] x3 : 00000000000000f8 x2 : 0000000002000007 [183047.795922] x1 : 0000000000000008 x0 : 0000000000000000 [183047.801307] Call trace: [183047.803827] prep_ata_v3_hw+0xf8/0x230 [hisi_sas_v3_hw] [183047.809127] hisi_sas_task_prep+0x750/0x888 [hisi_sas_main] [183047.814773] hisi_sas_task_exec.isra.7+0x88/0x1f0 [hisi_sas_main] [183047.820939] hisi_sas_queue_command+0x28/0x38 [hisi_sas_main] [183047.826757] smp_execute_task_sg+0xec/0x218 [183047.831013] smp_execute_task+0x74/0xa0 [183047.834921] sas_discover_expander.part.7+0x9c/0x5f8 [183047.839959] sas_discover_root_expander+0x90/0x160 [183047.844822] sas_discover_domain+0x1b8/0x1e8 [183047.849164] process_one_work+0x1b4/0x3f8 [183047.853246] worker_thread+0x54/0x470 [183047.856981] kthread+0x134/0x138 [183047.860283] ret_from_fork+0x10/0x18 [183047.863931] Code: f9407a80 528000e2 39409281 72a04002 (b9405800) [183047.870097] kernel fault(0x1) notification starting on CPU 0 [183047.875828] kernel fault(0x1) notification finished on CPU 0 [183047.881559] Modules linked in: unibsp(OE) hns3(OE) hclge(OE) hnae3(OE) mem_drv(OE) hisi_sas_v3_hw(OE) hisi_sas_main(OE) [183047.892418] ---[ end trace 4cc26083fc11b783 ]--- [183047.897107] Kernel panic - not syncing: Fatal exception [183047.902403] kernel fault(0x5) notification starting on CPU 0 [183047.908134] kernel fault(0x5) notification finished on CPU 0 [183047.913865] SMP: stopping secondary CPUs [183047.917861] Kernel Offset: disabled [183047.921422] CPU features: 0x2,a2a00a38 [183047.925243] Memory Limit: none [183047.928372] kernel reboot(0x2) notification starting on CPU 0 [183047.934190] kernel reboot(0x2) notification finished on CPU 0 [183047.940008] ---[ end Kernel panic - not syncing: Fatal exception ]--- Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") Link: https://lore.kernel.org/r/20191206011118.46909-1-yanaijie@huawei.com Reported-by: Gao Chuan Reviewed-by: John Garry Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit d168001d14eccfda229b4a41a2c31a21e3c379da Author: sheebab Date: Tue Dec 3 11:07:15 2019 +0100 scsi: ufs: Disable autohibern8 feature in Cadence UFS This patch disables autohibern8 feature in Cadence UFS. The autohibern8 feature has issues due to which unexpected interrupt trigger is happening. After the interrupt issue is sorted out, autohibern8 feature will be re-enabled Link: https://lore.kernel.org/r/1575367635-22662-1-git-send-email-sheebab@cadence.com Cc: Signed-off-by: sheebab Reviewed-by: Alim Akhtar Tested-by: Vignesh Raghavendra Signed-off-by: Martin K. Petersen commit fee92f25777789d73e1936b91472e9c4644457c8 Author: Dan Carpenter Date: Tue Dec 3 12:45:09 2019 +0300 scsi: iscsi: qla4xxx: fix double free in probe On this error path we call qla4xxx_mem_free() and then the caller also calls qla4xxx_free_adapter() which calls qla4xxx_mem_free(). It leads to a couple double frees: drivers/scsi/qla4xxx/ql4_os.c:8856 qla4xxx_probe_adapter() warn: 'ha->chap_dma_pool' double freed drivers/scsi/qla4xxx/ql4_os.c:8856 qla4xxx_probe_adapter() warn: 'ha->fw_ddb_dma_pool' double freed Fixes: afaf5a2d341d ("[SCSI] Initial Commit of qla4xxx") Link: https://lore.kernel.org/r/20191203094421.hw7ex7qr3j2rbsmx@kili.mountain Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 8c850a0296004409e7bcb9464712fb2807da656a Author: Can Guo Date: Tue Dec 3 06:58:40 2019 +0000 scsi: ufs: Give an unique ID to each ufs-bsg Considering there can be multiple UFS hosts in SoC, give each ufs-bsg an unique ID by appending the scsi host number to its device name. Link: https://lore.kernel.org/r/0101016eca8dc9d7-d24468d3-04d2-4ef3-a906-abe8b8cbcd3d-000000@us-west-2.amazonses.com Fixes: df032bf27a41 ("scsi: ufs: Add a bsg endpoint that supports UPIUs") Signed-off-by: Can Guo Reviewed-by: Avri Altman Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 9545767db3cde2d4f9ca581d096d97ed00754282 Author: Roman Bolshakov Date: Mon Nov 25 19:57:02 2019 +0300 scsi: qla2xxx: Add debug dump of LOGO payload and ELS IOCB The change adds a way to debug LOGO ELS, likewise PLOGI. Link: https://lore.kernel.org/r/20191125165702.1013-14-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Acked-by: Quinn Tran Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit af22f0c7b052c5c203207f1e5ebd6aa65f87c538 Author: Roman Bolshakov Date: Mon Nov 25 19:57:01 2019 +0300 scsi: qla2xxx: Ignore PORT UPDATE after N2N PLOGI PORT UPDATE asynchronous event is generated on the host that issues PLOGI ELS (in the case of higher WWPN). In that case, the event shouldn't be handled as it sets unwanted DPC flags (i.e. LOOP_RESYNC_NEEDED) that trigger link flap. Ignore the event if the host has higher WWPN, but handle otherwise. Cc: Quinn Tran Link: https://lore.kernel.org/r/20191125165702.1013-13-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit dabc5ec915f3a2c657ecfb529cd3d4ec303a4412 Author: Roman Bolshakov Date: Mon Nov 25 19:57:00 2019 +0300 scsi: qla2xxx: Don't defer relogin unconditonally qla2x00_configure_local_loop sets RELOGIN_NEEDED bit and calls qla24xx_fcport_handle_login to perform the login. This bit triggers a wake up of DPC later after a successful login. The deferred call is not needed if login succeeds, and it's set in qla24xx_fcport_handle_login in case of errors, hence it should be safe to drop. Link: https://lore.kernel.org/r/20191125165702.1013-12-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Acked-by: Quinn Tran Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 5e6b01d84b9d20bcd77fc7c4733a2a4149bf220a Author: Roman Bolshakov Date: Mon Nov 25 19:56:59 2019 +0300 scsi: qla2xxx: Send Notify ACK after N2N PLOGI qlt_handle_login schedules session for deletion even if a login is in progress. That causes login bouncing, i.e. a few logins are made before it settles down. Complete the first login by sending Notify Acknowledge IOCB via qlt_plogi_ack_unref if the session is pending login completion. Fixes: 9cd883f07a54 ("scsi: qla2xxx: Fix session cleanup for N2N") Cc: Krishna Kant Cc: Alexei Potashnik Link: https://lore.kernel.org/r/20191125165702.1013-11-r.bolshakov@yadro.com Acked-by: Quinn Tran Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit fd1de5830a5abaf444cc4312871e02c41e24fdc1 Author: Roman Bolshakov Date: Mon Nov 25 19:56:58 2019 +0300 scsi: qla2xxx: Configure local loop for N2N target qla2x00_configure_local_loop initializes PLOGI payload for PLOGI ELS using Get Parameters mailbox command. In the case when the driver is running in target mode, the topology is N2N and the target port has higher WWPN, LOCAL_LOOP_UPDATE bit is cleared too early and PLOGI payload is not initialized by the Get Parameters command. That causes a failure of ELS IOCB carrying the PLOGI with 0x15 aka Data Underrun error. LOCAL_LOOP_UPDATE has to be set to initialize PLOGI payload. Fixes: 48acad099074 ("scsi: qla2xxx: Fix N2N link re-connect") Link: https://lore.kernel.org/r/20191125165702.1013-10-r.bolshakov@yadro.com Acked-by: Quinn Tran Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 0334cdea1fba36fad8bdf9516f267ce01de625f7 Author: Roman Bolshakov Date: Mon Nov 25 19:56:57 2019 +0300 scsi: qla2xxx: Fix PLOGI payload and ELS IOCB dump length The size of the buffer is hardcoded as 0x70 or 112 bytes, while the size of ELS IOCB is 0x40 and the size of PLOGI payload returned by Get Parameters command is 0x74. Cc: Quinn Tran Link: https://lore.kernel.org/r/20191125165702.1013-9-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 2c2f4bed9b6299e6430a65a29b5d27b8763fdf25 Author: Roman Bolshakov Date: Mon Nov 25 19:56:56 2019 +0300 scsi: qla2xxx: Don't call qlt_async_event twice MBA_PORT_UPDATE generates duplicate log lines in target mode because qlt_async_event is called twice. Drop the calls within the case as the function will be called right after the switch statement. Cc: Quinn Tran Link: https://lore.kernel.org/r/20191125165702.1013-8-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Acked-by: Himanshu Madhani Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit a9ed06d4e640a8dc978a4649ab78dac8b16d2db6 Author: Roman Bolshakov Date: Mon Nov 25 19:56:55 2019 +0300 scsi: qla2xxx: Allow PLOGI in target mode According to FC-LS-3 (Fibre Channel Link Services) 6.3.2.4 "N_Port Login - No Fabric present", if both parties in the point-to-point connection know N_Port_Names of each other, Nx_Port with the highest N_Port_name shall transmit PLOGI. The specification sets no restrictions on the port role that should send PLOGI. However, FCP-4 (Fibre Channel Protocol for SCSI, Fourth Version) 6.2 "Overview of Process Login and Process Logout", instructs that in point-to-point topology, initiator shall send explicit PRLI ELS. The change fixes stuck P2P login, when target WWPN is higher than initiator WWPN. Cc: Quinn Tran Cc: Himanshu Madhani Link: https://lore.kernel.org/r/20191125165702.1013-7-r.bolshakov@yadro.com Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 58e39a2ce4be08162c0368030cdc405f7fd849aa Author: Roman Bolshakov Date: Mon Nov 25 19:56:54 2019 +0300 scsi: qla2xxx: Change discovery state before PLOGI When a port sends PLOGI, discovery state should be changed to login pending, otherwise RELOGIN_NEEDED bit is set in qla24xx_handle_plogi_done_event(). RELOGIN_NEEDED triggers another PLOGI, and it never goes out of the loop until login timer expires. Fixes: 8777e4314d397 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine") Fixes: 8b5292bcfcacf ("scsi: qla2xxx: Fix Relogin to prevent modifying scan_state flag") Cc: Quinn Tran Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191125165702.1013-6-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 600954e6f2df695434887dfc6a99a098859990cf Author: Roman Bolshakov Date: Mon Nov 25 19:56:53 2019 +0300 scsi: qla2xxx: Drop superfluous INIT_WORK of del_work del_work is already initialized inside qla2x00_alloc_fcport, there's no need to overwrite it. Indeed, it might prevent complete traversal of workqueue list. Fixes: a01c77d2cbc45 ("scsi: qla2xxx: Move session delete to driver work queue") Cc: Quinn Tran Link: https://lore.kernel.org/r/20191125165702.1013-5-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 4c86b037a6db3ad2922ef3ba8a8989eb7794e040 Author: Roman Bolshakov Date: Mon Nov 25 19:56:52 2019 +0300 scsi: qla2xxx: Initialize free_work before flushing it Target creation triggers a new BUG_ON introduced in in commit 4d43d395fed1 ("workqueue: Try to catch flush_work() without INIT_WORK()."). The BUG_ON reveals an attempt to flush free_work in qla24xx_do_nack_work before it's initialized in qlt_unreg_sess: WARNING: CPU: 7 PID: 211 at kernel/workqueue.c:3031 __flush_work.isra.38+0x40/0x2e0 CPU: 7 PID: 211 Comm: kworker/7:1 Kdump: loaded Tainted: G E 5.3.0-rc7-vanilla+ #2 Workqueue: qla2xxx_wq qla2x00_iocb_work_fn [qla2xxx] NIP: c000000000159620 LR: c0080000009d91b0 CTR: c0000000001598c0 REGS: c000000005f3f730 TRAP: 0700 Tainted: G E (5.3.0-rc7-vanilla+) MSR: 800000000282b033 CR: 24002222 XER: 00000000 CFAR: c0000000001598d0 IRQMASK: 0 GPR00: c0080000009d91b0 c000000005f3f9c0 c000000001670a00 c0000003f8655ca8 GPR04: c0000003f8655c00 000000000000ffff 0000000000000011 ffffffffffffffff GPR08: c008000000949228 0000000000000000 0000000000000001 c0080000009e7780 GPR12: 0000000000002200 c00000003fff6200 c000000000161bc8 0000000000000004 GPR16: c0000003f9d68280 0000000002000000 0000000000000005 0000000000000003 GPR20: 0000000000000002 000000000000ffff 0000000000000000 fffffffffffffef7 GPR24: c000000004f73848 c000000004f73838 c000000004f73f28 c000000005f3fb60 GPR28: c000000004f73e48 c000000004f73c80 c000000004f73818 c0000003f9d68280 NIP [c000000000159620] __flush_work.isra.38+0x40/0x2e0 LR [c0080000009d91b0] qla24xx_do_nack_work+0x88/0x180 [qla2xxx] Call Trace: [c000000005f3f9c0] [c000000000159644] __flush_work.isra.38+0x64/0x2e0 (unreliable) [c000000005f3fa50] [c0080000009d91a0] qla24xx_do_nack_work+0x78/0x180 [qla2xxx] [c000000005f3fae0] [c0080000009496ec] qla2x00_do_work+0x604/0xb90 [qla2xxx] [c000000005f3fc40] [c008000000949cd8] qla2x00_iocb_work_fn+0x60/0xe0 [qla2xxx] [c000000005f3fc80] [c000000000157bb8] process_one_work+0x2c8/0x5b0 [c000000005f3fd10] [c000000000157f28] worker_thread+0x88/0x660 [c000000005f3fdb0] [c000000000161d64] kthread+0x1a4/0x1b0 [c000000005f3fe20] [c00000000000b960] ret_from_kernel_thread+0x5c/0x7c Instruction dump: 3d22001d 892966b1 7d908026 91810008 f821ff71 69290001 0b090000 2e290000 40920200 e9230018 7d2a0074 794ad182 <0b0a0000> 2fa90000 419e01e8 7c0802a6 ---[ end trace 5ccf335d4f90fcb8 ]--- Fixes: 1021f0bc2f3d6 ("scsi: qla2xxx: allow session delete to finish before create.") Cc: Quinn Tran Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191125165702.1013-4-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 86196a8fa8a84af1395a28ea0548f2ce6ae9bc22 Author: Quinn Tran Date: Mon Nov 25 19:56:51 2019 +0300 scsi: qla2xxx: Use explicit LOGO in target mode Target makes implicit LOGO on session teardown. LOGO ELS is not send on the wire and initiator is not aware that target no longer wants talking to it. Initiator keeps sending I/O requests, target responds with BA_RJT, they time out and then initiator sends ABORT TASK (ABTS-LS). Current behaviour incurs unneeded I/O timeout and can be fixed for some initiators by making explicit LOGO on session deletion. Link: https://lore.kernel.org/r/20191125165702.1013-3-r.bolshakov@yadro.com Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit f2c9ee54a56995a293efef290657d8a1d80e14ab Author: Roman Bolshakov Date: Mon Nov 25 19:56:50 2019 +0300 scsi: qla2xxx: Ignore NULL pointer in tcm_qla2xxx_free_mcmd If ABTS cannot be completed in target mode, the driver attempts to free related management command and crashes: NIP [d000000019181ee8] tcm_qla2xxx_free_mcmd+0x40/0x80 [tcm_qla2xxx] LR [d00000001dc1e6f8] qlt_response_pkt+0x190/0xa10 [qla2xxx] Call Trace: [c000003fff27bb50] [c000003fff27bc10] 0xc000003fff27bc10 (unreliable) [c000003fff27bb70] [d00000001dc1e6f8] qlt_response_pkt+0x190/0xa10 [qla2xxx] [c000003fff27bc10] [d00000001dbc2be0] qla24xx_process_response_queue+0x5d8/0xbd0 [qla2xxx] [c000003fff27bd50] [d00000001dbc632c] qla24xx_msix_rsp_q+0x64/0x150 [qla2xxx] [c000003fff27bde0] [c000000000187200] __handle_irq_event_percpu+0x90/0x310 [c000003fff27bea0] [c0000000001874b8] handle_irq_event_percpu+0x38/0x90 [c000003fff27bee0] [c000000000187574] handle_irq_event+0x64/0xb0 [c000003fff27bf10] [c00000000018cd38] handle_fasteoi_irq+0xe8/0x280 [c000003fff27bf40] [c000000000185ccc] generic_handle_irq+0x4c/0x70 [c000003fff27bf60] [c000000000016cec] __do_irq+0x7c/0x1d0 [c000003fff27bf90] [c00000000002a530] call_do_irq+0x14/0x24 [c00000207d2cba90] [c000000000016edc] do_IRQ+0x9c/0x130 [c00000207d2cbae0] [c000000000008bf4] hardware_interrupt_common+0x114/0x120 --- interrupt: 501 at arch_local_irq_restore+0x74/0x90 LR = arch_local_irq_restore+0x74/0x90 [c00000207d2cbdd0] [c0000000001c64fc] tick_broadcast_oneshot_control+0x4c/0x60 (unreliable) [c00000207d2cbdf0] [c0000000007ac840] cpuidle_enter_state+0xf0/0x450 [c00000207d2cbe50] [c00000000016b81c] call_cpuidle+0x4c/0x90 [c00000207d2cbe70] [c00000000016bc30] do_idle+0x2b0/0x330 [c00000207d2cbec0] [c00000000016beec] cpu_startup_entry+0x3c/0x50 [c00000207d2cbef0] [c00000000004a06c] start_secondary+0x63c/0x670 [c00000207d2cbf90] [c00000000000aa6c] start_secondary_prolog+0x10/0x14 The crash can be triggered by ACL deletion when there's active I/O. During ACL deletion, qla2xxx performs implicit LOGO that's invisible for the initiator. Only the driver and firmware are aware of the logout. Therefore the initiator continues to send SCSI commands and the target always responds with SAM STATUS BUSY as it can't find the session. The command times out after a while and initiator invokes ABORT TASK TMF for the command. The TMF is mapped to ABTS-LS in FCP. The target can't find session for S_ID originating ABTS-LS so it never allocates mcmd. And since N_Port handle was deleted after LOGO, it is no longer valid and ABTS Response IOCB is returned from firmware with status 31. Then free_mcmd is invoked on NULL pointer and the kernel crashes. [ 7734.578642] qla2xxx [0000:00:0c.0]-e837:6: ABTS_RECV_24XX: instance 0 [ 7734.578644] qla2xxx [0000:00:0c.0]-f811:6: qla_target(0): task abort (s_id=1:2:0, tag=1209504, param=0) [ 7734.578645] find_sess_by_s_id: 0x010200 [ 7734.578645] Unable to locate s_id: 0x010200 [ 7734.578646] qla2xxx [0000:00:0c.0]-f812:6: qla_target(0): task abort for non-existent session [ 7734.578648] qla2xxx [0000:00:0c.0]-e806:6: Sending task mgmt ABTS response (ha=c0000000d5819000, atio=c0000000d3fd4700, status=4 [ 7734.578730] qla2xxx [0000:00:0c.0]-e838:6: ABTS_RESP_24XX: compl_status 31 [ 7734.578732] qla2xxx [0000:00:0c.0]-e863:6: qla_target(0): ABTS_RESP_24XX failed 31 (subcode 19:a) [ 7734.578740] Unable to handle kernel paging request for data at address 0x00000200 Fixes: 6b0431d6fa20b ("scsi: qla2xxx: Fix out of order Termination and ABTS response") Cc: Quinn Tran Cc: Bart Van Assche Cc: Thomas Abraham Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191125165702.1013-2-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit b9ea0bae260f6aae546db224daa6ac1bd9d94b91 Author: Rafael J. Wysocki Date: Wed Dec 4 02:54:27 2019 +0100 ACPI: PM: Avoid attaching ACPI PM domain to certain devices Certain ACPI-enumerated devices represented as platform devices in Linux, like fans, require special low-level power management handling implemented by their drivers that is not in agreement with the ACPI PM domain behavior. That leads to problems with managing ACPI fans during system-wide suspend and resume. For this reason, make acpi_dev_pm_attach() skip the affected devices by adding a list of device IDs to avoid to it and putting the IDs of the affected devices into that list. Fixes: e5cc8ef31267 (ACPI / PM: Provide ACPI PM callback routines for subsystems) Reported-by: Zhang Rui Tested-by: Todd Brandt Cc: 3.10+ # 3.10+ Signed-off-by: Rafael J. Wysocki commit 30388cc075720aa0af4f2cb5933afa1f8f39d313 Author: Guillaume La Roque Date: Thu Dec 5 14:19:00 2019 +0100 arm64: dts: meson-sm1-sei610: add gpio bluetooth interrupt add gpio irq to support interrupt trigger mode. Signed-off-by: Guillaume La Roque Signed-off-by: Kevin Hilman commit 4881873f4cc1460f63d85fa81363d56be328ccdc Author: Martin Blumenstingl Date: Sat Nov 30 19:53:37 2019 +0100 dt-bindings: reset: meson8b: fix duplicate reset IDs According to the public S805 datasheet the RESET2 register uses the following bits for the PIC_DC, PSC and NAND reset lines: - PIC_DC is at bit 3 (meaning: RESET_VD_RMEM + 3) - PSC is at bit 4 (meaning: RESET_VD_RMEM + 4) - NAND is at bit 5 (meaning: RESET_VD_RMEM + 4) Update the reset IDs of these three reset lines so they don't conflict with PIC_DC and map to the actual hardware reset lines. Fixes: 79795e20a184eb ("dt-bindings: reset: Add bindings for the Meson SoC Reset Controller") Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit c67aafd60d7e323fe74bf45fab60148f84cf9b95 Author: Martin Blumenstingl Date: Sat Nov 30 15:58:21 2019 +0100 soc: amlogic: meson-ee-pwrc: propagate errors from pm_genpd_init() pm_genpd_init() can return an error. Propagate the error code to prevent the driver from indicating that it successfully probed while there were errors during pm_genpd_init(). Fixes: eef3c2ba0a42a6 ("soc: amlogic: Add support for Everything-Else power domains controller") Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 0766d65e6afaea8b80205a468207de9f18cd7ec8 Author: Martin Blumenstingl Date: Sat Nov 30 15:58:20 2019 +0100 soc: amlogic: meson-ee-pwrc: propagate PD provider registration errors of_genpd_add_provider_onecell() can return an error. Propagate the error so the driver registration fails when of_genpd_add_provider_onecell() did not work. Fixes: eef3c2ba0a42a6 ("soc: amlogic: Add support for Everything-Else power domains controller") Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 9a1b0b9a6dab452fb0e39fe96880c4faf3878369 Author: Bo Wu Date: Sat Dec 7 03:22:46 2019 +0000 scsi: lpfc: Fix memory leak on lpfc_bsg_write_ebuf_set func When phba->mbox_ext_buf_ctx.seqNum != phba->mbox_ext_buf_ctx.numBuf, dd_data should be freed before return SLI_CONFIG_HANDLED. When lpfc_sli_issue_mbox func return fails, pmboxq should be also freed in job_error tag. Link: https://lore.kernel.org/r/EDBAAA0BBBA2AC4E9C8B6B81DEEE1D6915E7A966@DGGEML525-MBS.china.huawei.com Signed-off-by: Bo Wu Reviewed-by: Zhiqiang Liu Reviewed-by: James Smart Signed-off-by: Martin K. Petersen commit c868907e1ac6a08a17f8fa9ce482c0a496896e9e Author: Michael Hernandez Date: Tue Dec 3 14:36:57 2019 -0800 scsi: qla2xxx: Fix incorrect SFUB length used for Secure Flash Update MB Cmd SFUB length should be in DWORDs when passed to FW. Fixes: 3f006ac342c03 ("scsi: qla2xxx: Secure flash update support for ISP28XX") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191203223657.22109-4-hmadhani@marvell.com Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit a530bf691f0e4691214562c165e6c8889dc51e57 Author: Michael Hernandez Date: Tue Dec 3 14:36:56 2019 -0800 scsi: qla2xxx: Added support for MPI and PEP regions for ISP28XX This patch adds support for MPI/PEP region updates which is required with secure flash updates for ISP28XX. Fixes: 3f006ac342c0 ("scsi: qla2xxx: Secure flash update support for ISP28XX") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191203223657.22109-3-hmadhani@marvell.com Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 4e71dcae0c4cd1e9d19b8b3d80214a4bcdca5a42 Author: Himanshu Madhani Date: Tue Dec 3 14:36:55 2019 -0800 scsi: qla2xxx: Correctly retrieve and interpret active flash region ISP27XX/28XX supports multiple flash regions. This patch fixes issue where active flash region was not interpreted correctly during secure flash update process. [mkp: typo] Fixes: 5fa8774c7f38c ("scsi: qla2xxx: Add 28xx flash primary/secondary status/image mechanism") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191203223657.22109-2-hmadhani@marvell.com Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 991a34593bad5047420d281737b074cc6f821af4 Author: Davide Caratti Date: Mon Dec 9 17:58:52 2019 +0100 tc-testing: unbreak full listing of tdc testcases the following command currently fails: [root@fedora tc-testing]# ./tdc.py -l The following test case IDs are not unique: {'6f5e'} Please correct them before continuing. this happens because there are two tests having the same id: [root@fedora tc-testing]# grep -r 6f5e tc-tests/* tc-tests/actions/pedit.json: "id": "6f5e", tc-tests/filters/basic.json: "id": "6f5e", fix it replacing the latest duplicate id with a brand new one: [root@fedora tc-testing]# sed -i 's/6f5e//1' tc-tests/filters/basic.json [root@fedora tc-testing]# ./tdc.py -i Fixes: 4717b05328ba ("tc-testing: Introduced tdc tests for basic filter") Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit a288f105a03a7e0e629a8da2b31f34ebf0343ee2 Author: Chuhong Yuan Date: Tue Dec 10 00:22:07 2019 +0800 fjes: fix missed check in fjes_acpi_add fjes_acpi_add() misses a check for platform_device_register_simple(). Add a check to fix it. Fixes: 658d439b2292 ("fjes: Introduce FUJITSU Extended Socket Network Device driver") Signed-off-by: Chuhong Yuan Signed-off-by: David S. Miller commit b43d1f9f7067c6759b1051e8ecb84e82cef569fe Author: Mao Wenan Date: Mon Dec 9 21:31:25 2019 +0800 af_packet: set defaule value for tmo There is softlockup when using TPACKET_V3: ... NMI watchdog: BUG: soft lockup - CPU#2 stuck for 60010ms! (__irq_svc) from [] (_raw_spin_unlock_irqrestore+0x44/0x54) (_raw_spin_unlock_irqrestore) from [] (mod_timer+0x210/0x25c) (mod_timer) from [] (prb_retire_rx_blk_timer_expired+0x68/0x11c) (prb_retire_rx_blk_timer_expired) from [] (call_timer_fn+0x90/0x17c) (call_timer_fn) from [] (run_timer_softirq+0x2d4/0x2fc) (run_timer_softirq) from [] (__do_softirq+0x218/0x318) (__do_softirq) from [] (irq_exit+0x88/0xac) (irq_exit) from [] (msa_irq_exit+0x11c/0x1d4) (msa_irq_exit) from [] (handle_IPI+0x650/0x7f4) (handle_IPI) from [] (gic_handle_irq+0x108/0x118) (gic_handle_irq) from [] (__irq_usr+0x44/0x5c) ... If __ethtool_get_link_ksettings() is failed in prb_calc_retire_blk_tmo(), msec and tmo will be zero, so tov_in_jiffies is zero and the timer expire for retire_blk_timer is turn to mod_timer(&pkc->retire_blk_timer, jiffies + 0), which will trigger cpu usage of softirq is 100%. Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.") Tested-by: Xiao Jiangfeng Signed-off-by: Mao Wenan Signed-off-by: David S. Miller commit 8a2b22203f8596729c54eba221b4044351bfe167 Author: Grygorii Strashko Date: Mon Dec 9 13:19:24 2019 +0200 net: ethernet: ti: davinci_cpdma: fix warning "device driver frees DMA memory with different size" The TI CPSW(s) driver produces warning with DMA API debug options enabled: WARNING: CPU: 0 PID: 1033 at kernel/dma/debug.c:1025 check_unmap+0x4a8/0x968 DMA-API: cpsw 48484000.ethernet: device driver frees DMA memory with different size [device address=0x00000000abc6aa02] [map size=64 bytes] [unmap size=42 bytes] CPU: 0 PID: 1033 Comm: ping Not tainted 5.3.0-dirty #41 Hardware name: Generic DRA72X (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xd8/0x110) [] (dump_stack) from [] (__warn+0xe0/0x10c) [] (__warn) from [] (warn_slowpath_fmt+0x44/0x6c) [] (warn_slowpath_fmt) from [] (check_unmap+0x4a8/0x968) [] (check_unmap) from [] (debug_dma_unmap_page+0x80/0x90) [] (debug_dma_unmap_page) from [] (__cpdma_chan_free+0x114/0x16c) [] (__cpdma_chan_free) from [] (__cpdma_chan_process+0x158/0x17c) [] (__cpdma_chan_process) from [] (cpdma_chan_process+0x3c/0x5c) [] (cpdma_chan_process) from [] (cpsw_tx_mq_poll+0x48/0x94) [] (cpsw_tx_mq_poll) from [] (net_rx_action+0x108/0x4e4) [] (net_rx_action) from [] (__do_softirq+0xec/0x598) [] (__do_softirq) from [] (do_softirq.part.4+0x68/0x74) [] (do_softirq.part.4) from [] (__local_bh_enable_ip+0x124/0x17c) [] (__local_bh_enable_ip) from [] (ip_finish_output2+0x294/0xb7c) [] (ip_finish_output2) from [] (ip_output+0x210/0x364) [] (ip_output) from [] (ip_send_skb+0x1c/0xf8) [] (ip_send_skb) from [] (raw_sendmsg+0x9a8/0xc74) [] (raw_sendmsg) from [] (sock_sendmsg+0x14/0x24) [] (sock_sendmsg) from [] (__sys_sendto+0xbc/0x100) [] (__sys_sendto) from [] (__sys_trace_return+0x0/0x14) Exception stack(0xea9a7fa8 to 0xea9a7ff0) ... The reason is that cpdma_chan_submit_si() now stores original buffer length (sw_len) in CPDMA descriptor instead of adjusted buffer length (hw_len) used to map the buffer. Hence, fix an issue by passing correct buffer length in CPDMA descriptor. Cc: Ivan Khoronzhuk Fixes: 6670acacd59e ("net: ethernet: ti: davinci_cpdma: add dma mapped submit") Signed-off-by: Grygorii Strashko Reviewed-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit 7da538c1e154635e1f84b2fc41e482680e770844 Merge: f8fc57e8d7c5 7acd9378dc65 Author: David S. Miller Date: Mon Dec 9 14:03:33 2019 -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) Wait for rcu grace period after releasing netns in ctnetlink, from Florian Westphal. 2) Incorrect command type in flowtable offload ndo invocation, from wenxu. 3) Incorrect callback type in flowtable offload flow tuple updates, also from wenxu. 4) Fix compile warning on flowtable offload infrastructure due to possible reference to uninitialized variable, from Nathan Chancellor. 5) Do not inline nf_ct_resolve_clash(), this is called from slow path / stress situations. From Florian Westphal. 6) Missing IPv6 flow selector description in flowtable offload. 7) Missing check for NETDEV_UNREGISTER in nf_tables offload infrastructure, from wenxu. 8) Update NAT selftest to use randomized netns names, from Florian Westphal. 9) Restore nfqueue bridge support, from Marco Oliverio. 10) Compilation warning in SCTP_CHUNKMAP_*() on xt_sctp header. From Phil Sutter. 11) Fix bogus lookup/get match for non-anonymous rbtree sets. 12) Missing netlink validation for NFT_SET_ELEM_INTERVAL_END elements. 13) Missing netlink validation for NFT_DATA_VALUE after nft_data_init(). 14) If rule specifies no actions, offload infrastructure returns EOPNOTSUPP. 15) Module refcount leak in object updates. 16) Missing sanitization for ARP traffic from br_netfilter, from Eric Dumazet. 17) Compilation breakage on big-endian due to incorrect memcpy() size in the flowtable offload infrastructure. ==================== Signed-off-by: David S. Miller commit 46c9585ed4af688ff1be6d4e76d7ed2f04de4fba Author: Martin Blumenstingl Date: Sun Nov 17 16:41:54 2019 +0100 ARM: dts: meson8: fix the size of the PMU registers The PMU registers are at least 0x18 bytes wide. Meson8b already uses a size of 0x18. The structure of the PMU registers on Meson8 and Meson8b is similar but not identical. Meson8 and Meson8b have the following registers in common (starting at AOBUS + 0xe0): #define AO_RTI_PWR_A9_CNTL0 0xe0 (0x38 << 2) #define AO_RTI_PWR_A9_CNTL1 0xe4 (0x39 << 2) #define AO_RTI_GEN_PWR_SLEEP0 0xe8 (0x3a << 2) #define AO_RTI_GEN_PWR_ISO0 0x4c (0x3b << 2) Meson8b additionally has these three registers: #define AO_RTI_GEN_PWR_ACK0 0xf0 (0x3c << 2) #define AO_RTI_PWR_A9_MEM_PD0 0xf4 (0x3d << 2) #define AO_RTI_PWR_A9_MEM_PD1 0xf8 (0x3e << 2) Thus we can assume that the register size of the PMU IP blocks is identical on both SoCs (and Meson8 just contains some reserved registers in that area) because the CEC registers start right after the PMU (AO_RTI_*) registers at AOBUS + 0x100 (0x40 << 2). The upcoming power domain driver will need to read and write the AO_RTI_GEN_PWR_SLEEP0 and AO_RTI_GEN_PWR_ISO0 registers, so the updated size is needed for that driver to work. Fixes: 4a5a27116b447d ("ARM: dts: meson8: add support for booting the secondary CPU cores") Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit f424da7f78a7fbc17bc66216c2b3664b22d30a27 Author: Kevin Hilman Date: Wed Nov 13 16:41:40 2019 -0800 arm64: dts: meson-sm1-sei610: gpio-keys: switch to IRQs Switch the GPIO buttons/switches to use interrupts instead of polling. While at it, add the mic mute switch and the power button. Signed-off-by: Kevin Hilman commit 6794862a16ef41f753abd75c03a152836e4c8028 Merge: 184b8f7f91ca 78f926f72e43 Author: Linus Torvalds Date: Mon Dec 9 12:14:31 2019 -0800 Merge tag 'for-5.5-rc1-kconfig-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs Kconfig fix from David Sterba: "This adds the config dependency integrating the crypto code and btrfs support for blake2b (added in this dev cycle, via different trees). Without it the option had to be selected manually" * tag 'for-5.5-rc1-kconfig-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: add Kconfig dependency for BLAKE2B commit da08e1e1d7c3f805f8771ad6a6fd3a7a30ba4fe2 Author: Xiubo Li Date: Tue Nov 26 07:24:20 2019 -0500 ceph: add more debug info when decoding mdsmap Show the laggy state. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit bd84fbcb319852f7aeaabc0db5bdeb87e3337bf3 Author: Xiubo Li Date: Tue Dec 3 03:00:51 2019 -0500 ceph: switch to global cap helper __ceph_is_any_caps is a duplicate helper. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit bba1560bd4a46aa0d16bb7d81abd9d0eb47dea36 Author: Xiubo Li Date: Tue Nov 26 07:32:22 2019 -0500 ceph: trigger the reclaim work once there has enough pending caps The nr in ceph_reclaim_caps_nr() is very possibly larger than 1, so we may miss it and the reclaim work couldn't triggered as expected. Signed-off-by: Xiubo Li Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 3a3430affce5de301fc8e6e50fa3543d7597820e Author: Jeff Layton Date: Wed Nov 20 12:00:59 2019 -0500 ceph: show tasks waiting on caps in debugfs caps file Add some visibility of tasks that are waiting for caps to the "caps" debugfs file. Display the tgid of the waiting task, inode number, and the caps the task needs and wants. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit ad8c28a9eb81ca90fda29f48cfb4d19305943737 Author: Jeff Layton Date: Mon Sep 9 15:58:55 2019 -0400 ceph: convert int fields in ceph_mount_options to unsigned int Most of these values should never be negative, so convert them to unsigned values. Add some sanity checking to the parsed values, and clean up some unneeded casts. Note that while caps_max should never be negative, this patch leaves it signed, since this value ends up later being compared to a signed counter. Just ensure that userland never passes in a negative value for caps_max. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 184b8f7f91ca7938c09533df83ce84817e682975 Merge: 316eaf170252 969bea5e4d8b Author: Linus Torvalds Date: Mon Dec 9 11:48:21 2019 -0800 Merge tag 'printk-for-5.5-pr-warning-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull pr_warning() removal from Petr Mladek. - Final removal of the unused pr_warning() alias. You're supposed to use just "pr_warn()" in the kernel. * tag 'printk-for-5.5-pr-warning-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: checkpatch: Drop pr_warning check printk: Drop pr_warning definition Fix up for "printk: Drop pr_warning definition" workqueue: Use pr_warn instead of pr_warning commit 7acd9378dc65296b2531758aa62ee9bcf55b371c Author: Pablo Neira Ayuso Date: Sat Dec 7 18:38:12 2019 +0100 netfilter: nf_flow_table_offload: Correct memcpy size for flow_overload_mangle() In function 'memcpy', inlined from 'flow_offload_mangle' at net/netfilter/nf_flow_table_offload.c:112:2, inlined from 'flow_offload_port_dnat' at net/netfilter/nf_flow_table_offload.c:373:2, inlined from 'nf_flow_rule_route_ipv4' at net/netfilter/nf_flow_table_offload.c:424:3: ./include/linux/string.h:376:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter 376 | __read_overflow2(); | ^~~~~~~~~~~~~~~~~~ The original u8* was done in the hope to make this more adaptable but consensus is to keep this like it is in tc pedit. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Reported-by: Laura Abbott Signed-off-by: Pablo Neira Ayuso commit 480136343cbe89426d6c2ab74ffb4e3ee572c7ee Author: Takashi Sakamoto Date: Tue Dec 10 00:05:41 2019 +0900 ALSA: fireface: fix return value in error path of isochronous resources reservation Even if isochronous resources reservation fails, error code doesn't return in pcm.hw_params callback. Cc: #5.3+ Fixes: 55162d2bb0e8 ("ALSA: fireface: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191209151655.GA8090@workstation Signed-off-by: Takashi Iwai commit 59a126aa3113fc23f03fedcafe3705f1de5aff50 Author: Takashi Sakamoto Date: Tue Dec 10 00:03:04 2019 +0900 ALSA: oxfw: fix return value in error path of isochronous resources reservation Even if isochronous resources reservation fails, error code doesn't return in pcm.hw_params callback. Cc: #5.3+ Fixes: 4f380d007052 ("ALSA: oxfw: configure packet format in pcm.hw_params callback") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191209151655.GA8090@workstation Signed-off-by: Takashi Iwai commit 316eaf170252f3b50e0d7d5d17ac1f0ee8ae70ef Merge: e42617b825f8 6e456dca47c5 Author: Linus Torvalds Date: Mon Dec 9 10:59:00 2019 -0800 Merge tag 'thermal-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal fixes from Zhang Rui: "Starting from this release cycle, we have Daniel Lezcano work as the new thermal co-maintainer because Eduardo's email is bouncing for sometime and we can not reach him. We also have a new shared git tree so that both Daniel and I can actively working on it. Specifics: - Update MAINTAINER file for new thermal co-maintainer and new thermal git tree address. (Daniel Lezcano, Florian Fainelli, Zhang Rui) - Fix a Kconfig warning. (YueHaibing)" * tag 'thermal-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: MAINTAINERS: thermal: Change the git tree location MAINTAINERS: thermal: Add Daniel Lezcano as the thermal maintainer MAINTAINERS: thermal: Eduardo's email is bouncing thermal: power_allocator: Fix Kconfig warning commit 2030abddec6884aaf5892f5724c48fc340e6826f Author: Steve Wise Date: Mon Dec 2 20:03:20 2019 -0600 rxe: correctly calculate iCRC for unaligned payloads If RoCE PDUs being sent or received contain pad bytes, then the iCRC is miscalculated, resulting in PDUs being emitted by RXE with an incorrect iCRC, as well as ingress PDUs being dropped due to erroneously detecting a bad iCRC in the PDU. The fix is to include the pad bytes, if any, in iCRC computations. Note: This bug has caused broken on-the-wire compatibility with actual hardware RoCE devices since the soft-RoCE driver was first put into the mainstream kernel. Fixing it will create an incompatibility with the original soft-RoCE devices, but is necessary to be compatible with real hardware devices. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Steve Wise Link: https://lore.kernel.org/r/20191203020319.15036-2-larrystevenwise@gmail.com Signed-off-by: Doug Ledford commit 71bbac6e2f23e946875475ce2fb9f6752900d463 Author: Steve Wise Date: Mon Dec 2 20:03:18 2019 -0600 Update mailmap info for Steve Wise Signed-off-by: Steve Wise Link: https://lore.kernel.org/r/20191203020319.15036-1-larrystevenwise@gmail.com Signed-off-by: Doug Ledford commit 3194d2533efffae8b815d84729ecc58b6a9000ab Author: Christophe Leroy Date: Mon Dec 9 15:27:27 2019 +0000 spi: fsl: don't map irq during probe With lastest kernel, the following warning is observed at startup: [ 1.500609] ------------[ cut here ]------------ [ 1.505225] remove_proc_entry: removing non-empty directory 'irq/22', leaking at least 'fsl_spi' [ 1.514234] WARNING: CPU: 0 PID: 1 at fs/proc/generic.c:682 remove_proc_entry+0x198/0x1c0 [ 1.522403] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.0-s3k-dev-02248-g93532430a4ff #2564 [ 1.530724] NIP: c0197694 LR: c0197694 CTR: c0050d80 [ 1.535762] REGS: df4a5af0 TRAP: 0700 Not tainted (5.4.0-02248-g93532430a4ff) [ 1.543818] MSR: 00029032 CR: 22028222 XER: 00000000 [ 1.550524] [ 1.550524] GPR00: c0197694 df4a5ba8 df4a0000 00000054 00000000 00000000 00004a38 00000010 [ 1.550524] GPR08: c07c5a30 00000800 00000000 00001032 22000208 00000000 c0004b14 00000000 [ 1.550524] GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 c0830000 c07fc078 [ 1.550524] GPR24: c08e8ca0 df665d10 df60ea98 c07c9db8 00000001 df5d5ae3 df5d5a80 df43f8e3 [ 1.585327] NIP [c0197694] remove_proc_entry+0x198/0x1c0 [ 1.590628] LR [c0197694] remove_proc_entry+0x198/0x1c0 [ 1.595829] Call Trace: [ 1.598280] [df4a5ba8] [c0197694] remove_proc_entry+0x198/0x1c0 (unreliable) [ 1.605321] [df4a5bd8] [c0067acc] unregister_irq_proc+0x5c/0x70 [ 1.611238] [df4a5bf8] [c005fbc4] free_desc+0x3c/0x80 [ 1.616286] [df4a5c18] [c005fe2c] irq_free_descs+0x70/0xa8 [ 1.621778] [df4a5c38] [c033d3fc] of_fsl_spi_probe+0xdc/0x3cc [ 1.627525] [df4a5c88] [c02f0f64] platform_drv_probe+0x44/0xa4 [ 1.633350] [df4a5c98] [c02eee44] really_probe+0x1ac/0x418 [ 1.638829] [df4a5cc8] [c02ed3e8] bus_for_each_drv+0x64/0xb0 [ 1.644481] [df4a5cf8] [c02ef950] __device_attach+0xd4/0x128 [ 1.650132] [df4a5d28] [c02ed61c] bus_probe_device+0xa0/0xbc [ 1.655783] [df4a5d48] [c02ebbe8] device_add+0x544/0x74c [ 1.661096] [df4a5d88] [c0382b78] of_platform_device_create_pdata+0xa4/0x100 [ 1.668131] [df4a5da8] [c0382cf4] of_platform_bus_create+0x120/0x20c [ 1.674474] [df4a5df8] [c0382d50] of_platform_bus_create+0x17c/0x20c [ 1.680818] [df4a5e48] [c0382e88] of_platform_bus_probe+0x9c/0xf0 [ 1.686907] [df4a5e68] [c0751404] __machine_initcall_cmpcpro_cmpcpro_declare_of_platform_devices+0x74/0x1a4 [ 1.696629] [df4a5e98] [c072a4cc] do_one_initcall+0x8c/0x1d4 [ 1.702282] [df4a5ef8] [c072a768] kernel_init_freeable+0x154/0x204 [ 1.708455] [df4a5f28] [c0004b2c] kernel_init+0x18/0x110 [ 1.713769] [df4a5f38] [c00122ac] ret_from_kernel_thread+0x14/0x1c [ 1.719926] Instruction dump: [ 1.722889] 2c030000 4182004c 3863ffb0 3c80c05f 80e3005c 388436a0 3c60c06d 7fa6eb78 [ 1.730630] 7fe5fb78 38840280 38634178 4be8c611 <0fe00000> 4bffff6c 3c60c071 7fe4fb78 [ 1.738556] ---[ end trace 05d0720bf2e352e2 ]--- The problem comes from the error path which calls irq_dispose_mapping() while the IRQ has been requested with devm_request_irq(). IRQ doesn't need to be mapped with irq_of_parse_and_map(). The only need is to get the IRQ virtual number. For that, use of_irq_to_resource() instead of the irq_of_parse_and_map()/irq_dispose_mapping() pair. Fixes: 500a32abaf81 ("spi: fsl: Call irq_dispose_mapping in err path") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/518cfb83347d5372748e7fe72f94e2e9443d0d4a.1575905123.git.christophe.leroy@c-s.fr Signed-off-by: Mark Brown commit a841e2853e1afecc2ee692b8cc5bff606bc84e4c Author: Chuhong Yuan Date: Fri Dec 6 15:55:00 2019 +0800 spi: spi-cavium-thunderx: Add missing pci_release_regions() The driver forgets to call pci_release_regions() in probe failure and remove. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191206075500.18525-1-hslester96@gmail.com Signed-off-by: Mark Brown commit 6d30fc511bec82dd8801b9bb8718cbeea1366ad8 Author: Cristian Marussi Date: Mon Dec 9 12:52:39 2019 +0000 regulator: core: avoid unneeded .list_voltage calls Inside machine_constraints_voltage() a loop is in charge of verifying that each of the defined voltages are within the configured constraints and that those constraints are in fact compatible with the available voltages' list. When the registered regulator happens to be defined with a wide range of possible voltages the above O(n) loop can be costly. Moreover since this behaviour is triggered during the registration process, it means also that it can be easily triggered at probe time, slowing down considerably some module loading. On the other side if such wide range of voltage values happens to be also continuous and without discontinuity of any kind, the above potentially cumbersome operation is also useless. For these reasons, avoid such .list_voltage poll loop when regulator is described as 'continuous_voltage_range' as is, indeed, similarly already done inside regulator_is_supported_voltage(). Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20191209125239.46054-1-cristian.marussi@arm.com Signed-off-by: Mark Brown commit cd4c2493fa588e43ad9e066594698c9bd55d28a4 Author: Mike Rapoport Date: Mon Dec 9 17:31:35 2019 +0200 ARC: mm: drop stale define of __ARCH_USE_5LEVEL_HACK Commit 6aae3425aa9c ("ARC: mm: remove __ARCH_USE_5LEVEL_HACK") make ARC paging code 5-level compliant but left behind a stale define of __ARCH_USE_5LEVEL_HACK in arch/arc/include/asm/hugepage.h. Remove it. Signed-off-by: Mike Rapoport Signed-off-by: Vineet Gupta commit 1928b36cfa4df1aeedf5f2644d0c33f3a1fcfd7b Author: Randy Dunlap Date: Tue Nov 26 17:54:09 2019 -0800 arc: eznps: fix allmodconfig kconfig warning Fix kconfig warning for arch/arc/plat-eznps/Kconfig allmodconfig: WARNING: unmet direct dependencies detected for CLKSRC_NPS Depends on [n]: GENERIC_CLOCKEVENTS [=y] && !PHYS_ADDR_T_64BIT [=y] Selected by [y]: - ARC_PLAT_EZNPS [=y] Signed-off-by: Randy Dunlap Cc: Vineet Gupta Cc: Ofer Levi Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Vineet Gupta commit c593642c8be046915ca3a4a300243a68077cd207 Author: Pankaj Bharadiya Date: Mon Dec 9 10:31:43 2019 -0800 treewide: Use sizeof_field() macro Replace all the occurrences of FIELD_SIZEOF() with sizeof_field() except at places where these are defined. Later patches will remove the unused definition of FIELD_SIZEOF(). This patch is generated using following script: EXCLUDE_FILES="include/linux/stddef.h|include/linux/kernel.h" git grep -l -e "\bFIELD_SIZEOF\b" | while read file; do if [[ "$file" =~ $EXCLUDE_FILES ]]; then continue fi sed -i -e 's/\bFIELD_SIZEOF\b/sizeof_field/g' $file; done Signed-off-by: Pankaj Bharadiya Link: https://lore.kernel.org/r/20190924105839.110713-3-pankaj.laxminarayan.bharadiya@intel.com Co-developed-by: Kees Cook Signed-off-by: Kees Cook Acked-by: David Miller # for net commit e43723292d6d7f217b572aab07f1f165189a1b56 Author: Pankaj Bharadiya Date: Tue Sep 24 16:28:37 2019 +0530 MIPS: OCTEON: Replace SIZEOF_FIELD() macro Switch to the standard sizeof_field() macro to find the size of a member of a struct and remove the custom SIZEOF_FIELD() macro. Signed-off-by: Pankaj Bharadiya Link: https://lore.kernel.org/r/20190924105839.110713-4-pankaj.laxminarayan.bharadiya@intel.com Co-developed-by: Kees Cook Signed-off-by: Kees Cook commit f8fc57e8d7c5d95f4180b127d3b167de403557c0 Author: Martin Schiller Date: Mon Dec 9 08:21:34 2019 +0100 net/x25: add new state X25_STATE_5 This is needed, because if the flag X25_ACCPT_APPRV_FLAG is not set on a socket (manual call confirmation) and the channel is cleared by remote before the manual call confirmation was sent, this situation needs to be handled. Signed-off-by: Martin Schiller Signed-off-by: David S. Miller commit 99e51aa8f70137310496f98937cfeecac0529a5a Author: Brendan Higgins Date: Tue Nov 19 17:17:00 2019 -0800 Documentation: kunit: add documentation for kunit_tool Add documentation for the Python script used to build, run, and collect results from the kernel known as kunit_tool. kunit_tool (tools/testing/kunit/kunit.py) was already added in previous commits. Signed-off-by: Brendan Higgins Reviewed-by: David Gow Cc: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Shuah Khan commit e7d7ad0e413f14f191b75d39e2c4a9dbf2683a71 Author: Brendan Higgins Date: Tue Nov 19 15:38:10 2019 -0800 Documentation: kunit: fix typos and gramatical errors Fix typos and gramatical errors in the Getting Started and Usage guide for KUnit. Reported-by: Randy Dunlap Link: https://patchwork.kernel.org/patch/11156481/ Reported-by: Rinat Ibragimov Link: https://github.com/google/kunit-docs/issues/1 Signed-off-by: Brendan Higgins Reviewed-by: David Gow Acked-by: Randy Dunlap Signed-off-by: Shuah Khan commit 70efb58bbbc28f0cbd4060c9aa581d79201c8b1a Author: Heidi Fahim Date: Mon Dec 2 15:53:29 2019 -0800 kunit: testing kunit: Bug fix in test_run_timeout function Assert in test_run_timeout was not updated with the build_dir argument and caused the following error: AssertionError: Expected call: run_kernel(timeout=3453) Actual call: run_kernel(build_dir=None, timeout=3453) Needed to update kunit_tool_test to reflect this fix https://lkml.org/lkml/2019/9/6/351 Signed-off-by: Heidi Fahim Reviewed-by: SeongJae Park Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 65cb13986229cec02635a1ecbcd1e2dd18353201 Author: Ido Schimmel Date: Mon Dec 9 08:56:34 2019 +0200 selftests: forwarding: Delete IPv6 address at the end When creating the second host in h2_create(), two addresses are assigned to the interface, but only one is deleted. When running the test twice in a row the following error is observed: $ ./router_bridge_vlan.sh TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: vlan [ OK ] $ ./router_bridge_vlan.sh RTNETLINK answers: File exists TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: vlan [ OK ] Fix this by deleting the address during cleanup. Fixes: 5b1e7f9ebd56 ("selftests: forwarding: Test routed bridge interface") Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 62201c00c4679ad8f0730d6d925a5d23651dfad2 Author: Ido Schimmel Date: Mon Dec 9 08:55:20 2019 +0200 mlxsw: spectrum_router: Remove unlikely user-triggerable warning In case the driver vetoes the addition of an IPv6 multipath route, the IPv6 stack will emit delete notifications for the sibling routes that were already added to the FIB trie. Since these siblings are not present in hardware, a warning will be generated. Have the driver ignore notifications for routes it does not have. Fixes: ebee3cad835f ("ipv6: Add IPv6 multipath notifications for add / replace") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit b6f3320b1d5267e7b583a6d0c88dda518101740c Author: Xin Long Date: Mon Dec 9 13:45:54 2019 +0800 sctp: fully initialize v4 addr in some functions Syzbot found a crash: BUG: KMSAN: uninit-value in crc32_body lib/crc32.c:112 [inline] BUG: KMSAN: uninit-value in crc32_le_generic lib/crc32.c:179 [inline] BUG: KMSAN: uninit-value in __crc32c_le_base+0x4fa/0xd30 lib/crc32.c:202 Call Trace: crc32_body lib/crc32.c:112 [inline] crc32_le_generic lib/crc32.c:179 [inline] __crc32c_le_base+0x4fa/0xd30 lib/crc32.c:202 chksum_update+0xb2/0x110 crypto/crc32c_generic.c:90 crypto_shash_update+0x4c5/0x530 crypto/shash.c:107 crc32c+0x150/0x220 lib/libcrc32c.c:47 sctp_csum_update+0x89/0xa0 include/net/sctp/checksum.h:36 __skb_checksum+0x1297/0x12a0 net/core/skbuff.c:2640 sctp_compute_cksum include/net/sctp/checksum.h:59 [inline] sctp_packet_pack net/sctp/output.c:528 [inline] sctp_packet_transmit+0x40fb/0x4250 net/sctp/output.c:597 sctp_outq_flush_transports net/sctp/outqueue.c:1146 [inline] sctp_outq_flush+0x1823/0x5d80 net/sctp/outqueue.c:1194 sctp_outq_uncork+0xd0/0xf0 net/sctp/outqueue.c:757 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1781 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1184 [inline] sctp_do_sm+0x8fe1/0x9720 net/sctp/sm_sideeffect.c:1155 sctp_primitive_REQUESTHEARTBEAT+0x175/0x1a0 net/sctp/primitive.c:185 sctp_apply_peer_addr_params+0x212/0x1d40 net/sctp/socket.c:2433 sctp_setsockopt_peer_addr_params net/sctp/socket.c:2686 [inline] sctp_setsockopt+0x189bb/0x19090 net/sctp/socket.c:4672 The issue was caused by transport->ipaddr set with uninit addr param, which was passed by: sctp_transport_init net/sctp/transport.c:47 [inline] sctp_transport_new+0x248/0xa00 net/sctp/transport.c:100 sctp_assoc_add_peer+0x5ba/0x2030 net/sctp/associola.c:611 sctp_process_param net/sctp/sm_make_chunk.c:2524 [inline] where 'addr' is set by sctp_v4_from_addr_param(), and it doesn't initialize the padding of addr->v4. Later when calling sctp_make_heartbeat(), hbinfo.daddr(=transport->ipaddr) will become the part of skb, and the issue occurs. This patch is to fix it by initializing the padding of addr->v4 in sctp_v4_from_addr_param(), as well as other functions that do the similar thing, and these functions shouldn't trust that the caller initializes the memory, as Marcelo suggested. Reported-by: syzbot+6dcbfea81cd3d4dd0b02@syzkaller.appspotmail.com Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller commit 39101b2265440dfe83646a4bfc33015c86f36d71 Author: Iurii Zaikin Date: Wed Nov 27 10:55:24 2019 -0800 fs/ext4/inode-test: Fix inode test on 32 bit platforms. Fixes the issue caused by the fact that in C in the expression of the form -1234L only 1234L is the actual literal, the unary minus is an operation applied to the literal. Which means that to express the lower bound for the type one has to negate the upper bound and subtract 1. Original error: Expected test_data[i].expected.tv_sec == timestamp.tv_sec, but test_data[i].expected.tv_sec == -2147483648 timestamp.tv_sec == 2147483648 1901-12-13 Lower bound of 32bit < 0 timestamp, no extra bits: msb:1 lower_bound:1 extra_bits: 0 Expected test_data[i].expected.tv_sec == timestamp.tv_sec, but test_data[i].expected.tv_sec == 2147483648 timestamp.tv_sec == 6442450944 2038-01-19 Lower bound of 32bit <0 timestamp, lo extra sec bit on: msb:1 lower_bound:1 extra_bits: 1 Expected test_data[i].expected.tv_sec == timestamp.tv_sec, but test_data[i].expected.tv_sec == 6442450944 timestamp.tv_sec == 10737418240 2174-02-25 Lower bound of 32bit <0 timestamp, hi extra sec bit on: msb:1 lower_bound:1 extra_bits: 2 not ok 1 - inode_test_xtimestamp_decoding not ok 1 - ext4_inode_test Reported-by: Geert Uytterhoeven Signed-off-by: Iurii Zaikin Tested-by: Geert Uytterhoeven Acked-by: Brendan Higgins Signed-off-by: Shuah Khan commit fac2c2da3596d77c343988bb0d41a8c533b2e73c Author: Florian Fainelli Date: Fri Dec 6 10:19:09 2019 -0800 ARM: dts: Cygnus: Fix MDIO node address/size cells The MDIO node on Cygnus had an reversed #address-cells and #size-cells properties, correct those. Fixes: 40c26d3af60a ("ARM: dts: Cygnus: Add the ethernet switch and ethernet PHY") Reported-by: Simon Horman Reviewed-by: Ray Jui Reviewed-by: Simon Horman Signed-off-by: Florian Fainelli commit 0634a2dc9566de977970c78a06c7ea15cd9c890f Author: Nicolas Saenz Julienne Date: Wed Dec 4 13:56:33 2019 +0100 ARM: dts: bcm2711: fix soc's node dma-ranges Raspberry Pi's firmware has a feature to select how much memory to reserve for its GPU called 'gpu_mem'. The possible values go from 16MB to 944MB, with a default of 64MB. This memory resides in the topmost part of the lower 1GB memory area and grows bigger expanding towards the begging of memory. It turns out that with low 'gpu_mem' values (16MB and 32MB) the size of the memory available to the system in the lower 1GB area can outgrow the interconnect's dma-range as its size was selected based on the maximum system memory available given the default gpu_mem configuration. This makes that memory slice unavailable for DMA. And may cause nasty kernel warnings if CMA happens to include it. Change soc's dma-ranges to really reflect it's HW limitation, which is being able to only DMA to the lower 1GB area. Fixes: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support") Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Phil Elwell Signed-off-by: Florian Fainelli commit a2315d3aea5976acd919d3d3fcf82f752562c25b Author: Marek Szyprowski Date: Fri Dec 6 13:47:21 2019 +0100 ARM: exynos_defconfig: Restore debugfs support Commit 9f532d26c75c ("ARM: exynos_defconfig: Trim and reorganize with savedefconfig") removed explicit enable line for CONFIG_DEBUG_FS, because that feature has been selected by other enabled options: CONFIG_TRACING, which in turn had been selected by CONFIG_PERF_EVENTS and CONFIG_PROVE_LOCKING. In meantime, commit 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") removed the dependency between CONFIG_DEBUG_FS and CONFIG_TRACING, so CONFIG_DEBUG_FS is no longer enabled in default builds. Enable it again explicitly, as debugfs support is essential for various automated testing tools. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 94fd07925577caaaec9e0efd60c173959600de13 Author: Krzysztof Kozlowski Date: Thu Dec 5 21:04:22 2019 +0100 MAINTAINERS: Include Samsung SoC serial driver in Samsung SoC entry Samsung SoC (S3C, S5P and Exynos) serial driver does not have dedicated reviewing person so some patches might be missed be Samsung-related folks (e.g. not even reaching Samsung SoC mailing list). Include them in generic Samsung SoC maintainer entry to provide some level of reviewing and care. This will not change handling of patches (via serial tree). Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Krzysztof Kozlowski commit 702600eef73033ddd4eafcefcbb6560f3e3a90f7 Author: Greg Kroah-Hartman Date: Fri Dec 6 16:26:00 2019 +0100 lib: raid6: fix awk build warnings Newer versions of awk spit out these fun warnings: awk: ../lib/raid6/unroll.awk:16: warning: regexp escape sequence `\#' is not a known regexp operator As commit 700c1018b86d ("x86/insn: Fix awk regexp warnings") showed, it turns out that there are a number of awk strings that do not need to be escaped and newer versions of awk now warn about this. Fix the string up so that no warning is produced. The exact same kernel module gets created before and after this patch, showing that it wasn't needed. Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191206152600.GA75093@kroah.com Signed-off-by: Greg Kroah-Hartman commit 8ef1ec0ca32c6f8a87f5b4c24b1db26da67c5609 Author: Masami Hiramatsu Date: Thu Dec 5 21:21:16 2019 +0900 selftests: safesetid: Fix Makefile to set correct test program Fix Makefile to set safesetid-test.sh to TEST_PROGS instead of non existing run_tests.sh. Without this fix, I got following error. ---- TAP version 13 1..1 # selftests: safesetid: run_tests.sh # Warning: file run_tests.sh is missing! not ok 1 selftests: safesetid: run_tests.sh ---- Fixes: c67e8ec03f3f ("LSM: SafeSetID: add selftest") Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan commit 295c4e21cf27ac9af542140e3e797df9e0cf7b5f Author: Masami Hiramatsu Date: Thu Dec 5 21:21:07 2019 +0900 selftests: safesetid: Check the return value of setuid/setgid Check the return value of setuid() and setgid(). This fixes the following warnings and improves test result. safesetid-test.c: In function ‘main’: safesetid-test.c:294:2: warning: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Wunused-result] setuid(NO_POLICY_USER); ^~~~~~~~~~~~~~~~~~~~~~ safesetid-test.c:295:2: warning: ignoring return value of ‘setgid’, declared with attribute warn_unused_result [-Wunused-result] setgid(NO_POLICY_USER); ^~~~~~~~~~~~~~~~~~~~~~ safesetid-test.c:309:2: warning: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Wunused-result] setuid(RESTRICTED_PARENT); ^~~~~~~~~~~~~~~~~~~~~~~~~ safesetid-test.c:310:2: warning: ignoring return value of ‘setgid’, declared with attribute warn_unused_result [-Wunused-result] setgid(RESTRICTED_PARENT); ^~~~~~~~~~~~~~~~~~~~~~~~~ safesetid-test.c: In function ‘test_setuid’: safesetid-test.c:216:3: warning: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Wunused-result] setuid(child_uid); ^~~~~~~~~~~~~~~~~ Fixes: c67e8ec03f3f ("LSM: SafeSetID: add selftest") Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan commit be12252212fa3dfed6e75112865095c484c0ce87 Author: Masami Hiramatsu Date: Thu Dec 5 21:20:58 2019 +0900 selftests: safesetid: Move link library to LDLIBS Move -lcap to LDLIBS from CFLAGS because it is a library to be linked. Without this, safesetid failed to build with link error as below. ---- /usr/bin/ld: /tmp/ccL8rZHT.o: in function `drop_caps': safesetid-test.c:(.text+0xe7): undefined reference to `cap_get_proc' /usr/bin/ld: safesetid-test.c:(.text+0x107): undefined reference to `cap_set_flag' /usr/bin/ld: safesetid-test.c:(.text+0x10f): undefined reference to `cap_set_proc' /usr/bin/ld: safesetid-test.c:(.text+0x117): undefined reference to `cap_free' /usr/bin/ld: safesetid-test.c:(.text+0x136): undefined reference to `cap_clear' collect2: error: ld returned 1 exit status ---- Fixes: c67e8ec03f3f ("LSM: SafeSetID: add selftest") Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan commit 5cc6c8d4a99d0ee4d5466498e258e593df1d3eb6 Author: Masami Hiramatsu Date: Tue Nov 26 17:34:42 2019 +0900 selftests/ftrace: Fix multiple kprobe testcase Fix multiple kprobe event testcase to work it correctly. There are 2 bugfixes. - Since `wc -l FILE` returns not only line number but also FILE filename, following "if" statement always failed. Fix this bug by replacing it with 'cat FILE | wc -l' - Since "while do-done loop" block with pipeline becomes a subshell, $N local variable is not update outside of the loop. Fix this bug by using actual target number (256) instead of $N. Signed-off-by: Masami Hiramatsu Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan commit ba1b9c5048e43716921abe3a1db19cebebf4a5f5 Author: Masami Hiramatsu Date: Tue Nov 26 17:34:33 2019 +0900 selftests/ftrace: Do not to use absolute debugfs path Use relative path to trigger file instead of absolute debugfs path, because if the user uses tracefs instead of debugfs, it can be mounted at /sys/kernel/tracing. Anyway, since the ftracetest is designed to be run at the tracing directory, user doesn't need to use absolute path. Signed-off-by: Masami Hiramatsu Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan commit 25deae098e748d8d36bc35129a66734b8f6925c9 Author: Masami Hiramatsu Date: Wed Nov 27 08:42:21 2019 +0900 selftests/ftrace: Fix ftrace test cases to check unsupported Since dynamic function tracer can be disabled, set_ftrace_filter can be disappeared. Test cases which depends on it, must check whether the set_ftrace_filter exists or not before testing and if not, return as unsupported. Also, if the function tracer itself is disabled, we can not set "function" to current_tracer. Test cases must check it before testing, and return as unsupported. Signed-off-by: Masami Hiramatsu Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan commit fd1baf6ca2ea3550ea47f2bb0bdcf34ec764a779 Author: Masami Hiramatsu Date: Tue Nov 26 17:34:16 2019 +0900 selftests/ftrace: Fix to check the existence of set_ftrace_filter If we run ftracetest on the kernel with CONFIG_DYNAMIC_FTRACE=n, there is no set_ftrace_filter and all test cases are failed, because reset_ftrace_filter() returns an error. Let's check whether set_ftrace_filter exists in reset_ftrace_filter() and clean up only set_ftrace_notrace in initialize_ftrace(). Signed-off-by: Masami Hiramatsu Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan commit af3ea3c126ac677dbeae1b93868f69f928bccc13 Author: Lukasz Luba Date: Mon Dec 9 09:39:07 2019 +0000 MAINTAINERS: Update Lukasz Luba's email address Update Lukasz Luba's email address to @arm.com in MAINTAINERS and map it correctly in .mailmap file. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 9e99bfefdbce2e23ef37487a3bcb4adf90a791d1 Author: Eric Dumazet Date: Sat Dec 7 14:10:34 2019 -0800 bonding: fix bond_neigh_init() 1) syzbot reported an uninit-value in bond_neigh_setup() [1] bond_neigh_setup() uses a temporary on-stack 'struct neigh_parms parms', but only clears parms.neigh_setup field. A stacked bonding device would then enter bond_neigh_setup() and read garbage from parms->dev. If we get really unlucky and garbage is matching @dev, then we could recurse and eventually crash. Let's make sure the whole structure is cleared to avoid surprises. 2) bond_neigh_setup() can be called while another cpu manipulates the master device, removing or adding a slave. We need at least rcu protection to prevent use-after-free. Note: Prior code does not support a stack of bonding devices, this patch does not attempt to fix this, and leave a comment instead. [1] BUG: KMSAN: uninit-value in bond_neigh_setup+0xa4/0x110 drivers/net/bonding/bond_main.c:3655 CPU: 0 PID: 11256 Comm: syz-executor.0 Not tainted 5.4.0-rc8-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+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0x128/0x220 mm/kmsan/kmsan_report.c:108 __msan_warning+0x57/0xa0 mm/kmsan/kmsan_instr.c:245 bond_neigh_setup+0xa4/0x110 drivers/net/bonding/bond_main.c:3655 bond_neigh_init+0x216/0x4b0 drivers/net/bonding/bond_main.c:3626 ___neigh_create+0x169e/0x2c40 net/core/neighbour.c:613 __neigh_create+0xbd/0xd0 net/core/neighbour.c:674 ip6_finish_output2+0x149a/0x2670 net/ipv6/ip6_output.c:113 __ip6_finish_output+0x83d/0x8f0 net/ipv6/ip6_output.c:142 ip6_finish_output+0x2db/0x420 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0x5d3/0x720 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] NF_HOOK include/linux/netfilter.h:305 [inline] mld_sendpack+0xebd/0x13d0 net/ipv6/mcast.c:1682 mld_send_cr net/ipv6/mcast.c:1978 [inline] mld_ifc_timer_expire+0x116b/0x1680 net/ipv6/mcast.c:2477 call_timer_fn+0x232/0x530 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers+0xd60/0x1270 kernel/time/timer.c:1773 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1786 __do_softirq+0x4a1/0x83a kernel/softirq.c:293 invoke_softirq kernel/softirq.c:375 [inline] irq_exit+0x230/0x280 kernel/softirq.c:416 exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:536 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1138 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:835 RIP: 0010:kmsan_free_page+0x18d/0x1c0 mm/kmsan/kmsan_shadow.c:439 Code: 4c 89 ff 44 89 f6 e8 82 0d ee ff 65 ff 0d 9f 26 3b 60 65 8b 05 98 26 3b 60 85 c0 75 24 e8 5b f6 35 ff 4c 89 6d d0 ff 75 d0 9d <48> 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f 5d c3 0f 0b 0f 0b 0f 0b 0f RSP: 0018:ffffb328034af818 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffffe2d7471f8360 RCX: 0000000000000000 RDX: ffffffffadea7000 RSI: 0000000000000004 RDI: ffff93496fcda104 RBP: ffffb328034af850 R08: ffff934a47e86d00 R09: ffff93496fc41900 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001 R13: 0000000000000246 R14: 0000000000000000 R15: ffffe2d7472225c0 free_pages_prepare mm/page_alloc.c:1138 [inline] free_pcp_prepare mm/page_alloc.c:1230 [inline] free_unref_page_prepare+0x1d9/0x770 mm/page_alloc.c:3025 free_unref_page mm/page_alloc.c:3074 [inline] free_the_page mm/page_alloc.c:4832 [inline] __free_pages+0x154/0x230 mm/page_alloc.c:4840 __vunmap+0xdac/0xf20 mm/vmalloc.c:2277 __vfree mm/vmalloc.c:2325 [inline] vfree+0x7c/0x170 mm/vmalloc.c:2355 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:883 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1041 [inline] do_ip6t_get_ctl+0xfa4/0x1030 net/ipv6/netfilter/ip6_tables.c:1709 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x481/0x4e0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x264/0x510 net/ipv6/ipv6_sockglue.c:1400 tcp_getsockopt+0x1c6/0x1f0 net/ipv4/tcp.c:3688 sock_common_getsockopt+0x13f/0x180 net/core/sock.c:3110 __sys_getsockopt+0x533/0x7b0 net/socket.c:2129 __do_sys_getsockopt net/socket.c:2144 [inline] __se_sys_getsockopt+0xe1/0x100 net/socket.c:2141 __x64_sys_getsockopt+0x62/0x80 net/socket.c:2141 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d20a Code: b8 34 01 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 8d 8b fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 6a 8b fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:0000000000a6f618 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 0000000000a6f640 RCX: 000000000045d20a RDX: 0000000000000041 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 0000000000717cc0 R08: 0000000000a6f63c R09: 0000000000004000 R10: 0000000000a6f740 R11: 0000000000000212 R12: 0000000000000003 R13: 0000000000000000 R14: 0000000000000029 R15: 0000000000715b00 Local variable description: ----parms@bond_neigh_init Variable was created at: bond_neigh_init+0x8c/0x4b0 drivers/net/bonding/bond_main.c:3617 bond_neigh_init+0x8c/0x4b0 drivers/net/bonding/bond_main.c:3617 Fixes: 9918d5bf329d ("bonding: modify only neigh_parms owned by us") Fixes: 234bcf8a499e ("net/bonding: correctly proxy slave neigh param setup ndo function") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: David S. Miller commit f394722fb0d0f701119368959d7cd0ecbc46363a Author: Eric Dumazet Date: Sat Dec 7 12:23:21 2019 -0800 neighbour: remove neigh_cleanup() method neigh_cleanup() has not been used for seven years, and was a wrong design. Messing with shared pointer in bond_neigh_init() without proper memory barriers would at least trigger syzbot complains eventually. It is time to remove this stuff. Fixes: b63b70d87741 ("IPoIB: Use a private hash table for path lookup in xmit path") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 093c3f94e922d83a734fc4da08cc5814990f32c6 Author: Florian Fainelli Date: Thu Dec 5 16:01:20 2019 -0800 ARM: dts: BCM5301X: Fix MDIO node address/size cells The MDIO node on BCM5301X had an reversed #address-cells and #size-cells properties, correct those, silencing checker warnings: .../linux/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dt.yaml: mdio@18003000: #address-cells:0:0: 1 was expected Reported-by: Simon Horman Fixes: 23f1eca6d59b ("ARM: dts: BCM5301X: Specify MDIO bus in the DT") Signed-off-by: Florian Fainelli commit 43aad8104bdaa7176a8f87143ac0e559bc891293 Merge: e42617b825f8 da2311a6385c Author: David S. Miller Date: Mon Dec 9 09:27:47 2019 -0800 Merge tag 'linux-can-fixes-for-5.5-20191208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2019-12-08 this is a pull request of 13 patches for net/master. The first two patches are by Dan Murphy. He adds himself as a maintainer to the m-can MMIO and tcan SPI driver. The next two patches the j1939 stack. The first one is by Oleksij Rempel and fixes a locking problem found by the syzbot, the second one is by me an fixes a mistake in the documentation. Srinivas Neeli fixes missing RX CAN packets on CANFD2.0 in the xilinx driver. Sean Nyekjaer fixes a possible deadlock in the the flexcan driver after suspend/resume. Joakim Zhang contributes two patches for the flexcan driver that fix problems with the low power enter/exit. The next 4 patches all target the tcan part of the m_can driver. Sean Nyekjaer adds the required delay after reset and fixes the device tree binding example. Dan Murphy's patches make the wake-gpio optional. In the last patch Xiaolong Huang fixes several kernel memory info leaks to the USB device in the kvaser_usb_leaf driver. ==================== Signed-off-by: David S. Miller commit df4a6ff19224b5434237e781979fbace0a7feebd Merge: e42617b825f8 c9385887cbbf Author: Olof Johansson Date: Mon Dec 9 09:17:09 2019 -0800 Merge tag 'vexpress-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes ARMv7 Vexpress fixes for v5.5 Switching the cpumask from topology core to OPP sharing, as the topology core cpumask can be modified during cpu hotplug to avoid setting up wrong cpufreq policy cpumask. * tag 'vexpress-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: cpufreq: vexpress-spc: Switch cpumask from topology core to OPP sharing ARM: vexpress: Set-up shared OPP table instead of individual for each CPU Link: https://lore.kernel.org/r/20191209140037.GC25155@bogus Signed-off-by: Olof Johansson commit 44a7b6759000ac51b92715579a7bba9e3f9245c2 Author: Chuhong Yuan Date: Fri Dec 6 09:24:26 2019 +0800 RDMA/cma: add missed unregister_pernet_subsys in init failure The driver forgets to call unregister_pernet_subsys() in the error path of cma_init(). Add the missed call to fix it. Fixes: 4be74b42a6d0 ("IB/cma: Separate port allocation to network namespaces") Signed-off-by: Chuhong Yuan Reviewed-by: Parav Pandit Link: https://lore.kernel.org/r/20191206012426.12744-1-hslester96@gmail.com Signed-off-by: Doug Ledford commit 78f926f72e43e4b974f69688593a9b682089e82a Author: David Sterba Date: Thu Nov 28 13:02:32 2019 +0100 btrfs: add Kconfig dependency for BLAKE2B Because the BLAKE2B code went through a different tree, it was not available at the time the btrfs part was merged. Now that the Kconfig symbol exists, add it to the list. Signed-off-by: David Sterba commit bcbccaf2edcf1b76f73f890e968babef446151a4 Author: David Howells Date: Mon Dec 9 15:04:45 2019 +0000 afs: Fix SELinux setting security label on /afs Make the AFS dynamic root superblock R/W so that SELinux can set the security label on it. Without this, upgrades to, say, the Fedora filesystem-afs RPM fail if afs is mounted on it because the SELinux label can't be (re-)applied. It might be better to make it possible to bypass the R/O check for LSM label application through setxattr. Fixes: 4d673da14533 ("afs: Support the AFS dynamic root") Signed-off-by: David Howells Reviewed-by: Marc Dionne cc: selinux@vger.kernel.org cc: linux-security-module@vger.kernel.org commit 9bd0160d12370a076e44f8d1320cde9c83f2c647 Author: Marc Dionne Date: Mon Dec 9 15:04:43 2019 +0000 afs: Fix afs_find_server lookups for ipv4 peers afs_find_server tries to find a server that has an address that matches the transport address of an rxrpc peer. The code assumes that the transport address is always ipv6, with ipv4 represented as ipv4 mapped addresses, but that's not the case. If the transport family is AF_INET, srx->transport.sin6.sin6_addr.s6_addr32[] will be beyond the actual ipv4 address and will always be 0, and all ipv4 addresses will be seen as matching. As a result, the first ipv4 address seen on any server will be considered a match, and the server returned may be the wrong one. One of the consequences is that callbacks received over ipv4 will only be correctly applied for the server that happens to have the first ipv4 address on the fs_addresses4 list. Callbacks over ipv4 from all other servers are dropped, causing the client to serve stale data. This is fixed by looking at the transport family, and comparing ipv4 addresses based on a sockaddr_in structure rather than a sockaddr_in6. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: Marc Dionne Signed-off-by: David Howells commit 36deeddcd3699c2755ed21c8d2595b1728d844e5 Author: Chris Wilson Date: Thu Dec 5 14:59:34 2019 +0000 drm/i915/gt: Save irqstate around virtual_context_destroy As virtual_context_destroy() may be called from a request signal, it may be called from inside an irq-off section, and so we need to do a full save/restore of the irq state rather than blindly re-enable irqs upon unlocking. <4> [110.024262] WARNING: inconsistent lock state <4> [110.024277] 5.4.0-rc8-CI-CI_DRM_7489+ #1 Tainted: G U <4> [110.024292] -------------------------------- <4> [110.024305] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. <4> [110.024323] kworker/0:0/5 [HC0[0]:SC0[0]:HE1:SE1] takes: <4> [110.024338] ffff88826a0c7a18 (&(&rq->lock)->rlock){?.-.}, at: i915_request_retire+0x221/0x930 [i915] <4> [110.024592] {IN-HARDIRQ-W} state was registered at: <4> [110.024612] lock_acquire+0xa7/0x1c0 <4> [110.024627] _raw_spin_lock_irqsave+0x33/0x50 <4> [110.024788] intel_engine_breadcrumbs_irq+0x38c/0x600 [i915] <4> [110.024808] irq_work_run_list+0x49/0x70 <4> [110.024824] irq_work_run+0x26/0x50 <4> [110.024839] smp_irq_work_interrupt+0x44/0x1e0 <4> [110.024855] irq_work_interrupt+0xf/0x20 <4> [110.024871] __do_softirq+0xb7/0x47f <4> [110.024885] irq_exit+0xba/0xc0 <4> [110.024898] do_IRQ+0x83/0x160 <4> [110.024910] ret_from_intr+0x0/0x1d <4> [110.024922] irq event stamp: 172864 <4> [110.024938] hardirqs last enabled at (172863): [] _raw_spin_unlock_irq+0x24/0x50 <4> [110.024963] hardirqs last disabled at (172864): [] _raw_spin_lock_irq+0xa/0x40 <4> [110.024988] softirqs last enabled at (172812): [] __do_softirq+0x385/0x47f <4> [110.025012] softirqs last disabled at (172797): [] irq_exit+0xba/0xc0 <4> [110.025031] other info that might help us debug this: <4> [110.025049] Possible unsafe locking scenario: <4> [110.025065] CPU0 <4> [110.025075] ---- <4> [110.025084] lock(&(&rq->lock)->rlock); <4> [110.025099] <4> [110.025109] lock(&(&rq->lock)->rlock); <4> [110.025124] *** DEADLOCK *** <4> [110.025144] 4 locks held by kworker/0:0/5: <4> [110.025156] #0: ffff88827588f528 ((wq_completion)events){+.+.}, at: process_one_work+0x1de/0x620 <4> [110.025187] #1: ffffc9000006fe78 ((work_completion)(&engine->retire_work)){+.+.}, at: process_one_work+0x1de/0x620 <4> [110.025219] #2: ffff88825605e270 (&kernel#2){+.+.}, at: engine_retire+0x57/0xe0 [i915] <4> [110.025405] #3: ffff88826a0c7a18 (&(&rq->lock)->rlock){?.-.}, at: i915_request_retire+0x221/0x930 [i915] <4> [110.025634] stack backtrace: <4> [110.025653] CPU: 0 PID: 5 Comm: kworker/0:0 Tainted: G U 5.4.0-rc8-CI-CI_DRM_7489+ #1 <4> [110.025675] Hardware name: /NUC7i5BNB, BIOS BNKBL357.86A.0054.2017.1025.1822 10/25/2017 <4> [110.025856] Workqueue: events engine_retire [i915] <4> [110.025872] Call Trace: <4> [110.025891] dump_stack+0x71/0x9b <4> [110.025907] mark_lock+0x49a/0x500 <4> [110.025926] ? print_shortest_lock_dependencies+0x200/0x200 <4> [110.025946] mark_held_locks+0x49/0x70 <4> [110.025962] ? _raw_spin_unlock_irq+0x24/0x50 <4> [110.025978] lockdep_hardirqs_on+0xa2/0x1c0 <4> [110.025995] _raw_spin_unlock_irq+0x24/0x50 <4> [110.026171] virtual_context_destroy+0xc5/0x2e0 [i915] <4> [110.026376] __active_retire+0xb4/0x290 [i915] <4> [110.026396] dma_fence_signal_locked+0x9e/0x1b0 <4> [110.026613] i915_request_retire+0x451/0x930 [i915] <4> [110.026766] retire_requests+0x4d/0x60 [i915] <4> [110.026919] engine_retire+0x63/0xe0 [i915] Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") 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/20191205145934.663183-1-chris@chris-wilson.co.uk (cherry picked from commit 6f7ac8285371fb0df58aba861eaab387f79ed04d) Signed-off-by: Joonas Lahtinen commit d935bd50dd14a7714cbdba9a76435dbb56edb1ae Author: Geert Uytterhoeven Date: Wed Nov 27 10:59:19 2019 +0100 gpio: Fix error message on out-of-range GPIO in lookup table When a GPIO offset in a lookup table is out-of-range, the printed error message (1) does not include the actual out-of-range value, and (2) contains an off-by-one error in the upper bound. Avoid user confusion by also printing the actual GPIO offset, and correcting the upper bound of the range. While at it, use "%u" for unsigned int. Sample impact: -requested GPIO 0 is out of range [0..32] for chip e6052000.gpio +requested GPIO 0 (45) is out of range [0..31] for chip e6052000.gpio Fixes: 2a3cf6a3599e9015 ("gpiolib: return -ENOENT if no GPIO mapping exists") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191127095919.4214-1-geert+renesas@glider.be Signed-off-by: Linus Walleij commit 322f6a3182d42df18059a89c53b09d33919f755e Author: Johnson CH Chen (陳昭勳) Date: Tue Nov 26 06:51:11 2019 +0000 gpio: mpc8xxx: Add platform device to gpiochip->parent Dear Linus Walleij, In old kernels, some APIs still try to use parent->of_node from struct gpio_chip, and it could be resulted in kernel panic because parent is NULL. Adding platform device to gpiochip->parent can fix this problem. Signed-off-by: Johnson Chen Link: https://patchwork.kernel.org/patch/11234609 Link: https://lore.kernel.org/r/HK0PR01MB3521489269F76467DFD7843FFA450@HK0PR01MB3521.apcprd01.prod.exchangelabs.com Signed-off-by: Linus Walleij commit 348b80b273fbf4ce2a307f9e38eadecf37828cad Author: Aaron Ma Date: Wed Dec 4 20:42:07 2019 +0800 HID: multitouch: Add LG MELF0410 I2C touchscreen support Add multitouch support for LG MELF I2C touchscreen. Apply the same workaround as LG USB touchscreen. Signed-off-by: Aaron Ma Signed-off-by: Jiri Kosina commit be54e7461ffdc5809b67d2aeefc1ddc9a91470c7 Author: Marcel Holtmann Date: Wed Dec 4 03:43:55 2019 +0100 HID: uhid: Fix returning EPOLLOUT from uhid_char_poll Always return EPOLLOUT from uhid_char_poll to allow polling /dev/uhid for writable state. Fixes: 1f9dec1e0164 ("HID: uhid: allow poll()'ing on uhid devices") Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina commit 9f3b61dc1dd7b81e99e7ed23776bb64a35f39e1a Author: Marcel Holtmann Date: Wed Dec 4 03:37:13 2019 +0100 HID: hidraw: Fix returning EPOLLOUT from hidraw_poll When polling a connected /dev/hidrawX device, it is useful to get the EPOLLOUT when writing is possible. Since writing is possible as soon as the device is connected, always return it. Right now EPOLLOUT is only returned when there are also input reports are available. This works if devices start sending reports when connected, but some HID devices might need an output report first before sending any input reports. This change will allow using EPOLLOUT here as well. Fixes: 378b80370aa1 ("hidraw: Return EPOLLOUT from hidraw_poll") Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina commit 5604285839aaedfb23ebe297799c6e558939334d Author: Eric Dumazet Date: Sat Dec 7 14:43:39 2019 -0800 netfilter: bridge: make sure to pull arp header in br_nf_forward_arp() syzbot is kind enough to remind us we need to call skb_may_pull() BUG: KMSAN: uninit-value in br_nf_forward_arp+0xe61/0x1230 net/bridge/br_netfilter_hooks.c:665 CPU: 1 PID: 11631 Comm: syz-executor.1 Not tainted 5.4.0-rc8-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+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0x128/0x220 mm/kmsan/kmsan_report.c:108 __msan_warning+0x64/0xc0 mm/kmsan/kmsan_instr.c:245 br_nf_forward_arp+0xe61/0x1230 net/bridge/br_netfilter_hooks.c:665 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline] nf_hook_slow+0x18b/0x3f0 net/netfilter/core.c:512 nf_hook include/linux/netfilter.h:260 [inline] NF_HOOK include/linux/netfilter.h:303 [inline] __br_forward+0x78f/0xe30 net/bridge/br_forward.c:109 br_flood+0xef0/0xfe0 net/bridge/br_forward.c:234 br_handle_frame_finish+0x1a77/0x1c20 net/bridge/br_input.c:162 nf_hook_bridge_pre net/bridge/br_input.c:245 [inline] br_handle_frame+0xfb6/0x1eb0 net/bridge/br_input.c:348 __netif_receive_skb_core+0x20b9/0x51a0 net/core/dev.c:4830 __netif_receive_skb_one_core net/core/dev.c:4927 [inline] __netif_receive_skb net/core/dev.c:5043 [inline] process_backlog+0x610/0x13c0 net/core/dev.c:5874 napi_poll net/core/dev.c:6311 [inline] net_rx_action+0x7a6/0x1aa0 net/core/dev.c:6379 __do_softirq+0x4a1/0x83a kernel/softirq.c:293 do_softirq_own_stack+0x49/0x80 arch/x86/entry/entry_64.S:1091 do_softirq kernel/softirq.c:338 [inline] __local_bh_enable_ip+0x184/0x1d0 kernel/softirq.c:190 local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32 rcu_read_unlock_bh include/linux/rcupdate.h:688 [inline] __dev_queue_xmit+0x38e8/0x4200 net/core/dev.c:3819 dev_queue_xmit+0x4b/0x60 net/core/dev.c:3825 packet_snd net/packet/af_packet.c:2959 [inline] packet_sendmsg+0x8234/0x9100 net/packet/af_packet.c:2984 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] __sys_sendto+0xc44/0xc70 net/socket.c:1952 __do_sys_sendto net/socket.c:1964 [inline] __se_sys_sendto+0x107/0x130 net/socket.c:1960 __x64_sys_sendto+0x6e/0x90 net/socket.c:1960 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45a679 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0a3c9e5c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 000000000045a679 RDX: 000000000000000e RSI: 0000000020000200 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 00000000200000c0 R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0a3c9e66d4 R13: 00000000004c8ec1 R14: 00000000004dfe28 R15: 00000000ffffffff Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:149 [inline] kmsan_internal_poison_shadow+0x5c/0x110 mm/kmsan/kmsan.c:132 kmsan_slab_alloc+0x97/0x100 mm/kmsan/kmsan_hooks.c:86 slab_alloc_node mm/slub.c:2773 [inline] __kmalloc_node_track_caller+0xe27/0x11a0 mm/slub.c:4381 __kmalloc_reserve net/core/skbuff.c:141 [inline] __alloc_skb+0x306/0xa10 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] alloc_skb_with_frags+0x18c/0xa80 net/core/skbuff.c:5662 sock_alloc_send_pskb+0xafd/0x10a0 net/core/sock.c:2244 packet_alloc_skb net/packet/af_packet.c:2807 [inline] packet_snd net/packet/af_packet.c:2902 [inline] packet_sendmsg+0x63a6/0x9100 net/packet/af_packet.c:2984 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] __sys_sendto+0xc44/0xc70 net/socket.c:1952 __do_sys_sendto net/socket.c:1964 [inline] __se_sys_sendto+0x107/0x130 net/socket.c:1960 __x64_sys_sendto+0x6e/0x90 net/socket.c:1960 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: c4e70a87d975 ("netfilter: bridge: rename br_netfilter.c to br_netfilter_hooks.c") Signed-off-by: Eric Dumazet Reported-by: syzbot Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 81ec61074bcf68acfcb2820cda3ff9d9984419c7 Author: Pablo Neira Ayuso Date: Fri Dec 6 22:49:58 2019 +0100 netfilter: nf_tables_offload: return EOPNOTSUPP if rule specifies no actions If the rule only specifies the matching side, return EOPNOTSUPP. Otherwise, the front-end relies on the drivers to reject this rule. Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support") Signed-off-by: Pablo Neira Ayuso commit fd57d0cbe187e93f63777d36e9f49293311d417f Author: Pablo Neira Ayuso Date: Fri Dec 6 22:25:55 2019 +0100 netfilter: nf_tables: skip module reference count bump on object updates Use __nft_obj_type_get() instead, otherwise there is a module reference counter leak. Fixes: d62d0ba97b58 ("netfilter: nf_tables: Introduce stateful object update operation") Signed-off-by: Pablo Neira Ayuso commit 0d2c96af797ba149e559c5875c0151384ab6dd14 Author: Pablo Neira Ayuso Date: Fri Dec 6 22:09:14 2019 +0100 netfilter: nf_tables: validate NFT_DATA_VALUE after nft_data_init() Userspace might bogusly sent NFT_DATA_VERDICT in several netlink attributes that assume NFT_DATA_VALUE. Moreover, make sure that error path invokes nft_data_release() to decrement the reference count on the chain object. Fixes: 96518518cc41 ("netfilter: add nftables") Fixes: 0f3cd9b36977 ("netfilter: nf_tables: add range expression") Signed-off-by: Pablo Neira Ayuso commit bffc124b6fe37d0ae9b428d104efb426403bb5c9 Author: Pablo Neira Ayuso Date: Fri Dec 6 21:55:20 2019 +0100 netfilter: nf_tables: validate NFT_SET_ELEM_INTERVAL_END Only NFTA_SET_ELEM_KEY and NFTA_SET_ELEM_FLAGS make sense for elements whose NFT_SET_ELEM_INTERVAL_END flag is set on. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso commit db3b665dd77b34e34df00e17d7b299c98fcfb2c5 Author: Pablo Neira Ayuso Date: Fri Dec 6 20:23:29 2019 +0100 netfilter: nft_set_rbtree: bogus lookup/get on consecutive elements in named sets The existing rbtree implementation might store consecutive elements where the closing element and the opening element might overlap, eg. [ a, a+1) [ a+1, a+2) This patch removes the optimization for non-anonymous sets in the exact matching case, where it is assumed to stop searching in case that the closing element is found. Instead, invalidate candidate interval and keep looking further in the tree. The lookup/get operation might return false, while there is an element in the rbtree. Moreover, the get operation returns true as if a+2 would be in the tree. This happens with named sets after several set updates. The existing lookup optimization (that only works for the anonymous sets) might not reach the opening [ a+1,... element if the closing ...,a+1) is found in first place when walking over the rbtree. Hence, walking the full tree in that case is needed. This patch fixes the lookup and get operations. Fixes: e701001e7cbe ("netfilter: nft_rbtree: allow adjacent intervals with dynamic updates") Fixes: ba0e4d9917b4 ("netfilter: nf_tables: get set elements via netlink") Signed-off-by: Pablo Neira Ayuso commit 164166558aacea01b99c8c8ffb710d930405ba69 Author: Phil Sutter Date: Thu Dec 5 13:35:11 2019 +0100 netfilter: uapi: Avoid undefined left-shift in xt_sctp.h With 'bytes(__u32)' being 32, a left-shift of 31 may happen which is undefined for the signed 32-bit value 1. Avoid this by declaring 1 as unsigned. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit c9385887cbbf292ee367f75b400874f00ea34890 Author: Sudeep Holla Date: Wed Nov 27 16:04:26 2019 +0000 cpufreq: vexpress-spc: Switch cpumask from topology core to OPP sharing Since commit ca74b316df96 ("arm: Use common cpu_topology structure and functions.") the core cpumask has to be modified during cpu hotplug operations. So using them to set up cpufreq policy cpumask may be incorrect as it may contain only cpus that are online at that instance. Instead, we can use the cpumask setup by OPP library that contains all the cpus sharing OPP table using dev_pm_opp_get_sharing_cpus. Acked-by: Viresh Kumar Tested-by: Dietmar Eggemann Signed-off-by: Sudeep Holla commit 2a76352ad2cc6b78e58f737714879cc860903802 Author: Sudeep Holla Date: Wed Nov 27 15:56:40 2019 +0000 ARM: vexpress: Set-up shared OPP table instead of individual for each CPU Currently we add individual copy of same OPP table for each CPU within the cluster. This is redundant and doesn't reflect the reality. We can't use core cpumask to set policy->cpus in ve_spc_cpufreq_init() anymore as it gets called via cpuhp_cpufreq_online()->cpufreq_online() ->cpufreq_driver->init() and the cpumask gets updated upon CPU hotplug operations. It also may cause issues when the vexpress_spc_cpufreq driver is built as a module. Since ve_spc_clk_init is built-in device initcall, we should be able to use the same topology_core_cpumask to set the opp sharing cpumask via dev_pm_opp_set_sharing_cpus and use the same later in the driver via dev_pm_opp_get_sharing_cpus. Cc: Liviu Dudau Cc: Lorenzo Pieralisi Acked-by: Viresh Kumar Tested-by: Dietmar Eggemann Signed-off-by: Sudeep Holla commit b9a19bdbc843abd659e8ec6b1b3c32ae3a2455eb Author: Hans de Goede Date: Thu Nov 14 11:08:04 2019 +0100 pinctrl: cherryview: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Acked-by: Mika Westerberg Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit bd90633a5c5433bcb53d55843a7118e6c032b1a2 Author: Hans de Goede Date: Thu Nov 14 11:08:03 2019 +0100 pinctrl: cherryview: Add GPIO <-> pin mapping ranges via callback When IRQ chip is instantiated via GPIO library flow, the few functions, in particular the ACPI event registration mechanism, on some of ACPI based platforms expect that the pin ranges are initialized to that point. Add GPIO <-> pin mapping ranges via callback in the GPIO library flow. Acked-by: Mika Westerberg Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 82d9beb4b7f701cb2bb4c892e777c5ada14ce99e Author: Hans de Goede Date: Thu Nov 14 11:08:02 2019 +0100 pinctrl: cherryview: Split out irq hw-init into a separate helper function Split out irq hw-init into a separate chv_gpio_irq_init_hw() function. This is a preparation patch for passing the irqchip when adding the gpiochip. Acked-by: Mika Westerberg Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit ca8a958e2acb418846e6506f3ff2cdf161a3c806 Author: Andy Shevchenko Date: Tue Nov 5 15:41:11 2019 +0200 pinctrl: baytrail: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Andy Shevchenko Cc: Mika Westerberg Cc: Thierry Reding Signed-off-by: Linus Walleij Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede Tested-by: Hans de Goede commit ed3c156462516f3a10c8842cdf6358d20ffa34f5 Author: Andy Shevchenko Date: Mon Nov 4 19:07:30 2019 +0200 pinctrl: baytrail: Add GPIO <-> pin mapping ranges via callback When IRQ chip is instantiated via GPIO library flow, the few functions, in particular the ACPI event registration mechanism, on some of ACPI based platforms expect that the pin ranges are initialized to that point. Add GPIO <-> pin mapping ranges via callback in the GPIO library flow. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede Tested-by: Hans de Goede commit 9c9b65203492927cc4ae419e9601e837ecbd889e Author: Curtis Malainey Date: Wed Nov 27 17:13:58 2019 -0800 ASoC: core: only flush inited work during free There are many paths to soc_free_pcm_runtime which can both have and have not yet inited the workqueue yet. When we flush the queue when we have not yet inited the queue we cause warnings to be printed. An example is soc_cleanup_card_resources which is called by snd_soc_bind_card which has multiple failure points before and after soc_link_init -> soc_new_pcm which is where the queue is inited. Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191128011358.39234-1-cujomalainey@chromium.org Signed-off-by: Mark Brown commit b30b736a2b3d5a032fd91ab34c558148cda6590f Author: Andy Shevchenko Date: Tue Nov 12 16:24:41 2019 +0200 pinctrl: baytrail: Update North Community pin list Update North Community pin list to be more clear about pin functions. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 40ecab551232972a39cdd8b6f17ede54a3fdb296 Author: Hans de Goede Date: Tue Nov 19 16:46:41 2019 +0100 pinctrl: baytrail: Really serialize all register accesses Commit 39ce8150a079 ("pinctrl: baytrail: Serialize all register access") added a spinlock around all register accesses because: "There is a hardware issue in Intel Baytrail where concurrent GPIO register access might result reads of 0xffffffff and writes might get dropped completely." Testing has shown that this does not catch all cases, there are still 2 problems remaining 1) The original fix uses a spinlock per byt_gpio device / struct, additional testing has shown that this is not sufficient concurent accesses to 2 different GPIO banks also suffer from the same problem. This commit fixes this by moving to a single global lock. 2) The original fix did not add a lock around the register accesses in the suspend/resume handling. Since pinctrl-baytrail.c is using normal suspend/resume handlers, interrupts are still enabled during suspend/resume handling. Nothing should be using the GPIOs when they are being taken down, _but_ the GPIOs themselves may still cause interrupts, which are likely to use (read) the triggering GPIO. So we need to protect against concurrent GPIO register accesses in the suspend/resume handlers too. This commit fixes this by adding the missing spin_lock / unlock calls. The 2 fixes together fix the Acer Switch 10 SW5-012 getting completely confused after a suspend resume. The DSDT for this device has a bug in its _LID method which reprograms the home and power button trigger- flags requesting both high and low _level_ interrupts so the IRQs for these 2 GPIOs continuously fire. This combined with the saving of registers during suspend, triggers concurrent GPIO register accesses resulting in saving 0xffffffff as pconf0 value during suspend and then when restoring this on resume the pinmux settings get all messed up, resulting in various I2C busses being stuck, the wifi no longer working and often the tablet simply not coming out of suspend at all. Cc: stable@vger.kernel.org Fixes: 39ce8150a079 ("pinctrl: baytrail: Serialize all register access") Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 634f0348fe336fce8f6cab1933139115e983ed2f Author: Max Filippov Date: Tue Nov 26 11:30:27 2019 -0800 gpio: xtensa: fix driver build Commit cad6fade6e78 ("xtensa: clean up WSR*/RSR*/get_sr/set_sr") removed {RSR,WSR}_CPENABLE from xtensa code, but did not fix up all users, breaking gpio-xtensa driver build. Update gpio-xtensa to use new xtensa_{get,set}_sr API. Cc: stable@vger.kernel.org # v5.0+ Fixes: cad6fade6e78 ("xtensa: clean up WSR*/RSR*/get_sr/set_sr") Signed-off-by: Max Filippov Signed-off-by: Bartosz Golaszewski commit 36fcb4292473cb9c9ce7706d038bcf0eda5cabeb Author: Marcelo Tosatti Date: Fri Dec 6 13:07:41 2019 -0200 cpuidle: use first valid target residency as poll time Commit 259231a04561 ("cpuidle: add poll_limit_ns to cpuidle_device structure") changed, by mistake, the target residency from the first available sleep state to the last available sleep state (which should be longer). This might cause excessive polling. Fixes: 259231a04561 ("cpuidle: add poll_limit_ns to cpuidle_device structure") Signed-off-by: Marcelo Tosatti Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit e8ad8d5108e0304532fc800433714ed664ecf71d Merge: e42617b825f8 27dbc542f651 Author: Rafael J. Wysocki Date: Mon Dec 9 09:31:24 2019 +0100 Merge tag 'devfreq-fixes-for-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for 5.5-rc1 from Chanwoo Choi: "Update devfreq core: - Add PM QoS support for devfreq device with following QoS type. External user of devfreq device can request the minimum and maximum frequency according to their multiple requirements. : DEV_PM_QOS_MIN_FREQUENCY is used for requesting the minimum device frequency. : DEV_PM_QOS_MAX_FREQUENCY is used for requesting the maximum device frequency. - Use PM QoS interface when entering the min/max_freq via sysfs interface. - Add get_freq_range() helper function in order to get the final min/max frequency among the multiple requirements of min/max frequency. - Fix a function return value and modify code for more correct exception handling if errors happen." * tag 'devfreq-fixes-for-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: Use PM QoS for sysfs min/max_freq PM / devfreq: Add PM QoS support PM / devfreq: Don't fail devfreq_dev_release if not in list PM / devfreq: Introduce get_freq_range helper PM / devfreq: Set scaling_max_freq to max on OPP notifier error PM / devfreq: Fix devfreq_notifier_call returning errno commit 7347f09a198a045d5f6ea5e9c8fcc1db98e5a854 Merge: e42617b825f8 9fd229c478fb Author: Greg Kroah-Hartman Date: Mon Dec 9 09:27:52 2019 +0100 Merge tag 'iio-fixes-for-5.5a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of fixes for IIO in the 5.5 cycle. Mixture of old things people have just hit, and a few late breaking issues with things that went in during the merge window. Being sent promptly to resolve potential DT breakage causing issues for binding test builds. * ad7606 - Avoid reading extra data from the device over what was intended. * ad7124 - Enable the internal reference when in use. * ad7292 - Fix up license for newly added binding. Better to not have this go out in a release with more limited header than intended. - Fix a constraint on number of channels. * ad7949 - Fix an issue which can result in readouts being from the wrong channel. * hdc100x - Fix wrong ABI usage (units) for relative humidity channel. * intel mrfld - Allocate right amount of private data (currently allocating too much). * ltc2983 - Avoid a potential issue with machine endianness and wrong length device tree read. * max1027 - Clean up leak of an iio_trigger on probe failure. * max9611 - Ensure we sleep long enough to successfully initialize the sensor. * mpu6050 - Fix wrong ABI usage (units) for temperature channel. * st_accel - Fix an unused variable warning. * st_lsm6dsx - Fix decimation factor issue that can lead to missaligned datasets (and hence garbage) - Fix an issue with how we track enabled fifo channels. - Avoid powering off the device if wake up events are enabled. * tag 'iio-fixes-for-5.5a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: max9611: Fix too short conversion time delay iio: ad7949: fix channels mixups iio: imu: st_lsm6dsx: do not power-off accel if events are enabled iio: imu: st_lsm6dsx: track hw FIFO buffering with fifo_mask iio: imu: st_lsm6dsx: fix decimation factor estimation iio: imu: inv_mpu6050: fix temperature reporting using bad unit iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting iio: adc: max1027: fix not unregistered iio trigger iio: adc: intel_mrfld_adc: Allocating too much data in probe() iio: adc: ad7124: Enable internal reference dt-bindings: iio: adc: ad7292: fix constraint over channel quantity dt-bindings: iio: adc: ad7292: Update SPDX identifier iio: temperature: ltc2983: fix u32 read into a unsigned long long iio: st_accel: Fix unused variable warning iio: adc: ad7606: fix reading unnecessary data from device commit 4ff40d140e2a2060ef6051800a4a9eab07624f42 Author: Yunhao Tian <18373444@buaa.edu.cn> Date: Mon Nov 25 20:58:32 2019 +0800 clk: sunxi-ng: v3s: Fix incorrect number of hw_clks. The hws field of sun8i_v3s_hw_clks has only 74 members. However, the number specified by CLK_NUMBER is 77 (= CLK_I2S0 + 1). This leads to runtime segmentation fault that is not always reproducible. This patch fixes the problem by specifying correct clock number. Signed-off-by: Yunhao Tian <18373444@buaa.edu.cn> [Maxime: Also remove the CLK_NUMBER definition] Signed-off-by: Maxime Ripard commit 3d615c2fc2d111b51d2e20516b920138d4ae29a2 Author: Stefan Mavrodiev Date: Fri Nov 29 13:39:41 2019 +0200 arm64: dts: allwinner: a64: olinuxino: Fix SDIO supply regulator A64-OLinuXino uses DCDC1 (VCC-IO) for MMC1 supply. In commit 916b68cfe4b5 ("arm64: dts: a64-olinuxino: Enable RTL8723BS WiFi") ALDO2 is set, which is VCC-PL. Since DCDC1 is always present, the boards are working without a problem. This patch sets the correct regulator. Fixes: 916b68cfe4b5 ("arm64: dts: a64-olinuxino: Enable RTL8723BS WiFi") Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: Stefan Mavrodiev Signed-off-by: Maxime Ripard commit 8467ebbf708e5c4574b4eb5f663558fc724945ac Author: Stefan Mavrodiev Date: Fri Nov 29 13:39:39 2019 +0200 arm64: dts: allwinner: a64: olinuxino: Fix eMMC supply regulator A64-OLinuXino-eMMC uses 1.8V for eMMC supply. This is done via a triple jumper, which sets VCC-PL to either 1.8V or 3.3V. This setting is different for boards with and without eMMC. This is not a big issue for DDR52 mode, however the eMMC will not work in HS200/HS400, since these modes explicitly requires 1.8V. Fixes: 94f68f3a4b2a ("arm64: dts: allwinner: a64: Add A64 OlinuXino board (with eMMC)") Cc: stable@vger.kernel.org # v5.4 Signed-off-by: Stefan Mavrodiev Signed-off-by: Maxime Ripard commit 43cb86799ff03e9819c07f37f72f80f8246ad7ed Author: Martin Blumenstingl Date: Sun Dec 8 18:18:31 2019 +0100 drm: meson: venc: cvbs: fix CVBS mode matching With commit 222ec1618c3ace ("drm: Add aspect ratio parsing in DRM layer") the drm core started honoring the picture_aspect_ratio field when comparing two drm_display_modes. Prior to that it was ignored. When the CVBS encoder driver was initially submitted there was no aspect ratio check. Switch from drm_mode_equal() to drm_mode_match() without DRM_MODE_MATCH_ASPECT_RATIO to fix "kmscube" and X.org output using the CVBS connector. When (for example) kmscube sets the output mode when using the CVBS connector it passes HDMI_PICTURE_ASPECT_NONE, making the drm_mode_equal() fail as it include the aspect ratio. Prior to this patch kmscube reported: failed to set mode: Invalid argument The CVBS mode checking in the sun4i (drivers/gpu/drm/sun4i/sun4i_tv.c sun4i_tv_mode_to_drm_mode) and ZTE (drivers/gpu/drm/zte/zx_tvenc.c tvenc_mode_{pal,ntsc}) drivers don't set the "picture_aspect_ratio" at all. The Meson VPU driver does not rely on the aspect ratio for the CVBS output so we can safely decouple it from the hdmi_picture_aspect setting. Cc: Fixes: 222ec1618c3ace ("drm: Add aspect ratio parsing in DRM layer") Fixes: bbbe775ec5b5da ("drm: Add support for Amlogic Meson Graphic Controller") Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong [narmstrong: squashed with drm: meson: venc: cvbs: deduplicate the meson_cvbs_mode lookup code] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191208171832.1064772-3-martin.blumenstingl@googlemail.com commit 781d5eb4b4a63df352d6f222c85f2628988aba87 Merge: e42617b825f8 6645d42d79d3 Author: Dave Airlie Date: Mon Dec 9 17:13:13 2019 +1000 Merge tag 'drm-misc-fixes-2019-11-25' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - A fix for a memory leak in the dma-buf support - One in mcde DSI support that leads to a pointer dereference Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191125094336.GA14723@gilmour.lan commit 9ff3483e5c552311676369b31bc64f0e8208fcd2 Author: Takashi Sakamoto Date: Mon Dec 9 08:22:26 2019 +0900 ALSA: firewire-motu: fix double unlocked 'motu->mutex' Mutex is doubly unlocked in some error path of pcm.open. This commit fixes ALSA firewire-motu driver in Linux kernel v5.5. Reported-by: kbuild test robot Reported-by: Dan Carpenter Fixes: 3fd80b200388 ("ALSA: firewire-motu: use the same size of period for PCM substream in AMDTP streams") Fixes: 0f5482e7875b ("ALSA: firewire-motu: share PCM buffer size for both direction") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191208232226.6685-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit bc3e8f5d42d5cfac3f7ac9b458c2eeb02e8b1cf7 Author: Kefeng Wang Date: Thu Oct 24 15:20:03 2019 +0800 riscv: only select serial sifive if TTY is enabled There is some warning if TTY is not enabled, and lead to build error, only select serial sifive if TTY enabled, and this also makes randconfig happy. Signed-off-by: Kefeng Wang [paul.walmsley@sifive.com: updated to apply] Signed-off-by: Paul Walmsley commit 0e72a2f9c1a386aaa8337f9f524f89a7884b82cf Author: Olof Johansson Date: Sat Dec 7 13:29:16 2019 -0800 riscv: Fix build dependency for loader The Makefile addition for the flat image loader missed an obj prefix. For most parallel builds this worked out fine, but with -j1 the dependency wasn't fulfilled and thus fails: arch/riscv/boot/loader.S: Assembler messages: arch/riscv/boot/loader.S:7: Error: file not found: arch/riscv/boot/Image Fixes: 405fe7aa0dba ("riscv: provide a flat image loader") Cc: Christoph Hellwig Signed-off-by: Olof Johansson Reviewed-by: Anup Patel Signed-off-by: Paul Walmsley commit 27dbc542f651ed09de910f274b32634904103774 Author: Leonard Crestez Date: Thu Dec 5 12:05:07 2019 +0200 PM / devfreq: Use PM QoS for sysfs min/max_freq Switch the handling of min_freq and max_freq from sysfs to use the dev_pm_qos_request interface. Since PM QoS handles frequencies as kHz this change reduces the precision of min_freq and max_freq. This shouldn't introduce problems because frequencies which are not an integer number of kHz are likely not an integer number of Hz either. Try to ensure compatibility by rounding min values down and rounding max values up. Signed-off-by: Leonard Crestez Acked-by: Chanwoo Choi Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke [cw00.choi: Return -EAGAIN instead of -EINVAL if dev_pm_qos is inactive] Signed-off-by: Chanwoo Choi commit 05d7ae15cfb18f9ce55eef85bb6bcd62d31acc57 Author: Leonard Crestez Date: Thu Dec 5 12:05:06 2019 +0200 PM / devfreq: Add PM QoS support Register notifiers with the PM QoS framework in order to respond to requests for DEV_PM_QOS_MIN_FREQUENCY and DEV_PM_QOS_MAX_FREQUENCY. No notifiers are added by this patch but PM QoS constraints can be imposed externally (for example from other devices). Signed-off-by: Leonard Crestez Acked-by: Chanwoo Choi Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Signed-off-by: Chanwoo Choi commit 42a6b25e67df6ee6675e8d1eaf18065bd73328ba Author: Leonard Crestez Date: Thu Nov 14 01:21:31 2019 +0200 PM / devfreq: Don't fail devfreq_dev_release if not in list Right now devfreq_dev_release will print a warning and abort the rest of the cleanup if the devfreq instance is not part of the global devfreq_list. But this is a valid scenario, for example it can happen if the governor can't be found or on any other init error that happens after device_register. Initialize devfreq->node to an empty list head in devfreq_add_device so that list_del becomes a safe noop inside devfreq_dev_release and we can continue the rest of the cleanup. Signed-off-by: Leonard Crestez Reviewed-by: Matthias Kaehlcke Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit 46cecc0bf095bbffdf58618a1b4a5f9c9f073bf8 Author: Leonard Crestez Date: Thu Oct 31 23:34:26 2019 +0200 PM / devfreq: Introduce get_freq_range helper Moving handling of min/max freq to a single function and call it from update_devfreq and for printing min/max freq values in sysfs. This changes the behavior of out-of-range min_freq/max_freq: clamping is now done at evaluation time. This means that if an out-of-range constraint is imposed by sysfs and it later becomes valid then it will be enforced. Signed-off-by: Leonard Crestez Reviewed-by: Matthias Kaehlcke Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit e7cc792d00049c874010b398a27c3cc7bc8fef34 Author: Leonard Crestez Date: Thu Oct 31 23:34:19 2019 +0200 PM / devfreq: Set scaling_max_freq to max on OPP notifier error The devfreq_notifier_call functions will update scaling_min_freq and scaling_max_freq when the OPP table is updated. If fetching the maximum frequency fails then scaling_max_freq remains set to zero which is confusing. Set to ULONG_MAX instead so we don't need special handling for this case in other places. Signed-off-by: Leonard Crestez Reviewed-by: Matthias Kaehlcke Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit e876e710ede23f670494331e062d643928e4142a Author: Leonard Crestez Date: Thu Oct 31 23:34:18 2019 +0200 PM / devfreq: Fix devfreq_notifier_call returning errno Notifier callbacks shouldn't return negative errno but one of the NOTIFY_OK/DONE/BAD values. The OPP core will ignore return values from notifiers but returning a value that matches NOTIFY_STOP_MASK will stop the notification chain. Fix by always returning NOTIFY_OK. Signed-off-by: Leonard Crestez Reviewed-by: Matthias Kaehlcke Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit ed11e31709d7ddb19d4dc451d5bbfb15129f4cad Author: Peng Fan Date: Fri Nov 22 06:11:42 2019 +0000 clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table There should be a sentinel of ulp_div_table, otherwise _get_table_div may access data out of the array. Fixes: b1260067ac3d ("clk: imx: add imx7ulp clk driver") Signed-off-by: Peng Fan Cc: Signed-off-by: Shawn Guo commit 92c17f6043647652e1f4a772636e4288d4ecea3e Author: Yongqiang Niu Date: Wed Nov 27 18:04:19 2019 +0800 drm/mediatek: Fix can't get component for external display plane. The original logic is ok for primary display, but will not find out component for external display. For example, plane->index is 6 for external display, but there are only 2 layer nr in external display, and this condition will never happen: if (plane->index < (count + mtk_ddp_comp_layer_nr(comp))) Fix this by using the offset of the plane to mtk_crtc->planes as index, instead of plane->index. Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: Yongqiang Niu Signed-off-by: Pi-Hsun Shih Signed-off-by: CK Hu commit 13b0ba33d78b32384ea38abd03bc2b795fcab194 Author: Pi-Hsun Shih Date: Mon Nov 18 14:18:05 2019 +0800 drm/mediatek: Check return value of mtk_drm_ddp_comp_for_plane. The mtk_drm_ddp_comp_for_plane can return NULL, but the usage doesn't check for it. Add check for it. Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: Pi-Hsun Shih Signed-off-by: CK Hu commit cf6b58ab2d55f5a143c88c219c8e66ff0720fa69 Author: Masahiro Yamada Date: Wed Dec 4 11:51:48 2019 +0900 kbuild: fix 'No such file or directory' warning when cleaning Since commit fcbb8461fd23 ("kbuild: remove header compile test"), 'make clean' with O= option in the pristine source tree emits 'No such file or directory' warning. $ git clean -d -f -x $ make O=foo clean make[1]: Entering directory '/home/masahiro/linux/foo' find: ‘usr/include’: No such file or directory make[1]: Leaving directory '/home/masahiro/linux/foo' Fixes: fcbb8461fd23 ("kbuild: remove header compile test") Reported-by: kbuild test robot Signed-off-by: Masahiro Yamada commit b731fadff4899c97be9ff33f3f2bd379b7a6be75 Author: Andreas Kemnade Date: Mon Nov 11 21:29:59 2019 +0100 ARM: dts: e60k02: fix power button The power button was only producing irqs, but no key events, Forced power down with long key press works, so probably only a short spike arrives at the SoC. Further investigation shows that LDORTC2 is off after boot of the vendor kernel. LDORTC2 is shared with a GPIO at the pmic which probably transfers the button press to the SoC. That regulator off at boot, so "regulator-boot-on" is definitively wrong. So remove that. Reported-by: H. Nikolaus Schaller Signed-off-by: Andreas Kemnade Fixes: c100ea86e6ab ("ARM: dts: add Netronix E60K02 board common file") Signed-off-by: Shawn Guo commit 073a01e8d7c23b3efb59a3d4c20aa546f9ec29a9 Author: Peng Fan Date: Fri Nov 1 10:16:19 2019 +0000 clk: imx: clk-composite-8m: add lock to gate/mux There is a lock to divider in the composite driver, but that's not enough. lock to gate/mux are also needed to provide exclusive access to the register. Fixes: d3ff9728134e ("clk: imx: Add imx composite clock") Signed-off-by: Peng Fan Cc: Signed-off-by: Shawn Guo commit 0aeb1f2b74f3402e9cdb7c0b8e2c369c9767301e Author: Stefan Roese Date: Tue Nov 5 14:04:56 2019 +0100 ARM: dts: imx6ul: imx6ul-14x14-evk.dtsi: Fix SPI NOR probing Without this "jedec,spi-nor" compatible property, probing of the SPI NOR does not work on the NXP i.MX6ULL EVK. Fix this by adding this compatible property to the DT. Fixes: 7d77b8505aa9 ("ARM: dts: imx6ull: fix the imx6ull-14x14-evk configuration") Signed-off-by: Stefan Roese Reviewed-by: Fabio Estevam Reviewed-by: Frieder Schrempf Signed-off-by: Shawn Guo commit e42617b825f8073569da76dc4510bfa019b1c35a Author: Linus Torvalds Date: Sun Dec 8 14:57:55 2019 -0800 Linux 5.5-rc1 commit 95e6ba5133163f8241c9ea2439369cec0452fec6 Merge: 138f371ddf4f 0fc75219fe9a Author: Linus Torvalds Date: Sun Dec 8 13:28:11 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) More jumbo frame fixes in r8169, from Heiner Kallweit. 2) Fix bpf build in minimal configuration, from Alexei Starovoitov. 3) Use after free in slcan driver, from Jouni Hogander. 4) Flower classifier port ranges don't work properly in the HW offload case, from Yoshiki Komachi. 5) Use after free in hns3_nic_maybe_stop_tx(), from Yunsheng Lin. 6) Out of bounds access in mqprio_dump(), from Vladyslav Tarasiuk. 7) Fix flow dissection in dsa TX path, from Alexander Lobakin. 8) Stale syncookie timestampe fixes from Guillaume Nault. [ Did an evil merge to silence a warning introduced by this pull - Linus ] * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (84 commits) r8169: fix rtl_hw_jumbo_disable for RTL8168evl net_sched: validate TCA_KIND attribute in tc_chain_tmplt_add() r8169: add missing RX enabling for WoL on RTL8125 vhost/vsock: accept only packets with the right dst_cid net: phy: dp83867: fix hfs boot in rgmii mode net: ethernet: ti: cpsw: fix extra rx interrupt inet: protect against too small mtu values. gre: refetch erspan header from skb->data after pskb_may_pull() pppoe: remove redundant BUG_ON() check in pppoe_pernet tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE() tcp: tighten acceptance of ACKs not matching a child socket tcp: fix rejected syncookies due to stale timestamps lpc_eth: kernel BUG on remove tcp: md5: fix potential overestimation of TCP option space net: sched: allow indirect blocks to bind to clsact in TC net: core: rename indirect block ingress cb function net-sysfs: Call dev_hold always in netdev_queue_add_kobject net: dsa: fix flow dissection on Tx path net/tls: Fix return values to avoid ENOTSUPP net: avoid an indirect call in ____sys_recvmsg() ... commit 138f371ddf4ff50207dbe33ebfc237e756cd6222 Merge: a78f7cdddbbb 1eb9151eb7c5 Author: Linus Torvalds Date: Sun Dec 8 12:23:42 2019 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "Eleven patches, all in drivers (no core changes) that are either minor cleanups or small fixes. They were late arriving, but still safe for -rc1" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: MAINTAINERS: Add the linux-scsi mailing list to the ISCSI entry scsi: megaraid_sas: Make poll_aen_lock static scsi: sd_zbc: Improve report zones error printout scsi: qla2xxx: Fix qla2x00_request_irqs() for MSI scsi: qla2xxx: unregister ports after GPN_FT failure scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan scsi: pm80xx: Remove unused include of linux/version.h scsi: pm80xx: fix logic to break out of loop when register value is 2 or 3 scsi: scsi_transport_sas: Fix memory leak when removing devices scsi: lpfc: size cpu map by last cpu id set scsi: ibmvscsi_tgt: Remove unneeded variable rc commit a78f7cdddbbb2bb2ed6851fbb792072570517650 Merge: 5bf9a06a5f7c 231e2a0ba567 Author: Linus Torvalds Date: Sun Dec 8 12:12:18 2019 -0800 Merge tag '5.5-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Nine cifs/smb3 fixes: - one fix for stable (oops during oplock break) - two timestamp fixes including important one for updating mtime at close to avoid stale metadata caching issue on dirty files (also improves perf by using SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB over the wire) - two fixes for "modefromsid" mount option for file create (now allows mode bits to be set more atomically and accurately on create by adding "sd_context" on create when modefromsid specified on mount) - two fixes for multichannel found in testing this week against different servers - two small cleanup patches" * tag '5.5-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: smb3: improve check for when we send the security descriptor context on create smb3: fix mode passed in on create for modetosid mount option cifs: fix possible uninitialized access and race on iface_list cifs: Fix lookup of SMB connections on multichannel smb3: query attributes on file close smb3: remove unused flag passed into close functions cifs: remove redundant assignment to pointer pneg_ctxt fs: cifs: Fix atime update check vs mtime CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks commit 5bf9a06a5f7ca525621f4117257a49dc5a2786da Merge: 9455d25f4e3b 5c8b0dfc6f4a Author: Linus Torvalds Date: Sun Dec 8 11:08:28 2019 -0800 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs cleanups from Al Viro: "No common topic, just three cleanups". * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: make __d_alloc() static fs/namespace: add __user to open_tree and move_mount syscalls fs/fnctl: fix missing __user in fcntl_rw_hint() commit 9fd229c478fbf77c41c8528aa757ef14210365f6 Author: Geert Uytterhoeven Date: Mon Dec 2 09:55:46 2019 +0100 iio: adc: max9611: Fix too short conversion time delay As of commit b9ddd5091160793e ("iio: adc: max9611: Fix temperature reading in probe"), max9611 initialization sometimes fails on the Salvator-X(S) development board with: max9611 4-007f: Invalid value received from ADC 0x8000: aborting max9611: probe of 4-007f failed with error -5 The max9611 driver tests communications with the chip by reading the die temperature during the probe function, which returns an invalid value. According to the datasheet, the typical ADC conversion time is 2 ms, but no minimum or maximum values are provided. Maxim Technical Support confirmed this was tested with temperature Ta=25 degreeC, and promised to inform me if a maximum/minimum value is available (they didn't get back to me, so I assume it is not). However, the driver assumes a 1 ms conversion time. Usually the usleep_range() call returns after more than 1.8 ms, hence it succeeds. When it returns earlier, the data register may be read too early, and the previous measurement value will be returned. After boot, this is the temperature POR (power-on reset) value, causing the failure above. Fix this by increasing the delay from 1000-2000 µs to 3000-3300 µs. Note that this issue has always been present, but it was exposed by the aformentioned commit. Fixes: 69780a3bbc0b1e7e ("iio: adc: Add Maxim max9611 ADC driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jacopo Mondi Reviewed-by: Wolfram Sang Signed-off-by: Jonathan Cameron commit 3b71f6b59508b1c9befcb43de434866aafc76520 Author: Andrea Merello Date: Mon Dec 2 15:13:36 2019 +0100 iio: ad7949: fix channels mixups Each time we need to read a sample (from the sysfs interface, since the driver supports only it) the driver writes the configuration register with the proper settings needed to perform the said read, then it runs another xfer to actually read the resulting value. Most notably the configuration register is updated to set the ADC internal MUX depending by which channel the read targets. Unfortunately this seems not enough to ensure correct operation because the ADC works in a pipelined-like fashion and the new configuration isn't applied in time. The ADC alternates two phases: acquisition and conversion. During the acquisition phase the ADC samples the analog signal in an internal capacitor; in the conversion phase the ADC performs the actual analog to digital conversion of the stored voltage. Note that of course the MUX needs to be set to the proper channel when the acquisition phase is performed. Once the conversion phase has been completed, the device automatically switches back to a new acquisition; on the other hand the device switches from acquisition to conversion on the rising edge of SPI cs signal (that is when the xfer finishes). Only after both two phases have been completed (with the proper settings already written in the configuration register since the beginning) it is possible to read the outcome from SPI bus. With the current driver implementation, we end up in the following situation: _______ 1st xfer ____________ 2nd xfer ___________________ SPI cs.. \_________/ \_________/ SPI rd.. idle |(val N-2)+ idle | val N-1 + idle ... SPI wr.. idle | cfg N + idle | (X) + idle ... ------------------------ + -------------------- + ------------------ AD .. acq N-1 + cnv N-1 | acq N + cnv N | acq N+1 As shown in the diagram above, the value we read in the Nth read belongs to configuration setting N-1. In case the configuration is not changed (config[N] == config[N-1]), then we still get correct data, but in case the configuration changes (i.e. switching the MUX on another channel), we get wrong data (data from the previously selected channel). This patch fixes this by performing one more "dummy" transfer in order to ending up in reading the data when it's really ready, as per the following timing diagram. _______ 1st xfer ____________ 2nd xfer ___________ 3rd xfer ___ SPI cs.. \_________/ \_________/ \_________/ SPI rd.. idle |(val N-2)+ idle |(val N-1)+ idle | val N + .. SPI wr.. idle | cfg N + idle | (X) + idle | (X) + .. ------------------------ + -------------------- + ------------------- + -- AD .. acq N-1 + cnv N-1 | acq N + cnv N | acq N+1 | .. NOTE: in the latter case (cfg changes), the acquisition phase for the value to be read begins after the 1st xfer, that is after the read request has been issued on sysfs. On the other hand, if the cfg doesn't change, then we can refer to the fist diagram assuming N == (N - 1); the acquisition phase _begins_ before the 1st xfer (potentially a lot of time before the read has been issued via sysfs, but it _ends_ after the 1st xfer, that is _after_ the read has started. This should guarantee a reasonably fresh data, which value represents the voltage that the sampled signal has after the read start or maybe just around it. Signed-off-by: Andrea Merello Reviewed-by: Charles-Antoine Couret Cc: Signed-off-by: Jonathan Cameron commit bd41c445b7b96e46efb799ff33bdf870479488cf Author: Lorenzo Bianconi Date: Fri Nov 29 11:37:24 2019 +0200 iio: imu: st_lsm6dsx: do not power-off accel if events are enabled Do not power-off accel unconditionally if wake-up events are enabled powering off the hw FIFO. At the same time do not power-off the accel sensor if it is 'batched' in the hw FIFO disabling sensor events Fixes: b5969abfa8b8 ("iio: imu: st_lsm6dsx: add motion events") Tested-by: Sean Nyekjaer Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit c2686eb2aed322c642b5a291d5b9d67fe4301d4a Author: Lorenzo Bianconi Date: Thu Nov 28 17:42:30 2019 +0200 iio: imu: st_lsm6dsx: track hw FIFO buffering with fifo_mask Track hw FIFO state introducing fifo_mask since now the accel sensor can be enabled during suspend/resume in order to trigger the wake-up enabling the FIFO in st_lsm6dsx_resume even if it was disabled before the suspend. Hence we must separately track the fifo state. Fixes: 4c997dfa692d ("iio: imu: st_lsm6dsx: add wakeup-source option") Signed-off-by: Lorenzo Bianconi Tested-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit 5685b145c138b2ca696076106d0fb87b7b90b14a Author: Lorenzo Bianconi Date: Thu Nov 28 17:55:18 2019 +0200 iio: imu: st_lsm6dsx: fix decimation factor estimation Fix decimation factor and sip estimation for LSM6DSM series (max value for decimation factor is 32). If gyro and accel sensors are enabled at 12.5Hz and 416Hz respectively, decimation factor lookup will fail, producing unaligned data. Remove unused decimator filed in st_lsm6dsx_sensor structure. Fixes: f8710f0357bc ("iio: imu: st_lsm6dsx: express odr in mHZ") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 53eaa9c27fdc01b4f4d885223e29f97393409e7e Author: Jean-Baptiste Maneyrol Date: Tue Nov 26 17:19:12 2019 +0100 iio: imu: inv_mpu6050: fix temperature reporting using bad unit Temperature should be reported in milli-degrees, not degrees. Fix scale and offset values to use the correct unit. This is a fix for an issue that has been present for a long time. The fixes tag reflects the point at which the code last changed in a fashion that would make this fix patch no longer apply. Backports will be necessary to fix those elements that predate that patch. Fixes: 1615fe41a195 ("iio: imu: mpu6050: Fix FIFO layout for ICM20602") Cc: stable@vger.kernel.org Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 342a6928bd5017edbdae376042d8ad6af3d3b943 Author: Chris Lesiak Date: Thu Nov 21 20:39:42 2019 +0000 iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting The IIO_HUMIDITYRELATIVE channel was being incorrectly reported back as percent when it should have been milli percent. This is via an incorrect scale value being returned to userspace. Signed-off-by: Chris Lesiak Acked-by: Matt Ranostay Cc: Signed-off-by: Jonathan Cameron commit c41d79b74b3b106310b43d68fd5a304735c3369f Author: Chuhong Yuan Date: Mon Nov 18 19:40:18 2019 +0800 iio: adc: max1027: fix not unregistered iio trigger The driver forgets to unregister the iio trigger in probe failure and remove. Use devm API to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Jonathan Cameron commit 1f310f77efa25660fcbf58629a96f8ee6aac85ba Author: Dan Carpenter Date: Tue Nov 19 09:21:24 2019 +0300 iio: adc: intel_mrfld_adc: Allocating too much data in probe() This probe function is passing the wrong size to devm_iio_device_alloc(). It is supposed to be the size of the private data. Fortunately, sizeof(*indio_dev) is larger than sizeof(struct mrfld_adc) so it doesn't cause a runtime problem. Fixes: a7118662734a ("iio: adc: intel_mrfld_adc: Add Basin Cove ADC driver") Signed-off-by: Dan Carpenter Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 11d7c8d3b1259c303fb52789febed58f0bc35ad1 Author: Mircea Caprioru Date: Mon Nov 18 10:38:57 2019 +0200 iio: adc: ad7124: Enable internal reference When the internal reference was selected by a channel it was not enabled. This patch fixes that and enables it. Fixes: b3af341bbd96 ("iio: adc: Add ad7124 support") Signed-off-by: Mircea Caprioru Cc: Signed-off-by: Jonathan Cameron commit ada971cbdc37bd1f0f9b6d7373c24b67e14c5c13 Author: Marcelo Schmitt Date: Sat Nov 16 17:51:13 2019 -0300 dt-bindings: iio: adc: ad7292: fix constraint over channel quantity Change items property of AD7292 channels to correctly constrain their quantity. Signed-off-by: Marcelo Schmitt Signed-off-by: Jonathan Cameron commit dd587a7f0af5bdb2567e68da0093bbe654ecc950 Author: Marcelo Schmitt Date: Sat Nov 16 17:50:29 2019 -0300 dt-bindings: iio: adc: ad7292: Update SPDX identifier Update SPDX identifier to the preferred dual GPL-2.0 OR BSD-2-Clause licensing. Signed-off-by: Marcelo Schmitt Signed-off-by: Jonathan Cameron commit 2e19b6c3efcf074528533c7b98a42bcb1234ebb9 Author: Colin Ian King Date: Tue Nov 5 20:28:18 2019 +0000 iio: temperature: ltc2983: fix u32 read into a unsigned long long Currently the read of temp using of_property_read_u32_index is reading a u32 value into a unsigned long long. This relies on machine endianness to work correctly, so fix this by reading a u32 value and setting temp to this value. Addresses-Coverity: ("Reliance on integer endianness") Fixes: f110f3188e56 ("iio: temperature: Add support for LTC2983") Signed-off-by: Colin Ian King Acked-by: Nuno Sá Signed-off-by: Jonathan Cameron commit 0163c1c521ff8b09cd8ca395003cc00178161d77 Author: YueHaibing Date: Mon Nov 11 11:21:15 2019 +0800 iio: st_accel: Fix unused variable warning drivers/iio/accel/st_accel_core.c:1005:44: warning: mount_matrix_ext_info defined but not used [-Wunused-const-variable=] Using stub helper while CONFIG_ACPI is disabled to fix it. Suggested-by: Ladislav Michl Signed-off-by: YueHaibing Signed-off-by: Jonathan Cameron commit 341826a065660d1b77d89e6335b6095cd654271c Author: Beniamin Bia Date: Mon Nov 4 18:26:34 2019 +0200 iio: adc: ad7606: fix reading unnecessary data from device When a conversion result is being read from ADC, the driver reads the number of channels + 1 because it thinks that IIO_CHAN_SOFT_TIMESTAMP is also a physical channel. This patch fixes this issue. Fixes: 2985a5d88455 ("staging: iio: adc: ad7606: Move out of staging") Reported-by: Robert Wörle Signed-off-by: Beniamin Bia Cc: Signed-off-by: Jonathan Cameron commit ffafde478309af01b2a495ecaf203125abfb35bd Author: Gao Xiang Date: Sat Dec 7 10:37:26 2019 +0800 erofs: update documentation Some on-disk structures, fields have been renamed in v5.4, the corresponding document should be updated as well. Also fix misrespresentation of file time and words about fixed-sized output compression, data inline, etc. Link: https://lore.kernel.org/r/20191207025509.6614-1-hsiangkao@aol.com/ Signed-off-by: Gao Xiang commit b418d660bb9798d2249ac6a46c844389ef50b6a5 Author: Andy Shevchenko Date: Fri Dec 6 16:55:42 2019 +0000 efi/earlycon: Remap entire framebuffer after page initialization When commit: 69c1f396f25b ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation") moved the x86 specific EFI earlyprintk implementation to a shared location, it also tweaked the behaviour. In particular, it dropped a trick with full framebuffer remapping after page initialization, leading to two regressions: 1) very slow scrolling after page initialization, 2) kernel hang when the 'keep_bootcon' command line argument is passed. Putting the tweak back fixes #2 and mitigates #1, i.e., it limits the slow behavior to the early boot stages, presumably due to eliminating heavy map()/unmap() operations per each pixel line on the screen. [ ardb: ensure efifb is unmapped again unless keep_bootcon is in effect. ] [ mingo: speling fixes. ] Signed-off-by: Andy Shevchenko Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Bhupesh Sharma Cc: Masayoshi Mizuma Cc: linux-efi@vger.kernel.org Fixes: 69c1f396f25b ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation") Link: https://lkml.kernel.org/r/20191206165542.31469-7-ardb@kernel.org Signed-off-by: Ingo Molnar commit 9fa76ca7b8bdcdf51fc8c7b7b7a7bfc4eccceb58 Author: Arvind Sankar Date: Fri Dec 6 16:55:41 2019 +0000 efi: Fix efi_loaded_image_t::unload type The ::unload field is a function pointer, so it should be u32 for 32-bit, u64 for 64-bit. Add a prototype for it in the native efi_loaded_image_t type. Also change type of parent_handle and device_handle from void * to efi_handle_t for documentation purposes. The unload method is not used, so no functional change. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Andy Shevchenko Cc: Bhupesh Sharma Cc: Linus Torvalds Cc: Masayoshi Mizuma Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191206165542.31469-6-ardb@kernel.org Signed-off-by: Ingo Molnar commit ff397be685e410a59c34b21ce0c55d4daa466bb7 Author: Arvind Sankar Date: Fri Dec 6 16:55:40 2019 +0000 efi/gop: Fix memory leak in __gop_query32/64() efi_graphics_output_protocol::query_mode() returns info in callee-allocated memory which must be freed by the caller, which we aren't doing. We don't actually need to call query_mode() in order to obtain the info for the current graphics mode, which is already there in gop->mode->info, so just access it directly in the setup_gop32/64() functions. Also nothing uses the size of the info structure, so don't update the passed-in size (which is the size of the gop_handle table in bytes) unnecessarily. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Andy Shevchenko Cc: Bhupesh Sharma Cc: Masayoshi Mizuma Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191206165542.31469-5-ardb@kernel.org Signed-off-by: Ingo Molnar commit dbd89c303b4420f6cdb689fd398349fc83b059dd Author: Arvind Sankar Date: Fri Dec 6 16:55:39 2019 +0000 efi/gop: Return EFI_SUCCESS if a usable GOP was found If we've found a usable instance of the Graphics Output Protocol (GOP) with a framebuffer, it is possible that one of the later EFI calls fails while checking if any support console output. In this case status may be an EFI error code even though we found a usable GOP. Fix this by explicitly return EFI_SUCCESS if a usable GOP has been located. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Andy Shevchenko Cc: Bhupesh Sharma Cc: Masayoshi Mizuma Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191206165542.31469-4-ardb@kernel.org Signed-off-by: Ingo Molnar commit 6fc3cec30dfeee7d3c5db8154016aff9d65503c5 Author: Arvind Sankar Date: Fri Dec 6 16:55:38 2019 +0000 efi/gop: Return EFI_NOT_FOUND if there are no usable GOPs If we don't find a usable instance of the Graphics Output Protocol (GOP) because none of them have a framebuffer (i.e. they were all PIXEL_BLT_ONLY), but all the EFI calls succeeded, we will return EFI_SUCCESS even though we didn't find a usable GOP. Fix this by explicitly returning EFI_NOT_FOUND if no usable GOPs are found, allowing the caller to probe for UGA instead. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Andy Shevchenko Cc: Bhupesh Sharma Cc: Masayoshi Mizuma Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191206165542.31469-3-ardb@kernel.org Signed-off-by: Ingo Molnar commit ab0eb16205b43ece4c78e2259e681ff3d645ea66 Author: Ard Biesheuvel Date: Fri Dec 6 16:55:37 2019 +0000 efi/memreserve: Register reservations as 'reserved' in /proc/iomem Memory regions that are reserved using efi_mem_reserve_persistent() are recorded in a special EFI config table which survives kexec, allowing the incoming kernel to honour them as well. However, such reservations are not visible in /proc/iomem, and so the kexec tools that load the incoming kernel and its initrd into memory may overwrite these reserved regions before the incoming kernel has a chance to reserve them from further use. Address this problem by adding these reservations to /proc/iomem as they are created. Note that reservations that are inherited from a previous kernel are memblock_reserve()'d early on, so they are already visible in /proc/iomem. Tested-by: Masayoshi Mizuma Tested-by: Bhupesh Sharma Signed-off-by: Ard Biesheuvel Reviewed-by: Bhupesh Sharma Cc: # v5.4+ Cc: Andy Shevchenko Cc: Arvind Sankar Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191206165542.31469-2-ardb@kernel.org Signed-off-by: Ingo Molnar commit da2311a6385c3b499da2ed5d9be59ce331fa93e9 Author: Xiaolong Huang Date: Sat Dec 7 22:40:24 2019 +0800 can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices Uninitialized Kernel memory can leak to USB devices. Fix this by using kzalloc() instead of kmalloc(). Signed-off-by: Xiaolong Huang Fixes: 7259124eac7d ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_usb_leaf.c") Cc: linux-stable # >= v4.19 Signed-off-by: Marc Kleine-Budde commit 2de497356955ce58cd066fb03d2da5235f3c7c23 Author: Dan Murphy Date: Wed Dec 4 11:51:12 2019 -0600 can: tcan45x: Make wake-up GPIO an optional GPIO The device has the ability to disable the wake-up pin option. The wake-up pin can be either force to GND or Vsup and does not have to be tied to a GPIO. In order for the device to not use the wake-up feature write the register to disable the WAKE_CONFIG option. Signed-off-by: Dan Murphy Cc: Sean Nyekjaer Reviewed-by: Sean Nyekjaer Signed-off-by: Marc Kleine-Budde commit 1202d2318e2f370befe6c154db75ffaad3ec7ba0 Author: Dan Murphy Date: Wed Dec 4 11:51:11 2019 -0600 dt-bindings: tcan4x5x: Make wake-gpio an optional gpio The wake-up of the device can be configured as an optional feature of the device. Move the wake-up gpio from a requried property to an optional property. Signed-off-by: Dan Murphy Cc: Rob Herring Reviewed-by: Sean Nyekjaer Tested-by: Sean Nyekjaer Signed-off-by: Marc Kleine-Budde commit 9c9e1b012a218019079d676a95b9570b7f444f7f Author: Sean Nyekjaer Date: Fri Dec 6 16:29:23 2019 +0100 dt-bindings: can: tcan4x5x: reset pin is active high Change the reset pin example to active high to be in line with the datasheet Signed-off-by: Sean Nyekjaer Cc: Rob Herring Signed-off-by: Marc Kleine-Budde commit 60552253e29c8860ee5bf1e6064591b0917c0394 Author: Sean Nyekjaer Date: Fri Dec 6 16:29:22 2019 +0100 can: m_can: tcan4x5x: add required delay after reset According to section "8.3.8 RST Pin" in the datasheet we are required to wait >700us after the device is reset. Signed-off-by: Sean Nyekjaer Acked-by: Dan Murphy Cc: linux-stable # >= v5.4 Signed-off-by: Marc Kleine-Budde commit 048e3a34a2e7669bf475eb56c7345ad9d8d2b8e3 Author: Joakim Zhang Date: Wed Dec 4 11:36:14 2019 +0000 can: flexcan: poll MCR_LPM_ACK instead of GPR ACK for stop mode acknowledgment Stop Mode is entered when Stop Mode is requested at chip level and MCR[LPM_ACK] is asserted by the FlexCAN. Double check with IP owner, the MCR[LPM_ACK] bit should be polled for stop mode acknowledgment, not the acknowledgment from chip level which is used to gate flexcan clocks. This patch depends on: b7603d080ffc ("can: flexcan: add low power enter/exit acknowledgment helper") Fixes: 5f186c257fa4 (can: flexcan: fix stop mode acknowledgment) Tested-by: Sean Nyekjaer Signed-off-by: Joakim Zhang Cc: linux-stable # >= v5.0 Signed-off-by: Marc Kleine-Budde commit b7603d080ffcf8689ec91ca300caf84d8dbed317 Author: Joakim Zhang Date: Wed Dec 4 11:36:11 2019 +0000 can: flexcan: add low power enter/exit acknowledgment helper The MCR[LPMACK] read-only bit indicates that FlexCAN is in a lower-power mode (Disabled mode, Doze mode, Stop mode). The CPU can poll this bit to know when FlexCAN has actually entered low power mode. The low power enter/exit acknowledgment helper will reduce code duplication for disabled mode, doze mode and stop mode. Tested-by: Sean Nyekjaer Signed-off-by: Joakim Zhang Signed-off-by: Marc Kleine-Budde commit e707180ae2df1c87e26ec7a6fd70d07483bde7fd Author: Sean Nyekjaer Date: Wed Dec 4 11:36:06 2019 +0000 can: flexcan: fix possible deadlock and out-of-order reception after wakeup When suspending, and there is still CAN traffic on the interfaces the flexcan immediately wakes the platform again. As it should :-). But it throws this error msg: [ 3169.378661] PM: noirq suspend of devices failed On the way down to suspend the interface that throws the error message calls flexcan_suspend() but fails to call flexcan_noirq_suspend(). That means flexcan_enter_stop_mode() is called, but on the way out of suspend the driver only calls flexcan_resume() and skips flexcan_noirq_resume(), thus it doesn't call flexcan_exit_stop_mode(). This leaves the flexcan in stop mode, and with the current driver it can't recover from this even with a soft reboot, it requires a hard reboot. This patch fixes the deadlock when using self wakeup, by calling flexcan_exit_stop_mode() from flexcan_resume() instead of flexcan_noirq_resume(). This also fixes another issue: CAN frames are received out-of-order in first IRQ handler run after wakeup. The problem is that the wakeup latency from frame reception to the IRQ handler (where the CAN frames are sorted by timestamp) is much bigger than the time stamp counter wrap around time. This means it's impossible to sort the CAN frames by timestamp. The reason is that the controller exits stop mode during noirq resume, which means it receives frames immediately, but interrupt handling is still not possible. So exit stop mode during resume stage instead of noirq resume fixes this issue. Fixes: de3578c198c6 ("can: flexcan: add self wakeup support") Signed-off-by: Sean Nyekjaer Tested-by: Sean Nyekjaer Signed-off-by: Joakim Zhang Cc: linux-stable # >= v5.0 Signed-off-by: Marc Kleine-Budde commit 9ab79b06ddf3cdf6484d60b3e5fe113e733145c8 Author: Srinivas Neeli Date: Tue Dec 3 17:46:36 2019 +0530 can: xilinx_can: Fix missing Rx can packets on CANFD2.0 CANFD2.0 core uses BRAM for storing acceptance filter ID(AFID) and MASK (AFMASK)registers. So by default AFID and AFMASK registers contain random data. Due to random data, we are not able to receive all CAN ids. Initializing AFID and AFMASK registers with Zero before enabling acceptance filter to receive all packets irrespective of ID and Mask. Fixes: 0db9071353a0 ("can: xilinx: add can 2.0 support") Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli Reviewed-by: Naga Sureshkumar Relli Cc: linux-stable # >= v5.0 Signed-off-by: Marc Kleine-Budde commit 8ac9d71d601374222a230804e419cd40c4492e1c Author: Marc Kleine-Budde Date: Thu Nov 21 10:47:50 2019 +0100 can: j1939: fix address claim code example During development the define J1939_PGN_ADDRESS_REQUEST was renamed to J1939_PGN_REQUEST. It was forgotten to adjust the documentation accordingly. This patch fixes the name of the symbol. Reported-by: https://github.com/linux-can/can-utils/issues/159#issuecomment-556538798 Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Cc: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit 00d4e14d2e4caf5f7254a505fee5eeca8cd37bd4 Author: Oleksij Rempel Date: Fri Dec 6 15:18:35 2019 +0100 can: j1939: j1939_sk_bind(): take priv after lock is held syzbot reproduced following crash: =============================================================================== kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 9844 Comm: syz-executor.0 Not tainted 5.4.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__lock_acquire+0x1254/0x4a00 kernel/locking/lockdep.c:3828 Code: 00 0f 85 96 24 00 00 48 81 c4 f0 00 00 00 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 0b 28 00 00 49 81 3e 20 19 78 8a 0f 84 5f ee ff RSP: 0018:ffff888099c3fb48 EFLAGS: 00010006 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000218 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffff888099c3fc60 R08: 0000000000000001 R09: 0000000000000001 R10: fffffbfff146e1d0 R11: ffff888098720400 R12: 00000000000010c0 R13: 0000000000000000 R14: 00000000000010c0 R15: 0000000000000000 FS: 00007f0559e98700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe4d89e0000 CR3: 0000000099606000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4485 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x33/0x50 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:343 [inline] j1939_jsk_del+0x32/0x210 net/can/j1939/socket.c:89 j1939_sk_bind+0x2ea/0x8f0 net/can/j1939/socket.c:448 __sys_bind+0x239/0x290 net/socket.c:1648 __do_sys_bind net/socket.c:1659 [inline] __se_sys_bind net/socket.c:1657 [inline] __x64_sys_bind+0x73/0xb0 net/socket.c:1657 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a679 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0559e97c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a679 RDX: 0000000000000018 RSI: 0000000020000240 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0559e986d4 R13: 00000000004c09e9 R14: 00000000004d37d0 R15: 00000000ffffffff Modules linked in: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 9844 at kernel/locking/mutex.c:1419 mutex_trylock+0x279/0x2f0 kernel/locking/mutex.c:1427 =============================================================================== This issues was caused by null pointer deference. Where j1939_sk_bind() was using currently not existing priv. Possible scenario may look as following: cpu0 cpu1 bind() bind() j1939_sk_bind() j1939_sk_bind() priv = jsk->priv; priv = jsk->priv; lock_sock(sock->sk); priv = j1939_netdev_start(ndev); j1939_jsk_add(priv, jsk); jsk->priv = priv; relase_sock(sock->sk); lock_sock(sock->sk); j1939_jsk_del(priv, jsk); ..... ooops ...... With this patch we move "priv = jsk->priv;" after the lock, to avoid assigning of wrong priv pointer. Reported-by: syzbot+99e9e1b200a1e363237d@syzkaller.appspotmail.com Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Oleksij Rempel Cc: linux-stable # >= v5.4 Signed-off-by: Marc Kleine-Budde commit 1a2e9d2f794e8789d8b4503340ea3465163db2f8 Author: Dan Murphy Date: Thu Dec 5 11:57:16 2019 -0600 MAINTAINERS: Add myself as a maintainer for TCAN4x5x Adding myself to support the TI TCAN4X5X SPI CAN device. Signed-off-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit fd230ffaa48b28954cde1bf1121aedcbb8db3883 Author: Dan Murphy Date: Thu Dec 5 11:57:15 2019 -0600 MAINTAINERS: Add myself as a maintainer for MMIO m_can Since I refactored the code to create a m_can framework and we have a MMIO MCAN IP as well add myself to help maintain the code. Signed-off-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit c08f0a92f4bef9467810551a2db0201d1b95d01e Author: Olof Johansson Date: Sat Dec 7 14:49:53 2019 -0800 ALSA: echoaudio: simplify get_audio_levels The loop optimizer seems to go astray here, and produces some warnings that don't seem valid. Still, the code can be simplified -- just clear the whole array at the beginning, and fill in whatever values are valid on the platform. Warnings before this change (GCC 8.2.0 ARM allmodconfig): In file included from ../sound/pci/echoaudio/gina24.c:115: ../sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_vumeters_get': ../sound/pci/echoaudio/echoaudio_dsp.c:647:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations] In file included from ../sound/pci/echoaudio/layla24.c:112: ../sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_vumeters_get': ../sound/pci/echoaudio/echoaudio_dsp.c:658:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations] ../sound/pci/echoaudio/echoaudio_dsp.c:647:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations] Signed-off-by: Olof Johansson Link: https://lore.kernel.org/r/20191207224953.25944-1-olof@lixom.net Signed-off-by: Takashi Iwai commit 9455d25f4e3b3d009fa1b810862e5b06229530e4 Merge: 737214515d79 9b5b99a89f64 Author: Linus Torvalds Date: Sat Dec 7 18:38:17 2019 -0800 Merge tag 'ntb-5.5' of git://github.com/jonmason/ntb Pull NTB update from Jon Mason: "Just a simple patch to add a new Hygon Device ID to the AMD NTB device driver" * tag 'ntb-5.5' of git://github.com/jonmason/ntb: NTB: Add Hygon Device ID commit 737214515d7965485c52bc5f869e57a6976cf216 Merge: 95207d554b96 afbd65f5e71a Author: Linus Torvalds Date: Sat Dec 7 18:33:01 2019 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull more input updates from Dmitry Torokhov: - fixups for Synaptics RMI4 driver - a quirk for Goodinx touchscreen on Teclast tablet - a new keycode definition for activating privacy screen feature found on a few "enterprise" laptops - updates to snvs_pwrkey driver - polling uinput device for writing (which is always allowed) now works * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash Input: goodix - add upside-down quirk for Teclast X89 tablet Input: add privacy screen toggle keycode Input: uinput - fix returning EPOLLOUT from uinput_poll Input: snvs_pwrkey - remove gratuitous NULL initializers Input: snvs_pwrkey - send key events for i.MX6 S, DL and Q commit 95207d554b968a552cc93a834af6c1ec295ebaba Merge: 50caca9d7f63 c275779ff2dd Author: Linus Torvalds Date: Sat Dec 7 17:07:18 2019 -0800 Merge tag 'iomap-5.5-merge-14' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap fixes from Darrick Wong: "Fix a race condition and a use-after-free error: - Fix a UAF when reporting writeback errors - Fix a race condition when handling page uptodate on fragmented file with blocksize < pagesize" * tag 'iomap-5.5-merge-14' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: stop using ioend after it's been freed in iomap_finish_ioend() iomap: fix sub-page uptodate handling commit 50caca9d7f633bb2aad7f979c40db01a4811abcd Merge: 316933cf74b0 798a9cada469 Author: Linus Torvalds Date: Sat Dec 7 17:05:33 2019 -0800 Merge tag 'xfs-5.5-merge-17' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Fix a couple of resource management errors and a hang: - fix a crash in the log setup code when log mounting fails - fix a hang when allocating space on the realtime device - fix a block leak when freeing space on the realtime device" * tag 'xfs-5.5-merge-17' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix mount failure crash on invalid iclog memory access xfs: don't check for AG deadlock for realtime files in bunmapi xfs: fix realtime file data space leak commit 316933cf74b07c6fedcbb0de4564af82f0820a43 Merge: 911d137ab027 f9bbb68233aa Author: Linus Torvalds Date: Sat Dec 7 16:59:25 2019 -0800 Merge tag 'for-linus-5.5-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs update from Mike Marshall: "orangefs: posix open permission checking... Orangefs has no open, and orangefs checks file permissions on each file access. Posix requires that file permissions be checked on open and nowhere else. Orangefs-through-the-kernel needs to seem posix compliant. The VFS opens files, even if the filesystem provides no method. We can see if a file was successfully opened for read and or for write by looking at file->f_mode. When writes are flowing from the page cache, file is no longer available. We can trust the VFS to have checked file->f_mode before writing to the page cache. The mode of a file might change between when it is opened and IO commences, or it might be created with an arbitrary mode. We'll make sure we don't hit EACCES during the IO stage by using UID 0" [ This is "posixish", but not a great solution in the long run, since a proper secure network server shouldn't really trust the client like this. But proper and secure POSIX behavior requires an open method and a resulting cookie for IO of some kind, or similar. - Linus ] * tag 'for-linus-5.5-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: posix open permission checking... commit 911d137ab027e6dac03695bfe71702e64b6aa161 Merge: fb9bf40cf028 38a2204f5298 Author: Linus Torvalds Date: Sat Dec 7 16:56:00 2019 -0800 Merge tag 'nfsd-5.5' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "This is a relatively quiet cycle for nfsd, mainly various bugfixes. Possibly most interesting is Trond's fixes for some callback races that were due to my incomplete understanding of rpc client shutdown. Unfortunately at the last minute I've started noticing a new intermittent failure to send callbacks. As the logic seems basically correct, I'm leaving Trond's patches in for now, and hope to find a fix in the next week so I don't have to revert those patches" * tag 'nfsd-5.5' of git://linux-nfs.org/~bfields/linux: (24 commits) nfsd: depend on CRYPTO_MD5 for legacy client tracking NFSD fixing possible null pointer derefering in copy offload nfsd: check for EBUSY from vfs_rmdir/vfs_unink. nfsd: Ensure CLONE persists data and metadata changes to the target file SUNRPC: Fix backchannel latency metrics nfsd: restore NFSv3 ACL support nfsd: v4 support requires CRYPTO_SHA256 nfsd: Fix cld_net->cn_tfm initialization lockd: remove __KERNEL__ ifdefs sunrpc: remove __KERNEL__ ifdefs race in exportfs_decode_fh() nfsd: Drop LIST_HEAD where the variable it declares is never used. nfsd: document callback_wq serialization of callback code nfsd: mark cb path down on unknown errors nfsd: Fix races between nfsd4_cb_release() and nfsd4_shutdown_callback() nfsd: minor 4.1 callback cleanup SUNRPC: Fix svcauth_gss_proxy_init() SUNRPC: Trace gssproxy upcall results sunrpc: fix crash when cache_head become valid before update nfsd: remove private bin2hex implementation ... commit fb9bf40cf028ebbe7d5bdf8f7e93abe8e30bed0d Merge: 94e89b402354 a264abad51d8 Author: Linus Torvalds Date: Sat Dec 7 16:50:55 2019 -0800 Merge tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Features: - NFSv4.2 now supports cross device offloaded copy (i.e. offloaded copy of a file from one source server to a different target server). - New RDMA tracepoints for debugging congestion control and Local Invalidate WRs. Bugfixes and cleanups - Drop the NFSv4.1 session slot if nfs4_delegreturn_prepare waits for layoutreturn - Handle bad/dead sessions correctly in nfs41_sequence_process() - Various bugfixes to the delegation return operation. - Various bugfixes pertaining to delegations that have been revoked. - Cleanups to the NFS timespec code to avoid unnecessary conversions between timespec and timespec64. - Fix unstable RDMA connections after a reconnect - Close race between waking an RDMA sender and posting a receive - Wake pending RDMA tasks if connection fails - Fix MR list corruption, and clean up MR usage - Fix another RPCSEC_GSS issue with MIC buffer space" * tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (79 commits) SUNRPC: Capture completion of all RPC tasks SUNRPC: Fix another issue with MIC buffer space NFS4: Trace lock reclaims NFS4: Trace state recovery operation NFSv4.2 fix memory leak in nfs42_ssc_open NFSv4.2 fix kfree in __nfs42_copy_file_range NFS: remove duplicated include from nfs4file.c NFSv4: Make _nfs42_proc_copy_notify() static NFS: Fallocate should use the nfs4_fattr_bitmap NFS: Return -ETXTBSY when attempting to write to a swapfile fs: nfs: sysfs: Remove NULL check before kfree NFS: remove unneeded semicolon NFSv4: add declaration of current_stateid NFSv4.x: Drop the slot if nfs4_delegreturn_prepare waits for layoutreturn NFSv4.x: Handle bad/dead sessions correctly in nfs41_sequence_process() nfsv4: Move NFSPROC4_CLNT_COPY_NOTIFY to end of list SUNRPC: Avoid RPC delays when exiting suspend NFS: Add a tracepoint in nfs_fh_to_dentry() NFSv4: Don't retry the GETATTR on old stateid in nfs4_delegreturn_done() NFSv4: Handle NFS4ERR_OLD_STATEID in delegreturn ... commit 231e2a0ba56733c95cb77d8920e76502b2134e72 Author: Steve French Date: Sat Dec 7 17:38:22 2019 -0600 smb3: improve check for when we send the security descriptor context on create We had cases in the previous patch where we were sending the security descriptor context on SMB3 open (file create) in cases when we hadn't mounted with with "modefromsid" mount option. Add check for that mount flag before calling ad_sd_context in open init. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit 94e89b40235476a83a53a47b9ffb0cb91a4c335e Merge: f74fd13f4585 9917b54aded1 Author: Linus Torvalds Date: Sat Dec 7 14:51:04 2019 -0800 Merge tag 'vfio-v5.5-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Remove hugepage checks for reserved pfns (Ben Luo) - Fix irq-bypass unregister ordering (Jiang Yi) * tag 'vfio-v5.5-rc1' of git://github.com/awilliam/linux-vfio: vfio/pci: call irq_bypass_unregister_producer() before freeing irq vfio/type1: remove hugepage checks in is_invalid_reserved_pfn() commit f74fd13f4585e418a3e630a82468be58bf1d98c1 Merge: 6dc517a3872b 14855954f636 Author: Linus Torvalds Date: Sat Dec 7 14:49:20 2019 -0800 Merge tag 'for-linus-5.5b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull more xen updates from Juergen Gross: - a patch to fix a build warning - a cleanup of no longer needed code in the Xen event handling - a small series for the Xen grant driver avoiding high order allocations and replacing an insane global limit by a per-call one - a small series fixing Xen frontend/backend module referencing * tag 'for-linus-5.5b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen-blkback: allow module to be cleanly unloaded xen/xenbus: reference count registered modules xen/gntdev: switch from kcalloc() to kvcalloc() xen/gntdev: replace global limit of mapped pages by limit per call xen/gntdev: remove redundant non-zero check on ret xen/events: remove event handling recursion detection commit 6dc517a3872ba280c20b2348f2170e4e26e25953 Merge: 85190d15f4ea 68d4b3dfcaf2 Author: Linus Torvalds Date: Sat Dec 7 14:43:46 2019 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc Kconfig updates from Andrew Morton: "A number of changes to Kconfig files under lib/ from Changbin Du and Krzysztof Kozlowski" * emailed patches from Andrew Morton : lib/: fix Kconfig indentation kernel-hacking: move DEBUG_FS to 'Generic Kernel Debugging Instruments' kernel-hacking: move DEBUG_BUGVERBOSE to 'printk and dmesg options' kernel-hacking: create a submenu for scheduler debugging options kernel-hacking: move SCHED_STACK_END_CHECK after DEBUG_STACK_USAGE kernel-hacking: move Oops into 'Lockups and Hangs' kernel-hacking: move kernel testing and coverage options to same submenu kernel-hacking: group kernel data structures debugging together kernel-hacking: create submenu for arch special debugging options kernel-hacking: group sysrq/kgdb/ubsan into 'Generic Kernel Debugging Instruments' commit 0fc75219fe9a3c90631453e9870e4f6d956f0ebc Author: Heiner Kallweit Date: Sat Dec 7 22:21:52 2019 +0100 r8169: fix rtl_hw_jumbo_disable for RTL8168evl In referenced fix we removed the RTL8168e-specific jumbo config for RTL8168evl in rtl_hw_jumbo_enable(). We have to do the same in rtl_hw_jumbo_disable(). v2: fix referenced commit id Fixes: 14012c9f3bb9 ("r8169: fix jumbo configuration for RTL8168evl") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 85190d15f4ea88e60047256fecb8216d5323ea47 Author: Linus Torvalds Date: Sat Dec 7 13:53:09 2019 -0800 pipe: don't use 'pipe_wait() for basic pipe IO pipe_wait() may be simple, but since it relies on the pipe lock, it means that we have to do the wakeup while holding the lock. That's unfortunate, because the very first thing the waked entity will want to do is to get the pipe lock for itself. So get rid of the pipe_wait() usage by simply releasing the pipe lock, doing the wakeup (if required) and then using wait_event_interruptible() to wait on the right condition instead. wait_event_interruptible() handles races on its own by comparing the wakeup condition before and after adding itself to the wait queue, so you can use an optimistic unlocked condition for it. Cc: David Howells Signed-off-by: Linus Torvalds commit 9b5b99a89f641555d9d00452afb0a8aea4471eba Author: Jiasen Lin Date: Sun Nov 17 16:48:36 2019 -0500 NTB: Add Hygon Device ID Signed-off-by: Jiasen Lin Signed-off-by: Jon Mason commit a28c8b9db8a1014aa572cd19a3bdb9ddebd3e555 Author: Linus Torvalds Date: Sat Dec 7 13:21:01 2019 -0800 pipe: remove 'waiting_writers' merging logic This code is ancient, and goes back to when we only had a single page for the pipe buffers. The exact history is hidden in the mists of time (ie "before git", and in fact predates the BK repository too). At that long-ago point in time, it actually helped to try to merge big back-and-forth pipe reads and writes, and not limit pipe reads to the single pipe buffer in length just because that was all we had at a time. However, since then we've expanded the pipe buffers to multiple pages, and this logic really doesn't seem to make sense. And a lot of it is somewhat questionable (ie "hmm, the user asked for a non-blocking read, but we see that there's a writer pending, so let's wait anyway to get the extra data that the writer will have"). But more importantly, it makes the "go to sleep" logic much less obvious, and considering the wakeup issues we've had, I want to make for less of those kinds of things. Cc: David Howells Signed-off-by: Linus Torvalds commit f467a6a66419a18f782f87507464a5dedc942dec Author: Linus Torvalds Date: Sat Dec 7 12:54:26 2019 -0800 pipe: fix and clarify pipe read wakeup logic This is the read side version of the previous commit: it simplifies the logic to only wake up waiting writers when necessary, and makes sure to use a synchronous wakeup. This time not so much for GNU make jobserver reasons (that pipe never fills up), but simply to get the writer going quickly again. A bit less verbose commentary this time, if only because I assume that the write side commentary isn't going to be ignored if you touch this code. Cc: David Howells Signed-off-by: Linus Torvalds commit 1b6b26ae7053e4914181eedf70f2d92c12abda8a Author: Linus Torvalds Date: Sat Dec 7 12:14:28 2019 -0800 pipe: fix and clarify pipe write wakeup logic The pipe rework ends up having been extra painful, partly becaused of actual bugs with ordering and caching of the pipe state, but also because of subtle performance issues. In particular, the pipe rework caused the kernel build to inexplicably slow down. The reason turns out to be that the GNU make jobserver (which limits the parallelism of the build) uses a pipe to implement a "token" system: a parallel submake will read a character from the pipe to get the job token before starting a new job, and will write a character back to the pipe when it is done. The overall job limit is thus easily controlled by just writing the appropriate number of initial token characters into the pipe. But to work well, that really means that the old behavior of write wakeups being synchronous (WF_SYNC) is very important - when the pipe writer wakes up a reader, we want the reader to actually get scheduled immediately. Otherwise you lose the parallelism of the build. The pipe rework lost that synchronous wakeup on write, and we had clearly all forgotten the reasons and rules for it. This rewrites the pipe write wakeup logic to do the required Wsync wakeups, but also clarifies the logic and avoids extraneous wakeups. It also ends up addign a number of comments about what oit does and why, so that we hopefully don't end up forgetting about this next time we change this code. Cc: David Howells Signed-off-by: Linus Torvalds commit 2dd5616ecdcebdf5a8d007af64e040d4e9214efe Author: Eric Dumazet Date: Sat Dec 7 11:34:45 2019 -0800 net_sched: validate TCA_KIND attribute in tc_chain_tmplt_add() Use the new tcf_proto_check_kind() helper to make sure user provided value is well formed. BUG: KMSAN: uninit-value in string_nocheck lib/vsprintf.c:606 [inline] BUG: KMSAN: uninit-value in string+0x4be/0x600 lib/vsprintf.c:668 CPU: 0 PID: 12358 Comm: syz-executor.1 Not tainted 5.4.0-rc8-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+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0x128/0x220 mm/kmsan/kmsan_report.c:108 __msan_warning+0x64/0xc0 mm/kmsan/kmsan_instr.c:245 string_nocheck lib/vsprintf.c:606 [inline] string+0x4be/0x600 lib/vsprintf.c:668 vsnprintf+0x218f/0x3210 lib/vsprintf.c:2510 __request_module+0x2b1/0x11c0 kernel/kmod.c:143 tcf_proto_lookup_ops+0x171/0x700 net/sched/cls_api.c:139 tc_chain_tmplt_add net/sched/cls_api.c:2730 [inline] tc_ctl_chain+0x1904/0x38a0 net/sched/cls_api.c:2850 rtnetlink_rcv_msg+0x115a/0x1580 net/core/rtnetlink.c:5224 netlink_rcv_skb+0x431/0x620 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5242 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf3e/0x1020 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x110f/0x1330 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311 __sys_sendmsg net/socket.c:2356 [inline] __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg+0x305/0x460 net/socket.c:2363 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2363 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45a649 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0790795c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a649 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000006 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f07907966d4 R13: 00000000004c8db5 R14: 00000000004df630 R15: 00000000ffffffff Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:149 [inline] kmsan_internal_poison_shadow+0x5c/0x110 mm/kmsan/kmsan.c:132 kmsan_slab_alloc+0x97/0x100 mm/kmsan/kmsan_hooks.c:86 slab_alloc_node mm/slub.c:2773 [inline] __kmalloc_node_track_caller+0xe27/0x11a0 mm/slub.c:4381 __kmalloc_reserve net/core/skbuff.c:141 [inline] __alloc_skb+0x306/0xa10 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1174 [inline] netlink_sendmsg+0x783/0x1330 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311 __sys_sendmsg net/socket.c:2356 [inline] __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg+0x305/0x460 net/socket.c:2363 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2363 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 6f96c3c6904c ("net_sched: fix backward compatibility for TCA_KIND") Signed-off-by: Eric Dumazet Reported-by: syzbot Acked-by: Cong Wang Cc: Marcelo Ricardo Leitner Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: David S. Miller commit 00222d1394104f0fd6c01ca9f578afec9e0f148b Author: Heiner Kallweit Date: Fri Dec 6 23:27:15 2019 +0100 r8169: add missing RX enabling for WoL on RTL8125 RTL8125 also requires to enable RX for WoL. v2: add missing Fixes tag Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8a3cc29c316c17de590e3ff8b59f3d6cbfd37b0a Author: Stefano Garzarella Date: Fri Dec 6 15:39:12 2019 +0100 vhost/vsock: accept only packets with the right dst_cid When we receive a new packet from the guest, we check if the src_cid is correct, but we forgot to check the dst_cid. The host should accept only packets where dst_cid is equal to the host CID. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit fafc5db28a2ff39092bafe8ac9b8b19c4904f633 Author: Grygorii Strashko Date: Fri Dec 6 14:34:32 2019 +0200 net: phy: dp83867: fix hfs boot in rgmii mode The commit ef87f7da6b28 ("net: phy: dp83867: move dt parsing to probe") causes regression on TI dra71x-evm and dra72x-evm, where DP83867 PHY is used in "rgmii-id" mode - the networking stops working. Unfortunately, it's not enough to just move DT parsing code to .probe() as it depends on phydev->interface value, which is set to correct value abter the .probe() is completed and before calling .config_init(). So, RGMII configuration can't be loaded from DT. To fix and issue - move RGMII validation code to .config_init() - parse RGMII parameters in dp83867_of_init(), but consider them as optional. Fixes: ef87f7da6b28 ("net: phy: dp83867: move dt parsing to probe") Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 51302f77bedab8768b761ed1899c08f89af9e4e2 Author: Grygorii Strashko Date: Fri Dec 6 14:28:20 2019 +0200 net: ethernet: ti: cpsw: fix extra rx interrupt Now RX interrupt is triggered twice every time, because in cpsw_rx_interrupt() it is asked first and then disabled. So there will be pending interrupt always, when RX interrupt is enabled again in NAPI handler. Fix it by first disabling IRQ and then do ask. Fixes: 870915feabdc ("drivers: net: cpsw: remove disable_irq/enable_irq as irq can be masked from cpsw itself") Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 501a90c945103e8627406763dac418f20f3837b2 Author: Eric Dumazet Date: Thu Dec 5 20:43:46 2019 -0800 inet: protect against too small mtu values. syzbot was once again able to crash a host by setting a very small mtu on loopback device. Let's make inetdev_valid_mtu() available in include/net/ip.h, and use it in ip_setup_cork(), so that we protect both ip_append_page() and __ip_append_data() Also add a READ_ONCE() when the device mtu is read. Pairs this lockless read with one WRITE_ONCE() in __dev_set_mtu(), even if other code paths might write over this field. Add a big comment in include/linux/netdevice.h about dev->mtu needing READ_ONCE()/WRITE_ONCE() annotations. Hopefully we will add the missing ones in followup patches. [1] refcount_t: saturated; leaking memory. WARNING: CPU: 0 PID: 9464 at lib/refcount.c:22 refcount_warn_saturate+0x138/0x1f0 lib/refcount.c:22 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 9464 Comm: syz-executor850 Not tainted 5.4.0-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+0x197/0x210 lib/dump_stack.c:118 panic+0x2e3/0x75c kernel/panic.c:221 __warn.cold+0x2f/0x3e kernel/panic.c:582 report_bug+0x289/0x300 lib/bug.c:195 fixup_bug arch/x86/kernel/traps.c:174 [inline] fixup_bug arch/x86/kernel/traps.c:169 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:267 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:286 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027 RIP: 0010:refcount_warn_saturate+0x138/0x1f0 lib/refcount.c:22 Code: 06 31 ff 89 de e8 c8 f5 e6 fd 84 db 0f 85 6f ff ff ff e8 7b f4 e6 fd 48 c7 c7 e0 71 4f 88 c6 05 56 a6 a4 06 01 e8 c7 a8 b7 fd <0f> 0b e9 50 ff ff ff e8 5c f4 e6 fd 0f b6 1d 3d a6 a4 06 31 ff 89 RSP: 0018:ffff88809689f550 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff815e4336 RDI: ffffed1012d13e9c RBP: ffff88809689f560 R08: ffff88809c50a3c0 R09: fffffbfff15d31b1 R10: fffffbfff15d31b0 R11: ffffffff8ae98d87 R12: 0000000000000001 R13: 0000000000040100 R14: ffff888099041104 R15: ffff888218d96e40 refcount_add include/linux/refcount.h:193 [inline] skb_set_owner_w+0x2b6/0x410 net/core/sock.c:1999 sock_wmalloc+0xf1/0x120 net/core/sock.c:2096 ip_append_page+0x7ef/0x1190 net/ipv4/ip_output.c:1383 udp_sendpage+0x1c7/0x480 net/ipv4/udp.c:1276 inet_sendpage+0xdb/0x150 net/ipv4/af_inet.c:821 kernel_sendpage+0x92/0xf0 net/socket.c:3794 sock_sendpage+0x8b/0xc0 net/socket.c:936 pipe_to_sendpage+0x2da/0x3c0 fs/splice.c:458 splice_from_pipe_feed fs/splice.c:512 [inline] __splice_from_pipe+0x3ee/0x7c0 fs/splice.c:636 splice_from_pipe+0x108/0x170 fs/splice.c:671 generic_splice_sendpage+0x3c/0x50 fs/splice.c:842 do_splice_from fs/splice.c:861 [inline] direct_splice_actor+0x123/0x190 fs/splice.c:1035 splice_direct_to_actor+0x3b4/0xa30 fs/splice.c:990 do_splice_direct+0x1da/0x2a0 fs/splice.c:1078 do_sendfile+0x597/0xd00 fs/read_write.c:1464 __do_sys_sendfile64 fs/read_write.c:1525 [inline] __se_sys_sendfile64 fs/read_write.c:1511 [inline] __x64_sys_sendfile64+0x1dd/0x220 fs/read_write.c:1511 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x441409 Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fffb64c4f78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441409 RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000005 RBP: 0000000000073b8a R08: 0000000000000010 R09: 0000000000000010 R10: 0000000000010001 R11: 0000000000000246 R12: 0000000000402180 R13: 0000000000402210 R14: 0000000000000000 R15: 0000000000000000 Kernel Offset: disabled Rebooting in 86400 seconds.. Fixes: 1470ddf7f8ce ("inet: Remove explicit write references to sk/inet in ip_append_data") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 0e4940928c26527ce8f97237fef4c8a91cd34207 Author: Cong Wang Date: Thu Dec 5 19:39:02 2019 -0800 gre: refetch erspan header from skb->data after pskb_may_pull() After pskb_may_pull() we should always refetch the header pointers from the skb->data in case it got reallocated. In gre_parse_header(), the erspan header is still fetched from the 'options' pointer which is fetched before pskb_may_pull(). Found this during code review of a KMSAN bug report. Fixes: cb73ee40b1b3 ("net: ip_gre: use erspan key field for tunnel lookup") Cc: Lorenzo Bianconi Signed-off-by: Cong Wang Acked-by: Lorenzo Bianconi Acked-by: William Tu Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 02a896ca84874bbfcedc006303f2951dda89b298 Author: Aditya Pakki Date: Thu Dec 5 17:04:49 2019 -0600 pppoe: remove redundant BUG_ON() check in pppoe_pernet Passing NULL to pppoe_pernet causes a crash via BUG_ON. Dereferencing net in net_generici() also has the same effect. This patch removes the redundant BUG_ON check on the same parameter. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller commit 68d4b3dfcaf2462203ba1597e70db6e3b4c4e64f Author: Krzysztof Kozlowski Date: Fri Dec 6 17:04:08 2019 -0800 lib/: fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ / /' -i */Kconfig Link: http://lkml.kernel.org/r/20191120140140.19148-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec29a5c197e6ef88fd94a2f3ea087037ae8acc21 Author: Changbin Du Date: Fri Dec 6 17:04:06 2019 -0800 kernel-hacking: move DEBUG_FS to 'Generic Kernel Debugging Instruments' DEBUG_FS does not belong to 'Compile-time checks and compiler options'. Link: http://lkml.kernel.org/r/20190909144453.3520-10-changbin.du@gmail.com Cc: Randy Dunlap Signed-off-by: Changbin Du Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b05bb75d1745f5aadcf3b915267ec5ec8dc12b1 Author: Changbin Du Date: Fri Dec 6 17:04:03 2019 -0800 kernel-hacking: move DEBUG_BUGVERBOSE to 'printk and dmesg options' I think DEBUG_BUGVERBOSE is a dmesg option which gives more debug info to dmesg. Link: http://lkml.kernel.org/r/20190909144453.3520-9-changbin.du@gmail.com Signed-off-by: Changbin Du Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ebebdd095d7b73b395bd180e61e1e9939264fdcd Author: Changbin Du Date: Fri Dec 6 17:04:00 2019 -0800 kernel-hacking: create a submenu for scheduler debugging options Create a submenu 'Scheduler Debugging' for scheduler debugging options. Link: http://lkml.kernel.org/r/20190909144453.3520-8-changbin.du@gmail.com Signed-off-by: Changbin Du Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc9b96387ec9b6d770dec6fcb3017afebc9e49d6 Author: Changbin Du Date: Fri Dec 6 17:03:57 2019 -0800 kernel-hacking: move SCHED_STACK_END_CHECK after DEBUG_STACK_USAGE They are both memory debug options to debug kernel stack issues. Link: http://lkml.kernel.org/r/20190909144453.3520-7-changbin.du@gmail.com Signed-off-by: Changbin Du Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f43a289df67153a169776f8ea0445bc3a57e7a83 Author: Changbin Du Date: Fri Dec 6 17:03:54 2019 -0800 kernel-hacking: move Oops into 'Lockups and Hangs' They are similar options so place them together. Link: http://lkml.kernel.org/r/20190909144453.3520-6-changbin.du@gmail.com Signed-off-by: Changbin Du Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09a7495258b56dcfb0a9c0049e142d4bd98b3dde Author: Changbin Du Date: Fri Dec 6 17:03:51 2019 -0800 kernel-hacking: move kernel testing and coverage options to same submenu Move error injection, coverage, testing options to a new top level submenu 'Kernel Testing and Coverage'. They are all for test purpose. Link: http://lkml.kernel.org/r/20190909144453.3520-5-changbin.du@gmail.com Signed-off-by: Changbin Du Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3be5cbcde916de526bb3f5ef93f3197e976d3245 Author: Changbin Du Date: Fri Dec 6 17:03:48 2019 -0800 kernel-hacking: group kernel data structures debugging together Group these similar runtime data structures verification options together. Link: http://lkml.kernel.org/r/20190909144453.3520-4-changbin.du@gmail.com Signed-off-by: Changbin Du Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff600a9a69be3733718dd9a126437631b7d31252 Author: Changbin Du Date: Fri Dec 6 17:03:45 2019 -0800 kernel-hacking: create submenu for arch special debugging options The arch special options are a little long, so create a submenu for them. Link: http://lkml.kernel.org/r/20190909144453.3520-3-changbin.du@gmail.com Signed-off-by: Changbin Du Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6210b6402f582b06c47991d02fe161f38b86a723 Author: Changbin Du Date: Fri Dec 6 17:03:42 2019 -0800 kernel-hacking: group sysrq/kgdb/ubsan into 'Generic Kernel Debugging Instruments' Patch series "hacking: make 'kernel hacking' menu better structurized", v3. This series is a trivial improvment for the layout of 'kernel hacking' configuration menu. Now we have many items in it which makes takes a little time to look up them since they are not well structurized yet. Early discussion is here: https://lkml.org/lkml/2019/9/1/39 This patch (of 9): Group generic kernel debugging instruments sysrq/kgdb/ubsan together into a new submenu. Link: http://lkml.kernel.org/r/20190909144453.3520-2-changbin.du@gmail.com Signed-off-by: Changbin Du Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b9173f4688dfa7c5d723426be1d979c24ce3d51 Author: Marco Oliverio Date: Mon Dec 2 19:54:30 2019 +0100 netfilter: nf_queue: enqueue skbs with NULL dst Bridge packets that are forwarded have skb->dst == NULL and get dropped by the check introduced by b60a77386b1d4868f72f6353d35dabe5fbe981f2 (net: make skb_dst_force return true when dst is refcounted). To fix this we check skb_dst() before skb_dst_force(), so we don't drop skb packet with dst == NULL. This holds also for skb at the PRE_ROUTING hook so we remove the second check. Fixes: b60a77386b1d ("net: make skb_dst_force return true when dst is refcounted") Signed-off-by: Marco Oliverio Signed-off-by: Rocco Folino Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 5a2e6af81807d4616f9839ad0ae7d1313b45c64d Author: Florian Westphal Date: Mon Dec 2 18:35:40 2019 +0100 selftests: netfilter: use randomized netns names Using ns0, ns1, etc. isn't a good idea, they might exist already. Use a random suffix. Also, older nft versions don't support "-" as alias for stdin, so use /dev/stdin instead. Signed-off-by: Florian Westphal Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit ad910e36da4ca3a1bd436989f632d062dda0c921 Author: Linus Torvalds Date: Sat Dec 7 10:41:17 2019 -0800 pipe: fix poll/select race introduced by the pipe rework The kernel wait queues have a basic rule to them: you add yourself to the wait-queue first, and then you check the things that you're going to wait on. That avoids the races with the event you're waiting for. The same goes for poll/select logic: the "poll_wait()" goes first, and then you check the things you're polling for. Of course, if you use locking, the ordering doesn't matter since the lock will serialize with anything that changes the state you're looking at. That's not the case here, though. So move the poll_wait() first in pipe_poll(), before you start looking at the pipe state. Fixes: 8cefc107ca54 ("pipe: Use head and tail pointers for the ring, not cursor and length") Cc: David Howells Signed-off-by: Linus Torvalds commit 38a2204f5298620e8a1c3b1dc7b831425106dbc0 Author: Patrick Steinhardt Date: Wed Dec 4 07:13:22 2019 +0100 nfsd: depend on CRYPTO_MD5 for legacy client tracking The legacy client tracking infrastructure of nfsd makes use of MD5 to derive a client's recovery directory name. As the nfsd module doesn't declare any dependency on CRYPTO_MD5, though, it may fail to allocate the hash if the kernel was compiled without it. As a result, generation of client recovery directories will fail with the following error: NFSD: unable to generate recoverydir name The explicit dependency on CRYPTO_MD5 was removed as redundant back in 6aaa67b5f3b9 (NFSD: Remove redundant "select" clauses in fs/Kconfig 2008-02-11) as it was already implicitly selected via RPCSEC_GSS_KRB5. This broke when RPCSEC_GSS_KRB5 was made optional for NFSv4 in commit df486a25900f (NFS: Fix the selection of security flavours in Kconfig) at a later point. Fix the issue by adding back an explicit dependency on CRYPTO_MD5. Fixes: df486a25900f (NFS: Fix the selection of security flavours in Kconfig) Signed-off-by: Patrick Steinhardt Signed-off-by: J. Bruce Fields commit 18f428d4e2f7eff162d80b2b21689496c4e82afd Author: Olga Kornievskaia Date: Wed Dec 4 15:13:54 2019 -0500 NFSD fixing possible null pointer derefering in copy offload Static checker revealed possible error path leading to possible NULL pointer dereferencing. Reported-by: Dan Carpenter Fixes: e0639dc5805a: ("NFSD introduce async copy feature") Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit 6e456dca47c5e3b8d8c6bbc4edd1377985d793b5 Author: Daniel Lezcano Date: Thu Dec 5 13:12:27 2019 +0100 MAINTAINERS: thermal: Change the git tree location The thermal trees were merged into a single one shared with the maintainer of the subsystem. Update the location of this group git tree. Signed-off-by: Daniel Lezcano Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20191205121227.19203-1-daniel.lezcano@linaro.org commit 9f1fb8046bba73f4a3574286da69814e493c2b94 Author: Zhang Rui Date: Thu Dec 5 19:51:50 2019 +0800 MAINTAINERS: thermal: Add Daniel Lezcano as the thermal maintainer Add Daniel Lezcano as the co-maintainer of thermal subsystem. Signed-off-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191205115150.18836-1-rui.zhang@intel.com commit 87587a57b33342fe3c3f9f4a01a1118f9a5bb75e Author: Florian Fainelli Date: Sat Nov 23 07:43:03 2019 -0800 MAINTAINERS: thermal: Eduardo's email is bouncing The last two emails to Eduardo were returned with: 452 4.2.2 The email account that you tried to reach is over quota. Please direct the recipient to https://support.google.com/mail/?p=OverQuotaTemp j17sor626162wrq.49 - gsmtp Signed-off-by: Florian Fainelli Signed-off-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191123154303.2202-1-f.fainelli@gmail.com commit 50260614245b09887c197c58732298f02052d61b Author: YueHaibing Date: Wed Nov 13 18:53:13 2019 +0800 thermal: power_allocator: Fix Kconfig warning When do randbuiding, we got this: WARNING: unmet direct dependencies detected for THERMAL_GOV_POWER_ALLOCATOR Depends on [n]: THERMAL [=y] && ENERGY_MODEL [=n] Selected by [y]: - THERMAL_DEFAULT_GOV_POWER_ALLOCATOR [=y] && The Kconfig option THERMAL_DEFAULT_GOV_POWER_ALLOCATOR selects the THERMAL_GOV_POWER_ALLOCATOR but this one depends on the ENERGY_MODEL which is not enabled. Make THERMAL_DEFAULT_GOV_POWER_ALLOCATOR depend on THERMAL_GOV_POWER_ALLOCATOR to fix this warning. Suggested-by: Quentin Perret Fixes: a4e893e802e6 ("thermal: cpu_cooling: Migrate to using the EM framework") Signed-off-by: YueHaibing Signed-off-by: Daniel Lezcano Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20191113105313.41616-1-yuehaibing@huawei.com commit 5532946e339576097d7a0f5facc828e4d53d901b Merge: 537d0779a199 721c8dafad26 Author: David S. Miller Date: Fri Dec 6 21:05:14 2019 -0800 Merge branch 'tcp-fix-handling-of-stale-syncookies-timestamps' Guillaume Nault says: ==================== tcp: fix handling of stale syncookies timestamps The synflood timestamps (->ts_recent_stamp and ->synq_overflow_ts) are only refreshed when the syncookie protection triggers. Therefore, their value can become very far apart from jiffies if no synflood happens for a long time. If jiffies grows too much and wraps while the synflood timestamp isn't refreshed, then time_after32() might consider the later to be in the future. This can trick tcp_synq_no_recent_overflow() into returning erroneous values and rejecting valid ACKs. Patch 1 handles the case of ACKs using legitimate syncookies. Patch 2 handles the case of stray ACKs. Patch 3 annotates lockless timestamp operations with READ_ONCE() and WRITE_ONCE(). Changes from v3: - Fix description of time_between32() (found by Eric Dumazet). - Use more accurate Fixes tag in patch 3 (suggested by Eric Dumazet). Changes from v2: - Define and use time_between32() instead of a pair of time_before32/time_after32 (suggested by Eric Dumazet). - Use 'last_overflow - HZ' as lower bound in tcp_synq_no_recent_overflow(), to accommodate for concurrent timestamp updates (found by Eric Dumazet). - Add a third patch to annotate lockless accesses to .ts_recent_stamp. Changes from v1: - Initialising timestamps at socket creation time is not enough because jiffies wraps in 24 days with HZ=1000 (Eric Dumazet). Handle stale timestamps in tcp_synq_overflow() and tcp_synq_no_recent_overflow() instead. - Rework commit description. - Add a second patch to handle the case of stray ACKs. ==================== Signed-off-by: David S. Miller commit 721c8dafad26ccfa90ff659ee19755e3377b829d Author: Guillaume Nault Date: Fri Dec 6 12:38:49 2019 +0100 tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE() Syncookies borrow the ->rx_opt.ts_recent_stamp field to store the timestamp of the last synflood. Protect them with READ_ONCE() and WRITE_ONCE() since reads and writes aren't serialised. Use of .rx_opt.ts_recent_stamp for storing the synflood timestamp was introduced by a0f82f64e269 ("syncookies: remove last_synq_overflow from struct tcp_sock"). But unprotected accesses were already there when timestamp was stored in .last_synq_overflow. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Guillaume Nault Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit cb44a08f8647fd2e8db5cc9ac27cd8355fa392d8 Author: Guillaume Nault Date: Fri Dec 6 12:38:43 2019 +0100 tcp: tighten acceptance of ACKs not matching a child socket When no synflood occurs, the synflood timestamp isn't updated. Therefore it can be so old that time_after32() can consider it to be in the future. That's a problem for tcp_synq_no_recent_overflow() as it may report that a recent overflow occurred while, in fact, it's just that jiffies has grown past 'last_overflow' + TCP_SYNCOOKIE_VALID + 2^31. Spurious detection of recent overflows lead to extra syncookie verification in cookie_v[46]_check(). At that point, the verification should fail and the packet dropped. But we should have dropped the packet earlier as we didn't even send a syncookie. Let's refine tcp_synq_no_recent_overflow() to report a recent overflow only if jiffies is within the [last_overflow, last_overflow + TCP_SYNCOOKIE_VALID] interval. This way, no spurious recent overflow is reported when jiffies wraps and 'last_overflow' becomes in the future from the point of view of time_after32(). However, if jiffies wraps and enters the [last_overflow, last_overflow + TCP_SYNCOOKIE_VALID] interval (with 'last_overflow' being a stale synflood timestamp), then tcp_synq_no_recent_overflow() still erroneously reports an overflow. In such cases, we have to rely on syncookie verification to drop the packet. We unfortunately have no way to differentiate between a fresh and a stale syncookie timestamp. In practice, using last_overflow as lower bound is problematic. If the synflood timestamp is concurrently updated between the time we read jiffies and the moment we store the timestamp in 'last_overflow', then 'now' becomes smaller than 'last_overflow' and tcp_synq_no_recent_overflow() returns true, potentially dropping a valid syncookie. Reading jiffies after loading the timestamp could fix the problem, but that'd require a memory barrier. Let's just accommodate for potential timestamp growth instead and extend the interval using 'last_overflow - HZ' as lower bound. Signed-off-by: Guillaume Nault Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 04d26e7b159a396372646a480f4caa166d1b6720 Author: Guillaume Nault Date: Fri Dec 6 12:38:36 2019 +0100 tcp: fix rejected syncookies due to stale timestamps If no synflood happens for a long enough period of time, then the synflood timestamp isn't refreshed and jiffies can advance so much that time_after32() can't accurately compare them any more. Therefore, we can end up in a situation where time_after32(now, last_overflow + HZ) returns false, just because these two values are too far apart. In that case, the synflood timestamp isn't updated as it should be, which can trick tcp_synq_no_recent_overflow() into rejecting valid syncookies. For example, let's consider the following scenario on a system with HZ=1000: * The synflood timestamp is 0, either because that's the timestamp of the last synflood or, more commonly, because we're working with a freshly created socket. * We receive a new SYN, which triggers synflood protection. Let's say that this happens when jiffies == 2147484649 (that is, 'synflood timestamp' + HZ + 2^31 + 1). * Then tcp_synq_overflow() doesn't update the synflood timestamp, because time_after32(2147484649, 1000) returns false. With: - 2147484649: the value of jiffies, aka. 'now'. - 1000: the value of 'last_overflow' + HZ. * A bit later, we receive the ACK completing the 3WHS. But cookie_v[46]_check() rejects it because tcp_synq_no_recent_overflow() says that we're not under synflood. That's because time_after32(2147484649, 120000) returns false. With: - 2147484649: the value of jiffies, aka. 'now'. - 120000: the value of 'last_overflow' + TCP_SYNCOOKIE_VALID. Of course, in reality jiffies would have increased a bit, but this condition will last for the next 119 seconds, which is far enough to accommodate for jiffie's growth. Fix this by updating the overflow timestamp whenever jiffies isn't within the [last_overflow, last_overflow + HZ] range. That shouldn't have any performance impact since the update still happens at most once per second. Now we're guaranteed to have fresh timestamps while under synflood, so tcp_synq_no_recent_overflow() can safely use it with time_after32() in such situations. Stale timestamps can still make tcp_synq_no_recent_overflow() return the wrong verdict when not under synflood. This will be handled in the next patch. For 64 bits architectures, the problem was introduced with the conversion of ->tw_ts_recent_stamp to 32 bits integer by commit cca9bab1b72c ("tcp: use monotonic timestamps for PAWS"). The problem has always been there on 32 bits architectures. Fixes: cca9bab1b72c ("tcp: use monotonic timestamps for PAWS") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Guillaume Nault Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 537d0779a19941efe9044e7e259743d5b054bf7b Merge: 04aa1bc42e4d b7826076d7ae Author: David S. Miller Date: Fri Dec 6 20:52:16 2019 -0800 Merge tag 'mlx5-fixes-2019-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2019-12-05 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v4.19: ('net/mlx5e: Query global pause state before setting prio2buffer') For -stable v5.3 ('net/mlx5e: Fix SFF 8472 eeprom length') ('net/mlx5e: Fix translation of link mode into speed') ('net/mlx5e: Fix freeing flow with kfree() and not kvfree()') ('net/mlx5e: ethtool, Fix analysis of speed setting') ('net/mlx5e: Fix TXQ indices to be sequential') ==================== Signed-off-by: David S. Miller commit 04aa1bc42e4d31a7c58f38eefc323ac395517635 Author: Bruno Carneiro da Cunha Date: Thu Dec 5 17:16:26 2019 -0300 lpc_eth: kernel BUG on remove We may have found a bug in the nxp/lpc_eth.c driver. The function platform_set_drvdata() is called twice, the second time it is called, in lpc_mii_init(), it overwrites the struct net_device which should be at pdev->dev->driver_data with pldat->mii_bus. When trying to remove the driver, in lpc_eth_drv_remove(), platform_get_drvdata() will return the pldat->mii_bus pointer and try to use it as a struct net_device pointer. This causes unregister_netdev to segfault and generate a kernel BUG. Is this reproducible? Signed-off-by: Daniel Martinez Signed-off-by: Bruno Carneiro da Cunha Signed-off-by: David S. Miller commit 9424e2e7ad93ffffa88f882c9bc5023570904b55 Author: Eric Dumazet Date: Thu Dec 5 10:10:15 2019 -0800 tcp: md5: fix potential overestimation of TCP option space Back in 2008, Adam Langley fixed the corner case of packets for flows having all of the following options : MD5 TS SACK Since MD5 needs 20 bytes, and TS needs 12 bytes, no sack block can be cooked from the remaining 8 bytes. tcp_established_options() correctly sets opts->num_sack_blocks to zero, but returns 36 instead of 32. This means TCP cooks packets with 4 extra bytes at the end of options, containing unitialized bytes. Fixes: 33ad798c924b ("tcp: options clean up") Signed-off-by: Eric Dumazet Reported-by: syzbot Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 9a74542eee86313ab7b31ae28b45c59d244e3a85 Merge: e0b60903b434 25a443f74bcf Author: David S. Miller Date: Fri Dec 6 20:45:09 2019 -0800 Merge branch 'net-tc-indirect-block-relay' John Hurley says: ==================== Ensure egress un/bind are relayed with indirect blocks On register and unregister for indirect blocks, a command is called that sends a bind/unbind event to the registering driver. This command assumes that the bind to indirect block will be on ingress. However, drivers such as NFP have allowed binding to clsact qdiscs as well as ingress qdiscs from mainline Linux 5.2. A clsact qdisc binds to an ingress and an egress block. Rather than assuming that an indirect bind is always ingress, modify the function names to remove the ingress tag (patch 1). In cls_api, which is used by NFP to offload TC flower, generate bind/unbind message for both ingress and egress blocks on the event of indirectly registering/unregistering from that block. Doing so mimics the behaviour of both ingress and clsact qdiscs on initialise and destroy. This now ensures that drivers such as NFP receive the correct binder type for the indirect block registration. ==================== Signed-off-by: David S. Miller commit 25a443f74bcff2c4d506a39eae62fc15ad7c618a Author: John Hurley Date: Thu Dec 5 17:03:35 2019 +0000 net: sched: allow indirect blocks to bind to clsact in TC When a device is bound to a clsact qdisc, bind events are triggered to registered drivers for both ingress and egress. However, if a driver registers to such a device using the indirect block routines then it is assumed that it is only interested in ingress offload and so only replays ingress bind/unbind messages. The NFP driver supports the offload of some egress filters when registering to a block with qdisc of type clsact. However, on unregister, if the block is still active, it will not receive an unbind egress notification which can prevent proper cleanup of other registered callbacks. Modify the indirect block callback command in TC to send messages of ingress and/or egress bind depending on the qdisc in use. NFP currently supports egress offload for TC flower offload so the changes are only added to TC. Fixes: 4d12ba42787b ("nfp: flower: allow offloading of matches on 'internal' ports") Signed-off-by: John Hurley Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit dbad3408896c3c5722ec9cda065468b3df16c5bf Author: John Hurley Date: Thu Dec 5 17:03:34 2019 +0000 net: core: rename indirect block ingress cb function With indirect blocks, a driver can register for callbacks from a device that is does not 'own', for example, a tunnel device. When registering to or unregistering from a new device, a callback is triggered to generate a bind/unbind event. This, in turn, allows the driver to receive any existing rules or to properly clean up installed rules. When first added, it was assumed that all indirect block registrations would be for ingress offloads. However, the NFP driver can, in some instances, support clsact qdisc binds for egress offload. Change the name of the indirect block callback command in flow_offload to remove the 'ingress' identifier from it. While this does not change functionality, a follow up patch will implement a more more generic callback than just those currently just supporting ingress offload. Fixes: 4d12ba42787b ("nfp: flower: allow offloading of matches on 'internal' ports") Signed-off-by: John Hurley Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit e0b60903b434a7ee21ba8d8659f207ed84101e89 Author: Jouni Hogander Date: Thu Dec 5 15:57:07 2019 +0200 net-sysfs: Call dev_hold always in netdev_queue_add_kobject Dev_hold has to be called always in netdev_queue_add_kobject. Otherwise usage count drops below 0 in case of failure in kobject_init_and_add. Fixes: b8eb718348b8 ("net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject") Reported-by: Hulk Robot Cc: Tetsuo Handa Cc: David Miller Cc: Lukas Bulwahn Signed-off-by: David S. Miller commit 8bef0af09a5415df761b04fa487a6c34acae74bc Author: Alexander Lobakin Date: Thu Dec 5 13:02:35 2019 +0300 net: dsa: fix flow dissection on Tx path Commit 43e665287f93 ("net-next: dsa: fix flow dissection") added an ability to override protocol and network offset during flow dissection for DSA-enabled devices (i.e. controllers shipped as switch CPU ports) in order to fix skb hashing for RPS on Rx path. However, skb_hash() and added part of code can be invoked not only on Rx, but also on Tx path if we have a multi-queued device and: - kernel is running on UP system or - XPS is not configured. The call stack in this two cases will be like: dev_queue_xmit() -> __dev_queue_xmit() -> netdev_core_pick_tx() -> netdev_pick_tx() -> skb_tx_hash() -> skb_get_hash(). The problem is that skbs queued for Tx have both network offset and correct protocol already set up even after inserting a CPU tag by DSA tagger, so calling tag_ops->flow_dissect() on this path actually only breaks flow dissection and hashing. This can be observed by adding debug prints just before and right after tag_ops->flow_dissect() call to the related block of code: Before the patch: Rx path (RPS): [ 19.240001] Rx: proto: 0x00f8, nhoff: 0 /* ETH_P_XDSA */ [ 19.244271] tag_ops->flow_dissect() [ 19.247811] Rx: proto: 0x0800, nhoff: 8 /* ETH_P_IP */ [ 19.215435] Rx: proto: 0x00f8, nhoff: 0 /* ETH_P_XDSA */ [ 19.219746] tag_ops->flow_dissect() [ 19.223241] Rx: proto: 0x0806, nhoff: 8 /* ETH_P_ARP */ [ 18.654057] Rx: proto: 0x00f8, nhoff: 0 /* ETH_P_XDSA */ [ 18.658332] tag_ops->flow_dissect() [ 18.661826] Rx: proto: 0x8100, nhoff: 8 /* ETH_P_8021Q */ Tx path (UP system): [ 18.759560] Tx: proto: 0x0800, nhoff: 26 /* ETH_P_IP */ [ 18.763933] tag_ops->flow_dissect() [ 18.767485] Tx: proto: 0x920b, nhoff: 34 /* junk */ [ 22.800020] Tx: proto: 0x0806, nhoff: 26 /* ETH_P_ARP */ [ 22.804392] tag_ops->flow_dissect() [ 22.807921] Tx: proto: 0x920b, nhoff: 34 /* junk */ [ 16.898342] Tx: proto: 0x86dd, nhoff: 26 /* ETH_P_IPV6 */ [ 16.902705] tag_ops->flow_dissect() [ 16.906227] Tx: proto: 0x920b, nhoff: 34 /* junk */ After: Rx path (RPS): [ 16.520993] Rx: proto: 0x00f8, nhoff: 0 /* ETH_P_XDSA */ [ 16.525260] tag_ops->flow_dissect() [ 16.528808] Rx: proto: 0x0800, nhoff: 8 /* ETH_P_IP */ [ 15.484807] Rx: proto: 0x00f8, nhoff: 0 /* ETH_P_XDSA */ [ 15.490417] tag_ops->flow_dissect() [ 15.495223] Rx: proto: 0x0806, nhoff: 8 /* ETH_P_ARP */ [ 17.134621] Rx: proto: 0x00f8, nhoff: 0 /* ETH_P_XDSA */ [ 17.138895] tag_ops->flow_dissect() [ 17.142388] Rx: proto: 0x8100, nhoff: 8 /* ETH_P_8021Q */ Tx path (UP system): [ 15.499558] Tx: proto: 0x0800, nhoff: 26 /* ETH_P_IP */ [ 20.664689] Tx: proto: 0x0806, nhoff: 26 /* ETH_P_ARP */ [ 18.565782] Tx: proto: 0x86dd, nhoff: 26 /* ETH_P_IPV6 */ In order to fix that we can add the check 'proto == htons(ETH_P_XDSA)' to prevent code from calling tag_ops->flow_dissect() on Tx. I also decided to initialize 'offset' variable so tagger callbacks can now safely leave it untouched without provoking a chaos. Fixes: 43e665287f93 ("net-next: dsa: fix flow dissection") Signed-off-by: Alexander Lobakin Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 4a5cdc604b9cf645e6fa24d8d9f055955c3c8516 Author: Valentin Vidic Date: Thu Dec 5 07:41:18 2019 +0100 net/tls: Fix return values to avoid ENOTSUPP ENOTSUPP is not available in userspace, for example: setsockopt failed, 524, Unknown error 524 Signed-off-by: Valentin Vidic Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit dc3ecfc9819a96b2a6700b01443347b01e07a13b Merge: 8539429917c4 7e4c6b9a5d22 Author: Jens Axboe Date: Fri Dec 6 17:27:56 2019 -0700 Merge branch 'nvme/for-5.5' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Keith * 'nvme/for-5.5' of git://git.infradead.org/nvme: nvme/pci: Fix read queue count nvme/pci Limit write queue sizes to possible cpus nvme/pci: Fix write and poll queue types nvme/pci: Remove last_cq_head nvme: Namepace identification descriptor list is optional nvme-fc: fix double-free scenarios on hw queues nvme: else following return is not needed nvme: add error message on mismatching controller ids nvme_fc: add module to ops template to allow module references nvmet-loop: Avoid preallocating big SGL for data nvme-fc: Avoid preallocating big SGL for data nvme-rdma: Avoid preallocating big SGL for data commit eea2d5da29e396b6cc1fb35e36bcbf5f57731015 Merge: 347f56fb3890 04bb96427d4e Author: Linus Torvalds Date: Fri Dec 6 16:12:39 2019 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: - fix CPU topology setup for SCHED_MC case - fix VDSO regression * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8947/1: Fix __arch_get_hw_counter() access to CNTVCT ARM: 8943/1: Fix topology setup in case of CPU hotplug for CONFIG_SCHED_MC commit 347f56fb389012e8ba7b391d35d109eb16773e3b Merge: 98884281027d 30f55eae47e4 Author: Linus Torvalds Date: Fri Dec 6 14:19:37 2019 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "A set of fixes that we've merged late, but for the most part that have been sitting in -next for a while through platform maintainer trees: - Fixes to suspend/resume on Tegra, caused by the added features this merge window - Cleanups and minor fixes to TI additions this merge window - Tee fixes queued up late before the merge window, included here. - A handful of other fixlets There's also a refresh of the shareed config files (multi_v* on 32-bit, and defconfig on 64-bit), to avoid conflicts when we get new contributions" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (32 commits) ARM: multi_v7_defconfig: Restore debugfs support ARM: defconfig: re-run savedefconfig on multi_v* configs arm64: defconfig: re-run savedefconfig ARM: pxa: Fix resource properties soc: mediatek: cmdq: fixup wrong input order of write api soc: aspeed: Fix snoop_file_poll()'s return type MAINTAINERS: Switch to Marvell addresses MAINTAINERS: update Cavium ThunderX drivers Revert "arm64: dts: juno: add dma-ranges property" MAINTAINERS: Make Nicolas Saenz Julienne the new bcm2835 maintainer firmware: arm_scmi: Avoid double free in error flow arm64: dts: juno: Fix UART frequency ARM: dts: Fix sgx sysconfig register for omap4 arm: socfpga: execute cold reboot by default ARM: dts: Fix vcsi regulator to be always-on for droid4 to prevent hangs ARM: dts: dra7: fix cpsw mdio fck clock ARM: dts: am57xx-beagle-x15: Update pinmux name to ddr_3_3v ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity soc/tegra: pmc: Add reset sources and levels on Tegra194 soc/tegra: pmc: Add missing IRQ callbacks on Tegra194 ... commit 98884281027d07b93f062b7c5e7aa01e76ba12c6 Merge: 76f6777c9cc0 de858040ee80 Author: Linus Torvalds Date: Fri Dec 6 14:18:01 2019 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - ZONE_DMA32 initialisation fix when memblocks fall entirely within the first GB (used by ZONE_DMA in 5.5 for Raspberry Pi 4). - Couple of ftrace fixes following the FTRACE_WITH_REGS patchset. - access_ok() fix for the Tagged Address ABI when called from from a kernel thread (asynchronous I/O): the kthread does not have the TIF flags of the mm owner, so untag the user address unconditionally. - KVM compute_layout() called before the alternatives code patching. - Minor clean-ups. * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: entry: refine comment of stack overflow check arm64: ftrace: fix ifdeffery arm64: KVM: Invoke compute_layout() before alternatives are applied arm64: Validate tagged addresses in access_ok() called from kernel threads arm64: mm: Fix column alignment for UXN in kernel_page_tables arm64: insn: consistently handle exit text arm64: mm: Fix initialisation of DMA zones on non-NUMA systems commit 76f6777c9cc04efe8036b1d2aa76e618c1631cc6 Author: David Howells Date: Fri Dec 6 21:34:51 2019 +0000 pipe: Fix iteration end check in fuse_dev_splice_write() Fix the iteration end check in fuse_dev_splice_write(). The iterator position can only be compared with == or != since wrappage may be involved. Fixes: 8cefc107ca54 ("pipe: Use head and tail pointers for the ring, not cursor and length") Reported-by: Linus Torvalds Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 43a2898631a8beee66c1d64c1e860f43d96b2e91 Merge: f89d416a8676 4f4afc2c9599 Author: Linus Torvalds Date: Fri Dec 6 13:36:31 2019 -0800 Merge tag 'powerpc-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull more powerpc updates from Michael Ellerman: "A few commits splitting the KASAN instrumented bitops header in three, to match the split of the asm-generic bitops headers. This is needed on powerpc because we use the generic bitops for the non-atomic case only, whereas the existing KASAN instrumented bitops assume all the underlying operations are provided by the arch as arch_foo() versions. Thanks to: Daniel Axtens & Christophe Leroy" * tag 'powerpc-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: docs/core-api: Remove possibly confusing sub-headings from Bit Operations powerpc: support KASAN instrumentation of bitops kasan: support instrumented bitops combined with generic bitops commit f89d416a8676fe36de8be0f7c2e1ac6cd51410a8 Merge: 3cf2890f29ab 249fad734a25 Author: Linus Torvalds Date: Fri Dec 6 13:34:31 2019 -0800 Merge tag 'powerpc-5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "One fix for a regression introduced by our recent rework of cache flushing on memory hotunplug. Like several other arches, our VDSO clock_getres() needed a fix to match the semantics of posix_get_hrtimer_res(). A fix for a boot crash on Power9 LPARs using PCI LSI interrupts. A commit disabling use of the trace_imc PMU (not the core PMU) on Power9 systems, because it can lead to checkstops, until a workaround is developed. A handful of other minor fixes. Thanks to: Aneesh Kumar K.V, Anju T Sudhakar, Ard Biesheuvel, Christophe Leroy, Cédric Le Goater, Madhavan Srinivasan, Vincenzo Frascino" * tag 'powerpc-5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/perf: Disable trace_imc pmu powerpc/powernv: Avoid re-registration of imc debugfs directory powerpc/pmem: Convert to EXPORT_SYMBOL_GPL powerpc/archrandom: fix arch_get_random_seed_int() powerpc: Fix vDSO clock_getres() powerpc/pmem: Fix kernel crash due to wrong range value usage in flush_dcache_range powerpc/xive: Skip ioremap() of ESB pages for LSI interrupts powerpc/kasan: Fix boot failure with RELOCATABLE && FSL_BOOKE commit 3cf2890f29ab6fe491361761df558ef9191cb468 Merge: ec057595cb3f 4cc8d6505ab8 Author: Linus Torvalds Date: Fri Dec 6 13:06:14 2019 -0800 Merge tag 'sound-fix-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull more sound updates from Takashi Iwai: "A few last-minute updates, most of them are the regression fixes: - AMD HD-audio HDMI runtime PM improvements - Fixes for HD-audio HDMI regressions wrt DP-MST - A regression fix for the previous aloop enhancement - A fix for a long-time problem in PCM OSS layer that was spotted by fuzzer now - A few HD-audio quirks" * tag 'sound-fix-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: pcm: oss: Avoid potential buffer overflows ALSA: hda: hdmi - Keep old slot assignment behavior for Intel platforms ALSA: hda: Modify stream stripe mask only when needed ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms ALSA: hda: hdmi - fix kernel oops caused by invalid PCM idx ALSA: hda/realtek - Fix inverted bass GPIO pin on Acer 8951G ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236 ALSA: hda: hdmi - fix regression in connect list handling ALSA: aloop: Avoid pointer dereference before null-check ALSA: hda/hdmi - enable automatic runtime pm for AMD HDMI codecs by default ALSA: hda/hdmi - enable runtime pm for newer AMD display audio ALSA: hda/hdmi - Add new pci ids for AMD GPU display audio ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD commit ec057595cb3fb339e692898bedccd566160ba086 Author: Linus Torvalds Date: Fri Dec 6 12:40:35 2019 -0800 pipe: fix incorrect caching of pipe state over pipe_wait() Similarly to commit 8f868d68d335 ("pipe: Fix missing mask update after pipe_wait()") this fixes a case where the pipe rewrite ended up caching the pipe state incorrectly over a pipe lock drop event. It wasn't quite as obvious, because you needed to splice data from a pipe to a file, which is a fairly unusual operation, but it's completely wrong. Make sure we load the pipe head/tail/size information only after we've waited for there to be data in the pipe. While in that file, also make one of the splice helper functions use the canonical arghument order for pipe_empty(). That's syntactic - pipe emptiness is just that head and tail are equal, and thus mixing up head and tail doesn't really matter. It's still wrong, though. Reported-by: David Sterba Cc: David Howells Signed-off-by: Linus Torvalds commit fdef665ba44ad5ed154af2acfb19ae2ee3bf5dcc Author: Steve French Date: Fri Dec 6 02:02:38 2019 -0600 smb3: fix mode passed in on create for modetosid mount option When using the special SID to store the mode bits in an ACE (See http://technet.microsoft.com/en-us/library/hh509017(v=ws.10).aspx) which is enabled with mount parm "modefromsid" we were not passing in the mode via SMB3 create (although chmod was enabled). SMB3 create allows a security descriptor context to be passed in (which is more atomic and thus preferable to setting the mode bits after create via a setinfo). This patch enables setting the mode bits on create when using modefromsid mount option. In addition it fixes an endian error in the definition of the Control field flags in the SMB3 security descriptor. It also makes the ACE type of the special SID better match the documentation (and behavior of servers which use this to store mode bits in SMB3 ACLs). Signed-off-by: Steve French Acked-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky commit 1af66221a66de080274540a5c481ddacbe3574d2 Author: Eric Dumazet Date: Fri Dec 6 09:38:36 2019 -0800 net: avoid an indirect call in ____sys_recvmsg() CONFIG_RETPOLINE=y made indirect calls expensive. gcc seems to add an indirect call in ____sys_recvmsg(). Rewriting the code slightly makes sure to avoid this indirection. Alternative would be to not call sock_recvmsg() and instead use security_socket_recvmsg() and sock_recvmsg_nosec(), but this is less readable IMO. Signed-off-by: Eric Dumazet Cc: Paolo Abeni Cc: David Laight Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit 462f8554a89643dcd0981790101a31a01aa812fe Author: Chuhong Yuan Date: Fri Dec 6 15:54:46 2019 +0800 phy: mdio-thunder: add missed pci_release_regions in remove The driver forgets to call pci_release_regions() in remove like that in probe failure. Add the missed call to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: David S. Miller commit 9cf1cd8ee3ee09ef2859017df2058e2f53c5347f Author: Taehee Yoo Date: Fri Dec 6 05:25:48 2019 +0000 tipc: fix ordering of tipc module init and exit routine In order to set/get/dump, the tipc uses the generic netlink infrastructure. So, when tipc module is inserted, init function calls genl_register_family(). After genl_register_family(), set/get/dump commands are immediately allowed and these callbacks internally use the net_generic. net_generic is allocated by register_pernet_device() but this is called after genl_register_family() in the __init function. So, these callbacks would use un-initialized net_generic. Test commands: #SHELL1 while : do modprobe tipc modprobe -rv tipc done #SHELL2 while : do tipc link list done Splat looks like: [ 59.616322][ T2788] kasan: CONFIG_KASAN_INLINE enabled [ 59.617234][ T2788] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 59.618398][ T2788] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 59.619389][ T2788] CPU: 3 PID: 2788 Comm: tipc Not tainted 5.4.0+ #194 [ 59.620231][ T2788] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 59.621428][ T2788] RIP: 0010:tipc_bcast_get_broadcast_mode+0x131/0x310 [tipc] [ 59.622379][ T2788] Code: c7 c6 ef 8b 38 c0 65 ff 0d 84 83 c9 3f e8 d7 a5 f2 e3 48 8d bb 38 11 00 00 48 b8 00 00 00 00 [ 59.622550][ T2780] NET: Registered protocol family 30 [ 59.624627][ T2788] RSP: 0018:ffff88804b09f578 EFLAGS: 00010202 [ 59.624630][ T2788] RAX: dffffc0000000000 RBX: 0000000000000011 RCX: 000000008bc66907 [ 59.624631][ T2788] RDX: 0000000000000229 RSI: 000000004b3cf4cc RDI: 0000000000001149 [ 59.624633][ T2788] RBP: ffff88804b09f588 R08: 0000000000000003 R09: fffffbfff4fb3df1 [ 59.624635][ T2788] R10: fffffbfff50318f8 R11: ffff888066cadc18 R12: ffffffffa6cc2f40 [ 59.624637][ T2788] R13: 1ffff11009613eba R14: ffff8880662e9328 R15: ffff8880662e9328 [ 59.624639][ T2788] FS: 00007f57d8f7b740(0000) GS:ffff88806cc00000(0000) knlGS:0000000000000000 [ 59.624645][ T2788] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 59.625875][ T2780] tipc: Started in single node mode [ 59.626128][ T2788] CR2: 00007f57d887a8c0 CR3: 000000004b140002 CR4: 00000000000606e0 [ 59.633991][ T2788] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 59.635195][ T2788] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 59.636478][ T2788] Call Trace: [ 59.637025][ T2788] tipc_nl_add_bc_link+0x179/0x1470 [tipc] [ 59.638219][ T2788] ? lock_downgrade+0x6e0/0x6e0 [ 59.638923][ T2788] ? __tipc_nl_add_link+0xf90/0xf90 [tipc] [ 59.639533][ T2788] ? tipc_nl_node_dump_link+0x318/0xa50 [tipc] [ 59.640160][ T2788] ? mutex_lock_io_nested+0x1380/0x1380 [ 59.640746][ T2788] tipc_nl_node_dump_link+0x4fd/0xa50 [tipc] [ 59.641356][ T2788] ? tipc_nl_node_reset_link_stats+0x340/0x340 [tipc] [ 59.642088][ T2788] ? __skb_ext_del+0x270/0x270 [ 59.642594][ T2788] genl_lock_dumpit+0x85/0xb0 [ 59.643050][ T2788] netlink_dump+0x49c/0xed0 [ 59.643529][ T2788] ? __netlink_sendskb+0xc0/0xc0 [ 59.644044][ T2788] ? __netlink_dump_start+0x190/0x800 [ 59.644617][ T2788] ? __mutex_unlock_slowpath+0xd0/0x670 [ 59.645177][ T2788] __netlink_dump_start+0x5a0/0x800 [ 59.645692][ T2788] genl_rcv_msg+0xa75/0xe90 [ 59.646144][ T2788] ? __lock_acquire+0xdfe/0x3de0 [ 59.646692][ T2788] ? genl_family_rcv_msg_attrs_parse+0x320/0x320 [ 59.647340][ T2788] ? genl_lock_dumpit+0xb0/0xb0 [ 59.647821][ T2788] ? genl_unlock+0x20/0x20 [ 59.648290][ T2788] ? genl_parallel_done+0xe0/0xe0 [ 59.648787][ T2788] ? find_held_lock+0x39/0x1d0 [ 59.649276][ T2788] ? genl_rcv+0x15/0x40 [ 59.649722][ T2788] ? lock_contended+0xcd0/0xcd0 [ 59.650296][ T2788] netlink_rcv_skb+0x121/0x350 [ 59.650828][ T2788] ? genl_family_rcv_msg_attrs_parse+0x320/0x320 [ 59.651491][ T2788] ? netlink_ack+0x940/0x940 [ 59.651953][ T2788] ? lock_acquire+0x164/0x3b0 [ 59.652449][ T2788] genl_rcv+0x24/0x40 [ 59.652841][ T2788] netlink_unicast+0x421/0x600 [ ... ] Fixes: 7e4369057806 ("tipc: fix a slab object leak") Fixes: a62fbccecd62 ("tipc: make subscriber server support net namespace") Signed-off-by: Taehee Yoo Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 9f104c7736904ac72385bbb48669e0c923ca879b Author: Vladyslav Tarasiuk Date: Fri Dec 6 13:51:05 2019 +0000 mqprio: Fix out-of-bounds access in mqprio_dump When user runs a command like tc qdisc add dev eth1 root mqprio KASAN stack-out-of-bounds warning is emitted. Currently, NLA_ALIGN macro used in mqprio_dump provides too large buffer size as argument for nla_put and memcpy down the call stack. The flow looks like this: 1. nla_put expects exact object size as an argument; 2. Later it provides this size to memcpy; 3. To calculate correct padding for SKB, nla_put applies NLA_ALIGN macro itself. Therefore, NLA_ALIGN should not be applied to the nla_put parameter. Otherwise it will lead to out-of-bounds memory access in memcpy. Fixes: 4e8b86c06269 ("mqprio: Introduce new hardware offload mode and shaper in mqprio") Signed-off-by: Vladyslav Tarasiuk Signed-off-by: David S. Miller commit f421031e3ff0dd288a6e1bbde9aa41a25bb814e6 Author: Jongsung Kim Date: Fri Dec 6 20:40:00 2019 +0900 net: stmmac: reset Tx desc base address before restarting Tx Refer to the databook of DesignWare Cores Ethernet MAC Universal: 6.2.1.5 Register 4 (Transmit Descriptor List Address Register If this register is not changed when the ST bit is set to 0, then the DMA takes the descriptor address where it was stopped earlier. The stmmac_tx_err() does zero indices to Tx descriptors, but does not reset HW current Tx descriptor address. To fix inconsistency, the base address of the Tx descriptors should be rewritten before restarting Tx. Signed-off-by: Jongsung Kim Signed-off-by: David S. Miller commit a6a10d45d1eaf3fe20dd73ff4ef07e6dc40ec6d9 Author: Yangbo Lu Date: Fri Dec 6 17:53:35 2019 +0800 enetc: disable EEE autoneg by default The EEE support has not been enabled on ENETC, but it may connect to a PHY which supports EEE and advertises EEE by default, while its link partner also advertises EEE. If this happens, the PHY enters low power mode when the traffic rate is low and causes packet loss. This patch disables EEE advertisement by default for any PHY that ENETC connects to, to prevent the above unwanted outcome. Signed-off-by: Yangbo Lu Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit 97418e968b01ba8e3ad41c38b42106c48bc19544 Author: Jia He Date: Fri Dec 6 10:08:02 2019 +0800 KVM: arm/arm64: Remove excessive permission check in kvm_arch_prepare_memory_region In kvm_arch_prepare_memory_region, arm kvm regards the memory region as writable if the flag has no KVM_MEM_READONLY, and the vm is readonly if !VM_WRITE. But there is common usage for setting kvm memory region as follows: e.g. qemu side (see the PROT_NONE flag) 1. mmap(NULL, size, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); memory_region_init_ram_ptr() 2. re mmap the above area with read/write authority. Such example is used in virtio-fs qemu codes which hasn't been upstreamed [1]. But seems we can't forbid this example. Without this patch, it will cause an EPERM during kvm_set_memory_region() and cause qemu boot crash. As told by Ard, "the underlying assumption is incorrect, i.e., that the value of vm_flags at this point in time defines how the VMA is used during its lifetime. There may be other cases where a VMA is created with VM_READ vm_flags that are changed to VM_READ|VM_WRITE later, and we are currently rejecting this use case as well." [1] https://gitlab.com/virtio-fs/qemu/blob/5a356e/hw/virtio/vhost-user-fs.c#L488 Suggested-by: Ard Biesheuvel Signed-off-by: Jia He Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Link: https://lore.kernel.org/r/20191206020802.196108-1-justin.he@arm.com commit 54ad68b7776043a77c9bf0a67d49cd9cb261a8e7 Author: Mark Rutland Date: Thu Dec 5 18:06:52 2019 +0000 KVM: arm64: Don't log IMP DEF sysreg traps We don't intend to support IMPLEMENATION DEFINED system registers, but have to trap them (and emulate them as UNDEFINED). These traps aren't interesting to the system administrator or to the KVM developers, so let's not bother logging when we do so. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191205180652.18671-3-mark.rutland@arm.com commit afbd65f5e71a37fc9f46cb3e867e141a65d6ec25 Merge: 976e3645923b a284e11c371e Author: Dmitry Torokhov Date: Fri Dec 6 11:14:23 2019 -0800 Merge branch 'next' into for-linus Prepare second round of updates for 5.5 merge window. commit 7ada90eb9c7ae4a8eb066f8e9b4d80122f0363db Merge: 9feb1af97e73 9c1867d730a6 Author: Linus Torvalds Date: Fri Dec 6 10:28:09 2019 -0800 Merge tag 'drm-next-2019-12-06' of git://anongit.freedesktop.org/drm/drm Pull more drm updates from Dave Airlie: "Rob pointed out I missed his pull request for msm-next, it's been in next for a while outside of my tree so shouldn't cause any unexpected issues, it has some OCMEM support in drivers/soc that is acked by other maintainers as it's outside my tree. Otherwise it's a usual fixes pull, i915, amdgpu, the main ones, with some tegra, omap, mgag200 and one core fix. Summary: msm-next: - OCMEM support for a3xx and a4xx GPUs. - a510 support + display support core: - mst payload deletion fix i915: - uapi alignment fix - fix for power usage regression due to security fixes - change default preemption timeout to 640ms from 100ms - EHL voltage level display fixes - TGL DGL PHY fix - gvt - MI_ATOMIC cmd parser fix, CFL non-priv warning - CI spotted deadlock fix - EHL port D programming fix amdgpu: - VRAM lost fixes on BACO for CI/VI - navi14 DC fixes - misc SR-IOV, gfx10 fixes - XGMI fixes for arcturus - SRIOV fixes amdkfd: - KFD on ppc64le enabled - page table optimisations radeon: - fix for r1xx/2xx register checker. tegra: - displayport regression fixes - DMA API regression fixes mgag200: - fix devices that can't scanout except at 0 addr omap: - fix dma_addr refcounting" * tag 'drm-next-2019-12-06' of git://anongit.freedesktop.org/drm/drm: (100 commits) drm/dp_mst: Correct the bug in drm_dp_update_payload_part1() drm/omap: fix dma_addr refcounting drm/tegra: Run hub cleanup on ->remove() drm/tegra: sor: Make the +5V HDMI supply optional drm/tegra: Silence expected errors on IOMMU attach drm/tegra: vic: Export module device table drm/tegra: sor: Implement system suspend/resume drm/tegra: Use proper IOVA address for cursor image drm/tegra: gem: Remove premature import restrictions drm/tegra: gem: Properly pin imported buffers drm/tegra: hub: Remove bogus connection mutex check ia64: agp: Replace empty define with do while agp: Add bridge parameter documentation agp: remove unused variable num_segments agp: move AGPGART_MINOR to include/linux/miscdevice.h agp: remove unused variable size in agp_generic_create_gatt_table drm/dp_mst: Fix build on systems with STACKTRACE_SUPPORT=n drm/radeon: fix r1xx/r2xx register checker for POT textures drm/amdgpu: fix GFX10 missing CSIB set(v3) drm/amdgpu: should stop GFX ring in hw_fini ... commit 9feb1af97e7366b512ecb9e4dd61d3252074cda3 Merge: 0aecba617321 8539429917c4 Author: Linus Torvalds Date: Fri Dec 6 10:08:59 2019 -0800 Merge tag 'for-linus-20191205' of git://git.kernel.dk/linux-block Pull more block and io_uring updates from Jens Axboe: "I wasn't expecting this to be so big, and if I was, I would have used separate branches for this. Going forward I'll be doing separate branches for the current tree, just like for the next kernel version tree. In any case, this contains: - Series from Christoph that fixes an inherent race condition with zoned devices and revalidation. - null_blk zone size fix (Damien) - Fix for a regression in this merge window that caused busy spins by sending empty disk uevents (Eric) - Fix for a regression in this merge window for bfq stats (Hou) - Fix for io_uring creds allocation failure handling (me) - io_uring -ERESTARTSYS send/recvmsg fix (me) - Series that fixes the need for applications to retain state across async request punts for io_uring. This one is a bit larger than I would have hoped, but I think it's important we get this fixed for 5.5. - connect(2) improvement for io_uring, handling EINPROGRESS instead of having applications needing to poll for it (me) - Have io_uring use a hash for poll requests instead of an rbtree. This turned out to work much better in practice, so I think we should make the switch now. For some workloads, even with a fair amount of cancellations, the insertion sort is just too expensive. (me) - Various little io_uring fixes (me, Jackie, Pavel, LimingWu) - Fix for brd unaligned IO, and a warning for the future (Ming) - Fix for a bio integrity data leak (Justin) - bvec_iter_advance() improvement (Pavel) - Xen blkback page unmap fix (SeongJae) The major items in here are all well tested, and on the liburing side we continue to add regression and feature test cases. We're up to 50 topic cases now, each with anywhere from 1 to more than 10 cases in each" * tag 'for-linus-20191205' of git://git.kernel.dk/linux-block: (33 commits) block: fix memleak of bio integrity data io_uring: fix a typo in a comment bfq-iosched: Ensure bio->bi_blkg is valid before using it io_uring: hook all linked requests via link_list io_uring: fix error handling in io_queue_link_head io_uring: use hash table for poll command lookups io-wq: clear node->next on list deletion io_uring: ensure deferred timeouts copy necessary data io_uring: allow IO_SQE_* flags on IORING_OP_TIMEOUT null_blk: remove unused variable warning on !CONFIG_BLK_DEV_ZONED brd: warn on un-aligned buffer brd: remove max_hw_sectors queue limit xen/blkback: Avoid unmapping unmapped grant pages io_uring: handle connect -EINPROGRESS like -EAGAIN block: set the zone size in blk_revalidate_disk_zones atomically block: don't handle bio based drivers in blk_revalidate_disk_zones block: allocate the zone bitmaps lazily block: replace seq_zones_bitmap with conv_zones_bitmap block: simplify blkdev_nr_zones block: remove the empty line at the end of blk-zoned.c ... commit 7e4c6b9a5d22485acf009b3c3510a370f096dd54 Author: Keith Busch Date: Fri Dec 6 08:11:17 2019 +0900 nvme/pci: Fix read queue count If nvme.write_queues equals the number of CPUs, the driver had decreased the number of interrupts available such that there could only be one read queue even if the controller could support more. Remove the interrupt count reduction in this case. The driver wouldn't request more IRQs than it wants queues anyway. Reviewed-by: Jens Axboe Signed-off-by: Keith Busch commit 17c3316734ae2e51f74078cd955ab855caea7d73 Author: Keith Busch Date: Sat Dec 7 01:16:59 2019 +0900 nvme/pci Limit write queue sizes to possible cpus The driver can never use more queues of any type than the number of possible CPUs, so a higher value causes the driver to allocate more memory for IO queues than it could ever use. Limit the parameter at module load time to the number of possible cpus. Reviewed-by: Jens Axboe Signed-off-by: Keith Busch commit 3f68baf706ec68c4120867c25bc439c845fe3e17 Author: Keith Busch Date: Sat Dec 7 01:51:54 2019 +0900 nvme/pci: Fix write and poll queue types The number of poll or write queues should never be negative. Use unsigned types so that it's not possible to break have the driver not allocate any queues. Reviewed-by: Jens Axboe Signed-off-by: Keith Busch commit 0aecba6173216931c436a03183f4759a4fd4c2f2 Merge: b0d4beaa5a4b 2fa6b1e01a9b Author: Linus Torvalds Date: Fri Dec 6 09:06:58 2019 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs d_inode/d_flags memory ordering fixes from Al Viro: "Fallout from tree-wide audit for ->d_inode/->d_flags barriers use. Basically, the problem is that negative pinned dentries require careful treatment - unless ->d_lock is locked or parent is held at least shared, another thread can make them positive right under us. Most of the uses turned out to be safe - the main surprises as far as filesystems are concerned were - race in dget_parent() fastpath, that might end up with the caller observing the returned dentry _negative_, due to insufficient barriers. It is positive in memory, but we could end up seeing the wrong value of ->d_inode in CPU cache. Fixed. - manual checks that result of lookup_one_len_unlocked() is positive (and rejection of negatives). Again, insufficient barriers (we might end up with inconsistent observed values of ->d_inode and ->d_flags). Fixed by switching to a new primitive that does the checks itself and returns ERR_PTR(-ENOENT) instead of a negative dentry. That way we get rid of boilerplate converting negatives into ERR_PTR(-ENOENT) in the callers and have a single place to deal with the barrier-related mess - inside fs/namei.c rather than in every caller out there. The guts of pathname resolution *do* need to be careful - the race found by Ritesh is real, as well as several similar races. Fortunately, it turns out that we can take care of that with fairly local changes in there. The tree-wide audit had not been fun, and I hate the idea of repeating it. I think the right approach would be to annotate the places where we are _not_ guaranteed ->d_inode/->d_flags stability and have sparse catch regressions. But I'm still not sure what would be the least invasive way of doing that and it's clearly the next cycle fodder" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs/namei.c: fix missing barriers when checking positivity fix dget_parent() fastpath race new helper: lookup_positive_unlocked() fs/namei.c: pull positivity check into follow_managed() commit 0a5239985a3bc084738851afdf3fceb7d5651b0c Author: Boris Brezillon Date: Fri Nov 29 14:59:05 2019 +0100 drm/panfrost: Open/close the perfcnt BO Commit a5efb4c9a562 ("drm/panfrost: Restructure the GEM object creation") moved the drm_mm_insert_node_generic() call to the gem->open() hook, but forgot to update perfcnt accordingly. Patch the perfcnt logic to call panfrost_gem_open/close() where appropriate. Fixes: a5efb4c9a562 ("drm/panfrost: Restructure the GEM object creation") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Acked-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-6-boris.brezillon@collabora.com commit aed44cbeae2b7674cd155ba5cc6506aafe46a94e Author: Boris Brezillon Date: Fri Nov 29 14:59:04 2019 +0100 drm/panfrost: Fix a race in panfrost_gem_free_object() panfrost_gem_shrinker_scan() might purge a BO (release the sgt and kill the GPU mapping) that's being freed by panfrost_gem_free_object() if we don't remove the BO from the shrinker list at the beginning of panfrost_gem_free_object(). Fixes: 013b65101315 ("drm/panfrost: Add madvise and shrinker support") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Acked-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-5-boris.brezillon@collabora.com commit 3bb69dbcb9e8430e0cc9990cff427ca3ae25ffdc Author: Boris Brezillon Date: Fri Nov 29 14:59:03 2019 +0100 drm/panfrost: Fix a BO leak in panfrost_ioctl_mmap_bo() We should release the reference we grabbed when an error occurs. Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Acked-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-4-boris.brezillon@collabora.com commit 70cc77952efebf6722d483cb83cfb563ac9768db Author: Boris Brezillon Date: Fri Nov 29 14:59:02 2019 +0100 drm/panfrost: Fix a race in panfrost_ioctl_madvise() If 2 threads change the MADVISE property of the same BO in parallel we might end up with an shmem->madv value that's inconsistent with the presence of the BO in the shrinker list. The easiest solution to fix that is to protect the drm_gem_shmem_madvise() call with the shrinker lock. Fixes: 013b65101315 ("drm/panfrost: Add madvise and shrinker support") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Acked-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-3-boris.brezillon@collabora.com commit 22bd4df9dadf46f56f2eb16859439a7a600d106a Author: Steven Price Date: Mon Nov 18 17:30:02 2019 +0000 drm/panfrost: devfreq: Round frequencies to OPPs Currently when setting a frequency in panfrost_devfreq_target the returned frequency is the actual frequency that the clock driver reports (the return of clk_get_rate()). However, where the provided OPPs don't precisely match the frequencies that the clock actually achieves devfreq will then complain (repeatedly): devfreq devfreq0: Couldn't update frequency transition information. To avoid this change panfrost_devfreq_target() to fetch the opp using devfreq_recommened_opp() and not actually query the clock for the frequency. A similar problem exists with panfrost_devfreq_get_cur_freq(), but in this case because the function is optional we can just remove it and devfreq will fall back to using the previously set frequency. Fixes: 221bc77914cb ("drm/panfrost: Use generic code for devfreq") Signed-off-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191118173002.32015-1-steven.price@arm.com commit 694cfe7f31db36912725e63a38a5179c8628a496 Author: Nikos Tsironis Date: Wed Dec 4 16:07:42 2019 +0200 dm thin: Flush data device before committing metadata The thin provisioning target maintains per thin device mappings that map virtual blocks to data blocks in the data device. When we write to a shared block, in case of internal snapshots, or provision a new block, in case of external snapshots, we copy the shared block to a new data block (COW), update the mapping for the relevant virtual block and then issue the write to the new data block. Suppose the data device has a volatile write-back cache and the following sequence of events occur: 1. We write to a shared block 2. A new data block is allocated 3. We copy the shared block to the new data block using kcopyd (COW) 4. We insert the new mapping for the virtual block in the btree for that thin device. 5. The commit timeout expires and we commit the metadata, that now includes the new mapping from step (4). 6. The system crashes and the data device's cache has not been flushed, meaning that the COWed data are lost. The next time we read that virtual block of the thin device we read it from the data block allocated in step (2), since the metadata have been successfully committed. The data are lost due to the crash, so we read garbage instead of the old, shared data. This has the following implications: 1. In case of writes to shared blocks, with size smaller than the pool's block size (which means we first copy the whole block and then issue the smaller write), we corrupt data that the user never touched. 2. In case of writes to shared blocks, with size equal to the device's logical block size, we fail to provide atomic sector writes. When the system recovers the user will read garbage from that sector instead of the old data or the new data. 3. Even for writes to shared blocks, with size equal to the pool's block size (overwrites), after the system recovers, the written sectors will contain garbage instead of a random mix of sectors containing either old data or new data, thus we fail again to provide atomic sectors writes. 4. Even when the user flushes the thin device, because we first commit the metadata and then pass down the flush, the same risk for corruption exists (if the system crashes after the metadata have been committed but before the flush is passed down to the data device.) The only case which is unaffected is that of writes with size equal to the pool's block size and with the FUA flag set. But, because FUA writes trigger metadata commits, this case can trigger the corruption indirectly. Moreover, apart from internal and external snapshots, the same issue exists for newly provisioned blocks, when block zeroing is enabled. After the system recovers the provisioned blocks might contain garbage instead of zeroes. To solve this and avoid the potential data corruption we flush the pool's data device **before** committing its metadata. This ensures that the data blocks of any newly inserted mappings are properly written to non-volatile storage and won't be lost in case of a crash. Cc: stable@vger.kernel.org Signed-off-by: Nikos Tsironis Acked-by: Joe Thornber Signed-off-by: Mike Snitzer commit 30f55eae47e4ad1b64d692865e6a4277447a33df Merge: 916a91406278 be8af7a9e3cc Author: Olof Johansson Date: Fri Dec 6 08:29:54 2019 -0800 Merge tag 'arm-soc/for-5.5/devicetree-part2' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains the second batch of changes for Broadcom ARM-based SoCs, please pull the following: - Nicolas declares a CMA area within the first 1GB of DRAM in order for it to be guaranteed to reside there, otherwise ARM64's memory initialization will pick up a CMA area within ZONE_DMA32 - Stefan adds the Device Tree node for the built-in Ethernet controller (GENET) on the Raspberry Pi 4 model B board * tag 'arm-soc/for-5.5/devicetree-part2' of https://github.com/Broadcom/stblinux: ARM: dts: bcm2711-rpi-4: Enable GENET support ARM: dts: bcm2711: force CMA into first GB of memory Link: https://lore.kernel.org/r/20191118182931.11884-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 916a9140627898f1f3feb220b8e77001c0d876bf Merge: 5af5b2ae1ccf 030d2829f4c2 Author: Olof Johansson Date: Fri Dec 6 08:28:49 2019 -0800 Merge tag 'tegra-for-5.5-memory-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes memory: tegra: Fixes for v5.5-rc1 This contains a fix for a kernel panic that can occur on suspend if EMC timings are not available in device tree. * tag 'tegra-for-5.5-memory-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra30-emc: Fix panic on suspend Link: https://lore.kernel.org/r/20191204130753.3614278-1-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 5af5b2ae1ccfb4638c885e16cb0dfe131cb4aa9b Merge: c25f318b1ff7 48914c4ecb0c Author: Olof Johansson Date: Fri Dec 6 08:28:36 2019 -0800 Merge tag 'tegra-for-5.5-soc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes soc/tegra: Fixes for v5.5-rc1 Fixes a regression for wake events on Tegra194 caused by the Tegra210 support that was added in v5.5-rc1 as well as wrong reset sources and levels on Tegra194. * tag 'tegra-for-5.5-soc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Add reset sources and levels on Tegra194 soc/tegra: pmc: Add missing IRQ callbacks on Tegra194 soc/tegra: pmc: Use lower-case for hexadecimal literals Link: https://lore.kernel.org/r/20191204130753.3614278-2-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit c25f318b1ff7f27ef25def34f3a8834ec6de5972 Merge: f7a1a1db9877 0fb438eed10c Author: Olof Johansson Date: Fri Dec 6 08:28:11 2019 -0800 Merge tag 'tegra-for-5.5-cpufreq' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes cpufreq: tegra: Changes for v5.5-rc1 Implements support for suspend/resume on Tegra124. * tag 'tegra-for-5.5-cpufreq' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: cpufreq: tegra124: Add suspend and resume support Link: https://lore.kernel.org/r/20191204130753.3614278-3-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit f7a1a1db9877799e15aba047acd799c2df811f88 Merge: e89d108da909 716864586c62 Author: Olof Johansson Date: Fri Dec 6 08:27:32 2019 -0800 Merge tag 'socfpga_update_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/fixes SoCFPGA updates for v5.5 - Issue COLD reboot by default for SoCFPGA platforms * tag 'socfpga_update_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm: socfpga: execute cold reboot by default Link: https://lore.kernel.org/r/20191122182106.822-1-dinguyen@kernel.org Signed-off-by: Olof Johansson commit e89d108da909a4a248ab27cddd68eebaed2850f3 Merge: 0f679edf5ae3 3e5c3c41ae92 Author: Olof Johansson Date: Fri Dec 6 08:27:15 2019 -0800 Merge tag 'omap-for-v5.5/dt-fixes-merge-window-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Device tree fixes for omap variants for for v5.5 merge window This series of changes contains fixes for few SoC and board specific issues that would be good to have merged for v5.5-rc1: - Fix incorrect MMC card detection polarity for omap3-tao3530 - Fix wrong am57xx-beagle-x15 pinmux named states for eMMC - Fix dra7 cpsw mdio clock that causes wrong speed - Fix vcsi for droid4 so it won't get turned off after init - Fix rev and sysconfig register offsets for omap4 sgx so it can idle Then there are also two minor late changes to logicpd-torpedo-baseboard to configure 1-wire HDQ for battery stats, and remove out of date workaround comments no longer needed. * tag 'omap-for-v5.5/dt-fixes-merge-window-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Fix sgx sysconfig register for omap4 ARM: dts: Fix vcsi regulator to be always-on for droid4 to prevent hangs ARM: dts: dra7: fix cpsw mdio fck clock ARM: dts: am57xx-beagle-x15: Update pinmux name to ddr_3_3v ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity ARM: dts: logicpd-torpedo: Remove unnecessary notes/comments ARM: dts: logicpd-torpedo-baseboard: Enable HDQ Link: https://lore.kernel.org/r/pull-1574870758-237468@atomide.com Signed-off-by: Olof Johansson commit 0f679edf5ae392ad8aa20ac3f9f404bdc49291b3 Merge: 18977008f44c d7d8d62a3f3b Author: Olof Johansson Date: Fri Dec 6 08:26:47 2019 -0800 Merge tag 'omap-for-v5.5/ti-sysc-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Few ti-sysc related fixes for v5.5 merge window Just few minor changes that can be merged when suitable, but would be good to have these in v5.5-rc1 to remove dependencies between branches for more changes later on in v5.6: - Add quirk handling for AESS (Audio Engine Sub System) - We want to drop the useless gptimer option for omap4 as there are local timers - A minor error path handling improvment for sysc_child_add_named_clock() that will make further patching a bit easier * tag 'omap-for-v5.5/ti-sysc-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Adjust exception handling in sysc_child_add_named_clock() ARM: OMAP2+: Drop useless gptimer option for omap4 bus: ti-sysc: Add module enable quirk for audio AESS Link: https://lore.kernel.org/r/pull-1574273726-31367@atomide.com Signed-off-by: Olof Johansson commit 18977008f44c66bdd6d20bb432adf71372589303 Author: Marek Szyprowski via Linux.Kernel.Org Date: Fri Dec 6 13:51:12 2019 +0100 ARM: multi_v7_defconfig: Restore debugfs support Commit fd7d58f0dbc3 ("ARM: multi_v7_defconfig: renormalize based on recent additions") removed explicit enable line for CONFIG_DEBUG_FS, because that feature has been selected by other enabled options: CONFIG_TRACING, which were enabled by CONFIG_PERF_EVENTS. In meantime, commit 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") removed the dependency between CONFIG_DEBUG_FS and CONFIG_TRACING, so CONFIG_DEBUG_FS is no longer enabled in default builds. Enable it again explicitly, as debugfs support is essential for various automated testing tools. Link: https://lore.kernel.org/r/20191206125112.11006-1-m.szyprowski@samsung.com Signed-off-by: Marek Szyprowski Signed-off-by: Olof Johansson commit 4adf0b49eea926a55fd956ef7d86750f771435ff Author: Thomas Zimmermann Date: Fri Dec 6 09:19:01 2019 +0100 drm/mgag200: Flag all G200 SE A machines as broken wrt Several MGA G200 SE machines don't respect the value of the startadd register field. After more feedback on affected machines, neither PCI subvendor ID nor the internal ID seem to hint towards the bug. All affected machines have a PCI ID of 0x0522 (i.e., G200 SE A). It was decided to flag all G200 SE A machines as broken. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Fixes: 1591fadf857c ("drm/mgag200: Add workaround for HW that does not support 'startadd'") Cc: Thomas Zimmermann Cc: John Donnelly Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Sam Ravnborg Cc: "Y.C. Chen" Cc: Neil Armstrong Cc: Thomas Gleixner Cc: "José Roberto de Souza" Cc: Andrzej Pietrasiewicz Cc: dri-devel@lists.freedesktop.org Cc: # v5.3+ Cc: Greg Kroah-Hartman Cc: Allison Randal Cc: Alex Deucher Cc: "Noralf Trønnes" Link: https://patchwork.freedesktop.org/patch/msgid/20191206081901.9938-1-tzimmermann@suse.de commit de858040ee80e6f41bf0b40090f1c71f966a61b3 Author: Heyi Guo Date: Mon Dec 2 19:37:02 2019 +0800 arm64: entry: refine comment of stack overflow check Stack overflow checking can be done by testing sp & (1 << THREAD_SHIFT) only for the stacks are aligned to (2 << THREAD_SHIFT) with size of (1 << THREAD_SIZE), and this is the case when CONFIG_VMAP_STACK is set. Fix the code comment to avoid confusion. Cc: Will Deacon Acked-by: Mark Rutland Signed-off-by: Heyi Guo [catalin.marinas@arm.com: Updated comment following Mark's suggestion] Signed-off-by: Catalin Marinas commit 70927d02d409b5a79c3ed040ace5017da8284ede Author: Mark Rutland Date: Fri Dec 6 13:01:29 2019 +0000 arm64: ftrace: fix ifdeffery When I tweaked the ftrace entry assembly in commit: 3b23e4991fb66f6d ("arm64: implement ftrace with regs") ... my ifdeffery tweaks left ftrace_graph_caller undefined for CONFIG_DYNAMIC_FTRACE && CONFIG_FUNCTION_GRAPH_TRACER when ftrace is based on mcount. The kbuild test robot reported that this issue is detected at link time: | arch/arm64/kernel/entry-ftrace.o: In function `skip_ftrace_call': | arch/arm64/kernel/entry-ftrace.S:238: undefined reference to `ftrace_graph_caller' | arch/arm64/kernel/entry-ftrace.S:238:(.text+0x3c): relocation truncated to fit: R_AARCH64_CONDBR19 against undefined symbol | `ftrace_graph_caller' | arch/arm64/kernel/entry-ftrace.S:243: undefined reference to `ftrace_graph_caller' | arch/arm64/kernel/entry-ftrace.S:243:(.text+0x54): relocation truncated to fit: R_AARCH64_CONDBR19 against undefined symbol | `ftrace_graph_caller' This patch fixes the ifdeffery so that the mcount version of ftrace_graph_caller doesn't depend on CONFIG_DYNAMIC_FTRACE. At the same time, a redundant #else is removed from the ifdeffery for the patchable-function-entry version of ftrace_graph_caller. Fixes: 3b23e4991fb66f6d ("arm64: implement ftrace with regs") Reported-by: kbuild test robot Signed-off-by: Mark Rutland Cc: Amit Daniel Kachhap Cc: Ard Biesheuvel Cc: Mark Rutland Cc: Torsten Duwe Cc: Will Deacon Signed-off-by: Catalin Marinas commit 0492747c72a3db0425a234abafb763c5b28c845d Author: Sebastian Andrzej Siewior Date: Thu Nov 28 20:58:05 2019 +0100 arm64: KVM: Invoke compute_layout() before alternatives are applied compute_layout() is invoked as part of an alternative fixup under stop_machine(). This function invokes get_random_long() which acquires a sleeping lock on -RT which can not be acquired in this context. Rename compute_layout() to kvm_compute_layout() and invoke it before stop_machine() applies the alternatives. Add a __init prefix to kvm_compute_layout() because the caller has it, too (and so the code can be discarded after boot). Reviewed-by: James Morse Acked-by: Marc Zyngier Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Catalin Marinas commit df325e05a682e9c624f471835c35bd3f870d5e8c Author: Catalin Marinas Date: Thu Dec 5 13:57:36 2019 +0000 arm64: Validate tagged addresses in access_ok() called from kernel threads __range_ok(), invoked from access_ok(), clears the tag of the user address only if CONFIG_ARM64_TAGGED_ADDR_ABI is enabled and the thread opted in to the relaxed ABI. The latter sets the TIF_TAGGED_ADDR thread flag. In the case of asynchronous I/O (e.g. io_submit()), the access_ok() may be called from a kernel thread. Since kernel threads don't have TIF_TAGGED_ADDR set, access_ok() will fail for valid tagged user addresses. Example from the ffs_user_copy_worker() thread: use_mm(io_data->mm); ret = ffs_copy_to_iter(io_data->buf, ret, &io_data->data); unuse_mm(io_data->mm); Relax the __range_ok() check to always untag the user address if called in the context of a kernel thread. The user pointers would have already been checked via aio_setup_rw() -> import_{single_range,iovec}() at the time of the asynchronous I/O request. Fixes: 63f0c6037965 ("arm64: Introduce prctl() options to control the tagged user addresses ABI") Cc: # 5.4.x- Cc: Will Deacon Reported-by: Evgenii Stepanov Tested-by: Evgenii Stepanov Signed-off-by: Catalin Marinas commit 04bb96427d4ee33fbdf15648ddf578c6ba1aef54 Author: Vincenzo Frascino Date: Thu Dec 5 11:04:51 2019 +0100 ARM: 8947/1: Fix __arch_get_hw_counter() access to CNTVCT __arch_get_hw_counter() should check clock_mode to see if it can access CNTVCT. With the conversion to unified vDSO this check has been left out. This causes on imx v6 and v7 (imx_v6_v7_defconfig) and other platforms to hang at boot during the execution of the init process as per below: [ 19.976852] Run /sbin/init as init process [ 20.044931] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004 Fix the problem verifying that clock_mode is set coherently before accessing CNTVCT. Investigated-by: Arnd Bergmann Reported-by: Guenter Roeck Tested-by: Guenter Roeck Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Vincenzo Frascino Signed-off-by: Russell King commit ff98a5f624d2910de050f1fc7f2a32769da86b51 Author: Dietmar Eggemann Date: Fri Nov 29 16:23:02 2019 +0100 ARM: 8943/1: Fix topology setup in case of CPU hotplug for CONFIG_SCHED_MC Commit ca74b316df96 ("arm: Use common cpu_topology structure and functions.") changed cpu_coregroup_mask() from the ARM32 specific implementation in arch/arm/include/asm/topology.h to the one shared with ARM64 and RISCV in drivers/base/arch_topology.c. Currently on ARM32 (TC2 w/ CONFIG_SCHED_MC) the task scheduler setup code (w/ CONFIG_SCHED_DEBUG) shows this during CPU hotplug: ERROR: groups don't span domain->span It happens to CPUs of the cluster of the CPU which gets hot-plugged out on scheduler domain MC. Turns out that the shared cpu_coregroup_mask() requires that the hot-plugged CPU is removed from the core_sibling mask via remove_cpu_topology(). Otherwise the 'is core_sibling subset of cpumask_of_node()' doesn't work. In this case the task scheduler has to deal with cpumask_of_node instead of core_sibling which is wrong on scheduler domain MC. e.g. CPU3 hot-plugged out on TC2 [cluster0: 0,3-4 cluster1: 1-2]: cpu_coregroup_mask(): CPU3 cpumask_of_node=0-2,4 core_sibling=0,3-4 ^ should be: cpu_coregroup_mask(): CPU3 cpumask_of_node=0-2,4 core_sibling=0,4 Add remove_cpu_topology() to __cpu_disable() to remove the CPU from the topology masks in case of a CPU hotplug out operation. At the same time tweak store_cpu_topology() slightly so it will call update_siblings_masks() in case of CPU hotplug in operation via secondary_start_kernel()->smp_store_cpu_info(). This aligns the ARM32 implementation with the ARM64 one. Guarding remove_cpu_topology() with CONFIG_GENERIC_ARCH_TOPOLOGY is necessary since some Arm32 defconfigs (aspeed_g5_defconfig, milbeaut_m10v_defconfig, spear13xx_defconfig) specify an explicit # CONFIG_ARM_CPU_TOPOLOGY is not set w/ ./arch/arm/Kconfig: select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY Fixes: ca74b316df96 ("arm: Use common cpu_topology structure and functions") Reviewed-by: Sudeep Holla Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Tested-by: Ondrej Jirman Signed-off-by: Dietmar Eggemann Signed-off-by: Russell King commit bf4b96bb542ee3fe913d0b9eb4d9c1046c429ac6 Author: Mark Rutland Date: Thu Dec 5 18:06:51 2019 +0000 KVM: arm64: Sanely ratelimit sysreg messages Currently kvm_pr_unimpl() is ratelimited, so print_sys_reg_instr() won't spam the console. However, someof its callers try to print some contextual information with kvm_err(), which is not ratelimited. This means that in some cases the context may be printed without the sysreg encoding, which isn't all that useful. Let's ensure that both are consistently printed together and ratelimited, by refactoring print_sys_reg_instr() so that some callers can provide it with an arbitrary format string. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191205180652.18671-2-mark.rutland@arm.com commit 72a610f32e1f1664803218ec654a8e3b8fb2081a Author: Miaohe Lin Date: Sat Nov 30 10:45:18 2019 +0800 KVM: arm/arm64: vgic: Use wrapper function to lock/unlock all vcpus in kvm_vgic_create() Use wrapper function lock_all_vcpus()/unlock_all_vcpus() in kvm_vgic_create() to remove duplicated code dealing with locking and unlocking all vcpus in a vm. Signed-off-by: Miaohe Lin Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Reviewed-by: Steven Price Link: https://lore.kernel.org/r/1575081918-11401-1-git-send-email-linmiaohe@huawei.com commit 0bda9498dd45280e334bfe88b815ebf519602cc3 Author: Miaohe Lin Date: Thu Nov 28 14:38:48 2019 +0800 KVM: arm/arm64: vgic: Fix potential double free dist->spis in __kvm_vgic_destroy() In kvm_vgic_dist_init() called from kvm_vgic_map_resources(), if dist->vgic_model is invalid, dist->spis will be freed without set dist->spis = NULL. And in vgicv2 resources clean up path, __kvm_vgic_destroy() will be called to free allocated resources. And dist->spis will be freed again in clean up chain because we forget to set dist->spis = NULL in kvm_vgic_dist_init() failed path. So double free would happen. Signed-off-by: Miaohe Lin Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/1574923128-19956-1-git-send-email-linmiaohe@huawei.com commit 7e0befd521b6d40af1d08fcdb29d4dbf30236624 Author: Miaohe Lin Date: Thu Nov 21 15:15:59 2019 +0800 KVM: arm/arm64: Get rid of unused arg in cpu_init_hyp_mode() As arg dummy is not really needed, there's no need to pass NULL when calling cpu_init_hyp_mode(). So clean it up. Fixes: 67f691976662 ("arm64: kvm: allows kvm cpu hotplug") Reviewed-by: Steven Price Signed-off-by: Miaohe Lin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1574320559-5662-1-git-send-email-linmiaohe@huawei.com commit 969bea5e4d8b96d903637b100640acb92158c4e3 Author: Kefeng Wang Date: Thu Nov 28 08:47:52 2019 +0800 checkpatch: Drop pr_warning check All pr_warning are removed from kernel, let's cleanup pr_warning check in checkpatch. Link: http://lkml.kernel.org/r/20191128004752.35268-5-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org Cc: tj@kernel.org Cc: arnd@arndb.de Cc: sergey.senozhatsky@gmail.com Cc: rostedt@goodmis.org Cc: Andy Whitcroft Signed-off-by: Kefeng Wang Acked-by: Joe Perches Signed-off-by: Petr Mladek commit 61ff72f4016804b99d28988a57e65c217f01769d Author: Kefeng Wang Date: Thu Nov 28 08:47:51 2019 +0800 printk: Drop pr_warning definition With all pr_warning are removed, saftely drop pr_warning definition. Link: http://lkml.kernel.org/r/20191128004752.35268-4-wangkefeng.wang@huawei.com To: joe@perches.com To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org Cc: tj@kernel.org Cc: arnd@arndb.de Cc: sergey.senozhatsky@gmail.com Cc: rostedt@goodmis.org Signed-off-by: Kefeng Wang Signed-off-by: Petr Mladek commit ee19545220a8663f0ca58c3427bc08fd6a104a42 Author: Stephen Rothwell Date: Fri Dec 6 09:25:03 2019 +1100 Fix up for "printk: Drop pr_warning definition" Link: http://lkml.kernel.org/r/20191206092503.303d6a57@canb.auug.org.au Cc: Linux Next Mailing List Cc: Linux Kernel Mailing List Cc: "Steven Rostedt (VMware)" Cc: Kefeng Wang Cc: Linus Torvalds Signed-off-by: Stephen Rothwell Signed-off-by: Petr Mladek commit 1d9a6159bd04b676cb7d9b13245888fa450cec10 Author: Kefeng Wang Date: Thu Nov 28 08:47:49 2019 +0800 workqueue: Use pr_warn instead of pr_warning Use pr_warn() instead of the remaining pr_warning() calls. Link: http://lkml.kernel.org/r/20191128004752.35268-2-wangkefeng.wang@huawei.com To: joe@perches.com To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org Cc: tj@kernel.org Cc: arnd@arndb.de Cc: sergey.senozhatsky@gmail.com Cc: rostedt@goodmis.org Signed-off-by: Kefeng Wang Acked-by: Tejun Heo Signed-off-by: Petr Mladek commit ae72555b410410568b493f8735324f8e9bd7c051 Merge: 0033b34a03ec 8f9081c92523 Author: David S. Miller Date: Fri Dec 6 00:04:15 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2019-12-05 The following pull-request contains BPF updates for your *net* tree. We've added 6 non-merge commits during the last 1 day(s) which contain a total of 14 files changed, 116 insertions(+), 37 deletions(-). The main changes are: 1) three selftests fixes, from Stanislav. 2) one samples fix, from Jesper. 3) one verifier fix, from Yonghong. ==================== Signed-off-by: David S. Miller commit 0f60a0bcc1b96d531fa623ab520f863f1292c75b Merge: 9f58c93efdff fd9bee5e2414 Author: Ingo Molnar Date: Fri Dec 6 08:54:41 2019 +0100 Merge tag 'perf-urgent-for-mingo-5.5-20191205' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf fixes from Arnaldo Carvalho de Melo: perf inject: Adrian Hunter: - Fix processing of ID index for injected instruction tracing perf report: Ravi Bangoria: - Replace pr_err() with ui__error(), so that we can see the output in the TUI mode instead of showing and immediately restoring the screen to the state before perf was started. - Don't start --mem-mode/--branch-mode mode if required samples are not available. tools headers UAPI: Arnaldo Carvalho de Melo: - Sync drm/i915_drm.h with the kernel sources - Update tools's copy of drm.h headers. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 9c1867d730a6e1dc23dd633392d102860578c047 Merge: b53bd16fec3d 01bb63031933 Author: Dave Airlie Date: Fri Dec 6 13:10:51 2019 +1000 Merge tag 'drm-intel-next-fixes-2019-12-05' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Includes gvt-next-fixes-2019-12-02 pull - Fixes for CI spotted eadlock and a race condition in GEM contexts - Fix for EHL port D programming Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191205092412.GA8089@jlahtine-desk.ger.corp.intel.com commit 8539429917c48c994d2e2cafa02ab06587b3b42c Merge: ece841abbed2 0b4295b5e2b9 Author: Jens Axboe Date: Thu Dec 5 19:09:26 2019 -0700 Merge branch 'io_uring-5.5' into for-linus * io_uring-5.5: io_uring: fix a typo in a comment io_uring: hook all linked requests via link_list io_uring: fix error handling in io_queue_link_head io_uring: use hash table for poll command lookups commit b0d4beaa5a4b7d31070c41c2e50740304a3f1138 Merge: da73fcd8cfdc 850d71acd52c Author: Linus Torvalds Date: Thu Dec 5 17:11:48 2019 -0800 Merge branch 'next.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull autofs updates from Al Viro: "autofs misuses checks for ->d_subdirs emptiness; the cursors are in the same lists, resulting in false negatives. It's not needed anyway, since autofs maintains counter in struct autofs_info, containing 0 for removed ones, 1 for live symlinks and 1 + number of children for live directories, which is precisely what we need for those checks. This series switches to use of that counter and untangles the crap around its uses (it needs not be atomic and there's a bunch of completely pointless "defensive" checks). This fell out of dcache_readdir work; the main point is to get rid of ->d_subdirs abuses in there. I've more followup cleanups, but I hadn't run those by Ian yet, so they can go next cycle" * 'next.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: autofs: don't bother with atomics for ino->count autofs_dir_rmdir(): check ino->count for deciding whether it's empty... autofs: get rid of pointless checks around ->count handling autofs_clear_leaf_automount_flags(): use ino->count instead of ->d_subdirs commit da73fcd8cfdc3d0ef49280fa0d511723a0220e03 Merge: 3f1266ec704d 8f868d68d335 Author: Linus Torvalds Date: Thu Dec 5 16:35:53 2019 -0800 Merge branch 'pipe-rework' (patches from David Howells) Merge two fixes for the pipe rework from David Howells: "Here are a couple of patches to fix bugs syzbot found in the pipe changes: - An assertion check will sometimes trip when polling a pipe because the ring size and indices used are approximate and may be being changed simultaneously. An equivalent approximate calculation was done previously, but without the assertion check, so I've just dropped the check. To make it accurate, the pipe mutex would need to be taken or the spin lock could be used - but usage of the spinlock would need to be rolled out into splice, iov_iter and other places for that. - The index mask and the max_usage values cannot be cached across pipe_wait() as F_SETPIPE_SZ could have been called during the wait. This can cause pipe_write() to break" * pipe-rework: pipe: Fix missing mask update after pipe_wait() pipe: Remove assertion from pipe_poll() commit 8f868d68d335a17923dffb6858f8e9b656424699 Author: David Howells Date: Thu Dec 5 22:30:37 2019 +0000 pipe: Fix missing mask update after pipe_wait() Fix pipe_write() to not cache the ring index mask and max_usage as their values are invalidated by calling pipe_wait() because the latter function drops the pipe lock, thereby allowing F_SETPIPE_SZ change them. Without this, pipe_write() may subsequently miscalculate the array indices and pipe fullness, leading to an oops like the following: BUG: KASAN: slab-out-of-bounds in pipe_write+0xc25/0xe10 fs/pipe.c:481 Write of size 8 at addr ffff8880771167a8 by task syz-executor.3/7987 ... CPU: 1 PID: 7987 Comm: syz-executor.3 Not tainted 5.4.0-rc2-syzkaller #0 ... Call Trace: pipe_write+0xc25/0xe10 fs/pipe.c:481 call_write_iter include/linux/fs.h:1895 [inline] new_sync_write+0x3fd/0x7e0 fs/read_write.c:483 __vfs_write+0x94/0x110 fs/read_write.c:496 vfs_write+0x18a/0x520 fs/read_write.c:558 ksys_write+0x105/0x220 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x6e/0xb0 fs/read_write.c:620 do_syscall_64+0xca/0x5d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe This is not a problem for pipe_read() as the mask is recalculated on each pass of the loop, after pipe_wait() has been called. Fixes: 8cefc107ca54 ("pipe: Use head and tail pointers for the ring, not cursor and length") Reported-by: syzbot+838eb0878ffd51f27c41@syzkaller.appspotmail.com Signed-off-by: David Howells Cc: Eric Biggers [ Changed it to use a temporary variable 'mask' to avoid long lines -Linus ] Signed-off-by: Linus Torvalds commit 8c7b8c34ae952cc062c12d7db9ee2f298c09dca4 Author: David Howells Date: Thu Dec 5 22:30:30 2019 +0000 pipe: Remove assertion from pipe_poll() An assertion check was added to pipe_poll() to make sure that the ring occupancy isn't seen to overflow the ring size. However, since no locks are held when the three values are read, it is possible for F_SETPIPE_SZ to intervene and muck up the calculation, thereby causing the oops. Fix this by simply removing the assertion and accepting that the calculation might be approximate. Note that the previous code also had a similar issue, though there was no assertion check, since the occupancy counter and the ring size were not read with a lock held, so it's possible that the poll check might have malfunctioned then too. Also wake up all the waiters so that they can reissue their checks if there was a competing read or write. Fixes: 8cefc107ca54 ("pipe: Use head and tail pointers for the ring, not cursor and length") Reported-by: syzbot+d37abaade33a934f16f2@syzkaller.appspotmail.com Signed-off-by: David Howells cc: Eric Biggers Signed-off-by: Linus Torvalds commit e62dbcdb8cbcdc476175dc5a43ea7285c488fbbe Author: Yongqiang Sun Date: Mon Nov 18 13:45:50 2019 -0500 drm/amd/display: Compare clock state member to determine optimization. [Why] It seems always request passive flip on RN due to incorrect compare clock state to determine optization. [How] Instead of calling memcmp, compare clock state member to determine the condition. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 7a02d2985f41539ad2196775085d05f98f4a6040 Author: Alex Deucher Date: Thu Dec 5 16:38:01 2019 -0500 drm/amdgpu/display: add fallthrough comment To avoid a compiler warning. Reviewed-by: Zhan Liu Signed-off-by: Alex Deucher commit 0df62823630d03d58f6eedb99fab285f847e4a1b Author: George Shen Date: Fri Nov 15 18:56:57 2019 -0500 drm/amd/display: Increase the number of retries after AUX DEFER [Why] When a timeout occurs after a DEFER, some devices require more retries than in the case of a regular timeout. [How] In a timeout occurrence, check whether a DEFER has occurred before the timeout and retry MAX_DEFER_RETRIES retries times instead of MAX_TIMEOUT_RETRIES. Signed-off-by: George Shen Reviewed-by: Tony Cheng Acked-by: Abdoulaye Berthe Acked-by: Leo Li Signed-off-by: Alex Deucher commit 44ce6c3dc8479bb3ed68df13b502b0901675e7d6 Author: Eric Yang Date: Fri Nov 15 12:04:25 2019 -0500 drm/amd/display: update dispclk and dppclk vco frequency Value obtained from DV is not allowing 8k60 CTA mode with DSC to pass, after checking real value being used in hw, find out that correct value is 3600, which will allow that mode. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit dd0b162fd00915728860a360c97752988782b8cc Author: Amanda Liu Date: Fri Nov 15 17:07:27 2019 -0500 drm/amd/display: Fix screen tearing on vrr tests [Why] Screen tearing is present in tests when setting the frame rate to certain fps [How] Revert previous optimizations for low frame rates. Signed-off-by: Amanda Liu Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 87de6cb2f28153bc74d0a001ca099c29453e145f Author: Nikola Cornij Date: Mon Nov 11 18:03:59 2019 -0500 drm/amd/display: Reset steer fifo before unblanking the stream [why] During mode transition steer fifo could overflow. Quite often it recovers by itself, but sometimes it doesn't. [how] Add steer fifo reset before unblanking the stream. Also add a short delay when resetting dig resync fifo to make sure register writes don't end up back-to-back, in which case the HW might miss the reset request. Signed-off-by: Nikola Cornij Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit a2a1f1eb06d73a45a60970c77403687918966fc6 Author: Brandon Syu Date: Fri Nov 8 11:26:06 2019 +0800 drm/amd/display: fixed that I2C over AUX didn't read data issue [Why] The variable mismatch assignment error. [How] To use uint32_t replace it. Signed-off-by: Brandon Syu Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 28fa24ad14e8f7d23c62283eaf9c79b4fd165c16 Author: Leo (Hanghong) Ma Date: Thu Nov 7 16:30:04 2019 -0500 drm/amd/display: Change the delay time before enabling FEC [why] DP spec requires 1000 symbols delay between the end of link training and enabling FEC in the stream. Currently we are using 1 miliseconds delay which is not accurate. [how] One lane RBR should have the maximum time for transmitting 1000 LL codes which is 6.173 us. So using 7 microseconds delay instead of 1 miliseconds. Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Harry Wentland Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher commit 10bce710fa6feb13ec270d5420aad3b81f6bf7ea Author: Joseph Gravenor Date: Fri Nov 8 14:30:34 2019 -0500 drm/amd/display: have two different sr and pstate latency tables for renoir [Why] new sr and pstate latencies are optimized for the case when we are not using lpddr4 memory [How] have two different wm tables, one for the lpddr case and one for non lpddr case Signed-off-by: Joseph Gravenor Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit a51d9f8fe756beac51ce26ef54195da00a260d13 Author: David Galiffi Date: Thu Nov 7 17:18:20 2019 -0500 drm/amd/display: Fixed kernel panic when booting with DP-to-HDMI dongle [Why] In dc_link_is_dp_sink_present, if dal_ddc_open fails, then dal_gpio_destroy_ddc is called, destroying pin_data and pin_clock. They are created only on dc_construct, and next aux access will cause a panic. [How] Instead of calling dal_gpio_destroy_ddc, call dal_ddc_close. Signed-off-by: David Galiffi Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 1653acd566a846647adc293209f823b3e552e974 Author: Joseph Gravenor Date: Thu Nov 7 19:20:00 2019 -0500 drm/amd/display: populate bios integrated info for renoir [Why] When video_memory_type bw_params->vram_type is assigned, wedistinguish between Ddr4MemType and LpDdr4MemType. Because of this we will never report that we are using LpDdr4MemType and never re-purpose WM set D [How] populate bios integrated info for renoir by adding the revision number for renoir and use that integrated info table instead of of asic_id to get the vram type Signed-off-by: Joseph Gravenor Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit aa4febf5098572649846b4f28a2609233388c412 Author: Joseph Gravenor Date: Mon Nov 4 16:39:35 2019 -0500 drm/amd/display: fix DalDramClockChangeLatencyNs override [why] pstate_latency_us never gets updated from the hard coded value in rn_clk_mgr.c [how] update the wm table's values before we do calculations with them Signed-off-by: Joseph Gravenor Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit a1fc44b609b4e9c0941f0e4a1fc69d367af5ab69 Author: Nikola Cornij Date: Thu Nov 7 13:06:48 2019 -0500 drm/amd/display: Map DSC resources 1-to-1 if numbers of OPPs and DSCs are equal [why] On ASICs where number of DSCs is the same as OPPs there's no need for DSC resource management. Mappping 1-to-1 fixes mode-set- or S3- -related issues for such platforms. [how] Map DSC resources 1-to-1 to pipes only if number of OPPs is the same as number of DSCs. This will still keep other ASICs working. A follow-up patch to fix mode-set issues on those ASICs will be required if testing shows issues with mode set. Signed-off-by: Nikola Cornij Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit 9d9de889ff8eb941e4daefff610e170386b61962 Author: Eric Yang Date: Tue Nov 5 11:59:38 2019 -0500 drm/amd/display: update sr and pstate latencies for Renoir [Why] DF team has produced more optimized latency numbers. [How] Add sr latencies to the wm table, use different latencies for different wm sets. Also fix bb override from registery key for these latencies. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit bf26da927a1cd57c9deb2db29ae8cf276ba8b17b Author: Pierre-Eric Pelloux-Prayer Date: Thu Nov 28 12:08:58 2019 +0100 drm/amdgpu: add cache flush workaround to gfx8 emit_fence The same workaround is used for gfx7. Both PAL and Mesa use it for gfx8 too, so port this commit to gfx_v8_0_ring_emit_fence_gfx. Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 14891c316ca7e15d81dba78f30fb630e3f9ee2c9 Author: Alex Deucher Date: Wed Dec 4 22:07:49 2019 -0500 drm/amdgpu: add header line for power profile on Arcturus So the output is consistent with other asics. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 6e807535dae5dbbd53bcc5e81047a20bf5eb08ea Author: Guchun Chen Date: Wed Dec 4 15:51:16 2019 +0800 drm/amdgpu: add check before enabling/disabling broadcast mode When security violation from new vbios happens, data fabric is risky to stop working. So prevent the direct access to DF mmFabricConfigAccessControl from the new vbios and onwards. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0033b34a03ec5cf747cdaf9b1f9dceb91c020f17 Author: Eric Biggers Date: Wed Dec 4 21:54:19 2019 -0800 ppp: fix out-of-bounds access in bpf_prog_create() sock_fprog_kern::len is in units of struct sock_filter, not bytes. Fixes: 3e859adf3643 ("compat_ioctl: unify copy-in of ppp filters") Reported-by: syzbot+eb853b51b10f1befa0b7@syzkaller.appspotmail.com Signed-off-by: Eric Biggers Reviewed-by: Arnd Bergmann Signed-off-by: David S. Miller commit a116f4e238cc20dfbac30c65949752798f5b6efa Merge: aacf6578ef77 1c9855085eba Author: David S. Miller Date: Thu Dec 5 14:42:43 2019 -0800 Merge branch 'hns3-fixes' Huazhong Tan says: ==================== net: hns3: fixes for -net This patchset includes misc fixes for the HNS3 ethernet driver. [patch 1/3] fixes a TX queue not restarted problem. [patch 2/3] fixes a use-after-free issue. [patch 3/3] fixes a VF ID issue for setting VF VLAN. change log: V1->V2: keeps 'ring' as parameter in hns3_nic_maybe_stop_tx() in [patch 1/3], suggestted by David. rewrites [patch 2/3]'s commit log to make it be easier to understand, suggestted by David. ==================== Signed-off-by: David S. Miller commit 1c9855085ebaaa2efcf368bee038e4811015abbd Author: Jian Shen Date: Thu Dec 5 10:12:29 2019 +0800 net: hns3: fix VF ID issue for setting VF VLAN Previously, when set VF VLAN with command "ip link set vf vlan ", the VF ID 0 is handled as PF incorrectly, which should be the first VF. This patch fixes it. Fixes: 21e043cd8124 ("net: hns3: fix set port based VLAN for PF") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d1a37dedcfcf2c01daff5281c3c378876a04e2f4 Author: Yunsheng Lin Date: Thu Dec 5 10:12:28 2019 +0800 net: hns3: fix a use after free problem in hns3_nic_maybe_stop_tx() Currently, hns3_nic_maybe_stop_tx() uses skb_copy() to linearize a SKB if the BD num required by the SKB does not meet the hardware limitation, and it linearizes the SKB by allocating a new linearized SKB and freeing the old SKB, if hns3_nic_maybe_stop_tx() returns -EBUSY because there are no enough space in the ring to send the linearized skb to hardware, the sch_direct_xmit() still hold reference to old SKB and try to retransmit the old SKB when dev_hard_start_xmit() return TX_BUSY, which may cause use after freed problem. This patch fixes it by using __skb_linearize() to linearize the SKB in hns3_nic_maybe_stop_tx(). Fixes: 51e8439f3496 ("net: hns3: add 8 BD limit for tx flow") Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 2a597eff2437d21841a1e87ffa536ab69dbffdcf Author: Yunsheng Lin Date: Thu Dec 5 10:12:27 2019 +0800 net: hns3: fix for TX queue not restarted problem There is timing window between ring_space checking and netif_stop_subqueue when transmiting a SKB, and the TX BD cleaning may be executed during the time window, which may caused TX queue not restarted problem. This patch fixes it by rechecking the ring_space after netif_stop_subqueue to make sure TX queue is restarted. Also, the ring->next_to_clean is updated even when pkts is zero, because all the TX BD cleaned may be non-SKB, so it needs to check if TX queue need to be restarted. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit aacf6578ef7704d8df252bbc146b1a35ca131248 Author: Grygorii Strashko Date: Wed Dec 4 19:45:32 2019 +0200 net: ethernet: ti: cpsw_switchdev: fix unmet direct dependencies detected for NET_SWITCHDEV Replace "select NET_SWITCHDEV" vs "depends on NET_SWITCHDEV" to fix Kconfig warning with CONFIG_COMPILE_TEST=y WARNING: unmet direct dependencies detected for NET_SWITCHDEV Depends on [n]: NET [=y] && INET [=n] Selected by [y]: - TI_CPSW_SWITCHDEV [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_TI [=y] && (ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST [=y]) because TI_CPSW_SWITCHDEV blindly selects NET_SWITCHDEV even though INET is not set/enabled, while NET_SWITCHDEV depends on INET. Reported-by: Randy Dunlap Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Signed-off-by: Grygorii Strashko Acked-by: Randy Dunlap # build-tested Signed-off-by: David S. Miller commit ecda7c0280e6b3398459dc589b9a41c1adb45529 Author: Nikos Tsironis Date: Wed Dec 4 16:07:41 2019 +0200 dm thin metadata: Add support for a pre-commit callback Add support for one pre-commit callback which is run right before the metadata are committed. This allows the thin provisioning target to run a callback before the metadata are committed and is required by the next commit. Cc: stable@vger.kernel.org Signed-off-by: Nikos Tsironis Acked-by: Joe Thornber Signed-off-by: Mike Snitzer commit 8b3fd1f53af3591d5624ab9df718369b14d09ed1 Author: Nikos Tsironis Date: Wed Dec 4 16:06:54 2019 +0200 dm clone: Flush destination device before committing metadata dm-clone maintains an on-disk bitmap which records which regions are valid in the destination device, i.e., which regions have already been hydrated, or have been written to directly, via user I/O. Setting a bit in the on-disk bitmap meas the corresponding region is valid in the destination device and we redirect all I/O regarding it to the destination device. Suppose the destination device has a volatile write-back cache and the following sequence of events occur: 1. A region gets hydrated, either through the background hydration or because it was written to directly, via user I/O. 2. The commit timeout expires and we commit the metadata, marking that region as valid in the destination device. 3. The system crashes and the destination device's cache has not been flushed, meaning the region's data are lost. The next time we read that region we read it from the destination device, since the metadata have been successfully committed, but the data are lost due to the crash, so we read garbage instead of the old data. This has several implications: 1. In case of background hydration or of writes with size smaller than the region size (which means we first copy the whole region and then issue the smaller write), we corrupt data that the user never touched. 2. In case of writes with size equal to the device's logical block size, we fail to provide atomic sector writes. When the system recovers the user will read garbage from the sector instead of the old data or the new data. 3. In case of writes without the FUA flag set, after the system recovers, the written sectors will contain garbage instead of a random mix of sectors containing either old data or new data, thus we fail again to provide atomic sector writes. 4. Even when the user flushes the dm-clone device, because we first commit the metadata and then pass down the flush, the same risk for corruption exists (if the system crashes after the metadata have been committed but before the flush is passed down). The only case which is unaffected is that of writes with size equal to the region size and with the FUA flag set. But, because FUA writes trigger metadata commits, this case can trigger the corruption indirectly. To solve this and avoid the potential data corruption we flush the destination device **before** committing the metadata. This ensures that any freshly hydrated regions, for which we commit the metadata, are properly written to non-volatile storage and won't be lost in case of a crash. Fixes: 7431b7835f55 ("dm: add clone target") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Nikos Tsironis Signed-off-by: Mike Snitzer commit 30b10c77837ceec77bc7bc81e60db94e5b0ddbbc Author: Olof Johansson Date: Thu Dec 5 13:14:37 2019 -0800 ARM: defconfig: re-run savedefconfig on multi_v* configs This is mostly to reorder the entries as they've moved in the Kconfig hierarchies. Doing this periodically (but not very often) simplifies conflict resolution for new options, etc. Link: https://lore.kernel.org/r/20191205211438.27552-2-olof@lixom.net Signed-off-by: Olof Johansson commit f693ff65c36e07a63e31995448d3ce0579048fda Author: Olof Johansson Date: Thu Dec 5 13:14:38 2019 -0800 arm64: defconfig: re-run savedefconfig This is mostly to reorder the entries as they've moved in the Kconfig hierarchies. Doing this periodically (but not very often) simplifies conflict resolution for new options, etc. Link: https://lore.kernel.org/r/20191205211438.27552-3-olof@lixom.net Signed-off-by: Olof Johansson commit 3f1266ec704d3efcfc8179c71bed9a75963b6344 Merge: a231582359ec ade48088937f Author: Linus Torvalds Date: Thu Dec 5 13:20:11 2019 -0800 Merge tag 'gfs2-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 updates from Andreas Gruenbacher: "Bob's extensive filesystem withdrawal and recovery testing: - don't write log headers after file system withdraw - clean up iopen glock mess in gfs2_create_inode - close timing window with GLF_INVALIDATE_IN_PROGRESS - abort gfs2_freeze if io error is seen - don't loop forever in gfs2_freeze if withdrawn - fix infinite loop in gfs2_ail1_flush on io error - introduce function gfs2_withdrawn - fix glock reference problem in gfs2_trans_remove_revoke Filesystems with a block size smaller than the page size: - fix end-of-file handling in gfs2_page_mkwrite - improve mmap write vs. punch_hole consistency Other: - remove active journal side effect from gfs2_write_log_header - multi-block allocations in gfs2_page_mkwrite Minor cleanups and coding style fixes: - remove duplicate call from gfs2_create_inode - make gfs2_log_shutdown static - make gfs2_fs_parameters static - some whitespace cleanups - removed unnecessary semicolon" * tag 'gfs2-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Don't write log headers after file system withdraw gfs2: Remove duplicate call from gfs2_create_inode gfs2: clean up iopen glock mess in gfs2_create_inode gfs2: Close timing window with GLF_INVALIDATE_IN_PROGRESS gfs2: Abort gfs2_freeze if io error is seen gfs2: Don't loop forever in gfs2_freeze if withdrawn gfs2: fix infinite loop in gfs2_ail1_flush on io error gfs2: Introduce function gfs2_withdrawn gfs2: fix glock reference problem in gfs2_trans_remove_revoke gfs2: make gfs2_log_shutdown static gfs2: Remove active journal side effect from gfs2_write_log_header gfs2: Fix end-of-file handling in gfs2_page_mkwrite gfs2: Multi-block allocations in gfs2_page_mkwrite gfs2: Improve mmap write vs. punch_hole consistency gfs2: make gfs2_fs_parameters static gfs2: Some whitespace cleanups gfs2: removed unnecessary semicolon commit 942e6f8a8314e5550e254519dfba4ccd5170421d Merge: 336bab731be7 b08baef02b26 Author: Olof Johansson Date: Thu Dec 5 13:16:58 2019 -0800 Merge mainline/master into arm/fixes This brings in the mainline tree right after armsoc contents was merged this release cycle, so that we can re-run savedefconfig, etc. Signed-off-by: Olof Johansson commit a231582359ec27e121bf4bb0ab3df8355f919d1d Merge: 7ce4fab81913 82995cc6c5ae Author: Linus Torvalds Date: Thu Dec 5 13:06:51 2019 -0800 Merge tag 'ceph-for-5.5-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "The two highlights are a set of improvements to how rbd read-only mappings are handled and a conversion to the new mount API (slightly complicated by the fact that we had a common option parsing framework that called out into rbd and the filesystem instead of them calling into it). Also included a few scattered fixes and a MAINTAINERS update for rbd, adding Dongsheng as a reviewer" * tag 'ceph-for-5.5-rc1' of git://github.com/ceph/ceph-client: libceph, rbd, ceph: convert to use the new mount API rbd: ask for a weaker incompat mask for read-only mappings rbd: don't query snapshot features rbd: remove snapshot existence validation code rbd: don't establish watch for read-only mappings rbd: don't acquire exclusive lock for read-only mappings rbd: disallow read-write partitions on images mapped read-only rbd: treat images mapped read-only seriously rbd: introduce RBD_DEV_FLAG_READONLY rbd: introduce rbd_is_snap() ceph: don't leave ino field in ceph_mds_request_head uninitialized ceph: tone down loglevel on ceph_mdsc_build_path warning rbd: update MAINTAINERS info ceph: fix geting random mds from mdsmap rbd: fix spelling mistake "requeueing" -> "requeuing" ceph: make several helper accessors take const pointers libceph: drop unnecessary check from dispatch() in mon_client.c commit b7826076d7ae5928fdd2972a6c3e180148fb74c1 Author: Parav Pandit Date: Tue Nov 12 17:06:00 2019 -0600 net/mlx5e: E-switch, Fix Ingress ACL groups in switchdev mode for prio tag In cited commit, when prio tag mode is enabled, FTE creation fails due to missing group with valid match criteria. Hence, (a) create prio tag group metadata_prio_tag_grp when prio tag is enabled with match criteria for vlan push FTE. (b) Rename metadata_grp to metadata_allmatch_grp to reflect its purpose. Also when priority tag is enabled, delete metadata settings after deleting ingress rules, which are using it. Tide up rest of the ingress config code for unnecessary labels. Fixes: 10652f39943e ("net/mlx5: Refactor ingress acl configuration") Signed-off-by: Parav Pandit Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit 3d7cadae51f1b7f28358e36d0a1ce3f0ae2eee60 Author: Aya Levin Date: Sun Dec 1 16:33:55 2019 +0200 net/mlx5e: ethtool, Fix analysis of speed setting When setting speed to 100G via ethtool (AN is set to off), only 25G*4 is configured while the user, who has an advanced HW which supports extended PTYS, expects also 50G*2 to be configured. With this patch, when extended PTYS mode is available, configure PTYS via extended fields. Fixes: 4b95840a6ced ("net/mlx5e: Fix matching of speed to PRM link modes") Signed-off-by: Aya Levin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 6d485e5e555436d2c13accdb10807328c4158a17 Author: Aya Levin Date: Sun Dec 1 14:45:25 2019 +0200 net/mlx5e: Fix translation of link mode into speed Add a missing value in translation of PTYS ext_eth_proto_oper to its corresponding speed. When ext_eth_proto_oper bit 10 is set, ethtool shows unknown speed. With this fix, ethtool shows speed is 100G as expected. Fixes: a08b4ed1373d ("net/mlx5: Add support to ext_* fields introduced in Port Type and Speed register") Signed-off-by: Aya Levin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit eb252c3a24fc5856fa62140c2f8269ddce6ce4e5 Author: Roi Dayan Date: Mon Dec 2 19:19:47 2019 +0200 net/mlx5e: Fix free peer_flow when refcount is 0 It could be neigh update flow took a refcount on peer flow so sometimes we cannot release peer flow even if parent flow is being freed now. Fixes: 5a7e5bcb663d ("net/mlx5e: Extend tc flow struct with reference counter") Signed-off-by: Roi Dayan Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit a23dae79fb6555c808528707c6389345d0b0c189 Author: Roi Dayan Date: Wed Dec 4 11:25:43 2019 +0200 net/mlx5e: Fix freeing flow with kfree() and not kvfree() Flows are allocated with kzalloc() so free with kfree(). Fixes: 04de7dda7394 ("net/mlx5e: Infrastructure for duplicated offloading of TC flows") Signed-off-by: Roi Dayan Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit c431f8597863a91eea6024926e0c1b179cfa4852 Author: Eran Ben Elisha Date: Thu Dec 5 10:30:22 2019 +0200 net/mlx5e: Fix SFF 8472 eeprom length SFF 8472 eeprom length is 512 bytes. Fix module info return value to support 512 bytes read. Fixes: ace329f4ab3b ("net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query") Signed-off-by: Eran Ben Elisha Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed commit 73e6551699a32fac703ceea09214d6580edcf2d5 Author: Huy Nguyen Date: Fri Sep 6 09:28:46 2019 -0500 net/mlx5e: Query global pause state before setting prio2buffer When the user changes prio2buffer mapping while global pause is enabled, mlx5 driver incorrectly sets all active buffers (buffer that has at least one priority mapped) to lossy. Solution: If global pause is enabled, set all the active buffers to lossless in prio2buffer command. Also, add error message when buffer size is not enough to meet xoff threshold. Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration") Signed-off-by: Huy Nguyen Signed-off-by: Saeed Mahameed commit c55d8b108caa2ec1ae8dddd02cb9d3a740f7c838 Author: Eran Ben Elisha Date: Mon Nov 25 12:11:49 2019 +0200 net/mlx5e: Fix TXQ indices to be sequential Cited patch changed (channel index, tc) => (TXQ index) mapping to be a static one, in order to keep indices consistent when changing number of channels or TCs. For 32 channels (OOB) and 8 TCs, real num of TXQs is 256. When reducing the amount of channels to 8, the real num of TXQs will be changed to 64. This indices method is buggy: - Channel #0, TC 3, the TXQ index is 96. - Index 8 is not valid, as there is no such TXQ from driver perspective (As it represents channel #8, TC 0, which is not valid with the above configuration). As part of driver's select queue, it calls netdev_pick_tx which returns an index in the range of real number of TXQs. Depends on the return value, with the examples above, driver could have returned index larger than the real number of tx queues, or crash the kernel as it tries to read invalid address of SQ which was not allocated. Fix that by allocating sequential TXQ indices, and hold a new mapping between (channel index, tc) => (real TXQ index). This mapping will be updated as part of priv channels activation, and is used in mlx5e_select_queue to find the selected queue index. The existing indices mapping (channel_tc2txq) is no longer needed, as it is used only for statistics structures and can be calculated on run time. Delete its definintion and updates. Fixes: 8bfaf07f7806 ("net/mlx5e: Present SW stats when state is not opened") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 7ce4fab8191396a1b8e4bc42d3b90029876b2bcd Merge: 0f137416247f 8d66fcb74884 Author: Linus Torvalds Date: Thu Dec 5 12:44:22 2019 -0800 Merge tag 'fuse-update-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse update from Miklos Szeredi: - Fix a regression introduced in the last release - Fix a number of issues with validating data coming from userspace - Some cleanups in virtiofs * tag 'fuse-update-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix Kconfig indentation fuse: fix leak of fuse_io_priv virtiofs: Use completions while waiting for queue to be drained virtiofs: Do not send forget request "struct list_head" element virtiofs: Use a common function to send forget virtiofs: Fix old-style declaration fuse: verify nlink fuse: verify write return fuse: verify attributes commit 8fdbfe8d1690e8a38d497d83a30607d0d90cc15a Author: Nikos Tsironis Date: Wed Dec 4 16:06:53 2019 +0200 dm clone metadata: Use a two phase commit Split the metadata commit in two parts: 1. dm_clone_metadata_pre_commit(): Prepare the current transaction for committing. After this is called, all subsequent metadata updates, done through either dm_clone_set_region_hydrated() or dm_clone_cond_set_range(), will be part of the next transaction. 2. dm_clone_metadata_commit(): Actually commit the current transaction to disk and start a new transaction. This is required by the following commit. It allows dm-clone to flush the destination device after step (1) to ensure that all freshly hydrated regions, for which we are updating the metadata, are properly written to non-volatile storage and won't be lost in case of a crash. Fixes: 7431b7835f55 ("dm: add clone target") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Nikos Tsironis Signed-off-by: Mike Snitzer commit e6a505f3f9fae572fb3ab3bc486e755ac9cef32c Author: Nikos Tsironis Date: Wed Dec 4 16:06:52 2019 +0200 dm clone metadata: Track exact changes per transaction Extend struct dirty_map with a second bitmap which tracks the exact regions that were hydrated during the current metadata transaction. Moreover, fix __flush_dmap() to only commit the metadata of the regions that were hydrated during the current transaction. This is required by the following commits to fix a data corruption bug. Fixes: 7431b7835f55 ("dm: add clone target") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Nikos Tsironis Signed-off-by: Mike Snitzer commit 474e559567fa631dea8fb8407ab1b6090c903755 Author: Hou Tao Date: Tue Dec 3 19:42:58 2019 +0800 dm btree: increase rebalance threshold in __rebalance2() We got the following warnings from thin_check during thin-pool setup: $ thin_check /dev/vdb examining superblock examining devices tree missing devices: [1, 84] too few entries in btree_node: 41, expected at least 42 (block 138, max_entries = 126) examining mapping tree The phenomenon is the number of entries in one node of details_info tree is less than (max_entries / 3). And it can be easily reproduced by the following procedures: $ new a thin pool $ presume the max entries of details_info tree is 126 $ new 127 thin devices (e.g. 1~127) to make the root node being full and then split $ remove the first 43 (e.g. 1~43) thin devices to make the children reblance repeatedly $ stop the thin pool $ thin_check The root cause is that the B-tree removal procedure in __rebalance2() doesn't guarantee the invariance: the minimal number of entries in non-root node should be >= (max_entries / 3). Simply fix the problem by increasing the rebalance threshold to make sure the number of entries in each child will be greater than or equal to (max_entries / 3 + 1), so no matter which child is used for removal, the number will still be valid. Cc: stable@vger.kernel.org Signed-off-by: Hou Tao Acked-by: Joe Thornber Signed-off-by: Mike Snitzer commit 0f137416247fe92c0779a9ab49e912a7006869e8 Merge: 25cfb0c7de3f 5d603311615f Author: Linus Torvalds Date: Thu Dec 5 12:27:16 2019 -0800 Merge tag 'modules-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull modules updates from Jessica Yu: "Summary of modules changes for the 5.5 merge window: - Refactor include/linux/export.h and remove code duplication between EXPORT_SYMBOL and EXPORT_SYMBOL_NS to make it more readable. The most notable change is that no namespace is represented by an empty string "" rather than NULL. - Fix a module load/unload race where waiter(s) trying to load the same module weren't being woken up when a module finally goes away" * tag 'modules-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: kernel/module.c: wakeup processes in module_wq on module unload moduleparam: fix parameter description mismatch export: avoid code duplication in include/linux/export.h commit b87440526324d253a9dc4c043d84d7c1b4df0614 Merge: a350d2e7adbb f9e50b02a99c Author: David S. Miller Date: Thu Dec 5 12:25:05 2019 -0800 Merge branch 's390-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2019-12-05 please apply the following fixes to your net tree. The first two patches target the RX data path, the third fixes a memory leak when shutting down a qeth device. ==================== Signed-off-by: David S. Miller commit f9e50b02a99c3ebbaa30690e8d5be28a5c2624eb Author: Julian Wiedmann Date: Thu Dec 5 14:33:04 2019 +0100 s390/qeth: fix dangling IO buffers after halt/clear The cio layer's intparm logic does not align itself well with how qeth manages cmd IOs. When an active IO gets terminated via halt/clear, the corresponding IRQ's intparm does not reflect the cmd buffer but rather the intparm that was passed to ccw_device_halt() / ccw_device_clear(). This behaviour was recently clarified in commit b91d9e67e50b ("s390/cio: fix intparm documentation"). As a result, qeth_irq() currently doesn't cancel a cmd that was terminated via halt/clear. This primarily causes us to leak card->read_cmd after the qeth device is removed, since our IO path still holds a refcount for this cmd. For qeth this means that we need to keep track of which IO is pending on a device ('active_cmd'), and use this as the intparm when calling halt/clear. Otherwise qeth_irq() can't match the subsequent IRQ to its cmd buffer. Since we now keep track of the _expected_ intparm, we can also detect any mismatch; this would constitute a bug somewhere in the lower layers. In this case cancel the active cmd - we effectively "lost" the IRQ and should not expect any further notification for this IO. Fixes: 405548959cc7 ("s390/qeth: add support for dynamically allocated cmds") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit f677fcb9aeb60c523ee36c1061ef2249b558d1b5 Author: Julian Wiedmann Date: Thu Dec 5 14:33:03 2019 +0100 s390/qeth: ensure linear access to packet headers When the RX path builds non-linear skbs, the packet headers can currently spill over into page fragments. Depending on the packet type and what fields we need to access in the headers, this could cause us to go past the end of skb->data. So for non-linear packets, copy precisely the length of the necessary headers ('linear_len') into skb->data. And don't copy more, upper-level protocols will peel whatever additional packet headers they need. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 5b55633f20ee1bb253dc7d915ec2fd35fd865d5a Author: Julian Wiedmann Date: Thu Dec 5 14:33:02 2019 +0100 s390/qeth: guard against runt packets Depending on a packet's type, the RX path needs to access fields in the packet headers and thus requires a minimum packet length. Enforce this length when building the skb. On the other hand a single runt packet is no reason to drop the whole RX buffer. So just skip it, and continue processing on the next packet. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 25cfb0c7de3f14e283a43dcd6de903657f9f98c7 Merge: b08baef02b26 3ad3cbe305b5 Author: Linus Torvalds Date: Thu Dec 5 12:20:42 2019 -0800 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu update from Greg Ungerer: "Only a single change, to enable coldfire preemption entry code for all preemption types" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k/coldfire: Use CONFIG_PREEMPTION commit b08baef02b26cf7c2123e4a24a2fa1fb7a593ffb Merge: eb275167d186 a235f803dbc8 Author: Linus Torvalds Date: Thu Dec 5 12:14:19 2019 -0800 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: (36 commits) ARM: config: multi_v5: ASPEED SDHCI, SGPIO ARM: configs: multi_v7: ASPEED network, gpio, FSI ARM: config: aspeed-g4: Add MMC, and cleanup ARM: config: aspeed-g5: Add SGPIO and FSI drivers ARM: config: aspeed-g5: Enable 8250_DW quirks arm64: defconfig: Change CONFIG_AT803X_PHY from m to y ARM: shmobile: defconfig: Refresh for v5.4-rc1 arm64: defconfig: Enable R8A77961 SoC ARM: configs: sunxi: Enable MICREL_PHY arm64: defconfig: add new Allwinner crypto options ARM: configs: sunxi: add new Allwinner crypto options ARM: tegra: Enable Tegra VDE driver in tegra_defconfig ARM: imx_v6_v7_defconfig: Enable CONFIG_TOUCHSCREEN_DA9052 arm64: defconfig: Enable configs for S32V234 arm64: defconfig: Enable CONFIG_KEYBOARD_IMX_SC_KEY as module arm64: defconfig: Enable SMMU v3 PMCG arm64: defconfig: Enable HiSilicon ZIP controller arm64: defconfig: enable Altera GPIO controller ARM: multi_v7_defconfig: Enable audio support for stm32mp157 arm64: defconfig: enable rsu driver ... commit a350d2e7adbb57181d33e3aa6f0565632747feaa Author: Mian Yousaf Kaukab Date: Thu Dec 5 10:41:16 2019 +0100 net: thunderx: start phy before starting autonegotiation Since commit 2b3e88ea6528 ("net: phy: improve phy state checking") phy_start_aneg() expects phy state to be >= PHY_UP. Call phy_start() before calling phy_start_aneg() during probe so that autonegotiation is initiated. As phy_start() takes care of calling phy_start_aneg(), drop the explicit call to phy_start_aneg(). Network fails without this patch on Octeon TX. Fixes: 2b3e88ea6528 ("net: phy: improve phy state checking") Signed-off-by: Mian Yousaf Kaukab Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit eb275167d18684e07ee43bdc0e09a18326540461 Merge: ec939e4c94bd 5f1f15283419 Author: Linus Torvalds Date: Thu Dec 5 12:09:47 2019 -0800 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM Device-tree updates from Olof Johansson: "As always, the bulk of updates. Some of the news this cycle: New SoC descriptions: - Broadcom BCM2711 - Amlogic Meson A1 and G12 - Freescale S32V234 - Marvell Armada AP807/AP807-quad and CP115 - Realtek RTD1293 and RTD1296 - Rockchip RK3308 New boards and platforms: - Allwinner: NanoPi Duo2 - Amlogic: Ugoos am6 - Atmel at91: Overkiz Kizbox2/4 - Broadcom: RPi4, Luxul XWC-2000 - Marvell: New Espressobin flavor - NXP: i.MX8MN LPDDR4 EVK, i.MX8QXP Colibri, S32V234 EVB, Netronix E60K02 and Kobo Clara HD, Kontron N6311 and N6411, OPOS6UL and OPOS6ULDev - Renesas: Salvator-XS - Rockchip: Beelink A1 (rk3308), rk3308 eval boards, rk3399-roc-pc" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (653 commits) ARM: dts: logicpd-torpedo: Disable USB Host arm: dts: mt6323: add keys, power-controller, rtc and codec arm64: dts: mt8183: add systimer0 device node dt-bindings: mediatek: update bindings for MT8183 systimer arm64: dts: rockchip: fix sdmmc detection on boot on rk3328-roc-cc arm64: dts: rockchip: Split rk3399-roc-pc for with and without mezzanine board. arm64: dts: rockchip: Add Beelink A1 dt-bindings: ARM: rockchip: Add Beelink A1 arm64: dts: rockchip: Add RK3328 audio pipelines arm64: dts: ti: k3-j721e-common-proc-board: Add USB ports arm64: dts: ti: k3-j721e-main: add USB controller nodes ARM: dts: aspeed-g6: Add timer description ARM: dts: aspeed: ast2600evb: Enable i2c buses ARM: dts: at91: add a dts and dtsi file for kizbox2 based boards dt-bindings: arm: at91: Document Kizbox2-2 board binding arm64: dts: meson-gx: fix i2c compatible arm64: dts: meson-gx: cec node should be disabled by default arm64: dts: meson-g12b-odroid-n2: add missing amlogic, s922x compatible arm64: dts: meson-gxm: fix gpu irq order arm64: dts: meson-g12a: fix gpu irq order ... commit df95467b6d2bfce49667ee4b71c67249b01957f7 Author: Taehee Yoo Date: Thu Dec 5 07:23:39 2019 +0000 hsr: fix a NULL pointer dereference in hsr_dev_xmit() hsr_dev_xmit() calls hsr_port_get_hsr() to find master node and that would return NULL if master node is not existing in the list. But hsr_dev_xmit() doesn't check return pointer so a NULL dereference could occur. Test commands: ip netns add nst ip link add veth0 type veth peer name veth1 ip link add veth2 type veth peer name veth3 ip link set veth1 netns nst ip link set veth3 netns nst ip link set veth0 up ip link set veth2 up ip link add hsr0 type hsr slave1 veth0 slave2 veth2 ip a a 192.168.100.1/24 dev hsr0 ip link set hsr0 up ip netns exec nst ip link set veth1 up ip netns exec nst ip link set veth3 up ip netns exec nst ip link add hsr1 type hsr slave1 veth1 slave2 veth3 ip netns exec nst ip a a 192.168.100.2/24 dev hsr1 ip netns exec nst ip link set hsr1 up hping3 192.168.100.2 -2 --flood & modprobe -rv hsr Splat looks like: [ 217.351122][ T1635] kasan: CONFIG_KASAN_INLINE enabled [ 217.352969][ T1635] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 217.354297][ T1635] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 217.355507][ T1635] CPU: 1 PID: 1635 Comm: hping3 Not tainted 5.4.0+ #192 [ 217.356472][ T1635] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 217.357804][ T1635] RIP: 0010:hsr_dev_xmit+0x34/0x90 [hsr] [ 217.373010][ T1635] Code: 48 8d be 00 0c 00 00 be 04 00 00 00 48 83 ec 08 e8 21 be ff ff 48 8d 78 10 48 ba 00 b [ 217.376919][ T1635] RSP: 0018:ffff8880cd8af058 EFLAGS: 00010202 [ 217.377571][ T1635] RAX: 0000000000000000 RBX: ffff8880acde6840 RCX: 0000000000000002 [ 217.379465][ T1635] RDX: dffffc0000000000 RSI: 0000000000000004 RDI: 0000000000000010 [ 217.380274][ T1635] RBP: ffff8880acde6840 R08: ffffed101b440d5d R09: 0000000000000001 [ 217.381078][ T1635] R10: 0000000000000001 R11: ffffed101b440d5c R12: ffff8880bffcc000 [ 217.382023][ T1635] R13: ffff8880bffcc088 R14: 0000000000000000 R15: ffff8880ca675c00 [ 217.383094][ T1635] FS: 00007f060d9d1740(0000) GS:ffff8880da000000(0000) knlGS:0000000000000000 [ 217.384289][ T1635] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 217.385009][ T1635] CR2: 00007faf15381dd0 CR3: 00000000d523c001 CR4: 00000000000606e0 [ 217.385940][ T1635] Call Trace: [ 217.386544][ T1635] dev_hard_start_xmit+0x160/0x740 [ 217.387114][ T1635] __dev_queue_xmit+0x1961/0x2e10 [ 217.388118][ T1635] ? check_object+0xaf/0x260 [ 217.391466][ T1635] ? __alloc_skb+0xb9/0x500 [ 217.392017][ T1635] ? init_object+0x6b/0x80 [ 217.392629][ T1635] ? netdev_core_pick_tx+0x2e0/0x2e0 [ 217.393175][ T1635] ? __alloc_skb+0xb9/0x500 [ 217.393727][ T1635] ? rcu_read_lock_sched_held+0x90/0xc0 [ 217.394331][ T1635] ? rcu_read_lock_bh_held+0xa0/0xa0 [ 217.395013][ T1635] ? kasan_unpoison_shadow+0x30/0x40 [ 217.395668][ T1635] ? __kasan_kmalloc.constprop.4+0xa0/0xd0 [ 217.396280][ T1635] ? __kmalloc_node_track_caller+0x3a8/0x3f0 [ 217.399007][ T1635] ? __kasan_kmalloc.constprop.4+0xa0/0xd0 [ 217.400093][ T1635] ? __kmalloc_reserve.isra.46+0x2e/0xb0 [ 217.401118][ T1635] ? memset+0x1f/0x40 [ 217.402529][ T1635] ? __alloc_skb+0x317/0x500 [ 217.404915][ T1635] ? arp_xmit+0xca/0x2c0 [ ... ] Fixes: 311633b60406 ("hsr: switch ->dellink() to ->ndo_uninit()") Acked-by: Cong Wang Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit ec939e4c94bd3ef2fd4f34c15f8aaf79bd0c5ee1 Merge: 38206c24ab09 3f6939aec712 Author: Linus Torvalds Date: Thu Dec 5 11:43:31 2019 -0800 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Olof Johansson: "Various driver updates for platforms: - A larger set of work on Tegra 2/3 around memory controller and regulator features, some fuse cleanups, etc.. - MMP platform drivers, in particular for USB PHY, and other smaller additions. - Samsung Exynos 5422 driver for DMC (dynamic memory configuration), and ASV (adaptive voltage), allowing the platform to run at more optimal operating points. - Misc refactorings and support for RZ/G2N and R8A774B1 from Renesas - Clock/reset control driver for TI/OMAP - Meson-A1 reset controller support - Qualcomm sdm845 and sda845 SoC IDs for socinfo" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (150 commits) firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT soc: fsl: add RCPM driver dt-bindings: fsl: rcpm: Add 'little-endian' and update Chassis definition memory: tegra: Consolidate registers definition into common header memory: tegra: Ensure timing control debug features are disabled memory: tegra: Introduce Tegra30 EMC driver memory: tegra: Do not handle error from wait_for_completion_timeout() memory: tegra: Increase handshake timeout on Tegra20 memory: tegra: Print a brief info message about EMC timings memory: tegra: Pre-configure debug register on Tegra20 memory: tegra: Include io.h instead of iopoll.h memory: tegra: Adapt for Tegra20 clock driver changes memory: tegra: Don't set EMC rate to maximum on probe for Tegra20 memory: tegra: Add gr2d and gr3d to DRM IOMMU group memory: tegra: Set DMA mask based on supported address bits soc: at91: Add Atmel SFR SN (Serial Number) support memory: atmel-ebi: switch to SPDX license identifiers memory: atmel-ebi: move NUM_CS definition inside EBI driver soc: mediatek: Refactor bus protection control soc: mediatek: Refactor sram control ... commit 38206c24ab09b4f4c2a57de5c1af0bb2e69cf5b6 Merge: d9e48dc2a71a ab818f0999dc Author: Linus Torvalds Date: Thu Dec 5 11:38:40 2019 -0800 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC platform updates from Olof Johansson: "Most of these are for MMP (seeing a bunch of cleanups and refactorings for the first time in a while), and for OMAP (a bunch of cleanups and added support for voltage controller on OMAP4430)" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (51 commits) ARM: OMAP2+: Add missing put_device() call in omapdss_init_of() OMAP2: fixup doc comments in omap_device ARM: OMAP1: drop duplicated dependency on ARCH_OMAP1 ARM: ASPEED: update default ARCH_NR_GPIO for ARCH_ASPEED ARM: imx: use generic function to exit coherency ARM: tegra: Use WFE for power-gating on Tegra30 ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume() ARM: exynos: Enable exynos-asv driver for ARCH_EXYNOS ARM: s3c: Rename s5p_usb_phy functions ARM: s3c: Rename s3c64xx_spi_setname() function ARM: imx: Add serial number support for i.MX6/7 SoCs ARM: imx: Drop imx_anatop_usb_chrg_detect_disable() arm64: Introduce config for S32 ARM: hisi: drop useless depend on ARCH_MULTI_V7 arm64: realtek: Select reset controller ARM: shmobile: rcar-gen2: Drop legacy DT clock support ARM: OMAP2+: Remove duplicated include from pmic-cpcap.c ARM: OMAP1: ams-delta FIQ: Fix a typo ("Initiaize") MAINTAINERS: Add logicpd-som-lv and logicpd-torpedo to OMAP TREE ARM: OMAP2+: pdata-quirks: drop TI_ST/KIM support ... commit d9e48dc2a71a836f17d1febbedb31470f957edb4 Merge: fb3da48a8640 9e1b4999a169 Author: Linus Torvalds Date: Thu Dec 5 11:28:14 2019 -0800 Merge tag 'pwm/for-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "Various changes and minor fixes across a couple of drivers" * tag 'pwm/for-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: stm32: Pass breakinput instead of its values pwm: stm32: Remove clutter from ternary operator pwm: stm32: Validate breakinput data from DT pwm: Update comment on struct pwm_ops::apply pwm: sun4i: Fix incorrect calculation of duty_cycle/period pwm: stm32: Add power management support pwm: stm32: Split breakinput apply routine to ease PM support dt-bindings: pwm-stm32: Document pinctrl sleep state pwm: sun4i: Drop redundant assignment to variable pval dt-bindings: pwm: mediatek: Remove gratuitous compatible string for MT7629 commit fb3da48a8640f634242a0c61b78c3a5c724c5004 Merge: 5ecc9d15f73b 163b00cde7cf Author: Linus Torvalds Date: Thu Dec 5 11:21:24 2019 -0800 Merge branch 'thermal/next' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal management updates from Zhang Rui: - Fix a deadlock regression in thermal core framework, which was introduced in 5.3 (Wei Wang) - Initialize thermal control framework earlier to enable thermal mitigation during boot (Amit Kucheria) - Convert the Intelligent Power Allocator (IPA) thermal governor to follow the generic PM_EM instead of its own Energy Model (Quentin Perret) - Introduce a new Amlogic soc thermal driver (Guillaume La Roque) - Add interrupt support for tsens thermal driver (Amit Kucheria) - Add support for MSM8956/8976 in tsens thermal driver (AngeloGioacchino Del Regno) - Add support for r8a774b1 in rcar thermal driver (Biju Das) - Add support for Thermal Monitor Unit v2 in qoriq thermal driver (Yuantian Tang) - Some other fixes/cleanups on thermal core framework and soc thermal drivers (Colin Ian King, Daniel Lezcano, Hsin-Yi Wang, Tian Tao) * 'thermal/next' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (32 commits) thermal: Fix deadlock in thermal thermal_zone_device_check thermal: cpu_cooling: Migrate to using the EM framework thermal: cpu_cooling: Make the power-related code depend on IPA PM / EM: Declare EM data types unconditionally arm64: defconfig: Enable CONFIG_ENERGY_MODEL drivers: thermal: tsens: fix potential integer overflow on multiply thermal: cpu_cooling: Reorder the header file thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF thermal: no need to set .owner when using module_platform_driver thermal: qcom: tsens-v1: Fix kfree of a non-pointer value cpufreq: qcom-hw: Move driver initialization earlier clk: qcom: Initialize clock drivers earlier cpufreq: Initialize cpufreq-dt driver earlier cpufreq: Initialize the governors in core_initcall thermal: Initialize thermal subsystem earlier thermal: Remove netlink support dt: thermal: tsens: Document compatible for MSM8976/56 thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976 MAINTAINERS: add entry for Amlogic Thermal driver thermal: amlogic: Add thermal driver to support G12 SoCs ... commit ece841abbed2da71fa10710c687c9ce9efb6bf69 Author: Justin Tee Date: Thu Dec 5 10:09:01 2019 +0800 block: fix memleak of bio integrity data 7c20f11680a4 ("bio-integrity: stop abusing bi_end_io") moves bio_integrity_free from bio_uninit() to bio_integrity_verify_fn() and bio_endio(). This way looks wrong because bio may be freed without calling bio_endio(), for example, blk_rq_unprep_clone() is called from dm_mq_queue_rq() when the underlying queue of dm-mpath is busy. So memory leak of bio integrity data is caused by commit 7c20f11680a4. Fixes this issue by re-adding bio_integrity_free() to bio_uninit(). Fixes: 7c20f11680a4 ("bio-integrity: stop abusing bi_end_io") Reviewed-by: Christoph Hellwig Signed-off-by Justin Tee Add commit log, and simplify/fix the original patch wroten by Justin. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 336bab731be76a90291697e51d2aed0ad67d7cb5 Author: Linus Walleij Date: Tue Dec 3 11:41:17 2019 +0100 ARM: pxa: Fix resource properties The conversion to properties changed one assignment and missed three other assignments in the same file, fix it up so the platform compiles. The bug was reported by a few build bots but noone noticed. I noticed it when making other changes to the PXA platforms. Link: https://lore.kernel.org/r/20191203104117.85517-1-linus.walleij@linaro.org Cc: Andy Shevchenko Fixes: 50ec88120ea1 ("can: mcp251x: get rid of legacy platform data") Signed-off-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Olof Johansson commit 3c25ce694a1fbdb5b498fc8a6491074f48b47328 Merge: 563b75d74993 8305e90a894f Author: Olof Johansson Date: Thu Dec 5 10:11:49 2019 -0800 Merge tag 'scmi-fix-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes ARM SCMI fix for v5.5 Yet another single fix to avoid double freeing in scmi_device_create error path * tag 'scmi-fix-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Avoid double free in error flow firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT Link: https://lore.kernel.org/r/20191202114559.GB20965@bogus Signed-off-by: Olof Johansson commit 563b75d7499308bfb44eaca64fd9ddcc073adb75 Merge: 680fb08720df 54fb3fe0f211 Author: Olof Johansson Date: Thu Dec 5 10:11:37 2019 -0800 Merge tag 'juno-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes ARMv8 Juno fixes for v5.5 Couple of fixes: 1. Fix for UART clock frequency on all Juno variants that exist since the platform was added. This is mainly due to incorrect Juno SoC TRM that was referred during initial development days 2. Drop "dma-ranges" property for now as they are triggering loads of warning on boot * tag 'juno-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: Revert "arm64: dts: juno: add dma-ranges property" arm64: dts: juno: Fix UART frequency arm64: dts: juno: add GPU subsystem Link: https://lore.kernel.org/r/20191202114338.GA20965@bogus Signed-off-by: Olof Johansson commit 680fb08720dfd1750ba5c7b76f1e3129c99af8e5 Merge: 47b6b604b2bf 6859ad379439 Author: Olof Johansson Date: Thu Dec 5 10:11:15 2019 -0800 Merge tag 'arm-soc/for-5.5/maintainers-part2' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains MAINTAINERS file updates for Broadcom SoCs, please pull the following: - Stefan and Eric step down from doing BCM283x maintenance and Nicolas replaces them both moving forward * tag 'arm-soc/for-5.5/maintainers-part2' of https://github.com/Broadcom/stblinux: MAINTAINERS: Make Nicolas Saenz Julienne the new bcm2835 maintainer Link: https://lore.kernel.org/r/20191127191932.9711-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 47b6b604b2bf396e110e7c2e074fef459bf07b4f Author: Bibby Hsieh Date: Wed Nov 27 17:54:28 2019 +0100 soc: mediatek: cmdq: fixup wrong input order of write api Fixup a issue was caused by the previous fixup patch. Fixes: 1a92f989126e ("soc: mediatek: cmdq: reorder the parameter") Link: https://lore.kernel.org/r/20191127165428.19662-1-matthias.bgg@gmail.com Cc: Signed-off-by: Bibby Hsieh Reviewed-by: CK Hu Signed-off-by: Matthias Brugger Signed-off-by: Olof Johansson commit a4e55ccd4392e70f296d12e81b93c6ca96ee21d5 Author: Luc Van Oostenryck Date: Thu Nov 21 15:48:51 2019 +1030 soc: aspeed: Fix snoop_file_poll()'s return type snoop_file_poll() is defined as returning 'unsigned int' but the .poll method is declared as returning '__poll_t', a bitwise type. Fix this by using the proper return type and using the EPOLL constants instead of the POLL ones, as required for __poll_t. Link: https://lore.kernel.org/r/20191121051851.268726-1-joel@jms.id.au Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev") Signed-off-by: Luc Van Oostenryck Reviewed-by: Joel Stanley Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley Signed-off-by: Olof Johansson commit 17746b7af95ead9c4718eda4a441955a92eae97e Author: Robert Richter Date: Tue Nov 19 19:05:01 2019 +0000 MAINTAINERS: Switch to Marvell addresses Switch all addresses from @cavium.com to @marvell.com. On that occasion, switch also to my Marvell address for all my Cavium/Marvell entries. Link: https://lore.kernel.org/r/20191119190436.17875-3-rrichter@marvell.com Cc: Sunil Goutham Cc: George Cherian Cc: soc@kernel.org Signed-off-by: Robert Richter Signed-off-by: Olof Johansson commit c3c60656b0a39535d75f81275f3b8eb5436bdd95 Author: Jan Glauber Date: Tue Nov 19 19:04:59 2019 +0000 MAINTAINERS: update Cavium ThunderX drivers Remove my maintainer entries for ThunderX drivers as I'm moving on and won't have access to ThunderX hardware anymore and add Robert. Also remove the obsolete addresses of David Daney and Steven Hill. Add an entry to .mailmap for my various email addresses. Link: https://lore.kernel.org/r/20191119190436.17875-2-rrichter@marvell.com Cc: Ganapatrao Prabhakerrao Kulkarni Cc: soc@kernel.org Signed-off-by: Jan Glauber Signed-off-by: Robert Richter Signed-off-by: Olof Johansson commit 5ecc9d15f73b82c748526350d5602c94fdd65cac Merge: 2f13437b8917 f949286c668a Author: Linus Torvalds Date: Thu Dec 5 09:46:26 2019 -0800 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: "Most of the rest of MM and various other things. Some Kconfig rework still awaits merges of dependent trees from linux-next. Subsystems affected by this patch series: mm/hotfixes, mm/memcg, mm/vmstat, mm/thp, procfs, sysctl, misc, notifiers, core-kernel, bitops, lib, checkpatch, epoll, binfmt, init, rapidio, uaccess, kcov, ubsan, ipc, bitmap, mm/pagemap" * akpm: (86 commits) mm: remove __ARCH_HAS_4LEVEL_HACK and include/asm-generic/4level-fixup.h um: add support for folded p4d page tables um: remove unused pxx_offset_proc() and addr_pte() functions sparc32: use pgtable-nopud instead of 4level-fixup parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup parisc: use pgtable-nopXd instead of 4level-fixup nds32: use pgtable-nopmd instead of 4level-fixup microblaze: use pgtable-nopmd instead of 4level-fixup m68k: mm: use pgtable-nopXd instead of 4level-fixup m68k: nommu: use pgtable-nopud instead of 4level-fixup c6x: use pgtable-nopud instead of 4level-fixup arm: nommu: use pgtable-nopud instead of 4level-fixup alpha: use pgtable-nopud instead of 4level-fixup gpio: pca953x: tighten up indentation gpio: pca953x: convert to use bitmap API gpio: pca953x: use input from regs structure in pca953x_irq_pending() gpio: pca953x: remove redundant variable and check in IRQ handler lib/bitmap: introduce bitmap_replace() helper lib/test_bitmap: fix comment about this file lib/test_bitmap: move exp1 and exp2 upper for others to use ... commit c275779ff2dd51c96eaae04fac5d766421d6c596 Author: Zorro Lang Date: Wed Dec 4 22:59:02 2019 -0800 iomap: stop using ioend after it's been freed in iomap_finish_ioend() This patch fixes the following KASAN report. The @ioend has been freed by dio_put(), but the iomap_finish_ioend() still trys to access its data. [20563.631624] BUG: KASAN: use-after-free in iomap_finish_ioend+0x58c/0x5c0 [20563.638319] Read of size 8 at addr fffffc0c54a36928 by task kworker/123:2/22184 [20563.647107] CPU: 123 PID: 22184 Comm: kworker/123:2 Not tainted 5.4.0+ #1 [20563.653887] Hardware name: HPE Apollo 70 /C01_APACHE_MB , BIOS L50_5.13_1.11 06/18/2019 [20563.664499] Workqueue: xfs-conv/sda5 xfs_end_io [xfs] [20563.669547] Call trace: [20563.671993] dump_backtrace+0x0/0x370 [20563.675648] show_stack+0x1c/0x28 [20563.678958] dump_stack+0x138/0x1b0 [20563.682455] print_address_description.isra.9+0x60/0x378 [20563.687759] __kasan_report+0x1a4/0x2a8 [20563.691587] kasan_report+0xc/0x18 [20563.694985] __asan_report_load8_noabort+0x18/0x20 [20563.699769] iomap_finish_ioend+0x58c/0x5c0 [20563.703944] iomap_finish_ioends+0x110/0x270 [20563.708396] xfs_end_ioend+0x168/0x598 [xfs] [20563.712823] xfs_end_io+0x1e0/0x2d0 [xfs] [20563.716834] process_one_work+0x7f0/0x1ac8 [20563.720922] worker_thread+0x334/0xae0 [20563.724664] kthread+0x2c4/0x348 [20563.727889] ret_from_fork+0x10/0x18 [20563.732941] Allocated by task 83403: [20563.736512] save_stack+0x24/0xb0 [20563.739820] __kasan_kmalloc.isra.9+0xc4/0xe0 [20563.744169] kasan_slab_alloc+0x14/0x20 [20563.747998] slab_post_alloc_hook+0x50/0xa8 [20563.752173] kmem_cache_alloc+0x154/0x330 [20563.756185] mempool_alloc_slab+0x20/0x28 [20563.760186] mempool_alloc+0xf4/0x2a8 [20563.763845] bio_alloc_bioset+0x2d0/0x448 [20563.767849] iomap_writepage_map+0x4b8/0x1740 [20563.772198] iomap_do_writepage+0x200/0x8d0 [20563.776380] write_cache_pages+0x8a4/0xed8 [20563.780469] iomap_writepages+0x4c/0xb0 [20563.784463] xfs_vm_writepages+0xf8/0x148 [xfs] [20563.788989] do_writepages+0xc8/0x218 [20563.792658] __writeback_single_inode+0x168/0x18f8 [20563.797441] writeback_sb_inodes+0x370/0xd30 [20563.801703] wb_writeback+0x2d4/0x1270 [20563.805446] wb_workfn+0x344/0x1178 [20563.808928] process_one_work+0x7f0/0x1ac8 [20563.813016] worker_thread+0x334/0xae0 [20563.816757] kthread+0x2c4/0x348 [20563.819979] ret_from_fork+0x10/0x18 [20563.825028] Freed by task 22184: [20563.828251] save_stack+0x24/0xb0 [20563.831559] __kasan_slab_free+0x10c/0x180 [20563.835648] kasan_slab_free+0x10/0x18 [20563.839389] slab_free_freelist_hook+0xb4/0x1c0 [20563.843912] kmem_cache_free+0x8c/0x3e8 [20563.847745] mempool_free_slab+0x20/0x28 [20563.851660] mempool_free+0xd4/0x2f8 [20563.855231] bio_free+0x33c/0x518 [20563.858537] bio_put+0xb8/0x100 [20563.861672] iomap_finish_ioend+0x168/0x5c0 [20563.865847] iomap_finish_ioends+0x110/0x270 [20563.870328] xfs_end_ioend+0x168/0x598 [xfs] [20563.874751] xfs_end_io+0x1e0/0x2d0 [xfs] [20563.878755] process_one_work+0x7f0/0x1ac8 [20563.882844] worker_thread+0x334/0xae0 [20563.886584] kthread+0x2c4/0x348 [20563.889804] ret_from_fork+0x10/0x18 [20563.894855] The buggy address belongs to the object at fffffc0c54a36900 which belongs to the cache bio-1 of size 248 [20563.906844] The buggy address is located 40 bytes inside of 248-byte region [fffffc0c54a36900, fffffc0c54a369f8) [20563.918485] The buggy address belongs to the page: [20563.923269] page:ffffffff82f528c0 refcount:1 mapcount:0 mapping:fffffc8e4ba31900 index:0xfffffc0c54a33300 [20563.932832] raw: 17ffff8000000200 ffffffffa3060100 0000000700000007 fffffc8e4ba31900 [20563.940567] raw: fffffc0c54a33300 0000000080aa0042 00000001ffffffff 0000000000000000 [20563.948300] page dumped because: kasan: bad access detected [20563.955345] Memory state around the buggy address: [20563.960129] fffffc0c54a36800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc [20563.967342] fffffc0c54a36880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [20563.974554] >fffffc0c54a36900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [20563.981766] ^ [20563.986288] fffffc0c54a36980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc [20563.993501] fffffc0c54a36a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [20564.000713] ================================================================== Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205703 Signed-off-by: Zorro Lang Fixes: 9cd0ed63ca514 ("iomap: enhance writeback error message") Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 0b4295b5e2b9b42f3f3096496fe4775b656c9ba6 Author: LimingWu <19092205@suning.com> Date: Thu Dec 5 20:18:18 2019 +0800 io_uring: fix a typo in a comment thatn -> than. Signed-off-by: Liming Wu <19092205@suning.com> Signed-off-by: Jens Axboe commit 08802ed665e47243393f43501bdafa032112eb1c Author: Hou Tao Date: Thu Dec 5 20:53:11 2019 +0800 bfq-iosched: Ensure bio->bi_blkg is valid before using it bio->bi_blkg will be NULL when the issue of the request has bypassed the block layer as shown in the following oops: Internal error: Oops: 96000005 [#1] SMP CPU: 17 PID: 2996 Comm: scsi_id Not tainted 5.4.0 #4 Call trace: percpu_counter_add_batch+0x38/0x4c8 bfqg_stats_update_legacy_io+0x9c/0x280 bfq_insert_requests+0xbac/0x2190 blk_mq_sched_insert_request+0x288/0x670 blk_execute_rq_nowait+0x140/0x178 blk_execute_rq+0x8c/0x140 sg_io+0x604/0x9c0 scsi_cmd_ioctl+0xe38/0x10a8 scsi_cmd_blk_ioctl+0xac/0xe8 sd_ioctl+0xe4/0x238 blkdev_ioctl+0x590/0x20e0 block_ioctl+0x60/0x98 do_vfs_ioctl+0xe0/0x1b58 ksys_ioctl+0x80/0xd8 __arm64_sys_ioctl+0x40/0x78 el0_svc_handler+0xc4/0x270 so ensure its validity before using it. Fixes: fd41e60331b1 ("bfq-iosched: stop using blkg->stat_bytes and ->stat_ios") Signed-off-by: Hou Tao Signed-off-by: Jens Axboe commit 4493233edcfc0ad0a7f76f1c83f95b1bcf280547 Author: Pavel Begunkov Date: Thu Dec 5 16:16:35 2019 +0300 io_uring: hook all linked requests via link_list Links are created by chaining requests through req->list with an exception that head uses req->link_list. (e.g. link_list->list->list) Because of that, io_req_link_next() needs complex splicing to advance. Link them all through list_list. Also, it seems to be simpler and more consistent IMHO. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2e6e1fde32d7d41cf076c21060c329d3fdbce25c Author: Pavel Begunkov Date: Thu Dec 5 16:15:45 2019 +0300 io_uring: fix error handling in io_queue_link_head In case of an error io_submit_sqe() drops a request and continues without it, even if the request was a part of a link. Not only it doesn't cancel links, but also may execute wrong sequence of actions. Stop consuming sqes, and let the user handle errors. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 249fad734a25889a4f23ed014d43634af6798063 Author: Madhavan Srinivasan Date: Mon Nov 18 09:14:52 2019 +0530 powerpc/perf: Disable trace_imc pmu When a root user or a user with CAP_SYS_ADMIN privilege uses any trace_imc performance monitoring unit events, to monitor application or KVM threads, it may result in a checkstop (System crash). The cause is frequent switching of the "trace/accumulation" mode of the In-Memory Collection hardware (LDBAR). This patch disables the trace_imc PMU unit entirely to avoid triggering the checkstop. A future patch will reenable it at a later stage once a workaround has been developed. Fixes: 012ae244845f ("powerpc/perf: Trace imc PMU functions") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Madhavan Srinivasan Tested-by: Hariharan T.S. [mpe: Add pr_info_once() so dmesg shows the PMU has been disabled] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191118034452.9939-1-maddy@linux.vnet.ibm.com commit 48e626ac85b43cc589dd1b3b8004f7f85f03544d Author: Anju T Sudhakar Date: Wed Nov 27 12:50:35 2019 +0530 powerpc/powernv: Avoid re-registration of imc debugfs directory export_imc_mode_and_cmd() function which creates the debugfs interface for imc-mode and imc-command, is invoked when each nest pmu units is registered. When the first nest pmu unit is registered, export_imc_mode_and_cmd() creates 'imc' directory under `/debug/powerpc/`. In the subsequent invocations debugfs_create_dir() function returns, since the directory already exists. The recent commit (debugfs: make error message a bit more verbose), throws a warning if we try to invoke `debugfs_create_dir()` with an already existing directory name. Address this warning by making the debugfs directory registration in the opal_imc_counters_probe() function, i.e invoke export_imc_mode_and_cmd() function from the probe function. Signed-off-by: Anju T Sudhakar Tested-by: Nageswara R Sastry Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191127072035.4283-1-anju@linux.vnet.ibm.com commit 8f9081c92523328aa569d09051add79a6c0ae9ff Author: Yonghong Song Date: Wed Dec 4 17:06:07 2019 -0800 selftests/bpf: Add a fexit/bpf2bpf test with target bpf prog no callees The existing fexit_bpf2bpf test covers the target progrm with callees. This patch added a test for the target program without callees. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191205010607.177904-1-yhs@fb.com commit e9eeec58c992c47b394e4f829e4f81b923b0a322 Author: Yonghong Song Date: Wed Dec 4 17:06:06 2019 -0800 bpf: Fix a bug when getting subprog 0 jited image in check_attach_btf_id For jited bpf program, if the subprogram count is 1, i.e., there is no callees in the program, prog->aux->func will be NULL and prog->bpf_func points to image address of the program. If there is more than one subprogram, prog->aux->func is populated, and subprogram 0 can be accessed through either prog->bpf_func or prog->aux->func[0]. Other subprograms should be accessed through prog->aux->func[subprog_id]. This patch fixed a bug in check_attach_btf_id(), where prog->aux->func[subprog_id] is used to access any subprogram which caused a segfault like below: [79162.619208] BUG: kernel NULL pointer dereference, address: 0000000000000000 ...... [79162.634255] Call Trace: [79162.634974] ? _cond_resched+0x15/0x30 [79162.635686] ? kmem_cache_alloc_trace+0x162/0x220 [79162.636398] ? selinux_bpf_prog_alloc+0x1f/0x60 [79162.637111] bpf_prog_load+0x3de/0x690 [79162.637809] __do_sys_bpf+0x105/0x1740 [79162.638488] do_syscall_64+0x5b/0x180 [79162.639147] entry_SYSCALL_64_after_hwframe+0x44/0xa9 ...... Fixes: 5b92a28aae4d ("bpf: Support attaching tracing BPF program to other BPF programs") Reported-by: Eelco Chaudron Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191205010606.177774-1-yhs@fb.com commit f949286c668aed5aa24acdb5838be9cfd9513bd3 Author: Mike Rapoport Date: Wed Dec 4 16:54:32 2019 -0800 mm: remove __ARCH_HAS_4LEVEL_HACK and include/asm-generic/4level-fixup.h There are no architectures that use include/asm-generic/4level-fixup.h therefore it can be removed along with __ARCH_HAS_4LEVEL_HACK define. Link: http://lkml.kernel.org/r/1572938135-31886-14-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e19f97ed67d8f9b60e4ce14a7551d3dd45825570 Author: Mike Rapoport Date: Wed Dec 4 16:54:28 2019 -0800 um: add support for folded p4d page tables The UML port uses 4 and 5 level fixups to support higher level page table directories in the generic VM code. Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and drop usage of __ARCH_USE_5LEVEL_HACK. Link: http://lkml.kernel.org/r/1572938135-31886-13-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e65e76f1e588e6f5d263652179d51b31a2be855 Author: Mike Rapoport Date: Wed Dec 4 16:54:24 2019 -0800 um: remove unused pxx_offset_proc() and addr_pte() functions The pxx_offset_proc() and addr_pte() functions are never used. Remove them. Link: http://lkml.kernel.org/r/1572938135-31886-12-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Richard Weinberger Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7235db268a2777bc380b99b7db49ff7b19c8fb76 Author: Mike Rapoport Date: Wed Dec 4 16:54:20 2019 -0800 sparc32: use pgtable-nopud instead of 4level-fixup 32-bit version of sparc has three-level page tables and can use pgtable-nopud and folding of the upper layers. Replace usage of include/asm-generic/4level-fixup.h with include/asm-generic/pgtable-nopud.h and adjust page table manipulation macros and functions accordingly. Link: http://lkml.kernel.org/r/1572938135-31886-11-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: David S. Miller Tested-by: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2fa245c1f8c9f68e26174fade45ccae5b060751d Author: Helge Deller Date: Wed Dec 4 16:54:16 2019 -0800 parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup Link: http://lkml.kernel.org/r/1572938135-31886-10-git-send-email-rppt@kernel.org Signed-off-by: Helge Deller Signed-off-by: Mike Rapoport Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d96885e277b5edcd1e474e8b1579005163f23dbe Author: Mike Rapoport Date: Wed Dec 4 16:54:12 2019 -0800 parisc: use pgtable-nopXd instead of 4level-fixup parisc has two or three levels of page tables and can use appropriate pgtable-nopXd and folding of the upper layers. Replace usage of include/asm-generic/4level-fixup.h and explicit definitions of __PAGETABLE_PxD_FOLDED in parisc with include/asm-generic/pgtable-nopmd.h for two-level configurations and with include/asm-generic/pgtable-nopud.h for three-lelve configurations and adjust page table manipulation macros and functions accordingly. Link: http://lkml.kernel.org/r/1572938135-31886-9-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Helge Deller Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7c2763c42326a071220077513a9cae90db46b818 Author: Mike Rapoport Date: Wed Dec 4 16:54:08 2019 -0800 nds32: use pgtable-nopmd instead of 4level-fixup nds32 has only two-level page tables and can use pgtable-nopmd and folding of the upper layers. Replace usage of include/asm-generic/4level-fixup.h and explicit definition of __PAGETABLE_PMD_FOLDED in nds32 with include/asm-generic/pgtable-nopmd.h and adjust page table manipulation macros and functions accordingly. Link: http://lkml.kernel.org/r/1572938135-31886-8-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ed48e1f812b585e2af5dee6e08712c64d75978e2 Author: Mike Rapoport Date: Wed Dec 4 16:54:03 2019 -0800 microblaze: use pgtable-nopmd instead of 4level-fixup microblaze has only two-level page tables and can use pgtable-nopmd and folding of the upper layers. Replace usage of include/asm-generic/4level-fixup.h and explicit definition of __PAGETABLE_PMD_FOLDED in microblaze with include/asm-generic/pgtable-nopmd.h and adjust page table manipulation macros and functions accordingly. Link: http://lkml.kernel.org/r/1572938135-31886-7-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 60e50f34b13e9e40763be12aa55f2144d8da514c Author: Mike Rapoport Date: Wed Dec 4 16:53:59 2019 -0800 m68k: mm: use pgtable-nopXd instead of 4level-fixup m68k has two or three levels of page tables and can use appropriate pgtable-nopXd and folding of the upper layers. Replace usage of include/asm-generic/4level-fixup.h and explicit definitions of __PAGETABLE_PxD_FOLDED in m68k with include/asm-generic/pgtable-nopmd.h for two-level configurations and with include/asm-generic/pgtable-nopud.h for three-lelve configurations and adjust page table manipulation macros and functions accordingly. [akpm@linux-foundation.org: fix merge glitch] [geert@linux-m68k.org: more merge glitch fixes] [akpm@linux-foundation.org: s/bad_pgd/bad_pud/, per Mike] Link: http://lkml.kernel.org/r/1572938135-31886-6-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Greg Ungerer Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f6f7caeb58532db2e46c40eee2d7e8969d5c707e Author: Mike Rapoport Date: Wed Dec 4 16:53:55 2019 -0800 m68k: nommu: use pgtable-nopud instead of 4level-fixup The generic nommu implementation of page table manipulation takes care of folding of the upper levels and does not require fixups. Simply replace of include/asm-generic/4level-fixup.h with include/asm-generic/pgtable-nopud.h. Link: http://lkml.kernel.org/r/1572938135-31886-5-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Greg Ungerer Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d13252ea800e1f2a39e40c2b8a4397b21a80555d Author: Mike Rapoport Date: Wed Dec 4 16:53:52 2019 -0800 c6x: use pgtable-nopud instead of 4level-fixup c6x is a nommu architecture and does not require fixup for upper layers of the page tables because it is already handled by the generic nommu implementation. Replace usage of include/asm-generic/4level-fixup.h with include/asm-generic/pgtable-nopud.h Link: http://lkml.kernel.org/r/1572938135-31886-4-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa6628230deb3a0d871dc51923531b41dfbef352 Author: Mike Rapoport Date: Wed Dec 4 16:53:48 2019 -0800 arm: nommu: use pgtable-nopud instead of 4level-fixup The generic nommu implementation of page table manipulation takes care of folding of the upper levels and does not require fixups. Simply replace of include/asm-generic/4level-fixup.h with include/asm-generic/pgtable-nopud.h. Link: http://lkml.kernel.org/r/1572938135-31886-3-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Russell King Cc: Anatoly Pugachev Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a73c948952ccd663b47f6cf59ac0fcae5bf0512c Author: Mike Rapoport Date: Wed Dec 4 16:53:44 2019 -0800 alpha: use pgtable-nopud instead of 4level-fixup Patch series "mm: remove __ARCH_HAS_4LEVEL_HACK", v13. These patches convert several architectures to use page table folding and remove __ARCH_HAS_4LEVEL_HACK along with include/asm-generic/4level-fixup.h. For the nommu configurations the folding is already implemented by the generic code so the only change was to use the appropriate header file. As for the rest, the changes are mostly about mechanical replacement of pgd accessors with pud/pmd ones and the addition of higher levels to page table traversals. With Vineet's patches from "elide extraneous generated code for folded p4d/pud/pmd" series [1] there is a small shrink of the kernel size of about -0.01% for the defconfig builds. This patch (of 13): It is not likely alpha will have 5-level page tables. Replace usage of include/asm-generic/4level-fixup.h and implied __ARCH_HAS_4LEVEL_HACK with include/asm-generic/pgtable-nopud.h and adjust page table manipulation macros and functions accordingly. Link: http://lkml.kernel.org/r/1572938135-31886-2-git-send-email-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Anton Ivanov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Jeff Dike Cc: "Kirill A. Shutemov" Cc: Mark Salter Cc: Matt Turner Cc: Michal Simek Cc: Peter Rosin Cc: Richard Weinberger Cc: Rolf Eike Beer Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Cc: Vineet Gupta Cc: Anatoly Pugachev Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b27d8517365eeac907de1cc1e91053ccf18179c3 Author: Andy Shevchenko Date: Wed Dec 4 16:53:40 2019 -0800 gpio: pca953x: tighten up indentation There is no need to split some of the lines. However, improve the style of multi-line comment. On top of this there is no need to have double space. Correct above indentation issues without altering the functionality. Link: http://lkml.kernel.org/r/20191022172922.61232-12-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Marek Vasut Cc: Rasmus Villemoes Cc: Thomas Petazzoni Cc: William Breathitt Gray Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 35d13d94893fbdb6bbcbd01aa703296e91c7f851 Author: Andy Shevchenko Date: Wed Dec 4 16:53:37 2019 -0800 gpio: pca953x: convert to use bitmap API Instead of customized approach convert the driver to use bitmap API. [andriy.shevchenko@linux.intel.com: reduce stack usage in couple of functions] Link: http://lkml.kernel.org/r/20191023153056.64262-1-andriy.shevchenko@linux.intel.com Link: http://lkml.kernel.org/r/20191022172922.61232-11-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: William Breathitt Gray Cc: Thomas Petazzoni Cc: Marek Vasut Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Rasmus Villemoes Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a0a0219d6c85e6dd3dd5487caa3fb7b540f45f1 Author: Andy Shevchenko Date: Wed Dec 4 16:53:33 2019 -0800 gpio: pca953x: use input from regs structure in pca953x_irq_pending() While PCA_PCAL is defined for PCA953X type only, we still may use an offset of the input from regs structure for sake of consistency. Link: http://lkml.kernel.org/r/20191022172922.61232-10-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Marek Vasut Cc: Rasmus Villemoes Cc: Thomas Petazzoni Cc: William Breathitt Gray Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a97832f224893d6155aa785773df70263cfe94ef Author: Andy Shevchenko Date: Wed Dec 4 16:53:30 2019 -0800 gpio: pca953x: remove redundant variable and check in IRQ handler We always will have at least one iteration of the loop due to pending being guaranteed to be non-zero. That is, we may remove extra variable and check in the IRQ handler. Link: http://lkml.kernel.org/r/20191022172922.61232-9-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Marek Vasut Cc: Rasmus Villemoes Cc: Thomas Petazzoni Cc: William Breathitt Gray Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30544ed5de431fe25d3793e4dd5a058d877c4d77 Author: Andy Shevchenko Date: Wed Dec 4 16:53:26 2019 -0800 lib/bitmap: introduce bitmap_replace() helper In some drivers we want to have a single operation over bitmap which is an equivalent to: *dst = (*old & ~(*mask)) | (*new & *mask) Introduce bitmap_replace() helper for this. Link: http://lkml.kernel.org/r/20191022172922.61232-8-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Rasmus Villemoes Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Marek Vasut Cc: Thomas Petazzoni Cc: William Breathitt Gray Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 780ff33b8bfac4f44fcc399a870d50ff2e74b33d Author: Andy Shevchenko Date: Wed Dec 4 16:53:23 2019 -0800 lib/test_bitmap: fix comment about this file This test case file is about bitmap API, and not printf() facility. Link: http://lkml.kernel.org/r/20191022172922.61232-7-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Marek Vasut Cc: Rasmus Villemoes Cc: Thomas Petazzoni Cc: William Breathitt Gray Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c21dd8a7bb4b8b9cab5dc335a5fa3afa2df1a831 Author: Andy Shevchenko Date: Wed Dec 4 16:53:20 2019 -0800 lib/test_bitmap: move exp1 and exp2 upper for others to use Some test cases may re-use predefined exp1 and exp2 bitmaps. Move them upper in the file. Link: http://lkml.kernel.org/r/20191022172922.61232-6-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Marek Vasut Cc: Rasmus Villemoes Cc: Thomas Petazzoni Cc: William Breathitt Gray Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ee312e38042c868be9eb973d6e639e6d67b84e2 Author: Andy Shevchenko Date: Wed Dec 4 16:53:17 2019 -0800 lib/test_bitmap: rename exp to exp1 to avoid ambiguous name One function is using exp as local variable. Avoid ambiguous naming by rename global one to exp1. Link: http://lkml.kernel.org/r/20191022172922.61232-5-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Marek Vasut Cc: Rasmus Villemoes Cc: Thomas Petazzoni Cc: William Breathitt Gray Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4881d1cbc6c36424bf11dec9d484b9d19b927ab Author: Andy Shevchenko Date: Wed Dec 4 16:53:13 2019 -0800 lib/test_bitmap: name EXP_BYTES properly EXP_BYTES has been wrongly named. It's a size of the exp array in bits. While here, go ahead and rename to EXP1_IN_BITS to avoid double renaming when exp will be renamed to exp1 in the next patch Link: http://lkml.kernel.org/r/20191022172922.61232-4-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Marek Vasut Cc: Rasmus Villemoes Cc: Thomas Petazzoni Cc: William Breathitt Gray Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54224044096e02d6df361333f5528940e3cd3f89 Author: Andy Shevchenko Date: Wed Dec 4 16:53:09 2019 -0800 lib/test_bitmap: undefine macros after use There is no need to keep step and ptest macros defined in entire file. Link: http://lkml.kernel.org/r/20191022172922.61232-3-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Marek Vasut Cc: Rasmus Villemoes Cc: Thomas Petazzoni Cc: William Breathitt Gray Cc: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17b6753ff08bc47f50da09f5185849172c598315 Author: Andy Shevchenko Date: Wed Dec 4 16:53:06 2019 -0800 lib/test_bitmap: force argument of bitmap_parselist_user() to proper address space Patch series "gpio: pca953x: Convert to bitmap (extended) API", v2. While converting gpio-pca953x driver to bitmap API, I noticed that we have no function to replace bits. So, that's how patch 7 appears. First 6 patches are preparatory of the test suite (including some warning fixes, etc). Patches 8-9 are preparatory for the GPIO driver to be easier converted to bitmap API, conversion to which happens in patch 10. Patch 11 contains simple indentation fixes. This patch (of 11): Sparse complains: lib/test_bitmap.c:345:58: warning: incorrect type in argument 1 (different address spaces) lib/test_bitmap.c:345:58: expected char const [noderef] *ubuf lib/test_bitmap.c:345:58: got char const *const in Force argument of bitmap_parselist_user() to proper address space. Link: http://lkml.kernel.org/r/20191022172922.61232-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Cc: Bartosz Golaszewski Cc: Rasmus Villemoes Cc: Yury Norov Cc: William Breathitt Gray Cc: Geert Uytterhoeven Cc: Thomas Petazzoni Cc: Marek Vasut Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0fb9dc28679a627f84974165c8011e0630529ece Author: Masahiro Yamada Date: Wed Dec 4 16:53:03 2019 -0800 arch: sembuf.h: make uapi asm/sembuf.h self-contained Userspace cannot compile due to some missing type definitions. For example, building it for x86 fails as follows: CC usr/include/asm/sembuf.h.s In file included from :32:0: usr/include/asm/sembuf.h:17:20: error: field `sem_perm' has incomplete type struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ ^~~~~~~~ usr/include/asm/sembuf.h:24:2: error: unknown type name `__kernel_time_t' __kernel_time_t sem_otime; /* last semop time */ ^~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:25:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused1; ^~~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:26:2: error: unknown type name `__kernel_time_t' __kernel_time_t sem_ctime; /* last change time */ ^~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:27:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused2; ^~~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:29:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t sem_nsems; /* no. of semaphores in array */ ^~~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:30:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused3; ^~~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:31:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused4; ^~~~~~~~~~~~~~~~ It is just a matter of missing include directive. Include to make it self-contained, and add it to the compile-test coverage. Link: http://lkml.kernel.org/r/20191030063855.9989-3-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ef0e004181956e158fb7ceb9b43810a193f80cd Author: Masahiro Yamada Date: Wed Dec 4 16:53:00 2019 -0800 arch: msgbuf.h: make uapi asm/msgbuf.h self-contained Userspace cannot compile due to some missing type definitions. For example, building it for x86 fails as follows: CC usr/include/asm/msgbuf.h.s In file included from usr/include/asm/msgbuf.h:6:0, from :32: usr/include/asm-generic/msgbuf.h:25:20: error: field `msg_perm' has incomplete type struct ipc64_perm msg_perm; ^~~~~~~~ usr/include/asm-generic/msgbuf.h:27:2: error: unknown type name `__kernel_time_t' __kernel_time_t msg_stime; /* last msgsnd time */ ^~~~~~~~~~~~~~~ usr/include/asm-generic/msgbuf.h:28:2: error: unknown type name `__kernel_time_t' __kernel_time_t msg_rtime; /* last msgrcv time */ ^~~~~~~~~~~~~~~ usr/include/asm-generic/msgbuf.h:29:2: error: unknown type name `__kernel_time_t' __kernel_time_t msg_ctime; /* last change time */ ^~~~~~~~~~~~~~~ usr/include/asm-generic/msgbuf.h:41:2: error: unknown type name `__kernel_pid_t' __kernel_pid_t msg_lspid; /* pid of last msgsnd */ ^~~~~~~~~~~~~~ usr/include/asm-generic/msgbuf.h:42:2: error: unknown type name `__kernel_pid_t' __kernel_pid_t msg_lrpid; /* last receive pid */ ^~~~~~~~~~~~~~ It is just a matter of missing include directive. Include to make it self-contained, and add it to the compile-test coverage. Link: http://lkml.kernel.org/r/20191030063855.9989-2-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b009673594d569674a9e0e60109f6a1723075b0 Author: Masahiro Yamada Date: Wed Dec 4 16:52:57 2019 -0800 arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained Userspace cannot compile due to some missing type definitions. For example, building it for x86 fails as follows: CC usr/include/asm/ipcbuf.h.s In file included from usr/include/asm/ipcbuf.h:1:0, from :32: usr/include/asm-generic/ipcbuf.h:21:2: error: unknown type name `__kernel_key_t' __kernel_key_t key; ^~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:22:2: error: unknown type name `__kernel_uid32_t' __kernel_uid32_t uid; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:23:2: error: unknown type name `__kernel_gid32_t' __kernel_gid32_t gid; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:24:2: error: unknown type name `__kernel_uid32_t' __kernel_uid32_t cuid; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:25:2: error: unknown type name `__kernel_gid32_t' __kernel_gid32_t cgid; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:26:2: error: unknown type name `__kernel_mode_t' __kernel_mode_t mode; ^~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:28:35: error: `__kernel_mode_t' undeclared here (not in a function) unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; ^~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:31:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused1; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:32:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused2; ^~~~~~~~~~~~~~~~ It is just a matter of missing include directive. Include to make it self-contained, and add it to the compile-test coverage. Link: http://lkml.kernel.org/r/20191030063855.9989-1-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce5c31db3645b649a31044a4d8b6057f6c723702 Author: Julien Grall Date: Wed Dec 4 16:52:53 2019 -0800 lib/ubsan: don't serialize UBSAN report At the moment, UBSAN report will be serialized using a spin_lock(). On RT-systems, spinlocks are turned to rt_spin_lock and may sleep. This will result to the following splat if the undefined behavior is in a context that can sleep: BUG: sleeping function called from invalid context at /src/linux/kernel/locking/rtmutex.c:968 in_atomic(): 1, irqs_disabled(): 128, pid: 3447, name: make 1 lock held by make/3447: #0: 000000009a966332 (&mm->mmap_sem){++++}, at: do_page_fault+0x140/0x4f8 irq event stamp: 6284 hardirqs last enabled at (6283): [] _raw_spin_unlock_irqrestore+0x90/0xa0 hardirqs last disabled at (6284): [] _raw_spin_lock_irqsave+0x30/0x78 softirqs last enabled at (2430): [] fpsimd_restore_current_state+0x60/0xe8 softirqs last disabled at (2427): [] fpsimd_restore_current_state+0x28/0xe8 Preemption disabled at: [] rt_mutex_futex_unlock+0x4c/0xb0 CPU: 3 PID: 3447 Comm: make Tainted: G W 5.2.14-rt7-01890-ge6e057589653 #911 Call trace: dump_backtrace+0x0/0x148 show_stack+0x14/0x20 dump_stack+0xbc/0x104 ___might_sleep+0x154/0x210 rt_spin_lock+0x68/0xa0 ubsan_prologue+0x30/0x68 handle_overflow+0x64/0xe0 __ubsan_handle_add_overflow+0x10/0x18 __lock_acquire+0x1c28/0x2a28 lock_acquire+0xf0/0x370 _raw_spin_lock_irqsave+0x58/0x78 rt_mutex_futex_unlock+0x4c/0xb0 rt_spin_unlock+0x28/0x70 get_page_from_freelist+0x428/0x2b60 __alloc_pages_nodemask+0x174/0x1708 alloc_pages_vma+0x1ac/0x238 __handle_mm_fault+0x4ac/0x10b0 handle_mm_fault+0x1d8/0x3b0 do_page_fault+0x1c8/0x4f8 do_translation_fault+0xb8/0xe0 do_mem_abort+0x3c/0x98 el0_da+0x20/0x24 The spin_lock() will protect against multiple CPUs to output a report together, I guess to prevent them from being interleaved. However, they can still interleave with other messages (and even splat from __might_sleep). So the lock usefulness seems pretty limited. Rather than trying to accomodate RT-system by switching to a raw_spin_lock(), the lock is now completely dropped. Link: http://lkml.kernel.org/r/20190920100835.14999-1-julien.grall@arm.com Signed-off-by: Julien Grall Reported-by: Andre Przywara Acked-by: Andrey Ryabinin Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f6a7f96dc29cefe16ab60f06f9c3a43510b96fd Author: Andrey Konovalov Date: Wed Dec 4 16:52:50 2019 -0800 vhost, kcov: collect coverage from vhost_worker Add kcov_remote_start()/kcov_remote_stop() annotations to the vhost_worker() function, which is responsible for processing vhost works. Since vhost_worker() threads are spawned per vhost device instance the common kcov handle is used for kcov_remote_start()/stop() annotations (see Documentation/dev-tools/kcov.rst for details). As the result kcov can now be used to collect coverage from vhost worker threads. Link: http://lkml.kernel.org/r/e49d5d154e5da6c9ada521d2b7ce10a49ce9f98b.1572366574.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alan Stern Cc: Alexander Potapenko Cc: Anders Roxell Cc: Arnd Bergmann Cc: David Windsor Cc: Dmitry Vyukov Cc: Elena Reshetova Cc: Greg Kroah-Hartman Cc: Jason Wang Cc: Marco Elver Cc: "Michael S. Tsirkin" Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95d23dc27bde0ab4b25f7ade5e2fddc08dd97d9b Author: Andrey Konovalov Date: Wed Dec 4 16:52:47 2019 -0800 usb, kcov: collect coverage from hub_event Add kcov_remote_start()/kcov_remote_stop() annotations to the hub_event() function, which is responsible for processing events on USB buses, in particular events that happen during USB device enumeration. Since hub_event() is run in a global background kernel thread (see Documentation/dev-tools/kcov.rst for details), each USB bus gets a unique global handle from the USB subsystem kcov handle range. As the result kcov can now be used to collect coverage from events that happen on a particular USB bus. [akpm@linux-foundation.org: avoid patch conflicts to make life easier for Andrew] Link: http://lkml.kernel.org/r/de4fe1c219db2d002d905dc1736e2a3bfa1db997.1572366574.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Greg Kroah-Hartman Cc: Alan Stern Cc: Alexander Potapenko Cc: Anders Roxell Cc: Arnd Bergmann Cc: David Windsor Cc: Dmitry Vyukov Cc: Elena Reshetova Cc: Jason Wang Cc: Marco Elver Cc: "Michael S. Tsirkin" Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eec028c9386ed1a692aa01a85b55952202b41619 Author: Andrey Konovalov Date: Wed Dec 4 16:52:43 2019 -0800 kcov: remote coverage support Patch series " kcov: collect coverage from usb and vhost", v3. This patchset extends kcov to allow collecting coverage from backgound kernel threads. This extension requires custom annotations for each of the places where coverage collection is desired. This patchset implements this for hub events in the USB subsystem and for vhost workers. See the first patch description for details about the kcov extension. The other two patches apply this kcov extension to USB and vhost. Examples of other subsystems that might potentially benefit from this when custom annotations are added (the list is based on process_one_work() callers for bugs recently reported by syzbot): 1. fs: writeback wb_workfn() worker, 2. net: addrconf_dad_work()/addrconf_verify_work() workers, 3. net: neigh_periodic_work() worker, 4. net/p9: p9_write_work()/p9_read_work() workers, 5. block: blk_mq_run_work_fn() worker. These patches have been used to enable coverage-guided USB fuzzing with syzkaller for the last few years, see the details here: https://github.com/google/syzkaller/blob/master/docs/linux/external_fuzzing_usb.md This patchset has been pushed to the public Linux kernel Gerrit instance: https://linux-review.googlesource.com/c/linux/kernel/git/torvalds/linux/+/1524 This patch (of 3): Add background thread coverage collection ability to kcov. With KCOV_ENABLE coverage is collected only for syscalls that are issued from the current process. With KCOV_REMOTE_ENABLE it's possible to collect coverage for arbitrary parts of the kernel code, provided that those parts are annotated with kcov_remote_start()/kcov_remote_stop(). This allows to collect coverage from two types of kernel background threads: the global ones, that are spawned during kernel boot in a limited number of instances (e.g. one USB hub_event() worker thread is spawned per USB HCD); and the local ones, that are spawned when a user interacts with some kernel interface (e.g. vhost workers). To enable collecting coverage from a global background thread, a unique global handle must be assigned and passed to the corresponding kcov_remote_start() call. Then a userspace process can pass a list of such handles to the KCOV_REMOTE_ENABLE ioctl in the handles array field of the kcov_remote_arg struct. This will attach the used kcov device to the code sections, that are referenced by those handles. Since there might be many local background threads spawned from different userspace processes, we can't use a single global handle per annotation. Instead, the userspace process passes a non-zero handle through the common_handle field of the kcov_remote_arg struct. This common handle gets saved to the kcov_handle field in the current task_struct and needs to be passed to the newly spawned threads via custom annotations. Those threads should in turn be annotated with kcov_remote_start()/kcov_remote_stop(). Internally kcov stores handles as u64 integers. The top byte of a handle is used to denote the id of a subsystem that this handle belongs to, and the lower 4 bytes are used to denote the id of a thread instance within that subsystem. A reserved value 0 is used as a subsystem id for common handles as they don't belong to a particular subsystem. The bytes 4-7 are currently reserved and must be zero. In the future the number of bytes used for the subsystem or handle ids might be increased. When a particular userspace process collects coverage by via a common handle, kcov will collect coverage for each code section that is annotated to use the common handle obtained as kcov_handle from the current task_struct. However non common handles allow to collect coverage selectively from different subsystems. Link: http://lkml.kernel.org/r/e90e315426a384207edbec1d6aa89e43008e4caf.1572366574.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Dmitry Vyukov Cc: Greg Kroah-Hartman Cc: Alan Stern Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Arnd Bergmann Cc: Steven Rostedt Cc: David Windsor Cc: Elena Reshetova Cc: Anders Roxell Cc: Alexander Potapenko Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d13de1489b6bf539695f96d945de3860e6d5e17 Author: Kees Cook Date: Wed Dec 4 16:52:40 2019 -0800 uaccess: disallow > INT_MAX copy sizes As we've done with VFS, string operations, etc, reject usercopy sizes larger than INT_MAX, which would be nice to have for catching bugs related to size calculation overflows[1]. This adds 10 bytes to x86_64 defconfig text and 1980 bytes to the data section: text data bss dec hex filename 19691167 5134320 1646664 26472151 193eed7 vmlinux.before 19691177 5136300 1646664 26474141 193f69d vmlinux.after [1] https://marc.info/?l=linux-s390&m=156631939010493&w=2 Link: http://lkml.kernel.org/r/201908251612.F9902D7A@keescook Signed-off-by: Kees Cook Suggested-by: Dan Carpenter Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5bf8bec3f4ce044a223c40cbce92590d938f0e9c Author: Daniel Vetter Date: Wed Dec 4 16:52:37 2019 -0800 drm: limit to INT_MAX in create_blob ioctl The hardened usercpy code is too paranoid ever since commit 6a30afa8c1fb ("uaccess: disallow > INT_MAX copy sizes") Code itself should have been fine as-is. Link: http://lkml.kernel.org/r/20191106164755.31478-1-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter Reported-by: syzbot+fb77e97ebf0612ee6914@syzkaller.appspotmail.com Fixes: 6a30afa8c1fb ("uaccess: disallow > INT_MAX copy sizes") Cc: Kees Cook Cc: Alexander Viro Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bd7bca4335a55561b627149322e93de1b25404c1 Author: Ben Dooks (Codethink) Date: Wed Dec 4 16:52:34 2019 -0800 drivers/rapidio/rio-access.c: fix missing include of Include for the missing declarations of functions exported from this file. Fixes the following sparse warnings: drivers/rapidio/rio-access.c:59:1: warning: symbol '__rio_local_read_config_8' was not declared. Should it be static? drivers/rapidio/rio-access.c:60:1: warning: symbol '__rio_local_read_config_16' was not declared. Should it be static? drivers/rapidio/rio-access.c:61:1: warning: symbol '__rio_local_read_config_32' was not declared. Should it be static? drivers/rapidio/rio-access.c:62:1: warning: symbol '__rio_local_write_config_8' was not declared. Should it be static? drivers/rapidio/rio-access.c:63:1: warning: symbol '__rio_local_write_config_16' was not declared. Should it be static? drivers/rapidio/rio-access.c:64:1: warning: symbol '__rio_local_write_config_32' was not declared. Should it be static? drivers/rapidio/rio-access.c:112:1: warning: symbol 'rio_mport_read_config_8' was not declared. Should it be static? drivers/rapidio/rio-access.c:113:1: warning: symbol 'rio_mport_read_config_16' was not declared. Should it be static? drivers/rapidio/rio-access.c:114:1: warning: symbol 'rio_mport_read_config_32' was not declared. Should it be static? drivers/rapidio/rio-access.c:115:1: warning: symbol 'rio_mport_write_config_8' was not declared. Should it be static? drivers/rapidio/rio-access.c:116:1: warning: symbol 'rio_mport_write_config_16' was not declared. Should it be static? drivers/rapidio/rio-access.c:117:1: warning: symbol 'rio_mport_write_config_32' was not declared. Should it be static? drivers/rapidio/rio-access.c:136:5: warning: symbol 'rio_mport_send_doorbell' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20191017115103.684-1-ben.dooks@codethink.co.uk Signed-off-by: Ben Dooks Cc: Matt Porter Cc: Alexandre Bounine Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48d6b4dd362c4f3a6032946397385b28ff8d2b9c Author: Ben Dooks (Codethink) Date: Wed Dec 4 16:52:31 2019 -0800 drivers/rapidio/rio-driver.c: fix missing include of Include for the missing declarations of functions exported from this file. Fixes the following sparse warnings: drivers/rapidio/rio-driver.c:53:16: warning: symbol 'rio_dev_get' was not declared. Should it be static? drivers/rapidio/rio-driver.c:70:6: warning: symbol 'rio_dev_put' was not declared. Should it be static? drivers/rapidio/rio-driver.c:150:5: warning: symbol 'rio_register_driver' was not declared. Should it be static? drivers/rapidio/rio-driver.c:169:6: warning: symbol 'rio_unregister_driver' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20191017114923.10888-1-ben.dooks@codethink.co.uk Signed-off-by: Ben Dooks Cc: Matt Porter Cc: Alexandre Bounine Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8cf4e9ca056cb5dcec3fdf3125c6645fc9b594d Author: Krzysztof Kozlowski Date: Wed Dec 4 16:52:28 2019 -0800 init/Kconfig: fix indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ / /' -i */Kconfig Link: http://lkml.kernel.org/r/1574306670-30234-1-git-send-email-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Cc: Jiri Kosina Cc: Masahiro Yamada Cc: Greg Kroah-Hartman Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 658c033565118549a07f15927aa6939f481e4712 Author: Alexey Dobriyan Date: Wed Dec 4 16:52:25 2019 -0800 fs/binfmt_elf.c: extract elf_read() function ELF reads done by the kernel have very complicated error detection code which better live in one place. Link: http://lkml.kernel.org/r/20191005165215.GB26927@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 81696d5d544e665674b4f7a09e1304986fbbcbc6 Author: Alexey Dobriyan Date: Wed Dec 4 16:52:22 2019 -0800 fs/binfmt_elf.c: delete unused "interp_map_addr" argument Link: http://lkml.kernel.org/r/20191005165049.GA26927@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2728fe80cefb40a8f486e64a4bef17ce2c64f5b Author: Heiher Date: Wed Dec 4 16:52:19 2019 -0800 selftests: add epoll selftests This adds the promised selftest for epoll. It will verify the wakeups of epoll. Including leaf and nested mode, epoll_wait() and poll() and multi-threads. Link: http://lkml.kernel.org/r/20191009121518.4027-1-r@hev.cc Signed-off-by: hev Reviewed-by: Roman Penyaev Cc: Jason Baron Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 339ddb53d373baee6e7946aec17c739c4924d6d9 Author: Heiher Date: Wed Dec 4 16:52:15 2019 -0800 fs/epoll: remove unnecessary wakeups of nested epoll Take the case where we have: t0 | (ew) e0 | (et) e1 | (lt) s0 t0: thread 0 e0: epoll fd 0 e1: epoll fd 1 s0: socket fd 0 ew: epoll_wait et: edge-trigger lt: level-trigger We remove unnecessary wakeups to prevent the nested epoll that working in edge- triggered mode to waking up continuously. Test code: #include #include #include int main(int argc, char *argv[]) { int sfd[2]; int efd[2]; struct epoll_event e; if (socketpair(AF_UNIX, SOCK_STREAM, 0, sfd) < 0) goto out; efd[0] = epoll_create(1); if (efd[0] < 0) goto out; efd[1] = epoll_create(1); if (efd[1] < 0) goto out; e.events = EPOLLIN; if (epoll_ctl(efd[1], EPOLL_CTL_ADD, sfd[0], &e) < 0) goto out; e.events = EPOLLIN | EPOLLET; if (epoll_ctl(efd[0], EPOLL_CTL_ADD, efd[1], &e) < 0) goto out; if (write(sfd[1], "w", 1) != 1) goto out; if (epoll_wait(efd[0], &e, 1, 0) != 1) goto out; if (epoll_wait(efd[0], &e, 1, 0) != 0) goto out; close(efd[0]); close(efd[1]); close(sfd[0]); close(sfd[1]); return 0; out: return -1; } More tests: https://github.com/heiher/epoll-wakeup Link: http://lkml.kernel.org/r/20191009060516.3577-1-r@hev.cc Signed-off-by: hev Reviewed-by: Roman Penyaev Cc: Al Viro Cc: Davide Libenzi Cc: Davidlohr Bueso Cc: Dominik Brodowski Cc: Eric Wong Cc: Jason Baron Cc: Sridhar Samudrala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f6520c520842c532059c380d7a5b30b6e0e72ced Author: Jason Baron Date: Wed Dec 4 16:52:12 2019 -0800 epoll: simplify ep_poll_safewake() for CONFIG_DEBUG_LOCK_ALLOC Currently, ep_poll_safewake() in the CONFIG_DEBUG_LOCK_ALLOC case uses ep_call_nested() in order to pass the correct subclass argument to spin_lock_irqsave_nested(). However, ep_call_nested() adds unnecessary checks for epoll depth and loops that are already verified when doing EPOLL_CTL_ADD. This mirrors a conversion that was done for !CONFIG_DEBUG_LOCK_ALLOC in: commit 37b5e5212a44 ("epoll: remove ep_call_nested() from ep_eventpoll_poll()") Link: http://lkml.kernel.org/r/1567628549-11501-1-git-send-email-jbaron@akamai.com Signed-off-by: Jason Baron Reviewed-by: Roman Penyaev Cc: Davidlohr Bueso Cc: Al Viro Cc: Eric Wong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd28b119047b9928ddae914dd747f032ab929cc6 Author: Joe Perches Date: Wed Dec 4 16:52:09 2019 -0800 checkpatch: reduce is_maintained_obsolete lookup runtime The is_maintained_obsolete function can be called twice using the same filename. This function spawns a process using get_maintainer.pl. Store the status of each filename when spawned and use the stored result to eliminate the spawning of unnecessary duplicate child processes. Example: old: $ time ./scripts/checkpatch.pl hp100-Move-to-staging.patch > /dev/null real 0m1.767s user 0m1.634s sys 0m0.141s new: $ time ./scripts/checkpatch.pl hp100-Move-to-staging.patch > /dev/null real 0m1.184s user 0m1.085s sys 0m0.103s Link: http://lkml.kernel.org/r/b982566a2b9b4825badce36fdfc3032bd0005151.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d439e6a5d78b93a85c0f93ea559548fc109ccc1a Author: Joe Perches Date: Wed Dec 4 16:52:06 2019 -0800 checkpatch: improve ignoring CamelCase SI style variants like mA Ignore all upper-case variants before and after SI units like mA, mV and uV so uses like RANGE_mA do not emit a CAMELCASE message. Link: http://lkml.kernel.org/r/5ce6f9131327fd2e12d7a0e20a55f588448de090.camel@perches.com Signed-off-by: Joe Perches Cc: Jules Irenge Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 964975ac6677c97ae61ec9d6969dd5d03f18d1c3 Author: Huang Shijie Date: Wed Dec 4 16:52:03 2019 -0800 lib/genalloc.c: rename addr_in_gen_pool to gen_pool_has_addr Follow the kernel conventions, rename addr_in_gen_pool to gen_pool_has_addr. [sjhuang@iluvatar.ai: fix Documentation/ too] Link: http://lkml.kernel.org/r/20181229015914.5573-1-sjhuang@iluvatar.ai Link: http://lkml.kernel.org/r/20181228083950.20398-1-sjhuang@iluvatar.ai Signed-off-by: Huang Shijie Reviewed-by: Andrew Morton Cc: Russell King Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fd7eb2513f8549cf2f6b0c323377816268424bed Author: Huang Shijie Date: Wed Dec 4 16:52:00 2019 -0800 lib/genalloc.c: export symbol addr_in_gen_pool We use addr_in_gen_pool() in a driver module. So export it. Link: http://lkml.kernel.org/r/20181224070622.22197-2-sjhuang@iluvatar.ai Signed-off-by: Huang Shijie Reviewed-by: Andrew Morton Cc: Alexey Skidanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 323dd2c3ed0641f49e89b4e420f9eef5d3d5a881 Author: Trent Piepho Date: Wed Dec 4 16:51:57 2019 -0800 lib/math/rational.c: fix possible incorrect result from rational fractions helper In some cases the previous algorithm would not return the closest approximation. This would happen when a semi-convergent was the closest, as the previous algorithm would only consider convergents. As an example, consider an initial value of 5/4, and trying to find the closest approximation with a maximum of 4 for numerator and denominator. The previous algorithm would return 1/1 as the closest approximation, while this version will return the correct answer of 4/3. To do this, the main loop performs effectively the same operations as it did before. It must now keep track of the last three approximations, n2/d2 .. n0/d0, while before it only needed the last two. If an exact answer is not found, the algorithm will now calculate the best semi-convergent term, t, which is a single expression with two divisions: min((max_numerator - n0) / n1, (max_denominator - d0) / d1) This will be used if it is better than previous convergent. The test for this is generally a simple comparison, 2*t > a. But in an edge case, where the convergent's final term is even and the best allowable semi-convergent has a final term of exactly half the convergent's final term, the more complex comparison (d0*dp > d1*d) is used. I also wrote some comments explaining the code. While one still needs to look up the math elsewhere, they should help a lot to follow how the code relates to that math. This routine is used in two places in the video4linux code, but in those cases it is only used to reduce a fraction to lowest terms, which the existing code will do correctly. This could be done more efficiently with a different library routine but it would still be the Euclidean alogrithm at its heart. So no change. The remain users are places where a fractional PLL divider is programmed. What would happen is something asked for a clock of X MHz but instead gets Y MHz, where Y is close to X but not exactly due to the hardware limitations. After this change they might, in some cases, get Y' MHz, where Y' is a little closer to X then Y was. Users like this are: Three UARTs, in 8250_mid, 8250_lpss, and imx. One GPU in vp4_hdmi. And three clock drivers, clk-cdce706, clk-si5351, and clk-fractional-divider. The last is a generic clock driver and so would have more users referenced via device tree entries. I think there's a bug in that one, it's limiting an N bit field that is offset-by-1 to the range 0 .. (1< Cc: Oskar Schirmer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc5c5ad79f0cc2d8756d161dbdee7b370f35f5bb Author: Laura Abbott Date: Wed Dec 4 16:51:53 2019 -0800 lib/test_meminit.c: add bulk alloc/free tests kmem_cache_alloc_bulk/kmem_cache_free_bulk are used to make multiple allocations of the same size to avoid the overhead of multiple kmalloc/kfree calls. Extend the kmem_cache tests to make some calls to these APIs. Link: http://lkml.kernel.org/r/20191107191447.23058-1-labbott@redhat.com Signed-off-by: Laura Abbott Reviewed-by: Kees Cook Tested-by: Alexander Potapenko Cc: Laura Abbott Cc: Christoph Lameter Cc: Nick Desaulniers Cc: Kostya Serebryany Cc: Dmitry Vyukov Cc: Sandeep Patil Cc: Jann Horn Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b7569a224a18953b9aee29c375e439b8a6eeb05 Author: Wei Yang Date: Wed Dec 4 16:51:50 2019 -0800 lib/rbtree: get successor's color directly After move parent assignment out, we can check the color directly. Link: http://lkml.kernel.org/r/20191028021442.5450-2-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Acked-by: Peter Zijlstra (Intel) Reviewed-by: Michel Lespinasse Reviewed-by: Davidlohr Bueso Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 11d43e62f693c66c8c76c2ea2349e0f3c5764964 Author: Wei Yang Date: Wed Dec 4 16:51:47 2019 -0800 lib/rbtree: set successor's parent unconditionally Both in Case 2 and 3, we exchange n and s. This mean no matter whether child2 is NULL or not, successor's parent should be assigned to node's. This patch takes this step out to make it explicit and reduce the ambiguity. Besides, this step reduces some symbol size like rb_erase(). KERN_CONFIG upstream patched OPT_FOR_PERF 877 870 OPT_FOR_SIZE 635 621 Link: http://lkml.kernel.org/r/20191028021442.5450-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Acked-by: Peter Zijlstra (Intel) Reviewed-by: Michel Lespinasse Reviewed-by: Davidlohr Bueso Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae81217edc18135d13e5b6c17609ee2c07af4188 Author: William Breathitt Gray Date: Wed Dec 4 16:51:43 2019 -0800 gpio: pca953x: utilize the for_each_set_clump8 macro Replace verbose implementation in set_multiple callback with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/3543ffc3668ad4ed4c00e8ebaf14a5559fd6ddf2.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Tested-by: Andy Shevchenko Cc: Phil Reid Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Linus Walleij Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d077c78b45168bc869b5453bb1250325c5ed10ff Author: William Breathitt Gray Date: Wed Dec 4 16:51:40 2019 -0800 gpio: max3191x: utilize the for_each_set_clump8 macro Replace verbose implementation in get_multiple callback with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/c2b1ed62caf6fce6e5681809a50c05ce6acdf2a6.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Cc: Andy Shevchenko Cc: Mathias Duckeck Cc: Lukas Wunner Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Linus Walleij Cc: Masahiro Yamada Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 608bd5fda60d9e2083c8bb92f17adfae73afc37a Author: William Breathitt Gray Date: Wed Dec 4 16:51:36 2019 -0800 gpio: pisosr: utilize the for_each_set_clump8 macro Replace verbose implementation in get_multiple callback with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/8a39ee772247d4b7d752b32dbacc06c1cdcb60b5.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Cc: Andy Shevchenko Cc: Morten Hein Tiljeset Cc: Sean Nyekjaer Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Linus Walleij Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Phil Reid Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f00ebf518b80e4d58ab32966772b68511d015f2 Author: William Breathitt Gray Date: Wed Dec 4 16:51:32 2019 -0800 thermal: intel: intel_soc_dts_iosf: Utilize for_each_set_clump8 macro Utilize for_each_set_clump8 macro, and the bitmap_set_value8 and bitmap_get_value8 functions, where appropriate. In addition, remove the now unnecessary temp_mask and temp_shift members of the intel_soc_dts_sensor_entry structure. Link: http://lkml.kernel.org/r/2d3c74e9a00a52954f31d19e04623a7f4bc85520.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Suggested-by: Andy Shevchenko Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Linus Walleij Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b2ca9ebfa68f47950e46b12f2d640f84ee5e1c98 Author: William Breathitt Gray Date: Wed Dec 4 16:51:29 2019 -0800 gpio: 74x164: utilize the for_each_set_clump8 macro Replace verbose implementation in set_multiple callback with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/7ea2df7182a50a1136ca36edc46dffcb2446fd27.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Suggested-by: Andy Shevchenko Tested-by: Andy Shevchenko Cc: Geert Uytterhoeven Cc: Phil Reid Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Linus Walleij Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17b6038942e304c522d0688c2b29b1c630f1cfa6 Author: William Breathitt Gray Date: Wed Dec 4 16:51:25 2019 -0800 gpio: uniphier: utilize for_each_set_clump8 macro Replace verbose implementation in set_multiple callback with for_each_set_clump8 macro to simplify code and improve clarity. An improvement in this case is that banks that are not masked will now be skipped. Link: http://lkml.kernel.org/r/5b24887e97f3093e4832d7c50a1093f537e91ab4.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Cc: Andy Shevchenko Cc: Masahiro Yamada Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Linus Walleij Cc: Lukas Wunner Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c586aa8f480598f17e1e7d99d3ca7a7a0a6ffbd3 Author: William Breathitt Gray Date: Wed Dec 4 16:51:22 2019 -0800 gpio: pcie-idio-24: utilize for_each_set_clump8 macro Replace verbose implementation in get_multiple/set_multiple callbacks with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/d5d22fa9809dcf8330f4381dbe7e7ca37990e79f.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2dc7c3c16daac7317ef7458bad6b528aa3330951 Author: William Breathitt Gray Date: Wed Dec 4 16:51:18 2019 -0800 gpio: pci-idio-16: utilize for_each_set_clump8 macro Replace verbose implementation in get_multiple/set_multiple callbacks with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/b30f131b4634caf5a70f12e01496f71631a17305.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit acebb82fe9cd4d3dc09e7e28ffa5a5ecc76ae7f8 Author: William Breathitt Gray Date: Wed Dec 4 16:51:15 2019 -0800 gpio: ws16c48: utilize for_each_set_clump8 macro Replace verbose implementation in get_multiple/set_multiple callbacks with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/7a0d2c964e7f2d289b16c63ff6b06fc1f4c50d4d.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b0f49e9b9e2cf0b4c09998bd806dd6ede6c4ad61 Author: William Breathitt Gray Date: Wed Dec 4 16:51:11 2019 -0800 gpio: gpio-mm: utilize for_each_set_clump8 macro Replace verbose implementation in get_multiple/set_multiple callbacks with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/0de53d7021b2d6db10294473cd8a1b6102bcec94.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9bfcce0db3cff35901fbf5d332f7e1f1fe097cfb Author: William Breathitt Gray Date: Wed Dec 4 16:51:08 2019 -0800 gpio: 104-idi-48: utilize for_each_set_clump8 macro Replace verbose implementation in get_multiple/set_multiple callbacks with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/b0631b6d489f85008480399df283ccd33ecfe310.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f70dad5d4c0fd4e184483b70939e935e060d9208 Author: William Breathitt Gray Date: Wed Dec 4 16:51:04 2019 -0800 gpio: 104-dio-48e: utilize for_each_set_clump8 macro Replace verbose implementation in get_multiple/set_multiple callbacks with for_each_set_clump8 macro to simplify code and improve clarity. Link: http://lkml.kernel.org/r/08b9c9a3e75ef1ab0d172223d10a1661f2b43fe2.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Rasmus Villemoes Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e4aa168de88da92f05dd5f13ceb63711011a9b04 Author: William Breathitt Gray Date: Wed Dec 4 16:51:01 2019 -0800 lib/test_bitmap.c: add for_each_set_clump8 test cases The introduction of the for_each_set_clump8 macro warrants test cases to verify the implementation. This patch adds test case checks for whether an out-of-bounds clump index is returned, a zero clump is returned, or the returned clump value differs from the expected clump value. Link: http://lkml.kernel.org/r/febc0fb8151e3e3fdd61c34da9193d1c4d7e6c12.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Tested-by: Andy Shevchenko Cc: Rasmus Villemoes Cc: Arnd Bergmann Cc: Bartosz Golaszewski Cc: Geert Uytterhoeven Cc: Geert Uytterhoeven Cc: Lukas Wunner Cc: Masahiro Yamada Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Phil Reid Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 169c474fb22d8a5e909e172f177b957546d0519d Author: William Breathitt Gray Date: Wed Dec 4 16:50:57 2019 -0800 bitops: introduce the for_each_set_clump8 macro Pach series "Introduce the for_each_set_clump8 macro", v18. While adding GPIO get_multiple/set_multiple callback support for various drivers, I noticed a pattern of looping manifesting that would be useful standardized as a macro. This patchset introduces the for_each_set_clump8 macro and utilizes it in several GPIO drivers. The for_each_set_clump macro8 facilitates a for-loop syntax that iterates over a memory region entire groups of set bits at a time. For example, suppose you would like to iterate over a 32-bit integer 8 bits at a time, skipping over 8-bit groups with no set bit, where XXXXXXXX represents the current 8-bit group: Example: 10111110 00000000 11111111 00110011 First loop: 10111110 00000000 11111111 XXXXXXXX Second loop: 10111110 00000000 XXXXXXXX 00110011 Third loop: XXXXXXXX 00000000 11111111 00110011 Each iteration of the loop returns the next 8-bit group that has at least one set bit. The for_each_set_clump8 macro has four parameters: * start: set to the bit offset of the current clump * clump: set to the current clump value * bits: bitmap to search within * size: bitmap size in number of bits In this version of the patchset, the for_each_set_clump macro has been reimplemented and simplified based on the suggestions provided by Rasmus Villemoes and Andy Shevchenko in the version 4 submission. In particular, the function of the for_each_set_clump macro has been restricted to handle only 8-bit clumps; the drivers that use the for_each_set_clump macro only handle 8-bit ports so a generic for_each_set_clump implementation is not necessary. Thus, a solution for large clumps (i.e. those larger than the width of a bitmap word) can be postponed until a driver appears that actually requires such a generic for_each_set_clump implementation. For what it's worth, a semi-generic for_each_set_clump (i.e. for clumps smaller than the width of a bitmap word) can be implemented by simply replacing the hardcoded '8' and '0xFF' instances with respective variables. I have not yet had a need for such an implementation, and since it falls short of a true generic for_each_set_clump function, I have decided to forgo such an implementation for now. In addition, the bitmap_get_value8 and bitmap_set_value8 functions are introduced to get and set 8-bit values respectively. Their use is based on the behavior suggested in the patchset version 4 review. This patch (of 14): This macro iterates for each 8-bit group of bits (clump) with set bits, within a bitmap memory region. For each iteration, "start" is set to the bit offset of the found clump, while the respective clump value is stored to the location pointed by "clump". Additionally, the bitmap_get_value8 and bitmap_set_value8 functions are introduced to respectively get and set an 8-bit value in a bitmap memory region. [gustavo@embeddedor.com: fix potential sign-extension overflow] Link: http://lkml.kernel.org/r/20191015184657.GA26541@embeddedor [akpm@linux-foundation.org: s/ULL/UL/, per Joe] [vilhelm.gray@gmail.com: add for_each_set_clump8 documentation] Link: http://lkml.kernel.org/r/20191016161825.301082-1-vilhelm.gray@gmail.com Link: http://lkml.kernel.org/r/893c3b4f03266c9496137cc98ac2b1bd27f92c73.1570641097.git.vilhelm.gray@gmail.com Signed-off-by: William Breathitt Gray Signed-off-by: Gustavo A. R. Silva Suggested-by: Andy Shevchenko Suggested-by: Rasmus Villemoes Suggested-by: Lukas Wunner Tested-by: Andy Shevchenko Cc: Arnd Bergmann Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Masahiro Yamada Cc: Geert Uytterhoeven Cc: Phil Reid Cc: Geert Uytterhoeven Cc: Mathias Duckeck Cc: Morten Hein Tiljeset Cc: Sean Nyekjaer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e1aada08cd19ea652b2d32a250501d09b02ff2e Author: Joe Perches Date: Wed Dec 4 16:50:53 2019 -0800 kernel/sys.c: avoid copying possible padding bytes in copy_to_user Initialization is not guaranteed to zero padding bytes so use an explicit memset instead to avoid leaking any kernel content in any possible padding bytes. Link: http://lkml.kernel.org/r/dfa331c00881d61c8ee51577a082d8bebd61805c.camel@perches.com Signed-off-by: Joe Perches Cc: Dan Carpenter Cc: Julia Lawall Cc: Thomas Gleixner Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef70eff9dea66f38f8c2c2dcc7fe4b7a2bbb4921 Author: Nathan Chancellor Date: Wed Dec 4 16:50:50 2019 -0800 kernel/profile.c: use cpumask_available to check for NULL cpumask When building with clang + -Wtautological-pointer-compare, these instances pop up: kernel/profile.c:339:6: warning: comparison of array 'prof_cpu_mask' not equal to a null pointer is always true [-Wtautological-pointer-compare] if (prof_cpu_mask != NULL) ^~~~~~~~~~~~~ ~~~~ kernel/profile.c:376:6: warning: comparison of array 'prof_cpu_mask' not equal to a null pointer is always true [-Wtautological-pointer-compare] if (prof_cpu_mask != NULL) ^~~~~~~~~~~~~ ~~~~ kernel/profile.c:406:26: warning: comparison of array 'prof_cpu_mask' not equal to a null pointer is always true [-Wtautological-pointer-compare] if (!user_mode(regs) && prof_cpu_mask != NULL && ^~~~~~~~~~~~~ ~~~~ 3 warnings generated. This can be addressed with the cpumask_available helper, introduced in commit f7e30f01a9e2 ("cpumask: Add helper cpumask_available()") to fix warnings like this while keeping the code the same. Link: https://github.com/ClangBuiltLinux/linux/issues/747 Link: http://lkml.kernel.org/r/20191022191957.9554-1-natechancellor@gmail.com Signed-off-by: Nathan Chancellor Reviewed-by: Andrew Morton Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 260a2679e5cbfb3d8a4cf6cd1cb6f57e89c7e543 Author: Xiaoming Ni Date: Wed Dec 4 16:50:47 2019 -0800 kernel/notifier.c: remove blocking_notifier_chain_cond_register() blocking_notifier_chain_cond_register() does not consider system_booting state, which is the only difference between this function and blocking_notifier_cain_register(). This can be a bug and is a piece of duplicate code. Delete blocking_notifier_chain_cond_register() Link: http://lkml.kernel.org/r/1568861888-34045-4-git-send-email-nixiaoming@huawei.com Signed-off-by: Xiaoming Ni Reviewed-by: Andrew Morton Cc: Alan Stern Cc: Alexey Dobriyan Cc: Andy Lutomirski Cc: Anna Schumaker Cc: Arjan van de Ven Cc: Chuck Lever Cc: David S. Miller Cc: Ingo Molnar Cc: J. Bruce Fields Cc: Jeff Layton Cc: Nadia Derbey Cc: "Paul E. McKenney" Cc: Sam Protsenko Cc: Thomas Gleixner Cc: Trond Myklebust Cc: Vasily Averin Cc: Viresh Kumar Cc: YueHaibing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5adaabb65a267d890b29193af2dbc38a3b85bbf2 Author: Xiaoming Ni Date: Wed Dec 4 16:50:43 2019 -0800 kernel/notifier.c: remove notifier_chain_cond_register() The only difference between notifier_chain_cond_register() and notifier_chain_register() is the lack of warning hints for duplicate registrations. Use notifier_chain_register() instead of notifier_chain_cond_register() to avoid duplicate code Link: http://lkml.kernel.org/r/1568861888-34045-3-git-send-email-nixiaoming@huawei.com Signed-off-by: Xiaoming Ni Reviewed-by: Andrew Morton Cc: Alan Stern Cc: Alexey Dobriyan Cc: Andy Lutomirski Cc: Anna Schumaker Cc: Arjan van de Ven Cc: Chuck Lever Cc: David S. Miller Cc: Ingo Molnar Cc: J. Bruce Fields Cc: Jeff Layton Cc: Nadia Derbey Cc: "Paul E. McKenney" Cc: Sam Protsenko Cc: Thomas Gleixner Cc: Trond Myklebust Cc: Vasily Averin Cc: Viresh Kumar Cc: YueHaibing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a50cb80f219c44adb6265f5071b81fc3c1deced Author: Xiaoming Ni Date: Wed Dec 4 16:50:39 2019 -0800 kernel/notifier.c: intercept duplicate registrations to avoid infinite loops Registering the same notifier to a hook repeatedly can cause the hook list to form a ring or lose other members of the list. case1: An infinite loop in notifier_chain_register() can cause soft lockup atomic_notifier_chain_register(&test_notifier_list, &test1); atomic_notifier_chain_register(&test_notifier_list, &test1); atomic_notifier_chain_register(&test_notifier_list, &test2); case2: An infinite loop in notifier_chain_register() can cause soft lockup atomic_notifier_chain_register(&test_notifier_list, &test1); atomic_notifier_chain_register(&test_notifier_list, &test1); atomic_notifier_call_chain(&test_notifier_list, 0, NULL); case3: lose other hook test2 atomic_notifier_chain_register(&test_notifier_list, &test1); atomic_notifier_chain_register(&test_notifier_list, &test2); atomic_notifier_chain_register(&test_notifier_list, &test1); case4: Unregister returns 0, but the hook is still in the linked list, and it is not really registered. If you call notifier_call_chain after ko is unloaded, it will trigger oops. If the system is configured with softlockup_panic and the same hook is repeatedly registered on the panic_notifier_list, it will cause a loop panic. Add a check in notifier_chain_register(), intercepting duplicate registrations to avoid infinite loops Link: http://lkml.kernel.org/r/1568861888-34045-2-git-send-email-nixiaoming@huawei.com Signed-off-by: Xiaoming Ni Reviewed-by: Vasily Averin Reviewed-by: Andrew Morton Cc: Alexey Dobriyan Cc: Anna Schumaker Cc: Arjan van de Ven Cc: J. Bruce Fields Cc: Chuck Lever Cc: David S. Miller Cc: Jeff Layton Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Nadia Derbey Cc: "Paul E. McKenney" Cc: Sam Protsenko Cc: Alan Stern Cc: Thomas Gleixner Cc: Trond Myklebust Cc: Viresh Kumar Cc: Xiaoming Ni Cc: YueHaibing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d717e7da45b382c09cee4f1e03ce30124e672e07 Author: Andy Shevchenko Date: Wed Dec 4 16:50:36 2019 -0800 auxdisplay: charlcd: deduplicate simple_strtoul() Like in commit 8b2303de399f ("serial: core: Fix handling of options after MMIO address") we may use simple_strtoul() which in comparison to kstrtoul() can do conversion in-place without additional and unnecessary code to be written. Link: http://lkml.kernel.org/r/20190801192904.41087-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Cc: Geert Uytterhoeven Cc: Mans Rullgard Cc: Miguel Ojeda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 885e68e8b7b1328aa1e28b27e13fbfb5f020d269 Author: Andy Shevchenko Date: Wed Dec 4 16:50:32 2019 -0800 kernel.h: update comment about simple_strto() functions There were discussions in the past about use cases for simple_strto() functions and, in some rare cases, they have a benefit over kstrto() ones. Update a comment to reduce confusion about special use cases. Link: http://lkml.kernel.org/r/20190801192904.41087-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Suggested-by: Miguel Ojeda Cc: Geert Uytterhoeven Cc: Mans Rullgard Cc: Petr Mladek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f5bd343694ed53b3abc4a616ce975505271afe7 Author: Joe Perches Date: Wed Dec 4 16:50:29 2019 -0800 scripts/get_maintainer.pl: add signatures from Fixes: lines in commit message A Fixes: lines in a commit message generally indicate that a previous commit was inadequate for whatever reason. The signers of the previous inadequate commit should also be cc'd on this new commit so update get_maintainer to find the old commit and add the original signers. Link: http://lkml.kernel.org/r/33605b9fc0e0f711236951ae84185a6218acff4f.camel@perches.com Signed-off-by: Joe Perches Suggested-by: Dan Carpenter Reviewed-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 24b54fee106d8f9ea41f71e366e03f6a3f083a15 Author: Krzysztof Kozlowski Date: Wed Dec 4 16:50:26 2019 -0800 arch/Kconfig: fix indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ / /' -i */Kconfig Link: http://lkml.kernel.org/r/1574306573-10886-1-git-send-email-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Jiri Kosina Cc: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a18374fc370da5a335b061fe94ebf677b07bd1d Author: Masahiro Yamada Date: Wed Dec 4 16:50:23 2019 -0800 linux/scc.h: make uapi linux/scc.h self-contained Userspace cannot compile CC usr/include/linux/scc.h.s In file included from :32:0: usr/include/linux/scc.h:20:20: error: `SIOCDEVPRIVATE' undeclared here (not in a function) SIOCSCCRESERVED = SIOCDEVPRIVATE, ^~~~~~~~~~~~~~ Include to make it self-contained, and add it to the compile-test coverage. Link: http://lkml.kernel.org/r/20191108055809.26969-1-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8788994376d84d627450fd0d67deb6a66ddf07d7 Author: Rikard Falkeborn Date: Wed Dec 4 16:50:20 2019 -0800 linux/build_bug.h: change type to int Having BUILD_BUG_ON_ZERO produce a value of type size_t leads to awkward casts in cases where the result needs to be signed, or of smaller type than size_t. To avoid this, cast the value to int instead and rely on implicit type conversions when a larger or unsigned type is needed. Link: http://lkml.kernel.org/r/20190811184938.1796-3-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn Suggested-by: Masahiro Yamada Reviewed-by: Kees Cook Reviewed-by: Masahiro Yamada Cc: Joe Perches Cc: Johannes Berg Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a512ae54cee18296384f45201b3118345ce0dc80 Author: Stephen Boyd Date: Wed Dec 4 16:50:17 2019 -0800 .gitattributes: use 'dts' diff driver for dts files Git is gaining support to display the closest node to the diff in the hunk header via the 'dts' diff driver. Use that driver for all dts and dtsi files so we can gain some more context on where the diff is. Taking a recent commit in the kernel dts files you can see the difference. With this patch and an updated git : diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi : index 62e07e1197cc..4c38426a6969 100644 : --- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi : +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi : @@ -289,5 +289,29 @@ vdd_hdmi: regulator@1 { : gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>; : enable-active-high; : }; : + : + vdd_3v3_pcie: regulator@2 { : + compatible = "regulator-fixed"; vs. without this patch : diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi : index 62e07e1197cc..4c38426a6969 100644 : --- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi : +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi : @@ -289,5 +289,29 @@ : gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>; : enable-active-high; : }; : + : + vdd_3v3_pcie: regulator@2 { : + compatible = "regulator-fixed"; You can see that we don't know what the context node is because it isn't shown after the '@@'. dts is not released yet but it is staged to be in the next release[1]. One can probably build git from source and try it out. [1] https://git.kernel.org/pub/scm/git/git.git/commit/?id=d49c2c3466d2c8cb0b3d0a43e6b406b07078fdb1 Link: http://lkml.kernel.org/r/20191004212311.141538-1-swboyd@chromium.org Signed-off-by: Stephen Boyd Cc: Rob Herring Cc: Randy Dunlap Acked-by: Frank Rowand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d5ffb71b633cd5c4b8cce633c9d6448dced4eb74 Author: Alessio Balsini Date: Wed Dec 4 16:50:14 2019 -0800 include/linux/sysctl.h: inline braces for ctl_table and ctl_table_header Fix coding style of "struct ctl_table" and "struct ctl_table_header" to have inline braces. Besides the wide use of this proposed cose style, this change helps to find at a glance the struct definition when navigating the code. Link: http://lkml.kernel.org/r/20190903154906.188651-1-balsini@android.com Signed-off-by: Alessio Balsini Acked-by: Luis Chamberlain Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d82191c22e20836812afdaef22c5965ae2c55b8 Author: Krzysztof Kozlowski Date: Wed Dec 4 16:50:11 2019 -0800 fs/proc/Kconfig: fix indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ / /' -i */Kconfig [adobriyan@gmail.com: add two spaces where necessary] Link: http://lkml.kernel.org/r/20191124133936.GA5655@avx2 Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9573e8f70a82bcbac95b1ea222ac9d5e50266f9f Author: Miaohe Lin Date: Wed Dec 4 16:50:08 2019 -0800 include/linux/proc_fs.h: fix confusing macro arg name state_size and ops are in the wrong position. Link: http://lkml.kernel.org/r/20190910021747.11216-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Andrew Morton Acked-by: Aleksa Sarai Reviewed-by: Christian Brauner Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 70a731c0e3c603e84607b770c15e53da4c3a6ecd Author: Alexey Dobriyan Date: Wed Dec 4 16:50:05 2019 -0800 fs/proc/internal.h: shuffle "struct pde_opener" List iteration takes more code than anything else which means embedded list_head should be the first element of the structure. Space savings: add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-18 (-18) Function old new delta close_pdeo 228 227 -1 proc_reg_release 86 82 -4 proc_entry_rundown 143 139 -4 proc_reg_open 298 289 -9 Link: http://lkml.kernel.org/r/20191004234753.GB30246@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f6354eaa517ce5c1e7b7feb224a0324601f796e Author: Alexey Dobriyan Date: Wed Dec 4 16:50:02 2019 -0800 fs/proc/generic.c: delete useless "len" variable Pointer to next '/' encodes length of path element and next start position. Subtraction and increment are redundant. Link: http://lkml.kernel.org/r/20191004234521.GA30246@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e06689bf57017ac022ccf0f2a5071f760821ce0f Author: Alexey Dobriyan Date: Wed Dec 4 16:49:59 2019 -0800 proc: change ->nlink under proc_subdir_lock Currently gluing PDE into global /proc tree is done under lock, but changing ->nlink is not. Additionally struct proc_dir_entry::nlink is not atomic so updates can be lost. Link: http://lkml.kernel.org/r/20190925202436.GA17388@avx2 Signed-off-by: Alexey Dobriyan Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3cde287bb4769fe9dfc9c532ddc88d90e81bc4c5 Author: Yu Zhao Date: Wed Dec 4 16:49:56 2019 -0800 mm/memory.c: replace is_zero_pfn with is_huge_zero_pmd for thp For hugely mapped thp, we use is_huge_zero_pmd() to check if it's zero page or not. We do fill ptes with my_zero_pfn() when we split zero thp pmd, but this is not what we have in vm_normal_page_pmd() -- pmd_trans_huge_lock() makes sure of it. This is a trivial fix for /proc/pid/numa_maps, and AFAIK nobody complains about it. Gerald Schaefer asked: : Maybe the description could also mention the symptom of this bug? : I would assume that it affects anon/dirty accounting in gather_pte_stats(), : for huge mappings, if zero page mappings are not correctly recognized. I came across this while I was looking at the code, so I'm not aware of any symptom. Link: http://lkml.kernel.org/r/20191108192629.201556-1-yuzhao@google.com Signed-off-by: Yu Zhao Acked-by: Andrew Morton Cc: Matthew Wilcox Cc: Ralph Campbell Cc: Will Deacon Cc: Peter Zijlstra Cc: "Aneesh Kumar K . V" Cc: Dave Airlie Cc: Thomas Hellstrom Cc: Souptick Joarder Cc: Gerald Schaefer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ebc5d83d04438116c24dcc556b0ab6c8ef64b77e Author: Konstantin Khlebnikov Date: Wed Dec 4 16:49:53 2019 -0800 mm/memcontrol: use vmstat names for printing statistics Use common names from vmstat array when possible. This gives not much difference in code size for now, but should help in keeping interfaces consistent. add/remove: 0/2 grow/shrink: 2/0 up/down: 70/-72 (-2) Function old new delta memory_stat_format 984 1050 +66 memcg_stat_show 957 961 +4 memcg1_event_names 32 - -32 mem_cgroup_lru_names 40 - -40 Total: Before=14485337, After=14485335, chg -0.00% Link: http://lkml.kernel.org/r/157113012508.453.80391533767219371.stgit@buzz Signed-off-by: Konstantin Khlebnikov Acked-by: Andrew Morton Cc: Michal Hocko Cc: Vladimir Davydov Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d7ea9a297e6445d567056f15b469dde13ca4134 Author: Konstantin Khlebnikov Date: Wed Dec 4 16:49:50 2019 -0800 mm/vmstat: add helpers to get vmstat item names for each enum type Statistics in vmstat is combined from counters with different structure, but names for them are merged into one array. This patch adds trivial helpers to get name for each item: const char *zone_stat_name(enum zone_stat_item item); const char *numa_stat_name(enum numa_stat_item item); const char *node_stat_name(enum node_stat_item item); const char *writeback_stat_name(enum writeback_stat_item item); const char *vm_event_name(enum vm_event_item item); Names for enum writeback_stat_item are folded in the middle of vmstat_text so this patch moves declaration into header to calculate offset of following items. Also this patch reuses piece of node stat names for lru list names: const char *lru_list_name(enum lru_list lru); This returns common lru list names: "inactive_anon", "active_anon", "inactive_file", "active_file", "unevictable". [khlebnikov@yandex-team.ru: do not use size of vmstat_text as count of /proc/vmstat items] Link: http://lkml.kernel.org/r/157152151769.4139.15423465513138349343.stgit@buzz Link: https://lore.kernel.org/linux-mm/cd1c42ae-281f-c8a8-70ac-1d01d417b2e1@infradead.org/T/#u Link: http://lkml.kernel.org/r/157113012325.453.562783073839432766.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Andrew Morton Cc: Randy Dunlap Cc: Michal Hocko Cc: Vladimir Davydov Cc: Johannes Weiner Cc: YueHaibing Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a264df74df38855096393447f1b8f386069a94b9 Author: Roman Gushchin Date: Wed Dec 4 16:49:46 2019 -0800 mm: memcg/slab: wait for !root kmem_cache refcnt killing on root kmem_cache destruction Christian reported a warning like the following obtained during running some KVM-related tests on s390: WARNING: CPU: 8 PID: 208 at lib/percpu-refcount.c:108 percpu_ref_exit+0x50/0x58 Modules linked in: kvm(-) xt_CHECKSUM xt_MASQUERADE bonding xt_tcpudp ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ip6table_na> CPU: 8 PID: 208 Comm: kworker/8:1 Not tainted 5.2.0+ #66 Hardware name: IBM 2964 NC9 712 (LPAR) Workqueue: events sysfs_slab_remove_workfn Krnl PSW : 0704e00180000000 0000001529746850 (percpu_ref_exit+0x50/0x58) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3 Krnl GPRS: 00000000ffff8808 0000001529746740 000003f4e30e8e18 0036008100000000 0000001f00000000 0035008100000000 0000001fb3573ab8 0000000000000000 0000001fbdb6de00 0000000000000000 0000001529f01328 0000001fb3573b00 0000001fbb27e000 0000001fbdb69300 000003e009263d00 000003e009263cd0 Krnl Code: 0000001529746842: f0a0000407fe srp 4(11,%r0),2046,0 0000001529746848: 47000700 bc 0,1792 #000000152974684c: a7f40001 brc 15,152974684e >0000001529746850: a7f4fff2 brc 15,1529746834 0000001529746854: 0707 bcr 0,%r7 0000001529746856: 0707 bcr 0,%r7 0000001529746858: eb8ff0580024 stmg %r8,%r15,88(%r15) 000000152974685e: a738ffff lhi %r3,-1 Call Trace: ([<000003e009263d00>] 0x3e009263d00) [<00000015293252ea>] slab_kmem_cache_release+0x3a/0x70 [<0000001529b04882>] kobject_put+0xaa/0xe8 [<000000152918cf28>] process_one_work+0x1e8/0x428 [<000000152918d1b0>] worker_thread+0x48/0x460 [<00000015291942c6>] kthread+0x126/0x160 [<0000001529b22344>] ret_from_fork+0x28/0x30 [<0000001529b2234c>] kernel_thread_starter+0x0/0x10 Last Breaking-Event-Address: [<000000152974684c>] percpu_ref_exit+0x4c/0x58 ---[ end trace b035e7da5788eb09 ]--- The problem occurs because kmem_cache_destroy() is called immediately after deleting of a memcg, so it races with the memcg kmem_cache deactivation. flush_memcg_workqueue() at the beginning of kmem_cache_destroy() is supposed to guarantee that all deactivation processes are finished, but failed to do so. It waits for an rcu grace period, after which all children kmem_caches should be deactivated. During the deactivation percpu_ref_kill() is called for non root kmem_cache refcounters, but it requires yet another rcu grace period to finish the transition to the atomic (dead) state. So in a rare case when not all children kmem_caches are destroyed at the moment when the root kmem_cache is about to be gone, we need to wait another rcu grace period before destroying the root kmem_cache. This issue can be triggered only with dynamically created kmem_caches which are used with memcg accounting. In this case per-memcg child kmem_caches are created. They are deactivated from the cgroup removing path. If the destruction of the root kmem_cache is racing with the removal of the cgroup (both are quite complicated multi-stage processes), the described issue can occur. The only known way to trigger it in the real life, is to unload some kernel module which creates a dedicated kmem_cache, used from different memory cgroups with GFP_ACCOUNT flag. If the unloading happens immediately after calling rmdir on the corresponding cgroup, there is some chance to trigger the issue. Link: http://lkml.kernel.org/r/20191129025011.3076017-1-guro@fb.com Fixes: f0a3a24b532d ("mm: memcg/slab: rework non-root kmem_cache lifecycle management") Signed-off-by: Roman Gushchin Reported-by: Christian Borntraeger Tested-by: Christian Borntraeger Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2e7d31704c7fe9141b0b27ec1ece254d9993fe2d Author: zhong jiang Date: Wed Dec 4 16:49:43 2019 -0800 mm/kasan/common.c: fix compile error I hit the following compile error in arch/x86/ mm/kasan/common.c: In function kasan_populate_vmalloc: mm/kasan/common.c:797:2: error: implicit declaration of function flush_cache_vmap; did you mean flush_rcu_work? [-Werror=implicit-function-declaration] flush_cache_vmap(shadow_start, shadow_end); ^~~~~~~~~~~~~~~~ flush_rcu_work cc1: some warnings being treated as errors Link: http://lkml.kernel.org/r/1575363013-43761-1-git-send-email-zhongjiang@huawei.com Fixes: 3c5c3cfb9ef4 ("kasan: support backing vmalloc space with real shadow memory") Signed-off-by: zhong jiang Reviewed-by: Andrew Morton Reviewed-by: Daniel Axtens Cc: Mark Rutland Cc: Mark Rutland Cc: Vasily Gorbik Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f13437b8917627119d163d62f73e7a78a92303a Merge: 056df578c2dc a356646a5685 Author: Linus Torvalds Date: Wed Dec 4 19:13:52 2019 -0800 Merge tag 'trace-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull more tracing updates from Steven Rostedt: "Two fixes and one patch that was missed: Fixes: - Missing __print_hex_dump undef for processing new function in trace events - Stop WARN_ON messages when lockdown disables tracing on boot up Enhancement: - Debug option to inject trace events from userspace (for rasdaemon)" The enhancement has its own config option and is non invasive. It's been discussed for sever months and should have been added to my original push, but I never pulled it into my queue. * tag 'trace-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Do not create directories if lockdown is in affect tracing: Introduce trace event injection tracing: Fix __print_hex_dump scope commit 78076bb64aa8ba5b7207c38b2660a9e10ffa8cc7 Author: Jens Axboe Date: Wed Dec 4 19:56:40 2019 -0700 io_uring: use hash table for poll command lookups We recently changed this from a single list to an rbtree, but for some real life workloads, the rbtree slows down the submission/insertion case enough so that it's the top cycle consumer on the io_uring side. In testing, using a hash table is a more well rounded compromise. It is fast for insertion, and as long as it's sized appropriately, it works well for the cancellation case as well. Running TAO with a lot of network sockets, this removes io_poll_req_insert() from spending 2% of the CPU cycles. Reported-by: Dan Melnic Signed-off-by: Jens Axboe commit 056df578c2dcac1e624254567f5df5ddaa223234 Merge: aedc0650f913 9fbea0b7e842 Author: Linus Torvalds Date: Wed Dec 4 19:06:18 2019 -0800 Merge tag 'arc-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta - Jump Label support for ARC - kmemleak enabled - arc mm backend TLB Miss / flush optimizations - nSIM platform switching to dwuart (vs. arcuart) and ensuing defconfig updates and cleanups - axs platform pll / video-mode updates * tag 'arc-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: add kmemleak support ARC: [plat-axs10x]: remove hardcoded video mode from bootargs ARC: [plat-axs10x]: use pgu pll instead of fixed clock ARC: ARCv2: jump label: implement jump label patching ARC: mm: tlb flush optim: elide redundant uTLB invalidates for MMUv3 ARC: mm: tlb flush optim: elide repeated uTLB invalidate in loop ARC: mm: tlb flush optim: Make TLBWriteNI fallback to TLBWrite if not available ARC: mm: TLB Miss optim: avoid re-reading ECR ARCv2: mm: TLB Miss optim: Use double world load/stores LDD/STD ARCv2: mm: TLB Miss optim: SMP builds can cache pgd pointer in mmu scratch reg ARC: nSIM_700: remove unused network options ARC: nSIM_700: switch to DW UART usage ARC: merge HAPS-HS with nSIM-HS configs ARC: HAPS: cleanup defconfigs from unused ETH drivers ARC: HAPS: add HIGHMEM memory zone to DTS ARC: HAPS: use same UART configuration everywhere ARC: HAPS: cleanup defconfigs from unused IO-related options ARC: regenerate nSIM and HAPS defconfigs commit ef8c84effce3c7a0b8196fcda8f430c815ab511c Author: Stanislav Fomichev Date: Wed Dec 4 11:09:55 2019 -0800 selftests/bpf: De-flake test_tcpbpf It looks like BPF program that handles BPF_SOCK_OPS_STATE_CB state can race with the bpf_map_lookup_elem("global_map"); I sometimes see the failures in this test and re-running helps. Since we know that we expect the callback to be called 3 times (one time for listener socket, two times for both ends of the connection), let's export this number and add simple retry logic around that. Also, let's make EXPECT_EQ() not return on failure, but continue evaluating all conditions; that should make potential debugging easier. With this fix in place I don't observe the flakiness anymore. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Cc: Lawrence Brakmo Link: https://lore.kernel.org/bpf/20191204190955.170934-1-sdf@google.com commit a284e11c371e446371675668d8c8120a27227339 Author: Hans Verkuil Date: Mon Dec 2 10:08:12 2019 -0800 Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers This increment of rmi_smbus in rmi_smb_read/write_block() causes garbage to be read/written. The first read of SMB_MAX_COUNT bytes is fine, but after that it is nonsense. Trial-and-error showed that by dropping the increment of rmiaddr everything is fine and the F54 function properly works. I tried a hack with rmi_smb_write_block() as well (writing to the same F54 touchpad data area, then reading it back), and that suggests that there too the rmiaddr increment has to be dropped. It makes sense that if it has to be dropped for read, then it has to be dropped for write as well. It looks like the initial work with F54 was done using i2c, not smbus, and it seems nobody ever tested F54 with smbus. The other functions all read/write less than SMB_MAX_COUNT as far as I can tell, so this issue was never noticed with non-F54 functions. With this change I can read out the touchpad data correctly on my Lenovo X1 Carbon 6th Gen laptop. Signed-off-by: Hans Verkuil Link: https://lore.kernel.org/r/8dd22e21-4933-8e9c-a696-d281872c8de7@xs4all.nl Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 86bcd3a12999447faad60ec59c2d64d18d8e61ac Author: Lucas Stach Date: Mon Dec 2 09:37:00 2019 -0800 Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash F34 is a bit special as it reinitializes the device and related driver structs during the firmware update. This clears the fn_irq_mask which will then prevent F34 from receiving further interrupts, leading to timeouts during the firmware update. Make sure to reinitialize the IRQ enables at the appropriate times. The issue is in F34 code, but the commit in the fixes tag exposed the issue, as before this commit things would work by accident. Fixes: 363c53875aef (Input: synaptics-rmi4 - avoid processing unknown IRQs) Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20191129133514.23224-1-l.stach@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit df5b5e555b356662a5e4a23c6774fdfce8547d54 Author: Hans de Goede Date: Mon Dec 2 09:36:15 2019 -0800 Input: goodix - add upside-down quirk for Teclast X89 tablet The touchscreen on the Teclast X89 is mounted upside down in relation to the display orientation (the touchscreen itself is mounted upright, but the display is mounted upside-down). Add a quirk for this so that we send coordinates which match the display orientation. Signed-off-by: Hans de Goede Reviewed-by: Bastien Nocera Link: https://lore.kernel.org/r/20191202085636.6650-1-hdegoede@redhat.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 25b2f1b77a92b4d850d40eca50d446dd25c09934 Author: Mathew King Date: Wed Dec 4 17:27:47 2019 -0800 Input: add privacy screen toggle keycode Add keycode for toggling electronic privacy screen to the keycodes definition. Some new laptops have a privacy screen which can be toggled with a key on the keyboard. Signed-off-by: Mathew King Link: https://lore.kernel.org/r/20191017163208.235518-1-mathewk@chromium.org Signed-off-by: Dmitry Torokhov commit d4b675e1b5272149d4c6fac6870df6ebdbd8be82 Author: Marcel Holtmann Date: Wed Dec 4 17:27:16 2019 -0800 Input: uinput - fix returning EPOLLOUT from uinput_poll Always return EPOLLOUT from uinput_poll to allow polling /dev/uinput for writable state. Signed-off-by: Marcel Holtmann Link: https://lore.kernel.org/r/20191204025014.5189-1-marcel@holtmann.org Signed-off-by: Dmitry Torokhov commit 6bf6affe18dafea6ef12036001162ac7f2dbf738 Author: Stanislav Fomichev Date: Mon Dec 2 13:59:31 2019 -0800 selftests/bpf: Bring back c++ include/link test Commit 5c26f9a78358 ("libbpf: Don't use cxx to test_libpf target") converted existing c++ test to c. We still want to include and link against libbpf from c++ code, so reinstate this test back, this time in a form of a selftest with a clear comment about its purpose. v2: * -lelf -> $(LDLIBS) (Andrii Nakryiko) Fixes: 5c26f9a78358 ("libbpf: Don't use cxx to test_libpf target") Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191202215931.248178-1-sdf@google.com commit 1e55c176f8f503c7dccba6e2b237f26a065ff79c Author: Dmitry Torokhov Date: Wed Dec 4 17:56:24 2019 -0800 Input: snvs_pwrkey - remove gratuitous NULL initializers Gratuitous NULL initializers rarely help and often prevent compiler from warning about using uninitialized variable. Let's remove them. Reviewed-by: Anson Huang Link: https://lore.kernel.org/r/20191125211407.GA97812@dtor-ws Signed-off-by: Dmitry Torokhov commit 01d434ce98d38e36901c72493b96afc4075ee887 Author: Stanislav Fomichev Date: Mon Dec 2 12:01:43 2019 -0800 selftests/bpf: Don't hard-code root cgroup id Commit 40430452fd5d ("kernfs: use 64bit inos if ino_t is 64bit") changed the way cgroup ids are exposed to the userspace. Instead of assuming fixed root id, let's query it. Fixes: 40430452fd5d ("kernfs: use 64bit inos if ino_t is 64bit") Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191202200143.250793-1-sdf@google.com commit edbca120a8cdfa5a5793707e33497aa5185875ca Author: Jesper Dangaard Brouer Date: Mon Dec 2 13:37:31 2019 +0100 samples/bpf: Fix broken xdp_rxq_info due to map order assumptions In the days of using bpf_load.c the order in which the 'maps' sections were defines in BPF side (*_kern.c) file, were used by userspace side to identify the map via using the map order as an index. In effect the order-index is created based on the order the maps sections are stored in the ELF-object file, by the LLVM compiler. This have also carried over in libbpf via API bpf_map__next(NULL, obj) to extract maps in the order libbpf parsed the ELF-object file. When BTF based maps were introduced a new section type ".maps" were created. I found that the LLVM compiler doesn't create the ".maps" sections in the order they are defined in the C-file. The order in the ELF file is based on the order the map pointer is referenced in the code. This combination of changes lead to xdp_rxq_info mixing up the map file-descriptors in userspace, resulting in very broken behaviour, but without warning the user. This patch fix issue by instead using bpf_object__find_map_by_name() to find maps via their names. (Note, this is the ELF name, which can be longer than the name the kernel retains). Fixes: be5bca44aa6b ("samples: bpf: convert some XDP samples from bpf_load to libbpf") Fixes: 451d1dc886b5 ("samples: bpf: update map definition to new syntax BTF-defined map") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157529025128.29832.5953245340679936909.stgit@firesoul commit d04ac224b1688f005a84f764cfe29844f8e9da08 Author: Martin Varghese Date: Thu Dec 5 05:57:22 2019 +0530 net: Fixed updating of ethertype in skb_mpls_push() The skb_mpls_push was not updating ethertype of an ethernet packet if the packet was originally received from a non ARPHRD_ETHER device. In the below OVS data path flow, since the device corresponding to port 7 is an l3 device (ARPHRD_NONE) the skb_mpls_push function does not update the ethertype of the packet even though the previous push_eth action had added an ethernet header to the packet. recirc_id(0),in_port(7),eth_type(0x0800),ipv4(tos=0/0xfc,ttl=64,frag=no), actions:push_eth(src=00:00:00:00:00:00,dst=00:00:00:00:00:00), push_mpls(label=13,tc=0,ttl=64,bos=1,eth_type=0x8847),4 Fixes: 8822e270d697 ("net: core: move push MPLS functionality from OvS to core helper") Signed-off-by: Martin Varghese Signed-off-by: David S. Miller commit b53bd16fec3d52ff7be1648a9b0a747288f52cf8 Merge: b7fa0cde29c8 e5a6ca27eb72 Author: Dave Airlie Date: Thu Dec 5 11:11:06 2019 +1000 Merge tag 'drm-misc-next-fixes-2019-12-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-next mgag200- Fix hw with broken 'startadd' support (Thomas) mst- Avoid skipping payloads in payload deletion loop (Wayne) omap- Fix dma_addr refcounting (Tomi) Cc: Wayne Lin Cc: Tomi Valkeinen Cc: Thomas Zimmermann Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191204212255.GA256395@art_vandelay commit 099ffd7eddfe03b9b5b43e1f4ffece99121dd7ba Author: Alexandru Ardelean Date: Wed Dec 4 09:58:09 2019 +0200 NFC: NCI: use new `delay` structure for SPI transfer delays In a recent change to the SPI subsystem [1], a new `delay` struct was added to replace the `delay_usecs`. This change replaces the current `delay_secs` with `delay` for this driver. The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure that both `delay_usecs` & `delay` are used (in this order to preserve backwards compatibility). [1] commit bebcfd272df6485 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Signed-off-by: Alexandru Ardelean Signed-off-by: David S. Miller commit 38ecd706ca78525d9c4e3bdf9dbe4d2860c125ef Author: Russell King Date: Tue Dec 3 23:51:28 2019 +0000 net: sfp: fix hwmon The referenced commit below allowed more than one hwmon device to be created per SFP, which is definitely not what we want. Avoid this by only creating the hwmon device just as we transition to WAITDEV state. Fixes: 139d3a212a1f ("net: sfp: allow modules with slow diagnostics to probe") Signed-off-by: Russell King Signed-off-by: David S. Miller commit 0cb96b5749bf500f3612cda52fc98eb795fcd62d Author: Russell King Date: Tue Dec 3 23:51:22 2019 +0000 net: sfp: fix unbind When unbinding, we don't correctly tear down the module state, leaving (for example) the hwmon registration behind. Ensure everything is properly removed by sending a remove event at unbind. Fixes: 6b0da5c9c1a3 ("net: sfp: track upstream's attachment state in state machine") Signed-off-by: Russell King Signed-off-by: David S. Miller commit b7fa0cde29c87a6d3f0a11d24c46f52549e5a5c1 Merge: 4673402ebf9f d66dfcf80d0f Author: Dave Airlie Date: Thu Dec 5 10:52:58 2019 +1000 Merge tag 'drm/tegra/for-5.5-rc1-fixes' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Fixes for v5.5-rc1 This is a set of small fixes, mostly for regressions introduced with the DMA API and DisplayPort support in the main pull request for v5.5-rc1. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191204124316.3534855-1-thierry.reding@gmail.com commit ffac2027e18f006f42630f2e01a8a9bd8dc664b5 Author: Shannon Nelson Date: Tue Dec 3 14:17:34 2019 -0800 ionic: keep users rss hash across lif reset If the user has specified their own RSS hash key, don't lose it across queue resets such as DOWN/UP, MTU change, and number of channels change. This is fixed by moving the key initialization to a little earlier in the lif creation. Also, let's clean up the RSS config a little better on the way down by setting it all to 0. Fixes: aa3198819bea ("ionic: Add RSS support") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 86c76c09898332143be365c702cf8d586ed4ed21 Author: Jonathan Lemon Date: Tue Dec 3 14:01:14 2019 -0800 xdp: obtain the mem_id mutex before trying to remove an entry. A lockdep splat was observed when trying to remove an xdp memory model from the table since the mutex was obtained when trying to remove the entry, but not before the table walk started: Fix the splat by obtaining the lock before starting the table walk. Fixes: c3f812cea0d7 ("page_pool: do not release pool until inflight == 0.") Reported-by: Grygorii Strashko Signed-off-by: Jonathan Lemon Tested-by: Grygorii Strashko Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 95219afbb980f10934de9f23a3e199be69c5ed09 Author: Aaron Conole Date: Tue Dec 3 16:34:14 2019 -0500 act_ct: support asymmetric conntrack The act_ct TC module shares a common conntrack and NAT infrastructure exposed via netfilter. It's possible that a packet needs both SNAT and DNAT manipulation, due to e.g. tuple collision. Netfilter can support this because it runs through the NAT table twice - once on ingress and again after egress. The act_ct action doesn't have such capability. Like netfilter hook infrastructure, we should run through NAT twice to keep the symmetry. Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct") Signed-off-by: Aaron Conole Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 5d50aa83e2c8e91ced2cca77c198b468ca9210f4 Author: Aaron Conole Date: Tue Dec 3 16:34:13 2019 -0500 openvswitch: support asymmetric conntrack The openvswitch module shares a common conntrack and NAT infrastructure exposed via netfilter. It's possible that a packet needs both SNAT and DNAT manipulation, due to e.g. tuple collision. Netfilter can support this because it runs through the NAT table twice - once on ingress and again after egress. The openvswitch module doesn't have such capability. Like netfilter hook infrastructure, we should run through NAT twice to keep the symmetry. Fixes: 05752523e565 ("openvswitch: Interface with NAT.") Signed-off-by: Aaron Conole Signed-off-by: David S. Miller commit 08bdcc35f00c91b325195723cceaba0937a89ddf Author: Jens Axboe Date: Wed Dec 4 17:19:44 2019 -0700 io-wq: clear node->next on list deletion If someone removes a node from a list, and then later adds it back to a list, we can have invalid data in ->next. This can cause all sorts of issues. One such use case is the IORING_OP_POLL_ADD command, which will do just that if we race and get woken twice without any pending events. This is a pretty rare case, but can happen under extreme loads. Dan reports that he saw the following crash: BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD d283ce067 P4D d283ce067 PUD e5ca04067 PMD 0 Oops: 0002 [#1] SMP CPU: 17 PID: 10726 Comm: tao:fast-fiber Kdump: loaded Not tainted 5.2.9-02851-gac7bc042d2d1 #116 Hardware name: Quanta Twin Lakes MP/Twin Lakes Passive MP, BIOS F09_3A17 05/03/2019 RIP: 0010:io_wqe_enqueue+0x3e/0xd0 Code: 34 24 74 55 8b 47 58 48 8d 6f 50 85 c0 74 50 48 89 df e8 35 7c 75 00 48 83 7b 08 00 48 8b 14 24 0f 84 84 00 00 00 48 8b 4b 10 <48> 89 11 48 89 53 10 83 63 20 fe 48 89 c6 48 89 df e8 0c 7a 75 00 RSP: 0000:ffffc90006858a08 EFLAGS: 00010082 RAX: 0000000000000002 RBX: ffff889037492fc0 RCX: 0000000000000000 RDX: ffff888e40cc11a8 RSI: ffff888e40cc11a8 RDI: ffff889037492fc0 RBP: ffff889037493010 R08: 00000000000000c3 R09: ffffc90006858ab8 R10: 0000000000000000 R11: 0000000000000000 R12: ffff888e40cc11a8 R13: 0000000000000000 R14: 00000000000000c3 R15: ffff888e40cc1100 FS: 00007fcddc9db700(0000) GS:ffff88903fa40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000e479f5003 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: io_poll_wake+0x12f/0x2a0 __wake_up_common+0x86/0x120 __wake_up_common_lock+0x7a/0xc0 sock_def_readable+0x3c/0x70 tcp_rcv_established+0x557/0x630 tcp_v6_do_rcv+0x118/0x3c0 tcp_v6_rcv+0x97e/0x9d0 ip6_protocol_deliver_rcu+0xe3/0x440 ip6_input+0x3d/0xc0 ? ip6_protocol_deliver_rcu+0x440/0x440 ipv6_rcv+0x56/0xd0 ? ip6_rcv_finish_core.isra.18+0x80/0x80 __netif_receive_skb_one_core+0x50/0x70 netif_receive_skb_internal+0x2f/0xa0 napi_gro_receive+0x125/0x150 mlx5e_handle_rx_cqe+0x1d9/0x5a0 ? mlx5e_poll_tx_cq+0x305/0x560 mlx5e_poll_rx_cq+0x49f/0x9c5 mlx5e_napi_poll+0xee/0x640 ? smp_reschedule_interrupt+0x16/0xd0 ? reschedule_interrupt+0xf/0x20 net_rx_action+0x286/0x3d0 __do_softirq+0xca/0x297 irq_exit+0x96/0xa0 do_IRQ+0x54/0xe0 common_interrupt+0xf/0xf RIP: 0033:0x7fdc627a2e3a Code: 31 c0 85 d2 0f 88 f6 00 00 00 55 48 89 e5 41 57 41 56 4c 63 f2 41 55 41 54 53 48 83 ec 18 48 85 ff 0f 84 c7 00 00 00 48 8b 07 <41> 89 d4 49 89 f5 48 89 fb 48 85 c0 0f 84 64 01 00 00 48 83 78 10 when running a networked workload with about 5000 sockets being polled for. Fix this by clearing node->next when the node is being removed from the list. Fixes: 6206f0e180d4 ("io-wq: shrink io_wq_work a bit") Reported-by: Dan Melnic Signed-off-by: Jens Axboe commit 551003fff7235ce935bc1fefb72d12b63a408bd0 Author: Aneesh Kumar K.V Date: Mon Dec 2 12:10:18 2019 +0530 powerpc/pmem: Convert to EXPORT_SYMBOL_GPL All other architecture export this as GPL symbol Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191202064018.155083-1-aneesh.kumar@linux.ibm.com commit b6afd1234cf93aa0d71b4be4788c47534905f0be Author: Ard Biesheuvel Date: Wed Dec 4 11:50:15 2019 +0000 powerpc/archrandom: fix arch_get_random_seed_int() Commit 01c9348c7620ec65 powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* updated arch_get_random_[int|long]() to be NOPs, and moved the hardware RNG backing to arch_get_random_seed_[int|long]() instead. However, it failed to take into account that arch_get_random_int() was implemented in terms of arch_get_random_long(), and so we ended up with a version of the former that is essentially a NOP as well. Fix this by calling arch_get_random_seed_long() from arch_get_random_seed_int() instead. Fixes: 01c9348c7620ec65 ("powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_*") Signed-off-by: Ard Biesheuvel Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191204115015.18015-1-ardb@kernel.org commit e5a6ca27eb72c67533ddfc11c06df84beaa167fa Author: Wayne Lin Date: Tue Dec 3 12:24:23 2019 +0800 drm/dp_mst: Correct the bug in drm_dp_update_payload_part1() [Why] If the payload_state is DP_PAYLOAD_DELETE_LOCAL in series, current code doesn't delete the payload at current index and just move the index to next one after shuffling payloads. [How] Drop the i++ increasing part in for loop head and decide whether to increase the index or not according to payload_state of current payload. Changes since v1: * Refine the code to have it easy reading * Amend the commit message to meet the way code is modified now. Signed-off-by: Wayne Lin Reviewed-by: Lyude Paul Fixes: 706246c761dd ("drm/dp_mst: Refactor drm_dp_update_payload_part1()") Cc: Daniel Vetter Cc: Juston Li Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: # v5.1+ [Added cc for stable] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191203042423.5961-1-Wayne.Lin@amd.com commit 7b3b209e61adf575faf21d08a47f6a842b7b0767 Merge: 8ffb055beae5 6c8991f41546 Author: David S. Miller Date: Wed Dec 4 12:27:13 2019 -0800 Merge branch 'net-convert-ipv6_stub-to-ip6_dst_lookup_flow' Sabrina Dubroca says: ==================== net: convert ipv6_stub to ip6_dst_lookup_flow Xiumei Mu reported a bug in a VXLAN over IPsec setup: IPv6 | ESP | VXLAN Using this setup, packets go out unencrypted, because VXLAN over IPv6 gets its route from ipv6_stub->ipv6_dst_lookup (in vxlan6_get_route), which doesn't perform an XFRM lookup. This patchset first makes ip6_dst_lookup_flow suitable for some existing users of ipv6_stub->ipv6_dst_lookup by adding a 'net' argument, then converts all those users. ==================== Signed-off-by: David S. Miller commit 6c8991f41546c3c472503dff1ea9daaddf9331c2 Author: Sabrina Dubroca Date: Wed Dec 4 15:35:53 2019 +0100 net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_output helpers) for their IPv4 lookups, which calls xfrm_lookup_route(). This patch fixes this inconsistent behavior by switching the stub to ip6_dst_lookup_flow, which also calls xfrm_lookup_route(). This requires some changes in all the callers, as these two functions take different arguments and have different return types. Fixes: 5f81bd2e5d80 ("ipv6: export a stub for IPv6 symbols used by vxlan") Reported-by: Xiumei Mu Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller commit c4e85f73afb6384123e5ef1bba3315b2e3ad031e Author: Sabrina Dubroca Date: Wed Dec 4 15:35:52 2019 +0100 net: ipv6: add net argument to ip6_dst_lookup_flow This will be used in the conversion of ipv6_stub to ip6_dst_lookup_flow, as some modules currently pass a net argument without a socket to ip6_dst_lookup. This is equivalent to commit 343d60aada5a ("ipv6: change ipv6_stub_impl.ipv6_dst_lookup to take net argument"). Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller commit fd9bee5e24141d00e23b66d1b51bc759efa7e3fe Author: Arnaldo Carvalho de Melo Date: Wed Dec 4 12:53:16 2019 -0300 tools headers UAPI: Update tools's copy of drm.h headers Picking the changes from: 2093dea3def9 ("drm/syncobj: extend syncobj query ability v3") Which doesn't affect tooling, just silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h' diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h Cc: Adrian Hunter Cc: Christian König Cc: Chunming Zhou Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-t1xqmjffo4rxdw395dsnu34j@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0b3fca6ad3283866e9d2376554b3e4fbf23bfd5d Author: Arnaldo Carvalho de Melo Date: Wed Dec 4 12:49:43 2019 -0300 tools headers UAPI: Sync drm/i915_drm.h with the kernel sources To pick the change in: a0e047156cde ("drm/i915/gem: Make context persistence optional") 9cd20ef7803c ("drm/i915/perf: allow holding preemption on filtered ctx") 7831e9a965ea ("drm/i915/perf: Allow dynamic reconfiguration of the OA stream") 4f6ccc74a85c ("drm/i915: add support for perf configuration queries") b8d49f28aa03 ("drm/i915/perf: introduce a versioning of the i915-perf uapi") 601734f7aabd ("drm/i915/tgl: s/ss/eu fuse reading support") 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: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Jiri Olsa Cc: Lionel Landwerlin Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-qwzjrgwj55y3g6rjdf9spkpr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit aedc0650f9135f3b92b39cbed1a8fe98d8088825 Merge: 6cdc7f2efc25 7d73710d9ca2 Author: Linus Torvalds Date: Wed Dec 4 11:08:30 2019 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more KVM updates from Paolo Bonzini: - PPC secure guest support - small x86 cleanup - fix for an x86-specific out-of-bounds write on a ioctl (not guest triggerable, data not attacker-controlled) * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: vmx: Stop wasting a page for guest_msrs KVM: x86: fix out-of-bounds write in KVM_GET_EMULATED_CPUID (CVE-2019-19332) Documentation: kvm: Fix mention to number of ioctls classes powerpc: Ultravisor: Add PPC_UV config option KVM: PPC: Book3S HV: Support reset of secure guest KVM: PPC: Book3S HV: Handle memory plug/unplug to secure VM KVM: PPC: Book3S HV: Radix changes for secure guest KVM: PPC: Book3S HV: Shared pages support for secure guests KVM: PPC: Book3S HV: Support for running secure guests mm: ksm: Export ksm_madvise() KVM x86: Move kvm cpuid support out of svm commit 6cdc7f2efc25a6dbddf7c57bb2eee5d6c033d678 Merge: ef66f6b8e3f5 1646220a6d4b Author: Linus Torvalds Date: Wed Dec 4 11:07:00 2019 -0800 Merge tag 'riscv/for-v5.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull more RISC-V updates from Paul Walmsley: "A few minor RISC-V updates for v5.5-rc1 that arrived late. New features: - Dump some kernel virtual memory map details to the console if CONFIG_DEBUG_VM is enabled Other improvements: - Enable more debugging options in the primary defconfigs Cleanups: - Clean up Kconfig indentation" * tag 'riscv/for-v5.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Add address map dumper riscv: defconfigs: enable more debugging options riscv: defconfigs: enable debugfs riscv: Fix Kconfig indentation commit ef66f6b8e3f585ab6c42ed49c5f2e7d2d88bb43e Merge: b92f3d32e098 240b62d381fe Author: Linus Torvalds Date: Wed Dec 4 11:05:13 2019 -0800 Merge tag 'please-pull-misc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 update from Tony Luck: "Cleanup some leftover para-virtualization pieces" * tag 'please-pull-misc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: ia64: remove stale paravirt leftovers commit b92f3d32e098a39c2136ee0729174e829a1cf335 Merge: ef867c12f31d b65d56305c6f Author: Linus Torvalds Date: Wed Dec 4 10:56:35 2019 -0800 Merge tag 'acpi-5.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull additional ACPI updates from Rafael Wysocki: "These close a nasty race condition in the ACPI memory mappings management code and an invalid parameter check in a library routing, allow GPE 0xFF to be masked via kernel command line, add a new lid switch blacklist entry and clean up Kconfig. Specifics: - Fix locking issue in acpi_os_map_cleanup() leading to a race condition that can be harnessed for provoking a kernel panic from user space (Francesco Ruggeri) - Fix parameter check in acpi_bus_get_private_data() (Vamshi K Sthambamkadi) - Allow GPE 0xFF to be masked via kernel command line (Yunfeng Ye) - Add a new lid switch blacklist entry for Acer Switch 10 SW5-032 to the ACPI button driver (Hans de Goede) - Clean up Kconfig (Krzysztof Kozlowski)" * tag 'acpi-5.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data() ACPI: Fix Kconfig indentation ACPI: OSL: only free map once in osl.c ACPI: button: Add DMI quirk for Acer Switch 10 SW5-032 lid-switch ACPI: sysfs: Change ACPI_MASKABLE_GPE_MAX to 0x100 commit ef867c12f31dec4a03be5678d70893f97dc76ea7 Merge: 63de37476ebd 1e4230f56dac Author: Linus Torvalds Date: Wed Dec 4 10:48:09 2019 -0800 Merge tag 'pm-5.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull additional power management updates from Rafael Wysocki: "These fix an ACPI EC driver bug exposed by the recent rework of the suspend-to-idle code flow, reintroduce frequency constraints into device PM QoS (in preparation for adding QoS support to devfreq), drop a redundant field from struct cpuidle_state and clean up Kconfig in some places. Specifics: - Avoid a race condition in the ACPI EC driver that may cause systems to be unable to leave suspend-to-idle (Rafael Wysocki) - Drop the "disabled" field, which is redundant, from struct cpuidle_state (Rafael Wysocki) - Reintroduce device PM QoS frequency constraints (temporarily introduced and than dropped during the 5.4 cycle) in preparation for adding QoS support to devfreq (Leonard Crestez) - Clean up indentation (in multiple places) and the cpuidle drivers help text in Kconfig (Krzysztof Kozlowski, Randy Dunlap)" * tag 'pm-5.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: s2idle: Rework ACPI events synchronization ACPI: EC: Rework flushing of pending work PM / devfreq: Add missing locking while setting suspend_freq PM / QoS: Restore DEV_PM_QOS_MIN/MAX_FREQUENCY PM / QoS: Reorder pm_qos/freq_qos/dev_pm_qos structs PM / QoS: Initial kunit test PM / QoS: Redefine FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX power: avs: Fix Kconfig indentation cpufreq: Fix Kconfig indentation cpuidle: minor Kconfig help text fixes cpuidle: Drop disabled field from struct cpuidle_state cpuidle: Fix Kconfig indentation commit 2d28390aff879238f00e209e38c2a0b78717360e Author: Jens Axboe Date: Wed Dec 4 11:08:05 2019 -0700 io_uring: ensure deferred timeouts copy necessary data If we defer a timeout, we should ensure that we copy the timespec when we have consumed the sqe. This is similar to commit f67676d160c6 for read/write requests. We already did this correctly for timeouts deferred as links, but do it generally and use the infrastructure added by commit 1a6b74fc8702 instead of having the timeout deferral use its own. Signed-off-by: Jens Axboe commit 9a7d5a9e6d7921e1854b4606ce8c3e17d565f463 Author: Aurelien Aptel Date: Wed Dec 4 16:14:54 2019 +0100 cifs: fix possible uninitialized access and race on iface_list iface[0] was accessed regardless of the count value and without locking. * check count before accessing any ifaces * make copy of iface list (it's a simple POD array) and use it without locking. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French Reviewed-by: Paulo Alcantara (SUSE) commit 3345bb44bacd99413a3dc0dcd9a99449d88d4dda Author: Paulo Alcantara (SUSE) Date: Wed Dec 4 11:25:06 2019 -0300 cifs: Fix lookup of SMB connections on multichannel With the addition of SMB session channels, we introduced new TCP server pointers that have no sessions or tcons associated with them. In this case, when we started looking for TCP connections, we might end up picking session channel rather than the master connection, hence failing to get either a session or a tcon. In order to fix that, this patch introduces a new "is_channel" field to TCP_Server_Info structure so we can skip session channels during lookup of connections. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 901e59bba9ddad4bc6994ecb8598ea60a993da4c Author: Jens Axboe Date: Wed Dec 4 10:34:03 2019 -0700 io_uring: allow IO_SQE_* flags on IORING_OP_TIMEOUT There's really no reason why we forbid things like link/drain etc on regular timeout commands. Enable the usual SQE flags on timeouts. Reported-by: 李通洲 Signed-off-by: Jens Axboe commit 1cea335d1db1ce6ab71b3d2f94a807112b738a0f Author: Christoph Hellwig Date: Wed Dec 4 09:33:52 2019 -0800 iomap: fix sub-page uptodate handling bio completions can race when a page spans more than one file system block. Add a spinlock to synchronize marking the page uptodate. Fixes: 9dc55f1389f9 ("iomap: add support for sub-pagesize buffered I/O without buffer heads") Reported-by: Jan Stancek Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9917b54aded12dff9beb9e709981617b788e44b0 Merge: 026948f01eac d567fb881916 Author: Alex Williamson Date: Wed Dec 4 10:15:56 2019 -0700 Merge branch 'v5.5/vfio/jiang-yi-irq-bypass-unregister-v1' into v5.5/vfio/next commit d9c148cfaf0a99296ad7c92fb8b65952196053ec Author: Tomi Valkeinen Date: Thu Nov 14 10:03:43 2019 +0200 drm/omap: fix dma_addr refcounting cec4fa7511ef7a73eb635834e9d85b25a5b47a98 ("drm/omap: use refcount API to track the number of users of dma_addr") changed omap_gem.c to use refcounting API to track dma_addr uses. However, the driver only tracks the refcounts for non-contiguous buffers, and the patch didn't fully take this in account. After the patch, the driver always decreased refcount in omap_gem_unpin, instead of decreasing the refcount only for non-contiguous buffers. This leads to refcounting mismatch. As for the contiguous cases the refcount is never increased, fix this issue by returning from omap_gem_unpin if the buffer being unpinned is contiguous. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20191114080343.30704-1-tomi.valkeinen@ti.com Fixes: cec4fa7511ef ("drm/omap: use refcount API to track the number of users of dma_addr") Reviewed-by: Laurent Pinchart commit bca1c43cb2dbe4212aea0793bfd91aeb4c2d184d Author: Jens Axboe Date: Wed Dec 4 09:17:41 2019 -0700 null_blk: remove unused variable warning on !CONFIG_BLK_DEV_ZONED If BLK_DEV_ZONED isn't set, 'ret' isn't used. This makes gcc complain, rightfully. Move ret where it is used. Fixes: 979d54475e0b ("null_blk: cleanup null_gendisk_register") Signed-off-by: Jens Axboe commit f1acbf2186dfe761a05ce35c0f36246caed44403 Author: Ming Lei Date: Wed Dec 4 19:31:15 2019 +0800 brd: warn on un-aligned buffer Queue dma alignment limit requires users(fs, target, ...) of block layer to pass aligned buffer. So far brd doesn't support un-aligned buffer, even though it is easy to support it. However, given brd is often used for debug purpose, and there are other drivers which can't support un-aligned buffer too. So add warning so that brd users know what to fix. Reported-by: Stephen Rust Cc: Stephen Rust Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 36582a5a456100ebe4983e3d63b8cbc7e62a0ddc Author: Ming Lei Date: Wed Dec 4 19:31:14 2019 +0800 brd: remove max_hw_sectors queue limit Now we depend on blk_queue_split() to respect most of queue limit (the only one exception could be dma alignment), however blk_queue_split() isn't used for brd, so this limit isn't respected since v4.3. Also max_hw_sectors limit doesn't play a big role for brd, which is added since brd is added to tree for unknown reason. So remove it. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 29f6eeca0e14b301d9c03a3164b852c318d6348a Author: Adrian Hunter Date: Wed Dec 4 14:08:00 2019 +0200 perf inject: Fix processing of ID index for injected instruction tracing The ID index event is used when decoding, but can result in the following error: $ perf record --aux-sample -e '{intel_pt//,branch-misses}:u' ls $ perf inject -i perf.data -o perf.data.inj --itrace=be $ perf script -i perf.data.inj 0x1020 [0x410]: failed to process type: 69 [No such file or directory] Fix by having 'perf inject' drop the ID index event. Fixes: c0a6de06c446 ("perf record: Add support for AUX area sampling") Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191204120800.8138-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit bb30acae4c4dacfa2622387c5ad5563246810583 Author: Ravi Bangoria Date: Thu Nov 14 18:52:13 2019 +0530 perf report: Bail out --mem-mode if mem info is not available If perf.data is recorded without -d, don't allow user to use --mem-mode with 'perf report'. symbol_daddr and phys_daddr can be recorded separately and may be present in the perf.data but at the report time they are associated with mem-mode fields and thus this restriction applies to them as well. Before: $ perf record ls $ perf report --mem-mode --stdio # Overhead Local Weight Memory access Symbol # ........ ............ ............. ....................... 55.56% 0 N/A [k] 0xffffffff81a00ae7 After: $ perf report --mem-mode --stdio Error: Selected --mem-mode but no mem data. Did you call perf record without -d? Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191114132213.5419-4-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit aa6b3c99236b49a3e842d7272efa2529f15f7d8a Author: Ravi Bangoria Date: Thu Nov 14 18:52:12 2019 +0530 perf report: Make -F more strict like -s Currently -F allows branch-mode / mem-mode fields with -F even when perf report is not running in that mode. Don't allow that. Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191114132213.5419-3-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit ae87405fb511d6220ce86b9a60807fef92e1a934 Author: Ravi Bangoria Date: Thu Nov 14 18:52:11 2019 +0530 perf report/top TUI: Replace pr_err() with ui__error() pr_err() in TUI mode does not print anyting on the screen and just quits. Replace such pr_err() with ui__error(). Before: $ perf report -s + $ After: $ perf report -s + ┌─Error:────────────────┐ │Invalid --sort key: `+'│ │ │ │Press any key... │ └───────────────────────┘ Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191114132213.5419-2-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 4cc8d6505ab82db3357613d36e6c58a297f57f7c Author: Takashi Iwai Date: Wed Dec 4 15:48:24 2019 +0100 ALSA: pcm: oss: Avoid potential buffer overflows syzkaller reported an invalid access in PCM OSS read, and this seems to be an overflow of the internal buffer allocated for a plugin. Since the rate plugin adjusts its transfer size dynamically, the calculation for the chained plugin might be bigger than the given buffer size in some extreme cases, which lead to such an buffer overflow as caught by KASAN. Fix it by limiting the max transfer size properly by checking against the destination size in each plugin transfer callback. Reported-by: syzbot+f153bde47a62e0b05f83@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20191204144824.17801-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0b8d616fb5a8ffa307b1d3af37f55c15dae14f28 Author: Christian Brauner Date: Wed Oct 9 13:48:09 2019 +0200 taskstats: fix data-race When assiging and testing taskstats in taskstats_exit() there's a race when setting up and reading sig->stats when a thread-group with more than one thread exits: write to 0xffff8881157bbe10 of 8 bytes by task 7951 on cpu 0: taskstats_tgid_alloc kernel/taskstats.c:567 [inline] taskstats_exit+0x6b7/0x717 kernel/taskstats.c:596 do_exit+0x2c2/0x18e0 kernel/exit.c:864 do_group_exit+0xb4/0x1c0 kernel/exit.c:983 get_signal+0x2a2/0x1320 kernel/signal.c:2734 do_signal+0x3b/0xc00 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x250/0x2c0 arch/x86/entry/common.c:159 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x2d7/0x2f0 arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffff8881157bbe10 of 8 bytes by task 7949 on cpu 1: taskstats_tgid_alloc kernel/taskstats.c:559 [inline] taskstats_exit+0xb2/0x717 kernel/taskstats.c:596 do_exit+0x2c2/0x18e0 kernel/exit.c:864 do_group_exit+0xb4/0x1c0 kernel/exit.c:983 __do_sys_exit_group kernel/exit.c:994 [inline] __se_sys_exit_group kernel/exit.c:992 [inline] __x64_sys_exit_group+0x2e/0x30 kernel/exit.c:992 do_syscall_64+0xcf/0x2f0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix this by using smp_load_acquire() and smp_store_release(). Reported-by: syzbot+c5d03165a1bd1dead0c1@syzkaller.appspotmail.com Fixes: 34ec12349c8a ("taskstats: cleanup ->signal->stats allocation") Cc: stable@vger.kernel.org Signed-off-by: Christian Brauner Acked-by: Marco Elver Reviewed-by: Will Deacon Reviewed-by: Andrea Parri Reviewed-by: Dmitry Vyukov Link: https://lore.kernel.org/r/20191009114809.8643-1-christian.brauner@ubuntu.com commit f9bbb68233aa5bd5ef238bd3532fddf92fa1b53c Author: Mike Marshall Date: Tue Nov 26 12:39:37 2019 -0500 orangefs: posix open permission checking... Orangefs has no open, and orangefs checks file permissions on each file access. Posix requires that file permissions be checked on open and nowhere else. Orangefs-through-the-kernel needs to seem posix compliant. The VFS opens files, even if the filesystem provides no method. We can see if a file was successfully opened for read and or for write by looking at file->f_mode. When writes are flowing from the page cache, file is no longer available. We can trust the VFS to have checked file->f_mode before writing to the page cache. The mode of a file might change between when it is opened and IO commences, or it might be created with an arbitrary mode. We'll make sure we don't hit EACCES during the IO stage by using UID 0. Some of the time we have access without changing to UID 0 - how to check? Signed-off-by: Mike Marshall commit a356646a56857c2e5ad875beec734d7145ecd49a Author: Steven Rostedt (VMware) Date: Mon Dec 2 16:25:27 2019 -0500 tracing: Do not create directories if lockdown is in affect If lockdown is disabling tracing on boot up, it prevents the tracing files from even bering created. But when that happens, there's several places that will give a warning that the files were not created as that is usually a sign of a bug. Add in strategic locations where a check is made to see if tracing is disabled by lockdown, and if it is, do not go further, and fail silently (but print that tracing is disabled by lockdown, without doing a WARN_ON()). Cc: Matthew Garrett Fixes: 17911ff38aa5 ("tracing: Add locked_down checks to the open calls of files created for tracefs") Signed-off-by: Steven Rostedt (VMware) commit 926d1650176448d7684b991fbe1a5b1a8289e97c Author: Gao Xiang Date: Sun Dec 1 16:01:09 2019 +0800 erofs: zero out when listxattr is called with no xattr As David reported [1], ENODATA returns when attempting to modify files by using EROFS as an overlayfs lower layer. The root cause is that listxattr could return unexpected -ENODATA by mistake for inodes without xattr. That breaks listxattr return value convention and it can cause copy up failure when used with overlayfs. Resolve by zeroing out if no xattr is found for listxattr. [1] https://lore.kernel.org/r/CAEvUa7nxnby+rxK-KRMA46=exeOMApkDMAV08AjMkkPnTPV4CQ@mail.gmail.com Link: https://lore.kernel.org/r/20191201084040.29275-1-hsiangkao@aol.com Fixes: cadf1ccf1b00 ("staging: erofs: add error handling for xattr submodule") Cc: # 4.19+ Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 552263456215ada7ee8700ce022d12b0cffe4802 Author: Vincenzo Frascino Date: Mon Dec 2 07:57:29 2019 +0000 powerpc: Fix vDSO clock_getres() clock_getres in the vDSO library has to preserve the same behaviour of posix_get_hrtimer_res(). In particular, posix_get_hrtimer_res() does: sec = 0; ns = hrtimer_resolution; and hrtimer_resolution depends on the enablement of the high resolution timers that can happen either at compile or at run time. Fix the powerpc vdso implementation of clock_getres keeping a copy of hrtimer_resolution in vdso data and using that directly. Fixes: a7f290dad32e ("[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel") Cc: stable@vger.kernel.org Signed-off-by: Vincenzo Frascino Reviewed-by: Christophe Leroy Acked-by: Shuah Khan [chleroy: changed CLOCK_REALTIME_RES to CLOCK_HRTIMER_RES] Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a55eca3a5e85233838c2349783bcb5164dae1d09.1575273217.git.christophe.leroy@c-s.fr commit 6f4679b956741d2da6ad3ebb738cbe1264ac8781 Author: Aneesh Kumar K.V Date: Wed Dec 4 10:59:09 2019 +0530 powerpc/pmem: Fix kernel crash due to wrong range value usage in flush_dcache_range This patch fix the below kernel crash. BUG: Unable to handle kernel data access on read at 0xc000000380000000 Faulting instruction address: 0xc00000000008b6f0 cpu 0x5: Vector: 300 (Data Access) at [c0000000d8587790] pc: c00000000008b6f0: arch_remove_memory+0x150/0x210 lr: c00000000008b720: arch_remove_memory+0x180/0x210 sp: c0000000d8587a20 msr: 800000000280b033 dar: c000000380000000 dsisr: 40000000 current = 0xc0000000d8558600 paca = 0xc00000000fff8f00 irqmask: 0x03 irq_happened: 0x01 pid = 1220, comm = ndctl enter ? for help memunmap_pages+0x33c/0x410 devm_action_release+0x30/0x50 release_nodes+0x30c/0x3a0 device_release_driver_internal+0x178/0x240 unbind_store+0x74/0x190 drv_attr_store+0x44/0x60 sysfs_kf_write+0x74/0xa0 kernfs_fop_write+0x1b0/0x260 __vfs_write+0x3c/0x70 vfs_write+0xe4/0x200 ksys_write+0x7c/0x140 system_call+0x5c/0x68 Fixes: 076265907cf9 ("powerpc: Chunk calls to flush_dcache_range in arch_*_memory") Reported-by: Sachin Sant Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191204052909.59145-1-aneesh.kumar@linux.ibm.com commit b67a95f2abff0c34e5667c15ab8900de73d8d087 Author: Cédric Le Goater Date: Tue Dec 3 17:36:42 2019 +0100 powerpc/xive: Skip ioremap() of ESB pages for LSI interrupts The PCI INTx interrupts and other LSI interrupts are handled differently under a sPAPR platform. When the interrupt source characteristics are queried, the hypervisor returns an H_INT_ESB flag to inform the OS that it should be using the H_INT_ESB hcall for interrupt management and not loads and stores on the interrupt ESB pages. A default -1 value is returned for the addresses of the ESB pages. The driver ignores this condition today and performs a bogus IO mapping. Recent changes and the DEBUG_VM configuration option make the bug visible with : kernel BUG at arch/powerpc/include/asm/book3s/64/pgtable.h:612! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix MMU=Hash SMP NR_CPUS=1024 NUMA pSeries Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-0.rc6.git0.1.fc32.ppc64le #1 NIP: c000000000f63294 LR: c000000000f62e44 CTR: 0000000000000000 REGS: c0000000fa45f0d0 TRAP: 0700 Not tainted (5.4.0-0.rc6.git0.1.fc32.ppc64le) ... NIP ioremap_page_range+0x4c4/0x6e0 LR ioremap_page_range+0x74/0x6e0 Call Trace: ioremap_page_range+0x74/0x6e0 (unreliable) do_ioremap+0x8c/0x120 __ioremap_caller+0x128/0x140 ioremap+0x30/0x50 xive_spapr_populate_irq_data+0x170/0x260 xive_irq_domain_map+0x8c/0x170 irq_domain_associate+0xb4/0x2d0 irq_create_mapping+0x1e0/0x3b0 irq_create_fwspec_mapping+0x27c/0x3e0 irq_create_of_mapping+0x98/0xb0 of_irq_parse_and_map_pci+0x168/0x230 pcibios_setup_device+0x88/0x250 pcibios_setup_bus_devices+0x54/0x100 __of_scan_bus+0x160/0x310 pcibios_scan_phb+0x330/0x390 pcibios_init+0x8c/0x128 do_one_initcall+0x60/0x2c0 kernel_init_freeable+0x290/0x378 kernel_init+0x2c/0x148 ret_from_kernel_thread+0x5c/0x80 Fixes: bed81ee181dd ("powerpc/xive: introduce H_INT_ESB hcall") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Cédric Le Goater Tested-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191203163642.2428-1-clg@kaod.org commit 71eb40fc53371bc247c8066ae76ad9e22ae1e18d Author: Christophe Leroy Date: Fri Nov 29 14:26:41 2019 +0000 powerpc/kasan: Fix boot failure with RELOCATABLE && FSL_BOOKE When enabling CONFIG_RELOCATABLE and CONFIG_KASAN on FSL_BOOKE, the kernel doesn't boot. relocate_init() requires KASAN early shadow area to be set up because it needs access to the device tree through generic functions. Call kasan_early_init() before calling relocate_init() Reported-by: Lexi Shao Fixes: 2edb16efc899 ("powerpc/32: Add KASAN support") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b58426f1664a4b344ff696d18cacf3b3e8962111.1575036985.git.christophe.leroy@c-s.fr commit d66dfcf80d0f55f95b9ea4a45ca41cc7115e9789 Author: Thierry Reding Date: Tue Dec 3 17:19:14 2019 +0100 drm/tegra: Run hub cleanup on ->remove() The call to tegra_display_hub_cleanup() that takes care of disabling the window groups is missing from the driver's ->remove() callback. Call it to make sure the runtime PM reference counts for the display controllers are balanced. Signed-off-by: Thierry Reding commit b06e145f7030bea2f307d3dc68a6b9aaf2dd905c Author: Thierry Reding Date: Tue Dec 3 17:19:13 2019 +0100 drm/tegra: sor: Make the +5V HDMI supply optional The SOR supports multiple display modes, but only when driving an HDMI monitor does it make sense to control the +5V power supply. eDP and DP don't need this, so make it optional. This fixes a crash observed during system suspend/resume. Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding commit a8817489dc3e3b1910842958a3b9d9e4832e99b0 Author: Thierry Reding Date: Tue Dec 3 17:19:12 2019 +0100 drm/tegra: Silence expected errors on IOMMU attach Subdevices may not be hooked up to an IOMMU via device tree. Detect such situations and avoid confusing users by not emitting an error message. Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding commit 82d73874d422b43359698f73c418a02322c886d5 Author: Thierry Reding Date: Tue Dec 3 17:19:11 2019 +0100 drm/tegra: vic: Export module device table Export the module device table to ensure the VIC compatible strings are listed in the module's aliases table. This in turn causes the driver to be automatically loaded on boot if VIC is the only enabled subdevice of the logical host1x DRM device. Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding commit be0b23f28c028bf11e47d16f79c784106286bcb7 Author: Thierry Reding Date: Tue Dec 3 17:19:10 2019 +0100 drm/tegra: sor: Implement system suspend/resume Upon system suspend, make sure the +5V HDMI regulator is disabled. This avoids potentially leaking current to the HDMI connector. This also makes sure that upon resume the regulator is enabled again, which in some cases is necessary to properly restore the state of the supply on resume. Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding commit c52e167b41940186d0f4d7364950b654b79b3ef7 Author: Thierry Reding Date: Tue Dec 3 17:19:09 2019 +0100 drm/tegra: Use proper IOVA address for cursor image The IOVA address for the cursor is the result of mapping the buffer object for the given display controller. Make sure to use the proper IOVA address as stored in the cursor's plane state. Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding commit 49f821919bb9d45de7f1cde6072de01d36235b5d Author: Thierry Reding Date: Tue Dec 3 17:19:08 2019 +0100 drm/tegra: gem: Remove premature import restrictions All the display related blocks on Tegra require contiguous memory. Using the DMA API, there is no knowing at import time which device will end up using the buffer, so it's not known whether or not an IOMMU will be used to map the buffer. Move the check for non-contiguous buffers/mappings to the tegra_dc_pin() function which is now the earliest point where it is known if a DMA BUF can be used by the given device or not. v2: add check for contiguous buffer/mapping in tegra_dc_pin() Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding commit 1f16deac766926f1f59a7c038e939b09ef8edfc8 Author: Thierry Reding Date: Tue Dec 3 17:19:07 2019 +0100 drm/tegra: gem: Properly pin imported buffers Buffers that are imported from a DMA-BUF don't have pages allocated with them. At the same time an SG table for them can't be derived using the DMA API helpers because the necessary information doesn't exist. However there's already an SG table that was created during import, so this can simply be duplicated. Signed-off-by: Thierry Reding commit 9569c3e9227c03e2b5eb341676e46b0bcbbeaa01 Author: Thierry Reding Date: Tue Dec 3 17:19:06 2019 +0100 drm/tegra: hub: Remove bogus connection mutex check The Tegra DRM never actually took that lock, so the driver was broken until generic locking was added in commit: commit b962a12050a387e4bbf3a48745afe1d29d396b0d Author: Rob Clark Date: Mon Oct 22 14:31:22 2018 +0200 drm/atomic: integrate modeset lock with private objects It's now no longer necessary to take that lock, so drop the check. v2: add rationale for why it is now safe to drop the check (Daniel) Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding commit 5e9c5236b7b86779b53b762f7e66240c3f18314b Author: Huanpeng Xin Date: Wed Dec 4 15:13:59 2019 +0800 spi: sprd: Fix the incorrect SPI register The original code used an incorrect SPI register to initialize the SPI controller in sprd_spi_init_hw(), thus fix it. Fixes: e7d973a31c24 ("spi: sprd: Add SPI driver for Spreadtrum SC9860") Signed-off-by: Huanpeng Xin Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/b4f7f89ec0fdc595335687bfbd9f962213bc4a1d.1575443510.git.baolin.wang7@gmail.com Signed-off-by: Mark Brown commit f3c7f7b636ef5061906aa119eccc2b8dbbaf7199 Author: Christophe JAILLET Date: Tue Dec 3 22:48:38 2019 +0100 regulator: s5m8767: Fix a warning message Axe a duplicated word ("property") in a warning message. Signed-off-by: Christophe JAILLET Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191203214838.9680-1-christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 7eccc05c7101f34cc36afe9405d15de6d4099fb4 Author: Hans de Goede Date: Tue Dec 3 23:14:42 2019 +0100 ASoC: Intel: bytcr_rt5640: Update quirk for Teclast X89 When the Teclast X89 quirk was added we did not have jack-detection support yet. Note the over-current detection limit is set to 2mA instead of the usual 1.5mA because this tablet tends to give false-positive button-presses when it is set to 1.5mA. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191203221442.2657-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit cba779d80a5d4ccb8bdeb799abd02bf7ba9be111 Author: Mark Brown Date: Thu Nov 21 13:51:32 2019 +0000 arm64: mm: Fix column alignment for UXN in kernel_page_tables UXN is the only individual PTE bit other than the PTE_ATTRINDX_MASK ones which doesn't have both a set and a clear value provided, meaning that the columns in the table won't all be aligned. The PTE_ATTRINDX_MASK values are all both mutually exclusive and longer so are listed last to make a single final column for those values. Ensure everything is aligned by providing a clear value for UXN. Acked-by: Mark Rutland Signed-off-by: Mark Brown Signed-off-by: Catalin Marinas commit ca2ef4ffabbef25644e02a98b0f48869f8be0375 Author: Mark Rutland Date: Mon Dec 2 16:11:07 2019 +0000 arm64: insn: consistently handle exit text A kernel built with KASAN && FTRACE_WITH_REGS && !MODULES, produces a boot-time splat in the bowels of ftrace: | [ 0.000000] ftrace: allocating 32281 entries in 127 pages | [ 0.000000] ------------[ cut here ]------------ | [ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:2019 ftrace_bug+0x27c/0x328 | [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.4.0-rc3-00008-g7f08ae53a7e3 #13 | [ 0.000000] Hardware name: linux,dummy-virt (DT) | [ 0.000000] pstate: 60000085 (nZCv daIf -PAN -UAO) | [ 0.000000] pc : ftrace_bug+0x27c/0x328 | [ 0.000000] lr : ftrace_init+0x640/0x6cc | [ 0.000000] sp : ffffa000120e7e00 | [ 0.000000] x29: ffffa000120e7e00 x28: ffff00006ac01b10 | [ 0.000000] x27: ffff00006ac898c0 x26: dfffa00000000000 | [ 0.000000] x25: ffffa000120ef290 x24: ffffa0001216df40 | [ 0.000000] x23: 000000000000018d x22: ffffa0001244c700 | [ 0.000000] x21: ffffa00011bf393c x20: ffff00006ac898c0 | [ 0.000000] x19: 00000000ffffffff x18: 0000000000001584 | [ 0.000000] x17: 0000000000001540 x16: 0000000000000007 | [ 0.000000] x15: 0000000000000000 x14: ffffa00010432770 | [ 0.000000] x13: ffff940002483519 x12: 1ffff40002483518 | [ 0.000000] x11: 1ffff40002483518 x10: ffff940002483518 | [ 0.000000] x9 : dfffa00000000000 x8 : 0000000000000001 | [ 0.000000] x7 : ffff940002483519 x6 : ffffa0001241a8c0 | [ 0.000000] x5 : ffff940002483519 x4 : ffff940002483519 | [ 0.000000] x3 : ffffa00011780870 x2 : 0000000000000001 | [ 0.000000] x1 : 1fffe0000d591318 x0 : 0000000000000000 | [ 0.000000] Call trace: | [ 0.000000] ftrace_bug+0x27c/0x328 | [ 0.000000] ftrace_init+0x640/0x6cc | [ 0.000000] start_kernel+0x27c/0x654 | [ 0.000000] random: get_random_bytes called from print_oops_end_marker+0x30/0x60 with crng_init=0 | [ 0.000000] ---[ end trace 0000000000000000 ]--- | [ 0.000000] ftrace faulted on writing | [ 0.000000] [] _GLOBAL__sub_D_65535_0___tracepoint_initcall_level+0x4/0x28 | [ 0.000000] Initializing ftrace call sites | [ 0.000000] ftrace record flags: 0 | [ 0.000000] (0) | [ 0.000000] expected tramp: ffffa000100b3344 This is due to an unfortunate combination of several factors. Building with KASAN results in the compiler generating anonymous functions to register/unregister global variables against the shadow memory. These functions are placed in .text.startup/.text.exit, and given mangled names like _GLOBAL__sub_{I,D}_65535_0_$OTHER_SYMBOL. The kernel linker script places these in .init.text and .exit.text respectively, which are both discarded at runtime as part of initmem. Building with FTRACE_WITH_REGS uses -fpatchable-function-entry=2, which also instruments KASAN's anonymous functions. When these are discarded with the rest of initmem, ftrace removes dangling references to these call sites. Building without MODULES implicitly disables STRICT_MODULE_RWX, and causes arm64's patch_map() function to treat any !core_kernel_text() symbol as something that can be modified in-place. As core_kernel_text() is only true for .text and .init.text, with the latter depending on system_state < SYSTEM_RUNNING, we'll treat .exit.text as something that can be patched in-place. However, .exit.text is mapped read-only. Hence in this configuration the ftrace init code blows up while trying to patch one of the functions generated by KASAN. We could try to filter out the call sites in .exit.text rather than initializing them, but this would be inconsistent with how we handle .init.text, and requires hooking into core bits of ftrace. The behaviour of patch_map() is also inconsistent today, so instead let's clean that up and have it consistently handle .exit.text. This patch teaches patch_map() to handle .exit.text at init time, preventing the boot-time splat above. The flow of patch_map() is reworked to make the logic clearer and minimize redundant conditionality. Fixes: 3b23e4991fb66f6d ("arm64: implement ftrace with regs") Signed-off-by: Mark Rutland Cc: Amit Daniel Kachhap Cc: Ard Biesheuvel Cc: Torsten Duwe Cc: Will Deacon Signed-off-by: Catalin Marinas commit 93b90414c33f59b7960bc8d607da0ce83377e021 Author: Will Deacon Date: Tue Dec 3 12:10:13 2019 +0000 arm64: mm: Fix initialisation of DMA zones on non-NUMA systems John reports that the recently merged commit 1a8e1cef7603 ("arm64: use both ZONE_DMA and ZONE_DMA32") breaks the boot on his DB845C board: | Booting Linux on physical CPU 0x0000000000 [0x517f803c] | Linux version 5.4.0-mainline-10675-g957a03b9e38f | Machine model: Thundercomm Dragonboard 845c | [...] | Built 1 zonelists, mobility grouping on. Total pages: -188245 | Kernel command line: earlycon | firmware_class.path=/vendor/firmware/ androidboot.hardware=db845c | init=/init androidboot.boot_devices=soc/1d84000.ufshc | printk.devkmsg=on buildvariant=userdebug root=/dev/sda2 | androidboot.bootdevice=1d84000.ufshc androidboot.serialno=c4e1189c | androidboot.baseband=sda | msm_drm.dsi_display0=dsi_lt9611_1080_video_display: | androidboot.slot_suffix=_a skip_initramfs rootwait ro init=/init | | This is because, when CONFIG_NUMA=n, zone_sizes_init() fails to handle memblocks that fall entirely within the ZONE_DMA region and erroneously ends up trying to add a negatively-sized region into the following ZONE_DMA32, which is later interpreted as a large unsigned region by the core MM code. Rework the non-NUMA implementation of zone_sizes_init() so that the start address of the memblock being processed is adjusted according to the end of the previous zone, which is then range-checked before updating the hole information of subsequent zones. Cc: Nicolas Saenz Julienne Cc: Christoph Hellwig Cc: Bjorn Andersson Link: https://lore.kernel.org/lkml/CALAqxLVVcsmFrDKLRGRq7GewcW405yTOxG=KR3csVzQ6bXutkA@mail.gmail.com Fixes: 1a8e1cef7603 ("arm64: use both ZONE_DMA and ZONE_DMA32") Reported-by: John Stultz Tested-by: John Stultz Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas commit 7d73710d9ca2564f29d291d0b3badc09efdf25e9 Author: Jim Mattson Date: Tue Dec 3 16:24:42 2019 -0800 kvm: vmx: Stop wasting a page for guest_msrs We will never need more guest_msrs than there are indices in vmx_msr_index. Thus, at present, the guest_msrs array will not exceed 168 bytes. Signed-off-by: Jim Mattson Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit 4bf2e385aa59c2fae5f880aa25cfd2b470109093 Author: Curtis Malainey Date: Tue Dec 3 09:30:07 2019 -0800 ASoC: core: Init pcm runtime work early to avoid warnings There are cases where we fail before we reach soc_new_pcm which would init the workqueue. When we fail we attempt to flush the queue which generates warnings from the workqueue subsystem when we have not inited the queue. Solution is to use a proxy function to get around this issue. Signed-off-by: Curtis Malainey Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20191203173007.46504-1-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 433f4ba1904100da65a311033f17a9bf586b287e Author: Paolo Bonzini Date: Wed Dec 4 10:28:54 2019 +0100 KVM: x86: fix out-of-bounds write in KVM_GET_EMULATED_CPUID (CVE-2019-19332) The bounds check was present in KVM_GET_SUPPORTED_CPUID but not KVM_GET_EMULATED_CPUID. Reported-by: syzbot+e3f4897236c4eeb8af4f@syzkaller.appspotmail.com Fixes: 84cffe499b94 ("kvm: Emulate MOVBE", 2013-10-29) Signed-off-by: Paolo Bonzini commit 14855954f63608c5622d5eaa964d3872ce5c5514 Author: Paul Durrant Date: Mon Dec 2 11:41:17 2019 +0000 xen-blkback: allow module to be cleanly unloaded Add a module_exit() to perform the necessary clean-up. Signed-off-by: Paul Durrant Reviewed-by: "Roger Pau Monné" Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 196748a276b4dee01177e6b7abcda27cd759de83 Author: Paul Durrant Date: Mon Dec 2 11:41:16 2019 +0000 xen/xenbus: reference count registered modules To prevent a PV driver module being removed whilst attached to its other end, and hence xenbus calling into potentially invalid text, take a reference on the module before calling the probe() method (dropping it if unsuccessful) and drop the reference after returning from the remove() method. Suggested-by: Jan Beulich Signed-off-by: Paul Durrant Reviewed-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 4f4afc2c9599520300b3f2b3666d2034fca03df3 Author: Michael Ellerman Date: Wed Dec 4 21:20:28 2019 +1100 docs/core-api: Remove possibly confusing sub-headings from Bit Operations The recent commit 81d2c6f81996 ("kasan: support instrumented bitops combined with generic bitops"), split the KASAN instrumented bitops into separate headers for atomic, non-atomic and locking operations. This was done to allow arches to include just the instrumented bitops they need, while also using some of the generic bitops in asm-generic/bitops (which are automatically instrumented). The generic bitops are already split into atomic, non-atomic and locking headers. This split required an update to kernel-api.rst because it included include/asm-generic/bitops-instrumented.h, which no longer exists. So now kernel-api.rst includes all three instrumented headers to get the definitions for all the bitops. When adding the three headers it seemed sensible to add sub-headings for each, ie. "Atomic", "Non-atomic" and "Locking". The confusion is that test_bit() is (and always has been) in non-atomic.h, but is documented elsewhere (atomic_bitops.txt) as being atomic. So having it appear under the "Non-atomic" heading is possibly confusing. Probably test_bit() should move from bitops/non-atomic.h to atomic.h, but that has flow on effects. For now just remove the newly added sub-headings in the documentation, so we at least aren't adding to the confusion about whether test_bit() is atomic or not. Signed-off-by: Michael Ellerman commit af164898482817a1d487964b68f3c21bae7a1beb Author: Dave Young Date: Wed Dec 4 15:52:33 2019 +0800 x86/efi: Update e820 with reserved EFI boot services data to fix kexec breakage Michael Weiser reported that he got this error during a kexec rebooting: esrt: Unsupported ESRT version 2904149718861218184. The ESRT memory stays in EFI boot services data, and it was reserved in kernel via efi_mem_reserve(). The initial purpose of the reservation is to reuse the EFI boot services data across kexec reboot. For example the BGRT image data and some ESRT memory like Michael reported. But although the memory is reserved it is not updated in the X86 E820 table, and kexec_file_load() iterates system RAM in the IO resource list to find places for kernel, initramfs and other stuff. In Michael's case the kexec loaded initramfs overwrote the ESRT memory and then the failure happened. Since kexec_file_load() depends on the E820 table being updated, just fix this by updating the reserved EFI boot services memory as reserved type in E820. Originally any memory descriptors with EFI_MEMORY_RUNTIME attribute are bypassed in the reservation code path because they are assumed as reserved. But the reservation is still needed for multiple kexec reboots, and it is the only possible case we come here thus just drop the code chunk, then everything works without side effects. On my machine the ESRT memory sits in an EFI runtime data range, it does not trigger the problem, but I successfully tested with BGRT instead. both kexec_load() and kexec_file_load() work and kdump works as well. [ mingo: Edited the changelog. ] Reported-by: Michael Weiser Tested-by: Michael Weiser Signed-off-by: Dave Young Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Eric W. Biederman Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kexec@lists.infradead.org Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191204075233.GA10520@dhcp-128-65.nay.redhat.com Signed-off-by: Ingo Molnar commit b65d56305c6f5c74b1b4fcaf55d48e949e49d67c Merge: 833a426cc471 627ead724eff 90ed9c639c1b a7583e72a5f2 feb174069fd7 Author: Rafael J. Wysocki Date: Wed Dec 4 10:24:33 2019 +0100 Merge branches 'acpi-bus', 'acpi-button', 'acpi-sysfs' and 'acpi-misc' * acpi-bus: ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data() * acpi-button: ACPI: button: Add DMI quirk for Acer Switch 10 SW5-032 lid-switch * acpi-sysfs: ACPI: sysfs: Change ACPI_MASKABLE_GPE_MAX to 0x100 * acpi-misc: ACPI: Fix Kconfig indentation commit 1e4230f56dac141eb149ebec01f41b6fad27e503 Merge: 36a8015f89e4 024aa8732acb 4d30d4a0441d cde10f856a7d e1e047ace8ce 2a0efc77735b Author: Rafael J. Wysocki Date: Wed Dec 4 10:20:17 2019 +0100 Merge branches 'pm-sleep', 'pm-cpuidle', 'pm-cpufreq', 'pm-devfreq' and 'pm-avs' * pm-sleep: ACPI: PM: s2idle: Rework ACPI events synchronization ACPI: EC: Rework flushing of pending work * pm-cpuidle: cpuidle: minor Kconfig help text fixes cpuidle: Drop disabled field from struct cpuidle_state cpuidle: Fix Kconfig indentation * pm-cpufreq: cpufreq: Fix Kconfig indentation * pm-devfreq: PM / devfreq: Add missing locking while setting suspend_freq * pm-avs: power: avs: Fix Kconfig indentation commit 9f58c93efdffc2cba91fdcee010b3e5e8860334d Merge: 596cf45cbf6e 15b3904f8e88 Author: Ingo Molnar Date: Wed Dec 4 08:49:52 2019 +0100 Merge tag 'perf-core-for-mingo-5.5-20191203' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf report/top: - Fix segfault due to missing initialization of recently introduced struct map_symbol 'maps' field in append_inlines(), when running with DWARF callchains. perf stat: Andi Kleen: - Affinity based optimizations for sessions with many events in machines with large core counts, avoiding excessive number of IPIs. libtraceevent: - Sudip Mukherjee: - Fix installation with O=. - Copy pkg-config file to output folder when using O=. perf bench: Arnaldo Carvalho de Melo: - Update the copies of x86's mem{cpy,set}_64.S, and because that now uses new stuff in linux/linkage.h, update that header too, which made the minimal clang version to build perf to be 3.5, as 3.4 as found in some of the container images used to test build perf can't grok STT_FUNC as a token in .type lines. ABI headers: Arnaldo Carvalho de Melo: - Sync x86's msr-index.h copy with the kernel sources, resulting in new MSRs to be usable in filter expressions in 'perf trace', such as IA32_TSX_CTRL. - Sync linux/fscrypt.h, linux/stat.h, sched.h and the kvm headers. perf trace: Arnaldo Carvalho de Melo: - Add CLEAR_SIGHAND support for clone's flags arg perf kvm: Arnaldo Carvalho de Melo: - Clarify the 'perf kvm' -i and -o command line options perf test: Ian Rogers: - Move test functionality in to a 'perf test' entry. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 4673402ebf9fc1712fb41cce6a808923481495f3 Author: Corentin Labbe Date: Thu Nov 21 08:14:45 2019 +0000 ia64: agp: Replace empty define with do while It's dangerous to use empty code define. Furthermore it lead to the following warning: drivers/char/agp/generic.c: In function « agp_generic_destroy_page »: drivers/char/agp/generic.c:1266:28: attention : suggest braces around empty body in an « if » statement [-Wempty-body] So let's replace emptyness by "do {} while(0)" Signed-off-by: Corentin Labbe Acked-by: Arnd Bergmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1574324085-4338-6-git-send-email-clabbe@baylibre.com commit 5f448266ce9632c5318a5dbbc024fc7951f089d7 Author: Corentin Labbe Date: Thu Nov 21 08:14:44 2019 +0000 agp: Add bridge parameter documentation This patch add documentation about the bridge parameter in several function. This will fix the following build warning: drivers/char/agp/generic.c:220: warning: No description found for parameter 'bridge' drivers/char/agp/generic.c:364: warning: No description found for parameter 'bridge' drivers/char/agp/generic.c:1283: warning: No description found for parameter 'bridge' Signed-off-by: Corentin Labbe Acked-by: Arnd Bergmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1574324085-4338-5-git-send-email-clabbe@baylibre.com commit 5f1b24a6445ddbfccc8de1f5c1a31394a5b9ac66 Author: Corentin Labbe Date: Thu Nov 21 08:14:43 2019 +0000 agp: remove unused variable num_segments This patch fix the following build warning: warning: variable 'num_segments' set but not used [-Wunused-but-set-variable] Signed-off-by: Corentin Labbe Acked-by: Arnd Bergmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1574324085-4338-4-git-send-email-clabbe@baylibre.com commit 0f109f0e9a608c381846b3f2270a6a7b72158cb4 Author: Corentin Labbe Date: Thu Nov 21 08:14:42 2019 +0000 agp: move AGPGART_MINOR to include/linux/miscdevice.h This patch move the define for AGPGART_MINOR to include/linux/miscdevice.h. It is better that all minor number definitions are in the same place. Signed-off-by: Corentin Labbe Acked-by: Arnd Bergmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1574324085-4338-3-git-send-email-clabbe@baylibre.com commit 9fc785f17dec699cfe3891077e7506c92193a91b Author: Corentin Labbe Date: Thu Nov 21 08:14:41 2019 +0000 agp: remove unused variable size in agp_generic_create_gatt_table This patch fix the following warning: drivers/char/agp/generic.c:853:6: attention : variable ‘size’ set but not used [-Wunused-but-set-variable] by removing the unused variable size in agp_generic_create_gatt_table Signed-off-by: Corentin Labbe Acked-by: Arnd Bergmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1574324085-4338-2-git-send-email-clabbe@baylibre.com commit 909a60652624b837aff16825197c6a21d84fec82 Merge: 3e25dbca8b75 008037d4d972 Author: Dave Airlie Date: Wed Dec 4 10:13:16 2019 +1000 Merge tag 'drm-next-5.5-2019-12-03' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.5-2019-12-03: amdgpu: - Fix vram lost handling with BACO on VI/CI asics - DC fixes for Navi14 - Misc gfx10 fixes - SR-IOV fixes - Fix driver unload - Fix XGMI limits on Arcturus amdkfd: - Enable KFD on PPC - Optimize KFD page table reservations radeon: - Fix register checker for r1xx/r2xx Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203204135.5437-1-alexander.deucher@amd.com commit 798a9cada4694ca8d970259f216cec47e675bfd5 Author: Brian Foster Date: Tue Dec 3 07:53:15 2019 -0800 xfs: fix mount failure crash on invalid iclog memory access syzbot (via KASAN) reports a use-after-free in the error path of xlog_alloc_log(). Specifically, the iclog freeing loop doesn't handle the case of a fully initialized ->l_iclog linked list. Instead, it assumes that the list is partially constructed and NULL terminated. This bug manifested because there was no possible error scenario after iclog list setup when the original code was added. Subsequent code and associated error conditions were added some time later, while the original error handling code was never updated. Fix up the error loop to terminate either on a NULL iclog or reaching the end of the list. Reported-by: syzbot+c732f8644185de340492@syzkaller.appspotmail.com Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 63de37476ebd1e9bab6a9e17186dc5aa1da9ea99 Merge: 388c645a33a7 856a0a6e2d09 Author: Linus Torvalds Date: Tue Dec 3 14:37:12 2019 -0800 Merge tag 'tag-chrome-platform-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform changes from Benson Leung: "CrOS EC / MFD / IIO: - Contains tag-ib-chrome-mfd-iio-input-5.5, which is the first part of a series from Gwendal to refactor sensor code between MFD, CrOS EC, iio and input in order to add a new sensorhub driver and FIFO processing Wilco EC: - Add support for Dell's USB PowerShare policy control, keyboard backlight LED driver, and a new test_event file. - Fixes use after free in wilco_ec's telemetry driver. Misc: - bugfix in cros_usbpd_logger (missing destroy workqueue)" * tag 'tag-chrome-platform-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: wilco_ec: fix use after free issue platform/chrome: cros_ec: Add Kconfig default for cros-ec-sensorhub Revert "Input: cros_ec_keyb: mask out extra flags in event_type" Revert "Input: cros_ec_keyb - add back missing mask for event_type" platform/chrome: cros_ec: handle MKBP more events flag platform/chrome: cros_ec: Do not attempt to register a non-positive IRQ number platform/chrome: cros-ec: Record event timestamp in the hard irq mfd / platform / iio: cros_ec: Register sensor through sensorhub iio / platform: cros_ec: Add cros-ec-sensorhub driver mfd / platform: cros_ec: Add sensor_count and make check_features public platform/chrome: cros_ec: Put docs with the code platform/chrome: cros_usbpd_logger: add missed destroy_workqueue in remove platform/chrome: cros_ec: Fix Kconfig indentation platform/chrome: wilco_ec: Add keyboard backlight LED support platform/chrome: wilco_ec: Add charging config driver platform/chrome: wilco_ec: Add Dell's USB PowerShare Policy control platform/chrome: wilco_ec: Add debugfs test_event file commit 388c645a33a739bb96aa5ffe283ec68786ea7890 Merge: 537bd0a159a0 bf49d9dd6fef Author: Linus Torvalds Date: Tue Dec 3 14:20:21 2019 -0800 Merge tag 'spdx-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx Pull SPDX fix from Greg KH: "Here is a single SPDX fixup for 5.5-rc1 It resolves an issue where we had missed a few .h files with the auto-tagging scripts because they had "GPL" text in strings within the file themselves. This single patch fixes up the issue and provides the proper SPDX tags at the top of them as needed. This patch has been in linux-next for many many weeks now with no reported issues" * tag 'spdx-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: export,module: add SPDX GPL-2.0 license identifier to headers with no license commit 537bd0a159a041fad72d257d755205cef77582e1 Merge: c3bed3b20e40 27ed14d0ecb3 Author: Linus Torvalds Date: Tue Dec 3 14:09:14 2019 -0800 Merge tag 'tty-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the "big" tty and serial driver patches for 5.5-rc1. It's a bit later in the merge window than normal as I wanted to make sure some last-minute patches applied to it were all sane. They seem to be :) There's a lot of little stuff in here, for the tty core, and for lots of serial drivers: - reverts of uartlite serial driver patches that were wrong - msm-serial driver fixes - serial core updates and fixes - tty core fixes - serial driver dma mapping api changes - lots of other tiny fixes and updates for serial drivers All of these have been in linux-next for a while with no reported issues" * tag 'tty-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (58 commits) Revert "serial/8250: Add support for NI-Serial PXI/PXIe+485 devices" vcs: prevent write access to vcsu devices tty: vt: keyboard: reject invalid keycodes tty: don't crash in tty_init_dev when missing tty_port serial: stm32: fix clearing interrupt error flags tty: Fix Kconfig indentation, continued serial: serial_core: Perform NULL checks for break_ctl ops tty: remove unused argument from tty_open_by_driver() tty: Fix Kconfig indentation {tty: serial, nand: onenand}: samsung: rename to fix build warning serial: ifx6x60: add missed pm_runtime_disable serial: pl011: Fix DMA ->flush_buffer() Revert "serial-uartlite: Move the uart register" Revert "serial-uartlite: Add get serial id if not provided" Revert "serial-uartlite: Do not use static struct uart_driver out of probe()" Revert "serial-uartlite: Add runtime support" Revert "serial-uartlite: Change logic how console_port is setup" Revert "serial-uartlite: Use allocated structure instead of static ones" tty: serial: msm_serial: Use dma_request_chan() directly for channel request tty: serial: tegra: Use dma_request_chan() directly for channel request ... commit c3bed3b20e40ab44b98ac5f0471a5bd92a802f5a Merge: 4672c2f2026d 7e124c405172 Author: Linus Torvalds Date: Tue Dec 3 13:58:22 2019 -0800 Merge tag 'pci-v5.5-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Enumeration: - Warn if a host bridge has no NUMA info (Yunsheng Lin) - Add PCI_STD_NUM_BARS for the number of standard BARs (Denis Efremov) Resource management: - Fix boot-time Embedded Controller GPE storm caused by incorrect resource assignment after ACPI Bus Check Notification (Mika Westerberg) - Protect pci_reassign_bridge_resources() against concurrent addition/removal (Benjamin Herrenschmidt) - Fix bridge dma_ranges resource list cleanup (Rob Herring) - Add "pci=hpmmiosize" and "pci=hpmmioprefsize" parameters to control the MMIO and prefetchable MMIO window sizes of hotplug bridges independently (Nicholas Johnson) - Fix MMIO/MMIO_PREF window assignment that assigned more space than desired (Nicholas Johnson) - Only enforce bus numbers from bridge EA if the bridge has EA devices downstream (Subbaraya Sundeep) - Consolidate DT "dma-ranges" parsing and convert all host drivers to use shared parsing (Rob Herring) Error reporting: - Restore AER capability after resume (Mayurkumar Patel) - Add PoisonTLPBlocked AER counter (Rajat Jain) - Use for_each_set_bit() to simplify AER code (Andy Shevchenko) - Fix AER kernel-doc (Andy Shevchenko) - Add "pcie_ports=dpc-native" parameter to allow native use of DPC even if platform didn't grant control over AER (Olof Johansson) Hotplug: - Avoid returning prematurely from sysfs requests to enable or disable a PCIe hotplug slot (Lukas Wunner) - Don't disable interrupts twice when suspending hotplug ports (Mika Westerberg) - Fix deadlocks when PCIe ports are hot-removed while suspended (Mika Westerberg) Power management: - Remove unnecessary ASPM locking (Bjorn Helgaas) - Add support for disabling L1 PM Substates (Heiner Kallweit) - Allow re-enabling Clock PM after it has been disabled (Heiner Kallweit) - Add sysfs attributes for controlling ASPM link states (Heiner Kallweit) - Remove CONFIG_PCIEASPM_DEBUG, including "link_state" and "clk_ctl" sysfs files (Heiner Kallweit) - Avoid AMD FCH XHCI USB PME# from D0 defect that prevents wakeup on USB 2.0 or 1.1 connect events (Kai-Heng Feng) - Move power state check out of pci_msi_supported() (Bjorn Helgaas) - Fix incorrect MSI-X masking on resume and revert related nvme quirk for Kingston NVME SSD running FW E8FK11.T (Jian-Hong Pan) - Always return devices to D0 when thawing to fix hibernation with drivers like mlx4 that used legacy power management (previously we only did it for drivers with new power management ops) (Dexuan Cui) - Clear PCIe PME Status even for legacy power management (Bjorn Helgaas) - Fix PCI PM documentation errors (Bjorn Helgaas) - Use dev_printk() for more power management messages (Bjorn Helgaas) - Apply D2 delay as milliseconds, not microseconds (Bjorn Helgaas) - Convert xen-platform from legacy to generic power management (Bjorn Helgaas) - Removed unused .resume_early() and .suspend_late() legacy power management hooks (Bjorn Helgaas) - Rearrange power management code for clarity (Rafael J. Wysocki) - Decode power states more clearly ("4" or "D4" really refers to "D3cold") (Bjorn Helgaas) - Notice when reading PM Control register returns an error (~0) instead of interpreting it as being in D3hot (Bjorn Helgaas) - Add missing link delays required by the PCIe spec (Mika Westerberg) Virtualization: - Move pci_prg_resp_pasid_required() to CONFIG_PCI_PRI (Bjorn Helgaas) - Allow VFs to use PRI (the PF PRI is shared by the VFs, but the code previously didn't recognize that) (Kuppuswamy Sathyanarayanan) - Allow VFs to use PASID (the PF PASID capability is shared by the VFs, but the code previously didn't recognize that) (Kuppuswamy Sathyanarayanan) - Disconnect PF and VF ATS enablement, since ATS in PFs and associated VFs can be enabled independently (Kuppuswamy Sathyanarayanan) - Cache PRI and PASID capability offsets (Kuppuswamy Sathyanarayanan) - Cache the PRI PRG Response PASID Required bit (Bjorn Helgaas) - Consolidate ATS declarations in linux/pci-ats.h (Krzysztof Wilczynski) - Remove unused PRI and PASID stubs (Bjorn Helgaas) - Removed unnecessary EXPORT_SYMBOL_GPL() from ATS, PRI, and PASID interfaces that are only used by built-in IOMMU drivers (Bjorn Helgaas) - Hide PRI and PASID state restoration functions used only inside the PCI core (Bjorn Helgaas) - Add a DMA alias quirk for the Intel VCA NTB (Slawomir Pawlowski) - Serialize sysfs sriov_numvfs reads vs writes (Pierre Crégut) - Update Cavium ACS quirk for ThunderX2 and ThunderX3 (George Cherian) - Fix the UPDCR register address in the Intel ACS quirk (Steffen Liebergeld) - Unify ACS quirk implementations (Bjorn Helgaas) Amlogic Meson host bridge driver: - Fix meson PERST# GPIO polarity problem (Remi Pommarel) - Add DT bindings for Amlogic Meson G12A (Neil Armstrong) - Fix meson clock names to match DT bindings (Neil Armstrong) - Add meson support for Amlogic G12A SoC with separate shared PHY (Neil Armstrong) - Add meson extended PCIe PHY functions for Amlogic G12A USB3+PCIe combo PHY (Neil Armstrong) - Add arm64 DT for Amlogic G12A PCIe controller node (Neil Armstrong) - Add commented-out description of VIM3 USB3/PCIe mux in arm64 DT (Neil Armstrong) Broadcom iProc host bridge driver: - Invalidate iProc PAXB address mapping before programming it (Abhishek Shah) - Fix iproc-msi and mvebu __iomem annotations (Ben Dooks) Cadence host bridge driver: - Refactor Cadence PCIe host controller to use as a library for both host and endpoint (Tom Joseph) Freescale Layerscape host bridge driver: - Add layerscape LS1028a support (Xiaowei Bao) Intel VMD host bridge driver: - Add VMD bus 224-255 restriction decode (Jon Derrick) - Add VMD 8086:9A0B device ID (Jon Derrick) - Remove Keith from VMD maintainer list (Keith Busch) Marvell ARMADA 3700 / Aardvark host bridge driver: - Use LTSSM state to build link training flag since Aardvark doesn't implement the Link Training bit (Remi Pommarel) - Delay before training Aardvark link in case PERST# was asserted before the driver probe (Remi Pommarel) - Fix Aardvark issues with Root Control reads and writes (Remi Pommarel) - Don't rely on jiffies in Aardvark config access path since interrupts may be disabled (Remi Pommarel) - Fix Aardvark big-endian support (Grzegorz Jaszczyk) Marvell ARMADA 370 / XP host bridge driver: - Make mvebu_pci_bridge_emul_ops static (Ben Dooks) Microsoft Hyper-V host bridge driver: - Add hibernation support for Hyper-V virtual PCI devices (Dexuan Cui) - Track Hyper-V pci_protocol_version per-hbus, not globally (Dexuan Cui) - Avoid kmemleak false positive on hv hbus buffer (Dexuan Cui) Mobiveil host bridge driver: - Change mobiveil csr_read()/write() function names that conflict with riscv arch functions (Kefeng Wang) NVIDIA Tegra host bridge driver: - Fix Tegra CLKREQ dependency programming (Vidya Sagar) Renesas R-Car host bridge driver: - Remove unnecessary header include from rcar (Andrew Murray) - Tighten register index checking for rcar inbound range programming (Marek Vasut) - Fix rcar inbound range alignment calculation to improve packing of multiple entries (Marek Vasut) - Update rcar MACCTLR setting to match documentation (Yoshihiro Shimoda) - Clear bit 0 of MACCTLR before PCIETCTLR.CFINIT per manual (Yoshihiro Shimoda) - Add Marek Vasut and Yoshihiro Shimoda as R-Car maintainers (Simon Horman) Rockchip host bridge driver: - Make rockchip 0V9 and 1V8 power regulators non-optional (Robin Murphy) Socionext UniPhier host bridge driver: - Set uniphier to host (RC) mode always (Kunihiko Hayashi) Endpoint drivers: - Fix endpoint driver sign extension problem when shifting page number to phys_addr_t (Alan Mikhak) Misc: - Add NumaChip SPDX header (Krzysztof Wilczynski) - Replace EXTRA_CFLAGS with ccflags-y (Krzysztof Wilczynski) - Remove unused includes (Krzysztof Wilczynski) - Removed unused sysfs attribute groups (Ben Dooks) - Remove PTM and ASPM dependencies on PCIEPORTBUS (Bjorn Helgaas) - Add PCIe Link Control 2 register field definitions to replace magic numbers in AMDGPU and Radeon CIK/SI (Bjorn Helgaas) - Fix incorrect Link Control 2 Transmit Margin usage in AMDGPU and Radeon CIK/SI PCIe Gen3 link training (Bjorn Helgaas) - Use pcie_capability_read_word() instead of pci_read_config_word() in AMDGPU and Radeon CIK/SI (Frederick Lawler) - Remove unused pci_irq_get_node() Greg Kroah-Hartman) - Make asm/msi.h mandatory and simplify PCI_MSI_IRQ_DOMAIN Kconfig (Palmer Dabbelt, Michal Simek) - Read all 64 bits of Switchtec part_event_bitmap (Logan Gunthorpe) - Fix erroneous intel-iommu dependency on CONFIG_AMD_IOMMU (Bjorn Helgaas) - Fix bridge emulation big-endian support (Grzegorz Jaszczyk) - Fix dwc find_next_bit() usage (Niklas Cassel) - Fix pcitest.c fd leak (Hewenliang) - Fix typos and comments (Bjorn Helgaas) - Fix Kconfig whitespace errors (Krzysztof Kozlowski)" * tag 'pci-v5.5-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (160 commits) PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist asm-generic: Make msi.h a mandatory include/asm header Revert "nvme: Add quirk for Kingston NVME SSD running FW E8FK11.T" PCI/MSI: Fix incorrect MSI-X masking on resume PCI/MSI: Move power state check out of pci_msi_supported() PCI/MSI: Remove unused pci_irq_get_node() PCI: hv: Avoid a kmemleak false positive caused by the hbus buffer PCI: hv: Change pci_protocol_version to per-hbus PCI: hv: Add hibernation support PCI: hv: Reorganize the code in preparation of hibernation MAINTAINERS: Remove Keith from VMD maintainer PCI/ASPM: Remove PCIEASPM_DEBUG Kconfig option and related code PCI/ASPM: Add sysfs attributes for controlling ASPM link states PCI: Fix indentation drm/radeon: Prefer pcie_capability_read_word() drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions drm/radeon: Correct Transmit Margin masks drm/amdgpu: Prefer pcie_capability_read_word() PCI: uniphier: Set mode register to host mode drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions ... commit 43f8a6a74ee2442b9410ed297f5d4c77e7cb5ace Author: Steve French Date: Mon Dec 2 21:46:54 2019 -0600 smb3: query attributes on file close Since timestamps on files on most servers can be updated at close, and since timestamps on our dentries default to one second we can have stale timestamps in some common cases (e.g. open, write, close, stat, wait one second, stat - will show different mtime for the first and second stat). The SMB2/SMB3 protocol allows querying timestamps at close so add the code to request timestamp and attr information (which is cheap for the server to provide) to be returned when a file is closed (it is not needed for the many paths that call SMB2_close that are from compounded query infos and close nor is it needed for some of the cases where a directory close immediately follows a directory open. Signed-off-by: Steve French Acked-by: Ronnie Sahlberg Reviewed-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky commit 4672c2f2026dbc46b20647803426561fe2d460ea Merge: 2a31aca50067 f830f7cf4752 Author: Linus Torvalds Date: Tue Dec 3 13:31:08 2019 -0800 Merge tag 'rtc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "A lot of unnecessary code removal in here that ends up decreasing the number of lines in the subsystem. The ds1343 and ds1347 drivers got cleaned up. The rest are the usual fixes and new features. Subsystem: - fix warnings and errors with make W=1 - UIE are now disabled while setting the RTC time - UIE are now disallowed when the RTC time is not set. Drivers: - remove unecessary .remove callbacks - Set RTC range for cros-ec, ds1343, ds1347, m41t80, s35390a, vt8500 - Use devm_platform_ioremap_resource where applicable - rv3028: add clock out support" * tag 'rtc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (81 commits) rtc: Fix Kconfig indentation rtc: xgene: Remove unused struct device in struct xgene_rtc_dev rtc: sun6i: Remove struct device from sun6i_rtc_dev rtc: st-lpc: Remove struct resource from struct st_rtc rtc: pcf8523: Remove struct pcf8523 rtc: meson: remove redundant assignment to variable retries rtc: v3020: remove set but unused variable rtc: tegra: remove set but unused variable rtc: pm8xxx: update kerneldoc for struct pm8xxx_rtc rtc: m41t80: remove excess kerneldoc rtc: ds1685: fix build error with make W=1 rtc: ds1685: remove set but unused variables rtc: ds1374: remove unused variable rtc: sysfs: fix hctosys_show kerneldoc rtc: interface: fix kerneldoc comments rtc: msm6242: Remove unneeded msm6242_set()/msm6242_clear() functions rtc: msm6242: Fix reading of 10-hour digit rtc: tps65910: allow using RTC without alarm interrupt rtc: fsl-ftm-alarm: remove select FSL_RCPM and default y from Kconfig rtc: pcf8563: Constify clkout_rates ... commit d6d07ca19c045924f2b9cac14cb277cc34f85d43 Author: Guenter Roeck Date: Mon Dec 2 05:36:50 2019 -0800 drm/dp_mst: Fix build on systems with STACKTRACE_SUPPORT=n On systems with STACKTRACE_SUPPORT=n, we get: WARNING: unmet direct dependencies detected for STACKTRACE Depends on [n]: STACKTRACE_SUPPORT Selected by [y]: - STACKDEPOT [=y] and build errors such as: m68k-linux-ld: kernel/stacktrace.o: in function `stack_trace_save': (.text+0x11c): undefined reference to `save_stack_trace' Add the missing deendency on STACKTRACE_SUPPORT. Fixes: 12a280c72868 ("drm/dp_mst: Add topology ref history tracking for debugging") Cc: Lyude Paul Cc: Sean Paul Signed-off-by: Guenter Roeck Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191202133650.11964-1-linux@roeck-us.net commit 2a31aca5006749f7d4655836c61d4a53bfae8e53 Merge: 79e178a57dae 88cfd30e188f Author: Linus Torvalds Date: Tue Dec 3 13:18:34 2019 -0800 Merge tag 'iomap-5.5-merge-13' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap cleanups from Darrick Wong: "Aome more new iomap code for 5.5. There's not much this time -- just removing some local variables that don't need to exist in the iomap directio code" * tag 'iomap-5.5-merge-13' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: remove unneeded variable in iomap_dio_rw() iomap: Do not create fake iter in iomap_dio_bio_actor() commit f9bd84a8a845d82f9b5a081a7ae68c98a11d2e84 Author: SeongJae Park Date: Tue Nov 26 16:36:05 2019 +0100 xen/blkback: Avoid unmapping unmapped grant pages For each I/O request, blkback first maps the foreign pages for the request to its local pages. If an allocation of a local page for the mapping fails, it should unmap every mapping already made for the request. However, blkback's handling mechanism for the allocation failure does not mark the remaining foreign pages as unmapped. Therefore, the unmap function merely tries to unmap every valid grant page for the request, including the pages not mapped due to the allocation failure. On a system that fails the allocation frequently, this problem leads to following kernel crash. [ 372.012538] BUG: unable to handle kernel NULL pointer dereference at 0000000000000001 [ 372.012546] IP: [] gnttab_unmap_refs.part.7+0x1c/0x40 [ 372.012557] PGD 16f3e9067 PUD 16426e067 PMD 0 [ 372.012562] Oops: 0002 [#1] SMP [ 372.012566] Modules linked in: act_police sch_ingress cls_u32 ... [ 372.012746] Call Trace: [ 372.012752] [] gnttab_unmap_refs+0x34/0x40 [ 372.012759] [] xen_blkbk_unmap+0x83/0x150 [xen_blkback] ... [ 372.012802] [] dispatch_rw_block_io+0x970/0x980 [xen_blkback] ... Decompressing Linux... Parsing ELF... done. Booting the kernel. [ 0.000000] Initializing cgroup subsys cpuset This commit fixes this problem by marking the grant pages of the given request that didn't mapped due to the allocation failure as invalid. Fixes: c6cc142dac52 ("xen-blkback: use balloon pages for all mappings") Reviewed-by: David Woodhouse Reviewed-by: Maximilian Heyne Reviewed-by: Paul Durrant Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park Signed-off-by: Jens Axboe commit 79e178a57dae819ae724065b47c25720494cc9f2 Merge: 01d1dff64662 341c1fda5e17 Author: Linus Torvalds Date: Tue Dec 3 12:51:35 2019 -0800 Merge tag 'apparmor-pr-2019-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor updates from John Johansen: "Features: - increase left match history buffer size to provide improved conflict resolution in overlapping execution rules. - switch buffer allocation to use a memory pool and GFP_KERNEL where possible. - add compression of policy blobs to reduce memory usage. Cleanups: - fix spelling mistake "immutible" -> "immutable" Bug fixes: - fix unsigned len comparison in update_for_len macro - fix sparse warning for type-casting of current->real_cred" * tag 'apparmor-pr-2019-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: make it so work buffers can be allocated from atomic context apparmor: reduce rcu_read_lock scope for aa_file_perm mediation apparmor: fix wrong buffer allocation in aa_new_mount apparmor: fix unsigned len comparison with less than zero apparmor: increase left match history buffer size apparmor: Switch to GFP_KERNEL where possible apparmor: Use a memory pool instead per-CPU caches apparmor: Force type-casting of current->real_cred apparmor: fix spelling mistake "immutible" -> "immutable" apparmor: fix blob compression when ns is forced on a policy load apparmor: fix missing ZLIB defines apparmor: fix blob compression build failure on ppc apparmor: Initial implementation of raw policy blob compression commit 01d1dff64662646023482806c6db8ef0b280c403 Merge: 4d7048f55104 2115fbf7210b Author: Linus Torvalds Date: Tue Dec 3 12:50:00 2019 -0800 Merge tag 's390-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Vasily Gorbik: - Make stack unwinder reliable and suitable for livepatching. Add unwinder testing module. - Fixes for CALL_ON_STACK helper used for stack switching. - Fix unwinding from bpf code. - Fix getcpu and remove compat support in vdso code. - Fix address space control registers initialization. - Save KASLR offset for early dumps. - Handle new FILTERED_BY_HYPERVISOR reply code in crypto code. - Minor perf code cleanup and potential memory leak fix. - Add couple of error messages for corner cases during PCI device creation. * tag 's390-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (33 commits) s390: remove compat vdso code s390/livepatch: Implement reliable stack tracing for the consistency model s390/unwind: add stack pointer alignment sanity checks s390/unwind: filter out unreliable bogus %r14 s390/unwind: start unwinding from reliable state s390/test_unwind: add program check context tests s390/test_unwind: add irq context tests s390/test_unwind: print verbose unwinding results s390/test_unwind: add CALL_ON_STACK tests s390: fix register clobbering in CALL_ON_STACK s390/test_unwind: require that unwinding ended successfully s390/unwind: add a test for the internal API s390/unwind: always inline get_stack_pointer s390/pci: add error message on device number limit s390/pci: add error message for UID collision s390/cpum_sf: Check for SDBT and SDB consistency s390/cpum_sf: Use TEAR_REG macro consistantly s390/cpum_sf: Remove unnecessary check for pending SDBs s390/cpum_sf: Replace function name in debug statements s390/kaslr: store KASLR offset for early dumps ... commit 4d7048f55104434ec64fe0b5196cbc89a8f99548 Merge: 043cf46825c1 9d9043f6a817 Author: Linus Torvalds Date: Tue Dec 3 12:46:44 2019 -0800 Merge tag 'xtensa-20191201' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: - add support for execute in place (XIP) kernels - improvements in inline assembly: use named arguments and "m" constraints where possible - improve stack dumping - clean up system_call code and syscall tracing - various small fixes and cleanups * tag 'xtensa-20191201' of git://github.com/jcmvbkbc/linux-xtensa: (30 commits) xtensa: clean up system_call/xtensa_rt_sigreturn interaction xtensa: fix system_call interaction with ptrace xtensa: rearrange syscall tracing xtensa: fix syscall_set_return_value xtensa: drop unneeded headers from coprocessor.S xtensa: entry: Remove unneeded need_resched() loop xtensa: use MEMBLOCK_ALLOC_ANYWHERE for KASAN shadow map xtensa: fix TLB sanity checker xtensa: get rid of __ARCH_USE_5LEVEL_HACK xtensa: mm: fix PMD folding implementation xtensa: make stack dump size configurable xtensa: improve stack dumping xtensa: use "m" constraint instead of "r" in futex.h assembly xtensa: use "m" constraint instead of "a" in cmpxchg.h assembly xtensa: use named assembly arguments in cmpxchg.h xtensa: use "m" constraint instead of "a" in atomic.h assembly xtensa: use named assembly arguments in atomic.h xtensa: use "m" constraint instead of "a" in bitops.h assembly xtensa: use named assembly arguments in bitops.h xtensa: use macros to generate *_bit and test_and_*_bit functions ... commit 043cf46825c102683b1027762c09c7e2b749e5a3 Merge: b22bfea7f16c 83bae01182ea Author: Linus Torvalds Date: Tue Dec 3 12:20:25 2019 -0800 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Ingo Molnar: "The main changes in the timer code in this cycle were: - Clockevent updates: - timer-of framework cleanups. (Geert Uytterhoeven) - Use timer-of for the renesas-ostm and the device name to prevent name collision in case of multiple timers. (Geert Uytterhoeven) - Check if there is an error after calling of_clk_get in asm9260 (Chuhong Yuan) - ABI fix: Zero out high order bits of nanoseconds on compat syscalls. This got broken a year ago, with apparently no side effects so far. Since the kernel would use random data otherwise I don't think we'd have other options but to fix the bug, even if there was a side effect to applications (Dmitry Safonov) - Optimize ns_to_timespec64() on 32-bit systems: move away from div_s64_rem() which can be slow, to div_u64_rem() which is faster (Arnd Bergmann) - Annotate KCSAN-reported false positive data races in hrtimer_is_queued() users by moving timer->state handling over to the READ_ONCE()/WRITE_ONCE() APIs. This documents these accesses (Eric Dumazet) - Misc cleanups and small fixes" [ I undid the "ABI fix" and updated the comments instead. The reason there were apparently no side effects is that the fix was a no-op. The updated comment is to say _why_ it was a no-op. - Linus ] * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: time: Zero the upper 32-bits in __kernel_timespec on 32-bit time: Rename tsk->real_start_time to ->start_boottime hrtimer: Remove the comment about not used HRTIMER_SOFTIRQ time: Fix spelling mistake in comment time: Optimize ns_to_timespec64() hrtimer: Annotate lockless access to timer->state clocksource/drivers/asm9260: Add a check for of_clk_get clocksource/drivers/renesas-ostm: Use unique device name instead of ostm clocksource/drivers/renesas-ostm: Convert to timer_of clocksource/drivers/timer-of: Use unique device name instead of timer clocksource/drivers/timer-of: Convert last full_name to %pOF commit 008037d4d972c9c47b273e40e52ae34f9d9e33e7 Author: Alex Deucher Date: Tue Nov 26 09:41:46 2019 -0500 drm/radeon: fix r1xx/r2xx register checker for POT textures Shift and mask were reversed. Noticed by chance. Tested-by: Meelis Roos Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 8ffb055beae58574d3e77b4bf9d4d15eace1ca27 Author: Yoshiki Komachi Date: Tue Dec 3 19:40:12 2019 +0900 cls_flower: Fix the behavior using port ranges with hw-offload The recent commit 5c72299fba9d ("net: sched: cls_flower: Classify packets using port ranges") had added filtering based on port ranges to tc flower. However the commit missed necessary changes in hw-offload code, so the feature gave rise to generating incorrect offloaded flow keys in NIC. One more detailed example is below: $ tc qdisc add dev eth0 ingress $ tc filter add dev eth0 ingress protocol ip flower ip_proto tcp \ dst_port 100-200 action drop With the setup above, an exact match filter with dst_port == 0 will be installed in NIC by hw-offload. IOW, the NIC will have a rule which is equivalent to the following one. $ tc qdisc add dev eth0 ingress $ tc filter add dev eth0 ingress protocol ip flower ip_proto tcp \ dst_port 0 action drop The behavior was caused by the flow dissector which extracts packet data into the flow key in the tc flower. More specifically, regardless of exact match or specified port ranges, fl_init_dissector() set the FLOW_DISSECTOR_KEY_PORTS flag in struct flow_dissector to extract port numbers from skb in skb_flow_dissect() called by fl_classify(). Note that device drivers received the same struct flow_dissector object as used in skb_flow_dissect(). Thus, offloaded drivers could not identify which of these is used because the FLOW_DISSECTOR_KEY_PORTS flag was set to struct flow_dissector in either case. This patch adds the new FLOW_DISSECTOR_KEY_PORTS_RANGE flag and the new tp_range field in struct fl_flow_key to recognize which filters are applied to offloaded drivers. At this point, when filters based on port ranges passed to drivers, drivers return the EOPNOTSUPP error because they do not support the feature (the newly created FLOW_DISSECTOR_KEY_PORTS_RANGE flag). Fixes: 5c72299fba9d ("net: sched: cls_flower: Classify packets using port ranges") Signed-off-by: Yoshiki Komachi Signed-off-by: David S. Miller commit 2f23cd42e19c22c24ff0e221089b7b6123b117c5 Author: Dust Li Date: Tue Dec 3 11:17:40 2019 +0800 net: sched: fix dump qlen for sch_mq/sch_mqprio with NOLOCK subqueues sch->q.len hasn't been set if the subqueue is a NOLOCK qdisc in mq_dump() and mqprio_dump(). Fixes: ce679e8df7ed ("net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mqprio") Signed-off-by: Dust Li Signed-off-by: Tony Lu Signed-off-by: David S. Miller commit 0d580fbd2db084a5c96ee9c00492236a279d5e0f Author: Eric Dumazet Date: Tue Dec 3 08:05:52 2019 -0800 tcp: refactor tcp_retransmit_timer() It appears linux-4.14 stable needs a backport of commit 88f8598d0a30 ("tcp: exit if nothing to retransmit on RTO timeout") Since tcp_rtx_queue_empty() is not in pre 4.15 kernels, let's refactor tcp_retransmit_timer() to only use tcp_rtx_queue_head() I will provide to stable teams the squashed patches. Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: Greg Kroah-Hartman Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 643a2cc99b53c13d90c02dc344f780ba9a89e012 Author: Takashi Iwai Date: Tue Dec 3 16:41:05 2019 +0100 ALSA: hda: hdmi - Keep old slot assignment behavior for Intel platforms The commit 609f5485344b ("ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms") tried to restore the old behavior wrt assignment of the PCM slot for Intel platforms, but this didn't do it right. As found in the later discussion, a positive pipe id on Intel platforms can be passed for single monitor attachment case. This patch reverts the previous attempt and applies a simpler workaround instead. Actually, for Intel platforms, we can handle as if per_pin->dev_id=0, assign the primary slot at the first try. This assures the compatible behavior with the previous versions regarding the slot assignment. Fixes: 609f5485344b ("ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms") Link: https://lore.kernel.org/r/20191203154105.30414-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9385973fe8db9743fa93bf17245635be4eb8c4a6 Author: Vladimir Oltean Date: Tue Dec 3 17:45:35 2019 +0200 net: mscc: ocelot: unregister the PTP clock on deinit Currently a switch driver deinit frees the regmaps, but the PTP clock is still out there, available to user space via /dev/ptpN. Any PTP operation is a ticking time bomb, since it will attempt to use the freed regmaps and thus trigger kernel panics: [ 4.291746] fsl_enetc 0000:00:00.2 eth1: error -22 setting up slave phy [ 4.291871] mscc_felix 0000:00:00.5: Failed to register DSA switch: -22 [ 4.308666] mscc_felix: probe of 0000:00:00.5 failed with error -22 [ 6.358270] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000088 [ 6.367090] Mem abort info: [ 6.369888] ESR = 0x96000046 [ 6.369891] EC = 0x25: DABT (current EL), IL = 32 bits [ 6.369892] SET = 0, FnV = 0 [ 6.369894] EA = 0, S1PTW = 0 [ 6.369895] Data abort info: [ 6.369897] ISV = 0, ISS = 0x00000046 [ 6.369899] CM = 0, WnR = 1 [ 6.369902] user pgtable: 4k pages, 48-bit VAs, pgdp=00000020d58c7000 [ 6.369904] [0000000000000088] pgd=00000020d5912003, pud=00000020d5915003, pmd=0000000000000000 [ 6.369914] Internal error: Oops: 96000046 [#1] PREEMPT SMP [ 6.420443] Modules linked in: [ 6.423506] CPU: 1 PID: 262 Comm: phc_ctl Not tainted 5.4.0-03625-gb7b2a5dadd7f #204 [ 6.431273] Hardware name: LS1028A RDB Board (DT) [ 6.435989] pstate: 40000085 (nZcv daIf -PAN -UAO) [ 6.440802] pc : css_release+0x24/0x58 [ 6.444561] lr : regmap_read+0x40/0x78 [ 6.448316] sp : ffff800010513cc0 [ 6.451636] x29: ffff800010513cc0 x28: ffff002055873040 [ 6.456963] x27: 0000000000000000 x26: 0000000000000000 [ 6.462289] x25: 0000000000000000 x24: 0000000000000000 [ 6.467617] x23: 0000000000000000 x22: 0000000000000080 [ 6.472944] x21: ffff800010513d44 x20: 0000000000000080 [ 6.478270] x19: 0000000000000000 x18: 0000000000000000 [ 6.483596] x17: 0000000000000000 x16: 0000000000000000 [ 6.488921] x15: 0000000000000000 x14: 0000000000000000 [ 6.494247] x13: 0000000000000000 x12: 0000000000000000 [ 6.499573] x11: 0000000000000000 x10: 0000000000000000 [ 6.504899] x9 : 0000000000000000 x8 : 0000000000000000 [ 6.510225] x7 : 0000000000000000 x6 : ffff800010513cf0 [ 6.515550] x5 : 0000000000000000 x4 : 0000000fffffffe0 [ 6.520876] x3 : 0000000000000088 x2 : ffff800010513d44 [ 6.526202] x1 : ffffcada668ea000 x0 : ffffcada64d8b0c0 [ 6.531528] Call trace: [ 6.533977] css_release+0x24/0x58 [ 6.537385] regmap_read+0x40/0x78 [ 6.540795] __ocelot_read_ix+0x6c/0xa0 [ 6.544641] ocelot_ptp_gettime64+0x4c/0x110 [ 6.548921] ptp_clock_gettime+0x4c/0x58 [ 6.552853] pc_clock_gettime+0x5c/0xa8 [ 6.556699] __arm64_sys_clock_gettime+0x68/0xc8 [ 6.561331] el0_svc_common.constprop.2+0x7c/0x178 [ 6.566133] el0_svc_handler+0x34/0xa0 [ 6.569891] el0_sync_handler+0x114/0x1d0 [ 6.573908] el0_sync+0x140/0x180 [ 6.577232] Code: d503201f b00119a1 91022263 b27b7be4 (f9004663) [ 6.583349] ---[ end trace d196b9b14cdae2da ]--- [ 6.587977] Kernel panic - not syncing: Fatal exception [ 6.593216] SMP: stopping secondary CPUs [ 6.597151] Kernel Offset: 0x4ada54400000 from 0xffff800010000000 [ 6.603261] PHYS_OFFSET: 0xffffd0a7c0000000 [ 6.607454] CPU features: 0x10002,21806008 [ 6.611558] Memory Limit: none And now that ocelot->ptp_clock is checked at exit, prevent a potential error where ptp_clock_register returned a pointer-encoded error, which we are keeping in the ocelot private data structure. So now, ocelot->ptp_clock is now either NULL or a valid pointer. Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") Cc: Antoine Tenart Reviewed-by: Florian Fainelli Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9aed6ae0647d8b23b5746223f376acd7de7b8868 Author: Danit Goldberg Date: Tue Dec 3 17:43:36 2019 +0200 net/core: Populate VF index in struct ifla_vf_guid In addition to filling the node_guid and port_guid attributes, there is a need to populate VF index too, otherwise users of netlink interface will see same VF index for all VFs. Fixes: 30aad41721e0 ("net/core: Add support for getting VF GUIDs") Signed-off-by: Danit Goldberg Signed-off-by: Leon Romanovsky Signed-off-by: David S. Miller commit c4b4c421857dc7b1cf0dccbd738472360ff2cd70 Author: Nikolay Aleksandrov Date: Tue Dec 3 16:48:06 2019 +0200 net: bridge: deny dev_set_mac_address() when unregistering We have an interesting memory leak in the bridge when it is being unregistered and is a slave to a master device which would change the mac of its slaves on unregister (e.g. bond, team). This is a very unusual setup but we do end up leaking 1 fdb entry because dev_set_mac_address() would cause the bridge to insert the new mac address into its table after all fdbs are flushed, i.e. after dellink() on the bridge has finished and we call NETDEV_UNREGISTER the bond/team would release it and will call dev_set_mac_address() to restore its original address and that in turn will add an fdb in the bridge. One fix is to check for the bridge dev's reg_state in its ndo_set_mac_address callback and return an error if the bridge is not in NETREG_REGISTERED. Easy steps to reproduce: 1. add bond in mode != A/B 2. add any slave to the bond 3. add bridge dev as a slave to the bond 4. destroy the bridge device Trace: unreferenced object 0xffff888035c4d080 (size 128): comm "ip", pid 4068, jiffies 4296209429 (age 1413.753s) hex dump (first 32 bytes): 41 1d c9 36 80 88 ff ff 00 00 00 00 00 00 00 00 A..6............ d2 19 c9 5e 3f d7 00 00 00 00 00 00 00 00 00 00 ...^?........... backtrace: [<00000000ddb525dc>] kmem_cache_alloc+0x155/0x26f [<00000000633ff1e0>] fdb_create+0x21/0x486 [bridge] [<0000000092b17e9c>] fdb_insert+0x91/0xdc [bridge] [<00000000f2a0f0ff>] br_fdb_change_mac_address+0xb3/0x175 [bridge] [<000000001de02dbd>] br_stp_change_bridge_id+0xf/0xff [bridge] [<00000000ac0e32b1>] br_set_mac_address+0x76/0x99 [bridge] [<000000006846a77f>] dev_set_mac_address+0x63/0x9b [<00000000d30738fc>] __bond_release_one+0x3f6/0x455 [bonding] [<00000000fc7ec01d>] bond_netdev_event+0x2f2/0x400 [bonding] [<00000000305d7795>] notifier_call_chain+0x38/0x56 [<0000000028885d4a>] call_netdevice_notifiers+0x1e/0x23 [<000000008279477b>] rollback_registered_many+0x353/0x6a4 [<0000000018ef753a>] unregister_netdevice_many+0x17/0x6f [<00000000ba854b7a>] rtnl_delete_link+0x3c/0x43 [<00000000adf8618d>] rtnl_dellink+0x1dc/0x20a [<000000009b6395fd>] rtnetlink_rcv_msg+0x23d/0x268 Fixes: 43598813386f ("bridge: add local MAC address to forwarding table (v2)") Reported-by: syzbot+2add91c08eb181fea1bf@syzkaller.appspotmail.com Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 42c17fa69f9866a3f80ac196ce70b4fda1242717 Author: Dan Carpenter Date: Tue Dec 3 17:12:39 2019 +0300 net: fix a leak in register_netdevice() We have to free "dev->name_node" on this error path. Fixes: ff92741270bf ("net: introduce name_node struct to be used in hashlist") Reported-by: syzbot+6e13e65ffbaa33757bcb@syzkaller.appspotmail.com Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 56e7a2f83d13306500ce807dd7ebbbb73b5a91d6 Merge: 040b5cfbcefa 3d3c817c3a40 Author: David S. Miller Date: Tue Dec 3 11:14:41 2019 -0800 Merge tag 'linux-can-fixes-for-5.5-20191203' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2019-12-03 this is a pull request of 6 patches for net/master. The first two patches are against the MAINTAINERS file and adds Appana Durga Kedareswara rao as maintainer for the xilinx-can driver and Sriram Dash for the m_can (mmio) driver. The next patch is by Jouni Hogander and fixes a use-after-free in the slcan driver. Johan Hovold's patch for the ucan driver fixes the non-atomic allocation in the completion handler. The last two patches target the xilinx-can driver. The first one is by Venkatesh Yadav Abbarapu and skips the error message on deferred probe, the second one is by Srinivas Neeli and fixes the usage of the skb after can_put_echo_skb(). ==================== Signed-off-by: David S. Miller commit 87f80d623c6c93c721b2aaead8a45e848bc8ffbf Author: Jens Axboe Date: Tue Dec 3 11:23:54 2019 -0700 io_uring: handle connect -EINPROGRESS like -EAGAIN Right now we return it to userspace, which means the application has to poll for the socket to be writeable. Let's just treat it like -EAGAIN and have io_uring handle it internally, this makes it much easier to use. Signed-off-by: Jens Axboe commit b22bfea7f16cda6e08918a3e9c7b4b99eb95ea70 Merge: 2dff2a1c9b7c 407e62f52aad Author: Linus Torvalds Date: Tue Dec 3 09:29:50 2019 -0800 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Ingo Molnar: "Most of the IRQ subsystem changes in this cycle were irq-chip driver updates: - Qualcomm PDC wakeup interrupt support - Layerscape external IRQ support - Broadcom bcm7038 PM and wakeup support - Ingenic driver cleanup and modernization - GICv3 ITS preparation for GICv4.1 updates - GICv4 fixes There's also the series from Frederic Weisbecker that fixes memory ordering bugs for the irq-work logic, whose primary fix is to turn work->irq_work.flags into an atomic variable and then convert the complex (and buggy) atomic_cmpxchg() loop in irq_work_claim() into a much simpler atomic_fetch_or() call. There are also various smaller cleanups" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits) pinctrl/sdm845: Add PDC wakeup interrupt map for GPIOs pinctrl/msm: Setup GPIO chip in hierarchy irqchip/qcom-pdc: Add irqchip set/get state calls irqchip/qcom-pdc: Add irqdomain for wakeup capable GPIOs irqchip/qcom-pdc: Do not toggle IRQ_ENABLE during mask/unmask irqchip/qcom-pdc: Update max PDC interrupts of/irq: Document properties for wakeup interrupt parent genirq: Introduce irq_chip_get/set_parent_state calls irqdomain: Add bus token DOMAIN_BUS_WAKEUP genirq: Fix function documentation of __irq_alloc_descs() irq_work: Fix IRQ_WORK_BUSY bit clearing irqchip/ti-sci-inta: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) irq_work: Slightly simplify IRQ_WORK_PENDING clearing irq_work: Fix irq_work_claim() memory ordering irq_work: Convert flags to atomic_t irqchip: Ingenic: Add process for more than one irq at the same time. irqchip: ingenic: Alloc generic chips from IRQ domain irqchip: ingenic: Get virq number from IRQ domain irqchip: ingenic: Error out if IRQ domain creation failed irqchip: ingenic: Drop redundant irq_suspend / irq_resume functions ... commit 2dff2a1c9b7cc83529119eb04cef1d7b68e11352 Merge: 2352923c753f 7c2378800cf7 Author: Linus Torvalds Date: Tue Dec 3 09:27:29 2019 -0800 Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull dmi updates from Jean Delvare. * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: firmware: dmi: Add dmi_memdev_handle firmware: dmi: Remember the memory type commit 6c6b3549142255c3fe4bab5560efdf8391c8d858 Author: Christoph Hellwig Date: Tue Dec 3 10:39:08 2019 +0100 block: set the zone size in blk_revalidate_disk_zones atomically The current zone revalidation code has a major problem in that it doesn't update the zone size and q->nr_zones atomically, leading to a short window where an out of bounds access to the zone arrays is possible. To fix this move the setting of the zone size into the crticial sections blk_revalidate_disk_zones so that it gets updated together with the zone bitmaps and q->nr_zones. This also slightly simplifies the caller as it deducts the zone size from the report_zones. This change also allows to check for a power of two zone size in generic code. Reported-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4905880b4515721bc4aff17d65be426175d9ddbf Author: Monk Liu Date: Tue Nov 26 19:33:38 2019 +0800 drm/amdgpu: fix GFX10 missing CSIB set(v3) still need to init csb even for SRIOV v2: drop init_pg() for gfx10 at all since PG and GFX off feature will be fully controled by RLC and SMU fw for gfx10 v3: drop the flush_gpu_tlb lines since we consider it is only usefull in emulation Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit cd05b51aaa6ea6f7e4c22802e3f2703ac6087912 Author: Monk Liu Date: Fri Nov 29 16:20:51 2019 +0800 drm/amdgpu: should stop GFX ring in hw_fini To align with the scheme from gfx9 disabling GFX ring after VM shutdown could avoid garbage data be fetched to GFX RB which may lead to unnecessary screw up on GFX Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit dacf56e45ded829a87cefab17bf6800d6cacd236 Author: Monk Liu Date: Tue Nov 26 19:38:22 2019 +0800 drm/amdgpu: do autoload right after MEC loaded for SRIOV VF since we don't have RLCG ucode loading and no SRlist as well Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6294017fe3525bb45c259db97ab4ac0620af5107 Author: Monk Liu Date: Tue Nov 26 19:36:29 2019 +0800 drm/amdgpu: skip rlc ucode loading for SRIOV gfx10 Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 747d4f715fb5aca0002216355df28714cc20250c Author: Monk Liu Date: Tue Nov 26 19:42:25 2019 +0800 drm/amdgpu: fix calltrace during kmd unload(v3) issue: kernel would report a warning from a double unpin during the driver unloading on the CSB bo why: we unpin it during hw_fini, and there will be another unpin in sw_fini on CSB bo. fix: actually we don't need to pin/unpin it during hw_init/fini since it is created with kernel pinned, we only need to fullfill the CSB again during hw_init to prevent CSB/VRAM lost after S3 v2: get_csb in init_rlc so hw_init() will make CSIB content back even after reset or s3 v3: use bo_create_kernel instead of bo_create_reserved for CSB otherwise the bo_free_kernel() on CSB is not aligned and would lead to its internal reserve pending there forever take care of gfx7/8 as well Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher commit fa2b93e39b1d167d342aecd6d3f53d9972405226 Author: Xiaojie Yuan Date: Wed Nov 6 21:10:20 2019 +0800 drm/amdgpu/gfx10: unlock srbm_mutex after queue programming finish srbm_mutex is to guarantee atomicity for r/w of gfx indexed registers Signed-off-by: Xiaojie Yuan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f0312f45a0540a1551ca4644ff2461250520111a Author: John Clements Date: Mon Dec 2 17:57:25 2019 +0800 drm/amdgpu: Added ASIC specific checks in gfxhub V1.1 get XGMI info Added max hive/node info checks per supported ASIC Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 2352923c753f0d89a0e2fc85ac37cee858afe33e Merge: 76bb8b05960c ba30e27405af Author: Linus Torvalds Date: Tue Dec 3 08:50:56 2019 -0800 Merge branch 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu updates from Dennis Zhou: "This has a change to fix percpu-refcount for RT kernels because rcu-sched disables preemption and the refcount release callback might acquire a spinlock" * 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: Revert "percpu: add __percpu to SHIFT_PERCPU_PTR" percpu-refcount: Use normal instead of RCU-sched" percpu: add __percpu to SHIFT_PERCPU_PTR commit 76d8f83b2a6175909f4e93de868609d76fbba47c Author: Likun Gao Date: Mon Dec 2 15:04:35 2019 +0800 drm/amdgpu/powerplay: unify smu send message function Drop smu_send_smc_msg function from ASIC specify structure. Reuse smu_send_smc_msg_with_param function for smu_send_smc_msg. Set paramer to 0 for smu_send_msg function, otherwise it will send with previous paramer value (Not a certain value). Materialize msg type for smu send message function definition. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 627f75d18910b287472593a4a2c41de9a386f5a2 Author: Alex Deucher Date: Fri Nov 15 10:02:44 2019 -0500 drm/amd/display: re-enable wait in pipelock, but add timeout Removing this causes hangs in some games, so re-add it, but add a timeout so we don't hang while switching flip types. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 30c517736e1a31a3edcdbfc791c83bc565d437ca Author: Zhan liu Date: Mon Dec 2 15:12:27 2019 -0500 drm/amd/display: Get NV14 specific ip params as needed [Why] NV14 is using its own ip params that's different from other DCN2.0 ASICs. [How] Add ASIC revision check to make sure NV14 gets correct ip params. Signed-off-by: Zhan Liu Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 516fb68d9501460dc3e47d107daa9402b075b9fe Author: Zhan liu Date: Mon Dec 2 14:54:16 2019 -0500 drm/amd/display: Adding NV14 IP Parameters [Why] NV14 IP Parameters are missing. [How] Add IP Parameters in. Signed-off-by: Zhan liu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit c3d03c5a196f21381c1a2166a4648beba13d3d1f Author: Zhan Liu Date: Thu Nov 28 14:12:11 2019 -0500 drm/amd/display: Include num_vmid and num_dsc within NV14's resource caps [Why] "num_vmid" and "num_dsc" are missing within NV14's resource caps structure. [How] Add the missing parts. Signed-off-by: Zhan Liu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit e2195f7d0e735b9e466873333a7e832e3b7d254b Author: Monk Liu Date: Tue Nov 26 19:40:08 2019 +0800 drm/amdgpu: use CPU to flush vmhub if sched stopped otherwse the flush_gpu_tlb will hang if we unload the KMD becuase the schedulers already stopped Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ae58954d8734c44298f55ed71e683ea944994fab Author: Christoph Hellwig Date: Tue Dec 3 10:39:07 2019 +0100 block: don't handle bio based drivers in blk_revalidate_disk_zones bio based drivers only need to update q->nr_zones. Do that manually instead of overloading blk_revalidate_disk_zones to keep that function simpler for the next round of changes that will rely even more on the request based functionality. Reviewed-by: Javier González Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e94f5819448c5b75829662eaa9c25c17868846cf Author: Christoph Hellwig Date: Tue Dec 3 10:39:06 2019 +0100 block: allocate the zone bitmaps lazily Allocate the conventional zone bitmap and the sequential zone locking bitmap only when we find a zone of the respective type. This avoids wasting memory on the conventional zone bitmap for devices that only have sequential zones, and will also prepare for other future changes. Reviewed-by: Javier González Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f216fdd77b5654f8c4f6fac6020d6aabc58878ef Author: Christoph Hellwig Date: Tue Dec 3 10:39:05 2019 +0100 block: replace seq_zones_bitmap with conv_zones_bitmap Invert the meaning of seq_zones_bitmap by keeping a bitmap of conventional zones. This allows not having a bitmap for devices that do not have conventional zones. Reviewed-by: Javier González Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9b38bb4b1e6de47b379afaad2c707df639bb4dc7 Author: Christoph Hellwig Date: Tue Dec 3 10:39:04 2019 +0100 block: simplify blkdev_nr_zones Simplify the arguments to blkdev_nr_zones by passing a gendisk instead of the block_device and capacity. This also removes the need for __blkdev_nr_zones as all callers are outside the fast path and can deal with the additional branch. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit bb55628288fcd96d919a9ecc59dd26704a65493b Author: Christoph Hellwig Date: Tue Dec 3 10:39:03 2019 +0100 block: remove the empty line at the end of blk-zoned.c Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 979d54475e0b75a28e55528617fecf83b4a221da Author: Christoph Hellwig Date: Tue Dec 3 10:39:02 2019 +0100 null_blk: cleanup null_gendisk_register Use a saner size calculation, and do a trivial cleanup on the zone revalidation to prepare to future changes. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5c4bd1f40c23d08ffbdccd68a5fd63751c794d89 Author: Damien Le Moal Date: Tue Dec 3 10:39:01 2019 +0100 null_blk: fix zone size paramter check For zoned=1 mode, the zone size must be a power of 2. Check this not only when the zone size is specified during modprobe, but also when creating a zoned null_blk device using configfs. Signed-off-by: Damien Le Moal Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f6c4d97b0d82ed1240690c91f06214018b1531ef Author: Keith Busch Date: Tue Dec 3 05:53:30 2019 +0900 nvme/pci: Remove last_cq_head We had been saving the last_cq_head seen from an interrupt so that a polled queue wouldn't mistakenly trigger spruious interrupt detection. We don't poll interrupt driven queues any more, so saving this value is pointless. Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 795ee49c1a28d1b3eeb2b463f18d557700fc6153 Author: Pavel Begunkov Date: Sat Nov 30 23:23:52 2019 +0300 block: optimise bvec_iter_advance() bvec_iter_advance() is quite popular, but compilers fail to do proper alias analysis and optimise it good enough. The assembly is checked for gcc 9.2, x86-64. - remove @iter->bi_size from min(...), as it's always less than @bytes. Modify at the beginning and forget about it. - the compiler isn't able to collapse memory dependencies and remove writes in the loop. Help it by explicitely using local vars. Signed-off-by: Arvind Sankar Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8cdda87a4414092cd210e766189cf0353a844861 Author: Jackie Liu Date: Mon Dec 2 17:14:53 2019 +0800 io_uring: remove io_wq_current_is_worker Since commit b18fdf71e01f ("io_uring: simplify io_req_link_next()"), the io_wq_current_is_worker function is no longer needed, clean it up. Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe commit 22efde5998657f6d1f31592c659aa3a9c7ad65f1 Author: Jackie Liu Date: Mon Dec 2 17:14:52 2019 +0800 io_uring: remove parameter ctx of io_submit_state_start Parameter ctx we have never used, clean it up. Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe commit da8c96906990f1108cb626ee7865e69267a3263b Author: Jens Axboe Date: Mon Dec 2 18:51:26 2019 -0700 io_uring: mark us with IORING_FEAT_SUBMIT_STABLE If this flag is set, applications can be certain that any data for async offload has been consumed when the kernel has consumed the SQE. Signed-off-by: Jens Axboe commit f499a021ea8c9f70321fce3d674d8eca5bbeee2c Author: Jens Axboe Date: Mon Dec 2 16:28:46 2019 -0700 io_uring: ensure async punted connect requests copy data Just like commit f67676d160c6 for read/write requests, this one ensures that the sockaddr data has been copied for IORING_OP_CONNECT if we need to punt the request to async context. Signed-off-by: Jens Axboe commit 03b1230ca12a12e045d83b0357792075bf94a1e0 Author: Jens Axboe Date: Mon Dec 2 18:50:25 2019 -0700 io_uring: ensure async punted sendmsg/recvmsg requests copy data Just like commit f67676d160c6 for read/write requests, this one ensures that the msghdr data is fully copied if we need to punt a recvmsg or sendmsg system call to async context. Signed-off-by: Jens Axboe commit a1f4c96b799b80118b50bd47320deb9013b7ff40 Author: YueHaibing Date: Sat Nov 30 09:28:28 2019 +0800 gpiolib: of: Make of_gpio_spi_cs_get_count static Fix sparse warning: drivers/gpio/gpiolib-of.c:35:5: warning: symbol 'of_gpio_spi_cs_get_count' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20191130012828.14504-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit a3cde9534ebdafe18a9bbab208df724c57e6c8e8 Author: Wen Yang Date: Sun Dec 1 11:02:50 2019 +0800 regulator: core: fix regulator_register() error paths to properly release rdev There are several issues with the error handling code of the regulator_register() function: ret = device_register(&rdev->dev); if (ret != 0) { put_device(&rdev->dev); --> rdev released goto unset_supplies; } ... unset_supplies: ... unset_regulator_supplies(rdev); --> use-after-free ... clean: if (dangling_of_gpiod) gpiod_put(config->ena_gpiod); kfree(rdev); --> double free We add a variable to record the failure of device_register() and move put_device() down a bit to avoid the above issues. Fixes: c438b9d01736 ("regulator: core: Move registration of regulator device") Signed-off-by: Wen Yang Cc: Liam Girdwood Cc: Mark Brown Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191201030250.38074-1-wenyang@linux.alibaba.com Signed-off-by: Mark Brown commit d5ee9108adacfbed140e0ac2371941ce7ca1fc54 Author: YueHaibing Date: Thu Nov 28 21:58:53 2019 +0800 ASoC: Intel: sst: Add missing include Fix build error: sound/soc/intel/atom/sst/sst.c: In function intel_sst_interrupt_mrfld: sound/soc/intel/atom/sst/sst.c:93:5: error: implicit declaration of function memcpy_fromio; did you mean memcpy32_fromio? [-Werror=implicit-function-declaration] memcpy_fromio(msg->mailbox_data, ^~~~~~~~~~~~~ memcpy32_fromio Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191128135853.8360-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 01bb630319337be15fc50c211126180198d4e157 Author: Matt Roper Date: Wed Nov 27 14:13:13 2019 -0800 drm/i915/ehl: Make icp_digital_port_connected() use phy instead of port When looking at SDEISR to determine the connection status of combo outputs, we should use the phy index rather than the port index. Although they're usually the same thing, EHL's DDI-D (port D) is attached to PHY-A and SDEISR doesn't even have bits for a "D" output. It's also possible that future platforms may map DDIs (the internal display engine programming units) to PHYs (the output handling on the IO side) in ways where port!=phy, so let's look at the PHY index by default. v2: Rename to intel_combo_phy_connected. (Lucas) Fixes: 719d24002602 ("drm/i915/ehl: Enable DDI-D") Cc: José Roberto de Souza Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191127221314.575575-2-matthew.d.roper@intel.com (cherry picked from commit 3d1e388d4072dd240e558709d2f73605a742a723) Signed-off-by: Joonas Lahtinen commit 7c2378800cf7ac87e2663afa7f39d102871f0c28 Author: Jean Delvare Date: Tue Dec 3 11:20:37 2019 +0100 firmware: dmi: Add dmi_memdev_handle Add a utility function dmi_memdev_handle() which returns the DMI handle associated with a given memory slot. This will allow kernel drivers to iterate over the memory slots. Signed-off-by: Jean Delvare commit 9e0afe3910ff7e5493c5d8ebe3b499994b5e0272 Author: Jean Delvare Date: Tue Dec 3 11:20:37 2019 +0100 firmware: dmi: Remember the memory type Store the memory type while walking the memory slots, and provide a way to retrieve it later. Signed-off-by: Jean Delvare commit 3d3c817c3a409ba51ad6e44dd8fde4cfc07c93fe Author: Srinivas Neeli Date: Mon Dec 2 18:32:11 2019 +0530 can: xilinx_can: Fix usage of skb memory As per linux can framework, driver not allowed to touch the skb memory after can_put_echo_skb() call. This patch fixes the same. https://www.spinics.net/lists/linux-can/msg02199.html Signed-off-by: Srinivas Neeli Reviewed-by: Appana Durga Kedareswara Rao Signed-off-by: Marc Kleine-Budde commit b848238d86aacc3df69c76a20ab2aa85db8775e1 Author: Venkatesh Yadav Abbarapu Date: Mon Dec 2 18:32:10 2019 +0530 can: xilinx_can: skip error message on deferred probe When the CAN bus clock is provided from the clock wizard, clock wizard driver may not be available when can driver probes resulting to the error message "bus clock not found error". As this error message is not very useful to the end user, skip printing in the case of deferred probe. Signed-off-by: Venkatesh Yadav Abbarapu Signed-off-by: Srinivas Neeli Signed-off-by: Michal Simek Reviewed-by: Appana Durga Kedareswara Rao Signed-off-by: Marc Kleine-Budde commit 870db5d1015c8bd63e93b579e857223c96249ff7 Author: Johan Hovold Date: Thu Nov 28 19:26:03 2019 +0100 can: ucan: fix non-atomic allocation in completion handler USB completion handlers are called in atomic context and must specifically not allocate memory using GFP_KERNEL. Fixes: 9f2d3eae88d2 ("can: ucan: add driver for Theobroma Systems UCAN devices") Cc: stable # 4.19 Cc: Jakob Unterwurzacher Cc: Martin Elshuber Cc: Philipp Tomsich Signed-off-by: Johan Hovold Signed-off-by: Marc Kleine-Budde commit 9ebd796e24008f33f06ebea5a5e6aceb68b51794 Author: Jouni Hogander Date: Wed Nov 27 08:40:26 2019 +0200 can: slcan: Fix use-after-free Read in slcan_open Slcan_open doesn't clean-up device which registration failed from the slcan_devs device list. On next open this list is iterated and freed device is accessed. Fix this by calling slc_free_netdev in error path. Driver/net/can/slcan.c is derived from slip.c. Use-after-free error was identified in slip_open by syzboz. Same bug is in slcan.c. Here is the trace from the Syzbot slip report: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 sl_sync drivers/net/slip/slip.c:725 [inline] slip_open+0xecd/0x11b7 drivers/net/slip/slip.c:801 tty_ldisc_open.isra.0+0xa3/0x110 drivers/tty/tty_ldisc.c:469 tty_set_ldisc+0x30e/0x6b0 drivers/tty/tty_ldisc.c:596 tiocsetd drivers/tty/tty_io.c:2334 [inline] tty_ioctl+0xe8d/0x14f0 drivers/tty/tty_io.c:2594 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: ed50e1600b44 ("slcan: Fix memory leak in error path") Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: David Miller Cc: Oliver Hartkopp Cc: Lukas Bulwahn Signed-off-by: Jouni Hogander Cc: linux-stable # >= v5.4 Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit 8c2a58568d6d952f7c7f1dac125b33dc8414627b Author: Sriram Dash Date: Tue Dec 3 09:59:09 2019 +0530 MAINTAINERS: add myself as maintainer of MCAN MMIO device driver Since we are actively working on MMIO MCAN device driver, as discussed with Marc, I am adding myself as a maintainer. Signed-off-by: Sriram Dash Signed-off-by: Marc Kleine-Budde commit 825e5601c14278cf065a0f28e99a73a2745f2549 Author: Appana Durga Kedareswara rao Date: Thu Nov 21 14:09:24 2019 +0530 MAINTAINERS: add fragment for xilinx CAN driver Added entry for xilinx CAN driver. Signed-off-by: Appana Durga Kedareswara rao Signed-off-by: Marc Kleine-Budde commit e38e486d66e2a3b902768fd71c32dbf10f77e1cb Author: Takashi Iwai Date: Mon Dec 2 08:49:47 2019 +0100 ALSA: hda: Modify stream stripe mask only when needed The recent commit in HD-audio stream management for changing the stripe control seems causing a regression on some platforms. The stripe control is currently used only by HDMI codec, and applying the stripe mask unconditionally may lead to scratchy and static noises as seen on some MacBooks. For addressing the regression, this patch changes the stream management code to apply the stripe mask conditionally only when the codec driver requested. Fixes: 9b6f7e7a296e ("ALSA: hda: program stripe bits for controller") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204477 Tested-by: Michael Pobega Cc: Link: https://lore.kernel.org/r/20191202074947.1617-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f67676d160c6ee2ed82917fadfed6d29cab8237c Author: Jens Axboe Date: Mon Dec 2 11:03:47 2019 -0700 io_uring: ensure async punted read/write requests copy iovec Currently we don't copy the iovecs when we punt to async context. This can be problematic for applications that store the iovec on the stack, as they often assume that it's safe to let the iovec go out of scope as soon as IO submission has been called. This isn't always safe, as we will re-copy the iovec once we're in async context. Make this 100% safe by copying the iovec just once. With this change, applications may safely store the iovec on the stack for all cases. Reported-by: 李通洲 Signed-off-by: Jens Axboe commit 69ffe5960df16938bccfe1b65382af0b3de51265 Author: Omar Sandoval Date: Tue Nov 26 16:58:08 2019 -0800 xfs: don't check for AG deadlock for realtime files in bunmapi Commit 5b094d6dac04 ("xfs: fix multi-AG deadlock in xfs_bunmapi") added a check in __xfs_bunmapi() to stop early if we would touch multiple AGs in the wrong order. However, this check isn't applicable for realtime files. In most cases, it just makes us do unnecessary commits. However, without the fix from the previous commit ("xfs: fix realtime file data space leak"), if the last and second-to-last extents also happen to have different "AG numbers", then the break actually causes __xfs_bunmapi() to return without making any progress, which sends xfs_itruncate_extents_flags() into an infinite loop. Fixes: 5b094d6dac04 ("xfs: fix multi-AG deadlock in xfs_bunmapi") Signed-off-by: Omar Sandoval Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0c4da70c83d41a8461fdf50a3f7b292ecb04e378 Author: Omar Sandoval Date: Tue Nov 26 16:58:07 2019 -0800 xfs: fix realtime file data space leak Realtime files in XFS allocate extents in rextsize units. However, the written/unwritten state of those extents is still tracked in blocksize units. Therefore, a realtime file can be split up into written and unwritten extents that are not necessarily aligned to the realtime extent size. __xfs_bunmapi() has some logic to handle these various corner cases. Consider how it handles the following case: 1. The last extent is unwritten. 2. The last extent is smaller than the realtime extent size. 3. startblock of the last extent is not aligned to the realtime extent size, but startblock + blockcount is. In this case, __xfs_bunmapi() calls xfs_bmap_add_extent_unwritten_real() to set the second-to-last extent to unwritten. This should merge the last and second-to-last extents, so __xfs_bunmapi() moves on to the second-to-last extent. However, if the size of the last and second-to-last extents combined is greater than MAXEXTLEN, xfs_bmap_add_extent_unwritten_real() does not merge the two extents. When that happens, __xfs_bunmapi() skips past the last extent without unmapping it, thus leaking the space. Fix it by only unwriting the minimum amount needed to align the last extent to the realtime extent size, which is guaranteed to merge with the last extent. Signed-off-by: Omar Sandoval Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1a6b74fc87024db59d41cd7346bd437f20fb3e2d Author: Jens Axboe Date: Mon Dec 2 10:33:15 2019 -0700 io_uring: add general async offload context Right now we just copy the sqe for async offload, but we want to store more context across an async punt. In preparation for doing so, put the sqe copy inside a structure that we can expand. With this pointer added, we can get rid of REQ_F_FREE_SQE, as that is now indicated by whether req->io is NULL or not. No functional changes in this patch. Signed-off-by: Jens Axboe commit 490547ca2df66b8413bce97cb651630f2c531487 Author: Eric Biggers Date: Mon Dec 2 10:21:34 2019 -0800 block: don't send uevent for empty disk when not invalidating Commit 6917d0689993 ("block: merge invalidate_partitions into rescan_partitions") caused a regression where systemd-udevd spins forever using max CPU starting at boot time. It's caused by a behavior change where a KOBJ_CHANGE uevent is now sent in a case where previously it wasn't. Restore the old behavior. Fixes: 6917d0689993 ("block: merge invalidate_partitions into rescan_partitions") Reviewed-by: Christoph Hellwig Signed-off-by: Eric Biggers Signed-off-by: Jens Axboe commit 441cdbd5449b4923cd413d3ba748124f91388be9 Author: Jens Axboe Date: Mon Dec 2 18:49:10 2019 -0700 io_uring: transform send/recvmsg() -ERESTARTSYS to -EINTR We should never return -ERESTARTSYS to userspace, transform it into -EINTR. Cc: stable@vger.kernel.org # v5.3+ Signed-off-by: Jens Axboe commit 76bb8b05960c3d1668e6bee7624ed886cbd135ba Merge: e30dbe50dc91 d21b7e6b985c Author: Linus Torvalds Date: Mon Dec 2 17:35:04 2019 -0800 Merge tag 'kbuild-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - remove unneeded asm headers from hexagon, ia64 - add 'dir-pkg' target, which works like 'tar-pkg' but skips archiving - add 'helpnewconfig' target, which shows help for new CONFIG options - support 'make nsdeps' for external modules - make rebuilds faster by deleting $(wildcard $^) checks - remove compile tests for kernel-space headers - refactor modpost to simplify modversion handling - make single target builds faster - optimize and clean up scripts/kallsyms.c - refactor various Makefiles and scripts * tag 'kbuild-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (59 commits) MAINTAINERS: update Kbuild/Kconfig maintainer's email address scripts/kallsyms: remove redundant initializers scripts/kallsyms: put check_symbol_range() calls close together scripts/kallsyms: make check_symbol_range() void function scripts/kallsyms: move ignored symbol types to is_ignored_symbol() scripts/kallsyms: move more patterns to the ignored_prefixes array scripts/kallsyms: skip ignored symbols very early scripts/kallsyms: add const qualifiers where possible scripts/kallsyms: make find_token() return (unsigned char *) scripts/kallsyms: replace prefix_underscores_count() with strspn() scripts/kallsyms: add sym_name() to mitigate cast ugliness scripts/kallsyms: remove unneeded length check for prefix matching scripts/kallsyms: remove redundant is_arm_mapping_symbol() scripts/kallsyms: set relative_base more effectively scripts/kallsyms: shrink table before sorting it scripts/kallsyms: fix definitely-lost memory leak scripts/kallsyms: remove unneeded #ifndef ARRAY_SIZE kbuild: make single target builds even faster modpost: respect the previous export when 'exported twice' is warned modpost: do not set ->preloaded for symbols from Module.symvers ... commit e30dbe50dc91d25dde251169b66d39f99bf45bad Merge: 483847a70262 f60b85e83659 Author: Linus Torvalds Date: Mon Dec 2 17:29:25 2019 -0800 Merge tag 'linux-kselftest-5.5-rc1-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull more kselftest fixes from Shuah Khan: "This second Kselftest fixes update for Linux 5.5-rc1 consists of an urgent revert to fix regression in CI coverage" * tag 'linux-kselftest-5.5-rc1-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: Revert "selftests: Fix O= and KBUILD_OUTPUT handling for relative paths" commit 483847a70262f7361f8a6f78513c985c2c8b1719 Merge: 120e47686a00 8a6b8f4d7a89 Author: Linus Torvalds Date: Mon Dec 2 17:23:21 2019 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - Fix build error in crypto lib code when crypto API is off - Fix NULL/error check in hisilicon - Fix Kconfig-related build error in talitos * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: hisilicon - fix a NULL vs IS_ERR() bug in sec_create_qp_ctx() crypto: talitos - Fix build error by selecting LIB_DES crypto: arch - conditionalize crypto api in arch glue for lib code commit 120e47686a00144ef1195cfc137645d1bed46d23 Merge: fcaa0ad72d8a 0ecdcaa6d5e7 Author: Linus Torvalds Date: Mon Dec 2 17:18:43 2019 -0800 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC update from Stafford Horne: "White space fixups in Kconfig files from Krzysztof Kozlowski" * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: Fix Kconfig indentation commit fcaa0ad72d8a14736595bb48c49f9ebd62963d63 Merge: e3a251e366e1 9807019a62dc Author: Linus Torvalds Date: Mon Dec 2 17:14:02 2019 -0800 Merge tag 'for-linus-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - Fixes for our new virtio code - Fix for the irqflags tracer - Kconfig coding style fixes - Allow BPF firmware loading in our vector driver * tag 'for-linus-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Loadable BPF "Firmware" for vector drivers um: Fix Kconfig indentation um: virtio_uml: Disallow modular build um: virtio: Keep reading on -EAGAIN um: virtio: Remove device on disconnect um: Don't trace irqflags during shutdown commit e3a251e366e1a007c7ce7b2809b67f4dece6b17c Merge: 97eeb4d9d755 6e78c01fde90 Author: Linus Torvalds Date: Mon Dec 2 17:06:34 2019 -0800 Merge tag 'upstream-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBI/UBIFS/JFFS2 updates from Richard Weinberger: "This pull request contains mostly fixes for UBI, UBIFS and JFFS2: UBI: - Fix a regression around producing a anchor PEB for fastmap. Due to a change in our locking fastmap was unable to produce fresh anchors an re-used the existing one a way to often. UBIFS: - Fixes for endianness. A few places blindly assumed little endian. - Fix for a memory leak in the orphan code. - Fix for a possible crash during a commit. - Revert a wrong bugfix. JFFS2: - Revert a bad bugfix (false positive from a code checking tool)" * tag 'upstream-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: Revert "jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()" ubi: Fix producing anchor PEBs ubifs: ubifs_tnc_start_commit: Fix OOB in layout_in_gaps ubifs: do_kill_orphans: Fix a memory leak bug Revert "ubifs: Fix memory leak bug in alloc_ubifs_info() error path" ubifs: Fix type of sup->hash_algo ubifs: Fixed missed le64_to_cpu() in journal ubifs: Force prandom result to __le32 ubifs: Remove obsolete TODO from dfs_file_write() ubi: Fix warning static is not at beginning of declaration ubi: Print skip_check in ubi_dump_vol_info() commit 15b3904f8e884e0d34d5f09906cf6526d0b889a2 Author: Sudip Mukherjee Date: Fri Nov 15 11:36:10 2019 +0000 libtraceevent: Copy pkg-config file to output folder when using O= When we use 'O=' with make to build libtraceevent in a separate folder it still copies 'libtraceevent.pc' to its source folder. Modify the Makefile so that it uses the output folder to copy the pkg-config file and install from there. Signed-off-by: Sudipm Mukherjee Reviewed-by: Steven Rostedt (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20191115113610.21493-2-sudipm.mukherjee@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 587db8ebdac2c5eb3a8851e16b26f2e2711ab797 Author: Sudip Mukherjee Date: Fri Nov 15 11:36:09 2019 +0000 libtraceevent: Fix lib installation with O= When we use 'O=' with make to build libtraceevent in a separate folder it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the error: INSTALL /home/sudip/linux/obj-trace/libtraceevent.a INSTALL /home/sudip/linux/obj-trace/libtraceevent.so.1.1.0 cp: cannot stat 'libtraceevent.a': No such file or directory Makefile:225: recipe for target 'install_lib' failed make: *** [install_lib] Error 1 I used the command: make O=../../../obj-trace DESTDIR=~/test prefix==/usr install It turns out libtraceevent Makefile, even though it builds in a separate folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its source folder. So, add the 'OUTPUT' prefix to the source path so that 'make' looks for the files in the correct place. Signed-off-by: Sudipm Mukherjee Reviewed-by: Steven Rostedt (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20191115113610.21493-1-sudipm.mukherjee@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 9e8fae2597405ab1deac8909928eb8e99876f639 Author: Steve French Date: Mon Dec 2 17:55:41 2019 -0600 smb3: remove unused flag passed into close functions close was relayered to allow passing in an async flag which is no longer needed in this path. Remove the unneeded parameter "flags" passed in on close. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky Reviewed-by: Ronnie Sahlberg commit a9f76cf82719aea0f41bfcae57e17ffec39743d0 Author: Colin Ian King Date: Mon Dec 2 18:59:42 2019 +0000 cifs: remove redundant assignment to pointer pneg_ctxt The pointer pneg_ctxt is being initialized with a value that is never read and it is being updated later with a new value. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Steve French commit 97eeb4d9d755605385fa329da9afa38729f3413c Merge: 9b326948c239 8feb4732ff9f Author: Linus Torvalds Date: Mon Dec 2 14:46:22 2019 -0800 Merge tag 'xfs-5.5-merge-16' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS updates from Darrick Wong: "For this release, we changed quite a few things. Highlights: - Fixed some long tail latency problems in the block allocator - Removed some long deprecated (and for the past several years no-op) mount options and ioctls - Strengthened the extended attribute and directory verifiers - Audited and fixed all the places where we could return EFSCORRUPTED without logging anything - Refactored the old SGI space allocation ioctls to make the equivalent fallocate calls - Fixed a race between fallocate and directio - Fixed an integer overflow when files have more than a few billion(!) extents - Fixed a longstanding bug where quota accounting could be incorrect when performing unwritten extent conversion on a freshly mounted fs - Fixed various complaints in scrub about soft lockups and unresponsiveness to signals - De-vtable'd the directory handling code, which should make it faster - Converted to the new mount api, for better or for worse - Cleaned up some memory leaks and quite a lot of other smaller fixes and cleanups. A more detailed summary: - Fill out the build string - Prevent inode fork extent count overflows - Refactor the allocator to reduce long tail latency - Rework incore log locking a little to reduce spinning - Break up the xfs_iomap_begin functions into smaller more cohesive parts - Fix allocation alignment being dropped too early when the allocation request is for more blocks than an AG is large - Other small cleanups - Clean up file buftarg retrieval helpers - Hoist the resvsp and unresvsp ioctls to the vfs - Remove the undocumented biosize mount option, since it has never been mentioned as existing or supported on linux - Clean up some of the mount option printing and parsing - Enhance attr leaf verifier to check block structure - Check dirent and attr names for invalid characters before passing them to the vfs - Refactor open-coded bmbt walking - Fix a few places where we return EIO instead of EFSCORRUPTED after failing metadata sanity checks - Fix a synchronization problem between fallocate and aio dio corrupting the file length - Clean up various loose ends in the iomap and bmap code - Convert to the new mount api - Make sure we always log something when returning EFSCORRUPTED - Fix some problems where long running scrub loops could trigger soft lockup warnings and/or fail to exit due to fatal signals pending - Fix various Coverity complaints - Remove most of the function pointers from the directory code to reduce indirection penalties - Ensure that dquots are attached to the inode when performing unwritten extent conversion after io - Deuglify incore projid and crtime types - Fix another AGI/AGF locking order deadlock when renaming - Clean up some quota typedefs - Remove the FSSETDM ioctls which haven't done anything in 20 years - Fix some memory leaks when mounting the log fails - Fix an underflow when updating an xattr leaf freemap - Remove some trivial wrappers - Report metadata corruption as an error, not a (potentially) fatal assertion - Clean up the dir/attr buffer mapping code - Allow fatal signals to kill scrub during parent pointer checks" * tag 'xfs-5.5-merge-16' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (198 commits) xfs: allow parent directory scans to be interrupted with fatal signals xfs: remove the mappedbno argument to xfs_da_get_buf xfs: remove the mappedbno argument to xfs_da_read_buf xfs: split xfs_da3_node_read xfs: remove the mappedbno argument to xfs_dir3_leafn_read xfs: remove the mappedbno argument to xfs_dir3_leaf_read xfs: remove the mappedbno argument to xfs_attr3_leaf_read xfs: remove the mappedbno argument to xfs_da_reada_buf xfs: improve the xfs_dabuf_map calling conventions xfs: refactor xfs_dabuf_map xfs: simplify mappedbno handling in xfs_da_{get,read}_buf xfs: report corruption only as a regular error xfs: Remove kmem_zone_free() wrapper xfs: Remove kmem_zone_destroy() wrapper xfs: Remove slab init wrappers xfs: fix attr leaf header freemap.size underflow xfs: fix some memory leaks in log recovery xfs: fix another missing include xfs: remove XFS_IOC_FSSETDM and XFS_IOC_FSSETDM_BY_HANDLE xfs: remove duplicated include from xfs_dir2_data.c ... commit 240b62d381fe5b66c496a6fd55edff3976a9be51 Author: Juergen Gross Date: Mon Oct 21 12:04:15 2019 +0200 ia64: remove stale paravirt leftovers Remove the last leftovers from IA64 Xen pv-guest support. PARAVIRT is long gone from IA64 Kconfig and Xen IA64 support, too. Due to lack of infrastructure no testing done. Signed-off-by: Juergen Gross Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20191021100415.7642-1-jgross@suse.com commit 9b326948c23908692d7dfe56ed149840d3829eaa Merge: ef2cc88e2a20 7807759e4ad8 Author: Linus Torvalds Date: Mon Dec 2 14:13:00 2019 -0800 Merge tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull FireWire updates from Stefan Richter: - another y2038 fix - janitorial code movement * tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: core: code cleanup after vm_map_pages_zero introduction firewire: ohci: stop using get_seconds() for BUS_TIME commit ef2cc88e2a205b8a11a19e78db63a70d3728cdf5 Merge: 937d6eefc716 65309ef6b258 Author: Linus Torvalds Date: Mon Dec 2 13:37:02 2019 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This is mostly update of the usual drivers: aacraid, ufs, zfcp, NCR5380, lpfc, qla2xxx, smartpqi, hisi_sas, target, mpt3sas, pm80xx plus a whole load of minor updates and fixes. The major core changes are Al Viro's reworking of sg's handling of copy to/from user, Ming Lei's removal of the host busy counter to avoid contention in the multiqueue case and Damien Le Moal's fixing of residual tracking across error handling" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (251 commits) scsi: bnx2fc: timeout calculation invalid for bnx2fc_eh_abort() scsi: target: core: Fix a pr_debug() argument scsi: iscsi: Don't send data to unbound connection scsi: target: iscsi: Wait for all commands to finish before freeing a session scsi: target: core: Release SPC-2 reservations when closing a session scsi: target: core: Document target_cmd_size_check() scsi: bnx2i: fix potential use after free Revert "scsi: qla2xxx: Fix memory leak when sending I/O fails" scsi: NCR5380: Add disconnect_mask module parameter scsi: NCR5380: Unconditionally clear ICR after do_abort() scsi: NCR5380: Call scsi_set_resid() on command completion scsi: scsi_debug: num_tgts must be >= 0 scsi: lpfc: use hdwq assigned cpu for allocation scsi: arcmsr: fix indentation issues scsi: qla4xxx: fix double free bug scsi: pm80xx: Modified the logic to collect fatal dump scsi: pm80xx: Tie the interrupt name to the module instance scsi: pm80xx: Controller fatal error through sysfs scsi: pm80xx: Do not request 12G sas speeds scsi: pm80xx: Cleanup command when a reset times out ... commit d567fb8819162099035e546b11a736e29c2af0ea Author: Jiang Yi Date: Wed Nov 27 17:49:10 2019 +0100 vfio/pci: call irq_bypass_unregister_producer() before freeing irq Since irq_bypass_register_producer() is called after request_irq(), we should do tear-down in reverse order: irq_bypass_unregister_producer() then free_irq(). Specifically free_irq() may release resources required by the irqbypass del_producer() callback. Notably an example provided by Marc Zyngier on arm64 with GICv4 that he indicates has the potential to wedge the hardware: free_irq(irq) __free_irq(irq) irq_domain_deactivate_irq(irq) its_irq_domain_deactivate() [unmap the VLPI from the ITS] kvm_arch_irq_bypass_del_producer(cons, prod) kvm_vgic_v4_unset_forwarding(kvm, irq, ...) its_unmap_vlpi(irq) [Unmap the VLPI from the ITS (again), remap the original LPI] Signed-off-by: Jiang Yi Cc: stable@vger.kernel.org # v4.4+ Fixes: 6d7425f109d26 ("vfio: Register/unregister irq_bypass_producer") Link: https://lore.kernel.org/kvm/20191127164910.15888-1-giangyi@amazon.com Reviewed-by: Marc Zyngier Reviewed-by: Eric Auger [aw: commit log] Signed-off-by: Alex Williamson commit 69738cfdfa7032f45d9e7462d24490e61cf163dd Author: Deepa Dinamani Date: Fri Nov 29 21:30:25 2019 -0800 fs: cifs: Fix atime update check vs mtime According to the comment in the code and commit log, some apps expect atime >= mtime; but the introduced code results in atime==mtime. Fix the comparison to guard against atime Cc: stfrench@microsoft.com Cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French commit 6f582b273ec23332074d970a7fb25bef835df71f Author: Pavel Shilovsky Date: Wed Nov 27 16:18:39 2019 -0800 CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks Currently when the client creates a cifsFileInfo structure for a newly opened file, it allocates a list of byte-range locks with a pointer to the new cfile and attaches this list to the inode's lock list. The latter happens before initializing all other fields, e.g. cfile->tlink. Thus a partially initialized cifsFileInfo structure becomes available to other threads that walk through the inode's lock list. One example of such a thread may be an oplock break worker thread that tries to push all cached byte-range locks. This causes NULL-pointer dereference in smb2_push_mandatory_locks() when accessing cfile->tlink: [598428.945633] BUG: kernel NULL pointer dereference, address: 0000000000000038 ... [598428.945749] Workqueue: cifsoplockd cifs_oplock_break [cifs] [598428.945793] RIP: 0010:smb2_push_mandatory_locks+0xd6/0x5a0 [cifs] ... [598428.945834] Call Trace: [598428.945870] ? cifs_revalidate_mapping+0x45/0x90 [cifs] [598428.945901] cifs_oplock_break+0x13d/0x450 [cifs] [598428.945909] process_one_work+0x1db/0x380 [598428.945914] worker_thread+0x4d/0x400 [598428.945921] kthread+0x104/0x140 [598428.945925] ? process_one_work+0x380/0x380 [598428.945931] ? kthread_park+0x80/0x80 [598428.945937] ret_from_fork+0x35/0x40 Fix this by reordering initialization steps of the cifsFileInfo structure: initialize all the fields first and then add the new byte-range lock list to the inode's lock list. Cc: Stable Signed-off-by: Pavel Shilovsky Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 22802bf742c25b1e2473c70b3b99da98af65ef4d Author: Keith Busch Date: Tue Dec 3 00:44:59 2019 +0900 nvme: Namepace identification descriptor list is optional Despite NVM Express specification 1.3 requires a controller claiming to be 1.3 or higher implement Identify CNS 03h (Namespace Identification Descriptor list), the driver doesn't really need this identification in order to use a namespace. The code had already documented in comments that we're not to consider an error to this command. Return success if the controller provided any response to an namespace identification descriptors command. Fixes: 538af88ea7d9de24 ("nvme: make nvme_report_ns_ids propagate error back") Link: https://bugzilla.kernel.org/show_bug.cgi?id=205679 Reported-by: Ingo Brunberg Cc: Sagi Grimberg Cc: stable@vger.kernel.org # 5.4+ Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 040b5cfbcefa263ccf2c118c4938308606bb7ed8 Author: Martin Varghese Date: Mon Dec 2 10:49:51 2019 +0530 Fixed updating of ethertype in function skb_mpls_pop The skb_mpls_pop was not updating ethertype of an ethernet packet if the packet was originally received from a non ARPHRD_ETHER device. In the below OVS data path flow, since the device corresponding to port 7 is an l3 device (ARPHRD_NONE) the skb_mpls_pop function does not update the ethertype of the packet even though the previous push_eth action had added an ethernet header to the packet. recirc_id(0),in_port(7),eth_type(0x8847), mpls(label=12/0xfffff,tc=0/0,ttl=0/0x0,bos=1/1), actions:push_eth(src=00:00:00:00:00:00,dst=00:00:00:00:00:00), pop_mpls(eth_type=0x800),4 Fixes: ed246cee09b9 ("net: core: move pop MPLS functionality from OvS to core helper") Signed-off-by: Martin Varghese Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit b3c424eb6a1a3c485de64619418a471dee6ce849 Author: Victorien Molle Date: Mon Dec 2 15:11:38 2019 +0100 sch_cake: Add missing NLA policy entry TCA_CAKE_SPLIT_GSO This field has never been checked since introduction in mainline kernel Signed-off-by: Victorien Molle Signed-off-by: Florent Fourcot Fixes: 2db6dc2662ba "sch_cake: Make gso-splitting configurable from userspace" Acked-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 937d6eefc716a9071f0e3bada19200de1bb9d048 Merge: 2c97b5ae83dc 36bb9778fd11 Author: Linus Torvalds Date: Mon Dec 2 11:51:02 2019 -0800 Merge tag 'docs-5.5a' of git://git.lwn.net/linux Pull Documentation updates from Jonathan Corbet: "Here are the main documentation changes for 5.5: - Various kerneldoc script enhancements. - More RST conversions; those are slowing down as we run out of things to convert, but we're a ways from done still. - Dan's "maintainer profile entry" work landed at last. Now we just need to get maintainers to fill in the profiles... - A reworking of the parallel build setup to work better with a variety of systems (and to not take over huge systems entirely in particular). - The MAINTAINERS file is now converted to RST during the build. Hopefully nobody ever tries to print this thing, or they will need to load a lot of paper. - A script and documentation making it easy for maintainers to add Link: tags at commit time. Also included is the removal of a bunch of spurious CR characters" * tag 'docs-5.5a' of git://git.lwn.net/linux: (91 commits) docs: remove a bunch of stray CRs docs: fix up the maintainer profile document libnvdimm, MAINTAINERS: Maintainer Entry Profile Maintainer Handbook: Maintainer Entry Profile MAINTAINERS: Reclaim the P: tag for Maintainer Entry Profile docs, parallelism: Rearrange how jobserver reservations are made docs, parallelism: Do not leak blocking mode to other readers docs, parallelism: Fix failure path and add comment Documentation: Remove bootmem_debug from kernel-parameters.txt Documentation: security: core.rst: fix warnings Documentation/process/howto/kokr: Update for 4.x -> 5.x versioning Documentation/translation: Use Korean for Korean translation title docs/memory-barriers.txt: Remove remaining references to mmiowb() docs/memory-barriers.txt/kokr: Update I/O section to be clearer about CPU vs thread docs/memory-barriers.txt/kokr: Fix style, spacing and grammar in I/O section Documentation/kokr: Kill all references to mmiowb() docs/memory-barriers.txt/kokr: Rewrite "KERNEL I/O BARRIER EFFECTS" section docs: Add initial documentation for devfreq Documentation: Document how to get links with git am docs: Add request_irq() documentation ... commit 2c97b5ae83dca56718774e7b4bf9640f05d11867 Merge: 8328dd2f394e a8de1304b7df Author: Linus Torvalds Date: Mon Dec 2 11:41:35 2019 -0800 Merge tag 'devicetree-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree updates from Rob Herring: - DT schemas for PWM, syscon, power domains, SRAM, syscon-reboot, syscon-poweroff, renesas-irqc, simple-pm-bus, renesas-bsc, pwm-rcar, Renesas tpu, at24 eeprom, rtc-sh, Allwinner PS/2, sharp,ld-d5116z01b panel, Arm SMMU, max77650, Meson CEC, Amlogic canvas and DWC3 glue, Allwinner A10 mUSB and CAN, TI Davinci MDIO, QCom QCS404 interconnect, Unisoc/Spreadtrum SoCs and UART - Convert a bunch of Samsung bindings to DT schema - Convert a bunch of ST stm32 bindings to DT schema - Realtek and Exynos additions to Arm Mali bindings - Fix schema errors in RiscV CPU schema - Various schema fixes from improved meta-schema checks - Improve the handling of 'dma-ranges' and in particular fix DMA mask setup on PCI bridges - Fix a memory leak in add_changeset_property() and DT unit tests. - Several documentation improvements for schema validation - Rework build rules to improve schema validation errors - Color output for dtx_diff * tag 'devicetree-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (138 commits) libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h dt-bindings: arm: Remove leftover axentia.txt of: unittest: fix memory leak in attach_node_and_children of: overlay: add_changeset_property() memory leak dt-bindings: interrupt-controller: arm,gic-v3: Add missing type to interrupt-partition-* nodes dt-bindings: firmware: ixp4xx: Drop redundant minItems/maxItems dt-bindings: power: Rename back power_domain.txt bindings to fix references dt-bindings: i2c: stm32: Migrate i2c-stm32 documentation to yaml dt-bindings: mtd: Convert stm32 fmc2-nand bindings to json-schema dt-bindings: remoteproc: convert stm32-rproc to json-schema dt-bindings: mailbox: convert stm32-ipcc to json-schema dt-bindings: mfd: Convert stm32 low power timers bindings to json-schema dt-bindings: interrupt-controller: Convert stm32-exti to json-schema dt-bindings: crypto: Convert stm32 HASH bindings to json-schema dt-bindings: rng: Convert stm32 RNG bindings to json-schema dt-bindings: pwm: Convert Samsung PWM bindings to json-schema dt-bindings: pwm: Convert PWM bindings to json-schema dt-bindings: serial: Add a new compatible string for SC9863A dt-bindings: serial: Convert sprd-uart to json-schema dt-bindings: arm: Add bindings for Unisoc SC9863A ... commit 8328dd2f394e48a010383af176bf55ba4be79da0 Merge: 1daa56bcfd8b 8d82cee2f8aa Author: Linus Torvalds Date: Mon Dec 2 11:26:40 2019 -0800 Merge tag 'pstore-v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore bug fix from Kees Cook: - add missing "static" (Ben Dooks) * tag 'pstore-v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: Make pstore_choose_compression() static commit 1daa56bcfd8b329447e0c1b1e91c3925d08489b7 Merge: a5255bc31673 9b3a713feef8 Author: Linus Torvalds Date: Mon Dec 2 11:05:00 2019 -0800 Merge tag 'iommu-updates-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - Conversion of the AMD IOMMU driver to use the dma-iommu code for imlementing the DMA-API. This gets rid of quite some code in the driver itself, but also has some potential for regressions (non are known at the moment). - Support for the Qualcomm SMMUv2 implementation in the SDM845 SoC. This also includes some firmware interface changes, but those are acked by the respective maintainers. - Preparatory work to support two distinct page-tables per domain in the ARM-SMMU driver - Power management improvements for the ARM SMMUv2 - Custom PASID allocator support - Multiple PCI DMA alias support for the AMD IOMMU driver - Adaption of the Mediatek driver to the changed IO/TLB flush interface of the IOMMU core code. - Preparatory patches for the Renesas IOMMU driver to support future hardware. * tag 'iommu-updates-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (62 commits) iommu/rockchip: Don't provoke WARN for harmless IRQs iommu/vt-d: Turn off translations at shutdown iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved iommu/arm-smmu: Remove duplicate error message iommu/arm-smmu-v3: Don't display an error when IRQ lines are missing iommu/ipmmu-vmsa: Add utlb_offset_base iommu/ipmmu-vmsa: Add helper functions for "uTLB" registers iommu/ipmmu-vmsa: Calculate context registers' offset instead of a macro iommu/ipmmu-vmsa: Add helper functions for MMU "context" registers iommu/ipmmu-vmsa: tidyup register definitions iommu/ipmmu-vmsa: Remove all unused register definitions iommu/mediatek: Reduce the tlb flush timeout value iommu/mediatek: Get rid of the pgtlock iommu/mediatek: Move the tlb_sync into tlb_flush iommu/mediatek: Delete the leaf in the tlb_flush iommu/mediatek: Use gather to achieve the tlb range flush iommu/mediatek: Add a new tlb_lock for tlb_flush iommu/mediatek: Correct the flush_iotlb_all callback iommu/io-pgtable-arm: Rename IOMMU_QCOM_SYS_CACHE and improve doc iommu/io-pgtable-arm: Rationalise MAIR handling ... commit a5255bc31673c72e264d837cd13cd3085d72cb58 Merge: 596cf45cbf6e 67805a4b3c92 Author: Linus Torvalds Date: Mon Dec 2 11:00:19 2019 -0800 Merge tag 'dmaengine-5.5-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "Here are the changes this time around, couple of new drivers and updates to few more: - New drivers for SiFive PDMA, Socionext Milbeaut HDMAC and XDMAC, Freescale dpaa2 qDMA - Support for X1000 in JZ4780 - Xilinx dma updates and support for Xilinx AXI MCDM controller - New bindings for rcar R8A774B1 - Minor updates to dw, dma-jz4780, ti-edma, sprd drivers" * tag 'dmaengine-5.5-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (61 commits) dmaengine: Fix Kconfig indentation dmaengine: sf-pdma: move macro to header file dmaengine: sf-pdma: replace /** with /* for non-function comment dmaengine: ti: edma: fix missed failure handling dmaengine: mmp_pdma: add missed of_dma_controller_free dmaengine: mmp_tdma: add missed of_dma_controller_free dmaengine: sprd: Add wrap address support for link-list mode MAINTAINERS: Add Green as SiFive PDMA driver maintainer dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00 dt-bindings: dmaengine: sf-pdma: add bindins for SiFive PDMA dmaengine: zx: remove: removed dmam_pool_destroy dmaengine: mediatek: hsdma_probe: fixed a memory leak when devm_request_irq fails dmaengine: iop-adma: clean up an indentation issue dmaengine: milbeaut-xdmac: remove redundant error log dmaengine: milbeaut-hdmac: remove redundant error log dmaengine: dma-jz4780: add missed clk_disable_unprepare in remove dmaengine: JZ4780: Add support for the X1000. dt-bindings: dmaengine: Add X1000 bindings. dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support dmaengine: xilinx_dma: Extend dma_config struct to store irq routine handle ... commit a7effde99b6e8119b28c235eda5419c2e03b3089 Author: Joe Perches Date: Thu Nov 28 09:13:26 2019 -0800 MIPS: Kconfig: Use correct form for 'depends on' Remove the CONFIG_ prefix from "depends on" as it makes the selection not possible. Signed-off-by: Joe Perches Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: LKML commit 7d2aa4bb90f5f6f1b8de8848c26042403f2d7bf9 Author: Vincenzo Frascino Date: Fri Nov 29 14:36:58 2019 +0000 mips: Fix gettimeofday() in the vdso library The libc provides a discovery mechanism for vDSO library and its symbols. When a symbol is not exposed by the vDSOs the libc falls back on the system calls. With the introduction of the unified vDSO library on mips this behavior is not honored anymore by the kernel in the case of gettimeofday(). The issue has been noticed and reported due to a dhclient failure on the CI20 board: root@letux:~# dhclient ../../../../lib/isc/unix/time.c:200: Operation not permitted root@letux:~# Restore the original behavior fixing gettimeofday() in the vDSO library. Reported-by: H. Nikolaus Schaller Tested-by: H. Nikolaus Schaller # CI20 with JZ4780 Signed-off-by: Vincenzo Frascino Signed-off-by: Paul Burton Cc: mips-creator-ci20-dev@googlegroups.com Cc: letux-kernel@openphoenux.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 734c7022adaa7833aa809b3f2c3fc0cf09b2a48e Merge: 596cf45cbf6e 3464afdf11f9 Author: David S. Miller Date: Mon Dec 2 10:50:29 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-12-02 The following pull-request contains BPF updates for your *net* tree. We've added 10 non-merge commits during the last 6 day(s) which contain a total of 10 files changed, 60 insertions(+), 51 deletions(-). The main changes are: 1) Fix vmlinux BTF generation for binutils pre v2.25, from Stanislav Fomichev. 2) Fix libbpf global variable relocation to take symbol's st_value offset into account, from Andrii Nakryiko. 3) Fix libbpf build on powerpc where check_abi target fails due to different readelf output format, from Aurelien Jarno. 4) Don't set BPF insns RO for the case when they are JITed in order to avoid fragmenting the direct map, from Daniel Borkmann. 5) Fix static checker warning in btf_distill_func_proto() as well as a build error due to empty enum when BPF is compiled out, from Alexei Starovoitov. 6) Fix up generation of bpf_helper_defs.h for perf, from Arnaldo Carvalho de Melo. ==================== Signed-off-by: David S. Miller commit 9974406884459c9301597c2c9f7def6c38099ab4 Author: Arnaldo Carvalho de Melo Date: Mon Dec 2 15:38:59 2019 -0300 perf kvm: Clarify the 'perf kvm' -i and -o command line options The 'perf kvm' subcommand has options that it in turn passes to other perf subcommands such as 'report' and 'record', particularly -i and -o end up setting the same variable that will then be used for 'record's -o and report '-i', which ends up being confusing, leading some to think that both -i and -o can be used with 'report'. Improve the man page to state that -i is used with the post-processing subcommands while -o is used just with 'record' and that to save the output of 'report' one should simply redirect its output to a file. Noticed while reading the https://www.linux-kvm.org/page/Perf_events page. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steve Dickson Cc: William Cohen Link: https://lkml.kernel.org/n/tip-tclbttvmgtm525fvmh85f7d9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a717ab38a51404a3f7069987f77676cde82139ac Author: Arnaldo Carvalho de Melo Date: Mon Dec 2 15:11:51 2019 -0300 tools arch x86: Sync asm/cpufeatures.h with the kernel sources To pick up the changes from: a25bbc2644f0 ("Merge branches 'x86-cpu-for-linus' and 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") db4d30fbb71b ("x86/bugs: Add ITLB_MULTIHIT bug infrastructure") 1b42f017415b ("x86/speculation/taa: Add mitigation for TSX Async Abort") 9d40b85bb46a ("x86/cpufeatures: Add feature bit RDPRU on AMD") These don't cause any changes in tooling, just silences this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Adrian Hunter Cc: Babu Moger Cc: Borislav Petkov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Pawan Gupta Cc: Thomas Gleixner Cc: Vineela Tummalapalli Link: https://lkml.kernel.org/n/tip-yufg9yt2nbkh45r9xvxnnscq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f6661125ff41e27b488f36422226653baad3c382 Author: Arnaldo Carvalho de Melo Date: Mon Dec 2 13:02:25 2019 -0300 perf beauty: Add CLEAR_SIGHAND support for clone's flags arg Add support for the recently added CLONE_CLEAR_SIGHAND flag. This takes advantage of the copy of the uapi/linux/sched.h we have in tools/include, which allows us to build tools/perf in older systems and have the binary support printing that flag whenever that system gets its kernel updated to one where this feature is present. Cc: Adrian Hunter Cc: Adrian Reber Cc: Christian Brauner Cc: Jiri Olsa Cc: Namhyung Kim commit 6c3edaf9fd6a3be7fb5bc6931897c24cd3848f84 Author: Cong Wang Date: Fri Nov 29 20:52:18 2019 -0800 tracing: Introduce trace event injection We have been trying to use rasdaemon to monitor hardware errors like correctable memory errors. rasdaemon uses trace events to monitor various hardware errors. In order to test it, we have to inject some hardware errors, unfortunately not all of them provide error injections. MCE does provide a way to inject MCE errors, but errors like PCI error and devlink error don't, it is not easy to add error injection to each of them. Instead, it is relatively easier to just allow users to inject trace events in a generic way so that all trace events can be injected. This patch introduces trace event injection, where a new 'inject' is added to each tracepoint directory. Users could write into this file with key=value pairs to specify the value of each fields of the trace event, all unspecified fields are set to zero values by default. For example, for the net/net_dev_queue tracepoint, we can inject: INJECT=/sys/kernel/debug/tracing/events/net/net_dev_queue/inject echo "" > $INJECT echo "name='test'" > $INJECT echo "name='test' len=1024" > $INJECT cat /sys/kernel/debug/tracing/trace ... <...>-614 [000] .... 36.571483: net_dev_queue: dev= skbaddr=00000000fbf338c2 len=0 <...>-614 [001] .... 136.588252: net_dev_queue: dev=test skbaddr=00000000fbf338c2 len=0 <...>-614 [001] .N.. 208.431878: net_dev_queue: dev=test skbaddr=00000000fbf338c2 len=1024 Triggers could be triggered as usual too: echo "stacktrace if len == 1025" > /sys/kernel/debug/tracing/events/net/net_dev_queue/trigger echo "len=1025" > $INJECT cat /sys/kernel/debug/tracing/trace ... bash-614 [000] .... 36.571483: net_dev_queue: dev= skbaddr=00000000fbf338c2 len=0 bash-614 [001] .... 136.588252: net_dev_queue: dev=test skbaddr=00000000fbf338c2 len=0 bash-614 [001] .N.. 208.431878: net_dev_queue: dev=test skbaddr=00000000fbf338c2 len=1024 bash-614 [001] .N.1 284.236349: => event_inject_write => vfs_write => ksys_write => do_syscall_64 => entry_SYSCALL_64_after_hwframe The only thing that can't be injected is string pointers as they require constant string pointers, this can't be done at run time. Link: http://lkml.kernel.org/r/20191130045218.18979-1-xiyou.wangcong@gmail.com Cc: Ingo Molnar Signed-off-by: Cong Wang Signed-off-by: Steven Rostedt (VMware) commit 2603a4903bf96d2fe15b7d9e2d03b7efdffbd99a Author: Arnaldo Carvalho de Melo Date: Mon Dec 2 12:56:39 2019 -0300 tools headers UAPI: Sync sched.h with the kernel To get the changes in: 0acefef58451 ("Merge tag 'threads-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux") 49cb2fc42ce4 ("fork: extend clone3() to support setting a PID") fa729c4df558 ("clone3: validate stack arguments") b612e5df4587 ("clone3: add CLONE_CLEAR_SIGHAND") This file gets rebuilt, but no changes ensues: CC /tmp/build/perf/trace/beauty/clone.o This addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/sched.h' differs from latest version at 'include/uapi/linux/sched.h' diff -u tools/include/uapi/linux/sched.h include/uapi/linux/sched. The CLONE_CLEAR_SIGHAND one will be used in tools/perf/trace/beauty/clone.c in a followup patch to show that string when this bit is set in the syscall arg. Keeping a copy of this file allows us to build this in older systems and have the binary support printing that flag whenever that system gets its kernel updated to one where this feature is present. Cc: Adrian Hunter Cc: Adrian Reber Cc: Christian Brauner Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-nprqsvvzbhzoy64cbvos6c5b@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1fc3d0ee242de68267769afcaf5520439de42f64 Author: Arnaldo Carvalho de Melo Date: Mon Dec 2 12:44:24 2019 -0300 tools headers kvm: Sync kvm headers with the kernel sources To pick up the changes from: 14edff88315a Merge tag 'kvmarm-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD a4b28f5c6798 Merge remote-tracking branch 'kvmarm/kvm-arm64/stolen-time' into kvmarm-master/next 58772e9a3db7 ("KVM: arm64: Provide VCPU attributes for stolen time") da345174ceca ("KVM: arm/arm64: Allow user injection of external data aborts") c726200dd106 ("KVM: arm/arm64: Allow reporting non-ISV data aborts to userspace") efe5ddcae496 ("KVM: PPC: Book3S HV: XIVE: Allow userspace to set the # of VPs") No tools changes are caused by this, as the only defines so far used from these files are for syscall arg pretty printing are: $ grep KVM tools/perf/trace/beauty/*.sh tools/perf/trace/beauty/kvm_ioctl.sh:regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*' $ Some are also include by: tools/perf/arch/x86/util/kvm-stat.c tools/perf/arch/powerpc/util/kvm-stat.c This addresses these tools/perf build warnings: 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/arch/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h' diff -u tools/arch/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h' diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h' diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h Cc: Adrian Hunter Cc: Christoffer Dall Cc: Fabiano Rosas Cc: Greg Kurz Cc: Jiri Olsa Cc: Marc Zyngier Cc: Namhyung Kim Cc: Paul Mackerras Cc: Steven Price Link: https://lkml.kernel.org/n/tip-qrjdudhq25mk5bfnhveofbm4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0b8c0ec7eedcd8f9f1a1f238d87f9b512b09e71a Author: Jens Axboe Date: Mon Dec 2 08:50:00 2019 -0700 io_uring: use current task creds instead of allocating a new one syzbot reports: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 9217 Comm: io_uring-sq Not tainted 5.4.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:creds_are_invalid kernel/cred.c:792 [inline] RIP: 0010:__validate_creds include/linux/cred.h:187 [inline] RIP: 0010:override_creds+0x9f/0x170 kernel/cred.c:550 Code: ac 25 00 81 fb 64 65 73 43 0f 85 a3 37 00 00 e8 17 ab 25 00 49 8d 7c 24 10 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 96 00 00 00 41 8b 5c 24 10 bf RSP: 0018:ffff88809c45fda0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000043736564 RCX: ffffffff814f3318 RDX: 0000000000000002 RSI: ffffffff814f3329 RDI: 0000000000000010 RBP: ffff88809c45fdb8 R08: ffff8880a3aac240 R09: ffffed1014755849 R10: ffffed1014755848 R11: ffff8880a3aac247 R12: 0000000000000000 R13: ffff888098ab1600 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd51c40664 CR3: 0000000092641000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: io_sq_thread+0x1c7/0xa20 fs/io_uring.c:3274 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Modules linked in: ---[ end trace f2e1a4307fbe2245 ]--- RIP: 0010:creds_are_invalid kernel/cred.c:792 [inline] RIP: 0010:__validate_creds include/linux/cred.h:187 [inline] RIP: 0010:override_creds+0x9f/0x170 kernel/cred.c:550 Code: ac 25 00 81 fb 64 65 73 43 0f 85 a3 37 00 00 e8 17 ab 25 00 49 8d 7c 24 10 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 96 00 00 00 41 8b 5c 24 10 bf RSP: 0018:ffff88809c45fda0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000043736564 RCX: ffffffff814f3318 RDX: 0000000000000002 RSI: ffffffff814f3329 RDI: 0000000000000010 RBP: ffff88809c45fdb8 R08: ffff8880a3aac240 R09: ffffed1014755849 R10: ffffed1014755848 R11: ffff8880a3aac247 R12: 0000000000000000 R13: ffff888098ab1600 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd51c40664 CR3: 0000000092641000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 which is caused by slab fault injection triggering a failure in prepare_creds(). We don't actually need to create a copy of the creds as we're not modifying it, we just need a reference on the current task creds. This avoids the failure case as well, and propagates the const throughout the stack. Fixes: 181e448d8709 ("io_uring: async workers should inherit the user creds") Reported-by: syzbot+5320383e16029ba057ff@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit c66f2566db340b04c113ea1d930651246d9d4049 Author: Arnaldo Carvalho de Melo Date: Mon Dec 2 12:24:52 2019 -0300 tools headers uapi: Sync linux/stat.h with the kernel sources To pick the changes from: 3ad2522c64cf ("statx: define STATX_ATTR_VERITY") That don't trigger any changes in tooling. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/stat.h' differs from latest version at 'include/uapi/linux/stat.h' diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h At some point we wi'll beautify structs passed in pointers to syscalls and then we'll need to have tables for these defines, for now update the file to silence the warning as this file is used for doing this type of number -> string translations for other defines found in these file. Cc: Adrian Hunter Cc: Eric Biggers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-thcy60dpry5qrpn7nmc58bwg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ad46f35cca45e3164137271cd7f06d7e66dae6be Author: Arnaldo Carvalho de Melo Date: Mon Dec 2 12:19:24 2019 -0300 tools headers uapi: Sync linux/fscrypt.h with the kernel sources To pick the changes from: b103fb7653ff ("fscrypt: add support for IV_INO_LBLK_64 policies") That don't trigger any changes in tooling. This silences this perf 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: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-cgfz3ffe07pw2m8hmstvkudl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8122b047dd18ef6e7e1c564e28f3c7067c5a2d71 Author: Arnaldo Carvalho de Melo Date: Mon Dec 2 12:03:49 2019 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes from these csets: 3f3c8be973af Merge tag 'for-linus-5.5a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip 4e3f77d8419b ("xen/mcelog: add PPIN to record when available") db4d30fbb71b ("x86/bugs: Add ITLB_MULTIHIT bug infrastructure") 1b42f017415b ("x86/speculation/taa: Add mitigation for TSX Async Abort") c2955f270a84 ("x86/msr: Add the IA32_TSX_CTRL MSR") These are the changes in tooling that this udpate ensues: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > /tmp/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 > /tmp/after $ diff -u /tmp/before /tmp/after --- /tmp/before 2019-12-02 11:54:44.371035723 -0300 +++ /tmp/after 2019-12-02 11:55:31.847859784 -0300 @@ -48,6 +48,7 @@ [0x00000119] = "IA32_BBL_CR_CTL", [0x0000011e] = "IA32_BBL_CR_CTL3", [0x00000120] = "IDT_MCR_CTRL", + [0x00000122] = "IA32_TSX_CTRL", [0x00000140] = "MISC_FEATURES_ENABLES", [0x00000174] = "IA32_SYSENTER_CS", [0x00000175] = "IA32_SYSENTER_ESP", @@ -283,4 +284,6 @@ [0xc0010240 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTL", [0xc0010241 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTR", [0xc0010280 - x86_AMD_V_KVM_MSRs_offset] = "F15H_PTSC", + [0xc00102f0 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN_CTL", + [0xc00102f1 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN", }; $ CC /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o 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 Now it is possible to use these strings when setting up filters for the msr:* tracepoints, like: # perf trace -e msr:* --filter=msr==IA32_TSX_CTRL ^C[root@quaco ~]# If we use an invalid operator we can check what is the filter that is put in place: # perf trace -e msr:* --filter=msr=IA32_TSX_CTRL Failed to set filter "(msr=0x122) && (common_pid != 25976 && common_pid != 25860)" on event msr:read_msr with 22 (Invalid argument) One can as well use -v to see the tracepoints and its filters: # perf trace -v -e msr:* --filter=msr==IA32_TSX_CTRL Using CPUID GenuineIntel-6-8E-A New filter for msr:read_msr: (msr==0x122) && (common_pid != 26110 && common_pid != 25860) New filter for msr:write_msr: (msr==0x122) && (common_pid != 26110 && common_pid != 25860) New filter for msr:rdpmc: (msr==0x122) && (common_pid != 26110 && common_pid != 25860) mmap size 528384B ^C# Better than keep looking up those numbers, works with callchains as well, e.g. for something more common: # perf trace -e msr:*/max-stack=16/ --filter="msr==IA32_SPEC_CTRL" --max-events=2 0.000 SCTP timer/6158 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) __switch_to_xtra ([kernel.kallsyms]) __switch_to ([kernel.kallsyms]) __sched_text_start ([kernel.kallsyms]) schedule ([kernel.kallsyms]) schedule_hrtimeout_range_clock ([kernel.kallsyms]) poll_schedule_timeout.constprop.0 ([kernel.kallsyms]) do_select ([kernel.kallsyms]) core_sys_select ([kernel.kallsyms]) kern_select ([kernel.kallsyms]) __x64_sys_select ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64 ([kernel.kallsyms]) __select (/usr/lib64/libc-2.29.so) [0] ([unknown]) 0.024 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) __switch_to_xtra ([kernel.kallsyms]) __switch_to ([kernel.kallsyms]) __sched_text_start ([kernel.kallsyms]) schedule_idle ([kernel.kallsyms]) do_idle ([kernel.kallsyms]) cpu_startup_entry ([kernel.kallsyms]) start_secondary ([kernel.kallsyms]) [0x2000d4] ([kernel.kallsyms]) # Cc: Adrian Hunter Cc: Jan Beulich Cc: Jiri Olsa Cc: Juergen Gross Cc: Namhyung Kim Cc: Pawan Gupta Cc: Thomas Gleixner Cc: Vineela Tummalapalli Link: https://lkml.kernel.org/n/tip-n1xd78fpd5lxn4q1brqi2jl6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1e58252e334dc3f3756f424a157d1b7484464c40 Author: qize wang Date: Fri Nov 29 18:10:54 2019 +0800 mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame() mwifiex_process_tdls_action_frame() without checking the incoming tdls infomation element's vality before use it, this may cause multi heap buffer overflows. Fix them by putting vality check before use it. IE is TLV struct, but ht_cap and ht_oper aren’t TLV struct. the origin marvell driver code is wrong: memcpy(&sta_ptr->tdls_cap.ht_oper, pos,.... memcpy((u8 *)&sta_ptr->tdls_cap.ht_capb, pos,... Fix the bug by changing pos(the address of IE) to pos+2 ( the address of IE value ). Signed-off-by: qize wang Signed-off-by: Kalle Valo commit 693d060536abca7b16d2fb8e66aa56be2a2443a2 Author: Lorenzo Bianconi Date: Sun Nov 24 00:42:22 2019 +0200 mt76: mt76x0: fix default mac address overwrite Current implementation always use default eeprom mac address to configure device registers even if it is updated using mt76_eeprom_override. Fix it initializing macaddr filed of mt76_dev data structure with eeprom mac address and running mt76_eeprom_override before mt76x02_mac_setaddr Fixes: d1bc9bf2072c ("mt76: mt76x0: eeprom: add support for MAC address from OF") Tested-by: Kevin Schmidt Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit bd5c6b81dd6025bd4c6ca7800a580b217d9899b9 Author: Arnaldo Carvalho de Melo Date: Mon Dec 2 11:40:57 2019 -0300 perf bench: Update the copies of x86's mem{cpy,set}_64.S And update linux/linkage.h, which requires in turn that we make these files switch from ENTRY()/ENDPROC() to SYM_FUNC_START()/SYM_FUNC_END(): tools/perf/arch/arm64/tests/regs_load.S tools/perf/arch/arm/tests/regs_load.S tools/perf/arch/powerpc/tests/regs_load.S tools/perf/arch/x86/tests/regs_load.S We also need to switch SYM_FUNC_START_LOCAL() to SYM_FUNC_START() for the functions used directly by 'perf bench', and update tools/perf/check_headers.sh to ignore those changes when checking if the kernel original files drifted from the copies we carry. This is to get the changes from: 6dcc5627f6ae ("x86/asm: Change all ENTRY+ENDPROC to SYM_FUNC_*") ef1e03152cb0 ("x86/asm: Make some functions local") e9b9d020c487 ("x86/asm: Annotate aliases") And address these tools/perf 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: Jiri Olsa Cc: Jiri Slaby Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-tay3l8x8k11p7y3qcpqh9qh5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 856a0a6e2d09d31fd8f00cc1fc6645196a509d56 Author: Wen Yang Date: Sat Nov 30 21:08:42 2019 +0800 platform/chrome: wilco_ec: fix use after free issue This is caused by dereferencing 'dev_data' after put_device() in the telem_device_remove() function. This patch just moves the put_device() down a bit to avoid this issue. Fixes: 1210d1e6bad1 ("platform/chrome: wilco_ec: Add telemetry char device interface") Signed-off-by: Wen Yang Cc: Benson Leung Cc: Enric Balletbo i Serra Cc: Nick Crews Cc: linux-kernel@vger.kernel.org Signed-off-by: Enric Balletbo i Serra commit 4afaab78522f5ea96a1b1087fe9768f3af935ac2 Merge: 3ee1a9f5d0bc 92b1aa773fad Author: Joonas Lahtinen Date: Mon Dec 2 12:17:25 2019 +0200 Merge tag 'gvt-next-fixes-2019-12-02' of https://github.com/intel/gvt-linux into drm-intel-next-fixes gvt-next-fixes-2019-12-02 - Fix cmd parser for MI_ATOMIC (Zhenyu) - Fix non-priv register access warning on CFL (Fred) Signed-off-by: Joonas Lahtinen From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20191202051711.GZ4196@zhen-hp.sh.intel.com commit 3464afdf11f9a1e031e7858a05351ceca1792fea Author: Aurelien Jarno Date: Sun Dec 1 20:57:28 2019 +0100 libbpf: Fix readelf output parsing on powerpc with recent binutils On powerpc with recent versions of binutils, readelf outputs an extra field when dumping the symbols of an object file. For example: 35: 0000000000000838 96 FUNC LOCAL DEFAULT [: 8] 1 btf_is_struct The extra "[: 8]" prevents the GLOBAL_SYM_COUNT variable to be computed correctly and causes the check_abi target to fail. Fix that by looking for the symbol name in the last field instead of the 8th one. This way it should also cope with future extra fields. Signed-off-by: Aurelien Jarno Signed-off-by: Daniel Borkmann Tested-by: Michael Ellerman Link: https://lore.kernel.org/bpf/20191201195728.4161537-1-aurelien@aurel32.net commit 3ee1a9f5d0bc0e9dbac5b014e2e8a7d540b836df Author: Chris Wilson Date: Fri Nov 29 15:18:45 2019 +0000 drm/i915/gem: Take timeline->mutex to walk list-of-requests Though the context is closed and so no more requests can be added to the timeline, retirement can still be removing requests. It can even be removing the very request we are inspecting and so cause us to wander into dead links. Serialise with the retirement by taking the timeline->mutex used for guarding the timeline->requests list. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112404 Fixes: 4a3174152147 ("drm/i915/gem: Refine occupancy test in kill_context()") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191129151845.1092933-1-chris@chris-wilson.co.uk (cherry picked from commit 7ce596a8036cf3a4cb9ffa0c4edd8a76a7a43cc3) Signed-off-by: Joonas Lahtinen commit d1f4c966475c6dd2545c6625022cb24e878bee11 Author: wenxu Date: Wed Nov 13 12:21:07 2019 +0800 netfilter: nf_tables_offload: Check for the NETDEV_UNREGISTER event Check for the NETDEV_UNREGISTER event from the nft_offload_netdev_event function, which is the event that actually triggers the clean up. Fixes: 06d392cbe3db ("netfilter: nf_tables_offload: remove rules when the device unregisters") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 024aa8732acb7d2503eae43c3fe3504d0a8646d0 Author: Rafael J. Wysocki Date: Thu Nov 28 23:50:40 2019 +0100 ACPI: PM: s2idle: Rework ACPI events synchronization Note that the EC GPE processing need not be synchronized in acpi_s2idle_wake() after invoking acpi_ec_dispatch_gpe(), because that function checks the GPE status and dispatches its handler if need be and the SCI action handler is not going to run anyway at that point. Moreover, it is better to drain all of the pending ACPI events before restoring the working-state configuration of GPEs in acpi_s2idle_restore(), because those events are likely to be related to system wakeup, in which case they will not be relevant going forward. Rework the code to take these observations into account. Tested-by: Kenneth R. Crudup Signed-off-by: Rafael J. Wysocki commit 016b87ca5c8c6e9e87db442f04dc99609b11ed36 Author: Rafael J. Wysocki Date: Thu Nov 28 23:47:51 2019 +0100 ACPI: EC: Rework flushing of pending work There is a race condition in the ACPI EC driver, between __acpi_ec_flush_event() and acpi_ec_event_handler(), that may cause systems to stay in suspended-to-idle forever after a wakeup event coming from the EC. Namely, acpi_s2idle_wake() calls acpi_ec_flush_work() to wait until the delayed work resulting from the handling of the EC GPE in acpi_ec_dispatch_gpe() is processed, and that function invokes __acpi_ec_flush_event() which uses wait_event() to wait for ec->nr_pending_queries to become zero on ec->wait, and that wait queue may be woken up too early. Suppose that acpi_ec_dispatch_gpe() has caused acpi_ec_gpe_handler() to run, so advance_transaction() has been called and it has invoked acpi_ec_submit_query() to queue up an event work item, so ec->nr_pending_queries has been incremented (under ec->lock). The work function of that work item, acpi_ec_event_handler() runs later and calls acpi_ec_query() to process the event. That function calls acpi_ec_transaction() which invokes acpi_ec_transaction_unlocked() and the latter wakes up ec->wait under ec->lock, but it drops that lock before returning. When acpi_ec_query() returns, acpi_ec_event_handler() acquires ec->lock and decrements ec->nr_pending_queries, but at that point __acpi_ec_flush_event() (woken up previously) may already have acquired ec->lock, checked the value of ec->nr_pending_queries (and it would not have been zero then) and decided to go back to sleep. Next, if ec->nr_pending_queries is equal to zero now, the loop in acpi_ec_event_handler() terminates, ec->lock is released and acpi_ec_check_event() is called, but it does nothing unless ec_event_clearing is equal to ACPI_EC_EVT_TIMING_EVENT (which is not the case by default). In the end, if no more event work items have been queued up while executing acpi_ec_transaction_unlocked(), there is nothing to wake up __acpi_ec_flush_event() again and it sleeps forever, so the suspend-to-idle loop cannot make progress and the system is permanently suspended. To avoid this issue, notice that it actually is not necessary to wait for ec->nr_pending_queries to become zero in every case in which __acpi_ec_flush_event() is used. First, during platform-based system suspend (not suspend-to-idle), __acpi_ec_flush_event() is called by acpi_ec_disable_event() after clearing the EC_FLAGS_QUERY_ENABLED flag, which prevents acpi_ec_submit_query() from submitting any new event work items, so calling flush_scheduled_work() and flushing ec_query_wq subsequently (in order to wait until all of the queries in that queue have been processed) would be sufficient to flush all of the pending EC work in that case. Second, the purpose of the flushing of pending EC work while suspended-to-idle described above really is to wait until the first event work item coming from acpi_ec_dispatch_gpe() is complete, because it should produce system wakeup events if that is a valid EC-based system wakeup, so calling flush_scheduled_work() followed by flushing ec_query_wq is also sufficient for that purpose. Rework the code to follow the above observations. Fixes: 56b9918490 ("PM: sleep: Simplify suspend-to-idle control flow") Reported-by: Kenneth R. Crudup Tested-by: Kenneth R. Crudup Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit b3f7931f5c61ba39e81a5c958bf5d65ebb1838af Author: Juergen Gross Date: Thu Nov 7 12:15:46 2019 +0100 xen/gntdev: switch from kcalloc() to kvcalloc() With sufficient many pages to map gntdev can reach order 9 allocation sizes. As there is no need to have physically contiguous buffers switch to kvcalloc() in order to avoid failing allocations. Signed-off-by: Juergen Gross Reviewed-by: Oleksandr Andrushchenko Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 3b06ac6707c196b5036fe013c460da86c9060085 Author: Juergen Gross Date: Thu Nov 7 12:15:45 2019 +0100 xen/gntdev: replace global limit of mapped pages by limit per call Today there is a global limit of pages mapped via /dev/xen/gntdev set to 1 million pages per default. There is no reason why that limit is existing, as total number of grant mappings is limited by the hypervisor anyway and preferring kernel mappings over userspace ones doesn't make sense. It should be noted that the gntdev device is usable by root only. Additionally checking of that limit is fragile, as the number of pages to map via one call is specified in a 32-bit unsigned variable which isn't tested to stay within reasonable limits (the only test is the value to be <= zero, which basically excludes only calls without any mapping requested). So trying to map e.g. 0xffff0000 pages while already nearly 1000000 pages are mapped will effectively lower the global number of mapped pages such that a parallel call mapping a reasonable amount of pages can succeed in spite of the global limit being violated. So drop the global limit and introduce per call limit instead. This per call limit (default: 65536 grant mappings) protects against allocating insane large arrays in the kernel for doing a hypercall which will fail anyway in case a user is e.g. trying to map billions of pages. Signed-off-by: Juergen Gross Reviewed-by: Oleksandr Andrushchenko Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit d41b26d81a83e04500e926fbab746ae87c20bb0e Author: Colin Ian King Date: Mon Nov 11 12:20:09 2019 +0000 xen/gntdev: remove redundant non-zero check on ret The non-zero check on ret is always going to be false because ret was initialized as zero and the only place it is set to non-zero contains a return path before the non-zero check. Hence the check is redundant and can be removed. [ jgross@suse.com: limit scope of ret ] Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 348be43384e6bcd5e9da7ff5f1680d49f65c488d Author: Juergen Gross Date: Fri Nov 29 13:39:41 2019 +0100 xen/events: remove event handling recursion detection __xen_evtchn_do_upcall() contains guards against being called recursively. This mechanism was introduced in the early pvops times (kernel 2.6.26) when there were all the Xen backend drivers missing from the upstream kernel, and some of those out-of-tree drivers were enabling interrupts in their event handlers (which was explicitly allowed in the initial XenoLinux). Nowadays we don't need to support those old drivers any more and the capability to allow recursive calls of __xen_evtchn_do_upcall() can be removed. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 596cf45cbf6e4fa7bcb0df33e373a7d062b644b5 Merge: c3bfc5dd73c6 937790699be9 Author: Linus Torvalds Date: Sun Dec 1 20:36:41 2019 -0800 Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: "Incoming: - a small number of updates to scripts/, ocfs2 and fs/buffer.c - most of MM I still have quite a lot of material (mostly not MM) staged after linux-next due to -next dependencies. I'll send those across next week as the preprequisites get merged up" * emailed patches from Andrew Morton : (135 commits) mm/page_io.c: annotate refault stalls from swap_readpage mm/Kconfig: fix trivial help text punctuation mm/Kconfig: fix indentation mm/memory_hotplug.c: remove __online_page_set_limits() mm: fix typos in comments when calling __SetPageUptodate() mm: fix struct member name in function comments mm/shmem.c: cast the type of unmap_start to u64 mm: shmem: use proper gfp flags for shmem_writepage() mm/shmem.c: make array 'values' static const, makes object smaller userfaultfd: require CAP_SYS_PTRACE for UFFD_FEATURE_EVENT_FORK fs/userfaultfd.c: wp: clear VM_UFFD_MISSING or VM_UFFD_WP during userfaultfd_register() userfaultfd: wrap the common dst_vma check into an inlined function userfaultfd: remove unnecessary WARN_ON() in __mcopy_atomic_hugetlb() userfaultfd: use vma_pagesize for all huge page size calculation mm/madvise.c: use PAGE_ALIGN[ED] for range checking mm/madvise.c: replace with page_size() in madvise_inject_error() mm/mmap.c: make vma_merge() comment more easy to understand mm/hwpoison-inject: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops autonuma: reduce cache footprint when scanning page tables autonuma: fix watermark checking in migrate_balanced_pgdat() ... commit c3bfc5dd73c6f519ff0636d4e709515f06edef78 Merge: e5b3fc125d76 c5d728113532 Author: Linus Torvalds Date: Sun Dec 1 20:35:03 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix several scatter gather list issues in kTLS code, from Jakub Kicinski. 2) macb driver device remove has to kill the hresp_err_tasklet. From Chuhong Yuan. 3) Several memory leak and reference count bug fixes in tipc, from Tung Nguyen. 4) Fix mlx5 build error w/o ipv6, from Yue Haibing. 5) Fix jumbo frame and other regressions in r8169, from Heiner Kallweit. 6) Undo some BUG_ON()'s and replace them with WARN_ON_ONCE and proper error propagation/handling. From Paolo Abeni. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (24 commits) openvswitch: remove another BUG_ON() openvswitch: drop unneeded BUG_ON() in ovs_flow_cmd_build_info() net: phy: realtek: fix using paged operations with RTL8105e / RTL8208 r8169: fix resume on cable plug-in r8169: fix jumbo configuration for RTL8168evl net: emulex: benet: indent a Kconfig depends continuation line selftests: forwarding: fix race between packet receive and tc check net: sched: fix `tc -s class show` no bstats on class with nolock subqueues net: ethernet: ti: ale: ensure vlan/mdb deleted when no members net/mlx5e: Fix build error without IPV6 selftests: pmtu: use -oneline for ip route list cache tipc: fix duplicate SYN messages under link congestion tipc: fix wrong timeout input for tipc_wait_for_cond() tipc: fix wrong socket reference counter after tipc_sk_timeout() returns tipc: fix potential memory leak in __tipc_sendmsg() net: macb: add missed tasklet_kill selftests: bpf: correct perror strings selftests: bpf: test_sockmap: handle file creation failures gracefully net/tls: use sg_next() to walk sg entries net/tls: remove the dead inplace_crypto code ... commit 92b1aa773fadb4e2a90ed5d3beecb422d568ad9a Author: Zhenyu Wang Date: Thu Nov 21 13:57:45 2019 +0800 drm/i915/gvt: Fix cmd length check for MI_ATOMIC Correct valid command length check for MI_ATOMIC, need to check inline data available field instead of operand data length for whole command. Fixes: 00a33be40634 ("drm/i915/gvt: Add valid length check for MI variable commands") Reported-by: Alex Williamson Acked-by: Gao Fred Cc: stable@vger.kernel.org Signed-off-by: Zhenyu Wang commit e5b3fc125d768eacd73bb4dc5019f0ce95635af4 Merge: b7fcf31f7036 91298f1a302d Author: Linus Torvalds Date: Sun Dec 1 19:05:07 2019 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Various fixes: - Fix the PAT performance regression that downgraded write-combining device memory regions to uncached. - There's been a number of bugs in 32-bit double fault handling - hopefully all fixed now. - Fix an LDT crash - Fix an FPU over-optimization that broke with GCC9 code optimizations. - Misc cleanups" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/pat: Fix off-by-one bugs in interval tree search x86/ioperm: Save an indentation level in tss_update_io_bitmap() x86/fpu: Don't cache access to fpu_fpregs_owner_ctx x86/entry/32: Remove unused 'restore_all_notrace' local label x86/ptrace: Document FSBASE and GSBASE ABI oddities x86/ptrace: Remove set_segment_reg() implementations for current x86/traps: die() instead of panicking on a double fault x86/doublefault/32: Rewrite the x86_32 #DF handler and unify with 64-bit x86/doublefault/32: Move #DF stack and TSS to cpu_entry_area x86/doublefault/32: Rename doublefault.c to doublefault_32.c x86/traps: Disentangle the 32-bit and 64-bit doublefault code lkdtm: Add a DOUBLE_FAULT crash type on x86 selftests/x86/single_step_syscall: Check SYSENTER directly x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all() commit b7fcf31f7036895ca8fc3a30eefffab0e82f75f6 Merge: 72c0870e3a05 e680a41fcaf0 Author: Linus Torvalds Date: Sun Dec 1 18:49:57 2019 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: - Make /sys/devices/cpu/rdpmc based RDPMC enforcement more instantaneous - decoder: Update the Intel opcode map - Various tooling fixes, including a few late optimizations and cleanups. * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) perf script: Fix invalid LBR/binary mismatch error perf script: Fix brstackinsn for AUXTRACE perf affinity: Add infrastructure to save/restore affinity perf pmu: Use file system cache to optimize sysfs access perf regs: Make perf_reg_name() return "unknown" instead of NULL perf diff: Use llabs() with 64-bit values perf diff: Use llabs() with 64-bit values perf/x86: Implement immediate enforcement of /sys/devices/cpu/rdpmc value of 0 perf tools: Allow to link with libbpf dynamicaly perf tests: Rename tests/map_groups.c to tests/maps.c perf tests: Rename thread-mg-share to thread-maps-share perf maps: Rename map_groups.h to maps.h perf maps: Rename 'mg' variables to 'maps' perf map_symbol: Rename ms->mg to ms->maps perf addr_location: Rename al->mg to al->maps perf thread: Rename thread->mg to thread->maps perf maps: Merge 'struct maps' with 'struct map_groups' x86/insn: perf tools: Add some more instructions to the new instructions test x86/insn: Add some more Intel instructions to the opcode map perf map: Remove unused functions ... commit 72c0870e3a05d9cd5466d08c3d2a3069ed0a2f9f Merge: d10032dd539c 976e3645923b Author: Linus Torvalds Date: Sun Dec 1 18:45:29 2019 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - updates to Ilitech driver to support ILI2117 - face lift of st1232 driver to support MT-B protocol - a new driver for i.MX system controller keys - mpr121 driver now supports polling mode - various input drivers have been switched away from input_polled_dev to use polled mode of regular input devices - other assorted cleanups and fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (70 commits) Input: synaptics-rmi4 - fix various V4L2 compliance problems in F54 Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus Input: fix Kconfig indentation Input: imx_sc_key - correct SCU message structure to avoid stack corruption Input: ili210x - optionally show calibrate sysfs attribute Input: ili210x - add resolution to chip operations structure Input: ili210x - do not retrieve/print chip firmware version Input: mms114 - use device_get_match_data Input: ili210x - remove unneeded suspend and resume handlers Input: ili210x - do not unconditionally mark touchscreen as wakeup source Input: ili210x - define and use chip operations structure Input: ili210x - do not set parent device explicitly Input: ili210x - handle errors from input_mt_init_slots() Input: ili210x - switch to using threaded IRQ Input: ili210x - add ILI2117 support dt-bindings: input: touchscreen: ad7879: generic node names in example Input: ar1021 - fix typo in preprocessor macro name Input: synaptics-rmi4 - simplify data read in rmi_f54_work Input: kxtj9 - switch to using polled mode of input devices Input: kxtj9 - switch to using managed resources ... commit d10032dd539c93dbff016f5667e5627c6c2a4467 Merge: 43fd4bd72c85 0dfbb932bb67 Author: Linus Torvalds Date: Sun Dec 1 18:43:25 2019 -0800 Merge tag 'libnvdimm-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "The highlight this cycle is continuing integration fixes for PowerPC and some resulting optimizations. Summary: - Updates to better support vmalloc space restrictions on PowerPC platforms. - Cleanups to move common sysfs attributes to core 'struct device_type' objects. - Export the 'target_node' attribute (the effective numa node if pmem is marked online) for regions and namespaces. - Miscellaneous fixups and optimizations" * tag 'libnvdimm-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (21 commits) MAINTAINERS: Remove Keith from NVDIMM maintainers libnvdimm: Export the target_node attribute for regions and namespaces dax: Add numa_node to the default device-dax attributes libnvdimm: Simplify root read-only definition for the 'resource' attribute dax: Simplify root read-only definition for the 'resource' attribute dax: Create a dax device_type libnvdimm: Move nvdimm_bus_attribute_group to device_type libnvdimm: Move nvdimm_attribute_group to device_type libnvdimm: Move nd_mapping_attribute_group to device_type libnvdimm: Move nd_region_attribute_group to device_type libnvdimm: Move nd_numa_attribute_group to device_type libnvdimm: Move nd_device_attribute_group to device_type libnvdimm: Move region attribute group definition libnvdimm: Move attribute groups to device type libnvdimm: Remove prototypes for nonexistent functions libnvdimm/btt: fix variable 'rc' set but not used libnvdimm/pmem: Delete include of nd-core.h libnvdimm/namespace: Differentiate between probe mapping and runtime mapping libnvdimm/pfn_dev: Don't clear device memmap area during generic namespace probe libnvdimm: Trivial comment fix ... commit 43fd4bd72c85c1e8dac0f23dce16f0277791dcdd Merge: 454d9c4aa7d5 c6c6bc6ea9fc Author: Linus Torvalds Date: Sun Dec 1 18:42:02 2019 -0800 Merge tag 'mailbox-v5.5' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - omap : misc - catch error returned from pm_runtime_put_sync - hisi : misc - drop .owner from platform_driver - stm : change how wakeup is handled - imx : fix - bailout on error and nuke correct irq - imx : add support for imx7ulp platform * tag 'mailbox-v5.5' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: imx: add support for imx v1 mu dt-bindings: mailbox: imx-mu: add imx7ulp MU support mailbox: imx: Clear the right interrupts at shutdown mailbox: imx: Fix Tx doorbell shutdown path mailbox: stm32-ipcc: Update wakeup management mailbox: no need to set .owner platform_driver_register mailbox/omap: Handle if CONFIG_PM is disabled commit 454d9c4aa7d54fd4f15c1427fc4f51347f300262 Merge: 687fcad8a3ab 9d399f0c5295 Author: Linus Torvalds Date: Sun Dec 1 18:40:28 2019 -0800 Merge tag 'hwlock-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull hwspinlock updates from Bjorn Andersson: "This contains a number of cleanups to the core and several drivers, in particular removing the requirement for drivers to implement pm_runtime. It also udpates the location of the git tree in MAINTAINERS" * tag 'hwlock-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: hwspinlock: u8500_hsem: Remove redundant PM runtime implementation hwspinlock: sprd: Remove redundant PM runtime implementation hwspinlock: Let the PM runtime can be optional hwspinlock: Remove BUG_ON() from the hwspinlock core hwspinlock: sprd: Use devm_hwspin_lock_register() to register hwlock controller hwspinlock: sprd: Use devm_add_action_or_reset() for calls to clk_disable_unprepare() hwspinlock: sprd: Check the return value of clk_prepare_enable() hwspinlock: sprd: Change to use devm_platform_ioremap_resource() hwspinlock: u8500_hsem: Use devm_hwspin_lock_register() to register hwlock controller hwspinlock: u8500_hsem: Use devm_kzalloc() to allocate memory hwspinlock: u8500_hsem: Change to use devm_platform_ioremap_resource() MAINTAINERS: hwspinlock: update git tree location commit 687fcad8a3ab95f228e62a58b03eb10af67146f4 Merge: 5e3b06d3bbdf 8cf9b615653e Author: Linus Torvalds Date: Sun Dec 1 18:39:24 2019 -0800 Merge tag 'rpmsg-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "This contains a number of bug fixes to the GLINK transport driver, an off-by-one in the GLINK smem driver and a memory leak fix in the rpmsg char driver" * tag 'rpmsg-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: rpmsg: Fix Kconfig indentation rpmsg: char: Simplify 'rpmsg_eptdev_release()' rpmsg: glink: Free pending deferred work on remove rpmsg: glink: Don't send pending rx_done during remove rpmsg: glink: Fix rpmsg_register_device err handling rpmsg: glink: Put an extra reference during cleanup rpmsg: glink: Fix use after free in open_ack TIMEOUT case rpmsg: glink: Fix reuse intents memory leak issue rpmsg: glink: Set tail pointer to 0 at end of FIFO rpmsg: char: release allocated memory commit 5e3b06d3bbdfb875ec6ad5e5fa5d86b0e79ea065 Merge: 3265568db8c3 e3cb40d4d805 Author: Linus Torvalds Date: Sun Dec 1 18:35:47 2019 -0800 Merge tag 'rproc-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This adds support for booting the modem processor on Qualcomm MSM8998 and carries some cleanup up and bug fixes to the framework and the stm32 driver" * tag 'rproc-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: Revert "dt-bindings: remoteproc: stm32: add wakeup-source" remoteproc: stm32: fix probe error case remoteproc: stm32: wakeup the system by wdg irq dt-bindings: remoteproc: stm32: add wakeup-source remoteproc: Fix wrong rvring index computation remoteproc: stm32: use workqueue to treat mailbox callback remoteproc: fix argument 2 of rproc_mem_entry_init remoteproc: qcom_q6v5_mss: Add support for MSM8998 dt-bindings: remoteproc: qcom: Add Q6v5 Modem PIL binding for MSM8998 remoteproc: debug: Remove unneeded NULL check remoteproc: remove useless typedef commit 3265568db8c37d391ee8ad2afa8b0fd7257f4526 Merge: 31764f1b6d93 a72e27f7a470 Author: Linus Torvalds Date: Sun Dec 1 18:29:36 2019 -0800 Merge branch 'i2c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "I2C has mostly driver updates this time. The few noteworthy changes are: the core has now support for analog and digital filters with at91 being the first user, a core addition to replace the NULL returning i2c_new_probed_device() with an ERR_PTR variant, and the pxa driver has finally being moved to use the generic I2C slave interface. We have quite a significant number of reviews per patch this time, so thank you to all involved!" * 'i2c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (37 commits) video: fbdev: matrox: convert to i2c_new_scanned_device i2c: icy: convert to i2c_new_scanned_device i2c: replace i2c_new_probed_device with an ERR_PTR variant i2c: Fix Kconfig indentation i2c: smbus: Don't filter out duplicate alerts i2c: i801: Correct Intel Jasper Lake SOC naming i2c: i2c-stm32f7: fix 10-bits check in slave free id search loop i2c: iproc: Add i2c repeated start capability i2c: remove helpers for ref-counting clients i2c: tegra: Use dma_request_chan() directly for channel request i2c: sh_mobile: Use dma_request_chan() directly for channel request i2c: qup: Use dma_request_chan() directly for channel request i2c: at91: Use dma_request_chan() directly for channel request i2c: rcar: Remove superfluous call to clk_get_rate() i2c: pxa: remove unused i2c-slave APIs i2c: pxa: migrate to new i2c_slave APIs i2c: cros-ec-tunnel: Make the device acpi compatible i2c: stm32f7: report dma error during probe i2c: icy: no need to populate address for scanned device i2c: xiic: Fix kerneldoc warnings ... commit 31764f1b6d93e126ed341fb600d2765d630e8bf6 Merge: 67b8ed29e0d4 aa4c3967756c Author: Linus Torvalds Date: Sun Dec 1 18:26:56 2019 -0800 Merge tag 'for-linus-20191129' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "I wasn't going to send this one off so soon, but unfortunately one of the fixes from the previous pull broke the build on some archs. So I'm sending this sooner rather than later. This contains: - Add highmem.h include for io_uring, because of the kmap() additions from last round. For some reason the build bot didn't spot this even though it sat for days. - Three minor ';' removals - Add support for the Beurer CD-on-a-chip device - Make io_uring work on MMU-less archs" * tag 'for-linus-20191129' of git://git.kernel.dk/linux-block: io_uring: fix missing kmap() declaration on powerpc ataflop: Remove unneeded semicolon block: sunvdc: Remove unneeded semicolon drbd: Remove unneeded semicolon io_uring: add mapping support for NOMMU archs sr_vendor: support Beurer GL50 evo CD-on-a-chip devices. cdrom: respect device capabilities during opening action commit 67b8ed29e0d472bda2f3afe48d6ff99e127eff0c Merge: d004701d1cc5 f3e4f3fc8ee9 Author: Linus Torvalds Date: Sun Dec 1 18:24:25 2019 -0800 Merge tag 'platform-drivers-x86-v5.5-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: - New bootctl driver for Mellanox BlueField SoC. - New driver to support System76 laptops. - Temperature monitoring and fan control on Acer Aspire 7551 is now supported. - Previously the Huawei driver handled only hotkeys. After the conversion to WMI it has been expanded to support newer laptop models. - Big refactoring of intel-speed-select tools allows to use it on Intel CascadeLake-N systems. - Touchscreen support for ezpad 6 m4 and Schneider SCT101CTM tablets - Miscellaneous clean ups and fixes here and there. * tag 'platform-drivers-x86-v5.5-1' of git://git.infradead.org/linux-platform-drivers-x86: (59 commits) platform/x86: hp-wmi: Fix ACPI errors caused by passing 0 as input size platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer platform/x86: intel_pmc_core: Add Comet Lake (CML) platform support to intel_pmc_core driver platform/x86: intel_pmc_core: Fix the SoC naming inconsistency platform/mellanox: Fix Kconfig indentation tools/power/x86/intel-speed-select: Display TRL buckets for just base config level tools/power/x86/intel-speed-select: Ignore missing config level platform/x86: touchscreen_dmi: Add info for the ezpad 6 m4 tablet tools/power/x86/intel-speed-select: Increment version tools/power/x86/intel-speed-select: Use core count for base-freq mask tools/power/x86/intel-speed-select: Support platform with limited Intel(R) Speed Select tools/power/x86/intel-speed-select: Use Frequency weight for CLOS tools/power/x86/intel-speed-select: Make CLOS frequency in MHz tools/power/x86/intel-speed-select: Use mailbox for CLOS_PM_QOS_CONFIG tools/power/x86/intel-speed-select: Auto mode for CLX tools/power/x86/intel-speed-select: Correct CLX-N frequency units tools/power/x86/intel-speed-select: Change display of "avx" to "avx2" tools/power/x86/intel-speed-select: Extend command set for perf-profile Add touchscreen platform data for the Schneider SCT101CTM tablet platform/x86: intel_int0002_vgpio: Pass irqchip when adding gpiochip ... commit d004701d1cc5a036b1f2dec34dd5973064c72eab Merge: 4a08fe579258 d8d0470875aa Author: Linus Torvalds Date: Sun Dec 1 18:20:54 2019 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - Support for Logitech G15 (Hans de Goede) - HID parser improvements, improving support for some devices; e.g. Windows Precision Touchpad, products from Primax, etc. (Blaž Hrastnik, Candle Sun) - robustification of tablet mode support in google-whiskers driver (Dmitry Torokhov) - assorted small fixes, device-specific quirks and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (23 commits) HID: rmi: Check that the RMI_STARTED bit is set before unregistering the RMI transport device HID: quirks: remove hid-led devices from hid_have_special_driver HID: Improve Windows Precision Touchpad detection. HID: i2c-hid: Reset ALPS touchpads on resume HID: i2c-hid: fix no irq after reset on raydium 3118 HID: logitech-hidpp: Silence intermittent get_battery_capacity errors HID: i2c-hid: remove orphaned member sleep_delay HID: quirks: Add quirk for HP MSU1465 PIXART OEM mouse HID: core: check whether Usage Page item is after Usage ID items HID: intel-ish-hid: Spelling s/diconnect/disconnect/ HID: google: Detect base folded usage instead of hard-coding whiskers HID: logitech: Add depends on LEDS_CLASS to Logitech Kconfig entry HID: lg-g15: Add support for the G510's M1-M3 and MR LEDs HID: lg-g15: Add support for controlling the G510's RGB backlight HID: lg-g15: Add support for the G510 keyboards' gaming keys HID: lg-g15: Add support for the M1-M3 and MR LEDs HID: lg-g15: Add keyboard and LCD backlight control HID: Add driver for Logitech gaming keyboards (G15, G15 v2) Input: Add event-codes for macro keys found on various keyboards HID: hidraw: replace printk() with corresponding pr_xx() variant ... commit 4a08fe5792583d81bf237a75ebc803f756204e46 Merge: 99a0d9f5e873 33c26ab4d6be Author: Linus Torvalds Date: Sun Dec 1 18:01:03 2019 -0800 Merge tag 'linux-watchdog-5.5-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - support for NCT6116D - several small fixes and improvements * tag 'linux-watchdog-5.5-rc1' of git://www.linux-watchdog.org/linux-watchdog: (24 commits) watchdog: jz4740: Drop dependency on MACH_JZ47xx watchdog: jz4740: Use regmap provided by TCU driver watchdog: jz4740: Use WDT clock provided by TCU driver dt-bindings: watchdog: sama5d4_wdt: add microchip,sam9x60-wdt compatible watchdog: sama5d4_wdt: cleanup the bit definitions watchdog: sprd: Fix the incorrect pointer getting from driver data watchdog: aspeed: Fix clock behaviour for ast2600 watchdog: imx7ulp: Fix reboot hang watchdog: make nowayout sysfs file writable watchdog: prevent deferral of watchdogd wakeup on RT watchdog: imx7ulp: Use definitions instead of magic values watchdog: imx7ulp: Remove inline annotations watchdog: imx7ulp: Remove unused structure member watchdog: imx7ulp: Pass the wdog instance inimx7ulp_wdt_enable() watchdog: wdat_wdt: Spelling s/configrable/configurable/ watchdog: bd70528: Trivial function documentation fix watchdog: cadence: Do not show error in case of deferred probe watchdog: Fix the race between the release of watchdog_core_data and cdev watchdog: sbc7240_wdt: Fix yet another -Wimplicit-fallthrough warning watchdog: intel-mid_wdt: Add WATCHDOG_NOWAYOUT support ... commit 99a0d9f5e87352c4bd8d01bc9b39f7091c12e4d4 Merge: 37323918cac2 41c4616bb81f Author: Linus Torvalds Date: Sun Dec 1 17:56:50 2019 -0800 Merge tag 'gpio-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v5.5 kernel cycle Core changes: - Expose pull up/down flags for the GPIO character device to userspace. After clear input from the RaspberryPi and Beagle communities, it has been established that prototyping, industrial automation and make communities strongly need this feature, and as we want people to use the character device, we have implemented the simple pull up/down interface for GPIO lines. This means we can specify that a (chip-specific) pull up/down resistor can be enabled, but does not offer fine-grained control such as cases where the resistance of the same pull resistor can be controlled (yet). - Introduce devm_fwnode_gpiod_get_index() and start to phase out the old symbol devm_fwnode_get_index_gpiod_from_child(). - A bit of documentation clean-up work. - Introduce a define for GPIO line directions and deploy it in all GPIO drivers in the drivers/gpio directory. - Add a special callback to populate pin ranges when cooperating with the pin control subsystem and registering ranges as part of adding a gpiolib driver and a gpio_irq_chip driver at the same time. This is also deployed in the Intel Merrifield driver. New drivers: - RDA Micro GPIO controller. - XGS-iproc GPIO driver. Driver improvements: - Wake event and debounce support on the Tegra 186 driver. - Finalize the Aspeed SGPIO driver. - MPC8xxx uses a normal IRQ handler rather than a chained handler" * tag 'gpio-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (64 commits) gpio: Add TODO item for regmap helper Documentation: gpio: driver.rst: Fix warnings gpio: of: Fix bogus reference to gpiod_get_count() gpiolib: Grammar s/manager/managed/ gpio: lynxpoint: Setup correct IRQ handlers MAINTAINERS: Replace my email by one @kernel.org gpiolib: acpi: Make acpi_gpiochip_alloc_event always return AE_OK gpio/mpc8xxx: fix qoriq GPIO reading gpio: mpc8xxx: Don't overwrite default irq_set_type callback gpiolib: acpi: Print pin number on acpi_gpiochip_alloc_event errors gpiolib: fix coding style in gpiod_hog() drm/bridge: ti-tfp410: switch to using fwnode_gpiod_get_index() gpio: merrifield: Pass irqchip when adding gpiochip gpio: merrifield: Add GPIO <-> pin mapping ranges via callback gpiolib: Introduce ->add_pin_ranges() callback gpio: mmio: remove untrue leftover comment gpio: em: Use platform_get_irq() to obtain interrupts gpio: tegra186: Add debounce support gpio: tegra186: Program interrupt route mapping gpio: tegra186: Derive register offsets from bank/port ... commit 3e25dbca8b75d3cc7dbbfd7aaaa0d29c730d45ac Merge: 36a170b1ca0d 3cc44feb9861 Author: Dave Airlie Date: Mon Dec 2 10:23:06 2019 +1000 Merge tag 'drm-intel-next-fixes-2019-11-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Important fix to uAPI alignment on query IOCTL - Fixes for the power regression introduced by the previous security patches - Avoid regressing super heavy benchmarks by increasing the default request pre-emption timeout from 100 ms to 640 ms to - Resulting set of smaller fixes done while problem was inspected - Display fixes for EHL voltage level programming and TGL DKL PHY vswing for HDMI Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191128141524.GA11992@jlahtine-desk.ger.corp.intel.com commit 36a170b1ca0da12641b1d847524f17b4aa2a2283 Merge: acc61b892936 e20c9284c8f2 Author: Dave Airlie Date: Mon Dec 2 10:14:35 2019 +1000 Merge tag 'drm-msm-next-2019-11-05' of https://gitlab.freedesktop.org/drm/msm into drm-next + OCMEM support to enable the couple generations that had shared OCMEM rather than GMEM exclusively for the GPU (late a3xx and I think basically all of a4xx). Bjorn and Brian decided to land this through the drm tree to avoid having to coordinate merge requests. + a510 support, and various associated display support + the usual misc cleanups and fixes Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Sun Dec 1 16:16:31 2019 -0800 Merge tag 'mfd-next-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Frameworks: - Add support for a "resource managed strongly uncachable ioremap" call - Provide a collection of MFD helper macros - Remove mfd_clone_cell() from MFD core - Add NULL de-reference protection in MFD core - Remove superfluous function fd_platform_add_cell() from MFD core - Honour Device Tree's request to disable a device New Drivers: - Add support for MediaTek MT6323 PMIC New Device Support: - Add support for Gemini Lake to Intel LPSS PCI - Add support for Cherry Trail Crystal Cover PMIC to Intel SoC PMIC CRC - Add support for PM{I}8950 to Qualcomm SPMI PMIC - Add support for U8420 to ST-Ericsson DB8500 - Add support for Comet Lake PCH-H to Intel LPSS PCI New Functionality: - Add support for requested supply clocks; madera-core Fix-ups: - Lower interrupt priority; rk808 - Use provided helpers (macros, group functions, defines); rk808, ipaq-micro, ab8500-core, db8500-prcmu, mt6397-core, cs5535-mfd - Only allocate IRQs on request; max77620 - Use simplified API; arizona-core - Remove redundant and/or duplicated code; wm8998-tables, arizona, syscon - Device Tree binding fix-ups; madera, max77650, max77693 - Remove mfd_cell->id abuse hack; cs5535-mfd - Remove only user of mfd_clone_cell(); cs5535-mfd - Make resources static; rohm-bd70528 Bug Fixes: - Fix product ID for RK818; rk808 - Fix Power Key; rk808 - Fix booting on the BananaPi; mt6397-core - Endian fix-ups; twl.h - Fix static error checker warnings; ti_am335x_tscadc" * tag 'mfd-next-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (47 commits) Revert "mfd: syscon: Set name of regmap_config" mfd: ti_am335x_tscadc: Fix static checker warning mfd: bd70528: Staticize bit value definitions mfd: mfd-core: Honour Device Tree's request to disable a child-device dt-bindings: mfd: max77693: Fix missing curly brace mfd: intel-lpss: Add Intel Comet Lake PCH-H PCI IDs mfd: db8500-prcmu: Support U8420-sysclk firmware dt-bindings: mfd: max77650: Convert the binding document to yaml mfd: mfd-core: Move pdev->mfd_cell creation back into mfd_add_device() mfd: mfd-core: Remove usage counting for .{en,dis}able() call-backs x86: olpc-xo1-sci: Remove invocation of MFD's .enable()/.disable() call-backs x86: olpc-xo1-pm: Remove invocation of MFD's .enable()/.disable() call-backs mfd: mfd-core: Remove mfd_clone_cell() mfd: mfd-core: Protect against NULL call-back function pointer mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entries mfd: cs5535-mfd: Request shared IO regions centrally mfd: cs5535-mfd: Remove mfd_cell->id hack mfd: cs5535-mfd: Use PLATFORM_DEVID_* defines and tidy error message mfd: intel_soc_pmic_crc: Add "cht_crystal_cove_pmic" cell to CHT cells mfd: madera: Add support for requesting the supply clocks ... commit 38edc3dff9d2805c48e0a171667e7ca820336ab7 Merge: 8b233da0cc82 102a1b382177 Author: Linus Torvalds Date: Sun Dec 1 16:13:39 2019 -0800 Merge tag 'backlight-next-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "New Functionality: - Add support for an enable GPIO; lm3630a_bl - Add support for short circuit handling; qcom-wled - Add support for automatic string detection; qcom-wled Fix-ups: - Update Device Tree bindings; lm3630a-backlight, led-backlight, qcom-wled - Constify; ipaq_micro_bl - Optimise for CPU cycles; pwm_bl - Coding style fix-ups; pwm_bl - Trivial fix-ups (white space, comments, renaming); pwm_bl, gpio_backlight, qcom-wled - Kconfig dependency hacking; LCD_HP700 - Rename, refactor and add peripherals; pm8941-wled => qcom-wled - Make use of GPIO look-up tables; tosa_bl, tosa_lcd - Remove superfluous code; gpio_backlight - Adapt GPIO direction handling; gpio_backlight - Remove legacy use of platform data; gpio_backlight Bug Fixes: - Provide modules aliases; lm3630a_bl" * tag 'backlight-next-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (32 commits) backlight: qcom-wled: Fix spelling mistake "trigged" -> "triggered" backlight: gpio: Pull gpio_backlight_initial_power_state() into probe backlight: gpio: Use a helper variable for &pdev->dev backlight: gpio: Remove unused fields from platform data sh: ecovec24: don't set unused fields in platform data backlight: gpio: Simplify the platform data handling sh: ecovec24: add additional properties to the backlight device backlight: gpio: Explicitly set the direction of the GPIO backlight: gpio: Remove stray newline backlight: gpio: Remove unneeded include video: backlight: tosa: Use GPIO lookup table backlight: qcom-wled: Add auto string detection logic backlight: qcom-wled: Add support for short circuit handling backlight: qcom-wled: Add support for WLED4 peripheral backlight: qcom-wled: Restructure the driver for WLED3 backlight: qcom-wled: Rename PM8941* to WLED3 backlight: qcom-wled: Add new properties for PMI8998 backlight: qcom-wled: Restructure the qcom-wled bindings backlight: qcom-wled: Rename pm8941-wled.c to qcom-wled.c dt-bindings: backlight: lm3630a: Fix missing include ... commit 8b233da0cc825166b5fa06c898517a7477b54388 Merge: 304220b56e8c 6d29032c2cef Author: Linus Torvalds Date: Sun Dec 1 16:12:21 2019 -0800 Merge tag 'pinctrl-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pinctrl fix from Linus Walleij: "A oneliner fix adding the license to the new Intel pin controller, avoiding a build-time warning" * tag 'pinctrl-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: Fix warning by adding missing MODULE_LICENSE commit 304220b56e8c6a99b71832427802221be472247a Merge: ddebe839c601 5f820ed52371 Author: Linus Torvalds Date: Sun Dec 1 16:09:28 2019 -0800 Merge tag 'leds-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "This contains usual small updates to drivers, and removal of PAGE_SIZE limits on /sys/class/leds//trigger. We should not be really having that many triggers; but with cpu activity triggers we do, and we'll eventually need to fix it, but... remove the limit for now" * tag 'leds-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (26 commits) leds: trigger: netdev: fix handling on interface rename leds: an30259a: add a check for devm_regmap_init_i2c leds: mlxreg: Fix possible buffer overflow leds: pca953x: Use of_device_get_match_data() leds: core: Fix leds.h structure documentation leds: core: Fix devm_classdev_match to reference correct structure leds: core: Remove extern from header leds: lm3601x: Convert class registration to device managed leds: flash: Add devm_* functions to the flash class leds: flash: Remove extern from the header file leds: flash: Convert non extended registration to inline leds: Kconfig: Be consistent with the usage of "LED" leds: remove PAGE_SIZE limit of /sys/class/leds//trigger leds: tlc591xx: update the maximum brightness leds: lm3692x: Use flags from LM3692X_BRT_CTRL leds: lm3692x: Use flags from LM3692X_BOOST_CTRL leds: lm3692x: Handle failure to probe the regulator leds: lm3692x: Don't overwrite return value in error path leds: lm3692x: Print error value on dev_err leds: tlc591xx: use devm_led_classdev_register_ext() ... commit ddebe839c6013ab42f376bdeaaaf66bd0c0d68d6 Merge: ceb307474506 ec16ffe36d80 Author: Linus Torvalds Date: Sun Dec 1 16:06:02 2019 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This merge window we have one small clk provider API in the core framework and then a bunch of driver updates and a handful of new drivers. In terms of diffstat the Qualcomm and Amlogic drivers are high up there because of all the clk data introcued by new drivers. The Nvidia Tegra driver had a lot of work done this cycle too to support suspend/resume and memory controllers. And the OMAP clk driver got proper clk and reset handling in place. Rounding out the patches are various updates to remove unused data, mark things static, correct incorrect data in drivers, etc. All the little things that improve drivers and maintain code health. I will point out that there's a patch in here for the GPIO clk driver, that almost nobody uses, which changes behavior and causes clk_set_rate() to try to change the GPIO gate clk's parent. Other than that things are fairly well SoC specific here. Core: - Add a clk provider API to get current parent index - Plug a memory leak in clk_unregister() path New Drivers: - CGU in Ingenix X1000 - Bitmain BM1880 clks - Qualcomm MSM8998 GPU clk controllers - Qualcomm SC7180 GCC and RPMH clk controllers - Qualcomm QCS404 Q6SSTOP clk controllers - Add support for the Renesas R-Car M3-W+ (r8a77961) SoC - Add support for the Renesas RZ/G2N (r8a774b1) SoC - Add Tegra20/30 External Memory Clock (EMC) support Updates: - Make gpio gate clks propagate rate setting up to parent - Prepare Armada 3700 for suspend to RAM by moving PCIe suspend/resume priority - Drop unused variables, enums, etc. in various clk drivers - Convert various drivers to use devm_platform_ioremap_resource() - Use struct_size() some more in various clk drivers - Improve Rockchip px30 clk tree - Add suspend/resume support to Tegra210 clk driver - Reimplement SOR clks on earlier Tegra SoCs, helping HDMI and DP - Allwinner DT exports and H6 clk tree fixes - Proper clk and reset handling for OMAP SoCs - Revamped TI divider clk to clamp max divider - Make 1443X/1416X PLL clock structure common for reusing among i.MX8 SoCs - Drop IMX7ULP_CLK_MIPI_PLL clock, it shouldn't be used - Add VIDEO2_PLL clock for imx8mq - Add missing gate clock for pll1/2 fixed dividers on i.MX8 SoCs - Add sm1 support in the Amlogic audio clock controller - Switch some clocks on R-Car Gen2/3 to .determine_rate() - Remove Renesas R-Car Gen2 legacy DT clock support - Improve arithmetic divisions on Renesas R-Car Gen2 and Gen3 - Improve Renesas R-Car Gen3 SD clock handling - Add rate table for Samsung exynos542x GPU and VPLL clks - Fix potential CPU performance degradation after system suspend/resume cycle on exynos542x SoCs" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (160 commits) clk: aspeed: Add RMII RCLK gates for both AST2500 MACs MAINTAINERS: Add entry for BM1880 SoC clock driver clk: Add common clock driver for BM1880 SoC dt-bindings: clock: Add devicetree binding for BM1880 SoC clk: Add clk_hw_unregister_composite helper function definition clk: Zero init clk_init_data in helpers clk: ingenic: Allow drivers to be built with COMPILE_TEST MAINTAINERS: Update section for Ux500 clock drivers clk: mark clk_disable_unused() as __init clk: Fix memory leak in clk_unregister() clk: Ingenic: Add CGU driver for X1000. dt-bindings: clock: Add X1000 bindings. clk: tegra: Use match_string() helper to simplify the code clk: pxa: fix one of the pxa RTC clocks clk: sprd: Use IS_ERR() to validate the return value of syscon_regmap_lookup_by_phandle() clk: armada-xp: remove unused code clk: tegra: Fix build error without CONFIG_PM_SLEEP clk: tegra: Add missing stubs for the case of !CONFIG_PM_SLEEP clk: tegra: Optimize PLLX restore on Tegra20/30 clk: tegra: Add suspend and resume support on Tegra210 ... commit ceb307474506f888e8f16dab183405ff01dffa08 Merge: 0da522107e5d b111df8447ac Author: Linus Torvalds Date: Sun Dec 1 14:00:59 2019 -0800 Merge tag 'y2038-cleanups-5.5' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground Pull y2038 cleanups from Arnd Bergmann: "y2038 syscall implementation cleanups This is a series of cleanups for the y2038 work, mostly intended for namespace cleaning: the kernel defines the traditional time_t, timeval and timespec types that often lead to y2038-unsafe code. Even though the unsafe usage is mostly gone from the kernel, having the types and associated functions around means that we can still grow new users, and that we may be missing conversions to safe types that actually matter. There are still a number of driver specific patches needed to get the last users of these types removed, those have been submitted to the respective maintainers" Link: https://lore.kernel.org/lkml/20191108210236.1296047-1-arnd@arndb.de/ * tag 'y2038-cleanups-5.5' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground: (26 commits) y2038: alarm: fix half-second cut-off y2038: ipc: fix x32 ABI breakage y2038: fix typo in powerpc vdso "LOPART" y2038: allow disabling time32 system calls y2038: itimer: change implementation to timespec64 y2038: move itimer reset into itimer.c y2038: use compat_{get,set}_itimer on alpha y2038: itimer: compat handling to itimer.c y2038: time: avoid timespec usage in settimeofday() y2038: timerfd: Use timespec64 internally y2038: elfcore: Use __kernel_old_timeval for process times y2038: make ns_to_compat_timeval use __kernel_old_timeval y2038: socket: use __kernel_old_timespec instead of timespec y2038: socket: remove timespec reference in timestamping y2038: syscalls: change remaining timeval to __kernel_old_timeval y2038: rusage: use __kernel_old_timeval y2038: uapi: change __kernel_time_t to __kernel_old_time_t y2038: stat: avoid 'time_t' in 'struct stat' y2038: ipc: remove __kernel_time_t reference from headers y2038: vdso: powerpc: avoid timespec references ... commit 0da522107e5d9c000a4871d52e570912aa1225a2 Merge: ad0b314e0030 142b2ac82e31 Author: Linus Torvalds Date: Sun Dec 1 13:46:15 2019 -0800 Merge tag 'compat-ioctl-5.5' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground Pull removal of most of fs/compat_ioctl.c from Arnd Bergmann: "As part of the cleanup of some remaining y2038 issues, I came to fs/compat_ioctl.c, which still has a couple of commands that need support for time64_t. In completely unrelated work, I spent time on cleaning up parts of this file in the past, moving things out into drivers instead. After Al Viro reviewed an earlier version of this series and did a lot more of that cleanup, I decided to try to completely eliminate the rest of it and move it all into drivers. This series incorporates some of Al's work and many patches of my own, but in the end stops short of actually removing the last part, which is the scsi ioctl handlers. I have patches for those as well, but they need more testing or possibly a rewrite" * tag 'compat-ioctl-5.5' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground: (42 commits) scsi: sd: enable compat ioctls for sed-opal pktcdvd: add compat_ioctl handler compat_ioctl: move SG_GET_REQUEST_TABLE handling compat_ioctl: ppp: move simple commands into ppp_generic.c compat_ioctl: handle PPPIOCGIDLE for 64-bit time_t compat_ioctl: move PPPIOCSCOMPRESS to ppp_generic compat_ioctl: unify copy-in of ppp filters tty: handle compat PPP ioctls compat_ioctl: move SIOCOUTQ out of compat_ioctl.c compat_ioctl: handle SIOCOUTQNSD af_unix: add compat_ioctl support compat_ioctl: reimplement SG_IO handling compat_ioctl: move WDIOC handling into wdt drivers fs: compat_ioctl: move FITRIM emulation into file systems gfs2: add compat_ioctl support compat_ioctl: remove unused convert_in_user macro compat_ioctl: remove last RAID handling code compat_ioctl: remove /dev/raw ioctl translation compat_ioctl: remove PCI ioctl translation compat_ioctl: remove joystick ioctl translation ... commit ad0b314e003049292a23dd248d3c3ca4a3d75f55 Merge: b94ae8ad9fe7 61a47c1ad3a4 Author: Linus Torvalds Date: Sun Dec 1 13:26:18 2019 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull sysctl system call removal from Eric Biederman: "As far as I can tell we have reached the point where no one enables the sysctl system call anymore. It still is enabled in a few defconfigs but they are mostly the rarely used one and in asking people about that it was more cut & paste enabled than anything else. This is single commit that just deletes code. Leaving just enough code so that the deprecated sysctl warning continues to be printed. If my analysis turns out to be wrong and someone actually cares it will be easy to revert this commit and have the system call again. There was one new xtensa defconfig in linux-next that enabled the system call this cycle and when asked about it the maintainer of the code replied that it was not enabled on purpose. As of today's linux-next tree that defconfig no longer enables the system call. What we saw in the review discussion was that if we go a step farther than my patch and mess with uapi headers there are pieces of code that won't compile, but nothing minds the system call actually disappearing from the kernel" Link: https://lore.kernel.org/lkml/201910011140.EA0181F13@keescook/ * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: sysctl: Remove the sysctl system call commit c5d728113532c695c894c2a88a10453ac83b0f3b Merge: f3284e014850 8a574f86652a Author: David S. Miller Date: Sun Dec 1 13:21:24 2019 -0800 Merge branch 'openvswitch-remove-a-couple-of-BUG_ON' Paolo Abeni says: ==================== openvswitch: remove a couple of BUG_ON() The openvswitch kernel datapath includes some BUG_ON() statements to check for exceptional/unexpected failures. These patches drop a couple of them, where we can do that without introducing other side effects. v1 -> v2: - avoid memory leaks on error path ==================== Signed-off-by: David S. Miller commit 8a574f86652a4540a2433946ba826ccb87f398cc Author: Paolo Abeni Date: Sun Dec 1 18:41:25 2019 +0100 openvswitch: remove another BUG_ON() If we can't build the flow del notification, we can simply delete the flow, no need to crash the kernel. Still keep a WARN_ON to preserve debuggability. Note: the BUG_ON() predates the Fixes tag, but this change can be applied only after the mentioned commit. v1 -> v2: - do not leak an skb on error Fixes: aed067783e50 ("openvswitch: Minimize ovs_flow_cmd_del critical section.") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 8ffeb03fbba3b599690b361467bfd2373e8c450f Author: Paolo Abeni Date: Sun Dec 1 18:41:24 2019 +0100 openvswitch: drop unneeded BUG_ON() in ovs_flow_cmd_build_info() All the callers of ovs_flow_cmd_build_info() already deal with error return code correctly, so we can handle the error condition in a more gracefull way. Still dump a warning to preserve debuggability. v1 -> v2: - clarify the commit message - clean the skb and report the error (DaveM) Fixes: ccb1352e76cf ("net: Add Open vSwitch kernel components.") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit f3284e014850e45f63fbc74c7382453c876fbc35 Author: Heiner Kallweit Date: Sun Dec 1 10:51:47 2019 +0100 net: phy: realtek: fix using paged operations with RTL8105e / RTL8208 It was reported [0] that since the referenced commit a warning is triggered in phylib that complains about paged operations being used with a PHY driver that doesn't support this. The commit isn't wrong, just for one chip version (RTL8105e) no dedicated PHY driver exists yet. So add the missing PHY driver. [0] https://bugzilla.kernel.org/show_bug.cgi?id=202103 Fixes: 3a129e3f9ac4 ("r8169: switch to phylib functions in more places") Reported-by: jhdskag3 Tested-by: jhdskag3 Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 398fd408ccfb5e44b1cbe73a209d2281d3efa83c Author: Heiner Kallweit Date: Sun Dec 1 10:39:56 2019 +0100 r8169: fix resume on cable plug-in It was reported [0] that network doesn't wake up on cable plug-in with certain chip versions. Reason is that on these chip versions the PHY doesn't detect cable plug-in when being in power-down mode. So prevent the PHY from powering down if WoL is enabled. [0] https://bugzilla.kernel.org/show_bug.cgi?id=202103 Fixes: 95fb8bb3181b ("net: phy: force phy suspend when calling phy_stop") Reported-by: jhdskag3 Tested-by: jhdskag3 Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 14012c9f3bb922b9e0751ba43d15cc580a6049bf Author: Heiner Kallweit Date: Sun Dec 1 10:27:14 2019 +0100 r8169: fix jumbo configuration for RTL8168evl Alan reported [0] that network is broken since the referenced commit when using jumbo frames. This commit isn't wrong, it just revealed another issue that has been existing before. According to the vendor driver the RTL8168e-specific jumbo config doesn't apply for RTL8168evl. [0] https://lkml.org/lkml/2019/11/30/119 Fixes: 4ebcb113edcc ("r8169: fix jumbo packet handling on resume from suspend") Reported-by: Alan J. Wylie Tested-by: Alan J. Wylie Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 937790699be9c8100e5358625e7dfa8b32bd33f2 Author: Minchan Kim Date: Sat Nov 30 17:58:29 2019 -0800 mm/page_io.c: annotate refault stalls from swap_readpage If a block device supports rw_page operation, it doesn't submit bios so the annotation in submit_bio() for refault stall doesn't work. It happens with zram in android, especially swap read path which could consume CPU cycle for decompress. It is also a problem for zswap which uses frontswap. Annotate swap_readpage() to account the synchronous IO overhead to prevent underreport memory pressure. [akpm@linux-foundation.org: add comment, per Johannes] Link: http://lkml.kernel.org/r/20191010152134.38545-1-minchan@kernel.org Signed-off-by: Minchan Kim Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Cc: Seth Jennings Cc: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd33d29a19ad81205bfd1d011674b9ed28327e36 Author: Randy Dunlap Date: Sat Nov 30 17:58:26 2019 -0800 mm/Kconfig: fix trivial help text punctuation End a Kconfig help text sentence with a period (aka full stop). Link: http://lkml.kernel.org/r/c17f2c75-dc2a-42a4-2229-bb6b489addf2@infradead.org Signed-off-by: Randy Dunlap Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19fa40a0f2f4666be975a2d3f9b1e64816d5b245 Author: Krzysztof Kozlowski Date: Sat Nov 30 17:58:23 2019 -0800 mm/Kconfig: fix indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ / /' -i */Kconfig Link: http://lkml.kernel.org/r/1574306437-28837-1-git-send-email-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Reviewed-by: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Jiri Kosina Cc: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12cc1c7345b6bf34c45ccaa75393e2d6eb707d7b Author: Souptick Joarder Date: Sat Nov 30 17:58:20 2019 -0800 mm/memory_hotplug.c: remove __online_page_set_limits() __online_page_set_limits() is a dummy function - remove it and all callers. Link: http://lkml.kernel.org/r/8e1bc9d3b492f6bde16e95ebc1dee11d6aefabd7.1567889743.git.jrdr.linux@gmail.com Link: http://lkml.kernel.org/r/854db2cf8145d9635249c95584d9a91fd774a229.1567889743.git.jrdr.linux@gmail.com Link: http://lkml.kernel.org/r/9afe6c5a18158f3884a6b302ac2c772f3da49ccc.1567889743.git.jrdr.linux@gmail.com Signed-off-by: Souptick Joarder Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Juergen Gross Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4f5329d453704e2214011ecf00db73cd3196d06 Author: Wei Yang Date: Sat Nov 30 17:58:17 2019 -0800 mm: fix typos in comments when calling __SetPageUptodate() There are several places emphasise the effect of __SetPageUptodate(), while the comment seems to have a typo in two places. Link: http://lkml.kernel.org/r/20190926023705.7226-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84218b552e0a591ac706a926d5e1e8eaf0d5a03a Author: Hao Lee Date: Sat Nov 30 17:58:14 2019 -0800 mm: fix struct member name in function comments The member in struct zonelist is _zonerefs instead of zones. Link: http://lkml.kernel.org/r/20190927144049.GA29622@haolee.github.io Signed-off-by: Hao Lee Reviewed-by: Andrew Morton Reviewed-by: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa71ecd8d86500da6081a72da6b0b524007e0627 Author: Chen Jun Date: Sat Nov 30 17:58:11 2019 -0800 mm/shmem.c: cast the type of unmap_start to u64 In 64bit system. sb->s_maxbytes of shmem filesystem is MAX_LFS_FILESIZE, which equal LLONG_MAX. If offset > LLONG_MAX - PAGE_SIZE, offset + len < LLONG_MAX in shmem_fallocate, which will pass the checking in vfs_fallocate. /* Check for wrap through zero too */ if (((offset + len) > inode->i_sb->s_maxbytes) || ((offset + len) < 0)) return -EFBIG; loff_t unmap_start = round_up(offset, PAGE_SIZE) in shmem_fallocate causes a overflow. Syzkaller reports a overflow problem in mm/shmem: UBSAN: Undefined behaviour in mm/shmem.c:2014:10 signed integer overflow: '9223372036854775807 + 1' cannot be represented in type 'long long int' CPU: 0 PID:17076 Comm: syz-executor0 Not tainted 4.1.46+ #1 Hardware name: linux, dummy-virt (DT) Call trace: dump_backtrace+0x0/0x2c8 arch/arm64/kernel/traps.c:100 show_stack+0x20/0x30 arch/arm64/kernel/traps.c:238 __dump_stack lib/dump_stack.c:15 [inline] ubsan_epilogue+0x18/0x70 lib/ubsan.c:164 handle_overflow+0x158/0x1b0 lib/ubsan.c:195 shmem_fallocate+0x6d0/0x820 mm/shmem.c:2104 vfs_fallocate+0x238/0x428 fs/open.c:312 SYSC_fallocate fs/open.c:335 [inline] SyS_fallocate+0x54/0xc8 fs/open.c:239 The highest bit of unmap_start will be appended with sign bit 1 (overflow) when calculate shmem_falloc.start: shmem_falloc.start = unmap_start >> PAGE_SHIFT. Fix it by casting the type of unmap_start to u64, when right shifted. This bug is found in LTS Linux 4.1. It also seems to exist in mainline. Link: http://lkml.kernel.org/r/1573867464-5107-1-git-send-email-chenjun102@huawei.com Signed-off-by: Chen Jun Reviewed-by: Andrew Morton Cc: Hugh Dickins Cc: Qian Cai Cc: Kefeng Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4afab1cd256e425803374b58702ea86a05b0acf9 Author: Yang Shi Date: Sat Nov 30 17:58:07 2019 -0800 mm: shmem: use proper gfp flags for shmem_writepage() The shmem_writepage() uses GFP_ATOMIC to allocate swap cache. GFP_ATOMIC used to mean __GFP_HIGH, but now it means __GFP_HIGH | __GFP_ATOMIC | __GFP_KSWAPD_RECLAIM. However, shmem_writepage() should write out to swap only in response to memory pressure, so __GFP_KSWAPD_RECLAIM looks useless since the caller may be kswapd itself or in direct reclaim already. In addition, XArray node allocations from PF_MEMALLOC contexts could completely exhaust the page allocator, __GFP_NOMEMALLOC stops emergency reserves from being allocated. Here just copy the gfp flags used by add_to_swap(). Hugh: "a cleanup to make the two calls look the same when they don't need to be different (whereas the call from __read_swap_cache_async() rightly uses a lower priority gfp)". Link: http://lkml.kernel.org/r/1572991351-86061-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Acked-by: Hugh Dickins Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 26083eb6b15448e7ec5182e33f9b1ba7ebce3a62 Author: Colin Ian King Date: Sat Nov 30 17:58:04 2019 -0800 mm/shmem.c: make array 'values' static const, makes object smaller Don't populate the array 'values' on the stack but instead make it static const. Makes the object code smaller by 111 bytes. Before: text data bss dec hex filename 108612 11169 512 120293 1d5e5 mm/shmem.o After: text data bss dec hex filename 108437 11233 512 120182 1d576 mm/shmem.o (gcc version 9.2.1, amd64) Link: http://lkml.kernel.org/r/20190906143012.28698-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Andrew Morton Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c1c24d91ffd536de0a64688a9df7f49e58fadbc Author: Mike Rapoport Date: Sat Nov 30 17:58:01 2019 -0800 userfaultfd: require CAP_SYS_PTRACE for UFFD_FEATURE_EVENT_FORK A while ago Andy noticed (http://lkml.kernel.org/r/CALCETrWY+5ynDct7eU_nDUqx=okQvjm=Y5wJvA4ahBja=CQXGw@mail.gmail.com) that UFFD_FEATURE_EVENT_FORK used by an unprivileged user may have security implications. As the first step of the solution the following patch limits the availably of UFFD_FEATURE_EVENT_FORK only for those having CAP_SYS_PTRACE. The usage of CAP_SYS_PTRACE ensures compatibility with CRIU. Yet, if there are other users of non-cooperative userfaultfd that run without CAP_SYS_PTRACE, they would be broken :( Current implementation of UFFD_FEATURE_EVENT_FORK modifies the file descriptor table from the read() implementation of uffd, which may have security implications for unprivileged use of the userfaultfd. Limit availability of UFFD_FEATURE_EVENT_FORK only for callers that have CAP_SYS_PTRACE. Link: http://lkml.kernel.org/r/1572967777-8812-2-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Andrea Arcangeli Cc: Daniel Colascione Cc: Jann Horn Cc: Lokesh Gidra Cc: Nick Kralevich Cc: Nosh Minwalla Cc: Pavel Emelyanov Cc: Tim Murray Cc: Aleksa Sarai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d4678eb170c4c632174d1fec8ecee31c2f314f9 Author: Andrea Arcangeli Date: Sat Nov 30 17:57:58 2019 -0800 fs/userfaultfd.c: wp: clear VM_UFFD_MISSING or VM_UFFD_WP during userfaultfd_register() If the registration is repeated without VM_UFFD_MISSING or VM_UFFD_WP they need to be cleared. Currently setting UFFDIO_REGISTER_MODE_WP returns -EINVAL, so this patch is a noop until the UFFDIO_REGISTER_MODE_WP support is applied. Link: http://lkml.kernel.org/r/20191004232834.GP13922@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Wei Yang Reviewed-by: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 643aa36eadebdcdcaeecf538f0549a619ad78ea0 Author: Wei Yang Date: Sat Nov 30 17:57:55 2019 -0800 userfaultfd: wrap the common dst_vma check into an inlined function When doing UFFDIO_COPY, it is necessary to find the correct destination vma and make sure fault range is in it. Since there are two places need to do the same task, just wrap those common check into an inlined function. Link: http://lkml.kernel.org/r/20190927070032.2129-3-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Reviewed-by: Mike Kravetz Cc: Andrea Arcangeli Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53eaa14b62d27f3011feb97e12a80bf61a4b29ab Author: Wei Yang Date: Sat Nov 30 17:57:52 2019 -0800 userfaultfd: remove unnecessary WARN_ON() in __mcopy_atomic_hugetlb() These warning here is to make sure address(dst_addr) and length(len - copied) are huge page size aligned. While this is ensured by: dst_start and len is huge page size aligned dst_addr equals to dst_start and increase huge page size each time copied increase huge page size each time This means these warnings will never be triggered. Link: http://lkml.kernel.org/r/20190927070032.2129-2-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Reviewed-by: Mike Kravetz Cc: Andrea Arcangeli Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4fb07ee6510280219403592e0a70c3b248b588c8 Author: Wei Yang Date: Sat Nov 30 17:57:49 2019 -0800 userfaultfd: use vma_pagesize for all huge page size calculation In __mcopy_atomic_hugetlb() we use two variables to deal with huge page size: vma_hpagesize and huge_page_size. Since they are the same, it is not necessary to use two different mechanism. This patch makes it consistent by all using vma_hpagesize. Link: http://lkml.kernel.org/r/20190927070032.2129-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Reviewed-by: Mike Kravetz Cc: Andrea Arcangeli Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df6c6500b4416baead2a1e17d9a80b675775c1df Author: Wei Yang Date: Sat Nov 30 17:57:46 2019 -0800 mm/madvise.c: use PAGE_ALIGN[ED] for range checking Improve readability, no functional change. Link: http://lkml.kernel.org/r/20191118032857.22683-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3cd257ce15bad10a86f5064433c9dda4d019697 Author: Yunfeng Ye Date: Sat Nov 30 17:57:42 2019 -0800 mm/madvise.c: replace with page_size() in madvise_inject_error() page_size() is supported after the commit a50b854e073c ("mm: introduce page_size()"). Use page_size() in madvise_inject_error() for readability. [akpm@linux-foundation.org: use ulong for `size', per David] Link: http://lkml.kernel.org/r/29dce60c-38d6-0220-f292-e298f0c78c4d@huawei.com Signed-off-by: Yunfeng Ye Reviewed-by: Andrew Morton Acked-by: David Rientjes Cc: Jason Gunthorpe Cc: Michal Hocko Cc: Minchan Kim Cc: Peter Zijlstra Cc: Jan Kara Cc: Mike Rapoport Cc: Hu Shiyuan Cc: Feilong Lin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d42ab293f5181609ea18f1f2ab85cd4cfc8efb2 Author: Wei Yang Date: Sat Nov 30 17:57:39 2019 -0800 mm/mmap.c: make vma_merge() comment more easy to understand Case 1/6, 2/7 and 3/8 have the same pattern and we handle them in the same logic. Rearrange the comment to make it a little easy for audience to understand. Link: http://lkml.kernel.org/r/20191030012445.16944-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Cc: Mike Rapoport Cc: Will Deacon Cc: Michal Hocko Cc: Catalin Marinas Cc: Andrea Arcangeli Cc: Jann Horn Cc: Darrick J. Wong Cc: Steve Capper Cc: Michel Lespinasse Cc: Dave Hansen Cc: Yangtao Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 35e3d566df5ff86d19488d2cd9b49b2d9389780e Author: zhong jiang Date: Sat Nov 30 17:57:35 2019 -0800 mm/hwpoison-inject: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file operation rather than DEFINE_SIMPLE_ATTRIBUTE. Link: http://lkml.kernel.org/r/1572403660-44718-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a818f5363a0eba04bcff986c64c919d3f44b8017 Author: Huang Ying Date: Sat Nov 30 17:57:32 2019 -0800 autonuma: reduce cache footprint when scanning page tables In auto NUMA balancing page table scanning, if the pte_protnone() is true, the PTE needs not to be changed because it's in target state already. So other checking on corresponding struct page is unnecessary too. So, if we check pte_protnone() firstly for each PTE, we can avoid unnecessary struct page accessing, so that reduce the cache footprint of NUMA balancing page table scanning. In the performance test of pmbench memory accessing benchmark with 80:20 read/write ratio and normal access address distribution on a 2 socket Intel server with Optance DC Persistent Memory, perf profiling shows that the autonuma page table scanning time reduces from 1.23% to 0.97% (that is, reduced 21%) with the patch. Link: http://lkml.kernel.org/r/20191101075727.26683-3-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Mel Gorman Cc: Michal Hocko Cc: Rik van Riel Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Dave Hansen Cc: Dan Williams Cc: Fengguang Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bfe9d006c971a5daefe7a8b27819ccd497090fd8 Author: Huang Ying Date: Sat Nov 30 17:57:28 2019 -0800 autonuma: fix watermark checking in migrate_balanced_pgdat() When zone_watermark_ok() is called in migrate_balanced_pgdat() to check migration target node, the parameter classzone_idx (for requested zone) is specified as 0 (ZONE_DMA). But when allocating memory for autonuma in alloc_misplaced_dst_page(), the requested zone from GFP flags is ZONE_MOVABLE. That is, the requested zone is different. The size of lowmem_reserve for the different requested zone is different. And this may cause some issues. For example, in the zoneinfo of a test machine as below, Node 0, zone DMA32 pages free 61592 min 29 low 454 high 879 spanned 1044480 present 442306 managed 425921 protection: (0, 0, 62457, 62457, 62457) The free page number of ZONE_DMA32 is greater than "high watermark + lowmem_reserve[ZONE_DMA]", but less than "high watermark + lowmem_reserve[ZONE_MOVABLE]". And because __alloc_pages_node() in alloc_misplaced_dst_page() requests ZONE_MOVABLE, the zone_watermark_ok() on ZONE_DMA32 in migrate_balanced_pgdat() may always return true. So, autonuma may not stop even when memory pressure in node 0 is heavy. To fix the issue, ZONE_MOVABLE is used as parameter to call zone_watermark_ok() in migrate_balanced_pgdat(). This makes it same as requested zone in alloc_misplaced_dst_page(). So that migrate_balanced_pgdat() returns false when memory pressure is heavy. Link: http://lkml.kernel.org/r/20191101075727.26683-2-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Mel Gorman Cc: Michal Hocko Cc: Rik van Riel Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Dave Hansen Cc: Dan Williams Cc: Fengguang Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9ea242a063c62be164338efcf9fefa3aeee7203 Author: zhong jiang Date: Sat Nov 30 17:57:25 2019 -0800 mm/cma_debug.c: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file operation rather than DEFINE_SIMPLE_ATTRIBUTE. Link: http://lkml.kernel.org/r/1572348687-9951-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Reviewed-by: Andrew Morton Cc: Yue Hu Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2184f9928ab52f26c2ae5e9ba37faf29c78f50b8 Author: Yunfeng Ye Date: Sat Nov 30 17:57:22 2019 -0800 mm/cma.c: switch to bitmap_zalloc() for cma bitmap allocation kzalloc() is used for cma bitmap allocation in cma_activate_area(), switch to bitmap_zalloc() for clarity. Link: http://lkml.kernel.org/r/895d4627-f115-c77a-d454-c0a196116426@huawei.com Signed-off-by: Yunfeng Ye Reviewed-by: Andrew Morton Cc: Mike Rapoport Cc: Yue Hu Cc: Peng Fan Cc: Andrey Ryabinin Cc: Ryohei Suzuki Cc: Andrey Konovalov Cc: Doug Berger Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75f360696ce9d8ec8b253452b23b3e24c0689b4b Author: Song Liu Date: Sat Nov 30 17:57:19 2019 -0800 mm/thp: flush file for !is_shmem PageDirty() case in collapse_file() For non-shmem file THPs, khugepaged only collapses read only .text mapping (VM_DENYWRITE). These pages should not be dirty except the case where the file hasn't been flushed since first write. Call filemap_flush() in collapse_file() to accelerate the write back in such cases. Link: http://lkml.kernel.org/r/20191106060930.2571389-3-songliubraving@fb.com Signed-off-by: Song Liu Cc: Kirill A. Shutemov Cc: Hugh Dickins Cc: William Kucharski Cc: Johannes Weiner Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1fe80d4ae3396cf3665bd6dc77f4004c1c2e9f8 Author: Kirill A. Shutemov Date: Sat Nov 30 17:57:15 2019 -0800 mm, thp: do not queue fully unmapped pages for deferred split Adding fully unmapped pages into deferred split queue is not productive: these pages are about to be freed or they are pinned and cannot be split anyway. Link: http://lkml.kernel.org/r/20190913091849.11151-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reviewed-by: Yang Shi Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74d4a5797b89048a5b20746da7e80af1e73b8547 Author: Yang Shi Date: Sat Nov 30 17:57:12 2019 -0800 mm/migrate.c: handle freed page at the first place When doing migration if the freed page is met, we just return without migrating it since it is pointless to migrate a freed page. But, the current code allocates target page unconditionally before handling freed page, if the page is freed, the newly allocated will be just freed. It doesn't make too much sense and is just a waste of time although migrating freed page is rare. So, handle freed page at the before that to avoid unnecessary page allocation and free. Link: http://lkml.kernel.org/r/1573755869-106954-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Acked-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1287869e52d00c3da6621c2b5f9b97a34865b05 Author: zhong jiang Date: Sat Nov 30 17:57:09 2019 -0800 mm/huge_memory.c: split_huge_pages_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE split_huge_pages_fops is used for debugfs file. hence, it is more clear to use DEFINE_DEBUGFS_ATTRIBUTE. Link: http://lkml.kernel.org/r/1572347674-8111-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Reviewed-by: Andrew Morton Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Vlastimil Babka Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit acbfb087e3b19959d6f4b779a9a15bff644b8c9a Author: Zhigang Lu Date: Sat Nov 30 17:57:06 2019 -0800 mm/hugetlb: avoid looping to the same hugepage if !pages and !vmas When mmapping an existing hugetlbfs file with MAP_POPULATE, we find it is very time consuming. For example, mmapping a 128GB file takes about 50 milliseconds. Sampling with perfevent shows it spends 99% time in the same_page loop in follow_hugetlb_page(). samples: 205 of event 'cycles', Event count (approx.): 136686374 - 99.04% test_mmap_huget [kernel.kallsyms] [k] follow_hugetlb_page follow_hugetlb_page __get_user_pages __mlock_vma_pages_range __mm_populate vm_mmap_pgoff sys_mmap_pgoff sys_mmap system_call_fastpath __mmap64 follow_hugetlb_page() is called with pages=NULL and vmas=NULL, so for each hugepage, we run into the same_page loop for pages_per_huge_page() times, but doing nothing. With this change, it takes less then 1 millisecond to mmap a 128GB file in hugetlbfs. Link: http://lkml.kernel.org/r/1567581712-5992-1-git-send-email-totty.lu@gmail.com Signed-off-by: Zhigang Lu Reviewed-by: Haozhong Zhang Reviewed-by: Zongming Zhang Reviewed-by: Mike Kravetz Acked-by: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 188b04a7d93860fd100b2671600b8ad81fb0a842 Author: Wei Yang Date: Sat Nov 30 17:57:02 2019 -0800 hugetlb: remove unused hstate in hugetlb_fault_mutex_hash() The first parameter hstate in function hugetlb_fault_mutex_hash() is not used anymore. This patch removes it. [akpm@linux-foundation.org: various build fixes] [cai@lca.pw: fix a GCC compilation warning] Link: http://lkml.kernel.org/r/1570544108-32331-1-git-send-email-cai@lca.pw Link: http://lkml.kernel.org/r/20191005003302.785-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Signed-off-by: Qian Cai Suggested-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Mike Kravetz Cc: Hugh Dickins Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d75c6af9c89ac1fe8b74a5c094ce412ae992efc9 Author: Mina Almasry Date: Sat Nov 30 17:56:59 2019 -0800 hugetlb: remove duplicated code Remove duplicated code between region_chg and region_add, and refactor it into a common function, add_reservation_in_range. This is mostly done because there is a follow up change in another series that disables region coalescing in region_add, and I want to make that change in one place only. It should improve maintainability anyway on its own. [akpm@linux-foundation.org: coding style fixes] Link: http://lkml.kernel.org/r/20190919200428.188797-3-almasrymina@google.com Signed-off-by: Mina Almasry Reviewed-by: Mike Kravetz Cc: David Rientjes Cc: Shakeel Butt Cc: Greg Thelen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c9119542035dbbc61241ab8dc7feeac11fa82ca Author: Mina Almasry Date: Sat Nov 30 17:56:54 2019 -0800 hugetlb: region_chg provides only cache entry Current behavior is that region_chg provides both a cache entry in resv->region_cache, AND a placeholder entry in resv->regions. region_add first tries to use the placeholder, and if it finds that the placeholder has been deleted by a racing region_del call, it uses the cache entry. This behavior is completely unnecessary and is removed in this patch for a couple of reasons: 1. region_add needs to either find a cached file_region entry in resv->region_cache, or find an entry in resv->regions to expand. It does not need both. 2. region_chg adding a placeholder entry in resv->regions opens up a possible race with region_del, where region_chg adds a placeholder region in resv->regions, and this region is deleted by a racing call to region_del during region_chg execution or before region_add is called. Removing the race makes the code easier to reason about and maintain. In addition, a follow up patch in another series that disables region coalescing, which would be further complicated if the race with region_del exists. Link: http://lkml.kernel.org/r/20190919200428.188797-2-almasrymina@google.com Signed-off-by: Mina Almasry Reviewed-by: Mike Kravetz Cc: David Rientjes Cc: Shakeel Butt Cc: Greg Thelen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 930668c34408ba983049322e04f13f03b6f1fafa Author: Waiman Long Date: Sat Nov 30 17:56:49 2019 -0800 hugetlbfs: take read_lock on i_mmap for PMD sharing A customer with large SMP systems (up to 16 sockets) with application that uses large amount of static hugepages (~500-1500GB) are experiencing random multisecond delays. These delays were caused by the long time it took to scan the VMA interval tree with mmap_sem held. The sharing of huge PMD does not require changes to the i_mmap at all. Therefore, we can just take the read lock and let other threads searching for the right VMA share it in parallel. Once the right VMA is found, either the PMD lock (2M huge page for x86-64) or the mm->page_table_lock will be acquired to perform the actual PMD sharing. Lock contention, if present, will happen in the spinlock. That is much better than contention in the rwsem where the time needed to scan the the interval tree is indeterminate. With this patch applied, the customer is seeing significant performance improvement over the unpatched kernel. Link: http://lkml.kernel.org/r/20191107211809.9539-1-longman@redhat.com Signed-off-by: Waiman Long Suggested-by: Mike Kravetz Reviewed-by: Mike Kravetz Cc: Davidlohr Bueso Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1ab5b82f540b31852fbf4a3c975f3c16e0e76b9f Author: Piotr Sarna Date: Sat Nov 30 17:56:43 2019 -0800 hugetlbfs: add O_TMPFILE support With hugetlbfs, a common pattern for mapping anonymous huge pages is to create a temporary file first. Currently libraries like libhugetlbfs and seastar create these with a standard mkstemp+unlink trick, but it would be more robust to be able to simply pass the O_TMPFILE flag to open(). O_TMPFILE is already supported by several file systems like ext4 and xfs. The implementation simply uses the existi= ng d_tmpfile utility function to instantiate the dcache entry for the file. Tested manually by successfully creating a temporary file by opening it with (O_TMPFILE|O_RDWR) on mounted hugetlbfs and successfully mapping 2M huge pages with it. Without the patch, trying to open a file with O_TMPFILE results in -ENOSUP. Link: http://lkml.kernel.org/r/bc9383eff6e1374d79f3a92257ae829ba1e6ae60.1573285189.git.p.sarna@tlen.pl Signed-off-by: Piotr Sarna Reviewed-by: Mike Kravetz Cc: Al Viro Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f9dccb25b8fb48778149a002bb25d4ac2899633 Author: Mike Kravetz Date: Sat Nov 30 17:56:40 2019 -0800 hugetlbfs: convert macros to static inline, fix sparse warning huge_pte_offset() produced a sparse warning due to an improper return type when the kernel was built with !CONFIG_HUGETLB_PAGE. Fix the bad type and also convert all the macros in this block to static inline wrappers. Two existing wrappers in this block had lines in excess of 80 columns so clean those up as well. No functional change. Link: http://lkml.kernel.org/r/20191112194558.139389-3-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reported-by: Ben Dooks Suggested-by: Jason Gunthorpe Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 997cdcb068eb58d37f9f9b1d219368000066d272 Author: Mike Kravetz Date: Sat Nov 30 17:56:37 2019 -0800 powerpc/mm: remove pmd_huge/pud_huge stubs and include hugetlb.h Patch series "hugetlbfs: convert macros to static inline, fix sparse warning". The definition for huge_pte_offset() in causes a sparse warning in the !CONFIG_HUGETLB_PAGE. Fix this as well as converting all macros in this block of definitions to static inlines for better type checking. When making the above changes, build errors were found in powerpc due to duplicate definitions. A separate powerpc specific patch is included as a requisite to remove the definitions and get them from . This patch (of 2): This removes the power specific stubs created by commit aad71e3928be ("powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n") used when !CONFIG_HUGETLB_PAGE. Instead, it addresses the build break by getting the definitions from . This allows the macros in to be replaced with static inlines. Link: http://lkml.kernel.org/r/20191112194558.139389-2-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michael Ellerman Cc: Ben Dooks Cc: Jason Gunthorpe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8fc312b32b25c6b0a8b46fab4df8c68df5af1223 Author: Mike Kravetz Date: Sat Nov 30 17:56:34 2019 -0800 mm/hugetlbfs: fix error handling when setting up mounts It is assumed that the hugetlbfs_vfsmount[] array will contain either a valid vfsmount pointer or NULL for each hstate after initialization. Changes made while converting to use fs_context broke this assumption. While fixing the hugetlbfs_vfsmount issue, it was discovered that init_hugetlbfs_fs never did correctly clean up when encountering a vfs mount error. It was found during code inspection. A small memory allocation failure would be the most likely cause of taking a error path with the bug. This is unlikely to happen as this is early init code. Link: http://lkml.kernel.org/r/94b6244d-2c24-e269-b12c-e3ba694b242d@oracle.com Reported-by: Chengguang Xu Fixes: 32021982a324 ("hugetlbfs: Convert to fs_context") Signed-off-by: Mike Kravetz Cc: David Howells Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 552546366a30d88bd1d6f5efe848b2ab50fd57e5 Author: Mike Kravetz Date: Sat Nov 30 17:56:30 2019 -0800 hugetlbfs: hugetlb_fault_mutex_hash() cleanup A new clang diagnostic (-Wsizeof-array-div) warns about the calculation to determine the number of u32's in an array of unsigned longs. Suppress warning by adding parentheses. While looking at the above issue, noticed that the 'address' parameter to hugetlb_fault_mutex_hash is no longer used. So, remove it from the definition and all callers. No functional change. Link: http://lkml.kernel.org/r/20190919011847.18400-1-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reported-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Reviewed-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Nick Desaulniers Cc: Ilie Halip Cc: David Bolvansky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ac398b171aacd0f0c132d989ec4efb5de94f34a Author: Yunfeng Ye Date: Sat Nov 30 17:56:27 2019 -0800 mm: support memblock alloc on the exact node for sparse_buffer_init() sparse_buffer_init() use memblock_alloc_try_nid_raw() to allocate memory for page management structure, if memory allocation fails from specified node, it will fall back to allocate from other nodes. Normally, the page management structure will not exceed 2% of the total memory, but a large continuous block of allocation is needed. In most cases, memory allocation from the specified node will succeed, but a node memory become highly fragmented will fail. we expect to allocate memory base section rather than by allocating a large block of memory from other NUMA nodes Add memblock_alloc_exact_nid_raw() for this situation, which allocate boot memory block on the exact node. If a large contiguous block memory allocate fail in sparse_buffer_init(), it will fall back to allocate small block memory base section. Link: http://lkml.kernel.org/r/66755ea7-ab10-8882-36fd-3e02b03775d5@huawei.com Signed-off-by: Yunfeng Ye Reviewed-by: Mike Rapoport Cc: Wei Yang Cc: Oscar Salvador Cc: Dan Williams Cc: David Hildenbrand Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95830666be2aef81a2963135822ab92f4902a06b Author: Cao jin Date: Sat Nov 30 17:56:24 2019 -0800 mm/memblock: correct doc for function Change "max_addr" to "end" for less confusion in memblock_alloc_range_nid comments. Link: http://lkml.kernel.org/r/20191113051822.3296-1-ruansy.fnst@cn.fujitsu.com Signed-off-by: Cao jin Signed-off-by: Shiyang Ruan Reviewed-by: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e5af9a8e8b0d29e881caf5b440a9c284698c154 Author: Cao jin Date: Sat Nov 30 17:56:21 2019 -0800 mm/memblock.c: cleanup doc fix typos for: elaboarte -> elaborate architecure -> architecture compltes -> completes And, convert the markup :c:func:`foo` to foo() as kernel documentation toolchain can recognize foo() as a function. Link: http://lkml.kernel.org/r/20190912123127.8694-1-caoj.fnst@cn.fujitsu.com Signed-off-by: Cao jin Suggested-by: Mike Rapoport Reviewed-by: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f18da660c095e3fff1690ea3d752f7b7188b35fb Author: Li Xinhai Date: Sat Nov 30 17:56:18 2019 -0800 mm/mempolicy.c: fix checking unmapped holes for mbind mbind() is required to report EFAULT if range, specified by addr and len, contains unmapped holes. In current implementation, below rules are applied for this checking: 1: Unmapped holes at any part of the specified range should be reported as EFAULT if mbind() for none MPOL_DEFAULT cases; 2: Unmapped holes at any part of the specified range should be ignored (do not reprot EFAULT) if mbind() for MPOL_DEFAULT case; 3: The whole range in an unmapped hole should be reported as EFAULT; Note that rule 2 does not fullfill the mbind() API definition, but since that behavior has existed for long days (the internal flag MPOL_MF_DISCONTIG_OK is for this purpose), this patch does not plan to change it. In current code, application observed inconsistent behavior on rule 1 and rule 2 respectively. That inconsistency is fixed as below details. Cases of rule 1: - Hole at head side of range. Current code reprot EFAULT, no change by this patch. [ vma ][ hole ][ vma ] [ range ] - Hole at middle of range. Current code report EFAULT, no change by this patch. [ vma ][ hole ][ vma ] [ range ] - Hole at tail side of range. Current code do not report EFAULT, this patch fixes it. [ vma ][ hole ][ vma ] [ range ] Cases of rule 2: - Hole at head side of range. Current code reports EFAULT, this patch fixes it. [ vma ][ hole ][ vma ] [ range ] - Hole at middle of range. Current code does not report EFAULT, no change by this patch. [ vma ][ hole ][ vma] [ range ] - Hole at tail side of range. Current code does not report EFAULT, no change by this patch. [ vma ][ hole ][ vma] [ range ] This patch has no changes to rule 3. The unmapped hole checking can also be handled by using .pte_hole(), instead of .test_walk(). But .pte_hole() is called for holes inside and outside vma, which causes more cost, so this patch keeps the original design with .test_walk(). Link: http://lkml.kernel.org/r/1573218104-11021-3-git-send-email-lixinhai.lxh@gmail.com Fixes: 6f4576e3687b ("mempolicy: apply page table walker on queue_pages_range()") Signed-off-by: Li Xinhai Reviewed-by: Naoya Horiguchi Cc: Michal Hocko Cc: Vlastimil Babka Cc: Hugh Dickins Cc: linux-man Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a18b3ac25bb7be4781cb9e6d31f3e57b3ba01b06 Author: Li Xinhai Date: Sat Nov 30 17:56:15 2019 -0800 mm/mempolicy.c: check range first in queue_pages_test_walk Patch series "mm: Fix checking unmapped holes for mbind", v4. This patchset fix checking unmapped holes for mbind(). First patch makes sure the vma been correctly tracked in .test_walk(), so each time when .test_walk() is called, the neighborhood of two vma is correct. Current problem is that the !vma_migratable() check could cause return immediately without update tracking to vma. Second patch fix the inconsistent report of EFAULT when mbind() is called for MPOL_DEFAULT and non MPOL_DEFAULT cases, so application do not need to have workaround code to handle this special behavior. Currently there are two problems, one is that the .test_walk() can not know there is hole at tail side of range, because .test_walk() only call for vma not for hole. The other one is that mbind_range() checks for hole at head side of range but do not consider the MPOL_MF_DISCONTIG_OK flag as done in .test_walk(). This patch (of 2): Checking unmapped hole and updating the previous vma must be handled first, otherwise the unmapped hole could be calculated from a wrong previous vma. Several commits were relevant to this error: - commit 6f4576e3687b ("mempolicy: apply page table walker on queue_pages_range()") This commit was correct, the VM_PFNMAP check was after updating previous vma - commit 48684a65b4e3 ("mm: pagewalk: fix misbehavior of walk_page_range for vma(VM_PFNMAP)") This commit added VM_PFNMAP check before updating previous vma. Then, there were two VM_PFNMAP check did same thing twice. - commit acda0c334028 ("mm/mempolicy.c: get rid of duplicated check for vma(VM_PFNMAP) in queue_page s_range()") This commit tried to fix the duplicated VM_PFNMAP check, but it wrongly removed the one which was after updating vma. Link: http://lkml.kernel.org/r/1573218104-11021-2-git-send-email-lixinhai.lxh@gmail.com Fixes: acda0c334028 (mm/mempolicy.c: get rid of duplicated check for vma(VM_PFNMAP) in queue_pages_range()) Signed-off-by: Li Xinhai Reviewed-by: Naoya Horiguchi Cc: Michal Hocko Cc: Vlastimil Babka Cc: Hugh Dickins Cc: linux-man Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a3ac9311dac3850d1fbaa8bcad4cf10c4fc6296 Author: Vitaly Wool Date: Sat Nov 30 17:56:11 2019 -0800 mm/z3fold.c: add inter-page compaction For each page scheduled for compaction (e. g. by z3fold_free()), try to apply inter-page compaction before running the traditional/ existing intra-page compaction. That means, if the page has only one buddy, we treat that buddy as a new object that we aim to place into an existing z3fold page. If such a page is found, that object is transferred and the old page is freed completely. The transferred object is named "foreign" and treated slightly differently thereafter. Namely, we increase "foreign handle" counter for the new page. Pages with non-zero "foreign handle" count become unmovable. This patch implements "foreign handle" detection when a handle is freed to decrement the foreign handle counter accordingly, so a page may as well become movable again as the time goes by. As a result, we almost always have exactly 3 objects per page and significantly better average compression ratio. [cai@lca.pw: fix -Wunused-but-set-variable warnings] Link: http://lkml.kernel.org/r/1570542062-29144-1-git-send-email-cai@lca.pw [vitalywool@gmail.com: avoid subtle race when freeing slots] Link: http://lkml.kernel.org/r/20191127152118.6314b99074b0626d4c5a8835@gmail.com [vitalywool@gmail.com: compact objects more accurately] Link: http://lkml.kernel.org/r/20191127152216.6ad33745a21ba71c53606acb@gmail.com [vitalywool@gmail.com: protect handle reads] Link: http://lkml.kernel.org/r/20191127152345.8059852f60947686674d726d@gmail.com Link: http://lkml.kernel.org/r/20191006041457.24113-1-vitalywool@gmail.com Signed-off-by: Vitaly Wool Cc: Dan Streetman Cc: Henry Burns Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 204cb79ad42f015312a5bbd7012d09c93d9b46fb Author: Johannes Weiner Date: Sat Nov 30 17:56:08 2019 -0800 kernel: sysctl: make drop_caches write-only Currently, the drop_caches proc file and sysctl read back the last value written, suggesting this is somehow a stateful setting instead of a one-time command. Make it write-only, like e.g. compact_memory. While mitigating a VM problem at scale in our fleet, there was confusion about whether writing to this file will permanently switch the kernel into a non-caching mode. This influences the decision making in a tense situation, where tens of people are trying to fix tens of thousands of affected machines: Do we need a rollback strategy? What are the performance implications of operating in a non-caching state for several days? It also caused confusion when the kernel team said we may need to write the file several times to make sure it's effective ("But it already reads back 3?"). Link: http://lkml.kernel.org/r/20191031221602.9375-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Chris Down Acked-by: Vlastimil Babka Acked-by: David Hildenbrand Acked-by: Michal Hocko Acked-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 178821b8979c48f20e4b0f7a36b8eaf1809f8038 Author: Xianting Tian Date: Sat Nov 30 17:56:05 2019 -0800 mm/vmscan.c: fix typo in comment Fix the typo "resheduled" -> "rescheduled" in comment Link: http://lkml.kernel.org/r/1573486327-9591-1-git-send-email-xianting_tian@126.com Signed-off-by: Xianting Tian Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b91ac374346ba206cfd568bb0ab830af6b205cfd Author: Johannes Weiner Date: Sat Nov 30 17:56:02 2019 -0800 mm: vmscan: enforce inactive:active ratio at the reclaim root We split the LRU lists into inactive and an active parts to maximize workingset protection while allowing just enough inactive cache space to faciltate readahead and writeback for one-off file accesses (e.g. a linear scan through a file, or logging); or just enough inactive anon to maintain recent reference information when reclaim needs to swap. With cgroups and their nested LRU lists, we currently don't do this correctly. While recursive cgroup reclaim establishes a relative LRU order among the pages of all involved cgroups, inactive:active size decisions are done on a per-cgroup level. As a result, we'll reclaim a cgroup's workingset when it doesn't have cold pages, even when one of its siblings has plenty of it that should be reclaimed first. For example: workload A has 50M worth of hot cache but doesn't do any one-off file accesses; meanwhile, parallel workload B scans files and rarely accesses the same page twice. If these workloads were to run in an uncgrouped system, A would be protected from the high rate of cache faults from B. But if they were put in parallel cgroups for memory accounting purposes, B's fast cache fault rate would push out the hot cache pages of A. This is unexpected and undesirable - the "scan resistance" of the page cache is broken. This patch moves inactive:active size balancing decisions to the root of reclaim - the same level where the LRU order is established. It does this by looking at the recursive size of the inactive and the active file sets of the cgroup subtree at the beginning of the reclaim cycle, and then making a decision - scan or skip active pages - that applies throughout the entire run and to every cgroup involved. With that in place, in the test above, the VM will recognize that there are plenty of inactive pages in the combined cache set of workloads A and B and prefer the one-off cache in B over the hot pages in A. The scan resistance of the cache is restored. [cai@lca.pw: fix some -Wenum-conversion warnings] Link: http://lkml.kernel.org/r/1573848697-29262-1-git-send-email-cai@lca.pw Link: http://lkml.kernel.org/r/20191107205334.158354-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Suren Baghdasaryan Reviewed-by: Shakeel Butt Cc: Andrey Ryabinin Cc: Rik van Riel Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b910718a948a9120d90faf632b33ed23c70e266a Author: Johannes Weiner Date: Sat Nov 30 17:55:59 2019 -0800 mm: vmscan: detect file thrashing at the reclaim root We use refault information to determine whether the cache workingset is stable or transitioning, and dynamically adjust the inactive:active file LRU ratio so as to maximize protection from one-off cache during stable periods, and minimize IO during transitions. With cgroups and their nested LRU lists, we currently don't do this correctly. While recursive cgroup reclaim establishes a relative LRU order among the pages of all involved cgroups, refaults only affect the local LRU order in the cgroup in which they are occuring. As a result, cache transitions can take longer in a cgrouped system as the active pages of sibling cgroups aren't challenged when they should be. [ Right now, this is somewhat theoretical, because the siblings, under continued regular reclaim pressure, should eventually run out of inactive pages - and since inactive:active *size* balancing is also done on a cgroup-local level, we will challenge the active pages eventually in most cases. But the next patch will move that relative size enforcement to the reclaim root as well, and then this patch here will be necessary to propagate refault pressure to siblings. ] This patch moves refault detection to the root of reclaim. Instead of remembering the cgroup owner of an evicted page, remember the cgroup that caused the reclaim to happen. When refaults later occur, they'll correctly influence the cross-cgroup LRU order that reclaim follows. I.e. if global reclaim kicked out pages in some subgroup A/B/C, the refault of those pages will challenge the global LRU order, and not just the local order down inside C. [hannes@cmpxchg.org: use page_memcg() instead of another lookup] Link: http://lkml.kernel.org/r/20191115160722.GA309754@cmpxchg.org Link: http://lkml.kernel.org/r/20191107205334.158354-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Suren Baghdasaryan Cc: Andrey Ryabinin Cc: Michal Hocko Cc: Rik van Riel Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53138cea7f398d2cdd0fa22adeec7e16093e1ebd Author: Johannes Weiner Date: Sat Nov 30 17:55:56 2019 -0800 mm: vmscan: move file exhaustion detection to the node level Patch series "mm: fix page aging across multiple cgroups". When applications are put into unconfigured cgroups for memory accounting purposes, the cgrouping itself should not change the behavior of the page reclaim code. We expect the VM to reclaim the coldest pages in the system. But right now the VM can reclaim hot pages in one cgroup while there is eligible cold cache in others. This is because one part of the reclaim algorithm isn't truly cgroup hierarchy aware: the inactive/active list balancing. That is the part that is supposed to protect hot cache data from one-off streaming IO. The recursive cgroup reclaim scheme will scan and rotate the physical LRU lists of each eligible cgroup at the same rate in a round-robin fashion, thereby establishing a relative order among the pages of all those cgroups. However, the inactive/active balancing decisions are made locally within each cgroup, so when a cgroup is running low on cold pages, its hot pages will get reclaimed - even when sibling cgroups have plenty of cold cache eligible in the same reclaim run. For example: [root@ham ~]# head -n1 /proc/meminfo MemTotal: 1016336 kB [root@ham ~]# ./reclaimtest2.sh Establishing 50M active files in cgroup A... Hot pages cached: 12800/12800 workingset-a Linearly scanning through 18G of file data in cgroup B: real 0m4.269s user 0m0.051s sys 0m4.182s Hot pages cached: 134/12800 workingset-a The streaming IO in B, which doesn't benefit from caching at all, pushes out most of the workingset in A. Solution This series fixes the problem by elevating inactive/active balancing decisions to the toplevel of the reclaim run. This is either a cgroup that hit its limit, or straight-up global reclaim if there is physical memory pressure. From there, it takes a recursive view of the cgroup subtree to decide whether page deactivation is necessary. In the test above, the VM will then recognize that cgroup B has plenty of eligible cold cache, and that the hot pages in A can be spared: [root@ham ~]# ./reclaimtest2.sh Establishing 50M active files in cgroup A... Hot pages cached: 12800/12800 workingset-a Linearly scanning through 18G of file data in cgroup B: real 0m4.244s user 0m0.064s sys 0m4.177s Hot pages cached: 12800/12800 workingset-a Implementation Whether active pages can be deactivated or not is influenced by two factors: the inactive list dropping below a minimum size relative to the active list, and the occurence of refaults. This patch series first moves refault detection to the reclaim root, then enforces the minimum inactive size based on a recursive view of the cgroup tree's LRUs. History Note that this actually never worked correctly in Linux cgroups. In the past it worked for global reclaim and leaf limit reclaim only (we used to have two physical LRU linkages per page), but it never worked for intermediate limit reclaim over multiple leaf cgroups. We're noticing this now because 1) we're putting everything into cgroups for accounting, not just the things we want to control and 2) we're moving away from leaf limits that invoke reclaim on individual cgroups, toward large tree reclaim, triggered by high-level limits, or physical memory pressure that is influenced by local protections such as memory.low and memory.min instead. This patch (of 3): When file pages are lower than the watermark on a node, we try to force scan anonymous pages to counter-act the balancing algorithms preference for new file pages when they are likely thrashing. This is a node-level decision, but it's currently made each time we look at an lruvec. This is unnecessarily expensive and also a layering violation that makes the code harder to understand. Clean this up by making the check once per node and setting a flag in the scan_control. Link: http://lkml.kernel.org/r/20191107205334.158354-2-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Shakeel Butt Reviewed-by: Suren Baghdasaryan Cc: Andrey Ryabinin Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1b05117df78e035afb5f66ef50bf8750d976ef08 Author: Johannes Weiner Date: Sat Nov 30 17:55:52 2019 -0800 mm: vmscan: harmonize writeback congestion tracking for nodes & memcgs The current writeback congestion tracking has separate flags for kswapd reclaim (node level) and cgroup limit reclaim (memcg-node level). This is unnecessarily complicated: the lruvec is an existing abstraction layer for that node-memcg intersection. Introduce lruvec->flags and LRUVEC_CONGESTED. Then track that at the reclaim root level, which is either the NUMA node for global reclaim, or the cgroup-node intersection for cgroup reclaim. Link: http://lkml.kernel.org/r/20191022144803.302233-9-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0f6a5cff43d3bcd6aa54c9af267737249d02aa21 Author: Johannes Weiner Date: Sat Nov 30 17:55:49 2019 -0800 mm: vmscan: split shrink_node() into node part and memcgs part This function is getting long and unwieldy, split out the memcg bits. The updated shrink_node() handles the generic (node) reclaim aspects: - global vmpressure notifications - writeback and congestion throttling - reclaim/compaction management - kswapd giving up on unreclaimable nodes It then calls a new shrink_node_memcgs() which handles cgroup specifics: - the cgroup tree traversal - memory.low considerations - per-cgroup slab shrinking callbacks - per-cgroup vmpressure notifications [hannes@cmpxchg.org: rename "root" to "target_memcg", per Roman] Link: http://lkml.kernel.org/r/20191025143640.GA386981@cmpxchg.org Link: http://lkml.kernel.org/r/20191022144803.302233-8-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit afaf07a65ddbdd70871cc3b81463f2a8f3884b6f Author: Johannes Weiner Date: Sat Nov 30 17:55:46 2019 -0800 mm: vmscan: turn shrink_node_memcg() into shrink_lruvec() An lruvec holds LRU pages owned by a certain NUMA node and cgroup. Instead of awkwardly passing around a combination of a pgdat and a memcg pointer, pass down the lruvec as soon as we can look it up. Nested callers that need to access node or cgroup properties can look them them up if necessary, but there are only a few cases. Link: http://lkml.kernel.org/r/20191022144803.302233-7-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2af339706be318dadcbe14c8935426ff401d7b1 Author: Johannes Weiner Date: Sat Nov 30 17:55:43 2019 -0800 mm: vmscan: replace shrink_node() loop with a retry jump Most of the function body is inside a loop, which imposes an additional indentation and scoping level that makes the code a bit hard to follow and modify. The looping only happens in case of reclaim-compaction, which isn't the common case. So rather than adding yet another function level to the reclaim path and have every reclaim invocation go through a level that only exists for one specific cornercase, use a retry goto. Link: http://lkml.kernel.org/r/20191022144803.302233-6-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b5ead35e7e1d3434ce436dfcb2af32820ce54589 Author: Johannes Weiner Date: Sat Nov 30 17:55:40 2019 -0800 mm: vmscan: naming fixes: global_reclaim() and sane_reclaim() Seven years after introducing the global_reclaim() function, I still have to double take when reading a callsite. I don't know how others do it, this is a terrible name. Invert the meaning and rename it to cgroup_reclaim(). [ After all, "global reclaim" is just regular reclaim invoked from the page allocator. It's reclaim on behalf of a cgroup limit that is a special case of reclaim, and should be explicit - not the reverse. ] sane_reclaim() isn't very descriptive either: it tests whether we can use the regular writeback throttling - available during regular page reclaim or cgroup2 limit reclaim - or need to use the broken wait_on_page_writeback() method. Use "writeback_throttling_sane()". Link: http://lkml.kernel.org/r/20191022144803.302233-5-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Roman Gushchin Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a108629149cc63cfb6fd446184e3e578e04bcfd1 Author: Johannes Weiner Date: Sat Nov 30 17:55:37 2019 -0800 mm: vmscan: move inactive_list_is_low() swap check to the caller inactive_list_is_low() should be about one thing: checking the ratio between inactive and active list. Kitchensink checks like the one for swap space makes the function hard to use and modify its callsites. Luckly, most callers already have an understanding of the swap situation, so it's easy to clean up. get_scan_count() has its own, memcg-aware swap check, and doesn't even get to the inactive_list_is_low() check on the anon list when there is no swap space available. shrink_list() is called on the results of get_scan_count(), so that check is redundant too. age_active_anon() has its own totalswap_pages check right before it checks the list proportions. The shrink_node_memcg() site is the only one that doesn't do its own swap check. Add it there. Then delete the swap check from inactive_list_is_low(). Link: http://lkml.kernel.org/r/20191022144803.302233-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 867e5e1de14b2b2bde324cdfeec3f3f83eb21424 Author: Johannes Weiner Date: Sat Nov 30 17:55:34 2019 -0800 mm: clean up and clarify lruvec lookup procedure There is a per-memcg lruvec and a NUMA node lruvec. Which one is being used is somewhat confusing right now, and it's easy to make mistakes - especially when it comes to global reclaim. How it works: when memory cgroups are enabled, we always use the root_mem_cgroup's per-node lruvecs. When memory cgroups are not compiled in or disabled at runtime, we use pgdat->lruvec. Document that in a comment. Due to the way the reclaim code is generalized, all lookups use the mem_cgroup_lruvec() helper function, and nobody should have to find the right lruvec manually right now. But to avoid future mistakes, rename the pgdat->lruvec member to pgdat->__lruvec and delete the convenience wrapper that suggests it's a commonly accessed member. While in this area, swap the mem_cgroup_lruvec() argument order. The name suggests a memcg operation, yet it takes a pgdat first and a memcg second. I have to double take every time I call this. Fix that. Link: http://lkml.kernel.org/r/20191022144803.302233-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit de3b01506ea494b46aab05dc143b69adbf2aaa9d Author: Johannes Weiner Date: Sat Nov 30 17:55:31 2019 -0800 mm: vmscan: simplify lruvec_lru_size() Patch series "mm: vmscan: cgroup-related cleanups". Here are 8 patches that clean up the reclaim code's interaction with cgroups a bit. They're not supposed to change any behavior, just make the implementation easier to understand and work with. This patch (of 8): This function currently takes the node or lruvec size and subtracts the zones that are excluded by the classzone index of the allocation. It uses four different types of counters to do this. Just add up the eligible zones. [cai@lca.pw: fix an undefined behavior for zone id] Link: http://lkml.kernel.org/r/20191108204407.1435-1-cai@lca.pw [akpm@linux-foundation.org: deal with the MAX_NR_ZONES special case. per Qian Cai] Link: http://lkml.kernel.org/r/64E60F6F-7582-427B-8DD5-EF97B1656F5A@lca.pw Link: http://lkml.kernel.org/r/20191022144803.302233-2-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb16556d913f2b12feffc8a56fe184df1e76d6d5 Author: Yang Shi Date: Sat Nov 30 17:55:28 2019 -0800 mm/vmscan.c: remove unused scan_control parameter from pageout() Since lumpy reclaim was removed in v3.5 scan_control is not used by may_write_to_{queue|inode} and pageout() anymore, remove the unused parameter. Link: http://lkml.kernel.org/r/1570124498-19300-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Acked-by: David Rientjes Acked-by: Michal Hocko Cc: Mel Gorman Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f87bccde6a7dd1bdb219a4045e8ac111590c9314 Author: Andrey Ryabinin Date: Sat Nov 30 17:55:24 2019 -0800 mm/vmscan: remove unused lru_pages argument Since 9092c71bb724 ("mm: use sc->priority for slab shrink targets") the argument 'unsigned long *lru_pages' passed around with no purpose. Remove it. Link: http://lkml.kernel.org/r/20190228083329.31892-4-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Michal Hocko Cc: Rik van Riel Cc: William Kucharski Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e47b346aba0873529bf5130d599e4d91197cdd52 Author: lijiazi Date: Sat Nov 30 17:55:21 2019 -0800 mm/page_alloc.c: print reserved_highatomic info Print nr_reserved_highatomic in show_free_areas, because when alloc_harder is false, this value will be subtracted from the free_pages in __zone_watermark_ok. Printing this value can help analyze memory allocaction failure issues. Link: http://lkml.kernel.org/r/19515f3de2fb6abe66b52e03e4b676a21e82beda.1573634806.git.lijiazi@xiaomi.com Signed-off-by: lijiazi Reviewed-by: Andrew Morton Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 653e003d7f37716f84c17edcad3c228497888bfc Author: Hao Lee Date: Sat Nov 30 17:55:18 2019 -0800 include/linux/mmzone.h: fix comment for ISOLATE_UNMAPPED macro Both file-backed pages and anonymous pages can be unmapped. ISOLATE_UNMAPPED is not just for file-backed pages. Link: http://lkml.kernel.org/r/20191024151621.GA20400@haolee.github.io Signed-off-by: Hao Lee Reviewed-by: Andrew Morton Cc: Vlastimil Babka Cc: Dan Williams Cc: Michal Hocko Cc: Wei Yang Cc: Mel Gorman Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 68265390f9aa625e2ce94ed1bcff8906db702d79 Author: Mel Gorman Date: Sat Nov 30 17:55:15 2019 -0800 mm, pcpu: make zone pcp updates and reset internal to the mm Memory hotplug needs to be able to reset and reinit the pcpu allocator batch and high limits but this action is internal to the VM. Move the declaration to internal.h Link: http://lkml.kernel.org/r/20191021094808.28824-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Borislav Petkov Cc: Matt Fleming Cc: Qian Cai Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb1ef534ceb745f237eafb72ff5555d74fa49235 Author: Mel Gorman Date: Sat Nov 30 17:55:11 2019 -0800 mm, pcp: share common code between memory hotplug and percpu sysctl handler Both the percpu_pagelist_fraction sysctl handler and memory hotplug have a common requirement of updating the pcpu page allocation batch and high values. Split the relevant helper to share common code. No functional change. Link: http://lkml.kernel.org/r/20191021094808.28824-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Borislav Petkov Cc: Matt Fleming Cc: Qian Cai Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e27a2df03b8933aa7c1579816ecb6a071bb0e0d Author: Anshuman Khandual Date: Sat Nov 30 17:55:06 2019 -0800 mm/page_alloc: add alloc_contig_pages() HugeTLB helper alloc_gigantic_page() implements fairly generic allocation method where it scans over various zones looking for a large contiguous pfn range before trying to allocate it with alloc_contig_range(). Other than deriving the requested order from 'struct hstate', there is nothing HugeTLB specific in there. This can be made available for general use to allocate contiguous memory which could not have been allocated through the buddy allocator. alloc_gigantic_page() has been split carving out actual allocation method which is then made available via new alloc_contig_pages() helper wrapped under CONFIG_CONTIG_ALLOC. All references to 'gigantic' have been replaced with more generic term 'contig'. Allocated pages here should be freed with free_contig_range() or by calling __free_page() on each allocated page. Link: http://lkml.kernel.org/r/1571300646-32240-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: David Hildenbrand Acked-by: Michal Hocko Cc: Mike Kravetz Cc: Vlastimil Babka Cc: Michal Hocko Cc: David Rientjes Cc: Andrea Arcangeli Cc: Oscar Salvador Cc: Mel Gorman Cc: Mike Rapoport Cc: Dan Williams Cc: Pavel Tatashin Cc: Matthew Wilcox Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0609ae011deb41c9629b7f5fd626dfa1ac9d16b0 Author: Daniel Axtens Date: Sat Nov 30 17:55:00 2019 -0800 x86/kasan: support KASAN_VMALLOC In the case where KASAN directly allocates memory to back vmalloc space, don't map the early shadow page over it. We prepopulate pgds/p4ds for the range that would otherwise be empty. This is required to get it synced to hardware on boot, allowing the lower levels of the page tables to be filled dynamically. Link: http://lkml.kernel.org/r/20191031093909.9228-5-dja@axtens.net Signed-off-by: Daniel Axtens Acked-by: Dmitry Vyukov Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Christophe Leroy Cc: Mark Rutland Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eafb149ed73a8bb8359c0ce027b98acd4e95b070 Author: Daniel Axtens Date: Sat Nov 30 17:54:57 2019 -0800 fork: support VMAP_STACK with KASAN_VMALLOC Supporting VMAP_STACK with KASAN_VMALLOC is straightforward: - clear the shadow region of vmapped stacks when swapping them in - tweak Kconfig to allow VMAP_STACK to be turned on with KASAN Link: http://lkml.kernel.org/r/20191031093909.9228-4-dja@axtens.net Signed-off-by: Daniel Axtens Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Christophe Leroy Cc: Mark Rutland Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06513916930125cdb4d0662f8b675d719abe7f32 Author: Daniel Axtens Date: Sat Nov 30 17:54:53 2019 -0800 kasan: add test for vmalloc Test kasan vmalloc support by adding a new test to the module. Link: http://lkml.kernel.org/r/20191031093909.9228-3-dja@axtens.net Signed-off-by: Daniel Axtens Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Christophe Leroy Cc: Dmitry Vyukov Cc: Mark Rutland Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c5c3cfb9ef4da957e3357a2bd36f76ee34c0862 Author: Daniel Axtens Date: Sat Nov 30 17:54:50 2019 -0800 kasan: support backing vmalloc space with real shadow memory Patch series "kasan: support backing vmalloc space with real shadow memory", v11. Currently, vmalloc space is backed by the early shadow page. This means that kasan is incompatible with VMAP_STACK. This series provides a mechanism to back vmalloc space with real, dynamically allocated memory. I have only wired up x86, because that's the only currently supported arch I can work with easily, but it's very easy to wire up other architectures, and it appears that there is some work-in-progress code to do this on arm64 and s390. This has been discussed before in the context of VMAP_STACK: - https://bugzilla.kernel.org/show_bug.cgi?id=202009 - https://lkml.org/lkml/2018/7/22/198 - https://lkml.org/lkml/2019/7/19/822 In terms of implementation details: Most mappings in vmalloc space are small, requiring less than a full page of shadow space. Allocating a full shadow page per mapping would therefore be wasteful. Furthermore, to ensure that different mappings use different shadow pages, mappings would have to be aligned to KASAN_SHADOW_SCALE_SIZE * PAGE_SIZE. Instead, share backing space across multiple mappings. Allocate a backing page when a mapping in vmalloc space uses a particular page of the shadow region. This page can be shared by other vmalloc mappings later on. We hook in to the vmap infrastructure to lazily clean up unused shadow memory. Testing with test_vmalloc.sh on an x86 VM with 2 vCPUs shows that: - Turning on KASAN, inline instrumentation, without vmalloc, introuduces a 4.1x-4.2x slowdown in vmalloc operations. - Turning this on introduces the following slowdowns over KASAN: * ~1.76x slower single-threaded (test_vmalloc.sh performance) * ~2.18x slower when both cpus are performing operations simultaneously (test_vmalloc.sh sequential_test_order=1) This is unfortunate but given that this is a debug feature only, not the end of the world. The benchmarks are also a stress-test for the vmalloc subsystem: they're not indicative of an overall 2x slowdown! This patch (of 4): Hook into vmalloc and vmap, and dynamically allocate real shadow memory to back the mappings. Most mappings in vmalloc space are small, requiring less than a full page of shadow space. Allocating a full shadow page per mapping would therefore be wasteful. Furthermore, to ensure that different mappings use different shadow pages, mappings would have to be aligned to KASAN_SHADOW_SCALE_SIZE * PAGE_SIZE. Instead, share backing space across multiple mappings. Allocate a backing page when a mapping in vmalloc space uses a particular page of the shadow region. This page can be shared by other vmalloc mappings later on. We hook in to the vmap infrastructure to lazily clean up unused shadow memory. To avoid the difficulties around swapping mappings around, this code expects that the part of the shadow region that covers the vmalloc space will not be covered by the early shadow page, but will be left unmapped. This will require changes in arch-specific code. This allows KASAN with VMAP_STACK, and may be helpful for architectures that do not have a separate module space (e.g. powerpc64, which I am currently working on). It also allows relaxing the module alignment back to PAGE_SIZE. Testing with test_vmalloc.sh on an x86 VM with 2 vCPUs shows that: - Turning on KASAN, inline instrumentation, without vmalloc, introuduces a 4.1x-4.2x slowdown in vmalloc operations. - Turning this on introduces the following slowdowns over KASAN: * ~1.76x slower single-threaded (test_vmalloc.sh performance) * ~2.18x slower when both cpus are performing operations simultaneously (test_vmalloc.sh sequential_test_order=3D1) This is unfortunate but given that this is a debug feature only, not the end of the world. The full benchmark results are: Performance No KASAN KASAN original x baseline KASAN vmalloc x baseline x KASAN fix_size_alloc_test 662004 11404956 17.23 19144610 28.92 1.68 full_fit_alloc_test 710950 12029752 16.92 13184651 18.55 1.10 long_busy_list_alloc_test 9431875 43990172 4.66 82970178 8.80 1.89 random_size_alloc_test 5033626 23061762 4.58 47158834 9.37 2.04 fix_align_alloc_test 1252514 15276910 12.20 31266116 24.96 2.05 random_size_align_alloc_te 1648501 14578321 8.84 25560052 15.51 1.75 align_shift_alloc_test 147 830 5.65 5692 38.72 6.86 pcpu_alloc_test 80732 125520 1.55 140864 1.74 1.12 Total Cycles 119240774314 763211341128 6.40 1390338696894 11.66 1.82 Sequential, 2 cpus No KASAN KASAN original x baseline KASAN vmalloc x baseline x KASAN fix_size_alloc_test 1423150 14276550 10.03 27733022 19.49 1.94 full_fit_alloc_test 1754219 14722640 8.39 15030786 8.57 1.02 long_busy_list_alloc_test 11451858 52154973 4.55 107016027 9.34 2.05 random_size_alloc_test 5989020 26735276 4.46 68885923 11.50 2.58 fix_align_alloc_test 2050976 20166900 9.83 50491675 24.62 2.50 random_size_align_alloc_te 2858229 17971700 6.29 38730225 13.55 2.16 align_shift_alloc_test 405 6428 15.87 26253 64.82 4.08 pcpu_alloc_test 127183 151464 1.19 216263 1.70 1.43 Total Cycles 54181269392 308723699764 5.70 650772566394 12.01 2.11 fix_size_alloc_test 1420404 14289308 10.06 27790035 19.56 1.94 full_fit_alloc_test 1736145 14806234 8.53 15274301 8.80 1.03 long_busy_list_alloc_test 11404638 52270785 4.58 107550254 9.43 2.06 random_size_alloc_test 6017006 26650625 4.43 68696127 11.42 2.58 fix_align_alloc_test 2045504 20280985 9.91 50414862 24.65 2.49 random_size_align_alloc_te 2845338 17931018 6.30 38510276 13.53 2.15 align_shift_alloc_test 472 3760 7.97 9656 20.46 2.57 pcpu_alloc_test 118643 132732 1.12 146504 1.23 1.10 Total Cycles 54040011688 309102805492 5.72 651325675652 12.05 2.11 [dja@axtens.net: fixups] Link: http://lkml.kernel.org/r/20191120052719.7201-1-dja@axtens.net Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D202009 Link: http://lkml.kernel.org/r/20191031093909.9228-2-dja@axtens.net Signed-off-by: Mark Rutland [shadow rework] Signed-off-by: Daniel Axtens Co-developed-by: Mark Rutland Acked-by: Vasily Gorbik Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Christophe Leroy Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e36176be1c3920a487681e37158849b9f50189c4 Author: Uladzislau Rezki (Sony) Date: Sat Nov 30 17:54:47 2019 -0800 mm/vmalloc: rework vmap_area_lock With the new allocation approach introduced in the 5.2 kernel, it becomes possible to get rid of one global spinlock. By doing that we can further improve the KVA from the performance point of view. Basically we can have two independent locks, one for allocation part and another one for deallocation, because of two different entities: "free data structures" and "busy data structures". As a result, allocation/deallocation operations can still interfere between each other in case of running simultaneously on different CPUs, it means there is still dependency, but with two locks it becomes lower. Summarizing: - it reduces the high lock contention - it allows to perform operations on "free" and "busy" trees in parallel on different CPUs. Please note it does not solve scalability issue. Test results: In order to evaluate this patch, we can run "vmalloc test driver" to see how many CPU cycles it takes to complete all test cases running sequentially. All online CPUs run it so it will cause a high lock contention. HiKey 960, ARM64, 8xCPUs, big.LITTLE: sudo ./test_vmalloc.sh sequential_test_order=1 [ 390.950557] All test took CPU0=457126382 cycles [ 391.046690] All test took CPU1=454763452 cycles [ 391.128586] All test took CPU2=454539334 cycles [ 391.222669] All test took CPU3=455649517 cycles [ 391.313946] All test took CPU4=388272196 cycles [ 391.410425] All test took CPU5=384036264 cycles [ 391.492219] All test took CPU6=387432964 cycles [ 391.578433] All test took CPU7=387201996 cycles [ 304.721224] All test took CPU0=391521310 cycles [ 304.821219] All test took CPU1=393533002 cycles [ 304.917120] All test took CPU2=392243032 cycles [ 305.008986] All test took CPU3=392353853 cycles [ 305.108944] All test took CPU4=297630721 cycles [ 305.196406] All test took CPU5=297548736 cycles [ 305.288602] All test took CPU6=297092392 cycles [ 305.381088] All test took CPU7=297293597 cycles ~14%-23% patched variant is better. Link: http://lkml.kernel.org/r/20191022155800.20468-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Andrew Morton Cc: Hillf Danton Cc: Michal Hocko Cc: Matthew Wilcox Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 746dd4012d215b53152f0001a48856e41ea31730 Author: Anders Roxell Date: Sat Nov 30 17:54:43 2019 -0800 selftests: vm: add fragment CONFIG_TEST_VMALLOC When running test_vmalloc.sh smoke the following print out states that the fragment is missing. # ./test_vmalloc.sh: You must have the following enabled in your kernel: # CONFIG_TEST_VMALLOC=m Rework to add the fragment 'CONFIG_TEST_VMALLOC=m' to the config file. Link: http://lkml.kernel.org/r/20190916095217.19665-1-anders.roxell@linaro.org Fixes: a05ef00c9790 ("selftests/vm: add script helper for CONFIG_TEST_VMALLOC_MODULE") Signed-off-by: Anders Roxell Cc: Shuah Khan Cc: "Uladzislau Rezki (Sony)" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 060650a2a0598d61bac6ce64578b176cb0e18b06 Author: Uladzislau Rezki (Sony) Date: Sat Nov 30 17:54:40 2019 -0800 mm/vmalloc: add more comments to the adjust_va_to_fit_type() When fit type is NE_FIT_TYPE there is a need in one extra object. Usually the "ne_fit_preload_node" per-CPU variable has it and there is no need in GFP_NOWAIT allocation, but there are exceptions. This commit just adds more explanations, as a result giving answers on questions like when it can occur, how often, under which conditions and what happens if GFP_NOWAIT gets failed. Link: http://lkml.kernel.org/r/20191016095438.12391-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Michal Hocko Cc: Daniel Wagner Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Uladzislau Rezki Cc: Hillf Danton Cc: Michal Hocko Cc: Matthew Wilcox Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f07116d77b5b9a4fecdcb470fc6ea08378b98ff7 Author: Uladzislau Rezki (Sony) Date: Sat Nov 30 17:54:37 2019 -0800 mm/vmalloc: respect passed gfp_mask when doing preloading Allocation functions should comply with the given gfp_mask as much as possible. The preallocation code in alloc_vmap_area doesn't follow that pattern and it is using a hardcoded GFP_KERNEL. Although this doesn't really make much difference because vmalloc is not GFP_NOWAIT compliant in general (e.g. page table allocations are GFP_KERNEL) there is no reason to spread that bad habit and it is good to fix the antipattern. [mhocko@suse.com: rewrite changelog] Link: http://lkml.kernel.org/r/20191016095438.12391-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Michal Hocko Cc: Daniel Wagner Cc: Hillf Danton Cc: Matthew Wilcox Cc: Oleksiy Avramchenko Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 81f1ba586e393ad43350bded96d1ec3c48674b00 Author: Uladzislau Rezki (Sony) Date: Sat Nov 30 17:54:33 2019 -0800 mm/vmalloc: remove preempt_disable/enable when doing preloading Some background. The preemption was disabled before to guarantee that a preloaded object is available for a CPU, it was stored for. That was achieved by combining the disabling the preemption and taking the spin lock while the ne_fit_preload_node is checked. The aim was to not allocate in atomic context when spinlock is taken later, for regular vmap allocations. But that approach conflicts with CONFIG_PREEMPT_RT philosophy. It means that calling spin_lock() with disabled preemption is forbidden in the CONFIG_PREEMPT_RT kernel. Therefore, get rid of preempt_disable() and preempt_enable() when the preload is done for splitting purpose. As a result we do not guarantee now that a CPU is preloaded, instead we minimize the case when it is not, with this change, by populating the per cpu preload pointer under the vmap_area_lock. This implies that at least each caller that has done the preallocation will not fallback to an atomic allocation later. It is possible that the preallocation would be pointless or that no preallocation is done because of the race but the data shows that this is really rare. For example i run the special test case that follows the preload pattern and path. 20 "unbind" threads run it and each does 1000000 allocations. Only 3.5 times among 1000000 a CPU was not preloaded. So it can happen but the number is negligible. [mhocko@suse.com: changelog additions] Link: http://lkml.kernel.org/r/20191016095438.12391-1-urezki@gmail.com Fixes: 82dd23e84be3 ("mm/vmalloc.c: preload a CPU with one object for split purpose") Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Steven Rostedt (VMware) Acked-by: Sebastian Andrzej Siewior Acked-by: Daniel Wagner Acked-by: Michal Hocko Cc: Hillf Danton Cc: Matthew Wilcox Cc: Oleksiy Avramchenko Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dcf61ff06d1738f66f89a54c25469df346214d75 Author: Liu Xiang Date: Sat Nov 30 17:54:30 2019 -0800 mm/vmalloc.c: remove unnecessary highmem_mask from parameter of gfpflags_allow_blocking() gfpflags_allow_blocking() does not care about __GFP_HIGHMEM, so highmem_mask can be removed. Link: http://lkml.kernel.org/r/1568812319-3467-1-git-send-email-liuxiang_1999@126.com Signed-off-by: Liu Xiang Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09dbcf422e9b791d2d43cad8c283d9bdaef019a9 Author: Michal Hocko Date: Sat Nov 30 17:54:27 2019 -0800 mm/sparse.c: do not waste pre allocated memmap space Vincent has noticed [1] that there is something unusual with the memmap allocations going on on his platform : I noticed this because on my ARM64 platform, with 1 GiB of memory the : first [and only] section is allocated from the zeroing path while with : 2 GiB of memory the first 1 GiB section is allocated from the : non-zeroing path. The underlying problem is that although sparse_buffer_init allocates enough memory for all sections on the node sparse_buffer_alloc is not able to consume them due to mismatch in the expected allocation alignement. While sparse_buffer_init preallocation uses the PAGE_SIZE alignment the real memmap has to be aligned to section_map_size() this results in a wasted initial chunk of the preallocated memmap and unnecessary fallback allocation for a section. While we are at it also change __populate_section_memmap to align to the requested size because at least VMEMMAP has constrains to have memmap properly aligned. [1] http://lkml.kernel.org/r/20191030131122.8256-1-vincent.whitchurch@axis.com [akpm@linux-foundation.org: tweak layout, per David] Link: http://lkml.kernel.org/r/20191119092642.31799-1-mhocko@kernel.org Fixes: 35fd1eb1e821 ("mm/sparse: abstract sparse buffer allocations") Signed-off-by: Michal Hocko Reported-by: Vincent Whitchurch Debugged-by: Vincent Whitchurch Acked-by: David Hildenbrand Cc: Pavel Tatashin Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 030eab4f9ffb469344c10a46bc02c5149db0a2a9 Author: Ilya Leoshkevich Date: Sat Nov 30 17:54:24 2019 -0800 mm/sparse.c: mark populate_section_memmap as __meminit Building the kernel on s390 with -Og produces the following warning: WARNING: vmlinux.o(.text+0x28dabe): Section mismatch in reference from the function populate_section_memmap() to the function .meminit.text:__populate_section_memmap() The function populate_section_memmap() references the function __meminit __populate_section_memmap(). This is often because populate_section_memmap lacks a __meminit annotation or the annotation of __populate_section_memmap is wrong. While -Og is not supported, in theory this might still happen with another compiler or on another architecture. So fix this by using the correct section annotations. [iii@linux.ibm.com: v2] Link: http://lkml.kernel.org/r/20191030151639.41486-1-iii@linux.ibm.com Link: http://lkml.kernel.org/r/20191028165549.14478-1-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Acked-by: David Hildenbrand Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c29700ed9908c15feeb84a40a415f4e921c5a66 Author: Vincent Whitchurch Date: Sat Nov 30 17:54:20 2019 -0800 mm/sparse: consistently do not zero memmap sparsemem without VMEMMAP has two allocation paths to allocate the memory needed for its memmap (done in sparse_mem_map_populate()). In one allocation path (sparse_buffer_alloc() succeeds), the memory is not zeroed (since it was previously allocated with memblock_alloc_try_nid_raw()). In the other allocation path (sparse_buffer_alloc() fails and sparse_mem_map_populate() falls back to memblock_alloc_try_nid()), the memory is zeroed. AFAICS this difference does not appear to be on purpose. If the code is supposed to work with non-initialized memory (__init_single_page() takes care of zeroing the struct pages which are actually used), we should consistently not zero the memory, to avoid masking bugs. ( I noticed this because on my ARM64 platform, with 1 GiB of memory the first [and only] section is allocated from the zeroing path while with 2 GiB of memory the first 1 GiB section is allocated from the non-zeroing path. ) Michal: "the main user visible problem is a memory wastage. The overal amount of memory should be small. I wouldn't call it stable material." Link: http://lkml.kernel.org/r/20191030131122.8256-1-vincent.whitchurch@axis.com Signed-off-by: Vincent Whitchurch Acked-by: Michal Hocko Acked-by: David Hildenbrand Reviewed-by: Oscar Salvador Reviewed-by: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5e79ef561b0292fa4448d3ea5de6430143b9f70 Author: David Hildenbrand Date: Sat Nov 30 17:54:17 2019 -0800 mm/memory_hotplug.c: don't allow to online/offline memory blocks with holes Our onlining/offlining code is unnecessarily complicated. Only memory blocks added during boot can have holes (a range that is not IORESOURCE_SYSTEM_RAM). Hotplugged memory never has holes (e.g., see add_memory_resource()). All memory blocks that belong to boot memory are already online. Note that boot memory can have holes and the memmap of the holes is marked PG_reserved. However, also memory allocated early during boot is PG_reserved - basically every page of boot memory that is not given to the buddy is PG_reserved. Therefore, when we stop allowing to offline memory blocks with holes, we implicitly no longer have to deal with onlining memory blocks with holes. E.g., online_pages() will do a walk_system_ram_range(..., online_pages_range), whereby online_pages_range() will effectively only free the memory holes not falling into a hole to the buddy. The other pages (holes) are kept PG_reserved (via move_pfn_range_to_zone()->memmap_init_zone()). This allows to simplify the code. For example, we no longer have to worry about marking pages that fall into memory holes PG_reserved when onlining memory. We can stop setting pages PG_reserved completely in memmap_init_zone(). Offlining memory blocks added during boot is usually not guaranteed to work either way (unmovable data might have easily ended up on that memory during boot). So stopping to do that should not really hurt. Also, people are not even aware of a setup where onlining/offlining of memory blocks with holes used to work reliably (see [1] and [2] especially regarding the hotplug path) - I doubt it worked reliably. For the use case of offlining memory to unplug DIMMs, we should see no change. (holes on DIMMs would be weird). Please note that hardware errors (PG_hwpoison) are not memory holes and are not affected by this change when offlining. [1] https://lkml.org/lkml/2019/10/22/135 [2] https://lkml.org/lkml/2019/8/14/1365 Link: http://lkml.kernel.org/r/20191119115237.6662-1-david@redhat.com Reviewed-by: Dan Williams Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Dan Williams Cc: Anshuman Khandual Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 848e19ad3c3352b6e0906f05b282a3e22c67c98f Author: David Hildenbrand Date: Sat Nov 30 17:54:14 2019 -0800 drivers/base/memory.c: drop the mem_sysfs_mutex The mem_sysfs_mutex isn't really helpful. Also, it's not really clear what the mutex protects at all. The device lists of the memory subsystem are protected separately. We don't need that mutex when looking up. creating, or removing independent devices. find_memory_block_by_id() will perform locking on its own and grab a reference of the returned device. At the time memory_dev_init() is called, we cannot have concurrent hot(un)plug operations yet - we're still fairly early during boot. We don't need any locking. The creation/removal of memory block devices should be protected on a higher level - especially using the device hotplug lock to avoid documented issues (see Documentation/core-api/memory-hotplug.rst) - or if that is reworked, using similar locking. Protecting in the context of these functions only doesn't really make sense. Especially, if we would have a situation where the same memory blocks are created/deleted at the same time, there is something horribly going wrong (imagining adding/removing a DIMM at the same time from two call paths) - after the functions succeeded something else in the callers would blow up (e.g., create_memory_block_devices() succeeded but there are no memory block devices anymore). All relevant call paths (except when adding memory early during boot via ACPI, which is now documented) hold the device hotplug lock when adding memory, and when removing memory. Let's document that instead. Add a simple safety net to create_memory_block_devices() in case we would actually remove memory blocks while adding them, so we'll never dereference a NULL pointer. Simplify memory_dev_init() now that the lock is gone. Link: http://lkml.kernel.org/r/20190925082621.4927-1-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Michal Hocko Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aba9817da150e9dcf4c599c0508c38d1971d66e1 Author: Ben Dooks (Codethink) Date: Sat Nov 30 17:54:10 2019 -0800 include/linux/memory_hotplug.h: move definitions of {set,clear}_zone_contiguous The {set,clear}_zone_contiguous are built whatever the configuratoon so move the definitions outside the current ifdef to avoid the following compiler warnings: mm/page_alloc.c:1550:6: warning: no previous prototype for 'set_zone_contiguous' [-Wmissing-prototypes] mm/page_alloc.c:1571:6: warning: no previous prototype for 'clear_zone_contiguous' [-Wmissing-prototypes] Link: http://lkml.kernel.org/r/20191106123911.7435-1-ben.dooks@codethink.co.uk Signed-off-by: Ben Dooks (Codethink) Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 756d25be457fc5497da0ceee0f3d0c9eb4d8535d Author: David Hildenbrand Date: Sat Nov 30 17:54:07 2019 -0800 mm/page_isolation.c: convert SKIP_HWPOISON to MEMORY_OFFLINE We have two types of users of page isolation: 1. Memory offlining: Offline memory so it can be unplugged. Memory won't be touched. 2. Memory allocation: Allocate memory (e.g., alloc_contig_range()) to become the owner of the memory and make use of it. For example, in case we want to offline memory, we can ignore (skip over) PageHWPoison() pages, as the memory won't get used. We can allow to offline memory. In contrast, we don't want to allow to allocate such memory. Let's generalize the approach so we can special case other types of pages we want to skip over in case we offline memory. While at it, also pass the same flags to test_pages_isolated(). Link: http://lkml.kernel.org/r/20191021172353.3056-3-david@redhat.com Signed-off-by: David Hildenbrand Suggested-by: Michal Hocko Acked-by: Michal Hocko Cc: Oscar Salvador Cc: Anshuman Khandual Cc: David Hildenbrand Cc: Pingfan Liu Cc: Qian Cai Cc: Pavel Tatashin Cc: Dan Williams Cc: Vlastimil Babka Cc: Mel Gorman Cc: Mike Rapoport Cc: Alexander Duyck Cc: Mike Rapoport Cc: Pavel Tatashin Cc: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ee5f4f31d365ff9867a8002a8b37f9aa61b21d2 Author: David Hildenbrand Date: Sat Nov 30 17:54:03 2019 -0800 mm/page_alloc.c: don't set pages PageReserved() when offlining Patch series "mm: Memory offlining + page isolation cleanups", v2. This patch (of 2): We call __offline_isolated_pages() from __offline_pages() after all pages were isolated and are either free (PageBuddy()) or PageHWPoison. Nothing can stop us from offlining memory at this point. In __offline_isolated_pages() we first set all affected memory sections offline (offline_mem_sections(pfn, end_pfn)), to mark the memmap as invalid (pfn_to_online_page() will no longer succeed), and then walk over all pages to pull the free pages from the free lists (to the isolated free lists, to be precise). Note that re-onlining a memory block will result in the whole memmap getting reinitialized, overwriting any old state. We already poision the memmap when offlining is complete to find any access to stale/uninitialized memmaps. So, setting the pages PageReserved() is not helpful. The memap is marked offline and all pageblocks are isolated. As soon as offline, the memmap is stale either way. This looks like a leftover from ancient times where we initialized the memmap when adding memory and not when onlining it (the pages were set PageReserved so re-onling would work as expected). Link: http://lkml.kernel.org/r/20191021172353.3056-2-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Oscar Salvador Cc: Mel Gorman Cc: Mike Rapoport Cc: Dan Williams Cc: Wei Yang Cc: Alexander Duyck Cc: Anshuman Khandual Cc: Pavel Tatashin Cc: Mike Rapoport Cc: Pavel Tatashin Cc: Pingfan Liu Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ec47097434847c0c3a3bb7287feb46386a62720 Author: David Hildenbrand Date: Sat Nov 30 17:54:00 2019 -0800 mm/memory_hotplug: remove __online_page_free() and __online_page_increment_counters() Let's drop the now unused functions. Link: http://lkml.kernel.org/r/20190909114830.662-4-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Wei Yang Cc: Dan Williams Cc: Qian Cai Cc: Haiyang Zhang Cc: "K. Y. Srinivasan" Cc: Sasha Levin Cc: Stephen Hemminger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30a9c246b9f6fe0591e8afb05758a3e3b096fabe Author: David Hildenbrand Date: Sat Nov 30 17:53:55 2019 -0800 hv_balloon: use generic_online_page() Let's use the generic onlining function - which will now also take care of calling kernel_map_pages(). Link: http://lkml.kernel.org/r/20190909114830.662-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Dan Williams Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Qian Cai Cc: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 18db149120c106cf2b1a2595f82f3229f9d223b8 Author: David Hildenbrand Date: Sat Nov 30 17:53:51 2019 -0800 mm/memory_hotplug: export generic_online_page() Patch series "mm/memory_hotplug: Export generic_online_page()". Let's replace the __online_page...() functions by generic_online_page(). Hyper-V only wants to delay the actual onlining of un-backed pages, so we can simpy re-use the generic function. This patch (of 3): Let's expose generic_online_page() so online_page_callback users can simply fall back to the generic implementation when actually deciding to online the pages. Link: http://lkml.kernel.org/r/20190909114830.662-2-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Dan Williams Cc: Wei Yang Cc: Qian Cai Cc: Haiyang Zhang Cc: "K. Y. Srinivasan" Cc: Sasha Levin Cc: Stephen Hemminger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dca4436d1cf9e0d237c8ed2af72ed6b78fc7c099 Author: Alastair D'Silva Date: Sat Nov 30 17:53:48 2019 -0800 mm/memory_hotplug.c: add a bounds check to __add_pages() On PowerPC, the address ranges allocated to OpenCAPI LPC memory are allocated from firmware. These address ranges may be higher than what older kernels permit, as we increased the maximum permissable address in commit 4ffe713b7587 ("powerpc/mm: Increase the max addressable memory to 2PB"). It is possible that the addressable range may change again in the future. In this scenario, we end up with a bogus section returned from __section_nr (see the discussion on the thread "mm: Trigger bug on if a section is not found in __section_nr"). Adding a check here means that we fail early and have an opportunity to handle the error gracefully, rather than rumbling on and potentially accessing an incorrect section. Further discussion is also on the thread ("powerpc: Perform a bounds check in arch_add_memory") http://lkml.kernel.org/r/20190827052047.31547-1-alastair@au1.ibm.com Link: http://lkml.kernel.org/r/20191001004617.7536-2-alastair@au1.ibm.com Signed-off-by: Alastair D'Silva Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 32d1fe8fcb32130733b59fc447e35753dc87fd40 Author: Anshuman Khandual Date: Sat Nov 30 17:53:44 2019 -0800 mm/hotplug: reorder memblock_[free|remove]() calls in try_remove_memory() Currently during memory hot add procedure, memory gets into memblock before calling arch_add_memory() which creates its linear mapping. add_memory_resource() { .................. memblock_add_node() .................. arch_add_memory() .................. } But during memory hot remove procedure, removal from memblock happens first before its linear mapping gets teared down with arch_remove_memory() which is not consistent. Resource removal should happen in reverse order as they were added. However this does not pose any problem for now, unless there is an assumption regarding linear mapping. One example was a subtle failure on arm64 platform [1]. Though this has now found a different solution. try_remove_memory() { .................. memblock_free() memblock_remove() .................. arch_remove_memory() .................. } This changes the sequence of resource removal including memblock and linear mapping tear down during memory hot remove which will now be the reverse order in which they were added during memory hot add. The changed removal order looks like the following. try_remove_memory() { .................. arch_remove_memory() .................. memblock_free() memblock_remove() .................. } [1] https://patchwork.kernel.org/patch/11127623/ Memory hot remove now works on arm64 without this because a recent commit 60bb462fc7ad ("drivers/base/node.c: simplify unregister_memory_block_under_nodes()"). This does not fix a serious problem. It just removes an inconsistency while freeing resources during memory hot remove which for now does not pose a real problem. David mentioned that re-ordering should still make sense for consistency purpose (removing stuff in the reverse order they were added). This patch is now detached from arm64 hot-remove series. Michal: : I would just a note that the inconsistency doesn't pose any problem now : but if somebody makes any assumptions about linear mappings then it could : get subtly broken like your example for arm64 which has found a different : solution in the meantime. Link: http://lkml.kernel.org/r/1569380273-7708-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7506851837350e112685ddf4d13ba03a558f9e20 Author: Yunfeng Ye Date: Sat Nov 30 17:53:41 2019 -0800 mm/memory-failure.c: use page_shift() in add_to_kill() page_shift() is supported after the commit 94ad9338109f ("mm: introduce page_shift()"). So replace with page_shift() in add_to_kill() for readability. Link: http://lkml.kernel.org/r/543d8bc9-f2e7-3023-7c35-2e7ed67c0e82@huawei.com Signed-off-by: Yunfeng Ye Reviewed-by: David Hildenbrand Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit feec24a6139d4640c6ef344e0271a8cd4d509e60 Author: Naoya Horiguchi Date: Sat Nov 30 17:53:38 2019 -0800 mm, soft-offline: convert parameter to pfn Currently soft_offline_page() receives struct page, and its sibling memory_failure() receives pfn. This discrepancy looks weird and makes precheck on pfn validity tricky. So let's align them. Link: http://lkml.kernel.org/r/20191016234706.GA5493@www9186uo.sakura.ne.jp Signed-off-by: Naoya Horiguchi Acked-by: Andrew Morton Cc: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 996ff7a08dae591f5e87852281477d26a83b393c Author: Jane Chu Date: Sat Nov 30 17:53:35 2019 -0800 mm/memory-failure.c clean up around tk pre-allocation add_to_kill() expects the first 'tk' to be pre-allocated, it makes subsequent allocations on need basis, this makes the code a bit difficult to read. Move all the allocation internal to add_to_kill() and drop the **tk argument. Link: http://lkml.kernel.org/r/1565112345-28754-2-git-send-email-jane.chu@oracle.com Signed-off-by: Jane Chu Reviewed-by: Dan Williams Acked-by: Naoya Horiguchi Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2e53c4e1c807d91dc7241c2104e69ad9d2c71e48 Author: Joel Fernandes (Google) Date: Sat Nov 30 17:53:31 2019 -0800 memfd: add test for COW on MAP_PRIVATE and F_SEAL_FUTURE_WRITE mappings In this test, the parent and child both have writable private mappings. The test shows that without the patch in this series, the parent and child shared the same memory which is incorrect. In other words, COW needs to be triggered so any writes to child's copy stays local to the child. Link: http://lkml.kernel.org/r/20191107195355.80608-2-joel@joelfernandes.org Signed-off-by: Joel Fernandes (Google) Cc: Hugh Dickins Cc: Nicolas Geoffray Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 05d351102dbe4e103d6bdac18b1122cd3cd04925 Author: Nicolas Geoffray Date: Sat Nov 30 17:53:28 2019 -0800 mm, memfd: fix COW issue on MAP_PRIVATE and F_SEAL_FUTURE_WRITE mappings F_SEAL_FUTURE_WRITE has unexpected behavior when used with MAP_PRIVATE: A private mapping created after the memfd file that gets sealed with F_SEAL_FUTURE_WRITE loses the copy-on-write at fork behavior, meaning children and parent share the same memory, even though the mapping is private. The reason for this is due to the code below: static int shmem_mmap(struct file *file, struct vm_area_struct *vma) { struct shmem_inode_info *info = SHMEM_I(file_inode(file)); if (info->seals & F_SEAL_FUTURE_WRITE) { /* * New PROT_WRITE and MAP_SHARED mmaps are not allowed when * "future write" seal active. */ if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_WRITE)) return -EPERM; /* * Since the F_SEAL_FUTURE_WRITE seals allow for a MAP_SHARED * read-only mapping, take care to not allow mprotect to revert * protections. */ vma->vm_flags &= ~(VM_MAYWRITE); } ... } And for the mm to know if a mapping is copy-on-write: static inline bool is_cow_mapping(vm_flags_t flags) { return (flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE; } The patch fixes the issue by making the mprotect revert protection happen only for shared mappings. For private mappings, using mprotect will have no effect on the seal behavior. The F_SEAL_FUTURE_WRITE feature was introduced in v5.1 so v5.3.x stable kernels would need a backport. [akpm@linux-foundation.org: reflow comment, per Christoph] Link: http://lkml.kernel.org/r/20191107195355.80608-1-joel@joelfernandes.org Fixes: ab3948f58ff84 ("mm/memfd: add an F_SEAL_FUTURE_WRITE seal to memfd") Signed-off-by: Nicolas Geoffray Signed-off-by: Joel Fernandes (Google) Cc: Hugh Dickins Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 91298f1a302dad0f0f630413c812818636faa8a0 Author: Ingo Molnar Date: Sun Dec 1 15:49:47 2019 +0100 x86/mm/pat: Fix off-by-one bugs in interval tree search There's a bug in the new PAT code, the conversion of memtype_check_conflict() is buggy: 8d04a5f97a5f: ("x86/mm/pat: Convert the PAT tree to a generic interval tree") dprintk("Overlap at 0x%Lx-0x%Lx\n", match->start, match->end); found_type = match->type; - node = rb_next(&match->rb); - while (node) { - match = rb_entry(node, struct memtype, rb); - - if (match->start >= end) /* Checked all possible matches */ - goto success; - - if (is_node_overlap(match, start, end) && - match->type != found_type) { + match = memtype_interval_iter_next(match, start, end); + while (match) { + if (match->type != found_type) goto failure; - } - node = rb_next(&match->rb); + match = memtype_interval_iter_next(match, start, end); } Note how the '>= end' condition to end the interval check, got converted into: + match = memtype_interval_iter_next(match, start, end); This is subtly off by one, because the interval trees interfaces require closed interval parameters: include/linux/interval_tree_generic.h /* \ * Iterate over intervals intersecting [start;last] \ * \ * Note that a node's interval intersects [start;last] iff: \ * Cond1: ITSTART(node) <= last \ * and \ * Cond2: start <= ITLAST(node) \ */ \ ... if (ITSTART(node) <= last) { /* Cond1 */ \ if (start <= ITLAST(node)) /* Cond2 */ \ return node; /* node is leftmost match */ \ [start;last] is a closed interval (note that '<= last' check) - while the PAT 'end' parameter is 1 byte beyond the end of the range, because ioremap() and the other mapping APIs usually use the [start,end) half-open interval, derived from 'size'. This is what ioremap() does for example: /* * Mappings have to be page-aligned */ offset = phys_addr & ~PAGE_MASK; phys_addr &= PHYSICAL_PAGE_MASK; size = PAGE_ALIGN(last_addr+1) - phys_addr; retval = reserve_memtype(phys_addr, (u64)phys_addr + size, pcm, &new_pcm); phys_addr+size will be on a page boundary, after the last byte of the mapped interval. So the correct parameter to use in the interval tree searches is not 'end' but 'end-1'. This could have relevance if conflicting PAT ranges are exactly adjacent, for example a future WC region is followed immediately by an already mapped UC- region - in this case memtype_check_conflict() would incorrectly deny the WC memtype region and downgrade the memtype to UC-. BTW., rather annoyingly this downgrading is done silently in memtype_check_insert(): int memtype_check_insert(struct memtype *new, enum page_cache_mode *ret_type) { int err = 0; err = memtype_check_conflict(new->start, new->end, new->type, ret_type); if (err) return err; if (ret_type) new->type = *ret_type; memtype_interval_insert(new, &memtype_rbroot); return 0; } So on such a conflict we'd just silently get UC- in *ret_type, and write it into the new region, never the wiser ... So assuming that the patch below fixes the primary bug the diagnostics side of ioremap() cache attribute downgrades would be another thing to fix. Anyway, I checked all the interval-tree iterations, and most of them are off by one - but I think the one related to memtype_check_conflict() is the one causing this particular performance regression. The only correct interval-tree searches were these two: arch/x86/mm/pat_interval.c: match = memtype_interval_iter_first(&memtype_rbroot, 0, ULONG_MAX); arch/x86/mm/pat_interval.c: match = memtype_interval_iter_next(match, 0, ULONG_MAX); The ULONG_MAX was hiding the off-by-one in plain sight. :-) Note that the bug was probably benign in the sense of implementing a too strict cache attribute conflict policy and downgrading cache attributes, so AFAICS the worst outcome of this bug would be a performance regression, not any instabilities. Reported-by: kernel test robot Reported-by: Kenneth R. Crudup Reported-by: Mariusz Ceier Tested-by: Mariusz Ceier Tested-by: Kenneth R. Crudup Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191201144947.GA4167@gmail.com Signed-off-by: Ingo Molnar commit e1608f3fa857b600045b6df7f7dadc70eeaa4496 Author: Daniel Borkmann Date: Fri Nov 29 23:29:11 2019 +0100 bpf: Avoid setting bpf insns pages read-only when prog is jited For the case where the interpreter is compiled out or when the prog is jited it is completely unnecessary to set the BPF insn pages as read-only. In fact, on frequent churn of BPF programs, it could lead to performance degradation of the system over time since it would break the direct map down to 4k pages when calling set_memory_ro() for the insn buffer on x86-64 / arm64 and there is no reverse operation. Thus, avoid breaking up large pages for data maps, and only limit this to the module range used by the JIT where it is necessary to set the image read-only and executable. Suggested-by: Peter Zijlstra Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191129222911.3710-1-daniel@iogearbox.net commit 36bb9778fd11173f2dd1484e4f6797365e18c1d8 Author: Jonathan Corbet Date: Sun Dec 1 08:45:54 2019 -0700 docs: remove a bunch of stray CRs A pair of documentation patches introduced a bunch of unwanted carriage-return characters into the docs. Remove them, and chase away the ghost of DOS for another day. Fixes: a016e092940f ("docs: admin-guide: dell_rbu: Improve formatting and spelling") Fixes: bdd68860a044 ("Documentation: networking: device drivers: Remove stray asterisks") Signed-off-by: Jonathan Corbet commit 625110b5e9dae9074d8a7e67dd07f821a053eed7 Author: Thomas Hellstrom Date: Sat Nov 30 17:51:32 2019 -0800 mm/memory.c: fix a huge pud insertion race during faulting A huge pud page can theoretically be faulted in racing with pmd_alloc() in __handle_mm_fault(). That will lead to pmd_alloc() returning an invalid pmd pointer. Fix this by adding a pud_trans_unstable() function similar to pmd_trans_unstable() and check whether the pud is really stable before using the pmd pointer. Race: Thread 1: Thread 2: Comment create_huge_pud() Fallback - not taken. create_huge_pud() Taken. pmd_alloc() Returns an invalid pointer. This will result in user-visible huge page data corruption. Note that this was caught during a code audit rather than a real experienced problem. It looks to me like the only implementation that currently creates huge pud pagetable entries is dev_dax_huge_fault() which doesn't appear to care much about private (COW) mappings or write-tracking which is, I believe, a prerequisite for create_huge_pud() falling back on thread 1, but not in thread 2. Link: http://lkml.kernel.org/r/20191115115808.21181-2-thomas_os@shipmail.org Fixes: a00cc7d9dd93 ("mm, x86: add support for PUD-sized transparent hugepages") Signed-off-by: Thomas Hellstrom Acked-by: Kirill A. Shutemov Cc: Arnd Bergmann Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bf1a12a8095615c9486f5463ca473d2d69ff6952 Author: Thomas Hellstrom Date: Sat Nov 30 17:51:29 2019 -0800 mm: move the backup x_devmap() functions to asm-generic/pgtable.h The asm-generic/pgtable.h include file appears to be the correct place for the backup x_devmap() inline functions. Moving them here is also necessary if we want to include x_devmap() in the [pmd|pud]_unstable functions. So move the x_devmap() functions to asm-generic/pgtable.h Link: http://lkml.kernel.org/r/20191115115808.21181-1-thomas_os@shipmail.org Signed-off-by: Thomas Hellstrom Cc: Arnd Bergmann Cc: "Kirill A. Shutemov" Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30c46382855e0e1b8a5c21331076feb190524546 Author: Yang Shi Date: Sat Nov 30 17:51:26 2019 -0800 mm/rmap.c: use VM_BUG_ON_PAGE() in __page_check_anon_rmap() The __page_check_anon_rmap() just calls two BUG_ON()s protected by CONFIG_DEBUG_VM, the #ifdef could be eliminated by using VM_BUG_ON_PAGE(). Link: http://lkml.kernel.org/r/1573157346-111316-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 091e4299544f8658a4b10815da9e4e603e070121 Author: Miles Chen Date: Sat Nov 30 17:51:23 2019 -0800 mm/rmap.c: fix outdated comment in page_get_anon_vma() Replace DESTROY_BY_RCU with SLAB_TYPESAFE_BY_RCU because SLAB_DESTROY_BY_RCU has been renamed to SLAB_TYPESAFE_BY_RCU by commit 5f0d5a3ae7cf ("mm: Rename SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU") Link: http://lkml.kernel.org/r/20191017093554.22562-1-miles.chen@mediatek.com Signed-off-by: Miles Chen Cc: Paul E. McKenney Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2400abc782dc38a1fee9cfc13589d31f1a0404f Author: Vineet Gupta Date: Sat Nov 30 17:51:20 2019 -0800 asm-generic/mm: stub out p{4,u}d_clear_bad() if __PAGETABLE_P{4,U}D_FOLDED This came up when removing __ARCH_HAS_5LEVEL_HACK for ARC as code bloat. With this patch we see the following code reduction. | bloat-o-meter2 vmlinux-D-elide-p4d_free_tlb vmlinux-E-elide-p?d_clear_bad | add/remove: 0/2 grow/shrink: 0/0 up/down: 0/-40 (-40) | function old new delta | pud_clear_bad 20 - -20 | p4d_clear_bad 20 - -20 | Total: Before=4136930, After=4136890, chg -1.000000% Link: http://lkml.kernel.org/r/20191016162400.14796-6-vgupta@synopsys.com Signed-off-by: Vineet Gupta Acked-by: Kirill A. Shutemov Cc: Arnd Bergmann Cc: Will Deacon Cc: "Aneesh Kumar K . V" Cc: Nick Piggin Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d14f1110a5c015e816e8e78ccec6b5c90d2d44e Author: Vineet Gupta Date: Sat Nov 30 17:51:16 2019 -0800 asm-generic/tlb: stub out pmd_free_tlb() if nopmd This came up when removing __ARCH_HAS_5LEVEL_HACK for ARC as code bloat. With this patch we see the following code reduction. | bloat-o-meter2 vmlinux-E-elide-p?d_clear_bad vmlinux-F-elide-pmd_free_tlb | add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-112 (-112) | function old new delta | free_pgd_range 422 310 -112 | Total: Before=4137042, After=4136930, chg -1.000000% Note that pmd folding can be tricky: In 2-level setup (where pmd is conceptually folded) most pmd routines are valid and refer to upper levels. In this patch we can, but see next patch for example where we can't Link: http://lkml.kernel.org/r/20191016162400.14796-5-vgupta@synopsys.com Signed-off-by: Vineet Gupta Acked-by: Kirill A. Shutemov Cc: "Aneesh Kumar K . V" Cc: Arnd Bergmann Cc: Nick Piggin Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bffd9723477a8459eb7cbdd7f1a82fde83df46e6 Author: Vineet Gupta Date: Sat Nov 30 17:51:13 2019 -0800 asm-generic/tlb: stub out p4d_free_tlb() if nop4d ... ... independent of __ARCH_HAS_5LEVEL_HACK This came up when removing __ARCH_HAS_5LEVEL_HACK for ARC as code bloat. With this patch we see the following code reduction | bloat-o-meter2 vmlinux-C-elide-pud_free_tlb vmlinux-D-elide-p4d_free_tlb | add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-104 (-104) | function old new delta | free_pgd_range 552 422 -130 | Total: Before=4137172, After=4137042, chg -1.000000% Link: http://lkml.kernel.org/r/20191016162400.14796-4-vgupta@synopsys.com Signed-off-by: Vineet Gupta Acked-by: Kirill A. Shutemov Acked-by: Linus Torvalds Cc: "Aneesh Kumar K . V" Cc: Arnd Bergmann Cc: Nick Piggin Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b08861d10bbeaae4d592d5cc00b2420e2e7ba3ac Author: Vineet Gupta Date: Sat Nov 30 17:51:10 2019 -0800 asm-generic/tlb: stub out pud_free_tlb() if nopud ... ... independent of __ARCH_HAS_4LEVEL_HACK This came up when removing __ARCH_HAS_5LEVEL_HACK for ARC as code bloat. With this patch we see the following code reduction | bloat-o-meter2 vmlinux-B-elide-ARCH_USE_5LEVEL_HACK vmlinux-C-elide-pud_free_tlb | add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-104 (-104) | function old new delta | free_pgd_range 656 552 -104 | Total: Before=4137276, After=4137172, chg -1.000000% Note: The primary change is alternate defintion for pud_free_tlb() but while there also removed empty stubs for __pud_free_tlb, which is anyhow called only from pud_free_tlb() Link: http://lkml.kernel.org/r/20191016162400.14796-3-vgupta@synopsys.com Signed-off-by: Vineet Gupta Acked-by: Kirill A. Shutemov Acked-by: Linus Torvalds Cc: "Aneesh Kumar K . V" Cc: Arnd Bergmann Cc: Nick Piggin Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6aae3425aa9ca776e8201a93494a4a482353d2c3 Author: Vineet Gupta Date: Sat Nov 30 17:51:06 2019 -0800 ARC: mm: remove __ARCH_USE_5LEVEL_HACK Patch series "elide extraneous generated code for folded p4d/pud/pmd", v3. This series came out of seemingly benign excursion into understanding/removing __ARCH_USE_5LEVEL_HACK from ARC port showing some extraneous code being generated despite folded p4d/pud/pmd | bloat-o-meter2 vmlinux-[AB]* | add/remove: 0/0 grow/shrink: 3/0 up/down: 130/0 (130) | function old new delta | free_pgd_range 548 660 +112 | p4d_clear_bad 2 20 +18 The patches here address that | bloat-o-meter2 vmlinux-[BF]* | add/remove: 0/2 grow/shrink: 0/1 up/down: 0/-386 (-386) | function old new delta | pud_clear_bad 20 - -20 | p4d_clear_bad 20 - -20 | free_pgd_range 660 314 -346 The code savings are not a whole lot, but still worthwhile IMHO. This patch (of 5): With paging code made 5-level compliant, this is no longer needed. ARC has software page walker with 2 lookup levels (pgd -> pte) This was expected to be non functional change but ended with slight code bloat due to needless inclusions of p*d_free_tlb() macros which will be addressed in further patches. | bloat-o-meter2 vmlinux-[AB]* | add/remove: 0/0 grow/shrink: 2/0 up/down: 128/0 (128) | function old new delta | free_pgd_range 546 656 +110 | p4d_clear_bad 2 20 +18 | Total: Before=4137148, After=4137276, chg 0.000000% Link: http://lkml.kernel.org/r/20191016162400.14796-2-vgupta@synopsys.com Signed-off-by: Vineet Gupta Acked-by: Kirill A. Shutemov Cc: "Aneesh Kumar K . V" Cc: Arnd Bergmann Cc: Nick Piggin Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff68dac6d65cd1347dad5d780dd8c90f29dc1b0b Author: Gaowei Pu Date: Sat Nov 30 17:51:03 2019 -0800 mm/mmap.c: use IS_ERR_VALUE to check return value of get_unmapped_area get_unmapped_area() returns an address or -errno on failure. Historically we have checked for the failure by offset_in_page() which is correct but quite hard to read. Newer code started using IS_ERR_VALUE which is much easier to read. Convert remaining users of offset_in_page as well. [mhocko@suse.com: rewrite changelog] [mhocko@kernel.org: fix mremap.c and uprobes.c sites also] Link: http://lkml.kernel.org/r/20191012102512.28051-1-pugaowei@gmail.com Signed-off-by: Gaowei Pu Reviewed-by: Andrew Morton Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Wei Yang Cc: Konstantin Khlebnikov Cc: Kirill A. Shutemov Cc: "Jérôme Glisse" Cc: Mike Kravetz Cc: Rik van Riel Cc: Qian Cai Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e4a9eb921332b9d1edd99f76998f99f36b195f7 Author: Wei Yang Date: Sat Nov 30 17:50:59 2019 -0800 mm/rmap.c: reuse mergeable anon_vma as parent when fork In __anon_vma_prepare(), we will try to find anon_vma if it is possible to reuse it. While on fork, the logic is different. Since commit 5beb49305251 ("mm: change anon_vma linking to fix multi-process server scalability issue"), function anon_vma_clone() tries to allocate new anon_vma for child process. But the logic here will allocate a new anon_vma for each vma, even in parent this vma is mergeable and share the same anon_vma with its sibling. This may do better for scalability issue, while it is not necessary to do so especially after interval tree is used. Commit 7a3ef208e662 ("mm: prevent endless growth of anon_vma hierarchy") tries to reuse some anon_vma by counting child anon_vma and attached vmas. While for those mergeable anon_vmas, we can just reuse it and not necessary to go through the logic. After this change, kernel build test reduces 20% anon_vma allocation. Do the same kernel build test, it shows run time in sys reduced 11.6%. Origin: real 2m50.467s user 17m52.002s sys 1m51.953s real 2m48.662s user 17m55.464s sys 1m50.553s real 2m51.143s user 17m59.687s sys 1m53.600s Patched: real 2m39.933s user 17m1.835s sys 1m38.802s real 2m39.321s user 17m1.634s sys 1m39.206s real 2m39.575s user 17m1.420s sys 1m38.845s Link: http://lkml.kernel.org/r/20191011072256.16275-2-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Acked-by: Konstantin Khlebnikov Cc: Kirill A. Shutemov Cc: "Jérôme Glisse" Cc: Mike Kravetz Cc: Rik van Riel Cc: Qian Cai Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47b390d23bf81894395c8773acf6f73c66465dc4 Author: Wei Yang Date: Sat Nov 30 17:50:56 2019 -0800 mm/rmap.c: don't reuse anon_vma if we just want a copy Before commit 7a3ef208e662 ("mm: prevent endless growth of anon_vma hierarchy"), anon_vma_clone() doesn't change dst->anon_vma. While after this commit, anon_vma_clone() will try to reuse an exist one on forking. But this commit go a little bit further for the case not forking. anon_vma_clone() is called from __vma_split(), __split_vma(), copy_vma() and anon_vma_fork(). For the first three places, the purpose here is get a copy of src and we don't expect to touch dst->anon_vma even it is NULL. While after that commit, it is possible to reuse an anon_vma when dst->anon_vma is NULL. This is not we intend to have. This patch stops reuse of anon_vma for non-fork cases. Link: http://lkml.kernel.org/r/20191011072256.16275-1-richardw.yang@linux.intel.com Fixes: 7a3ef208e662 ("mm: prevent endless growth of anon_vma hierarchy") Signed-off-by: Wei Yang Acked-by: Konstantin Khlebnikov Cc: Kirill A. Shutemov Cc: "Jérôme Glisse" Cc: Mike Kravetz Cc: Rik van Riel Cc: Qian Cai Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aba6dfb75fe15650991442efd137c32fbf2e2b85 Author: Wei Yang Date: Sat Nov 30 17:50:53 2019 -0800 mm/mmap.c: rb_parent is not necessary in __vma_link_list() Now we use rb_parent to get next, while this is not necessary. When prev is NULL, this means vma should be the first element in the list. Then next should be current first one (mm->mmap), no matter whether we have parent or not. After removing it, the code shows the beauty of symmetry. Link: http://lkml.kernel.org/r/20190813032656.16625-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Acked-by: Andrew Morton Cc: Mel Gorman Cc: Vlastimil Babka Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1b9fc5b24fa2e7c0e67778cda77ac231fb4bcac7 Author: Wei Yang Date: Sat Nov 30 17:50:49 2019 -0800 mm/mmap.c: extract __vma_unlink_list() as counterpart for __vma_link_list() Just make the code a little easier to read. Link: http://lkml.kernel.org/r/20191006012636.31521-3-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d81fbe09a5669acf28fccd4f51f00b43534a0c9 Author: Wei Yang Date: Sat Nov 30 17:50:46 2019 -0800 mm/mmap.c: __vma_unlink_prev() is not necessary now The third parameter of __vma_unlink_common() could differentiate these two types. __vma_unlink_prev() is not necessary now. Link: http://lkml.kernel.org/r/20191006012636.31521-2-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 93b343ab2d2fc9a22767f6eeb95c78420bfedf4a Author: Wei Yang Date: Sat Nov 30 17:50:43 2019 -0800 mm/mmap.c: prev could be retrieved from vma->vm_prev Currently __vma_unlink_common handles two cases: * has_prev * or not When has_prev is false, it is obvious prev is calculated from vma->vm_prev in __vma_unlink_common. When has_prev is true, the prev is passed through from __vma_unlink_prev in __vma_adjust for non-case 8. And at the beginning next is calculated from vma->vm_next, which implies vma is next->vm_prev. The above statement sounds a little complicated, while to think in another point of view, no matter whether vma and next is swapped, the mmap link list still preserves its property. It is proper to access vma->vm_prev. Link: http://lkml.kernel.org/r/20191006012636.31521-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Cc: Mel Gorman Cc: Vlastimil Babka Cc: Oscar Salvador Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eef1a429f234f8f50e89226705bb47d7d3f1b840 Author: Konstantin Khlebnikov Date: Sat Nov 30 17:50:40 2019 -0800 mm/swap.c: piggyback lru_add_drain_all() calls This is a very slow operation. Right now POSIX_FADV_DONTNEED is the top user because it has to freeze page references when removing it from the cache. invalidate_bdev() calls it for the same reason. Both are triggered from userspace, so it's easy to generate a storm. mlock/mlockall no longer calls lru_add_drain_all - I've seen here serious slowdown on older kernels. There are some less obvious paths in memory migration/CMA/offlining which shouldn't call frequently. The worst case requires a non-trivial workload because lru_add_drain_all() skips cpus where vectors are empty. Something must constantly generate a flow of pages for each cpu. Also cpus must be busy to make scheduling per-cpu works slower. And the machine must be big enough (64+ cpus in our case). In our case that was a massive series of mlock calls in map-reduce while other tasks write logs (and generates flows of new pages in per-cpu vectors). Mlock calls were serialized by mutex and accumulated latency up to 10 seconds or more. The kernel does not call lru_add_drain_all on mlock paths since 4.15, but the same scenario could be triggered by fadvise(POSIX_FADV_DONTNEED) or any other remaining user. There is no reason to do the drain again if somebody else already drained all the per-cpu vectors while we waited for the lock. Piggyback on a drain starting and finishing while we wait for the lock: all pages pending at the time of our entry were drained from the vectors. Callers like POSIX_FADV_DONTNEED retry their operations once after draining per-cpu vectors when pages have unexpected references. Link: http://lkml.kernel.org/r/157019456205.3142.3369423180908482020.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Andrew Morton Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 408a60eddd206134fd306dfbc53bbde093b8deb0 Author: Wei Yang Date: Sat Nov 30 17:50:37 2019 -0800 mm/mmap.c: remove a never-triggered warning in __vma_adjust() The upper level of "if" makes sure (end >= next->vm_end), which means there are only two possibilities: 1) end == next->vm_end 2) end > next->vm_end remove_next is assigned to be (1 + end > next->vm_end). This means if remove_next is 1, end must equal to next->vm_end. The VM_WARN_ON will never trigger. Link: http://lkml.kernel.org/r/20190912063126.13250-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Cc: Vlastimil Babka Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e4dcad204d3a281be6f8573e0a82648a4ad84e69 Author: Joel Fernandes (Google) Date: Sat Nov 30 17:50:33 2019 -0800 rss_stat: add support to detect RSS updates of external mm When a process updates the RSS of a different process, the rss_stat tracepoint appears in the context of the process doing the update. This can confuse userspace that the RSS of process doing the update is updated, while in reality a different process's RSS was updated. This issue happens in reclaim paths such as with direct reclaim or background reclaim. This patch adds more information to the tracepoint about whether the mm being updated belongs to the current process's context (curr field). We also include a hash of the mm pointer so that the process who the mm belongs to can be uniquely identified (mm_id field). Also vsprintf.c is refactored a bit to allow reuse of hashing code. [akpm@linux-foundation.org: remove unused local `str'] [joelaf@google.com: inline call to ptr_to_hashval] Link: http://lore.kernel.org/r/20191113153816.14b95acd@gandalf.local.home Link: http://lkml.kernel.org/r/20191114164622.GC233237@google.com Link: http://lkml.kernel.org/r/20191106024452.81923-1-joel@joelfernandes.org Signed-off-by: Joel Fernandes (Google) Reported-by: Ioannis Ilkos Acked-by: Petr Mladek [lib/vsprintf.c] Cc: Tim Murray Cc: Michal Hocko Cc: Carmen Jackson Cc: Mayank Gupta Cc: Daniel Colascione Cc: Steven Rostedt (VMware) Cc: Minchan Kim Cc: "Aneesh Kumar K.V" Cc: Dan Williams Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Cc: Vlastimil Babka Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b3d1411b6726ea6930222f8f12587d89762477c6 Author: Joel Fernandes (Google) Date: Sat Nov 30 17:50:30 2019 -0800 mm: emit tracepoint when RSS changes Useful to track how RSS is changing per TGID to detect spikes in RSS and memory hogs. Several Android teams have been using this patch in various kernel trees for half a year now. Many reported to me it is really useful so I'm posting it upstream. Initial patch developed by Tim Murray. Changes I made from original patch: o Prevent any additional space consumed by mm_struct. Regarding the fact that the RSS may change too often thus flooding the traces - note that, there is some "hysterisis" with this already. That is - We update the counter only if we receive 64 page faults due to SPLIT_RSS_ACCOUNTING. However, during zapping or copying of pte range, the RSS is updated immediately which can become noisy/flooding. In a previous discussion, we agreed that BPF or ftrace can be used to rate limit the signal if this becomes an issue. Also note that I added wrappers to trace_rss_stat to prevent compiler errors where linux/mm.h is included from tracing code, causing errors such as: CC kernel/trace/power-traces.o In file included from ./include/trace/define_trace.h:102, from ./include/trace/events/kmem.h:342, from ./include/linux/mm.h:31, from ./include/linux/ring_buffer.h:5, from ./include/linux/trace_events.h:6, from ./include/trace/events/power.h:12, from kernel/trace/power-traces.c:15: ./include/trace/trace_events.h:113:22: error: field `ent' has incomplete type struct trace_entry ent; \ Link: http://lore.kernel.org/r/20190903200905.198642-1-joel@joelfernandes.org Link: http://lkml.kernel.org/r/20191001172817.234886-1-joel@joelfernandes.org Co-developed-by: Tim Murray Signed-off-by: Tim Murray Signed-off-by: Joel Fernandes (Google) Acked-by: Michal Hocko Cc: Carmen Jackson Cc: Mayank Gupta Cc: Daniel Colascione Cc: Steven Rostedt (VMware) Cc: Minchan Kim Cc: "Aneesh Kumar K.V" Cc: Dan Williams Cc: Jerome Glisse Cc: Matthew Wilcox Cc: Ralph Campbell Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8897c1b1a1795cab23d5ac13e4e23bf0b5f4e0c6 Author: Kirill A. Shutemov Date: Sat Nov 30 17:50:26 2019 -0800 shmem: pin the file in shmem_fault() if mmap_sem is dropped syzbot found the following crash: BUG: KASAN: use-after-free in perf_trace_lock_acquire+0x401/0x530 include/trace/events/lock.h:13 Read of size 8 at addr ffff8880a5cf2c50 by task syz-executor.0/26173 CPU: 0 PID: 26173 Comm: syz-executor.0 Not tainted 5.3.0-rc6 #146 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: perf_trace_lock_acquire+0x401/0x530 include/trace/events/lock.h:13 trace_lock_acquire include/trace/events/lock.h:13 [inline] lock_acquire+0x2de/0x410 kernel/locking/lockdep.c:4411 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] shmem_fault+0x5ec/0x7b0 mm/shmem.c:2034 __do_fault+0x111/0x540 mm/memory.c:3083 do_shared_fault mm/memory.c:3535 [inline] do_fault mm/memory.c:3613 [inline] handle_pte_fault mm/memory.c:3840 [inline] __handle_mm_fault+0x2adf/0x3f20 mm/memory.c:3964 handle_mm_fault+0x1b5/0x6b0 mm/memory.c:4001 do_user_addr_fault arch/x86/mm/fault.c:1441 [inline] __do_page_fault+0x536/0xdd0 arch/x86/mm/fault.c:1506 do_page_fault+0x38/0x590 arch/x86/mm/fault.c:1530 page_fault+0x39/0x40 arch/x86/entry/entry_64.S:1202 It happens if the VMA got unmapped under us while we dropped mmap_sem and inode got freed. Pinning the file if we drop mmap_sem fixes the issue. Link: http://lkml.kernel.org/r/20190927083908.rhifa4mmaxefc24r@box Signed-off-by: Kirill A. Shutemov Reported-by: syzbot+03ee87124ee05af991bd@syzkaller.appspotmail.com Acked-by: Johannes Weiner Reviewed-by: Matthew Wilcox (Oracle) Cc: Hillf Danton Cc: Hugh Dickins Cc: Josef Bacik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89b15332af7c0312a41e50846819ca6613b58b4c Author: Johannes Weiner Date: Sat Nov 30 17:50:22 2019 -0800 mm: drop mmap_sem before calling balance_dirty_pages() in write fault One of our services is observing hanging ps/top/etc under heavy write IO, and the task states show this is an mmap_sem priority inversion: A write fault is holding the mmap_sem in read-mode and waiting for (heavily cgroup-limited) IO in balance_dirty_pages(): balance_dirty_pages+0x724/0x905 balance_dirty_pages_ratelimited+0x254/0x390 fault_dirty_shared_page.isra.96+0x4a/0x90 do_wp_page+0x33e/0x400 __handle_mm_fault+0x6f0/0xfa0 handle_mm_fault+0xe4/0x200 __do_page_fault+0x22b/0x4a0 page_fault+0x45/0x50 Somebody tries to change the address space, contending for the mmap_sem in write-mode: call_rwsem_down_write_failed_killable+0x13/0x20 do_mprotect_pkey+0xa8/0x330 SyS_mprotect+0xf/0x20 do_syscall_64+0x5b/0x100 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 The waiting writer locks out all subsequent readers to avoid lock starvation, and several threads can be seen hanging like this: call_rwsem_down_read_failed+0x14/0x30 proc_pid_cmdline_read+0xa0/0x480 __vfs_read+0x23/0x140 vfs_read+0x87/0x130 SyS_read+0x42/0x90 do_syscall_64+0x5b/0x100 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 To fix this, do what we do for cache read faults already: drop the mmap_sem before calling into anything IO bound, in this case the balance_dirty_pages() function, and return VM_FAULT_RETRY. Link: http://lkml.kernel.org/r/20190924194238.GA29030@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Kirill A. Shutemov Cc: Josef Bacik Cc: Hillf Danton Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1603c8d1b1fbfbc20dcb363543b690de862849c0 Author: Chris Down Date: Sat Nov 30 17:50:19 2019 -0800 Documentation/admin-guide/cgroup-v2.rst: document why inactive_X + active_X may not equal X This has confused a significant number of people using cgroups inside Facebook, and some of those outside as well judging by posts like this[0] (although it's not a problem unique to cgroup v2). If shmem handling in particular becomes more coherent at some point in the future -- although that seems unlikely now -- we can change the wording here. [0]: https://unix.stackexchange.com/q/525092/10762 Link: http://lkml.kernel.org/r/20191111144958.GA11914@chrisdown.name Signed-off-by: Chris Down Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Tejun Heo Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa40d1ee9f156624658ca409a04a78882ca5b3c5 Author: Shakeel Butt Date: Sat Nov 30 17:50:16 2019 -0800 mm: vmscan: memcontrol: remove mem_cgroup_select_victim_node() Since commit 1ba6fc9af35b ("mm: vmscan: do not share cgroup iteration between reclaimers"), the memcg reclaim does not bail out earlier based on sc->nr_reclaimed and will traverse all the nodes. All the reclaimable pages of the memcg on all the nodes will be scanned relative to the reclaim priority. So, there is no need to maintain state regarding which node to start the memcg reclaim from. This patch effectively reverts the commit 889976dbcb12 ("memcg: reclaim memory from nodes in round-robin order") and commit 453a9bf347f1 ("memcg: fix numa scan information update to be triggered by memory event"). [shakeelb@google.com: v2] Link: http://lkml.kernel.org/r/20191030204232.139424-1-shakeelb@google.com Link: http://lkml.kernel.org/r/20191029234753.224143-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Johannes Weiner Cc: Greg Thelen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 242c37b459ce9ea1be53b75bdb76a7d9268a0791 Author: Hao Lee Date: Sat Nov 30 17:50:12 2019 -0800 include/linux/memcontrol.h: fix comments based on per-node memcg These comments should be updated as memcg limit enforcement has been moved from zones to nodes. Link: http://lkml.kernel.org/r/20191022150618.GA15519@haolee.github.io Signed-off-by: Hao Lee Acked-by: Roman Gushchin Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8c8c383c04f6cbcda38e38b2430cb245da4d7e5a Author: Johannes Weiner Date: Sat Nov 30 17:50:09 2019 -0800 mm: memcontrol: try harder to set a new memory.high Setting a memory.high limit below the usage makes almost no effort to shrink the cgroup to the new target size. While memory.high is a "soft" limit that isn't supposed to cause OOM situations, we should still try harder to meet a user request through persistent reclaim. For example, after setting a 10M memory.high on an 800M cgroup full of file cache, the usage shrinks to about 350M: + cat /cgroup/workingset/memory.current 841568256 + echo 10M + cat /cgroup/workingset/memory.current 355729408 This isn't exactly what the user would expect to happen. Setting the value a few more times eventually whittles the usage down to what we are asking for: + echo 10M + cat /cgroup/workingset/memory.current 104181760 + echo 10M + cat /cgroup/workingset/memory.current 31801344 + echo 10M + cat /cgroup/workingset/memory.current 10440704 To improve this, add reclaim retry loops to the memory.high write() callback, similar to what we do for memory.max, to make a reasonable effort that the usage meets the requested size after the call returns. Afterwards, a single write() to memory.high is enough in all but extreme cases: + cat /cgroup/workingset/memory.current 841609216 + echo 10M + cat /cgroup/workingset/memory.current 10182656 790M is not a reasonable reclaim target to ask of a single reclaim invocation. And it wouldn't be reasonable to optimize the reclaim code for it. So asking for the full size but retrying is not a bad choice here: we express our intent, and benefit if reclaim becomes better at handling larger requests, but we also acknowledge that some of the deltas we can encounter in memory_high_write() are just too ridiculously big for a single reclaim invocation to manage. Link: http://lkml.kernel.org/r/20191022201518.341216-2-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7249c9f01da30ae5cd1843a54a8fab9b35dd979d Author: Johannes Weiner Date: Sat Nov 30 17:50:06 2019 -0800 mm: memcontrol: remove dead code from memory_max_write() When the reclaim loop in memory_max_write() is ^C'd or similar, we set err to -EINTR. But we don't return err. Once the limit is set, we always return success (nbytes). Delete the dead code. Link: http://lkml.kernel.org/r/20191022201518.341216-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9da83f3fc74b806ee419a29977ef0239454bd8ec Author: Yafang Shao Date: Sat Nov 30 17:50:03 2019 -0800 mm, memcg: clean up reclaim iter array The mem_cgroup_reclaim_cookie is only used in memcg softlimit reclaim now, and the priority of the reclaim is always 0. We don't need to define the iter in struct mem_cgroup_per_node as an array any more. That could make the code more clear and save some space. Link: http://lkml.kernel.org/r/1569897728-1686-1-git-send-email-laoar.shao@gmail.com Signed-off-by: Yafang Shao Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a1100a74065e6454fa06a0f7ac287daee4cc1bf6 Author: Fengguang Wu Date: Sat Nov 30 17:50:00 2019 -0800 mm/swap.c: trivial mark_page_accessed() cleanup This avoids duplicated PageReferenced() calls. No behavior change. Link: http://lkml.kernel.org/r/20191016225326.GB12497@wfg-t540p.sh.intel.com Signed-off-by: Fengguang Wu Reviewed-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Dave Hansen Cc: Liu Jingqi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12d2966d854bb0be1433032cedcb71b6b620bfc7 Author: Naohiro Aota Date: Sat Nov 30 17:49:56 2019 -0800 mm, swap: disallow swapon() on zoned block devices A zoned block device consists of a number of zones. Zones are either conventional and accepting random writes or sequential and requiring that writes be issued in LBA order from each zone write pointer position. For the write restriction, zoned block devices are not suitable for a swap device. Disallow swapon on them. [akpm@linux-foundation.org: reflow and reword comment, per Christoph] Link: http://lkml.kernel.org/r/20191015085814.637837-1-naohiro.aota@wdc.com Signed-off-by: Naohiro Aota Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: "Theodore Y. Ts'o" Cc: Hannes Reinecke Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2dfbe47fa0e9753f560b75cfcd4654e40ab903b Author: Liu Xiang Date: Sat Nov 30 17:49:53 2019 -0800 mm/gup.c: fix comments of __get_user_pages() and get_user_pages_remote() Fix comments of __get_user_pages() and get_user_pages_remote(), make them more clear. Link: http://lkml.kernel.org/r/1572443533-3118-1-git-send-email-liuxiang_1999@126.com Signed-off-by: Liu Xiang Suggested-by: John Hubbard Reviewed-by: David Hildenbrand Reviewed-by: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b96cc65515bb16f90a361c01da088ce09ad3cf92 Author: zhong jiang Date: Sat Nov 30 17:49:50 2019 -0800 mm/gup.c: allow CMA migration to propagate errors back to caller check_and_migrate_cma_pages() was recording the result of __get_user_pages_locked() in an unsigned "nr_pages" variable. Because __get_user_pages_locked() returns a signed value that can include negative errno values, this had the effect of hiding errors. Change check_and_migrate_cma_pages() implementation so that it uses a signed variable instead, and propagates the results back to the caller just as other gup internal functions do. This was discovered with the help of unsigned_lesser_than_zero.cocci. Link: http://lkml.kernel.org/r/1571671030-58029-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Suggested-by: John Hubbard Acked-by: Vlastimil Babka Reviewed-by: John Hubbard Reviewed-by: Ira Weiny Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9266a14033a81b3096feccd10542c20b3f47fe8e Author: Konstantin Khlebnikov Date: Sat Nov 30 17:49:47 2019 -0800 mm/filemap.c: warn if stale pagecache is left after direct write generic_file_direct_write() tries to invalidate pagecache after O_DIRECT write. Unlike to similar code in dio_complete() this silently ignores error returned from invalidate_inode_pages2_range(). According to comment this code here because not all filesystems call dio_complete() to do proper invalidation after O_DIRECT write. Noticeable example is a blkdev_direct_IO(). This patch calls dio_warn_stale_pagecache() if invalidation fails. Link: http://lkml.kernel.org/r/157270038294.4812.2238891109785106069.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Andrew Morton Reviewed-by: Jan Kara Cc: Jens Axboe Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a92853b6746fe5ffef20a7c30addf6320561e669 Author: Konstantin Khlebnikov Date: Sat Nov 30 17:49:44 2019 -0800 fs/direct-io.c: keep dio_warn_stale_pagecache() when CONFIG_BLOCK=n This helper prints warning if direct I/O write failed to invalidate cache, and set EIO at inode to warn usersapce about possible data corruption. See also commit 5a9d929d6e13 ("iomap: report collisions between directio and buffered writes to userspace"). Direct I/O is supported by non-disk filesystems, for example NFS. Thus generic code needs this even in kernel without CONFIG_BLOCK. Link: http://lkml.kernel.org/r/157270038074.4812.7980855544557488880.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Andrew Morton Reviewed-by: Jan Kara Cc: Jens Axboe Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 80c1fe902691d3ef4786f9e62e47a0aa0deb8b54 Author: Konstantin Khlebnikov Date: Sat Nov 30 17:49:41 2019 -0800 mm/filemap.c: remove redundant cache invalidation after async direct-io write generic_file_direct_write() invalidates cache at entry. Second time this should be done when request completes. But this function calls second invalidation at exit unconditionally even for async requests. This patch skips second invalidation for async requests (-EIOCBQUEUED). Link: http://lkml.kernel.org/r/157270037850.4812.15036239021726025572.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Andrew Morton Reviewed-by: Jan Kara Cc: Jens Axboe Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd98afd4d606a674809b6f9fc44c22347457b9fa Author: Yu Zhao Date: Sat Nov 30 17:49:37 2019 -0800 mm/slub.c: clean up validate_slab() The function doesn't need to return any value, and the check can be done in one pass. There is a behavior change: before the patch, we stop at the first invalid free object; after the patch, we stop at the first invalid object, free or in use. This shouldn't matter because the original behavior isn't intended anyway. Link: http://lkml.kernel.org/r/20191108193958.205102-1-yuzhao@google.com Signed-off-by: Yu Zhao Acked-by: Kirill A. Shutemov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Tetsuo Handa Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aed6814894323cc059224fec47841bf7b0d94774 Author: Yu Zhao Date: Sat Nov 30 17:49:34 2019 -0800 mm/slub.c: update comments Slub doesn't use PG_active and PG_error anymore. Link: http://lkml.kernel.org/r/20191007222023.162256-1-yuzhao@google.com Signed-off-by: Yu Zhao Reviewed-by: Andrew Morton Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e1b70dd1e6429f82675c5dbcc3044f92c6ef05d6 Author: Miles Chen Date: Sat Nov 30 17:49:31 2019 -0800 mm: slub: print the offset of fault addresses With commit ad67b74d2469 ("printk: hash addresses printed with %p"), it is a little bit harder to match the fault addresses printed by check_bytes_and_report() or slab_pad_check() in the dump because the fault addresses may not show up in the dump. Print the offset of the fault addresses to make it easier to match the incorrect poison or padding values in the dump. Before: We have to search the "63" in the dump. If we want to get the offset of 63, we have to count it from the start of Object dump. ============================================================= BUG kmalloc-128 (Not tainted): Poison overwritten ------------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: 0x00000000570da294-0x00000000570da294. First byte 0x63 instead of 0x6b ... INFO: Object 0x000000006ebb3b9e @offset=14208 fp=0x0000000065862488 Redzone 00000000a6abccff: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 00000000741c16f0: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 0000000061ad278f: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 000000000467c1bd: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 000000008812766b: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 000000003d9b8f25: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 0000000000d80c33: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 00000000867b0d90: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Object 000000006ebb3b9e: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 000000005ea59a9f: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 000000003ef8bddc: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 000000008190375d: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 000000006df7fb32: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 0000000069474eae: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 0000000008073b7d: 6b 6b 6b 6b 63 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 00000000b45ae74d: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 After: We know the fault address is at @offset=1508, and the Object is at @offset=1408, so we know the fault address is at offset=100 within the object. ========================================================= BUG kmalloc-128 (Not tainted): Poison overwritten --------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: 0x00000000638ec1d1-0x00000000638ec1d1 @offset=1508. First byte 0x63 instead of 0x6b ... INFO: Object 0x000000008171818d @offset=1408 fp=0x0000000066dae230 Redzone 00000000e2697ab6: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 0000000064b6a381: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 00000000e413a234: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 0000000004c1dfeb: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 000000009ad24d42: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 000000002a196a23: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 00000000a7b8468a: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Redzone 0000000088db6da3: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb Object 000000008171818d: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 000000007c4035d4: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 000000004dd281a4: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 0000000079121dff: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 00000000756682a9: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 0000000053b7e541: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 0000000091f8d530: 6b 6b 6b 6b 63 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Object 000000009c76035c: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 Link: http://lkml.kernel.org/r/20190925140807.20490-1-miles.chen@mediatek.com Signed-off-by: Miles Chen Reviewed-by: Andrew Morton Cc: Christoph Lameter Cc: Matthew Wilcox Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13657d0ad90c2cbcfc6fd8d48ca52432004a8f9b Author: Pengfei Li Date: Sat Nov 30 17:49:28 2019 -0800 mm, slab_common: use enum kmalloc_cache_type to iterate over kmalloc caches The type of local variable *type* of new_kmalloc_cache() should be enum kmalloc_cache_type instead of int, so correct it. Link: http://lkml.kernel.org/r/1569241648-26908-4-git-send-email-lpf.vector@gmail.com Signed-off-by: Pengfei Li Acked-by: Vlastimil Babka Acked-by: Roman Gushchin Acked-by: David Rientjes Cc: Christoph Lameter Cc: Joonsoo Kim Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc0a7f7558dd52e972408ebb535b0153c06d08c2 Author: Pengfei Li Date: Sat Nov 30 17:49:25 2019 -0800 mm, slab: remove unused kmalloc_size() The size of kmalloc can be obtained from kmalloc_info[], so remove kmalloc_size() that will not be used anymore. Link: http://lkml.kernel.org/r/1569241648-26908-3-git-send-email-lpf.vector@gmail.com Signed-off-by: Pengfei Li Acked-by: Vlastimil Babka Acked-by: Roman Gushchin Acked-by: David Rientjes Cc: Christoph Lameter Cc: Joonsoo Kim Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb5d9fb38c3434ab6276bac500dfffe78649400b Author: Pengfei Li Date: Sat Nov 30 17:49:21 2019 -0800 mm, slab: make kmalloc_info[] contain all types of names Patch series "mm, slab: Make kmalloc_info[] contain all types of names", v6. There are three types of kmalloc, KMALLOC_NORMAL, KMALLOC_RECLAIM and KMALLOC_DMA. The name of KMALLOC_NORMAL is contained in kmalloc_info[].name, but the names of KMALLOC_RECLAIM and KMALLOC_DMA are dynamically generated by kmalloc_cache_name(). Patch1 predefines the names of all types of kmalloc to save the time spent dynamically generating names. These changes make sense, and the time spent by new_kmalloc_cache() has been reduced by approximately 36.3%. Time spent by new_kmalloc_cache() (CPU cycles) 5.3-rc7 66264 5.3-rc7+patch 42188 This patch (of 3): There are three types of kmalloc, KMALLOC_NORMAL, KMALLOC_RECLAIM and KMALLOC_DMA. The name of KMALLOC_NORMAL is contained in kmalloc_info[].name, but the names of KMALLOC_RECLAIM and KMALLOC_DMA are dynamically generated by kmalloc_cache_name(). This patch predefines the names of all types of kmalloc to save the time spent dynamically generating names. Besides, remove the kmalloc_cache_name() that is no longer used. Link: http://lkml.kernel.org/r/1569241648-26908-2-git-send-email-lpf.vector@gmail.com Signed-off-by: Pengfei Li Acked-by: Vlastimil Babka Acked-by: Roman Gushchin Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b211dc04cb7fa4a8f591c7f8f4ba5243d8733d9 Author: Ben Dooks Date: Sat Nov 30 17:49:18 2019 -0800 fs/buffer.c: include internal.h for missing declarations The declarations of __block_write_begin_int and guard_bio_eod are needed from internal.h so include it to fix the following sparse warnings: fs/buffer.c:1930:5: warning: symbol '__block_write_begin_int' was not declared. Should it be static? fs/buffer.c:2994:6: warning: symbol 'guard_bio_eod' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20191011170039.16100-1-ben.dooks@codethink.co.uk Signed-off-by: Ben Dooks Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1d706679733634fc32a308f2201e6765b0c63c74 Author: Saurav Girepunje Date: Sat Nov 30 17:49:15 2019 -0800 fs/buffer.c: fix use true/false for bool type Use true/false for bool return type of has_bh_in_lru(). Link: http://lkml.kernel.org/r/20191029040529.GA7625@saurav Signed-off-by: Saurav Girepunje Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 188c523e1c271d537f3c9f55b6b65bf4476de32f Author: Ding Xiang Date: Sat Nov 30 17:49:12 2019 -0800 ocfs2: fix passing zero to 'PTR_ERR' warning Fix a static code checker warning: fs/ocfs2/acl.c:331 ocfs2_acl_chmod() warn: passing zero to 'PTR_ERR' Link: http://lkml.kernel.org/r/1dee278b-6c96-eec2-ce76-fe6e07c6e20f@linux.alibaba.com Fixes: 5ee0fbd50fd ("ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang") Signed-off-by: Ding Xiang Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d216b2318a7a825177579ae27ac77b87959477f Author: Colin Ian King Date: Sat Nov 30 17:49:08 2019 -0800 scripts/spelling.txt: add more spellings to spelling.txt Here are some of the more common spelling mistakes and typos that I've found while fixing up spelling mistakes in the kernel since July 2019. Link: http://lkml.kernel.org/r/20191112092142.97989-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2115fbf7210bd053ba55a95e7ebc366df41aa9cf Author: Heiko Carstens Date: Mon Nov 18 13:59:25 2019 +0100 s390: remove compat vdso code Remove compat vdso code, since there is hardly any compat user space left. Still existing compat user space will have to use system calls instead. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d21b7e6b985c15ff75e8668b0282ec5104391901 Author: Masahiro Yamada Date: Sun Dec 1 16:08:46 2019 +0900 MAINTAINERS: update Kbuild/Kconfig maintainer's email address Signed-off-by: Masahiro Yamada commit c6c6bc6ea9fce31baaca053befc31215cfcb3dd9 Author: Richard Zhu Date: Wed Oct 9 16:07:21 2019 +0800 mailbox: imx: add support for imx v1 mu There is a version 1.0 MU on i.MX7ULP platform. One new version ID register is added, and it's offset is 0. TRn registers are defined at the offset 0x20 ~ 0x2C. RRn registers are defined at the offset 0x40 ~ 0x4C. SR/CR registers are defined at 0x60/0x64. Extend this driver to support it. Signed-off-by: Richard Zhu Suggested-by: Oleksij Rempel Reviewed-by: Dong Aisheng Reviewed-by: Oleksij Rempel Reviewed-by: Daniel Baluta Signed-off-by: Jassi Brar commit 58340e7d779ef849efaca664a50f225a53b27a2c Author: Richard Zhu Date: Wed Oct 9 16:07:20 2019 +0800 dt-bindings: mailbox: imx-mu: add imx7ulp MU support There is a version 1.0 MU on imx7ulp, use "fsl,imx7ulp-mu" compatible to support it. Signed-off-by: Richard Zhu Reviewed-by: Dong Aisheng Signed-off-by: Jassi Brar commit 5f0af07e89199ac51cdd4f25bc303bdc703f4e9c Author: Daniel Baluta Date: Wed Oct 9 16:07:19 2019 +0800 mailbox: imx: Clear the right interrupts at shutdown Make sure to only clear enabled interrupts keeping count of the connection type. Suggested-by: Oleksij Rempel Signed-off-by: Daniel Baluta Signed-off-by: Richard Zhu Reviewed-by: Dong Aisheng Signed-off-by: Jassi Brar commit bf159d151a0b844be28882f39e316b5800acaa2b Author: Daniel Baluta Date: Wed Oct 9 16:07:18 2019 +0800 mailbox: imx: Fix Tx doorbell shutdown path Tx doorbell is handled by txdb_tasklet and doesn't have an associated IRQ. Anyhow, imx_mu_shutdown ignores this and tries to free an IRQ that wasn't requested for Tx DB resulting in the following warning: [ 1.967644] Trying to free already-free IRQ 26 [ 1.972108] WARNING: CPU: 2 PID: 157 at kernel/irq/manage.c:1708 __free_irq+0xc0/0x358 [ 1.980024] Modules linked in: [ 1.983088] CPU: 2 PID: 157 Comm: kworker/2:1 Tainted: G [ 1.993524] Hardware name: Freescale i.MX8QXP MEK (DT) [ 1.998668] Workqueue: events deferred_probe_work_func [ 2.003812] pstate: 60000085 (nZCv daIf -PAN -UAO) [ 2.008607] pc : __free_irq+0xc0/0x358 [ 2.012364] lr : __free_irq+0xc0/0x358 [ 2.016111] sp : ffff00001179b7e0 [ 2.019422] x29: ffff00001179b7e0 x28: 0000000000000018 [ 2.024736] x27: ffff000011233000 x26: 0000000000000004 [ 2.030053] x25: 000000000000001a x24: ffff80083bec74d4 [ 2.035369] x23: 0000000000000000 x22: ffff80083bec7588 [ 2.040686] x21: ffff80083b1fe8d8 x20: ffff80083bec7400 [ 2.046003] x19: 0000000000000000 x18: ffffffffffffffff [ 2.051320] x17: 0000000000000000 x16: 0000000000000000 [ 2.056637] x15: ffff0000111296c8 x14: ffff00009179b517 [ 2.061953] x13: ffff00001179b525 x12: ffff000011142000 [ 2.067270] x11: ffff000011129f20 x10: ffff0000105da970 [ 2.072587] x9 : 00000000ffffffd0 x8 : 0000000000000194 [ 2.077903] x7 : 612065657266206f x6 : ffff0000111e7b09 [ 2.083220] x5 : 0000000000000003 x4 : 0000000000000000 [ 2.088537] x3 : 0000000000000000 x2 : 00000000ffffffff [ 2.093854] x1 : 28b70f0a2b60a500 x0 : 0000000000000000 [ 2.099173] Call trace: [ 2.101618] __free_irq+0xc0/0x358 [ 2.105021] free_irq+0x38/0x98 [ 2.108170] imx_mu_shutdown+0x90/0xb0 [ 2.111921] mbox_free_channel.part.2+0x24/0xb8 [ 2.116453] mbox_free_channel+0x18/0x28 This bug is present from the beginning of times. Cc: Oleksij Rempel Signed-off-by: Daniel Baluta Signed-off-by: Richard Zhu Reviewed-by: Dong Aisheng Signed-off-by: Jassi Brar commit 69269446ccbf2b44fd2595ecfa57e29fb656788d Author: Fabien Dessenne Date: Wed Oct 30 14:57:01 2019 +0100 mailbox: stm32-ipcc: Update wakeup management The wakeup specific IRQ management is no more needed to wake up the stm32 platform. A relationship has been established between the EXTI and the RX IRQ, just need to declare the EXTI interrupt instead of the IPCC RX IRQ. Signed-off-by: Alexandre Torgue Signed-off-by: Fabien Dessenne Signed-off-by: Jassi Brar commit b94ae8ad9fe79da61231999f347f79645b909bda Merge: 3b805ca177a2 23b2c96fad21 Author: Linus Torvalds Date: Sat Nov 30 17:23:16 2019 -0800 Merge tag 'seccomp-v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: "Mostly this is implementing the new flag SECCOMP_USER_NOTIF_FLAG_CONTINUE, but there are cleanups as well. - implement SECCOMP_USER_NOTIF_FLAG_CONTINUE (Christian Brauner) - fixes to selftests (Christian Brauner) - remove secure_computing() argument (Christian Brauner)" * tag 'seccomp-v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: rework define for SECCOMP_USER_NOTIF_FLAG_CONTINUE seccomp: fix SECCOMP_USER_NOTIF_FLAG_CONTINUE test seccomp: simplify secure_computing() seccomp: test SECCOMP_USER_NOTIF_FLAG_CONTINUE seccomp: add SECCOMP_USER_NOTIF_FLAG_CONTINUE seccomp: avoid overflow in implicit constant conversion commit 3b805ca177a24ff78b466ca73febe8466c67ea61 Merge: ba75082efc18 c34c78dfc1fc Author: Linus Torvalds Date: Sat Nov 30 17:01:48 2019 -0800 Merge tag 'audit-pr-20191126' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "Audit is back for v5.5, albeit with only two patches: - Allow for the auditing of suspicious O_CREAT usage via the new AUDIT_ANOM_CREAT record. - Remove a redundant if-conditional check found during code analysis. It's a minor change, but when the pull request is only two patches long, you need filler in the pull request email" [ Heh on the pull request filler. I wish more people tried to write better pull request messages, even if maybe it's not worth it for the trivial cases ;^) - Linus ] * tag 'audit-pr-20191126' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: remove redundant condition check in kauditd_thread() audit: Report suspicious O_CREAT usage commit ba75082efc18ced6def42e8f85c494aa2578760e Merge: 8a99117f6e87 42345b68c2e3 Author: Linus Torvalds Date: Sat Nov 30 16:55:37 2019 -0800 Merge tag 'selinux-pr-20191126' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: "Only three SELinux patches for v5.5: - Remove the size limit on SELinux policies, the limitation was a lingering vestige and no longer necessary. - Allow file labeling before the policy is loaded. This should ease some of the burden when the policy is initially loaded (no need to relabel files), but it should also help enable some new system concepts which dynamically create the root filesystem in the initrd. - Add support for the "greatest lower bound" policy construct which is defined as the intersection of the MLS range of two SELinux labels" * tag 'selinux-pr-20191126' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: default_range glblub implementation selinux: allow labeling before policy is loaded selinux: remove load size limit commit 8a99117f6e8793ab945d85db038f09e85703b97b Merge: 0dd0c8f7db03 c58ff643763c Author: Linus Torvalds Date: Sat Nov 30 16:41:55 2019 -0800 Merge tag 'kgdb-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb updates from Daniel Thompson: "The major change here is the work from Douglas Anderson that reworks the way kdb stack traces are handled on SMP systems. The effect is to allow all CPUs to issue their stack trace which reduced the need for architecture specific code to support stack tracing. Also included are general of clean ups from Doug and myself: - Remove some unused variables or arguments. - Tidy up the kdb escape handling code and fix a couple of odd corner cases. - Better ignore escape characters that do not form part of an escape sequence. This mostly benefits vi users since they are most likely to press escape as a nervous habit but it won't harm anyone else" * tag 'kgdb-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kdb: Tweak escape handling for vi users kdb: Improve handling of characters from different input sources kdb: Remove special case logic from kdb_read() kdb: Simplify code to fetch characters from console kdb: Tidy up code to handle escape sequences kdb: Avoid array subscript warnings on non-SMP builds kdb: Fix stack crawling on 'running' CPUs that aren't the master kdb: Fix "btc " crash if the CPU didn't round up kdb: Remove unused "argcount" param from kdb_bt1(); make btaprompt bool kgdb: Remove unused DCPU_SSTEP definition commit 0dd0c8f7db036b9aa61b70fa9fac423493cd5d17 Merge: 8fa91bfa9ba4 7a1323b5dfe4 Author: Linus Torvalds Date: Sat Nov 30 14:50:51 2019 -0800 Merge tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V updates from Sasha Levin: - support for new VMBus protocols (Andrea Parri) - hibernation support (Dexuan Cui) - latency testing framework (Branden Bonaby) - decoupling Hyper-V page size from guest page size (Himadri Pandya) * tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (22 commits) Drivers: hv: vmbus: Fix crash handler reset of Hyper-V synic drivers/hv: Replace binary semaphore with mutex drivers: iommu: hyperv: Make HYPERV_IOMMU only available on x86 HID: hyperv: Add the support of hibernation hv_balloon: Add the support of hibernation x86/hyperv: Implement hv_is_hibernation_supported() Drivers: hv: balloon: Remove dependencies on guest page size Drivers: hv: vmbus: Remove dependencies on guest page size x86: hv: Add function to allocate zeroed page for Hyper-V Drivers: hv: util: Specify ring buffer size using Hyper-V page size Drivers: hv: Specify receive buffer size using Hyper-V page size tools: hv: add vmbus testing tool drivers: hv: vmbus: Introduce latency testing video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host hv_netvsc: Add the support of hibernation hv_sock: Add the support of hibernation video: hyperv_fb: Add the support of hibernation scsi: storvsc: Add the support of hibernation Drivers: hv: vmbus: Add module parameter to cap the VMBus version ... commit 8fa91bfa9ba4060347c45673f8ee990a2a1d760e Merge: 738d5fabff86 5a43b87b3c62 Author: Linus Torvalds Date: Sat Nov 30 14:49:08 2019 -0800 Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fix from Borislav Petkov: "One urgent fix for the thermal throttling machinery: the recent change reworking the thermal notifications forgot to mask out read-only and reserved bits in the thermal status MSRs, leading to exceptions while writing those MSRs. The fix takes care of masking out those bits first" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce/therm_throt: Mask out read-only and reserved MSR bits commit 738d5fabff864a6b4a8b67f589a8f28f6cca808f Merge: 7794b1d4185e e9c837c6ab07 Author: Linus Torvalds Date: Sat Nov 30 14:45:32 2019 -0800 Merge branch 'parisc-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Just trivial small updates: An assembler register optimization in the inlined networking checksum functions, a compiler warning fix and don't unneccesary print a runtime warning on machines which wouldn't be affected anyway" * 'parisc-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Avoid spurious inequivalent alias kernel error messages kexec: Fix pointer-to-int-cast warnings parisc: Do not hardcode registers in checksum functions commit 7794b1d4185e2587af46435e3e2f6696dae314c7 Merge: 9dd0013824fc 2807273f5e88 Author: Linus Torvalds Date: Sat Nov 30 14:35:43 2019 -0800 Merge tag 'powerpc-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Highlights: - Infrastructure for secure boot on some bare metal Power9 machines. The firmware support is still in development, so the code here won't actually activate secure boot on any existing systems. - A change to xmon (our crash handler / pseudo-debugger) to restrict it to read-only mode when the kernel is lockdown'ed, otherwise it's trivial to drop into xmon and modify kernel data, such as the lockdown state. - Support for KASLR on 32-bit BookE machines (Freescale / NXP). - Fixes for our flush_icache_range() and __kernel_sync_dicache() (VDSO) to work with memory ranges >4GB. - Some reworks of the pseries CMM (Cooperative Memory Management) driver to make it behave more like other balloon drivers and enable some cleanups of generic mm code. - A series of fixes to our hardware breakpoint support to properly handle unaligned watchpoint addresses. Plus a bunch of other smaller improvements, fixes and cleanups. Thanks to: Alastair D'Silva, Andrew Donnellan, Aneesh Kumar K.V, Anthony Steinhauser, Cédric Le Goater, Chris Packham, Chris Smart, Christophe Leroy, Christopher M. Riedl, Christoph Hellwig, Claudio Carvalho, Daniel Axtens, David Hildenbrand, Deb McLemore, Diana Craciun, Eric Richter, Geert Uytterhoeven, Greg Kroah-Hartman, Greg Kurz, Gustavo L. F. Walbon, Hari Bathini, Harish, Jason Yan, Krzysztof Kozlowski, Leonardo Bras, Mathieu Malaterre, Mauro S. M. Rodrigues, Michal Suchanek, Mimi Zohar, Nathan Chancellor, Nathan Lynch, Nayna Jain, Nick Desaulniers, Oliver O'Halloran, Qian Cai, Rasmus Villemoes, Ravi Bangoria, Sam Bobroff, Santosh Sivaraj, Scott Wood, Thomas Huth, Tyrel Datwyler, Vaibhav Jain, Valentin Longchamp, YueHaibing" * tag 'powerpc-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (144 commits) powerpc/fixmap: fix crash with HIGHMEM x86/efi: remove unused variables powerpc: Define arch_is_kernel_initmem_freed() for lockdep powerpc/prom_init: Use -ffreestanding to avoid a reference to bcmp powerpc: Avoid clang warnings around setjmp and longjmp powerpc: Don't add -mabi= flags when building with Clang powerpc: Fix Kconfig indentation powerpc/fixmap: don't clear fixmap area in paging_init() selftests/powerpc: spectre_v2 test must be built 64-bit powerpc/powernv: Disable native PCIe port management powerpc/kexec: Move kexec files into a dedicated subdir. powerpc/32: Split kexec low level code out of misc_32.S powerpc/sysdev: drop simple gpio powerpc/83xx: map IMMR with a BAT. powerpc/32s: automatically allocate BAT in setbat() powerpc/ioremap: warn on early use of ioremap() powerpc: Add support for GENERIC_EARLY_IOREMAP powerpc/fixmap: Use __fix_to_virt() instead of fix_to_virt() powerpc/8xx: use the fixmapped IMMR in cpm_reset() powerpc/8xx: add __init to cpm1 init functions ... commit 9dd0013824fc29e618db7a5b0bac5545285b946a Merge: 2309d0768237 1a70cf0e7ee6 Author: Linus Torvalds Date: Sat Nov 30 14:29:19 2019 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - improve ARM implementation of pfn_valid() - various sparse fixes - spelling fixes - add further ARMv8 debug architecture versions - clang fix for decompressor - update to generic vDSO - remove Brahma-B53 from spectre hardening - initialise broadcast hrtimer device - use correct nm executable in decompressor - remove old mcount et.al. * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (26 commits) ARM: 8940/1: ftrace: remove mcount(),ftrace_caller_old() and ftrace_call_old() ARM: 8939/1: kbuild: use correct nm executable ARM: 8938/1: kernel: initialize broadcast hrtimer based clock event device ARM: 8937/1: spectre-v2: remove Brahma-B53 from hardening ARM: 8933/1: replace Sun/Solaris style flag on section directive ARM: 8932/1: Add clock_gettime64 entry point ARM: 8931/1: Add clock_getres entry point ARM: 8930/1: Add support for generic vDSO ARM: 8929/1: use APSR_nzcv instead of r15 as mrc operand ARM: 8927/1: ARM/hw_breakpoint: add more ARMv8 debug architecture versions support ARM: 8918/2: only build return_address() if needed ARM: 8928/1: ARM_ERRATA_775420: Spelling s/date/data/ ARM: 8925/1: tcm: include for missing declarations ARM: 8924/1: tcm: make dtcm_end and itcm_end static ARM: 8923/1: mm: include for vga_base ARM: 8922/1: parse_dt_topology() rate is pointer to __be32 ARM: 8920/1: share get_signal_page from signal.c to process.c ARM: 8919/1: make unexported functions static ARM: 8917/1: mm: include ARM: 8916/1: mm: make set_section_perms() static ... commit 2309d0768237476c3144aa296264ad9e19598461 Merge: 6a965666b7e7 a7f96fce201c Author: Linus Torvalds Date: Sat Nov 30 14:28:11 2019 -0800 Merge tag 'nds32-for-linus-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux Pull nds32 updates from Greentime Hu: - code clean up - add a nds32 maintainer * tag 'nds32-for-linus-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux: MAINTAINERS: add nds32 maintainer nds32: Move static keyword to the front of declaration nds32: Fix typo in Kconfig.cpu nds32: remove unneeded clean-files for DTB commit 6a965666b7e7475c2f8c8e724703db58b8a8a445 Merge: 32ef9553635a 3c0edea9b29f Author: Linus Torvalds Date: Sat Nov 30 14:12:13 2019 -0800 Merge tag 'notifications-pipe-prep-20191115' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull pipe rework from David Howells: "This is my set of preparatory patches for building a general notification queue on top of pipes. It makes a number of significant changes: - It removes the nr_exclusive argument from __wake_up_sync_key() as this is always 1. This prepares for the next step: - Adds wake_up_interruptible_sync_poll_locked() so that poll can be woken up from a function that's holding the poll waitqueue spinlock. - Change the pipe buffer ring to be managed in terms of unbounded head and tail indices rather than bounded index and length. This means that reading the pipe only needs to modify one index, not two. - A selection of helper functions are provided to query the state of the pipe buffer, plus a couple to apply updates to the pipe indices. - The pipe ring is allowed to have kernel-reserved slots. This allows many notification messages to be spliced in by the kernel without allowing userspace to pin too many pages if it writes to the same pipe. - Advance the head and tail indices inside the pipe waitqueue lock and use wake_up_interruptible_sync_poll_locked() to poke poll without having to take the lock twice. - Rearrange pipe_write() to preallocate the buffer it is going to write into and then drop the spinlock. This allows kernel notifications to then be added the ring whilst it is filling the buffer it allocated. The read side is stalled because the pipe mutex is still held. - Don't wake up readers on a pipe if there was already data in it when we added more. - Don't wake up writers on a pipe if the ring wasn't full before we removed a buffer" * tag 'notifications-pipe-prep-20191115' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: pipe: Remove sync on wake_ups pipe: Increase the writer-wakeup threshold to reduce context-switch count pipe: Check for ring full inside of the spinlock in pipe_write() pipe: Remove redundant wakeup from pipe_write() pipe: Rearrange sequence in pipe_write() to preallocate slot pipe: Conditionalise wakeup in pipe_read() pipe: Advance tail pointer inside of wait spinlock in pipe_read() pipe: Allow pipes to have kernel-reserved slots pipe: Use head and tail pointers for the ring, not cursor and length Add wake_up_interruptible_sync_poll_locked() Remove the nr_exclusive argument from __wake_up_sync_key() pipe: Reduce #inclusion of pipe_fs_i.h commit 9bd19c63a4bcfa0fd18f3bc0de30675fe2addea6 Author: Randy Dunlap Date: Thu Nov 28 14:17:59 2019 -0800 net: emulex: benet: indent a Kconfig depends continuation line Indent a Kconfig continuation line to improve readability. Signed-off-by: Randy Dunlap Cc: Sathya Perla Cc: Ajit Khaparde Cc: Sriharsha Basavapatna Cc: Somnath Kotur Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit 408469d31e9106878d2b3e428dcca9984664dfc9 Author: Jiri Pirko Date: Thu Nov 28 13:38:57 2019 +0100 selftests: forwarding: fix race between packet receive and tc check It is possible that tc stats get checked before the packet we check for actually arrived into the interface and accounted for. Fix it by checking for the expected result in a loop until timeout is reached (by default 1 second). Fixes: 07e5c75184a1 ("selftests: forwarding: Introduce tc flower matching tests") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 466e16f0920f3ffdfa49713212fa334fb3dc08f1 Author: NeilBrown Date: Thu Nov 28 13:56:43 2019 +1100 nfsd: check for EBUSY from vfs_rmdir/vfs_unink. vfs_rmdir and vfs_unlink can return -EBUSY if the target is a mountpoint. This currently gets passed to nfserrno() by nfsd_unlink(), and that results in a WARNing, which is not user-friendly. Possibly the best NFSv4 error is NFS4ERR_FILE_OPEN, because there is a sense in which the object is currently in use by some other task. The Linux NFSv4 client will map this back to EBUSY, which is an added benefit. For NFSv3, the best we can do is probably NFS3ERR_ACCES, which isn't true, but is not less true than the other options. Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields commit a25e3726b32c746c0098125d4c7463bb84df72bb Author: Trond Myklebust Date: Wed Nov 27 17:05:51 2019 -0500 nfsd: Ensure CLONE persists data and metadata changes to the target file The NFSv4.2 CLONE operation has implicit persistence requirements on the target file, since there is no protocol requirement that the client issue a separate operation to persist data. For that reason, we should call vfs_fsync_range() on the destination file after a successful call to vfs_clone_file_range(). Fixes: ffa0160a1039 ("nfsd: implement the NFSv4.2 CLONE operation") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: J. Bruce Fields commit 32ef9553635ab1236c33951a8bd9b5af1c3b1646 Merge: b8072d5b3cdd 67e6b4ef8496 Author: Linus Torvalds Date: Sat Nov 30 11:34:33 2019 -0800 Merge tag 'fsnotify_for_v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "Three fsnotify cleanups" * tag 'fsnotify_for_v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: Add git tree reference to MAINTAINERS fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument fsnotify: move declaration of fsnotify_mark_connector_cachep to fsnotify.h commit b8072d5b3cdd596c999f6e3f312ce7e4858ca356 Merge: e2d73c302b6b 545886fead7a Author: Linus Torvalds Date: Sat Nov 30 11:16:07 2019 -0800 Merge tag 'for_v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2, quota, reiserfs cleanups and fixes from Jan Kara: - Refactor the quota on/off kernel internal interfaces (mostly for ubifs quota support as ubifs does not want to have inodes holding quota information) - A few other small quota fixes and cleanups - Various small ext2 fixes and cleanups - Reiserfs xattr fix and one cleanup * tag 'for_v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (28 commits) ext2: code cleanup for descriptor_loc() fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long ext2: fix improper function comment ext2: code cleanup for ext2_try_to_allocate() ext2: skip unnecessary operations in ext2_try_to_allocate() ext2: Simplify initialization in ext2_try_to_allocate() ext2: code cleanup by calling ext2_group_last_block_no() ext2: introduce new helper ext2_group_last_block_no() reiserfs: replace open-coded atomic_dec_and_mutex_lock() ext2: check err when partial != NULL quota: Handle quotas without quota inodes in dquot_get_state() quota: Make dquot_disable() work without quota inodes quota: Drop dquot_enable() fs: Use dquot_load_quota_inode() from filesystems quota: Rename vfs_load_quota_inode() to dquot_load_quota_inode() quota: Simplify dquot_resume() quota: Factor out setup of quota inode quota: Check that quota is not dirty before release quota: fix livelock in dquot_writeback_dquots ext2: don't set *count in the case of failure in ext2_try_to_allocate() ... commit e2d73c302b6b0a8379a679120590073b813d5e7f Merge: 21b26d267958 3dcb5fa23e16 Author: Linus Torvalds Date: Sat Nov 30 11:13:33 2019 -0800 Merge tag 'erofs-for-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "No major kernel updates for this round since I'm fully diving into LZMA algorithm internals now to provide high CR XZ algorihm support. That needs more work and time for me to get a better compression time. Summary: - Introduce superblock checksum support - Set iowait when waiting I/O for sync decompression path - Several code cleanups" * tag 'erofs-for-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: remove unnecessary output in erofs_show_options() erofs: drop all vle annotations for runtime names erofs: support superblock checksum erofs: set iowait for sync decompression erofs: clean up decompress queue stuffs erofs: get rid of __stagingpage_alloc helper erofs: remove dead code since managed cache is now built-in erofs: clean up collection handling routines commit 21b26d2679584c6a60e861aa3e5ca09a6bab0633 Merge: 8f45533e9db9 68464b88cc0a Author: Linus Torvalds Date: Sat Nov 30 11:10:39 2019 -0800 Merge tag '5.5-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "Various smb3 fixes (including 12 for stable) and also features (addition of multichannel support)" * tag '5.5-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: (41 commits) CIFS: fix a white space issue in cifs_get_inode_info() cifs: update internal module version number cifs: Always update signing key of first channel cifs: Fix retrieval of DFS referrals in cifs_mount() cifs: Fix potential softlockups while refreshing DFS cache cifs: Fix lookup of root ses in DFS referral cache cifs: Fix use-after-free bug in cifs_reconnect() cifs: dump channel info in DebugData smb3: dump in_send and num_waiters stats counters by default cifs: try harder to open new channels CIFS: Properly process SMB3 lease breaks cifs: move cifsFileInfo_put logic into a work-queue cifs: try opening channels after mounting CIFS: refactor cifs_get_inode_info() cifs: switch servers depending on binding state cifs: add server param cifs: add multichannel mount options and data structs cifs: sort interface list by speed CIFS: Fix SMB2 oplock break processing cifs: don't use 'pre:' for MODULE_SOFTDEP ... commit 8f45533e9db917147066b24903a0d03a5adb50e1 Merge: 4a55d362ffe7 803e74be04b3 Author: Linus Torvalds Date: Sat Nov 30 11:02:30 2019 -0800 Merge tag 'f2fs-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've introduced fairly small number of patches as below. Enhancements: - improve the in-place-update IO flow - allocate segment to guarantee no GC for pinned files Bug fixes: - fix updatetime in lazytime mode - potential memory leak in f2fs_listxattr - record parent inode number in rename2 correctly - fix deadlock in f2fs_gc along with atomic writes - avoid needless data migration in GC" * tag 'f2fs-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: stop GC when the victim becomes fully valid f2fs: expose main_blkaddr in sysfs f2fs: choose hardlimit when softlimit is larger than hardlimit in f2fs_statfs_project() f2fs: Fix deadlock in f2fs_gc() context during atomic files handling f2fs: show f2fs instance in printk_ratelimited f2fs: fix potential overflow f2fs: fix to update dir's i_pino during cross_rename f2fs: support aligned pinned file f2fs: avoid kernel panic on corruption test f2fs: fix wrong description in document f2fs: cache global IPU bio f2fs: fix to avoid memory leakage in f2fs_listxattr f2fs: check total_segments from devices in raw_super f2fs: update multi-dev metadata in resize_fs f2fs: mark recovery flag correctly in read_raw_super_block() f2fs: fix to update time in lazytime mode commit 4a55d362ffe7caf099a01f6d2ed49a6ea03a4a88 Merge: 50b8b3f85a01 4fe171bb81b1 Author: Linus Torvalds Date: Sat Nov 30 10:57:22 2019 -0800 Merge tag 'afs-next-20191121' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS updates from David Howells: "Minor cleanups and fix: - Minor fix to make some debugging statements display information from the correct iov_iter. - Rename some members and variables to make things more obvious or consistent. - Provide a helper to wrap increments of the usage count on the afs_read struct. - Use scnprintf() to print into a stack buffer rather than sprintf(). - Remove some set but unused variables" * tag 'afs-next-20191121' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Remove set but not used variable 'ret' afs: Remove set but not used variables 'before', 'after' afs: xattr: use scnprintf afs: Introduce an afs_get_read() refcount helper afs: Rename desc -> req in afs_fetch_data() afs: Switch the naming of call->iter and call->_iter afs: Use call->_iter not &call->iter in debugging statements commit 50b8b3f85a01543fb82d3bb9bfe7d06659522c70 Merge: f112a2fd1f59 dfdeeb41fb08 Author: Linus Torvalds Date: Sat Nov 30 10:53:02 2019 -0800 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "This merge window saw the the following new featuers added to ext4: - Direct I/O via iomap (required the iomap-for-next branch from Darrick as a prereq). - Support for using dioread-nolock where the block size < page size. - Support for encryption for file systems where the block size < page size. - Rework of journal credits handling so a revoke-heavy workload will not cause the journal to run out of space. - Replace bit-spinlocks with spinlocks in jbd2 Also included were some bug fixes and cleanups, mostly to clean up corner cases from fuzzed file systems and error path handling" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (59 commits) ext4: work around deleting a file with i_nlink == 0 safely ext4: add more paranoia checking in ext4_expand_extra_isize handling jbd2: make jbd2_handle_buffer_credits() handle reserved handles ext4: fix a bug in ext4_wait_for_tail_page_commit ext4: bio_alloc with __GFP_DIRECT_RECLAIM never fails ext4: code cleanup for get_next_id ext4: fix leak of quota reservations ext4: remove unused variable warning in parse_options() ext4: Enable encryption for subpage-sized blocks fs/buffer.c: support fscrypt in block_read_full_page() ext4: Add error handling for io_end_vec struct allocation jbd2: Fine tune estimate of necessary descriptor blocks jbd2: Provide trace event for handle restarts ext4: Reserve revoke credits for freed blocks jbd2: Make credit checking more strict jbd2: Rename h_buffer_credits to h_total_credits jbd2: Reserve space for revoke descriptor blocks jbd2: Drop jbd2_space_needed() jbd2: Account descriptor blocks into t_outstanding_credits jbd2: Factor out common parts of stopping and restarting a handle ... commit f112a2fd1f5999c6029551f901952392d900cf99 Merge: 3b266a52d8d6 3253d9d09337 Author: Linus Torvalds Date: Sat Nov 30 10:48:24 2019 -0800 Merge tag 'vfs-5.5-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull splice fix from Darrick Wong: "Fix another place in the splice code where a pipe could ask a filesystem for a longer read than the pipe actually has free buffer space" * tag 'vfs-5.5-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: splice: only read in as much information as there is pipe buffer space commit d50264f1fef92967e2d2c9d91bdb05de214ddacf Author: Pablo Neira Ayuso Date: Fri Nov 29 10:07:01 2019 +0100 netfilter: nf_flow_table_offload: add IPv6 match description Add missing IPv6 matching description to flow_rule object. Fixes: 5c27d8d76ce8 ("netfilter: nf_flow_table_offload: add IPv6 support") Signed-off-by: Pablo Neira Ayuso commit c7c17e6a03e08860f7a40095643e72c24c3f896b Author: Florian Westphal Date: Thu Nov 28 13:25:48 2019 +0100 netfilter: conntrack: tell compiler to not inline nf_ct_resolve_clash At this time compiler inlines it, but this code will not be executed under normal conditions. Also, no inlining allows to use "nf_ct_resolve_clash%return" perf probe. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit dc4d3f2e12a6e8a22d13b0d648a6529e403b65a6 Author: Nathan Chancellor Date: Tue Nov 26 13:12:26 2019 -0700 netfilter: nf_flow_table_offload: Don't use offset uninitialized in flow_offload_port_{d,s}nat Clang warns (trimmed the second warning for brevity): ../net/netfilter/nf_flow_table_offload.c:342:2: warning: variable 'offset' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ ../net/netfilter/nf_flow_table_offload.c:346:57: note: uninitialized use occurs here flow_offload_mangle(entry, flow_offload_l4proto(flow), offset, ^~~~~~ ../net/netfilter/nf_flow_table_offload.c:331:12: note: initialize the variable 'offset' to silence this warning u32 offset; ^ = 0 Match what was done in the flow_offload_ipv{4,6}_{d,s}nat functions and just return in the default case, since port would also be uninitialized. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Link: https://github.com/ClangBuiltLinux/linux/issues/780 Signed-off-by: Nathan Chancellor Reported-by: kernelci.org bot Reviewed-by: Nick Desaulniers Signed-off-by: Pablo Neira Ayuso commit e052901991ae21e15851bfc89c682bfcb39a4dcf Author: wenxu Date: Wed Nov 20 13:12:22 2019 +0800 netfilter: nf_flow_table_offload: Fix block_cb tc_setup_type as TC_SETUP_CLSFLOWER Add/del/stats flows through block_cb call must set the tc_setup_type as TC_SETUP_CLSFLOWER. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit ee1bcfe01251e8958b53de45d2b0c85e09dd2719 Author: wenxu Date: Wed Nov 20 12:30:42 2019 +0800 netfilter: nf_flow_table_offload: Fix block setup as TC_SETUP_FT cmd Set up block through TC_SETUP_FT command. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 3b266a52d8d6e02ea6c1bb52c96342128e624554 Merge: aa32f1169148 419e9c38aa07 Author: Linus Torvalds Date: Sat Nov 30 10:44:49 2019 -0800 Merge tag 'iomap-5.5-merge-11' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap updates from Darrick Wong: "In this release, we hoisted as much of XFS' writeback code into iomap as was practicable, refactored the unshare file data function, added the ability to perform buffered io copy on write, and tweaked various parts of the directio implementation as needed to port ext4's directio code (that will be a separate pull). Summary: - Make iomap_dio_rw callers explicitly tell us if they want us to wait - Port the xfs writeback code to iomap to complete the buffered io library functions - Refactor the unshare code to share common pieces - Add support for performing copy on write with buffered writes - Other minor fixes - Fix unchecked return in iomap_bmap - Fix a type casting bug in a ternary statement in iomap_dio_bio_actor - Improve tracepoints for easier diagnostic ability - Fix pipe page leakage in directio reads" * tag 'iomap-5.5-merge-11' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (31 commits) iomap: Fix pipe page leakage during splicing iomap: trace iomap_appply results iomap: fix return value of iomap_dio_bio_actor on 32bit systems iomap: iomap_bmap should check iomap_apply return value iomap: Fix overflow in iomap_page_mkwrite fs/iomap: remove redundant check in iomap_dio_rw() iomap: use a srcmap for a read-modify-write I/O iomap: renumber IOMAP_HOLE to 0 iomap: use write_begin to read pages to unshare iomap: move the zeroing case out of iomap_read_page_sync iomap: ignore non-shared or non-data blocks in xfs_file_dirty iomap: always use AOP_FLAG_NOFS in iomap_write_begin iomap: remove the unused iomap argument to __iomap_write_end iomap: better document the IOMAP_F_* flags iomap: enhance writeback error message iomap: pass a struct page to iomap_finish_page_writeback iomap: cleanup iomap_ioend_compare iomap: move struct iomap_page out of iomap.h iomap: warn on inline maps in iomap_writepage_map iomap: lift the xfs writeback code to iomap ... commit e3cb40d4d80516a8f4e9afaebe4d672821a2c97b Author: Bjorn Andersson Date: Sat Nov 30 10:34:36 2019 -0800 Revert "dt-bindings: remoteproc: stm32: add wakeup-source" The DeviceTree binding document was converted to YAML in a patch that is being merged through the devicetree tree, as such this patch needs to be rewritten and is currently cause for a merge conflict. This reverts commit 14ea1d04ed0f7bae60951bdb8eeaa55cdbb26c73. Signed-off-by: Bjorn Andersson commit 14e54ab9143fa60794d13ea0a66c792a2046a8f3 Author: Dust Li Date: Thu Nov 28 14:29:09 2019 +0800 net: sched: fix `tc -s class show` no bstats on class with nolock subqueues When a classful qdisc's child qdisc has set the flag TCQ_F_CPUSTATS (pfifo_fast for example), the child qdisc's cpu_bstats should be passed to gnet_stats_copy_basic(), but many classful qdisc didn't do that. As a result, `tc -s class show dev DEV` always return 0 for bytes and packets in this case. Pass the child qdisc's cpu_bstats to gnet_stats_copy_basic() to fix this issue. The qstats also has this problem, but it has been fixed in 5dd431b6b9 ("net: sched: introduce and use qstats read...") and bstats still remains buggy. Fixes: 22e0f8b9322c ("net: sched: make bstats per cpu and estimator RCU safe") Signed-off-by: Dust Li Signed-off-by: Tony Lu Acked-by: Cong Wang Signed-off-by: David S. Miller commit aa32f1169148beb90d71494e2f2a1999ba7b5366 Merge: d5bb349dbbe2 93f4e735b6d9 Author: Linus Torvalds Date: Sat Nov 30 10:33:14 2019 -0800 Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull hmm updates from Jason Gunthorpe: "This is another round of bug fixing and cleanup. This time the focus is on the driver pattern to use mmu notifiers to monitor a VA range. This code is lifted out of many drivers and hmm_mirror directly into the mmu_notifier core and written using the best ideas from all the driver implementations. This removes many bugs from the drivers and has a very pleasing diffstat. More drivers can still be converted, but that is for another cycle. - A shared branch with RDMA reworking the RDMA ODP implementation - New mmu_interval_notifier API. This is focused on the use case of monitoring a VA and simplifies the process for drivers - A common seq-count locking scheme built into the mmu_interval_notifier API usable by drivers that call get_user_pages() or hmm_range_fault() with the VA range - Conversion of mlx5 ODP, hfi1, radeon, nouveau, AMD GPU, and Xen GntDev drivers to the new API. This deletes a lot of wonky driver code. - Two improvements for hmm_range_fault(), from testing done by Ralph" * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: mm/hmm: remove hmm_range_dma_map and hmm_range_dma_unmap mm/hmm: make full use of walk_page_range() xen/gntdev: use mmu_interval_notifier_insert mm/hmm: remove hmm_mirror and related drm/amdgpu: Use mmu_interval_notifier instead of hmm_mirror drm/amdgpu: Use mmu_interval_insert instead of hmm_mirror drm/amdgpu: Call find_vma under mmap_sem nouveau: use mmu_interval_notifier instead of hmm_mirror nouveau: use mmu_notifier directly for invalidate_range_start drm/radeon: use mmu_interval_notifier_insert RDMA/hfi1: Use mmu_interval_notifier_insert for user_exp_rcv RDMA/odp: Use mmu_interval_notifier_insert() mm/hmm: define the pre-processor related parts of hmm.h even if disabled mm/hmm: allow hmm_range to be used with a mmu_interval_notifier or hmm_mirror mm/mmu_notifier: add an interval tree notifier mm/mmu_notifier: define the header pre-processor parts even if disabled mm/hmm: allow snapshot of the special zero page commit 395eba7d0c122c650fb8b6ae8c6815cbfdc39ca9 Author: Grygorii Strashko Date: Fri Nov 29 19:58:09 2019 +0200 net: ethernet: ti: ale: ensure vlan/mdb deleted when no members The recently updated ALE APIs cpsw_ale_del_mcast() and cpsw_ale_del_vlan_modify() have an issue and will not delete ALE entry even if VLAN/mcast group has no more members. Hence fix it here and delete ALE entry if !port_mask. The issue affected only new cpsw switchdev driver. Fixes: e85c14370783 ("net: ethernet: ti: ale: modify vlan/mdb api for switchdev") Signed-off-by: Grygorii Strashko Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 5f9fc3325ef95398c363b9b7813a7e99d4d85d7d Author: YueHaibing Date: Wed Nov 27 21:27:00 2019 +0800 net/mlx5e: Fix build error without IPV6 If IPV6 is not set and CONFIG_MLX5_ESWITCH is y, building fails: drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c:322:5: error: redefinition of mlx5e_tc_tun_create_header_ipv6 int mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c:7:0: drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:67:1: note: previous definition of mlx5e_tc_tun_create_header_ipv6 was here mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use #ifdef to guard this, also move mlx5e_route_lookup_ipv6 to cleanup unused warning. Reported-by: Hulk Robot Fixes: e689e998e102 ("net/mlx5e: TC, Stub out ipv6 tun create header function") Signed-off-by: YueHaibing Acked-by: Saeed Mahameed Signed-off-by: David S. Miller commit d5bb349dbbe27537e90a03b9597deeb07723a86d Merge: 81b6b96475ac 0a6cad5df541 Author: Linus Torvalds Date: Sat Nov 30 09:38:11 2019 -0800 Merge tag 'drm-vmwgfx-coherent-2019-11-29' of git://anongit.freedesktop.org/drm/drm Pull drm coherent memory support for vmwgfx from Dave Airlie: "This is a separate pull for the mm pagewalking + drm/vmwgfx work Thomas did and you were involved in, I've left it separate in case you don't feel as comfortable with it as the other stuff. It has mm acks/r-b in the right places from what I can see" * tag 'drm-vmwgfx-coherent-2019-11-29' of git://anongit.freedesktop.org/drm/drm: drm/vmwgfx: Add surface dirty-tracking callbacks drm/vmwgfx: Implement an infrastructure for read-coherent resources drm/vmwgfx: Use an RBtree instead of linked list for MOB resources drm/vmwgfx: Implement an infrastructure for write-coherent resources mm: Add write-protect and clean utilities for address space ranges mm: Add a walk_page_mapping() function to the pagewalk code mm: pagewalk: Take the pagetable lock in walk_pte_range() mm: Remove BUG_ON mmap_sem not held from xxx_trans_huge_lock() drm/ttm: Convert vm callbacks to helpers drm/ttm: Remove explicit typecasts of vm_private_data commit 7b0b8cfd261c569177d64d6e9b1800fbe412fd65 Author: Borislav Petkov Date: Sat Nov 30 16:00:53 2019 +0100 x86/ioperm: Save an indentation level in tss_update_io_bitmap() ... for better readability. No functional changes. [ Minor edit. ] Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar commit aa137a6d302b5989ed205b7dfb7fe40a8851babc Author: Miroslav Benes Date: Wed Nov 6 10:56:01 2019 +0100 s390/livepatch: Implement reliable stack tracing for the consistency model The livepatch consistency model requires reliable stack tracing architecture support in order to work properly. In order to achieve this, two main issues have to be solved. First, reliable and consistent call chain backtracing has to be ensured. Second, the unwinder needs to be able to detect stack corruptions and return errors. The "zSeries ELF Application Binary Interface Supplement" says: "The stack pointer points to the first word of the lowest allocated stack frame. If the "back chain" is implemented this word will point to the previously allocated stack frame (towards higher addresses), except for the first stack frame, which shall have a back chain of zero (NULL). The stack shall grow downwards, in other words towards lower addresses." "back chain" is optional. GCC option -mbackchain enables it. Quoting Martin Schwidefsky [1]: "The compiler is called with the -mbackchain option, all normal C function will store the backchain in the function prologue. All functions written in assembler code should do the same, if you find one that does not we should fix that. The end result is that a task that *voluntarily* called schedule() should have a proper backchain at all times. Dependent on the use case this may or may not be enough. Asynchronous interrupts may stop the CPU at the beginning of a function, if kernel preemption is enabled we can end up with a broken backchain. The production kernels for IBM Z are all compiled *without* kernel preemption. So yes, we might get away without the objtool support. On a side-note, we do have a line item to implement the ORC unwinder for the kernel, that includes the objtool support. Once we have that we can drop the -mbackchain option for the kernel build. That gives us a nice little performance benefit. I hope that the change from backchain to the ORC unwinder will not be too hard to implement in the livepatch tools." Since -mbackchain is enabled by default when the kernel is compiled, the call chain backtracing should be currently ensured and objtool should not be necessary for livepatch purposes. Regarding the second issue, stack corruptions and non-reliable states have to be recognized by the unwinder. Mainly it means to detect preemption or page faults, the end of the task stack must be reached, return addresses must be valid text addresses and hacks like function graph tracing and kretprobes must be properly detected. Unwinding a running task's stack is not a problem, because there is a livepatch requirement that every checked task is blocked, except for the current task. Due to that, the implementation can be much simpler compared to the existing non-reliable infrastructure. We can consider a task's kernel/thread stack only and skip the other stacks. [1] 20180912121106.31ffa97c@mschwideX1 [not archived on lore.kernel.org] Link: https://lkml.kernel.org/r/20191106095601.29986-5-mbenes@suse.cz Reviewed-by: Heiko Carstens Tested-by: Miroslav Benes Signed-off-by: Miroslav Benes Signed-off-by: Vasily Gorbik commit be2d11b2a1e86586ace9f6839a159b170b00f2b3 Author: Miroslav Benes Date: Wed Nov 27 19:35:19 2019 +0100 s390/unwind: add stack pointer alignment sanity checks ABI requires SP to be aligned 8 bytes, report unwinding error otherwise. Link: https://lkml.kernel.org/r/20191106095601.29986-5-mbenes@suse.cz Reviewed-by: Heiko Carstens Tested-by: Miroslav Benes Signed-off-by: Miroslav Benes Signed-off-by: Vasily Gorbik commit bf018ee644897d7982e1b8dd8b15e97db6e1a4da Author: Vasily Gorbik Date: Wed Nov 27 18:12:04 2019 +0100 s390/unwind: filter out unreliable bogus %r14 Currently unwinder unconditionally returns %r14 from the first frame pointed by %r15 from pt_regs. A task could be interrupted when a function already allocated this frame (if it needs it) for its callees or to store local variables. In that case this frame would contain random values from stack or values stored there by a callee. As we are only interested in %r14 to get potential return address, skip bogus return addresses which doesn't belong to kernel text. This helps to avoid duplicating filtering logic in unwider users, most of which use unwind_get_return_address() and would choke on bogus 0 address returned by it otherwise. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 222ee9087a730b1df08d09baed0d03626e67600f Author: Vasily Gorbik Date: Wed Nov 27 17:37:51 2019 +0100 s390/unwind: start unwinding from reliable state A comment in arch/s390/include/asm/unwind.h says: > If 'first_frame' is not zero unwind_start skips unwind frames until it > reaches the specified stack pointer. > The end of the unwinding is indicated with unwind_done, this can be true > right after unwind_start, e.g. with first_frame!=0 that can not be found. > unwind_next_frame skips to the next frame. > Once the unwind is completed unwind_error() can be used to check if there > has been a situation where the unwinder could not correctly understand > the tasks call chain. With this change backchain unwinder now comply with behaviour described. As well as matches orc unwinder implementation. Now unwinder starts from reliable state, i.e. __unwind_start own stack frame is taken or stack frame generated by __switch_to (ksp) - both known to be valid. In case of pt_regs %r15 is better match for pt_regs psw, than sometimes random "sp" caller passed. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit de6921ccbd0fb2882a1f615a6d3cdfbdcd64532c Author: Vasily Gorbik Date: Mon Nov 25 14:07:40 2019 +0100 s390/test_unwind: add program check context tests Add unwinding from program check handler tests. Unwinder should be able to unwind through pt_regs stored by program check handler on task stack. Signed-off-by: Vasily Gorbik commit e7409367abe54ad04868552b9d9fe4a56acc753d Author: Vasily Gorbik Date: Fri Nov 22 19:18:58 2019 +0100 s390/test_unwind: add irq context tests Add unwinding from irq context tests. Unwinder should be able to unwind through irq stack to task stack up to task pt_regs. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 0610154650f161d56a0bef0d9678ae1de7360019 Author: Vasily Gorbik Date: Fri Nov 22 18:52:40 2019 +0100 s390/test_unwind: print verbose unwinding results Add stack name, sp and reliable information into test unwinding results. Also consider ip outside of kernel text as failure if the state is reported reliable. Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7868249fbbc8125b82b83d99d33b23897ae7d9ab Author: Vasily Gorbik Date: Fri Nov 22 18:22:06 2019 +0100 s390/test_unwind: add CALL_ON_STACK tests Add CALL_ON_STACK helper testing. Tests make sure that we can unwind from switched stack to original one up to task pt_regs (nodat -> task stack). UWM_SWITCH_STACK could not be used together with UWM_THREAD because get_stack_info explicitly restricts unwinding to task stack if task != current. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4ac24c092b4eef69b2436ee4d478500dc886e8b5 Author: Vasily Gorbik Date: Mon Nov 25 13:34:59 2019 +0100 s390: fix register clobbering in CALL_ON_STACK CALL_ON_STACK defines and initializes register variables. Inline assembly which follows might trigger compiler to generate memory access for "stack" argument (e.g. in case of S390_lowcore.nodat_stack). This memory access produces a function call under kasan with outline instrumentation which clobbers registers. Switch "stack" argument in CALL_ON_STACK helper to use memory reference constraint and perform load instead. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f44fa79b104b56d53d33ae43e69bab98b63d4783 Author: Vasily Gorbik Date: Fri Nov 22 17:37:50 2019 +0100 s390/test_unwind: require that unwinding ended successfully Currently unwinder test passes if unwinding results contain unwindme_func2 and unwindme_func1 functions. Now that unwinder reports success upon reaching task pt_regs, check that unwinding ended successfully in every test. Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit badbf39790798283f2424828e7b7bec3962f1e02 Author: Ilya Leoshkevich Date: Thu Oct 17 15:09:08 2019 +0200 s390/unwind: add a test for the internal API unwind_for_each_frame can take at least 8 different sets of parameters. Add a test to make sure they all are handled in a sane way. Reviewed-by: Heiko Carstens Signed-off-by: Ilya Leoshkevich Co-developed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit adcfb8cdc910bdd0b5d52d2ba88103af93dc43d3 Author: Vasily Gorbik Date: Tue Nov 26 17:40:04 2019 +0100 s390/unwind: always inline get_stack_pointer Always inline get_stack_pointer() to avoid potential problems due to compiler inlining decisions, i.e. getting stack pointer of get_stack_pointer() itself which is later reused. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d497b7ec836d2c900993f1c43b2ddff5f8a6b129 Author: Niklas Schnelle Date: Thu Nov 28 09:31:52 2019 +0100 s390/pci: add error message on device number limit The config option CONFIG_PCI_NR_FUNCTIONS sets a limit on the number of PCI functions we can support. Previously on reaching this limit there was no indication why newly attached devices are not recognized by Linux which could be quite confusing. Thus this patch adds a pr_err() for this case. Reviewed-by: Peter Oberparleiter Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit 794b8846dcdc0c6e23bbf4e5283415cab0caa9ac Author: Niklas Schnelle Date: Thu Nov 28 09:30:00 2019 +0100 s390/pci: add error message for UID collision When UID checking was turned off during runtime in the underlying hypervisor, a PCI device may be attached with the same UID. This is already detected but happens silently. Add an error message so it can more easily be understood why a device was not added. Reviewed-by: Peter Oberparleiter Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit 247f265fa502e7b17a0cb0cc330e055a36aafce4 Author: Thomas Richter Date: Fri Nov 22 16:43:15 2019 +0100 s390/cpum_sf: Check for SDBT and SDB consistency Each SBDT is located at a 4KB page and contains 512 entries. Each entry of a SDBT points to a SDB, a 4KB page containing sampled data. The last entry is a link to another SDBT page. When an event is created the function sequence executed is: __hw_perf_event_init() +--> allocate_buffers() +--> realloc_sampling_buffers() +---> alloc_sample_data_block() Both functions realloc_sampling_buffers() and alloc_sample_data_block() allocate pages and the allocation can fail. This is handled correctly and all allocated pages are freed and error -ENOMEM is returned to the top calling function. Finally the event is not created. Once the event has been created, the amount of initially allocated SDBT and SDB can be too low. This is detected during measurement interrupt handling, where the amount of lost samples is calculated. If the number of lost samples is too high considering sampling frequency and already allocated SBDs, the number of SDBs is enlarged during the next execution of cpumsf_pmu_enable(). If more SBDs need to be allocated, functions realloc_sampling_buffers() +---> alloc-sample_data_block() are called to allocate more pages. Page allocation may fail and the returned error is ignored. A SDBT and SDB setup already exists. However the modified SDBTs and SDBs might end up in a situation where the first entry of an SDBT does not point to an SDB, but another SDBT, basicly an SBDT without payload. This can not be handled by the interrupt handler, where an SDBT must have at least one entry pointing to an SBD. Add a check to avoid SDBTs with out payload (SDBs) when enlarging the buffer setup. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit 7dd6b199df46e871e6e0d0cd7e4f71dc07dfd53c Author: Thomas Richter Date: Fri Nov 22 15:29:54 2019 +0100 s390/cpum_sf: Use TEAR_REG macro consistantly The macro TEAR_REG() saves the last used SDBT address in the perf_hw_event structure. This is also done by function hw_reset_registers() which is a one-liner and simply uses macro TEAR_REG(). Remove function hw_reset_registers(), which is only used one time and use macro TEAR_REG() instead. This macro is used throughout the code anyway. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit c17a7c6ee8177e0da998784c06f37fc093507c5b Author: Thomas Richter Date: Fri Nov 22 13:42:55 2019 +0100 s390/cpum_sf: Remove unnecessary check for pending SDBs In interrupt handling the function extend_sampling_buffer() is called after checking for a possibly extension. This check is not necessary as the called function itself performs this check again. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit 532da3de70b207be2b98cd5fb966e3915c8872c3 Author: Thomas Richter Date: Thu Nov 21 15:46:02 2019 +0100 s390/cpum_sf: Replace function name in debug statements Replace hard coded function names in debug statements by the "%s ...", __func__ construct suggested by checkpatch.pl script. Use consistent debug print format of the form variable blank value. Also add leading 0x for all hex values. Print allocated page addresses consistantly as hex numbers with leading 0x. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit a9f2f6865d784477e1c7b59269d3a384abafd9ca Author: Gerald Schaefer Date: Tue Nov 19 12:30:53 2019 +0100 s390/kaslr: store KASLR offset for early dumps The KASLR offset is added to vmcoreinfo in arch_crash_save_vmcoreinfo(), so that it can be found by crash when processing kernel dumps. However, arch_crash_save_vmcoreinfo() is called during a subsys_initcall, so if the kernel crashes before that, we have no vmcoreinfo and no KASLR offset. Fix this by storing the KASLR offset in the lowcore, where the vmcore_info pointer will be stored, and where it can be found by crash. In order to make it distinguishable from a real vmcore_info pointer, mark it as uneven (KASLR offset itself is aligned to THREAD_SIZE). When arch_crash_save_vmcoreinfo() stores the real vmcore_info pointer in the lowcore, it overwrites the KASLR offset. At that point, the KASLR offset is not yet added to vmcoreinfo, so we also need to move the mem_assign_absolute() behind the vmcoreinfo_append_str(). Fixes: b2d24b97b2a9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)") Cc: # v5.2+ Signed-off-by: Gerald Schaefer Signed-off-by: Vasily Gorbik commit e76e69611e944ecc38aaf8fe3a7bebdc3c5daf84 Author: Vasily Gorbik Date: Fri Nov 22 16:49:13 2019 +0100 s390/unwind: stop gracefully at task pt_regs Consider reaching task pt_regs graceful unwinder termination. Task pt_regs itself never contains a valid state to which a task might return within the kernel context (user task pt_regs is a special case). Since we already avoid printing user task pt_regs and in most cases we don't even bother filling task pt_regs psw and r15 with something reasonable simply skip task pt_regs altogether. With this change unwind_error() now accurately represent whether unwinder reached task pt_regs successfully or failed along the way. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit cb7948e8c3f18f7ff0ab7d0fa1e6b108d938cdd6 Author: Vasily Gorbik Date: Fri Nov 22 17:15:35 2019 +0100 s390/head64: correct init_task stack setup Add missing allocation of pt_regs at the bottom of the stack. This makes it consistent with other stack setup cases and also what stack unwinder expects. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 97806dfb6f3838ee4b7bc69e6f160d83eadbc74a Author: Vasily Gorbik Date: Fri Nov 22 15:58:42 2019 +0100 s390/unwind: make reuse_sp default when unwinding pt_regs Currently unwinder yields 2 entries when pt_regs are met: sp="address of pt_regs itself" ip=pt_regs->psw sp=pt_regs->gprs[15] ip="r14 from stack frame pointed by pt_regs->gprs[15]" And neither of those 2 states (combination of sp and ip) ever happened. reuse_sp has been introduced by commit a1d863ac3e10 ("s390/unwind: fix mixing regs and sp"). reuse_sp=true makes unwinder keen to produce the following result, when pt_regs are given (as an arg to unwind_start): sp=pt_regs->gprs[15] ip=pt_regs->psw sp=pt_regs->gprs[15] ip="r14 from stack frame pointed by pt_regs->gprs[15]" The first state is an actual state in which a task was when pt_regs were collected. The second state is marked unreliable and is for debugging purposes to cover the case when a task has been interrupted in between stack frame allocation and writing back_chain - in this case r14 might show an actual caller. Make unwinder behaviour enabled via reuse_sp=true default and drop the special case handling. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 67f5593419878798bb306632cdca0698a2dd3cbd Author: Vasily Gorbik Date: Fri Nov 22 15:53:30 2019 +0100 s390/unwind: report an error if pt_regs are not on stack If unwinder is looking at pt_regs which is not on stack then something went wrong and an error has to be reported rather than successful unwinding termination. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7bcaad1f9fac889f5fcd1a383acf7e00d006da41 Author: Vasily Gorbik Date: Fri Nov 22 13:12:57 2019 +0100 s390: avoid misusing CALL_ON_STACK for task stack setup CALL_ON_STACK is intended to be used for temporary stack switching with potential return to the caller. When CALL_ON_STACK is misused to switch from nodat stack to task stack back_chain information would later lead stack unwinder from task stack into (per cpu) nodat stack which is reused for other purposes. This would yield confusing unwinding result or errors. To avoid that introduce CALL_ON_STACK_NORETURN to be used instead. It makes sure that back_chain is zeroed and unwinder finishes gracefully ending up at task pt_regs. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7579425777c0d802237e0d59ae395e8cf60723e1 Author: Vasily Gorbik Date: Fri Nov 22 12:47:52 2019 +0100 s390: correct CALL_ON_STACK back_chain saving Currently CALL_ON_STACK saves r15 as back_chain in the first stack frame of the stack we about to switch to. But if a function which uses CALL_ON_STACK calls other function it allocates a stack frame for a callee. In this case r15 is pointing to a callee stack frame and not a stack frame of function itself. This results in dummy unwinding entry with random sp and ip values. Introduce and utilize current_frame_address macro to get an address of actual function stack frame. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 103b4cca60d2c8c51f1290cc984b7046ccb8b46d Author: Vasily Gorbik Date: Fri Nov 22 12:35:34 2019 +0100 s390/unwind: unify task is current checks Avoid mixture of task == NULL and task == current meaning the same thing and simply always initialize task with current in unwind_start. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7f28dad395243c5026d649136823bbc40029a828 Author: Vasily Gorbik Date: Fri Nov 22 12:19:16 2019 +0100 s390: disable preemption when switching to nodat stack with CALL_ON_STACK Make sure preemption is disabled when temporary switching to nodat stack with CALL_ON_STACK helper, because nodat stack is per cpu. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c2e06e15ad92bad94b54df257c683f7e715238a1 Author: Vasily Gorbik Date: Fri Nov 22 12:08:44 2019 +0100 s390: always inline disabled_wait disabled_wait uses _THIS_IP_ and assumes that compiler would inline it. Make sure this assumption is always correct by utilizing __always_inline. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 5a5525b0488ce31e19065f8527dbf50266b5b712 Author: Heiko Carstens Date: Mon Nov 18 09:38:37 2019 +0100 s390/vdso: fix getcpu getcpu reads the required values for cpu and node with two instructions. This might lead to an inconsistent result if user space gets preempted and migrated to a different CPU between the two instructions. Fix this by using just a single instruction to read both values at once. This is currently rather a theoretical bug, since there is no real NUMA support available (except for NUMA emulation). Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit a2308c11ecbc3471ebb7435ee8075815b1502ef0 Author: Heiko Carstens Date: Mon Nov 18 13:09:52 2019 +0100 s390/smp,vdso: fix ASCE handling When a secondary CPU is brought up it must initialize its control registers. CPU A which triggers that a secondary CPU B is brought up stores its control register contents into the lowcore of new CPU B, which then loads these values on startup. This is problematic in various ways: the control register which contains the home space ASCE will correctly contain the kernel ASCE; however control registers for primary and secondary ASCEs are initialized with whatever values were present in CPU A. Typically: - the primary ASCE will contain the user process ASCE of the process that triggered onlining of CPU B. - the secondary ASCE will contain the percpu VDSO ASCE of CPU A. Due to lazy ASCE handling we may also end up with other combinations. When then CPU B switches to a different process (!= idle) it will fixup the primary ASCE. However the problem is that the (wrong) ASCE from CPU A was loaded into control register 1: as soon as an ASCE is attached (aka loaded) a CPU is free to generate TLB entries using that address space. Even though it is very unlikey that CPU B will actually generate such entries, this could result in TLB entries of the address space of the process that ran on CPU A. These entries shouldn't exist at all and could cause problems later on. Furthermore the secondary ASCE of CPU B will not be updated correctly. This means that processes may see wrong results or even crash if they access VDSO data on CPU B. The correct VDSO ASCE will eventually be loaded on return to user space as soon as the kernel executed a call to strnlen_user or an atomic futex operation on CPU B. Fix both issues by intializing the to be loaded control register contents with the correct ASCEs and also enforce (re-)loading of the ASCEs upon first context switch and return to user space. Fixes: 0aaba41b58bc ("s390: remove all code using the access register mode") Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6733775a92eacd612ac88afa0fd922e4ffeb2bc7 Author: Harald Freudenberger Date: Wed Nov 20 11:44:31 2019 +0100 s390/zcrypt: handle new reply code FILTERED_BY_HYPERVISOR This patch introduces support for a new architectured reply code 0x8B indicating that a hypervisor layer (if any) has rejected an ap message. Linux may run as a guest on top of a hypervisor like zVM or KVM. So the crypto hardware seen by the ap bus may be restricted by the hypervisor for example only a subset like only clear key crypto requests may be supported. Other requests will be filtered out - rejected by the hypervisor. The new reply code 0x8B will appear in such cases and needs to get recognized by the ap bus and zcrypt device driver zoo. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 914d52e46490b6599b7f03fad233f4f19bf23cf7 Author: Ilya Leoshkevich Date: Thu Jul 4 16:18:15 2019 +0200 s390: implement perf_arch_fetch_caller_regs On s390 bpf_get_stack_raw_tp() returns 0 entries for both kernel and user stacks. While there is no practical unwinding solution for userspace on s390 at this moment, there certainly is a kernel unwinder. However, it is not properly integrated with BPF. In order to start unwinding, bpf_get_stack_raw_tp() obtains the current kernel register values using perf_fetch_caller_regs(), which is not implemented for s390. The actual unwinding then happens by passing those registers to perf_callchain_kernel(). Implement perf_arch_fetch_caller_regs() for s390, where __builtin_frame_address(0) points to back_chain. Signed-off-by: Ilya Leoshkevich Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 9d9043f6a81713248d82d88983c06b1eaedda287 Author: Max Filippov Date: Fri Nov 29 01:25:20 2019 -0800 xtensa: clean up system_call/xtensa_rt_sigreturn interaction system_call assembly code always pushes pointer to struct pt_regs as the last additional parameter for all system calls. The only user of this feature is xtensa_rt_sigreturn. Avoid this special case. Define xtensa_rt_sigreturn as accepting no argiments. Use current_pt_regs to get pointer to struct pt_regs in xtensa_rt_sigreturn. Don't pass additional parameter from system_call code. Signed-off-by: Max Filippov commit 02ce94c229251555ac726ecfebe3458ef5905fa9 Author: Max Filippov Date: Fri Nov 29 14:54:06 2019 -0800 xtensa: fix system_call interaction with ptrace Don't overwrite return value if system call was cancelled at entry by ptrace. Return status code from do_syscall_trace_enter so that pt_regs::syscall doesn't need to be changed to skip syscall. Signed-off-by: Max Filippov commit ba9c1d65991a8be2e160447dd06eb803cbb9ba61 Author: Max Filippov Date: Mon Nov 25 11:51:45 2019 -0800 xtensa: rearrange syscall tracing system_call saves and restores syscall number across system call to make clone and execv entry and exit tracing match. This complicates things when syscall code may be changed by ptrace. Preserve syscall code in copy_thread and start_thread directly instead of doing tricks in system_call. Signed-off-by: Max Filippov commit 2745aea6750ff0d2c48285d25bdb00e5b636ec8b Author: Thadeu Lima de Souza Cascardo Date: Thu Nov 28 15:58:06 2019 -0300 selftests: pmtu: use -oneline for ip route list cache Some versions of iproute2 will output more than one line per entry, which will cause the test to fail, like: TEST: ipv6: list and flush cached exceptions [FAIL] can't list cached exceptions That happens, for example, with iproute2 4.15.0. When using the -oneline option, this will work just fine: TEST: ipv6: list and flush cached exceptions [ OK ] This also works just fine with a more recent version of iproute2, like 5.4.0. For some reason, two lines are printed for the IPv4 test no matter what version of iproute2 is used. Use the same -oneline parameter there instead of counting the lines twice. Fixes: b964641e9925 ("selftests: pmtu: Make list_flush_ipv6_exception test more demanding") Signed-off-by: Thadeu Lima de Souza Cascardo Acked-by: Stefano Brivio Signed-off-by: David S. Miller commit d8d0470875aad437053b6743ef24eb9bd72d9789 Merge: a820e450390a 20c55f250618 Author: Jiri Kosina Date: Fri Nov 29 20:39:21 2019 +0100 Merge branch 'for-5.5/whiskers' into for-linus - robustification of tablet mode support in google-whiskers driver (Dmitry Torokhov) commit a820e450390a5a0a9a2174e79326318f4703668b Merge: 2fa55328f18f 61005d65b6c7 Author: Jiri Kosina Date: Fri Nov 29 20:37:55 2019 +0100 Merge branch 'for-5.5/logitech' into for-linus - Support for Logitech G15 (Hans de Goede) - silencing of non-informative error flow in dmesg from logitechi-hiddpp (Hans de Goede) commit 2fa55328f18f38bb85dc57da8c34616430c7bffb Merge: b49b511f417a 76f8cf6e0cfd Author: Jiri Kosina Date: Fri Nov 29 20:37:10 2019 +0100 Merge branch 'for-5.5/ish' into for-linus - typo fix (Geert Uytterhoeven) commit b49b511f417ada27e5e4a8448bac5337e24f3c39 Merge: 09f5429ddf78 4f6585815084 Author: Jiri Kosina Date: Fri Nov 29 20:36:45 2019 +0100 Merge branch 'for-5.5/i2c' into for-linus - removal of superfluous delay (You-Sheng Yang) commit 09f5429ddf78477b94f1f3c23063b53f127fbbe6 Merge: b746a1a2860f b05cec61c703 Author: Jiri Kosina Date: Fri Nov 29 20:36:00 2019 +0100 Merge branch 'for-5.5/hidraw' into for-linus - printk() -> pr_*() cleanup (Rishi Gupta) commit b746a1a2860f4a918f32d10dc569115d282aaf2f Merge: 8725aa4fa7de b03e5774d51f Author: Jiri Kosina Date: Fri Nov 29 20:34:28 2019 +0100 Merge branch 'for-5.5/core' into for-linus - hid_have_special_driver[] cleanup for LED devices (Heiner Kallweit) - HID parser improvements (Blaž Hrastnik, Candle Sun) commit 77b91c1a525d84cb560a4baef6f5f548b5c23f80 Author: Arnaldo Carvalho de Melo Date: Fri Nov 29 15:47:51 2019 -0300 perf machine: Fill map_symbol->maps in append_inlines() to fix segfault I forgot to fill in the map_symbol->maps field in append_inlines() which then makes code down the line segfault when trying to deref it. It doesn't make any sense to have an addr_location with its 'map' member not NULL while its 'maps' is NULL, after all al->maps is where al->map is in. It is done that way so that we don't have to have in each 'struct map' a pointer to the 'struct maps' it is in, as we had in the past when we would have 'map->mg', before 'struct maps' was combined with 'struct map_groups', because there was always a one-to-one relationship for these structs. This fixes a segfault when processing DWARF callgraphs in 'perf report'. Reported-by: Jiri Olsa Cc: Adrian Hunter Cc: Namhyung Kim Fixes: 08f6680e627e ("perf tools: Add a 'struct map_groups' pointer to 'struct map_symbol'") Link: http://lore.kernel.org/lkml/20191129160631.GD26963@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3525d0ccd92c760d22b8ee26f484fb7e9941c99c Merge: 80b10aa92448 013a53f2d25a Author: Paolo Bonzini Date: Fri Nov 29 19:20:08 2019 +0100 Merge tag 'kvm-ppc-uvmem-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD KVM: Add support for secure guests under the Protected Execution Framework (PEF) Ultravisor on POWER. This enables secure memory to be represented as device memory, which provides a way for the host to keep track of which pages of a secure guest have been moved into secure memory managed by the ultravisor and are no longer accessible by the host, and manage movement of pages between secure and normal memory. commit 80b10aa92448915d35e9f65591e9325397dc40fe Author: Wainer dos Santos Moschetta Date: Fri Nov 29 13:17:30 2019 -0500 Documentation: kvm: Fix mention to number of ioctls classes In api.txt it is said that KVM ioctls belong to three classes but in reality it is four. Fixed this, but do not count categories anymore to avoid such as outdated information in the future. Signed-off-by: Wainer dos Santos Moschetta Signed-off-by: Paolo Bonzini commit aa4c3967756c6c576a38a23ac511be211462a6b7 Author: Jens Axboe Date: Fri Nov 29 10:14:00 2019 -0700 io_uring: fix missing kmap() declaration on powerpc Christophe reports that current master fails building on powerpc with this error: CC fs/io_uring.o fs/io_uring.c: In function ‘loop_rw_iter’: fs/io_uring.c:1628:21: error: implicit declaration of function ‘kmap’ [-Werror=implicit-function-declaration] iovec.iov_base = kmap(iter->bvec->bv_page) ^ fs/io_uring.c:1628:19: warning: assignment makes pointer from integer without a cast [-Wint-conversion] iovec.iov_base = kmap(iter->bvec->bv_page) ^ fs/io_uring.c:1643:4: error: implicit declaration of function ‘kunmap’ [-Werror=implicit-function-declaration] kunmap(iter->bvec->bv_page); ^ which is caused by a missing highmem.h include. Fix it by including it. Fixes: 311ae9e159d8 ("io_uring: fix dead-hung for non-iter fixed rw") Reported-by: Christophe Leroy Tested-by: Christophe Leroy Signed-off-by: Jens Axboe commit fa7f7e7354957422b43ea950b672d3e731f27e68 Author: Ian Rogers Date: Tue Nov 26 15:59:13 2019 -0800 perf jit: Move test functionality in to a test Adds a test for minimal jit_write_elf functionality. Committer testing: # perf test jit 61: Test jit_write_elf : Ok # # perf test -v jit 61: Test jit_write_elf : --- start --- test child forked, pid 10460 Writing jit code to: /tmp/perf-test-KqxURR test child finished with 0 ---- end ---- Test jit_write_elf: Ok # Committer notes: Fix up the case where HAVE_JITDUMP is no defined. Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexios Zavras Cc: Allison Randal Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kate Stewart Cc: Leo Yan Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lore.kernel.org/lkml/20191126235913.41855-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 704e2f5b700da4c912635cf161c3e982737eb89e Author: Andi Kleen Date: Wed Nov 20 16:15:22 2019 -0800 perf stat: Use affinity for enabling/disabling events Restructure event enabling/disabling to use affinity, which minimizes the number of IPIs needed. Before on a large test case with 94 CPUs: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 54.65 1.899986 22 84812 660 ioctl after: 39.21 0.930451 10 84796 644 ioctl Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-13-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 363fb12189d58ebc60456561b8540d68013782a6 Author: Andi Kleen Date: Wed Nov 20 16:15:21 2019 -0800 perf evsel: Add functions to enable/disable for a specific CPU Refactor the existing functions to use these functions internally. Used in the next patch. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-12-andi@firstfloor.org Link: http://lore.kernel.org/lkml/20191127232657.GL84886@tassilo.jf.intel.com # Fix Signed-off-by: Arnaldo Carvalho de Melo commit 4b49ab708d1804bc8b2fcdde79844b8bc98f7ef6 Author: Andi Kleen Date: Wed Nov 20 16:15:20 2019 -0800 perf stat: Use affinity for reading Restructure event reading to use affinity to minimize the number of IPIs needed. Before on a large test case with 94 CPUs: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 3.16 0.106079 4 22082 read After: 3.43 0.081295 3 22082 read Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-11-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 4804e0111662d7d89edf4e767a64c6f7e4778bb1 Author: Andi Kleen Date: Wed Nov 20 16:15:19 2019 -0800 perf stat: Use affinity for opening events Restructure the event opening in perf stat to cycle through the events by CPU after setting affinity to that CPU. This eliminates IPI overhead in the perf API. We have to loop through the CPU in the outter builtin-stat code instead of leaving that to low level functions. It has to change the weak group fallback strategy slightly. Since we cannot easily undo the opens for other CPUs move the weak group retry to a separate loop. Before with a large test case with 94 CPUs: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 42.75 4.050910 67 60046 110 perf_event_open After: 26.86 0.944396 16 58069 110 perf_event_open (the number changes slightly because the weak group retries work differently and the test case relies on weak groups) Committer notes: Added one of the hunks in a patch provided by Andi after I noticed that the "event times" 'perf test' entry was segfaulting. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-10-andi@firstfloor.org Link: http://lore.kernel.org/lkml/20191127232657.GL84886@tassilo.jf.intel.com # Fix Signed-off-by: Arnaldo Carvalho de Melo commit e0e6a6ca3ac211cc07486330a2b89f41ea31b4dd Author: Andi Kleen Date: Wed Nov 20 16:15:18 2019 -0800 perf stat: Factor out open error handling Factor out the open error handling into a separate function. This is useful for followon patches who need to duplicate this. No behavior change intended. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-9-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 7736627b865defff2430e95df235b4aa2450bc37 Author: Andi Kleen Date: Wed Nov 20 16:15:17 2019 -0800 perf stat: Use affinity for closing file descriptors Closing a perf fd can also trigger an IPI to the target CPU. Use the same affinity technique as we use for reading/enabling events to closing to optimize the CPU transitions. Before on a large test case with 94 CPUs: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 32.56 3.085463 50 61483 close After: 10.54 0.735704 11 61485 close Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-8-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 99d6141d677a8cd0b35390a29527c8def42538b1 Author: Andi Kleen Date: Wed Nov 20 16:15:16 2019 -0800 perf evsel: Add functions to close evsel on a CPU Refactor the existing all CPU function to use the per CPU close internally. Export APIs to close per CPU. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-7-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit a8cbe40fe9f4ba499cc60b8b6a6851c2c1963797 Author: Andi Kleen Date: Wed Nov 20 16:15:15 2019 -0800 perf evsel: Add iterator to iterate over events ordered by CPU Add some common code that is needed to iterate over all events in CPU order. Used in followon patches Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-6-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit a2408a70368ade9c99de27da78d49416313b8833 Author: Andi Kleen Date: Wed Nov 20 16:15:14 2019 -0800 perf evlist: Maintain evlist->all_cpus Maintain a cpumap in the evlist that is the union of all the cpus of the events. This needs a cpumap merge operation, which is added together with tests. v2: Add tests for cpu map merge Fix handling of duplicates Rename _update to _merge Factor out sorting. Fix handling of NULL maps in merge v3: Add comments and empty lines to _merge Committer testing: # perf test "Merge cpu map" 52: Merge cpu map : Ok # Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: http://lore.kernel.org/lkml/20191121001522.180827-5-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 7074674e7338863e6404909c9761d4d3a610a379 Author: Andi Kleen Date: Wed Nov 20 16:15:13 2019 -0800 perf cpumap: Maintain cpumaps ordered and without dups Enforce this in _trim() Needed for followon change. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit d2cd795c4ece1a24fda170c35eeb4f17d9826cbb Author: Jaroslav Kysela Date: Fri Nov 29 15:40:27 2019 +0100 ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen The auto-parser assigns the bass speaker to DAC3 (NID 0x06) which is without the volume control. I do not see a reason to use DAC2, because the shared output to all speakers produces the sufficient and well balanced sound. The stereo support is enough for this purpose (laptop). Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20191129144027.14765-1-perex@perex.cz Signed-off-by: Takashi Iwai commit 609f5485344b05a7eaffe9fdd09d42ad1c501cdf Author: Kai Vehmanen Date: Fri Nov 29 16:37:56 2019 +0200 ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms Commit 5398e94fb753 ("ALSA: hda - Add DP-MST support for NVIDIA codecs") introduced a slight change of behaviour how non-MST monitors are assigned to PCMs on Intel platforms. In the drm_audio_component.h interface, the third parameter to pin_eld_notify() is pipe number. On Intel platforms, this value is -1 for MST. On other platforms, a non-zero pipe id is used to signal MST use. This difference leads to some subtle differences in hdmi_find_pcm_slot() with regards to how non-MST monitors are assigned to PCMs. This patch restores the original behaviour on Intel platforms while keeping the new allocation policy on other platforms. Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20191129143756.23941-2-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 0c0fe9e6b95ce2e9e2c83bef5563cf223e849eda Author: Kai Vehmanen Date: Fri Nov 29 16:37:55 2019 +0200 ALSA: hda: hdmi - fix kernel oops caused by invalid PCM idx Add additional check in hdmi_find_pcm_slot() to not return a pcm index that points to unallocated pcm. This could happen if codec driver is set up in codec->mst_no_extra_pcms mode. On some platforms, this leads to a kernel oops in snd_ctl_notify(), called via update_eld(). BugLink: https://github.com/thesofproject/linux/issues/1536 Fixes: 5398e94fb753 ALSA: hda - Add DP-MST support for NVIDIA codecs Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20191129143756.23941-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit e1e047ace8cef6d143f38c7d769753f133becbe6 Author: Marek Szyprowski Date: Tue Nov 12 11:47:34 2019 +0100 PM / devfreq: Add missing locking while setting suspend_freq Commit 2abb0d5268ae ("PM / devfreq: Lock devfreq in trans_stat_show") revealed a missing locking while calling devfreq_update_status() function during suspend/resume cycle. Code analysis revealed that devfreq_set_target() function was called without needed locks held for setting device specific suspend_freq if such has been defined. This patch fixes that by adding the needed locking, what fixes following kernel warning on Exynos4412-based OdroidU3 board during system suspend: PM: suspend entry (deep) Filesystems sync: 0.002 seconds Freezing user space processes ... (elapsed 0.001 seconds) done. OOM killer disabled. Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1385 at drivers/devfreq/devfreq.c:204 devfreq_update_status+0xc0/0x188 Modules linked in: CPU: 2 PID: 1385 Comm: rtcwake Not tainted 5.4.0-rc6-next-20191111 #6848 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xb4/0xe0) [] (dump_stack) from [] (__warn+0xf4/0x10c) [] (__warn) from [] (warn_slowpath_fmt+0xb0/0xb8) [] (warn_slowpath_fmt) from [] (devfreq_update_status+0xc0/0x188) [] (devfreq_update_status) from [] (devfreq_set_target+0xb0/0x15c) [] (devfreq_set_target) from [] (devfreq_suspend+0x2c/0x64) [] (devfreq_suspend) from [] (dpm_suspend+0xa4/0x57c) [] (dpm_suspend) from [] (dpm_suspend_start+0x98/0xa0) [] (dpm_suspend_start) from [] (suspend_devices_and_enter+0xec/0xc74) [] (suspend_devices_and_enter) from [] (pm_suspend+0x340/0x410) [] (pm_suspend) from [] (state_store+0x6c/0xc8) [] (state_store) from [] (kernfs_fop_write+0x10c/0x228) [] (kernfs_fop_write) from [] (__vfs_write+0x30/0x1d0) [] (__vfs_write) from [] (vfs_write+0xa4/0x180) [] (vfs_write) from [] (ksys_write+0x60/0xd8) [] (ksys_write) from [] (ret_fast_syscall+0x0/0x28) Exception stack(0xed3d7fa8 to 0xed3d7ff0) ... irq event stamp: 9667 hardirqs last enabled at (9679): [] _raw_spin_unlock_irq+0x20/0x58 hardirqs last disabled at (9698): [] __schedule+0xd8/0x818 softirqs last enabled at (9694): [] __do_softirq+0x4fc/0x5fc softirqs last disabled at (9719): [] irq_exit+0x16c/0x170 ---[ end trace 41ac5b57d046bdbc ]--- ------------[ cut here ]------------ Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Rafael J. Wysocki commit 2807273f5e88ed086d7d5d838fdee71e11e5085f Author: Christophe Leroy Date: Thu Nov 28 07:59:22 2019 +0000 powerpc/fixmap: fix crash with HIGHMEM Commit f2bb86937d86 ("powerpc/fixmap: don't clear fixmap area in paging_init()") removed the clearing of fixmap area in order to avoid clearing fixmapped areas set earlier. However unlike all other users of fixmap which use __set_fixmap(), HIGHMEM functions directly use __set_pte_at(). This means the page table must pre-exist, otherwise the following crash can be encoutered due to the lack of entry in the PGD. Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=4K MMU=Hash PowerMac Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.0+ #2528 NIP: c0144ce8 LR: c0144ccc CTR: 00000080 REGS: ef0b5aa0 TRAP: 0300 Not tainted (5.4.0+) MSR: 00009032 CR: 44282842 XER: 00000000 DAR: fffdf000 DSISR: 42000000 GPR00: c0144ccc ef0b5b58 ef0b0000 fffdf000 fffdf000 00000000 c0000f7c 00000000 GPR08: c0833000 fffdf000 00000000 ef1c53c9 24042842 00000000 00000000 00000000 GPR16: 00000000 00000000 ef7e7358 effe8160 00000000 c08a9660 c0851644 00000004 GPR24: c08c70a8 00002dc2 00000000 00000001 00000201 effe8160 effe8160 00000000 NIP [c0144ce8] prep_new_page+0x138/0x178 LR [c0144ccc] prep_new_page+0x11c/0x178 Call Trace: [ef0b5b58] [c0144ccc] prep_new_page+0x11c/0x178 (unreliable) [ef0b5b88] [c0147218] get_page_from_freelist+0x1fc/0xd88 [ef0b5c38] [c0148328] __alloc_pages_nodemask+0xd4/0xbb4 [ef0b5cf8] [c0142ba8] __vmalloc_node_range+0x1b4/0x2e0 [ef0b5d38] [c0142dd0] vzalloc+0x48/0x58 [ef0b5d58] [c0301c8c] check_partition+0x58/0x244 [ef0b5d78] [c02ffe80] blk_add_partitions+0x44/0x2cc [ef0b5db8] [c01a32d8] bdev_disk_changed+0x68/0xfc [ef0b5de8] [c01a4494] __blkdev_get+0x290/0x460 [ef0b5e28] [c02fdd40] __device_add_disk+0x480/0x4d8 [ef0b5e68] [c0810688] brd_init+0xc0/0x188 [ef0b5e88] [c0005194] do_one_initcall+0x40/0x19c [ef0b5ee8] [c07dd4dc] kernel_init_freeable+0x164/0x230 [ef0b5f28] [c0005408] kernel_init+0x18/0x10c [ef0b5f38] [c0014274] ret_from_kernel_thread+0x14/0x1c Partially revert that commit to still clear the fixmap area dedicated to HIGHMEM. Fixes: f2bb86937d86 ("powerpc/fixmap: don't clear fixmap area in paging_init()") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d42fa9747df5afa41e67b08e374c98d3b40529c9.1574927918.git.christophe.leroy@c-s.fr commit 6f090192f8225f52ba95d08785989688cb768cca Author: YueHaibing Date: Fri Nov 15 21:08:30 2019 +0800 x86/efi: remove unused variables commit ad723674d675 ("x86/efi: move common keyring handler functions to new file") leave this unused. Fixes: ad723674d675 ("x86/efi: move common keyring handler functions to new file") Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191115130830.13320-1-yuehaibing@huawei.com commit e0748539e3d594dd26f0d27a270f14720b22a406 Author: Kai-Heng Feng Date: Fri Nov 29 14:23:03 2019 +0800 x86/intel: Disable HPET on Intel Ice Lake platforms Like CFL and CFL-H, ICL SoC has skewed HPET timer once it hits PC10. So let's disable HPET on ICL. Signed-off-by: Kai-Heng Feng Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: feng.tang@intel.com Cc: harry.pan@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20191129062303.18982-2-kai.heng.feng@canonical.com Signed-off-by: Ingo Molnar commit f8edbde885bbcab6a2b4a1b5ca614e6ccb807577 Author: Kai-Heng Feng Date: Fri Nov 29 14:23:02 2019 +0800 x86/intel: Disable HPET on Intel Coffee Lake H platforms Coffee Lake H SoC has similar behavior as Coffee Lake, skewed HPET timer once the SoCs entered PC10. So let's disable HPET on CFL-H platforms. Signed-off-by: Kai-Heng Feng Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: feng.tang@intel.com Cc: harry.pan@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20191129062303.18982-1-kai.heng.feng@canonical.com Signed-off-by: Ingo Molnar commit 36a8015f89e40f7c9c91cc7e6d028fa288dad27b Author: Leonard Crestez Date: Tue Nov 26 17:17:13 2019 +0200 PM / QoS: Restore DEV_PM_QOS_MIN/MAX_FREQUENCY Support for adding per-device frequency limits was removed in commit 2aac8bdf7a0f ("PM: QoS: Drop frequency QoS types from device PM QoS") after cpufreq switched to use a new "freq_constraints" construct. Restore support for per-device freq limits but base this upon freq_constraints. This is primarily meant to be used by the devfreq subsystem. This removes the "static" marking on freq_qos_apply but does not export it for modules. Signed-off-by: Leonard Crestez Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Signed-off-by: Rafael J. Wysocki commit 342035f66c866f4ad750477b21b210e98d1f6818 Author: Leonard Crestez Date: Tue Nov 26 17:17:12 2019 +0200 PM / QoS: Reorder pm_qos/freq_qos/dev_pm_qos structs This allows dev_pm_qos to embed freq_qos structs, which is done in the next patch. Separate commit to make it easier to review. Signed-off-by: Leonard Crestez Reviewed-by: Matthias Kaehlcke Signed-off-by: Rafael J. Wysocki commit 14e087576081f4f3a6fc6a229166b05b65cf98e5 Author: Leonard Crestez Date: Tue Nov 26 17:17:10 2019 +0200 PM / QoS: Initial kunit test The pm_qos family of APIs are used in relatively difficult to reproduce scenarios such as thermal throttling so they benefit from unit testing. Start by adding basic tests from the the freq_qos APIs. It includes tests for issues that were brought up on mailing lists: https://patchwork.kernel.org/patch/11252425/#23017005 https://patchwork.kernel.org/patch/11253421/ Signed-off-by: Leonard Crestez Reviewed-by: Matthias Kaehlcke Signed-off-by: Rafael J. Wysocki commit c6a3aea93571a5393602256d8f74772bd64c8225 Author: Leonard Crestez Date: Tue Nov 26 17:17:11 2019 +0200 PM / QoS: Redefine FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX QOS requests for DEFAULT_VALUE are supposed to be ignored but this is not the case for FREQ_QOS_MAX. Adding one request for MAX_DEFAULT_VALUE and one for a real value will cause freq_qos_read_value to unexpectedly return MAX_DEFAULT_VALUE (-1). This happens because freq_qos max value is aggregated with PM_QOS_MIN but FREQ_QOS_MAX_DEFAULT_VALUE is (-1) so it's smaller than other values. Fix this by redefining FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX. Looking at current users for freq_qos it seems that none of them create requests for FREQ_QOS_MAX_DEFAULT_VALUE. Fixes: 77751a466ebd ("PM: QoS: Introduce frequency QoS") Signed-off-by: Leonard Crestez Reported-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit 2a0efc77735b48c42aedbe99df1f8f91aa402f57 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:40:04 2019 +0800 power: avs: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Acked-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki commit cde10f856a7de191a773d880bb524ea15084e1cc Author: Krzysztof Kozlowski Date: Thu Nov 21 04:19:15 2019 +0100 cpufreq: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 4d30d4a0441dac4452fcc188cd21536bedaec5df Author: Randy Dunlap Date: Thu Nov 28 14:38:03 2019 -0800 cpuidle: minor Kconfig help text fixes End sentences in help text with a period (aka full stop). Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit ba1e78a1dc0ca3e92f0be82279e6ba24177af7d6 Author: Rafael J. Wysocki Date: Thu Nov 21 19:41:51 2019 +0100 cpuidle: Drop disabled field from struct cpuidle_state After recent cpuidle updates the "disabled" field in struct cpuidle_state is only used by two drivers (intel_idle and shmobile cpuidle) for marking unusable idle states, but that may as well be achieved with the help of a state flag, so define an "unusable" idle state flag, CPUIDLE_FLAG_UNUSABLE, make the drivers in question use it instead of the "disabled" field and make the core set CPUIDLE_STATE_DISABLED_BY_DRIVER for the idle states with that flag set. After the above changes, the "disabled" field in struct cpuidle_state is not used any more, so drop it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 656b4e639831a6110dab8cd7e557c41f87514869 Author: Krzysztof Kozlowski Date: Thu Nov 21 04:19:12 2019 +0100 cpuidle: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rafael J. Wysocki commit 627ead724eff33673597216f5020b72118827de4 Author: Vamshi K Sthambamkadi Date: Thu Nov 28 15:58:29 2019 +0530 ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data() kmemleak reported backtrace: [] kmem_cache_alloc_trace+0x128/0x260 [<6677f215>] i2c_acpi_install_space_handler+0x4b/0xe0 [<1180f4fc>] i2c_register_adapter+0x186/0x400 [<6083baf7>] i2c_add_adapter+0x4e/0x70 [] intel_gmbus_setup+0x1a2/0x2c0 [i915] [<84cb69ae>] i915_driver_probe+0x8d8/0x13a0 [i915] [<81911d4b>] i915_pci_probe+0x48/0x160 [i915] [<4b159af1>] pci_device_probe+0xdc/0x160 [] really_probe+0x1ee/0x450 [] driver_probe_device+0x142/0x1b0 [] device_driver_attach+0x49/0x50 [] __driver_attach+0xc9/0x150 [] bus_for_each_dev+0x56/0xa0 [<80089bba>] driver_attach+0x19/0x20 [] bus_add_driver+0x177/0x220 [<7b29d8c7>] driver_register+0x56/0xf0 In i2c_acpi_remove_space_handler(), a leak occurs whenever the "data" parameter is initialized to 0 before being passed to acpi_bus_get_private_data(). This is because the NULL pointer check in acpi_bus_get_private_data() (condition->if(!*data)) returns EINVAL and, in consequence, memory is never freed in i2c_acpi_remove_space_handler(). Fix the NULL pointer check in acpi_bus_get_private_data() to follow the analogous check in acpi_get_data_full(). Signed-off-by: Vamshi K Sthambamkadi [ rjw: Subject & changelog ] Cc: All applicable Signed-off-by: Rafael J. Wysocki commit 6e78c01fde9023e0701f3af880c1fd9de6e4e8e3 Author: Joel Stanley Date: Fri Nov 29 10:49:30 2019 +1030 Revert "jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()" This reverts commit f2538f999345405f7d2e1194c0c8efa4e11f7b3a. The patch stopped JFFS2 from being able to mount an existing filesystem with the following errors: jffs2: error: (77) jffs2_build_inode_fragtree: Add node to tree failed -22 jffs2: error: (77) jffs2_do_read_inode_internal: Failed to build final fragtree for inode #5377: error -22 Fixes: f2538f999345 ("jffs2: Fix possible null-pointer dereferences...") Cc: stable@vger.kernel.org Suggested-by: Hou Tao Signed-off-by: Joel Stanley Signed-off-by: Richard Weinberger commit feb174069fd72ca92feca7fb3a57752f86986a4c Author: Krzysztof Kozlowski Date: Wed Nov 20 21:43:10 2019 +0800 ACPI: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rafael J. Wysocki commit 833a426cc471b6088011b3d67f1dc4e147614647 Author: Francesco Ruggeri Date: Tue Nov 19 21:47:27 2019 -0800 ACPI: OSL: only free map once in osl.c acpi_os_map_cleanup checks map->refcount outside of acpi_ioremap_lock before freeing the map. This creates a race condition the can result in the map being freed more than once. A panic can be caused by running for ((i=0; i<10; i++)) do for ((j=0; j<100000; j++)) do cat /sys/firmware/acpi/tables/data/BERT >/dev/null done & done This patch makes sure that only the process that drops the reference to 0 does the freeing. Fixes: b7c1fadd6c2e ("ACPI: Do not use krefs under a mutex in osl.c") Signed-off-by: Francesco Ruggeri Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Cc: All applicable Signed-off-by: Rafael J. Wysocki commit 90ed9c639c1b53556f87b1c5031c7e4c57285a92 Author: Hans de Goede Date: Mon Nov 18 16:35:56 2019 +0100 ACPI: button: Add DMI quirk for Acer Switch 10 SW5-032 lid-switch The Acer Switch 10 SW5-032 _LID method is quite broken, it looks like this: Method (_LID, 0, NotSerialized) // _LID: Lid Status { If ((STAS & One)) { Local0 = One PBCG |= 0x05000000 HMCG |= 0x05000000 } Else { Local0 = Zero PBCG &= 0xF0FFFFFF HMCG &= 0xF0FFFFFF } ^^PCI0.GFX0.CLID = Local0 Return (Local0) } The problem here is the accesses to the PBCG and HMCG, these are the pinconf0 registers for the power, resp. the home button GPIO, e.g. PBCG is declared as: OperationRegion (PWBT, SystemMemory, 0xFED0E080, 0x10) Field (PWBT, DWordAcc, NoLock, Preserve) { PBCG, 32, PBV1, 32, PBSA, 32, PBV2, 32 } Where 0xFED0E000 is the base address of the GPO2 device and 0x80 is the offset for the pin used for the powerbutton. The problem here is this line in _LID: PBCG |= 0x05000000 This changes the trigger flags of the GPIO, changing when it generates interrupts. Note it does not clear the original flags. Linux uses an edge triggered interrupt on both positive and negative edges. This |= adds the BYT_TRIG_LVL flag to this, so now it is turned into a level interrupt which fires both when low and high, iow it simply always fires leading to an interrupt storm, the tablet immediately waking up from suspend again, etc. There is nothing we can do to fix this, except for a DSDT override, which the user needs to do manually. The only thing we can do is never call _LID, which requires disabling the lid-switch functionality altogether. This commit adds a quirk for this, as no lid-switch function is better then the interrupt storm. A user manually applying a DSDT override can also override the quirk on the kernel cmdline. Signed-off-by: Hans de Goede Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit df786c9b947639aedbc7bb44b5dae2a7824af360 Author: Stanislav Fomichev Date: Wed Nov 27 14:57:59 2019 -0800 bpf: Force .BTF section start to zero when dumping from vmlinux While trying to figure out why fentry_fexit selftest doesn't pass for me (old pahole, broken BTF), I found out that my latest patch can break vmlinux .BTF generation. objcopy preserves section start when doing --only-section, so there is a chance (depending on where pahole inserts .BTF section) to have leading empty zeroes. Let's explicitly force section offset to zero. Before: $ objcopy --set-section-flags .BTF=alloc -O binary \ --only-section=.BTF vmlinux .btf.vmlinux.bin $ xxd .btf.vmlinux.bin | head -n1 00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................ After: $ objcopy --change-section-address .BTF=0 \ --set-section-flags .BTF=alloc -O binary \ --only-section=.BTF vmlinux .btf.vmlinux.bin $ xxd .btf.vmlinux.bin | head -n1 00000000: 9feb 0100 1800 0000 0000 0000 80e1 1c00 ................ ^BTF magic As part of this change, I'm also dropping '2>/dev/null' from objcopy invocation to be able to catch possible other issues (objcopy doesn't produce any warnings for me anymore, it did before with --dump-section). Fixes: da5fb18225b4 ("bpf: Support pre-2.25-binutils objcopy for vmlinux BTF") Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Cc: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191127225759.39923-1-sdf@google.com commit 5a43b87b3c62ad149ba6e9d0d3e5c0e5da02a5ca Author: Srinivas Pandruvada Date: Thu Nov 28 07:08:24 2019 -0800 x86/mce/therm_throt: Mask out read-only and reserved MSR bits While writing to MSR IA32_THERM_STATUS/IA32_PKG_THERM_STATUS, avoid writing 1 to read only and reserved fields because updating some fields generates exception. [ bp: Vertically align for better readability. ] Fixes: f6656208f04e ("x86/mce/therm_throt: Optimize notifications of thermal throttle") Reported-by: Dominik Brodowski Tested-by: Dominik Brodowski Signed-off-by: Srinivas Pandruvada Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/20191128150824.22413-1-srinivas.pandruvada@linux.intel.com commit 18a110b022a5c02e7dc9f6109d0bd93e58ac6ebb Author: Florian Westphal Date: Fri Nov 15 12:39:23 2019 +0100 netfilter: ctnetlink: netns exit must wait for callbacks Curtis Taylor and Jon Maxwell reported and debugged a crash on 3.10 based kernel. Crash occurs in ctnetlink_conntrack_events because net->nfnl socket is NULL. The nfnl socket was set to NULL by netns destruction running on another cpu. The exiting network namespace calls the relevant destructors in the following order: 1. ctnetlink_net_exit_batch This nulls out the event callback pointer in struct netns. 2. nfnetlink_net_exit_batch This nulls net->nfnl socket and frees it. 3. nf_conntrack_cleanup_net_list This removes all remaining conntrack entries. This is order is correct. The only explanation for the crash so ar is: cpu1: conntrack is dying, eviction occurs: -> nf_ct_delete() -> nf_conntrack_event_report \ -> nf_conntrack_eventmask_report -> notify->fcn() (== ctnetlink_conntrack_events). cpu1: a. fetches rcu protected pointer to obtain ctnetlink event callback. b. gets interrupted. cpu2: runs netns exit handlers: a runs ctnetlink destructor, event cb pointer set to NULL. b runs nfnetlink destructor, nfnl socket is closed and set to NULL. cpu1: c. resumes and trips over NULL net->nfnl. Problem appears to be that ctnetlink_net_exit_batch only prevents future callers of nf_conntrack_eventmask_report() from obtaining the callback. It doesn't wait of other cpus that might have already obtained the callbacks address. I don't see anything in upstream kernels that would prevent similar crash: We need to wait for all cpus to have exited the event callback. Fixes: 9592a5c01e79dbc59eb56fa ("netfilter: ctnetlink: netns support") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit aaa34256284c8fffddfda88078d5dda2a380cd94 Merge: 61183b056b49 d34910e1751b Author: David S. Miller Date: Thu Nov 28 23:09:15 2019 -0800 Merge branch 'tipc-Fix-some-bugs-at-socket-layer' Tung Nguyen says: ==================== tipc: Fix some bugs at socket layer This series fixes some bugs at socket layer. ==================== Signed-off-by: David S. Miller commit d34910e1751be79672db9cc61ca8892fbb4763f2 Author: Tung Nguyen Date: Thu Nov 28 10:10:08 2019 +0700 tipc: fix duplicate SYN messages under link congestion Scenario: 1. A client socket initiates a SYN message to a listening socket. 2. The send link is congested, the SYN message is put in the send link and a wakeup message is put in wakeup queue. 3. The congestion situation is abated, the wakeup message is pulled out of the wakeup queue. Function tipc_sk_push_backlog() is called to send out delayed messages by Nagle. However, the client socket is still in CONNECTING state. So, it sends the SYN message in the socket write queue to the listening socket again. 4. The listening socket receives the first SYN message and creates first server socket. The client socket receives ACK- and establishes a connection to the first server socket. The client socket closes its connection with the first server socket. 5. The listening socket receives the second SYN message and creates second server socket. The second server socket sends ACK- to the client socket, but it has been closed. It results in connection reset error when reading from the server socket in user space. Solution: return from function tipc_sk_push_backlog() immediately if there is pending SYN message in the socket write queue. Fixes: c0bceb97db9e ("tipc: add smart nagle feature") Signed-off-by: Tung Nguyen Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 12db3c8083fcab4270866a88191933f2d9f24f89 Author: Tung Nguyen Date: Thu Nov 28 10:10:07 2019 +0700 tipc: fix wrong timeout input for tipc_wait_for_cond() In function __tipc_shutdown(), the timeout value passed to tipc_wait_for_cond() is not jiffies. This commit fixes it by converting that value from milliseconds to jiffies. Fixes: 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Signed-off-by: Tung Nguyen Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 91a4a3eb433e4d786420c41f3c08d1d16c605962 Author: Tung Nguyen Date: Thu Nov 28 10:10:06 2019 +0700 tipc: fix wrong socket reference counter after tipc_sk_timeout() returns When tipc_sk_timeout() is executed but user space is grabbing ownership, this function rearms itself and returns. However, the socket reference counter is not reduced. This causes potential unexpected behavior. This commit fixes it by calling sock_put() before tipc_sk_timeout() returns in the above-mentioned case. Fixes: afe8792fec69 ("tipc: refactor function tipc_sk_timeout()") Signed-off-by: Tung Nguyen Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 2fe97a578d7bad3116a89dc8a6692a51e6fc1d9c Author: Tung Nguyen Date: Thu Nov 28 10:10:05 2019 +0700 tipc: fix potential memory leak in __tipc_sendmsg() When initiating a connection message to a server side, the connection message is cloned and added to the socket write queue. However, if the cloning is failed, only the socket write queue is purged. It causes memory leak because the original connection message is not freed. This commit fixes it by purging the list of connection message when it cannot be cloned. Fixes: 6787927475e5 ("tipc: buffer overflow handling in listener socket") Reported-by: Hoang Le Signed-off-by: Tung Nguyen Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 61183b056b49e2937ff92a1424291ba36a6f6d05 Author: Chuhong Yuan Date: Thu Nov 28 10:00:21 2019 +0800 net: macb: add missed tasklet_kill This driver forgets to kill tasklet in remove. Add the call to fix it. Fixes: 032dc41ba6e2 ("net: macb: Handle HRESP error") Signed-off-by: Chuhong Yuan Signed-off-by: David S. Miller commit 1a365e822372ba24c9da0822bc583894f6f3d821 Author: Marco Elver Date: Wed Nov 20 16:57:15 2019 +0100 locking/spinlock/debug: Fix various data races This fixes various data races in spinlock_debug. By testing with KCSAN, it is observable that the console gets spammed with data races reports, suggesting these are extremely frequent. Example data race report: read to 0xffff8ab24f403c48 of 4 bytes by task 221 on cpu 2: debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] do_raw_spin_lock+0x9b/0x210 kernel/locking/spinlock_debug.c:112 __raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline] _raw_spin_lock+0x39/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] get_partial_node.isra.0.part.0+0x32/0x2f0 mm/slub.c:1873 get_partial_node mm/slub.c:1870 [inline] write to 0xffff8ab24f403c48 of 4 bytes by task 167 on cpu 3: debug_spin_unlock kernel/locking/spinlock_debug.c:103 [inline] do_raw_spin_unlock+0xc9/0x1a0 kernel/locking/spinlock_debug.c:138 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:159 [inline] _raw_spin_unlock_irqrestore+0x2d/0x50 kernel/locking/spinlock.c:191 spin_unlock_irqrestore include/linux/spinlock.h:393 [inline] free_debug_processing+0x1b3/0x210 mm/slub.c:1214 __slab_free+0x292/0x400 mm/slub.c:2864 As a side-effect, with KCSAN, this eventually locks up the console, most likely due to deadlock, e.g. .. -> printk lock -> spinlock_debug -> KCSAN detects data race -> kcsan_print_report() -> printk lock -> deadlock. This fix will 1) avoid the data races, and 2) allow using lock debugging together with KCSAN. Reported-by: Qian Cai Signed-off-by: Marco Elver Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: https://lkml.kernel.org/r/20191120155715.28089-1-elver@google.com Signed-off-by: Ingo Molnar commit 2eaa857534b4860dc337496e35f72f50614383b3 Merge: 81b6b96475ac e5dc9dd32580 Author: David S. Miller Date: Thu Nov 28 22:40:30 2019 -0800 Merge branch 'net-tls-fix-scatter-gather-list-issues' Jakub Kicinski says: ==================== net: tls: fix scatter-gather list issues This series kicked of by a syzbot report fixes three issues around scatter gather handling in the TLS code. First patch fixes a use- -after-free situation which may occur if record was freed on error. This could have already happened in BPF paths, and patch 2 now makes the same condition occur in non-BPF code. Patch 2 fixes the problem spotted by syzbot. If encryption failed we have to clean the end markings from scatter gather list. As suggested by John the patch frees the record entirely and caller may retry copying data from user space buffer again. Third patch fixes a bug in the TLS 1.3 code spotted while working on patch 2. TLS 1.3 may effectively overflow the SG list which leads to the BUG() in sg_page() being triggered. Patch 4 adds a test case which triggers this bug reliably. Next two patches are small cleanups of dead code and code which makes dangerous assumptions. Last but not least two minor improvements to the sockmap tests. Tested: - bpf/test_sockmap - net/tls - syzbot repro (which used error injection, hence no direct selftest is added to preserve it). ==================== Signed-off-by: David S. Miller commit e5dc9dd3258098bf8b5ceb75fc3433b41eff618a Author: Jakub Kicinski Date: Wed Nov 27 12:16:46 2019 -0800 selftests: bpf: correct perror strings perror(str) is basically equivalent to print("%s: %s\n", str, strerror(errno)). New line or colon at the end of str is a mistake/breaks formatting. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4b67c515036313f3c3ecba3cb2babb9cbddb3f85 Author: Jakub Kicinski Date: Wed Nov 27 12:16:45 2019 -0800 selftests: bpf: test_sockmap: handle file creation failures gracefully test_sockmap creates a temporary file to use for sendpage. this may fail for various reasons. Handle the error rather than segfault. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c5daa6cccdc2f94aca2c9b3fa5f94e4469997293 Author: Jakub Kicinski Date: Wed Nov 27 12:16:44 2019 -0800 net/tls: use sg_next() to walk sg entries Partially sent record cleanup path increments an SG entry directly instead of using sg_next(). This should not be a problem today, as encrypted messages should be always allocated as arrays. But given this is a cleanup path it's easy to miss was this ever to change. Use sg_next(), and simplify the code. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9e5ffed37df68d0ccfb2fdc528609e23a1e70ebe Author: Jakub Kicinski Date: Wed Nov 27 12:16:43 2019 -0800 net/tls: remove the dead inplace_crypto code Looks like when BPF support was added by commit d3b18ad31f93 ("tls: add bpf support to sk_msg handling") and commit d829e9c4112b ("tls: convert to generic sk_msg interface") it broke/removed the support for in-place crypto as added by commit 4e6d47206c32 ("tls: Add support for inplace records encryption"). The inplace_crypto member of struct tls_rec is dead, inited to zero, and sometimes set to zero again. It used to be set to 1 when record was allocated, but the skmsg code doesn't seem to have been written with the idea of in-place crypto in mind. Since non trivial effort is required to bring the feature back and we don't really have the HW to measure the benefit just remove the left over support for now to avoid confusing readers. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 65190f77424d7b82c4aad7326c9cce6bd91a2fcc Author: Jakub Kicinski Date: Wed Nov 27 12:16:42 2019 -0800 selftests/tls: add a test for fragmented messages Add a sendmsg test with very fragmented messages. This should fill up sk_msg and test the boundary conditions. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 031097d9e079e40dce401031d1012e83d80eaf01 Author: Jakub Kicinski Date: Wed Nov 27 12:16:41 2019 -0800 net: skmsg: fix TLS 1.3 crash with full sk_msg TLS 1.3 started using the entry at the end of the SG array for chaining-in the single byte content type entry. This mostly works: [ E E E E E E . . ] ^ ^ start end E < content type / [ E E E E E E C . ] ^ ^ start end (Where E denotes a populated SG entry; C denotes a chaining entry.) If the array is full, however, the end will point to the start: [ E E E E E E E E ] ^ start end And we end up overwriting the start: E < content type / [ C E E E E E E E ] ^ start end The sg array is supposed to be a circular buffer with start and end markers pointing anywhere. In case where start > end (i.e. the circular buffer has "wrapped") there is an extra entry reserved at the end to chain the two halves together. [ E E E E E E . . l ] (Where l is the reserved entry for "looping" back to front. As suggested by John, let's reserve another entry for chaining SG entries after the main circular buffer. Note that this entry has to be pointed to by the end entry so its position is not fixed. Examples of full messages: [ E E E E E E E E . l ] ^ ^ start end <---------------. [ E E . E E E E E E l ] ^ ^ end start Now the end will always point to an unused entry, so TLS 1.3 can always use it. Fixes: 130b392c6cd6 ("net: tls: Add tls 1.3 support") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit d10523d0b3d78153ee58d19853ced26c9004c8c4 Author: Jakub Kicinski Date: Wed Nov 27 12:16:40 2019 -0800 net/tls: free the record on encryption error When tls_do_encryption() fails the SG lists are left with the SG_END and SG_CHAIN marks in place. One could hope that once encryption fails we will never see the record again, but that is in fact not true. Commit d3b18ad31f93 ("tls: add bpf support to sk_msg handling") added special handling to ENOMEM and ENOSPC errors which mean we may see the same record re-submitted. As suggested by John free the record, the BPF code is already doing just that. Reported-by: syzbot+df0d4ec12332661dd1f9@syzkaller.appspotmail.com Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: John Fastabend Signed-off-by: David S. Miller commit c329ef9684de9517d82af5b4758c9e1b64a8a11a Author: Jakub Kicinski Date: Wed Nov 27 12:16:39 2019 -0800 net/tls: take into account that bpf_exec_tx_verdict() may free the record bpf_exec_tx_verdict() may free the record if tls_push_record() fails, or if the entire record got consumed by BPF. Re-check ctx->open_rec before touching the data. Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: John Fastabend Signed-off-by: David S. Miller commit e680a41fcaf07ccac8817c589fc4824988b48eac Merge: 405b45376de9 5172672da02e Author: Ingo Molnar Date: Fri Nov 29 06:56:05 2019 +0100 Merge tag 'perf-core-for-mingo-5.5-20191128' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf script: Adrian Hunter: - Fix brstackinsn for AUXTRACE. - Fix invalid LBR/binary mismatch error. perf diff: Arnaldo Carvalho de Melo: - Use llabs() with 64-bit values, fixing the build in some 32-bit architectures. perf pmu: Andi Kleen: - Use file system cache to optimize sysfs access. x86: Adrian Hunter: - Add some more Intel instructions to the opcode map and to the perf test entry: gf2p8affineinvqb, gf2p8affineqb, gf2p8mulb, v4fmaddps, v4fmaddss, v4fnmaddps, v4fnmaddss, vaesdec, vaesdeclast, vaesenc, vaesenclast, vcvtne2ps2bf16, vcvtneps2bf16, vdpbf16ps, vgf2p8affineinvqb, vgf2p8affineqb, vgf2p8mulb, vp2intersectd, vp2intersectq, vp4dpwssd, vp4dpwssds, vpclmulqdq, vpcompressb, vpcompressw, vpdpbusd, vpdpbusds, vpdpwssd, vpdpwssds, vpexpandb, vpexpandw, vpopcntb, vpopcntd, vpopcntq, vpopcntw, vpshldd, vpshldq, vpshldvd, vpshldvq, vpshldvw, vpshldw, vpshrdd, vpshrdq, vpshrdvd, vpshrdvq, vpshrdvw, vpshrdw, vpshufbitqmb. perf affinity: Andi Kleen: - Add infrastructure to save/restore affinity perf maps: Arnaldo Carvalho de Melo: - Merge 'struct maps' with 'struct map_groups', as there is a 1x1 relationship, simplifying code overal. perf build: Jiri Olsa: - Allow to link with libbpf dynamicaly. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit ce27709b8162e5c501bc54292b8bf6bdecc4bbd4 Author: Alexei Starovoitov Date: Wed Nov 27 20:35:08 2019 -0800 bpf: Fix build in minimal configurations Some kconfigs can have BPF enabled without a single valid program type. In such configurations the build will fail with: ./kernel/bpf/btf.c:3466:1: error: empty enum is invalid Fix it by adding unused value to the enum. Reported-by: Randy Dunlap Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/bpf/20191128043508.2346723-1-ast@kernel.org commit f60b85e83659b5fbd3eb2c8f68d33ef4e35ebb2c Author: Shuah Khan Date: Thu Nov 28 16:03:21 2019 -0700 Revert "selftests: Fix O= and KBUILD_OUTPUT handling for relative paths" This reverts commit 303e6218ecec475d5bc3e5922dec770ee5baf107. This patch breaks several CI use-cases that run kselftest builds without using main Makefile. This fix depends on abs_objtree which is undefined when kselftest build is invoked on selftests Makefile without going through the main Makefile. Revert this for now as this patch impacts selftest runs. Fixes: 303e6218ecec ("selftests: Fix O= and KBUILD_OUTPUT handling for relative paths") Reported-by: Cristian Marussi Reported-by: Michael Ellerman Signed-off-by: Shuah Khan commit 336820c4374bc065317f247dc2bb37c0e41b64a6 Author: Takashi Iwai Date: Thu Nov 28 21:26:30 2019 +0100 ALSA: hda/realtek - Fix inverted bass GPIO pin on Acer 8951G We've added the bass speaker support on Acer 8951G by the commit 00066e9733f6 ("Add Acer Aspire Ethos 8951G model quirk"), but it seems that the GPIO pin was wrongly set: while the commit turns off the bit to power up the amp, the actual hardware reacts other way round, i.e. GPIO bit on = amp on. So this patch fixes the bug, turning on the GPIO bit 0x02 as default. Since turning on the GPIO bit can be more easily managed with alc_setup_gpio() call, we simplify the quirk code by integrating the GPIO setup into the existing alc662_fixup_aspire_ethos_hp() and dropping the whole ALC669_FIXUP_ACER_ASPIRE_ETHOS_SUBWOOFER quirk. Fixes: 00066e9733f6 ("Add Acer Aspire Ethos 8951G model quirk") Reported-and-tested-by: Sergey 'Jin' Bostandzhyan Cc: Link: https://lore.kernel.org/r/20191128202630.6626-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 81b6b96475ac7a4ebfceae9f16fb3758327adbfe Merge: a308a7102215 a7ba70f1787f Author: Linus Torvalds Date: Thu Nov 28 11:16:43 2019 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux; tag 'dma-mapping-5.5' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - improve dma-debug scalability (Eric Dumazet) - tiny dma-debug cleanup (Dan Carpenter) - check for vmap memory in dma_map_single (Kees Cook) - check for dma_addr_t overflows in dma-direct when using DMA offsets (Nicolas Saenz Julienne) - switch the x86 sta2x11 SOC to use more generic DMA code (Nicolas Saenz Julienne) - fix arm-nommu dma-ranges handling (Vladimir Murzin) - use __initdata in CMA (Shyam Saini) - replace the bus dma mask with a limit (Nicolas Saenz Julienne) - merge the remapping helpers into the main dma-direct flow (me) - switch xtensa to the generic dma remap handling (me) - various cleanups around dma_capable (me) - remove unused dev arguments to various dma-noncoherent helpers (me) * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux: * tag 'dma-mapping-5.5' of git://git.infradead.org/users/hch/dma-mapping: (22 commits) dma-mapping: treat dev->bus_dma_mask as a DMA limit dma-direct: exclude dma_direct_map_resource from the min_low_pfn check dma-direct: don't check swiotlb=force in dma_direct_map_resource dma-debug: clean up put_hash_bucket() powerpc: remove support for NULL dev in __phys_to_dma / __dma_to_phys dma-direct: avoid a forward declaration for phys_to_dma dma-direct: unify the dma_capable definitions dma-mapping: drop the dev argument to arch_sync_dma_for_* x86/PCI: sta2x11: use default DMA address translation dma-direct: check for overflows on 32 bit DMA addresses dma-debug: increase HASH_SIZE dma-debug: reorder struct dma_debug_entry fields xtensa: use the generic uncached segment support dma-mapping: merge the generic remapping helpers into dma-direct dma-direct: provide mmap and get_sgtable method overrides dma-direct: remove the dma_handle argument to __dma_direct_alloc_pages dma-direct: remove __dma_direct_free_pages usb: core: Remove redundant vmap checks kernel: dma-contiguous: mark CMA parameters __initdata/__initconst dma-debug: add a schedule point in debug_dma_dump_mappings() ... commit a308a7102215a582fc474375648965bc5692894b Merge: 05bd375b6bde eafee5944062 Author: Linus Torvalds Date: Thu Nov 28 10:57:12 2019 -0800 Merge tag 'ioremap-5.5' of git://git.infradead.org/users/hch/ioremap Pull generic ioremap support from Christoph Hellwig: "This adds the remaining bits for an entirely generic ioremap and iounmap to lib/ioremap.c. To facilitate that, it cleans up the giant mess of weird ioremap variants we had with no users outside the arch code. For now just the three newest ports use the code, but there is more than a handful others that can be converted without too much work. Summary: - clean up various obsolete ioremap and iounmap variants - add a new generic ioremap implementation and switch csky, nds32 and riscv over to it" * tag 'ioremap-5.5' of git://git.infradead.org/users/hch/ioremap: (21 commits) nds32: use generic ioremap csky: use generic ioremap csky: remove ioremap_cache riscv: use the generic ioremap code lib: provide a simple generic ioremap implementation sh: remove __iounmap nios2: remove __iounmap hexagon: remove __iounmap m68k: rename __iounmap and mark it static arch: rely on asm-generic/io.h for default ioremap_* definitions asm-generic: don't provide ioremap for CONFIG_MMU asm-generic: ioremap_uc should behave the same with and without MMU xtensa: clean up ioremap x86: Clean up ioremap() parisc: remove __ioremap nios2: remove __ioremap alpha: remove the unused __ioremap wrapper hexagon: clean up ioremap ia64: rename ioremap_nocache to ioremap_uc unicore32: remove ioremap_cached ... commit 05bd375b6bdede3748023e130990c9b6214fd46a Merge: a6ed68d6468b e944475e6984 Author: Linus Torvalds Date: Thu Nov 28 10:43:39 2019 -0800 Merge tag 'for-5.5/io_uring-post-20191128' of git://git.kernel.dk/linux-block Pull more io_uring updates from Jens Axboe: "As mentioned in the first pull request, there was a later batch as well. This contains fixes to the stuff that already went in, cleanups, and a few later additions. In particular, this contains: - Cleanups/fixes/unification of the submission and completion path (Pavel,me) - Linked timeouts improvements (Pavel,me) - Error path fixes (me) - Fix lookup window where cancellations wouldn't work (me) - Improve DRAIN support (Pavel) - Fix backlog flushing -EBUSY on submit (me) - Add support for connect(2) (me) - Fix for non-iter based fixed IO (Pavel) - creds inheritance for async workers (me) - Disable cmsg/ancillary data for sendmsg/recvmsg (me) - Shrink io_kiocb to 3 cachelines (me) - NUMA fix for io-wq (Jann)" * tag 'for-5.5/io_uring-post-20191128' of git://git.kernel.dk/linux-block: (42 commits) io_uring: make poll->wait dynamically allocated io-wq: shrink io_wq_work a bit io-wq: fix handling of NUMA node IDs io_uring: use kzalloc instead of kcalloc for single-element allocations io_uring: cleanup io_import_fixed() io_uring: inline struct sqe_submit io_uring: store timeout's sqe->off in proper place net: disallow ancillary data for __sys_{send,recv}msg_file() net: separate out the msghdr copy from ___sys_{send,recv}msg() io_uring: remove superfluous check for sqe->off in io_accept() io_uring: async workers should inherit the user creds io-wq: have io_wq_create() take a 'data' argument io_uring: fix dead-hung for non-iter fixed rw io_uring: add support for IORING_OP_CONNECT net: add __sys_connect_file() helper io_uring: only return -EBUSY for submit on non-flushed backlog io_uring: only !null ptr to io_issue_sqe() io_uring: simplify io_req_link_next() io_uring: pass only !null to io_req_find_next() io_uring: remove io_free_req_find_next() ... commit 9677d64e5695b751cec15e25f82da408dad2f005 Author: zhengbin Date: Thu Nov 28 11:09:32 2019 +0800 ataflop: Remove unneeded semicolon Fixes coccicheck warning: drivers/block/ataflop.c:860:53-54: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Jens Axboe commit c15cc235b744f556b1a37c23c81a09c86cebdb4f Author: zhengbin Date: Thu Nov 28 11:09:31 2019 +0800 block: sunvdc: Remove unneeded semicolon Fixes coccicheck warning: drivers/block/sunvdc.c:637:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Jens Axboe commit ec45a26377900df4f8a2c3cda07989908cc2b1f6 Author: zhengbin Date: Thu Nov 28 11:09:30 2019 +0800 drbd: Remove unneeded semicolon Fixes coccicheck warning: drivers/block/drbd/drbd_req.c:887:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Jens Axboe commit 6c5c240e412682f97aecd233c1e706822704aa28 Author: Roman Penyaev Date: Thu Nov 28 12:53:22 2019 +0100 io_uring: add mapping support for NOMMU archs That is a bit weird scenario but I find it interesting to run fio loads using LKL linux, where MMU is disabled. Probably other real archs which run uClinux can also benefit from this patch. Signed-off-by: Roman Penyaev Signed-off-by: Jens Axboe commit 54fb3fe0f211d4729a2551cf9497bd612189af9d Author: Sudeep Holla Date: Thu Nov 28 15:33:57 2019 +0000 Revert "arm64: dts: juno: add dma-ranges property" This reverts commit 193d00a2b35ee3353813b4006a18131122087205. Commit 951d48855d86 ("of: Make of_dma_get_range() work on bus nodes") reworked the logic such that of_dma_get_range() works correctly starting from a bus node containing "dma-ranges". Since on Juno we don't have a SoC level bus node and "dma-ranges" is present only in the root node, we get the following error: OF: translation of DMA address(0) to CPU address failed node(/sram@2e000000) OF: translation of DMA address(0) to CPU address failed node(/uart@7ff80000) ... OF: translation of DMA address(0) to CPU address failed node(/mhu@2b1f0000) OF: translation of DMA address(0) to CPU address failed node(/iommu@2b600000) OF: translation of DMA address(0) to CPU address failed node(/iommu@2b600000) OF: translation of DMA address(0) to CPU address failed node(/iommu@2b600000) So let's fix it by dropping the "dma-ranges" property for now. This should be fine since it doesn't represent any kind of device-visible restriction; it was only there for completeness, and we've since given in to the assumption that missing "dma-ranges" implies a 1:1 mapping anyway. We can add it later with a proper SoC bus node and moving all the devices that belong there along with the "dma-ranges" if required. Fixes: 193d00a2b35e ("arm64: dts: juno: add dma-ranges property") Cc: Rob Herring Cc: Liviu Dudau Cc: Lorenzo Pieralisi Acked-by: Robin Murphy Signed-off-by: Sudeep Holla commit a72e27f7a47069b1b4942051bffa7dc77b4aee0c Author: Wolfram Sang Date: Wed Nov 6 10:50:23 2019 +0100 video: fbdev: matrox: convert to i2c_new_scanned_device Move from the deprecated i2c_new_probed_device() to the new i2c_new_scanned_device(). Make use of the new ERRPTR if suitable. Signed-off-by: Wolfram Sang Acked-by: Daniel Vetter Signed-off-by: Wolfram Sang commit ce668524bf79e7739fdceb406b4f9d6cd6ba6cc0 Author: Wolfram Sang Date: Wed Nov 6 10:50:20 2019 +0100 i2c: icy: convert to i2c_new_scanned_device Move from the deprecated i2c_new_probed_device() to the new i2c_new_scanned_device(). Make use of the new ERRPTR if suitable. Signed-off-by: Wolfram Sang Reviewed-by: Max Staudt Signed-off-by: Wolfram Sang commit c1d084759c95ecd0ef08274654a1f6c4f343cdcd Author: Wolfram Sang Date: Wed Nov 6 10:50:19 2019 +0100 i2c: replace i2c_new_probed_device with an ERR_PTR variant In the general move to have i2c_new_*_device functions which return ERR_PTR instead of NULL, this patch converts i2c_new_probed_device(). There are only few users, so this patch converts the I2C core and all users in one go. The function gets renamed to i2c_new_scanned_device() so out-of-tree users will get a build failure to understand they need to adapt their error checking code. Signed-off-by: Wolfram Sang Reviewed-by: Luca Ceresoli Reviewed-by: Max Staudt Signed-off-by: Wolfram Sang commit 7e124c40517218e079e580909de2652bddb60ff5 Merge: 48617f03c940 36533f355b1a Author: Bjorn Helgaas Date: Thu Nov 28 08:54:55 2019 -0600 Merge branch 'pci/trivial' - Fix typos and comments (Bjorn Helgaas) - Fix Kconfig whitespace errors (Krzysztof Kozlowski) * pci/trivial: PCI: Fix indentation PCI: Fix typos PCI: Remove useless comments and tidy others PCI: Remove unnecessary includes # Conflicts: # drivers/pci/probe.c commit 48617f03c94088780c86692593b0a9b10f74530f Merge: 7bd4c4a7b0ff 3c379a59b479 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:54 2019 -0600 Merge branch 'remotes/lorenzo/pci/misc' - Fix iproc-msi and mvebu __iomem annotations (Ben Dooks) - Make mvebu_pci_bridge_emul_ops static (Ben Dooks) - Add Marek Vasut and Yoshihiro Shimoda as R-Car maintainers (Simon Horman) - Fix pcitest.c fd leak (Hewenliang) * remotes/lorenzo/pci/misc: tools: PCI: Fix fd leakage MAINTAINERS: Add Marek and Shimoda-san as R-Car PCIE co-maintainers PCI: mvebu: mvebu_pcie_map_registers __iomem fix PCI: mvebu: Make mvebu_pci_bridge_emul_ops static PCI: iproc-msi: Fix __iomem annotation in decode_msi_hwirq() commit 7bd4c4a7b0ff94ef01247f905cd568fb67c747e0 Merge: d8ddab63635d 3b55809cf91f Author: Bjorn Helgaas Date: Thu Nov 28 08:54:53 2019 -0600 Merge branch 'remotes/lorenzo/pci/mmio-dma-ranges' - Consolidate DT "dma-ranges" parsing and convert all host drivers to use shared parsing (Rob Herring) * remotes/lorenzo/pci/mmio-dma-ranges: PCI: Make devm_of_pci_get_host_bridge_resources() static PCI: rcar: Use inbound resources for setup PCI: iproc: Use inbound resources for setup PCI: xgene: Use inbound resources for setup PCI: v3-semi: Use inbound resources for setup PCI: ftpci100: Use inbound resources for setup PCI: of: Add inbound resource parsing to helpers PCI: versatile: Enable COMPILE_TEST PCI: versatile: Remove usage of PHYS_OFFSET PCI: versatile: Use pci_parse_request_of_pci_ranges() PCI: xilinx-nwl: Use pci_parse_request_of_pci_ranges() PCI: xilinx: Use pci_parse_request_of_pci_ranges() PCI: xgene: Use pci_parse_request_of_pci_ranges() PCI: v3-semi: Use pci_parse_request_of_pci_ranges() PCI: rockchip: Drop storing driver private outbound resource data PCI: rockchip: Use pci_parse_request_of_pci_ranges() PCI: mobiveil: Use pci_parse_request_of_pci_ranges() PCI: mediatek: Use pci_parse_request_of_pci_ranges() PCI: iproc: Use pci_parse_request_of_pci_ranges() PCI: faraday: Use pci_parse_request_of_pci_ranges() PCI: dwc: Use pci_parse_request_of_pci_ranges() PCI: altera: Use pci_parse_request_of_pci_ranges() PCI: aardvark: Use pci_parse_request_of_pci_ranges() PCI: Export pci_parse_request_of_pci_ranges() resource: Add a resource_list_first_type helper # Conflicts: # drivers/pci/controller/pcie-rcar.c commit d8ddab63635d4b474a99424538001932884b55ae Merge: 77471510559c e3d023b8952b Author: Bjorn Helgaas Date: Thu Nov 28 08:54:52 2019 -0600 Merge branch 'remotes/lorenzo/pci/vmd' - Add VMD bus 224-255 restriction decode (Jon Derrick) - Add VMD 8086:9A0B device ID (Jon Derrick) - Remove Keith from VMD maintainer list (Keith Busch) * remotes/lorenzo/pci/vmd: MAINTAINERS: Remove Keith from VMD maintainer PCI: vmd: Add device id for VMD device 8086:9A0B PCI: vmd: Add bus 224-255 restriction decode commit 77471510559cdb60cd3dd4e93dca5bfe71b0f5c6 Merge: b19c3f46caf8 4b1140ade8f5 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:51 2019 -0600 Merge branch 'remotes/lorenzo/pci/uniphier' - Set uniphier to host (RC) mode always (Kunihiko Hayashi) * remotes/lorenzo/pci/uniphier: PCI: uniphier: Set mode register to host mode commit b19c3f46caf8c0833792b84bf1602d99bf89e757 Merge: 069ade5dfec9 ff5c2bb9c6f5 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:50 2019 -0600 Merge branch 'remotes/lorenzo/pci/tegra' - Fix Tegra CLKREQ dependency programming (Vidya Sagar) * remotes/lorenzo/pci/tegra: PCI: tegra: Fix CLKREQ dependency programming commit 069ade5dfec93dd2916a85df8b1bab2d578857bd Merge: 21cea0c0eaba 1e4d40186026 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:49 2019 -0600 Merge branch 'remotes/lorenzo/pci/rockchip' - Make rockchip 0V9 and 1V8 power regulators non-optional (Robin Murphy) * remotes/lorenzo/pci/rockchip: PCI: rockchip: Make some regulators non-optional commit 21cea0c0eabae5d8b498b661885396d7186f6b61 Merge: 4940330a3696 7c7e53e1c93d Author: Bjorn Helgaas Date: Thu Nov 28 08:54:48 2019 -0600 Merge branch 'remotes/lorenzo/pci/rcar' - Clear bit 0 of MACCTLR before PCIETCTLR.CFINIT per manual (Yoshihiro Shimoda) - Remove unnecessary header include from rcar (Andrew Murray) - Tighten register index checking for rcar inbound range programming (Marek Vasut) - Fix rcar inbound range alignment calculation to improve packing of multiple entries (Marek Vasut) - Update rcar MACCTLR setting to match documentation (Yoshihiro Shimoda) * remotes/lorenzo/pci/rcar: PCI: rcar: Fix missing MACCTLR register setting in initialization sequence PCI: rcar: Recalculate inbound range alignment for each controller entry PCI: rcar: Move the inbound index check PCI: rcar: Remove unnecessary header include (../pci.h) commit 4940330a3696c37d95cb8e16880c412c28748e2d Merge: 30c50d3a26a5 4906c05b87d4 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:47 2019 -0600 Merge branch 'remotes/lorenzo/pci/mobiveil' - Change mobiveil csr_read()/write() function names that conflict with riscv arch functions (Kefeng Wang) * remotes/lorenzo/pci/mobiveil: PCI: mobiveil: Fix csr_read()/write() build issue commit 30c50d3a26a512890f30e2a9c4899fa9f4ce48d7 Merge: e63758e2790f ba1f8af7f772 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:46 2019 -0600 Merge branch 'remotes/lorenzo/pci/meson' - Fix meson PERST# GPIO polarity problem (Remi Pommarel) - Add DT bindings for Amlogic Meson G12A (Neil Armstrong) - Fix meson clock names to match DT bindings (Neil Armstrong) - Add meson support for Amlogic G12A SoC with separate shared PHY (Neil Armstrong) - Add meson extended PCIe PHY functions for Amlogic G12A USB3+PCIe combo PHY (Neil Armstrong) - Add arm64 DT for Amlogic G12A PCIe controller node (Neil Armstrong) - Add commented-out description of VIM3 USB3/PCIe mux in arm64 DT (Neil Armstrong) * remotes/lorenzo/pci/meson: arm64: dts: khadas-vim3: add commented support for PCIe arm64: dts: meson-g12a: Add PCIe node phy: meson-g12a-usb3-pcie: Add support for PCIe mode PCI: amlogic: meson: Add support for G12A PCI: amlogic: Fix probed clock names dt-bindings: pci: amlogic, meson-pcie: Add G12A bindings PCI: amlogic: Fix reset assertion via gpio descriptor commit e63758e2790fe8b37a6092dba21d370a5ae25430 Merge: 132c4a6b544a 7973eb13aecf Author: Bjorn Helgaas Date: Thu Nov 28 08:54:45 2019 -0600 Merge branch 'remotes/lorenzo/pci/layerscape' - Add layerscape LS1028a support (Xiaowei Bao) * remotes/lorenzo/pci/layerscape: PCI: layerscape: Add LS1028a support dt-bindings: pci: layerscape-pci: add compatible strings "fsl, ls1028a-pcie" commit 132c4a6b544a37cc8cd91f166c9bebe80c4abcee Merge: 4eb87ddf390e 9415743e4c8a Author: Bjorn Helgaas Date: Thu Nov 28 08:54:44 2019 -0600 Merge branch 'remotes/lorenzo/pci/iproc' - Invalidate iProc PAXB address mapping before programming it (Abhishek Shah) * remotes/lorenzo/pci/iproc: PCI: iproc: Invalidate PAXB address mapping before programming it commit 4eb87ddf390e5fdbaa973a981d0f1f7887b7f65a Merge: 454f4de2d931 877b911a5ba0 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:43 2019 -0600 Merge branch 'remotes/lorenzo/pci/hv' - Add hibernation support for Hyper-V virtual PCI devices (Dexuan Cui) - Track Hyper-V pci_protocol_version per-hbus, not globally (Dexuan Cui) - Avoid kmemleak false positive on hv hbus buffer (Dexuan Cui) * remotes/lorenzo/pci/hv: PCI: hv: Avoid a kmemleak false positive caused by the hbus buffer PCI: hv: Change pci_protocol_version to per-hbus PCI: hv: Add hibernation support PCI: hv: Reorganize the code in preparation of hibernation commit 454f4de2d93153ec795565b2525768374ac3f644 Merge: d76d273dc861 daee4f4e42c7 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:42 2019 -0600 Merge branch 'remotes/lorenzo/pci/endpoint' - Fix endpoint driver sign extension problem when shifting page number to phys_addr_t (Alan Mikhak) * remotes/lorenzo/pci/endpoint: PCI: endpoint: Cast the page number to phys_addr_t commit d76d273dc861416ac435781818b3a7468bd47d9d Merge: ba7e87c5dd63 1137e61dcb99 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:41 2019 -0600 Merge branch 'remotes/lorenzo/pci/dwc' - Fix dwc find_next_bit() usage (Niklas Cassel) * remotes/lorenzo/pci/dwc: PCI: dwc: Fix find_next_bit() usage commit ba7e87c5dd631773fe9c814f45a412451a48e1c4 Merge: 318ed91f36f9 de80f95ccb9c Author: Bjorn Helgaas Date: Thu Nov 28 08:54:40 2019 -0600 Merge branch 'remotes/lorenzo/pci/cadence' - Refactor Cadence PCIe host controller to use as a library for both host and endpoint (Tom Joseph) * remotes/lorenzo/pci/cadence: PCI: cadence: Move all files to per-device cadence directory PCI: cadence: Refactor driver to use as a core library commit 318ed91f36f98615147bac840294c315b9b6c444 Merge: f52412b151a4 e0d9d30b7354 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:39 2019 -0600 Merge branch 'remotes/lorenzo/pci/aardvark' - Use LTSSM state to build link training flag since Aardvark doesn't implement the Link Training bit (Remi Pommarel) - Delay before training Aardvark link in case PERST# was asserted before the driver probe (Remi Pommarel) - Fix Aardvark issues with Root Control reads and writes (Remi Pommarel) - Don't rely on jiffies in Aardvark config access path since interrupts may be disabled (Remi Pommarel) - Fix Aardvark big-endian support (Grzegorz Jaszczyk) - Fix bridge emulation big-endian support (Grzegorz Jaszczyk) * remotes/lorenzo/pci/aardvark: PCI: pci-bridge-emul: Fix big-endian support PCI: aardvark: Fix big endian support PCI: aardvark: Don't rely on jiffies while holding spinlock PCI: aardvark: Fix PCI_EXP_RTCTL register configuration PCI: aardvark: Wait for endpoint to be ready before training link PCI: aardvark: Use LTSSM state to build link training flag commit f52412b151a45d3864833202a4a19729322b4de6 Merge: e771e0bf823f 7cf2cba43f15 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:38 2019 -0600 Merge branch 'pci/virtualization' - Fix erroneous intel-iommu dependency on CONFIG_AMD_IOMMU (Bjorn Helgaas) - Move pci_prg_resp_pasid_required() to CONFIG_PCI_PRI (Bjorn Helgaas) - Allow VFs to use PRI (the PF PRI is shared by the VFs, but the code previously didn't recognize that) (Kuppuswamy Sathyanarayanan) - Allow VFs to use PASID (the PF PASID capability is shared by the VFs, but the code previously didn't recognize that) (Kuppuswamy Sathyanarayanan) - Disconnect PF and VF ATS enablement, since ATS in PFs and associated VFs can be enabled independently (Kuppuswamy Sathyanarayanan) - Cache PRI and PASID capability offsets (Kuppuswamy Sathyanarayanan) - Cache the PRI PRG Response PASID Required bit (Bjorn Helgaas) - Consolidate ATS declarations in linux/pci-ats.h (Krzysztof Wilczynski) - Remove unused PRI and PASID stubs (Bjorn Helgaas) - Removed unnecessary EXPORT_SYMBOL_GPL() from ATS, PRI, and PASID interfaces that are only used by built-in IOMMU drivers (Bjorn Helgaas) - Hide PRI and PASID state restoration functions used only inside the PCI core (Bjorn Helgaas) - Fix the UPDCR register address in the Intel ACS quirk (Steffen Liebergeld) - Add a DMA alias quirk for the Intel VCA NTB (Slawomir Pawlowski) - Serialize sysfs sriov_numvfs reads vs writes (Pierre Crégut) - Update Cavium ACS quirk for ThunderX2 and ThunderX3 (George Cherian) - Unify ACS quirk implementations (Bjorn Helgaas) * pci/virtualization: PCI: Unify ACS quirk desired vs provided checking PCI: Make ACS quirk implementations more uniform PCI: Apply Cavium ACS quirk to ThunderX2 and ThunderX3 PCI/IOV: Serialize sysfs sriov_numvfs reads vs writes PCI: Add DMA alias quirk for Intel VCA NTB PCI: Fix Intel ACS quirk UPDCR register address PCI/ATS: Make pci_restore_pri_state(), pci_restore_pasid_state() private PCI/ATS: Remove unnecessary EXPORT_SYMBOL_GPL() PCI/ATS: Remove unused PRI and PASID stubs PCI/ATS: Consolidate ATS declarations in linux/pci-ats.h PCI/ATS: Cache PRI PRG Response PASID Required bit PCI/ATS: Cache PASID Capability offset PCI/ATS: Cache PRI Capability offset PCI/ATS: Disable PF/VF ATS service independently PCI/ATS: Handle sharing of PF PASID Capability with all VFs PCI/ATS: Handle sharing of PF PRI Capability with all VFs PCI/ATS: Move pci_prg_resp_pasid_required() to CONFIG_PCI_PRI iommu/vt-d: Select PCI_PRI for INTEL_IOMMU_SVM commit e771e0bf823ffe4e58095bd837ba397edf48448d Merge: 774800cb099f 6acdf7e19b37 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:37 2019 -0600 Merge branch 'pci/switchtec' - Read all 64 bits of Switchtec part_event_bitmap (Logan Gunthorpe) * pci/switchtec: PCI/switchtec: Read all 64 bits of part_event_bitmap commit 774800cb099f8ee2f0f5c55ddb1809802d7c7cf8 Merge: 7cfe16393c3c 73884a7082f4 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:36 2019 -0600 Merge branch 'pci/resource' - Protect pci_reassign_bridge_resources() against concurrent addition/removal (Benjamin Herrenschmidt) - Fix bridge dma_ranges resource list cleanup (Rob Herring) - Add PCI_STD_NUM_BARS for the number of standard BARs (Denis Efremov) - Add "pci=hpmmiosize" and "pci=hpmmioprefsize" parameters to control the MMIO and prefetchable MMIO window sizes of hotplug bridges independently (Nicholas Johnson) - Fix MMIO/MMIO_PREF window assignment that assigned more space than desired (Nicholas Johnson) - Only enforce bus numbers from bridge EA if the bridge has EA devices downstream (Subbaraya Sundeep) * pci/resource: PCI: Do not use bus number zero from EA capability PCI: Avoid double hpmemsize MMIO window assignment PCI: Add "pci=hpmmiosize" and "pci=hpmmioprefsize" parameters PCI: Add PCI_STD_NUM_BARS for the number of standard BARs PCI: Fix missing bridge dma_ranges resource list cleanup PCI: Protect pci_reassign_bridge_resources() against concurrent addition/removal commit 7cfe16393c3c9fed45545b234b852e1154c7cc5b Merge: c59f0da5780f bae26849372b Author: Bjorn Helgaas Date: Thu Nov 28 08:54:35 2019 -0600 Merge branch 'pci/pm' - Always return devices to D0 when thawing to fix hibernation with drivers like mlx4 that used legacy power management (previously we only did it for drivers with new power management ops) (Dexuan Cui) - Clear PCIe PME Status even for legacy power management (Bjorn Helgaas) - Fix PCI PM documentation errors (Bjorn Helgaas) - Use dev_printk() for more power management messages (Bjorn Helgaas) - Apply D2 delay as milliseconds, not microseconds (Bjorn Helgaas) - Convert xen-platform from legacy to generic power management (Bjorn Helgaas) - Removed unused .resume_early() and .suspend_late() legacy power management hooks (Bjorn Helgaas) - Rearrange power management code for clarity (Rafael J. Wysocki) - Decode power states more clearly ("4" or "D4" really refers to "D3cold") (Bjorn Helgaas) - Notice when reading PM Control register returns an error (~0) instead of interpreting it as being in D3hot (Bjorn Helgaas) - Add missing link delays required by the PCIe spec (Mika Westerberg) * pci/pm: PCI/PM: Move pci_dev_wait() definition earlier PCI/PM: Add missing link delays required by the PCIe spec PCI/PM: Add pcie_wait_for_link_delay() PCI/PM: Return error when changing power state from D3cold PCI/PM: Decode D3cold power state correctly PCI/PM: Fold __pci_complete_power_transition() into its caller PCI/PM: Avoid exporting __pci_complete_power_transition() PCI/PM: Fold __pci_start_power_transition() into its caller PCI/PM: Use pci_power_up() in pci_set_power_state() PCI/PM: Move power state update away from pci_power_up() PCI/PM: Remove unused pci_driver.suspend_late() hook PCI/PM: Remove unused pci_driver.resume_early() hook xen-platform: Convert to generic power management PCI/PM: Simplify pci_set_power_state() PCI/PM: Expand PM reset messages to mention D3hot (not just D3) PCI/PM: Apply D2 delay as milliseconds, not microseconds PCI/PM: Use pci_WARN() to include device information PCI/PM: Use PCI dev_printk() wrappers for consistency PCI/PM: Wrap long lines in documentation PCI/PM: Note that PME can be generated from D0 PCI/PM: Make power management op coding style consistent PCI/PM: Run resume fixups before disabling wakeup events PCI/PM: Clear PCIe PME Status even for legacy power management PCI/PM: Correct pci_pm_thaw_noirq() documentation PCI/PM: Always return devices to D0 when thawing commit c59f0da5780f4ea3645020bffc1e261c87aece32 Merge: e87eb585d31f 191d6f91f283 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:34 2019 -0600 Merge branch 'pci/msi' - Remove unused pci_irq_get_node() Greg Kroah-Hartman) - Move power state check out of pci_msi_supported() (Bjorn Helgaas) - Fix incorrect MSI-X masking on resume and revert related nvme quirk for Kingston NVME SSD running FW E8FK11.T (Jian-Hong Pan) - Make asm/msi.h mandatory and simplify PCI_MSI_IRQ_DOMAIN Kconfig (Palmer Dabbelt, Michal Simek) * pci/msi: PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist asm-generic: Make msi.h a mandatory include/asm header Revert "nvme: Add quirk for Kingston NVME SSD running FW E8FK11.T" PCI/MSI: Fix incorrect MSI-X masking on resume PCI/MSI: Move power state check out of pci_msi_supported() PCI/MSI: Remove unused pci_irq_get_node() commit e87eb585d31fadb5e9e549a1de4b2da60a79bfc9 Merge: 2df08822a643 3d581b11e34a Author: Bjorn Helgaas Date: Thu Nov 28 08:54:32 2019 -0600 Merge branch 'pci/misc' - Add NumaChip SPDX header (Krzysztof Wilczynski) - Replace EXTRA_CFLAGS with ccflags-y (Krzysztof Wilczynski) - Remove unused includes (Krzysztof Wilczynski) - Avoid AMD FCH XHCI USB PME# from D0 defect that prevents wakeup on USB 2.0 or 1.1 connect events (Kai-Heng Feng) - Removed unused sysfs attribute groups (Ben Dooks) - Remove PTM and ASPM dependencies on PCIEPORTBUS (Bjorn Helgaas) - Add PCIe Link Control 2 register field definitions to replace magic numbers in AMDGPU and Radeon CIK/SI (Bjorn Helgaas) - Fix incorrect Link Control 2 Transmit Margin usage in AMDGPU and Radeon CIK/SI PCIe Gen3 link training (Bjorn Helgaas) - Use pcie_capability_read_word() instead of pci_read_config_word() in AMDGPU and Radeon CIK/SI (Frederick Lawler) * pci/misc: drm/radeon: Prefer pcie_capability_read_word() drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions drm/radeon: Correct Transmit Margin masks drm/amdgpu: Prefer pcie_capability_read_word() drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions drm/amdgpu: Correct Transmit Margin masks PCI: Add #defines for Enter Compliance, Transmit Margin PCI: Allow building PCIe things without PCIEPORTBUS PCI: Remove PCIe Kconfig dependencies on PCI PCI/ASPM: Remove dependency on PCIEPORTBUS PCI/PTM: Remove dependency on PCIEPORTBUS PCI/PTM: Remove spurious "d" from granularity message PCI: sysfs: Remove unused attribute groups x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect PCI: Remove unused includes and superfluous struct declaration x86/PCI: Replace deprecated EXTRA_CFLAGS with ccflags-y x86/PCI: Correct SPDX comment style x86/PCI: Add NumaChip SPDX GPL-2.0 to replace COPYING boilerplate commit 2df08822a643558402b7c58528b8478e31e40ad7 Merge: 093b9062adc1 77adf9355304 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:31 2019 -0600 Merge branch 'pci/hotplug' - Avoid returning prematurely from sysfs requests to enable or disable a PCIe hotplug slot (Lukas Wunner) - Don't disable interrupts twice when suspending hotplug ports (Mika Westerberg) - Fix deadlocks when PCIe ports are hot-removed while suspended (Mika Westerberg) - Fix boot-time Embedded Controller GPE storm caused by incorrect resource assignment after ACPI Bus Check Notification (Mika Westerberg) * pci/hotplug: ACPI / hotplug / PCI: Allocate resources directly under the non-hotplug bridge PCI: pciehp: Prevent deadlock on disconnect PCI: pciehp: Do not disable interrupt twice on suspend PCI: pciehp: Refactor infinite loop in pcie_poll_cmd() PCI: pciehp: Avoid returning prematurely from sysfs requests commit 093b9062adc14f1a0ad53629a53c9d06eed3c65e Merge: abd05c97f971 ad5086108b9f Author: Bjorn Helgaas Date: Thu Nov 28 08:54:30 2019 -0600 Merge branch 'pci/enumeration' - Warn if a host bridge has no NUMA info (Yunsheng Lin) * pci/enumeration: PCI: Warn if no host bridge NUMA node info commit abd05c97f9711a4baa8cd43832893b8df45d459e Merge: c2a3d213d1bc 87e90283c94c Author: Bjorn Helgaas Date: Thu Nov 28 08:54:29 2019 -0600 Merge branch 'pci/aspm' - Remove unnecessary ASPM locking (Bjorn Helgaas) - Add support for disabling L1 PM Substates (Heiner Kallweit) - Allow re-enabling Clock PM after it has been disabled (Heiner Kallweit) - Add sysfs attributes for controlling ASPM link states (Heiner Kallweit) - Remove CONFIG_PCIEASPM_DEBUG, including "link_state" and "clk_ctl" sysfs files (Heiner Kallweit) * pci/aspm: PCI/ASPM: Remove PCIEASPM_DEBUG Kconfig option and related code PCI/ASPM: Add sysfs attributes for controlling ASPM link states PCI/ASPM: Add pcie_aspm_get_link() PCI/ASPM: Allow re-enabling Clock PM PCI/ASPM: Add L1 PM substate support to pci_disable_link_state() PCI/ASPM: Remove pcie_aspm_enabled() unnecessary locking commit c2a3d213d1bc007683f63790b1cf522d5586d1a8 Merge: 7d194c2100ad 35a0b2378c19 Author: Bjorn Helgaas Date: Thu Nov 28 08:54:28 2019 -0600 Merge branch 'pci/aer' - Restore AER capability after resume (Mayurkumar Patel) - Add PoisonTLPBlocked AER counter (Rajat Jain) - Use for_each_set_bit() to simplify AER code (Andy Shevchenko) - Fix AER kernel-doc (Andy Shevchenko) - Add "pcie_ports=dpc-native" parameter to allow native use of DPC even if platform didn't grant control over AER (Olof Johansson) * pci/aer: PCI/DPC: Add "pcie_ports=dpc-native" to allow DPC without AER control PCI/AER: Fix kernel-doc warnings PCI/AER: Use for_each_set_bit() to simplify code PCI/AER: Add PoisonTLPBlocked to Uncorrectable error counters PCI/AER: Save AER Capability for suspend/resume commit 7251953d784baf7e5416afabe030a0e81de1a938 Author: Linus Walleij Date: Thu Nov 28 09:37:18 2019 +0100 spi: fsl: Handle the single hardwired chipselect case The Freescale MPC8xxx had a special quirk for handling a single hardwired chipselect, the case when we're using neither GPIO nor native chip select: when inspecting the device tree and finding zero "cs-gpios" on the device node the code would assume we have a single hardwired chipselect that leaves the device always selected. This quirk is not handled by the new core code, so we need to check the "cs-gpios" explicitly in the driver and set pdata->max_chipselect = 1 which will later fall through to the SPI master ->num_chipselect. Make sure not to assign the chip select handler in this case: there is no handling needed since the chip is always selected, and this is what the old code did as well. Cc: Christophe Leroy Reported-by: Christophe Leroy Fixes: 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Signed-off-by: Linus Walleij Tested-by: Christophe Leroy (No tested the Link: https://lore.kernel.org/r/20191128083718.39177-3-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 71b8f600b034c7f5780f6fb311dabfe331c64feb Author: Linus Walleij Date: Thu Nov 28 09:37:17 2019 +0100 gpio: Handle counting of Freescale chipselects We have a special quirk to handle the Freescale nonstandard SPI chipselect GPIOs in the gpiolib-of.c file, but it currently only handles the case where the GPIOs are actually requested (gpiod_*get()). We also need to handle that the SPI core attempts to count the GPIOs before use, and that needs a similar quirk in the OF part of the library. Cc: Christophe Leroy Reported-by: Christophe Leroy Fixes: 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Signed-off-by: Linus Walleij Tested-by: Christophe Leroy Link: https://lore.kernel.org/r/20191128083718.39177-2-linus.walleij@linaro.org Signed-off-by: Mark Brown commit f106904968e2a075e64653b9b79dda9f0f070ab5 Author: Linus Walleij Date: Thu Nov 28 09:37:16 2019 +0100 spi: fsl: Fix GPIO descriptor support This makes the driver actually support looking up GPIO descriptor. A coding mistake in the initial descriptor support patch was that it was failing to turn on the very feature it was implementing. Mea culpa. Cc: Christophe Leroy Reported-by: Christophe Leroy Fixes: 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Signed-off-by: Linus Walleij Tested-by: Christophe Leroy Link: https://lore.kernel.org/r/20191128083718.39177-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit ada9e3fcc175db4538f5b5e05abf5dedf626e550 Author: Charles Keepax Date: Wed Nov 27 15:39:36 2019 +0000 spi: dw: Correct handling of native chipselect This patch reverts commit 6e0a32d6f376 ("spi: dw: Fix default polarity of native chipselect"). The SPI framework always called the set_cs callback with the logic level it desired on the chip select line, which is what the drivers original handling supported. commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") changed these symantics, but only in the case of drivers that also support GPIO chip selects, to true meaning apply slave select rather than logic high. This left things in an odd state where a driver that only supports hardware chip selects, the core would handle polarity but if the driver supported GPIOs as well the driver should handle polarity. At this point the reverted change was applied to change the logic in the driver to match new system. This was then broken by commit 3e5ec1db8bfe ("spi: Fix SPI_CS_HIGH setting when using native and GPIO CS") which reverted the core back to consistently calling set_cs with a logic level. This fix reverts the driver code back to its original state to match the current core code. This is probably a better fix as a) the set_cs callback is always called with consistent symantics and b) the inversion for SPI_CS_HIGH can be handled in the core and doesn't need to be coded in each driver supporting it. Fixes: 3e5ec1db8bfe ("spi: Fix SPI_CS_HIGH setting when using native and GPIO CS") Signed-off-by: Charles Keepax Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191127153936.29719-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 4cc4a1708903f404d2ca0dfde30e71e052c6cbc9 Author: Sven Eckelmann Date: Thu Nov 28 12:25:45 2019 +0100 batman-adv: Fix DAT candidate selection on little endian systems The distributed arp table is using a DHT to store and retrieve MAC address information for an IP address. This is done using unicast messages to selected peers. The potential peers are looked up using the IP address and the VID. While the IP address is always stored in big endian byte order, this is not the case of the VID. It can (depending on the host system) either be big endian or little endian. The host must therefore always convert it to big endian to ensure that all devices calculate the same peers for the same lookup data. Fixes: be1db4f6615b ("batman-adv: make the Distributed ARP Table vlan aware") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 5172672da02e483d9b3c4d814c3482d0c8ffb1a6 Author: Adrian Hunter Date: Wed Nov 27 11:56:31 2019 +0200 perf script: Fix invalid LBR/binary mismatch error The 'len' returned by grab_bb() includes an extra MAXINSN bytes to allow for the last instruction, so the the final 'offs' will not be 'len'. Fix the error condition logic accordingly. Before: $ perf record -e '{intel_pt//,cpu/mem_inst_retired.all_loads,aux-sample-size=8192/pp}:u' grep -rqs jhgjhg /boot [ perf record: Woken up 19 times to write data ] [ perf record: Captured and wrote 2.274 MB perf.data ] $ perf script -F +brstackinsn --xed --itrace=i1usl100 | head grep 13759 [002] 8091.310257: 1862 instructions:uH: 5641d58069eb bmexec+0x86b (/bin/grep) bmexec+2485: 00005641d5806b35 jnz 0x5641d5806bd0 # MISPRED 00005641d5806bd0 movzxb (%r13,%rdx,1), %eax 00005641d5806bd6 add %rdi, %rax 00005641d5806bd9 movzxb -0x1(%rax), %edx 00005641d5806bdd cmp %rax, %r14 00005641d5806be0 jnb 0x5641d58069c0 # MISPRED mismatch of LBR data and executable 00005641d58069c0 movzxb (%r13,%rdx,1), %edi After: $ perf script -F +brstackinsn --xed --itrace=i1usl100 | head grep 13759 [002] 8091.310257: 1862 instructions:uH: 5641d58069eb bmexec+0x86b (/bin/grep) bmexec+2485: 00005641d5806b35 jnz 0x5641d5806bd0 # MISPRED 00005641d5806bd0 movzxb (%r13,%rdx,1), %eax 00005641d5806bd6 add %rdi, %rax 00005641d5806bd9 movzxb -0x1(%rax), %edx 00005641d5806bdd cmp %rax, %r14 00005641d5806be0 jnb 0x5641d58069c0 # MISPRED 00005641d58069c0 movzxb (%r13,%rdx,1), %edi 00005641d58069c6 add %rax, %rdi Fixes: e98df280bc2a ("perf script brstackinsn: Fix recovery from LBR/binary mismatch") Reported-by: Andi Kleen Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191127095631.15663-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0cd032d3b5fcebf5454315400ab310746a81ca53 Author: Adrian Hunter Date: Wed Nov 27 11:53:21 2019 +0200 perf script: Fix brstackinsn for AUXTRACE brstackinsn must be allowed to be set by the user when AUX area data has been captured because, in that case, the branch stack might be synthesized on the fly. This fixes the following error: Before: $ perf record -e '{intel_pt//,cpu/mem_inst_retired.all_loads,aux-sample-size=8192/pp}:u' grep -rqs jhgjhg /boot [ perf record: Woken up 19 times to write data ] [ perf record: Captured and wrote 2.274 MB perf.data ] $ perf script -F +brstackinsn --xed --itrace=i1usl100 | head Display of branch stack assembler requested, but non all-branch filter set Hint: run 'perf record -b ...' After: $ perf record -e '{intel_pt//,cpu/mem_inst_retired.all_loads,aux-sample-size=8192/pp}:u' grep -rqs jhgjhg /boot [ perf record: Woken up 19 times to write data ] [ perf record: Captured and wrote 2.274 MB perf.data ] $ perf script -F +brstackinsn --xed --itrace=i1usl100 | head grep 13759 [002] 8091.310257: 1862 instructions:uH: 5641d58069eb bmexec+0x86b (/bin/grep) bmexec+2485: 00005641d5806b35 jnz 0x5641d5806bd0 # MISPRED 00005641d5806bd0 movzxb (%r13,%rdx,1), %eax 00005641d5806bd6 add %rdi, %rax 00005641d5806bd9 movzxb -0x1(%rax), %edx 00005641d5806bdd cmp %rax, %r14 00005641d5806be0 jnb 0x5641d58069c0 # MISPRED mismatch of LBR data and executable 00005641d58069c0 movzxb (%r13,%rdx,1), %edi Fixes: 48d02a1d5c13 ("perf script: Add 'brstackinsn' for branch stacks") Reported-by: Andi Kleen Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191127095322.15417-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 267ed5d8593cedd6146eabe00d270629c9cff771 Author: Andi Kleen Date: Wed Nov 20 16:15:12 2019 -0800 perf affinity: Add infrastructure to save/restore affinity The kernel perf subsystem has to IPI to the target CPU for many operations. On systems with many CPUs and when managing many events the overhead can be dominated by lots of IPIs. An alternative is to set up CPU affinity in the perf tool, then set up all the events for that CPU, and then move on to the next CPU. Add some affinity management infrastructure to enable such a model. Used in followon patches. Committer notes: Use zfree() in some places, add missing stdbool.h header, some minor coding style changes. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit d96645821e940bddff3fc5290656f83bf70d4c92 Author: Andi Kleen Date: Wed Nov 20 16:15:11 2019 -0800 perf pmu: Use file system cache to optimize sysfs access pmu.c does a lot of redundant /sys accesses while parsing aliases and probing for PMUs. On large systems with a lot of PMUs this can get expensive (>2s): % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 27.25 1.227847 8 160888 16976 openat 26.42 1.190481 7 164224 164077 stat Add a cache to remember if specific file names exist or don't exist, which eliminates most of this overhead. Also optimize some stat() calls to be slightly cheaper access() Resulting in: 0.18 0.004166 2 1851 305 open 0.08 0.001970 2 829 622 access Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191121001522.180827-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 5b596e0ff0e1852197d4c82d3314db5e43126bf7 Author: Arnaldo Carvalho de Melo Date: Wed Nov 27 10:13:34 2019 -0300 perf regs: Make perf_reg_name() return "unknown" instead of NULL To avoid breaking the build on arches where this is not wired up, at least all the other features should be made available and when using this specific routine, the "unknown" should point the user/developer to the need to wire this up on this particular hardware architecture. Detected in a container mipsel debian cross build environment, where it shows up as: In file included from /usr/mipsel-linux-gnu/include/stdio.h:867, from /git/linux/tools/perf/lib/include/perf/cpumap.h:6, from util/session.c:13: In function 'printf', inlined from 'regs_dump__printf' at util/session.c:1103:3, inlined from 'regs__printf' at util/session.c:1131:2: /usr/mipsel-linux-gnu/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=] 107 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cross compiler details: mipsel-linux-gnu-gcc (Debian 9.2.1-8) 9.2.1 20190909 Also on mips64: In file included from /usr/mips64-linux-gnuabi64/include/stdio.h:867, from /git/linux/tools/perf/lib/include/perf/cpumap.h:6, from util/session.c:13: In function 'printf', inlined from 'regs_dump__printf' at util/session.c:1103:3, inlined from 'regs__printf' at util/session.c:1131:2, inlined from 'regs_user__printf' at util/session.c:1139:3, inlined from 'dump_sample' at util/session.c:1246:3, inlined from 'machines__deliver_event' at util/session.c:1421:3: /usr/mips64-linux-gnuabi64/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=] 107 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'printf', inlined from 'regs_dump__printf' at util/session.c:1103:3, inlined from 'regs__printf' at util/session.c:1131:2, inlined from 'regs_intr__printf' at util/session.c:1147:3, inlined from 'dump_sample' at util/session.c:1249:3, inlined from 'machines__deliver_event' at util/session.c:1421:3: /usr/mips64-linux-gnuabi64/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=] 107 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cross compiler details: mips64-linux-gnuabi64-gcc (Debian 9.2.1-8) 9.2.1 20190909 Fixes: 2bcd355b71da ("perf tools: Add interface to arch registers sets") Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-95wjyv4o65nuaeweq31t7l1s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2b1ac6403f8800babed0f16ab1d29ee3300be122 Author: Arnaldo Carvalho de Melo Date: Wed Nov 27 09:58:22 2019 -0300 perf diff: Use llabs() with 64-bit values To fix this build error on a debian mipsel cross build environment: builtin-diff.c: In function 'compute_cycles_diff': builtin-diff.c:649:10: error: absolute value function 'labs' given an argument of type 's64' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value] 649 | val = labs(pair->block_info->cycles_spark[i] - | ^~~~ Fixes: cebf7d51a6c3 ("perf diff: Report noisy for cycles diff") Cc: Jin Yao Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-pn7szy5uw384ntjgk6zckh6a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 98e93245113d0f5c279ef77f4a9e7d097323ad71 Author: Arnaldo Carvalho de Melo Date: Wed Nov 27 09:58:22 2019 -0300 perf diff: Use llabs() with 64-bit values To fix these build errors on a debian mipsel cross build environment: builtin-diff.c: In function 'block_cycles_diff_cmp': builtin-diff.c:550:6: error: absolute value function 'labs' given an argument of type 's64' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value] 550 | l = labs(left->diff.cycles); | ^~~~ builtin-diff.c:551:6: error: absolute value function 'labs' given an argument of type 's64' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value] 551 | r = labs(right->diff.cycles); | ^~~~ Fixes: 99150a1faab2 ("perf diff: Use hists to manage basic blocks per symbol") Cc: Jin Yao Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-pn7szy5uw384ntjgk6zckh6a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 59c4bd853abcea95eccc167a7d7fd5f1a5f47b98 Author: Sebastian Andrzej Siewior Date: Thu Nov 28 09:53:06 2019 +0100 x86/fpu: Don't cache access to fpu_fpregs_owner_ctx The state/owner of the FPU is saved to fpu_fpregs_owner_ctx by pointing to the context that is currently loaded. It never changed during the lifetime of a task - it remained stable/constant. After deferred FPU registers loading until return to userland was implemented, the content of fpu_fpregs_owner_ctx may change during preemption and must not be cached. This went unnoticed for some time and was now noticed, in particular since gcc 9 is caching that load in copy_fpstate_to_sigframe() and reusing it in the retry loop: copy_fpstate_to_sigframe() load fpu_fpregs_owner_ctx and save on stack fpregs_lock() copy_fpregs_to_sigframe() /* failed */ fpregs_unlock() *** PREEMPTION, another uses FPU, changes fpu_fpregs_owner_ctx *** fault_in_pages_writeable() /* succeed, retry */ fpregs_lock() __fpregs_load_activate() fpregs_state_valid() /* uses fpu_fpregs_owner_ctx from stack */ copy_fpregs_to_sigframe() /* succeeds, random FPU content */ This is a comparison of the assembly produced by gcc 9, without vs with this patch: | # arch/x86/kernel/fpu/signal.c:173: if (!access_ok(buf, size)) | cmpq %rdx, %rax # tmp183, _4 | jb .L190 #, |-# arch/x86/include/asm/fpu/internal.h:512: return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; |-#APP |-# 512 "arch/x86/include/asm/fpu/internal.h" 1 |- movq %gs:fpu_fpregs_owner_ctx,%rax #, pfo_ret__ |-# 0 "" 2 |-#NO_APP |- movq %rax, -88(%rbp) # pfo_ret__, %sfp … |-# arch/x86/include/asm/fpu/internal.h:512: return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; |- movq -88(%rbp), %rcx # %sfp, pfo_ret__ |- cmpq %rcx, -64(%rbp) # pfo_ret__, %sfp |+# arch/x86/include/asm/fpu/internal.h:512: return fpu == this_cpu_read(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; |+#APP |+# 512 "arch/x86/include/asm/fpu/internal.h" 1 |+ movq %gs:fpu_fpregs_owner_ctx(%rip),%rax # fpu_fpregs_owner_ctx, pfo_ret__ |+# 0 "" 2 |+# arch/x86/include/asm/fpu/internal.h:512: return fpu == this_cpu_read(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; |+#NO_APP |+ cmpq %rax, -64(%rbp) # pfo_ret__, %sfp Use this_cpu_read() instead this_cpu_read_stable() to avoid caching of fpu_fpregs_owner_ctx during preemption points. The Fixes: tag points to the commit where deferred FPU loading was added. Since this commit, the compiler is no longer allowed to move the load of fpu_fpregs_owner_ctx somewhere else / outside of the locked section. A task preemption will change its value and stale content will be observed. [ bp: Massage. ] Debugged-by: Austin Clements Debugged-by: David Chase Debugged-by: Ian Lance Taylor Fixes: 5f409e20b7945 ("x86/fpu: Defer FPU state load until return to userspace") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Reviewed-by: Rik van Riel Tested-by: Borislav Petkov Cc: Aubrey Li Cc: Austin Clements Cc: Barret Rhoden Cc: Dave Hansen Cc: David Chase Cc: "H. Peter Anvin" Cc: ian@airs.com Cc: Ingo Molnar Cc: Josh Bleecher Snyder Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191128085306.hxfa2o3knqtu4wfn@linutronix.de Link: https://bugzilla.kernel.org/show_bug.cgi?id=205663 commit 22d0d5ae7a089967e9295a06694aa3e8a812b15e Author: Christian Lamparter Date: Sun Nov 24 15:40:59 2019 +0100 ath9k: use iowrite32 over __raw_writel This patch changes the ath9k_pci_owl_loader to use the same iowrite32 memory accessor that ath9k_pci is using to communicate with the PCI(e) chip. This will fix endian issues that came up during testing with loaned AVM Fritz!Box 7360 (Lantiq MIPS SoCs + AR9287). Fixes: 5a4f2040fd07 ("ath9k: add loader for AR92XX (and older) pci(e)") Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo commit 3d94a4a8373bf5f45cf5f939e88b8354dbf2311b Author: Ganapathi Bhat Date: Thu Nov 21 21:34:38 2019 +0530 mwifiex: fix possible heap overflow in mwifiex_process_country_ie() mwifiex_process_country_ie() function parse elements of bss descriptor in beacon packet. When processing WLAN_EID_COUNTRY element, there is no upper limit check for country_ie_len before calling memcpy. The destination buffer domain_info->triplet is an array of length MWIFIEX_MAX_TRIPLET_802_11D(83). The remote attacker can build a fake AP with the same ssid as real AP, and send malicous beacon packet with long WLAN_EID_COUNTRY elemen (country_ie_len > 83). Attacker can force STA connect to fake AP on a different channel. When the victim STA connects to fake AP, will trigger the heap buffer overflow. Fix this by checking for length and if found invalid, don not connect to the AP. This fix addresses CVE-2019-14895. Reported-by: huangwen Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo commit 6d29032c2cef31633db5dfd946fbcf9190dddef0 Author: Rahul Tanwar Date: Thu Nov 28 16:08:32 2019 +0800 pinctrl: Fix warning by adding missing MODULE_LICENSE Fix below build warning WARNING: modpost: missing MODULE_LICENSE() in drivers/pinctrl/pinctrl-equilibrium.o Introduced by commit 1948d5c51dba ("pinctrl: Add pinmux & GPIO controller driver for a new SoC") by adding missing MODULE_LICENSE. Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/20191128080832.13529-2-rahul.tanwar@linux.intel.com Signed-off-by: Linus Walleij commit e1e8c1fdce8b00fce08784d9d738c60ebf598ebc Author: Kailang Yang Date: Tue Nov 26 17:04:23 2019 +0800 ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236 headphone have noise even the volume is very small. Let it fill up pcbeep hidden register to default value. The issue was gone. Fixes: 4344aec84bd8 ("ALSA: hda/realtek - New codec support for ALC256") Fixes: 736f20a70608 ("ALSA: hda/realtek - Add support for ALC236/ALC3204") Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/9ae47f23a64d4e41a9c81e263cd8a250@realtek.com Signed-off-by: Takashi Iwai commit 013a53f2d25a9fa9b9e1f70f5baa3f56e3454052 Author: Anshuman Khandual Date: Mon Nov 25 08:36:31 2019 +0530 powerpc: Ultravisor: Add PPC_UV config option CONFIG_PPC_UV adds support for ultravisor. Signed-off-by: Anshuman Khandual Signed-off-by: Bharata B Rao Signed-off-by: Ram Pai [ Update config help and commit message ] Signed-off-by: Claudio Carvalho Reviewed-by: Sukadev Bhattiprolu Signed-off-by: Paul Mackerras commit 22945688acd4d0ec2620b0670a53110401ed9c59 Author: Bharata B Rao Date: Mon Nov 25 08:36:30 2019 +0530 KVM: PPC: Book3S HV: Support reset of secure guest Add support for reset of secure guest via a new ioctl KVM_PPC_SVM_OFF. This ioctl will be issued by QEMU during reset and includes the the following steps: - Release all device pages of the secure guest. - Ask UV to terminate the guest via UV_SVM_TERMINATE ucall - Unpin the VPA pages so that they can be migrated back to secure side when guest becomes secure again. This is required because pinned pages can't be migrated. - Reinit the partition scoped page tables After these steps, guest is ready to issue UV_ESM call once again to switch to secure mode. Signed-off-by: Bharata B Rao Signed-off-by: Sukadev Bhattiprolu [Implementation of uv_svm_terminate() and its call from guest shutdown path] Signed-off-by: Ram Pai [Unpinning of VPA pages] Signed-off-by: Paul Mackerras commit c32622575dd0ecb6fd0b41e3a451bd58152971ba Author: Bharata B Rao Date: Mon Nov 25 08:36:29 2019 +0530 KVM: PPC: Book3S HV: Handle memory plug/unplug to secure VM Register the new memslot with UV during plug and unregister the memslot during unplug. In addition, release all the device pages during unplug. Signed-off-by: Bharata B Rao Signed-off-by: Paul Mackerras commit 008e359c76d85facb10d10fa21fd5bc8c3a4e5d6 Author: Bharata B Rao Date: Mon Nov 25 08:36:28 2019 +0530 KVM: PPC: Book3S HV: Radix changes for secure guest - After the guest becomes secure, when we handle a page fault of a page belonging to SVM in HV, send that page to UV via UV_PAGE_IN. - Whenever a page is unmapped on the HV side, inform UV via UV_PAGE_INVAL. - Ensure all those routines that walk the secondary page tables of the guest don't do so in case of secure VM. For secure guest, the active secondary page tables are in secure memory and the secondary page tables in HV are freed when guest becomes secure. Signed-off-by: Bharata B Rao Signed-off-by: Paul Mackerras commit 60f0a643aa44e4bed3a74ea671110707dd64d892 Author: Bharata B Rao Date: Mon Nov 25 08:36:27 2019 +0530 KVM: PPC: Book3S HV: Shared pages support for secure guests A secure guest will share some of its pages with hypervisor (Eg. virtio bounce buffers etc). Support sharing of pages between hypervisor and ultravisor. Shared page is reachable via both HV and UV side page tables. Once a secure page is converted to shared page, the device page that represents the secure page is unmapped from the HV side page tables. Signed-off-by: Bharata B Rao Signed-off-by: Paul Mackerras commit ca9f4942670c37407bb109090eaf776ce2ccc54c Author: Bharata B Rao Date: Mon Nov 25 08:36:26 2019 +0530 KVM: PPC: Book3S HV: Support for running secure guests A pseries guest can be run as secure guest on Ultravisor-enabled POWER platforms. On such platforms, this driver will be used to manage the movement of guest pages between the normal memory managed by hypervisor (HV) and secure memory managed by Ultravisor (UV). HV is informed about the guest's transition to secure mode via hcalls: H_SVM_INIT_START: Initiate securing a VM H_SVM_INIT_DONE: Conclude securing a VM As part of H_SVM_INIT_START, register all existing memslots with the UV. H_SVM_INIT_DONE call by UV informs HV that transition of the guest to secure mode is complete. These two states (transition to secure mode STARTED and transition to secure mode COMPLETED) are recorded in kvm->arch.secure_guest. Setting these states will cause the assembly code that enters the guest to call the UV_RETURN ucall instead of trying to enter the guest directly. Migration of pages betwen normal and secure memory of secure guest is implemented in H_SVM_PAGE_IN and H_SVM_PAGE_OUT hcalls. H_SVM_PAGE_IN: Move the content of a normal page to secure page H_SVM_PAGE_OUT: Move the content of a secure page to normal page Private ZONE_DEVICE memory equal to the amount of secure memory available in the platform for running secure guests is created. Whenever a page belonging to the guest becomes secure, a page from this private device memory is used to represent and track that secure page on the HV side. The movement of pages between normal and secure memory is done via migrate_vma_pages() using UV_PAGE_IN and UV_PAGE_OUT ucalls. In order to prevent the device private pages (that correspond to pages of secure guest) from participating in KSM merging, H_SVM_PAGE_IN calls ksm_madvise() under read version of mmap_sem. However ksm_madvise() needs to be under write lock. Hence we call kvmppc_svm_page_in with mmap_sem held for writing, and it then downgrades to a read lock after calling ksm_madvise. [paulus@ozlabs.org - roll in patch "KVM: PPC: Book3S HV: Take write mmap_sem when calling ksm_madvise"] Signed-off-by: Bharata B Rao Signed-off-by: Paul Mackerras commit 33cf170715e87efd0608af6f2c056cafe0e7fc47 Author: Bharata B Rao Date: Mon Nov 25 08:36:25 2019 +0530 mm: ksm: Export ksm_madvise() On PEF-enabled POWER platforms that support running of secure guests, secure pages of the guest are represented by device private pages in the host. Such pages needn't participate in KSM merging. This is achieved by using ksm_madvise() call which need to be exported since KVM PPC can be a kernel module. Signed-off-by: Bharata B Rao Acked-by: Hugh Dickins Cc: Andrea Arcangeli Signed-off-by: Paul Mackerras commit 0a6cad5df541108cfd3fbd79eef48eb824c89bdc Merge: acc61b892936 9ca7d19ff8ba Author: Dave Airlie Date: Thu Nov 28 12:39:50 2019 +1000 Merge branch 'vmwgfx-coherent' of git://people.freedesktop.org/~thomash/linux into drm-next Graphics APIs like OpenGL 4.4 and Vulkan require the graphics driver to provide coherent graphics memory, meaning that the GPU sees any content written to the coherent memory on the next GPU operation that touches that memory, and the CPU sees any content written by the GPU to that memory immediately after any fence object trailing the GPU operation is signaled. Paravirtual drivers that otherwise require explicit synchronization needs to do this by hooking up dirty tracking to pagefault handlers and buffer object validation. Provide mm helpers needed for this and that also allow for huge pmd- and pud entries (patch 1-3), and the associated vmwgfx code (patch 4-7). The code has been tested and exercised by a tailored version of mesa where we disable all explicit synchronization and assume graphics memory is coherent. The performance loss varies of course; a typical number is around 5%. Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/20191113131639.4653-1-thomas_os@shipmail.org commit 7c3977d1e80401b1a25efded698b05d60ee26e31 Author: Alexei Starovoitov Date: Wed Nov 27 17:46:56 2019 -0800 libbpf: Fix sym->st_value print on 32-bit arches The st_value field is a 64-bit value and causing this error on 32-bit arches: In file included from libbpf.c:52: libbpf.c: In function 'bpf_program__record_reloc': libbpf_internal.h:59:22: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'Elf64_Addr' {aka 'const long long unsigned int'} [-Werror=format=] Fix it with (__u64) cast. Fixes: 1f8e2bcb2cd5 ("libbpf: Refactor relocation handling") Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Alexei Starovoitov commit a6ed68d6468bd5a3da78a103344ded1435fed57a Merge: 8c39f71ee201 acc61b892936 Author: Linus Torvalds Date: Wed Nov 27 17:45:48 2019 -0800 Merge tag 'drm-next-2019-11-27' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "Lots of stuff in here, though it hasn't been too insane this merge apart from dealing with the security fun. uapi: - export different colorspace properties on DP vs HDMI - new fourcc for ARM 16x16 block format - syncobj: allow querying last submitted timeline value - DRM_FORMAT_BIG_ENDIAN defined as unsigned core: - allow using gem vma manager in ttm - connector/encoder/bridge doc fixes - allow more than 3 encoders for a connector - displayport mst suspend/resume reprobing support - vram lazy unmapping, uniform vram mm and gem vram - edid cleanups + AVI informframe bar info - displayport helpers - dpcd parser added dp_cec: - Allow a connector to be associated with a cec device ttm: - pipelining with no_gpu_wait fix - always keep BOs on the LRU sched: - allow free_job routine to sleep i915: - Block userptr from mappable GTT - i915 perf uapi versioning - OA stream dynamic reconfiguration - make context persistence optional - introduce DRM_I915_UNSTABLE Kconfig - add fake lmem testing under unstable - BT.2020 support for DP MSA - struct mutex elimination - Tigerlake display/PLL/power management improvements - Jasper Lake PCH support - refactor PMU for multiple GPUs - Icelake firmware update - Split out vga + switcheroo code amdgpu: - implement dma-buf import/export without helpers - vega20 RAS enablement - DC i2c over aux fixes - renoir GPU reset - DC HDCP support - BACO support for CI/VI asics - MSI-X support - Arcturus EEPROM support - Arcturus VCN encode support - VCN dynamic powergating on RV/RV2 amdkfd: - add navi12/14/renoir support to kfd radeon: - SI dpm fix ported from amdgpu - fix bad DMA on ppc platforms gma500: - memory leak fixes qxl: - convert to new gem mmap exynos: - build warning fix komeda: - add aclk sysfs attribute v3d: - userspace cleanup uapi change i810: - fix for underflow in dispatch ioctls ast: - refactor show_cursor mgag200: - refactor show_cursor arcgpu: - encoder finding improvements mediatek: - mipi_tx, dsi and partial crtc support for MT8183 SoC - rotation support meson: - add suspend/resume support omap: - misc refactors tegra: - DisplayPort support for Tegra 210, 186 and 194. - IOMMU-backed DMA API fixes panfrost: - fix lockdep issue - simplify devfreq integration rcar-du: - R8A774B1 SoC support - fixes for H2 ES2.0 sun4i: - vcc-dsi regulator support virtio-gpu: - vmexit vs spinlock fix - move to gem shmem helpers - handle large command buffers with cma" * tag 'drm-next-2019-11-27' of git://anongit.freedesktop.org/drm/drm: (1855 commits) drm/amdgpu: invalidate mmhub semaphore workaround in gmc9/gmc10 drm/amdgpu: initialize vm_inv_eng0_sem for gfxhub and mmhub drm/amd/amdgpu/sriov skip RLCG s/r list for arcturus VF. drm/amd/amdgpu/sriov temporarily skip ras,dtm,hdcp for arcturus VF drm/amdgpu/gfx10: re-init clear state buffer after gpu reset merge fix for "ftrace: Rework event_create_dir()" drm/amdgpu: Update Arcturus golden registers drm/amdgpu/gfx10: fix out-of-bound mqd_backup array access drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt Revert "drm/amd/display: enable S/G for RAVEN chip" drm/amdgpu: disable gfxoff on original raven drm/amdgpu: remove experimental flag for Navi14 drm/amdgpu: disable gfxoff when using register read interface drm/amdgpu/powerplay: properly set PP_GFXOFF_MASK (v2) drm/amdgpu: fix bad DMA from INTERRUPT_CNTL2 drm/radeon: fix bad DMA from INTERRUPT_CNTL2 drm/amd/display: Fix debugfs on MST connectors drm/amdgpu/nv: add asic func for fetching vbios from rom directly drm/amdgpu: put flush_delayed_work at first drm/amdgpu/vcn2.5: fix the enc loop with hw fini ... commit 8c39f71ee2019e77ee14f88b1321b2348db51820 Merge: 95f1fa9e3418 bac139a84669 Author: Linus Torvalds Date: Wed Nov 27 17:17:40 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: "This is mostly to fix the iwlwifi regression: 1) Flush GRO state properly in iwlwifi driver, from Alexander Lobakin. 2) Validate TIPC link name with properly length macro, from John Rutherford. 3) Fix completion init and device query timeouts in ibmvnic, from Thomas Falcon. 4) Fix SKB size calculation for netlink messages in psample, from Nikolay Aleksandrov. 5) Similar kind of fix for OVS flow dumps, from Paolo Abeni. 6) Handle queue allocation failure unwind properly in gve driver, we could try to release pages we didn't allocate. From Jeroen de Borst. 7) Serialize TX queue SKB list accesses properly in mscc ocelot driver. From Yangbo Lu" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: net: usb: aqc111: Use the correct style for SPDX License Identifier net: phy: Use the correct style for SPDX License Identifier net: wireless: intel: iwlwifi: fix GRO_NORMAL packet stalling net: mscc: ocelot: use skb queue instead of skbs list net: mscc: ocelot: avoid incorrect consuming in skbs list gve: Fix the queue page list allocated pages count net: inet_is_local_reserved_port() port arg should be unsigned short openvswitch: fix flow command message size net: phy: dp83869: Fix return paths to return proper values net: psample: fix skb_over_panic net: usbnet: Fix -Wcast-function-type net: hso: Fix -Wcast-function-type net: port < inet_prot_sock(net) --> inet_port_requires_bind_service(net, port) ibmvnic: Serialize device queries ibmvnic: Bound waits for device queries ibmvnic: Terminate waiting device threads after loss of service ibmvnic: Fix completion structure initialization net-sctp: replace some sock_net(sk) with just 'net' net: Fix a documentation bug wrt. ip_unprivileged_port_start tipc: fix link name length check commit 1fd450f99272791df8ea8e1b0f5657678e118e90 Author: Arnaldo Carvalho de Melo Date: Tue Nov 26 12:10:45 2019 -0300 libbpf: Fix up generation of bpf_helper_defs.h $ make -C tools/perf build-test does, ends up with these two problems: make[3]: *** No rule to make target '/tmp/tmp.zq13cHILGB/perf-5.3.0/include/uapi/linux/bpf.h', needed by 'bpf_helper_defs.h'. Stop. make[3]: *** Waiting for unfinished jobs.... make[2]: *** [Makefile.perf:757: /tmp/tmp.zq13cHILGB/perf-5.3.0/tools/lib/bpf/libbpf.a] Error 2 make[2]: *** Waiting for unfinished jobs.... Because $(srcdir) points to the /tmp/tmp.zq13cHILGB/perf-5.3.0 directory and we need '/tools/ after that variable, and after fixing this then we get to another problem: /bin/sh: /home/acme/git/perf/tools/scripts/bpf_helpers_doc.py: No such file or directory make[3]: *** [Makefile:184: bpf_helper_defs.h] Error 127 make[3]: *** Deleting file 'bpf_helper_defs.h' LD /tmp/build/perf/libapi-in.o make[2]: *** [Makefile.perf:778: /tmp/build/perf/libbpf.a] Error 2 make[2]: *** Waiting for unfinished jobs.... Because this requires something outside the tools/ directories that gets collected into perf's detached tarballs, to fix it just add it to tools/perf/MANIFEST, which this patch does, now it works for that case and also for all these other cases. Fixes: e01a75c15969 ("libbpf: Move bpf_{helpers, helper_defs, endian, tracing}.h into libbpf") Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Alexei Starovoitov Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Martin KaFai Lau Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-4pnkg2vmdvq5u6eivc887wen@git.kernel.org Link: https://lore.kernel.org/bpf/20191126151045.GB19483@kernel.org commit 53f8dd434b6fe666b1c4e0be80a8727e8fa9839f Author: Andrii Nakryiko Date: Wed Nov 27 12:06:50 2019 -0800 libbpf: Fix global variable relocation Similarly to a0d7da26ce86 ("libbpf: Fix call relocation offset calculation bug"), relocations against global variables need to take into account referenced symbol's st_value, which holds offset into a corresponding data section (and, subsequently, offset into internal backing map). For static variables this offset is always zero and data offset is completely described by respective instruction's imm field. Convert a bunch of selftests to global variables. Previously they were relying on `static volatile` trick to ensure Clang doesn't inline static variables, which with global variables is not necessary anymore. Fixes: 393cdfbee809 ("libbpf: Support initialized global variables") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191127200651.1381348-1-andriin@fb.com commit b568405856906ee4d9ba6284fd36f2928653a623 Author: Andrii Nakryiko Date: Wed Nov 27 12:01:34 2019 -0800 libbpf: Fix Makefile' libbpf symbol mismatch diagnostic Fix Makefile's diagnostic diff output when there is LIBBPF_API-versioned symbols mismatch. Fixes: 1bd63524593b ("libbpf: handle symbol versioning properly for libbpf.a") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191127200134.1360660-1-andriin@fb.com commit 82995cc6c5ae4bf4d72edef381a085e52d5b5905 Author: David Howells Date: Mon Mar 25 16:38:32 2019 +0000 libceph, rbd, ceph: convert to use the new mount API Convert the ceph filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. [ Numerous string handling, leak and regression fixes; rbd conversion was particularly broken and had to be redone almost from scratch. ] Signed-off-by: David Howells Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 95f1fa9e3418d50ce099e67280b5497b9c93843b Merge: 477093b3e144 16c0f03f629a Author: Linus Torvalds Date: Wed Nov 27 11:42:01 2019 -0800 Merge tag 'trace-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "New tracing features: - New PERMANENT flag to ftrace_ops when attaching a callback to a function. As /proc/sys/kernel/ftrace_enabled when set to zero will disable all attached callbacks in ftrace, this has a detrimental impact on live kernel tracing, as it disables all that it patched. If a ftrace_ops is registered to ftrace with the PERMANENT flag set, it will prevent ftrace_enabled from being disabled, and if ftrace_enabled is already disabled, it will prevent a ftrace_ops with PREMANENT flag set from being registered. - New register_ftrace_direct(). As eBPF would like to register its own trampolines to be called by the ftrace nop locations directly, without going through the ftrace trampoline, this function has been added. This allows for eBPF trampolines to live along side of ftrace, perf, kprobe and live patching. It also utilizes the ftrace enabled_functions file that keeps track of functions that have been modified in the kernel, to allow for security auditing. - Allow for kernel internal use of ftrace instances. Subsystems in the kernel can now create and destroy their own tracing instances which allows them to have their own tracing buffer, and be able to record events without worrying about other users from writing over their data. - New seq_buf_hex_dump() that lets users use the hex_dump() in their seq_buf usage. - Notifications now added to tracing_max_latency to allow user space to know when a new max latency is hit by one of the latency tracers. - Wider spread use of generic compare operations for use of bsearch and friends. - More synthetic event fields may be defined (32 up from 16) - Use of xarray for architectures with sparse system calls, for the system call trace events. This along with small clean ups and fixes" * tag 'trace-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (51 commits) tracing: Enable syscall optimization for MIPS tracing: Use xarray for syscall trace events tracing: Sample module to demonstrate kernel access to Ftrace instances. tracing: Adding new functions for kernel access to Ftrace instances tracing: Fix Kconfig indentation ring-buffer: Fix typos in function ring_buffer_producer ftrace: Use BIT() macro ftrace: Return ENOTSUPP when DYNAMIC_FTRACE_WITH_DIRECT_CALLS is not configured ftrace: Rename ftrace_graph_stub to ftrace_stub_graph ftrace: Add a helper function to modify_ftrace_direct() to allow arch optimization ftrace: Add helper find_direct_entry() to consolidate code ftrace: Add another check for match in register_ftrace_direct() ftrace: Fix accounting bug with direct->count in register_ftrace_direct() ftrace/selftests: Fix spelling mistake "wakeing" -> "waking" tracing: Increase SYNTH_FIELDS_MAX for synthetic_events ftrace/samples: Add a sample module that implements modify_ftrace_direct() ftrace: Add modify_ftrace_direct() tracing: Add missing "inline" in stub function of latency_fsnotify() tracing: Remove stray tab in TRACE_EVAL_MAP_FILE's help text tracing: Use seq_buf_hex_dump() to dump buffers ... commit 477093b3e144aa0ece07a5fd2a84013d037e2776 Merge: 6a0e20cd8cdd 22648c989cb8 Author: Linus Torvalds Date: Wed Nov 27 11:30:55 2019 -0800 Merge tag 'microblaze-v5.5-rc1' of git://git.monstr.eu/linux-2.6-microblaze Pull Microblaze updates from Michal Simek: - extend DTB space - defconfig update - clean up rescheduling logic - enable SPARSE_IRQ * tag 'microblaze-v5.5-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Increase max dtb size to 64K from 32K microblaze: Enable SPARSE_IRQ microblaze: defconfig: Enable devtmps and tmpfs microblaze: entry: Remove unneeded need_resched() loop commit 6a0e20cd8cddd70ae5c1211ebe102d738ff2069b Merge: 80eb5fea3c14 5ba9aa56e6d3 Author: Linus Torvalds Date: Wed Nov 27 11:27:59 2019 -0800 Merge tag 'riscv/for-v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Paul Walmsley: "New features: - SECCOMP support - nommu support - SBI-less system support - M-Mode support - TLB flush optimizations Other improvements: - Pass the complete RISC-V ISA string supported by the CPU cores to userspace, rather than redacting parts of it in the kernel - Add platform DMA IP block data to the HiFive Unleashed board DT file - Add Makefile support for BZ2, LZ4, LZMA, LZO kernel image compression formats, in line with other architectures Cleanups: - Remove unnecessary PTE_PARENT_SIZE macro - Standardize include guard naming across arch/riscv" * tag 'riscv/for-v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (22 commits) riscv: provide a flat image loader riscv: add nommu support riscv: clear the instruction cache and all registers when booting riscv: read the hart ID from mhartid on boot riscv: provide native clint access for M-mode riscv: dts: add support for PDMA device of HiFive Unleashed Rev A00 riscv: add support for MMIO access to the timer registers riscv: implement remote sfence.i using IPIs riscv: cleanup the default power off implementation riscv: poison SBI calls for M-mode riscv: don't allow selecting SBI based drivers for M-mode RISC-V: Add multiple compression image format. riscv: clean up the macro format in each header file riscv: Use PMD_SIZE to replace PTE_PARENT_SIZE riscv: abstract out CSR names for supervisor vs machine mode riscv: separate MMIO functions into their own header file riscv: enter WFI in default_power_off() if SBI does not shutdown RISC-V: Issue a tlb page flush if possible RISC-V: Issue a local tlbflush if possible. RISC-V: Do not invoke SBI call if cpumask is empty ... commit bac139a846697b290c74fefd6af54a9e192de315 Author: Nishad Kamdar Date: Wed Nov 27 19:15:52 2019 +0530 net: usb: aqc111: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to drivers for USB Network devices. This patch gives an explicit block comment to the SPDX License Identifier. Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: David S. Miller commit 9aab906a9adc292f2bb7eccfd0b1c0aa862296ca Author: Nishad Kamdar Date: Wed Nov 27 18:49:08 2019 +0530 net: phy: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to PHY Layer for Ethernet drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). This patch also gives an explicit block comment to the SPDX License Identifier. Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: David S. Miller commit 80eb5fea3c14fb171facb5242a1555b3aafea4d0 Merge: 9a3d7fd275be af2e8c68b9c5 Author: Linus Torvalds Date: Wed Nov 27 11:25:04 2019 -0800 Merge tag 'powerpc-spectre-rsb' of powerpc-CVE-2019-18660.bundle Pull powerpc Spectre-RSB fixes from Michael Ellerman: "We failed to activate the mitigation for Spectre-RSB (Return Stack Buffer, aka. ret2spec) on context switch, on CPUs prior to Power9 DD2.3. That allows a process to poison the RSB (called Link Stack on Power CPUs) and possibly misdirect speculative execution of another process. If the victim process can be induced to execute a leak gadget then it may be possible to extract information from the victim via a side channel. The fix is to correctly activate the link stack flush mitigation on all CPUs that have any mitigation of Spectre v2 in userspace enabled. There's a second commit which adds a link stack flush in the KVM guest exit path. A leak via that path has not been demonstrated, but we believe it's at least theoretically possible. This is the fix for CVE-2019-18660" * tag 'powerpc-spectre-rsb' of /home/torvalds/Downloads/powerpc-CVE-2019-18660.bundle: KVM: PPC: Book3S HV: Flush link stack on guest exit to host kernel powerpc/book3s64: Fix link stack flush on context switch commit b167191e2a851cb2e4c6ef8b91c83ff73ef41872 Author: Alexander Lobakin Date: Wed Nov 27 12:41:23 2019 +0300 net: wireless: intel: iwlwifi: fix GRO_NORMAL packet stalling Commit 6570bc79c0df ("net: core: use listified Rx for GRO_NORMAL in napi_gro_receive()") has applied batched GRO_NORMAL packets processing to all napi_gro_receive() users, including mac80211-based drivers. However, this change has led to a regression in iwlwifi driver [1][2] as it is required for NAPI users to call napi_complete_done() or napi_complete() and the end of every polling iteration, whilst iwlwifi doesn't use NAPI scheduling at all and just calls napi_gro_flush(). In that particular case, packets which have not been already flushed from napi->rx_list stall in it until at least next Rx cycle. Fix this by adding a manual flushing of the list to iwlwifi driver right before napi_gro_flush() call to mimic napi_complete() logics. I prefer to open-code gro_normal_list() rather than exporting it for 2 reasons: * to prevent from using it and napi_gro_flush() in any new drivers, as it is the *really* bad way to use NAPI that should be avoided; * to keep gro_normal_list() static and don't lose any CC optimizations. I also don't add the "Fixes:" tag as the mentioned commit was only a trigger that only exposed an improper usage of NAPI in this particular driver. [1] https://lore.kernel.org/netdev/PSXP216MB04388962C411CD0B17A86F47804A0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM [2] https://bugzilla.kernel.org/show_bug.cgi?id=205647 Signed-off-by: Alexander Lobakin Acked-by: Luca Coelho Reported-by: Nicholas Johnson Tested-by: Nicholas Johnson Reviewed-by: Edward Cree Signed-off-by: David S. Miller commit da5fb18225b49b97bb37c51bcbbb2990a507c364 Author: Stanislav Fomichev Date: Wed Nov 27 08:14:10 2019 -0800 bpf: Support pre-2.25-binutils objcopy for vmlinux BTF If vmlinux BTF generation fails, but CONFIG_DEBUG_INFO_BTF is set, .BTF section of vmlinux is empty and kernel will prohibit BPF loading and return "in-kernel BTF is malformed". --dump-section argument to binutils' objcopy was added in version 2.25. When using pre-2.25 binutils, BTF generation silently fails. Convert to --only-section which is present on pre-2.25 binutils. Documentation/process/changes.rst states that binutils 2.21+ is supported, not sure those standards apply to BPF subsystem. v2: * exit and print an error if gen_btf fails (John Fastabend) v3: * resend with Andrii's Acked-by/Tested-by tags Fixes: 341dfcf8d78ea ("btf: expose BTF info through sysfs") Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Cc: John Fastabend Link: https://lore.kernel.org/bpf/20191127161410.57327-1-sdf@google.com commit 9a3d7fd275be4559277667228902824165153c80 Merge: 0dd09bc02c1b 0e4a459f56c3 Author: Linus Torvalds Date: Wed Nov 27 11:06:20 2019 -0800 Merge tag 'driver-core-5.5-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.5-rc1 There's a few minor cleanups and fixes in here, but the majority of the patches in here fall into two buckets: - debugfs api cleanups and fixes - driver core device link support for boot dependancy issues The debugfs api cleanups are working to slowly refactor the debugfs apis so that it is even harder to use incorrectly. That work has been happening for the past few kernel releases and will continue over time, it's a long-term project/goal The driver core device link support missed 5.4 by just a bit, so it's been sitting and baking for many months now. It's from Saravana Kannan to help resolve the problems that DT-based systems have at boot time with dependancy graphs and kernel modules. Turns out that no one has actually tried to build a generic arm64 kernel with loads of modules and have it "just work" for a variety of platforms (like a distro kernel). The big problem turned out to be a lack of dependency information between different areas of DT entries, and the work here resolves that problem and now allows devices to boot properly, and quicker than a monolith kernel. All of these patches have been in linux-next for a long time with no reported issues" * tag 'driver-core-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (68 commits) tracing: Remove unnecessary DEBUG_FS dependency of: property: Add device link support for interrupt-parent, dmas and -gpio(s) debugfs: Fix !DEBUG_FS debugfs_create_automount of: property: Add device link support for "iommu-map" of: property: Fix the semantics of of_is_ancestor_of() i2c: of: Populate fwnode in of_i2c_get_board_info() drivers: base: Fix Kconfig indentation firmware_loader: Fix labels with comma for builtin firmware driver core: Allow device link operations inside sync_state() driver core: platform: Declare ret variable only once cpu-topology: declare parse_acpi_topology in crypto: hisilicon: no need to check return value of debugfs_create functions driver core: platform: use the correct callback type for bus_find_device firmware_class: make firmware caching configurable driver core: Clarify documentation for fwnode_operations.add_links() mailbox: tegra: Fix superfluous IRQ error message net: caif: Fix debugfs on 64-bit platforms mac80211: Use debugfs_create_xul() helper media: c8sectpfe: no need to check return value of debugfs_create functions of: property: Add device link support for iommus, mboxes and io-channels ... commit 0dd09bc02c1bad55e92306ca83b38b3cf48b9f40 Merge: 8f56e4ebe05c 0f6f8749872e Author: Linus Torvalds Date: Wed Nov 27 10:57:52 2019 -0800 Merge tag 'staging-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging / iio updates from Greg KH: "Here is the big staging and iio set of patches for the 5.5-rc1 release. It's the usual huge collection of cleanup patches all over the drivers/staging/ area, along with a new staging driver, and a bunch of new IIO drivers as well. Full details are in the shortlog, but all of these have been in linux-next for a long time with no reported issues" * tag 'staging-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (548 commits) staging: vchiq: Have vchiq_dump_* functions return an error code staging: vchiq: Refactor indentation in vchiq_dump_* functions staging: fwserial: Fix Kconfig indentation (seven spaces) staging: vchiq_dump: Replace min with min_t staging: vchiq: Fix block comment format in vchiq_dump() staging: octeon: indent with tabs instead of spaces staging: comedi: usbduxfast: usbduxfast_ai_cmdtest rounding error staging: most: core: remove sysfs attr remove_link staging: vc04: Fix Kconfig indentation staging: pi433: Fix Kconfig indentation staging: nvec: Fix Kconfig indentation staging: most: Fix Kconfig indentation staging: fwserial: Fix Kconfig indentation staging: fbtft: Fix Kconfig indentation fbtft: Drop OF dependency fbtft: Make use of device property API fbtft: Drop useless #ifdef CONFIG_OF and dead code fbtft: Describe function parameters in kernel-doc fbtft: Make sure string is NULL terminated staging: rtl8723bs: remove set but not used variable 'change', 'pos' ... commit 8f56e4ebe05c26c30e167519273843476e39e244 Merge: 59274c716480 b78cda795ac8 Author: Linus Torvalds Date: Wed Nov 27 10:53:50 2019 -0800 Merge tag 'char-misc-5.5-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 driver patches for 5.5-rc1 Loads of different things in here, this feels like the catch-all of driver subsystems these days. Full details are in the shortlog, but nothing major overall, just lots of driver updates and additions. All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (198 commits) char: Fix Kconfig indentation, continued habanalabs: add more protection of device during reset habanalabs: flush EQ workers in hard reset habanalabs: make the reset code more consistent habanalabs: expose reset counters via existing INFO IOCTL habanalabs: make code more concise habanalabs: use defines for F/W files habanalabs: remove prints on successful device initialization habanalabs: remove unnecessary checks habanalabs: invalidate MMU cache only once habanalabs: skip VA block list update in reset flow habanalabs: optimize MMU unmap habanalabs: prevent read/write from/to the device during hard reset habanalabs: split MMU properties to PCI/DRAM habanalabs: re-factor MMU masks and documentation habanalabs: type specific MMU cache invalidation habanalabs: re-factor memory module code habanalabs: export uapi defines to user-space habanalabs: don't print error when queues are full habanalabs: increase max jobs number to 512 ... commit a02e3991af3d8fd6c529331554d543bc329f5669 Merge: a95069ecb709 b049da133808 Author: David S. Miller Date: Wed Nov 27 10:53:37 2019 -0800 Merge branch 'mscc-skb-lists' Yangbo Lu says: ==================== net: mscc: ocelot: fix potential issues accessing skbs list Fix two prtential issues accessing skbs list. - Break the matching loop when find the matching skb to avoid consuming more skbs incorrectly. The timestamp ID is only from 0 to 3 while the FIFO supports 128 timestamps at most. - Convert to use skb queue instead of the list of skbs to provide protect with lock. Changes for v2: - Split into two patches. - Converted to use skb queue. ==================== Signed-off-by: David S. Miller commit b049da1338082714262034a8c8b87022623dc106 Author: Yangbo Lu Date: Wed Nov 27 15:27:57 2019 +0800 net: mscc: ocelot: use skb queue instead of skbs list Convert to use skb queue instead of the list of skbs. The skb queue could provide protection with lock. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit fc62c0948986b7aa6b2871a450a4469e35c5f9bc Author: Yangbo Lu Date: Wed Nov 27 15:27:56 2019 +0800 net: mscc: ocelot: avoid incorrect consuming in skbs list Break the matching loop when find the matching skb for TX timestamp. This is to avoid consuming more skbs incorrectly. The timestamp ID is from 0 to 3 while the FIFO could support 128 timestamps at most. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 59274c7164807d27b24e6c068dfe734f7bea4623 Merge: d76886972823 91a9f2d3f976 Author: Linus Torvalds Date: Wed Nov 27 10:46:34 2019 -0800 Merge tag 'usb-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB updates from Greg KH: "Here is the big set of USB patches for 5.5-rc1 Lots of little things in here: - typec updates and additions - usb-serial drivers cleanups and fixes - misc USB drivers cleanups and fixes - gadget drivers new features and controllers added - usual xhci additions - other minor changes All of these have been in linux-next with no reported issues" * tag 'usb-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (223 commits) usb: gadget: udc: gr_udc: create debugfs directory under usb root usb: gadget: atmel: create debugfs directory under usb root usb: musb: create debugfs directory under usb root usb: serial: Fix Kconfig indentation usb: misc: Fix Kconfig indentation usb: gadget: Fix Kconfig indentation usb: host: Fix Kconfig indentation usb: dwc3: Fix Kconfig indentation usb: gadget: configfs: Fix missing spin_lock_init() usb-storage: Disable UAS on JMicron SATA enclosure USB: documentation: flags on usb-storage versus UAS USB: uas: heed CAPACITY_HEURISTICS USB: uas: honor flag to avoid CAPACITY16 usb: host: xhci-tegra: Correct phy enable sequence usb-serial: cp201x: support Mark-10 digital force gauge usb: chipidea: imx: pinctrl for HSIC is optional usb: chipidea: imx: refine the error handling for hsic usb: chipidea: imx: change hsic power regulator as optional usb: chipidea: imx: check data->usbmisc_data against NULL before access usb: chipidea: core: change vbus-regulator as optional ... commit 87f67cc4c7b81273fd1d9f775192eeb3124562f9 Author: Guenter Roeck Date: Wed Nov 27 07:26:12 2019 -0800 MIPS: Fix boot on Fuloong2 systems Commit 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES") changed Kconfig symbols as follows: CPU_LOONGSON2 to CPU_LOONGSON2EF CPU_LOONGSON3 to CPU_LOONGSON64 SYS_HAS_CPU_LOONGSON3 to SYS_HAS_CPU_LOONGSON64 It did not touch SYS_HAS_CPU_LOONGSON2E or SYS_HAS_CPU_LOONGSON2F. However, the patch changed a conditional from #if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \ defined(CONFIG_SYS_HAS_CPU_LOONGSON2F) to #if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF) SYS_HAS_CPU_LOONGSON2EF does not exist, resulting in boot failures with the qemu fulong2e emulation. Revert to the original code. Fixes: 268a2d60013049 ("MIPS: Loongson64: Rename CPU TYPES") Cc: Jiaxun Yang Signed-off-by: Guenter Roeck Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit d76886972823ce456c0c61cd2284e85668e2131e Merge: 0e45384ceccc f295e4cece5c Author: Linus Torvalds Date: Wed Nov 27 10:17:28 2019 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "Again another fairly quiet cycle with few notable core code changes and the usual variety of driver bug fixes and small improvements. - Various driver updates and bug fixes for siw, bnxt_re, hns, qedr, iw_cxgb4, vmw_pvrdma, mlx5 - Improvements in SRPT from working with iWarp - SRIOV VF support for bnxt_re - Skeleton kernel-doc files for drivers/infiniband - User visible counters for events related to ODP - Common code for tracking of mmap lifetimes so that drivers can link HW object liftime to a VMA - ODP bug fixes and rework - RDMA READ support for efa - Removal of the very old cxgb3 driver" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (168 commits) RDMA/hns: Delete unnecessary callback functions for cq RDMA/hns: Rename the functions used inside creating cq RDMA/hns: Redefine the member of hns_roce_cq struct RDMA/hns: Redefine interfaces used in creating cq RDMA/efa: Expose RDMA read related attributes RDMA/efa: Support remote read access in MR registration RDMA/efa: Store network attributes in device attributes IB/hfi1: remove redundant assignment to variable ret RDMA/bnxt_re: Fix missing le16_to_cpu RDMA/bnxt_re: Fix stat push into dma buffer on gen p5 devices RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series RDMA/bnxt_re: Fix Kconfig indentation IB/mlx5: Implement callbacks for getting VFs GUID attributes IB/ipoib: Add ndo operation for getting VFs GUID attributes IB/core: Add interfaces to get VF node and port GUIDs net/core: Add support for getting VF GUIDs RDMA/qedr: Fix null-pointer dereference when calling rdma_user_mmap_get_offset RDMA/cm: Use refcount_t type for refcount variable IB/mlx5: Support extended number of strides for Striding RQ IB/mlx4: Update HW GID table while adding vlan GID ... commit 0e45384cecccaa950783e67e7a29ed470133f19d Merge: dc5fa4656864 def7bd940f8c Author: Linus Torvalds Date: Wed Nov 27 10:03:52 2019 -0800 Merge tag 'mmc-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "These are the updates for MMC and MEMSTICK for v5.5. Note that this also contains quite some additional changes reaching beyond both the MMC and MEMSTICK subsystems. This is primarily because of fixing an old regression for a WiFi driver based on the SDIO interface on an OMAP openpandora board MMC core: - Add CMD13 polling for MMC IOCTLS with R1B response. - Add common DT properties for clk-phase-delays for various speed modes. - Fix size overflow for mmc gp-partitions. - Re-work HW reset for SDIO cards, which also includes a re-work for Marvell's WiFi mwifiex SDIO func driver. MMC host: - jz4740: Add support for X1000 and JZ4760. - jz4740: Add support for 8-bit bus and for low power mode. - mmci: Add support for HW busy timeout for the stm32_sdmmc variant. - owl-mmc: Add driver for Actions Semi Owl SoCs SD/MMC controller. - renesas_sdhi: Add support for r8a774b1. - sdhci_am654: Add support for Command Queuing Engine for J721E. - sdhci-milbeaut: Add driver for the Milbeaut SD controller. - sdhci-of-arasan: Add support for ZynqMP tap-delays. - sdhci-of-arasan: Add support for clk-phase-delays for SD cards. - sdhci-of-arasan: Add support for Intel LGM SDXC. - sdhci-of-aspeed: Allow inversion of the internal card detect signal. - sdhci-of-esdhc: Fixup workaround for erratum A-008171 for tunings. - sdhci-of-at91: Improve support for calibration. - sdhci-pci: Add support for Intel JSL. - sdhci-pci: Add quirk for AMD SDHC Device 0x7906. - tmio: Enable support for erase/discard/trim requests. MMC/OMAP/pandora/wl1251: The TI wl1251 WiFi driver for SDIO on the OMAP openpandora board has been broken since v4.7. To fix the problems, changes have been made cross subsystems, but also to OMAP2 machine code and to openpandora DTS files, as summarized below. Relevant changes have been tagged for stable. - mmc/wl1251: Re-introduce lost SDIO quirks and vendor-id for wl1251 - omap/omap_hsmmc: Remove redundant platform config for openpandora - omap_hsmmc: Initialize non-std SDIO card for wl1251 for pandora - omap/dts/pandora: Specify wl1251 through a child node of mmc3 - wl1251: Add devicetree support for TI wl1251 SDIO" * tag 'mmc-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (73 commits) dt-bindings: mmc: Correct the type of the clk phase properties Revert "mmc: tmio: remove workaround for NON_REMOVABLE" memstick: Fix Kconfig indentation mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup dt-bindings: mmc: arasan: Document 'xlnx,zynqmp-8.9a' controller firmware: xilinx: Add SDIO Tap Delay nodes mmc: sdhci-of-arasan: Add support to set clock phase delays for SD dt-bindings: mmc: Add optional generic properties for mmc mmc: sdhci-of-arasan: Add sampling clock for a phy to use dt-bindings: mmc: arasan: Update Documentation for the input clock mmc: sdhci-of-arasan: Separate out clk related data to another structure mmc: sdhci: Fix grammar in warning message mmc: sdhci-of-aspeed: add inversion signal presence mmc: sdhci-of-aspeed: enable CONFIG_MMC_SDHCI_IO_ACCESSORS mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E mmc: core: Fix size overflow for mmc partitions mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests net: wireless: ti: remove local VENDOR_ID and DEVICE_ID definitions net: wireless: ti: wl1251 use new SDIO_VENDOR_ID_TI_WL1251 definition mmc: core: fix wl1251 sdio quirks ... commit dc5fa4656864d3391cdf13512ffa0733ef72fcdc Merge: 3d9e3501a064 ae75b53e08b9 Author: Linus Torvalds Date: Wed Nov 27 10:00:33 2019 -0800 Merge tag 'pinctrl-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes for v5.5. It is pretty much business as usual, the most interesting thing I think is the pin controller for a new Intel chip called Lightning Mountain, which is according to news reports some kind of embedded network processor and what is surprising about it is that Intel have decided to use device tree to describe the system rather than ACPI that they have traditionally favored. Core changes: - Avoid taking direct references to device tree-supplied device names: these may changed at runtime under certain circumstances to kstrdup them. GPIO related: - Work is ongoing to move to passing the irqchip along as a templated struct gpio_irq_chip when adding a standard gpiolib-based irqchip to a GPIO controller, a few patches in this cycle switches a few pin control drivers over to using this method. New hardware support: - Intel Lightning Mountain SoC pin controller and GPIO support, a first Intel platform to use device tree rather than ACPI to configure the system. News reports says that this SoC is a network processor. - Qualcomm MSM8976 and MSM8956 - Qualcomm PMIC GPIO now also supports PM6150 and PM6150L - Qualcomm SPMI MPP and SPMI GPIO for PM8950 and PMI8950 - Rockchip RK3308 - Renesas R8A77961 - Allwinner Meson-A1 Driver improvements: - get_multiple and set_multiple support for the AT91-PIO4 driver. - Convert Qualcomm SSBI GPIO to use the hierarchical IRQ helpers in the GPIOlib irqchip" * tag 'pinctrl-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (93 commits) pinctrl: ingenic: Add OTG VBUS pin for the JZ4770 pinctrl: ingenic: Handle PIN_CONFIG_OUTPUT config pinctrl: Fix Kconfig indentation pinctrl: lewisburg: Update pin list according to v1.1v6 MAINTAINERS: Replace my email by one @kernel.org pinctrl: armada-37xx: Fix irq mask access in armada_37xx_irq_set_type() dt-bindings: pinctrl: intel: Add for new SoC pinctrl: Add pinmux & GPIO controller driver for a new SoC pinctrl: rza1: remove unnecessary static inline function pinctrl: meson: add pinctrl driver support for Meson-A1 SoC pinctrl: meson: add a new callback for SoCs fixup pinctrl: nomadik: db8500: Add mc0_a_2 pin group without direction control dt-bindings: pinctrl: Convert generic pin mux and config properties to schema pinctrl: cherryview: Missed type change to unsigned int pinctrl: intel: Missed type change to unsigned int pinctrl: use devm_platform_ioremap_resource() to simplify code pinctrl: just return if no valid maps dt-bindings: pinctrl: qcom-pmic-mpp: Add support for PM/PMI8950 pinctrl: qcom: spmi-mpp: Add PM/PMI8950 compatible strings dt-bindings: pinctrl: qcom-pmic-gpio: Add support for PM/PMI8950 ... commit 3d9e3501a064eff90274f1ce927fe71ca1ff4205 Merge: 00074a7007c2 4a1288f1c1cf Author: Linus Torvalds Date: Wed Nov 27 09:58:49 2019 -0800 Merge tag 'hwmon-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - Add support for Texas Instruments TMP512/513 - Add support for LTC2947 - Add support for BEL PFE1100 and PFE3000 - Various minor improvements and fixes * tag 'hwmon-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: dell-smm-hwmon: Add documentation hwmon: (dell-smm) Add support for disabling automatic BIOS fan control hwmon: Add driver for Texas Instruments TMP512/513 sensor chips. dt-bindings: hwmon: Add TMP512/513 docs: hwmon: Document bel-pfe pmbus driver hwmon: (pmbus) add driver for BEL PFE1100 and PFE3000 dt-bindings: hwmon: Add ltc2947 documentation hwmon: Add support for ltc2947 hwmon: (ina3221) Add summation feature support hwmon: (tmp421) Allow reading at 2Hz instead of 0.5Hz hwmon: (w83793d) remove redundant assignment to variable res hwmon: (pmbus/ibm-cffps) Add version detection capability dt-bindings: hwmon: Document ibm,cffps compatible string hwmon: abituguru: make array probe_order static, makes object smaller hwmon: (applesmc) switch to using input device polling mode hwmon: (aspeed-pwm-tacho) Use devm_platform_ioremap_resource() in aspeed_pwm_tacho_probe() hwmon: (pmbus/ibm-cffps) Fix LED blink behavior hwmon: (pmbus/ibm-cffps) Switch LEDs to blocking brightness call commit 00074a7007c24f947a9f9baf66bf5db2fe651ee9 Merge: 89d57dddd7d3 9480029fe5c2 Author: Linus Torvalds Date: Wed Nov 27 09:55:39 2019 -0800 Merge tag 'for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - test_power: add support for current and charge_counter - cpcap-charger: improve charge calculation and limit default charge voltage - ab8500: convert to IIO - misc small fixes all over drivers * tag 'for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (29 commits) power: supply: bd70528: Add MODULE_ALIAS to allow module auto loading power: supply: ab8500_charger: Fix inconsistent IS_ERR and PTR_ERR power: supply: cpcap-charger: cpcap_charger_voltage_to_regval() can be static power: supply: cpcap-battery: Add basic coulomb counter calibrate support power: supply: cpcap-battery: Read and save integrator register CCI power: supply: cpcap-battery: Simplify short term power average calculation power: supply: cpcap-battery: Simplify coulomb counter calculation with div_s64 power: supply: cpcap-battery: Move coulomb counter units per lsb to ddata power: supply: cpcap-charger: Allow changing constant charge voltage power: supply: cpcap-battery: Fix handling of lowered charger voltage power: supply: cpcap-charger: Improve battery detection power: supply: cpcap-battery: Check voltage before orderly_poweroff power: supply: cpcap-charger: Limit voltage to 4.2V for battery power: supply: ab8500: Handle invalid IRQ from platform_get_irq_byname() power: supply: ab8500_fg: Do not free non-requested IRQs in probe's error path power: supply: ab8500: Cleanup probe in reverse order power: reset: at91: fix __le32 cast in reset code power: supply: abx500_chargalg: Fix code indentation mfd: Switch the AB8500 GPADC to IIO iio: adc: New driver for the AB8500 GPADC ... commit 68464b88cc0a735eaacd2c69beffb85d36f25292 Author: Dan Carpenter via samba-technical Date: Tue Nov 26 15:11:15 2019 +0300 CIFS: fix a white space issue in cifs_get_inode_info() We accidentally messed up the indenting on this if statement. Fixes: 16c696a6c300 ("CIFS: refactor cifs_get_inode_info()") Signed-off-by: Dan Carpenter Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 8feb4732ff9f2732354b44c4418569974e2f949c Author: Darrick J. Wong Date: Mon Nov 25 18:43:10 2019 -0800 xfs: allow parent directory scans to be interrupted with fatal signals Allow a fatal signal to interrupt us when we're scanning a directory to verify a parent pointer. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit ec16ffe36d80b18a1f98d126a865d5557ab27c30 Merge: dabedfede324 cd94eade0b2a 564f86d38475 8f39f22f73b3 1e4fb2c0cb34 Author: Stephen Boyd Date: Wed Nov 27 08:15:13 2019 -0800 Merge branches 'clk-ingenic', 'clk-init-leak', 'clk-ux500' and 'clk-bitmain' into clk-next - Support CGU in Ingenix X1000 - Support Bitmain BM1880 clks * clk-ingenic: clk: ingenic: Allow drivers to be built with COMPILE_TEST clk: Ingenic: Add CGU driver for X1000. dt-bindings: clock: Add X1000 bindings. * clk-init-leak: clk: mark clk_disable_unused() as __init clk: Fix memory leak in clk_unregister() * clk-ux500: MAINTAINERS: Update section for Ux500 clock drivers * clk-bitmain: MAINTAINERS: Add entry for BM1880 SoC clock driver clk: Add common clock driver for BM1880 SoC dt-bindings: clock: Add devicetree binding for BM1880 SoC clk: Add clk_hw_unregister_composite helper function definition clk: Zero init clk_init_data in helpers commit dabedfede32435ccb7cba4a8e527248d6aed6a39 Merge: 6df24d0c2f9d fc59462c5ce6 a31414e8c98d 9320c7ddf968 9629dbdabd19 46acbcb4849b Author: Stephen Boyd Date: Wed Nov 27 08:15:00 2019 -0800 Merge branches 'clk-gpio-flags', 'clk-tegra', 'clk-rockchip', 'clk-sprd' and 'clk-pxa' into clk-next - Make gpio gate clks propagate rate setting up to parent * clk-gpio-flags: clk: clk-gpio: propagate rate change to parent * clk-tegra: (23 commits) clk: tegra: Use match_string() helper to simplify the code clk: tegra: Fix build error without CONFIG_PM_SLEEP clk: tegra: Add missing stubs for the case of !CONFIG_PM_SLEEP clk: tegra: Optimize PLLX restore on Tegra20/30 clk: tegra: Add suspend and resume support on Tegra210 clk: tegra: Share clk and rst register defines with Tegra clock driver clk: tegra: Use fence_udelay() during PLLU init clk: tegra: clk-dfll: Add suspend and resume support clk: tegra: clk-super: Add restore-context support clk: tegra: clk-super: Fix to enable PLLP branches to CPU clk: tegra: periph: Add restore_context support clk: tegra: Support for OSC context save and restore clk: tegra: pll: Save and restore pll context clk: tegra: pllout: Save and restore pllout context clk: tegra: divider: Save and restore divider rate clk: tegra: Reimplement SOR clocks on Tegra210 clk: tegra: Reimplement SOR clock on Tegra124 clk: tegra: Rename sor0_lvds to sor0_out clk: tegra: Move SOR0 implementation to Tegra124 clk: tegra: Remove last remains of TEGRA210_CLK_SOR1_SRC ... * clk-rockchip: clk: rockchip: protect the pclk_usb_grf as critical on px30 clk: rockchip: add video-related niu clocks as critical on px30 clk: rockchip: move px30 critical clocks to correct clock controller clk: rockchip: Add div50 clocks for px30 sdmmc, emmc, sdio and nandc clk: rockchip: Add div50 clock-ids for sdmmc on px30 and nandc clk: rockchip: make clk_half_divider_ops static * clk-sprd: clk: sprd: Use IS_ERR() to validate the return value of syscon_regmap_lookup_by_phandle() * clk-pxa: clk: pxa: fix one of the pxa RTC clocks commit 6df24d0c2f9d7991a0e50ac96512de59f420c9fa Merge: 74ca928886cc 7f6ac72946b8 bb302711d141 f5790382edef e620a1e061c4 801b787a693b Author: Stephen Boyd Date: Wed Nov 27 08:14:38 2019 -0800 Merge branches 'clk-ti', 'clk-allwinner', 'clk-qcom', 'clk-sa' and 'clk-aspeed' into clk-next - Qualcomm MSM8998 GPU clk controllers - Qualcomm SC7180 GCC and RPMH clk controllers - Qualcomm QCS404 Q6SSTOP clk controllers - Use struct_size() some more in various clk drivers * clk-ti: clk/ti/adpll: allocate room for terminating null ARM: dts: omap3: fix DPLL4 M4 divider max value clk: ti: divider: convert to use min,max,mask instead of width clk: ti: divider: cleanup ti_clk_parse_divider_data API clk: ti: divider: cleanup _register_divider and ti_clk_get_div_table clk: ti: am43xx: drop idlest polling from gfx clock clk: ti: am33xx: drop idlest polling from gfx clock clk: ti: am33xx: drop idlest polling from pruss clkctrl clock clk: ti: am43xx: drop idlest polling from pruss clkctrl clock clk: ti: omap5: Drop idlest polling from IPU & DSP clkctrl clocks clk: ti: omap4: Drop idlest polling from IPU & DSP clkctrl clocks clk: ti: dra7xx: Drop idlest polling from IPU & DSP clkctrl clocks clk: ti: omap5: add IVA subsystem clkctrl data dt-bindings: clk: add omap5 iva clkctrl definitions clk: ti: clkctrl: add new exported API for checking standby info clk: ti: clkctrl: convert to use bit helper macros instead of bitops clk: ti: clkctrl: fix setting up clkctrl clocks * clk-allwinner: clk: sunxi-ng: h3: Export MBUS clock clk: sunxi-ng: h6: Allow GPU to change parent rate clk: sunxi-ng: h6: Use sigma-delta modulation for audio PLL * clk-qcom: clk: qcom: rpmh: Reuse sdm845 clks for sm8150 clk: qcom: Add MSM8998 GPU Clock Controller (GPUCC) driver clk: qcom: Allow constant ratio freq tables for rcg clk: qcom: smd: Add missing pnoc clock clk: qcom: Enumerate clocks and reset needed to boot the 8998 modem clk: qcom: clk-rpmh: Add support for RPMHCC for SC7180 dt-bindings: clock: Introduce RPMHCC bindings for SC7180 dt-bindings: clock: Add YAML schemas for the QCOM RPMHCC clock bindings clk: qcom: Add Global Clock controller (GCC) driver for SC7180 dt-bindings: clock: Add sc7180 GCC clock binding dt-bindings: clock: Add YAML schemas for the QCOM GCC clock bindings clk: qcom: common: Return NULL from clk_hw OF provider clk: qcom: rcg: update the DFS macro for RCG clk: qcom: remove unneeded semicolon clk: qcom: Add Q6SSTOP clock controller for QCS404 dt-bindings: clock: qcom: Add QCOM Q6SSTOP clock controller bindings * clk-sa: drivers/clk: convert VL struct to struct_size * clk-aspeed: clk: aspeed: Add RMII RCLK gates for both AST2500 MACs clk: ast2600: Add RMII RCLK gates for all four MACs dt-bindings: clock: Add AST2600 RMII RCLK gate definitions dt-bindings: clock: Add AST2500 RMII RCLK definitions commit 74ca928886ccf2685f46b9bcf00b7c1466fb041f Merge: 130323106885 f1edb498bd9f fac3810fb0b2 606324409b26 b7c1b40abc66 bfd582aa8569 Author: Stephen Boyd Date: Wed Nov 27 08:14:17 2019 -0800 Merge branches 'clk-hisi', 'clk-amlogic', 'clk-samsung', 'clk-renesas' and 'clk-imx' into clk-next * clk-hisi: clk: hi6220: use CLK_OF_DECLARE_DRIVER * clk-amlogic: clk: meson: axg-audio: use devm_platform_ioremap_resource() to simplify code clk: meson: axg_audio: add sm1 support clk: meson: axg-audio: provide clk top signal name clk: meson: axg-audio: prepare sm1 addition clk: meson: axg-audio: fix regmap last register clk: meson: axg-audio: remove useless defines dt-bindings: clock: meson: add sm1 resets to the axg-audio controller dt-bindings: clk: axg-audio: add sm1 bindings clk: meson: g12a: set CLK_MUX_ROUND_CLOSEST on the cpu clock muxes clk: meson: g12a: fix cpu clock rate setting clk: meson: gxbb: let sar_adc_clk_div set the parent clock rate * clk-samsung: clk: samsung: exynos5420: Add SET_RATE_PARENT flag to clocks on G3D path clk: samsung: exynos5420: Preserve CPU clocks configuration during suspend/resume clk: samsung: exynos5420: Add VPLL rate table clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU clk: samsung: exynos5433: Fix error paths * clk-renesas: (23 commits) clk: renesas: r8a7796: Add R8A77961 CPG/MSSR support clk: renesas: Rename CLK_R8A7796 to CLK_R8A77960 dt-bindings: clock: renesas: cpg-mssr: Document r8a77961 support clk: renesas: r8a77965: Remove superfluous semicolon dt-bindings: clock: renesas: rcar-usb2-clock-sel: Fix typo in example dt-bindings: clock: renesas: Remove R-Car Gen2 legacy DT bindings dt-bindings: clock: Add r8a77961 CPG Core Clock Definitions dt-bindings: power: Add r8a77961 SYSC power domain definitions clk: renesas: rcar-gen3: Switch SD clocks to .determine_rate() clk: renesas: rcar-gen3: Switch Z clocks to .determine_rate() clk: renesas: rcar-gen2: Switch Z clock to .determine_rate() clk: renesas: r8a774b1: Add TMU clock clk: renesas: cpg-mssr: Add r8a774b1 support dt-bindings: clock: renesas: cpg-mssr: Document r8a774b1 binding clk: renesas: rcar-gen3: Loop to find best rate in cpg_sd_clock_round_rate() clk: renesas: rcar-gen3: Absorb cpg_sd_clock_calc_div() clk: renesas: rcar-gen3: Avoid double table iteration in SD .set_rate() clk: renesas: rcar-gen3: Improve arithmetic divisions clk: renesas: rcar-gen2: Improve arithmetic divisions clk: renesas: Remove R-Car Gen2 legacy DT clock support ... * clk-imx: clk: imx: imx8mq: fix sys3_pll_out_sels clk: imx7ulp: do not export out IMX7ULP_CLK_MIPI_PLL clock clk: imx: imx6ul: use imx_obtain_fixed_clk_hw to simplify code clk: imx: imx6sx: use imx_obtain_fixed_clk_hw to simplify code clk: imx: imx6sll: use imx_obtain_fixed_clk_hw to simplify code clk: imx: imx7d: use imx_obtain_fixed_clk_hw to simplify code clk: imx7ulp: Correct DDR clock mux options clk: imx7ulp: Correct system clock source option #7 clk: imx: imx8mq: mark sys1/2_pll as fixed clock clk: imx: imx8mn: mark sys_pll1/2 as fixed clock clk: imx: imx8mm: mark sys_pll1/2 as fixed clock clk: imx8mn: Define gates for pll1/2 fixed dividers clk: imx8mm: Define gates for pll1/2 fixed dividers clk: imx8mq: Define gates for pll1/2 fixed dividers clk: imx: clk-pll14xx: Make two variables static clk: imx8mq: Add VIDEO2_PLL clock clk: imx8mn: Use common 1443X/1416X PLL clock structure clk: imx8mm: Move 1443X/1416X PLL clock structure to common place clk: imx: pll14xx: Fix quick switch of S/K parameter commit ae254888f3c39f66d09920b459112ba3eadf1dc4 Author: Kai Vehmanen Date: Wed Nov 27 18:12:40 2019 +0200 ALSA: hda: hdmi - fix regression in connect list handling Fix regression in how intel_haswell_fixup_connect_list() results are used in hda_read_pin_conn(). Use of snd_hda_get_raw_connections() in hda_read_pin_conn() bypasses the cache and thus also bypasses the overridden pin connection list. On platforms that require the connection list fixup, mux list will be empty and HDMI playback will fail to -EBUSY at open. Fix the regression in hda_read_pinn_conn(). Simplify code as suggested by Takashi Iwai to remove old intel_haswell_fixup_connect_list() and copy the cvt_nid list directly and not use snd_hda_override_conn_list() at all. Fixes: 9c32fea83692 ("ALSA: hda - Add DP-MST support for non-acomp codecs") BugLink: https://github.com/thesofproject/linux/issues/1537 Cc: Nikhil Mahale Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20191127161240.17026-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 130323106885e5598197e99f93af2bf8fa4fdb48 Merge: 8ad1193eae4c 999915711188 06aeb3fb9f31 3bdf364ada33 793ee798cc47 Author: Stephen Boyd Date: Wed Nov 27 08:13:24 2019 -0800 Merge branches 'clk-rohm', 'clk-hisilicon', 'clk-marvell', 'clk-unused' and 'clk-devm-ioremap-resource' into clk-next - Prepare Armada 3700 for suspend to RAM by moving suspend/resume priority for PCIe - Drop unused variables, enums, etc. in various clk drivers - Convert various drivers to use devm_platform_ioremap_resource() * clk-rohm: clk: bd718x7: Add MODULE_ALIAS() * clk-hisilicon: clk: hisilicon: fix sparse warnings in clk-hi3660.c clk: hisilicon: fix sparse warnings in clk-hi3670.c * clk-marvell: dt-bindings: clk: armada3700: document the PCIe clock dt-bindings: clk: armada3700: fix typo in SoC name clk: mvebu: armada-37xx-periph: change suspend/resume time clk: mvebu: armada-37xx-periph: add PCIe gated clock * clk-unused: clk: armada-xp: remove unused code clk: imx: imx8mn: drop unused pll enum clk: ast2600: remove unused variable 'eclk_parent_names' * clk-devm-ioremap-resource: clk: sprd: Change to use devm_platform_ioremap_resource() clk: s3c2410: use devm_platform_ioremap_resource() to simplify code clk: axs10x: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt6797: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt7629: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt7622: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt8183: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt6779: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt2712: use devm_platform_ioremap_resource() to simplify code clk: davinci: use devm_platform_ioremap_resource() to simplify code clk: hisilicon: use devm_platform_ioremap_resource() to simplify code clk: bcm2835: use devm_platform_ioremap_resource() to simplify code commit 27ed14d0ecb38516b6f3c6fdcd62c25c9454f979 Author: Je Yen Tam Date: Wed Nov 27 15:53:01 2019 +0800 Revert "serial/8250: Add support for NI-Serial PXI/PXIe+485 devices" This reverts commit fdc2de87124f5183a98ea7eced1f76dbdba22951 ("serial/8250: Add support for NI-Serial PXI/PXIe+485 devices"). The commit fdc2de87124f ("serial/8250: Add support for NI-Serial PXI/PXIe+485 devices") introduced a breakage on NI-Serial PXI(e)-RS485 devices, RS-232 variants have no issue. The Linux system can enumerate the NI-Serial PXI(e)-RS485 devices, but it broke the R/W operation on the ports. However, the implementation is working on the NI internal Linux RT kernel but it does not work in the Linux main tree kernel. This is only affecting NI products, specifically the RS-485 variants. Reverting the upstream until a proper implementation that can apply to both NI internal Linux kernel and Linux mainline kernel is figured out. Signed-off-by: Je Yen Tam Fixes: fdc2de87124f ("serial/8250: Add support for NI-Serial PXI/PXIe+485 devices") Cc: stable Link: https://lore.kernel.org/r/20191127075301.9866-1-je.yen.tam@ni.com Signed-off-by: Greg Kroah-Hartman commit 45dfbf56975994822cce00b7475732a49f8aefed Author: Tzung-Bi Shih Date: Fri Nov 22 15:31:14 2019 +0800 ASoC: max98090: fix possible race conditions max98090_interrupt() and max98090_pll_work() run in 2 different threads. There are 2 possible races: Note: M98090_REG_DEVICE_STATUS = 0x01. Note: ULK == 0, PLL is locked; ULK == 1, PLL is unlocked. max98090_interrupt max98090_pll_work ---------------------------------------------- schedule max98090_pll_work restart max98090 codec receive ULK INT assert ULK == 0 schedule max98090_pll_work (1). In the case (1), the PLL is locked but max98090_interrupt unnecessarily schedules another max98090_pll_work. max98090_interrupt max98090_pll_work max98090 codec ---------------------------------------------------------------------- ULK = 1 receive ULK INT read 0x01 ULK = 0 (clear on read) schedule max98090_pll_work restart max98090 codec ULK = 1 receive ULK INT read 0x01 ULK = 0 (clear on read) read 0x01 assert ULK == 0 (2). In the case (2), both max98090_interrupt and max98090_pll_work read the same clear-on-read register. max98090_pll_work would falsely thought PLL is locked. Note: the case (2) race is introduced by the previous commit ("ASoC: max98090: exit workaround earlier if PLL is locked") to check the status and exit the loop earlier in max98090_pll_work. There are 2 possible solution options: A. turn off ULK interrupt before scheduling max98090_pll_work; and turn on again before exiting max98090_pll_work. B. remove the second thread of execution. Option A cannot fix the case (2) race because it still has 2 threads access the same clear-on-read register simultaneously. Although we could suppose the register is volatile and read the status via I2C could be much slower than the hardware raises the bits. Option B introduces a maximum 10~12 msec penalty delay in the interrupt handler. However, it could only punish the jack detection by extra 10~12 msec. Adopts option B which is the better solution overall. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191122073114.219945-4-tzungbi@google.com Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 6f49919d11690a9b5614445ba30fde18083fdd63 Author: Tzung-Bi Shih Date: Fri Nov 22 15:31:13 2019 +0800 ASoC: max98090: exit workaround earlier if PLL is locked According to the datasheet, PLL lock time typically takes 2 msec and at most takes 7 msec. Check the lock status every 1 msec and exit the workaround if PLL is locked. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191122073114.219945-3-tzungbi@google.com Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit acb874a7c049ec49d8fc66c893170fb42c01bdf7 Author: Tzung-Bi Shih Date: Fri Nov 22 15:31:12 2019 +0800 ASoC: max98090: remove msleep in PLL unlocked workaround It was observed Baytrail-based chromebooks could cause continuous PLL unlocked when using playback stream and capture stream simultaneously. Specifically, starting a capture stream after started a playback stream. As a result, the audio data could corrupt or turn completely silent. As the datasheet suggested, the maximum PLL lock time should be 7 msec. The workaround resets the codec softly by toggling SHDN off and on if PLL failed to lock for 10 msec. Notably, there is no suggested hold time for SHDN off. On Baytrail-based chromebooks, it would easily happen continuous PLL unlocked if there is a 10 msec delay between SHDN off and on. Removes the msleep(). Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191122073114.219945-2-tzungbi@google.com Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 61acd19f9c56fa0809285346bd0bd4a926ab0da0 Author: Charles Keepax Date: Tue Nov 26 16:41:40 2019 +0000 spi: cadence: Correct handling of native chipselect To fix a regression on the Cadence SPI driver, this patch reverts commit 6046f5407ff0 ("spi: cadence: Fix default polarity of native chipselect"). This patch was not the correct fix for the issue. The SPI framework calls the set_cs line with the logic level it desires on the chip select line, as such the old is_high handling was correct. However, this was broken by the fact that before commit 3e5ec1db8bfe ("spi: Fix SPI_CS_HIGH setting when using native and GPIO CS") all controllers that offered the use of a GPIO chip select had SPI_CS_HIGH applied, even for hardware chip selects. This caused the value passed into the driver to be inverted. Which unfortunately makes it look like a logical enable the chip select value. Since the core was corrected to not unconditionally apply SPI_CS_HIGH, the Cadence driver, whilst using the hardware chip select, will deselect the chip select every time we attempt to communicate with the device, which results in failed communications. Fixes: 3e5ec1db8bfe ("spi: Fix SPI_CS_HIGH setting when using native and GPIO CS") Signed-off-by: Charles Keepax Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191126164140.6240-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 4affd79a125ac91e6a53be843ea3960a8fc00cbb Author: Wen Yang Date: Sun Nov 24 22:58:35 2019 +0800 regulator: fix use after free issue This is caused by dereferencing 'rdev' after put_device() in the _regulator_get()/_regulator_put() functions. This patch just moves the put_device() down a bit to avoid the issue. Signed-off-by: Wen Yang Cc: Liam Girdwood Cc: Mark Brown Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191124145835.25999-1-wenyang@linux.alibaba.com Signed-off-by: Mark Brown commit 2a0bda276c64212e517cc1d65cf65719a9ab1ef6 Author: Michael Walle Date: Sat Nov 23 00:25:32 2019 +0100 ASoC: wm8904: fix automatic sysclk configuration The simple-card tries to signal the codec to disable rate constraints, see commit 2458adb8f92a ("SoC: simple-card-utils: set 0Hz to sysclk when shutdown"). This wasn't handled by the codec, instead it would set the FLL frequency to 0Hz which isn't working. Since we don't have any rate constraints just ignore this request. Fixes: 13409d27cb39 ("ASoC: wm8904: configure sysclk/FLL automatically") Signed-off-by: Michael Walle Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20191122232532.22258-1-michael@walle.cc Signed-off-by: Mark Brown commit fb3194413d1ef79732931a40f54da21a16505a76 Author: YueHaibing Date: Wed Nov 27 16:21:45 2019 +0800 ASoC: rt5677: Fix build error without CONFIG_SPI If CONFIG_SPI is n, SND_SOC_RT5677_SPI also is n, building fails: sound/soc/codecs/rt5677.o: In function `rt5677_irq': rt5677.c:(.text+0x2dbf): undefined reference to `rt5677_spi_hotword_detected' sound/soc/codecs/rt5677.o: In function `rt5677_dsp_work': rt5677.c:(.text+0x3709): undefined reference to `rt5677_spi_write' This adds stub helpers to fix this. Reported-by: Hulk Robot Fixes: 461c623270e4 ("ASoC: rt5677: Load firmware via SPI using delayed work") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191127082145.6100-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 469b3ad672e27b28c5865c804426f65e69c5e41a Author: Daniel Baluta Date: Tue Nov 26 08:16:06 2019 -0600 ASoC: SOF: topology: Fix unload for SAI/ESAI Link unload now fails for ESAI/SAI DAIs with: "error: invalid DAI type 6" because DAI type is not properly handled. Fix this by correctly handling cases where type is ESAI or SAI. Fixes: a4eff5f86c9c5e7 ("ASoC: SOF: imx: Read ESAI parameters and send them to DSP") Signed-off-by: Daniel Baluta Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191126141606.21650-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b81eb73be03ac736f1f8d27d64a372c62c7159e5 Author: Keyon Jie Date: Tue Nov 26 08:15:33 2019 -0600 ASoC: SOF: Intel: BYT: fix a copy/paste mistake in byt_dump() The shim registers in BYT/CHT/BSW are 64bits based, correct the copy/paste (from bdw.c where the shim registers are 32bits based) error in byt_dump(). Fixes: 3a9e204d4e36 ("ASoC: SOF: Intel: Add context data to any IPC timeout") Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191126141533.21601-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 756ae8f237e19a014a1c20ad5a51b0686463d1f7 Author: Yu-Hsuan Hsu Date: Tue Nov 26 15:54:24 2019 +0800 ASoC: AMD: Enable clk in startup intead of hw_params Some usages only call startup and shutdown without setting hw_params (e.g. arecord --dump-hw-params). If we don't enable clk in startup, it will cause ref count error because the clk will be disabled in shutdown. For this reason, we should move enabling clk from hw_params to startup. In addition, the hw_params is fixed in this driver(48000 rate, 2 channels, S16_LE format) so we don't need to change the clk rate after the hw_params is set. Signed-off-by: Yu-Hsuan Hsu Acked-by: Akshu Agrawal Link: https://lore.kernel.org/r/20191126075424.80668-1-yuhsuan@chromium.org Signed-off-by: Mark Brown commit 5061bb7065d05efbac35a660eb30ed4c3100690b Author: Andrew Gabbasov Date: Wed Nov 27 05:06:22 2019 -0600 ALSA: aloop: Avoid pointer dereference before null-check Static analysis tools (cppcheck and PVS Studio) report an error in loopback_snd_timer_period_elapsed() regarding dpcm_play pointer dereference earlier than its null-check. And although this is a result of a formal check, and the pointer correctness is also protected by having a corresponding bit set in the "running" mask, re-ordering of the lines can imake the code even formally correct and eliminate those static analysis error reports. Fixes: 26c53379f98d ("ALSA: aloop: Support selection of snd_timer instead of jiffies") Reported-by: Eugeniu Rosca Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191127110622.26105-1-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit c1de0f25221c3abc7031fa482c109ccb079e7938 Author: Peter Gonda Date: Thu Nov 21 12:33:43 2019 -0800 KVM x86: Move kvm cpuid support out of svm Memory encryption support does not have module parameter dependencies and can be moved into the general x86 cpuid __do_cpuid_ent function. This changes maintains current behavior of passing through all of CPUID.8000001F. Suggested-by: Jim Mattson Signed-off-by: Peter Gonda Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 3e1b43586eae232157ca70e905cece0297f17bfd Author: Borislav Petkov Date: Sun Nov 24 17:12:25 2019 +0100 x86/entry/32: Remove unused 'restore_all_notrace' local label Signed-off-by: Borislav Petkov Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 405b45376de90b3027aaf8c4de035c6bb721fa7e Author: Anthony Steinhauser Date: Sun Nov 24 21:48:38 2019 -0800 perf/x86: Implement immediate enforcement of /sys/devices/cpu/rdpmc value of 0 When you successfully write 0 to /sys/devices/cpu/rdpmc, the RDPMC instruction should be disabled unconditionally and immediately (after you close the SYSFS file) by the documentation. Instead, in the current implementation the PMU must be reloaded which happens only eventually some time in the future. Only after that the RDPMC instruction becomes disabled (on ring 3) on the respective core. This change makes the treatment of the 0 value as blocking and as unconditional as the current treatment of the 2 value, only the CR4.PCE bit is naturally set to false instead of true. Signed-off-by: Anthony Steinhauser Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Link: https://lkml.kernel.org/r/20191125054838.137615-1-asteinhauser@google.com Signed-off-by: Ingo Molnar commit 74c166b58895a7b536d6434235b23b51e64adf68 Author: Enric Balletbo i Serra Date: Wed Nov 27 09:49:39 2019 +0100 platform/chrome: cros_ec: Add Kconfig default for cros-ec-sensorhub Like the other CrOS EC sub-drivers set that depends on his parent and set default to the parent's value. Signed-off-by: Enric Balletbo i Serra commit 8d66fcb7488486bf144eab852e87e03a45e0fd3a Author: Krzysztof Kozlowski Date: Wed Nov 20 21:43:32 2019 +0800 fuse: fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miklos Szeredi commit f1ebdeffc6f325e30e0ddb9f7a70f1370fa4b851 Author: Miklos Szeredi Date: Mon Nov 25 20:48:46 2019 +0100 fuse: fix leak of fuse_io_priv exit_aio() is sometimes stuck in wait_for_completion() after aio is issued with direct IO and the task receives a signal. The reason is failure to call ->ki_complete() due to a leaked reference to fuse_io_priv. This happens in fuse_async_req_send() if fuse_simple_background() returns an error (e.g. -EINTR). In this case the error value is propagated via io->err, so return success to not confuse callers. This issue is tracked as a virtio-fs issue: https://gitlab.com/virtio-fs/qemu/issues/14 Reported-by: Masayoshi Mizuma Fixes: 45ac96ed7c36 ("fuse: convert direct_io to simple api") Cc: # v5.4 Signed-off-by: Miklos Szeredi commit f830f7cf4752f6f0db48777b7e16c010bdc95083 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:39:40 2019 +0800 rtc: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133940.13881-1-krzk@kernel.org Signed-off-by: Alexandre Belloni commit fa60b7e838a9a38abdecfd79f123e357db4cff7d Author: Nobuhiro Iwamatsu Date: Sat Nov 23 18:02:34 2019 +0900 rtc: xgene: Remove unused struct device in struct xgene_rtc_dev struct device in struct xgene_rtc_dev is not used, remove it. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191123090234.32180-1-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Alexandre Belloni commit 8532bd5d3fdcf2158c3965bed90b32185a437258 Author: Nobuhiro Iwamatsu Date: Sat Nov 23 18:05:38 2019 +0900 rtc: sun6i: Remove struct device from sun6i_rtc_dev struct device in struct sun6i_rtc_dev is not used, remove it. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191123090538.32364-1-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Alexandre Belloni commit 4f8aadea23426a163aca42a9ce208bb8544b02c1 Author: Nobuhiro Iwamatsu Date: Sat Nov 23 18:12:41 2019 +0900 rtc: st-lpc: Remove struct resource from struct st_rtc struct resource in struct st_rtc is not used, remove it. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191123091241.1905-1-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Alexandre Belloni commit 93966243cf90c055d89b5ebfbb8dee0f9ac6b0a2 Author: Nobuhiro Iwamatsu Date: Sat Nov 23 18:08:38 2019 +0900 rtc: pcf8523: Remove struct pcf8523 struct pcf8523 is referenced only by pcf8523_probe(). And member variable in this is not referenced by any function. Remove struct pcf8523. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191123090838.1619-1-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Alexandre Belloni commit 60bd22fc90630e19b616a3f329ae3958f0878ac6 Author: Colin Ian King Date: Fri Nov 22 22:52:10 2019 +0000 rtc: meson: remove redundant assignment to variable retries The variable retries is being initialized with a value that is never read and it is being updated later with a new value in a for-loop. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20191122225210.109172-1-colin.king@canonical.com Signed-off-by: Alexandre Belloni commit 42397492fb0fe61a77b06f351a382309f8300aa6 Author: Alexandre Belloni Date: Fri Nov 22 11:22:12 2019 +0100 rtc: v3020: remove set but unused variable Fix the following warning: drivers/rtc/rtc-v3020.c: In function ‘rtc_probe’: drivers/rtc/rtc-v3020.c:287:6: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20191122102212.400158-9-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 8321c2ecb2e879aada3e363bbdcbfa0f819803c7 Author: Alexandre Belloni Date: Fri Nov 22 11:22:11 2019 +0100 rtc: tegra: remove set but unused variable Fix the following warning: drivers/rtc/rtc-tegra.c: In function ‘tegra_rtc_read_time’: drivers/rtc/rtc-tegra.c:106:11: warning: variable ‘msec’ set but not used [-Wunused-but-set-variable] Cc: Thierry Reding Cc: Jonathan Hunter Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20191122102212.400158-8-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 863d7b1851a12cf8ceb272d71c8e1bcfdaa26952 Author: Alexandre Belloni Date: Fri Nov 22 11:22:10 2019 +0100 rtc: pm8xxx: update kerneldoc for struct pm8xxx_rtc The change from u8 ctrl_reg to const struct pm8xxx_rtc_regs *regs; did not properly update the kerneldoc comment. Fixes: drivers/rtc/rtc-pm8xxx.c:64: warning: Function parameter or member 'regs' not described in 'pm8xxx_rtc' Fixes: c8d523a4b053 ("drivers/rtc/rtc-pm8xxx.c: rework to support pm8941 rtc") Link: https://lore.kernel.org/r/20191122102212.400158-7-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit e5b7d90fd09dd5db2ca91dd716e721e51c9a861f Author: Alexandre Belloni Date: Fri Nov 22 11:22:09 2019 +0100 rtc: m41t80: remove excess kerneldoc Fix the following warning: drivers/rtc/rtc-m41t80.c:716: warning: Excess function parameter 'inode' description in 'wdt_ioctl' Link: https://lore.kernel.org/r/20191122102212.400158-6-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 4ed3f1b8c4b7d5e75b22300351e103d9ddc0bb3d Author: Alexandre Belloni Date: Fri Nov 22 11:22:08 2019 +0100 rtc: ds1685: fix build error with make W=1 Fix the following parsing errors when building with W=1: drivers/rtc/rtc-ds1685.c:1053: error: Cannot parse struct or union! drivers/rtc/rtc-ds1685.c:1062: error: Cannot parse struct or union! drivers/rtc/rtc-ds1685.c:1363: warning: cannot understand function prototype: 'struct platform_driver ds1685_rtc_driver = ' Cc: Joshua Kinard Link: https://lore.kernel.org/r/20191122102212.400158-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 47401580449c1de65350bd17324f778c7e937ea1 Author: Alexandre Belloni Date: Fri Nov 22 11:22:07 2019 +0100 rtc: ds1685: remove set but unused variables Fix the following warnings: drivers/rtc/rtc-ds1685.c: In function ‘ds1685_rtc_read_time’: drivers/rtc/rtc-ds1685.c:264:5: warning: variable ‘ctrlb’ set but not used [-Wunused-but-set-variable] 264 | u8 ctrlb, century; | ^~~~~ drivers/rtc/rtc-ds1685.c: In function ‘ds1685_rtc_proc’: drivers/rtc/rtc-ds1685.c:758:19: warning: variable ‘ctrlc’ set but not used [-Wunused-but-set-variable] 758 | u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8]; | ^~~~~ Cc: Joshua Kinard Acked-By: Joshua Kinard Link: https://lore.kernel.org/r/20191122102212.400158-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 75859ab1e7907d0515e515b956cd062b0fa6718c Author: Alexandre Belloni Date: Fri Nov 22 11:22:06 2019 +0100 rtc: ds1374: remove unused variable Fix warning: drivers/rtc/rtc-ds1374.c: In function ‘ds1374_wdt_disable’: drivers/rtc/rtc-ds1374.c:442:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20191122102212.400158-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 6f6931928f257e6bf073515d8c90cf10be0ee7b6 Author: Alexandre Belloni Date: Fri Nov 22 11:22:05 2019 +0100 rtc: sysfs: fix hctosys_show kerneldoc Fix undocumented function parameters: drivers/rtc/sysfs.c:112: warning: Function parameter or member 'dev' not described in 'hctosys_show' drivers/rtc/sysfs.c:112: warning: Function parameter or member 'attr' not described in 'hctosys_show' drivers/rtc/sysfs.c:112: warning: Function parameter or member 'buf' not described in 'hctosys_show' Link: https://lore.kernel.org/r/20191122102212.400158-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 55dcf7a21dbcc743a0b39e01916f5d006736b1e1 Author: Alexandre Belloni Date: Wed Nov 27 09:29:32 2019 +0100 rtc: interface: fix kerneldoc comments Fix kerneldoc warnings: drivers/rtc/interface.c:619: warning: Function parameter or member 'num' not described in 'rtc_handle_legacy_irq' drivers/rtc/interface.c:619: warning: Function parameter or member 'mode' not described in 'rtc_handle_legacy_irq' drivers/rtc/interface.c:804: warning: Function parameter or member 'rtc' not described in 'rtc_timer_enqueue' drivers/rtc/interface.c:804: warning: Function parameter or member 'timer' not described in 'rtc_timer_enqueue' drivers/rtc/interface.c:864: warning: Function parameter or member 'rtc' not described in 'rtc_timer_remove' drivers/rtc/interface.c:864: warning: Function parameter or member 'timer' not described in 'rtc_timer_remove' drivers/rtc/interface.c:900: warning: Function parameter or member 'work' not described in 'rtc_timer_do_work' drivers/rtc/interface.c:1035: warning: Function parameter or member 'rtc' not described in 'rtc_read_offset' drivers/rtc/interface.c:1035: warning: Function parameter or member 'offset' not described in 'rtc_read_offset' drivers/rtc/interface.c:1070: warning: Function parameter or member 'rtc' not described in 'rtc_set_offset' drivers/rtc/interface.c:1070: warning: Function parameter or member 'offset' not described in 'rtc_set_offset' Link: https://lore.kernel.org/r/20191127082932.666869-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 3cc44feb9861d2f5267af9b962ae92c5ea1b48fd Author: Chris Wilson Date: Tue Nov 26 06:55:21 2019 +0000 drm/i915: Reduce nested prepare_remote_context() to a trylock On context retiring, we may invoke the kernel_context to unpin this context. Elsewhere, we may use the kernel_context to modify this context. This currently leads to an AB-BA lock inversion, so we need to back-off from the contended lock, and repeat. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111732 Signed-off-by: Chris Wilson Fixes: a9877da2d629 ("drm/i915/oa: Reconfigure contexts on the fly") Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191126065521.2331017-1-chris@chris-wilson.co.uk (cherry picked from commit 58b4c1a07ada7fb91ea757bdb9bd47df02207357) Signed-off-by: Joonas Lahtinen commit 8d15ede5cc6b66d5176856060b94196bc3382283 Author: Chris Wilson Date: Mon Nov 25 16:27:37 2019 +0000 drm/i915: Default to a more lenient forced preemption timeout Based on a sampling of a number of benchmarks across platforms, by default opt for a much more lenient timeout so that we should not adversely affect existing "good" clients. 640ms ought to be enough for anyone. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112169 Fixes: 3a7a92aba8fb ("drm/i915/execlists: Force preemption") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Eero Tamminen Cc: Dmitry Rogozhkin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191125162737.2161069-1-chris@chris-wilson.co.uk (cherry picked from commit 5766a5ffc6a69595903865518c43636bde0e4ac4) Signed-off-by: Joonas Lahtinen commit 6f07048c00fd100ed8cab66c225c157e0b6c0a50 Author: Michael Ellerman Date: Wed Nov 27 18:41:26 2019 +1100 powerpc: Define arch_is_kernel_initmem_freed() for lockdep Under certain circumstances, we hit a warning in lockdep_register_key: if (WARN_ON_ONCE(static_obj(key))) return; This occurs when the key falls into initmem that has since been freed and can now be reused. This has been observed on boot, and under memory pressure. Define arch_is_kernel_initmem_freed(), which allows lockdep to correctly identify this memory as dynamic. This fixes a bug picked up by the powerpc64 syzkaller instance where we hit the WARN via alloc_netdev_mqs. Reported-by: Qian Cai Reported-by: ppc syzbot c/o Andrew Donnellan Signed-off-by: Michael Ellerman Signed-off-by: Daniel Axtens Link: https://lore.kernel.org/r/87lfs4f7d6.fsf@dja-thinkpad.axtens.net commit 1591fadf857cdbaf2baa55e421af99a61354713c Author: Thomas Zimmermann Date: Tue Nov 26 11:15:29 2019 +0100 drm/mgag200: Add workaround for HW that does not support 'startadd' There's at least one system that does not interpret the value of the device's 'startadd' field correctly, which leads to incorrectly displayed scanout buffers. Always placing the active scanout buffer at offset 0 works around the problem. Signed-off-by: Thomas Zimmermann Reported-by: John Donnelly Tested-by: John Donnelly Reviewed-by: Daniel Vetter Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin") Cc: Gerd Hoffmann Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Sam Ravnborg Cc: "Y.C. Chen" Cc: Neil Armstrong Cc: Thomas Gleixner Cc: "José Roberto de Souza" Cc: Andrzej Pietrasiewicz Cc: dri-devel@lists.freedesktop.org Cc: # v5.3+ Link: https://gitlab.freedesktop.org/drm/misc/issues/7 Link: https://patchwork.freedesktop.org/patch/msgid/20191126101529.20356-4-tzimmermann@suse.de commit d6d437d97d54c85a1a93967b2745e31dff03365a Author: Thomas Zimmermann Date: Tue Nov 26 11:15:28 2019 +0100 drm/mgag200: Store flags from PCI driver data in device structure The flags field in struct mga_device has been unused so far. We now use it to store flag bits from the PCI driver. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin") Cc: John Donnelly Cc: Gerd Hoffmann Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Sam Ravnborg Cc: "Y.C. Chen" Cc: Neil Armstrong Cc: Thomas Gleixner Cc: "José Roberto de Souza" Cc: Andrzej Pietrasiewicz Cc: dri-devel@lists.freedesktop.org Cc: # v5.3+ Link: https://patchwork.freedesktop.org/patch/msgid/20191126101529.20356-3-tzimmermann@suse.de commit 3a8a5aba142a44eaeba0cb0ec1b4a8f177b5e59a Author: Thomas Zimmermann Date: Tue Nov 26 11:15:27 2019 +0100 drm/mgag200: Extract device type from flags Adds a conversion function that extracts the device type from the PCI id-table flags. Allows for storing additional information in the other flag bits. Signed-off-by: Thomas Zimmermann Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin") Reviewed-by: Daniel Vetter Cc: John Donnelly Cc: Gerd Hoffmann Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Sam Ravnborg Cc: Emil Velikov Cc: "Y.C. Chen" Cc: Laurent Pinchart Cc: "José Roberto de Souza" Cc: Andrzej Pietrasiewicz Cc: dri-devel@lists.freedesktop.org Cc: # v5.3+ Link: https://patchwork.freedesktop.org/patch/msgid/20191126101529.20356-2-tzimmermann@suse.de commit 0c9acb1af77a3cb8707e43f45b72c95266903cee Author: Nicolas Pitre Date: Tue Nov 5 10:33:16 2019 +0100 vcs: prevent write access to vcsu devices Commit d21b0be246bf ("vt: introduce unicode mode for /dev/vcs") guarded against using devices containing attributes as this is not yet implemented. It however failed to guard against writes to any devices as this is also unimplemented. Reported-by: Or Cohen Signed-off-by: Nicolas Pitre Cc: # v4.19+ Cc: Jiri Slaby Fixes: d21b0be246bf ("vt: introduce unicode mode for /dev/vcs") Link: https://lore.kernel.org/r/nycvar.YSQ.7.76.1911051030580.30289@knanqh.ubzr Signed-off-by: Greg Kroah-Hartman commit 68421940b0d66f3806bfd0cd0f78a6935c75cb55 Author: Gao, Fred Date: Wed Nov 27 00:08:29 2019 +0800 drm/i915/gvt: Update force-to-nonpriv register whitelist Host print below warning message when creating guest: "gvt: vgpu(1) Invalid FORCE_NONPRIV write 10002349". Add register 0x2348 in force-to-nonpriv whitelist as required by guest. Signed-off-by: Gao, Fred Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang commit 8a6b8f4d7a891ac66db4f97900a86b55c84a5802 Author: Dan Carpenter Date: Tue Nov 26 15:21:20 2019 +0300 crypto: hisilicon - fix a NULL vs IS_ERR() bug in sec_create_qp_ctx() The hisi_acc_create_sgl_pool() function returns error pointers, it never returns NULL pointers. Fixes: 416d82204df4 ("crypto: hisilicon - add HiSilicon SEC V2 driver") Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu commit dbc2e87bd8b6d3cc79730b3a49c5163b4c386b49 Author: Herbert Xu Date: Tue Nov 26 19:28:36 2019 +0800 crypto: talitos - Fix build error by selecting LIB_DES The talitos driver needs to select LIB_DES as it needs calls des_expand_key. Fixes: 9d574ae8ebc1 ("crypto: talitos/des - switch to new...") Cc: Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 8394bfec51e0e565556101bcc4e2fe7551104cd8 Author: Jason A. Donenfeld Date: Mon Nov 25 11:31:12 2019 +0100 crypto: arch - conditionalize crypto api in arch glue for lib code For glue code that's used by Zinc, the actual Crypto API functions might not necessarily exist, and don't need to exist either. Before this patch, there are valid build configurations that lead to a unbuildable kernel. This fixes it to conditionalize those symbols on the existence of the proper config entry. Signed-off-by: Jason A. Donenfeld Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit aeab9eda04cd412791551eaad036143eec04e648 Author: Gao, Fred Date: Wed Nov 27 00:07:35 2019 +0800 drm/i915/gvt: Refine non privilege register address calucation The BitField of non privilege register address is only from bit 2 to 25. v2: use REG_GENMASK instead. (Zhenyu) Signed-off-by: Gao, Fred Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang commit 41c9479903c5bd91bb0cb7240a1227d00c42b41f Author: Tian Tao Date: Tue Oct 29 08:51:04 2019 +0800 mailbox: no need to set .owner platform_driver_register the platform_driver_register will set the .owner to THIS_MODULE Signed-off-by: Tian Tao Signed-off-by: Jassi Brar commit 0434d3f4525af32bc29f858f71300351041f552d Author: Brandon Maier Date: Sun Nov 17 14:36:49 2019 -0600 mailbox/omap: Handle if CONFIG_PM is disabled If CONFIG_PM is disabled, pm_runtime_put_sync() returns -ENOSYS. Signed-off-by: Brandon Maier Signed-off-by: Jassi Brar commit 89d57dddd7d319ded00415790a0bb3c954b7e386 Merge: 3f1b210a7f97 0ca40f41d795 Author: Linus Torvalds Date: Tue Nov 26 20:11:43 2019 -0800 Merge tag 'media/v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - uAPI documentation for stateless decoders - Added a new CEC ioctl together with its documentation - Improved IPU3 documentation - New i2c drivers: hi556 and imx290 - Added support on Vivid driver for meta streams - Added de-interlace support for sunxi subdriver - Added a few new remote controler keymaps - Added H.265 support for Sunxi Cedrus driver - Another round of random driver cleanups, fixes and improvements * tag 'media/v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (361 commits) media: Revert "media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding" media: hantro: Set H264 FIELDPIC_FLAG_E flag correctly media: hantro: Remove now unused H264 pic_size media: hantro: Use output buffer width and height for H264 decoding media: hantro: Reduce H264 extra space for motion vectors media: hantro: Fix H264 motion vector buffer offset media: ti-vpe: vpe: fix compatible to match bindings media: dt-bindings: media: ti-vpe: Document VPE driver media: zr364xx: remove redundant assigmnent to idx, clean up code media: Documentation: media: *_DEFAULT targets for subdevs media: hantro: Fix s_fmt for dynamic resolution changes media: i2c: Use the correct style for SPDX License Identifier media: siano: Use the correct style for SPDX License Identifier media: vicodec: media_device_cleanup was called too early media: vim2m: media_device_cleanup was called too early media: cedrus: Increase maximum supported size media: cedrus: Fix H264 4k support media: cedrus: Properly signal size in mode register media: v4l2-ctrl: Lock main_hdl on operations of requests_queued. media: si470x-i2c: add missed operations in remove ... commit 3f1b210a7f97f7e75c56174ada476fba2d36f340 Merge: 361b0d286afe bf2aa5cadd1c Author: Linus Torvalds Date: Tue Nov 26 20:04:35 2019 -0800 Merge tag 'sound-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "There have been some significant changes in the core side, both for ALSA and ASoC, while lots of development have been seen in SOF, as well as many small fixes/improvements for ASoC codecs and platforms. Below is a highlight in this cycle: Core: - The unification of PCM vmalloc buffer allocation helpers into the standard API - Clean up of the default PCM mmap handling for vmalloc & SG-buffer - Fix potential races at ALSA timer open - A few new PCM API extensions; just preliminary core changes, the actual changes in drivers will be merged in 5.6 - Continued ASoC componentization works; now almost everything is a common ASoC component object. A lot of refactoring and simplification have been done along with it. ASoC: - Many fixes to the Sound Open Firmware (SOF) code - Wake on voice support for Chromebooks - SPI support and trigger word detection for RT5677 - New drivers for Analog Devices ADAU7118, Intel Cannonlake systems with RT1011 and RT5682, Texas Instruments TAS2562 and TAS2770 HD-audio: - Improved Intel DSP configuration / probe code for SOF - Plumbing the legacy HD-audio driver with Intel SOF HDMI - DP-MST support for Nvidia HDMI codecs - Realtek quirks cleanups and new additions as usual Others: - Lots of refactoring and cleanups for FireWire; period-size sharing, h/w IRQ interval configuration, clock recovery improvements, etc - USB-audio: Scarlett mixer quirks - Cleanups of PCM calls in various drivers (including media and USB) to adapt the core API changes" * tag 'sound-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (497 commits) ALSA: usb-audio: Fix Focusrite Scarlett 6i6 gen1 - input handling ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC ALSA: aloop: Fix dependency on timer API ASoC: DMI long name - avoid to add board name if matches with product name ASoC: improve the DMI long card code in asoc-core ASoC: rsnd: fix DALIGN register for SSIU ALSA: aloop: Avoid unexpected timer event callback tasklets ALSA: aloop: Remove redundant locking in timer open function ASoC: component: Add sync_stop PCM ops ASoC: pcm: Make ioctl ops optional ALSA: hda/hdmi - Clear codec->relaxed_resume flag at unbinding ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs ALSA: cs4236: fix error return comparison of an unsigned integer ALSA: usb-audio: Fix NULL dereference at parsing BADD ALSA: usb-audio: Fix Scarlett 6i6 Gen 2 port data ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop ALSA: hda/realtek - Move some alc236 pintbls to fallback table ALSA: hda/realtek - Move some alc256 pintbls to fallback table ALSA: docs: Update about the new PCM sync_stop ops ALSA: pcm: Add card sync_irq field ... commit 361b0d286afea0d867537536977a695b5557d133 Merge: 6e9f879684b4 1afc14032e54 Author: Linus Torvalds Date: Tue Nov 26 19:45:12 2019 -0800 Merge tag 'devprop-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework updates from Rafael Wysocki: "Add support for printing fwnode names using a new conversion specifier "%pfw" (Sakari Ailus), clean up the software node and efi/apple-properties code in preparation for improved software node reference properties handling (Dmitry Torokhov) and fix the struct fwnode_operations description (Heikki Krogerus)" * tag 'devprop-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits) software node: simplify property_entry_read_string_array() software node: unify PROPERTY_ENTRY_XXX macros software node: remove property_entry_read_uNN_array functions software node: get rid of property_set_pointer() software node: clean up property_copy_string_array() software node: mark internal macros with double underscores efi/apple-properties: use PROPERTY_ENTRY_U8_ARRAY_LEN software node: introduce PROPERTY_ENTRY_XXX_ARRAY_LEN() software node: remove DEV_PROP_MAX device property: Fix the description of struct fwnode_operations lib/test_printf: Add tests for %pfw printk modifier lib/vsprintf: Add %pfw conversion specifier for printing fwnode names lib/vsprintf: OF nodes are first and foremost, struct device_nodes lib/vsprintf: Make use of fwnode API to obtain node names and separators lib/vsprintf: Add a note on re-using %pf or %pF lib/vsprintf: Remove support for %pF and %pf in favour of %pS and %ps device property: Add a function to obtain a node's prefix device property: Add fwnode_get_name for returning the name of a node device property: Add functions for accessing node's parents device property: Move fwnode_get_parent() up ... commit 6e9f879684b46331f51d0c76ebee981c788417db Merge: 9e7a03233e02 782b59711e15 Author: Linus Torvalds Date: Tue Nov 26 19:25:25 2019 -0800 Merge tag 'acpi-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to upstream revision 20191018, add support for EFI specific purpose memory, update the ACPI EC driver to make it work on systems with hardware-reduced ACPI, improve ACPI-based device enumeration for some platforms, rework the lid blacklist handling in the button driver and add more lid quirks to it, unify ACPI _HID/_UID matching, fix assorted issues and clean up the code and documentation. Specifics: - Update the ACPICA code in the kernel to upstream revision 20191018 including: * Fixes for Clang warnings (Bob Moore) * Fix for possible overflow in get_tick_count() (Bob Moore) * Introduction of acpi_unload_table() (Bob Moore) * Debugger and utilities updates (Erik Schmauss) * Fix for unloading tables loaded via configfs (Nikolaus Voss) - Add support for EFI specific purpose memory to optionally allow either application-exclusive or core-kernel-mm managed access to differentiated memory (Dan Williams) - Fix and clean up processing of the HMAT table (Brice Goglin, Qian Cai, Tao Xu) - Update the ACPI EC driver to make it work on systems with hardware-reduced ACPI (Daniel Drake) - Always build in support for the Generic Event Device (GED) to allow one kernel binary to work both on systems with full hardware ACPI and hardware-reduced ACPI (Arjan van de Ven) - Fix the table unload mechanism to unregister platform devices created when the given table was loaded (Andy Shevchenko) - Rework the lid blacklist handling in the button driver and add more lid quirks to it (Hans de Goede) - Improve ACPI-based device enumeration for some platforms based on Intel BayTrail SoCs (Hans de Goede) - Add an OpRegion driver for the Cherry Trail Crystal Cove PMIC and prevent handlers from being registered for unhandled PMIC OpRegions (Hans de Goede) - Unify ACPI _HID/_UID matching (Andy Shevchenko) - Clean up documentation and comments (Cao jin, James Pack, Kacper Piwiński)" * tag 'acpi-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits) ACPI: OSI: Shoot duplicate word ACPI: HMAT: use %u instead of %d to print u32 values ACPI: NUMA: HMAT: fix a section mismatch ACPI: HMAT: don't mix pxm and nid when setting memory target processor_pxm ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device ACPI: NUMA: HMAT: Register HMAT at device_initcall level device-dax: Add a driver for "hmem" devices dax: Fix alloc_dax_region() compile warning lib: Uplevel the pmem "region" ida to a global allocator x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP arm/efi: EFI soft reservation to memblock x86/efi: EFI soft reservation to E820 enumeration efi: Common enable/disable infrastructure for EFI soft reservation x86/efi: Push EFI_MEMMAP check into leaf routines efi: Enumerate EFI_MEMORY_SP ACPI: NUMA: Establish a new drivers/acpi/numa/ directory ACPICA: Update version to 20191018 ACPICA: debugger: remove leading whitespaces when converting a string to a buffer ACPICA: acpiexec: initialize all simple types and field units from user input ACPICA: debugger: add field unit support for acpi_db_get_next_token ... commit 9e7a03233e02afd3ee061e373355f34d7254f1e6 Merge: c2da5bdc66a3 e350b60f4e0f Author: Linus Torvalds Date: Tue Nov 26 19:06:44 2019 -0800 Merge tag 'pm-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These include cpuidle changes to use nanoseconds (instead of microseconds) as the unit of time and to simplify checks for disabled idle states in the idle loop, some cpuidle fixes and governor updates, assorted cpufreq updates (driver updates mostly and a few core fixes and cleanups), devfreq updates (dominated by the tegra30 driver changes), new CPU IDs for the RAPL power capping driver, relatively minor updates of the generic power domains (genpd) and operation performance points (OPP) frameworks, and assorted fixes and cleanups. There are also two maintainer information updates: Chanwoo Choi will be maintaining the devfreq subsystem going forward and Todd Brandt is going to maintain the pm-graph utility (created by him). Specifics: - Use nanoseconds (instead of microseconds) as the unit of time in the cpuidle core and simplify checks for disabled idle states in the idle loop (Rafael Wysocki) - Fix and clean up the teo cpuidle governor (Rafael Wysocki) - Fix the cpuidle registration error code path (Zhenzhong Duan) - Avoid excessive vmexits in the ACPI cpuidle driver (Yin Fengwei) - Extend the idle injection infrastructure to be able to measure the requested duration in nanoseconds and to allow an exit latency limit for idle states to be specified (Daniel Lezcano) - Fix cpufreq driver registration and clarify a comment in the cpufreq core (Viresh Kumar) - Add NULL checks to the show() and store() methods of sysfs attributes exposed by cpufreq (Kai Shen) - Update cpufreq drivers: * Fix for a plain int as pointer warning from sparse in intel_pstate (Jamal Shareef) * Fix for a hardcoded number of CPUs and stack bloat in the powernv driver (John Hubbard) * Updates to the ti-cpufreq driver and DT files to support new platforms and migrate bindings from opp-v1 to opp-v2 (Adam Ford, H. Nikolaus Schaller) * Merging of the arm_big_little and vexpress-spc drivers and related cleanup (Sudeep Holla) * Fix for imx's default speed grade value (Anson Huang) * Minor cleanup of the s3c64xx driver (Nathan Chancellor) * CPU speed bin detection fix for sun50i (Ondrej Jirman) - Appoint Chanwoo Choi as the new devfreq maintainer. - Update the devfreq core: * Check NULL governor in available_governors_show sysfs to prevent showing wrong governor information and fix a race condition between devfreq_update_status() and trans_stat_show() (Leonard Crestez) * Add new 'interrupt-driven' flag for devfreq governors to allow interrupt-driven governors to prevent the devfreq core from polling devices for status (Dmitry Osipenko) * Improve an error message in devfreq_add_device() (Matthias Kaehlcke) - Update devfreq drivers: * tegra30 driver fixes and cleanups (Dmitry Osipenko) * Removal of unused property from dt-binding documentation for the exynos-bus driver (Kamil Konieczny) * exynos-ppmu cleanup and DT bindings update (Lukasz Luba, Marek Szyprowski) - Add new CPU IDs for CometLake Mobile and Desktop to the Intel RAPL power capping driver (Zhang Rui) - Allow device initialization in the generic power domains (genpd) framework to be more straightforward and clean it up (Ulf Hansson) - Add support for adjusting OPP voltages at run time to the OPP framework (Stephen Boyd) - Avoid freeing memory that has never been allocated in the hibernation core (Andy Whitcroft) - Clean up function headers in a header file and coding style in the wakeup IRQs handling code (Ulf Hansson, Xiaofei Tan) - Clean up the SmartReflex adaptive voltage scaling (AVS) driver for ARM (Ben Dooks, Geert Uytterhoeven) - Wrap power management documentation to fit in 80 columns (Bjorn Helgaas) - Add pm-graph utility entry to MAINTAINERS (Todd Brandt) - Update the cpupower utility: * Fix the handling of set and info subcommands (Abhishek Goel) * Fix build warnings (Nathan Chancellor) * Improve mperf_monitor handling (Janakarajan Natarajan)" * tag 'pm-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (83 commits) PM: Wrap documentation to fit in 80 columns cpuidle: Pass exit latency limit to cpuidle_use_deepest_state() cpuidle: Allow idle injection to apply exit latency limit cpuidle: Introduce cpuidle_driver_state_disabled() for driver quirks cpuidle: teo: Avoid code duplication in conditionals cpufreq: Register drivers only after CPU devices have been registered cpuidle: teo: Avoid using "early hits" incorrectly cpuidle: teo: Exclude cpuidle overhead from computations PM / Domains: Convert to dev_to_genpd_safe() in genpd_syscore_switch() mmc: tmio: Avoid boilerplate code in ->runtime_suspend() PM / Domains: Implement the ->start() callback for genpd PM / Domains: Introduce dev_pm_domain_start() ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition PM / wakeirq: remove unnecessary parentheses power: avs: smartreflex: Remove superfluous cast in debugfs_create_file() call cpuidle: Use nanoseconds as the unit of time PM / OPP: Support adjusting OPP voltages at runtime PM / core: Clean up some function headers in power.h cpufreq: Add NULL checks to show() and store() methods of cpufreq cpufreq: intel_pstate: Fix plain int as pointer warning from sparse ... commit 1eb9151eb7c58c2a4b995918271e13037ae278b9 Author: Gabriel Krisman Bertazi Date: Mon Nov 25 11:51:53 2019 -0500 scsi: MAINTAINERS: Add the linux-scsi mailing list to the ISCSI entry Most people who review iSCSI are following linux-scsi, but some are not in open-scsi. Make sure we are routing iSCSI patches to the right list. Link: https://lore.kernel.org/r/85h82rvqza.fsf@collabora.com Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Martin K. Petersen commit 73374b39b01e91b90ff683dc259b89f528c4f367 Author: YueHaibing Date: Mon Nov 25 22:44:54 2019 +0800 scsi: megaraid_sas: Make poll_aen_lock static Fix sparse warning: drivers/scsi/megaraid/megaraid_sas_base.c:187:12: warning: symbol 'poll_aen_lock' was not declared. Should it be static? Link: https://lore.kernel.org/r/20191125144454.22680-1-yuehaibing@huawei.com Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit a35989a0723c53b0364322e39c7a9495336ff7e6 Author: Damien Le Moal Date: Mon Nov 25 16:05:18 2019 +0900 scsi: sd_zbc: Improve report zones error printout In the case of a report zones command failure, instead of simply printing the host_byte and driver_byte values returned, print a message that is more human readable and useful, adding sense codes too. To do so, use the already defined sd_print_sense_hdr() and sd_print_result() functions by moving the declaration of these functions into sd.h. Link: https://lore.kernel.org/r/20191125070518.951717-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 45dc8f2d9c94ed74a5e31e63e9136a19a7e16081 Author: Huacai Chen Date: Thu Nov 21 13:40:47 2019 +0800 scsi: qla2xxx: Fix qla2x00_request_irqs() for MSI Commit 4fa183455988 ("scsi: qla2xxx: Utilize pci_alloc_irq_vectors/ pci_free_irq_vectors calls.") use pci_alloc_irq_vectors() to replace pci_enable_msi() but it didn't handle the return value correctly. This bug make qla2x00 always fail to setup MSI if MSI-X fail, so fix it. BTW, improve the log message of return value in qla2x00_request_irqs() to avoid confusion. Fixes: 4fa183455988 ("scsi: qla2xxx: Utilize pci_alloc_irq_vectors/pci_free_irq_vectors calls.") Cc: Michael Hernandez Link: https://lore.kernel.org/r/1574314847-14280-1-git-send-email-chenhc@lemote.com Signed-off-by: Huacai Chen Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit c8a347931869bf4373bfd4036d297b8e11ab48ab Author: Martin Wilck Date: Fri Nov 22 22:19:24 2019 +0000 scsi: qla2xxx: unregister ports after GPN_FT failure When ports are lost due to unzoning them, and the initiator port is not part of any more zones, the GPN_FT command used for the fabric scan may fail. In this case, the current code simply gives up after a few retries. But if the zone is gone, all rports should actually be marked as lost. Fix this by jumping to the code that handles logout after GNN_FT after scan retries are exhausted. Fixes: f352eeb75419 ("scsi: qla2xxx: Add ability to use GPNFT/GNNFT for RSCN handling") Link: https://lore.kernel.org/r/20191122221912.20100-3-martin.wilck@suse.com Tested-by: Jason Orendorf Signed-off-by: Martin Wilck Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit d341e9a8f2cffe4000c610225c629f62c7489c74 Author: Martin Wilck Date: Fri Nov 22 22:19:22 2019 +0000 scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan In qla2x00_find_all_fabric_devs(), fcport->flags & FCF_LOGIN_NEEDED is a necessary condition for logging into new rports, but not for dropping lost ones. Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Link: https://lore.kernel.org/r/20191122221912.20100-2-martin.wilck@suse.com Tested-by: David Bond Signed-off-by: Martin Wilck Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 69b41f141dc4e465e2f5e98efa3b38f022dfbd4a Author: YueHaibing Date: Fri Nov 22 02:09:11 2019 +0000 scsi: pm80xx: Remove unused include of linux/version.h Remove #include . Don't need it. Link: https://lore.kernel.org/r/20191122020911.33269-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 0e7c353e1828819eb92af0a64fc9b2f4f778b76e Author: Colin Ian King Date: Wed Nov 20 13:50:31 2019 +0000 scsi: pm80xx: fix logic to break out of loop when register value is 2 or 3 The condition (reg_val != 2) || (reg_val != 3) will always be true because reg_val cannot be equal to two different values at the same time. Fix this by replacing the || operator with && so that the loop will loop if reg_val is not a 2 and not a 3 as was originally intended. Fixes: 50dc2f221455 ("scsi: pm80xx: Modified the logic to collect fatal dump") Link: https://lore.kernel.org/r/20191120135031.270708-1-colin.king@canonical.com Addresses-Coverity: ("Constant expression result") Signed-off-by: Colin Ian King Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit c2da5bdc66a377f0b82ee959f19f5a6774706b83 Merge: 168829ad09ca 0bcd7762727d Author: Linus Torvalds Date: Tue Nov 26 17:12:12 2019 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 merge fix from Ingo Molnar: "I missed one other semantic conflict that can result in build failures on certain stripped down x86 32-bit configs, for example 32-bit 'allnoconfig' where CONFIG_X86_IOPL_IOPERM gets turned off" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/iopl: Make 'struct tss_struct' constant size again commit d0f010434124598988ba1c97fbb0e4e820ff5d8c Author: Alexei Starovoitov Date: Tue Nov 26 15:01:06 2019 -0800 bpf: Fix static checker warning kernel/bpf/btf.c:4023 btf_distill_func_proto() error: potentially dereferencing uninitialized 't'. kernel/bpf/btf.c 4012 nargs = btf_type_vlen(func); 4013 if (nargs >= MAX_BPF_FUNC_ARGS) { 4014 bpf_log(log, 4015 "The function %s has %d arguments. Too many.\n", 4016 tname, nargs); 4017 return -EINVAL; 4018 } 4019 ret = __get_type_size(btf, func->type, &t); ^^ t isn't initialized for the first -EINVAL return This is unlikely path, since BTF should have been validated at this point. Fix it by returning 'void' BTF. Reported-by: Dan Carpenter Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191126230106.237179-1-ast@kernel.org commit 168829ad09ca9cdfdc664b2110d0e3569932c12d Merge: 1ae78780eda5 500543c53a54 Author: Linus Torvalds Date: Tue Nov 26 16:02:40 2019 -0800 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "The main changes in this cycle were: - A comprehensive rewrite of the robust/PI futex code's exit handling to fix various exit races. (Thomas Gleixner et al) - Rework the generic REFCOUNT_FULL implementation using atomic_fetch_* operations so that the performance impact of the cmpxchg() loops is mitigated for common refcount operations. With these performance improvements the generic implementation of refcount_t should be good enough for everybody - and this got confirmed by performance testing, so remove ARCH_HAS_REFCOUNT and REFCOUNT_FULL entirely, leaving the generic implementation enabled unconditionally. (Will Deacon) - Other misc changes, fixes, cleanups" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits) lkdtm: Remove references to CONFIG_REFCOUNT_FULL locking/refcount: Remove unused 'refcount_error_report()' function locking/refcount: Consolidate implementations of refcount_t locking/refcount: Consolidate REFCOUNT_{MAX,SATURATED} definitions locking/refcount: Move saturation warnings out of line locking/refcount: Improve performance of generic REFCOUNT_FULL code locking/refcount: Move the bulk of the REFCOUNT_FULL implementation into the header locking/refcount: Remove unused refcount_*_checked() variants locking/refcount: Ensure integer operands are treated as signed locking/refcount: Define constants for saturation and max refcount values futex: Prevent exit livelock futex: Provide distinct return value when owner is exiting futex: Add mutex around futex exit futex: Provide state handling for exec() as well futex: Sanitize exit state handling futex: Mark the begin of futex exit explicitly futex: Set task::futex_state to DEAD right after handling futex exit futex: Split futex_mm_release() for exit/exec exit/exec: Seperate mm_release() futex: Replace PF_EXITPIDONE with a state ... commit a95069ecb7092d03b2ea1c39ee04514fe9627540 Author: Jeroen de Borst Date: Tue Nov 26 15:36:19 2019 -0800 gve: Fix the queue page list allocated pages count In gve_alloc_queue_page_list(), when a page allocation fails, qpl->num_entries will be wrong. In this case priv->num_registered_pages can underflow in gve_free_queue_page_list(), causing subsequent calls to gve_alloc_queue_page_list() to fail. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: Jeroen de Borst Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 1ae78780eda54023a0fb49ee743dbba39da148e0 Merge: 77a05940eee7 43e0ae7ae0f5 Author: Linus Torvalds Date: Tue Nov 26 15:42:43 2019 -0800 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The main changes in this cycle were: - Dynamic tick (nohz) updates, perhaps most notably changes to force the tick on when needed due to lengthy in-kernel execution on CPUs on which RCU is waiting. - Linux-kernel memory consistency model updates. - Replace rcu_swap_protected() with rcu_prepace_pointer(). - Torture-test updates. - Documentation updates. - Miscellaneous fixes" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (51 commits) security/safesetid: Replace rcu_swap_protected() with rcu_replace_pointer() net/sched: Replace rcu_swap_protected() with rcu_replace_pointer() net/netfilter: Replace rcu_swap_protected() with rcu_replace_pointer() net/core: Replace rcu_swap_protected() with rcu_replace_pointer() bpf/cgroup: Replace rcu_swap_protected() with rcu_replace_pointer() fs/afs: Replace rcu_swap_protected() with rcu_replace_pointer() drivers/scsi: Replace rcu_swap_protected() with rcu_replace_pointer() drm/i915: Replace rcu_swap_protected() with rcu_replace_pointer() x86/kvm/pmu: Replace rcu_swap_protected() with rcu_replace_pointer() rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer() rcu: Suppress levelspread uninitialized messages rcu: Fix uninitialized variable in nocb_gp_wait() rcu: Update descriptions for rcu_future_grace_period tracepoint rcu: Update descriptions for rcu_nocb_wake tracepoint rcu: Remove obsolete descriptions for rcu_barrier tracepoint rcu: Ensure that ->rcu_urgent_qs is set before resched IPI workqueue: Convert for_each_wq to use built-in list check rcu: Several rcu_segcblist functions can be static rcu: Remove unused function hlist_bl_del_init_rcu() Documentation: Rename rcu_node_context_switch() to rcu_note_context_switch() ... commit 77a05940eee7e9891cd6add7a690a3e762ee21b0 Merge: 3f59dbcace56 de881a341c41 Author: Linus Torvalds Date: Tue Nov 26 15:23:14 2019 -0800 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "The biggest changes in this cycle were: - Make kcpustat vtime aware (Frederic Weisbecker) - Rework the CFS load_balance() logic (Vincent Guittot) - Misc cleanups, smaller enhancements, fixes. The load-balancing rework is the most intrusive change: it replaces the old heuristics that have become less meaningful after the introduction of the PELT metrics, with a grounds-up load-balancing algorithm. As such it's not really an iterative series, but replaces the old load-balancing logic with the new one. We hope there are no performance regressions left - but statistically it's highly probable that there *is* going to be some workload that is hurting from these chnages. If so then we'd prefer to have a look at that workload and fix its scheduling, instead of reverting the changes" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits) rackmeter: Use vtime aware kcpustat accessor leds: Use all-in-one vtime aware kcpustat accessor cpufreq: Use vtime aware kcpustat accessors for user time procfs: Use all-in-one vtime aware kcpustat accessor sched/vtime: Bring up complete kcpustat accessor sched/cputime: Support other fields on kcpustat_field() sched/cpufreq: Move the cfs_rq_util_change() call to cpufreq_update_util() sched/fair: Add comments for group_type and balancing at SD_NUMA level sched/fair: Fix rework of find_idlest_group() sched/uclamp: Fix overzealous type replacement sched/Kconfig: Fix spelling mistake in user-visible help text sched/core: Further clarify sched_class::set_next_task() sched/fair: Use mul_u32_u32() sched/core: Simplify sched_class::pick_next_task() sched/core: Optimize pick_next_task() sched/core: Make pick_next_task_idle() more consistent sched/fair: Better document newidle_balance() leds: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM cpufreq: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM procfs: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM ... commit 66e2f5f7c7728862e9394769722231b9ce3d8672 Author: Maciej Żenczykowski Date: Tue Nov 26 14:44:16 2019 -0800 net: inet_is_local_reserved_port() port arg should be unsigned short Any argument outside of that range would result in an out of bound memory access, since the accessed array is 65536 bits long. Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller commit 4e81c0b3fa93d07653e2415fa71656b080a112fd Author: Paolo Abeni Date: Tue Nov 26 12:55:50 2019 +0100 openvswitch: fix flow command message size When user-space sets the OVS_UFID_F_OMIT_* flags, and the relevant flow has no UFID, we can exceed the computed size, as ovs_nla_put_identifier() will always dump an OVS_FLOW_ATTR_KEY attribute. Take the above in account when computing the flow command message size. Fixes: 74ed7ab9264c ("openvswitch: Add support for unique flow IDs.") Reported-by: Qi Jun Ding Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 3f59dbcace56fae7e4ed303bab90f1bedadcfdf4 Merge: df28204bb0f2 ceb9e77324fa Author: Linus Torvalds Date: Tue Nov 26 15:04:47 2019 -0800 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "The main kernel side changes in this cycle were: - Various Intel-PT updates and optimizations (Alexander Shishkin) - Prohibit kprobes on Xen/KVM emulate prefixes (Masami Hiramatsu) - Add support for LSM and SELinux checks to control access to the perf syscall (Joel Fernandes) - Misc other changes, optimizations, fixes and cleanups - see the shortlog for details. There were numerous tooling changes as well - 254 non-merge commits. Here are the main changes - too many to list in detail: - Enhancements to core tooling infrastructure, perf.data, libperf, libtraceevent, event parsing, vendor events, Intel PT, callchains, BPF support and instruction decoding. - There were updates to the following tools: perf annotate perf diff perf inject perf kvm perf list perf maps perf parse perf probe perf record perf report perf script perf stat perf test perf trace - And a lot of other changes: please see the shortlog and Git log for more details" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (279 commits) perf parse: Fix potential memory leak when handling tracepoint errors perf probe: Fix spelling mistake "addrees" -> "address" libtraceevent: Fix memory leakage in copy_filter_type libtraceevent: Fix header installation perf intel-bts: Does not support AUX area sampling perf intel-pt: Add support for decoding AUX area samples perf intel-pt: Add support for recording AUX area samples perf pmu: When using default config, record which bits of config were changed by the user perf auxtrace: Add support for queuing AUX area samples perf session: Add facility to peek at all events perf auxtrace: Add support for dumping AUX area samples perf inject: Cut AUX area samples perf record: Add aux-sample-size config term perf record: Add support for AUX area sampling perf auxtrace: Add support for AUX area sample recording perf auxtrace: Move perf_evsel__find_pmu() perf record: Add a function to test for kernel support for AUX area sampling perf tools: Add kernel AUX area sampling definitions perf/core: Make the mlock accounting simple again perf report: Jump to symbol source view from total cycles view ... commit df28204bb0f29cc475c0a8893c99b46a11a4903f Merge: 3f6128139092 2278f452a12d Author: Linus Torvalds Date: Tue Nov 26 14:52:11 2019 -0800 Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "The main changes in this cycle were: - Wire up the EFI RNG code for x86. This enables an additional source of entropy during early boot. - Enable the TPM event log code on ARM platforms. - Update Ard's email address" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: libstub/tpm: enable tpm eventlog function for ARM platforms x86: efi/random: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table efi/random: use arch-independent efi_call_proto() MAINTAINERS: update Ard's email address to @kernel.org commit 3f6128139092286cf10e32bef8ccf56a004812d2 Merge: 2be7d348fe92 4b48512c2e9c Author: Linus Torvalds Date: Tue Nov 26 14:47:19 2019 -0800 Merge branch 'core-stacktrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull stacktrace cleanup from Ingo Molnar: "A minor cleanup" * 'core-stacktrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: stacktrace: Get rid of unneeded '!!' pattern commit 786c4a5372e11919b5ea010a7338bac9ef08c732 Author: Dan Murphy Date: Tue Nov 26 08:38:56 2019 -0600 net: phy: dp83869: Fix return paths to return proper values Fix the return paths for all I/O operations to ensure that the I/O completed successfully. Then pass the return to the caller for further processing Fixes: 01db923e8377 ("net: phy: dp83869: Add TI dp83869 phy") Reported-by: Andrew Lunn Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit 7eb9d7675c08937cd11d32b0b40442d4d731c5ee Author: Nikolay Aleksandrov Date: Wed Nov 27 00:16:44 2019 +0200 net: psample: fix skb_over_panic We need to calculate the skb size correctly otherwise we risk triggering skb_over_panic[1]. The issue is that data_len is added to the skb in a nl attribute, but we don't account for its header size (nlattr 4 bytes) and alignment. We account for it when calculating the total size in the > PSAMPLE_MAX_PACKET_SIZE comparison correctly, but not when allocating after that. The fix is simple - use nla_total_size() for data_len when allocating. To reproduce: $ tc qdisc add dev eth1 clsact $ tc filter add dev eth1 egress matchall action sample rate 1 group 1 trunc 129 $ mausezahn eth1 -b bcast -a rand -c 1 -p 129 < skb_over_panic BUG(), tail is 4 bytes past skb->end > [1] Trace: [ 50.459526][ T3480] skbuff: skb_over_panic: text:(____ptrval____) len:196 put:136 head:(____ptrval____) data:(____ptrval____) tail:0xc4 end:0xc0 dev: [ 50.474339][ T3480] ------------[ cut here ]------------ [ 50.481132][ T3480] kernel BUG at net/core/skbuff.c:108! [ 50.486059][ T3480] invalid opcode: 0000 [#1] PREEMPT SMP [ 50.489463][ T3480] CPU: 3 PID: 3480 Comm: mausezahn Not tainted 5.4.0-rc7 #108 [ 50.492844][ T3480] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-2.fc30 04/01/2014 [ 50.496551][ T3480] RIP: 0010:skb_panic+0x79/0x7b [ 50.498261][ T3480] Code: bc 00 00 00 41 57 4c 89 e6 48 c7 c7 90 29 9a 83 4c 8b 8b c0 00 00 00 50 8b 83 b8 00 00 00 50 ff b3 c8 00 00 00 e8 ae ef c0 fe <0f> 0b e8 2f df c8 fe 48 8b 55 08 44 89 f6 4c 89 e7 48 c7 c1 a0 22 [ 50.504111][ T3480] RSP: 0018:ffffc90000447a10 EFLAGS: 00010282 [ 50.505835][ T3480] RAX: 0000000000000087 RBX: ffff888039317d00 RCX: 0000000000000000 [ 50.507900][ T3480] RDX: 0000000000000000 RSI: ffffffff812716e1 RDI: 00000000ffffffff [ 50.509820][ T3480] RBP: ffffc90000447a60 R08: 0000000000000001 R09: 0000000000000000 [ 50.511735][ T3480] R10: ffffffff81d4f940 R11: 0000000000000000 R12: ffffffff834a22b0 [ 50.513494][ T3480] R13: ffffffff82c10433 R14: 0000000000000088 R15: ffffffff838a8084 [ 50.515222][ T3480] FS: 00007f3536462700(0000) GS:ffff88803eac0000(0000) knlGS:0000000000000000 [ 50.517135][ T3480] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 50.518583][ T3480] CR2: 0000000000442008 CR3: 000000003b222000 CR4: 00000000000006e0 [ 50.520723][ T3480] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 50.522709][ T3480] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 50.524450][ T3480] Call Trace: [ 50.525214][ T3480] skb_put.cold+0x1b/0x1b [ 50.526171][ T3480] psample_sample_packet+0x1d3/0x340 [ 50.527307][ T3480] tcf_sample_act+0x178/0x250 [ 50.528339][ T3480] tcf_action_exec+0xb1/0x190 [ 50.529354][ T3480] mall_classify+0x67/0x90 [ 50.530332][ T3480] tcf_classify+0x72/0x160 [ 50.531286][ T3480] __dev_queue_xmit+0x3db/0xd50 [ 50.532327][ T3480] dev_queue_xmit+0x18/0x20 [ 50.533299][ T3480] packet_sendmsg+0xee7/0x2090 [ 50.534331][ T3480] sock_sendmsg+0x54/0x70 [ 50.535271][ T3480] __sys_sendto+0x148/0x1f0 [ 50.536252][ T3480] ? tomoyo_file_ioctl+0x23/0x30 [ 50.537334][ T3480] ? ksys_ioctl+0x5e/0xb0 [ 50.540068][ T3480] __x64_sys_sendto+0x2a/0x30 [ 50.542810][ T3480] do_syscall_64+0x73/0x1f0 [ 50.545383][ T3480] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 50.548477][ T3480] RIP: 0033:0x7f35357d6fb3 [ 50.551020][ T3480] Code: 48 8b 0d 18 90 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d f9 d3 20 00 00 75 13 49 89 ca b8 2c 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 34 c3 48 83 ec 08 e8 eb f6 ff ff 48 89 04 24 [ 50.558547][ T3480] RSP: 002b:00007ffe0c7212c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 50.561870][ T3480] RAX: ffffffffffffffda RBX: 0000000001dac010 RCX: 00007f35357d6fb3 [ 50.565142][ T3480] RDX: 0000000000000082 RSI: 0000000001dac2a2 RDI: 0000000000000003 [ 50.568469][ T3480] RBP: 00007ffe0c7212f0 R08: 00007ffe0c7212d0 R09: 0000000000000014 [ 50.571731][ T3480] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000082 [ 50.574961][ T3480] R13: 0000000001dac2a2 R14: 0000000000000001 R15: 0000000000000003 [ 50.578170][ T3480] Modules linked in: sch_ingress virtio_net [ 50.580976][ T3480] ---[ end trace 61a515626a595af6 ]--- CC: Yotam Gigi CC: Jiri Pirko CC: Jamal Hadi Salim CC: Simon Horman CC: Roopa Prabhu Fixes: 6ae0a6286171 ("net: Introduce psample, a new genetlink channel for packet sampling") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 14c59dcde6f8a633ccca5abfec8bc79c8bdf7b12 Merge: 82f31ebf61be 2eb1d3f4bcae Author: David S. Miller Date: Tue Nov 26 14:03:58 2019 -0800 Merge branch 'net-func-cast' Phong Tran says: ==================== Fix -Wcast-function-type usb net drivers Change log with v1: - Modify suffix of patch subject. - Did the checkpatch.pl (remove the space, add a blank line). ==================== Signed-off-by: David S. Miller commit 2eb1d3f4bcae6c83943214ccb26968a48360db06 Author: Phong Tran Date: Tue Nov 26 20:54:13 2019 +0700 net: usbnet: Fix -Wcast-function-type correct usage prototype of callback in tasklet_init(). Report by https://github.com/KSPP/linux/issues/20 Signed-off-by: Phong Tran Signed-off-by: David S. Miller commit 1d4a09dadbb9ea7baaf6be897d69020c729e7440 Author: Phong Tran Date: Tue Nov 26 20:54:12 2019 +0700 net: hso: Fix -Wcast-function-type correct usage prototype of callback in tasklet_init(). Report by https://github.com/KSPP/linux/issues/20 Signed-off-by: Phong Tran Signed-off-by: David S. Miller commit e944475e69849273ca8f1fe04a3ce81b5901d165 Author: Jens Axboe Date: Tue Nov 26 15:02:04 2019 -0700 io_uring: make poll->wait dynamically allocated In the quest to bring io_kiocb down to 3 cachelines, this one does the trick. Make the wait_queue_entry for the poll command come out of kmalloc instead of embedding it in struct io_poll_iocb, as the latter is the largest member of io_kiocb. Once we trim this down a bit, we're back at a healthy 192 bytes for struct io_kiocb. Signed-off-by: Jens Axboe commit 6206f0e180d4eddc0a178f57120ab1b913701f6e Author: Jens Axboe Date: Tue Nov 26 11:59:32 2019 -0700 io-wq: shrink io_wq_work a bit Currently we're using 40 bytes for the io_wq_work structure, and 16 of those is the doubly link list node. We don't need doubly linked lists, we always add to tail to keep things ordered, and any other use case is list traversal with deletion. For the deletion case, we can easily support any node deletion by keeping track of the previous entry. This shrinks io_wq_work to 32 bytes, and subsequently io_kiock from io_uring to 216 to 208 bytes. Signed-off-by: Jens Axboe commit 3fc50ab559f5ae400aa33bd0836b3602da7fa51b Author: Jann Horn Date: Tue Nov 26 19:10:20 2019 +0100 io-wq: fix handling of NUMA node IDs There are several things that can go wrong in the current code on NUMA systems, especially if not all nodes are online all the time: - If the identifiers of the online nodes do not form a single contiguous block starting at zero, wq->wqes will be too small, and OOB memory accesses will occur e.g. in the loop in io_wq_create(). - If a node comes online between the call to num_online_nodes() and the for_each_node() loop in io_wq_create(), an OOB write will occur. - If a node comes online between io_wq_create() and io_wq_enqueue(), a lookup is performed for an element that doesn't exist, and an OOB read will probably occur. Fix it by: - using nr_node_ids instead of num_online_nodes() for the allocation size; nr_node_ids is calculated by setup_nr_node_ids() to be bigger than the highest node ID that could possibly come online at some point, even if those nodes' identifiers are not a contiguous block - creating workers for all possible CPUs, not just all online ones This is basically what the normal workqueue code also does, as far as I can tell. Signed-off-by: Jann Horn Signed-off-by: Jens Axboe commit ad6e005ca68de7af76f9ed3e4c9b6f0aa2f842e3 Author: Jann Horn Date: Tue Nov 26 17:39:45 2019 +0100 io_uring: use kzalloc instead of kcalloc for single-element allocations These allocations are single-element allocations, so don't use the array allocation wrapper for them. Signed-off-by: Jann Horn Signed-off-by: Jens Axboe commit 7d009165550adc64e3561c65ecce564125052e00 Author: Pavel Begunkov Date: Mon Nov 25 23:14:40 2019 +0300 io_uring: cleanup io_import_fixed() Clean io_import_fixed() call site and make it return proper type. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cf6fd4bd559ee61a4454b161863c8de6f30f8dca Author: Pavel Begunkov Date: Mon Nov 25 23:14:39 2019 +0300 io_uring: inline struct sqe_submit There is no point left in keeping struct sqe_submit. Inline it into struct io_kiocb, so any req->submit.field is now just req->field - moves initialisation of ring_file into io_get_req() - removes duplicated req->sequence. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cc42e0ac17d3664a70e020dfe7897f14e7aa7453 Author: Pavel Begunkov Date: Mon Nov 25 23:14:38 2019 +0300 io_uring: store timeout's sqe->off in proper place Timeouts' sequence offset (i.e. sqe->off) is stored in req->submit.sequence under a false name. Keep it in timeout.data instead. The unused space for sequence will be reclaimed in the following patches. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d69e07793f891524c6bbf1e75b9ae69db4450953 Author: Jens Axboe Date: Mon Nov 25 17:04:13 2019 -0700 net: disallow ancillary data for __sys_{send,recv}msg_file() Only io_uring uses (and added) these, and we want to disallow the use of sendmsg/recvmsg for anything but regular data transfers. Use the newly added prep helper to split the msghdr copy out from the core function, to check for msg_control and msg_controllen settings. If either is set, we return -EINVAL. Acked-by: David S. Miller Signed-off-by: Jens Axboe commit 4257c8ca13b084550574b8c9a667d9c90ff746eb Author: Jens Axboe Date: Mon Nov 25 14:27:34 2019 -0700 net: separate out the msghdr copy from ___sys_{send,recv}msg() This is in preparation for enabling the io_uring helpers for sendmsg and recvmsg to first copy the header for validation before continuing with the operation. There should be no functional changes in this patch. Acked-by: David S. Miller Signed-off-by: Jens Axboe commit 82f31ebf61bed3077c9935308e0a4b6c44842c5a Author: Maciej Żenczykowski Date: Mon Nov 25 15:37:04 2019 -0800 net: port < inet_prot_sock(net) --> inet_port_requires_bind_service(net, port) Note that the sysctl write accessor functions guarantee that: net->ipv4.sysctl_ip_prot_sock <= net->ipv4.ip_local_ports.range[0] invariant is maintained, and as such the max() in selinux hooks is actually spurious. ie. even though if (snum < max(inet_prot_sock(sock_net(sk)), low) || snum > high) { per logic is the same as if ((snum < inet_prot_sock(sock_net(sk)) && snum < low) || snum > high) { it is actually functionally equivalent to: if (snum < low || snum > high) { which is equivalent to: if (snum < inet_prot_sock(sock_net(sk)) || snum < low || snum > high) { even though the first clause is spurious. But we want to hold on to it in case we ever want to change what what inet_port_requires_bind_service() means (for example by changing it from a, by default, [0..1024) range to some sort of set). Test: builds, git 'grep inet_prot_sock' finds no other references Cc: Eric Dumazet Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller commit e94a5d1681fcf6d857503a53febb4a54cee7e1d3 Merge: fb8223888e72 ff25dcb9a149 Author: David S. Miller Date: Tue Nov 26 13:19:31 2019 -0800 Merge branch 'ibmvnic-Harden-device-commands-and-queries' Thomas Falcon says: ==================== ibmvnic: Harden device commands and queries This patch series fixes some shortcomings with the current VNIC device command implementation. The first patch fixes the initialization of driver completion structures used for device commands. Additionally, all waits for device commands are bounded with a timeout in the event that the device does not respond or becomes inoperable. Finally, serialize queries to retain the integrity of device return codes. Changes in v2: - included header comment for ibmvnic_wait_for_completion - removed open-coded loop in patch 3/4, suggested by Jakub - ibmvnic_wait_for_completion accepts timeout value in milliseconds instead of jiffies - timeout calculations cleaned up and completed before wait loop - included missing mutex_destroy calls, suggested by Jakub - included comment before mutex declaration ==================== Signed-off-by: David S. Miller commit ff25dcb9a1492ecbe495de936765c7ff3441b601 Author: Thomas Falcon Date: Mon Nov 25 17:12:56 2019 -0600 ibmvnic: Serialize device queries Provide some serialization for device CRQ commands and queries to ensure that the shared variable used for storing return codes is properly synchronized. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 476d96ca9cc59ad07dc452184880b635e4e29b06 Author: Thomas Falcon Date: Mon Nov 25 17:12:55 2019 -0600 ibmvnic: Bound waits for device queries Create a wrapper for wait_for_completion calls with additional driver checks to ensure that the driver does not wait on a disabled device. In those cases or if the device does not respond in an extended amount of time, this will allow the driver an opportunity to recover. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 2147e3d09e9ba6edc54b1b4bb7d8fc3cca96776b Author: Thomas Falcon Date: Mon Nov 25 17:12:54 2019 -0600 ibmvnic: Terminate waiting device threads after loss of service If we receive a notification that the device has been deactivated or removed, force a completion of all waiting threads. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 070eca955c4af1248cb78a216463ff757a5dc511 Author: Thomas Falcon Date: Mon Nov 25 17:12:53 2019 -0600 ibmvnic: Fix completion structure initialization Fix multiple calls to init_completion for device completion structures. Instead, initialize them during device probe and reinitialize them later as needed. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit fb8223888e72eacd69948069f05c77a01e5a1b05 Author: Maciej Żenczykowski Date: Mon Nov 25 15:09:37 2019 -0800 net-sctp: replace some sock_net(sk) with just 'net' It already existed in part of the function, but move it to a higher level and use it consistently throughout. Safe since sk is never written to. Signed-off-by: Maciej Żenczykowski Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit ac71676c493f738ed04b0db9dc67aa03de7f2722 Author: Maciej Żenczykowski Date: Mon Nov 25 14:48:00 2019 -0800 net: Fix a documentation bug wrt. ip_unprivileged_port_start It cannot overlap with the local port range - ie. with autobind selectable ports - and not with reserved ports. Indeed 'ip_local_reserved_ports' isn't even a range, it's a (by default empty) set. Fixes: 4548b683b781 ("Introduce a sysctl that modifies the value of PROT_SOCK.") Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller commit 56f2ab41b652251f336a0f471b1033afeaedd161 Author: Andy Lutomirski Date: Wed Jul 17 06:44:16 2019 -0700 x86/ptrace: Document FSBASE and GSBASE ABI oddities Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit 8e05f1b4f27d07a0f93e7c6fd28525a5d082b85c Author: Andy Lutomirski Date: Mon Jul 15 10:08:48 2019 -0700 x86/ptrace: Remove set_segment_reg() implementations for current seg_segment_reg() should be unreachable with task == current. Rather than confusingly trying to make it work, just explicitly disable this case. (regset->get is used for current in the coredump code, but the ->set interface is only used for ptrace, and you can't ptrace yourself.) Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit 0337b7ebfcb8efb4ea0a9f2b2f284217a1c0e62d Author: Andy Lutomirski Date: Mon Nov 25 22:37:44 2019 -0800 x86/traps: die() instead of panicking on a double fault A double fault has a decent chance of being recoverable by killing the offending thread. Use die() so that we at least try to recover. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit 7d8d8cfdee9a7bd6f9682f253fa98efdd8048a9e Author: Andy Lutomirski Date: Wed Nov 20 23:06:41 2019 -0800 x86/doublefault/32: Rewrite the x86_32 #DF handler and unify with 64-bit The old x86_32 doublefault_fn() was old and crufty, and it did not even try to recover. do_double_fault() is much nicer. Rewrite the 32-bit double fault code to sanitize CPU state and call do_double_fault(). This is mostly an exercise i386 archaeology. With this patch applied, 32-bit double faults get a real stack trace, just like 64-bit double faults. [ mingo: merged the patch to a later kernel base. ] Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit dc4e0021b00b5a4ecba56fae509217776592b0aa Author: Andy Lutomirski Date: Tue Nov 26 18:27:16 2019 +0100 x86/doublefault/32: Move #DF stack and TSS to cpu_entry_area There are three problems with the current layout of the doublefault stack and TSS. First, the TSS is only cacheline-aligned, which is not enough -- if the hardware portion of the TSS (struct x86_hw_tss) crosses a page boundary, horrible things happen [0]. Second, the stack and TSS are global, so simultaneous double faults on different CPUs will cause massive corruption. Third, the whole mechanism won't work if user CR3 is loaded, resulting in a triple fault [1]. Let the doublefault stack and TSS share a page (which prevents the TSS from spanning a page boundary), make it percpu, and move it into cpu_entry_area. Teach the stack dump code about the doublefault stack. [0] Real hardware will read past the end of the page onto the next *physical* page if a task switch happens. Virtual machines may have any number of bugs, and I would consider it reasonable for a VM to summarily kill the guest if it tries to task-switch to a page-spanning TSS. [1] Real hardware triple faults. At least some VMs seem to hang. I'm not sure what's going on. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit e99b6f46ee5c127d39d2f3a2682fdeef10386316 Author: Andy Lutomirski Date: Thu Nov 21 09:42:30 2019 -0800 x86/doublefault/32: Rename doublefault.c to doublefault_32.c doublefault.c now only contains 32-bit code. Rename it to doublefault_32.c. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit 93efbde2c331004d8053f04b4bf0ca3e630b474a Author: Andy Lutomirski Date: Wed Nov 20 22:12:38 2019 -0800 x86/traps: Disentangle the 32-bit and 64-bit doublefault code The 64-bit doublefault handler is much nicer than the 32-bit one. As a first step toward unifying them, make the 64-bit handler self-contained. This should have no effect no functional effect except in the odd case of x86_64 with CONFIG_DOUBLEFAULT=n in which case it will change the logging a bit. This also gets rid of CONFIG_DOUBLEFAULT configurability on 64-bit kernels. It didn't do anything useful -- CONFIG_DOUBLEFAULT=n didn't actually disable doublefault handling on x86_64. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit b09511c253e5c739a60952b97c071a93e92b2e88 Author: Andy Lutomirski Date: Sun Nov 24 21:18:04 2019 -0800 lkdtm: Add a DOUBLE_FAULT crash type on x86 The DOUBLE_FAULT crash does INT $8, which is a decent approximation of a double fault. This is useful for testing the double fault handling. Use it like: Signed-off-by: Andy Lutomirski Cc: Kees Cook Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit 3300c4f3afbb59a1f4bfdbe0f0b6c91e241541b1 Author: Andy Lutomirski Date: Wed Nov 20 12:22:46 2019 -0800 selftests/x86/single_step_syscall: Check SYSENTER directly We used to test SYSENTER only through the vDSO. Test it directly too, just in case. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Signed-off-by: Ingo Molnar commit 9a62d20027da3164a22244d9f022c0c987261687 Author: Joerg Roedel Date: Tue Nov 26 11:09:42 2019 +0100 x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all() The job of vmalloc_sync_all() is to help the lazy freeing of vmalloc() ranges: before such vmap ranges are reused we make sure that they are unmapped from every task's page tables. This is really easy on pagetable setups where the kernel page tables are shared between all tasks - this is the case on 32-bit kernels with SHARED_KERNEL_PMD = 1. But on !SHARED_KERNEL_PMD 32-bit kernels this involves iterating over the pgd_list and clearing all pmd entries in the pgds that are cleared in the init_mm.pgd, which is the reference pagetable that the vmalloc() code uses. In that context the current practice of vmalloc_sync_all() iterating until FIX_ADDR_TOP is buggy: for (address = VMALLOC_START & PMD_MASK; address >= TASK_SIZE_MAX && address < FIXADDR_TOP; address += PMD_SIZE) { struct page *page; Because iterating up to FIXADDR_TOP will involve a lot of non-vmalloc address ranges: VMALLOC -> PKMAP -> LDT -> CPU_ENTRY_AREA -> FIX_ADDR This is mostly harmless for the FIX_ADDR and CPU_ENTRY_AREA ranges that don't clear their pmds, but it's lethal for the LDT range, which relies on having different mappings in different processes, and 'synchronizing' them in the vmalloc sense corrupts those pagetable entries (clearing them). This got particularly prominent with PTI, which turns SHARED_KERNEL_PMD off and makes this the dominant mapping mode on 32-bit. To make LDT working again vmalloc_sync_all() must only iterate over the volatile parts of the kernel address range that are identical between all processes. So the correct check in vmalloc_sync_all() is "address < VMALLOC_END" to make sure the VMALLOC areas are synchronized and the LDT mapping is not falsely overwritten. The CPU_ENTRY_AREA and the FIXMAP area are no longer synced either, but this is not really a proplem since their PMDs get established during bootup and never change. This change fixes the ldt_gdt selftest in my setup. [ mingo: Fixed up the changelog to explain the logic and modified the copying to only happen up until VMALLOC_END. ] Reported-by: Borislav Petkov Tested-by: Borislav Petkov Signed-off-by: Joerg Roedel Cc: Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Joerg Roedel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: hpa@zytor.com Fixes: 7757d607c6b3: ("x86/pti: Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32") Link: https://lkml.kernel.org/r/20191126111119.GA110513@gmail.com Signed-off-by: Ingo Molnar commit 0bcd7762727dd8ba9b9b6f828e5a4cbd5da4f725 Author: Ingo Molnar Date: Tue Nov 26 21:49:04 2019 +0100 x86/iopl: Make 'struct tss_struct' constant size again After the following commit: 05b042a19443: ("x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise") 'struct cpu_entry_area' has to be Kconfig invariant, so that we always have a matching CPU_ENTRY_AREA_PAGES size. This commit added a CONFIG_X86_IOPL_IOPERM dependency to tss_struct: 111e7b15cf10: ("x86/ioperm: Extend IOPL config to control ioperm() as well") Which, if CONFIG_X86_IOPL_IOPERM is turned off, reduces the size of cpu_entry_area by two pages, triggering the assert: ./include/linux/compiler.h:391:38: error: call to ‘__compiletime_assert_202’ declared with attribute error: BUILD_BUG_ON failed: (CPU_ENTRY_AREA_PAGES+1)*PAGE_SIZE != CPU_ENTRY_AREA_MAP_SIZE Simplify the Kconfig dependencies and make cpu_entry_area constant size on 32-bit kernels again. Fixes: 05b042a19443: ("x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise") Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Andy Lutomirski Signed-off-by: Ingo Molnar commit a8de1304b7df30e3a14f2a8b9709bb4ff31a0385 Author: Masahiro Yamada Date: Wed Nov 13 16:12:02 2019 +0900 libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h The DTC v1.5.1 added references to (U)INT32_MAX. This is no problem for user-space programs since defines (U)INT32_MAX along with (u)int32_t. For the kernel space, libfdt_env.h needs to be adjusted before we pull in the changes. In the kernel, we usually use s/u32 instead of (u)int32_t for the fixed-width types. Accordingly, we already have S/U32_MAX for their max values. So, we should not add (U)INT32_MAX to any more. Instead, add them to the in-kernel libfdt_env.h to compile the latest libfdt. Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring commit 396bbe1427828be1025fb052b7e04b42f421352d Author: Diego Elio Pettenò Date: Tue Nov 19 21:37:09 2019 +0000 sr_vendor: support Beurer GL50 evo CD-on-a-chip devices. The Beurer GL50 evo uses a Cygnal-manufactured CD-on-a-chip that only accepts a subset of SCSI commands, and supports neither audio commands nor generic packet commands. Actually sending those commands bring the device to an unrecoverable state that causes the device to hang and reset. To: Jens Axboe Cc: linux-kernel@vger.kernel.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Diego Elio Pettenò Signed-off-by: Jens Axboe commit 366ba7c71ef77c08d06b18ad61b26e2df7352338 Author: Diego Elio Pettenò Date: Tue Nov 19 21:37:08 2019 +0000 cdrom: respect device capabilities during opening action Reading the TOC only works if the device can play audio, otherwise these commands fail (and possibly bring the device to an unhealthy state.) Similarly, cdrom_mmc3_profile() should only be called if the device supports generic packet commands. To: Jens Axboe Cc: linux-kernel@vger.kernel.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Diego Elio Pettenò Signed-off-by: Jens Axboe commit c2d9aa3b6e56de56c7f1ed9026ca6ec7cfbeef19 Author: Max Filippov Date: Thu Nov 14 15:05:40 2019 -0800 xtensa: fix syscall_set_return_value syscall return value is in the register a2, not a0. Cc: stable@vger.kernel.org # v5.0+ Fixes: 9f24f3c1067c ("xtensa: implement tracehook functions and enable HAVE_ARCH_TRACEHOOK") Signed-off-by: Max Filippov commit 6859ad379439df609915fd2e0c44dc39605c6618 Author: Stefan Wahren Date: Sun Nov 24 18:48:53 2019 +0100 MAINTAINERS: Make Nicolas Saenz Julienne the new bcm2835 maintainer Eric isn't active any more and i don't have the necessary free time. Nicolas already made contributions to bcm2835 and is pleased to take over the maintainership. My thanks go to both of them. Signed-off-by: Stefan Wahren Acked-by: Nicolas Saenz Julienne Reviewed-by: Eric Anholt Signed-off-by: Florian Fainelli commit 2be7d348fe924f0c5583c6a805bd42cecda93104 Author: Linus Torvalds Date: Tue Nov 26 11:34:06 2019 -0800 Revert "vfs: properly and reliably lock f_pos in fdget_pos()" This reverts commit 0be0ee71816b2b6725e2b4f32ad6726c9d729777. I was hoping it would be benign to switch over entirely to FMODE_STREAM, and we'd have just a couple of small fixups we'd need, but it looks like we're not quite there yet. While it worked fine on both my desktop and laptop, they are fairly similar in other respects, and run mostly the same loads. Kenneth Crudup reports that it seems to break both his vmware installation and the KDE upower service. In both cases apparently leading to timeouts due to waitinmg for the f_pos lock. There are a number of character devices in particular that definitely want stream-like behavior, but that currently don't get marked as streams, and as a result get the exclusion between concurrent read()/write() on the same file descriptor. Which doesn't work well for them. The most obvious example if this is /dev/console and /dev/tty, which use console_fops and tty_fops respectively (and ptmx_fops for the pty master side). It may be that it's just this that causes problems, but we clearly weren't ready yet. Because there's a number of other likely common cases that don't have llseek implementations and would seem to act as stream devices: /dev/fuse (fuse_dev_operations) /dev/mcelog (mce_chrdev_ops) /dev/mei0 (mei_fops) /dev/net/tun (tun_fops) /dev/nvme0 (nvme_dev_fops) /dev/tpm0 (tpm_fops) /proc/self/ns/mnt (ns_file_operations) /dev/snd/pcm* (snd_pcm_f_ops[]) and while some of these could be trivially automatically detected by the vfs layer when the character device is opened by just noticing that they have no read or write operations either, it often isn't that obvious. Some character devices most definitely do use the file position, even if they don't allow seeking: the firmware update code, for example, uses simple_read_from_buffer() that does use f_pos, but doesn't allow seeking back and forth. We'll revisit this when there's a better way to detect the problem and fix it (possibly with a coccinelle script to do more of the FMODE_STREAM annotations). Reported-by: Kenneth R. Crudup Cc: Kirill Smelkov Signed-off-by: Linus Torvalds commit d80a505348472093cce6698b837c2b83b5e90390 Author: Max Filippov Date: Mon Nov 25 12:57:02 2019 -0800 xtensa: drop unneeded headers from coprocessor.S A bunch of irrelevant headers is included into coprocessor.S. Remove them and add necessary asm/regs.h. Signed-off-by: Max Filippov commit 8b5d7e5242de1db7c08335a512ad260fb3cd0b39 Author: Valentin Schneider Date: Mon Sep 23 15:36:20 2019 +0100 xtensa: entry: Remove unneeded need_resched() loop Since the enabling and disabling of IRQs within preempt_schedule_irq() is contained in a need_resched() loop, we don't need the outer arch code loop. Acked-by: Max Filippov Signed-off-by: Valentin Schneider Message-Id: <20190923143620.29334-10-valentin.schneider@arm.com> Signed-off-by: Max Filippov commit e64681b487c897ec871465083bf0874087d47b66 Author: Max Filippov Date: Wed Nov 13 16:06:42 2019 -0800 xtensa: use MEMBLOCK_ALLOC_ANYWHERE for KASAN shadow map KASAN shadow map doesn't need to be accessible through the linear kernel mapping, allocate its pages with MEMBLOCK_ALLOC_ANYWHERE so that high memory can be used. This frees up to ~100MB of low memory on xtensa configurations with KASAN and high memory. Cc: stable@vger.kernel.org # v5.1+ Fixes: f240ec09bb8a ("memblock: replace memblock_alloc_base(ANYWHERE) with memblock_phys_alloc") Reviewed-by: Mike Rapoport Signed-off-by: Max Filippov commit 36de10c4788efc6efe6ff9aa10d38cb7eea4c818 Author: Max Filippov Date: Wed Nov 13 13:18:31 2019 -0800 xtensa: fix TLB sanity checker Virtual and translated addresses retrieved by the xtensa TLB sanity checker must be consistent, i.e. correspond to the same state of the checked TLB entry. KASAN shadow memory is mapped dynamically using auto-refill TLB entries and thus may change TLB state between the virtual and translated address retrieval, resulting in false TLB insanity report. Move read_xtlb_translation close to read_xtlb_virtual to make sure that read values are consistent. Cc: stable@vger.kernel.org Fixes: a99e07ee5e88 ("xtensa: check TLB sanity on return to userspace") Signed-off-by: Max Filippov commit f5ee2567921dec4f489c16d4fe22c3a7222d0ce6 Author: Mike Rapoport Date: Tue Nov 5 16:33:20 2019 +0200 xtensa: get rid of __ARCH_USE_5LEVEL_HACK xtensa has 2-level page tables and already uses pgtable-nopmd for page table folding. Add walks of p4d level where appropriate and drop usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport Message-Id: <1572964400-16542-3-git-send-email-rppt@kernel.org> Signed-off-by: Max Filippov [fix up arch/xtensa/include/asm/fixmap.h and arch/xtensa/mm/tlb.c] commit f0d1eab8c2e1f9240cf4ae4753d7947c65e60bd7 Author: Mike Rapoport Date: Tue Nov 5 16:33:19 2019 +0200 xtensa: mm: fix PMD folding implementation There was a definition of pmd_offset() in arch/xtensa/include/asm/pgtable.h that shadowed the generic implementation defined in include/asm-generic/pgtable-nopmd.h. As the result, xtensa had shortcuts in page table traversal in several places instead of doing level unfolding. Remove local override for pmd_offset() and add page table unfolding where necessary. Signed-off-by: Mike Rapoport Message-Id: <1572964400-16542-2-git-send-email-rppt@kernel.org> Signed-off-by: Max Filippov commit 8951eb1530ddf83dbb815d38e97afddc6a0d1140 Author: Max Filippov Date: Tue Nov 12 08:43:25 2019 -0800 xtensa: make stack dump size configurable Introduce Kconfig symbol PRINT_STACK_DEPTH and use it to initialize kstack_depth_to_print. Reviewed-by: Petr Mladek Signed-off-by: Max Filippov commit c5fccebc138b1f5a5b57acecdbf1530e41ebea17 Author: Max Filippov Date: Tue Nov 12 08:47:48 2019 -0800 xtensa: improve stack dumping Calculate printable stack size and use print_hex_dump instead of opencoding it. Drop extra newline output in show_trace as its output format does not depend on CONFIG_KALLSYMS. Reviewed-by: Petr Mladek Signed-off-by: Max Filippov commit 5eff6ca2e39662114675e7cca6a01e15d6c0b5d1 Author: Max Filippov Date: Wed Oct 16 00:49:54 2019 -0700 xtensa: use "m" constraint instead of "r" in futex.h assembly Use "m" constraint instead of "r" for the address, as "m" allows compiler to access adjacent locations using base + offset, while "r" requires updating the base register every time. Signed-off-by: Max Filippov commit cf3b3baa712517c4972339b150f79fa88099e5db Author: Max Filippov Date: Wed Oct 16 00:49:54 2019 -0700 xtensa: use "m" constraint instead of "a" in cmpxchg.h assembly Use "m" constraint instead of "r" for the address, as "m" allows compiler to access adjacent locations using base + offset, while "r" requires updating the base register every time. Signed-off-by: Max Filippov commit 812e708a4c2d29664a009805671d98cbe7c756b1 Author: Max Filippov Date: Wed Oct 16 01:52:38 2019 -0700 xtensa: use named assembly arguments in cmpxchg.h Numeric assembly arguments are hard to understand and assembly code that uses them is hard to modify. Use named arguments in __cmpxchg_u32 and xchg_u32. Signed-off-by: Max Filippov commit 13e28135d6fb4906af9cd1d54f22172ad5e4a0dd Author: Max Filippov Date: Wed Oct 16 00:49:54 2019 -0700 xtensa: use "m" constraint instead of "a" in atomic.h assembly Use "m" constraint instead of "r" for the address, as "m" allows compiler to access adjacent locations using base + offset, while "r" requires updating the base register every time. Signed-off-by: Max Filippov commit 643d6976ff0b950fc6e5d65adfda497ba792b149 Author: Max Filippov Date: Wed Oct 16 00:33:10 2019 -0700 xtensa: use named assembly arguments in atomic.h Numeric assembly arguments are hard to understand and assembly code that uses them is hard to modify. Use named arguments in ATOMIC_OP, ATOMIC_OP_RETURN and ATOMIC_FETCH_OP macros. Signed-off-by: Max Filippov commit 5bf67094a3a2d99d5f96db30be286f6c41988177 Author: Max Filippov Date: Tue Oct 15 22:17:33 2019 -0700 xtensa: use "m" constraint instead of "a" in bitops.h assembly Use "m" constraint instead of "r" for the address, as "m" allows compiler to access adjacent locations using base + offset, while "r" requires updating the base register every time. Signed-off-by: Max Filippov commit e444917019258ef3bd564d0b4a432add2c26a2ae Author: Max Filippov Date: Tue Oct 15 22:14:15 2019 -0700 xtensa: use named assembly arguments in bitops.h Numeric assembly arguments are hard to understand and assembly code that uses them is hard to modify. Use named arguments in BIT_OP and TEST_AND_BIT_OP macros. Signed-off-by: Max Filippov commit b387dc044efaa07cd8a47316c83fe2a5c08f9650 Author: Max Filippov Date: Tue Oct 15 22:04:13 2019 -0700 xtensa: use macros to generate *_bit and test_and_*_bit functions Parameterize macros with function name, opcode and inversion pattern. This reduces code duplication removing 2/3 of definitions. Signed-off-by: Max Filippov commit cbc6e28703c44a321e9d8a8894ec11bc6e7e473d Author: Max Filippov Date: Tue Oct 15 14:03:03 2019 -0700 xtensa: use "m" constraint instead of "a" in uaccess.h assembly Use "m" constraint instead of "r" for the address, as "m" allows compiler to access adjacent locations using base + offset, while "r" requires updating the base register every time. Use %[mem] * 0 + v to replace offset part of %[mem] expansion with v. It is impossible to change address alignment through the offset part on xtensa, so just ignore offset in alignment checks. Signed-off-by: Max Filippov commit f5fae6790fd3199e45ead10f7004311abdf539e5 Author: Max Filippov Date: Mon Oct 14 11:33:44 2019 -0700 xtensa: merge .fixup with .text Section .fixup contains pieces of code, merge it with the rest of the .text section. Signed-off-by: Max Filippov commit 7af710d988775aadf440222ecbe0c10eecf3eb54 Author: Max Filippov Date: Tue Jan 3 17:57:51 2017 -0800 xtensa: add XIP kernel support XIP (eXecute In Place) kernel image is the image that can be run directly from ROM, using RAM only for writable data. XIP xtensa kernel differs from regular xtensa kernel in the following ways: - it has exception/IRQ vectors merged into text section. No vectors relocation takes place at kernel startup. - .data/.bss location must be specified in the kernel configuration, its content is copied there in the _startup function. - .init.text is merged with the rest of text and is executed from ROM. - when MMU is used the virtual address where the kernel will be mapped must be specified in the kernel configuration. It may be in the KSEG or in the KIO, __pa macro is adjusted to be able to handle both. Signed-off-by: Max Filippov commit 30a3e01d4cbbfedac48d69a415136000a36910c7 Author: Rob Herring Date: Tue Nov 19 14:31:25 2019 -0600 dt-bindings: arm: Remove leftover axentia.txt The bindings described in axentia.txt are already covered by atmel-at91.yaml, so remove the file. Cc: Peter Rosin Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Signed-off-by: Rob Herring commit 2aacace6dbbb6b6ce4e177e6c7ea901f389c0472 Author: Erhard Furtner Date: Tue Nov 26 02:48:04 2019 +0100 of: unittest: fix memory leak in attach_node_and_children In attach_node_and_children memory is allocated for full_name via kasprintf. If the condition of the 1st if is not met the function returns early without freeing the memory. Add a kfree() to fix that. This has been detected with kmemleak: Link: https://bugzilla.kernel.org/show_bug.cgi?id=205327 It looks like the leak was introduced by this commit: Fixes: 5babefb7f7ab ("of: unittest: allow base devicetree to have symbol metadata") Signed-off-by: Erhard Furtner Reviewed-by: Michael Ellerman Reviewed-by: Tyrel Datwyler Signed-off-by: Rob Herring commit 637392a8506a3a7dd24ab9094a14f7522adb73b4 Author: Frank Rowand Date: Thu Nov 21 13:16:56 2019 -0600 of: overlay: add_changeset_property() memory leak No changeset entries are created for #address-cells and #size-cells properties, but the duplicated properties are never freed. This results in a memory leak which is detected by kmemleak: unreferenced object 0x85887180 (size 64): backtrace: kmem_cache_alloc_trace+0x1fb/0x1fc __of_prop_dup+0x25/0x7c add_changeset_property+0x17f/0x370 build_changeset_next_level+0x29/0x20c of_overlay_fdt_apply+0x32b/0x6b4 ... Fixes: 6f75118800ac ("of: overlay: validate overlay properties #address-cells and #size-cells") Reported-by: Vincent Whitchurch Signed-off-by: Frank Rowand Tested-by: Vincent Whitchurch Signed-off-by: Rob Herring commit cf7d88fb867c107a6b93c8a180ce9831fd4dc6fb Author: Rob Herring Date: Thu Nov 21 17:06:47 2019 -0600 dt-bindings: interrupt-controller: arm,gic-v3: Add missing type to interrupt-partition-* nodes Add missing 'type: object' schema to interrupt-partition-* nodes. Found with fix to meta-schema checks. Cc: Thomas Gleixner Cc: Jason Cooper Acked-by: Marc Zyngier Signed-off-by: Rob Herring commit cb6192d647f79ae76128bce5216ea4f4e1776727 Author: Rob Herring Date: Thu Nov 21 16:57:03 2019 -0600 dt-bindings: firmware: ixp4xx: Drop redundant minItems/maxItems The minItems/maxItems default to the number of items in an 'items' list, so drop the redundant specifying of them here. Signed-off-by: Rob Herring commit d17f8338fe778722cf8fcb8513698faf1ac4c37e Author: Krzysztof Kozlowski Date: Wed Nov 20 08:59:56 2019 +0100 dt-bindings: power: Rename back power_domain.txt bindings to fix references With split of power domain controller bindings to power-domain.yaml, the consumer part was renamed to power-domain.txt breaking the references. Undo the renaming. Reported-by: Geert Uytterhoeven Fixes: 5279a3d8bede ("dt-bindings: power: Convert Generic Power Domain bindings to json-schema") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Reviewed-by: Ulf Hansson Signed-off-by: Rob Herring commit 191d6f91f283dfb007499bb8529d54c3ac434bd7 Author: Palmer Dabbelt Date: Fri Oct 25 08:10:38 2019 +0200 PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist The only apparent reason for the PCI_MSI_IRQ_DOMAIN architecture whitelist was that it requires msi.h. Now that msi.h is mandatory in asm-generic/Kbuild, every arch should have at least the default version, so remove the whitelist. Built for all the architectures that play nice with make.cross, but not boot tested anywhere. Link: https://lore.kernel.org/r/514e7b040be8ccd69088193aba260da1b89e919c.1571983829.git.michal.simek@xilinx.com Signed-off-by: Palmer Dabbelt Signed-off-by: Michal Simek Signed-off-by: Bjorn Helgaas Acked-by: Waiman Long commit a1b39bae16a62ce4aae02d958224f19316d98b24 Author: Michal Simek Date: Fri Oct 25 08:10:37 2019 +0200 asm-generic: Make msi.h a mandatory include/asm header msi.h is generic for all architectures except x86, which has its own version. Enabling MSI by adding msi.h to every architecture's Kbuild is just an additional step which doesn't need to be done. Make msi.h mandatory in the asm-generic/Kbuild so we don't have to do it for each architecture. Suggested-by: Christoph Hellwig Link: https://lore.kernel.org/r/c991669e29a79b1a8e28c3b4b3a125801a693de8.1571983829.git.michal.simek@xilinx.com Tested-by: Paul Walmsley # build only, rv32/rv64 Signed-off-by: Michal Simek Signed-off-by: Bjorn Helgaas Reviewed-by: Masahiro Yamada Acked-by: Waiman Long Acked-by: Paul Walmsley # arch/riscv commit 655e7aee1f0398602627a485f7dca6c29cc96cae Author: Jian-Hong Pan Date: Thu Oct 31 17:34:09 2019 +0800 Revert "nvme: Add quirk for Kingston NVME SSD running FW E8FK11.T" Since e045fa29e893 ("PCI/MSI: Fix incorrect MSI-X masking on resume") is merged, we can revert the previous quirk now. This reverts commit 19ea025e1d28c629b369c3532a85b3df478cc5c6. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=204887 Fixes: 19ea025e1d28 ("nvme: Add quirk for Kingston NVME SSD running FW E8FK11.T") Link: https://lore.kernel.org/r/20191031093408.9322-1-jian-hong@endlessm.com Signed-off-by: Jian-Hong Pan Signed-off-by: Bjorn Helgaas Acked-by: Christoph Hellwig Cc: stable@vger.kernel.org commit ab851d49f6bfc781edd8bd44c72ec1e49211670b Merge: 1d87200446f1 e3cb0c7102f0 Author: Linus Torvalds Date: Tue Nov 26 11:12:02 2019 -0800 Merge branch 'x86-iopl-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 iopl updates from Ingo Molnar: "This implements a nice simplification of the iopl and ioperm code that Thomas Gleixner discovered: we can implement the IO privilege features of the iopl system call by using the IO permission bitmap in permissive mode, while trapping CLI/STI/POPF/PUSHF uses in user-space if they change the interrupt flag. This implements that feature, with testing facilities and related cleanups" [ "Simplification" may be an over-statement. The main goal is to avoid the cli/sti of iopl by effectively implementing the IO port access parts of iopl in terms of ioperm. This may end up not workign well in case people actually depend on cli/sti being available, or if there are mixed uses of iopl and ioperm. We will see.. - Linus ] * 'x86-iopl-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits) x86/ioperm: Fix use of deprecated config option x86/entry/32: Clarify register saving in __switch_to_asm() selftests/x86/iopl: Extend test to cover IOPL emulation x86/ioperm: Extend IOPL config to control ioperm() as well x86/iopl: Remove legacy IOPL option x86/iopl: Restrict iopl() permission scope x86/iopl: Fixup misleading comment selftests/x86/ioperm: Extend testing so the shared bitmap is exercised x86/ioperm: Share I/O bitmap if identical x86/ioperm: Remove bitmap if all permissions dropped x86/ioperm: Move TSS bitmap update to exit to user work x86/ioperm: Add bitmap sequence number x86/ioperm: Move iobitmap data into a struct x86/tss: Move I/O bitmap data into a seperate struct x86/io: Speedup schedule out of I/O bitmap user x86/ioperm: Avoid bitmap allocation if no permissions are set x86/ioperm: Simplify first ioperm() invocation logic x86/iopl: Cleanup include maze x86/tss: Fix and move VMX BUILD_BUG_ON() x86/cpu: Unify cpu_init() ... commit e045fa29e89383c717e308609edd19d2fd29e1be Author: Jian-Hong Pan Date: Tue Oct 8 11:42:39 2019 +0800 PCI/MSI: Fix incorrect MSI-X masking on resume When a driver enables MSI-X, msix_program_entries() reads the MSI-X Vector Control register for each vector and saves it in desc->masked. Each register is 32 bits and bit 0 is the actual Mask bit. When we restored these registers during resume, we previously set the Mask bit if *any* bit in desc->masked was set instead of when the Mask bit itself was set: pci_restore_state pci_restore_msi_state __pci_restore_msix_state for_each_pci_msi_entry msix_mask_irq(entry, entry->masked) <-- entire u32 word __pci_msix_desc_mask_irq(desc, flag) mask_bits = desc->masked & ~PCI_MSIX_ENTRY_CTRL_MASKBIT if (flag) <-- testing entire u32, not just bit 0 mask_bits |= PCI_MSIX_ENTRY_CTRL_MASKBIT writel(mask_bits, desc_addr + PCI_MSIX_ENTRY_VECTOR_CTRL) This means that after resume, MSI-X vectors were masked when they shouldn't be, which leads to timeouts like this: nvme nvme0: I/O 978 QID 3 timeout, completion polled On resume, set the Mask bit only when the saved Mask bit from suspend was set. This should remove the need for 19ea025e1d28 ("nvme: Add quirk for Kingston NVME SSD running FW E8FK11.T"). [bhelgaas: commit log, move fix to __pci_msix_desc_mask_irq()] Link: https://bugzilla.kernel.org/show_bug.cgi?id=204887 Link: https://lore.kernel.org/r/20191008034238.2503-1-jian-hong@endlessm.com Fixes: f2440d9acbe8 ("PCI MSI: Refactor interrupt masking code") Signed-off-by: Jian-Hong Pan Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org commit 901c4ddbe277a766fd081ffbbd526d7b4bdbacdf Author: Bjorn Helgaas Date: Mon Oct 14 16:17:05 2019 -0500 PCI/MSI: Move power state check out of pci_msi_supported() 27e20603c54b ("PCI/MSI: Move D0 check into pci_msi_check_device()") moved the power state check into pci_msi_check_device(), which was subsequently renamed to pci_msi_supported(). This didn't change the behavior, since both callers checked the power state. However, it doesn't fit the current "pci_msi_supported()" name, which should return what the device is capable of, independent of the power state. Move the power state check back into the callers for readability. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit d41b0e64d206f8948212b4d0f30c330db95c9636 Author: Greg Kroah-Hartman Date: Mon Oct 14 12:04:52 2019 +0200 PCI/MSI: Remove unused pci_irq_get_node() The function pci_irq_get_node() is not used by anyone in the tree, so just delete it. Link: https://lore.kernel.org/r/20191014100452.GA6699@kroah.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Bjorn Helgaas Reviewed-by: Andrew Murray commit 61a47c1ad3a4dc6882f01ebdc88138ac62d0df03 Author: Eric W. Biederman Date: Tue Oct 1 13:01:19 2019 -0500 sysctl: Remove the sysctl system call This system call has been deprecated almost since it was introduced, and in a survey of the linux distributions I can no longer find any of them that enable CONFIG_SYSCTL_SYSCALL. The only indication that I can find that anyone might care is that a few of the defconfigs in the kernel enable CONFIG_SYSCTL_SYSCALL. However this appears in only 31 of 414 defconfigs in the kernel, so I suspect this symbols presence is simply because it is harmless to include rather than because it is necessary. As there appear to be no users of the sysctl system call, remove the code. As this removes one of the few uses of the internal kernel mount of proc I hope this allows for even more simplifications of the proc filesystem. Cc: Alex Smith Cc: Anders Berg Cc: Apelete Seketeli Cc: Arnd Bergmann Cc: Chee Nouk Phoon Cc: Chris Zankel Cc: Christian Ruppert Cc: Greg Ungerer Cc: Harvey Hunt Cc: Helge Deller Cc: Hongliang Tao Cc: Hua Yan Cc: Huacai Chen Cc: John Crispin Cc: Jonas Jensen Cc: Josh Boyer Cc: Jun Nie Cc: Kevin Hilman Cc: Kevin Wells Cc: Kumar Gala Cc: Lars-Peter Clausen Cc: Ley Foon Tan Cc: Linus Walleij Cc: Markos Chandras Cc: Max Filippov Cc: Noam Camus Cc: Olof Johansson Cc: Paul Burton Cc: Paul Mundt Cc: Phil Edworthy Cc: Pierrick Hascoet Cc: Ralf Baechle Cc: Roland Stigge Cc: Santosh Shilimkar Cc: Scott Telford Cc: Stephen Boyd Cc: Steven J. Hill Cc: Tanmay Inamdar Cc: Vineet Gupta Cc: Wolfram Sang Acked-by: Andi Kleen Reviewed-by: Kees Cook Signed-off-by: "Eric W. Biederman" commit 1d87200446f1d10dfe9672ca8edb027a82612f8c Merge: 5c4a1c090d86 f01ec4fca820 Author: Linus Torvalds Date: Tue Nov 26 10:42:40 2019 -0800 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "The main changes in this cycle were: - Cross-arch changes to move the linker sections for NOTES and EXCEPTION_TABLE into the RO_DATA area, where they belong on most architectures. (Kees Cook) - Switch the x86 linker fill byte from x90 (NOP) to 0xcc (INT3), to trap jumps into the middle of those padding areas instead of sliding execution. (Kees Cook) - A thorough cleanup of symbol definitions within x86 assembler code. The rather randomly named macros got streamlined around a (hopefully) straightforward naming scheme: SYM_START(name, linkage, align...) SYM_END(name, sym_type) SYM_FUNC_START(name) SYM_FUNC_END(name) SYM_CODE_START(name) SYM_CODE_END(name) SYM_DATA_START(name) SYM_DATA_END(name) etc - with about three times of these basic primitives with some label, local symbol or attribute variant, expressed via postfixes. No change in functionality intended. (Jiri Slaby) - Misc other changes, cleanups and smaller fixes" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (67 commits) x86/entry/64: Remove pointless jump in paranoid_exit x86/entry/32: Remove unused resume_userspace label x86/build/vdso: Remove meaningless CFLAGS_REMOVE_*.o m68k: Convert missed RODATA to RO_DATA x86/vmlinux: Use INT3 instead of NOP for linker fill bytes x86/mm: Report actual image regions in /proc/iomem x86/mm: Report which part of kernel image is freed x86/mm: Remove redundant address-of operators on addresses xtensa: Move EXCEPTION_TABLE to RO_DATA segment powerpc: Move EXCEPTION_TABLE to RO_DATA segment parisc: Move EXCEPTION_TABLE to RO_DATA segment microblaze: Move EXCEPTION_TABLE to RO_DATA segment ia64: Move EXCEPTION_TABLE to RO_DATA segment h8300: Move EXCEPTION_TABLE to RO_DATA segment c6x: Move EXCEPTION_TABLE to RO_DATA segment arm64: Move EXCEPTION_TABLE to RO_DATA segment alpha: Move EXCEPTION_TABLE to RO_DATA segment x86/vmlinux: Move EXCEPTION_TABLE to RO_DATA segment x86/vmlinux: Actually use _etext for the end of the text segment vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA ... commit 3b1313eb32c499d46dc4c3e896d19d9564c879c4 Author: Vladimir Kondratiev Date: Sun Nov 24 16:07:31 2019 +0200 mips: cacheinfo: report shared CPU map Report L1 caches as shared per core; L2 - per cluster. This fixes "perf" that went crazy if shared_cpu_map attribute not reported on sysfs, in form of /sys/devices/system/cpu/cpu*/cache/index*/shared_cpu_list /sys/devices/system/cpu/cpu*/cache/index*/shared_cpu_map Signed-off-by: Vladimir Kondratiev Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 02a65a0bfbef5c644f520885a0a85b45b9703cf3 Author: Piotr Maziarz Date: Tue Nov 26 11:06:31 2019 +0100 tracing: Fix __print_hex_dump scope undef is needed for parsing __print_hex_dump in traceevent lib. Link: http://lkml.kernel.org/r/1574762791-14883-1-git-send-email-piotrx.maziarz@linux.intel.com Signed-off-by: Piotr Maziarz Signed-off-by: Cezary Rojewski Signed-off-by: Steven Rostedt (VMware) commit 5c4a1c090d8676d8b84e2ac40671602be44afdfc Merge: 53a07a148fd0 4a13b0e3e109 Author: Linus Torvalds Date: Tue Nov 26 10:12:28 2019 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "These are the fixes left over from the v5.4 cycle: - Various low level 32-bit entry code fixes and improvements by Andy Lutomirski, Peter Zijlstra and Thomas Gleixner. - Fix 32-bit Xen PV breakage, by Jan Beulich" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry/32: Fix FIXUP_ESPFIX_STACK with user CR3 x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise selftests/x86/sigreturn/32: Invalidate DS and ES when abusing the kernel selftests/x86/mov_ss_trap: Fix the SYSENTER test x86/entry/32: Fix NMI vs ESPFIX x86/entry/32: Unwind the ESPFIX stack earlier on exception entry x86/entry/32: Move FIXUP_FRAME after pushing %fs in SAVE_ALL x86/entry/32: Use %ss segment where required x86/entry/32: Fix IRET exception x86/cpu_entry_area: Add guard page for entry stack on 32bit x86/pti/32: Size initial_page_table correctly x86/doublefault/32: Fix stack canaries in the double fault handler x86/xen/32: Simplify ring check in xen_iret_crit_fixup() x86/xen/32: Make xen_iret_crit_fixup() independent of frame layout x86/stackframe/32: Repair 32-bit Xen PV commit 53a07a148fd05dc6d317745688270bc79fe73121 Merge: da42761df5ce cd5a2aa89e84 Author: Linus Torvalds Date: Tue Nov 26 10:11:01 2019 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 PTI updates from Ingo Molnar: "Fix reporting bugs of the MDS and TAA mitigation status, if one or both are set via a boot option. No change to mitigation behavior intended" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/speculation: Fix redundant MDS mitigation message x86/speculation: Fix incorrect MDS/TAA mitigation status commit fd567ac20cb0377ff466d3337e6e9ac5d0cb15e4 Author: John Rutherford Date: Tue Nov 26 13:52:55 2019 +1100 tipc: fix link name length check In commit 4f07b80c9733 ("tipc: check msg->req data len in tipc_nl_compat_bearer_disable") the same patch code was copied into routines: tipc_nl_compat_bearer_disable(), tipc_nl_compat_link_stat_dump() and tipc_nl_compat_link_reset_stats(). The two link routine occurrences should have been modified to check the maximum link name length and not bearer name length. Fixes: 4f07b80c9733 ("tipc: check msg->reg data len in tipc_nl_compat_bearer_disable") Signed-off-by: John Rutherford Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 801b787a693ba643b23608cf2bf8dcfab3608795 Author: Andrew Jeffery Date: Thu Oct 10 12:36:55 2019 +1030 clk: aspeed: Add RMII RCLK gates for both AST2500 MACs RCLK is a fixed 50MHz clock derived from HPLL that is described by a single gate for each MAC. Signed-off-by: Andrew Jeffery Link: https://lkml.kernel.org/r/20191010020655.3776-3-andrew@aj.id.au Reviewed-by: Joel Stanley Signed-off-by: Stephen Boyd commit c869e494ef8b5846d9ba91f1e922c23cd444f0c1 Author: James Smart Date: Thu Nov 21 09:59:37 2019 -0800 nvme-fc: fix double-free scenarios on hw queues If an error occurs on one of the ios used for creating an association, the creating routine has error paths that are invoked by the command failure and the error paths will free up the controller resources created to that point. But... the io was ultimately determined by an asynchronous completion routine that detected the error and which unconditionally invokes the error_recovery path which calls delete_association. Delete association deletes all outstanding io then tears down the controller resources. So the create_association thread can be running in parallel with the error_recovery thread. What was seen was the LLDD received a call to delete a queue, causing the LLDD to do a free of a resource, then the transport called the delete queue again causing the driver to repeat the free call. The second free routine corrupted the allocator. The transport shouldn't be making the duplicate call, and the delete queue is just one of the resources being freed. To fix, it is realized that the create_association path is completely serialized with one command at a time. So the failed io completion will always be seen by the create_association path and as of the failure, there are no ios to terminate and there is no reason to be manipulating queue freeze states, etc. The serialized condition stays true until the controller is transitioned to the LIVE state. Thus the fix is to change the error recovery path to check the controller state and only invoke the teardown path if not already in the CONNECTING state. Reviewed-by: Himanshu Madhani Reviewed-by: Ewan D. Milne Signed-off-by: James Smart Signed-off-by: Keith Busch commit da42761df5ceed2f8b0527bc4c1b2760be45ddb9 Merge: 1c134b198daa 7a56b81c4746 Author: Linus Torvalds Date: Tue Nov 26 09:52:37 2019 -0800 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Ingo Molnar: "UV platform updates (with a 'hubless' variant) and Jailhouse updates for better UART support" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/jailhouse: Only enable platform UARTs if available x86/jailhouse: Improve setup data version comparison x86/platform/uv: Account for UV Hubless in is_uvX_hub Ops x86/platform/uv: Check EFI Boot to set reboot type x86/platform/uv: Decode UVsystab Info x86/platform/uv: Add UV Hubbed/Hubless Proc FS Files x86/platform/uv: Setup UV functions for Hubless UV Systems x86/platform/uv: Add return code to UV BIOS Init function x86/platform/uv: Return UV Hubless System Type x86/platform/uv: Save OEM_ID from ACPI MADT probe commit 1c134b198daa81cb689f881dcf2900061914085a Merge: 24ee25a6da84 7f264dab5b60 Author: Linus Torvalds Date: Tue Nov 26 09:50:14 2019 -0800 Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Ingo Molnar: "The main changes in this cycle were: - A PAT series from Davidlohr Bueso, which simplifies the memtype rbtree by using the interval tree helpers. (There's more cleanups in this area queued up, but they didn't make the merge window.) - Also flip over CONFIG_X86_5LEVEL to default-y. This might draw in a few more testers, as all the major distros are going to have 5-level paging enabled by default in their next iterations. - Misc cleanups" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/pat: Rename pat_rbtree.c to pat_interval.c x86/mm/pat: Drop the rbt_ prefix from external memtype calls x86/mm/pat: Do not pass 'rb_root' down the memtype tree helper functions x86/mm/pat: Convert the PAT tree to a generic interval tree x86/mm: Clean up the pmd_read_atomic() comments x86/mm: Fix function name typo in pmd_read_atomic() comment x86/cpu: Clean up intel_tlb_table[] x86/mm: Enable 5-level paging support by default commit c80b36cd9576efa861a080b05382856173a02ae9 Author: Edmund Nadolski Date: Mon Nov 25 09:06:12 2019 -0700 nvme: else following return is not needed Remove unnecessary keyword in nvme_create_queue(). Reviewed-by: Christoph Hellwig Signed-off-by: Edmund Nadolski Signed-off-by: Keith Busch commit a8157ff3607eccb21efd4eb2ca46ff0cc488d12d Author: James Smart Date: Thu Nov 21 09:58:10 2019 -0800 nvme: add error message on mismatching controller ids We've seen a few devices that return different controller id's to the Fabric Connect command vs the Identify(controller) command. It's currently hard to identify this failure by existing error messages. It comes across as a (re)connect attempt in the transport that fails with a -22 (-EINVAL) status. The issue is compounded by older kernels not having the controller id check or had the identify command overwrite the fabrics controller id value before it checked. Both resulted in cases where the devices appeared fine until more recent kernels. Clarify the reject by adding an error message on controller id mismatches. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ewan D. Milne Signed-off-by: James Smart Signed-off-by: Keith Busch commit 863fbae929c7a5b64e96b8a3ffb34a29eefb9f8f Author: James Smart Date: Thu Nov 14 15:15:26 2019 -0800 nvme_fc: add module to ops template to allow module references In nvme-fc: it's possible to have connected active controllers and as no references are taken on the LLDD, the LLDD can be unloaded. The controller would enter a reconnect state and as long as the LLDD resumed within the reconnect timeout, the controller would resume. But if a namespace on the controller is the root device, allowing the driver to unload can be problematic. To reload the driver, it may require new io to the boot device, and as it's no longer connected we get into a catch-22 that eventually fails, and the system locks up. Fix this issue by taking a module reference for every connected controller (which is what the core layer did to the transport module). Reference is cleared when the controller is removed. Acked-by: Himanshu Madhani Reviewed-by: Christoph Hellwig Signed-off-by: James Smart Signed-off-by: Keith Busch commit 24ee25a6da84d83a25d93af52b5fef7407030b20 Merge: 64d6a12094f3 9eff303725da Author: Linus Torvalds Date: Tue Nov 26 09:48:19 2019 -0800 Merge branch 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 kdump updates from Ingo Molnar: "This solves a kdump artifact where encrypted memory contents are dumped, instead of unencrypted ones. The solution also happens to simplify the kdump code, to everyone's delight" * 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/crash: Align function arguments on opening braces x86/kdump: Remove the backup region handling x86/kdump: Always reserve the low 1M when the crashkernel option is specified x86/crash: Add a forward declaration of struct kimage commit 64d6a12094f35d644540c15440874723b1887f9d Merge: cd4771f77092 4df4cb9e99f8 Author: Linus Torvalds Date: Tue Nov 26 09:43:34 2019 -0800 Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 hyperv updates from Ingo Molnar: "Misc updates to the hyperv guest code: - Rework clockevents initialization to better support hibernation - Allow guests to enable InvariantTSC - Micro-optimize send_ipi_one" * 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hyperv: Initialize clockevents earlier in CPU onlining x86/hyperv: Allow guests to enable InvariantTSC x86/hyperv: Micro-optimize send_ipi_one() commit 88cfd30e188fcf6fd8304586c936a6f22fb665e5 Author: Johannes Thumshirn Date: Tue Nov 26 09:28:47 2019 -0800 iomap: remove unneeded variable in iomap_dio_rw() The 'start' variable indicates the start of a filemap and is set to the iocb's position, which we have already cached as 'pos', upon function entry. 'pos' is used as a cursor indicating the current position and updated later in iomap_dio_rw(), but not before the last use of 'start'. Remove 'start' as it's synonym for 'pos' before we're entering the loop calling iomapp_apply(). Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f550ee9b85fd47f85e31965b908a7c1044c531aa Author: Jan Kara Date: Tue Nov 26 09:28:47 2019 -0800 iomap: Do not create fake iter in iomap_dio_bio_actor() iomap_dio_bio_actor() copies iter to a local variable and then limits it to a file extent we have mapped. When IO is submitted, iomap_dio_bio_actor() advances the original iter while the copied iter is advanced inside bio_iov_iter_get_pages(). This logic is non-obvious especially because both iters still point to same shared structures (such as pipe info) so if iov_iter_advance() changes anything in the shared structure, this scheme breaks. Let's just truncate and reexpand the original iter as needed instead of playing games with copying iters and keeping them in sync. Signed-off-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit cd4771f7709211082cbc41dc1f5b2be774ef1604 Merge: a25bbc2644f0 f53e2cd0b8ab Author: Linus Torvalds Date: Tue Nov 26 09:25:36 2019 -0800 Merge branch 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 syscall entry updates from Ingo Molnar: "These changes relate to the preparatory cleanup of syscall function type signatures - to fix indirect call mismatches with Control-Flow Integrity (CFI) checking. No change in behavior intended" * 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Use the correct function type for native_set_fixmap() syscalls/x86: Fix function types in COND_SYSCALL syscalls/x86: Use the correct function type for sys_ni_syscall syscalls/x86: Use COMPAT_SYSCALL_DEFINE0 for IA32 (rt_)sigreturn syscalls/x86: Wire up COMPAT_SYSCALL_DEFINE0 syscalls/x86: Use the correct function type in SYSCALL_DEFINE0 commit c38402fe6c4dbb235bef405209c2195ee9cd679c Author: Timothy Pearson Date: Sun Nov 24 13:15:16 2019 -0600 amdgpu: Enable KFD on POWER systems KFD has been verified to function on POWER systems (Talos II / Vega 64). It should be available as a kernel configuration option on these systems. Signed-off-by: Timothy Pearson Signed-off-by: Alex Deucher commit 29a39c90baaa1d8f28123932d3ea1bbe7c22f325 Author: Felix Kuehling Date: Mon Jul 15 16:18:03 2019 -0400 drm/amdgpu: Optimize KFD page table reservation Be less pessimistic about estimated page table use for KFD. Most allocations use 2MB pages and therefore need less VRAM for page tables. This allows more VRAM to be used for applications especially on large systems with many GPUs and hundreds of GB of system memory. Example: 8 GPUs with 32GB VRAM each + 256GB system memory = 512GB Old page table reservation per GPU: 1GB New page table reservation per GPU: 32MB Signed-off-by: Felix Kuehling Reviewed-by: xinhui pan Signed-off-by: Alex Deucher commit dea8b900293df57b6545bc195b50bbb649fe9741 Author: Alex Deucher Date: Mon Nov 25 11:11:18 2019 -0500 drm/amdgpu: flag vram lost on baco reset for VI/CIK VI/CIK BACO was inflight when this fix landed for SOC15/NV. Add the fix to VI/CIK as well. Acked-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit a0c2a84ddaf176425d2e0285ae46d4b6057d047d Author: Alex Deucher Date: Fri Nov 22 14:16:55 2019 -0500 MAINTAINERS: Drop Rex Zhu for amdgpu powerplay No longer works on the driver. Reviewed-by: Christian König Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 5985ebbe78bba0058429c1482442aa64d14c1ce2 Author: John Clements Date: Mon Nov 25 18:24:17 2019 +0800 drm/amdgpu: Resolved offchip EEPROM I/O issue Updated target I2C address Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 946621691f9919c263b4679b77f81f06019d3636 Author: Alex Deucher Date: Tue Nov 19 15:54:17 2019 -0500 drm/amd/display: add default clocks if not able to fetch them dm_pp_get_clock_levels_by_type needs to add the default clocks to the powerplay case as well. This was accidently dropped. Fixes: b3ea88fef321de ("drm/amd/powerplay: add get_clock_by_type interface for display") Bug: https://gitlab.freedesktop.org/drm/amd/issues/906 Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 52e6d8ed16fdf9f1d2923a2b036222a5ac834b1d Author: Israel Rukshin Date: Sun Nov 24 18:38:32 2019 +0200 nvmet-loop: Avoid preallocating big SGL for data nvme_loop_create_io_queues() preallocates a big buffer for the IO SGL based on SG_CHUNK_SIZE. Modern DMA engines are often capable of dealing with very big segments so the SG_CHUNK_SIZE is often too big. SG_CHUNK_SIZE results in a static 4KB SGL allocation per command. If a controller has lots of deep queues, preallocation for the sg list can consume substantial amounts of memory. For nvmet-loop, nr_hw_queues can be 128 and each queue's depth 128. This means the resulting preallocation for the data SGL is 128*128*4K = 64MB per controller. Switch to runtime allocation for SGL for lists longer than 2 entries. This is the approach used by NVMe PCI so it should be reasonable for NVMeOF as well. Runtime SGL allocation has always been the case for the legacy I/O path so this is nothing new. Tested-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Max Gurtovoy Signed-off-by: Israel Rukshin Signed-off-by: Keith Busch commit b1ae1a238900474a9f51431c0f7f169ade1faa19 Author: Israel Rukshin Date: Sun Nov 24 18:38:31 2019 +0200 nvme-fc: Avoid preallocating big SGL for data nvme_fc_create_io_queues() preallocates a big buffer for the IO SGL based on SG_CHUNK_SIZE. Modern DMA engines are often capable of dealing with very big segments so the SG_CHUNK_SIZE is often too big. SG_CHUNK_SIZE results in a static 4KB SGL allocation per command. If a controller has lots of deep queues, preallocation for the sg list can consume substantial amounts of memory. For nvme-fc, nr_hw_queues can be 128 and each queue's depth 128. This means the resulting preallocation for the data SGL is 128*128*4K = 64MB per controller. Switch to runtime allocation for SGL for lists longer than 2 entries. This is the approach used by NVMe PCI so it should be reasonable for NVMeOF as well. Runtime SGL allocation has always been the case for the legacy I/O path so this is nothing new. Reviewed-by: Max Gurtovoy Reviewed-by: James Smart Signed-off-by: Israel Rukshin Signed-off-by: Keith Busch commit 38e1800275d3af607e4df92ff49dc2cf442586a4 Author: Israel Rukshin Date: Sun Nov 24 18:38:30 2019 +0200 nvme-rdma: Avoid preallocating big SGL for data nvme_rdma_alloc_tagset() preallocates a big buffer for the IO SGL based on SG_CHUNK_SIZE. Modern DMA engines are often capable of dealing with very big segments so the SG_CHUNK_SIZE is often too big. SG_CHUNK_SIZE results in a static 4KB SGL allocation per command. If a controller has lots of deep queues, preallocation for the sg list can consume substantial amounts of memory. For nvme-rdma, nr_hw_queues can be 128 and each queue's depth 128. This means the resulting preallocation for the data SGL is 128*128*4K = 64MB per controller. Switch to runtime allocation for SGL for lists longer than 2 entries. This is the approach used by NVMe PCI so it should be reasonable for NVMeOF as well. Runtime SGL allocation has always been the case for the legacy I/O path so this is nothing new. The preallocated small SGL depends on SG_CHAIN so if the ARCH doesn't support SG_CHAIN, use only runtime allocation for the SGL. We didn't notice of a performance degradation, since for small IOs we'll use the inline SG and for the bigger IOs the allocation of a bigger SGL from slab is fast enough. Suggested-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Israel Rukshin Signed-off-by: Keith Busch commit a25bbc2644f01a9e680af4f760b54bd4834fdfec Merge: 85fbf15bc9ac db8c33f8b5be 446e693ca30b Author: Linus Torvalds Date: Tue Nov 26 08:58:08 2019 -0800 Merge branches 'x86-cpu-for-linus' and 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu and fpu updates from Ingo Molnar: - math-emu fixes - CPUID updates - sanity-check RDRAND output to see whether the CPU at least pretends to produce random data - various unaligned-access across cachelines fixes in preparation of hardware level split-lock detection - fix MAXSMP constraints to not allow !CPUMASK_OFFSTACK kernels with larger than 512 NR_CPUS - misc FPU related cleanups * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Align the x86_capability array to size of unsigned long x86/cpu: Align cpu_caps_cleared and cpu_caps_set to unsigned long x86/umip: Make the comments vendor-agnostic x86/Kconfig: Rename UMIP config parameter x86/Kconfig: Enforce limit of 512 CPUs with MAXSMP and no CPUMASK_OFFSTACK x86/cpufeatures: Add feature bit RDPRU on AMD x86/math-emu: Limit MATH_EMULATION to 486SX compatibles x86/math-emu: Check __copy_from_user() result x86/rdrand: Sanity-check RDRAND output * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Use XFEATURE_FP/SSE enum values instead of hardcoded numbers x86/fpu: Shrink space allocated for xstate_comp_offsets x86/fpu: Update stale variable name in comment commit 85fbf15bc9ac458f014fe70b38fa5773ee6aca9d Merge: fd2615908dfd b3c72fc9a78e Author: Linus Torvalds Date: Tue Nov 26 08:40:20 2019 -0800 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: "The main changes were: - Extend the boot protocol to allow future extensions without hitting the setup_header size limit. - Add quirk to devicetree systems to disable the RTC unless it's listed as a supported device. - Fix ld.lld linker pedantry" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Introduce setup_indirect x86/boot: Introduce kernel_info.setup_type_max x86/boot: Introduce kernel_info x86/init: Allow DT configured systems to disable RTC at boot time x86/realmode: Explicitly set entry point via ENTRY in linker script commit fd2615908dfd0586ea40692a99c44e34b7e869bc Merge: be2eca94d144 700c1018b86d b41d62201b97 2579a4eefc04 Author: Linus Torvalds Date: Tue Nov 26 08:21:54 2019 -0800 Merge branches 'core-objtool-for-linus', 'x86-cleanups-for-linus' and 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 objtool, cleanup, and apic updates from Ingo Molnar: "Objtool: - Fix a gawk 5.0 incompatibility in gen-insn-attr-x86.awk. Most distros are still on gawk 4.2.x. Cleanup: - Misc cleanups, plus the removal of obsolete code such as Calgary IOMMU support, which code hasn't seen any real testing in a long time and there's no known users left. apic: - Two changes: a cleanup and a fix for an (old) race for oneshot threaded IRQ handlers" * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/insn: Fix awk regexp warnings * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Remove unused asm/rio.h x86: Fix typos in comments x86/pci: Remove #ifdef __KERNEL__ guard from x86/pci: Remove pci_64.h x86: Remove the calgary IOMMU driver x86/apic, x86/uprobes: Correct parameter names in kernel-doc comments x86/kdump: Remove the unused crash_copy_backup_region() x86/nmi: Remove stale EDAC include leftover * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioapic: Rename misnamed functions x86/ioapic: Prevent inconsistent state when moving an interrupt commit 8218df93b7c4b1c6d02c4f726029e10efa4b7ca2 Author: Alex Deucher Date: Fri Nov 22 16:43:53 2019 -0500 ALSA: hda/hdmi - enable automatic runtime pm for AMD HDMI codecs by default So that we can power down the GPU and audio to save power. Reviewed-by: Takashi Iwai Acked-by: Evan Quan Signed-off-by: Alex Deucher Link: https://lore.kernel.org/r/20191122214353.582899-5-alexander.deucher@amd.com Signed-off-by: Takashi Iwai commit 73b1422bdfbb379332b2a5529148cda58e84315a Author: Alex Deucher Date: Fri Nov 22 16:43:52 2019 -0500 ALSA: hda/hdmi - enable runtime pm for newer AMD display audio We are able to power down the GPU and audio via the GPU driver so flag these asics as supporting runtime pm. Reviewed-by: Takashi Iwai Acked-by: Evan Quan Signed-off-by: Alex Deucher Link: https://lore.kernel.org/r/20191122214353.582899-4-alexander.deucher@amd.com Signed-off-by: Takashi Iwai commit 8d68a87244a812323ce3f7d5022f9deda9db54b5 Author: Alex Deucher Date: Fri Nov 22 16:43:51 2019 -0500 ALSA: hda/hdmi - Add new pci ids for AMD GPU display audio These are needed so we can enable runtime pm in a subsequent patch. Reviewed-by: Takashi Iwai Signed-off-by: Alex Deucher Link: https://lore.kernel.org/r/20191122214353.582899-3-alexander.deucher@amd.com Signed-off-by: Takashi Iwai commit 586bc4aab878efcf672536f0cdec3d04b6990c94 Author: Alex Deucher Date: Fri Nov 22 16:43:50 2019 -0500 ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD Only enable the vga_switcheroo logic on systems with the ATPX ACPI method. This logic is not needed for asics that are not part of a PX (PowerXpress)/HG (Hybrid Graphics) platform. Reviewed-by: Takashi Iwai Acked-by: Evan Quan Signed-off-by: Alex Deucher Link: https://lore.kernel.org/r/20191122214353.582899-2-alexander.deucher@amd.com Signed-off-by: Takashi Iwai commit 484e0d2b11e1fdd0d17702b282eb2ed56148385f Author: Diego Calleja Date: Tue Nov 26 14:00:31 2019 +0200 dm: add dm-clone to the documentation index Fixes: 7431b7835f554 ("dm: add clone target") Signed-off-by: Diego Calleja Signed-off-by: Nikos Tsironis Signed-off-by: Mike Snitzer commit dbaf971c9cdf10843071a60dcafc1aaab3162354 Author: Mike Snitzer Date: Tue Nov 26 10:08:29 2019 -0500 dm mpath: remove harmful bio-based optimization Removes the branching for edge-case where no SCSI device handler exists. The __map_bio_fast() method was far too limited, by only selecting a new pathgroup or path IFF there was a path failure, fix this be eliminating it in favor of __map_bio(). __map_bio()'s extra SCSI device handler specific MPATHF_PG_INIT_REQUIRED test is not in the fast path anyway. This change restores full path selector functionality for bio-based configurations that don't haave a SCSI device handler. But it should be noted that the path selectors do have an impact on performance for certain networks that are extremely fast (and don't require frequent switching). Fixes: 8d47e65948dd ("dm mpath: remove unnecessary NVMe branching in favor of scsi_dh checks") Cc: stable@vger.kernel.org Reported-by: Drew Hastings Suggested-by: Martin Wilck Signed-off-by: Mike Snitzer commit 7b65e2034fde011d090d4ec472902b71129c6cbd Author: Jiri Olsa Date: Tue Nov 26 13:12:53 2019 +0100 perf tools: Allow to link with libbpf dynamicaly Currently we support only static linking with kernel's libbpf (tools/lib/bpf). This patch adds libbpf package detection and support to link perf with it dynamically. The libbpf package status is displayed with: $ make VF=1 Auto-detecting system features: ... ... libbpf: [ on ] It's not checked by default, because it's quite new. Once it's on most distros we can switch it on. For the same reason it's not added to the test-all check. Perf does not need advanced version of libbpf, so we can check just for the base bpf_object__open function. Adding new compile variable to detect libbpf package and link bpf dynamically: $ make LIBBPF_DYNAMIC=1 ... LINK perf $ ldd perf | grep bpf libbpf.so.0 => /lib64/libbpf.so.0 (0x00007f46818bc000) If libbpf is not installed, build stops with: Makefile.config:486: *** Error: No libbpf devel library found,\ please install libbpf-devel. Stop. Committer testing: $ make LIBBPF_DYNAMIC=1 -C tools/perf O=/tmp/build/perf make: Entering directory '/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j8' parallel build Makefile.config:493: *** Error: No libbpf devel library found, please install libbpf-devel. Stop. make[1]: *** [Makefile.perf:225: sub-make] Error 2 make: *** [Makefile:70: all] Error 2 make: Leaving directory '/home/acme/git/perf/tools/perf' $ Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Toke Høiland-Jørgensen Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Jesper Dangaard Brouer Cc: Martin KaFai Lau Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191126121253.28253-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a5732681e0e6ea0c3024f9d23bcf99b9237189ee Author: Arnaldo Carvalho de Melo Date: Mon Nov 25 22:33:02 2019 -0300 perf tests: Rename tests/map_groups.c to tests/maps.c One more step in mergint the maps and map_groups structs. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-bw6aagubqxc47m54k2maezfu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6d38267cf996bafdbc99eda6ad8c406fc3dcec93 Author: Arnaldo Carvalho de Melo Date: Mon Nov 25 22:29:18 2019 -0300 perf tests: Rename thread-mg-share to thread-maps-share One more step in merging 'struct maps' with 'struct map_groups'. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-naxsl3g4ou3fyxb8l8e0pn5e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c54d241b35c57d19e798e0381dc4838d7447214b Author: Arnaldo Carvalho de Melo Date: Mon Nov 25 22:24:10 2019 -0300 perf maps: Rename map_groups.h to maps.h One more step in the merge of 'struct maps' with 'struct map_groups'. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-9ibtn3vua76f934t7woyf26w@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9a29ceee6bb14aeb58ab2222c8e792576fe90fb8 Author: Arnaldo Carvalho de Melo Date: Mon Nov 25 22:21:28 2019 -0300 perf maps: Rename 'mg' variables to 'maps' Continuing the merge of 'struct maps' with 'struct map_groups'. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-z8d14wrw393a0fbvmnk1bqd9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f2eaea09d684177f57db55a9ce2b67d048083fd5 Author: Arnaldo Carvalho de Melo Date: Mon Nov 25 22:15:35 2019 -0300 perf map_symbol: Rename ms->mg to ms->maps One more step on the merge of 'struct maps' with 'struct map_groups'. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-61rra2wg392rhvdgw421wzpt@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 694520dfeb474619402620b68edf08e60ca36a17 Author: Arnaldo Carvalho de Melo Date: Mon Nov 25 22:11:20 2019 -0300 perf addr_location: Rename al->mg to al->maps One more step on the merge of 'struct maps' with 'struct map_groups'. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-foo95pyyp3bhocbt7yd8qrvq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fe87797dea79b59e97a4ea67441bf91f2905bf23 Author: Arnaldo Carvalho de Melo Date: Mon Nov 25 22:07:43 2019 -0300 perf thread: Rename thread->mg to thread->maps One more step on the merge of 'struct maps' with 'struct map_groups'. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-69vcr8pubpym90skxhmbwhiw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 79b6bb73f888933cbcd20b0ef3976cde67951b72 Author: Arnaldo Carvalho de Melo Date: Mon Nov 25 21:58:33 2019 -0300 perf maps: Merge 'struct maps' with 'struct map_groups' And pick the shortest name: 'struct maps'. The split existed because we used to have two groups of maps, one for functions and one for variables, but that only complicated things, sometimes we needed to figure out what was at some address and then had to first try it on the functions group and if that failed, fall back to the variables one. That split is long gone, so for quite a while we had only one struct maps per struct map_groups, simplify things by combining those structs. First patch is the minimum needed to merge both, follow up patches will rename 'thread->mg' to 'thread->maps', etc. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-hom6639ro7020o708trhxh59@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9adab0348803e4b0522d8d9f73c9a18134f12381 Author: Adrian Hunter Date: Mon Nov 25 14:50:43 2019 +0200 x86/insn: perf tools: Add some more instructions to the new instructions test Add to the "x86 instruction decoder - new instructions" test the following instructions: v4fmaddps v4fmaddss v4fnmaddps v4fnmaddss vaesdec vaesdeclast vaesenc vaesenclast vcvtne2ps2bf16 vcvtneps2bf16 vdpbf16ps gf2p8affineinvqb vgf2p8affineinvqb gf2p8affineqb vgf2p8affineqb gf2p8mulb vgf2p8mulb vp2intersectd vp2intersectq vp4dpwssd vp4dpwssds vpclmulqdq vpcompressb vpcompressw vpdpbusd vpdpbusds vpdpwssd vpdpwssds vpexpandb vpexpandw vpopcntb vpopcntd vpopcntq vpopcntw vpshldd vpshldq vpshldvd vpshldvq vpshldvw vpshldw vpshrdd vpshrdq vpshrdvd vpshrdvq vpshrdvw vpshrdw vpshufbitqmb For information about the instructions, refer Intel SDM May 2019 (325462-070US) and Intel Architecture Instruction Set Extensions May 2019 (319433-037). Committer testing: $ perf test x86 61: x86 rdpmc : Ok 64: x86 instruction decoder - new instructions : Ok 66: x86 bp modify : Ok $ Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Acked-by: Masami Hiramatsu Cc: Andi Kleen Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yu-cheng Yu Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20191125125044.31879-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit af4933c121a9721bc9d2d048ac99b587b6c8d26c Author: Adrian Hunter Date: Mon Nov 25 14:50:44 2019 +0200 x86/insn: Add some more Intel instructions to the opcode map Add to the opcode map the following instructions: v4fmaddps v4fmaddss v4fnmaddps v4fnmaddss vaesdec vaesdeclast vaesenc vaesenclast vcvtne2ps2bf16 vcvtneps2bf16 vdpbf16ps gf2p8affineinvqb vgf2p8affineinvqb gf2p8affineqb vgf2p8affineqb gf2p8mulb vgf2p8mulb vp2intersectd vp2intersectq vp4dpwssd vp4dpwssds vpclmulqdq vpcompressb vpcompressw vpdpbusd vpdpbusds vpdpwssd vpdpwssds vpexpandb vpexpandw vpopcntb vpopcntd vpopcntq vpopcntw vpshldd vpshldq vpshldvd vpshldvq vpshldvw vpshldw vpshrdd vpshrdq vpshrdvd vpshrdvq vpshrdvw vpshrdw vpshufbitqmb For information about the instructions, refer Intel SDM May 2019 (325462-070US) and Intel Architecture Instruction Set Extensions May 2019 (319433-037). The instruction decoding can be tested using the perf tools' "x86 instruction decoder - new instructions" test e.g. $ perf test -v "new " 2>&1 | grep -i 'v4fmaddps' Decoded ok: 62 f2 7f 48 9a 20 v4fmaddps (%eax),%zmm0,%zmm4 Decoded ok: 62 f2 7f 48 9a a4 c8 78 56 34 12 v4fmaddps 0x12345678(%eax,%ecx,8),%zmm0,%zmm4 Decoded ok: 62 f2 7f 48 9a 20 v4fmaddps (%rax),%zmm0,%zmm4 Decoded ok: 67 62 f2 7f 48 9a 20 v4fmaddps (%eax),%zmm0,%zmm4 Decoded ok: 62 f2 7f 48 9a a4 c8 78 56 34 12 v4fmaddps 0x12345678(%rax,%rcx,8),%zmm0,%zmm4 Decoded ok: 67 62 f2 7f 48 9a a4 c8 78 56 34 12 v4fmaddps 0x12345678(%eax,%ecx,8),%zmm0,%zmm4 Signed-off-by: Adrian Hunter Acked-by: Masami Hiramatsu Cc: Andi Kleen Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yu-cheng Yu Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20191125125044.31879-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a82f15e39a4b75482d48d0910f6abe5e4f869b76 Author: Arnaldo Carvalho de Melo Date: Mon Nov 25 10:42:38 2019 -0300 perf map: Remove unused functions At some point those stopped being used, prune them. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-p2k98mj3ff2uk1z95sbl5r6e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 805fcbc4fb669036e0137c9a655c8bf0dd08cb5b Author: Arnaldo Carvalho de Melo Date: Fri Nov 22 12:48:24 2019 -0300 perf map: Remove needless struct forward declarations At some point we may have needed that, not anymore. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-hnao13231bsl7xml5wn8h4iu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 40df3897f0867f2e3700b4f216698288495053ef Author: Arnaldo Carvalho de Melo Date: Fri Nov 22 12:44:10 2019 -0300 perf map: Ditch leftover map__reloc_vmlinux() prototype In 39b12f781271 ("perf tools: Make it possible to read object code from vmlinux") the actual function was removed, but we forgot to remove the prototype, fix it. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-35yy50cgpcx8cjorluwd5j53@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 540a63ea30c86b2785769b9ae713efbfa7547fde Author: Arnaldo Carvalho de Melo Date: Fri Nov 22 12:39:06 2019 -0300 perf script: Move map__fprintf_srccode() to near its only user No need to have it elsewhere. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-8cw846pudpxo0xdkvi9qnvrh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2ea352d5960ad469f5712cf3e293db97beac4e01 Merge: ceb9e77324fa be2eca94d144 Author: Arnaldo Carvalho de Melo Date: Tue Nov 26 11:06:19 2019 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up BPF changes we'll need. Signed-off-by: Arnaldo Carvalho de Melo commit 0ca40f41d795fd91811e44506bb73d0b9ca33bdd Merge: 3e84a18a259e dca6b3733a4a Author: Mauro Carvalho Chehab Date: Tue Nov 26 14:37:47 2019 +0100 Merge branch 'patchwork' into v4l_for_linus * patchwork: (360 commits) media: Revert "media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding" media: hantro: Set H264 FIELDPIC_FLAG_E flag correctly media: hantro: Remove now unused H264 pic_size media: hantro: Use output buffer width and height for H264 decoding media: hantro: Reduce H264 extra space for motion vectors media: hantro: Fix H264 motion vector buffer offset media: ti-vpe: vpe: fix compatible to match bindings media: dt-bindings: media: ti-vpe: Document VPE driver media: zr364xx: remove redundant assigmnent to idx, clean up code media: Documentation: media: *_DEFAULT targets for subdevs media: hantro: Fix s_fmt for dynamic resolution changes media: i2c: Use the correct style for SPDX License Identifier media: siano: Use the correct style for SPDX License Identifier media: vicodec: media_device_cleanup was called too early media: vim2m: media_device_cleanup was called too early media: cedrus: Increase maximum supported size media: cedrus: Fix H264 4k support media: cedrus: Properly signal size in mode register media: v4l2-ctrl: Lock main_hdl on operations of requests_queued. media: si470x-i2c: add missed operations in remove ... commit 8305e90a894f82c278c17e51a28459deee78b263 Author: Wen Yang Date: Mon Nov 25 23:54:09 2019 +0800 firmware: arm_scmi: Avoid double free in error flow If device_register() fails, both put_device() and kfree() are called, ending with a double free of the scmi_dev. Calling kfree() is needed only when a failure happens between the allocation of the scmi_dev and its registration, so move it to there and remove it from the error flow. Fixes: 46edb8d1322c ("firmware: arm_scmi: provide the mandatory device release callback") Signed-off-by: Wen Yang Signed-off-by: Sudeep Holla commit 877b911a5ba0733f62239055ee869f2e117b57da Author: Dexuan Cui Date: Sun Nov 24 21:33:54 2019 -0800 PCI: hv: Avoid a kmemleak false positive caused by the hbus buffer With the recent 59bb47985c1d ("mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two)"), kzalloc() is able to allocate a 4KB buffer that is guaranteed to be 4KB-aligned. Here the size and alignment of hbus is important because hbus's field retarget_msi_interrupt_params must not cross a 4KB page boundary. Here we prefer kzalloc to get_zeroed_page(), because a buffer allocated by the latter is not tracked and scanned by kmemleak, and hence kmemleak reports the pointer contained in the hbus buffer (i.e. the hpdev struct, which is created in new_pcichild_device() and is tracked by hbus->children) as memory leak (false positive). If the kernel doesn't have 59bb47985c1d, get_zeroed_page() *must* be used to allocate the hbus buffer and we can avoid the kmemleak false positive by using kmemleak_alloc() and kmemleak_free() to ask kmemleak to track and scan the hbus buffer. Reported-by: Lili Deng Signed-off-by: Dexuan Cui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley commit 14ef39fddd2367523de25b87dccfe6422c3f3efa Author: Dexuan Cui Date: Sun Nov 24 21:33:53 2019 -0800 PCI: hv: Change pci_protocol_version to per-hbus A VM can have multiple Hyper-V hbus. It's incorrect to set the global variable 'pci_protocol_version' when *every* hbus is initialized in hv_pci_protocol_negotiation(). This is not an issue in practice since every hbus should have the same value of hbus->protocol_version, but we should make the variable per-hbus, so in case we have busses with different protocol versions, the driver can still work correctly. Signed-off-by: Dexuan Cui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley commit ac82fc83270884adea31d9dec22db09392058bf7 Author: Dexuan Cui Date: Sun Nov 24 21:33:52 2019 -0800 PCI: hv: Add hibernation support Add suspend() and resume() functions so that Hyper-V virtual PCI devices are handled properly when the VM hibernates and resumes from hibernation. Note that the suspend() function must make sure there are no pending work items before calling vmbus_close(), since it runs in a process context as a callback in dpm_suspend(). When it starts to run, the channel callback hv_pci_onchannelcallback(), which runs in a tasklet context, can be still running concurrently and scheduling new work items onto hbus->wq in hv_pci_devices_present() and hv_pci_eject_device(), and the work item handlers can access the vmbus channel, which can be being closed by hv_pci_suspend(), e.g. the work item handler pci_devices_present_work() -> new_pcichild_device() writes to the vmbus channel. To eliminate the race, hv_pci_suspend() disables the channel callback tasklet, sets hbus->state to hv_pcibus_removing, and re-enables the tasklet. This way, when hv_pci_suspend() proceeds, it knows that no new work item can be scheduled, and then it flushes hbus->wq and safely closes the vmbus channel. Signed-off-by: Dexuan Cui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley commit a8e37506e79a7a08d0ee217f389fa1710e7a2ea4 Author: Dexuan Cui Date: Sun Nov 24 21:33:51 2019 -0800 PCI: hv: Reorganize the code in preparation of hibernation There is no functional change. This is just preparatory for a later patch which adds the hibernation support for the pci-hyperv driver. Signed-off-by: Dexuan Cui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley commit 782b59711e1561ee0da06bc478ca5e8249aa8d09 Merge: 995e2ef08280 0f1839d08887 Author: Rafael J. Wysocki Date: Tue Nov 26 10:31:02 2019 +0100 Merge branch 'acpi-mm' * acpi-mm: ACPI: HMAT: use %u instead of %d to print u32 values ACPI: NUMA: HMAT: fix a section mismatch ACPI: HMAT: don't mix pxm and nid when setting memory target processor_pxm ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device ACPI: NUMA: HMAT: Register HMAT at device_initcall level device-dax: Add a driver for "hmem" devices dax: Fix alloc_dax_region() compile warning lib: Uplevel the pmem "region" ida to a global allocator x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP arm/efi: EFI soft reservation to memblock x86/efi: EFI soft reservation to E820 enumeration efi: Common enable/disable infrastructure for EFI soft reservation x86/efi: Push EFI_MEMMAP check into leaf routines efi: Enumerate EFI_MEMORY_SP ACPI: NUMA: Establish a new drivers/acpi/numa/ directory commit 995e2ef08280dab8de6c517acd836613678fe2a3 Merge: 1fca7e0e6fe6 ae5e6c6439c3 cb0701acfa7e b5b42b24d783 2e127203d116 Author: Rafael J. Wysocki Date: Tue Nov 26 10:30:49 2019 +0100 Merge branches 'acpi-utils', 'acpi-platform', 'acpi-video' and 'acpi-doc' * acpi-utils: iommu/amd: Switch to use acpi_dev_hid_uid_match() mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match() ACPI / LPSS: Switch to use acpi_dev_hid_uid_match() ACPI / utils: Introduce acpi_dev_hid_uid_match() helper ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI ACPI / utils: Describe function parameters in kernel-doc * acpi-platform: ACPI: platform: Unregister stale platform devices ACPI: Always build evged in * acpi-video: ACPI: video: update doc for acpi_video_bus_DOS() * acpi-doc: ACPI: Documentation: Minor spelling fix in namespace.rst commit 1fca7e0e6fe6804294f51991f2ea82432ea5ed1b Merge: 713608a30b0a 406857f773b0 6025e2fae3dd cefe6aac29ff e346d0cf2c0a Author: Rafael J. Wysocki Date: Tue Nov 26 10:30:12 2019 +0100 Merge branches 'acpi-ec', 'acpi-soc', 'acpi-pmic' and 'acpi-button' * acpi-ec: ACPI: EC: add support for hardware-reduced systems ACPI: EC: tweak naming in preparation for GpioInt support * acpi-soc: ACPI: LPSS: Add dmi quirk for skipping _DEP check for some device-links ACPI: LPSS: Add LNXVIDEO -> BYT I2C1 to lpss_device_links ACPI: LPSS: Add LNXVIDEO -> BYT I2C7 to lpss_device_links * acpi-pmic: ACPI / PMIC: Add Cherry Trail Crystal Cove PMIC OpRegion driver ACPI / PMIC: Add byt prefix to Crystal Cove PMIC OpRegion driver ACPI / PMIC: Do not register handlers for unhandled OpRegions * acpi-button: ACPI: button: Remove unused acpi_lid_notifier_[un]register() functions ACPI: button: Add DMI quirk for Asus T200TA ACPI: button: Add DMI quirk for Medion Akoya E2215T ACPI: button: Turn lid_blacklst DMI table into a generic quirk table ACPI: button: Allow disabling LID support with the lid_init_state module option ACPI: button: Refactor lid_init_state module parsing code commit 713608a30b0a5f5b0866a7c4f462e51b362ee06d Merge: b4447c0dcd0d c7ccf10bb92e Author: Rafael J. Wysocki Date: Tue Nov 26 10:29:54 2019 +0100 Merge branch 'acpica' * acpica: ACPICA: Update version to 20191018 ACPICA: debugger: remove leading whitespaces when converting a string to a buffer ACPICA: acpiexec: initialize all simple types and field units from user input ACPICA: debugger: add field unit support for acpi_db_get_next_token ACPICA: debugger: surround field unit output with braces '{' ACPICA: debugger: add command to dump all fields of particular subtype ACPICA: utilities: add flag to only display data when dumping buffers ACPICA: make acpi_load_table() return table index ACPICA: Add new external interface, acpi_unload_table() ACPICA: More Clang changes ACPICA: Win OSL: Replace get_tick_count with get_tick_count64 ACPICA: Results from Clang commit e350b60f4e0f089f585d738e27213c8133fe9093 Merge: 5a97aa5bbcc1 2079fe6ea8cb 1992b66d2f55 9581e24c3f00 Author: Rafael J. Wysocki Date: Tue Nov 26 10:28:34 2019 +0100 Merge branches 'pm-avs', 'pm-docs' and 'pm-tools' * pm-avs: ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition power: avs: smartreflex: Remove superfluous cast in debugfs_create_file() call * pm-docs: PM: Wrap documentation to fit in 80 columns * pm-tools: cpupower: ToDo: Update ToDo with ideas for per_cpu_schedule handling cpupower: mperf_monitor: Update cpupower to use the RDPRU instruction cpupower: mperf_monitor: Introduce per_cpu_schedule flag cpupower: Move needs_root variable into a sub-struct cpupower : Handle set and info subcommands correctly pm-graph info added to MAINTAINERS tools/power/cpupower: Fix initializer override in hsw_ext_cstates commit 5a97aa5bbcc1249df2a6fd5d32a477f6981ccba6 Merge: fa6a599eb34d 01ca4827a748 fe0c2baae0bd 16c71c511328 f84fdcbc8ec0 Author: Rafael J. Wysocki Date: Tue Nov 26 10:27:49 2019 +0100 Merge branches 'pm-sleep', 'pm-domains', 'pm-opp' and 'powercap' * pm-sleep: PM / wakeirq: remove unnecessary parentheses PM / core: Clean up some function headers in power.h PM / hibernate: memory_bm_find_bit(): Tighten node optimisation * pm-domains: PM / Domains: Convert to dev_to_genpd_safe() in genpd_syscore_switch() mmc: tmio: Avoid boilerplate code in ->runtime_suspend() PM / Domains: Implement the ->start() callback for genpd PM / Domains: Introduce dev_pm_domain_start() * pm-opp: PM / OPP: Support adjusting OPP voltages at runtime * powercap: powercap/intel_rapl: add support for Cometlake desktop powercap/intel_rapl: add support for CometLake Mobile commit fa6a599eb34dec23aadccda6e374cc3ec3e9b7ee Merge: c48b90f84a11 2b328421e4ed Author: Rafael J. Wysocki Date: Tue Nov 26 10:27:17 2019 +0100 Merge branch 'pm-devfreq' * pm-devfreq: (26 commits) PM / devfreq: tegra30: Tune up MCCPU boost-down coefficient PM / devfreq: tegra30: Support variable polling interval PM / devfreq: Add new interrupt_driven flag for governors PM / devfreq: tegra30: Use kHz units for dependency threshold PM / devfreq: tegra30: Disable consecutive interrupts when appropriate PM / devfreq: tegra30: Don't enable already enabled consecutive interrupts PM / devfreq: tegra30: Include appropriate header PM / devfreq: tegra30: Constify structs PM / devfreq: tegra30: Don't enable consecutive-down interrupt on startup PM / devfreq: tegra30: Reset boosting on startup PM / devfreq: tegra30: Move clk-notifier's registration to governor's start PM / devfreq: tegra30: Use CPUFreq notifier PM / devfreq: tegra30: Use kHz units uniformly in the code PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out PM / devfreq: tegra30: Drop write-barrier PM / devfreq: tegra30: Handle possible round-rate error PM / devfreq: tegra30: Keep interrupt disabled while governor is stopped PM / devfreq: tegra30: Change irq type to unsigned int PM / devfreq: exynos-ppmu: remove useless assignment PM / devfreq: Lock devfreq in trans_stat_show ... commit c48b90f84a11ddcd6fee133c4929d8da037667ac Merge: 62214039525a 46770be0cf94 Author: Rafael J. Wysocki Date: Tue Nov 26 10:27:01 2019 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: (23 commits) cpufreq: Register drivers only after CPU devices have been registered cpufreq: Add NULL checks to show() and store() methods of cpufreq cpufreq: intel_pstate: Fix plain int as pointer warning from sparse cpufreq: sun50i: Fix CPU speed bin detection cpufreq: powernv: fix stack bloat and hard limit on number of CPUs cpufreq: Clarify the comment in cpufreq_set_policy() cpufreq: vexpress-spc: find and skip duplicates when merging frequencies cpufreq: vexpress-spc: use macros instead of hardcoded values for cluster ids cpufreq: s3c64xx: Remove pointless NULL check in s3c64xx_cpufreq_driver_init cpufreq: imx-cpufreq-dt: Correct i.MX8MN's default speed grade value cpufreq: vexpress-spc: fix some coding style issues cpufreq: vexpress-spc: remove lots of debug messages cpufreq: vexpress-spc: drop unnessary cpufreq_arm_bL_ops abstraction cpufreq: merge arm_big_little and vexpress-spc cpufreq: scpi: remove stale/outdated comment about the driver ARM: dts: Add OPP-V2 table for AM3517 cpufreq: ti-cpufreq: Add support for AM3517 ARM: dts: omap36xx: using OPP1G needs to control the abb_ldo cpufreq: ti-cpufreq: omap36xx use "cpu0","vbb" if run in multi_regulator mode ARM: dts: omap3: bulk convert compatible to be explicitly ti,omap3430 or ti,omap3630 or ti,am3517 ... commit 62214039525a621aa0eca3fe9160e809ec0e45d3 Merge: 05ff1ba412fd 5aa9ba6312e3 Author: Rafael J. Wysocki Date: Tue Nov 26 10:26:26 2019 +0100 Merge branch 'pm-cpuidle' * pm-cpuidle: cpuidle: Pass exit latency limit to cpuidle_use_deepest_state() cpuidle: Allow idle injection to apply exit latency limit cpuidle: Introduce cpuidle_driver_state_disabled() for driver quirks cpuidle: teo: Avoid code duplication in conditionals cpuidle: teo: Avoid using "early hits" incorrectly cpuidle: teo: Exclude cpuidle overhead from computations cpuidle: Use nanoseconds as the unit of time cpuidle: Consolidate disabled state checks ACPI: processor_idle: Skip dummy wait if kernel is in guest cpuidle: Do not unset the driver if it is there already cpuidle: teo: Fix "early hits" handling for disabled idle states cpuidle: teo: Consider hits and misses metrics of disabled states cpuidle: teo: Rename local variable in teo_select() cpuidle: teo: Ignore disabled idle states that are too deep commit 0725d9a31869e6c80630e99da366ede2848295cc Author: Chris Wilson Date: Mon Nov 18 23:02:40 2019 +0000 drm/i915/gt: Make intel_ring_unpin() safe for concurrent pint In order to avoid some nasty mutex inversions, commit 09c5ab384f6f ("drm/i915: Keep rings pinned while the context is active") allowed the intel_ring unpinning to be run concurrently with the next context pinning it. Thus each step in intel_ring_unpin() needed to be atomic and ordered in a nice onion with intel_ring_pin() so that the lifetimes overlapped and were always safe. Sadly, a few steps in intel_ring_unpin() were overlooked, such as closing the read/write pointers of the ring and discarding the intel_ring.vaddr, as these steps were not serialised with intel_ring_pin() and so could leave the ring in disarray. Fixes: 09c5ab384f6f ("drm/i915: Keep rings pinned while the context is active") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191118230254.2615942-6-chris@chris-wilson.co.uk (cherry picked from commit a266bf42006004306dd48a9082c35dfbff153307) Signed-off-by: Joonas Lahtinen commit be2eca94d144e3ffed565c483a58ecc76a869c98 Merge: a11b696975f2 8e6a5c833333 Author: Linus Torvalds Date: Mon Nov 25 21:41:48 2019 -0800 Merge tag 'for-linus-5.5-1' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Some small fixes accumulated for IPMI, nothing major" * tag 'for-linus-5.5-1' of git://github.com/cminyard/linux-ipmi: ipmi: fix ipmb_poll()'s return type ipmi: kill off 'timespec' usage again drivers: ipmi: Support for both IPMB Req and Resp ipmi: Fix memory leak in __ipmi_bmc_register ipmi: bt-bmc: use devm_platform_ioremap_resource() to simplify code ipmi: use %*ph to print small buffer ipmi: Don't allow device module unload when in use commit a11b696975f257ad2410cbb26f288cc52724f81a Merge: ae2dc032773d ae24f2b6f828 Author: Linus Torvalds Date: Mon Nov 25 21:39:23 2019 -0800 Merge tag 'i3c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Boris Brezillon: "Minor fixes and MAINTAINERS updates" * tag 'i3c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: MAINTAINERS: add myself as maintainer of Cadence I3C master controller driver MAINTAINERS: Mark linux-i3c mailing list moderated i3c: Spelling s/dicovered/discovered/ i3c: master: use i3c_dev_get_master() commit ae2dc032773da914911f4e2a6075f31d1cbc9ca0 Merge: a86f69d33495 bd9d6e0371d1 Author: Linus Torvalds Date: Mon Nov 25 21:35:46 2019 -0800 Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux Pull pcmcia updates from Dominik Brodowski: "Just a few odd fixes and improvements to the PCMCIA core" * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: pcmcia: remove unused dprintk definition pcmcia: include for pcmcia_parse_tuple pcmcia: include cs_internal.h for missing declarations pcmcia: Use dev_get_drvdata where possible pcmcia: clean an indentation issues, remove extraneous spaces commit a86f69d3349569a610eb9ff3b9e4bd1c40fe62f2 Merge: d873a0cd21db e2ce328b282d Author: Linus Torvalds Date: Mon Nov 25 21:32:37 2019 -0800 Merge tag 'spi-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "Lots of stuff going on in the core for SPI this time around, the two big changes both being around time in different forms: - A rework of delay times from Alexandru Ardelean which makes the ways in which they are specified more consistent between drivers so that what's available to clients is less dependent on the hardware implementation. - Support for PTP timestamping of transfers from Vladimir Oltean, useful for use with precision clocks with SPI control interfaces. - Big cleanups for the Atmel, PXA2xx and Zynq QSPI drivers" * tag 'spi-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (119 commits) dt-bindings: spi: Convert stm32 QSPI bindings to json-schema spi: pic32: Retire dma_request_slave_channel_compat() spi: Fix Kconfig indentation spi: mediatek: add SPI_CS_HIGH support spi: st-ssc4: add missed pm_runtime_disable spi: tegra20-slink: add missed clk_unprepare spi: tegra20-slink: Use dma_request_chan() directly for channel request spi: tegra114: Use dma_request_chan() directly for channel request spi: s3c64xx: Use dma_request_chan() directly for channel request spi: qup: Use dma_request_chan() directly for channel request spi: pl022: Use dma_request_chan() directly for channel request spi: imx: Use dma_request_chan() directly for channel request spi: fsl-lpspi: Use dma_request_chan() directly for channel request spi: atmel: Use dma_request_chan() directly for channel request spi: at91-usart: Use dma_request_chan() directly for channel request spi: fsl-cpm: Correct the free:ing spi: Fix regression to return zero on success instead of positive value spi: pxa2xx: Add missed security checks spi: nxp-fspi: Use devm API to fix missed unregistration of controller spi: omap2-mcspi: Remove redundant checks ... commit d873a0cd21dbe2502873feb4b12e3e0ee9a78ac9 Merge: 3b397c7ccafe a21da94f617b Author: Linus Torvalds Date: Mon Nov 25 21:11:55 2019 -0800 Merge tag 'regulator-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "Another fairly quiet release for the regulator API, some work all around including some core work but mostly in specialist or driver specific code: - Fix for powering off boot-on regulators - Enhancements to the coupled regulator support introduced in the last release - Conversion of a bunch of drivers to the fwnode API for GPIOs - Mode support for DA9062 - New device support for Qualcomm PM1650, PM8004 and PM895 and Silergy SR83X - Removal of obsolete AB8505 support" * tag 'regulator-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (49 commits) regulator: da9062: Return REGULATOR_MODE_INVALID for invalid mode regulator: Fix Kconfig indentation regulator: tps6105x: add optional devicetree support tps6105x: add optional devicetree support regulator: rn5t618: fix rc5t619 ldo10 enable regulator: vexpress: Use PTR_ERR_OR_ZERO() to simplify code dt-bindings: mfd: da9062: describe buck modes regulator: da9062: add of_map_mode support for bucks regulator: da9062: refactor buck modes into header regulator: stpmic1: Set a default ramp delay value regulator: core: Let boot-on regulators be powered off regulator: core: Don't try to remove device links if add failed regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id regulator: ab8500: Remove AB8505 USB regulator regulator: fan53555: add chip id for Silergy SYR83X regulator: fixed: add off-on-delay dt-bindings: regulator: fixed: add off-on-delay-us property regulator: core: Allow generic coupling only for always-on regulators regulator: core: Release coupled_rdevs on regulator_init_coupling() error regulator: bd70528: Add MODULE_ALIAS to allow module auto loading ... commit 3b397c7ccafe0624018cb09fc96729f8f6165573 Merge: 386403a115f9 a20db58f3e6e Author: Linus Torvalds Date: Mon Nov 25 21:10:05 2019 -0800 Merge tag 'regmap-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap update from Mark Brown: "Just one patch for this release removing some dead code" * tag 'regmap-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: regmap-w1: Drop unreachable code commit 386403a115f95997c2715691226e11a7b5cffcfd Merge: 642356cb5f4a 622dc5ad8052 Author: Linus Torvalds Date: Mon Nov 25 20:02:57 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from David Miller: "Another merge window, another pull full of stuff: 1) Support alternative names for network devices, from Jiri Pirko. 2) Introduce per-netns netdev notifiers, also from Jiri Pirko. 3) Support MSG_PEEK in vsock/virtio, from Matias Ezequiel Vara Larsen. 4) Allow compiling out the TLS TOE code, from Jakub Kicinski. 5) Add several new tracepoints to the kTLS code, also from Jakub. 6) Support set channels ethtool callback in ena driver, from Sameeh Jubran. 7) New SCTP events SCTP_ADDR_ADDED, SCTP_ADDR_REMOVED, SCTP_ADDR_MADE_PRIM, and SCTP_SEND_FAILED_EVENT. From Xin Long. 8) Add XDP support to mvneta driver, from Lorenzo Bianconi. 9) Lots of netfilter hw offload fixes, cleanups and enhancements, from Pablo Neira Ayuso. 10) PTP support for aquantia chips, from Egor Pomozov. 11) Add UDP segmentation offload support to igb, ixgbe, and i40e. From Josh Hunt. 12) Add smart nagle to tipc, from Jon Maloy. 13) Support L2 field rewrite by TC offloads in bnxt_en, from Venkat Duvvuru. 14) Add a flow mask cache to OVS, from Tonghao Zhang. 15) Add XDP support to ice driver, from Maciej Fijalkowski. 16) Add AF_XDP support to ice driver, from Krzysztof Kazimierczak. 17) Support UDP GSO offload in atlantic driver, from Igor Russkikh. 18) Support it in stmmac driver too, from Jose Abreu. 19) Support TIPC encryption and auth, from Tuong Lien. 20) Introduce BPF trampolines, from Alexei Starovoitov. 21) Make page_pool API more numa friendly, from Saeed Mahameed. 22) Introduce route hints to ipv4 and ipv6, from Paolo Abeni. 23) Add UDP segmentation offload to cxgb4, Rahul Lakkireddy" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1857 commits) libbpf: Fix usage of u32 in userspace code mm: Implement no-MMU variant of vmalloc_user_node_flags slip: Fix use-after-free Read in slip_open net: dsa: sja1105: fix sja1105_parse_rgmii_delays() macvlan: schedule bc_work even if error enetc: add support Credit Based Shaper(CBS) for hardware offload net: phy: add helpers phy_(un)lock_mdio_bus mdio_bus: don't use managed reset-controller ax88179_178a: add ethtool_op_get_ts_info() mlxsw: spectrum_router: Fix use of uninitialized adjacency index mlxsw: spectrum_router: After underlay moves, demote conflicting tunnels bpf: Simplify __bpf_arch_text_poke poke type handling bpf: Introduce BPF_TRACE_x helper for the tracing tests bpf: Add bpf_jit_blinding_enabled for !CONFIG_BPF_JIT bpf, testing: Add various tail call test cases bpf, x86: Emit patchable direct jump as tail call bpf: Constant map key tracking for prog array pokes bpf: Add poke dependency tracking for prog array maps bpf: Add initial poke descriptor table for jit images bpf: Move owner type, jited info into array auxiliary data ... commit 642356cb5f4a8c82b5ca5ebac288c327d10df236 Merge: f838767555d4 4ee812f6143d Author: Linus Torvalds Date: Mon Nov 25 19:49:58 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Add library interfaces of certain crypto algorithms for WireGuard - Remove the obsolete ablkcipher and blkcipher interfaces - Move add_early_randomness() out of rng_mutex Algorithms: - Add blake2b shash algorithm - Add blake2s shash algorithm - Add curve25519 kpp algorithm - Implement 4 way interleave in arm64/gcm-ce - Implement ciphertext stealing in powerpc/spe-xts - Add Eric Biggers's scalar accelerated ChaCha code for ARM - Add accelerated 32r2 code from Zinc for MIPS - Add OpenSSL/CRYPTOGRAMS poly1305 implementation for ARM and MIPS Drivers: - Fix entropy reading failures in ks-sa - Add support for sam9x60 in atmel - Add crypto accelerator for amlogic GXL - Add sun8i-ce Crypto Engine - Add sun8i-ss cryptographic offloader - Add a host of algorithms to inside-secure - Add NPCM RNG driver - add HiSilicon HPRE accelerator - Add HiSilicon TRNG driver" * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (285 commits) crypto: vmx - Avoid weird build failures crypto: lib/chacha20poly1305 - use chacha20_crypt() crypto: x86/chacha - only unregister algorithms if registered crypto: chacha_generic - remove unnecessary setkey() functions crypto: amlogic - enable working on big endian kernel crypto: sun8i-ce - enable working on big endian crypto: mips/chacha - select CRYPTO_SKCIPHER, not CRYPTO_BLKCIPHER hwrng: ks-sa - Enable COMPILE_TEST crypto: essiv - remove redundant null pointer check before kfree crypto: atmel-aes - Change data type for "lastc" buffer crypto: atmel-tdes - Set the IV after {en,de}crypt crypto: sun4i-ss - fix big endian issues crypto: sun4i-ss - hide the Invalid keylen message crypto: sun4i-ss - use crypto_ahash_digestsize crypto: sun4i-ss - remove dependency on not 64BIT crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c MAINTAINERS: Add maintainer for HiSilicon SEC V2 driver crypto: hisilicon - add DebugFS for HiSilicon SEC Documentation: add DebugFS doc for HiSilicon SEC crypto: hisilicon - add SRIOV for HiSilicon SEC ... commit f838767555d40f29bc4771c5c8cc63193094b7cc Merge: 436b2a8039ac 0e672adc87e5 Author: Linus Torvalds Date: Mon Nov 25 19:43:48 2019 -0800 Merge tag 'livepatching-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching updates from Petr Mladek: - New API to track system state changes done be livepatch callbacks. It helps to maintain compatibility between livepatches. - Update Kconfig help text. ORC is another reliable unwinder. - Disable generic selftest timeout. Livepatch selftests have their own per-operation fine-grained timeouts. * tag 'livepatching-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: x86/stacktrace: update kconfig help text for reliable unwinders livepatch: Selftests of the API for tracking system state changes livepatch: Documentation of the new API for tracking system state changes livepatch: Allow to distinguish different version of system state changes livepatch: Basic API to track system state changes livepatch: Keep replaced patches until post_patch callback is called selftests/livepatch: Disable the timeout commit 436b2a8039ac00f8dc6ae8f3bd2be83748f72312 Merge: 1b96a41b4209 1d28122131b2 Author: Linus Torvalds Date: Mon Nov 25 19:40:40 2019 -0800 Merge tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - Allow to print symbolic error names via new %pe modifier. - Use pr_warn() instead of the remaining pr_warning() calls. Fix formatting of the related lines. - Add VSPRINTF entry to MAINTAINERS. * tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: (32 commits) checkpatch: don't warn about new vsprintf pointer extension '%pe' MAINTAINERS: Add VSPRINTF tools lib api: Renaming pr_warning to pr_warn ASoC: samsung: Use pr_warn instead of pr_warning lib: cpu_rmap: Use pr_warn instead of pr_warning trace: Use pr_warn instead of pr_warning dma-debug: Use pr_warn instead of pr_warning vgacon: Use pr_warn instead of pr_warning fs: afs: Use pr_warn instead of pr_warning sh/intc: Use pr_warn instead of pr_warning scsi: Use pr_warn instead of pr_warning platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning platform/x86: asus-laptop: Use pr_warn instead of pr_warning platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning oprofile: Use pr_warn instead of pr_warning of: Use pr_warn instead of pr_warning macintosh: Use pr_warn instead of pr_warning idsn: Use pr_warn instead of pr_warning ide: Use pr_warn instead of pr_warning crypto: n2: Use pr_warn instead of pr_warning ... commit 1b96a41b420972f8ba563373de8154d59d5b2208 Merge: 9391edee8667 40363cf13999 Author: Linus Torvalds Date: Mon Nov 25 19:23:46 2019 -0800 Merge branch 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "There are several notable changes here: - Single thread migrating itself has been optimized so that it doesn't need threadgroup rwsem anymore. - Freezer optimization to avoid unnecessary frozen state changes. - cgroup ID unification so that cgroup fs ino is the only unique ID used for the cgroup and can be used to directly look up live cgroups through filehandle interface on 64bit ino archs. On 32bit archs, cgroup fs ino is still the only ID in use but it is only unique when combined with gen. - selftest and other changes" * 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (24 commits) writeback: fix -Wformat compilation warnings docs: cgroup: mm: Fix spelling of "list" cgroup: fix incorrect WARN_ON_ONCE() in cgroup_setup_root() cgroup: use cgrp->kn->id as the cgroup ID kernfs: use 64bit inos if ino_t is 64bit kernfs: implement custom exportfs ops and fid type kernfs: combine ino/id lookup functions into kernfs_find_and_get_node_by_id() kernfs: convert kernfs_node->id from union kernfs_node_id to u64 kernfs: kernfs_find_and_get_node_by_ino() should only look up activated nodes kernfs: use dumber locking for kernfs_find_and_get_node_by_ino() netprio: use css ID instead of cgroup ID writeback: use ino_t for inodes in tracepoints kernfs: fix ino wrap-around detection kselftests: cgroup: Avoid the reuse of fd after it is deallocated cgroup: freezer: don't change task and cgroups status unnecessarily cgroup: use cgroup->last_bstat instead of cgroup->bstat_pending for consistency cgroup: remove cgroup_enable_task_cg_lists() optimization cgroup: pids: use atomic64_t for pids->limit selftests: cgroup: Run test_core under interfering stress selftests: cgroup: Add task migration tests ... commit 9391edee8667733e22baa50d182191ba3a00d5e1 Merge: 0acefef58451 49e9d1a9faf2 Author: Linus Torvalds Date: Mon Nov 25 18:57:12 2019 -0800 Merge branch 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: "There have been sporadic reports of sanity checks in destroy_workqueue() failing spuriously over the years. This contains the fix and its follow-up changes / fixes. There's also a RCU annotation improvement" * 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Add RCU annotation for pwq list walk workqueue: Fix pwq ref leak in rescuer_thread() workqueue: more destroy_workqueue() fixes workqueue: Minor follow-ups to the rescuer destruction change workqueue: Fix missing kfree(rescuer) in destroy_workqueue() workqueue: Fix spurious sanity check failures in destroy_workqueue() commit 8042d6ce8c40df0abb0d91662a754d074a3d3f16 Author: Hrvoje Zeba Date: Mon Nov 25 14:40:22 2019 -0500 io_uring: remove superfluous check for sqe->off in io_accept() This field contains a pointer to addrlen and checking to see if it's set returns -EINVAL if the caller sets addr & addrlen pointers. Fixes: 17f2fe35d080 ("io_uring: add support for IORING_OP_ACCEPT") Signed-off-by: Hrvoje Zeba Signed-off-by: Jens Axboe commit 181e448d8709e517c9c7b523fcd209f24eb38ca7 Author: Jens Axboe Date: Mon Nov 25 08:52:30 2019 -0700 io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed-off-by: Jens Axboe commit 576a347b7af8abfbddc80783fb6629c2894d036e Author: Jens Axboe Date: Mon Nov 25 08:49:20 2019 -0700 io-wq: have io_wq_create() take a 'data' argument We currently pass in 4 arguments outside of the bounded size. In preparation for adding one more argument, let's bundle them up in a struct to make it more readable. No functional changes in this patch. Signed-off-by: Jens Axboe commit 311ae9e159d81a1ec1cf645daf40b39ae5a0bd84 Author: Pavel Begunkov Date: Sun Nov 24 11:58:24 2019 +0300 io_uring: fix dead-hung for non-iter fixed rw Read/write requests to devices without implemented read/write_iter using fixed buffers can cause general protection fault, which totally hangs a machine. io_import_fixed() initialises iov_iter with bvec, but loop_rw_iter() accesses it as iovec, dereferencing random address. kmap() page by page in this case Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f8e85cf255ad57d65eeb9a9d0e59e3dec55bdd9e Author: Jens Axboe Date: Sat Nov 23 14:24:24 2019 -0700 io_uring: add support for IORING_OP_CONNECT This allows an application to call connect() in an async fashion. Like other opcodes, we first try a non-blocking connect, then punt to async context if we have to. Note that we can still return -EINPROGRESS, and in that case the caller should use IORING_OP_POLL_ADD to do an async wait for completion of the connect request (just like for regular connect(2), except we can do it async here too). Signed-off-by: Jens Axboe commit bd3ded3146daa2cbb57ed353749ef99cf75371b0 Author: Jens Axboe Date: Sat Nov 23 14:17:16 2019 -0700 net: add __sys_connect_file() helper This is identical to __sys_connect(), except it takes a struct file instead of an fd, and it also allows passing in extra file->f_flags flags. The latter is done to support masking in O_NONBLOCK without manipulating the original file flags. No functional changes in this patch. Cc: netdev@vger.kernel.org Acked-by: David S. Miller Signed-off-by: Jens Axboe commit c4a2ed72c9a61594b6afc23e1fbc78878d32b5a3 Author: Jens Axboe Date: Thu Nov 21 21:01:26 2019 -0700 io_uring: only return -EBUSY for submit on non-flushed backlog We return -EBUSY on submit when we have a CQ ring overflow backlog, but that can be a bit problematic if the application is using pure userspace poll of the CQ ring. For that case, if the ring briefly overflowed and we have pending entries in the backlog, the submit flushes the backlog successfully but still returns -EBUSY. If we're able to fully flush the CQ ring backlog, let the submission proceed. Reported-by: Dan Melnic Signed-off-by: Jens Axboe commit f9bd67f69af56d712bfd498f5ad9cf7bb177d600 Author: Pavel Begunkov Date: Thu Nov 21 23:21:03 2019 +0300 io_uring: only !null ptr to io_issue_sqe() Pass only non-null @nxt to io_issue_sqe() and handle it at the caller's side. And propagate it. - kiocb_done() is only called from io_read() and io_write(), which are only called from io_issue_sqe(), so it's @nxt != NULL - io_put_req_find_next() is called either with explicitly non-null local nxt, or from one of the functions in io_issue_sqe() switch (or their callees). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b18fdf71e01fba29a804d63f8c1e2ed61011170d Author: Pavel Begunkov Date: Thu Nov 21 23:21:02 2019 +0300 io_uring: simplify io_req_link_next() "if (nxt)" is always true, as it was checked in the while's condition. io_wq_current_is_worker() is unnecessary, as non-async callers don't pass nxt, so io_queue_async_work() will be called for them anyway. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 944e58bfeda0e9b97cd611adafc823c78e0bc464 Author: Pavel Begunkov Date: Thu Nov 21 23:21:01 2019 +0300 io_uring: pass only !null to io_req_find_next() Make io_req_find_next() and io_req_link_next() to accept only non-null nxt, and handle it in callers. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 70cf9f3270a5c5148e93a526dc1e51965259e70c Author: Pavel Begunkov Date: Thu Nov 21 23:21:00 2019 +0300 io_uring: remove io_free_req_find_next() There is only one one-liner user of io_free_req_find_next(). Inline it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9835d6fafba58e6d9386a6d5af800789bdb52e5b Author: Pavel Begunkov Date: Thu Nov 21 21:24:56 2019 +0300 io_uring: add likely/unlikely in io_get_sqring() The number of SQEs to submit is specified by a user, so io_get_sqring() in most of the cases succeeds. Hint compilers about that. Checking ASM genereted by gcc 9.2.0 for x64, there is one branch misprediction. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d732447fed7d6b4c22907f630cd25d574bae5276 Author: Pavel Begunkov Date: Thu Nov 21 21:24:36 2019 +0300 io_uring: rename __io_submit_sqe() __io_submit_sqe() is issuing requests, so call it as such. Moreover, it ends by calling io_iopoll_req_issued(). Rename it and make terminology clearer. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 915967f69c591b34c5a18d6618af021a81ffd700 Author: Jens Axboe Date: Thu Nov 21 09:01:20 2019 -0700 io_uring: improve trace_io_uring_defer() trace point We don't have shadow requests anymore, so get rid of the shadow argument. Add the user_data argument, as that's often useful to easily match up requests, instead of having to look at request pointers. Signed-off-by: Jens Axboe commit 1b4a51b6d03d21f55effbcf609ba5526d87d9e9d Author: Pavel Begunkov Date: Thu Nov 21 11:54:28 2019 +0300 io_uring: drain next sqe instead of shadowing There's an issue with the shadow drain logic in that we drop the completion lock after deciding to defer a request, then re-grab it later and assume that the state is still the same. In the mean time, someone else completing a request could have found and issued it. This can cause a stall in the queue, by having a shadow request inserted that nobody is going to drain. Additionally, if we fail allocating the shadow request, we simply ignore the drain. Instead of using a shadow request, defer the next request/link instead. This also has the following advantages: - removes semi-duplicated code - doesn't allocate memory for shadows - works better if only the head marked for drain - doesn't need complex synchronisation On the flip side, it removes the shadow->seq == last_drain_in_in_link->seq optimization. That shouldn't be a common case, and can always be added back, if needed. Fixes: 4fe2c963154c ("io_uring: add support for link with drain") Cc: Jackie Liu Reported-by: Jens Axboe Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b76da70fc3759df13e0991706451f1a2e06ba19e Author: Jens Axboe Date: Wed Nov 20 13:05:32 2019 -0700 io_uring: close lookup gap for dependent next work When we find new work to process within the work handler, we queue the linked timeout before we have issued the new work. This can be problematic for very short timeouts, as we have a window where the new work isn't visible. Allow the work handler to store a callback function for this in the work item, and flag it with IO_WQ_WORK_CB if the caller has done so. If that is set, then io-wq will call the callback when it has setup the new work item. Reported-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4d7dd462971405c65bfb3821dbb6b9ce13b5e8d6 Author: Jens Axboe Date: Wed Nov 20 13:03:52 2019 -0700 io_uring: allow finding next link independent of req reference count We currently try and start the next link when we put the request, and only if we were going to free it. This means that the optimization to continue executing requests from the same context often fails, as we're not putting the final reference. Add REQ_F_LINK_NEXT to keep track of this, and allow io_uring to find the next request more efficiently. Signed-off-by: Jens Axboe commit eb065d301e8c83643367bdb0898becc364046bda Author: Jens Axboe Date: Wed Nov 20 09:26:29 2019 -0700 io_uring: io_allocate_scq_urings() should return a sane state We currently rely on the ring destroy on cleaning things up in case of failure, but io_allocate_scq_urings() can leave things half initialized if only parts of it fails. Be nice and return with either everything setup in success, or return an error with things nicely cleaned up. Reported-by: syzbot+0d818c0d39399188f393@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit bbad27b2f622fa26d107f8a72c0cd5cc102dc56e Author: Pavel Begunkov Date: Tue Nov 19 23:32:47 2019 +0300 io_uring: Always REQ_F_FREE_SQE for allocated sqe Always mark requests with allocated sqe and deallocate it in __io_free_req(). It's easier to follow and doesn't add edge cases. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 5d960724b0cb0d12469d1c62912e4a8c09c9fd92 Author: Jens Axboe Date: Tue Nov 19 15:31:28 2019 -0700 io_uring: io_fail_links() should only consider first linked timeout We currently clear the linked timeout field if we cancel such a timeout, but we should only attempt to cancel if it's the first one we see. Others should simply be freed like other requests, as they haven't been started yet. Signed-off-by: Jens Axboe commit 09fbb0a83ec6ab5a4037766261c031151985fff6 Author: Pavel Begunkov Date: Tue Nov 19 23:32:50 2019 +0300 io_uring: Fix leaking linked timeouts let have a dependant link: REQ -> LINK_TIMEOUT -> LINK_TIMEOUT 1. submission stage: submission references for REQ and LINK_TIMEOUT are dropped. So, references respectively (1,1,2) 2. io_put(REQ) + FAIL_LINKS stage: calls io_fail_links(), which for all linked timeouts will call cancel_timeout() and drop 1 reference. So, references after: (0,0,1). That's a leak. Make it treat only the first linked timeout as such, and pass others through __io_double_put_req(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f70193d6d8cad4cc614223fef349e6ea9d48c61f Author: Pavel Begunkov Date: Tue Nov 19 23:32:49 2019 +0300 io_uring: remove redundant check Pass any IORING_OP_LINK_TIMEOUT request further, where it will eventually fail in io_issue_sqe(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d3b35796b1e3f118017491d621f624e0de7ff9fb Author: Pavel Begunkov Date: Tue Nov 19 23:32:48 2019 +0300 io_uring: break links for failed defer If io_req_defer() failed, it needs to cancel a dependant link. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b2e9c7d64b7ecacc1d0f15a6af88a73cab7d8db9 Author: Dan Carpenter Date: Tue Nov 19 09:22:16 2019 +0300 io-wq: remove extra space characters These lines are indented an extra space character. Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe commit b60fda6000a99a7ccac36005ab78b14b47c06de3 Author: Jens Axboe Date: Tue Nov 19 08:37:07 2019 -0700 io-wq: wait for io_wq_create() to setup necessary workers We currently have a race where if setup is really slow, we can be calling io_wq_destroy() before we're done setting up. This will cause the caller to get stuck waiting for the manager to set things up, but the manager already exited. Fix this by doing a sync setup of the manager. This also fixes the case where if we failed creating workers, we'd also get stuck. In practice this race window was really small, as we already wait for the manager to start. Hence someone would have to call io_wq_destroy() after the task has started, but before it started the first loop. The reported test case forked tons of these, which is why it became an issue. Reported-by: syzbot+0f1cc17f85154f400465@syzkaller.appspotmail.com Fixes: 771b53d033e8 ("io-wq: small threadpool implementation for io_uring") Signed-off-by: Jens Axboe commit fba38c272a0385148935d6443cb9dc68cf1f37a7 Author: Jens Axboe Date: Mon Nov 18 12:27:57 2019 -0700 io_uring: request cancellations should break links We currently don't explicitly break links if a request is cancelled, but we should. Add explicitly link breakage for all types of request cancellations that we support. Signed-off-by: Jens Axboe commit b0dd8a412699afe3420a08f841333f3474ad45c5 Author: Jens Axboe Date: Mon Nov 18 12:14:54 2019 -0700 io_uring: correct poll cancel and linked timeout expiration completion Currently a poll request fills a completion entry of 0, even if it got cancelled. This is odd, and it makes it harder to support with chains. Ensure that it returns -ECANCELED in the completions events if it got cancelled, and furthermore ensure that the linked timeout that triggered it completes with -ETIME if we did indeed trigger the completions through a timeout. Signed-off-by: Jens Axboe commit e0e328c4b330712e45ba799dc589bda751323110 Author: Jens Axboe Date: Fri Nov 15 17:59:46 2019 -0700 io_uring: remove dead REQ_F_SEQ_PREV flag With the conversion to io-wq, we no longer use that flag. Kill it. Fixes: 561fb04a6a22 ("io_uring: replace workqueue usage with io-wq") Signed-off-by: Jens Axboe commit 94ae5e77a9150a8c6c57432e2db290c6868ddfad Author: Jens Axboe Date: Thu Nov 14 19:39:52 2019 -0700 io_uring: fix sequencing issues with linked timeouts We have an issue with timeout links that are deeper in the submit chain, because we only handle it upfront, not from later submissions. Move the prep + issue of the timeout link to the async work prep handler, and do it normally for non-async queue. If we validate and prepare the timeout links upfront when we first see them, there's nothing stopping us from supporting any sort of nesting. Fixes: 2665abfd757f ("io_uring: add support for linked SQE timeouts") Reported-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ad8a48acc23cb13cbf4332ebabb867b1baa81842 Author: Jens Axboe Date: Fri Nov 15 08:49:11 2019 -0700 io_uring: make req->timeout be dynamically allocated There are a few reasons for this: - As a prep to improving the linked timeout logic - io_timeout is the biggest member in the io_kiocb opcode union This also enables a few cleanups, like unifying the timer setup between IORING_OP_TIMEOUT and IORING_OP_LINK_TIMEOUT, and not needing multiple arguments to the link/prep helpers. Signed-off-by: Jens Axboe commit 978db57e2c329fc612ff669cab9bf0007efd3ca3 Author: Jens Axboe Date: Thu Nov 14 22:39:04 2019 -0700 io_uring: make io_double_put_req() use normal completion path If we don't use the normal completion path, we may skip killing links that should be errored and freed. Add __io_double_put_req() for use within the completion path itself, other calls should just use io_double_put_req(). Signed-off-by: Jens Axboe commit 0e0702dac26b282603261f04a62711a2d9aac17b Author: Jens Axboe Date: Thu Nov 14 21:42:10 2019 -0700 io_uring: cleanup return values from the queueing functions __io_queue_sqe(), io_queue_sqe(), io_queue_link_head() all return 0/err, but the caller doesn't care since the errors are handled inline. Clean these up and just make them void. Signed-off-by: Jens Axboe commit 95a5bbae05ef1ec1cceb8c1b04a482aa0b7c177c Author: Jens Axboe Date: Thu Nov 14 22:40:44 2019 -0700 io_uring: io_async_cancel() should pass in 'nxt' request pointer If we have a linked request, this enables us to pass it back directly without having to go through async context. Signed-off-by: Jens Axboe commit 0acefef58451a995981e6d641220fecc53bd85a4 Merge: 9c91e6a5befb 11fde161ab37 Author: Linus Torvalds Date: Mon Nov 25 18:36:49 2019 -0800 Merge tag 'threads-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread management updates from Christian Brauner: - A pidfd's fdinfo file currently contains the field "Pid:\t" where is the pid of the process in the pid namespace of the procfs instance the fdinfo file for the pidfd was opened in. The fdinfo file has now gained a new "NSpid:\t[\t[...]]" field which lists the pids of the process in all child pid namespaces provided the pid namespace of the procfs instance it is looked up under has an ancestoral relationship with the pid namespace of the process. If it does not 0 will be shown and no further pid namespaces will be listed. Tests included. (Christian Kellner) - If the process the pidfd references has already exited, print -1 for the Pid and NSpid fields in the pidfd's fdinfo file. Tests included. (me) - Add CLONE_CLEAR_SIGHAND. This lets callers clear all signal handler that are not SIG_DFL or SIG_IGN at process creation time. This originated as a feature request from glibc to improve performance and elimate races in their posix_spawn() implementation. Tests included. (me) - Add support for choosing a specific pid for a process with clone3(). This is the feature which was part of the thread update for v5.4 but after a discussion at LPC in Lisbon we decided to delay it for one more cycle in order to make the interface more generic. This has now done. It is now possible to choose a specific pid in a whole pid namespaces (sub)hierarchy instead of just one pid namespace. In order to choose a specific pid the caller must have CAP_SYS_ADMIN in all owning user namespaces of the target pid namespaces. Tests included. (Adrian Reber) - Test improvements and extensions. (Andrei Vagin, me) * tag 'threads-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: selftests/clone3: skip if clone3() is ENOSYS selftests/clone3: check that all pids are released on error paths selftests/clone3: report a correct number of fails selftests/clone3: flush stdout and stderr before clone3() and _exit() selftests: add tests for clone3() with *set_tid fork: extend clone3() to support setting a PID selftests: add tests for clone3() tests: test CLONE_CLEAR_SIGHAND clone3: add CLONE_CLEAR_SIGHAND pid: use pid_has_task() in pidfd_open() exit: use pid_has_task() in do_wait() pid: use pid_has_task() in __change_pid() test: verify fdinfo for pidfd of reaped process pidfd: check pid has attached task in fdinfo pidfd: add tests for NSpid info in fdinfo pidfd: add NSpid entries to fdinfo commit 9c91e6a5befb89d1494dd156dd4563f9e948a74f Merge: 752272f16dd1 5781823fd0d3 Author: Linus Torvalds Date: Mon Nov 25 18:07:36 2019 -0800 Merge tag 'edac_for_5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: "A lot of changes this time around, details below. From the next cycle onwards, we'll switch the EDAC tree to topic branches (instead of a single edac-for-next branch) which should make the changes handling more flexible, hopefully. We'll see. Summary: - Rework error logging functions to accept a count of errors parameter (Hanna Hawa) - Part one of substantial EDAC core + ghes_edac driver cleanup (Robert Richter) - Print additional useful logging information in skx_* (Tony Luck) - Improve amd64_edac hw detection + cleanups (Yazen Ghannam) - Misc cleanups, fixes and code improvements" * tag 'edac_for_5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: (35 commits) EDAC/altera: Use the Altera System Manager driver EDAC/altera: Cleanup the ECC Manager EDAC/altera: Use fast register IO for S10 IRQs EDAC/ghes: Do not warn when incrementing refcount on 0 EDAC/Documentation: Describe CPER module definition and DIMM ranks EDAC: Unify the mc_event tracepoint call EDAC/ghes: Remove intermediate buffer pvt->detail_location EDAC/ghes: Fix grain calculation EDAC/ghes: Use standard kernel macros for page calculations EDAC: Remove misleading comment in struct edac_raw_error_desc EDAC/mc: Reduce indentation level in edac_mc_handle_error() EDAC/mc: Remove needless zero string termination EDAC/mc: Do not BUG_ON() in edac_mc_alloc() EDAC: Introduce an mci_for_each_dimm() iterator EDAC: Remove EDAC_DIMM_OFF() macro EDAC: Replace EDAC_DIMM_PTR() macro with edac_get_dimm() function EDAC/amd64: Get rid of the ECC disabled long message EDAC/ghes: Fix locking and memory barrier issues EDAC/amd64: Check for memory before fully initializing an instance EDAC/amd64: Use cached data when checking for ECC ... commit 752272f16dd18f2cac58a583a8673c8e2fb93abb Merge: 3f3c8be973af 96710247298d Author: Linus Torvalds Date: Mon Nov 25 18:02:36 2019 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "ARM: - data abort report and injection - steal time support - GICv4 performance improvements - vgic ITS emulation fixes - simplify FWB handling - enable halt polling counters - make the emulated timer PREEMPT_RT compliant s390: - small fixes and cleanups - selftest improvements - yield improvements PPC: - add capability to tell userspace whether we can single-step the guest - improve the allocation of XIVE virtual processor IDs - rewrite interrupt synthesis code to deliver interrupts in virtual mode when appropriate. - minor cleanups and improvements. x86: - XSAVES support for AMD - more accurate report of nested guest TSC to the nested hypervisor - retpoline optimizations - support for nested 5-level page tables - PMU virtualization optimizations, and improved support for nested PMU virtualization - correct latching of INITs for nested virtualization - IOAPIC optimization - TSX_CTRL virtualization for more TAA happiness - improved allocation and flushing of SEV ASIDs - many bugfixes and cleanups" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (127 commits) kvm: nVMX: Relax guest IA32_FEATURE_CONTROL constraints KVM: x86: Grab KVM's srcu lock when setting nested state KVM: x86: Open code shared_msr_update() in its only caller KVM: Fix jump label out_free_* in kvm_init() KVM: x86: Remove a spurious export of a static function KVM: x86: create mmu/ subdirectory KVM: nVMX: Remove unnecessary TLB flushes on L1<->L2 switches when L1 use apic-access-page KVM: x86: remove set but not used variable 'called' KVM: nVMX: Do not mark vmcs02->apic_access_page as dirty when unpinning KVM: vmx: use MSR_IA32_TSX_CTRL to hard-disable TSX on guest that lack it KVM: vmx: implement MSR_IA32_TSX_CTRL disable RTM functionality KVM: x86: implement MSR_IA32_TSX_CTRL effect on CPUID KVM: x86: do not modify masked bits of shared MSRs KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES KVM: PPC: Book3S HV: XIVE: Fix potential page leak on error path KVM: PPC: Book3S HV: XIVE: Free previous EQ page when setting up a new one KVM: nVMX: Assume TLB entries of L1 and L2 are tagged differently if L0 use EPT KVM: x86: Unexport kvm_vcpu_reload_apic_access_page() KVM: nVMX: add CR4_LA57 bit to nested CR4_FIXED1 KVM: nVMX: Use semi-colon instead of comma for exit-handlers initialization ... commit 3f3c8be973af10875cfa1e7b85a535b6ba76b44f Merge: 2981dcf333b3 23c1cce9f317 Author: Linus Torvalds Date: Mon Nov 25 17:45:31 2019 -0800 Merge tag 'for-linus-5.5a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - a small series to remove the build constraint of Xen x86 MCE handling to 64-bit only - a bunch of minor cleanups * tag 'for-linus-5.5a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: Fix Kconfig indentation xen/mcelog: also allow building for 32-bit kernels xen/mcelog: add PPIN to record when available xen/mcelog: drop __MC_MSR_MCGCAP xen/gntdev: Use select for DMA_SHARED_BUFFER xen: mm: make xen_mm_init static xen: mm: include for missing declarations commit 2981dcf333b37e3753b5c1b5814418c4de1a8e34 Merge: 5ef30d74232e a8d0f11ee50d Author: Linus Torvalds Date: Mon Nov 25 17:42:56 2019 -0800 Merge tag 'mips_5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Paul Burton: "The main MIPS changes for 5.5: - Atomics-related code sees some rework & cleanup, most notably allowing Loongson LL/SC errata workarounds to be more bulletproof & their correctness to be checked at build time. - Command line setup code is simplified somewhat, resolving various corner cases. - MIPS kernels can now be built with kcov code coverage support. - We can now build with CONFIG_FORTIFY_SOURCE=y. - Miscellaneous cleanups. And some platform specific changes: - We now disable some broken TLB functionality on certain Ingenic systems, and JZ4780 systems gain some devicetree nodes to support more devices. - Loongson support sees a number of cleanups, and we gain initial support for Loongson 3A R4 systems. - We gain support for MediaTek MT7688-based GARDENA Smart Gateway systems. - SGI IP27 (Origin 2*) see a number of fixes, cleanups & simplifications. - SGI IP30 (Octane) systems are now supported" * tag 'mips_5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (107 commits) MIPS: SGI-IP27: Enable ethernet phy on second Origin 200 module MIPS: PCI: Fix fake subdevice ID for IOC3 MIPS: Ingenic: Disable abandoned HPTLB function. MIPS: PCI: remember nasid changed by set interrupt affinity MIPS: SGI-IP27: Fix crash, when CPUs are disabled via nr_cpus parameter mips: add support for folded p4d page tables mips: drop __pXd_offset() macros that duplicate pXd_index() ones mips: fix build when "48 bits virtual memory" is enabled MIPS: math-emu: Reuse name array in debugfs_fpuemu() MIPS: allow building with kcov coverage MIPS: Loongson64: Drop setup_pcimap MIPS: Loongson2ef: Convert to early_printk_8250 MIPS: Drop CPU_SUPPORTS_UNCACHED_ACCELERATED MIPS: Loongson{2ef, 32, 64} convert to generic fw cmdline MIPS: Drop pmon.h MIPS: Loongson: Unify LOONGSON3/LOONGSON64 Kconfig usage MIPS: Loongson: Rename LOONGSON1 to LOONGSON32 MIPS: Loongson: Fix return value of loongson_hwmon_init MIPS: add support for SGI Octane (IP30) MIPS: PCI: make phys_to_dma/dma_to_phys for pci-xtalk-bridge common ... commit 5ef30d74232ed204a461a5dbd0309718d63abd01 Merge: 28fcb77b3878 5ed0794cde59 Author: Linus Torvalds Date: Mon Nov 25 17:37:30 2019 -0800 Merge tag 'm68k-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - Atari Falcon IDE platform driver conversion for module autoload - defconfig updates (including enablement of Amiga ICY I2C) - small fixes and cleanups * tag 'm68k-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/atari: Convert Falcon IDE drivers to platform drivers m68k: defconfig: Enable ICY I2C and LTC2990 on Amiga m68k: defconfig: Update defconfigs for v5.4-rc1 m68k: q40: Fix info-leak in rtc_ioctl nubus: Remove cast to void pointer commit 28fcb77b387832f03a31624b9de515ea1b57b419 Merge: 63c2291f836e f6656208f04e Author: Linus Torvalds Date: Mon Nov 25 17:31:39 2019 -0800 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Borislav Petkov: - Fully reworked thermal throttling notifications, there should be no more spamming of dmesg (Srinivas Pandruvada and Benjamin Berg) - More enablement for the Intel-compatible CPUs Zhaoxin (Tony W Wang-oc) - PPIN support for Icelake (Tony Luck) * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce/therm_throt: Optimize notifications of thermal throttle x86/mce: Add Xeon Icelake to list of CPUs that support PPIN x86/mce: Lower throttling MCE messages' priority to warning x86/mce: Add Zhaoxin LMCE support x86/mce: Add Zhaoxin CMCI support x86/mce: Add Zhaoxin MCE support x86/mce/amd: Make disable_err_thresholding() static commit 63c2291f836e1279637f95c982407cb2d5f0c335 Merge: ea1f56fa16ae 811ae8ba6dca Author: Linus Torvalds Date: Mon Nov 25 17:28:35 2019 -0800 Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode updates from Borislav Petkov: "This converts the late loading method to load the microcode in parallel (vs sequentially currently). The patch remained in linux-next for the maximum amount of time so that any potential and hard to debug fallout be minimized. Now cloud folks have their milliseconds back but all the normal people should use early loading anyway :-)" * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/intel: Issue the revision updated message only on the BSP x86/microcode: Update late microcode in parallel x86/microcode/amd: Fix two -Wunused-but-set-variable warnings commit ea1f56fa16ae5f6e67f6ea03836b36c6053d33d1 Merge: 4ba380f61624 6a82e23f45fe Author: Linus Torvalds Date: Mon Nov 25 17:23:53 2019 -0800 Merge tag 's390-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Adjust PMU device drivers registration to avoid WARN_ON and few other perf improvements. - Enhance tracing in vfio-ccw. - Few stack unwinder fixes and improvements, convert get_wchan custom stack unwinding to generic api usage. - Fixes for mm helpers issues uncovered with tests validating architecture page table helpers. - Fix noexec bit handling when hardware doesn't support it. - Fix memleak and unsigned value compared with zero bugs in crypto code. Minor code simplification. - Fix crash during kdump with kasan enabled kernel. - Switch bug and alternatives from asm to asm_inline to improve inlining decisions. - Use 'depends on cc-option' for MARCH and TUNE options in Kconfig, add z13s and z14 ZR1 to TUNE descriptions. - Minor head64.S simplification. - Fix physical to logical CPU map for SMT. - Several cleanups in qdio code. - Other minor cleanups and fixes all over the code. * tag 's390-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (41 commits) s390/cpumf: Adjust registration of s390 PMU device drivers s390/smp: fix physical to logical CPU map for SMT s390/early: move access registers setup in C code s390/head64: remove unnecessary vdso_per_cpu_data setup s390/early: move control registers setup in C code s390/kasan: support memcpy_real with TRACE_IRQFLAGS s390/crypto: Fix unsigned variable compared with zero s390/pkey: use memdup_user() to simplify code s390/pkey: fix memory leak within _copy_apqns_from_user() s390/disassembler: don't hide instruction addresses s390/cpum_sf: Assign error value to err variable s390/cpum_sf: Replace function name in debug statements s390/cpum_sf: Use consistant debug print format for sampling s390/unwind: drop unnecessary code around calling ftrace_graph_ret_addr() s390: add error handling to perf_callchain_kernel s390: always inline current_stack_pointer() s390/mm: add mm_pxd_folded() checks to pxd_free() s390/mm: properly clear _PAGE_NOEXEC bit when it is not supported s390/mm: simplify page table helpers for large entries s390/mm: make pmd/pud_bad() report large entries as bad ... commit 622dc5ad8052f4f0c6b7a12787696a5caa3c6a58 Merge: adf6f8cb3f4c b615e5a1e067 Author: David S. Miller Date: Mon Nov 25 15:46:58 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2019-11-26 The following pull-request contains BPF updates for your *net-next* tree. We've added 2 non-merge commits during the last 1 day(s) which contain a total of 2 files changed, 14 insertions(+), 3 deletions(-). The main changes, 2 small fixes are: 1) Fix libbpf out of tree compilation which complained about unknown u32 type used in libbpf_find_vmlinux_btf_id() which needs to be __u32 instead, from Andrii Nakryiko. 2) Follow-up fix for the prior BPF mmap series where kbuild bot complained about missing vmalloc_user_node_flags() for no-MMU, also from Andrii Nakryiko. ==================== Signed-off-by: David S. Miller commit 0dfbb932bb67dc76646e579ec5cd21a12125a458 Author: Keith Busch Date: Sat Nov 23 01:26:44 2019 +0900 MAINTAINERS: Remove Keith from NVDIMM maintainers I no longer work in this capacity for the NVDIMM or DAX subsystems. Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20191122162644.27078-1-kbusch@kernel.org Signed-off-by: Dan Williams commit 4ba380f61624113395bebdc2f9f6da990a0738f9 Merge: e25645b181ae d8e85e144bbe Author: Linus Torvalds Date: Mon Nov 25 15:39:19 2019 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: "Apart from the arm64-specific bits (core arch and perf, new arm64 selftests), it touches the generic cow_user_page() (reviewed by Kirill) together with a macro for x86 to preserve the existing behaviour on this architecture. Summary: - On ARMv8 CPUs without hardware updates of the access flag, avoid failing cow_user_page() on PFN mappings if the pte is old. The patches introduce an arch_faults_on_old_pte() macro, defined as false on x86. When true, cow_user_page() makes the pte young before attempting __copy_from_user_inatomic(). - Covert the synchronous exception handling paths in arch/arm64/kernel/entry.S to C. - FTRACE_WITH_REGS support for arm64. - ZONE_DMA re-introduced on arm64 to support Raspberry Pi 4 - Several kselftest cases specific to arm64, together with a MAINTAINERS update for these files (moved to the ARM64 PORT entry). - Workaround for a Neoverse-N1 erratum where the CPU may fetch stale instructions under certain conditions. - Workaround for Cortex-A57 and A72 errata where the CPU may speculatively execute an AT instruction and associate a VMID with the wrong guest page tables (corrupting the TLB). - Perf updates for arm64: additional PMU topologies on HiSilicon platforms, support for CCN-512 interconnect, AXI ID filtering in the IMX8 DDR PMU, support for the CCPI2 uncore PMU in ThunderX2. - GICv3 optimisation to avoid a heavy barrier when accessing the ICC_PMR_EL1 register. - ELF HWCAP documentation updates and clean-up. - SMC calling convention conduit code clean-up. - KASLR diagnostics printed during boot - NVIDIA Carmel CPU added to the KPTI whitelist - Some arm64 mm clean-ups: use generic free_initrd_mem(), remove stale macro, simplify calculation in __create_pgd_mapping(), typos. - Kconfig clean-ups: CMDLINE_FORCE to depend on CMDLINE, choice for endinanness to help with allmodconfig" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (93 commits) arm64: Kconfig: add a choice for endianness kselftest: arm64: fix spelling mistake "contiguos" -> "contiguous" arm64: Kconfig: make CMDLINE_FORCE depend on CMDLINE MAINTAINERS: Add arm64 selftests to the ARM64 PORT entry arm64: kaslr: Check command line before looking for a seed arm64: kaslr: Announce KASLR status on boot kselftest: arm64: fake_sigreturn_misaligned_sp kselftest: arm64: fake_sigreturn_bad_size kselftest: arm64: fake_sigreturn_duplicated_fpsimd kselftest: arm64: fake_sigreturn_missing_fpsimd kselftest: arm64: fake_sigreturn_bad_size_for_magic0 kselftest: arm64: fake_sigreturn_bad_magic kselftest: arm64: add helper get_current_context kselftest: arm64: extend test_init functionalities kselftest: arm64: mangle_pstate_invalid_mode_el[123][ht] kselftest: arm64: mangle_pstate_invalid_daif_bits kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils kselftest: arm64: extend toplevel skeleton Makefile drivers/perf: hisi: update the sccl_id/ccl_id for certain HiSilicon platform arm64: mm: reserve CMA and crashkernel in ZONE_DMA32 ... commit e25645b181ae67753f9a48e11bb5b34dcf41187d Merge: db7d275415d7 ea2dd7c0875e Author: Linus Torvalds Date: Mon Nov 25 15:01:30 2019 -0800 Merge tag 'linux-kselftest-5.5-rc1-kunit' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest KUnit support gtom Shuah Khan: "This adds KUnit, a lightweight unit testing and mocking framework for the Linux kernel from Brendan Higgins. KUnit is not an end-to-end testing framework. It is currently supported on UML and sub-systems can write unit tests and run them in UML env. KUnit documentation is included in this update. In addition, this Kunit update adds 3 new kunit tests: - proc sysctl test from Iurii Zaikin - the 'list' doubly linked list test from David Gow - ext4 tests for decoding extended timestamps from Iurii Zaikin In the future KUnit will be linked to Kselftest framework to provide a way to trigger KUnit tests from user-space" * tag 'linux-kselftest-5.5-rc1-kunit' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (23 commits) lib/list-test: add a test for the 'list' doubly linked list ext4: add kunit test for decoding extended timestamps Documentation: kunit: Fix verification command kunit: Fix '--build_dir' option kunit: fix failure to build without printk MAINTAINERS: add proc sysctl KUnit test to PROC SYSCTL section kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec() MAINTAINERS: add entry for KUnit the unit testing framework Documentation: kunit: add documentation for KUnit kunit: defconfig: add defconfigs for building KUnit tests kunit: tool: add Python wrappers for running KUnit tests kunit: test: add tests for KUnit managed resources kunit: test: add the concept of assertions kunit: test: add tests for kunit test abort kunit: test: add support for test abort objtool: add kunit_try_catch_throw to the noreturn list kunit: test: add initial tests lib: enable building KUnit in lib/ kunit: test: add the concept of expectations kunit: test: add assertion printing library ... commit db7d275415d774de3d2151d6885bf61c33243419 Merge: 1c1ff4836fda ed2d8fa734e7 Author: Linus Torvalds Date: Mon Nov 25 14:58:09 2019 -0800 Merge tag 'linux-kselftest-5.5-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "This consists of several fixes to tests and framework. Masami Hiramatsu fixed several tests to build and run correctly on arm and other 32bit architectures" * tag 'linux-kselftest-5.5-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: sync: Fix cast warnings on arm selftests: net: Fix printf format warnings on arm selftests: net: Use size_t and ssize_t for counting file size selftests: vm: Build/Run 64bit tests only on 64bit arch selftests: proc: Make va_max 1MB kselftest: Fix NULL INSTALL_PATH for TARGETS runlist selftests: Move kselftest_module.sh into kselftest/ selftests: gen_kselftest_tar.sh: Do not clobber kselftest/ selftests: breakpoints: Fix a typo of function name selftests: Fix O= and KBUILD_OUTPUT handling for relative paths commit adf6f8cb3f4c2a15d5f35e6cf9ffeb6856d35312 Merge: c431047c4efe e58c19124189 Author: David S. Miller Date: Mon Nov 25 14:57:26 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Merge in networking bug fixes for merge window. Signed-off-by: David S. Miller commit acc61b8929365e63a3e8c8c8913177795aa45594 Merge: e639ea0f9155 f920d1bb9c4e Author: Dave Airlie Date: Tue Nov 26 08:40:23 2019 +1000 Merge tag 'drm-next-5.5-2019-11-22' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.5-2019-11-22: amdgpu: - Fix bad DMA on some PPC platforms - MMHUB fix for powergating - BACO fix for Navi - Misc raven fixes - Enable vbios fetch directly from rom on navi - debugfs fix for DC - SR-IOV fixes for arcturus - Misc power fixes radeon: - Fix bad DMA on some PPC platforms Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191122203025.3787-1-alexander.deucher@amd.com commit ba30e27405afa0b13b79532a345977b3e58ad501 Author: Dennis Zhou Date: Mon Nov 25 14:28:04 2019 -0800 Revert "percpu: add __percpu to SHIFT_PERCPU_PTR" This reverts commit 825dbc6ff7a3a063ea91be7d94af940080b0c991. I mistakenly applied this and only now have thought about it a little more and had time to evaluate a kbuild error for dmaengine. Once we're calling RELOC_HIDE, we're moving back into the __kernel address space and letting users interact with the actual memory address rather than in __percpu which is before adding the offsets. Signed-off-by: Dennis Zhou commit e639ea0f9155d65d5be2b800955961c7fe49f1a8 Merge: 17eee668b3ca 15b9cbb2c5e1 Author: Dave Airlie Date: Tue Nov 26 08:26:52 2019 +1000 Merge tag 'drm-intel-next-fixes-2019-11-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Reverts a patch to avoid spinning forever when context's timeline is active but has no requests Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191122155523.GA20167@jlahtine-desk.ger.corp.intel.com commit b615e5a1e067dcb327482d1af7463268b89b1629 Author: Andrii Nakryiko Date: Mon Nov 25 13:29:48 2019 -0800 libbpf: Fix usage of u32 in userspace code u32 is not defined for libbpf when compiled outside of kernel sources (e.g., in Github projection). Use __u32 instead. Fixes: b8c54ea455dc ("libbpf: Add support to attach to fentry/fexit tracing progs") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191125212948.1163343-1-andriin@fb.com commit ed81745a4c96841937f1da35c0eb66ac312e1480 Author: Andrii Nakryiko Date: Sat Nov 23 14:08:35 2019 -0800 mm: Implement no-MMU variant of vmalloc_user_node_flags To fix build with !CONFIG_MMU, implement it for no-MMU configurations as well. Fixes: fc9702273e2e ("bpf: Add mmap() support for BPF_MAP_TYPE_ARRAY") Reported-by: kbuild test robot Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Johannes Weiner Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20191123220835.1237773-1-andriin@fb.com commit 9807019a62dc670c73ce8e59e09b41ae458c34b3 Author: Anton Ivanov Date: Wed Oct 2 11:26:45 2019 +0100 um: Loadable BPF "Firmware" for vector drivers All vector drivers now allow a BPF program to be loaded and associated with the RX socket in the host kernel. 1. The program can be loaded as an extra kernel command line option to any of the vector drivers. 2. The program can also be loaded as "firmware", using the ethtool flash option. It is possible to turn this facility on or off using a command line option. A simplistic wrapper for generating the BPF firmware for the raw socket driver out of a tcpdump/libpcap filter expression can be found at: https://github.com/kot-begemot-uk/uml_vector_utilities/ Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 7d8093a56063e5d7c4459d9d025a57e0c5186ce9 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:36:54 2019 +0800 um: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Acked-by: Anton Ivanov Signed-off-by: Richard Weinberger commit bf9f80cf0ccab5f346f7d3cdc445da8fcfe6ce34 Author: Johannes Berg Date: Tue Oct 8 17:43:21 2019 +0200 um: virtio_uml: Disallow modular build This driver *can* be a module, but then its parameters (socket path) are untrusted data from inside the VM, and that isn't allowed. Allow the code to only be built-in to avoid that. Fixes: 5d38f324993f ("um: drivers: Add virtio vhost-user driver") Signed-off-by: Johannes Berg Acked-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 7e60746005573a06149cdee7acedf428906f3a59 Author: Johannes Berg Date: Tue Sep 24 09:21:17 2019 +0200 um: virtio: Keep reading on -EAGAIN When we get an interrupt from the socket getting readable, and start reading, there's a possibility for a race. This depends on the implementation of the device, but e.g. with qemu's libvhost-user, we can see: device virtio_uml --------------------------------------- write header get interrupt read header read body -> returns -EAGAIN write body The -EAGAIN return is because the socket is non-blocking, and then this leads us to abandon this message. In fact, we've already read the header, so when the get another signal/interrupt for the body, we again read it as though it's a new message header, and also abandon it for the same reason (wrong size etc.) This essentially breaks things, and if that message was one that required a response, it leads to a deadlock as the device is waiting for the response but we'll never reply. Fix this by spinning on -EAGAIN as well when we read the message body. We need to handle -EAGAIN as "no message" while reading the header, since we share an interrupt. Note that this situation is highly unlikely to occur in normal usage, since there will be very few messages and only in the startup phase. With the inband call feature this does tend to happen (eventually) though. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 04e5b1fb01834a602acaae2276b67a783a8c6159 Author: Johannes Berg Date: Wed Sep 18 21:24:13 2019 +0200 um: virtio: Remove device on disconnect If the connection drops, just remove the device, we don't try to recover from this right now. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 5c1f33e2a03c0b8710b5d910a46f1e1fb0607679 Author: Johannes Berg Date: Tue Sep 17 13:20:14 2019 +0200 um: Don't trace irqflags during shutdown In the main() code, we eventually enable signals just before exec() or exit(), in order to to not have signals pending and delivered *after* the exec(). I've observed SIGSEGV loops at this point, and the reason seems to be the irqflags tracing; this makes sense as the kernel is no longer really functional at this point. Since there's really no reason to use unblock_signals_trace() here (I had just done a global search & replace), use the plain unblock_signals() in this case to avoid going into the no longer functional kernel. Fixes: 0dafcbe128d2 ("um: Implement TRACE_IRQFLAGS_SUPPORT") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 1a26c920717a24272e15b79b1455f3e99969a3ce Author: Robin van der Gracht Date: Mon Nov 25 12:40:47 2019 -0800 Input: snvs_pwrkey - send key events for i.MX6 S, DL and Q The first generation i.MX6 processors does not send an interrupt when the power key is pressed. It sends a power down request interrupt if the key is released before a hard shutdown (5 second press). This should allow software to bring down the SoC safely. For this driver to work as a regular power key with the older SoCs, we need to send a keypress AND release when we get the power down request irq. Signed-off-by: Robin van der Gracht Link: https://lore.kernel.org/r/20191125161210.8275-1-robin@protonic.nl Signed-off-by: Dmitry Torokhov commit 976e3645923bdd2fe7893aae33fd7a21098bfb28 Merge: 8791663435e7 71c296f6d5b3 Author: Dmitry Torokhov Date: Mon Nov 25 13:26:56 2019 -0800 Merge branch 'next' into for-linus Prepare input updates for 5.5 merge window. commit b111df8447acdeb4b9220f99d5d4b28f83eb56ad Author: Arnd Bergmann Date: Mon Nov 25 21:25:46 2019 +0100 y2038: alarm: fix half-second cut-off Changing alarm_itimer accidentally broke the logic for arithmetic rounding of half seconds in the return code. Change it to a constant based on NSEC_PER_SEC, as suggested by Ben Hutchings. Fixes: bd40a175769d ("y2038: itimer: change implementation to timespec64") Reported-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit af3784689e2b2741918e69f1ce5f0ecb7933b300 Author: Arnd Bergmann Date: Thu Nov 21 15:25:04 2019 +0100 y2038: ipc: fix x32 ABI breakage The correct type on x32 is 64-bit wide, same as for the other struct members around it, so use __kernel_long_t in place of the original __kernel_time_t here, corresponding to the rest of the structure. Fixes: caf5e32d4ea7 ("y2038: ipc: remove __kernel_time_t reference from headers") Reported-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 1c1ff4836fdab94c7c15b23be57bf64c1e56a36f Merge: ea4b71bc0bb6 73f0ec02d670 Author: Linus Torvalds Date: Mon Nov 25 12:21:23 2019 -0800 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fsverity updates from Eric Biggers: "Expose the fs-verity bit through statx()" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: docs: fs-verity: mention statx() support f2fs: support STATX_ATTR_VERITY ext4: support STATX_ATTR_VERITY statx: define STATX_ATTR_VERITY docs: fs-verity: document first supported kernel version commit ea4b71bc0bb646f811e4728389485f1d0522f7ea Merge: ae36607b669e 0eee17e33226 Author: Linus Torvalds Date: Mon Nov 25 12:19:28 2019 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt updates from Eric Biggers: - Add the IV_INO_LBLK_64 encryption policy flag which modifies the encryption to be optimized for UFS inline encryption hardware. - For AES-128-CBC, use the crypto API's implementation of ESSIV (which was added in 5.4) rather than doing ESSIV manually. - A few other cleanups. * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: f2fs: add support for IV_INO_LBLK_64 encryption policies ext4: add support for IV_INO_LBLK_64 encryption policies fscrypt: add support for IV_INO_LBLK_64 policies fscrypt: avoid data race on fscrypt_mode::logged_impl_name docs: ioctl-number: document fscrypt ioctl numbers fscrypt: zeroize fscrypt_info before freeing fscrypt: remove struct fscrypt_ctx fscrypt: invoke crypto API for ESSIV handling commit ae36607b669eb28791b02097a87d3d2e1589e88f Merge: 97d0bf96a0d0 450c3d416683 Author: Linus Torvalds Date: Mon Nov 25 12:17:58 2019 -0800 Merge tag 'affs-for-5.5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull AFFS updates from David Sterba: "A minor bugfix and cleanup for AFFS" * tag 'affs-for-5.5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: affs: fix a memory leak in affs_remount affs: Replace binary semaphores with mutexes commit 97d0bf96a0d0986f466c3ff59f2ace801e33dc69 Merge: 1b88176b9c72 fa17ed069c61 Author: Linus Torvalds Date: Mon Nov 25 12:01:49 2019 -0800 Merge tag 'for-5.5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "User visible changes: - new block group profiles: RAID1 with 3- and 4- copies - RAID1 in btrfs has always 2 copies, now add support for 3 and 4 - this is an incompat feature (named RAID1C34) - recommended use of RAID1C3 is replacement of RAID6 profile on metadata, this brings a more reliable resiliency against 2 device loss/damage - support for new checksums - per-filesystem, set at mkfs time - fast hash (crc32c successor): xxhash, 64bit digest - strong hashes (both 256bit): sha256 (slower, FIPS), blake2b (faster) - the blake2b module goes via the crypto tree, btrfs.ko has a soft dependency - speed up lseek, don't take inode locks unnecessarily, this can speed up parallel SEEK_CUR/SEEK_SET/SEEK_END by 80% - send: - allow clone operations within the same file - limit maximum number of sent clone references to avoid slow backref walking - error message improvements: device scan prints process name and PID Core changes: - cleanups - remove unique workqueue helpers, used to provide a way to avoid deadlocks in the workqueue code, now done in a simpler way - remove lots of indirect function calls in compression code - extent IO tree code moved out of extent_io.c - cleanup backup superblock handling at mount time - transaction life cycle documentation and cleanups - locking code cleanups, annotations and documentation - add more cold, const, pure function attributes - removal of unused or redundant struct members or variables - new tree-checker sanity tests - try to detect missing INODE_ITEM, cross-reference checks of DIR_ITEM, DIR_INDEX, INODE_REF, and XATTR_* items - remove own bio scheduling code (used to avoid checksum submissions being stuck behind other IO), replaced by cgroup controller-based code to allow better control and avoid priority inversions in cases where the custom and cgroup scheduling disagreed Fixes: - avoid getting stuck during cyclic writebacks - fix trimming of ranges crossing block group boundaries - fix rename exchange on subvolumes, all involved subvolumes need to be recorded in the transaction" * tag 'for-5.5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (137 commits) btrfs: drop bdev argument from submit_extent_page btrfs: remove extent_map::bdev btrfs: drop bio_set_dev where not needed btrfs: get bdev directly from fs_devices in submit_extent_page btrfs: record all roots for rename exchange on a subvol Btrfs: fix block group remaining RO forever after error during device replace btrfs: scrub: Don't check free space before marking a block group RO btrfs: change btrfs_fs_devices::rotating to bool btrfs: change btrfs_fs_devices::seeding to bool btrfs: rename btrfs_block_group_cache btrfs: block-group: Reuse the item key from caller of read_one_block_group() btrfs: block-group: Refactor btrfs_read_block_groups() btrfs: document extent buffer locking btrfs: access eb::blocking_writers according to ACCESS_ONCE policies btrfs: set blocking_writers directly, no increment or decrement btrfs: merge blocking_writers branches in btrfs_tree_read_lock btrfs: drop incompat bit for raid1c34 after last block group is gone btrfs: add incompat for raid1 with 3, 4 copies btrfs: add support for 4-copy replication (raid1c4) btrfs: add support for 3-copy replication (raid1c3) ... commit 1b88176b9c72fb4edd5920969aef94c5cd358337 Merge: eeee2827ae75 589e1b6c47ce Author: Linus Torvalds Date: Mon Nov 25 11:55:30 2019 -0800 Merge tag 'mtd/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "MTD core: - drop inactive maintainers, update the repositories and add IRC channel - debugfs functions improvements - initialize more structure parameters - misc fixes reported by robots MTD devices: - spear_smi: Fixed Write Burst mode - new Intel IXP4xx flash probing hook Raw NAND core: - useless extra checks dropped - update the detection of the bad block markers position Raw NAND controller drivers: - Cadence: new driver - Brcmnand: support for flash-dma v0 + fixes - Denali: drop support for the legacy controller/chip DT representation - superfluous dev_err() calls removed SPI NOR core changes: - introduce 'struct spi_nor_controller_ops' - clean the Register Operations methods - use dev_dbg insted of dev_err for low level info - fix retlen handling in sst_write() - fix silent truncations in spi_nor_read and spi_nor_read_raw() - fix the clearing of QE bit on lock()/unlock() - rework the disabling of the block write protection - rework the Quad Enable methods - make sure nor->spimem and nor->controller_ops are mutually exclusive - set default Quad Enable method for ISSI flashes - add support for few flashes SPI NOR controller drivers changes: - intel-spi: - support chips without software sequencer - add support for Intel Cannon Lake and Intel Comet Lake-H flashes CFI core changes: - code cleanups related useless initializers and coding style issues - fix for a possible double free problem in cfi_cmdset_0002 - improved HyperFlash error reporting and handling in cfi_cmdset_0002 core" * tag 'mtd/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (73 commits) mtd: devices: fix mchp23k256 read and write mtd: no need to check return value of debugfs_create functions mtd: spi-nor: Set default Quad Enable method for ISSI flashes mtd: spi-nor: Add support for is25wp256 mtd: spi-nor: Add support for w25q256jw mtd: spi-nor: Move condition to avoid a NULL check mtd: spi-nor: Make sure nor->spimem and nor->controller_ops are mutually exclusive mtd: spi-nor: Rename Quad Enable methods mtd: spi-nor: Merge spansion Quad Enable methods mtd: spi-nor: Rename CR_QUAD_EN_SPAN to SR2_QUAD_EN_BIT1 mtd: spi-nor: Extend the SR Read Back test mtd: spi-nor: Rework the disabling of block write protection mtd: spi-nor: Fix clearing of QE bit on lock()/unlock() mtd: cfi_cmdset_0002: fix delayed error detection on HyperFlash mtd: cfi_cmdset_0002: only check errors when ready in cfi_check_err_status() mtd: cfi_cmdset_0002: don't free cfi->cfiq in error path of cfi_amdstd_setup() mtd: cfi_cmdset_*: kill useless 'ret' variable initializers mtd: cfi_util: use DIV_ROUND_UP() in cfi_udelay() mtd: spi-nor: Print debug message when the read back test fails mtd: spi-nor: Check all the bits written, not just the BP ones ... commit eeee2827ae75ca58a6965e1b6d208576a5a01920 Merge: 7e5192b93c3b f612b2132db5 Author: Linus Torvalds Date: Mon Nov 25 11:53:26 2019 -0800 Merge tag 'for-5.5/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Fix DM core to disallow stacking request-based DM on partitions. - Fix DM raid target to properly resync raidset even if bitmap needed additional pages. - Fix DM crypt performance regression due to use of WQ_HIGHPRI for the IO and crypt workqueues. - Fix DM integrity metadata layout that was aligned on 128K boundary rather than the intended 4K boundary (removes 124K of wasted space for each metadata block). - Improve the DM thin, cache and clone targets to use spin_lock_irq rather than spin_lock_irqsave where possible. - Fix DM thin single thread performance that was lost due to needless workqueue wakeups. - Fix DM zoned target performance that was lost due to excessive backing device checks. - Add ability to trigger write failure with the DM dust test target. - Fix whitespace indentation in drivers/md/Kconfig. - Various smalls fixes and cleanups (e.g. use struct_size, fix uninitialized variable, variable renames, etc). * tag 'for-5.5/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (22 commits) Revert "dm crypt: use WQ_HIGHPRI for the IO and crypt workqueues" dm: Fix Kconfig indentation dm thin: wakeup worker only when deferred bios exist dm integrity: fix excessive alignment of metadata runs dm raid: Remove unnecessary negation of a shift in raid10_format_to_md_layout dm zoned: reduce overhead of backing device checks dm dust: add limited write failure mode dm dust: change ret to r in dust_map_read and dust_map dm dust: change result vars to r dm cache: replace spin_lock_irqsave with spin_lock_irq dm bio prison: replace spin_lock_irqsave with spin_lock_irq dm thin: replace spin_lock_irqsave with spin_lock_irq dm clone: add bucket_lock_irq/bucket_unlock_irq helpers dm clone: replace spin_lock_irqsave with spin_lock_irq dm writecache: handle REQ_FUA dm writecache: fix uninitialized variable warning dm stripe: use struct_size() in kmalloc() dm raid: streamline rs_get_progress() and its raid_status() caller side dm raid: simplify rs_setup_recovery call chain dm raid: to ensure resynchronization, perform raid set grow in preresume ... commit 7e5192b93c3b8661791f65f0d477d0da234ca202 Merge: 464a47f45d2a 979c690d9a01 Author: Linus Torvalds Date: Mon Nov 25 11:37:01 2019 -0800 Merge tag 'for-5.5/disk-revalidate-20191122' of git://git.kernel.dk/linux-block Pull disk revalidation updates from Jens Axboe: "This continues the work that Jan Kara started to thoroughly cleanup and consolidate how we handle rescans and revalidations" * tag 'for-5.5/disk-revalidate-20191122' of git://git.kernel.dk/linux-block: block: move clearing bd_invalidated into check_disk_size_change block: remove (__)blkdev_reread_part as an exported API block: fix bdev_disk_changed for non-partitioned devices block: move rescan_partitions to fs/block_dev.c block: merge invalidate_partitions into rescan_partitions block: refactor rescan_partitions commit 464a47f45d2ae2db859f0e7c128b5f01aff19a53 Merge: 323264eefba1 a468168130ec Author: Linus Torvalds Date: Mon Nov 25 11:22:37 2019 -0800 Merge tag 'for-5.5/zoned-20191122' of git://git.kernel.dk/linux-block Pull zoned block device update from Jens Axboe: "Enhancements and improvements to the zoned device support" * tag 'for-5.5/zoned-20191122' of git://git.kernel.dk/linux-block: scsi: sd_zbc: Remove set but not used variable 'buflen' block: rework zone reporting scsi: sd_zbc: Cleanup sd_zbc_alloc_report_buffer() null_blk: Add zone_nr_conv to features null_blk: clean up report zones null_blk: clean up the block device operations block: Remove partition support for zoned block devices block: Simplify report zones execution block: cleanup the !zoned case in blk_revalidate_disk_zones block: Enhance blk_revalidate_disk_zones() commit 323264eefba1ea288d5962c0a9e23ebd62107ca8 Merge: 2d53943090c3 03bf73c315ed Author: Linus Torvalds Date: Mon Nov 25 11:18:03 2019 -0800 Merge tag 'for-5.5/drivers-post-20191122' of git://git.kernel.dk/linux-block Pull additional block driver updates from Jens Axboe: "Here's another block driver update, done to avoid conflicts with the zoned changes coming next. This contains: - Prepare SCSI sd for zone open/close/finish support - Small NVMe pull request - hwmon support (Akinobu) - add new co-maintainer (Christoph) - work-around for a discard issue on non-conformant drives (Eduard) - Small nbd leak fix" * tag 'for-5.5/drivers-post-20191122' of git://git.kernel.dk/linux-block: nbd: prevent memory leak nvme: hwmon: add quirk to avoid changing temperature threshold nvme: hwmon: provide temperature min and max values for each sensor nvmet: add another maintainer nvme: Discard workaround for non-conformant devices nvme: Add hardware monitoring support scsi: sd_zbc: add zone open, close, and finish support commit 2d53943090c336c9d298638bad292be349e1b9c4 Merge: ff6814b078e3 00b89892c869 Author: Linus Torvalds Date: Mon Nov 25 11:15:41 2019 -0800 Merge tag 'for-5.5/drivers-20191121' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: "Here are the main block driver updates for 5.5. Nothing major in here, mostly just fixes. This contains: - a set of bcache changes via Coly - MD changes from Song - loop unmap write-zeroes fix (Darrick) - spelling fixes (Geert) - zoned additions cleanups to null_blk/dm (Ajay) - allow null_blk online submit queue changes (Bart) - NVMe changes via Keith, nothing major here either" * tag 'for-5.5/drivers-20191121' of git://git.kernel.dk/linux-block: (56 commits) Revert "bcache: fix fifo index swapping condition in journal_pin_cmp()" drivers/md/raid5-ppl.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET bcache: don't export symbols bcache: remove the extra cflags for request.o bcache: at least try to shrink 1 node in bch_mca_scan() bcache: add idle_max_writeback_rate sysfs interface bcache: add code comments in bch_btree_leaf_dirty() bcache: fix deadlock in bcache_allocator bcache: add code comment bch_keylist_pop() and bch_keylist_pop_front() bcache: deleted code comments for dead code in bch_data_insert_keys() bcache: add more accurate error messages in read_super() bcache: fix static checker warning in bcache_device_free() bcache: fix a lost wake-up problem caused by mca_cannibalize_lock bcache: fix fifo index swapping condition in journal_pin_cmp() md/raid10: prevent access of uninitialized resync_pages offset md: avoid invalid memory access for array sb->dev_roles md/raid1: avoid soft lockup under high load null_blk: add zone open, close, and finish support dm: add zone open, close and finish support ... commit e58c1912418980f57ba2060017583067f5f71e52 Author: Jouni Hogander Date: Mon Nov 25 14:23:43 2019 +0200 slip: Fix use-after-free Read in slip_open Slip_open doesn't clean-up device which registration failed from the slip_devs device list. On next open after failure this list is iterated and freed device is accessed. Fix this by calling sl_free_netdev in error path. Here is the trace from the Syzbot: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 sl_sync drivers/net/slip/slip.c:725 [inline] slip_open+0xecd/0x11b7 drivers/net/slip/slip.c:801 tty_ldisc_open.isra.0+0xa3/0x110 drivers/tty/tty_ldisc.c:469 tty_set_ldisc+0x30e/0x6b0 drivers/tty/tty_ldisc.c:596 tiocsetd drivers/tty/tty_io.c:2334 [inline] tty_ioctl+0xe8d/0x14f0 drivers/tty/tty_io.c:2594 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 3b5a39979daf ("slip: Fix memory leak in slip_open error path") Reported-by: syzbot+4d5170758f3762109542@syzkaller.appspotmail.com Cc: David Miller Cc: Oliver Hartkopp Cc: Lukas Bulwahn Signed-off-by: Jouni Hogander Signed-off-by: David S. Miller commit ff6814b078e33a4d26fee9ea80779c81a6744cd8 Merge: 6e7b06a4c888 1e279153dfd5 Author: Linus Torvalds Date: Mon Nov 25 10:59:41 2019 -0800 Merge tag 'for-5.5/block-20191121' of git://git.kernel.dk/linux-block Pull core block updates from Jens Axboe: "Due to more granular branches, this one is small and will be followed with other core branches that add specific features. I meant to just have a core and drivers branch, but external dependencies we ended up adding a few more that are also core. The changes are: - Fixes and improvements for the zoned device support (Ajay, Damien) - sed-opal table writing and datastore UID (Revanth) - blk-cgroup (and bfq) blk-cgroup stat fixes (Tejun) - Improvements to the block stats tracking (Pavel) - Fix for overruning sysfs buffer for large number of CPUs (Ming) - Optimization for small IO (Ming, Christoph) - Fix typo in RWH lifetime hint (Eugene) - Dead code removal and documentation (Bart) - Reduction in memory usage for queue and tag set (Bart) - Kerneldoc header documentation (André) - Device/partition revalidation fixes (Jan) - Stats tracking for flush requests (Konstantin) - Various other little fixes here and there (et al)" * tag 'for-5.5/block-20191121' of git://git.kernel.dk/linux-block: (48 commits) Revert "block: split bio if the only bvec's length is > SZ_4K" block: add iostat counters for flush requests block,bfq: Skip tracing hooks if possible block: sed-opal: Introduce SUM_SET_LIST parameter and append it using 'add_token_u64' blk-cgroup: cgroup_rstat_updated() shouldn't be called on cgroup1 block: Don't disable interrupts in trigger_softirq() sbitmap: Delete sbitmap_any_bit_clear() blk-mq: Delete blk_mq_has_free_tags() and blk_mq_can_queue() block: split bio if the only bvec's length is > SZ_4K block: still try to split bio if the bvec crosses pages blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT blk-cgroup: reimplement basic IO stats using cgroup rstat blk-cgroup: remove now unused blkg_print_stat_{bytes|ios}_recursive() blk-throtl: stop using blkg->stat_bytes and ->stat_ios bfq-iosched: stop using blkg->stat_bytes and ->stat_ios bfq-iosched: relocate bfqg_*rwstat*() helpers block: add zone open, close and finish ioctl support block: add zone open, close and finish operations block: Simplify REQ_OP_ZONE_RESET_ALL handling block: Remove REQ_OP_ZONE_RESET plugging ... commit 6e7b06a4c88846c20c2cc01b370564a2423ff0d0 Merge: fb4b3d3fd0c7 44bdc2fb63aa Author: Linus Torvalds Date: Mon Nov 25 10:57:53 2019 -0800 Merge tag 'for-5.5/libata-20191121' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "Just a few fixes all over the place, support for the Annapurna SATA controller, and a patchset that cleans up the error defines and ultimately fixes anissue with sata_mv" * tag 'for-5.5/libata-20191121' of git://git.kernel.dk/linux-block: ata: pata_artop: make arrays static const, makes object smaller ata_piix: remove open-coded dmi_match(DMI_OEM_STRING) ata: sata_mv, avoid trigerrable BUG_ON ata: make qc_prep return ata_completion_errors ata: define AC_ERR_OK ata: Documentation, fix function names libata: Ensure ata_port probe has completed before detach ahci: tegra: use regulator_bulk_set_supply_names() ahci: Add support for Amazon's Annapurna Labs SATA controller commit 9bca3a0a923fc3f0fb9e41391be1d0f291e86858 Author: Oleksij Rempel Date: Mon Nov 25 12:43:51 2019 +0100 net: dsa: sja1105: fix sja1105_parse_rgmii_delays() This function was using configuration of port 0 in devicetree for all ports. In case CPU port was not 0, the delay settings was ignored. This resulted not working communication between CPU and the switch. Fixes: f5b8631c293b ("net: dsa: sja1105: Error out if RGMII delays are requested in DT") Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1d7ea55668878bb350979c377fc72509dd6f5b21 Author: Menglong Dong Date: Mon Nov 25 16:58:09 2019 +0800 macvlan: schedule bc_work even if error While enqueueing a broadcast skb to port->bc_queue, schedule_work() is called to add port->bc_work, which processes the skbs in bc_queue, to "events" work queue. If port->bc_queue is full, the skb will be discarded and schedule_work(&port->bc_work) won't be called. However, if port->bc_queue is full and port->bc_work is not running or pending, port->bc_queue will keep full and schedule_work() won't be called any more, and all broadcast skbs to macvlan will be discarded. This case can happen: macvlan_process_broadcast() is the pending function of port->bc_work, it moves all the skbs in port->bc_queue to the queue "list", and processes the skbs in "list". During this, new skbs will keep being added to port->bc_queue in macvlan_broadcast_enqueue(), and port->bc_queue may already full when macvlan_process_broadcast() return. This may happen, especially when there are a lot of real-time threads and the process is preempted. Fix this by calling schedule_work(&port->bc_work) even if port->bc_work is full in macvlan_broadcast_enqueue(). Fixes: 412ca1550cbe ("macvlan: Move broadcasts into a work queue") Signed-off-by: Menglong Dong Signed-off-by: David S. Miller commit c431047c4efe7903fb1c5a23e0f3f8eb1efc89f9 Author: Po Liu Date: Mon Nov 25 05:56:56 2019 +0000 enetc: add support Credit Based Shaper(CBS) for hardware offload The ENETC hardware support the Credit Based Shaper(CBS) which part of the IEEE-802.1Qav. The CBS driver was loaded by the sch_cbs interface when set in the QOS in the kernel. Here is an example command to set 20Mbits bandwidth in 1Gbits port for taffic class 7: tc qdisc add dev eth0 root handle 1: mqprio \ num_tc 8 map 0 1 2 3 4 5 6 7 hw 1 tc qdisc replace dev eth0 parent 1:8 cbs \ locredit -1470 hicredit 30 \ sendslope -980000 idleslope 20000 offload 1 Signed-off-by: Po Liu Reviewed-by: Claudiu Manoil Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit bec170e55982c2d3b8e1beccadf16e288fe6fb5a Author: Heiner Kallweit Date: Sat Nov 23 17:28:37 2019 +0100 net: phy: add helpers phy_(un)lock_mdio_bus Add helpers to make locking/unlocking the MDIO bus easier. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 32085f25d7b68404055f3525c780142fc72e543f Author: David Bauer Date: Fri Nov 22 22:44:51 2019 +0100 mdio_bus: don't use managed reset-controller Geert Uytterhoeven reported that using devm_reset_controller_get leads to a WARNING when probing a reset-controlled PHY. This is because the device devm_reset_controller_get gets supplied is not actually the one being probed. Acquire an unmanaged reset-control as well as free the reset_control on unregister to fix this. Reported-by: Geert Uytterhoeven CC: Andrew Lunn Signed-off-by: David Bauer Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit fb4b3d3fd0c7f53168b6f6d07d1d97f55c676eeb Merge: 54f0e54011c9 eac406c61cd0 Author: Linus Torvalds Date: Mon Nov 25 10:40:27 2019 -0800 Merge tag 'for-5.5/io_uring-20191121' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: "A lot of stuff has been going on this cycle, with improving the support for networked IO (and hence unbounded request completion times) being one of the major themes. There's been a set of fixes done this week, I'll send those out as well once we're certain we're fully happy with them. This contains: - Unification of the "normal" submit path and the SQPOLL path (Pavel) - Support for sparse (and bigger) file sets, and updating of those file sets without needing to unregister/register again. - Independently sized CQ ring, instead of just making it always 2x the SQ ring size. This makes it more flexible for networked applications. - Support for overflowed CQ ring, never dropping events but providing backpressure on submits. - Add support for absolute timeouts, not just relative ones. - Support for generic cancellations. This divorces io_uring from workqueues as well, which additionally gets us one step closer to generic async system call support. - With cancellations, we can support grabbing the process file table as well, just like we do mm context. This allows support for system calls that create file descriptors, like accept4() support that's built on top of that. - Support for io_uring tracing (Dmitrii) - Support for linked timeouts. These abort an operation if it isn't completed by the time noted in the linke timeout. - Speedup tracking of poll requests - Various cleanups making the coder easier to follow (Jackie, Pavel, Bob, YueHaibing, me) - Update MAINTAINERS with new io_uring list" * tag 'for-5.5/io_uring-20191121' of git://git.kernel.dk/linux-block: (64 commits) io_uring: make POLL_ADD/POLL_REMOVE scale better io-wq: remove now redundant struct io_wq_nulls_list io_uring: Fix getting file for non-fd opcodes io_uring: introduce req_need_defer() io_uring: clean up io_uring_cancel_files() io-wq: ensure free/busy list browsing see all items io-wq: ensure we have a stable view of ->cur_work for cancellations io_wq: add get/put_work handlers to io_wq_create() io_uring: check for validity of ->rings in teardown io_uring: fix potential deadlock in io_poll_wake() io_uring: use correct "is IO worker" helper io_uring: fix -ENOENT issue with linked timer with short timeout io_uring: don't do flush cancel under inflight_lock io_uring: flag SQPOLL busy condition to userspace io_uring: make ASYNC_CANCEL work with poll and timeout io_uring: provide fallback request for OOM situations io_uring: convert accept4() -ERESTARTSYS into -EINTR io_uring: fix error clear of ->file_table in io_sqe_files_register() io_uring: separate the io_free_req and io_free_req_find_next interface io_uring: keep io_put_req only responsible for release and put req ... commit 54f0e54011c9e83277e84ec2f60696285066dfa9 Merge: 0be0ee71816b 0b40dbcbba92 Author: Linus Torvalds Date: Mon Nov 25 10:29:42 2019 -0800 Merge tag 'tpmdd-next-20191112' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpmd updates from Jarkko Sakkinen: - support for Cr50 fTPM - support for fTPM on AMD Zen+ CPUs - TPM 2.0 trusted keys code relocated from drivers/char/tpm to security/keys * tag 'tpmdd-next-20191112' of git://git.infradead.org/users/jjs/linux-tpmdd: KEYS: trusted: Remove set but not used variable 'keyhndl' tpm: Switch to platform_get_irq_optional() tpm_crb: fix fTPM on AMD Zen+ CPUs KEYS: trusted: Move TPM2 trusted keys code KEYS: trusted: Create trusted keys subsystem KEYS: Use common tpm_buf for trusted and asymmetric keys tpm: Move tpm_buf code to include/linux/ tpm: use GFP_KERNEL instead of GFP_HIGHMEM for tpm_buf tpm: add check after commands attribs tab allocation tpm: tpm_tis_spi: Drop THIS_MODULE usage from driver struct tpm: tpm_tis_spi: Cleanup includes tpm: tpm_tis_spi: Support cr50 devices tpm: tpm_tis_spi: Introduce a flow control callback tpm: Add a flag to indicate TPM power is managed by firmware dt-bindings: tpm: document properties for cr50 tpm_tis: override durations for STM tpm with firmware 1.2.8.28 tpm: provide a way to override the chip returned durations tpm: Remove duplicate code from caps_show() in tpm-sysfs.c commit 0be0ee71816b2b6725e2b4f32ad6726c9d729777 Author: Linus Torvalds Date: Mon Nov 11 15:51:03 2019 -0800 vfs: properly and reliably lock f_pos in fdget_pos() fdget_pos() is used by file operations that will read and update f_pos: things like "read()", "write()" and "lseek()" (but not, for example, "pread()/pwrite" that get their file positions elsewhere). However, it had two separate escape clauses for this, because not everybody wants or needs serialization of the file position. The first and most obvious case is the "file descriptor doesn't have a position at all", ie a stream-like file. Except we didn't actually use FMODE_STREAM, but instead used FMODE_ATOMIC_POS. The reason for that was that FMODE_STREAM didn't exist back in the days, but also that we didn't want to mark all the special cases, so we only marked the ones that _required_ position atomicity according to POSIX - regular files and directories. The case one was intentionally lazy, but now that we _do_ have FMODE_STREAM we could and should just use it. With the change to use FMODE_STREAM, there are no remaining uses for FMODE_ATOMIC_POS, and all the code to set it is deleted. Any cases where we don't want the serialization because the driver (or subsystem) doesn't use the file position should just be updated to do "stream_open()". We've done that for all the obvious and common situations, we may need a few more. Quoting Kirill Smelkov in the original FMODE_STREAM thread (see link below for full email): "And I appreciate if people could help at least somehow with "getting rid of mixed case entirely" (i.e. always lock f_pos_lock on !FMODE_STREAM), because this transition starts to diverge from my particular use-case too far. To me it makes sense to do that transition as follows: - convert nonseekable_open -> stream_open via stream_open.cocci; - audit other nonseekable_open calls and convert left users that truly don't depend on position to stream_open; - extend stream_open.cocci to analyze alloc_file_pseudo as well (this will cover pipes and sockets), or maybe convert pipes and sockets to FMODE_STREAM manually; - extend stream_open.cocci to analyze file_operations that use no_llseek or noop_llseek, but do not use nonseekable_open or alloc_file_pseudo. This might find files that have stream semantic but are opened differently; - extend stream_open.cocci to analyze file_operations whose .read/.write do not use ppos at all (independently of how file was opened); - ... - after that remove FMODE_ATOMIC_POS and always take f_pos_lock if !FMODE_STREAM; - gather bug reports for deadlocked read/write and convert missed cases to FMODE_STREAM, probably extending stream_open.cocci along the road to catch similar cases i.e. always take f_pos_lock unless a file is explicitly marked as being stream, and try to find and cover all files that are streams" We have not done the "extend stream_open.cocci to analyze alloc_file_pseudo" as well, but the previous commit did manually handle the case of pipes and sockets. The other case where we can avoid locking f_pos is the "this file descriptor only has a single user and it is us, and thus there is no need to lock it". The second test was correct, although a bit subtle and worth just re-iterating here. There are two kinds of other sources of references to the same file descriptor: file descriptors that have been explicitly shared across fork() or with dup(), and file tables having elevated reference counts due to threading (or explicit file sharing with clone()). The first case would have incremented the file count explicitly, and in the second case the previous __fdget() would have incremented it for us and set the FDPUT_FPUT flag. But in both cases the file count would be greater than one, so the "file_count(file) > 1" test catches both situations. Also note that if file_count is 1, that also means that no other thread can have access to the file table, so there also cannot be races with concurrent calls to dup()/fork()/clone() that would increment the file count any other way. Link: https://lore.kernel.org/linux-fsdevel/20190413184404.GA13490@deco.navytux.spb.ru Cc: Kirill Smelkov Cc: Eic Dumazet Cc: Al Viro Cc: Alan Stern Cc: Marco Elver Cc: Andrea Parri Cc: Paul McKenney Signed-off-by: Linus Torvalds commit 803e74be04b32f7785742dcabfc62116718fbb06 Author: Jaegeuk Kim Date: Fri Nov 22 12:02:06 2019 -0800 f2fs: stop GC when the victim becomes fully valid We must stop GC, once the segment becomes fully valid. Otherwise, it can produce another dirty segments by moving valid blocks in the segment partially. Ramon hit no free segment panic sometimes and saw this case happens when validating reliable file pinning feature. Signed-off-by: Ramon Pantin Signed-off-by: Jaegeuk Kim commit a4db59ac9058207cea77df7d7893aab5c3009f87 Author: Jaegeuk Kim Date: Fri Nov 22 11:53:10 2019 -0800 f2fs: expose main_blkaddr in sysfs Expose in /sys/fs/f2fs//main_blkaddr the block address where the main area starts. This allows user mode programs to determine: - That pinned files that are made exclusively of fully allocated 2MB segments will never be unpinned by the file system. - Where the main area starts. This is required by programs that want to verify if a file is made exclusively of 2MB f2fs segments, the alignment boundary for segments starts at this address. Testing for 2MB alignment relative to the start of the device is incorrect, because for some filesystems main_blkaddr is not at a 2MB boundary relative to the start of the device. The entry will be used when validating reliable pinning file feature proposed by "f2fs: support aligned pinned file". Signed-off-by: Ramon Pantin Signed-off-by: Jaegeuk Kim commit 909110c060f22e65756659ec6fa957ae75777e00 Author: Chengguang Xu Date: Mon Nov 25 11:20:36 2019 +0800 f2fs: choose hardlimit when softlimit is larger than hardlimit in f2fs_statfs_project() Setting softlimit larger than hardlimit seems meaningless for disk quota but currently it is allowed. In this case, there may be a bit of comfusion for users when they run df comamnd to directory which has project quota. For example, we set 20M softlimit and 10M hardlimit of block usage limit for project quota of test_dir(project id 123). [root@hades f2fs]# repquota -P -a *** Report for project quotas on device /dev/nvme0n1p8 Block grace time: 7days; Inode grace time: 7days Block limits File limits Project used soft hard grace used soft hard grace ---------------------------------------------------------------------- 0 -- 4 0 0 1 0 0 123 +- 10248 20480 10240 2 0 0 The result of df command as below: [root@hades f2fs]# df -h /mnt/f2fs/test Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p8 20M 11M 10M 51% /mnt/f2fs Even though it looks like there is another 10M free space to use, if we write new data to diretory test(inherit project id), the write will fail with errno(-EDQUOT). After this patch, the df result looks like below. [root@hades f2fs]# df -h /mnt/f2fs/test Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p8 10M 10M 0 100% /mnt/f2fs Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 39a1a8941b27c37f79508426e27a2ec29829d66c Author: Andre Przywara Date: Tue Nov 19 12:03:31 2019 +0000 arm64: dts: juno: Fix UART frequency Older versions of the Juno *SoC* TRM [1] recommended that the UART clock source should be 7.2738 MHz, whereas the *system* TRM [2] stated a more correct value of 7.3728 MHz. Somehow the wrong value managed to end up in our DT. Doing a prime factorisation, a modulo divide by 115200 and trying to buy a 7.2738 MHz crystal at your favourite electronics dealer suggest that the old value was actually a typo. The actual UART clock is driven by a PLL, configured via a parameter in some board.txt file in the firmware, which reads 7.37 MHz (sic!). Fix this to correct the baud rate divisor calculation on the Juno board. [1] http://infocenter.arm.com/help/topic/com.arm.doc.ddi0515b.b/DDI0515B_b_juno_arm_development_platform_soc_trm.pdf [2] http://infocenter.arm.com/help/topic/com.arm.doc.100113_0000_07_en/arm_versatile_express_juno_development_platform_(v2m_juno)_technical_reference_manual_100113_0000_07_en.pdf Fixes: 71f867ec130e ("arm64: Add Juno board device tree.") Signed-off-by: Andre Przywara Acked-by: Liviu Dudau Signed-off-by: Sudeep Holla commit d8e464ecc17b4444e9a3e148a9748c4828c6328c Author: Linus Torvalds Date: Sun Nov 17 11:20:48 2019 -0800 vfs: mark pipes and sockets as stream-like file descriptors In commit 3975b097e577 ("convert stream-like files -> stream_open, even if they use noop_llseek") Kirill used a coccinelle script to change "nonseekable_open()" to "stream_open()", which changed the trivial cases of stream-like file descriptors to the new model with FMODE_STREAM. However, the two big cases - sockets and pipes - don't actually have that trivial pattern at all, and were thus never converted to FMODE_STREAM even though it makes lots of sense to do so. That's particularly true when looking forward to the next change: getting rid of FMODE_ATOMIC_POS entirely, and just using FMODE_STREAM to decide whether f_pos updates are needed or not. And if they are, we'll always do them atomically. This came up because KCSAN (correctly) noted that the non-locked f_pos updates are data races: they are clearly benign for the case where we don't care, but it would be good to just not have that issue exist at all. Note that the reason we used FMODE_ATOMIC_POS originally is that only doing it for the minimal required case is "safer" in that it's possible that the f_pos locking can cause unnecessary serialization across the whole write() call. And in the worst case, that kind of serialization can cause deadlock issues: think writers that need readers to empty the state using the same file descriptor. [ Note that the locking is per-file descriptor - because it protects "f_pos", which is obviously per-file descriptor - so it only affects cases where you literally use the same file descriptor to both read and write. So a regular pipe that has separate reading and writing file descriptors doesn't really have this situation even though it's the obvious case of "reader empties what a bit writer concurrently fills" But we want to make pipes as being stream-line anyway, because we don't want the unnecessary overhead of locking, and because a named pipe can be (ab-)used by reading and writing to the same file descriptor. ] There are likely a lot of other cases that might want FMODE_STREAM, and looking for ".llseek = no_llseek" users and other cases that don't have an lseek file operation at all and making them use "stream_open()" might be a good idea. But pipes and sockets are likely to be the two main cases. Cc: Kirill Smelkov Cc: Eic Dumazet Cc: Al Viro Cc: Alan Stern Cc: Marco Elver Cc: Andrea Parri Cc: Paul McKenney Signed-off-by: Linus Torvalds commit e3d023b8952b78b82b1f9c6d7b708680a99ea831 Author: Keith Busch Date: Sat Nov 23 01:25:01 2019 +0900 MAINTAINERS: Remove Keith from VMD maintainer I no longer work in this capacity on the VMD driver. Signed-off-by: Keith Busch Signed-off-by: Lorenzo Pieralisi Acked-by: Jon Derrick commit 1b00ff61597e7b5758372ded5134f673dddc1831 Author: Krzysztof Kozlowski Date: Thu Nov 21 04:19:23 2019 +0100 i2c: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Acked-by: Peter Rosin Signed-off-by: Wolfram Sang commit dca0dd28fa5e0a1ec41a623dbaf667601fc62331 Author: Corey Minyard Date: Thu Nov 21 10:10:51 2019 +0100 i2c: smbus: Don't filter out duplicate alerts Getting the same alert twice in a row is legal and normal, especially on a fast device (like running in qemu). Kind of like interrupts. So don't report duplicate alerts, and deliver them normally. [JD: Fixed subject] Signed-off-by: Corey Minyard Signed-off-by: Jean Delvare Reviewed-by: Benjamin Tissoires Signed-off-by: Wolfram Sang commit 1656a07a89a82a80d8e9fdf0e37821c2584d88d3 Author: Steve French Date: Sun Oct 13 21:19:54 2019 -0500 cifs: update internal module version number To 2.24 Signed-off-by: Steve French commit ff6b6f3f916097cea49805d71eb94644a234b8a6 Author: Paulo Alcantara (SUSE) Date: Fri Nov 22 12:30:57 2019 -0300 cifs: Always update signing key of first channel Update signing key of first channel whenever generating the master sigining/encryption/decryption keys rather than only in cifs_mount(). This also fixes reconnect when re-establishing smb sessions to other servers. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 40363cf13999ee4fb3b5c1e67fa5e6f0e9da34bd Author: Qian Cai Date: Thu Nov 14 12:17:41 2019 -0500 writeback: fix -Wformat compilation warnings The commit f05499a06fb4 ("writeback: use ino_t for inodes in tracepoints") introduced a lot of GCC compilation warnings on s390, In file included from ./include/trace/define_trace.h:102, from ./include/trace/events/writeback.h:904, from fs/fs-writeback.c:82: ./include/trace/events/writeback.h: In function 'trace_raw_output_writeback_page_template': ./include/trace/events/writeback.h:76:12: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'ino_t' {aka 'unsigned int'} [-Wformat=] TP_printk("bdi %s: ino=%lu index=%lu", ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/trace/trace_events.h:360:22: note: in definition of macro 'DECLARE_EVENT_CLASS' trace_seq_printf(s, print); \ ^~~~~ ./include/trace/events/writeback.h:76:2: note: in expansion of macro 'TP_printk' TP_printk("bdi %s: ino=%lu index=%lu", ^~~~~~~~~ Fix them by adding necessary casts where ino_t could be either "unsigned int" or "unsigned long". Fixes: f05499a06fb4 ("writeback: use ino_t for inodes in tracepoints") Signed-off-by: Qian Cai Signed-off-by: Tejun Heo commit bf2aa5cadd1c7bb91af4b5b1218e643cfffb5c9a Author: Jens Verwiebe Date: Sun Nov 24 13:35:44 2019 +0100 ALSA: usb-audio: Fix Focusrite Scarlett 6i6 gen1 - input handling The Scarlett 6i6 has no padding on rear inputs 3/4 but a gainstage. This patch introduces this functionality as to be seen in the mac or windows scarlett control. The correct address could already be found in the dump info, but was never used. Without this patch inputs 3/4 are quite unusable else. Signed-off-by: Jens Verwiebe Link: https://lore.kernel.org/r/384d65cd-5e87-91eb-9fc3-e57226f534c6@jensverwiebe.de Signed-off-by: Takashi Iwai commit 22abcd7569618271cc3609da24bbc0e7541248a4 Merge: 51e46c7a4007 0bfa52a43ec0 Author: Jonathan Corbet Date: Mon Nov 25 08:43:28 2019 -0700 Merge branch 'maintainer-profile' into docs-next Patch series from Dan Williams: At last years Plumbers Conference I proposed the Maintainer Entry Profile as a document that a maintainer can provide to set contributor expectations and provide fodder for a discussion between maintainers about the merits of different maintainer policies. For those that did not attend, the goal of the Maintainer Entry Profile is to provide contributors documentation of patch submission considerations that may vary by subsystem. The session introduction was: The first rule of kernel maintenance is that there are no hard and fast rules. That state of affairs is both a blessing and a curse. It has served the community well to be adaptable to the different people and different problem spaces that inhabit the kernel community. However, that variability also leads to inconsistent experiences for contributors, little to no guidance for new contributors, and unnecessary stress on current maintainers. To be clear, the proposed document does not impose or suggest new rules. Instead it provides an outlet to document the existing unwritten policies in effect for a given subsystem. Over time the hope is that some of this variability can be up-levelled to new global process policy, but in the meantime it provides relief for communicating the guidelines that are being imposed on contributors. [jc: resolved merge conflicts with the MAINTAINERS file, added a patch to fix up various RST issues, and added a TOC section for the profiles.] commit 0bfa52a43ec085c2f5eb2c35fcc6cf73bb802eae Author: Jonathan Corbet Date: Mon Nov 25 08:42:12 2019 -0700 docs: fix up the maintainer profile document Add blank lines where needed to get the document to render properly. Also add a TOC of existing profiles just so that the nvdimm profile is linked into the toctree, is discoverable, and doesn't generate a warning. Signed-off-by: Jonathan Corbet commit 3e5c3c41ae925458150273e2f74ffbf999530c5f Author: Tony Lindgren Date: Sun Nov 24 09:43:16 2019 -0800 ARM: dts: Fix sgx sysconfig register for omap4 Looks like we've had the sgx sysconfig register and revision register always wrong for omap4, including the old platform data. Let's fix the offsets to what the TRM says. Otherwise the sgx module may never idle depending on the state of the real sysconfig register. Fixes: d23a163ebe5a ("ARM: dts: Add nodes for missing omap4 interconnect target modules") Cc: H. Nikolaus Schaller Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren commit 5bb30a4dd60e2a10a4de9932daff23e503f1dd2b Author: Paulo Alcantara (SUSE) Date: Fri Nov 22 12:30:56 2019 -0300 cifs: Fix retrieval of DFS referrals in cifs_mount() Make sure that DFS referrals are sent to newly resolved root targets as in a multi tier DFS setup. Signed-off-by: Paulo Alcantara (SUSE) Link: https://lkml.kernel.org/r/05aa2995-e85e-0ff4-d003-5bb08bd17a22@canonical.com Cc: stable@vger.kernel.org Tested-by: Matthew Ruffell Signed-off-by: Steve French commit 47843401e3a0f4f668927b77e713c876bb423d4f Author: Dan Williams Date: Sun Nov 24 12:59:58 2019 -0800 libnvdimm, MAINTAINERS: Maintainer Entry Profile Document the basic policies of the libnvdimm subsystem and provide a first example of a Maintainer Entry Profile for others to duplicate and edit. Cc: Vishal Verma Cc: Dave Jiang Signed-off-by: Dan Williams Link: https://lore.kernel.org/r/157462919825.1729495.5877405723948988416.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Jonathan Corbet commit 4699c504e603e2b4e6217a81839d06c26cb2dad7 Author: Dan Williams Date: Sun Nov 24 12:59:53 2019 -0800 Maintainer Handbook: Maintainer Entry Profile As presented at the 2018 Linux Plumbers conference [1], the Maintainer Entry Profile (formerly Subsystem Profile) is proposed as a way to reduce friction between committers and maintainers and encourage conversations amongst maintainers about common best practices. While coding-style, submit-checklist, and submitting-drivers lay out some common expectations there remain local customs and maintainer preferences that vary by subsystem. The profile contains documentation of some of the common policy questions a contributor might have that are local to the subsystem / device-driver, special considerations for the subsystem, or other guidelines that are otherwise not covered by the top-level process documents. The initial and hopefully non-controversial headings in the profile are: Overview: General introduction to how the subsystem operates Submit Checklist Addendum: Mechanical items that gate submission staging, or other requirements that gate patch acceptance. Key Cycle Dates: - Last -rc for new feature submissions: Expected lead time for submissions - Last -rc to merge features: Deadline for merge decisions Resubmit Cadence: When and preferred method to follow up with the maintainer Note that coding style guidelines are explicitly left out of this list. See Documentation/maintainer/maintainer-entry-profile.rst for more details, and a follow-on example profile for the libnvdimm subsystem. [1]: https://linuxplumbersconf.org/event/2/contributions/59/ Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Mauro Carvalho Chehab Cc: Steve French Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Tobin C. Harding Cc: Olof Johansson Cc: Martin K. Petersen Cc: Daniel Vetter Cc: Joe Perches Cc: Dmitry Vyukov Cc: Alexandre Belloni Cc: Paul Walmsley Signed-off-by: Dan Williams Link: https://lore.kernel.org/r/157462919309.1729495.10585699280061787229.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Jonathan Corbet commit 1ca84ed6425f55aac68e3600122d04cd23c86d38 Author: Dan Williams Date: Sun Nov 24 12:59:48 2019 -0800 MAINTAINERS: Reclaim the P: tag for Maintainer Entry Profile Fixup some P: entries to be M: and delete the others that do not include an email address. The P: tag will be used to indicate the location of a Profile for a given MAINTAINERS entry. Cc: Joe Perches Signed-off-by: Dan Williams Link: https://lore.kernel.org/r/157462918794.1729495.10838545318307341653.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Jonathan Corbet commit 84a1f5b1cc6fd7f6cd99fc5630c36f631b19fa60 Author: Paulo Alcantara (SUSE) Date: Fri Nov 22 12:30:53 2019 -0300 cifs: Fix potential softlockups while refreshing DFS cache We used to skip reconnects on all SMB2_IOCTL commands due to SMB3+ FSCTL_VALIDATE_NEGOTIATE_INFO - which made sense since we're still establishing a SMB session. However, when refresh_cache_worker() calls smb2_get_dfs_refer() and we're under reconnect, SMB2_ioctl() will not be able to get a proper status error (e.g. -EHOSTDOWN in case we failed to reconnect) but an -EAGAIN from cifs_send_recv() thus looping forever in refresh_cache_worker(). Fixes: e99c63e4d86d ("SMB3: Fix deadlock in validate negotiate hits reconnect") Signed-off-by: Paulo Alcantara (SUSE) Suggested-by: Aurelien Aptel Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit df3df923b31d298c3d3653a0380202b9f2df9864 Author: Paulo Alcantara (SUSE) Date: Fri Nov 22 12:30:52 2019 -0300 cifs: Fix lookup of root ses in DFS referral cache We don't care about module aliasing validation in cifs_compose_mount_options(..., is_smb3) when finding the root SMB session of an DFS namespace in order to refresh DFS referral cache. The following issue has been observed when mounting with '-t smb3' and then specifying 'vers=2.0': ... Nov 08 15:27:08 tw kernel: address conversion returned 0 for FS0.WIN.LOCAL Nov 08 15:27:08 tw kernel: [kworke] ==> dns_query((null),FS0.WIN.LOCAL,13,(null)) Nov 08 15:27:08 tw kernel: [kworke] call request_key(,FS0.WIN.LOCAL,) Nov 08 15:27:08 tw kernel: [kworke] ==> dns_resolver_cmp(FS0.WIN.LOCAL,FS0.WIN.LOCAL) Nov 08 15:27:08 tw kernel: [kworke] <== dns_resolver_cmp() = 1 Nov 08 15:27:08 tw kernel: [kworke] <== dns_query() = 13 Nov 08 15:27:08 tw kernel: fs/cifs/dns_resolve.c: dns_resolve_server_name_to_ip: resolved: FS0.WIN.LOCAL to 192.168.30.26 ===> Nov 08 15:27:08 tw kernel: CIFS VFS: vers=2.0 not permitted when mounting with smb3 Nov 08 15:27:08 tw kernel: fs/cifs/dfs_cache.c: CIFS VFS: leaving refresh_tcon (xid = 26) rc = -22 ... Fixes: 5072010ccf05 ("cifs: Fix DFS cache refresher for DFS links") Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 8354d88efdab72b4da32fc4f032448fcef22dab4 Author: Paulo Alcantara (SUSE) Date: Fri Nov 22 12:30:51 2019 -0300 cifs: Fix use-after-free bug in cifs_reconnect() Ensure we grab an active reference in cifs superblock while doing failover to prevent automounts (DFS links) of expiring and then destroying the superblock pointer. This patch fixes the following KASAN report: [ 464.301462] BUG: KASAN: use-after-free in cifs_reconnect+0x6ab/0x1350 [ 464.303052] Read of size 8 at addr ffff888155e580d0 by task cifsd/1107 [ 464.304682] CPU: 3 PID: 1107 Comm: cifsd Not tainted 5.4.0-rc4+ #13 [ 464.305552] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58-rebuilt.opensuse.org 04/01/2014 [ 464.307146] Call Trace: [ 464.307875] dump_stack+0x5b/0x90 [ 464.308631] print_address_description.constprop.0+0x16/0x200 [ 464.309478] ? cifs_reconnect+0x6ab/0x1350 [ 464.310253] ? cifs_reconnect+0x6ab/0x1350 [ 464.311040] __kasan_report.cold+0x1a/0x41 [ 464.311811] ? cifs_reconnect+0x6ab/0x1350 [ 464.312563] kasan_report+0xe/0x20 [ 464.313300] cifs_reconnect+0x6ab/0x1350 [ 464.314062] ? extract_hostname.part.0+0x90/0x90 [ 464.314829] ? printk+0xad/0xde [ 464.315525] ? _raw_spin_lock+0x7c/0xd0 [ 464.316252] ? _raw_read_lock_irq+0x40/0x40 [ 464.316961] ? ___ratelimit+0xed/0x182 [ 464.317655] cifs_readv_from_socket+0x289/0x3b0 [ 464.318386] cifs_read_from_socket+0x98/0xd0 [ 464.319078] ? cifs_readv_from_socket+0x3b0/0x3b0 [ 464.319782] ? try_to_wake_up+0x43c/0xa90 [ 464.320463] ? cifs_small_buf_get+0x4b/0x60 [ 464.321173] ? allocate_buffers+0x98/0x1a0 [ 464.321856] cifs_demultiplex_thread+0x218/0x14a0 [ 464.322558] ? cifs_handle_standard+0x270/0x270 [ 464.323237] ? __switch_to_asm+0x40/0x70 [ 464.323893] ? __switch_to_asm+0x34/0x70 [ 464.324554] ? __switch_to_asm+0x40/0x70 [ 464.325226] ? __switch_to_asm+0x40/0x70 [ 464.325863] ? __switch_to_asm+0x34/0x70 [ 464.326505] ? __switch_to_asm+0x40/0x70 [ 464.327161] ? __switch_to_asm+0x34/0x70 [ 464.327784] ? finish_task_switch+0xa1/0x330 [ 464.328414] ? __switch_to+0x363/0x640 [ 464.329044] ? __schedule+0x575/0xaf0 [ 464.329655] ? _raw_spin_lock_irqsave+0x82/0xe0 [ 464.330301] kthread+0x1a3/0x1f0 [ 464.330884] ? cifs_handle_standard+0x270/0x270 [ 464.331624] ? kthread_create_on_node+0xd0/0xd0 [ 464.332347] ret_from_fork+0x35/0x40 [ 464.333577] Allocated by task 1110: [ 464.334381] save_stack+0x1b/0x80 [ 464.335123] __kasan_kmalloc.constprop.0+0xc2/0xd0 [ 464.335848] cifs_smb3_do_mount+0xd4/0xb00 [ 464.336619] legacy_get_tree+0x6b/0xa0 [ 464.337235] vfs_get_tree+0x41/0x110 [ 464.337975] fc_mount+0xa/0x40 [ 464.338557] vfs_kern_mount.part.0+0x6c/0x80 [ 464.339227] cifs_dfs_d_automount+0x336/0xd29 [ 464.339846] follow_managed+0x1b1/0x450 [ 464.340449] lookup_fast+0x231/0x4a0 [ 464.341039] path_openat+0x240/0x1fd0 [ 464.341634] do_filp_open+0x126/0x1c0 [ 464.342277] do_sys_open+0x1eb/0x2c0 [ 464.342957] do_syscall_64+0x5e/0x190 [ 464.343555] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 464.344772] Freed by task 0: [ 464.345347] save_stack+0x1b/0x80 [ 464.345966] __kasan_slab_free+0x12c/0x170 [ 464.346576] kfree+0xa6/0x270 [ 464.347211] rcu_core+0x39c/0xc80 [ 464.347800] __do_softirq+0x10d/0x3da [ 464.348919] The buggy address belongs to the object at ffff888155e58000 which belongs to the cache kmalloc-256 of size 256 [ 464.350222] The buggy address is located 208 bytes inside of 256-byte region [ffff888155e58000, ffff888155e58100) [ 464.351575] The buggy address belongs to the page: [ 464.352333] page:ffffea0005579600 refcount:1 mapcount:0 mapping:ffff88815a803400 index:0x0 compound_mapcount: 0 [ 464.353583] flags: 0x200000000010200(slab|head) [ 464.354209] raw: 0200000000010200 ffffea0005576200 0000000400000004 ffff88815a803400 [ 464.355353] raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 [ 464.356458] page dumped because: kasan: bad access detected [ 464.367005] Memory state around the buggy address: [ 464.367787] ffff888155e57f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 464.368877] ffff888155e58000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 464.369967] >ffff888155e58080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 464.371111] ^ [ 464.371775] ffff888155e58100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 464.372893] ffff888155e58180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 464.373983] ================================================================== Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 790591f41ede7b6fcfea8753dfb4030752dbfbec Author: Andy Shevchenko Date: Wed Nov 20 17:19:32 2019 +0200 i2c: i801: Correct Intel Jasper Lake SOC naming There is no suffix applied to Intel Jasper Lake SOC. Remove it from the comments and definitions. Besides that, it's a SOC, thus replace PCH with SOC where it appropriate. Fixes: e0c61c04791a ("i2c: i801: Add support for Intel Jasper Lake") Cc: Jarkko Nikula Signed-off-by: Andy Shevchenko Reviewed-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 7787657d7ee55a9ecf4aea4907b46b87a44eda67 Author: Alain Volmat Date: Tue Nov 12 09:19:44 2019 +0100 i2c: i2c-stm32f7: fix 10-bits check in slave free id search loop Fix a typo in the free slave id search loop. Instead of I2C_CLIENT_PEC, it should have been I2C_CLIENT_TEN. The slave id 1 can only handle 7-bit addresses and thus is not eligible in case of 10-bit addresses. As a matter of fact none of the slave id support I2C_CLIENT_PEC, overall check is performed at the beginning of the stm32f7_i2c_reg_slave function. Fixes: 60d609f30de2 ("i2c: i2c-stm32f7: Add slave support") Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 436e25505f3458cc92c7f3c985e9cbc198a98209 Author: Jian-Hong Pan Date: Mon Nov 25 17:34:06 2019 +0800 ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC Laptops like ASUS UX431FLC and UX431FL can share the same audio quirks. But UX431FLC needs one more step to enable the internal speaker: Pull the GPIO from CODEC to initialize the AMP. Fixes: 60083f9e94b2 ("ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL") Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20191125093405.5702-1-jian-hong@endlessm.com Signed-off-by: Takashi Iwai commit 83bae01182ea755280adc1c3a24032d63a614ede Merge: cf25e24db61c 7b8474466ed9 Author: Ingo Molnar Date: Mon Nov 25 15:43:15 2019 +0100 Merge branch 'timers/urgent' into timers/core, to pick up fix Signed-off-by: Ingo Molnar commit 311770173fac27845a3a83e2c16100a54d308f72 Author: Chris Wilson Date: Mon Nov 25 10:58:58 2019 +0000 drm/i915/gt: Schedule request retirement when timeline idles The major drawback of commit 7e34f4e4aad3 ("drm/i915/gen8+: Add RC6 CTX corruption WA") is that it disables RC6 while Skylake (and friends) is active, and we do not consider the GPU idle until all outstanding requests have been retired and the engine switched over to the kernel context. If userspace is idle, this task falls onto our background idle worker, which only runs roughly once a second, meaning that userspace has to have been idle for a couple of seconds before we enable RC6 again. Naturally, this causes us to consume considerably more energy than before as powersaving is effectively disabled while a display server (here's looking at you Xorg) is running. As execlists will get a completion event as each context is completed, we can use this interrupt to queue a retire worker bound to this engine to cleanup idle timelines. We will then immediately notice the idle engine (without userspace intervention or the aid of the background retire worker) and start parking the GPU. Thus during light workloads, we will do much more work to idle the GPU faster... Hopefully with commensurate power saving! v2: Watch context completions and only look at those local to the engine when retiring to reduce the amount of excess work we perform. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112315 References: 7e34f4e4aad3 ("drm/i915/gen8+: Add RC6 CTX corruption WA") References: 2248a28384fe ("drm/i915/gen8+: Add RC6 CTX corruption WA") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-3-chris@chris-wilson.co.uk (cherry picked from commit 4f88f8747fa43c97c3b3712d8d87295ea757cc51) Signed-off-by: Joonas Lahtinen commit a09c2860ae4fcf4d7e25202661f3eb868547cddb Author: Chris Wilson Date: Mon Nov 25 10:58:57 2019 +0000 drm/i915/gt: Adapt engine_park synchronisation rules for engine_retire In the next patch, we will introduce a new asynchronous retirement worker, fed by execlists CS events. Here we may queue a retirement as soon as a request is submitted to HW (and completes instantly), and we also want to process that retirement as early as possible and cannot afford to postpone (as there may not be another opportunity to retire it for a few seconds). To allow the new async retirer to run in parallel with our submission, pull the __i915_request_queue (that passes the request to HW) inside the timelines spinlock so that the retirement cannot release the timeline before we have completed the submission. v2: Actually to play nicely with engine_retire, we have to raise the timeline.active_lock before releasing the HW. intel_gt_retire_requsts() is still serialised by the outer lock so they cannot see this intermediate state, and engine_retire is serialised by HW submission. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-2-chris@chris-wilson.co.uk (cherry picked from commit 88a4655e75ac8f55eea5e3f38b176cba9cf653b5) Signed-off-by: Joonas Lahtinen commit 4ec5cc78c1b06f8d30b5c682acccf17fb5191cf2 Author: Chris Wilson Date: Mon Nov 25 11:25:20 2019 +0000 drm/i915/execlists: Fixup cancel_port_requests() I rushed a last minute correction to cancel_port_requests() to prevent the snooping of *execlists->active as the inflight array was being updated, without noticing we iterated the inflight array starting from active! Oops. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112387 Fixes: 97f9af78f38d ("drm/i915/gt: Mark the execlists->active as the primary volatile access") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191125112520.1760492-1-chris@chris-wilson.co.uk (cherry picked from commit da0ef77e1e0ccff703efee82406c629d5c4f4bbb) [Joonas: Fixed Fixes: tag to match drm-intel-next-fixes] Signed-off-by: Joonas Lahtinen commit 97f9af78f38d43cd058cfd40220647be67aca9f7 Author: Chris Wilson Date: Mon Nov 25 09:43:18 2019 +0000 drm/i915/gt: Mark the execlists->active as the primary volatile access Since we want to do a lockless read of the current active request, and that request is written to by process_csb also without serialisation, we need to instruct gcc to take care in reading the pointer itself. Otherwise, we have observed execlists_active() to report 0x40. [ 2400.760381] igt/para-4098 1..s. 2376479300us : process_csb: rcs0 cs-irq head=3, tail=4 [ 2400.760826] igt/para-4098 1..s. 2376479303us : process_csb: rcs0 csb[4]: status=0x00000001:0x00000000 [ 2400.761271] igt/para-4098 1..s. 2376479306us : trace_ports: rcs0: promote { b9c59:2622, b9c55:2624 } [ 2400.761726] igt/para-4097 0d... 2376479311us : __i915_schedule: rcs0: -2147483648->3, inflight:0000000000000040, rq:ffff888208c1e940 which is impossible! The answer is that as we keep the existing execlists->active pointing into the array as we copy over that array, the unserialised read may see a partial pointer value. Fixes: df403069029d ("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191125094318.1630806-1-chris@chris-wilson.co.uk (cherry picked from commit 331bf90591573dfe6c8e892239713ef9702f1396) Signed-off-by: Joonas Lahtinen commit f295e4cece5cb4c60715fed539abcd62468f9ef1 Author: Yixian Liu Date: Mon Nov 18 10:34:53 2019 +0800 RDMA/hns: Delete unnecessary callback functions for cq Currently, when cq event occurred, we first call our own callback functions in the event process function, then call ib callback functions. Actually, we can directly call ib callback functions. Link: https://lore.kernel.org/r/1574044493-46984-5-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 707783ab5f48f054f8da3114ddcdf1685a313a63 Author: Yixian Liu Date: Mon Nov 18 10:34:52 2019 +0800 RDMA/hns: Rename the functions used inside creating cq Current names of functions are not proper, such as hns_roce_free_cq, actually it means free cqc, thus we rename them. Furthermore, functions used inside one file can be named without the prefix hns_roce_ which will make the functions for verbs symbols more eye-catching. Link: https://lore.kernel.org/r/1574044493-46984-4-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 18a96d25ce84a365fbe9ddcb887ade80eb3a6017 Author: Yixian Liu Date: Mon Nov 18 10:34:51 2019 +0800 RDMA/hns: Redefine the member of hns_roce_cq struct There is no need to package buf and mtt into hns_roce_cq_buf, which will make code more complex, just delete this struct and move buf and mtt into hns_roce_cq. Furthermore, we add size member for hns_roce_buf to avoid repeatly calculating where needed it. Link: https://lore.kernel.org/r/1574044493-46984-3-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit e2b2744a06d35ba44f32c86e0579d986931187b3 Author: Yixian Liu Date: Mon Nov 18 10:34:50 2019 +0800 RDMA/hns: Redefine interfaces used in creating cq Some interfaces defined with unnecessary input parameters, such as "nent" and "vector". This patch redefined these interfaces to make the code more readable and simple. Link: https://lore.kernel.org/r/1574044493-46984-2-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 666e8ff535d401eb286fa20446e55ae984d91049 Author: Daniel Kranzdorf Date: Thu Nov 21 16:15:09 2019 +0200 RDMA/efa: Expose RDMA read related attributes Query the device attributes for RDMA operations, including maximum transfer size and maximum number of SGEs per RDMA WR, and report them back to the userspace library. Link: https://lore.kernel.org/r/20191121141509.59297-4-galpress@amazon.com Signed-off-by: Daniel Kranzdorf Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit e6c4f3ff434c8b336662a2053d48ce677c9fd608 Author: Daniel Kranzdorf Date: Thu Nov 21 16:15:08 2019 +0200 RDMA/efa: Support remote read access in MR registration Enable remote read access for memory regions in order to support RDMA operations. Link: https://lore.kernel.org/r/20191121141509.59297-3-galpress@amazon.com Signed-off-by: Daniel Kranzdorf Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit bcf7cc534cd40f8098850274e8459fb0d088fcda Author: Gal Pressman Date: Thu Nov 21 16:15:07 2019 +0200 RDMA/efa: Store network attributes in device attributes There's no reason to separate the network attributes from all other device attributes. Embed the fields inside the device attributes and query them all in one function. Link: https://lore.kernel.org/r/20191121141509.59297-2-galpress@amazon.com Reviewed-by: Daniel Kranzdorf Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 25d24f4241f7bccdc1978daa026d8847e04a73a6 Author: Colin Ian King Date: Fri Nov 22 15:48:14 2019 +0000 IB/hfi1: 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. Link: https://lore.kernel.org/r/20191122154814.87257-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit fca5b9dc0986aa49b3f0a7cfe24b6c82422ac1d7 Author: Devesh Sharma Date: Thu Nov 21 01:22:23 2019 -0500 RDMA/bnxt_re: Fix missing le16_to_cpu From sparse: drivers/infiniband/hw/bnxt_re/main.c:1274:18: warning: cast from restricted __le16 drivers/infiniband/hw/bnxt_re/main.c:1275:18: warning: cast from restricted __le16 drivers/infiniband/hw/bnxt_re/main.c:1276:18: warning: cast from restricted __le16 drivers/infiniband/hw/bnxt_re/main.c:1277:21: warning: restricted __le16 degrades to integer Fixes: 2b827ea1926b ("RDMA/bnxt_re: Query HWRM Interface version from FW") Link: https://lore.kernel.org/r/1574317343-23300-4-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 98998ffe5216c7fa2c0225bb5b049ca5cdf8d195 Author: Devesh Sharma Date: Thu Nov 21 01:22:22 2019 -0500 RDMA/bnxt_re: Fix stat push into dma buffer on gen p5 devices Due to recent advances in the firmware for Broadcom's gen p5 series of adaptors the driver code to report hardware counters has been broken w.r.t. roce devices. The new firmware command expects dma length to be specified during stat dma buffer allocation. Fixes: 2792b5b95ed5 ("bnxt_en: Update firmware interface spec. to 1.10.0.89.") Link: https://lore.kernel.org/r/1574317343-23300-3-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit e284b159c6881c8bec9713daba2653268f4c4948 Author: Luke Starrett Date: Thu Nov 21 01:22:21 2019 -0500 RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series In the first version of Gen P5 ASIC, chip-id was always set to 0x1750 for all adaptor port configurations. This has been fixed in the new chip rev. Due to this missing fix users are not able to use adaptors based on latest chip rev of Broadcom's Gen P5 adaptors. Fixes: ae8637e13185 ("RDMA/bnxt_re: Add chip context to identify 57500 series") Link: https://lore.kernel.org/r/1574317343-23300-2-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Naresh Kumar PBS Signed-off-by: Selvin Xavier Signed-off-by: Luke Starrett Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 6e419e35e68ad7327a383cd52053071b8eb9843b Author: Krzysztof Kozlowski Date: Wed Nov 20 21:41:38 2019 +0800 RDMA/bnxt_re: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Link: https://lore.kernel.org/r/20191120134138.15245-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jason Gunthorpe commit 3694e41e41517994664518ece6265f0bc04a840d Merge: a25984f3baaa 9c0015ef0928 Author: Jason Gunthorpe Date: Fri Nov 22 16:08:34 2019 -0400 Merge branch 'ib-guids' into rdma.git for-next Danit Goldberg says: ==================== This series extends RTNETLINK to provide IB port and node GUIDs, which were configured for Infiniband VFs. The functionality to set VF GUIDs already existed for a long time, and here we are adding the missing "get" so that netlink will be symmetric and various cloud orchestration tools will be able to manage such VFs more naturally. The iproute2 was extended too to present those GUIDs. - ip link show For example: - ip link set ib4 vf 0 node_guid 22:44:33:00:33:11:00:33 - ip link set ib4 vf 0 port_guid 10:21:33:12:00:11:22:10 - ip link show ib4 ib4: mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 22:44:33:00:33:11:00:33, PORT_GUID 10:21:33:12:00:11:22:10, link-state disable, trust off, query_rss off ==================== Based on the mlx5-next branch from git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux for dependencies * branch 'ib-guids': (35 commits) IB/mlx5: Implement callbacks for getting VFs GUID attributes IB/ipoib: Add ndo operation for getting VFs GUID attributes IB/core: Add interfaces to get VF node and port GUIDs net/core: Add support for getting VF GUIDs net/mlx5: Add new chain for netfilter flow table offload net/mlx5: Refactor creating fast path prio chains net/mlx5: Accumulate levels for chains prio namespaces net/mlx5: Define fdb tc levels per prio net/mlx5: Rename FDB_* tc related defines to FDB_TC_* defines net/mlx5: Simplify fdb chain and prio eswitch defines IB/mlx5: Load profile according to RoCE enablement state IB/mlx5: Rename profile and init methods net/mlx5: Handle "enable_roce" devlink param net/mlx5: Document flow_steering_mode devlink param devlink: Add new "enable_roce" generic device param net/mlx5: fix spelling mistake "metdata" -> "metadata" net/mlx5: fix kvfree of uninitialized pointer spec IB/mlx5: Introduce and use mlx5_core_is_vf() net/mlx5: E-switch, Enable metadata on own vport net/mlx5: Refactor ingress acl configuration ... Signed-off-by: Jason Gunthorpe commit 9c7315c9fca5de203538163cf42699bb10328902 Author: Jarkko Nikula Date: Mon Nov 25 14:51:59 2019 +0200 spi: pxa2xx: Add support for Intel Jasper Lake LPSS SPI on Intel Jasper Lake is compatible with Intel Ice Lake which follows Intel Cannon Lake. Add PCI IDs of Jasper Lake. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20191125125159.15404-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown commit bc094709de0192a756c6946a7c89c543243ae609 Author: Shuming Fan Date: Mon Nov 25 17:19:40 2019 +0800 ASoC: rt5682: fix i2c arbitration lost issue This patch modified the HW initial setting to fix i2c arbitration lost issue. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191125091940.11953-1-shumingf@realtek.com Signed-off-by: Mark Brown commit bf201f5eda23eb57f7217d20ea3e18da8cbcf52b Author: Chris Wilson Date: Wed Nov 20 16:55:14 2019 +0000 drm/i915/gt: Unlock engine-pm after queuing the kernel context switch In commit a79ca656b648 ("drm/i915: Push the wakeref->count deferral to the backend"), I erroneously concluded that we last modify the engine inside __i915_request_commit() meaning that we could enable concurrent submission for userspace as we enqueued this request. However, this falls into a trap with other users of the engine->kernel_context waking up and submitting their request before the idle-switch is queued, with the result that the kernel_context is executed out-of-sequence most likely upsetting the GPU and certainly ourselves when we try to retire the out-of-sequence requests. As such we need to hold onto the effective engine->kernel_context mutex lock (via the engine pm mutex proxy) until we have finish queuing the request to the engine. v2: Serialise against concurrent intel_gt_retire_requests() v3: Describe the hairy locking scheme with intel_gt_retire_requests() for future reference. v4: Combine timeline->lock and engine pm release; it's hairy. Fixes: a79ca656b648 ("drm/i915: Push the wakeref->count deferral to the backend") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191120165514.3955081-2-chris@chris-wilson.co.uk (cherry picked from commit 5cba288466e9b229feb68295675246e7522fb5eb) Signed-off-by: Joonas Lahtinen commit ca1711d1991f968d1e88725a2e607e57ecd5c5f1 Author: Chris Wilson Date: Wed Nov 20 16:55:13 2019 +0000 drm/i915/gt: Close race between engine_park and intel_gt_retire_requests The general concept was that intel_timeline.active_count was locked by the intel_timeline.mutex. The exception was for power management, where the engine->kernel_context->timeline could be manipulated under the global wakeref.mutex. This was quite solid, as we always manipulated the timeline only while we held an engine wakeref. And then we started retiring requests outside of struct_mutex, only using the timelines.active_list and the timeline->mutex. There we started manipulating intel_timeline.active_count outside of an engine wakeref, and so introduced a race between __engine_park() and intel_gt_retire_requests(), a race that could result in the engine->kernel_context not being added to the active timelines and so losing requests, which caused us to keep the system permanently powered up [and unloadable]. The race would be easy to close if we could take the engine wakeref for the timeline before we retire -- except timelines are not bound to any engine and so we would need to keep all active engines awake. The alternative is to guard intel_timeline_enter/intel_timeline_exit for use outside of the timeline->mutex. Fixes: e5dadff4b093 ("drm/i915: Protect request retirement with timeline->mutex") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191120165514.3955081-1-chris@chris-wilson.co.uk (cherry picked from commit a6edbca74b305adc165e67065d7ee766006e6a48) Signed-off-by: Joonas Lahtinen commit ee33baa83109612d9a31fc2c2a7b74967767b358 Author: Chris Wilson Date: Wed Nov 20 12:54:33 2019 +0000 drm/i915: Mark up the calling context for intel_wakeref_put() Previously, we assumed we could use mutex_trylock() within an atomic context, falling back to a worker if contended. However, such trickery is illegal inside interrupt context, and so we need to always use a worker under such circumstances. As we normally are in process context, we can typically use a plain mutex, and only defer to a work when we know we are being called from an interrupt path. Fixes: 51fbd8de87dc ("drm/i915/pmu: Atomically acquire the gt_pm wakeref") References: a0855d24fc22d ("locking/mutex: Complain upon mutex API misuse in IRQ contexts") References: https://bugs.freedesktop.org/show_bug.cgi?id=111626 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191120125433.3767149-1-chris@chris-wilson.co.uk (cherry picked from commit 07779a76ee1f93f930cf697b22be73d16e14f50c) Signed-off-by: Joonas Lahtinen commit f83d7e3f5189eb78e481cd02da93e4e32a253493 Author: Chris Wilson Date: Mon Nov 18 23:02:46 2019 +0000 drm/i915: Wait until the intel_wakeref idle callback is complete When waiting for idle, serialise with any ongoing callback so that it will have completed before completing the wait. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191118230254.2615942-12-chris@chris-wilson.co.uk (cherry picked from commit f4ba0707c825d60f1d0f5ce7bd3d875e68f3e204) Signed-off-by: Joonas Lahtinen commit 732f9ca4a737aea3983ad86007e88e7fffe8cd6a Author: Chris Wilson Date: Wed Nov 20 18:22:09 2019 +0000 drm/i915/gt: Fixup config ifdeffery for pm_suspend_target_state pm_suspend_target_state is declared under CONFIG_PM_SLEEP but only defined under CONFIG_SUSPEND. Play safe and only use the symbol if it is both declared and defined. Reported-by: kbuild-all@lists.01.org Signed-off-by: Chris Wilson Fixes: a70a9e998e8e ("drm/i915: Defer rc6 shutdown to suspend_late") Cc: Andi Shyti Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191120182209.3967833-1-chris@chris-wilson.co.uk Signed-off-by: Joonas Lahtinen commit 09578eacaaa44149738267083ccc050990409f86 Merge: c6b6fc206586 8c4d2a0bfbd2 Author: Takashi Iwai Date: Mon Nov 25 14:27:33 2019 +0100 Merge tag 'asoc-v5.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: More updates for v5.5 Some more development work for v5.5. Highlights include: - More cleanups from Morimoto-san. - Trigger word detection for RT5677. Signed-off-by: Takashi Iwai commit 03a2a606066cf8af7a090669848e4e84351ded06 Author: Tvrtko Ursulin Date: Fri Nov 22 10:41:15 2019 +0000 drm/i915/query: Align flavour of engine data lookup Commit 750e76b4f9f6 ("drm/i915/gt: Move the [class][inst] lookup for engines onto the GT") changed the engine query to iterate over uabi engines but left the buffer size calculation look at the physical engine count. Difference has no practical consequence but it is nicer to align both queries. Signed-off-by: Tvrtko Ursulin Fixes: 750e76b4f9f6 ("drm/i915/gt: Move the [class][inst] lookup for engines onto the GT") Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191122104115.29610-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit 9acc99d8f278e3da398e927774431bd3e947ab2e) Signed-off-by: Joonas Lahtinen commit 198dfe671fdfdb79755aa131c191a4cb10a2a8b7 Author: Matt Roper Date: Mon Nov 18 10:02:19 2019 -0800 drm/i915/tgl: Add DKL PHY vswing table for HDMI The bspec initially provided a single DKL PHY vswing table for both HDMI and DP, but was recently updated to include an independent table for HDMI. Bspec: 49292 Fixes: 978c3e539be2 ("drm/i915/tgl: Add dkl phy programming sequences") Cc: Clinton A Taylor Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191118180219.9309-1-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza (cherry picked from commit 362bfb995b78394aefe61f7cc0511ef7c50bb11e) Signed-off-by: Joonas Lahtinen commit d74a7566bef76b44416071fbb7e34f301eac8d98 Author: Matt Roper Date: Mon Nov 18 08:44:12 2019 -0800 drm/i915/ehl: Update voltage level checks The bspec was recently updated with new cdclk -> voltage level tables to accommodate the new 324/326.4 cdclk values. Bspec: 21809 Fixes: 63c9dae71dc5 ("drm/i915/ehl: Add voltage level requirement table") Cc: José Roberto de Souza Cc: Vivek Kasireddy Cc: Bob Paauwe Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191118164412.26216-1-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza (cherry picked from commit d147483884ed08ee6bb618ef610ee0329a27fda7) Signed-off-by: Joonas Lahtinen commit 0e672adc87e5ae1758b6e0571b42d743a8324327 Merge: d891433b8d55 ecd25094c5f5 Author: Petr Mladek Date: Mon Nov 25 13:53:49 2019 +0100 Merge branch 'for-5.5/system-state' into for-linus commit d891433b8d554731e1d54c4ed04045479e1cff37 Merge: e9f37e090058 29d968e13007 Author: Petr Mladek Date: Mon Nov 25 13:53:15 2019 +0100 Merge branch 'for-5.5/selftests' into for-linus commit de881a341c4143650fa50ce95cf450a5c94faa9f Merge: 8392853e964c d61ca3c25e03 Author: Ingo Molnar Date: Mon Nov 25 13:48:11 2019 +0100 Merge branch 'sched/rt' into sched/core, to pick up commit Signed-off-by: Ingo Molnar commit 831362fc317ae60413879deacdcc9617d9ce9e20 Author: Masahiro Yamada Date: Sun Nov 24 01:04:44 2019 +0900 scripts/kallsyms: remove redundant initializers These are set to zero without the explicit initializers. Signed-off-by: Masahiro Yamada commit d44270fc976b6c3b9e742e398580e4af8c69f7bd Author: Masahiro Yamada Date: Sun Nov 24 01:04:43 2019 +0900 scripts/kallsyms: put check_symbol_range() calls close together Put the relevant code close together. Signed-off-by: Masahiro Yamada commit b6233d0ded3391a33bb0047edafe15169131eadb Author: Masahiro Yamada Date: Sun Nov 24 01:04:42 2019 +0900 scripts/kallsyms: make check_symbol_range() void function There is no more reason to check the return value of check_symbol_range(). Signed-off-by: Masahiro Yamada commit 887df76de67f5a6dd423e5763c22ff07f0e50048 Author: Masahiro Yamada Date: Sun Nov 24 01:04:41 2019 +0900 scripts/kallsyms: move ignored symbol types to is_ignored_symbol() Collect the ignored patterns to is_ignored_symbol(). Signed-off-by: Masahiro Yamada commit 97261e1e2240f627e27e93f7e410be1a7c97c80a Author: Masahiro Yamada Date: Sun Nov 24 01:04:40 2019 +0900 scripts/kallsyms: move more patterns to the ignored_prefixes array Refactoring for shortening the code. Signed-off-by: Masahiro Yamada commit a41333e06acd1b37f3a3248fb90cd417218f9439 Author: Masahiro Yamada Date: Sun Nov 24 01:04:39 2019 +0900 scripts/kallsyms: skip ignored symbols very early Unless the address range matters, symbols can be ignored earlier, which avoids unneeded memory allocation. Signed-off-by: Masahiro Yamada commit 4bfe2b7816a6e97fba7b4125166b33db4b31d29d Author: Masahiro Yamada Date: Sun Nov 24 01:04:38 2019 +0900 scripts/kallsyms: add const qualifiers where possible Add 'const' where a function does not write to the pointer dereferenes. Signed-off-by: Masahiro Yamada commit 2558c138aca75e5fc435e20fd37f0b0eea61bb65 Author: Masahiro Yamada Date: Sun Nov 24 01:04:37 2019 +0900 scripts/kallsyms: make find_token() return (unsigned char *) The callers of this function expect (unsigned char *). I do not see a good reason to make this function return (void *). Signed-off-by: Masahiro Yamada commit aa915245005bdb45ccbc96964853b4a27646390f Author: Masahiro Yamada Date: Sun Nov 24 01:04:36 2019 +0900 scripts/kallsyms: replace prefix_underscores_count() with strspn() You can do equivalent things with strspn(). I do not see noticeable performance difference. Signed-off-by: Masahiro Yamada commit 29e55ad3d5f50eca6f8762749da85d6fa1250061 Author: Masahiro Yamada Date: Sun Nov 24 01:04:35 2019 +0900 scripts/kallsyms: add sym_name() to mitigate cast ugliness sym_entry::sym is (unsigned char *) instead of (char *) because kallsyms exploits the MSB for compression, and the characters are used as the index of token_profit array. However, it requires casting (unsigned char *) to (char *) in some places since standard library functions such as strcmp(), strlen() expect (char *). Introduce a new helper, sym_name(), which advances the given pointer by 1 and casts it to (char *). Signed-off-by: Masahiro Yamada commit c5e5002f3603e01f50d8d61878a4ca8ffca7bd15 Author: Masahiro Yamada Date: Sun Nov 24 01:04:34 2019 +0900 scripts/kallsyms: remove unneeded length check for prefix matching l <= strlen(sym_name) is unnecessary for prefix matching. strncmp() will do. Signed-off-by: Masahiro Yamada commit e0109042cc4ee12b3689e29c872c1436e0424c69 Author: Masahiro Yamada Date: Sun Nov 24 01:04:33 2019 +0900 scripts/kallsyms: remove redundant is_arm_mapping_symbol() Since commit 6f00df24ee39 ("[PATCH] Strip local symbols from kallsyms"), all symbols starting '$' are ignored. is_arm_mapping_symbol() particularly ignores $a, $t, etc. but it is redundant. Signed-off-by: Masahiro Yamada commit f34ea0291029781810ca4c213713dc6b4a686322 Author: Masahiro Yamada Date: Sun Nov 24 01:04:32 2019 +0900 scripts/kallsyms: set relative_base more effectively Currently, record_relative_base() iterates over the entire table to find the minimum address, but it is not efficient because we sort the table anyway. After sort_symbol(), the table is sorted by address. (kallsyms parses the 'nm -n' output, so the data is already sorted by address, but this commit does not rely on it.) Move record_relative_base() after sort_symbols(), and take the first non-absolute symbol value. Signed-off-by: Masahiro Yamada commit 5e5c4fa787453292d3deefd59129384d391b7f45 Author: Masahiro Yamada Date: Sun Nov 24 01:04:31 2019 +0900 scripts/kallsyms: shrink table before sorting it Currently, build_initial_tok_table() trims unused symbols, but it is called after sort_symbols(). It is not efficient to sort the huge table that contains unused entries. Shrink the table before sorting it. Signed-off-by: Masahiro Yamada commit 21915eca088dc271c970e8351290e83d938114ac Author: Masahiro Yamada Date: Sun Nov 24 01:04:30 2019 +0900 scripts/kallsyms: fix definitely-lost memory leak build_initial_tok_table() overwrites unused sym_entry to shrink the table size. Before the entry is overwritten, table[i].sym must be freed since it is malloc'ed data. This fixes the 'definitely lost' report from valgrind. I ran valgrind against x86_64_defconfig of v5.4-rc8 kernel, and here is the summary: [Before the fix] LEAK SUMMARY: definitely lost: 53,184 bytes in 2,874 blocks [After the fix] LEAK SUMMARY: definitely lost: 0 bytes in 0 blocks Signed-off-by: Masahiro Yamada commit 1ef26b7c948128dc9240939da06690bfd90f4607 Author: Masahiro Yamada Date: Sun Nov 24 01:04:29 2019 +0900 scripts/kallsyms: remove unneeded #ifndef ARRAY_SIZE This is not defined in the standard headers. #ifndef is unneeded. Signed-off-by: Masahiro Yamada commit f3e4f3fc8ee9729c4b1b27a478c68b713df53c0c Author: Hans de Goede Date: Fri Nov 22 19:56:41 2019 +0100 platform/x86: hp-wmi: Fix ACPI errors caused by passing 0 as input size The AML code implementing the WMI methods creates a variable length field to hold the input data we pass like this: CreateDWordField (Arg1, 0x0C, DSZI) Local5 = DSZI /* \HWMC.DSZI */ CreateField (Arg1, 0x80, (Local5 * 0x08), DAIN) If we pass 0 as bios_args.datasize argument then (Local5 * 0x08) is 0 which results in these errors: [ 71.973305] ACPI BIOS Error (bug): Attempt to CreateField of length zero (20190816/dsopcode-133) [ 71.973332] ACPI Error: Aborting method \HWMC due to previous error (AE_AML_OPERAND_VALUE) (20190816/psparse-529) [ 71.973413] ACPI Error: Aborting method \_SB.WMID.WMAA due to previous error (AE_AML_OPERAND_VALUE) (20190816/psparse-529) And in our HPWMI_WIRELESS2_QUERY calls always failing. for read commands like HPWMI_WIRELESS2_QUERY the DSZI value is not used / checked, except for read commands where extra input is needed to specify exactly what to read. So for HPWMI_WIRELESS2_QUERY we can safely pass the size of the expected output as insize to hp_wmi_perform_query(), as we are already doing for all other HPWMI_READ commands we send. Doing so fixes these errors. Cc: stable@vger.kernel.org BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197007 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201981 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703 Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 16245db1489cd9aa579506f64afeeeb13d825a93 Author: Hans de Goede Date: Fri Nov 22 19:56:40 2019 +0100 platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer The HP WMI calls may take up to 128 bytes of data as input, and the AML methods implementing the WMI calls, declare a couple of fields for accessing input in different sizes, specifycally the HWMC method contains: CreateField (Arg1, 0x80, 0x0400, D128) Even though we do not use any of the WMI command-types which need a buffer of this size, the APCI interpreter still tries to create it as it is declared in generoc code at the top of the HWMC method which runs before the code looks at which command-type is requested. This results in many of these errors on many different HP laptop models: [ 14.459261] ACPI Error: Field [D128] at 1152 exceeds Buffer [NULL] size 160 (bits) (20170303/dsopcode-236) [ 14.459268] ACPI Error: Method parse/execution failed [\HWMC] (Node ffff8edcc61507f8), AE_AML_BUFFER_LIMIT (20170303/psparse-543) [ 14.459279] ACPI Error: Method parse/execution failed [\_SB.WMID.WMAA] (Node ffff8edcc61523c0), AE_AML_BUFFER_LIMIT (20170303/psparse-543) This commit increases the size of the data element of the bios_args struct to 128 bytes fixing these errors. Cc: stable@vger.kernel.org BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197007 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201981 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703 Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 8dcd71b45df34d9b903450fab147ee8c1e6c16b5 Author: Nathan Chancellor Date: Mon Nov 18 21:57:12 2019 -0700 powerpc/prom_init: Use -ffreestanding to avoid a reference to bcmp LLVM revision r374662 gives LLVM the ability to convert certain loops into a reference to bcmp as an optimization; this breaks prom_init_check.sh: CALL arch/powerpc/kernel/prom_init_check.sh Error: External symbol 'bcmp' referenced from prom_init.c make[2]: *** [arch/powerpc/kernel/Makefile:196: prom_init_check] Error 1 bcmp is defined in lib/string.c as a wrapper for memcmp so this could be added to the whitelist. However, commit 450e7dd4001f ("powerpc/prom_init: don't use string functions from lib/") copied memcmp as prom_memcmp to avoid KASAN instrumentation so having bcmp be resolved to regular memcmp would break that assumption. Furthermore, because the compiler is the one that inserted bcmp, we cannot provide something like prom_bcmp. To prevent LLVM from being clever with optimizations like this, use -ffreestanding to tell LLVM we are not hosted so it is not free to make transformations like this. Reviewed-by: Nick Desaulneris Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191119045712.39633-4-natechancellor@gmail.com commit c9029ef9c95765e7b63c4d9aa780674447db1ec0 Author: Nathan Chancellor Date: Mon Nov 18 21:57:11 2019 -0700 powerpc: Avoid clang warnings around setjmp and longjmp Commit aea447141c7e ("powerpc: Disable -Wbuiltin-requires-header when setjmp is used") disabled -Wbuiltin-requires-header because of a warning about the setjmp and longjmp declarations. r367387 in clang added another diagnostic around this, complaining that there is no jmp_buf declaration. In file included from ../arch/powerpc/xmon/xmon.c:47: ../arch/powerpc/include/asm/setjmp.h:10:13: error: declaration of built-in function 'setjmp' requires the declaration of the 'jmp_buf' type, commonly provided in the header . [-Werror,-Wincomplete-setjmp-declaration] extern long setjmp(long *); ^ ../arch/powerpc/include/asm/setjmp.h:11:13: error: declaration of built-in function 'longjmp' requires the declaration of the 'jmp_buf' type, commonly provided in the header . [-Werror,-Wincomplete-setjmp-declaration] extern void longjmp(long *, long); ^ 2 errors generated. We are not using the standard library's longjmp/setjmp implementations for obvious reasons; make this clear to clang by using -ffreestanding on these files. Cc: stable@vger.kernel.org # 4.14+ Suggested-by: Segher Boessenkool Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191119045712.39633-3-natechancellor@gmail.com commit 465bfd9c44dea6b55962b5788a23ac87a467c923 Author: Nathan Chancellor Date: Mon Nov 18 21:57:10 2019 -0700 powerpc: Don't add -mabi= flags when building with Clang When building pseries_defconfig, building vdso32 errors out: error: unknown target ABI 'elfv1' This happens because -m32 in clang changes the target to 32-bit, which does not allow the ABI to be changed. Commit 4dc831aa8813 ("powerpc: Fix compiling a BE kernel with a powerpc64le toolchain") added these flags to fix building big endian kernels with a little endian GCC. Clang doesn't need -mabi because the target triple controls the default value. -mlittle-endian and -mbig-endian manipulate the triple into either powerpc64-* or powerpc64le-*, which properly sets the default ABI. Adding a debug print out in the PPC64TargetInfo constructor after line 383 above shows this: $ echo | ./clang -E --target=powerpc64-linux -mbig-endian -o /dev/null - Default ABI: elfv1 $ echo | ./clang -E --target=powerpc64-linux -mlittle-endian -o /dev/null - Default ABI: elfv2 $ echo | ./clang -E --target=powerpc64le-linux -mbig-endian -o /dev/null - Default ABI: elfv1 $ echo | ./clang -E --target=powerpc64le-linux -mlittle-endian -o /dev/null - Default ABI: elfv2 Don't specify -mabi when building with clang to avoid the build error with -m32 and not change any code generation. -mcall-aixdesc is not an implemented flag in clang so it can be safely excluded as well, see commit 238abecde8ad ("powerpc: Don't use gcc specific options on clang"). pseries_defconfig successfully builds after this patch and powernv_defconfig and ppc44x_defconfig don't regress. Reviewed-by: Daniel Axtens Signed-off-by: Nathan Chancellor [mpe: Trim clang links in change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191119045712.39633-2-natechancellor@gmail.com commit 5f017a56aa5da7f646a858475d57730cd155c9f1 Author: Krzysztof Kozlowski Date: Thu Nov 21 04:21:01 2019 +0100 powerpc: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1574306461-7646-1-git-send-email-krzk@kernel.org commit f2bb86937d86ebcb0e52f95b6d19aba1d850e601 Author: Christophe Leroy Date: Thu Sep 12 13:49:41 2019 +0000 powerpc/fixmap: don't clear fixmap area in paging_init() fixmap is intended to map things permanently like the IMMR region on FSL SOC (8xx, 83xx, ...), so don't clear it when initialising paging() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/41c99bc06394a6bc2888631cb98a3ed2ae281ddb.1568295907.git.christophe.leroy@c-s.fr commit 196e2d6d0252d37be385c73f64fc8f5787a52066 Author: Ilya Dryomov Date: Tue Nov 5 15:38:46 2019 +0100 rbd: ask for a weaker incompat mask for read-only mappings For a read-only mapping, ask for a set of features that make the image only unwritable rather than both unreadable and unwritable by a client that doesn't understand them. As of today, the difference between them for krbd is journaling (JOURNALING) and live migration (MIGRATING). get_features method supports read_only parameter since hammer, ceph.git commit 6176ec5fde2a ("librbd: differentiate between R/O vs R/W RBD features"). Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Dongsheng Yang commit fa58bcad90446a8b30bf0d7f3827844bff30ff59 Author: Ilya Dryomov Date: Tue Nov 5 13:16:52 2019 +0100 rbd: don't query snapshot features Since infernalis, ceph.git commit 281f87f9ee52 ("cls_rbd: get_features on snapshots returns HEAD image features"), querying and checking that is pointless. Userspace support for manipulating image features after image creation came also in infernalis, so a snapshot with a different set of features wasn't ever possible. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Dongsheng Yang commit 686238b7431dcca870ff0bc8ae280cdc89ee41c7 Author: Ilya Dryomov Date: Mon Nov 18 12:51:02 2019 +0100 rbd: remove snapshot existence validation code RBD_DEV_FLAG_EXISTS check in rbd_queue_workfn() is racy and leads to inconsistent behaviour. If the object (or its snapshot) isn't there, the OSD returns ENOENT. A read submitted before the snapshot removal notification is processed would be zero-filled and ended with status OK, while future reads would be failed with IOERR. It also doesn't handle a case when an image that is mapped read-only is removed. On top of this, because watch is no longer established for read-only mappings, we no longer get notifications, so rbd_exists_validate() is effectively dead code. While failing requests rather than returning zeros is a good thing, RBD_DEV_FLAG_EXISTS is not it. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Dongsheng Yang commit b9ef2b8858a0cf07d5f1b201abaf2480f4aa8201 Author: Ilya Dryomov Date: Tue Nov 12 20:20:04 2019 +0100 rbd: don't establish watch for read-only mappings With exclusive lock out of the way, watch is the only thing left that prevents a read-only mapping from being used with read-only OSD caps. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Dongsheng Yang commit 3fe69921dbb29e7335e5c244d1ef66efd154f84b Author: Ilya Dryomov Date: Tue Nov 12 19:41:48 2019 +0100 rbd: don't acquire exclusive lock for read-only mappings A read-only mapping should be usable with read-only OSD caps, so neither the header lock nor the object map lock can be acquired. Unfortunately, this means that images mapped read-only lose the advantage of the object map. Snapshots, however, can take advantage of the object map without any exclusionary locks, so if the object map is desired, snapshot the image and map the snapshot instead of the image. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Dongsheng Yang commit c1b6205730ef009868fbb68cf4755b20055fcc6c Author: Ilya Dryomov Date: Tue Nov 12 19:50:55 2019 +0100 rbd: disallow read-write partitions on images mapped read-only If an image is mapped read-only, don't allow setting its partition(s) to read-write via BLKROSET: with the previous patch all writes to such images are failed anyway. If an image is mapped read-write, its partition(s) can be set to read-only (and back to read-write) as before. Note that at the rbd level the image will remain writeable: anything sent down by the block layer will be executed, including any write from internal kernel users. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Dongsheng Yang commit b948ad78971fb2c6ed6b53b0edbdd720cfe08d9f Author: Ilya Dryomov Date: Fri Nov 8 15:26:51 2019 +0100 rbd: treat images mapped read-only seriously Even though -o ro/-o read_only/--read-only options are very old, we have never really treated them seriously (on par with snapshots). As a first step, fail writes to images mapped read-only just like we do for snapshots. We need this check in rbd because the block layer basically ignores read-only setting, see commit a32e236eb93e ("Partially revert "block: fail op_is_write() requests to read-only partitions""). Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Dongsheng Yang commit 39258aa2db8175271d8079b7685a6e328a8c1a63 Author: Ilya Dryomov Date: Thu Nov 7 17:16:23 2019 +0100 rbd: introduce RBD_DEV_FLAG_READONLY rbd_dev->opts is not available for parent images, making checking rbd_dev->opts->read_only in various places (rbd_dev_image_probe(), need_exclusive_lock(), use_object_map() in the following patches) harder than it needs to be. Keeping rbd_dev_image_probe() in mind, move the initialization in do_rbd_add() up. snap_id isn't filled in at that point, so replace rbd_is_snap() with a snap_name comparison. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Dongsheng Yang commit f3c0e45900a60e1de1a03f74327ea341e713ea45 Author: Ilya Dryomov Date: Thu Nov 7 16:22:10 2019 +0100 rbd: introduce rbd_is_snap() Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Dongsheng Yang commit 2def865a81c23f088140f00beb8e76cbde5b6f95 Author: Jeff Layton Date: Mon Oct 14 15:41:54 2019 -0400 ceph: don't leave ino field in ceph_mds_request_head uninitialized We currently just pass junk in this field unless we're retransmitting a create, but in later patches, we'll need a mechanism to pass a delegated inode number on an initial create request. Prepare for this by ensuring this field is zeroed out. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit f5946bcc5e79038f9f7cb66ec25bd3b2d39b2775 Author: Jeff Layton Date: Wed Oct 16 08:20:17 2019 -0400 ceph: tone down loglevel on ceph_mdsc_build_path warning When this occurs, it usually means that we raced with a rename, and there is no need to warn in that case. Only printk if we pass the rename sequence check but still ended up with pos < 0. Either way, this doesn't warrant a KERN_ERR message. Change it to KERN_WARNING. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit a9b4b6be1291dbbbad0207aaaee654b3db253714 Author: Ilya Dryomov Date: Tue Nov 12 22:04:20 2019 +0100 rbd: update MAINTAINERS info Alex has got plenty on his plate aside from rbd and hasn't really been active in recent years. Remove his maintainership entry. Dongsheng is very familiar with the code base and has been reviewing rbd patches for a while now. Add him as a reviewer. Signed-off-by: Ilya Dryomov Acked-by: Alex Elder Acked-by: Dongsheng Yang commit 74d6f03019f8d70e7f634b8a6b1309051933d36e Author: Xiubo Li Date: Mon Nov 11 06:51:05 2019 -0500 ceph: fix geting random mds from mdsmap For example, if we have 5 mds in the mdsmap and the states are: m_info[5] --> [-1, 1, -1, 1, 1] If we get a random number 1, then we should get the mds index 3 as expected, but actually we will get index 2, which the state is -1. The issue is that the for loop increment will advance past any "up" MDS that was found during the while loop search. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 6b0a877422108372ac25b41ab651e6aa9ed273a6 Author: Colin Ian King Date: Thu Nov 7 22:36:46 2019 +0000 rbd: fix spelling mistake "requeueing" -> "requeuing" There is a spelling mistake in a debug message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Ilya Dryomov commit 721d5c13a7964564dbdc1524fefa7d2ef6121eee Author: Jeff Layton Date: Thu Aug 1 14:11:15 2019 -0400 ceph: make several helper accessors take const pointers None of these helper functions change anything in memory, so we can declare their arguments as const. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit d8f544c30ba0ec7b3e5d0dd2c4258181b2adb8a0 Author: Ilya Dryomov Date: Mon Oct 14 16:25:32 2019 +0200 libceph: drop unnecessary check from dispatch() in mon_client.c con->private is set in ceph_con_init() and is never cleared. Signed-off-by: Ilya Dryomov commit 96710247298df52a4b8150a62a6fe87083093ff3 Merge: 85c9aae9ac8b 30486e72093e Author: Paolo Bonzini Date: Mon Nov 25 11:29:05 2019 +0100 Merge tag 'kvm-ppc-next-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD Second KVM PPC update for 5.5 - Two fixes from Greg Kurz to fix memory leak bugs in the XIVE code. commit 6645d42d79d33e8a9fe262660a75d5f4556bbea9 Author: Navid Emamdoost Date: Fri Nov 22 16:09:55 2019 -0600 dma-buf: Fix memory leak in sync_file_merge() In the implementation of sync_file_merge() the allocated sync_file is leaked if number of fences overflows. Release sync_file by goto err. Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file") Signed-off-by: Navid Emamdoost Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191122220957.30427-1-navid.emamdoost@gmail.com commit 4a13b0e3e10996b9aa0b45a764ecfe49f6fcd360 Author: Andy Lutomirski Date: Sun Nov 24 08:50:03 2019 -0800 x86/entry/32: Fix FIXUP_ESPFIX_STACK with user CR3 UNWIND_ESPFIX_STACK needs to read the GDT, and the GDT mapping that can be accessed via %fs is not mapped in the user pagetables. Use SGDT to find the cpu_entry_area mapping and read the espfix offset from that instead. Reported-and-tested-by: Borislav Petkov Signed-off-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Cc: Signed-off-by: Ingo Molnar commit 500543c53a54134ced386aed85cd93cf1363f981 Author: Will Deacon Date: Thu Nov 21 11:59:02 2019 +0000 lkdtm: Remove references to CONFIG_REFCOUNT_FULL CONFIG_REFCOUNT_FULL no longer exists, so remove all references to it. Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Acked-by: Kees Cook Tested-by: Hanjun Guo Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-11-will@kernel.org Signed-off-by: Ingo Molnar commit 2f30b36943adca070f2e1551f701bd524ed1ae5a Author: Will Deacon Date: Thu Nov 21 11:59:01 2019 +0000 locking/refcount: Remove unused 'refcount_error_report()' function 'refcount_error_report()' has no callers. Remove it. Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Acked-by: Kees Cook Tested-by: Hanjun Guo Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-10-will@kernel.org Signed-off-by: Ingo Molnar commit fb041bb7c0a918b95c6889fc965cdc4a75b4c0ca Author: Will Deacon Date: Thu Nov 21 11:59:00 2019 +0000 locking/refcount: Consolidate implementations of refcount_t The generic implementation of refcount_t should be good enough for everybody, so remove ARCH_HAS_REFCOUNT and REFCOUNT_FULL entirely, leaving the generic implementation enabled unconditionally. Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Acked-by: Kees Cook Tested-by: Hanjun Guo Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-9-will@kernel.org Signed-off-by: Ingo Molnar commit 65b008552469f1c37f5e06e0016924502e40b4f5 Author: Will Deacon Date: Thu Nov 21 11:58:59 2019 +0000 locking/refcount: Consolidate REFCOUNT_{MAX,SATURATED} definitions The definitions of REFCOUNT_MAX and REFCOUNT_SATURATED are the same, regardless of CONFIG_REFCOUNT_FULL, so consolidate them into a single pair of definitions. Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Reviewed-by: Kees Cook Tested-by: Hanjun Guo Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-8-will@kernel.org Signed-off-by: Ingo Molnar commit 1eb085d94256aaa69b00cf5a86e3c5f5bb2bc460 Author: Will Deacon Date: Thu Nov 21 11:58:58 2019 +0000 locking/refcount: Move saturation warnings out of line Having the refcount saturation and warnings inline bloats the text, despite the fact that these paths should never be executed in normal operation. Move the refcount saturation and warnings out of line to reduce the image size when refcount_t checking is enabled. Relative to an x86_64 defconfig, the sizes reported by bloat-o-meter are: # defconfig+REFCOUNT_FULL, inline saturation (i.e. before this patch) Total: Before=14762076, After=14915442, chg +1.04% # defconfig+REFCOUNT_FULL, out-of-line saturation (i.e. after this patch) Total: Before=14762076, After=14835497, chg +0.50% A side-effect of this change is that we now only get one warning per refcount saturation type, rather than one per problematic call-site. Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Reviewed-by: Kees Cook Tested-by: Hanjun Guo Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-7-will@kernel.org Signed-off-by: Ingo Molnar commit dcb786493f3e48da3272b710028d42ec608cfda1 Author: Will Deacon Date: Thu Nov 21 11:58:57 2019 +0000 locking/refcount: Improve performance of generic REFCOUNT_FULL code Rewrite the generic REFCOUNT_FULL implementation so that the saturation point is moved to INT_MIN / 2. This allows us to defer the sanity checks until after the atomic operation, which removes many uses of cmpxchg() in favour of atomic_fetch_{add,sub}(). Some crude perf results obtained from lkdtm show substantially less overhead, despite the checking: $ perf stat -r 3 -B -- echo {ATOMIC,REFCOUNT}_TIMING >/sys/kernel/debug/provoke-crash/DIRECT # arm64 ATOMIC_TIMING: 46.50451 +- 0.00134 seconds time elapsed ( +- 0.00% ) REFCOUNT_TIMING (REFCOUNT_FULL, mainline): 77.57522 +- 0.00982 seconds time elapsed ( +- 0.01% ) REFCOUNT_TIMING (REFCOUNT_FULL, this series): 48.7181 +- 0.0256 seconds time elapsed ( +- 0.05% ) # x86 ATOMIC_TIMING: 31.6225 +- 0.0776 seconds time elapsed ( +- 0.25% ) REFCOUNT_TIMING (!REFCOUNT_FULL, mainline/x86 asm): 31.6689 +- 0.0901 seconds time elapsed ( +- 0.28% ) REFCOUNT_TIMING (REFCOUNT_FULL, mainline): 53.203 +- 0.138 seconds time elapsed ( +- 0.26% ) REFCOUNT_TIMING (REFCOUNT_FULL, this series): 31.7408 +- 0.0486 seconds time elapsed ( +- 0.15% ) Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Reviewed-by: Kees Cook Tested-by: Hanjun Guo Tested-by: Jan Glauber Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-6-will@kernel.org Signed-off-by: Ingo Molnar commit 77e9971c79c29542ab7dd4140f9343bf2ff36158 Author: Will Deacon Date: Thu Nov 21 11:58:56 2019 +0000 locking/refcount: Move the bulk of the REFCOUNT_FULL implementation into the header In an effort to improve performance of the REFCOUNT_FULL implementation, move the bulk of its functions into linux/refcount.h. This allows them to be inlined in the same way as if they had been provided via CONFIG_ARCH_HAS_REFCOUNT. Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Reviewed-by: Kees Cook Tested-by: Hanjun Guo Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-5-will@kernel.org Signed-off-by: Ingo Molnar commit 7221762c48c6bbbcc6cc51d8b803c06930215e34 Author: Will Deacon Date: Thu Nov 21 11:58:55 2019 +0000 locking/refcount: Remove unused refcount_*_checked() variants The full-fat refcount implementation is exposed via a set of functions suffixed with "_checked()", the idea being that code can choose to use the more expensive, yet more secure implementation on a case-by-case basis. In reality, this hasn't happened, so with a grand total of zero users, let's remove the checked variants for now by simply dropping the suffix and predicating the out-of-line functions on CONFIG_REFCOUNT_FULL=y. Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Reviewed-by: Kees Cook Tested-by: Hanjun Guo Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-4-will@kernel.org Signed-off-by: Ingo Molnar commit 97a1420adf0cdf0cf6f41bab0b2acf658c96b94b Author: Will Deacon Date: Thu Nov 21 11:58:54 2019 +0000 locking/refcount: Ensure integer operands are treated as signed In preparation for changing the saturation point of REFCOUNT_FULL to INT_MIN/2, change the type of integer operands passed into the API from 'unsigned int' to 'int' so that we can avoid casting during comparisons when we don't want to fall foul of C integral conversion rules for signed and unsigned types. Since the kernel is compiled with '-fno-strict-overflow', we don't need to worry about the UB introduced by signed overflow here. Furthermore, we're already making heavy use of the atomic_t API, which operates exclusively on signed types. Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Reviewed-by: Kees Cook Tested-by: Hanjun Guo Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-3-will@kernel.org Signed-off-by: Ingo Molnar commit 23e6b169c9917fbd77534f8c5f378cb073f548bd Author: Will Deacon Date: Thu Nov 21 11:58:53 2019 +0000 locking/refcount: Define constants for saturation and max refcount values The REFCOUNT_FULL implementation uses a different saturation point than the x86 implementation, which means that the shared refcount code in lib/refcount.c (e.g. refcount_dec_not_one()) needs to be aware of the difference. Rather than duplicate the definitions from the lkdtm driver, instead move them into and update all references accordingly. Signed-off-by: Will Deacon Reviewed-by: Ard Biesheuvel Reviewed-by: Kees Cook Tested-by: Hanjun Guo Cc: Ard Biesheuvel Cc: Elena Reshetova Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191121115902.2551-2-will@kernel.org Signed-off-by: Ingo Molnar commit ceb9e77324fa661b1001a0ae66f061b5fcb4e4e6 Merge: c494cd6469ab 004e8dce9c55 Author: Ingo Molnar Date: Mon Nov 25 09:09:27 2019 +0100 Merge branch 'x86/core' into perf/core, to resolve conflicts and to pick up completed topic tree Conflicts: tools/perf/check-headers.sh Signed-off-by: Ingo Molnar commit c494cd6469ab0f4bdd663d1a2d396b0ec2f42103 Merge: 8cacac6ecd6d c4b75479741c Author: Ingo Molnar Date: Mon Nov 25 09:08:29 2019 +0100 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit f01ec4fca8207e31b59a010c3de679c833f3a877 Merge: 45c083831417 66584ea6b70a Author: Ingo Molnar Date: Mon Nov 25 09:05:09 2019 +0100 Merge branch 'x86/build' into x86/asm, to pick up completed topic branch Signed-off-by: Ingo Molnar commit 05b042a1944322844eaae7ea596d5f154166d68a Author: Ingo Molnar Date: Sun Nov 24 11:21:44 2019 +0100 x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise When two recent commits that increased the size of the 'struct cpu_entry_area' were merged in -tip, the 32-bit defconfig build started failing on the following build time assert: ./include/linux/compiler.h:391:38: error: call to ‘__compiletime_assert_189’ declared with attribute error: BUILD_BUG_ON failed: CPU_ENTRY_AREA_PAGES * PAGE_SIZE < CPU_ENTRY_AREA_MAP_SIZE arch/x86/mm/cpu_entry_area.c:189:2: note: in expansion of macro ‘BUILD_BUG_ON’ In function ‘setup_cpu_entry_area_ptes’, Which corresponds to the following build time assert: BUILD_BUG_ON(CPU_ENTRY_AREA_PAGES * PAGE_SIZE < CPU_ENTRY_AREA_MAP_SIZE); The purpose of this assert is to sanity check the fixed-value definition of CPU_ENTRY_AREA_PAGES arch/x86/include/asm/pgtable_32_types.h: #define CPU_ENTRY_AREA_PAGES (NR_CPUS * 41) The '41' is supposed to match sizeof(struct cpu_entry_area)/PAGE_SIZE, which value we didn't want to define in such a low level header, because it would cause dependency hell. Every time the size of cpu_entry_area is changed, we have to adjust CPU_ENTRY_AREA_PAGES accordingly - and this assert is checking that constraint. But the assert is both imprecise and buggy, primarily because it doesn't include the single readonly IDT page that is mapped at CPU_ENTRY_AREA_BASE (which begins at a PMD boundary). This bug was hidden by the fact that by accident CPU_ENTRY_AREA_PAGES is defined too large upstream (v5.4-rc8): #define CPU_ENTRY_AREA_PAGES (NR_CPUS * 40) While 'struct cpu_entry_area' is 155648 bytes, or 38 pages. So we had two extra pages, which hid the bug. The following commit (not yet upstream) increased the size to 40 pages: x86/iopl: ("Restrict iopl() permission scope") ... but increased CPU_ENTRY_AREA_PAGES only 41 - i.e. shortening the gap to just 1 extra page. Then another not-yet-upstream commit changed the size again: 880a98c33996: ("x86/cpu_entry_area: Add guard page for entry stack on 32bit") Which increased the cpu_entry_area size from 38 to 39 pages, but didn't change CPU_ENTRY_AREA_PAGES (kept it at 40). This worked fine, because we still had a page left from the accidental 'reserve'. But when these two commits were merged into the same tree, the combined size of cpu_entry_area grew from 38 to 40 pages, while CPU_ENTRY_AREA_PAGES finally caught up to 40 as well. Which is fine in terms of functionality, but the assert broke: BUILD_BUG_ON(CPU_ENTRY_AREA_PAGES * PAGE_SIZE < CPU_ENTRY_AREA_MAP_SIZE); because CPU_ENTRY_AREA_MAP_SIZE is the total size of the area, which is 1 page larger due to the IDT page. To fix all this, change the assert to two precise asserts: BUILD_BUG_ON((CPU_ENTRY_AREA_PAGES+1)*PAGE_SIZE != CPU_ENTRY_AREA_MAP_SIZE); BUILD_BUG_ON(CPU_ENTRY_AREA_TOTAL_SIZE != CPU_ENTRY_AREA_MAP_SIZE); This takes the IDT page into account, and also connects the size-based define of CPU_ENTRY_AREA_TOTAL_SIZE with the address-subtraction based define of CPU_ENTRY_AREA_MAP_SIZE. Also clean up some of the names which made it rather confusing: - 'CPU_ENTRY_AREA_TOT_SIZE' wasn't actually the 'total' size of the cpu-entry-area, but the per-cpu array size, so rename this to CPU_ENTRY_AREA_ARRAY_SIZE. - Introduce CPU_ENTRY_AREA_TOTAL_SIZE that _is_ the total mapping size, with the IDT included. - Add comments where '+1' denotes the IDT mapping - it wasn't obvious and took me about 3 hours to decode... Finally, because this particular commit is actually applied after this patch: 880a98c33996: ("x86/cpu_entry_area: Add guard page for entry stack on 32bit") Fix the CPU_ENTRY_AREA_PAGES value from 40 pages to the correct 39 pages. All future commits that change cpu_entry_area will have to adjust this value precisely. As a side note, we should probably attempt to remove CPU_ENTRY_AREA_PAGES and derive its value directly from the structure, without causing header hell - but that is an adventure for another day! :-) Fixes: 880a98c33996: ("x86/cpu_entry_area: Add guard page for entry stack on 32bit") Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Andy Lutomirski Cc: stable@kernel.org Signed-off-by: Ingo Molnar commit 85150929a15b4e0a225434d5970bba14ebdf31f1 Author: Aurelien Aptel Date: Wed Nov 20 17:15:58 2019 +0100 cifs: dump channel info in DebugData * show server&TCP states for extra channels * mention if an interface has a channel connected to it In this version three of the patch, fixed minor printk format issue pointed out by the kbuild robot. Reported-by: kbuild test robot Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 1ae9a5a5515729f43b2513bba68a462f240b3e04 Author: Steve French Date: Thu Nov 21 17:26:35 2019 -0600 smb3: dump in_send and num_waiters stats counters by default Number of requests in_send and the number of waiters on sendRecv are useful counters in various cases, move them from CONFIG_CIFS_STATS2 to be on by default especially with multichannel Signed-off-by: Steve French Acked-by: Ronnie Sahlberg commit 65a37a34145ca64fd2e0df2f477aadeb389990bc Author: Aurelien Aptel Date: Wed Nov 20 17:15:59 2019 +0100 cifs: try harder to open new channels Previously we would only loop over the iface list once. This patch tries to loop over multiple times until all channels are opened. It will also try to reuse RSS ifaces. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 9bd4540836684013aaad6070a65d6fcdd9006625 Author: Pavel Shilovsky Date: Tue Oct 29 16:51:19 2019 -0700 CIFS: Properly process SMB3 lease breaks Currenly we doesn't assume that a server may break a lease from RWH to RW which causes us setting a wrong lease state on a file and thus mistakenly flushing data and byte-range locks and purging cached data on the client. This leads to performance degradation because subsequent IOs go directly to the server. Fix this by propagating new lease state and epoch values to the oplock break handler through cifsFileInfo structure and removing the use of cifsInodeInfo flags for that. It allows to avoid some races of several lease/oplock breaks using those flags in parallel. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French commit 32546a9586aa4565035bb557e191648e022b29e8 Author: Ronnie Sahlberg Date: Sun Nov 3 13:06:37 2019 +1000 cifs: move cifsFileInfo_put logic into a work-queue This patch moves the final part of the cifsFileInfo_put() logic where we need a write lock on lock_sem to be processed in a separate thread that holds no other locks. This is to prevent deadlocks like the one below: > there are 6 processes looping to while trying to down_write > cinode->lock_sem, 5 of them from _cifsFileInfo_put, and one from > cifs_new_fileinfo > > and there are 5 other processes which are blocked, several of them > waiting on either PG_writeback or PG_locked (which are both set), all > for the same page of the file > > 2 inode_lock() (inode->i_rwsem) for the file > 1 wait_on_page_writeback() for the page > 1 down_read(inode->i_rwsem) for the inode of the directory > 1 inode_lock()(inode->i_rwsem) for the inode of the directory > 1 __lock_page > > > so processes are blocked waiting on: > page flags PG_locked and PG_writeback for one specific page > inode->i_rwsem for the directory > inode->i_rwsem for the file > cifsInodeInflock_sem > > > > here are the more gory details (let me know if I need to provide > anything more/better): > > [0 00:48:22.765] [UN] PID: 8863 TASK: ffff8c691547c5c0 CPU: 3 > COMMAND: "reopen_file" > #0 [ffff9965007e3ba8] __schedule at ffffffff9b6e6095 > #1 [ffff9965007e3c38] schedule at ffffffff9b6e64df > #2 [ffff9965007e3c48] rwsem_down_write_slowpath at ffffffff9af283d7 > #3 [ffff9965007e3cb8] legitimize_path at ffffffff9b0f975d > #4 [ffff9965007e3d08] path_openat at ffffffff9b0fe55d > #5 [ffff9965007e3dd8] do_filp_open at ffffffff9b100a33 > #6 [ffff9965007e3ee0] do_sys_open at ffffffff9b0eb2d6 > #7 [ffff9965007e3f38] do_syscall_64 at ffffffff9ae04315 > * (I think legitimize_path is bogus) > > in path_openat > } else { > const char *s = path_init(nd, flags); > while (!(error = link_path_walk(s, nd)) && > (error = do_last(nd, file, op)) > 0) { <<<< > > do_last: > if (open_flag & O_CREAT) > inode_lock(dir->d_inode); <<<< > else > so it's trying to take inode->i_rwsem for the directory > > DENTRY INODE SUPERBLK TYPE PATH > ffff8c68bb8e79c0 ffff8c691158ef20 ffff8c6915bf9000 DIR /mnt/vm1_smb/ > inode.i_rwsem is ffff8c691158efc0 > > : > owner: (UN - 8856 - > reopen_file), counter: 0x0000000000000003 > waitlist: 2 > 0xffff9965007e3c90 8863 reopen_file UN 0 1:29:22.926 > RWSEM_WAITING_FOR_WRITE > 0xffff996500393e00 9802 ls UN 0 1:17:26.700 > RWSEM_WAITING_FOR_READ > > > the owner of the inode.i_rwsem of the directory is: > > [0 00:00:00.109] [UN] PID: 8856 TASK: ffff8c6914275d00 CPU: 3 > COMMAND: "reopen_file" > #0 [ffff99650065b828] __schedule at ffffffff9b6e6095 > #1 [ffff99650065b8b8] schedule at ffffffff9b6e64df > #2 [ffff99650065b8c8] schedule_timeout at ffffffff9b6e9f89 > #3 [ffff99650065b940] msleep at ffffffff9af573a9 > #4 [ffff99650065b948] _cifsFileInfo_put.cold.63 at ffffffffc0a42dd6 [cifs] > #5 [ffff99650065ba38] cifs_writepage_locked at ffffffffc0a0b8f3 [cifs] > #6 [ffff99650065bab0] cifs_launder_page at ffffffffc0a0bb72 [cifs] > #7 [ffff99650065bb30] invalidate_inode_pages2_range at ffffffff9b04d4bd > #8 [ffff99650065bcb8] cifs_invalidate_mapping at ffffffffc0a11339 [cifs] > #9 [ffff99650065bcd0] cifs_revalidate_mapping at ffffffffc0a1139a [cifs] > #10 [ffff99650065bcf0] cifs_d_revalidate at ffffffffc0a014f6 [cifs] > #11 [ffff99650065bd08] path_openat at ffffffff9b0fe7f7 > #12 [ffff99650065bdd8] do_filp_open at ffffffff9b100a33 > #13 [ffff99650065bee0] do_sys_open at ffffffff9b0eb2d6 > #14 [ffff99650065bf38] do_syscall_64 at ffffffff9ae04315 > > cifs_launder_page is for page 0xffffd1e2c07d2480 > > crash> page.index,mapping,flags 0xffffd1e2c07d2480 > index = 0x8 > mapping = 0xffff8c68f3cd0db0 > flags = 0xfffffc0008095 > > PAGE-FLAG BIT VALUE > PG_locked 0 0000001 > PG_uptodate 2 0000004 > PG_lru 4 0000010 > PG_waiters 7 0000080 > PG_writeback 15 0008000 > > > inode is ffff8c68f3cd0c40 > inode.i_rwsem is ffff8c68f3cd0ce0 > DENTRY INODE SUPERBLK TYPE PATH > ffff8c68a1f1b480 ffff8c68f3cd0c40 ffff8c6915bf9000 REG > /mnt/vm1_smb/testfile.8853 > > > this process holds the inode->i_rwsem for the parent directory, is > laundering a page attached to the inode of the file it's opening, and in > _cifsFileInfo_put is trying to down_write the cifsInodeInflock_sem > for the file itself. > > > : > owner: (UN - 8854 - > reopen_file), counter: 0x0000000000000003 > waitlist: 1 > 0xffff9965005dfd80 8855 reopen_file UN 0 1:29:22.912 > RWSEM_WAITING_FOR_WRITE > > this is the inode.i_rwsem for the file > > the owner: > > [0 00:48:22.739] [UN] PID: 8854 TASK: ffff8c6914272e80 CPU: 2 > COMMAND: "reopen_file" > #0 [ffff99650054fb38] __schedule at ffffffff9b6e6095 > #1 [ffff99650054fbc8] schedule at ffffffff9b6e64df > #2 [ffff99650054fbd8] io_schedule at ffffffff9b6e68e2 > #3 [ffff99650054fbe8] __lock_page at ffffffff9b03c56f > #4 [ffff99650054fc80] pagecache_get_page at ffffffff9b03dcdf > #5 [ffff99650054fcc0] grab_cache_page_write_begin at ffffffff9b03ef4c > #6 [ffff99650054fcd0] cifs_write_begin at ffffffffc0a064ec [cifs] > #7 [ffff99650054fd30] generic_perform_write at ffffffff9b03bba4 > #8 [ffff99650054fda8] __generic_file_write_iter at ffffffff9b04060a > #9 [ffff99650054fdf0] cifs_strict_writev.cold.70 at ffffffffc0a4469b [cifs] > #10 [ffff99650054fe48] new_sync_write at ffffffff9b0ec1dd > #11 [ffff99650054fed0] vfs_write at ffffffff9b0eed35 > #12 [ffff99650054ff00] ksys_write at ffffffff9b0eefd9 > #13 [ffff99650054ff38] do_syscall_64 at ffffffff9ae04315 > > the process holds the inode->i_rwsem for the file to which it's writing, > and is trying to __lock_page for the same page as in the other processes > > > the other tasks: > [0 00:00:00.028] [UN] PID: 8859 TASK: ffff8c6915479740 CPU: 2 > COMMAND: "reopen_file" > #0 [ffff9965007b39d8] __schedule at ffffffff9b6e6095 > #1 [ffff9965007b3a68] schedule at ffffffff9b6e64df > #2 [ffff9965007b3a78] schedule_timeout at ffffffff9b6e9f89 > #3 [ffff9965007b3af0] msleep at ffffffff9af573a9 > #4 [ffff9965007b3af8] cifs_new_fileinfo.cold.61 at ffffffffc0a42a07 [cifs] > #5 [ffff9965007b3b78] cifs_open at ffffffffc0a0709d [cifs] > #6 [ffff9965007b3cd8] do_dentry_open at ffffffff9b0e9b7a > #7 [ffff9965007b3d08] path_openat at ffffffff9b0fe34f > #8 [ffff9965007b3dd8] do_filp_open at ffffffff9b100a33 > #9 [ffff9965007b3ee0] do_sys_open at ffffffff9b0eb2d6 > #10 [ffff9965007b3f38] do_syscall_64 at ffffffff9ae04315 > > this is opening the file, and is trying to down_write cinode->lock_sem > > > [0 00:00:00.041] [UN] PID: 8860 TASK: ffff8c691547ae80 CPU: 2 > COMMAND: "reopen_file" > [0 00:00:00.057] [UN] PID: 8861 TASK: ffff8c6915478000 CPU: 3 > COMMAND: "reopen_file" > [0 00:00:00.059] [UN] PID: 8858 TASK: ffff8c6914271740 CPU: 2 > COMMAND: "reopen_file" > [0 00:00:00.109] [UN] PID: 8862 TASK: ffff8c691547dd00 CPU: 6 > COMMAND: "reopen_file" > #0 [ffff9965007c3c78] __schedule at ffffffff9b6e6095 > #1 [ffff9965007c3d08] schedule at ffffffff9b6e64df > #2 [ffff9965007c3d18] schedule_timeout at ffffffff9b6e9f89 > #3 [ffff9965007c3d90] msleep at ffffffff9af573a9 > #4 [ffff9965007c3d98] _cifsFileInfo_put.cold.63 at ffffffffc0a42dd6 [cifs] > #5 [ffff9965007c3e88] cifs_close at ffffffffc0a07aaf [cifs] > #6 [ffff9965007c3ea0] __fput at ffffffff9b0efa6e > #7 [ffff9965007c3ee8] task_work_run at ffffffff9aef1614 > #8 [ffff9965007c3f20] exit_to_usermode_loop at ffffffff9ae03d6f > #9 [ffff9965007c3f38] do_syscall_64 at ffffffff9ae0444c > > closing the file, and trying to down_write cifsi->lock_sem > > > [0 00:48:22.839] [UN] PID: 8857 TASK: ffff8c6914270000 CPU: 7 > COMMAND: "reopen_file" > #0 [ffff9965006a7cc8] __schedule at ffffffff9b6e6095 > #1 [ffff9965006a7d58] schedule at ffffffff9b6e64df > #2 [ffff9965006a7d68] io_schedule at ffffffff9b6e68e2 > #3 [ffff9965006a7d78] wait_on_page_bit at ffffffff9b03cac6 > #4 [ffff9965006a7e10] __filemap_fdatawait_range at ffffffff9b03b028 > #5 [ffff9965006a7ed8] filemap_write_and_wait at ffffffff9b040165 > #6 [ffff9965006a7ef0] cifs_flush at ffffffffc0a0c2fa [cifs] > #7 [ffff9965006a7f10] filp_close at ffffffff9b0e93f1 > #8 [ffff9965006a7f30] __x64_sys_close at ffffffff9b0e9a0e > #9 [ffff9965006a7f38] do_syscall_64 at ffffffff9ae04315 > > in __filemap_fdatawait_range > wait_on_page_writeback(page); > for the same page of the file > > > > [0 00:48:22.718] [UN] PID: 8855 TASK: ffff8c69142745c0 CPU: 7 > COMMAND: "reopen_file" > #0 [ffff9965005dfc98] __schedule at ffffffff9b6e6095 > #1 [ffff9965005dfd28] schedule at ffffffff9b6e64df > #2 [ffff9965005dfd38] rwsem_down_write_slowpath at ffffffff9af283d7 > #3 [ffff9965005dfdf0] cifs_strict_writev at ffffffffc0a0c40a [cifs] > #4 [ffff9965005dfe48] new_sync_write at ffffffff9b0ec1dd > #5 [ffff9965005dfed0] vfs_write at ffffffff9b0eed35 > #6 [ffff9965005dff00] ksys_write at ffffffff9b0eefd9 > #7 [ffff9965005dff38] do_syscall_64 at ffffffff9ae04315 > > inode_lock(inode); > > > and one 'ls' later on, to see whether the rest of the mount is available > (the test file is in the root, so we get blocked up on the directory > ->i_rwsem), so the entire mount is unavailable > > [0 00:36:26.473] [UN] PID: 9802 TASK: ffff8c691436ae80 CPU: 4 > COMMAND: "ls" > #0 [ffff996500393d28] __schedule at ffffffff9b6e6095 > #1 [ffff996500393db8] schedule at ffffffff9b6e64df > #2 [ffff996500393dc8] rwsem_down_read_slowpath at ffffffff9b6e9421 > #3 [ffff996500393e78] down_read_killable at ffffffff9b6e95e2 > #4 [ffff996500393e88] iterate_dir at ffffffff9b103c56 > #5 [ffff996500393ec8] ksys_getdents64 at ffffffff9b104b0c > #6 [ffff996500393f30] __x64_sys_getdents64 at ffffffff9b104bb6 > #7 [ffff996500393f38] do_syscall_64 at ffffffff9ae04315 > > in iterate_dir: > if (shared) > res = down_read_killable(&inode->i_rwsem); <<<< > else > res = down_write_killable(&inode->i_rwsem); > Reported-by: Frank Sorenson Reviewed-by: Pavel Shilovsky Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit d70e9fa55884760b6d6c293dbf20d8c52ce11fb7 Author: Aurelien Aptel Date: Fri Sep 20 06:31:10 2019 +0200 cifs: try opening channels after mounting After doing mount() successfully we call cifs_try_adding_channels() which will open as many channels as it can. Channels are closed when the master session is closed. The master connection becomes the first channel. ,-------------> global cifs_tcp_ses_list <-------------------------. | | '- TCP_Server_Info <--> TCP_Server_Info <--> TCP_Server_Info <-' (master con) (chan#1 con) (chan#2 con) | ^ ^ ^ v '--------------------|--------------------' cifs_ses | - chan_count = 3 | - chans[] ---------------------' - smb3signingkey[] (master signing key) Note how channel connections don't have sessions. That's because cifs_ses can only be part of one linked list (list_head are internal to the elements). For signing keys, each channel has its own signing key which must be used only after the channel has been bound. While it's binding it must use the master session signing key. For encryption keys, since channel connections do not have sessions attached we must now find matching session by looping over all sessions in smb2_get_enc_key(). Each channel is opened like a regular server connection but at the session setup request step it must set the SMB2_SESSION_REQ_FLAG_BINDING flag and use the session id to bind to. Finally, while sending in compound_send_recv() for requests that aren't negprot, ses-setup or binding related, use a channel by cycling through the available ones (round-robin). Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit b8f7442bc46e48fb6fe5d7bc3e1ac1500ce649a9 Author: Aurelien Aptel Date: Mon Nov 18 21:04:08 2019 +0100 CIFS: refactor cifs_get_inode_info() Make logic of cifs_get_inode() much clearer by moving code to sub functions and adding comments. Document the steps this function does. cifs_get_inode_info() gets and updates a file inode metadata from its file path. * If caller already has raw info data from server they can pass it. * If inode already exists (just need to update) caller can pass it. Step 1: get raw data from server if none was passed Step 2: parse raw data into intermediate internal cifs_fattr struct Step 3: set fattr uniqueid which is later used for inode number. This can sometime be done from raw data Step 4: tweak fattr according to mount options (file_mode, acl to mode bits, uid, gid, etc) Step 5: update or create inode from final fattr struct * add is_smb1_server() helper * add is_inode_cache_good() helper * move SMB1-backupcreds-getinfo-retry to separate func cifs_backup_query_path_info(). * move set-uniqueid code to separate func cifs_set_fattr_ino() * don't clobber uniqueid from backup cred retry * fix some probable corner cases memleaks Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit f6a6bf7c4d53837767125e635e7d7d0dc48ee59e Author: Aurelien Aptel Date: Fri Sep 20 06:22:14 2019 +0200 cifs: switch servers depending on binding state Currently a lot of the code to initialize a connection & session uses the cifs_ses as input. But depending on if we are opening a new session or a new channel we need to use different server pointers. Add a "binding" flag in cifs_ses and a helper function that returns the server ptr a session should use (only in the sess establishment code path). Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit f780bd3fef17c4fda12e9c50e28e91c0e18cf448 Author: Aurelien Aptel Date: Fri Sep 20 06:08:34 2019 +0200 cifs: add server param As we get down to the transport layer, plenty of functions are passed the session pointer and assume the transport to use is ses->server. Instead we modify those functions to pass (ses, server) so that we can decouple the session from the server. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit bcc8880115bcb36bc281c7f4895a12b51569d8d4 Author: Aurelien Aptel Date: Fri Sep 20 04:32:20 2019 +0200 cifs: add multichannel mount options and data structs adds: - [no]multichannel to enable/disable multichannel - max_channels=N to control how many channels to create these options are then stored in the volume struct. - store channels and max_channels in cifs_ses Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 35adffed079fdcf1818bfe9da7625a5446b626e0 Author: Aurelien Aptel Date: Fri Sep 20 06:29:39 2019 +0200 cifs: sort interface list by speed New channels are going to be opened by walking the list sequentially, so by sorting it we will connect to the fastest interfaces first. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit fa9c2362497fbd64788063288dc4e74daf977ebb Author: Pavel Shilovsky Date: Thu Oct 31 14:18:57 2019 -0700 CIFS: Fix SMB2 oplock break processing Even when mounting modern protocol version the server may be configured without supporting SMB2.1 leases and the client uses SMB2 oplock to optimize IO performance through local caching. However there is a problem in oplock break handling that leads to missing a break notification on the client who has a file opened. It latter causes big latencies to other clients that are trying to open the same file. The problem reproduces when there are multiple shares from the same server mounted on the client. The processing code tries to match persistent and volatile file ids from the break notification with an open file but it skips all share besides the first one. Fix this by looking up in all shares belonging to the server that issued the oplock break. Cc: Stable Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French commit 3591bb83eee7731d3421621a3b04d2432f80bba0 Author: Ronnie Sahlberg Date: Thu Oct 31 13:55:14 2019 +1000 cifs: don't use 'pre:' for MODULE_SOFTDEP It can cause to fail with modprobe: FATAL: Module is builtin. RHBZ: 1767094 Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 4357d45f50e58672e1d17648d792f27df01dfccd Author: Long Li Date: Wed Oct 16 13:51:56 2019 -0700 cifs: smbd: Return -EAGAIN when transport is reconnecting During reconnecting, the transport may have already been destroyed and is in the process being reconnected. In this case, return -EAGAIN to not fail and to retry this I/O. Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: Steve French commit c21ce58eab1eda4c66507897207e20c82e62a5ac Author: Long Li Date: Wed Oct 16 13:51:55 2019 -0700 cifs: smbd: Only queue work for error recovery on memory registration It's not necessary to queue invalidated memory registration to work queue, as all we need to do is to unmap the SG and make it usable again. This can save CPU cycles in normal data paths as memory registration errors are rare and normally only happens during reconnection. Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 87bc2376fffae6821869c988edbb45a14527b258 Author: Ronnie Sahlberg Date: Thu Nov 14 12:32:12 2019 -0600 smb3: add debug messages for closing unmatched open Helps distinguish between an interrupted close and a truly unmatched open. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 7b71843fa7028475b052107664cbe120156a2cfc Author: Pavel Shilovsky Date: Thu Nov 21 11:35:14 2019 -0800 CIFS: Do not miss cancelled OPEN responses When an OPEN command is cancelled we mark a mid as cancelled and let the demultiplex thread process it by closing an open handle. The problem is there is a race between a system call thread and the demultiplex thread and there may be a situation when the mid has been already processed before it is set as cancelled. Fix this by processing cancelled requests when mids are being destroyed which means that there is only one thread referencing a particular mid. Also set mids as cancelled unconditionally on their state. Cc: Stable Tested-by: Frank Sorenson Reviewed-by: Ronnie Sahlberg Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French commit 86a7964be7afaf3df6b64faaa10a7032d2444e51 Author: Pavel Shilovsky Date: Thu Nov 21 11:35:13 2019 -0800 CIFS: Fix NULL pointer dereference in mid callback There is a race between a system call processing thread and the demultiplex thread when mid->resp_buf becomes NULL and later is being accessed to get credits. It happens when the 1st thread wakes up before a mid callback is called in the 2nd one but the mid state has already been set to MID_RESPONSE_RECEIVED. This causes NULL pointer dereference in mid callback. Fix this by saving credits from the response before we update the mid state and then use this value in the mid callback rather then accessing a response buffer. Cc: Stable Fixes: ee258d79159afed5 ("CIFS: Move credit processing to mid callbacks for SMB3") Tested-by: Frank Sorenson Reviewed-by: Ronnie Sahlberg Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French commit 9150c3adbf24d77cfba37f03639d4a908ca4ac25 Author: Pavel Shilovsky Date: Thu Nov 21 11:35:12 2019 -0800 CIFS: Close open handle after interrupted close If Close command is interrupted before sending a request to the server the client ends up leaking an open file handle. This wastes server resources and can potentially block applications that try to remove the file or any directory containing this file. Fix this by putting the close command into a worker queue, so another thread retries it later. Cc: Stable Tested-by: Frank Sorenson Reviewed-by: Ronnie Sahlberg Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French commit 44805b0e62f15e90d233485420e1847133716bdc Author: Pavel Shilovsky Date: Tue Nov 12 17:16:35 2019 -0800 CIFS: Respect O_SYNC and O_DIRECT flags during reconnect Currently the client translates O_SYNC and O_DIRECT flags into corresponding SMB create options when openning a file. The problem is that on reconnect when the file is being re-opened the client doesn't set those flags and it causes a server to reject re-open requests because create options don't match. The latter means that any subsequent system call against that open file fail until a share is re-mounted. Fix this by properly setting SMB create options when re-openning files after reconnects. Fixes: 1013e760d10e6: ("SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags") Cc: Stable Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French commit 037d050724ed30a5ef02e6e886884a48e7654e47 Author: Steve French Date: Fri Nov 8 01:01:35 2019 -0600 smb3: remove confusing dmesg when mounting with encryption ("seal") The smb2/smb3 message checking code was logging to dmesg when mounting with encryption ("seal") for compounded SMB3 requests. When encrypted the whole frame (including potentially multiple compounds) is read so the length field is longer than in the case of non-encrypted case (where length field will match the the calculated length for the particular SMB3 request in the compound being validated). Avoids the warning on mount (with "seal"): "srv rsp padded more than expected. Length 384 not ..." Signed-off-by: Steve French commit 72e73c78c446e3c009a29b017c7fa3d79463e2aa Author: Ronnie Sahlberg Date: Thu Nov 7 17:00:38 2019 +1000 cifs: close the shared root handle on tree disconnect Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 598b6c57f2ff29df948c846f4bf3046c33d6b37f Author: Markus Elfring Date: Sun Aug 20 17:17:30 2017 +0200 CIFS: Return directly after a failed build_path_from_dentry() in cifs_do_create() Return directly after a call of the function "build_path_from_dentry" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Steve French commit 2b1116bbe898aefdf584838448c6869f69851e0f Author: Markus Elfring Date: Tue Nov 5 22:26:53 2019 +0100 CIFS: Use common error handling code in smb2_ioctl_query_info() Move the same error code assignments so that such exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Steve French commit cfaa1181097f6a1a6f4f6670ebc97848efda0883 Author: Markus Elfring Date: Tue Nov 5 21:30:25 2019 +0100 CIFS: Use memdup_user() rather than duplicating its implementation Reuse existing functionality from memdup_user() instead of keeping duplicate source code. Generated by: scripts/coccinelle/api/memdup_user.cocci Fixes: f5b05d622a3e99e6a97a189fe500414be802a05c ("cifs: add IOCTL for QUERY_INFO passthrough to userspace") Signed-off-by: Markus Elfring Signed-off-by: Steve French commit acd4680e2bef2405a0e1ef2149fbb01cce7e116c Author: Long Li Date: Wed Oct 16 13:51:54 2019 -0700 cifs: smbd: Return -ECONNABORTED when trasnport is not in connected state The transport should return this error so the upper layer will reconnect. Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: Steve French commit d63cdbae60ac6fbb2864bd3d8df7404f12b7407d Author: Long Li Date: Wed Oct 16 13:51:53 2019 -0700 cifs: smbd: Add messages on RDMA session destroy and reconnection Log these activities to help production support. Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 37941ea17d3f8eb2f5ac2f59346fab9e8439271a Author: Long Li Date: Wed Oct 16 13:51:52 2019 -0700 cifs: smbd: Return -EINVAL when the number of iovs exceeds SMBDIRECT_MAX_SGE While it's not friendly to fail user processes that issue more iovs than we support, at least we should return the correct error code so the user process gets a chance to retry with smaller number of iovs. Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: Steve French commit b7a55bbd6d5402bfbadcfb3904e3c75b38ab5ba4 Author: Long Li Date: Tue Oct 15 22:54:50 2019 +0000 cifs: smbd: Invalidate and deregister memory registration on re-send for direct I/O On re-send, there might be a reconnect and all prevoius memory registrations need to be invalidated and deregistered. Signed-off-by: Long Li Signed-off-by: Steve French commit 14cc639c17ab0b6671526a7459087352507609e4 Author: Long Li Date: Wed Oct 16 13:51:50 2019 -0700 cifs: Don't display RDMA transport on reconnect On reconnect, the transport data structure is NULL and its information is not available. Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: Steve French commit f28a2e5ebc54248757f5baf5b7ff1d4eb80ebae7 Author: YueHaibing Date: Thu Oct 17 03:53:51 2019 +0000 CIFS: remove set but not used variables 'cinode' and 'netfid' Fixes gcc '-Wunused-but-set-variable' warning: fs/cifs/file.c: In function 'cifs_flock': fs/cifs/file.c:1704:8: warning: variable 'netfid' set but not used [-Wunused-but-set-variable] fs/cifs/file.c:1702:24: warning: variable 'cinode' set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Steve French commit d0677992d2af3d65f1c1c21de3323d09d4891537 Author: Steve French Date: Tue Jul 16 18:55:38 2019 -0500 cifs: add support for flock The flock system call locks the whole file rather than a byte range and so is currently emulated by various other file systems by simply sending a byte range lock for the whole file. Add flock handling for cifs.ko in similar way. xfstest generic/504 passes with this as well Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky Reviewed-by: Ronnie Sahlberg commit be1bf978e5d7cf26a78091ce1dd7c77ac64a658f Author: YueHaibing Date: Wed Oct 23 21:55:59 2019 +0800 cifs: remove unused variable 'sid_user' fs/cifs/cifsacl.c:43:30: warning: sid_user defined but not used [-Wunused-const-variable=] It is never used, so remove it. Signed-off-by: YueHaibing Signed-off-by: Steve French commit 8bd3754cff3aa6e80e73cb56042cdc6f76d6510e Author: Dan Carpenter Date: Fri Oct 25 13:35:08 2019 +0300 cifs: rename a variable in SendReceive() Smatch gets confused because we sometimes refer to "server->srv_mutex" and sometimes to "sess->server->srv_mutex". They refer to the same lock so let's just make this consistent. Signed-off-by: Dan Carpenter Signed-off-by: Steve French commit 4eb47198e955fc01d14113f525b62a4bc95554c7 Merge: 5f04ed74a8a3 b553a6ec5700 Author: David S. Miller Date: Sun Nov 24 22:05:47 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2019-11-24 The following pull-request contains BPF updates for your *net-next* tree. We've added 27 non-merge commits during the last 4 day(s) which contain a total of 50 files changed, 2031 insertions(+), 548 deletions(-). The main changes are: 1) Optimize bpf_tail_call() from retpoline-ed indirect jump to direct jump, from Daniel. 2) Support global variables in libbpf, from Andrii. 3) Cleanup selftests with BPF_TRACE_x() macro, from Martin. 4) Fix devmap hash, from Toke. 5) Fix register bounds after 32-bit conditional jumps, from Yonghong. ==================== Signed-off-by: David S. Miller commit 5f04ed74a8a3bcb2122738b7eda857187e85aa34 Merge: dc83ef22cdb4 a4f95f31a9f3 Author: Jakub Kicinski Date: Sun Nov 24 18:46:13 2019 -0800 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2019-11-24 Here's one last bluetooth-next pull request for the 5.5 kernel: - Fix BDADDR_PROPERTY & INVALID_BDADDR quirk handling - Added support for BCM4334B0 and BCM4335A0 controllers - A few other smaller fixes related to locking and memory leaks ==================== Signed-off-by: Jakub Kicinski commit dc83ef22cdb483027f1bf0892e466433ec5299bf Author: Andreas K. Besslein Date: Sat Nov 23 22:04:47 2019 +0100 ax88179_178a: add ethtool_op_get_ts_info() This enables the use of SW timestamping. ax88179_178a uses the usbnet transmit function usbnet_start_xmit() which implements software timestamping. ax88179_178a overrides ethtool_ops but missed to set .get_ts_info. This caused SOF_TIMESTAMPING_TX_SOFTWARE capability to be not available. Signed-off-by: Andreas K. Besslein Signed-off-by: Jakub Kicinski commit bd85880197d2f0150b10baf2fdfea7eed13f4aa8 Merge: c392bccf2c10 ed43cff065d7 Author: Jakub Kicinski Date: Sun Nov 24 18:35:05 2019 -0800 Merge branch 'mlxsw-Two-small-updates' Ido Schimmel says: ==================== mlxsw: Two small updates Patch #1 from Petr handles a corner case in GRE tunnel offload. Patch #2 from Amit fixes a recent issue where the driver was programming the device to use an adjacency index (for a nexthop) that was not properly initialized. ==================== Signed-off-by: Jakub Kicinski commit ed43cff065d7ca2ffa60a7a1ea62be4a574529f9 Author: Amit Cohen Date: Sun Nov 24 09:48:03 2019 +0200 mlxsw: spectrum_router: Fix use of uninitialized adjacency index When mlxsw_sp_adj_discard_write() is called for the first time, the value stored in 'mlxsw_sp->router->adj_discard_index' is invalid, as indicated by 'mlxsw_sp->router->adj_discard_index_valid' being set to 'false'. In this case, we should not use the value initially stored in 'mlxsw_sp->router->adj_discard_index' (0) and instead use the value allocated later in the function. Fixes: 983db6198f0d ("mlxsw: spectrum_router: Allocate discard adjacency entry when needed") Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit c5731cc5ebcbfdb0b34c7ce29d488c52d8af957b Author: Petr Machata Date: Sun Nov 24 09:48:02 2019 +0200 mlxsw: spectrum_router: After underlay moves, demote conflicting tunnels When a GRE tunnel is bound to an underlay netdevice and that netdevice is moved to a different VRF, that could cause two tunnels to have the same underlay local address in the same VRF. Linux in this situation dispatches the traffic according to the tunnel key (or lack thereof), but that cannot be offloaded to Spectrum devices. Detect this situation and unoffload the two impacted tunnels when it happens. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit b553a6ec570044fc1ae300c6fb24f9ce204c5894 Author: Daniel Borkmann Date: Sun Nov 24 01:39:42 2019 +0100 bpf: Simplify __bpf_arch_text_poke poke type handling Given that we have BPF_MOD_NOP_TO_{CALL,JUMP}, BPF_MOD_{CALL,JUMP}_TO_NOP and BPF_MOD_{CALL,JUMP}_TO_{CALL,JUMP} poke types and that we also pass in old_addr as well as new_addr, it's a bit redundant and unnecessarily complicates __bpf_arch_text_poke() itself since we can derive the same from the *_addr that were passed in. Hence simplify and use BPF_MOD_{CALL,JUMP} as types which also allows to clean up call-sites. In addition to that, __bpf_arch_text_poke() currently verifies that text matches expected old_insn before we invoke text_poke_bp(). Also add a check on new_insn and skip rewrite if it already matches. Reason why this is rather useful is that it avoids making any special casing in prog_array_map_poke_run() when old and new prog were NULL and has the benefit that also for this case we perform a check on text whether it really matches our expectations. Suggested-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/fcb00a2b0b288d6c73de4ef58116a821c8fe8f2f.1574555798.git.daniel@iogearbox.net commit f9a7cf6eb17cd0110c8c47d9e7969fc2716e5772 Author: Martin KaFai Lau Date: Sat Nov 23 12:25:04 2019 -0800 bpf: Introduce BPF_TRACE_x helper for the tracing tests For BPF_PROG_TYPE_TRACING, the bpf_prog's ctx is an array of u64. This patch borrows the idea from BPF_CALL_x in filter.h to convert a u64 to the arg type of the traced function. The new BPF_TRACE_x has an arg to specify the return type of a bpf_prog. It will be used in the future TCP-ops bpf_prog that may return "void". The new macros are defined in the new header file "bpf_trace_helpers.h". It is under selftests/bpf/ for now. It could be moved to libbpf later after seeing more upcoming non-tracing use cases. The tests are changed to use these new macros also. Hence, the k[s]u8/16/32/64 are no longer needed and they are removed from the bpf_helpers.h. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191123202504.1502696-1-kafai@fb.com commit b8cd76ca4ae34731d47cd6a876d912a08efcc240 Author: Daniel Borkmann Date: Sat Nov 23 21:37:31 2019 +0100 bpf: Add bpf_jit_blinding_enabled for !CONFIG_BPF_JIT Add a definition of bpf_jit_blinding_enabled() when CONFIG_BPF_JIT is not set in order to fix a recent build regression: [...] CC kernel/bpf/verifier.o CC kernel/bpf/inode.o kernel/bpf/verifier.c: In function ‘fixup_bpf_calls’: kernel/bpf/verifier.c:9132:25: error: implicit declaration of function ‘bpf_jit_blinding_enabled’; did you mean ‘bpf_jit_kallsyms_enabled’? [-Werror=implicit-function-declaration] 9132 | bool expect_blinding = bpf_jit_blinding_enabled(prog); | ^~~~~~~~~~~~~~~~~~~~~~~~ | bpf_jit_kallsyms_enabled CC kernel/bpf/helpers.o CC kernel/bpf/hashtab.o [...] Fixes: d2e4c1e6c294 ("bpf: Constant map key tracking for prog array pokes") Reported-by: Jakub Sitnicki Reported-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/40baf8f3507cac4851a310578edfb98ce73b5605.1574541375.git.daniel@iogearbox.net commit 6dbae03b2e851fe58e9d9d1ac9ed58017b07960c Merge: c4781e37c6a2 79d49ba048ec Author: Alexei Starovoitov Date: Fri Nov 22 18:02:44 2019 -0800 Merge branch 'optimize-bpf_tail_call' Daniel Borkmann says: ==================== This gets rid of indirect jumps for BPF tail calls whenever possible. The series adds emission for *direct* jumps for tail call maps in order to avoid the retpoline overhead from a493a87f38cf ("bpf, x64: implement retpoline for tail call") for situations that allow for it, meaning, for known constant keys at verification time which are used as index into the tail call map. See patch 7/8 for more general details. Thanks! v1 -> v2: - added more test cases - u8 ip_stable -> bool (Andrii) - removed bpf_map_poke_{un,}lock and simplified the code (Andrii) - added break into prog_array_map_poke_untrack since there's just one prog (Andrii) - fixed typo: for for in commit msg (Andrii) - reworked __bpf_arch_text_poke (Andrii) - added subtests, and comment on tests themselves, NULL-NULL transistion (Andrii) - in constant map key tracking I've moved the map_poke_track callback to once we've finished creating the poke tab as otherwise concurrent access from tail call map would blow up (since we realloc the table) rfc -> v1: - Applied Alexei's and Andrii's feeback from https://lore.kernel.org/bpf/cover.1573779287.git.daniel@iogearbox.net/T/#t ==================== Signed-off-by: Alexei Starovoitov commit 79d49ba048ecace59a9850e8a04b618d7848b8e7 Author: Daniel Borkmann Date: Fri Nov 22 21:08:01 2019 +0100 bpf, testing: Add various tail call test cases Add several BPF kselftest cases for tail calls which test the various patch directions, and that multiple locations are patched in same and different programs. # ./test_progs -n 45 #45/1 tailcall_1:OK #45/2 tailcall_2:OK #45/3 tailcall_3:OK #45/4 tailcall_4:OK #45/5 tailcall_5:OK #45 tailcalls:OK Summary: 1/5 PASSED, 0 SKIPPED, 0 FAILED I've also verified the JITed dump after each of the rewrite cases that it matches expectations. Also regular test_verifier suite passes fine which contains further tail call tests: # ./test_verifier [...] Summary: 1563 PASSED, 0 SKIPPED, 0 FAILED Checked under JIT, interpreter and JIT + hardening. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/3d6cbecbeb171117dccfe153306e479798fb608d.1574452833.git.daniel@iogearbox.net commit 428d5df1fa4f28daf622c48dd19da35585c9053c Author: Daniel Borkmann Date: Fri Nov 22 21:08:00 2019 +0100 bpf, x86: Emit patchable direct jump as tail call Add initial code emission for *direct* jumps for tail call maps in order to avoid the retpoline overhead from a493a87f38cf ("bpf, x64: implement retpoline for tail call") for situations that allow for it, meaning, for known constant keys at verification time which are used as index into the tail call map. In case of Cilium which makes heavy use of tail calls, constant keys are used in the vast majority, only for a single occurrence we use a dynamic key. High level outline is that if the target prog is NULL in the map, we emit a 5-byte nop for the fall-through case and if not, we emit a 5-byte direct relative jmp to the target bpf_func + skipped prologue offset. Later during runtime, we patch these 5-byte nop/jmps upon tail call map update or deletions dynamically. Note that on x86-64 the direct jmp works as we reuse the same stack frame and skip prologue (as opposed to some other JIT implementations). One of the issues is that the tail call map slots can change at any given time even during JITing. Therefore, we have two passes: i) emit nops for all patchable locations during main JITing phase until we declare prog->jited = 1 eventually. At this point the image is stable, not public yet and with all jmps disabled. While JITing, we collect additional info like poke->ip in order to remember the patch location for later modifications. In ii) bpf_tail_call_direct_fixup() walks over the progs poke_tab, locks the tail call maps poke_mutex to prevent from parallel updates and patches in the right locations via __bpf_arch_text_poke(). Note, the main bpf_arch_text_poke() cannot be used at this point since we're not yet exposed to kallsyms. For the update we use plain memcpy() since the image is not public and still in read-write mode. After patching, we activate that poke entry through poke->ip_stable. Meaning, at this point any tail call map updates/deletions are not going to ignore that poke entry anymore. Then, bpf_arch_text_poke() might still occur on the read-write image until we finally locked it as read-only. Both modifications on the given image are under text_mutex to avoid interference with each other when update requests come in in parallel for different tail call maps (current one we have locked in JIT and different one where poke->ip_stable was already set). Example prog: # ./bpftool p d x i 1655 0: (b7) r3 = 0 1: (18) r2 = map[id:526] 3: (85) call bpf_tail_call#12 4: (b7) r0 = 1 5: (95) exit Before: # ./bpftool p d j i 1655 0xffffffffc076e55c: 0: nopl 0x0(%rax,%rax,1) 5: push %rbp 6: mov %rsp,%rbp 9: sub $0x200,%rsp 10: push %rbx 11: push %r13 13: push %r14 15: push %r15 17: pushq $0x0 _ 19: xor %edx,%edx |_ index (arg 3) 1b: movabs $0xffff88d95cc82600,%rsi |_ map (arg 2) 25: mov %edx,%edx | index >= array->map.max_entries 27: cmp %edx,0x24(%rsi) | 2a: jbe 0x0000000000000066 |_ 2c: mov -0x224(%rbp),%eax | tail call limit check 32: cmp $0x20,%eax | 35: ja 0x0000000000000066 | 37: add $0x1,%eax | 3a: mov %eax,-0x224(%rbp) |_ 40: mov 0xd0(%rsi,%rdx,8),%rax |_ prog = array->ptrs[index] 48: test %rax,%rax | prog == NULL check 4b: je 0x0000000000000066 |_ 4d: mov 0x30(%rax),%rax | goto *(prog->bpf_func + prologue_size) 51: add $0x19,%rax | 55: callq 0x0000000000000061 | retpoline for indirect jump 5a: pause | 5c: lfence | 5f: jmp 0x000000000000005a | 61: mov %rax,(%rsp) | 65: retq |_ 66: mov $0x1,%eax 6b: pop %rbx 6c: pop %r15 6e: pop %r14 70: pop %r13 72: pop %rbx 73: leaveq 74: retq After; state after JIT: # ./bpftool p d j i 1655 0xffffffffc08e8930: 0: nopl 0x0(%rax,%rax,1) 5: push %rbp 6: mov %rsp,%rbp 9: sub $0x200,%rsp 10: push %rbx 11: push %r13 13: push %r14 15: push %r15 17: pushq $0x0 _ 19: xor %edx,%edx |_ index (arg 3) 1b: movabs $0xffff9d8afd74c000,%rsi |_ map (arg 2) 25: mov -0x224(%rbp),%eax | tail call limit check 2b: cmp $0x20,%eax | 2e: ja 0x000000000000003e | 30: add $0x1,%eax | 33: mov %eax,-0x224(%rbp) |_ 39: jmpq 0xfffffffffffd1785 |_ [direct] goto *(prog->bpf_func + prologue_size) 3e: mov $0x1,%eax 43: pop %rbx 44: pop %r15 46: pop %r14 48: pop %r13 4a: pop %rbx 4b: leaveq 4c: retq After; state after map update (target prog): # ./bpftool p d j i 1655 0xffffffffc08e8930: 0: nopl 0x0(%rax,%rax,1) 5: push %rbp 6: mov %rsp,%rbp 9: sub $0x200,%rsp 10: push %rbx 11: push %r13 13: push %r14 15: push %r15 17: pushq $0x0 19: xor %edx,%edx 1b: movabs $0xffff9d8afd74c000,%rsi 25: mov -0x224(%rbp),%eax 2b: cmp $0x20,%eax . 2e: ja 0x000000000000003e . 30: add $0x1,%eax . 33: mov %eax,-0x224(%rbp) |_ 39: jmpq 0xffffffffffb09f55 |_ goto *(prog->bpf_func + prologue_size) 3e: mov $0x1,%eax 43: pop %rbx 44: pop %r15 46: pop %r14 48: pop %r13 4a: pop %rbx 4b: leaveq 4c: retq After; state after map update (no prog): # ./bpftool p d j i 1655 0xffffffffc08e8930: 0: nopl 0x0(%rax,%rax,1) 5: push %rbp 6: mov %rsp,%rbp 9: sub $0x200,%rsp 10: push %rbx 11: push %r13 13: push %r14 15: push %r15 17: pushq $0x0 19: xor %edx,%edx 1b: movabs $0xffff9d8afd74c000,%rsi 25: mov -0x224(%rbp),%eax 2b: cmp $0x20,%eax . 2e: ja 0x000000000000003e . 30: add $0x1,%eax . 33: mov %eax,-0x224(%rbp) |_ 39: nopl 0x0(%rax,%rax,1) |_ fall-through nop 3e: mov $0x1,%eax 43: pop %rbx 44: pop %r15 46: pop %r14 48: pop %r13 4a: pop %rbx 4b: leaveq 4c: retq Nice bonus is that this also shrinks the code emission quite a bit for every tail call invocation. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/6ada4c1c9d35eeb5f4ecfab94593dafa6b5c4b09.1574452833.git.daniel@iogearbox.net commit d2e4c1e6c2947269346054ac8937ccfe9e0bcc6b Author: Daniel Borkmann Date: Fri Nov 22 21:07:59 2019 +0100 bpf: Constant map key tracking for prog array pokes Add tracking of constant keys into tail call maps. The signature of bpf_tail_call_proto is that arg1 is ctx, arg2 map pointer and arg3 is a index key. The direct call approach for tail calls can be enabled if the verifier asserted that for all branches leading to the tail call helper invocation, the map pointer and index key were both constant and the same. Tracking of map pointers we already do from prior work via c93552c443eb ("bpf: properly enforce index mask to prevent out-of-bounds speculation") and 09772d92cd5a ("bpf: avoid retpoline for lookup/update/ delete calls on maps"). Given the tail call map index key is not on stack but directly in the register, we can add similar tracking approach and later in fixup_bpf_calls() add a poke descriptor to the progs poke_tab with the relevant information for the JITing phase. We internally reuse insn->imm for the rewritten BPF_JMP | BPF_TAIL_CALL instruction in order to point into the prog's poke_tab, and keep insn->imm as 0 as indicator that current indirect tail call emission must be used. Note that publishing to the tracker must happen at the end of fixup_bpf_calls() since adding elements to the poke_tab reallocates its memory, so we need to wait until its in final state. Future work can generalize and add similar approach to optimize plain array map lookups. Difference there is that we need to look into the key value that sits on stack. For clarity in bpf_insn_aux_data, map_state has been renamed into map_ptr_state, so we get map_{ptr,key}_state as trackers. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/e8db37f6b2ae60402fa40216c96738ee9b316c32.1574452833.git.daniel@iogearbox.net commit da765a2f599304a81a25e77908d1790414ecdbb6 Author: Daniel Borkmann Date: Fri Nov 22 21:07:58 2019 +0100 bpf: Add poke dependency tracking for prog array maps This work adds program tracking to prog array maps. This is needed such that upon prog array updates/deletions we can fix up all programs which make use of this tail call map. We add ops->map_poke_{un,}track() helpers to maps to maintain the list of programs and ops->map_poke_run() for triggering the actual update. bpf_array_aux is extended to contain the list head and poke_mutex in order to serialize program patching during updates/deletions. bpf_free_used_maps() will untrack the program shortly before dropping the reference to the map. For clearing out the prog array once all urefs are dropped we need to use schedule_work() to have a sleepable context. The prog_array_map_poke_run() is triggered during updates/deletions and walks the maintained prog list. It checks in their poke_tabs whether the map and key is matching and runs the actual bpf_arch_text_poke() for patching in the nop or new jmp location. Depending on the type of update, we use one of BPF_MOD_{NOP_TO_JUMP,JUMP_TO_NOP,JUMP_TO_JUMP}. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1fb364bb3c565b3e415d5ea348f036ff379e779d.1574452833.git.daniel@iogearbox.net commit a66886fe6c24ebeeb6dc10fbd9b75158029eacf7 Author: Daniel Borkmann Date: Fri Nov 22 21:07:57 2019 +0100 bpf: Add initial poke descriptor table for jit images Add initial poke table data structures and management to the BPF prog that can later be used by JITs. Also add an instance of poke specific data for tail call maps; plan for later work is to extend this also for BPF static keys. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1db285ec2ea4207ee0455b3f8e191a4fc58b9ade.1574452833.git.daniel@iogearbox.net commit 2beee5f57441413b64a9c2bd657e17beabb98d1c Author: Daniel Borkmann Date: Fri Nov 22 21:07:56 2019 +0100 bpf: Move owner type, jited info into array auxiliary data We're going to extend this with further information which is only relevant for prog array at this point. Given this info is not used in critical path, move it into its own structure such that the main array map structure can be kept on diet. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/b9ddccdb0f6f7026489ee955f16c96381e1e7238.1574452833.git.daniel@iogearbox.net commit 6332be04c039a72fca32ed0a4265bac58d606bb6 Author: Daniel Borkmann Date: Fri Nov 22 21:07:55 2019 +0100 bpf: Move bpf_free_used_maps into sleepable section We later on are going to need a sleepable context as opposed to plain RCU callback in order to untrack programs we need to poke at runtime and tracking as well as image update is performed under mutex. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/09823b1d5262876e9b83a8e75df04cf0467357a4.1574452833.git.daniel@iogearbox.net commit 4b3da77b72ad6b3c48c6fe4a395ace7db39a12c5 Author: Daniel Borkmann Date: Fri Nov 22 21:07:54 2019 +0100 bpf, x86: Generalize and extend bpf_arch_text_poke for direct jumps Add BPF_MOD_{NOP_TO_JUMP,JUMP_TO_JUMP,JUMP_TO_NOP} patching for x86 JIT in order to be able to patch direct jumps or nop them out. We need this facility in order to patch tail call jumps and in later work also BPF static keys. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/aa4784196a8e5e985af4b30a4fe5336bce6e9643.1574452833.git.daniel@iogearbox.net commit c4781e37c6a22c39cb4a57411d14f42aca124f04 Author: Alexei Starovoitov Date: Thu Nov 21 17:15:15 2019 -0800 selftests/bpf: Add BPF trampoline performance test Add a test that benchmarks different ways of attaching BPF program to a kernel function. Here are the results for 2.4Ghz x86 cpu on a kernel without mitigations: $ ./test_progs -n 49 -v|grep events task_rename base 2743K events per sec task_rename kprobe 2419K events per sec task_rename kretprobe 1876K events per sec task_rename raw_tp 2578K events per sec task_rename fentry 2710K events per sec task_rename fexit 2685K events per sec On a kernel with retpoline: $ ./test_progs -n 49 -v|grep events task_rename base 2401K events per sec task_rename kprobe 1930K events per sec task_rename kretprobe 1485K events per sec task_rename raw_tp 2053K events per sec task_rename fentry 2351K events per sec task_rename fexit 2185K events per sec All 5 approaches: - kprobe/kretprobe in __set_task_comm() - raw tracepoint in trace_task_rename() - fentry/fexit in __set_task_comm() are roughly equivalent. __set_task_comm() by itself is quite fast, so any extra instructions add up. Until BPF trampoline was introduced the fastest mechanism was raw tracepoint. kprobe via ftrace was second best. kretprobe is slow due to trap. New fentry/fexit methods via BPF trampoline are clearly the fastest and the difference is more pronounced with retpoline on, since BPF trampoline doesn't use indirect jumps. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20191122011515.255371-1-ast@kernel.org commit 161f3cbcda06aa70faed6b703066fedbd7653e23 Merge: 6147a140c99f 260cb5df9d16 Author: Alexei Starovoitov Date: Fri Nov 22 10:29:38 2019 -0800 Merge branch 'jmp32-reg-bounds' Yonghong Song says: ==================== With latest llvm, bpf selftest test_progs, which has +alu32 enabled, failed for strobemeta.o and a few other subtests. The reason is due to that verifier did not provide better var_off.mask after jmp32 instructions. This patch set addressed this issue and after the fix, test_progs passed with alu32. Patch #1 provided detailed explanation of the problem and the fix. Patch #2 added three tests in test_verifier. Changelog: v1 -> v2: - do not directly manipulate tnum.{value,mask} in __reg_bound_offset32(), using tnum_lshift/tnum_rshift functions instead - do __reg_bound_offset32() after regular 64bit __reg_bound_offset() since the latter may give a better upper 32bit var_off, which can be inherited by __reg_bound_offset32(). ==================== Signed-off-by: Alexei Starovoitov commit 6147a140c99f1ded2b519dfbed17e781e5861bf3 Author: Andrii Nakryiko Date: Thu Nov 21 09:59:00 2019 -0800 selftests/bpf: Ensure core_reloc_kernel is reading test_progs's data only test_core_reloc_kernel.c selftest is the only CO-RE test that reads and returns for validation calling thread's information (pid, tgid, comm). Thus it has to make sure that only test_prog's invocations are honored. Fixes: df36e621418b ("selftests/bpf: add CO-RE relocs testing setup") Reported-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20191121175900.3486133-1-andriin@fb.com commit 260cb5df9d16c5715b32d73cc8af26ad9a17a792 Author: Yonghong Song Date: Thu Nov 21 09:06:51 2019 -0800 selftests/bpf: Add verifier tests for better jmp32 register bounds Three test cases are added. Test 1: jmp32 'reg op imm'. Test 2: jmp32 'reg op reg' where dst 'reg' has unknown constant and src 'reg' has known constant Test 3: jmp32 'reg op reg' where dst 'reg' has known constant and src 'reg' has unknown constant Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191121170651.449096-1-yhs@fb.com commit 1aace10f41adf1080d1cc54de9b3db98b8b8b0fb Author: Andrii Nakryiko Date: Thu Nov 21 16:35:27 2019 -0800 libbpf: Fix bpf_object name determination for bpf_object__open_file() If bpf_object__open_file() gets path like "some/dir/obj.o", it should derive BPF object's name as "obj" (unless overriden through opts->object_name). Instead, due to using `path` as a fallback value for opts->obj_name, path is used as is for object name, so for above example BPF object's name will be verbatim "some/dir/obj", which leads to all sorts of troubles, especially when internal maps are concern (they are using up to 8 characters of object name). Fix that by ensuring object_name stays NULL, unless overriden. Fixes: 291ee02b5e40 ("libbpf: Refactor bpf_object__open APIs to use common opts") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191122003527.551556-1-andriin@fb.com commit 581738a681b6faae5725c2555439189ca81c0f1f Author: Yonghong Song Date: Thu Nov 21 09:06:50 2019 -0800 bpf: Provide better register bounds after jmp32 instructions With latest llvm (trunk https://github.com/llvm/llvm-project), test_progs, which has +alu32 enabled, failed for strobemeta.o. The verifier output looks like below with edit to replace large decimal numbers with hex ones. 193: (85) call bpf_probe_read_user_str#114 R0=inv(id=0) 194: (26) if w0 > 0x1 goto pc+4 R0_w=inv(id=0,umax_value=0xffffffff00000001) 195: (6b) *(u16 *)(r7 +80) = r0 196: (bc) w6 = w0 R6_w=inv(id=0,umax_value=0xffffffff,var_off=(0x0; 0xffffffff)) 197: (67) r6 <<= 32 R6_w=inv(id=0,smax_value=0x7fffffff00000000,umax_value=0xffffffff00000000, var_off=(0x0; 0xffffffff00000000)) 198: (77) r6 >>= 32 R6=inv(id=0,umax_value=0xffffffff,var_off=(0x0; 0xffffffff)) ... 201: (79) r8 = *(u64 *)(r10 -416) R8_w=map_value(id=0,off=40,ks=4,vs=13872,imm=0) 202: (0f) r8 += r6 R8_w=map_value(id=0,off=40,ks=4,vs=13872,umax_value=0xffffffff,var_off=(0x0; 0xffffffff)) 203: (07) r8 += 9696 R8_w=map_value(id=0,off=9736,ks=4,vs=13872,umax_value=0xffffffff,var_off=(0x0; 0xffffffff)) ... 255: (bf) r1 = r8 R1_w=map_value(id=0,off=9736,ks=4,vs=13872,umax_value=0xffffffff,var_off=(0x0; 0xffffffff)) ... 257: (85) call bpf_probe_read_user_str#114 R1 unbounded memory access, make sure to bounds check any array access into a map The value range for register r6 at insn 198 should be really just 0/1. The umax_value=0xffffffff caused later verification failure. After jmp instructions, the current verifier already tried to use just obtained information to get better register range. The current mechanism is for 64bit register only. This patch implemented to tighten the range for 32bit sub-registers after jmp32 instructions. With the patch, we have the below range ranges for the above code sequence: 193: (85) call bpf_probe_read_user_str#114 R0=inv(id=0) 194: (26) if w0 > 0x1 goto pc+4 R0_w=inv(id=0,smax_value=0x7fffffff00000001,umax_value=0xffffffff00000001, var_off=(0x0; 0xffffffff00000001)) 195: (6b) *(u16 *)(r7 +80) = r0 196: (bc) w6 = w0 R6_w=inv(id=0,umax_value=0xffffffff,var_off=(0x0; 0x1)) 197: (67) r6 <<= 32 R6_w=inv(id=0,umax_value=0x100000000,var_off=(0x0; 0x100000000)) 198: (77) r6 >>= 32 R6=inv(id=0,umax_value=1,var_off=(0x0; 0x1)) ... 201: (79) r8 = *(u64 *)(r10 -416) R8_w=map_value(id=0,off=40,ks=4,vs=13872,imm=0) 202: (0f) r8 += r6 R8_w=map_value(id=0,off=40,ks=4,vs=13872,umax_value=1,var_off=(0x0; 0x1)) 203: (07) r8 += 9696 R8_w=map_value(id=0,off=9736,ks=4,vs=13872,umax_value=1,var_off=(0x0; 0x1)) ... 255: (bf) r1 = r8 R1_w=map_value(id=0,off=9736,ks=4,vs=13872,umax_value=1,var_off=(0x0; 0x1)) ... 257: (85) call bpf_probe_read_user_str#114 ... At insn 194, the register R0 has better var_off.mask and smax_value. Especially, the var_off.mask ensures later lshift and rshift maintains proper value range. Suggested-by: Alexei Starovoitov Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191121170650.449030-1-yhs@fb.com commit 071cdecec57fb5d5df78e6a12114ad7bccea5b0e Author: Toke Høiland-Jørgensen Date: Thu Nov 21 14:36:12 2019 +0100 xdp: Fix cleanup on map free for devmap_hash map type Tetsuo pointed out that it was not only the device unregister hook that was broken for devmap_hash types, it was also cleanup on map free. So better fix this as well. While we're at it, there's no reason to allocate the netdev_map array for DEVMAP_HASH, so skip that and adjust the cost accordingly. Fixes: 6f9d451ab1a3 ("xdp: Add devmap_hash map type for looking up devices by hashed index") Reported-by: Tetsuo Handa Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20191121133612.430414-1-toke@redhat.com commit 1f60750401c7672419e1b606e2b73727c1f8626c Merge: a8fdaad5cfd2 393cdfbee809 Author: Alexei Starovoitov Date: Thu Nov 21 09:12:52 2019 -0800 Merge branch 'libbpf-global-vars' Andrii Nakryiko says: ==================== This patch set salvages all the non-extern-specific changes out of blocked externs patch set ([0]). In addition to small clean ups, it also refactors libbpf's handling of relocations and allows support for global (non-static) variables. [0] https://patchwork.ozlabs.org/project/netdev/list/?series=143358&state=* ==================== Signed-off-by: Alexei Starovoitov commit a8fdaad5cfd250b9effcec942b3bf7bc5a6c8b17 Author: Andrii Nakryiko Date: Tue Nov 19 16:35:48 2019 -0800 selftests/bpf: Integrate verbose verifier log into test_progs Add exra level of verboseness, activated by -vvv argument. When -vv is specified, verbose libbpf and verifier log (level 1) is output, even for successful tests. With -vvv, verifier log goes to level 2. This is extremely useful to debug verifier failures, as well as just see the state and flow of verification. Before this, you'd have to go and modify load_program()'s source code inside libbpf to specify extra log_level flags, which is suboptimal to say the least. Currently -vv and -vvv triggering verifier output is integrated into test_stub's bpf_prog_load as well as bpf_verif_scale.c tests. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191120003548.4159797-1-andriin@fb.com commit 393cdfbee809891dc6ba859a44cc6441fa8dce9e Author: Andrii Nakryiko Date: Wed Nov 20 23:07:43 2019 -0800 libbpf: Support initialized global variables Initialized global variables are no different in ELF from static variables, and don't require any extra support from libbpf. But they are matching semantics of global data (backed by BPF maps) more closely, preventing LLVM/Clang from aggressively inlining constant values and not requiring volatile incantations to prevent those. This patch enables global variables. It still disables uninitialized variables, which will be put into special COM (common) ELF section, because BPF doesn't allow uninitialized data to be accessed. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191121070743.1309473-5-andriin@fb.com commit 5940c5bf6504f66f57f03f1d0046abfaf2198b3a Author: Jakub Kicinski Date: Tue Nov 19 10:50:10 2019 +0000 selftests, bpftool: Skip the build test if not in tree If selftests are copied over to another machine/location for execution the build test of bpftool will obviously not work, since the sources are not copied. Skip it if we can't find bpftool's Makefile. Reported-by: Naresh Kamboju Signed-off-by: Jakub Kicinski Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191119105010.19189-3-quentin.monnet@netronome.com commit 8983b731ceb42939acaa6158abcf8adb56f834bf Author: Andrii Nakryiko Date: Wed Nov 20 23:07:42 2019 -0800 libbpf: Fix various errors and warning reported by checkpatch.pl Fix a bunch of warnings and errors reported by checkpatch.pl, to make it easier to spot new problems. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191121070743.1309473-4-andriin@fb.com commit 31f8b8295bb8997f139fe34b68654f8f1408f0da Author: Quentin Monnet Date: Tue Nov 19 10:50:09 2019 +0000 selftests, bpftool: Set EXIT trap after usage function The trap on EXIT is used to clean up any temporary directory left by the build attempts. It is not needed when the user simply calls the script with its --help option, and may not be needed either if we add checks (e.g. on the availability of bpftool files) before the build attempts. Let's move this trap and related variables lower down in the code, so that we don't accidentally change the value returned from the script on early exits at pre-checks. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/20191119105010.19189-2-quentin.monnet@netronome.com commit 1f8e2bcb2cd5ee1a731fb625a5438e2c305f6a7c Author: Andrii Nakryiko Date: Wed Nov 20 23:07:41 2019 -0800 libbpf: Refactor relocation handling Relocation handling code is convoluted and unnecessarily deeply nested. Split out per-relocation logic into separate function. Also refactor the logic to be more a sequence of per-relocation type checks and processing steps, making it simpler to follow control flow. This makes it easier to further extends it to new kinds of relocations (e.g., support for extern variables). This patch also makes relocation's section verification more robust. Previously relocations against not yet supported externs were silently ignored because of obj->efile.text_shndx was zero, when all BPF programs had custom section names and there was no .text section. Also, invalid LDIMM64 relocations against non-map sections were passed through, if they were pointing to a .text section (or 0, which is invalid section). All these bugs are fixed within this refactoring and checks are made more appropriate for each type of relocation. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191121070743.1309473-3-andriin@fb.com commit a89b2cbf71d64b61e79bbe5cb7ff4664797eeaaf Author: Quentin Monnet Date: Tue Nov 19 10:56:26 2019 +0000 tools, bpf: Fix build for 'make -s tools/bpf O=' Building selftests with 'make TARGETS=bpf kselftest' was fixed in commit 55d554f5d140 ("tools: bpf: Use !building_out_of_srctree to determine srctree"). However, by updating $(srctree) in tools/bpf/Makefile for in-tree builds only, we leave out the case where we pass an output directory to build BPF tools, but $(srctree) is not set. This typically happens for: $ make -s tools/bpf O=/tmp/foo Makefile:40: /tools/build/Makefile.feature: No such file or directory Fix it by updating $(srctree) in the Makefile not only for out-of-tree builds, but also if $(srctree) is empty. Detected with test_bpftool_build.sh. Fixes: 55d554f5d140 ("tools: bpf: Use !building_out_of_srctree to determine srctree") Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/20191119105626.21453-1-quentin.monnet@netronome.com commit ffc88174cdcf5f51fb7f6298fe9203a36c904f1f Author: Andrii Nakryiko Date: Wed Nov 20 23:07:40 2019 -0800 selftests/bpf: Ensure no DWARF relocations for BPF object files Add -mattr=dwarfris attribute to llc to avoid having relocations against DWARF data. These relocations make it impossible to inspect DWARF contents: all strings are invalid. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191121070743.1309473-2-andriin@fb.com commit a0f17cc6665c80ab2765f9244c41ec127821f343 Author: Quentin Monnet Date: Tue Nov 19 11:17:06 2019 +0000 tools, bpftool: Fix warning on ignored return value for 'read' When building bpftool, a warning was introduced by commit a94364603610 ("bpftool: Allow to read btf as raw data"), because the return value from a call to 'read()' is ignored. Let's address it. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Kicinski Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191119111706.22440-1-quentin.monnet@netronome.com commit 5d946c5abbaf68083fa6a41824dd79e1f06286d8 Author: Luc Van Oostenryck Date: Wed Nov 20 01:10:42 2019 +0100 xsk: Fix xsk_poll()'s return type xsk_poll() is defined as returning 'unsigned int' but the .poll method is declared as returning '__poll_t', a bitwise type. Fix this by using the proper return type and using the EPOLL constants instead of the POLL ones, as required for __poll_t. Signed-off-by: Luc Van Oostenryck Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20191120001042.30830-1-luc.vanoostenryck@gmail.com commit c392bccf2c1075b5d2cc9022d0116a516acb721d Author: Eric Dumazet Date: Wed Nov 20 12:14:51 2019 +1100 powerpc: Add const qual to local_read() parameter A patch in net-next triggered a compile error on powerpc: include/linux/u64_stats_sync.h: In function 'u64_stats_read': include/asm-generic/local64.h:30:37: warning: passing argument 1 of 'local_read' discards 'const' qualifier from pointer target type This seems reasonable to relax powerpc local_read() requirements. Fixes: 316580b69d0a ("u64_stats: provide u64_stats_t type") Signed-off-by: Eric Dumazet Reported-by: kbuild test robot Acked-by: Michael Ellerman Tested-by: Stephen Rothwell # build only Signed-off-by: Jakub Kicinski commit c98dfcd306cc64e21f27fcc473f7b0b7b0da9cbb Merge: ab44081fef9b d168f328fecc Author: Jakub Kicinski Date: Sun Nov 24 14:50:43 2019 -0800 Merge branch 'bnxt_en-Updates' Michael Chan says: ==================== bnxt_en: Updates. This patchset contains these main features: 1. Add the proper logic to support suspend/resume on the new 57500 chips. 2. Allow Phy configurations from user on a Multihost function if supported by fw. 3. devlink NVRAM flashing support. 4. Add a couple of chip IDs, PHY loopback enhancement, and provide more RSS contexts to VFs. v2: Dropped the devlink info patches to address some feedback and resubmit for the 5.6 kernel. ==================== Signed-off-by: Jakub Kicinski commit d168f328fecc9f401b54db18ff4ddd4bca7b161d Author: Vasundhara Volam Date: Sat Nov 23 22:30:50 2019 -0500 bnxt_en: Add support for flashing the device via devlink Use the same bnxt_flash_package_from_file() function to support devlink flash operation. Cc: Jiri Pirko Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit c7e457f42c02066e49a6e03028c889aefbb8999b Author: Michael Chan Date: Sat Nov 23 22:30:49 2019 -0500 bnxt_en: Allow PHY settings on multi-function or NPAR PFs if allowed by FW. Currently, the driver does not allow PHY settings on a multi-function or NPAR NIC whose port is shared by more than one function. Newer firmware now allows PHY settings on some of these NICs. Check for this new firmware setting and allow the user to set the PHY settings accordingly. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit b1613e78e98d065fd3356d0b93df665b0740f652 Author: Michael Chan Date: Sat Nov 23 22:30:48 2019 -0500 bnxt_en: Add async. event logic for PHY configuration changes. If the link settings have been changed by another function sharing the port, firmware will send us an async. message. In response, we will call the new bnxt_init_ethtool_link_settings() function to update the current settings. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 8119e49b68fa1ec778f9ec8be05b5492046100b2 Author: Michael Chan Date: Sat Nov 23 22:30:47 2019 -0500 bnxt_en: Refactor the initialization of the ethtool link settings. Refactor this logic in bnxt_probe_phy() into a separate function bnxt_init_ethtool_link_settings(). It used to be that the settable link settings will never be changed without going through ethtool. So we only needed to do this once in bnxt_probe_phy(). Now, another function sharing the port may change it and we may need to re-initialize the ethtool settings again in run-time. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 8a60efd1decbaf9ef71d4296b75ff262e653bd34 Author: Michael Chan Date: Sat Nov 23 22:30:46 2019 -0500 bnxt_en: Skip disabling autoneg before PHY loopback when appropriate. New firmware allows PHY loopback to be set without disabling autoneg first. Check this capability and skip disabling autoneg when it is supported by firmware. Using this scheme, loopback will always work even if the PHY only supports autoneg. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 1acefc9aedb3179fc9add0a21fa62c0aca08efc4 Author: Michael Chan Date: Sat Nov 23 22:30:45 2019 -0500 bnxt_en: Assign more RSS context resources to the VFs. The driver currently only assignes 1 RSS context to each VF. This works for the Linux VF driver. But other drivers, such as DPDK, can make use of additional RSS contexts. Modify the code to divide up and assign RSS contexts to VFs just like other resources. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 3be8136ce14ea12c7b40f7ad20a5ff8aec339289 Author: Michael Chan Date: Sat Nov 23 22:30:44 2019 -0500 bnxt_en: Initialize context memory to the value specified by firmware. Some chips that need host context memory as a backing store requires the memory to be initialized to a non-zero value. Query the value from firmware and initialize the context memory accordingly. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit f9b69d7f62796b33657c98e0d3ca3be763f70fa4 Author: Vasundhara Volam Date: Sat Nov 23 22:30:43 2019 -0500 bnxt_en: Fix suspend/resume path on 57500 chips Driver calls HWRM_FUNC_RESET firmware call while resuming the device which clears the context memory backing store. Because of which allocating firmware resources would eventually fail. Fix it by freeing all context memory during suspend and reallocate the memory during resume. Call bnxt_hwrm_queue_qportcfg() in resume path. This firmware call is needed on the 57500 chips so that firmware will set up the proper queue mapping in relation to the context memory. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit f92335d830059f3f9db950f0af49405d287924d5 Author: Vasundhara Volam Date: Sat Nov 23 22:30:42 2019 -0500 bnxt_en: Send FUNC_RESOURCE_QCAPS command in bnxt_resume() After driver unregister, firmware is erasing the information that driver supports new resource management. Send FUNC_RESOURCE_QCAPS command to inform the firmware that driver supports new resource management while resuming from hibernation. Otherwise, we fallback to the older resource allocation scheme. Also, move driver register after sending FUNC_RESOURCE_QCAPS command to be consistent with the normal initialization sequence. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 2e882468fce263afef4a77ea4fe40808baaddae7 Author: Vasundhara Volam Date: Sat Nov 23 22:30:41 2019 -0500 bnxt_en: Combine 2 functions calling the same HWRM_DRV_RGTR fw command. Everytime driver registers with firmware, driver is required to register for async event notifications as well. These 2 calls are done using the same firmware command and can be combined. We are also missing the 2nd step to register for async events in the suspend/resume path and this will fix it. Prior to this, we were getting only default notifications. ULP can register for additional async events for the RDMA driver, so we add a parameter to the new function to only do step 2 when it is called from ULP. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit bdb3860236b3ec8bb0f55ddef6d62666a8b3b23e Author: Vasundhara Volam Date: Sat Nov 23 22:30:40 2019 -0500 bnxt_en: Do driver unregister cleanup in bnxt_init_one() failure path. In the bnxt_init_one() failure path, if the driver has already called firmware to register the driver, it is not undoing the driver registration. Add this missing step to unregister for correctness, so that the firmware knows that the driver has unloaded. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit ef02af8c8ece3d6fb01fe267c1c7622399bc34f6 Author: Michael Chan Date: Sat Nov 23 22:30:39 2019 -0500 bnxt_en: Disable/enable Bus master during suspend/resume. Disable Bus master during suspend to prevent DMAs after the device goes into D3hot state. The new 57500 devices may continue to DMA from context memory after the system goes into D3hot state. This may cause some PCIe errors on some system. Re-enable it during resume. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit fb4cd81e4c03efa54b82e81e2a4afc092c061384 Author: Michael Chan Date: Sat Nov 23 22:30:38 2019 -0500 bnxt_en: Add chip IDs for 57452 and 57454 chips. Fix BNXT_CHIP_NUM_5645X() to include 57452 and 56454 chip IDs, so that these chips will be properly classified as P4 chips to take advantage of the P4 fixes and features. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit ab44081fef9b5d31ea5641494c9a379b0ebe1839 Author: Jakub Kicinski Date: Sat Nov 23 09:45:42 2019 -0800 sfc: fix build without CONFIG_RFS_ACCEL The rfs members of struct efx_channel are under CONFIG_RFS_ACCEL. Ethtool stats which access those need to be as well. Reported-by: kbuild test robot Fixes: ca70bd423f10 ("sfc: add statistics for ARFS") Signed-off-by: Jakub Kicinski commit 23c1cce9f3174db9cdc91346cb4320fa6b97e35d Author: Krzysztof Kozlowski Date: Thu Nov 21 04:20:16 2019 +0100 xen: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit c6b6fc206586cc07a18595d2a3d815a806a057d0 Author: Takashi Iwai Date: Sun Nov 24 09:39:24 2019 +0100 ALSA: aloop: Fix dependency on timer API An explicit Kconfig dependency is missing for the recent addition of the timer support. CONFIG_SND_TIMER isn't always selected by SND_PCM. Fixes: 26c53379f98d ("ALSA: aloop: Support selection of snd_timer instead of jiffies") Reported-by: kbuild test robot Link: https://lore.kernel.org/r/20191124083924.14049-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3dcb5fa23e16ef50b09e7a56b47d8e4c04ca09c0 Author: Chengguang Xu Date: Tue Nov 19 19:50:49 2019 +0800 erofs: remove unnecessary output in erofs_show_options() We have already handled cache_strategy option carefully, so incorrect setting could not pass option parsing. Meanwhile, print 'cache_strategy=(unknown)' can cause failure on remount. Link: https://lore.kernel.org/r/20191119115049.3401-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 0c638f70d7310f961a3482108c9d7ce15fcba8b3 Author: Gao Xiang Date: Fri Nov 8 11:37:33 2019 +0800 erofs: drop all vle annotations for runtime names VLE was an old informal name of fixed-sized output compression which came from published ATC'19 paper [1]. Drop those old annotations since erofs can handle all encoded clusters in block-aligned basis, which is wider than fixed-sized output compression after larger clustersize feature is fully implemented. Unaligned encoding won't be considered in EROFS since it's not friendly to inplace I/O and perhaps decompression inplace. a) Fixed-sized output compression with 16KB pcluster: ___________________________________ |xxxxxxxx|xxxxxxxx|xxxxxxxx|xxxxxxxx| |___ 0___|___ 1___|___ 2___|___ 3___| physical blocks b) Block-aligned fixed-sized input compression with 16KB pcluster: ___________________________________ |xxxxxxxx|xxxxxxxx|xxxxxxxx|xxx00000| |___ 0___|___ 1___|___ 2___|___ 3___| physical blocks c) Block-unaligned fixed-sized input compression with 16KB compression unit: ____________________________________________ |..xxxxxx|xxxxxxxx|xxxxxxxx|xxxxxxxx|x.......| |___ 0___|___ 1___|___ 2___|___ 3___|___ 4___| physical blocks Refine better names for those as well. [1] https://www.usenix.org/conference/atc19/presentation/gao Link: https://lore.kernel.org/r/20191108033733.63919-1-gaoxiang25@huawei.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit b858a4844cfba3d90a8d8ffd3a04d9557f76b60f Author: Pratik Shinde Date: Mon Nov 4 10:49:37 2019 +0800 erofs: support superblock checksum Introduce superblock checksum feature in order to check at mounting time. Note that the first 1024 bytes are ignore for x86 boot sectors and other oddities. Link: https://lore.kernel.org/r/20191104024937.113939-1-gaoxiang25@huawei.com Signed-off-by: Pratik Shinde Reviewed-by: Chao Yu Cc: Dan Carpenter Signed-off-by: Gao Xiang commit a93f8c36877b2ae9ba0ca07eda1933944dc5bcb8 Author: Gao Xiang Date: Tue Oct 8 20:56:16 2019 +0800 erofs: set iowait for sync decompression For those tasks waiting I/O for sync decompression, they should be better marked as IO wait state. Link: https://lore.kernel.org/r/20191008125616.183715-5-gaoxiang25@huawei.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit a4b1fab121ec3235e6c5f3543ae1937426bd4eb4 Author: Gao Xiang Date: Tue Oct 8 20:56:15 2019 +0800 erofs: clean up decompress queue stuffs Previously, both z_erofs_unzip_io and z_erofs_unzip_io_sb record decompress queues for backend to use. The only difference is that z_erofs_unzip_io is used for on-stack sync decompression so that it doesn't have a super block field (since the caller can pass it in its context), but it increases complexity with only a pointer saving. Rename z_erofs_unzip_io to z_erofs_decompressqueue with a fixed super_block member and kill the other entirely, and it can fallback to sync decompression if memory allocation failure. Link: https://lore.kernel.org/r/20191008125616.183715-4-gaoxiang25@huawei.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 5ddcee1f3a1ccaccb31bc17080f75a0bb13b4906 Author: Gao Xiang Date: Thu Nov 21 21:59:54 2019 +0800 erofs: get rid of __stagingpage_alloc helper Now open code is much cleaner due to iterative development. Link: https://lore.kernel.org/r/20191124025217.12345-1-hsiangkao@aol.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 6f3aeb1ba05d41320e6cf9a60f698d9c4e44348e Author: Stephen Hemminger Date: Sat Nov 23 15:50:17 2019 -0800 hv_netvsc: make recording RSS hash depend on feature flag The recording of RSS hash should be controlled by NETIF_F_RXHASH. Fixes: 1fac7ca4e63b ("hv_netvsc: record hardware hash in skb") Suggested-by: Eric Dumazet Signed-off-by: Stephen Hemminger Signed-off-by: Haiyang Zhang Reviewed-by: Michael Kelley Signed-off-by: Jakub Kicinski commit 312434617cb16be5166316cf9d08ba760b1042a1 Author: Xin Long Date: Sat Nov 23 11:56:49 2019 +0800 sctp: cache netns in sctp_ep_common This patch is to fix a data-race reported by syzbot: BUG: KCSAN: data-race in sctp_assoc_migrate / sctp_hash_obj write to 0xffff8880b67c0020 of 8 bytes by task 18908 on cpu 1: sctp_assoc_migrate+0x1a6/0x290 net/sctp/associola.c:1091 sctp_sock_migrate+0x8aa/0x9b0 net/sctp/socket.c:9465 sctp_accept+0x3c8/0x470 net/sctp/socket.c:4916 inet_accept+0x7f/0x360 net/ipv4/af_inet.c:734 __sys_accept4+0x224/0x430 net/socket.c:1754 __do_sys_accept net/socket.c:1795 [inline] __se_sys_accept net/socket.c:1792 [inline] __x64_sys_accept+0x4e/0x60 net/socket.c:1792 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffff8880b67c0020 of 8 bytes by task 12003 on cpu 0: sctp_hash_obj+0x4f/0x2d0 net/sctp/input.c:894 rht_key_get_hash include/linux/rhashtable.h:133 [inline] rht_key_hashfn include/linux/rhashtable.h:159 [inline] rht_head_hashfn include/linux/rhashtable.h:174 [inline] head_hashfn lib/rhashtable.c:41 [inline] rhashtable_rehash_one lib/rhashtable.c:245 [inline] rhashtable_rehash_chain lib/rhashtable.c:276 [inline] rhashtable_rehash_table lib/rhashtable.c:316 [inline] rht_deferred_worker+0x468/0xab0 lib/rhashtable.c:420 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 worker_thread+0xa0/0x800 kernel/workqueue.c:2415 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 It was caused by rhashtable access asoc->base.sk when sctp_assoc_migrate is changing its value. However, what rhashtable wants is netns from asoc base.sk, and for an asoc, its netns won't change once set. So we can simply fix it by caching netns since created. Fixes: d6c0256a60e6 ("sctp: add the rhashtable apis for sctp global transport hashtable") Reported-by: syzbot+e3b35fe7918ff0ee474e@syzkaller.appspotmail.com Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit b6631c6031c746ed004c4221ec0616d7a520f441 Author: Navid Emamdoost Date: Fri Nov 22 16:17:56 2019 -0600 sctp: Fix memory leak in sctp_sf_do_5_2_4_dupcook In the implementation of sctp_sf_do_5_2_4_dupcook() the allocated new_asoc is leaked if security_sctp_assoc_request() fails. Release it via sctp_association_free(). Fixes: 2277c7cd75e3 ("sctp: Add LSM hooks") Signed-off-by: Navid Emamdoost Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit fc5141cb6a60afd81cf53cf4f9bd986f1b846010 Author: Tonghao Zhang Date: Fri Nov 22 20:38:01 2019 +0800 net: gro: use vlan API instead of accessing directly Use vlan common api to access the vlan_tag info. Signed-off-by: Tonghao Zhang Signed-off-by: Jakub Kicinski commit 9520aea75b88f4df4f9cae6b770626a143364ddc Merge: d46b7e4fb060 90ac245814ab Author: Jakub Kicinski Date: Sat Nov 23 16:36:49 2019 -0800 Merge tag 'mlx5-updates-2019-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2019-11-22 1) Misc Cleanups 2) Software steering support for Geneve ==================== Signed-off-by: Jakub Kicinski commit d46b7e4fb06037a61415f5b6964fcf632ee1dc34 Author: Russell King Date: Thu Nov 21 00:36:22 2019 +0000 net: phylink: rename mac_link_state() op to mac_pcs_get_state() Rename the mac_link_state() method to mac_pcs_get_state() to make it clear that it should be returning the MACs PCS current state, which is used for inband negotiation rather than just reading back what the MAC has been configured for. Update the documentation to explicitly mention that this is for inband. We drop the return value as well; most of phylink doesn't check the return value and it is not clear what it should do on error - instead arrange for state->link to be false. Signed-off-by: Russell King Signed-off-by: Jakub Kicinski commit 93f4e735b6d98ee4b7a1252d81e815a983e359f2 Author: Christoph Hellwig Date: Wed Nov 13 14:45:28 2019 +0100 mm/hmm: remove hmm_range_dma_map and hmm_range_dma_unmap These two functions have never been used since they were added. Link: https://lore.kernel.org/r/20191113134528.21187-1-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: John Hubbard Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit d28c2c9a487708b9db519ce7fedc10333032c76b Author: Ralph Campbell Date: Mon Nov 4 14:21:40 2019 -0800 mm/hmm: make full use of walk_page_range() hmm_range_fault() calls find_vma() and walk_page_range() in a loop. This is unnecessary duplication since walk_page_range() calls find_vma() in a loop already. Simplify hmm_range_fault() by defining a walk_test() callback function to filter unhandled vmas. This also fixes a bug where hmm_range_fault() was not checking start >= vma->vm_start before checking vma->vm_flags so hmm_range_fault() could return an error based on the wrong vma for the requested range. It also fixes a bug when the vma has no read access and the caller did not request a fault, there shouldn't be any error return code. Link: https://lore.kernel.org/r/20191104222141.5173-2-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit d3eeb1d77c5d0af9df442db63722928238310a86 Author: Jason Gunthorpe Date: Tue Nov 12 16:22:31 2019 -0400 xen/gntdev: use mmu_interval_notifier_insert gntdev simply wants to monitor a specific VMA for any notifier events, this can be done straightforwardly using mmu_interval_notifier_insert() over the VMA's VA range. The notifier should be attached until the original VMA is destroyed. It is unclear if any of this is even sane, but at least a lot of duplicate code is removed. Link: https://lore.kernel.org/r/20191112202231.3856-15-jgg@ziepe.ca Reviewed-by: Boris Ostrovsky Signed-off-by: Jason Gunthorpe commit a22dd506400d0f4784ad596f073b9eb5ed7c6a2a Author: Jason Gunthorpe Date: Tue Nov 12 16:22:30 2019 -0400 mm/hmm: remove hmm_mirror and related The only two users of this are now converted to use mmu_interval_notifier, delete all the code and update hmm.rst. Link: https://lore.kernel.org/r/20191112202231.3856-14-jgg@ziepe.ca Reviewed-by: Jérôme Glisse Tested-by: Ralph Campbell Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit 81fa1af31b5d79047821def6abdcb97a735d8a52 Author: Jason Gunthorpe Date: Tue Nov 12 16:22:29 2019 -0400 drm/amdgpu: Use mmu_interval_notifier instead of hmm_mirror Convert the collision-retry lock around hmm_range_fault to use the one now provided by the mmu_interval notifier. Although this driver does not seem to use the collision retry lock that hmm provides correctly, it can still be converted over to use the mmu_interval_notifier api instead of hmm_mirror without too much trouble. This also deletes another place where a driver is associating additional data (struct amdgpu_mn) with a mmu_struct. Link: https://lore.kernel.org/r/20191112202231.3856-13-jgg@ziepe.ca Signed-off-by: Philip Yang Reviewed-by: Philip Yang Tested-by: Philip Yang Signed-off-by: Jason Gunthorpe commit 62914a99dee5ac51253a84e7d4a05c18f0c77535 Author: Jason Gunthorpe Date: Tue Nov 12 16:22:28 2019 -0400 drm/amdgpu: Use mmu_interval_insert instead of hmm_mirror Remove the interval tree in the driver and rely on the tree maintained by the mmu_notifier for delivering mmu_notifier invalidation callbacks. For some reason amdgpu has a very complicated arrangement where it tries to prevent duplicate entries in the interval_tree, this is not necessary, each amdgpu_bo can be its own stand alone entry. interval_tree already allows duplicates and overlaps in the tree. Also, there is no need to remove entries upon a release callback, the mmu_interval API safely allows objects to remain registered beyond the lifetime of the mm. The driver only has to stop touching the pages during release. Link: https://lore.kernel.org/r/20191112202231.3856-12-jgg@ziepe.ca Reviewed-by: Philip Yang Tested-by: Philip Yang Signed-off-by: Jason Gunthorpe commit a9ae8731e6e52829a935d81a65d7f925cb95dbac Author: Jason Gunthorpe Date: Tue Nov 12 16:22:27 2019 -0400 drm/amdgpu: Call find_vma under mmap_sem find_vma() must be called under the mmap_sem, reorganize this code to do the vma check after entering the lock. Further, fix the unlocked use of struct task_struct's mm, instead use the mm from hmm_mirror which has an active mm_grab. Also the mm_grab must be converted to a mm_get before acquiring mmap_sem or calling find_vma(). Fixes: 66c45500bfdc ("drm/amdgpu: use new HMM APIs and helpers") Fixes: 0919195f2b0d ("drm/amdgpu: Enable amdgpu_ttm_tt_get_user_pages in worker threads") Link: https://lore.kernel.org/r/20191112202231.3856-11-jgg@ziepe.ca Acked-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Philip Yang Tested-by: Philip Yang Signed-off-by: Jason Gunthorpe commit 20fef4ef84bfb07d3658ff1347951c489fe7bafa Author: Jason Gunthorpe Date: Tue Nov 12 16:22:26 2019 -0400 nouveau: use mmu_interval_notifier instead of hmm_mirror Remove the hmm_mirror object and use the mmu_interval_notifier API instead for the range, and use the normal mmu_notifier API for the general invalidation callback. While here re-organize the pagefault path so the locking pattern is clear. nouveau is the only driver that uses a temporary range object and instead forwards nearly every invalidation range directly to the HW. While this is not how the mmu_interval_notifier was intended to be used, the overheads on the pagefaulting path are similar to the existing hmm_mirror version. Particularly since the interval tree will be small. Link: https://lore.kernel.org/r/20191112202231.3856-10-jgg@ziepe.ca Tested-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit c625c274ee0058c2a04aa0d794314b5b277606b2 Author: Jason Gunthorpe Date: Tue Nov 12 16:22:25 2019 -0400 nouveau: use mmu_notifier directly for invalidate_range_start There is no reason to get the invalidate_range_start() callback via an indirection through hmm_mirror, just register a normal notifier directly. Link: https://lore.kernel.org/r/20191112202231.3856-9-jgg@ziepe.ca Tested-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit 3506ff69c3ec725b9c3e7f074fd2d265922f139a Author: Jason Gunthorpe Date: Tue Nov 12 16:22:24 2019 -0400 drm/radeon: use mmu_interval_notifier_insert The new API is an exact match for the needs of radeon. For some reason radeon tries to remove overlapping ranges from the interval tree, but interval trees (and mmu_interval_notifier_insert()) support overlapping ranges directly. Simply delete all this code. Since this driver is missing a invalidate_range_end callback, but still calls get_user_pages(), it cannot be correct against all races. Link: https://lore.kernel.org/r/20191112202231.3856-8-jgg@ziepe.ca Reviewed-by: Christian König Signed-off-by: Jason Gunthorpe commit 3889551db21257919e0ef3449dfcc23450f9a5bd Author: Jason Gunthorpe Date: Tue Nov 12 16:22:23 2019 -0400 RDMA/hfi1: Use mmu_interval_notifier_insert for user_exp_rcv This converts one of the two users of mmu_notifiers to use the new API. The conversion is fairly straightforward, however the existing use of notifiers here seems to be racey. Link: https://lore.kernel.org/r/20191112202231.3856-7-jgg@ziepe.ca Tested-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit f25a546e65292b36f15cca0912450c4944fae031 Author: Jason Gunthorpe Date: Tue Nov 12 16:22:22 2019 -0400 RDMA/odp: Use mmu_interval_notifier_insert() Replace the internal interval tree based mmu notifier with the new common mmu_interval_notifier_insert() API. This removes a lot of code and fixes a deadlock that can be triggered in ODP: zap_page_range() mmu_notifier_invalidate_range_start() [..] ib_umem_notifier_invalidate_range_start() down_read(&per_mm->umem_rwsem) unmap_single_vma() [..] __split_huge_page_pmd() mmu_notifier_invalidate_range_start() [..] ib_umem_notifier_invalidate_range_start() down_read(&per_mm->umem_rwsem) // DEADLOCK mmu_notifier_invalidate_range_end() up_read(&per_mm->umem_rwsem) mmu_notifier_invalidate_range_end() up_read(&per_mm->umem_rwsem) The umem_rwsem is held across the range_start/end as the ODP algorithm for invalidate_range_end cannot tolerate changes to the interval tree. However, due to the nested invalidation regions the second down_read() can deadlock if there are competing writers. The new core code provides an alternative scheme to solve this problem. Fixes: ca748c39ea3f ("RDMA/umem: Get rid of per_mm->notifier_count") Link: https://lore.kernel.org/r/20191112202231.3856-6-jgg@ziepe.ca Tested-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 107e899874e95dcddc779142942bf285eba38bc5 Author: Jason Gunthorpe Date: Tue Nov 12 16:22:21 2019 -0400 mm/hmm: define the pre-processor related parts of hmm.h even if disabled Only the function calls are stubbed out with static inlines that always fail. This is the standard way to write a header for an optional component and makes it easier for drivers that only optionally need HMM_MIRROR. Link: https://lore.kernel.org/r/20191112202231.3856-5-jgg@ziepe.ca Reviewed-by: Jérôme Glisse Tested-by: Ralph Campbell Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit 04ec32fbc2b29a640d67872d2f88daac4c73e45b Author: Jason Gunthorpe Date: Tue Nov 12 16:22:20 2019 -0400 mm/hmm: allow hmm_range to be used with a mmu_interval_notifier or hmm_mirror hmm_mirror's handling of ranges does not use a sequence count which results in this bug: CPU0 CPU1 hmm_range_wait_until_valid(range) valid == true hmm_range_fault(range) hmm_invalidate_range_start() range->valid = false hmm_invalidate_range_end() range->valid = true hmm_range_valid(range) valid == true Where the hmm_range_valid() should not have succeeded. Adding the required sequence count would make it nearly identical to the new mmu_interval_notifier. Instead replace the hmm_mirror stuff with mmu_interval_notifier. Co-existence of the two APIs is the first step. Link: https://lore.kernel.org/r/20191112202231.3856-4-jgg@ziepe.ca Reviewed-by: Jérôme Glisse Tested-by: Philip Yang Tested-by: Ralph Campbell Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit 99cb252f5e68d72afa3245a4e73d216d295cd335 Author: Jason Gunthorpe Date: Tue Nov 12 16:22:19 2019 -0400 mm/mmu_notifier: add an interval tree notifier Of the 13 users of mmu_notifiers, 8 of them use only invalidate_range_start/end() and immediately intersect the mmu_notifier_range with some kind of internal list of VAs. 4 use an interval tree (i915_gem, radeon_mn, umem_odp, hfi1). 4 use a linked list of some kind (scif_dma, vhost, gntdev, hmm) And the remaining 5 either don't use invalidate_range_start() or do some special thing with it. It turns out that building a correct scheme with an interval tree is pretty complicated, particularly if the use case is synchronizing against another thread doing get_user_pages(). Many of these implementations have various subtle and difficult to fix races. This approach puts the interval tree as common code at the top of the mmu notifier call tree and implements a shareable locking scheme. It includes: - An interval tree tracking VA ranges, with per-range callbacks - A read/write locking scheme for the interval tree that avoids sleeping in the notifier path (for OOM killer) - A sequence counter based collision-retry locking scheme to tell device page fault that a VA range is being concurrently invalidated. This is based on various ideas: - hmm accumulates invalidated VA ranges and releases them when all invalidates are done, via active_invalidate_ranges count. This approach avoids having to intersect the interval tree twice (as umem_odp does) at the potential cost of a longer device page fault. - kvm/umem_odp use a sequence counter to drive the collision retry, via invalidate_seq - a deferred work todo list on unlock scheme like RTNL, via deferred_list. This makes adding/removing interval tree members more deterministic - seqlock, except this version makes the seqlock idea multi-holder on the write side by protecting it with active_invalidate_ranges and a spinlock To minimize MM overhead when only the interval tree is being used, the entire SRCU and hlist overheads are dropped using some simple branches. Similarly the interval tree overhead is dropped when in hlist mode. The overhead from the mandatory spinlock is broadly the same as most of existing users which already had a lock (or two) of some sort on the invalidation path. Link: https://lore.kernel.org/r/20191112202231.3856-3-jgg@ziepe.ca Acked-by: Christian König Tested-by: Philip Yang Tested-by: Ralph Campbell Reviewed-by: John Hubbard Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit a8d0f11ee50ddbd9f243c7a8b1a393a4f23ba093 Author: Thomas Bogendoerfer Date: Tue Oct 15 14:09:51 2019 +0200 MIPS: SGI-IP27: Enable ethernet phy on second Origin 200 module PROM only enables ethernet PHY on first Origin 200 module, so we must do it ourselves for the second module. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Jakub Kicinski Cc: Jonathan Corbet Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Lee Jones Cc: David S. Miller Cc: Srinivas Kandagatla Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-rtc@vger.kernel.org Cc: linux-serial@vger.kernel.org commit 29b261ff6fd963da2de0e436ce03fff333740f35 Author: Thomas Bogendoerfer Date: Tue Oct 15 14:09:48 2019 +0200 MIPS: PCI: Fix fake subdevice ID for IOC3 Generation of fake subdevice ID had vendor and device ID swapped. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Jakub Kicinski Cc: Jonathan Corbet Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Lee Jones Cc: David S. Miller Cc: Srinivas Kandagatla Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-rtc@vger.kernel.org Cc: linux-serial@vger.kernel.org commit ab818362c9054beb950b97a09ce7b0d56f5a32a1 Author: Taehee Yoo Date: Fri Nov 22 08:15:19 2019 +0000 net: use rhashtable_lookup() instead of rhashtable_lookup_fast() rhashtable_lookup_fast() internally calls rcu_read_lock() then, calls rhashtable_lookup(). So if rcu_read_lock() is already held, rhashtable_lookup() is enough. Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 3a06ee33963dea642d38c04ed18d2a5f4fdc78fd Merge: 72a2707a8743 05d6c8cfdbd6 Author: Jakub Kicinski Date: Sat Nov 23 12:00:54 2019 -0800 Merge tag 'wireless-drivers-next-2019-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.5 Last set of patches for v5.5. Major features here 802.11ax support for qtnfmac and airtime fairness support to mt76. And naturally smaller fixes and improvements all over. Major changes: qtnfmac * add 802.11ax support in AP mode * enable offload bridging support iwlwifi * support TX/RX antennas reporting mt76 * mt7615 smart carrier sense support * aggregation statistics via debugfs * airtime fairness (ATF) support * mt76x0 OF mac address support ==================== Signed-off-by: Jakub Kicinski commit 72a2707a8743b62f9493e46af300f0cee4485d46 Merge: a5d66f810061 4791d77a08cc Author: Jakub Kicinski Date: Sat Nov 23 11:01:13 2019 -0800 Merge branch 'nfc-convert-from-txt-to-rst' Robert Schwebel says: ==================== here is v2 of the series converting the NFC documentation from txt to rst. Thanks to Jonathan and Dave for the input. Changes since (implicit) v1: * replace code-block by more compact :: syntax * really add the rst file to the index ==================== Signed-off-by: Jakub Kicinski commit 4791d77a08ccd33c989daf31bf948bbbaf673460 Author: Robert Schwebel Date: Fri Nov 22 08:43:06 2019 +0100 docs: networking: nfc: change to rst format Now that the sphinx syntax has been fixed, change the document from txt to rst and add it to the index. Signed-off-by: Robert Schwebel Signed-off-by: Jakub Kicinski commit bf0b2511e8d7d2f08b784469a4c1d84557305d3c Author: Robert Schwebel Date: Fri Nov 22 08:43:05 2019 +0100 docs: networking: nfc: fix code block syntax Silence this warning: Documentation/networking/nfc.rst:113: WARNING: Definition list ends without a blank line; unexpected unindent. Signed-off-by: Robert Schwebel Signed-off-by: Jakub Kicinski commit f67b7c087404d6a7f2abf7657d4ba3a0b9fdfcfa Author: Robert Schwebel Date: Fri Nov 22 08:43:04 2019 +0100 docs: networking: nfc: fix bullet list syntax Fix this warning: Documentation/networking/nfc.rst:87: WARNING: Bullet list ends without a blank line; unexpected unindent. Signed-off-by: Robert Schwebel Signed-off-by: Jakub Kicinski commit c0b96e8f9f84165c294b486712aa6303391692a0 Author: Robert Schwebel Date: Fri Nov 22 08:43:03 2019 +0100 docs: networking: nfc: change block diagram to sphinx syntax Change the block diagram to match the sphinx syntax. This will make it possible to switch this file to rst in the future. Signed-off-by: Robert Schwebel Signed-off-by: Jakub Kicinski commit 66ac53a8c5c8693741ea9e6682763f6ccb43db23 Author: Robert Schwebel Date: Fri Nov 22 08:43:02 2019 +0100 docs: networking: nfc: change headlines to sphinx syntax The headlines in this file do are not in the standard kernel docu- mentation headline format. Change it, so this file can be switched to rst in the future. Signed-off-by: Robert Schwebel Signed-off-by: Jakub Kicinski commit a5d66f810061e2dd70fb7a108dcd14e535bc639f Author: Russell King Date: Fri Nov 22 15:23:23 2019 +0000 net: phy: initialise phydev speed and duplex sanely When a phydev is created, the speed and duplex are set to zero and -1 respectively, rather than using the predefined SPEED_UNKNOWN and DUPLEX_UNKNOWN constants. There is a window at initialisation time where we may report link down using the 0/-1 values. Tidy this up and use the predefined constants, so debug doesn't complain with: "Unsupported (update phy-core.c)/Unsupported (update phy-core.c)" when the speed and duplex settings are printed. Signed-off-by: Russell King Signed-off-by: Jakub Kicinski commit e3cf8b3668a808c1d252269ffc34a5723cfb9a7b Author: Russell King Date: Fri Nov 22 12:37:08 2019 +0000 net: phy: remove phy_ethtool_sset() There are no users of phy_ethtool_sset() in the kernel anymore, and as of commit 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode"), the implementation is slightly buggy - it doesn't correctly check the masked advertising mask as it used to. Remove it, and update the phy documentation to refer to its replacement function. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 84bb46cd62283cc371769ec1f77ff7924099f584 Author: Jakub Kicinski Date: Sat Nov 23 09:54:58 2019 -0800 Revert "bpf: Emit audit messages upon successful prog load and unload" This commit reverts commit 91e6015b082b ("bpf: Emit audit messages upon successful prog load and unload") and its follow up commit 7599a896f2e4 ("audit: Move audit_log_task declaration under CONFIG_AUDITSYSCALL") as requested by Paul Moore. The change needs close review on linux-audit, tests etc. Signed-off-by: Jakub Kicinski commit b2b2dd71e0859436d4e05b2f61f86140250ed3f8 Author: Dmitry Torokhov Date: Fri Nov 22 12:42:20 2019 -0800 tty: vt: keyboard: reject invalid keycodes Do not try to handle keycodes that are too big, otherwise we risk doing out-of-bounds writes: BUG: KASAN: global-out-of-bounds in clear_bit include/asm-generic/bitops-instrumented.h:56 [inline] BUG: KASAN: global-out-of-bounds in kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline] BUG: KASAN: global-out-of-bounds in kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495 Write of size 8 at addr ffffffff89a1b2d8 by task syz-executor108/1722 ... kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline] kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495 input_to_handler+0x3b6/0x4c0 drivers/input/input.c:118 input_pass_values.part.0+0x2e3/0x720 drivers/input/input.c:145 input_pass_values drivers/input/input.c:949 [inline] input_set_keycode+0x290/0x320 drivers/input/input.c:954 evdev_handle_set_keycode_v2+0xc4/0x120 drivers/input/evdev.c:882 evdev_do_ioctl drivers/input/evdev.c:1150 [inline] In this case we were dealing with a fuzzed HID device that declared over 12K buttons, and while HID layer should not be reporting to us such big keycodes, we should also be defensive and reject invalid data ourselves as well. Reported-by: syzbot+19340dff067c2d3835c0@syzkaller.appspotmail.com Signed-off-by: Dmitry Torokhov Cc: stable Link: https://lore.kernel.org/r/20191122204220.GA129459@dtor-ws Signed-off-by: Greg Kroah-Hartman commit 85c9aae9ac8b228f2134b56d4fc743afc446947a Author: Jim Mattson Date: Fri Nov 22 15:43:55 2019 -0800 kvm: nVMX: Relax guest IA32_FEATURE_CONTROL constraints Commit 37e4c997dadf ("KVM: VMX: validate individual bits of guest MSR_IA32_FEATURE_CONTROL") broke the KVM_SET_MSRS ABI by instituting new constraints on the data values that kvm would accept for the guest MSR, IA32_FEATURE_CONTROL. Perhaps these constraints should have been opt-in via a new KVM capability, but they were applied indiscriminately, breaking at least one existing hypervisor. Relax the constraints to allow either or both of FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX and FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX to be set when nVMX is enabled. This change is sufficient to fix the aforementioned breakage. Fixes: 37e4c997dadf ("KVM: VMX: validate individual bits of guest MSR_IA32_FEATURE_CONTROL") Signed-off-by: Jim Mattson Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit ad5996d9a0e8019c3ae5151e687939369acfe044 Author: Sean Christopherson Date: Fri Nov 22 08:58:18 2019 -0800 KVM: x86: Grab KVM's srcu lock when setting nested state Acquire kvm->srcu for the duration of ->set_nested_state() to fix a bug where nVMX derefences ->memslots without holding ->srcu or ->slots_lock. The other half of nested migration, ->get_nested_state(), does not need to acquire ->srcu as it is a purely a dump of internal KVM (and CPU) state to userspace. Detected as an RCU lockdep splat that is 100% reproducible by running KVM's state_test selftest with CONFIG_PROVE_LOCKING=y. Note that the failing function, kvm_is_visible_gfn(), is only checking the validity of a gfn, it's not actually accessing guest memory (which is more or less unsupported during vmx_set_nested_state() due to incorrect MMU state), i.e. vmx_set_nested_state() itself isn't fundamentally broken. In any case, setting nested state isn't a fast path so there's no reason to go out of our way to avoid taking ->srcu. ============================= WARNING: suspicious RCU usage 5.4.0-rc7+ #94 Not tainted ----------------------------- include/linux/kvm_host.h:626 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by evmcs_test/10939: #0: ffff88826ffcb800 (&vcpu->mutex){+.+.}, at: kvm_vcpu_ioctl+0x85/0x630 [kvm] stack backtrace: CPU: 1 PID: 10939 Comm: evmcs_test Not tainted 5.4.0-rc7+ #94 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Call Trace: dump_stack+0x68/0x9b kvm_is_visible_gfn+0x179/0x180 [kvm] mmu_check_root+0x11/0x30 [kvm] fast_cr3_switch+0x40/0x120 [kvm] kvm_mmu_new_cr3+0x34/0x60 [kvm] nested_vmx_load_cr3+0xbd/0x1f0 [kvm_intel] nested_vmx_enter_non_root_mode+0xab8/0x1d60 [kvm_intel] vmx_set_nested_state+0x256/0x340 [kvm_intel] kvm_arch_vcpu_ioctl+0x491/0x11a0 [kvm] kvm_vcpu_ioctl+0xde/0x630 [kvm] do_vfs_ioctl+0xa2/0x6c0 ksys_ioctl+0x66/0x70 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x54/0x200 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f59a2b95f47 Fixes: 8fcc4b5923af5 ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 05c19c2fe17c331ec384a2953be50101e8a15a73 Author: Sean Christopherson Date: Fri Nov 22 12:04:50 2019 -0800 KVM: x86: Open code shared_msr_update() in its only caller Fold shared_msr_update() into its sole user to eliminate its pointless bounds check, its godawful printk, its misleading comment (it's called under a global lock), and its woefully inaccurate name. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit faf0be22167486feb1ee386f0e819a336e829d0a Author: Miaohe Lin Date: Sat Nov 23 10:45:50 2019 +0800 KVM: Fix jump label out_free_* in kvm_init() The jump label out_free_1 and out_free_2 deal with the same stuff, so git rid of one and rename the label out_free_0a to retain the label name order. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 24885d1d79e2e83d49201aeae0bc59f1402fd4f1 Author: Sean Christopherson Date: Fri Nov 22 12:15:49 2019 -0800 KVM: x86: Remove a spurious export of a static function A recent change inadvertently exported a static function, which results in modpost throwing a warning. Fix it. Fixes: cbbaa2727aa3 ("KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES") Signed-off-by: Sean Christopherson Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 8cacac6ecd6d289d4ab52590784636a5b1043c66 Merge: 8f6ee51d772d 4584f084aa9d Author: Ingo Molnar Date: Sat Nov 23 09:00:13 2019 +0100 Merge tag 'perf-core-for-mingo-5.5-20191122' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf report: Jin Yao: - Allow entering the annotation view (symbol source/assembly + overhead/cycles/etc column) from the 'perf report --total-cycles' interface. E.g.: # perf record --all-cpus --branch-any --all-kernel ^C[ perf record: Woken up 5 times to write data ] # # perf evlist -v cycles: size: 120, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CPU|PERIOD|BRANCH_STACK, read_format: ID, disabled: 1, inherit: 1, exclude_user: 1, mmap: 1, comm: 1, freq: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1, branch_sample_type: ANY # # perf report --total-cycles # # Samples: 78762 of event 'cycles' Sampled Sampled Avg Avg Cycles% Cycles Cycles% Cycles [Program Block Range] Shared Object 1.72% 95.8K 0.00% 254 [msr.h:105 -> msr.h:166] [kernel.vmlinux] 1.56% 107.6K 0.00% 618 [compiler.h:199 -> common.c:301] [kernel.vmlinux] 0.83% 46.3K 0.00% 409 [entry_64.S:153 -> entry_64.S:175] [kernel.vmlinux] 0.83% 46.1K 0.00% 83 [jump_label.h:41 -> tsc.c:230] [kernel.vmlinux] 0.64% 36.9K 0.01% 1.4K [hda_intel.c:904 -> hda_intel.c:916] [snd_hda_intel] 0.57% 30.2K 0.00% 282 [file.c:710 -> file.c:730] [kernel.vmlinux] 0.48% 25.8K 0.00% 82 [spinlock.c:158 -> spinlock.c:160] [kernel.vmlinux] 0.45% 23.7K 0.00% 369 [tick-broadcast.c:585 -> tick-broadcast.c:586] [kernel.vmlinux] 0.44% 24.4K 0.00% 73 [msr.h:236 -> tsc.c:1088] [kernel.vmlinux] 0.43% 22.7K 0.00% 144 [cpuidle.c:229 -> cpuidle.c:232] [kernel.vmlinux] Then press 'A' or Enter on one of those lines, just like with 'perf top', say the top one: [msr.h:105 -> msr.h:166], then this shows up: Samples: 78K of event 'cycles', 4000 Hz, Event count (approx.): 78762 native_write_msr /lib/modules/5.4.0-rc8/build/vmlinux [Percent: local period] Percent│ IPC Cycle (Average IPC: 0.02, IPC Coverage: 50.0%) │ │ Disassembly of section .text: │ │ ffffffff8106c480 : │ __wrmsr(): │ return EAX_EDX_VAL(val, low, high); │ } │ │ static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high) │ { │ asm volatile("1: wrmsr\n" 49.16 │0.02 mov %edi,%ecx │0.02 mov %esi,%eax │0.02 wrmsr │ arch_static_branch(): │ #include │ #include │ │ static __always_inline bool arch_static_branch(struct static_key *key, bool branch) │ { │ asm_volatile_goto("1:" 0.79 │0.02 nop │ native_write_msr(): │ { │ __wrmsr(msr, low, high); │ │ if (msr_tracepoint_active(__tracepoint_write_msr)) │ do_trace_write_msr(msr, ((u64)high << 32 | low), 0); │ } 50.05 │0.02 254 ← retq │ do_trace_write_msr(msr, ((u64)high << 32 | low), 0); │ shl $0x20,%rdx │ mov %esi,%esi │ or %rdx,%rsi │ xor %edx,%edx │ → jmpq do_trace_write_msr We need to improve this to show the source code line numbers in the annotation view, so one can go from that program block to the annotation view and see those source code line numbers straight away. auxtrace/Intel PT: Adrian Hunter: - Add support for AUX area sampling, requires new functionality that will land in 5.5, its already in tip. This includes kernel capability querying so that it fails gracefully with older kernels, duimping aux area samples in 'perf report -D' and 'perf script'. perf.data: Alexey Budankov: - Fix decompression of PERF_RECORD_COMPRESSED records. core: Arnaldo Carvalho de Melo: - Use the 'dcacheline' cmp routine to find the right DSOs taking into account the 'maj', 'min', 'ino' and 'ino_generation', that got moved from 'struct map' to 'struct dso', where it belongs. This further reduces the size of 'struct map', there is still more work to do to maybe get it to max one cacheline. libtraceevent: Hewenliang: - Fix memory leakage in copy_filter_type(). Sudip Mukherjee: - Fix header installation. perf parse: Ian Rogers : - Fix potential memory leak when handling tracepoint errors, found using LLVM's libFuzzer. perf probe: Colin Ian King: - Fix spelling mistake "addrees" -> "address". Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit b1fbfcb4a20949df08dd995927cdc5ad220c128d Author: Masahiro Yamada Date: Mon Nov 18 13:52:47 2019 +0900 kbuild: make single target builds even faster Commit 2dffd23f81a3 ("kbuild: make single target builds much faster") made the situation much better. To improve it even more, apply the similar idea to the top Makefile. Trim unrelated directories from build-dirs. The single build code must be moved above the 'descend' target. Signed-off-by: Masahiro Yamada Tested-by: Jens Axboe commit 7ef9ab3b32b4bb72a7d70b832d2eb12ceb93d9fd Author: Masahiro Yamada Date: Fri Nov 15 02:42:26 2019 +0900 modpost: respect the previous export when 'exported twice' is warned When 'exported twice' is warned, let sym_add_exported() return without updating the symbol info. This respects the previous export, which is ordered first in modules.order This simplifies the code too. Signed-off-by: Masahiro Yamada commit e4b26c9f75e48b5ef9e31ac6c8a445d4479b469c Author: Masahiro Yamada Date: Fri Nov 15 02:42:25 2019 +0900 modpost: do not set ->preloaded for symbols from Module.symvers Now that there is no overwrap between symbols from ELF files and ones from Module.symvers. So, the 'exported twice' warning should be reported irrespective of where the symbol in question came from. The exceptional case is external module; in some cases, we build an external module to provide a different version/variant of the corresponding in-kernel module, overriding the same set of exported symbols. You can see this use-case in upstream; tools/testing/nvdimm/libnvdimm.ko replaces drivers/nvdimm/libnvdimm.ko in order to link it against mocked version of core kernel symbols. So, let's relax the 'exported twice' warning when building external modules. The multiple export from external modules is warned only when the previous one is from vmlinux or itself. With this refactoring, the ugly preloading goes away. Signed-off-by: Masahiro Yamada commit 1743694eb2357b47cd9951079f9ab0d728c916bf Author: Masahiro Yamada Date: Fri Nov 15 02:42:24 2019 +0900 modpost: stop symbol preloading for modversion CRC It is complicated to add mocked-up symbols for pre-handling CRC. Handle CRC after all the export symbols in the relevant module are registered. Call handle_modversion() after the handle_symbol() iteration. In some cases, I see atand-alone __crc_* without __ksymtab_*. For example, ARCH=arm allyesconfig produces __crc_ccitt_veneer and __crc_itu_t_veneer. I guess they come from crc_ccitt, crc_itu_t, respectively. Since __*_veneer are auto-generated symbols, just ignore them. Signed-off-by: Masahiro Yamada commit 4a1288f1c1cf5829f90c30f9d1af67f526ba4d85 Author: Giovanni Mascellani Date: Fri Nov 22 11:15:19 2019 +0100 dell-smm-hwmon: Add documentation Part of the documentation is taken from the README of the userspace utils (https://github.com/vitorafsr/i8kutils). The license is GPL-2+ and the author Massimo Dal Zotto is already credited as author of the module. Therefore there should be no copyright problem. I also added a paragraph with specific information on the experimental support for automatic BIOS fan control. Signed-off-by: Giovanni Mascellani Link: https://lore.kernel.org/r/20191122101519.1246458-2-gio@debian.org [groeck: Fixed some of the documentation warnings] Signed-off-by: Guenter Roeck commit afe45277ade62438db8af8bbd812ead453b5d98d Author: Giovanni Mascellani Date: Fri Nov 22 11:15:18 2019 +0100 hwmon: (dell-smm) Add support for disabling automatic BIOS fan control This patch exports standard hwmon pwmX_enable sysfs attribute for enabling or disabling automatic fan control by BIOS. Standard value "1" is for disabling automatic BIOS fan control and value "2" for enabling. By default BIOS auto mode is enabled by laptop firmware. When BIOS auto mode is enabled, custom fan speed value (set via hwmon pwmX sysfs attribute) is overwritten by SMM in few seconds and therefore any custom settings are without effect. So this is reason why implementing option for disabling BIOS auto mode is needed. So finally this patch allows kernel to set and control fan speed on laptops, but it can be dangerous (like setting speed of other fans). The SMM commands to enable or disable automatic fan control are not documented and are not the same on all Dell laptops. Therefore a whitelist is used to send the correct codes only on laptopts for which they are known. This patch was originally developed by Pali Rohár; later Giovanni Mascellani implemented the whitelist. Signed-off-by: Giovanni Mascellani Co-Developed-by: Pali Rohár Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20191122101519.1246458-1-gio@debian.org [groeck: Fixed checkpatch warnings] Signed-off-by: Guenter Roeck commit 9bd2a099d7224281dd7756efa5c79df4f3fe8daf Author: Masahiro Yamada Date: Fri Nov 15 02:42:23 2019 +0900 modpost: rename handle_modversions() to handle_symbol() This function handles not only modversions, but also unresolved symbols, export symbols, etc. Rename it to a more proper function name. While I was here, I also added the 'const' qualifier to *sym. Signed-off-by: Masahiro Yamada commit e84f9fbbece1585f45a03ccc11eeabe121cadc1b Author: Masahiro Yamada Date: Fri Nov 15 02:42:22 2019 +0900 modpost: refactor namespace_from_kstrtabns() to not hard-code section name Currently, namespace_from_kstrtabns() relies on the fact that namespace strings are recorded in the __ksymtab_strings section. Actually, it is coded in include/linux/export.h, but modpost does not need to hard-code the section name. Elf_Sym::st_shndx holds the index of the relevant section. Using it is a more portable way to get the namespace string. Make namespace_from_kstrtabns() simply call sym_get_data(), and delete the info->ksymtab_strings . While I was here, I added more 'const' qualifiers to pointers. Signed-off-by: Masahiro Yamada commit afa0459daa7b08c7b2c879705b69d39b734a11d0 Author: Masahiro Yamada Date: Fri Nov 15 02:42:21 2019 +0900 modpost: add a helper to get data pointed by a symbol When CONFIG_MODULE_REL_CRCS is enabled, the value of __crc_* is not an absolute value, but the address to the CRC data embedded in the .rodata section. Getting the data pointed by the symbol value is somewhat complex. Split it out into a new helper, sym_get_data(). I will reuse it to refactor namespace_from_kstrtabns() in the next commit. Signed-off-by: Masahiro Yamada commit 1646220a6d4b27153ddb5ffb117aa1f4c39e3d1f Merge: 8eace9fb3960 2e06b2717535 Author: Paul Walmsley Date: Fri Nov 22 18:59:23 2019 -0800 Merge branch 'next/defconfig-add-debug' into for-next commit 8eace9fb39605f0e201223fd34306ba3b53969b7 Merge: 5ba9aa56e6d3 2cc6c4a0da4a Author: Paul Walmsley Date: Fri Nov 22 18:59:17 2019 -0800 Merge branch 'next/misc2' into for-next commit 5ba9aa56e6d3e8fddb954c2f818d1ce0525235bb Merge: 4a979862dde4 405fe7aa0dba Author: Paul Walmsley Date: Fri Nov 22 18:59:09 2019 -0800 Merge branch 'next/nommu' into for-next Conflicts: arch/riscv/boot/Makefile arch/riscv/include/asm/sbi.h commit 4a979862dde46b738316014ca4995eae2f428413 Merge: e8cad25b7e8a c5ab54e9945b Author: Paul Walmsley Date: Fri Nov 22 18:58:34 2019 -0800 Merge branch 'next/misc' into for-next commit e8cad25b7e8ac8a1ecd7d7243cbea9cfa7049bee Merge: 9acfd6f5387d 6efb16b1d551 Author: Paul Walmsley Date: Fri Nov 22 18:58:32 2019 -0800 Merge branch 'next/tlb-opt' into for-next commit 9acfd6f5387dbded57a2d8e9f8480ebbbc3b03c6 Merge: 69049d523fb1 1edd28b7e85d Author: Paul Walmsley Date: Fri Nov 22 18:58:29 2019 -0800 Merge branch 'next/isa-string' into for-next commit 69049d523fb108abee59d94b89ea23b889f40236 Merge: a99d8080aaf3 5340627e3fe0 Author: Paul Walmsley Date: Fri Nov 22 18:58:26 2019 -0800 Merge branch 'next/seccomp' into for-next commit 2cc6c4a0da4ab11537b2567952b59af71a90ef12 Author: Yash Shah Date: Mon Nov 18 05:58:34 2019 +0000 RISC-V: Add address map dumper Add support for dumping the kernel address space layout to the console. User can enable CONFIG_DEBUG_VM to dump the virtual memory region into dmesg buffer during boot-up. Signed-off-by: Yash Shah Reviewed-by: Logan Gunthorpe Reviewed-by: Anup Patel [paul.walmsley@sifive.com: dropped .init/.text/.data/.bss prints; added PCI legacy I/O region display] Signed-off-by: Paul Walmsley commit 2e06b27175354a9a5a0c336a732739daf4489fb8 Author: Paul Walmsley Date: Thu Nov 21 18:24:26 2019 -0800 riscv: defconfigs: enable more debugging options Enable more debugging options in the RISC-V defconfigs to help kernel developers catch problems with patches earlier in the development cycle. Signed-off-by: Paul Walmsley Reviewed-by: Palmer Dabbelt commit 8dcdc9524cad74968b18322651d6fafb288a00ad Merge: c4f2cbd37651 6fbc05e59163 Author: Jakub Kicinski Date: Fri Nov 22 17:51:14 2019 -0800 Merge branch 'sfc-ARFS-expiry-improvements' Edward Cree says: ==================== A series of changes to how we check filters for expiry, manage how much of that work to do & when, etc. Prompted by some pathological behaviour under heavy load, which was Reported-by: David Ahern ==================== Signed-off-by: Jakub Kicinski commit 6fbc05e59163e66795a2bbdb4068abd7f7ae3510 Author: Edward Cree Date: Fri Nov 22 17:57:40 2019 +0000 sfc: do ARFS expiry work occasionally even without NAPI poll If there's no traffic on a channel, its ARFS expiry work will never get scheduled by efx_poll() as that isn't being run. So make efx_filter_rfs_expire() reschedule itself to run after 30 seconds. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit ca70bd423f10b004f1bf7b2424d34025a9408e54 Author: Edward Cree Date: Fri Nov 22 17:57:27 2019 +0000 sfc: add statistics for ARFS Report the number of successful and failed insertions, and also the current count of filters, to aid in tuning e.g. rps_flow_cnt. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 0aa6608daec5d19275809d30df6a02529eb66c7d Author: Edward Cree Date: Fri Nov 22 17:57:19 2019 +0000 sfc: suppress MCDI errors from ARFS In high connection count usage, the NIC's filter table may be filled with sufficiently many ARFS filters that further insertions fail. As this does not represent a correctness issue, do not log the resulting MCDI errors. Add a debug-level message under the (by default disabled) rx_status category instead; and take the opportunity to do a little extra expiry work. Since there are now multiple workitems able to call __efx_filter_rfs_expire on a given channel, it is possible for them to race and thus pass quotas which, combined, exceed rfs_filter_count. Thus, don't WARN_ON if we loop all the way around the table with quota left over. Signed-off-by: Edward Cree Tested-by: David Ahern Signed-off-by: Jakub Kicinski commit 8490e75cdbb734829d3b324c3a52492c2edbfbd6 Author: Edward Cree Date: Fri Nov 22 17:57:03 2019 +0000 sfc: change ARFS expiry mechanism The old rfs_filters_added method for determining the quota could potentially allow the NIC to become filled with old filters, which never get tested for expiry. Instead, explicitly make expiry check work depend on the number of filters installed, and don't count checking slots without filters in as doing work. This guarantees that each filter will be checked for expiry at least once every thirty seconds (assuming the channel to which it belongs is NAPI polling actively) regardless of fill level. Signed-off-by: Edward Cree Tested-by: David Ahern Signed-off-by: Jakub Kicinski commit c4f2cbd37651372ad1775ee970e669ce735731c7 Merge: 30429fba99b5 ed960c1d36f5 Author: Jakub Kicinski Date: Fri Nov 22 16:59:00 2019 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== This series contains updates to the ice driver only. Bruce updates the driver to store the number of functions the device has so that it won't have to compute it when setting safe mode capabilities. Adds a check to adjust the reporting of capabilities for devices with more than 4 ports, which differ for devices with less than 4 ports. Brett adds a helper function to determine if the VF is allowed to do VLAN operations based on the host's VF configuration. Also adds a new function that initializes VLAN stripping (enabled/disabled) for the VF based on the device supported capabilities. Adds a check if the vector index is valid with the respect to the number of transmit and receive queues configured when we set coalesce settings for DCB. Adds a check if the promisc_mask contains ICE_PROMISC_VLAN_RX or ICE_PROMISC_VLAN_TX so that VLAN 0 promiscuous rules to be removed. Add a helper macro for a commonly used de-reference of a pointer to &pf->dev->pdev. Jesse fixes an issue where if an invalid virtchnl request from the VF, the driver would return uninitialized data to the VF from the PF stack, so ensure the stack variable is initialized earlier. Add helpers to the virtchnl interface make the reporting of strings consistent and help reduce stack space. Implements VF statistics gathering via the kernel ndo_get_vf_stats(). Akeem ensures we disable the state flag for each VF when its resources are returned to the device. Tony does additional cleanup in the driver to ensure the when we allocate and free memory within the same function, we should not be using devm_* variants; use regular alloc and free functions. Henry implements code to query and set the number of channels on the primary VSI for a PF via ethtool. Jake cleans up needless NULL checks in ice_sched_cleanup_all(). Kevin updates the firmware API version to align with current NVM images. v2: Added "Fixes:" tag to patch 5 commit description and added the use of netif_is_rxfh_configured() in patch 13 to see if RSS has been configured by the user, if so do not overwrite that configuration. ==================== Signed-off-by: Jakub Kicinski commit 30429fba99b51836ea8a11174be95ddaa8c47703 Author: Maciej Żenczykowski Date: Fri Nov 22 13:50:52 2019 -0800 net: inet_is_local_reserved_port() should return bool not int Cc: Eric Dumazet Signed-off-by: Maciej Żenczykowski Signed-off-by: Jakub Kicinski commit 16c0f03f629a89e6a1249497202b2c154ff46206 Author: Hassan Naveed Date: Fri Nov 15 23:44:49 2019 +0000 tracing: Enable syscall optimization for MIPS Since MIPS architecture has a sparse syscall array, select the HAVE_SPARSE_SYSCALL_NR to save space. Link: http://lkml.kernel.org/r/20191115234314.21599-2-hnaveed@wavecomp.com Signed-off-by: Hassan Naveed Reviewed-by: Paul Burton Signed-off-by: Steven Rostedt (VMware) commit 0e24220821b0e0e330a18bfef29ac6396545d62e Author: Hassan Naveed Date: Fri Nov 15 23:44:42 2019 +0000 tracing: Use xarray for syscall trace events Currently, a lot of memory is wasted for architectures like MIPS when init_ftrace_syscalls() allocates the array for syscalls using kcalloc. This is because syscalls numbers start from 4000, 5000 or 6000 and array elements up to that point are unused. Fix this by using a data structure more suited to storing sparsely populated arrays. The XARRAY data structure, implemented using radix trees, is much more memory efficient for storing the syscalls in question. Link: http://lkml.kernel.org/r/20191115234314.21599-1-hnaveed@wavecomp.com Signed-off-by: Hassan Naveed Reviewed-by: Paul Burton Signed-off-by: Steven Rostedt (VMware) commit 091189ab68d0b45de2f343b0c432804cacdeaf78 Merge: a9f852e92e40 8311f0be9763 Author: Jakub Kicinski Date: Fri Nov 22 16:46:33 2019 -0800 Merge branch 'cxgb4-add-udp-segmentation-offload-support' Rahul Lakkireddy says: ==================== This series of patches add UDP Segmentation Offload (USO) supported by Chelsio T5/T6 NICs. Patch 1 updates the current Scatter Gather List (SGL) DMA unmap logic for USO requests. Patch 2 adds USO support for NIC and MQPRIO QoS offload Tx path. Patch 3 adds missing stats for MQPRIO QoS offload Tx path. ==================== Signed-off-by: Jakub Kicinski commit 8311f0be9763386556d7b698f5e101c688f9c2eb Author: Rahul Lakkireddy Date: Fri Nov 22 06:30:03 2019 +0530 cxgb4: add stats for MQPRIO QoS offload Tx path Export necessary stats for traffic flowing through MQPRIO QoS offload Tx path. v2: - No change. Signed-off-by: Rahul Lakkireddy Signed-off-by: Jakub Kicinski commit 1a2a14fbc7e7df35aebb929ed6cdb1fcf238e9d2 Author: Rahul Lakkireddy Date: Fri Nov 22 06:30:02 2019 +0530 cxgb4: add UDP segmentation offload support Implement and export UDP segmentation offload (USO) support for both NIC and MQPRIO QoS offload Tx path. Update appropriate logic in Tx to parse GSO info in skb and configure FW_ETH_TX_EO_WR request needed to perform USO. v2: - Remove inline keyword from write_eo_udp_wr() in sge.c. Let the compiler decide. Signed-off-by: Rahul Lakkireddy Signed-off-by: Jakub Kicinski commit 0ed96b46c0ac26ebcdd2ee95c2479ef8cf94bbd6 Author: Rahul Lakkireddy Date: Fri Nov 22 06:30:01 2019 +0530 cxgb4/chcr: update SGL DMA unmap for USO The FW_ETH_TX_EO_WR used for sending UDP Segmentation Offload (USO) requests expects the headers to be part of the descriptor and the payload to be part of the SGL containing the DMA mapped addresses. Hence, the DMA address in the first entry of the SGL can start after the packet headers. Currently, unmap_sgl() tries to unmap from this wrong offset, instead of the originally mapped DMA address. So, use existing unmap_skb() instead, which takes originally saved DMA addresses as input. Update all necessary Tx paths to save the original DMA addresses, so that unmap_skb() can unmap them properly. v2: - No change. Signed-off-by: Rahul Lakkireddy Signed-off-by: Jakub Kicinski commit 341c1fda5e17156619fb71acfc7082b2669b4b72 Author: John Johansen Date: Sat Sep 14 03:34:06 2019 -0700 apparmor: make it so work buffers can be allocated from atomic context In some situations AppArmor needs to be able to use its work buffers from atomic context. Add the ability to specify when in atomic context and hold a set of work buffers in reserve for atomic context to reduce the chance that a large work buffer allocation will need to be done. Fixes: df323337e507 ("apparmor: Use a memory pool instead per-CPU caches") Signed-off-by: John Johansen commit 89ed42495ef4a020435f2b999093bb5731eeb8b9 Author: Divya Indi Date: Wed Nov 20 11:08:39 2019 -0800 tracing: Sample module to demonstrate kernel access to Ftrace instances. This is a sample module to demonstrate the use of the newly introduced and exported APIs to access Ftrace instances from within the kernel. Newly introduced APIs used here - 1. Create/Lookup a trace array with the given name. struct trace_array *trace_array_get_by_name(const char *name) 2. Destroy/Remove a trace array. int trace_array_destroy(struct trace_array *tr) 4. Enable/Disable trace events: int trace_array_set_clr_event(struct trace_array *tr, const char *system, const char *event, bool enable); Exported APIs - 1. trace_printk equivalent for instances. int trace_array_printk(struct trace_array *tr, unsigned long ip, const char *fmt, ...); 2. Helper function. void trace_printk_init_buffers(void); 3. To decrement the reference counter. void trace_array_put(struct trace_array *tr) Sample output(contents of /sys/kernel/tracing/instances/sample-instance) NOTE: Tracing disabled after ~5 sec) _-----=> irqs-off / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / delay TASK-PID CPU# |||| TIMESTAMP FUNCTION | | | |||| | | sample-instance-1452 [002] .... 49.430948: simple_thread: trace_array_printk: count=0 sample-instance-1452 [002] .... 49.430951: sample_event: count value=0 at jiffies=4294716608 sample-instance-1452 [002] .... 50.454847: simple_thread: trace_array_printk: count=1 sample-instance-1452 [002] .... 50.454849: sample_event: count value=1 at jiffies=4294717632 sample-instance-1452 [002] .... 51.478748: simple_thread: trace_array_printk: count=2 sample-instance-1452 [002] .... 51.478750: sample_event: count value=2 at jiffies=4294718656 sample-instance-1452 [002] .... 52.502652: simple_thread: trace_array_printk: count=3 sample-instance-1452 [002] .... 52.502655: sample_event: count value=3 at jiffies=4294719680 sample-instance-1452 [002] .... 53.526533: simple_thread: trace_array_printk: count=4 sample-instance-1452 [002] .... 53.526535: sample_event: count value=4 at jiffies=4294720704 sample-instance-1452 [002] .... 54.550438: simple_thread: trace_array_printk: count=5 sample-instance-1452 [002] .... 55.574336: simple_thread: trace_array_printk: count=6 Link: http://lkml.kernel.org/r/1574276919-11119-3-git-send-email-divya.indi@oracle.com Reviewed-by: Aruna Ramakrishna Signed-off-by: Divya Indi [ Moved to samples/ftrace ] Signed-off-by: Steven Rostedt (VMware) commit 28879787147358e8ffcae397f11748de3dd26577 Author: Divya Indi Date: Wed Nov 20 11:08:38 2019 -0800 tracing: Adding new functions for kernel access to Ftrace instances Adding 2 new functions - 1) struct trace_array *trace_array_get_by_name(const char *name); Return pointer to a trace array with given name. If it does not exist, create and return pointer to the new trace array. 2) int trace_array_set_clr_event(struct trace_array *tr, const char *system ,const char *event, bool enable); Enable/Disable events to this trace array. Additionally, - To handle reference counters, export trace_array_put() - Due to introduction of the above 2 new functions, we no longer need to export - ftrace_set_clr_event & trace_array_create APIs. Link: http://lkml.kernel.org/r/1574276919-11119-2-git-send-email-divya.indi@oracle.com Signed-off-by: Divya Indi Reviewed-by: Aruna Ramakrishna Signed-off-by: Steven Rostedt (VMware) commit fc809bc5ceaa665497384064ab2d76713c774bad Author: Krzysztof Kozlowski Date: Wed Nov 20 21:38:07 2019 +0800 tracing: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Link: http://lkml.kernel.org/r/20191120133807.12741-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Steven Rostedt (VMware) commit a82a4804b4ee3636c8988fea14d44f70f4de45f1 Author: Xianting Tian Date: Sat Nov 16 10:05:55 2019 -0500 ring-buffer: Fix typos in function ring_buffer_producer Fix spelling and other typos Link: http://lkml.kernel.org/r/1573916755-32478-1-git-send-email-xianting_tian@126.com Signed-off-by: Xianting Tian Signed-off-by: Steven Rostedt (VMware) commit b41db132821fdad9d80a177344a47468791fbe62 Author: Enrico Weigelt, metux IT consult Date: Thu Nov 21 14:38:15 2019 +0100 ftrace: Use BIT() macro It's cleaner to use the BIT() macro instead of raw shift operation. Link: http://lkml.kernel.org/r/20191121133815.15040-1-info@metux.net Signed-off-by: Enrico Weigelt, metux IT consult [ Added BIT() for bits 16 and 17 ] Signed-off-by: Steven Rostedt (VMware) commit bce4e7e9c45ef97ac1e30b9cb4adc25b5b5a7cfa Author: John Johansen Date: Fri Sep 13 22:24:23 2019 -0700 apparmor: reduce rcu_read_lock scope for aa_file_perm mediation Now that the buffers allocation has changed and no longer needs the full mediation under an rcu_read_lock, reduce the rcu_read_lock scope to only where it is necessary. Fixes: df323337e507 ("apparmor: Use a memory pool instead per-CPU caches") Signed-off-by: John Johansen commit 8f21a62475258ba07b032f5006fb26fd6501f314 Author: John Johansen Date: Thu Sep 12 02:01:35 2019 -0700 apparmor: fix wrong buffer allocation in aa_new_mount Fix the following trace caused by the dev_path buffer not being allocated. [ 641.044262] AppArmor WARN match_mnt: ((devpath && !devbuffer)): [ 641.044284] WARNING: CPU: 1 PID: 30709 at ../security/apparmor/mount.c:385 match_mnt+0x133/0x180 [ 641.044286] Modules linked in: snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_hda_codec snd_hda_core qxl ttm snd_hwdep snd_pcm drm_kms_helper snd_seq_midi snd_seq_midi_event drm snd_rawmidi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel iptable_mangle aesni_intel aes_x86_64 xt_tcpudp crypto_simd snd_seq cryptd bridge stp llc iptable_filter glue_helper snd_seq_device snd_timer joydev input_leds snd serio_raw fb_sys_fops 9pnet_virtio 9pnet syscopyarea sysfillrect soundcore sysimgblt qemu_fw_cfg mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 8139too psmouse 8139cp i2c_piix4 pata_acpi mii floppy [ 641.044318] CPU: 1 PID: 30709 Comm: mount Tainted: G D W 5.1.0-rc4+ #223 [ 641.044320] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 641.044323] RIP: 0010:match_mnt+0x133/0x180 [ 641.044325] Code: 41 5d 41 5e 41 5f c3 48 8b 4c 24 18 eb b1 48 c7 c6 08 84 26 83 48 c7 c7 f0 56 54 83 4c 89 54 24 08 48 89 14 24 e8 7d d3 bb ff <0f> 0b 4c 8b 54 24 08 48 8b 14 24 e9 25 ff ff ff 48 c7 c6 08 84 26 [ 641.044327] RSP: 0018:ffffa9b34ac97d08 EFLAGS: 00010282 [ 641.044329] RAX: 0000000000000000 RBX: ffff9a86725a8558 RCX: 0000000000000000 [ 641.044331] RDX: 0000000000000002 RSI: 0000000000000001 RDI: 0000000000000246 [ 641.044333] RBP: ffffa9b34ac97db0 R08: 0000000000000000 R09: 0000000000000000 [ 641.044334] R10: 0000000000000000 R11: 00000000000077f5 R12: 0000000000000000 [ 641.044336] R13: ffffa9b34ac97e98 R14: ffff9a865e000008 R15: ffff9a86c4cf42b8 [ 641.044338] FS: 00007fab73969740(0000) GS:ffff9a86fbb00000(0000) knlGS:0000000000000000 [ 641.044340] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 641.044342] CR2: 000055f90bc62035 CR3: 00000000aab5f006 CR4: 00000000003606e0 [ 641.044346] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 641.044348] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 641.044349] Call Trace: [ 641.044355] aa_new_mount+0x119/0x2c0 [ 641.044363] apparmor_sb_mount+0xd4/0x430 [ 641.044367] security_sb_mount+0x46/0x70 [ 641.044372] do_mount+0xbb/0xeb0 [ 641.044377] ? memdup_user+0x4b/0x70 [ 641.044380] ksys_mount+0x7e/0xd0 [ 641.044384] __x64_sys_mount+0x21/0x30 [ 641.044388] do_syscall_64+0x5a/0x1a0 [ 641.044392] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 641.044394] RIP: 0033:0x7fab73a8790a [ 641.044397] Code: 48 8b 0d 89 85 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 56 85 0c 00 f7 d8 64 89 01 48 [ 641.044399] RSP: 002b:00007ffe0ffe4238 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 [ 641.044401] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fab73a8790a [ 641.044429] RDX: 000055f90bc6203b RSI: 00007ffe0ffe57b1 RDI: 00007ffe0ffe57a5 [ 641.044431] RBP: 00007ffe0ffe4250 R08: 0000000000000000 R09: 00007fab73b51d80 [ 641.044433] R10: 00000000c0ed0004 R11: 0000000000000206 R12: 000055f90bc610b0 [ 641.044434] R13: 00007ffe0ffe4330 R14: 0000000000000000 R15: 0000000000000000 [ 641.044457] irq event stamp: 0 [ 641.044460] hardirqs last enabled at (0): [<0000000000000000>] (null) [ 641.044463] hardirqs last disabled at (0): [] copy_process.part.30+0x734/0x23f0 [ 641.044467] softirqs last enabled at (0): [] copy_process.part.30+0x734/0x23f0 [ 641.044469] softirqs last disabled at (0): [<0000000000000000>] (null) [ 641.044470] ---[ end trace c0d54bdacf6af6b2 ]--- Fixes: df323337e507 ("apparmor: Use a memory pool instead per-CPU caches") Signed-off-by: John Johansen commit 00e0590dbaec6f1bcaa36a85467d7e3497ced522 Author: Colin Ian King Date: Thu Jun 27 14:09:04 2019 +0100 apparmor: fix unsigned len comparison with less than zero The sanity check in macro update_for_len checks to see if len is less than zero, however, len is a size_t so it can never be less than zero, so this sanity check is a no-op. Fix this by making len a ssize_t so the comparison will work and add ulen that is a size_t copy of len so that the min() macro won't throw warnings about comparing different types. Addresses-Coverity: ("Macro compares unsigned to 0") Fixes: f1bd904175e8 ("apparmor: add the base fns() for domain labels") Signed-off-by: Colin Ian King Signed-off-by: John Johansen commit a9f852e92e40992c4ff09ac3940f7725e016317a Merge: 3243e04ab1c0 34c36f4564b8 Author: Jakub Kicinski Date: Fri Nov 22 16:27:24 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Minor conflict in drivers/s390/net/qeth_l2_main.c, kept the lock from commit c8183f548902 ("s390/qeth: fix potential deadlock on workqueue flush"), removed the code which was removed by commit 9897d583b015 ("s390/qeth: consolidate some duplicated HW cmd code"). Signed-off-by: Jakub Kicinski commit 71c296f6d5b33faf9867d04c6c5d75c7e56b886b Author: Hans Verkuil Date: Fri Nov 22 16:17:47 2019 -0800 Input: synaptics-rmi4 - fix various V4L2 compliance problems in F54 The v4l2-compliance utility reported several V4L2 API compliance issues: - the sequence counter wasn't filled in - the sequence counter wasn't reset to 0 at the start of streaming - the returned field value wasn't set to V4L2_FIELD_NONE - the timestamp wasn't set - the payload size was undefined if an error was returned - min_buffers_needed doesn't need to be initialized Fix these issues. Signed-off-by: Hans Verkuil Reviewed-by: Lucas Stach commit fc1156f373e3927e0dcf06678906c367588bfdd6 Author: Hans Verkuil Date: Fri Nov 22 16:17:08 2019 -0800 Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus Some Lenovo X1 Carbon Gen 6 laptops report LEN0091. Add this to the smbus_pnp_ids list. Signed-off-by: Hans Verkuil Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191119105118.54285-2-hverkuil-cisco@xs4all.nl Signed-off-by: Dmitry Torokhov commit 1e4fb2c0cb3443bf7d2606b6d571bd75879d098e Author: Manivannan Sadhasivam Date: Fri Nov 15 21:59:01 2019 +0530 MAINTAINERS: Add entry for BM1880 SoC clock driver Add MAINTAINERS entry for Bitmain BM1880 SoC clock driver. Signed-off-by: Manivannan Sadhasivam Link: https://lkml.kernel.org/r/20191115162901.17456-8-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit 1ab4601da55be5d6374cca66f9ed9074763ca0a1 Author: Manivannan Sadhasivam Date: Fri Nov 15 21:59:00 2019 +0530 clk: Add common clock driver for BM1880 SoC Add common clock driver for Bitmain BM1880 SoC. The clock controller on BM1880 has supplies clocks to all peripherals in the form of gate clocks and composite clocks (fixed factor + gate). Signed-off-by: Manivannan Sadhasivam Link: https://lkml.kernel.org/r/20191115162901.17456-7-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit 7046c6b018912726947d75c4cacf03ca51267f59 Author: Manivannan Sadhasivam Date: Fri Nov 15 21:58:57 2019 +0530 dt-bindings: clock: Add devicetree binding for BM1880 SoC Add YAML devicetree binding for Bitmain BM1880 SoC. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/20191115162901.17456-4-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit d8549bcd0529fcbd064c0e106f0a8806cab7546f Author: Manivannan Sadhasivam Date: Fri Nov 15 21:58:56 2019 +0530 clk: Add clk_hw_unregister_composite helper function definition This function has been delcared but not defined anywhere. Hence, this commit adds definition for it. Fixes: 49cb392d3639 ("clk: composite: Add hw based registration APIs") Signed-off-by: Manivannan Sadhasivam Link: https://lkml.kernel.org/r/20191115162901.17456-3-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit cc819cf8d4760fac260e91dcf5c432abece3fcd2 Author: Manivannan Sadhasivam Date: Fri Nov 15 21:58:55 2019 +0530 clk: Zero init clk_init_data in helpers The clk_init_data struct needs to be initialized to zero for the new parent_map implementation to work correctly. Otherwise, the member which is available first will get processed. Signed-off-by: Manivannan Sadhasivam Link: https://lkml.kernel.org/r/20191115162901.17456-2-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit bcf1e034d3aae39d27371b51916359ea7501db01 Author: Krzysztof Kozlowski Date: Fri Nov 22 14:49:30 2019 -0800 Input: fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1574306373-29581-1-git-send-email-krzk@kernel.org Signed-off-by: Dmitry Torokhov commit b02efeb056998076163083a2be3df4a60830335a Author: Zhou Yanjie Date: Tue Nov 19 22:28:47 2019 +0800 MIPS: Ingenic: Disable abandoned HPTLB function. JZ4760/JZ4770/JZ4775/X1000/X1500 has an abandoned huge page tlb, this mode is not compatible with the MIPS standard, it will cause tlbmiss and into an infinite loop (line 21 in the tlb-funcs.S) when starting the init process. write 0xa9000000 to cp0 register 5 sel 4 to disable this function to prevent getting stuck. Confirmed by Ingenic, this operation will not adversely affect processors without HPTLB function. Signed-off-by: Zhou Yanjie Acked-by: Paul Cercueil Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: jiaxun.yang@flygoat.com Cc: gregkh@linuxfoundation.org Cc: malat@debian.org Cc: tglx@linutronix.de Cc: chenhc@lemote.com commit 0ecdcaa6d5e78649578ff32c37556a4140b64edf Author: Krzysztof Kozlowski Date: Wed Nov 20 21:37:12 2019 +0800 openrisc: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Stafford Horne commit ed960c1d36f5db38a8038fcca83e1f6495f468fb Author: Kevin Scott Date: Fri Nov 8 06:23:31 2019 -0800 ice: Update FW API minor version Update FW API minor version to align to current value advertised by FW in new NVM images. Signed-off-by: Kevin Scott Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1748ce80e0a3d4a66667fd154623aa1c33a44875 Author: Jacob Keller Date: Fri Nov 8 06:23:30 2019 -0800 ice: remove pointless NULL check of port_info The code in ice_sched_cleanup_all checks whether the port info is NULL prior to calling ice_sched_clear_port. However, ice_sched_clear_port already checks whether port info is non-NULL. More importantly, it also checks whether the port structure has been initialized by checking its port_state field as well. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 87324e747fde7693620f6d4c74aa11b7551e096d Author: Henry Tieman Date: Fri Nov 8 06:23:29 2019 -0800 ice: Implement ethtool ops for channels Add code to query and set the number of channels on the primary VSI for a PF. This is accessed from the 'ethtool -l' and 'ethtool -L' commands, respectively. Though the ice driver supports asymmetric queues report an IRQ vector that has both Rx and Tx queues attached and is counted as a 'combined' channel. Signed-off-by: Henry Tieman Co-developed-by: Maciej Fijalkowski Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 90ac245814abc30d2423474310654d31e3908b2f Author: Eli Cohen Date: Thu Oct 31 09:12:18 2019 +0200 net/mlx5e: Remove redundant pointer check When code reaches the "out" label, n is guaranteed to be valid so we can unconditionally call neigh_release. Also change the label to release_neigh to better reflect the fact that we unconditionally free the neighbour and also match other labels convention. Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit e689e998e102100bdf7991763d4c244704846f2d Author: Saeed Mahameed Date: Fri Nov 1 15:38:30 2019 -0700 net/mlx5e: TC, Stub out ipv6 tun create header function Improve mlx5e_route_lookup_ipv6 function structure by avoiding #ifdef then return -EOPNOTSUPP in the middle of the function code. To do so, we stub out mlx5e_tc_tun_create_header_ipv6 which is the only caller of this helper function to avoid calling it altogether when ipv6 is compiled out, which should also cleanup some compiler warnings of unused variables. Signed-off-by: Saeed Mahameed Reviewed-by: Eli Cohen Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit b6d12238459d2f3c1140689c8fbb1bf1e0fe1927 Author: Yevgeny Kliteynik Date: Mon Oct 28 17:22:06 2019 +0200 net/mlx5: DR, Add support for Geneve packets SW steering Add support for SW steering matching on Geneve header fields: - VNI - OAM - protocol type - options length Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit a18fab48dbacbb7ff104a13e987778b7995bec07 Author: Yevgeny Kliteynik Date: Mon Oct 28 16:58:53 2019 +0200 net/mlx5: DR, Add HW bits and definitions for Geneve flex parser Add definition for flex parser tunneling header for Geneve. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 6e9e286e4ad53311b51b28fdc4b952ab7d2520c4 Author: Yevgeny Kliteynik Date: Mon Oct 28 16:30:27 2019 +0200 net/mlx5: DR, Refactor VXLAN GPE flex parser tunnel code for SW steering Refactor flex parser tunnel code: - Add definition for flex parser tunneling header for VXLAN-GPE - Use macros for VXLAN-GPE SW steering when building STE - Refactor the code to reflect that this is a VXLAN GPE only code and not a general flex parser code. This also significantly simplifies addition of more flex parser protocols, such as Geneve. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit ab118da4c10a70b8437f5c90ab77adae1835963e Author: Leon Romanovsky Date: Wed Nov 13 12:03:47 2019 +0200 net/mlx5: Don't write read-only fields in MODIFY_HCA_VPORT_CONTEXT command The MODIFY_HCA_VPORT_CONTEXT uses field_selector to mask fields needed to be written, other fields are required to be zero according to the HW specification. The supported fields are controlled by bitfield and limited to vport state, node and port GUIDs. Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 730fdea40beffbc47b5d03d8d6205e6f9a226adc Author: Jesse Brandeburg Date: Fri Nov 8 06:23:28 2019 -0800 ice: implement VF stats NDO Implement the VF stats gathering via the kernel via ndo_get_vf_stats(). The driver will show per-VF stats in the output of the ip -s link show dev command. Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 4c66d227e424c23af2c1c90f397909394f782c02 Author: Jesse Brandeburg Date: Fri Nov 8 06:23:27 2019 -0800 ice: add helpers for virtchnl The virtchannel interface was repeating a lot of strings and wasting storage space in the kernel. There was also inconsistent messages for the same thing. Consolidate all those messages and bit checks into a couple of helper functions. Also, reduce stack space usage by simplifying getting the pointer to the pf using a helper. Signed-off-by: Jesse Brandeburg Co-developed-by: Brett Creeley Signed-off-by: Brett Creeley Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 4015d11e4b9720718de7df28d25c04d08d8b6226 Author: Brett Creeley Date: Fri Nov 8 06:23:26 2019 -0800 ice: Add ice_pf_to_dev(pf) macro We use &pf->dev->pdev all over the code. Add a simple macro to do this for us. When multiple de-references like this are being done add a local struct device variable. Signed-off-by: Brett Creeley Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9efe35d0db84cb7189e4a2c3d6a50eefd4380ff9 Author: Tony Nguyen Date: Fri Nov 8 06:23:25 2019 -0800 ice: Do not use devm* functions for local uses In situations where we alloc and free memory within the same function do not use the devm_* variants; use regular alloc and free functions. Remove any unused vars if there are no usages after these changes. Also, replace an allocate and copy with kmemdup() and remove an unnecessary memset() to 0 after a kzalloc(). Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1bc7a4ab85ba0d874b193f2812a5e14e1ec6e9af Author: Brett Creeley Date: Fri Nov 8 06:23:24 2019 -0800 ice: Refactor removal of VLAN promiscuous rules Currently ice_clear_vsi_promisc() detects if the VLAN ID sent is not 0 and sets the recipe_id to ICE_SW_LKUP_PROMISC_VLAN in that case and ICE_SW_LKUP_PROMISC if the VLAN_ID is 0. However this doesn't allow VLAN 0 promiscuous rules to be removed, but they can be added. Fix this by checking if the promisc_mask contains ICE_PROMISC_VLAN_RX or ICE_PROMISC_VLAN_TX. This change was made to match what is being done for ice_set_vsi_promisc(). Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e25f9152bc07de534b2b590ce6c052ea25dd8900 Author: Brett Creeley Date: Fri Nov 8 06:23:23 2019 -0800 ice: Fix setting coalesce to handle DCB configuration Currently there can be a case where a DCB map is applied and there are more interrupt vectors (vsi->num_q_vectors) than Rx queues (vsi->num_rxq) and Tx queues (vsi->num_txq). If we try to set coalesce settings in this case it will report a false failure. Fix this by checking if vector index is valid with respect to the number of Tx and Rx queues configured. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1f9639d2fb9188a59acafae9dea626391c442a8d Author: Akeem G Abodunrin Date: Fri Nov 8 06:23:22 2019 -0800 ice: Only disable VF state when freeing each VF resources It is wrong to set PF disable state flag for all VFs when freeing VF resources - Instead, we should set VF disable state flag for each VF with its resources being returned to the device. Right now, all VF opcodes, mailbox communication to clear its resources as well fails - since we already indicate that PF is in disable state, with all VFs not active. In addition, we don't need to notify VF that PF is intending to reset it, if it is already in disabled state. Signed-off-by: Akeem G Abodunrin Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 949375de945f7042df2b6488228a1a2b36e69f35 Author: Jesse Brandeburg Date: Fri Nov 8 06:23:21 2019 -0800 ice: fix stack leakage In the case of an invalid virtchannel request the driver would return uninitialized data to the VF from the PF stack which is a bug. Fix by initializing the stack variable earlier in the function before any return paths can be taken. Fixes: 1071a8358a28 ("ice: Implement virtchnl commands for AVF support") Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 2f9ec2419820350ee70b49a3c4feaa5b7b242f33 Author: Brett Creeley Date: Fri Nov 8 06:23:20 2019 -0800 ice: Don't modify stripping for add/del VLANs on VF Currently when adding/deleting vlans in ice_vc_process_vlan_msg() we are calling ice_vsi_manage_vlan_stripping() to enable/disable when adding and deleting a VLAN respectively. This is wrong because adding/deleting VLANs has nothing to do with configuring VLAN stripping. VLAN stripping is configured through the following VIRTCHNL operations: VIRTCHNL_OP_ENABLE_VLAN_STRIPPING VIRTCHNL_OP_DISABLE_VLAN_STRIPPING Unfortunately we can't just remove this because then stripping will never be configured on VF initialization. Fix this by adding a new function that initializes (disables/enables) VLAN stripping for the VF based on the device supported capabilities. This allows us to remove the call to ice_vsi_manage_vlan_stripping() in ice_vc_process_vlan_msg(). Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit d4bc4e2d6b57712206abfc4e7751ff629b713070 Author: Brett Creeley Date: Fri Nov 8 06:23:19 2019 -0800 ice: Disallow VF VLAN opcodes if VLAN offloads disabled Currently if the host disables VLAN offloads on the VF by not setting the VIRTCHNL_VF_OFFLOAD_VLAN capability bit we will still honor VF VLAN configuration messages over VIRTCHNL. These messages (i.e. enable/disable VLAN stripping and VLAN filtering) should be blocked when the feature is not supported. Fix that by adding a helper function to determine if the VF is allowed to do VLAN operations based on the host's VF configuration. Also, mirror the VF communicated capabilities in the host's VF configuration. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9164f761c99493a947dcbf3889a157943b46e738 Author: Bruce Allan Date: Fri Nov 8 06:23:18 2019 -0800 ice: Correct capabilities reporting of max TCs Firmware always returns 8 as the max number of supported TCs. However on devices with more than 4 ports, the maximum number of TCs per port is limited to 4. Check and, if necessary, correct the reporting of capabilities for devices with more than 4 ports. Signed-off-by: Bruce Allan Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit eae1bbb2a4519ad6c920a061dc49035ab5c36f1f Author: Bruce Allan Date: Fri Nov 8 06:23:17 2019 -0800 ice: Store number of functions for the device Store the number of functions the device has and use this number when setting safe mode capabilities instead of calculating it. Signed-off-by: Bruce Allan Co-developed-by: Kevin Scott Signed-off-by: Kevin Scott Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e2ce328b282d0c7660576c25af6b9be34a6d2614 Merge: ca4196aa1008 79591b7db21d Author: Mark Brown Date: Fri Nov 22 19:56:37 2019 +0000 Merge remote-tracking branch 'spi/topic/ptp' into spi-next commit ca4196aa10087fe3ba3ce2383761898dc95b5e94 Merge: 8f3ed6d0b0db ffa119f7c42d Author: Mark Brown Date: Fri Nov 22 19:56:35 2019 +0000 Merge branch 'spi-5.5' into spi-next commit 8f3ed6d0b0db04db8297d951c26c809dd7b4778d Merge: af42d3466bdc c5923243eb32 Author: Mark Brown Date: Fri Nov 22 19:56:33 2019 +0000 Merge branch 'spi-5.4' into spi-linus commit a21da94f617bce0771144ea8093b6987184b38d0 Merge: c642e8708684 c15d5a645875 Author: Mark Brown Date: Fri Nov 22 19:56:20 2019 +0000 Merge branch 'regulator-5.5' into regulator-next commit c642e87086847d7f61b7b7d8744ac23e44cac91e Merge: af42d3466bdc 3f1a9e630b6e Author: Mark Brown Date: Fri Nov 22 19:56:18 2019 +0000 Merge branch 'regulator-5.4' into regulator-linus commit 8c4d2a0bfbd27d030e4652b714cd5a1598f3559b Merge: 3701d2cb8767 39870b0dec68 Author: Mark Brown Date: Fri Nov 22 19:56:02 2019 +0000 Merge branch 'asoc-5.5' into asoc-next commit 3701d2cb87671c227f1aa59226c9a01e9f01c2ea Merge: af42d3466bdc ef8e14794308 Author: Mark Brown Date: Fri Nov 22 19:55:59 2019 +0000 Merge branch 'asoc-5.4' into asoc-linus commit f920d1bb9c4e77efb08c41d70b6d442f46fd8902 Author: changzhu Date: Tue Nov 19 11:13:29 2019 +0800 drm/amdgpu: invalidate mmhub semaphore workaround in gmc9/gmc10 It may lose gpuvm invalidate acknowldege state across power-gating off cycle. To avoid this issue in gmc9/gmc10 invalidation, add semaphore acquire before invalidation and semaphore release after invalidation. After adding semaphore acquire before invalidation, the semaphore register become read-only if another process try to acquire semaphore. Then it will not be able to release this semaphore. Then it may cause deadlock problem. If this deadlock problem happens, it needs a semaphore firmware fix. Signed-off-by: changzhu Acked-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 6c2c8972374ac5c35078d36d7559f64c368f7b33 Author: changzhu Date: Tue Nov 19 10:18:39 2019 +0800 drm/amdgpu: initialize vm_inv_eng0_sem for gfxhub and mmhub SW must acquire/release one of the vm_invalidate_eng*_sem around the invalidation req/ack. Through this way,it can avoid losing invalidate acknowledge state across power-gating off cycle. To use vm_invalidate_eng*_sem, it needs to initialize vm_invalidate_eng*_sem firstly. Signed-off-by: changzhu Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 1b34de7c3fef0c7ebb3d05acc1756bfb585279ca Author: Jack Zhang Date: Thu Nov 21 14:09:08 2019 +0800 drm/amd/amdgpu/sriov skip RLCG s/r list for arcturus VF. After rlcg fw 2.1, kmd driver starts to load extra fw for LIST_CNTL,GPM_MEM,SRM_MEM. We needs to skip the three fw because all rlcg related fw have been loaded by host driver. Guest driver would load the three fw fail without this change. Signed-off-by: Jack Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ef1c0cbcd1e0db497ad0d7128e7157f0e3788b14 Author: Jack Zhang Date: Thu Nov 21 13:59:28 2019 +0800 drm/amd/amdgpu/sriov temporarily skip ras,dtm,hdcp for arcturus VF Temporarily skip ras,dtm,hdcp initialize and terminate for arcturus VF Currently the three features haven't been enabled at SRIOV, it would trigger guest driver load fail with the bare-metal path of the three features. Signed-off-by: Jack Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 210b3b3c7563df391bd81d49c51af303b928de4a Author: Xiaojie Yuan Date: Wed Nov 20 14:02:22 2019 +0800 drm/amdgpu/gfx10: re-init clear state buffer after gpu reset This patch fixes 2nd baco reset failure with gfxoff enabled on navi1x. clear state buffer (resides in vram) is corrupted after 1st baco reset, upon gfxoff exit, CPF gets garbage header in CSIB and hangs. Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit a3511321fd004d0b2a6d81dab1837dcc6c752da4 Author: Stephen Rothwell Date: Thu Nov 21 14:54:03 2019 +1100 merge fix for "ftrace: Rework event_create_dir()" Reviewed-by: Kevin Wang Signed-off-by: Stephen Rothwell Signed-off-by: Alex Deucher commit 57fb0ab2f1398d81b42a8143a40e5d209a290a48 Author: Jay Cornwall Date: Wed Nov 20 16:32:46 2019 +0000 drm/amdgpu: Update Arcturus golden registers Signed-off-by: Jay Cornwall Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 908a28be092e425967099a2488ead7fc80572989 Author: Xiaojie Yuan Date: Fri Nov 22 14:21:15 2019 -0500 drm/amdgpu/gfx10: fix out-of-bound mqd_backup array access Fixes: 0900a9efdb7909 ("drm/amdgpu/gfx10: fix mqd backup/restore for gfx rings (v2)") Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1e902a6d32d73e4a6b3bc9d7cd43d4ee2b242dea Author: Xiaojie Yuan Date: Thu Nov 14 16:56:08 2019 +0800 drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt 50us is not enough to wait for cp ready after gpu reset on some navi asics. Signed-off-by: Xiaojie Yuan Suggested-by: Jack Xiao Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 8e6a5c833333e14a5023a5dcabb64b7d9e046bc6 Author: Luc Van Oostenryck Date: Wed Nov 20 01:07:41 2019 +0100 ipmi: fix ipmb_poll()'s return type ipmb_poll() is defined as returning 'unsigned int' but the .poll method is declared as returning '__poll_t', a bitwise type. Fix this by using the proper return type and using the EPOLL constants instead of the POLL ones, as required for __poll_t. CC: Corey Minyard CC: openipmi-developer@lists.sourceforge.net CC: Greg Kroah-Hartman Signed-off-by: Luc Van Oostenryck Message-Id: <20191120000741.30657-1-luc.vanoostenryck@gmail.com> Reviewed-by: Asmaa Mnebhi Signed-off-by: Corey Minyard commit 39870b0dec68ed7dd814beb697e541670975c7d8 Author: Jaroslav Kysela Date: Wed Nov 20 18:44:35 2019 +0100 ASoC: DMI long name - avoid to add board name if matches with product name Current code: LENOVO-20QE000VMC-ThinkPadX1Carbon7th-20QE000VMC With the patch: LENOVO-20QE000VMC-ThinkPadX1Carbon7th Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20191120174435.30920-2-perex@perex.cz Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 4e01e5dbba96f731119f3f1a6bf51b54c98c5940 Author: Jaroslav Kysela Date: Wed Nov 20 18:44:34 2019 +0100 ASoC: improve the DMI long card code in asoc-core Add append_dmi_string() function and make the code more readable. Signed-off-by: Jaroslav Kysela Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191120174435.30920-1-perex@perex.cz Signed-off-by: Mark Brown commit ffa119f7c42d29be2dd759bb18cc4d1f45804c6b Author: Benjamin Gaignard Date: Wed Nov 20 20:44:44 2019 +0100 dt-bindings: spi: Convert stm32 QSPI bindings to json-schema Convert the STM32 QSPI binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191120194444.10540-1-benjamin.gaignard@st.com Signed-off-by: Mark Brown commit eb7e6dc6d9ffcce129ac04d4e7bd2dc015bd45a5 Author: Peter Ujfalusi Date: Thu Nov 21 11:27:03 2019 +0200 spi: pic32: Retire dma_request_slave_channel_compat() There is no reason to use the dma_request_slave_channel_compat() as no filter function and parameter is provided. Switch the driver to use dma_request_chan() instead and add support for deferred probing against DMA channel. Signed-off-by: Peter Ujfalusi Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20191121092703.30465-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit c15d5a645875bc9b89f68f5d3fb608f691ac78d7 Author: Axel Lin Date: Fri Nov 22 12:51:54 2019 +0800 regulator: da9062: Return REGULATOR_MODE_INVALID for invalid mode -EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Fixes: 844e7492ee3d ("regulator: da9062: add of_map_mode support for bucks") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20191122045154.802-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit ef8e14794308a428b194f8b06ad9ae06b43466e4 Author: Nilkanth Ahirrao Date: Thu Nov 21 12:10:23 2019 +0100 ASoC: rsnd: fix DALIGN register for SSIU The current driver only sets 0x76543210 and 0x67452301 for DALIGN. This doesn’t work well for TDM split and ex-split mode for all SSIU. This patch programs the DALIGN registers based on the SSIU number. Cc: Kuninori Morimoto Cc: Jiada Wang Cc: Andrew Gabbasov Fixes: a914e44693d41b ("ASoC: rsnd: more clear rsnd_get_dalign() for DALIGN") Signed-off-by: Nilkanth Ahirrao Signed-off-by: Eugeniu Rosca Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20191121111023.10976-1-erosca@de.adit-jv.com Signed-off-by: Mark Brown commit 5e18d2b14c704d465ce85b0f6004c75f1150ab0b Author: Alex Deucher Date: Fri Nov 15 10:26:52 2019 -0500 Revert "drm/amd/display: enable S/G for RAVEN chip" This reverts commit 1c4259159132ae4ceaf7c6db37a6cf76417f73d9. S/G display is not stable with the IOMMU enabled on some platforms. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205523 Acked-by: Christian König Signed-off-by: Alex Deucher commit 8fc41344138831071c5d5f51635c7eb33459e249 Author: Alex Deucher Date: Fri Nov 15 10:21:23 2019 -0500 drm/amdgpu: disable gfxoff on original raven There are still combinations of sbios and firmware that are not stable. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=204689 Acked-by: Christian König Signed-off-by: Alex Deucher commit 5355d7e054fcc4497c7100f131fb40a541c112f1 Author: Alex Deucher Date: Fri Nov 15 09:38:28 2019 -0500 drm/amdgpu: remove experimental flag for Navi14 5.4 and newer works fine with navi14. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher commit 70f7eb639e2f1fd749f8ead171052bb28f2353df Author: Alex Deucher Date: Thu Nov 14 11:39:05 2019 -0500 drm/amdgpu: disable gfxoff when using register read interface When gfxoff is enabled, accessing gfx registers via MMIO can lead to a hang. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205497 Acked-by: Xiaojie Yuan Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit dda0f4558c72260444ca8e8aef7366349dbb2ae3 Author: Alex Deucher Date: Wed Nov 13 11:08:35 2019 -0500 drm/amdgpu/powerplay: properly set PP_GFXOFF_MASK (v2) So that the setting reflects what the hw supports. This will be used in a subsequent patch so needs to be correct. v2: squash in fix from Colin Ian King Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205497 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 3d0e3ce52ce3eb4b9de3caf9c38dbb5a4d3e13c3 Author: Sam Bobroff Date: Mon Nov 18 10:53:54 2019 +1100 drm/amdgpu: fix bad DMA from INTERRUPT_CNTL2 The INTERRUPT_CNTL2 register expects a valid DMA address, but is currently set with a GPU MC address. This can cause problems on systems that detect the resulting DMA read from an invalid address (found on a Power8 guest). Instead, use the DMA address of the dummy page because it will always be safe. Fixes: 27ae10641e9c ("drm/amdgpu: add interupt handler implementation for si v3") Signed-off-by: Sam Bobroff Signed-off-by: Alex Deucher commit 62d91dd2851e8ae2ca552f1b090a3575a4edf759 Author: Sam Bobroff Date: Mon Nov 18 10:53:53 2019 +1100 drm/radeon: fix bad DMA from INTERRUPT_CNTL2 The INTERRUPT_CNTL2 register expects a valid DMA address, but is currently set with a GPU MC address. This can cause problems on systems that detect the resulting DMA read from an invalid address (found on a Power8 guest). Instead, use the DMA address of the dummy page because it will always be safe. Fixes: d8f60cfc9345 ("drm/radeon/kms: Add support for interrupts on r6xx/r7xx chips (v3)") Fixes: 25a857fbe973 ("drm/radeon/kms: add support for interrupts on SI") Fixes: a59781bbe528 ("drm/radeon: add support for interrupts on CIK (v5)") Signed-off-by: Sam Bobroff Signed-off-by: Alex Deucher commit e3dd3aa8e0b650c296ef5cc017639ecdc6c66619 Author: Mikita Lipski Date: Thu Oct 31 16:09:01 2019 -0400 drm/amd/display: Fix debugfs on MST connectors [why] Previous patch allowed to initialize debugfs entries on both MST and SST connectors, but MST connectors get registered much later which exposed an issue of debugfs entries being initialized in the same folder. [how] Return SST debugfs entries' initialization back to where it was. For MST connectors we should initialize debugfs entries in connector register function after the connector is registered. Signed-off-by: Mikita Lipski Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit f8a69a8022a2aafe534c44f421534909869e619e Author: Alex Deucher Date: Wed Nov 13 14:27:54 2019 -0500 drm/amdgpu/nv: add asic func for fetching vbios from rom directly Needed as a fallback if the vbios can't be fetched by other means. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher commit c0e21ea1d0b557bdedd5b54d529162f74e7ef407 Author: Yintian Tao Date: Mon Nov 18 16:06:00 2019 +0800 drm/amdgpu: put flush_delayed_work at first There is one regression from 042f3d7b745cd76aa To put flush_delayed_work after adev->shutdown = true which will make amdgpu_ih_process not response the irq At last, all ib ring tests will be failed just like below [drm] amdgpu: finishing device. [drm] Fence fallback timer expired on ring gfx [drm] Fence fallback timer expired on ring comp_1.0.0 [drm] Fence fallback timer expired on ring comp_1.1.0 [drm] Fence fallback timer expired on ring comp_1.2.0 [drm] Fence fallback timer expired on ring comp_1.3.0 [drm] Fence fallback timer expired on ring comp_1.0.1 amdgpu 0000:00:07.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.1.1 (-110). amdgpu 0000:00:07.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.2.1 (-110). amdgpu 0000:00:07.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on comp_1.3.1 (-110). amdgpu 0000:00:07.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on sdma0 (-110). amdgpu 0000:00:07.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on sdma1 (-110). amdgpu 0000:00:07.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on uvd_enc_0.0 (-110). amdgpu 0000:00:07.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on vce0 (-110). [drm:amdgpu_device_delayed_init_work_handler [amdgpu]] *ERROR* ib ring test failed (-110). v2: replace cancel_delayed_work_sync() with flush_delayed_work() Signed-off-by: Yintian Tao Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 4e20f6550b52bdc46e6237fc894985cb9fadffa4 Author: Leo Liu Date: Fri Nov 15 17:10:34 2019 -0500 drm/amdgpu/vcn2.5: fix the enc loop with hw fini Signed-off-by: Leo Liu Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 06f75d54f462241ec19947e4b9abb8ef543503f1 Author: Evan Quan Date: Thu Nov 14 16:58:31 2019 +0800 drm/amd/powerplay: correct fine grained dpm force level setting For fine grained dpm, there is only two levels supported. However to reflect correctly the current clock frequency, there is an intermediate level faked. Thus on forcing level setting, we need to treat level 2 correctly as level 1. Signed-off-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 1ac38dbf6edeaeb34a859b6e266c2462b6fee1eb Author: Evan Quan Date: Thu Nov 14 15:30:39 2019 +0800 drm/amd/powerplay: issue no PPSMC_MSG_GetCurrPkgPwr on unsupported ASICs Otherwise, the error message prompted will confuse user. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a310a1b4c1a9b3a487f95c2fa5559a2869f56f15 Author: Evan Quan Date: Tue Nov 12 14:18:54 2019 +0800 drm/amd/powerplay: issue BTC on Navi during SMU setup RunBTC is added for Navi ASIC on hardware setup. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit d112ea3cf08695cf4377e6ecb102af34f2b76824 Author: Evan Quan Date: Mon Nov 11 17:15:02 2019 +0800 drm/amd/powerplay: avoid DPM reenable process on Navi1x ASICs V2 Otherwise, without RLC reinitialization, the DPM reenablement will fail. That affects the custom pptable uploading. V2: setting/clearing uploading_custom_pp_table in smu_sys_set_pp_table() Reported-by: Matt Coffin Signed-off-by: Evan Quan Tested-by: Matt Coffin Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 0900a9efdb79097dac253a67f6c4fe0a42b2508d Author: Xiaojie Yuan Date: Tue Oct 29 16:59:09 2019 +0800 drm/amdgpu/gfx10: fix mqd backup/restore for gfx rings (v2) 1. no need to allocate an extra member for 'mqd_backup' array 2. backup/restore mqd to/from the correct 'mqd_backup' array slot v2: warning fix (Alex) Signed-off-by: Xiaojie Yuan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f2c5fd9e4c05947d3b98506731d9776625d7b7e5 Author: Paul Walmsley Date: Thu Jul 18 15:30:04 2019 -0700 riscv: defconfigs: enable debugfs debugfs is broadly useful, so enable it in the RISC-V defconfigs. Signed-off-by: Paul Walmsley Reviewed-by: Palmer Dabbelt commit 37640adbefd66491cb8083a438f7bf366ac09bc7 Author: Thomas Bogendoerfer Date: Tue Nov 19 12:08:57 2019 +0100 MIPS: PCI: remember nasid changed by set interrupt affinity When changing interrupt affinity remember the possible changed nasid, otherwise an interrupt deactivate/activate sequence will incorrectly setup interrupt. Fixes: e6308b6d35ea ("MIPS: SGI-IP27: abstract chipset irq from bridge") Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit e3d765a941f6130fd94e47b2064cfee71f4cbadd Author: Thomas Bogendoerfer Date: Tue Nov 19 12:08:56 2019 +0100 MIPS: SGI-IP27: Fix crash, when CPUs are disabled via nr_cpus parameter If number of CPUs are limited by the kernel commandline parameter nr_cpus assignment of interrupts accourding to numa rules might not be possibe. As a fallback use one of the online CPUs as interrupt destination. Fixes: 69a07a41d908 ("MIPS: SGI-IP27: rework HUB interrupts") Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 2bee1b58484f036e3e2dc657e524d095d0d332b3 Author: Mike Rapoport Date: Thu Nov 21 18:21:33 2019 +0200 mips: add support for folded p4d page tables Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5leve-fixup.h with pgtable-nop4d.h and drop usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Cc: Mike Rapoport commit 31168f033e3751d1c9245d9ee847d775af16dcd6 Author: Mike Rapoport Date: Thu Nov 21 18:21:32 2019 +0200 mips: drop __pXd_offset() macros that duplicate pXd_index() ones The __pXd_offset() macros are identical to the pXd_index() macros and there is no point to keep both of them. All architectures define and use pXd_index() so let's keep only those to make mips consistent with the rest of the kernel. Signed-off-by: Mike Rapoport Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Cc: Mike Rapoport commit 3ed6751bb8fa89c3014399bb0414348499ee202a Author: Mike Rapoport Date: Thu Nov 21 18:21:31 2019 +0200 mips: fix build when "48 bits virtual memory" is enabled With CONFIG_MIPS_VA_BITS_48=y the build fails miserably: CC arch/mips/kernel/asm-offsets.s In file included from arch/mips/include/asm/pgtable.h:644, from include/linux/mm.h:99, from arch/mips/kernel/asm-offsets.c:15: include/asm-generic/pgtable.h:16:2: error: #error CONFIG_PGTABLE_LEVELS is not consistent with __PAGETABLE_{P4D,PUD,PMD}_FOLDED #error CONFIG_PGTABLE_LEVELS is not consistent with __PAGETABLE_{P4D,PUD,PMD}_FOLDED ^~~~~ include/asm-generic/pgtable.h:390:28: error: unknown type name 'p4d_t'; did you mean 'pmd_t'? static inline int p4d_same(p4d_t p4d_a, p4d_t p4d_b) ^~~~~ pmd_t [ ... more such errors ... ] scripts/Makefile.build:99: recipe for target 'arch/mips/kernel/asm-offsets.s' failed make[2]: *** [arch/mips/kernel/asm-offsets.s] Error 1 This happens because when CONFIG_MIPS_VA_BITS_48 enables 4th level of the page tables, but neither pgtable-nop4d.h nor 5level-fixup.h are included to cope with the 5th level. Replace #ifdef conditions around includes of the pgtable-nop{m,u}d.h with explicit CONFIG_PGTABLE_LEVELS and add include of 5level-fixup.h for the case when CONFIG_PGTABLE_LEVELS==4 Signed-off-by: Mike Rapoport Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Cc: Mike Rapoport commit 9314e44f455c8b46d08b2d379cb9e8fba5767207 Author: Andrew Gabbasov Date: Fri Nov 22 11:52:18 2019 -0600 ALSA: aloop: Avoid unexpected timer event callback tasklets loopback_snd_timer_close_cable() function waits until all scheduled tasklets are completed, but the timer is closed after that and can generate more event callbacks, scheduling new tasklets, that will not be synchronized with cable closing. Move tasklet_kill() call to be executed after snd_timer_close() call to avoid such case. Fixes: 26c53379f98d ("ALSA: aloop: Support selection of snd_timer instead of jiffies") Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191122175218.17187-2-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit 716864586c6261b079a4d5ebc02f19adc8e6aa38 Author: Simon Goldschmidt Date: Fri May 3 11:15:07 2019 +0200 arm: socfpga: execute cold reboot by default This changes system reboot for socfpga to issue a cold reboot by default instead of a warm reboot. Warm reboot can still be used by setting reboot_mode to REBOOT_WARM (e.g. via kernel command line 'reboot='), but this patch ensures cold reboot is issued for both REBOOT_COLD and REBOOT_HARD. Also, cold reboot is more fail safe than warm reboot has some issues at least fo CSEL=0 and BSEL=qspi, where the boot rom does not set the qspi clock to a valid range. Signed-off-by: Simon Goldschmidt Signed-off-by: Dinh Nguyen commit c037239c2373f79613dac32d0fb20c07f12f719b Author: Andrew Gabbasov Date: Fri Nov 22 11:52:17 2019 -0600 ALSA: aloop: Remove redundant locking in timer open function loopback_parse_timer_id() uses snd_card_ref(), that can lock on mutex, also snd_timer_instance_new() uses non-atomic allocation, that can sleep. So, both functions can not be called from loopback_snd_timer_open() with cable->lock spinlock locked. Moreover, most part of loopback_snd_timer_open() function body works when the opposite stream of the same cable does not yet exist, and the current stream is not yet completely open and can't be running, so existing locking of loopback->cable_lock mutex is enough to protect from conflicts with simultaneous opening or closing. Locking of cable->lock spinlock is not needed in this case. Fixes: 26c53379f98d ("ALSA: aloop: Support selection of snd_timer instead of jiffies") Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191122175218.17187-1-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit a264abad51d8ecb7954a2f6d9f1885b38daffc74 Author: Chuck Lever Date: Wed Nov 20 16:25:52 2019 -0500 SUNRPC: Capture completion of all RPC tasks RPC tasks on the backchannel never invoke xprt_complete_rqst(), so there is no way to report their tk_status at completion. Also, any RPC task that exits via rpc_exit_task() before it is replied to will also disappear without a trace. Introduce a trace point that is symmetrical with rpc_task_begin that captures the termination status of each RPC task. Sample trace output for callback requests initiated on the server: kworker/u8:12-448 [003] 127.025240: rpc_task_end: task:50@3 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpc_exit_task kworker/u8:12-448 [002] 127.567310: rpc_task_end: task:51@3 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpc_exit_task kworker/u8:12-448 [001] 130.506817: rpc_task_end: task:52@3 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpc_exit_task Odd, though, that I never see trace_rpc_task_complete, either in the forward or backchannel. Should it be removed? Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 3243e04ab1c06e7cb1402aff609c83de97956489 Author: Chen Wandun Date: Fri Nov 22 20:32:45 2019 +0800 net: dsa: ocelot: fix "should it be static?" warnings Fix following sparse warnings: drivers/net/dsa/ocelot/felix.c:351:6: warning: symbol 'felix_txtstamp' was not declared. Should it be static? Signed-off-by: Chen Wandun Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit fd1fef0c453df60921472008f436189ed351f9e2 Author: Andrea Mayer Date: Fri Nov 22 17:22:42 2019 +0100 seg6: allow local packet processing for SRv6 End.DT6 behavior End.DT6 behavior makes use of seg6_lookup_nexthop() function which drops all packets that are destined to be locally processed. However, DT* should be able to deliver decapsulated packets that are destined to local addresses. Function seg6_lookup_nexthop() is also used by DX6, so in order to maintain compatibility I created another routing helper function which is called seg6_lookup_any_nexthop(). This function is able to take into account both packets that have to be processed locally and the ones that are destined to be forwarded directly to another machine. Hence, seg6_lookup_any_nexthop() is used in DT6 rather than seg6_lookup_nexthop() to allow local delivery. Signed-off-by: Andrea Mayer Signed-off-by: David S. Miller commit d1746d1e80a86ca86b0c2680510898d411d2ef47 Author: Petr Machata Date: Fri Nov 22 15:47:21 2019 +0000 net: flow_dissector: Wrap unionized VLAN fields in a struct In commit a82055af5959 ("netfilter: nft_payload: add VLAN offload support"), VLAN fields in struct flow_dissector_key_vlan were unionized with the intention of introducing another field that covered the whole TCI header. However without a wrapping struct the subfields end up sharing the same bits. As a result, "tc filter add ... flower vlan_id 14" specifies not only vlan_id, but also vlan_priority. Fix by wrapping the individual VLAN fields in a struct. Fixes: a82055af5959 ("netfilter: nft_payload: add VLAN offload support") Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 4bbb02f1a5561b5b2056ca1ef56c1baa54aeb263 Merge: 41b416f1fc4c 7a89233ac504 Author: David S. Miller Date: Fri Nov 22 09:40:52 2019 -0800 Merge tag 'mac80211-next-for-net-next-2019-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== The interesting new thing here is AQL, the Airtime Queue Limit patchset from Kan Yan (Google) and Toke Høiland-Jørgensen (Redhat). The effect is intended to eventually be similar to BQL, but byte queue limits are not useful in wifi where the actual throughput can vary by around 4 orders of magnitude. There are more details in the patches themselves. ==================== Signed-off-by: David S. Miller commit 51e46c7a4007d271b2d42dbc2df953ab968577a7 Author: Kees Cook Date: Thu Nov 21 12:59:29 2019 -0800 docs, parallelism: Rearrange how jobserver reservations are made Rasmus correctly observed that the existing jobserver reservation only worked if no other build targets were specified. The correct approach is to hold the jobserver slots until sphinx has finished. To fix this, the following changes are made: - refactor (and rename) scripts/jobserver-exec to set an environment variable for the maximally reserved jobserver slots and exec a child, to release the slots on exit. - create Documentation/scripts/parallel-wrapper.sh which examines both $PARALLELISM and the detected "-jauto" logic from Documentation/Makefile to decide sphinx's final -j argument. - chain these together in Documentation/Makefile Suggested-by: Rasmus Villemoes Link: https://lore.kernel.org/lkml/eb25959a-9ec4-3530-2031-d9d716b40b20@rasmusvillemoes.dk Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20191121205929.40371-4-keescook@chromium.org Signed-off-by: Jonathan Corbet commit dffd011480d727a819c537edf3b90ef063731725 Author: Kees Cook Date: Thu Nov 21 12:59:28 2019 -0800 docs, parallelism: Do not leak blocking mode to other readers Setting non-blocking via a local copy of the jobserver file descriptor is safer than just assuming other reader processes with the same fd open are prepared for it to be non-blocking. Suggested-by: Rasmus Villemoes Link: https://lore.kernel.org/lkml/44c01043-ab24-b4de-6544-e8efd153e27a@rasmusvillemoes.dk Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20191121205929.40371-3-keescook@chromium.org Signed-off-by: Jonathan Corbet commit 4920323cffc0fe10ac107ab3e94d1bd218a678d9 Author: Kees Cook Date: Thu Nov 21 12:59:27 2019 -0800 docs, parallelism: Fix failure path and add comment Rasmus noted that the failure path didn't correctly exit. Fix this and add another comment about GNU Make's job server environment variable names over time. Reported-by: Rasmus Villemoes Link: https://lore.kernel.org/lkml/eb25959a-9ec4-3530-2031-d9d716b40b20@rasmusvillemoes.dk Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20191121205929.40371-2-keescook@chromium.org Signed-off-by: Jonathan Corbet commit 41b416f1fc4c7074e1801fc20f1c7fda94459487 Author: Tuong Lien Date: Thu Nov 21 15:34:58 2019 +0700 tipc: support in-order name publication events It is observed that TIPC service binding order will not be kept in the publication event report to user if the service is subscribed after the bindings. For example, services are bound by application in the following order: Server: bound port A to {18888,66,66} scope 2 Server: bound port A to {18888,33,33} scope 2 Now, if a client subscribes to the service range (e.g. {18888, 0-100}), it will get the 'TIPC_PUBLISHED' events in that binding order only when the subscription is started before the bindings. Otherwise, if started after the bindings, the events will arrive in the opposite order: Client: received event for published {18888,33,33} Client: received event for published {18888,66,66} For the latter case, it is clear that the bindings have existed in the name table already, so when reported, the events' order will follow the order of the rbtree binding nodes (- a node with lesser 'lower'/'upper' range value will be first). This is correct as we provide the tracking on a specific service status (available or not), not the relationship between multiple services. However, some users expect to see the same order of arriving events irrespective of when the subscription is issued. This turns out to be easy to fix. We now add functionality to ensure that publication events always are issued in the same temporal order as the corresponding bindings were performed. v2: replace the unnecessary macro - 'publication_after()' with inline function. v3: reuse 'time_after32()' instead of reinventing the same exact code. Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit ba5f6a8617f4cd8e77da0a190b9647065014eade Author: Hoang Le Date: Thu Nov 21 10:01:09 2019 +0700 tipc: update replicast capability for broadcast send link When setting up a cluster with non-replicast/replicast capability supported. This capability will be disabled for broadcast send link in order to be backwards compatible. However, when these non-support nodes left and be removed out the cluster. We don't update this capability on broadcast send link. Then, some of features that based on this capability will also disabling as unexpected. In this commit, we make sure the broadcast send link capabilities will be re-calculated as soon as a node removed/rejoined a cluster. Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit cd94eade0b2ab7673a97223d09406abf668b7f73 Author: Stephen Boyd Date: Wed Nov 13 16:19:25 2019 -0800 clk: ingenic: Allow drivers to be built with COMPILE_TEST We don't need the MIPS architecture or even a MIPS compiler to compile test these drivers. Let's add a COMPILE_TEST possibility on the menuconfig here so that we can build these drivers on more configurations. Cc: Paul Cercueil Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20191114001925.159276-1-sboyd@kernel.org Reviewed-by: Paul Cercueil commit e3fedd570dedc0cde6240aff7a2bf62043b67ce9 Author: Masami Hiramatsu Date: Fri Nov 22 22:50:17 2019 +0900 Documentation: Remove bootmem_debug from kernel-parameters.txt Remove bootmem_debug kernel paramenter because it has been replaced by memblock=debug. Signed-off-by: Masami Hiramatsu Cc: Mike Rapoport Cc: Andrew Morton Cc: Jonathan Corbet Link: https://lore.kernel.org/r/157443061745.20995.9432492850513217966.stgit@devnote2 Signed-off-by: Jonathan Corbet commit 402613f3ef4bdac0406d710c7b9dabac76a43679 Author: Daniel W. S. Almeida Date: Fri Nov 22 01:18:06 2019 -0300 Documentation: security: core.rst: fix warnings Fix warnings due to missing markup, no change in content otherwise. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20191122041806.68650-1-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 605b0f53a126467aa24424690500ba1e6d8fbba2 Author: SeongJae Park Date: Fri Nov 22 00:41:25 2019 +0100 Documentation/process/howto/kokr: Update for 4.x -> 5.x versioning Translate this commit to Korean: d2b008f134b7 ("Documentation/process/howto: Update for 4.x -> 5.x versioning") Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20191121234125.28032-8-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit bf23a48edbe331f834eb49d1bd6484ae98cf4dc7 Author: SeongJae Park Date: Fri Nov 22 00:41:24 2019 +0100 Documentation/translation: Use Korean for Korean translation title Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20191121234125.28032-7-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit a897b13d1b77c8bd532a239adfd48c286a1b39ab Author: SeongJae Park Date: Fri Nov 22 00:41:23 2019 +0100 docs/memory-barriers.txt: Remove remaining references to mmiowb() This commit removes references to sections erased by Commit 915530396c78 ("Documentation: Kill all references to mmiowb()"). Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20191121234125.28032-6-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 3ef2f6aca51d305251fa90ff3bf9738f5af7f63e Author: SeongJae Park Date: Fri Nov 22 00:41:22 2019 +0100 docs/memory-barriers.txt/kokr: Update I/O section to be clearer about CPU vs thread Translate this commit to Korean: 9726840d9cf0 ("docs/memory-barriers.txt: Update I/O section to be clearer about CPU vs thread") Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20191121234125.28032-5-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 18b68475c5ef2a7bde2e151729f0c10c17e05fa6 Author: SeongJae Park Date: Fri Nov 22 00:41:21 2019 +0100 docs/memory-barriers.txt/kokr: Fix style, spacing and grammar in I/O section Translate this commit to Korean: 0cde62a46e88 ("docs/memory-barriers.txt: Fix style, spacing and grammar in I/O section") Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20191121234125.28032-4-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit bf3b965bc45c87c0bb49d834d1bfff263e522d59 Author: SeongJae Park Date: Fri Nov 22 00:41:20 2019 +0100 Documentation/kokr: Kill all references to mmiowb() Translate this commit to Korean: 915530396c78 ("Documentation: Kill all references to mmiowb()") Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20191121234125.28032-3-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 2ece3e00ac9581e67d3b7316a6bf36d64fed61df Author: SeongJae Park Date: Fri Nov 22 00:41:19 2019 +0100 docs/memory-barriers.txt/kokr: Rewrite "KERNEL I/O BARRIER EFFECTS" section Translate this commit to Korean: 4614bbdee357 ("docs/memory-barriers.txt: Rewrite "KERNEL I/O BARRIER EFFECTS" section") Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20191121234125.28032-2-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 8f39f22f73b3066623d488d3a54dd669575b56dc Author: Ulf Hansson Date: Thu Nov 21 11:07:26 2019 +0100 MAINTAINERS: Update section for Ux500 clock drivers There's no longer any need host a tree solely to serve changes for the Ux500 clock driver, thus drop this from the corresponding section and use the common clk tree instead. Moreover, let's also add the generic linux-clk mailing list and rename the section header. Cc: Linus Walleij Signed-off-by: Ulf Hansson Link: https://lkml.kernel.org/r/20191121100726.17725-1-ulf.hansson@linaro.org Reviewed-by: Linus Walleij Signed-off-by: Stephen Boyd commit 419e9c38aa075ed0cd3c13d47e15954b686bcdb6 Author: Jan Kara Date: Thu Nov 21 16:14:38 2019 -0800 iomap: Fix pipe page leakage during splicing When splicing using iomap_dio_rw() to a pipe, we may leak pipe pages because bio_iov_iter_get_pages() records that the pipe will have full extent worth of data however if file size is not block size aligned iomap_dio_rw() returns less than what bio_iov_iter_get_pages() set up and splice code gets confused leaking a pipe page with the file tail. Handle the situation similarly to the old direct IO implementation and revert iter to actually returned read amount which makes iter consistent with value returned from iomap_dio_rw() and thus the splice code is happy. Fixes: ff6a9292e6f6 ("iomap: implement direct I/O") CC: stable@vger.kernel.org Reported-by: syzbot+991400e8eba7e00a26e1@syzkaller.appspotmail.com Signed-off-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 6334b91e502ca1ec10157f2a3a2c74eea6b5e279 Author: Darrick J. Wong Date: Thu Nov 21 16:14:49 2019 -0800 iomap: trace iomap_appply results Add some tracepoints so that we can more easily debug what the filesystem is returning from ->iomap_begin. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 9c0015ef092879f61129cdffbbe22fd30201d39b Author: Danit Goldberg Date: Wed Nov 6 15:18:12 2019 +0200 IB/mlx5: Implement callbacks for getting VFs GUID attributes Implement the IB defined callback mlx5_ib_get_vf_guid used to query FW for VFs attributes and return node and port GUIDs. Signed-off-by: Danit Goldberg Signed-off-by: Leon Romanovsky commit 2446887ed226786fcf9b3ece8d89e6b22551411b Author: Danit Goldberg Date: Wed Nov 6 14:57:00 2019 +0200 IB/ipoib: Add ndo operation for getting VFs GUID attributes Add ndo operation to the network driver that enables configuring ipoib_get_vf_guid operation. The operation allows to get a VF port and node GUIDs. Signed-off-by: Danit Goldberg Signed-off-by: Leon Romanovsky commit bfcb3c5d14854f001881dc3f5cc29bf186598d9f Author: Danit Goldberg Date: Wed Nov 6 15:08:32 2019 +0200 IB/core: Add interfaces to get VF node and port GUIDs Provide ability to get node and port GUIDs of VFs to be symmetrical to already existing set option. Signed-off-by: Danit Goldberg Signed-off-by: Leon Romanovsky commit 2911edb653b9c64e0aad461f308cae8ce030eb7b Author: Christoph Hellwig Date: Wed Nov 20 09:46:05 2019 -0800 xfs: remove the mappedbno argument to xfs_da_get_buf Use the xfs_da_get_buf_daddr function directly for the two callers that pass a mapped disk address, and then remove the mappedbno argument. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit cd2c9f1b544b8f5e1ca1874032fd669d74946a6d Author: Christoph Hellwig Date: Wed Nov 20 09:46:04 2019 -0800 xfs: remove the mappedbno argument to xfs_da_read_buf Move the code for reading an already mapped block into xfs_da3_node_read_mapped, which is the only caller ever passing a block number in the mappedbno argument and replace the mappedbno argument with the simple xfs_dabuf_get flags. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 02c57f0a8b07f5c8a393530ff29b2f6fbe17c825 Author: Christoph Hellwig Date: Wed Nov 20 09:46:04 2019 -0800 xfs: split xfs_da3_node_read Split xfs_da3_node_read into one variant that always looks up the daddr and doesn't accept holes, and one that already has a daddr at hand. This is in preparation of splitting up xfs_da_read_buf in a similar way. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f3fcb314d16cdcffb6c521564b86b453869300da Author: Christoph Hellwig Date: Wed Nov 20 09:46:03 2019 -0800 xfs: remove the mappedbno argument to xfs_dir3_leafn_read This argument is always hard coded to -1, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c943c0b2e5c310e2f70e64055666732782f00254 Author: Christoph Hellwig Date: Wed Nov 20 09:46:03 2019 -0800 xfs: remove the mappedbno argument to xfs_dir3_leaf_read This argument is always hard coded to -1, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit dfb8759408a9dd8a31a222ed0987bad3e83b50a0 Author: Christoph Hellwig Date: Wed Nov 20 09:46:02 2019 -0800 xfs: remove the mappedbno argument to xfs_attr3_leaf_read This argument is always hard coded to -1, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 06566fda428e6420aa993e32845b165936fb50d6 Author: Christoph Hellwig Date: Wed Nov 20 09:46:02 2019 -0800 xfs: remove the mappedbno argument to xfs_da_reada_buf Replace the mappedbno argument with the simple flags for xfs_da_reada_buf and xfs_dir3_data_readahead. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 199e9ba4e4a9927f5addb644c1a1e1002e68cc30 Author: Christoph Hellwig Date: Wed Nov 20 10:18:50 2019 -0800 xfs: improve the xfs_dabuf_map calling conventions Use a flags argument with the XFS_DABUF_MAP_HOLE_OK flag to signal that a hole is okay and not corruption, and return 0 with *nmap set to 0 to signal that case in the return value instead of a nameless -1 return code. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 45feef8f50b94d56d6a433ad5baf5cdf58e3db98 Author: Christoph Hellwig Date: Wed Nov 20 10:18:44 2019 -0800 xfs: refactor xfs_dabuf_map Merge xfs_buf_map_from_irec and xfs_da_map_covers_blocks into a single loop in the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit fa0d44ec7faab82da468aa7ab4f0c2614cadf7e7 Author: Christoph Hellwig Date: Wed Nov 20 09:46:00 2019 -0800 xfs: simplify mappedbno handling in xfs_da_{get,read}_buf Shortcut the creation of xfs_bmbt_irec and xfs_buf_map for the case where the callers passed an already mapped xfs_daddr_t. This is in preparation for splitting these cases out entirely later. Also reject the mappedbno case for xfs_da_reada_buf as no callers currently uses it and it will be removed soon. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 30aad41721e087babcf27c5192474724d555936c Author: Danit Goldberg Date: Wed Nov 6 15:30:07 2019 +0200 net/core: Add support for getting VF GUIDs Introduce a new ndo: ndo_get_vf_guid, to get from the net device the port and node GUID. New applications can choose to use this interface to show GUIDs with iproute2 with commands such as: - ip link show ib4 ib4: mtu 4092 qdisc noop state DOWN mode DEFAULT group default qlen 256 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 00:00:0a:2d:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:44:36:8d brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 22:44:33:00:33:11:00:33, PORT_GUID 10:21:33:12:00:11:22:10, link-state disable, trust off, query_rss off Signed-off-by: Danit Goldberg Acked-by: David Ahern Signed-off-by: Leon Romanovsky commit 15b9cbb2c5e1cf22c13fe38bf513bab821b47630 Author: Chris Wilson Date: Thu Nov 21 07:10:40 2019 +0000 Revert "drm/i915/gt: Wait for new requests in intel_gt_retire_requests()" From inside an active timeline in the execbuf ioctl, we may try to reclaim some space in the GGTT. We need GGTT space for all objects on !full-ppgtt platforms, and for context images everywhere. However, to free up space in the GGTT we may need to remove some pinned objects (e.g. context images) that require flushing the idle barriers to remove. For this we use the big hammer of intel_gt_wait_for_idle() However, commit 7936a22dd466 ("drm/i915/gt: Wait for new requests in intel_gt_retire_requests()") will continue spinning on the wait if a timeline is active but lacks requests, as is the case during execbuf reservation. Spinning forever is quite time consuming, so revert that commit and start again. In practice, the effect commit 7936a22dd466 was trying to achieve is accomplished by commit 1683d24c1470 ("drm/i915/gt: Move new timelines to the end of active_list"), so there is no immediate rush to replace the looping. Testcase: igt/gem_exec_reloc/basic-range Fixes: a46bfdc83fee ("drm/i915/gt: Wait for new requests in intel_gt_retire_requests()") References: 1683d24c1470 ("drm/i915/gt: Move new timelines to the end of active_list") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191121071044.97798-1-chris@chris-wilson.co.uk (cherry picked from commit 689122dcc36e08f53732adf7ae0246f62eff3eb6) [Joonas: Corrected Fixes: tag ref to match drm-intel-next-fixes] Signed-off-by: Joonas Lahtinen commit 0e4a459f56c32d3e52ae69a4b447db2f48a65f44 Author: Kusanagi Kouichi Date: Wed Nov 20 19:43:50 2019 +0900 tracing: Remove unnecessary DEBUG_FS dependency Tracing replaced debugfs with tracefs. Signed-off-by: Kusanagi Kouichi Reviewed-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20191120104350753.EWCT.12796.ppp.dion.ne.jp@dmta0009.auone-net.jp Signed-off-by: Greg Kroah-Hartman commit 4584f084aa9d8033d5911935837dbee7b082d0e9 Author: Ian Rogers Date: Wed Nov 20 10:09:25 2019 -0800 perf parse: Fix potential memory leak when handling tracepoint errors An error may be in place when tracepoint_error is called, use parse_events__handle_error to avoid a memory leak and to capture the first and last error. Error detected by LLVM's libFuzzer using the following event: $ perf stat -e 'msr/event/,f:e' event syntax error: 'msr/event/,f:e' \___ can't access trace events Error: No permissions to read /sys/kernel/debug/tracing/events/f/e Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing/' Initial error: event syntax error: 'msr/event/,f:e' \___ no value assigned for term Run 'perf list' for a list of valid events Usage: perf stat [] [] -e, --event event selector. use 'perf list' to list available events Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao 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/20191120180925.21787-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 358f98ee8a3578bbf464ac767b726c5de1ce0647 Author: Colin Ian King Date: Thu Nov 21 09:26:23 2019 +0000 perf probe: Fix spelling mistake "addrees" -> "address" There is a spelling mistake in a pr_warning message. Fix it. Signed-off-by: Colin King Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: http://lore.kernel.org/lkml/20191121092623.374896-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo commit 10992af6bf46a2048ad964985a5b77464e5563b1 Author: Hewenliang Date: Mon Nov 18 20:44:15 2019 -0500 libtraceevent: Fix memory leakage in copy_filter_type It is necessary to free the memory that we have allocated when error occurs. Fixes: ef3072cd1d5c ("tools lib traceevent: Get rid of die in add_filter_type()") Signed-off-by: Hewenliang Reviewed-by: Steven Rostedt (VMware) Cc: Tzvetomir Stoyanov Link: http://lore.kernel.org/lkml/20191119014415.57210-1-hewenliang4@huawei.com Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 68401a1799fa14cb72c2a129bbefdacd44279772 Author: Sudip Mukherjee Date: Thu Nov 14 13:37:19 2019 +0000 libtraceevent: Fix header installation When we passed some location in DESTDIR, install_headers called do_install with DESTDIR as part of the second argument. But do_install is again using '$(DESTDIR_SQ)$2', so as a result the headers were installed in a location $DESTDIR/$DESTDIR. In my testing I passed DESTDIR=/home/sudip/test and the headers were installed in: /home/sudip/test/home/sudip/test/usr/include/traceevent. Lets remove DESTDIR from the second argument of do_install so that the headers are installed in the correct location. Signed-off-by: Sudipm Mukherjee Reviewed-by: Steven Rostedt (VMware) Cc: Sudipm Mukherjee Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20191114133719.309-1-sudipm.mukherjee@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 32a1ece4bdbde24734ab16484bad7316f03fc42d Author: Adrian Hunter Date: Fri Nov 15 14:42:25 2019 +0200 perf intel-bts: Does not support AUX area sampling Add an error message because Intel BTS does not support AUX area sampling. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit dbd134322e74f19dbabf174b2cbf7fca9bbc34d3 Author: Adrian Hunter Date: Fri Nov 15 14:42:24 2019 +0200 perf intel-pt: Add support for decoding AUX area samples Add support for dumping, queuing and decoding AUX area samples. Decoding samples is the same as regular decoding, except in the case where there are no timestamps, in which case buffers are decoded immediately before the sample event. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-15-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c4ab2f0f763da64d88cec6f20fd664f2347eca60 Author: Adrian Hunter Date: Fri Nov 15 14:42:23 2019 +0200 perf intel-pt: Add support for recording AUX area samples Set up the default number of mmap pages, default sample size and default psb_period for AUX area sampling. Add documentation also. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-14-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a1ac7de6902c1ea6def7a743f1d2e6ba429684b3 Author: Adrian Hunter Date: Fri Nov 15 14:42:22 2019 +0200 perf pmu: When using default config, record which bits of config were changed by the user Default config for a PMU is defined before selected events are parsed. That allows the user-entered config to override the default config. However that does not allow for changing the default config based on other options. For example, if the user chooses AUX area sampling mode, in the case of Intel PT, the psb_period needs to be small for sampling, so there is a need to set the default psb_period to 0 (2 KiB) in that case. However that should not override a value set by the user. To allow for that, when using default config, record which bits of config were changed by the user. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ac2f445fc8989e152dc35eb7af368fd34b92e48a Author: Adrian Hunter Date: Fri Nov 15 14:42:21 2019 +0200 perf auxtrace: Add support for queuing AUX area samples Add functions to queue AUX area samples in advance (auxtrace_queue_data()) or individually (auxtrace_queues__add_sample()) or find out what queue a sample belongs on (auxtrace_queues__sample_queue()). auxtrace_queue_data() can also queue snapshot data which keeps snapshots and samples ordered with respect to each other in case support for that is desired. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 103ed40e4bfa6986d80983b3e67be9d2f61fc9ee Author: Adrian Hunter Date: Fri Nov 15 14:42:20 2019 +0200 perf session: Add facility to peek at all events AUX area samples are not limited in how far back in time the sample could start. Consequently samples must be queued in advance to allow for time-ordered processing. To achieve that, add perf_session__peek_events() that walks and peeks at all the events. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b04b8dd1e4265525dbd74647f747e63e85540189 Author: Adrian Hunter Date: Fri Nov 15 14:42:19 2019 +0200 perf auxtrace: Add support for dumping AUX area samples Add support for dumping AUX area samples i.e. via the perf script/report -D (--dump-raw-trace) option. Committer notes: Add __maybe_unused to the two args for auxtrace__dump_auxtrace_sample() for when we don't HAVE_AUXTRACE_SUPPORT. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ba2675bf15fc3ec1d54b9bf938cf5b28392f79fb Author: Adrian Hunter Date: Fri Nov 15 14:42:18 2019 +0200 perf inject: Cut AUX area samples After decoding AUX area samples, the AUX area data is no longer needed (having been replaced by synthesized events) so cut it out. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit eb7a52d46c6ac95df563f867d526b3d46616b10b Author: Adrian Hunter Date: Fri Nov 15 14:42:17 2019 +0200 perf record: Add aux-sample-size config term To allow individual events to be selected for AUX area sampling, add aux-sample-size config term. attr.aux_sample_size is updated by auxtrace_parse_sample_options() so that the existing validation will see the value. Any event that has a non-zero aux_sample_size will cause AUX area sampling to be configured, irrespective of the --aux-sample option. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c0a6de06c446f8d173ef53fba361acedd5880b20 Author: Adrian Hunter Date: Fri Nov 15 14:42:16 2019 +0200 perf record: Add support for AUX area sampling Add a 'perf record' option '--aux-sample' to request AUX area sampling. AUX area sampling uses an overwriting buffer much like snapshot mode, so adjust the AUX buffer mmapping accordingly. To make it easy to queue samples for decoding, synthesize an ID index. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f0bb7ee8530a07d3c23bd2e06984796e66cfbcf1 Author: Adrian Hunter Date: Fri Nov 15 14:42:15 2019 +0200 perf auxtrace: Add support for AUX area sample recording Add support for parsing and validating AUX area sample options. At present, the only option is the sample size, but it is also necessary to ensure that events are in a group with an AUX area event as the leader. Committer note: Add missing 'static inline' in front of auxtrace_parse_sample_options() for when we don't HAVE_AUXTRACE_SUPPORT. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f306de275b7c18da9ab060acb3dfa91c09e9ae89 Author: Adrian Hunter Date: Fri Nov 15 14:42:14 2019 +0200 perf auxtrace: Move perf_evsel__find_pmu() Move perf_evsel__find_pmu() so it can be used without forward declaration. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 41c4616bb81ff9b2efd981453f2c5d8f57d0c0b8 Author: Linus Walleij Date: Fri Nov 22 14:26:15 2019 +0100 gpio: Add TODO item for regmap helper Add a TODO item for a generic MMIO regmap helper. Suggested-by: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 9bca1a4ef5034f0a82861ac0375eb0272c5ce04e Author: Adrian Hunter Date: Fri Nov 15 14:42:13 2019 +0200 perf record: Add a function to test for kernel support for AUX area sampling Architectures are expected to know if AUX area sampling is supported by the hardware. Add a function perf_can_aux_sample() which will determine whether the kernel supports it. Committer notes: I reported that this message was taking place on a kernel without the required bits: # perf record --aux-sample -e '{intel_pt//u,branch-misses:u}' Error: The sys_perf_event_open() syscall returned with 7 (Argument list too long) for event (branch-misses:u). /bin/dmesg | grep -i perf may provide additional information. Adrian sent a patch addressing it, with this explanation: ---- perf_can_aux_sample_size() always returned true because it did not pass the attribute size to sys_perf_event_open, nor correctly check the return value and errno. ---- After applying it I get, later in the series, when --aux-sample is added: # perf record --aux-sample -e '{intel_pt//u,branch-misses:u}' AUX area sampling is not supported by kernel Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1e5ddb6ba73894e6186e6379dde870979852af6d Author: Takashi Iwai Date: Thu Nov 21 20:07:09 2019 +0100 ASoC: component: Add sync_stop PCM ops Add the support of the new PCM sync_stop ops in ASoC component. It's optional and can be NULL unless you need the sync operation. Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191121190709.29121-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3b1c952c951d5ae91821386d692bc291e87a17b1 Author: Takashi Iwai Date: Thu Nov 21 20:07:08 2019 +0100 ASoC: pcm: Make ioctl ops optional Now PCM core accepts the NULL ioctl ops as default, and passing a proper ioctl ops is no longer mandatory. Adjust soc_new_pcm() to allow also the NULL for component ioctl ops, too. Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191121190709.29121-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 10a9594563415855bd99678ea4f91dea792e5499 Author: Takashi Iwai Date: Fri Nov 22 14:26:24 2019 +0100 ALSA: hda/hdmi - Clear codec->relaxed_resume flag at unbinding The HDMI codec may leave codec->relaxed_resume flag set even after unbinding. Clear it unconditionally. It's very unlikely that this actually matters in the real use case, so just a fix for consistency. Fixes: ade49db337a9 ("ALSA: hda/hdmi - Allow audio component for AMD/ATI and Nvidia HDMI") Link: https://lore.kernel.org/r/20191122132624.5482-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5a858e79c911330678b5a9be91a24830e94a0dc9 Author: Takashi Iwai Date: Fri Nov 22 14:20:00 2019 +0100 ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs The old Nvidia chips have multiple HD-audio codecs on the same HD-audio controller, and this doesn't work as expected with the current audio component binding that is implemented under the one-codec-per- controller assumption; at the probe time, the driver leads to several kernel WARNING messages. For the proper support, we may change the pin2port and port2pin to traverse the codec list per the given pin number, but this needs more development and testing. As a quick workaround, instead, this patch drops the binding in the audio side for these legacy chips since the audio component support in nouveau graphics driver is still not merged (hence it's basically unused). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205625 Fixes: ade49db337a9 ("ALSA: hda/hdmi - Allow audio component for AMD/ATI and Nvidia HDMI") Link: https://lore.kernel.org/r/20191122132000.4460-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit d60229d84846a8399257006af9c5444599f64361 Author: Colin Ian King Date: Fri Nov 22 13:13:54 2019 +0000 ALSA: cs4236: fix error return comparison of an unsigned integer The return from pnp_irq is an unsigned integer type resource_size_t and hence the error check for a positive non-error code is always going to be true. A check for a non-failure return from pnp_irq should in fact be for (resource_size_t)-1 rather than >= 0. Addresses-Coverity: ("Unsigned compared against 0") Fixes: a9824c868a2c ("[ALSA] Add CS4232 PnP BIOS support") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191122131354.58042-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit 9435f2bb66874a0c4dd25e7c978957a7ca2c93b1 Author: Takashi Iwai Date: Fri Nov 22 12:28:40 2019 +0100 ALSA: usb-audio: Fix NULL dereference at parsing BADD snd_usb_mixer_controls_badd() that parses UAC3 BADD profiles misses a NULL check for the given interfaces. When a malformed USB descriptor is passed, this may lead to an Oops, as spotted by syzkaller. Skip the iteration if the interface doesn't exist for avoiding the crash. Fixes: 17156f23e93c ("ALSA: usb: add UAC3 BADD profiles support") Reported-by: syzbot+a36ab65c6653d7ccdd62@syzkaller.appspotmail.com Suggested-by: Dan Carpenter Cc: Link: https://lore.kernel.org/r/20191122112840.24797-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4e29b70d54376f795285bc337c9ebf7439e374c6 Author: Daniel W. S. Almeida Date: Fri Nov 22 00:47:02 2019 -0300 Documentation: gpio: driver.rst: Fix warnings Fix warnings due to incorrect rst markup. Also improved the presentation a little without changing the underlying content. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20191122034702.58563-1-dwlsalmeida@gmail.com Signed-off-by: Linus Walleij commit 808b9931d5a06760315c0dd02519da78cb944d8e Author: Geert Uytterhoeven Date: Wed Nov 20 16:45:21 2019 +0100 gpio: of: Fix bogus reference to gpiod_get_count() The recommended function is called gpiod_count(), not gpiod_get_count(). Fixes: f626d6dfb7098525 ("gpio: of: Break out OF-only code") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191120154521.16273-1-geert+renesas@glider.be Signed-off-by: Linus Walleij commit 51158416c24d8aca224ac80dc0ee82d90438b8c8 Author: Geert Uytterhoeven Date: Wed Nov 20 15:37:45 2019 +0100 gpiolib: Grammar s/manager/managed/ Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191120143745.1254-1-geert+renesas@glider.be Signed-off-by: Linus Walleij commit 7a89233ac50468a3a9636803a85d06c8f907f8ee Author: Toke Høiland-Jørgensen Date: Mon Nov 18 22:06:10 2019 -0800 mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue The previous commit added the ability to throttle stations when they queue too much airtime in the hardware. This commit enables the functionality by calculating the expected airtime usage of each packet that is dequeued from the TXQs in mac80211, and accounting that as pending airtime. The estimated airtime for each skb is stored in the tx_info, so we can subtract the same amount from the running total when the skb is freed or recycled. The throttling mechanism relies on this accounting to be accurate (i.e., that we are not freeing skbs without subtracting any airtime they were accounted for), so we put the subtraction into ieee80211_report_used_skb(). As an optimisation, we also subtract the airtime on regular TX completion, zeroing out the value stored in the packet afterwards, to avoid having to do an expensive lookup of the station from the packet data on every packet. This patch does *not* include any mechanism to wake a throttled TXQ again, on the assumption that this will happen anyway as a side effect of whatever freed the skb (most commonly a TX completion). Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20191119060610.76681-5-kyan@google.com Signed-off-by: Johannes Berg commit 3ace10f5b5ad94bdbd4b419dc9da2217d57720a9 Author: Kan Yan Date: Mon Nov 18 22:06:09 2019 -0800 mac80211: Implement Airtime-based Queue Limit (AQL) In order for the Fq_CoDel algorithm integrated in mac80211 layer to operate effectively to control excessive queueing latency, the CoDel algorithm requires an accurate measure of how long packets stays in the queue, AKA sojourn time. The sojourn time measured at the mac80211 layer doesn't include queueing latency in the lower layer (firmware/hardware) and CoDel expects lower layer to have a short queue. However, most 802.11ac chipsets offload tasks such TX aggregation to firmware or hardware, thus have a deep lower layer queue. Without a mechanism to control the lower layer queue size, packets only stay in mac80211 layer transiently before being sent to firmware queue. As a result, the sojourn time measured by CoDel in the mac80211 layer is almost always lower than the CoDel latency target, hence CoDel does little to control the latency, even when the lower layer queue causes excessive latency. The Byte Queue Limits (BQL) mechanism is commonly used to address the similar issue with wired network interface. However, this method cannot be applied directly to the wireless network interface. "Bytes" is not a suitable measure of queue depth in the wireless network, as the data rate can vary dramatically from station to station in the same network, from a few Mbps to over Gbps. This patch implements an Airtime-based Queue Limit (AQL) to make CoDel work effectively with wireless drivers that utilized firmware/hardware offloading. AQL allows each txq to release just enough packets to the lower layer to form 1-2 large aggregations to keep hardware fully utilized and retains the rest of the frames in mac80211 layer to be controlled by the CoDel algorithm. Signed-off-by: Kan Yan [ Toke: Keep API to set pending airtime internal, fix nits in commit msg ] Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20191119060610.76681-4-kyan@google.com Signed-off-by: Johannes Berg commit db3e1c40cf2f973fbdd52ae0b59a9472b1c04f4a Author: Toke Høiland-Jørgensen Date: Mon Nov 18 22:06:08 2019 -0800 mac80211: Import airtime calculation code from mt76 Felix recently added code to calculate airtime of packets to the mt76 driver. Import this into mac80211 so we can use it for airtime queue limit calculations. The airtime.c file is copied verbatim from the mt76 driver, and adjusted to be usable in mac80211. This involves: - Switching to mac80211 data structures. - Adding support for 160 MHz channels and HE mode. - Moving the symbol and duration calculations around a bit to avoid rounding with the higher rates and longer symbol times used for HE rates. The per-rate TX rate calculation is also split out to its own function so it can be used directly for the AQL calculations later. Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20191119060610.76681-3-kyan@google.com [fix HE_GROUP_IDX() to use 3 * bw, since there are 3 _gi values] Signed-off-by: Johannes Berg commit bc71d8b580ba81b55b6e15b1c0320632515b4bac Author: Taehee Yoo Date: Thu Nov 21 12:26:45 2019 +0000 virt_wifi: fix use-after-free in virt_wifi_newlink() When virt_wifi interface is created, virt_wifi_newlink() is called and it calls register_netdevice(). if register_netdevice() fails, it internally would call ->priv_destructor(), which is virt_wifi_net_device_destructor() and it frees netdev. but virt_wifi_newlink() still use netdev. So, use-after-free would occur in virt_wifi_newlink(). Test commands: ip link add dummy0 type dummy modprobe bonding ip link add bonding_masters link dummy0 type virt_wifi Splat looks like: [ 202.220554] BUG: KASAN: use-after-free in virt_wifi_newlink+0x88b/0x9a0 [virt_wifi] [ 202.221659] Read of size 8 at addr ffff888061629cb8 by task ip/852 [ 202.222896] CPU: 1 PID: 852 Comm: ip Not tainted 5.4.0-rc5 #3 [ 202.223765] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 202.225073] Call Trace: [ 202.225532] dump_stack+0x7c/0xbb [ 202.226869] print_address_description.constprop.5+0x1be/0x360 [ 202.229362] __kasan_report+0x12a/0x16f [ 202.230714] kasan_report+0xe/0x20 [ 202.232595] virt_wifi_newlink+0x88b/0x9a0 [virt_wifi] [ 202.233370] __rtnl_newlink+0xb9f/0x11b0 [ 202.244909] rtnl_newlink+0x65/0x90 [ ... ] Cc: stable@vger.kernel.org Fixes: c7cdba31ed8b ("mac80211-next: rtnetlink wifi simulation device") Signed-off-by: Taehee Yoo Link: https://lore.kernel.org/r/20191121122645.9355-1-ap420073@gmail.com [trim stack dump a bit] Signed-off-by: Johannes Berg commit 08a5bdde3812993cb8eb7aa9124703df0de28e4b Author: Thomas Pedersen Date: Mon Nov 18 21:35:38 2019 -0800 mac80211: consider QoS Null frames for STA_NULLFUNC_ACKED Commit 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing") let STAs send QoS Null frames as PS triggers if the AP was a QoS STA. However, the mac80211 PS stack relies on an interface flag IEEE80211_STA_NULLFUNC_ACKED for determining trigger frame ACK, which was not being set for acked non-QoS Null frames. The effect is an inability to trigger hardware sleep via IEEE80211_CONF_PS since the QoS Null frame was seemingly never acked. This bug only applies to drivers which set both IEEE80211_HW_REPORTS_TX_ACK_STATUS and IEEE80211_HW_PS_NULLFUNC_STACK. Detect the acked QoS Null frame to restore STA power save. Fixes: 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing") Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20191119053538.25979-4-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit c90142a518d3744c84beb51cab0cda8956bb82a4 Author: Thomas Pedersen Date: Mon Nov 18 21:35:37 2019 -0800 mac80211: expose HW conf flags through debugfs This is useful during testing to eg. check the currently configured HW power save state. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20191119053538.25979-3-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit a4f95f31a9f38d9bb1fd313fcc2d0c0d48116ee3 Author: Andre Heider Date: Fri Nov 22 13:31:42 2019 +0100 Bluetooth: btbcm: Use the BDADDR_PROPERTY quirk Some devices ship with the controller default address, like the Orange Pi 3 (BCM4345C5). Allow the bootloader to set a valid address through the device tree. Signed-off-by: Andre Heider Signed-off-by: Marcel Holtmann commit 724c15a43e2c7ac26e2d07abef99191162498fa9 Author: Vivek Goyal Date: Wed Oct 30 11:07:19 2019 -0400 virtiofs: Use completions while waiting for queue to be drained While we wait for queue to finish draining, use completions instead of usleep_range(). This is better way of waiting for event. Signed-off-by: Vivek Goyal Reviewed-by: Stefan Hajnoczi Signed-off-by: Miklos Szeredi commit 1efcf39eb627573f8d543ea396cf36b0651b1e56 Author: Vivek Goyal Date: Wed Oct 30 11:07:18 2019 -0400 virtiofs: Do not send forget request "struct list_head" element We are sending whole of virtio_fs_forget struct to the other end over virtqueue. Other end does not need to see elements like "struct list". That's internal detail of guest kernel. Fix it. Signed-off-by: Vivek Goyal Reviewed-by: Stefan Hajnoczi Signed-off-by: Miklos Szeredi commit 58ada94f95f71d4f73197ab0e9603dbba6e47fe3 Author: Vivek Goyal Date: Wed Oct 30 11:07:17 2019 -0400 virtiofs: Use a common function to send forget Currently we are duplicating logic to send forgets at two places. Consolidate the code by calling one helper function. This also uses virtqueue_add_outbuf() instead of virtqueue_add_sgs(). Former is simpler to call. Signed-off-by: Vivek Goyal Reviewed-by: Stefan Hajnoczi Signed-off-by: Miklos Szeredi commit 5072f73cb6ee0867d2d11996a244eba48bfda931 Author: Toke Høiland-Jørgensen Date: Tue Nov 12 14:08:35 2019 +0100 mac80211: Add new sta_info getter by sta/vif addrs In ieee80211_tx_status() we don't have an sdata struct when looking up the destination sta. Instead, we just do a lookup by the vif addr that is the source of the packet being completed. Factor this out into a new sta_info getter helper, since we need to use it for accounting AQL as well. Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20191112130835.382062-1-toke@redhat.com [remove internal rcu_read_lock(), document instead] Signed-off-by: Johannes Berg commit b226a826d83d66806fae20fc3518dace8b86bacb Author: Johannes Berg Date: Fri Nov 22 12:42:42 2019 +0100 mac80211: add a comment about monitor-to-dev injection Add a note with a use-case for the monitor-to-dev injection mechanism in mac80211, reported by Ben Greear. Change-Id: I6456997ef9bc40b24ede860b6ef2fed5af49cf44 Signed-off-by: Johannes Berg commit 4ee812f6143d78d8ba1399671d78c8d78bf2817c Author: Michael Ellerman Date: Wed Nov 20 22:27:38 2019 +1100 crypto: vmx - Avoid weird build failures In the vmx crypto Makefile we assign to a variable called TARGET and pass that to the aesp8-ppc.pl and ghashp8-ppc.pl scripts. The variable is meant to describe what flavour of powerpc we're building for, eg. either 32 or 64-bit, and big or little endian. Unfortunately TARGET is a fairly common name for a make variable, and if it happens that TARGET is specified as a command line parameter to make, the value specified on the command line will override our value. In particular this can happen if the kernel Makefile is driven by an external Makefile that uses TARGET for something. This leads to weird build failures, eg: nonsense at /build/linux/drivers/crypto/vmx/ghashp8-ppc.pl line 45. /linux/drivers/crypto/vmx/Makefile:20: recipe for target 'drivers/crypto/vmx/ghashp8-ppc.S' failed Which shows that we passed an empty value for $(TARGET) to the perl script, confirmed with make V=1: perl /linux/drivers/crypto/vmx/ghashp8-ppc.pl > drivers/crypto/vmx/ghashp8-ppc.S We can avoid this confusion by using override, to tell make that we don't want anything to override our variable, even a value specified on the command line. We can also use a less common name, given the script calls it "flavour", let's use that. Signed-off-by: Michael Ellerman Signed-off-by: Herbert Xu commit 413808b71e6204b0cc1eeaa77960f7c3cd381d33 Author: Eric Biggers Date: Sun Nov 17 23:22:16 2019 -0800 crypto: lib/chacha20poly1305 - use chacha20_crypt() Use chacha20_crypt() instead of chacha_crypt(), since it's not really appropriate for users of the ChaCha library API to be passing the number of rounds as an argument. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b62755aed3a3f5ca9edd2718339ccea3b6bbbe57 Author: Eric Biggers Date: Sun Nov 17 23:21:58 2019 -0800 crypto: x86/chacha - only unregister algorithms if registered It's not valid to call crypto_unregister_skciphers() without a prior call to crypto_register_skciphers(). Fixes: 84e03fa39fbe ("crypto: x86/chacha - expose SIMD ChaCha routine as library function") Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 2043323a799a660bc84bbee404cf7a2617ec6157 Author: Eric Biggers Date: Sun Nov 17 23:21:29 2019 -0800 crypto: chacha_generic - remove unnecessary setkey() functions Use chacha20_setkey() and chacha12_setkey() from instead of defining them again in chacha_generic.c. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 3d04158814e7a808c38124c87502b430b916dfcb Author: Corentin Labbe Date: Sun Nov 17 16:09:53 2019 +0000 crypto: amlogic - enable working on big endian kernel On big endian kernel, the GXL crypto driver does not works. This patch do the necessary modification to permit it to work on BE kernel (removing bitfield and adds some cpu_to_le32). Fixes: 48fe583fe541 ("crypto: amlogic - Add crypto accelerator for amlogic GXL") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 93c7f4d357de68f1e3a998b2fc775466d75c4c07 Author: Corentin Labbe Date: Sun Nov 17 17:07:45 2019 +0100 crypto: sun8i-ce - enable working on big endian On big endian kernel, the sun8i-ce crypto driver does not works. This patch do the necessary modification to permit it to work on BE kernel (setting descriptor entries as __le32 and adding some cpu_to_le32) Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 660eda8d50f866e8fc38f3edcd4192c2626b44ea Author: Eric Biggers Date: Sat Nov 16 18:53:24 2019 -0800 crypto: mips/chacha - select CRYPTO_SKCIPHER, not CRYPTO_BLKCIPHER Another instance of CRYPTO_BLKCIPHER made it in just after it was renamed to CRYPTO_SKCIPHER. Fix it. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 90c4b29eb1e555fee66f8329a18cb8a070090ad6 Author: Herbert Xu Date: Sun Nov 17 08:43:44 2019 +0800 hwrng: ks-sa - Enable COMPILE_TEST This patch enables COMPILE_TEST on the ks-sa-rng driver. Signed-off-by: Herbert Xu Reviewed-by: Alexander Sverdlin Signed-off-by: Herbert Xu commit e18036da5c23530994faf7243b592e581f1efed2 Author: Chen Wandun Date: Sat Nov 16 14:51:00 2019 +0800 crypto: essiv - remove redundant null pointer check before kfree kfree has taken null pointer check into account. so it is safe to remove the unnecessary check. Signed-off-by: Chen Wandun Signed-off-by: Herbert Xu commit 57d8154f15e89f53dfb412f4ed32ebe3c3d755a0 Author: Tudor Ambarus Date: Fri Nov 15 13:49:09 2019 +0000 crypto: atmel-aes - Change data type for "lastc" buffer In case of in-place decryption, the "lastc" buffer is used to copy the last ciphertext block before the decryption of the message. It is later used to update the req->iv of the skcipher_request. "lastc" variable is not used to interact with the hardware, there is no restriction to be of type "u32". Change the type of "lastc" to "u8". Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 61b0dd664fa1873501297efbb12e5684aff074d4 Author: Tudor Ambarus Date: Fri Nov 15 13:49:06 2019 +0000 crypto: atmel-tdes - Set the IV after {en,de}crypt The req->iv of the skcipher_request is expected to contain the last ciphertext block when the {en,de}crypt operation is done. In case of in-place decryption, copy the ciphertext in an intermediate buffer before decryption. This fixes the following tcrypt tests: alg: skcipher: atmel-cbc-des encryption test failed (wrong output IV) on test vector 0, cfg="in-place" 00000000: fe dc ba 98 76 54 32 10 alg: skcipher: atmel-cbc-tdes encryption test failed (wrong output IV) on test vector 0, cfg="in-place" 00000000: 7d 33 88 93 0f 93 b2 42 Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit d1d787bcebfe122a5bd443ae565696661e2e9656 Author: Corentin Labbe Date: Thu Nov 14 13:58:49 2019 +0100 crypto: sun4i-ss - fix big endian issues When testing BigEndian kernel, the sun4i-ss was failling all crypto tests. This patch fix endian issues with it. Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 2edf86414b66b2cd921547000208b383972cd11a Author: Corentin Labbe Date: Thu Nov 14 11:58:52 2019 +0100 crypto: sun4i-ss - hide the Invalid keylen message Drop the "Invalid keylen" message to debug level, it adds no value, and when CRYPTO_EXTRA_TEST is enabled, it floods the console. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 626abd3125e02d75e26f3cd2e2aa4a6fb74507b5 Author: Corentin Labbe Date: Thu Nov 14 11:58:13 2019 +0100 crypto: sun4i-ss - use crypto_ahash_digestsize The size of the digest is different between MD5 and SHA1 so instead of using the higher value (5 words), let's use crypto_ahash_digestsize(). Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 7ca2a71d177f51d1d0d339657d3b0cc988d1518e Author: Corentin Labbe Date: Thu Nov 14 11:49:07 2019 +0100 crypto: sun4i-ss - remove dependency on not 64BIT The driver now compile without warnings on 64bits, we can remove the !64BIT condition. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit a7126603d46fe8f01aeedf589e071c6aaa6c6c39 Author: Corentin Labbe Date: Thu Nov 14 11:49:06 2019 +0100 crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c If you try to compile this driver on a 64-bit platform then you will get warnings because it mixes size_t with unsigned int which only works on 32-bit. This patch fixes all of the warnings on sun4i-ss-hash.c. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit a30583fcfb86ebf332573598359c189a4e02c2da Author: Zaibo Xu Date: Wed Nov 13 19:11:08 2019 +0800 MAINTAINERS: Add maintainer for HiSilicon SEC V2 driver Here adds maintainer information for security engine driver. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 1e9bc276f8f19ea65b617d7c9458ead14da4ef60 Author: Zaibo Xu Date: Wed Nov 13 19:11:07 2019 +0800 crypto: hisilicon - add DebugFS for HiSilicon SEC The HiSilicon SEC engine driver uses DebugFS to provide main debug information for user space. Signed-off-by: Zaibo Xu Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit cbfe56e6938b2f7ca5e78b04417ee07f7c8d87fb Author: Longfang Liu Date: Wed Nov 13 19:11:06 2019 +0800 Documentation: add DebugFS doc for HiSilicon SEC This Documentation is for HiSilicon SEC DebugFS. Signed-off-by: Longfang Liu Signed-off-by: Kai Ye Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 73bcb049a77ba75b694cb4142b3a3ef09584a77c Author: Zaibo Xu Date: Wed Nov 13 19:11:05 2019 +0800 crypto: hisilicon - add SRIOV for HiSilicon SEC HiSilicon SEC engine supports PCI SRIOV. This patch enable this feature. User can enable VFs and pass through them to VM, same SEC driver can work in VM to provide skcipher algorithms. Signed-off-by: Zaibo Xu Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 416d82204df44ef727de6eafafeaa4d12fdc78dc Author: Zaibo Xu Date: Wed Nov 13 19:11:04 2019 +0800 crypto: hisilicon - add HiSilicon SEC V2 driver SEC driver provides PCIe hardware device initiation with AES, SM4, and 3DES skcipher algorithms registered to Crypto. It uses Hisilicon QM as interface to CPU. Signed-off-by: Zaibo Xu Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit aee1f9f3c30e1e20e7f74729ced61eac7d74ca68 Author: YueHaibing Date: Wed Nov 13 17:55:50 2019 +0800 crypto: atmel - Fix build error of CRYPTO_AUTHENC If CRYPTO_DEV_ATMEL_AUTHENC is m, CRYPTO_DEV_ATMEL_SHA is m, but CRYPTO_DEV_ATMEL_AES is y, building will fail: drivers/crypto/atmel-aes.o: In function `atmel_aes_authenc_init_tfm': atmel-aes.c:(.text+0x670): undefined reference to `atmel_sha_authenc_get_reqsize' atmel-aes.c:(.text+0x67a): undefined reference to `atmel_sha_authenc_spawn' drivers/crypto/atmel-aes.o: In function `atmel_aes_authenc_setkey': atmel-aes.c:(.text+0x7e5): undefined reference to `atmel_sha_authenc_setkey' Make CRYPTO_DEV_ATMEL_AUTHENC depend on CRYPTO_DEV_ATMEL_AES, and select CRYPTO_DEV_ATMEL_SHA and CRYPTO_AUTHENC for it under there. Reported-by: Hulk Robot Suggested-by: Herbert Xu Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...") Signed-off-by: YueHaibing Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 3e8b4ccdc4ec73a721cb69cff643670ac1eba995 Author: Peter Ujfalusi Date: Wed Nov 13 11:09:47 2019 +0200 crypto: qce/dma - Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Reviewed-by: Vinod Koul Signed-off-by: Herbert Xu commit ec310caf13b5505c268cfa526b7b28152a879d1e Author: Brijesh Singh Date: Tue Nov 12 13:58:34 2019 -0600 crypto: ccp - add SEV command privilege separation Currently, there is no privilege separation of the SEV command; you can run them all or none of them. This is less than ideal because it means that a compromise of the code which launches VMs could make permanent change to the SEV certifcate chain which will affect others. These commands are required to attest the VM environment: - SEV_PDH_CERT_EXPORT - SEV_PLATFORM_STATUS - SEV_GET_{ID,ID2} These commands manage the SEV certificate chain: - SEV_PEK_CERR_IMPORT - SEV_FACTORY_RESET - SEV_PEK_GEN - SEV_PEK_CSR - SEV_PDH_GEN Lets add the CAP_SYS_ADMIN check for the group of the commands which alters the SEV certificate chain to provide some level of privilege separation. Cc: Herbert Xu Cc: Gary Hook Cc: Erdem Aktas Cc: Tom Lendacky Tested-by: David Rientjes Co-developed-by: David Rientjes Signed-off-by: David Rientjes Signed-off-by: Brijesh Singh Signed-off-by: Herbert Xu commit c433a1a8572eceb7c45dd85d93fec6946b71bb72 Author: David Sterba Date: Tue Nov 12 11:20:30 2019 +0100 crypto: blake2b - rename tfm context and _setkey callback The TFM context can be renamed to a more appropriate name and the local varaibles as well, using 'tctx' which seems to be more common than 'mctx'. The _setkey callback was the last one without the blake2b_ prefix, rename that too. Signed-off-by: David Sterba Signed-off-by: Herbert Xu commit 0b4b5f10ac1ffb7f51db1832d189c33955c0d4c1 Author: David Sterba Date: Tue Nov 12 11:20:29 2019 +0100 crypto: blake2b - merge _update to api callback Now that there's only one call to blake2b_update, we can merge it to the callback and simplify. The empty input check is split and the rest of code un-indented. Signed-off-by: David Sterba Signed-off-by: Herbert Xu commit a2e4bdce0f6e69c6cf9e460c4fe158bcc0db351f Author: David Sterba Date: Tue Nov 12 11:20:28 2019 +0100 crypto: blake2b - open code set last block helper The helper is trival and called once, inlining makes things simpler. There's a comment to tie it back to the idea behind the code. Signed-off-by: David Sterba Signed-off-by: Herbert Xu commit d063d6327e7de18e16e4742579a0ff759c3889fb Author: David Sterba Date: Tue Nov 12 11:20:27 2019 +0100 crypto: blake2b - delete unused structs or members All the code for param block has been inlined, last_node and outlen from the state are not used or have become redundant due to other code. Remove it. Signed-off-by: David Sterba Signed-off-by: Herbert Xu commit e87e484d60b0da8302b45f27fe32af1cea02c8d2 Author: David Sterba Date: Tue Nov 12 11:20:26 2019 +0100 crypto: blake2b - simplify key init The keyed init writes the key bytes to the input buffer and does an update. We can do that in two ways: fill the buffer and update immediatelly. This is what current blake2b_init_key does. Any other following _update or _final will continue from the updated state. The other way is to write the key and set the number of bytes to process at the next _update or _final, lazy evaluation. Which leads to the the simplified code in this patch. Signed-off-by: David Sterba Signed-off-by: Herbert Xu commit e374969565472824eba4669dea4a23ad2edb414f Author: David Sterba Date: Tue Nov 12 11:20:25 2019 +0100 crypto: blake2b - merge blake2 init to api callback The call chain from blake2b_init can be simplified because the param block is effectively zeros, besides the key. - blake2b_init0 zeroes state and sets IV - blake2b_init sets up param block with defaults (key and some 1s) - init with key, write it to the input buffer and recalculate state So the compact way is to zero out the state and initialize index 0 of the state directly with the non-zero values and the key. Signed-off-by: David Sterba Signed-off-by: Herbert Xu commit 086db43b5a2281f7ce7d8a67a171b91e1e8fe0ec Author: David Sterba Date: Tue Nov 12 11:20:24 2019 +0100 crypto: blake2b - merge _final implementation to callback blake2b_final is called only once, merge it to the crypto API callback and simplify. This avoids the temporary buffer and swaps the bytes of internal buffer. Signed-off-by: David Sterba Signed-off-by: Herbert Xu commit c7351845b2d685b3ea695f02047bd1b825fb6c98 Author: YueHaibing Date: Tue Nov 12 07:23:14 2019 +0000 crypto: sun8i-ce - Fix memdup.cocci warnings Use kmemdup rather than duplicating its implementation Signed-off-by: YueHaibing Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit d6e9da21ee8246b5e556b3b153401ab045adb986 Author: Herbert Xu Date: Tue Nov 12 10:38:34 2019 +0800 crypto: sun4i-ss - Fix 64-bit size_t warnings If you try to compile this driver on a 64-bit platform then you will get warnings because it mixes size_t with unsigned int which only works on 32-bit. This patch fixes all of the warnings. Signed-off-by: Herbert Xu Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit 0f6f8749872e7be6c083dc845bf4d45a7018b79c Author: Marcelo Diop-Gonzalez Date: Wed Nov 20 15:21:02 2019 -0500 staging: vchiq: Have vchiq_dump_* functions return an error code These functions currently modify the struct dump_context passed to them, and set context->actual to -EFAULT in case of error. The issue is that this is never returned to the user (except accidentally when things align so that that happens). So, have these functions return 0 on success and the appropriate error code otherwise, and return nonzero errors to the user. Reviewed-by: Dan Carpenter Signed-off-by: Marcelo Diop-Gonzalez Reviewed-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20191120202102.249121-5-marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman commit 0046b33ce553f48551ea6e4879562d423ed3f1a0 Author: Marcelo Diop-Gonzalez Date: Wed Nov 20 15:21:01 2019 -0500 staging: vchiq: Refactor indentation in vchiq_dump_* functions Doing this helps with readability, and makes the logic easier to follow. Signed-off-by: Marcelo Diop-Gonzalez Reviewed-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20191120202102.249121-4-marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman commit 2ae0b31e0faced43c011ce3221f2535721cb6a66 Author: Jiri Slaby Date: Fri Nov 22 11:17:21 2019 +0100 tty: don't crash in tty_init_dev when missing tty_port We currently warn the user when tty->port is not set in tty_init_dev yet. The warning says that the kernel will crash later. And it really will only few lines below at: tty->port->itty = tty; So be nice and avoid the crash -- return an error instead. And update the warning. Signed-off-by: Jiri Slaby Cc: Sudip Mukherjee Link: https://lore.kernel.org/r/20191122101721.7222-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7f00be96f1252f1e97fd2300e19250b4dc521fb1 Author: Saravana Kannan Date: Tue Nov 19 23:13:01 2019 -0800 of: property: Add device link support for interrupt-parent, dmas and -gpio(s) Add support for creating device links out of more DT properties. Cc: Thomas Gleixner Cc: Vinod Koul Signed-off-by: Saravana Kannan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20191120071302.227777-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 00d52fb7e4fd1b1b2dc3aa7e6844d074948485b3 Author: Krzysztof Kozlowski Date: Thu Nov 21 21:28:51 2019 +0800 staging: fwserial: Fix Kconfig indentation (seven spaces) Adjust indentation from seven spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191121132851.29072-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 96a8b2912fe56f49193879a771baf214b4f209e4 Author: Marcelo Diop-Gonzalez Date: Wed Nov 20 15:21:00 2019 -0500 staging: vchiq_dump: Replace min with min_t Replacing this fixes checkpatch warnings. Signed-off-by: Marcelo Diop-Gonzalez Link: https://lore.kernel.org/r/20191120202102.249121-3-marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman commit eacb77aad729c1ec077de267065210f92efdece2 Author: Marcelo Diop-Gonzalez Date: Wed Nov 20 15:20:59 2019 -0500 staging: vchiq: Fix block comment format in vchiq_dump() This fixes a checkpatch warning. Signed-off-by: Marcelo Diop-Gonzalez Link: https://lore.kernel.org/r/20191120202102.249121-2-marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman commit 282eaa624f0682a212977076c9062de349540ebb Author: Giovanni Gherdovich Date: Mon Nov 18 19:38:52 2019 +0100 staging: octeon: indent with tabs instead of spaces Remove a coding style error from the Octeon driver's tree and keep checkpatch.pl a little quieter. Being a white-spaces patch the chances of breakage are minimal; we don't have the hardware to run this driver so we built it with COMPILE_TEST enabled on an x86 machine. Signed-off-by: Giovanni Gherdovich Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20191118183852.3699-1-bobdc9664@seznam.cz Signed-off-by: Greg Kroah-Hartman commit 5618332e5b955b4bff06d0b88146b971c8dd7b32 Author: Bernd Porr Date: Mon Nov 18 23:07:59 2019 +0000 staging: comedi: usbduxfast: usbduxfast_ai_cmdtest rounding error The userspace comedilib function 'get_cmd_generic_timed' fills the cmd structure with an informed guess and then calls the function 'usbduxfast_ai_cmdtest' in this driver repeatedly while 'usbduxfast_ai_cmdtest' is modifying the cmd struct until it no longer changes. However, because of rounding errors this never converged because 'steps = (cmd->convert_arg * 30) / 1000' and then back to 'cmd->convert_arg = (steps * 1000) / 30' won't be the same because of rounding errors. 'Steps' should only be converted back to the 'convert_arg' if 'steps' has actually been modified. In addition the case of steps being 0 wasn't checked which is also now done. Signed-off-by: Bernd Porr Cc: # 4.4+ Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/20191118230759.1727-1-mail@berndporr.me.uk Signed-off-by: Greg Kroah-Hartman commit d088337c38a5cd8f0230fbf2d514ff7672f9d0d3 Author: Navid Emamdoost Date: Thu Nov 21 14:20:36 2019 -0600 Bluetooth: Fix memory leak in hci_connect_le_scan In the implementation of hci_connect_le_scan() when conn is added via hci_conn_add(), if hci_explicit_conn_params_set() fails the allocated memory for conn is leaked. Use hci_conn_del() to release it. Fixes: f75113a26008 ("Bluetooth: add hci_connect_le_scan") Signed-off-by: Navid Emamdoost Signed-off-by: Marcel Holtmann commit 5781823fd0d39082bfe2bbc20408aaa85a6e06ad Author: Thor Thayer Date: Thu Nov 21 12:30:48 2019 -0600 EDAC/altera: Use the Altera System Manager driver Simplify by using the Altera System Manager driver that abstracts the differences between ARM32 and ARM64. Also allows the removal of the Arria10 test function since this is handled by the System Manager driver. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Cc: James Morse Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: Meng.Li@windriver.com Cc: Robert Richter Cc: Tony Luck Link: https://lkml.kernel.org/r/1574361048-17572-4-git-send-email-thor.thayer@linux.intel.com commit 08a260d968d27b7c1abfc9ea32d64a2dc7af0449 Author: Thor Thayer Date: Thu Nov 7 14:01:29 2019 -0600 EDAC/altera: Cleanup the ECC Manager Cleanup the ECC Manager peripheral test in probe function as suggested by James. Remove the check for Stratix10. Suggested-by: James Morse Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Tony Luck Link: https://lkml.kernel.org/r/1573156890-26891-2-git-send-email-thor.thayer@linux.intel.com commit 56d9e7bd3fa0f105b6670021d167744bc50ae4fe Author: Meng Li Date: Thu Nov 21 12:30:46 2019 -0600 EDAC/altera: Use fast register IO for S10 IRQs When an IRQ occurs, regmap_{read,write,...}() is invoked in atomic context. Regmap must indicate register IO is fast so that a spinlock is used instead of a mutex to avoid sleeping in atomic context: lock_acquire __mutex_lock mutex_lock_nested regmap_lock_mutex regmap_write a10_eccmgr_irq_unmask unmask_irq.part.0 irq_enable __irq_startup irq_startup __setup_irq request_threaded_irq devm_request_threaded_irq altr_sdram_probe Mark it so. [ bp: Massage. ] Fixes: 3dab6bd52687 ("EDAC, altera: Add support for Stratix10 SDRAM EDAC") Reported-by: Meng Li Signed-off-by: Meng Li Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Cc: James Morse Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: stable Cc: Tony Luck Link: https://lkml.kernel.org/r/1574361048-17572-2-git-send-email-thor.thayer@linux.intel.com commit 16214bd9e43a31683a7073664b000029bba00354 Author: Robert Richter Date: Thu Nov 21 21:36:57 2019 +0000 EDAC/ghes: Do not warn when incrementing refcount on 0 The following warning from the refcount framework is seen during ghes initialization: EDAC MC0: Giving out device to module ghes_edac.c controller ghes_edac: DEV ghes (INTERRUPT) ------------[ cut here ]------------ refcount_t: increment on 0; use-after-free. WARNING: CPU: 36 PID: 1 at lib/refcount.c:156 refcount_inc_checked [...] Call trace: refcount_inc_checked ghes_edac_register ghes_probe ... It warns if the refcount is incremented from zero. This warning is reasonable as a kernel object is typically created with a refcount of one and freed once the refcount is zero. Afterwards the object would be "used-after-free". For GHES, the refcount is initialized with zero, and that is why this message is seen when initializing the first instance. However, whenever the refcount is zero, the device will be allocated and registered. Since the ghes_reg_mutex protects the refcount and serializes allocation and freeing of ghes devices, a use-after-free cannot happen here. Instead of using refcount_inc() for the first instance, use refcount_set(). This can be used here because the refcount is zero at this point and can not change due to its protection by the mutex. Fixes: 23f61b9fc5cc ("EDAC/ghes: Fix locking and memory barrier issues") Reported-by: John Garry Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Tested-by: John Garry Cc: Cc: James Morse Cc: Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: Cc: Tony Luck Cc: Link: https://lkml.kernel.org/r/20191121213628.21244-1-rrichter@marvell.com commit 7fdf6c6a0d0e032aac2aa4537a23af1e04a397ce Author: Marcel Holtmann Date: Fri Nov 22 00:33:45 2019 +0100 Bluetooth: Allow combination of BDADDR_PROPERTY and INVALID_BDADDR quirks When utilizing BDADDR_PROPERTY and INVALID_BDADDR quirks together it results in an unconfigured controller even if the bootloader provides a valid address. Fix this by allowing a bootloader provided address to mark the controller as configured. Signed-off-by: Marcel Holtmann Tested-by: Andre Heider Signed-off-by: Johan Hedberg commit def7bd940f8cceb41ec3d1383acd8ab937056dcb Author: Manish Narani Date: Fri Nov 22 12:45:57 2019 +0530 dt-bindings: mmc: Correct the type of the clk phase properties The clock phase properties are having two uint32 values. The minItems and maxItems are set to 2 for the same. So the property type should be 'uint32-array' and not 'uint32'. Modify it to correct the same. Reported-by: Rob Herring Signed-off-by: Manish Narani Signed-off-by: Ulf Hansson commit ce3cba788a1b7b8aed9380c3035d9e850884bd2d Author: Geoffrey D. Bennett Date: Mon Nov 11 00:13:56 2019 +1030 ALSA: usb-audio: Fix Scarlett 6i6 Gen 2 port data The s6i6_gen2_info.ports[] array had the Mixer and PCM port type entries in the wrong place. Use designators to explicitly specify the array elements being set. Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Signed-off-by: Geoffrey D. Bennett Tested-by: Alex Fellows Tested-by: Markus Schroetter Cc: Link: https://lore.kernel.org/r/20191110134356.GA31589@b4.vu Signed-off-by: Takashi Iwai commit bd9d6e0371d147b710f549b55d7b44008264aa06 Author: Dominik Brodowski Date: Thu Nov 21 07:54:28 2019 +0100 pcmcia: remove unused dprintk definition A recent cleanup patch removed the remaining users of dprintk() in i82092.c, so get rid of the definition of dprintk() as well. Fixes: 836e9494f448 ("pcmcia/i82092: Refactored dprintk macro for dev_dbg().") Signed-off-by: Dominik Brodowski commit e469edbb0613d4923836c3df3c14f9850fa548ae Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:44:47 2019 +0100 pcmcia: include for pcmcia_parse_tuple Include for pcmcia_parse_tuple declaration to fix the following sparse warning: drivers/pcmcia/cistpl.c:1287:5: warning: symbol 'pcmcia_parse_tuple' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Dominik Brodowski commit 990a1b506d3d3a0cb9a0e141d23e76b31b560288 Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:40:59 2019 +0100 pcmcia: include cs_internal.h for missing declarations Include cs_internal.h (and pcmcia/cistpl.h as required by cs_internal.h) for the declearions of cb_alloc and cb_free to silence the following sparse warnings: drivers/pcmcia/cardbus.c:64:11: warning: symbol 'cb_alloc' was not declared. Should it be static? drivers/pcmcia/cardbus.c:103:6: warning: symbol 'cb_free' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Dominik Brodowski commit 67805a4b3c924927d9e064bca235461941f89e4a Author: Krzysztof Kozlowski Date: Thu Nov 21 04:19:08 2019 +0100 dmaengine: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1574306348-29212-1-git-send-email-krzk@kernel.org Signed-off-by: Vinod Koul commit 7d268a28ee336ae233b036057607fb73b844d512 Author: Green Wan Date: Mon Nov 18 22:35:53 2019 +0800 dmaengine: sf-pdma: move macro to header file The place where the macro, SF_PDMA_REG_BASE(), is cause kernel-doc using wrong function declaration. Move it to header file. Signed-off-by: Green Wan Link: https://lore.kernel.org/r/20191118143554.16129-2-green.wan@sifive.com Signed-off-by: Vinod Koul commit dd9c324a5e96bfdc4c5c965da6fbd680340cd3f2 Author: Green Wan Date: Mon Nov 18 22:35:52 2019 +0800 dmaengine: sf-pdma: replace /** with /* for non-function comment There are several comments starting from "/**" but not for function comment purpose. It causes kernel-doc parsing wrong string. Replace "/**" with "/*" to fix them. Signed-off-by: Green Wan Link: https://lore.kernel.org/r/20191118143554.16129-1-green.wan@sifive.com Signed-off-by: Vinod Koul commit 340049d453682a9fe8d91fe794dd091730f4bb25 Author: Chuhong Yuan Date: Mon Nov 18 15:38:02 2019 +0800 dmaengine: ti: edma: fix missed failure handling When devm_kcalloc fails, it forgets to call edma_free_slot. Replace direct return with failure handler to fix it. Fixes: 1be5336bc7ba ("dmaengine: edma: New device tree binding") Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191118073802.28424-1-hslester96@gmail.com Signed-off-by: Vinod Koul commit 59dfa75e5d82a1e1b3d090a1d51fc14f66844576 Author: Eric Tremblay Date: Tue Nov 12 17:30:01 2019 -0500 hwmon: Add driver for Texas Instruments TMP512/513 sensor chips. TI's TMP512/513 are I2C/SMBus system monitor chips. These chips monitor the supply voltage, supply current, power consumption and provide one local and up to three (TMP513) remote temperature sensors. It has been tested using a TI TMP513 development kit (TMP513EVM) Signed-off-by: Eric Tremblay Link: https://lore.kernel.org/r/20191112223001.20844-3-etremblay@distech-controls.com Signed-off-by: Guenter Roeck commit 17fe2983e872810051934464ec5bcab80b714e65 Author: Eric Tremblay Date: Tue Nov 12 17:30:00 2019 -0500 dt-bindings: hwmon: Add TMP512/513 Document the TMP513/512 device devicetree bindings Signed-off-by: Eric Tremblay Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191112223001.20844-2-etremblay@distech-controls.com Signed-off-by: Guenter Roeck commit 39716c560c75619e174221d72f850d44166ef3ae Author: Chuhong Yuan Date: Fri Nov 15 16:31:53 2019 +0800 dmaengine: mmp_pdma: add missed of_dma_controller_free The driver calls of_dma_controller_register in probe but does not free it in remove. Add the call to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191115083153.12334-1-hslester96@gmail.com Signed-off-by: Vinod Koul commit c236ba4ae7183c1add8dbce91b27c700f7ef4168 Author: Chuhong Yuan Date: Fri Nov 15 16:31:00 2019 +0800 dmaengine: mmp_tdma: add missed of_dma_controller_free The driver calls of_dma_controller_register in probe but does not free it in remove. Add the call to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191115083100.12220-1-hslester96@gmail.com Signed-off-by: Vinod Koul commit 13baf667fa8e23aed12516776de6e50f7617820a Author: Mao Wenan Date: Fri Nov 22 10:52:40 2019 +0800 enetc: make enetc_setup_tc_mqprio static While using ARCH=mips CROSS_COMPILE=mips-linux-gnu- command to compile, make C=2 drivers/net/ethernet/freescale/enetc/enetc.o one warning can be found: drivers/net/ethernet/freescale/enetc/enetc.c:1439:5: warning: symbol 'enetc_setup_tc_mqprio' was not declared. Should it be static? This patch make symbol enetc_setup_tc_mqprio static. Fixes: 34c6adf1977b ("enetc: Configure the Time-Aware Scheduler via tc-taprio offload") Signed-off-by: Mao Wenan Signed-off-by: David S. Miller commit 82ea3e0e129e2ab913dd6684bab7a6e5e9896dee Author: John Garry Date: Wed Nov 20 17:39:15 2019 +0800 scsi: scsi_transport_sas: Fix memory leak when removing devices Removing a non-host rphy causes a memory leak: root@(none)$ echo 0 > /sys/devices/platform/HISI0162:01/host0/port-0:0/expander-0:0/port-0:0:10/phy-0:0:10/sas_phy/phy-0:0:10/enable [ 79.857888] hisi_sas_v2_hw HISI0162:01: dev[7:1] is gone root@(none)$ echo scan > /sys/kernel/debug/kmemleak [ 131.656603] kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak) root@(none)$ more /sys/kernel/debug/kmemleak unreferenced object 0xffff041da5c66000 (size 256): comm "kworker/u128:1", pid 549, jiffies 4294898543 (age 113.728s) hex dump (first 32 bytes): 00 5e c6 a5 1d 04 ff ff 01 00 00 00 00 00 00 00 .^.............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<(____ptrval____)>] kmem_cache_alloc+0x188/0x260 [<(____ptrval____)>] bsg_setup_queue+0x48/0x1a8 [<(____ptrval____)>] sas_rphy_add+0x108/0x2d0 [<(____ptrval____)>] sas_probe_devices+0x168/0x208 [<(____ptrval____)>] sas_discover_domain+0x660/0x9c8 [<(____ptrval____)>] process_one_work+0x3f8/0x690 [<(____ptrval____)>] worker_thread+0x70/0x6a0 [<(____ptrval____)>] kthread+0x1b8/0x1c0 [<(____ptrval____)>] ret_from_fork+0x10/0x18 unreferenced object 0xffff041d8c075400 (size 128): comm "kworker/u128:1", pid 549, jiffies 4294898543 (age 113.728s) hex dump (first 32 bytes): 00 40 25 97 1d 00 ff ff 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: [<(____ptrval____)>] __kmalloc_node+0x1a8/0x2c8 [<(____ptrval____)>] blk_mq_realloc_tag_set_tags.part.70+0x48/0xd8 [<(____ptrval____)>] blk_mq_alloc_tag_set+0x1dc/0x530 [<(____ptrval____)>] bsg_setup_queue+0xe8/0x1a8 [<(____ptrval____)>] sas_rphy_add+0x108/0x2d0 [<(____ptrval____)>] sas_probe_devices+0x168/0x208 [<(____ptrval____)>] sas_discover_domain+0x660/0x9c8 [<(____ptrval____)>] process_one_work+0x3f8/0x690 [<(____ptrval____)>] worker_thread+0x70/0x6a0 [<(____ptrval____)>] kthread+0x1b8/0x1c0 [<(____ptrval____)>] ret_from_fork+0x10/0x18 unreferenced object 0xffff041da5c65e00 (size 256): comm "kworker/u128:1", pid 549, jiffies 4294898543 (age 113.728s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<(____ptrval____)>] __kmalloc_node+0x1a8/0x2c8 [<(____ptrval____)>] blk_mq_alloc_tag_set+0x254/0x530 [<(____ptrval____)>] bsg_setup_queue+0xe8/0x1a8 [<(____ptrval____)>] sas_rphy_add+0x108/0x2d0 [<(____ptrval____)>] sas_probe_devices+0x168/0x208 [<(____ptrval____)>] sas_discover_domain+0x660/0x9c8 [<(____ptrval____)>] process_one_work+0x3f8/0x690 [<(____ptrval____)>] worker_thread+0x70/0x6a0 [<(____ptrval____)>] kthread+0x1b8/0x1c0 [<(____ptrval____)>] ret_from_fork+0x10/0x18 root@(none)$ It turns out that we don't clean up the request queue fully for bsg devices, as the blk mq tags for the request queue are not freed. Fix by doing the queue removal in one place - in sas_rphy_remove() - instead of unregistering the queue in sas_rphy_remove() and finally cleaning up the queue in calling blk_cleanup_queue() from sas_end_device_release() or sas_expander_release(). Function bsg_remove_queue() can handle a NULL pointer q, so remove the precheck in sas_rphy_remove(). Fixes: 651a013649943 ("scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough") Link: https://lore.kernel.org/r/1574242755-94156-1-git-send-email-john.garry@huawei.com Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit eede4970fb6c29f2056d7d016a3764c90e9d8a65 Author: James Smart Date: Thu Nov 21 09:55:56 2019 -0800 scsi: lpfc: size cpu map by last cpu id set Currently the lpfc driver sizes its cpu_map array based on num_possible_cpus(). However, that can be a value that is less than the highest cpu id bit that is set. As such, if a thread runs on a cpu with a larger cpu id, or for_each_possible_cpu() is used, the driver could index off the end of the array and return garbage or GPF. The driver maintains its own internal copy of the "num_possible" cpu value and sizes arrays by it. Fix by setting the driver's value to the value of the last cpu id bit set in the possible_mask - plus 1. Thus cpu_map will be sized to allow access by any cpu id possible. Link: https://lore.kernel.org/r/20191121175556.18953-1-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 75d886a9938432364ef1051f4f3d22d6d9788d8c Author: Saurav Girepunje Date: Fri Nov 1 18:05:03 2019 +0530 scsi: ibmvscsi_tgt: Remove unneeded variable rc Variable rc is not modified in ibmvscsis_srp_i_logout function. So remove unneeded variable rc. Issue found using coccicheck tool. Link: https://lore.kernel.org/r/20191101120407.GA9369@saurav Signed-off-by: Saurav Girepunje Reviewed-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 7a1323b5dfe44a9013a2cc56ef2973034a00bf88 Author: Michael Kelley Date: Thu Nov 14 06:32:01 2019 +0000 Drivers: hv: vmbus: Fix crash handler reset of Hyper-V synic The crash handler calls hv_synic_cleanup() to shutdown the Hyper-V synthetic interrupt controller. But if the CPU that calls hv_synic_cleanup() has a VMbus channel interrupt assigned to it (which is likely the case in smaller VM sizes), hv_synic_cleanup() returns an error and the synthetic interrupt controller isn't shutdown. While the lack of being shutdown hasn't caused a known problem, it still should be fixed for highest reliability. So directly call hv_synic_disable_regs() instead of hv_synic_cleanup(), which ensures that the synic is always shutdown. Signed-off-by: Michael Kelley Reviewed-by: Vitaly Kuznetsov Reviewed-by: Dexuan Cui Signed-off-by: Sasha Levin commit 8aea7f82153d6f292add3eb4bd7ba8edcae5c7f7 Author: Davidlohr Bueso Date: Fri Nov 1 13:00:04 2019 -0700 drivers/hv: Replace binary semaphore with mutex At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal than semaphores; it's also a nicer interface for mutual exclusion, which is why they are encouraged over binary semaphores, when possible. Replace the hyperv_mmio_lock, its semantics implies traditional lock ownership; that is, the lock owner is the same for both lock/unlock operations. Therefore it is safe to convert. Signed-off-by: Davidlohr Bueso Signed-off-by: Sasha Levin commit d7f0b2e450e94ad3811a812236529175ae86751e Author: Boqun Feng Date: Thu Oct 17 08:57:03 2019 +0800 drivers: iommu: hyperv: Make HYPERV_IOMMU only available on x86 Currently hyperv-iommu is implemented in a x86 specific way, for example, apic is used. So make the HYPERV_IOMMU Kconfig depend on X86 as a preparation for enabling HyperV on architecture other than x86. Cc: Lan Tianyu Cc: Michael Kelley Cc: linux-hyperv@vger.kernel.org Signed-off-by: Boqun Feng (Microsoft) Signed-off-by: Sasha Levin commit af13f9ed6f9aa6801d020c48aeb19dca9f0d4f97 Author: Dexuan Cui Date: Tue Nov 19 23:14:56 2019 -0800 HID: hyperv: Add the support of hibernation During the suspend process and resume process, if there is any mouse event, there is a small chance the suspend and the resume process can be aborted because of mousevsc_on_receive() -> pm_wakeup_hard_event(). This behavior can be avoided by disabling the Hyper-V mouse device as a wakeup source: echo disabled > /sys/bus/vmbus/drivers/hid_hyperv/XXX/power/wakeup (XXX is the device's GUID). Signed-off-by: Dexuan Cui Acked-by: Jiri Kosina Signed-off-by: Sasha Levin commit 25bd2b2f1f05347a4cd633138d0e4c2fd5788359 Author: Dexuan Cui Date: Tue Nov 19 23:16:05 2019 -0800 hv_balloon: Add the support of hibernation When hibernation is enabled, we must ignore the balloon up/down and hot-add requests from the host, if any. Signed-off-by: Dexuan Cui Acked-by: David Hildenbrand Signed-off-by: Sasha Levin commit b96f86534fa3102fd07246cf8b6cb5cc96788597 Author: Dexuan Cui Date: Tue Nov 19 23:16:04 2019 -0800 x86/hyperv: Implement hv_is_hibernation_supported() The API will be used by the hv_balloon and hv_vmbus drivers. Balloon up/down and hot-add of memory must not be active if the user wants the Linux VM to support hibernation, because they are incompatible with hibernation according to Hyper-V team, e.g. upon suspend the balloon VSP doesn't save any info about the ballooned-out pages (if any); so, after Linux resumes, Linux balloon VSC expects that the VSP will return the pages if Linux is under memory pressure, but the VSP will never do that, since the VSP thinks it never stole the pages from the VM. So, if the user wants Linux VM to support hibernation, Linux must forbid balloon up/down and hot-add, and the only functionality of the balloon VSC driver is reporting the VM's memory pressure to the host. Ideally, when Linux detects that the user wants it to support hibernation, the balloon VSC should tell the VSP that it does not support ballooning and hot-add. However, the current version of the VSP requires the VSC should support these capabilities, otherwise the capability negotiation fails and the VSC can not load at all, so with the later changes to the VSC driver, Linux VM still reports to the VSP that the VSC supports these capabilities, but the VSC ignores the VSP's requests of balloon up/down and hot add, and reports an error to the VSP, when applicable. BTW, in the future the balloon VSP driver will allow the VSC to not support the capabilities of balloon up/down and hot add. The ACPI S4 state is not a must for hibernation to work, because Linux is able to hibernate as long as the system can shut down. However in practice we decide to artificially use the presence of the virtual ACPI S4 state as an indicator of the user's intent of using hibernation, because Linux VM must find a way to know if the user wants to use the hibernation feature or not. By default, Hyper-V does not enable the virtual ACPI S4 state; on recent Hyper-V hosts (e.g. RS5, 19H1), the administrator is able to enable the state for a VM by WMI commands. Once all the vmbus and VSC patches for the hibernation feature are accepted, an extra patch will be submitted to forbid hibernation if the virtual ACPI S4 state is absent, i.e. hv_is_hibernation_supported() is false. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Acked-by: Thomas Gleixner Signed-off-by: Sasha Levin commit 2af5e7b7b230f3c6dcc9d72bb7eeda6e1df1f5fa Author: Himadri Pandya Date: Sat Aug 17 04:08:50 2019 +0000 Drivers: hv: balloon: Remove dependencies on guest page size Hyper-V assumes page size to be 4K. This might not be the case for ARM64 architecture. Hence use hyper-v specific page size and page shift definitions to avoid conflicts between different host and guest page sizes on ARM64. Also, remove some old and incorrect comments and redefine ballooning granularities to handle larger page sizes correctly. Signed-off-by: Himadri Pandya Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 53edce00ceb7443b6f4615b5c8ad71671723d8f5 Author: Himadri Pandya Date: Tue Jul 30 09:49:44 2019 +0000 Drivers: hv: vmbus: Remove dependencies on guest page size Hyper-V assumes page size to be 4K. This might not be the case for ARM64 architecture. Hence use hyper-v page size and page allocation function to avoid conflicts between different host and guest page size on ARM64. Signed-off-by: Himadri Pandya Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit fa36dcdf8b200f4c175d0a00a8c99439ee0df95d Author: Himadri Pandya Date: Tue Jul 30 09:49:43 2019 +0000 x86: hv: Add function to allocate zeroed page for Hyper-V Hyper-V assumes page size to be 4K. While this assumption holds true on x86 architecture, it might not be true for ARM64 architecture. Hence define hyper-v specific function to allocate a zeroed page which can have a different implementation on ARM64 architecture to handle the conflict between hyper-v's assumed page size and actual guest page size. Signed-off-by: Himadri Pandya Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 0541a225945d5e0d650353f51614812aa820c6be Author: Himadri Pandya Date: Thu Jul 25 05:03:15 2019 +0000 Drivers: hv: util: Specify ring buffer size using Hyper-V page size VMbus ring buffers are sized based on the 4K page size used by Hyper-V. The Linux guest page size may not be 4K on all architectures so use the Hyper-V page size to specify the ring buffer size. Signed-off-by: Himadri Pandya Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit b14d749ac5abdf311321172ae11e6ad1be4293e9 Author: Himadri Pandya Date: Thu Jul 25 05:03:14 2019 +0000 Drivers: hv: Specify receive buffer size using Hyper-V page size The recv_buffer is used to retrieve data from the VMbus ring buffer. VMbus ring buffers are sized based on the guest page size which Hyper-V assumes to be 4KB. But it may be different on some architectures. So use the Hyper-V page size to allocate the recv_buffer and set the maximum size to receive. Signed-off-by: Himadri Pandya Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit c48d8b04893afe35fd6f5ccbf339493bba277d43 Author: Branden Bonaby Date: Thu Oct 3 17:02:05 2019 -0400 tools: hv: add vmbus testing tool This is a userspace tool to drive the testing. Currently it supports introducing user specified delay in the host to guest communication path on a per-channel basis. Signed-off-by: Branden Bonaby Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit af9ca6f9bb16e446a44393a797d0ae74d356a5c7 Author: Branden Bonaby Date: Thu Oct 3 17:01:49 2019 -0400 drivers: hv: vmbus: Introduce latency testing Introduce user specified latency in the packet reception path By exposing the test parameters as part of the debugfs channel attributes. We will control the testing state via these attributes. Signed-off-by: Branden Bonaby Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit d21987d709e807ba7bbf47044deb56a3c02e8be4 Author: Wei Hu Date: Wed Sep 18 06:03:20 2019 +0000 video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver Without deferred IO support, hyperv_fb driver informs the host to refresh the entire guest frame buffer at fixed rate, e.g. at 20Hz, no matter there is screen update or not. This patch supports deferred IO for screens in graphics mode and also enables the frame buffer on-demand refresh. The highest refresh rate is still set at 20Hz. Currently Hyper-V only takes a physical address from guest as the starting address of frame buffer. This implies the guest must allocate contiguous physical memory for frame buffer. In addition, Hyper-V Gen 2 VMs only accept address from MMIO region as frame buffer address. Due to these limitations on Hyper-V host, we keep a shadow copy of frame buffer in the guest. This means one more copy of the dirty rectangle inside guest when doing the on-demand refresh. This can be optimized in the future with help from host. For now the host performance gain from deferred IO outweighs the shadow copy impact in the guest. Signed-off-by: Wei Hu Reviewed-by: Dexuan Cui Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 67e7cdb4829d3246c98f2ec9b771303ebe162eab Author: Wei Hu Date: Thu Sep 5 09:11:53 2019 +0000 video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host Beginning from Windows 10 RS5+, VM screen resolution is obtained from host. The "video=hyperv_fb" boot time option is not needed, but still can be used to overwrite what the host specifies. The VM resolution on the host could be set by executing the powershell "set-vmvideo" command. Signed-off-by: Iouri Tarassov Signed-off-by: Wei Hu Reviewed-by: Michael Kelley Reviewed-by: Dexuan Cui Signed-off-by: Sasha Levin commit 0efeea5fb15357f0a582c89c02ef0b6ef58defb5 Author: Dexuan Cui Date: Wed Sep 25 22:04:04 2019 +0000 hv_netvsc: Add the support of hibernation The existing netvsc_detach() and netvsc_attach() APIs make it easy to implement the suspend/resume callbacks. Signed-off-by: Dexuan Cui Reviewed-by: Haiyang Zhang Signed-off-by: Sasha Levin commit 2194c2eb6717f2ea7dc793ad9cbf44d359a3f696 Author: Dexuan Cui Date: Wed Sep 25 21:34:13 2019 +0000 hv_sock: Add the support of hibernation Add the necessary dummy callbacks for hibernation. Signed-off-by: Dexuan Cui Acked-by: David S. Miller Signed-off-by: Sasha Levin commit 1ecf302021040194ae46cceefe33ab75577e356d Author: Dexuan Cui Date: Wed Sep 11 23:34:10 2019 +0000 video: hyperv_fb: Add the support of hibernation This patch depends on the vmbus side change of the definition of struct hv_driver. Signed-off-by: Dexuan Cui Signed-off-by: Sasha Levin commit 56fb105859345d65aed08ebbb0f6160c4f0777eb Author: Dexuan Cui Date: Wed Sep 11 23:35:16 2019 +0000 scsi: storvsc: Add the support of hibernation When we're in storvsc_suspend(), we're sure the SCSI layer has quiesced the scsi device by scsi_bus_suspend() -> ... -> scsi_device_quiesce(), so the low level SCSI adapter driver only needs to suspend/resume its own state. Signed-off-by: Dexuan Cui Acked-by: Martin K. Petersen Signed-off-by: Sasha Levin commit 931cccc967730d43bb6325506baf51c8f83a9a58 Author: Andrea Parri Date: Tue Oct 15 13:46:46 2019 +0200 Drivers: hv: vmbus: Add module parameter to cap the VMBus version Currently, Linux guests negotiate the VMBus version with Hyper-V and use the highest available VMBus version they can connect to. This has some drawbacks: by using the highest available version, certain code paths are never executed and can not be tested when the guest runs on the newest host. Add the module parameter "max_version", to upper-bound the VMBus versions guests can negotiate. Suggested-by: Dexuan Cui Signed-off-by: Andrea Parri Reviewed-by: Wei Liu Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 2d4f49b3e1e3a24ce16dfeeb2235688c8aba57ef Author: Andrea Parri Date: Tue Oct 15 13:46:45 2019 +0200 Drivers: hv: vmbus: Enable VMBus protocol versions 4.1, 5.1 and 5.2 Hyper-V has added VMBus protocol versions 5.1 and 5.2 in recent release versions. Allow Linux guests to negotiate these new protocol versions on versions of Hyper-V that support them. While on this, also allow guests to negotiate the VMBus protocol version 4.1 (which was missing). Signed-off-by: Andrea Parri Reviewed-by: Wei Liu Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit bedc61a922f9dbbe3bfb26ec2745f8cd63b57637 Author: Andrea Parri Date: Tue Oct 15 13:46:44 2019 +0200 Drivers: hv: vmbus: Introduce table of VMBus protocol versions The technique used to get the next VMBus version seems increasisly clumsy as the number of VMBus versions increases. Performance is not a concern since this is only done once during system boot; it's just that we'll end up with more lines of code than is really needed. As an alternative, introduce a table with the version numbers listed in order (from the most recent to the oldest). vmbus_connect() loops through the versions listed in the table until it gets an accepted connection or gets to the end of the table (invalid version). Suggested-by: Michael Kelley Signed-off-by: Andrea Parri Reviewed-by: Wei Liu Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 1a70cf0e7ee6e73aa29c2dd4dd8d3d38c48d5946 Author: Jisheng Zhang (syna) Date: Wed Nov 20 07:57:14 2019 +0100 ARM: 8940/1: ftrace: remove mcount(),ftrace_caller_old() and ftrace_call_old() Commit d3c61619568c ("ARM: 8788/1: ftrace: remove old mcount support") removed the old mcount support, but forget to remove these three declarations. This patch removes them. Signed-off-by: Jisheng Zhang Acked-by: Steven Rostedt (VMware) Signed-off-by: Russell King commit 29c623d64f0dcd6aa10e0eabd16233e77114090b Author: Dmitry Golovin Date: Tue Nov 19 16:39:42 2019 +0100 ARM: 8939/1: kbuild: use correct nm executable Since $(NM) variable can be easily overridden for the whole build, it's better to use it instead of $(CROSS_COMPILE)nm. The use of $(CROSS_COMPILE) prefixed variables where their calculated equivalents can be used is incorrect. This fixes issues with builds where $(NM) is set to llvm-nm. Link: https://github.com/ClangBuiltLinux/linux/issues/766 Signed-off-by: Dmitry Golovin Suggested-by: Nick Desaulniers Cc: Matthias Maennich Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Reviewed-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Signed-off-by: Russell King commit 87e90283c94c76ee11d379ab5a0973382bbd0baf Author: Heiner Kallweit Date: Sat Oct 5 14:08:52 2019 +0200 PCI/ASPM: Remove PCIEASPM_DEBUG Kconfig option and related code Previously, CONFIG_PCIEASPM_DEBUG enabled "link_state" and "clk_ctl" sysfs files that controlled ASPM. We believe these files were rarely if ever used. We recently added sysfs ASPM controls that are always present, so the debug code is no longer needed. Removing this debug code has been discussed for quite some time, see e.g. [0]. Remove PCIEASPM_DEBUG and the related code. [0] https://lore.kernel.org/lkml/20180727202619.GD173328@bhelgaas-glaptop.roam.corp.google.com/ Link: https://lore.kernel.org/r/ec935d8e-c084-3938-f1d1-748617596b25@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit 72ea91afbfb08619696ccde610ee4d0d29cf4a1d Author: Heiner Kallweit Date: Sat Oct 5 14:07:56 2019 +0200 PCI/ASPM: Add sysfs attributes for controlling ASPM link states Add sysfs attributes to Endpoints and other Upstream Ports to control ASPM, Clock PM, and L1 PM Substates. The new attributes are: /sys/devices/pci*/.../link/clkpm /sys/devices/pci*/.../link/l0s_aspm /sys/devices/pci*/.../link/l1_aspm /sys/devices/pci*/.../link/l1_1_aspm /sys/devices/pci*/.../link/l1_2_aspm /sys/devices/pci*/.../link/l1_1_pcipm /sys/devices/pci*/.../link/l1_2_pcipm An attribute is only visible if both ends of the Link leading to the device support the state. Writing y/1/on to the file enables the state; n/0/off disables it. These attributes can be used to tune the power/performance tradeoff for individual devices. [bhelgaas: commit log, rename directory to "link"] Link: https://lore.kernel.org/r/b1c83f8a-9bf6-eac5-82d0-cf5b90128fbf@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit 7d75c0cb22b71837b376b68fa240c01d4a955fa4 Merge: 2c44713ed96d 02b24941619f Author: David S. Miller Date: Thu Nov 21 14:45:55 2019 -0800 Merge branch 'net-introduce-and-use-route-hint' Paolo Abeni says: ==================== net: introduce and use route hint This series leverages the listification infrastructure to avoid unnecessary route lookup on ingress packets. In absence of custom rules, packets with equal daddr will usually land on the same dst. When processing packet bursts (lists) we can easily reference the previous dst entry. When we hit the 'same destination' condition we can avoid the route lookup, coping the already available dst. Detailed performance numbers are available in the individual commit messages. v3 -> v4: - move helpers to their own patches (Eric D.) - enable hints for SUBTREE builds (David A.) - re-enable hints for ipv4 forward (David A.) v2 -> v3: - use fib*_has_custom_rules() helpers (David A.) - add ip*_extract_route_hint() helper (Edward C.) - use prev skb as hint instead of copying data (Willem ) v1 -> v2: - fix build issue with !CONFIG_IP*_MULTIPLE_TABLES - fix potential race in ip6_list_rcv_finish() ==================== Acked-by: Edward Cree Signed-off-by: David S. Miller commit 02b24941619fcce3d280311ac73b1e461552e9c8 Author: Paolo Abeni Date: Wed Nov 20 13:47:37 2019 +0100 ipv4: use dst hint for ipv4 list receive This is alike the previous change, with some additional ipv4 specific quirk. Even when using the route hint we still have to do perform additional per packet checks about source address validity: a new helper is added to wrap them. Hints are explicitly disabled if the destination is a local broadcast, that keeps the code simple and local broadcast are a slower path anyway. UDP flood performances vs recvmmsg() receiver: vanilla patched delta Kpps Kpps % 1683 1871 +11 In the worst case scenario - each packet has a different destination address - the performance delta is within noise range. v3 -> v4: - re-enable hints for forward v2 -> v3: - really fix build (sic) and hint usage check - use fib4_has_custom_rules() helpers (David A.) - add ip_extract_route_hint() helper (Edward C.) - use prev skb as hint instead of copying data (Willem) v1 -> v2: - fix build issue with !CONFIG_IP_MULTIPLE_TABLES Signed-off-by: Paolo Abeni Reviewed-by: David Ahern Signed-off-by: David S. Miller commit c43c3d76c021d8d654ff5cfaad381f14f6beaf1a Author: Paolo Abeni Date: Wed Nov 20 13:47:36 2019 +0100 ipv4: move fib4_has_custom_rules() helper to public header So that we can use it in the next patch. Additionally constify the helper argument. Suggested-by: David Ahern Signed-off-by: Paolo Abeni Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 197dbf24e360ed8dbbbe8ed17c2c496f501a0bda Author: Paolo Abeni Date: Wed Nov 20 13:47:35 2019 +0100 ipv6: introduce and uses route look hints for list input. When doing RX batch packet processing, we currently always repeat the route lookup for each ingress packet. When no custom rules are in place, and there aren't routes depending on source addresses, we know that packets with the same destination address will use the same dst. This change tries to avoid per packet route lookup caching the destination address of the latest successful lookup, and reusing it for the next packet when the above conditions are in place. Ingress traffic for most servers should fit. The measured performance delta under UDP flood vs a recvmmsg receiver is as follow: vanilla patched delta Kpps Kpps % 1431 1674 +17 In the worst-case scenario - each packet has a different destination address - the performance delta is within noise range. v3 -> v4: - support hints for SUBFLOW build, too (David A.) - several style fixes (Eric) v2 -> v3: - add fib6_has_custom_rules() helpers (David A.) - add ip6_extract_route_hint() helper (Edward C.) - use hint directly in ip6_list_rcv_finish() (Willem) v1 -> v2: - fix build issue with !CONFIG_IPV6_MULTIPLE_TABLES - fix potential race when fib6_has_custom_rules is set while processing a packet batch Signed-off-by: Paolo Abeni Reviewed-by: David Ahern Signed-off-by: David S. Miller commit b9b33e7c24af1cddc7697056f1664279a40d9a4a Author: Paolo Abeni Date: Wed Nov 20 13:47:34 2019 +0100 ipv6: keep track of routes using src Use a per namespace counter, increment it on successful creation of any route using the source address, decrement it on deletion of such routes. This allows us to check easily if the routing decision in the current namespace depends on the packet source. Will be used by the next patch. Suggested-by: David Ahern Signed-off-by: Paolo Abeni Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 1f8ac5703037fdd2e6c960cd35c2b14d18ef3933 Author: Paolo Abeni Date: Wed Nov 20 13:47:33 2019 +0100 ipv6: add fib6_has_custom_rules() helper It wraps the namespace field with the same name, to easily access it regardless of build options. Suggested-by: David Ahern Suggested-by: Eric Dumazet Signed-off-by: Paolo Abeni Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 2c44713ed96da04f5e25b0df4035074b844def04 Merge: 8163999db445 c0bcf537667c Author: David S. Miller Date: Thu Nov 21 14:39:03 2019 -0800 Merge branch 'DSA-Felix-PTP' Yangbo Lu says: ==================== Support PTP clock and hardware timestamping for DSA Felix driver This patch-set is to support PTP clock and hardware timestamping for DSA Felix driver. Some functions in ocelot.c/ocelot_board.c driver were reworked/exported, so that DSA Felix driver was able to reuse them as much as possible. On TX path, timestamping works on packet which requires timestamp. The injection header will be configured accordingly, and skb clone requires timestamp will be added into a list. The TX timestamp is final handled in threaded interrupt handler when PTP timestamp FIFO is ready. On RX path, timestamping is always working. The RX timestamp could be got from extraction header. ==================== Signed-off-by: David S. Miller commit c0bcf537667cf88bbcbb377d01d2b79c45265741 Author: Yangbo Lu Date: Wed Nov 20 16:23:18 2019 +0800 net: dsa: ocelot: add hardware timestamping support for Felix This patch is to reuse ocelot functions as possible to enable PTP clock and to support hardware timestamping on Felix. On TX path, timestamping works on packet which requires timestamp. The injection header will be configured accordingly, and skb clone requires timestamp will be added into a list. The TX timestamp is final handled in threaded interrupt handler when PTP timestamp FIFO is ready. On RX path, timestamping is always working. The RX timestamp could be got from extraction header. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 5df66c48bc4e4019f92a8c62d0b74a97d102ba8d Author: Yangbo Lu Date: Wed Nov 20 16:23:17 2019 +0800 net: dsa: ocelot: define PTP registers for felix_vsc9959 This patch is to define PTP registers for felix_vsc9959. Signed-off-by: Yangbo Lu Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 400928bf928be153cddd76d9ac4e39978cb43fd3 Author: Yangbo Lu Date: Wed Nov 20 16:23:16 2019 +0800 net: mscc: ocelot: convert to use ocelot_port_add_txtstamp_skb() Convert to use ocelot_port_add_txtstamp_skb() for adding skbs which require TX timestamp into list. Export it so that DSA Felix driver could reuse it too. Signed-off-by: Yangbo Lu Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e23a7b3e8daa4be3d91544d8ba210f96d2266de9 Author: Yangbo Lu Date: Wed Nov 20 16:23:15 2019 +0800 net: mscc: ocelot: convert to use ocelot_get_txtstamp() The method getting TX timestamp by reading timestamp FIFO and matching skbs list is common for DSA Felix driver too. So move code out of ocelot_board.c, convert to use ocelot_get_txtstamp() function and export it. Signed-off-by: Yangbo Lu Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f145922ddcaa1cb9688b3d053622c98d9f9a7fff Author: Yangbo Lu Date: Wed Nov 20 16:23:14 2019 +0800 net: mscc: ocelot: export ocelot_hwstamp_get/set functions Export ocelot_hwstamp_get/set functions so that DSA driver is able to reuse them. Signed-off-by: Yangbo Lu Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8729aaba74626c4ebce3abf1b9e96bb62d2958ca Author: Chuck Lever Date: Wed Nov 20 16:25:46 2019 -0500 SUNRPC: Fix backchannel latency metrics I noticed that for callback requests, the reported backlog latency is always zero, and the rtt value is crazy big. The problem was that rqst->rq_xtime is never set for backchannel requests. Fixes: 78215759e20d ("SUNRPC: Make RTT measurement more ... ") Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 8163999db445021f2651a8a47b5632483e8722ea Author: John Fastabend Date: Thu Nov 21 08:25:09 2019 -0800 bpf: skmsg, fix potential psock NULL pointer dereference Report from Dan Carpenter, net/core/skmsg.c:792 sk_psock_write_space() error: we previously assumed 'psock' could be null (see line 790) net/core/skmsg.c 789 psock = sk_psock(sk); 790 if (likely(psock && sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED))) Check for NULL 791 schedule_work(&psock->work); 792 write_space = psock->saved_write_space; ^^^^^^^^^^^^^^^^^^^^^^^^ 793 rcu_read_unlock(); 794 write_space(sk); Ensure psock dereference on line 792 only occurs if psock is not null. Reported-by: Dan Carpenter Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: David S. Miller commit 36533f355b1ad14ec4352f7e254a5bfd4f4923d5 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:40:36 2019 +0800 PCI: Fix indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig [bhelgaas: do same in vmd.c] Link: https://lore.kernel.org/r/20191120134036.14502-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Helgaas commit 4d2fa82d98d2d296043a04eb517d7dbade5b13b8 Author: Andy Lutomirski Date: Wed Nov 20 11:58:32 2019 -0800 selftests/x86/sigreturn/32: Invalidate DS and ES when abusing the kernel If the kernel accidentally uses DS or ES while the user values are loaded, it will work fine for sane userspace. In the interest of simulating maximally insane userspace, make sigreturn_32 zero out DS and ES for the nasty parts so that inadvertent use of these segments will crash. Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Cc: stable@kernel.org commit 8caa016bfc129f2c925d52da43022171d1d1de91 Author: Andy Lutomirski Date: Wed Nov 20 12:59:13 2019 -0800 selftests/x86/mov_ss_trap: Fix the SYSENTER test For reasons that I haven't quite fully diagnosed, running mov_ss_trap_32 on a 32-bit kernel results in an infinite loop in userspace. This appears to be because the hacky SYSENTER test doesn't segfault as desired; instead it corrupts the program state such that it infinite loops. Fix it by explicitly clearing EBP before doing SYSENTER. This will give a more reliable segfault. Fixes: 59c2a7226fc5 ("x86/selftests: Add mov_to_ss test") Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Cc: stable@kernel.org commit 4fe171bb81b13b40bf568330ec3716dfb304ced1 Author: zhengbin Date: Thu Nov 21 09:12:18 2019 +0000 afs: Remove set but not used variable 'ret' Fixes gcc '-Wunused-but-set-variable' warning: fs/afs/server.c: In function afs_install_server: fs/afs/server.c:157:6: warning: variable ret set but not used [-Wunused-but-set-variable] It is not used since commit d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: David Howells commit 51590df4f3306cb1f43dca54e3ccdd121ab89594 Author: zhengbin Date: Thu Nov 21 09:12:18 2019 +0000 afs: Remove set but not used variables 'before', 'after' Fixes gcc '-Wunused-but-set-variable' warning: fs/afs/dir_edit.c: In function afs_set_contig_bits: fs/afs/dir_edit.c:75:20: warning: variable after set but not used [-Wunused-but-set-variable] fs/afs/dir_edit.c: In function afs_set_contig_bits: fs/afs/dir_edit.c:75:12: warning: variable before set but not used [-Wunused-but-set-variable] fs/afs/dir_edit.c: In function afs_clear_contig_bits: fs/afs/dir_edit.c:100:20: warning: variable after set but not used [-Wunused-but-set-variable] fs/afs/dir_edit.c: In function afs_clear_contig_bits: fs/afs/dir_edit.c:100:12: warning: variable before set but not used [-Wunused-but-set-variable] They are never used since commit 63a4681ff39c. Fixes: 63a4681ff39c ("afs: Locally edit directory data for mkdir/create/unlink/...") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: David Howells commit 7599a896f2e46e9c072e02a8299a67d4d2f96675 Author: Jiri Olsa Date: Thu Nov 21 16:58:53 2019 +0100 audit: Move audit_log_task declaration under CONFIG_AUDITSYSCALL The 0-DAY found that audit_log_task is not declared under CONFIG_AUDITSYSCALL which causes compilation error when it is not defined: kernel/bpf/syscall.o: In function `bpf_audit_prog.isra.30': >> syscall.c:(.text+0x860): undefined reference to `audit_log_task' Adding the audit_log_task declaration and stub within CONFIG_AUDITSYSCALL ifdef. Fixes: 91e6015b082b ("bpf: Emit audit messages upon successful prog load and unload") Reported-by: kbuild test robot Signed-off-by: Jiri Olsa Signed-off-by: David S. Miller commit 43da14110cb4d20de0b4b097da88addefeab5f13 Author: Krzysztof Kozlowski Date: Thu Nov 21 21:28:35 2019 +0800 net: Fix Kconfig indentation, continued Adjust indentation from spaces to tab (+optional two spaces) as in coding style. This fixes various indentation mixups (seven spaces, tab+one space, etc). Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit f33dabf59d6cf6b4ce48e1552ae84092a4f753df Author: Alain Volmat Date: Thu Nov 21 14:27:46 2019 +0100 dt-bindings: i2c: stm32: Migrate i2c-stm32 documentation to yaml The document was migrated to Yaml format and renamed st,stm32-i2c.yaml Signed-off-by: Alain Volmat Signed-off-by: Rob Herring commit 1e25c5f5333a9ca482312c8a4c33e251887d2d82 Author: Benjamin Gaignard Date: Thu Nov 21 14:06:15 2019 +0100 dt-bindings: mtd: Convert stm32 fmc2-nand bindings to json-schema Convert the STM32 fmc2-nand binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard CC: Christophe Kerello Signed-off-by: Rob Herring commit 5421cf84af69a94ebb179fec252f3772c4681cca Author: Krzysztof Kozlowski Date: Thu Nov 21 21:28:28 2019 +0800 drivers: net: Fix Kconfig indentation, continued Adjust indentation from spaces to tab (+optional two spaces) as in coding style. This fixes various indentation mixups (seven spaces, tab+one space, etc). Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 1841b9829903c82e0445032ad4a7556fcc44a497 Author: Xin Long Date: Thu Nov 21 18:14:50 2019 +0800 lwtunnel: check erspan options before allocating tun_info As Jakub suggested on another patch, it's better to do the check on erspan options before allocating memory. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 7b6a70f7376479ee0a185b7c2e57b26243f1052d Author: Xin Long Date: Thu Nov 21 18:11:27 2019 +0800 lwtunnel: be STRICT to validate the new LWTUNNEL_IP(6)_OPTS LWTUNNEL_IP(6)_OPTS are the new items in ip(6)_tun_policy, which are parsed by nla_parse_nested_deprecated(). We should check it strictly by setting .strict_start_type = LWTUNNEL_IP(6)_OPTS. This patch also adds missing LWTUNNEL_IP6_OPTS in ip6_tun_policy. Fixes: 4ece47787077 ("lwtunnel: add options setting and dumping for geneve") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit f3bed7f8f93d60df11f94be14542682c905b5c3e Author: Xin Long Date: Thu Nov 21 18:08:38 2019 +0800 net: remove the unnecessary strict_start_type in some policies ct_policy and mpls_policy are parsed with nla_parse_nested(), which does NL_VALIDATE_STRICT validation, strict_start_type is not needed to set as it is actually trying to make some attributes parsed with NL_VALIDATE_STRICT. This patch is to remove it, and do the same on rtm_nh_policy which is parsed by nlmsg_parse(). Suggested-by: Jakub Kicinski Signed-off-by: Xin Long Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit ff998a80c359581dc5126897e953aa9ad3d65ae1 Merge: 0617aa988dac 79b1011cb33d Author: David S. Miller Date: Thu Nov 21 11:44:06 2019 -0800 Merge branch 'net-sched-support-vxlan-and-erspan-options' Xin Long says: ==================== net: sched: support vxlan and erspan options This patchset is to add vxlan and erspan options support in cls_flower and act_tunnel_key. The form is pretty much like geneve_opts in: https://patchwork.ozlabs.org/patch/935272/ https://patchwork.ozlabs.org/patch/954564/ but only one option is allowed for vxlan and erspan. v1->v2: - see each patch changelog. ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 79b1011cb33d166f531a1347a17e6602954e4eb1 Author: Xin Long Date: Thu Nov 21 18:03:29 2019 +0800 net: sched: allow flower to match erspan options This patch is to allow matching options in erspan. The options can be described in the form: VER:INDEX:DIR:HWID/VER:INDEX_MASK:DIR_MASK:HWID_MASK. When ver is set to 1, index will be applied while dir and hwid will be ignored, and when ver is set to 2, dir and hwid will be used while index will be ignored. Different from geneve, only one option can be set. And also, geneve options, vxlan options or erspan options can't be set at the same time. # ip link add name erspan1 type erspan external # tc qdisc add dev erspan1 ingress # tc filter add dev erspan1 protocol ip parent ffff: \ flower \ enc_src_ip 10.0.99.192 \ enc_dst_ip 10.0.99.193 \ enc_key_id 11 \ erspan_opts 1:12:0:0/1:ffff:0:0 \ ip_proto udp \ action mirred egress redirect dev eth0 v1->v2: - improve some err msgs of extack. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit d8f9dfae49ce4ffb772dc10dd6578dc815b34c12 Author: Xin Long Date: Thu Nov 21 18:03:28 2019 +0800 net: sched: allow flower to match vxlan options This patch is to allow matching gbp option in vxlan. The options can be described in the form GBP/GBP_MASK, where GBP is represented as a 32bit hexadecimal value. Different from geneve, only one option can be set. And also, geneve options and vxlan options can't be set at the same time. # ip link add name vxlan0 type vxlan dstport 0 external # tc qdisc add dev vxlan0 ingress # tc filter add dev vxlan0 protocol ip parent ffff: \ flower \ enc_src_ip 10.0.99.192 \ enc_dst_ip 10.0.99.193 \ enc_key_id 11 \ vxlan_opts 01020304/ffffffff \ ip_proto udp \ action mirred egress redirect dev eth0 v1->v2: - add .strict_start_type for enc_opts_policy as Jakub noticed. - use Duplicate instead of Wrong in err msg for extack as Jakub suggested. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit e20d4ff2acd7db2ffce64a6ddbdaeec43a8eec19 Author: Xin Long Date: Thu Nov 21 18:03:27 2019 +0800 net: sched: add erspan option support to act_tunnel_key This patch is to allow setting erspan options using the act_tunnel_key action. Different from geneve options, only one option can be set. And also, geneve options, vxlan options or erspan options can't be set at the same time. Options are expressed as ver:index:dir:hwid, when ver is set to 1, index will be applied while dir and hwid will be ignored, and when ver is set to 2, dir and hwid will be used while index will be ignored. # ip link add name erspan1 type erspan external # tc qdisc add dev eth0 ingress # tc filter add dev eth0 protocol ip parent ffff: \ flower indev eth0 \ ip_proto udp \ action tunnel_key \ set src_ip 10.0.99.192 \ dst_ip 10.0.99.193 \ dst_port 6081 \ id 11 \ erspan_opts 1:2:0:0 \ action mirred egress redirect dev erspan1 v1->v2: - do the validation when dst is not yet allocated as Jakub suggested. - use Duplicate instead of Wrong in err msg for extack. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit fca3f91cc38ad866c995fb099d961b31cd687849 Author: Xin Long Date: Thu Nov 21 18:03:26 2019 +0800 net: sched: add vxlan option support to act_tunnel_key This patch is to allow setting vxlan options using the act_tunnel_key action. Different from geneve options, only one option can be set. And also, geneve options and vxlan options can't be set at the same time. gbp is the only param for vxlan options: # ip link add name vxlan0 type vxlan dstport 0 external # tc qdisc add dev eth0 ingress # tc filter add dev eth0 protocol ip parent ffff: \ flower indev eth0 \ ip_proto udp \ action tunnel_key \ set src_ip 10.0.99.192 \ dst_ip 10.0.99.193 \ dst_port 6081 \ id 11 \ vxlan_opts 01020304 \ action mirred egress redirect dev vxlan0 v1->v2: - add .strict_start_type for enc_opts_policy as Jakub noticed. - use Duplicate instead of Wrong in err msg for extack as Jakub suggested. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 0617aa988dacb9d8c1cb42fbb6c79896c7507e08 Author: Dan Carpenter Date: Thu Nov 21 12:21:46 2019 +0300 octeontx2-af: Fix uninitialized variable in debugfs If rvu_get_blkaddr() fails, then this rvu_cgx_nix_cuml_stats() returns zero and we write some uninitialized data into the debugfs output. On the error paths, the use of the uninitialized "*stat" is harmless, but it will lead to a Smatch warning (static analysis) and a UBSan warning (runtime analysis) so we should prevent that as well. Fixes: f967488d095e ("octeontx2-af: Add per CGX port level NIX Rx/Tx counters") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 039fcccaed338b2ff6587178c1219c1ef383a1d9 Author: Stefano Garzarella Date: Thu Nov 21 10:06:09 2019 +0100 vsock: avoid to assign transport if its initialization fails If transport->init() fails, we can't assign the transport to the socket, because it's not initialized correctly, and any future calls to the transport callbacks would have an unexpected behavior. Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Reported-and-tested-by: syzbot+e2e5c07bf353b2f79daa@syzkaller.appspotmail.com Signed-off-by: Stefano Garzarella Reviewed-by: Jorgen Hansen Signed-off-by: David S. Miller commit de29fe308de7e0c5c94af0dd30e825fcc98293fa Author: Krzysztof Kozlowski Date: Thu Nov 21 04:20:57 2019 +0100 riscv: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Reviewed-by: Palmer Dabbelt [paul.walmsley@sifive.com: use two leading spaces for help text to align with common arch/ practice] Signed-off-by: Paul Walmsley commit 05d6c8cfdbd6cefac6b373bad72775fcc4193c80 Author: Markus Theil Date: Wed Nov 20 21:05:31 2019 +0100 mt76: fix fix ampdu locking The current ampdu locking code does not unlock its mutex in the early return case. This patch fixes it. Signed-off-by: Markus Theil Acked-by: Felix Fietkau Signed-off-by: Kalle Valo commit 895429076512e9d1cf5428181076299c90713159 Author: Peter Zijlstra Date: Wed Nov 20 15:02:26 2019 +0100 x86/entry/32: Fix NMI vs ESPFIX When the NMI lands on an ESPFIX_SS, we are on the entry stack and must swizzle, otherwise we'll run do_nmi() on the entry stack, which is BAD. Also, similar to the normal exception path, we need to correct the ESPFIX magic before leaving the entry stack, otherwise pt_regs will present a non-flat stack pointer. Tested by running sigreturn_32 concurrent with perf-record. Fixes: e5862d0515ad ("x86/entry/32: Leave the kernel via trampoline stack") Signed-off-by: Peter Zijlstra (Intel) Acked-by: Andy Lutomirski Cc: stable@kernel.org commit a1a338e5b6fe9e0a39c57c232dc96c198bb53e47 Author: Andy Lutomirski Date: Wed Nov 20 10:10:49 2019 +0100 x86/entry/32: Unwind the ESPFIX stack earlier on exception entry Right now, we do some fancy parts of the exception entry path while SS might have a nonzero base: we fill in regs->ss and regs->sp, and we consider switching to the kernel stack. This results in regs->ss and regs->sp referring to a non-flat stack and it may result in overflowing the entry stack. The former issue means that we can try to call iret_exc on a non-flat stack, which doesn't work. Tested with selftests/x86/sigreturn_32. Fixes: 45d7b255747c ("x86/entry/32: Enter the kernel via trampoline stack") Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Cc: stable@kernel.org commit 82cb8a0b1d8d07817b5d59f7fa1438e1fceafab2 Author: Andy Lutomirski Date: Wed Nov 20 09:56:36 2019 +0100 x86/entry/32: Move FIXUP_FRAME after pushing %fs in SAVE_ALL This will allow us to get percpu access working before FIXUP_FRAME, which will allow us to unwind ESPFIX earlier. Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Cc: stable@kernel.org commit 4c4fd55d3d59a41ddfa6ecba7e76928921759f43 Author: Andy Lutomirski Date: Wed Nov 20 09:49:33 2019 +0100 x86/entry/32: Use %ss segment where required When re-building the IRET frame we use %eax as an destination %esp, make sure to then also match the segment for when there is a nonzero SS base (ESPFIX). [peterz: Changelog and minor edits] Fixes: 3c88c692c287 ("x86/stackframe/32: Provide consistent pt_regs") Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Cc: stable@kernel.org commit 40ad2199580e248dce2a2ebb722854180c334b9e Author: Peter Zijlstra Date: Wed Nov 20 13:05:06 2019 +0100 x86/entry/32: Fix IRET exception As reported by Lai, the commit 3c88c692c287 ("x86/stackframe/32: Provide consistent pt_regs") wrecked the IRET EXTABLE entry by making .Lirq_return not point at IRET. Fix this by placing IRET_FRAME in RESTORE_REGS, to mirror how FIXUP_FRAME is part of SAVE_ALL. Fixes: 3c88c692c287 ("x86/stackframe/32: Provide consistent pt_regs") Reported-by: Lai Jiangshan Signed-off-by: Peter Zijlstra (Intel) Acked-by: Andy Lutomirski Cc: stable@kernel.org commit 880a98c339961eaa074393e3a2117cbe9125b8bb Author: Thomas Gleixner Date: Thu Nov 21 00:40:24 2019 +0100 x86/cpu_entry_area: Add guard page for entry stack on 32bit The entry stack in the cpu entry area is protected against overflow by the readonly GDT on 64-bit, but on 32-bit the GDT needs to be writeable and therefore does not trigger a fault on stack overflow. Add a guard page. Fixes: c482feefe1ae ("x86/entry/64: Make cpu_entry_area.tss read-only") Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: stable@kernel.org commit f490e07c53d66045d9d739e134145ec9b38653d3 Author: Thomas Gleixner Date: Thu Nov 21 00:40:23 2019 +0100 x86/pti/32: Size initial_page_table correctly Commit 945fd17ab6ba ("x86/cpu_entry_area: Sync cpu_entry_area to initial_page_table") introduced the sync for the initial page table for 32bit. sync_initial_page_table() uses clone_pgd_range() which does the update for the kernel page table. If PTI is enabled it also updates the user space page table counterpart, which is assumed to be in the next page after the target PGD. At this point in time 32-bit did not have PTI support, so the user space page table update was not taking place. The support for PTI on 32-bit which was introduced later on, did not take that into account and missed to add the user space counter part for the initial page table. As a consequence sync_initial_page_table() overwrites any data which is located in the page behing initial_page_table causing random failures, e.g. by corrupting doublefault_tss and wreckaging the doublefault handler on 32bit. Fix it by adding a "user" page table right after initial_page_table. Fixes: 7757d607c6b3 ("x86/pti: Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32") Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Joerg Roedel Cc: stable@kernel.org commit 3580d0b29cab08483f84a16ce6a1151a1013695f Author: Andy Lutomirski Date: Thu Nov 21 11:50:12 2019 +0100 x86/doublefault/32: Fix stack canaries in the double fault handler The double fault TSS was missing GS setup, which is needed for stack canaries to work. Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Cc: stable@kernel.org commit 03bf73c315edca28f47451913177e14cd040a216 Author: Navid Emamdoost Date: Mon Sep 23 15:09:58 2019 -0500 nbd: prevent memory leak In nbd_add_socket when krealloc succeeds, if nsock's allocation fail the reallocted memory is leak. The correct behaviour should be assigning the reallocted memory to config->socks right after success. Reviewed-by: Josef Bacik Signed-off-by: Navid Emamdoost Signed-off-by: Jens Axboe commit 8cf9b615653e40debdcf3b6f1d69e6b580d71173 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:39:44 2019 +0800 rpmsg: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133945.13938-1-krzk@kernel.org Signed-off-by: Bjorn Andersson commit 866ca95da5e5c4fad59f1b08254168284bd6a911 Merge: ad512f2023b3 6c6aa2f26c68 Author: Jens Axboe Date: Thu Nov 21 10:53:47 2019 -0700 Merge branch 'nvme-5.5' of git://git.infradead.org/nvme into for-5.5/drivers-post Pull NVMe changes from Keith: "- The only new feature is the optional hwmon support for nvme (Guenter and Akinobu) - A universal work-around for controllers reading discard payloads beyond the range boundary (Eduard) - Chaitanya graciously agreed to share the target driver maintenance" * 'nvme-5.5' of git://git.infradead.org/nvme: nvme: hwmon: add quirk to avoid changing temperature threshold nvme: hwmon: provide temperature min and max values for each sensor nvmet: add another maintainer nvme: Discard workaround for non-conformant devices nvme: Add hardware monitoring support commit 7f264dab5b60343358e788d4c939c166c22ea4a2 Author: Davidlohr Bueso Date: Wed Nov 20 17:16:01 2019 -0800 x86/mm/pat: Rename pat_rbtree.c to pat_interval.c Considering the previous changes, this is a more proper name. Signed-off-by: Davidlohr Bueso Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20191121011601.20611-5-dave@stgolabs.net Signed-off-by: Ingo Molnar commit 511aaca834fe2dc0b652406bda6283842fdc70ce Author: Davidlohr Bueso Date: Wed Nov 20 17:16:00 2019 -0800 x86/mm/pat: Drop the rbt_ prefix from external memtype calls Drop the rbt_memtype_*() call rbt_ prefix, as we no longer use an rbtree directly. Signed-off-by: Davidlohr Bueso Reviewed-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20191121011601.20611-4-dave@stgolabs.net Signed-off-by: Ingo Molnar commit 6a9930b1c50d83facfa0f78e4f2f9ba0364f43f3 Author: Davidlohr Bueso Date: Wed Nov 20 17:15:59 2019 -0800 x86/mm/pat: Do not pass 'rb_root' down the memtype tree helper functions Get rid of the passing the rb_root down the helper calls; there is only one: &memtype_rbroot. No change in functionality. [ mingo: Fixed the changelog which described a different version of the patch. ] Signed-off-by: Davidlohr Bueso Reviewed-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20191121011601.20611-3-dave@stgolabs.net Signed-off-by: Ingo Molnar commit 8d04a5f97a5fa9d7afdf46eda3a5ceaa973a1bcc Author: Davidlohr Bueso Date: Wed Nov 20 17:15:58 2019 -0800 x86/mm/pat: Convert the PAT tree to a generic interval tree With some considerations, the custom pat_rbtree implementation can be simplified to use most of the generic interval_tree machinery: - The tree inorder traversal can slightly differ when there are key ('start') collisions in the tree due to one going left and another right. This, however, only affects the output of debugfs' pat_memtype_list file. - Generic interval trees are now fully closed [a, b], for which we need to adjust the last endpoint (ie: end - 1). - Erasing logic must remain untouched as well. - In order for the types to remain u64, the 'memtype_interval' calls are introduced, as opposed to simply using struct interval_tree. In addition, the PAT tree might potentially also benefit by the fast overlap detection for the insertion case when looking up the first overlapping node in the tree. No change in behavior is intended. Finally, I've tested this on various servers, via sanity warnings, running side by side with the current version and so far see no differences in the returned pointer node when doing memtype_rb_lowest_match() lookups. Signed-off-by: Davidlohr Bueso Reviewed-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20191121011601.20611-2-dave@stgolabs.net Signed-off-by: Ingo Molnar commit 1250ed7114a977cdc2a67a0c09d6cdda63970eb9 Author: Fabrice Gasnier Date: Thu Nov 21 09:10:49 2019 +0100 serial: stm32: fix clearing interrupt error flags The interrupt clear flag register is a "write 1 to clear" register. So, only writing ones allows to clear flags: - Replace buggy stm32_clr_bits() by a simple write to clear error flags - Replace useless read/modify/write stm32_set_bits() routine by a simple write to clear TC (transfer complete) flag. Fixes: 4f01d833fdcd ("serial: stm32: fix rx error handling") Signed-off-by: Fabrice Gasnier Cc: stable Link: https://lore.kernel.org/r/1574323849-1909-1-git-send-email-fabrice.gasnier@st.com Signed-off-by: Greg Kroah-Hartman commit 6c6aa2f26c6813af38d88718881c0307bb9a54c0 Author: Akinobu Mita Date: Fri Nov 15 00:40:01 2019 +0900 nvme: hwmon: add quirk to avoid changing temperature threshold This adds a new quirk NVME_QUIRK_NO_TEMP_THRESH_CHANGE to avoid changing the value of the temperature threshold feature for specific devices that show undesirable behavior. Guenter reported: "On my Intel NVME drive (SSDPEKKW512G7), writing any minimum limit on the Composite temperature sensor results in a temperature warning, and that warning is sticky until I reset the controller. It doesn't seem to matter which temperature I write; writing -273000 has the same result." The Intel NVMe has the latest firmware version installed, so this isn't a problem that was ever fixed. Reported-by: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Jean Delvare Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Akinobu Mita Signed-off-by: Keith Busch commit 52deba0f02a98c150677a9c381cc1991a928bcff Author: Akinobu Mita Date: Fri Nov 15 00:40:00 2019 +0900 nvme: hwmon: provide temperature min and max values for each sensor According to the NVMe specification, the over temperature threshold and under temperature threshold features shall be implemented for Composite Temperature if a non-zero WCTEMP field value is reported in the Identify Controller data structure. The features are also implemented for all implemented temperature sensors (i.e., all Temperature Sensor fields that report a non-zero value). This provides the over temperature threshold and under temperature threshold for each sensor as temperature min and max values of hwmon sysfs attributes. The WCTEMP is already provided as a temperature max value for Composite Temperature, but this change isn't incompatible. Because the default value of the over temperature threshold for Composite Temperature is the WCTEMP. Now the alarm attribute for Composite Temperature indicates one of the temperature is outside of a temperature threshold. Because there is only a single bit in Critical Warning field that indicates a temperature is outside of a threshold. Example output from the "sensors" command: nvme-pci-0100 Adapter: PCI adapter Composite: +33.9°C (low = -273.1°C, high = +69.8°C) (crit = +79.8°C) Sensor 1: +34.9°C (low = -273.1°C, high = +65261.8°C) Sensor 2: +31.9°C (low = -273.1°C, high = +65261.8°C) Sensor 5: +47.9°C (low = -273.1°C, high = +65261.8°C) This also adds helper macros for kelvin from/to milli Celsius conversion, and replaces the repeated code in hwmon.c. Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Jean Delvare Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Akinobu Mita Signed-off-by: Keith Busch commit 3aeb6a24f171f0000c81117b4b8b2ac2858b2f27 Author: Christoph Hellwig Date: Sat Nov 16 18:50:38 2019 +0100 nvmet: add another maintainer Sagi and I have been pretty busy lately, and Chaitanya has been helping a lot with target work and agreed to share the load. Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch commit 91a9f2d3f9762e59cca251d2c6cef8cda1a4e62b Author: Chunfeng Yun Date: Wed Nov 20 14:43:03 2019 +0800 usb: gadget: udc: gr_udc: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1574232183-5760-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit f5b7f7c838216826072c92c8a26aeb2707d707a8 Author: Chunfeng Yun Date: Wed Nov 20 14:43:02 2019 +0800 usb: gadget: atmel: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1574232183-5760-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit d4836b69d9352ffbf2a2fea9735b0c7f3388a579 Author: Chunfeng Yun Date: Wed Nov 20 14:43:01 2019 +0800 usb: musb: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move musb's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1574232183-5760-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 1e279153dfd53e76006720df804d5935a6cbc6d5 Author: Jens Axboe Date: Thu Nov 21 10:16:12 2019 -0700 Revert "block: split bio if the only bvec's length is > SZ_4K" We really don't need this, as the slow path will do the right thing anyway. This reverts commit 6952a7f8446ee85ea9d10ab87b64797a031eaae3. Signed-off-by: Jens Axboe commit 3d581b11e34a92350983e5d3ecf469b5c677e295 Author: Frederick Lawler Date: Sun Nov 17 18:35:13 2019 -0600 drm/radeon: Prefer pcie_capability_read_word() Commit 8c0d3a02c130 ("PCI: Add accessors for PCI Express Capability") added accessors for the PCI Express Capability so that drivers didn't need to be aware of differences between v1 and v2 of the PCI Express Capability. Replace pci_read_config_word() and pci_write_config_word() calls with pcie_capability_read_word() and pcie_capability_write_word(). Link: https://lore.kernel.org/r/20191118003513.10852-1-fred@fredlawl.com Signed-off-by: Frederick Lawler Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher commit ca56f99c18cafdeae6961ce9d87fc978506152ca Author: Bjorn Helgaas Date: Thu Nov 21 07:24:24 2019 -0600 drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions Replace hard-coded magic numbers with the descriptive PCI_EXP_LNKCTL2 definitions. No functional change intended. Link: https://lore.kernel.org/r/20191112173503.176611-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher commit 40bd4be5a652ce56068a8273b68caa38cb0d8f4b Author: Bjorn Helgaas Date: Wed Nov 20 17:54:13 2019 -0600 drm/radeon: Correct Transmit Margin masks Previously we masked PCIe Link Control 2 register values with "7 << 9", which was apparently intended to be the Transmit Margin field, but instead was the high order bit of Transmit Margin, the Enter Modified Compliance bit, and the Compliance SOS bit. Correct the mask to "7 << 7", which is the Transmit Margin field. Link: https://lore.kernel.org/r/20191112173503.176611-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher commit 88027c89ea146e32485251f1c2dddcde43c8d04e Author: Frederick Lawler Date: Sun Nov 17 18:35:13 2019 -0600 drm/amdgpu: Prefer pcie_capability_read_word() Commit 8c0d3a02c130 ("PCI: Add accessors for PCI Express Capability") added accessors for the PCI Express Capability so that drivers didn't need to be aware of differences between v1 and v2 of the PCI Express Capability. Replace pci_read_config_word() and pci_write_config_word() calls with pcie_capability_read_word() and pcie_capability_write_word(). [bhelgaas: fix a couple remaining instances in cik.c] Link: https://lore.kernel.org/r/20191118003513.10852-1-fred@fredlawl.com Signed-off-by: Frederick Lawler Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher commit a7ba70f1787f977f970cd116076c6fce4b9e01cc Author: Nicolas Saenz Julienne Date: Thu Nov 21 10:26:44 2019 +0100 dma-mapping: treat dev->bus_dma_mask as a DMA limit Using a mask to represent bus DMA constraints has a set of limitations. The biggest one being it can only hold a power of two (minus one). The DMA mapping code is already aware of this and treats dev->bus_dma_mask as a limit. This quirk is already used by some architectures although still rare. With the introduction of the Raspberry Pi 4 we've found a new contender for the use of bus DMA limits, as its PCIe bus can only address the lower 3GB of memory (of a total of 4GB). This is impossible to represent with a mask. To make things worse the device-tree code rounds non power of two bus DMA limits to the next power of two, which is unacceptable in this case. In the light of this, rename dev->bus_dma_mask to dev->bus_dma_limit all over the tree and treat it as such. Note that dev->bus_dma_limit should contain the higher accessible DMA address. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig commit d7293f79caea45c50c0ab4294847e7af96501ced Merge: 68a33b179466 bff3b04460a8 Author: Christoph Hellwig Date: Thu Nov 21 18:13:03 2019 +0100 Merge branch 'for-next/zone-dma' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into dma-mapping-for-next Pull in a stable branch from the arm64 tree that adds the zone_dma_bits variable to avoid creating hard to resolve conflicts with that addition. commit b78cda795ac83333293f1bfa3165572a47e550c2 Merge: 599ea01ce0b3 5feccddcf992 Author: Greg Kroah-Hartman Date: Thu Nov 21 17:35:28 2019 +0100 Merge tag 'misc-habanalabs-next-2019-11-21' of git://people.freedesktop.org/~gabbayo/linux into char-misc-next Oded writes: This tag contains the following changes for kernel 5.5: - MMU code improvements that includes: - Distinguish between "normal" unmapping and unmapping that is done as part of the tear-down of a user process. This improves performance of unmapping during reset of the device. - Add future ASIC support in generic MMU code. - Improve device reset code by adding more protection around accessing the device during the reset process. - Add new H/W queue type for future ASIC support - Add more information to be retrieved by users through INFO IOCTL: - clock rate - board name - reset counters - Small bug fixes and minor improvements to code. * tag 'misc-habanalabs-next-2019-11-21' of git://people.freedesktop.org/~gabbayo/linux: (31 commits) habanalabs: add more protection of device during reset habanalabs: flush EQ workers in hard reset habanalabs: make the reset code more consistent habanalabs: expose reset counters via existing INFO IOCTL habanalabs: make code more concise habanalabs: use defines for F/W files habanalabs: remove prints on successful device initialization habanalabs: remove unnecessary checks habanalabs: invalidate MMU cache only once habanalabs: skip VA block list update in reset flow habanalabs: optimize MMU unmap habanalabs: prevent read/write from/to the device during hard reset habanalabs: split MMU properties to PCI/DRAM habanalabs: re-factor MMU masks and documentation habanalabs: type specific MMU cache invalidation habanalabs: re-factor memory module code habanalabs: export uapi defines to user-space habanalabs: don't print error when queues are full habanalabs: increase max jobs number to 512 habanalabs: set ETR as non-secured ... commit 34376eb1b0840c916a9d0b703fb2efefb2f46fd6 Author: Arnaud Pouliquen Date: Thu Nov 21 10:52:25 2019 +0100 dt-bindings: remoteproc: convert stm32-rproc to json-schema Convert the STM32 remoteproc bindings to DT schema format using json-schema Signed-off-by: Arnaud Pouliquen [robh: Drop mbox-consumer.yaml reference] Signed-off-by: Rob Herring commit 4360bf7244839c6780e25160089104244e0a15c3 Author: Arnaud Pouliquen Date: Thu Nov 21 10:51:02 2019 +0100 dt-bindings: mailbox: convert stm32-ipcc to json-schema Convert the STM32 IPCC bindings to DT schema format using json-schema Signed-off-by: Arnaud Pouliquen Signed-off-by: Rob Herring commit 4b1140ade8f5c1ced640286cce79371ade2bd2d1 Author: Kunihiko Hayashi Date: Thu Nov 7 13:58:14 2019 +0900 PCI: uniphier: Set mode register to host mode Set the mode register to host(RC) mode so that the host controller mode is set-up consistently across SoCs. Signed-off-by: Kunihiko Hayashi [lorenzo.pieralisi@arm.com: updated log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit b6866318657717c8914673a6394894d12bc9ff5e Author: Konstantin Khlebnikov Date: Thu Nov 21 13:40:26 2019 +0300 block: add iostat counters for flush requests Requests that triggers flushing volatile writeback cache to disk (barriers) have significant effect to overall performance. Block layer has sophisticated engine for combining several flush requests into one. But there is no statistics for actual flushes executed by disk. Requests which trigger flushes usually are barriers - zero-size writes. This patch adds two iostat counters into /sys/class/block/$dev/stat and /proc/diskstats - count of completed flush requests and their total time. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Jens Axboe commit ddb52945999dcf35787bf221b62108806182578d Author: Tony Lindgren Date: Tue Nov 19 19:50:30 2019 -0800 ARM: dts: Fix vcsi regulator to be always-on for droid4 to prevent hangs In addition to using vcsi regulator for the display, looks like droid4 is using vcsi regulator to trigger off mode internally with the PMIC firmware when the SoC enters deeper idle states. This is configured in the Motorola Mapphone Linux kernel sources as "zerov_regulator". As we currently don't support off mode during idle for omap4, we must prevent vcsi from being disabled when the display is blanked to prevent the PMIC change to off mode. Otherwise the device will hang on entering idle when the display is blanked. Before commit 089b3f61ecfc ("regulator: core: Let boot-on regulators be powered off"), the boot-on regulators never got disabled like they should and vcsi did not get turned off on idle. Let's fix the issue by setting vcsi to always-on for now. Later on we may want to claim the vcsi regulator also in the PM code if needed. Fixes: 089b3f61ecfc ("regulator: core: Let boot-on regulators be powered off") Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit b88091f5d84a5a5bf9c0583c693373ab8a2ee425 Author: Benjamin Gaignard Date: Mon Nov 18 10:48:42 2019 +0100 dt-bindings: mfd: Convert stm32 low power timers bindings to json-schema Convert the STM32 low power timers binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit b9da2fcc5ed97136e94a6d96b7ac0f18d832618f Author: Alexandre Torgue Date: Fri Nov 15 19:12:39 2019 +0100 dt-bindings: interrupt-controller: Convert stm32-exti to json-schema Convert the STM32 external interrupt controller (EXTI) binding to DT schema format using json-schema. Signed-off-by: Alexandre Torgue Signed-off-by: Rob Herring commit ceced4acb01ab73b941f940061a2be4cdcfa2468 Author: Benjamin Gaignard Date: Fri Nov 15 11:24:27 2019 +0100 dt-bindings: crypto: Convert stm32 HASH bindings to json-schema Convert the STM32 HASH binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 5059791efc73a628fcda8d0dec79d98a8a66c454 Author: Benjamin Gaignard Date: Fri Nov 15 11:08:54 2019 +0100 dt-bindings: rng: Convert stm32 RNG bindings to json-schema Convert the STM32 RNG binding to DT schema format using json-schema Remove interrupt from the json-schema because it is not used by the driver. Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 1c11ca7a0584ddede5b8c93057b40d31e8a96d3d Author: Arnd Bergmann Date: Thu Nov 21 15:19:49 2019 +0100 y2038: fix typo in powerpc vdso "LOPART" The earlier patch introduced a typo, change LOWPART back to LOPART. Fixes: 176ed98c8a76 ("y2038: vdso: powerpc: avoid timespec references") Reported-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit ae75b53e08b95cd189879b00f6a47cbdaab1f0eb Author: Paul Cercueil Date: Tue Nov 19 16:52:11 2019 +0100 pinctrl: ingenic: Add OTG VBUS pin for the JZ4770 Add pin mux configuration for the OTG VBUS pin of the JZ4770. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20191119155211.102527-2-paul@crapouillou.net Signed-off-by: Linus Walleij commit 7009d046a60116a4066ee2c9b005b43f0972c9b2 Author: Paul Cercueil Date: Tue Nov 19 16:52:10 2019 +0100 pinctrl: ingenic: Handle PIN_CONFIG_OUTPUT config This makes the driver support the 'output-low' and 'output-high' devicetree properties in gpio-hog sub-nodes. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20191119155211.102527-1-paul@crapouillou.net Signed-off-by: Linus Walleij commit 2635adb48bd517343a163ccc1f7ee126eb24bd90 Author: Krzysztof Kozlowski Date: Thu Nov 21 04:19:41 2019 +0100 pinctrl: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1574306382-32516-1-git-send-email-krzk@kernel.org Signed-off-by: Linus Walleij commit e66ff71fd0dba36a53f91f39e4da6c7b84764f2e Author: Andy Shevchenko Date: Wed Nov 20 15:37:39 2019 +0200 pinctrl: lewisburg: Update pin list according to v1.1v6 Version 1.1v6 of pin list has some changes in pin names for Intel Lewisburg. Update the driver accordingly. Note, it reveals the bug in the driver that misses two pins in GPP_L and has rather two extra ones. That's why the ordering of some groups is changed. Fixes: e480b745386e ("pinctrl: intel: Add Intel Lewisburg GPIO support") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191120133739.54332-1-andriy.shevchenko@linux.intel.com Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit e272f7ec070d212b9301d5a465bc8952f8dcf908 Author: Andy Shevchenko Date: Mon Nov 18 20:02:51 2019 +0200 gpio: lynxpoint: Setup correct IRQ handlers When commit 75e99bf5ed8f ("gpio: lynxpoint: set default handler to be handle_bad_irq()") switched default handler to be handle_bad_irq() the lp_irq_type() function remained untouched. It means that even request_irq() can't change the handler and we are not able to handle IRQs properly anymore. Fix it by setting correct handlers in the lp_irq_type() callback. Fixes: 75e99bf5ed8f ("gpio: lynxpoint: set default handler to be handle_bad_irq()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191118180251.31439-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 3d2dcd946b3aeac078fd1baf42c7a10312cd9254 Author: Andy Shevchenko Date: Mon Nov 18 15:52:58 2019 +0200 MAINTAINERS: Replace my email by one @kernel.org For the repositories we keep on git.kernel.org replace my email to be on the same domain for sake of consistency. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191118135258.37574-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 20e5a163b8df0e1fc02c574008e3a6e0d21849bc Author: Andy Shevchenko Date: Mon Nov 18 15:49:26 2019 +0200 MAINTAINERS: Replace my email by one @kernel.org For the repositories we keep on git.kernel.org replace my email to be on the same domain for sake of consistency. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191118134926.37337-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 04fb02757ae5188031eb71b2f6f189edb1caf5dc Author: Gregory CLEMENT Date: Fri Nov 15 16:57:52 2019 +0100 pinctrl: armada-37xx: Fix irq mask access in armada_37xx_irq_set_type() As explained in the following commit a9a1a4833613 ("pinctrl: armada-37xx: Fix gpio interrupt setup") the armada_37xx_irq_set_type() function can be called before the initialization of the mask field. That means that we can't use this field in this function and need to workaround it using hwirq. Fixes: 30ac0d3b0702 ("pinctrl: armada-37xx: Add edge both type gpio irq support") Cc: stable@vger.kernel.org Reported-by: Russell King Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191115155752.2562-1-gregory.clement@bootlin.com Signed-off-by: Linus Walleij commit 98dcf14d7f9c9482144b9015d481bf6b63bce965 Author: Adrian Hunter Date: Fri Nov 15 14:42:11 2019 +0200 perf tools: Add kernel AUX area sampling definitions Add kernel AUX area sampling definitions, which brings perf_event.h into line with the kernel version. New sample type PERF_SAMPLE_AUX requests a sample of the AUX area buffer. New perf_event_attr member 'aux_sample_size' specifies the desired size of the sample. Also add support for parsing samples containing AUX area data i.e. PERF_SAMPLE_AUX. Committer notes: I squashed the first two patches in this series to avoid breaking automatic bisection, i.e. after applying only the original first patch in this series we would have: # perf test -v parsing 26: Sample parsing : --- start --- test child forked, pid 17018 sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating test child finished with -1 ---- end ---- Sample parsing: FAILED! # With the two paches combined: # perf test parsing 26: Sample parsing : Ok # Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191115124225.5247-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 35e768e296729ac96a8c33b7810b6cb1673ae961 Author: Bjorn Helgaas Date: Thu Nov 21 07:23:41 2019 -0600 drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions Replace hard-coded magic numbers with the descriptive PCI_EXP_LNKCTL2 definitions. No functional change intended. Link: https://lore.kernel.org/r/20191112173503.176611-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher commit 19d7a95a8ba66b198f759cf610cc935ce9840d5b Author: Bjorn Helgaas Date: Wed Nov 20 17:52:48 2019 -0600 drm/amdgpu: Correct Transmit Margin masks Previously we masked PCIe Link Control 2 register values with "7 << 9", which was apparently intended to be the Transmit Margin field, but instead was the high order bit of Transmit Margin, the Enter Modified Compliance bit, and the Compliance SOS bit. Correct the mask to "7 << 7", which is the Transmit Margin field. Link: https://lore.kernel.org/r/20191112173503.176611-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher commit bbdb2f5ecdf1e66b2f09710134db3c2e5c43a958 Author: Bjorn Helgaas Date: Tue Nov 12 11:07:36 2019 -0600 PCI: Add #defines for Enter Compliance, Transmit Margin Add definitions for the Enter Compliance and Transmit Margin fields of the PCIe Link Control 2 register. Link: https://lore.kernel.org/r/20191112173503.176611-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher commit b7da3d4df05232d637eff1c0874d20996b98769c Author: Bjorn Helgaas Date: Wed Nov 6 16:13:43 2019 -0600 PCI: Allow building PCIe things without PCIEPORTBUS Some things in drivers/pci/pcie (aspm.c and ptm.c) do not depend on the PCIe portdrv, so we should be able to build them even if PCIEPORTBUS is not selected. Remove the PCIEPORTBUS guard from building pcie/. Link: https://lore.kernel.org/r/20191106222420.10216-6-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Andrew Murray commit b6479581e6823239c3e03b1d006f160c6c491ba0 Author: Bjorn Helgaas Date: Wed Nov 6 16:09:40 2019 -0600 PCI: Remove PCIe Kconfig dependencies on PCI drivers/pci/pcie/Kconfig is only sourced by drivers/pci/Kconfig, and only when PCI is defined, so there's no need to depend on PCI again. Remove the unnecessary dependencies. Link: https://lore.kernel.org/r/20191106222420.10216-5-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Andrew Murray commit 33ce09ef17329be407fc238a214d6f49fdc8a007 Author: Bjorn Helgaas Date: Wed Nov 6 16:07:36 2019 -0600 PCI/ASPM: Remove dependency on PCIEPORTBUS The ASPM support does not depend on the portdrv, so remove the Kconfig dependency. Link: https://lore.kernel.org/r/20191106222420.10216-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Andrew Murray commit 97a0ac8a4678fb6340f6b2646e7c46e9c2872e02 Author: Bjorn Helgaas Date: Wed Nov 6 16:01:15 2019 -0600 PCI/PTM: Remove dependency on PCIEPORTBUS The PTM support does not depend on the portdrv, so remove the Kconfig dependency. Link: https://lore.kernel.org/r/20191106222420.10216-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Andrew Murray Cc: Jonathan Yong commit 127a7709495db52a41012deaebbb7afc231dad91 Author: Bjorn Helgaas Date: Wed Nov 6 15:30:48 2019 -0600 PCI/PTM: Remove spurious "d" from granularity message The granularity message has an extra "d": pci 0000:02:00.0: PTM enabled, 4dns granularity Remove the "d" so the message is simply "PTM enabled, 4ns granularity". Fixes: 8b2ec318eece ("PCI: Add PTM clock granularity information") Link: https://lore.kernel.org/r/20191106222420.10216-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Andrew Murray Cc: Jonathan Yong commit ca22d1f5474a7278d317bb86296723e9e563c44d Author: Ben Dooks Date: Wed Oct 16 09:03:24 2019 +0100 PCI: sysfs: Remove unused attribute groups 56c1af4606f0 ("PCI: Add sysfs max_link_speed/width, current_link_speed/width, etc") added the following objects, but they are unused, so remove them: pci_bridge_group pci_bridge_groups pcie_dev_group pcie_dev_groups This fixes the following warnings from sparse: drivers/pci/pci-sysfs.c:1546:30: warning: symbol 'pci_bridge_groups' was not declared. Should it be static? drivers/pci/pci-sysfs.c:1555:30: warning: symbol 'pcie_dev_groups' was not declared. Should it be static? Link: https://lore.kernel.org/r/20191016080324.12864-1-ben.dooks@codethink.co.uk Signed-off-by: Ben Dooks Signed-off-by: Bjorn Helgaas commit 7e8ce0e2b036dbc6617184317983aea4f2c52099 Author: Kai-Heng Feng Date: Mon Sep 2 22:52:52 2019 +0800 x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect The AMD FCH USB XHCI Controller advertises support for generating PME# while in D0. When in D0, it does signal PME# for USB 3.0 connect events, but not for USB 2.0 or USB 1.1 connect events, which means the controller doesn't wake correctly for those events. 00:10.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:7914] (rev 20) (prog-if 30 [XHCI]) Subsystem: Dell FCH USB XHCI Controller [1028:087e] Capabilities: [50] Power Management version 3 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Clear PCI_PM_CAP_PME_D0 in dev->pme_support to indicate the device will not assert PME# from D0 so we don't rely on it. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203673 Link: https://lore.kernel.org/r/20190902145252.32111-1-kai.heng.feng@canonical.com Signed-off-by: Kai-Heng Feng Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org commit bbd8810d399812f2016713565e4d8ff8f1508aa6 Author: Krzysztof Wilczynski Date: Tue Sep 3 13:30:59 2019 +0200 PCI: Remove unused includes and superfluous struct declaration Remove and from being included directly as part of the include/linux/of_pci.h, and remove superfluous declaration of struct of_phandle_args. Move users of include to include and directly rather than rely on both being included transitively through . Link: https://lore.kernel.org/r/20190903113059.2901-1-kw@linux.com Signed-off-by: Krzysztof Wilczynski Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring commit 0d2f4d62ff4164df5611df53ae5546421d40cfb4 Author: Krzysztof Wilczynski Date: Mon Aug 19 08:05:32 2019 +0200 x86/PCI: Replace deprecated EXTRA_CFLAGS with ccflags-y Update arch/x86/pci/Makefile replacing the deprecated EXTRA_CFLAGS with the ccflags-y matching recommendation per section 3.7 of Documentation/kbuild/makefiles.txt. Link: https://lore.kernel.org/r/20190819060532.17093-1-kw@linux.com Signed-off-by: Krzysztof Wilczynski Signed-off-by: Bjorn Helgaas commit 65e3c803e7a49bea983c63d145e15bdb274faf27 Author: Krzysztof Wilczynski Date: Wed Aug 28 15:53:22 2019 +0200 x86/PCI: Correct SPDX comment style Change: drivers/pci/controller/pcie-cadence.h drivers/pci/controller/pcie-rockchip.h to use the correct SPDX comment style per section 2 of Documentation/process/license-rules.rst. These resolve the following checkpatch.pl warning: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20190828135322.10370-1-kw@linux.com Signed-off-by: Krzysztof Wilczynski Signed-off-by: Bjorn Helgaas commit 4257ac5acdee880ed2251278199b3569dfa3dc49 Author: Krzysztof Wilczynski Date: Mon Sep 30 17:48:09 2019 -0500 x86/PCI: Add NumaChip SPDX GPL-2.0 to replace COPYING boilerplate Add SPDX GPL-2.0 to numachip.c, which referred to the kernel default "COPYING" file, which specifies GPL version 2. Remove the boilerplate language referring to the GPL and "COPYING", relying on the assertion in b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license") that the SPDX identifier may be used instead of the full boilerplate text. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20190828135322.10370-1-kw@linux.com Signed-off-by: Krzysztof Wilczynski Signed-off-by: Bjorn Helgaas commit 3fab296a98c939c85837c8a7a16c9c56cb9959cb Author: Rahul Tanwar Date: Fri Nov 15 17:25:08 2019 +0800 dt-bindings: pinctrl: intel: Add for new SoC Add dt bindings document for pinmux & GPIO controller driver of Intel Lightning Mountain SoC. Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/b59afc497e41404fea06aa48d633cba183ee944d.1573797249.git.rahul.tanwar@linux.intel.com Signed-off-by: Linus Walleij commit 1948d5c51dba4e4e2652a5687991a6460d78b5d0 Author: Rahul Tanwar Date: Fri Nov 15 17:25:07 2019 +0800 pinctrl: Add pinmux & GPIO controller driver for a new SoC Intel Lightning Mountain SoC has a pinmux controller & GPIO controller IP which controls pin multiplexing & configuration including GPIO functions selection & GPIO attributes configuration. This IP is not based on & does not have anything in common with Chassis specification. The pinctrl drivers under pinctrl/intel/* are all based upon Chassis spec compliant pinctrl IPs. So this driver doesn't fit & can not use pinctrl framework under pinctrl/intel/* and it requires a separate new driver. Add a new GPIO & pin control framework based driver for this IP. Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/33e649758b70490f01724a887c490d5008c7656d.1573797249.git.rahul.tanwar@linux.intel.com Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij commit 0b2c26fb1144a671d462195d4514a0453f55ebd1 Author: Krzysztof Kozlowski Date: Thu Nov 21 21:28:56 2019 +0800 usb: serial: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191121132856.29130-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6aad39f63949901de57f4c78aa3da79625df4bad Author: Krzysztof Kozlowski Date: Thu Nov 21 21:29:01 2019 +0800 usb: misc: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191121132901.29186-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit b14f8b90341bb3258e536914ad0b1ad1a076233f Author: Krzysztof Kozlowski Date: Thu Nov 21 21:29:05 2019 +0800 usb: gadget: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191121132905.29248-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2f8b6e9a2b5ee23e5a14eed6a294f05dc669757b Author: Krzysztof Kozlowski Date: Thu Nov 21 21:29:10 2019 +0800 usb: host: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191121132910.29310-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit c3afa22243453d7a09694bd2975074a8db53d4bc Author: Krzysztof Kozlowski Date: Thu Nov 21 21:29:14 2019 +0800 usb: dwc3: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191121132914.29368-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit da88ac0bd683c13a80b2e55939f2465a25d7cdd4 Author: Krzysztof Kozlowski Date: Thu Nov 21 21:28:47 2019 +0800 tty: Fix Kconfig indentation, continued Adjust indentation from seven spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191121132847.29015-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 599ea01ce0b322cc3eba5b2ce67bb9972edfeb52 Author: Krzysztof Kozlowski Date: Thu Nov 21 21:28:41 2019 +0800 char: Fix Kconfig indentation, continued Adjust indentation from seven spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191121132842.28942-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit d4fc46f1739d2e1a5c2a92a7b3e65f2426c9e9b5 Author: Hans de Goede Date: Thu Nov 14 11:26:00 2019 +0100 gpiolib: acpi: Make acpi_gpiochip_alloc_event always return AE_OK acpi_gpiochip_alloc_event is used to loop over all _AEI resources, if we fail to bind an event handler to one of them, that is not a reason to not try the other resources. This commit modifies acpi_gpiochip_alloc_event to always return AE_OK, so that we will always try to add an event handler for all _AEI resources. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20191114102600.34558-2-hdegoede@redhat.com Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 54787d7c14a4a324d746499a7bed8de6866010c9 Author: Matti Vaittinen Date: Wed Nov 13 09:10:45 2019 +0200 pinctrl: rza1: remove unnecessary static inline function Having static inline oneliner does not benefit too much when it is only called from another oneliner function. Remove some of the 'onion'. This simplifies also the coming usage of the gpiolib defines. We can do conversion from chip bits to gpiolib direction defines as last step in the get_direction callback. Drivers can use chip specific values in driver internal functions and do conversion only once. Signed-off-by: Matti Vaittinen Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191113071045.GA22110@localhost.localdomain Signed-off-by: Linus Walleij commit 787b64a43f7acacf8099329ea08872e663f1e74f Author: Russell King Date: Tue Nov 19 13:10:38 2019 +0000 gpio/mpc8xxx: fix qoriq GPIO reading Qoriq requires the IBE register to be set to enable GPIO inputs to be read. Set it. Signed-off-by: Russell King Link: https://lore.kernel.org/r/E1iX3HC-00069N-0T@rmk-PC.armlinux.org.uk Signed-off-by: Linus Walleij commit 4250b047039d324e0ff65267c8beb5bad5052a86 Author: Kusanagi Kouichi Date: Thu Nov 21 19:20:21 2019 +0900 debugfs: Fix !DEBUG_FS debugfs_create_automount If DEBUG_FS=n, compile fails with the following error: kernel/trace/trace.c: In function 'tracing_init_dentry': kernel/trace/trace.c:8658:9: error: passing argument 3 of 'debugfs_create_automount' from incompatible pointer type [-Werror=incompatible-pointer-types] 8658 | trace_automount, NULL); | ^~~~~~~~~~~~~~~ | | | struct vfsmount * (*)(struct dentry *, void *) In file included from kernel/trace/trace.c:24: ./include/linux/debugfs.h:206:25: note: expected 'struct vfsmount * (*)(void *)' but argument is of type 'struct vfsmount * (*)(struct dentry *, void *)' 206 | struct vfsmount *(*f)(void *), | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ Signed-off-by: Kusanagi Kouichi Link: https://lore.kernel.org/r/20191121102021787.MLMY.25002.ppp.dion.ne.jp@dmta0003.auone-net.jp Signed-off-by: Greg Kroah-Hartman commit 4e50573f39229d5e9c985fa3b4923a8b29619ade Author: Vladimir Oltean Date: Fri Nov 15 14:55:51 2019 +0200 gpio: mpc8xxx: Don't overwrite default irq_set_type callback The per-SoC devtype structures can contain their own callbacks that overwrite mpc8xxx_gpio_devtype_default. The clear intention is that mpc8xxx_irq_set_type is used in case the SoC does not specify a more specific callback. But what happens is that if the SoC doesn't specify one, its .irq_set_type is de-facto NULL, and this overwrites mpc8xxx_irq_set_type to a no-op. This means that the following SoCs are affected: - fsl,mpc8572-gpio - fsl,ls1028a-gpio - fsl,ls1088a-gpio On these boards, the irq_set_type does exactly nothing, and the GPIO controller keeps its GPICR register in the hardware-default state. On the LS1028A, that is ACTIVE_BOTH, which means 2 interrupts are raised even if the IRQ client requests LEVEL_HIGH. Another implication is that the IRQs are not checked (e.g. level-triggered interrupts are not rejected, although they are not supported). Fixes: 82e39b0d8566 ("gpio: mpc8xxx: handle differences between incarnations at a single place") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20191115125551.31061-1-olteanv@gmail.com Tested-by: Michael Walle Signed-off-by: Linus Walleij commit 5406327d43edd9a171bd260f49c752d148727eaf Author: Gayatri Kammela Date: Mon Nov 18 11:05:41 2019 -0800 platform/x86: intel_pmc_core: Add Comet Lake (CML) platform support to intel_pmc_core driver Add Comet Lake to the list of the platforms that intel_pmc_core driver supports for pmc_core device. Just like Ice Lake, Comet Lake can also reuse all the Cannon Lake PCH IPs. No additional effort is needed to enable but to simply reuse them. Cc: Mario Limonciello Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: Kan Liang Cc: David E. Box Cc: Rajneesh Bhardwaj Cc: Tony Luck Signed-off-by: Gayatri Kammela Signed-off-by: Andy Shevchenko commit 43e82d8aa92503d264309fb648b251b2d85caf1a Author: Gayatri Kammela Date: Mon Nov 18 11:05:40 2019 -0800 platform/x86: intel_pmc_core: Fix the SoC naming inconsistency Intel's SoCs follow a naming convention which spells out the SoC name as two words instead of one word (E.g: Cannon Lake vs Cannonlake). Thus fix the naming inconsistency across the intel_pmc_core driver, so future SoCs can follow the naming consistency as below. Cometlake -> Comet Lake Tigerlake -> Tiger Lake Elkhartlake -> Elkhart Lake Cc: Mario Limonciello Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: Kan Liang Cc: David E. Box Cc: Rajneesh Bhardwaj Cc: Tony Luck Suggested-by: Andy Shevchenko Signed-off-by: Gayatri Kammela Signed-off-by: Andy Shevchenko commit e5caebdddc0572cd3aed9f859f4f7d1dcd808fbb Author: Krzysztof Kozlowski Date: Wed Nov 20 21:40:09 2019 +0800 platform/mellanox: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andy Shevchenko commit 1434a3d357d656d4b11fcbdc9b6c35dc673292a0 Author: Srinivas Pandruvada Date: Tue Nov 19 16:22:54 2019 -0800 tools/power/x86/intel-speed-select: Display TRL buckets for just base config level When only base config level is present, this tool is displaying TRL (Turbo-ratio-limits) by reading legacy MSR. In this case, also present core count for TRL by reading MSR 0x1AE. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 20183ccd3e4d01d23b0a01fe9f3ee73fbae312fa Author: Srinivas Pandruvada Date: Fri Nov 15 12:35:22 2019 -0800 tools/power/x86/intel-speed-select: Ignore missing config level It is possible that certain config levels are not available, even if the max level includes the level. There can be missing levels in some platforms. So ignore the level when called for information dump for all levels and fail if specifically ask for the missing level. Here the changes is to continue reading information about other levels even if we fail to get information for the current level. But use the "processed" flag to indicate the failure. When the "processed" flag is not set, don't dump information about that level. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit e149573b2f84d0517648dafc0db625afa681ed54 Author: Will Deacon Date: Wed Nov 20 19:00:28 2019 +0000 of: property: Add device link support for "iommu-map" Commit 8e12257dead7 ("of: property: Add device link support for iommus, mboxes and io-channels") added device link support for IOMMU linkages described using the "iommus" property. For PCI devices, this property is not present and instead the "iommu-map" property is used on the host bridge node to map the endpoint RequesterIDs to their corresponding IOMMU instance. Add support for "iommu-map" to the device link supplier bindings so that probing of PCI devices can be deferred until after the IOMMU is available. Cc: Rob Herring Cc: Robin Murphy Signed-off-by: Will Deacon Acked-by: Saravana Kannan Link: https://lore.kernel.org/r/20191120190028.4722-1-will@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3883539140b8ce67ad000938c3cd3b3e59498520 Author: Saravana Kannan Date: Wed Nov 20 00:02:29 2019 -0800 of: property: Fix the semantics of of_is_ancestor_of() The of_is_ancestor_of() function was renamed from of_link_is_valid() based on review feedback. The rename meant the semantics of the function had to be inverted, but this was missed in the earlier patch. So, fix the semantics of of_is_ancestor_of() and invert the conditional expressions where it is used. Fixes: a3e1d1a7f5fc ("of: property: Add functional dependency link from DT bindings") Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20191120080230.16007-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 478c60cea1c1e57f91d8c3f6dfe3d35784ea7eea Author: Wolfram Sang Date: Thu Nov 21 12:17:33 2019 +0100 Revert "mmc: tmio: remove workaround for NON_REMOVABLE" This reverts commit 7a7dab237027939cb95dc07c4647b80bad5fbbde. We found out that there is still a race with RuntimePM. This can lead to a hang when accessing the eMMC in some situations. Revert this change until the RPM issue is fixed. Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 1696d96890fcc567264fd7f66216e0087818bb70 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:41:01 2019 +0800 memstick: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Ulf Hansson commit c50d8ae3a1274f32c9033bbb0e1c5b3115da2112 Author: Paolo Bonzini Date: Thu Nov 21 10:45:07 2019 +0100 KVM: x86: create mmu/ subdirectory Preparatory work for shattering mmu.c into multiple files. Besides making it easier to follow, this will also make it possible to write unit tests for various parts. Signed-off-by: Paolo Bonzini commit 0155b2b91b263248fb5dd01c238439d4ab3731c5 Author: Liran Alon Date: Wed Nov 20 16:33:07 2019 +0200 KVM: nVMX: Remove unnecessary TLB flushes on L1<->L2 switches when L1 use apic-access-page According to Intel SDM section 28.3.3.3/28.3.3.4 Guidelines for Use of the INVVPID/INVEPT Instruction, the hypervisor needs to execute INVVPID/INVEPT X in case CPU executes VMEntry with VPID/EPTP X and either: "Virtualize APIC accesses" VM-execution control was changed from 0 to 1, OR the value of apic_access_page was changed. In the nested case, the burden falls on L1, unless L0 enables EPT in vmcs02 but L1 enables neither EPT nor VPID in vmcs12. For this reason prepare_vmcs02() and load_vmcs12_host_state() have special code to request a TLB flush in case L1 does not use EPT but it uses "virtualize APIC accesses". This special case however is not necessary. On a nested vmentry the physical TLB will already be flushed except if all the following apply: * L0 uses VPID * L1 uses VPID * L0 can guarantee TLB entries populated while running L1 are tagged differently than TLB entries populated while running L2. If the first condition is false, the processor will flush the TLB on vmentry to L2. If the second or third condition are false, prepare_vmcs02() will request KVM_REQ_TLB_FLUSH. However, even if both are true, no extra TLB flush is needed to handle the APIC access page: * if L1 doesn't use VPID, the second condition doesn't hold and the TLB will be flushed anyway. * if L1 uses VPID, it has to flush the TLB itself with INVVPID and section 28.3.3.3 doesn't apply to L0. * even INVEPT is not needed because, if L0 uses EPT, it uses different EPTP when running L2 than L1 (because guest_mode is part of mmu-role). In this case SDM section 28.3.3.4 doesn't apply. Similarly, examining nested_vmx_vmexit()->load_vmcs12_host_state(), one could note that L0 won't flush TLB only in cases where SDM sections 28.3.3.3 and 28.3.3.4 don't apply. In particular, if L0 uses different VPIDs for L1 and L2 (i.e. vmx->vpid != vmx->nested.vpid02), section 28.3.3.3 doesn't apply. Thus, remove this flush from prepare_vmcs02() and nested_vmx_vmexit(). Side-note: This patch can be viewed as removing parts of commit fb6c81984313 ("kvm: vmx: Flush TLB when the APIC-access address changes”) that is not relevant anymore since commit 1313cc2bd8f6 ("kvm: mmu: Add guest_mode to kvm_mmu_page_role”). i.e. The first commit assumes that if L0 use EPT and L1 doesn’t use EPT, then L0 will use same EPTP for both L0 and L1. Which indeed required L0 to execute INVEPT before entering L2 guest. This assumption is not true anymore since when guest_mode was added to mmu-role. Reviewed-by: Joao Martins Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit db5a95ec166f3fd3eecbd07ebdf56986a3e9f43f Author: Mao Wenan Date: Tue Nov 19 11:06:40 2019 +0800 KVM: x86: remove set but not used variable 'called' Fixes gcc '-Wunused-but-set-variable' warning: arch/x86/kvm/x86.c: In function kvm_make_scan_ioapic_request_mask: arch/x86/kvm/x86.c:7911:7: warning: variable called set but not used [-Wunused-but-set-variable] It is not used since commit 7ee30bc132c6 ("KVM: x86: deliver KVM IOAPIC scan request to target vCPUs") Signed-off-by: Mao Wenan Fixes: 7ee30bc132c6 ("KVM: x86: deliver KVM IOAPIC scan request to target vCPUs") Signed-off-by: Paolo Bonzini commit b11494bcabba7383c9db65132f6f73d64fb1407d Author: Liran Alon Date: Thu Nov 21 00:31:47 2019 +0200 KVM: nVMX: Do not mark vmcs02->apic_access_page as dirty when unpinning vmcs->apic_access_page is simply a token that the hypervisor puts into the PFN of a 4KB EPTE (or PTE if using shadow-paging) that triggers APIC-access VMExit or APIC virtualization logic whenever a CPU running in VMX non-root mode read/write from/to this PFN. As every write either triggers an APIC-access VMExit or write is performed on vmcs->virtual_apic_page, the PFN pointed to by vmcs->apic_access_page should never actually be touched by CPU. Therefore, there is no need to mark vmcs02->apic_access_page as dirty after unpin it on L2->L1 emulated VMExit or when L1 exit VMX operation. Reviewed-by: Krish Sadhukhan Reviewed-by: Joao Martins Reviewed-by: Jim Mattson Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 46f4f0aabc61bfd365e1eb3c8a6d766d1a49cf32 Merge: 14edff88315a b07a5c53d42a Author: Paolo Bonzini Date: Thu Nov 21 10:01:51 2019 +0100 Merge branch 'kvm-tsx-ctrl' into HEAD Conflicts: arch/x86/kvm/vmx/vmx.c commit 5ec966dbcc1935cfd429ffba22b837b88219cfcb Merge: c2ce4d23299f 99cdb2472bb0 Author: Enric Balletbo i Serra Date: Thu Nov 21 11:52:51 2019 +0100 Merge tag 'tag-ib-chrome-mfd-iio-input-5.5' into chrome-platform-5.5 IB between mfd, iio, input and chrome platform for cros-ec-sensorhub Signed-off-by: Enric Balletbo i Serra commit ade48088937f53fe0467162177726176813b9564 Author: Bob Peterson Date: Wed Nov 20 08:53:14 2019 -0500 gfs2: Don't write log headers after file system withdraw Before this patch, when a node withdrew a gfs2 file system, it wrote a (clean) unmount log header. That's wrong. You don't want to write anything to the journal once you're withdrawn because that's acknowledging that the transaction is complete and the journal is in good shape, neither of which may be a valid assumption when the file system is withdrawn. This is especially true if the withdraw was caused due to io errors writing to the journal in the first place. The best course of action is to leave the journal "as is" until it may be safely replayed during journal recovery, regardless of whether it's done by this node or another. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 8f81180ac1837233a98a4e5b108df5874cf97836 Author: Andreas Gruenbacher Date: Thu Nov 21 11:30:47 2019 +0100 gfs2: Remove duplicate call from gfs2_create_inode In gfs2_create_inode, gfs2_set_inode_blocks is called twice for no good reason. Remove the unnecessary call. Signed-off-by: Andreas Gruenbacher commit 99cdb2472bb0466b9e73e27bc4ac769999313af8 Author: Gwendal Grignou Date: Tue Nov 19 13:45:46 2019 +0100 Revert "Input: cros_ec_keyb: mask out extra flags in event_type" This reverts commit d096aa3eb6045a6a475a0239f3471c59eedf3d61. This patch is not needed anymore since we clear EC_MKBP_HAS_MORE_EVENTS flag before calling the notifiers in patch "9d9518f5b52a (platform: chrome: cros_ec: handle MKBP more events flag)" Signed-off-by: Gwendal Grignou Acked-by: Dmitry Torokhov Signed-off-by: Enric Balletbo i Serra commit 3bcce2e8052d5b099d267be8c9087e6dba9deff8 Author: Gwendal Grignou Date: Tue Nov 19 13:45:46 2019 +0100 Revert "Input: cros_ec_keyb - add back missing mask for event_type" This reverts commit 62c3801619e16b68a37ea899b76572145dfe41c9. This patch is not needed anymore since we clear EC_MKBP_HAS_MORE_EVENTS flag before calling the notifiers in patch "9d9518f5b52a (platform: chrome: cros_ec: handle MKBP more events flag)" Signed-off-by: Gwendal Grignou Acked-by: Dmitry Torokhov Signed-off-by: Enric Balletbo i Serra commit 3300fdd630d4d3d96e3ba9af63a740d3a4e8fc61 Author: Enrico Granata Date: Tue Nov 19 13:45:46 2019 +0100 platform/chrome: cros_ec: handle MKBP more events flag The ChromeOS EC has support for signaling to the host that a single IRQ can serve multiple MKBP (Matrix KeyBoard Protocol) events. Doing this serves an optimization purpose, as it minimizes the number of round-trips into the interrupt handling machinery, and it proves beneficial to sensor timestamping as it keeps the desired synchronization of event times between the two processors. This patch adds kernel support for this EC feature, allowing the ec_irq to loop until all events have been served. Signed-off-by: Enrico Granata Signed-off-by: Gwendal Grignou Reviewed-by: Jonathan Cameron Acked-by: Lee Jones Signed-off-by: Enric Balletbo i Serra commit da946589b1b9b643c538e6c977ac0f963362ee3c Author: Gwendal Grignou Date: Tue Nov 19 13:45:46 2019 +0100 platform/chrome: cros_ec: Do not attempt to register a non-positive IRQ number Add a layer of sanity checking to cros_ec_register against attempting to register IRQ values that are not strictly greater than 0. Signed-off-by: Enrico Granata Signed-off-by: Gwendal Grignou Acked-by: Jonathan Cameron Acked-by: Lee Jones Signed-off-by: Enric Balletbo i Serra commit 05a3c420eaa6857cb20afe7e3a3c39ed94a3b2c1 Author: Gwendal Grignou Date: Tue Nov 19 13:45:46 2019 +0100 platform/chrome: cros-ec: Record event timestamp in the hard irq To improve sensor timestamp precision, given EC and AP are in different time domains, the AP needs to try to record the exact moment an event was signalled to the AP by the EC as soon as possible after it happens. First thing in the hard irq is the best place for this. Signed-off-by: Gwendal Grignou Acked-by: Jonathan Cameron Acked-by: Lee Jones Signed-off-by: Enric Balletbo i Serra commit d60ac88a62df71cb12b2d60d2dae5658fb4eab43 Author: Gwendal Grignou Date: Tue Nov 19 13:45:45 2019 +0100 mfd / platform / iio: cros_ec: Register sensor through sensorhub Remove the duplicated code in MFD, since MFD just registers cros-ec-sensorhub if at least one sensor is present. Change IIO cros-ec driver to get the pointer to the cros-ec-dev through cros-ec-sensorhub. Signed-off-by: Gwendal Grignou Acked-by: Jonathan Cameron Acked-by: Lee Jones Signed-off-by: Enric Balletbo i Serra commit 53067471188c4066fc393ab892d0a74482eac000 Author: Gwendal Grignou Date: Tue Nov 19 13:45:45 2019 +0100 iio / platform: cros_ec: Add cros-ec-sensorhub driver Similar to HID sensor stack, the new driver sits between cros-ec-dev and the IIO device drivers: The EC based IIO device topology would be: iio:device1 -> ...0/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.6.auto/ cros-ec-sensorhub.7.auto/ cros-ec-accel.15.auto/ iio:device1 It will be expanded to control EC sensor FIFO. Signed-off-by: Gwendal Grignou Reviewed-by: Jonathan Cameron [Fix "unknown type name 'uint32_t'" type errors] Reported-by: kbuild test robot Signed-off-by: Enric Balletbo i Serra commit a16b2e28190255a0729c27902fa88fb8fff39bb0 Author: Gwendal Grignou Date: Tue Nov 19 13:45:45 2019 +0100 mfd / platform: cros_ec: Add sensor_count and make check_features public Add a new function to return the number of MEMS sensors available in a ChromeOS Embedded Controller. It uses MOTIONSENSE_CMD_DUMP if available or a specific memory map ACPI registers to find out. Also, make check_features public as it can be useful for other drivers to know what the Embedded Controller supports. Signed-off-by: Gwendal Grignou Acked-by: Lee Jones Signed-off-by: Enric Balletbo i Serra commit c9b465683a554212c3dd92915ed2088849c513bf Author: Gwendal Grignou Date: Tue Nov 19 13:45:45 2019 +0100 platform/chrome: cros_ec: Put docs with the code To avoid doc rot, put function documentations with code, not header. Use kernel-doc style comments for exported functions. Signed-off-by: Gwendal Grignou Acked-by: Jonathan Cameron Signed-off-by: Enric Balletbo i Serra commit a7f96fce201c4969178c8709a49e005d9792186b Author: Greentime Hu Date: Thu Nov 21 15:45:40 2019 +0800 MAINTAINERS: add nds32 maintainer Nick implements many features of nds32 such as perf, power management and unaligned access handler. Let's add him as a maintainer. Signed-off-by: Greentime Hu commit 5feccddcf9922ee3c25587d5e609bf58503ad93e Author: Oded Gabbay Date: Mon Nov 18 09:41:08 2019 +0200 habanalabs: add more protection of device during reset Prevent accesses to the device (register read/write) from debugfs entries during reset as that can cause the device to get stuck. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit 55f6d680970ea922d4ee23d5ac88d3a8046221fb Author: Oded Gabbay Date: Sun Nov 17 17:41:57 2019 +0200 habanalabs: flush EQ workers in hard reset During hard-reset, there can be multiple events received from the H/W. For each event, the driver opens a worker thread to handle it. For some of the events, the driver will read/write registers in the code that handles the event. In case of hard-reset, we must prevent reads/writes to the registers during the reset operation because the device might get stuck if that happens. Therefore, flush the EQ workers before resetting the device (in hard-reset only). Additional events won't arrive as we synced and disabled the interrupts. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit 1af69d30c41d0b0f15d8be80c100cefaa909816c Author: Oded Gabbay Date: Sun Nov 17 17:35:49 2019 +0200 habanalabs: make the reset code more consistent In the hl_device_reset we ask about the hard_reset argument when we want to differentiate between soft and hard reset, except for three places where we use "from_hard_reset_thread". Replace one of those locations with the hard_reset argument as it is guaranteed that if we reached to that line in the code during hard_reset, it is from a kernel thread. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit 52c01b0137193ab0c9282ec8d09c6338446e6e9f Author: Moti Haimovski Date: Sun Nov 3 16:26:44 2019 +0200 habanalabs: expose reset counters via existing INFO IOCTL Expose both soft and hard reset counts via INFO IOCTL. This will allow system management applications to easily check if the device has undergone reset. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e16ee4103770acf365372886eac7c750017c918e Author: Oded Gabbay Date: Sat Nov 16 12:29:50 2019 +0200 habanalabs: make code more concise Instead of doing if inside if, just write them with && operator. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit da1342a0eec038dc466742e662218f6be349d1b7 Author: Oded Gabbay Date: Sat Nov 16 12:26:30 2019 +0200 habanalabs: use defines for F/W files Make the code more concise and maintainable by using defines for the F/W files. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit 7fbdc12b91110d21e15b84d5acf8402ae608d8c1 Author: Oded Gabbay Date: Sat Nov 16 12:24:19 2019 +0200 habanalabs: remove prints on successful device initialization Successful device initialization is mentioned in kernel log with the message "Successfully added device to habanalabs driver". There is no point of spamming the log with additional messages about successful queue testing, which are implied by the above mentioned message. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit e604f551cdce07e45b6ca34eab58648185b3fba0 Author: Omer Shpigelman Date: Thu Nov 14 18:23:59 2019 +0000 habanalabs: remove unnecessary checks Now that the VA block free list is not updated on context close in order to optimize this flow, no need in the sanity checks of the list contents as these will fail for sure. In addition, remove the "context closing with VA in use" print during hard reset as this situation is a side effect of the failure that caused the hard reset. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit bea84c4d67e5efd1078ef234ef1304a4d1788008 Author: Omer Shpigelman Date: Thu Nov 14 18:23:58 2019 +0000 habanalabs: invalidate MMU cache only once Reduce context close time by performing MMU cache invalidation once at the end of the unmap loop rather in each iteration, in order to avoid hard reset with open contexts. Reset with open contexts can potentially lead to a kernel crash as the generic pool of the MMU hops is destroyed while it is not empty because some unmap operations are not done. The commit affect mainly when running on simulator. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 71c5e55e7c077fa17c42fbda91a8d14322825c44 Author: Omer Shpigelman Date: Thu Nov 14 18:23:57 2019 +0000 habanalabs: skip VA block list update in reset flow Reduce context close time by skipping the VA block free list update in order to avoid hard reset with open contexts. Reset with open contexts can potentially lead to a kernel crash as the generic pool of the MMU hops is destroyed while it is not empty because some unmap operations are not done. The commit affect mainly when running on simulator. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1b98d8b23f29e5ff82fe84ca0c8acffaa971b9d6 Author: Omer Shpigelman Date: Thu Nov 14 18:23:57 2019 +0000 habanalabs: optimize MMU unmap Reduce context close time by skipping hash table lookup if possible in order to avoid hard reset with open contexts. Reset with open contexts can potentially lead to a kernel crash as the generic pool of the MMU hops is destroyed while it is not empty because some unmap operations are not done. This commit affect mainly when running on simulator. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit bc75d799f9531fe112f7d78a5547ad549293fb7e Author: Omer Shpigelman Date: Thu Nov 14 18:23:56 2019 +0000 habanalabs: prevent read/write from/to the device during hard reset During hard reset we should not access the device except of necessary reset operations because the device might be stuck or unresponsive. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 54bb67444ea3f388756c5955db52ef62eb4ba3b9 Author: Omer Shpigelman Date: Thu Nov 14 18:23:55 2019 +0000 habanalabs: split MMU properties to PCI/DRAM Split the properties used for MMU mappings to DRAM and PCI (host) types. This is a prerequisite for future ASICs support. Note that in Goya ASIC, the PMMU and DMMU are the same (except of page sizes) as only one MMU mechanism is used for both of the mapping types. Hence this patch should not have any effect on current behavior. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 30919edef243e9dc91a3c65e5b1059d481e597e9 Author: Omer Shpigelman Date: Thu Nov 14 18:23:54 2019 +0000 habanalabs: re-factor MMU masks and documentation Some cosmetics around the MMU code to make it more self-explanatory. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7b6e4ea0f7b16ab292df5e67f5d847929f8e4d3e Author: Omer Shpigelman Date: Thu Nov 14 18:23:53 2019 +0000 habanalabs: type specific MMU cache invalidation Add the ability to invalidate the necessary MMU cache only. This ability is a prerequisite for future ASICs support. Note that in Goya ASIC, a single cache is used for both host/DRAM mappings and hence this patch should not have any effect on current behavior. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7f74d4d335f1bdcb51fca584d5ad065c4ff996ac Author: Omer Shpigelman Date: Mon Aug 12 11:48:46 2019 +0300 habanalabs: re-factor memory module code Some of the functions in the memory module code were too long and/or contained multiple operations that are not always done together. Re-factor the code by dividing those functions to smaller functions which are more readable and maintainable. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5d1012576d20dd7cb70e00ea1b4c2af11a6c9156 Author: Oded Gabbay Date: Sun Nov 10 16:08:26 2019 +0200 habanalabs: export uapi defines to user-space The two defines that control the maximum size of a command buffer and the maximum number of JOBS per CS need to be exported to the user as they are part of the API towards user-space. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit eda58bf7860a028f207e8d4201d86191b898bbee Author: Oded Gabbay Date: Sun Nov 10 18:48:06 2019 +0200 habanalabs: don't print error when queues are full If the queues are full and we return -EAGAIN to the user, there is no need to print an error, as that case isn't an error and the user is expected to re-submit the work. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit bd4c8cb17d4e8f9e01ce48e3f2009307a58e60d2 Author: Oded Gabbay Date: Sat Nov 9 23:16:33 2019 +0200 habanalabs: increase max jobs number to 512 In training, there is a need for a large amount of patching to the recipe. This results in many command buffers contains a lot of DMA packets. The number of command buffers per CS is larger than the current maximum of 64, which is an arbitrary number that is enough for inference, but it has no real affect on the code and/or resources of the host machine. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit 6476b472437de2c41dc8873134c60d2928f806ce Author: Oded Gabbay Date: Thu Oct 24 10:12:35 2019 +0300 habanalabs: set ETR as non-secured ETR should always be non-secured as it is used by the users to record profiling/trace data. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit e1a84d56fcb92d4551692cbec4bada1cec00e620 Author: Oded Gabbay Date: Thu Oct 24 09:52:25 2019 +0300 habanalabs: use registers name defines for ETR block We have a single ETR block in the SOC, so use explicit register name defines for initializing this block. This makes it more readable and maintainable. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit f05912d8f16bf303e293d4add2caecb8a9231c41 Author: Oded Gabbay Date: Sun Oct 20 11:07:11 2019 +0300 habanalabs: read F/W versions before failure Move the read of the F/W boot versions before exiting on possible failures of the F/W boot. This will help debug boot failures as we will be able to know the F/W boot version. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit 91edbf2cf8f0416b854674e891d7a5274f4b1702 Author: Oded Gabbay Date: Wed Oct 16 11:53:52 2019 +0300 habanalabs: expose card name in INFO IOCTL To enable userspace processes, e.g. management utilities, to display the card name to the user, add the card name property to the HW_IP structure that is copied to the user in the INFO IOCTL. Signed-off-by: Oded Gabbay commit 8d6de52866dcf1d6cbdec9aa10f722dd43b2431f Author: YueHaibing Date: Wed Oct 16 16:46:32 2019 +0800 habanalabs: remove set but not used variable 'qman_base_addr' Fixes gcc '-Wunused-but-set-variable' warning: drivers/misc/habanalabs/goya/goya.c: In function 'goya_init_mme_cmdq': drivers/misc/habanalabs/goya/goya.c:1536:6: warning: variable 'qman_base_addr' set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 62c1e124a9e03ccb8bb39efe1d092c2376967528 Author: Oded Gabbay Date: Thu Oct 10 15:48:59 2019 +0300 habanalabs: add opcode to INFO IOCTL to return clock rate Add a new opcode to the INFO IOCTL to allow the user application to retrieve the ASIC's current and maximum clock rate. The rate is returned in MHz. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit 8fdacf2a530f36f6f0621a95ef0e37d8db2d2f89 Author: Oded Gabbay Date: Wed Oct 2 14:14:08 2019 +0300 habanalabs: set TPC Icache to 16 cache lines Reduce latency to memory during TPC kernel execution. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit cb596aee8842c87605ea1a9062af2ab435a742d4 Author: Tomer Tayar Date: Thu Oct 3 15:22:36 2019 +0000 habanalabs: Add a new H/W queue type This patch adds a support for a new H/W queue type. This type of queue is for DMA and compute engines jobs, for which completion notification are sent by H/W. Command buffer for this queue can be created either through the CB IOCTL and using the retrieved CB handle, or by preparing a buffer on the host or device SRAM/DRAM, and using the device address to that buffer. The patch includes the handling of the 2 options, as well as the initialization of the H/W queue and its jobs scheduling. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit df762375f17e1765bc3a0b345378e1726d85ca75 Author: Tomer Tayar Date: Thu Oct 3 15:22:35 2019 +0000 habanalabs: Mark queue as expecting CB handle or address Jobs on some queues must be provided with a handle to a driver command buffer object, while for other queues, jobs must be provided with an address to a command buffer. Currently the distinction is done based on the queue type, which is less flexible if the same queue type behaves differently on different types of ASICs. This patch adds a new queue property for this target, which is configured per queue type per ASIC type. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f435614ff55c6783919028cb914ffd7422e0b03b Author: Tomer Tayar Date: Wed Oct 2 13:53:52 2019 +0000 habanalabs: Fix typos s/paerser/parser/ s/requeusted/requested/ s/an JOB/a JOB/ Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1e295d4dd5b2e3d9dab68bfcab1f5666cde3804d Author: YueHaibing Date: Sat Sep 28 12:18:04 2019 +0800 habanalabs: remove set but not used variable 'ctx' Fixes gcc '-Wunused-but-set-variable' warning: drivers/misc/habanalabs/device.c: In function hpriv_release: drivers/misc/habanalabs/device.c:45:17: warning: variable ctx set but not used [-Wunused-but-set-variable] It is never used since commit eb7caf84b029 ("habanalabs: maintain a list of file private data objects") Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit abb7e16fb6dfc32d0c0e63787409fdb4c348915c Author: Oded Gabbay Date: Mon Sep 16 09:16:29 2019 +0300 habanalabs: handle F/W failure for sensor initialization In case the F/W fails to initialize the thermal sensors, print an appropriate error message to kernel log and fail the device initialization. Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 2e2fae99d1f308742b9b05dfd749e64b11960732 Author: Mark Salyzyn Date: Thu Nov 21 09:12:17 2019 +0000 afs: xattr: use scnprintf sprintf and snprintf are fragile in future maintenance, switch to using scnprintf to ensure no accidental Use After Free conditions are introduced. Signed-off-by: Mark Salyzyn Cc: linux-kernel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: David Howells Cc: linux-afs@lists.infradead.org Cc: Jan Kara Signed-off-by: David Howells commit d4438a25295d87d189e1925e0f7de2edcfe66582 Author: David Howells Date: Thu Nov 21 09:12:17 2019 +0000 afs: Introduce an afs_get_read() refcount helper Introduce an afs_get_read() helper to get a reference on an afs_read object. Signed-off-by: David Howells commit 0b9c0174d6b611356038e26d9434ad873f58e270 Author: David Howells Date: Thu Nov 21 09:12:17 2019 +0000 afs: Rename desc -> req in afs_fetch_data() Rename the desc parameter to req in afs_fetch_data() for consistency with other functions. Signed-off-by: David Howells commit fc276122496df13341c1429fbd430d02462815c8 Author: David Howells Date: Thu Nov 21 09:12:17 2019 +0000 afs: Switch the naming of call->iter and call->_iter Change the name of call->iter to call->def_iter to represent the default iterator. Change the name of call->_iter to call->iter to represent the iterator actually being used. Signed-off-by: David Howells commit 1b87b025b4cdae7851cbb0f1111543ffc49a0d48 Author: David Howells Date: Thu Nov 21 09:12:16 2019 +0000 afs: Use call->_iter not &call->iter in debugging statements Use call->_iter not &call->iter in debugging statements as the latter is a convenience iter whereas the former represents we're actually doing at the moment. Signed-off-by: David Howells commit b07a5c53d42a8c87b208614129e947dd2338ff9c Author: Paolo Bonzini Date: Mon Nov 18 12:23:01 2019 -0500 KVM: vmx: use MSR_IA32_TSX_CTRL to hard-disable TSX on guest that lack it If X86_FEATURE_RTM is disabled, the guest should not be able to access MSR_IA32_TSX_CTRL. We can therefore use it in KVM to force all transactions from the guest to abort. Tested-by: Jim Mattson Signed-off-by: Paolo Bonzini commit c11f83e0626bdc2b6c550fc8b9b6eeefbd8cefaa Author: Paolo Bonzini Date: Mon Nov 18 12:23:00 2019 -0500 KVM: vmx: implement MSR_IA32_TSX_CTRL disable RTM functionality The current guest mitigation of TAA is both too heavy and not really sufficient. It is too heavy because it will cause some affected CPUs (those that have MDS_NO but lack TAA_NO) to fall back to VERW and get the corresponding slowdown. It is not really sufficient because it will cause the MDS_NO bit to disappear upon microcode update, so that VMs started before the microcode update will not be runnable anymore afterwards, even with tsx=on. Instead, if tsx=on on the host, we can emulate MSR_IA32_TSX_CTRL for the guest and let it run without the VERW mitigation. Even though MSR_IA32_TSX_CTRL is quite heavyweight, and we do not want to write it on every vmentry, we can use the shared MSR functionality because the host kernel need not protect itself from TSX-based side-channels. Tested-by: Jim Mattson Signed-off-by: Paolo Bonzini commit edef5c36b0c7f07ab4926f6c9e50731f3772c79d Author: Paolo Bonzini Date: Mon Nov 18 12:23:00 2019 -0500 KVM: x86: implement MSR_IA32_TSX_CTRL effect on CPUID Because KVM always emulates CPUID, the CPUID clear bit (bit 1) of MSR_IA32_TSX_CTRL must be emulated "manually" by the hypervisor when performing said emulation. Right now neither kvm-intel.ko nor kvm-amd.ko implement MSR_IA32_TSX_CTRL but this will change in the next patch. Reviewed-by: Jim Mattson Tested-by: Jim Mattson Signed-off-by: Paolo Bonzini commit de1fca5d6e0105c9d33924e1247e2f386efc3ece Author: Paolo Bonzini Date: Mon Nov 18 12:23:00 2019 -0500 KVM: x86: do not modify masked bits of shared MSRs "Shared MSRs" are guest MSRs that are written to the host MSRs but keep their value until the next return to userspace. They support a mask, so that some bits keep the host value, but this mask is only used to skip an unnecessary MSR write and the value written to the MSR is always the guest MSR. Fix this and, while at it, do not update smsr->values[slot].curr if for whatever reason the wrmsr fails. This should only happen due to reserved bits, so the value written to smsr->values[slot].curr will not match when the user-return notifier and the host value will always be restored. However, it is untidy and in rare cases this can actually avoid spurious WRMSRs on return to userspace. Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Tested-by: Jim Mattson Signed-off-by: Paolo Bonzini commit cbbaa2727aa3ae9e0a844803da7cef7fd3b94f2b Author: Paolo Bonzini Date: Mon Nov 18 18:58:26 2019 +0100 KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES KVM does not implement MSR_IA32_TSX_CTRL, so it must not be presented to the guests. It is also confusing to have !ARCH_CAP_TSX_CTRL_MSR && !RTM && ARCH_CAP_TAA_NO: lack of MSR_IA32_TSX_CTRL suggests TSX was not hidden (it actually was), yet the value says that TSX is not vulnerable to microarchitectural data sampling. Fix both. Cc: stable@vger.kernel.org Tested-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 14edff88315add29099fd8eebb9ef989c2e47c18 Merge: 992edeaefed6 cd7056ae34af Author: Paolo Bonzini Date: Thu Nov 21 09:58:35 2019 +0100 Merge tag 'kvmarm-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm updates for Linux 5.5: - Allow non-ISV data aborts to be reported to userspace - Allow injection of data aborts from userspace - Expose stolen time to guests - GICv4 performance improvements - vgic ITS emulation fixes - Simplify FWB handling - Enable halt pool counters - Make the emulated timer PREEMPT_RT compliant Conflicts: include/uapi/linux/kvm.h commit b6378caf829e9e3b4d61c0901f4d6c1e6819716f Author: Krzysztof Wilczynski Date: Thu Sep 5 01:52:16 2019 +0200 nds32: Move static keyword to the front of declaration Move the static keyword to the front of declaration of cpu_pmu_of_device_ids, and resolve the following compiler warning that can be seen when building with warnings enabled (W=1): arch/nds32/kernel/perf_event_cpu.c:1122:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: Krzysztof Wilczynski Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 1b78375c3789cb89912e4a5a47070841211888af Author: Masanari Iida Date: Wed Aug 14 12:45:21 2019 +0900 nds32: Fix typo in Kconfig.cpu This patch fixes some spelling typo in Kconfig.cpu Signed-off-by: Masanari Iida Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 9e5183ee416d34b76a31fa086ba3f18218be02e4 Author: Masahiro Yamada Date: Fri Aug 9 02:30:28 2019 +0900 nds32: remove unneeded clean-files for DTB These patterns are cleaned-up by the top-level Makefile Signed-off-by: Masahiro Yamada Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 7d73170e1c282576419f8b50a771f1fcd2b81a94 Author: Jiangfeng Xiao Date: Wed Nov 20 23:18:53 2019 +0800 serial: serial_core: Perform NULL checks for break_ctl ops Doing fuzz test on sbsa uart device, causes a kernel crash due to NULL pointer dereference: ------------[ cut here ]------------ Unable to handle kernel paging request at virtual address fffffffffffffffc pgd = ffffffe331723000 [fffffffffffffffc] *pgd=0000002333595003, *pud=0000002333595003, *pmd=00000 Internal error: Oops: 96000005 [#1] PREEMPT SMP Modules linked in: ping(O) jffs2 rtos_snapshot(O) pramdisk(O) hisi_sfc(O) Drv_Nandc_K(O) Drv_SysCtl_K(O) Drv_SysClk_K(O) bsp_reg(O) hns3(O) hns3_uio_enet(O) hclgevf(O) hclge(O) hnae3(O) mdio_factory(O) mdio_registry(O) mdio_dev(O) mdio(O) hns3_info(O) rtos_kbox_panic(O) uart_suspend(O) rsm(O) stp llc tunnel4 xt_tcpudp ipt_REJECT nf_reject_ipv4 iptable_filter ip_tables x_tables sd_mod xhci_plat_hcd xhci_pci xhci_hcd usbmon usbhid usb_storage ohci_platform ohci_pci ohci_hcd hid_generic hid ehci_platform ehci_pci ehci_hcd vfat fat usbcore usb_common scsi_mod yaffs2multi(O) ext4 jbd2 ext2 mbcache ofpart i2c_dev i2c_core uio ubi nand nand_ecc nand_ids cfi_cmdset_0002 cfi_cmdset_0001 cfi_probe gen_probe cmdlinepart chipreg mtdblock mtd_blkdevs mtd nfsd auth_rpcgss oid_registry nfsv3 nfs nfs_acl lockd sunrpc grace autofs4 CPU: 2 PID: 2385 Comm: tty_fuzz_test Tainted: G O 4.4.193 #1 task: ffffffe32b23f110 task.stack: ffffffe32bda4000 PC is at uart_break_ctl+0x44/0x84 LR is at uart_break_ctl+0x34/0x84 pc : [] lr : [] pstate: 80000005 sp : ffffffe32bda7cc0 x29: ffffffe32bda7cc0 x28: ffffffe32b23f110 x27: ffffff8393402000 x26: 0000000000000000 x25: ffffffe32b233f40 x24: ffffffc07a8ec680 x23: 0000000000005425 x22: 00000000ffffffff x21: ffffffe33ed73c98 x20: 0000000000000000 x19: ffffffe33ed94168 x18: 0000000000000004 x17: 0000007f92ae9d30 x16: ffffff8392fa6064 x15: 0000000000000010 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000020 x10: 0000007ffdac1708 x9 : 0000000000000078 x8 : 000000000000001d x7 : 0000000052a64887 x6 : ffffffe32bda7e08 x5 : ffffffe32b23c000 x4 : 0000005fbc5b0000 x3 : ffffff83938d5018 x2 : 0000000000000080 x1 : ffffffe32b23c040 x0 : ffffff83934428f8 virtual start addr offset is 38ac00000 module base offset is 2cd4cf1000 linear region base offset is : 0 Process tty_fuzz_test (pid: 2385, stack limit = 0xffffffe32bda4000) Stack: (0xffffffe32bda7cc0 to 0xffffffe32bda8000) 7cc0: ffffffe32bda7cf0 ffffff8393177718 ffffffc07a8ec680 ffffff8393196054 7ce0: 000000001739f2e0 0000007ffdac1978 ffffffe32bda7d20 ffffff8393179a1c 7d00: 0000000000000000 ffffff8393c0a000 ffffffc07a8ec680 cb88537fdc8ba600 7d20: ffffffe32bda7df0 ffffff8392fa5a40 ffffff8393c0a000 0000000000005425 7d40: 0000007ffdac1978 ffffffe32b233f40 ffffff8393178dcc 0000000000000003 7d60: 000000000000011d 000000000000001d ffffffe32b23f110 000000000000029e 7d80: ffffffe34fe8d5d0 0000000000000000 ffffffe32bda7e14 cb88537fdc8ba600 7da0: ffffffe32bda7e30 ffffff8393042cfc ffffff8393c41720 ffffff8393c46410 7dc0: ffffff839304fa68 ffffffe32b233f40 0000000000005425 0000007ffdac1978 7de0: 000000000000011d cb88537fdc8ba600 ffffffe32bda7e70 ffffff8392fa60cc 7e00: 0000000000000000 ffffffe32b233f40 ffffffe32b233f40 0000000000000003 7e20: 0000000000005425 0000007ffdac1978 ffffffe32bda7e70 ffffff8392fa60b0 7e40: 0000000000000280 ffffffe32b233f40 ffffffe32b233f40 0000000000000003 7e60: 0000000000005425 cb88537fdc8ba600 0000000000000000 ffffff8392e02e78 7e80: 0000000000000280 0000005fbc5b0000 ffffffffffffffff 0000007f92ae9d3c 7ea0: 0000000060000000 0000000000000015 0000000000000003 0000000000005425 7ec0: 0000007ffdac1978 0000000000000000 00000000a54c910e 0000007f92b95014 7ee0: 0000007f92b95090 0000000052a64887 000000000000001d 0000000000000078 7f00: 0000007ffdac1708 0000000000000020 0000000000000000 0000000000000000 7f20: 0000000000000000 0000000000000010 000000556acf0090 0000007f92ae9d30 7f40: 0000000000000004 000000556acdef10 0000000000000000 000000556acdebd0 7f60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 7f80: 0000000000000000 0000000000000000 0000000000000000 0000007ffdac1840 7fa0: 000000556acdedcc 0000007ffdac1840 0000007f92ae9d3c 0000000060000000 7fc0: 0000000000000000 0000000000000000 0000000000000003 000000000000001d 7fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 Call trace: Exception stack(0xffffffe32bda7ab0 to 0xffffffe32bda7bf0) 7aa0: 0000000000001000 0000007fffffffff 7ac0: ffffffe32bda7cc0 ffffff8393196098 0000000080000005 0000000000000025 7ae0: ffffffe32b233f40 ffffff83930d777c ffffffe32bda7b30 ffffff83930d777c 7b00: ffffffe32bda7be0 ffffff83938d5000 ffffffe32bda7be0 ffffffe32bda7c20 7b20: ffffffe32bda7b60 ffffff83930d777c ffffffe32bda7c10 ffffff83938d5000 7b40: ffffffe32bda7c10 ffffffe32bda7c50 ffffff8393c0a000 ffffffe32b23f110 7b60: ffffffe32bda7b70 ffffff8392e09df4 ffffffe32bda7bb0 cb88537fdc8ba600 7b80: ffffff83934428f8 ffffffe32b23c040 0000000000000080 ffffff83938d5018 7ba0: 0000005fbc5b0000 ffffffe32b23c000 ffffffe32bda7e08 0000000052a64887 7bc0: 000000000000001d 0000000000000078 0000007ffdac1708 0000000000000020 7be0: 0000000000000000 0000000000000000 [] uart_break_ctl+0x44/0x84 [] send_break+0xa0/0x114 [] tty_ioctl+0xc50/0xe84 [] do_vfs_ioctl+0xc4/0x6e8 [] SyS_ioctl+0x68/0x9c [] __sys_trace_return+0x0/0x4 Code: b9410ea0 34000160 f9408aa0 f9402814 (b85fc280) ---[ end trace 8606094f1960c5e0 ]--- Kernel panic - not syncing: Fatal exception Fix this problem by adding NULL checks prior to calling break_ctl ops. Signed-off-by: Jiangfeng Xiao Cc: stable Link: https://lore.kernel.org/r/1574263133-28259-1-git-send-email-xiaojiangfeng@huawei.com Signed-off-by: Greg Kroah-Hartman commit 1199ab4c9e1d4cdfbabd70b4aadbc8e72c691f65 Author: Mohammad Rasim Date: Wed Nov 20 14:02:35 2019 +0300 Bluetooth: btbcm: Add entry for BCM4335A0 UART bluetooth This patch adds the device ID for the BCM4335A0 module (part of the AMPAK AP6335 WIFI/Bluetooth combo) hciconfig output: ``` hci1: Type: Primary Bus: UART BD Address: 43:35:B0:07:1F:AC ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING RX bytes:5079 acl:0 sco:0 events:567 errors:0 TX bytes:69065 acl:0 sco:0 commands:567 errors:0 Features: 0xbf 0xfe 0xcf 0xff 0xdf 0xff 0x7b 0x87 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH SNIFF Link mode: SLAVE ACCEPT Name: 'alarm' Class: 0x000000 Service Classes: Unspecified Device Class: Miscellaneous, HCI Version: 4.0 (0x6) Revision: 0x161 LMP Version: 4.0 (0x6) Subversion: 0x4106 Manufacturer: Broadcom Corporation (15) ``` Signed-off-by: Mohammad Rasim Signed-off-by: Marcel Holtmann commit e32ec8ea0d79fac75171980f2df5d0af87a08838 Author: Mohammad Rasim Date: Wed Nov 20 14:02:34 2019 +0300 dt-bindings: net: Add compatible for BCM4335A0 bluetooth Available in the Ampak AP6335 WiFi/Bluetooth combo Signed-off-by: Mohammad Rasim Signed-off-by: Marcel Holtmann commit 8392853e964c025b0616bd54c0cdf9cbc3c9a769 Author: Frederic Weisbecker Date: Thu Nov 21 03:44:30 2019 +0100 rackmeter: Use vtime aware kcpustat accessor Now that we have a vtime safe kcpustat accessor, use it to fetch CPUTIME_NICE and fix frozen kcpustat values on nohz_full CPUs. Reported-by: Yauheni Kaliuta Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Peter Zijlstra Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191121024430.19938-7-frederic@kernel.org Signed-off-by: Ingo Molnar commit 8688f2fb671b2ed59b1b16083136b6edc3750435 Author: Frederic Weisbecker Date: Thu Nov 21 03:44:29 2019 +0100 leds: Use all-in-one vtime aware kcpustat accessor We can now safely read user kcpustat fields on nohz_full CPUs. Use the appropriate accessor. [ mingo: Fixed build failure. ] Reported-by: Yauheni Kaliuta Signed-off-by: Frederic Weisbecker Cc: Jacek Anaszewski (maintainer:LED SUBSYSTEM) Cc: Pavel Machek (maintainer:LED SUBSYSTEM) Cc: Dan Murphy (reviewer:LED SUBSYSTEM) Cc: Peter Zijlstra Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191121024430.19938-6-frederic@kernel.org Signed-off-by: Ingo Molnar commit e2c05675979707b337b7af6319a9053bd286ed50 Author: Chuhong Yuan Date: Wed Jul 24 20:23:08 2019 +0800 pcmcia: Use dev_get_drvdata where possible Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan Signed-off-by: Dominik Brodowski commit 84182fc7c16f3e882977879c464fa14f2561bfad Author: Colin Ian King Date: Wed Oct 31 16:46:02 2018 +0000 pcmcia: clean an indentation issues, remove extraneous spaces Trivial fix to clean up indentation issues, remove spaces Signed-off-by: Colin Ian King Signed-off-by: Dominik Brodowski commit c4b75479741c9c3a4f0abff5baa5013d27640ac1 Author: Alexander Shishkin Date: Wed Nov 20 19:06:40 2019 +0200 perf/core: Make the mlock accounting simple again Commit: d44248a41337 ("perf/core: Rework memory accounting in perf_mmap()") does a lot of things to the mlock accounting arithmetics, while the only thing that actually needed to happen is subtracting the part that is charged to the mm from the part that is charged to the user, so that the former isn't charged twice. Signed-off-by: Alexander Shishkin Acked-by: Song Liu Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wanpeng Li Cc: Yauheni Kaliuta Cc: songliubraving@fb.com Link: https://lkml.kernel.org/r/20191120170640.54123-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar commit 5720821ba1d845f0b91a9278137e9005c5f6931d Author: Frederic Weisbecker Date: Thu Nov 21 03:44:28 2019 +0100 cpufreq: Use vtime aware kcpustat accessors for user time We can now safely read user and guest kcpustat fields on nohz_full CPUs. Use the appropriate accessors. Reported-by: Yauheni Kaliuta Signed-off-by: Frederic Weisbecker Cc: Rafael J. Wysocki Cc: Viresh Kumar Cc: Peter Zijlstra Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191121024430.19938-5-frederic@kernel.org Signed-off-by: Ingo Molnar commit 26dae145a76c3615588f263885904c6e567ff116 Author: Frederic Weisbecker Date: Thu Nov 21 03:44:27 2019 +0100 procfs: Use all-in-one vtime aware kcpustat accessor Now that we can read also user and guest time safely under vtime, use the relevant accessor to fix frozen kcpustat values on nohz_full CPUs. Reported-by: Yauheni Kaliuta Signed-off-by: Frederic Weisbecker Cc: Al Viro Cc: Peter Zijlstra Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191121024430.19938-4-frederic@kernel.org Signed-off-by: Ingo Molnar commit 74722bb223d0f236303b60c9509ff924a9713780 Author: Frederic Weisbecker Date: Thu Nov 21 03:44:26 2019 +0100 sched/vtime: Bring up complete kcpustat accessor Many callsites want to fetch the values of system, user, user_nice, guest or guest_nice kcpustat fields altogether or at least a pair of these. In that case calling kcpustat_field() for each requested field brings unecessary overhead when we could fetch all of them in a row. So provide kcpustat_cpu_fetch() that fetches the whole kcpustat array in a vtime safe way under the same RCU and seqcount block. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191121024430.19938-3-frederic@kernel.org Signed-off-by: Ingo Molnar commit 5a1c95580f1d89c8a736bb02ecd82a8858388b8a Author: Frederic Weisbecker Date: Thu Nov 21 03:44:25 2019 +0100 sched/cputime: Support other fields on kcpustat_field() Provide support for user, nice, guest and guest_nice fields through kcpustat_field(). Whether we account the delta to a nice or not nice field is decided on top of the nice value snapshot taken at the time we call kcpustat_field(). If the nice value of the task has been changed since the last vtime update, we may have inacurrate distribution of the nice VS unnice cputime. However this is considered as a minor issue compared to the proper fix that would involve interrupting the target on nice updates, which is undesired on nohz_full CPUs. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191121024430.19938-2-frederic@kernel.org Signed-off-by: Ingo Molnar commit f3c9a666b28572b1a0ae691a47d9a7de4d9cefb3 Author: Russell King Date: Wed Nov 20 12:29:59 2019 +0000 net: sfp: soft status and control support Add support for the soft status and control register, which allows TX_FAULT and RX_LOS to be monitored and TX_DISABLE to be set. We make use of this when the board does not support GPIOs for these signals. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9ce33351bd552f712b349f3c1b756c9bb0ea234f Merge: 9bb59a21f53e b0eae33b2583 Author: David S. Miller Date: Wed Nov 20 22:28:53 2019 -0800 Merge branch 'sfp-quirks' Russell King says: ==================== Add rudimentary SFP module quirk support The SFP module EEPROM describes the capabilities of the module, but doesn't describe the host interface. We have a certain amount of guess-work to work out how to configure the host - which works most of the time. However, there are some (such as GPON) modules which are able to support different host interfaces, such as 1000BASE-X and 2500BASE-X. The module will switch between each mode until it achieves link with the host. There is no defined way to describe this in the SFP EEPROM, so we can only recognise the module and handle it appropriately. This series adds the necessary recognition of the modules using a quirk system, and tweaks the support mask to allow them to link with the host at 2500BASE-X, thereby allowing the user to achieve full line rate. ==================== Signed-off-by: David S. Miller commit b0eae33b2583dceb36224619f9fd85e6140ae594 Author: Russell King Date: Wed Nov 20 11:42:47 2019 +0000 net: sfp: add some quirks for GPON modules Marc Micalizzi reports that Huawei MA5671A and Alcatel/Lucent G-010S-P modules are capable of 2500base-X, but incorrectly report their capabilities in the EEPROM. It seems rather common that GPON modules mis-report. Let's fix these modules by adding some quirks. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b34bb2cb5b62c7397c28fcc335e8047a687eada4 Author: Russell King Date: Wed Nov 20 11:42:42 2019 +0000 net: sfp: add support for module quirks Add support for applying module quirks to the list of supported ethtool link modes. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9bb59a21f53e7231696257d5e6283a4fbacfb43f Author: Hangbin Liu Date: Wed Nov 20 16:38:08 2019 +0800 tcp: warn if offset reach the maxlen limit when using snprintf snprintf returns the number of chars that would be written, not number of chars that were actually written. As such, 'offs' may get larger than 'tbl.maxlen', causing the 'tbl.maxlen - offs' being < 0, and since the parameter is size_t, it would overflow. Since using scnprintf may hide the limit error, while the buffer is still enough now, let's just add a WARN_ON_ONCE in case it reach the limit in future. v2: Use WARN_ON_ONCE as Jiri and Eric suggested. Suggested-by: Jiri Benc Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit c0d59da79534e85eb550d863e35eccc8c3fd8ceb Author: wenxu Date: Wed Nov 20 10:59:39 2019 +0800 ip_gre: Make none-tun-dst gre tunnel store tunnel info as metadat_dst in recv Currently collect_md gre tunnel will store the tunnel info(metadata_dst) to skb_dst. And now the non-tun-dst gre tunnel already can add tunnel header through lwtunnel. When received a arp_request on the non-tun-dst gre tunnel. The packet of arp response will send through the non-tun-dst tunnel without tunnel info which will lead the arp response packet to be dropped. If the non-tun-dst gre tunnel also store the tunnel info as metadata_dst, The arp response packet will set the releted tunnel info in the iptunnel_metadata_reply. The following is the test script: ip netns add cl ip l add dev vethc type veth peer name eth0 netns cl ifconfig vethc 172.168.0.7/24 up ip l add dev tun1000 type gretap key 1000 ip link add user1000 type vrf table 1 ip l set user1000 up ip l set dev tun1000 master user1000 ifconfig tun1000 10.0.1.1/24 up ip netns exec cl ifconfig eth0 172.168.0.17/24 up ip netns exec cl ip l add dev tun type gretap local 172.168.0.17 remote 172.168.0.7 key 1000 ip netns exec cl ifconfig tun 10.0.1.7/24 up ip r r 10.0.1.7 encap ip id 1000 dst 172.168.0.17 key dev tun1000 table 1 With this patch ip netns exec cl ping 10.0.1.1 can success Signed-off-by: wenxu Signed-off-by: David S. Miller commit 695d1ec3994f9de2cefae80ee2087c95d2e5a2f3 Author: Hui Wang Date: Thu Nov 21 10:54:27 2019 +0800 ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop The headset on this machine is not defined, after applying the quirk ALC256_FIXUP_ASUS_HEADSET_MIC, the headset-mic works well BugLink: https://bugs.launchpad.net/bugs/1846148 Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20191121025427.8856-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit d64ebdbfd4f71406f58210f5ccb16977b4cd31d2 Author: Hui Wang Date: Thu Nov 21 10:26:44 2019 +0800 ALSA: hda/realtek - Move some alc236 pintbls to fallback table We have a new Dell machine which needs to apply the quirk ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, try to use the fallback table to fix it this time. And we could remove all pintbls of alc236 for applying DELL1_MIC_NO_PRESENCE on Dell machines. Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20191121022644.8078-2-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit aed8c7f40882015aad45088256231babcbc24482 Author: Hui Wang Date: Thu Nov 21 10:26:43 2019 +0800 ALSA: hda/realtek - Move some alc256 pintbls to fallback table We have a new Dell machine which needs to apply the quirk ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, try to use the fallback table to fix it this time. And we could remove all pintbls of alc256 for applying DELL1_MIC_NO_PRESENCE on Dell machines. Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20191121022644.8078-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 30486e72093ea2e594f44876b7a445c219449bce Author: Greg Kurz Date: Wed Nov 13 17:46:19 2019 +0100 KVM: PPC: Book3S HV: XIVE: Fix potential page leak on error path We need to check the host page size is big enough to accomodate the EQ. Let's do this before taking a reference on the EQ page to avoid a potential leak if the check fails. Cc: stable@vger.kernel.org # v5.2 Fixes: 13ce3297c576 ("KVM: PPC: Book3S HV: XIVE: Add controls for the EQ configuration") Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Signed-off-by: Paul Mackerras commit 31a88c82b466d2f31a44e21c479f45b4732ccfd0 Author: Greg Kurz Date: Wed Nov 13 17:46:13 2019 +0100 KVM: PPC: Book3S HV: XIVE: Free previous EQ page when setting up a new one The EQ page is allocated by the guest and then passed to the hypervisor with the H_INT_SET_QUEUE_CONFIG hcall. A reference is taken on the page before handing it over to the HW. This reference is dropped either when the guest issues the H_INT_RESET hcall or when the KVM device is released. But, the guest can legitimately call H_INT_SET_QUEUE_CONFIG several times, either to reset the EQ (vCPU hot unplug) or to set a new EQ (guest reboot). In both cases the existing EQ page reference is leaked because we simply overwrite it in the XIVE queue structure without calling put_page(). This is especially visible when the guest memory is backed with huge pages: start a VM up to the guest userspace, either reboot it or unplug a vCPU, quit QEMU. The leak is observed by comparing the value of HugePages_Free in /proc/meminfo before and after the VM is run. Ideally we'd want the XIVE code to handle the EQ page de-allocation at the platform level. This isn't the case right now because the various XIVE drivers have different allocation needs. It could maybe worth introducing hooks for this purpose instead of exposing XIVE internals to the drivers, but this is certainly a huge work to be done later. In the meantime, for easier backport, fix both vCPU unplug and guest reboot leaks by introducing a wrapper around xive_native_configure_queue() that does the necessary cleanup. Reported-by: Satheesh Rajendran Cc: stable@vger.kernel.org # v5.2 Fixes: 13ce3297c576 ("KVM: PPC: Book3S HV: XIVE: Add controls for the EQ configuration") Signed-off-by: Cédric Le Goater Signed-off-by: Greg Kurz Tested-by: Lijun Pan Signed-off-by: Paul Mackerras commit bf9c95e23324cbaf2e58fc3f0cbdc73137f2d1ca Author: Michael Ellerman Date: Wed Nov 20 13:37:23 2019 +1100 selftests/powerpc: spectre_v2 test must be built 64-bit The spectre_v2 test must be built 64-bit, it includes hand-written asm that is 64-bit only, and segfaults if built 32-bit. Fixes: c790c3d2b0ec ("selftests/powerpc: Add a test of spectre_v2 mitigations") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191120023924.13130-1-mpe@ellerman.id.au commit 9d72dcef891030545f39ad386a30cf91df517fb2 Author: Oliver O'Halloran Date: Mon Nov 18 17:55:53 2019 +1100 powerpc/powernv: Disable native PCIe port management On PowerNV the PCIe topology is (currently) managed by the powernv platform code in Linux in cooperation with the platform firmware. Linux's native PCIe port service drivers operate independently of both and this can cause problems. The main issue is that the portbus driver will conflict with the platform specific hotplug driver (pnv_php) over ownership of the MSI used to notify the host when a hotplug event occurs. The portbus driver claims this MSI on behalf of the individual port services because the same interrupt is used for hotplug events, PMEs (on root ports), and link bandwidth change notifications. The portbus driver will always claim the interrupt even if the individual port service drivers, such as pciehp, are compiled out. The second, bigger, problem is that the hotplug port service driver fundamentally does not work on PowerNV. The platform assumes that all PCI devices have a corresponding arch-specific handle derived from the DT node for the device (pci_dn) and without one the platform will not allow a PCI device to be enabled. This problem is largely due to historical baggage, but it can't be resolved without significant re-factoring of the platform PCI support. We can fix these problems in the interim by setting the "pcie_ports_disabled" flag during platform initialisation. The flag indicates the platform owns the PCIe ports which stops the portbus driver from being registered. This does have the side effect of disabling all port services drivers that is: AER, PME, BW notifications, hotplug, and DPC. However, this is not a huge disadvantage on PowerNV since these services are either unused or handled through other means. Fixes: 66725152fb9f ("PCI/hotplug: PowerPC PowerNV PCI hotplug driver") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191118065553.30362-1-oohall@gmail.com commit 793b08e2efff3ec020c5c5861d00ed394fcdd488 Author: Christophe Leroy Date: Tue Oct 29 12:13:58 2019 +0000 powerpc/kexec: Move kexec files into a dedicated subdir. arch/powerpc/kernel/ contains 8 files dedicated to kexec. Move them into a dedicated subdirectory. Signed-off-by: Christophe Leroy [mpe: Move to a/p/kexec, drop the 'machine' naming and use 'core' instead] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/afbef97ec6a978574a5cf91a4441000e0a9da42a.1572351221.git.christophe.leroy@c-s.fr commit 9f7bd9201521b3ad11e96887550dd3e835ba01cb Author: Christophe Leroy Date: Tue Oct 29 12:13:57 2019 +0000 powerpc/32: Split kexec low level code out of misc_32.S Almost half of misc_32.S is dedicated to kexec. That's the relocation function for kexec. Drop it into a dedicated kexec_relocate_32.S Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e235973a1198195763afd3b6baffa548a83f4611.1572351221.git.christophe.leroy@c-s.fr commit 8795a739e5c72abeec51caf36b6df2b37e5720c5 Author: Christophe Leroy Date: Thu Oct 31 13:47:30 2019 +0000 powerpc/sysdev: drop simple gpio There is a config item CONFIG_SIMPLE_GPIO which provides simple memory mapped GPIOs specific to powerpc. However, the only platform which selects this option is mpc5200, and this platform doesn't use it. There are three boards calling simple_gpiochip_init(), but as they don't select CONFIG_SIMPLE_GPIO, this is just a nop. Simple_gpio is just redundant with the generic MMIO GPIO driver which can be found in driver/gpio/ and selected via CONFIG_GPIO_GENERIC_PLATFORM, so drop simple_gpio driver. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bf930402613b41b42d0441b784e0cc43fc18d1fb.1572529632.git.christophe.leroy@c-s.fr commit ee5a489fd9645104925e5cdf8f8e455d833730b9 Merge: e2193c933429 196e8ca74886 Author: David S. Miller Date: Wed Nov 20 18:11:23 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2019-11-20 The following pull-request contains BPF updates for your *net-next* tree. We've added 81 non-merge commits during the last 17 day(s) which contain a total of 120 files changed, 4958 insertions(+), 1081 deletions(-). There are 3 trivial conflicts, resolve it by always taking the chunk from 196e8ca74886c433: <<<<<<< HEAD ======= void *bpf_map_area_mmapable_alloc(u64 size, int numa_node); >>>>>>> 196e8ca74886c433dcfc64a809707074b936aaf5 <<<<<<< HEAD void *bpf_map_area_alloc(u64 size, int numa_node) ======= static void *__bpf_map_area_alloc(u64 size, int numa_node, bool mmapable) >>>>>>> 196e8ca74886c433dcfc64a809707074b936aaf5 <<<<<<< HEAD if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) { ======= /* kmalloc()'ed memory can't be mmap()'ed */ if (!mmapable && size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) { >>>>>>> 196e8ca74886c433dcfc64a809707074b936aaf5 The main changes are: 1) Addition of BPF trampoline which works as a bridge between kernel functions, BPF programs and other BPF programs along with two new use cases: i) fentry/fexit BPF programs for tracing with practically zero overhead to call into BPF (as opposed to k[ret]probes) and ii) attachment of the former to networking related programs to see input/output of networking programs (covering xdpdump use case), from Alexei Starovoitov. 2) BPF array map mmap support and use in libbpf for global data maps; also a big batch of libbpf improvements, among others, support for reading bitfields in a relocatable manner (via libbpf's CO-RE helper API), from Andrii Nakryiko. 3) Extend s390x JIT with usage of relative long jumps and loads in order to lift the current 64/512k size limits on JITed BPF programs there, from Ilya Leoshkevich. 4) Add BPF audit support and emit messages upon successful prog load and unload in order to have a timeline of events, from Daniel Borkmann and Jiri Olsa. 5) Extension to libbpf and xdpsock sample programs to demo the shared umem mode (XDP_SHARED_UMEM) as well as RX-only and TX-only sockets, from Magnus Karlsson. 6) Several follow-up bug fixes for libbpf's auto-pinning code and a new API call named bpf_get_link_xdp_info() for retrieving the full set of prog IDs attached to XDP, from Toke Høiland-Jørgensen. 7) Add BTF support for array of int, array of struct and multidimensional arrays and enable it for skb->cb[] access in kfree_skb test, from Martin KaFai Lau. 8) Fix AF_XDP by using the correct number of channels from ethtool, from Luigi Rizzo. 9) Two fixes for BPF selftest to get rid of a hang in test_tc_tunnel and to avoid xdping to be run as standalone, from Jiri Benc. 10) Various BPF selftest fixes when run with latest LLVM trunk, from Yonghong Song. 11) Fix a memory leak in BPF fentry test run data, from Colin Ian King. 12) Various smaller misc cleanups and improvements mostly all over BPF selftests and samples, from Daniel T. Lee, Andre Guedes, Anders Roxell, Mao Wenan, Yue Haibing. ==================== Signed-off-by: David S. Miller commit 17eee668b3cad423a47c090fe2275733c55db910 Merge: 30c185da7692 9786b65bc61a Author: Dave Airlie Date: Thu Nov 21 10:19:38 2019 +1000 Merge tag 'drm-misc-next-fixes-2019-11-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-next - Fix ttm bo refcnt when using the new gem obj mmap hook (Thomas) Cc: Gerd Hoffmann Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191120204946.GA120328@art_vandelay commit 7b8474466ed97be458c825f34a85f2c2b84c3f95 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Nov 21 00:03:03 2019 +0000 time: Zero the upper 32-bits in __kernel_timespec on 32-bit On compat interfaces, the high order bits of nanoseconds should be zeroed out. This is because the application code or the libc do not guarantee zeroing of these. If used without zeroing, kernel might be at risk of using timespec values incorrectly. Originally it was handled correctly, but lost during is_compat_syscall() cleanup. Revert the condition back to check CONFIG_64BIT. Fixes: 98f76206b335 ("compat: Cleanup in_compat_syscall() callers") Reported-by: Ben Hutchings Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191121000303.126523-1-dima@arista.com commit eb01fedc3d539f9443082aa2384c5d1ca26ed5c1 Author: Alexei Starovoitov Date: Wed Nov 20 18:32:25 2019 -0500 ftrace: Return ENOTSUPP when DYNAMIC_FTRACE_WITH_DIRECT_CALLS is not configured When CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS is not set it's best to have the stub functions return ENOTSUPP instead of ENODEV, otherwise ENODEV is a valid error when ip is incorrect which is indistinguishable from ftrace not compiled in. Link: http://lkml.kernel.org/r/CAADnVQ+OzTikM9EhrfsC7NFsVYhATW1SVHxK64w3xn9qpk81pg@mail.gmail.com Signed-off-by: Alexei Starovoitov Signed-off-by: Steven Rostedt (VMware) commit bae26849372b83c65da73d19ff58e987d70e6600 Author: Vidya Sagar Date: Wed Nov 20 10:47:42 2019 +0530 PCI/PM: Move pci_dev_wait() definition earlier Move the definition of pci_dev_wait() above pci_power_up() so that it can be called from the latter with no change in functionality. This is a pure code move with no functional change. Link: https://lore.kernel.org/r/20191120051743.23124-1-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas commit ad9001f2f41198784b0423646450ba2cb24793a3 Author: Mika Westerberg Date: Tue Nov 12 12:16:17 2019 +0300 PCI/PM: Add missing link delays required by the PCIe spec Currently Linux does not follow PCIe spec regarding the required delays after reset. A concrete example is a Thunderbolt add-in-card that consists of a PCIe switch and two PCIe endpoints: +-1b.0-[01-6b]----00.0-[02-6b]--+-00.0-[03]----00.0 TBT controller +-01.0-[04-36]-- DS hotplug port +-02.0-[37]----00.0 xHCI controller \-04.0-[38-6b]-- DS hotplug port The root port (1b.0) and the PCIe switch downstream ports are all PCIe Gen3 so they support 8GT/s link speeds. We wait for the PCIe hierarchy to enter D3cold (runtime): pcieport 0000:00:1b.0: power state changed by ACPI to D3cold When it wakes up from D3cold, according to the PCIe 5.0 section 5.8 the PCIe switch is put to reset and its power is re-applied. This means that we must follow the rules in PCIe 5.0 section 6.6.1. For the PCIe Gen3 ports we are dealing with here, the following applies: With a Downstream Port that supports Link speeds greater than 5.0 GT/s, software must wait a minimum of 100 ms after Link training completes before sending a Configuration Request to the device immediately below that Port. Software can determine when Link training completes by polling the Data Link Layer Link Active bit or by setting up an associated interrupt (see Section 6.7.3.3). Translating this into the above topology we would need to do this (DLLLA stands for Data Link Layer Link Active): 0000:00:1b.0: wait for 100 ms after DLLLA is set before access to 0000:01:00.0 0000:02:00.0: wait for 100 ms after DLLLA is set before access to 0000:03:00.0 0000:02:02.0: wait for 100 ms after DLLLA is set before access to 0000:37:00.0 I've instrumented the kernel with some additional logging so we can see the actual delays performed: pcieport 0000:00:1b.0: power state changed by ACPI to D0 pcieport 0000:00:1b.0: waiting for D3cold delay of 100 ms pcieport 0000:00:1b.0: waiting for D3hot delay of 10 ms pcieport 0000:02:01.0: waiting for D3hot delay of 10 ms pcieport 0000:02:04.0: waiting for D3hot delay of 10 ms For the switch upstream port (01:00.0 reachable through 00:1b.0 root port) we wait for 100 ms but not taking into account the DLLLA requirement. We then wait 10 ms for D3hot -> D0 transition of the root port and the two downstream hotplug ports. This means that we deviate from what the spec requires. Performing the same check for system sleep (s2idle) transitions it turns out to be even worse. None of the mandatory delays are performed. If this would be S3 instead of s2idle then according to PCI FW spec 3.2 section 4.6.8. there is a specific _DSM that allows the OS to skip the delays but this platform does not provide the _DSM and does not go to S3 anyway so no firmware is involved that could already handle these delays. On this particular platform these delays are not actually needed because there is an additional delay as part of the ACPI power resource that is used to turn on power to the hierarchy but since that additional delay is not required by any of standards (PCIe, ACPI) it is not present in the Intel Ice Lake, for example where missing the mandatory delays causes pciehp to start tearing down the stack too early (links are not yet trained). Below is an example how it looks like when this happens: pcieport 0000:83:04.0: pciehp: Slot(4): Card not present pcieport 0000:87:04.0: PME# disabled pcieport 0000:83:04.0: pciehp: pciehp_unconfigure_device: domain:bus:dev = 0000:86:00 pcieport 0000:86:00.0: Refused to change power state, currently in D3 pcieport 0000:86:00.0: restoring config space at offset 0x3c (was 0xffffffff, writing 0x201ff) pcieport 0000:86:00.0: restoring config space at offset 0x38 (was 0xffffffff, writing 0x0) ... There is also one reported case (see the bugzilla link below) where the missing delay causes xHCI on a Titan Ridge controller fail to runtime resume when USB-C dock is plugged. This does not involve pciehp but instead the PCI core fails to runtime resume the xHCI device: pcieport 0000:04:02.0: restoring config space at offset 0xc (was 0x10000, writing 0x10020) pcieport 0000:04:02.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100406) xhci_hcd 0000:39:00.0: Refused to change power state, currently in D3 xhci_hcd 0000:39:00.0: restoring config space at offset 0x3c (was 0xffffffff, writing 0x1ff) xhci_hcd 0000:39:00.0: restoring config space at offset 0x38 (was 0xffffffff, writing 0x0) ... Add a new function pci_bridge_wait_for_secondary_bus() that is called on PCI core resume and runtime resume paths accordingly if the bridge entered D3cold (and thus went through reset). This is second attempt to add the missing delays. The previous solution in c2bf1fc212f7 ("PCI: Add missing link delays required by the PCIe spec") was reverted because of two issues it caused: 1. One system become unresponsive after S3 resume due to PME service spinning in pcie_pme_work_fn(). The root port in question reports that the xHCI sent PME but the xHCI device itself does not have PME status set. The PME status bit is never cleared in the root port resulting the indefinite loop in pcie_pme_work_fn(). 2. Slows down resume if the root/downstream port does not support Data Link Layer Active Reporting because pcie_wait_for_link_delay() waits 1100 ms in that case. This version should avoid the above issues because we restrict the delay to happen only if the port went into D3cold. Link: https://lore.kernel.org/linux-pci/SL2P216MB01878BBCD75F21D882AEEA2880C60@SL2P216MB0187.KORP216.PROD.OUTLOOK.COM/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=203885 Link: https://lore.kernel.org/r/20191112091617.70282-3-mika.westerberg@linux.intel.com Reported-by: Kai-Heng Feng Tested-by: Kai-Heng Feng Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas commit 4827d63891b6a839dac49c6ab62e61c4b011c4f2 Author: Mika Westerberg Date: Tue Nov 12 12:16:16 2019 +0300 PCI/PM: Add pcie_wait_for_link_delay() Add pcie_wait_for_link_delay(). Similar to pcie_wait_for_link() but allows passing custom activation delay in milliseconds. Link: https://lore.kernel.org/r/20191112091617.70282-2-mika.westerberg@linux.intel.com Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 327ccbbcc1497bff6d6f543c1f37c43a1653671f Author: Bjorn Helgaas Date: Thu Aug 1 11:50:56 2019 -0500 PCI/PM: Return error when changing power state from D3cold pci_raw_set_power_state() uses the Power Management capability to change a device's power state. The capability is in config space, which is accessible in D0, D1, D2, and D3hot, but not in D3cold. If we call pci_raw_set_power_state() on a device that's in D3cold, config reads fail and return ~0 data, which we erroneously interpreted as "the device is in D3hot", leading to messages like this: pcieport 0000:03:00.0: Refused to change power state, currently in D3 The PCI_PM_CTRL has several RsvdP fields, so ~0 is never a valid register value. If we get that value, print a more informative message and return an error. Changing the power state of a device from D3cold must be done by a platform power management method or some other non-config space mechanism. Link: https://lore.kernel.org/r/20190822200551.129039-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Reviewed-by: Keith Busch Reviewed-by: Mika Westerberg commit e43f15ea2f6d6858675fa1baa5cb624f17269af0 Author: Bjorn Helgaas Date: Fri Aug 2 18:47:22 2019 -0500 PCI/PM: Decode D3cold power state correctly Use pci_power_name() to print pci_power_t correctly. This changes: "state 0" or "D0" to "D0" "state 1" or "D1" to "D1" "state 2" or "D2" to "D2" "state 3" or "D3" to "D3hot" "state 4" or "D4" to "D3cold" Changes dmesg logging only, no other functional change intended. Link: https://lore.kernel.org/r/20190822200551.129039-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Reviewed-by: Keith Busch Reviewed-by: Mika Westerberg commit 9c77e63bd8dcbb3b59294e9176c00c5fcab3c9c6 Author: Rafael J. Wysocki Date: Tue Nov 5 17:32:08 2019 +0100 PCI/PM: Fold __pci_complete_power_transition() into its caller Because pci_set_power_state() has become the only caller of __pci_complete_power_transition(), there is no need for the latter to be a separate function any more, so fold it into the former, drop a redundant check and reduce the number of lines of code somewhat. Code rearrangement, no intentional functional impact. Link: https://lore.kernel.org/r/15576968.k611qn3UU0@kreacher Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit d6aa37cd04fdafaf31ae89691e537535df43ca78 Author: Rafael J. Wysocki Date: Tue Nov 5 11:30:36 2019 +0100 PCI/PM: Avoid exporting __pci_complete_power_transition() Notice that radeon_set_suspend(), which is the only caller of __pci_complete_power_transition() outside of pci.c, really only cares about the pci_platform_power_transition() invoked by it, so export the latter instead of it, update the radeon driver to call pci_platform_power_transition() directly and make __pci_complete_power_transition() static. Code rearrangement, no intentional functional impact. Link: https://lore.kernel.org/r/1731661.ykamz2Tiuf@kreacher Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit dc2256b0735d03664a92a6cb94ea4e564dfa237b Author: Rafael J. Wysocki Date: Tue Nov 5 11:29:16 2019 +0100 PCI/PM: Fold __pci_start_power_transition() into its caller Because pci_power_up() has become the only caller of __pci_start_power_transition(), there is no need for the latter to be a separate function any more, so fold it into the former, drop a redundant check and reduce the number of lines of code somewhat. Code rearrangement, no intentional functional impact. Link: https://lore.kernel.org/r/3458080.lsoDbfkST9@kreacher Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit adfac8f6b7396b408fa9a8f40ea41112bebb980f Author: Rafael J. Wysocki Date: Tue Nov 5 11:27:49 2019 +0100 PCI/PM: Use pci_power_up() in pci_set_power_state() Make it explicitly clear that the code to put devices into D0 in pci_set_power_state() and in pci_pm_default_resume_early() is the same by making the latter use pci_power_up() for transitions into D0. Code rearrangement, no intentional functional impact. Link: https://lore.kernel.org/r/2520019.OZ1nXS5aSj@kreacher Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 81cfa5908fd6fe610b7c47b742fe30d6d897ba0f Author: Rafael J. Wysocki Date: Tue Nov 5 11:13:43 2019 +0100 PCI/PM: Move power state update away from pci_power_up() Move the invocation of pci_update_current_state() from pci_power_up() to pci_pm_default_resume_early(), which is the only caller of that function. Preparatory change, no functional impact. Link: https://lore.kernel.org/r/37482337.udjOGdOKNb@kreacher Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 1a1daf097e21e544dd3e7c0ff620d78a9795fbf2 Author: Bjorn Helgaas Date: Thu Oct 31 17:37:54 2019 -0500 PCI/PM: Remove unused pci_driver.suspend_late() hook The struct pci_driver.suspend_late() hook is one of the legacy PCI power management callbacks, and there are no remaining users of it. Remove it. Link: https://lore.kernel.org/r/20191101204558.210235-7-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 89cdbc3546354c359558a1809133902028c57da4 Author: Bjorn Helgaas Date: Thu Oct 31 17:53:04 2019 -0500 PCI/PM: Remove unused pci_driver.resume_early() hook The struct pci_driver.resume_early() hook is one of the legacy PCI power management callbacks, and there are no remaining users of it. Remove it. Link: https://lore.kernel.org/r/20191101204558.210235-6-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 77b84bb306fd0d5d1d3a4bf1f2acf73dc971e372 Author: Bjorn Helgaas Date: Fri Nov 1 08:20:40 2019 -0500 xen-platform: Convert to generic power management Convert xen-platform from the legacy PCI power management callbacks to the generic operations. This is one step towards removing support for the legacy PCI callbacks. The generic .resume_noirq() operation is called by pci_pm_resume_noirq() at the same point the legacy PCI .resume_early() callback was, so this patch should not change the xen-platform behavior. Link: https://lore.kernel.org/r/20191101204558.210235-5-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki Cc: Stefano Stabellini Cc: KarimAllah Ahmed commit baef7f8e5e91f85ce7625c11370479f9f0778fae Author: Bjorn Helgaas Date: Wed Oct 16 15:23:20 2019 -0500 PCI/PM: Simplify pci_set_power_state() Check for the PCI_DEV_FLAGS_NO_D3 quirk early, before calling __pci_start_power_transition(). This way all the cases where we don't need to do anything at all are checked up front. This doesn't fix anything because if the caller requested D3hot or D3cold, __pci_start_power_transition() is a no-op. But calling it is pointless and makes the code harder to analyze. Link: https://lore.kernel.org/r/20191101204558.210235-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 993cc6d1bd3af734693a74a3ccc9445dd5b31f9c Author: Bjorn Helgaas Date: Mon Oct 28 08:27:00 2019 -0500 PCI/PM: Expand PM reset messages to mention D3hot (not just D3) pci_pm_reset() resets a device by putting it in D3hot and bringing it back to D0. Clarify related messages to mention "D3hot" explicitly instead of just "D3". Link: https://lore.kernel.org/r/20191101204558.210235-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 7e24bc347e57992d532bc2ed700209b0fc0a4bf5 Author: Bjorn Helgaas Date: Wed Oct 23 17:40:52 2019 -0500 PCI/PM: Apply D2 delay as milliseconds, not microseconds PCI_PM_D2_DELAY is defined as 200, which is milliseconds, but previously we used udelay(), which only waited for 200 microseconds. Use msleep() instead so we wait the correct amount of time. See PCIe r5.0, sec 5.9. Link: https://lore.kernel.org/r/20191101204558.210235-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 12bcae44bf48595c71898330076576075590e15b Author: Bjorn Helgaas Date: Mon Oct 7 07:52:28 2019 -0500 PCI/PM: Use pci_WARN() to include device information Add and use pci_WARN() wrappers so warnings include device information. Link: https://lore.kernel.org/r/20191017212851.54237-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 6941a0c2bdedfb729fb166091e12d06e4fce177f Author: Bjorn Helgaas Date: Mon Oct 7 07:55:18 2019 -0500 PCI/PM: Use PCI dev_printk() wrappers for consistency Use the PCI dev_printk() wrappers for consistency with the rest of the PCI core. No functional change intended. Link: https://lore.kernel.org/r/20191017212851.54237-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit b64cf7a1711d7796fdac19a23bc63d378a6e7ed1 Author: Bjorn Helgaas Date: Tue Oct 8 15:25:23 2019 -0500 PCI/PM: Wrap long lines in documentation Documentation/power/pci.rst is wrapped to fit in 80 columns, but directory structure changes made a few lines longer. Wrap them so they all fit in 80 columns again. Link: https://lore.kernel.org/r/20191014230016.240912-7-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 85a9b0507db2fbbfe7912dc3b33d322f200e2ca7 Author: Bjorn Helgaas Date: Tue Oct 8 15:28:00 2019 -0500 PCI/PM: Note that PME can be generated from D0 Per PCIe r5.0 sec 7.5.2.1, PME may be generated from D0, so update Documentation/power/pci.rst to reflect that. Link: https://lore.kernel.org/r/20191016194450.68959-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 6da2f2ccfd2deb81a63fc23a505ccd72de005c39 Author: Bjorn Helgaas Date: Mon Oct 14 13:46:50 2019 -0500 PCI/PM: Make power management op coding style consistent Some of the power management ops use this style: struct device_driver *drv = dev->driver; if (drv && drv->pm && drv->pm->prepare(dev)) drv->pm->prepare(dev); while others use this: const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; if (pm && pm->runtime_resume) pm->runtime_resume(dev); Convert the first style to the second so they're all consistent. Remove local "error" variables when unnecessary. No functional change intended. Link: https://lore.kernel.org/r/20191014230016.240912-6-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit f7b32a86e455b035dd45a334c203abf6fe118cf3 Author: Bjorn Helgaas Date: Sat Oct 12 17:15:57 2019 -0500 PCI/PM: Run resume fixups before disabling wakeup events pci_pm_resume() and pci_pm_restore() call pci_pm_default_resume(), which runs resume fixups before disabling wakeup events: static void pci_pm_default_resume(struct pci_dev *pci_dev) { pci_fixup_device(pci_fixup_resume, pci_dev); pci_enable_wake(pci_dev, PCI_D0, false); } pci_pm_runtime_resume() does both of these, but in the opposite order: pci_enable_wake(pci_dev, PCI_D0, false); pci_fixup_device(pci_fixup_resume, pci_dev); We should always use the same ordering unless there's a reason to do otherwise. Change pci_pm_runtime_resume() to call pci_pm_default_resume() instead of open-coding this, so the fixups are always done before disabling wakeup events. pci_pm_default_resume() is called from pci_pm_runtime_resume(), which is under #ifdef CONFIG_PM. If SUSPEND and HIBERNATION are disabled, PM_SLEEP is disabled also, so move pci_pm_default_resume() from #ifdef CONFIG_PM_SLEEP to #ifdef CONFIG_PM. Link: https://lore.kernel.org/r/20191014230016.240912-5-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit ec6a75ef8e33fe33f963b916fd902c52a0be33ff Author: Bjorn Helgaas Date: Thu Oct 10 16:54:36 2019 -0500 PCI/PM: Clear PCIe PME Status even for legacy power management Previously, pci_pm_resume_noirq() cleared the PME Status bit in the Root Status register only if the device had no driver or the driver did not implement legacy power management. It should clear PME Status regardless of what sort of power management the driver supports, so do this before checking for legacy power management. This affects Root Ports and Root Complex Event Collectors, for which the usual driver is the PCIe portdrv, which implements new power management, so this change is just on principle, not to fix any actual defects. Fixes: a39bd851dccf ("PCI/PM: Clear PCIe PME Status bit in core, not PCIe port driver") Link: https://lore.kernel.org/r/20191014230016.240912-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit dc68b406783edf33af0e997fb98e9e048b4d46e8 Author: Bjorn Helgaas Date: Mon Oct 14 14:14:06 2019 -0500 PCI/PM: Correct pci_pm_thaw_noirq() documentation According to the documentation, pci_pm_thaw_noirq() did not put the device into the full-power state and restore its standard configuration registers. This is incorrect, so update the documentation to match the code. Link: https://lore.kernel.org/r/20191014230016.240912-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit f2c33ccacb2d4bbeae2a255a7ca0cbfd03017b7c Author: Dexuan Cui Date: Wed Aug 14 01:06:55 2019 +0000 PCI/PM: Always return devices to D0 when thawing pci_pm_thaw_noirq() is supposed to return the device to D0 and restore its configuration registers, but previously it only did that for devices whose drivers implemented the new power management ops. Hibernation, e.g., via "echo disk > /sys/power/state", involves freezing devices, creating a hibernation image, thawing devices, writing the image, and powering off. The fact that thawing did not return devices with legacy power management to D0 caused errors, e.g., in this path: pci_pm_thaw_noirq if (pci_has_legacy_pm_support(pci_dev)) # true for Mellanox VF driver return pci_legacy_resume_early(dev) # ... legacy PM skips the rest pci_set_power_state(pci_dev, PCI_D0) pci_restore_state(pci_dev) pci_pm_thaw if (pci_has_legacy_pm_support(pci_dev)) pci_legacy_resume drv->resume mlx4_resume ... pci_enable_msix_range ... if (dev->current_state != PCI_D0) # <--- return -EINVAL; which caused these warnings: mlx4_core a6d1:00:02.0: INTx is not supported in multi-function mode, aborting PM: dpm_run_callback(): pci_pm_thaw+0x0/0xd7 returns -95 PM: Device a6d1:00:02.0 failed to thaw: error -95 Return devices to D0 and restore config registers for all devices, not just those whose drivers support new power management. [bhelgaas: also call pci_restore_state() before pci_legacy_resume_early(), update comment, add stable tag, commit log] Link: https://lore.kernel.org/r/KU1P153MB016637CAEAD346F0AA8E3801BFAD0@KU1P153MB0166.APCP153.PROD.OUTLOOK.COM Signed-off-by: Dexuan Cui Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Cc: stable@vger.kernel.org # v4.13+ commit 30c185da7692b7aa65316b4644fd62f76a50a649 Merge: c22fe762ba91 0122baaa93cc Author: Dave Airlie Date: Thu Nov 21 09:17:02 2019 +1000 Merge tag 'drm-intel-next-fixes-2019-11-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Includes gvt-next-fixes-2019-11-12 - Fix Bugzilla #112051: Fix detection for a CMP-V PCH - Fix Bugzilla #112256: Corrupted page table at address on plymouth splash - Fix Bugzilla #111594: Avoid losing RC6 when HuC authentication is used - Fix for OA/perf metric coherency, restore GT coarse power gating workaround - Avoid atomic context on error capture - Avoid MST bitmask overflowing to EDP/DPI input select - Fixes to CI found dmesg splats Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191120204035.GA14908@jlahtine-desk.ger.corp.intel.com commit 40d47c155e8ae9bcb3f2d0d01cf14d903c664726 Author: Dmitry Monakhov Date: Fri Nov 1 13:11:10 2019 +0000 block,bfq: Skip tracing hooks if possible In most cases blk_tracing is not active, but bfq_log_bfqq macro generate pid_str unconditionally, which result in significant overhead. ## Test modprobe null_blk echo bfq > /sys/block/nullb0/queue/scheduler fio --name=t --ioengine=libaio --direct=1 --filename=/dev/nullb0 \ --runtime=30 --time_based=1 --rw=write --iodepth=128 --bs=4k # Results | | baseline | w/ patch | gain | | iops | 113.19K | 126.42K | +11% | Acked-by: Paolo Valente Signed-off-by: Dmitry Monakhov Signed-off-by: Jens Axboe commit c22fe762ba91380d3167b742bab4ff5e99ad84a2 Merge: 17cc51390c14 622b2a0ab647 Author: Dave Airlie Date: Thu Nov 21 08:52:26 2019 +1000 Merge tag 'drm-next-5.5-2019-11-15' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.5-2019-11-15: amdgpu: - Fix AVFS handling on SMU7 parts with custom power tables - Enable Overdrive sysfs interface for Navi parts - Fix power limit handling on smu11 parts - Fix pcie link sysfs output for Navi - Probably cancel MM worker threads on shutdown radeon: - Cleanup for ppc change Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191115163516.3714-1-alexander.deucher@amd.com commit e3cb0c7102f04c83bf1a7cb1d052e92749310b46 Author: Alexander Duyck Date: Wed Nov 20 14:25:53 2019 -0800 x86/ioperm: Fix use of deprecated config option The commit 111e7b15cf10 ("x86/ioperm: Extend IOPL config to control ioperm() as well") replaced X86_IOPL_EMULATION with X86_IOPL_IOPERM. However it appears that there was at least one spot missed as tss_update_io_bitmap() still had a reference to it contained in the code. The result of this is that it exposed a NULL pointer dereference as seen below with a linux-next next-20191120 kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 5 PID: 1542 Comm: ovs-vswitchd Tainted: G W 5.4.0-rc8-next-20191120 #125 RIP: 0010:tss_update_io_bitmap+0x4e/0x180 Code: 10 31 c0 65 48 03 1d 69 54 5d 6d 65 48 8b 04 25 40 8c 01 00 48 8b 10 \ f7 c2 00 00 40 00 0f 84 8c 00 00 00 4c 8b a0 c0 22 00 00 <49> 8b 04 \ 24 48 39 43 68 74 2e 8b 53 70 41 39 54 24 0c 48 8d 7b 78 RSP: 0018:ffffb8888a0ebf08 EFLAGS: 00010006 RAX: ffff8a429811a680 RBX: ffff8a4c3f946000 RCX: 0000000000000011 RDX: 0000000000400080 RSI: 0000000000400080 RDI: 0000000000000000 RBP: ffffb8888a0ebf30 R08: 00007ffffb5d7ce0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f68a9635c40(0000) GS:ffff8a4c3f940000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000103572a001 CR4: 00000000001606e0 Call Trace: ? syscall_slow_exit_work+0x39/0xdb do_syscall_64+0x1a5/0x200 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f68a7aff797 Fixes: 111e7b15cf10 ("x86/ioperm: Extend IOPL config to control ioperm() as well") Signed-off-by: Alexander Duyck Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Rik van Riel Cc: x86-ml Link: https://lkml.kernel.org/r/20191120222426.3060.18462.stgit@localhost.localdomain commit f612b2132db529feac4f965f28a1b9258ea7c22b Author: Mike Snitzer Date: Wed Nov 20 17:27:39 2019 -0500 Revert "dm crypt: use WQ_HIGHPRI for the IO and crypt workqueues" This reverts commit a1b89132dc4f61071bdeaab92ea958e0953380a1. Revert required hand-patching due to subsequent changes that were applied since commit a1b89132dc4f61071bdeaab92ea958e0953380a1. Requires: ed0302e83098d ("dm crypt: make workqueue names device-specific") Cc: stable@vger.kernel.org Bug: https://bugzilla.kernel.org/show_bug.cgi?id=199857 Reported-by: Vito Caputo Signed-off-by: Mike Snitzer commit 196e8ca74886c433dcfc64a809707074b936aaf5 Author: Daniel Borkmann Date: Wed Nov 20 23:04:44 2019 +0100 bpf: Switch bpf_map_{area_alloc,area_mmapable_alloc}() to u64 size Given we recently extended the original bpf_map_area_alloc() helper in commit fc9702273e2e ("bpf: Add mmap() support for BPF_MAP_TYPE_ARRAY"), we need to apply the same logic as in ff1c08e1f74b ("bpf: Change size to u64 for bpf_map_{area_alloc, charge_init}()"). To avoid conflicts, extend it for bpf-next. Reported-by: Stephen Rothwell Signed-off-by: Daniel Borkmann commit 91e6015b082b08a74e5d9d326f651e5890a93519 Author: Daniel Borkmann Date: Wed Nov 20 22:38:16 2019 +0100 bpf: Emit audit messages upon successful prog load and unload Allow for audit messages to be emitted upon BPF program load and unload for having a timeline of events. The load itself is in syscall context, so additional info about the process initiating the BPF prog creation can be logged and later directly correlated to the unload event. The only info really needed from BPF side is the globally unique prog ID where then audit user space tooling can query / dump all info needed about the specific BPF program right upon load event and enrich the record, thus these changes needed here can be kept small and non-intrusive to the core. Raw example output: # auditctl -D # auditctl -a always,exit -F arch=x86_64 -S bpf # ausearch --start recent -m 1334 [...] ---- time->Wed Nov 20 12:45:51 2019 type=PROCTITLE msg=audit(1574271951.590:8974): proctitle="./test_verifier" type=SYSCALL msg=audit(1574271951.590:8974): arch=c000003e syscall=321 success=yes exit=14 a0=5 a1=7ffe2d923e80 a2=78 a3=0 items=0 ppid=742 pid=949 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="test_verifier" exe="/root/bpf-next/tools/testing/selftests/bpf/test_verifier" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) type=UNKNOWN[1334] msg=audit(1574271951.590:8974): auid=0 uid=0 gid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=949 comm="test_verifier" exe="/root/bpf-next/tools/testing/selftests/bpf/test_verifier" prog-id=3260 event=LOAD ---- time->Wed Nov 20 12:45:51 2019 type=UNKNOWN[1334] msg=audit(1574271951.590:8975): prog-id=3260 event=UNLOAD ---- [...] Signed-off-by: Daniel Borkmann Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191120213816.8186-1-jolsa@kernel.org commit 9d09e5a95c54d2b0cbb4ae00929edbcadc847c7f Author: Bjorn Helgaas Date: Tue Oct 15 17:11:22 2019 -0500 PCI: Fix typos Fix typos in drivers/pci. Comment and whitespace changes only. Signed-off-by: Bjorn Helgaas commit e2193c9334291ecdc437cdbd9fe9ac35c14fffa8 Merge: e2ffe3ff6f5e df0120f12f93 Author: David S. Miller Date: Wed Nov 20 12:50:25 2019 -0800 Merge branch 'r8169-smaller-improvements-to-firmware-handling' Heiner Kallweit says: ==================== r8169: smaller improvements to firmware handling This series includes few smaller improvements to firmware handling. ==================== Signed-off-by: David S. Miller commit df0120f12f93f2e11eb67d00ed8270de92d0134d Author: Heiner Kallweit Date: Wed Nov 20 21:08:47 2019 +0100 r8169: add check for PHY_MDIO_CHG to rtl_nic_fw_data_ok Only values 0 and 1 are currently defined as parameters for PHY_MDIO_CHG. Instead of silently ignoring unknown values and misinterpreting the firmware code let's explicitly check. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit cfccde80e8b1d935e611d40c0f0bba3ed0557bd8 Author: Heiner Kallweit Date: Wed Nov 20 21:07:41 2019 +0100 r8169: use macro FIELD_SIZEOF in definition of FW_OPCODE_SIZE Using macro FIELD_SIZEOF makes this define easier understandable. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit e20c43dbdf960e8a03381aa455ddea56504bdbc4 Author: Heiner Kallweit Date: Wed Nov 20 21:06:58 2019 +0100 r8169: change mdelay to msleep in rtl_fw_write_firmware We're not in atomic context here, therefore switch to msleep. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit e2ffe3ff6f5e18325c7a5500acd102a67fac078f Author: Thomas Bogendoerfer Date: Wed Nov 20 17:02:36 2019 +0100 net: ipconfig: Wait for deferred device probes If network device drives are using deferred probing, it was possible that waiting for devices to show up in ipconfig was already over, when the device eventually showed up. By calling wait_for_device_probe() we now make sure deferred probing is done before checking for available devices. Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 2be8ca97d07e1133e81cd3977bd1f94058b65489 Author: Mao Wenan Date: Wed Nov 20 16:56:34 2019 +0100 vsock/vmci: make vmci_vsock_cb_host_called static When using make C=2 drivers/misc/vmw_vmci/vmci_driver.o to compile, below warning can be seen: drivers/misc/vmw_vmci/vmci_driver.c:33:6: warning: symbol 'vmci_vsock_cb_host_called' was not declared. Should it be static? This patch make symbol vmci_vsock_cb_host_called static. Fixes: b1bba80a4376 ("vsock/vmci: register vmci_transport only when VMCI guest/host are active") Reported-by: Hulk Robot Signed-off-by: Mao Wenan Reported-by: kbuild test robot Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit e07e75412ba4a8e68f47de345da53847f343f337 Merge: cec2975f2b70 07e13edbb6a6 Author: David S. Miller Date: Wed Nov 20 12:34:37 2019 -0800 Merge branch 'page_pool-DMA-sync' Lorenzo Bianconi says: ==================== add DMA-sync-for-device capability to page_pool API Introduce the possibility to sync DMA memory for device in the page_pool API. This feature allows to sync proper DMA size and not always full buffer (dma_sync_single_for_device can be very costly). Please note DMA-sync-for-CPU is still device driver responsibility. Relying on page_pool DMA sync mvneta driver improves XDP_DROP pps of about 170Kpps: - XDP_DROP DMA sync managed by mvneta driver: ~420Kpps - XDP_DROP DMA sync managed by page_pool API: ~585Kpps Do not change naming convention for the moment since the changes will hit other drivers as well. I will address it in another series. Changes since v4: - do not allow the driver to set max_len to 0 - convert PP_FLAG_DMA_MAP/PP_FLAG_DMA_SYNC_DEV to BIT() macro Changes since v3: - move dma_sync_for_device before putting the page in ptr_ring in __page_pool_recycle_into_ring since ptr_ring can be consumed concurrently. Simplify the code moving dma_sync_for_device before running __page_pool_recycle_direct/__page_pool_recycle_into_ring Changes since v2: - rely on PP_FLAG_DMA_SYNC_DEV flag instead of dma_sync Changes since v1: - rename sync in dma_sync - set dma_sync_size to 0xFFFFFFFF in page_pool_recycle_direct and page_pool_put_page routines - Improve documentation ==================== Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 07e13edbb6a6a9a407d6772a355836270e924aa8 Author: Lorenzo Bianconi Date: Wed Nov 20 16:54:19 2019 +0200 net: mvneta: get rid of huge dma sync in mvneta_rx_refill Get rid of costly dma_sync_single_for_device in mvneta_rx_refill since now the driver can let page_pool API to manage needed DMA sync with a proper size. - XDP_DROP DMA sync managed by mvneta driver: ~420Kpps - XDP_DROP DMA sync managed by page_pool API: ~585Kpps Tested-by: Matteo Croce Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit e68bc75691cc3de608c2c7505057c948d13ae587 Author: Lorenzo Bianconi Date: Wed Nov 20 16:54:18 2019 +0200 net: page_pool: add the possibility to sync DMA memory for device Introduce the following parameters in order to add the possibility to sync DMA memory for device before putting allocated pages in the page_pool caches: - PP_FLAG_DMA_SYNC_DEV: if set in page_pool_params flags, all pages that the driver gets from page_pool will be DMA-synced-for-device according to the length provided by the device driver. Please note DMA-sync-for-CPU is still device driver responsibility - offset: DMA address offset where the DMA engine starts copying rx data - max_len: maximum DMA memory size page_pool is allowed to flush. This is currently used in __page_pool_alloc_pages_slow routine when pages are allocated from page allocator These parameters are supposed to be set by device drivers. This optimization reduces the length of the DMA-sync-for-device. The optimization is valid because pages are initially DMA-synced-for-device as defined via max_len. At RX time, the driver will perform a DMA-sync-for-CPU on the memory for the packet length. What is important is the memory occupied by packet payload, because this is the area CPU is allowed to read and modify. As we don't track cache-lines written into by the CPU, simply use the packet payload length as dma_sync_size at page_pool recycle time. This also take into account any tail-extend. Tested-by: Matteo Croce Signed-off-by: Lorenzo Bianconi Signed-off-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller commit f383b2950070ce4f34e74db94f70bb565b746e97 Author: Lorenzo Bianconi Date: Wed Nov 20 16:54:17 2019 +0200 net: mvneta: rely on page_pool_recycle_direct in mvneta_run_xdp Rely on page_pool_recycle_direct and not on xdp_return_buff in mvneta_run_xdp. This is a preliminary patch to limit the dma sync len to the one strictly necessary Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit cec2975f2b7058c42330a0f8164d94c6b7c8c446 Author: Gautam Ramakrishnan Date: Wed Nov 20 19:43:54 2019 +0530 net: sched: pie: enable timestamp based delay calculation RFC 8033 suggests an alternative approach to calculate the queue delay in PIE by using a timestamp on every enqueued packet. This patch adds an implementation of that approach and sets it as the default method to calculate queue delay. The previous method (based on Little's law) to calculate queue delay is set as optional. Signed-off-by: Gautam Ramakrishnan Signed-off-by: Leslie Monis Signed-off-by: Mohit P. Tahiliani Acked-by: Dave Taht Signed-off-by: David S. Miller commit c131280c03bd1c225c2e64e9ef75873ffca3d96e Author: Stephan Gerhold Date: Mon Nov 18 14:02:52 2019 +0100 drm/mcde: dsi: Fix invalid pointer dereference if panel cannot be found The "panel" pointer is not reset to NULL if of_drm_find_panel() returns an error. Therefore we later assume that a panel was found, and try to dereference the error pointer, resulting in: mcde-dsi a0351000.dsi: failed to find panel try bridge (4294966779) Unable to handle kernel paging request at virtual address fffffe03 PC is at drm_panel_bridge_add.part.0+0x10/0x5c LR is at mcde_dsi_bind+0x120/0x464 ... Reset "panel" to NULL to avoid this problem. Also change the format string of the error to %ld to print the negative errors correctly. The crash above then becomes: mcde-dsi a0351000.dsi: failed to find panel try bridge (-517) mcde-dsi a0351000.dsi: no panel or bridge ... Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE") Signed-off-by: Stephan Gerhold Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20191118130252.170324-1-stephan@gerhold.net commit f01b437d1297f14a366c02427f7c07260ec1345b Author: Krzysztof Kozlowski Date: Wed Nov 20 21:41:20 2019 +0800 isdn: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 041ccdb620f0ec0590bb6899c2a8088d60cf14b8 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:40:44 2019 +0800 nfc: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 07def463829cc8f3def7ecbe45cb409992d3d33c Merge: 77c05d2f7306 21c4c60b7696 Author: David S. Miller Date: Wed Nov 20 12:05:24 2019 -0800 Merge branch 'cxgb4-add-TC-MATCHALL-classifier-offload' Rahul Lakkireddy says: ==================== cxgb4: add TC-MATCHALL classifier offload This series of patches add support to offload TC-MATCHALL classifier to hardware to classify all outgoing and incoming traffic on the underlying port. Only 1 egress and 1 ingress rule each can be offloaded on the underlying port. Patch 1 adds support for TC-MATCHALL classifier offload on the egress side. TC-POLICE is the only action that can be offloaded on the egress side and is used to rate limit all outgoing traffic to specified max rate. Patch 2 adds logic to reject the current rule offload if its priority conflicts with existing rules in the TCAM. Patch 3 adds support for TC-MATCHALL classifier offload on the ingress side. The same set of actions supported by existing TC-FLOWER classifier offload can be applied on all the incoming traffic. v5: - Fixed commit message and comment to include comparison for equal priority in patch 2. v4: - Removed check in patch 1 to reject police offload if prio is not 1. - Moved TC_SETUP_BLOCK code to separate function in patch 1. - Added logic to ensure the prio passed by TC doesn't conflict with other rules in TCAM in patch 2. - Higher index has lower priority than lower index in TCAM. So, rework cxgb4_get_free_ftid() to search free index from end of TCAM in descending order in patch 2. - Added check to ensure the matchall rule's prio doesn't conflict with other rules in TCAM in patch 3. - Added logic to fill default mask for VIID, if none has been provided, to prevent conflict with duplicate VIID rules in patch 3. - Used existing variables in private structure to fill VIID info, instead of extracting the info manually in patch 3. v3: - Added check in patch 1 to reject police offload if prio is not 1. - Assign block_shared variable only for TC_SETUP_BLOCK in patch 1. v2: - Added check to reject flow block sharing for policers in patch 1. - Removed logic to fetch free index from end of TCAM in patch 2. Must maintain the same ordering as in kernel. ==================== Signed-off-by: David S. Miller commit 21c4c60b7696346c48ed11478f4bffec6d1b2dcb Author: Rahul Lakkireddy Date: Wed Nov 20 05:46:08 2019 +0530 cxgb4: add TC-MATCHALL classifier ingress offload Add TC-MATCHALL classifier ingress offload support. The same actions supported by existing TC-FLOWER offload can be applied to all incoming traffic on the underlying interface. Ensure the rule priority doesn't conflict with existing rules in the TCAM. Only 1 ingress matchall rule can be active at a time on the underlying interface. v5: - No change. v4: - Added check to ensure the matchall rule's prio doesn't conflict with other rules in TCAM. - Added logic to fill default mask for VIID, if none has been provided, to prevent conflict with duplicate VIID rules. - Used existing variables in private structure to fill VIID info, instead of extracting the info manually. v3: - No change. v2: - Removed logic to fetch free index from end of TCAM. Must maintain same ordering as in kernel. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 41ec03e534ca450939edae01d9f2037a6262e6de Author: Rahul Lakkireddy Date: Wed Nov 20 05:46:07 2019 +0530 cxgb4: check rule prio conflicts before offload Only offload rule if it satisfies both of the following conditions: 1. The immediate previous rule has priority <= current rule's priority. 2. The immediate next rule has priority >= current rule's priority. Also rework free entry fetch logic to search from end of TCAM, instead of beginning, because higher indices have lower priority than lower indices. This is similar to how TC auto generates priority values. v5: - Fixed commit message and comment to include comparison for equal priority. v4: - Patch added in this version. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 4ec4762d8ec6edcfe59fd806472d2b7518debe52 Author: Rahul Lakkireddy Date: Wed Nov 20 05:46:06 2019 +0530 cxgb4: add TC-MATCHALL classifier egress offload Add TC-MATCHALL classifier offload with TC-POLICE action applied for all outgoing traffic on the underlying interface. Split flow block offload to support both egress and ingress classification. For example, to rate limit all outgoing traffic to 1 Gbps: $ tc qdisc add dev enp2s0f4 clsact $ tc filter add dev enp2s0f4 egress matchall skip_sw \ action police rate 1Gbit burst 8Kbit Note that skip_sw is important. Otherwise, both stack and hardware will end up doing policing. Policing can't be shared across flow blocks. Only 1 egress matchall rule can be active at a time on the underlying interface. v5: - No change. v4: - Removed check to reject police offload if prio is not 1. - Moved TC_SETUP_BLOCK code to separate function. v3: - Added check to reject police offload if prio is not 1. - Assign block_shared variable only for TC_SETUP_BLOCK. v2: - Added check to reject flow block sharing for policers. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 093edc2baad2c258b1f55d1ab9c63c2b5ae67e42 Author: Wei Yongjun Date: Wed Oct 30 03:40:46 2019 +0000 usb: gadget: configfs: Fix missing spin_lock_init() The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Fixes: 1a1c851bbd70 ("usb: gadget: configfs: fix concurrent issue between composite APIs") Signed-off-by: Wei Yongjun Cc: stable Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20191030034046.188808-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 77c05d2f73066e205f786c407964b97d11abb7f4 Merge: 1f12177b322d 6849c6d86bad Author: David S. Miller Date: Wed Nov 20 11:47:36 2019 -0800 Merge branch 'page_pool-API-for-numa-node-change-handling' Saeed Mahameed says: ==================== page_pool: API for numa node change handling This series extends page pool API to allow page pool consumers to update page pool numa node on the fly. This is required since on some systems, rx rings irqs can migrate between numa nodes, due to irq balancer or user defined scripts, current page pool has no way to know of such migration and will keep allocating and holding on to pages from a wrong numa node, which is bad for the consumer performance. 1) Add API to update numa node id of the page pool Consumers will call this API to update the page pool numa node id. 2) Don't recycle non-reusable pages: Page pool will check upon page return whether a page is suitable for recycling or not. 2.1) when it belongs to a different num node. 2.2) when it was allocated under memory pressure. 3) mlx5 will use the new API to update page pool numa id on demand. The series is a joint work between me and Jonathan, we tested it and it proved itself worthy to avoid page allocator bottlenecks and improve packet rate and cpu utilization significantly for the described scenarios above. Performance testing: XDP drop/tx rate and TCP single/multi stream, on mlx5 driver while migrating rx ring irq from close to far numa: mlx5 internal page cache was locally disabled to get pure page pool results. CPU: Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz NIC: Mellanox Technologies MT27700 Family [ConnectX-4] (100G) XDP Drop/TX single core: NUMA | XDP | Before | After --------------------------------------- Close | Drop | 11 Mpps | 10.9 Mpps Far | Drop | 4.4 Mpps | 5.8 Mpps Close | TX | 6.5 Mpps | 6.5 Mpps Far | TX | 3.5 Mpps | 4 Mpps Improvement is about 30% drop packet rate, 15% tx packet rate for numa far test. No degradation for numa close tests. TCP single/multi cpu/stream: NUMA | #cpu | Before | After -------------------------------------- Close | 1 | 18 Gbps | 18 Gbps Far | 1 | 15 Gbps | 18 Gbps Close | 12 | 80 Gbps | 80 Gbps Far | 12 | 68 Gbps | 80 Gbps In all test cases we see improvement for the far numa case, and no impact on the close numa case. ================== Performance analysis and conclusions by Jesper [1]: Impact on XDP drop x86_64 is inconclusive and shows only 0.3459ns slow-down, as this is below measurement accuracy of system. v2->v3: - Rebase on top of latest net-next and Jesper's page pool object release patchset [2] - No code changes - Performance analysis by Jesper added to the cover letter. v1->v2: - Drop last patch, as requested by Ilias and Jesper. - Fix documentation's performance numbers order. [1] https://github.com/xdp-project/xdp-project/blob/master/areas/mem/page_pool04_inflight_changes.org#performance-notes [2] https://patchwork.ozlabs.org/cover/1192098/ ==================== Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 6849c6d86bada8bd269fe0ee0c4a93892ccaf2c3 Author: Saeed Mahameed Date: Wed Nov 20 00:15:21 2019 +0000 net/mlx5e: Rx, Update page pool numa node when changed Once every napi poll cycle, check if numa node is different than the page pool's numa id, and update it using page_pool_update_nid(). Alternatively, we could have registered an irq affinity change handler, but page_pool_update_nid() must be called from napi context anyways, so the handler won't actually help. Performance testing: XDP drop/tx rate and TCP single/multi stream, on mlx5 driver while migrating rx ring irq from close to far numa: mlx5 internal page cache was locally disabled to get pure page pool results. CPU: Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz NIC: Mellanox Technologies MT27700 Family [ConnectX-4] (100G) XDP Drop/TX single core: NUMA | XDP | Before | After --------------------------------------- Close | Drop | 11 Mpps | 10.9 Mpps Far | Drop | 4.4 Mpps | 5.8 Mpps Close | TX | 6.5 Mpps | 6.5 Mpps Far | TX | 3.5 Mpps | 4 Mpps Improvement is about 30% drop packet rate, 15% tx packet rate for numa far test. No degradation for numa close tests. TCP single/multi cpu/stream: NUMA | #cpu | Before | After -------------------------------------- Close | 1 | 18 Gbps | 18 Gbps Far | 1 | 15 Gbps | 18 Gbps Close | 12 | 80 Gbps | 80 Gbps Far | 12 | 68 Gbps | 80 Gbps In all test cases we see improvement for the far numa case, and no impact on the close numa case. Signed-off-by: Saeed Mahameed Acked-by: Jonathan Lemon Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit d5394610b1ba06373b3543b5177a4c91052f9f62 Author: Saeed Mahameed Date: Wed Nov 20 00:15:19 2019 +0000 page_pool: Don't recycle non-reusable pages A page is NOT reusable when at least one of the following is true: 1) allocated when system was under some pressure. (page_is_pfmemalloc) 2) belongs to a different NUMA node than pool->p.nid. To update pool->p.nid users should call page_pool_update_nid(). Holding on to such pages in the pool will hurt the consumer performance when the pool migrates to a different numa node. Performance testing: XDP drop/tx rate and TCP single/multi stream, on mlx5 driver while migrating rx ring irq from close to far numa: mlx5 internal page cache was locally disabled to get pure page pool results. CPU: Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz NIC: Mellanox Technologies MT27700 Family [ConnectX-4] (100G) XDP Drop/TX single core: NUMA | XDP | Before | After --------------------------------------- Close | Drop | 11 Mpps | 10.9 Mpps Far | Drop | 4.4 Mpps | 5.8 Mpps Close | TX | 6.5 Mpps | 6.5 Mpps Far | TX | 3.5 Mpps | 4 Mpps Improvement is about 30% drop packet rate, 15% tx packet rate for numa far test. No degradation for numa close tests. TCP single/multi cpu/stream: NUMA | #cpu | Before | After -------------------------------------- Close | 1 | 18 Gbps | 18 Gbps Far | 1 | 15 Gbps | 18 Gbps Close | 12 | 80 Gbps | 80 Gbps Far | 12 | 68 Gbps | 80 Gbps In all test cases we see improvement for the far numa case, and no impact on the close numa case. The impact of adding a check per page is very negligible, and shows no performance degradation whatsoever, also functionality wise it seems more correct and more robust for page pool to verify when pages should be recycled, since page pool can't guarantee where pages are coming from. Signed-off-by: Saeed Mahameed Acked-by: Jonathan Lemon Reviewed-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit bc836748707cf6b8b1a948b61149278f109107da Author: Saeed Mahameed Date: Wed Nov 20 00:15:17 2019 +0000 page_pool: Add API to update numa node Add page_pool_update_nid() to be called by page pool consumers when they detect numa node changes. It will update the page pool nid value to start allocating from the new effective numa node. This is to mitigate page pool allocating pages from a wrong numa node, where the pool was originally allocated, and holding on to pages that belong to a different numa node, which causes performance degradation. For pages that are already being consumed and could be returned to the pool by the consumer, in next patch we will add a check per page to avoid recycling them back to the pool and return them to the page allocator. Signed-off-by: Saeed Mahameed Acked-by: Jonathan Lemon Reviewed-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 68a33b1794665ba8a1d1ef1d3bfcc7c587d380a6 Author: Christoph Hellwig Date: Tue Nov 19 17:38:58 2019 +0100 dma-direct: exclude dma_direct_map_resource from the min_low_pfn check The valid memory address check in dma_capable only makes sense when mapping normal memory, not when using dma_map_resource to map a device resource. Add a new boolean argument to dma_capable to exclude that check for the dma_map_resource case. Fixes: b12d66278dd6 ("dma-direct: check for overflows on 32 bit DMA addresses") Reported-by: Marek Szyprowski Signed-off-by: Christoph Hellwig Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski commit 4268ac6ae5870af10a7417b22990d615f72f77e2 Author: Christoph Hellwig Date: Tue Nov 19 17:35:36 2019 +0100 dma-direct: don't check swiotlb=force in dma_direct_map_resource When mapping resources we can't just use swiotlb ram for bounce buffering. Switch to a direct dma_capable check instead. Fixes: cfced786969c ("dma-mapping: remove the default map_resource implementation") Reported-by: Robin Murphy Signed-off-by: Christoph Hellwig Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski commit 50f579a2399dee0ad1c86ea8159ab8657b74f95b Author: Dan Carpenter Date: Tue Nov 19 09:18:19 2019 +0300 dma-debug: clean up put_hash_bucket() The put_hash_bucket() is a bit cleaner if it takes an unsigned long directly instead of a pointer to unsigned long. Signed-off-by: Dan Carpenter Signed-off-by: Christoph Hellwig commit cb6f6392dbefb45b6aabd9a6f566440ef642b6f8 Author: Christoph Hellwig Date: Tue Nov 12 17:08:49 2019 +0100 powerpc: remove support for NULL dev in __phys_to_dma / __dma_to_phys Support for calling the DMA API functions without a valid device pointer was removed a while ago, so remove the stale support for that from the powerpc __phys_to_dma / __dma_to_phys helpers. Signed-off-by: Christoph Hellwig Acked-by: Michael Ellerman Reviewed-by: Nicolas Saenz Julienne commit c7345159f7db6fb69ec1c3b3f8f28cd05c731be2 Author: Christoph Hellwig Date: Tue Nov 12 17:07:43 2019 +0100 dma-direct: avoid a forward declaration for phys_to_dma Move dma_capable down a bit so that we don't need a forward declaration for phys_to_dma. Signed-off-by: Christoph Hellwig Reviewed-by: Nicolas Saenz Julienne commit 130c1ccbf55330b55e82612a6e54eebb82c9d746 Author: Christoph Hellwig Date: Tue Nov 12 17:06:04 2019 +0100 dma-direct: unify the dma_capable definitions Currently each architectures that wants to override dma_to_phys and phys_to_dma also has to provide dma_capable. But there isn't really any good reason for that. powerpc and mips just have copies of the generic one minus the latests fix, and the arm one was the inspiration for said fix, but misses the bus_dma_mask handling. Make all architectures use the generic version instead. Signed-off-by: Christoph Hellwig Acked-by: Michael Ellerman (powerpc) Reviewed-by: Nicolas Saenz Julienne commit 56e35f9c5b87ec1ae93e483284e189c84388de16 Author: Christoph Hellwig Date: Thu Nov 7 18:03:11 2019 +0100 dma-mapping: drop the dev argument to arch_sync_dma_for_* These are pure cache maintainance routines, so drop the unused struct device argument. Signed-off-by: Christoph Hellwig Suggested-by: Daniel Vetter commit 1f12177b322dd7e7555537211778d308bdc31dab Merge: b9242da6f6e6 3727d259ddaf Author: David S. Miller Date: Wed Nov 20 11:25:24 2019 -0800 Merge branch 'cpsw-switchdev' Grygorii Strashko says: ==================== net: ethernet: ti: introduce new cpsw switchdev based driver Thank you All for review of v6. There are no significant changes in this version, just fixed comments to v6. --- v6 The major change in this version is DT bindings conversation to json-schema, and fixed other comments to v5. Also added patch to clean up ALE on init and netif restart. --- v5 The major part of work done in this iteration is rebasing on top of net-next with XDP series from Ivan Khoronzhuk [3], and enable XDP support in the new CPSW switchdev driver (it was little bit painful ;(). There are mostly no functional changes in new CPSW driver, just few fixes, sync with old driver and cleanups/optimizations. So, I've kept rest of cover letter unchanged. --- This series originally based on work [1][2] done by Ilias Apalodimas . This the RFC v5 which introduces new CPSW switchdev based driver which is operating in dual-emac mode by default, thus working as 2 individual network interfaces. The Switch mode can be enabled by configuring devlink driver parameter "switch_mode" to 1/true: devlink dev param set platform/48484000.switch \ name switch_mode value 1 cmode runtime This can be done regardless of the state of Port's netdev devices - UP/DOWN, but Port's netdev devices have to be in UP before joining the bridge to avoid overwriting of bridge configuration as CPSW switch driver completely reloads its configuration when first Port changes its state to UP. When the both interfaces joined the bridge - CPSW switch driver will start marking packets with offload_fwd_mark flag unless "ale_bypass=0". All configuration is implemented via switchdev API. The previous solution of tracking both Ports joined the bridge (from netdevice_notifier) proved to be not correct as changing CPSW switch driver mode required cleanup of ALE table and CPSW settings which happens while second Port is joined bridge and as result configuration loaded by bridge for the first Port became corrupted. The introduction of the new CPSW switchdev based driver (cpsw_new.c) is split on two parts: Part 1 - basic dual-emac driver; Part 2 switchdev support. Such approach has simplified code development and testing alot. And, I hope, it will help with better review. patches #1 - 5: preparation patches which also moves common code to cpsw_priv.c patches #6 - 9: Introduce TI CPSW switch driver based on switchdev and new DT bindings patch #10: new CPSW switchdev driver documentation patch #11: adds DT nodes for new CPSW switchdev driver added for DRA7 SoC patch #12: adds DT nodes for new cpsw switchdev driver for am571x-idk board patch #13: enables build of TI CPSW driver Most of the contents of the previous cover-letter have been added in new driver documentation, so please refer to that for configuration, testing and future work. These patches can be found at (branch contains some additional patches required for testing on top of net-next): https://github.com/grygoriyS/linux.git branch: lkml-5.4-switch-tbd-v7 changes in v7: - patch 2: added check for devm_kmalloc_array() return value - patch 6: fixed comments changes in v6: https://lkml.org/lkml/2019/11/9/108 - DT bindings converted to json-schema - netdev initialization is split on creation and registration. The netdevs registration happens now at the end of the pobe. - reworked cpsw_set_pauseparam() to use PHYlib APIs. - other comments for v5 fixed v5: https://patchwork.kernel.org/cover/11208785/ - rebase on top of net-next with XDP series from Ivan Khoronzhuk [3], and enable XDP support in the new CPSW switchdev driver cpsw driver (tested XDP_DROP only) - sync with old cpsw driver - implement comments from Ivan Khoronzhuk and Rob Herring - fixed "NETDEV WATCHDOG: .." warning after interface after interface UP/DOWN, missed TX wake in cpsw_adjust_link() v4: https://patchwork.kernel.org/cover/11010523/ - finished split of common CPSW code - added devlink support - changed CPSW mode configuration approach: from netdevice_notifier to devlink parameter - refactor and clean up ALE changes which allows to modify VLANs/MDBs entries - added missed support for port QDISC_CBS and QDISC_MQPRIO - the CPSW is split on two parts: basic dual_mac driver and switchdev support - added missed callback .ndo_get_port_parent_id() - reworked ingress frames marking in switch mode (offload_fwd_mark) - applied comments from Andrew Lunn v3: https://lwn.net/Articles/786677/ Changes in v3: - alot of work done to split properly common code between legacy and switchdev CPSW drivers and clean up code - CPSW switchdev interface updated to the current LKML switchdev interface - actually new CPSW switchdev based driver introduced - optimized dual_mac mode in new driver. Main change is that in promiscuous mode P0_UNI_FLOOD (both ports) is enabled in addition to ALLMULTI (current port) instead of ALE_BYPASS. So, port in non promiscuous mode will keep possibility of mcast and vlan filtering. - changed bridge join sequnce: now switch mode will be enabled only when both ports joined the bridge. CPSW will be switched to dual_mac mode if any port leave bridge. ALE table is completly cleared and then refiled while switching to switch mode - this simplidies code a lot, but introduces some limitation to bridge setup sequence: ip link add name br0 type bridge ip link set dev br0 type bridge ageing_time 1000 ip link set dev br0 type bridge vlan_filtering 0 <- disable echo 0 > /sys/class/net/br0/bridge/default_vlan ip link set dev sw0p1 up <- add ports ip link set dev sw0p2 up ip link set dev sw0p1 master br0 ip link set dev sw0p2 master br0 echo 1 > /sys/class/net/br0/bridge/default_vlan <- enable ip link set dev br0 type bridge vlan_filtering 1 bridge vlan add dev br0 vid 1 pvid untagged self - STP tested with vlan_filtering 1/0. To make STP work I've had to set NO_SA_UPDATE for all slave ports (see comment in code). It also required to statically register STP mcast address {0x01, 0x80, 0xc2, 0x0, 0x0, 0x0}; - allowed build both TI_CPSW and TI_CPSW_SWITCHDEV drivers - PTP can be enabled on both ports in dual_mac mode [1] https://patchwork.ozlabs.org/cover/929367/ [2] https://patches.linaro.org/cover/136709/ [3] https://patchwork.kernel.org/cover/11035813/ ==================== Signed-off-by: David S. Miller commit 3727d259ddafc4c8b8a9034ea4d115a8d0547877 Author: Grygorii Strashko Date: Wed Nov 20 00:19:25 2019 +0200 arm: omap2plus_defconfig: enable new cpsw switchdev driver Add CONFIG_TI_CPSW_SWITCHDEV option to enable new cpsw switchdev driver Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 15b991ade40069b2b88f29082f4ee59ae0a1ac38 Author: Grygorii Strashko Date: Wed Nov 20 00:19:24 2019 +0200 ARM: dts: am571x-idk: enable for new cpsw switch dev driver Add DT nodes for new cpsw switchdev driver for am571x-idk board for now to enable testing of the new solution. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 39331a49c4e159eca2500ccbd25ccf9e048b7559 Author: Grygorii Strashko Date: Wed Nov 20 00:19:23 2019 +0200 ARM: dts: dra7: add dt nodes for new cpsw switch dev driver Add DT nodes for new cpsw switch dev driver. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 14c815a9d1d32802119e9750ff2ebfac38038b83 Author: Ilias Apalodimas Date: Wed Nov 20 00:19:22 2019 +0200 Documentation: networking: add cpsw switchdev based driver documentation A new cpsw dirver based on switchdev was added. Add documentation about basic configuration and future features Signed-off-by: Ilias Apalodimas Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit da84e50c8e7525517c8484269578b247760cc7f4 Author: Grygorii Strashko Date: Wed Nov 20 00:19:21 2019 +0200 phy: ti: phy-gmii-sel: dependency from ti cpsw-switchdev driver Add dependency from TI_CPSW_SWITCHDEV. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 111cf1ab4da393416b8b79c2a7598378bfaf07e4 Author: Ilias Apalodimas Date: Wed Nov 20 00:19:20 2019 +0200 net: ethernet: ti: introduce cpsw switchdev based driver part 2 - switch CPSW switchdev based driver which is operating in dual-emac mode by default, thus working as 2 individual network interfaces. The Switch mode can be enabled by configuring devlink driver parameter "switch_mode" to 1: devlink dev param set platform/48484000.switch \ name switch_mode value 1 cmode runtime This can be done regardless of the state of Port's netdevs - UP/DOWN, but Port's netdev devices have to be UP before joining the bridge to avoid overwriting of bridge configuration as CPSW switch driver completely reloads its configuration when first Port changes its state to UP. When the both interfaces joined the bridge - CPSW switch driver will start marking packets with offload_fwd_mark flag unless "ale_bypass=0". All configuration is implemented via switchdev API and notifiers. Supported: - SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS - SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS: BR_MCAST_FLOOD - SWITCHDEV_ATTR_ID_PORT_STP_STATE - SWITCHDEV_OBJ_ID_PORT_VLAN - SWITCHDEV_OBJ_ID_PORT_MDB - SWITCHDEV_OBJ_ID_HOST_MDB Hence CPSW switchdev driver supports: - FDB offloading - MDB offloading - VLAN filtering and offloading - STP Signed-off-by: Ilias Apalodimas Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit ed3525eda4c4983fb8509e488de0a351788041ba Author: Ilias Apalodimas Date: Wed Nov 20 00:19:19 2019 +0200 net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac Part 1: Introduce basic CPSW dual_mac driver (cpsw_new.c) which is operating in dual-emac mode by default, thus working as 2 individual network interfaces. Main differences from legacy CPSW driver are: - optimized promiscuous mode: The P0_UNI_FLOOD (both ports) is enabled in addition to ALLMULTI (current port) instead of ALE_BYPASS. So, Ports in promiscuous mode will keep possibility of mcast and vlan filtering, which is provides significant benefits when ports are joined to the same bridge, but without enabling "switch" mode, or to different bridges. - learning disabled on ports as it make not too much sense for segregated ports - no forwarding in HW. - enabled basic support for devlink. devlink dev show platform/48484000.switch devlink dev param show platform/48484000.switch: name ale_bypass type driver-specific values: cmode runtime value false - "ale_bypass" devlink driver parameter allows to enable ALE_CONTROL(4).BYPASS mode for debug purposes. - updated DT bindings. Signed-off-by: Ilias Apalodimas Signed-off-by: Murali Karicheri Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit ef63fe72f698a051ed7f24d1a6b1ab3745fd4bbb Author: Grygorii Strashko Date: Wed Nov 20 00:19:18 2019 +0200 dt-bindings: net: ti: add new cpsw switch driver bindings Add bindings for the new TI CPSW switch driver. Comparing to the legacy bindings (net/cpsw.txt): - ports definition follows DSA bindings (net/dsa/dsa.txt) and ports can be marked as "disabled" if not physically wired. - all deprecated properties dropped; - all legacy propertiies dropped which represent constant HW cpapbilities (cpdma_channels, ale_entries, bd_ram_size, mac_control, slaves, active_slave) - TI CPTS DT properties are reused as is, but grouped in "cpts" sub-node - TI Davinci MDIO DT bindings are reused as is, because Davinci MDIO is reused. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit c5013ac1dd0e11267f81c855d50bd974fc8f88fe Author: Grygorii Strashko Date: Wed Nov 20 00:19:17 2019 +0200 net: ethernet: ti: cpsw: move set of common functions in cpsw_priv As a preparatory patch to add support for a switchdev based cpsw driver, move common functions to cpsw-priv.c so that they can be used across both drivers. Signed-off-by: Ilias Apalodimas Signed-off-by: Murali Karicheri Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 51a9533797b07b44374346fbd36ae0aa4f36ccd3 Author: Grygorii Strashko Date: Wed Nov 20 00:19:16 2019 +0200 net: ethernet: ti: cpsw: resolve build deps of cpsw drivers A following patches introduce new CPSW switchdev driver which uses common code with legacy CPSW driver. This will introduce build dependency between CPSW switchdev and CPSW legacy drivers related to for_each_slave() and cpsw_slave_index() - they can be compiled both, but only one of them will be not functional depending in Kconfig settings due to duffrences in Slave Ports indexes calculation. To fix this make for_each_slave() local (it's used now only by legacy CPSW driver) and convert cpsw_slave_index() to be a function pointer which is assigned in probe. Driver to probe is defined by DT. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit e85c14370783bf9339a95cab9da0fa54dc770a72 Author: Ilias Apalodimas Date: Wed Nov 20 00:19:15 2019 +0200 net: ethernet: ti: ale: modify vlan/mdb api for switchdev A following patch introduces switchdev functionality, so modify ALE engine VLANs/MDBs API: - cpsw_ale_del_mcast(): update so it will remove only selected ports from mcast port_mask or delete whole mcast record if !port_mask - cpsw_ale_del_vlan(): update so it will remove only selected ports from all VLAN record's masks or delete whole VLAN record if !port_mask - add cpsw_ale_vlan_add_modify() to add or modify existing VLAN record's masks - add cpsw_ale_set_unreg_mcast() for enabling unreg mcast on port VLANs Signed-off-by: Ilias Apalodimas Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 4b41d34367960e8b582cf3c51b954c07e0e3a1aa Author: Grygorii Strashko Date: Wed Nov 20 00:19:14 2019 +0200 net: ethernet: ti: cpsw: allow untagged traffic on host port Now untagged vlan traffic is not support on Host P0 port. This patch adds in ALE context bitmap of VLANs for which Host P0 port bit set in Force Untagged Packet Egress bitmask in VLANs ALE entries, and adds corresponding check in VLAN incapsulation header parsing function cpsw_rx_vlan_encap(). Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 7fe579dfb90fcdf0c7722f33c772d5f0d1bc7cb6 Author: Grygorii Strashko Date: Wed Nov 20 00:19:13 2019 +0200 net: ethernet: ti: ale: clean ale tbl on init and intf restart Clean CPSW ALE on init and intf restart (up/down) to avoid reading obsolete or garbage entries from ALE table. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit b9242da6f6e66d0e5548f0009abe9f781a536b51 Merge: 2f1d370b997a 89d8fd44abfb Author: David S. Miller Date: Wed Nov 20 11:21:35 2019 -0800 Merge branch 'nf_tables_offload-vlan-matching-support' Pablo Neira Ayuso says: ==================== nf_tables_offload: vlan matching support The following patchset contains Netfilter support for vlan matching offloads: 1) Constify nft_reg_load() as a preparation patch. 2) Restrict rule matching to ingress interface type ARPHRD_ETHER. 3) Add new vlan_tci field to flow_dissector_key_vlan structure, to allow to set up vlan_id, vlan_dei and vlan_priority in one go. 4) C-VLAN matching support. ==================== Signed-off-by: David S. Miller commit 89d8fd44abfb9019bb37a858532d6633e2590cac Author: Pablo Neira Ayuso Date: Tue Nov 19 23:05:55 2019 +0100 netfilter: nft_payload: add C-VLAN offload support Match on h_vlan_encapsulated_proto and set up protocol dependency. Check for protocol dependency before accessing the tci field. Allow to match on the encapsulated ethertype too. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit a82055af595946aea461528e551e6ae064b3d560 Author: Pablo Neira Ayuso Date: Tue Nov 19 23:05:54 2019 +0100 netfilter: nft_payload: add VLAN offload support Match on ethertype and set up protocol dependency. Check for protocol dependency before accessing the tci field. Allow to match on the encapsulated ethertype too. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 8819efc9430142957c9c8fc7c09d9107e2061b87 Author: Pablo Neira Ayuso Date: Tue Nov 19 23:05:53 2019 +0100 netfilter: nf_tables_offload: allow ethernet interface type only Hardware offload support at this stage assumes an ethernet device in place. The flow dissector provides the intermediate representation to express this selector, so extend it to allow to store the interface type. Flower does not uses this, so skb_flow_dissect_meta() is not extended to match on this new field. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 7cd9a58d6860ae09acd7f0c219b5fa333703f72f Author: Pablo Neira Ayuso Date: Tue Nov 19 23:05:52 2019 +0100 netfilter: nf_tables: constify nft_reg_load{8, 16, 64}() This patch constifies the pointer to source register data that is passed as an input parameter. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 94722e74272cf4aa08841c98e3a219c7a4c9028b Author: Takashi Iwai Date: Sun Nov 17 09:53:08 2019 +0100 ALSA: docs: Update about the new PCM sync_stop ops Add the documentation about the new PCM sync_stop ops and card->sync_irq field. Link: https://lore.kernel.org/r/20191117085308.23915-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit fabb26dcd104027b971c018275fe40f2ebe09ae3 Author: Takashi Iwai Date: Sun Nov 17 09:53:07 2019 +0100 ALSA: pcm: Add card sync_irq field Many PCI and other drivers performs snd_pcm_period_elapsed() simply in its interrupt handler, so the sync_stop operation is just to call synchronize_irq(). Instead of putting this call multiple times, introduce the common card->sync_irq field. When this field is set, PCM core performs synchronize_irq() for sync-stop operation. Each driver just needs to copy its local IRQ number to card->sync_irq, and that's all we need. Link: https://lore.kernel.org/r/20191117085308.23915-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1e850beea2781d30418743dd99250291cef37919 Author: Takashi Iwai Date: Sun Nov 17 09:53:06 2019 +0100 ALSA: pcm: Add the support for sync-stop operation The standard programming model of a PCM sound driver is to process snd_pcm_period_elapsed() from an interrupt handler. When a running stream is stopped, PCM core calls the trigger-STOP PCM ops, sets the stream state to SETUP, and moves on to the next step. This is performed in an atomic manner -- this could be called from the interrupt context, after all. The problem is that, if the stream goes further and reaches to the CLOSE state immediately, the stream might be still being processed in snd_pcm_period_elapsed() in the interrupt context, and hits a NULL dereference. Such a crash happens because of the atomic operation, and we can't wait until the stream-stop finishes. For addressing such a problem, this commit adds a new PCM ops, sync_stop. This gets called at the appropriate places that need a sync with the stream-stop, i.e. at hw_params, prepare and hw_free. Some drivers already have a similar mechanism implemented locally, and we'll refactor the code later. Link: https://lore.kernel.org/r/20191117085308.23915-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0821fd77a1129cf4848d82d9275fb4e90e02edf8 Author: Takashi Iwai Date: Sun Nov 17 11:05:12 2019 +0100 ALSA: pcm: Move PCM_RUNTIME_CHECK() macro into local header It should be used only in the PCM core code locally. Link: https://lore.kernel.org/r/20191117085308.23915-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit f6161f379c5d455bcedc2cbb1968235a85e151c1 Author: Takashi Iwai Date: Sun Nov 17 09:53:04 2019 +0100 ALSA: docs: Update document about the default PCM ioctl ops Mention that it's completely optional now. Link: https://lore.kernel.org/r/20191117085308.23915-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit fc033cbf6fb75452f03774ca5adccac8cf9bc84f Author: Takashi Iwai Date: Sun Nov 17 09:53:03 2019 +0100 ALSA: pcm: Allow NULL ioctl ops Currently PCM ioctl ops is a mandatory field but almost all drivers simply pass snd_pcm_lib_ioctl. For simplicity, allow to set NULL in the field and call snd_pcm_lib_ioctl() as default. Link: https://lore.kernel.org/r/20191117085308.23915-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 72b4bcbf1c96c766a0c037a665ef5bbe62bb2628 Author: Takashi Iwai Date: Sun Nov 17 09:53:02 2019 +0100 ALSA: docs: Update for managed buffer allocation mode Update the documentation for the newly introduced managed buffer allocation mode accordingly. The old preallocation is no longer recommended. Link: https://lore.kernel.org/r/20191117085308.23915-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0dba808eae2627f40024872d2f02f75f0d2b0790 Author: Takashi Iwai Date: Sun Nov 17 09:53:01 2019 +0100 ALSA: pcm: Introduce managed buffer allocation mode This patch adds the support for the feature to automatically allocate and free PCM buffers, so called "managed buffer allocation" mode. It's set up via new PCM helpers, snd_pcm_set_managed_buffer() and snd_pcm_set_managed_buffer_all(), both of which correspond to the existing preallocator helpers, snd_pcm_lib_preallocate_pages() and snd_pcm_lib_preallocate_pages_for_all(). When the new helper is used, it not only performs the pre-allocation of buffers, but also it manages to call snd_pcm_lib_malloc_pages() before the PCM hw_params ops and snd_lib_pcm_free() after the PCM hw_free ops inside PCM core, respectively. This allows drivers to drop the explicit calls of the memory allocation / release functions, and it will be a good amount of code reduction in the end of this patch series. When the PCM substream is set to the managed buffer allocation mode, the managed_buffer_alloc flag is set in the substream object. Since some drivers want to know when a buffer is newly allocated or re-allocated at hw_params callback (e.g. want to set up the additional stuff for the given buffer only at allocation time), now PCM core turns on buffer_changed flag when the buffer has changed. The standard conversions to use the new API will be straightforward: - Replace snd_pcm_lib_preallocate*() calls with the corresponding snd_pcm_set_managed_buffer*(); the arguments should be unchanged - Drop superfluous snd_pcm_lib_malloc() and snd_pcm_lib_free() calls; the check of snd_pcm_lib_malloc() returns should be replaced with the check of runtime->buffer_changed flag. - If hw_params or hw_free becomes empty, drop them from PCM ops Link: https://lore.kernel.org/r/20191117085308.23915-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit c6ae99605633cade7dc61a2b35b04dda90302dad Author: Andrew Gabbasov Date: Wed Nov 20 11:49:55 2019 -0600 ALSA: aloop: Support runtime change of snd_timer via info interface Show and change sound card timer source with read-write info file in proc filesystem. Initial string can still be set as module parameter. The timer source string value can be changed at any time, but it is latched by PCM substream open callback (the first one for a particular cable). At this point it is actually used, that is the string is parsed, and the timer is looked up and opened. The timer source is set for a loopback card (the same as initial setting by module parameter), but every cable uses the value, current at the moment of open. Setting the value to empty string switches the timer to jiffies. Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191120174955.6410-8-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit 26c53379f98d22d6a3e50bb146651dc7824334d7 Author: Timo Wischer Date: Wed Nov 20 11:49:54 2019 -0600 ALSA: aloop: Support selection of snd_timer instead of jiffies to do synchronous audio forwarding between hardware sound card and aloop devices. Such an audio route could look like the following: Sound card -> Loopback application -> ALSA loop device -> arecord In this case the loopback device should use the sound timer of the sound card. Without this patch the loopback application has to implement an adaptive sample rate converter to align the different clocks of the different ALSA devices. The used timer can be selected by referring to a sound card, its device and subdevice, when loading the module: $ modprobe snd_aloop enable=1 timer_source=[[.[.]]] is the name (id) of the sound card or a card number. and are device and subdevice numbers (defaults are 0). Empty string as a value of timer_source= parameter enables previous functionality (using jiffies timer). Signed-off-by: Timo Wischer Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191120174955.6410-7-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit fd1f7c743d30938d3befb1af038a510c003a6a27 Author: Timo Wischer Date: Wed Nov 20 11:49:53 2019 -0600 ALSA: aloop: Move CABLE_VALID_BOTH to the top of file so all functions can use the same. Signed-off-by: Timo Wischer Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191120174955.6410-6-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit 8e3bf7cde43339507f9ce15fc10ff329e76ad649 Author: Timo Wischer Date: Wed Nov 20 11:49:52 2019 -0600 ALSA: aloop: Rename all jiffies timer specific functions This commit does not change the behaviour. It only separates the jiffies timer specific implementation from the generic part. Signed-off-by: Timo Wischer Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191120174955.6410-5-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit 133f37593eb6db43158bafd52937974acccd1d29 Author: Timo Wischer Date: Wed Nov 20 11:49:51 2019 -0600 ALSA: aloop: Use callback functions for timer specific implementations This commit only refactors the implementation. It does not change the behaviour. It is required to support other timers (e.g sound timer). Signed-off-by: Timo Wischer Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191120174955.6410-4-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit 09419f1ace213284823ad835d28b239c33daeb71 Author: Timo Wischer Date: Wed Nov 20 11:49:50 2019 -0600 ALSA: aloop: Support return of error code for timer start and stop This is required for additional timer implementations which could detect errors and want to throw them. Signed-off-by: Timo Wischer Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191120174955.6410-3-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit 97dda3da20732df8010090dd6d749b9d5b86bffe Author: Timo Wischer Date: Wed Nov 20 11:49:49 2019 -0600 ALSA: aloop: Describe units of variables Describe the unit of the variables used to calculate the hw pointer depending on jiffies ticks. Signed-off-by: Timo Wischer Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20191120174955.6410-2-andrew_gabbasov@mentor.com Signed-off-by: Takashi Iwai commit 2f1d370b997a249ff289507cbd629b4fdd99c564 Author: Xin Long Date: Tue Nov 19 17:39:11 2019 +0800 lwtunnel: add support for multiple geneve opts geneve RFC (draft-ietf-nvo3-geneve-14) allows a geneve packet to carry multiple geneve opts, so it's necessary for lwtunnel to support adding multiple geneve opts in one lwtunnel route. But vxlan and erspan opts are still only allowed to add one option. With this patch, iproute2 could make it like: # ip r a 1.1.1.0/24 encap ip id 1 geneve_opts 0:0:12121212,1:2:12121212 \ dst 10.1.0.2 dev geneve1 # ip r a 1.1.1.0/24 encap ip id 1 vxlan_opts 456 \ dst 10.1.0.2 dev erspan1 # ip r a 1.1.1.0/24 encap ip id 1 erspan_opts 1:123:0:0 \ dst 10.1.0.2 dev erspan1 Which are pretty much like cls_flower and act_tunnel_key. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 924ea58dadea23cc28b60d02b9c0896b7b168a6f Merge: 54b6416e679d 23cb16d2ccb5 Author: Kalle Valo Date: Wed Nov 20 20:11:58 2019 +0200 Merge tag 'mt76-for-kvalo-2019-11-20' of https://github.com/nbd168/wireless mt76 patches for 5.5 * monitor mode fix for mt7615 * fixes for rx aggregation race conditions * cleanups * mt7615 smart carrier sense support * code unification / deduplication * mt7615 debugfs improvements * debugfs aggregation statistics * airtime fairness support * mt76x0 OF mac address support * locking fixes * usb support improvements * rate control fixes commit 54b6416e679d5f255a36fd5a9e148802647cdd65 Merge: eac08515d7bd 54fae6e31bed Author: Kalle Valo Date: Wed Nov 20 20:09:50 2019 +0200 Merge tag 'iwlwifi-next-for-kalle-2019-11-20' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Patches intended for v5.5 * Fix a merge damage that causes issues with high-throuput on AX200+; * Support TX/RX antennas reporting; * Small fix in DVM's BT link-quality code; * Bump supported FW API version to 52; * Yet another scan FW API update; * Some clean-ups; commit d7d8d62a3f3b50b606c9395298b017bd9fd9c8d4 Merge: b82049f2c139 37238d3dd584 cb6cfe2eaed1 Author: Tony Lindgren Date: Wed Nov 20 10:04:05 2019 -0800 Merge branches 'omap-for-v5.5/soc' and 'omap-for-v5.5/ti-sysc' into omap-for-v5.5/ti-sysc-late commit b82049f2c1395d0bf99f0ae291c748c9dcb7d507 Merge: b08a0c577518 0b491904f053 Author: Tony Lindgren Date: Wed Nov 20 10:01:38 2019 -0800 Merge tag 'omap-for-v5.5/soc-late-signed' into omap-for-v5.5/ti-sysc-late Few late SoC changes for v5.5 merge window These changes just clean up few typos, and there is one non-critical correction of missing put_device() after calling of_platform_populate() for display controller. Naturally none of this is urgent and can be merged when suitable. commit 6af0a549c25e0d02366aa95507bfe3cad2f7b68b Author: Grygorii Strashko Date: Mon Nov 18 14:20:16 2019 +0200 ARM: dts: dra7: fix cpsw mdio fck clock The DRA7 CPSW MDIO functional clock (gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 0) is specified incorrectly, which is caused incorrect MDIO bus clock configuration MDCLK. The correct CPSW MDIO functional clock is gmac_main_clk (125MHz), which is the same as CPSW fck. Hence fix it. Fixes: 1faa415c9c6e ("ARM: dts: Add fck for cpsw mdio for omap variants") Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit e415e4d2d506ce64ea540b4552654d1be0680a52 Author: Faiz Abbas Date: Mon Nov 18 16:46:54 2019 +0530 ARM: dts: am57xx-beagle-x15: Update pinmux name to ddr_3_3v am57xx-beagle-x15 revb1 and revc have 3.3V connected to the eMMC I/O lines. Update the pinmux name to reflect this. Signed-off-by: Faiz Abbas Signed-off-by: Tony Lindgren commit 287897f9aaa2ad1c923d9875914f57c4dc9159c8 Author: Jarkko Nikula Date: Sat Nov 16 17:16:51 2019 +0200 ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity The MMC card detection GPIO polarity is active low on TAO3530, like in many other similar boards. Now the card is not detected and it is unable to mount rootfs from an SD card. Fix this by using the correct polarity. This incorrect polarity was defined already in the commit 30d95c6d7092 ("ARM: dts: omap3: Add Technexion TAO3530 SOM omap3-tao3530.dtsi") in v3.18 kernel and later changed to use defined GPIO constants in v4.4 kernel by the commit 3a637e008e54 ("ARM: dts: Use defined GPIO constants in flags cell for OMAP2+ boards"). While the latter commit did not introduce the issue I'm marking it with Fixes tag due the v4.4 kernels still being maintained. Fixes: 3a637e008e54 ("ARM: dts: Use defined GPIO constants in flags cell for OMAP2+ boards") Cc: linux-stable # 4.4+ Signed-off-by: Jarkko Nikula Signed-off-by: Tony Lindgren commit 3efd72330543da44e82e9371dfb639802c886f6c Author: Krzysztof Kozlowski Date: Wed Nov 20 21:32:52 2019 +0800 ASoC: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191120133252.6365-1-krzk@kernel.org Signed-off-by: Mark Brown commit 5cca59516de5df9de6bdecb328dd55fb5bcccb41 Author: Shengjiu Wang Date: Tue Nov 12 18:46:42 2019 +0800 ASoC: soc-pcm: check symmetry before hw_params This reverts commit 957ce0c6b8a1f (ASoC: soc-pcm: check symmetry after hw_params). That commit cause soc_pcm_params_symmetry can't take effect. cpu_dai->rate, cpu_dai->channels and cpu_dai->sample_bits are updated in the middle of soc_pcm_hw_params, so move soc_pcm_params_symmetry to the end of soc_pcm_hw_params is not a good solution, for judgement of symmetry in the function is always true. FIXME: According to the comments of that commit, I think the case described in the commit should disable symmetric_rates in Back-End, rather than changing the position of soc_pcm_params_symmetry. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1573555602-5403-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 9fbea0b7e842890a76acffce9be9e430b9e11194 Author: Eugeniy Paltsev Date: Tue Nov 19 18:26:15 2019 +0300 ARC: add kmemleak support kmemleak is used internally for a long time and as there isn't any issue with it we can finally enable it in upstream. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit e1b2743d705205314cda550c97f59ed7ce9917f4 Author: Eugeniy Paltsev Date: Tue Nov 19 16:22:15 2019 +0300 ARC: [plat-axs10x]: remove hardcoded video mode from bootargs Now have pixel clock PLL driver and we can change pixel clock rate so we don't need to enforce one exact video mode. Moreover enforcing video mode is harmful in case of we enforce mode which isn't supported by the monitor we are using. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 93c53f2397fb584963a53fe32288384adcdd5f6c Author: Eugeniy Paltsev Date: Tue Nov 19 16:22:14 2019 +0300 ARC: [plat-axs10x]: use pgu pll instead of fixed clock Use PLL driver instead of fixed-clock for PGU pixel clock. That allows us to support wider range of graphic modes. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 554bbe726ce0ef692cd95fedd5730c69c1189138 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:39:16 2019 +0800 spi: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133916.13595-1-krzk@kernel.org Signed-off-by: Mark Brown commit 76bec25b32363f47225d35a70ccb97d6d0f09dd9 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:39:49 2019 +0800 regulator: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133949.13996-1-krzk@kernel.org Signed-off-by: Mark Brown commit f0a19fa823fb7b1f98d54b22a3ae0e5de88a1e50 Author: Sven Van Asbroeck Date: Tue Nov 19 10:46:09 2019 -0500 regulator: tps6105x: add optional devicetree support Tell the regulator framework to retrieve regulator init data from the 'regulator' subnode, or from the parent mfd device's platform data. Example: i2c0 { tps61052@33 { compatible = "ti,tps61052"; reg = <0x33>; regulator { regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-always-on; }; }; }; Tree: next-20191118 Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20191119154611.29625-3-TheSven73@gmail.com Signed-off-by: Mark Brown commit 62f7f3eca4c30064ab37b42d97cef4292d75fdd0 Author: Sven Van Asbroeck Date: Tue Nov 19 10:46:08 2019 -0500 tps6105x: add optional devicetree support This driver currently requires platform data to specify the operational mode and regulator init data (in case of regulator mode). Optionally specify the operational mode by looking at the name of the devicetree child node. Example: put chip in regulator mode: i2c0 { tps61052@33 { compatible = "ti,tps61052"; reg = <0x33>; regulator { regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-always-on; }; }; }; Tree: linux-next Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20191119154611.29625-2-TheSven73@gmail.com Signed-off-by: Mark Brown commit 4ec48e7cbe6e70352c802b5cb172b00ebd8af8e0 Author: Peter Ujfalusi Date: Wed Nov 20 15:17:53 2019 +0200 ASoC: pcm3168a: Update the RST gpio handling to align with documentation The RST (reset-gpios) is low active so the driver must handle it accordingly. Add comments to explain clearly how the line is used. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191120131753.6831-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 103e5d734ae28fc1ccd80d1df9d33f44536d74a4 Author: Peter Ujfalusi Date: Wed Nov 20 15:17:52 2019 +0200 ASoC: dt-bindings: pcm3168a: Update the optional RST gpio for clarity Use the standard name for the gpion in DT: reset-gpios Document that the RST line is low active and update the example accordingly. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191120131753.6831-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit fb5126778333d289b2623a7e6260beeb1ac1b819 Author: Tzung-Bi Shih Date: Wed Nov 20 14:08:43 2019 +0800 ASoC: core: add SND_SOC_BYTES_E Add SND_SOC_BYTES_E to accept getter and putter. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191120060844.224607-2-tzungbi@google.com Signed-off-by: Mark Brown commit dc73d73aa7145f55412611f3eead1e85ae026785 Author: Jaroslav Kysela Date: Tue Nov 19 18:49:32 2019 +0100 ASoC: add control components management This ASCII string can carry additional information about soundcard components or configuration. Add the possibility to set this string via the ASoC card. Signed-off-by: Jaroslav Kysela Cc: Mark Brown Link: https://lore.kernel.org/r/20191119174933.25526-1-perex@perex.cz Signed-off-by: Mark Brown commit 1e4d401860268bbed124eb93a0010237bd8ed26c Author: Robin Murphy Date: Sat Nov 16 12:54:19 2019 +0000 PCI: rockchip: Make some regulators non-optional The 0V9 and 1V8 supplies power the PCIe block in the SoC itself, and are thus fundamental to PCIe being usable at all. As such, it makes sense to treat them as non-optional and rely on dummy regulators if not explicitly described. Signed-off-by: Robin Murphy Signed-off-by: Lorenzo Pieralisi Reviewed-by: Mark Brown Reviewed-by: Andrew Murray commit 3b55809cf91f54fa5add4cc4cfed934565568ed7 Author: Rob Herring Date: Mon Oct 28 11:32:56 2019 -0500 PCI: Make devm_of_pci_get_host_bridge_resources() static Now that all the PCI host drivers are using pci_parse_request_of_pci_ranges(), make devm_of_pci_get_host_bridge_resources() static. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 085f793984adcbf3966176bac088c32e0b66235a Author: Rob Herring Date: Mon Oct 28 11:32:55 2019 -0500 PCI: rcar: Use inbound resources for setup Now that the helpers provide the inbound resources in the host bridge 'dma_ranges' resource list, convert Renesas R-Car PCIe host bridge to use the resource list to setup the inbound addresses. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Simon Horman Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit b9ae59b30bcf62691aec4170ce4bafc20e968490 Author: Rob Herring Date: Mon Oct 28 11:32:54 2019 -0500 PCI: iproc: Use inbound resources for setup Now that the helpers provide the inbound resources in the host bridge 'dma_ranges' resource list, convert Broadcom iProc host bridge to use the resource list to setup the inbound addresses. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com commit 6dce5aa59e0bf2430733d7a8b11c205ec10f408e Author: Rob Herring Date: Mon Oct 28 11:32:53 2019 -0500 PCI: xgene: Use inbound resources for setup Now that the helpers provide the inbound resources in the host bridge 'dma_ranges' resource list, convert the Xgene host bridge to use the resource list to setup the inbound addresses. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Cc: Toan Le Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 070d7d70291c3a6b61fb10f0e9cf5874df91e214 Author: Rob Herring Date: Mon Oct 28 11:32:52 2019 -0500 PCI: v3-semi: Use inbound resources for setup Now that the helpers provide the inbound resources in the host bridge 'dma_ranges' resource list, convert the v3-semi host bridge to use the resource list to setup the inbound addresses. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Reviewed-by: Linus Walleij Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit ea4f718e8455e8d94ec5fcf270b9d37988fc5bbd Author: Rob Herring Date: Mon Oct 28 11:32:51 2019 -0500 PCI: ftpci100: Use inbound resources for setup Now that the helpers provide the inbound resources in the host bridge 'dma_ranges' resource list, convert Faraday ftpci100 host bridge to use the resource list to setup the inbound addresses. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Acked-by: Linus Walleij Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 331f63457165a30c708280de2c77f1742c6351dc Author: Rob Herring Date: Wed Oct 30 17:30:57 2019 -0500 PCI: of: Add inbound resource parsing to helpers Extend devm_of_pci_get_host_bridge_resources() and pci_parse_request_of_pci_ranges() helpers to also parse the inbound addresses from DT 'dma-ranges' and populate a resource list with the translated addresses. This will help ensure 'dma-ranges' is always parsed in a consistent way. Tested-by: Srinath Mannam Tested-by: Thomas Petazzoni # for AArdvark Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Srinath Mannam Reviewed-by: Andrew Murray Acked-by: Gustavo Pimentel Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Thomas Petazzoni Cc: Will Deacon Cc: Linus Walleij Cc: Toan Le Cc: Ley Foon Tan Cc: Tom Joseph Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: Ryder Lee Cc: Karthikeyan Mitran Cc: Hou Zhiqiang Cc: Simon Horman Cc: Shawn Lin Cc: Heiko Stuebner Cc: Michal Simek Cc: rfi@lists.rocketboards.org Cc: linux-mediatek@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-rockchip@lists.infradead.org commit ec11e5c213cc20cac5e8310728b06793448b9f6d Author: Jon Derrick Date: Tue Nov 12 05:47:53 2019 -0700 PCI: vmd: Add device id for VMD device 8086:9A0B This patch adds support for this VMD device which supports the bus restriction mode. Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi commit 08bcdd22ecdb01dd60d9284a55f8220a8a40150e Author: Jon Derrick Date: Tue Nov 12 05:47:52 2019 -0700 PCI: vmd: Add bus 224-255 restriction decode VMD bus restrictions are required when IO fabric is multiplexed such that VMD cannot use the entire bus range. This patch adds another bus restriction decode bit that can be set by firmware to restrict the VMD bus range to between 224-255. Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi commit c2ce4d23299fc8c40d5f20f2536eb56838c27762 Author: Chuhong Yuan Date: Wed Nov 13 14:38:21 2019 +0800 platform/chrome: cros_usbpd_logger: add missed destroy_workqueue in remove The driver forgets to destroy workqueue in remove. Add the missed call to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Enric Balletbo i Serra commit 6a82e23f45fe0aa821e7a935e39d0acb20c275c0 Author: Thomas Richter Date: Fri Nov 15 12:50:46 2019 +0100 s390/cpumf: Adjust registration of s390 PMU device drivers Linux-next commit titled "perf/core: Optimize perf_init_event()" changed the semantics of PMU device driver registration. It was done to speed up the lookup/handling of PMU device driver specific events. It also enforces that only one PMU device driver will be registered of type PERF_EVENT_RAW. This change added these line in function perf_pmu_register(): ... + ret = idr_alloc(&pmu_idr, pmu, max, 0, GFP_KERNEL); + if (ret < 0) goto free_pdc; + + WARN_ON(type >= 0 && ret != type); The warn_on generates a message. We have 3 PMU device drivers, each registered as type PERF_TYPE_RAW. The cf_diag device driver (arch/s390/kernel/perf_cpumf_cf_diag.c) always hits the WARN_ON because it is the second PMU device driver (after sampling device driver arch/s390/kernel/perf_cpumf_sf.c) which is registered as type 4 (PERF_TYPE_RAW). So when the sampling device driver is registered, ret has value 4. When cf_diag device driver is registered with type 4, ret has value of 5 and WARN_ON fires. Adjust the PMU device drivers for s390 to support the new semantics required by perf_pmu_register(). Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit 14ce38484419e8cb4f9fbd7eb7c2e8673b87a6f5 Author: Sudip Mukherjee Date: Wed Nov 20 15:17:08 2019 +0000 tty: remove unused argument from tty_open_by_driver() The argument 'inode' passed to tty_open_by_driver() was not being used. Remove the extra argument. Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20191120151709.14148-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 60774d2af07a465dc916321e7428a4c5b7867ed4 Author: Saravana Kannan Date: Thu Nov 14 20:50:48 2019 -0800 i2c: of: Populate fwnode in of_i2c_get_board_info() This allows the of_devlink feature to work across i2c devices too. This avoid unnecessary probe deferrals of i2c devices, defers consumers of i2c devices till the i2c devices probe, and allows i2c drivers to implement sync_state() callbacks. Signed-off-by: Saravana Kannan Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/20191115045049.261104-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 443633225ef9e07515578aa0d01bd214fa93db53 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:41:10 2019 +0800 dm: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mike Snitzer commit 379c02ebcc9a30d1697923c10628ca32283675ff Author: Krzysztof Kozlowski Date: Wed Nov 20 21:40:13 2019 +0800 platform/chrome: cros_ec: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Enric Balletbo i Serra commit 1637a947e684dfdaae9e91b902297f65517259c9 Author: Christian Gromm Date: Wed Nov 20 15:05:38 2019 +0100 staging: most: core: remove sysfs attr remove_link This patch removes the sysfs attribute remove_link, as it is not needed anymore since the introduction of the configfs configuration interface. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1574258738-12863-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 83072c35ee878cd3ad5e85c282dd13097de74b03 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:38:48 2019 +0800 staging: vc04: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133848.13250-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit ee5f771f10fcd536ca2ae6c1b695cbabf9ef3cbe Author: Krzysztof Kozlowski Date: Wed Nov 20 21:38:53 2019 +0800 staging: pi433: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133853.13308-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit f82ea85dd722b340225f576dfb28e04ad19d3b53 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:38:58 2019 +0800 staging: nvec: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133858.13369-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4574c517bb33d7189539782af4364d869c0f2725 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:39:03 2019 +0800 staging: most: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133903.13428-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 63f1dae291b972551e25ff7c7e46a06ad4f013e8 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:39:07 2019 +0800 staging: fwserial: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133907.13483-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3750392ecc9d47303291a845c35756292fd971d1 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:39:11 2019 +0800 staging: fbtft: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133911.13539-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4500914d36860145c3c8a777646cfeca8a3f823f Author: Krzysztof Kozlowski Date: Wed Nov 20 21:38:43 2019 +0800 tty: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133843.13189-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit abf5c67dc43cacf85d709d9c027a09e97849c8e4 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:42:56 2019 +0800 drivers: base: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120134256.16186-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit ab64ec1db25e0cceab0bad15b03fd57e2b461b15 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:40:56 2019 +0800 misc: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120134056.14677-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit c8175bd155c5c8e20008787148f8303ab20885b8 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:42:47 2019 +0800 char: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120134247.16073-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6e6c18bcb78c0dc0601ebe216bed12c844492d0c Author: Alexander Shishkin Date: Wed Nov 20 15:08:06 2019 +0200 intel_th: pci: Add Tiger Lake CPU support This adds support for the Trace Hub in Tiger Lake CPU. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191120130806.44028-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6a1743422a7c0fda26764a544136cac13e5ae486 Author: Alexander Shishkin Date: Wed Nov 20 15:08:05 2019 +0200 intel_th: pci: Add Ice Lake CPU support This adds support for the Trace Hub in Ice Lake CPU. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191120130806.44028-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 512592779a337feb5905d8fcf9498dbf33672d4a Author: Alexander Shishkin Date: Wed Nov 20 15:08:04 2019 +0200 intel_th: Fix a double put_device() in error path Commit a753bfcfdb1f ("intel_th: Make the switch allocate its subdevices") factored out intel_th_subdevice_alloc() from intel_th_populate(), but got the error path wrong, resulting in two instances of a double put_device() on a freshly initialized, but not 'added' device. Fix this by only doing one put_device() in the error path. Signed-off-by: Alexander Shishkin Fixes: a753bfcfdb1f ("intel_th: Make the switch allocate its subdevices") Reported-by: Wen Yang Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org # v4.14+ Link: https://lore.kernel.org/r/20191120130806.44028-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 189f39ee6ac51d1c3d753c4aeee5943abafc983e Author: Andy Shevchenko Date: Wed Nov 20 11:57:16 2019 +0200 fbtft: Drop OF dependency Now, since driver became OF independent, no need to keep OF dependency. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191120095716.26628-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8b2d3aeeb7ec8110458ba59bf9c8b3af84f1139a Author: Andy Shevchenko Date: Wed Nov 20 11:57:15 2019 +0200 fbtft: Make use of device property API Make use of device property API in this driver so that both OF based system and ACPI based system can use this driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191120095716.26628-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2494fd4c8388af803fcb5d5198b46d1285121afb Author: Andy Shevchenko Date: Wed Nov 20 11:57:14 2019 +0200 fbtft: Drop useless #ifdef CONFIG_OF and dead code First of all there is no need to guard GPIO request by CONFIG_OF. It works for everybody independently on resource provider. While here, rename the function to reflect the above. Moreover, since we have a global dependency to OF, the rest of conditional compilation is no-op, i.e. it's always be true. Due to above drop useless #ifdef CONFIG_OF and therefore dead code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191120095716.26628-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6753e7957fef5d9f48eaee25b87314d7a800eb3a Author: Andy Shevchenko Date: Wed Nov 20 11:57:13 2019 +0200 fbtft: Describe function parameters in kernel-doc Kernel documentation script complains that some of the function parameters are not described: drivers/staging/fbtft/fbtft-core.c:543: warning: Function parameter or member 'pdata' not described in 'fbtft_framebuffer_alloc' Describe function parameters where it's appropriate. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191120095716.26628-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 21f585480deb4bcf0d92b08879c35d066dfee030 Author: Andy Shevchenko Date: Wed Nov 20 11:57:12 2019 +0200 fbtft: Make sure string is NULL terminated New GCC warns about inappropriate use of strncpy(): drivers/staging/fbtft/fbtft-core.c: In function ‘fbtft_framebuffer_alloc’: drivers/staging/fbtft/fbtft-core.c:665:2: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] 665 | strncpy(info->fix.id, dev->driver->name, 16); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Later on the copy is being used with the assumption to be NULL terminated. Make sure string is NULL terminated by switching to snprintf(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191120095716.26628-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 992edeaefed682511bd173dabd2f54b1ce5387df Author: Liran Alon Date: Wed Nov 20 14:24:52 2019 +0200 KVM: nVMX: Assume TLB entries of L1 and L2 are tagged differently if L0 use EPT Since commit 1313cc2bd8f6 ("kvm: mmu: Add guest_mode to kvm_mmu_page_role"), guest_mode was added to mmu-role and therefore if L0 use EPT, it will always run L1 and L2 with different EPTP. i.e. EPTP01!=EPTP02. Because TLB entries are tagged with EP4TA, KVM can assume TLB entries populated while running L2 are tagged differently than TLB entries populated while running L1. Therefore, update nested_has_guest_tlb_tag() to consider if L0 use EPT instead of if L1 use EPT. Reviewed-by: Joao Martins Reviewed-by: Krish Sadhukhan Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 5637f60b6828c0abfd5fe3cc6922a7106b5366c7 Author: Liran Alon Date: Mon Nov 18 19:27:02 2019 +0200 KVM: x86: Unexport kvm_vcpu_reload_apic_access_page() The function is only used in kvm.ko module. Reviewed-by: Mark Kanda Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit c79eb77554bb6dde8ecd5319e2824e4c8e1f4819 Author: Chenyi Qiang Date: Tue Nov 19 16:33:59 2019 +0800 KVM: nVMX: add CR4_LA57 bit to nested CR4_FIXED1 When L1 guest uses 5-level paging, it fails vm-entry to L2 due to invalid host-state. It needs to add CR4_LA57 bit to nested CR4_FIXED1 MSR. Signed-off-by: Chenyi Qiang Reviewed-by: Xiaoyao Li Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit cc877670975be9082138e34f9e55d9d79c527b5c Author: Liran Alon Date: Mon Nov 18 21:11:21 2019 +0200 KVM: nVMX: Use semi-colon instead of comma for exit-handlers initialization Reviewed-by: Mark Kanda Signed-off-by: Liran Alon Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 9a2ae9f6b6bbd3ef05d5e5977ace854e9b8f04b5 Author: Nitesh Narayan Lal Date: Wed Nov 20 07:12:24 2019 -0500 KVM: x86: Zero the IOAPIC scan request dest vCPUs bitmap Not zeroing the bitmap used for identifying the destination vCPUs for an IOAPIC scan request in fixed delivery mode could lead to waking up unwanted vCPUs. This patch zeroes the vCPU bitmap before passing it to kvm_bitmap_or_dest_vcpus(), which is responsible for setting the bitmap with the bits corresponding to the destination vCPUs. Fixes: 7ee30bc132c6("KVM: x86: deliver KVM IOAPIC scan request to target vCPUs") Signed-off-by: Nitesh Narayan Lal Signed-off-by: Paolo Bonzini commit 407e62f52aadd8124dcba407f18a03aedce9b86a Merge: 20a15ee040f2 585d1183ffee Author: Thomas Gleixner Date: Wed Nov 20 14:16:34 2019 +0100 Merge tag 'irqchip-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates from Marc Zyngier: - Qualcomm PDC wakeup interrupt support - Layerscape external IRQ support - Broadcom bcm7038 PM and wakeup support - Ingenic driver cleanup and modernization - GICv3 ITS preparation for GICv4.1 updates - GICv4 fixes - Various cleanups commit a5c8b2ae2e5123c8a6b291e2c56ba5c39b645a95 Author: Manish Narani Date: Wed Nov 20 12:17:29 2019 +0530 mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup Apart from taps set by auto tuning, ZynqMP platform has feature to set the tap values manually. Add support to set tap delay values in HW via ZynqMP SoC framework. Signed-off-by: Manish Narani Signed-off-by: Ulf Hansson commit 1297eacfe79ed084f2608c43b31f3881ec9ffa7b Author: Manish Narani Date: Wed Nov 20 12:17:28 2019 +0530 dt-bindings: mmc: arasan: Document 'xlnx,zynqmp-8.9a' controller Add documentation for 'xlnx,zynqmp-8.9a' SDHCI controller and optional properties followed by example. Signed-off-by: Manish Narani Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson commit 1ed7d5c8f82d2aebabb6fe24f436a68bdd8c1065 Author: Manish Narani Date: Wed Nov 20 12:17:27 2019 +0530 firmware: xilinx: Add SDIO Tap Delay nodes Add tap delay nodes for setting SDIO Tap Delays on ZynqMP platform. Signed-off-by: Manish Narani Signed-off-by: Ulf Hansson commit f3dafc374a82929c679a0e791f43cc53268af952 Author: Manish Narani Date: Wed Nov 20 12:17:26 2019 +0530 mmc: sdhci-of-arasan: Add support to set clock phase delays for SD Add support to read Clock Phase Delays from the DT and set it via clk_set_phase() API from clock framework. Some of the controllers might have their own handling of setting clock delays, for this keep the set_clk_delays as function pointer which can be assigned controller specific handling of the same. Signed-off-by: Manish Narani Signed-off-by: Ulf Hansson commit fec81c5bca2499b4a263667860018c2ce47f4f51 Author: Manish Narani Date: Wed Nov 20 12:17:25 2019 +0530 dt-bindings: mmc: Add optional generic properties for mmc Add optional properties for mmc hosts which are used to set clk delays for different speed modes in the controller. Signed-off-by: Manish Narani Signed-off-by: Ulf Hansson commit 07a14d1df4547ebc0104331511f25e2a7f3a8858 Author: Manish Narani Date: Wed Nov 20 12:17:24 2019 +0530 mmc: sdhci-of-arasan: Add sampling clock for a phy to use There are some operations like setting the clock delays may need to have two clocks, one for output path and one for input path. Adding input path clock for some phys to use. Signed-off-by: Manish Narani Signed-off-by: Ulf Hansson commit 1963ae50999b68f845961f5c3b83f91a393f59bd Author: Manish Narani Date: Wed Nov 20 12:17:23 2019 +0530 dt-bindings: mmc: arasan: Update Documentation for the input clock Add documentation for an optional input clock which is essentially used in sampling the input data coming from the card. Signed-off-by: Manish Narani Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson commit e1463618cd8c1c381ef343cb6efb413ae355eb07 Author: Manish Narani Date: Wed Nov 20 12:17:22 2019 +0530 mmc: sdhci-of-arasan: Separate out clk related data to another structure To improve the code readability, use two different structs, one for clock provider data and one for mmc platform data. Signed-off-by: Manish Narani Signed-off-by: Ulf Hansson commit b0b19ce6e47ce17761a25e6c247d8749c8842992 Author: Fabio Estevam Date: Tue Nov 19 12:55:03 2019 -0300 mmc: sdhci: Fix grammar in warning message The correct form is "did not become", so fix it accordingly. Signed-off-by: Fabio Estevam Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 76216850b207ff61ef409903495bf4535050bc84 Author: Ivan Mikhaylov Date: Mon Nov 18 13:46:46 2019 +0300 mmc: sdhci-of-aspeed: add inversion signal presence Add read_l callback in sdhci_ops with flipping of SDHCI_CARD_PRESENT bit in case of inverted card detection signal. Signed-off-by: Ivan Mikhaylov Reviewed-by: Andrew Jeffery Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 9679062263c389e1c6ed81f7c0b85824c4179218 Author: Ivan Mikhaylov Date: Mon Nov 18 13:46:45 2019 +0300 mmc: sdhci-of-aspeed: enable CONFIG_MMC_SDHCI_IO_ACCESSORS Enable CONFIG_MMC_SDHCI_IO_ACCESSORS for the ASPEED MMC driver. The read_l callback is used for inverted card detection. Signed-off-by: Ivan Mikhaylov Reviewed-by: Andrew Jeffery Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit f545702b74f93b96bf70cf3fb12f5d68ce6ad677 Author: Faiz Abbas Date: Mon Nov 18 13:06:09 2019 +0530 mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E Add Support for CQHCI (Command Queuing Host Controller Interface) for each of the host controllers present in TI's J721E devices. Add cqhci_ops and a .irq() callback to handle cqhci specific interrupts. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 23cb16d2ccb5f819d7acff602e5a153157bf2884 Author: Lorenzo Bianconi Date: Sun Nov 17 14:26:14 2019 +0200 mt76: mt76u: fix endpoint definition order Even if they are not currently used fix BK/BE endpoint definition order. Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit acf5457fd99db6c9a42ef280494dfee949ee1e09 Author: Lorenzo Bianconi Date: Thu Nov 14 22:21:11 2019 +0200 mt76: mt7615: read {tx,rx} mask from eeprom Parse configured {tx,rx} mask from eeprom data instead of just setting it to four tx-rx streams Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e49c76d455a93b6cc978ae9e9fab2a1e551c147e Author: Lorenzo Bianconi Date: Thu Nov 14 17:12:07 2019 +0200 mt76: move mt76_get_antenna in mt76_core module Move mt76_get_antenna in mac80211.c in order to be reused by all drivers. Initialize .get_antenna function pointer for mt76x0, mt7603, mt7615 and mt76x2u drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e8b970c8e367e85fab9b8ac4f36080e5d653c38e Author: Lorenzo Bianconi Date: Thu Nov 7 01:01:58 2019 +0200 mt76: fix possible out-of-bound access in mt7615_fill_txs/mt7603_fill_txs Fix possible out-of-bound access of status rates array in mt7615_fill_txs/mt7603_fill_txs routines Fixes: c5211e997eca ("mt76: mt7603: rework and fix tx status reporting") Fixes: 4af81f02b49c ("mt76: mt7615: sync with mt7603 rate control changes") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 45876d6ebbd26d2df178d1d5410642e73a289f67 Author: Stanislaw Gruszka Date: Tue Nov 5 11:00:32 2019 +0100 Revert "mt76: mt76x0e: don't use hw encryption for MT7630E" This reverts commit 34b0e9b767bfa09ae233ca0d6ceb299bf2e24600. Since commit 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs") is no longer necessary to disable HW encryption for MT7630E. Disabling HW encryption helped previously because somehow fragmented skb's are not created if mac80211 encrypt frames, so buffer unmap bug of non-linear skbs was not triggered. Now since this bug is properly fixed by commit 7bd0650be63c ("mt76: dma: fix buffer unmap with non-linear skbs") , we can enable HW encryption back. Signed-off-by: Stanislaw Gruszka Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2b5d1b91e1741c48f00682dec7b1a0845f9792f3 Author: Lorenzo Bianconi Date: Fri Nov 1 23:21:07 2019 +0100 mt76: mt7615: disable radar pattern detector during scanning Set switch_reason to CH_SWITCH_SCAN_BYPASS_DPD during frequency scanning in order to disable radar pattern detector Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0eb8c104fd8dfc2a8636b09b3f908170f7c9d037 Author: Lorenzo Bianconi Date: Thu Oct 31 11:03:12 2019 +0100 mt76: move interface_modes definition in mt76_core module Move interface modes declaration in common code since now mt76 chipsets support all modes (NL80211_IFTYPE_STATION, NL80211_IFTYPE_AP, NL80211_IFTYPE_MESH_POINT and NL80211_IFTYPE_ADHOC) Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7f4b7920318b601bcea353b71d569a21846ffac5 Author: Lorenzo Bianconi Date: Tue Oct 8 00:49:00 2019 +0200 mt76: mt7615: add ibss support Enable IFTYPE_ADHOC support on 7615 devices. The feature has been tested using a mt76x2 device as wireless peer. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 19d0affadd6e6122742381813809f2d9f5c49eca Author: Lorenzo Bianconi Date: Thu Oct 31 09:15:09 2019 +0100 mt76: move SUPPORTS_REORDERING_BUFFER hw property in mt76_register_device Move SUPPORTS_REORDERING_BUFFER hw property configuration from chip specific code to mt76_register_device since it is supported by all mt76 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 61c51a74a4e58673e28e79447f44279b0a52686b Author: Lorenzo Bianconi Date: Tue Oct 29 14:34:44 2019 +0100 mt76: use mt76_dev in mt76_is_{mmio,usb} Convert mt76_is_mmio and mt76_is_usb to rely on mt76_dev instead of mt76x02_dev since this is a property not strictly related to hw chipset and it will be more reusable Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit cc53b52daa091ee875372d843255728c3ec941e4 Author: zhengbin Date: Tue Oct 29 12:48:39 2019 +0800 mt76: Remove set but not used variable 'idx' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/mediatek/mt76/dma.c: In function mt76_dma_rx_fill: drivers/net/wireless/mediatek/mt76/dma.c:377:6: warning: variable idx set but not used [-Wunused-but-set-variable] It is not used since commit 17f1de56df05 ("mt76: add common code shared between multiple chipsets") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Felix Fietkau commit 284efb473ef5f02a7f2c13fdf8d516ecc589bdf1 Author: Lorenzo Bianconi Date: Mon Oct 28 17:38:05 2019 +0100 mt76: mt76u: rely on a dedicated stats workqueue rate controller and throughput are very sensitive to tx status timing. In order to improve performances when the system is heavily loaded, substitute stat_work delayed_work with a regular work_struct and create a mt76u dedicated workqueue for tx status reporting Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 80df01f4dc79abbed724bbe0851cab3fe8ad9d99 Author: Lorenzo Bianconi Date: Mon Oct 28 16:21:41 2019 +0100 mt76: mt76u: rely on usb_interface instead of usb_dev usb drivers are supposed to communicate using usb_interface instead mt76x{0,2}u is now registering through usb_device. Fix it by passing usb_intf device to mt76_alloc_device routine. Fixes: 112f980ac8926 ("mt76usb: use usb_dev private data") Signed-off-by: Lorenzo Bianconi Tested-By: Zero_Chaos Signed-off-by: Felix Fietkau commit 5d1ad7d7bab0e9519c6f2a75fde6ab193279c5b3 Author: YueHaibing Date: Fri Oct 25 17:16:16 2019 +0800 mt76: mt7615: remove unneeded semicolon remove unneeded semicolon. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Felix Fietkau commit 2ec1e82bbf92c3031307beb89b59b589206c318c Author: Lorenzo Bianconi Date: Fri Oct 18 23:31:23 2019 +0200 mt76: mt76x0: remove 350ms delay in mt76x0_phy_calibrate Since mt76x0 does not save the phy calibration data it is not necessary to wait 350ms in mt76x0_phy_calibrate Tested-by: Sid Hayn Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b86b173f634f9d53ae226c8e7e8af9e163f759c0 Author: Lorenzo Bianconi Date: Fri Oct 18 00:50:04 2019 +0200 mt76: mt76x02u: update ewma pkt len in mt76x02u_tx_prepare_skb Update ewma packet length in mt76x02u_tx_prepare_skb as it is done for pci counterpart in order to properly estimate tx time on current channel Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3473750cd412e5506213e773e9fdd0729d1affe5 Author: Felix Fietkau Date: Mon Oct 14 12:01:09 2019 +0200 mt76: remove obsolete .add_buf() from struct mt76_queue_ops It hasn't been used in a while Signed-off-by: Felix Fietkau commit bf5238b25ac373cb2a544fe8554fd66fc9e04efc Author: Felix Fietkau Date: Thu Oct 10 21:59:46 2019 +0200 mt76: add sanity check for a-mpdu rx wcid index Avoid dereferencing invalid ids Signed-off-by: Felix Fietkau commit 237312c5e485804417e0f809f948112c3eb7fc96 Author: Lorenzo Bianconi Date: Tue Oct 15 17:16:43 2019 +0200 mt76: refactor cc_lock locking scheme Read busy counters not holding cc_lock spinlock since usb read can't be performed in interrupt context. Move cc_active and cc_rx counters out of cc_lock since they are not modified in interrupt context. Grab cc_lock updating cur_cc_bss_rx in mt76_airtime_report and do not hold rx_lock in mt76_update_survey. Moreover grab mt76 mutex in mt76_get_survey before running mt76_update_survey. This patch fixes the following 'schedule while atomic' [ 291.790866] BUG: scheduling while atomic: iw/2161/0x00000202 [ 291.791002] Preemption disabled at: [ 291.791007] [<0000000000000000>] 0x0 [ 291.791015] CPU: 0 PID: 2161 Comm: iw Tainted: G W 5.4.= 0-rc2-3-ARCH-00104-g9e208aa06c21 #1 [ 291.791017] Hardware name: LENOVO 2349QM6/2349QM6, BIOS G1ETC2WW (2.82=) 08/07/2019 [ 291.791019] Call Trace: [ 291.791042] dump_stack+0x5c/0x80 [ 291.791049] __schedule_bug.cold+0x8e/0x9b [ 291.791055] __schedule+0x5f8/0x770 [ 291.791062] schedule+0x43/0xd0 [ 291.791068] schedule_preempt_disabled+0x14/0x20 [ 291.791074] __mutex_lock.isra.0+0x18a/0x530 [ 291.791099] mt76u_rr+0x1f/0x40 [mt76_usb] [ 291.791113] mt76x02_update_channel+0x22/0x40 [mt76x02_lib] [ 291.791122] mt76_update_survey+0x42/0xe0 [mt76] [ 291.791129] mt76_get_survey+0x2f/0x1b0 [mt76] [ 291.791170] ieee80211_dump_survey+0x5e/0x140 [mac80211] [ 291.791217] nl80211_dump_survey+0x13c/0x2f0 [cfg80211] [ 291.791222] ? __kmalloc_reserve.isra.0+0x2d/0x70 [ 291.791225] ? __alloc_skb+0x96/0x1d0 [ 291.791229] netlink_dump+0x17b/0x370 [ 291.791247] __netlink_dump_start+0x16f/0x1e0 [ 291.791253] genl_family_rcv_msg+0x396/0x410 [ 291.791290] ? nl80211_prepare_wdev_dump+0x1b0/0x1b0 [cfg80211] [ 291.791297] ? _raw_spin_unlock_irqrestore+0x20/0x40 [ 291.791312] ? __wake_up_common_lock+0x8a/0xc0 [ 291.791316] genl_rcv_msg+0x47/0x90 [ 291.791320] ? genl_family_rcv_msg+0x410/0x410 [ 291.791323] netlink_rcv_skb+0x49/0x110 [ 291.791329] genl_rcv+0x24/0x40 [ 291.791333] netlink_unicast+0x171/0x200 [ 291.791340] netlink_sendmsg+0x208/0x3d0 [ 291.791358] sock_sendmsg+0x5e/0x60 [ 291.791361] ___sys_sendmsg+0x2ae/0x330 [ 291.791368] ? filemap_map_pages+0x272/0x390 [ 291.791374] ? _raw_spin_unlock+0x16/0x30 [ 291.791379] ? __handle_mm_fault+0x112f/0x1390 [ 291.791388] __sys_sendmsg+0x59/0xa0 [ 291.791396] do_syscall_64+0x5b/0x1a0 [ 291.791400] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 291.791404] RIP: 0033:0x7f5d0c7f37b7 [ 291.791418] Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 0= 0 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 [ 291.791421] RSP: 002b:00007ffe8b5d0538 EFLAGS: 00000246 ORIG_RAX: 0000= 00000000002e [ 291.791426] RAX: ffffffffffffffda RBX: 000055a038e6c390 RCX: 00007f5d0= c7f37b7 [ 291.791430] RDX: 0000000000000000 RSI: 00007ffe8b5d0570 RDI: 000000000= 0000003 [ 291.791434] RBP: 000055a038e718c0 R08: 000055a038e6c02a R09: 000000000= 0000002 [ 291.791438] R10: 000055a03808cb00 R11: 0000000000000246 R12: 000055a03= 8e71780 [ 291.791440] R13: 00007ffe8b5d0570 R14: 000055a038e717d0 R15: 000055a03= 8e718c0 [ 291.791480] NOHZ: local_softirq_pending 202 Fixes: 168aea24f4bb ("mt76: mt76x02u: enable survey support") Tested-by: Markus Theil Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d1bc9bf2072c04e3303339437788fe224a33a7fa Author: Pawel Dembicki Date: Fri Oct 4 15:23:49 2019 +0200 mt76: mt76x0: eeprom: add support for MAC address from OF mt76x0e driver only supports MAC addresses from calibration data eeprom. Many routers however do not have a valid stock address set in this field. This patch makes it possible to take a MAC address from OF (e.g. from mtd). Signed-off-by: Pawel Dembicki [adjusted for kernel submission] Signed-off-by: Adrian Schmutzler Signed-off-by: Felix Fietkau commit 3e0705acd4de7821d42bea7fb01938ff05fd4d58 Author: Felix Fietkau Date: Mon Oct 7 12:33:39 2019 +0200 mt76: avoid enabling interrupt if NAPI poll is still pending if napi_complete() returns false, it means that polling is still pending. Interrupts should not fire until the polling is no longer scheduled Signed-off-by: Felix Fietkau commit e7aaa72f4728451487d7a3fe54225796d08ab1e5 Author: Felix Fietkau Date: Mon Oct 7 12:30:46 2019 +0200 mt76: fix aggregation stop issue Cancel the workqueue after the tid has been cleaned up, in order to avoid a possible rescheduling from within the work function. Signed-off-by: Felix Fietkau commit fb7d95c6ee4f71ba131c9b3c65d658369ffd1128 Author: Felix Fietkau Date: Mon Oct 7 15:30:18 2019 +0200 mt76: drop rcu read lock in mt76_rx_aggr_stop A rcu read locked section is not allowed to sleep, and the rcu lock here isn't actually necessary, because we're holding dev->mutex. Fixes an issue when the tid work item is still running while freeing a station or stopping the aggregation session Signed-off-by: Felix Fietkau commit 1a817fa73c3b27a593aadf0029de24db1bbc1a3e Author: Felix Fietkau Date: Mon Oct 7 12:32:14 2019 +0200 mt76: add missing locking around ampdu action This is needed primarily to avoid races in dealing with rx aggregation related data structures Signed-off-by: Felix Fietkau commit 36f7e2b2bb1de86f0072cd49ca93d82b9e8fd894 Author: Felix Fietkau Date: Sun Sep 29 22:04:37 2019 +0200 mt76: do not use devm API for led classdev With the devm API, the unregister happens after the device cleanup is done, after which the struct mt76_dev which contains the led_cdev has already been freed. This leads to a use-after-free bug that can crash the system. Signed-off-by: Felix Fietkau commit 55857ab857975080d9e400ca85a7c192f7986ab9 Author: Felix Fietkau Date: Fri Sep 6 11:29:09 2019 +0200 mt76: enable airtime fairness It is supported by all hardware drivers now Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen commit b2c2f029683c4f42265c18dbb7e8ccbe06e6b01d Author: Lorenzo Bianconi Date: Wed Sep 18 12:58:05 2019 +0200 mt76: mt7615: track tx/rx airtime for airtime fairness Poll per-station hardware counters available in WTBL after tx/rx status events in order to report tx/rx airtime to mac80211 layer Co-developed-by: Felix Fietkau Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 87d3cdeb28113703d4caac5a6926e5a60ccedbeb Author: Lorenzo Bianconi Date: Wed Sep 18 12:58:03 2019 +0200 mt76: mt7615: introduce mt7615_mac_wtbl_update routine Introduce mt7615_mac_wtbl_update utility routine in order to update WTBL update register Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 29ed2a79de000a7cf48a2aba74f25b59f1bbc36d Author: Felix Fietkau Date: Thu Sep 26 18:23:56 2019 +0200 mt76: mt7615: fix survey channel busy time Like on mt7603, MIB status register 16 tracks CCA time, but does not include tx time. Switch to status register 9 to includ NAV and tx time as well. Signed-off-by: Felix Fietkau commit 6bfa6e38266d234c845c37e976084e6b524743b1 Author: Lorenzo Bianconi Date: Wed Sep 18 12:58:02 2019 +0200 mt76: mt7615: report tx_time, bss_rx and busy time to mac80211 Report tx time/rx time and obss time from hw mib counters to fill survey info requested by mac80211 Co-developed-by: Felix Fietkau Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 355f8d00c597f944213708d296e86a06f7a9ade8 Author: Felix Fietkau Date: Fri Sep 6 10:19:19 2019 +0200 mt76: mt76x02: track approximate tx airtime for airtime fairness and survey Estimate by calculating duration for EWMA packet size + estimated A-MPDU length on tx status events Signed-off-by: Felix Fietkau commit b02f42f4ed2ff5756780da024108866aa87aa528 Author: Felix Fietkau Date: Thu Sep 5 19:30:21 2019 +0200 mt76: mt76x02: move MT_CH_TIME_CFG init to mt76x02_mac_cc_reset Reduces code duplication and adds missing bits for USB variants Signed-off-by: Felix Fietkau commit aec65e484779c6326116be921cc1bf1aa8e85ecc Author: Felix Fietkau Date: Thu Sep 5 18:29:13 2019 +0200 mt76: unify channel survey update code Host time is used to calculate the channel active time on mt7603 and mt7615. Use the same on mt76x02 and move the lock to core code to get rid of some duplicated code. Signed-off-by: Felix Fietkau commit dcff8d4dc301c0601625ccae0dffec1bbef83234 Author: Felix Fietkau Date: Wed Sep 4 21:12:10 2019 +0200 mt76: mt7603: switch to a different counter for survey busy time MT_MIB_STAT_PSCCA only counts rx CCA busy time, which does not include tx time. MT_MIB_STAT_CCA counts full busy time, including Rx, Tx and NAV Signed-off-by: Felix Fietkau commit ea565833fd7848208eb63fc653d32a6ad3a86d87 Author: Felix Fietkau Date: Wed Sep 4 20:50:14 2019 +0200 mt76: mt7603: track tx airtime for airtime fairness and survey Poll per-station hardware counters after tx status events Signed-off-by: Felix Fietkau commit 5ce09c1a79074f613326f626f4781d21fc557296 Author: Felix Fietkau Date: Wed Sep 4 17:45:02 2019 +0200 mt76: track rx airtime for airtime fairness and survey Report total rx airtime for valid stations as BSS rx time in survey mt7615 is left out for now, it will be supported later by reading hardware counters instead of calculating airtime in software Signed-off-by: Felix Fietkau commit 0fd0eb54bfe09afc1c0fd5da2893338c215de276 Author: Felix Fietkau Date: Thu Sep 5 16:58:08 2019 +0200 mt76: store current channel survey_state in struct mt76_dev Move mt76_channel_state() from mt76.h to mac80211.c Preparation for updating channel state from more places in the drivers/core Signed-off-by: Felix Fietkau commit 9ec0b821b815243d60235220c45250805398147b Author: Felix Fietkau Date: Sat Aug 31 12:41:59 2019 +0200 mt76: rename mt76_driver_ops txwi_flags to drv_flags and include tx aligned4 This reduces the struct size and is useful for adding more flags later Signed-off-by: Felix Fietkau commit d515fdca46e7290547547f7a5e1a30c608eeb0ac Author: Felix Fietkau Date: Wed Aug 28 11:28:36 2019 +0200 mt76: report rx a-mpdu subframe status This can be used in monitor mode to figure out which subframes were sent as part of which A-MPDU Signed-off-by: Felix Fietkau commit 055da6cfd0dc5c87f8999f747cc9dce75b390419 Author: Felix Fietkau Date: Wed Aug 28 11:07:39 2019 +0200 mt76: mt7603: remove q_rx field from struct mt7603_dev It is no longer used Signed-off-by: Felix Fietkau commit 5a8d4678e02bb3ab89191336b505dd7a7212c4e3 Author: Lorenzo Bianconi Date: Fri Sep 13 09:05:54 2019 +0200 mt76: mt7603: collect aggregation stats Introduce ampdu_stat entry in mt7603 debugfs in order to dump 802.11 aggr cumulative statistics Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 75601194a1c80f4d2a830ce36b9c3e3abfd8d006 Author: Lorenzo Bianconi Date: Fri Sep 13 09:05:53 2019 +0200 mt76: mt7615: collect aggregation stats Introduce ampdu_stat entry in mt7615 debugfs in order to dump 802.11 aggr cumulative statistics Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d7b47bbdd71cbd769501bf181d57e9ff12efc30b Author: Lorenzo Bianconi Date: Fri Sep 13 09:05:52 2019 +0200 mt76: move aggr_stats array in mt76_dev Move aggr_stats array from mt76x02_dev to mt76_dev in order to be reused adding aggregation stats for mt7603/mt7615 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 25990ed3816e0d47f56b5430bb9415d631e313a7 Author: Lorenzo Bianconi Date: Fri Sep 13 09:05:51 2019 +0200 mt76: mt7615: add queue entry in debugfs Introduce mt7615_queues_read routine to dump hw queue related info. Add hw ac queues statistics in mt7615 debugfs Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0b82a8e8024b34cf99094105a44ae959c21b7534 Author: Lorenzo Bianconi Date: Fri Sep 13 09:05:50 2019 +0200 mt76: move queue debugfs entry to driver specific code Move queue debugfs entry to driver specific code since mt7615 devices rely on a different queue layout Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fdb96b06040d0d410705f9b42851a75ec4106ae4 Author: Lorenzo Bianconi Date: Thu Sep 12 11:06:38 2019 +0200 mt76: mt76x02u: move mt76x02u_mac_start in mt76x02-usb module Unify mt76x02u_mac_start between mt76x2u and mt76x0u since the code is shared between both drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d5b3be417b015d4f401eba05943b5ca33137aecd Author: Lorenzo Bianconi Date: Thu Sep 12 11:06:37 2019 +0200 mt76: mt76x0u: reset counter starting the device Remove mt76x02_mac_reset_counters from mt76x0_init_hardware since it will be run starting the device Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ad571c93169bbefd834b2359b782c5a94174c321 Author: Lorenzo Bianconi Date: Thu Sep 12 11:06:36 2019 +0200 mt76: mt76x2: move mt76x02_mac_reset_counters in mt76x02_mac_start Move mt76x02_mac_reset_counters in mt76x02_mac_start and get rid of mt76x2_mac_start since it is just a wrapper for mt76x02_mac_start Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7b37cce09d187fdc4a2e2a57adb1b2e170d1dfe6 Author: Lorenzo Bianconi Date: Thu Sep 12 11:06:35 2019 +0200 mt76: mt76x02: move mac_reset_counter in mt76x02_lib module Unify mac_reset_counter routine and move it in mt76x02_lib module since it is shared by all mt76x02 drivers (pci/usb) Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 45971b2385d6a30b7d377c2e24728d680eae7553 Author: Lorenzo Bianconi Date: Fri Sep 6 17:29:04 2019 +0200 mt76: mt7615: enable SCS by default Enable Smart Carrier Sense algorithm by default in order to improve performances in a noisy environment Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4482455409b044ed64b48e5e9c153469e2df7f86 Author: Colin Ian King Date: Fri Sep 6 13:19:26 2019 +0100 mt76: mt76x0e: make array mt76x0_chan_map static const, makes object smaller Don't populate the array mt76x0_chan_map on the stack but instead make it static const. Makes the object code smaller by 80 bytes. Before: text data bss dec hex filename 7685 1192 0 8877 22ad mediatek/mt76/mt76x0/eeprom.o After: text data bss dec hex filename 7541 1256 0 8797 225d mediatek/mt76/mt76x0/eeprom.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Felix Fietkau commit af3076db14b1d143d53815bd37033a1b684ed6bc Author: Lorenzo Bianconi Date: Thu Sep 5 18:32:58 2019 +0200 mt76: usb: add lockdep_assert_held in __mt76u_vendor_request Introduce lockdep_assert_held macro in __mt76u_vendor_request routine and remove comments regarding usb_ctrl_mtx lock Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a670111131db75b53c6377f26b4ccf12fe3912c8 Author: Lorenzo Bianconi Date: Thu Aug 22 11:49:10 2019 +0200 mt76: remove empty flag in mt76_txq_schedule_list Remove empty flag in mt76_txq_schedule_list and mt76_txq_send_burst since we just need retry_q length to notify mac80211 to reschedule the current tx queue Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b0b2373db7fe3624f2c378795e21d23d9e23b06f Author: Felix Fietkau Date: Sun Sep 15 18:43:59 2019 +0200 mt76: use cancel_delayed_work_sync in mt76_rx_aggr_shutdown The workqueue item needs to be fully shut down before the struct can be freed. Signed-off-by: Felix Fietkau commit c7f647d9bdb062845592bd5fd56d726b554bb48b Author: Felix Fietkau Date: Sun Sep 15 18:43:14 2019 +0200 mt76: remove aggr_work field from struct mt76_wcid It is unused Signed-off-by: Felix Fietkau commit b4124a5b1a00d461e40c00755adda8ae05810648 Author: Felix Fietkau Date: Thu Sep 12 16:42:53 2019 +0200 mt76: mt7615: fix control frame rx in monitor mode Adjust filters and ensure frames don't get sent to MCU instead of host Signed-off-by: Felix Fietkau commit 72a81ad9d6d62dcb79f7e8ad66ffd1c768b72026 Author: Heiko Carstens Date: Sun Nov 17 14:55:38 2019 +0100 s390/smp: fix physical to logical CPU map for SMT If an SMT capable system is not IPL'ed from the first CPU the setup of the physical to logical CPU mapping is broken: the IPL core gets CPU number 0, but then the next core gets CPU number 1. Correct would be that all SMT threads of CPU 0 get the subsequent logical CPU numbers. This is important since a lot of code (like e.g. the CPU topology code) assumes that CPU maps are setup like this. If the mapping is broken the system will not IPL due to broken topology masks: [ 1.716341] BUG: arch topology broken [ 1.716342] the SMT domain not a subset of the MC domain [ 1.716343] BUG: arch topology broken [ 1.716344] the MC domain not a subset of the BOOK domain This scenario can usually not happen since LPARs are always IPL'ed from CPU 0 and also re-IPL is intiated from CPU 0. However older kernels did initiate re-IPL on an arbitrary CPU. If therefore a re-IPL from an old kernel into a new kernel is initiated this may lead to crash. Fix this by setting up the physical to logical CPU mapping correctly. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c2313594216b3fde9559e502bb36d14e9d601a56 Author: Vasily Gorbik Date: Thu Nov 14 14:08:28 2019 +0100 s390/early: move access registers setup in C code Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b8ce1fa4892cccff0576827c8fd7fcad1698de3b Author: Vasily Gorbik Date: Wed Nov 13 11:22:30 2019 +0100 s390/head64: remove unnecessary vdso_per_cpu_data setup vdso_per_cpu_data lowcore value is only needed for fully functional exception handlers, which are activated in setup_lowcore_dat_off. The same function does init vdso_per_cpu_data via vdso_alloc_boot_cpu. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c02ee6a16a260ae00a403be440e229fd8618486b Author: Vasily Gorbik Date: Tue Nov 12 17:35:28 2019 +0100 s390/early: move control registers setup in C code Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 13f9bae579c6bd051e58f326913dd09af1291208 Author: Vasily Gorbik Date: Tue Nov 5 17:33:20 2019 +0100 s390/kasan: support memcpy_real with TRACE_IRQFLAGS Currently if the kernel is built with CONFIG_TRACE_IRQFLAGS and KASAN and used as crash kernel it crashes itself due to trace_hardirqs_off/trace_hardirqs_on being called with DAT off. This happens because trace_hardirqs_off/trace_hardirqs_on are instrumented and kasan code tries to perform access to shadow memory to validate memory accesses. Kasan shadow memory is populated with vmemmap, so all accesses require DAT on. memcpy_real could be called with DAT on or off (with kasan enabled DAT is set even before early code is executed). Make sure that trace_hardirqs_off/trace_hardirqs_on are called with DAT on and only actual __memcpy_real is called with DAT off. Also annotate __memcpy_real and _memcpy_real with __no_sanitize_address to avoid further problems due to switching DAT off. Reviewed-by: Philipp Rudo Signed-off-by: Vasily Gorbik commit 0398d4ab1677f7d8cd43aac2aa29a93dfcf9e2e3 Author: YueHaibing Date: Thu Nov 14 15:30:05 2019 +0800 s390/crypto: Fix unsigned variable compared with zero s390_crypto_shash_parmsize() return type is int, it should not be stored in a unsigned variable, which compared with zero. Reported-by: Hulk Robot Fixes: 3c2eb6b76cab ("s390/crypto: Support for SHA3 via CPACF (MSA6)") Signed-off-by: YueHaibing Signed-off-by: Joerg Schmidbauer Signed-off-by: Vasily Gorbik commit 0122baaa93cc681faace064ec25d16bb5c9825ab Merge: 093b92287363 83faaf074e6d Author: Joonas Lahtinen Date: Wed Nov 20 13:21:38 2019 +0200 Merge tag 'gvt-next-fixes-2019-11-12' of https://github.com/intel/gvt-linux into drm-intel-next-fixes gvt-next-fixes-2019-11-12 - Remove PVINFO read for initial state (Tina) Signed-off-by: Joonas Lahtinen From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20191112062032.GO4196@zhen-hp.sh.intel.com commit 1992b66d2f55cf36a14072cfd977fdf4f0d2f2c2 Author: Bjorn Helgaas Date: Tue Nov 19 08:09:23 2019 -0600 PM: Wrap documentation to fit in 80 columns Wrap to 80 columns. No textual change except to correct some "it's" that should be "its". Signed-off-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki commit 5aa9ba6312e36c18626e73506b92d1513d815435 Author: Daniel Lezcano Date: Sat Nov 16 14:16:13 2019 +0100 cpuidle: Pass exit latency limit to cpuidle_use_deepest_state() Modify cpuidle_use_deepest_state() to take an additional exit latency limit argument to be passed to find_deepest_idle_state() and make cpuidle_idle_call() pass dev->forced_idle_latency_limit_ns to it for forced idle. Suggested-by: Rafael J. Wysocki Signed-off-by: Daniel Lezcano [ rjw: Rebase and rearrange code, subject & changelog ] Signed-off-by: Rafael J. Wysocki commit c55b51a06b01d67a99457bb82a8c31081c7faa23 Author: Daniel Lezcano Date: Sat Nov 16 14:16:12 2019 +0100 cpuidle: Allow idle injection to apply exit latency limit In some cases it may be useful to specify an exit latency limit for the idle state to be used during CPU idle time injection. Instead of duplicating the information in struct cpuidle_device or propagating the latency limit in the call stack, replace the use_deepest_state field with forced_latency_limit_ns to represent that limit, so that the deepest idle state with exit latency within that limit is forced (i.e. no governors) when it is set. A zero exit latency limit for forced idle means to use governors in the usual way (analogous to use_deepest_state equal to "false" before this change). Additionally, add play_idle_precise() taking two arguments, the duration of forced idle and the idle state exit latency limit, both in nanoseconds, and redefine play_idle() as a wrapper around that new function. This change is preparatory, no functional impact is expected. Suggested-by: Rafael J. Wysocki Signed-off-by: Daniel Lezcano [ rjw: Subject, changelog, cpuidle_use_deepest_state() kerneldoc, whitespace ] Signed-off-by: Rafael J. Wysocki commit 54fae6e31bed393a17512c1c8d2559bc737943c9 Author: Luca Coelho Date: Wed Apr 10 09:23:39 2019 +0300 iwlwifi: bump FW API to 52 for 22000 series Start supporting API version 52 for 22000 series. Signed-off-by: Luca Coelho commit 5974fbb5e10b018fdbe3c3b81cb4cc54e1105ab9 Author: Johannes Berg Date: Tue Nov 5 14:50:32 2019 +0100 iwlwifi: check kasprintf() return value kasprintf() can fail, we should check the return value. Fixes: 5ed540aecc2a ("iwlwifi: use mac80211 throughput trigger") Fixes: 8ca151b568b6 ("iwlwifi: add the MVM driver") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit b646a883ad74387ec17266e94720c46d6aaa1be2 Author: Johannes Berg Date: Mon Sep 30 14:16:18 2019 +0200 iwlwifi: mvm: remove outdated comment referring to wake lock There's no multicast wake lock in the driver, remove the comment that refers to it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 9b08ae2219b141a31de2935452e7fe20ea10a72d Author: Johannes Berg Date: Mon Sep 30 11:49:49 2019 +0200 iwlwifi: pcie: trace IOVA for iwlwifi_dev_tx_tb We trace the whole TFD with all TBs when in iwlwifi_dev_tx, but sometimes we add TBs to it later and then we don't have any of this data. Trace the I/O virtual address (IOVA) (it can be the physical address, or as returned by the IOMMU) here to aid debugging the DMA flows. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit e7babbe31fe28a812eb64dab16a0c4423c6ebadd Author: Denis Efremov Date: Wed Sep 25 23:49:35 2019 +0300 iwlwifi: dvm: excessive if in rs_bt_update_lq() There is no need to check 'priv->bt_ant_couple_ok' twice in rs_bt_update_lq(). The second check is always true. Thus, the expression can be simplified. Signed-off-by: Denis Efremov Signed-off-by: Luca Coelho commit e8503aeca3547d30087e8615156a7ba82a28b365 Author: Ben Greear Date: Thu Sep 5 14:28:01 2019 -0700 iwlwifi: mvm: Report tx/rx antennas This makes it easier for user-space to know how many antennas the radio has. Seems to work with the AX200 radio, at least. Signed-off-by: Ben Greear Signed-off-by: Luca Coelho commit 5661925a9b383f7cb348c196c6c69ab92f08102d Author: Johannes Berg Date: Fri Sep 27 11:11:20 2019 +0200 iwlwifi: pcie: rx: use rxq queue_size instead of constant This is a little less efficient now as it's known to be a multiqueue device in this function, but a future patch will have to use a variable here anyway, so use rxq->queue_size now instead to make it clearer. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 924f838b6b368f81bab7778fa829def1e8552246 Author: Johannes Berg Date: Fri Sep 27 18:36:10 2019 +0200 iwlwifi: mvm: remove left-over non-functional email alias This email alias (ilw@linux.intel.com) hasn't been functional for probably closer to a decade than not, remove it. It's not really clear to me how this ended up in new code though. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 49b7b35cf61f1b9f831dd3043c40c957a39d47aa Author: Johannes Berg Date: Fri Sep 27 10:42:38 2019 +0200 iwlwifi: config: remove max_rx_agg_size This field isn't set by any configuration, remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit ab393cb12d035be73d9064456dae86393713f392 Author: Johannes Berg Date: Fri Sep 27 12:54:14 2019 +0200 iwlwifi: pcie: make some RX functions static These aren't used outside the rx.c file, so make them static. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 17ffa21af93ad1558c12108701f6216ff1cc68c2 Author: Tova Mussai Date: Sun Sep 15 10:22:58 2019 +0300 iwlwifi: scan: support scan req FW API ver 13 1. Modify channel config flags to be used for legacy bands channels as well, to indicate SSIDs elements from ssidIEsArray. 2. Add new general flag. 3. Remove ssidNum from probe params. Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho commit 4f4925a7b23428d5719af5a2816586b2a0e6fd19 Author: Johannes Berg Date: Fri Jun 1 10:32:55 2018 +0200 iwlwifi: pcie: fix support for transmitting SKBs with fraglist When the implementation of SKBs with fraglist was sent upstream, a merge-damage occurred and half the patch was not applied. This causes problems in high-throughput situations with AX200 devices, including low throughput and FW crashes. Introduce the part that was missing from the original patch. Fixes: 0044f1716c4d ("iwlwifi: pcie: support transmitting SKBs with fraglist") Cc: stable@vger.kernel.org # 4.20+ Signed-off-by: Johannes Berg [ This patch was created by me, but the original author of this code is Johannes, so his s-o-b is here and he's marked as the author of the patch. ] Signed-off-by: Luca Coelho commit 093b922873633f57cb2d488a538afd15c4e4dcdb Author: Chris Wilson Date: Thu Nov 14 17:25:35 2019 +0000 drm/i915: Split i915_active.mutex into an irq-safe spinlock for the rbtree As we want to be able to run inside atomic context for retiring the i915_active, and we are no longer allowed to abuse mutex_trylock, split the tree management portion of i915_active.mutex into an irq-safe spinlock. References: a0855d24fc22d ("locking/mutex: Complain upon mutex API misuse in IRQ contexts") References: https://bugs.freedesktop.org/show_bug.cgi?id=111626 Fixes: 274cbf20fd10 ("drm/i915: Push the i915_active.retire into a worker") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191114172535.1116-1-chris@chris-wilson.co.uk (cherry picked from commit c9ad602feabe4271d2adf1bdae5d8b20c2dc84f1) Signed-off-by: Joonas Lahtinen commit e190de6941db14813032af87873f5550ad5764fe Author: Kai-Heng Feng Date: Wed Nov 20 16:20:35 2019 +0800 ALSA: hda - Add mute led support for HP ProBook 645 G4 Mic mute led does not work on HP ProBook 645 G4. We can use CXT_FIXUP_MUTE_LED_GPIO fixup to support it. Signed-off-by: Kai-Heng Feng Cc: Link: https://lore.kernel.org/r/20191120082035.18937-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 3ef240eaff36b8119ac9e2ea17cbf41179c930ba Author: Thomas Gleixner Date: Wed Nov 6 22:55:46 2019 +0100 futex: Prevent exit livelock Oleg provided the following test case: int main(void) { struct sched_param sp = {}; sp.sched_priority = 2; assert(sched_setscheduler(0, SCHED_FIFO, &sp) == 0); int lock = vfork(); if (!lock) { sp.sched_priority = 1; assert(sched_setscheduler(0, SCHED_FIFO, &sp) == 0); _exit(0); } syscall(__NR_futex, &lock, FUTEX_LOCK_PI, 0,0,0); return 0; } This creates an unkillable RT process spinning in futex_lock_pi() on a UP machine or if the process is affine to a single CPU. The reason is: parent child set FIFO prio 2 vfork() -> set FIFO prio 1 implies wait_for_child() sched_setscheduler(...) exit() do_exit() .... mm_release() tsk->futex_state = FUTEX_STATE_EXITING; exit_futex(); (NOOP in this case) complete() --> wakes parent sys_futex() loop infinite because tsk->futex_state == FUTEX_STATE_EXITING The same problem can happen just by regular preemption as well: task holds futex ... do_exit() tsk->futex_state = FUTEX_STATE_EXITING; --> preemption (unrelated wakeup of some other higher prio task, e.g. timer) switch_to(other_task) return to user sys_futex() loop infinite as above Just for the fun of it the futex exit cleanup could trigger the wakeup itself before the task sets its futex state to DEAD. To cure this, the handling of the exiting owner is changed so: - A refcount is held on the task - The task pointer is stored in a caller visible location - The caller drops all locks (hash bucket, mmap_sem) and blocks on task::futex_exit_mutex. When the mutex is acquired then the exiting task has completed the cleanup and the state is consistent and can be reevaluated. This is not a pretty solution, but there is no choice other than returning an error code to user space, which would break the state consistency guarantee and open another can of problems including regressions. For stable backports the preparatory commits ac31c7ff8624 .. ba31c1a48538 are required as well, but for anything older than 5.3.y the backports are going to be provided when this hits mainline as the other dependencies for those kernels are definitely not stable material. Fixes: 778e9a9c3e71 ("pi-futex: fix exit races and locking problems") Reported-by: Oleg Nesterov Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Stable Team Link: https://lkml.kernel.org/r/20191106224557.041676471@linutronix.de commit ac31c7ff8624409ba3c4901df9237a616c187a5d Author: Thomas Gleixner Date: Wed Nov 6 22:55:45 2019 +0100 futex: Provide distinct return value when owner is exiting attach_to_pi_owner() returns -EAGAIN for various cases: - Owner task is exiting - Futex value has changed The caller drops the held locks (hash bucket, mmap_sem) and retries the operation. In case of the owner task exiting this can result in a live lock. As a preparatory step for seperating those cases, provide a distinct return value (EBUSY) for the owner exiting case. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.935606117@linutronix.de commit 3f186d974826847a07bc7964d79ec4eded475ad9 Author: Thomas Gleixner Date: Wed Nov 6 22:55:44 2019 +0100 futex: Add mutex around futex exit The mutex will be used in subsequent changes to replace the busy looping of a waiter when the futex owner is currently executing the exit cleanup to prevent a potential live lock. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.845798895@linutronix.de commit af8cbda2cfcaa5515d61ec500498d46e9a8247e2 Author: Thomas Gleixner Date: Wed Nov 6 22:55:43 2019 +0100 futex: Provide state handling for exec() as well exec() attempts to handle potentially held futexes gracefully by running the futex exit handling code like exit() does. The current implementation has no protection against concurrent incoming waiters. The reason is that the futex state cannot be set to FUTEX_STATE_DEAD after the cleanup because the task struct is still active and just about to execute the new binary. While its arguably buggy when a task holds a futex over exec(), for consistency sake the state handling can at least cover the actual futex exit cleanup section. This provides state consistency protection accross the cleanup. As the futex state of the task becomes FUTEX_STATE_OK after the cleanup has been finished, this cannot prevent subsequent attempts to attach to the task in case that the cleanup was not successfull in mopping up all leftovers. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.753355618@linutronix.de commit 4a8e991b91aca9e20705d434677ac013974e0e30 Author: Thomas Gleixner Date: Wed Nov 6 22:55:42 2019 +0100 futex: Sanitize exit state handling Instead of having a smp_mb() and an empty lock/unlock of task::pi_lock move the state setting into to the lock section. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.645603214@linutronix.de commit 18f694385c4fd77a09851fd301236746ca83f3cb Author: Thomas Gleixner Date: Wed Nov 6 22:55:41 2019 +0100 futex: Mark the begin of futex exit explicitly Instead of relying on PF_EXITING use an explicit state for the futex exit and set it in the futex exit function. This moves the smp barrier and the lock/unlock serialization into the futex code. As with the DEAD state this is restricted to the exit path as exec continues to use the same task struct. This allows to simplify that logic in a next step. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.539409004@linutronix.de commit f24f22435dcc11389acc87e5586239c1819d217c Author: Thomas Gleixner Date: Wed Nov 6 22:55:40 2019 +0100 futex: Set task::futex_state to DEAD right after handling futex exit Setting task::futex_state in do_exit() is rather arbitrarily placed for no reason. Move it into the futex code. Note, this is only done for the exit cleanup as the exec cleanup cannot set the state to FUTEX_STATE_DEAD because the task struct is still in active use. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.439511191@linutronix.de commit 150d71584b12809144b8145b817e83b81158ae5f Author: Thomas Gleixner Date: Wed Nov 6 22:55:39 2019 +0100 futex: Split futex_mm_release() for exit/exec To allow separate handling of the futex exit state in the futex exit code for exit and exec, split futex_mm_release() into two functions and invoke them from the corresponding exit/exec_mm_release() callsites. Preparatory only, no functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.332094221@linutronix.de commit 4610ba7ad877fafc0a25a30c6c82015304120426 Author: Thomas Gleixner Date: Wed Nov 6 22:55:38 2019 +0100 exit/exec: Seperate mm_release() mm_release() contains the futex exit handling. mm_release() is called from do_exit()->exit_mm() and from exec()->exec_mm(). In the exit_mm() case PF_EXITING and the futex state is updated. In the exec_mm() case these states are not touched. As the futex exit code needs further protections against exit races, this needs to be split into two functions. Preparatory only, no functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.240518241@linutronix.de commit 3d4775df0a89240f671861c6ab6e8d59af8e9e41 Author: Thomas Gleixner Date: Wed Nov 6 22:55:37 2019 +0100 futex: Replace PF_EXITPIDONE with a state The futex exit handling relies on PF_ flags. That's suboptimal as it requires a smp_mb() and an ugly lock/unlock of the exiting tasks pi_lock in the middle of do_exit() to enforce the observability of PF_EXITING in the futex code. Add a futex_state member to task_struct and convert the PF_EXITPIDONE logic over to the new state. The PF_EXITING dependency will be cleaned up in a later step. This prepares for handling various futex exit issues later. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.149449274@linutronix.de commit ba31c1a48538992316cc71ce94fa9cd3e7b427c0 Author: Thomas Gleixner Date: Wed Nov 6 22:55:36 2019 +0100 futex: Move futex exit handling into futex code The futex exit handling is #ifdeffed into mm_release() which is not pretty to begin with. But upcoming changes to address futex exit races need to add more functionality to this exit code. Split it out into a function, move it into futex code and make the various futex exit functions static. Preparatory only and no functional change. Folded build fix from Borislav. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191106224556.049705556@linutronix.de commit eac08515d7bd665d306cefa2ae9f3de56e875d6d Author: zhengbin Date: Tue Nov 19 10:25:14 2019 +0800 rtl8xxxu: Remove set but not used variable 'vif','dev','len' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function rtl8xxxu_c2hcmd_callback: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5396:24: warning: variable vif set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function rtl8xxxu_c2hcmd_callback: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5397:17: warning: variable dev set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function rtl8xxxu_c2hcmd_callback: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5400:6: warning: variable len set but not used [-Wunused-but-set-variable] They are introduced by commit e542e66b7c2e ("rtl8xxxu: add bluetooth co-existence support for single antenna"), but never used, so remove them. Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit 4f61563da075bc8faefddfd5f8fc0cc14c49650a Author: Rafał Miłecki Date: Mon Nov 18 13:38:55 2019 +0100 brcmfmac: remove monitor interface when detaching This fixes a minor WARNING in the cfg80211: [ 130.658034] ------------[ cut here ]------------ [ 130.662805] WARNING: CPU: 1 PID: 610 at net/wireless/core.c:954 wiphy_unregister+0xb4/0x198 [cfg80211] Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo commit 5d26a6a6150c486f51ea2aaab33af04db02f63b8 Author: Rafał Miłecki Date: Mon Nov 18 12:53:08 2019 +0100 brcmfmac: disable PCIe interrupts before bus reset Keeping interrupts on could result in brcmfmac freeing some resources and then IRQ handlers trying to use them. That was obviously a straight path for crashing a kernel. Example: CPU0 CPU1 ---- ---- brcmf_pcie_reset brcmf_pcie_bus_console_read brcmf_detach ... brcmf_fweh_detach brcmf_proto_detach brcmf_pcie_isr_thread ... brcmf_proto_msgbuf_rx_trigger ... drvr->proto->pd brcmf_pcie_release_irq [ 363.789218] Unable to handle kernel NULL pointer dereference at virtual address 00000038 [ 363.797339] pgd = c0004000 [ 363.800050] [00000038] *pgd=00000000 [ 363.803635] Internal error: Oops: 17 [#1] SMP ARM (...) [ 364.029209] Backtrace: [ 364.031725] [] (brcmf_proto_msgbuf_rx_trigger [brcmfmac]) from [] (brcmf_pcie_isr_thread+0x228/0x274 [brcmfmac]) [ 364.043662] r7:00000001 r6:c8ca0000 r5:00010000 r4:c7b4f800 Fixes: 4684997d9eea ("brcmfmac: reset PCIe bus on a firmware crash") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo commit 3dff7c6e37499c87a7ba3f728b2ad1775cbbf725 Author: Yan-Hsuan Chuang Date: Mon Nov 18 17:54:32 2019 +0800 rtw88: allows to enable/disable HCI link PS mechanism Different interfaces have its own link-related power save mechanism. Such as PCI can enter L1 state based on the traffic on the link, and sometimes driver needs to enable/disable it to avoid some issues, like throughput degrade when PCI trying to enter L1 state even if driver is having heavy traffic. For now, rtw88 only supports PCIE chips, and they just need to disable ASPM L1 when driver is not in power save mode, such as IPS and LPS. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit d2e2c47e65af7310ad7d40ebf4cbb1d898719ec2 Author: Yan-Hsuan Chuang Date: Mon Nov 18 17:54:31 2019 +0800 rtw88: pci: enable CLKREQ function if host supports it By Realtek's design, there are two HW modules associated for CLKREQ, one is responsible to follow the PCIE host settings, and another is to actually working on it. But the module that is actually working on it is default disabled, and driver should enable that module if host and device have successfully sync'ed with each other. The module is default disabled because sometimes the host does not support it, and if there is any incorrect settings (ex. CLKREQ# is not Bi-Direction), device can be lost and disconnected to the host. So driver should first check after host and device are sync'ed, and the host does support the function and set it in configuration space, then driver can turn on the HW module to working on it. Signed-off-by: Yan-Hsuan Chuang Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit ff3297f62fff6fc90d35051eec48913dbd9cbb18 Author: Yan-Hsuan Chuang Date: Mon Nov 18 17:54:30 2019 +0800 rtw88: pci: use for loop instead of while loop for DBI/MDIO Use a for loop to polling DBI/MDIO read/write flags to avoid infinite loop happens Signed-off-by: Yan-Hsuan Chuang Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit 83a5a2d76f996ff47dc9fbf09d80bbff6bf85e71 Author: Yan-Hsuan Chuang Date: Mon Nov 18 17:54:29 2019 +0800 rtw88: pci: use macros to access PCI DBI/MDIO registers Add some register and bit macros to access DBI/MDIO register. This should not change the logic. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit df0af4c7bac47039c97682fbf2c1cbe6efb08950 Author: Mikhail Karpenko Date: Mon Nov 18 08:23:16 2019 +0000 qtnfmac: process HE capabilities requests Pass HE interface type data requests between firmware and driver. Signed-off-by: Mikhail Karpenko Signed-off-by: Kalle Valo commit be4f00cf15925903138577263bfc2366183a0704 Author: Mikhail Karpenko Date: Mon Nov 18 08:23:14 2019 +0000 qtnfmac: add TLV for extension IEs Extension information elements have additional field for ID. This commit adds TLV for such elements and a structure for interface HE capabilities communication with firmware. Signed-off-by: Mikhail Karpenko Signed-off-by: Kalle Valo commit 1db359946bd1602dd7a70ca461c7cfb3835ab270 Author: Igor Mitsyanko Date: Mon Nov 18 08:23:12 2019 +0000 qtnfmac: signal that all packets coming from device are already flooded Firmware floods all packets that need to be flooded (multicast, broadcast, unknown unicast) as required. Tell kernel bridge subsystem it does not need to flood packet itself by marking each incoming frame with skb->offload_fwd_mark flag. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 4e14e76cee382619766176095ac0c10651980b66 Author: Igor Mitsyanko Date: Mon Nov 18 08:23:10 2019 +0000 qtnfmac: advertise netdev port parent ID Use MAC address of the first active radio as a unique device ID. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 904628d3130b5aef0c9b06efa80e5a96f203e000 Author: Igor Mitsyanko Date: Mon Nov 18 08:23:08 2019 +0000 qtnfmac: add interface ID to each packet Add interface ID information to the tail of each transmitted packet so that firmware can know to which interface the packet belongs to. This is only needed if device supports HW switch capability. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit decfc5c70d206fdfba5de8405eb9148de6d7897b Author: Igor Mitsyanko Date: Mon Nov 18 08:23:06 2019 +0000 qtnfmac: track broadcast domain of each interface If firmware reports that it supports hardware switch capabilities, driver needs to track and notify device whenever broadcast domain of a particular network device changes (ie. whenever it's upper master device changes). Firmware needs a unique ID to tell broadcast domains from each other which is an opaque number otherwise. For that purpose we can use netspace:ifidx pair to uniquely identify each broadcast domain: - if netdev is not part of a bridge, then use it's own ifidx as a broadcast domain ID - if netdev is part of a bridge, then use bridge netdev ifidx as broadcast domain ID Firmware makes sure that packets are only forwarded between interfaces marked with the same broadcast domain ID. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 45028223425dc37d3452da7e9bd01f7789024ee7 Author: Igor Mitsyanko Date: Mon Nov 18 08:23:04 2019 +0000 qtnfmac: remove VIF in firmware in case of error Currently in case of error when registering network device with the kernel, we won't properly cleanup VIF state in firmware due to DEL_VIF command will not be send to wifi card. Make sure it does. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 4c8c0d8f709d16f418a5d1962b4eda86ff570151 Author: Ping-Ke Shih Date: Mon Nov 18 11:14:55 2019 +0800 rtlwifi: set proper udelay within rf_serial_read Since read RF register is an indirect access that hardware needs time to accomplish read action, but there's no ready bit, so delay is required to guarantee the read value is correct. After investigating internal documents, these delays are reduced as proper values. Reported-by: Lucas Stach Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit 92541dd9dda5ab474751e24cdb4253eb290b8b33 Author: Ping-Ke Shih Date: Mon Nov 18 11:14:54 2019 +0800 rtlwifi: rf_lock use non-irqsave spin_lock rf_lock is used to protect RF register access, but they will not called from interrupt context, so *_irqsave version isn't necessary. Then, these delays don't affect IRQ services. The old code holds spin_lock_irqsave() that will be detected a long delay as below: kworker/-276 4d... 0us : _raw_spin_lock_irqsave kworker/-276 4d... 0us : rtl8723_phy_rf_serial_read <-rtl8723de_phy_set_rf_reg kworker/-276 4d... 1us : rtl8723_phy_query_bb_reg <-rtl8723_phy_rf_serial_read kworker/-276 4d... 3us : rtl8723_phy_set_bb_reg <-rtl8723_phy_rf_serial_read kworker/-276 4d... 4us : __const_udelay <-rtl8723_phy_rf_serial_read kworker/-276 4d... 4us!: delay_mwaitx <-rtl8723_phy_rf_serial_read kworker/-276 4d... 1004us : rtl8723_phy_set_bb_reg <-rtl8723_phy_rf_serial_read [...] Reported-by: Lucas Stach Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit f89f1aefff5a53917579bbf8b85be09d7cc17daf Author: zhengbin Date: Sat Nov 16 15:41:23 2019 +0800 ipw2x00: remove set but not used variable 'force_update' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/intel/ipw2x00/ipw2100.c: In function shim__set_security: drivers/net/wireless/intel/ipw2x00/ipw2100.c:5582:9: warning: variable force_update set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 805a57acd7b52e1ba0ad2649e33c585bba958633 Author: zhengbin Date: Sat Nov 16 15:41:22 2019 +0800 ipw2x00: remove set but not used variable 'reason' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/intel/ipw2x00/ipw2200.c: In function ipw_wx_set_mlme: drivers/net/wireless/intel/ipw2x00/ipw2200.c:6805:9: warning: variable reason set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 7af496b9eb0433bc4cb478c9a46f85509cdb5541 Author: zhengbin Date: Sat Nov 16 15:22:47 2019 +0800 brcmfmac: remove set but not used variable 'mpnum','nsp','nmp' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c: In function brcmf_chip_dmp_get_regaddr: drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:790:5: warning: variable mpnum set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c: In function brcmf_chip_dmp_erom_scan: drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:866:10: warning: variable nsp set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c: In function brcmf_chip_dmp_erom_scan: drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:866:5: warning: variable nmp set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 65309ef6b258f5a7b57c1033a82ba2aba5c434cc Author: Laurence Oberman Date: Tue Nov 19 10:46:34 2019 -0500 scsi: bnx2fc: timeout calculation invalid for bnx2fc_eh_abort() In the bnx2fc_eh_abort() function there is a calculation for wait_for_completion that uses a HZ multiplier. This is incorrect, it scales the timeout by 1000 seconds instead of converting the ms value to jiffies. Therefore change the calculation. Link: https://lore.kernel.org/r/1574178394-16635-1-git-send-email-loberman@redhat.com Reported-by: David Jeffery Reviewed-by: John Pittman Reviewed-by: Chad Dupuis Signed-off-by: Laurence Oberman Signed-off-by: Martin K. Petersen commit c941e0d172605731de9b4628bd4146d35cf2e7d6 Author: Bart Van Assche Date: Thu Nov 7 13:55:25 2019 -0800 scsi: target: core: Fix a pr_debug() argument Print the string for which conversion failed instead of printing the function name twice. Fixes: 2650d71e244f ("target: move transport ID handling to the core") Cc: Christoph Hellwig Link: https://lore.kernel.org/r/20191107215525.64415-1-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 238191d65d7217982d69e21c1d623616da34b281 Author: Anatol Pomazau Date: Fri Nov 15 19:47:35 2019 -0500 scsi: iscsi: Don't send data to unbound connection If a faulty initiator fails to bind the socket to the iSCSI connection before emitting a command, for instance, a subsequent send_pdu, it will crash the kernel due to a null pointer dereference in sock_sendmsg(), as shown in the log below. This patch makes sure the bind succeeded before trying to use the socket. BUG: kernel NULL pointer dereference, address: 0000000000000018 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 3 PID: 7 Comm: kworker/u8:0 Not tainted 5.4.0-rc2.iscsi+ #13 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 24.158246] Workqueue: iscsi_q_0 iscsi_xmitworker [ 24.158883] RIP: 0010:apparmor_socket_sendmsg+0x5/0x20 [...] [ 24.161739] RSP: 0018:ffffab6440043ca0 EFLAGS: 00010282 [ 24.162400] RAX: ffffffff891c1c00 RBX: ffffffff89d53968 RCX: 0000000000000001 [ 24.163253] RDX: 0000000000000030 RSI: ffffab6440043d00 RDI: 0000000000000000 [ 24.164104] RBP: 0000000000000030 R08: 0000000000000030 R09: 0000000000000030 [ 24.165166] R10: ffffffff893e66a0 R11: 0000000000000018 R12: ffffab6440043d00 [ 24.166038] R13: 0000000000000000 R14: 0000000000000000 R15: ffff9d5575a62e90 [ 24.166919] FS: 0000000000000000(0000) GS:ffff9d557db80000(0000) knlGS:0000000000000000 [ 24.167890] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 24.168587] CR2: 0000000000000018 CR3: 000000007a838000 CR4: 00000000000006e0 [ 24.169451] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 24.170320] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 24.171214] Call Trace: [ 24.171537] security_socket_sendmsg+0x3a/0x50 [ 24.172079] sock_sendmsg+0x16/0x60 [ 24.172506] iscsi_sw_tcp_xmit_segment+0x77/0x120 [ 24.173076] iscsi_sw_tcp_pdu_xmit+0x58/0x170 [ 24.173604] ? iscsi_dbg_trace+0x63/0x80 [ 24.174087] iscsi_tcp_task_xmit+0x101/0x280 [ 24.174666] iscsi_xmit_task+0x83/0x110 [ 24.175206] iscsi_xmitworker+0x57/0x380 [ 24.175757] ? __schedule+0x2a2/0x700 [ 24.176273] process_one_work+0x1b5/0x360 [ 24.176837] worker_thread+0x50/0x3c0 [ 24.177353] kthread+0xf9/0x130 [ 24.177799] ? process_one_work+0x360/0x360 [ 24.178401] ? kthread_park+0x90/0x90 [ 24.178915] ret_from_fork+0x35/0x40 [ 24.179421] Modules linked in: [ 24.179856] CR2: 0000000000000018 [ 24.180327] ---[ end trace b4b7674b6df5f480 ]--- Signed-off-by: Anatol Pomazau Co-developed-by: Frank Mayhar Signed-off-by: Frank Mayhar Co-developed-by: Bharath Ravi Signed-off-by: Bharath Ravi Co-developed-by: Khazhimsel Kumykov Signed-off-by: Khazhimsel Kumykov Co-developed-by: Gabriel Krisman Bertazi Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit e9d3009cb936bd0faf0719f68d98ad8afb1e613b Author: Bart Van Assche Date: Wed Nov 13 14:05:08 2019 -0800 scsi: target: iscsi: Wait for all commands to finish before freeing a session The iSCSI target driver is the only target driver that does not wait for ongoing commands to finish before freeing a session. Make the iSCSI target driver wait for ongoing commands to finish before freeing a session. This patch fixes the following KASAN complaint: BUG: KASAN: use-after-free in __lock_acquire+0xb1a/0x2710 Read of size 8 at addr ffff8881154eca70 by task kworker/0:2/247 CPU: 0 PID: 247 Comm: kworker/0:2 Not tainted 5.4.0-rc1-dbg+ #6 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Workqueue: target_completion target_complete_ok_work [target_core_mod] Call Trace: dump_stack+0x8a/0xd6 print_address_description.constprop.0+0x40/0x60 __kasan_report.cold+0x1b/0x33 kasan_report+0x16/0x20 __asan_load8+0x58/0x90 __lock_acquire+0xb1a/0x2710 lock_acquire+0xd3/0x200 _raw_spin_lock_irqsave+0x43/0x60 target_release_cmd_kref+0x162/0x7f0 [target_core_mod] target_put_sess_cmd+0x2e/0x40 [target_core_mod] lio_check_stop_free+0x12/0x20 [iscsi_target_mod] transport_cmd_check_stop_to_fabric+0xd8/0xe0 [target_core_mod] target_complete_ok_work+0x1b0/0x790 [target_core_mod] process_one_work+0x549/0xa40 worker_thread+0x7a/0x5d0 kthread+0x1bc/0x210 ret_from_fork+0x24/0x30 Allocated by task 889: save_stack+0x23/0x90 __kasan_kmalloc.constprop.0+0xcf/0xe0 kasan_slab_alloc+0x12/0x20 kmem_cache_alloc+0xf6/0x360 transport_alloc_session+0x29/0x80 [target_core_mod] iscsi_target_login_thread+0xcd6/0x18f0 [iscsi_target_mod] kthread+0x1bc/0x210 ret_from_fork+0x24/0x30 Freed by task 1025: save_stack+0x23/0x90 __kasan_slab_free+0x13a/0x190 kasan_slab_free+0x12/0x20 kmem_cache_free+0x146/0x400 transport_free_session+0x179/0x2f0 [target_core_mod] transport_deregister_session+0x130/0x180 [target_core_mod] iscsit_close_session+0x12c/0x350 [iscsi_target_mod] iscsit_logout_post_handler+0x136/0x380 [iscsi_target_mod] iscsit_response_queue+0x8de/0xbe0 [iscsi_target_mod] iscsi_target_tx_thread+0x27f/0x370 [iscsi_target_mod] kthread+0x1bc/0x210 ret_from_fork+0x24/0x30 The buggy address belongs to the object at ffff8881154ec9c0 which belongs to the cache se_sess_cache of size 352 The buggy address is located 176 bytes inside of 352-byte region [ffff8881154ec9c0, ffff8881154ecb20) The buggy address belongs to the page: page:ffffea0004553b00 refcount:1 mapcount:0 mapping:ffff888101755400 index:0x0 compound_mapcount: 0 flags: 0x2fff000000010200(slab|head) raw: 2fff000000010200 dead000000000100 dead000000000122 ffff888101755400 raw: 0000000000000000 0000000080130013 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881154ec900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881154ec980: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8881154eca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881154eca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881154ecb00: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc Cc: Mike Christie Link: https://lore.kernel.org/r/20191113220508.198257-3-bvanassche@acm.org Reviewed-by: Roman Bolshakov Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 80647a89eaf3f2549741648f3230cd6ff68c23b4 Author: Bart Van Assche Date: Wed Nov 13 14:05:07 2019 -0800 scsi: target: core: Release SPC-2 reservations when closing a session The SCSI specs require releasing SPC-2 reservations when a session is closed. Make sure that the target core does this. Running the libiscsi tests triggers the KASAN complaint shown below. This patch fixes that use-after-free. BUG: KASAN: use-after-free in target_check_reservation+0x171/0x980 [target_core_mod] Read of size 8 at addr ffff88802ecd1878 by task iscsi_trx/17200 CPU: 0 PID: 17200 Comm: iscsi_trx Not tainted 5.4.0-rc1-dbg+ #1 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x8a/0xd6 print_address_description.constprop.0+0x40/0x60 __kasan_report.cold+0x1b/0x34 kasan_report+0x16/0x20 __asan_load8+0x58/0x90 target_check_reservation+0x171/0x980 [target_core_mod] __target_execute_cmd+0xb1/0xf0 [target_core_mod] target_execute_cmd+0x22d/0x4d0 [target_core_mod] transport_generic_new_cmd+0x31f/0x5b0 [target_core_mod] transport_handle_cdb_direct+0x6f/0x90 [target_core_mod] iscsit_execute_cmd+0x381/0x3f0 [iscsi_target_mod] iscsit_sequence_cmd+0x13b/0x1f0 [iscsi_target_mod] iscsit_process_scsi_cmd+0x4c/0x130 [iscsi_target_mod] iscsit_get_rx_pdu+0x8e8/0x15f0 [iscsi_target_mod] iscsi_target_rx_thread+0x105/0x1b0 [iscsi_target_mod] kthread+0x1bc/0x210 ret_from_fork+0x24/0x30 Allocated by task 1079: save_stack+0x23/0x90 __kasan_kmalloc.constprop.0+0xcf/0xe0 kasan_slab_alloc+0x12/0x20 kmem_cache_alloc+0xfe/0x3a0 transport_alloc_session+0x29/0x80 [target_core_mod] iscsi_target_login_thread+0xceb/0x1920 [iscsi_target_mod] kthread+0x1bc/0x210 ret_from_fork+0x24/0x30 Freed by task 17193: save_stack+0x23/0x90 __kasan_slab_free+0x13a/0x190 kasan_slab_free+0x12/0x20 kmem_cache_free+0xc8/0x3e0 transport_free_session+0x179/0x2f0 [target_core_mod] transport_deregister_session+0x121/0x170 [target_core_mod] iscsit_close_session+0x12c/0x350 [iscsi_target_mod] iscsit_logout_post_handler+0x136/0x380 [iscsi_target_mod] iscsit_response_queue+0x8fa/0xc00 [iscsi_target_mod] iscsi_target_tx_thread+0x28e/0x390 [iscsi_target_mod] kthread+0x1bc/0x210 ret_from_fork+0x24/0x30 The buggy address belongs to the object at ffff88802ecd1860 which belongs to the cache se_sess_cache of size 352 The buggy address is located 24 bytes inside of 352-byte region [ffff88802ecd1860, ffff88802ecd19c0) The buggy address belongs to the page: page:ffffea0000bb3400 refcount:1 mapcount:0 mapping:ffff8880bef2ed00 index:0x0 compound_mapcount: 0 flags: 0x1000000000010200(slab|head) raw: 1000000000010200 dead000000000100 dead000000000122 ffff8880bef2ed00 raw: 0000000000000000 0000000080270027 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88802ecd1700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802ecd1780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802ecd1800: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb ^ ffff88802ecd1880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802ecd1900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Cc: Mike Christie Link: https://lore.kernel.org/r/20191113220508.198257-2-bvanassche@acm.org Reviewed-by: Roman Bolshakov Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 11bf1d14b2d6fd4f144d8ee3ac2e71057fc0ec35 Author: Bart Van Assche Date: Thu Nov 7 13:54:58 2019 -0800 scsi: target: core: Document target_cmd_size_check() Since it is nontrivial to derive the meaning of the size argument from the code, add a documentation header above target_cmd_size_check(). Cc: Mike Christie Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Nicholas Bellinger Link: https://lore.kernel.org/r/20191107215458.64242-1-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 29d28f2b8d3736ac61c28ef7e20fda63795b74d9 Author: Pan Bian Date: Wed Nov 6 20:32:21 2019 +0800 scsi: bnx2i: fix potential use after free The member hba->pcidev may be used after its reference is dropped. Move the put function to where it is never used to avoid potential use after free issues. Fixes: a77171806515 ("[SCSI] bnx2i: Removed the reference to the netdev->base_addr") Link: https://lore.kernel.org/r/1573043541-19126-1-git-send-email-bianpan2016@163.com Signed-off-by: Pan Bian Signed-off-by: Martin K. Petersen commit 5a993e507ee65a28eca6690ee11868555c4ca46b Author: Martin K. Petersen Date: Mon Nov 18 23:55:45 2019 -0500 Revert "scsi: qla2xxx: Fix memory leak when sending I/O fails" This reverts commit 2f856d4e8c23f5ad5221f8da4a2f22d090627f19. This patch was found to introduce a double free regression. The issue it originally attempted to address was fixed in patch f45bca8c5052 ("scsi: qla2xxx: Fix double scsi_done for abort path"). Link: https://lore.kernel.org/r/4BDE2B95-835F-43BE-A32C-2629D7E03E0A@marvell.com Requested-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 0b7a223552d455bcfba6fb9cfc5eef2b5fce1491 Author: Finn Thain Date: Sat Nov 16 14:36:57 2019 +1100 scsi: NCR5380: Add disconnect_mask module parameter Add a module parameter to inhibit disconnect/reselect for individual targets. This gains compatibility with Aztec PowerMonster SCSI/SATA adapters with buggy firmware. (No fix is available from the vendor.) Apparently these adapters pass-through the product/vendor of the attached SATA device. Since they can't be identified from the response to an INQUIRY command, a device blacklist flag won't work. Cc: Michael Schmitz Link: https://lore.kernel.org/r/993b17545990f31f9fa5a98202b51102a68e7594.1573875417.git.fthain@telegraphics.com.au Reviewed-and-tested-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit d04fc41af247a2ce993155bce7995d857464a096 Author: Finn Thain Date: Sat Nov 16 14:36:57 2019 +1100 scsi: NCR5380: Unconditionally clear ICR after do_abort() When do_abort() succeeds, the target will go to BUS FREE phase and there will be no connected command. Therefore, that function should clear the Initiator Command Register before returning. It already does so in case of NCR5380_poll_politely() failure; do the same for the other error case too, that is, NCR5380_transfer_pio() failure. Cc: Michael Schmitz Cc: Ondrej Zary Link: https://lore.kernel.org/r/4277b28ee2551f884aefa85965ef3c498344f301.1573875417.git.fthain@telegraphics.com.au Reviewed-and-tested-by: Michael Schmitz Tested-by: Ondrej Zary Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 350767f20be86ee58f862caddadcfa192b9b976d Author: Finn Thain Date: Sat Nov 16 14:36:57 2019 +1100 scsi: NCR5380: Call scsi_set_resid() on command completion Most NCR5380 drivers calculate the residual for every data transfer. (A few drivers just set it to zero.) Pass this quantity back to the scsi mid-layer on command completion. Cc: Michael Schmitz Cc: Ondrej Zary Link: https://lore.kernel.org/r/1f26ead9dd0dc053fcd27979d69a7ca74b6589b4.1573875417.git.fthain@telegraphics.com.au Reviewed-and-tested-by: Michael Schmitz Tested-by: Ondrej Zary Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit aa5334c4f3014940f11bf876e919c956abef4089 Author: Maurizio Lombardi Date: Fri Nov 15 17:37:27 2019 +0100 scsi: scsi_debug: num_tgts must be >= 0 Passing the parameter "num_tgts=-1" will start an infinite loop that exhausts the system memory Link: https://lore.kernel.org/r/20191115163727.24626-1-mlombard@redhat.com Signed-off-by: Maurizio Lombardi Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 4583a4f66b323c6e4d774be2649e83a4e7c7b78c Author: James Smart Date: Fri Nov 15 16:38:47 2019 -0800 scsi: lpfc: use hdwq assigned cpu for allocation Looking at the recent conversion from smp_processor_id() to raw_smp_processor_id(), realized that the allocation should be based on the cpu the hdwq is bound to, not the executing cpu. Revise to pull cpu number from the hdwq Fixes: 765ab6cdac3b ("scsi: lpfc: Fix a kernel warning triggered by lpfc_get_sgl_per_hdwq()") Link: https://lore.kernel.org/r/20191116003847.6141-1-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9b44ffab49e337982d4717cfa6799eceaf7359a3 Author: Colin Ian King Date: Thu Nov 14 18:00:07 2019 +0000 scsi: arcmsr: fix indentation issues There are a few statements that are indented incorrectly, fix these. Link: https://lore.kernel.org/r/20191114180007.325856-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 3fe3d2428b62822b7b030577cd612790bdd8c941 Author: Pan Bian Date: Tue Nov 5 17:25:27 2019 +0800 scsi: qla4xxx: fix double free bug The variable init_fw_cb is released twice, resulting in a double free bug. The call to the function dma_free_coherent() before goto is removed to get rid of potential double free. Fixes: 2a49a78ed3c8 ("[SCSI] qla4xxx: added IPv6 support.") Link: https://lore.kernel.org/r/1572945927-27796-1-git-send-email-bianpan2016@163.com Signed-off-by: Pan Bian Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 044f59de3a3de9c193cfc600c7a3045b24b3079f Author: Deepak Ukey Date: Thu Nov 14 15:39:10 2019 +0530 scsi: pm80xx: Modified the logic to collect fatal dump Added the correct method to collect the fatal dump. Link: https://lore.kernel.org/r/20191114100910.6153-14-deepak.ukey@microchip.com Reported-by: kbuild test robot Acked-by: Jack Wang Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit 7295493682aaa68e0826b61af4b88941363075ca Author: Vikram Auradkar Date: Thu Nov 14 15:39:09 2019 +0530 scsi: pm80xx: Tie the interrupt name to the module instance With MSI-x enabled, the interrupt instances are where the prefix is fixed for all module instances, making it a little harder to track down what's what. Link: https://lore.kernel.org/r/20191114100910.6153-13-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: Vikram Auradkar Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit e2773c67e24a6ae93355767eb236e0a22200993e Author: Deepak Ukey Date: Thu Nov 14 15:39:08 2019 +0530 scsi: pm80xx: Controller fatal error through sysfs Added support to check controller fatal error through sysfs. Link: https://lore.kernel.org/r/20191114100910.6153-12-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit 3e253d9657b06b20ab289caba81941c6249afd0b Author: peter chang Date: Thu Nov 14 15:39:07 2019 +0530 scsi: pm80xx: Do not request 12G sas speeds Occasionally, 6G capable drives fail to train at 6G on links that look good from a signal-integrity perspective. PMC suggests configuring the port to not even expect 12G. Link: https://lore.kernel.org/r/20191114100910.6153-11-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: peter chang Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit 51c1c5f6ed64c2b65a8cf89dac136273d25ca540 Author: peter chang Date: Thu Nov 14 15:39:06 2019 +0530 scsi: pm80xx: Cleanup command when a reset times out Added the fix so the if driver properly sent the abort it tries to remove it from the firmware's list of outstanding commands regardless of the abort status. This means that the task gets freed 'now' rather than possibly getting freed later when the scsi layer thinks it's leaked but still valid. Link: https://lore.kernel.org/r/20191114100910.6153-10-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: peter chang Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit 91a43fa61f102e045d9bac07a4b7739a4bbe623a Author: peter chang Date: Thu Nov 14 15:39:05 2019 +0530 scsi: pm80xx: Fix command issue sizing The commands to the controller are sent in fixed sized chunks which are set per-chip-generation and stashed in iomb_size. The driver fills in structs matching the register layout and memcpy this to memory shared with the controller. However, there are two problem cases: 1) Things like phy_start_req are too large because they share the sas_identify_frame definition with libsas, and it includes the crc word. This means that it's overwriting the start of the next command block, that's ok except if it happens at the end of the shared memory area. 2) Things like set_nvm_data_req which are shared between the HAL layers. This means that it's sending 'random' data for things that are in the reserved area. So far we haven't found a case where the controller FW cares, but sending possible gibberish (for most of the structures this is in the reserved area so previously zeroed) is not recommended. Link: https://lore.kernel.org/r/20191114100910.6153-9-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: peter chang Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit a88d9db94c4c9fb2b6ce9f5748928bef46aa9885 Author: Vikram Auradkar Date: Thu Nov 14 15:39:04 2019 +0530 scsi: pm80xx: Fix dereferencing dangling pointer sas_task structure should not be used after task_done is called. If the device is gone or not attached, we call task_done on t and continue to use in the sas_task in rest of the function. task_done is pointing to sas_ata_task_done, may free the memory associated with the task before returning. Link: https://lore.kernel.org/r/20191114100910.6153-8-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: Vikram Auradkar Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit e90e236250e9edd2584a3405d0b2482ef687a637 Author: ianyar Date: Thu Nov 14 15:39:03 2019 +0530 scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check The function mpi_uninit_check takes longer for inbound doorbell register to be cleared. Increased the timeout substantially so that the driver does not fail to load. Link: https://lore.kernel.org/r/20191114100910.6153-7-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: ianyar Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit 7370672dc3e7e4bf73cc2bb5ece8ad47fdb00e39 Author: peter chang Date: Thu Nov 14 15:39:02 2019 +0530 scsi: pm80xx: Squashed logging cleanup changes The default logging doesn't include the device name, so it's difficult to determine which controller is being logged about in error scenarios. The logging level was only settable via sysfs, which made it inconvenient for actual debugging. This changes the default to only cover error handling. Link: https://lore.kernel.org/r/20191114100910.6153-6-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: peter chang Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit 4daf1ef3c681754159411bd7ee0aecf2d43acf59 Author: Vikram Auradkar Date: Thu Nov 14 15:39:01 2019 +0530 scsi: pm80xx: Convert 'long' mdelay to msleep For delays longer than 20ms [um]delay isn't recommended. pm80xx_chip_soft_rst starts off with a 500ms delay before it even gets around to checking for the results of the reset. As long as it's at least 500ms it doesn't matter what the scheduler is doing. The delay in the pm8001_exec_internal_task_abort does nothing, and theory is this is a delay to avoid a double-free. Link: https://lore.kernel.org/r/20191114100910.6153-5-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: Vikram Auradkar Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit cef1538456ba1f965289c778c418460106d0c1c7 Author: John Sperbeck Date: Thu Nov 14 15:39:00 2019 +0530 scsi: pm80xx: Initialize variable used as return status In pm8001_task_exec(), if the PHY is down, then we return the current value of 'rc'. We need to make sure it's initialized. Link: https://lore.kernel.org/r/20191114100910.6153-4-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: John Sperbeck Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit e703977b505ff010c3e99c4793c353c5d5e28f84 Author: peter chang Date: Thu Nov 14 15:38:59 2019 +0530 scsi: pm80xx: Make phy enable completion as NULL After the completing the mpi_phy_start_resp, make phy enable completion as NULL. Link: https://lore.kernel.org/r/20191114100910.6153-3-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: peter chang Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit ce21c63ee995b7a8b7b81245f2cee521f8c3c220 Author: peter chang Date: Thu Nov 14 15:38:58 2019 +0530 scsi: pm80xx: Fix for SATA device discovery Driver was missing complete() call in mpi_sata_completion which result in SATA abort error handling timing out. That causes the device to be left in the in_recovery state so subsequent commands sent to the device fail and the OS removes access to it. Link: https://lore.kernel.org/r/20191114100910.6153-2-deepak.ukey@microchip.com Acked-by: Jack Wang Signed-off-by: peter chang Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit 6d303e4b19d694cdbebf76bcdb51ada664ee953d Author: Subhash Jadavani Date: Thu Nov 14 22:09:30 2019 -0800 scsi: ufs: Fix error handing during hibern8 enter During clock gating (ufshcd_gate_work()), we first put the link hibern8 by calling ufshcd_uic_hibern8_enter() and if ufshcd_uic_hibern8_enter() returns success (0) then we gate all the clocks. Now let’s zoom in to what ufshcd_uic_hibern8_enter() does internally: It calls __ufshcd_uic_hibern8_enter() and if failure is encountered, link recovery shall put the link back to the highest HS gear and returns success (0) to ufshcd_uic_hibern8_enter() which is the issue as link is still in active state due to recovery! Now ufshcd_uic_hibern8_enter() returns success to ufshcd_gate_work() and hence it goes ahead with gating the UFS clock while link is still in active state hence I believe controller would raise UIC error interrupts. But when we service the interrupt, clocks might have already been disabled! This change fixes for this by returning failure from __ufshcd_uic_hibern8_enter() if recovery succeeds as link is still not in hibern8, upon receiving the error ufshcd_hibern8_enter() would initiate retry to put the link state back into hibern8. Link: https://lore.kernel.org/r/1573798172-20534-8-git-send-email-cang@codeaurora.org Reviewed-by: Avri Altman Reviewed-by: Bean Huo Signed-off-by: Subhash Jadavani Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 18f01374b55b4595ad7f56250891bdbdb9d7a052 Author: Asutosh Das Date: Thu Nov 14 22:09:29 2019 -0800 scsi: ufs: Abort gating if clock on request is pending This change attempts to abort gating of clocks if a request to turn-on clocks is pending. This would in turn avoid turning OFF and back ON the clocks. Link: https://lore.kernel.org/r/1573798172-20534-7-git-send-email-cang@codeaurora.org Reviewed-by: Bean Huo Signed-off-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 9333d77573485c827b4c0fc960c840df3e5ce719 Author: Venkat Gopalakrishnan Date: Thu Nov 14 22:09:28 2019 -0800 scsi: ufs: Fix irq return code Return IRQ_HANDLED only if the irq is really handled, this will help in catching spurious interrupts that go unhandled. Link: https://lore.kernel.org/r/1573798172-20534-6-git-send-email-cang@codeaurora.org Reviewed-by: Avri Altman Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit b2e2f0e6a6f910c906c083584b6e0afd12266f22 Author: YueHaibing Date: Tue Nov 19 22:21:13 2019 +0800 bpf: Make array_map_mmap static Fix sparse warning: kernel/bpf/arraymap.c:481:5: warning: symbol 'array_map_mmap' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191119142113.15388-1-yuehaibing@huawei.com commit 24f65050276a4f82d5832e974dabfb5be5c07c39 Author: Andrii Nakryiko Date: Tue Nov 19 16:25:10 2019 -0800 selftests/bpf: Enforce no-ALU32 for test_progs-no_alu32 With the most recent Clang, alu32 is enabled by default if -mcpu=probe or -mcpu=v3 is specified. Use a separate build rule with -mcpu=v2 to enforce no ALU32 mode. Suggested-by: Yonghong Song Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191120002510.4130605-1-andriin@fb.com commit 272630feb4c0d274cc4f018c5dcc24bc94f685c7 Author: Rahul Lakkireddy Date: Tue Nov 19 13:00:56 2019 +0530 cxgb4: remove unneeded semicolon for switch block Semicolon is not required at the end of switch block. So, remove it. Addresses coccinelle warning: drivers/net/ethernet/chelsio/cxgb4/sge.c:2260:2-3: Unneeded semicolon Fixes: 4846d5330daf ("cxgb4: add Tx and Rx path for ETHOFLD traffic") Reported-by: kbuild test robot Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit b8fc7177d8aef1cc9c83b98e29097861adc84b49 Author: Vladimir Oltean Date: Mon Nov 18 20:16:57 2019 +0200 net: dsa: felix: Fix CPU port assignment when not last port On the NXP LS1028A, there are 2 Ethernet links between the Felix switch and the ENETC: - eno2 <-> swp4, at 2.5G - eno3 <-> swp5, at 1G Only one of the above Ethernet port pairs can act as a DSA link for tagging. When adding initial support for the driver, it was tested only on the 1G eno3 <-> swp5 interface, due to the necessity of using PHYLIB initially (which treats fixed-link interfaces as emulated C22 PHYs, so it doesn't support fixed-link speeds higher than 1G). After making PHYLINK work, it appears that swp4 still can't act as CPU port. So it looks like ocelot_set_cpu_port was being called for swp4, but then it was called again for swp5, overwriting the CPU port assigned in the DT. It appears that when you call dsa_upstream_port for a port that is not defined in the device tree (such as swp5 when using swp4 as CPU port), its dp->cpu_dp pointer is not initialized by dsa_tree_setup_default_cpu, and this trips up the following condition in dsa_upstream_port: if (!cpu_dp) return port; So the moral of the story is: don't call dsa_upstream_port for a port that is not defined in the device tree, and therefore its dsa_port structure is not completely initialized (ds->num_ports is still 6). Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a0d7da26ce86a25e97ae191cb90574ada6daea98 Author: Andrii Nakryiko Date: Tue Nov 19 14:44:47 2019 -0800 libbpf: Fix call relocation offset calculation bug When relocating subprogram call, libbpf doesn't take into account relo->text_off, which comes from symbol's value. This generally works fine for subprograms implemented as static functions, but breaks for global functions. Taking a simplified test_pkt_access.c as an example: __attribute__ ((noinline)) static int test_pkt_access_subprog1(volatile struct __sk_buff *skb) { return skb->len * 2; } __attribute__ ((noinline)) static int test_pkt_access_subprog2(int val, volatile struct __sk_buff *skb) { return skb->len + val; } SEC("classifier/test_pkt_access") int test_pkt_access(struct __sk_buff *skb) { if (test_pkt_access_subprog1(skb) != skb->len * 2) return TC_ACT_SHOT; if (test_pkt_access_subprog2(2, skb) != skb->len + 2) return TC_ACT_SHOT; return TC_ACT_UNSPEC; } When compiled, we get two relocations, pointing to '.text' symbol. .text has st_value set to 0 (it points to the beginning of .text section): 0000000000000008 000000050000000a R_BPF_64_32 0000000000000000 .text 0000000000000040 000000050000000a R_BPF_64_32 0000000000000000 .text test_pkt_access_subprog1 and test_pkt_access_subprog2 offsets (targets of two calls) are encoded within call instruction's imm32 part as -1 and 2, respectively: 0000000000000000 test_pkt_access_subprog1: 0: 61 10 00 00 00 00 00 00 r0 = *(u32 *)(r1 + 0) 1: 64 00 00 00 01 00 00 00 w0 <<= 1 2: 95 00 00 00 00 00 00 00 exit 0000000000000018 test_pkt_access_subprog2: 3: 61 10 00 00 00 00 00 00 r0 = *(u32 *)(r1 + 0) 4: 04 00 00 00 02 00 00 00 w0 += 2 5: 95 00 00 00 00 00 00 00 exit 0000000000000000 test_pkt_access: 0: bf 16 00 00 00 00 00 00 r6 = r1 ===> 1: 85 10 00 00 ff ff ff ff call -1 2: bc 01 00 00 00 00 00 00 w1 = w0 3: b4 00 00 00 02 00 00 00 w0 = 2 4: 61 62 00 00 00 00 00 00 r2 = *(u32 *)(r6 + 0) 5: 64 02 00 00 01 00 00 00 w2 <<= 1 6: 5e 21 08 00 00 00 00 00 if w1 != w2 goto +8 7: bf 61 00 00 00 00 00 00 r1 = r6 ===> 8: 85 10 00 00 02 00 00 00 call 2 9: bc 01 00 00 00 00 00 00 w1 = w0 10: 61 62 00 00 00 00 00 00 r2 = *(u32 *)(r6 + 0) 11: 04 02 00 00 02 00 00 00 w2 += 2 12: b4 00 00 00 ff ff ff ff w0 = -1 13: 1e 21 01 00 00 00 00 00 if w1 == w2 goto +1 14: b4 00 00 00 02 00 00 00 w0 = 2 0000000000000078 LBB0_3: 15: 95 00 00 00 00 00 00 00 exit Now, if we compile example with global functions, the setup changes. Relocations are now against specifically test_pkt_access_subprog1 and test_pkt_access_subprog2 symbols, with test_pkt_access_subprog2 pointing 24 bytes into its respective section (.text), i.e., 3 instructions in: 0000000000000008 000000070000000a R_BPF_64_32 0000000000000000 test_pkt_access_subprog1 0000000000000048 000000080000000a R_BPF_64_32 0000000000000018 test_pkt_access_subprog2 Calls instructions now encode offsets relative to function symbols and are both set ot -1: 0000000000000000 test_pkt_access_subprog1: 0: 61 10 00 00 00 00 00 00 r0 = *(u32 *)(r1 + 0) 1: 64 00 00 00 01 00 00 00 w0 <<= 1 2: 95 00 00 00 00 00 00 00 exit 0000000000000018 test_pkt_access_subprog2: 3: 61 20 00 00 00 00 00 00 r0 = *(u32 *)(r2 + 0) 4: 0c 10 00 00 00 00 00 00 w0 += w1 5: 95 00 00 00 00 00 00 00 exit 0000000000000000 test_pkt_access: 0: bf 16 00 00 00 00 00 00 r6 = r1 ===> 1: 85 10 00 00 ff ff ff ff call -1 2: bc 01 00 00 00 00 00 00 w1 = w0 3: b4 00 00 00 02 00 00 00 w0 = 2 4: 61 62 00 00 00 00 00 00 r2 = *(u32 *)(r6 + 0) 5: 64 02 00 00 01 00 00 00 w2 <<= 1 6: 5e 21 09 00 00 00 00 00 if w1 != w2 goto +9 7: b4 01 00 00 02 00 00 00 w1 = 2 8: bf 62 00 00 00 00 00 00 r2 = r6 ===> 9: 85 10 00 00 ff ff ff ff call -1 10: bc 01 00 00 00 00 00 00 w1 = w0 11: 61 62 00 00 00 00 00 00 r2 = *(u32 *)(r6 + 0) 12: 04 02 00 00 02 00 00 00 w2 += 2 13: b4 00 00 00 ff ff ff ff w0 = -1 14: 1e 21 01 00 00 00 00 00 if w1 == w2 goto +1 15: b4 00 00 00 02 00 00 00 w0 = 2 0000000000000080 LBB2_3: 16: 95 00 00 00 00 00 00 00 exit Thus the right formula to calculate target call offset after relocation should take into account relocation's target symbol value (offset within section), call instruction's imm32 offset, and (subtracting, to get relative instruction offset) instruction index of call instruction itself. All that is shifted by number of instructions in main program, given all sub-programs are copied over after main program. Convert few selftests relying on bpf-to-bpf calls to use global functions instead of static ones. Fixes: 48cca7e44f9f ("libbpf: add support for bpf_call") Reported-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191119224447.3781271-1-andriin@fb.com commit 7c149057d044c52ed1e1d4ee50cf412c8d0f7295 Author: J. Bruce Fields Date: Tue Nov 19 16:05:33 2019 -0500 nfsd: restore NFSv3 ACL support An error in e333f3bbefe3 left the nfsd_acl_program->pg_vers array empty, which effectively turned off the server's support for NFSv3 ACLs. Fixes: e333f3bbefe3 "nfsd: Allow containers to set supported nfs versions" Cc: stable@vger.kernel.org Cc: Trond Myklebust Signed-off-by: J. Bruce Fields commit 677017d196ba2a4cfff13626b951cc9a206b8c7c Author: Sahitya Tummala Date: Wed Nov 13 16:01:03 2019 +0530 f2fs: Fix deadlock in f2fs_gc() context during atomic files handling The FS got stuck in the below stack when the storage is almost full/dirty condition (when FG_GC is being done). schedule_timeout io_schedule_timeout congestion_wait f2fs_drop_inmem_pages_all f2fs_gc f2fs_balance_fs __write_node_page f2fs_fsync_node_pages f2fs_do_sync_file f2fs_ioctl The root cause for this issue is there is a potential infinite loop in f2fs_drop_inmem_pages_all() for the case where gc_failure is true and when there an inode whose i_gc_failures[GC_FAILURE_ATOMIC] is not set. Fix this by keeping track of the total atomic files currently opened and using that to exit from this condition. Fix-suggested-by: Chao Yu Signed-off-by: Chao Yu Signed-off-by: Sahitya Tummala Signed-off-by: Jaegeuk Kim commit c45d6002ff7a322022560e9b19ad867b01fec77f Author: Chao Yu Date: Fri Nov 1 17:53:23 2019 +0800 f2fs: show f2fs instance in printk_ratelimited As Eric mentioned, bare printk{,_ratelimited} won't show which filesystem instance these message is coming from, this patch tries to show fs instance with sb->s_id field in all places we missed before. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 848a5e507e26176902e328bd8ae4a5e9c7d2bafe Author: Jin Yao Date: Mon Nov 18 22:08:49 2019 +0800 perf report: Jump to symbol source view from total cycles view This patch supports jumping from tui total cycles view to symbol source view. For example, perf record -b ./div perf report --total-cycles In total cycles view, we can select one entry and press 'a' or press ENTER key to jump to symbol source view. This patch also sets sort_order to NULL in cmd_report() which will use the default branch sort order. The percent value in new annotate view will be consistent with the percent in annotate view switched from perf report (we observed the original percent gap with previous patches). v2: --- Fix the 'make NO_SLANG=1' error. (set __maybe_unused to annotation_opts in block_hists_tui_browse()). Signed-off-by: Jin Yao Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191118140849.20714-2-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5cb456af99f58378fe90649d6faaab25e379be06 Author: Jin Yao Date: Mon Nov 18 22:08:48 2019 +0800 perf util: Move block TUI function to ui browsers It would be nice if we could jump to the assembler/source view (like the normal perf report) from total cycles view. This patch moves the block_hists_tui_browse from block-info.c to ui/browsers/hists.c in order to reuse some browser codes (i.e do_annotate) for implementing new annotation view. v2: --- Fix the 'make NO_SLANG=1' error. (Change 'int block_hists_tui_browse()' to 'static inline int block_hists_tui_browse()') Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191118140849.20714-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit bb1835a3b86c73aa534ef6430ad40223728dfbc0 Author: Alexey Budankov Date: Mon Nov 18 17:21:03 2019 +0300 perf session: Fix decompression of PERF_RECORD_COMPRESSED records Avoid termination of trace loading in case the last record in the decompressed buffer partly resides in the following mmaped PERF_RECORD_COMPRESSED record. In this case NULL value returned by fetch_mmaped_event() means to proceed to the next mmaped record then decompress it and load compressed events. The issue can be reproduced like this: $ perf record -z -- some_long_running_workload $ perf report --stdio -vv decomp (B): 44519 to 163000 decomp (B): 48119 to 174800 decomp (B): 65527 to 131072 fetch_mmaped_event: head=0x1ffe0 event->header_size=0x28, mmap_size=0x20000: fuzzed perf.data? Error: failed to process sample ... Testing: 71: Zstd perf.data compression/decompression : Ok $ tools/perf/perf report -vv --stdio decomp (B): 59593 to 262160 decomp (B): 4438 to 16512 decomp (B): 285 to 880 Looking at the vmlinux_path (8 entries long) Using vmlinux for symbols decomp (B): 57474 to 261248 prefetch_event: head=0x3fc78 event->header_size=0x28, mmap_size=0x3fc80: fuzzed or compressed perf.data? decomp (B): 25 to 32 decomp (B): 52 to 120 ... Fixes: 57fc032ad643 ("perf session: Avoid infinite loop when seeing invalid header.size") Link: https://marc.info/?l=linux-kernel&m=156580812427554&w=2 Co-developed-by: Jiri Olsa Acked-by: Jiri Olsa Signed-off-by: Alexey Budankov Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/cf782c34-f3f8-2f9f-d6ab-145cee0d5322@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 564f86d384755e3fbb5c00703d3695df89c1e049 Author: Rasmus Villemoes Date: Fri Oct 4 11:48:25 2019 +0200 clk: mark clk_disable_unused() as __init clk_disable_unused is only called once, as a late_initcall, so reclaim a bit of memory by marking it (and the functions and data it is the sole user of) as __init/__initdata. This moves ~1900 bytes from .text to .init.text for a imx_v6_v7_defconfig. Signed-off-by: Rasmus Villemoes Link: https://lkml.kernel.org/r/20191004094826.8320-1-linux@rasmusvillemoes.dk Reviewed-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd commit 8247470772beb38822f226c99a2ed8c195f6b438 Author: Kishon Vijay Abraham I Date: Tue Oct 22 12:41:53 2019 +0530 clk: Fix memory leak in clk_unregister() Memory allocated in alloc_clk() for 'struct clk' and 'const char *con_id' while invoking clk_register() is never freed in clk_unregister(), resulting in kmemleak showing the following backtrace. backtrace: [<00000000546f5dd0>] kmem_cache_alloc+0x18c/0x270 [<0000000073a32862>] alloc_clk+0x30/0x70 [<0000000082942480>] __clk_register+0xc8/0x760 [<000000005c859fca>] devm_clk_register+0x54/0xb0 [<00000000868834a8>] 0xffff800008c60950 [<00000000d5a80534>] platform_drv_probe+0x50/0xa0 [<000000001b3889fc>] really_probe+0x108/0x348 [<00000000953fa60a>] driver_probe_device+0x58/0x100 [<0000000008acc17c>] device_driver_attach+0x6c/0x90 [<0000000022813df3>] __driver_attach+0x84/0xc8 [<00000000448d5443>] bus_for_each_dev+0x74/0xc8 [<00000000294aa93f>] driver_attach+0x20/0x28 [<00000000e5e52626>] bus_add_driver+0x148/0x1f0 [<000000001de21efc>] driver_register+0x60/0x110 [<00000000af07c068>] __platform_driver_register+0x40/0x48 [<0000000060fa80ee>] 0xffff800008c66020 Fix it here. Cc: Tomi Valkeinen Cc: Tero Kristo Signed-off-by: Kishon Vijay Abraham I Link: https://lkml.kernel.org/r/20191022071153.21118-1-kishon@ti.com Fixes: 1df4046a93e0 ("clk: Combine __clk_get() and __clk_create_clk()") Signed-off-by: Stephen Boyd commit 0e3149f86b99ddabde8c5029eea0a9267e34f1a0 Author: Arnaldo Carvalho de Melo Date: Tue Nov 19 18:44:22 2019 -0300 perf dso: Move dso_id from 'struct map' to 'struct dso' And take it into account when looking up DSOs when we have the dso_id fields obtained from somewhere, like from PERF_RECORD_MMAP2 records. Instances of struct map pointing to the same DSO pathname but with anything in dso_id different are in fact different DSOs, so better have different 'struct dso' instances to reflect that. At some point we may want to get copies of the contents of the different objects if we want to do correct annotation or other analysis. With this we get 'struct map' 24 bytes leaner: $ pahole -C map ~/bin/perf struct map { union { struct rb_node rb_node __attribute__((__aligned__(8))); /* 0 24 */ struct list_head node; /* 0 16 */ } __attribute__((__aligned__(8))); /* 0 24 */ u64 start; /* 24 8 */ u64 end; /* 32 8 */ _Bool erange_warned:1; /* 40: 0 1 */ _Bool priv:1; /* 40: 1 1 */ /* XXX 6 bits hole, try to pack */ /* XXX 3 bytes hole, try to pack */ u32 prot; /* 44 4 */ u64 pgoff; /* 48 8 */ u64 reloc; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u64 (*map_ip)(struct map *, u64); /* 64 8 */ u64 (*unmap_ip)(struct map *, u64); /* 72 8 */ struct dso * dso; /* 80 8 */ refcount_t refcnt; /* 88 4 */ u32 flags; /* 92 4 */ /* size: 96, cachelines: 2, members: 13 */ /* sum members: 92, holes: 1, sum holes: 3 */ /* sum bitfield members: 2 bits, bit holes: 1, sum bit holes: 6 bits */ /* forced alignments: 1 */ /* last cacheline: 32 bytes */ } __attribute__((__aligned__(8))); $ Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-g4hxxmraplo7wfjmk384mfsb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3de88c9113f88c04abda339f1aa629397bf89e02 Author: Luigi Rizzo Date: Mon Nov 18 16:19:51 2019 -0800 net-af_xdp: Use correct number of channels from ethtool Drivers use different fields to report the number of channels, so take the maximum of all data channels (rx, tx, combined) when determining the size of the xsk map. The current code used only 'combined' which was set to 0 in some drivers e.g. mlx4. Tested: compiled and run xdpsock -q 3 -r -S on mlx4 Signed-off-by: Luigi Rizzo Signed-off-by: Alexei Starovoitov Reviewed-by: Jakub Kicinski Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20191119001951.92930-1-lrizzo@google.com commit 922eea2ce5c799228d9ff1be9890e6873ce8fff6 Author: Jan Beulich Date: Mon Nov 11 15:32:59 2019 +0100 x86/xen/32: Simplify ring check in xen_iret_crit_fixup() This can be had with two instead of six insns, by just checking the high CS.RPL bit. Also adjust the comment - there would be no #GP in the mentioned cases, as there's no segment limit violation or alike. Instead there'd be #PF, but that one reports the target EIP of said branch, not the address of the branch insn itself. Signed-off-by: Jan Beulich Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Link: https://lkml.kernel.org/r/a5986837-01eb-7bf8-bf42-4d3084d6a1f5@suse.com commit 29b810f5a5ec127d3143770098e05981baa3eb77 Author: Jan Beulich Date: Mon Nov 11 15:32:12 2019 +0100 x86/xen/32: Make xen_iret_crit_fixup() independent of frame layout Now that SS:ESP always get saved by SAVE_ALL, this also needs to be accounted for in xen_iret_crit_fixup(). Otherwise the old_ax value gets interpreted as EFLAGS, and hence VM86 mode appears to be active all the time, leading to random "vm86_32: no user_vm86: BAD" log messages alongside processes randomly crashing. Since following the previous model (sitting after SAVE_ALL) would further complicate the code _and_ retain the dependency of xen_iret_crit_fixup() on frame manipulations done by entry_32.S, switch things around and do the adjustment ahead of SAVE_ALL. Fixes: 3c88c692c287 ("x86/stackframe/32: Provide consistent pt_regs") Signed-off-by: Jan Beulich Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: Stable Team Link: https://lkml.kernel.org/r/32d8713d-25a7-84ab-b74b-aa3e88abce6b@suse.com commit 81ff2c37f9e5d77593928df0536d86443195fd64 Author: Jan Beulich Date: Mon Nov 18 16:21:12 2019 +0100 x86/stackframe/32: Repair 32-bit Xen PV Once again RPL checks have been introduced which don't account for a 32-bit kernel living in ring 1 when running in a PV Xen domain. The case in FIXUP_FRAME has been preventing boot. Adjust BUG_IF_WRONG_CR3 as well to guard against future uses of the macro on a code path reachable when running in PV mode under Xen; I have to admit that I stopped at a certain point trying to figure out whether there are present ones. Fixes: 3c88c692c287 ("x86/stackframe/32: Provide consistent pt_regs") Signed-off-by: Jan Beulich Signed-off-by: Thomas Gleixner Cc: Stable Team Link: https://lore.kernel.org/r/0fad341f-b7f5-f859-d55d-f0084ee7087e@suse.com commit 1f74b100c9d9406fa12b22675c6b2111e5f60e9c Author: Arnaldo Carvalho de Melo Date: Tue Nov 19 17:51:34 2019 -0300 perf dsos: Remove unused dsos__find() method Not used anywhere, nuke it. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-teqz0eqcw43mnt7i3me44esw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d8c313d75abfbbfb4382f4f4cba409089110d42d Author: Krzysztof Kozlowski Date: Mon Oct 21 18:02:07 2019 +0200 dt-bindings: pwm: Convert Samsung PWM bindings to json-schema Convert Samsung PWM (S3C, S5P and Exynos SoCs) bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 89650a1e3b6f877517121b67063f53d20a233deb Author: Krzysztof Kozlowski Date: Mon Oct 21 18:02:06 2019 +0200 dt-bindings: pwm: Convert PWM bindings to json-schema Convert generic PWM controller bindings to DT schema format using json-schema. The consumer bindings are provided by dt-schema. Signed-off-by: Krzysztof Kozlowski Acked-by: Stephen Boyd Acked-by: Paul Walmsley Signed-off-by: Rob Herring commit 83ededdb72ca125ddb9a6270b966ef0c26b5cf5a Author: Leonard Crestez Date: Tue Nov 19 18:38:56 2019 +0200 docs: Add initial documentation for devfreq The devfreq subsystem has plenty of kernel-doc comments but they're not currently included in sphinx documentation. Add a minimal devfreq.rst file which mostly just includes kernel-doc comments from devfreq source. This also exposes a number of kernel-doc warnings on `make htmldocs` Signed-off-by: Leonard Crestez Link: https://lore.kernel.org/r/e32fa9de8a60060a6ee5fc42f163111034f9a550.1574181341.git.leonard.crestez@nxp.com Signed-off-by: Jonathan Corbet commit a25984f3baaa97079ce3e75c5a1d362155915a31 Author: Michal Kalderon Date: Mon Nov 18 17:06:45 2019 +0200 RDMA/qedr: Fix null-pointer dereference when calling rdma_user_mmap_get_offset When running against rdma-core that doesn't support doorbell recovery, the rdma_user_mmap_entry won't be allocated for doorbell recovery related mappings. We have a flag indicating whether rdma-core supports doorbell recovery or not which was used during initialization, however some cases didn't check that the rdma_user_mmap_entry exists before attempting to acquire it's offset. Fixes: 97f612509294 ("RDMA/qedr: Add doorbell overflow recovery support") Link: https://lore.kernel.org/r/20191118150645.26602-1-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 291084904eb0d0e9dd15d7204b62bf809ea800ea Author: Linus Walleij Date: Mon Nov 18 23:30:19 2019 +0100 Documentation: Document how to get links with git am This adds Kees' clever apply hook to the kernel documentation so it can be easily references when needed. Cc: Kees Cook Link: https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2019-July/006608.html Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191118223019.81708-1-linus.walleij@linaro.org Signed-off-by: Jonathan Corbet commit 0acc637dacb6bf12a17c9ad0c41d9ff3696d8b05 Author: Danit Goldberg Date: Sun Nov 17 15:33:21 2019 +0200 RDMA/cm: Use refcount_t type for refcount variable This atomic in struct cm_id_private is being used as a refcount, change it to refcount_t for better clarity and to get the refcount protections. Link: https://lore.kernel.org/r/1573997601-4502-1-git-send-email-danitg@mellanox.com Signed-off-by: Danit Goldberg Reviewed-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit c16339b69c0d58f456154b43fc396b1f1c3dc055 Author: Mark Zhang Date: Fri Nov 15 17:45:55 2019 +0200 IB/mlx5: Support extended number of strides for Striding RQ Extends the minimum single WQE strides from 64 to 8, which is exposed by the "min_single_wqe_log_num_of_strides" field of striding_rq_caps. Choose right number of strides based on FW capability. Link: https://lore.kernel.org/r/20191115154555.247856-1-leon@kernel.org Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2c47c1be51fbded1f7baa2ceaed90f97932f79be Author: Bob Peterson Date: Tue Nov 19 11:40:46 2019 -0500 gfs2: clean up iopen glock mess in gfs2_create_inode Before this patch, gfs2_create_inode had a use-after-free for the iopen glock in some error paths because it did this: gfs2_glock_put(io_gl); fail_gunlock2: if (io_gl) clear_bit(GLF_INODE_CREATING, &io_gl->gl_flags); In some cases, the io_gl was used for create and only had one reference, so the glock might be freed before the clear_bit(). This patch tries to straighten it out by only jumping to the error paths where iopen is properly set, and moving the gfs2_glock_put after the clear_bit. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit ff3195b3ed85d0068fb9a80eaa2a1471a04df76a Author: Danit Goldberg Date: Fri Nov 15 17:44:57 2019 +0200 IB/mlx4: Update HW GID table while adding vlan GID When adding a new GID compare the vlan along with the GID and type. This allows vlan's to have GIDs that alias each other, such as the default GID. Otherwise they the GID cache view can become inconsistent with the HW view. Link: https://lore.kernel.org/r/20191115154457.247763-1-leon@kernel.org Signed-off-by: Danit Goldberg Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7b59a82493b49b715224bfe3b35fae52e48e5fa1 Author: Arnaldo Carvalho de Melo Date: Tue Nov 19 16:30:56 2019 -0300 perf map: Move comparision of map's dso_id to a separate function We'll use it when doing DSO lookups using dso_ids. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-u2nr1oq03o0i29w2ay9jx03s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3f1a9e630b6e124c387cc57f6fea517cec68b44f Author: Andreas Kemnade Date: Wed Nov 13 19:26:43 2019 +0100 regulator: rn5t618: fix rc5t619 ldo10 enable LDO9 and LDO10 were listed with the same enable bits. That looks insane and there are no provisions in the code for handling such a special case. Also other out-of-tree drivers use a separate bit to enable it. Example: https://github.com/brunotl/kernel-kobo-mx6sl-ntx/blob/master/drivers/regulator/ricoh619-regulator.c So it seems to be clearly a bug. I cannot fully check it on my board without schematics and just discovered this during code analysis for another problem. Signed-off-by: Andreas Kemnade Link: https://lore.kernel.org/r/20191113182643.23885-1-andreas@kemnade.info Signed-off-by: Mark Brown commit 0ced7b050224b18ca73e38e7068f36be8e708c06 Author: Kuninori Morimoto Date: Mon Nov 18 10:51:11 2019 +0900 ASoC: soc-pcm: remove soc_pcm_private_free() soc-topology adds extra dai_link by using snd_soc_add_dai_link(), and removes it by snd_soc_romove_dai_link(). This snd_soc_add/remove_dai_link() and/or its related functions are unbalanced before, and now, these are balance-uped. But, it finds the random operation issue, and it is reported by Pierre-Louis. When card was released, topology will call snd_soc_remove_dai_link() via (A). static void soc_cleanup_card_resources(struct snd_soc_card *card) { struct snd_soc_dai_link *link, *_link; /* This should be called before snd_card_free() */ (A) soc_remove_link_components(card); /* free the ALSA card at first; this syncs with pending operations */ if (card->snd_card) { (B) snd_card_free(card->snd_card); card->snd_card = NULL; } /* remove and free each DAI */ (X) soc_remove_link_dais(card); for_each_card_links_safe(card, link, _link) (C) snd_soc_remove_dai_link(card, link); ... } At (A), topology calls snd_soc_remove_dai_link(). Then topology rtd, and its related all data are freed. Next, (B) is called, and then, pcm->private_free = soc_pcm_private_free() is called. static void soc_pcm_private_free(struct snd_pcm *pcm) { struct snd_soc_pcm_runtime *rtd = pcm->private_data; /* need to sync the delayed work before releasing resources */ flush_delayed_work(&rtd->delayed_work); snd_soc_pcm_component_free(rtd); } Here, it gets rtd via pcm->private_data. But, topology related rtd are already freed at (A). Normal sound card has no damage, becase it frees rtd at (C). These are finalizing rtd related data. Thus, these should be called when rtd was freed, not sound card was freed. It is very natural and understandable. In other words, pcm->private_free = soc_pcm_private_free() is no longer needed. Extra issue is that there is zero chance to call soc_remove_dai() for topology related dai at (X). Because (A) removes rtd connection from card too, and, (X) is based on card connected rtd. This means, (X) need to be called before (C) (= for normal sound) and (A) (= for topology). Now, I want to focus this patch which is the reason why snd_card_free() = (B) is located there. commit 4efda5f2130da033aeedc5b3205569893b910de2 ("ASoC: Fix use-after-free at card unregistration") Original snd_card_free() was called last of this function. But moved to top to avoid use-after-free issue. The issue was happen at soc_pcm_free() which was pcm->private_free, today it is updated/renamed to soc_pcm_private_free(). In other words, (B) need to be called before (C) (= for normal sound) and (A) (= for topology), because it needs (not yet freed) rtd. But, (A) need to be called before (B), because it needs card->snd_card pointer. If we call flush_delayed_work() and snd_soc_pcm_component_free() (= same as soc_pcm_private_free()) when rtd was freed (= (C), (A)), there is no reason to call snd_card_free() at top of this function. It can be called end of this function, again. But, in such case, it will likely break unbind again, as Takashi-san reported. When unbind is performed in a busy state, the code may release still-in-use resources. At least we need to call snd_card_disconnect_sync() at the first place. The final code will be... static void soc_cleanup_card_resources(struct snd_soc_card *card) { struct snd_soc_dai_link *link, *_link; if (card->snd_card) (Z) snd_card_disconnect_sync(card->snd_card); (X) soc_remove_link_dais(card); (A) soc_remove_link_components(card); for_each_card_links_safe(card, link, _link) (C) snd_soc_remove_dai_link(card, link); ... if (card->snd_card) { (B) snd_card_free(card->snd_card); card->snd_card = NULL; } } To avoid release still-in-use resources, call snd_card_disconnect_sync() at (Z). (X) is needed for both non-topology and topology. topology removes rtd via (A), and non topology removes rtd via (C). snd_card_free() is no longer related to use-after-free issue. Thus, locating (B) is no problem. Fixes: df95a16d2a9626 ("ASoC: soc-core: fix RIP warning on card removal") Fixes: bc7a9091e5b927 ("ASoC: soc-core: add soc_unbind_dai_link()") Reported-by: Pierre-Louis Bossart Signed-off-by: Kuninori Morimoto Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87o8xax88g.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b2b2afbb48eac7215f951a8a462aa6837e0d495f Author: Kuninori Morimoto Date: Mon Nov 18 10:50:32 2019 +0900 ASoC: soc-component: tidyup snd_soc_pcm_component_new/free() parameter This patch uses rtd instead of pcm at snd_soc_pcm_component_new/free() parameter. This is prepare for dai_link remove bug fix on topology. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pnhqx89j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0bb887709eb16bdc4b5baddd8337abf3de72917f Author: Hans de Goede Date: Tue Nov 19 15:51:38 2019 +0100 ASoC: Intel: bytcr_rt5640: Update quirk for Acer Switch 10 SW5-012 2-in-1 When the Acer Switch 10 SW5-012 quirk was added we did not have jack-detection support yet; and the builtin microphone selection of the original quirk is wrong too. Fix the microphone-input quirk and add jack-detection info so that the internal-microphone and headphone/set jack on the Switch 10 work properly. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191119145138.59162-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 9a5d847c0bdadb67892b7d176a028578aaed0c3a Author: Wei Yongjun Date: Mon Nov 18 11:52:07 2019 -0700 coresight: replicator: Fix missing spin_lock_init() The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Tested-by: Yabin Cui Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191118185207.30441-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9def5dc10d3e21cf7673731be21224b6cc0eb16a Author: Wei Yongjun Date: Mon Nov 18 11:52:06 2019 -0700 coresight: funnel: Fix missing spin_lock_init() The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Tested-by: Yabin Cui Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191118185207.30441-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4a7380a52ec90fbb1565dd638ee7f5b6e709f7fb Author: Arnaldo Carvalho de Melo Date: Tue Nov 19 12:40:29 2019 -0300 perf map: Pass a dso_id to map__new() Instead of the 4 fields, a step in the direction of moving this to struct dso. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-gp5s1xgxacurmih5d1l94ymy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 99459a84d5870a88274b4f10bc85c3e39e1d642c Author: Arnaldo Carvalho de Melo Date: Tue Nov 19 12:26:19 2019 -0300 perf map: Move maj/min/ino/ino_generation to separate struct And this patch highlights where these fields are being used: in the sort order where it uses it to compare maps and classify samples taking into account not just the DSO, but those DSO id fields. I think these should be used to differentiate DSOs with the same name but different 'struct dso_id' fields, i.e. these fields should move to 'struct dso' and then be used as part of the key when doing lookups for DSOs, in addition to the DSO name. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-8v5isitqy0dup47nnwkpc80f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bcba0c45471269d98cdbf53830694acf5a9792fc Author: Dan Williams Date: Sun Nov 17 09:45:45 2019 -0800 libnvdimm: Export the target_node attribute for regions and namespaces Aneesh points out that some platforms may have "local" attached persistent memory and "remote" persistent memory that map to the same "online" node, or persistent memory devices with different performance properties. In this case 'numa_node' is identical for the two instances, but 'target_node' is differentiated so platform firmware can communicate distinct performance properties per range. Expose 'target_node' by default to allow for disambiguation of devices that share the same numa_map_to_online_node() result. Reported-by: "Aneesh Kumar K.V" Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157401274500.43284.2369509941678577768.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit cb4dd729ee6ccc67ad604b1750990eb8c18783fa Author: Dan Williams Date: Tue Nov 12 17:13:31 2019 -0800 dax: Add numa_node to the default device-dax attributes It is confusing that device-dax instances publish a 'target_node' attribute, but not a 'numa_node'. The 'numa_node' information is available elsewhere in the sysfs device hierarchy, but it is not obvious and not reliable from one device-dax instance-type (e.g. child devices of nvdimm namespaces) to the next (e.g. 'hmem' devices defined by EFI Specific Purpose Memory and the ACPI HMAT). Cc: Ira Weiny Cc: Vishal Verma Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309906102.1582359.4262088001244476001.stgit@dwillia2-desk3.amr.corp.intel.com commit bfd2e9140656a061138ecdc6a5485d5e2a7a3333 Author: Dan Williams Date: Tue Nov 12 17:13:14 2019 -0800 libnvdimm: Simplify root read-only definition for the 'resource' attribute Rather than update the permission in ->is_visible() set the permission directly at declaration time. Cc: Ira Weiny Cc: Vishal Verma Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309905534.1582359.13927459228885931097.stgit@dwillia2-desk3.amr.corp.intel.com commit 153dd28647d63086dc6e1df5ee06fd0a5d6435a5 Author: Dan Williams Date: Tue Nov 12 17:12:38 2019 -0800 dax: Simplify root read-only definition for the 'resource' attribute Rather than update the permission in ->is_visible() set the permission directly at declaration time. Cc: Ira Weiny Cc: Vishal Verma Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309904959.1582359.7281180042781955506.stgit@dwillia2-desk3.amr.corp.intel.com commit 770619a95106340230a72a725c958c037284ec1f Author: Dan Williams Date: Tue Nov 12 17:12:23 2019 -0800 dax: Create a dax device_type Move the open coded release method and attribute groups to a 'struct device_type' instance. Cc: Ira Weiny Cc: Vishal Verma Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309904365.1582359.5451327195246651379.stgit@dwillia2-desk3.amr.corp.intel.com commit e755799aefa9385469bec49b2c2ccf1aaa33829a Author: Dan Williams Date: Tue Nov 12 17:08:56 2019 -0800 libnvdimm: Move nvdimm_bus_attribute_group to device_type A 'struct device_type' instance can carry default attributes for the device. Use this facility to remove the export of nvdimm_bus_attribute_group and put the responsibility on the core rather than leaf implementations to define this attribute. Cc: Ira Weiny Cc: Michael Ellerman Cc: "Oliver O'Halloran" Cc: Vishal Verma Cc: Aneesh Kumar K.V Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309903815.1582359.6418211876315050283.stgit@dwillia2-desk3.amr.corp.intel.com commit 360eba7ebdf716194ed2ede1ebc3ce0f9790a91c Author: Dan Williams Date: Tue Nov 12 17:08:04 2019 -0800 libnvdimm: Move nvdimm_attribute_group to device_type A 'struct device_type' instance can carry default attributes for the device. Use this facility to remove the export of nvdimm_attribute_group and put the responsibility on the core rather than leaf implementations to define this attribute. Cc: Ira Weiny Cc: Michael Ellerman Cc: "Oliver O'Halloran" Cc: Vishal Verma Cc: Aneesh Kumar K.V Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309903201.1582359.10966209746585062329.stgit@dwillia2-desk3.amr.corp.intel.com commit 4ce79fa97e6a54ee028063381346dc2fea91a76b Author: Dan Williams Date: Tue Nov 12 17:07:39 2019 -0800 libnvdimm: Move nd_mapping_attribute_group to device_type A 'struct device_type' instance can carry default attributes for the device. Use this facility to remove the export of nd_mapping_attribute_group and put the responsibility on the core rather than leaf implementations to define this attribute. Cc: Ira Weiny Cc: Michael Ellerman Cc: "Oliver O'Halloran" Cc: Vishal Verma Cc: Aneesh Kumar K.V Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309902686.1582359.6749533709859492704.stgit@dwillia2-desk3.amr.corp.intel.com commit 7c4fc8cde1641e3213eb1dafc6854331e9e0828c Author: Dan Williams Date: Tue Nov 12 17:07:16 2019 -0800 libnvdimm: Move nd_region_attribute_group to device_type A 'struct device_type' instance can carry default attributes for the device. Use this facility to remove the export of nd_region_attribute_group and put the responsibility on the core rather than leaf implementations to define this attribute. Cc: Ira Weiny Cc: Michael Ellerman Cc: "Oliver O'Halloran" Cc: Vishal Verma Cc: Aneesh Kumar K.V Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309902169.1582359.16828508538444551337.stgit@dwillia2-desk3.amr.corp.intel.com commit e2f6a0e34870ff1bdb1411e250dd2f03908cfa9f Author: Dan Williams Date: Tue Nov 19 09:51:54 2019 -0800 libnvdimm: Move nd_numa_attribute_group to device_type A 'struct device_type' instance can carry default attributes for the device. Use this facility to remove the export of nd_numa_attribute_group and put the responsibility on the core rather than leaf implementations to define this attribute. Cc: Ira Weiny Cc: Michael Ellerman Cc: "Oliver O'Halloran" Cc: Vishal Verma Cc: Aneesh Kumar K.V Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157401269537.43284.14411189404186877352.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit dfdeeb41fb08fbe11d3cfefba9c0fcd00c95a36d Merge: 3c845acd0237 c7df4a1ecb85 Author: Theodore Ts'o Date: Tue Nov 19 12:25:42 2019 -0500 Merge branch 'tt/misc' into dev commit c7df4a1ecb8579838ec8c56b2bb6a6716e974f37 Author: Theodore Ts'o Date: Mon Nov 11 22:18:13 2019 -0500 ext4: work around deleting a file with i_nlink == 0 safely If the file system is corrupted such that a file's i_links_count is too small, then it's possible that when unlinking that file, i_nlink will already be zero. Previously we were working around this kind of corruption by forcing i_nlink to one; but we were doing this before trying to delete the directory entry --- and if the file system is corrupted enough that ext4_delete_entry() fails, then we exit with i_nlink elevated, and this causes the orphan inode list handling to be FUBAR'ed, such that when we unmount the file system, the orphan inode list can get corrupted. A better way to fix this is to simply skip trying to call drop_nlink() if i_nlink is already zero, thus moving the check to the place where it makes the most sense. https://bugzilla.kernel.org/show_bug.cgi?id=205433 Link: https://lore.kernel.org/r/20191112032903.8828-1-tytso@mit.edu Signed-off-by: Theodore Ts'o Cc: stable@kernel.org Reviewed-by: Andreas Dilger commit 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a Author: Theodore Ts'o Date: Thu Nov 7 21:43:41 2019 -0500 ext4: add more paranoia checking in ext4_expand_extra_isize handling It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes. Add better checking when the file system is mounted, as well as when we are actually doing the trying to do the inode expansion. Link: https://lore.kernel.org/r/20191110121510.GH23325@mit.edu Reported-by: syzbot+f8d6f8386ceacdbfff57@syzkaller.appspotmail.com Reported-by: syzbot+33d7ea72e47de3bdf4e1@syzkaller.appspotmail.com Reported-by: syzbot+44b6763edfc17144296f@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 119a3cb6d687259f2be333351c1c5d634204e68b Author: Daniel Campello Date: Wed Nov 6 09:33:19 2019 -0700 platform/chrome: wilco_ec: Add keyboard backlight LED support The EC is in charge of controlling the keyboard backlight on the Wilco platform. We expose a standard LED class device named platform::kbd_backlight. Since the EC will never change the backlight level of its own accord, we don't need to implement a brightness_get() method. Signed-off-by: Nick Crews Signed-off-by: Daniel Campello Reviewed-by: Daniel Campello Signed-off-by: Enric Balletbo i Serra commit 3c4d77b68928df6c2bf07f4c3ba8e5d5e490bf4e Author: Nick Crews Date: Thu Oct 24 16:28:05 2019 -0600 platform/chrome: wilco_ec: Add charging config driver Add a device to control the charging algorithm used on Wilco devices, which will be picked up by the drivers/power/supply/wilco-charger.c driver. See Documentation/ABI/testing/sysfs-class-power-wilco for the userspace interface and other info. Signed-off-by: Nick Crews Signed-off-by: Enric Balletbo i Serra commit 7a7ebfa85f4fac349f3ab219538c44efe18b0cf6 Author: Mika Westerberg Date: Mon Nov 11 13:25:44 2019 +0300 thunderbolt: Power cycle the router if NVM authentication fails On zang's Dell XPS 13 9370 after Thunderbolt NVM firmware upgrade the Thunderbolt controller did not come back as expected. Only after the system was rebooted it became available again. It is not entirely clear what happened but I suspect the new NVM firmware image authentication failed for some reason. Regardless of this the router needs to be power cycled if NVM authentication fails in order to get it fully functional again. This modifies the driver to issue a power cycle in case the NVM authentication fails immediately when dma_port_flash_update_auth() returns. We also need to call tb_switch_set_uuid() earlier to be able to fetch possible NVM authentication failure when DMA port is added. Link: https://bugzilla.kernel.org/show_bug.cgi?id=205457 Reported-by: zang Cc: stable Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman commit 545886fead7abfdbeb46d3ac62256e1db72739a3 Author: Chengguang Xu Date: Sat Nov 16 06:49:00 2019 +0800 ext2: code cleanup for descriptor_loc() Code cleanup by removing unnecessary variable in descriptor_loc(). Link: https://lore.kernel.org/r/20191115224900.2613-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit dabad1ff856116a14773aa81aa5de0591d6875e9 Author: Qianggui Song Date: Fri Nov 15 20:03:48 2019 +0800 pinctrl: meson: add pinctrl driver support for Meson-A1 SoC Meson A1 SoC share the same register layout of pinmux with previous Meson-G12A, however there is difference for gpio and pin config register in A1. The main difference is that registers before A1 are grouped by function while those of A1 are by bank. The new register layout is as below: /* first bank */ /* addr */ - P_PADCTRL_GPIOP_I base + 0x00 << 2 - P_PADCTRL_GPIOP_O base + 0x01 << 2 - P_PADCTRL_GPIOP_OEN base + 0x02 << 2 - P_PADCTRL_GPIOP_PULL_EN base + 0x03 << 2 - P_PADCTRL_GPIOP_PULL_UP base + 0x04 << 2 - P_PADCTRL_GPIOP_DS base + 0x05 << 2 /* second bank */ - P_PADCTRL_GPIOB_I base + 0x10 << 2 - P_PADCTRL_GPIOB_O base + 0x11 << 2 - P_PADCTRL_GPIOB_OEN base + 0x12 << 2 - P_PADCTRL_GPIOB_PULL_EN base + 0x13 << 2 - P_PADCTRL_GPIOB_PULL_UP base + 0x14 << 2 - P_PADCTRL_GPIOB_DS base + 0x15 << 2 Each bank contains at least 6 registers to be configured, if one bank has more than 16 gpios, an extra P_PADCTRL_GPIO[X]_DS_EXT is included. Between two adjacent P_PADCTRL_GPIO[X]_I, there is an offset 0x10, that is to say, for third bank, the offsets will be 0x20,0x21,0x22,0x23,0x24 ,0x25 according to above register layout. For previous chips, registers are grouped according to their functions while registers of A1 are according to bank.Also note that there is no AO bank any more in A1. Current Meson pinctrl driver can cover such change by using base address of GPIO as that of drive-strength. While simply giving reg_ds = reg_pullen make wrong value to reg_ds for Socs that do not support drive-strength like AXG.To make things simple, add an extra dt parser function for a1 and remain the old dt parser function for only reg parsing. Signed-off-by: Qianggui Song Link: https://lore.kernel.org/r/1573819429-6937-3-git-send-email-qianggui.song@amlogic.com Reviewed-by: Neil Armstrong Signed-off-by: Linus Walleij commit fd422964071f94783ef10366749c7810ae304488 Author: Qianggui Song Date: Fri Nov 15 20:03:47 2019 +0800 pinctrl: meson: add a new callback for SoCs fixup In meson_pinctrl_parse_dt, it contains two parts: reg parsing and SoC relative fixup for AO. Several fixups in the same code make it hard to maintain, so move all fixups to each SoC's callback and make meson_pinctrl_parse_dt just do the reg parsing, separate these two parts.Overview of all current Meson SoCs fixup is as below: +------+--------------------------------------+--------------------------+ | | | | | SoC | EE domain | AO domain | +------+--------------------------------------+--------------------------+ |m8 | parse regs: | parse regs: | |m8b | gpio,mux,pull,pull-enable(skip ds) | gpio,mux,pull(skip ds)| |gxl | fixup: | fixup: | |gxbb | no | pull-enable = pull; | |axg | | | +------+--------------------------------------+--------------------------+ |g12a | parse regs: | parse regs: | |sm1 | gpio,mux,pull,pull-enable,ds | gpio,mux,ds | | | fixup: | fixup: | | | no | pull = gpio; | | | | pull-enable = gpio; | +------+--------------------------------------+--------------------------+ |a1 or | parse regs: | |later | gpio/mux (without ao domain) | |SoCs | fixup: | | | pull = gpio; pull-enable = gpio; ds = gpio; | +------+-----------------------------------------------------------------+ Since m8-axg share the same ao fixup, make a common function meson8_aobus_parse_dt_extra to do the job. Signed-off-by: Qianggui Song Link: https://lore.kernel.org/r/1573819429-6937-2-git-send-email-qianggui.song@amlogic.com Reviewed-by: Neil Armstrong Signed-off-by: Linus Walleij commit 58afa801ef22bdc47ed4a1f1d4d9e52ca25777e7 Author: Stephan Gerhold Date: Sun Nov 17 21:54:39 2019 +0100 pinctrl: nomadik: db8500: Add mc0_a_2 pin group without direction control Some devices do not make use of the CMD0/DAT0/DAT2 direction control pins of the MMC/SD card 0 interface. In this case we should leave those pins unconfigured. A similar case already exists for "mc1_a_1" vs "mc1_a_2" when the MC1_FBCLK pin is not used. Add a new "mc0_a_2" pin group which is equal to "mc0_a_1" except with the MC0_CMDDIR, MC0_DAT0DIR and MC0_DAT2DIR pins removed. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191117205439.239211-1-stephan@gerhold.net Signed-off-by: Linus Walleij commit a20db58f3e6e6770362614c488e5426f972de97e Author: Mika Westerberg Date: Tue Nov 19 15:58:37 2019 +0300 regmap: regmap-w1: Drop unreachable code Both init functions have a stray "return NULL" at the end which is never reached so drop them. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20191119125837.47619-1-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown commit 8f6ee51d772d0dab407d868449d2c5d9c8d2b6fc Merge: b0aeb45bad84 a910e4666d61 Author: Ingo Molnar Date: Tue Nov 19 12:59:03 2019 +0100 Merge tag 'perf-core-for-mingo-5.5-20191119' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: x86/insn: Adrian Hunter: - Add some more Intel instructions to the opcode map: cldemote, encls, enclu, enclv, enqcmd, enqcmds, movdir64b, movdiri, pconfig, tpause, umonitor, umwait, wbnoinvd. - The instruction decoding can be tested using the perf tools' "x86 instruction decoder - new instructions" test as folllows: $ perf test -v "new " 2>&1 | grep -i cldemote Decoded ok: 0f 1c 00 cldemote (%eax) Decoded ok: 0f 1c 05 78 56 34 12 cldemote 0x12345678 Decoded ok: 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%eax,%ecx,8) Decoded ok: 0f 1c 00 cldemote (%rax) Decoded ok: 41 0f 1c 00 cldemote (%r8) Decoded ok: 0f 1c 04 25 78 56 34 12 cldemote 0x12345678 Decoded ok: 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%rax,%rcx,8) Decoded ok: 41 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%r8,%rcx,8) $ perf test -v "new " 2>&1 | grep -i tpause Decoded ok: 66 0f ae f3 tpause %ebx Decoded ok: 66 0f ae f3 tpause %ebx Decoded ok: 66 41 0f ae f0 tpause %r8d callchains: Adrian Hunter: - Fix segfault in thread__resolve_callchain_sample(). perf probe: - Line fixes to show only lines where probes can be used with 'perf probe -L', and when reporting them via 'perf probe -l'. - Support multiprobe events. perf scripts python: Adrian Hunter: - Fix use of TRUE with SQLite < 3.23 in exported-sql-viewer.py. perf maps: - Trim 'struct map' by removing the rb_node member for sorting by map name, as that is only needed for processing kernel maps, and only when classifying symbols by section at load time. Sort them by name using qsort() and do lookups using bsearch() when map_groups__find_by_name() is used. perf parse: Ian Rogers: - Report initial event parsing error, providing a less cryptic message to state that a PMU wasn't found in the system. perf vendor events: James Clark: - Fix commas so that PMU event files for arm64, power8 and power nine become valid JSON. libtraceevent: Konstantin Khlebnikov: - Fix parsing of event %o and %X argument types. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 5398e94fb753d022301825ebfa5f7cf8a660d8eb Author: Nikhil Mahale Date: Tue Nov 19 14:17:10 2019 +0530 ALSA: hda - Add DP-MST support for NVIDIA codecs This patch adds DP-MST support for GK104+ NVIDIA codecs. GK104+ NVIDIA codecs support DP-MST audio. These codecs have 4 output converters and 4 pin widgets, with 4 device entries per pin widget for a total of 16 device entries. This patch moves the existing patch_nvhdmi() definition to patch_nvhdmi_legacy(), used by pre-GK104 NVIDIA codecs. Redefine patch_nvhdmi() to enable DP-MST support by setting codec->dp_mst and spec->dyn_pcm_assign. Introduce fresh logic for dynamic pcm assignment, making sure that new pcm assignments are compatible with the legacy static per_pin-pmc assignment that existed in the days before DP-MST. Signed-off-by: Nikhil Mahale Reviewed-by: Aaron Plattner Link: https://lore.kernel.org/r/20191119084710.29267-5-nmahale@nvidia.com Signed-off-by: Takashi Iwai commit 9c32fea836928d7a25a83b337f268e533cfc5c3d Author: Nikhil Mahale Date: Tue Nov 19 14:17:09 2019 +0530 ALSA: hda - Add DP-MST support for non-acomp codecs This patch make it possible for non-acomp codecs to set dyn_pcm_assign/dp_mst and get DP-MST audio support. Document change notification HDA040-A for the Intel High Definition Audio 1.0a specification introduces a Device Select verb for Digital Display Pin Widgets that are multi-stream capable. This verb selects a Device Entry that is used by subsequent Pin Widget verbs. Once the Device Entry is selected, all subsequent Pin Widget verbs controlling the sink device will be directed to the selected Device Entry until the Device Select verb is updated with a new value. These Pin Widget verbs include: * Connection Select * Get Connection List Entry * Amplifier Gain/Mute * Power State * Pin Widget Control * ELD Data * DIP-Size * DIP-Index * DIP-Data * DIP-XmitCtrl * Content Protection Control * ASP Channel Mapping This patch adds calls to snd_hda_set_dev_select() to direct each of these Pin Widget control verbs to the correct Device Entry. snd_hda_get_connections() does not return per-device connection list, therefore make use snd_hda_get_raw_connections() instead of snd_hda_get_connections(). Signed-off-by: Nikhil Mahale Reviewed-by: Aaron Plattner Link: https://lore.kernel.org/r/20191119084710.29267-4-nmahale@nvidia.com Signed-off-by: Takashi Iwai commit 5204a05d70d9354e6dd27219275c4b6725443dc4 Author: Nikhil Mahale Date: Tue Nov 19 14:17:08 2019 +0530 ALSA: hda - Add DP-MST jack support This patch adds DP-MST jack support which will be used on NVIDIA platforms. Today, DP-MST audio is supported only if the codec has acomp support. This patch makes it possible to add DP-MST support for non-acomp codecs. For the codecs supporting DP-MST audio, each pin can contain several device entries. Each device entry is a virtual pin, described by pin_nid and dev_id in struct hdmi_spec_per_pin. For monitor hotplug event handling, non-acomp codecs enable and register jack-detection for every hdmi_spec_per_pin. This patch updates every relevant function in hda_jack.h and its implementation in hda_jack.c, to consider dev_id along with pin_nid. Changes to the HD Audio specification to support DP-MST audio are described in the Intel Document Change Notification (DCN) number HDA040-A. From HDA040-A, "For the case of multi stream capable Digital Display Pin Widget, [the Get Pin Sense verb] can be used to read a specific Device Entry state as reported in Get Device List Entry verb." This patch updates the read_pin_sense() function to take the dev_id as an argument and pass it as a parameter to the Get Pin Sense verb. Bits 15 through 20 from the Unsolicited Response for intrinsic events contain the index of the Device Entry that generated the event. This patch updates the Unsolicited Response event handlers to extract the device entry index from the response and pass it to snd_hda_jack_tbl_get_from_tag(). This patch updates snd_hda_jack_tbl_new() to take a dev_id argument and store it in the jack structure, and to make sure not to generate a different tag when called more than once for the same nid. Signed-off-by: Nikhil Mahale Link: https://lore.kernel.org/r/20191119084710.29267-3-nmahale@nvidia.com Signed-off-by: Takashi Iwai commit 80b917a8dd8f62ca00178d5a74d05d7471f21b47 Author: Nikhil Mahale Date: Tue Nov 19 14:17:07 2019 +0530 ALSA: hda - Rename snd_hda_pin_sense to snd_hda_jack_pin_sense s/snd_hda_pin_sense/snd_hda_jack_pin_sense/g This aligns the snd_hda_pin_sense function name with the names of other functions in hda_jack.h. Signed-off-by: Nikhil Mahale Reviewed-by: Aaron Plattner Link: https://lore.kernel.org/r/20191119084710.29267-2-nmahale@nvidia.com Signed-off-by: Takashi Iwai commit cbda56d5fefcebc01448982a55836c88a825b34c Author: Rafael J. Wysocki Date: Mon Nov 18 12:11:24 2019 +0100 cpuidle: Introduce cpuidle_driver_state_disabled() for driver quirks Commit 99e98d3fb100 ("cpuidle: Consolidate disabled state checks") overlooked the fact that the imx6q and tegra20 cpuidle drivers use the "disabled" field in struct cpuidle_state for quirks which trigger after the initialization of cpuidle, so reading the initial value of that field is not sufficient for those drivers. In order to allow them to implement the quirks without using the "disabled" field in struct cpuidle_state, introduce a new helper function and modify them to use it. Fixes: 99e98d3fb100 ("cpuidle: Consolidate disabled state checks") Reported-by: Len Brown Signed-off-by: Rafael J. Wysocki commit a7583e72a5f22470d3e6fd3b6ba912892242339f Author: Yunfeng Ye Date: Thu Nov 14 15:16:24 2019 +0800 ACPI: sysfs: Change ACPI_MASKABLE_GPE_MAX to 0x100 The commit 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel parameter cover all GPEs") says: "Use a bitmap of size 0xFF instead of a u64 for the GPE mask so 256 GPEs can be masked" But the masking of GPE 0xFF it not supported and the check condition "gpe > ACPI_MASKABLE_GPE_MAX" is not valid because the type of gpe is u8. So modify the macro ACPI_MASKABLE_GPE_MAX to 0x100, and drop the "gpe > ACPI_MASKABLE_GPE_MAX" check. In addition, update the docs "Format" for acpi_mask_gpe parameter. Fixes: 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel parameter cover all GPEs") Signed-off-by: Yunfeng Ye [ rjw: Use u16 as gpe data type in acpi_gpe_apply_masked_gpes() ] Signed-off-by: Rafael J. Wysocki commit 6b7c095a51e1bad8b27fa1bc8753af0b613464a3 Author: Christophe Leroy Date: Mon Sep 16 20:25:41 2019 +0000 powerpc/83xx: map IMMR with a BAT. On mpc83xx with a QE, IMMR is 2Mbytes and aligned on 2Mbytes boundarie. On mpc83xx without a QE, IMMR is 1Mbyte and 1Mbyte aligned. Each driver will map a part of it to access the registers it needs. Some drivers will map the same part of IMMR as other drivers. In order to reduce TLB misses, map the full IMMR with a BAT. If it is 2Mbytes aligned, map 2Mbytes. If there is no QE, the upper part will remain unused, but it doesn't harm as it is mapped as guarded memory. When the IMMR is not aligned on a 2Mbytes boundarie, only map 1Mbyte. Signed-off-by: Christophe Leroy Acked-by: Scott Wood Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/269a00951328fb6fa1be2fa3cbc76c19745019b7.1568665466.git.christophe.leroy@c-s.fr commit cbcaff7d27ad5c5d2c2db113ec489be88adb815a Author: Christophe Leroy Date: Mon Sep 16 20:25:39 2019 +0000 powerpc/32s: automatically allocate BAT in setbat() If no BAT is given to setbat(), select an available BAT. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a212bd36fbd6179e0929b6c727febc35132ac25c.1568665466.git.christophe.leroy@c-s.fr commit d538aadc2718a95bfd80095c66ea814824535b34 Author: Christophe Leroy Date: Thu Sep 12 13:49:44 2019 +0000 powerpc/ioremap: warn on early use of ioremap() Powerpc now has EARLY_IOREMAP. Next step is to convert all early users of ioremap() to early_ioremap(). Add a warning to help locate those users. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b4f03a68ee8e68773c8973d74ec35f9c82c72871.1568295907.git.christophe.leroy@c-s.fr commit 265c3491c4bc8d40587996d6ee2f447a7ccfb4f3 Author: Christophe Leroy Date: Thu Sep 12 13:49:43 2019 +0000 powerpc: Add support for GENERIC_EARLY_IOREMAP Add support for GENERIC_EARLY_IOREMAP. Let's define 16 slots of 256Kbytes each for early ioremap. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/412c7eaa6a373d8f82a3c3ee01e6a65a1a6589de.1568295907.git.christophe.leroy@c-s.fr commit 77693a5fb57be4606a6024ec8e3076f9499b906b Author: Christophe Leroy Date: Thu Sep 12 13:49:42 2019 +0000 powerpc/fixmap: Use __fix_to_virt() instead of fix_to_virt() Modify back __set_fixmap() to using __fix_to_virt() instead of fix_to_virt() otherwise the following happens because it seems GCC doesn't see idx as a builtin const. CC mm/early_ioremap.o In file included from ./include/linux/kernel.h:11:0, from mm/early_ioremap.c:11: In function ‘fix_to_virt’, inlined from ‘__set_fixmap’ at ./arch/powerpc/include/asm/fixmap.h:87:2, inlined from ‘__early_ioremap’ at mm/early_ioremap.c:156:4: ./include/linux/compiler.h:350:38: error: call to ‘__compiletime_assert_32’ declared with attribute error: BUILD_BUG_ON failed: idx >= __end_of_fixed_addresses _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^ ./include/linux/compiler.h:331:4: note: in definition of macro ‘__compiletime_assert’ prefix ## suffix(); \ ^ ./include/linux/compiler.h:350:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^ ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) ^ ./include/asm-generic/fixmap.h:32:2: note: in expansion of macro ‘BUILD_BUG_ON’ BUILD_BUG_ON(idx >= __end_of_fixed_addresses); ^ Signed-off-by: Christophe Leroy Fixes: 4cfac2f9c7f1 ("powerpc/mm: Simplify __set_fixmap()") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f4984c615f90caa3277775a68849afeea846850d.1568295907.git.christophe.leroy@c-s.fr commit eafd687e689acd99d780e468d6a0622f4694d0bc Author: Christophe Leroy Date: Thu Sep 12 13:29:07 2019 +0000 powerpc/8xx: use the fixmapped IMMR in cpm_reset() Since commit f86ef74ed919 ("powerpc/8xx: Fix vaddr for IMMR early remap"), the IMMR area has been mapped at startup with fixmap. Use that fixmap directly instead of calling ioremap(), this avoids calling ioremap() early before the slab is available. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f816ccdbd15b97cf43c5a8c7cc8dfa8db58ff036.1568294935.git.christophe.leroy@c-s.fr commit 132f92fdc42782fd297e076ef74bedeb8ce774e4 Author: Christophe Leroy Date: Thu Sep 12 13:22:55 2019 +0000 powerpc/8xx: add __init to cpm1 init functions Functions cpm1_clk_setup(), cpm1_set_pin(), cpm_pic_init() and mpc8xx_pic_init() are only called from __init functions, so mark them __init as well. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c27168ef054f3a52edcf0ff91652700d53b3e32d.1568294563.git.christophe.leroy@c-s.fr commit df66499a1fab340c167250a5743931dc50d5f0fa Author: Dan Carpenter Date: Tue Nov 19 09:17:05 2019 +0300 Bluetooth: delete a stray unlock We used to take a lock in amp_physical_cfm() but then we moved it to the caller function. Unfortunately the unlock on this error path was overlooked so it leads to a double unlock. Fixes: a514b17fab51 ("Bluetooth: Refactor locking in amp_physical_cfm") Signed-off-by: Dan Carpenter Signed-off-by: Marcel Holtmann commit 9f4813b531a0b8cc502fcfb142937fe4e9104d77 Merge: 44e09568cf2d af42d3466bdc Author: Ingo Molnar Date: Tue Nov 19 09:00:45 2019 +0100 Merge tag 'v5.4-rc8' into WIP.x86/mm, to pick up fixes Signed-off-by: Ingo Molnar commit b8dc647657d523ea6d6f169992c99fc3680a5f81 Author: Stephan Gerhold Date: Sun Nov 17 21:39:46 2019 +0100 Bluetooth: btbcm: Add entry for BCM4334B0 UART Bluetooth Add the device ID for the WiFi/BT/FM combo chip BCM4334 (rev B0). The chip seems to use 43:34:b0:00:00:00 as default address, so add it to the list of default addresses and leave it up to the user to configure a valid one. Signed-off-by: Stephan Gerhold Signed-off-by: Marcel Holtmann commit 4a56e423e0e19b616c2f2615674a7dffdb77afd6 Author: Fabien Dessenne Date: Fri Nov 15 11:03:08 2019 +0100 remoteproc: stm32: fix probe error case If the rproc driver is probed before the mailbox driver and if the rproc Device Tree node has some mailbox properties, the rproc driver probe shall be deferred instead of being probed without mailbox support. Tested-by: Mathieu Poirier Signed-off-by: Fabien Dessenne Link: https://lore.kernel.org/r/1573812188-19842-1-git-send-email-fabien.dessenne@st.com Signed-off-by: Bjorn Andersson commit 553671b7685972ca671da5f71cf6414b54376e13 Author: Linus Walleij Date: Fri Nov 15 23:59:11 2019 +0100 firmware_loader: Fix labels with comma for builtin firmware Some firmware images contain a comma, such as: EXTRA_FIRMWARE "brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt" as Broadcom firmware simply tags the device tree compatible string at the end of the firmware parameter file. And the compatible string contains a comma. This doesn't play well with gas: drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S: Assembler messages: drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S:4: Error: bad instruction `_fw_brcm_brcmfmac4334_sdio_samsung,gt_s7710_txt_bin:' drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S:9: Error: bad instruction `_fw_brcm_brcmfmac4334_sdio_samsung,gt_s7710_txt_name:' drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S:15: Error: can't resolve `.rodata' {.rodata section} - `_fw_brcm_brcmfmac4334_sdio_samsung' {*UND* section} make[6]: *** [../scripts/Makefile.build:357: drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.o] Error 1 We need to get rid of the comma from the labels used by the assembly stub generator. Replacing a comma using GNU Make subst requires a helper variable. Cc: Stephan Gerhold Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191115225911.3260-1-linus.walleij@linaro.org Acked-by: Luis Chamberlain Signed-off-by: Greg Kroah-Hartman commit cddaebaf3d81584180d647e9cbda4ecbf8e8e71c Author: Can Guo Date: Thu Nov 14 22:09:27 2019 -0800 scsi: ufs: Fix register dump caused sleep in atomic context ufshcd_print_host_regs() can be called by interrupt handler, but it may sleep due to ufshcd_dump_regs() allocates the dump buffer memory with flag GFP_KERNEL. Fix it by changing GFP_KERNEL to GFP_ATMOIC. Link: https://lore.kernel.org/r/1573798172-20534-5-git-send-email-cang@codeaurora.org Reviewed-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 71d848b8d97ec0f8e993d63cf9de6ac8b3f7c43d Author: Can Guo Date: Thu Nov 14 22:09:26 2019 -0800 scsi: ufs: Fix up auto hibern8 enablement Fix up possible unclocked register access to auto hibern8 register in resume path and through sysfs entry. Meanwhile, enable auto hibern8 only after device is fully initialized in probe path. Link: https://lore.kernel.org/r/1573798172-20534-4-git-send-email-cang@codeaurora.org Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 870b1279c7a0344c99d85a9cb1619f6023e752ed Author: Can Guo Date: Thu Nov 14 22:09:25 2019 -0800 scsi: ufs-qcom: Add reset control support for host controller Add reset control for host controller so that host controller can be reset as required in its power up sequence. Link: https://lore.kernel.org/r/1573798172-20534-3-git-send-email-cang@codeaurora.org Reviewed-by: Avri Altman Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit ebdd1dfde5d2c9b2532ee5b393d66d8bc5f56177 Author: Can Guo Date: Thu Nov 14 22:09:24 2019 -0800 scsi: ufs: Add device reset in link recovery path In order to recover from hibern8 exit failure, perform a reset in link recovery path before issuing link start-up. Link: https://lore.kernel.org/r/1573798172-20534-2-git-send-email-cang@codeaurora.org Reviewed-by: Bean Huo Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 0424c5a4dda5608a2910474e3e8f0fd8e7126f42 Merge: a25ecd9d1e60 d1242b10ff03 Author: Alexei Starovoitov Date: Mon Nov 18 19:51:17 2019 -0800 Merge branch 'remove-jited-size-limits' Ilya Leoshkevich says: ==================== This patch series introduces usage of relative long jumps and loads in order to lift 64/512k size limits on JITed BPF programs on s390. Patch 1 introduces long relative branches. Patch 2 changes the way literal pool is arranged in order to be compatible with long relative loads. Patch 3 changes the way literal pool base register is loaded for large programs. Patch 4 replaces regular loads with long relative loads where they are totally superior. Patch 5 introduces long relative loads as an alternative way to load constants in large programs. Regular loads are kept and still used for small programs. Patch 6 removes the size limit check. ==================== Signed-off-by: Alexei Starovoitov commit d1242b10ff03a40ae095e6dd54aac4a6f0f547d5 Author: Ilya Leoshkevich Date: Mon Nov 18 19:03:40 2019 +0100 s390/bpf: Remove JITed image size limitations Now that jump and long displacement ranges are no longer a problem, remove the limit on JITed image size. In practice it's still limited by 2G, but with verifier allowing "only" 1M instructions, it's not an issue. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191118180340.68373-7-iii@linux.ibm.com commit b25c57b6b7dda3799aaebc5f463776e4a0555927 Author: Ilya Leoshkevich Date: Mon Nov 18 19:03:39 2019 +0100 s390/bpf: Use lg(f)rl when long displacement cannot be used If literal pool grows past 524287 mark, it's no longer possible to use long displacement to reference literal pool entries. In JIT setting maintaining multiple literal pool registers is next to impossible, since we operate on one instruction at a time. Therefore, fall back to loading literal pool entry using PC-relative addressing, and then using a register-register form of the following machine instruction. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191118180340.68373-6-iii@linux.ibm.com commit 451e448ff4bb137da3d4b8b26a8260a2ff66869a Author: Ilya Leoshkevich Date: Mon Nov 18 19:03:38 2019 +0100 s390/bpf: Use lgrl instead of lg where possible lg and lgrl have the same performance characteristics, but the former requires a base register and is subject to long displacement range limits, while the latter does not. Therefore, lgrl is totally superior to lg and should be used instead whenever possible. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191118180340.68373-5-iii@linux.ibm.com commit c1aff5682da2977c26fc087cf6a28e31a430174b Author: Ilya Leoshkevich Date: Mon Nov 18 19:03:37 2019 +0100 s390/bpf: Load literal pool register using larl Currently literal pool register is loaded using basr, which makes it point not to the beginning of the literal pool, but rather to the next instruction. In case JITed code is larger than 512k, this renders literal pool register absolutely useless due to long displacement range restrictions. The solution is to use larl to make literal pool register point to the very beginning of the literal pool. This makes it always possible to address 512k worth of literal pool entries using long displacement. However, for short programs, in which the entire literal pool is covered by basr-generated base, it is still beneficial to use basr, since it is 4 bytes shorter than larl. Detect situations when basr-generated base does not cover the entire literal pool, and in such cases use larl instead. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191118180340.68373-4-iii@linux.ibm.com commit e0491f64795bfc71ef6b13ba6b6fa6e176fa3c23 Author: Ilya Leoshkevich Date: Mon Nov 18 19:03:36 2019 +0100 s390/bpf: Align literal pool entries When literal pool size exceeds 512k, it's no longer possible to reference all the entries in it using a single base register and long displacement. Therefore, PC-relative lgfrl and lgrl instructions need to be used. Unfortunately, they require their arguments to be aligned to 4- and 8-byte boundaries respectively. This generates certain overhead due to necessary padding bytes. Grouping 4- and 8-byte entries together reduces the maximum overhead to 6 bytes (2 for aligning 4-byte entries and 4 for aligning 8-byte entries). While in theory it is possible to detect whether or not alignment is needed by comparing the literal pool size with 512k, in practice this leads to having two ways of emitting constants, making the code more complicated. Prefer code simplicity over trivial size saving, and always group and align literal pool entries. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191118180340.68373-3-iii@linux.ibm.com commit 4e9b4a6883dd97aff53ae3b08eb900716a5469dc Author: Ilya Leoshkevich Date: Mon Nov 18 19:03:35 2019 +0100 s390/bpf: Use relative long branches Currently maximum JITed code size is limited to 64k, because JIT can emit only relative short branches, whose range is limited by 64k in both directions. Teach JIT to use relative long branches. There are no compare+branch relative long instructions, so using relative long branches consumes more space due to having to having to emit an explicit comparison instruction. Therefore do this only when relative short branch is not enough. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191118180340.68373-2-iii@linux.ibm.com commit a25ecd9d1e60241df905b29fb84765eb74545c4f Author: Colin Ian King Date: Mon Nov 18 11:40:59 2019 +0000 bpf: Fix memory leak on object 'data' The error return path on when bpf_fentry_test* tests fail does not kfree 'data'. Fix this by adding the missing kfree. Addresses-Coverity: ("Resource leak") Fixes: faeb2dce084a ("bpf: Add kernel test functions for fentry testing") Signed-off-by: Colin Ian King Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191118114059.37287-1-colin.king@canonical.com commit c21709e744b482baab544a893a3a1a9370d51850 Author: Colin Ian King Date: Mon Nov 18 11:48:35 2019 +0000 net: phy: dp83869: fix return of uninitialized variable ret In the case where the call to phy_interface_is_rgmii returns zero the variable ret is left uninitialized and this is returned at the end of the function dp83869_configure_rgmii. Fix this by returning 0 instead of the uninitialized value in ret. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 01db923e8377 ("net: phy: dp83869: Add TI dp83869 phy") Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3132174b4b5c999d383f047eebdcd8a326431802 Author: Xin Long Date: Mon Nov 18 18:10:12 2019 +0800 lwtunnel: change to use nla_put_u8 for LWTUNNEL_IP_OPT_ERSPAN_VER LWTUNNEL_IP_OPT_ERSPAN_VER is u8 type, and nla_put_u8 should have been used instead of nla_put_u32(). This is a copy-paste error. Fixes: b0a21810bd5e ("lwtunnel: add options setting and dumping for erspan") Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit bec39a9fbbfa52dc8e6b213b1bde57313b252dd6 Merge: c4154cffa390 642aebdee4a1 Author: David S. Miller Date: Mon Nov 18 17:13:29 2019 -0800 Merge branch 'bnxt_en-Updates' Michael Chan says: ==================== bnxt_en: Updates. This series has the firmware interface update that changes the aRFS/ntuple interface on 57500 chips. The 2nd patch adds a counter and improves the hardware buffer error handling on the 57500 chips. The rest of the series is mainly enhancements on error recovery and firmware reset. ==================== Signed-off-by: David S. Miller commit 642aebdee4a1f53b713becb3b7df8896fbaeda33 Author: Pavan Chebbi Date: Mon Nov 18 03:56:43 2019 -0500 bnxt_en: Abort waiting for firmware response if there is no heartbeat. This is especially beneficial during the NVRAM related firmware commands that have longer timeouts. If the BNXT_STATE_FW_FATAL_COND flag gets set while waiting for firmware response, abort and return error. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit a2b31e27f6269af8bbda4be2199c2af7c4dcb5a3 Author: Vasundhara Volam Date: Mon Nov 18 03:56:42 2019 -0500 bnxt_en: Add a warning message for driver initiated reset During loss of heartbeat, log this warning message. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 05069dd4c577f9b143dfd243d55834333c4470c5 Author: Vasundhara Volam Date: Mon Nov 18 03:56:41 2019 -0500 bnxt_en: Return proper error code for non-existent NVM variable For NVM params that are not supported in the current NVM configuration, return the error as -EOPNOTSUPP. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit e4e38237d7e39e84d4db4a5cf0aa1ce7fbfaa5d6 Author: Vasundhara Volam Date: Mon Nov 18 03:56:40 2019 -0500 bnxt_en: Report health status update after reset is done Report health status update to devlink health reporter, once reset is completed. Cc: Jiri Pirko Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit e633a32935a315b8e1f742622dcb254076a42352 Author: Vasundhara Volam Date: Mon Nov 18 03:56:39 2019 -0500 bnxt_en: Set MASTER flag during driver registration. The Linux driver is capable of being the master function to handle resets, so we set the flag to let firmware know. Some other drivers, such as DPDK, is not capable and will not set the flag. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0a3f4e4f342c070312d799f7998d2f916c502c6e Author: Vasundhara Volam Date: Mon Nov 18 03:56:38 2019 -0500 bnxt_en: Extend ETHTOOL_RESET to hot reset driver. If firmware supports hot reset, extend ETHTOOL_RESET to support hot reset driver which does not require a driver reload after ETHTOOL_RESET. The driver will go through the same coordinated reset sequence as a firmware initiated fatal/non-fatal reset. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 5b306bde2b46964d604924ec085d619ffc331e09 Author: Vasundhara Volam Date: Mon Nov 18 03:56:37 2019 -0500 bnxt_en: Increase firmware response timeout for coredump commands. Use the larger HWRM_COREDUMP_TIMEOUT value for coredump related data response from the firmware. These commands take longer than normal commands. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 19b3751ffa713d04290effb26fe01009010f2206 Author: Michael Chan Date: Mon Nov 18 03:56:36 2019 -0500 bnxt_en: Improve RX buffer error handling. When hardware reports RX buffer errors, the latest 57500 chips do not require reset. The packet is discarded by the hardware and the ring will continue to operate. Also, add an rx_buf_errors counter for this type of error. It can help the user to identify if the aggregation ring is too small. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 41136ab35888c4007c6aad2f86e35afb97003e69 Author: Michael Chan Date: Mon Nov 18 03:56:35 2019 -0500 bnxt_en: Update firmware interface spec to 1.10.1.12. The aRFS ring table interface has changed for the 57500 chips. Updating it accordingly so it will work with the latest production firmware. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c4154cffa390ab59681a6ece4ea4ab41f9a393dd Merge: 6960f7e3b2d7 64916b57c0b1 Author: David S. Miller Date: Mon Nov 18 17:11:54 2019 -0800 Merge branch 'selftests-Add-ethtool-and-scale-tests' Ido Schimmel says: ==================== selftests: Add ethtool and scale tests This patch set adds generic ethtool tests and a mlxsw-specific router scale test for Spectrum-2. Patches #1-#2 from Danielle add the router scale test for Spectrum-2. It re-uses the same test as Spectrum-1, but it is invoked with a different scale, according to what it is queried from devlink-resource. Patches #3-#5 from Amit are a re-work of the ethtool tests that were posted in the past [1]. Patches #3-#4 add the necessary library routines, whereas patch #5 adds the test itself. The test checks both good and bad flows with autoneg on and off. The test plan it detailed in the commit message. Last time Andrew and Florian (copied) provided very useful feedback that is incorporated in this set. Namely: * Parse the value of the different link modes from /usr/include/linux/ethtool.h * Differentiate between supported and advertised speeds and use the latter in autoneg tests * Make the test generic and move it to net/forwarding/ instead of being mlxsw-specific [1] https://patchwork.ozlabs.org/cover/1112903/ ==================== Signed-off-by: David S. Miller commit 64916b57c0b1f5576ae5973d6ff233731b9b3751 Author: Amit Cohen Date: Mon Nov 18 09:50:02 2019 +0200 selftests: forwarding: Add speed and auto-negotiation test Check configurations and packets transference with different variations of autoneg and speed. Test plan: 1. Test force of same speed with autoneg off 2. Test force of different speeds with autoneg off (should fail) 3. One side is autoneg on and other side sets force of common speeds 4. One side is autoneg on and other side only advertises a subset of the common speeds (one speed of the subset) 5. One side is autoneg on and other side only advertises a subset of the common speeds. Check that highest speed is negotiated 6. Test autoneg on, but each side advertises different speeds (should fail) Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 8f72a9cf369090c3b94101a11cc4546f13f94925 Author: Amit Cohen Date: Mon Nov 18 09:50:01 2019 +0200 selftests: forwarding: lib.sh: Add wait for dev with timeout Add a function that waits for device with maximum number of iterations. It enables to limit the waiting and prevent infinite loop. This will be used by the subsequent patch which will set two ports to different speeds in order to make sure they cannot negotiate a link. Waiting for all the setup is limited with 10 minutes for each device. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 646cf7ed9abba7cc1a45f70243cd94808d4c8b6b Author: Amit Cohen Date: Mon Nov 18 09:50:00 2019 +0200 selftests: forwarding: Add ethtool_lib.sh Functions: 1. speeds_arr_get The function returns an array of speed values from /usr/include/linux/ethtool.h The array looks as follows: [10baseT/Half] = 0, [10baseT/Full] = 1, ... 2. ethtool_set: params: cmd The function runs ethtool by cmd (ethtool -s cmd) and checks if there was an error in configuration 3. dev_speeds_get: params: dev, with_mode (0 or 1), adver (0 or 1) return value: Array of supported/Advertised link modes with/without mode * Example 1: speeds_get swp1 0 0 return: 1000 10000 40000 * Example 2: speeds_get swp1 1 1 return: 1000baseKX/Full 10000baseKR/Full 40000baseCR4/Full 4. common_speeds_get: params: dev1, dev2, with_mode (0 or 1), adver (0 or 1) return value: Array of common speeds of dev1 and dev2 * Example: common_speeds_get swp1 swp2 0 0 return: 1000 10000 Assuming that swp1 supports 1000 10000 40000 and swp2 supports 1000 10000 Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b22b0b0b10aa16bfe020f0ce506ab78a4d8a5fd4 Author: Danielle Ratson Date: Mon Nov 18 09:49:59 2019 +0200 selftests: mlxsw: Check devlink device before running test The scale test for Spectrum-2 should only be invoked for Spectrum-2. Skip the test otherwise. Signed-off-by: Danielle Ratson Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0fed96fa8342a14de7715fe37ae35cb5775bdced Author: Danielle Ratson Date: Mon Nov 18 09:49:58 2019 +0200 selftests: mlxsw: Add router scale test for Spectrum-2 Same as for Spectrum-1, test the ability to add the maximum number of routes possible to the switch. Invoke the test from the 'resource_scale' wrapper script. Signed-off-by: Danielle Ratson Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6960f7e3b2d77ebcb20d5cecdd74d7ca1ed425aa Merge: b95e86d846b6 832ccf6f80cd Author: David S. Miller Date: Mon Nov 18 17:03:18 2019 -0800 Merge branch 'page_pool-followup-changes-to-restore-tracepoint-features' Jesper Dangaard says: ==================== page_pool: followup changes to restore tracepoint features This patchset is a followup to Jonathan patch, that do not release pool until inflight == 0. That changed page_pool to be responsible for its own delayed destruction instead of relying on xdp memory model. As the page_pool maintainer, I'm promoting the use of tracepoint to troubleshoot and help driver developers verify correctness when converting at driver to use page_pool. The role of xdp:mem_disconnect have changed, which broke my bpftrace tools for shutdown verification. With these changes, the same capabilities are regained. ==================== Signed-off-by: David S. Miller commit 832ccf6f80cda06ad2373cd1f40291b0183958b4 Author: Jesper Dangaard Brouer Date: Sat Nov 16 12:22:48 2019 +0100 page_pool: extend tracepoint to also include the page PFN The MM tracepoint for page free (called kmem:mm_page_free) doesn't provide the page pointer directly, instead it provides the PFN (Page Frame Number). This is annoying when writing a page_pool leak detector in BPF. This patch change page_pool tracepoints to also provide the PFN. The page pointer is still provided to allow other kinds of troubleshooting from BPF. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 7c9e69428da39ed761c9d903c4850368fa4ef7bf Author: Jesper Dangaard Brouer Date: Sat Nov 16 12:22:43 2019 +0100 page_pool: add destroy attempts counter and rename tracepoint When Jonathan change the page_pool to become responsible to its own shutdown via deferred work queue, then the disconnect_cnt counter was removed from xdp memory model tracepoint. This patch change the page_pool_inflight tracepoint name to page_pool_release, because it reflects the new responsability better. And it reintroduces a counter that reflect the number of times page_pool_release have been tried. The counter is also used by the code, to only empty the alloc cache once. With a stuck work queue running every second and counter being 64-bit, it will overrun in approx 584 billion years. For comparison, Earth lifetime expectancy is 7.5 billion years, before the Sun will engulf, and destroy, the Earth. Signed-off-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit c491eae8f9c0720520ebdeb4d335671f84b84b71 Author: Jesper Dangaard Brouer Date: Sat Nov 16 12:22:38 2019 +0100 xdp: remove memory poison on free for struct xdp_mem_allocator When looking at the details I realised that the memory poison in __xdp_mem_allocator_rcu_free doesn't make sense. This is because the SLUB allocator uses the first 16 bytes (on 64 bit), for its freelist, which overlap with members in struct xdp_mem_allocator, that were updated. Thus, SLUB already does the "poisoning" for us. I still believe that poisoning memory make sense in other cases. Kernel have gained different use-after-free detection mechanism, but enabling those is associated with a huge overhead. Experience is that debugging facilities can change the timing so much, that that a race condition will not be provoked when enabled. Thus, I'm still in favour of poisoning memory where it makes sense. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit b95e86d846b63b02ecdc94802ddbeaf9005fb6d9 Author: Russell King Date: Fri Nov 15 20:08:37 2019 +0000 net: phy: avoid matching all-ones clause 45 PHY IDs We currently match clause 45 PHYs using any ID read from a MMD marked as present in the "Devices in package" registers 5 and 6. However, this is incorrect. 45.2 says: "The definition of the term package is vendor specific and could be a chip, module, or other similar entity." so a package could be more or less than the whole PHY - a PHY could be made up of several modules instantiated onto a single chip such as the Marvell 88x3310, or some of the MMDs could be disabled according to chip configuration, such as the Broadcom 84881. In the case of Broadcom 84881, the "Devices in package" registers contain 0xc000009b, meaning that there is a PHYXS present in the package, but all registers in MMD 4 return 0xffff. This leads to our matching code incorrectly binding this PHY to one of our generic PHY drivers. This patch changes the way we determine whether to attempt to match a MMD identifier, or use it to request a module - if the identifier is all-ones, then we skip over it. When reading the identifiers, we initialise phydev->c45_ids.device_ids to all-ones, only reading the device ID if the "Devices in package" registers indicates we should. This avoids the generic drivers incorrectly matching on a PHY ID of 0xffffffff. Signed-off-by: Russell King Signed-off-by: David S. Miller commit e64dbb1ac078f04b21e980e0ea0e81eafba618e1 Merge: 99638e9d6c85 36023da1c704 Author: David S. Miller Date: Mon Nov 18 16:56:13 2019 -0800 Merge branch 'Add-support-for-SFPs-behind-PHYs' Russell King says: ==================== Add support for SFPs behind PHYs This series adds partial support for SFP cages connected to PHYs, specifically optical SFPs. We add core infrastructure to phylib for this, and arrange for minimal code in the PHY driver - currently, this is code to verify that the module is one that we can support for Marvell 10G PHYs. v2: add yaml binding patch ==================== Signed-off-by: David S. Miller commit 36023da1c704d56f2f264ccbfcfb7a15cdfd4d14 Author: Russell King Date: Fri Nov 15 19:56:56 2019 +0000 net: phy: marvell10g: add SFP+ support Add support for SFP+ cages to the Marvell 10G PHY driver. This is slightly complicated by the way phylib works in that we need to use a multi-step process to attach the SFP bus, and we also need to track the phylink state machine to know when the module's transmit disable signal should change state. With appropriate DT changes, this allows the SFP+ canges on the Macchiatobin platform to be functional. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 298e54fa810e027f1b0800d789eb862592721f08 Author: Russell King Date: Fri Nov 15 19:56:51 2019 +0000 net: phy: add core phylib sfp support Add core phylib help for supporting SFP sockets on PHYs. This provides a mechanism to inform the SFP layer about PHY up/down events, and also unregister the SFP bus when the PHY is going away. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit fb3d8bcde6df5565ba8a2d823eeb2928b6101d62 Author: Russell King Date: Fri Nov 15 19:56:46 2019 +0000 dt-bindings: net: add ethernet controller and phy sfp property Document the missing sfp property for ethernet controllers (which has existed for some time) which is being extended to ethernet PHYs. Signed-off-by: Russell King Reviewed-by: Rob Herring Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 99638e9d6c854c8b8da6beb06113b4c811c693fd Merge: 19b7e21c55c8 ff4bf2f42a40 Author: David S. Miller Date: Mon Nov 18 16:43:05 2019 -0800 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) Wildcard support for the net,iface set from Kristian Evensen. 2) Offload support for matching on the input interface. 3) Simplify matching on vlan header fields. 4) Add nft_payload_rebuild_vlan_hdr() function to rebuild the vlan header from the vlan sk_buff metadata. 5) Pass extack to nft_flow_cls_offload_setup(). 6) Add C-VLAN matching support. 7) Use time64_t in xt_time to fix y2038 overflow, from Arnd Bergmann. 8) Use time_t in nft_meta to fix y2038 overflow, also from Arnd. 9) Add flow_action_entry_next() helper function to flowtable offload infrastructure. 10) Add IPv6 support to the flowtable offload infrastructure. 11) Support for input interface matching from postrouting, from Phil Sutter. 12) Missing check for ndo callback in flowtable offload, from wenxu. 13) Remove conntrack parameter from flow_offload_fill_dir(), from wenxu. 14) Do not pass flow_rule object for rule removal, cookie is sufficient to achieve this. 15) Release flow_rule object in case of error from the offload commit path. 16) Undo offload ruleset updates if transaction fails. 17) Check for error when binding flowtable callbacks, from wenxu. 18) Always unbind flowtable callbacks when unregistering hooks. ==================== Signed-off-by: David S. Miller commit fa17ed069c61286b26382e23b57a62930657b9c1 Author: David Sterba Date: Thu Oct 3 17:29:05 2019 +0200 btrfs: drop bdev argument from submit_extent_page After previous patches removing bdev being passed around to set it to bio, it has become unused in submit_extent_page. So it now has "only" 13 parameters. Signed-off-by: David Sterba commit a019e9e197eaa68ffe2efeba00d685581b1a5416 Author: David Sterba Date: Fri Aug 30 15:40:53 2019 +0200 btrfs: remove extent_map::bdev We can now remove the bdev from extent_map. Previous patches made sure that bio_set_dev is correctly in all places and that we don't need to grab it from latest_bdev or pass it around inside the extent map. Signed-off-by: David Sterba commit 1a41802701ec78ca3272073e60463c13b17d121f Author: David Sterba Date: Fri Aug 30 19:39:19 2019 +0200 btrfs: drop bio_set_dev where not needed bio_set_dev sets a bdev to a bio and is not only setting a pointer bug also changing some state bits if there was a different bdev set before. This is one thing that's not needed. Another thing is that setting a bdev at bio allocation time is too early and actually does not work with plain redundancy profiles, where each time we submit a bio to a device, the bdev is set correctly. In many places the bio bdev is set to latest_bdev that seems to serve as a stub pointer "just to put something to bio". But we don't have to do that. Where do we know which bdev to set: * for regular IO: submit_stripe_bio that's called by btrfs_map_bio * repair IO: repair_io_failure, read or write from specific device * super block write (using buffer_heads but uses raw bdev) and barriers * scrub: this does not use all regular IO paths as it needs to reach all copies, verify and fixup eventually, and for that all bdev management is independent * raid56: rbio_add_io_page, for the RMW write * integrity-checker: does it's own low-level block tracking Signed-off-by: David Sterba commit 429aebc0a9a063667dba21244386f96e5b4d7330 Author: David Sterba Date: Mon Nov 18 23:27:55 2019 +0100 btrfs: get bdev directly from fs_devices in submit_extent_page This is preparatory patch to remove @bdev parameter from submit_extent_page. It can't be removed completely, because the cgroups need it for wbc when initializing the bio wbc_init_bio bio_associate_blkg_from_css dereference bdev->bi_disk->queue The bdev pointer is the same as latest_bdev, thus no functional change. We can retrieve it from fs_devices that's reachable through several dereferences. The local variable shadows the parameter, but that's only temporary. Signed-off-by: David Sterba commit a910e4666d61712840c78de33cc7f89de8affa78 Author: Ian Rogers Date: Fri Nov 15 23:46:52 2019 -0800 perf parse: Report initial event parsing error Record the first event parsing error and report. Implementing feedback from Jiri Olsa: https://lkml.org/lkml/2019/10/28/680 An example error is: $ tools/perf/perf stat -e c/c/ WARNING: multiple event parsing errors event syntax error: 'c/c/' \___ unknown term valid terms: event,filter_rem,filter_opc0,edge,filter_isoc,filter_tid,filter_loc,filter_nc,inv,umask,filter_opc1,tid_en,thresh,filter_all_op,filter_not_nm,filter_state,filter_nm,config,config1,config2,name,period,percore Initial error: event syntax error: 'c/c/' \___ Cannot find PMU `c'. Missing kernel support? Run 'perf list' for a list of valid events Usage: perf stat [] [] -e, --event event selector. use 'perf list' to list available events Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Allison Randal Cc: Andi Kleen Cc: Anju T Sudhakar Cc: Christian Borntraeger Cc: Davidlohr Bueso Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Thomas Richter Link: http://lore.kernel.org/lkml/20191116074652.9960-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit cb4027308570841869ec0c6bdafc9658c10f28a3 Author: Masami Hiramatsu Date: Mon Nov 18 17:12:49 2019 +0900 perf probe: Trace a magic number if variable is not found Trace a magic number as immediate value if the target variable is not found at some probe points which is based on one probe event. This feature is good for the case if you trace a source code line with some local variables, which is compiled into several instructions and some of the variables are optimized out on some instructions. Even if so, with this feature, perf probe trace a magic number instead of such disappeared variables and fold those probes on one event. E.g. without this patch: # perf probe -D "pud_page_vaddr pud" Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. Failed to find 'pud' in this function. p:probe/pud_page_vaddr _text+23480787 pud=%ax:x64 p:probe/pud_page_vaddr _text+23808453 pud=%bp:x64 p:probe/pud_page_vaddr _text+23558082 pud=%ax:x64 p:probe/pud_page_vaddr _text+328373 pud=%r8:x64 p:probe/pud_page_vaddr _text+348448 pud=%bx:x64 p:probe/pud_page_vaddr _text+23816818 pud=%bx:x64 With this patch: # perf probe -D "pud_page_vaddr pud" | head spurious_kernel_fault is blacklisted function, skip it. vmalloc_fault is blacklisted function, skip it. p:probe/pud_page_vaddr _text+23480787 pud=%ax:x64 p:probe/pud_page_vaddr _text+149051 pud=\deade12d:x64 p:probe/pud_page_vaddr _text+23808453 pud=%bp:x64 p:probe/pud_page_vaddr _text+315926 pud=\deade12d:x64 p:probe/pud_page_vaddr _text+23807209 pud=\deade12d:x64 p:probe/pud_page_vaddr _text+23557365 pud=%ax:x64 p:probe/pud_page_vaddr _text+314097 pud=%di:x64 p:probe/pud_page_vaddr _text+314015 pud=\deade12d:x64 p:probe/pud_page_vaddr _text+313893 pud=\deade12d:x64 p:probe/pud_page_vaddr _text+324083 pud=\deade12d:x64 Signed-off-by: Masami Hiramatsu Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Steven Rostedt (VMware) Cc: Tom Zanussi Link: http://lore.kernel.org/lkml/157406476931.24476.6261475888681844285.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 66f69b2197167cb99330c77a550da50f1f597abc Author: Masami Hiramatsu Date: Mon Nov 18 17:12:40 2019 +0900 perf probe: Support DW_AT_const_value constant value Support DW_AT_const_value for variable assignment instead of location. Note that this requires ftrace supporting immediate value. Signed-off-by: Masami Hiramatsu Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Steven Rostedt (VMware) Cc: Tom Zanussi Link: http://lore.kernel.org/lkml/157406476012.24476.16096289871757175775.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 72363540c009db5014252a1a15e149d30f88bcc3 Author: Masami Hiramatsu Date: Mon Nov 18 17:12:30 2019 +0900 perf probe: Support multiprobe event Support multiprobe event if the event is based on function and lines and kernel supports it. In this case, perf probe creates the first probe with an event, and tries to append following probes on that event, since those probes must be on the same source code line. Before this patch; # perf probe -a vfs_read:18 Added new events: probe:vfs_read_L18 (on vfs_read:18) probe:vfs_read_L18_1 (on vfs_read:18) You can now use it in all perf tools, such as: perf record -e probe:vfs_read_L18_1 -aR sleep 1 # After this patch (on multiprobe supported kernel) # perf probe -a vfs_read:18 Added new events: probe:vfs_read_L18 (on vfs_read:18) probe:vfs_read_L18 (on vfs_read:18) You can now use it in all perf tools, such as: perf record -e probe:vfs_read_L18 -aR sleep 1 # Committer testing: On a kernel that doesn't support multiprobe events, after this patch: # uname -a Linux quaco 5.3.8-200.fc30.x86_64 #1 SMP Tue Oct 29 14:46:22 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux # grep append /sys/kernel/debug/tracing/README be modified by appending '.descending' or '.ascending' to a can be modified by appending any of the following modifiers # # perf probe -a vfs_read:18 Added new events: probe:vfs_read_L18 (on vfs_read:18) probe:vfs_read_L18_1 (on vfs_read:18) You can now use it in all perf tools, such as: perf record -e probe:vfs_read_L18_1 -aR sleep 1 # perf probe -l probe:vfs_read_L18 (on vfs_read:18@fs/read_write.c) probe:vfs_read_L18_1 (on vfs_read:18@fs/read_write.c) # Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Steven Rostedt (VMware) Cc: Tom Zanussi Link: http://lore.kernel.org/lkml/157406475010.24476.586290752591512351.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 15354d54698648e20454fc8f298a5b18b6debea7 Author: Masami Hiramatsu Date: Mon Nov 18 17:12:20 2019 +0900 perf probe: Generate event name with line number Generate event name from function name with line number as _L. Note that this is only for the new event which is defined by the line number of function (except for line 0). If there is another event on same line, you have to use "-f" option. In that case, the new event has "_1" suffix. e.g. # perf probe -a kernel_read:2 Added new event: probe:kernel_read_L2 (on kernel_read:2) You can now use it in all perf tools, such as: perf record -e probe:kernel_read_L2 -aR sleep 1 But if we omit the line number or 0th line, it will have no suffix. # perf probe -a kernel_read:0 Added new event: probe:kernel_read (on kernel_read) You can now use it in all perf tools, such as: perf record -e probe:kernel_read -aR sleep 1 probe:kernel_read (on kernel_read@linux-5.0.0/fs/read_write.c) probe:kernel_read_L2 (on kernel_read:2@linux-5.0.0/fs/read_write.c) Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Steven Rostedt (VMware) Cc: Tom Zanussi Link: http://lore.kernel.org/lkml/157406474026.24476.2828897745502059569.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 499144c83d3b7e4f9e83916acfc97bbc3af891dc Author: Masami Hiramatsu Date: Mon Nov 18 17:12:10 2019 +0900 perf probe: Do not show non representive lines by perf-probe -L Since perf probe -L shows non representive lines, it can be mislead users where user can put probes. This prevents to show such non representive lines so that user can understand which lines user can probe. # perf probe -L kernel_read 0 ssize_t kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) { 2 mm_segment_t old_fs; ssize_t result; old_fs = get_fs(); 6 set_fs(get_ds()); /* The cast to a user pointer is valid due to the set_fs() */ 8 result = vfs_read(file, (void __user *)buf, count, pos); 9 set_fs(old_fs); 10 return result; } EXPORT_SYMBOL(kernel_read); Committer testing: Before: # perf probe -L kernel_read 0 ssize_t kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) 1 { 2 mm_segment_t old_fs; 3 ssize_t result; 5 old_fs = get_fs(); 6 set_fs(KERNEL_DS); /* The cast to a user pointer is valid due to the set_fs() */ 8 result = vfs_read(file, (void __user *)buf, count, pos); 9 set_fs(old_fs); 10 return result; } EXPORT_SYMBOL(kernel_read); # See the 1, 3, 5 lines? They shouldn't be there, after this patch: # perf probe -L kernel_read 0 ssize_t kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) { 2 mm_segment_t old_fs; ssize_t result; old_fs = get_fs(); 6 set_fs(KERNEL_DS); /* The cast to a user pointer is valid due to the set_fs() */ 8 result = vfs_read(file, (void __user *)buf, count, pos); 9 set_fs(old_fs); 10 return result; } EXPORT_SYMBOL(kernel_read); # Signed-off-by: Masami Hiramatsu Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Steven Rostedt (VMware) Cc: Tom Zanussi Link: http://lore.kernel.org/lkml/157406473064.24476.2913278267727587314.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 1ae5d88a4eefacd4a3643170c20cf6403a24d254 Author: Masami Hiramatsu Date: Mon Nov 18 17:12:00 2019 +0900 perf probe: Verify given line is a representive line Verify user given probe line is a representive line (which doesn't share the address with other lines or the line is the least line among the lines which shares same address), and if not, it shows what is the representive line. Without this fix, user can put a probe on the lines which is not a a representive line. But since this is not a representive line, perf probe -l shows a representive line number instead of user given line number. e.g. (put kernel_read:3, but listed as kernel_read:2) # perf probe -a kernel_read:3 Added new event: probe:kernel_read (on kernel_read:3) You can now use it in all perf tools, such as: perf record -e probe:kernel_read -aR sleep 1 # perf probe -l probe:kernel_read (on kernel_read:2@linux-5.0.0/fs/read_write.c) With this fix, perf probe doesn't allow user to put a probe on a representive line, and tell what is the representive line. # perf probe -a kernel_read:3 This line is sharing the addrees with other lines. Please try to probe at kernel_read:2 instead. Error: Failed to add events. Signed-off-by: Masami Hiramatsu Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Steven Rostedt (VMware) Cc: Tom Zanussi Link: http://lore.kernel.org/lkml/157406472071.24476.14915451439785001021.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 57f95bf5f88295612871c36cb0de5069e50570f8 Author: Masami Hiramatsu Date: Mon Nov 18 17:11:50 2019 +0900 perf probe: Show correct statement line number by perf probe -l The dwarf_getsrc_die() can return the line which is not a statement nor the least line number among the lines which shares same address. This can lead perf probe --list shows incorrect line number for probed address. To fix this, this introduces cu_getsrc_die() which returns only a statement line and which is the least line number (we call it the representive line for an address), and use it in cu_find_lineinfo(). Also, if the given address is the entry address of a real function, cu_find_lineinfo() returns the function declared line number instead of the start line number of the function body. For example, without this change perf probe -l shows incorrect line as below. # perf probe -a kernel_read:2 Added new event: probe:kernel_read (on kernel_read:2) You can now use it in all perf tools, such as: perf record -e probe:kernel_read -aR sleep 1 # perf probe -l probe:kernel_read (on kernel_read:1@linux-5.0.0/fs/read_write.c) With this fix, it shows correct line number as below; # perf probe -l probe:kernel_read (on kernel_read:2@linux-5.0.0/fs/read_write.c) Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Steven Rostedt (VMware) Cc: Tom Zanussi Link: http://lore.kernel.org/lkml/157406471067.24476.17463149618465494448.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit b980be189c9badba50634671e2303e92bf28e35a Author: Adrian Hunter Date: Fri Nov 15 15:54:47 2019 +0200 x86/insn: Add some Intel instructions to the opcode map Add to the opcode map the following instructions: cldemote tpause umonitor umwait movdiri movdir64b enqcmd enqcmds encls enclu enclv pconfig wbnoinvd For information about the instructions, refer Intel SDM May 2019 (325462-070US) and Intel Architecture Instruction Set Extensions May 2019 (319433-037). The instruction decoding can be tested using the perf tools' "x86 instruction decoder - new instructions" test as folllows: $ perf test -v "new " 2>&1 | grep -i cldemote Decoded ok: 0f 1c 00 cldemote (%eax) Decoded ok: 0f 1c 05 78 56 34 12 cldemote 0x12345678 Decoded ok: 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%eax,%ecx,8) Decoded ok: 0f 1c 00 cldemote (%rax) Decoded ok: 41 0f 1c 00 cldemote (%r8) Decoded ok: 0f 1c 04 25 78 56 34 12 cldemote 0x12345678 Decoded ok: 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%rax,%rcx,8) Decoded ok: 41 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%r8,%rcx,8) $ perf test -v "new " 2>&1 | grep -i tpause Decoded ok: 66 0f ae f3 tpause %ebx Decoded ok: 66 0f ae f3 tpause %ebx Decoded ok: 66 41 0f ae f0 tpause %r8d $ perf test -v "new " 2>&1 | grep -i umonitor Decoded ok: 67 f3 0f ae f0 umonitor %ax Decoded ok: f3 0f ae f0 umonitor %eax Decoded ok: 67 f3 0f ae f0 umonitor %eax Decoded ok: f3 0f ae f0 umonitor %rax Decoded ok: 67 f3 41 0f ae f0 umonitor %r8d $ perf test -v "new " 2>&1 | grep -i umwait Decoded ok: f2 0f ae f0 umwait %eax Decoded ok: f2 0f ae f0 umwait %eax Decoded ok: f2 41 0f ae f0 umwait %r8d $ perf test -v "new " 2>&1 | grep -i movdiri Decoded ok: 0f 38 f9 03 movdiri %eax,(%ebx) Decoded ok: 0f 38 f9 88 78 56 34 12 movdiri %ecx,0x12345678(%eax) Decoded ok: 48 0f 38 f9 03 movdiri %rax,(%rbx) Decoded ok: 48 0f 38 f9 88 78 56 34 12 movdiri %rcx,0x12345678(%rax) $ perf test -v "new " 2>&1 | grep -i movdir64b Decoded ok: 66 0f 38 f8 18 movdir64b (%eax),%ebx Decoded ok: 66 0f 38 f8 88 78 56 34 12 movdir64b 0x12345678(%eax),%ecx Decoded ok: 67 66 0f 38 f8 1c movdir64b (%si),%bx Decoded ok: 67 66 0f 38 f8 8c 34 12 movdir64b 0x1234(%si),%cx Decoded ok: 66 0f 38 f8 18 movdir64b (%rax),%rbx Decoded ok: 66 0f 38 f8 88 78 56 34 12 movdir64b 0x12345678(%rax),%rcx Decoded ok: 67 66 0f 38 f8 18 movdir64b (%eax),%ebx Decoded ok: 67 66 0f 38 f8 88 78 56 34 12 movdir64b 0x12345678(%eax),%ecx $ perf test -v "new " 2>&1 | grep -i enqcmd Decoded ok: f2 0f 38 f8 18 enqcmd (%eax),%ebx Decoded ok: f2 0f 38 f8 88 78 56 34 12 enqcmd 0x12345678(%eax),%ecx Decoded ok: 67 f2 0f 38 f8 1c enqcmd (%si),%bx Decoded ok: 67 f2 0f 38 f8 8c 34 12 enqcmd 0x1234(%si),%cx Decoded ok: f3 0f 38 f8 18 enqcmds (%eax),%ebx Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx Decoded ok: 67 f3 0f 38 f8 1c enqcmds (%si),%bx Decoded ok: 67 f3 0f 38 f8 8c 34 12 enqcmds 0x1234(%si),%cx Decoded ok: f2 0f 38 f8 18 enqcmd (%rax),%rbx Decoded ok: f2 0f 38 f8 88 78 56 34 12 enqcmd 0x12345678(%rax),%rcx Decoded ok: 67 f2 0f 38 f8 18 enqcmd (%eax),%ebx Decoded ok: 67 f2 0f 38 f8 88 78 56 34 12 enqcmd 0x12345678(%eax),%ecx Decoded ok: f3 0f 38 f8 18 enqcmds (%rax),%rbx Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%rax),%rcx Decoded ok: 67 f3 0f 38 f8 18 enqcmds (%eax),%ebx Decoded ok: 67 f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx $ perf test -v "new " 2>&1 | grep -i enqcmds Decoded ok: f3 0f 38 f8 18 enqcmds (%eax),%ebx Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx Decoded ok: 67 f3 0f 38 f8 1c enqcmds (%si),%bx Decoded ok: 67 f3 0f 38 f8 8c 34 12 enqcmds 0x1234(%si),%cx Decoded ok: f3 0f 38 f8 18 enqcmds (%rax),%rbx Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%rax),%rcx Decoded ok: 67 f3 0f 38 f8 18 enqcmds (%eax),%ebx Decoded ok: 67 f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx $ perf test -v "new " 2>&1 | grep -i encls Decoded ok: 0f 01 cf encls Decoded ok: 0f 01 cf encls $ perf test -v "new " 2>&1 | grep -i enclu Decoded ok: 0f 01 d7 enclu Decoded ok: 0f 01 d7 enclu $ perf test -v "new " 2>&1 | grep -i enclv Decoded ok: 0f 01 c0 enclv Decoded ok: 0f 01 c0 enclv $ perf test -v "new " 2>&1 | grep -i pconfig Decoded ok: 0f 01 c5 pconfig Decoded ok: 0f 01 c5 pconfig $ perf test -v "new " 2>&1 | grep -i wbnoinvd Decoded ok: f3 0f 09 wbnoinvd Decoded ok: f3 0f 09 wbnoinvd Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Acked-by: Masami Hiramatsu Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20191115135447.6519-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1e5f015442e7b700941f8cd0274bb14962b3d78e Author: Adrian Hunter Date: Fri Nov 15 15:54:46 2019 +0200 x86/insn: perf tools: Add some instructions to the new instructions test Add to the "x86 instruction decoder - new instructions" test the following instructions: cldemote tpause umonitor umwait movdiri movdir64b enqcmd enqcmds encls enclu enclv pconfig wbnoinvd For information about the instructions, refer Intel SDM May 2019 (325462-070US) and Intel Architecture Instruction Set Extensions May 2019 (319433-037). Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20191115135447.6519-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2ea2612b987ad703235c92be21d4e98ee9c2c67c Author: Yonghong Song Date: Sun Nov 17 13:40:36 2019 -0800 selftests, bpf: Workaround an alu32 sub-register spilling issue Currently, with latest llvm trunk, selftest test_progs failed obj file test_seg6_loop.o with the following error in verifier: infinite loop detected at insn 76 The byte code sequence looks like below, and noted that alu32 has been turned off by default for better generated codes in general: 48: w3 = 100 49: *(u32 *)(r10 - 68) = r3 ... ; if (tlv.type == SR6_TLV_PADDING) { 76: if w3 == 5 goto -18 ... 85: r1 = *(u32 *)(r10 - 68) ; for (int i = 0; i < 100; i++) { 86: w1 += -1 87: if w1 == 0 goto +5 88: *(u32 *)(r10 - 68) = r1 The main reason for verification failure is due to partial spills at r10 - 68 for induction variable "i". Current verifier only handles spills with 8-byte values. The above 4-byte value spill to stack is treated to STACK_MISC and its content is not saved. For the above example: w3 = 100 R3_w=inv100 fp-64_w=inv1086626730498 *(u32 *)(r10 - 68) = r3 R3_w=inv100 fp-64_w=inv1086626730498 ... r1 = *(u32 *)(r10 - 68) R1_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) fp-64=inv1086626730498 To resolve this issue, verifier needs to be extended to track sub-registers in spilling, or llvm needs to enhanced to prevent sub-register spilling in register allocation phase. The former will increase verifier complexity and the latter will need some llvm "hacking". Let us workaround this issue by declaring the induction variable as "long" type so spilling will happen at non sub-register level. We can revisit this later if sub-register spilling causes similar or other verification issues. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191117214036.1309510-1-yhs@fb.com commit 3b054b7133b4ad93671c82e8d6185258e3f1a7a5 Author: Jiri Benc Date: Fri Nov 15 13:43:23 2019 +0100 selftests, bpf: Fix test_tc_tunnel hanging When run_kselftests.sh is run, it hangs after test_tc_tunnel.sh. The reason is test_tc_tunnel.sh ensures the server ('nc -l') is run all the time, starting it again every time it is expected to terminate. The exception is the final client_connect: the server is not started anymore, which ensures no process is kept running after the test is finished. For a sit test, though, the script is terminated prematurely without the final client_connect and the 'nc' process keeps running. This in turn causes the run_one function in kselftest/runner.sh to hang forever, waiting for the runaway process to finish. Ensure a remaining server is terminated on cleanup. Fixes: f6ad6accaa99 ("selftests/bpf: expand test_tc_tunnel with SIT encap") Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann Acked-by: Willem de Bruijn Link: https://lore.kernel.org/bpf/60919291657a9ee89c708d8aababc28ebe1420be.1573821780.git.jbenc@redhat.com commit 56bf877a508099f16fb78c71a348f39d0dc5fd72 Author: Jiri Benc Date: Mon Nov 18 21:25:26 2019 +0100 selftests, bpf: xdping is not meant to be run standalone The actual test to run is test_xdping.sh, which is already in TEST_PROGS. The xdping program alone is not runnable with 'make run_tests', it immediatelly fails due to missing arguments. Move xdping to TEST_GEN_PROGS_EXTENDED in order to be built but not run. Fixes: cd5385029f1d ("selftests/bpf: measure RTT from xdp using xdping") Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann Reviewed-by: Alan Maguire Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/4365c81198f62521344c2215909634407184387e.1573821726.git.jbenc@redhat.com commit 7624e69465da809f8735d3f72d4fca540c275b7e Author: Arnaldo Carvalho de Melo Date: Mon Nov 18 16:51:00 2019 -0300 perf map: Move seldom used ->flags field to second cacheline So we start with: $ pahole -C map ~/bin/perf struct map { union { struct rb_node rb_node __attribute__((__aligned__(8))); /* 0 24 */ struct list_head node; /* 0 16 */ } __attribute__((__aligned__(8))); /* 0 24 */ u64 start; /* 24 8 */ u64 end; /* 32 8 */ _Bool erange_warned:1; /* 40: 0 1 */ _Bool priv:1; /* 40: 1 1 */ /* XXX 6 bits hole, try to pack */ /* XXX 3 bytes hole, try to pack */ u32 prot; /* 44 4 */ u32 flags; /* 48 4 */ /* XXX 4 bytes hole, try to pack */ u64 pgoff; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u64 reloc; /* 64 8 */ u32 maj; /* 72 4 */ u32 min; /* 76 4 */ u64 ino; /* 80 8 */ u64 ino_generation; /* 88 8 */ u64 (*map_ip)(struct map *, u64); /* 96 8 */ u64 (*unmap_ip)(struct map *, u64); /* 104 8 */ struct dso * dso; /* 112 8 */ refcount_t refcnt; /* 120 4 */ /* size: 128, cachelines: 2, members: 17 */ /* sum members: 116, holes: 2, sum holes: 7 */ /* sum bitfield members: 2 bits, bit holes: 1, sum bit holes: 6 bits */ /* padding: 4 */ /* forced alignments: 1 */ } __attribute__((__aligned__(8))); $ and 'flags' is seldom used when printing details about the map or with the "cacheline" sort order, we can move them it to the second cacheline, that will allow combining it with 'refcnt', that is only four bytes: $ pahole -C map ~/bin/perf struct map { union { struct rb_node rb_node __attribute__((__aligned__(8))); /* 0 24 */ struct list_head node; /* 0 16 */ } __attribute__((__aligned__(8))); /* 0 24 */ u64 start; /* 24 8 */ u64 end; /* 32 8 */ _Bool erange_warned:1; /* 40: 0 1 */ _Bool priv:1; /* 40: 1 1 */ /* XXX 6 bits hole, try to pack */ /* XXX 3 bytes hole, try to pack */ u32 prot; /* 44 4 */ u64 pgoff; /* 48 8 */ u64 reloc; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u32 maj; /* 64 4 */ u32 min; /* 68 4 */ u64 ino; /* 72 8 */ u64 ino_generation; /* 80 8 */ u64 (*map_ip)(struct map *, u64); /* 88 8 */ u64 (*unmap_ip)(struct map *, u64); /* 96 8 */ struct dso * dso; /* 104 8 */ refcount_t refcnt; /* 112 4 */ u32 flags; /* 116 4 */ /* size: 120, cachelines: 2, members: 17 */ /* sum members: 116, holes: 1, sum holes: 3 */ /* sum bitfield members: 2 bits, bit holes: 1, sum bit holes: 6 bits */ /* forced alignments: 1 */ /* last cacheline: 56 bytes */ } __attribute__((__aligned__(8))); $ Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-2cdw3zlw1mkamaf7nqtdlxfi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5ca470a0c3886b80ec13c3a19e9aae4c2f469202 Author: Jonathan Corbet Date: Fri Oct 4 10:39:55 2019 -0600 docs: Add request_irq() documentation While checking the results of the :c:func: removal, I noticed that there was no documentation for request_irq(), and request_threaded_irq() was not mentioned at all. Add a kerneldoc comment for request_irq() and add request_threaded_irq() to the list of functions. Reviewed-by: Thomas Gleixner Signed-off-by: Jonathan Corbet commit dbc984c961667b1ce48a0337b5bcd3b8c9cb2098 Author: Arnaldo Carvalho de Melo Date: Mon Nov 18 16:26:29 2019 -0300 perf map: Use bitmap for booleans The map->priv and map->erange_warned are seldom used, the first only in tests/vmlinux-kallsyms.c, the later only when hist_entry__inc_addr_samples() returns -ERANGE in 'perf top', which are really rare occasions, so make them a bool bitfield. This will open up space for other members on the first cacheline. $ pahole -C map ~/bin/perf struct map { union { struct rb_node rb_node __attribute__((__aligned__(8))); /* 0 24 */ struct list_head node; /* 0 16 */ } __attribute__((__aligned__(8))); /* 0 24 */ u64 start; /* 24 8 */ u64 end; /* 32 8 */ _Bool erange_warned:1; /* 40: 0 1 */ _Bool priv:1; /* 40: 1 1 */ /* XXX 6 bits hole, try to pack */ /* XXX 3 bytes hole, try to pack */ u32 prot; /* 44 4 */ u32 flags; /* 48 4 */ /* XXX 4 bytes hole, try to pack */ u64 pgoff; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u64 reloc; /* 64 8 */ u32 maj; /* 72 4 */ u32 min; /* 76 4 */ u64 ino; /* 80 8 */ u64 ino_generation; /* 88 8 */ u64 (*map_ip)(struct map *, u64); /* 96 8 */ u64 (*unmap_ip)(struct map *, u64); /* 104 8 */ struct dso * dso; /* 112 8 */ refcount_t refcnt; /* 120 4 */ /* size: 128, cachelines: 2, members: 17 */ /* sum members: 116, holes: 2, sum holes: 7 */ /* sum bitfield members: 2 bits, bit holes: 1, sum bit holes: 6 bits */ /* padding: 4 */ /* forced alignments: 1 */ } __attribute__((__aligned__(8))); $ Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-g5545pcq4ff0wr17tfb1piqt@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e8a9e30d721196951e1c82bae208296d066ac272 Author: Jaskaran Singh Date: Sun Nov 17 22:54:36 2019 +0530 docs: filesystems: Add mount map description in Content The second paragraph of the content section does not properly describe how mount points are determined by autofs. Replace the lines detailing how the determination of these mount points is "ad hoc" by a short description of the mount map syntax used by autofs. Signed-off-by: Jaskaran Singh Signed-off-by: Jonathan Corbet commit c11565e88790517647c675a91745478492310e79 Author: Jaskaran Singh Date: Sun Nov 17 22:54:35 2019 +0530 docs: filesystems: Update code snippets in autofs.rst Some of the struct definitions now have an autofs packet header. Reflect these changes by adding a definition of this header and place it wherever suitable. Signed-off-by: Jaskaran Singh Signed-off-by: Jonathan Corbet commit f11f2a3c543557d7f8ae8bb884c4b705b3b516cd Author: Jaskaran Singh Date: Sun Nov 17 22:54:34 2019 +0530 docs: filesystems: convert autofs.txt to reST Convert autofs.txt to reST. The following changes abound: - Introduce reST formatting for headings, lists et al. - Add an indentation of an 8 space tab wherever suitable, so as to maintain consistency. - Remove indentation of the description of the ioctls which are similar to the AUTOFS_IOC ioctls, as it does not come out quite right in HTML. - Add an entry for autofs in the index. Signed-off-by: Jaskaran Singh Signed-off-by: Jonathan Corbet commit 33c26ab4d6beec44bd5f525ffba1c23bf962d4a7 Author: Paul Cercueil Date: Wed Oct 23 19:47:14 2019 +0200 watchdog: jz4740: Drop dependency on MACH_JZ47xx Depending on MACH_JZ47xx prevent us from creating a generic kernel that works on more than one MIPS board. Instead, we just depend on MIPS being set. Signed-off-by: Paul Cercueil Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20191023174714.14362-3-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6d532143c915b3525a64a5d23b21c1a4a0c515b1 Author: Paul Cercueil Date: Wed Oct 23 19:47:13 2019 +0200 watchdog: jz4740: Use regmap provided by TCU driver Since we broke the ABI by changing the clock, the driver was also updated to use the regmap provided by the TCU driver. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Tested-by: Artur Rojek Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20191023174714.14362-2-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 1d9c30745455c42bff07f500fc6ecaf4c10e942f Author: Paul Cercueil Date: Wed Oct 23 19:47:12 2019 +0200 watchdog: jz4740: Use WDT clock provided by TCU driver Instead of requesting the "ext" clock and handling the watchdog clock divider and gating in the watchdog driver, we now request and use the "wdt" clock that is supplied by the ingenic-timer "TCU" driver. The major benefit is that the watchdog's clock rate and parent can now be specified from within devicetree, instead of hardcoded in the driver. Also, this driver won't poke anymore into the TCU registers to enable/disable the clock, as this is now handled by the TCU driver. On the bad side, we break the ABI with devicetree - as we now request a different clock. In this very specific case it is still okay, as every Ingenic JZ47xx-based board out there compile the devicetree within the kernel; so it's still time to push breaking changes, in order to get a clean devicetree that won't break once it musn't. Signed-off-by: Paul Cercueil Tested-by: Mathieu Malaterre Tested-by: Artur Rojek Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20191023174714.14362-1-paul@crapouillou.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 74f078c333e96f0c2d7fe8d932773d39aceeca12 Author: Eugen Hristev Date: Mon Nov 18 08:50:33 2019 +0000 dt-bindings: watchdog: sama5d4_wdt: add microchip,sam9x60-wdt compatible The Atmel sama5d4_wdt needs to be compatible with microchip,sam9x60-wdt The sama5d4_wdt driver is updated to work with both hardware blocks (sama5d4/sama5d2 and sam9x60 based blocks) Signed-off-by: Eugen Hristev Acked-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1573806579-7981-2-git-send-email-eugen.hristev@microchip.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d615a6fd12b2f3cbc68f85bacafecde704b0d805 Author: Eugen Hristev Date: Mon Nov 18 08:50:31 2019 +0000 watchdog: sama5d4_wdt: cleanup the bit definitions Cleanup the macro definitions to use BIT and align with two spaces. Signed-off-by: Eugen Hristev Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1573806579-7981-1-git-send-email-eugen.hristev@microchip.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3e1740993e43116b3bc71b0aad1e6872f6ccf341 Author: Josef Bacik Date: Fri Nov 15 15:43:06 2019 -0500 btrfs: record all roots for rename exchange on a subvol Testing with the new fsstress support for subvolumes uncovered a pretty bad problem with rename exchange on subvolumes. We're modifying two different subvolumes, but we only start the transaction on one of them, so the other one is not added to the dirty root list. This is caught by btrfs_cow_block() with a warning because the root has not been updated, however if we do not modify this root again we'll end up pointing at an invalid root because the root item is never updated. Fix this by making sure we add the destination root to the trans list, the same as we do with normal renames. This fixes the corruption. Fixes: cdd1fedf8261 ("btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT") CC: stable@vger.kernel.org # 4.9+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 39e68d9e7ab276880980ee5386301fb218202192 Author: Shuiqing Li Date: Fri Nov 8 18:57:12 2019 +0800 watchdog: sprd: Fix the incorrect pointer getting from driver data The device driver data saved the 'struct sprd_wdt' object, it is incorrect to get 'struct watchdog_device' object from the driver data, thus fix it. Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver") Reported-by: Dongwei Wang Signed-off-by: Shuiqing Li Signed-off-by: Baolin Wang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/76d4687189ec940baa90cb8d679a8d4c8f02ee80.1573210405.git.baolin.wang@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c04571251b3d842096f1597f5d4badb508be016d Author: Joel Stanley Date: Fri Nov 8 13:59:05 2019 +1030 watchdog: aspeed: Fix clock behaviour for ast2600 The ast2600 no longer uses bit 4 in the control register to indicate a 1MHz clock (It now controls whether this watchdog is reset by a SOC reset). This means we do not want to set it. It also does not need to be set for the ast2500, as it is read-only on that SoC. The comment next to the clock rate selection wandered away from where it was set, so put it back next to the register setting it's describing. Fixes: b3528b487448 ("watchdog: aspeed: Add support for AST2600") Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191108032905.22463-1-joel@jms.id.au Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6083ab7b2f3f25022e2e8f4c42f14a8521f47873 Author: Fabio Estevam Date: Tue Oct 29 14:40:33 2019 -0300 watchdog: imx7ulp: Fix reboot hang The following hang is observed when a 'reboot' command is issued: # reboot # Stopping network: OK Stopping klogd: OK Stopping syslogd: OK umount: devtmpfs busy - remounted read-only [ 8.612079] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system reboot [ 10.694753] reboot: Restarting system [ 11.699008] Reboot failed -- System halted Fix this problem by adding a .restart ops member. Fixes: 41b630f41bf7 ("watchdog: Add i.MX7ULP watchdog support") Signed-off-by: Fabio Estevam Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191029174037.25381-1-festevam@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit bc44fa734cef28e7ddb26bbf9e75e7f7449c9db2 Author: Rasmus Villemoes Date: Tue Nov 5 21:51:18 2019 +0100 watchdog: make nowayout sysfs file writable It can be useful to delay setting the nowayout feature for a watchdog device. Moreover, not every driver (notably gpio_wdt) implements a nowayout module parameter/otherwise respects CONFIG_WATCHDOG_NOWAYOUT, and modifying those drivers carries a risk of causing a regression for someone who has two watchdog devices, sets CONFIG_WATCHDOG_NOWAYOUT and somehow relies on the gpio_wdt driver being ignorant of that (i.e., allowing one to gracefully close a gpio_wdt but not the other watchdog in the system). So instead, simply make the nowayout sysfs file writable. Obviously, setting nowayout is a one-way street. Signed-off-by: Rasmus Villemoes Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191105205118.11359-1-linux@rasmusvillemoes.dk Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a19f89335f4bda3d77d991c96583e3e51856acbb Author: Julia Cartwright Date: Tue Nov 5 15:45:06 2019 +0100 watchdog: prevent deferral of watchdogd wakeup on RT When PREEMPT_RT is enabled, all hrtimer expiry functions are deferred for execution into the context of ksoftirqd unless otherwise annotated. Deferring the expiry of the hrtimer used by the watchdog core, however, is a waste, as the callback does nothing but queue a kthread work item and wakeup watchdogd. It's worst then that, too: the deferral through ksoftirqd also means that for correct behavior a user must adjust the scheduling parameters of both watchdogd _and_ ksoftirqd, which is unnecessary and has other side effects (like causing unrelated expiry functions to execute at potentially elevated priority). Instead, mark the hrtimer used by the watchdog core as being _HARD to allow it's execution directly from hardirq context. The work done in this expiry function is well-bounded and minimal. A user still must adjust the scheduling parameters of the watchdogd to be correct w.r.t. their application needs. Link: https://lkml.kernel.org/r/0e02d8327aeca344096c246713033887bc490dd7.1538089180.git.julia@ni.com Cc: Guenter Roeck Reported-and-tested-by: Steffen Trumtrar Reported-by: Tim Sander Signed-off-by: Julia Cartwright Acked-by: Guenter Roeck [bigeasy: use only HRTIMER_MODE_REL_HARD] Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191105144506.clyadjbvnn7b7b2m@linutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit eccb7fe5e72a88455b13c77bc3bc381dbb45bd9a Author: Fabio Estevam Date: Tue Oct 29 14:40:37 2019 -0300 watchdog: imx7ulp: Use definitions instead of magic values Use definitions instead of magic values in order to improve readability. Since the CLK field of the WDOG CS register is composed of two bits to select the watchdog clock source, use a shift representation instead of BIT(). Signed-off-by: Fabio Estevam Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191029174037.25381-5-festevam@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c37e358163d97d7e0f19e495c3dc374b4d08e797 Author: Fabio Estevam Date: Tue Oct 29 14:40:36 2019 -0300 watchdog: imx7ulp: Remove inline annotations Compiler is smart enough and knows when to inline, so there is no need to mark some of these functions as 'inline'. Remove such annotations. Signed-off-by: Fabio Estevam Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191029174037.25381-4-festevam@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9ab26e34bb62a304f1b7d83577d8e17f169b1cf7 Author: Fabio Estevam Date: Tue Oct 29 14:40:35 2019 -0300 watchdog: imx7ulp: Remove unused structure member The 'notifier_block' structure member is unused, so just remove it. Signed-off-by: Fabio Estevam Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191029174037.25381-3-festevam@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 747d88a1a88c1bfd0063ae01aa50bfa9e8ecb355 Author: Fabio Estevam Date: Tue Oct 29 14:40:34 2019 -0300 watchdog: imx7ulp: Pass the wdog instance inimx7ulp_wdt_enable() It is more natural to pass the watchdog instance inside imx7ulp_wdt_enable() instead of the base address. This also has the benefit to reduce the code a bit. Signed-off-by: Fabio Estevam Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191029174037.25381-2-festevam@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4c0bfc039c8882cd6974c1c9fbf0596cdd58d2a6 Author: Geert Uytterhoeven Date: Thu Oct 24 17:28:56 2019 +0200 watchdog: wdat_wdt: Spelling s/configrable/configurable/ Fix misspelling of "configurable". Signed-off-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191024152856.30788-1-geert+renesas@glider.be Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5b256b56885abfb5bfd6faf32c164ee26247b162 Author: Matti Vaittinen Date: Thu Oct 10 09:07:33 2019 +0300 watchdog: bd70528: Trivial function documentation fix The function documentation for the exported ROHM BD70528 WDG control functions used old argument names. Fix the names. Signed-off-by: Matti Vaittinen Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191010060733.GA9979@localhost.localdomain Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ef14cab2d85be583d5adeea96ae72ef329a2a62d Author: Michal Simek Date: Tue Oct 8 16:29:10 2019 +0200 watchdog: cadence: Do not show error in case of deferred probe There is no reason to show error message if clocks are not ready yet. Signed-off-by: Michal Simek Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/d3e295d5ba79f453b4aa4128c4fa63fbd6c16920.1570544944.git.michal.simek@xilinx.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 72139dfa2464e43957d330266994740bb7be2535 Author: Kevin Hao Date: Tue Oct 8 19:29:34 2019 +0800 watchdog: Fix the race between the release of watchdog_core_data and cdev The struct cdev is embedded in the struct watchdog_core_data. In the current code, we manage the watchdog_core_data with a kref, but the cdev is manged by a kobject. There is no any relationship between this kref and kobject. So it is possible that the watchdog_core_data is freed before the cdev is entirely released. We can easily get the following call trace with CONFIG_DEBUG_KOBJECT_RELEASE and CONFIG_DEBUG_OBJECTS_TIMERS enabled. ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x38 WARNING: CPU: 23 PID: 1028 at lib/debugobjects.c:481 debug_print_object+0xb0/0xf0 Modules linked in: softdog(-) deflate ctr twofish_generic twofish_common camellia_generic serpent_generic blowfish_generic blowfish_common cast5_generic cast_common cmac xcbc af_key sch_fq_codel openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 CPU: 23 PID: 1028 Comm: modprobe Not tainted 5.3.0-next-20190924-yoctodev-standard+ #180 Hardware name: Marvell OcteonTX CN96XX board (DT) pstate: 00400009 (nzcv daif +PAN -UAO) pc : debug_print_object+0xb0/0xf0 lr : debug_print_object+0xb0/0xf0 sp : ffff80001cbcfc70 x29: ffff80001cbcfc70 x28: ffff800010ea2128 x27: ffff800010bad000 x26: 0000000000000000 x25: ffff80001103c640 x24: ffff80001107b268 x23: ffff800010bad9e8 x22: ffff800010ea2128 x21: ffff000bc2c62af8 x20: ffff80001103c600 x19: ffff800010e867d8 x18: 0000000000000060 x17: 0000000000000000 x16: 0000000000000000 x15: ffff000bd7240470 x14: 6e6968207473696c x13: 5f72656d6974203a x12: 6570797420746365 x11: 6a626f2029302065 x10: 7461747320657669 x9 : 7463612820657669 x8 : 3378302f3078302b x7 : 0000000000001d7a x6 : ffff800010fd5889 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 x2 : ffff000bff948548 x1 : 276a1c9e1edc2300 x0 : 0000000000000000 Call trace: debug_print_object+0xb0/0xf0 debug_check_no_obj_freed+0x1e8/0x210 kfree+0x1b8/0x368 watchdog_cdev_unregister+0x88/0xc8 watchdog_dev_unregister+0x38/0x48 watchdog_unregister_device+0xa8/0x100 softdog_exit+0x18/0xfec4 [softdog] __arm64_sys_delete_module+0x174/0x200 el0_svc_handler+0xd0/0x1c8 el0_svc+0x8/0xc This is a common issue when using cdev embedded in a struct. Fortunately, we already have a mechanism to solve this kind of issue. Please see commit 233ed09d7fda ("chardev: add helper function to register char devs with a struct device") for more detail. In this patch, we choose to embed the struct device into the watchdog_core_data, and use the API provided by the commit 233ed09d7fda to make sure that the release of watchdog_core_data and cdev are in sequence. Signed-off-by: Kevin Hao Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191008112934.29669-1-haokexin@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b6276d4e4bc3d74b37a918c231b19622f9f194a7 Author: Borislav Petkov Date: Sun Sep 29 13:46:49 2019 +0200 watchdog: sbc7240_wdt: Fix yet another -Wimplicit-fallthrough warning ... by moving the fall through comment outside of the code block so that gcc sees it. No functional changes. Signed-off-by: Borislav Petkov Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20190929114649.22740-1-bp@alien8.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ff0aaacb6f26e72f6eb9220eb3b479ffb46b592d Author: Andy Shevchenko Date: Tue Sep 24 17:31:16 2019 +0300 watchdog: intel-mid_wdt: Add WATCHDOG_NOWAYOUT support Normally, the watchdog is disabled when /dev/watchdog is closed, but if CONFIG_WATCHDOG_NOWAYOUT is defined, then it means that the watchdog should remain enabled. So we should keep it enabled if CONFIG_WATCHDOG_NOWAYOUT is defined. Reported-by: Razvan Becheriu Cc: Ferry Toth Signed-off-by: Andy Shevchenko Reviewed-by: Guenter Roeck Tested-by: Razvan Becheriu Link: https://lore.kernel.org/r/20190924143116.69823-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 86865322d227c82dd6edc5970d5b554a391fb2eb Author: Anson Huang Date: Tue Sep 24 15:07:08 2019 +0800 watchdog: imx2_wdt: Use 'dev' instead of dereferencing it repeatedly Add helper variable dev = &pdev->dev to simply the code. Signed-off-by: Anson Huang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1569308828-8320-3-git-send-email-Anson.Huang@nxp.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ebe66ded6d4cdf6fb48d8fec56c73acc631953e8 Author: Anson Huang Date: Tue Sep 24 15:07:07 2019 +0800 watchdog: imx2_wdt: Use __maybe_unused instead of #if CONFIG_PM_SLEEP Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simply the code. Signed-off-by: Anson Huang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1569308828-8320-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 87d184680dd8b12fe1347c0fb040e30b8cc6a9c8 Author: Anson Huang Date: Tue Sep 24 15:07:06 2019 +0800 watchdog: imx2_wdt: Remove unnecessary blank line Remove unnecessary blank line. Signed-off-by: Anson Huang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1569308828-8320-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e11cfc697601fe80b308fe9162649ab294013c32 Author: Srikanth Krishnakar Date: Wed Sep 18 19:12:15 2019 +0530 watchdog: w83627hf_wdt: Support NCT6116D The watchdog controller on NCT6116D is compatible with NCT6102D. Extend the support to enable SuperIO based NCT6116D watchdog device. Signed-off-by: Srikanth Krishnakar Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20190918160458.10108-1-Srikanth_Krishnakar@mentor.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 55ed51fff224a51dfb768cfac3e4498888474c87 Author: Sudip Mukherjee Date: Sun Nov 17 20:24:35 2019 +0000 {tty: serial, nand: onenand}: samsung: rename to fix build warning Any arm config which has 'CONFIG_MTD_ONENAND_SAMSUNG=m' and 'CONFIG_SERIAL_SAMSUNG=m' gives a build warning: warning: same module names found: drivers/tty/serial/samsung.ko drivers/mtd/nand/onenand/samsung.ko Rename both drivers/tty/serial/samsung.c to drivers/tty/serial/samsung_tty.c and drivers/mtd/nand/onenand/samsung.c drivers/mtd/nand/onenand/samsung_mtd.c to fix the warning. Signed-off-by: Sudip Mukherjee Acked-by: Richard Weinberger Link: https://lore.kernel.org/r/20191117202435.28127-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae7c2d342a10dbef1e054482f46498b6282a1df0 Author: Luhua Xu Date: Mon Nov 18 12:57:16 2019 +0800 spi: mediatek: add SPI_CS_HIGH support Change to use SPI_CS_HIGH to support spi CS polarity setting for chips support enhance_timing. Signed-off-by: Luhua Xu Link: https://lore.kernel.org/r/1574053037-26721-2-git-send-email-luhua.xu@mediatek.com Signed-off-by: Mark Brown commit 042528f8d840f42903d91d47e28c0e29da90c2d6 Author: Filipe Manana Date: Thu Nov 14 18:02:43 2019 +0000 Btrfs: fix block group remaining RO forever after error during device replace When doing a device replace, while at scrub.c:scrub_enumerate_chunks(), we set the block group to RO mode and then wait for any ongoing writes into extents of the block group to complete. While doing that wait we overwrite the value of the variable 'ret' and can break out of the loop if an error happens without turning the block group back into RW mode. So what happens is the following: 1) btrfs_inc_block_group_ro() returns 0, meaning it set the block group to RO mode (its ->ro field set to 1 or incremented to some value > 1); 2) Then btrfs_wait_ordered_roots() returns a value > 0; 3) Then if either joining or committing the transaction fails, we break out of the loop wihtout calling btrfs_dec_block_group_ro(), leaving the block group in RO mode forever. To fix this, just remove the code that waits for ongoing writes to extents of the block group, since it's not needed because in the initial setup phase of a device replace operation, before starting to find all chunks and their extents, we set the target device for replace while holding fs_info->dev_replace->rwsem, which ensures that after releasing that semaphore, any writes into the source device are made to the target device as well (__btrfs_map_block() guarantees that). So while at scrub_enumerate_chunks() we only need to worry about finding and copying extents (from the source device to the target device) that were written before we started the device replace operation. Fixes: f0e9b7d6401959 ("Btrfs: fix race setting block group readonly during device replace") Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit b12de52896c0e8213f70e3a168fde9e6eee95909 Author: Qu Wenruo Date: Fri Nov 15 10:09:00 2019 +0800 btrfs: scrub: Don't check free space before marking a block group RO [BUG] When running btrfs/072 with only one online CPU, it has a pretty high chance to fail: btrfs/072 12s ... _check_dmesg: something found in dmesg (see xfstests-dev/results//btrfs/072.dmesg) - output mismatch (see xfstests-dev/results//btrfs/072.out.bad) --- tests/btrfs/072.out 2019-10-22 15:18:14.008965340 +0800 +++ /xfstests-dev/results//btrfs/072.out.bad 2019-11-14 15:56:45.877152240 +0800 @@ -1,2 +1,3 @@ QA output created by 072 Silence is golden +Scrub find errors in "-m dup -d single" test ... And with the following call trace: BTRFS info (device dm-5): scrub: started on devid 1 ------------[ cut here ]------------ BTRFS: Transaction aborted (error -27) WARNING: CPU: 0 PID: 55087 at fs/btrfs/block-group.c:1890 btrfs_create_pending_block_groups+0x3e6/0x470 [btrfs] CPU: 0 PID: 55087 Comm: btrfs Tainted: G W O 5.4.0-rc1-custom+ #13 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:btrfs_create_pending_block_groups+0x3e6/0x470 [btrfs] Call Trace: __btrfs_end_transaction+0xdb/0x310 [btrfs] btrfs_end_transaction+0x10/0x20 [btrfs] btrfs_inc_block_group_ro+0x1c9/0x210 [btrfs] scrub_enumerate_chunks+0x264/0x940 [btrfs] btrfs_scrub_dev+0x45c/0x8f0 [btrfs] btrfs_ioctl+0x31a1/0x3fb0 [btrfs] do_vfs_ioctl+0x636/0xaa0 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x43/0x50 do_syscall_64+0x79/0xe0 entry_SYSCALL_64_after_hwframe+0x49/0xbe ---[ end trace 166c865cec7688e7 ]--- [CAUSE] The error number -27 is -EFBIG, returned from the following call chain: btrfs_end_transaction() |- __btrfs_end_transaction() |- btrfs_create_pending_block_groups() |- btrfs_finish_chunk_alloc() |- btrfs_add_system_chunk() This happens because we have used up all space of btrfs_super_block::sys_chunk_array. The root cause is, we have the following bad loop of creating tons of system chunks: 1. The only SYSTEM chunk is being scrubbed It's very common to have only one SYSTEM chunk. 2. New SYSTEM bg will be allocated As btrfs_inc_block_group_ro() will check if we have enough space after marking current bg RO. If not, then allocate a new chunk. 3. New SYSTEM bg is still empty, will be reclaimed During the reclaim, we will mark it RO again. 4. That newly allocated empty SYSTEM bg get scrubbed We go back to step 2, as the bg is already mark RO but still not cleaned up yet. If the cleaner kthread doesn't get executed fast enough (e.g. only one CPU), then we will get more and more empty SYSTEM chunks, using up all the space of btrfs_super_block::sys_chunk_array. [FIX] Since scrub/dev-replace doesn't always need to allocate new extent, especially chunk tree extent, so we don't really need to do chunk pre-allocation. To break above spiral, here we introduce a new parameter to btrfs_inc_block_group(), @do_chunk_alloc, which indicates whether we need extra chunk pre-allocation. For relocation, we pass @do_chunk_alloc=true, while for scrub, we pass @do_chunk_alloc=false. This should keep unnecessary empty chunks from popping up for scrub. Also, since there are two parameters for btrfs_inc_block_group_ro(), add more comment for it. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 7f0432d0d8dc1d29ab5276805d648c5b0a408105 Author: Johannes Thumshirn Date: Wed Nov 13 11:27:28 2019 +0100 btrfs: change btrfs_fs_devices::rotating to bool struct btrfs_fs_devices::rotating currently is declared as an integer variable but only used as a boolean. Change the variable definition to bool and update to code touching it to set 'true' and 'false'. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0395d84f8edc6c28ce270e6eda5c7e6ff4c18545 Author: Johannes Thumshirn Date: Wed Nov 13 11:27:27 2019 +0100 btrfs: change btrfs_fs_devices::seeding to bool struct btrfs_fs_devices::seeding currently is declared as an integer variable but only used as a boolean. Change the variable definition to bool and update to code touching it to set 'true' and 'false'. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 32da5386d9a4fd5c1155cecf703df104d918954c Author: David Sterba Date: Tue Oct 29 19:20:18 2019 +0100 btrfs: rename btrfs_block_group_cache The type name is misleading, a single entry is named 'cache' while this normally means a collection of objects. Rename that everywhere. Also the identifier was quite long, making function prototypes harder to format. Suggested-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit d49a2ddb1568d533ef3b77841a3ea1ff5bfa8b98 Author: Qu Wenruo Date: Tue Nov 5 09:35:35 2019 +0800 btrfs: block-group: Reuse the item key from caller of read_one_block_group() For read_one_block_group(), its only caller has already got the item key to search next block group item. So we can use that key directly without doing our own convertion on stack. Also, since that key used in btrfs_read_block_groups() is vital for block group item search, add 'const' keyword for that parameter to prevent read_one_block_group() to modify it. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit ffb9e0f05fab5f7fe62c5d6964825e59e91be0db Author: Qu Wenruo Date: Thu Oct 10 10:39:27 2019 +0800 btrfs: block-group: Refactor btrfs_read_block_groups() Refactor the work inside the loop of btrfs_read_block_groups() into one separate function, read_one_block_group(). This allows read_one_block_group to be reused for later BG_TREE feature. The refactor does the following extra fix: - Use btrfs_fs_incompat() to replace open-coded feature check Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit d4e253bbbc2036219807b07f6258027fc443670c Author: David Sterba Date: Wed Oct 16 18:29:10 2019 +0200 btrfs: document extent buffer locking Signed-off-by: David Sterba commit a4477988cfed18bdf1ad04d29b4b4a3c53269dfc Author: David Sterba Date: Fri Oct 11 00:03:14 2019 +0200 btrfs: access eb::blocking_writers according to ACCESS_ONCE policies A nice writeup of the LKMM (Linux Kernel Memory Model) rules for access once policies can be found here https://lwn.net/Articles/799218/#Access-Marking%20Policies . The locked and unlocked access to eb::blocking_writers should be annotated accordingly, following this: Writes: - locked write must use ONCE, may use plain read - unlocked write must use ONCE Reads: - unlocked read must use ONCE - locked read may use plain read iff not mixed with unlocked read - unlocked read then locked must use ONCE There's one difference on the assembly level, where btrfs_tree_read_lock_atomic and btrfs_try_tree_read_lock used the cached value and did not reevaluate it after taking the lock. This could have missed some opportunities to take the lock in case blocking writers changed between the calls, but the window is just a few instructions long. As this is in try-lock, the callers handle that. Signed-off-by: David Sterba commit 40d38f53d476238594c24c677593913695e6dec7 Author: David Sterba Date: Thu Oct 10 23:31:19 2019 +0200 btrfs: set blocking_writers directly, no increment or decrement The increment and decrement was inherited from previous version that used atomics, switched in commit 06297d8cefca ("btrfs: switch extent_buffer blocking_writers from atomic to int"). The only possible values are 0 and 1 so we can set them directly. The generated assembly (gcc 9.x) did the direct value assignment in btrfs_set_lock_blocking_write (asm diff after change in 06297d8cefca): 5d: test %eax,%eax 5f: je 62 61: retq - 62: lock incl 0x44(%rdi) - 66: add $0x50,%rdi - 6a: jmpq 6f + 62: movl $0x1,0x44(%rdi) + 69: add $0x50,%rdi + 6d: jmpq 72 The part in btrfs_tree_unlock did a decrement because BUG_ON(blockers > 1) is probably not a strong hint for the compiler, but otherwise the output looks safe: - lock decl 0x44(%rdi) + sub $0x1,%eax + mov %eax,0x44(%rdi) Signed-off-by: David Sterba commit f5c2a52590858d18f4a736d8062fe70f11988fa9 Author: David Sterba Date: Thu Oct 10 23:29:21 2019 +0200 btrfs: merge blocking_writers branches in btrfs_tree_read_lock There are two ifs that use eb::blocking_writers. As this is a variable modified inside and outside of locks, we could minimize number of accesses to avoid problems with getting different results at different times. The access here is locked so this can only race with btrfs_tree_unlock that sets blocking_writers to 0 without lock and unsets the lock owner. The first branch is taken only if the same thread already holds the lock, the second if checks for blocking writers. Here we'd either unlock and wait, or proceed. Both are valid states of the locking protocol. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 9c907446dce311dc7e7b8958425e92ac03d3d00c Author: David Sterba Date: Thu Oct 31 15:52:01 2019 +0100 btrfs: drop incompat bit for raid1c34 after last block group is gone When there are no raid1c3 or raid1c4 block groups left after balance (either convert or with other filters applied), remove the incompat bit. This is already done for RAID56, do the same for RAID1C34. Signed-off-by: David Sterba commit cfbb825c76198c9095428c5f9362fbf6ae06f417 Author: David Sterba Date: Tue Jul 10 18:15:05 2018 +0200 btrfs: add incompat for raid1 with 3, 4 copies The new raid1c3 and raid1c4 profiles are backward incompatible and the name shall be 'raid1c34', the status can be found in the global supported features in /sys/fs/btrfs/features or in the per-filesystem directory. Signed-off-by: David Sterba commit 8d6fac0087e538173f34ca7431ed9b58581acf28 Author: David Sterba Date: Fri Mar 2 22:56:53 2018 +0100 btrfs: add support for 4-copy replication (raid1c4) Add new block group profile to store 4 copies in a simliar way that current RAID1 does. The profile attributes and constraints are defined in the raid table and used by the same code that already handles the 2- and 3-copy RAID1. The minimum number of devices is 4, the maximum number of devices/chunks that can be lost/damaged is 3. There is no comparable traditional RAID level, the profile is added for future needs to accompany triple-parity and beyond. Signed-off-by: David Sterba commit 47e6f7423b9196ad6832d26cae52b7015f81ee7f Author: David Sterba Date: Fri Mar 2 22:56:53 2018 +0100 btrfs: add support for 3-copy replication (raid1c3) Add new block group profile to store 3 copies in a simliar way that current RAID1 does. The profile attributes and constraints are defined in the raid table and used by the same code that already handles the 2-copy RAID1. The minimum number of devices is 3, the maximum number of devices/chunks that can be lost/damaged is 2. Like RAID6 but with 33% space utilization. Signed-off-by: David Sterba commit fac07d2b091542f7169978e4c1413747d8d0e965 Author: David Sterba Date: Tue Oct 29 18:28:57 2019 +0100 btrfs: sink write flags to cow_file_range_async In commit "Btrfs: use REQ_CGROUP_PUNT for worker thread submitted bios", cow_file_range_async gained wbc as a parameter and this makes passing write flags redundant. Set it inside the function and remove the parameter. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 57e5ffeb8779a49202d48fb890f9d04fa0273c1e Author: David Sterba Date: Tue Oct 29 18:28:55 2019 +0100 btrfs: sink write_flags to __extent_writepage_io __extent_writepage reads write flags from wbc and passes both to __extent_writepage_io. This makes write_flags redundant and we can remove it. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit fd0ddbe2509568b00df364156f47561e9f469f15 Author: Filipe Manana Date: Wed Oct 30 12:23:01 2019 +0000 Btrfs: send, skip backreference walking for extents with many references Backreference walking, which is used by send to figure if it can issue clone operations instead of write operations, can be very slow and use too much memory when extents have many references. This change simply skips backreference walking when an extent has more than 64 references, in which case we fallback to a write operation instead of a clone operation. This limit is conservative and in practice I observed no signicant slowdown with up to 100 references and still low memory usage up to that limit. This is a temporary workaround until there are speedups in the backref walking code, and as such it does not attempt to add extra interfaces or knobs to tweak the threshold. Reported-by: Atemu Link: https://lore.kernel.org/linux-btrfs/CAE4GHgkvqVADtS4AzcQJxo0Q1jKQgKaW3JGp3SGdoinVo=C9eQ@mail.gmail.com/T/#me55dc0987f9cc2acaa54372ce0492c65782be3fa CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 11f2069c113e02971b8db6fda62f9b9cd31a030f Author: Filipe Manana Date: Wed Oct 30 12:23:11 2019 +0000 Btrfs: send, allow clone operations within the same file For send we currently skip clone operations when the source and destination files are the same. This is so because clone didn't support this case in its early days, but support for it was added back in May 2013 by commit a96fbc72884fcb ("Btrfs: allow file data clone within a file"). This change adds support for it. Example: $ mkfs.btrfs -f /dev/sdd $ mount /dev/sdd /mnt/sdd $ xfs_io -f -c "pwrite -S 0xab -b 64K 0 64K" /mnt/sdd/foobar $ xfs_io -c "reflink /mnt/sdd/foobar 0 64K 64K" /mnt/sdd/foobar $ btrfs subvolume snapshot -r /mnt/sdd /mnt/sdd/snap $ mkfs.btrfs -f /dev/sde $ mount /dev/sde /mnt/sde $ btrfs send /mnt/sdd/snap | btrfs receive /mnt/sde Without this change file foobar at the destination has a single 128Kb extent: $ filefrag -v /mnt/sde/snap/foobar Filesystem type is: 9123683e File size of /mnt/sde/snap/foobar is 131072 (32 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 31: 0.. 31: 32: last,unknown_loc,delalloc,eof /mnt/sde/snap/foobar: 1 extent found With this we get a single 64Kb extent that is shared at file offsets 0 and 64K, just like in the source filesystem: $ filefrag -v /mnt/sde/snap/foobar Filesystem type is: 9123683e File size of /mnt/sde/snap/foobar is 131072 (32 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 15: 3328.. 3343: 16: shared 1: 16.. 31: 3328.. 3343: 16: 3344: last,shared,eof /mnt/sde/snap/foobar: 2 extents found Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6b7faadd985c990324b5b5bd18cc4ba5c395eb65 Author: Qu Wenruo Date: Wed Oct 23 21:57:27 2019 +0800 btrfs: Ensure we trim ranges across block group boundary [BUG] When deleting large files (which cross block group boundary) with discard mount option, we find some btrfs_discard_extent() calls only trimmed part of its space, not the whole range: btrfs_discard_extent: type=0x1 start=19626196992 len=2144530432 trimmed=1073741824 ratio=50% type: bbio->map_type, in above case, it's SINGLE DATA. start: Logical address of this trim len: Logical length of this trim trimmed: Physically trimmed bytes ratio: trimmed / len Thus leaving some unused space not discarded. [CAUSE] When discard mount option is specified, after a transaction is fully committed (super block written to disk), we begin to cleanup pinned extents in the following call chain: btrfs_commit_transaction() |- btrfs_finish_extent_commit() |- find_first_extent_bit(unpin, 0, &start, &end, EXTENT_DIRTY); |- btrfs_discard_extent() However, pinned extents are recorded in an extent_io_tree, which can merge adjacent extent states. When a large file gets deleted and it has adjacent file extents across block group boundary, we will get a large merged range like this: |<--- BG1 --->|<--- BG2 --->| |//////|<-- Range to discard --->|/////| To discard that range, we have the following calls: btrfs_discard_extent() |- btrfs_map_block() | Returned bbio will end at BG1's end. As btrfs_map_block() | never returns result across block group boundary. |- btrfs_issuse_discard() Issue discard for each stripe. So we will only discard the range in BG1, not the remaining part in BG2. Furthermore, this bug is not that reliably observed, for above case, if there is no other extent in BG2, BG2 will be empty and btrfs will trim all space of BG2, covering up the bug. [FIX] - Allow __btrfs_map_block_for_discard() to modify @length parameter btrfs_map_block() uses its @length paramter to notify the caller how many bytes are mapped in current call. With __btrfs_map_block_for_discard() also modifing the @length, btrfs_discard_extent() now understands when to do extra trim. - Call btrfs_map_block() in a loop until we hit the range end Since we now know how many bytes are mapped each time, we can iterate through each block group boundary and issue correct trim for each range. Reviewed-by: Filipe Manana Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 2d974619a77f106f3d1341686dea95c0eaad601f Author: Qu Wenruo Date: Wed Oct 23 21:57:26 2019 +0800 btrfs: volumes: Use more straightforward way to calculate map length The old code goes: offset = logical - em->start; length = min_t(u64, em->len - offset, length); Where @length calculation is dependent on offset, it can take reader several more seconds to find it's just the same code as: offset = logical - em->start; length = min_t(u64, em->start + em->len - logical, length); Use above code to make the length calculate independent from other variable, thus slightly increase the readability. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 153a6d299956983de890ffaf429e5904503eb94c Author: Qu Wenruo Date: Tue Sep 3 07:46:19 2019 +0800 btrfs: tree-checker: Check item size before reading file extent type In check_extent_data_item(), we read file extent type without verifying if the item size is valid. Add such check to ensure the file extent type we read is correct. The check is not as accurate as we need to cover both inline and regular extents, so it only checks if the item size is larger or equal to inline header. So the existing size checks on inline/regular extents are still needed. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3ec17a67cc340b7b0353d7ac6d2746dcf8983b43 Author: Dan Carpenter Date: Thu Oct 31 13:55:01 2019 +0300 btrfs: clean up locking name in scrub_enumerate_chunks() The "&fs_info->dev_replace.rwsem" and "&dev_replace->rwsem" refer to the same lock but Smatch is not clever enough to figure that out so it leads to static checker warnings. It's better to use it consistently anyway. Signed-off-by: Dan Carpenter Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6ef108dd0cda65d3031166222e64cdf71fdd3359 Author: Nikolay Borisov Date: Tue Oct 15 18:42:24 2019 +0300 btrfs: Streamline btrfs_fs_info::backup_root_index semantics The backup_root_index member stores the index at which the backup root should be saved upon next transaction commit. However, there is a small deviation from this behavior in the form of a check in backup_super_roots which checks if current root generation equals to the generation of the previous root. This can trigger in the following scenario: slot0: gen-2 slot1: gen-1 slot2: gen slot3: unused Now suppose slot3 (which is also the root specified in the super block) is corrupted hence init_tree_roots chooses to use the backup root at slot2, meaning read_backup_root will read slot2 and assign the superblock generation to gen-1. Despite this backup_root_index will point at slot3 because its init happens in init_backup_root_slot, long before any parsing of the backup roots occur. Then on next transaction start, gen-1 will be incremented by 1 making the root's generation equal gen. Subsequently, on transaction commit the following check triggers: if (btrfs_backup_tree_root_gen(root_backup) == btrfs_header_generation(info->tree_root->node)) This causes the 'next_backup', which is the index at which the backup is going to be written to, to set to last_backup, which will be slot2. All of this is a very confusing way of expressing the following invariant: Always write a backup root at the index following the last used backup root. This commit streamlines this logic by setting backup_root_index to the next index after the one used for mount. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4ac039ad75df3f5f5f5b2b7439f094ad5bd9dbbe Author: Nikolay Borisov Date: Tue Oct 15 18:42:23 2019 +0300 btrfs: Rename find_oldest_super_backup to init_backup_root_slot The old name name was an awful misnomer because it didn't really find the oldest super backup per-se but rather its slot. For example if we have: slot0: gen - 2 slot1: gen - 1 slot2: gen slot3: empty init_backup_root_slot will return slot3 and not slot0. The new name is more appropriate since the function doesn't care whether there is a valid backup in the returned slot or not. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 260eb11bd42b4b5bcd671a1f8cb7d7b9a3e36b8d Author: Nikolay Borisov Date: Tue Oct 15 18:42:22 2019 +0300 btrfs: Remove unused next_root_backup function This function has been superseded by previous commits and is no longer used so just remove it. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 336a0d8df1d9ec2480dc1790f0d7801c32318d1c Author: Nikolay Borisov Date: Tue Oct 15 18:42:21 2019 +0300 btrfs: Don't use objectid_mutex during mount Since the filesystem is not well formed and no trees are loaded it's pointless holding the objectid_mutex. Just remove its usage. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b8522a1e5f421e003a8d2a8937eb3a095ce33f5d Author: Nikolay Borisov Date: Tue Oct 15 18:42:20 2019 +0300 btrfs: Factor out tree roots initialization during mount The code responsible for reading and initializing tree roots is scattered in open_ctree among 2 labels, emulating a loop. This is rather confusing to reason about. Instead, factor the code to a new function, init_tree_roots which implements the same logical flow. There are a couple of notable differences, namely: * Instead of using next_backup_root it's using the newly introduced read_backup_root. * If read_backup_root returns an error init_tree_roots propagates the error and there is no special handling of that case e.g. the code jumps straight to 'fail_tree_roots' label. The old code, however, was (erroneously) jumping to 'fail_block_groups' label if next_backup_root did fail, this was unnecessary since the tree roots init logic doesn't modify the state of block groups. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit bd2336b2ac119e65457261528883d9623d41315f Author: Nikolay Borisov Date: Tue Oct 15 18:42:19 2019 +0300 btrfs: Add read_backup_root This function will replace next_root_backup with a much saner/cleaner interface. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit fc2e4c5b3508f4d0ab981be9aa55bfb80bf971d1 Author: Nikolay Borisov Date: Tue Oct 15 18:42:18 2019 +0300 btrfs: Remove newest_gen argument from find_oldest_super_backup It's no longer needed following cleanups around find_newest_backup_root Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 01f0f9da9dc8b4d60921af92bc9329a1eb2fa8e0 Author: Nikolay Borisov Date: Tue Oct 15 18:42:17 2019 +0300 btrfs: Cleanup and simplify find_newest_super_backup Backup roots are always written in a circular manner. By definition we can only ever have 1 backup root whose generation equals to that of the superblock. Hence, the 'if' in the for loop will trigger at most once. This is sufficient to return the newest backup root. Furthermore the newest_gen parameter is always set to the generation of the superblock. This value can be obtained from the fs_info. This patch removes the unnecessary code dealing with the wraparound case and makes 'newest_gen' a local variable. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 16ad3be1752a7b8ea18f0f97e8383fec0e470e7c Author: Filipe Manana Date: Fri Oct 25 10:52:42 2019 +0100 Btrfs: remove unnecessary delalloc mutex for inodes The inode delalloc mutex was added a long time ago by commit f248679e86fea ("Btrfs: add a delalloc mutex to inodes for delalloc reservations"), and the reason for its introduction is not very clear from the change log. It claims it solves bogus warnings from lockdep, however it lacks an example report/warning from lockdep, or any explanation. Since we have enough concurrentcy protection from the locks of the space info and block reserve objects, and such lockdep warnings don't seem to exist anymore (at least on a 5.3 kernel I couldn't get them with fstests, ltp, fs_mark, etc), remove it, simplifying things a bit and decreasing the size of the btrfs_inode structure. With some quick fio tests doing direct IO and mmap writes I couldn't observe any significant performance increase either (direct IO writes that don't increase the file's size don't hold the inode's lock for their entire duration and mmap writes don't hold the inode's lock at all), which are the only type of writes that could see any performance gain due to less serialization. Review feedback from Josef: The problem was taking the i_mutex in mmap, which is how I was protecting delalloc reservations originally. The delalloc mutex didn't come with all of the other dependencies. That's what the lockdep messages were about, removing the lock isn't going to make them appear again. We _had_ to lock around this because we used to do tricks to keep from over-reserving, and if we didn't serialize delalloc reservations we'd end up with ugly accounting problems when we tried to clean things up. However with my recentish changes this isn't the case anymore. Every operation is responsible for reserving its space, and then adding it to the inode. Then cleaning up is straightforward and can't be mucked up by other users. So we no longer need the delalloc mutex to safe us from ourselves. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit bf2df5aed1c881f79b001ee19642e386bcda6d80 Author: Filipe Manana Date: Fri Oct 25 10:53:12 2019 +0100 Btrfs: remove wait queue from space_info structure It is not used anymore since commit 957780eb2788d8 ("Btrfs: introduce ticketed enospc infrastructure"), so just remove it. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f5389f330d6f28d648c51624f059b0bfdd9b1806 Author: Johannes Thumshirn Date: Thu Oct 24 17:44:54 2019 +0200 btrfs: remove cached space_info in btrfs_statfs() In btrfs_statfs() we cache fs_info::space_info in a local variable only to use it once in a list_for_each_rcu() statement. Not only is the local variable unnecessary it even makes the code harder to follow as it's not clear which list it is iterating. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit b3470b5dbe1300dea94191ae4b7d070be9a5cdc9 Author: David Sterba Date: Wed Oct 23 18:48:22 2019 +0200 btrfs: add dedicated members for start and length of a block group The on-disk format of block group item makes use of the key that stores the offset and length. This is further used in the code, although this makes thing harder to understand. The key is also packed so the offset/length is not properly aligned as u64. Add start (key.objectid) and length (key.offset) members to block group and remove the embedded key. When the item is searched or written, a local variable for key is used. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 0222dfdd4af1be2e70db956db61f9b43386ab76b Author: David Sterba Date: Wed Oct 23 18:48:20 2019 +0200 btrfs: rename extent buffer block group item accessors Accessors defined by BTRFS_SETGET_FUNCS take a raw extent buffer and manipulate the items there, there's no special prefix required. The block group accessors had _disk_ because previously the names were occupied by the on-stack accessors. As this has been addressed in the previous patch, we can now unify the naming. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit de0dc456fd62d387a596508aac1c75736ef6c760 Author: David Sterba Date: Wed Oct 23 18:48:18 2019 +0200 btrfs: rename block_group_item on-stack accessors to follow naming All accessors defined by BTRFS_SETGET_STACK_FUNCS contain _stack_ in the name, the block group ones were not following that scheme, so let's switch them. Signed-off-by: David Sterba commit 3d976388daa9ed77c9d2ded914ad07385b37d97e Author: David Sterba Date: Wed Oct 23 18:48:15 2019 +0200 btrfs: remove embedded block_group_cache::item The members ::used and ::flags are now in the block group cache structure, the last one is chunk_objectid, but that's set to a fixed value and otherwise unused. The item is constructed from a local variable before write, so we can remove the embedded one from block group. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit f93c63e54730428f474267600fa3a901881d2829 Author: David Sterba Date: Wed Oct 23 18:48:13 2019 +0200 btrfs: move block_group_item::flags to block group The flags are read from the item that's embedded to block group struct, but the item will be removed. Use the ::flags after read and before write. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit bf38be65f3703d5ef3661c0a2802bc28e76b8f19 Author: David Sterba Date: Wed Oct 23 18:48:11 2019 +0200 btrfs: move block_group_item::used to block group For unknown reasons, the member 'used' in the block group struct is stored in the b-tree item and accessed everywhere using the special accessor helper. Let's unify it and make it a regular member and only update the item before writing it to the tree. The item is still being used for flags and chunk_objectid, there's some duplication until the item is removed in following patches. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 34b127aecd4fe8e6a3903e10f204a7b7ffddca22 Author: Qu Wenruo Date: Thu Oct 24 09:38:29 2019 +0800 btrfs: Remove btrfs_bio::flags member The last user of btrfs_bio::flags was removed in commit 326e1dbb5736 ("block: remove management of bi_remaining when restoring original bi_end_io"), remove it. (Tagged for stable as the structure is heavily used and space savings are desirable.) CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 352ae07b599a03b08a2149d9c2ff9c3479591af2 Author: David Sterba Date: Mon Oct 7 11:11:02 2019 +0200 btrfs: add blake2b to checksumming algorithms Add blake2b (with 256 bit digest) to the list of possible checksumming algorithms used by BTRFS. Signed-off-by: David Sterba commit b4e967be431cf37f56cd1993592943007d7ab03b Author: David Sterba Date: Tue Oct 8 18:41:33 2019 +0200 btrfs: add member for a specific checksum driver Currently all the checksum algorithms generate a fixed size digest size and we use it. The on-disk format can hold up to BTRFS_CSUM_SIZE bytes and BLAKE2b produces digest of 512 bits by default. We can't do that and will use the blake2b-256, this needs to be passed to the crypto API. Separate that from the base algorithm name and add a member to request specific driver, in this case with the digest size. The only place that uses the driver name is the crypto API setup. Signed-off-by: David Sterba commit 41e6d2a808ad89d34c662ba8dd1209c4fefb1416 Author: Johannes Thumshirn Date: Mon Oct 7 11:11:04 2019 +0200 btrfs: sysfs: show used checksum driver per filesystem Show the used driver for the checksum algorithm for the filesystem in sysfs file /sys/fs/btrfs/UUID/features/checksum, eg. crc32c (crc32c-generic) Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit f7cea56c0fff95bd5a6cd21b9fa299f66193b604 Author: David Sterba Date: Mon Oct 7 11:11:03 2019 +0200 btrfs: sysfs: export supported checksums Export supported checksum algorithms via sysfs in the list of static features: /sys/fs/btrfs/features/supported_checksums Space spearated list of checksum algorithm names. Co-developed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 3831bf0094abed51e71cbeca8b6edf8b88c2644b Author: Johannes Thumshirn Date: Mon Oct 7 11:11:02 2019 +0200 btrfs: add sha256 to checksumming algorithm Add sha256 to the list of possible checksumming algorithms used by BTRFS. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3951e7f050ac6a38bbc859fc3cd6093890c31d1c Author: Johannes Thumshirn Date: Mon Oct 7 11:11:01 2019 +0200 btrfs: add xxhash64 to checksumming algorithms Add xxhash64 to the list of possible checksumming algorithms used by BTRFS. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit c6da429ea988de8f9330405fc405ee32479b5bd5 Author: Revanth Rajashekar Date: Fri Nov 8 16:09:04 2019 -0700 block: sed-opal: Introduce SUM_SET_LIST parameter and append it using 'add_token_u64' In function 'activate_lsp', rather than hard-coding the short atom header(0x83), we need to let the function 'add_short_atom_header' append the header based on the parameter being appended. The parameter has been defined in Section 3.1.2.1 of https://trustedcomputinggroup.org/wp-content/uploads/TCG_Storage-Opal_Feature_Set_Single_User_Mode_v1-00_r1-00-Final.pdf Reviewed-by: Jon Derrick Signed-off-by: Revanth Rajashekar Signed-off-by: Jens Axboe commit 46f9469247c6f4697cbbf37e4b3961120bf07f29 Author: Steven Rostedt (VMware) Date: Mon Nov 18 10:41:29 2019 -0500 ftrace: Rename ftrace_graph_stub to ftrace_stub_graph The ftrace_graph_stub was created and points to ftrace_stub as a way to assign the functon graph tracer function pointer to a stub function with a different prototype than what ftrace_stub has and not trigger the C verifier. The ftrace_graph_stub was created via the linker script vmlinux.lds.h. Unfortunately, powerpc already uses the name ftrace_graph_stub for its internal implementation of the function graph tracer, and even though powerpc would still build, the change via the linker script broke function tracer on powerpc from working. By using the name ftrace_stub_graph, which does not exist anywhere else in the kernel, this should not be a problem. Link: https://lore.kernel.org/r/1573849732.5937.136.camel@lca.pw Fixes: b83b43ffc6e4 ("fgraph: Fix function type mismatches of ftrace_graph_return using ftrace_stub") Reorted-by: Qian Cai Signed-off-by: Steven Rostedt (VMware) commit ea806eb3eab35528b578a061b2c4b28f0f92c465 Author: Steven Rostedt (VMware) Date: Sun Nov 17 17:04:15 2019 -0500 ftrace: Add a helper function to modify_ftrace_direct() to allow arch optimization If a direct ftrace callback is at a location that does not have any other ftrace helpers attached to it, it is possible to simply just change the text to call the new caller (if the architecture supports it). But this requires special architecture code. Currently, modify_ftrace_direct() uses a trick to add a stub ftrace callback to the location forcing it to call the ftrace iterator. Then it can change the direct helper to call the new function in C, and then remove the stub. Removing the stub will have the location now call the new location that the direct helper is using. The new helper function does the registering the stub trick, but is a weak function, allowing an architecture to override it to do something a bit more direct. Link: https://lore.kernel.org/r/20191115215125.mbqv7taqnx376yed@ast-mbp.dhcp.thefacebook.com Suggested-by: Alexei Starovoitov Signed-off-by: Steven Rostedt (VMware) commit 6519f708cc355c4834edbe1885c8542c0e7ef907 Author: Darrick J. Wong Date: Sun Nov 17 10:36:52 2019 -0800 xfs: report corruption only as a regular error Redefine XFS_IS_CORRUPT so that it reports corruptions only via xfs_corruption_report. Since these are on-disk contents (and not checks of internal state), we don't ever want to panic the kernel. This also amends the corruption report to recommend unmounting and running xfs_repair. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 377bcd5f3b7f46f50fdad1fed639c07f8c9f68cb Author: Carlos Maiolino Date: Thu Nov 14 12:43:04 2019 -0800 xfs: Remove kmem_zone_free() wrapper We can remove it now, without needing to rework the KM_ flags. Use kmem_cache_free() directly. Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino Signed-off-by: Darrick J. Wong commit aaf54eb8bc15de293b0fccf3be19100793b8ba67 Author: Carlos Maiolino Date: Thu Nov 14 12:43:04 2019 -0800 xfs: Remove kmem_zone_destroy() wrapper Use kmem_cache_destroy directly Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino Signed-off-by: Darrick J. Wong commit b1231760e44324d4cdb1b02116670c1ad2126e54 Author: Carlos Maiolino Date: Thu Nov 14 12:43:03 2019 -0800 xfs: Remove slab init wrappers Remove kmem_zone_init() and kmem_zone_init_flags() together with their specific KM_* to SLAB_* flag wrappers. Use kmem_cache_create() directly. Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino Signed-off-by: Darrick J. Wong commit eb65ccdb083639f8a9b6919c94d1df570396a9a1 Author: Li Xu Date: Fri Nov 15 13:54:13 2019 -0600 ASoC: wm_adsp: Expose mixer control API Expose mixer control API for reading and writing controls from the kernel. This API can be used by ALSA kernel drivers with ADSP support to read and write firmware-defined memory regions. Signed-off-by: Li Xu Signed-off-by: David Rhodes Acked-by: Charles Keepax Link: https://lore.kernel.org/r/1573847653-17094-2-git-send-email-david.rhodes@cirrus.com Signed-off-by: Mark Brown commit e48fdb53bd1fa50796b5a050e6e31fde3891a2c8 Author: Lucas Stach Date: Mon Nov 18 16:12:06 2019 +0100 ASoC: tlv320aic31xx: configure output common-mode voltage The tlv320aic31xx devices allow to adjust the output common-mode voltage for best analog performance. The datasheet states that the common mode voltage should be set to be <= AVDD/2. This changes allows to configure the output common-mode voltage via a DT property. If the property is absent the voltage is automatically chosen as the highest voltage below/equal to AVDD/2. Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20191118151207.28576-1-l.stach@pengutronix.de Signed-off-by: Mark Brown commit 653c28afa76b45c570370c3c3a89975c68c5fc8e Author: Liam Girdwood Date: Mon Nov 11 16:29:00 2019 -0600 ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names. The manifest information is different between CNL, CML and CFL platforms hence we need to load different files. Signed-off-by: Liam Girdwood Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111222901.19892-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 10f64581b1b79f3b0121c987e9ef272195940bf7 Author: Konstantin Khlebnikov Date: Sun Nov 10 13:11:01 2019 +0300 libtraceevent: Fix parsing of event %o and %X argument types Add missing "%o" and "%X". Ext4 events use "%o" for printing i_mode. Signed-off-by: Konstantin Khlebnikov Reviewed-by: Steven Rostedt (VMware) Cc: Tzvetomir Stoyanov (VMware) Link: http://lore.kernel.org/lkml/157338066113.6548.11461421296091086041.stgit@buzz Signed-off-by: Arnaldo Carvalho de Melo commit aceb98261ea7d9fe38f9c140c5531f0b13623832 Author: Adrian Hunter Date: Thu Nov 14 16:25:38 2019 +0200 perf callchain: Fix segfault in thread__resolve_callchain_sample() Do not dereference 'chain' when it is NULL. $ perf record -e intel_pt//u -e branch-misses:u uname $ perf report --itrace=l --branch-history perf: Segmentation fault Fixes: e9024d519d89 ("perf callchain: Honour the ordering of PERF_CONTEXT_{USER,KERNEL,etc}") Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191114142538.4097-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a7c2b572e217418ad34441202ad3addd8f94d2ea Author: Arnaldo Carvalho de Melo Date: Sun Nov 17 11:38:13 2019 -0300 perf map_groups: Auto sort maps by name, if needed There are still lots of lookups by name, even if just when loading vmlinux, till that code is studied to figure out if its possible to do away with those map lookup by names, provide a way to sort it using libc's qsort/bsearch. Doing it at the first lookup defers the sorting a bit, and as the code stands now, is never done for user maps, just for the kernel ones. # perf probe -l # perf probe -x ~/bin/perf -L __map_groups__find_by_name <__map_groups__find_by_name@/home/acme/git/perf/tools/perf/util/symbol.c:0> 0 static struct map *__map_groups__find_by_name(struct map_groups *mg, const char *name) 1 { struct map **mapp; 4 if (mg->maps_by_name == NULL && 5 map__groups__sort_by_name_from_rbtree(mg)) 6 return NULL; 8 mapp = bsearch(name, mg->maps_by_name, mg->nr_maps, sizeof(*mapp), map__strcmp_name); 9 if (mapp) 10 return *mapp; 11 return NULL; 12 } struct map *map_groups__find_by_name(struct map_groups *mg, const char *name) { # perf probe -x ~/bin/perf 'found=__map_groups__find_by_name:10 name:string' Added new event: probe_perf:found (on __map_groups__find_by_name:10 in /home/acme/bin/perf with name:string) You can now use it in all perf tools, such as: perf record -e probe_perf:found -aR sleep 1 # # perf probe -x ~/bin/perf -L map_groups__find_by_name 0 struct map *map_groups__find_by_name(struct map_groups *mg, const char *name) 1 { 2 struct maps *maps = &mg->maps; struct map *map; 5 down_read(&maps->lock); 7 if (mg->last_search_by_name && strcmp(mg->last_search_by_name->dso->short_name, name) == 0) { 8 map = mg->last_search_by_name; 9 goto out_unlock; } /* * If we have mg->maps_by_name, then the name isn't in the rbtree, * as mg->maps_by_name mirrors the rbtree when lookups by name are * made. */ 16 map = __map_groups__find_by_name(mg, name); 17 if (map || mg->maps_by_name != NULL) 18 goto out_unlock; /* Fallback to traversing the rbtree... */ 21 maps__for_each_entry(maps, map) 22 if (strcmp(map->dso->short_name, name) == 0) { 23 mg->last_search_by_name = map; 24 goto out_unlock; } 27 map = NULL; out_unlock: 30 up_read(&maps->lock); 31 return map; 32 } int dso__load_vmlinux(struct dso *dso, struct map *map, const char *vmlinux, bool vmlinux_allocated) # perf probe -x ~/bin/perf 'fallback=map_groups__find_by_name:21 name:string' Added new events: probe_perf:fallback (on map_groups__find_by_name:21 in /home/acme/bin/perf with name:string) probe_perf:fallback_1 (on map_groups__find_by_name:21 in /home/acme/bin/perf with name:string) You can now use it in all perf tools, such as: perf record -e probe_perf:fallback_1 -aR sleep 1 # # perf probe -l probe_perf:fallback (on map_groups__find_by_name:21@util/symbol.c in /home/acme/bin/perf with name_string) probe_perf:fallback_1 (on map_groups__find_by_name:21@util/symbol.c in /home/acme/bin/perf with name_string) probe_perf:found (on __map_groups__find_by_name:10@util/symbol.c in /home/acme/bin/perf with name_string) # # perf stat -e probe_perf:* Now run 'perf top' in another term and then, after a while, stop 'perf stat': Furthermore, if we ask for interval printing, we can see that that is done just at the start of the workload: # perf stat -I1000 -e probe_perf:* # time counts unit events 1.000319513 0 probe_perf:found 1.000319513 0 probe_perf:fallback_1 1.000319513 0 probe_perf:fallback 2.001868092 23,251 probe_perf:found 2.001868092 0 probe_perf:fallback_1 2.001868092 0 probe_perf:fallback 3.002901597 0 probe_perf:found 3.002901597 0 probe_perf:fallback_1 3.002901597 0 probe_perf:fallback 4.003358591 0 probe_perf:found 4.003358591 0 probe_perf:fallback_1 4.003358591 0 probe_perf:fallback ^C # Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-c5lmbyr14x448rcfii7y6t3k@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a94ab91a54c63b9101715b03171219279cc0ee26 Author: Arnaldo Carvalho de Melo Date: Thu Nov 14 12:28:41 2019 -0300 perf machine: No need to check if kernel module maps pre-exist We'only populating maps for kernel modules either from perf.data file PERF_RECORD_MMAP records or when parsing /proc/modules, so there is no need to first look if we already have those module maps in the list, that would mean the kernel has duplicate entries. So ditch one use of looking up maps by name. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-gnzjg2hhuz6jnrw91m35059y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 03189e8ed5b3f17550b478043f671a9dbd2b3141 Author: Chris Down Date: Mon Nov 11 14:44:38 2019 +0000 docs: cgroup: mm: Fix spelling of "list" Signed-off-by: Chris Down Cc: Andrew Morton Cc: linux-kernel@vger.kernel.org Cc: cgroups@vger.kernel.org Cc: linux-mm@kvack.org Cc: kernel-team@fb.com Signed-off-by: Tejun Heo commit bc3bdb12bbb3492067c8719011576370e959a2e6 Author: Laura Abbott Date: Tue Sep 8 09:53:38 2015 -0700 usb-storage: Disable UAS on JMicron SATA enclosure Steve Ellis reported incorrect block sizes and alignement offsets with a SATA enclosure. Adding a quirk to disable UAS fixes the problems. Reported-by: Steven Ellis Cc: Pacho Ramos Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman commit 302ee055af0201e61be7670f957c1622d6ce176e Author: Mark Brown Date: Mon Nov 18 15:52:47 2019 +0000 ASoC: SOF: Intel: Fix build break Commit 130d3e9077 (Fix CFL and CML FW nocodec binary names.) broke the build in some configurations as it depends on changes in the development branch, revert it. Reported-by: Stephen Rothwell Signed-off-by: Mark Brown commit 496074f94b19574c77240d3b3f84cfb1097de51d Author: Tejun Heo Date: Thu Nov 14 14:31:28 2019 -0800 blk-cgroup: cgroup_rstat_updated() shouldn't be called on cgroup1 Currently, cgroup rstat is supported only on cgroup2 hierarchy and rstat functions shouldn't be called on cgroup1 cgroups. While converting blk-cgroup core statistics to rstat, f73316482977 ("blk-cgroup: reimplement basic IO stats using cgroup rstat") accidentally ended up calling cgroup_rstat_updated() on cgroup1 cgroups causing crashes. Longer term, we probably should add cgroup1 support to rstat but for now let's mask the call directly. Fixes: f73316482977 ("blk-cgroup: reimplement basic IO stats using cgroup rstat") Tested-by: Faiz Abbas Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 00b89892c869f34528deca957b10d1468c4e8b38 Author: Jens Axboe Date: Mon Nov 18 08:35:47 2019 -0700 Revert "bcache: fix fifo index swapping condition in journal_pin_cmp()" Coly says: "Guoju Fang talked to me today, he told me this change was unnecessary and I was over-thought. Then I realize fifo_idx() uses a mask to handle the array index overflow condition, so the index swap in journal_pin_cmp() won't happen. And yes, Guoju and Kent are correct. Since you already applied this patch, can you please to remove this patch from your for-next branch? This single patch does not break thing, but it is unecessary at this moment." This reverts commit c0e0954e909c17b43d176ab219fc598964616ae6. Signed-off-by: Jens Axboe commit a468168130ec1a3245812f2c713be97081149ca2 Author: YueHaibing Date: Fri Nov 15 13:18:29 2019 +0000 scsi: sd_zbc: Remove set but not used variable 'buflen' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/sd_zbc.c: In function 'sd_zbc_check_zones': drivers/scsi/sd_zbc.c:341:9: warning: variable 'buflen' set but not used [-Wunused-but-set-variable] It is not used since commit d9dd73087a8b ("block: Enhance blk_revalidate_disk_zones()") Reported-by: Hulk Robot Reviewed-by: Damien Le Moal Signed-off-by: YueHaibing Signed-off-by: Jens Axboe commit 36b3db03b4741b8935b68fffc7e69951d8d70a89 Author: Alexander Shishkin Date: Fri Nov 15 18:08:18 2019 +0200 perf/core: Fix the mlock accounting, again Commit: 5e6c3c7b1ec2 ("perf/aux: Fix tracking of auxiliary trace buffer allocation") tried to guess the correct combination of arithmetic operations that would undo the AUX buffer's mlock accounting, and failed, leaking the bottom part when an allocation needs to be charged partially to both user->locked_vm and mm->pinned_vm, eventually leaving the user with no locked bonus: $ perf record -e intel_pt//u -m1,128 uname [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.061 MB perf.data ] $ perf record -e intel_pt//u -m1,128 uname Permission error mapping pages. Consider increasing /proc/sys/kernel/perf_event_mlock_kb, or try again with a smaller value of -m/--mmap_pages. (current value: 1,128) Fix this by subtracting both locked and pinned counts when AUX buffer is unmapped. Reported-by: Thomas Richter Tested-by: Thomas Richter Signed-off-by: Alexander Shishkin Acked-by: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar commit d256d796279de0bdc227ff4daef565aa7e80c898 Author: Jeffle Xu Date: Mon Nov 18 09:50:38 2019 +0800 dm thin: wakeup worker only when deferred bios exist Single thread fio test (read, bs=4k, ioengine=libaio, iodepth=128, numjobs=1) over dm-thin device has poor performance versus bare nvme device. Further investigation with perf indicates that queue_work_on() consumes over 20% CPU time when doing IO over dm-thin device. The call stack is as follows. - 40.57% thin_map + 22.07% queue_work_on + 9.95% dm_thin_find_block + 2.80% cell_defer_no_holder 1.91% inc_all_io_entry.isra.33.part.34 + 1.78% bio_detain.isra.35 In cell_defer_no_holder(), wakeup_worker() is always called, no matter whether the tc->deferred_bio_list list is empty or not. In single thread IO model, this list is most likely empty. So skip waking up worker thread if tc->deferred_bio_list list is empty. Single thread IO performance improves from 448 MiB/s to 646 MiB/s (+44%) once the needless wake_worker() calls are properly skipped. Signed-off-by: Jeffle Xu Signed-off-by: Mike Snitzer commit fa039b936cf518c50d99c694a757b18bf3ea3f5e Author: Jani Nikula Date: Fri Nov 15 14:04:40 2019 +0200 drm/i915: fix accidental static variable use It's supposed to be just a const pointer. Fixes: 074c77e3ec63 ("drm/i915/tgl: Gen-12 display loses Yf tiling and legacy CCS support") Cc: Ville Syrjälä Cc: Dhinakaran Pandiyan Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191115120440.17883-1-jani.nikula@intel.com (cherry picked from commit 48ea97fabe75c83adf4e6ff9262bbda229e6ee73) Signed-off-by: Joonas Lahtinen commit e367925e80b5a0a7d8db5b629c767f288f0aed4b Author: Don Hiatt Date: Fri Nov 15 15:15:38 2019 -0800 drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission On some platforms (e.g. KBL) that do not support GuC submission, but the user enabled the GuC communication (e.g for HuC authentication) calling the GuC EXIT_S_STATE action results in lose of ability to enter RC6. We can remove the GuC suspend/resume entirely as we do not need to save the GuC submission status. Add intel_guc_submission_is_enabled() function to determine if GuC submission is active. v2: Do not suspend/resume the GuC on platforms that do not support Guc Submission. v3: Fix typo, move suspend logic to remove goto. v4: Use intel_guc_submission_is_enabled() to check GuC submission status. v5: No need to look at engine to determine if submission is enabled. Squash fix + intel_guc_submission_is_enabled() patch into one. v6: Move resume check into intel_guc_resume() for symmetry. Fix commit Fixes tag. Reported-by: KiteStramuort Reported-by: S. Zharkoff Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111594 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111623 Fixes: ffd5ce22faa4 ("drm/i915/guc: Updates for GuC 32.0.3 firmware") Cc: Michal Wajdeczko Cc: Daniele Ceralo Spurio Cc: Stuart Summers Cc: Chris Wilson Tested-by: Tomas Janousek Signed-off-by: Don Hiatt Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191115231538.1249-1-don.hiatt@intel.com (cherry picked from commit 82e0c5bbd6eb1d274b5a3e519ff0ab91f1f8e537) Signed-off-by: Joonas Lahtinen commit a46bfdc83fee0a83aae54390729df12abce57f45 Author: Chris Wilson Date: Thu Nov 14 22:57:32 2019 +0000 drm/i915/gt: Wait for new requests in intel_gt_retire_requests() Our callers fall into two categories, those passing timeout=0 who just want to flush request retirements and those passing a timeout that need to wait for submission completion (e.g. intel_gt_wait_for_idle()). Currently, we only wait for a snapshot of timelines at the start of the wait (but there was an expectation that new requests would cause timelines to appear at the end). However, our callers, such as intel_gt_wait_for_idle() before suspend, do require us to wait for the power management requests emitted by retirement as well. If we don't, then it takes an extra second or two for the background worker to flush the queue and mark the GT as idle. Fixes: 7e8057626640 ("drm/i915: Drop struct_mutex from around i915_retire_requests()") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191114225736.616885-1-chris@chris-wilson.co.uk (cherry picked from commit 7936a22dd4660d24b4ca0668c02b0372127cab44) Signed-off-by: Joonas Lahtinen commit 2a39b072ee6990512ff0829a4eba5b409dff2746 Author: Imre Deak Date: Thu Nov 14 17:26:21 2019 +0200 drm/i915: Restore GT coarse power gating workaround The workaround to disable coarse power gating is still needed on SKL GT3/GT4 machines and since the RC6 context corruption was discovered by the hardware team also on all GEN9 machines. Restore applying the workaround. Fixes: c113236718e8 ("drm/i915: Extract GT render sleep (rc6) management") Testcase: igt/intel_gt_pm_late_selftests/live_rc6_ctx Cc: Chris Wilson Cc: Andi Shyti Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191114152621.7235-1-imre.deak@intel.com (cherry picked from commit 980f87a2edb3e7825949ebd0a7e63ab574c20816) Signed-off-by: Joonas Lahtinen commit 9faf5fa4d3dad3b0c0fa6e67689c144981a11c27 Author: Chris Wilson Date: Wed Nov 13 18:06:33 2019 +0000 drm/i915/fbdev: Restore physical addresses for fb_mmap() fbdev uses the physical address of our framebuffer for its fb_mmap() routine. While we need to adapt this address for the new io BAR, we have to fix v5.4 first! The simplest fix is to restore the smem back to v5.3 and we will then probably have to implement our fbops->fb_mmap() callback to handle local memory. Reported-by: Neil MacLeod Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112256 Fixes: 5f889b9a61dd ("drm/i915: Disregard drm_mode_config.fb_base") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Maarten Lankhorst Tested-by: Neil MacLeod Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191113180633.3947-1-chris@chris-wilson.co.uk (cherry picked from commit abc5520704ab438099fe352636b30b05c1253bea) Signed-off-by: Joonas Lahtinen commit 7e89d508558c1c02b6a4f34cdadfb7992794ad0f Author: Lionel Landwerlin Date: Wed Nov 13 17:46:39 2019 +0200 drm/i915/perf: don't forget noa wait after oa config I'm observing incoherence metric values, changing from run to run. It appears the patches introducing noa wait & reconfiguration from command stream switched places in the series multiple times during the review. This lead to the dependency of one onto the order to go missing... Signed-off-by: Lionel Landwerlin Fixes: 15d0ace1f876 ("drm/i915/perf: execute OA configuration from command stream") Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191113154639.27144-1-lionel.g.landwerlin@intel.com (cherry picked from commit 93937659dc644f708def8fa58cb63c5c9f499f26) Signed-off-by: Joonas Lahtinen commit 3e749f5199e1604bedc67ed479c01332b91c0129 Author: Bruce Chang Date: Wed Nov 13 15:11:04 2019 -0800 drm/i915: Avoid atomic context for error capture io_mapping_map_atomic/kmap_atomic are occasionally taken in error capture (if there is no aperture preallocated for the use of error capture), but the error capture and compression routines are now run in normal context: <3> [113.316247] BUG: sleeping function called from invalid context at mm/page_alloc.c:4653 <3> [113.318190] in_atomic(): 1, irqs_disabled(): 0, pid: 678, name: debugfs_test <4> [113.319900] no locks held by debugfs_test/678. <3> [113.321002] Preemption disabled at: <4> [113.321130] [] i915_error_object_create+0x494/0x610 [i915] <4> [113.327259] Call Trace: <4> [113.327871] dump_stack+0x67/0x9b <4> [113.328683] ___might_sleep+0x167/0x250 <4> [113.329618] __alloc_pages_nodemask+0x26b/0x1110 <4> [113.334614] pool_alloc.constprop.19+0x14/0x60 [i915] <4> [113.335951] compress_page+0x7c/0x100 [i915] <4> [113.337110] i915_error_object_create+0x4bd/0x610 [i915] <4> [113.338515] i915_capture_gpu_state+0x384/0x1680 [i915] However, it is not a good idea to run the slow compression inside atomic context, so we choose not to. Fixes: 895d8ebeaa924 ("drm/i915: error capture with no ggtt slot") Signed-off-by: Bruce Chang Reviewed-by: Brian Welty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191113231104.24208-1-yu.bruce.chang@intel.com (cherry picked from commit 48715f7001742e0d1cb20cffab1a0d75f5f7ad72) Signed-off-by: Joonas Lahtinen commit 78e2ea291ead1e395864ff1583064e07b1adeb62 Author: José Roberto de Souza Date: Thu Nov 7 13:45:57 2019 -0800 drm/i915/display: Fix TRANS_DDI_MST_TRANSPORT_SELECT definition TRANS_DDI_MST_TRANSPORT_SELECT is 2 bits wide not 3, it was taking one bit from EDP/DSI Input Select. Fixes: b3545e086877 ("drm/i915/tgl: add support to one DP-MST stream") Cc: Lucas De Marchi Signed-off-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191107214559.77087-1-jose.souza@intel.com (cherry picked from commit bb747fa5a9cbf561e5a30649f360feb9e6855645) Signed-off-by: Joonas Lahtinen commit 5d77aa07bd2f4aa940c80a0d97471201b4a6a282 Author: Imre Deak Date: Tue Nov 12 12:46:08 2019 +0200 drm/i915: Fix detection for a CMP-V PCH According to internal documents I found for CMP PCHs the PCI ID 0xA3C1 belongs to a CMP-V chipset. Based on the same docs the programming of the PCH is compatible with that of KBP. Fix up my previous wrong assumption accordingly using the SPT programming which in turn is the basis for KBP. The original bug reporter verified that this is the correct PCH identification (the only way we'll program valid DDC pin-pair values to the GMBUS register) and the Windows team uses the same identification (that is using the KBP programming model for this PCH). I filed the necessary Bspec update requests (BSpec/33734). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112051 Fixes: 37c92dc303dd ("drm/i915: Add new CNL PCH ID seen on a CML platform") Reported-and-tested-by: Cyrus Cc: Cyrus Cc: Timo Aaltonen Cc: José Roberto de Souza Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191112104608.24587-1-imre.deak@intel.com (cherry picked from commit 50a5065f4474c2dbc1f7462b45a32d33d7b48d88) Signed-off-by: Joonas Lahtinen commit 36104fcf8ff4dd0b0ca8a79bc3fb5b1046deead2 Author: Chris Wilson Date: Tue Nov 12 15:00:51 2019 +0000 drm/i915: Flush context free work on cleanup Throw in a flush_work() to specifically flush the context cleanup work before the module is unloaded. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112248 Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191112150051.1603-1-chris@chris-wilson.co.uk (cherry picked from commit 5f00cac921b1219bc9daf00d169385b4cb3916ce) Signed-off-by: Joonas Lahtinen commit de678bc63cc659d056a5ff3a3b11866d3eb4c1a9 Author: Sebastian Andrzej Siewior Date: Mon Nov 18 12:01:22 2019 +0100 block: Don't disable interrupts in trigger_softirq() trigger_softirq() is always invoked as a SMP-function call which is always invoked with disables interrupts. Don't disable interrupt in trigger_softirq() because interrupts are already disabled. Reviewed-by: Ming Lei Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jens Axboe commit 32c4d9e8a4eb286674dc1a3b93d51d791c7f645e Author: Kars de Jong Date: Sat Nov 16 12:46:20 2019 +0100 rtc: msm6242: Remove unneeded msm6242_set()/msm6242_clear() functions The msm6242_set()/msm6242_clear() functions are used when writing to Control Register D to set or clear the HOLD bit when reading the current time from the RTC. Doing this with a read-modify-write cycle will potentially clear an interrupt condition which occurs between the read and the write. The datasheet states the following about this: When writing the HOLD or 30 second adjust bits of register D, it is necessary to write the IRQ FLAG bit to a "1". Since the only other bits in the register are the 30 second adjust bit (which is not used) and the BUSY bit (which is read-only), the read-modify-write cycle can be replaced by a simple write with the IRQ FLAG bit set to 1 and the other bits (except HOLD) set to 0. Tested-by: Kars de Jong Signed-off-by: Kars de Jong Link: https://lore.kernel.org/r/20191116114620.9193-1-jongk@linux-m68k.org Reviewed-by: Geert Uytterhoeven Signed-off-by: Alexandre Belloni commit 6e0a9b3dfaaf93476b34825e53c4ec065267081e Author: Arnaldo Carvalho de Melo Date: Thu Nov 14 12:15:34 2019 -0300 perf record: No need to process the synthesized MMAP events twice At the end of a 'perf record' session, by default, we'll process all samples and populate the threads, maps, etc so as to find out which of the DSOs got samples, to reduce the size of the build-id table we'll add to the perf.data headers. But we don't need to process the PERF_RECORD_MMAP events synthesized for the kernel modules, as we have those already via perf_session__create_kernel_maps(), so add mmap/mmap2 handlers that first look at event->header.misc to see if the event is for a user map, bailing out if not. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-mofoxvcx2dryppcw3o689jdd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f068435d9bb2d825d59e3c101bc579f09315ee01 Author: Arnaldo Carvalho de Melo Date: Thu Nov 14 10:46:45 2019 -0300 perf map: No need to adjust the long name of modules At some point in the past we needed to make sure we would get the long name of modules and not just what we get from /proc/modules, but that need, as described in the cset that introduced the adjustment function: Fixes: c03d5184f0e9 ("perf machine: Adjust dso->long_name for offline module") Without using the buildid-cache: # lsmod | grep trusted # insmod trusted.ko # lsmod | grep trusted trusted 24576 0 # strace -e open,openat perf probe -m ./trusted.ko key_seal |& grep trusted openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 7 openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 openat(AT_FDCWD, "/root/.debug/root/trusted.ko/dd3d355d567394d540f527e093e0f64b95879584/probes", O_RDWR|O_CREAT, 0644) = 3 openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/.debug/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, ".debug/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 4 openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 probe:key_seal (on key_seal in trusted) # perf probe -l probe:key_seal (on key_seal in trusted) # No attempt at opening '[trusted]'. Now using the build-id cache: # rmmod trusted # perf buildid-cache --add ./trusted.ko # insmod trusted.ko # strace -e open,openat perf probe -m ./trusted.ko key_seal |& grep trusted openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 7 openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 openat(AT_FDCWD, "/root/.debug/root/trusted.ko/dd3d355d567394d540f527e093e0f64b95879584/probes", O_RDWR|O_CREAT, 0644) = 3 openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/.debug/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, ".debug/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 4 openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3 # Again, no attempt at reading '[trusted]'. Finally, adding a probe to that function and then using: [root@quaco ~]# perf trace -e probe_perf:*/max-stack=16/ --max-events=2 0.000 perf/13456 probe_perf:dso__adjust_kmod_long_name(__probe_ip: 5492263) dso__adjust_kmod_long_name (/home/acme/bin/perf) machine__process_kernel_mmap_event (/home/acme/bin/perf) machine__process_mmap_event (/home/acme/bin/perf) perf_event__process_mmap (/home/acme/bin/perf) machines__deliver_event (/home/acme/bin/perf) perf_session__deliver_event (/home/acme/bin/perf) perf_session__process_event (/home/acme/bin/perf) process_simple (/home/acme/bin/perf) reader__process_events (/home/acme/bin/perf) __perf_session__process_events (/home/acme/bin/perf) perf_session__process_events (/home/acme/bin/perf) process_buildids (/home/acme/bin/perf) record__finish_output (/home/acme/bin/perf) __cmd_record (/home/acme/bin/perf) cmd_record (/home/acme/bin/perf) run_builtin (/home/acme/bin/perf) 0.055 perf/13456 probe_perf:dso__adjust_kmod_long_name(__probe_ip: 5492263) dso__adjust_kmod_long_name (/home/acme/bin/perf) machine__process_kernel_mmap_event (/home/acme/bin/perf) machine__process_mmap_event (/home/acme/bin/perf) perf_event__process_mmap (/home/acme/bin/perf) machines__deliver_event (/home/acme/bin/perf) perf_session__deliver_event (/home/acme/bin/perf) perf_session__process_event (/home/acme/bin/perf) process_simple (/home/acme/bin/perf) reader__process_events (/home/acme/bin/perf) __perf_session__process_events (/home/acme/bin/perf) perf_session__process_events (/home/acme/bin/perf) process_buildids (/home/acme/bin/perf) record__finish_output (/home/acme/bin/perf) __cmd_record (/home/acme/bin/perf) cmd_record (/home/acme/bin/perf) run_builtin (/home/acme/bin/perf) # This was the only path I could find using the perf tools that reach at this function, then as of november/2019, if we put a probe in the line where the actuall setting of the dso->long_name is done: # perf trace -e probe_perf:* ^C[root@quaco ~] # perf stat -e probe_perf:* -I 2000 2.000404265 0 probe_perf:dso__adjust_kmod_long_name 4.001142200 0 probe_perf:dso__adjust_kmod_long_name 6.001704120 0 probe_perf:dso__adjust_kmod_long_name 8.002398316 0 probe_perf:dso__adjust_kmod_long_name 10.002984010 0 probe_perf:dso__adjust_kmod_long_name 12.003597851 0 probe_perf:dso__adjust_kmod_long_name 14.004113303 0 probe_perf:dso__adjust_kmod_long_name 16.004582773 0 probe_perf:dso__adjust_kmod_long_name 18.005176373 0 probe_perf:dso__adjust_kmod_long_name 20.005801605 0 probe_perf:dso__adjust_kmod_long_name 22.006467540 0 probe_perf:dso__adjust_kmod_long_name ^C 23.683261941 0 probe_perf:dso__adjust_kmod_long_name # Its not being used at all. To further test this I used kvm.ko as the offline module, i.e. removed if from the buildid-cache by nuking it completely (rm -rf ~/.debug) and moved it from the normal kernel distro path, removed the modules, stoped the kvm guest, and then installed it manually, etc. # rmmod kvm-intel # rmmod kvm # lsmod | grep kvm # modprobe kvm-intel modprobe: ERROR: ctx=0x55d3b1722260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory modprobe: ERROR: ctx=0x55d3b1722260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory modprobe: ERROR: could not insert 'kvm_intel': Unknown symbol in module, or unknown parameter (see dmesg) # insmod ./kvm.ko # modprobe kvm-intel modprobe: ERROR: ctx=0x562f34026260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory modprobe: ERROR: ctx=0x562f34026260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory # lsmod | grep kvm kvm_intel 299008 0 kvm 765952 1 kvm_intel irqbypass 16384 1 kvm # # perf probe -x ~/bin/perf machine__findnew_module_map:12 mname=m.name:string filename=filename:string 'dso_long_name=map->dso->long_name:string' 'dso_name=map->dso->name:string' # perf probe -l probe_perf:machine__findnew_module_map (on machine__findnew_module_map:12@util/machine.c in /home/acme/bin/perf with mname filename dso_long_name dso_name) # perf record ^C[ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 3.416 MB perf.data (33956 samples) ] # perf trace -e probe_perf:machine* 6.322 perf/23099 probe_perf:machine__findnew_module_map(__probe_ip: 5492493, mname: "[salsa20_generic]", filename: "/lib/modules/5.3.8-200.fc30.x86_64/kernel/crypto/salsa20_generic.ko.xz", dso_long_name: "/lib/modules/5.3.8-200.fc30.x86_64/kernel/crypto/salsa20_generic.ko.xz", dso_name: "[salsa20_generic]") 6.375 perf/23099 probe_perf:machine__findnew_module_map(__probe_ip: 5492493, mname: "[kvm]", filename: "[kvm]", dso_long_name: "[kvm]", dso_name: "[kvm]") The filename doesn't come with the path, no point in trying to set the dso->long_name. [root@quaco ~]# strace -e open,openat perf probe -m ./kvm.ko kvm_apic_local_deliver |& egrep 'open.*kvm' openat(AT_FDCWD, "/sys/module/kvm_intel/notes/.note.gnu.build-id", O_RDONLY) = 4 openat(AT_FDCWD, "/sys/module/kvm/notes/.note.gnu.build-id", O_RDONLY) = 4 openat(AT_FDCWD, "/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 7 openat(AT_FDCWD, "/sys/module/kvm_intel/notes/.note.gnu.build-id", O_RDONLY) = 8 openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3 openat(AT_FDCWD, "/root/.debug/root/kvm.ko/5955f426cb93f03f30f3e876814be2db80ab0b55/probes", O_RDWR|O_CREAT, 0644) = 3 openat(AT_FDCWD, "/usr/lib/debug/root/kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/debug/root/kvm.ko", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/.debug/kvm.ko", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3 openat(AT_FDCWD, "kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, ".debug/kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3 openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3 openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 4 openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3 [root@quaco ~]# Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-jlfew3lyb24d58egrp0o72o2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1ae14516cba032a83b561144d3d48fd381584c0c Author: Arnaldo Carvalho de Melo Date: Wed Nov 13 16:33:33 2019 -0300 perf map_groups: Add a front end cache for map lookups by name Lets see if it helps: First look at the probeable lines for the function that does lookups by name in a map_groups struct: # perf probe -x ~/bin/perf -L map_groups__find_by_name 0 struct map *map_groups__find_by_name(struct map_groups *mg, const char *name) 1 { 2 struct maps *maps = &mg->maps; struct map *map; 5 down_read(&maps->lock); 7 if (mg->last_search_by_name && strcmp(mg->last_search_by_name->dso->short_name, name) == 0) { 8 map = mg->last_search_by_name; 9 goto out_unlock; } 12 maps__for_each_entry(maps, map) 13 if (strcmp(map->dso->short_name, name) == 0) { 14 mg->last_search_by_name = map; 15 goto out_unlock; } 18 map = NULL; out_unlock: 21 up_read(&maps->lock); 22 return map; 23 } int dso__load_vmlinux(struct dso *dso, struct map *map, const char *vmlinux, bool vmlinux_allocated) # Now add a probe to the place where we reuse the last search: # perf probe -x ~/bin/perf map_groups__find_by_name:8 Added new event: probe_perf:map_groups__find_by_name (on map_groups__find_by_name:8 in /home/acme/bin/perf) You can now use it in all perf tools, such as: perf record -e probe_perf:map_groups__find_by_name -aR sleep 1 # Now lets do a system wide 'perf stat' counting those events: # perf stat -e probe_perf:* Leave it running and lets do a 'perf top', then, after a while, stop the 'perf stat': # perf stat -e probe_perf:* ^C Performance counter stats for 'system wide': 3,603 probe_perf:map_groups__find_by_name 44.565253139 seconds time elapsed # yeah, good to have. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-tcz37g3nxv3tvxw3q90vga3p@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e34494c8df0cd96fc432efae121db3212c46ae48 Author: Kars de Jong Date: Sat Nov 16 12:05:48 2019 +0100 rtc: msm6242: Fix reading of 10-hour digit The driver was reading the wrong register as the 10-hour digit due to a misplaced ')'. It was in fact reading the 1-second digit register due to this bug. Also remove the use of a magic number for the hour mask and use the define for it which was already present. Fixes: 4f9b9bba1dd1 ("rtc: Add an RTC driver for the Oki MSM6242") Tested-by: Kars de Jong Signed-off-by: Kars de Jong Link: https://lore.kernel.org/r/20191116110548.8562-1-jongk@linux-m68k.org Reviewed-by: Geert Uytterhoeven Signed-off-by: Alexandre Belloni commit c5c584d2dbb0883f1e6f61872964a4a3a35a2017 Author: Arnaldo Carvalho de Melo Date: Wed Nov 13 16:16:25 2019 -0300 perf maps: Do not use an rbtree to sort by map name This is only used for the kernel maps, shave 24 bytes out 'struct map' and just traverse the existing per ip rbtree to look for maps by name, use a front end cache to reuse the last search if its the same name. After this 'struct map' is down to just two cachelines: $ pahole -C map ~/bin/perf struct map { union { struct rb_node rb_node __attribute__((__aligned__(8))); /* 0 24 */ struct list_head node; /* 0 16 */ } __attribute__((__aligned__(8))); /* 0 24 */ u64 start; /* 24 8 */ u64 end; /* 32 8 */ _Bool erange_warned; /* 40 1 */ /* XXX 3 bytes hole, try to pack */ u32 priv; /* 44 4 */ u32 prot; /* 48 4 */ u32 flags; /* 52 4 */ u64 pgoff; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u64 reloc; /* 64 8 */ u32 maj; /* 72 4 */ u32 min; /* 76 4 */ u64 ino; /* 80 8 */ u64 ino_generation; /* 88 8 */ u64 (*map_ip)(struct map *, u64); /* 96 8 */ u64 (*unmap_ip)(struct map *, u64); /* 104 8 */ struct dso * dso; /* 112 8 */ refcount_t refcnt; /* 120 4 */ /* size: 128, cachelines: 2, members: 17 */ /* sum members: 121, holes: 1, sum holes: 3 */ /* padding: 4 */ /* forced alignments: 1 */ } __attribute__((__aligned__(8))); $ Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-bvr8fqfgzxtgnhnwt5sssx5g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bef69dd87828ef5d8ecdab8d857cd3a33cf98675 Author: Vincent Guittot Date: Mon Nov 18 14:21:19 2019 +0100 sched/cpufreq: Move the cfs_rq_util_change() call to cpufreq_update_util() update_cfs_rq_load_avg() calls cfs_rq_util_change() every time PELT decays, which might be inefficient when the cpufreq driver has rate limitation. When a task is attached on a CPU, we have this call path: update_load_avg() update_cfs_rq_load_avg() cfs_rq_util_change -- > trig frequency update attach_entity_load_avg() cfs_rq_util_change -- > trig frequency update The 1st frequency update will not take into account the utilization of the newly attached task and the 2nd one might be discarded because of rate limitation of the cpufreq driver. update_cfs_rq_load_avg() is only called by update_blocked_averages() and update_load_avg() so we can move the call to cfs_rq_util_change/cpufreq_update_util() into these two functions. It's also interesting to note that update_load_avg() already calls cfs_rq_util_change() directly for the !SMP case. This change will also ensure that cpufreq_update_util() is called even when there is no more CFS rq in the leaf_cfs_rq_list to update, but only IRQ, RT or DL PELT signals. [ mingo: Minor updates. ] Reported-by: Doug Smythies Tested-by: Doug Smythies Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Acked-by: Rafael J. Wysocki Cc: Linus Torvalds Cc: Thomas Gleixner Cc: juri.lelli@redhat.com Cc: linux-pm@vger.kernel.org Cc: mgorman@suse.de Cc: rostedt@goodmis.org Cc: sargun@sargun.me Cc: srinivas.pandruvada@linux.intel.com Cc: tj@kernel.org Cc: xiexiuqi@huawei.com Cc: xiezhipeng1@huawei.com Fixes: 039ae8bcf7a5 ("sched/fair: Fix O(nr_cgroups) in the load balancing path") Link: https://lkml.kernel.org/r/1574083279-799-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit b21feab0b865c36b24d7a60b55a10c7033b03159 Merge: a9723389cc75 af42d3466bdc Author: Ingo Molnar Date: Mon Nov 18 14:41:02 2019 +0100 Merge tag 'v5.4-rc8' into sched/core, to pick up fixes and dependencies Signed-off-by: Ingo Molnar commit a9723389cc759c891d481de271ac73eeaa123bcb Author: Vincent Guittot Date: Tue Nov 12 15:50:43 2019 +0100 sched/fair: Add comments for group_type and balancing at SD_NUMA level Add comments to describe each state of goup_type and to add some details about the load balance at NUMA level. [ Valentin Schneider: Updates to the comments. ] [ mingo: Other updates to the comments. ] Reported-by: Mel Gorman Signed-off-by: Vincent Guittot Acked-by: Valentin Schneider Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/1573570243-1903-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 450c3d4166837c496ebce03650c08800991f2150 Author: Navid Emamdoost Date: Wed Oct 2 16:52:37 2019 -0500 affs: fix a memory leak in affs_remount In affs_remount if data is provided it is duplicated into new_opts. The allocated memory for new_opts is only released if parse_options fails. There's a bit of history behind new_options, originally there was save/replace options on the VFS layer so the 'data' passed must not change (thus strdup), this got cleaned up in later patches. But not completely. There's no reason to do the strdup in cases where the filesystem does not need to reuse the 'data' again, because strsep would modify it directly. Fixes: c8f33d0bec99 ("affs: kstrdup() memory handling") Signed-off-by: Navid Emamdoost [ update changelog ] Signed-off-by: David Sterba commit 6060c07d476ebb1f21d28db5ba852e911246ce79 Author: Davidlohr Bueso Date: Sun Oct 27 15:01:43 2019 -0700 affs: Replace binary semaphores with mutexes At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal than semaphores; it's also a nicer interface for mutual exclusion, which is why they are encouraged over binary semaphores, when possible. For both i_link_lock and i_ext_lock (and hence i_hash_lock which I annotated for the hash lock mapping hackery for lockdep), their semantics imply traditional lock ownership; that is, the lock owner is the same for both lock/unlock operations and does not run in irq context. Therefore it is safe to convert. Signed-off-by: Davidlohr Bueso Signed-off-by: David Sterba commit 3318544b721d3072fdd1f85ee0f1f214c0b211ee Author: Vincent Guittot Date: Tue Oct 22 18:46:38 2019 +0200 sched/fair: Fix rework of find_idlest_group() The task, for which the scheduler looks for the idlest group of CPUs, must be discounted from all statistics in order to get a fair comparison between groups. This includes utilization, load, nr_running and idle_cpus. Such unfairness can be easily highlighted with the unixbench execl 1 task. This test continuously call execve() and the scheduler looks for the idlest group/CPU on which it should place the task. Because the task runs on the local group/CPU, the latter seems already busy even if there is nothing else running on it. As a result, the scheduler will always select another group/CPU than the local one. This recovers most of the performance regression on my system from the recent load-balancer rewrite. [ mingo: Minor cleanups. ] Reported-by: kernel test robot Tested-by: kernel test robot Signed-off-by: Vincent Guittot Cc: Linus Torvalds Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: riel@surriel.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Fixes: 57abff067a08 ("sched/fair: Rework find_idlest_group()") Link: https://lkml.kernel.org/r/1571762798-25900-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 79f6c108c87b470aacf25fc25a86f48694d03ae8 Author: Peter Ujfalusi Date: Wed Nov 13 14:47:34 2019 +0200 ASoC: pcm3168a: Add support for optional RST gpio handling In case the RST line is connected to a GPIO line it needs to be pulled high when the driver probes to be able to use the codec. Add support also for cases when more than one codec is is controlled by the same GPIO line by requesting the gpio with GPIOD_FLAGS_BIT_NONEXCLUSIVE. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113124734.27984-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit cdacc761dae1cbd6475ac79f0e732f2b1ca021e0 Author: Peter Ujfalusi Date: Wed Nov 13 14:47:33 2019 +0200 ASoC: pcm3168a: Document optional RST gpio On boards where the RST line is not pulled up, but it is connected to a GPIO line this property must present in order to be able to enable the codec. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113124734.27984-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit b1176bbb70866f24099cd2720283c7219fb4a81c Author: Chuhong Yuan Date: Mon Nov 18 15:37:07 2019 +0800 ASoC: wm5100: add missed pm_runtime_disable The driver forgets to call pm_runtime_disable in remove and probe failure. Add the calls to fix it. Signed-off-by: Chuhong Yuan Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20191118073707.28298-1-hslester96@gmail.com Signed-off-by: Mark Brown commit 2dab09be49a1e7a4dd13cb47d3a1441a2ef33a87 Author: Chuhong Yuan Date: Mon Nov 18 15:36:33 2019 +0800 ASoC: wm2200: add missed operations in remove and probe failure This driver misses calls to pm_runtime_disable and regulator_bulk_disable in remove and a call to free_irq in probe failure. Add the calls to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191118073633.28237-1-hslester96@gmail.com Signed-off-by: Mark Brown commit baddcee989931e304eeb90c101751c2f7f9b5045 Author: Vinod Koul Date: Fri Nov 15 15:57:05 2019 +0530 ASoC: qcom: q6asm-dai: add support to flac decoder Qualcomm DSPs also support the flac decoder, so add support for FLAC decoder and convert the snd_dec_flac params to qdsp format. Co-developed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20191115102705.649976-4-vkoul@kernel.org Signed-off-by: Mark Brown commit 51d2584a98942a6b4a0dfa183f4a9afcb8a04073 Author: Srinivas Kandagatla Date: Fri Nov 15 15:57:04 2019 +0530 ASoC: qcom: q6asm: add support to flac config Qualcomm DSPs expect flac config to be set for flac decoders, so add the API to program the flac config to the DSP Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20191115102705.649976-3-vkoul@kernel.org Signed-off-by: Mark Brown commit d2522335c92c090bf58531a2b696d7fe80ab2a7a Author: Vinod Koul Date: Fri Nov 15 15:57:03 2019 +0530 ALSA: compress: add flac decoder params The current design of sending codec parameters assumes that decoders will have parsers so they can parse the encoded stream for parameters and configure the decoder. But this assumption may not be universally true and we know some DSPs which do not contain the parsers so additional parameters are required to be passed. So add these parameters starting with FLAC decoder. The size of snd_codec_options is still 120 bytes after this change (due to this being a union) Co-developed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20191115102705.649976-2-vkoul@kernel.org Acked-by: Takashi Iwai Signed-off-by: Mark Brown commit cd050abeba2a95fe5374eec28ad2244617bcbab6 Author: Chuhong Yuan Date: Mon Nov 18 10:48:48 2019 +0800 spi: st-ssc4: add missed pm_runtime_disable The driver forgets to call pm_runtime_disable in probe failure and remove. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191118024848.21645-1-hslester96@gmail.com Signed-off-by: Mark Brown commit 1d7c4c115f7a835fec387d7f61767781381db5db Author: zhengbin Date: Mon Nov 18 18:59:22 2019 +0800 regulator: vexpress: Use PTR_ERR_OR_ZERO() to simplify code Fixes coccicheck warning: drivers/regulator/vexpress-regulator.c:78:1-3: WARNING: PTR_ERR_OR_ZERO can be used Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1574074762-34629-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Mark Brown commit 48914c4ecb0c0fa1d70ea7b97d758ce5fadacfb0 Author: Thierry Reding Date: Mon Nov 18 07:33:48 2019 +0100 soc/tegra: pmc: Add reset sources and levels on Tegra194 Tegra194 supports the same reset levels as Tegra186 but extends the set of reset sources. Provide custom PMC register definitions to account for the larger field for the reset sources as well as the updated list of reset sources. Signed-off-by: Thierry Reding --- Changes in v2: - use the new Tegra194 register definitions commit a3b9ed55775eb18ca9f1641f13328f479a3653cb Author: kbuild test robot Date: Thu Nov 14 23:33:04 2019 +0800 ASoC: rt5677: rt5677_check_hotword() can be static Fixes: 21c00e5df439 ("ASoC: rt5677: Enable jack detect while DSP is running") Signed-off-by: kbuild test robot Link: https://lore.kernel.org/r/20191114153304.n4pyix7qadu76tx4@4978f4969bb8 Signed-off-by: Mark Brown commit cd4a709a19d58b7805b261ceac7bef94f423e08f Author: Thierry Reding Date: Mon Nov 18 07:33:47 2019 +0100 soc/tegra: pmc: Add missing IRQ callbacks on Tegra194 Reuse the IRQ callbacks from Tegra186 on Tegra194. This fixes failures to request interrupts on Tegra194 due to the missing callbacks. Cc: Sowjanya Komatineni Fixes: aba19827fced ("soc/tegra: pmc: Support wake events on more Tegra SoCs") Signed-off-by: Thierry Reding Acked-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Thierry Reding commit dfd9d2dda8d0727bf3e1b191b6b78fb3c7b3a151 Author: Thierry Reding Date: Mon Nov 18 07:33:46 2019 +0100 soc/tegra: pmc: Use lower-case for hexadecimal literals The remainder of the file uses lower-case for hexadecimal literals, so change the only odd-one-out occurrence for consistency. Signed-off-by: Thierry Reding Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 44d13f6c2a0b739a7c4df3c478c8070320c4fd45 Author: Shuming Fan Date: Mon Nov 18 17:16:24 2019 +0800 ASoC: rt5682: fix the charge pump capacitor discharges Due to switching the HV to LV mode while stopping playback, the charge pump capacitor will be discharged to the source of the pump circuit. Therefore, this patch removed the event control. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191118091624.18699-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 030d2829f4c22e675e21904f32ab60f659174e72 Author: Dmitry Osipenko Date: Fri Nov 15 19:26:42 2019 +0300 memory: tegra30-emc: Fix panic on suspend Trying to suspend driver results in a crash if timings aren't available in device-tree. Reported-by: Jon Hunter Fixes: e34212c75a68 ("memory: tegra: Introduce Tegra30 EMC driver") Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Thierry Reding commit fe289ebb65eee604f08fd1f8ab33ded3e955a7df Merge: 7ee30bc132c6 c7b7de631246 Author: Paolo Bonzini Date: Mon Nov 18 13:16:46 2019 +0100 Merge tag 'kvm-s390-next-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: small fixes and enhancements - selftest improvements - yield improvements - cleanups commit 7da8abcf482adcc0d84ebf619f9f841058fccdb1 Author: zhengbin Date: Mon Nov 18 15:45:56 2019 +0800 staging: rtl8723bs: remove set but not used variable 'change', 'pos' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function cfg80211_rtw_change_iface: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1310:5: warning: variable change set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_set_wpa_ie: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1803:19: warning: variable pos set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1574063156-68155-6-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit eb22caade58d6da19595f7a515ca4b8fdfccb9a2 Author: zhengbin Date: Mon Nov 18 15:45:55 2019 +0800 staging: rtl8723bs: remove set but not used variable 'notify_ielen', 'notify_ie', 'notify_interval', 'notify_capability' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_inform_bss: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:248:9: warning: variable notify_ielen set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_inform_bss: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:247:6: warning: variable notify_ie set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_inform_bss: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:246:6: warning: variable notify_interval set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_inform_bss: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:245:6: warning: variable notify_capability set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1574063156-68155-5-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 17b937a9d6f7ed4aeba0b610baafccf7e730e71f Author: zhengbin Date: Mon Nov 18 15:45:54 2019 +0800 staging: rtl8723bs: remove set but not used variable 'pmlmeinfo', 'pHalData' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: In function ConstructBtNullFunctionData: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:2099:24: warning: variable pmlmeinfo set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: In function SetFwRsvdPagePkt_BTCoex: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:2154:24: warning: variable pmlmeinfo set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: In function SetFwRsvdPagePkt_BTCoex: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:2149:23: warning: variable pHalData set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1574063156-68155-4-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 68a65ab1b7f19a702679e06e5691e81ea0181a7a Author: zhengbin Date: Mon Nov 18 15:45:53 2019 +0800 staging: rtl8723bs: remove set but not used variable 'pHalData', 'pdmpriv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function rtl8723b_InitAntenna_Selection: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2237:23: warning: variable pHalData set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function rtl8723b_fill_default_txdesc: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3056:18: warning: variable pdmpriv set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1574063156-68155-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7fcd011a86dc17b57dd70276f948bacb5376022b Author: zhengbin Date: Mon Nov 18 15:45:52 2019 +0800 staging: rtl8723bs: remove set but not used variable 'pHalData', 'pregistrypriv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function sdio_AggSettingRxUpdate: drivers/staging/rtl8723bs/hal/sdio_halinit.c:578:23: warning: variable pHalData set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function rtl8723bs_hal_init: drivers/staging/rtl8723bs/hal/sdio_halinit.c:734:24: warning: variable pregistrypriv set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1574063156-68155-2-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 04254066ac76a96dfaafd730a999daa678aa59c0 Author: zhengbin Date: Mon Nov 18 15:58:21 2019 +0800 staging: rtl8192e: remove set but not used variable 'frag' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c: In function _rtl92e_process_phyinfo: drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1689:15: warning: variable frag set but not used [-Wunused-but-set-variable] It is introduced by commit 3d461c912462 ("rtl8192e: Split into two directories"), but never used, so remove it. Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1574063901-87429-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 50b2b571c5f3df721fc81bf9a12c521dfbe019ba Author: Chuhong Yuan Date: Mon Nov 18 10:48:33 2019 +0800 serial: ifx6x60: add missed pm_runtime_disable The driver forgets to call pm_runtime_disable in remove. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan Cc: stable Link: https://lore.kernel.org/r/20191118024833.21587-1-hslester96@gmail.com Signed-off-by: Greg Kroah-Hartman commit f6a196477184b99a31d16366a8e826558aa11f6d Author: Vincent Whitchurch Date: Mon Nov 18 10:25:47 2019 +0100 serial: pl011: Fix DMA ->flush_buffer() PL011's ->flush_buffer() implementation releases and reacquires the port lock. Due to a race condition here, data can end up being added to the circular buffer but neither being discarded nor being sent out. This leads to, for example, tcdrain(2) waiting indefinitely. Process A Process B uart_flush_buffer() - acquire lock - circ_clear - pl011_flush_buffer() -- release lock -- dmaengine_terminate_all() uart_write() - acquire lock - add chars to circ buffer - start_tx() -- start DMA - release lock -- acquire lock -- turn off DMA -- release lock // Data in circ buffer but DMA is off According to the comment in the code, the releasing of the lock around dmaengine_terminate_all() is to avoid a deadlock with the DMA engine callback. However, since the time this code was written, the DMA engine API documentation seems to have been clarified to say that dmaengine_terminate_all() (in the identically implemented but differently named dmaengine_terminate_async() variant) does not wait for any running complete callback to be completed and can even be called from a complete callback. So there is no possibility of deadlock if the DMA engine driver implements this API correctly. So we should be able to just remove this release and reacquire of the lock to prevent the aforementioned race condition. Signed-off-by: Vincent Whitchurch Cc: stable Link: https://lore.kernel.org/r/20191118092547.32135-1-vincent.whitchurch@axis.com Signed-off-by: Greg Kroah-Hartman commit 8530c37a70df71ea8a04fbafabba0b92f4475c6c Author: David Sterba Date: Fri Aug 30 15:42:07 2019 +0200 btrfs: get bdev from latest_dev for dio bh_result To remove use of extent_map::bdev we need to find a replacement, and the latest_bdev is the only one we can use here, because inode::i_bdev and superblock::s_bdev are NULL. The DIO code uses bdev in two places: * to read blocksize to perform alignment checks in do_blockdev_direct_IO, but we do them in btrfs code before any call to DIO * in the following call chain: do_direct_IO get_more_blocks sdio->get_block() <-- this is btrfs_get_blocks_direct subsequently the map_bh->b_dev member is used in clean_bdev_aliases and dio_new_bio to set the bio's bdev to that of the buffer_head. However, because we have provided a submit function dio_bio_submit calls our submission function and ignores the bdev. So it's safe to pass any valid bdev that's used within the filesystem. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit c3e14909d3b399d49d8dfcf3edbcd5463a7eed6f Author: David Sterba Date: Fri May 10 17:48:30 2019 +0200 btrfs: assert extent_map bdevs and lookup_map and split This is a preparatory patch for removing extent_map::bdev. There's some history behind the code so this is only precaution to catch if things break before the actual removal happens. Logically, comparing a raw low-level block device (bdev) does not make sense for extent maps (high-level objects). This had no effect in practice but was quite confusing in the code. The lookup_map is set iff EXTENT_FLAG_FS_MAPPING is set. The two pointers were stored in the same bytes and used potentially in two meanings. Now they're split, so the asserts are in place to check that the condition will not change. The lookup map pointer misused bdev, this has been changed in commit 95617d69326c ("btrfs: cleanup, stop casting for extent_map->lookup everywhere") to the explicit type. But the semantics hasn't changed and bdev was not actually used to decide if maps are mergeable. Signed-off-by: David Sterba commit 32ab3d1b4d0c55daea9ba52c0f5d1363be21bf2a Author: Johannes Thumshirn Date: Fri Oct 18 11:58:23 2019 +0200 btrfs: remove pointless indentation in btrfs_read_sys_array() Instead of checking if we've read a BTRFS_CHUNK_ITEM_KEY from disk and then process it we could just bail out early if the read disk key wasn't a BTRFS_CHUNK_ITEM_KEY. This removes a level of indentation and makes the code nicer to read. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5ae216929069507efce3caff6f5618ec919cad11 Author: Johannes Thumshirn Date: Fri Oct 18 11:58:22 2019 +0200 btrfs: reduce indentation in btrfs_may_alloc_data_chunk In btrfs_may_alloc_data_chunk() we're checking if the chunk type is of type BTRFS_BLOCK_GROUP_DATA and if it is we process it. Instead of checking if the chunk type is a BTRFS_BLOCK_GROUP_DATA chunk we can negate the check and bail out early if it isn't. This makes the code a bit more readable. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 721860d5780c64d0757a205413c7eecddfd89039 Author: Johannes Thumshirn Date: Fri Oct 18 11:58:21 2019 +0200 btrfs: remove pointless local variable in lock_stripe_add() In lock_stripe_add() we're caching the bucket for the stripe hash table just for a single call to dereference the stripe hash. If we just directly call rbio_bucket() we can safe the pointless local variable. Also move the dereferencing of the stripe hash outside of the variable declaration block to not break over the 80 characters limit. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9d6cb1b0f9dfefac9cf2f62c8582aa892770b34e Author: Johannes Thumshirn Date: Fri Oct 18 11:58:20 2019 +0200 btrfs: raid56: reduce indentation in lock_stripe_add In lock_stripe_add() we're traversing the stripe hash list and check if the current list element's raid_map equals is equal to the raid bio's raid_map. If both are equal we continue processing. If we'd check for inequality instead of equality we can reduce one level of indentation. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1d2e7c7c3ed73cc510a4dc093df2a935092ff5ad Author: David Sterba Date: Thu Oct 17 13:28:57 2019 +0200 btrfs: tracepoints: constify all pointers We don't modify the data passed to tracepoints, some of the declarations are already const, add it to the rest. Signed-off-by: David Sterba commit 94c3f6c6b804c85c91aae0494c205ec7c81ce8d1 Author: David Sterba Date: Thu Oct 17 13:28:55 2019 +0200 btrfs: tracepoints: drop typecasts from printk Remove typecasts from trace printk, adjust types and move typecast to the assignment if necessary. When assigning, the types are more obvious compared to matching the variables to the format strings. Signed-off-by: David Sterba commit bc80230e0e7bc779cd553c2326ea5b3a5bac303b Author: Nikolay Borisov Date: Fri Sep 27 13:23:18 2019 +0300 btrfs: Return offset from find_desired_extent Instead of using an input pointer parameter as the return value and have an int as the return type of find_desired_extent, rework the function to directly return the found offset. Doing that the 'ret' variable in btrfs_llseek_file can be removed. Additional (subjective) benefit is that btrfs' llseek function now resemebles those of the other major filesystems. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2034f3b470ccfd4103737cf4d2a25a52ce9ad002 Author: Nikolay Borisov Date: Fri Sep 27 13:23:17 2019 +0300 btrfs: Simplify btrfs_file_llseek Handle SEEK_END/SEEK_CUR in a single 'default' case by directly returning from generic_file_llseek. This makes the 'out' label redundant. Finally return directly the vale from vfs_setpos. No semantic changes. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit d79b7c26b12279038b8b84bfcbe7bb3e53382b3f Author: Nikolay Borisov Date: Fri Sep 27 13:23:16 2019 +0300 btrfs: Speed up btrfs_file_llseek Modifying the file position is done on a per-file basis. This renders holding the inode lock for writing useless and makes the performance of concurrent llseek's abysmal. Fix this by holding the inode for read. This provides protection against concurrent truncates and find_desired_extent already includes proper extent locking for the range which ensures proper locking against concurrent writes. SEEK_CUR and SEEK_END can be done lockessly. The former is synchronized by file::f_lock spinlock. SEEK_END is not synchronized but atomic, but that's OK since there is not guarantee that SEEK_END will always be at the end of the file in the face of tail modifications. This change brings ~82% performance improvement when doing a lot of parallel fseeks. The workload essentially does: for (d=0; d Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0cf252131361cdeebb7dfc88dd8ec825fff0956a Author: David Sterba Date: Fri Oct 4 03:09:55 2019 +0200 btrfs: compression: remove ops pointer from workspace_manager We can infer the ops from the type that is now passed to all functions that would need it, this makes workspace_manager::ops redundant and can be removed. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 1e002351605db4f2fc4114cbb973d5aead72d006 Author: David Sterba Date: Fri Oct 4 02:57:22 2019 +0200 btrfs: compression: inline free_workspace Replace indirect calls to free_workspace by switch and calls to the specific callbacks. This is mainly to get rid of the indirection due to spectre vulnerability mitigations. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit a3bbd2a9ee3c08b60b3127843866bdc76757c24f Author: David Sterba Date: Fri Oct 4 02:50:28 2019 +0200 btrfs: compression: pass type to btrfs_put_workspace We can infer the workspace_manager from type and the type will be used in the following patch to call a common helper for free_workspace. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit c778df140644142fb7e12b7e468b137721d85890 Author: David Sterba Date: Fri Oct 4 02:47:39 2019 +0200 btrfs: compression: inline alloc_workspace Replace indirect calls to alloc_workspace by switch and calls to the specific callbacks. This is mainly to get rid of the indirection due to spectre vulnerability mitigations. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 5907a9bb13cea3bbf0c54d6a9a1ccf5edebedeed Author: David Sterba Date: Fri Oct 4 02:50:28 2019 +0200 btrfs: compression: pass type to btrfs_get_workspace We can infer the workspace_manager from type and the type will be used in the following patch to call a common helper for alloc_workspace. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit bd3a5287cc20e37f1e365be1f742b6c574e3f83c Author: David Sterba Date: Fri Oct 4 02:42:03 2019 +0200 btrfs: compression: inline put_workspace Similar to get_workspace, majority of the callbacks is trivial, we don't gain anything by the indirection, so replace them by a switch function. Trivial callback implementations use the helper. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 6a0d12724bd2dd1c766769578e221ce1d10a4656 Author: David Sterba Date: Fri Oct 4 02:36:16 2019 +0200 btrfs: compression: inline get_workspace Majority of the callbacks is trivial, we don't gain anything by the indirection, so replace them by a switch function. ZLIB needs to adjust level in the callback and ZSTD workspace management is complex, the rest is call to the helper. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit d20f395f98959dee592cf05af0bec7ab5b185e5e Author: David Sterba Date: Fri Oct 4 02:21:48 2019 +0200 btrfs: compression: export alloc/free/get/put callbacks of all algos The indirect calls will be replaced by a switch in compression.c. (Switch is faster than indirect calls with when Spectre mitigations are enabled). Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 2510307e6c78d1d9a59c85164cbff66f8a9f3fed Author: David Sterba Date: Wed Oct 2 01:08:03 2019 +0200 btrfs: compression: inline cleanup_workspace_manager Replace loop calling to all algos with a list of direct calls to the cleanup manager callback. When that becomes trivial it is replaced by direct call to the helper. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 2dba714390f1ff7a8a37cc8c3b374d71d3e84af7 Author: David Sterba Date: Fri Oct 4 01:40:58 2019 +0200 btrfs: compression: let workspace manager cleanup take only the type With the access to the workspace structures, we can look it up together with the compression ops inside the workspace manager cleanup helper. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit d551703347263b7f79168e51c2f999cb883b8d65 Author: David Sterba Date: Wed Oct 2 01:08:03 2019 +0200 btrfs: compression: inline init_workspace_manager Replace loop calling to all algos with a list of direct calls to the init manager callback. When that becomes trivial it is replaced by direct call to the helper. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 975db48330c492a84d8b29b10ae55a30a03dfe0f Author: David Sterba Date: Fri Oct 4 01:40:58 2019 +0200 btrfs: compression: let workspace manager init take only the type With the access to the workspace structures, we can look it up together with the compression ops inside the workspace manager init helper. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit be951045312d963ffeacd6a566a0de87e4784af1 Author: David Sterba Date: Wed Oct 2 00:53:31 2019 +0200 btrfs: compression: attach workspace manager to the ops There's a lot of indirection when the generic code calls into algo-specific callbacks to reach the private workspace manager structure and back to the generic code. To simplify that, export the workspace manager for heuristic, LZO and ZLIB, while ZSTD is going to use it's own manager. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 1e4eb7465438e47cc3718a02d4326dd034f3c0da Author: David Sterba Date: Wed Oct 2 00:06:15 2019 +0200 btrfs: switch compression callbacks to direct calls The indirect calls bring some overhead due to spectre vulnerability mitigations. The number of cases is small and below the threshold (10-20) where indirect call would be better. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit c4bf665a3197554a696121d20f3bf11d084a6961 Author: David Sterba Date: Tue Oct 1 22:38:34 2019 +0200 btrfs: export compression and decompression callbacks Export compress_pages, decompress_bio and decompress callbacks for all compression algos. The indirect calls will be replaced by a switch. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit a60adce85f4bb5c1ef8ffcebadd702cafa2f3696 Author: Josef Bacik Date: Tue Sep 24 16:50:44 2019 -0400 btrfs: use btrfs_block_group_cache_done in update_block_group When free'ing extents in a block group we check to see if the block group is not cached, and then cache it if we need to. However we'll just carry on as long as we're loading the cache. This is problematic because we are dirtying the block group here. If we are fast enough we could do a transaction commit and clear the free space cache while we're still loading the space cache in another thread. This truncates the free space inode, which will keep it from loading the space cache. Fix this by using the btrfs_block_group_cache_done helper so that we try to load the space cache unconditionally here, which will result in the caller waiting for the fast caching to complete and keep us from truncating the free space inode. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 3797136b626ad4b6582223660c041efdea8f26b2 Author: Josef Bacik Date: Tue Sep 24 16:50:43 2019 -0400 btrfs: check page->mapping when loading free space cache While testing 5.2 we ran into the following panic [52238.017028] BUG: kernel NULL pointer dereference, address: 0000000000000001 [52238.105608] RIP: 0010:drop_buffers+0x3d/0x150 [52238.304051] Call Trace: [52238.308958] try_to_free_buffers+0x15b/0x1b0 [52238.317503] shrink_page_list+0x1164/0x1780 [52238.325877] shrink_inactive_list+0x18f/0x3b0 [52238.334596] shrink_node_memcg+0x23e/0x7d0 [52238.342790] ? do_shrink_slab+0x4f/0x290 [52238.350648] shrink_node+0xce/0x4a0 [52238.357628] balance_pgdat+0x2c7/0x510 [52238.365135] kswapd+0x216/0x3e0 [52238.371425] ? wait_woken+0x80/0x80 [52238.378412] ? balance_pgdat+0x510/0x510 [52238.386265] kthread+0x111/0x130 [52238.392727] ? kthread_create_on_node+0x60/0x60 [52238.401782] ret_from_fork+0x1f/0x30 The page we were trying to drop had a page->private, but had no page->mapping and so called drop_buffers, assuming that we had a buffer_head on the page, and then panic'ed trying to deref 1, which is our page->private for data pages. This is happening because we're truncating the free space cache while we're trying to load the free space cache. This isn't supposed to happen, and I'll fix that in a followup patch. However we still shouldn't allow those sort of mistakes to result in messing with pages that do not belong to us. So add the page->mapping check to verify that we still own this page after dropping and re-acquiring the page lock. This page being unlocked as: btrfs_readpage extent_read_full_page __extent_read_full_page __do_readpage if (!nr) unlock_page <-- nr can be 0 only if submit_extent_page returns an error CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik [ add callchain ] Signed-off-by: David Sterba commit 536870071dbc4278264f59c9a2f5f447e584d139 Author: Filipe Manana Date: Wed Oct 9 17:43:59 2019 +0100 Btrfs: fix metadata space leak on fixup worker failure to set range as delalloc In the fixup worker, if we fail to mark the range as delalloc in the io tree, we must release the previously reserved metadata, as well as update the outstanding extents counter for the inode, otherwise we leak metadata space. In pratice we can't return an error from btrfs_set_extent_delalloc(), which is just a wrapper around __set_extent_bit(), as for most errors __set_extent_bit() does a BUG_ON() (or panics which hits a BUG_ON() as well) and returning an -EEXIST error doesn't happen in this case since the exclusive bits parameter always has a value of 0 through this code path. Nevertheless, just fix the error handling in the fixup worker, in case one day __set_extent_bit() can return an error to this code path. Fixes: f3038ee3a3f101 ("btrfs: Handle btrfs_set_extent_delalloc failure in fixup worker") CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit a0e248bb502d5165b3314ac3819e888fdcdf7d9f Author: Filipe Manana Date: Fri Oct 11 16:41:20 2019 +0100 Btrfs: fix negative subv_writers counter and data space leak after buffered write When doing a buffered write it's possible to leave the subv_writers counter of the root, used for synchronization between buffered nocow writers and snapshotting. This happens in an exceptional case like the following: 1) We fail to allocate data space for the write, since there's not enough available data space nor enough unallocated space for allocating a new data block group; 2) Because of that failure, we try to go to NOCOW mode, which succeeds and therefore we set the local variable 'only_release_metadata' to true and set the root's sub_writers counter to 1 through the call to btrfs_start_write_no_snapshotting() made by check_can_nocow(); 3) The call to btrfs_copy_from_user() returns zero, which is very unlikely to happen but not impossible; 4) No pages are copied because btrfs_copy_from_user() returned zero; 5) We call btrfs_end_write_no_snapshotting() which decrements the root's subv_writers counter to 0; 6) We don't set 'only_release_metadata' back to 'false' because we do it only if 'copied', the value returned by btrfs_copy_from_user(), is greater than zero; 7) On the next iteration of the while loop, which processes the same page range, we are now able to allocate data space for the write (we got enough data space released in the meanwhile); 8) After this if we fail at btrfs_delalloc_reserve_metadata(), because now there isn't enough free metadata space, or in some other place further below (prepare_pages(), lock_and_cleanup_extent_if_need(), btrfs_dirty_pages()), we break out of the while loop with 'only_release_metadata' having a value of 'true'; 9) Because 'only_release_metadata' is 'true' we end up decrementing the root's subv_writers counter to -1 (through a call to btrfs_end_write_no_snapshotting()), and we also end up not releasing the data space previously reserved through btrfs_check_data_free_space(). As a consequence the mechanism for synchronizing NOCOW buffered writes with snapshotting gets broken. Fix this by always setting 'only_release_metadata' to false at the start of each iteration. Fixes: 8257b2dc3c1a ("Btrfs: introduce btrfs_{start, end}_nocow_write() for each subvolume") Fixes: 7ee9e4405f26 ("Btrfs: check if we can nocow if we don't have data space") 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 b929c1d8313c80f75979a3d7906a71a640eea171 Author: Marcos Paulo de Souza Date: Thu Oct 10 21:23:11 2019 -0300 btrfs: ioctl: Try to use btrfs_fs_info instead of *file Some functions are doing some unnecessary indirection to reach the btrfs_fs_info struct. Change these functions to receive a btrfs_fs_info struct instead of a *file. Reviewed-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: Marcos Paulo de Souza Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4273eaff9b8d5e141113a5bdf9628c02acf3afe5 Author: Anand Jain Date: Thu Oct 10 10:39:25 2019 +0800 btrfs: use bool argument in free_root_pointers() We don't need int argument bool shall do in free_root_pointers(). And rename the argument as it confused two people. Reviewed-by: Qu Wenruo Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit ce96b7ffd11e261ef2ecd6817b7572a77750170d Author: Chengguang Xu Date: Thu Oct 10 15:59:57 2019 +0800 btrfs: use better definition of number of compression type The compression type upper limit constant is the same as the last value and this is confusing. In order to keep coding style consistent, use BTRFS_NR_COMPRESS_TYPES as the total number that follows the idom of 'NR' being one more than the last value. Signed-off-by: Chengguang Xu Reviewed-by: David Sterba Signed-off-by: David Sterba commit b9b1a53e180e2ab4cea42c95bf344e4bf7f524e7 Author: Chengguang Xu Date: Thu Oct 10 15:59:58 2019 +0800 btrfs: use enum for extent type defines Use enum to replace macro definitions of extent types. Signed-off-by: Chengguang Xu Reviewed-by: David Sterba Signed-off-by: David Sterba commit b2cd29596469f16e2a56bcd59d6cbf7f7652131f Author: Chengguang Xu Date: Thu Oct 10 15:59:56 2019 +0800 btrfs: props: remove unnecessary hash_init() DEFINE_HASHTABLE itself has already included initialization code, we don't have to call hash_init() again, so remove it. Signed-off-by: Chengguang Xu Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8d510121bfbf87302e0594d2022c5e7d52b26f7f Author: Nikolay Borisov Date: Tue Oct 8 20:43:06 2019 +0300 btrfs: Rename btrfs_join_transaction_nolock This function is used only during the final phase of freespace cache writeout. This is necessary since using the plain btrfs_join_transaction api is deadlock prone. The deadlock looks like: T1: btrfs_commit_transaction commit_cowonly_roots btrfs_write_dirty_block_groups btrfs_wait_cache_io __btrfs_wait_cache_io btrfs_wait_ordered_range <-- Triggers ordered IO for freespace inode and blocks transaction commit until freespace cache writeout T2: <-- after T1 has triggered the writeout finish_ordered_fn btrfs_finish_ordered_io btrfs_join_transaction <--- this would block waiting for current transaction to commit, but since trans commit is waiting for this writeout to finish The special purpose functions prevents it by simply skipping the "wait for writeout" since it's guaranteed the transaction won't proceed until we are done. Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit ce6d3eb6fd5cfede81c7a3d540919f6d92faaac0 Author: Nikolay Borisov Date: Tue Oct 8 16:26:16 2019 +0300 btrfs: User assert to document transaction requirement Using an ASSERT in btrfs_pin_extent allows to more stringently observe whether the function is called under a transaction or not. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 67439dadb03ad9da45bfccb4cdb6ef6b1a7f8da9 Author: David Sterba Date: Tue Oct 8 13:28:47 2019 +0200 btrfs: opencode extent_buffer_get The helper is trivial and we can understand what the atomic_inc on something named refs does. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba commit f7bddf1e27d18fbc7d3e3056ba449cfbe4e20b0a Author: Tejun Heo Date: Thu Oct 3 07:27:13 2019 -0700 btrfs: Avoid getting stuck during cyclic writebacks During a cyclic writeback, extent_write_cache_pages() uses done_index to update the writeback_index after the current run is over. However, instead of current index + 1, it gets to to the current index itself. Unfortunately, this, combined with returning on EOF instead of looping back, can lead to the following pathlogical behavior. 1. There is a single file which has accumulated enough dirty pages to trigger balance_dirty_pages() and the writer appending to the file with a series of short writes. 2. balance_dirty_pages kicks in, wakes up background writeback and sleeps. 3. Writeback kicks in and the cursor is on the last page of the dirty file. Writeback is started or skipped if already in progress. As it's EOF, extent_write_cache_pages() returns and the cursor is set to done_index which is pointing to the last page. 4. Writeback is done. Nothing happens till balance_dirty_pages finishes, at which point we go back to #1. This can almost completely stall out writing back of the file and keep the system over dirty threshold for a long time which can mess up the whole system. We encountered this issue in production with a package handling application which can reliably reproduce the issue when running under tight memory limits. Reading the comment in the error handling section, this seems to be to avoid accidentally skipping a page in case the write attempt on the page doesn't succeed. However, this concern seems bogus. On each page, the code either: * Skips and moves onto the next page. * Fails issue and sets done_index to index + 1. * Successfully issues and continue to the next page if budget allows and not EOF. IOW, as long as it's not EOF and there's budget, the code never retries writing back the same page. Only when a page happens to be the last page of a particular run, we end up retrying the page, which can't possibly guarantee anything data integrity related. Besides, cyclic writes are only used for non-syncing writebacks meaning that there's no data integrity implication to begin with. Fix it by always setting done_index past the current page being processed. Note that this problem exists in other writepages too. CC: stable@vger.kernel.org # 4.19+ Signed-off-by: Tejun Heo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a9143bd31c6ab52f6a320a1a4254f2a2934610b1 Author: Marcos Paulo de Souza Date: Mon Oct 7 21:50:38 2019 -0300 btrfs: block-group: Rework documentation of check_system_chunk function Commit 4617ea3a52cf (" Btrfs: fix necessary chunk tree space calculation when allocating a chunk") removed the is_allocation argument from check_system_chunk, since the formula for reserving the necessary space for allocation or removing a chunk would be the same. So, rework the comment by removing the mention of is_allocation argument. Signed-off-by: Marcos Paulo de Souza Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit c06631b0d8a4236fb45667de60880b037863de56 Author: Qu Wenruo Date: Fri Oct 4 17:31:33 2019 +0800 btrfs: Enhance error output for write time tree checker Unlike read time tree checker errors, write time error can't be inspected by "btrfs inspect dump-tree", so we need extra information to determine what's going wrong. The patch will add the following output for write time tree checker error: - The content of the offending tree block To help determining if it's a false alert. - Kernel WARN_ON() for debug build This is helpful for us to detect unexpected write time tree checker error, especially fstests could catch the dmesg. Since the WARN_ON() is only triggered for write time tree checker, test cases utilizing dm-error won't trigger this WARN_ON(), thus no extra noise. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 80d7fd1e09822daf8d94d46c6f9a17e7e34cf0b4 Author: Qu Wenruo Date: Fri Oct 4 17:31:32 2019 +0800 btrfs: tree-checker: Refactor prev_key check for ino into a function Refactor the check for prev_key->objectid of the following key types into one function, check_prev_ino(): - EXTENT_DATA - INODE_REF - DIR_INDEX - DIR_ITEM - XATTR_ITEM Also add the check of prev_key for INODE_REF. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit dbb70becde5b28940366ee419e0fdd3e09af44fb Author: Chris Mason Date: Wed Jul 10 12:28:18 2019 -0700 Btrfs: extent_write_locked_range() should attach inode->i_wb extent_write_locked_range() is used when we're falling back to buffered IO from inside of compression. It allocates its own wbc and should associate it with the inode's i_wb to make sure the IO goes down from the correct cgroup. Reviewed-by: Josef Bacik Signed-off-by: Chris Mason Signed-off-by: David Sterba commit ec39f7696ccfac85b3eea41eba7d6f747ee4ce8d Author: Chris Mason Date: Wed Jul 10 12:28:17 2019 -0700 Btrfs: use REQ_CGROUP_PUNT for worker thread submitted bios Async CRCs and compression submit IO through helper threads, which means they have IO priority inversions when cgroup IO controllers are in use. This flags all of the writes submitted by btrfs helper threads as REQ_CGROUP_PUNT. submit_bio() will punt these to dedicated per-blkcg work items to avoid the priority inversion. For the compression code, we take a reference on the wbc's blkg css and pass it down to the async workers. For the async CRCs, the bio already has the correct css, we just need to tell the block layer to use REQ_CGROUP_PUNT. Reviewed-by: Josef Bacik Signed-off-by: Chris Mason Modified-and-reviewed-by: Tejun Heo Signed-off-by: David Sterba commit 1d53c9e6723022b12e4a5ed4b141f67c834b7f6f Author: Chris Mason Date: Wed Jul 10 12:28:16 2019 -0700 Btrfs: only associate the locked page with one async_chunk struct The btrfs writepages function collects a large range of pages flagged for delayed allocation, and then sends them down through the COW code for processing. When compression is on, we allocate one async_chunk structure for every 512K, and then run those pages through the compression code for IO submission. writepages starts all of this off with a single page, locked by the original call to extent_write_cache_pages(), and it's important to keep track of this page because it has already been through clear_page_dirty_for_io(). The btrfs async_chunk struct has a pointer to the locked_page, and when we're redirtying the page because compression had to fallback to uncompressed IO, we use page->index to decide if a given async_chunk struct really owns that page. But, this is racey. If a given delalloc range is broken up into two async_chunks (chunkA and chunkB), we can end up with something like this: compress_file_range(chunkA) submit_compress_extents(chunkA) submit compressed bios(chunkA) put_page(locked_page) compress_file_range(chunkB) ... Or: async_cow_submit submit_compressed_extents <--- falls back to buffered writeout cow_file_range extent_clear_unlock_delalloc __process_pages_contig put_page(locked_pages) async_cow_submit The end result is that chunkA is completed and cleaned up before chunkB even starts processing. This means we can free locked_page() and reuse it elsewhere. If we get really lucky, it'll have the same page->index in its new home as it did before. While we're processing chunkB, we might decide we need to fall back to uncompressed IO, and so compress_file_range() will call __set_page_dirty_nobufers() on chunkB->locked_page. Without cgroups in use, this creates as a phantom dirty page, which isn't great but isn't the end of the world. What can happen, it can go through the fixup worker and the whole COW machinery again: in submit_compressed_extents(): while (async extents) { ... cow_file_range if (!page_started ...) extent_write_locked_range else if (...) unlock_page continue; This hasn't been observed in practice but is still possible. With cgroups in use, we might crash in the accounting code because page->mapping->i_wb isn't set. BUG: unable to handle kernel NULL pointer dereference at 00000000000000d0 IP: percpu_counter_add_batch+0x11/0x70 PGD 66534e067 P4D 66534e067 PUD 66534f067 PMD 0 Oops: 0000 [#1] SMP DEBUG_PAGEALLOC CPU: 16 PID: 2172 Comm: rm Not tainted RIP: 0010:percpu_counter_add_batch+0x11/0x70 RSP: 0018:ffffc9000a97bbe0 EFLAGS: 00010286 RAX: 0000000000000005 RBX: 0000000000000090 RCX: 0000000000026115 RDX: 0000000000000030 RSI: ffffffffffffffff RDI: 0000000000000090 RBP: 0000000000000000 R08: fffffffffffffff5 R09: 0000000000000000 R10: 00000000000260c0 R11: ffff881037fc26c0 R12: ffffffffffffffff R13: ffff880fe4111548 R14: ffffc9000a97bc90 R15: 0000000000000001 FS: 00007f5503ced480(0000) GS:ffff880ff7200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000d0 CR3: 00000001e0459005 CR4: 0000000000360ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: account_page_cleaned+0x15b/0x1f0 __cancel_dirty_page+0x146/0x200 truncate_cleanup_page+0x92/0xb0 truncate_inode_pages_range+0x202/0x7d0 btrfs_evict_inode+0x92/0x5a0 evict+0xc1/0x190 do_unlinkat+0x176/0x280 do_syscall_64+0x63/0x1a0 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The fix here is to make asyc_chunk->locked_page NULL everywhere but the one async_chunk struct that's allowed to do things to the locked page. Link: https://lore.kernel.org/linux-btrfs/c2419d01-5c84-3fb4-189e-4db519d08796@suse.com/ Fixes: 771ed689d2cd ("Btrfs: Optimize compressed writeback and reads") Reviewed-by: Josef Bacik Signed-off-by: Chris Mason [ update changelog from mail thread discussion ] Signed-off-by: David Sterba commit ba8a9d07954397f0645cf62bcc1ef536e8e7ba24 Author: Chris Mason Date: Wed Jul 10 12:28:15 2019 -0700 Btrfs: delete the entire async bio submission framework Now that we're not using btrfs_schedule_bio() anymore, delete all the code that supported it. Reviewed-by: Josef Bacik Reviewed-by: Nikolay Borisov Signed-off-by: Chris Mason Reviewed-by: David Sterba Signed-off-by: David Sterba commit 08635bae0b4ceb08fe4c156a11c83baec397d36d Author: Chris Mason Date: Wed Jul 10 12:28:14 2019 -0700 Btrfs: stop using btrfs_schedule_bio() btrfs_schedule_bio() hands IO off to a helper thread to do the actual submit_bio() call. This has been used to make sure async crc and compression helpers don't get stuck on IO submission. To maintain good performance, over time the IO submission threads duplicated some IO scheduler characteristics such as high and low priority IOs and they also made some ugly assumptions about request allocation batch sizes. All of this cost at least one extra context switch during IO submission, and doesn't fit well with the modern blkmq IO stack. So, this commit stops using btrfs_schedule_bio(). We may need to adjust the number of async helper threads for crcs and compression, but long term it's a better path. Reviewed-by: Josef Bacik Reviewed-by: Nikolay Borisov Signed-off-by: Chris Mason Reviewed-by: David Sterba Signed-off-by: David Sterba commit e1f60a6580c04d0d2492bb6034e968b8c29c78cf Author: David Sterba Date: Tue Oct 1 19:57:39 2019 +0200 btrfs: add __pure attribute to functions The attribute is more relaxed than const and the functions could dereference pointers, as long as the observable state is not changed. We do have such functions, based on -Wsuggest-attribute=pure . The visible effects of this patch are negligible, there are differences in the assembly but hard to summarize. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 4143cb8b6f00910e73a7503fd922211b9f08cf48 Author: David Sterba Date: Tue Oct 1 19:57:37 2019 +0200 btrfs: add const function attribute For some reason the attribute is called __attribute_const__ and not __const, marks functions that have no observable effects on program state, IOW not reading pointers, just the arguments and calculating a value. Allows the compiler to do some optimizations, based on -Wsuggest-attribute=const . The effects are rather small, though, about 60 bytes decrese of btrfs.ko. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit b105e92755b448efd4800e3415dfeae5ad8054e9 Author: David Sterba Date: Tue Oct 1 19:57:35 2019 +0200 btrfs: add __cold attribute to more functions The attribute can mark functions supposed to be called rarely if at all and the text can be moved to sections far from the other code. The attribute has been added to several functions already, this patch is based on hints given by gcc -Wsuggest-attribute=cold. The net effect of this patch is decrease of btrfs.ko by 1000-1300, depending on the config options. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 4c66e0d4243bb8829f2c936e966030d967726e90 Author: David Sterba Date: Thu Oct 3 19:09:35 2019 +0200 btrfs: drop unused parameter is_new from btrfs_iget The parameter is now always set to NULL and could be dropped. The last user was get_default_root but that got reworked in 05dbe6837b60 ("Btrfs: unify subvol= and subvolid= mounting") and the parameter became unused. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit baf320b9d531f1cfbf64c60dd155ff80a58b3796 Author: Josef Bacik Date: Thu Sep 26 08:29:32 2019 -0400 btrfs: use refcount_inc_not_zero in kill_all_nodes We hit the following warning while running down a different problem [ 6197.175850] ------------[ cut here ]------------ [ 6197.185082] refcount_t: underflow; use-after-free. [ 6197.194704] WARNING: CPU: 47 PID: 966 at lib/refcount.c:190 refcount_sub_and_test_checked+0x53/0x60 [ 6197.521792] Call Trace: [ 6197.526687] __btrfs_release_delayed_node+0x76/0x1c0 [ 6197.536615] btrfs_kill_all_delayed_nodes+0xec/0x130 [ 6197.546532] ? __btrfs_btree_balance_dirty+0x60/0x60 [ 6197.556482] btrfs_clean_one_deleted_snapshot+0x71/0xd0 [ 6197.566910] cleaner_kthread+0xfa/0x120 [ 6197.574573] kthread+0x111/0x130 [ 6197.581022] ? kthread_create_on_node+0x60/0x60 [ 6197.590086] ret_from_fork+0x1f/0x30 [ 6197.597228] ---[ end trace 424bb7ae00509f56 ]--- This is because the free side drops the ref without the lock, and then takes the lock if our refcount is 0. So you can have nodes on the tree that have a refcount of 0. Fix this by zero'ing out that element in our temporary array so we don't try to kill it again. CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add comment ] Signed-off-by: David Sterba commit aa6c0df73e3b3fc771d8d8469eb81537f4b46a45 Author: Anand Jain Date: Wed Oct 2 18:30:48 2019 +0800 btrfs: print process name and pid that calls device scanning Its very helpful if we had logged the device scanner process name to debug the race condition between the systemd-udevd scan and the user initiated device forget command. This patch adds process name and pid to the scan message. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ add pid to the message ] Signed-off-by: David Sterba commit 725af92a62511aee68216438192041135bf14238 Author: Nikolay Borisov Date: Fri Aug 30 17:44:49 2019 +0300 btrfs: Open-code name_in_log_ref in replay_one_name That function adds unnecessary indirection between backref_in_log and the caller. Furthermore it also "downgrades" backref_in_log's return value to a boolean, when in fact it could very well be an error. Rectify the situation by simply opencoding name_in_log_ref in replay_one_name and properly handling possible return codes from backref_in_log. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ update comment ] Signed-off-by: David Sterba commit d3316c8233bb05e0dd855d30aac347bb8ad76ee4 Author: Nikolay Borisov Date: Wed Sep 25 14:03:03 2019 +0300 btrfs: Properly handle backref_in_log retval This function can return a negative error value if btrfs_search_slot errors for whatever reason or if btrfs_alloc_path runs out of memory. This is currently problemattic because backref_in_log is treated by its callers as if it returns boolean. Fix this by adding proper error handling in callers. That also enables the function to return the direct error code from btrfs_search_slot. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 89cbf5f6b6c2a5f0ac7cb83c8b3fd97eadba0d11 Author: Nikolay Borisov Date: Fri Aug 30 17:44:47 2019 +0300 btrfs: Don't opencode btrfs_find_name_in_backref in backref_in_log Direct replacement, though note that the inside of the loop in btrfs_find_name_in_backref is organized in a slightly different way but is equvalent. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ add changelog ] Signed-off-by: David Sterba commit 3296bf562443a8ca35aaad959a76a49e9b412760 Author: Qu Wenruo Date: Thu Aug 22 15:25:00 2019 +0800 btrfs: transaction: Cleanup unused TRANS_STATE_BLOCKED The state was introduced in commit 4a9d8bdee368 ("Btrfs: make the state of the transaction more readable"), then in commit 302167c50b32 ("btrfs: don't end the transaction for delayed refs in throttle") the state is completely removed. So we can just clean up the state since it's only compared but never set. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 61c047b541b56f4ec78886e9d695e0a3bbcd3834 Author: Qu Wenruo Date: Thu Aug 22 15:24:59 2019 +0800 btrfs: transaction: describe transaction states and transitions Add an overview of the basic btrfs transaction transitions, including the following states: - No transaction states - Transaction N [[TRANS_STATE_RUNNING]] - Transaction N [[TRANS_STATE_COMMIT_START]] - Transaction N [[TRANS_STATE_COMMIT_DOING]] - Transaction N [[TRANS_STATE_UNBLOCKED]] - Transaction N [[TRANS_STATE_COMPLETED]] For each state, the comment will include: - Basic explaination about current state - How to go next stage - What will happen if we call various start_transaction() functions - Relationship to transaction N+1 This doesn't provide tech details, but serves as a cheat sheet for reader to get into the code a little easier. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c1499166d10ae734b5ec5cc7982bd9b9ee7f9fe6 Author: David Sterba Date: Tue Oct 1 19:44:42 2019 +0200 btrfs: use has_single_bit_set for clarity Replace is_power_of_2 with the helper that is self-documenting and remove the open coded call in alloc_profile_is_valid. Signed-off-by: David Sterba commit 79c8264e443471eb2748c93680acce54d14d2225 Author: David Sterba Date: Tue Oct 1 19:40:15 2019 +0200 btrfs: add 64bit safe helper for power of two checks As is_power_of_two takes unsigned long, it's not safe on 32bit architectures, but we could pass any u64 value in seveal places. Add a separate helper and also an alias that better expresses the purpose for which the helper is used. Signed-off-by: David Sterba commit e62869be1ed7569bf12a5dc28c5b7ee5823f9cf3 Author: Anand Jain Date: Wed Sep 25 14:29:28 2019 +0800 btrfs: balance: use term redundancy instead of integrity in message When balance reduces the number of copies of metadata, it reduces the redundancy, use the term redundancy instead of integrity. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1f95ec012cb4a3fabfef3efd9ba0b59e14ce48ce Author: David Sterba Date: Tue Sep 24 19:17:17 2019 +0200 btrfs: move btrfs_unlock_up_safe to other locking functions The function belongs to the family of locking functions, so move it there. The 'noinline' keyword is dropped as it's now an exported function that does not need it. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit ed2b1d36a9d027f9b841be5bfc9d61011462d447 Author: David Sterba Date: Tue Sep 24 19:17:17 2019 +0200 btrfs: move btrfs_set_path_blocking to other locking functions The function belongs to the family of locking functions, so move it there. The 'noinline' keyword is dropped as it's now an exported function that does not need it. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 31f6e769ce4145fdfaba44ad7c5b30ad21f58c11 Author: David Sterba Date: Tue Sep 24 18:44:24 2019 +0200 btrfs: make btrfs_assert_tree_locked static inline The function btrfs_assert_tree_locked is used outside of the locking code so it is exported, however we can make it static inine as it's fairly trivial. This is the only locking assertion used in release builds, inlining improves the text size by 174 bytes and reduces stack consumption in the callers. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit d6156218bec93965b6a43ba2686ad962ce77c854 Author: David Sterba Date: Tue Sep 24 18:29:10 2019 +0200 btrfs: make locking assertion helpers static inline I've noticed that none of the btrfs_assert_*lock* debugging helpers is inlined, despite they're short and mostly a value update. Making them inline shaves 67 from the text size, reduces stack consumption and perhaps also slightly improves the performance due to avoiding unnecessary calls. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit c9eb55db8439057165f106164622c146cdd59468 Author: Omar Sandoval Date: Mon Sep 16 11:30:58 2019 -0700 btrfs: get rid of pointless wtag variable in async-thread.c Commit ac0c7cf8be00 ("btrfs: fix crash when tracepoint arguments are freed by wq callbacks") added a void pointer, wtag, which is passed into trace_btrfs_all_work_done() instead of the freed work item. This is silly for a few reasons: 1. The freed work item still has the same address. 2. work is still in scope after it's freed, so assigning wtag doesn't stop anyone from using it. 3. The tracepoint has always taken a void * argument, so assigning wtag doesn't actually make things any more type-safe. (Note that the original bug in commit bc074524e123 ("btrfs: prefix fsid to all trace events") was that the void * was implicitly casted when it was passed to btrfs_work_owner() in the trace point itself). Instead, let's add some clearer warnings as comments. Reviewed-by: Nikolay Borisov Reviewed-by: Filipe Manana Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit a0cac0ec961f0d42828eeef196ac2246a2f07659 Author: Omar Sandoval Date: Mon Sep 16 11:30:57 2019 -0700 btrfs: get rid of unique workqueue helper functions Commit 9e0af2376434 ("Btrfs: fix task hang under heavy compressed write") worked around the issue that a recycled work item could get a false dependency on the original work item due to how the workqueue code guarantees non-reentrancy. It did so by giving different work functions to different types of work. However, the fixes in the previous few patches are more complete, as they prevent a work item from being recycled at all (except for a tiny window that the kernel workqueue code handles for us). This obsoletes the previous fix, so we don't need the unique helpers for correctness. The only other reason to keep them would be so they show up in stack traces, but they always seem to be optimized to a tail call, so they don't show up anyways. So, let's just get rid of the extra indirection. While we're here, rename normal_work_helper() to the more informative btrfs_work_helper(). Reviewed-by: Nikolay Borisov Reviewed-by: Filipe Manana Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit 57d4f0b863272ba04ba85f86bfdc0f976f0af91c Author: Omar Sandoval Date: Mon Sep 16 11:30:56 2019 -0700 btrfs: don't prematurely free work in scrub_missing_raid56_worker() Currently, scrub_missing_raid56_worker() puts and potentially frees sblock (which embeds the work item) and then submits a bio through scrub_wr_submit(). This is another potential instance of the bug in "btrfs: don't prematurely free work in run_ordered_work()". Fix it by dropping the reference after we submit the bio. Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit e732fe95e4cad35fc1df278c23a32903341b08b3 Author: Omar Sandoval Date: Mon Sep 16 11:30:55 2019 -0700 btrfs: don't prematurely free work in reada_start_machine_worker() Currently, reada_start_machine_worker() frees the reada_machine_work and then calls __reada_start_machine() to do readahead. This is another potential instance of the bug in "btrfs: don't prematurely free work in run_ordered_work()". There _might_ already be a deadlock here: reada_start_machine_worker() can depend on itself through stacked filesystems (__read_start_machine() -> reada_start_machine_dev() -> reada_tree_block_flagged() -> read_extent_buffer_pages() -> submit_one_bio() -> btree_submit_bio_hook() -> btrfs_map_bio() -> submit_stripe_bio() -> submit_bio() onto a loop device can trigger readahead on the lower filesystem). Either way, let's fix it by freeing the work at the end. Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9be490f1e15c34193b1aae17da58e14dd9f55a95 Author: Omar Sandoval Date: Mon Sep 16 11:30:54 2019 -0700 btrfs: don't prematurely free work in end_workqueue_fn() Currently, end_workqueue_fn() frees the end_io_wq entry (which embeds the work item) and then calls bio_endio(). This is another potential instance of the bug in "btrfs: don't prematurely free work in run_ordered_work()". In particular, the endio call may depend on other work items. For example, btrfs_end_dio_bio() can call btrfs_subio_endio_read() -> __btrfs_correct_data_nocsum() -> dio_read_error() -> submit_dio_repair_bio(), which submits a bio that is also completed through a end_workqueue_fn() work item. However, __btrfs_correct_data_nocsum() waits for the newly submitted bio to complete, thus it depends on another work item. This example currently usually works because we use different workqueue helper functions for BTRFS_WQ_ENDIO_DATA and BTRFS_WQ_ENDIO_DIO_REPAIR. However, it may deadlock with stacked filesystems and is fragile overall. The proper fix is to free the work item at the very end of the work function, so let's do that. Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit c495dcd6fbe1dce51811a76bb85b4675f6494938 Author: Omar Sandoval Date: Mon Sep 16 11:30:53 2019 -0700 btrfs: don't prematurely free work in run_ordered_work() We hit the following very strange deadlock on a system with Btrfs on a loop device backed by another Btrfs filesystem: 1. The top (loop device) filesystem queues an async_cow work item from cow_file_range_async(). We'll call this work X. 2. Worker thread A starts work X (normal_work_helper()). 3. Worker thread A executes the ordered work for the top filesystem (run_ordered_work()). 4. Worker thread A finishes the ordered work for work X and frees X (work->ordered_free()). 5. Worker thread A executes another ordered work and gets blocked on I/O to the bottom filesystem (still in run_ordered_work()). 6. Meanwhile, the bottom filesystem allocates and queues an async_cow work item which happens to be the recently-freed X. 7. The workqueue code sees that X is already being executed by worker thread A, so it schedules X to be executed _after_ worker thread A finishes (see the find_worker_executing_work() call in process_one_work()). Now, the top filesystem is waiting for I/O on the bottom filesystem, but the bottom filesystem is waiting for the top filesystem to finish, so we deadlock. This happens because we are breaking the workqueue assumption that a work item cannot be recycled while it still depends on other work. Fix it by waiting to free the work item until we are done with all of the related ordered work. P.S.: One might ask why the workqueue code doesn't try to detect a recycled work item. It actually does try by checking whether the work item has the same work function (find_worker_executing_work()), but in our case the function is the same. This is the only key that the workqueue code has available to compare, short of adding an additional, layer-violating "custom key". Considering that we're the only ones that have ever hit this, we should just play by the rules. Unfortunately, we haven't been able to create a minimal reproducer other than our full container setup using a compress-force=zstd filesystem on top of another compress-force=zstd filesystem. Suggested-by: Tejun Heo Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit cdc6f1668e1f41b9fbdb0ae075b789c5fa0bec4b Author: Omar Sandoval Date: Mon Sep 16 11:30:52 2019 -0700 btrfs: get rid of unnecessary memset() of work item Commit fc97fab0ea59 ("btrfs: Replace fs_info->qgroup_rescan_worker workqueue with btrfs_workqueue.") converted qgroup_rescan_work to be initialized with btrfs_init_work(), but it left behind an unnecessary memset(). Get rid of the memset(). Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit b3f167aa6c7053b87fa53364fc40dd4757f053c9 Author: Josef Bacik Date: Mon Sep 23 10:05:21 2019 -0400 btrfs: move the failrec tree stuff into extent-io-tree.h This needs to be cleaned up in the future, but for now it belongs to the extent-io-tree stuff since it uses the internal tree search code. Needed to export get_state_failrec and set_state_failrec as well since we're not going to move the actual IO part of the failrec stuff out at this point. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 083e75e7e6a9e24b041ed9cc668dc7a500e31919 Author: Josef Bacik Date: Mon Sep 23 10:05:20 2019 -0400 btrfs: export find_delalloc_range This utilizes internal stuff to the extent_io_tree, so we need to export it before we move it. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9c7d3a548331e72ba3613eaa5c8a74839462b764 Author: Josef Bacik Date: Mon Sep 23 10:05:19 2019 -0400 btrfs: move extent_io_tree defs to their own header extent_io.c/h are huge, encompassing a bunch of different things. The extent_io_tree code can live on its own, so separate this out. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6f0d04f8e72e1c7fd17e7fac0fea82553a6443b4 Author: Josef Bacik Date: Mon Sep 23 10:05:18 2019 -0400 btrfs: separate out the extent io init function We are moving extent_io_tree into it's on file, so separate out the extent_state init stuff from extent_io_tree_init(). Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 33ca832fefa5ebf66df983783522c888b851fbe4 Author: Josef Bacik Date: Mon Sep 23 10:05:17 2019 -0400 btrfs: separate out the extent leak code We check both extent buffer and extent state leaks in the same function, separate these two functions out so we can move them around. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 34ffafdba12eee3e387694edd128e954fd355e8e Author: Qu Wenruo Date: Tue Sep 10 15:40:19 2019 +0800 btrfs: ctree: Remove stray comment of setting up path lock The following comment shows up in btrfs_search_slot() with out much sense: /* * setup the path here so we can release it under lock * contention with the cow code */ if (cow) { /* code touching path->lock[] is far away from here */ } This comment hasn't been cleaned up after the relevant code has been removed. The original code is introduced in commit 65b51a009e29 ("btrfs_search_slot: reduce lock contention by cowing in two stages"): + + /* + * setup the path here so we can release it under lock + * contention with the cow code + */ + p->nodes[level] = b; + if (!p->skip_locking) + p->locks[level] = 1; + But in current code, we have different timing for modifying path lock, so just remove the comment. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit abe9339d69bd096e2020ffc39fedee2ac0a9c03b Author: Qu Wenruo Date: Tue Sep 10 15:40:18 2019 +0800 btrfs: ctree: Reduce one indent level for btrfs_search_old_slot() Similar to btrfs_search_slot() done in previous patch, make a shortcut for the level 0 case and allow to reduce indentation for the remaining case. Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit f624d976081d371b3dea65935501d8d9f142d5df Author: Qu Wenruo Date: Tue Sep 10 15:40:17 2019 +0800 btrfs: ctree: Reduce one indent level for btrfs_search_slot() In btrfs_search_slot(), we something like: if (level != 0) { /* Do search inside tree nodes*/ } else { /* Do search inside tree leaves */ goto done; } This caused extra indent for tree node search code. Change it to something like: if (level == 0) { /* Do search inside tree leaves */ goto done' } /* Do search inside tree nodes */ So we have more space to maneuver our code, this is especially useful as the tree nodes search code is more complex than the leaves search code. Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 71bf92a9b8777635fede96eb4ab3b5b7bf310159 Author: Qu Wenruo Date: Mon Aug 26 15:40:39 2019 +0800 btrfs: tree-checker: Add check for INODE_REF For INODE_REF we will check: - Objectid (ino) against previous key To detect missing INODE_ITEM. - No overflow/padding in the data payload Much like DIR_ITEM, but with less members to check. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c18679ebd86857d4dae5a7462f38c4c98d8445de Author: Qu Wenruo Date: Mon Aug 26 15:40:38 2019 +0800 btrfs: tree-checker: Try to detect missing INODE_ITEM For the following items, key->objectid is inode number: - DIR_ITEM - DIR_INDEX - XATTR_ITEM - EXTENT_DATA - INODE_REF So in the subvolume tree, such items must have its previous item share the same objectid, e.g.: (257 INODE_ITEM 0) (257 DIR_INDEX xxx) (257 DIR_ITEM xxx) (258 INODE_ITEM 0) (258 INODE_REF 0) (258 XATTR_ITEM 0) (258 EXTENT_DATA 0) But if we have the following sequence, then there is definitely something wrong, normally some INODE_ITEM is missing, like: (257 INODE_ITEM 0) (257 DIR_INDEX xxx) (257 DIR_ITEM xxx) (258 XATTR_ITEM 0) <<< objecitd suddenly changed to 258 (258 EXTENT_DATA 0) So just by checking the previous key for above inode based key types, we can detect a missing inode item. For INODE_REF key type, the check will be added along with INODE_REF checker. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit b9fae2ebee0cc3a16e1b61fa397099886886e906 Author: Filipe Manana Date: Wed Sep 11 17:42:38 2019 +0100 Btrfs: make btrfs_wait_extents() static It's not used ouside of transaction.c Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 35b814f3c53e0635cbb1de3ea5d58776eafe8e20 Author: Nikolay Borisov Date: Thu Sep 12 18:31:44 2019 +0300 btrfs: Add assert to catch nested transaction commit A recent patch to btrfs showed that there was at least 1 case where a nested transaction was committed. Nested transaction in this case means a code which has a transaction handle calls some function which in turn obtains a copy of the same transaction handle. In such cases the correct thing to do is for the lower callee to call btrfs_end_transaction which contains appropriate checks so as to not commit the transaction which will result in stale trans handler for the caller. To catch such cases add an assert in btrfs_commit_transaction ensuring btrfs_trans_handle::use_count is always 1. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9cf35f673583ccc9f3e2507498b3079d56614ad3 Author: Goldwyn Rodrigues Date: Wed Sep 11 11:45:15 2019 -0500 btrfs: simplify inode locking for RWF_NOWAIT This is similar to 942491c9e6d6 ("xfs: fix AIM7 regression"). Apparently our current rwsem code doesn't like doing the trylock, then lock for real scheme. This causes extra contention on the lock and can be measured eg. by AIM7 benchmark. So change our read/write methods to just do the trylock for the RWF_NOWAIT case. Fixes: edf064e7c6fe ("btrfs: nowait aio support") Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit 65cc8bf99349f651a0a2cee69333525fe581f306 Author: Oliver Neukum Date: Thu Nov 14 12:27:58 2019 +0100 USB: documentation: flags on usb-storage versus UAS Document which flags work storage, UAS or both Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20191114112758.32747-4-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 335cbbd5762d5e5c67a8ddd6e6362c2aa42a328f Author: Oliver Neukum Date: Thu Nov 14 12:27:57 2019 +0100 USB: uas: heed CAPACITY_HEURISTICS There is no need to ignore this flag. We should be as close to storage in that regard as makes sense, so honor flags whose cost is tiny. Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20191114112758.32747-3-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit bff000cae1eec750d62e265c4ba2db9af57b17e1 Author: Oliver Neukum Date: Thu Nov 14 12:27:56 2019 +0100 USB: uas: honor flag to avoid CAPACITY16 Copy the support over from usb-storage to get feature parity Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20191114112758.32747-2-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 6351653febbb784d86fdf83afe41f7523a61b392 Author: Nagarjuna Kristam Date: Mon Nov 4 14:54:30 2019 +0530 usb: host: xhci-tegra: Correct phy enable sequence XUSB phy needs to be enabled before un-powergating the power partitions. However in the current sequence, it happens opposite. Correct the phy enable and powergating partition sequence to avoid any boot hangs. Signed-off-by: Nagarjuna Kristam Cc: stable Signed-off-by: Jui Chang Kuo Tested-by: Jon Hunter Acked-by: Thierry Reding Link: https://lore.kernel.org/r/1572859470-7823-1-git-send-email-nkristam@nvidia.com Signed-off-by: Greg Kroah-Hartman commit b38bcc8e12062452ae86158a3bbc4235fd395d91 Merge: 347bc8cb2638 4d6141288c33 Author: Greg Kroah-Hartman Date: Mon Nov 18 12:29:13 2019 +0100 Merge tag 'usb-ci-v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: - Improve the Vbus handler - Improve the HSIC handler for i.mx serial SoC - Some other tiny changes * tag 'usb-ci-v5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: imx: pinctrl for HSIC is optional usb: chipidea: imx: refine the error handling for hsic usb: chipidea: imx: change hsic power regulator as optional usb: chipidea: imx: check data->usbmisc_data against NULL before access usb: chipidea: core: change vbus-regulator as optional usb: chipidea: imx: enable vbus and id wakeup only for OTG events usb: chipidea: udc: protect usb interrupt enable usb: chipidea: udc: add new API ci_hdrc_gadget_connect commit b020aa9d1e875c1c91b1390acdf42320e7060d84 Author: Christophe Leroy Date: Thu Aug 29 08:45:13 2019 +0000 powerpc: cleanup hw_irq.h SET_MSR_EE() is just use in this file and doesn't provide any added value compared to mtmsr(). Drop it. Add a wrtee() inline function to use wrtee/wrteei insn. Replace #ifdefs by IS_ENABLED() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a28a20514d5f6df9629c1a117b667e48c4272736.1567068137.git.christophe.leroy@c-s.fr commit 44448640dd0df98891c5ea4695d89a4972cb4c1f Author: Christophe Leroy Date: Thu Aug 29 08:45:12 2019 +0000 powerpc: permanently include 8xx registers in reg.h Most 8xx registers have specific names, so just include reg_8xx.h all the time in reg.h in order to have them defined even when CONFIG_PPC_8xx is not selected. This will avoid the need for #ifdefs in C code. Guard SPRN_ICTRL in an #ifdef CONFIG_PPC_8xx as this register has same name but different meaning and different spr number as another register in the mpc7450. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/dd82934ad91aab607d0eb7e626c14e6ac0d654eb.1567068137.git.christophe.leroy@c-s.fr commit b06174345f6e70200916136695514e0b6b95ac17 Author: Christophe Leroy Date: Wed Aug 28 13:42:01 2019 +0000 powerpc/reg: use ASM_FTR_IFSET() instead of opencoding fixup. mftb() includes a feature fixup for CELL ppc. Use ASM_FTR_IFSET() macro instead of opencoding the setup of the fixup sections. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ac19713826fa55e9e7bfe3100c5a7b1712ab9526.1566999711.git.christophe.leroy@c-s.fr commit a2227a27774328507a5c2335a6dd600c079d1ff5 Author: Christophe Leroy Date: Fri Aug 23 09:56:21 2019 +0000 powerpc/32: Don't populate page tables for block mapped pages except on the 8xx. Commit d2f15e0979ee ("powerpc/32: always populate page tables for Abatron BDI.") wrongly sets page tables for any PPC32 for using BDI, and does't update them after init (remove RX on init section, set text and rodata read-only) Only the 8xx requires page tables to be populated for using the BDI. They also need to be populated in order to see the mappings in /sys/kernel/debug/kernel_page_tables On BOOK3S_32, pages that are not mapped by page tables are mapped by BATs. The BDI knows BATs and they can be viewed in /sys/kernel/debug/powerpc/block_address_translation Only set pagetables for RAM and IMMR on the 8xx and properly update them at the end of init. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c8610942203e0d93fcb02ad20c57edd3adb4c9d3.1566554029.git.christophe.leroy@c-s.fr commit 46ddcb3950a28c0df4815e8dbb8d4b91d5d9f22d Author: Christophe Leroy Date: Wed Aug 21 15:21:55 2019 +0000 powerpc/mm: Show if a bad page fault on data is read or write. DSISR (or ESR on some CPUs) has a bit to tell if the fault is due to a read or a write. Display it. Signed-off-by: Christophe Leroy Reviewed-by: Santosh Sivaraj Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4f88d7e6fda53b5f80a71040ab400242f6c8cb93.1566400889.git.christophe.leroy@c-s.fr commit c4028fa2daa059ac9231ab3a4f57cbae814b3625 Author: Christophe Leroy Date: Wed Aug 21 10:13:32 2019 +0000 powerpc/mm: drop #ifdef CONFIG_MMU in is_ioremap_addr() powerpc always selects CONFIG_MMU and CONFIG_MMU is not checked anywhere else in powerpc code. Drop the #ifdef and the alternative part of is_ioremap_addr() Fixes: 9bd3bb6703d8 ("mm/nvdimm: add is_ioremap_addr and use that to check ioremap address") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/de395e444fb8dd7a6365c3314d78e15ebb3d7d1b.1566382245.git.christophe.leroy@c-s.fr commit 43f003bb74b9b27da6e719cfc2f7630f5652665a Author: Christophe Leroy Date: Mon Aug 19 13:06:30 2019 +0000 powerpc: Refactor BUG/WARN macros BUG(), WARN() and friends are using a similar inline assembly to implement various traps with various flags. Lets refactor via a new BUG_ENTRY() macro. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c19a82b37677ace0eebb0dc8c2120373c29c8dd1.1566219503.git.christophe.leroy@c-s.fr commit 98ba8e801322aed3a683252f36fb50d960cc0830 Merge: 0695f8bca93e a76bea0287ce Author: Michael Ellerman Date: Mon Nov 18 22:26:59 2019 +1100 Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next Merge changes from Scott: Includes a couple of device tree fixes, a spelling fix, and leftover code cleanup. commit 347bc8cb26388791c5881a3775cb14a3f765a674 Author: Greg Kroah-Hartman Date: Mon Nov 18 10:21:19 2019 +0100 usb-serial: cp201x: support Mark-10 digital force gauge Add support for the Mark-10 digital force gauge device to the cp201x driver. Based on a report and a larger patch from Joel Jennings Reported-by: Joel Jennings Cc: stable Acked-by: Johan Hovold Link: https://lore.kernel.org/r/20191118092119.GA153852@kroah.com Signed-off-by: Greg Kroah-Hartman commit ee7b0d31f9f0192619a978b315abdb86beb27fdd Author: Hans de Goede Date: Tue Nov 12 15:17:11 2019 +0100 platform/x86: touchscreen_dmi: Add info for the ezpad 6 m4 tablet Add touchscreen info for the Jumper EZpad 6 m4 tablet. Reported-and-tested-by: youling257 Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit b97e12e594eb3d0fba35c99a83fef56ff692048b Merge: 2893c996d8ae 5051b384523b Author: Daniel Borkmann Date: Mon Nov 18 11:42:00 2019 +0100 Merge branch 'bpf-array-mmap' Andrii Nakryiko says: ==================== This patch set adds ability to memory-map BPF array maps (single- and multi-element). The primary use case is memory-mapping BPF array maps, created to back global data variables, created by libbpf implicitly. This allows for much better usability, along with avoiding syscalls to read or update data completely. Due to memory-mapping requirements, BPF array map that is supposed to be memory-mapped, has to be created with special BPF_F_MMAPABLE attribute, which triggers slightly different memory allocation strategy internally. See patch 1 for details. Libbpf is extended to detect kernel support for this flag, and if supported, will specify it for all global data maps automatically. Patch #1 refactors bpf_map_inc() and converts bpf_map's refcnt to atomic64_t to make refcounting never fail. Patch #2 does similar refactoring for bpf_prog_add()/bpf_prog_inc(). v5->v6: - add back uref counting (Daniel); v4->v5: - change bpf_prog's refcnt to atomic64_t (Daniel); v3->v4: - add mmap's open() callback to fix refcounting (Johannes); - switch to remap_vmalloc_pages() instead of custom fault handler (Johannes); - converted bpf_map's refcnt/usercnt into atomic64_t; - provide default bpf_map_default_vmops handling open/close properly; v2->v3: - change allocation strategy to avoid extra pointer dereference (Jakub); v1->v2: - fix map lookup code generation for BPF_F_MMAPABLE case; - prevent BPF_F_MMAPABLE flag for all but plain array map type; - centralize ref-counting in generic bpf_map_mmap(); - don't use uref counting (Alexei); - use vfree() directly; - print flags with %x (Song); - extend tests to verify bpf_map_{lookup,update}_elem() logic as well. ==================== Signed-off-by: Daniel Borkmann commit 5051b384523be92925d13694fabbc6bedf2f907b Author: Andrii Nakryiko Date: Sun Nov 17 09:28:06 2019 -0800 selftests/bpf: Add BPF_TYPE_MAP_ARRAY mmap() tests Add selftests validating mmap()-ing BPF array maps: both single-element and multi-element ones. Check that plain bpf_map_update_elem() and bpf_map_lookup_elem() work correctly with memory-mapped array. Also convert CO-RE relocation tests to use memory-mapped views of global data. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191117172806.2195367-6-andriin@fb.com commit 7fe74b436236b17ac57e46527166d22bcc230175 Author: Andrii Nakryiko Date: Sun Nov 17 09:28:05 2019 -0800 libbpf: Make global data internal arrays mmap()-able, if possible Add detection of BPF_F_MMAPABLE flag support for arrays and add it as an extra flag to internal global data maps, if supported by kernel. This allows users to memory-map global data and use it without BPF map operations, greatly simplifying user experience. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20191117172806.2195367-5-andriin@fb.com commit fc9702273e2edb90400a34b3be76f7b08fa3344b Author: Andrii Nakryiko Date: Sun Nov 17 09:28:04 2019 -0800 bpf: Add mmap() support for BPF_MAP_TYPE_ARRAY Add ability to memory-map contents of BPF array map. This is extremely useful for working with BPF global data from userspace programs. It allows to avoid typical bpf_map_{lookup,update}_elem operations, improving both performance and usability. There had to be special considerations for map freezing, to avoid having writable memory view into a frozen map. To solve this issue, map freezing and mmap-ing is happening under mutex now: - if map is already frozen, no writable mapping is allowed; - if map has writable memory mappings active (accounted in map->writecnt), map freezing will keep failing with -EBUSY; - once number of writable memory mappings drops to zero, map freezing can be performed again. Only non-per-CPU plain arrays are supported right now. Maps with spinlocks can't be memory mapped either. For BPF_F_MMAPABLE array, memory allocation has to be done through vmalloc() to be mmap()'able. We also need to make sure that array data memory is page-sized and page-aligned, so we over-allocate memory in such a way that struct bpf_array is at the end of a single page of memory with array->value being aligned with the start of the second page. On deallocation we need to accomodate this memory arrangement to free vmalloc()'ed memory correctly. One important consideration regarding how memory-mapping subsystem functions. Memory-mapping subsystem provides few optional callbacks, among them open() and close(). close() is called for each memory region that is unmapped, so that users can decrease their reference counters and free up resources, if necessary. open() is *almost* symmetrical: it's called for each memory region that is being mapped, **except** the very first one. So bpf_map_mmap does initial refcnt bump, while open() will do any extra ones after that. Thus number of close() calls is equal to number of open() calls plus one more. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: John Fastabend Acked-by: Johannes Weiner Link: https://lore.kernel.org/bpf/20191117172806.2195367-4-andriin@fb.com commit 85192dbf4de08795afe2b88e52a36fc6abfc3dba Author: Andrii Nakryiko Date: Sun Nov 17 09:28:03 2019 -0800 bpf: Convert bpf_prog refcnt to atomic64_t Similarly to bpf_map's refcnt/usercnt, convert bpf_prog's refcnt to atomic64 and remove artificial 32k limit. This allows to make bpf_prog's refcounting non-failing, simplifying logic of users of bpf_prog_add/bpf_prog_inc. Validated compilation by running allyesconfig kernel build. Suggested-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191117172806.2195367-3-andriin@fb.com commit 1e0bd5a091e5d9e0f1d5b0e6329b87bb1792f784 Author: Andrii Nakryiko Date: Sun Nov 17 09:28:02 2019 -0800 bpf: Switch bpf_map ref counter to atomic64_t so bpf_map_inc() never fails 92117d8443bc ("bpf: fix refcnt overflow") turned refcounting of bpf_map into potentially failing operation, when refcount reaches BPF_MAX_REFCNT limit (32k). Due to using 32-bit counter, it's possible in practice to overflow refcounter and make it wrap around to 0, causing erroneous map free, while there are still references to it, causing use-after-free problems. But having a failing refcounting operations are problematic in some cases. One example is mmap() interface. After establishing initial memory-mapping, user is allowed to arbitrarily map/remap/unmap parts of mapped memory, arbitrarily splitting it into multiple non-contiguous regions. All this happening without any control from the users of mmap subsystem. Rather mmap subsystem sends notifications to original creator of memory mapping through open/close callbacks, which are optionally specified during initial memory mapping creation. These callbacks are used to maintain accurate refcount for bpf_map (see next patch in this series). The problem is that open() callback is not supposed to fail, because memory-mapped resource is set up and properly referenced. This is posing a problem for using memory-mapping with BPF maps. One solution to this is to maintain separate refcount for just memory-mappings and do single bpf_map_inc/bpf_map_put when it goes from/to zero, respectively. There are similar use cases in current work on tcp-bpf, necessitating extra counter as well. This seems like a rather unfortunate and ugly solution that doesn't scale well to various new use cases. Another approach to solve this is to use non-failing refcount_t type, which uses 32-bit counter internally, but, once reaching overflow state at UINT_MAX, stays there. This utlimately causes memory leak, but prevents use after free. But given refcounting is not the most performance-critical operation with BPF maps (it's not used from running BPF program code), we can also just switch to 64-bit counter that can't overflow in practice, potentially disadvantaging 32-bit platforms a tiny bit. This simplifies semantics and allows above described scenarios to not worry about failing refcount increment operation. In terms of struct bpf_map size, we are still good and use the same amount of space: BEFORE (3 cache lines, 8 bytes of padding at the end): struct bpf_map { const struct bpf_map_ops * ops __attribute__((__aligned__(64))); /* 0 8 */ struct bpf_map * inner_map_meta; /* 8 8 */ void * security; /* 16 8 */ enum bpf_map_type map_type; /* 24 4 */ u32 key_size; /* 28 4 */ u32 value_size; /* 32 4 */ u32 max_entries; /* 36 4 */ u32 map_flags; /* 40 4 */ int spin_lock_off; /* 44 4 */ u32 id; /* 48 4 */ int numa_node; /* 52 4 */ u32 btf_key_type_id; /* 56 4 */ u32 btf_value_type_id; /* 60 4 */ /* --- cacheline 1 boundary (64 bytes) --- */ struct btf * btf; /* 64 8 */ struct bpf_map_memory memory; /* 72 16 */ bool unpriv_array; /* 88 1 */ bool frozen; /* 89 1 */ /* XXX 38 bytes hole, try to pack */ /* --- cacheline 2 boundary (128 bytes) --- */ atomic_t refcnt __attribute__((__aligned__(64))); /* 128 4 */ atomic_t usercnt; /* 132 4 */ struct work_struct work; /* 136 32 */ char name[16]; /* 168 16 */ /* size: 192, cachelines: 3, members: 21 */ /* sum members: 146, holes: 1, sum holes: 38 */ /* padding: 8 */ /* forced alignments: 2, forced holes: 1, sum forced holes: 38 */ } __attribute__((__aligned__(64))); AFTER (same 3 cache lines, no extra padding now): struct bpf_map { const struct bpf_map_ops * ops __attribute__((__aligned__(64))); /* 0 8 */ struct bpf_map * inner_map_meta; /* 8 8 */ void * security; /* 16 8 */ enum bpf_map_type map_type; /* 24 4 */ u32 key_size; /* 28 4 */ u32 value_size; /* 32 4 */ u32 max_entries; /* 36 4 */ u32 map_flags; /* 40 4 */ int spin_lock_off; /* 44 4 */ u32 id; /* 48 4 */ int numa_node; /* 52 4 */ u32 btf_key_type_id; /* 56 4 */ u32 btf_value_type_id; /* 60 4 */ /* --- cacheline 1 boundary (64 bytes) --- */ struct btf * btf; /* 64 8 */ struct bpf_map_memory memory; /* 72 16 */ bool unpriv_array; /* 88 1 */ bool frozen; /* 89 1 */ /* XXX 38 bytes hole, try to pack */ /* --- cacheline 2 boundary (128 bytes) --- */ atomic64_t refcnt __attribute__((__aligned__(64))); /* 128 8 */ atomic64_t usercnt; /* 136 8 */ struct work_struct work; /* 144 32 */ char name[16]; /* 176 16 */ /* size: 192, cachelines: 3, members: 21 */ /* sum members: 154, holes: 1, sum holes: 38 */ /* forced alignments: 2, forced holes: 1, sum forced holes: 38 */ } __attribute__((__aligned__(64))); This patch, while modifying all users of bpf_map_inc, also cleans up its interface to match bpf_map_put with separate operations for bpf_map_inc and bpf_map_inc_with_uref (to match bpf_map_put and bpf_map_put_with_uref, respectively). Also, given there are no users of bpf_map_inc_not_zero specifying uref=true, remove uref flag and default to uref=false internally. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191117172806.2195367-2-andriin@fb.com commit e8d70b321ecc9b23d09b8df63e38a2f73160c209 Author: Chuck Lever Date: Fri Nov 15 08:39:07 2019 -0500 SUNRPC: Fix another issue with MIC buffer space xdr_shrink_pagelen() BUG's when @len is larger than buf->page_len. This can happen when xdr_buf_read_mic() is given an xdr_buf with a small page array (like, only a few bytes). Instead, just cap the number of bytes that xdr_shrink_pagelen() will move. Fixes: 5f1bc39979d ("SUNRPC: Fix buffer handling of GSS MIC ... ") Signed-off-by: Chuck Lever Reviewed-by: Benjamin Coddington Signed-off-by: Trond Myklebust commit 21f86d2d63f9b0c10a3bd369ce8c97f1f786be53 Author: Chuck Lever Date: Tue Nov 5 11:04:13 2019 -0500 NFS4: Trace lock reclaims One of the most frustrating messages our sustaining team sees is the "Lock reclaim failed!" message. Add some observability in the client's lock reclaim logic so we can capture better data the first time a problem occurs. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 511ba52e4c01fd1878140774e6215e0de6c2f36f Author: Chuck Lever Date: Tue Nov 5 11:04:07 2019 -0500 NFS4: Trace state recovery operation Add a trace point in the main state manager loop to observe state recovery operation. Help track down state recovery bugs. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 4e121fcae809a94aa952407bd74b0757b858ce19 Merge: f751c5452594 a52c23b8b207 Author: Trond Myklebust Date: Mon Nov 18 10:55:55 2019 +0100 Merge tag 'nfs-rdma-for-5.5-1' of git://git.linux-nfs.org/projects/anna/linux-nfs NFSoRDMA Client Updates for Linux 5.5 New Features: - New tracepoints for congestion control and Local Invalidate WRs Bugfixes and Cleanups: - Eliminate log noise in call_reserveresult - Fix unstable connections after a reconnect - Clean up some code duplication - Close race between waking a sender and posting a receive - Fix MR list corruption, and clean up MR usage - Remove unused rpcrdma_sendctx fields - Try to avoid DMA mapping pages if it is too costly - Wake pending tasks if connection fails - Replace some dprintk()s with tracepoints commit b41d62201b9772c7c750360ab668d2caa502e642 Author: Thomas Gleixner Date: Mon Nov 18 10:47:29 2019 +0100 x86: Remove unused asm/rio.h The removed calgary IOMMU driver was the only user of this header file. Reported-by: Jon Mason Signed-off-by: Thomas Gleixner Cc: Christoph Hellwig commit f751c5452594f6ef77b39c78f9888275e60d0770 Author: Olga Kornievskaia Date: Fri Nov 15 15:13:19 2019 -0500 NFSv4.2 fix memory leak in nfs42_ssc_open Static analysis with Coverity detected a memory leak Reported-by: Colin King Fixes: ec4b09250898 ("NFS: inter ssc open") Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 66588abe2db066a8927b67cbb8b82a1292819086 Author: Olga Kornievskaia Date: Fri Nov 15 15:12:49 2019 -0500 NFSv4.2 fix kfree in __nfs42_copy_file_range This is triggering problems with static analysis with Coverity Reported-by: Colin King Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 843aa17a35bf00be0f3a1108f4691bc45761cd23 Author: YueHaibing Date: Fri Nov 15 11:25:22 2019 +0000 NFS: remove duplicated include from nfs4file.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Trond Myklebust commit 000301042413c4e5d9f2227c60db8f12669fefce Author: YueHaibing Date: Thu Nov 14 22:01:41 2019 +0800 NFSv4: Make _nfs42_proc_copy_notify() static Fix sparse warning: fs/nfs/nfs42proc.c:527:5: warning: symbol '_nfs42_proc_copy_notify' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Trond Myklebust commit 913eca1aea87c3c6526fa5b166e524dff989deef Author: Anna Schumaker Date: Tue Nov 12 16:37:24 2019 -0500 NFS: Fallocate should use the nfs4_fattr_bitmap Changing a sparse file could have an effect not only on the file size, but also on the number of blocks used by the file in the underlying filesystem. The server's cache_consistency_bitmap doesn't update the SPACE_USED attribute, so let's switch to the nfs4_fattr_bitmap to catch this update whenever we do an ALLOCATE or DEALLOCATE. This patch fixes xfstests generic/568, which tests that fallocating an unaligned range allocates all blocks touched by that range. Without this patch, `stat` reports 0 bytes used immediately after the fallocate. Adding a `sleep 5` to the test also catches the update, but it's better to do so when we know something has changed. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust commit 89658c4d04c7661c2c0770c6f92f465d58eed62d Author: Anna Schumaker Date: Fri Nov 8 16:02:24 2019 -0500 NFS: Return -ETXTBSY when attempting to write to a swapfile My understanding is that -EBUSY refers to the underlying device, and that -ETXTBSY is used when attempting to access a file in use by the kernel (like a swapfile). Changing this return code helps us pass xfstests generic/569 Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust commit 4d6141288c33b73027260e73df262464cbe1fd0d Author: Peter Chen Date: Thu Oct 10 09:20:26 2019 +0800 usb: chipidea: imx: pinctrl for HSIC is optional For imx chipidea controllers, if they use mxs PHY, they need pinctrl for HSIC. Otherwise, it doesn't need pinctrl and usbmisc control. Like imx7d and imx8mm. Reported-by: André Draszik Signed-off-by: Peter Chen commit 0e96322b241cec8e8adf6cea70dc116d614f4add Author: Saurav Girepunje Date: Tue Oct 29 14:55:22 2019 +0530 fs: nfs: sysfs: Remove NULL check before kfree Remove NULL check before kfree, NULL check is taken care on kfree. Signed-off-by: Saurav Girepunje Signed-off-by: Trond Myklebust commit 9c91fa36b6179859aca6317b23933ffbc4f76940 Author: YueHaibing Date: Fri Oct 25 21:41:19 2019 +0800 NFS: remove unneeded semicolon remove unneeded semicolon. Signed-off-by: YueHaibing Signed-off-by: Trond Myklebust commit d49dd11753f4f5dde5d67c4e1d3edf65eb35c381 Author: Ben Dooks Date: Wed Oct 16 17:28:21 2019 +0100 NFSv4: add declaration of current_stateid The current_stateid is exported from nfs4state.c but not declared in any of the headers. Add to nfs4_fs.h to remove the following warning: fs/nfs/nfs4state.c:80:20: warning: symbol 'current_stateid' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Trond Myklebust commit 8725aa4fa7ded30211ebd28bb1c9bae806eb3841 Author: Andrew Duggan Date: Wed Oct 23 01:24:03 2019 +0000 HID: rmi: Check that the RMI_STARTED bit is set before unregistering the RMI transport device In the event that the RMI device is unreachable, the calls to rmi_set_mode() or rmi_set_page() will fail before registering the RMI transport device. When the device is removed, rmi_remove() will call rmi_unregister_transport_device() which will attempt to access the rmi_dev pointer which was not set. This patch adds a check of the RMI_STARTED bit before calling rmi_unregister_transport_device(). The RMI_STARTED bit is only set after rmi_register_transport_device() completes successfully. The kernel oops was reported in this message: https://www.spinics.net/lists/linux-input/msg58433.html [jkosina@suse.cz: reworded changelog as agreed with Andrew] Signed-off-by: Andrew Duggan Reported-by: Federico Cerutti Signed-off-by: Jiri Kosina commit 5ed0794cde59365d4d5895b89bb2f7ef7ffdbd55 Author: Michael Schmitz Date: Wed Nov 6 15:47:29 2019 +1300 m68k/atari: Convert Falcon IDE drivers to platform drivers Autoloading of Falcon IDE driver modules requires converting these drivers to platform drivers. Add platform device for Falcon IDE interface in Atari platform setup code. Use this in the pata_falcon driver in place of the simple platform device set up on the fly. Convert falconide driver to use the same platform device that is used by pata_falcon also. (With the introduction of a platform device for the Atari Falcon IDE interface, the old Falcon IDE driver no longer loads (resource already claimed by the platform device)). Tested (as built-in driver) on my Atari Falcon. Signed-off-by: Michael Schmitz Acked-by: Bartlomiej Zolnierkiewicz Link: https://lore.kernel.org/r/1573008449-8226-1-git-send-email-schmitzmic@gmail.com Signed-off-by: Geert Uytterhoeven commit b03e5774d51fe003e1020060c403a1d085b128eb Author: Heiner Kallweit Date: Mon Nov 11 22:38:11 2019 +0100 HID: quirks: remove hid-led devices from hid_have_special_driver Since e04a0442d33b ("HID: core: remove the absolute need of hid_have_special_driver[]") it's no longer needed to list these LED devices in hid_have_special_driver[]. This allows libraries needing access to the hidraw device to work properly. Signed-off-by: Heiner Kallweit Signed-off-by: Benjamin Tissoires commit f3d7c2292d104519195fdb11192daec13229c219 Author: Bradley Bolen Date: Sat Nov 16 20:00:45 2019 -0500 mmc: core: Fix size overflow for mmc partitions With large eMMC cards, it is possible to create general purpose partitions that are bigger than 4GB. The size member of the mmc_part struct is only an unsigned int which overflows for gp partitions larger than 4GB. Change this to a u64 to handle the overflow. Signed-off-by: Bradley Bolen Signed-off-by: Ulf Hansson commit c91843463e9e821dc3b48fe37e3155fa38299f6e Author: Eugeniu Rosca Date: Fri Nov 15 14:44:30 2019 +0100 mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests Isolated initially to renesas_sdhi_internal_dmac [1], Ulf suggested adding MMC_CAP_ERASE to the TMIO mmc core: On Fri, Nov 15, 2019 at 10:27:25AM +0100, Ulf Hansson wrote: -- snip -- This test and due to the discussions with Wolfram and you in this thread, I would actually suggest that you enable MMC_CAP_ERASE for all tmio variants, rather than just for this particular one. In other words, set the cap in tmio_mmc_host_probe() should be fine, as it seems none of the tmio variants supports HW busy detection at this point. -- snip -- Testing on R-Car H3ULCB-KF doesn't reveal any issues (v5.4-rc7): root@rcar-gen3:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 59.2G 0 disk <--- eMMC mmcblk0boot0 179:8 0 4M 1 disk mmcblk0boot1 179:16 0 4M 1 disk mmcblk1 179:24 0 30G 0 disk <--- SD card root@rcar-gen3:~# time blkdiscard /dev/mmcblk0 real 0m8.659s user 0m0.001s sys 0m1.920s root@rcar-gen3:~# time blkdiscard /dev/mmcblk1 real 0m1.176s user 0m0.001s sys 0m0.124s [1] https://lore.kernel.org/linux-renesas-soc/20191112134808.23546-1-erosca@de.adit-jv.com/ Cc: Wolfram Sang Cc: Masahiro Yamada Cc: Andrew Gabbasov Originally-by: Harish Jenny K N Suggested-by: Ulf Hansson Signed-off-by: Eugeniu Rosca Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 11a98f37a5c11fd3cec9c7a566dfa902bceb5bde Author: Cao jin Date: Mon Nov 18 15:00:12 2019 +0800 x86: Fix typos in comments BIOSen -> BIOSes; paing -> paging. Append to 640 its proper unit "Kb". encomapssing -> encompassing. [ bp: Merge into a single patch, fix one more typo, massage. ] Signed-off-by: Cao jin Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Baoquan He Cc: Dave Young Cc: David Howells Cc: Ingo Molnar Cc: Juergen Gross Cc: Robert Richter Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/20191118070012.27850-1-caoj.fnst@cn.fujitsu.com commit 2dbc6f113acd74c66b04bf49fb027efd830b1c5a Author: Blaž Hrastnik Date: Wed Nov 6 20:02:46 2019 +0900 HID: Improve Windows Precision Touchpad detection. Per Microsoft spec, usage 0xC5 (page 0xFF) returns a blob containing data used to verify the touchpad as a Windows Precision Touchpad. 0x85, REPORTID_PTPHQA, // REPORT_ID (PTPHQA) 0x09, 0xC5, // USAGE (Vendor Usage 0xC5) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (0xff) 0x75, 0x08, // REPORT_SIZE (8) 0x96, 0x00, 0x01, // REPORT_COUNT (0x100 (256)) 0xb1, 0x02, // FEATURE (Data,Var,Abs) However, some devices, namely Microsoft's Surface line of products instead implement a "segmented device certification report" (usage 0xC6) which returns the same report, but in smaller chunks. 0x06, 0x00, 0xff, // USAGE_PAGE (Vendor Defined) 0x85, REPORTID_PTPHQA, // REPORT_ID (PTPHQA) 0x09, 0xC6, // USAGE (Vendor usage for segment #) 0x25, 0x08, // LOGICAL_MAXIMUM (8) 0x75, 0x08, // REPORT_SIZE (8) 0x95, 0x01, // REPORT_COUNT (1) 0xb1, 0x02, // FEATURE (Data,Var,Abs) 0x09, 0xC7, // USAGE (Vendor Usage) 0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (0xff) 0x95, 0x20, // REPORT_COUNT (32) 0xb1, 0x02, // FEATURE (Data,Var,Abs) By expanding Win8 touchpad detection to also look for the segmented report, all Surface touchpads are now properly recognized by hid-multitouch. Signed-off-by: Blaž Hrastnik Signed-off-by: Benjamin Tissoires commit 3f4aad6e1a4c26a20700fb4f630e4e6c6831db47 Author: Peter Chen Date: Thu Oct 10 08:59:14 2019 +0800 usb: chipidea: imx: refine the error handling for hsic - -EPROBE_DEFER is an error, but without need show error message - If pintrol is not existed, as pintrol is NULL Signed-off-by: Peter Chen commit 7d5ec335f94e74e885ca2f6c97a3479fe9fe3b15 Author: Peter Chen Date: Thu Oct 10 08:40:46 2019 +0800 usb: chipidea: imx: change hsic power regulator as optional Not every platform needs this regulator. Signed-off-by: Peter Chen commit df17aa9fb31f6a41aad37b984909d8ef1a958271 Author: Li Jun Date: Wed Oct 9 10:52:28 2019 +0800 usb: chipidea: imx: check data->usbmisc_data against NULL before access As usbmisc_data is optional, so add the check before access its member, this fix below static checker warning: drivers/usb/chipidea/ci_hdrc_imx.c:438 ci_hdrc_imx_probe() warn: 'data->usbmisc_data' can also be NULL which is introduced by Patch 15b80f7c3a7f: "usb: chipidea: imx: enable vbus and id wakeup only for OTG events" Reported-by: Dan Carpenter Signed-off-by: Li Jun Signed-off-by: Peter Chen commit 782c1c49f3dbf335de6b95f2d97b105cca236bc9 Author: Peter Chen Date: Mon Sep 23 10:34:38 2019 +0800 usb: chipidea: core: change vbus-regulator as optional Vbus regualtor is an optional regulator, for platforms, which doesn't have this regulator, it will get a dummy regulator and show warning message. Signed-off-by: Peter Chen commit 93c2c7330a3b6d973cd82dfd7bcbd6df035752f6 Author: Li Jun Date: Mon Sep 9 14:41:41 2019 +0800 usb: chipidea: imx: enable vbus and id wakeup only for OTG events If ID or VBUS is from external block, don't enable its wakeup because it isn't used at all. Signed-off-by: Li Jun Signed-off-by: Peter Chen commit 72dc8df7920fc24eba0f586c56e900a1643ff2b3 Author: Jun Li Date: Tue Sep 10 14:54:57 2019 +0800 usb: chipidea: udc: protect usb interrupt enable We hit the problem with below sequence: - ci_udc_vbus_session() update vbus_active flag and ci->driver is valid, - before calling the ci_hdrc_gadget_connect(), usb_gadget_udc_stop() is called by application remove gadget driver, - ci_udc_vbus_session() will contine do ci_hdrc_gadget_connect() as gadget_ready is 1, so udc interrupt is enabled, but ci->driver is NULL. - USB connection irq generated but ci->driver is NULL. As udc irq only should be enabled when gadget driver is binded, so add spinlock to protect the usb irq enable for vbus session handling. Signed-off-by: Jun Li Signed-off-by: Peter Chen commit d16ab536aad208421c5ed32cdcb01b5ab6aa1f19 Author: Peter Chen Date: Tue Sep 10 10:54:52 2019 +0800 usb: chipidea: udc: add new API ci_hdrc_gadget_connect This API is used enable device function, it is called at below situations: - VBUS is connected during boots up - Hot plug occurs during runtime Signed-off-by: Peter Chen Signed-off-by: Jun Li commit 11fde161ab37f2938504bf896b48afbd18ea71cd Author: Christian Brauner Date: Mon Nov 18 08:49:44 2019 +0100 selftests/clone3: skip if clone3() is ENOSYS If the clone3() syscall is not implemented we should skip the tests. Fixes: 41585bbeeef9 ("selftests: add tests for clone3() with *set_tid") Fixes: 17a810699c18 ("selftests: add tests for clone3()") Signed-off-by: Christian Brauner commit a019ff3b8b10d1b7f5cd37edb9f4fbef3e031edf Author: Andrei Vagin Date: Sun Nov 17 22:47:50 2019 -0800 selftests/clone3: check that all pids are released on error paths This is a regression test case for an issue when pids have not been released on error paths. Signed-off-by: Andrei Vagin Link: https://lore.kernel.org/r/20191118064750.408003-3-avagin@gmail.com Signed-off-by: Christian Brauner commit 28df751539e8e3ba71c5b0d13647d1fdc7c1d287 Author: Andrei Vagin Date: Sun Nov 17 22:47:49 2019 -0800 selftests/clone3: report a correct number of fails In clone3_set_tid, a few test cases are running in a child process. And right now, if one of these test cases fails, the whole test will exit with the success status. Fixes: 41585bbeeef9 ("selftests: add tests for clone3() with *set_tid") Signed-off-by: Andrei Vagin Link: https://lore.kernel.org/r/20191118064750.408003-2-avagin@gmail.com Signed-off-by: Christian Brauner commit 4f5c289ea66a33457d51b305d4d77e1ca4c8ff17 Author: Andrei Vagin Date: Sun Nov 17 22:47:48 2019 -0800 selftests/clone3: flush stdout and stderr before clone3() and _exit() Buffers have to be flushed before clone3() to avoid double messages in the log. Fixes: 41585bbeeef9 ("selftests: add tests for clone3() with *set_tid") Signed-off-by: Andrei Vagin Link: https://lore.kernel.org/r/20191118064750.408003-1-avagin@gmail.com Signed-off-by: Christian Brauner commit 7170d1a4cc4d5fe1c55dfd95bddb9df074fe9637 Merge: a079973f462a 726b4fba94be Author: Greg Kroah-Hartman Date: Mon Nov 18 08:24:12 2019 +0100 Merge tag 'usb-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: USB: changes for v5.5 We have TI's glue layer for the Cadence USB3 controller going upstream. Tegra's XUDC driver is also going upstream with this pull request. Apart from these two big features, we have a bunch of patches switching over to devm_platform_ioremap_resource() in order to simplify code a little; and a non-critical fix for DWC3 usage via kexec. * tag 'usb-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (44 commits) usb: dwc3: of-simple: add a shutdown usb: cdns3: Add TI specific wrapper driver dt-bindings: usb: Add binding for the TI wrapper for Cadence USB3 controller usb: mtu3: fix race condition about delayed_status usb: gadget: Add UDC driver for tegra XUSB device mode controller usb: dwc3: debug: Remove newline printout usb: dwc2: use a longer core rest timeout in dwc2_core_reset() usb: gadget: udc: lpc32xx: Use devm_platform_ioremap_resource() in lpc32xx_udc_probe() USB: gadget: udc: clean up an indentation issue usb: gadget: Quieten gadget config message phy: renesas: rcar-gen3-usb2: Use platform_get_irq_optional() for optional irq usb: gadget: Remove set but not used variable 'opts' in msg_do_config usb: gadget: Remove set but not used variable 'opts' in acm_ms_do_config usb: mtu3: add a new function to do status stage usb: gadget: configfs: fix concurrent issue between composite APIs usb: gadget: f_tcm: Provide support to get alternate setting in tcm function usb: gadget: Correct NULL pointer checking in fsl gadget usb: fsl: Remove unused variable USB: dummy-hcd: use usb_urb_dir_in instead of usb_pipein USB: dummy-hcd: increase max number of devices to 32 ... commit 405fe7aa0dbaa6cb8cfe62771eee67076d30aca1 Author: Christoph Hellwig Date: Mon Oct 28 13:10:42 2019 +0100 riscv: provide a flat image loader This allows just loading the kernel at a pre-set address without qemu going bonkers trying to map the ELF file. Contains a contribution from Aurabindo Jayamohanan to reuse the PAGE_OFFSET definition. Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel [paul.walmsley@sifive.com: fixed checkpatch issue; minor commit message fix] Signed-off-by: Paul Walmsley commit 6bd33e1ece528f67646db33bf97406b747dafda0 Author: Christoph Hellwig Date: Mon Oct 28 13:10:41 2019 +0100 riscv: add nommu support The kernel runs in M-mode without using page tables, and thus can't run bare metal without help from additional firmware. Most of the patch is just stubbing out code not needed without page tables, but there is an interesting detail in the signals implementation: - The normal RISC-V syscall ABI only implements rt_sigreturn as VDSO entry point, but the ELF VDSO is not supported for nommu Linux. We instead copy the code to call the syscall onto the stack. In addition to enabling the nommu code a new defconfig for a small kernel image that can run in nommu mode on qemu is also provided, to run a kernel in qemu you can use the following command line: qemu-system-riscv64 -smp 2 -m 64 -machine virt -nographic \ -kernel arch/riscv/boot/loader \ -drive file=rootfs.ext2,format=raw,id=hd0 \ -device virtio-blk-device,drive=hd0 Contains contributions from Damien Le Moal . Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel [paul.walmsley@sifive.com: updated to apply; add CONFIG_MMU guards around PCI_IOBASE definition to fix build issues; fixed checkpatch issues; move the PCI_IO_* and VMEMMAP address space macros along with the others; resolve sparse warning] Signed-off-by: Paul Walmsley commit 9e80635619b51ddc56bdeca4da4056eb7a2a77e0 Author: Christoph Hellwig Date: Mon Oct 28 13:10:40 2019 +0100 riscv: clear the instruction cache and all registers when booting When we get booted we want a clear slate without any leaks from previous supervisors or the firmware. Flush the instruction cache and then clear all registers to known good values. This is really important for the upcoming nommu support that runs on M-mode, but can't really harm when running in S-mode either. Vaguely based on the concepts from opensbi. Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel Signed-off-by: Paul Walmsley commit accb9dbc4affdb7ebf30db7e9ba71eee47280081 Author: Damien Le Moal Date: Mon Oct 28 13:10:39 2019 +0100 riscv: read the hart ID from mhartid on boot When in M-Mode, we can use the mhartid CSR to get the ID of the running HART. Doing so, direct M-Mode boot without firmware is possible. Signed-off-by: Damien Le Moal Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Christoph Hellwig Signed-off-by: Paul Walmsley commit fcdc65375186a5cd69cc2eedfb498b86f4f5a21e Author: Christoph Hellwig Date: Mon Oct 28 13:10:38 2019 +0100 riscv: provide native clint access for M-mode RISC-V has the concept of a cpu level interrupt controller. The interface for it is split between a standardized part that is exposed as bits in the mstatus/sstatus register and the mie/mip/sie/sip CRS. But the bit to actually trigger IPIs is not standardized and just mentioned as implementable using MMIO. Add support for IPIs using MMIO using the SiFive clint layout (which is also shared by Ariane, Kendryte and the Qemu virt platform). Additionally the MMIO block also supports the time value and timer compare registers, so they are also set up using the same OF node. Support for other layouts should also be relatively easy to add in the future. Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel [paul.walmsley@sifive.com: update include guard format; fix checkpatch issues; minor commit message cleanup] Signed-off-by: Paul Walmsley commit f9c34bb529975fe9f85b870a80c53a83a3c5a182 Author: Sascha Hauer Date: Tue Nov 5 09:12:51 2019 +0100 ubi: Fix producing anchor PEBs When a new fastmap is about to be written UBI must make sure it has a free block for a fastmap anchor available. For this ubi_update_fastmap() calls ubi_ensure_anchor_pebs(). This stopped working with 2e8f08deabbc ("ubi: Fix races around ubi_refill_pools()"), with this commit the wear leveling code is blocked and can no longer produce free PEBs. UBI then more often than not falls back to write the new fastmap anchor to the same block it was already on which means the same erase block gets erased during each fastmap write and wears out quite fast. As the locking prevents us from producing the anchor PEB when we actually need it, this patch changes the strategy for creating the anchor PEB. We no longer create it on demand right before we want to write a fastmap, but instead we create an anchor PEB right after we have written a fastmap. This gives us enough time to produce a new anchor PEB before it is needed. To make sure we have an anchor PEB for the very first fastmap write we call ubi_ensure_anchor_pebs() during initialisation as well. Fixes: 2e8f08deabbc ("ubi: Fix races around ubi_refill_pools()") Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit db96d571a7c2207ff27ad2c46a82b26d870f9bdc Author: Andrey Skvortsov Date: Sat Nov 16 23:37:48 2019 +0300 rtc: tps65910: allow using RTC without alarm interrupt If tps65910 INT1 pin (IRQ output) is not wired to any IRQ controller, then it can't be used as system wakeup/alarm source, but it is still possible to read/write time from/to RTC. Signed-off-by: Andrey Skvortsov Link: https://lore.kernel.org/r/20191116203748.27166-1-andrej.skvortzov@gmail.com Signed-off-by: Alexandre Belloni commit 6abf57262166b4f4294667fb5206ae7ba1ba96f5 Author: Zhihao Cheng Date: Sat Jul 20 14:05:20 2019 +0800 ubifs: ubifs_tnc_start_commit: Fix OOB in layout_in_gaps Running stress-test test_2 in mtd-utils on ubi device, sometimes we can get following oops message: BUG: unable to handle page fault for address: ffffffff00000140 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 280a067 P4D 280a067 PUD 0 Oops: 0000 [#1] SMP CPU: 0 PID: 60 Comm: kworker/u16:1 Kdump: loaded Not tainted 5.2.0 #13 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0 -0-ga698c8995f-prebuilt.qemu.org 04/01/2014 Workqueue: writeback wb_workfn (flush-ubifs_0_0) RIP: 0010:rb_next_postorder+0x2e/0xb0 Code: 80 db 03 01 48 85 ff 0f 84 97 00 00 00 48 8b 17 48 83 05 bc 80 db 03 01 48 83 e2 fc 0f 84 82 00 00 00 48 83 05 b2 80 db 03 01 <48> 3b 7a 10 48 89 d0 74 02 f3 c3 48 8b 52 08 48 83 05 a3 80 db 03 RSP: 0018:ffffc90000887758 EFLAGS: 00010202 RAX: ffff888129ae4700 RBX: ffff888138b08400 RCX: 0000000080800001 RDX: ffffffff00000130 RSI: 0000000080800024 RDI: ffff888138b08400 RBP: ffff888138b08400 R08: ffffea0004a6b920 R09: 0000000000000000 R10: ffffc90000887740 R11: 0000000000000001 R12: ffff888128d48000 R13: 0000000000000800 R14: 000000000000011e R15: 00000000000007c8 FS: 0000000000000000(0000) GS:ffff88813ba00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffff00000140 CR3: 000000013789d000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: destroy_old_idx+0x5d/0xa0 [ubifs] ubifs_tnc_start_commit+0x4fe/0x1380 [ubifs] do_commit+0x3eb/0x830 [ubifs] ubifs_run_commit+0xdc/0x1c0 [ubifs] Above Oops are due to the slab-out-of-bounds happened in do-while of function layout_in_gaps indirectly called by ubifs_tnc_start_commit. In function layout_in_gaps, there is a do-while loop placing index nodes into the gaps created by obsolete index nodes in non-empty index LEBs until rest index nodes can totally be placed into pre-allocated empty LEBs. @c->gap_lebs points to a memory area(integer array) which records LEB numbers used by 'in-the-gaps' method. Whenever a fitable index LEB is found, corresponding lnum will be incrementally written into the memory area pointed by @c->gap_lebs. The size ((@c->lst.idx_lebs + 1) * sizeof(int)) of memory area is allocated before do-while loop and can not be changed in the loop. But @c->lst.idx_lebs could be increased by function ubifs_change_lp (called by layout_leb_in_gaps->ubifs_find_dirty_idx_leb->get_idx_gc_leb) during the loop. So, sometimes oob happens when number of cycles in do-while loop exceeds the original value of @c->lst.idx_lebs. See detail in https://bugzilla.kernel.org/show_bug.cgi?id=204229. This patch fixes oob in layout_in_gaps. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 10256f000932f12596dc043cf880ecf488a32510 Author: Zhihao Cheng Date: Tue Oct 29 20:58:23 2019 +0800 ubifs: do_kill_orphans: Fix a memory leak bug If there are more than one valid snod on the sleb->nodes list, do_kill_orphans will malloc ino more than once without releasing previous ino's memory. Finally, it will trigger memory leak. Fixes: ee1438ce5dc4 ("ubifs: Check link count of inodes when...") Signed-off-by: Zhihao Cheng Signed-off-by: zhangyi (F) Signed-off-by: Richard Weinberger commit 91cbf01178c37086b32148c53e24b04cb77557cf Author: Richard Weinberger Date: Thu Oct 24 10:25:35 2019 +0200 Revert "ubifs: Fix memory leak bug in alloc_ubifs_info() error path" This reverts commit 9163e0184bd7d5f779934d34581843f699ad2ffd. At the point when ubifs_fill_super() runs, we have already a reference to the super block. So upon deactivate_locked_super() c will get free()'ed via ->kill_sb(). Cc: Wenwen Wang Fixes: 9163e0184bd7 ("ubifs: Fix memory leak bug in alloc_ubifs_info() error path") Reported-by: https://twitter.com/grsecurity/status/1180609139359277056 Signed-off-by: Richard Weinberger Tested-by: Romain Izard Signed-off-by: Richard Weinberger commit 7cc7720f06ab7102834140710cd2ae56b142d7ce Author: Ben Dooks (Codethink) Date: Wed Oct 16 11:15:03 2019 +0100 ubifs: Fix type of sup->hash_algo The sup->hash_algo is a __le16, and whilst 0xffff is the same in __le16 and u16, it would be better to use cpu_to_le16() anyway (which should deal with constants) and silence the following sparse warning: fs/ubifs/sb.c:187:32: warning: incorrect type in assignment (different base types) fs/ubifs/sb.c:187:32: expected restricted __le16 [usertype] hash_algo fs/ubifs/sb.c:187:32: got int Signed-off-by: Ben Dooks Signed-off-by: Richard Weinberger commit df22b5b3ecc6233e33bd27f67f14c0cd1b5a5897 Author: Ben Dooks (Codethink) Date: Wed Oct 16 11:08:03 2019 +0100 ubifs: Fixed missed le64_to_cpu() in journal In the ubifs_jnl_write_inode() functon, it calls ubifs_iget() with xent->inum. The xent->inum is __le64, but the ubifs_iget() takes native cpu endian. I think that this should be changed to passing le64_to_cpu(xent->inum) to fix the following sparse warning: fs/ubifs/journal.c:902:58: warning: incorrect type in argument 2 (different base types) fs/ubifs/journal.c:902:58: expected unsigned long inum fs/ubifs/journal.c:902:58: got restricted __le64 [usertype] inum Fixes: 7959cf3a7506 ("ubifs: journal: Handle xattrs like files") Signed-off-by: Ben Dooks Signed-off-by: Richard Weinberger commit 3cfa4412df98207e07de6e60d3c805c541cbce1a Author: Ben Dooks (Codethink) Date: Wed Oct 16 11:04:09 2019 +0100 ubifs: Force prandom result to __le32 In set_dent_cookie() the result of prandom_u32() is assinged to an __le32 type. Make this a forced conversion to remove the following sparse warning: fs/ubifs/journal.c:506:30: warning: incorrect type in assignment (different base types) fs/ubifs/journal.c:506:30: expected restricted __le32 [usertype] cookie fs/ubifs/journal.c:506:30: got unsigned int Signed-off-by: Ben Dooks Signed-off-by: Richard Weinberger commit b27b281f9cfa9153fe9d40dd07cbbdc58be0c7c6 Author: Richard Weinberger Date: Fri Sep 20 08:54:29 2019 +0200 ubifs: Remove obsolete TODO from dfs_file_write() AFAICT this kind of problems are no longer possible since debugfs gained file removal protection via e9117a5a4bf6 ("debugfs: implement per-file removal protection"). Cc: Christoph Hellwig Cc: Nicolai Stange Signed-off-by: Richard Weinberger commit 0997187767425f24518c876a51bb587eb64e02fd Author: Rishi Gupta Date: Thu Sep 19 07:08:18 2019 +0530 ubi: Fix warning static is not at beginning of declaration Compiler generates following warning when kernel is built with W=1: drivers/mtd/ubi/ubi.h:971:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] This commit fixes this by correctly ordering keywords. Signed-off-by: Rishi Gupta Signed-off-by: Richard Weinberger commit 188945e9d926f5a55d0af7b2faf4e658a67500a6 Author: Stefan Roese Date: Tue Sep 17 08:31:08 2019 +0200 ubi: Print skip_check in ubi_dump_vol_info() It might be interesting, if "skip_check" is set or not, so lets print this flag in ubi_dump_vol_info() as well. Signed-off-by: Stefan Roese Cc: Richard Weinberger Cc: Boris Brezillon Cc: Heiko Schocher Signed-off-by: Richard Weinberger commit 589e1b6c47ce72fcae103c2e45d899610c92c11e Merge: 8389a7b909f2 777260a5c992 Author: Miquel Raynal Date: Sun Nov 17 18:34:25 2019 +0100 Merge tag 'nand/for-5.5' into mtd/next Raw NAND core * Useless extra checks dropped. * Updated the detection of the bad block markers position Raw NAND controller drivers: * Cadence : New driver * Brcmnand: Support for flash-dma v0 + fixes * Denali : Support for the legacy controller/chip DT representation dropped * Superfluous dev_err() calls removed commit 8389a7b909f252e74ea92b2794de8d660cfee96e Merge: ad39b5a1ed68 83cba933a6db Author: Miquel Raynal Date: Sun Nov 17 18:34:01 2019 +0100 Merge tag 'spi-nor/for-5.5' into mtd/next SPI NOR core changes: - introduce 'struct spi_nor_controller_ops', - clean the Register Operations methods, - use dev_dbg insted of dev_err for low level info, - fix retlen handling in sst_write(), - fix silent truncations in spi_nor_read and spi_nor_read_raw(), - fix the clearing of QE bit on lock()/unlock(), - rework the disabling of the block write protection, - rework the Quad Enable methods, - make sure nor->spimem and nor->controller_ops are mutually exclusive, - set default Quad Enable method for ISSI flashes, - add support for few flashes. SPI NOR controller drivers changes: - intel-spi: - support chips without software sequencer, - add support for Intel Cannon Lake and Intel Comet Lake-H flashes. commit ad39b5a1ed68032292794b41a5f9e41ea69f8052 Merge: 14f89e088155 c15995695ea9 Author: Miquel Raynal Date: Sun Nov 17 18:32:35 2019 +0100 Merge CFI/Hyperbus tag 'for-v5.5-rc1' into mtd/next CFI core changes: * Code cleanups related useless initializers and coding style issues * Fix for a possible double free problem in cfi_cmdset_0002 * Improved error reporting and handling in cfi_cmdset_0002 core for HyperFlash commit adbb68293fc5950a46e3e22f9dc9c619661194ae Author: Dan Williams Date: Tue Nov 12 17:00:24 2019 -0800 libnvdimm: Move nd_device_attribute_group to device_type A 'struct device_type' instance can carry default attributes for the device. Use this facility to remove the export of nd_device_attribute_group and put the responsibility on the core rather than leaf implementations to define this attribute. For regions this creates a new nd_region_attribute_groups[] added to the per-region device-type instances. Cc: Ira Weiny Cc: Michael Ellerman Cc: "Oliver O'Halloran" Cc: Vishal Verma Cc: Aneesh Kumar K.V Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309901138.1582359.12909354140826530394.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit cb719d5fefc508bc80c25ac6c875a4fe6240ba73 Author: Dan Williams Date: Wed Nov 6 19:56:46 2019 -0800 libnvdimm: Move region attribute group definition In preparation for moving region attributes from device attribute groups to the region device-type, reorder the declaration so that it can be referenced by the device-type definition without forward declarations. No functional changes are intended to result from this change. Cc: Ira Weiny Cc: Vishal Verma Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309900624.1582359.6929998072035982264.stgit@dwillia2-desk3.amr.corp.intel.com commit 78c81cc89a40114d09a5ec0693cfd97831ffbe79 Author: Dan Williams Date: Wed Nov 6 19:56:41 2019 -0800 libnvdimm: Move attribute groups to device type Statically initialize the attribute groups for each libnvdimm device_type. This is a preparation step for removing unnecessary exports of attributes that can be included in the device_type by default. Also take the opportunity to mark 'struct device_type' instances const. Cc: Ira Weiny Cc: Vishal Verma Signed-off-by: Dan Williams Reviewed-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/157309900111.1582359.2445687530383470348.stgit@dwillia2-desk3.amr.corp.intel.com commit cda93d6965a162be87f9d6dc5fb28b99335860fe Author: Alastair D'Silva Date: Fri Oct 25 15:46:57 2019 +1100 libnvdimm: Remove prototypes for nonexistent functions These functions don't exist, so remove the prototypes for them. Signed-off-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Reviewed-by: Frederic Barrat Link: https://lore.kernel.org/r/20191025044721.16617-3-alastair@au1.ibm.com Signed-off-by: Dan Williams commit 4e24e37d5313edca8b4ab86f240c046c731e28d6 Author: Qian Cai Date: Thu Oct 31 10:05:19 2019 -0400 libnvdimm/btt: fix variable 'rc' set but not used drivers/nvdimm/btt.c: In function 'btt_read_pg': drivers/nvdimm/btt.c:1264:8: warning: variable 'rc' set but not used [-Wunused-but-set-variable] int rc; ^~ Add a ratelimited message in case a storm of errors is encountered. Fixes: d9b83c756953 ("libnvdimm, btt: rework error clearing") Signed-off-by: Qian Cai Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/1572530719-32161-1-git-send-email-cai@lca.pw Signed-off-by: Dan Williams commit d7c0d927ad5ca452201eae40f932712ac733c816 Author: Dan Williams Date: Wed Oct 30 16:45:53 2019 -0700 libnvdimm/pmem: Delete include of nd-core.h The entire point of nd-core.h is to hide functionality that no leaf driver should touch. In fact, the commit that added it had no need to include it. Fixes: 06e8ccdab15f ("acpi: nfit: Add support for detect platform...") Cc: Ira Weiny Cc: Dave Jiang Cc: Vishal Verma Signed-off-by: Dan Williams commit 9067f2f0b41d7e817fc8c5259bab1f17512b0147 Author: Christophe JAILLET Date: Mon Sep 23 21:07:46 2019 +0200 RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()' We should jump to fail3 in order to undo the 'xa_insert_irq()' call. Link: https://lore.kernel.org/r/20190923190746.10964-1-christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Jason Gunthorpe commit e1ee1e62bec4a8968355517ea11b2a06b7364408 Author: Dag Moxnes Date: Wed Oct 30 13:44:00 2019 +0100 RDMA/cma: Use ACK timeout for RoCE packetLifeTime The cma is currently using a hard-coded value, CMA_IBOE_PACKET_LIFETIME, for the PacketLifeTime, as it can not be determined from the network. This value might not be optimal for all networks. The cma module supports the function rdma_set_ack_timeout to set the ACK timeout for a QP associated with a connection. As per IBTA 12.7.34 local ACK timeout = (2 * PacketLifeTime + Local CA’s ACK delay). Assuming a negligible local ACK delay, we can use PacketLifeTime = local ACK timeout/2 as a reasonable approximation for RoCE networks. Link: https://lore.kernel.org/r/1572439440-17416-1-git-send-email-dag.moxnes@oracle.com Signed-off-by: Dag Moxnes Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 72b894b09a96b741c92562709f6629310f2b34a1 Author: Christoph Hellwig Date: Wed Nov 13 08:32:14 2019 +0100 IB/umem: remove the dmasync argument to ib_umem_get The argument is always ignored, so remove it. Link: https://lore.kernel.org/r/20191113073214.9514-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Acked-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 5a5e277b8d408ef2b167282d62662be0437d381f Author: Lori Hikichi Date: Mon Sep 30 12:14:29 2019 +0530 i2c: iproc: Add i2c repeated start capability Enable handling of i2c repeated start. The current code handles a multi msg i2c transfer as separate i2c bus transactions. This change will now handle this case using the i2c repeated start protocol. The number of msgs in a transfer is limited to two, and must be a write followed by a read. Signed-off-by: Lori Hikichi Signed-off-by: Rayagonda Kokatanur Signed-off-by: Icarus Chau Signed-off-by: Ray Jui Signed-off-by: Shivaraj Shetty Signed-off-by: Wolfram Sang commit 7763baace1b738d65efa46d68326c9406311c6bf Author: Valentin Schneider Date: Fri Nov 15 10:39:08 2019 +0000 sched/uclamp: Fix overzealous type replacement Some uclamp helpers had their return type changed from 'unsigned int' to 'enum uclamp_id' by commit 0413d7f33e60 ("sched/uclamp: Always use 'enum uclamp_id' for clamp_id values") but it happens that some do return a value in the [0, SCHED_CAPACITY_SCALE] range, which should really be unsigned int. The affected helpers are uclamp_none(), uclamp_rq_max_value() and uclamp_eff_value(). Fix those up. Note that this doesn't lead to any obj diff using a relatively recent aarch64 compiler (8.3-2019.03). The current code of e.g. uclamp_eff_value() properly returns an 11 bit value (bits_per(1024)) and doesn't seem to do anything funny. I'm still marking this as fixing the above commit to be on the safe side. Signed-off-by: Valentin Schneider Reviewed-by: Qais Yousef Acked-by: Vincent Guittot Cc: Dietmar.Eggemann@arm.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: patrick.bellasi@matbug.net Cc: qperret@google.com Cc: surenb@google.com Cc: tj@kernel.org Fixes: 0413d7f33e60 ("sched/uclamp: Always use 'enum uclamp_id' for clamp_id values") Link: https://lkml.kernel.org/r/20191115103908.27610-1-valentin.schneider@arm.com Signed-off-by: Ingo Molnar commit a76bea0287ce13d28494b19649d80d8ee5e7b757 Author: Valentin Longchamp Date: Tue Nov 12 20:56:23 2019 +0100 powerpc/kmcent2: add ranges to the pci bridges This removes the warnings about the fact that the 4 pci bridges (i.e. the 4 pci hosts) don't have any ranges. Signed-off-by: Valentin Longchamp Signed-off-by: Scott Wood commit 3a0990ca1a00cb9fd0278410b9b71a670ffcbffc Author: Geert Uytterhoeven Date: Fri Oct 25 11:29:01 2019 +0200 powerpc/booke: Spelling s/date/data/ Caching dates is never a good idea ;-) Fixes: e7affb1dba0e9068 ("powerpc/cache: add cache flush operation for various e500") Signed-off-by: Geert Uytterhoeven Signed-off-by: Scott Wood commit 3e4282e484b3b45f1de3f2e9e6c8b192d3ac9fcf Author: Rasmus Villemoes Date: Wed Oct 23 14:54:48 2019 +0200 powerpc/85xx: remove mostly pointless mpc85xx_qe_init() Since commit 302c059f2e7b (QE: use subsys_initcall to init qe), mpc85xx_qe_init() has done nothing apart from possibly emitting a pr_err(). As part of reducing the amount of QE-related code in arch/powerpc/ (and eventually support QE on other architectures), remove this low-hanging fruit. Signed-off-by: Rasmus Villemoes Signed-off-by: Scott Wood commit ea67a5519d61f14517f9ee35b3151f44202c2023 Author: Valentin Longchamp Date: Sun Jul 14 22:05:01 2019 +0200 powerpc/kmcent2: update the ethernet devices' phy properties Change all phy-connection-type properties to phy-mode that are better supported by the fman driver. Use the more readable fixed-link node for the 2 sgmii links. Change the RGMII link to rgmii-id as the clock delays are added by the phy. Signed-off-by: Valentin Longchamp Acked-by: Madalin Bucur Signed-off-by: Scott Wood commit 19b7e21c55c81713c4011278143006af9f232504 Merge: 1e8795b1b20d 1d4c79ed324a Author: David S. Miller Date: Sat Nov 16 18:47:31 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Lots of overlapping changes and parallel additions, stuff like that. Signed-off-by: David S. Miller commit 9e8d42a0f7eb9056f8bdb241b91738b5a2923f4c Author: Sebastian Andrzej Siewior Date: Fri Nov 8 18:35:53 2019 +0100 percpu-refcount: Use normal instead of RCU-sched" This is a revert of commit a4244454df129 ("percpu-refcount: use RCU-sched insted of normal RCU") which claims the only reason for using RCU-sched is "rcu_read_[un]lock() … are slightly more expensive than preempt_disable/enable()" and "As the RCU critical sections are extremely short, using sched-RCU shouldn't have any latency implications." The problem with using RCU-sched here is that it disables preemption and the release callback (called from percpu_ref_put_many()) must not acquire any sleeping locks like spinlock_t. This breaks PREEMPT_RT because some of the users acquire spinlock_t locks in their callbacks. Using rcu_read_lock() on PREEMPTION=n kernels is not any different compared to rcu_read_lock_sched(). On PREEMPTION=y kernels there are already performance issues due to additional preemption points. Looking at the code, the rcu_read_lock() is just an increment and unlock is almost just a decrement unless there is something special to do. Both are functions while disabling preemption is inlined. Doing a small benchmark, the minimal amount of time required was mostly the same. The average time required was higher due to the higher MAX value (which could be preemption). With DEBUG_PREEMPT=y it is rcu_read_lock_sched() that takes a little longer due to the additional debug code. Convert back to normal RCU. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Dennis Zhou commit 5620eb6c9d814b1e26e53b31adb40a57dc904b35 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:54 2019 +0100 crypto: ccree - update a stale reference to ablkcipher The ccree driver does not use the ablkcipher interface but contains a rudimentary reference to it in the naming of an unrelated macro. Let's rename it to avoid confusion. Acked-by: Gilad Ben-Yossef Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit d63007eb954e425f45766482813738f41db9af45 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:53 2019 +0100 crypto: ablkcipher - remove deprecated and unused ablkcipher support Now that all users of the deprecated ablkcipher interface have been moved to the skcipher interface, ablkcipher is no longer used and can be removed. Reviewed-by: Eric Biggers Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 809abaefa4d25a46bfa35e595049f23f3e35e4e6 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:52 2019 +0100 crypto: nx - remove stale comment referring to the blkcipher walk API These drivers do not use either the deprecated blkcipher or the current skcipher walk API, so this comment must refer to a previous state of the driver that no longer exists. So drop the comments. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 8160ee7e285dc9cb69cae12b4505af7b425625b7 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:51 2019 +0100 crypto: marvell/cesa - rename blkcipher to skcipher The driver specific types contain some rudimentary references to the blkcipher API, which is deprecated and will be removed. To avoid confusion, rename these to skcipher. This is a cosmetic change only, as the code does not actually use the blkcipher API. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7fe948a52287adf2c0b6a76077386758322d8f6e Author: Ard Biesheuvel Date: Sat Nov 9 18:09:50 2019 +0100 crypto: qat - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Co-developed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 373960d794d2b075e8c782093189cc11df5b7139 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:49 2019 +0100 crypto: talitos - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ce0183cb6464bacc170ccfddb4d93bbe10d1045b Author: Ard Biesheuvel Date: Sat Nov 9 18:09:48 2019 +0100 crypto: rockchip - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Cc: Heiko Stuebner Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 23a6564a6b51453ab905252c19180c07028e3f7e Author: Ard Biesheuvel Date: Sat Nov 9 18:09:47 2019 +0100 crypto: niagara2 - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Acked-by: David S. Miller Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 47ece4813f19f18d00c337033bd13370611fcb33 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:46 2019 +0100 crypto: stm32 - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Cc: Maxime Coquelin Cc: Alexandre Torgue Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 8bf0871539faa090fa057cee83cf06ef4e76e7c5 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:45 2019 +0100 crypto: qce - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Reviewed-by: Stanimir Varbanov Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b3cde6bab4e8d2d76e3a2f2a41336136a51ee6e7 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:44 2019 +0100 crypto: picoxcell - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Cc: Jamie Iles Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 44c10a837c1f3694fe1b12c3b26639b948f985ea Author: Ard Biesheuvel Date: Sat Nov 9 18:09:43 2019 +0100 crypto: sahara - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit c2609391f95b140eaa21442581c6675ba10388d9 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:42 2019 +0100 crypto: mediatek - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Cc: Matthias Brugger Cc: linux-mediatek@lists.infradead.org Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 9acb3247e0e1d94e667a59568730f990486d6b25 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:41 2019 +0100 crypto: mxs - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Tested-by: Horia Geantă Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 4aaf384095ec7d6c215eee31ac5189e4291abdd5 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:40 2019 +0100 crypto: ixp4xx - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b462973aa9cd3caf529f32c69aa420c68339ba08 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:39 2019 +0100 crypto: hifn - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7cea6d3e01c2f4bf5e0687dcc8b4215b92580c16 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:38 2019 +0100 crypto: chelsio - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Cc: Atul Gupta Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ac0d3d130f909f4d8f402b185a68d76150ebdf78 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:37 2019 +0100 crypto: cavium/cpt - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit e8306261a3625f7ef8b25bd6a71431a519cea607 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:36 2019 +0100 crypto: nitrox - remove cra_type reference to ablkcipher Setting the cra_type field is not necessary for skciphers, and ablkcipher will be removed, so drop the assignment from the nitrox driver. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit a9c01cd608c43912320c830275395f2c78c94719 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:35 2019 +0100 crypto: bcm-spu - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 967d4910ef0e832d42c23f62a548336939164def Author: Ard Biesheuvel Date: Sat Nov 9 18:09:34 2019 +0100 crypto: atmel-tdes - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Tested-by: Tudor Ambarus Signed-off-by: Ard Biesheuvel Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 7ada42d2519e8197462f44311acda8caaa634be4 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:33 2019 +0100 crypto: atmel-aes - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Tested-by: Tudor Ambarus Signed-off-by: Ard Biesheuvel Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu commit e6b98ce6145a2c681765a9b8026c2b26fff5629d Author: Ard Biesheuvel Date: Sat Nov 9 18:09:32 2019 +0100 crypto: s5p - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Reviewed-by: Kamil Konieczny Tested-by: Kamil Konieczny Acked-by: Krzysztof Kozlowski Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b5e5c373ead45c6f5492520b46d53222324a068f Author: Ard Biesheuvel Date: Sat Nov 9 18:09:31 2019 +0100 crypto: ux500 - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b3e3f0fe4f555232ddd64af86e383891dda86c26 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:30 2019 +0100 crypto: omap - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Reviewed-by: Tero Kristo Tested-by: Tero Kristo Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit be9fe620af63e76781d869f61d7e306bbe482415 Author: Ard Biesheuvel Date: Sat Nov 9 18:09:29 2019 +0100 crypto: ccp - switch from ablkcipher to skcipher Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Reviewed-by: Gary R Hook Tested-by: Gary R Hook Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit eee1d6fca0a02f5a089ad063812f98e717b8e7df Author: Ard Biesheuvel Date: Sat Nov 9 18:09:28 2019 +0100 crypto: virtio - switch to skcipher API Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support routines alive, along with the matching code to expose [a]blkciphers via the skcipher API. So switch this driver to the skcipher API, allowing us to finally drop the ablkcipher code in the near future. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Gonglei Cc: virtualization@lists.linux-foundation.org Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 19c5da7d4a2662e85ea67d2d81df57e038fde3ab Author: Ard Biesheuvel Date: Sat Nov 9 18:09:27 2019 +0100 crypto: virtio - deal with unsupported input sizes Return -EINVAL for input sizes that are not a multiple of the AES block size, since they are not supported by our CBC chaining mode. While at it, remove the pr_err() that reports unsupported key sizes being used: we shouldn't spam the kernel log with that. Fixes: dbaf0624ffa5 ("crypto: add virtio-crypto driver") Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Gonglei Cc: virtualization@lists.linux-foundation.org Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 500e6807ce93b1fdc7d5b827c5cc167cc35630db Author: Ard Biesheuvel Date: Sat Nov 9 18:09:26 2019 +0100 crypto: virtio - implement missing support for output IVs In order to allow for CBC to be chained, which is something that the CTS template relies upon, implementations of CBC need to pass the IV to be used for subsequent invocations via the IV buffer. This was not implemented yet for virtio-crypto so implement it now. Fixes: dbaf0624ffa5 ("crypto: add virtio-crypto driver") Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Gonglei Cc: virtualization@lists.linux-foundation.org Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 07d8f18588324b71aa8188cea5df3f1de5e354cb Author: Corentin Labbe Date: Fri Nov 8 15:42:13 2019 +0000 crypto: tcrypt - constify check alg list this patchs constify the alg list because this list is never modified. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit d95312a3ccc0cd544d374be2fc45aeaa803e5fd9 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:40 2019 +0100 crypto: lib/chacha20poly1305 - reimplement crypt_from_sg() routine Reimplement the library routines to perform chacha20poly1305 en/decryption on scatterlists, without [ab]using the [deprecated] blkcipher interface, which is rather heavyweight and does things we don't really need. Instead, we use the sg_miter API in a novel and clever way, to iterate over the scatterlist in-place (i.e., source == destination, which is the only way this library is expected to be used). That way, we don't have to iterate over two scatterlists in parallel. Another optimization is that, instead of relying on the blkcipher walker to present the input in suitable chunks, we recognize that ChaCha is a streamcipher, and so we can simply deal with partial blocks by keeping a block of cipherstream on the stack and use crypto_xor() to mix it with the in/output. Finally, we omit the scatterwalk_and_copy() call if the last element of the scatterlist covers the MAC as well (which is the common case), avoiding the need to walk the scatterlist and kmap() the page twice. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ed20078b7e3331e82828be357147af6a3282e4ce Author: Ard Biesheuvel Date: Fri Nov 8 13:22:39 2019 +0100 crypto: chacha20poly1305 - import construction and selftest from Zinc This incorporates the chacha20poly1305 from the Zinc library, retaining the library interface, but replacing the implementation with calls into the code that already existed in the kernel's crypto API. Note that this library API does not implement RFC7539 fully, given that it is limited to 64-bit nonces. (The 96-bit nonce version that was part of the selftest only has been removed, along with the 96-bit nonce test vectors that only tested the selftest but not the actual library itself) Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit d8f1308a025fc7e00414194ed742d5f05a21e13c Author: Jason A. Donenfeld Date: Fri Nov 8 13:22:38 2019 +0100 crypto: arm/curve25519 - wire up NEON implementation This ports the SUPERCOP implementation for usage in kernel space. In addition to the usual header, macro, and style changes required for kernel space, it makes a few small changes to the code: - The stack alignment is relaxed to 16 bytes. - Superfluous mov statements have been removed. - ldr for constants has been replaced with movw. - ldreq has been replaced with moveq. - The str epilogue has been made more idiomatic. - SIMD registers are not pushed and popped at the beginning and end. - The prologue and epilogue have been made idiomatic. - A hole has been removed from the stack, saving 32 bytes. - We write-back the base register whenever possible for vld1.8. - Some multiplications have been reordered for better A7 performance. There are more opportunities for cleanup, since this code is from qhasm, which doesn't always do the most opportune thing. But even prior to extensive hand optimizations, this code delivers significant performance improvements (given in get_cycles() per call): ----------- ------------- | generic C | this commit | ------------ ----------- ------------- | Cortex-A7 | 49136 | 22395 | ------------ ----------- ------------- | Cortex-A17 | 17326 | 4983 | ------------ ----------- ------------- Signed-off-by: Jason A. Donenfeld [ardb: - move to arch/arm/crypto - wire into lib/crypto framework - implement crypto API KPP hooks ] Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit f0fb006b604f98e2309a30f34ef455ac734f7c1c Author: Jason A. Donenfeld Date: Fri Nov 8 13:22:37 2019 +0100 crypto: arm/curve25519 - import Bernstein and Schwabe's Curve25519 ARM implementation This comes from Dan Bernstein and Peter Schwabe's public domain NEON code, and is included here in raw form so that subsequent commits that fix these up for the kernel can see how it has changed. This code does have some entirely cosmetic formatting differences, adding indentation and so forth, so that when we actually port it for use in the kernel in the subsequent commit, it's obvious what's changed in the process. This code originates from SUPERCOP 20180818, available at . Signed-off-by: Jason A. Donenfeld Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit bb611bdfd6be34d9f822c73305fcc83720499d38 Author: Jason A. Donenfeld Date: Fri Nov 8 13:22:36 2019 +0100 crypto: curve25519 - x86_64 library and KPP implementations This implementation is the fastest available x86_64 implementation, and unlike Sandy2x, it doesn't requie use of the floating point registers at all. Instead it makes use of BMI2 and ADX, available on recent microarchitectures. The implementation was written by Armando Faz-Hernández with contributions (upstream) from Samuel Neves and me, in addition to further changes in the kernel implementation from us. Signed-off-by: Jason A. Donenfeld Signed-off-by: Samuel Neves Co-developed-by: Samuel Neves [ardb: - move to arch/x86/crypto - wire into lib/crypto framework - implement crypto API KPP hooks ] Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 660bb8e1f833ea63185fe80fde847e3e42f18e3b Author: Ard Biesheuvel Date: Fri Nov 8 13:22:35 2019 +0100 crypto: lib/curve25519 - work around Clang stack spilling issue Arnd reports that the 32-bit generic library code for Curve25119 ends up using an excessive amount of stack space when built with Clang: lib/crypto/curve25519-fiat32.c:756:6: error: stack frame size of 1384 bytes in function 'curve25519_generic' [-Werror,-Wframe-larger-than=] Let's give some hints to the compiler regarding which routines should not be inlined, to prevent it from running out of registers and spilling to the stack. The resulting code performs identically under both GCC and Clang, and makes the warning go away. Suggested-by: Arnd Bergmann Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ee772cb641135739c1530647391d5a04c39db192 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:34 2019 +0100 crypto: curve25519 - implement generic KPP driver Expose the generic Curve25519 library via the crypto API KPP interface. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit f613457a7af085728297bef71233c37faf3c01b1 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:33 2019 +0100 crypto: curve25519 - add kpp selftest In preparation of introducing KPP implementations of Curve25519, import the set of test cases proposed by the Zinc patch set, but converted to the KPP format. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 0ed42a6f431e930b2e8fae21955406e09fe75d70 Author: Jason A. Donenfeld Date: Fri Nov 8 13:22:32 2019 +0100 crypto: curve25519 - generic C library implementations This contains two formally verified C implementations of the Curve25519 scalar multiplication function, one for 32-bit systems, and one for 64-bit systems whose compiler supports efficient 128-bit integer types. Not only are these implementations formally verified, but they are also the fastest available C implementations. They have been modified to be friendly to kernel space and to be generally less horrendous looking, but still an effort has been made to retain their formally verified characteristic, and so the C might look slightly unidiomatic. The 64-bit version comes from HACL*: https://github.com/project-everest/hacl-star The 32-bit version comes from Fiat: https://github.com/mit-plv/fiat-crypto Information: https://cr.yp.to/ecdh.html Signed-off-by: Jason A. Donenfeld [ardb: - move from lib/zinc to lib/crypto - replace .c #includes with Kconfig based object selection - drop simd handling and simplify support for per-arch versions ] Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ed0356eda153f6a95649e11feb7b07083caf9e20 Author: Jason A. Donenfeld Date: Fri Nov 8 13:22:31 2019 +0100 crypto: blake2s - x86_64 SIMD implementation These implementations from Samuel Neves support AVX and AVX-512VL. Originally this used AVX-512F, but Skylake thermal throttling made AVX-512VL more attractive and possible to do with negligable difference. Signed-off-by: Jason A. Donenfeld Signed-off-by: Samuel Neves Co-developed-by: Samuel Neves [ardb: move to arch/x86/crypto, wire into lib/crypto framework] Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7f9b0880925f1f9d7d59504ea0892d2ae9cfc233 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:30 2019 +0100 crypto: blake2s - implement generic shash driver Wire up our newly added Blake2s implementation via the shash API. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 17e1df67023a5c9ccaeb5de8bf5b88f63127ecf7 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:29 2019 +0100 crypto: testmgr - add test cases for Blake2s As suggested by Eric for the Blake2b implementation contributed by David, introduce a set of test vectors for Blake2s covering different digest and key sizes. blake2s-128 blake2s-160 blake2s-224 blake2s-256 --------------------------------------------------- len=0 | klen=0 klen=1 klen=16 klen=32 len=1 | klen=16 klen=32 klen=0 klen=1 len=7 | klen=32 klen=0 klen=1 klen=16 len=15 | klen=1 klen=16 klen=32 klen=0 len=64 | klen=0 klen=1 klen=16 klen=32 len=247 | klen=16 klen=32 klen=0 klen=1 len=256 | klen=32 klen=0 klen=1 klen=16 Cc: David Sterba Cc: Eric Biggers Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 66d7fb94e4ffe5acc589e0b2b4710aecc1f07a28 Author: Jason A. Donenfeld Date: Fri Nov 8 13:22:28 2019 +0100 crypto: blake2s - generic C library implementation and selftest The C implementation was originally based on Samuel Neves' public domain reference implementation but has since been heavily modified for the kernel. We're able to do compile-time optimizations by moving some scaffolding around the final function into the header file. Information: https://blake2.net/ Signed-off-by: Jason A. Donenfeld Signed-off-by: Samuel Neves Co-developed-by: Samuel Neves [ardb: - move from lib/zinc to lib/crypto - remove simd handling - rewrote selftest for better coverage - use fixed digest length for blake2s_hmac() and rename to blake2s256_hmac() ] Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit c12d3362a74bf0cd9e1d488918d40607b62a3104 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:27 2019 +0100 int128: move __uint128_t compiler test to Kconfig In order to use 128-bit integer arithmetic in C code, the architecture needs to have declared support for it by setting ARCH_SUPPORTS_INT128, and it requires a version of the toolchain that supports this at build time. This is why all existing tests for ARCH_SUPPORTS_INT128 also test whether __SIZEOF_INT128__ is defined, since this is only the case for compilers that can support 128-bit integers. Let's fold this additional test into the Kconfig declaration of ARCH_SUPPORTS_INT128 so that we can also use the symbol in Makefiles, e.g., to decide whether a certain object needs to be included in the first place. Cc: Masahiro Yamada Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit a11d055e7a64ac34a5e99b6fe731299449cbcd58 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:26 2019 +0100 crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation This is a straight import of the OpenSSL/CRYPTOGAMS Poly1305 implementation for MIPS authored by Andy Polyakov, a prior 64-bit only version of which has been contributed by him to the OpenSSL project. The file 'poly1305-mips.pl' is taken straight from this upstream GitHub repository [0] at commit d22ade312a7af958ec955620b0d241cf42c37feb, and already contains all the changes required to build it as part of a Linux kernel module. [0] https://github.com/dot-asm/cryptogams Co-developed-by: Andy Polyakov Signed-off-by: Andy Polyakov Co-developed-by: René van Dorst Signed-off-by: René van Dorst Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit a6b803b3ddc793d6db0c16f12fc12d30d20fa9cc Author: Ard Biesheuvel Date: Fri Nov 8 13:22:25 2019 +0100 crypto: arm/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation This is a straight import of the OpenSSL/CRYPTOGAMS Poly1305 implementation for NEON authored by Andy Polyakov, and contributed by him to the OpenSSL project. The file 'poly1305-armv4.pl' is taken straight from this upstream GitHub repository [0] at commit ec55a08dc0244ce570c4fc7cade330c60798952f, and already contains all the changes required to build it as part of a Linux kernel module. [0] https://github.com/dot-asm/cryptogams Co-developed-by: Andy Polyakov Signed-off-by: Andy Polyakov Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit f569ca16475155013525686d0f73bc379c67e635 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:24 2019 +0100 crypto: arm64/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation This is a straight import of the OpenSSL/CRYPTOGAMS Poly1305 implementation for NEON authored by Andy Polyakov, and contributed by him to the OpenSSL project. The file 'poly1305-armv8.pl' is taken straight from this upstream GitHub repository [0] at commit ec55a08dc0244ce570c4fc7cade330c60798952f, and already contains all the changes required to build it as part of a Linux kernel module. [0] https://github.com/dot-asm/cryptogams Co-developed-by: Andy Polyakov Signed-off-by: Andy Polyakov Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit f0e89bcfbb894e5844cd1bbf6b3cf7c63cb0f5ac Author: Ard Biesheuvel Date: Fri Nov 8 13:22:23 2019 +0100 crypto: x86/poly1305 - expose existing driver as poly1305 library Implement the arch init/update/final Poly1305 library routines in the accelerated SIMD driver for x86 so they are accessible to users of the Poly1305 library interface as well. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 1b2c6a5120489d41c8ea3b8dacd0b4586289b158 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:22 2019 +0100 crypto: x86/poly1305 - depend on generic library not generic shash Remove the dependency on the generic Poly1305 driver. Instead, depend on the generic library so that we only reuse code without pulling in the generic skcipher implementation as well. While at it, remove the logic that prefers the non-SIMD path for short inputs - this is no longer necessary after recent FPU handling changes on x86. Since this removes the last remaining user of the routines exported by the generic shash driver, unexport them and make them static. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit a1d93064094cc5e24d64e35cf093e7191d0c9344 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:21 2019 +0100 crypto: poly1305 - expose init/update/final library interface Expose the existing generic Poly1305 code via a init/update/final library interface so that callers are not required to go through the crypto API's shash abstraction to access it. At the same time, make some preparations so that the library implementation can be superseded by an accelerated arch-specific version in the future. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ad8f5b88383ea685f2b8df2a12ee3e08089a1287 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:20 2019 +0100 crypto: x86/poly1305 - unify Poly1305 state struct with generic code In preparation of exposing a Poly1305 library interface directly from the accelerated x86 driver, align the state descriptor of the x86 code with the one used by the generic driver. This is needed to make the library interface unified between all implementations. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 48ea8c6ebc96bc0990e12ee1c43d0832c23576bb Author: Ard Biesheuvel Date: Fri Nov 8 13:22:19 2019 +0100 crypto: poly1305 - move core routines into a separate library Move the core Poly1305 routines shared between the generic Poly1305 shash driver and the Adiantum and NHPoly1305 drivers into a separate library so that using just this pieces does not pull in the crypto API pieces of the generic Poly1305 routine. In a subsequent patch, we will augment this generic library with init/update/final routines so that Poyl1305 algorithm can be used directly without the need for using the crypto API's shash abstraction. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 22cf705360707ced15f9fe5423938f313c7df536 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:18 2019 +0100 crypto: chacha - unexport chacha_generic routines Now that all users of generic ChaCha code have moved to the core library, there is no longer a need for the generic ChaCha skcpiher driver to export parts of it implementation for reuse by other drivers. So drop the exports, and make the symbols static. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 3a2f58f3ba4f6f44e33d1a48240d5eadb882cb59 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:17 2019 +0100 crypto: mips/chacha - wire up accelerated 32r2 code from Zinc This integrates the accelerated MIPS 32r2 implementation of ChaCha into both the API and library interfaces of the kernel crypto stack. The significance of this is that, in addition to becoming available as an accelerated library implementation, it can also be used by existing crypto API code such as Adiantum (for block encryption on ultra low performance cores) or IPsec using chacha20poly1305. These are use cases that have already opted into using the abstract crypto API. In order to support Adiantum, the core assembler routine has been adapted to take the round count as a function argument rather than hardcoding it to 20. Co-developed-by: René van Dorst Signed-off-by: René van Dorst Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 49aa7c00eddf8d8f462b0256bd82e81762d7b0c6 Author: Jason A. Donenfeld Date: Fri Nov 8 13:22:16 2019 +0100 crypto: mips/chacha - import 32r2 ChaCha code from Zinc This imports the accelerated MIPS 32r2 ChaCha20 implementation from the Zinc patch set. Co-developed-by: René van Dorst Signed-off-by: René van Dorst Signed-off-by: Jason A. Donenfeld Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit a44a3430d71bad4ee56788a59fff099b291ea54c Author: Ard Biesheuvel Date: Fri Nov 8 13:22:15 2019 +0100 crypto: arm/chacha - expose ARM ChaCha routine as library function Expose the accelerated NEON ChaCha routine directly as a symbol export so that users of the ChaCha library API can use it directly. Given that calls into the library API will always go through the routines in this module if it is enabled, switch to static keys to select the optimal implementation available (which may be none at all, in which case we defer to the generic implementation for all invocations). Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b36d8c09e710c71f6a9690b6586fea2d1c9e1e27 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:14 2019 +0100 crypto: arm/chacha - remove dependency on generic ChaCha driver Instead of falling back to the generic ChaCha skcipher driver for non-SIMD cases, use a fast scalar implementation for ARM authored by Eric Biggers. This removes the module dependency on chacha-generic altogether, which also simplifies things when we expose the ChaCha library interface from this module. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 29621d099f9c642b22a69dc8e7e20c108473a392 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:13 2019 +0100 crypto: arm/chacha - import Eric Biggers's scalar accelerated ChaCha code Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b3aad5bad26a01a4bd8c49a5c5f52aec665f3b7c Author: Ard Biesheuvel Date: Fri Nov 8 13:22:12 2019 +0100 crypto: arm64/chacha - expose arm64 ChaCha routine as library function Expose the accelerated NEON ChaCha routine directly as a symbol export so that users of the ChaCha library API can use it directly. Given that calls into the library API will always go through the routines in this module if it is enabled, switch to static keys to select the optimal implementation available (which may be none at all, in which case we defer to the generic implementation for all invocations). Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit c77da4867cbb7841177275dbb250f5c09679fae4 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:11 2019 +0100 crypto: arm64/chacha - depend on generic chacha library instead of crypto driver Depend on the generic ChaCha library routines instead of pulling in the generic ChaCha skcipher driver, which is more than we need, and makes managing the dependencies between the generic library, generic driver, accelerated library and driver more complicated. While at it, drop the logic to prefer the scalar code on short inputs. Turning the NEON on and off is cheap these days, and one major use case for ChaCha20 is ChaCha20-Poly1305, which is guaranteed to hit the scalar path upon every invocation (when doing the Poly1305 nonce generation) Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 84e03fa39fbe95a5567d43bff458c6d3b3a23ad1 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:10 2019 +0100 crypto: x86/chacha - expose SIMD ChaCha routine as library function Wire the existing x86 SIMD ChaCha code into the new ChaCha library interface, so that users of the library interface will get the accelerated version when available. Given that calls into the library API will always go through the routines in this module if it is enabled, switch to static keys to select the optimal implementation available (which may be none at all, in which case we defer to the generic implementation for all invocations). Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 28e8d89b1ce8d2e7badfb5f69971dd635acb8863 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:09 2019 +0100 crypto: x86/chacha - depend on generic chacha library instead of crypto driver In preparation of extending the x86 ChaCha driver to also expose the ChaCha library interface, drop the dependency on the chacha_generic crypto driver as a non-SIMD fallback, and depend on the generic ChaCha library directly. This way, we only pull in the code we actually need, without registering a set of ChaCha skciphers that we will never use. Since turning the FPU on and off is cheap these days, simplify the SIMD routine by dropping the per-page yield, which makes for a cleaner switch to the library API as well. This also allows use to invoke the skcipher walk routines in non-atomic mode. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 5fb8ef25803ef33e2eb60b626435828b937bed75 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:08 2019 +0100 crypto: chacha - move existing library code into lib/crypto Currently, our generic ChaCha implementation consists of a permute function in lib/chacha.c that operates on the 64-byte ChaCha state directly [and which is always included into the core kernel since it is used by the /dev/random driver], and the crypto API plumbing to expose it as a skcipher. In order to support in-kernel users that need the ChaCha streamcipher but have no need [or tolerance] for going through the abstractions of the crypto API, let's expose the streamcipher bits via a library API as well, in a way that permits the implementation to be superseded by an architecture specific one if provided. So move the streamcipher code into a separate module in lib/crypto, and expose the init() and crypt() routines to users of the library. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 746b2e024c67aa605ac12d135cd7085a49cf9dc4 Author: Ard Biesheuvel Date: Fri Nov 8 13:22:07 2019 +0100 crypto: lib - tidy up lib/crypto Kconfig and Makefile In preparation of introducing a set of crypto library interfaces, tidy up the Makefile and split off the Kconfig symbols into a separate file. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 20cc01baa33463e9e8b202b0cbaeafbac0f9202c Author: Herbert Xu Date: Fri Nov 8 18:41:58 2019 +0800 crypto: aead - Split out geniv into its own module If aead is built as a module along with cryptomgr, it creates a dependency loop due to the dependency chain aead => crypto_null => cryptomgr => aead. This is due to the presence of the AEAD geniv code. This code is not really part of the AEAD API but simply support code for IV generators such as seqiv. This patch moves the geniv code into its own module thus breaking the dependency loop. Signed-off-by: Herbert Xu commit 8ab23d547f652979bafd710d9e34983aaceea517 Author: Herbert Xu Date: Fri Nov 8 18:26:30 2019 +0800 crypto: api - Add softdep on cryptomgr The crypto API requires cryptomgr to be present for probing to work so we need a softdep to ensure that cryptomgr is added to the initramfs. This was usually not a problem because until very recently it was not practical to build crypto API as module but with the recent work to eliminate direct AES users this is now possible. Signed-off-by: Herbert Xu commit 3bbcdb152b28a3d4e616251b1a97aa654ca38da8 Author: Corentin Labbe Date: Fri Nov 8 10:13:06 2019 +0000 MAINTAINERS: add linux-amlogic list for amlogic crypto The linux-amlogic mailing list need to be in copy of all patch for the amlogic crypto. Signed-off-by: Corentin Labbe Acked-by: Neil Armstrong Signed-off-by: Herbert Xu commit 56601574c12ff91bf6b0b5e913178b43541a0ca7 Author: Corentin Labbe Date: Fri Nov 8 09:45:17 2019 +0000 crypto: amlogic - fix two resources leak This patch fixes two resources leak that occur on error path. Reported-by: coverity-bot Addresses-Coverity-ID: 1487403 ("RESOURCE_LEAK") Addresses-Coverity-ID: 1487401 ("Resource leaks") Fixes: 48fe583fe541 ("crypto: amlogic - Add crypto accelerator for amlogic GXL") Signed-off-by: Corentin Labbe Reviewed-by: Kees Cook Signed-off-by: Herbert Xu commit b8151220f35da4653d95c840e03b8a9db2c0d1c0 Author: Pascal van Leeuwen Date: Fri Nov 8 10:00:21 2019 +0100 crypto: inside-secure - Fixed authenc w/ (3)DES fails on Macchiatobin Fixed 2 copy-paste mistakes in the commit mentioned below that caused authenc w/ (3)DES to consistently fail on Macchiatobin (but strangely work fine on x86+FPGA??). Now fully tested on both platforms. Fixes: 13a1bb93f7b1c9 ("crypto: inside-secure - Fixed warnings...") Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 4a97bfc79619c40d400f2a7b763a0d9cd1d33891 Author: Greg Kroah-Hartman Date: Thu Nov 7 09:52:00 2019 +0100 crypto: hisilicon - no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Zhou Wang Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Herbert Xu commit 39977f4b51cdc544de4e5950751655f6693654a7 Author: Hao Fang Date: Thu Nov 7 11:48:29 2019 +0800 crypto: hisilicon - add vfs_num module param for zip Currently the VF can be enabled only through sysfs interface after module loaded, but this also needs to be done when the module loaded in some scenarios. This patch adds module param vfs_num, adds hisi_zip_sriov_enable() in probe, and also adjusts the position of probe. Signed-off-by: Hao Fang Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu commit c3510fec6e824cd7ab75f77c80412b746928aa2b Author: Pascal van Leeuwen Date: Wed Nov 6 16:13:07 2019 +0100 crypto: inside-secure - Fix hangup during probing for EIP97 engine Fixed mask used for CFSIZE and RFSIZE fields of HIA_OPTIONS register, these were all 1 bit too wide. Which caused the probing of a standard EIP97 to actually hang due to assume way too large descriptor FIFO's. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 6d01d8511dceb9cd40f72eb102b7d24f0b2e997b Author: Alexander Sverdlin Date: Wed Nov 6 09:30:49 2019 +0000 hwrng: ks-sa - Add minimum sleep time before ready-polling Current polling timeout is 25 us. The hardware is currently configured to harvest the entropy for 81920 us. This leads to timeouts even during blocking read (wait=1). Log snippet: [ 5.727589] [] (ks_sa_rng_probe) from [] (platform_drv_probe+0x58/0xb4) ... [ 5.727805] hwrng: no data available ... [ 13.157016] random: systemd: uninitialized urandom read (16 bytes read) [ 13.157033] systemd[1]: Initializing machine ID from random generator. ... [ 15.848770] random: fast init done ... [ 15.848807] random: crng init done After the patch: [ 6.223534] random: systemd: uninitialized urandom read (16 bytes read) [ 6.223551] systemd[1]: Initializing machine ID from random generator. ... [ 6.876075] random: fast init done ... [ 6.954200] random: systemd: uninitialized urandom read (16 bytes read) [ 6.955244] random: systemd: uninitialized urandom read (16 bytes read) ... [ 7.121948] random: crng init done Signed-off-by: Alexander Sverdlin Signed-off-by: Herbert Xu commit db6efda85437d783dd921da5d67ec818826adb12 Merge: 002d3c65ee81 03212e347f94 Author: Olof Johansson Date: Sat Nov 16 15:38:57 2019 -0800 Merge tag 'tee-fixes-for-v5.4' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Two OP-TE driver fixes: - Add proper cleanup on optee_enumerate_devices() failure - Make sure to register kernel allocations of dynamic shared memory * tag 'tee-fixes-for-v5.4' of git://git.linaro.org/people/jens.wiklander/linux-tee: (591 commits) tee: optee: fix device enumeration error handling tee: optee: Fix dynamic shm pool allocations Linux 5.4-rc3 tracing: Initialize iter->seq after zeroing in tracing_read_pipe() tracing/hwlat: Don't ignore outer-loop duration when calculating max_latency tracing/hwlat: Report total time spent in all NMIs during the sample recordmcount: Fix nop_mcount() function tracing: Do not create tracefs files if tracefs lockdown is in effect tracing: Add locked_down checks to the open calls of files created for tracefs tracing: Add tracing_check_open_get_tr() tracing: Have trace events system open call tracing_open_generic_tr() tracing: Get trace_array reference for available_tracers files ftrace: Get a reference counter for the trace_array on filter files tracefs: Revert ccbd54ff54e8 ("tracefs: Restrict tracefs when the kernel is locked down") perf/x86/cstate: Add Tiger Lake CPU support perf/x86/msr: Add Tiger Lake CPU support perf/x86/intel: Add Tiger Lake CPU support perf/x86/cstate: Update C-state counters for Ice Lake perf/x86/msr: Add new CPU model numbers for Ice Lake perf/x86/cstate: Add Comet Lake CPU support ... Link: https://lore.kernel.org/r/20191115105353.GA26176@jax Signed-off-by: Olof Johansson commit a235f803dbc878d1db83cbaabf6963ca9ef3a1a2 Merge: 8400f492a068 b50a85c023f4 Author: Olof Johansson Date: Sat Nov 16 15:37:40 2019 -0800 Merge tag 'aspeed-5.5-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/defconfig ASPEED device tree updates for 5.5 This adds recently merged drivers to the aspeed g4 and g5 defconfigs, and to the multi v5 and v7 shared defconfigs. * tag 'aspeed-5.5-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: config: multi_v5: ASPEED SDHCI, SGPIO ARM: configs: multi_v7: ASPEED network, gpio, FSI ARM: config: aspeed-g4: Add MMC, and cleanup ARM: config: aspeed-g5: Add SGPIO and FSI drivers ARM: config: aspeed-g5: Enable 8250_DW quirks Link: https://lore.kernel.org/r/CACPK8Xc3a=6irkTSfwyPrr=nWv_fa9nMxthtC2AyqFJEWvuMwg@mail.gmail.com Signed-off-by: Olof Johansson commit 3f6939aec712a15152c32516c1c543a91ac1e717 Merge: 84a1b6e1d938 7bd39bc6bfdf Author: Olof Johansson Date: Sat Nov 16 15:33:24 2019 -0800 Merge tag 'scmi-fix-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers ARM SCMI fix for v5.5 Just a single fix to correct the SCMI fast channel doorbell ring logic when CONFIG_64BIT is not set. * tag 'scmi-fix-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT Link: https://lore.kernel.org/r/20191114164555.GA19398@bogus Signed-off-by: Olof Johansson commit 1e8795b1b20d2721620165434cdcf427ecd2ba85 Author: kbuild test robot Date: Sat Nov 16 06:38:34 2019 +0800 mscc.c: fix semicolon.cocci warnings drivers/net/phy/mscc.c:1683:3-4: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 75a1ccfe6c72 ("mscc.c: Add support for additional VSC PHYs") CC: Bryan Whitehead Signed-off-by: kbuild test robot Signed-off-by: David S. Miller commit 597b01edafac57aafdbf1ca51e26ceb41c371912 Author: Eric Dumazet Date: Fri Nov 15 17:55:54 2019 -0800 selftests: net: avoid ptl lock contention in tcp_mmap tcp_mmap is used as a reference program for TCP rx zerocopy, so it is important to point out some potential issues. If multiple threads are concurrently using getsockopt(... TCP_ZEROCOPY_RECEIVE), there is a chance the low-level mm functions compete on shared ptl lock, if vma are arbitrary placed. Instead of letting the mm layer place the chunks back to back, this patch enforces an alignment so that each thread uses a different ptl lock. Performance measured on a 100 Gbit NIC, with 8 tcp_mmap clients launched at the same time : $ for f in {1..8}; do ./tcp_mmap -H 2002:a05:6608:290:: & done In the following run, we reproduce the old behavior by requesting no alignment : $ tcp_mmap -sz -C $((128*1024)) -a 4096 received 32768 MB (100 % mmap'ed) in 9.69532 s, 28.3516 Gbit cpu usage user:0.08634 sys:3.86258, 120.511 usec per MB, 171839 c-switches received 32768 MB (100 % mmap'ed) in 25.4719 s, 10.7914 Gbit cpu usage user:0.055268 sys:21.5633, 659.745 usec per MB, 9065 c-switches received 32768 MB (100 % mmap'ed) in 28.5419 s, 9.63069 Gbit cpu usage user:0.057401 sys:23.8761, 730.392 usec per MB, 14987 c-switches received 32768 MB (100 % mmap'ed) in 28.655 s, 9.59268 Gbit cpu usage user:0.059689 sys:23.8087, 728.406 usec per MB, 18509 c-switches received 32768 MB (100 % mmap'ed) in 28.7808 s, 9.55074 Gbit cpu usage user:0.066042 sys:23.4632, 718.056 usec per MB, 24702 c-switches received 32768 MB (100 % mmap'ed) in 28.8259 s, 9.5358 Gbit cpu usage user:0.056547 sys:23.6628, 723.858 usec per MB, 23518 c-switches received 32768 MB (100 % mmap'ed) in 28.8808 s, 9.51767 Gbit cpu usage user:0.059357 sys:23.8515, 729.703 usec per MB, 14691 c-switches received 32768 MB (100 % mmap'ed) in 28.8879 s, 9.51534 Gbit cpu usage user:0.047115 sys:23.7349, 725.769 usec per MB, 21773 c-switches New behavior (automatic alignment based on Hugepagesize), we can see the system overhead being dramatically reduced. $ tcp_mmap -sz -C $((128*1024)) received 32768 MB (100 % mmap'ed) in 13.5339 s, 20.3103 Gbit cpu usage user:0.122644 sys:3.4125, 107.884 usec per MB, 168567 c-switches received 32768 MB (100 % mmap'ed) in 16.0335 s, 17.1439 Gbit cpu usage user:0.132428 sys:3.55752, 112.608 usec per MB, 188557 c-switches received 32768 MB (100 % mmap'ed) in 17.5506 s, 15.6621 Gbit cpu usage user:0.155405 sys:3.24889, 103.891 usec per MB, 226652 c-switches received 32768 MB (100 % mmap'ed) in 19.1924 s, 14.3222 Gbit cpu usage user:0.135352 sys:3.35583, 106.542 usec per MB, 207404 c-switches received 32768 MB (100 % mmap'ed) in 22.3649 s, 12.2906 Gbit cpu usage user:0.142429 sys:3.53187, 112.131 usec per MB, 250225 c-switches received 32768 MB (100 % mmap'ed) in 22.5336 s, 12.1986 Gbit cpu usage user:0.140654 sys:3.61971, 114.757 usec per MB, 253754 c-switches received 32768 MB (100 % mmap'ed) in 22.5483 s, 12.1906 Gbit cpu usage user:0.134035 sys:3.55952, 112.718 usec per MB, 252997 c-switches received 32768 MB (100 % mmap'ed) in 22.6442 s, 12.139 Gbit cpu usage user:0.126173 sys:3.71251, 117.147 usec per MB, 253728 c-switches Signed-off-by: Eric Dumazet Cc: Soheil Hassas Yeganeh Cc: Arjun Roy Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 229c1e0dfd3dfac23b33b7cd88bcb7a9e391b000 Author: Heiner Kallweit Date: Fri Nov 15 22:38:25 2019 +0100 r8169: load firmware for RTL8168fp/RTL8117 Load Realtek-provided firmware for RTL8168fp/RTL8117. Unlike the firmware for other chip versions which is for the PHY, firmware for RTL8168fp/RTL8117 is for the MAC. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 718af5bc9709dbab643788719af32d4dfd9d9d35 Author: Heiner Kallweit Date: Fri Nov 15 21:35:22 2019 +0100 r8169: improve conditional firmware loading for RTL8168d Using constant MII_EXPANSION is misleading here because register 0x06 has a different meaning on page 0x0005. Here a proprietary PHY parameter is read by writing the parameter id to register 0x05 on page 0x0005, followed by reading the parameter value from register 0x06. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 725ea4bff9ad6d594e2a633fcdc673dfcaf55d43 Author: Russell King Date: Fri Nov 15 20:05:45 2019 +0000 net: phylink: update to use phy_support_asym_pause() Use phy_support_asym_pause() rather than open-coding it. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 50bef71900d25433418529476e7ea8f5826f6c2d Merge: df98be06c94d 4f5969c36a45 Author: David S. Miller Date: Sat Nov 16 13:06:07 2019 -0800 Merge tag 'wireless-drivers-next-2019-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.5 Second set of patches for v5.5. Nothing special this time, smaller features to various drivers and of course fixes all over. Major changes: iwlwifi * update scan FW API * bump the supported FW API version * add debug dump collection on assert in WoWLAN * enable adaptive dwell on P2P interfaces ath10k * request for PM_QOS_CPU_DMA_LATENCY to improve firmware initialisation time qtnfmac * add support for getting/setting transmit power * handle MIC failure event from firmware rtl8xxxu * add support for Edimax EW-7611ULB wil6210 * add SPDX license identifiers ==================== Signed-off-by: David S. Miller commit df98be06c94d23e2a8e12065bf2df5b186b81f0f Author: Matteo Croce Date: Fri Nov 15 12:10:37 2019 +0100 bonding: symmetric ICMP transmit A bonding with layer2+3 or layer3+4 hashing uses the IP addresses and the ports to balance packets between slaves. With some network errors, we receive an ICMP error packet by the remote host or a router. If sent by a router, the source IP can differ from the remote host one. Additionally the ICMP protocol has no port numbers, so a layer3+4 bonding will get a different hash than the previous one. These two conditions could let the packet go through a different interface than the other packets of the same flow: # tcpdump -qltnni veth0 |sed 's/^/0: /' & # tcpdump -qltnni veth1 |sed 's/^/1: /' & # hping3 -2 192.168.0.2 -p 9 0: IP 192.168.0.1.2251 > 192.168.0.2.9: UDP, length 0 1: IP 192.168.0.2 > 192.168.0.1: ICMP 192.168.0.2 udp port 9 unreachable, length 36 1: IP 192.168.0.1.2252 > 192.168.0.2.9: UDP, length 0 1: IP 192.168.0.2 > 192.168.0.1: ICMP 192.168.0.2 udp port 9 unreachable, length 36 1: IP 192.168.0.1.2253 > 192.168.0.2.9: UDP, length 0 1: IP 192.168.0.2 > 192.168.0.1: ICMP 192.168.0.2 udp port 9 unreachable, length 36 0: IP 192.168.0.1.2254 > 192.168.0.2.9: UDP, length 0 1: IP 192.168.0.2 > 192.168.0.1: ICMP 192.168.0.2 udp port 9 unreachable, length 36 An ICMP error packet contains the header of the packet which caused the network error, so inspect it and match the flow against it, so we can send the ICMP via the same interface of the previous packet in the flow. Move the IP and port dissect code into a generic function bond_flow_ip() and if we are dissecting an ICMP error packet, call it again with the adjusted offset. # hping3 -2 192.168.0.2 -p 9 1: IP 192.168.0.1.1224 > 192.168.0.2.9: UDP, length 0 1: IP 192.168.0.2 > 192.168.0.1: ICMP 192.168.0.2 udp port 9 unreachable, length 36 1: IP 192.168.0.1.1225 > 192.168.0.2.9: UDP, length 0 1: IP 192.168.0.2 > 192.168.0.1: ICMP 192.168.0.2 udp port 9 unreachable, length 36 0: IP 192.168.0.1.1226 > 192.168.0.2.9: UDP, length 0 0: IP 192.168.0.2 > 192.168.0.1: ICMP 192.168.0.2 udp port 9 unreachable, length 36 0: IP 192.168.0.1.1227 > 192.168.0.2.9: UDP, length 0 0: IP 192.168.0.2 > 192.168.0.1: ICMP 192.168.0.2 udp port 9 unreachable, length 36 Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 4214fa1efffd4c6236231f1104eddc156b4e9104 Author: Horatiu Vultur Date: Fri Nov 15 11:11:15 2019 +0100 net: mscc: ocelot: omit error check from of_get_phy_mode The commit 0c65b2b90d13c ("net: of_get_phy_mode: Change API to solve int/unit warnings") updated the function of_get_phy_mode declaration. Now it returns an error code and in case the node doesn't contain the property 'phy-mode' or 'phy-connection-type' it returns -EINVAL and would set the phy_interface_t to PHY_INTERFACE_MODE_NA. Ocelot VSC7514 has 4 internal phys which have the phy interface PHY_INTERFACE_MODE_NA. So because of_get_phy_mode would assign PHY_INTERFACE_MODE_NA to phy_mode when there is an error, there is no need to add the error check. Updates for v2: - drop error check because of_get_phy_mode already assigns phy_interface to PHY_INTERFACE_MODE in case of error. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 8aef998df3979faa19626acf889abecb733342db Author: Alexander Lobakin Date: Fri Nov 15 12:11:35 2019 +0300 net: core: allow fast GRO for skbs with Ethernet header in head Commit 78d3fd0b7de8 ("gro: Only use skb_gro_header for completely non-linear packets") back in May'09 (v2.6.31-rc1) has changed the original condition '!skb_headlen(skb)' to 'skb->mac_header == skb->tail' in gro_reset_offset() saying: "Since the drivers that need this optimisation all provide completely non-linear packets" (note that this condition has become the current 'skb_mac_header(skb) == skb_tail_pointer(skb)' later with commmit ced14f6804a9 ("net: Correct comparisons and calculations using skb->tail and skb-transport_header") without any functional changes). For now, we have the following rough statistics for v5.4-rc7: 1) napi_gro_frags: 14 2) napi_gro_receive with skb->head containing (most of) payload: 83 3) napi_gro_receive with skb->head containing all the headers: 20 4) napi_gro_receive with skb->head containing only Ethernet header: 2 With the current condition, fast GRO with the usage of NAPI_GRO_CB(skb)->frag0 is available only in the [1] case. Packets pushed by [2] and [3] go through the 'slow' path, but it's not a problem for them as they already contain all the needed headers in skb->head, so pskb_may_pull() only moves skb->data. The layout of skbs in the fourth [4] case at the moment of dev_gro_receive() is identical to skbs that have come through [1], as napi_frags_skb() pulls Ethernet header to skb->head. The only difference is that the mentioned condition is always false for them, because skb_put() and friends irreversibly alter the tail pointer. They also go through the 'slow' path, but now every single pskb_may_pull() in every single .gro_receive() will call the *really* slow __pskb_pull_tail() to pull headers to head. This significantly decreases the overall performance for no visible reasons. The only two users of method [4] is: * drivers/staging/qlge * drivers/net/wireless/iwlwifi (all three variants: dvm, mvm, mvm-mq) Note that in case with wireless drivers we can't use [1] (napi_gro_frags()) at least for now and mac80211 stack always performs pushes and pulls anyways, so performance hit is inavoidable. At the moment of v2.6.31 the mentioned change was necessary (that's why I don't add the "Fixes:" tag), but it became obsolete since skb_gro_mac_header() has gone in commit a50e233c50db ("net-gro: restore frag0 optimization"), so we can simply revert the condition in gro_reset_offset() to allow skbs from [4] go through the 'fast' path just like in case [1]. This was tested on a 600 MHz MIPS CPU and a custom driver and this patch gave boosts up to 40 Mbps to method [4] in both directions comparing to net-next, which made overall performance relatively close to [1] (without it, [4] is the slowest). v2: - Add more references and explanations to commit message - Fix some typos ibid - No functional changes Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit f92e88dbd46147fa34a3151acce0959d8b221e06 Merge: 2e47cb415f0a 548e5ffe2e11 Author: David S. Miller Date: Sat Nov 16 12:50:57 2019 -0800 Merge branch 'bnx2x-Remove-function-casts' Kees Cook says: ==================== bnx2x: Remove function casts In order to make the entire kernel usable under Clang's Control Flow Integrity protections, function prototype casts need to be avoided because this will trip CFI checks at runtime (i.e. a mismatch between the caller's expected function prototype and the destination function's prototype). Many of these cases can be found with -Wcast-function-type, which found that bnx2x had a bunch of needless (or at least confusing) function casts. This series removes them all. ==================== Signed-off-by: David S. Miller commit 548e5ffe2e11d10c54f8425019900c87788fd838 Author: Kees Cook Date: Thu Nov 14 21:07:15 2019 -0800 bnx2x: Remove hw_reset_t function casts All .rw_reset callbacks except bnx2x_84833_hw_reset_phy() use a void return type. No callers of .hw_reset check a return value and bnx2x_84833_hw_reset_phy() unconditionally returns 0. Remove all hw_reset_t casts and fix the return type to void. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 26658f6bdb65ff192ff9b4b7ed9f3408d74ceeea Author: Kees Cook Date: Thu Nov 14 21:07:14 2019 -0800 bnx2x: Remove format_fw_ver_t function casts The return values for format_fw_ver_t callbacks are supposed to be "int", not "u8". Ultimately, the top-level caller doesn't actually check the return value at all, but just clean this all up anyway and fix the prototypes so that casts are no longer needed. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 3e19d1f2654ffd0e379c0f4ba30424bb57ed8acc Author: Kees Cook Date: Thu Nov 14 21:07:13 2019 -0800 bnx2x: Remove config_init_t function casts No callers of .config_init check return values. Remove the casting and change all callbacks to have the correct function prototype. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 2c855d73f2f6107f5b8ebc45f8b934bf7f4419e0 Author: Kees Cook Date: Thu Nov 14 21:07:12 2019 -0800 bnx2x: Remove read_status_t function casts The function casts for .read_status callbacks end up casting some int return values to u8. This seems to be bug-prone (-EINVAL being returned into something that appears to be true/false), but fixing the function prototypes doesn't change the existing behavior. Fix the return values to remove the casts. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 86c1fe8857afb379522fd8dabce9d348672c31c1 Author: Kees Cook Date: Thu Nov 14 21:07:11 2019 -0800 bnx2x: Drop redundant callback function casts NULL is already "void *" so it will auto-cast in assignments and initializers. Additionally, all the callbacks for .link_reset, .config_loopback, .set_link_led, and .phy_specific_func are already correct. No casting is needed for these, so remove them. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 2e47cb415f0a0ec6555d71598361e90f8c144fb2 Author: Po Liu Date: Fri Nov 15 03:33:41 2019 +0000 enetc: update TSN Qbv PSPEED set according to adjust link speed ENETC has a register PSPEED to indicate the link speed of hardware. It is need to update accordingly. PSPEED field needs to be updated with the port speed for QBV scheduling purposes. Or else there is chance for gate slot not free by frame taking the MAC if PSPEED and phy speed not match. So update PSPEED when link adjust. This is implement by the adjust_link. Signed-off-by: Po Liu Signed-off-by: Claudiu Manoil Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 34c6adf1977b611fca3b824ad12a2a415e1e420e Author: Po Liu Date: Fri Nov 15 03:33:33 2019 +0000 enetc: Configure the Time-Aware Scheduler via tc-taprio offload ENETC supports in hardware for time-based egress shaping according to IEEE 802.1Qbv. This patch implement the Qbv enablement by the hardware offload method qdisc tc-taprio method. Also update cbdr writeback to up level since control bd ring may writeback data to control bd ring. Signed-off-by: Po Liu Signed-off-by: Vladimir Oltean Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit c3f812cea0d7006469d1cf33a4a9f0a12bb4b3a3 Author: Jonathan Lemon Date: Thu Nov 14 14:13:00 2019 -0800 page_pool: do not release pool until inflight == 0. The page pool keeps track of the number of pages in flight, and it isn't safe to remove the pool until all pages are returned. Disallow removing the pool until all pages are back, so the pool is always available for page producers. Make the page pool responsible for its own delayed destruction instead of relying on XDP, so the page pool can be used without the xdp memory model. When all pages are returned, free the pool and notify xdp if the pool is registered with the xdp memory system. Have the callback perform a table walk since some drivers (cpsw) may share the pool among multiple xdp_rxq_info. Note that the increment of pages_state_release_cnt may result in inflight == 0, resulting in the pool being released. Fixes: d956a048cd3f ("xdp: force mem allocator removal and periodic warning") Signed-off-by: Jonathan Lemon Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 3af7ff93e43bcab458bd223180b73970b446a8b8 Merge: c39e342a050a ab8536ca783d Author: David S. Miller Date: Sat Nov 16 12:26:49 2019 -0800 Merge branch 'smc-last-part-of-termination-improvements' Karsten Graul says: ==================== last part of termination improvements Patches 1 and 2 finish the set of termination patches, introducing a reboot handler that terminates all link groups. Patch 3 adds an rcu_barrier before the module is unloaded, and patch 4 is cleanup. ==================== Signed-off-by: David S. Miller commit ab8536ca783db9ef863e0a2246946ebae701df5a Author: Ursula Braun Date: Sat Nov 16 17:47:32 2019 +0100 net/smc: remove unused constant Constant SMC_CLOSE_WAIT_LISTEN_CLCSOCK_TIME is defined, but since commit 3d502067599f ("net/smc: simplify wait when closing listen socket") no longer used. Remove it. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 4ead9c96d528e1b9937382321910a2bf35fc1a86 Author: Ursula Braun Date: Sat Nov 16 17:47:31 2019 +0100 net/smc: use rcu_barrier() on module unload Add rcu_barrier() to make sure no RCU readers or callbacks are pending when the module is unloaded. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit a33a803cfe64309d330540ae4a8df17158bcb6ea Author: Ursula Braun Date: Sat Nov 16 17:47:30 2019 +0100 net/smc: guarantee removal of link groups in reboot When rebooting it should be guaranteed all link groups are cleaned up and freed. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 6dabd405451f35c905dfadb6a06f5c981074fc14 Author: Ursula Braun Date: Sat Nov 16 17:47:29 2019 +0100 net/smc: introduce bookkeeping of SMCR link groups If the smc module is unloaded return control from exit routine only, if all link groups are freed. If an IB device is thrown away return control from device removal only, if all link groups belonging to this device are freed. Counters for the total number of SMCR link groups and for the total number of SMCR links per IB device are introduced. smc module unloading continues only if the total number of SMCR link groups is zero. IB device removal continues only it the total number of SMCR links per IB device has decreased to zero. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit cd5a2aa89e847bdda7b62029d94e95488d73f6b2 Author: Waiman Long Date: Fri Nov 15 11:14:45 2019 -0500 x86/speculation: Fix redundant MDS mitigation message Since MDS and TAA mitigations are inter-related for processors that are affected by both vulnerabilities, the followiing confusing messages can be printed in the kernel log: MDS: Vulnerable MDS: Mitigation: Clear CPU buffers To avoid the first incorrect message, defer the printing of MDS mitigation after the TAA mitigation selection has been done. However, that has the side effect of printing TAA mitigation first before MDS mitigation. [ bp: Check box is affected/mitigations are disabled first before printing and massage. ] Suggested-by: Pawan Gupta Signed-off-by: Waiman Long Signed-off-by: Borislav Petkov Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Mark Gross Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Tony Luck Cc: Tyler Hicks Cc: x86-ml Link: https://lkml.kernel.org/r/20191115161445.30809-3-longman@redhat.com commit a079973f462a3d506c6a7f00c770a55b167ed094 Author: Hans de Goede Date: Thu Nov 14 12:18:40 2019 +0100 usb: typec: tcpm: Remove tcpc_config configuration mechanism All configuration can and should be done through fwnodes instead of through the tcpc_config struct and there are no existing users left of struct tcpc_config, so lets remove it. Signed-off-by: Hans de Goede Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191114111840.40876-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 6cfed598480493d814414ce7e53027bd6fc45c49 Author: Kees Cook Date: Fri Nov 15 09:28:28 2019 -0800 staging: rtl*: Remove tasklet callback casts In order to make the entire kernel usable under Clang's Control Flow Integrity protections, function prototype casts need to be avoided because this will trip CFI checks at runtime (i.e. a mismatch between the caller's expected function prototype and the destination function's prototype). Many of these cases can be found with -Wcast-function-type, which found that the rtl wifi drivers had a bunch of needless function casts. Remove function casts for tasklet callbacks in the various drivers. Signed-off-by: Kees Cook Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/201911150926.2894A4F973@keescook Signed-off-by: Greg Kroah-Hartman commit 64870ed1b12e235cfca3f6c6da75b542c973ff78 Author: Waiman Long Date: Fri Nov 15 11:14:44 2019 -0500 x86/speculation: Fix incorrect MDS/TAA mitigation status For MDS vulnerable processors with TSX support, enabling either MDS or TAA mitigations will enable the use of VERW to flush internal processor buffers at the right code path. IOW, they are either both mitigated or both not. However, if the command line options are inconsistent, the vulnerabilites sysfs files may not report the mitigation status correctly. For example, with only the "mds=off" option: vulnerabilities/mds:Vulnerable; SMT vulnerable vulnerabilities/tsx_async_abort:Mitigation: Clear CPU buffers; SMT vulnerable The mds vulnerabilities file has wrong status in this case. Similarly, the taa vulnerability file will be wrong with mds mitigation on, but taa off. Change taa_select_mitigation() to sync up the two mitigation status and have them turned off if both "mds=off" and "tsx_async_abort=off" are present. Update documentation to emphasize the fact that both "mds=off" and "tsx_async_abort=off" have to be specified together for processors that are affected by both TAA and MDS to be effective. [ bp: Massage and add kernel-parameters.txt change too. ] Fixes: 1b42f017415b ("x86/speculation/taa: Add mitigation for TSX Async Abort") Signed-off-by: Waiman Long Signed-off-by: Borislav Petkov Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jiri Kosina Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: linux-doc@vger.kernel.org Cc: Mark Gross Cc: Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Tony Luck Cc: Tyler Hicks Cc: x86-ml Link: https://lkml.kernel.org/r/20191115161445.30809-2-longman@redhat.com commit 64498695dd800bcb494d96b94f99356ece91ea90 Author: Alexander Usyskin Date: Sat Nov 16 16:21:36 2019 +0200 mei: bus: add more client attributes to sysfs Export more client attributes via sysfs that are usually obtained upon connection. In some cases, for example a monitoring application may wish to know the attributes without actually performing the connection. Added attributes: max number of connections, fixed address, max message length. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191116142136.17535-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 45c08383141794a7e9b26f35d491b74f33ac469e Author: Thomas Gleixner Date: Wed Oct 23 14:27:07 2019 +0200 x86/entry/64: Remove pointless jump in paranoid_exit Jump directly to restore_regs_and_return_to_kernel instead of making a pointless extra jump through .Lparanoid_exit_restore Signed-off-by: Thomas Gleixner Reviewed-by: Sean Christopherson Reviewed-by: Alexandre Chartre Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191023123117.779277679@linutronix.de commit df1a7524741b6c094786032e12a21a448321d9f6 Author: Thomas Gleixner Date: Wed Oct 23 14:27:06 2019 +0200 x86/entry/32: Remove unused resume_userspace label The C reimplementation of SYSENTER left that unused ENTRY() label around. Remove it. Fixes: 5f310f739b4c ("x86/entry/32: Re-implement SYSENTER using the new C path") Originally-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Reviewed-by: Sean Christopherson Reviewed-by: Alexandre Chartre Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191023123117.686514045@linutronix.de commit 022eb8ae8b5ee8c5c813923c69b5ebb1e9612c4c Author: Benjamin Gaignard Date: Tue Nov 12 16:16:46 2019 +0100 ARM: 8938/1: kernel: initialize broadcast hrtimer based clock event device On platforms implementing CPU power management, the CPUidle subsystem can allow CPUs to enter idle states where local timers logic is lost on power down. To keep the software timers functional the kernel relies on an always-on broadcast timer to be present in the platform to relay the interrupt signalling the timer expiries. For platforms implementing CPU core gating that do not implement an always-on HW timer or implement it in a broken way, this patch adds code to initialize the kernel hrtimer based clock event device upon boot (which can be chosen as tick broadcast device by the kernel). It relies on a dynamically chosen CPU to be always powered-up. This CPU then relays the timer interrupt to CPUs in deep-idle states through its HW local timer device. Having a CPU always-on has implications on power management platform capabilities and makes CPUidle suboptimal, since at least a CPU is kept always in a shallow idle state by the kernel to relay timer interrupts, but at least leaves the kernel with a functional system with some working power management capabilities. The hrtimer based clock event device is unconditionally registered, but has the lowest possible rating such that any broadcast-capable HW clock event device present will be chosen in preference as the tick broadcast device. Signed-off-by: Benjamin Gaignard Signed-off-by: Russell King commit 4ae5061a19b550dfe25397843427ed2ebab16b16 Author: Doug Berger Date: Mon Nov 11 04:32:04 2019 +0100 ARM: 8937/1: spectre-v2: remove Brahma-B53 from hardening When the default processor handling was added to the function cpu_v7_spectre_init() it only excluded other ARM implemented processor cores. The Broadcom Brahma B53 core is not implemented by ARM so it ended up falling through into the set of processors that attempt to use the ARM_SMCCC_ARCH_WORKAROUND_1 service to harden the branch predictor. Since this workaround is not necessary for the Brahma-B53 this commit explicitly checks for it and prevents it from applying a branch predictor hardening workaround. Fixes: 10115105cb3a ("ARM: spectre-v2: add firmware based hardening") Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Russell King commit a3ba966066afbe8fd0d3605ffe04c633083752f1 Author: Thomas Gleixner Date: Sat Nov 16 11:12:03 2019 +0100 x86/entry/32: Clarify register saving in __switch_to_asm() commit 6690e86be83a ("sched/x86: Save [ER]FLAGS on context switch") re-introduced the flags saving on context switch to prevent AC leakage. The pushf/popf instructions are right among the callee saved register section, so the comment explaining the save/restore is not entirely correct. Add a seperate comment to pushf/popf explaining the reason. Reported-by: Linus Torvalds Signed-off-by: Thomas Gleixner commit e638ad00809a323cbe13dfa0952d4234d9b36732 Author: Thomas Gleixner Date: Mon Nov 11 23:03:30 2019 +0100 selftests/x86/iopl: Extend test to cover IOPL emulation Add tests that the now emulated iopl() functionality: - does not longer allow user space to disable interrupts. - does restore a I/O bitmap when IOPL is dropped Signed-off-by: Thomas Gleixner commit 111e7b15cf10f6e973ccf537c70c66a5de539060 Author: Thomas Gleixner Date: Tue Nov 12 21:40:33 2019 +0100 x86/ioperm: Extend IOPL config to control ioperm() as well If iopl() is disabled, then providing ioperm() does not make much sense. Rename the config option and disable/enable both syscalls with it. Guard the code with #ifdefs where appropriate. Suggested-by: Andy Lutomirski Signed-off-by: Thomas Gleixner commit a24ca9976843156eabbc5f2d798954b5674d1b61 Author: Thomas Gleixner Date: Mon Nov 11 23:03:29 2019 +0100 x86/iopl: Remove legacy IOPL option The IOPL emulation via the I/O bitmap is sufficient. Remove the legacy cruft dealing with the (e)flags based IOPL mechanism. Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross (Paravirt and Xen parts) Acked-by: Andy Lutomirski commit c8137ace56383688af911fea5934c71ad158135e Author: Thomas Gleixner Date: Mon Nov 11 23:03:28 2019 +0100 x86/iopl: Restrict iopl() permission scope The access to the full I/O port range can be also provided by the TSS I/O bitmap, but that would require to copy 8k of data on scheduling in the task. As shown with the sched out optimization TSS.io_bitmap_base can be used to switch the incoming task to a preallocated I/O bitmap which has all bits zero, i.e. allows access to all I/O ports. Implementing this allows to provide an iopl() emulation mode which restricts the IOPL level 3 permissions to I/O port access but removes the STI/CLI permission which is coming with the hardware IOPL mechansim. Provide a config option to switch IOPL to emulation mode, make it the default and while at it also provide an option to disable IOPL completely. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski commit be9afb4b529d9e3a68da1212e33be677bbfc8d2c Author: Thomas Gleixner Date: Mon Nov 11 23:03:27 2019 +0100 x86/iopl: Fixup misleading comment The comment for the sys_iopl() implementation is outdated and actively misleading in some parts. Fix it up. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski commit 0907a09c2e52210a67a9616427ea71f14b37e826 Author: Thomas Gleixner Date: Mon Nov 11 23:03:26 2019 +0100 selftests/x86/ioperm: Extend testing so the shared bitmap is exercised Add code to the fork path which forces the shared bitmap to be duplicated and the reference count to be dropped. Verify that the child modifications did not affect the parent. Signed-off-by: Thomas Gleixner commit 4804e382c117ce213cd5c43512cf4b1d71bb2650 Author: Thomas Gleixner Date: Mon Nov 11 23:03:25 2019 +0100 x86/ioperm: Share I/O bitmap if identical The I/O bitmap is duplicated on fork. That's wasting memory and slows down fork. There is no point to do so. As long as the bitmap is not modified it can be shared between threads and processes. Add a refcount and just share it on fork. If a task modifies the bitmap then it has to do the duplication if and only if it is shared. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski commit ea5f1cd7ab494f65f50f338299eabb40ad6a1767 Author: Thomas Gleixner Date: Mon Nov 11 23:03:24 2019 +0100 x86/ioperm: Remove bitmap if all permissions dropped If ioperm() results in a bitmap with all bits set (no permissions to any I/O port), then handling that bitmap on context switch and exit to user mode is pointless. Drop it. Move the bitmap exit handling to the ioport code and reuse it for both the thread exit path and dropping it. This allows to reuse this code for the upcoming iopl() emulation. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski commit 22fe5b0439dd53643fd6f4c582c46c6dba0fde53 Author: Thomas Gleixner Date: Mon Nov 11 23:03:23 2019 +0100 x86/ioperm: Move TSS bitmap update to exit to user work There is no point to update the TSS bitmap for tasks which use I/O bitmaps on every context switch. It's enough to update it right before exiting to user space. That reduces the context switch bitmap handling to invalidating the io bitmap base offset in the TSS when the outgoing task has TIF_IO_BITMAP set. The invaldiation is done on purpose when a task with an IO bitmap switches out to prevent any possible leakage of an activated IO bitmap. It also removes the requirement to update the tasks bitmap atomically in ioperm(). Signed-off-by: Thomas Gleixner commit 060aa16fdb7c5078a4159a76e5dc87d6a493af9b Author: Thomas Gleixner Date: Mon Nov 11 23:03:22 2019 +0100 x86/ioperm: Add bitmap sequence number Add a globally unique sequence number which is incremented when ioperm() is changing the I/O bitmap of a task. Store the new sequence number in the io_bitmap structure and compare it with the sequence number of the I/O bitmap which was last loaded on a CPU. Only update the bitmap if the sequence is different. That should further reduce the overhead of I/O bitmap scheduling when there are only a few I/O bitmap users on the system. The 64bit sequence counter is sufficient. A wraparound of the sequence counter assuming an ioperm() call every nanosecond would require about 584 years of uptime. Suggested-by: Linus Torvalds Signed-off-by: Thomas Gleixner commit 577d5cd7e5851d3832066cd0422475fa7db2ee17 Author: Thomas Gleixner Date: Mon Nov 11 23:03:21 2019 +0100 x86/ioperm: Move iobitmap data into a struct No point in having all the data in thread_struct, especially as upcoming changes add more. Make the bitmap in the new struct accessible as array of longs and as array of characters via a union, so both the bitmap functions and the update logic can avoid type casts. Signed-off-by: Thomas Gleixner commit f5848e5fd2f813c3a8009a642dfbcf635287c199 Author: Thomas Gleixner Date: Tue Nov 12 18:45:29 2019 +0100 x86/tss: Move I/O bitmap data into a seperate struct Move the non hardware portion of I/O bitmap data into a seperate struct for readability sake. Originally-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit ecc7e37d4dadd16f6be125ca496feccd05454da4 Author: Thomas Gleixner Date: Mon Nov 11 23:03:20 2019 +0100 x86/io: Speedup schedule out of I/O bitmap user There is no requirement to update the TSS I/O bitmap when a thread using it is scheduled out and the incoming thread does not use it. For the permission check based on the TSS I/O bitmap the CPU calculates the memory location of the I/O bitmap by the address of the TSS and the io_bitmap_base member of the tss_struct. The easiest way to invalidate the I/O bitmap is to switch the offset to an address outside of the TSS limit. If an I/O instruction is issued from user space the TSS limit causes #GP to be raised in the same was as valid I/O bitmap with all bits set to 1 would do. This removes the extra work when an I/O bitmap using task is scheduled out and puts the burden on the rare I/O bitmap users when they are scheduled in. Signed-off-by: Thomas Gleixner commit 32f3bf67ee78332f2caec0984cb9d412cd0a3c23 Author: Thomas Gleixner Date: Tue Nov 12 19:56:19 2019 +0100 x86/ioperm: Avoid bitmap allocation if no permissions are set If ioperm() is invoked the first time and the @turn_on argument is 0, then there is no point to allocate a bitmap just to clear permissions which are not set. Signed-off-by: Thomas Gleixner commit ae31cea86ab31f3d2e15d6cc8710754ad7330c9e Author: Thomas Gleixner Date: Tue Nov 12 19:05:31 2019 +0100 x86/ioperm: Simplify first ioperm() invocation logic On the first allocation of a task the I/O bitmap needs to be allocated. After the allocation it is installed as an empty bitmap and immediately afterwards updated. Avoid that and just do the initial updates (store bitmap pointer, set TIF flag and make TSS limit valid) in the update path unconditionally. If the bitmap was already active this is redundant but harmless. Preparatory change for later optimizations in the context switch code. Signed-off-by: Thomas Gleixner commit b800fc4d4a2bfe4f4a52dc1955e1b4d8649e6d5f Author: Thomas Gleixner Date: Mon Nov 11 23:03:19 2019 +0100 x86/iopl: Cleanup include maze Get rid of superfluous includes. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski commit 6b546e1c9ad2a25f874f8bc6077d0f55f9446414 Author: Thomas Gleixner Date: Mon Nov 11 23:03:18 2019 +0100 x86/tss: Fix and move VMX BUILD_BUG_ON() The BUILD_BUG_ON(IO_BITMAP_OFFSET - 1 == 0x67) in the VMX code is bogus in two aspects: 1) This wants to be in generic x86 code simply to catch issues even when VMX is disabled in Kconfig. 2) The IO_BITMAP_OFFSET is not the right thing to check because it makes asssumptions about the layout of tss_struct. Nothing requires that the I/O bitmap is placed right after x86_tss, which is the hardware mandated tss structure. It pointlessly makes restrictions on the struct tss_struct layout. The proper thing to check is: - Offset of x86_tss in tss_struct is 0 - Size of x86_tss == 0x68 Move it to the other build time TSS checks and make it do the right thing. Signed-off-by: Thomas Gleixner Acked-by: Paolo Bonzini Acked-by: Andy Lutomirski commit 505b789996f64bdbfcc5847dd4b5076fc7c50274 Author: Thomas Gleixner Date: Mon Nov 11 23:03:17 2019 +0100 x86/cpu: Unify cpu_init() Similar to copy_thread_tls() the 32bit and 64bit implementations of cpu_init() are very similar and unification avoids duplicate changes in the future. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski commit 2fff071d28b54f050f62654dad4ec111b8416d8e Author: Thomas Gleixner Date: Mon Nov 11 23:03:16 2019 +0100 x86/process: Unify copy_thread_tls() While looking at the TSS io bitmap it turned out that any change in that area would require identical changes to copy_thread_tls(). The 32 and 64 bit variants share sufficient code to consolidate them into a common function to avoid duplication of upcoming modifications. Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski commit 8c40397f22a4ff7996d3abdc2d9d1d90f9fc8054 Author: Thomas Gleixner Date: Mon Nov 11 23:03:15 2019 +0100 x86/ptrace: Prevent truncation of bitmap size The active() callback of the IO bitmap regset divides the IO bitmap size by the word size (32/64 bit). As the I/O bitmap size is in bytes the active check fails for bitmap sizes of 1-3 bytes on 32bit and 1-7 bytes on 64bit. Use DIV_ROUND_UP() instead. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Reviewed-by: Andy Lutomirski commit 585d1183ffeea5cbe2cd24863bbc90196d827257 Author: Lina Iyer Date: Fri Nov 15 15:11:52 2019 -0700 pinctrl/sdm845: Add PDC wakeup interrupt map for GPIOs Add interrupt parents for wakeup capable GPIOs for Qualcomm SDM845 SoC. Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier Reviewed-by: Linus Walleij Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-10-git-send-email-ilina@codeaurora.org commit e35a6ae0eb3a7cc451e8d8db55e9b938a95de416 Author: Lina Iyer Date: Fri Nov 15 15:11:51 2019 -0700 pinctrl/msm: Setup GPIO chip in hierarchy Some GPIOs are marked as wakeup capable and are routed to another interrupt controller that is an always-domain and can detect interrupts even when most of the SoC is powered off. The wakeup interrupt controller wakes up the GIC and replays the interrupt at the GIC. Setup the TLMM irqchip in hierarchy with the wakeup interrupt controller and ensure the wakeup GPIOs are handled correctly. Co-developed-by: Maulik Shah Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-9-git-send-email-ilina@codeaurora.org ---- Changes in v2: - Address review comments - Fix Co-developed-by tag Changes in v1: - Address minor review comments - Remove redundant call to set irq handler - Move irq_domain_qcom_handle_wakeup() to this patch Changes in RFC v2: - Rebase on top of GPIO hierarchy support in linux-next - Set the chained irq handler for summary line commit e71374c07564536d38caed3e80a1ff1c4609161d Author: Maulik Shah Date: Fri Nov 15 15:11:50 2019 -0700 irqchip/qcom-pdc: Add irqchip set/get state calls Add irqchip calls to set/get interrupt state from the parent interrupt controller. When GPIOs are renabled as interrupt lines, it is desirable to clear the interrupt state at the GIC. This avoids any unwanted interrupt as a result of stale pending state recorded when the line was used as a GPIO. Signed-off-by: Maulik Shah [Lina: updated commit text, rearranged code] Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-8-git-send-email-ilina@codeaurora.org commit 81ef8bf88065b07d597c723ca5b0f1f10a808de4 Author: Lina Iyer Date: Fri Nov 15 15:11:47 2019 -0700 irqchip/qcom-pdc: Add irqdomain for wakeup capable GPIOs Introduce a new domain for wakeup capable GPIOs. The domain can be requested using the bus token DOMAIN_BUS_WAKEUP. In the following patches, we will specify PDC as the wakeup-parent for the TLMM GPIO irqchip. Requesting a wakeup GPIO will setup the GPIO and the corresponding PDC interrupt as its parent. Co-developed-by: Stephen Boyd Signed-off-by: Stephen Boyd Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-5-git-send-email-ilina@codeaurora.org commit da3f875a4189e643f8eec7f0bffa39c90d3418c6 Author: Lina Iyer Date: Fri Nov 15 15:11:46 2019 -0700 irqchip/qcom-pdc: Do not toggle IRQ_ENABLE during mask/unmask When an interrupt is to be serviced, the convention is to mask the interrupt at the chip and unmask after servicing the interrupt. Enabling and disabling the interrupt at the PDC irqchip causes an interrupt storm due to the way dual edge interrupts are handled in hardware. Skip configuring the PDC when the IRQ is masked and unmasked, instead use the irq_enable/irq_disable callbacks to toggle the IRQ_ENABLE register at the PDC. The PDC's IRQ_ENABLE register is only used during the monitoring mode when the system is asleep and is not needed for active mode detection. Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-4-git-send-email-ilina@codeaurora.org commit b2bb01ed0894c6d5d31cfa8aafb6ddbd7df2dd3f Author: Lina Iyer Date: Fri Nov 15 15:11:45 2019 -0700 irqchip/qcom-pdc: Update max PDC interrupts Newer SoCs have increased the number of interrupts routed to the PDC interrupt controller. Update the definition of max PDC interrupts. Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-3-git-send-email-ilina@codeaurora.org commit 09d31567f85b6cd0eddf28d90f7b83be09ee282b Author: Lina Iyer Date: Fri Nov 15 15:11:48 2019 -0700 of/irq: Document properties for wakeup interrupt parent Some interrupt controllers in a SoC, are always powered on and have a select interrupts routed to them, so that they can wakeup the SoC from suspend. Add wakeup-parent DT property to refer to these interrupt controllers. Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-6-git-send-email-ilina@codeaurora.org commit 4a169a95d885fe5c050bac1a21d43c86ba955bcf Author: Maulik Shah Date: Fri Nov 15 15:11:49 2019 -0700 genirq: Introduce irq_chip_get/set_parent_state calls On certain QTI chipsets some GPIOs are direct-connect interrupts to the GIC to be used as regular interrupt lines. When the GPIOs are not used for interrupt generation the interrupt line is disabled. But disabling the interrupt at GIC does not prevent the interrupt to be reported as pending at GIC_ISPEND. Later, when drivers call enable_irq() on the interrupt, an unwanted interrupt occurs. Introduce get and set methods for irqchip's parent to clear it's pending irq state. This then can be invoked by the GPIO interrupt controller on the parents in it hierarchy to clear the interrupt before enabling the interrupt. Signed-off-by: Maulik Shah Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-7-git-send-email-ilina@codeaurora.org [updated commit text and minor code fixes] commit d46bca2b5d06cbb5f3e66945080f275bcfab7181 Author: Lina Iyer Date: Fri Nov 15 15:11:44 2019 -0700 irqdomain: Add bus token DOMAIN_BUS_WAKEUP A single controller can handle normal interrupts and wake-up interrupts independently, with a different numbering space. It is thus crucial to allow the driver for such a controller discriminate between the two. A simple way to do so is to tag the wake-up irqdomain with a "bus token" that indicates the wake-up domain. This slightly abuses the notion of bus, but also radically simplifies the design of such a driver. Between two evils, we choose the least damaging. Suggested-by: Stephen Boyd Signed-off-by: Lina Iyer Signed-off-by: Marc Zyngier Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-2-git-send-email-ilina@codeaurora.org commit 07a594f353655b1628f598add352e7e754f44869 Author: Mika Westerberg Date: Fri Nov 15 18:50:03 2019 +0200 xhci-pci: Allow host runtime PM as default also for Intel Ice Lake xHCI Intel Ice Lake has two xHCI controllers one on PCH and the other as part of the CPU itself. The latter is also part of the so called Type C Subsystem (TCSS) sharing ACPI power resources with the PCIe root ports and the Thunderbolt controllers. In order to put the whole TCSS block into D3cold the xHCI needs to be runtime suspended as well when idle. For this reason allow runtime PM as default for Ice Lake TCSS xHCI controller. Signed-off-by: Mika Westerberg Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/1573836603-10871-5-git-send-email-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 36dc01657b4973ce2e52352e69db2b879c488176 Author: Suwan Kim Date: Fri Nov 15 18:50:02 2019 +0200 usb: host: xhci: Support running urb giveback in tasklet context Patch "USB: HCD: support giveback of URB in tasklet context"[1] introduced giveback of urb in tasklet context. [1] This patch was applied to ehci but not xhci. [2] This patch significantly reduces the hard irq time of xhci. Especially for uvc driver, the hard irq including the uvc completion function runs quite long but applying this patch reduces the hard irq time of xhci. I have tested four SS devices to check if performance degradation occurs when urb completion functions run in the tasklet context. As a result of the test, all devices works well and shows very similar performance with the upstream kernel. Moreover, usb ethernet adapter show better performance than the upstream kernel about 5% for RX and 2% for TX. Four SS devices is as follows. SS devices for test 1. WD My Passport 2TB (external hard drive) 2. Sandisk Ultra Flair USB 3.0 32GB 3. Logitech Brio webcam 4. Iptime 1gigabit ethernet adapter (Mediatek RTL8153) Test description 1. Mass storage (hard drive) performance test - run below command 10 times and compute the average performance dd if=/dev/sdN iflag=direct of=/dev/null bs=1G count=1 2. Mass storage (flash memory) performance test - run below command 10 times and compute the average performance dd if=/dev/sdN iflag=direct of=/dev/null bs=1G count=1 3. Webcam streaming performance test - run simple capture program and get the average frame rate per second - capture 1500 frames - program link https://github.com/asfaca/Webcam-performance-analyzing-tool - video resolution : 4096 X 2160 (4K) at 30 or 24 fps - device (Logitech Brio) spec url for the highest resolution and fps https://support.logitech.com/en_gb/product/brio-stream/specs 4. USB Ethernet adapter performance test - directly connect two linux machines with ethernet cable - run pktgen of linux kernel and send 1500 bytes packets - run vnstat to measure the network bandwidth for 180 seconds Test machine - CPU : Intel i5-7600 @ 3.5GHz Test results 1. Mass storage (hard drive) performance test WD My Passport 2TB (external hard drive) -------------------------------------------------------------------- xhci without tasklet | xhci with tasklet -------------------------------------------------------------------- 103.667MB/s | 103.692MB/s -------------------------------------------------------------------- 2. Mass storage (flash memory) performance test Sandisk Ultra Flair USB 3.0 32GB -------------------------------------------------------------------- xhci without tasklet | xhci with tasklet -------------------------------------------------------------------- 129.727MB/s | 130.2MB/s -------------------------------------------------------------------- 3. Webcam streaming performance test Logitech Brio webcam -------------------------------------------------------------------- xhci without tasklet | xhci with tasklet -------------------------------------------------------------------- 26.4451 fps | 26.3949 fps -------------------------------------------------------------------- 4. USB Ethernet adapter performance test Iptime 1gigabit ethernet adapter (Mediatek RTL8153) -------------------------------------------------------------------- xhci without tasklet | xhci with tasklet -------------------------------------------------------------------- RX 933.86 Mbit/s | 983.86 Mbit/s -------------------------------------------------------------------- TX 830.18 Mbit/s | 882.75 Mbit/s -------------------------------------------------------------------- [1], https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=94dfd7edfd5c9b605caf7b562de7a813d216e011 [2], https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=428aac8a81058e2303677a8fbf26670229e51d3a Signed-off-by: Suwan Kim Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/1573836603-10871-4-git-send-email-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 58b9d71a0f55e2514211875553dd092f74dc2cbc Author: Mathias Nyman Date: Fri Nov 15 18:50:01 2019 +0200 xhci: Add tracing for xhci doorbell register writes Trace when a register in the doorbell array is written, both for host controller command doorbell and device doorbells, including for which endpoint and stream Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/1573836603-10871-3-git-send-email-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit dc0ffbea5729a3abafa577ebfce87f18b79e294b Author: Peter Chen Date: Fri Nov 15 18:50:00 2019 +0200 usb: host: xhci: update event ring dequeue pointer on purpose On some situations, the software handles TRB events slower than adding TRBs, then xhci_handle_event can't return zero long time, the xHC will consider the event ring is full, and trigger "Event Ring Full" error, but in fact, the software has already finished lots of events, just no chance to update ERDP (event ring dequeue pointer). In this commit, we force update ERDP if half of TRBS_PER_SEGMENT events have handled to avoid "Event Ring Full" error. Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/1573836603-10871-2-git-send-email-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2a2b5932db67586bacc560cc065d62faece5b996 Author: Brian Foster Date: Fri Nov 15 21:15:08 2019 -0800 xfs: fix attr leaf header freemap.size underflow The leaf format xattr addition helper xfs_attr3_leaf_add_work() adjusts the block freemap in a couple places. The first update drops the size of the freemap that the caller had already selected to place the xattr name/value data. Before the function returns, it also checks whether the entries array has encroached on a freemap range by virtue of the new entry addition. This is necessary because the entries array grows from the start of the block (but end of the block header) towards the end of the block while the name/value data grows from the end of the block in the opposite direction. If the associated freemap is already empty, however, size is zero and the subtraction underflows the field and causes corruption. This is reproduced rarely by generic/070. The observed behavior is that a smaller sized freemap is aligned to the end of the entries list, several subsequent xattr additions land in larger freemaps and the entries list expands into the smaller freemap until it is fully consumed and then underflows. Note that it is not otherwise a corruption for the entries array to consume an empty freemap because the nameval list (i.e. the firstused pointer in the xattr header) starts beyond the end of the corrupted freemap. Update the freemap size modification to account for the fact that the freemap entry can be empty and thus stale. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 050552cbe06a3a9c3f977dcf11ff998ae1d5c2d5 Author: Darrick J. Wong Date: Thu Nov 14 12:51:34 2019 -0800 xfs: fix some memory leaks in log recovery Fix a few places where we xlog_alloc_buffer a buffer, hit an error, and then bail out without freeing the buffer. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 41585bbeeef9402d5d65687747e04246ef4a3a41 Author: Adrian Reber Date: Fri Nov 15 13:36:21 2019 +0100 selftests: add tests for clone3() with *set_tid This tests clone3() with *set_tid to see if all desired PIDs are working as expected. The tests are trying multiple invalid input parameters as well as creating processes while specifying a certain PID in multiple PID namespaces at the same time. Additionally this moves common clone3() test code into clone3_selftests.h. Signed-off-by: Adrian Reber Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20191115123621.142252-2-areber@redhat.com Signed-off-by: Christian Brauner commit 2893c996d8ae021611d02906b9e6fcd0c765fba4 Merge: c3d6324f841b d6f39601ec5e Author: Daniel Borkmann Date: Fri Nov 15 23:49:27 2019 +0100 Merge branch 'bpf-trampoline' Alexei Starovoitov says: ==================== Introduce BPF trampoline that works as a bridge between kernel functions, BPF programs and other BPF programs. The first use case is fentry/fexit BPF programs that are roughly equivalent to kprobe/kretprobe. Unlike k[ret]probe there is practically zero overhead to call a set of BPF programs before or after kernel function. The second use case is heavily influenced by pain points in XDP development. BPF trampoline allows attaching similar fentry/fexit BPF program to any networking BPF program. It's now possible to see packets on input and output of any XDP, TC, lwt, cgroup programs without disturbing them. This greatly helps BPF-based network troubleshooting. The third use case of BPF trampoline will be explored in the follow up patches. The BPF trampoline will be used to dynamicly link BPF programs. It's more generic mechanism than array and link list of programs used in tracing, networking, cgroups. In many cases it can be used as a replacement for bpf_tail_call-based program chaining. See [1] for long term design discussion. v3 -> v4: - Included Peter's "86/alternatives: Teach text_poke_bp() to emulate instructions" as a first patch. If it changes between now and merge window, I'll rebease to newer version. The patch is necessary to do s/text_poke/text_poke_bp/ in patch 3 to fix the race. - In patch 4 fixed bpf_trampoline creation race spotted by Andrii. - Added patch 15 that annotates prog->kern bpf context types. It made patches 16 and 17 cleaner and more generic. - Addressed Andrii's feedback in other patches. v2 -> v3: - Addressed Song's and Andrii's comments - Fixed few minor bugs discovered while testing - Added one more libbpf patch v1 -> v2: - Addressed Andrii's comments - Added more test for fentry/fexit to kernel functions. Including stress test for maximum number of progs per trampoline. - Fixed a race btf_resolve_helper_id() - Added a patch to compare BTF types of functions arguments with actual types. - Added support for attaching BPF program to another BPF program via trampoline - Converted to use text_poke() API. That's the only viable mechanism to implement BPF-to-BPF attach. BPF-to-kernel attach can be refactored to use register_ftrace_direct() whenever it's available. [1] https://lore.kernel.org/bpf/20191112025112.bhzmrrh2pr76ssnh@ast-mbp.dhcp.thefacebook.com/ ==================== Signed-off-by: Daniel Borkmann commit 49cb2fc42ce4b7a656ee605e30c302efaa39c1a7 Author: Adrian Reber Date: Fri Nov 15 13:36:20 2019 +0100 fork: extend clone3() to support setting a PID The main motivation to add set_tid to clone3() is CRIU. To restore a process with the same PID/TID CRIU currently uses /proc/sys/kernel/ns_last_pid. It writes the desired (PID - 1) to ns_last_pid and then (quickly) does a clone(). This works most of the time, but it is racy. It is also slow as it requires multiple syscalls. Extending clone3() to support *set_tid makes it possible restore a process using CRIU without accessing /proc/sys/kernel/ns_last_pid and race free (as long as the desired PID/TID is available). This clone3() extension places the same restrictions (CAP_SYS_ADMIN) on clone3() with *set_tid as they are currently in place for ns_last_pid. The original version of this change was using a single value for set_tid. At the 2019 LPC, after presenting set_tid, it was, however, decided to change set_tid to an array to enable setting the PID of a process in multiple PID namespaces at the same time. If a process is created in a PID namespace it is possible to influence the PID inside and outside of the PID namespace. Details also in the corresponding selftest. To create a process with the following PIDs: PID NS level Requested PID 0 (host) 31496 1 42 2 1 For that example the two newly introduced parameters to struct clone_args (set_tid and set_tid_size) would need to be: set_tid[0] = 1; set_tid[1] = 42; set_tid[2] = 31496; set_tid_size = 3; If only the PIDs of the two innermost nested PID namespaces should be defined it would look like this: set_tid[0] = 1; set_tid[1] = 42; set_tid_size = 2; The PID of the newly created process would then be the next available free PID in the PID namespace level 0 (host) and 42 in the PID namespace at level 1 and the PID of the process in the innermost PID namespace would be 1. The set_tid array is used to specify the PID of a process starting from the innermost nested PID namespaces up to set_tid_size PID namespaces. set_tid_size cannot be larger then the current PID namespace level. Signed-off-by: Adrian Reber Reviewed-by: Christian Brauner Reviewed-by: Oleg Nesterov Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Acked-by: Andrei Vagin Link: https://lore.kernel.org/r/20191115123621.142252-1-areber@redhat.com Signed-off-by: Christian Brauner commit d6f39601ec5e708fb666a2ad437c7bef4cfab39b Author: Alexei Starovoitov Date: Thu Nov 14 10:57:20 2019 -0800 selftests/bpf: Add a test for attaching BPF prog to another BPF prog and subprog Add a test that attaches one FEXIT program to main sched_cls networking program and two other FEXIT programs to subprograms. All three tracing programs access return values and skb->len of networking program and subprograms. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191114185720.1641606-21-ast@kernel.org commit 4c0963243c5f56bffe8eaba6acc5b076d51797f4 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:19 2019 -0800 selftests/bpf: Extend test_pkt_access test The test_pkt_access.o is used by multiple tests. Fix its section name so that program type can be automatically detected by libbpf and make it call other subprograms with skb argument. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191114185720.1641606-20-ast@kernel.org commit e7bf94dbb882b7d679a6a18e40e4f28076eb249f Author: Alexei Starovoitov Date: Thu Nov 14 10:57:18 2019 -0800 libbpf: Add support for attaching BPF programs to other BPF programs Extend libbpf api to pass attach_prog_fd into bpf_object__open. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-19-ast@kernel.org commit 5b92a28aae4dd0f88778d540ecfdcdaec5a41723 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:17 2019 -0800 bpf: Support attaching tracing BPF program to other BPF programs Allow FENTRY/FEXIT BPF programs to attach to other BPF programs of any type including their subprograms. This feature allows snooping on input and output packets in XDP, TC programs including their return values. In order to do that the verifier needs to track types not only of vmlinux, but types of other BPF programs as well. The verifier also needs to translate uapi/linux/bpf.h types used by networking programs into kernel internal BTF types used by FENTRY/FEXIT BPF programs. In some cases LLVM optimizations can remove arguments from BPF subprograms without adjusting BTF info that LLVM backend knows. When BTF info disagrees with actual types that the verifiers sees the BPF trampoline has to fallback to conservative and treat all arguments as u64. The FENTRY/FEXIT program can still attach to such subprograms, but it won't be able to recognize pointer types like 'struct sk_buff *' and it won't be able to pass them to bpf_skb_output() for dumping packets to user space. The FENTRY/FEXIT program would need to use bpf_probe_read_kernel() instead. The BPF_PROG_LOAD command is extended with attach_prog_fd field. When it's set to zero the attach_btf_id is one vmlinux BTF type ids. When attach_prog_fd points to previously loaded BPF program the attach_btf_id is BTF type id of main function or one of its subprograms. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-18-ast@kernel.org commit 8c1b6e69dcc1e11bd24111e3734dd740aaf3fda1 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:16 2019 -0800 bpf: Compare BTF types of functions arguments with actual types Make the verifier check that BTF types of function arguments match actual types passed into top-level BPF program and into BPF-to-BPF calls. If types match such BPF programs and sub-programs will have full support of BPF trampoline. If types mismatch the trampoline has to be conservative. It has to save/restore five program arguments and assume 64-bit scalars. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191114185720.1641606-17-ast@kernel.org commit ff4bf2f42a40e7dff28379f085b64df322c70b45 Author: Pablo Neira Ayuso Date: Fri Nov 15 11:36:35 2019 +0100 netfilter: nf_tables: add nft_unregister_flowtable_hook() Unbind flowtable callback if hook is unregistered. This patch is implicitly fixing the error path of nf_tables_newflowtable() and nft_flowtable_event(). Fixes: 8bb69f3b2918 ("netfilter: nf_tables: add flowtable offload control plane") Reported-by: wenxu Signed-off-by: Pablo Neira Ayuso commit d7c03a9f5c2577b29a7699bbaa1c1cbcfb56afd3 Author: wenxu Date: Fri Nov 15 19:21:26 2019 +0800 netfilter: nf_tables: check if bind callback fails and unbind if hook registration fails Undo the callback binding before unregistering the existing hooks. This should also check for error of the bind setup call. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 63b48c73ff567bbab1f940d6e8f3f48607077a13 Author: Pablo Neira Ayuso Date: Thu Nov 14 14:17:28 2019 +0100 netfilter: nf_tables_offload: undo updates if transaction fails The nft_flow_rule_offload_commit() function might fail after several successful commands, thus, leaving the hardware filtering policy in inconsistent state. This patch adds nft_flow_rule_offload_abort() function which undoes the updates that have been already processed if one command in this transaction fails. Hence, the hardware ruleset is left as it was before this aborted transaction. The deletion path needs to create the flow_rule object too, in case that an existing rule needs to be re-added from the abort path. Signed-off-by: Pablo Neira Ayuso commit 23403cd8898dbc9808d3eb2f63bc1db8a340b751 Author: Pablo Neira Ayuso Date: Thu Nov 14 14:17:24 2019 +0100 netfilter: nf_tables_offload: release flow_rule on error from commit path If hardware offload commit path fails, release all flow_rule objects. Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support") Signed-off-by: Pablo Neira Ayuso commit 6ca61c7a8bac2768359f67003ac696260fd0985e Author: Pablo Neira Ayuso Date: Thu Nov 14 14:17:19 2019 +0100 netfilter: nf_tables_offload: remove reference to flow rule from deletion path The cookie is sufficient to delete the rule from the hardware. Signed-off-by: Pablo Neira Ayuso commit 458a1828e9f788d4c1da325069fed2c2eaa000fa Author: wenxu Date: Wed Nov 13 12:46:40 2019 +0800 netfilter: nf_flow_table: remove unnecessary parameter in flow_offload_fill_dir The ct object is already in the flow_offload structure, remove it. Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit ea13ca305177bd02de62087228a9f1e6793ccf2b Author: wenxu Date: Wed Nov 13 12:46:39 2019 +0800 netfilter: nf_flow_table_offload: Fix check ndo_setup_tc when setup_block It should check the ndo_setup_tc in the nf_flow_table_offload_setup. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 91cc1a99740e2ed1d903b5906afb470cc5a07379 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:15 2019 -0800 bpf: Annotate context types Annotate BPF program context types with program-side type and kernel-side type. This type information is used by the verifier. btf_get_prog_ctx_type() is used in the later patches to verify that BTF type of ctx in BPF program matches to kernel expected ctx type. For example, the XDP program type is: BPF_PROG_TYPE(BPF_PROG_TYPE_XDP, xdp, struct xdp_md, struct xdp_buff) That means that XDP program should be written as: int xdp_prog(struct xdp_md *ctx) { ... } Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-16-ast@kernel.org commit 28f8bfd1ac948403ebd5c8070ae1e25421560059 Author: Phil Sutter Date: Tue Nov 12 17:14:37 2019 +0100 netfilter: Support iif matches in POSTROUTING Instead of generally passing NULL to NF_HOOK_COND() for input device, pass skb->dev which contains input device for routed skbs. Note that iptables (both legacy and nft) reject rules with input interface match from being added to POSTROUTING chains, but nftables allows this. Cc: Eric Garver Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 5c27d8d76ce810c6254cf5917a6019d824f34bd2 Author: Pablo Neira Ayuso Date: Wed Nov 13 14:08:01 2019 +0100 netfilter: nf_flow_table_offload: add IPv6 support Add nf_flow_rule_route_ipv6() and use it from the IPv6 and the inet flowtable type definitions. Rename the nf_flow_rule_route() function to nf_flow_rule_route_ipv4(). Adjust maximum number of actions, which now becomes 16 to leave sufficient room for the IPv6 address mangling for NAT. Signed-off-by: Pablo Neira Ayuso commit 4a766d490d205fbb07712527d0b6956ecbdec5d4 Author: Pablo Neira Ayuso Date: Wed Nov 13 14:08:00 2019 +0100 netfilter: nf_flow_table_offload: add flow_action_entry_next() and use it This function retrieves a spare action entry from the array of actions. Signed-off-by: Pablo Neira Ayuso commit 6408c40c39d8eee5caaf97f5219b7dd4e041cc59 Author: Arnd Bergmann Date: Fri Nov 8 22:32:47 2019 +0100 netfilter: nft_meta: use 64-bit time arithmetic On 32-bit architectures, get_seconds() returns an unsigned 32-bit time value, which also matches the type used in the nft_meta code. This will not overflow in year 2038 as a time_t would, but it still suffers from the overflow problem later on in year 2106. Change this instance to use the time64_t type consistently and avoid the deprecated get_seconds(). The nft_meta_weekday() calculation potentially gets a little slower on 32-bit architectures, but now it has the same behavior as on 64-bit architectures and does not overflow. Fixes: 63d10e12b00d ("netfilter: nft_meta: support for time matching") Signed-off-by: Arnd Bergmann Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit fcbad8293d52864d87d0b9f6035fd87a049d59d8 Author: Arnd Bergmann Date: Fri Nov 8 21:34:28 2019 +0100 netfilter: xt_time: use time64_t The current xt_time driver suffers from the y2038 overflow on 32-bit architectures, when the time of day calculations break. Also, on both 32-bit and 64-bit architectures, there is a problem with info->date_start/stop, which is part of the user ABI and overflows in in 2106. Fix the first issue by using time64_t and explicit calls to div_u64() and div_u64_rem(), and document the seconds issue. The explicit 64-bit division is unfortunately slower on 32-bit architectures, but doing it as unsigned lets us use the optimized division-through-multiplication path in most configurations. This should be fine, as the code already does not allow any negative time of day values. Using u32 seconds values consistently would probably also work and be a little more efficient, but that doesn't feel right as it would propagate the y2106 overflow to more place rather than fewer. Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso commit 9cc31b3a092d9bf2a18f09ad77e727ddb42a5b1e Author: Alexei Starovoitov Date: Thu Nov 14 10:57:14 2019 -0800 bpf: Fix race in btf_resolve_helper_id() btf_resolve_helper_id() caching logic is a bit racy, since under root the verifier can verify several programs in parallel. Fix it with READ/WRITE_ONCE. Fix the type as well, since error is also recorded. Fixes: a7658e1a4164 ("bpf: Check types of arguments passed into helpers") Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191114185720.1641606-15-ast@kernel.org commit 9fd4a39dc7fe734d26eb89ea97e8c91331c6378c Author: Alexei Starovoitov Date: Thu Nov 14 10:57:13 2019 -0800 bpf: Reserve space for BPF trampoline in BPF programs BPF trampoline can be made to work with existing 5 bytes of BPF program prologue, but let's add 5 bytes of NOPs to the beginning of every JITed BPF program to make BPF trampoline job easier. They can be removed in the future. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-14-ast@kernel.org commit e76d776e9ca1fe266b3a7f8091eee5d1e635a545 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:12 2019 -0800 selftests/bpf: Add stress test for maximum number of progs Add stress test for maximum number of attached BPF programs per BPF trampoline. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-13-ast@kernel.org commit 510312882c4b583fcd4fdf972d00e9ce631ed188 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:11 2019 -0800 selftests/bpf: Add combined fentry/fexit test Add a combined fentry/fexit test. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-12-ast@kernel.org commit d3b0856e5959fbb50a2f2f15a5614e20e51cb522 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:10 2019 -0800 selftests/bpf: Add fexit tests for BPF trampoline Add fexit tests for BPF trampoline that checks kernel functions with up to 6 arguments of different sizes and their return values. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-11-ast@kernel.org commit 11d1e2eefffe86339b3b0b773bd31ef3b88faf7d Author: Alexei Starovoitov Date: Thu Nov 14 10:57:09 2019 -0800 selftests/bpf: Add test for BPF trampoline Add sanity test for BPF trampoline that checks kernel functions with up to 6 arguments of different sizes. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-10-ast@kernel.org commit faeb2dce084aff92d466c6ce68481989b815435b Author: Alexei Starovoitov Date: Thu Nov 14 10:57:08 2019 -0800 bpf: Add kernel test functions for fentry testing Add few kernel functions with various number of arguments, their types and sizes for BPF trampoline testing to cover different calling conventions. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-9-ast@kernel.org commit e41074d39d71aa62a6ec557af09cd42ca0928e05 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:07 2019 -0800 selftest/bpf: Simple test for fentry/fexit Add simple test for fentry and fexit programs around eth_type_trans. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-8-ast@kernel.org commit b8c54ea455dc2e0bda7ea9b0370279c224e21045 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:06 2019 -0800 libbpf: Add support to attach to fentry/fexit tracing progs Teach libbpf to recognize tracing programs types and attach them to fentry/fexit. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191114185720.1641606-7-ast@kernel.org commit 1442e2871b7679271fc9fcbf043ba1be511a7428 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:05 2019 -0800 libbpf: Introduce btf__find_by_name_kind() Introduce btf__find_by_name_kind() helper to search BTF by name and kind, since name alone can be ambiguous. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191114185720.1641606-6-ast@kernel.org commit fec56f5890d93fc2ed74166c397dc186b1c25951 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:04 2019 -0800 bpf: Introduce BPF trampoline Introduce BPF trampoline concept to allow kernel code to call into BPF programs with practically zero overhead. The trampoline generation logic is architecture dependent. It's converting native calling convention into BPF calling convention. BPF ISA is 64-bit (even on 32-bit architectures). The registers R1 to R5 are used to pass arguments into BPF functions. The main BPF program accepts only single argument "ctx" in R1. Whereas CPU native calling convention is different. x86-64 is passing first 6 arguments in registers and the rest on the stack. x86-32 is passing first 3 arguments in registers. sparc64 is passing first 6 in registers. And so on. The trampolines between BPF and kernel already exist. BPF_CALL_x macros in include/linux/filter.h statically compile trampolines from BPF into kernel helpers. They convert up to five u64 arguments into kernel C pointers and integers. On 64-bit architectures this BPF_to_kernel trampolines are nops. On 32-bit architecture they're meaningful. The opposite job kernel_to_BPF trampolines is done by CAST_TO_U64 macros and __bpf_trace_##call() shim functions in include/trace/bpf_probe.h. They convert kernel function arguments into array of u64s that BPF program consumes via R1=ctx pointer. This patch set is doing the same job as __bpf_trace_##call() static trampolines, but dynamically for any kernel function. There are ~22k global kernel functions that are attachable via nop at function entry. The function arguments and types are described in BTF. The job of btf_distill_func_proto() function is to extract useful information from BTF into "function model" that architecture dependent trampoline generators will use to generate assembly code to cast kernel function arguments into array of u64s. For example the kernel function eth_type_trans has two pointers. They will be casted to u64 and stored into stack of generated trampoline. The pointer to that stack space will be passed into BPF program in R1. On x86-64 such generated trampoline will consume 16 bytes of stack and two stores of %rdi and %rsi into stack. The verifier will make sure that only two u64 are accessed read-only by BPF program. The verifier will also recognize the precise type of the pointers being accessed and will not allow typecasting of the pointer to a different type within BPF program. The tracing use case in the datacenter demonstrated that certain key kernel functions have (like tcp_retransmit_skb) have 2 or more kprobes that are always active. Other functions have both kprobe and kretprobe. So it is essential to keep both kernel code and BPF programs executing at maximum speed. Hence generated BPF trampoline is re-generated every time new program is attached or detached to maintain maximum performance. To avoid the high cost of retpoline the attached BPF programs are called directly. __bpf_prog_enter/exit() are used to support per-program execution stats. In the future this logic will be optimized further by adding support for bpf_stats_enabled_key inside generated assembly code. Introduction of preemptible and sleepable BPF programs will completely remove the need to call to __bpf_prog_enter/exit(). Detach of a BPF program from the trampoline should not fail. To avoid memory allocation in detach path the half of the page is used as a reserve and flipped after each attach/detach. 2k bytes is enough to call 40+ BPF programs directly which is enough for BPF tracing use cases. This limit can be increased in the future. BPF_TRACE_FENTRY programs have access to raw kernel function arguments while BPF_TRACE_FEXIT programs have access to kernel return value as well. Often kprobe BPF program remembers function arguments in a map while kretprobe fetches arguments from a map and analyzes them together with return value. BPF_TRACE_FEXIT accelerates this typical use case. Recursion prevention for kprobe BPF programs is done via per-cpu bpf_prog_active counter. In practice that turned out to be a mistake. It caused programs to randomly skip execution. The tracing tools missed results they were looking for. Hence BPF trampoline doesn't provide builtin recursion prevention. It's a job of BPF program itself and will be addressed in the follow up patches. BPF trampoline is intended to be used beyond tracing and fentry/fexit use cases in the future. For example to remove retpoline cost from XDP programs. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191114185720.1641606-5-ast@kernel.org commit 5964b2000f283ff5df366f718e0f083ebbaae977 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:03 2019 -0800 bpf: Add bpf_arch_text_poke() helper Add bpf_arch_text_poke() helper that is used by BPF trampoline logic to patch nops/calls in kernel text into calls into BPF trampoline and to patch calls/nops inside BPF programs too. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191114185720.1641606-4-ast@kernel.org commit 3b2744e665206ea82ce7673cb3ec889b2898a267 Author: Alexei Starovoitov Date: Thu Nov 14 10:57:02 2019 -0800 bpf: Refactor x86 JIT into helpers Refactor x86 JITing of LDX, STX, CALL instructions into separate helper functions. No functional changes in LDX and STX helpers. There is a minor change in CALL helper. It will populate target address correctly on the first pass of JIT instead of second pass. That won't reduce total number of JIT passes though. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191114185720.1641606-3-ast@kernel.org commit 790756c7e0229dedc83bf058ac69633045b1000e Author: Nick Desaulniers Date: Mon Nov 4 19:31:45 2019 +0100 ARM: 8933/1: replace Sun/Solaris style flag on section directive It looks like a section directive was using "Solaris style" to declare the section flags. Replace this with the GNU style so that Clang's integrated assembler can assemble this directive. The modified instances were identified via: $ ag \.section | grep # Link: https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119 Link: https://github.com/ClangBuiltLinux/linux/issues/744 Link: https://bugs.llvm.org/show_bug.cgi?id=43759 Link: https://reviews.llvm.org/D69296 Acked-by: Nicolas Pitre Reviewed-by: Ard Biesheuvel Reviewed-by: Stefan Agner Signed-off-by: Nick Desaulniers Suggested-by: Fangrui Song Suggested-by: Jian Cai Suggested-by: Peter Smith Signed-off-by: Russell King commit 74d06efb9c2f99b496eb118b1e941dc4c6404e93 Author: Vincenzo Frascino Date: Mon Nov 4 12:04:41 2019 +0100 ARM: 8932/1: Add clock_gettime64 entry point With the release of Linux 5.1 has been added a new syscall, clock_gettime64, that provided a 64 bit time value for a specified clock_ID to make the kernel Y2038 safe on 32 bit architectures. Update the arm specific vDSO library accordingly with what it has been done for the kernel syscall exposing the clock_gettime64 entry point. Signed-off-by: Vincenzo Frascino Signed-off-by: Russell King commit 052e76a31b4a64d7678e270d498e1bc36c342f88 Author: Vincenzo Frascino Date: Mon Nov 4 12:02:19 2019 +0100 ARM: 8931/1: Add clock_getres entry point The generic vDSO library provides an implementation of clock_getres() that can be leveraged by each architecture. Add clock_getres() entry point on arm to be on pair with arm64. Signed-off-by: Vincenzo Frascino Signed-off-by: Russell King commit 20e2fc42312f960f497ac2d617e3742754e1fa5e Author: Vincenzo Frascino Date: Mon Nov 4 11:59:59 2019 +0100 ARM: 8930/1: Add support for generic vDSO The arm vDSO library requires some adaptations to take advantage of the newly introduced generic vDSO library. Introduce the following changes: - Modification vdso.c to be compliant with the common vdso datapage - Use of lib/vdso for gettimeofday - Implementation of elf note Signed-off-by: Vincenzo Frascino Signed-off-by: Russell King commit 9f1984c6ae30e2a379751339ce3375a21099b5d4 Author: Stefan Agner Date: Sun Nov 3 19:22:06 2019 +0100 ARM: 8929/1: use APSR_nzcv instead of r15 as mrc operand LLVM's integrated assembler does not accept r15 as mrc operand. arch/arm/boot/compressed/head.S:1267:16: error: operand must be a register in range [r0, r14] or apsr_nzcv 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate D cache ^ Use APSR_nzcv instead of r15. The GNU assembler supports this syntax since binutils 2.21 [0]. [0] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=db472d6ff0f438a21b357249a9b48e4b74498076 Signed-off-by: Stefan Agner Signed-off-by: Russell King commit bebe668eee368359d0aab06d705532ba5f510b84 Author: Candle Sun Date: Thu Oct 24 08:36:28 2019 +0100 ARM: 8927/1: ARM/hw_breakpoint: add more ARMv8 debug architecture versions support When ARMv8 cores are used in AArch32 mode, arch_hw_breakpoint_init() in arch/arm/kernel/hw_breakpoint.c will be used. From ARMv8 specification, v8 debug architecture versions defined: * 0110 ARMv8, v8 Debug architecture. * 0111 ARMv8.1, v8 Debug architecture, with Virtualization Host Extensions. * 1000 ARMv8.2, v8.2 Debug architecture. * 1001 ARMv8.4, v8.4 Debug architecture. So missing ARMv8.1/ARMv8.2/ARMv8.4 cases will cause enable_monitor_mode() returns -ENODEV,and eventually arch_hw_breakpoint_init() will fail. Signed-off-by: Candle Sun Signed-off-by: Nianfu Bai Signed-off-by: Russell King commit fb033c95c94ca1ee3d16e04ebdb85d65fb55fff8 Author: Ben Dooks Date: Mon Nov 4 18:15:15 2019 +0100 ARM: 8918/2: only build return_address() if needed The system currently warns if the config conditions for building return_address in arch/arm/kernel/return_address.c are not met, leaving just an EXPORT_SYMBOL_GPL(return_address) of a function defined to be 'static linline'. This is a result of aeea3592a13b ("ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h"). Since we're not going to build anything other than an exported symbol for something that is already being defined to be an inline-able return of NULL, just avoid building the code to remove the following warning: Fixes: aeea3592a13b ("ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h") Signed-off-by: Ben Dooks Signed-off-by: Russell King commit c3d6324f841bab2403be6419986e2b1d1068d423 Author: Peter Zijlstra Date: Wed Jun 5 10:48:37 2019 +0200 x86/alternatives: Teach text_poke_bp() to emulate instructions In preparation for static_call and variable size jump_label support, teach text_poke_bp() to emulate instructions, namely: JMP32, JMP8, CALL, NOP2, NOP_ATOMIC5, INT3 The current text_poke_bp() takes a @handler argument which is used as a jump target when the temporary INT3 is hit by a different CPU. When patching CALL instructions, this doesn't work because we'd miss the PUSH of the return address. Instead, teach poke_int3_handler() to emulate an instruction, typically the instruction we're patching in. This fits almost all text_poke_bp() users, except arch_unoptimize_kprobe() which restores random text, and for that site we have to build an explicit emulate instruction. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Masami Hiramatsu Reviewed-by: Daniel Bristot de Oliveira Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Steven Rostedt Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132457.529086974@infradead.org Signed-off-by: Ingo Molnar (cherry picked from commit 8c7eebc10687af45ac8e40ad1bac0cf7893dba9f) Signed-off-by: Alexei Starovoitov commit 808c9f7ebfffffc0a9a5d8aee1533759f09f93fc Author: Mao Wenan Date: Thu Nov 14 11:43:51 2019 +0800 bpf, doc: Change right arguments for JIT example code The example code for the x86_64 JIT uses the wrong arguments when calling function bar(). Signed-off-by: Mao Wenan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191114034351.162740-1-maowenan@huawei.com commit b31333298087f8ee3559bd62bcbd1638f232cac0 Author: Andre Guedes Date: Thu Nov 14 08:28:47 2019 -0800 samples/bpf: Add missing option to xdpsock usage Commit 743e568c1586 (samples/bpf: Add a "force" flag to XDP samples) introduced the '-F' option but missed adding it to the usage() and the 'long_option' array. Fixes: 743e568c1586 (samples/bpf: Add a "force" flag to XDP samples) Signed-off-by: Andre Guedes Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191114162847.221770-2-andre.guedes@intel.com commit 110b2263db8ab91d204378988ca73b932b26dad3 Author: Andre Guedes Date: Thu Nov 14 08:28:46 2019 -0800 samples/bpf: Remove duplicate option from xdpsock The '-f' option is shown twice in the usage(). This patch removes the outdated version. Signed-off-by: Andre Guedes Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191114162847.221770-1-andre.guedes@intel.com commit fcf35131396ace1339e2ca89b45a6b12eed17105 Author: Ilya Leoshkevich Date: Thu Nov 14 16:18:20 2019 +0100 s390/bpf: Make sure JIT passes do not increase code size The upcoming s390 branch length extension patches rely on "passes do not increase code size" property in order to consistently choose between short and long branches. Currently this property does not hold between the first and the second passes for register save/restore sequences, as well as various code fragments that depend on SEEN_* flags. Generate the code during the first pass conservatively: assume register save/restore sequences have the maximum possible length, and that all SEEN_* flags are set. Also refuse to JIT if this happens anyway (e.g. due to a bug), as this might lead to verifier bypass once long branches are introduced. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191114151820.53222-1-iii@linux.ibm.com commit b7b3fc8dd95bc02bd30680da258e09dda55270db Author: Ilya Leoshkevich Date: Fri Nov 15 13:37:22 2019 +0100 bpf: Support doubleword alignment in bpf_jit_binary_alloc Currently passing alignment greater than 4 to bpf_jit_binary_alloc does not work: in such cases it silently aligns only to 4 bytes. On s390, in order to load a constant from memory in a large (>512k) BPF program, one must use lgrl instruction, whose memory operand must be aligned on an 8-byte boundary. This patch makes it possible to request 8-byte alignment from bpf_jit_binary_alloc, and also makes it issue a warning when an unsupported alignment is requested. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191115123722.58462-1-iii@linux.ibm.com commit 9af433840b3f61ac30d569a85234ab8f210f813a Author: Wolfram Sang Date: Sat Nov 9 22:16:33 2019 +0100 i2c: remove helpers for ref-counting clients There are no in-tree users of these helpers anymore, and there shouldn't. Most use cases went away once the driver model started to refcount for us. There have been users like the media subsystem, but they all switched to better refcounting methods meanwhile. Media did this in 2008. Last user (IPMI) left 2018. Remove this cruft. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Jean Delvare Tested-by: Luca Ceresoli Reviewed-by: Luca Ceresoli Reviewed-by: Geert Uytterhoeven commit c39e342a050a4425348e6fe7f75827c0a1a7ebc5 Author: Petar Penkov Date: Thu Nov 14 09:52:09 2019 -0800 tun: fix data-race in gro_normal_list() There is a race in the TUN driver between napi_busy_loop and napi_gro_frags. This commit resolves the race by adding the NAPI struct via netif_tx_napi_add, instead of netif_napi_add, which disables polling for the NAPI struct. KCSAN reported: BUG: KCSAN: data-race in gro_normal_list.part.0 / napi_busy_loop write to 0xffff8880b5d474b0 of 4 bytes by task 11205 on cpu 0: gro_normal_list.part.0+0x77/0xb0 net/core/dev.c:5682 gro_normal_list net/core/dev.c:5678 [inline] gro_normal_one net/core/dev.c:5692 [inline] napi_frags_finish net/core/dev.c:5705 [inline] napi_gro_frags+0x625/0x770 net/core/dev.c:5778 tun_get_user+0x2150/0x26a0 drivers/net/tun.c:1976 tun_chr_write_iter+0x79/0xd0 drivers/net/tun.c:2022 call_write_iter include/linux/fs.h:1895 [inline] do_iter_readv_writev+0x487/0x5b0 fs/read_write.c:693 do_iter_write fs/read_write.c:970 [inline] do_iter_write+0x13b/0x3c0 fs/read_write.c:951 vfs_writev+0x118/0x1c0 fs/read_write.c:1015 do_writev+0xe3/0x250 fs/read_write.c:1058 __do_sys_writev fs/read_write.c:1131 [inline] __se_sys_writev fs/read_write.c:1128 [inline] __x64_sys_writev+0x4e/0x60 fs/read_write.c:1128 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffff8880b5d474b0 of 4 bytes by task 11168 on cpu 1: gro_normal_list net/core/dev.c:5678 [inline] napi_busy_loop+0xda/0x4f0 net/core/dev.c:6126 sk_busy_loop include/net/busy_poll.h:108 [inline] __skb_recv_udp+0x4ad/0x560 net/ipv4/udp.c:1689 udpv6_recvmsg+0x29e/0xe90 net/ipv6/udp.c:288 inet6_recvmsg+0xbb/0x240 net/ipv6/af_inet6.c:592 sock_recvmsg_nosec net/socket.c:871 [inline] sock_recvmsg net/socket.c:889 [inline] sock_recvmsg+0x92/0xb0 net/socket.c:885 sock_read_iter+0x15f/0x1e0 net/socket.c:967 call_read_iter include/linux/fs.h:1889 [inline] new_sync_read+0x389/0x4f0 fs/read_write.c:414 __vfs_read+0xb1/0xc0 fs/read_write.c:427 vfs_read fs/read_write.c:461 [inline] vfs_read+0x143/0x2c0 fs/read_write.c:446 ksys_read+0xd5/0x1b0 fs/read_write.c:587 __do_sys_read fs/read_write.c:597 [inline] __se_sys_read fs/read_write.c:595 [inline] __x64_sys_read+0x4c/0x60 fs/read_write.c:595 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 11168 Comm: syz-executor.0 Not tainted 5.4.0-rc6+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Fixes: 943170998b20 ("tun: enable NAPI for TUN/TAP driver") Signed-off-by: Petar Penkov Reported-by: syzbot Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 20021578ba226bda1f0ddf50e4d4a12ea1c6c6c1 Author: Eric Dumazet Date: Thu Nov 14 08:43:27 2019 -0800 selftests: net: tcp_mmap should create detached threads Since we do not plan using pthread_join() in the server do_accept() loop, we better create detached threads, or risk increasing memory footprint over time. Fixes: 192dc405f308 ("selftests: net: add tcp_mmap program") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 61ca533c0e94104c35fcb7858a23ec9a05d78143 Author: Tonghao Zhang Date: Thu Nov 14 23:51:08 2019 +0800 net: openvswitch: don't call pad_packet if not necessary The nla_put_u16/nla_put_u32 makes sure that *attrlen is align. The call tree is that: nla_put_u16/nla_put_u32 -> nla_put attrlen = sizeof(u16) or sizeof(u32) -> __nla_put attrlen -> __nla_reserve attrlen -> skb_put(skb, nla_total_size(attrlen)) nla_total_size returns the total length of attribute including padding. Cc: Joe Stringer Cc: William Tu Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 3bb884a4a0c4177c61233424d43d61545c4fc528 Merge: e7be235fa783 56051948773e Author: David S. Miller Date: Fri Nov 15 12:32:17 2019 -0800 Merge branch 'DSA-driver-for-Vitesse-Felix-switch' Vladimir Oltean says: ==================== DSA driver for Vitesse Felix switch This series builds upon the previous "Accomodate DSA front-end into Ocelot" topic and does the following: - Reworks the Ocelot (VSC7514) driver to support one more switching core (VSC9959), used in NPI mode. Some code which was thought to be SoC-specific (ocelot_board.c) wasn't, and vice versa, so it is being accordingly moved. - Exports ocelot driver structures and functions to include/soc/mscc. - Adds a DSA ocelot front-end for VSC9959, which is a PCI device and uses the exported ocelot functionality for hardware configuration. - Adds a tagger driver for the Vitesse injection/extraction DSA headers. This is known to be compatible with at least Ocelot and Felix. ==================== Signed-off-by: David S. Miller commit 56051948773eeb4224fbda88102e891d1ad5cefd Author: Vladimir Oltean Date: Thu Nov 14 17:03:30 2019 +0200 net: dsa: ocelot: add driver for Felix switch family This supports an Ethernet switching core from Vitesse / Microsemi / Microchip (VSC9959) which is part of the Ocelot family (a brand name), and whose code name is Felix. The switch can be (and is) integrated on different SoCs as a PCIe endpoint device. The functionality is provided by the core of the Ocelot switch driver (drivers/net/ethernet/mscc). In this regard, the current driver is an instance of Microsemi's Ocelot core driver, with a DSA front-end. It inherits its name from VSC9959's code name, to distinguish itself from the switchdev ocelot driver. The patch adds the logic for probing a PCI device and defines the register map for the VSC9959 switch core, since it has some differences in register addresses and bitfield mappings compared to the other Ocelot switches (VSC7511, VSC7512, VSC7513, VSC7514). The Felix driver declares the register map as part of the "instance table". Currently the VSC9959 inside NXP LS1028A is the only instance, but presumably it can support other switches in the Ocelot family, when used in DSA mode (Linux running on the external CPU, and not on the embedded MIPS). In a few cases, some h/w operations have to be done differently on VSC9959 due to missing bitfields. This is the case for the switch core reset and init. Because for this operation Ocelot uses some bits that are not present on Felix, the latter has to use a register from the global registers block (GCB) instead. Although it is a PCI driver, it relies on DT bindings for compatibility with DSA (CPU port link, PHY library). It does not have any custom device tree bindings, since we would like to minimize its dependency on device tree though. Signed-off-by: Claudiu Manoil Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8dce89aa5f3274e7c26132433840f63d129406bb Author: Vladimir Oltean Date: Thu Nov 14 17:03:29 2019 +0200 net: dsa: ocelot: add tagger for Ocelot/Felix switches While it is entirely possible that this tagger format is in fact more generic than just these 2 switch families, I don't have that knowledge. The Seville switch in NXP T1040 has a similar frame format, but there are enough differences (e.g. DEST field starts at bit 57 instead of 56) that calling this file tag_vitesse.c is a bit of a stretch at the moment. The frame format has been listed in a comment so that people who add support for further Vitesse switches can rework this tagger while keeping compatibility with Felix. The "ocelot" name was chosen instead of "felix" because even the Ocelot switch can act as a DSA device when it is used in NPI mode, and the Felix tagger format is almost identical. Currently it is only used for the Felix switch embedded in the NXP LS1028A chip. The ABI for this tagger should be considered "not stable" at the moment. The DSA tag is always placed before the Ethernet header and therefore, we are using the long prefix for RX tags to avoid putting the DSA master port in promiscuous mode. Once there will be an API in DSA for drivers to request DSA masters to be in promiscuous mode unconditionally, we will switch to the "no prefix" extraction frame header, which will save 16 padding bytes for each RX frame. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a030dfe1947310a2140b9e371dc9ebfab72c914f Author: Vladimir Oltean Date: Thu Nov 14 17:03:28 2019 +0200 net: mscc: ocelot: publish ocelot_sys.h to include/soc/mscc The Felix DSA driver needs to write to SYS_RAM_INIT_RAM_INIT for its own chip initialization process. Also update the MAINTAINERS file such that the headers exported by the ocelot driver are under the same maintainers' umbrella as the driver itself. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5e2563650232a4d998a60b10d3679f65dd4c02fb Author: Vladimir Oltean Date: Thu Nov 14 17:03:27 2019 +0200 net: mscc: ocelot: publish structure definitions to include/soc/mscc/ocelot.h We will be registering another switch driver based on ocelot, which lives under drivers/net/dsa. Make sure the Felix DSA front-end has the necessary abstractions to implement a new Ocelot driver instantiation. This includes the function prototypes for implementing DSA callbacks. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 3a77b5933fdb2ea4a9c7cdd9bd9b65b6fd23626e Author: Vladimir Oltean Date: Thu Nov 14 17:03:26 2019 +0200 net: mscc: ocelot: separate the implementation of switch reset The Felix switch has a different reset procedure, so a function pointer needs to be created and added to the ocelot_ops structure. The reset procedure has been moved into ocelot_init. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ba551bc3bc22f3a9f16a31cd856b823e76489009 Author: Vladimir Oltean Date: Thu Nov 14 17:03:25 2019 +0200 net: mscc: ocelot: adjust MTU on the CPU port in NPI mode When using the NPI port, the DSA tag is passed through Ethernet, so the switch's MAC needs to accept it as it comes from the DSA master. Increase the MTU on the external CPU port to account for the length of the injection header. Without this patch, MTU-sized frames are dropped by the switch's CPU port on xmit, which is especially obvious in TCP sessions. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f24711fddc36aa7286af724393ef7334b92c5702 Author: Vladimir Oltean Date: Thu Nov 14 17:03:24 2019 +0200 net: mscc: ocelot: export a constant for the tag length in bytes This constant will be used in a future patch to increase the MTU on NPI ports, and will also be used in the tagger driver for Felix. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit fa914e9c4d9485f06b3676791a74587d2642fca3 Author: Vladimir Oltean Date: Thu Nov 14 17:03:23 2019 +0200 net: mscc: ocelot: create a helper for changing the port MTU Since in an NPI/DSA setup, not all ports will have the same MTU, we need to make sure the watermarks for pause frames and/or tail dropping logic that existed in the driver is still coherent for the new MTU values. We need to do this because the NPI (aka external CPU) port needs an increased MTU for the DSA tag. This will be done in a future patch. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5bc9d2e6e7d546548ae1a7cd3de37672db4075ce Author: Vladimir Oltean Date: Thu Nov 14 17:03:22 2019 +0200 net: mscc: ocelot: move invariant configs out of adjust_link It doesn't make sense to rewrite all these registers every time the PHY library notifies us about a link state change. In a future patch we will customize the MTU for the CPU port, and since the MTU was previously configured from adjust_link, if we don't make this change, its value would have got overridden. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit dc3de2a294eab8b1375f96eb4cf2a1d5edfcc9ab Author: Claudiu Manoil Date: Thu Nov 14 17:03:21 2019 +0200 net: mscc: ocelot: filter out ocelot SoC specific PCS config from common path The adjust_link routine should be generic enough to be (re)used by any SoC that integrates a switch core compatible with the Ocelot core switch driver. Currently all configurations are generic except for the PCS settings that are SoC specific. Move these out to the Ocelot SoC/board instance. Signed-off-by: Claudiu Manoil Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 259630e08c2135df6582040b20bd5bb1383964a3 Author: Claudiu Manoil Date: Thu Nov 14 17:03:20 2019 +0200 net: mscc: ocelot: move resource ioremap and regmap init to common code Let's make this ioremap and regmap init code common. It should not be platform dependent as it should be usable by PCI devices too. Use better names where necessary to avoid clashes. Signed-off-by: Claudiu Manoil Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e7be235fa783209a661c8a324c1e394a5e4d9170 Merge: 43da44c87678 0b29ec643613 Author: David S. Miller Date: Fri Nov 15 12:28:28 2019 -0800 Merge branch 'net-smc-improve-termination-handling-part-3' Karsten Graul says: ==================== net/smc: improve termination handling (part 3) Part 3 of the SMC termination patches improves the link group termination processing and introduces the ability to immediately terminate a link group. ==================== Signed-off-by: David S. Miller commit 0b29ec6436138721acf5844e558f7334a0fa61d5 Author: Ursula Braun Date: Thu Nov 14 13:02:47 2019 +0100 net/smc: immediate termination for SMCR link groups If the SMC module is unloaded or an IB device is thrown away, the immediate link group freeing introduced for SMCD is exploited for SMCR as well. That means SMCR-specifics are added to smc_conn_kill(). Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 6a37ad3da5d64a632d03a8dc272c65e706cc7160 Author: Ursula Braun Date: Thu Nov 14 13:02:46 2019 +0100 net/smc: wait for tx completions before link freeing Make sure all pending work requests are completed before freeing a link. Dismiss tx pending slots already when terminating a link group to exploit termination shortcut in tx completion queue handler. And kill the completion queue tasklets after destroy of the completion queues, otherwise there is a time window for another tasklet schedule of an already killed tasklet. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 2c1d3e50302fe3e0bd6873323877c2ad19db3f49 Author: Ursula Braun Date: Thu Nov 14 13:02:45 2019 +0100 net/smc: abnormal termination without orderly flag For abnormal termination issue an LLC DELETE_LINK without the orderly flag. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 15e1b99aadfb2766f9379a23a0fc1d4336c8cd8e Author: Ursula Braun Date: Thu Nov 14 13:02:44 2019 +0100 net/smc: no WR buffer wait for terminating link group Avoid waiting for a free work request buffer, if the link group is already terminating. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 5edd6b9cb8d7c6c346c93c52a53735591127e879 Author: Ursula Braun Date: Thu Nov 14 13:02:43 2019 +0100 net/smc: introduce bookkeeping of SMCD link groups If the ism module is unloaded return control from exit routine only, if all link groups are freed. If an IB device is thrown away return control from device removal only, if all link groups belonging to this device are freed. A counters for the total number of SMCD link groups per ISM device is introduced. ism module unloading continues only if the total number of SMCD link groups for all ISM devices is zero. ISM device removal continues only it the total number of SMCD link groups per ISM device has decreased to zero. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 5421ec281df9dfda4418c02959e1f76097cabd9a Author: Ursula Braun Date: Thu Nov 14 13:02:42 2019 +0100 net/smc: abnormal termination of SMCD link groups A final cleanup due to SMCD device removal means immediate freeing of all link groups belonging to this device in interrupt context. This patch introduces a separate SMCD link group termination routine, which terminates all link groups of an SMCD device. This new routine smcd_terminate_all ()is reused if the smc module is unloaded. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 42bfba9eaa33dd4af0b50b87508062a41ec26653 Author: Ursula Braun Date: Thu Nov 14 13:02:41 2019 +0100 net/smc: immediate termination for SMCD link groups SMCD link group termination is called when peer signals its shutdown of its corresponding link group. For regular shutdowns no connections exist anymore. For abnormal shutdowns connections must be killed and their DMBs must be unregistered immediately. That means the SMCR method to delay the link group freeing several seconds does not fit. This patch adds immediate termination of a link group and its SMCD connections and makes sure all SMCD link group related cleanup steps are finished. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 50c6b20eff8e10cb91f06262d8003a5d9be3dfab Author: Ursula Braun Date: Thu Nov 14 13:02:40 2019 +0100 net/smc: fix final cleanup sequence for SMCD devices If peer announces shutdown, use the link group terminate worker for local cleanup of link groups and connections to terminate link group in proper context. Make sure link groups are cleaned up first before destroying the event queue of the SMCD device, because link group cleanup may raise events. Send signal shutdown only if peer has not done it already. Send socket abort or close only, if peer has not already announced shutdown. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 43da44c87678612f301d6ef6314064a6b52aad60 Merge: 983db6198f0d 8d07a7930434 Author: David S. Miller Date: Fri Nov 15 12:25:42 2019 -0800 Merge branch 'net-stmmac-CPU-Performance-Improvements' Jose Abreu says: ==================== net: stmmac: CPU Performance Improvements CPU Performance improvements for stmmac. Please check bellow for results before and after the series. Patch 1/7, allows RX Interrupt on Completion to be disabled and only use the RX HW Watchdog. Patch 2/7, setups the default RX coalesce settings instead of using the minimum value. Patch 3/7 and 4/7, removes the uneeded computations for RX Flow Control activation/de-activation, on some cases. Patch 5/7, tunes-up the default coalesce settings. Patch 6/7, re-works the TX coalesce timer activation logic. Patch 7/7, removes the now uneeded TBU interrupt. NetPerf UDP Results: -------------------- Socket Message Elapsed Messages CPU Service Size Size Time Okay Errors Throughput Util Demand bytes bytes secs # # 10^6bits/sec % SS us/KB --- XGMAC@2.5G: Before 212992 1400 10.00 2100620 0 2351.7 36.69 5.112 212992 10.00 2100539 2351.6 26.18 3.648 --- XGMAC@2.5G: After 212992 1400 10.00 2108972 0 2361.5 21.73 3.015 212992 10.00 2097038 2348.1 19.21 2.666 --- GMAC5@1G: Before 212992 1400 10.00 786000 0 880.2 34.71 12.923 212992 10.00 786000 880.2 23.42 8.719 --- GMAC5@1G: After 212992 1400 10.00 842648 0 943.7 14.12 4.903 212992 10.00 842648 943.7 12.73 4.418 Perf TCP Results on RX Path: ---------------------------- --- XGMAC@2.5G: Before 22.51% swapper [stmmac] [k] dwxgmac2_dma_interrupt 10.82% swapper [stmmac] [k] dwxgmac2_host_mtl_irq_status 5.21% swapper [stmmac] [k] dwxgmac2_host_irq_status 4.67% swapper [stmmac] [k] dwxgmac3_safety_feat_irq_status 3.63% swapper [kernel.kallsyms] [k] stack_trace_consume_entry 2.74% iperf3 [kernel.kallsyms] [k] copy_user_enhanced_fast_string 2.52% swapper [kernel.kallsyms] [k] update_stack_state 1.94% ksoftirqd/0 [stmmac] [k] dwxgmac2_dma_interrupt 1.45% iperf3 [kernel.kallsyms] [k] queued_spin_lock_slowpath 1.26% swapper [kernel.kallsyms] [k] create_object --- XGMAC@2.5G: After 7.43% swapper [kernel.kallsyms] [k] stack_trace_consume_entry 5.86% swapper [stmmac] [k] dwxgmac2_dma_interrupt 5.68% swapper [kernel.kallsyms] [k] update_stack_state 4.71% iperf3 [kernel.kallsyms] [k] copy_user_enhanced_fast_string 2.88% swapper [kernel.kallsyms] [k] create_object 2.69% swapper [stmmac] [k] dwxgmac2_host_mtl_irq_status 2.61% swapper [stmmac] [k] stmmac_napi_poll_rx 2.52% swapper [kernel.kallsyms] [k] unwind_next_frame.part.4 1.48% swapper [kernel.kallsyms] [k] unwind_get_return_address 1.38% swapper [kernel.kallsyms] [k] arch_stack_walk --- GMAC5@1G: Before 31.29% swapper [stmmac] [k] dwmac4_dma_interrupt 14.57% swapper [stmmac] [k] dwmac4_irq_mtl_status 10.66% swapper [stmmac] [k] dwmac4_irq_status 1.97% swapper [kernel.kallsyms] [k] stack_trace_consume_entry 1.73% iperf3 [kernel.kallsyms] [k] copy_user_enhanced_fast_string 1.59% swapper [kernel.kallsyms] [k] update_stack_state 1.15% iperf3 [kernel.kallsyms] [k] do_syscall_64 1.01% ksoftirqd/0 [stmmac] [k] dwmac4_dma_interrupt 0.89% swapper [kernel.kallsyms] [k] __default_send_IPI_dest_field 0.75% swapper [stmmac] [k] stmmac_napi_poll_rx --- GMAC5@1G: After 6.70% swapper [kernel.kallsyms] [k] stack_trace_consume_entry 5.79% swapper [stmmac] [k] dwmac4_dma_interrupt 5.29% swapper [kernel.kallsyms] [k] update_stack_state 3.52% iperf3 [kernel.kallsyms] [k] copy_user_enhanced_fast_string 2.83% swapper [stmmac] [k] dwmac4_irq_mtl_status 2.62% swapper [kernel.kallsyms] [k] create_object 2.46% swapper [stmmac] [k] stmmac_napi_poll_rx 2.32% swapper [kernel.kallsyms] [k] unwind_next_frame.part.4 2.19% swapper [stmmac] [k] dwmac4_irq_status 1.39% swapper [kernel.kallsyms] [k] unwind_get_return_address ==================== Signed-off-by: David S. Miller commit 8d07a7930434afd7ca4faa90ed478552d4a84b17 Author: Jose Abreu Date: Thu Nov 14 12:42:51 2019 +0100 net: stmmac: xgmac: Do not enable TBU interrupt Now that TX Coalesce has been rewritten we no longer need this additional interrupt enabled. This reduces CPU usage. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit c2837423cb54551302f037106830ee607b4563e0 Author: Jose Abreu Date: Thu Nov 14 12:42:50 2019 +0100 net: stmmac: Rework TX Coalesce logic Coalesce logic currently increments the number of packets and sets the IC bit when the coalesced packets have passed a given limit. This does not reflect very well what coalesce was meant for as we can have a large number of packets that are coalesced and then a single one, sent later on that has the IC bit. Rework the logic so that it coalesces only upon a limit of packets and sets the IC bit for large number of packets. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit da20245100319b54af770df707f358f2ebc3b16d Author: Jose Abreu Date: Thu Nov 14 12:42:49 2019 +0100 net: stmmac: Tune-up default coalesce settings Tune-up the defalt coalesce settings for optimal values. This gives the best performance in most of the use-cases. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 52f96cd135b160d44db4cb62a5b614b3bca20fbc Author: Jose Abreu Date: Thu Nov 14 12:42:48 2019 +0100 net: stmmac: xgmac: Remove uneeded computation for RFA/RFD RFA and RFD should not be dependent on FIFO size. In fact, the more FIFO space we have, the later we can activate Flow Control. Let's use hard-coded values for RFA and RFD for all FIFO sizes with the exception of 4k, which is a special case. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 854248e5ec810afe2c3dcf017bb76b7224b97c47 Author: Jose Abreu Date: Thu Nov 14 12:42:47 2019 +0100 net: stmmac: gmac4+: Remove uneeded computation for RFA/RFD RFA and RFD should not be dependent on FIFO size. In fact, the more FIFO space we have, the later we can activate Flow Control. Let's use hard-coded values for RFA and RFD for all FIFO sizes with the exception of 4k, which is a special case. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 4e4337ccf780978881f8f41c5c30dad626a4a51e Author: Jose Abreu Date: Thu Nov 14 12:42:46 2019 +0100 net: stmmac: Setup a default RX Coalesce value instead of the minimum For performance reasons, sometimes using the minimum RX Coalesce value is not optimal. Lets setup a default value that is optimal in most of the use cases. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 09146abebc788a2f133a6eae9cd6dc8c91c05047 Author: Jose Abreu Date: Thu Nov 14 12:42:45 2019 +0100 net: stmmac: Do not set RX IC bit if RX Coalesce is zero We may only want to use the RX Watchdog so lets check if RX Coalesce settings are non-zero and only set the RX Interrupt on Completion bit if its not. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 983db6198f0d0ee406f365069901387e7834c3c0 Author: Ido Schimmel Date: Thu Nov 14 11:54:19 2019 +0200 mlxsw: spectrum_router: Allocate discard adjacency entry when needed Commit 0c3cbbf96def ("mlxsw: Add specific trap for packets routed via invalid nexthops") allocated an adjacency entry during driver initialization whose purpose is to discard packets hitting the route pointing to it. These adjacency entries are allocated from a resource called KVD linear (KVDL). There are situations in which the user can decide to set the size of this resource (via devlink-resource) to 0, in which case the driver will not be able to load. Therefore, instead of pre-allocating this adjacency entry, simply allocate it only when needed. A variable indicating the validity of the entry is added and is used to ensure it is only allocated and written once and that it is freed after all the routes were flushed. Fixes: 0c3cbbf96def ("mlxsw: Add specific trap for packets routed via invalid nexthops") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit d6649d788e1a40b9bf2064bee4d7960fe85bd81e Author: YueHaibing Date: Thu Nov 14 15:39:46 2019 +0800 net/tls: Fix unused function warning If PROC_FS is not set, gcc warning this: net/tls/tls_proc.c:23:12: warning: 'tls_statistics_seq_show' defined but not used [-Wunused-function] Use #ifdef to guard this. Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 49e9d1a9faf2f71fdfd80a30697ee9a15070626d Author: Sebastian Andrzej Siewior Date: Fri Nov 15 19:01:25 2019 +0100 workqueue: Add RCU annotation for pwq list walk An additional check has been recently added to ensure that a RCU related lock is held while the RCU list is iterated. The `pwqs' are sometimes iterated without a RCU lock but with the &wq->mutex acquired leading to a warning. Teach list_for_each_entry_rcu() that the RCU usage is okay if &wq->mutex is acquired during the list traversal. Fixes: 28875945ba98d ("rcu: Add support for consolidated-RCU reader checking") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Tejun Heo commit dffe969aa7abfd866bc86780762a6aafa196d286 Author: Anson Huang Date: Fri Nov 15 11:30:14 2019 -0800 Input: imx_sc_key - correct SCU message structure to avoid stack corruption The SCU message's data field used for receiving response data from SCU should be 32-bit width, as SCU will send back 32-bit width data. This solves kernel panic when CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG is enabled. [ 1.950768] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted [ 1.980607] Workqueue: events imx_sc_check_for_events [ 1.985657] Call trace: [ 1.988104] dump_backtrace+0x0/0x140 [ 1.991768] show_stack+0x14/0x20 [ 1.995090] dump_stack+0xb4/0xf8 [ 1.998407] panic+0x158/0x324 [ 2.001463] print_tainted+0x0/0xa8 [ 2.004950] imx_sc_check_for_events+0x18c/0x190 [ 2.009569] process_one_work+0x198/0x320 [ 2.013579] worker_thread+0x48/0x420 [ 2.017252] kthread+0xf0/0x120 [ 2.020394] ret_from_fork+0x10/0x18 [ 2.023977] SMP: stopping secondary CPUs [ 2.027901] Kernel Offset: disabled [ 2.031391] CPU features: 0x0002,2100600c [ 2.035401] Memory Limit: none Signed-off-by: Anson Huang Fixes: 688f1dfb69b4 ("Input: keyboard - imx_sc: Add i.MX system controller key support") Link: https://lore.kernel.org/r/1573730499-2224-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Dmitry Torokhov commit d537858ac8aaf4311b51240893add2fc62003b97 Author: Mikulas Patocka Date: Wed Nov 13 06:48:16 2019 -0500 dm integrity: fix excessive alignment of metadata runs Metadata runs are supposed to be aligned on 4k boundary (so that they work efficiently with disks with 4k sectors). However, there was a programming bug that makes them aligned on 128k boundary instead. The unused space is wasted. Fix this bug by providing a proper 4k alignment. In order to keep existing volumes working, we introduce a new flag SB_FLAG_FIXED_PADDING - when the flag is clear, we calculate the padding the old way. In order to make sure that the old version cannot mount the volume created by the new version, we increase superblock version to 4. Also in order to not break with old integritysetup, we fix alignment only if the parameter "fix_padding" is present when formatting the device. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit c5ab54e9945b5f3dc8e9c31b93bb334fcea126f4 Author: Green Wan Date: Thu Nov 7 16:49:20 2019 +0800 riscv: dts: add support for PDMA device of HiFive Unleashed Rev A00 Add PDMA support to (arch/riscv/boot/dts/sifive/fu540-c000.dtsi) Signed-off-by: Green Wan Signed-off-by: Paul Walmsley commit 128161f47bc3797b0d068da13e311770685d6e4f Author: Steven Rostedt (VMware) Date: Fri Nov 15 14:14:45 2019 -0500 ftrace: Add helper find_direct_entry() to consolidate code Both unregister_ftrace_direct() and modify_ftrace_direct() needs to normalize the ip passed in to match the rec->ip, as it is acceptable to have the ip on the ftrace call site but not the start. There are also common validity checks with the record found by the ip, these should be done for both unregister_ftrace_direct() and modify_ftrace_direct(). Signed-off-by: Steven Rostedt (VMware) commit 406acdd32d3e7d5a6dcb7f67798e89068fbe0d77 Author: Steven Rostedt (VMware) Date: Fri Nov 15 14:19:04 2019 -0500 ftrace: Add another check for match in register_ftrace_direct() As an instruction pointer passed into register_ftrace_direct() may just exist on the ftrace call site, but may not be the start of the call site itself, register_ftrace_direct() still needs to update test if a direct call exists on the normalized site, as only one direct call is allowed at any one time. Fixes: 763e34e74bb7d ("ftrace: Add register_ftrace_direct()") Signed-off-by: Steven Rostedt (VMware) commit 1c7f9b673dc0a15753274c4e7f5ebfd4468fc69f Author: Steven Rostedt (VMware) Date: Fri Nov 15 14:13:20 2019 -0500 ftrace: Fix accounting bug with direct->count in register_ftrace_direct() The direct->count wasn't being updated properly, where it only was updated when the first entry was added, but should be updated every time. Fixes: 013bf0da04748 ("ftrace: Add ftrace_find_direct_func()") Signed-off-by: Steven Rostedt (VMware) commit db8c33f8b5bea59d00ca12dcd6b65d01b1ea98ef Author: Fenghua Yu Date: Mon Sep 16 15:39:58 2019 -0700 x86/cpu: Align the x86_capability array to size of unsigned long The x86_capability array in cpuinfo_x86 is of type u32 and thus is naturally aligned to 4 bytes. But, set_bit() and clear_bit() require the array to be aligned to size of unsigned long (i.e. 8 bytes on 64-bit systems). The array pointer is handed into atomic bit operations. If the access is not aligned to unsigned long then the atomic bit operations can end up crossing a cache line boundary, which causes the CPU to do a full bus lock as it can't lock both cache lines at once. The bus lock operation is heavy weight and can cause severe performance degradation. The upcoming #AC split lock detection mechanism will issue warnings for this kind of access. Force the alignment of the array to unsigned long. This avoids the massive code changes which would be required when converting the array data type to unsigned long. [ tglx: Rewrote changelog so it contains information WHY this is required ] Suggested-by: David Laight Suggested-by: Thomas Gleixner Signed-off-by: Fenghua Yu Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190916223958.27048-4-tony.luck@intel.com commit f6a892ddd53e555362dbf64d31b47fde0f550ec4 Author: Fenghua Yu Date: Mon Sep 16 15:39:56 2019 -0700 x86/cpu: Align cpu_caps_cleared and cpu_caps_set to unsigned long cpu_caps_cleared[] and cpu_caps_set[] are arrays of type u32 and therefore naturally aligned to 4 bytes, which is also unsigned long aligned on 32-bit, but not on 64-bit. The array pointer is handed into atomic bit operations. If the access not aligned to unsigned long then the atomic bit operations can end up crossing a cache line boundary, which causes the CPU to do a full bus lock as it can't lock both cache lines at once. The bus lock operation is heavy weight and can cause severe performance degradation. The upcoming #AC split lock detection mechanism will issue warnings for this kind of access. Force the alignment of these arrays to unsigned long. This avoids the massive code changes which would be required when converting the array data type to unsigned long. [ tglx: Rewrote changelog ] Signed-off-by: Fenghua Yu Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20190916223958.27048-2-tony.luck@intel.com commit 2fa6b1e01a9b1a54769c394f06cd72c3d12a2d48 Author: Al Viro Date: Tue Nov 12 16:13:06 2019 -0500 fs/namei.c: fix missing barriers when checking positivity Pinned negative dentries can, generally, be made positive by another thread. Conditions that prevent that are * ->d_lock on dentry in question * parent directory held at least shared * nobody else could have observed the address of dentry Most of the places working with those fall into one of those categories; however, d_lookup() and friends need to be used with some care. Fortunately, there's not a lot of call sites, and with few exceptions all of those fall under one of the cases above. Exceptions are all in fs/namei.c - in lookup_fast(), lookup_dcache() and mountpoint_last(). Another one is lookup_slow() - there dcache lookup is done with parent held shared, but the result is used after we'd drop the lock. The same happens in do_last() - the lookup (in lookup_one()) is done with parent locked, but result is used after unlocking. lookup_fast(), do_last() and mountpoint_last() flat-out reject negatives. Most of lookup_dcache() calls are made with parent locked at least shared; the only exception is lookup_one_len_unlocked(). It might return pinned negative, needs serious care from callers. Fortunately, almost nobody calls it directly anymore; all but two callers have converted to lookup_positive_unlocked(), which rejects negatives. lookup_slow() is called by the same lookup_one_len_unlocked() (see above), mountpoint_last() and walk_component(). In those two negatives are rejected. In other words, there is a small set of places where we need to check carefully if a pinned potentially negative dentry is, in fact, positive. After that check we want to be sure that both ->d_inode and type bits in ->d_flags are stable and observed. The set consists of follow_managed() (where the rejection happens for lookup_fast(), walk_component() and do_last()), last_mountpoint() and lookup_positive_unlocked(). Solution: 1) transition from negative to positive (in __d_set_inode_and_type()) stores ->d_inode, then uses smp_store_release() to set ->d_flags type bits. 2) aforementioned 3 places in fs/namei.c fetch ->d_flags with smp_load_acquire() and bugger off if it type bits say "negative". That way anyone downstream of those checks has dentry know positive pinned, with ->d_inode and type bits of ->d_flags stable and observed. I considered splitting off d_lookup_positive(), so that the checks could be done right there, under ->d_lock. However, that leads to massive duplication of rather subtle code in fs/namei.c and fs/dcache.c. It's worse than it might seem, thanks to autofs ->d_manage() getting involved ;-/ No matter what, autofs_d_manage()/autofs_d_automount() must live with the possibility of pinned negative dentry passed their way, becoming positive under them - that's the intended behaviour when lookup comes in the middle of automount in progress, so we can't keep them out of the area that has to deal with those, more's the pity... Reported-by: Ritesh Harjani Signed-off-by: Al Viro commit e84009336711d2bba885fc9cea66348ddfce3758 Author: Al Viro Date: Thu Oct 31 01:43:31 2019 -0400 fix dget_parent() fastpath race We are overoptimistic about taking the fast path there; seeing the same value in ->d_parent after having grabbed a reference to that parent does *not* mean that it has remained our parent all along. That wouldn't be a big deal (in the end it is our parent and we have grabbed the reference we are about to return), but... the situation with barriers is messed up. We might have hit the following sequence: d is a dentry of /tmp/a/b CPU1: CPU2: parent = d->d_parent (i.e. dentry of /tmp/a) rename /tmp/a/b to /tmp/b rmdir /tmp/a, making its dentry negative grab reference to parent, end up with cached parent->d_inode (NULL) mkdir /tmp/a, rename /tmp/b to /tmp/a/b recheck d->d_parent, which is back to original decide that everything's fine and return the reference we'd got. The trouble is, caller (on CPU1) will observe dget_parent() returning an apparently negative dentry. It actually is positive, but CPU1 has stale ->d_inode cached. Use d->d_seq to see if it has been moved instead of rechecking ->d_parent. NOTE: we are *NOT* going to retry on any kind of ->d_seq mismatch; we just go into the slow path in such case. We don't wait for ->d_seq to become even either - again, if we are racing with renames, we can bloody well go to slow path anyway. Signed-off-by: Al Viro commit 6c2d4798a8d16cf4f3a28c3cd4af4f1dcbbb4d04 Author: Al Viro Date: Thu Oct 31 01:21:58 2019 -0400 new helper: lookup_positive_unlocked() Most of the callers of lookup_one_len_unlocked() treat negatives are ERR_PTR(-ENOENT). Provide a helper that would do just that. Note that a pinned positive dentry remains positive - it's ->d_inode is stable, etc.; a pinned _negative_ dentry can become positive at any point as long as you are not holding its parent at least shared. So using lookup_one_len_unlocked() needs to be careful; lookup_positive_unlocked() is safer and that's what the callers end up open-coding anyway. Signed-off-by: Al Viro commit d41efb522e902364ab09c782d511c1bedc388ddd Author: Al Viro Date: Mon Nov 4 22:30:52 2019 -0500 fs/namei.c: pull positivity check into follow_managed() There are 4 callers; two proceed to check if result is positive and fail with ENOENT if it isn't; one (in handle_lookup_down()) is guaranteed to yield positive and one (in lookup_fast()) is _preceded_ by positivity check. However, follow_managed() on a negative dentry is a (fairly cheap) no-op on anything other than autofs. And negative autofs dentries are never hashed, so lookup_fast() is not going to run into one of those. Moreover, successful follow_managed() on a _positive_ dentry never yields a negative one (and we significantly rely upon that in callers of lookup_fast()). In other words, we can easily transpose the positivity check and the call of follow_managed() in lookup_fast(). And that allows to fold the positivity check *into* follow_managed(), simplifying life for the code downstream of its calls. Signed-off-by: Al Viro commit ca16d5bee59807bf04deaab0a8eccecd5061528c Author: Yang Tao Date: Wed Nov 6 22:55:35 2019 +0100 futex: Prevent robust futex exit race Robust futexes utilize the robust_list mechanism to allow the kernel to release futexes which are held when a task exits. The exit can be voluntary or caused by a signal or fault. This prevents that waiters block forever. The futex operations in user space store a pointer to the futex they are either locking or unlocking in the op_pending member of the per task robust list. After a lock operation has succeeded the futex is queued in the robust list linked list and the op_pending pointer is cleared. After an unlock operation has succeeded the futex is removed from the robust list linked list and the op_pending pointer is cleared. The robust list exit code checks for the pending operation and any futex which is queued in the linked list. It carefully checks whether the futex value is the TID of the exiting task. If so, it sets the OWNER_DIED bit and tries to wake up a potential waiter. This is race free for the lock operation but unlock has two race scenarios where waiters might not be woken up. These issues can be observed with regular robust pthread mutexes. PI aware pthread mutexes are not affected. (1) Unlocking task is killed after unlocking the futex value in user space before being able to wake a waiter. pthread_mutex_unlock() | V atomic_exchange_rel (&mutex->__data.__lock, 0) <------------------------killed lll_futex_wake () | | |(__lock = 0) |(enter kernel) | V do_exit() exit_mm() mm_release() exit_robust_list() handle_futex_death() | |(__lock = 0) |(uval = 0) | V if ((uval & FUTEX_TID_MASK) != task_pid_vnr(curr)) return 0; The sanity check which ensures that the user space futex is owned by the exiting task prevents the wakeup of waiters which in consequence block infinitely. (2) Waiting task is killed after a wakeup and before it can acquire the futex in user space. OWNER WAITER futex_wait() pthread_mutex_unlock() | | | |(__lock = 0) | | | V | futex_wake() ------------> wakeup() | |(return to userspace) |(__lock = 0) | V oldval = mutex->__data.__lock <-----------------killed atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, | id | assume_other_futex_waiters, 0) | | | (enter kernel)| | V do_exit() | | V handle_futex_death() | |(__lock = 0) |(uval = 0) | V if ((uval & FUTEX_TID_MASK) != task_pid_vnr(curr)) return 0; The sanity check which ensures that the user space futex is owned by the exiting task prevents the wakeup of waiters, which seems to be correct as the exiting task does not own the futex value, but the consequence is that other waiters wont be woken up and block infinitely. In both scenarios the following conditions are true: - task->robust_list->list_op_pending != NULL - user space futex value == 0 - Regular futex (not PI) If these conditions are met then it is reasonably safe to wake up a potential waiter in order to prevent the above problems. As this might be a false positive it can cause spurious wakeups, but the waiter side has to handle other types of unrelated wakeups, e.g. signals gracefully anyway. So such a spurious wakeup will not affect the correctness of these operations. This workaround must not touch the user space futex value and cannot set the OWNER_DIED bit because the lock value is 0, i.e. uncontended. Setting OWNER_DIED in this case would result in inconsistent state and subsequently in malfunction of the owner died handling in user space. The rest of the user space state is still consistent as no other task can observe the list_op_pending entry in the exiting tasks robust list. The eventually woken up waiter will observe the uncontended lock value and take it over. [ tglx: Massaged changelog and comment. Made the return explicit and not depend on the subsequent check and added constants to hand into handle_futex_death() instead of plain numbers. Fixed a few coding style issues. ] Fixes: 0771dfefc9e5 ("[PATCH] lightweight robust futexes: core") Signed-off-by: Yang Tao Signed-off-by: Yi Wang Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1573010582-35297-1-git-send-email-wang.yi59@zte.com.cn Link: https://lkml.kernel.org/r/20191106224555.943191378@linutronix.de commit d99724c3c36ae73ed3908f5e3f2d103a48cd9ad0 Author: Bob Peterson Date: Fri Nov 15 10:45:41 2019 -0500 gfs2: Close timing window with GLF_INVALIDATE_IN_PROGRESS This patch closes a timing window in which two processes compete and overlap in the execution of do_xmote for the same glock: Process A Process B ------------------------------------ ----------------------------- 1. Grabs gl_lockref and calls do_xmote 2. Grabs gl_lockref but is blocked 3. Sets GLF_INVALIDATE_IN_PROGRESS 4. Unlocks gl_lockref 5. Calls do_xmote 6. Call glops->go_sync 7. test_and_clear_bit GLF_DIRTY 8. Call gfs2_log_flush Call glops->go_sync 9. (slow IO, so it blocks a long time) test_and_clear_bit GLF_DIRTY It's not dirty (step 7) returns 10. Tests GLF_INVALIDATE_IN_PROGRESS 11. Calls go_inval (rgrp_go_inval) 12. gfs2_rgrp_relse does brelse 13. truncate_inode_pages_range 14. Calls lm_lock UN In step 14 we've just told dlm to give the glock to another node when, in fact, process A has not finished the IO and synced all buffer_heads to disk and make sure their revokes are done. This patch fixes the problem by changing the GLF_INVALIDATE_IN_PROGRESS to use test_and_set_bit, and if the bit is already set, process B just ignores it and trusts that process A will do the do_xmote in the proper order. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 52b1cdcb7a84a4a3cec0093eaf390bf2e11e4278 Author: Bob Peterson Date: Fri Nov 15 09:42:46 2019 -0500 gfs2: Abort gfs2_freeze if io error is seen Before this patch, an io error, such as -EIO writing to the journal would cause function gfs2_freeze to go into an infinite loop, continuously retrying the freeze operation. But nothing ever clears the -EIO except unmount after withdraw, which is impossible if the freeze operation never ends (fails). Instead you get: [ 6499.767994] gfs2: fsid=dm-32.0: error freezing FS: -5 [ 6499.773058] gfs2: fsid=dm-32.0: retrying... [ 6500.791957] gfs2: fsid=dm-32.0: error freezing FS: -5 [ 6500.797015] gfs2: fsid=dm-32.0: retrying... This patch adds a check for -EIO in gfs2_freeze, and if seen, it dequeues the freeze glock, aborts the loop and returns the error. Also, there's no need to pass the freeze holder to function gfs2_lock_fs_check_clean since it's only called in one place and it's a well-known superblock pointer, so this simplifies that. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 760f8bc7c89c87bff9c01a8746e85dcc6e771ea8 Author: Colin Ian King Date: Fri Nov 15 08:59:38 2019 +0000 ftrace/selftests: Fix spelling mistake "wakeing" -> "waking" There is a spelling mistake in a trace_printk message. As well as in the selftests that search for this string. Link: http://lkml.kernel.org/r/20191115085938.38947-1-colin.king@canonical.com Link: http://lkml.kernel.org/r/20191115090356.39572-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (VMware) commit 58a74a2925a5b4125dd4f4e728490b9642534c81 Author: Artem Bityutskiy Date: Fri Nov 15 11:17:30 2019 +0200 tracing: Increase SYNTH_FIELDS_MAX for synthetic_events Increase the maximum allowed count of synthetic event fields from 16 to 32 in order to allow for larger-than-usual events. Link: http://lkml.kernel.org/r/20191115091730.9192-1-dedekind1@gmail.com Reviewed-by: Tom Zanussi Signed-off-by: Artem Bityutskiy Signed-off-by: Steven Rostedt (VMware) commit 3c0edea9b29f9be6c093f236f762202b30ac9431 Author: David Howells Date: Fri Nov 1 20:52:24 2019 +0000 pipe: Remove sync on wake_ups commit cefa80ced57a29179313da7ab3cbb26afb040b6f Author: David Howells Date: Thu Oct 31 15:59:24 2019 +0000 pipe: Increase the writer-wakeup threshold to reduce context-switch count Increase the threshold at which the reader sends a wake event to the writers in the queue such that the queue must be half empty before the wake is issued rather than the wake being issued when just a single slot available. This reduces the number of context switches in the tests significantly, without altering the amount of work achieved. With my pipe-bench program, there's a 20% reduction versus an unpatched kernel. Suggested-by: Konstantin Khlebnikov Signed-off-by: David Howells commit 8df441294dd34fb0b16b45f550f55e96db6af4dc Author: David Howells Date: Mon Oct 7 16:30:51 2019 +0100 pipe: Check for ring full inside of the spinlock in pipe_write() Make pipe_write() check to see if the ring has become full between it taking the pipe mutex, checking the ring status and then taking the spinlock. This can happen if a notification is written into the pipe as that happens without the pipe mutex. Signed-off-by: David Howells commit 7e25a73f1a52b58fc8206557e40d990cd791ad25 Author: David Howells Date: Mon Oct 7 15:10:06 2019 +0100 pipe: Remove redundant wakeup from pipe_write() Remove a redundant wakeup from pipe_write(). Signed-off-by: David Howells commit a194dfe6e6f6f7205eea850a420f2bc6a1541209 Author: David Howells Date: Fri Sep 20 16:32:19 2019 +0100 pipe: Rearrange sequence in pipe_write() to preallocate slot Rearrange the sequence in pipe_write() so that the allocation of the new buffer, the allocation of a ring slot and the attachment to the ring is done under the pipe wait spinlock and then the lock is dropped and the buffer can be filled. The data copy needs to be done with the spinlock unheld and irqs enabled, so the lock needs to be dropped first. However, the reader can't progress as we're holding pipe->mutex. We also need to drop the lock as that would impact others looking at the pipe waitqueue, such as poll(), the consumer and a future kernel message writer. We just abandon the preallocated slot if we get a copy error. Future writes may continue it and a future read will eventually recycle it. Signed-off-by: David Howells commit 8446487feba988a92e7649c60367510f0b0445a8 Author: David Howells Date: Tue Sep 24 16:07:04 2019 +0100 pipe: Conditionalise wakeup in pipe_read() Only do a wakeup in pipe_read() if we made space in a completely full buffer. The producer shouldn't be waiting on pipe->wait otherwise. Signed-off-by: David Howells commit b667b867344301e24f21d4a4c844675ff61d89e1 Author: David Howells Date: Tue Sep 24 16:09:04 2019 +0100 pipe: Advance tail pointer inside of wait spinlock in pipe_read() Advance the pipe ring tail pointer inside of wait spinlock in pipe_read() so that the pipe can be written into with kernel notifications from contexts where pipe->mutex cannot be taken. Signed-off-by: David Howells commit 6718b6f855a0b4962d54bd625be2718cb820cec6 Author: David Howells Date: Wed Oct 16 16:47:32 2019 +0100 pipe: Allow pipes to have kernel-reserved slots Split pipe->ring_size into two numbers: (1) pipe->ring_size - indicates the hard size of the pipe ring. (2) pipe->max_usage - indicates the maximum number of pipe ring slots that userspace orchestrated events can fill. This allows for a pipe that is both writable by the general kernel notification facility and by userspace, allowing plenty of ring space for notifications to be added whilst preventing userspace from being able to pin too much unswappable kernel space. Signed-off-by: David Howells commit fd70466d37bf3fe0118d18c56ddde85b428f86cf Author: Kai-Heng Feng Date: Thu Nov 7 22:28:11 2019 +0800 HID: i2c-hid: Reset ALPS touchpads on resume Commit 52cf93e63ee6 ("HID: i2c-hid: Don't reset device upon system resume") fixes many touchpads and touchscreens, however ALPS touchpads start to trigger IRQ storm after system resume. Since it's total silence from ALPS, let's bring the old behavior back to ALPS touchpads. Fixes: 52cf93e63ee6 ("HID: i2c-hid: Don't reset device upon system resume") Signed-off-by: Kai-Heng Feng Signed-off-by: Jiri Kosina commit 0c8432236dea20a95f68fa17989ea3f8af0186a5 Author: Aaron Ma Date: Thu Nov 14 03:12:47 2019 +0800 HID: i2c-hid: fix no irq after reset on raydium 3118 On some ThinkPad L390 some raydium 3118 touchscreen devices doesn't response any data after reset, but some does. Add this ID to no irq quirk, then don't wait for any response alike on these touchscreens. All kinds of raydium 3118 devices work fine. BugLink: https://bugs.launchpad.net/bugs/1849721 Signed-off-by: Aaron Ma Signed-off-by: Jiri Kosina commit 3c845acd0237caef617f330a0e3b37ad8ae9fea5 Author: Jan Kara Date: Fri Nov 15 11:22:10 2019 +0100 jbd2: make jbd2_handle_buffer_credits() handle reserved handles The helper jbd2_handle_buffer_credits() doesn't correctly handle reserved handles which can lead to crashes. Fix it getting of journal pointer to work for reserved handles as well. Fixes: a9a8344ee171 ("ext4, jbd2: Provide accessor function for handle credits") Reported-by: Eric Biggers Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191115102210.29445-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 942437c97fd9ff23a17c13118f50bd0490f6868c Author: Arnd Bergmann Date: Mon Jul 15 11:46:10 2019 +0200 y2038: allow disabling time32 system calls At the moment, the compilation of the old time32 system calls depends purely on the architecture. As systems with new libc based on 64-bit time_t are getting deployed, even architectures that previously supported these (notably x86-32 and arm32 but also many others) no longer depend on them, and removing them from a kernel image results in a smaller kernel binary, the same way we can leave out many other optional system calls. More importantly, on an embedded system that needs to keep working beyond year 2038, any user space program calling these system calls is likely a bug, so removing them from the kernel image does provide an extra debugging help for finding broken applications. I've gone back and forth on hiding this option unless CONFIG_EXPERT is set. This version leaves it visible based on the logic that eventually it will be turned off indefinitely. Acked-by: Christian Brauner Signed-off-by: Arnd Bergmann commit bd40a175769d411b2a37e1c087082ac7ee2c15bb Author: Arnd Bergmann Date: Thu Nov 7 15:27:39 2019 +0100 y2038: itimer: change implementation to timespec64 There is no 64-bit version of getitimer/setitimer since that is not actually needed. However, the implementation is built around the deprecated 'struct timeval' type. Change the code to use timespec64 internally to reduce the dependencies on timeval and associated helper functions. Minor adjustments in the code are needed to make the native and compat version work the same way, and to keep the range check working after the conversion. Signed-off-by: Arnd Bergmann commit ddbc7d0657e9fd38b69f16bd0310703367b52d29 Author: Arnd Bergmann Date: Fri Oct 25 21:37:43 2019 +0200 y2038: move itimer reset into itimer.c Preparing for a change to the itimer internals, stop using the do_setitimer() symbol and instead use a new higher-level interface. The do_getitimer()/do_setitimer functions can now be made static, allowing the compiler to potentially produce better object code. Reviewed-by: Thomas Gleixner Signed-off-by: Arnd Bergmann commit 4c22ea2b91203564fdf392b3d3cae249b652a8ae Author: Arnd Bergmann Date: Fri Oct 25 16:59:39 2019 +0200 y2038: use compat_{get,set}_itimer on alpha The itimer handling for the old alpha osf_setitimer/osf_getitimer system calls is identical to the compat version of getitimer/setitimer, so just use those directly. Signed-off-by: Arnd Bergmann commit c1745f84be2657f5702388133551b759b9237f59 Author: Arnd Bergmann Date: Fri Oct 25 10:46:22 2019 +0200 y2038: itimer: compat handling to itimer.c The structure is only used in one place, moving it there simplifies the interface and helps with later changes to this code. Rename it to match the other time32 structures in the process. Reviewed-by: Thomas Gleixner Signed-off-by: Arnd Bergmann commit 5e0fb1b57bea8d11fe77da2bc80f4c9a67e28318 Author: Arnd Bergmann Date: Wed Aug 15 20:04:11 2018 +0200 y2038: time: avoid timespec usage in settimeofday() The compat_get_timeval() and timeval_valid() interfaces are deprecated and getting removed along with the definition of struct timeval itself. Change the two implementations of the settimeofday() system call to open-code these helpers and completely avoid references to timeval. The timeval_valid() call is not needed any more here, only a check to avoid overflowing tv_nsec during the multiplication, as there is another range check in do_sys_settimeofday64(). Tested-by: syzbot+dccce9b26ba09ca49966@syzkaller.appspotmail.com Signed-off-by: Arnd Bergmann commit bde9e963af2d0a9762781c4dccaef21696d5bb94 Author: Arnd Bergmann Date: Fri Apr 20 22:03:38 2018 +0200 y2038: timerfd: Use timespec64 internally timerfd_show() uses a 'struct itimerspec' internally, but that is deprecated because of the time_t overflow and a conflict with the glibc type of the same name that is now incompatible in user space. Use a pair of timespec64 variables instead as a simple replacement. As this removes the last use of itimerspec from the kernel, allowing the removal of the definition from the uapi headers along with timespec and timeval later. Reviewed-by: Thomas Gleixner Signed-off-by: Arnd Bergmann commit e2bb80d55d75ce7fd300fcd8d47a97413c3cd322 Author: Arnd Bergmann Date: Thu Nov 23 13:46:33 2017 +0100 y2038: elfcore: Use __kernel_old_timeval for process times We store elapsed time for a crashed process in struct elf_prstatus using 'timeval' structures. Once glibc starts using 64-bit time_t, this becomes incompatible with the kernel's idea of timeval since the structure layout no longer matches on 32-bit architectures. This changes the definition of the elf_prstatus structure to use __kernel_old_timeval instead, which is hardcoded to the currently used binary layout. There is no risk of overflow in y2038 though, because the time values are all relative times, and can store up to 68 years of process elapsed time. There is a risk of applications breaking at build time when they use the new kernel headers and expect the type to be exactly 'timeval' rather than a structure that has the same fields as before. Those applications have to be modified to deal with 64-bit time_t anyway. Signed-off-by: Arnd Bergmann commit 693737b6cc2edc258040b28462a90b63503394d9 Author: Arnd Bergmann Date: Thu Nov 23 14:22:06 2017 +0100 y2038: make ns_to_compat_timeval use __kernel_old_timeval This gets us one step closer to removing 'struct timeval' from the kernel. We still keep __kernel_old_timeval for interfaces that we cannot fix otherwise, and ns_to_compat_timeval() is provably safe for interfaces that are legitimate users of __kernel_old_timeval on native kernels, so this is an obvious change. Signed-off-by: Arnd Bergmann commit df1b4ba9d4a8454285c53c2ec7224228105bc5c8 Author: Arnd Bergmann Date: Fri Oct 25 22:04:46 2019 +0200 y2038: socket: use __kernel_old_timespec instead of timespec The 'timespec' type definition and helpers like ktime_to_timespec() or timespec64_to_timespec() should no longer be used in the kernel so we can remove them and avoid introducing y2038 issues in new code. Change the socket code that needs to pass a timespec to user space for backward compatibility to use __kernel_old_timespec instead. This type has the same layout but with a clearer defined name. Slightly reformat tcp_recv_timestamp() for consistency after the removal of timespec64_to_timespec(). Acked-by: Deepa Dinamani Signed-off-by: Arnd Bergmann commit 0309f98f2fdc3526317e9bac150ca690f1f94ce6 Author: Arnd Bergmann Date: Sun Oct 27 18:09:32 2019 +0100 y2038: socket: remove timespec reference in timestamping In order to remove the 'struct timespec' definition and the timespec64_to_timespec() helper function, change over the in-kernel definition of 'struct scm_timestamping' to use the __kernel_old_timespec replacement and open-code the assignment. Acked-by: Deepa Dinamani Signed-off-by: Arnd Bergmann commit 75d319c06e6a76f67549c0ae1007dc3167804f4e Author: Arnd Bergmann Date: Fri Oct 25 22:56:17 2019 +0200 y2038: syscalls: change remaining timeval to __kernel_old_timeval All of the remaining syscalls that pass a timeval (gettimeofday, utime, futimesat) can trivially be changed to pass a __kernel_old_timeval instead, which has a compatible layout, but avoids ambiguity with the timeval type in user space. Acked-by: Christian Brauner Acked-by: Rafael J. Wysocki Signed-off-by: Arnd Bergmann commit bdd565f817a74b9e30edec108f7cb1dbc762b8a6 Author: Arnd Bergmann Date: Fri Oct 25 22:46:48 2019 +0200 y2038: rusage: use __kernel_old_timeval There are two 'struct timeval' fields in 'struct rusage'. Unfortunately the definition of timeval is now ambiguous when used in user space with a libc that has a 64-bit time_t, and this also changes the 'rusage' definition in user space in a way that is incompatible with the system call interface. While there is no good solution to avoid all ambiguity here, change the definition in the kernel headers to be compatible with the kernel ABI, using __kernel_old_timeval as an unambiguous base type. In previous discussions, there was also a plan to add a replacement for rusage based on 64-bit timestamps and nanosecond resolution, i.e. 'struct __kernel_timespec'. I have patches for that as well, if anyone thinks we should do that. Reviewed-by: Cyrill Gorcunov Signed-off-by: Arnd Bergmann commit 2a785996cc5e2fc1d1d29d196f530905f68d2dc2 Author: Arnd Bergmann Date: Tue Nov 5 11:10:01 2019 +0100 y2038: uapi: change __kernel_time_t to __kernel_old_time_t This is mainly a patch for clarification, and to let us remove the time_t definition from the kernel to prevent new users from creeping in that might not be y2038-safe. All remaining uses of 'time_t' or '__kernel_time_t' are part of the user API that cannot be changed by that either have a replacement or that do not suffer from the y2038 overflow. Acked-by: Deepa Dinamani Acked-by: Christian Brauner Signed-off-by: Arnd Bergmann commit 1bf883c1a9cf88a60234039356aac8f23479dce9 Author: Arnd Bergmann Date: Tue Nov 5 09:22:38 2019 +0100 y2038: stat: avoid 'time_t' in 'struct stat' The time_t definition may differ between user space and kernel space, so replace time_t with an unambiguous 'long' for the mips and sparc. The same structures also contain 'off_t', which has the same problem, so replace that as well on those two architectures and powerpc. Signed-off-by: Arnd Bergmann commit caf5e32d4ea7253820f38dd7c429f8d4a8019c5f Author: Arnd Bergmann Date: Mon Nov 4 21:17:26 2019 +0100 y2038: ipc: remove __kernel_time_t reference from headers There are two structures based on time_t that conflict between libc and kernel: timeval and timespec. Both are now renamed to __kernel_old_timeval and __kernel_old_timespec. For time_t, the old typedef is still __kernel_time_t. There is nothing wrong with that name, but it would be nice to not use that going forward as this type is used almost only in deprecated interfaces because of the y2038 overflow. In the IPC headers (msgbuf.h, sembuf.h, shmbuf.h), __kernel_time_t is only used for the 64-bit variants, which are not deprecated. Change these to a plain 'long', which is the same type as __kernel_time_t on all 64-bit architectures anyway, to reduce the number of users of the old type. Signed-off-by: Arnd Bergmann commit 176ed98c8a76ee08babf99b25b00992c2a5e7bbc Author: Arnd Bergmann Date: Sun Oct 27 17:26:55 2019 +0100 y2038: vdso: powerpc: avoid timespec references As a preparation to stop using 'struct timespec' in the kernel, change the powerpc vdso implementation: - split up the vdso data definition to have equivalent members for seconds and nanoseconds instead of an xtime structure - use timespec64 as an intermediate for the xtime update - change the asm-offsets definition to be based the appropriate fixed-length types This is only a temporary fix for changing the types, in order to actually support a 64-bit safe vdso32 version of clock_gettime(), the entire powerpc vdso should be replaced with the generic lib/vdso/ implementation. If that happens first, this patch becomes obsolete. Signed-off-by: Arnd Bergmann commit e6071b182df0622636b9cd97a80038a495ccb06f Author: Arnd Bergmann Date: Thu Oct 24 23:35:28 2019 +0200 y2038: vdso: nds32: open-code timespec_add_ns() The nds32 vdso is now the last user of the deprecated timespec_add_ns(). Change it to an open-coded version like the one it already uses in do_realtime(). What we should really do though is to use the generic vdso implementation that is now used in x86. arm and mips. Signed-off-by: Arnd Bergmann commit 21346564ccad17b928cf0d51584608531d91d298 Author: Arnd Bergmann Date: Tue Nov 5 11:10:01 2019 +0100 y2038: vdso: change time_t to __kernel_old_time_t Only x86 uses the 'time' syscall in vdso, so change that to __kernel_old_time_t as a preparation for removing 'time_t' and '__kernel_time_t' later. Reviewed-by: Thomas Gleixner Signed-off-by: Arnd Bergmann commit 82210fc778982d9386e266fa5f0b52cde5c2f0cf Author: Arnd Bergmann Date: Sun Oct 27 19:26:41 2019 +0100 y2038: vdso: change timespec to __kernel_old_timespec In order to remove 'timespec' completely from the kernel, all internal uses should be converted to a y2038-safe type, while those that are only for compatibity with existing user space should be marked appropriately. Change vdso to use __kernel_old_timespec in order to avoid the deprecated type and mark these interfaces as outdated. Signed-off-by: Arnd Bergmann commit ddccf40fe82b7ac7c44b186ec4b6d1d1bbc2cbff Author: Arnd Bergmann Date: Thu Nov 23 14:29:37 2017 +0100 y2038: vdso: change timeval to __kernel_old_timeval The gettimeofday() function in vdso uses the traditional 'timeval' structure layout, which will be incompatible with future versions of glibc on 32-bit architectures that use a 64-bit time_t. This interface is problematic for y2038, when time_t overflows on 32-bit architectures, but the plan so far is that a libc with 64-bit time_t will not call into the gettimeofday() vdso helper at all, and only have a method for entering clock_gettime(). This means we don't have to fix it here, though we probably want to add a new clock_gettime() entry point using a 64-bit version of 'struct timespec' at some point. Changing the vdso code to use __kernel_old_timeval helps isolate this usage from the other ones that still need to be fixed properly, and it gets us closer to removing the 'timeval' definition from the kernel sources. Reviewed-by: Thomas Gleixner Signed-off-by: Arnd Bergmann commit 94c467ddb273dc9a6a4fb09aef392c119b151edb Author: Arnd Bergmann Date: Fri Oct 25 22:03:06 2019 +0200 y2038: add __kernel_old_timespec and __kernel_old_time_t The 'struct timespec' definition can no longer be part of the uapi headers because it conflicts with a a now incompatible libc definition. Also, we really want to remove it in order to prevent new uses from creeping in. The same namespace conflict exists with time_t, which should also be removed. __kernel_time_t could be used safely, but adding 'old' in the name makes it clearer that this should not be used for new interfaces. Add a replacement __kernel_old_timespec structure and __kernel_old_time_t along the lines of __kernel_old_timeval. Acked-by: Deepa Dinamani Signed-off-by: Arnd Bergmann commit 3ca47e958a64b1116a2c35e65dcf467fc53d52de Author: Arnd Bergmann Date: Tue Apr 23 17:43:50 2019 +0200 y2038: remove CONFIG_64BIT_TIME The CONFIG_64BIT_TIME option is defined on all architectures, and can be removed for simplicity now. Signed-off-by: Arnd Bergmann commit d6a62a4b5f3f7cb88d05f13ad0da0cbc2c322272 Author: Chunyan Zhang Date: Mon Nov 11 17:02:29 2019 +0800 dt-bindings: serial: Add a new compatible string for SC9863A SC9863A use the same serial device which SC9836 uses. Signed-off-by: Chunyan Zhang Signed-off-by: Rob Herring commit 12e72714cfffcc69f299cc7e716ade45a18ea796 Author: Chunyan Zhang Date: Mon Nov 11 17:02:27 2019 +0800 dt-bindings: serial: Convert sprd-uart to json-schema Convert the sprd-uart binding to DT schema using json-schema. Signed-off-by: Chunyan Zhang [robh: dual license GPL/BSD] Signed-off-by: Rob Herring commit ee906c6b9c6e7e4ad749f5cfdf65768455f4bf43 Author: Kai Vehmanen Date: Fri Nov 15 14:44:49 2019 +0200 ALSA: hda - remove forced polling workaround for CFL and CNL Remove the workarounds added in commit fa763f1b2858 ("ALSA: hda - Force polling mode on CNL for fixing codec communication") and commit a8d7bde23e71 ("ALSA: hda - Force polling mode on CFL for fixing codec communication"). The workarounds are no longer needed after the more generic change done in commit 2756d9143aa5 ("ALSA: hda - Fix intermittent CORB/RIRB stall on Intel chips"). This change applies to a larger set of hardware and covers CFL and CNL as well. Similar change was already done to SOF DSP HDA driver with no regressions detected. Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20191115124449.20512-4-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit c8e3eb9be57f91751aeb9397118755390dbff9a4 Author: Kai Vehmanen Date: Fri Nov 15 14:44:48 2019 +0200 ALSA: hda: hdmi - remove redundant code comments Remove unnecessary comments related to pin mapping on Intel platforms. Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20191115124449.20512-3-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit d577cf76fa3192f9e656bb101aa54d25a6a71347 Author: Kai Vehmanen Date: Fri Nov 15 14:44:47 2019 +0200 ALSA: hda: hdmi - fix port numbering for ICL and TGL platforms Semantics of port#0 differ between ICL and TGL: ICL port#0 -> never used for HDAudio ICL port#1 -> should be mapped to first pin (0x04) TGL port#0 -> typically not used, but HW has the support, so should be mapped to first pin (0x04) TGL port#1 -> should be mapped to 2nd pin (0x06) Refactor the port mapping logic to allow to take the above differences into account. Fixes issues with HDAudio on some TGL platforms. Co-developed-by: Pan Xiuli Signed-off-by: Pan Xiuli Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20191115124449.20512-2-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 5ba03f8f681a8c894514c55cf7a9027ef897590e Author: Li Yang Date: Fri Nov 8 16:40:56 2019 -0600 rtc: fsl-ftm-alarm: remove select FSL_RCPM and default y from Kconfig The Flextimer alarm is primarily used as a wakeup source for system power management. But it shouldn't select the power management driver as they don't really have dependency of each other. Also remove the default y as it is not a critical feature for the systems. Signed-off-by: Li Yang Link: https://lore.kernel.org/r/1573252856-11759-1-git-send-email-leoyang.li@nxp.com Signed-off-by: Alexandre Belloni commit 3f86a7e090d1dfb974a9dc9d44049f9bff01e6a5 Author: Hans de Goede Date: Thu Nov 14 11:25:59 2019 +0100 gpiolib: acpi: Print pin number on acpi_gpiochip_alloc_event errors Print pin number and error-code on acpi_gpiochip_alloc_event errors, to help debugging these. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20191114102600.34558-1-hdegoede@redhat.com Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 4f5969c36a4572dbaf8737dd9f486382d4e44b4a Author: YueHaibing Date: Mon Nov 11 03:34:27 2019 +0000 rtw88: remove duplicated include from ps.c Remove duplicated include. Signed-off-by: YueHaibing Reviewed-by: Simon Horman Signed-off-by: Kalle Valo commit 38860bdf28b7b01e744834b7b1277812ad82786d Author: Zheng Yongjun Date: Sun Nov 10 18:49:55 2019 +0800 rtl8xxxu: Remove set but not used variable 'rsr' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function rtl8xxxu_gen2_config_channel: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:1266:13: warning: variable rsr set but not used [-Wunused-but-set-variable] rsr is never used, so remove it. Reported-by: Hulk Robot Signed-off-by: Zheng Yongjun Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit 92fe0f81b64b1983f21e096a5b5b2bcb60294ca7 Author: Eduardo Abinader Date: Thu Nov 7 17:07:46 2019 +0100 brcmsmac: remove unnecessary return Signed-off-by: Eduardo Abinader Signed-off-by: Kalle Valo commit 61005d65b6c7dcf61c19516e6ebe5acc02d2cdda Author: Hans de Goede Date: Thu Nov 14 15:30:46 2019 +0100 HID: logitech-hidpp: Silence intermittent get_battery_capacity errors My Logitech M185 (PID:4038) 2.4 GHz wireless HID++ mouse is causing intermittent errors like these in the log: [11091.034857] logitech-hidpp-device 0003:046D:4038.0006: hidpp20_batterylevel_get_battery_capacity: received protocol error 0x09 [12388.031260] logitech-hidpp-device 0003:046D:4038.0006: hidpp20_batterylevel_get_battery_capacity: received protocol error 0x09 [16613.718543] logitech-hidpp-device 0003:046D:4038.0006: hidpp20_batterylevel_get_battery_capacity: received protocol error 0x09 [23529.938728] logitech-hidpp-device 0003:046D:4038.0006: hidpp20_batterylevel_get_battery_capacity: received protocol error 0x09 We are already silencing error-code 0x09 (HIDPP_ERROR_RESOURCE_ERROR) errors in other places, lets do the same in hidpp20_batterylevel_get_battery_capacity to remove these harmless, but scary looking errors from the dmesg output. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 4f6585815084dc42089449ff32849b8069ea2604 Author: You-Sheng Yang Date: Fri Nov 15 13:36:46 2019 +0800 HID: i2c-hid: remove orphaned member sleep_delay This was introduced in commit 00b790ea545b ("HID: i2c-hid: Add a small delay after sleep command for Raydium touchpanel") which has been effectively reverted by commit 67b18dfb8cfc ("HID: i2c-hid: Remove runtime power management"). Signed-off-by: You-Sheng Yang Signed-off-by: Jiri Kosina commit 04358e40ba96d687c0811c21d9dede73f5244a98 Author: Chuhong Yuan Date: Fri Nov 15 16:31:22 2019 +0800 spi: tegra20-slink: add missed clk_unprepare The driver misses calling clk_unprepare in probe failure and remove. Add the calls to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191115083122.12278-1-hslester96@gmail.com Signed-off-by: Mark Brown commit 912a7df474d2cb22fc99a1fcf77997f2cea7d85e Author: Peter Ujfalusi Date: Wed Nov 13 11:42:56 2019 +0200 spi: tegra20-slink: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Acked-by: Jon Hunter Link: https://lore.kernel.org/r/20191113094256.1108-10-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 4c973b98cdd3b413216fdb9655a420737c46a4cb Author: Peter Ujfalusi Date: Wed Nov 13 11:42:55 2019 +0200 spi: tegra114: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Acked-by: Jon Hunter Link: https://lore.kernel.org/r/20191113094256.1108-9-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit df1b0141788527c032a9851c0589a1712d7e46b8 Author: Peter Ujfalusi Date: Wed Nov 13 11:42:54 2019 +0200 spi: s3c64xx: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Acked-by: Krzysztof Kozlowski Acked-by: Andi Shyti Link: https://lore.kernel.org/r/20191113094256.1108-8-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 194e1d4bc262c2d23ba9a8a5c03855c372ea1b5c Author: Peter Ujfalusi Date: Wed Nov 13 11:42:53 2019 +0200 spi: qup: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113094256.1108-7-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit c1008957ff1aee0ac92c28c55947173fb68cd451 Author: Peter Ujfalusi Date: Wed Nov 13 11:42:52 2019 +0200 spi: pl022: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191113094256.1108-6-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 5d3aa9ccf40cdc9b94d1a708d11de9062e2d9eed Author: Peter Ujfalusi Date: Wed Nov 13 11:42:51 2019 +0200 spi: imx: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113094256.1108-5-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 2e33f310dcfbceb7492d7e88baa9ca4f056f7c40 Author: Peter Ujfalusi Date: Wed Nov 13 11:42:50 2019 +0200 spi: fsl-lpspi: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113094256.1108-4-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit bef1e0c8f74c87e7427cb98b2e76caf046c7b65a Author: Peter Ujfalusi Date: Wed Nov 13 11:42:49 2019 +0200 spi: atmel: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20191113094256.1108-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit cef76e5ace759848e78323a14df0dcd66b8de13d Author: Peter Ujfalusi Date: Wed Nov 13 11:42:48 2019 +0200 spi: at91-usart: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20191113094256.1108-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit c5923243eb3208ea63b5ed7905610039c4ca5201 Author: Linus Walleij Date: Wed Nov 13 02:44:42 2019 +0100 spi: fsl-cpm: Correct the free:ing The fsl_spi_cpm_free() function does not make the same checks as the error path in fsl_spi_cpm_init() leading to crashes on error. Cc: Fabio Estevam Reported-by: Christophe Leroy Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191113014442.12100-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit a4bb429811bd4a5be94873ae218062c83c476ed9 Author: Christoph Fritz Date: Wed Nov 13 14:40:15 2019 +0100 dt-bindings: mfd: da9062: describe buck modes This patch adds DT description of da9062 buck regulator modes. Signed-off-by: Christoph Fritz Link: https://lore.kernel.org/r/1573652416-9848-4-git-send-email-chf.fritz@googlemail.com Signed-off-by: Mark Brown commit 844e7492ee3da1a8714bf3cc1dd54d777a5257c2 Author: Christoph Fritz Date: Wed Nov 13 14:40:14 2019 +0100 regulator: da9062: add of_map_mode support for bucks This patch adds of_map_mode support for bucks to set regulator modes from within regulator framework. Signed-off-by: Christoph Fritz Signed-off-by: Christian Hemp Signed-off-by: Stefan Riedmueller Link: https://lore.kernel.org/r/1573652416-9848-3-git-send-email-chf.fritz@googlemail.com Signed-off-by: Mark Brown commit 7d34aec52d292197d6b13395b023c718cac4630f Author: Christoph Fritz Date: Wed Nov 13 14:40:13 2019 +0100 regulator: da9062: refactor buck modes into header This patch refactors buck modes into a header file so that device trees can make use of these mode constants. The new header filename uses da9063 because DA9063 was the earlier chip and its driver code will want updating at some point in a similar manner. Signed-off-by: Christoph Fritz Link: https://lore.kernel.org/r/1573652416-9848-2-git-send-email-chf.fritz@googlemail.com Signed-off-by: Mark Brown commit 9ebde17c5d0387a5e1f71e687ac35d36e01208cc Author: Pascal Paillet Date: Wed Nov 13 17:15:29 2019 +0100 regulator: stpmic1: Set a default ramp delay value Set a default ramp delay value to the regulators with the worst case value. Signed-off-by: pascal paillet Link: https://lore.kernel.org/r/20191113161529.27739-1-p.paillet@st.com Signed-off-by: Mark Brown commit 089b3f61ecfc43ca4ea26d595e1d31ead6de3f7b Author: Pascal Paillet Date: Wed Nov 13 11:27:37 2019 +0100 regulator: core: Let boot-on regulators be powered off Boot-on regulators are always kept on because their use_count value is now incremented at boot time and never cleaned. Only increment count value for alway-on regulators. regulator_late_cleanup() is now able to power off boot-on regulators when unused. Fixes: 05f224ca6693 ("regulator: core: Clean enabling always-on regulators + their supplies") Signed-off-by: Pascal Paillet Link: https://lore.kernel.org/r/20191113102737.27831-1-p.paillet@st.com Signed-off-by: Mark Brown commit b59b654478093fa429ad4c7897ae29f201146a00 Author: Saravana Kannan Date: Thu Nov 14 16:04:38 2019 -0800 regulator: core: Don't try to remove device links if add failed device_link_add() might not always succeed depending on the type of device link and the rest of the dependencies in the system. If device_link_add() didn't succeed, then we shouldn't try to remove the link later on as it might remove a link someone else created. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20191115000438.45970-1-saravanak@google.com Signed-off-by: Mark Brown commit f0c97131b946fe77e22eddbd7e7d92fb6459f497 Author: Peter Ujfalusi Date: Wed Nov 13 11:54:45 2019 +0200 ASoC: ti: davinci-mcasp: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113095445.3211-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit de8cf95231102f0b1d71499b89c93902c9bb7908 Author: Peter Ujfalusi Date: Wed Nov 13 11:54:44 2019 +0200 ASoC: dmaengine: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113095445.3211-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit ce21401c9d30e81824e864dc25824ebeb9690801 Author: Kuninori Morimoto Date: Wed Nov 13 10:16:48 2019 +0900 ASoC: soc-core: care card_probed at soc_cleanup_card_resources() soc_cleanup_card_resources() will call card->remove(), but it should be called if card->probe() or card->late_probe() are called. snd_soc_bind_card() might be error before calling card->probe() / card->late_probe(). In that time, card->remove() will be called. This patch adds card_probed parameter to judge it. Fixes: bfce78a559655 ("ASoC: soc-core: tidyup soc_init_dai_link()") Signed-off-by: Kuninori Morimoto Tested-by: Jon Hunter Link: https://lore.kernel.org/r/87o8xg4ltr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2cc1afcfc617b33b72e409360ba5dd7c3fc2492d Author: Kuninori Morimoto Date: Wed Nov 13 10:16:34 2019 +0900 ASoC: soc-core: move snd_soc_unbind_card() next to snd_soc_bind_card() To makes code readable, this patch moves snd_soc_unbind_card() next to snd_soc_bind_card(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pnhw4lu5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2a6f0892bda954dc2688b002060093ee0fe38528 Author: Kuninori Morimoto Date: Wed Nov 13 10:16:29 2019 +0900 ASoC: soc-core: call snd_soc_dapm_shutdown() at soc_cleanup_card_resources() It is easy to read code if it is cleanly using paired function/naming, like start <-> stop, register <-> unregister, etc, etc. But, current ALSA SoC code is very random, unbalance, not paired, etc. It is easy to create bug at the such code, and it will be difficult to debug. snd_soc_bind_card() is calling snd_soc_dapm_init() for both card and component. Let's call paired snd_soc_dapm_shutdown() at paired soc_cleanup_card_resources(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r22c4lub.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b26eb5173c85082eec7d6e18369f6f9d96bf0b21 Author: Colin Ian King Date: Tue Nov 12 19:02:18 2019 +0000 ASoC: tas2770: clean up an indentation issue There is a block that is indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191112190218.282337-1-colin.king@canonical.com Signed-off-by: Mark Brown commit fe23be2d85b05f561431d75acddec726ea807d2a Author: Jacob Rasmussen Date: Thu Nov 14 16:20:11 2019 -0700 ASoC: rt5645: Fixed typo for buddy jack support. Had a typo in e7cfd867fd98 that resulted in buddy jack support not being fixed. Fixes: e7cfd867fd98 ("ASoC: rt5645: Fixed buddy jack support.") Signed-off-by: Jacob Rasmussen Reviewed-by: Ross Zwisler Cc: CC: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191114232011.165762-1-jacobraz@google.com Signed-off-by: Mark Brown commit e9149b8c00d25dbaef1aa174fc604bed207e576d Author: Michael Walle Date: Tue Nov 12 23:36:29 2019 +0100 ASoC: wm8904: fix regcache handling The current code assumes that the power is turned off in SND_SOC_BIAS_OFF. If there are no actual regulator the codec isn't turned off and the registers are not reset to their default values but the regcache is still marked as dirty. Thus a value might not be written to the hardware if it is set to the default value. Do a software reset before turning off the power to make sure the registers are always reset to their default states. Signed-off-by: Michael Walle Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20191112223629.21867-1-michael@walle.cc Signed-off-by: Mark Brown commit 66584ea6b70a6cbae661292702e56a07580dbbd4 Author: Masahiro Yamada Date: Fri Nov 15 00:49:22 2019 +0900 x86/build/vdso: Remove meaningless CFLAGS_REMOVE_*.o CFLAGS_REMOVE_*.o syntax is used to drop particular flags when building objects from C files. It has no effect for assembly files. vdso-note.o is compiled from the assembly file, vdso-note.S, hence CFLAGS_REMOVE_vdso-note.o is meaningless. Neither vvar.c nor vvar.S is found in the vdso directory. Since there is no source file to create vvar.o, CFLAGS_REMOVE_vvar.o is also meaningless. Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191114154922.30365-1-yamada.masahiro@socionext.com commit e75603418d4a6a145fec8022653e8dd5a86c2269 Author: Nobuhiro Iwamatsu Date: Fri Nov 8 09:24:49 2019 +0900 rtc: pcf8563: Constify clkout_rates The lates of clockout should be marked const. Make that so. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191108002449.15097-1-iwamatsu@nigauri.org Signed-off-by: Alexandre Belloni commit 265fc0910aae15e96099d724e2ccf5ced18c4b80 Author: Nobuhiro Iwamatsu Date: Fri Nov 8 09:23:54 2019 +0900 rtc: ds1302: Remove unused DRV_NAME DRV_NAME is unused, remove it. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191108002354.15016-1-iwamatsu@nigauri.org Signed-off-by: Alexandre Belloni commit 6d2130e68216bd09f8a813bfd010efccd08d3feb Author: Nobuhiro Iwamatsu Date: Fri Nov 8 09:22:50 2019 +0900 rtc: rx6110: Convert to SPDX identifier Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191108002250.14937-1-iwamatsu@nigauri.org Signed-off-by: Alexandre Belloni commit 5ea0a619f5efa5e95a48deaecdc20f300088891e Author: Nobuhiro Iwamatsu Date: Fri Nov 8 09:21:13 2019 +0900 rtc: rx6110: Remove useless rx6110_remove rx6110_remove is empty, remove it. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191108002113.14791-1-iwamatsu@nigauri.org Signed-off-by: Alexandre Belloni commit 7ee30bc132c683d06a6d9e360e39e483e3990708 Author: Nitesh Narayan Lal Date: Thu Nov 7 07:53:43 2019 -0500 KVM: x86: deliver KVM IOAPIC scan request to target vCPUs In IOAPIC fixed delivery mode instead of flushing the scan requests to all vCPUs, we should only send the requests to vCPUs specified within the destination field. This patch introduces kvm_get_dest_vcpus_mask() API which retrieves an array of target vCPUs by using kvm_apic_map_get_dest_lapic() and then based on the vcpus_idx, it sets the bit in a bitmap. However, if the above fails kvm_get_dest_vcpus_mask() finds the target vCPUs by traversing all available vCPUs. Followed by setting the bits in the bitmap. If we had different vCPUs in the previous request for the same redirection table entry then bits corresponding to these vCPUs are also set. This to done to keep ioapic_handled_vectors synchronized. This bitmap is then eventually passed on to kvm_make_vcpus_request_mask() to generate a masked request only for the target vCPUs. This would enable us to reduce the latency overhead on isolated vCPUs caused by the IPI to process due to KVM_REQ_IOAPIC_SCAN. Suggested-by: Marcelo Tosatti Signed-off-by: Nitesh Narayan Lal Signed-off-by: Paolo Bonzini commit 8750e72a79dda2f665ce17b62049f4d62130d991 Author: Radim Krčmář Date: Thu Nov 7 07:53:42 2019 -0500 KVM: remember position in kvm->vcpus array Fetching an index for any vcpu in kvm->vcpus array by traversing the entire array everytime is costly. This patch remembers the position of each vcpu in kvm->vcpus array by storing it in vcpus_idx under kvm_vcpu structure. Signed-off-by: Radim Krčmář Signed-off-by: Nitesh Narayan Lal Signed-off-by: Paolo Bonzini commit 662f1d1d19317e792ccfc53dee625c02dcefac58 Author: Aaron Lewis Date: Thu Nov 7 21:14:39 2019 -0800 KVM: nVMX: Add support for capturing highest observable L2 TSC The L1 hypervisor may include the IA32_TIME_STAMP_COUNTER MSR in the vmcs12 MSR VM-exit MSR-store area as a way of determining the highest TSC value that might have been observed by L2 prior to VM-exit. The current implementation does not capture a very tight bound on this value. To tighten the bound, add the IA32_TIME_STAMP_COUNTER MSR to the vmcs02 VM-exit MSR-store area whenever it appears in the vmcs12 VM-exit MSR-store area. When L0 processes the vmcs12 VM-exit MSR-store area during the emulation of an L2->L1 VM-exit, special-case the IA32_TIME_STAMP_COUNTER MSR, using the value stored in the vmcs02 VM-exit MSR-store area to derive the value to be stored in the vmcs12 VM-exit MSR-store area. Reviewed-by: Liran Alon Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Signed-off-by: Paolo Bonzini commit ef0fbcac3f2aadb10d9a6c461eabc7dd01cbed9b Author: Aaron Lewis Date: Thu Nov 7 21:14:38 2019 -0800 kvm: vmx: Rename function find_msr() to vmx_find_msr_index() Rename function find_msr() to vmx_find_msr_index() in preparation for an upcoming patch where we export it and use it in nested.c. Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Signed-off-by: Paolo Bonzini commit 7cfe0526fd379e4ff9c3dcf933c1966a3a635013 Author: Aaron Lewis Date: Thu Nov 7 21:14:37 2019 -0800 kvm: vmx: Rename NR_AUTOLOAD_MSRS to NR_LOADSTORE_MSRS Rename NR_AUTOLOAD_MSRS to NR_LOADSTORE_MSRS. This needs to be done due to the addition of the MSR-autostore area that will be added in a future patch. After that the name AUTOLOAD will no longer make sense. Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Signed-off-by: Paolo Bonzini commit 365d3d55d6019233c02d68dbd3d2dfde1b8a1467 Author: Aaron Lewis Date: Thu Nov 7 21:14:36 2019 -0800 kvm: nested: Introduce read_and_check_msr_entry() Add the function read_and_check_msr_entry() which just pulls some code out of nested_vmx_store_msr(). This will be useful as reusable code in upcoming patches. Reviewed-by: Liran Alon Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Signed-off-by: Paolo Bonzini commit d4069dbeb51e34e1db0458a7455e509daaaa529a Author: Paolo Bonzini Date: Fri Nov 15 11:36:10 2019 +0100 KVM: nVMX: mark functions in the header as "static inline" Correct a small inaccuracy in the shattering of vmx.c, which becomes visible now that pmu_intel.c includes nested.h. Signed-off-by: Paolo Bonzini commit 03a8871add95213827e2bea84c12133ae5df952e Author: Oliver Upton Date: Wed Nov 13 16:17:20 2019 -0800 KVM: nVMX: Expose load IA32_PERF_GLOBAL_CTRL VM-{Entry,Exit} control The "load IA32_PERF_GLOBAL_CTRL" bit for VM-entry and VM-exit should only be exposed to the guest if IA32_PERF_GLOBAL_CTRL is a valid MSR. Create a new helper to allow pmu_refresh() to update the VM-Entry and VM-Exit controls to ensure PMU values are initialized when performing the is_valid_msr() check. Suggested-by: Jim Mattson Co-developed-by: Krish Sadhukhan Signed-off-by: Krish Sadhukhan Signed-off-by: Oliver Upton Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit 71f7347025bf10f5c0b48e149898df57b7f3d414 Author: Oliver Upton Date: Wed Nov 13 16:17:19 2019 -0800 KVM: nVMX: Load GUEST_IA32_PERF_GLOBAL_CTRL MSR on VM-Entry Add condition to prepare_vmcs02 which loads IA32_PERF_GLOBAL_CTRL on VM-entry if the "load IA32_PERF_GLOBAL_CTRL" bit on the VM-entry control is set. Use SET_MSR_OR_WARN() rather than directly writing to the field to avoid overwrite by atomic_switch_perf_msrs(). Suggested-by: Jim Mattson Co-developed-by: Krish Sadhukhan Signed-off-by: Krish Sadhukhan Signed-off-by: Oliver Upton Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit 458151f65b4d8acfc7403b59fd9694ca15dbfe2e Author: Oliver Upton Date: Wed Nov 13 16:17:18 2019 -0800 KVM: nVMX: Use kvm_set_msr to load IA32_PERF_GLOBAL_CTRL on VM-Exit The existing implementation for loading the IA32_PERF_GLOBAL_CTRL MSR on VM-exit was incorrect, as the next call to atomic_switch_perf_msrs() could cause this value to be overwritten. Instead, call kvm_set_msr() which will allow atomic_switch_perf_msrs() to correctly set the values. Define a macro, SET_MSR_OR_WARN(), to set the MSR with kvm_set_msr() and WARN on failure. Suggested-by: Jim Mattson Co-developed-by: Krish Sadhukhan Signed-off-by: Krish Sadhukhan Signed-off-by: Oliver Upton Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit c547cb6f78cf5dc8f029459b115ef44c56a2a776 Author: Oliver Upton Date: Wed Nov 13 16:17:17 2019 -0800 KVM: nVMX: Check HOST_IA32_PERF_GLOBAL_CTRL on VM-Entry Add a consistency check on nested vm-entry for host's IA32_PERF_GLOBAL_CTRL from vmcs12. Per Intel's SDM Vol 3 26.2.2: If the "load IA32_PERF_GLOBAL_CTRL" VM-exit control is 1, bits reserved in the IA32_PERF_GLOBAL_CTRL MSR must be 0 in the field for that register" Suggested-by: Jim Mattson Co-developed-by: Krish Sadhukhan Signed-off-by: Krish Sadhukhan Signed-off-by: Oliver Upton Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit bfc6ad6ab3563b4151bbcfe162c612930a3e0854 Author: Oliver Upton Date: Wed Nov 13 16:17:16 2019 -0800 KVM: nVMX: Check GUEST_IA32_PERF_GLOBAL_CTRL on VM-Entry Add condition to nested_vmx_check_guest_state() to check the validity of GUEST_IA32_PERF_GLOBAL_CTRL. Per Intel's SDM Vol 3 26.3.1.1: If the "load IA32_PERF_GLOBAL_CTRL" VM-entry control is 1, bits reserved in the IA32_PERF_GLOBAL_CTRL MSR must be 0 in the field for that register. Suggested-by: Jim Mattson Co-developed-by: Krish Sadhukhan Signed-off-by: Krish Sadhukhan Signed-off-by: Oliver Upton Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit 9477f4449b0b011ce1d058c09ec450bfcdaab784 Author: Oliver Upton Date: Wed Nov 13 16:17:15 2019 -0800 KVM: VMX: Add helper to check reserved bits in IA32_PERF_GLOBAL_CTRL Create a helper function to check the validity of a proposed value for IA32_PERF_GLOBAL_CTRL from the existing check in intel_pmu_set_msr(). Per Intel's SDM, the reserved bits in IA32_PERF_GLOBAL_CTRL must be cleared for the corresponding host/guest state fields. Suggested-by: Jim Mattson Co-developed-by: Krish Sadhukhan Signed-off-by: Krish Sadhukhan Signed-off-by: Oliver Upton Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit f245eeaddc3e442b761de8e9d1b93893a999f9aa Author: Wainer dos Santos Moschetta Date: Tue Nov 12 09:21:11 2019 -0500 selftests: kvm: Simplify loop in kvm_create_max_vcpus test On kvm_create_max_vcpus test remove unneeded local variable in the loop that add vcpus to the VM. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Krish Sadhukhan Signed-off-by: Paolo Bonzini commit 1924242b2abadfb1144c3c22083fd6f71caadd64 Author: Liran Alon Date: Tue Nov 12 20:33:00 2019 +0200 KVM: x86: Optimization: Requst TLB flush in fast_cr3_switch() instead of do it directly When KVM emulates a nested VMEntry (L1->L2 VMEntry), it switches mmu root page. If nEPT is used, this will happen from kvm_init_shadow_ept_mmu()->__kvm_mmu_new_cr3() and otherwise it will happpen from nested_vmx_load_cr3()->kvm_mmu_new_cr3(). Either case, __kvm_mmu_new_cr3() will use fast_cr3_switch() in attempt to switch to a previously cached root page. In case fast_cr3_switch() finds a matching cached root page, it will set it in mmu->root_hpa and request KVM_REQ_LOAD_CR3 such that on next entry to guest, KVM will set root HPA in appropriate hardware fields (e.g. vmcs->eptp). In addition, fast_cr3_switch() calls kvm_x86_ops->tlb_flush() in order to flush TLB as MMU root page was replaced. This works as mmu->root_hpa, which vmx_flush_tlb() use, was already replaced in cached_root_available(). However, this may result in unnecessary INVEPT execution because a KVM_REQ_TLB_FLUSH may have already been requested. For example, by prepare_vmcs02() in case L1 don't use VPID. Therefore, change fast_cr3_switch() to just request TLB flush on next entry to guest. Reviewed-by: Bhavesh Davda Signed-off-by: Liran Alon Reviewed-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit b35e5548b41131eb06de041af2f5fb0890d96f96 Author: Like Xu Date: Sun Oct 27 18:52:43 2019 +0800 KVM: x86/vPMU: Add lazy mechanism to release perf_event per vPMC Currently, a host perf_event is created for a vPMC functionality emulation. It’s unpredictable to determine if a disabled perf_event will be reused. If they are disabled and are not reused for a considerable period of time, those obsolete perf_events would increase host context switch overhead that could have been avoided. If the guest doesn't WRMSR any of the vPMC's MSRs during an entire vcpu sched time slice, and its independent enable bit of the vPMC isn't set, we can predict that the guest has finished the use of this vPMC, and then do request KVM_REQ_PMU in kvm_arch_sched_in and release those perf_events in the first call of kvm_pmu_handle_event() after the vcpu is scheduled in. This lazy mechanism delays the event release time to the beginning of the next scheduled time slice if vPMC's MSRs aren't changed during this time slice. If guest comes back to use this vPMC in next time slice, a new perf event would be re-created via perf_event_create_kernel_counter() as usual. Suggested-by: Wei Wang Suggested-by: Paolo Bonzini Signed-off-by: Like Xu Signed-off-by: Paolo Bonzini commit a6da0d77e98e94fa66187a5ce3cf7e11fbf95503 Author: Like Xu Date: Sun Oct 27 18:52:42 2019 +0800 KVM: x86/vPMU: Reuse perf_event to avoid unnecessary pmc_reprogram_counter The perf_event_create_kernel_counter() in the pmc_reprogram_counter() is a heavyweight and high-frequency operation, especially when host disables the watchdog (maximum 21000000 ns) which leads to an unacceptable latency of the guest NMI handler. It limits the use of vPMUs in the guest. When a vPMC is fully enabled, the legacy reprogram_*_counter() would stop and release its existing perf_event (if any) every time EVEN in most cases almost the same requested perf_event will be created and configured again. For each vPMC, if the reuqested config ('u64 eventsel' for gp and 'u8 ctrl' for fixed) is the same as its current config AND a new sample period based on pmc->counter is accepted by host perf interface, the current event could be reused safely as a new created one does. Otherwise, do release the undesirable perf_event and reprogram a new one as usual. It's light-weight to call pmc_pause_counter (disable, read and reset event) and pmc_resume_counter (recalibrate period and re-enable event) as guest expects instead of release-and-create again on any condition. Compared to use the filterable event->attr or hw.config, a new 'u64 current_config' field is added to save the last original programed config for each vPMC. Based on this implementation, the number of calls to pmc_reprogram_counter is reduced by ~82.5% for a gp sampling event and ~99.9% for a fixed event. In the usage of multiplexing perf sampling mode, the average latency of the guest NMI handler is reduced from 104923 ns to 48393 ns (~2.16x speed up). If host disables watchdog, the minimum latecy of guest NMI handler could be speed up at ~3413x (from 20407603 to 5979 ns) and at ~786x in the average. Suggested-by: Kan Liang Signed-off-by: Like Xu Signed-off-by: Paolo Bonzini commit c900c156c518302058a48d2efe3ca44e465cad22 Author: Like Xu Date: Sun Oct 27 18:52:41 2019 +0800 KVM: x86/vPMU: Introduce a new kvm_pmu_ops->msr_idx_to_pmc callback Introduce a new callback msr_idx_to_pmc that returns a struct kvm_pmc*, and change kvm_pmu_is_valid_msr to return ".msr_idx_to_pmc(vcpu, msr) || .is_valid_msr(vcpu, msr)" and AMD just returns false from .is_valid_msr. Suggested-by: Paolo Bonzini Reported-by: kbuild test robot Signed-off-by: Like Xu Signed-off-by: Paolo Bonzini commit 98ff80f5b788c1818464022cc61924ef5630d99d Author: Like Xu Date: Sun Oct 27 18:52:40 2019 +0800 KVM: x86/vPMU: Rename pmu_ops callbacks from msr_idx to rdpmc_ecx The leagcy pmu_ops->msr_idx_to_pmc is only called in kvm_pmu_rdpmc, so this function actually receives the contents of ECX before RDPMC, and translates it to a kvm_pmc. Let's clarify its semantic by renaming the existing msr_idx_to_pmc to rdpmc_ecx_to_pmc, and is_valid_msr_idx to is_valid_rdpmc_ecx; likewise for the wrapper kvm_pmu_is_valid_msr_idx. Suggested-by: Paolo Bonzini Reviewed-by: Jim Mattson Signed-off-by: Like Xu Signed-off-by: Paolo Bonzini commit 52ba4b0b99770e892f43da1238f437155acb8b58 Author: Like Xu Date: Sun Oct 27 18:52:39 2019 +0800 perf/core: Provide a kernel-internal interface to pause perf_event Exporting perf_event_pause() as an external accessor for kernel users (such as KVM) who may do both disable perf_event and read count with just one time to hold perf_event_ctx_lock. Also the value could be reset optionally. Suggested-by: Peter Zijlstra Signed-off-by: Like Xu Acked-by: Peter Zijlstra Signed-off-by: Paolo Bonzini commit 3ca270fc9edb258d5bfa271bcf851614e9e6e7d4 Author: Like Xu Date: Sun Oct 27 18:52:38 2019 +0800 perf/core: Provide a kernel-internal interface to recalibrate event period Currently, perf_event_period() is used by user tools via ioctl. Based on naming convention, exporting perf_event_period() for kernel users (such as KVM) who may recalibrate the event period for their assigned counter according to their requirements. The perf_event_period() is an external accessor, just like the perf_event_{en,dis}able() and should thus use perf_event_ctx_lock(). Suggested-by: Kan Liang Signed-off-by: Like Xu Acked-by: Peter Zijlstra Signed-off-by: Paolo Bonzini commit 02d496cfb88a4856b9d67ade32317077c510aebc Author: Liran Alon Date: Mon Nov 11 14:30:55 2019 +0200 KVM: nVMX: Update vmcs01 TPR_THRESHOLD if L2 changed L1 TPR When L1 don't use TPR-Shadow to run L2, L0 configures vmcs02 without TPR-Shadow and install intercepts on CR8 access (load and store). If L1 do not intercept L2 CR8 access, L0 intercepts on those accesses will emulate load/store on L1's LAPIC TPR. If in this case L2 lowers TPR such that there is now an injectable interrupt to L1, apic_update_ppr() will request a KVM_REQ_EVENT which will trigger a call to update_cr8_intercept() to update TPR-Threshold to highest pending IRR priority. However, this update to TPR-Threshold is done while active vmcs is vmcs02 instead of vmcs01. Thus, when later at some point L0 will emulate an exit from L2 to L1, L1 will still run with high TPR-Threshold. This will result in every VMEntry to L1 to immediately exit on TPR_BELOW_THRESHOLD and continue to do so infinitely until some condition will cause KVM_REQ_EVENT to be set. (Note that TPR_BELOW_THRESHOLD exit handler do not set KVM_REQ_EVENT until apic_update_ppr() will notice a new injectable interrupt for PPR) To fix this issue, change update_cr8_intercept() such that if L2 lowers L1's TPR in a way that requires to lower L1's TPR-Threshold, save update to TPR-Threshold and apply it to vmcs01 when L0 emulates an exit from L2 to L1. Reviewed-by: Joao Martins Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 132f4f7e39fd270c5e3c9c577939081cfd499b16 Author: Liran Alon Date: Mon Nov 11 14:30:54 2019 +0200 KVM: VMX: Refactor update_cr8_intercept() No functional changes. Reviewed-by: Joao Martins Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 49d654d85f857d9ca34fe2b4ac6d6cf34677e6c1 Author: Liran Alon Date: Mon Nov 11 14:26:21 2019 +0200 KVM: SVM: Remove check if APICv enabled in SVM update_cr8_intercept() handler This check is unnecessary as x86 update_cr8_intercept() which calls this VMX/SVM specific callback already performs this check. Reviewed-by: Joao Martins Signed-off-by: Liran Alon Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 1a686237d94b8a4bab9ce16ffd3e2208370d7695 Author: Miaohe Lin Date: Sat Nov 9 17:46:49 2019 +0800 KVM: APIC: add helper func to remove duplicate code in kvm_pv_send_ipi There are some duplicate code in kvm_pv_send_ipi when deal with ipi bitmap. Add helper func to remove it, and eliminate odd out label, get rid of unnecessary kvm_lapic_irq field init and so on. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 5b4ce93a8fe759e2d6b2ee05765cd5a3b4b6a2f1 Author: Miaohe Lin Date: Sat Nov 9 16:58:54 2019 +0800 KVM: X86: avoid unused setup_syscalls_segments call when SYSCALL check failed When SYSCALL/SYSENTER ability check failed, cs and ss is inited but remain not used. Delay initializing cs and ss until SYSCALL/SYSENTER ability check passed. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit b139b5a24774ee28e3e4d22942e2bede28d48202 Author: Miaohe Lin Date: Sat Nov 9 16:08:20 2019 +0800 KVM: MMIO: get rid of odd out_err label in kvm_coalesced_mmio_init The out_err label and var ret is unnecessary, clean them up. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit e64a8508234afb17a15d1aa98e8c1434fc207755 Author: Liran Alon Date: Mon Nov 11 14:16:05 2019 +0200 KVM: VMX: Consume pending LAPIC INIT event when exit on INIT_SIGNAL Intel SDM section 25.2 OTHER CAUSES OF VM EXITS specifies the following on INIT signals: "Such exits do not modify register state or clear pending events as they would outside of VMX operation." When commit 4b9852f4f389 ("KVM: x86: Fix INIT signal handling in various CPU states") was applied, I interepted above Intel SDM statement such that INIT_SIGNAL exit don’t consume the LAPIC INIT pending event. However, when Nadav Amit run matching kvm-unit-test on a bare-metal machine, it turned out my interpetation was wrong. i.e. INIT_SIGNAL exit does consume the LAPIC INIT pending event. (See: https://www.spinics.net/lists/kvm/msg196757.html) Therefore, fix KVM code to behave as observed on bare-metal. Fixes: 4b9852f4f389 ("KVM: x86: Fix INIT signal handling in various CPU states") Reported-by: Nadav Amit Reviewed-by: Mihai Carabas Reviewed-by: Joao Martins Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 27cbe7d61898a1d1d39be32e5acff7d4be6e9d87 Author: Liran Alon Date: Mon Nov 11 11:16:40 2019 +0200 KVM: x86: Prevent set vCPU into INIT/SIPI_RECEIVED state when INIT are latched Commit 4b9852f4f389 ("KVM: x86: Fix INIT signal handling in various CPU states") fixed KVM to also latch pending LAPIC INIT event when vCPU is in VMX operation. However, current API of KVM_SET_MP_STATE allows userspace to put vCPU into KVM_MP_STATE_SIPI_RECEIVED or KVM_MP_STATE_INIT_RECEIVED even when vCPU is in VMX operation. Fix this by introducing a util method to check if vCPU state latch INIT signals and use it in KVM_SET_MP_STATE handler. Fixes: 4b9852f4f389 ("KVM: x86: Fix INIT signal handling in various CPU states") Reported-by: Sean Christopherson Reviewed-by: Mihai Carabas Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit ff90afa75573502f3ac05acd5a282d6e3d4cef34 Author: Liran Alon Date: Mon Nov 11 11:16:39 2019 +0200 KVM: x86: Evaluate latched_init in KVM_SET_VCPU_EVENTS when vCPU not in SMM Commit 4b9852f4f389 ("KVM: x86: Fix INIT signal handling in various CPU states") fixed KVM to also latch pending LAPIC INIT event when vCPU is in VMX operation. However, current API of KVM_SET_VCPU_EVENTS defines this field as part of SMM state and only set pending LAPIC INIT event if vCPU is specified to be in SMM mode (events->smi.smm is set). Change KVM_SET_VCPU_EVENTS handler to set pending LAPIC INIT event by latched_init field regardless of if vCPU is in SMM mode or not. Fixes: 4b9852f4f389 ("KVM: x86: Fix INIT signal handling in various CPU states") Reviewed-by: Mihai Carabas Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini commit 74c504a6d70ab29b2c28bee62f5f39e3dd847ea2 Author: Andrea Arcangeli Date: Mon Nov 4 18:00:01 2019 -0500 x86: retpolines: eliminate retpoline from msr event handlers It's enough to check the value and issue the direct call. After this commit is applied, here the most common retpolines executed under a high resolution timer workload in the guest on a VMX host: [..] @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 267 @[]: 2256 @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 __kvm_wait_lapic_expire+284 vmx_vcpu_run.part.97+1091 vcpu_enter_guest+377 kvm_arch_vcpu_ioctl_run+261 kvm_vcpu_ioctl+559 do_vfs_ioctl+164 ksys_ioctl+96 __x64_sys_ioctl+22 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 2390 @[]: 33410 @total: 315707 Note the highest hit above is __delay so probably not worth optimizing even if it would be more frequent than 2k hits per sec. Signed-off-by: Andrea Arcangeli Signed-off-by: Paolo Bonzini commit 3dcb2a3fa5a0c903fd754bfba2b8defb9f191974 Author: Andrea Arcangeli Date: Mon Nov 4 18:00:00 2019 -0500 KVM: retpolines: x86: eliminate retpoline from svm.c exit handlers It's enough to check the exit value and issue a direct call to avoid the retpoline for all the common vmexit reasons. After this commit is applied, here the most common retpolines executed under a high resolution timer workload in the guest on a SVM host: [..] @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 ktime_get_update_offsets_now+70 hrtimer_interrupt+131 smp_apic_timer_interrupt+106 apic_timer_interrupt+15 start_sw_timer+359 restart_apic_timer+85 kvm_set_msr_common+1497 msr_interception+142 vcpu_enter_guest+684 kvm_arch_vcpu_ioctl_run+261 kvm_vcpu_ioctl+559 do_vfs_ioctl+164 ksys_ioctl+96 __x64_sys_ioctl+22 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 1940 @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_r12+33 force_qs_rnp+217 rcu_gp_kthread+1270 kthread+268 ret_from_fork+34 ]: 4644 @[]: 25095 @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 lapic_next_event+28 clockevents_program_event+148 hrtimer_start_range_ns+528 start_sw_timer+356 restart_apic_timer+85 kvm_set_msr_common+1497 msr_interception+142 vcpu_enter_guest+684 kvm_arch_vcpu_ioctl_run+261 kvm_vcpu_ioctl+559 do_vfs_ioctl+164 ksys_ioctl+96 __x64_sys_ioctl+22 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 41474 @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 clockevents_program_event+148 hrtimer_start_range_ns+528 start_sw_timer+356 restart_apic_timer+85 kvm_set_msr_common+1497 msr_interception+142 vcpu_enter_guest+684 kvm_arch_vcpu_ioctl_run+261 kvm_vcpu_ioctl+559 do_vfs_ioctl+164 ksys_ioctl+96 __x64_sys_ioctl+22 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 41474 @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 ktime_get+58 clockevents_program_event+84 hrtimer_start_range_ns+528 start_sw_timer+356 restart_apic_timer+85 kvm_set_msr_common+1497 msr_interception+142 vcpu_enter_guest+684 kvm_arch_vcpu_ioctl_run+261 kvm_vcpu_ioctl+559 do_vfs_ioctl+164 ksys_ioctl+96 __x64_sys_ioctl+22 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 41887 @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 lapic_next_event+28 clockevents_program_event+148 hrtimer_try_to_cancel+168 hrtimer_cancel+21 kvm_set_lapic_tscdeadline_msr+43 kvm_set_msr_common+1497 msr_interception+142 vcpu_enter_guest+684 kvm_arch_vcpu_ioctl_run+261 kvm_vcpu_ioctl+559 do_vfs_ioctl+164 ksys_ioctl+96 __x64_sys_ioctl+22 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 42723 @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 clockevents_program_event+148 hrtimer_try_to_cancel+168 hrtimer_cancel+21 kvm_set_lapic_tscdeadline_msr+43 kvm_set_msr_common+1497 msr_interception+142 vcpu_enter_guest+684 kvm_arch_vcpu_ioctl_run+261 kvm_vcpu_ioctl+559 do_vfs_ioctl+164 ksys_ioctl+96 __x64_sys_ioctl+22 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 42766 @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 ktime_get+58 clockevents_program_event+84 hrtimer_try_to_cancel+168 hrtimer_cancel+21 kvm_set_lapic_tscdeadline_msr+43 kvm_set_msr_common+1497 msr_interception+142 vcpu_enter_guest+684 kvm_arch_vcpu_ioctl_run+261 kvm_vcpu_ioctl+559 do_vfs_ioctl+164 ksys_ioctl+96 __x64_sys_ioctl+22 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 42848 @[ trace_retpoline+1 __trace_retpoline+30 __x86_indirect_thunk_rax+33 ktime_get+58 start_sw_timer+279 restart_apic_timer+85 kvm_set_msr_common+1497 msr_interception+142 vcpu_enter_guest+684 kvm_arch_vcpu_ioctl_run+261 kvm_vcpu_ioctl+559 do_vfs_ioctl+164 ksys_ioctl+96 __x64_sys_ioctl+22 do_syscall_64+89 entry_SYSCALL_64_after_hwframe+68 ]: 499845 @total: 1780243 SVM has no TSC based programmable preemption timer so it is invoking ktime_get() frequently. Signed-off-by: Andrea Arcangeli Signed-off-by: Paolo Bonzini commit 4289d2728664fc1fb49cfc76a6a7d96d913b921f Author: Andrea Arcangeli Date: Mon Nov 4 17:59:59 2019 -0500 KVM: retpolines: x86: eliminate retpoline from vmx.c exit handlers It's enough to check the exit value and issue a direct call to avoid the retpoline for all the common vmexit reasons. Of course CONFIG_RETPOLINE already forbids gcc to use indirect jumps while compiling all switch() statements, however switch() would still allow the compiler to bisect the case value. It's more efficient to prioritize the most frequent vmexits instead. The halt may be slow paths from the point of the guest, but not necessarily so from the point of the host if the host runs at full CPU capacity and no host CPU is ever left idle. Signed-off-by: Andrea Arcangeli Signed-off-by: Paolo Bonzini commit f399e60c45f6b6e6ad6dfcedff1dd6386e086b0b Author: Andrea Arcangeli Date: Mon Nov 4 17:59:58 2019 -0500 KVM: x86: optimize more exit handlers in vmx.c Eliminate wasteful call/ret non RETPOLINE case and unnecessary fentry dynamic tracing hooking points. Signed-off-by: Andrea Arcangeli Signed-off-by: Paolo Bonzini commit 03212e347f9443e524d6383c6806ac08295c1fb0 Author: Jens Wiklander Date: Wed Nov 6 16:48:28 2019 +0100 tee: optee: fix device enumeration error handling Prior to this patch in optee_probe() when optee_enumerate_devices() was called the struct optee was fully initialized. If optee_enumerate_devices() returns an error optee_probe() is supposed to clean up and free the struct optee completely, but will at this late stage need to call optee_remove() instead. This isn't done and thus freeing the struct optee prematurely. With this patch the call to optee_enumerate_devices() is done after optee_probe() has returned successfully and in case optee_enumerate_devices() fails everything is cleaned up with a call to optee_remove(). Fixes: c3fa24af9244 ("tee: optee: add TEE bus device enumeration support") Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit a249dd200d03791cab23e47571f3e13d9c72af6c Author: Sumit Garg Date: Fri Nov 8 16:57:14 2019 +0530 tee: optee: Fix dynamic shm pool allocations In case of dynamic shared memory pool, kernel memory allocated using dmabuf_mgr pool needs to be registered with OP-TEE prior to its usage during optee_open_session() or optee_invoke_func(). So fix dmabuf_mgr pool allocations via an additional call to optee_shm_register(). Also, allow kernel pages to be registered as shared memory with OP-TEE. Fixes: 9733b072a12a ("optee: allow to work without static shared memory") Signed-off-by: Sumit Garg Signed-off-by: Jens Wiklander commit 5d603311615f612320bb77bd2a82553ef1ced5b7 Author: Konstantin Khorenko Date: Wed Nov 13 12:29:50 2019 +0300 kernel/module.c: wakeup processes in module_wq on module unload Fix the race between load and unload a kernel module. sys_delete_module() try_stop_module() mod->state = _GOING add_unformed_module() old = find_module_all() (old->state == _GOING => wait_event_interruptible()) During pre-condition finished_loading() rets 0 schedule() (never gets waken up later) free_module() mod->state = _UNFORMED list_del_rcu(&mod->list) (dels mod from "modules" list) return The race above leads to modprobe hanging forever on loading a module. Error paths on loading module call wake_up_all(&module_wq) after freeing module, so let's do the same on straight module unload. Fixes: 6e6de3dee51a ("kernel/module.c: Only return -EEXIST for modules that have finished loading") Reviewed-by: Prarit Bhargava Signed-off-by: Konstantin Khorenko Signed-off-by: Jessica Yu commit 6e0f30604dbdac542b8b76e4ec9521b3064c981c Merge: e47ff01b94b6 c1a1f273d082 Author: Greg Kroah-Hartman Date: Fri Nov 15 18:11:53 2019 +0800 Merge tag 'usb-serial-5.5-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.5-rc1 Here are the USB-serial updates for 5.5-rc1, including: - support for a new class of pl2303 devices - improved divisor calculations for ch341 - fixes for a remote-wakeup bug in the moschip drivers - improved device-type handling in mos7840 - various cleanups of mos7840 Included are also some new device ids. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-5.5-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P USB: serial: option: add support for Foxconn T77W968 LTE modules USB: serial: mos7840: drop port open flag USB: serial: mos7840: drop read-urb check USB: serial: mos7840: drop port driver data accessors USB: serial: mos7840: drop serial struct accessor USB: serial: mos7840: drop paranoid serial checks USB: serial: mos7840: drop paranoid port checks USB: serial: mos7840: drop redundant urb context check USB: serial: mos7840: rip out broken interrupt handling USB: serial: mos7840: fix probe error handling USB: serial: mos7840: document MCS7810 detection hack USB: serial: mos7840: clean up device-type handling USB: serial: mos7840: fix remote wakeup USB: serial: mos7720: fix remote wakeup USB: serial: option: add support for DW5821e with eSIM support USB: serial: mos7840: add USB ID to support Moxa UPort 2210 USB: serial: ch341: reimplement line-speed handling USB: serial: pl2303: add support for PL2303HXN commit 20a15ee040f23bd553d4e6bbb1f8724ccd282abc Author: luanshi Date: Wed Nov 13 22:41:33 2019 +0800 genirq: Fix function documentation of __irq_alloc_descs() The function got renamed at some point, but the kernel-doc was not updated. Signed-off-by: Liguang Zhang Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1573656093-8643-1-git-send-email-zhangliguang@linux.alibaba.com commit e9838bd51169af87ae248336d4c3fc59184a0e46 Author: Frederic Weisbecker Date: Wed Nov 13 18:12:01 2019 +0100 irq_work: Fix IRQ_WORK_BUSY bit clearing While attempting to clear the busy bit at the end of a work execution, atomic_cmpxchg() expects the value of the flags with the pending bit cleared as the old value. However by mistake the value of the flags is passed without clearing the pending bit first. As a result, clearing the busy bit fails and irq_work_sync() may stall: watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [blktrace:4948] CPU: 0 PID: 4948 Comm: blktrace Not tainted 5.4.0-rc7-00003-gfeb4a51323bab #1 RIP: 0010:irq_work_sync+0x4/0x10 Call Trace: relay_close_buf+0x19/0x50 relay_close+0x64/0x100 blk_trace_free+0x1f/0x50 __blk_trace_remove+0x1e/0x30 blk_trace_ioctl+0x11b/0x140 blkdev_ioctl+0x6c1/0xa40 block_ioctl+0x39/0x40 do_vfs_ioctl+0xa5/0x700 ksys_ioctl+0x70/0x80 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x5b/0x1d0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 So clear the appropriate bit before passing the old flags to cmpxchg(). Fixes: feb4a51323ba ("irq_work: Slightly simplify IRQ_WORK_PENDING clearing") Reported-by: kernel test robot Reported-by: Leonard Crestez Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Leonard Crestez Link: https://lkml.kernel.org/r/20191113171201.14032-1-frederic@kernel.org commit b52b0c4fc977901c243756e191f3fc686725b7d9 Author: Christoph Hellwig Date: Wed Nov 13 08:18:36 2019 +0100 x86/pci: Remove #ifdef __KERNEL__ guard from pci.h is not a UAPI header, so the __KERNEL__ ifdef is rather pointless. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20191113071836.21041-4-hch@lst.de commit 948fdcf94289b15f86ce8206abd92a3f7d12360a Author: Christoph Hellwig Date: Wed Nov 13 08:18:35 2019 +0100 x86/pci: Remove pci_64.h This file only contains external declarations for two non-existing function pointers. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20191113071836.21041-3-hch@lst.de commit 90dc392fc445ee2fc17c2617e306774b269386ac Author: Christoph Hellwig Date: Wed Nov 13 08:18:34 2019 +0100 x86: Remove the calgary IOMMU driver The calgary IOMMU was only used on high-end IBM systems in the early x86_64 age and has no known users left. Remove it to avoid having to touch it for pending changes to the DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20191113071836.21041-2-hch@lst.de commit 4df4cb9e99f83b70d54bc0e25081ac23cceafcbc Author: Michael Kelley Date: Wed Nov 13 01:11:49 2019 +0000 x86/hyperv: Initialize clockevents earlier in CPU onlining Hyper-V has historically initialized stimer-based clockevents late in the process of onlining a CPU because clockevents depend on stimer interrupts. In the original Hyper-V design, stimer interrupts generate a VMbus message, so the VMbus machinery must be running first, and VMbus can't be initialized until relatively late. On x86/64, LAPIC timer based clockevents are used during early initialization before VMbus and stimer-based clockevents are ready, and again during CPU offlining after the stimer clockevents have been shut down. Unfortunately, this design creates problems when offlining CPUs for hibernation or other purposes. stimer-based clockevents are shut down relatively early in the offlining process, so clockevents_unbind_device() must be used to fallback to the LAPIC-based clockevents for the remainder of the offlining process. Furthermore, the late initialization and early shutdown of stimer-based clockevents doesn't work well on ARM64 since there is no other timer like the LAPIC to fallback to. So CPU onlining and offlining doesn't work properly. Fix this by recognizing that stimer Direct Mode is the normal path for newer versions of Hyper-V on x86/64, and the only path on other architectures. With stimer Direct Mode, stimer interrupts don't require any VMbus machinery. stimer clockevents can be initialized and shut down consistent with how it is done for other clockevent devices. While the old VMbus-based stimer interrupts must still be supported for backward compatibility on x86, that mode of operation can be treated as legacy. So add a new Hyper-V stimer entry in the CPU hotplug state list, and use that new state when in Direct Mode. Update the Hyper-V clocksource driver to allocate and initialize stimer clockevents earlier during boot. Update Hyper-V initialization and the VMbus driver to use this new design. As a result, the LAPIC timer is no longer used during boot or CPU onlining/offlining and clockevents_unbind_device() is not called. But retain the old design as a legacy implementation for older versions of Hyper-V that don't support Direct Mode. Signed-off-by: Michael Kelley Signed-off-by: Thomas Gleixner Tested-by: Dexuan Cui Reviewed-by: Dexuan Cui Link: https://lkml.kernel.org/r/1573607467-9456-1-git-send-email-mikelley@microsoft.com commit ac94be498f84f7327533b62faca4c3da64434904 Merge: dce7cd62754b 8c5bd25bf42e Author: Thomas Gleixner Date: Fri Nov 15 10:30:50 2019 +0100 Merge branch 'linus' into x86/hyperv Pick up upstream fixes to avoid conflicts. commit b2bf5015dae3a427166768bc6ca4f300247f9554 Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:45 2019 +0100 net: wireless: ti: remove local VENDOR_ID and DEVICE_ID definitions They are already included from mmc/sdio_ids.h and do not need a local definition. Fixes: 884f38607897 ("mmc: core: move some sdio IDs out of quirks file") Signed-off-by: H. Nikolaus Schaller Acked-by: Kalle Valo Cc: # v4.11+ Signed-off-by: Ulf Hansson commit d8620bbc32541a30f84154007defad917f5179f0 Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:44 2019 +0100 net: wireless: ti: wl1251 use new SDIO_VENDOR_ID_TI_WL1251 definition SDIO_VENDOR_ID_TI_WL1251 is now defined in mmc/sdio_ids.h separately from SDIO_VENDOR_ID_TI for wl1271. Fixes: 884f38607897 ("mmc: core: move some sdio IDs out of quirks file") Signed-off-by: H. Nikolaus Schaller Acked-by: Kalle Valo Cc: # v4.11+ Signed-off-by: Ulf Hansson commit 16568b4a4f0c34bd35cfadac63303c7af7812764 Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:43 2019 +0100 mmc: core: fix wl1251 sdio quirks wl1251 and wl1271 have different vendor id and device id. So we need to handle both with sdio quirks. Fixes: 884f38607897 ("mmc: core: move some sdio IDs out of quirks file") Signed-off-by: H. Nikolaus Schaller Cc: # v4.11+ Signed-off-by: Ulf Hansson commit e5db673e7fe2f971ec82039a28dc0811c2100e87 Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:42 2019 +0100 mmc: sdio: fix wl1251 vendor id v4.11-rc1 did introduce a patch series that rearranged the sdio quirks into a header file. Unfortunately this did forget to handle SDIO_VENDOR_ID_TI differently between wl1251 and wl1271 with the result that although the wl1251 was found on the sdio bus, the firmware did not load any more and there was no interface registration. This patch defines separate constants to be used by sdio quirks and drivers. Fixes: 884f38607897 ("mmc: core: move some sdio IDs out of quirks file") Signed-off-by: H. Nikolaus Schaller Cc: # v4.11+ Signed-off-by: Ulf Hansson commit 4d219f4cf0322ab40c1b21a836a6d4b61e01216f Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:41 2019 +0100 mmc: host: omap-hsmmc: remove init_card pdata callback from pdata Now as we have removed the last user (pandora_wl1251_init_card) of this callback, we can remove it from the hsmmc code. Suggested-by: Ulf Hansson Signed-off-by: H. Nikolaus Schaller Signed-off-by: Ulf Hansson commit 5d6bed6f48110d98bf3f5083ea8d6fde389c5de3 Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:40 2019 +0100 omap: remove omap2_hsmmc_info in old hsmmc.[ch] and update Makefile There is a new driver in drivers/mmc/host/omap_hsmmc.c configured by CONFIG_MMC_OMAP_HS and the last user was the pdata-quirks for pandora. Suggested-by: Tony Lindgren Signed-off-by: H. Nikolaus Schaller Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson commit 2398c41d64321e62af54424fd399964f3d48cdc2 Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:39 2019 +0100 omap: pdata-quirks: remove openpandora quirks for mmc3 and wl1251 With a wl1251 child node of mmc3 in the device tree decoded in omap_hsmmc.c to handle special wl1251 initialization, we do no longer need to instantiate the mmc3 through pdata quirks. We also can remove the wlan regulator and reset/interrupt definitions and do them through device tree. Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel") Signed-off-by: H. Nikolaus Schaller Cc: # v4.7+ Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson commit 4e8fad98171babe019db51c15055ec74697e9525 Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:38 2019 +0100 omap: pdata-quirks: revert pandora specific gpiod additions This partly reverts the commit efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only"). We must remove this from mainline first, so that the following patch to remove the openpandora quirks for mmc3 and wl1251 cleanly applies to stable v4.9, v4.14, v4.19 where the above mentioned patch is not yet present. Since the code affected is removed (no pandora gpios in pdata-quirks and more), there will be no matching revert-of-the-revert. Signed-off-by: H. Nikolaus Schaller Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson commit f6498b922e57aecbe3b7fa30a308d9d586c0c369 Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:37 2019 +0100 mmc: host: omap_hsmmc: add code for special init of wl1251 to get rid of pandora_wl1251_init_card Pandora_wl1251_init_card was used to do special pdata based setup of the sdio mmc interface. This does no longer work with v4.7 and later. A fix requires a device tree based mmc3 setup. Therefore we move the special setup to omap_hsmmc.c instead of calling some pdata supplied init_card function. The new code checks for a DT child node compatible to wl1251 so it will not affect other MMC3 use cases. Generally, this code was and still is a hack and should be moved to mmc core to e.g. read such properties from optional DT child nodes. Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel") Signed-off-by: H. Nikolaus Schaller Cc: # v4.7+ [Ulf: Fixed up some checkpatch complaints] Signed-off-by: Ulf Hansson commit 4f9007d692017cef38baf2a9b82b7879d5b2407b Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:36 2019 +0100 ARM: dts: pandora-common: define wl1251 as child node of mmc3 Since v4.7 the dma initialization requires that there is a device tree property for "rx" and "tx" channels which is not provided by the pdata-quirks initialization. By conversion of the mmc3 setup to device tree this will finally allows to remove the OpenPandora wlan specific omap3 data-quirks. Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel") Signed-off-by: H. Nikolaus Schaller Cc: # v4.7+ Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson commit 9b8d7072d6552ee5c57e5765f211f267041f9557 Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:35 2019 +0100 net: wireless: ti: wl1251 add device tree support We will have the wl1251 defined as a child node of the mmc interface and can read setup for gpios, interrupts and the ti,use-eeprom property from there instead of pdata to be provided by pdata-quirks. Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel") Signed-off-by: H. Nikolaus Schaller Acked-by: Kalle Valo Cc: # v4.7+ [Ulf: Fixed up some complaints from checkpatch] Signed-off-by: Ulf Hansson commit 69167ae5a511560e6ae4181364da274b535a743f Author: H. Nikolaus Schaller Date: Thu Nov 7 11:30:34 2019 +0100 Documentation: dt: wireless: update wl1251 for sdio The standard method for sdio devices connected to an sdio interface is to define them as a child node like we can see with wlcore. Signed-off-by: H. Nikolaus Schaller Acked-by: Kalle Valo Reviewed-by: Rob Herring Cc: # v4.7+ Signed-off-by: Ulf Hansson commit 3d44a6fd0775e6215e836423e27f8eedf8c871ea Author: Oliver Neukum Date: Thu Nov 14 16:01:18 2019 +0100 Bluetooth: btusb: fix PM leak in error case of setup If setup() fails a reference for runtime PM has already been taken. Proper use of the error handling in btusb_open()is needed. You cannot just return. Fixes: ace31982585a3 ("Bluetooth: btusb: Add setup callback for chip init on USB") Signed-off-by: Oliver Neukum Signed-off-by: Marcel Holtmann commit 8550179018e0d243985a095c78f3c62866507076 Merge: 7937fd322705 3c33a11a2913 Author: Kalle Valo Date: Fri Nov 15 09:54:25 2019 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.5. Major changes: ath10k * request for PM_QOS_CPU_DMA_LATENCY to improve firmware initialisation time commit 7937fd3227055892e169f4b34d21157e57d919e2 Author: Johannes Berg Date: Fri Nov 15 09:28:31 2019 +0200 iwlwifi: mvm: fix non-ACPI function The code now compiles without ACPI, but there's a warning since iwl_mvm_get_ppag_table() isn't used, and iwl_mvm_ppag_init() must not unconditionally fail but return success instead. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit bfc3e9fdbfb8c2fe8f7f2d7c41126c554579237f Author: Johannes Berg Date: Fri Nov 15 09:28:28 2019 +0200 iwlwifi: 22000: fix some indentation Somehow two tabs snuck into this file where just one should be used, fix that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 3681021fc6af58bfacd1c6e7b1e03ea1da7681e2 Author: Johannes Berg Date: Fri Nov 15 09:28:25 2019 +0200 iwlwifi: remove IWL_DEVICE_22560/IWL_DEVICE_FAMILY_22560 This is dead code, nothing uses the IWL_DEVICE_22560 macro and thus nothing every uses IWL_DEVICE_FAMILY_22560. Remove it all. While at it, remove some code and definitions used only in this case, and clean up some comments/names that still refer to it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 4658d552e02c75bce90c515e1397e23464d68f3c Author: Emmanuel Grumbach Date: Fri Nov 15 09:28:22 2019 +0200 iwlwifi: mvm: sync the iwl_mvm_session_prot_notif layout The firmware API has changed a little bit but this change has no impact on the flow and is backward compatible. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 220089c720b0b8175961a320c29f55a2ada0bf31 Author: Mordechay Goodstein Date: Fri Nov 15 09:28:20 2019 +0200 iwlwifi: mvm: start CTDP budget from 2400mA The current budget of 2000mA is preventing us from reaching maximum throughput. According to our system engineers, we can increase the maximum budget to 2400mA to solve this problem. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit d66bd0c4840abc2d1793a1bf598ecc554d2376e1 Author: Haim Dreyfuss Date: Fri Nov 15 09:28:17 2019 +0200 iwlwifi: mvm: don't skip mgmt tid when flushing all tids There are various of flows which require tids flushing (disconnection, suspend, etc...). Currently, when the driver instructs the FW to flush he masks all the data tids(0-7). However, the driver doesn't set the management tid (#15) which cause the FW not to flush it. When the FW tries to remove the mgmt queue he throws an assert since it is not an empty queue. instead of just set only the data tids set everything and let the FW ignore the invalid tids. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 559897363ca84cf1e445aa237b56b1e531047c1b Author: Shahar S Matityahu Date: Fri Nov 15 09:28:14 2019 +0200 iwlwifi: mvm: scan: enable adaptive dwell in p2p Align to the requirement update and support adaptive dwell in p2p scan. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 39c1a9728f938c7255ce507c8d56b73e8a4ebddf Author: Ihab Zhaika Date: Fri Nov 15 09:28:11 2019 +0200 iwlwifi: refactor the SAR tables from mvm to acpi Refactored the SAR related functions from iwlmvm to acpi in order to make it shared between different opmodes in addition to removing unused variable ppag_rev. Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 5167ff45a503ee49ae314c0cff410efa1eb9a1b8 Author: Shahar S Matityahu Date: Fri Nov 15 09:28:08 2019 +0200 iwlwifi: scan: support scan req cmd ver 12 Implement scan request command version 12. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 687db6ff5b7075326a8a1fcd8b7c4037208663fc Author: Shahar S Matityahu Date: Fri Nov 15 09:28:05 2019 +0200 iwlwifi: scan: make new scan req versioning flow Implement a new versioning handling flow supported from version 11 onwards. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit c5aaa8be29b25dfe1731e9a8b19fd91b7b789ee3 Author: Wang Xuerui Date: Fri Nov 15 09:28:02 2019 +0200 iwlwifi: mvm: fix unaligned read of rx_pkt_status This is present since the introduction of iwlmvm. Example stack trace on MIPS: [] iwl_mvm_rx_rx_mpdu+0xa8/0xb88 [iwlmvm] [] iwl_pcie_rx_handle+0x420/0xc48 [iwlwifi] Tested with a Wireless AC 7265 for ~6 months, confirmed to fix the problem. No other unaligned accesses are spotted yet. Signed-off-by: Wang Xuerui Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit eb3dc36eeca465a6a647afc7db8d00a5d4f2fb82 Author: Colin Ian King Date: Fri Nov 15 09:27:59 2019 +0200 iwlwifi: remove redundant assignment to variable bufsz The variable bufsz is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit ffe5619fd869a0721cedb66368323b656380d94c Author: Luca Coelho Date: Fri Nov 15 09:27:56 2019 +0200 iwlwifi: bump FW API to 51 for 22000 series Start supporting API version 51 for 22000 series. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 60d1794e284265d39a0b00603b34160c60f59a34 Author: Johannes Berg Date: Fri Nov 15 09:27:54 2019 +0200 iwlwifi: FW API: reference enum in docs of modify_mask Add a reference to the correct enum rather than showing the pattern of the actual constants. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 6587ef6e22c5297ae22ddb5744d42c02b8df2741 Author: Mordechay Goodstein Date: Fri Nov 15 09:27:51 2019 +0200 iwlwifi: mvm: print rate_n_flags in a pretty format Use the rs_pretty_print_rate() function to print the rate_n_flags in more human-readable format. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit b0aeb45bad84aa3e502b660789dd454d1d11fbf9 Merge: 295c52ee1485 e1e9b78d3957 Author: Ingo Molnar Date: Fri Nov 15 08:33:54 2019 +0100 Merge tag 'perf-core-for-mingo-5.5-20191112' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf record: Ravi Bangoria: - Provide an option to print perf_event_open args and syscall return value. This was already possible using -v, but then lots of other debug info would be output as well, provide a way to show just the syscall args and return value, e.g.: # perf --debug perf-event-open=1 record perf_event_attr: size 112 { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|PERIOD read_format ID disabled 1 inherit 1 ksymbol 1 bpf_event 1 ------------------------------------------------------------ sys_perf_event_open: pid 4308 cpu 0 group_fd -1 flags 0x8 = 4 core: - Remove map->groups, we can get that information in other ways, reduces the size of a key data structure and paves the way to have it shared by multiple threads. - Use 'struct map_symbol' in more places, where we already were using a 'struct map' + 'struct symbol', this helps passing that usual pair of information across callchain, browser code, etc. - Add 'struct map_groups' (where the map_symbol->map is) to 'struct map_symbol', to ease annotation code, for instance, where we call from functions in one map we're browsing to functions in another DSO, mapped in another 'struct map'. event parsing: Ian Rogers: - Use YYABORT to clear stack after failure, plugging leaks Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 19ff9b2c6e3cdf1363ef0ec58e2089d750594d60 Author: Tova Mussai Date: Fri Nov 15 09:27:48 2019 +0200 iwlwifi: scan: adapt the code to use api ver 11 FW scan api ver 11 adds support for some new features, in this version the fw did also some cleanup in the api, which causes the driver not to be able to use the current scan req struct. Therefore, in this patch the driver has new version for the scan command code Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 51698293e3230796e38cd92c49e69650cacf66e5 Author: Tova Mussai Date: Fri Nov 15 09:27:45 2019 +0200 iwlwifi: scan: Create function to build scan cmd Currently, the code to build scan cmd is duplicated in iwl_mvm_reg_scan_start and iwl_mvm_sched_scan_start. Create a function to build this command, and call the function instead. Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 508127b7629e1b5d01a44743e2ea1a9370b643ec Author: Tova Mussai Date: Fri Nov 15 09:27:42 2019 +0200 iwlwifi: scan: create function for scan scheduling params In the next patch, this code will be used from different places. As preparation export this code into function. Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 4d75a9eba2e7ff4de28436b5fdba2f17087a50da Author: Shahar S Matityahu Date: Fri Nov 15 09:27:40 2019 +0200 iwlwifi: dbg_ini: support dump collection upon assert during D3 add assert time point in the D3 resume flow in case there was an assert during D3. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit bc4f65b2fc771a9704493d4115851f00a0eb3b15 Author: Emmanuel Grumbach Date: Fri Nov 15 09:27:37 2019 +0200 iwlwifi: pcie: make iwl_pcie_gen2_update_byte_tbl static It is called within tx-gen2.c only. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 686d5c5708c97c7bddd2c4af61e3d9ebcdcfe7d9 Author: Mordechay Goodstein Date: Fri Nov 15 09:27:34 2019 +0200 iwlwifi: mvm: in VHT connection use only VHT capabilities mac80211 limits amsdu size to the minimum of HT and VHT capabilities but since in a VHT connection we don't transmit HT frames we can discard HT limits. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 222ccf5e9f3779482ee1a6eb37ba8ce2c0519089 Author: Tova Mussai Date: Fri Nov 15 09:27:31 2019 +0200 iwlwifi: nvm: update iwl_uhb_nvm_channels Change the UHB channels to start from 1 to match the specs (11ax Draft 5.0). Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit d923b020dcecb70687391fd311fc0a8affc37857 Author: Luca Coelho Date: Fri Nov 15 09:27:28 2019 +0200 iwlwifi: mvm: remove else-if in iwl_send_phy_cfg_cmd() We return in the if block, so it's unnecessary to have an else statement. Remove it. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit bb99ff9baa02beb9216c86678999342197c849cc Author: Luca Coelho Date: Fri Nov 15 09:27:25 2019 +0200 iwlwifi: mvm: fix support for single antenna diversity When the single antenna diversity support was sent upstream, only some definitions were sent, due to a bad revert. Fix this by adding the actual code. Fixes: 5952e0ec3f05 ("iwlwifi: mvm: add support for single antenna diversity") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 9786b65bc61acec63f923978c75e707afbb74bc7 Author: Gerd Hoffmann Date: Wed Nov 13 14:56:12 2019 +0100 drm/ttm: fix mmap refcounting When mapping ttm objects via drm_gem_ttm_mmap() helper drm_gem_mmap_obj() will take an object reference. That gets never released due to ttm having its own reference counting. Fix that by dropping the gem object reference once the ttm mmap completed (and ttm refcount got bumped). For that to work properly the drm_gem_object_get() call in drm_gem_ttm_mmap() must be moved so it happens before calling obj->funcs->mmap(), otherwise the gem refcount would go down to zero. Fixes: 231927d939f0 ("drm/ttm: add drm_gem_ttm_mmap()") Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Tested-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20191113135612.19679-1-kraxel@redhat.com commit 3c33a11a291303db4b96b5e39dfd54831937bfa5 Author: Eduardo Abinader Date: Fri Nov 8 11:10:46 2019 +0200 wcn36xx: fix typo Signed-off-by: Eduardo Abinader Signed-off-by: Kalle Valo commit b70b3a36ec33a2c8d3292f3b33fe2047a8f57b9a Author: Bjorn Andersson Date: Wed Nov 13 15:35:58 2019 -0800 ath10k: qmi: Sleep for a while before assigning MSA memory Unless we sleep for a while before transitioning the MSA memory to WLAN the MPSS.AT.4.0.c2-01184-SDM845_GEN_PACK-1 firmware triggers a security violation fairly reliably. Unforutnately recovering from this failure always results in the entire system freezing. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo commit f4fe2e53349f1072d33c69f484dbf9d77bb8f45a Author: Bjorn Andersson Date: Wed Nov 13 12:26:44 2019 -0800 ath10k: Revert "ath10k: add cleanup in ath10k_sta_state()" This reverts commit 334f5b61a6f29834e881923b98d1e27e5ce9620d. This caused ath10k_snoc on Qualcomm MSM8998, SDM845 and QCS404 platforms to trigger an assert in the firmware: err_qdi.c:456:EF:wlan_process:1:cmnos_thread.c:3900:Asserted in wlan_vdev.c:_wlan_vdev_up:3219 Revert the offending commit for now. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo commit 410119ee29b6c14b88bae8cfa87b202e3fbe0488 Author: Fabien Dessenne Date: Mon Aug 26 17:38:43 2019 +0200 remoteproc: stm32: wakeup the system by wdg irq If the device node defines the 'wakeup-source' property, use the WDG exti IRQ as a wakeup source of the system. Signed-off-by: Fabien Dessenne Link: https://lore.kernel.org/r/1566833923-16718-3-git-send-email-fabien.dessenne@st.com [bjorn: Replace ifdef with __maybe_unused for suspend/resume functions] Signed-off-by: Bjorn Andersson commit 14ea1d04ed0f7bae60951bdb8eeaa55cdbb26c73 Author: Fabien Dessenne Date: Mon Aug 26 17:38:42 2019 +0200 dt-bindings: remoteproc: stm32: add wakeup-source Add the "wakeup-source" property: if the optional wdg interrupt is defined, then this property may be defined too. Acked-by: Rob Herring Signed-off-by: Fabien Dessenne Link: https://lore.kernel.org/r/1566833923-16718-2-git-send-email-fabien.dessenne@st.com Signed-off-by: Bjorn Andersson commit 2611045e3555cd0d75837ae69ffd70ef51e28bf7 Author: Marcelo Diop-Gonzalez Date: Thu Nov 14 18:28:01 2019 -0500 staging: vchiq: Refactor indentation in vchiq_platform_conn_state_changed() Reducing the indentation level helps a bit with the readability of this function. There's also a checkpatch fix here, moving the first argument to kthread_create() onto the same line, as well as a relocation of the statement "char threadname[16];" to the top of the function to avoid a declaration in the middle of code. Signed-off-by: Marcelo Diop-Gonzalez Link: https://lore.kernel.org/r/20191114232801.71458-1-marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman commit 635dad0911d12d633df7611a5c564a3b98f425cf Author: Colin Ian King Date: Thu Nov 14 22:15:09 2019 +0000 staging: exfat: fix spelling mistake "maont" -> "mount" There is a spelling mistake in a kernel info message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191114221509.10728-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit d138aed68a932476aaeb9abe680a65b2a120cdc3 Author: YueHaibing Date: Thu Nov 14 22:03:48 2019 +0800 staging: exfat: remove two unused functions Fix sparse warnings: drivers/staging/exfat/exfat_core.c:2045:4: warning: symbol 'calc_checksum_1byte' was not declared. Should it be static? drivers/staging/exfat/exfat_core.c:2080:5: warning: symbol 'calc_checksum_4byte' was not declared. Should it be static? The two functions has no caller in tree, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191114140348.46088-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 6caba26ff7210e4591f6793e6597d5236c74c4bb Author: Colin Ian King Date: Thu Nov 14 09:57:47 2019 +0000 staging: rtl8723bs: fix indentation issue There is a block of statements that are indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191114095747.132407-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit abc16585919cfa6d10bc4295dd91dce51fdc6343 Author: Colin Ian King Date: Thu Nov 14 09:54:30 2019 +0000 staging: rtl8192u: fix indentation issue There is a block of statements that are indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191114095430.132120-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 97ab474c2dba93fe0bfddc23d58f35d5b562d6ad Merge: 15fbb2312f32 0815ef3c019d Author: Jens Axboe Date: Thu Nov 14 22:58:45 2019 -0700 Merge branch 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.5/drivers Pull MD changes from Song. * 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md: drivers/md/raid5-ppl.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET commit 698b22273efa893d664e64116aa844cfb5057a5f Author: Tian Tao Date: Wed Nov 6 08:53:41 2019 +0800 crypto: tgr192 - remove unneeded semicolon Fix the warning below. ./crypto/tgr192.c:558:43-44: Unneeded semicolon ./crypto/tgr192.c:586:44-45: Unneeded semicolon Fixes: f63fbd3d501b ("crypto: tgr192 - Switch to shash") Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit 4509f43766140aba4c68107a4afb7c22852e246d Author: Colin Ian King Date: Tue Nov 5 15:03:59 2019 +0000 crypto: allwinner - fix some spelling mistakes There are spelling mistakes in dev_warn and dev_err messages. Fix these. Change "recommandation" to "recommendation" and "tryed" to "tried". Signed-off-by: Colin Ian King Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 5c49645c4a74be8dd6c0152019fc3f02ff24c8b5 Author: Codrin Ciubotariu Date: Mon Nov 4 13:54:57 2019 +0200 hwrng: atmel - add new platform support for sam9x60 Add platform support for the new IP found on sam9x60 SoC. For this version, if the peripheral clk is above 100MHz, the HALFR bit must be set. This bit is available only if the IP can generate a random number every 168 cycles (instead of 84). Signed-off-by: Codrin Ciubotariu Signed-off-by: Herbert Xu commit 454dfebae2dbeb6708a3a6a2d38ecd56648e8012 Author: Codrin Ciubotariu Date: Mon Nov 4 13:54:56 2019 +0200 dt-bindings: rng: atmel-trng: add new compatible Add compatible for new IP found on sam9x60 SoC. Signed-off-by: Codrin Ciubotariu Acked-by: Rob Herring Signed-off-by: Herbert Xu commit ae0cc3b7e7f5e37b946876e114068f92b33dfa5a Author: Steven Rostedt (VMware) Date: Thu Nov 14 14:41:47 2019 -0500 ftrace/samples: Add a sample module that implements modify_ftrace_direct() Add a sample module that tests modify_ftrace_direct(), and this can be used by the selftests as well. Signed-off-by: Steven Rostedt (VMware) commit 0567d6809182df53da03636fad36c507c5cf07a5 Author: Steven Rostedt (VMware) Date: Thu Nov 14 14:39:35 2019 -0500 ftrace: Add modify_ftrace_direct() Add a new function modify_ftrace_direct() that will allow a user to update an existing direct caller to a new trampoline, without missing hits due to unregistering one and then adding another. Link: https://lore.kernel.org/r/20191109022907.6zzo6orhxpt5n2sv@ast-mbp.dhcp.thefacebook.com Suggested-by: Alexei Starovoitov Signed-off-by: Steven Rostedt (VMware) commit 36b3615dc3b625c8b587f34e413a600f7ac16403 Author: Steven Rostedt (VMware) Date: Thu Nov 14 22:43:58 2019 -0500 tracing: Add missing "inline" in stub function of latency_fsnotify() The latency_fsnotify() stub when the function is not defined, was missing the "inline". Link: https://lore.kernel.org/r/20191115140213.74c5efe7@canb.auug.org.au Reported-by: Stephen Rothwell Signed-off-by: Steven Rostedt (VMware) commit 565333a1554d704789e74205989305c811fd9c7a Author: yangerkun Date: Thu Sep 19 14:35:08 2019 +0800 ext4: fix a bug in ext4_wait_for_tail_page_commit No need to wait for any commit once the page is fully truncated. Besides, it may confuse e.g. concurrent ext4_writepage() with the page still be dirty (will be cleared by truncate_pagecache() in ext4_setattr()) but buffers has been freed; and then trigger a bug show as below: [ 26.057508] ------------[ cut here ]------------ [ 26.058531] kernel BUG at fs/ext4/inode.c:2134! ... [ 26.088130] Call trace: [ 26.088695] ext4_writepage+0x914/0xb28 [ 26.089541] writeout.isra.4+0x1b4/0x2b8 [ 26.090409] move_to_new_page+0x3b0/0x568 [ 26.091338] __unmap_and_move+0x648/0x988 [ 26.092241] unmap_and_move+0x48c/0xbb8 [ 26.093096] migrate_pages+0x220/0xb28 [ 26.093945] kernel_mbind+0x828/0xa18 [ 26.094791] __arm64_sys_mbind+0xc8/0x138 [ 26.095716] el0_svc_common+0x190/0x490 [ 26.096571] el0_svc_handler+0x60/0xd0 [ 26.097423] el0_svc+0x8/0xc Run the procedure (generate by syzkaller) parallel with ext3. void main() { int fd, fd1, ret; void *addr; size_t length = 4096; int flags; off_t offset = 0; char *str = "12345"; fd = open("a", O_RDWR | O_CREAT); assert(fd >= 0); /* Truncate to 4k */ ret = ftruncate(fd, length); assert(ret == 0); /* Journal data mode */ flags = 0xc00f; ret = ioctl(fd, _IOW('f', 2, long), &flags); assert(ret == 0); /* Truncate to 0 */ fd1 = open("a", O_TRUNC | O_NOATIME); assert(fd1 >= 0); addr = mmap(NULL, length, PROT_WRITE | PROT_READ, MAP_SHARED, fd, offset); assert(addr != (void *)-1); memcpy(addr, str, 5); mbind(addr, length, 0, 0, 0, MPOL_MF_MOVE); } And the bug will be triggered once we seen the below order. reproduce1 reproduce2 ... | ... truncate to 4k | change to journal data mode | | memcpy(set page dirty) truncate to 0: | ext4_setattr: | ... | ext4_wait_for_tail_page_commit | | mbind(trigger bug) truncate_pagecache(clean dirty)| ... ... | mbind will call ext4_writepage() since the page still be dirty, and then report the bug since the buffers has been free. Fix it by return directly once offset equals to 0 which means the page has been fully truncated. Reported-by: Hulk Robot Signed-off-by: yangerkun Link: https://lore.kernel.org/r/20190919063508.1045-1-yangerkun@huawei.com Reviewed-by: Jan Kara Signed-off-by: Theodore Ts'o commit 5500221ea1b72c550b61f88fe3e8afbb08445989 Author: Gao Xiang Date: Thu Oct 31 17:23:15 2019 +0800 ext4: bio_alloc with __GFP_DIRECT_RECLAIM never fails Similar to [1] [2], bio_alloc with __GFP_DIRECT_RECLAIM flags guarantees bio allocation under some given restrictions, as stated in block/bio.c and fs/direct-io.c So here it's ok to not check for NULL value from bio_alloc(). [1] https://lore.kernel.org/r/20191030035518.65477-1-gaoxiang25@huawei.com [2] https://lore.kernel.org/r/20190830162812.GA10694@infradead.org Cc: Theodore Ts'o Cc: Andreas Dilger Cc: Ritesh Harjani Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20191031092315.139267-1-gaoxiang25@huawei.com Signed-off-by: Theodore Ts'o commit ebc11f7b1f2a016a99796b0923d9c0d7b7f9cba6 Author: Chengguang Xu Date: Sun Oct 6 18:30:28 2019 +0800 ext4: code cleanup for get_next_id Now the checks in ext4_get_next_id() and dquot_get_next_id() are almost the same, so just call dquot_get_next_id() instead of ext4_get_next_id(). Signed-off-by: Chengguang Xu Link: https://lore.kernel.org/r/20191006103028.31299-1-cgxu519@mykernel.net Signed-off-by: Theodore Ts'o commit 8f4b01fcded2dc821349cc0edfa5311c05abe293 Author: Aneesh Kumar K.V Date: Thu Oct 31 16:27:41 2019 +0530 libnvdimm/namespace: Differentiate between probe mapping and runtime mapping The nvdimm core currently maps the full namespace to an ioremap range while probing the namespace mode. This can result in probe failures on architectures that have limited ioremap space. For example, with a large btt namespace that consumes most of I/O remap range, depending on the sequence of namespace initialization, the user can find a pfn namespace initialization failure due to unavailable I/O remap space which nvdimm core uses for temporary mapping. nvdimm core can avoid this failure by only mapping the reserved info block area to check for pfn superblock type and map the full namespace resource only before using the namespace. Given that personalities like BTT can be layered on top of any namespace type create a generic form of devm_nsio_enable (devm_namespace_enable) and use it inside the per-personality attach routines. Now devm_namespace_enable() is always paired with disable unless the mapping is going to be used for long term runtime access. Signed-off-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/20191017073308.32645-1-aneesh.kumar@linux.ibm.com [djbw: reworks to move devm_namespace_{en,dis}able into *attach helpers] Reported-by: kbuild test robot Link: https://lore.kernel.org/r/20191031105741.102793-2-aneesh.kumar@linux.ibm.com Signed-off-by: Dan Williams commit c1f45d86a522d568aef541dbbc066ccac262b4c3 Author: Aneesh Kumar K.V Date: Fri Nov 1 08:57:28 2019 +0530 libnvdimm/pfn_dev: Don't clear device memmap area during generic namespace probe nvdimm core use nd_pfn_validate when looking for devdax or fsdax namespace. In this case device resources are allocated against nd_namespace_io dev. In-order to allow remap of range in nd_pfn_clear_memmap_error(), move the device memmap area clearing while initializing pfn namespace. With this device resource are allocated against nd_pfn and we can use nd_pfn->dev for remapping. This also avoids calling nd_pfn_clear_mmap_errors twice. Once while probing the namespace and second while initializing a pfn namespace. Signed-off-by: Aneesh Kumar K.V Link: https://lore.kernel.org/r/20191101032728.113001-1-aneesh.kumar@linux.ibm.com Signed-off-by: Dan Williams commit 2f4741497c9d5151c6bde0edb6faf34fc3859b80 Author: Ira Weiny Date: Thu Nov 14 19:06:47 2019 -0800 libnvdimm: Trivial comment fix Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20190918211933.13213-1-ira.weiny@intel.com Signed-off-by: Dan Williams commit ab84b77afc95fc038d71aba80aa4440bcbd67663 Author: Ira Weiny Date: Thu Nov 14 19:06:34 2019 -0800 libnvdimm/namsepace: Don't set claim_class on error Don't leave claim_class set to an invalid value if an error occurs in btt_claim_class(). While we are here change the return type of __holder_class_store() to be clear about the values it is returning. This was found via code inspection. Reported-by: Dan Carpenter Reviewed-by: Vishal Verma Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20190925211348.14082-1-ira.weiny@intel.com Signed-off-by: Dan Williams commit 17cc51390c141662748dbbc2fe98f3ed10f2e13e Merge: 2d0720f5a4fc b4011644b03c Author: Dave Airlie Date: Fri Nov 15 12:34:39 2019 +1000 Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next Two minor cleanups / fixes for -next. Signed-off-by: Dave Airlie From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m=20=28VMware=29?= Link: https://patchwork.freedesktop.org/patch/msgid/20191114131703.8607-1-thomas_os@shipmail.org commit a98cdaf73e32d1538cc225464fcf61310749471e Merge: 24df31f8d5be 0b81c6c62021 Author: David S. Miller Date: Thu Nov 14 18:16:51 2019 -0800 Merge branch 's390-next' Julian Wiedmann says: ==================== s390/qeth: updates 2019-11-14 please apply the following qeth patches to net-next. Along with the usual cleanups, this (1) reduces collateral packet loss in the RX path when dealing with bad packets and/or allocation errors, and (2) simplifies how the L3 driver deals with mcast IP addresses. ==================== Signed-off-by: David S. Miller commit 0b81c6c620215743204cc03df40b25662a97a263 Author: Julian Wiedmann Date: Thu Nov 14 11:19:24 2019 +0100 s390/qeth: don't check drvdata in sysfs code Given the way how the sysfs attributes are registered / unregistered, the show/store helpers will never be called with a NULL drvdata. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit b80c08ac9414e33ac3b2591146f4f37fdefd3ecb Author: Julian Wiedmann Date: Thu Nov 14 11:19:23 2019 +0100 s390/qeth: replace qeth_l3_get_addr_buffer() The remaining usage effectively is a kmemdup() of the query object. By not wrapping it, some of the callers can now use GFP_KERNEL for the allocation. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 8659c189b6f2f0af7ae90867d497178ea45c8251 Author: Julian Wiedmann Date: Thu Nov 14 11:19:22 2019 +0100 s390/qeth: remove VLAN tracking for L3 devices Use vlan_for_each() instead of tracking each registered VID internally. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 611abe5165ca185bb64e0427c7efe2acdc9d5250 Author: Julian Wiedmann Date: Thu Nov 14 11:19:21 2019 +0100 s390/qeth: consolidate L3 mcast registration code Current code processes each (VLAN) device twice - once to inspect the IPv4 mcast addresses, and then a second time to walk the IPv6 mcast addresses. Unify all this into a single helper, thus removing some checks and a duplicated VLAN lookup. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 32a186c7f9588c843c26a1f0fbbf38f77a7b577a Author: Julian Wiedmann Date: Thu Nov 14 11:19:20 2019 +0100 s390/qeth: remove gratuitious RX modeset Trust the IPv4/IPv6 code to properly remove its mcast addresses when a VLAN device is unregistered, and then also trigger an RX modeset whenever it's needed. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit ddf28100ee1fa4fa5946dacdfe92d5c795a236e2 Author: Julian Wiedmann Date: Thu Nov 14 11:19:19 2019 +0100 s390/qeth: fine-tune L3 mcast locking Push the inet6_dev locking down into the helper that actually needs it for walking the mc_list. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 8311c7a252e82f000077ae0612fc4843b078f980 Author: Julian Wiedmann Date: Thu Nov 14 11:19:18 2019 +0100 s390/qeth: clean up error path in qeth_core_probe_device() qeth_core_free_card() is meant to be the counterpart of qeth_alloc_card() - but unfortunately was also picked as the place to free the QDIO queues. This gets messy when qeth_core_probe_device() fails during qeth_add_dbf_entry(). At this point the card->qdio.state is not initialized yet, so qeth_free_qdio_queues() ends up operating on uninitialized data. Luckily for now, the whole qeth_card struct is zero-allocated and the value of the QETH_QDIO_UNINITIALIZED enum is 0 as well. So there's no real impact from this bug at the moment, it's just really fragile. Clean this up by moving the qeth_free_qdio_queues() call up one level in the hierarchy. This way it doesn't get called from the error path. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 17caeaa4766dc447d6669b0f195c3ead746386ba Author: Julian Wiedmann Date: Thu Nov 14 11:19:17 2019 +0100 s390/qeth: handle skb allocation error gracefully When current code fails to allocate an skb in the RX path, it drops the whole RX buffer. Considering the large number of packets that a single RX buffer might contain, this is quite drastic. Skip over the packet instead, and try to extract the next packet from the RX buffer. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 7d4faee7c6db9ddfb2b4de637dc6f1576f780bd7 Author: Julian Wiedmann Date: Thu Nov 14 11:19:16 2019 +0100 s390/qeth: drop unwanted packets earlier in RX path Packets with an unexpected HW format are currently first extracted from the RX buffer, passed upwards to the layer-specific driver and only then finally dropped. Enhance the RX path so that we can drop such packets before even allocating an skb. For this, add some additional logic so that when a packet is meant to be dropped, we can still walk along the packet's data chunks in the RX buffer. This allows us to extract the following packet(s) from the buffer. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 5fd3fcbb8af8f9bc82afd84937393c193b95c204 Author: Julian Wiedmann Date: Thu Nov 14 11:19:15 2019 +0100 s390/qeth: support per-frame invalidation Each RX buffer may contain up to 64KB worth of data. In case the device needs to discard a packet _after_ already having reserved space for it in the buffer, the whole buffer gets set to ERROR state. As the buffer might contain any number of good packets, this can result in collateral packet loss. qeth can provide relief by enabling per-frame invalidation. The RX buffer is then presented as usual, we just need to spot & drop any individual packet that was flagged as invalid. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 845ef9047b1f4e8ea3b8865140066b08fe93d05c Author: Julian Wiedmann Date: Thu Nov 14 11:19:14 2019 +0100 s390/qeth: gather more detailed RX dropped/error statistics Where available, use the fine-grained counters in rtnl_link_stats64 to indicate different RX error causes. For drop reasons, use driver-private ethtool counters. In particular this patch allows us to keep track of driver-side drops due to unknown/unsupported HW descriptor format. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 2d0720f5a4fc2aa5ae92f21fc113d7626b5a3c9f Merge: dfce90259d74 789c4aea3f08 Author: Dave Airlie Date: Fri Nov 15 12:16:43 2019 +1000 Merge tag 'drm-intel-next-fixes-2019-11-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - PMU "Frequency" is reported as accumulated cycles - Avoid OOPS in dumb_create IOCTL when no CRTCs - Mitigation for userptr put_pages deadlock with trylock_page - Fix to avoid freeing heartbeat request too early - Fix LRC coherency issue - Fix Bugzilla #112212: Avoid screen corruption on MST - Error path fix to unlock context on failed context VM SETPARAM - Always consider holding preemption a privileged op in perf/OA - Preload LUTs if the hw isn't currently using them to avoid color flash on VLV/CHV - Protect context while grabbing its name for the request - Don't resize aliasing ppGTT size - Smaller fixes picked by tooling Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191114085213.GA6440@jlahtine-desk.ger.corp.intel.com commit 24df31f8d5be1b09f9e6c6d07ddfa96cbef1782b Merge: 798a496bf425 ed8640a9612c Author: David S. Miller Date: Thu Nov 14 18:12:19 2019 -0800 Merge branch 'vsock-add-multi-transports-support' Stefano Garzarella says: ==================== vsock: add multi-transports support Most of the patches are reviewed by Dexuan, Stefan, and Jorgen. The following patches need reviews: - [11/15] vsock: add multi-transports support - [12/15] vsock/vmci: register vmci_transport only when VMCI guest/host are active - [15/15] vhost/vsock: refuse CID assigned to the guest->host transport RFC: https://patchwork.ozlabs.org/cover/1168442/ v1: https://patchwork.ozlabs.org/cover/1181986/ v1 -> v2: - Patch 11: + vmci_transport: sent reset when vsock_assign_transport() fails [Jorgen] + fixed loopback in the guests, checking if the remote_addr is the same of transport_g2h->get_local_cid() + virtio_transport_common: updated space available while creating the new child socket during a connection request - Patch 12: + removed 'features' variable in vmci_transport_init() [Stefan] + added a flag to register only once the host [Jorgen] - Added patch 15 to refuse CID assigned to the guest->host transport in the vhost_transport This series adds the multi-transports support to vsock, following this proposal: https://www.spinics.net/lists/netdev/msg575792.html With the multi-transports support, we can use VSOCK with nested VMs (using also different hypervisors) loading both guest->host and host->guest transports at the same time. Before this series, vmci_transport supported this behavior but only using VMware hypervisor on L0, L1, etc. The first 9 patches are cleanups and preparations, maybe some of these can go regardless of this series. Patch 10 changes the hvs_remote_addr_init(). setting the VMADDR_CID_HOST as remote CID instead of VMADDR_CID_ANY to make the choice of transport to be used work properly. Patch 11 adds multi-transports support. Patch 12 changes a little bit the vmci_transport and the vmci driver to register the vmci_transport only when there are active host/guest. Patch 13 prevents the transport modules unloading while sockets are assigned to them. Patch 14 fixes an issue in the bind() logic discoverable only with the new multi-transport support. Patch 15 refuses CID assigned to the guest->host transport in the vhost_transport. I've tested this series with nested KVM (vsock-transport [L0,L1], virtio-transport[L1,L2]) and with VMware (L0) + KVM (L1) (vmci-transport [L0,L1], vhost-transport [L1], virtio-transport[L2]). Dexuan successfully tested the RFC series on HyperV with a Linux guest. ==================== Signed-off-by: David S. Miller commit ed8640a9612cfd01e1dac31255cea53023353681 Author: Stefano Garzarella Date: Thu Nov 14 10:57:50 2019 +0100 vhost/vsock: refuse CID assigned to the guest->host transport In a nested VM environment, we have to refuse to assign to a nested guest the same CID assigned to our guest->host transport. In this way, the user can use the local CID for loopback. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 36c5b48b91ac56762ef87e4af76350ed50f119b5 Author: Stefano Garzarella Date: Thu Nov 14 10:57:49 2019 +0100 vsock: fix bind() behaviour taking care of CID When we are looking for a socket bound to a specific address, we also have to take into account the CID. This patch is useful with multi-transports support because it allows the binding of the same port with different CID, and it prevents a connection to a wrong socket bound to the same port, but with different CID. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 6a2c0962105ae8ceba182c4f616e0e41d7755591 Author: Stefano Garzarella Date: Thu Nov 14 10:57:48 2019 +0100 vsock: prevent transport modules unloading This patch adds 'module' member in the 'struct vsock_transport' in order to get/put the transport module. This prevents the module unloading while sockets are assigned to it. We increase the module refcnt when a socket is assigned to a transport, and we decrease the module refcnt when the socket is destructed. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit b1bba80a4376aef34de2b57bfb8834bd095703ed Author: Stefano Garzarella Date: Thu Nov 14 10:57:47 2019 +0100 vsock/vmci: register vmci_transport only when VMCI guest/host are active To allow other transports to be loaded with vmci_transport, we register the vmci_transport as G2H or H2G only when a VMCI guest or host is active. To do that, this patch adds a callback registered in the vmci driver that will be called when the host or guest becomes active. This callback will register the vmci_transport in the VSOCK core. Cc: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit c0cfa2d8a788fcf45df5bf4070ab2474c88d543a Author: Stefano Garzarella Date: Thu Nov 14 10:57:46 2019 +0100 vsock: add multi-transports support This patch adds the support of multiple transports in the VSOCK core. With the multi-transports support, we can use vsock with nested VMs (using also different hypervisors) loading both guest->host and host->guest transports at the same time. Major changes: - vsock core module can be loaded regardless of the transports - vsock_core_init() and vsock_core_exit() are renamed to vsock_core_register() and vsock_core_unregister() - vsock_core_register() has a feature parameter (H2G, G2H, DGRAM) to identify which directions the transport can handle and if it's support DGRAM (only vmci) - each stream socket is assigned to a transport when the remote CID is set (during the connect() or when we receive a connection request on a listener socket). The remote CID is used to decide which transport to use: - remote CID <= VMADDR_CID_HOST will use guest->host transport; - remote CID == local_cid (guest->host transport) will use guest->host transport for loopback (host->guest transports don't support loopback); - remote CID > VMADDR_CID_HOST will use host->guest transport; - listener sockets are not bound to any transports since no transport operations are done on it. In this way we can create a listener socket, also if the transports are not loaded or with VMADDR_CID_ANY to listen on all transports. - DGRAM sockets are handled as before, since only the vmci_transport provides this feature. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 039642574cc4ff77b1c8ca042c879fa6995ce154 Author: Stefano Garzarella Date: Thu Nov 14 10:57:45 2019 +0100 hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init() Remote peer is always the host, so we set VMADDR_CID_HOST as remote CID instead of VMADDR_CID_ANY. Reviewed-by: Dexuan Cui Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 55f3e149b69004b95be47c891da50327ea8c0eb4 Author: Stefano Garzarella Date: Thu Nov 14 10:57:44 2019 +0100 vsock: move vsock_insert_unbound() in the vsock_create() vsock_insert_unbound() was called only when 'sock' parameter of __vsock_create() was not null. This only happened when __vsock_create() was called by vsock_create(). In order to simplify the multi-transports support, this patch moves vsock_insert_unbound() at the end of vsock_create(). Reviewed-by: Dexuan Cui Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit b9ca2f5ff7784d46285a8f1b14419ac4645096f7 Author: Stefano Garzarella Date: Thu Nov 14 10:57:43 2019 +0100 vsock: add vsock_create_connected() called by transports All transports call __vsock_create() with the same parameters, most of them depending on the parent socket. In order to simplify the VSOCK core APIs exposed to the transports, this patch adds the vsock_create_connected() callable from transports to create a new socket when a connection request is received. We also unexported the __vsock_create(). Suggested-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit b9f2b0ffde0c9b666b2b1672eb468b8f805a9b97 Author: Stefano Garzarella Date: Thu Nov 14 10:57:42 2019 +0100 vsock: handle buffer_size sockopts in the core virtio_transport and vmci_transport handle the buffer_size sockopts in a very similar way. In order to support multiple transports, this patch moves this handling in the core to allow the user to change the options also if the socket is not yet assigned to any transport. This patch also adds the '.notify_buffer_size' callback in the 'struct virtio_transport' in order to inform the transport, when the buffer_size is changed by the user. It is also useful to limit the 'buffer_size' requested (e.g. virtio transports). Acked-by: Dexuan Cui Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit daabfbca34ecfa936d3bf5219167c4c5e67db150 Author: Stefano Garzarella Date: Thu Nov 14 10:57:41 2019 +0100 vsock: add 'struct vsock_sock *' param to vsock_core_get_transport() Since now the 'struct vsock_sock' object contains a pointer to the transport, this patch adds a parameter to the vsock_core_get_transport() to return the right transport assigned to the socket. This patch modifies also the virtio_transport_get_ops(), that uses the vsock_core_get_transport(), adding the 'struct vsock_sock *' parameter. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 4c7246dc45e2706770d5233f7ce1597a07e069ba Author: Stefano Garzarella Date: Thu Nov 14 10:57:40 2019 +0100 vsock/virtio: add transport parameter to the virtio_transport_reset_no_sock() We are going to add 'struct vsock_sock *' parameter to virtio_transport_get_ops(). In some cases, like in the virtio_transport_reset_no_sock(), we don't have any socket assigned to the packet received, so we can't use the virtio_transport_get_ops(). In order to allow virtio_transport_reset_no_sock() to use the '.send_pkt' callback from the 'vhost_transport' or 'virtio_transport', we add the 'struct virtio_transport *' to it and to its caller: virtio_transport_recv_pkt(). We moved the 'vhost_transport' and 'virtio_transport' definition, to pass their address to the virtio_transport_recv_pkt(). Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit fe502c4a38d97e5f8b9d5602af1f07f5abc529d2 Author: Stefano Garzarella Date: Thu Nov 14 10:57:39 2019 +0100 vsock: add 'transport' member in the struct vsock_sock As a preparation to support multiple transports, this patch adds the 'transport' member at the 'struct vsock_sock'. This new field is initialized during the creation in the __vsock_create() function. This patch also renames the global 'transport' pointer to 'transport_single', since for now we're only supporting a single transport registered at run-time. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 3603a2e991a82e5094c3107a792859b08342aed3 Author: Stefano Garzarella Date: Thu Nov 14 10:57:38 2019 +0100 vsock: remove include/linux/vm_sockets.h file This header file now only includes the "uapi/linux/vm_sockets.h". We can include directly it when needed. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit db205c766862edae48d64e69e2f2502e2a3e9135 Author: Stefano Garzarella Date: Thu Nov 14 10:57:37 2019 +0100 vsock: remove vm_sockets_get_local_cid() vm_sockets_get_local_cid() is only used in virtio_transport_common.c. We can replace it calling the virtio_transport_get_ops() and using the get_local_cid() callback registered by the transport. Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 7ed78bc495fda7c1e79b85c3ab0f240685afcc80 Author: Stefano Garzarella Date: Thu Nov 14 10:57:36 2019 +0100 vsock/vmci: remove unused VSOCK_DEFAULT_CONNECT_TIMEOUT The VSOCK_DEFAULT_CONNECT_TIMEOUT definition was introduced with commit d021c344051af ("VSOCK: Introduce VM Sockets"), but it is never used in the net/vmw_vsock/vmci_transport.c. VSOCK_DEFAULT_CONNECT_TIMEOUT is used and defined in net/vmw_vsock/af_vsock.c Cc: Jorgen Hansen Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 798a496bf425a75282a38b9610f54dff4beb49ab Merge: b37fa92e20ef a7faa68b4e7f Author: David S. Miller Date: Thu Nov 14 18:09:16 2019 -0800 Merge branch 'octeontx2-af-Debugfs-support-and-updates-to-parser-profile' Sunil Goutham says: ==================== octeontx2-af: Debugfs support and updates to parser profile This patchset adds debugfs support to dump various HW state machine info which helps in debugging issues. Info includes - Current queue context, stats, resource utilization etc - MCAM entry utilization, miss and pkt drop counter - CGX ingress and egress stats - Current RVU block allocation status - etc. Rest patches has changes wrt - Updated packet parsing profile for parsing more protocols. - RSS algorithms to include inner protocols while generating hash - Handle current version of silicon's limitations wrt shaping, coloring and fixed mapping of transmit limiter queue's configuration. - Enable broadcast packet replication to PF and it's VFs. - Support for configurable NDC cache waymask - etc Changes from v1: Removed inline keyword for newly introduced APIs in few patches. - Suggested by David Miller. ==================== Signed-off-by: David S. Miller commit a7faa68b4e7feb3cd4dc746d1cb91217641246d3 Author: Subbaraya Sundeep Date: Thu Nov 14 10:56:33 2019 +0530 octeontx2-af: Start/Stop traffic in CGX along with NPC Traffic for a CGX mapped NIXLF can be stopped by disabling entries in NPC MCAM or by configuring CGX and mailbox messages exist for the two options. If traffic is stopped at CGX then VFs of that PF are also effected hence CGX traffic should be started/stopped by tracking all the users of it. This patch implements that CGX users tracking. CGX is also configured along with NPC if required. Also removed a check which mandates even number of LBK VFs. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit a02917663112b3569fd01dd90c2502802c5ed3cf Author: Sunil Goutham Date: Thu Nov 14 10:56:32 2019 +0530 octeontx2-af: Add option to disable dynamic entry caching in NDC A config option is added to disable caching of dynamic entries like SQEs and stack pages. Also locks down all HW contexts in NDC, preventing them from being evicted. This option is useful when the queue count is large and there are huge NDC cache misses. It's trade off between SQ context misses and dynamically changing entries like SQE and stack page pointers. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit ee1e75915f4ff00e125adf98c9684c57cae4a88f Author: Geetha sowjanya Date: Thu Nov 14 10:56:31 2019 +0530 octeontx2-af: Support configurable NDC cache way_mask Each of the NIX/NPA LFs can choose which ways of their respective NDC caches should be used to cache their contexts. This enables flexible configurations like disabling caching for a LF, limiting it's context to a certain set of ways etc etc. Separate way_mask for NIX-TX and NIX-RX is not supported. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 561e8752a17bbd0a29c770df3d4c9963c41ae873 Author: Sunil Goutham Date: Thu Nov 14 10:56:30 2019 +0530 octeontx2-af: Enable broadcast packet replication Ingress packet replication support has been added to 96xx B0 silicon. This patch enables using that feature to replicate ingress broadcast packets to PF and it's VFs. Also fixed below issues - VFs can also install NPC MCAM entry to forward broadcast pkts. Otherwise, unless PF's interface is UP, VFs will not receive bcast packets. - NPC MCAM entry is disabled when PF and all it's VFs are down. - Few corner cases in installing multicast entry list. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 5d9b976d4480dc0dcfa3719b645636d2f0f9f156 Author: Sunil Goutham Date: Thu Nov 14 10:56:29 2019 +0530 octeontx2-af: Support fixed transmit scheduler topology CN96xx initial silicon doesn't support all features pertaining to NIX transmit scheduling and shaping. - It supports a fixed topology of 1:1 mapped transmit limiters at all levels. - Supports DWRR only at SMQ/MDQ and TL1. - Doesn't support shaping and coloring. This patch adds HW capability structure by which each variant and skew of silicon can be differentiated by their supported features. And adds support for A0 silicon's transmit scheduler capabilities or rather limitations. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 206ff848a1abaa1755310fdb4b20a3303ccf23d9 Author: Kiran Kumar K Date: Thu Nov 14 10:56:28 2019 +0530 octeontx2-af: Add more RSS algorithms This patch adds support for few more RSS key types for flow key algorithm to compute rss hash index. Following flow key types have been added. - Tunnel types like NVGRE, VXLAN, GENEVE. - L2 offload type ETH_DMAC, Here we will consider only DMAC 6 bytes. - And extension header IPV6_EXT (1 byte followed by IPV6 header - Hashing inner protocol fields for inner DMAC, IPv4/v6, TCP, UDP, SCTP. Signed-off-by: Kiran Kumar K Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 8cc89ae92518cac06afc0faf58d15322d88043e2 Author: Nithin Dabilpuram Date: Thu Nov 14 10:56:27 2019 +0530 octeontx2-af: Clear NPC MCAM entries before update Writing into NPC MCAM1 and MCAM0 registers are suppressed if they happened to form a reserved combination. Hence clear and disable MCAM entries before update. For HRM: [CAM(1)]=1, [CAM(0)]=1: Reserved. The reserved combination is not allowed. Hardware suppresses any write to CAM(0) or CAM(1) that would result in the reserved combination for any CAM bit. Signed-off-by: Nithin Dabilpuram Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 922584f607525982e5c99a772bae408ad9407c69 Author: Hao Zheng Date: Thu Nov 14 10:56:26 2019 +0530 octeontx2-af: Update NPC KPU packet parsing profile Updated NPC KPU packet parsing profile with support for following - Fragmentation support for IPv4 IPv6 outer header - NIX instruction header support - QinQ with TPID of 0x8100 as non inner most vlan tag, as legacy network equipments still generate QinQ packets with this configuration. - To better support RSS for tunnelled packets, udp based tunnel protocols such as vxlan, vxlan-gpe, geneve and gtpu are now captured into a separate layer E. Consequently, the inner packet headers are pushed one layer down to LF, LG, and LH accordingly. - Support for rfc7510 mpls in udp. Up to 4 MPLS labels can be parsed and captured in one layer LE. - Parser support for DSA, extended DSA and eDSA tags right after ethernet header by Marvell SOHO and Falcon switches. For extended DSA and eDSA tags, a special PKIND of 62 is used, as these tags don't contain a tpid field. - Higig2 protocol header parsing support, added a NPC_LT_LA_HIGIG2_ETHER for a combined header of HIGIG2 and Ethernet. Add a NPC_LT_LA_IH_NIX_HIGIG2_ETHER for a combined header of nix_ih, HIGIG2 and Ethernet on egress side. Also added 2 upper flags in LA to indicate the presence of nix_ih and HIGIG2. Other changes include - IPv4.TTL==0 IPv6.HLIM==0 check - Per RFC 1858, mark fragment offset == 1 as error - TCP invalid flags check - Separate error codes for outer and inner IPv4 checksum errors. - Fix a parser error when KPU parses incoming IPSec ESP and AH packets - NPC vtag capture/strip hardware expect tag pointer to point to tpid/ethertype instead of tci. So move lb_ptr to point to tpid/ethertype. - Fix npc parser error when parsing udp packets that don't have any payload. - For a single MCAM entry to match on packets with one or stacked vlan tags combine NPC_LT_LB_STAG and NPC_LT_LB_QINQ to NPC_LT_LB_STAG_QINQ. - NVGRE to have a separate ltype LD_NVGRE instead of combined with LD_GRE. - Reserve top LD/LTYPEs to support custom KPU profile fields. Signed-off-by: Hao Zheng Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit c6614738a89ce7feea70bdc89c74953d007b1a2f Author: Subbaraya Sundeep Date: Thu Nov 14 10:56:25 2019 +0530 octeontx2-af: Add macro to generate mbox handlers declarations For every mailbox handler added to rvu, we are adding a function declaration in rvu header file. Cleaned this up by adding a macro to generate these declarations automatically. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit fdb9029814825c3055c104c630fc5958ff441668 Author: Geetha sowjanya Date: Thu Nov 14 10:56:24 2019 +0530 octeontx2-af: Sync hw mbox with bounce buffer. If mailbox client has a bounce buffer or a intermediate buffer where mbox messages are framed then copy them from there to HW buffer. If 'mbase' and 'hw_mbase' are not same then assume 'mbase' points to bounce buffer. This patch also adds msg_size field to mbox header to copy only valid data instead of whole buffer. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit a36740f614d3875708cc7a72779924d4f1d8730d Author: Sunil Goutham Date: Thu Nov 14 10:56:23 2019 +0530 octeontx2-af: Add mbox API to validate all responses Added a new mailbox API which goes through all responses to check their IDs and response codes. Also added logic to prevent queuing multiple works to process the same mailbox message. This scenario happens when AF is processing a PF's request and menawhile PF sends ACK to AF sent UP message, then mbox_hdr->num_msgs in the PF->AF DOWN mbox region will be nonzero and AF will end up processing PF's request again. This is fixed by taking a backup of num_msgs counter and clearing the same in the mbox region before scheduling work. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit e07fb507aeb1f1552abfa352801eddab1bd1999d Author: Sunil Goutham Date: Thu Nov 14 10:56:22 2019 +0530 octeontx2-af: Add NPC MCAM entry allocation status to debugfs Added support to display current NPC MCAM entries and counter's allocation status ín debugfs. cat /sys/kernel/debug/octeontx2/npc/mcam_info' will dump following info - MCAM Rx and Tx keysize - Total MCAM entries and counters - Current available count - Count of number of MCAM entries and counters allocated by a RVU PF/VF device. Also, one NPC MCAM counter (last one) is reserved and mapped to NPC RX_INTF's MISS_ACTION to count dropped packets due to no MCAM entry match. This pkt drop counter can be checked via debugfs. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit f967488d095ef30d62771a84d86211b44825a743 Author: Linu Cherian Date: Thu Nov 14 10:56:21 2019 +0530 octeontx2-af: Add per CGX port level NIX Rx/Tx counters A CGX port is shared by a RVU PF and it's VFs. These per CGX port level NIX Rx/Tx counters are cumilative stats of all NIXLFs sharing this port. These stats when compared to CGX Rx/Tx stats helps in identifying pkts dropped within the system, if any. Signed-off-by: Linu Cherian Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit c57211b53682c6681d94137f6733dff3e6ea317e Author: Prakash Brahmajyosyula Date: Thu Nov 14 10:56:20 2019 +0530 octeontx2-af: Add CGX LMAC stats to debugfs This patch adds CGX LMAC physical interface or serdes Rx/Tx packet stats to debugfs. 'cat cgx/lmac/stats' dumps the current interface link status and Rx/Tx stats. Stats include pkt received/transmitted, dropped, pause frames etc etc. Signed-off-by: Prakash Brahmajyosyula Signed-off-by: Linu Cherian Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit c5a797e081dad713fd3b23a660c80a77d1d5583e Author: Prakash Brahmajyosyula Date: Thu Nov 14 10:56:19 2019 +0530 octeontx2-af: Add NDC block stats to debugfs. NDC is a data cache unit which caches NPA and NIX block's aura/pool/RQ/SQ/CQ/etc contexts to reduce number of costly DRAM accesses. This patch adds support to dump cache's performance stats like cache line hit/miss counters, average cycles taken for accessing cached and non-cached data. This will help in checking if NPA/NIX context reads/writes are having NDC cache misses which inturn might effect performance. Also changed NDC enums to reflect correct NDC hardware instance. Signed-off-by: Prakash Brahmajyosyula Signed-off-by: Linu Cherian Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 02e202c3d15e1f6363ab3df5685ed7b2630e77a4 Author: Prakash Brahmajyosyula Date: Thu Nov 14 10:56:18 2019 +0530 octeontx2-af: Add NIX RQ, SQ and CQ contexts to debugfs To aid in debugging NIX block related issues, added support to dump NIX block LF's RQ, SQ and CQ hardware contexts in debugfs. User can check which contexts are enabled currently and dump it's current HW context. Four new files 'qsize', 'rq_ctx', 'sq_ctx' and 'cq_ctx' are added to the debugfs at 'sys/kernel/debug/octeontx2/nix/' 'echo > qsize' will display current enabled CQ/SQ/RQs. 'echo [rq number/all] > rq_ctx', 'echo [sq number/all] > sq_ctx' & 'echo [cq number/all] > cq_ctx' will dump RQ/SQ/CQ's current hardware context. Signed-off-by: Prakash Brahmajyosyula Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 8756828a81485f7b28b588adbf0bac9bf6fc6651 Author: Christina Jacob Date: Thu Nov 14 10:56:17 2019 +0530 octeontx2-af: Add NPA aura and pool contexts to debugfs To aid in debugging NPA related issues, added support to dump NPA (pool allocator) block LF's aura and pool hardware contexts in debugfs. User can check which contexts are enabled currently and dump it's current HW context. Three new files 'qsize', 'aura_ctx', 'pool_ctx' are added to the debugfs at 'sys/kernel/debug/octeontx2/npa/' 'echo > qsize' will display current enabled Aura/Pools. 'echo [aura number/all] > aura_ctx' & 'echo [aura number/all] > pool_ctx' will dump Aura/Pool context info. Signed-off-by: Christina Jacob Signed-off-by: Prakash Brahmajyosyula Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 23205e6d06d42a8e1c73e4a865b4d0a791814f22 Author: Christina Jacob Date: Thu Nov 14 10:56:16 2019 +0530 octeontx2-af: Dump current resource provisioning status Added support to dump current resource provisioning status of all resource virtualization unit (RVU) block's (i.e NPA, NIX, SSO, SSOW, CPT, TIM) local functions attached to a PF_FUNC into a debugfs file. 'cat /sys/kernel/debug/octeontx2/rsrc_alloc' will show the current block LF's allocation status. Signed-off-by: Christina Jacob Signed-off-by: Prakash Brahmajyosyula Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 26e77708fdc20ec6c24759602640ac42b8e4e88a Author: Saravana Kannan Date: Thu Nov 14 14:56:45 2019 -0800 driver core: Allow device link operations inside sync_state() Some sync_state() implementations might need to call APIs that in turn make calls to device link APIs. So, do the sync_state() callbacks without holding the device link lock. Signed-off-by: Saravana Kannan Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20191114225646.251277-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit b37fa92e20ef28aada852cbf03b368d29a20478c Author: Lorenzo Bianconi Date: Thu Nov 14 01:25:55 2019 +0200 net: mvneta: fix build skb for bm capable devices Fix build_skb for bm capable devices when they fall-back using swbm path (e.g. when bm properties are configured in device tree but CONFIG_MVNETA_BM_ENABLE is not set). In this case rx_offset_correction is overwritten so we need to use it building skb instead of MVNETA_SKB_HEADROOM directly Fixes: 8dc9a0888f4c ("net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine") Fixes: 0db51da7a8e9 ("net: mvneta: add basic XDP support") Signed-off-by: Lorenzo Bianconi Reported-by: Andrew Lunn Tested-by: Andrew Lunn Signed-off-by: David S. Miller commit f97d139aaafdc20145ad6a6b8d188ac8e58b5413 Merge: d0db136ffb59 84179981317f Author: David S. Miller Date: Thu Nov 14 18:01:45 2019 -0800 Merge tag 'mlx5-updates-2019-11-12' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2019-11-12 1) Merge mlx5-next for devlink reload and flowtable offloads dependencies 2) Devlink reload support 3) TC Flowtable offloads 4) Misc cleanup ==================== Signed-off-by: David S. Miller commit d0db136ffb59bfb8d66b45dba277191db6914f49 Author: Heiner Kallweit Date: Wed Nov 13 23:03:26 2019 +0100 r8169: use r8168d_modify_extpage in rtl8168f_config_eee_phy Use r8168d_modify_extpage() also in rtl8168f_config_eee_phy() to simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 6f2275433a2f4ce5161dbd8a8b24b379d90bc150 Author: Cris Forno Date: Wed Nov 13 15:06:16 2019 -0600 ibmveth: Detect unsupported packets before sending to the hypervisor Currently, when ibmveth receive a loopback packet, it reports an ambiguous error message "tx: h_send_logical_lan failed with rc=-4" because the hypervisor rejects those types of packets. This fix detects loopback packet and assures the source packet's MAC address matches the driver's MAC address before transmitting to the hypervisor. Signed-off-by: Cris Forno Signed-off-by: David S. Miller commit f46e47f84a87668107e3fd27afb4951d2d5f1a3e Author: Chunyan Zhang Date: Mon Nov 11 17:02:28 2019 +0800 dt-bindings: arm: Add bindings for Unisoc SC9863A Added bindings for Unisoc SC9863A board and SC9863A SoC. Signed-off-by: Chunyan Zhang Signed-off-by: Rob Herring commit cc691344dbb0a2687356cc4f0593e24d03752c39 Author: Chunyan Zhang Date: Mon Nov 11 17:02:26 2019 +0800 dt-bindings: arm: Convert sprd board/soc bindings to json-schema Convert Unisoc (formerly Spreadtrum) SoC bindings to DT schema format using json-schema. Signed-off-by: Chunyan Zhang [robh: dual license GPL/BSD] Signed-off-by: Rob Herring commit 01db923e83779bf39b15e258a58eb1d0c5167f56 Author: Dan Murphy Date: Wed Nov 13 10:42:26 2019 -0600 net: phy: dp83869: Add TI dp83869 phy Add support for the TI DP83869 Gigabit ethernet phy device. The DP83869 is a robust, low power, fully featured Physical Layer transceiver with integrated PMD sublayers to support 10BASE-T, 100BASE-TX and 1000BASE-T Ethernet protocols. Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit 4d66c56f7efe122d09d06cd3ebfa52a43d51a9cb Author: Dan Murphy Date: Wed Nov 13 10:42:25 2019 -0600 dt-bindings: net: dp83869: Add TI dp83869 phy Add dt bindings for the TI dp83869 Gigabit ethernet phy device. Signed-off-by: Dan Murphy CC: Rob Herring Signed-off-by: David S. Miller commit bd1903b7c4596ba6f7677d0dfefd05ba5876707d Author: Tonghao Zhang Date: Wed Nov 13 23:04:49 2019 +0800 net: openvswitch: add hash info to upcall When using the kernel datapath, the upcall don't include skb hash info relatived. That will introduce some problem, because the hash of skb is important in kernel stack. For example, VXLAN module uses it to select UDP src port. The tx queue selection may also use the hash in stack. Hash is computed in different ways. Hash is random for a TCP socket, and hash may be computed in hardware, or software stack. Recalculation hash is not easy. Hash of TCP socket is computed: tcp_v4_connect -> sk_set_txhash (is random) __tcp_transmit_skb -> skb_set_hash_from_sk There will be one upcall, without information of skb hash, to ovs-vswitchd, for the first packet of a TCP session. The rest packets will be processed in Open vSwitch modules, hash kept. If this tcp session is forward to VXLAN module, then the UDP src port of first tcp packet is different from rest packets. TCP packets may come from the host or dockers, to Open vSwitch. To fix it, we store the hash info to upcall, and restore hash when packets sent back. +---------------+ +-------------------------+ | Docker/VMs | | ovs-vswitchd | +----+----------+ +-+--------------------+--+ | ^ | | | | | | upcall v restore packet hash (not recalculate) | +-+--------------------+--+ | tap netdev | | vxlan module +---------------> +--> Open vSwitch ko +--> or internal type | | +-------------------------+ Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2019-October/364062.html Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit f4c2d372b89a1e504ebb7b7eb3e29b8306479366 Author: Jan Kara Date: Fri Nov 8 12:45:11 2019 +0100 ext4: fix leak of quota reservations Commit 8fcc3a580651 ("ext4: rework reserved cluster accounting when invalidating pages") moved freeing of delayed allocation reservations from dirty page invalidation time to time when we evict corresponding status extent from extent status tree. For inodes which don't have any blocks allocated this may actually happen only in ext4_clear_blocks() which is after we've dropped references to quota structures from the inode. Thus reservation of quota leaked. Fix the problem by clearing quota information from the inode only after evicting extent status tree in ext4_clear_inode(). Link: https://lore.kernel.org/r/20191108115420.GI20863@quack2.suse.cz Reported-by: Konstantin Khlebnikov Fixes: 8fcc3a580651 ("ext4: rework reserved cluster accounting when invalidating pages") Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o commit 85f6a17f24f9f7faa4aaecf98e12acdd312aa4c9 Author: Rafael J. Wysocki Date: Wed Nov 13 01:10:13 2019 +0100 cpuidle: teo: Avoid code duplication in conditionals There are three places in teo_select() where a given amount of time is compared with TICK_NSEC if tick_nohz_tick_stopped() returns true, which is a bit of duplicated code. Avoid that code duplication by defining a helper function to do the check and using it in all of the places in question. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 7cf2cba43f15c74bac46dc5f0326805d25ef514d Author: Bjorn Helgaas Date: Fri Sep 6 18:36:06 2019 -0500 PCI: Unify ACS quirk desired vs provided checking Most of the ACS quirks have a similar pattern of: acs_flags &= ~( ); return acs_flags ? 0 : 1; Pull this out into a helper function to simplify the quirks slightly. The helper function is also a convenient place for comments about what the list of ACS controls means. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe Reviewed-by: Alex Williamson commit c8de8ed2dcaac82e5d76d467dc0b02e0ee79809b Author: Bjorn Helgaas Date: Thu Sep 5 17:54:42 2019 -0500 PCI: Make ACS quirk implementations more uniform The ACS quirks differ in needless ways, which makes them look more different than they really are. Reorder the ACS flags in order of definitions in the spec: PCI_ACS_SV Source Validation PCI_ACS_TB Translation Blocking PCI_ACS_RR P2P Request Redirect PCI_ACS_CR P2P Completion Redirect PCI_ACS_UF Upstream Forwarding PCI_ACS_EC P2P Egress Control PCI_ACS_DT Direct Translated P2P (PCIe r5.0, sec 7.7.8.2) and use similar code structure in all. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe Reviewed-by: Alex Williamson commit 839554b76e9fd07c73b255f1777ddfce6e801ea4 Merge: abfb228ae642 8d66a8183d0c Author: David S. Miller Date: Thu Nov 14 15:13:28 2019 -0800 Merge branch 'Rework-mt762x-GDM-setup-flow' MarkLee says: ==================== Rework mt762x GDM setup flow The mt762x GDM block is mainly used to setup the HW internal rx path from GMAC to RX DMA engine(PDMA) and the packet switching engine(PSE) is responsed to do the data forward following the GDM configuration. This patch set have three goals : 1. Integrate GDM/PSE setup operations into single function "mtk_gdm_config" 2. Refine the timing of GDM/PSE setup, move it from mtk_hw_init to mtk_open 3. Enable GDM GDMA_DROP_ALL mode to drop all packet during the stop operation ==================== Signed-off-by: David S. Miller commit 8d66a8183d0cc3a3667f9e179999736fad4519f3 Author: MarkLee Date: Wed Nov 13 10:38:44 2019 +0800 net: ethernet: mediatek: Enable GDM GDMA_DROP_ALL mode Enable GDM GDMA_DROP_ALL mode to drop all packet during the stop operation. This is recommended by the mt762x HW design to drop all packet from GMAC before stopping PDMA. Signed-off-by: MarkLee Signed-off-by: David S. Miller commit 5ac9eda060c74aaa399d0c3ddd6bc244c8e2de96 Author: MarkLee Date: Wed Nov 13 10:38:43 2019 +0800 net: ethernet: mediatek: Refine the timing of GDM/PSE setup Refine the timing of GDM/PSE setup, move it from mtk_hw_init to mtk_open. This is recommended by the mt762x HW design to do GDM/PSE setup only after PDMA has been started. We exclude mt7628 in mtk_gdm_config function since it is a old IP and there is no GDM/PSE block on it. Signed-off-by: MarkLee Signed-off-by: David S. Miller commit 8d3f4a95a626a2e111d5bf9813e71557f5567da3 Author: MarkLee Date: Wed Nov 13 10:38:42 2019 +0800 net: ethernet: mediatek: Integrate GDM/PSE setup operations Integrate GDM/PSE setup operations into single function "mtk_gdm_config" Signed-off-by: MarkLee Signed-off-by: David S. Miller commit abfb228ae64268991653a6e73eb203c759764075 Author: Vladimir Oltean Date: Wed Nov 13 00:16:41 2019 +0200 net: dsa: sja1105: Simplify reset handling We don't really need 10k species of reset. Remove everything except cold reset which is what is actually used. Too bad the hardware designers couldn't agree to use the same bit field for rev 1 and rev 2, so the (*reset_cmd) function pointer is there to stay. However let's simplify the prototype and give it a struct dsa_switch (we want to avoid forward-declarations of structures, in this case struct sja1105_private, wherever we can). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 0815ef3c019d280eb1b38e63ca7280f0f7db2bf8 Author: Eugene Syromiatnikov Date: Fri Sep 20 17:58:34 2019 +0200 drivers/md/raid5-ppl.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET As it is consistent with prefixes of other write life time hints. Signed-off-by: Eugene Syromiatnikov Signed-off-by: Song Liu commit f1934892bd76ec127af4dd1ed17b73bc29b944a8 Author: Eugene Syromiatnikov Date: Fri Sep 20 17:58:28 2019 +0200 drivers/md/raid5.c: use the new spelling of RWH_WRITE_LIFE_NOT_SET As it is consistent with prefixes of other write life time hints. Signed-off-by: Eugene Syromiatnikov Signed-off-by: Song Liu commit 1e1a76ed9a1c090e1ac030ed73612e5fe2262f2d Author: Olof Johansson Date: Sun Nov 10 18:25:23 2019 -0800 ext4: remove unused variable warning in parse_options() Commit c33fbe8f673c5 ("ext4: Enable blocksize < pagesize for dioread_nolock") removed the only user of 'sbi' outside of the ifdef, so it caused a new warning: fs/ext4/super.c:2068:23: warning: unused variable 'sbi' [-Wunused-variable] Fixes: c33fbe8f673c5 ("ext4: Enable blocksize < pagesize for dioread_nolock") Signed-off-by: Olof Johansson Link: https://lore.kernel.org/r/20191111022523.34256-1-olof@lixom.net Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani commit ccb689939280b9dfdedee8b8b45e616e42696609 Merge: 72c996099dc6 86db36a347b4 Author: David S. Miller Date: Thu Nov 14 14:50:35 2019 -0800 Merge branch 'PTP-clock-source-for-SJA1105-tc-taprio-offload' Vladimir Oltean says: ==================== PTP clock source for SJA1105 tc-taprio offload This series makes the IEEE 802.1Qbv egress scheduler of the sja1105 switch use a time reference that is synchronized to the network. This enables quite a few real Time Sensitive Networking use cases, since in this mode the switch can offer its clients a TDMA sort of access to the network, and guaranteed latency for frames that are properly scheduled based on the common PTP time. The driver needs to do a 2-part activity: - Program the gate control list into the static config and upload it over SPI to the switch (already supported) - Write the activation time of the scheduler (base-time) into the PTPSCHTM register, and set the PTPSTRTSCH bit. - Monitor the activation of the scheduler at the planned time and its health. Ok, 3 parts. The time-aware scheduler cannot be programmed to activate at a time in the past, and there is some logic to avoid that. PTPCLKCORP is one of those "black magic" registers that just need to be written to the length of the cycle. There is a 40-line long comment in the second patch which explains why. ==================== Signed-off-by: David S. Miller commit 86db36a347b4ea030ee3e6c73ce04e35e4732999 Author: Vladimir Oltean Date: Tue Nov 12 02:11:54 2019 +0200 net: dsa: sja1105: Implement state machine for TAS with PTP clock source Tested using the following bash script and the tc from iproute2-next: #!/bin/bash set -e -u -o pipefail NSEC_PER_SEC="1000000000" gatemask() { local tc_list="$1" local mask=0 for tc in ${tc_list}; do mask=$((${mask} | (1 << ${tc}))) done printf "%02x" ${mask} } if ! systemctl is-active --quiet ptp4l; then echo "Please start the ptp4l service" exit fi now=$(phc_ctl /dev/ptp1 get | gawk '/clock time is/ { print $5; }') # Phase-align the base time to the start of the next second. sec=$(echo "${now}" | gawk -F. '{ print $1; }') base_time="$(((${sec} + 1) * ${NSEC_PER_SEC}))" tc qdisc add dev swp5 parent root handle 100 taprio \ num_tc 8 \ map 0 1 2 3 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ base-time ${base_time} \ sched-entry S $(gatemask 7) 100000 \ sched-entry S $(gatemask "0 1 2 3 4 5 6") 400000 \ clockid CLOCK_TAI flags 2 The "state machine" is a workqueue invoked after each manipulation command on the PTP clock (reset, adjust time, set time, adjust frequency) which checks over the state of the time-aware scheduler. So it is not monitored periodically, only in reaction to a PTP command typically triggered from a userspace daemon (linuxptp). Otherwise there is no reason for things to go wrong. Now that the timecounter/cyclecounter has been replaced with hardware operations on the PTP clock, the TAS Kconfig now depends upon PTP and the standalone clocksource operating mode has been removed. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 41603d78b3626cf0da8aa562ecc2a276033db76c Author: Vladimir Oltean Date: Tue Nov 12 02:11:53 2019 +0200 net: dsa: sja1105: Make the PTP command read-write The PTPSTRTSCH and PTPSTOPSCH bits are actually readable and indicate whether the time-aware scheduler is running or not. We will be using that for monitoring the scheduler in the next patch, so refactor the PTP command API in order to allow that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d7495343228f30d8206e92dccfd1c41adcfa142d Author: Tejun Heo Date: Thu Nov 14 14:46:51 2019 -0800 cgroup: fix incorrect WARN_ON_ONCE() in cgroup_setup_root() 743210386c03 ("cgroup: use cgrp->kn->id as the cgroup ID") added WARN which triggers if cgroup_id(root_cgrp) is not 1. This is fine on 64bit ino archs but on 32bit archs cgroup ID is ((gen << 32) | ino) and gen starts at 1, so the root id is 0x1_0000_0001 instead of 1 always triggering the WARN. What we wanna make sure is that the ino part is 1. Fix it. Reported-by: Naresh Kamboju Fixes: 743210386c03 ("cgroup: use cgrp->kn->id as the cgroup ID") Signed-off-by: Tejun Heo commit 7f3fefeec2ce0d8f3598c53d6decca3a4fd5cdaf Author: Matti Vaittinen Date: Wed Nov 13 08:43:38 2019 +0200 of: property: Fix documentation for out values Property fetching functions which return number of successfully fetched properties should not state that out-values are only modified if 0 is returned. Fix this. Also, "pointer to return value" is slightly suboptimal phrase as "return value" commonly refers to value function returns (not via arguments). Rather use "pointer to found values". Signed-off-by: Matti Vaittinen Reviewed-by: Frank Rowand Signed-off-by: Rob Herring commit cc57d7daafc22edb53ee228f7afa5379f345f68c Author: Maxime Ripard Date: Mon Nov 11 14:35:00 2019 +0100 dt-bindings: Add syscon YAML description The syscon binding is a pretty loose one, with everyone having a bunch of vendor specific compatibles. In order to start the effort to describe them using YAML, let's create a binding that tolerates additional, not listed, compatibles. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit a2f12f80d27492ccfc73b9b7761fde7360d64759 Author: Benjamin Gaignard Date: Fri Nov 8 13:52:43 2019 +0100 dt-bindings: crypto: Convert stm32 CRYP bindings to json-schema Convert the STM32 CRYP binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 30f78c332e1282e954ed9c68f99fabd0193718f3 Author: Benjamin Gaignard Date: Fri Nov 8 13:52:42 2019 +0100 dt-bindings: crypto: Convert stm32 CRC bindings to json-schema Convert the STM32 CRC binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 56fb34d86e875dbb0d3e6a81c5d3d035db373031 Author: Benjamin Gaignard Date: Thu Nov 14 11:18:23 2019 +0100 dt-bindings: mfd: Convert stm32 timers bindings to json-schema Convert the STM32 timers binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 196624e192f8e767b06924e46495c56846b2b64e Author: Chandan Rajendra Date: Tue Oct 22 20:33:12 2019 -0700 ext4: Enable encryption for subpage-sized blocks Now that we have the code to support encryption for subpage-sized blocks, this commit removes the conditional check in filesystem mount code. The commit also changes the support statement in Documentation/filesystems/fscrypt.rst to reflect the fact that encryption on filesystems with blocksize less than page size now works. [EB: Tested with 'gce-xfstests -c ext4/encrypt_1k -g auto', using the new "encrypt_1k" config I created. All tests pass except for those that already fail or are excluded with the encrypt or 1k configs, and 2 tests that try to create 1023-byte symlinks which fails since encrypted symlinks are limited to blocksize-3 bytes. Also ran the dedicated encryption tests using 'kvm-xfstests -c ext4/1k -g encrypt'; all pass, including the on-disk ciphertext verification tests.] Signed-off-by: Chandan Rajendra Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191023033312.361355-3-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 31fb992ce675ec3326dfd4db9634480391713db8 Author: Eric Biggers Date: Tue Oct 22 20:33:11 2019 -0700 fs/buffer.c: support fscrypt in block_read_full_page() After each filesystem block (as represented by a buffer_head) has been read from disk by block_read_full_page(), decrypt it if needed. The decryption is done on the fscrypt_read_workqueue. This is the final change needed to support ext4 encryption with blocksize != PAGE_SIZE, and it's a fairly small change now that CONFIG_FS_ENCRYPTION is a bool and fs/crypto/ exposes functions to decrypt individual blocks and to enqueue work on the fscrypt workqueue. Don't try to add fs-verity support yet, as the fs/verity/ support layer isn't ready for sub-page blocks yet. Just add fscrypt support for now. Almost all the new code is compiled away when CONFIG_FS_ENCRYPTION=n. Cc: Chandan Rajendra Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191023033312.361355-2-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 73884a7082f466ce6686bb8dd7e6571dd42313b4 Author: Subbaraya Sundeep Date: Mon Nov 4 12:27:44 2019 +0530 PCI: Do not use bus number zero from EA capability As per PCIe r5.0, sec 7.8.5.2, fixed bus numbers of a bridge must be zero when no function that uses EA is located behind it. Hence, if EA supplies bus numbers of zero, assign bus numbers normally. A secondary bus can never have a bus number of zero, so setting a bridge's Secondary Bus Number to zero makes downstream devices unreachable. [bhelgaas: retain bool return value so "zero is invalid" logic is local] Fixes: 2dbce5901179 ("PCI: Assign bus numbers present in EA capability for bridges") Link: https://lore.kernel.org/r/1572850664-9861-1-git-send-email-sundeep.lkml@gmail.com Signed-off-by: Subbaraya Sundeep Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v5.2+ commit c13704f5685deb7d6eb21e293233e0901ed77377 Author: Nicholas Johnson Date: Wed Nov 13 15:25:28 2019 +0000 PCI: Avoid double hpmemsize MMIO window assignment Previously, the kernel sometimes assigned more MMIO or MMIO_PREF space than desired. For example, if the user requested 128M of space with "pci=realloc,hpmemsize=128M", we sometimes assigned 256M: pci 0000:06:01.0: BAR 14: assigned [mem 0x90100000-0xa00fffff] = 256M pci 0000:06:04.0: BAR 14: assigned [mem 0xa0200000-0xb01fffff] = 256M With this patch applied: pci 0000:06:01.0: BAR 14: assigned [mem 0x90100000-0x980fffff] = 128M pci 0000:06:04.0: BAR 14: assigned [mem 0x98200000-0xa01fffff] = 128M This happened when in the first pass, the MMIO_PREF succeeded but the MMIO failed. In the next pass, because MMIO_PREF was already assigned, the attempt to assign MMIO_PREF returned an error code instead of success (nothing more to do, already allocated). Hence, the size which was actually allocated, but thought to have failed, was placed in the MMIO window. The bug resulted in the MMIO_PREF being added to the MMIO window, which meant doubling if MMIO_PREF size = MMIO size. With a large MMIO_PREF, the MMIO window would likely fail to be assigned altogether due to lack of 32-bit address space. Change find_free_bus_resource() to do the following: - Return first unassigned resource of the correct type. - If there is none, return first assigned resource of the correct type. - If none of the above, return NULL. Returning an assigned resource of the correct type allows the caller to distinguish between already assigned and no resource of the correct type. Add checks in pbus_size_io() and pbus_size_mem() to return success if resource returned from find_free_bus_resource() is already allocated. This avoids pbus_size_io() and pbus_size_mem() returning error code to __pci_bus_size_bridges() when a resource has been successfully assigned in a previous pass. This fixes the existing behaviour where space for a resource could be reserved multiple times in different parent bridge windows. Link: https://lore.kernel.org/lkml/20190531171216.20532-2-logang@deltatee.com/T/#u Link: https://bugzilla.kernel.org/show_bug.cgi?id=203243 Link: https://lore.kernel.org/r/PS2P216MB075563AA6AD242AA666EDC6A80760@PS2P216MB0755.KORP216.PROD.OUTLOOK.COM Reported-by: Kit Chow Reported-by: Nicholas Johnson Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg Reviewed-by: Logan Gunthorpe commit 79e4be2c08bbbf2a43c2e8b4fb4fa7eb0273a704 Author: Peter Ujfalusi Date: Wed Nov 13 11:22:35 2019 +0200 i2c: tegra: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Acked-by: Jon Hunter Reviewed-by: Vinod Koul Signed-off-by: Wolfram Sang commit efa42b5e3ec76e401dc3f4d5ab3e0405cad9ac75 Author: Peter Ujfalusi Date: Wed Nov 13 11:22:34 2019 +0200 i2c: sh_mobile: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Reviewed-by: Vinod Koul Signed-off-by: Wolfram Sang commit 67d7630f0eae4547d8224a9f5c8b66dc69eb7e83 Author: Peter Ujfalusi Date: Wed Nov 13 11:22:33 2019 +0200 i2c: qup: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Reviewed-by: Vinod Koul Signed-off-by: Wolfram Sang commit a2b0e390d21a68fbb92eba53e9d16b6ca9c3c678 Author: Peter Ujfalusi Date: Wed Nov 13 11:22:32 2019 +0200 i2c: at91: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Acked-by: Ludovic Desroches Reviewed-by: Vinod Koul Signed-off-by: Wolfram Sang commit be8af7a9e3cce3cc4b7abbc8211dd06f8e72b976 Author: Stefan Wahren Date: Mon Nov 11 20:49:26 2019 +0100 ARM: dts: bcm2711-rpi-4: Enable GENET support This enables the Gigabit Ethernet support on the Raspberry Pi 4. The defined PHY mode is equivalent to the default register settings in the downstream tree. Signed-off-by: Matthias Brugger Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli Signed-off-by: Florian Fainelli commit d98a8dbdaec628f5c993cc711ba9ab98fe909f0f Author: Nicolas Saenz Julienne Date: Wed Nov 6 10:59:44 2019 +0100 ARM: dts: bcm2711: force CMA into first GB of memory arm64 places the CMA in ZONE_DMA32, which is not good enough for the Raspberry Pi 4 since it contains peripherals that can only address the first GB of memory. Explicitly place the CMA into that area. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Florian Fainelli commit c39511ffb99b14541dc7c82da0accc14266c9100 Author: Geert Uytterhoeven Date: Wed Nov 13 11:14:53 2019 +0100 i2c: rcar: Remove superfluous call to clk_get_rate() Variable "rate" already contains the current clock rate, so use that rather than calling clk_get_rate() again. Signed-off-by: Geert Uytterhoeven Reviewed-by: Luca Ceresoli Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang commit 993e21940684f989a62809790eff841b80d2eeb4 Merge: 7be5f90f689a 285be87c79e1 Author: Wolfram Sang Date: Thu Nov 14 21:27:00 2019 +0100 Merge tag 'at24-v5.5-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-5.5 at24: updates for v5.5 - print a proper log message for read-only EEPROMs commit eac406c61cd0ec8fe7970ca46ddf23e40a86b579 Author: Jens Axboe Date: Thu Nov 14 12:09:58 2019 -0700 io_uring: make POLL_ADD/POLL_REMOVE scale better One of the obvious use cases for these commands is networking, where it's not uncommon to have tons of sockets open and polled for. The current implementation uses a list for insertion and lookup, which works fine for file based use cases where the count is usually low, it breaks down somewhat for higher number of files / sockets. A test case with 30k sockets being polled for and cancelled takes: real 0m6.968s user 0m0.002s sys 0m6.936s with the patch it takes: real 0m0.233s user 0m0.010s sys 0m0.176s If you go to 50k sockets, it gets even more abysmal with the current code: real 0m40.602s user 0m0.010s sys 0m40.555s with the patch it takes: real 0m0.398s user 0m0.000s sys 0m0.341s Change is pretty straight forward, just replace the cancel_list with a red/black tree instead. Signed-off-by: Jens Axboe commit 60528afa78667baf5ffe8e57ccbe77cd024534c5 Author: Bob Peterson Date: Thu Nov 14 09:53:36 2019 -0500 gfs2: Don't loop forever in gfs2_freeze if withdrawn Before this patch, function gfs2_freeze would loop forever if the filesystem it tries to freeze is withdrawn. That's because function gfs2_lock_fs_check_clean tries to enqueue the glock of the journal and the gfs2_glock returns -EIO because you can't enqueue a journaled glock after a withdraw. Move the check for file system withdraw inside the loop so that the loop can end when withdraw occurs. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit f155f5e01090beb317698df00629b7af4e18df6b Author: Bob Peterson Date: Thu Nov 14 09:52:54 2019 -0500 gfs2: fix infinite loop in gfs2_ail1_flush on io error Before this patch, an IO error encountered in function gfs2_ail1_flush would cause a deadlock: because of the io error (and its resulting withdrawn state), buffers stopped being written to the journal. Buffers would remain on the ail1 list, so gfs2_ail1_start_one would return 1 to indicate dirty buffers were still on the ail1 list. However, when function gfs2_ail1_flush got a non-zero return code, it would goto restart to retry the writes, which meant it would never finish, and thus the infinite loop. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit eb43e660c094029fc1165e2641ce06c153129bdd Author: Bob Peterson Date: Thu Nov 14 09:52:15 2019 -0500 gfs2: Introduce function gfs2_withdrawn Add function gfs2_withdrawn and replace all checks for the SDF_WITHDRAWN bit to call it. This does not change the logic or function of gfs2, and it facilitates later improvements to the withdraw sequence. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 9b4712044d059e7842aaeeafd7c7a7ee88c589db Author: Borislav Petkov Date: Tue Nov 12 18:42:19 2019 +0100 tracing: Remove stray tab in TRACE_EVAL_MAP_FILE's help text There was a stray tab in the help text of the aforementioned config option which showed like this: The "print fmt" of the trace events will show the enum/sizeof names instead of their values. This can cause problems for user space tools ... in menuconfig. Remove it and end a sentence with a fullstop. No functional changes. Link: http://lkml.kernel.org/r/20191112174219.10933-1-bp@alien8.de Signed-off-by: Borislav Petkov Signed-off-by: Steven Rostedt (VMware) commit ef56e047b2bd4dabb801fd073dfcab5f40de5f78 Author: Piotr Maziarz Date: Thu Nov 7 13:45:38 2019 +0100 tracing: Use seq_buf_hex_dump() to dump buffers Without this, buffers can be printed with __print_array macro that has no formatting options and can be hard to read. The other way is to mimic formatting capability with multiple calls of trace event with one call per row which gives performance impact and different timestamp in each row. Link: http://lkml.kernel.org/r/1573130738-29390-2-git-send-email-piotrx.maziarz@linux.intel.com Signed-off-by: Piotr Maziarz Signed-off-by: Cezary Rojewski Signed-off-by: Steven Rostedt (VMware) commit 353cade3149c27b53260932ee3ff1ebde405976d Author: Piotr Maziarz Date: Thu Nov 7 13:45:37 2019 +0100 seq_buf: Add printing formatted hex dumps Provided function is an analogue of print_hex_dump(). Implementing this function in seq_buf allows using for multiple purposes (e.g. for tracing) and therefore prevents from code duplication in every layer that uses seq_buf. print_hex_dump() is an essential part of logging data to dmesg. Adding similar capability for other purposes is beneficial to all users. Example usage: seq_buf_hex_dump(seq, "", DUMP_PREFIX_OFFSET, 16, 4, buf, ARRAY_SIZE(buf), true); Example output: 00000000: 00000000 ffffff10 ffffff32 ffff3210 ........2....2.. 00000010: ffff3210 83d00437 c0700000 00000000 .2..7.....p..... 00000020: 02010004 0000000f 0000000f 00004002 .............@.. 00000030: 00000fff 00000000 ........ Link: http://lkml.kernel.org/r/1573130738-29390-1-git-send-email-piotrx.maziarz@linux.intel.com Signed-off-by: Piotr Maziarz Signed-off-by: Cezary Rojewski Signed-off-by: Steven Rostedt (VMware) commit c7411a1a126f649be71526a36d4afac9e5aefa13 Author: Masami Hiramatsu Date: Tue Oct 29 17:31:44 2019 +0900 tracing/kprobe: Check whether the non-suffixed symbol is notrace Check whether the non-suffixed symbol is notrace, since suffixed symbols are generated by the compilers for optimization. Based on these suffixed symbols, notrace check might not work because some of them are just a partial code of the original function. (e.g. cold-cache (unlikely) code is separated from original function as FUNCTION.cold.XX) For example, without this fix, # echo p device_add.cold.67 > /sys/kernel/debug/tracing/kprobe_events sh: write error: Invalid argument # cat /sys/kernel/debug/tracing/error_log [ 135.491035] trace_kprobe: error: Failed to register probe event Command: p device_add.cold.67 ^ # dmesg | tail -n 1 [ 135.488599] trace_kprobe: Could not probe notrace function device_add.cold.67 With this, # echo p device_add.cold.66 > /sys/kernel/debug/tracing/kprobe_events # cat /sys/kernel/debug/kprobes/list ffffffff81599de9 k device_add.cold.66+0x0 [DISABLED] Actually, kprobe blacklist already did similar thing, see within_kprobe_blacklist(). Link: http://lkml.kernel.org/r/157233790394.6706.18243942030937189679.stgit@devnote2 Fixes: 45408c4f9250 ("tracing: kprobes: Prohibit probing on notrace function") Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 6ee40511cb838f9ced002dff7131bca87e3ccbdd Author: Yuming Han Date: Thu Oct 24 11:34:30 2019 +0800 tracing: use kvcalloc for tgid_map array allocation Fail to allocate memory for tgid_map, because it requires order-6 page. detail as: c3 sh: page allocation failure: order:6, mode:0x140c0c0(GFP_KERNEL), nodemask=(null) c3 sh cpuset=/ mems_allowed=0 c3 CPU: 3 PID: 5632 Comm: sh Tainted: G W O 4.14.133+ #10 c3 Hardware name: Generic DT based system c3 Backtrace: c3 [] (dump_backtrace) from [](show_stack+0x18/0x1c) c3 [] (show_stack) from [](dump_stack+0x84/0xa4) c3 [] (dump_stack) from [](warn_alloc+0xc4/0x19c) c3 [] (warn_alloc) from [](__alloc_pages_nodemask+0xd18/0xf28) c3 [] (__alloc_pages_nodemask) from [](kmalloc_order+0x20/0x38) c3 [] (kmalloc_order) from [](kmalloc_order_trace+0x24/0x108) c3 [] (kmalloc_order_trace) from [](set_tracer_flag+0xb0/0x158) c3 [] (set_tracer_flag) from [](trace_options_core_write+0x7c/0xcc) c3 [] (trace_options_core_write) from [](__vfs_write+0x40/0x14c) c3 [] (__vfs_write) from [](vfs_write+0xc4/0x198) c3 [] (vfs_write) from [](SyS_write+0x6c/0xd0) c3 [] (SyS_write) from [](ret_fast_syscall+0x0/0x54) Switch to use kvcalloc to avoid unexpected allocation failures. Link: http://lkml.kernel.org/r/1571888070-24425-1-git-send-email-chunyan.zhang@unisoc.com Signed-off-by: Yuming Han Signed-off-by: Chunyan Zhang Signed-off-by: Steven Rostedt (VMware) commit 0c3c86bdc691c794a6154f8515b7fa82c82dfc4d Author: Srivatsa S. Bhat (VMware) Date: Thu Oct 10 11:51:17 2019 -0700 tracing/hwlat: Fix a few trivial nits Update the source file name in the comments, and fix a grammatical error. Link: http://lkml.kernel.org/r/157073346821.17189.8946944856026592247.stgit@srivatsa-ubuntu Signed-off-by: Srivatsa S. Bhat (VMware) Signed-off-by: Steven Rostedt (VMware) commit 80042c8f06bf5a7b87a63deaa3deb56f2cd52645 Author: Andy Shevchenko Date: Mon Oct 7 16:56:56 2019 +0300 tracing: Use generic type for comparator function Comparator function type, cmp_func_t, is defined in the types.h, use it in the code. Link: http://lkml.kernel.org/r/20191007135656.37734-3-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Steven Rostedt (VMware) commit e8877ec5dbba6f39d25ca3a81716c23b1760f2ee Author: Andy Shevchenko Date: Mon Oct 7 16:56:55 2019 +0300 lib/bsearch: Use generic type for comparator function Comparator function type, cmp_func_t, is defined in the types.h, use it in bsearch() and, thus, add more sense to the corresponding comment in the code. Link: http://lkml.kernel.org/r/20191007135656.37734-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Steven Rostedt (VMware) commit 52ae533b8a18e7ca868e7ac5953ad7258210f320 Author: Andy Shevchenko Date: Mon Oct 7 16:56:54 2019 +0300 lib/sort: Move swap, cmp and cmp_r function types for wider use The function types for swap, cmp and cmp_r functions are already being in use by modules. Move them to types.h that everybody in kernel will be able to use generic types instead of custom ones. This adds more sense to the comment in bsearch() later on. Link: http://lkml.kernel.org/r/20191007135656.37734-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Steven Rostedt (VMware) commit b43e78f65b1d35fd3e13c7b23f9b64ea83c9ad3a Author: Steven Rostedt (VMware) Date: Wed Nov 13 11:48:39 2019 -0500 tracing/selftests: Turn off timeout setting As the ftrace selftests can run for a long period of time, disable the timeout that the general selftests have. If a selftest hangs, then it probably means the machine will hang too. Link: https://lore.kernel.org/r/alpine.LSU.2.21.1911131604170.18679@pobox.suse.cz Suggested-by: Miroslav Benes Tested-by: Miroslav Benes Reviewed-by: Miroslav Benes Signed-off-by: Steven Rostedt (VMware) commit b83b43ffc6e4b514ca034a0fbdee01322e2f7022 Author: Steven Rostedt (VMware) Date: Tue Oct 15 09:00:55 2019 -0400 fgraph: Fix function type mismatches of ftrace_graph_return using ftrace_stub The C compiler is allowing more checks to make sure that function pointers are assigned to the correct prototype function. Unfortunately, the function graph tracer uses a special name with its assigned ftrace_graph_return function pointer that maps to a stub function used by the function tracer (ftrace_stub). The ftrace_graph_return variable is compared to the ftrace_stub in some archs to know if the function graph tracer is enabled or not. This means we can not just simply create a new function stub that compares it without modifying all the archs. Instead, have the linker script create a function_graph_stub that maps to ftrace_stub, and this way we can define the prototype for it to match the prototype of ftrace_graph_return, and make the compiler checks all happy! Link: http://lkml.kernel.org/r/20191015090055.789a0aed@gandalf.local.home Cc: linux-sh@vger.kernel.org Cc: Yoshinori Sato Cc: Rich Felker Reported-by: Sami Tolvanen Signed-off-by: Steven Rostedt (VMware) commit c1a1f273d0825774c80896b8deb1c9ea1d0b91e3 Author: Fabio D'Urso Date: Thu Nov 14 01:30:53 2019 +0000 USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P This device presents itself as a USB hub with three attached devices: - An ACM serial port connected to the GPS module (not affected by this commit) - An FTDI serial port connected to the GPS module (1546:0502) - Another FTDI serial port connected to the ODIN-W2 radio module (1546:0503) This commit registers U-Blox's VID and the PIDs of the second and third devices. Datasheet: https://www.u-blox.com/sites/default/files/C099-F9P-AppBoard-Mbed-OS3-FW_UserGuide_%28UBX-18063024%29.pdf Signed-off-by: Fabio D'Urso Cc: stable Signed-off-by: Johan Hovold commit 9eff303725da6530b615e9258f696149baa51df6 Author: Borislav Petkov Date: Thu Nov 14 16:11:50 2019 +0100 x86/crash: Align function arguments on opening braces ... or let function calls stick out and thus remain on a single line, even if the 80 cols rule is violated by a couple of chars, for better readability. No functional changes. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20191114172200.19563-1-bp@alien8.de commit 7c321eb2b843bf25946100b7e2de4054f71ec068 Author: Lianbo Jiang Date: Fri Nov 8 17:00:26 2019 +0800 x86/kdump: Remove the backup region handling When the crashkernel kernel command line option is specified, the low 1M memory will always be reserved now. Therefore, it's not necessary to create a backup region anymore and also no need to copy the contents of the first 640k to it. Remove all the code related to handling that backup region. [ bp: Massage commit message. ] Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: bhe@redhat.com Cc: Dave Young Cc: d.hatayama@fujitsu.com Cc: dhowells@redhat.com Cc: ebiederm@xmission.com Cc: horms@verge.net.au Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jürgen Gross Cc: kexec@lists.infradead.org Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Cc: vgoyal@redhat.com Cc: x86-ml Link: https://lkml.kernel.org/r/20191108090027.11082-3-lijiang@redhat.com commit cb6cfe2eaed171b5a2e575fa3f0cf0924b5bd1d2 Author: Markus Elfring Date: Wed Nov 6 19:12:30 2019 +0100 bus: ti-sysc: Adjust exception handling in sysc_child_add_named_clock() Add a jump target so that a call of the function “clk_put” can be better reused at the end of this function. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren commit f35ef592477c5347b8f780a5f0d4970671e22c61 Author: Takashi Iwai Date: Thu Nov 14 17:56:13 2019 +0100 ALSA: usb-audio: Add skip_validation option The unit descriptor validation may lead to a probe error when the device provides a buggy descriptor or the validator detected incorrectly. For identifying such an error and band-aiding, give a new module option, skip_validation. With this option, the driver ignores the validation errors with the hexdump of the unit descriptor, so we can check it in a bit more details. Link: https://lore.kernel.org/r/20191114165613.7422-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit cb45722b289b54476b68883985c2824c69a7fba9 Author: Takashi Iwai Date: Mon Nov 11 20:09:37 2019 +0100 ALSA: hda/hdmi - Clean up Intel platform-specific fixup checks Introduce a new flag in hdmi_spec to indicate the Intel platform- specific fixups so that we can get rid of the lengthy codec ID checks. The flag is set in intel_hsw_common_init() commonly. Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20191111190937.19186-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit b12b2259bc4c1e0b34d4adb5c0e41b23761a5c08 Merge: 509526706e68 976a68f06b2e Author: Takashi Iwai Date: Thu Nov 14 18:01:52 2019 +0100 Merge branch 'for-linus' into for-next Signed-off-by: Takashi Iwai commit 1706df19f5f0fb8b917709c2a83651cd71994382 Author: Adam Ford Date: Wed Nov 13 06:05:57 2019 -0600 ARM: dts: logicpd-torpedo: Remove unnecessary notes/comments There used to be a bug in the video driver that caused the timings for the LCD to calculate in a way on the DM3730 which made it hang. The work around for this bug was to set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 in the kernel. This work around is no longer needed as the video drivers have been corrected. This patch removes the legacy note. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit a3e633d661fd734956e26bf36800a6dd0dc00710 Author: Adam Ford Date: Tue Nov 12 11:11:56 2019 -0600 ARM: dts: logicpd-torpedo-baseboard: Enable HDQ The baseboard of the Logic PD Torpedo development kit has a socket for a rechargable battery. The battery is monitored by a charger which can communicate of the the 1-wire HDQ pin. This patch enables the pinmux for the HDQ pin. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 93512dad334deb444619505f1fbb761156f7471b Author: Rob Herring Date: Wed Nov 13 09:46:19 2019 -0600 dt-bindings: Improve validation build error handling Schema errors can cause make to exit before useful information is printed. This leaves developers wondering what's wrong. It can be overcome passing '-k' to make, but that's not an obvious solution. There's 2 scenarios where this happens. When using DT_SCHEMA_FILES to validate with a single schema, any error in the schema results in processed-schema.yaml being empty causing a make error. The result is the specific errors in the schema are never shown because processed-schema.yaml is the first target built. Simply making processed-schema.yaml last in extra-y ensures the full schema validation with detailed error messages happen first. The 2nd problem is while schema errors are ignored for processed-schema.yaml, full validation of the schema still runs in parallel and any schema validation errors will still stop the build when running validation of dts files. The fix is to not add the schema examples to extra-y in this case. This means 'dtbs_check' is no longer a superset of 'dt_binding_check'. Update the documentation to make this clear. Cc: Masahiro Yamada Tested-by: Jeffrey Hugo Signed-off-by: Rob Herring commit abb4805e343a1b24706fe1ad21246ed5ecbdac74 Author: Krzysztof Kozlowski Date: Wed Oct 30 18:32:16 2019 +0100 dt-bindings: power: Convert Samsung Exynos Power Domain bindings to json-schema Convert Samsung Exynos Soc Power Domain bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 5279a3d8bedea477eaaaddedc3dd5fa62b86cfd7 Author: Krzysztof Kozlowski Date: Wed Oct 30 18:32:15 2019 +0100 dt-bindings: power: Convert Generic Power Domain bindings to json-schema Convert Generic Power Domain bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Ulf Hansson Acked-by: Stephen Boyd Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 37238d3dd584dc4ce87d844681b89ef58f8200ea Author: Tony Lindgren Date: Wed Nov 13 09:37:49 2019 -0800 ARM: OMAP2+: Drop useless gptimer option for omap4 We have local timers on Cortex-A9, so using the gptimer option makes no sense. Let's just drop it for omap4 to simplify the timer options a bit. If this is really needed, it can be still done by specifying dts properties in the board specific file for assigned-clocks and assigned-clock-parents. This gets us a bit closer to start dropping legacy platform data for gptimers except for timer1 that is used for system clockevent. Cc: Keerthy Cc: Tero Kristo Signed-off-by: Tony Lindgren commit 020003f763e24e4ed0bb3d8909f3940891536d5d Author: Tony Lindgren Date: Thu Nov 14 08:25:28 2019 -0800 bus: ti-sysc: Add module enable quirk for audio AESS We must set the autogating bit on enable for AESS (Audio Engine SubSystem) when probed with ti-sysc interconnect target module driver. Otherwise it won't idle properly. Cc: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 7283fff8b524b2f27438429aca458b232f5c5c8a Author: Christoph Hellwig Date: Wed Nov 13 08:32:13 2019 +0100 dma-mapping: remove the DMA_ATTR_WRITE_BARRIER flag This flag is not implemented by any backend and only set by the ib_umem module in a single instance. Link: https://lore.kernel.org/r/20191113073214.9514-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 64c264872b8879e2ab9017eefe9514d4c045c60e Author: Gal Pressman Date: Tue Nov 12 11:26:08 2019 +0200 RDMA/efa: Clear the admin command buffer prior to its submission We cannot rely on the entry memcpy as we only copy the actual size of the command, the rest of the bytes must be memset to zero. Currently providing non-zero memory will not have any user visible impact. However, since admin commands are extendable (in a backwards compatible way) everything beyond the size of the command must be cleared to prevent issues in the future. Fixes: 0420e542569b ("RDMA/efa: Implement functions that submit and complete admin commands") Link: https://lore.kernel.org/r/20191112092608.46964-1-galpress@amazon.com Reviewed-by: Daniel Kranzdorf Reviewed-by: Firas JahJah Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 289b20b2a5f900dd759300ffe765a2d078296432 Author: Bernard Metzler Date: Wed Nov 13 16:34:04 2019 +0100 RDMA/siw: Cleanup unused mmap structures. Removes obsolete driver specific mmap information after generalization of RDMA driver mmap service. Also removes useless forward declaration of struct siw_mr. Fixes: 11f1a75567c4 ("RDMA/siw: Use the common mmap_xa helpers") Link: https://lore.kernel.org/r/20191113153404.7402-1-bmt@zurich.ibm.com Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit 9a5407d74c22821f7944e2be4209bdfc5faf8143 Author: Kamal Heib Date: Sun Nov 10 13:36:45 2019 +0200 RDMA/qedr: Make qedr_iw_load_qp() static The function qedr_iw_load_qp() is only used in qedr_iw_cm.c Fixes: 82af6d19d8d9 ("RDMA/qedr: Fix synchronization methods and memory leaks in qedr") Link: https://lore.kernel.org/r/20191110113645.20058-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Acked-by: Michal Kalderon  Signed-off-by: Jason Gunthorpe commit 6296665cee88a76a875ddcd7031bb1633b4adac8 Author: Colin Ian King Date: Thu Nov 7 22:48:55 2019 +0000 RDMA/ocrdma: Fix spelling mistake in variable name There is a spelling mistake in the variable nak_invalid_requst_errors, rename it to nak_invalid_request_errors. Link: https://lore.kernel.org/r/20191107224855.417647-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit fe5e7ba11fcf1d75af8173836309e8562aefedef Author: Bob Peterson Date: Thu Nov 14 09:49:11 2019 -0500 gfs2: fix glock reference problem in gfs2_trans_remove_revoke Commit 9287c6452d2b fixed a situation in which gfs2 could use a glock after it had been freed. To do that, it temporarily added a new glock reference by calling gfs2_glock_hold in function gfs2_add_revoke. However, if the bd element was removed by gfs2_trans_remove_revoke, it failed to drop the additional reference. This patch adds logic to gfs2_trans_remove_revoke to properly drop the additional glock reference. Fixes: 9287c6452d2b ("gfs2: Fix occasional glock use-after-free") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit feed98a8e5f3e54a8c41a3b26aa914db5d7e3c18 Author: Bob Peterson Date: Thu Nov 14 09:48:26 2019 -0500 gfs2: make gfs2_log_shutdown static Function gfs2_log_shutdown is only called from within log.c. This patch removes the extern declaration and makes it static. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 7ee23491b39259ae83899dd93b2a29ef0f22f0a7 Author: Viresh Kumar Date: Thu Nov 7 08:50:25 2019 +0530 RDMA/qib: Validate ->show()/store() callbacks before calling them The permissions of the read-only or write-only sysfs files can be changed (as root) and the user can then try to read a write-only file or write to a read-only file which will lead to kernel crash here. Protect against that by always validating the show/store callbacks. Link: https://lore.kernel.org/r/d45cc26361a174ae12dbb86c994ef334d257924b.1573096807.git.viresh.kumar@linaro.org Signed-off-by: Viresh Kumar Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jason Gunthorpe commit da046d5f895fca18d63b15ac8faebd5bf784e23a Author: Pan Bian Date: Wed Nov 6 14:44:11 2019 +0800 RDMA/i40iw: Fix potential use after free Release variable dst after logging dst->error to avoid possible use after free. Link: https://lore.kernel.org/r/1573022651-37171-1-git-send-email-bianpan2016@163.com Signed-off-by: Pan Bian Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 960657b732e1ce21b07be5ab48a7ad3913d72ba4 Author: Pan Bian Date: Wed Nov 6 14:23:54 2019 +0800 RDMA/qedr: Fix potential use after free Move the release operation after error log to avoid possible use after free. Link: https://lore.kernel.org/r/1573021434-18768-1-git-send-email-bianpan2016@163.com Signed-off-by: Pan Bian Acked-by: Michal Kalderon  Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 6ca228d1c5b98ce6b274c27225a522732263acde Merge: c2a93d75c0e2 fed23c5829ec Author: Ulf Hansson Date: Thu Nov 14 16:29:31 2019 +0100 Merge branch 'fixes' into next commit c2a93d75c0e25d3191d3f150a0a2f16b6ab4c81a Author: Peter Ujfalusi Date: Wed Nov 13 11:36:16 2019 +0200 mmc: moxart: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Reviewed-by: Vinod Koul Signed-off-by: Ulf Hansson commit 5503301f0e564a02096d05c7919111c18c731b8a Author: Peter Ujfalusi Date: Wed Nov 13 11:36:15 2019 +0200 mmc: atmel-mci: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Acked-by: Ludovic Desroches Reviewed-by: Vinod Koul Signed-off-by: Ulf Hansson commit 62c517256ef2e79e0660fc9181a8cf9c1cde57a0 Author: Thierry Reding Date: Fri Nov 8 17:09:00 2019 +0100 mmc: mmc_spi: Use proper debounce time for CD GPIO According to the comment, board files used to specify 1 ms for the debounce time. gpiod_set_debounce() needs the debounce time to be specified in units of microseconds, so make sure to multiply the value by 1000. Note that, according to the git log, the board files actually did specify 1 us for bounce times, but that seems really low. Device tree bindings for this type of GPIO typically specify the debounce times in milliseconds, so setting this default value to 1 ms seems like it would be somewhat safer. Signed-off-by: Thierry Reding Acked-by: Pavel Machek Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson commit d5cf1a591a37df797e8529d5188c845368460b48 Author: Peng Fan Date: Tue Nov 5 10:23:36 2019 +0000 dt-bindings: mmc: fsl-imx-esdhc: add imx8m compatible string Add imx8mq/m/n compatible string Signed-off-by: Peng Fan Acked-by: Rob Herring Signed-off-by: Ulf Hansson commit 2ac55d5e5ec9ad0a07e194f0eaca865fe5aa3c40 Author: Ulf Hansson Date: Thu Oct 17 15:25:36 2019 +0200 mmc: core: Re-work HW reset for SDIO cards It have turned out that it's not a good idea to unconditionally do a power cycle and then to re-initialize the SDIO card, as currently done through mmc_hw_reset() -> mmc_sdio_hw_reset(). This because there may be multiple SDIO func drivers probed, who also shares the same SDIO card. To address these scenarios, one may be tempted to use a notification mechanism, as to allow the core to inform each of the probed func drivers, about an ongoing HW reset. However, supporting such an operation from the func driver point of view, may not be entirely trivial. Therefore, let's use a more simplistic approach to solve the problem, by instead forcing the card to be removed and re-detected, via scheduling a rescan-work. In this way, we can rely on existing infrastructure, as the func driver's ->remove() and ->probe() callbacks, becomes invoked to deal with the cleanup and the re-initialization. This solution may be considered as rather heavy, especially if a func driver doesn't share its card with other func drivers. To address this, let's keep the current immediate HW reset option as well, but run it only when there is one func driver probed for the card. Finally, to allow the caller of mmc_hw_reset(), to understand if the reset is being asynchronously managed from a scheduled work, it returns 1 (propagated from mmc_sdio_hw_reset()). If the HW reset is executed successfully and synchronously it returns 0, which maintains the existing behaviour. Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Ulf Hansson commit 99b4ddd8b76a6f60a8c2b3775849d65d21a418fc Author: Ulf Hansson Date: Thu Oct 10 15:54:37 2019 +0200 mmc: core: Drop check for mmc_card_is_removable() in mmc_rescan() Upfront in mmc_rescan() we use the host->rescan_entered flag, to allow scanning only once for non-removable cards. Therefore, it's also not possible that we can have a corresponding card bus attached (host->bus_ops is NULL), when we are scanning non-removable cards. For this reason, let' drop the check for mmc_card_is_removable() as it's redundant. Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Ulf Hansson commit cdb2256f795e8e78cc43f32d091695b127dfb4df Author: Ulf Hansson Date: Fri Oct 25 09:28:17 2019 +0200 mwifiex: Re-work support for SDIO HW reset The SDIO HW reset procedure in mwifiex_sdio_card_reset_work() is broken, when the SDIO card is shared with another SDIO func driver. This is the case when the Bluetooth btmrvl driver is being used in combination with mwifiex. More precisely, when mwifiex_sdio_card_reset_work() runs to resets the SDIO card, the btmrvl driver doesn't get notified about it. Beyond that point, the btmrvl driver will fail to communicate with the SDIO card. This is a generic problem for SDIO func drivers sharing an SDIO card, which are about to be addressed in subsequent changes to the mmc core and the mmc_hw_reset() interface. In principle, these changes means the mmc_hw_reset() interface starts to return 1 if the are multiple drivers for the SDIO card, as to indicate to the caller that the reset needed to be scheduled asynchronously through a hotplug mechanism of the SDIO card. Let's prepare the mwifiex driver to support the upcoming new behaviour of mmc_hw_reset(), which means extending the mwifiex_sdio_card_reset_work() to support the asynchronous SDIO HW reset path. This also means, we need to allow the ->remove() callback to run, without waiting for the FW to be loaded. Additionally, during system suspend, mwifiex_sdio_suspend() may be called when a reset has been scheduled, but waiting to be executed. In this scenario let's simply return -EBUSY to abort the suspend process, as to allow the reset to be completed first. Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Cc: stable@vger.kernel.org # v5.4+ Acked-by: Kalle Valo Signed-off-by: Ulf Hansson commit 0756e913fc020ab3640bcfe7de55b8024ecb88ad Author: Mikhail Karpenko Date: Wed Nov 13 11:06:59 2019 +0000 qtnfmac: add support for getting/setting transmit power Add new command for getting/setting current transmit power and propagate requests from user space to firmware. Signed-off-by: Mikhail Karpenko Signed-off-by: Kalle Valo commit 239ce8a79778b62eb50a2084ac43cb0b410ee15b Author: Sergey Matyukevich Date: Wed Nov 13 11:06:57 2019 +0000 qtnfmac: handle MIC failure event from firmware Report MIC failure from firmware to cfg80211 subsystem using dedicated callback cfg80211_michael_mic_failure. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 46d55fcec1637c58b39b6e1b4907906808bb7c32 Author: Sergey Matyukevich Date: Wed Nov 13 11:06:55 2019 +0000 qtnfmac: send EAPOL frames via control path Send EAPOL frames via control path so they can be treated in a different way rather than normal data frames. In this case EAPOLs are sent with higher priority and with disabled aggregation and encryption. Besides, all devices benefit from sending EAPOL frames via high priority path, so move the functionality from chip specific to common code. Signed-off-by: Igor Mitsyanko Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 97aef03cb71b49e651ea286beea2ec75cae86d8b Author: Sergey Matyukevich Date: Wed Nov 13 11:06:53 2019 +0000 qtnfmac: modify Rx descriptors queue setup Rx descriptors queue length is hardware specific. Current common default value is no more than an accident. So move Rx descriptor queue setup to platform PCIe backend in the same way as it is already done for Tx. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 24227a9e956a7c9913a7e6e7199a9ae3f540fe88 Author: Sergey Matyukevich Date: Wed Nov 13 11:06:51 2019 +0000 qtnfmac: fix invalid channel information output Do not attempt to print frequency for an invalid channel provided by firmware. That channel may simply not exist. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit dd4c2260dab04f5ae7bdb79b9470e7da56f48145 Author: Sergey Matyukevich Date: Wed Nov 13 11:06:49 2019 +0000 qtnfmac: fix debugfs support for multiple cards Fix merge artifact for commit 0b68fe10b8e8 ("qtnfmac: modify debugfs to support multiple cards") and finally add debugfs support for multiple qtnfmac wireless cards. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 4a33f21cef84b1b933958c99ed5dac1726214b35 Author: Sergey Matyukevich Date: Wed Nov 13 11:06:47 2019 +0000 qtnfmac: fix using skb after free KASAN reported use-after-free error: [ 995.220767] BUG: KASAN: use-after-free in qtnf_cmd_send_with_reply+0x169/0x3e0 [qtnfmac] [ 995.221098] Read of size 2 at addr ffff888213d1ded0 by task kworker/1:1/71 The issue in qtnf_cmd_send_with_reply impacts all the commands that do not need response other then return code. For such commands, consume_skb is used for response skb and right after that return code in response skb is accessed. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 408f122a1f923011099468e9f317e6dbe200fd31 Author: Jes Sorensen Date: Tue Nov 12 15:28:50 2019 -0500 rtl8xxxu: Add support for Edimax EW-7611ULB A number of people have reported the Edimax EW-7611ULB works fine. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo commit 7ecaf069da52e472d393f03e79d721aabd724166 Author: Masahiro Yamada Date: Thu Nov 7 16:14:41 2019 +0900 kbuild: move headers_check rule to usr/include/Makefile Currently, some sanity checks for uapi headers are done by scripts/headers_check.pl, which is wired up to the 'headers_check' target in the top Makefile. It is true compiling headers has better test coverage, but there are still several headers excluded from the compile test. I like to keep headers_check.pl for a while, but we can delete a lot of code by moving the build rule to usr/include/Makefile. Signed-off-by: Masahiro Yamada commit fcbb8461fd2376ba3782b5b8bd440c929b8e4980 Author: Masahiro Yamada Date: Thu Nov 7 16:14:40 2019 +0900 kbuild: remove header compile test There are both positive and negative options about this feature. At first, I thought it was a good idea, but actually Linus stated a negative opinion (https://lkml.org/lkml/2019/9/29/227). I admit it is ugly and annoying. The baseline I'd like to keep is the compile-test of uapi headers. (Otherwise, kernel developers have no way to ensure the correctness of the exported headers.) I will maintain a small build rule in usr/include/Makefile. Remove the other header test functionality. Signed-off-by: Masahiro Yamada commit 330bb7117101099c687e9c7f13d48068670b9c62 Author: Larry Finger Date: Mon Nov 11 13:40:46 2019 -0600 rtlwifi: rtl8192de: Fix missing enable interrupt flag In commit 38506ecefab9 ("rtlwifi: rtl_pci: Start modification for new drivers"), the flag that indicates that interrupts are enabled was never set. In addition, there are several places when enable/disable interrupts were commented out are restored. A sychronize_interrupts() call is removed. Fixes: 38506ecefab9 ("rtlwifi: rtl_pci: Start modification for new drivers") Cc: Stable # v3.18+ Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 3155db7613edea8fb943624062baf1e4f9cfbfd6 Author: Larry Finger Date: Mon Nov 11 13:40:45 2019 -0600 rtlwifi: rtl8192de: Fix missing callback that tests for hw release of buffer In commit 38506ecefab9 ("rtlwifi: rtl_pci: Start modification for new drivers"), a callback needed to check if the hardware has released a buffer indicating that a DMA operation is completed was not added. Fixes: 38506ecefab9 ("rtlwifi: rtl_pci: Start modification for new drivers") Cc: Stable # v3.18+ Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 0e531cc575c4e9e3dd52ad287b49d3c2dc74c810 Author: Larry Finger Date: Mon Nov 11 13:40:44 2019 -0600 rtlwifi: rtl8192de: Fix missing code to retrieve RX buffer address In commit 38506ecefab9 ("rtlwifi: rtl_pci: Start modification for new drivers"), a callback to get the RX buffer address was added to the PCI driver. Unfortunately, driver rtl8192de was not modified appropriately and the code runs into a WARN_ONCE() call. The use of an incorrect array is also fixed. Fixes: 38506ecefab9 ("rtlwifi: rtl_pci: Start modification for new drivers") Cc: Stable # 3.18+ Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 021d1cdda3875bf35edac9133335f622d7910abc Author: Jens Axboe Date: Thu Nov 14 08:00:41 2019 -0700 io-wq: remove now redundant struct io_wq_nulls_list Since we don't iterate these lists anymore after commit: e61df66c69b1 ("io-wq: ensure free/busy list browsing see all items") we don't need to retain the nulls value we use for them. That means it's pretty pointless to wrap the hlist_nulls_head in a structure, so get rid of it. Signed-off-by: Jens Axboe commit 979c690d9a017db14b7759a099478e3faad991ac Author: Christoph Hellwig Date: Thu Nov 14 15:34:37 2019 +0100 block: move clearing bd_invalidated into check_disk_size_change Both callers of check_disk_size_change clear bd_invalidate directly after the call, so move the clearing into check_disk_size_change itself. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f0b870df80bc70dad432fd0c142bb709a49964f5 Author: Christoph Hellwig Date: Thu Nov 14 15:34:36 2019 +0100 block: remove (__)blkdev_reread_part as an exported API In general drivers should never mess with partition tables directly. Unfortunately s390 and loop do for somewhat historic reasons, but they can use bdev_disk_changed directly instead when we export it as they satisfy the sanity checks we have in __blkdev_reread_part. Signed-off-by: Christoph Hellwig Reviewed-by: Stefan Haberland [dasd] Reviewed-by: Jan Kara Signed-off-by: Jens Axboe commit 142fe8f4bb169e8632024d51c64653a8bf140561 Author: Christoph Hellwig Date: Thu Nov 14 15:34:35 2019 +0100 block: fix bdev_disk_changed for non-partitioned devices We still have to set the capacity to 0 if invalidating or call revalidate_disk if not even if the disk has no partitions. Fix that by merging rescan_partitions into bdev_disk_changed and just stubbing out blk_add_partitions and blk_drop_partitions for non-partitioned devices. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Jens Axboe commit a1548b674403c0de70cc29a1575689917ba60157 Author: Christoph Hellwig Date: Thu Nov 14 15:34:34 2019 +0100 block: move rescan_partitions to fs/block_dev.c Large parts of rescan_partitions aren't about partitions, and moving it to block_dev.c will allow for some further cleanups by merging it into its only caller. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Jens Axboe commit 6917d0689993f46d97d40dd66c601d0fd5b1dbdd Author: Christoph Hellwig Date: Thu Nov 14 15:34:33 2019 +0100 block: merge invalidate_partitions into rescan_partitions A lot of the logic in invalidate_partitions and rescan_partitions is shared. Merge the two functions to simplify things. There is a small behavior change in that we now send the kevent change notice also if we were not invalidating but no partitions were found, which seems like the right thing to do. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Jens Axboe commit 163b00cde7cf2206e248789d2780121ad5e6a70b Author: Wei Wang Date: Tue Nov 12 12:42:23 2019 -0800 thermal: Fix deadlock in thermal thermal_zone_device_check 1851799e1d29 ("thermal: Fix use-after-free when unregistering thermal zone device") changed cancel_delayed_work to cancel_delayed_work_sync to avoid a use-after-free issue. However, cancel_delayed_work_sync could be called insides the WQ causing deadlock. [54109.642398] c0 1162 kworker/u17:1 D 0 11030 2 0x00000000 [54109.642437] c0 1162 Workqueue: thermal_passive_wq thermal_zone_device_check [54109.642447] c0 1162 Call trace: [54109.642456] c0 1162 __switch_to+0x138/0x158 [54109.642467] c0 1162 __schedule+0xba4/0x1434 [54109.642480] c0 1162 schedule_timeout+0xa0/0xb28 [54109.642492] c0 1162 wait_for_common+0x138/0x2e8 [54109.642511] c0 1162 flush_work+0x348/0x40c [54109.642522] c0 1162 __cancel_work_timer+0x180/0x218 [54109.642544] c0 1162 handle_thermal_trip+0x2c4/0x5a4 [54109.642553] c0 1162 thermal_zone_device_update+0x1b4/0x25c [54109.642563] c0 1162 thermal_zone_device_check+0x18/0x24 [54109.642574] c0 1162 process_one_work+0x3cc/0x69c [54109.642583] c0 1162 worker_thread+0x49c/0x7c0 [54109.642593] c0 1162 kthread+0x17c/0x1b0 [54109.642602] c0 1162 ret_from_fork+0x10/0x18 [54109.643051] c0 1162 kworker/u17:2 D 0 16245 2 0x00000000 [54109.643067] c0 1162 Workqueue: thermal_passive_wq thermal_zone_device_check [54109.643077] c0 1162 Call trace: [54109.643085] c0 1162 __switch_to+0x138/0x158 [54109.643095] c0 1162 __schedule+0xba4/0x1434 [54109.643104] c0 1162 schedule_timeout+0xa0/0xb28 [54109.643114] c0 1162 wait_for_common+0x138/0x2e8 [54109.643122] c0 1162 flush_work+0x348/0x40c [54109.643131] c0 1162 __cancel_work_timer+0x180/0x218 [54109.643141] c0 1162 handle_thermal_trip+0x2c4/0x5a4 [54109.643150] c0 1162 thermal_zone_device_update+0x1b4/0x25c [54109.643159] c0 1162 thermal_zone_device_check+0x18/0x24 [54109.643167] c0 1162 process_one_work+0x3cc/0x69c [54109.643177] c0 1162 worker_thread+0x49c/0x7c0 [54109.643186] c0 1162 kthread+0x17c/0x1b0 [54109.643195] c0 1162 ret_from_fork+0x10/0x18 [54109.644500] c0 1162 cat D 0 7766 1 0x00000001 [54109.644515] c0 1162 Call trace: [54109.644524] c0 1162 __switch_to+0x138/0x158 [54109.644536] c0 1162 __schedule+0xba4/0x1434 [54109.644546] c0 1162 schedule_preempt_disabled+0x80/0xb0 [54109.644555] c0 1162 __mutex_lock+0x3a8/0x7f0 [54109.644563] c0 1162 __mutex_lock_slowpath+0x14/0x20 [54109.644575] c0 1162 thermal_zone_get_temp+0x84/0x360 [54109.644586] c0 1162 temp_show+0x30/0x78 [54109.644609] c0 1162 dev_attr_show+0x5c/0xf0 [54109.644628] c0 1162 sysfs_kf_seq_show+0xcc/0x1a4 [54109.644636] c0 1162 kernfs_seq_show+0x48/0x88 [54109.644656] c0 1162 seq_read+0x1f4/0x73c [54109.644664] c0 1162 kernfs_fop_read+0x84/0x318 [54109.644683] c0 1162 __vfs_read+0x50/0x1bc [54109.644692] c0 1162 vfs_read+0xa4/0x140 [54109.644701] c0 1162 SyS_read+0xbc/0x144 [54109.644708] c0 1162 el0_svc_naked+0x34/0x38 [54109.845800] c0 1162 D 720.000s 1->7766->7766 cat [panic] Fixes: 1851799e1d29 ("thermal: Fix use-after-free when unregistering thermal zone device") Cc: stable@vger.kernel.org Signed-off-by: Wei Wang Signed-off-by: Zhang Rui commit f902b02600028dfc0c9df811eb711ac7d7fca09f Author: Christoph Hellwig Date: Thu Nov 14 15:34:32 2019 +0100 block: refactor rescan_partitions Split out a helper that adds one single partition, and another one calling that dealing with the parsed_partitions state. This makes it much more obvious how we clean up all state and start again when using the rescan label. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit d8e85e144bbe12e8d82c6b05d690a34da62cc991 Author: Anders Roxell Date: Wed Nov 13 10:26:52 2019 +0100 arm64: Kconfig: add a choice for endianness When building allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/arm64/configs/defconfig CONFIG_CPU_BIG_ENDIAN gets enabled. Which tends not to be what most people want. Another concern that has come up is that ACPI isn't built for an allmodconfig kernel today since that also depends on !CPU_BIG_ENDIAN. Rework so that we introduce a 'choice' and default the choice to CPU_LITTLE_ENDIAN. That means that when we build an allmodconfig kernel it will default to CPU_LITTLE_ENDIAN that most people tends to want. Reviewed-by: John Garry Acked-by: Will Deacon Signed-off-by: Anders Roxell Signed-off-by: Catalin Marinas commit 1d28122131b263f169a7f2d288178a56c69ee076 Author: Uwe Kleine-König Date: Thu Nov 14 11:04:16 2019 +0100 checkpatch: don't warn about new vsprintf pointer extension '%pe' This extension was introduced in commit 57f5677e535b ("printf: add support for printing symbolic error names"). Link: http://lkml.kernel.org/r/20191114100416.23928-1-u.kleine-koenig@pengutronix.de To: Andy Whitcroft To: Joe Perches To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org Cc: kernel@pengutronix.de Signed-off-by: Uwe Kleine-König Acked-by: Rasmus Villemoes [pmladek@suse.com: Switched the ordering: eE -> Ee] Signed-off-by: Petr Mladek commit e221065aa613931c16b0361eecd2bf45015488ba Author: Jan Beulich Date: Mon Nov 11 15:46:45 2019 +0100 xen/mcelog: also allow building for 32-bit kernels There's no apparent reason why it can be used on 64-bit only. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit f1a0094cbbe97a5f8aca7bdc64bfe43ac9dc6879 Author: Jinke Fan Date: Wed Nov 13 11:38:41 2019 +0800 HID: quirks: Add quirk for HP MSU1465 PIXART OEM mouse The PixArt OEM mouse disconnets/reconnects every minute on Linux. All contents of dmesg are repetitive: [ 1465.810014] usb 1-2.2: USB disconnect, device number 20 [ 1467.431509] usb 1-2.2: new low-speed USB device number 21 using xhci_hcd [ 1467.654982] usb 1-2.2: New USB device found, idVendor=03f0,idProduct=1f4a, bcdDevice= 1.00 [ 1467.654985] usb 1-2.2: New USB device strings: Mfr=1, Product=2,SerialNumber=0 [ 1467.654987] usb 1-2.2: Product: HP USB Optical Mouse [ 1467.654988] usb 1-2.2: Manufacturer: PixArt [ 1467.699722] input: PixArt HP USB Optical Mouse as /devices/pci0000:00/0000:00:07.1/0000:05:00.3/usb1/1-2/1-2.2/1-2.2:1.0/0003:03F0:1F4A.0012/input/input19 [ 1467.700124] hid-generic 0003:03F0:1F4A.0012: input,hidraw0: USB HID v1.11 Mouse [PixArt HP USB Optical Mouse] on usb-0000:05:00.3-2.2/input0 So add HID_QUIRK_ALWAYS_POLL for this one as well. Test the patch, the mouse is no longer disconnected and there are no duplicate logs in dmesg. Reference: https://github.com/sriemer/fix-linux-mouse Signed-off-by: Jinke Fan Signed-off-by: Jiri Kosina commit 6f599d84231fd27e42f4ca2a786a6641e8cddf00 Author: Lianbo Jiang Date: Fri Nov 8 17:00:25 2019 +0800 x86/kdump: Always reserve the low 1M when the crashkernel option is specified On x86, purgatory() copies the first 640K of memory to a backup region because the kernel needs those first 640K for the real mode trampoline during boot, among others. However, when SME is enabled, the kernel cannot properly copy the old memory to the backup area but reads only its encrypted contents. The result is that the crash tool gets invalid pointers when parsing vmcore: crash> kmem -s|grep -i invalid kmem: dma-kmalloc-512: slab:ffffd77680001c00 invalid freepointer:a6086ac099f0c5a4 kmem: dma-kmalloc-512: slab:ffffd77680001c00 invalid freepointer:a6086ac099f0c5a4 crash> So reserve the remaining low 1M memory when the crashkernel option is specified (after reserving real mode memory) so that allocated memory does not fall into the low 1M area and thus the copying of the contents of the first 640k to a backup region in purgatory() can be avoided altogether. This way, it does not need to be included in crash dumps or used for anything except the trampolines that must live in the low 1M. [ bp: Heavily rewrite commit message, flip check logic in crash_reserve_low_1M().] Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: bhe@redhat.com Cc: Dave Young Cc: d.hatayama@fujitsu.com Cc: dhowells@redhat.com Cc: ebiederm@xmission.com Cc: horms@verge.net.au Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jürgen Gross Cc: kexec@lists.infradead.org Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Cc: vgoyal@redhat.com Cc: x86-ml Link: https://lkml.kernel.org/r/20191108090027.11082-2-lijiang@redhat.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=204793 commit 112eee5d06007dae561f14458bde7f2a4879ef4e Author: Lianbo Jiang Date: Fri Nov 8 17:00:27 2019 +0800 x86/crash: Add a forward declaration of struct kimage Add a forward declaration of struct kimage to the crash.h header because future changes will invoke a crash-specific function from the realmode init path and the compiler will complain otherwise like this: In file included from arch/x86/realmode/init.c:11: ./arch/x86/include/asm/crash.h:5:32: warning: ‘struct kimage’ declared inside\ parameter list will not be visible outside of this definition or declaration 5 | int crash_load_segments(struct kimage *image); | ^~~~~~ ./arch/x86/include/asm/crash.h:6:37: warning: ‘struct kimage’ declared inside\ parameter list will not be visible outside of this definition or declaration 6 | int crash_copy_backup_region(struct kimage *image); | ^~~~~~ ./arch/x86/include/asm/crash.h:7:39: warning: ‘struct kimage’ declared inside\ parameter list will not be visible outside of this definition or declaration 7 | int crash_setup_memmap_entries(struct kimage *image, | [ bp: Rewrite the commit message. ] Reported-by: kbuild test robot Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: bhe@redhat.com Cc: d.hatayama@fujitsu.com Cc: dhowells@redhat.com Cc: dyoung@redhat.com Cc: ebiederm@xmission.com Cc: horms@verge.net.au Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jürgen Gross Cc: kexec@lists.infradead.org Cc: Thomas Gleixner Cc: Tom Lendacky Cc: vgoyal@redhat.com Cc: x86-ml Link: https://lkml.kernel.org/r/20191108090027.11082-4-lijiang@redhat.com Link: https://lkml.kernel.org/r/201910310233.EJRtTMWP%25lkp@intel.com commit 7bd39bc6bfdf96f5df0f92199bbc1a3ee2f2adb8 Author: Sudeep Holla Date: Mon Nov 11 16:25:22 2019 +0000 firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT The logic to ring the scmi performance fastchannel ignores the value read from the doorbell register in case of !CONFIG_64BIT. This bug also shows up as warning with '-Wunused-but-set-variable' gcc flag: drivers/firmware/arm_scmi/perf.c: In function scmi_perf_fc_ring_db: drivers/firmware/arm_scmi/perf.c:323:7: warning: variable val set but not used [-Wunused-but-set-variable] Fix the same by aligning the logic with CONFIG_64BIT as used in the macro SCMI_PERF_FC_RING_DB(). Fixes: 823839571d76 ("firmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol") Reported-by: Hulk Robot Reported-by: Zheng Yongjun Signed-off-by: Sudeep Holla commit a7e335deed174a37fc6f84f69caaeff8a08f8ff8 Author: Eric Long Date: Wed Oct 23 14:31:32 2019 +0800 dmaengine: sprd: Add wrap address support for link-list mode The Spreadtrum Audio compress offload mode will use 2-stage DMA transfer to save power. That means we can request 2 dma channels, one for source channel, and another one for destination channel. Once the source channel's transaction is done, it will trigger the destination channel's transaction automatically by hardware signal. In this case, the source channel will transfer data from IRAM buffer to the DSP fifo to decoding/encoding, once IRAM buffer is empty by transferring done, the destination channel will start to transfer data from DDR buffer to IRAM buffer. Since the destination channel will use link-list mode to fill the IRAM data, and IRAM buffer is allocated by 32K, and DDR buffer is larger to 2M, that means we need lots of link-list nodes to do a cyclic transfer, instead wasting lots of link-list memory, we can use wrap address support to reduce link-list node number, which means when the transfer address reaches the wrap address, the transfer address will jump to the wrap_to address specified by wrap_to register, and only 2 link-list nodes can do a cyclic transfer to transfer data from DDR to IRAM. Thus this patch adds wrap address to support this case. [Baolin Wang changes the commit message] Signed-off-by: Eric Long Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/85a5484bc1f3dd53ce6f92700ad8b35f30a0b096.1571812029.git.baolin.wang@linaro.org Signed-off-by: Vinod Koul commit bb5a471de9bfd0853d48d8dc5572469778c2824d Merge: b37949560b93 bacdcb6675e1 Author: Vinod Koul Date: Thu Nov 14 16:02:51 2019 +0530 Merge branch 'fixes' into next commit 14f89e088155314d311e4d4dd9f2b4ccaeef92b2 Author: Angelo Dureghello Date: Wed Oct 30 12:39:57 2019 +0100 mtd: devices: fix mchp23k256 read and write Due to the use of sizeof(), command size set for the spi transfer was wrong. Driver was sending and receiving always 1 byte less and especially on write, it was hanging. echo -n -e "\\x1\\x2\\x3\\x4" > /dev/mtd1 And read part too now works as expected. hexdump -C -n16 /dev/mtd1 00000000 01 02 03 04 ab f3 ad c2 ab e3 f4 36 dd 38 04 15 00000010 Fixes: 4379075a870b ("mtd: mchp23k256: Add support for mchp23lcv1024") Signed-off-by: Angelo Dureghello Reviewed-by: Andrew Lunn Signed-off-by: Miquel Raynal commit c2d73ba892eac0275b0d2bd7fae8dd4591a05da9 Author: Greg Kroah-Hartman Date: Thu Nov 7 09:51:11 2019 +0100 mtd: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: David Woodhouse Cc: Brian Norris Cc: Marek Vasut Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Artem Bityutskiy Cc: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Miquel Raynal commit e47ff01b94b64f5cea3b43dbfa4f27bb605789a4 Author: Chunfeng Yun Date: Tue Nov 12 14:51:59 2019 +0800 usb: gadget: udc: s3c2410_udc: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-13-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 3a35bc8df4888204ceee0fced06cede431ddba02 Author: Chunfeng Yun Date: Tue Nov 12 14:51:57 2019 +0800 usb: gadget: pxa27x: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-11-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 626557a352b2a4a2440b6d68f6a5c562246fe0f7 Author: Chunfeng Yun Date: Tue Nov 12 14:51:56 2019 +0800 usb: gadget: udc: renesas_usb3: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-10-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ae24f2b6f828f4ae37d0f0fd3be4e7744b6aab13 Author: Przemyslaw Gaj Date: Thu Nov 14 06:51:55 2019 +0100 MAINTAINERS: add myself as maintainer of Cadence I3C master controller driver As discussed with Boris Brezillon - I'm adding myself as the maintainer. Signed-off-by: Przemyslaw Gaj Signed-off-by: Boris Brezillon commit 4e3f77d8419b6787f3eb4d4f5178f459d693f9bb Author: Jan Beulich Date: Mon Nov 11 15:46:26 2019 +0100 xen/mcelog: add PPIN to record when available This is to augment commit 3f5a7896a5 ("x86/mce: Include the PPIN in MCE records when available"). I'm also adding "synd" and "ipid" fields to struct xen_mce, in an attempt to keep field offsets in sync with struct mce. These two fields won't get populated for now, though. Signed-off-by: Jan Beulich Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 0695f8bca93ea0c57f0e8e21b4b4db70183b3d1c Author: Harish Date: Wed Nov 13 15:12:19 2019 +0530 selftests/powerpc: Handle Makefile for unrecognized option On older distributions like Sles12SP5 gcc does not recognize -no-pie option making the powerpc selftests build to fail Fixes the following: gcc: error: unrecognized command line option ‘-no-pie’ Signed-off-by: Harish Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191113094219.14946-1-harish@linux.ibm.com commit ca8ffdaea560a3be3f0701ff4b019fa25a308f82 Author: Jan Beulich Date: Mon Nov 11 15:45:42 2019 +0100 xen/mcelog: drop __MC_MSR_MCGCAP It has never been part of Xen's public interface, and there's therefore no guarantee for MCG_CAP's value to always be present in array entry 0. Signed-off-by: Jan Beulich Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 46770be0cf94149ca48be87719bda1d951066644 Author: Viresh Kumar Date: Thu Nov 14 09:06:17 2019 +0530 cpufreq: Register drivers only after CPU devices have been registered The cpufreq core heavily depends on the availability of the struct device for CPUs and if they aren't available at the time cpufreq driver is registered, we will never succeed in making cpufreq work. This happens due to following sequence of events: - cpufreq_register_driver() - subsys_interface_register() - return 0; //successful registration of driver ... at a later point of time - register_cpu(); - device_register(); - bus_probe_device(); - sif->add_dev(); - cpufreq_add_dev(); - get_cpu_device(); //FAILS - per_cpu(cpu_sys_devices, num) = &cpu->dev; //used by get_cpu_device() - return 0; //CPU registered successfully Because the per-cpu variable cpu_sys_devices is set only after the CPU device is regsitered, cpufreq will never be able to get it when cpufreq_add_dev() is called. This patch avoids this failure by making sure device structure of at least CPU0 is available when the cpufreq driver is registered, else return -EPROBE_DEFER. Reported-by: Bjorn Andersson Co-developed-by: Amit Kucheria Signed-off-by: Viresh Kumar Tested-by: Amit Kucheria Signed-off-by: Rafael J. Wysocki commit 3df191118b4ca20f58c7a84e59330c6b9d99454b Merge: 565f9bc05e2d c2d1a13520ee Author: Michael Ellerman Date: Thu Nov 14 19:19:20 2019 +1100 Merge branch 'topic/kaslr-book3e32' into next This is a slight rebase of Scott's next branch, which contained the KASLR support for book3e 32-bit, to squash in a couple of small fixes. See the original pull request: https://lore.kernel.org/r/20191022232155.GA26174@home.buserror.net commit b4011644b03c04b1a42068313c5b894da41d0698 Author: YueHaibing Date: Fri Nov 1 21:46:11 2019 +0800 drm/vmwgfx: remove set but not used variable 'srf' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:339:22: warning: variable srf set but not used [-Wunused-but-set-variable] 'srf' is never used, so can be removed. Signed-off-by: YueHaibing Reviewed-by: Thomas Hellstrom commit e2e966636aee99971965c0965a4c11b8ce077da3 Author: Thomas Hellstrom Date: Wed Nov 13 19:02:42 2019 +0100 drm/ttm, drm/vmwgfx: Use a configuration option for the TTM dma page pool Drivers like vmwgfx may want to test whether the dma page pool is present or not. Since it's activated by default by TTM if compiled-in, define a hidden configuration option that the driver can test for. Cc: Christian König Signed-off-by: Thomas Hellstrom Reviewed-by: Christian König commit b37949560b93d01f20687dfb8e1d3b9aa5633d63 Author: Green Wan Date: Thu Nov 7 16:49:22 2019 +0800 MAINTAINERS: Add Green as SiFive PDMA driver maintainer Update MAINTAINERS for SiFive PDMA driver. Signed-off-by: Green Wan Link: https://lore.kernel.org/r/20191107084955.7580-5-green.wan@sifive.com Signed-off-by: Vinod Koul commit 6973886ad58e6b4988813331abb76ae0b364a9c2 Author: Green Wan Date: Thu Nov 7 16:49:21 2019 +0800 dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00 Add PDMA driver, sf-pdma, to enable DMA engine on HiFive Unleashed Rev A00 board. - Implement dmaengine APIs, support MEM_TO_MEM async copy. - Tested by DMA Test client - Supports 4 channels DMA, each channel has 1 done and 1 err interrupt connected to platform-level interrupt controller (PLIC). - Depends on DMA_ENGINE and DMA_VIRTUAL_CHANNELS The datasheet is here: https://static.dev.sifive.com/FU540-C000-v1.0.pdf Follow the DMAengine controller doc, "./Documentation/driver-api/dmaengine/provider.rst" to implement DMA engine. And use the dma test client in doc, "./Documentation/driver-api/dmaengine/dmatest.rst", to test. Each DMA channel has separate HW regs and support done and error ISRs. 4 channels share 1 done and 1 err ISRs. There's no expander/arbitrator in DMA HW. ------ ------ | |--< done 23 >--|ch 0| | |--< err 24 >--| | (dma0chan0) | | ------ | | ------ | |--< done 25 >--|ch 1| | |--< err 26 >--| | (dma0chan1) |PLIC| ------ | | ------ | |--< done 27 >--|ch 2| | |--< err 28 >--| | (dma0chan2) | | ------ | | ------ | |--< done 29 >--|ch 3| | |--< err 30 >--| | (dma0chan3) ------ ------ Signed-off-by: Green Wan Link: https://lore.kernel.org/r/20191107084955.7580-4-green.wan@sifive.com Signed-off-by: Vinod Koul commit fa805360f4cfa34cb3575715e1c8b4f9a253b474 Author: Green Wan Date: Thu Nov 7 16:49:19 2019 +0800 dt-bindings: dmaengine: sf-pdma: add bindins for SiFive PDMA Add DT bindings document for Platform DMA(PDMA) driver of board, HiFive Unleashed Rev A00. Reviewed-by: Rob Herring Reviewed-by: Pragnesh Patel Signed-off-by: Green Wan Link: https://lore.kernel.org/r/20191107084955.7580-2-green.wan@sifive.com Signed-off-by: Vinod Koul commit 87ff16007cff64a36ef31f50d45b69211d88da1d Author: Alexander Shishkin Date: Thu Nov 14 08:42:01 2019 +0200 intel_th: Document software sinks Add documentation for the software sinks API of the MSU driver and the msu-sink module in particular. Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20191114064201.43089-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0a8f72fafb3f72a08df4ee491fcbeaafd6de85fd Author: Alexander Shishkin Date: Thu Nov 14 08:42:00 2019 +0200 stm class: Lose the protocol driver when dropping its reference Commit c7fd62bc69d02 ("stm class: Introduce framing protocol drivers") forgot to tear down the link between an stm device and its protocol driver when policy is removed. This leads to an invalid pointer reference if one tries to write to an stm device after the policy has been removed and the protocol driver module unloaded, leading to the below splat: > BUG: unable to handle page fault for address: ffffffffc0737068 > #PF: supervisor read access in kernel mode > #PF: error_code(0x0000) - not-present page > PGD 3d780f067 P4D 3d780f067 PUD 3d7811067 PMD 492781067 PTE 0 > Oops: 0000 [#1] SMP NOPTI > CPU: 1 PID: 26122 Comm: cat Not tainted 5.4.0-rc5+ #1 > RIP: 0010:stm_output_free+0x40/0xc0 [stm_core] > Call Trace: > stm_char_release+0x3e/0x70 [stm_core] > __fput+0xc6/0x260 > ____fput+0xe/0x10 > task_work_run+0x9d/0xc0 > exit_to_usermode_loop+0x103/0x110 > do_syscall_64+0x19d/0x1e0 > entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix this by tearing down the link from an stm device to its protocol driver when the policy involving that driver is removed. Signed-off-by: Alexander Shishkin Fixes: c7fd62bc69d02 ("stm class: Introduce framing protocol drivers") Reported-by: Ammy Yi Tested-by: Ammy Yi CC: stable@vger.kernel.org # v4.20+ Link: https://lore.kernel.org/r/20191114064201.43089-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5c5332a6a229acc856811bdce1c0845986e8306a Author: Satendra Singh Thakur Date: Sat Nov 9 17:06:09 2019 +0530 dmaengine: zx: remove: removed dmam_pool_destroy In the probe method dmam_pool_create is used. Therefore, there is no need to explicitly call dmam_pool_destroy in remove method as this will be automatically taken care by devres Signed-off-by: Satendra Singh Thakur Link: https://lore.kernel.org/r/20191109113609.6159-1-sst2005@gmail.com Signed-off-by: Vinod Koul commit 1ff95243257fad07290dcbc5f7a6ad79d6e703e2 Author: Satendra Singh Thakur Date: Sat Nov 9 17:05:23 2019 +0530 dmaengine: mediatek: hsdma_probe: fixed a memory leak when devm_request_irq fails When devm_request_irq fails, currently, the function dma_async_device_unregister gets called. This doesn't free the resources allocated by of_dma_controller_register. Therefore, we have called of_dma_controller_free for this purpose. Signed-off-by: Satendra Singh Thakur Link: https://lore.kernel.org/r/20191109113523.6067-1-sst2005@gmail.com Signed-off-by: Vinod Koul commit e9cb0497b1c801a66f9abc907b2c55241099e6ac Author: Richard Gong Date: Mon Nov 4 10:24:36 2019 -0600 firmware: Fix incompatible function behavior for RSU driver The older versions of remote system update (RSU) firmware don't support retry and notify features then the kernel module dies when it queries the RSU retry counter or performs notify operation. Update the Intel service layer and RSU drivers to be compatible with all versions of RSU firmware. Reported-by: Radu Barcau Reported-by: kbuild test robot Signed-off-by: Richard Gong Link: https://lore.kernel.org/r/1572884676-1385-1-git-send-email-richard.gong@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3b2fa0c92686562ac0b8cf00c0326a45814f8e18 Author: Sergio Paracuellos Date: Sat Oct 19 10:12:33 2019 +0200 MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected Some versions of SoC MT7621 have three PCI express hosts. Some boards make use of those PCI through the staging driver mt7621-pci. Recently PCI support has been removed from MT7621 Soc kernel configuration due to a build error. This makes imposible to compile staging driver and produces a regression for gnubee based boards. Enable support for PCI again but enable it only if staging mt7621-pci driver is selected. Fixes: c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621") Cc: Hauke Mehrtens Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: john@phrozen.org Cc: NeilBrown Cc: linux-mips@vger.kernel.org Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20191019081233.7337-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit c0e5f4e73a7148e18b763067d181661987cb4c09 Author: Rui Feng Date: Mon Oct 21 16:05:05 2019 +0800 misc: rtsx: Add support for RTS5261 Add support for new chip rts5261. In order to support rts5261, the definitions of some internal registers and workflow have to be modified and are different from its predecessors. So we need this patch to ensure RTS5261 can work. Signed-off-by: Rui Feng Link: https://lore.kernel.org/r/1571645105-5028-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Greg Kroah-Hartman commit c6bf3842a34abe3ec2f5bc81754883689aea6c0d Author: Angelo Dureghello Date: Sat Oct 19 22:40:15 2019 +0200 w1: new driver. DS2430 chip add support for ds2430, 1 page, 256bit (32bytes) eeprom (family 0x14). Tests done: 32 bytes dump: x@y:~# hexdump -C -n 32 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 39 39 0a 00 00 36 0a ff ff ff ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020 34 bytes dump: 32 only displayed x@y:~# hexdump -C -n 34 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 39 39 0a 00 00 36 0a ff ff ff ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020 pattern write: x@y:~# echo 123456789 > /sys/bus/w1/devices/14-00000158556e/eeprom x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 31 32 33 34 35 36 37 38 39 0a ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020 specific address 1-byte write x@y:~# dd if=/dev/zero of=/sys/bus/w1/devices/14-00000158556e/eeprom \ count=1 bs=1 seek=4 1+0 records in 1+0 records out x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 31 32 33 34 00 36 37 38 39 0a ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020 writing binary block x@y:~# cat dump-128bytes.bin > /sys/bus/w1/devices/14-00000158556e/eeprom cat: write error: File too large x@y:~# cat dump-32bytes.bin > /sys/bus/w1/devices/14-00000158556e/eeprom x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 10 0b 5b ff ff ff ff ff ff ff ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 40 00000020 Signed-off-by: Angelo Dureghello Link: https://lore.kernel.org/r/20191019204015.61474-1-angelo.dureghello@timesys.com Signed-off-by: Greg Kroah-Hartman commit 051f5175f226118ca220b93b87e07e515e727bcb Author: Colin Ian King Date: Tue Nov 12 19:11:43 2019 +0000 dmaengine: iop-adma: clean up an indentation issue There is a statement that is indented too deeply, remove the extraneous indentation. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191112191143.282814-1-colin.king@canonical.com Signed-off-by: Vinod Koul commit af2e8c68b9c5403f77096969c516f742f5bb29e0 Author: Michael Ellerman Date: Wed Nov 13 21:05:44 2019 +1100 KVM: PPC: Book3S HV: Flush link stack on guest exit to host kernel On some systems that are vulnerable to Spectre v2, it is up to software to flush the link stack (return address stack), in order to protect against Spectre-RSB. When exiting from a guest we do some house keeping and then potentially exit to C code which is several stack frames deep in the host kernel. We will then execute a series of returns without preceeding calls, opening up the possiblity that the guest could have poisoned the link stack, and direct speculative execution of the host to a gadget of some sort. To prevent this we add a flush of the link stack on exit from a guest. Signed-off-by: Michael Ellerman commit 39e72bf96f5847ba87cc5bd7a3ce0fed813dc9ad Author: Michael Ellerman Date: Wed Nov 13 21:05:41 2019 +1100 powerpc/book3s64: Fix link stack flush on context switch In commit ee13cb249fab ("powerpc/64s: Add support for software count cache flush"), I added support for software to flush the count cache (indirect branch cache) on context switch if firmware told us that was the required mitigation for Spectre v2. As part of that code we also added a software flush of the link stack (return address stack), which protects against Spectre-RSB between user processes. That is all correct for CPUs that activate that mitigation, which is currently Power9 Nimbus DD2.3. What I got wrong is that on older CPUs, where firmware has disabled the count cache, we also need to flush the link stack on context switch. To fix it we create a new feature bit which is not set by firmware, which tells us we need to flush the link stack. We set that when firmware tells us that either of the existing Spectre v2 mitigations are enabled. Then we adjust the patching code so that if we see that feature bit we enable the link stack flush. If we're also told to flush the count cache in software then we fall through and do that also. On the older CPUs we don't need to do do the software count cache flush, firmware has disabled it, so in that case we patch in an early return after the link stack flush. The naming of some of the functions is awkward after this patch, because they're called "count cache" but they also do link stack. But we'll fix that up in a later commit to ease backporting. This is the fix for CVE-2019-18660. Reported-by: Anthony Steinhauser Fixes: ee13cb249fab ("powerpc/64s: Add support for software count cache flush") Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Michael Ellerman commit 71564a26e3e9d29d3d8901eb32647c2c3a807e1f Author: Andy Shevchenko Date: Wed Oct 23 15:25:05 2019 +0300 driver core: platform: Declare ret variable only once We may define ret variable only once and avoid adding it each time platform_get_irq_optional() get extended. For the sake of consistency do the same in __platform_get_irq_byname(). Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20191023122505.64684-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit edb44e8461cfb9da8fd7a60d1ded2912a01100be Author: Ben Dooks (Codethink) Date: Tue Oct 22 09:43:23 2019 +0100 cpu-topology: declare parse_acpi_topology in The parse_acpi_topology() is not declared anywhere which causes the following sparse warning: drivers/base/arch_topology.c:522:19: warning: symbol 'parse_acpi_topology' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Acked-by: Sudeep Holla Link: https://lore.kernel.org/r/20191022084323.13594-1-ben.dooks@codethink.co.uk Signed-off-by: Greg Kroah-Hartman commit e0c31fdda2647f8313274c49506628151b81b289 Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:40:59 2019 +0100 pcmcia: include cs_internal.h for missing declarations Include cs_internal.h (and pcmcia/cistpl.h as required by cs_internal.h) for the declearions of cb_alloc and cb_free to silence the following sparse warnings; drivers/pcmcia/cardbus.c:64:11: warning: symbol 'cb_alloc' was not declared. Should it be static? drivers/pcmcia/cardbus.c:103:6: warning: symbol 'cb_free' was not declared. Should it be static? Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20191017114059.10989-1-ben.dooks@codethink.co.uk Signed-off-by: Greg Kroah-Hartman commit b0bbc882e7b1b22e1a5aa4ccfaebf7ee445b7639 Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:44:47 2019 +0100 pcmcia: include for pcmcia_parse_tuple Include for pcmcia_parse_tuple declaration to fix the following sparse warning: drivers/pcmcia/cistpl.c:1287:5: warning: symbol 'pcmcia_parse_tuple' was not declared. Should it be static? Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20191017114447.20455-1-ben.dooks@codethink.co.uk Signed-off-by: Greg Kroah-Hartman commit 46549769d0512e44c5a08ae2dd05cebe55b3db16 Author: Dhanuka Warusadura Date: Mon Oct 28 16:37:44 2019 +0530 w1: Fix documentation warning. This patch fixes - warning: Function parameter or member 'of_match_table' not described in 'w1_family' Signed-off-by: Dhanuka Warusadura Link: https://lore.kernel.org/r/20191028110744.6523-1-csx@disroot.org Signed-off-by: Greg Kroah-Hartman commit 5c2d6a527b2c36d5bc0129784dc88e88f1d4afee Author: Greg Kroah-Hartman Date: Thu Nov 7 09:52:00 2019 +0100 crypto: hisilicon: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Zhou Wang Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191107085200.GB1274176@kroah.com Signed-off-by: Greg Kroah-Hartman commit 3ec1bd7693ee5bba69eaa1a2b74b14d37971769e Author: Alexandru Ardelean Date: Tue Nov 5 09:32:12 2019 +0200 uio: fix irq init with dt support & irq not defined This change also does a bit of a unification for the IRQ init code. But the actual problem is that UIO_IRQ_NONE == 0, so for the DT case where UIO_IRQ_NONE gets assigned to `uioinfo->irq`, a 2nd initialization will get triggered (for the IRQ) and this one will exit via `goto bad1`. As far as things seem to go, the only case where UIO_IRQ_NONE seems valid, is when using a device-tree. The driver has some legacy support for old platform_data structures. It looks like, for platform_data a non-existent IRQ is an invalid case (or was considered an invalid case). Which is why -ENXIO is treated only when a DT is used. Signed-off-by: Dragos Bogdan Signed-off-by: Alexandru Ardelean Acked-by: Damian Hobson-Garcia Link: https://lore.kernel.org/r/20191105073212.16719-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 2a9edd056ed4fbf9d2e797c3fc06335af35bccc4 Author: Jann Horn Date: Fri Oct 18 22:56:31 2019 +0200 binder: Handle start==NULL in binder_update_page_range() The old loop wouldn't stop when reaching `start` if `start==NULL`, instead continuing backwards to index -1 and crashing. Luckily you need to be highly privileged to map things at NULL, so it's not a big problem. Fix it by adjusting the loop so that the loop variable is always in bounds. This patch is deliberately minimal to simplify backporting, but IMO this function could use a refactor. The jump labels in the second loop body are horrible (the error gotos should be jumping to free_range instead), and both loops would look nicer if they just iterated upwards through indices. And the up_read()+mmput() shouldn't be duplicated like that. Cc: stable@vger.kernel.org Fixes: 457b9a6f09f0 ("Staging: android: add binder driver") Signed-off-by: Jann Horn Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20191018205631.248274-3-jannh@google.com Signed-off-by: Greg Kroah-Hartman commit a7a74d7ff55a0c657bc46238b050460b9eacea95 Author: Jann Horn Date: Fri Oct 18 22:56:30 2019 +0200 binder: Prevent repeated use of ->mmap() via NULL mapping binder_alloc_mmap_handler() attempts to detect the use of ->mmap() on a binder_proc whose binder_alloc has already been initialized by checking whether alloc->buffer is non-zero. Before commit 880211667b20 ("binder: remove kernel vm_area for buffer space"), alloc->buffer was a kernel mapping address, which is always non-zero, but since that commit, it is a userspace mapping address. A sufficiently privileged user can map /dev/binder at NULL, tricking binder_alloc_mmap_handler() into assuming that the binder_proc has not been mapped yet. This leads to memory unsafety. Luckily, no context on Android has such privileges, and on a typical Linux desktop system, you need to be root to do that. Fix it by using the mapping size instead of the mapping address to distinguish the mapped case. A valid VMA can't have size zero. Fixes: 880211667b20 ("binder: remove kernel vm_area for buffer space") Cc: stable@vger.kernel.org Signed-off-by: Jann Horn Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20191018205631.248274-2-jannh@google.com Signed-off-by: Greg Kroah-Hartman commit 8eb52a1ee37aafd9b796713aa0b3ab9cbc455be3 Author: Jann Horn Date: Fri Oct 18 22:56:29 2019 +0200 binder: Fix race between mmap() and binder_alloc_print_pages() binder_alloc_print_pages() iterates over alloc->pages[0..alloc->buffer_size-1] under alloc->mutex. binder_alloc_mmap_handler() writes alloc->pages and alloc->buffer_size without holding that lock, and even writes them before the last bailout point. Unfortunately we can't take the alloc->mutex in the ->mmap() handler because mmap_sem can be taken while alloc->mutex is held. So instead, we have to locklessly check whether the binder_alloc has been fully initialized with binder_alloc_get_vma(), like in binder_alloc_new_buf_locked(). Fixes: 8ef4665aa129 ("android: binder: Add page usage in binder stats") Cc: stable@vger.kernel.org Signed-off-by: Jann Horn Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20191018205631.248274-1-jannh@google.com Signed-off-by: Greg Kroah-Hartman commit bf49d9dd6fef688733e2ddbd55f7bcb57df194e4 Author: Masahiro Yamada Date: Fri Oct 18 13:50:53 2019 +0900 export,module: add SPDX GPL-2.0 license identifier to headers with no license Commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license") took care of a lot of files without any license information. These headers were not processed by the tool perhaps because they contain "GPL" in the code. I do not see any license boilerplate in them, so they fall back to GPL version 2 only, which is the project default. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20191018045053.8424-1-yamada.masahiro@socionext.com Signed-off-by: Greg Kroah-Hartman commit 492c88720d36eb662f9f10c1633f7726fbb07fc4 Author: Sami Tolvanen Date: Tue Nov 12 13:41:56 2019 -0800 driver core: platform: use the correct callback type for bus_find_device platform_find_device_by_driver calls bus_find_device and passes platform_match as the callback function. Casting the function to a mismatching type trips indirect call Control-Flow Integrity (CFI) checking. This change adds a callback function with the correct type and instead of casting the function, explicitly casts the second parameter to struct device_driver* as expected by platform_match. Fixes: 36f3313d6bff9 ("platform: Add platform_find_device_by_driver() helper") Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Cc: stable Link: https://lore.kernel.org/r/20191112214156.3430-1-samitolvanen@google.com Signed-off-by: Greg Kroah-Hartman commit a66ada4f241c9a5a0bbabc5af511ea5dd4c2cbb8 Author: Chunfeng Yun Date: Tue Nov 12 14:51:54 2019 +0800 usb: gadget: bcm63xx_udc: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-8-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit de4c73982cce5a3ac385d82924d0c1fc42ac3d57 Author: Chunfeng Yun Date: Tue Nov 12 14:51:53 2019 +0800 usb: dwc2: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move dwc2's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit b3c69ec8e2326980e83a7b0f4d0fb78778f1299a Author: Chunfeng Yun Date: Tue Nov 12 14:51:52 2019 +0800 usb: musb: dsps: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move dsps's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-6-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 54ef0b39ec50e5274909ce0f66cbf2c8b00d2723 Author: Chunfeng Yun Date: Tue Nov 12 14:51:47 2019 +0800 media: uvcvideo: drop error check of debugfs_create_dir() No need check the return value of debugfs_create_dir() Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit dcf5a2c390a3c956fc66bb52b1d69c0ad27298a6 Author: Chunfeng Yun Date: Tue Nov 12 14:51:50 2019 +0800 usb: dwc3: create debugfs directory under usb root Now the USB gadget subsystem can use the USB debugfs root directory, so move dwc3's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ee93c83bf7565ef5ff29438dd71732162afdc3af Author: Chunfeng Yun Date: Tue Nov 12 14:51:49 2019 +0800 usb: host: imx21: create debugfs directory under usb root Move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit b8029ba97b3124cbb86be045b38ac933d4e8f0ae Author: Chunfeng Yun Date: Tue Nov 12 14:51:48 2019 +0800 usb: chipidea: debug: create debugfs directory under usb root Move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1573541519-28488-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ba9f0f6eff1a34971f345cd04b13200c1d0b9b83 Author: Peter Ujfalusi Date: Wed Nov 13 11:48:38 2019 +0200 usb: renesas_usbhs: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113094838.2141-1-peter.ujfalusi@ti.com Signed-off-by: Greg Kroah-Hartman commit 8c7128c4cf4e0e6eb67bd65b4dbe619c3d297bb6 Author: Jules Irenge Date: Wed Nov 13 11:00:52 2019 +0000 staging: align to fix warnings of line over 80 characters Align to fix multiple warnings of line over 80 characters. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191113110052.14855-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7a3674898de30ede4a1fa1724016b5bc4f14604c Author: Colin Ian King Date: Wed Nov 13 16:42:10 2019 +0000 staging: exfat: fix indentation issue There is a declaration that requires indentation. Add in the missing tab. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191113164210.103586-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit a320e9fa1e2680116d165b9369dfa41d7cc1e1d1 Author: Pavel Begunkov Date: Thu Nov 14 00:11:01 2019 +0300 io_uring: Fix getting file for non-fd opcodes For timeout requests and bunch of others io_uring tries to grab a file with specified fd, which is usually stdin/fd=0. Update io_op_needs_file() Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9d858b21483981db9c0cb4b184d4cdeb4bc525c2 Author: Bob Liu Date: Wed Nov 13 18:06:25 2019 +0800 io_uring: introduce req_need_defer() Makes the code easier to read. Signed-off-by: Bob Liu Signed-off-by: Jens Axboe commit 2f6d9b9d6357ede64a29437676884ee263039910 Author: Bob Liu Date: Wed Nov 13 18:06:24 2019 +0800 io_uring: clean up io_uring_cancel_files() We don't use the return value anymore, drop it. Also drop the unecessary double cancel_req value check. Signed-off-by: Bob Liu Signed-off-by: Jens Axboe commit e61df66c69b11bc050d233dc95714a6339192c28 Author: Jens Axboe Date: Wed Nov 13 13:54:49 2019 -0700 io-wq: ensure free/busy list browsing see all items We have two lists for workers in io-wq, a busy and a free list. For certain operations we want to browse all workers, and we currently do that by browsing the two separate lists. But since these lists are RCU protected, we can potentially miss workers if they move between the two lists while we're browsing them. Add a third list, all_list, that simply holds all workers. A worker is added to that list when it starts, and removed when it exits. This makes the worker iteration cleaner, too. Reported-by: Paul E. McKenney Reviewed-by: Paul E. McKenney Signed-off-by: Jens Axboe commit f368b29ba917ac202c3901019b78f15f4d773085 Author: Darrick J. Wong Date: Tue Nov 12 20:40:00 2019 -0800 xfs: fix another missing include Fix missing include of xfs_filestream.h in xfs_filestream.c so that we actually check the function declarations against the definitions. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 8234532fd4006266c2e5a4cb1cd98925fb9f3a4b Author: Christoph Hellwig Date: Tue Nov 12 21:12:15 2019 -0800 xfs: remove XFS_IOC_FSSETDM and XFS_IOC_FSSETDM_BY_HANDLE Thes ioctls set DMAPI specific flags in the on-disk inode, but there is no way to actually ever query those flags. The only known user is xfsrestore with the -D option, which is documented to be only useful inside a DMAPI enviroment, which isn't supported by upstream XFS. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit eb0d21637f893b545a320595e8b3ebef5b819433 Author: YueHaibing Date: Tue Nov 12 20:11:32 2019 -0800 xfs: remove duplicated include from xfs_dir2_data.c Remove duplicated include. Signed-off-by: YueHaibing Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a55cefccaaa825169f8649fd3b2a78b15893e7a9 Author: Eric Sandeen Date: Tue Nov 12 17:04:28 2019 -0800 xfs: remove unused structure members & simple typedefs Remove some unused typedef'd simple types, and some unused structure members. Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 35dab307c8e912306cf38d974d3c7f7adc090bce Author: Eric Sandeen Date: Tue Nov 12 17:04:28 2019 -0800 xfs: remove unused typedef definitions Remove some typdefs for type_t's that are no longer referred to by their typedef'd types. Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1cc95e6f0d7cfd61c9d3c5cdd4e7345b173f764f Author: Pavel Reichl Date: Tue Nov 12 17:04:27 2019 -0800 xfs: Replace function declaration by actual definition Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong [darrick: fix typo in subject line] Signed-off-by: Darrick J. Wong commit d0bdfb106907e4a3ef4f25f6d27e392abf41f3a0 Author: Pavel Reichl Date: Tue Nov 12 17:04:27 2019 -0800 xfs: remove the xfs_qoff_logitem_t typedef Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong [darrick: fix a comment] Signed-off-by: Darrick J. Wong commit fd8b81dbbb23d4a3508cfac83256b4f5e770941c Author: Pavel Reichl Date: Tue Nov 12 17:04:26 2019 -0800 xfs: remove the xfs_dq_logitem_t typedef Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c072fbefe48e49be1ee1bfe9a28fdbb4a6830559 Author: Pavel Reichl Date: Tue Nov 12 17:04:26 2019 -0800 xfs: remove the xfs_quotainfo_t typedef Signed-off-by: Pavel Reichl Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit dfce90259d74d34cff4cb0c75ecfc0336c09520f Merge: 2248a28384fe ea0b163b13ff Author: Dave Airlie Date: Thu Nov 14 11:06:01 2019 +1000 Backmerge i915 security patches from commit 'ea0b163b13ff' into drm-next This backmerges the branch that ended up in Linus' tree. It removes all the changes for the rc6 patches from Linus' tree in favour of a patch that is based on a large refactor that occured. Otherwise it all looks good. Signed-off-by: Dave Airlie commit 2248a28384fedb84d1d068383bbec113cc4ce0fe Author: Imre Deak Date: Thu Oct 17 16:38:31 2019 +0300 drm/i915/gen8+: Add RC6 CTX corruption WA In some circumstances the RC6 context can get corrupted. We can detect this and take the required action, that is disable RC6 and runtime PM. The HW recovers from the corrupted state after a system suspend/resume cycle, so detect the recovery and re-enable RC6 and runtime PM. v2: rebase (Mika) v3: - Move intel_suspend_gt_powersave() to the end of the GEM suspend sequence. - Add commit message. v4: - Rebased on intel_uncore_forcewake_put(i915->uncore, ...) API change. v5: - Rebased on latest upstream gt_pm refactoring. v6: - s/i915_rc6_/intel_rc6_/ - Don't return a value from i915_rc6_ctx_wa_check(). v7: - Rebased on latest gt rc6 refactoring. Signed-off-by: Imre Deak Signed-off-by: Mika Kuoppala [airlied: pull this later version of this patch into drm-next to make resolving the conflict mess easier.] Signed-off-by: Dave Airlie commit 030cc787c30eb90e5a386ae459b4b7b6d62b3caf Author: Mark Salyzyn Date: Wed Nov 13 14:54:26 2019 -0800 firmware_class: make firmware caching configurable Because firmware caching generates uevent messages that are sent over a netlink socket, it can prevent suspend on many platforms. It's also not always useful, so make it a configurable option. Signed-off-by: Mark Salyzyn Cc: Tim Murray Cc: Venkata Narendra Kumar Gutta Cc: Luis Chamberlain Cc: Greg Kroah-Hartman Cc: Rafael J. Wysocki Cc: linux-kernel@vger.kernel.org Cc: kernel-team@android.com Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20191113225429.118495-1-salyzyn@android.com Signed-off-by: Greg Kroah-Hartman commit b9df3997bb3e144e1e86d9da934b82f98c28865a Author: Zhou Yanjie Date: Sun Nov 10 17:28:22 2019 +0800 clk: Ingenic: Add CGU driver for X1000. Add support for the clocks provided by the CGU in the Ingenic X1000 SoC, making use of the cgu code to do the heavy lifting. Signed-off-by: Zhou Yanjie Link: https://lkml.kernel.org/r/1573378102-72380-3-git-send-email-zhouyanjie@zoho.com Reviewed-by: Paul Cercueil Signed-off-by: Stephen Boyd commit 0b24748c3b26b9e55d195e11c7e9bed843ebff99 Author: Zhou Yanjie Date: Sun Nov 10 17:28:21 2019 +0800 dt-bindings: clock: Add X1000 bindings. Add the clock bindings for the X1000 Soc from Ingenic. Signed-off-by: Zhou Yanjie Link: https://lkml.kernel.org/r/1573378102-72380-2-git-send-email-zhouyanjie@zoho.com Reviewed-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 94bc7f56a8afd0522439a48162b8b8167c227c89 Merge: 3447fd0c9dce cee17a71656e Author: Dave Airlie Date: Thu Nov 14 09:28:30 2019 +1000 Merge tag 'arcpgu-updates-2019.07.18' of github.com:abrodkin/linux into drm-next This is a pretty simple improvement that allows to find encoder as the one and only (ARC PGU doesn't support more than one) endpoint instead of using non-standard "encoder-slave" property. Signed-off-by: Dave Airlie From: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/CY4PR1201MB0120FDB10A777345F9C27720A1C90@CY4PR1201MB0120.namprd12.prod.outlook.com commit a31414e8c98dadbe0d31804804090e78ab1e0e9f Author: YueHaibing Date: Sat Nov 9 11:42:26 2019 +0800 clk: tegra: Use match_string() helper to simplify the code match_string() returns the array index of a matching string. Use it instead of the open-coded implementation. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191109034226.21044-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 77adf9355304f8dcf09054280af5e23fc451ab3d Author: Mika Westerberg Date: Wed Oct 30 18:05:45 2019 +0300 ACPI / hotplug / PCI: Allocate resources directly under the non-hotplug bridge Valerio and others reported that commit 84c8b58ed3ad ("ACPI / hotplug / PCI: Don't scan bridges managed by native hotplug") prevents some recent LG and HP laptops from booting with endless loop of: ACPI Error: No handler or method for GPE 08, disabling event (20190215/evgpe-835) ACPI Error: No handler or method for GPE 09, disabling event (20190215/evgpe-835) ACPI Error: No handler or method for GPE 0A, disabling event (20190215/evgpe-835) ... What seems to happen is that during boot, after the initial PCI enumeration when EC is enabled the platform triggers ACPI Notify() to one of the root ports. The root port itself looks like this: pci 0000:00:1b.0: PCI bridge to [bus 02-3a] pci 0000:00:1b.0: bridge window [mem 0xc4000000-0xda0fffff] pci 0000:00:1b.0: bridge window [mem 0x80000000-0xa1ffffff 64bit pref] The BIOS has configured the root port so that it does not have I/O bridge window. Now when the ACPI Notify() is triggered ACPI hotplug handler calls acpiphp_native_scan_bridge() for each non-hotplug bridge (as this system is using native PCIe hotplug) and pci_assign_unassigned_bridge_resources() to allocate resources. The device connected to the root port is a PCIe switch (Thunderbolt controller) with two hotplug downstream ports. Because of the hotplug ports __pci_bus_size_bridges() tries to add "additional I/O" of 256 bytes to each (DEFAULT_HOTPLUG_IO_SIZE). This gets further aligned to 4k as that's the minimum I/O window size so each hotplug port gets 4k I/O window and the same happens for the root port (which is also hotplug port). This means 3 * 4k = 12k I/O window. Because of this pci_assign_unassigned_bridge_resources() ends up opening a I/O bridge window for the root port at first available I/O address which seems to be in range 0x1000 - 0x3fff. Normally this range is used for ACPI stuff such as GPE bits (below is part of /proc/ioports): 1800-1803 : ACPI PM1a_EVT_BLK 1804-1805 : ACPI PM1a_CNT_BLK 1808-180b : ACPI PM_TMR 1810-1815 : ACPI CPU throttle 1850-1850 : ACPI PM2_CNT_BLK 1854-1857 : pnp 00:05 1860-187f : ACPI GPE0_BLK However, when the ACPI Notify() happened this range was not yet reserved for ACPI/PNP (that happens later) so PCI gets it. It then starts writing to this range and accidentally stomps over GPE bits among other things causing the endless stream of messages about missing GPE handler. This problem does not happen if "pci=hpiosize=0" is passed in the kernel command line. The reason is that then the kernel does not try to allocate the additional 256 bytes for each hotplug port. Fix this by allocating resources directly below the non-hotplug bridges where a new device may appear as a result of ACPI Notify(). This avoids the hotplug bridges and prevents opening the additional I/O window. Fixes: 84c8b58ed3ad ("ACPI / hotplug / PCI: Don't scan bridges managed by native hotplug") Link: https://bugzilla.kernel.org/show_bug.cgi?id=203617 Link: https://lore.kernel.org/r/20191030150545.19885-1-mika.westerberg@linux.intel.com Reported-by: Valerio Passini Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Cc: stable@vger.kernel.org commit 46acbcb4849b2ca2e6e975e7c8130c1d61c8fd0c Author: Robert Jarzmik Date: Sat Oct 26 21:44:20 2019 +0200 clk: pxa: fix one of the pxa RTC clocks The pxa27x platforms have a single IP with 2 drivers, sa1100-rtc and rtc-pxa drivers. A previous patch fixed the sa1100-rtc case, but the pxa-rtc wasn't fixed. This patch completes the previous one. Fixes: 8b6d10345e16 ("clk: pxa: add missing pxa27x clocks for Irda and sa1100-rtc") Signed-off-by: Robert Jarzmik Link: https://lkml.kernel.org/r/20191026194420.11918-1-robert.jarzmik@free.fr Signed-off-by: Stephen Boyd commit 9629dbdabd1983ef53f125336e1d62d77b1620f9 Author: Baolin Wang Date: Tue Oct 8 15:41:38 2019 +0800 clk: sprd: Use IS_ERR() to validate the return value of syscon_regmap_lookup_by_phandle() The syscon_regmap_lookup_by_phandle() will never return NULL, thus use IS_ERR() to validate the return value instead of IS_ERR_OR_NULL(). Fixes: d41f59fd92f2 ("clk: sprd: Add common infrastructure") Signed-off-by: Baolin Wang Link: https://lkml.kernel.org/r/1995139bee5248ff3e9d46dc715968f212cfc4cc.1570520268.git.baolin.wang@linaro.org Signed-off-by: Stephen Boyd commit 3447fd0c9dce7e8f2a9a67ac2bfd8f61aa63da5d Merge: 0990ca235d91 a64fc11b9a52 Author: Dave Airlie Date: Thu Nov 14 08:51:02 2019 +1000 Merge tag 'drm-misc-next-fixes-2019-11-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-next - Fix memory leak in gpu debugfs node's release (Johan) Cc: Johan Hovold Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191113211056.GA78440@art_vandelay commit 0990ca235d9145ec40ed002f8ff7f6e1a910db4f Merge: 77e0723bd27f 53dbc27ad5a9 Author: Dave Airlie Date: Thu Nov 14 08:43:06 2019 +1000 Merge tag 'drm-next-5.5-2019-11-08' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.5-2019-11-08: amdgpu: - Enable VCN dynamic powergating on RV/RV2 - Fixes for Navi14 - Misc Navi fixes - Fix MSI-X tear down - Misc Arturus fixes - Fix xgmi powerstate handling - Documenation fixes scheduler: - Fix static code checker warning - Fix possible thread reactivation while thread is stopped - Avoid cleanup if thread is parked radeon: - SI dpm fix ported from amdgpu Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191108212713.5078-1-alexander.deucher@amd.com commit 15fbb2312f32cf99bd8e0247ac0240c9bce0ba47 Author: Christoph Hellwig Date: Wed Nov 13 16:03:26 2019 +0800 bcache: don't export symbols None of the exported bcache symbols are actually used anywhere. Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 651bbba57ada682a8651768df6979598e28e3b8d Author: Christoph Hellwig Date: Wed Nov 13 16:03:25 2019 +0800 bcache: remove the extra cflags for request.o There is no block directory this file needs includes from. Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 9fcc34b1a6dd4b8e5337e2b6ef45e428897eca6b Author: Coly Li Date: Wed Nov 13 16:03:24 2019 +0800 bcache: at least try to shrink 1 node in bch_mca_scan() In bch_mca_scan(), the number of shrinking btree node is calculated by code like this, unsigned long nr = sc->nr_to_scan; nr /= c->btree_pages; nr = min_t(unsigned long, nr, mca_can_free(c)); variable sc->nr_to_scan is number of objects (here is bcache B+tree nodes' number) to shrink, and pointer variable sc is sent from memory management code as parametr of a callback. If sc->nr_to_scan is smaller than c->btree_pages, after the above calculation, variable 'nr' will be 0 and nothing will be shrunk. It is frequeently observed that only 1 or 2 is set to sc->nr_to_scan and make nr to be zero. Then bch_mca_scan() will do nothing more then acquiring and releasing mutex c->bucket_lock. This patch checkes whether nr is 0 after the above calculation, if 0 is the result then set 1 to variable 'n'. Then at least bch_mca_scan() will try to shrink a single B+tree node. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit c5fcdedcee4e6ae15c0eb5e0fbe25467e57d2963 Author: Coly Li Date: Wed Nov 13 16:03:23 2019 +0800 bcache: add idle_max_writeback_rate sysfs interface For writeback mode, if there is no regular I/O request for a while, the writeback rate will be set to the maximum value (1TB/s for now). This is good for most of the storage workload, but there are still people don't what the maximum writeback rate in I/O idle time. This patch adds a sysfs interface file idle_max_writeback_rate to permit people to disable maximum writeback rate. Then the minimum writeback rate can be advised by writeback_rate_minimum in the bcache device's sysfs interface. Reported-by: Christian Balzer Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 5dccefd3ea0b33cf3e5a45cbccc7e0bf22791655 Author: Coly Li Date: Wed Nov 13 16:03:22 2019 +0800 bcache: add code comments in bch_btree_leaf_dirty() This patch adds code comments in bch_btree_leaf_dirty() to explain why w->journal should always reference the eldest journal pin of all the writing bkeys in the btree node. To make the bcache journal code to be easier to be understood. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 84c529aea182939e68f618ed9813740c9165c7eb Author: Andrea Righi Date: Wed Nov 13 16:03:21 2019 +0800 bcache: fix deadlock in bcache_allocator bcache_allocator can call the following: bch_allocator_thread() -> bch_prio_write() -> bch_bucket_alloc() -> wait on &ca->set->bucket_wait But the wake up event on bucket_wait is supposed to come from bch_allocator_thread() itself => deadlock: [ 1158.490744] INFO: task bcache_allocato:15861 blocked for more than 10 seconds. [ 1158.495929] Not tainted 5.3.0-050300rc3-generic #201908042232 [ 1158.500653] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1158.504413] bcache_allocato D 0 15861 2 0x80004000 [ 1158.504419] Call Trace: [ 1158.504429] __schedule+0x2a8/0x670 [ 1158.504432] schedule+0x2d/0x90 [ 1158.504448] bch_bucket_alloc+0xe5/0x370 [bcache] [ 1158.504453] ? wait_woken+0x80/0x80 [ 1158.504466] bch_prio_write+0x1dc/0x390 [bcache] [ 1158.504476] bch_allocator_thread+0x233/0x490 [bcache] [ 1158.504491] kthread+0x121/0x140 [ 1158.504503] ? invalidate_buckets+0x890/0x890 [bcache] [ 1158.504506] ? kthread_park+0xb0/0xb0 [ 1158.504510] ret_from_fork+0x35/0x40 Fix by making the call to bch_prio_write() non-blocking, so that bch_allocator_thread() never waits on itself. Moreover, make sure to wake up the garbage collector thread when bch_prio_write() is failing to allocate buckets. BugLink: https://bugs.launchpad.net/bugs/1784665 BugLink: https://bugs.launchpad.net/bugs/1796292 Signed-off-by: Andrea Righi Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 06c1526da97dd0022973de3fc41b79b2d431b435 Author: Coly Li Date: Wed Nov 13 16:03:20 2019 +0800 bcache: add code comment bch_keylist_pop() and bch_keylist_pop_front() This patch adds simple code comments for bch_keylist_pop() and bch_keylist_pop_front() in bset.c, to make the code more easier to be understand. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 41fa4deef90ba1cd048b740317f50b9decae9fc8 Author: Coly Li Date: Wed Nov 13 16:03:19 2019 +0800 bcache: deleted code comments for dead code in bch_data_insert_keys() In request.c:bch_data_insert_keys(), there is code comment for a piece of dead code. This patch deletes the dead code and its code comment since they are useless in practice. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit aaf8dbeab5865720c66db60ae8329309e81a0c9c Author: Coly Li Date: Wed Nov 13 16:03:18 2019 +0800 bcache: add more accurate error messages in read_super() Previous code only returns "Not a bcache superblock" for both bcache super block offset and magic error. This patch addss more accurate error messages, - for super block unmatched offset: "Not a bcache superblock (bad offset)" - for super block unmatched magic number: "Not a bcache superblock (bad magic)" Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 2d8869518a525c9bce5f5268419df9dfbe3dfdeb Author: Coly Li Date: Wed Nov 13 16:03:17 2019 +0800 bcache: fix static checker warning in bcache_device_free() Commit cafe56359144 ("bcache: A block layer cache") leads to the following static checker warning: ./drivers/md/bcache/super.c:770 bcache_device_free() warn: variable dereferenced before check 'd->disk' (see line 766) drivers/md/bcache/super.c 762 static void bcache_device_free(struct bcache_device *d) 763 { 764 lockdep_assert_held(&bch_register_lock); 765 766 pr_info("%s stopped", d->disk->disk_name); ^^^^^^^^^ Unchecked dereference. 767 768 if (d->c) 769 bcache_device_detach(d); 770 if (d->disk && d->disk->flags & GENHD_FL_UP) ^^^^^^^ Check too late. 771 del_gendisk(d->disk); 772 if (d->disk && d->disk->queue) 773 blk_cleanup_queue(d->disk->queue); 774 if (d->disk) { 775 ida_simple_remove(&bcache_device_idx, 776 first_minor_to_idx(d->disk->first_minor)); 777 put_disk(d->disk); 778 } 779 It is not 100% sure that the gendisk struct of bcache device will always be there, the warning makes sense when there is problem in block core. This patch tries to remove the static checking warning by checking d->disk to avoid NULL pointer deferences. Reported-by: Dan Carpenter Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 34cf78bf34d48dddddfeeadb44f9841d7864997a Author: Guoju Fang Date: Wed Nov 13 16:03:16 2019 +0800 bcache: fix a lost wake-up problem caused by mca_cannibalize_lock This patch fix a lost wake-up problem caused by the race between mca_cannibalize_lock and bch_cannibalize_unlock. Consider two processes, A and B. Process A is executing mca_cannibalize_lock, while process B takes c->btree_cache_alloc_lock and is executing bch_cannibalize_unlock. The problem happens that after process A executes cmpxchg and will execute prepare_to_wait. In this timeslice process B executes wake_up, but after that process A executes prepare_to_wait and set the state to TASK_INTERRUPTIBLE. Then process A goes to sleep but no one will wake up it. This problem may cause bcache device to dead. Signed-off-by: Guoju Fang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit c0e0954e909c17b43d176ab219fc598964616ae6 Author: Coly Li Date: Wed Nov 13 16:03:15 2019 +0800 bcache: fix fifo index swapping condition in journal_pin_cmp() Fifo structure journal.pin is implemented by a cycle buffer, if the back index reaches highest location of the cycle buffer, it will be swapped to 0. Once the swapping happens, it means a smaller fifo index might be associated to a newer journal entry. So the btree node with oldest journal entry won't be selected in bch_btree_leaf_dirty() to reference the dirty B+tree leaf node. This problem may cause bcache journal won't protect unflushed oldest B+tree dirty leaf node in power failure, and this B+tree leaf node is possible to beinconsistent after reboot from power failure. This patch fixes the fifo index comparing logic in journal_pin_cmp(), to avoid potential corrupted B+tree leaf node when the back index of journal pin is swapped. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit e2a7b9f4a19d3ecb8833ecba9e111e118e17f36c Merge: da644b2cc1a4 45422b704db3 Author: Jens Axboe Date: Wed Nov 13 15:41:21 2019 -0700 Merge branch 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.5/drivers Pull MD changes from Song. * 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid10: prevent access of uninitialized resync_pages offset md: avoid invalid memory access for array sb->dev_roles md/raid1: avoid soft lockup under high load commit 72c996099dc6fd83947a79cdac05625c6a52ffa6 Author: Dan Carpenter Date: Wed Nov 13 21:25:48 2019 +0300 cxgb4: Fix an error code in cxgb4_mqprio_alloc_hw_resources() "ret" is zero or possibly uninitialized on this error path. It should be a negative error code instead. Fixes: 2d0cb84dd973 ("cxgb4: add ETHOFLD hardware queue support") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit d41378713eef6a7d9d9c30cb9a6181ad72f69596 Author: Dan Carpenter Date: Wed Nov 13 21:31:58 2019 +0300 net: atlantic: Signedness bug in aq_vec_isr_legacy() irqreturn_t type is an enum and in this context it's unsigned, so "err" can't be irqreturn_t or it breaks the error handling. In fact the "err" variable is only used to store integers (never irqreturn_t) so it should be declared as int. I removed the initialization because it's not required. Using a bogus initializer turns off GCC's uninitialized variable warnings. Secondly, there is a GCC warning about unused assignments and we would like to enable that feature eventually so we have been trying to remove these unnecessary initializers. Fixes: 7b0c342f1f67 ("net: atlantic: code style cleanup") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit f4c47547b40a212f4eb017297f9d232ac09f7aaf Author: Greg Kroah-Hartman Date: Thu Nov 14 06:29:08 2019 +0800 Revert "serial-uartlite: Move the uart register" This reverts commit f33cf776617ba3b0f738cd70c31e0f62ea777a8d. As Johan says, this driver needs a lot more work and these changes are only going in the wrong direction: https://lkml.kernel.org/r/20190523091839.GC568@localhost Reported-by: Johan Hovold Cc: Shubhrajyoti Datta Cc: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 4c516896323109a5096f5049b3dbf04ad99af54d Author: Greg Kroah-Hartman Date: Thu Nov 14 06:28:40 2019 +0800 Revert "serial-uartlite: Add get serial id if not provided" This reverts commit 62104b280a5a5d999c562d8e8f4c6c4eb97fb013. As Johan says, this driver needs a lot more work and these changes are only going in the wrong direction: https://lkml.kernel.org/r/20190523091839.GC568@localhost Reported-by: Johan Hovold Cc: Shubhrajyoti Datta Cc: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 3128aad163d36d99247fc76b4efbbba2d5465cc4 Author: Venkat Duvvuru Date: Wed Nov 13 13:51:19 2019 -0500 bnxt_en: Fix array overrun in bnxt_fill_l2_rewrite_fields(). Fix the array overrun while keeping the eth_addr and eth_addr_mask pointers as u16 to avoid unaligned u16 access. These were overlooked when modifying the code to use u16 pointer for proper alignment. Fixes: 90f906243bf6 ("bnxt_en: Add support for L2 rewrite") Reported-by: Olof Johansson Signed-off-by: Venkat Duvvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 5d8508aa079a2aa70d1e67f087c47f459c30ca93 Author: Greg Kroah-Hartman Date: Thu Nov 14 06:28:15 2019 +0800 Revert "serial-uartlite: Do not use static struct uart_driver out of probe()" This reverts commit 3b209d253e7f8aa01fde0233d38a7239c8f7beb3. As Johan says, this driver needs a lot more work and these changes are only going in the wrong direction: https://lkml.kernel.org/r/20190523091839.GC568@localhost Reported-by: Johan Hovold Cc: Shubhrajyoti Datta Cc: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 07e5d4ff125ad0c77b129212801155d9f1bc5bdf Author: Greg Kroah-Hartman Date: Thu Nov 14 06:25:17 2019 +0800 Revert "serial-uartlite: Add runtime support" This reverts commit 0379b1163e509cfc4c18643b27231c04c78981ab. As Johan says, this driver needs a lot more work and these changes are only going in the wrong direction: https://lkml.kernel.org/r/20190523091839.GC568@localhost Reported-by: Johan Hovold Cc: Shubhrajyoti Datta Cc: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 84179981317fb4fb3e9df5acd42ea33cf6037793 Author: Paul Blakey Date: Tue Nov 12 00:34:30 2019 +0100 net/mlx5: TC: Offload flow table rules Since both tc rules and flow table rules are of the same format, we can re-use tc parsing for that, and move the flow table rules to their steering domain - In this case, the next chain after max tc chain. Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Acked-by: Pablo Neira Ayuso Signed-off-by: Saeed Mahameed commit 4383cfcc65e7879e1858da56954dae9fc20dfae9 Author: Michael Guralnik Date: Sun Oct 27 14:34:11 2019 +0200 net/mlx5: Add devlink reload Implement devlink reload for mlx5. Usage example: devlink dev reload pci/0000:06:00.0 Signed-off-by: Michael Guralnik Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 71c6eaebf06aa8353b0dcd57786b801b96fe2c08 Author: Michael Guralnik Date: Tue Oct 29 17:04:30 2019 +0200 net/mlx5e: Set netdev name space on creation Use devlink instance name space to set the netdev net namespace. Preparation patch for devlink reload implementation. Signed-off-by: Michael Guralnik Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 85bf490af1e2e4b6263898f0d47af13ee1bb4d28 Author: Eli Cohen Date: Thu Oct 31 09:00:43 2019 +0200 net/mlx5e: Fix error flow cleanup in mlx5e_tc_tun_create_header_ipv4/6 Be sure to release the neighbour in case of failures after successful route lookup. Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit e6014afd1c5717d556778ec1307cf7ab27ba5a2d Author: Eli Cohen Date: Wed Oct 30 16:48:15 2019 +0200 net/mlx5: Remove redundant NULL initializations Neighbour initializations to NULL are not necessary as the pointers are not used if an error is returned, and if success returned, pointers are initialized. Signed-off-by: Eli Cohen Reviewed-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit a7cba0a4d508d2d78f2932ee944feadd38c97c2c Author: Parav Pandit Date: Mon Oct 28 13:29:17 2019 -0500 net/mlx5: Read num_vfs before disabling SR-IOV mlx5_device_disable_sriov() currently reads num_vfs from the PCI core. However when mlx5_device_disable_sriov() is executed, SR-IOV is already disabled at the PCI level. Due to this disable_hca() cleanup is not done during SR-IOV disable flow. mlx5_sriov_disable() pci_enable_sriov() mlx5_device_disable_sriov() <- num_vfs is zero here. When SR-IOV enablement fails during mlx5_sriov_enable(), HCA's are left in enabled stage because mlx5_device_disable_sriov() relies on num_vfs from PCI core. mlx5_sriov_enable() mlx5_device_enable_sriov() pci_enable_sriov() <- Fails Hence, to overcome above issues, (a) Read num_vfs before disabling SR-IOV and use it. (b) Use num_vfs given when enabling sriov in error unwinding path. Fixes: d886aba677a0 ("net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs") Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed commit 86bb811b08086f98744ecc600907673af7f2aec5 Author: Alex Vesker Date: Sun Nov 10 18:10:13 2019 +0200 net/mlx5: DR, Fix matcher builders select check When selecting a matcher ste_builder_arr will always be evaluated as true, instead check if num_of_builders is set for validity. Fixes: 667f264676c7 ("net/mlx5: DR, Support IPv4 and IPv6 mixed matcher") Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed commit c94ef13b04e2382c8fcb876705ea505bff9fb714 Merge: 75a1ccfe6c72 975b992fdd4b Author: Saeed Mahameed Date: Wed Nov 13 14:12:37 2019 -0800 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 1) New generic devlink param "enable_roce", for downstream devlink reload support 2) Do vport ACL configuration on per vport basis when enabling/disabling a vport. This enables to have vports enabled/disabled outside of eswitch config for future 3) Split the code for legacy vs offloads mode and make it clear 4) Tide up vport locking and workqueue usage 5) Fix metadata enablement for ECPF 6) Make explicit use of VF property to publish IB_DEVICE_VIRTUAL_FUNCTION 7) E-Switch and flow steering core low level support and refactoring for netfilter flowtables offload Signed-off-by: Saeed Mahameed commit 5042ffbc95d92e8a282b744e312542d348cef4fe Author: Greg Kroah-Hartman Date: Thu Nov 14 06:22:56 2019 +0800 Revert "serial-uartlite: Change logic how console_port is setup" This reverts commit d338838c09dee338dd86f479f554d18401068978. As Johan says, this driver needs a lot more work and these changes are only going in the wrong direction: https://lkml.kernel.org/r/20190523091839.GC568@localhost Reported-by: Johan Hovold Cc: Shubhrajyoti Datta Cc: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 61ad2a021d1db456a61293927f2879c980e88273 Author: Greg Kroah-Hartman Date: Thu Nov 14 06:20:35 2019 +0800 Revert "serial-uartlite: Use allocated structure instead of static ones" This reverts commit a00d9db8952b44f4d165e5200fff03c80a84947f. As Johan says, this driver needs a lot more work and these changes are only going in the wrong direction: https://lkml.kernel.org/r/20190523091839.GC568@localhost Reported-by: Johan Hovold Cc: Shubhrajyoti Datta Cc: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 08a96e43e349887c03dfd47e0021bfe43f0ffb47 Merge: 1566a6a30bf4 8ae93b5ed9be Author: Linus Walleij Date: Wed Nov 13 23:11:09 2019 +0100 Merge tag 'intel-pinctrl-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v5.5-1 * Intel Tigerlake pin controller support has been added. * Miscellaneous fixes to the main and Cherryview drivers. * Refactoring of the context restoring in the main driver. The following is an automated git shortlog grouped by driver: cherryview: - Missed type change to unsigned int - Allocate IRQ chip dynamic - Fix spelling mistake in the comment - Fix irq_valid_mask calculation intel: - Missed type change to unsigned int - Add Intel Tiger Lake pin controller support - Use helper to restore register values on ->resume() - Drop level from warning to debug in intel_restore_hostown() - Introduce intel_restore_intmask() helper - Introduce intel_restore_hostown() helper - Introduce intel_restore_padcfg() helper - Avoid potential glitches if pin is in GPIO mode commit 1566a6a30bf4d85849bab7e389392d6d3de1530e Merge: 3af50e548019 d6d5df1db6e9 Author: Linus Walleij Date: Wed Nov 13 23:10:52 2019 +0100 Merge tag 'v5.4-rc5' into devel Linux 5.4-rc5 commit 4f9bbcefa142862782275a4b29f390ca8d8b9242 Author: Christoph Hellwig Date: Mon Oct 28 13:10:37 2019 +0100 riscv: add support for MMIO access to the timer registers When running in M-mode we can't use the SBI to set the timer, and don't have access to the time CSR as that usually is emulated by M-mode. Instead provide code that directly accesses the MMIO for the timer. Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel Acked-by: Thomas Gleixner # for drivers/clocksource [paul.walmsley@sifive.com: updated to apply; fixed checkpatch issue; timex.h now includes asm/mmio.h to resolve header file problems] Signed-off-by: Paul Walmsley commit b27f300f8cbd11b9298820910df9a7258af2f726 Author: Bartosz Golaszewski Date: Wed Nov 13 14:16:29 2019 +0100 gpiolib: fix coding style in gpiod_hog() There should be spaces between logical operators and their operands. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 1bcab70b782d6e2341ce47d6cca17c22a44ac6e4 Merge: 94fc6702d989 4a5e0f9e7351 Author: Linus Walleij Date: Wed Nov 13 23:03:23 2019 +0100 Merge tag 'intel-gpio-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel intel-gpio for v5.5-1 * Prerequisite patch against GPIO library to register pin ranges in time. * Second attempt to fix Intel Merrifield GPIO driver to utilize irqchip. The following is an automated git shortlog grouped by driver: gpiolib: - Introduce ->add_pin_ranges() callback merrifield: - Pass irqchip when adding gpiochip - Add GPIO <-> pin mapping ranges via callback commit 94fc6702d989a67dc8b115428bbda425a15afe8a Merge: 8b598e7f4e9b 0f67f16a6e88 Author: Linus Walleij Date: Wed Nov 13 23:00:54 2019 +0100 Merge tag 'gpio-v5.5-updates-for-linus-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio: updates for v5.5 - add MODULE_ALIAS() for bd70528 (makes it possible to autoload the module from user-space) - use proper irc_chip names in gpio-em and gpio-rcar - expose the line bias settings to user-space in the form of new request flags - expose a new ioctl() to user-space which allows to change certain proprties of requested lines without releasing them first - various updates for gpio-tegra186: debounce support, code simplification and interrupt routing - use platform_get_irq() in gpio-em for some code shrinkage - remove leftovers after recent gpio-mmio changes commit 975b992fdd4b38028d7c1dcf38286d6e7991c1b2 Author: Paul Blakey Date: Tue Nov 12 00:34:29 2019 +0100 net/mlx5: Add new chain for netfilter flow table offload Netfilter tables (nftables) implements a software datapath that comes after tc ingress datapath. The datapath supports offloading such rules via the flow table offload API. This API is currently only used by NFT and it doesn't provide the global priority in regards to tc offload, so we assume offloading such rules must come after tc. It does provide a flow table priority parameter, so we need to provide some supported priority range. For that, split fastpath prio to two, flow table offload and tc offload, with one dedicated priority chain for flow table offload. Next patch will re-use the multi chain API to access this chain by allowing access to this chain by the fdb_sub_namespace. Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Acked-by: Pablo Neira Ayuso Signed-off-by: Saeed Mahameed commit 439e843f1f43640fd52530433d803db8585cd028 Author: Paul Blakey Date: Tue Nov 12 00:34:28 2019 +0100 net/mlx5: Refactor creating fast path prio chains Next patch will re-use this to add a new chain but in a different prio. Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Acked-by: Pablo Neira Ayuso Signed-off-by: Saeed Mahameed commit 34b13cb3eaa5ad205f4497da6420262da4940b9e Author: Paul Blakey Date: Tue Nov 12 00:34:27 2019 +0100 net/mlx5: Accumulate levels for chains prio namespaces Tc chains are implemented by creating a chained prio steering type, and inside it there is a namespace for each chain (FDB_TC_MAX_CHAINS). Each of those has a list of priorities. Currently, all namespaces in a prio start at the parent prio level. But since we can jump from chain (namespace) to another chain in the same prio, we need the levels for higher chains to be higher as well. So we created unused prios to account for levels in previous namespaces. Fix that by accumulating the namespaces levels if we are inside a chained type prio, and removing the unused prios. Fixes: 328edb499f99 ('net/mlx5: Split FDB fast path prio to multiple namespaces') Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Acked-by: Pablo Neira Ayuso Signed-off-by: Saeed Mahameed commit 4db7b98e943225dc2a7435811767e44f63640462 Author: Paul Blakey Date: Tue Nov 12 00:34:26 2019 +0100 net/mlx5: Define fdb tc levels per prio Define FDB_TC_LEVELS_PER_PRIO instead of magic number 2. This is the number of levels used by each tc prio table in the fdb. Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Acked-by: Pablo Neira Ayuso Signed-off-by: Saeed Mahameed commit 2cf2954bd7ffd8250ae257b45b96915003c26d7d Author: Paul Blakey Date: Tue Nov 12 00:34:25 2019 +0100 net/mlx5: Rename FDB_* tc related defines to FDB_TC_* defines Rename it to prepare for next patch that will add a different type of offload to the FDB. Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Acked-by: Pablo Neira Ayuso Signed-off-by: Saeed Mahameed commit 12063c2e4c0e38f36c0e6f0942cd138feed022b3 Author: Paul Blakey Date: Tue Nov 12 00:34:24 2019 +0100 net/mlx5: Simplify fdb chain and prio eswitch defines FDB_MAX_CHAIN and FDB_MAX_PRIO were defined differently depending on if CONFIG_MLX5_ESWITCH is enabled to save space on allocations. This is a minor space saving, and there is no real need for it. Simplify things instead, and define them the same in both cases. Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Acked-by: Pablo Neira Ayuso Signed-off-by: Saeed Mahameed commit 63f202e5edf161c2ccffa286a9a701e995427b15 Author: Rafael J. Wysocki Date: Wed Nov 13 01:03:24 2019 +0100 cpuidle: teo: Avoid using "early hits" incorrectly If the current state with the maximum "early hits" metric in teo_select() is also the one "matching" the expected idle duration, it will be used as the candidate one for selection even if its "misses" metric is greater than its "hits" metric, which is not correct. In that case, the candidate state should be shallower than the current one and its "early hits" metric should be the maximum among the idle states shallower than the current one. To make that happen, modify teo_select() to save the index of the state whose "early hits" metric is the maximum for the range of states below the current one and go back to that state if it turns out that the current one should be rejected. Fixes: 159e48560f51 ("cpuidle: teo: Fix "early hits" handling for disabled idle states") Signed-off-by: Rafael J. Wysocki commit b6495b7f004d01b9ecf9ed5fd31368241d3c5589 Author: Rafael J. Wysocki Date: Tue Nov 12 10:51:16 2019 +0100 cpuidle: teo: Exclude cpuidle overhead from computations One purpose of the computations in teo_update() is to determine whether or not the (saved) time till the next timer event and the measured idle duration fall into the same "bin", so avoid using values that include the cpuidle overhead to obtain the latter. Signed-off-by: Rafael J. Wysocki commit 8bf90f320d9ab4d642cdc0c1c5f05e8aa0a68db6 Author: Christoph Hellwig Date: Mon Oct 28 13:10:36 2019 +0100 riscv: implement remote sfence.i using IPIs The RISC-V ISA only supports flushing the instruction cache for the local CPU core. Currently we always offload the remote TLB flushing to the SBI, which then issues an IPI under the hoods. But with M-mode we do not have an SBI so we have to do it ourselves. IPI to the other nodes using the existing kernel helpers instead if we have native clint support and thus can IPI directly from the kernel. Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel [paul.walmsley@sifive.com: cleaned up code comment] Signed-off-by: Paul Walmsley commit 3320648ecc38190caad298fbbce949f591a10253 Author: Christoph Hellwig Date: Mon Oct 28 13:10:35 2019 +0100 riscv: cleanup the default power off implementation Move the sbi poweroff to a separate function and file that is only compiled if CONFIG_SBI is set. Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel Reviewed-by: Atish Patra [paul.walmsley@sifive.com: split the WFI fix into a separate patch] Signed-off-by: Paul Walmsley commit 3b03ac6bbd6ef6264d533791ac448e20bfb1858d Author: Christoph Hellwig Date: Mon Oct 28 13:10:34 2019 +0100 riscv: poison SBI calls for M-mode There is no SBI when we run in M-mode, so fail the compile for any code trying to use SBI calls. Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel Signed-off-by: Paul Walmsley commit eded8bc66a0c2c43a1789ac6c973e2c5d47eac12 Author: Damien Le Moal Date: Mon Oct 28 13:10:33 2019 +0100 riscv: don't allow selecting SBI based drivers for M-mode When running in M-mode we can't use SBI based drivers. Add a new CONFIG_RISCV_SBI that drivers that do SBI calls can depend on instead. Signed-off-by: Damien Le Moal Reviewed-by: Anup Patel Signed-off-by: Christoph Hellwig Signed-off-by: Paul Walmsley commit 3bdf364ada330e15842e1aa94f0738005d29667e Author: YueHaibing Date: Mon Nov 11 22:04:20 2019 +0800 clk: armada-xp: remove unused code drivers/clk/mvebu/armada-xp.c:171:38: warning: mv98dx3236_coreclks defined but not used [-Wunused-const-variable=] drivers/clk/mvebu/armada-xp.c:213:41: warning: mv98dx3236_gating_desc defined but not used [-Wunused-const-variable=] They are not used since commit 337072604224 ("clk: mvebu: Expand mv98dx3236-core-clock support"). Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191111140420.36092-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 36c2f9223e84c1aa84bfba90cb2e74b517c92a54 Author: Jens Axboe Date: Wed Nov 13 09:43:34 2019 -0700 io-wq: ensure we have a stable view of ->cur_work for cancellations worker->cur_work is currently protected by the lock of the wqe that the worker belongs to. When we send a signal to a worker, we need a stable view of ->cur_work, so we need to hold that lock. But this doesn't work so well, since we have the opposite order potentially on queueing work. If POLL_ADD is used with a signalfd, then io_poll_wake() is called with the signal lock, and that sometimes needs to insert work items. Add a specific worker lock that protects the current work item. Then we can guarantee that the task we're sending a signal is currently processing the exact work we think it is. Reported-by: Paul E. McKenney Reviewed-by: Paul E. McKenney Signed-off-by: Jens Axboe commit 75a1ccfe6c726ba33a2f9859d39deb2eba620583 Author: Bryan Whitehead Date: Wed Nov 13 11:33:15 2019 -0500 mscc.c: Add support for additional VSC PHYs Add support for the following VSC PHYs VSC8504, VSC8552, VSC8572 VSC8562, VSC8564, VSC8575, VSC8582 Updates for v2: Checked for NULL on input to container_of Changed a large if else series to a switch statement. Added a WARN_ON to make sure lowest nibble of mask is 0 Signed-off-by: Bryan Whitehead Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a64fc11b9a520c55ca34d82e5ca32274f49b6b15 Author: Johan Hovold Date: Thu Oct 10 15:13:30 2019 +0200 drm/msm: fix memleak on release If a process is interrupted while accessing the "gpu" debugfs file and the drm device struct_mutex is contended, release() could return early and fail to free related resources. Note that the return value from release() is ignored. Fixes: 4f776f4511c7 ("drm/msm/gpu: Convert the GPU show function to use the GPU state") Cc: stable # 4.18 Cc: Jordan Crouse Cc: Rob Clark Reviewed-by: Rob Clark Signed-off-by: Johan Hovold Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191010131333.23635-2-johan@kernel.org commit 945fe45759bc001c1f81e25fbe9a40b43e59f7b5 Author: Colin Ian King Date: Wed Nov 13 16:22:38 2019 +0000 net: ethernet: stmmac: fix indentation issue There is a return statement that is indented too deeply, remove the extraneous tab. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 622b2a0ab647d2755f2c1f1000d3403e86a69763 Author: Alex Deucher Date: Mon Nov 11 15:48:48 2019 -0500 drm/amdgpu/vcn: finish delay work before release resources flush/cancel delayed works before doing finalization to avoid concurrently requests. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit fddbfb1c6503b5218cec4b2bfa71ebd8177d97ba Author: Kenneth Feng Date: Tue Nov 12 16:27:11 2019 +0800 drm/amd/powerplay: read pcie speed/width info (v2) sysfs interface to read pcie speed&width info on navi1x. v2: fix warning (trivial) Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 73f0ec02d670a61afcef49bc0a74d42e324276ea Author: Eric Biggers Date: Tue Oct 29 13:41:41 2019 -0700 docs: fs-verity: mention statx() support Document that the statx() system call can now be used to check whether a file is a verity file. Signed-off-by: Eric Biggers commit 924e319416e3b5438e4587b7c3b9d64443e825f5 Author: Eric Biggers Date: Tue Oct 29 13:41:40 2019 -0700 f2fs: support STATX_ATTR_VERITY Set the STATX_ATTR_VERITY bit when the statx() system call is used on a verity file on f2fs. Signed-off-by: Eric Biggers commit 1f60719552786b10affc130558df88f08a5b6d7b Author: Eric Biggers Date: Tue Oct 29 13:41:39 2019 -0700 ext4: support STATX_ATTR_VERITY Set the STATX_ATTR_VERITY bit when the statx() system call is used on a verity file on ext4. Reviewed-by: Andreas Dilger Signed-off-by: Eric Biggers commit 3ad2522c64cff1f5aebb987b00683268f0cc7c29 Author: Eric Biggers Date: Tue Oct 29 13:41:38 2019 -0700 statx: define STATX_ATTR_VERITY Add a statx attribute bit STATX_ATTR_VERITY which will be set if the file has fs-verity enabled. This is the statx() equivalent of FS_VERITY_FL which is returned by FS_IOC_GETFLAGS. This is useful because it allows applications to check whether a file is a verity file without opening it. Opening a verity file can be expensive because the fsverity_info is set up on open, which involves parsing metadata and optionally verifying a cryptographic signature. This is analogous to how various other bits are exposed through both FS_IOC_GETFLAGS and statx(), e.g. the encrypt bit. Reviewed-by: Andreas Dilger Acked-by: Darrick J. Wong Signed-off-by: Eric Biggers commit c0d782a3ccdc614210f6c604e82e48fda3c7a4ca Author: Eric Biggers Date: Wed Oct 30 15:19:15 2019 -0700 docs: fs-verity: document first supported kernel version I had meant to replace these TODOs with the actual version when applying the patches, but forgot to do so. Do it now. Signed-off-by: Eric Biggers commit 1e37be7d27d086ca72c38af14a9783eb9d7e9fa9 Author: Lars Poeschel Date: Wed Nov 13 14:50:22 2019 +0100 nfc: pn533: pn533_phy_ops dev_[up, down] return int Change dev_up and dev_down functions of struct pn533_phy_ops to return int. This way the pn533 core can report errors in the phy layer to upper layers. The only user of this is currently uart.c and it is changed to report the error of a possibly failing call to serdev_device_open. Reported-by: coverity-bot Addresses-Coverity-ID: 1487395 ("Error handling issues") Fixes: c656aa4c27b1 ("nfc: pn533: add UART phy driver") Signed-off-by: Lars Poeschel Signed-off-by: David S. Miller commit d73cfd4283d9090b45337a93dddc43848039f14b Merge: 07f23d90478c 693463e8340d Author: David S. Miller Date: Wed Nov 13 12:12:34 2019 -0800 Merge tag 'ieee802154-for-davem-2019-11-13' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154-next 2019-11-13 An update from ieee802154 for *net-next* I waited until last minute to see if there are more patches coming in. Seems not and we will only have one change for ieee802154 this time. Yue Haibing removed an unused variable in the cc2520 driver. ==================== Signed-off-by: David S. Miller commit 7807759e4ad8d46347a5d52a0910269320b81e65 Author: Stefan Richter Date: Tue Nov 5 14:49:39 2019 +0100 firewire: core: code cleanup after vm_map_pages_zero introduction Commit 22660db89262 turned fw_iso_buffer_map_vma into a one-liner. There is no need to keep this in the core-iso.c collection of buffer management functions; put it inline into the sole user, the character device file driver. Signed-off-by: Stefan Richter commit b98c7518c5345ac5f930fd40ce9d8d2b8dc2ba06 Author: Arnd Bergmann Date: Mon Jun 18 16:19:24 2018 +0200 firewire: ohci: stop using get_seconds() for BUS_TIME The ohci driver uses the get_seconds() function to implement the 32-bit CSR_BUS_TIME register. This was added in 2010 commit a48777e03ad5 ("firewire: add CSR BUS_TIME support"). As get_seconds() returns a 32-bit value (on 32-bit architectures), it seems like a good fit for that register, but it is also deprecated because of the y2038/y2106 overflow problem, and should be replaced throughout the kernel with either ktime_get_real_seconds() or ktime_get_seconds(). I'm using the latter here, which uses monotonic time. This has the advantage of behaving better during concurrent settimeofday() updates or leap second adjustments and won't overflow a 32-bit integer, but the downside of using CLOCK_MONOTONIC instead of CLOCK_REALTIME is that the observed values are not related to external clocks. If we instead need UTC but can live with clock jumps or overflows, then we should use ktime_get_real_seconds() instead, retaining the existing behavior. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/lkml/20180711124923.1205200-1-arnd@arndb.de/ Reviewed-by: Clemens Ladisch Signed-off-by: Stefan Richter commit 77e0723bd27f830d0903225372aa778fe2975648 Merge: 3ca3a9eab708 31f4f5b495a6 Author: Dave Airlie Date: Thu Nov 14 05:53:10 2019 +1000 Merge v5.4-rc7 into drm-next We have the i915 security fixes to backmerge, but first let's clear the decks for other drivers to avoid a bigger mess. Signed-off-by: Dave Airlie commit e88982ad1bb12db699de96fbc07096359ef6176c Author: Bart Van Assche Date: Tue Nov 5 13:46:32 2019 -0800 RDMA/srpt: Report the SCSI residual to the initiator The code added by this patch is similar to the code that already exists in ibmvscsis_determine_resid(). This patch has been tested by running the following command: strace sg_raw -r 1k /dev/sdb 12 00 00 00 60 00 -o inquiry.bin |& grep resid= Link: https://lore.kernel.org/r/20191105214632.183302-1-bvanassche@acm.org Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1") Signed-off-by: Bart Van Assche Acked-by: Honggang Li Signed-off-by: Jason Gunthorpe commit 708edafa883186f55b24fa0c380242b5282f9105 Author: John Garry Date: Thu Nov 14 01:27:22 2019 +0800 sbitmap: Delete sbitmap_any_bit_clear() Since the only caller of this function has been deleted, delete this one also. Signed-off-by: John Garry Signed-off-by: Jens Axboe commit cb711b91a3c685192f2cabd3735ca3de04694ed8 Author: John Garry Date: Thu Nov 14 01:27:21 2019 +0800 blk-mq: Delete blk_mq_has_free_tags() and blk_mq_can_queue() These functions are not referenced, so delete them. Signed-off-by: John Garry Signed-off-by: Jens Axboe commit 07f23d90478ce33671eb6d070a81021ea0334c14 Author: Colin Ian King Date: Wed Nov 13 09:55:48 2019 +0000 net: sfp: fix spelling mistake "requies" -> "requires" There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit f285604a6b6f38bdf4ab025c856c6135ef7bea84 Merge: d7eaf962a90b 7897b071ac3b Author: David S. Miller Date: Wed Nov 13 11:45:42 2019 -0800 Merge branch 'net-macb-convert-to-phylink' Antoine Tenart says: ==================== net: macb: convert to phylink This series converts the MACB Ethernet driver to the Phylink framework. The MAC configuration is moved to the Phylink ops and Phylink helpers are now used in the ethtools functions. This helps to access the flow control and pauseparam logic and this will be helpful in the future for boards using this controller with SFP cages. Since v2: - Moved the Tx and Rx buffer initialization rework to its own patch. Since v1: - Stopped using state->link in mac_config and moved macb_set_tx_clk to the link_up helper.. - Fixed the node given to phylink_of_phy_connect. - Removed netif_carrier_off from macb_open. - Fixed the macb_get_wol logic. - Rewored macb_ioctl as suggested. - Added a call to phylink_destroy in macb_remove. - Fixed the suspend/resume case by calling phylink_start/stop in the resume/suspend helpers. I had to take the rtnl lock to do this, which might be something to discuss. ==================== Signed-off-by: David S. Miller commit 7897b071ac3b45a5788d084fc7f8a8ee9e5f07f0 Author: Antoine Tenart Date: Wed Nov 13 10:00:06 2019 +0100 net: macb: convert to phylink This patch converts the MACB Ethernet driver to the Phylink framework. The MAC configuration is moved to the Phylink ops and Phylink helpers are now used in the ethtools functions. This helps to access the flow control and pauseparam logic and this will be helpful in the future for boards using this controller with SFP cages. Tested-by: Alexandre Belloni Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 6e952d95cab1f6671c4da90ead4680572bb12ea7 Author: Antoine Tenart Date: Wed Nov 13 10:00:05 2019 +0100 net: macb: move the Tx and Rx buffer initialization into a function This patch moves the Tx and Rx buffer initialization into its own function. This does not modify the behaviour of the driver and will be helpful to convert the driver to phylink. Signed-off-by: Antoine Tenart Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit d7eaf962a90bf922c1ea2697933edfeca285a7d7 Author: Radhey Shyam Pandey Date: Wed Nov 13 10:51:23 2019 +0530 net: axienet: In kconfig remove arch dependency for axi_emac To enable xilinx axi_emac driver support on zynqmp ultrascale platform (ARCH64) there are two choices, mention ARCH64 as a dependency list and other is to check if this ARCH dependency list is really needed. Later approach seems more reasonable, so remove the obsolete ARCH dependency list for the axi_emac driver. Sanity test done for microblaze, zynq and zynqmp ultrascale platform. Signed-off-by: Radhey Shyam Pandey Signed-off-by: David S. Miller commit 208d70f562e563226df178ff8f969364972e9e99 Author: Yevgeny Kliteynik Date: Sun Nov 3 16:07:23 2019 +0200 IB/mlx5: Support flow counters offset for bulk counters Add support for flow steering counters action with a non-base counter ID (offset) for bulk counters. When creating a flow counter object, save the bulk value. This value is used when a flow action with a non-base counter ID is requested - to validate that the required offset is in the range of the allocated bulk. Link: https://lore.kernel.org/r/20191103140723.77411-1-leon@kernel.org Signed-off-by: Yevgeny Kliteynik Signed-off-by: Leon Romanovsky Reviewed-by: Mark Bloch Signed-off-by: Jason Gunthorpe commit 895badff2c2b68c67e77a4537754a46026d4c2d7 Merge: 90bc72b13c08 fd1ac07f3f17 Author: David S. Miller Date: Wed Nov 13 11:28:54 2019 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2019-11-13 1) Remove a unnecessary net_exit function from the xfrm interface. From Xin Long. 2) Assign xfrm4_udp_encap_rcv to a UDP socket only if xfrm is configured. From Alexey Dobriyan. ==================== Signed-off-by: David S. Miller commit 9320c7ddf968251073e8fcc7bbc376fd4c044f4c Merge: 54ecb8f7028c 3b0b4ebfd761 Author: Stephen Boyd Date: Wed Nov 13 11:27:45 2019 -0800 Merge tag 'v5.5-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: Adding a missing static declaration for clk_half_divider_ops and a number of improvements for the px30 clock tree. * tag 'v5.5-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: protect the pclk_usb_grf as critical on px30 clk: rockchip: add video-related niu clocks as critical on px30 clk: rockchip: move px30 critical clocks to correct clock controller clk: rockchip: Add div50 clocks for px30 sdmmc, emmc, sdio and nandc clk: rockchip: Add div50 clock-ids for sdmmc on px30 and nandc clk: rockchip: make clk_half_divider_ops static commit 097064b841b74b137a7672e8daccd1384574ec9c Merge: 55ae8a11ee21 07b293c5b014 Author: Stephen Boyd Date: Wed Nov 13 11:18:57 2019 -0800 Merge tag 'tegra-for-5.5-clk-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-tegra Pull Tegra clk driver updates from Thierry Reding: The bulk of these changes implement suspend/resume support for Tegra210. In addition, some of the SOR clocks on earlier Tegra generations are reimplemented to more closely match the implementation on later chips, which in turn makes it possible to handle HDMI and DP support in a more unified way. * tag 'tegra-for-5.5-clk-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (21 commits) clk: tegra: Fix build error without CONFIG_PM_SLEEP clk: tegra: Add missing stubs for the case of !CONFIG_PM_SLEEP clk: tegra: Optimize PLLX restore on Tegra20/30 clk: tegra: Add suspend and resume support on Tegra210 clk: tegra: Share clk and rst register defines with Tegra clock driver clk: tegra: Use fence_udelay() during PLLU init clk: tegra: clk-dfll: Add suspend and resume support clk: tegra: clk-super: Add restore-context support clk: tegra: clk-super: Fix to enable PLLP branches to CPU clk: tegra: periph: Add restore_context support clk: tegra: Support for OSC context save and restore clk: tegra: pll: Save and restore pll context clk: tegra: pllout: Save and restore pllout context clk: tegra: divider: Save and restore divider rate clk: tegra: Reimplement SOR clocks on Tegra210 clk: tegra: Reimplement SOR clock on Tegra124 clk: tegra: Rename sor0_lvds to sor0_out clk: tegra: Move SOR0 implementation to Tegra124 clk: tegra: Remove last remains of TEGRA210_CLK_SOR1_SRC clk: tegra: Add Tegra20/30 EMC clock implementation ... commit 55ae8a11ee2124332cd676d59fa2e5425eb3555c Merge: 54ecb8f7028c d9b86cc48283 Author: Stephen Boyd Date: Wed Nov 13 11:16:58 2019 -0800 Merge tag 'tegra-for-5.5-clk-core-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-hw-parent-index Pull clk framework change from Thierry Reding: Contains a single core API addition that allows clock providers to query the parent index for a given struct clk_hw. This is used to implement suspend/resume support on Tegra SoCs. * tag 'tegra-for-5.5-clk-core-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: Add API to get index of the clock parent commit aefe69a45d84901c702f87672ec1e93de1d03f73 Author: Pavel Reichl Date: Tue Nov 12 17:04:02 2019 -0800 xfs: remove the xfs_disk_dquot_t and xfs_dquot_t Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong [darrick: fix some of the comments] Signed-off-by: Darrick J. Wong commit e8777b27ca8a6946bd69ad6a0f282e519c895e4b Author: Arnd Bergmann Date: Tue Nov 12 08:39:43 2019 -0800 xfs: avoid time_t in user api The ioctl definitions for XFS_IOC_SWAPEXT, XFS_IOC_FSBULKSTAT and XFS_IOC_FSBULKSTAT_SINGLE are part of libxfs and based on time_t. The definition for time_t differs between current kernels and coming 32-bit libc variants that define it as 64-bit. For most ioctls, that means the kernel has to be able to handle two different command codes based on the different structure sizes. The same solution could be applied for XFS_IOC_SWAPEXT, but it would not work for XFS_IOC_FSBULKSTAT and XFS_IOC_FSBULKSTAT_SINGLE because the structure with the time_t is passed through an indirect pointer, and the command number itself is based on struct xfs_fsop_bulkreq, which does not differ based on time_t. This means any solution that can be applied requires a change of the ABI definition in the xfs_fs.h header file, as well as doing the same change in any user application that contains a copy of this header. The usual solution would be to define a replacement structure and use conditional compilation for the ioctl command codes to use one or the other, such as #define XFS_IOC_FSBULKSTAT_OLD _IOWR('X', 101, struct xfs_fsop_bulkreq) #define XFS_IOC_FSBULKSTAT_NEW _IOWR('X', 129, struct xfs_fsop_bulkreq) #define XFS_IOC_FSBULKSTAT ((sizeof(time_t) == sizeof(__kernel_long_t)) ? \ XFS_IOC_FSBULKSTAT_OLD : XFS_IOC_FSBULKSTAT_NEW) After this, the kernel would be able to implement both XFS_IOC_FSBULKSTAT_OLD and XFS_IOC_FSBULKSTAT_NEW handlers on 32-bit architectures with the correct ABI for either definition of time_t. However, as long as two observations are true, a much simpler solution can be used: 1. xfsprogs is the only user space project that has a copy of this header 2. xfsprogs already has a replacement for all three affected ioctl commands, based on the xfs_bulkstat structure to pass 64-bit timestamps regardless of the architecture Based on those assumptions, changing xfs_bstime to use __kernel_long_t instead of time_t in both the kernel and in xfsprogs preserves the current ABI for any libc definition of time_t and solves the problem of passing 64-bit timestamps to 32-bit user space. If either of the two assumptions is invalid, more discussion is needed for coming up with a way to fix as much of the affected user space code as possible. Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 93597ae8dac0149b5c00b787cba6bf7ba213e666 Author: kaixuxia Date: Tue Nov 12 08:34:23 2019 -0800 xfs: Fix deadlock between AGI and AGF when target_ip exists in xfs_rename() When target_ip exists in xfs_rename(), the xfs_dir_replace() call may need to hold the AGF lock to allocate more blocks, and then invoking the xfs_droplink() call to hold AGI lock to drop target_ip onto the unlinked list, so we get the lock order AGF->AGI. This would break the ordering constraint on AGI and AGF locking - inode allocation locks the AGI, then can allocate a new extent for new inodes, locking the AGF after the AGI. In this patch we check whether the replace operation need more blocks firstly. If so, acquire the agi lock firstly to preserve locking order(AGI/AGF). Actually, the locking order problem only occurs when we are locking the AGI/AGF of the same AG. For multiple AGs the AGI lock will be released after the transaction committed. Signed-off-by: kaixuxia Reviewed-by: Darrick J. Wong [darrick: reword the comment] Signed-off-by: Darrick J. Wong commit 048a35d2f0b4cfeb24cbb7fe59e78124d8e7dc73 Author: Christoph Hellwig Date: Tue Nov 12 08:24:29 2019 -0800 xfs: don't reset the "inode core" in xfs_iread We have the exact same memset in xfs_inode_alloc, which is always called just before xfs_iread. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit de7a866fd41b227b0aa6e9cbeb0dae221c12f542 Author: Christoph Hellwig Date: Tue Nov 12 08:22:54 2019 -0800 xfs: merge the projid fields in struct xfs_icdinode There is no point in splitting the fields like this in an purely in-memory structure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8d2d878db897d7501aaa2f72e10bb28295bb5498 Author: Christoph Hellwig Date: Tue Nov 12 08:20:42 2019 -0800 xfs: use a struct timespec64 for the in-core crtime struct xfs_icdinode is purely an in-memory data structure, so don't use a log on-disk structure for it. This simplifies the code a bit, and also reduces our include hell slightly. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: fix a minor indenting problem in xfs_trans_ichgtime] Signed-off-by: Darrick J. Wong commit d8d11fc703a22bbe3939e08b08396fa6b816719a Author: Christoph Hellwig Date: Mon Nov 11 12:59:26 2019 -0800 xfs: devirtualize ->m_dirnameops Instead of causing a relatively expensive indirect call for each hashing and comparism of a file name in a directory just use an inline function and a simple branch on the ASCII CI bit. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: fix unused variable warning] Signed-off-by: Darrick J. Wong commit 537dabcfdbc1513408b156a80a6cfa03ea7d4d3f Author: Christoph Hellwig Date: Mon Nov 11 12:59:25 2019 -0800 xfs: remove the unused m_chsize field Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a71895c5dad1ab8cf30622e208d148298ab602e5 Author: Darrick J. Wong Date: Mon Nov 11 12:53:22 2019 -0800 xfs: convert open coded corruption check to use XFS_IS_CORRUPT Convert the last of the open coded corruption check and report idioms to use the XFS_IS_CORRUPT macro. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit bcb8af5c46e452018de9b58db1fd0ffd94b5d96c Author: Arnaldo Carvalho de Melo Date: Wed Nov 13 16:06:28 2019 -0300 perf maps: Purge the entries from maps->names in __maps__purge() No need to iterate via the ->names rbtree, as all the entries there as in maps->entries as well, reuse __maps__purge() for that. Doing it this way we can kill maps__for_each_entry_by_name(), maps__for_each_entry_by_name_safe(), maps__{first,next}_by_name(). Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ps0nrio8pydyo23rr2s696ue@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7d7230652e7c788ef908536fd79f4cca077f269f Author: Jens Axboe Date: Tue Nov 12 22:31:31 2019 -0700 io_wq: add get/put_work handlers to io_wq_create() For cancellation, we need to ensure that the work item stays valid for as long as ->cur_work is valid. Right now we can't safely dereference the work item even under the wqe->lock, because while the ->cur_work pointer will remain valid, the work could be completing and be freed in parallel. Only invoke ->get/put_work() on items we know that the caller queued themselves. Add IO_WQ_WORK_INTERNAL for io-wq to use, which is needed when we're queueing a flush item, for instance. Signed-off-by: Jens Axboe commit 15dff286d0e0087d4dcd7049911f179e4e4cfd94 Author: Jens Axboe Date: Wed Nov 13 09:09:23 2019 -0700 io_uring: check for validity of ->rings in teardown Normally the rings are always valid, the exception is if we failed to allocate the rings at setup time. syzbot reports this: RSP: 002b:00007ffd6e8aa078 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441229 RDX: 0000000000000002 RSI: 0000000020000140 RDI: 0000000000000d0d RBP: 00007ffd6e8aa090 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 8903 Comm: syz-executor410 Not tainted 5.4.0-rc7-next-20191113 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline] RIP: 0010:__io_commit_cqring fs/io_uring.c:496 [inline] RIP: 0010:io_commit_cqring+0x1e1/0xdb0 fs/io_uring.c:592 Code: 03 0f 8e df 09 00 00 48 8b 45 d0 4c 8d a3 c0 00 00 00 4c 89 e2 48 c1 ea 03 44 8b b8 c0 01 00 00 48 b8 00 00 00 00 00 fc ff df <0f> b6 14 02 4c 89 e0 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 61 RSP: 0018:ffff88808f51fc08 EFLAGS: 00010006 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff815abe4a RDX: 0000000000000018 RSI: ffffffff81d168d5 RDI: ffff8880a9166100 RBP: ffff88808f51fc70 R08: 0000000000000004 R09: ffffed1011ea3f7d R10: ffffed1011ea3f7c R11: 0000000000000003 R12: 00000000000000c0 R13: ffff8880a91661c0 R14: 1ffff1101522cc10 R15: 0000000000000000 FS: 0000000001e7a880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000140 CR3: 000000009a74c000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: io_cqring_overflow_flush+0x6b9/0xa90 fs/io_uring.c:673 io_ring_ctx_wait_and_kill+0x24f/0x7c0 fs/io_uring.c:4260 io_uring_create fs/io_uring.c:4600 [inline] io_uring_setup+0x1256/0x1cc0 fs/io_uring.c:4626 __do_sys_io_uring_setup fs/io_uring.c:4639 [inline] __se_sys_io_uring_setup fs/io_uring.c:4636 [inline] __x64_sys_io_uring_setup+0x54/0x80 fs/io_uring.c:4636 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x441229 Code: e8 5c ae 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 bb 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffd6e8aa078 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441229 RDX: 0000000000000002 RSI: 0000000020000140 RDI: 0000000000000d0d RBP: 00007ffd6e8aa090 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace b0f5b127a57f623f ]--- RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline] RIP: 0010:__io_commit_cqring fs/io_uring.c:496 [inline] RIP: 0010:io_commit_cqring+0x1e1/0xdb0 fs/io_uring.c:592 Code: 03 0f 8e df 09 00 00 48 8b 45 d0 4c 8d a3 c0 00 00 00 4c 89 e2 48 c1 ea 03 44 8b b8 c0 01 00 00 48 b8 00 00 00 00 00 fc ff df <0f> b6 14 02 4c 89 e0 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 61 RSP: 0018:ffff88808f51fc08 EFLAGS: 00010006 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff815abe4a RDX: 0000000000000018 RSI: ffffffff81d168d5 RDI: ffff8880a9166100 RBP: ffff88808f51fc70 R08: 0000000000000004 R09: ffffed1011ea3f7d R10: ffffed1011ea3f7c R11: 0000000000000003 R12: 00000000000000c0 R13: ffff8880a91661c0 R14: 1ffff1101522cc10 R15: 0000000000000000 FS: 0000000001e7a880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000140 CR3: 000000009a74c000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 which is exactly the case of failing to allocate the SQ/CQ rings, and then entering shutdown. Check if the rings are valid before trying to access them at shutdown time. Reported-by: syzbot+21147d79607d724bd6f3@syzkaller.appspotmail.com Fixes: 1d7bb1d50fb4 ("io_uring: add support for backlogged CQ ring") Signed-off-by: Jens Axboe commit f0797095423e6ea3b4be61134ee353c7f504d440 Author: Aleksander Morgado Date: Wed Nov 13 11:14:05 2019 +0100 USB: serial: option: add support for Foxconn T77W968 LTE modules These are the Foxconn-branded variants of the Dell DW5821e modules, same USB layout as those. The device exposes AT, NMEA and DIAG ports in both USB configurations. P: Vendor=0489 ProdID=e0b4 Rev=03.18 S: Manufacturer=FII S: Product=T77W968 LTE S: SerialNumber=0123456789ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option P: Vendor=0489 ProdID=e0b4 Rev=03.18 S: Manufacturer=FII S: Product=T77W968 LTE S: SerialNumber=0123456789ABCDEF C: #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) Signed-off-by: Aleksander Morgado [ johan: drop id defines ] Cc: stable Signed-off-by: Johan Hovold commit 5326de9e94bedcf7366e7e7625d4deb8c1f1ca8a Author: Trond Myklebust Date: Wed Nov 13 09:39:36 2019 +0100 NFSv4.x: Drop the slot if nfs4_delegreturn_prepare waits for layoutreturn If nfs4_delegreturn_prepare needs to wait for a layoutreturn to complete then make sure we drop the sequence slot if we hold it. Fixes: 1c5bd76d17cc ("pNFS: Enable layoutreturn operation for return-on-close") Signed-off-by: Trond Myklebust commit 5c441544f045e679afd6c3c6d9f7aaf5fa5f37b0 Author: Trond Myklebust Date: Wed Nov 13 08:34:00 2019 +0100 NFSv4.x: Handle bad/dead sessions correctly in nfs41_sequence_process() If the server returns a bad or dead session error, the we don't want to update the session slot number, but just immediately schedule recovery and allow it to proceed. We can/should then remove handling in other places Fixes: 3453d5708b33 ("NFSv4.1: Avoid false retries when RPC calls are interrupted") Signed-off-by: Trond Myklebust commit 6bb41b70c470d8ff65c1ef777273c150715a4e4c Author: Ulf Hansson Date: Mon Nov 4 12:33:43 2019 +0100 MAINTAINERS: Mark vub300 mmc driver as orphan Tony's email address from elandigitalsystems.com has bounced for a long time. Let's update MAINTAINERS to mark the driver as orphan as to reflect the situation. Signed-off-by: Ulf Hansson commit c11113d5022cde167433737827436f7104b79977 Author: Ulf Hansson Date: Thu Oct 31 16:13:21 2019 +0100 mmc: vub300: Drop redundant host ops ->init_card() The ->init_card() host ops is printing message to the log, without actually doing something useful. Let's just drop this code. Signed-off-by: Ulf Hansson commit c9af138c42f07a0d6d8554a9bed85ca395ed0511 Author: Biju Das Date: Tue Sep 24 07:49:04 2019 +0100 mmc: renesas_sdhi_internal_dmac: Add r8a774b1 support This patch adds SDHI support for RZ/G2N (R8A774B1) SoC. Signed-off-by: Biju Das Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson commit a0d4c7eb71dd08a89ad631177bb0cbbabd598f84 Author: Chaotian Jing Date: Thu Sep 5 15:53:18 2019 +0800 mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response MMC IOCTLS with R1B responses may cause the card to enter the busy state, which means it's not ready to receive a new request. To prevent new requests from being sent to the card, use a CMD13 polling loop to verify that the card returns to the transfer state, before completing the request. Signed-off-by: Chaotian Jing Reviewed-by: Avri Altman Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 3869468e0c4800af52bfe1e0b72b338dcdae2cfc Author: Chaotian Jing Date: Thu Sep 5 15:53:17 2019 +0800 mmc: block: Make card_busy_detect() a bit more generic To prepare for more users of card_busy_detect(), let's drop the struct request * as an in-parameter and convert to log the error message via dev_err() instead of pr_err(). Signed-off-by: Chaotian Jing Reviewed-by: Avri Altman Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 22dc132d5448db1b1c021de0c34aa8033ca7d98f Author: Yangbo Lu Date: Wed Oct 9 15:41:40 2019 +0800 mmc: sdhci-of-esdhc: fix up erratum A-008171 workaround A previous patch implemented an incomplete workaround of erratum A-008171. The complete workaround is as below. This patch is to implement the complete workaround which uses SW tuning if HW tuning fails, and retries both HW/SW tuning once with reduced clock if workaround fails. This is suggested by hardware team, and the patch had been verified on LS1046A eSDHC + Phison 32G eMMC which could trigger the erratum. Workaround: /* For T1040, T2080, LS1021A, T1023 Rev 1: */ 1. Program TBPTR[TB_WNDW_END_PTR] = 3*DIV_RATIO. 2. Program TBPTR[TB_WNDW_START_PTR] = 5*DIV_RATIO. 3. Program the software tuning mode by setting TBCTL[TB_MODE] = 2'h3. 4. Set SYSCTL2[EXTN] and SYSCTL2[SAMPCLKSEL]. 5. Issue SEND_TUNING_BLK Command (CMD19 for SD, CMD21 for MMC). 6. Wait for IRQSTAT[BRR], buffer read ready, to be set. 7. Clear IRQSTAT[BRR]. 8. Check SYSCTL2[EXTN] to be cleared. 9. Check SYSCTL2[SAMPCLKSEL], Sampling Clock Select. It's set value indicate tuning procedure success, and clear indicate failure. In case of tuning failure, fixed sampling scheme could be used by clearing TBCTL[TB_EN]. /* For LS1080A Rev 1, LS2088A Rev 1.0, LA1575A Rev 1.0: */ 1. Read the TBCTL[31:0] register. Write TBCTL[11:8]=4'h8 and wait for 1ms. 2. Read the TBCTL[31:0] register and rewrite again. Wait for 1ms second. 3. Read the TBSTAT[31:0] register twice. 3.1 Reset data lines by setting ESDHCCTL[RSTD] bit. 3.2 Check ESDHCCTL[RSTD] bit. 3.3 If ESDHCCTL[RSTD] is 0, go to step 3.4 else go to step 3.2. 3.4 Write 32'hFFFF_FFFF to IRQSTAT register. 4. if TBSTAT[15:8]-TBSTAT[7:0] > 4*DIV_RATIO or TBSTAT[7:0]-TBSTAT[15:8] > 4*DIV_RATIO , then program TBPTR[TB_WNDW_END_PTR] = 4*DIV_RATIO and program TBPTR[TB_WNDW_START_PTR] = 8*DIV_RATIO. /* For LS1012A Rev1, LS1043A Rev 1.x, LS1046A 1.0: */ 1. Read the TBCTL[0:31] register. Write TBCTL[20:23]=4'h8 and wait for 1ms. 2. Read the TBCTL[0:31] register and rewrite again. Wait for 1ms second. 3. Read the TBSTAT[0:31] register twice. 3.1 Reset data lines by setting ESDHCCTL[RSTD] bit. 3.2 Check ESDHCCTL[RSTD] bit. 3.3 If ESDHCCTL[RSTD] is 0, go to step 3.4 else go to step 3.2. 3.4 Write 32'hFFFF_FFFF to IRQSTAT register. 4. if TBSTAT[16:23]-TBSTAT[24:31] > 4*DIV_RATIO or TBSTAT[24:31]- TBSTAT[16:23] > 4* DIV_RATIO , then program TBPTR[TB_WNDW_END_PTR] = 4*DIV_RATIO and program TBPTR[TB_WNDW_START_PTR] = 8*DIV_RATIO. /* For LS1080A Rev 1, LS2088A Rev 1.0, LA1575A Rev 1.0 LS1012A Rev1, * LS1043A Rev 1.x, LS1046A 1.0: */ 5. else program TBPTR[TB_WNDW_END_PTR] = 3*DIV_RATIO and program TBPTR[TB_WNDW_START_PTR] = 5*DIV_RATIO. 6. Program the software tuning mode by setting TBCTL[TB_MODE] = 2'h3. 7. Set SYSCTL2[EXTN], wait 1us and SYSCTL2[SAMPCLKSEL]. 8. Issue SEND_TUNING_BLK Command (CMD19 for SD, CMD21 for MMC). 9. Wait for IRQSTAT[BRR], buffer read ready, to be set. 10. Clear IRQSTAT[BRR]. 11. Check SYSCTL2[EXTN] to be cleared. 12. Check SYSCTL2[SAMPCLKSEL], Sampling Clock Select. It's set value indicate tuning procedure success, and clear indicate failure. In case of tuning failure, fixed sampling scheme could be used by clearing TBCTL[TB_EN]. Fixes: b1f378ab5334 ("mmc: sdhci-of-esdhc: add erratum A008171 support") Signed-off-by: Yinbo Zhu Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 6e32f65c14f13c728c3491499d45ecf8bb83efd4 Author: Yangbo Lu Date: Wed Oct 9 15:41:39 2019 +0800 mmc: sdhci-of-esdhc: poll ESDHC_FLUSH_ASYNC_FIFO bit until completion The ESDHC_FLUSH_ASYNC_FIFO bit which is set to flush asynchronous FIFO should be polled until it's auto cleared by hardware. Signed-off-by: Yangbo Lu Signed-off-by: Ulf Hansson commit 727d836a375adc49f824a80a824a7e91ddac9d88 Author: Nicolas Ferre Date: Tue Oct 8 14:34:32 2019 +0200 mmc: sdhci-of-at91: add DT property to enable calibration on full reset Add a property to keep the analog calibration cell powered. This feature is specific to the Microchip SDHCI IP and outside of the standard SDHCI register map. By always keeping it on, after a full reset sequence, we make sure that this feature is activated and not disabled. We expose a hardware property to the DT as this feature can be used to adapt SDHCI behavior vs. how the SDCAL SoC pin is connected on the board. Note that managing properly this property would reduce power consumption on some SAMA5D2 SiP revisions. Signed-off-by: Nicolas Ferre Acked-by: Ludovic Desroches Signed-off-by: Ulf Hansson commit 5cd41fe89704d4614562363d9051ee8bfdcf1ea1 Author: Nicolas Ferre Date: Tue Oct 8 14:34:31 2019 +0200 dt-bindings: sdhci-of-at91: add the microchip,sdcal-inverted property Add the specific microchip,sdcal-inverted property to at91 sdhci device binding. This optional property describes how the SoC SDCAL pin is connected. It could be handled at SiP, SoM or board level. This property read by at91 sdhci driver will allow to put in place a software workaround that would reduce power consumption. Signed-off-by: Nicolas Ferre Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson commit 61a14e5299bd526c30c00918f7195a89547c8667 Author: Ben Dooks Date: Wed Oct 9 12:54:15 2019 +0100 mmc: mmci: stm32: make sdmmc_idma_validate_data static Make sdmmc_idma_validate_data to avoid the following warning from sparse: drivers/mmc/host/mmci_stm32_sdmmc.c:28:5: warning: symbol 'sdmmc_idma_validate_data' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Ulf Hansson commit 315e3bd7ac19b18ba704d96cbb9b79bad485c01f Author: Adrian Hunter Date: Thu Oct 10 15:46:30 2019 +0300 mmc: sdhci-pci: Add support for Intel JSL Add PCI Ids for Intel JSL. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 80fe4e90665a9fa9da3d61df65c6667ab80c3294 Author: Zhou Yanjie Date: Sat Oct 12 13:13:20 2019 +0800 mmc: jz4740: Add support for Low Power Mode (LPM) Add support for low power mode to the Ingenic's MMC/SD Controller. Signed-off-by: Zhou Yanjie Signed-off-by: Ulf Hansson commit fea5fcc25788d5980f34a5ec4197ab06abfdf898 Author: Zhou Yanjie Date: Sat Oct 12 13:13:19 2019 +0800 mmc: jz4740: Add support for X1000 Add support for probing mmc driver on the X1000 Soc from Ingenic. Signed-off-by: Zhou Yanjie Signed-off-by: Ulf Hansson commit b5caac972801d19ff5c74c0cd3a13ea0844eb0b6 Author: Zhou Yanjie Date: Sat Oct 12 13:13:18 2019 +0800 dt-bindings: mmc: jz4740: Add bindings for X1000 Add the MMC bindings for the X1000 Soc from Ingenic. Signed-off-by: Zhou Yanjie Acked-by: Rob Herring Signed-off-by: Ulf Hansson commit 2af2af9940b0cec116c1e1f164b04476cdb013e5 Author: Zhou Yanjie Date: Sat Oct 12 13:13:17 2019 +0800 mmc: jz4740: Add support for JZ4760 Add support for probing mmc driver on the JZ4760 Soc from Ingenic. Signed-off-by: Zhou Yanjie Signed-off-by: Ulf Hansson commit 6d57e9cf8e584ebc7bfb1c02dae134f29399f802 Author: Zhou Yanjie Date: Sat Oct 12 13:13:16 2019 +0800 dt-bindings: mmc: jz4740: Add bindings for JZ4760 Add the MMC bindings for the JZ4760 Soc from Ingenic. Signed-off-by: Zhou Yanjie Acked-by: Rob Herring Signed-off-by: Ulf Hansson commit a02f8f48c194ba6bcbec780b720c3d5df4b0c25c Author: Zhou Yanjie Date: Sat Oct 12 13:13:15 2019 +0800 mmc: jz4740: Add 8bit mode support Add support for 8bit mode, now supports 1bit/4bit/8bit modes. Signed-off-by: Zhou Yanjie Signed-off-by: Ulf Hansson commit 38413ce39a4bd908c02257cd2f9e0c92b27886f4 Author: zhengbin Date: Fri Oct 4 17:44:20 2019 +0800 mmc: sdhci-pci: Make function amd_sdhci_reset static Fix sparse warnings: drivers/mmc/host/sdhci-pci-core.c:1599:6: warning: symbol 'amd_sdhci_reset' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: zhengbin Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit d1807ad6b7dedc5301e803f56d4ae28ecc56b99e Author: Ramuthevar Vadivel Murugan Date: Wed Oct 9 09:28:18 2019 +0800 mmc: sdhci-of-arasan: Add Support for Intel LGM SDXC The current arasan sdhci PHY configuration isn't compatible with the PHY on Intel's LGM(Lightning Mountain) SoC devices. Therefore, add a new compatible, to adapt the Intel's LGM SDXC PHY with arasan-sdhc controller to configure the PHY. Signed-off-by: Ramuthevar Vadivel Murugan Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit bdf659a65622c973c3c47e39be457b75b26b6867 Author: Ramuthevar Vadivel Murugan Date: Wed Oct 9 09:28:17 2019 +0800 dt-bindings: mmc: sdhci-of-arasan: Add new compatible for Intel LGM SDXC Add a new compatible to use the sdhc-arasan host controller driver with the SDXC PHY to support on Intel's Lightning Mountain(LGM) SoC. Signed-off-by: Ramuthevar Vadivel Murugan Signed-off-by: Ulf Hansson commit 0e68de6aa7b10eaaf8603d0e38aac62987f90682 Author: Ludovic Barre Date: Tue Oct 8 11:56:04 2019 +0200 mmc: mmci: sdmmc: add busy_complete callback This patch adds a specific busy_complete callback for sdmmc variant. sdmmc has 2 status flags: -busyd0: This is a hardware status flag (inverted value of d0 line). it does not generate an interrupt. -busyd0end: This indicates only end of busy following a CMD response. On busy to Not busy changes, an interrupt is generated (if unmask) and BUSYD0END status flag is set. Status flag is cleared by writing corresponding interrupt clear bit in MMCICLEAR. The legacy busy completion has no dedicated interrupt for the end of busy, so it's must monitor step by step the busy progression. On sdmmc variant, this procedure is not needed, it's just need to wait the busyd0end interrupt. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit cb0335b778c7c12a96c4360068ed344a79ea88a2 Author: Ludovic Barre Date: Tue Oct 8 11:56:03 2019 +0200 mmc: mmci: add busy_complete callback This patch adds busy_completion callback at mmci_host_ops to allow to define a specific busy completion by variant. The legacy code corresponding to busy completion used by ux500 variants is moved to ux500_busy_complete function. Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 8266c585f4897ceff0959bd64d196f164caa0601 Author: Ludovic Barre Date: Tue Oct 8 11:56:02 2019 +0200 mmc: mmci: add hardware busy timeout feature In the stm32_sdmmc variant, the datatimer is active not only during data transfers with the DPSM, but also while waiting for the busyend IRQs from commands having the MMC_RSP_BUSY flag set. This leads to an incorrect IRQ being raised to signal MCI_DATATIMEOUT error, which simply breaks the behaviour. Address this by updating the datatimer value before sending a command having the MMC_RSP_BUSY flag set. To inform the mmc core about the maximum supported busy timeout, which also depends on the current clock rate, set ->max_busy_timeout (in ms). Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit e2b98d83ff0c1aaba31c767673c8000e20ad3524 Author: Ben Dooks Date: Wed Sep 25 12:42:31 2019 +0100 mmc: mmci: make unexported functions static Fix the following sparse warnings by making any functions not used outsde the mmci.c driver static. drivers/mmc/host/mmci.c:422:6: warning: symbol 'mmci_dma_release' was not declared. Should it be static? drivers/mmc/host/mmci.c:430:6: warning: symbol 'mmci_dma_setup' was not declared. Should it be static? drivers/mmc/host/mmci.c:465:5: warning: symbol 'mmci_prep_data' was not declared. Should it be static? drivers/mmc/host/mmci.c:481:6: warning: symbol 'mmci_unprep_data' was not declared. Should it be static? drivers/mmc/host/mmci.c:490:6: warning: symbol 'mmci_get_next_data' was not declared. Should it be static? drivers/mmc/host/mmci.c:498:5: warning: symbol 'mmci_dma_start' was not declared. Should it be static? drivers/mmc/host/mmci.c:533:6: warning: symbol 'mmci_dma_finalize' was not declared. Should it be static? drivers/mmc/host/mmci.c:542:6: warning: symbol 'mmci_dma_error' was not declared. Should it be static? drivers/mmc/host/mmci.c:951:6: warning: symbol 'mmci_variant_init' was not declared. Should it be static? drivers/mmc/host/mmci.c:956:6: warning: symbol 'ux500v2_variant_init' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Ulf Hansson commit 6b62e128e6f6a1e0cdded5cf3e6b7d621d38a63b Author: Colin Ian King Date: Sun Sep 22 13:54:43 2019 +0200 mmc: dw_mmc: fix indentation issue There are a couple of statements that are indented by an extra space, clean this up by remove the extraneous spaces. Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson commit 690dba13840e68bb13bb8e45cf3f2e066d82b1a6 Author: Colin Ian King Date: Sun Sep 22 13:47:00 2019 +0200 memstick: jmb38x_ms: clean up indentation issue There is a hunk of code that is indented one level too deep, fix this by removing the extraneous tabs. Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson commit 01a5674301fa790d05e1d2c888c9c98370082d45 Author: Biju Das Date: Tue Sep 24 07:46:55 2019 +0100 dt-bindings: mmc: renesas_sdhi: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Ulf Hansson commit 824b90bbaf4ddeb83639acec7824740848860af5 Author: Markus Elfring Date: Wed Sep 18 14:20:34 2019 +0200 mmc: cavium-octeon: Use devm_platform_ioremap_resource() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Ulf Hansson commit d67da5c90547f93f2e845143c2ca8ebcfd570d37 Author: Saiyam Doshi Date: Wed Sep 18 23:32:53 2019 +0530 mmc: bcm2835: Use devm_platform_ioremap_resource wrapper Use devm_platform_ioremap_resource helper which wraps platform_get_resource() and devm_ioremap_resource() together. Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Saiyam Doshi Signed-off-by: Ulf Hansson commit 7a7dab237027939cb95dc07c4647b80bad5fbbde Author: Wolfram Sang Date: Tue Sep 17 20:36:52 2019 +0200 mmc: tmio: remove workaround for NON_REMOVABLE PM has been reworked, so eMMC gets now detected on R-Car H3 ES1.0 and 2.0 as well as M3-N without the workaround. Card detect and write protect also still work. Remove the workaround. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson commit f06d353f52882f077f85c4c9855f476fe8b4fd97 Author: Manivannan Sadhasivam Date: Mon Sep 16 21:15:45 2019 +0530 MAINTAINERS: Add entry for Actions Semi SD/MMC driver and binding Add MAINTAINERS entry for Actions Semi SD/MMC driver with its binding. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Ulf Hansson commit ff65ffe46d2839b434dbab77dd3af0cb4f6d2a98 Author: Manivannan Sadhasivam Date: Mon Sep 16 21:15:44 2019 +0530 mmc: Add Actions Semi Owl SoCs SD/MMC driver Add SD/MMC driver for Actions Semi Owl SoCs. This driver currently supports standard, high speed, SDR12, SDR25 and SDR50. DDR50 mode is supported but it is untested. There is no SDIO support for now. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Ulf Hansson commit b62a80174ffb86d8e68389dc681d35103244236c Author: Manivannan Sadhasivam Date: Mon Sep 16 21:15:41 2019 +0530 dt-bindings: mmc: Add Actions Semi SD/MMC/SDIO controller binding Add devicetree YAML binding for Actions Semi Owl SoC's SD/MMC/SDIO controller. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson commit dd79b7e367033bacff8ff8c1bd85b2a848cf475d Author: Takao Orito Date: Tue Sep 10 10:41:06 2019 +0900 mmc: sdhci-milbeaut: add Milbeaut SD controller driver SD Host controller on Milbeaut consists of two controller parts. One is core controller F_SDH30, this is similar to sdhci-fujitsu controller. Another is bridge controller. This bridge controller is not compatible with sdhci-fujitsu controller. This is special for Milbeaut series. This has some functions. For example, reset control, clock enable/select for SDR50/25/12, set property of SD physical pins, retuning control, set capabilityies. This bridge controller requires special procedures at reset or clock enablement or change for further tuning of clock. Signed-off-by: Takao Orito Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 4177bc5038c80c9dffa1fb1c7ba0762cb5ef1f75 Author: Takao Orito Date: Tue Sep 10 10:40:52 2019 +0900 dt-bindings: mmc: add DT bindings for Milbeaut SD controller Add the device-tree binding documentation for Milbeaut SDHCI driver. Signed-off-by: Takao Orito Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson commit 7a869f00bb15bcefb8804d798a49b086267b03e6 Author: Raul E Rangel Date: Wed Sep 4 10:46:25 2019 -0600 mmc: sdhci-pci: Quirk for AMD SDHC Device 0x7906 AMD SDHC 0x7906 requires a hard reset to clear all internal state. Otherwise it can get into a bad state where the DATA lines are always read as zeros. This change requires firmware that can transition the device into D3Cold for it to work correctly. If the firmware does not support transitioning to D3Cold then the power state transitions are a no-op. Signed-off-by: Raul E Rangel Signed-off-by: Shyam Sundar S K Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit dcaac3f7840177ec9894abbd4a0fabf31801ecb6 Author: Raul E Rangel Date: Wed Sep 4 10:46:24 2019 -0600 mmc: sdhci: Check card status after reset In sdhci_do_reset we call the reset callback which is typically sdhci_reset. sdhci_reset can wait for up to 100ms waiting for the controller to reset. If SDHCI_RESET_ALL was passed as the flag, the controller will clear the IRQ mask. If during that 100ms the card is removed there is no notification to the MMC system that the card was removed. So from the drivers point of view the card is always present. By making sdhci_reinit compare the present state it can schedule a rescan if the card was removed while a reset was in progress. Signed-off-by: Raul E Rangel Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 953ae45a0c25e09428d4a03d7654f97ab8a36647 Author: Divya Indi Date: Wed Aug 14 10:55:25 2019 -0700 tracing: Adding NULL checks for trace_array descriptor pointer As part of commit f45d1225adb0 ("tracing: Kernel access to Ftrace instances") we exported certain functions. Here, we are adding some additional NULL checks to ensure safe usage by users of these APIs. Link: http://lkml.kernel.org/r/1565805327-579-4-git-send-email-divya.indi@oracle.com Signed-off-by: Divya Indi Signed-off-by: Steven Rostedt (VMware) commit e585e6469d6f476b82aa148dc44aaf7ae269a4e2 Author: Divya Indi Date: Wed Aug 14 10:55:24 2019 -0700 tracing: Verify if trace array exists before destroying it. A trace array can be destroyed from userspace or kernel. Verify if the trace array exists before proceeding to destroy/remove it. Link: http://lkml.kernel.org/r/1565805327-579-3-git-send-email-divya.indi@oracle.com Reviewed-by: Aruna Ramakrishna Signed-off-by: Divya Indi [ Removed unneeded braces ] Signed-off-by: Steven Rostedt (VMware) commit 2d6425af61166e026e7476db64f70f1266127b1d Author: Divya Indi Date: Wed Aug 14 10:55:23 2019 -0700 tracing: Declare newly exported APIs in include/linux/trace.h Declare the newly introduced and exported APIs in the header file - include/linux/trace.h. Moving previous declarations from kernel/trace/trace.h to include/linux/trace.h. Link: http://lkml.kernel.org/r/1565805327-579-2-git-send-email-divya.indi@oracle.com Signed-off-by: Divya Indi Signed-off-by: Steven Rostedt (VMware) commit 6dff4d7dd3e0158688683a17dd792861aa9d61e2 Author: Ben Dooks Date: Tue Oct 15 13:10:12 2019 +0100 tracing: Make internal ftrace events static The event_class_ftrace_##call and event_##call do not seem to be used outside of trace_export.c so make them both static to avoid a number of sparse warnings: kernel/trace/trace_entries.h:59:1: warning: symbol 'event_class_ftrace_function' was not declared. Should it be static? kernel/trace/trace_entries.h:59:1: warning: symbol '__event_function' was not declared. Should it be static? kernel/trace/trace_entries.h:77:1: warning: symbol 'event_class_ftrace_funcgraph_entry' was not declared. Should it be static? kernel/trace/trace_entries.h:77:1: warning: symbol '__event_funcgraph_entry' was not declared. Should it be static? kernel/trace/trace_entries.h:93:1: warning: symbol 'event_class_ftrace_funcgraph_exit' was not declared. Should it be static? kernel/trace/trace_entries.h:93:1: warning: symbol '__event_funcgraph_exit' was not declared. Should it be static? kernel/trace/trace_entries.h:129:1: warning: symbol 'event_class_ftrace_context_switch' was not declared. Should it be static? kernel/trace/trace_entries.h:129:1: warning: symbol '__event_context_switch' was not declared. Should it be static? kernel/trace/trace_entries.h:149:1: warning: symbol 'event_class_ftrace_wakeup' was not declared. Should it be static? kernel/trace/trace_entries.h:149:1: warning: symbol '__event_wakeup' was not declared. Should it be static? kernel/trace/trace_entries.h:171:1: warning: symbol 'event_class_ftrace_kernel_stack' was not declared. Should it be static? kernel/trace/trace_entries.h:171:1: warning: symbol '__event_kernel_stack' was not declared. Should it be static? kernel/trace/trace_entries.h:191:1: warning: symbol 'event_class_ftrace_user_stack' was not declared. Should it be static? kernel/trace/trace_entries.h:191:1: warning: symbol '__event_user_stack' was not declared. Should it be static? kernel/trace/trace_entries.h:214:1: warning: symbol 'event_class_ftrace_bprint' was not declared. Should it be static? kernel/trace/trace_entries.h:214:1: warning: symbol '__event_bprint' was not declared. Should it be static? kernel/trace/trace_entries.h:230:1: warning: symbol 'event_class_ftrace_print' was not declared. Should it be static? kernel/trace/trace_entries.h:230:1: warning: symbol '__event_print' was not declared. Should it be static? kernel/trace/trace_entries.h:247:1: warning: symbol 'event_class_ftrace_raw_data' was not declared. Should it be static? kernel/trace/trace_entries.h:247:1: warning: symbol '__event_raw_data' was not declared. Should it be static? kernel/trace/trace_entries.h:262:1: warning: symbol 'event_class_ftrace_bputs' was not declared. Should it be static? kernel/trace/trace_entries.h:262:1: warning: symbol '__event_bputs' was not declared. Should it be static? kernel/trace/trace_entries.h:277:1: warning: symbol 'event_class_ftrace_mmiotrace_rw' was not declared. Should it be static? kernel/trace/trace_entries.h:277:1: warning: symbol '__event_mmiotrace_rw' was not declared. Should it be static? kernel/trace/trace_entries.h:298:1: warning: symbol 'event_class_ftrace_mmiotrace_map' was not declared. Should it be static? kernel/trace/trace_entries.h:298:1: warning: symbol '__event_mmiotrace_map' was not declared. Should it be static? kernel/trace/trace_entries.h:322:1: warning: symbol 'event_class_ftrace_branch' was not declared. Should it be static? kernel/trace/trace_entries.h:322:1: warning: symbol '__event_branch' was not declared. Should it be static? kernel/trace/trace_entries.h:343:1: warning: symbol 'event_class_ftrace_hwlat' was not declared. Should it be static? kernel/trace/trace_entries.h:343:1: warning: symbol '__event_hwlat' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20191015121012.18824-1-ben.dooks@codethink.co.uk Signed-off-by: Ben Dooks Signed-off-by: Steven Rostedt (VMware) commit 9c34fc4b7e903117cc27712b9e6c8690debb7e95 Author: Sebastian Andrzej Siewior Date: Tue Oct 15 21:18:20 2019 +0200 tracing: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Add additional header output for PREEMPT_RT. Link: http://lkml.kernel.org/r/20191015191821.11479-34-bigeasy@linutronix.de Cc: Ingo Molnar Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steven Rostedt (VMware) commit 793937236d1ee032d2ee5ccc27bdd280a04e766e Author: Viktor Rosendahl (BMW) Date: Wed Oct 9 00:08:22 2019 +0200 preemptirq_delay_test: Add the burst feature and a sysfs trigger This burst feature enables the user to generate a burst of preempt/irqsoff latencies. This makes it possible to test whether we are able to detect latencies that systematically occur very close to each other. The maximum burst size is 10. We also create 10 identical test functions, so that we get 10 different backtraces; this is useful when we want to test whether we can detect all the latencies in a burst. Otherwise, there would be no easy way of differentiating between which latency in a burst was captured by the tracer. In addition, there is a sysfs trigger, so that it's not necessary to reload the module to repeat the test. The trigger will appear as /sys/kernel/preemptirq_delay_test/trigger in sysfs. Link: http://lkml.kernel.org/r/20191008220824.7911-3-viktor.rosendahl@gmail.com Reviewed-by: Joel Fernandes (Google) Signed-off-by: Viktor Rosendahl (BMW) Signed-off-by: Steven Rostedt (VMware) commit 91edde2e6ae1dd5e33812f076f3fe4cb7ccbfdd0 Author: Viktor Rosendahl (BMW) Date: Wed Oct 9 00:08:21 2019 +0200 ftrace: Implement fs notification for tracing_max_latency This patch implements the feature that the tracing_max_latency file, e.g. /sys/kernel/debug/tracing/tracing_max_latency will receive notifications through the fsnotify framework when a new latency is available. One particularly interesting use of this facility is when enabling threshold tracing, through /sys/kernel/debug/tracing/tracing_thresh, together with the preempt/irqsoff tracers. This makes it possible to implement a user space program that can, with equal probability, obtain traces of latencies that occur immediately after each other in spite of the fact that the preempt/irqsoff tracers operate in overwrite mode. This facility works with the hwlat, preempt/irqsoff, and wakeup tracers. The tracers may call the latency_fsnotify() from places such as __schedule() or do_idle(); this makes it impossible to call queue_work() directly without risking a deadlock. The same would happen with a softirq, kernel thread or tasklet. For this reason we use the irq_work mechanism to call queue_work(). This patch creates a new workqueue. The reason for doing this is that I wanted to use the WQ_UNBOUND and WQ_HIGHPRI flags. My thinking was that WQ_UNBOUND might help with the latency in some important cases. If we use: queue_work(system_highpri_wq, &tr->fsnotify_work); then the work will (almost) always execute on the same CPU but if we are unlucky that CPU could be too busy while there could be another CPU in the system that would be able to process the work soon enough. queue_work_on() could be used to queue the work on another CPU but it seems difficult to select the right CPU. Link: http://lkml.kernel.org/r/20191008220824.7911-2-viktor.rosendahl@gmail.com Reviewed-by: Joel Fernandes (Google) Signed-off-by: Viktor Rosendahl (BMW) [ Added max() to have one compare for max latency ] Signed-off-by: Steven Rostedt (VMware) commit da537f0aef1372c5204356a7df06be8769467b7b Author: Steven Rostedt (VMware) Date: Tue Oct 1 14:38:07 2019 -0400 ftrace: Add information on number of page groups allocated Looking for ways to shrink the size of the dyn_ftrace structure, knowing the information about how many pages and the number of groups of those pages, is useful in working out the best ways to save on memory. This adds one info print on how many groups of pages were used to allocate the ftrace dyn_ftrace structures, and also shows the number of pages and groups in the dyn_ftrace_total_info (which is used for debugging). Signed-off-by: Steven Rostedt (VMware) commit 77ac117b3a82251b109ffc5daf7d1c5392734be3 Author: Josh Poimboeuf Date: Fri Nov 8 16:51:00 2019 -0600 ftrace/x86: Tell objtool to ignore nondeterministic ftrace stack layout Objtool complains about the new ftrace direct trampoline code: arch/x86/kernel/ftrace_64.o: warning: objtool: ftrace_regs_caller()+0x190: stack state mismatch: cfa1=7+16 cfa2=7+24 Typically, code has a deterministic stack layout, such that at a given instruction address, the stack frame size is always the same. That's not the case for the new ftrace_regs_caller() code after it adjusts the stack for the direct case. Just plead ignorance and assume it's always the non-direct path. Note this creates a tiny window for ORC to get confused. Link: http://lkml.kernel.org/r/20191108225100.ea3bhsbdf6oerj6g@treble Reported-by: Steven Rostedt Signed-off-by: Josh Poimboeuf Signed-off-by: Steven Rostedt (VMware) commit a3ad1a7e39689005cb04a4f2adb82f9d55b4724f Author: Steven Rostedt (VMware) Date: Fri Nov 8 13:12:57 2019 -0500 ftrace/x86: Add a counter to test function_graph with direct As testing for direct calls from the function graph tracer adds a little overhead (which is a lot when tracing every function), add a counter that can be used to test if function_graph tracer needs to test for a direct caller or not. It would have been nicer if we could use a static branch, but the static branch logic fails when used within the function graph tracer trampoline. Signed-off-by: Steven Rostedt (VMware) commit 562955fe6a558b9ef98ad87c470314946338cb2f Author: Steven Rostedt (VMware) Date: Fri Nov 8 13:11:39 2019 -0500 ftrace/x86: Add register_ftrace_direct() for custom trampolines Enable x86 to allow for register_ftrace_direct(), where a custom trampoline may be called directly from an ftrace mcount/fentry location. Signed-off-by: Steven Rostedt (VMware) commit ed9dafebce52206382de96bd5bbdff22335930f6 Author: Steven Rostedt (VMware) Date: Fri Nov 8 16:08:12 2019 -0500 ftrace/selftests: Update the direct call selftests to test two direct calls The register_ftrace_direct() takes a different path if there's already a direct call registered, but this was not tested in the self tests. Now that there's a second direct caller test module, we can use this to test not only one direct caller, but two. Signed-off-by: Steven Rostedt (VMware) commit 156473a0ff4f9c209114b4c3ad968099eb541e33 Author: Steven Rostedt (VMware) Date: Fri Nov 8 15:27:45 2019 -0500 ftrace: Add another example of register_ftrace_direct() use case Add another module sample that registers a direct trampoline to a function via register_ftrace_direct(). Having another module that does this allows to test the use case of multiple direct callers registered, as more than one direct caller goes into another path, and is needed to perform proper testing of the register_ftrace_direct() call. Signed-off-by: Steven Rostedt (VMware) commit 646f01ccdd59f989f0a1866d2b3503e1855358d8 Author: Steven Rostedt (VMware) Date: Fri Nov 8 12:19:14 2019 -0500 ftrace/selftest: Add tests to test register_ftrace_direct() Add two test cases that test the new ftrace direct functionality if the ftrace-direct sample module is available. One test case tests against each available tracer (function, function_graph, mmiotrace, etc), and the other test tests against a kprobe at the same location as the direct caller. Both tests follow the same pattern of testing combinations: enable test (either the tracer or the kprobe) load direct function module unload direct function module disable test enable test load direct function module disable test unload direct function module load direct function module enable test disable test unload direct function module load direct function module enable test unload direct function module disable test As most the bugs in development happened with various ways of enabling or disabling the direct calls with function tracer in one of these combinations. Signed-off-by: Steven Rostedt (VMware) commit b06457c83af669bb9ef71f5b84a3132657dce8a1 Author: Steven Rostedt (VMware) Date: Fri Nov 8 13:12:33 2019 -0500 ftrace: Add sample module that uses register_ftrace_direct() Add a sample module that shows a simple use case for regsiter_ftrace_direct(), and how to use it. Signed-off-by: Steven Rostedt (VMware) commit 013bf0da0474816f57739daa006c8564ad7396a3 Author: Steven Rostedt (VMware) Date: Fri Nov 8 13:11:27 2019 -0500 ftrace: Add ftrace_find_direct_func() As function_graph tracer modifies the return address to insert a trampoline to trace the return of a function, it must be aware of a direct caller, as when it gets called, the function's return address may not be at on the stack where it expects. It may have to see if that return address points to the a direct caller and adjust if it is. Signed-off-by: Steven Rostedt (VMware) commit 763e34e74bb7d5c316015e2e39fcc8520bfd071c Author: Steven Rostedt (VMware) Date: Fri Nov 8 13:07:06 2019 -0500 ftrace: Add register_ftrace_direct() Add the start of the functionality to allow other trampolines to use the ftrace mcount/fentry/nop location. This adds two new functions: register_ftrace_direct() and unregister_ftrace_direct() Both take two parameters: the first is the instruction address of where the mcount/fentry/nop exists, and the second is the trampoline to have that location called. This will handle cases where ftrace is already used on that same location, and will make it still work, where the registered direct called trampoline will get called after all the registered ftrace callers are handled. Currently, it will not allow for IP_MODIFY functions to be called at the same locations, which include some kprobes and live kernel patching. At this point, no architecture supports this. This is only the start of implementing the framework. Signed-off-by: Steven Rostedt (VMware) commit 3af50e548019f6ee26d0ed4340f4ab980f884696 Author: Rob Herring Date: Thu Nov 7 16:42:54 2019 -0600 dt-bindings: pinctrl: Convert generic pin mux and config properties to schema As pinctrl bindings have a flexible structure and no standard child node naming convention, creating a single pinctrl schema doesn't work. Instead, create schemas for the pin mux and config nodes which device pinctrl schema can reference. Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20191107224254.15712-1-robh@kernel.org Signed-off-by: Linus Walleij commit 19b6ecfca6b89cd3fb80af6c9b32afa54b442481 Author: Peter Ujfalusi Date: Wed Nov 13 11:46:17 2019 +0200 tty: serial: msm_serial: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113094618.1725-3-peter.ujfalusi@ti.com Signed-off-by: Greg Kroah-Hartman commit 84a25d956c4f2c1a7ce2eb0875f4a3151cb48958 Author: Peter Ujfalusi Date: Wed Nov 13 11:46:18 2019 +0200 tty: serial: tegra: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113094618.1725-4-peter.ujfalusi@ti.com Signed-off-by: Greg Kroah-Hartman commit 61b37b049e203aa7daa9054a0b8d7da464ebba22 Author: Peter Ujfalusi Date: Wed Nov 13 11:46:16 2019 +0200 tty: serial: amba-pl011: Use dma_request_chan() directly for channel request dma_request_slave_channel_reason() is: #define dma_request_slave_channel_reason(dev, name) \ dma_request_chan(dev, name) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191113094618.1725-2-peter.ujfalusi@ti.com Signed-off-by: Greg Kroah-Hartman commit a00d9db8952b44f4d165e5200fff03c80a84947f Author: Shubhrajyoti Datta Date: Tue Nov 12 16:11:09 2019 +0530 serial-uartlite: Use allocated structure instead of static ones Remove the use of the static uartlite structure. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/1573555271-2579-2-git-send-email-shubhrajyoti.datta@gmail.com Signed-off-by: Greg Kroah-Hartman commit d338838c09dee338dd86f479f554d18401068978 Author: Shubhrajyoti Datta Date: Tue Nov 12 16:11:08 2019 +0530 serial-uartlite: Change logic how console_port is setup Change logic how console_port is setup by using CON_ENABLED flag instead of index. There will be unique uart_console structure that's why code can't use id for console_port assignment. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1573555271-2579-1-git-send-email-shubhrajyoti.datta@gmail.com Signed-off-by: Greg Kroah-Hartman commit 74887542fdcc92ad06a48c0cca17cdf09fc8aa00 Author: Peng Fan Date: Wed Nov 13 05:37:42 2019 +0000 tty: serial: pch_uart: correct usage of dma_unmap_sg Per Documentation/DMA-API-HOWTO.txt, To unmap a scatterlist, just call: dma_unmap_sg(dev, sglist, nents, direction); .. note:: The 'nents' argument to the dma_unmap_sg call must be the _same_ one you passed into the dma_map_sg call, it should _NOT_ be the 'count' value _returned_ from the dma_map_sg call. However in the driver, priv->nent is directly assigned with value returned from dma_map_sg, and dma_unmap_sg use priv->nent for unmap, this breaks the API usage. So introduce a new entry orig_nent to remember 'nents'. Fixes: da3564ee027e ("pch_uart: add multi-scatter processing") Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1573623259-6339-1-git-send-email-peng.fan@nxp.com Signed-off-by: Greg Kroah-Hartman commit 8b598e7f4e9bede8a3893e1d7e4e4ff0dc952bb5 Author: Dmitry Torokhov Date: Mon Oct 14 11:43:20 2019 -0700 drm/bridge: ti-tfp410: switch to using fwnode_gpiod_get_index() Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but works with arbitrary firmware node. Reviewed-by: Laurent Pinchart Signed-off-by: Dmitry Torokhov Acked-by: Daniel Vetter Signed-off-by: Linus Walleij commit 4a5e0f9e73511595c68f907a15772e5d1ba4aac6 Author: Andy Shevchenko Date: Mon Nov 4 19:10:10 2019 +0200 gpio: merrifield: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Andy Shevchenko Cc: Mika Westerberg Cc: Thierry Reding Signed-off-by: Linus Walleij Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede commit cd242b333b0059fab46063f7f9cf8fd0d196d1c9 Author: Andy Shevchenko Date: Mon Nov 4 19:07:30 2019 +0200 gpio: merrifield: Add GPIO <-> pin mapping ranges via callback When IRQ chip is instantiated via GPIO library flow, the few functions, in particular the ACPI event registration mechanism, on some of ACPI based platforms expect that the pin ranges are initialized to that point. Add GPIO <-> pin mapping ranges via callback in the GPIO library flow. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede Signed-off-by: Andy Shevchenko commit b056ca1c2f01b2d261c2dd6d167c17ac27977034 Author: Andy Shevchenko Date: Mon Nov 4 18:09:39 2019 +0200 gpiolib: Introduce ->add_pin_ranges() callback When IRQ chip is being added by GPIO library, the ACPI based platform expects GPIO <-> pin mapping ranges to be initialized in order to correctly initialize ACPI event mechanism on affected platforms. Unfortunately this step is missed. Introduce ->add_pin_ranges() callback to fill the above mentioned gap. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede Tested-by: Hans de Goede commit 789c4aea3f08026360d026c0ea69b33797ac88c2 Author: Gwan-gyeong Mun Date: Wed Nov 13 14:52:41 2019 +0200 drm/i915: Split a setting of MSA to MST and SST The setting of MSA is done by the DDI .pre_enable() hook. And when we are using MST, the MSA is only set to first mst stream by calling of DDI .pre_eanble() hook. It raies issues to non-first mst streams. Wrong MSA or missed MSA packets might show scrambled screen or wrong screen. This splits a setting of MSA to MST and SST cases. And In the MST case it will call a setting of MSA after an allocating of Virtual Channel from MST encoder pre_enable callback. Cc: Ville Syrjälä Cc: Stanislav Lisovskiy Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112212 Fixes: 0c06fa156006 ("drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA") Fixes: d4a415dcda35 ("drm/i915: Fix MST oops due to MSA changes") Signed-off-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20191106212636.502471-1-gwan-gyeong.mun@intel.com Reviewed-by: Lucas De Marchi [vsyrjala: nuke spurious newline] Signed-off-by: Ville Syrjälä (cherry picked from commit bd8c9cca88765caee0dfa93967c6d8f16b4cbfb9) Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191113125241.20547-1-ville.syrjala@linux.intel.com commit 0f67f16a6e88749fc3bf88da7515d3fff472a1cc Author: Matti Vaittinen Date: Wed Nov 13 10:43:52 2019 +0200 gpio: mmio: remove untrue leftover comment The comment should have been removed when new GPIO direction definitions were taken in use as the function logic was changed. It is now perfectly valid and Ok to hit the return from the bottom of the direction getting function. Signed-off-by: Matti Vaittinen Signed-off-by: Bartosz Golaszewski commit be053b2dc91c1a02881db0c90e9438b56ac1a019 Author: Geert Uytterhoeven Date: Wed Nov 13 11:11:03 2019 +0100 gpio: em: Use platform_get_irq() to obtain interrupts Use the platform_get_irq() helper instead of handling resources directly. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit af833988c088d3fed3e7188e7c3dd9ca17178dc3 Author: Adrian Hunter Date: Wed Nov 13 14:02:06 2019 +0200 perf scripts python: exported-sql-viewer.py: Fix use of TRUE with SQLite Prior to version 3.23 SQLite does not support TRUE or FALSE, so always use 1 and 0 for SQLite. Fixes: 26c11206f433 ("perf scripts python: exported-sql-viewer.py: Use new 'has_calls' column") Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org # v5.3+ Link: http://lore.kernel.org/lkml/20191113120206.26957-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 102a1b382177d89f75bc49b931c329a317cf531f Author: Colin Ian King Date: Tue Nov 12 09:30:25 2019 +0000 backlight: qcom-wled: Fix spelling mistake "trigged" -> "triggered" There is a spelling mistake in a dev_err error message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 8bde9f3d2a217d1635a7c7bdf8ad4c25c9a34b50 Merge: 6366e523eb56 4c35b7a51e2f Author: Greg Kroah-Hartman Date: Wed Nov 13 19:24:42 2019 +0800 Merge tag 'iio-for-5.5c' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Third set of IIO new device support cleanups and fixes for the 5.5 cycle. New device support * ad5446 - Support the ad5600 DAC (id only needed). * ad7292 ADC DAC etc - New driver plus dt-bindings. * veml6030 ambient light sensor - New driver plus dt-bindings and sysfs docs. Features * mpu6050 - Explicit VDD control. * stm32-adc - Allow limiting of max clock frequency from devicetree to ensure it's suitable for external circuitry. yaml binding conversions * ltc1660 * mcp3911 Fixes * adis16480 - Fix wrong scale factors. - Fix debugfs reg access by providing the callback. * cros_ec_baro - Fixing missing mask entry to make available sample frequencies visible in sysfs. * st_lsm6dsx - Explicitly handle different ODR table sizes. - Handle restrictions between slave ODR and accel ODR when both are enabled. - Allow ODR to be expressed more accurately by using miliHz. * tools - Fix an issue with parallel builds. Cleanups and warning fixes * adis16136, adis16400, adis16460, adis-lib - Change some checks on return values to be for 0 rather than strictly negative. Avoids some fiddly issues with the compiler concluding some variables are initialized due to a mixture of error checks. - Assign values only on success of 'read' operations - avoiding any chance the compiler will falsly suggest they might be used uninitialized. - Whitespace and simlar cleanups. * aspeed adc - devm_platfom_ioremap_resource to reduce boilerplate. * bcm-iproc-adc - Stray semicolon removal. * cc10001 - devm_platfom_ioremap_resource to reduce boilerplate. * dln2-adc - Reorganise the buffered mode setup and tear down. Part of moving towards being able to refactor this area of the IIO core. * hdc100x - Reorganise the buffered mode setup and tear down. * ingenic-adc - devm_platfom_ioremap_resource to reduce boilerplate. * lpc18xx-adc - devm_platfom_ioremap_resource to reduce boilerplate. * lpc18xx-dac - devm_platfom_ioremap_resource to reduce boilerplate. * mt6577 - devm_platfom_ioremap_resource to reduce boilerplate. * npcm - devm_platfom_ioremap_resource to reduce boilerplate. * rcar-gyroadc - devm_platfom_ioremap_resource to reduce boilerplate. * spear-adc - devm_platfom_ioremap_resource to reduce boilerplate. * vf610-adc - devm_platfom_ioremap_resource to reduce boilerplate. * vf610-dac - devm_platfom_ioremap_resource to reduce boilerplate. * tag 'iio-for-5.5c' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (43 commits) iio: adis16480: Add debugfs_reg_access entry iio: adis16480: Fix scales factors tools: iio: Correctly add make dependency for iio_utils iio: adc: Add driver support for AD7292 dt-bindings: iio: adc: Add dt-schema for AD7292 dt-bindings: iio: adc: Migrate MCP3911 documentation to yaml iio: imu: mpu6050: Add support for vdd-supply regulator dt-bindings: iio: imu: mpu6050: add vdd-supply iio: cros_ec_baro: set info_mask_shared_by_all_available field iio: dac: ad5446: Add support for new AD5600 DAC dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml iio: documentation: light: Add veml6030 sysfs documentation dt-bindings: iio: light: add veml6030 ALS bindings iio: light: add driver for veml6030 ambient light sensor iio: imu: st_lsm6dsx: express odr in mHZ iio: imu: st_lsm6dsx: fix ODR check in st_lsm6dsx_write_raw iio: imu: st_lsm6dsx: explicitly define odr table size iio: adc: stm32: allow to tune analog clock dt-bindings: iio: stm32-adc: add max clock rate property iio: dac: vf610: Use devm_platform_ioremap_resource ... commit 60f8a59ddcdc7fb7c17180ba10d9c49bc91156c7 Author: Sudip Mukherjee Date: Wed Oct 16 15:45:40 2019 +0100 parport: daisy: use new parport device model Modify parport daisy driver to use the new parallel port device model. Last attempt was '1aec4211204d ("parport: daisy: use new parport device model")' which failed as daisy was also trying to load the low level driver and that resulted in a deadlock. Cc: Michal Kubecek Signed-off-by: Sudip Mukherjee Tested-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20191016144540.18810-4-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 231ec2f24dad18d021b361045bbd618ba62a274e Author: Sudip Mukherjee Date: Wed Oct 16 15:45:39 2019 +0100 parport: load lowlevel driver if ports not found Usually all the distro will load the parport low level driver as part of their initialization. But we can get into a situation where all the parallel port drivers are built as module and we unload all the modules at a later time. Then if we just do "modprobe parport" it will only load the parport module and will not load the low level driver which will actually register the ports. So, check the bus if there is any parport registered, if not, load the low level driver. We can get into the above situation with all distro but only Suse has setup the alias for "parport_lowlevel" and so it only works in Suse. Users of Debian based distro will need to load the lowlevel module manually. Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20191016144540.18810-3-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit e962cd9cf9cfb1f5db6bbad6a6470e5ccf56e290 Author: Sudip Mukherjee Date: Wed Oct 16 15:45:38 2019 +0100 parport: do not check portlist when using device-model We do not need to maintain a list of ports when we are using the device-model. The base layer is going to maintain the list for us and we can get the list of ports just using bus_for_each_dev(). Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20191016144540.18810-2-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit c059d579961d62c1a675cb89ef799902e6bce815 Author: Sudip Mukherjee Date: Wed Oct 16 15:45:37 2019 +0100 parport: daisy: avoid hardcoded name The daisy device name is hardcoded, define it in the header file and use it in the code. Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20191016144540.18810-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 45a2d64696b11913bcf1087b041740edbade3e21 Author: Arnd Bergmann Date: Fri Nov 8 21:34:29 2019 +0100 lp: fix sparc64 LPSETTIMEOUT ioctl The layout of struct timeval is different on sparc64 from anything else, and the patch I did long ago failed to take this into account. Change it now to handle sparc64 user space correctly again. Quite likely nobody cares about parallel ports on sparc64, but there is no reason not to fix it. Cc: stable@vger.kernel.org Fixes: 9a450484089d ("lp: support 64-bit time_t user space") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191108203435.112759-7-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 998174042da229e2cf5841f574aba4a743e69650 Author: Arnd Bergmann Date: Fri Nov 8 21:34:30 2019 +0100 ppdev: fix PPGETTIME/PPSETTIME ioctls Going through the uses of timeval in the user space API, I noticed two bugs in ppdev that were introduced in the y2038 conversion: * The range check was accidentally moved from ppsettime to ppgettime * On sparc64, the microseconds are in the other half of the 64-bit word. Fix both, and mark the fix for stable backports. Cc: stable@vger.kernel.org Fixes: 3b9ab374a1e6 ("ppdev: convert to y2038 safe") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191108203435.112759-8-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit edfaeaf742b4c3ee6f58e0b8be95b5296a3375e8 Author: Andy Shevchenko Date: Wed Nov 13 12:22:26 2019 +0200 Revert "mfd: syscon: Set name of regmap_config" This reverts commit 500f9ff518cf55930c670b0e2b8901caf70a7548. The original commit is a duplication of the exactly previously added commit 408d1d570a63 ("mfd: syscon: Set regmap name to DT node name"). Revert the unnecessary later one. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit bee3bbe616a2c8de641a64d874f9206835bd4401 Author: Saravana Kannan Date: Tue Nov 12 18:35:59 2019 -0800 driver core: Clarify documentation for fwnode_operations.add_links() The wording was a bit ambiguous. So update it to make it clear. Signed-off-by: Saravana Kannan Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20191113023559.62295-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 596fd8dffb745afcebc0ec6968e17fe29f02044c Author: Peng Fan Date: Thu Nov 7 06:42:53 2019 +0000 tty: serial: imx: use the sg count from dma_map_sg The dmaengine_prep_slave_sg needs to use sg count returned by dma_map_sg, not use sport->dma_tx_nents, because the return value of dma_map_sg is not always same with "nents". Fixes: b4cdc8f61beb ("serial: imx: add DMA support for imx6q") Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1573108875-26530-1-git-send-email-peng.fan@nxp.com Signed-off-by: Greg Kroah-Hartman commit fba67e8f897870403e1a4f5fe3835c870cd589e0 Author: Pascal Terjan Date: Tue Nov 5 19:27:49 2019 +0000 Remove every trace of SERIAL_MAGIC This means removing support for checking magic in amiserial.c (SERIAL_PARANOIA_CHECK option), which was checking a magic field which doesn't currently exist in the struct. That code hasn't built at least since git. Removing the definition from the header is safe anyway as that code was from another driver and not including it. Signed-off-by: Pascal Terjan Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191105192749.67533-1-pterjan@google.com Signed-off-by: Greg Kroah-Hartman commit 2a9125317b247f2cf35c196f968906dcf062ae2d Author: Suwan Kim Date: Mon Nov 11 23:10:35 2019 +0900 usbip: Fix uninitialized symbol 'nents' in stub_recv_cmd_submit() Smatch reported that nents is not initialized and used in stub_recv_cmd_submit(). nents is currently initialized by sgl_alloc() and used to allocate multiple URBs when host controller doesn't support scatter-gather DMA. The use of uninitialized nents means that buf_len is zero and use_sg is true. But buffer length should not be zero when an URB uses scatter-gather DMA. To prevent this situation, add the conditional that checks buf_len and use_sg. And move the use of nents right after the sgl_alloc() to avoid the use of uninitialized nents. If the error occurs, it adds SDEV_EVENT_ERROR_MALLOC and stub_priv will be released by stub event handler and connection will be shut down. Fixes: ea44d190764b ("usbip: Implement SG support to vhci-hcd and stub driver") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Suwan Kim Acked-by: Shuah Khan Cc: stable Link: https://lore.kernel.org/r/20191111141035.27788-1-suwan.kim027@gmail.com Signed-off-by: Greg Kroah-Hartman commit fe0c2baae0bd47958991f13fb7551bf1328b4ea7 Author: Ulf Hansson Date: Wed Oct 16 16:16:49 2019 +0200 PM / Domains: Convert to dev_to_genpd_safe() in genpd_syscore_switch() The intent with walking the gpd_list via calling genpd_present() from genpd_syscore_switch(), is to make sure the dev->pm_domain pointer belongs to a registered genpd. However, as a genpd can't be removed if there is a device attached to it, let's convert to use the quicker dev_to_genpd_safe() instead. Due to the above change, this allows us to clean up genpd_present() and move it inside CONFIG_PM_GENERIC_DOMAINS_OF, so let's do that as well. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 1b32999e205bb5804400aaa61441ecb356381402 Author: Ulf Hansson Date: Wed Oct 16 15:16:34 2019 +0200 mmc: tmio: Avoid boilerplate code in ->runtime_suspend() Rather than checking the 'runtime_synced' flag each time the ->runtime_suspend() callback is invoked, let's convert into using dev_pm_domain_start() during ->probe() and drop the corresponding boilerplate code. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit ea71c59669f17d032f11b13ea8a025cea365584f Author: Ulf Hansson Date: Wed Oct 16 15:16:24 2019 +0200 PM / Domains: Implement the ->start() callback for genpd To allow a subsystem/driver to explicitly start its device from genpd's point view, let's implement the ->start() callback in the struct dev_pm_domain that corresponds to the genpd. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit ca765a8cfe0c78bfa47b9d67121f4e342d4b4512 Author: Ulf Hansson Date: Wed Oct 16 15:16:03 2019 +0200 PM / Domains: Introduce dev_pm_domain_start() For a subsystem/driver that either doesn't support runtime PM or makes use of pm_runtime_set_active() during ->probe(), may try to access its device when probing, even if it may not be fully powered on from the PM domain's point of view. This may be the case when the used PM domain is a genpd provider, that implements genpd's ->start|stop() device callbacks. There are cases where the subsystem/driver managed to avoid the above problem, simply by calling pm_runtime_enable() and pm_runtime_get_sync() during ->probe(). However, this approach comes with a drawback, especially if the subsystem/driver implements a ->runtime_resume() callback. More precisely, the subsystem/driver then needs to use a device flag, which is checked in its ->runtime_resume() callback, as to avoid powering on its resources the first time the callback is invoked. This is needed because the subsystem/driver has already powered on the resources for the device, during ->probe() and before it called pm_runtime_get_sync(). In a way to avoid this boilerplate code and the inefficient check for "if (first_time_suspend)" in the ->runtime_resume() callback for these subsystems/drivers, let's introduce and export a dev_pm_domain_start() function, that may be called during ->probe() instead. Moreover, let the dev_pm_domain_start() invoke an optional ->start() callback, added to the struct dev_pm_domain, as to allow a PM domain specific implementation. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 2079fe6ea8cbd2fb2fbadba911f1eca6c362eb9b Author: Ben Dooks Date: Tue Oct 15 14:12:38 2019 +0100 ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition The omap_sr_pdata is not declared but is exported, so add a define for it to fix the following warning: arch/arm/mach-omap2/pdata-quirks.c:609:36: warning: symbol 'omap_sr_pdata' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Rafael J. Wysocki commit 01ca4827a7481ee0f92faec05db1e7d6a5097282 Author: Xiaofei Tan Date: Tue Oct 15 16:31:30 2019 +0800 PM / wakeirq: remove unnecessary parentheses Remove unnecessary parentheses found by code review. Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit 98ae6fb3f1dc2725449fa888b29b600a8bcab23e Author: Chris Wilson Date: Mon Nov 11 13:32:05 2019 +0000 drm/i915/execlists: Move reset_active() from schedule-out to schedule-in The gem_ctx_persistence/smoketest was detecting an odd coherency issue inside the LRC context image; that the address of the ring buffer did not match our associated struct intel_ring. As we set the address into the context image when we pin the ring buffer into place before the context is active, that leaves the question of where did it get overwritten. Either the HW context save occurred after our pin which would imply that our idle barriers are broken, or we overwrote the context image ourselves. It is only in reset_active() where we dabble inside the context image outside of a serialised path from schedule-out; but we could equally perform the operation inside schedule-in which is then fully serialised with the context pin -- and remains serialised by the engine pulse with kill_context(). (The only downside, aside from doing more work inside the engine->active.lock, was the plan to merge all the reset paths into doing their context scrubbing on schedule-out needs more thought.) Fixes: d12acee84ffb ("drm/i915/execlists: Cancel banned contexts on schedule-out") Testcase: igt/gem_ctx_persistence/smoketest Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191111133205.11590-3-chris@chris-wilson.co.uk (cherry picked from commit 31b61f0ef9af62b6404d8df5dcd2cf58f80c9f53) Signed-off-by: Joonas Lahtinen commit aca32d7bccf961dc4c6ac6dff99ed363af1a6987 Author: Geert Uytterhoeven Date: Mon Oct 21 16:51:48 2019 +0200 power: avs: smartreflex: Remove superfluous cast in debugfs_create_file() call There is no need to cast a typed pointer to a void pointer when calling a function that accepts the latter. Remove it, as the cast prevents further compiler checks. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki commit b4447c0dcd0d270e98a88e34df52cb097acd0fd2 Author: Cao jin Date: Tue Nov 5 18:15:01 2019 +0800 ACPI: OSI: Shoot duplicate word "this" is duplicated. Signed-off-by: Cao jin Signed-off-by: Rafael J. Wysocki commit cf25e24db61cc9df42c47485a2ec2bff4e9a3692 Author: Peter Zijlstra Date: Thu Nov 7 11:07:58 2019 +0100 time: Rename tsk->real_start_time to ->start_boottime Since it stores CLOCK_BOOTTIME, not, as the name suggests, CLOCK_REALTIME, let's rename ->real_start_time to ->start_bootime. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit c759bc47db0fb8c02ecf2b2acc4b7fc6e4099039 Author: Dan Carpenter Date: Mon Nov 4 12:12:52 2019 +0300 locking/lockdep: Update the comment for __lock_release() This changes "to the list" to "from the list" and also deletes the obsolete comment about the "@nested" argument. The "nested" argument was removed in this commit, earlier this year: 5facae4f3549 ("locking/lockdep: Remove unused @nested argument from lock_release()"). Signed-off-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: Will Deacon Link: https://lkml.kernel.org/r/20191104091252.GA31509@mwanda Signed-off-by: Ingo Molnar commit 295c52ee1485e4dee660fc1a0e6ceed6c803c9d3 Author: Alexander Shishkin Date: Tue Nov 5 10:27:01 2019 +0200 perf/x86/intel/pt: Prevent redundant WRMSRs With recent optimizations to AUX and PT buffer management code (high order AUX allocations, opportunistic Single Range Output), it is far more likely now that the output MSRs won't need reprogramming on every sched-in. To avoid needless WRMSRs of those registers, cache their values and only write them when needed. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20191105082701.78442-3-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar commit 670638477aede0d7a355ced04b569214aa3feacd Author: Alexander Shishkin Date: Tue Nov 5 10:27:00 2019 +0200 perf/x86/intel/pt: Opportunistically use single range output mode Most of PT implementations support Single Range Output mode, which is an alternative to ToPA that can be used for a single contiguous buffer and if we don't require an interrupt, that is, in AUX snapshot mode. Now that perf core will use high order allocations for the AUX buffer, in many cases the first condition will also be satisfied. The two most obvious benefits of the Single Range Output mode over the ToPA are: * not having to allocate the ToPA table(s), * not using the ToPA walk hardware. Make use of this functionality where available and appropriate. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20191105082701.78442-2-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar commit 25e8920b301c133aeaa9f57d81295bf4ac78e17b Author: Alexander Shishkin Date: Fri Oct 25 17:08:35 2019 +0300 perf/x86/intel/pt: Add sampling support Add AUX sampling support to the PT PMU: implement an NMI-safe callback that takes a snapshot of the buffer without touching the event states. This is done for PT events that don't use PMIs, that is, snapshot mode (RO mapping of the AUX area). Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: adrian.hunter@intel.com Cc: mathieu.poirier@linaro.org Link: https://lkml.kernel.org/r/20191025140835.53665-4-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar commit 8e105a1fc2a02d78698834974083c980d2e5b513 Author: Alexander Shishkin Date: Fri Oct 25 17:08:34 2019 +0300 perf/x86/intel/pt: Factor out pt_config_start() PT trace is now enabled at the bottom of the event configuration function that takes care of all configuration bits related to a given event, including the address filter update. This is only needed where the event configuration changes, that is, in ->add()/->start(). In the interrupt path we can use a lighter version that keeps the configuration intact, since it hasn't changed, and only flips the enable bit. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: adrian.hunter@intel.com Cc: mathieu.poirier@linaro.org Link: https://lkml.kernel.org/r/20191025140835.53665-3-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar commit a4faf00d994c40e64f656805ac375c65e324eefb Author: Alexander Shishkin Date: Fri Oct 25 17:08:33 2019 +0300 perf/aux: Allow using AUX data in perf samples AUX data can be used to annotate perf events such as performance counters or tracepoints/breakpoints by including it in sample records when PERF_SAMPLE_AUX flag is set. Such samples would be instrumental in debugging and profiling by providing, for example, a history of instruction flow leading up to the event's overflow. The implementation makes use of grouping an AUX event with all the events that wish to take samples of the AUX data, such that the former is the group leader. The samplees should also specify the desired size of the AUX sample via attr.aux_sample_size. AUX capable PMUs need to explicitly add support for sampling, because it relies on a new callback to take a snapshot of the buffer without touching the event states. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: adrian.hunter@intel.com Cc: mathieu.poirier@linaro.org Link: https://lkml.kernel.org/r/20191025140835.53665-2-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar commit deb0c3c29d552ab81ecd5481bb83bf2f4e41927d Author: Qian Cai Date: Wed Nov 6 00:29:35 2019 -0500 perf/core: Fix unlock balance in perf_init_event() Commit: 66d258c5b048 ("perf/core: Optimize perf_init_event()") introduced an unlock imbalance in perf_init_event() where it calls "goto again" and then only repeat rcu_read_unlock(). Signed-off-by: Qian Cai Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 66d258c5b048 ("perf/core: Optimize perf_init_event()") Link: https://lkml.kernel.org/r/20191106052935.8352-1-cai@lca.pw Signed-off-by: Ingo Molnar commit fed4c9c68131ebee516471527589821fe7a8ce53 Merge: 56b2147f34d0 d00dbd298142 Author: Ingo Molnar Date: Wed Nov 13 11:04:43 2019 +0100 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 3944a4fd0d7015523d55e50fdaa40d12523f2e6a Merge: f6ae9f120dad b6520fce073b Author: Pablo Neira Ayuso Date: Wed Nov 13 10:42:07 2019 +0100 Merge branch 'master' of git://blackhole.kfki.hu/nf-next Jozsef Kadlecsik says: ==================== ipset patches for nf-next - Add wildcard support to hash:net,iface which makes possible to match interface prefixes besides complete interfaces names, from Kristian Evensen. ==================== Signed-off-by: Pablo Neira Ayuso commit f6ae9f120dada00abfb47313364c35118469455f Author: Pablo Neira Ayuso Date: Mon Nov 4 14:41:34 2019 +0100 netfilter: nft_payload: add C-VLAN support If the encapsulated ethertype announces another inner VLAN header and the offset falls within the boundaries of the inner VLAN header, then adjust arithmetics to include the extra VLAN header length and fetch the bytes from the vlan header in the skbuff data area that represents this inner VLAN header. Signed-off-by: Pablo Neira Ayuso commit be193f5e21d0ec674badef9fde8eca71fb2d8546 Author: Pablo Neira Ayuso Date: Sat Nov 2 15:32:39 2019 +0100 netfilter: nf_tables_offload: pass extack to nft_flow_cls_offload_setup() Otherwise this leads to a stack corruption. Fixes: c5d275276ff4 ("netfilter: nf_tables_offload: add nft_flow_cls_offload_setup()") Signed-off-by: Pablo Neira Ayuso commit 8dfd8b09aa347ec96db3b355ad5c82fc6c837bfa Author: Pablo Neira Ayuso Date: Thu Oct 31 15:51:22 2019 +0100 netfilter: nf_tables: add nft_payload_rebuild_vlan_hdr() Wrap the code to rebuild the ethernet + vlan header into a function. Signed-off-by: Pablo Neira Ayuso Acked-by: Florian Westphal commit f41f72d09ee1e9a980a1675be31120f547f2a648 Author: Pablo Neira Ayuso Date: Thu Oct 31 15:51:21 2019 +0100 netfilter: nft_payload: simplify vlan header handling If the offset is within the ethernet + vlan header size boundary, then rebuild the ethernet + vlan header and use it to copy the bytes to the register. Otherwise, subtract the vlan header size from the offset and fall back to use skb_copy_bits(). There is one corner case though: If the offset plus the length of the payload instruction goes over the ethernet + vlan header boundary, then, fetch as many bytes as possible from the rebuilt ethernet + vlan header and fall back to copy the remaining bytes through skb_copy_bits(). Signed-off-by: Pablo Neira Ayuso Acked-by: Florian Westphal commit 25da5eb32cd51383f6dca7aad252376f1979c075 Author: Pablo Neira Ayuso Date: Mon Oct 28 16:02:50 2019 +0100 netfilter: nft_meta: offload support for interface index This patch adds support for offloading the NFT_META_IIF selector. Signed-off-by: Pablo Neira Ayuso commit c2d1a13520eee7f0ac64ffb94f8756006320e4b8 Author: Jason Yan Date: Fri Sep 20 17:45:46 2019 +0800 powerpc/fsl_booke/32: Document KASLR implementation Add document to explain how we implement KASLR for fsl_booke32. Signed-off-by: Jason Yan Signed-off-by: Scott Wood [mpe: Add it to the index as well] Signed-off-by: Michael Ellerman commit 74277f00b23263066772fd9e9106acb6a280f84f Author: Jason Yan Date: Fri Sep 20 17:45:45 2019 +0800 powerpc/fsl_booke/kaslr: export offset in VMCOREINFO ELF notes Like all other architectures such as x86 or arm64, include KASLR offset in VMCOREINFO ELF notes to assist in debugging. After this, we can use crash --kaslr option to parse vmcore generated from a kaslr kernel. Note: The crash tool needs to support --kaslr too. Signed-off-by: Jason Yan Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit 921a79b7802078fab3787c7eae561536906cb8f3 Author: Jason Yan Date: Fri Sep 20 17:45:44 2019 +0800 powerpc/fsl_booke/kaslr: dump out kernel offset information on panic When kaslr is enabled, the kernel offset is different for every boot. This brings some difficult to debug the kernel. Dump out the kernel offset when panic so that we can easily debug the kernel. This code is derived from x86/arm64 which has similar functionality. Signed-off-by: Jason Yan Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Tested-by: Diana Craciun Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit 8c2ae87be5a4bb2d3cadff72d3aa5f1e3d5aac2b Author: Jason Yan Date: Fri Sep 20 17:45:43 2019 +0800 powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter One may want to disable kaslr when boot, so provide a cmdline parameter 'nokaslr' to support this. Signed-off-by: Jason Yan Reviewed-by: Diana Craciun Tested-by: Diana Craciun Reviewed-by: Christophe Leroy Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit b39609720069f5a6eed2b3e3f618c23587021ff5 Author: Jason Yan Date: Fri Sep 20 17:45:42 2019 +0800 powerpc/fsl_booke/kaslr: clear the original kernel if randomized The original kernel still exists in the memory, clear it now. Signed-off-by: Jason Yan Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Tested-by: Diana Craciun Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit 6a38ea1d7b94c6c84dbf3f5c969be5e3648d9a70 Author: Jason Yan Date: Fri Sep 20 17:45:41 2019 +0800 powerpc/fsl_booke/32: randomize the kernel image offset After we have the basic support of relocate the kernel in some appropriate place, we can start to randomize the offset now. Entropy is derived from the banner and timer, which will change every build and boot. This not so much safe so additionally the bootloader may pass entropy via the /chosen/kaslr-seed node in device tree. We will use the first 512M of the low memory to randomize the kernel image. The memory will be split in 64M zones. We will use the lower 8 bit of the entropy to decide the index of the 64M zone. Then we chose a 16K aligned offset inside the 64M zone to put the kernel in. We also check if we will overlap with some areas like the dtb area, the initrd area or the crashkernel area. If we cannot find a proper area, kaslr will be disabled and boot from the original kernel. Some pieces of code are derived from arch/x86/boot/compressed/kaslr.c or arch/arm64/kernel/kaslr.c such as rotate_xor(). Credit goes to Kees and Ard. Signed-off-by: Jason Yan Reviewed-by: Diana Craciun Tested-by: Diana Craciun Reviewed-by: Christophe Leroy Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit 2b0e86cc5de6dabadc2d64cefa429fc227c8a756 Author: Jason Yan Date: Fri Sep 20 17:45:40 2019 +0800 powerpc/fsl_booke/32: implement KASLR infrastructure This patch add support to boot kernel from places other than KERNELBASE. Since CONFIG_RELOCATABLE has already supported, what we need to do is map or copy kernel to a proper place and relocate. Freescale Book-E parts expect lowmem to be mapped by fixed TLB entries(TLB1). The TLB1 entries are not suitable to map the kernel directly in a randomized region, so we chose to copy the kernel to a proper place and restart to relocate. The offset of the kernel was not randomized yet(a fixed 64M is set). We will randomize it in the next patch. Signed-off-by: Jason Yan Tested-by: Diana Craciun Reviewed-by: Christophe Leroy Signed-off-by: Scott Wood [mpe: Use PTRRELOC() in early_init()] Signed-off-by: Michael Ellerman commit c061b38a3e48663c29611e3b60afffe624d7c830 Author: Jason Yan Date: Fri Sep 20 17:45:39 2019 +0800 powerpc/fsl_booke/32: introduce reloc_kernel_entry() helper Add a new helper reloc_kernel_entry() to jump back to the start of the new kernel. After we put the new kernel in a randomized place we can use this new helper to enter the kernel and begin to relocate again. Signed-off-by: Jason Yan Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Tested-by: Diana Craciun Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit aa1d2090e69311c65f69c0fa2311d1d0f01c55f8 Author: Jason Yan Date: Fri Sep 20 17:45:38 2019 +0800 powerpc/fsl_booke/32: introduce create_kaslr_tlb_entry() helper Add a new helper create_kaslr_tlb_entry() to create a tlb entry by the virtual and physical address. This is a preparation to support boot kernel at a randomized address. Signed-off-by: Jason Yan Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Tested-by: Diana Craciun Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit 39f4b7bf7571a9c6529b0bb3de49c9bb0998f194 Author: Jason Yan Date: Fri Sep 20 17:45:37 2019 +0800 powerpc: introduce kernstart_virt_addr to store the kernel base Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we need a variable to store the kernel base. Signed-off-by: Jason Yan Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Tested-by: Diana Craciun Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit 4ed47dbefa299d7b36944f6d4001ee83612dd680 Author: Jason Yan Date: Fri Sep 20 17:45:36 2019 +0800 powerpc: move memstart_addr and kernstart_addr to init-common.c These two variables are both defined in init_32.c and init_64.c. Move them to init-common.c and make them __ro_after_init. Signed-off-by: Jason Yan Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Tested-by: Diana Craciun Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit 8054df0570588e22007a8be6fa7615462389f27f Author: Jason Yan Date: Fri Sep 20 17:45:35 2019 +0800 powerpc: unify definition of M_IF_NEEDED M_IF_NEEDED is defined too many times. Move it to a common place and rename it to MAS2_M_IF_NEEDED which is much readable. Signed-off-by: Jason Yan Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Tested-by: Diana Craciun Signed-off-by: Scott Wood Signed-off-by: Michael Ellerman commit 84a1b6e1d938be6a26a88083058884246415a5fc Merge: 57a54dfe4895 3b8db0348c50 Author: Olof Johansson Date: Tue Nov 12 22:59:23 2019 -0800 Merge tag 'soc-fsl-next-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers NXP/FSL SoC driver updates for v5.5 RCPM driver for ARM SoCs - add RCPM driver to manage the wakeup devices for QorIQ ARM SoCs (HW low power states are supported in PSCI firmware) - add API to PM wakeup framework to retrieve wakeup sources * tag 'soc-fsl-next-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: add RCPM driver dt-bindings: fsl: rcpm: Add 'little-endian' and update Chassis definition PM: wakeup: Add routine to help fetch wakeup source object. Link: https://lore.kernel.org/r/1573599595-31411-1-git-send-email-leoyang.li@nxp.com Signed-off-by: Olof Johansson commit ab818f0999dc73af3f966194d087e9f6650f939f Merge: 82b711c251c6 93a212ebfb08 Author: Olof Johansson Date: Tue Nov 12 22:57:56 2019 -0800 Merge tag 'omap-for-v5.5/maintainers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc Update MAINTAINERS file for LogicPD dts files Just one patch to update MAINTAINERS file for LogicPD boards. * tag 'omap-for-v5.5/maintainers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: MAINTAINERS: Add logicpd-som-lv and logicpd-torpedo to OMAP TREE Link: https://lore.kernel.org/r/pull-1573579927-542764@atomide.com-3 Signed-off-by: Olof Johansson commit 82b711c251c628bf48f4043e42dab8488d624247 Merge: 0f3dac611060 0b491904f053 Author: Olof Johansson Date: Tue Nov 12 22:57:37 2019 -0800 Merge tag 'omap-for-v5.5/soc-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc Few late SoC changes for v5.5 merge window These changes just clean up few typos, and there is one non-critical correction of missing put_device() after calling of_platform_populate() for display controller. Naturally none of this is urgent and can be merged when suitable. * tag 'omap-for-v5.5/soc-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Add missing put_device() call in omapdss_init_of() OMAP2: fixup doc comments in omap_device ARM: OMAP1: drop duplicated dependency on ARCH_OMAP1 ARM: OMAP1: ams-delta FIQ: Fix a typo ("Initiaize") Link: https://lore.kernel.org/r/pull-1573579927-542764@atomide.com-2 Signed-off-by: Olof Johansson commit 5f1f15283419ded3e16617ac0b79abc6f2b73bba Merge: f1deadb5bed4 abb0e36b434d Author: Olof Johansson Date: Tue Nov 12 22:57:04 2019 -0800 Merge tag 'omap-for-v5.5/dt-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Few late dts changes for omaps for v5.5 merge window Let's configure omap3 rng as we can now easily do it with a dts change only by tagging it with status = "disabled" for n900 where it's not accessible. This improves the boot-up time with distros quite a bit with proper entropy source around. There's also another minor update for logicpd-torpedo that does not have USB host pins wired. * tag 'omap-for-v5.5/dt-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: logicpd-torpedo: Disable USB Host ARM: dts: Configure omap3 rng Link: https://lore.kernel.org/r/pull-1573579927-542764@atomide.com Signed-off-by: Olof Johansson commit 565f9bc05e2dad6c7fdfc7c2e641be580aa599cd Author: Michal Suchanek Date: Thu Nov 7 17:47:57 2019 +0100 powerpc/fadump: when fadump is supported register the fadump sysfs files. Currently it is not possible to distinguish the case when fadump is supported by firmware and disabled in kernel and completely unsupported using the kernel sysfs interface. User can investigate the devicetree but it is more reasonable to provide sysfs files in case we get some fadumpv2 in the future. With this patch sysfs files are available whenever fadump is supported by firmware. There is duplicate message about lack of support by firmware in fadump_reserve_mem and setup_fadump. Remove the duplicate message in setup_fadump. Signed-off-by: Michal Suchanek Reviewed-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191107164757.15140-1-msuchanek@suse.de commit 42484d2c0f82b666292faf6668c77b49a3a04bc0 Author: Michal Suchanek Date: Thu Sep 12 21:46:33 2019 +0200 powerpc/perf: remove current_is_64bit() Since commit ed1cd6deb013 ("powerpc: Activate CONFIG_THREAD_INFO_IN_TASK") current_is_64bit() is quivalent to !is_32bit_task(). Remove the redundant function. Suggested-by: Christophe Leroy Signed-off-by: Michal Suchanek Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190912194633.12045-1-msuchanek@suse.de commit de84ffc3ccbeec3678f95a3d898fc188efa0d9c5 Author: Sam Bobroff Date: Thu Oct 17 15:59:37 2019 +1100 powerpc/eeh: differentiate duplicate detection message Currently when an EEH error is detected, the system log receives the same (or almost the same) message twice: EEH: PHB#0 failure detected, location: N/A EEH: PHB#0 failure detected, location: N/A or EEH: eeh_dev_check_failure: Frozen PHB#0-PE#0 detected EEH: Frozen PHB#0-PE#0 detected This looks like a bug, but in fact the messages are from different functions and mean slightly different things. So keep both but change one of the messages slightly, so that it's clear they are different: EEH: PHB#0 failure detected, location: N/A EEH: Recovering PHB#0, location: N/A or EEH: eeh_dev_check_failure: Frozen PHB#0-PE#0 detected EEH: Recovering PHB#0-PE#0 Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/43817cb6e6631b0828b9a6e266f60d1f8ca8eb22.1571288375.git.sbobroff@linux.ibm.com commit b948aaaf3e39cc475e45fea727638f191a5cb1b4 Author: Leonardo Bras Date: Fri Aug 2 10:39:15 2019 -0300 powerpc/pseries/hotplug-memory: Change rc variable to bool Changes the return variable to bool (as the return value) and avoids doing a ternary operation before returning. Signed-off-by: Leonardo Bras Reviewed-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190802133914.30413-1-leonardo@linux.ibm.com commit f5817191b0a3257d9963a574c53d085d9f443e7d Author: Christoph Hellwig Date: Wed Aug 7 18:07:52 2019 +0300 powerpc: use The powerpc version of dma-mapping.h only contains a version of get_arch_dma_ops that always return NULL. Replace it with the asm-generic version that does the same. Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190807150752.17894-1-hch@lst.de commit 1ca3dec2b2dff9d286ce6cd64108bda0e98f9710 Author: Cédric Le Goater Date: Thu Oct 31 07:31:00 2019 +0100 powerpc/xive: Prevent page fault issues in the machine crash handler When the machine crash handler is invoked, all interrupts are masked but interrupts which have not been started yet do not have an ESB page mapped in the Linux address space. This crashes the 'crash kexec' sequence on sPAPR guests. To fix, force the mapping of the ESB page when an interrupt is being mapped in the Linux IRQ number space. This is done by setting the initial state of the interrupt to OFF which is not necessarily the case on PowerNV. Fixes: 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE interrupt controller") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031063100.3864-1-clg@kaod.org commit 1db550f44ab672b5ded14a94e092b9a9a2d29c8c Author: Andrew Donnellan Date: Tue Oct 22 17:06:03 2019 +1100 powerpc/64s/exception: Fix kaup -> kuap typo It's KUAP, not KAUP. Fix typo in INT_COMMON macro. Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191022060603.24101-1-ajd@linux.ibm.com commit bbbd7f112c7b0af32f7b3c725b2c41e93cf181f6 Author: Thomas Huth Date: Wed Aug 28 08:07:37 2019 +0200 powerpc: Replace GPL boilerplate with SPDX identifiers The FSF does not reside in "675 Mass Ave, Cambridge" anymore... let's simply use proper SPDX identifiers instead. Signed-off-by: Thomas Huth Acked-by: Russell Currey Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190828060737.32531-1-thuth@redhat.com commit d7e02f7b7991dbe14a2acfb0e53d675cd149001c Author: Aneesh Kumar K.V Date: Thu Jul 11 20:28:14 2019 +0530 powerpc/book3s/mm: Update Oops message to print the correct translation in use Avoids confusion when printing Oops message like below Faulting instruction address: 0xc00000000008bdb4 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV This was because we never clear the MMU_FTR_HPTE_TABLE feature flag even if we run with radix translation. It was discussed that we should look at this feature flag as an indication of the capability to run hash translation and we should not clear the flag even if we run in radix translation. All the code paths check for radix_enabled() check and if found true consider we are running with radix translation. Follow the same sequence for finding the MMU translation string to be used in Oops message. Signed-off-by: Aneesh Kumar K.V Acked-by: Nicholas Piggin Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190711145814.17970-1-aneesh.kumar@linux.ibm.com commit 35a5c328fcf3493c5adf333d34c1ca6953fe372d Author: YueHaibing Date: Wed Oct 23 21:44:23 2019 +0800 powerpc/spufs: remove set but not used variable 'ctx' arch/powerpc/platforms/cell/spufs/inode.c:201:22: warning: variable ctx set but not used [-Wunused-but-set-variable] It is not used since commit 67cba9fd6456 ("move spu_forget() into spufs_rmdir()") Signed-off-by: YueHaibing Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191023134423.15052-1-yuehaibing@huawei.com commit c312d14e19bb7ca8214ef661d9a125cd631528cb Author: YueHaibing Date: Thu Jul 11 22:18:18 2019 +0800 powerpc/powernv/ioda: using kfree_rcu() to simplify the code The callback function of call_rcu() just calls a kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: YueHaibing Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190711141818.18044-1-yuehaibing@huawei.com commit bc75e5438488edef80d952d1146701f872092750 Author: YueHaibing Date: Tue Jul 2 21:17:33 2019 +0800 powerpc/powernv: Make some symbols static Fix sparse warnings: arch/powerpc/platforms/powernv/opal-psr.c:20:1: warning: symbol 'psr_mutex' was not declared. Should it be static? arch/powerpc/platforms/powernv/opal-psr.c:27:3: warning: symbol 'psr_attrs' was not declared. Should it be static? arch/powerpc/platforms/powernv/opal-powercap.c:20:1: warning: symbol 'powercap_mutex' was not declared. Should it be static? arch/powerpc/platforms/powernv/opal-sensor-groups.c:20:1: warning: symbol 'sg_mutex' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190702131733.44100-1-yuehaibing@huawei.com commit 93a1544ad4ec4bd9147992e57b4f834ceb2cc159 Author: YueHaibing Date: Tue Nov 12 23:01:34 2019 +1100 powerpc/configs: remove obsolete CONFIG_INET_XFRM_MODE_* and CONFIG_INET6_XFRM_MODE_* These Kconfig options has been removed in commit 4c145dce2601 ("xfrm: make xfrm modes builtin") So there is no point to keep it in defconfigs any longer. Signed-off-by: YueHaibing [mpe: Extract from cross arch patch] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190612071901.21736-1-yuehaibing@huawei.com commit 42974f357dbf05d649ff62719de21995e7cfee79 Author: YueHaibing Date: Mon Feb 18 13:39:50 2019 +0000 powerpc/pseries: Fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190218133950.95225-1-yuehaibing@huawei.com commit 11dd34f3eae5a468013bb161a1dcf1fecd2ca321 Author: YueHaibing Date: Mon Feb 18 12:56:44 2019 +0000 powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init() There is no need to have the 'struct dentry *vpa_dir' variable static since new value always be assigned before use it. Fixes: c6c26fb55e8e ("powerpc/pseries: Export raw per-CPU VPA data via debugfs") Signed-off-by: YueHaibing Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190218125644.87448-1-yuehaibing@huawei.com commit bfa2325e5b8b800cc6720cad8d2f066cd0136bee Author: YueHaibing Date: Tue Dec 25 02:44:36 2018 +0000 powerpc/powernv/npu: Fix debugfs_simple_attr.cocci warnings Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: YueHaibing Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1545705876-63132-1-git-send-email-yuehaibing@huawei.com commit 090d5ab93d0b8a079dd516c16649bd00ba4f7302 Author: YueHaibing Date: Thu Nov 29 13:35:18 2018 +0000 powerpc/64s: Fix debugfs_simple_attr.cocci warnings Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: YueHaibing Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1543498518-107601-1-git-send-email-yuehaibing@huawei.com commit d273fa919c39223a1edd968e82ea88501b63d21a Author: YueHaibing Date: Wed Oct 23 21:48:38 2019 +0800 powerpc/pseries: Use correct event modifier in rtas_parse_epow_errlog() rtas_parse_epow_errlog() should pass 'modifier' to handle_system_shutdown, because event modifier only use bottom 4 bits. Reviewed-by: Tyrel Datwyler Signed-off-by: YueHaibing Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191023134838.21280-1-yuehaibing@huawei.com commit 5dc7b419a5a746db6941154b06b932eaf2e692df Author: Ravi Bangoria Date: Thu Oct 17 15:02:04 2019 +0530 powerpc/watchpoint: Support for 8xx in ptrace-hwbreak.c selftest On the 8xx, signals are generated after executing the instruction. So no need to manually single-step on 8xx. Also, 8xx __set_dabr() currently ignores length and hardcodes the length to 8 bytes. So all unaligned and 512 byte testcase will fail on 8xx. Ignore those testcases on 8xx. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191017093204.7511-8-ravi.bangoria@linux.ibm.com commit 949758a2f4e606a2575b3cfd0ea22c1d4784c673 Author: Ravi Bangoria Date: Thu Oct 17 15:02:03 2019 +0530 powerpc/watchpoint: Add DAR outside test in perf-hwbreak.c selftest So far we used to ignore exception if DAR points outside of user specified range. But now we are ignoring it only if actual load/store range does not overlap with user specified range. Include selftests for the same: # ./tools/testing/selftests/powerpc/ptrace/perf-hwbreak ... TESTED: No overlap TESTED: Partial overlap TESTED: Partial overlap TESTED: No overlap TESTED: Full overlap success: perf_hwbreak Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191017093204.7511-7-ravi.bangoria@linux.ibm.com commit c2837acfbf390c49056b4b412b65ce39977c15df Author: Ravi Bangoria Date: Thu Oct 17 15:02:02 2019 +0530 selftests/powerpc: Rewrite ptrace-hwbreak.c selftest ptrace-hwbreak.c selftest is logically broken. On powerpc, when watchpoint is created with ptrace, signals are generated before executing the instruction and user has to manually singlestep the instruction with watchpoint disabled, which selftest never does and thus it keeps on getting the signal at the same instruction. If we fix it, selftest fails because the logical connection between tracer(parent) and tracee(child) is also broken. Rewrite the selftest and add new tests for unaligned access. With patch: $ ./tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak test: ptrace-hwbreak tags: git_version:powerpc-5.3-4-224-g218b868240c7-dirty PTRACE_SET_DEBUGREG, WO, len: 1: Ok PTRACE_SET_DEBUGREG, WO, len: 2: Ok PTRACE_SET_DEBUGREG, WO, len: 4: Ok PTRACE_SET_DEBUGREG, WO, len: 8: Ok PTRACE_SET_DEBUGREG, RO, len: 1: Ok PTRACE_SET_DEBUGREG, RO, len: 2: Ok PTRACE_SET_DEBUGREG, RO, len: 4: Ok PTRACE_SET_DEBUGREG, RO, len: 8: Ok PTRACE_SET_DEBUGREG, RW, len: 1: Ok PTRACE_SET_DEBUGREG, RW, len: 2: Ok PTRACE_SET_DEBUGREG, RW, len: 4: Ok PTRACE_SET_DEBUGREG, RW, 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_RANGE, DW ALIGNED, WO, len: 6: Ok PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW ALIGNED, RO, len: 6: Ok PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW ALIGNED, RW, len: 6: Ok PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, WO, len: 6: Ok PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, RO, len: 6: Ok PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, RW, len: 6: Ok PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, DAR OUTSIDE, RW, len: 6: Ok PPC_PTRACE_SETHWDEBUG, DAWR_MAX_LEN, RW, len: 512: Ok success: ptrace-hwbreak Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191017093204.7511-6-ravi.bangoria@linux.ibm.com commit 27985b2a640e24ce51810aadd0e93d5e0833c9b7 Author: Ravi Bangoria Date: Thu Oct 17 15:02:01 2019 +0530 powerpc/watchpoint: Don't ignore extraneous exceptions blindly On powerpc, watchpoint match range is double-word granular. On a watchpoint hit, DAR is set to the first byte of overlap between actual access and watched range. And thus it's quite possible that DAR does not point inside user specified range. Ex, say user creates a watchpoint with address range 0x1004 to 0x1007. So hw would be configured to watch from 0x1000 to 0x1007. If there is a 4 byte access from 0x1002 to 0x1005, DAR will point to 0x1002 and thus interrupt handler considers it as extraneous, but it's actually not, because part of the access belongs to what user has asked. Instead of blindly ignoring the exception, get actual address range by analysing an instruction, and ignore only if actual range does not overlap with user specified range. Note: The behavior is unchanged for 8xx. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191017093204.7511-5-ravi.bangoria@linux.ibm.com commit c3f68b0478e7c07769394d17ebde0626600a7e1d Author: Ravi Bangoria Date: Thu Oct 17 15:02:00 2019 +0530 powerpc/watchpoint: Fix ptrace code that muck around with address/len ptrace_set_debugreg() does not consider new length while overwriting the watchpoint. Fix that. ppc_set_hwdebug() aligns watchpoint address to doubleword boundary but does not change the length. If address range is crossing doubleword boundary and length is less then 8, we will lose samples from second doubleword. So fix that as well. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191017093204.7511-4-ravi.bangoria@linux.ibm.com commit b57aeab811db07295f646808b1b17c312d17f57d Author: Ravi Bangoria Date: Thu Oct 17 15:01:59 2019 +0530 powerpc/watchpoint: Fix length calculation for unaligned target Watchpoint match range is always doubleword(8 bytes) aligned on powerpc. If the given range is crossing doubleword boundary, we need to increase the length such that next doubleword also get covered. Ex, address len = 6 bytes |=========. |------------v--|------v--------| | | | | | | | | | | | | | | | | | |---------------|---------------| <---8 bytes---> In such case, current code configures hw as: start_addr = address & ~HW_BREAKPOINT_ALIGN len = 8 bytes And thus read/write in last 4 bytes of the given range is ignored. Fix this by including next doubleword in the length. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191017093204.7511-3-ravi.bangoria@linux.ibm.com commit b811be615cb78c90fca42bbd5b958427d03ba7e0 Author: Ravi Bangoria Date: Thu Oct 17 15:01:58 2019 +0530 powerpc/watchpoint: Introduce macros for watchpoint length We are hadrcoding length everywhere in the watchpoint code. Introduce macros for the length and use them. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191017093204.7511-2-ravi.bangoria@linux.ibm.com commit 4e706af3cd8e1d0503c25332b30cad33c97ed442 Author: Gustavo L. F. Walbon Date: Thu May 2 18:09:07 2019 -0300 powerpc/security: Fix wrong message when RFI Flush is disable The issue was showing "Mitigation" message via sysfs whatever the state of "RFI Flush", but it should show "Vulnerable" when it is disabled. If you have "L1D private" feature enabled and not "RFI Flush" you are vulnerable to meltdown attacks. "RFI Flush" is the key feature to mitigate the meltdown whatever the "L1D private" state. SEC_FTR_L1D_THREAD_PRIV is a feature for Power9 only. So the message should be as the truth table shows: CPU | L1D private | RFI Flush | sysfs ----|-------------|-----------|------------------------------------- P9 | False | False | Vulnerable P9 | False | True | Mitigation: RFI Flush P9 | True | False | Vulnerable: L1D private per thread P9 | True | True | Mitigation: RFI Flush, L1D private per thread P8 | False | False | Vulnerable P8 | False | True | Mitigation: RFI Flush Output before this fix: # cat /sys/devices/system/cpu/vulnerabilities/meltdown Mitigation: RFI Flush, L1D private per thread # echo 0 > /sys/kernel/debug/powerpc/rfi_flush # cat /sys/devices/system/cpu/vulnerabilities/meltdown Mitigation: L1D private per thread Output after fix: # cat /sys/devices/system/cpu/vulnerabilities/meltdown Mitigation: RFI Flush, L1D private per thread # echo 0 > /sys/kernel/debug/powerpc/rfi_flush # cat /sys/devices/system/cpu/vulnerabilities/meltdown Vulnerable: L1D private per thread Signed-off-by: Gustavo L. F. Walbon Signed-off-by: Mauro S. M. Rodrigues Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190502210907.42375-1-gwalbon@linux.ibm.com commit 9f0acf9f80ad504573e6482fb00b53866a9b9d2f Author: Chris Smart Date: Sun Nov 3 23:33:56 2019 +0000 powerpc/crypto: Add cond_resched() in crc-vpmsum self-test The stress test for vpmsum implementations executes a long for loop in the kernel. This blocks the scheduler, which prevents other tasks from running, resulting in a warning. This fix adds a call to cond_reshed() at the end of each loop, which allows the scheduler to run other tasks as required. Signed-off-by: Chris Smart Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191103233356.5472-1-chris.smart@humanservices.gov.au commit b1713975c31ae20ecc40fd00191ee3fa51445d4a Author: David Hildenbrand Date: Thu Oct 31 15:29:31 2019 +0100 powerpc/pseries/cmm: Simulation mode Let's allow to test the implementation without needing HW support. When "simulate=1" is specified when loading the module, we bypass all HW checks and HW calls. The sysfs file "simulate_loan_target_kb" can be used to simulate HW requests. The simualtion mode can be activated using: modprobe cmm debug=1 simulate=1 And the requested loan target can be changed using: echo X > /sys/devices/system/cmm/cmm0/simulate_loan_target_kb Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-11-david@redhat.com commit e8decafefb67794ba30fddf7d9e90a247b5aa172 Author: David Hildenbrand Date: Thu Oct 31 15:29:30 2019 +0100 powerpc/pseries/cmm: Switch to balloon_page_alloc() balloon_page_alloc() will use GFP_HIGHUSER_MOVABLE in case we have CONFIG_BALLOON_COMPACTION. This is now possible, as balloon pages are movable with CONFIG_BALLOON_COMPACTION. Without CONFIG_BALLOON_COMPACTION, GFP_HIGHUSER is used. Note that apart from that, balloon_page_alloc() uses the following flags: __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN And current code used: GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY | __GFP_NOMEMALLOC GFP_HIGHUSER/GFP_HIGHUSER_MOVABLE include __GFP_RECLAIM | __GFP_IO | __GFP_FS | __GFP_HARDWALL | __GFP_HIGHMEM GFP_NOIO is __GFP_RECLAIM. With CONFIG_BALLOON_COMPACTION, we essentially add: __GFP_IO | __GFP_FS | __GFP_HARDWALL | __GFP_HIGHMEM | __GFP_MOVABLE Without CONFIG_BALLOON_COMPACTION, we essentially add: __GFP_IO | __GFP_FS | __GFP_HARDWALL | __GFP_HIGHMEM I assume this is fine, as this is what all other balloon compaction users use. If it turns out to be a problem, we could add __GFP_MOVABLE manually if we have CONFIG_BALLOON_COMPACTION. Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-10-david@redhat.com commit fe030c9b85e6783bc52fe86449c0a4b8aa16c753 Author: David Hildenbrand Date: Thu Oct 31 15:29:29 2019 +0100 powerpc/pseries/cmm: Implement balloon compaction We can now get rid of the cmm_lock and completely rely on the balloon compaction internals, which now also manage the page list and the lock. Inflated/"loaned" pages are now movable. Memory blocks that contain such pages can get offlined. Also, all such pages will be marked PageOffline() and can therefore be excluded in memory dumps using recent versions of makedumpfile. Don't switch to balloon_page_alloc() yet (due to the GFP_NOIO). Will do that separately to discuss this change in detail. Signed-off-by: David Hildenbrand [mpe: Add isolated_pages-- in cmm_migratepage() as suggested by David] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-9-david@redhat.com commit 1ef2f06b71792c2efaa4fb4aef8f1fc2a115ee1f Author: David Hildenbrand Date: Thu Oct 31 15:29:28 2019 +0100 powerpc/pseries/cmm: Convert loaned_pages to an atomic_long_t When switching to balloon compaction, we want to drop the cmm_lock and completely rely on the balloon compaction list lock internally. loaned_pages is currently protected under the cmm_lock. Note: Right now cmm_alloc_pages() and cmm_free_pages() can be called at the same time, e.g., via the thread and a concurrent OOM notifier. Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-8-david@redhat.com commit 7659f5d6448095ef436891c33bdd7c8500620a00 Author: David Hildenbrand Date: Thu Oct 31 15:29:27 2019 +0100 powerpc/pseries/cmm: Rip out memory isolate notifier The memory isolate notifier was added to allow to offline memory blocks that contain inflated/"loaned" pages. We can achieve the same using the balloon compaction framework. Get rid of the memory isolate notifier. Also, we can get rid of cmm_mem_going_offline(), as we will never reach that code path now when we have allocated memory in the balloon (allocated pages are unmovable and will no longer be special-cased using the memory isolation notifier). Leave the memory notifier in place, so we can still back off in case memory gets offlined. Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-7-david@redhat.com commit 287b89773d8172df049f0f4c27946b2ae4ac4b41 Author: David Hildenbrand Date: Thu Oct 31 15:29:26 2019 +0100 powerpc/pseries/cmm: Use adjust_managed_page_count() insted of totalram_pages_* adjust_managed_page_count() performs a totalram_pages_add(), but also adjusts the managed pages of the zone. Let's use that instead, similar to virtio-balloon. Use it before freeing a page. Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-6-david@redhat.com commit 4a1745c5bf92232f115e28296475dc42254b1c7d Author: David Hildenbrand Date: Thu Oct 31 15:29:25 2019 +0100 powerpc/pseries/cmm: Drop page array We can simply store the pages in a list (page->lru), no need for a separate data structure (+ complicated handling). This is how most other balloon drivers store allocated pages without additional tracking data. For the notifiers, use page_to_pfn() to check if a page is in the applicable range. Use page_to_phys() in plpar_page_set_loaned() and plpar_page_set_active() (I assume due to the __pa() that's the right thing to do). Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-5-david@redhat.com commit 68f7a04932bbcd72973fd58b16a817f4bf99171a Author: David Hildenbrand Date: Thu Oct 31 15:29:24 2019 +0100 powerpc/pseries/cmm: Cleanup rc handling in cmm_init() No need to initialize rc. Also, let's return 0 directly when succeeding. Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-4-david@redhat.com commit 022da223180137b25f070a7d0b1fe114e1e87433 Author: David Hildenbrand Date: Thu Oct 31 15:29:23 2019 +0100 powerpc/pseries/cmm: Report errors when registering notifiers fails If we don't set the rc, we will return "0", making it look like we succeeded. Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-3-david@redhat.com commit 7d8212747435c534c8d564fbef4541a463c976ff Author: David Hildenbrand Date: Thu Oct 31 15:29:22 2019 +0100 powerpc/pseries/cmm: Implement release() function for sysfs device When unloading the module, one gets ------------[ cut here ]------------ Device 'cmm0' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt. WARNING: CPU: 0 PID: 19308 at drivers/base/core.c:1244 .device_release+0xcc/0xf0 ... We only have one static fake device. There is nothing to do when releasing the device (via cmm_exit()). Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-2-david@redhat.com commit 0a87ccd3699983645f54cafd2258514a716b20b8 Author: Tyrel Datwyler Date: Sun Nov 10 23:21:37 2019 -0600 powerpc/pseries: Enable support for ibm,drc-info property Advertise client support for the PAPR architected ibm,drc-info device tree property during CAS handshake. Fixes: c7a3275e0f9e ("powerpc/pseries: Revert support for ibm,drc-info devtree property") Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-11-git-send-email-tyreld@linux.ibm.com commit 4f9f2d3d7a434b7f882b72550194c9278f4a3925 Author: Tyrel Datwyler Date: Sun Nov 10 23:21:36 2019 -0600 PCI: rpaphp: Correctly match ibm, my-drc-index to drc-name when using drc-info The newer ibm,drc-info property is a condensed description of the old ibm,drc-* properties (ie. names, types, indexes, and power-domains). When matching a drc-index to a drc-name we need to verify that the index is within the start and last drc-index range and map it to a drc-name using the drc-name-prefix and logical index. Fix the mapping by checking that the index is within the range of the current drc-info entry, and build the name from the drc-name-prefix concatenated with the starting drc-name-suffix value and the sequential index obtained by subtracting ibm,my-drc-index from this entries drc-start-index. Signed-off-by: Tyrel Datwyler Acked-by: Bjorn Helgaas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-10-git-send-email-tyreld@linux.ibm.com commit 0737686778c6dbe0908d684dd5b9c05b127526ba Author: Tyrel Datwyler Date: Sun Nov 10 23:21:35 2019 -0600 PCI: rpaphp: Annotate and correctly byte swap DRC properties The device tree is in big endian format and any properties directly retrieved using OF helpers that don't explicitly byte swap should be annotated. In particular there are several places where we grab the opaque property value for the old ibm,drc-* properties and the ibm,my-drc-index property. Fix this for better static checking by annotating values we know to explicitly big endian, and byte swap where appropriate. Signed-off-by: Tyrel Datwyler Acked-by: Bjorn Helgaas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-9-git-send-email-tyreld@linux.ibm.com commit efeda8fada43783635f0274b0a0fa0d0fb6debb8 Author: Tyrel Datwyler Date: Sun Nov 10 23:21:33 2019 -0600 PCI: rpaphp: Add drc-info support for hotplug slot registration Split physical PCI slot registration scanning into separate routines that support the old ibm,drc-* properties and one that supports the new compressed ibm,drc-info property. Signed-off-by: Tyrel Datwyler Acked-by: Bjorn Helgaas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-7-git-send-email-tyreld@linux.ibm.com commit 52e2b0f16574afd082cff0f0e8567b2d9f68c033 Author: Tyrel Datwyler Date: Sun Nov 10 23:21:32 2019 -0600 PCI: rpaphp: Don't rely on firmware feature to imply drc-info support In the event that the partition is migrated to a platform with older firmware that doesn't support the ibm,drc-info property the device tree is modified to remove the ibm,drc-info property and replace it with the older style ibm,drc-* properties for types, names, indexes, and power-domains. One of the requirements of the drc-info firmware feature is that the client is able to handle both the new property, and old style properties at runtime. Therefore we can't rely on the firmware feature alone to dictate which property is currently present in the device tree. Fix this short coming by checking explicitly for the ibm,drc-info property, and falling back to the older ibm,drc-* properties if it doesn't exist. Signed-off-by: Tyrel Datwyler Acked-by: Bjorn Helgaas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-6-git-send-email-tyreld@linux.ibm.com commit 9723c25f99aff0451cfe6392e1b9fdd99d0bf9f0 Author: Tyrel Datwyler Date: Sun Nov 10 23:21:31 2019 -0600 PCI: rpaphp: Fix up pointer to first drc-info entry The first entry of the ibm,drc-info property is an int encoded count of the number of drc-info entries that follow. The "value" pointer returned by of_prop_next_u32() is still pointing at the this value when we call of_read_drc_info_cell(), but the helper function expects that value to be pointing at the first element of an entry. Fix up by incrementing the "value" pointer to point at the first element of the first drc-info entry prior. Signed-off-by: Tyrel Datwyler Acked-by: Bjorn Helgaas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-5-git-send-email-tyreld@linux.ibm.com commit b015f6bc9547dbc056edde7177c7868ca8629c4c Author: Tyrel Datwyler Date: Sun Nov 10 23:21:30 2019 -0600 powerpc/pseries: Add cpu DLPAR support for drc-info property Older firmwares provided information about Dynamic Reconfig Connectors (DRC) through several device tree properties, namely ibm,drc-types, ibm,drc-indexes, ibm,drc-names, and ibm,drc-power-domains. New firmwares have the ability to present this same information in a much condensed format through a device tree property called ibm,drc-info. The existing cpu DLPAR hotplug code only understands the older DRC property format when validating the drc-index of a cpu during a hotplug add. This updates those code paths to use the ibm,drc-info property, when present, instead for validation. Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-4-git-send-email-tyreld@linux.ibm.com commit 775fa495af04e0bdb3a00085aaa2d915ed51388f Author: Tyrel Datwyler Date: Sun Nov 10 23:21:29 2019 -0600 powerpc/pseries: Fix drc-info mappings of logical cpus to drc-index There are a couple subtle errors in the mapping between cpu-ids and a cpus associated drc-index when using the new ibm,drc-info property. The first is that while drc-info may have been a supported firmware feature at boot it is possible we have migrated to a CEC with older firmware that doesn't support the ibm,drc-info property. In that case the device tree would have been updated after migration to remove the ibm,drc-info property and replace it with the older style ibm,drc-* properties for types, indexes, names, and power-domains. PAPR even goes as far as dictating that if we advertise support for drc-info that we are capable of supporting either property type at runtime. The second is that the first value of the ibm,drc-info property is the int encoded count of drc-info entries. As such "value" returned by of_prop_next_u32() is pointing at that count, and not the first element of the first drc-info entry as is expected by the of_read_drc_info_cell() helper. Fix the first by ignoring DRC-INFO firmware feature and instead testing directly for ibm,drc-info, and then falling back to the old style ibm,drc-indexes in the case it doesn't exit. Fix the second by incrementing value to the next element prior to parsing drc-info entries. Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-3-git-send-email-tyreld@linux.ibm.com commit 57409d4fb12c185b2c0689e0496878c8f6bb5b58 Author: Tyrel Datwyler Date: Sun Nov 10 23:21:28 2019 -0600 powerpc/pseries: Fix bad drc_index_start value parsing of drc-info entry The ibm,drc-info property is an array property that contains drc-info entries such that each entry is made up of 2 string encoded elements followed by 5 int encoded elements. The of_read_drc_info_cell() helper contains comments that correctly name the expected elements and their encoding. However, the usage of of_prop_next_string() and of_prop_next_u32() introduced a subtle skippage of the first u32. This is a result of of_prop_next_string() returning a pointer to the next property value which is not a string, but actually a (__be32 *). As, a result the following call to of_prop_next_u32() passes over the current int encoded value and actually stores the next one wrongly. Simply endian swap the current value in place after reading the first two string values. The remaining int encoded values can then be read correctly using of_prop_next_u32(). Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-2-git-send-email-tyreld@linux.ibm.com commit d34a5709be85e88a8bb7537cd38b8eca8085047a Merge: ea458effa88e 8220e22d11a0 Author: Michael Ellerman Date: Wed Nov 13 16:52:25 2019 +1100 Merge branch 'topic/secureboot' into next Merge the secureboot support, as well as the IMA changes needed to support it. From Nayna's cover letter: In order to verify the OS kernel on PowerNV systems, secure boot requires X.509 certificates trusted by the platform. These are stored in secure variables controlled by OPAL, called OPAL secure variables. In order to enable users to manage the keys, the secure variables need to be exposed to userspace. OPAL provides the runtime services for the kernel to be able to access the secure variables. This patchset defines the kernel interface for the OPAL APIs. These APIs are used by the hooks, which load these variables to the keyring and expose them to the userspace for reading/writing. Overall, this patchset adds the following support: * expose secure variables to the kernel via OPAL Runtime API interface * expose secure variables to the userspace via kernel sysfs interface * load kernel verification and revocation keys to .platform and .blacklist keyring respectively. The secure variables can be read/written using simple linux utilities cat/hexdump. For example: Path to the secure variables is: /sys/firmware/secvar/vars Each secure variable is listed as directory. $ ls -l total 0 drwxr-xr-x. 2 root root 0 Aug 20 21:20 db drwxr-xr-x. 2 root root 0 Aug 20 21:20 KEK drwxr-xr-x. 2 root root 0 Aug 20 21:20 PK The attributes of each of the secure variables are (for example: PK): $ ls -l total 0 -r--r--r--. 1 root root 4096 Oct 1 15:10 data -r--r--r--. 1 root root 65536 Oct 1 15:10 size --w-------. 1 root root 4096 Oct 1 15:12 update The "data" is used to read the existing variable value using hexdump. The data is stored in ESL format. The "update" is used to write a new value using cat. The update is to be submitted as AUTH file. commit b50a85c023f494047a3767398ca589d1c801f22b Author: Joel Stanley Date: Tue Nov 12 11:09:07 2019 +1030 ARM: config: multi_v5: ASPEED SDHCI, SGPIO Enable drivers used by the ASPEED AST2400 SoC so the multi v5 defconfig can run on those boards. Reviewed-by: Cédric Le Goater Acked-by: Arnd Bergmann Signed-off-by: Joel Stanley commit e8267270cfc40896224ea5f97d938defa693e041 Author: Joel Stanley Date: Tue Nov 12 10:46:03 2019 +1030 ARM: configs: multi_v7: ASPEED network, gpio, FSI Enable drivers used by the ASPEED SoCs so the multi v7 defconfig can run on those boards. Reviewed-by: Cédric Le Goater Acked-by: Arnd Bergmann Signed-off-by: Joel Stanley commit 55b51e8e7b4b46be69d1d96e45755719444c1de1 Author: Joel Stanley Date: Tue Nov 12 11:02:11 2019 +1030 ARM: config: aspeed-g4: Add MMC, and cleanup The PCA muxes now depend on I2C_MUX. SPI si now required by SPI-NOR. Add the eMMC driver, and remove the FSI SBEFIFO which is not used on AST2400 systems. The remaining changes are cleanups from regenerating the defconfig. Reviewed-by: Cédric Le Goater Acked-by: Arnd Bergmann Signed-off-by: Joel Stanley commit ec46265ce183f1f70de09f038756e9b3d8d498e1 Author: Joel Stanley Date: Tue Nov 12 10:42:18 2019 +1030 ARM: config: aspeed-g5: Add SGPIO and FSI drivers These are recently merged drivers for ASPEED systems. Reviewed-by: Cédric Le Goater Acked-by: Arnd Bergmann Signed-off-by: Joel Stanley commit a5331a7a87ec81d5228b7421acf831b2d0c0de26 Author: Joel Stanley Date: Tue Nov 12 10:39:26 2019 +1030 ARM: config: aspeed-g5: Enable 8250_DW quirks This driver option is used by the AST2600 A0 boards to work around a hardware issue. Reviewed-by: Cédric Le Goater Acked-by: Arnd Bergmann Signed-off-by: Joel Stanley commit 90bc72b13c08eedf73b7c0bd94ef23c467800c4a Merge: 2eea1fa82f68 da38802211cc Author: David S. Miller Date: Tue Nov 12 20:08:00 2019 -0800 Merge branch 'ARM-Enable-GENET-support-for-RPi-4' Stefan Wahren says: ==================== ARM: Enable GENET support for RPi 4 Raspberry Pi 4 uses the broadcom genet chip in version five. This chip has a dma controller integrated. Up to now the maximal burst size was hard-coded to 0x10. But it turns out that Raspberry Pi 4 does only work with the smaller maximal burst size of 0x8. Additionally the patch series has some IRQ retrieval improvements and adds support for a missing PHY mode. This series based on Matthias Brugger's V1 series [1]. [1] - https://patchwork.kernel.org/cover/11186193/ Changes in V5: - address Doug's comment Changes in V4: - rebased on current net-next - remove RGMII_ID support - remove fixes tag from patch 1 - add Florian's suggestions to patch 5 Changes in V3: - introduce SoC-specific compatibles for GENET (incl. dt-binding) - use platform_get_irq_optional for optional IRQ - remove Fixes tag from IRQ error handling change - move most of MDIO stuff to bcm2711.dtsi Changes in V2: - add 2 fixes for IRQ retrieval - add support for missing PHY modes - declare PHY mode RGMII RXID based on the default settings - add alias to allow firmware append the MAC address ==================== Signed-off-by: David S. Miller commit da38802211cc3fd294211a642932edb09e3af632 Author: Stefan Wahren Date: Mon Nov 11 20:49:25 2019 +0100 net: bcmgenet: Add RGMII_RXID support This adds the missing support for the PHY mode RGMII_RXID. It's necessary for the Raspberry Pi 4. Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 4f8d81b77e6624e222aefb7583da16ef8a656588 Author: Stefan Wahren Date: Mon Nov 11 20:49:24 2019 +0100 net: bcmgenet: Refactor register access in bcmgenet_mii_config The register access in bcmgenet_mii_config() is a little bit opaque and not easy to extend. In preparation for the missing RGMII PHY modes move all the phy name assignments into the switch statement and the register access to the end of the function. This make the code easier to read and extend. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller commit a50e3a9931c198313b404b897f3cd47d8fc0999b Author: Stefan Wahren Date: Mon Nov 11 20:49:23 2019 +0100 net: bcmgenet: Add BCM2711 support The BCM2711 needs a different maximum DMA burst length. If not set accordingly a timeout in the transmit queue happens and no package can be sent. So use the new compatible to derive this value. Until now the GENET HW version was used as the platform identifier. This doesn't work with SoC-specific modifications, so introduce a proper platform data structure. Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli Reviewed-by: Matthias Brugger Signed-off-by: David S. Miller commit f7bda51fac34da47bf8d5a24293e911c2df6e53b Author: Stefan Wahren Date: Mon Nov 11 20:49:22 2019 +0100 dt-bindings: net: bcmgenet: Add BCM2711 support The BCM2711 has some modifications to the GENET v5. So add this SoC specific compatible. Suggested-by: Florian Fainelli Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: David S. Miller commit 2b65f93687fb2481c4fe5a27aa30a09a46c6389a Author: Stefan Wahren Date: Mon Nov 11 20:49:21 2019 +0100 net: bcmgenet: Fix error handling on IRQ retrieval This fixes the error handling for the mandatory IRQs. There is no need for the error message anymore, this is now handled by platform_get_irq. Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 5b1f0e62941b8b307c589c586928a28718e934ef Author: Stefan Wahren Date: Mon Nov 11 20:49:20 2019 +0100 net: bcmgenet: Avoid touching non-existent interrupt As platform_get_irq() now prints an error when the interrupt does not exist, we are getting a confusing error message in case the optional WOL IRQ is not defined: bcmgenet fd58000.ethernet: IRQ index 2 not found Fix this by using the platform_get_irq_optional(). Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 2eea1fa82f681b484acb8e5a0d213b64a5c5574c Author: Vladimir Oltean Date: Tue Nov 12 23:22:00 2019 +0200 net: dsa: sja1105: Print the reset reason Sometimes it can be quite opaque even for me why the driver decided to reset the switch. So instead of adding dump_stack() calls each time for debugging, just add a reset reason to sja1105_static_config_reload calls which gets printed to the console. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d438945ae565e7959d11951c4227c224de7595e1 Merge: 129bd7ca8ac0 542575fe4b9a Author: David S. Miller Date: Tue Nov 12 19:52:15 2019 -0800 Merge branch 'Implement-get_link_ksettings-for-VXLAN-and-bridge' Matthias Schiffer says: ==================== Implement get_link_ksettings for VXLAN and bridge Mesh routing protocol batman-adv (in particular the new BATMAN_V algorithm) uses the link speed reported by get_link_ksettings to determine a path metric for wired links. In the mesh framework Gluon [1], we layer VXLAN and sometimes bridge interfaces on our Ethernet links. These patches implement get_link_ksettings for these two interface types. While this is obviously not accurate for bridges with multiple active ports, it's much better than having no estimate at all (and in the particular setup of Gluon, bridges with a single port aren't completely uncommon). [1] https://github.com/freifunk-gluon/gluon ==================== Signed-off-by: David S. Miller commit 542575fe4b9a7ad5f86da0346f147c3bae0c93cb Author: Matthias Schiffer Date: Tue Nov 12 22:12:25 2019 +0100 bridge: implement get_link_ksettings ethtool method We return the maximum speed of all active ports. This matches how the link speed would give an upper limit for traffic to/from any single peer if the bridge were replaced with a hardware switch. Signed-off-by: Matthias Schiffer Signed-off-by: David S. Miller commit 36fe3a61aaca2be4ef7484187e7484d19d54553e Author: Matthias Schiffer Date: Tue Nov 12 22:12:24 2019 +0100 vxlan: implement get_link_ksettings ethtool method Similar to VLAN and similar drivers, we can forward get_link_ksettings to the lower dev if we have one to get meaningful speed/duplex data. Signed-off-by: Matthias Schiffer Signed-off-by: David S. Miller commit 129bd7ca8ac0b517c85daa8174ae073db7187b06 Author: Florian Fainelli Date: Mon Nov 11 20:38:46 2019 -0800 net: dsa: Prevent usage of NET_DSA_TAG_8021Q as tagging protocol It is possible for a switch driver to use NET_DSA_TAG_8021Q as a valid DSA tagging protocol since it registers itself as such, unfortunately since there are not xmit or rcv functions provided, the lack of a xmit() function will lead to a NPD in dsa_slave_xmit() to start with. net/dsa/tag_8021q.c is only comprised of a set of helper functions at the moment, but is not a fully autonomous or functional tagging "driver" (though it could become later on). We do not have any users of NET_DSA_TAG_8021Q so now is a good time to make sure there are not issues being encountered by making this file strictly a place holder for helper functions. Reviewed-by: Vladimir Oltean Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 46cb01eeeb86fca6afe24dda1167b0cb95424e29 Author: Hoang Le Date: Tue Nov 12 07:40:04 2019 +0700 tipc: update mon's self addr when node addr generated In commit 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values"), the 32-bit node address only generated after one second trial period expired. However the self's addr in struct tipc_monitor do not update according to node address generated. This lead to it is always zero as initial value. As result, sorting algorithm using this value does not work as expected, neither neighbor monitoring framework. In this commit, we add a fix to update self's addr when 32-bit node address generated. Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values") Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 0320d1e7a3819dd81c9b2892f0ce6fd82b453bdf Merge: 4717b05328ba c29f74e0df7a Author: David S. Miller Date: Tue Nov 12 19:42:27 2019 -0800 Merge branch 'netfilter-flowtable-hardware-offload' Pablo Neira Ayuso says: ==================== netfilter flowtable hardware offload The following patchset adds hardware offload support for the flowtable infrastructure [1]. This infrastructure provides a fast datapath for the classic Linux forwarding path that users can enable through policy, eg. table inet x { flowtable f { hook ingress priority 10 devices = { eth0, eth1 } flags offload } chain y { type filter hook forward priority 0; policy accept; ip protocol tcp flow offload @f } } This example above enables the fastpath for TCP traffic between devices eth0 and eth1. Users can turn on the hardware offload through the 'offload' flag from the flowtable definition. If this new flag is not specified, the software flowtable datapath is used. This patchset is composed of 4 preparation patches: room to extend this infrastructure, eg. accelerate bridge forwarding. And 2 patches to add the hardware offload control and data planes: hardware offload. This includes a new NFTA_FLOWTABLE_FLAGS netlink attribute to convey the optional NF_FLOWTABLE_HW_OFFLOAD flag. API available at net/core/flow_offload.h to represent the flow through two flow_rule objects to configure an exact 5-tuple matching on each direction plus the corresponding forwarding actions, that is, the MAC address, NAT and checksum updates; and port redirection in order to configure the hardware datapath. This patch only supports for IPv4 support and statistics collection for flow aging as an initial step. This patchset introduces a new flow_block callback type that needs to be set up to configure the flowtable hardware offload. The first client of this infrastructure follows up after this batch. I would like to thank Mellanox for developing the first upstream driver to use this infrastructure. [1] Documentation/networking/nf_flowtable.txt ==================== Signed-off-by: David S. Miller commit c29f74e0df7a02b8303bcdce93a7c0132d62577a Author: Pablo Neira Ayuso Date: Tue Nov 12 00:29:56 2019 +0100 netfilter: nf_flow_table: hardware offload support This patch adds the dataplane hardware offload to the flowtable infrastructure. Three new flags represent the hardware state of this flow: * FLOW_OFFLOAD_HW: This flow entry resides in the hardware. * FLOW_OFFLOAD_HW_DYING: This flow entry has been scheduled to be remove from hardware. This might be triggered by either packet path (via TCP RST/FIN packet) or via aging. * FLOW_OFFLOAD_HW_DEAD: This flow entry has been already removed from the hardware, the software garbage collector can remove it from the software flowtable. This patch supports for: * IPv4 only. * Aging via FLOW_CLS_STATS, no packet and byte counter synchronization at this stage. This patch also adds the action callback that specifies how to convert the flow entry into the flow_rule object that is passed to the driver. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 8bb69f3b2918788435cbd5834c66682642c09fba Author: Pablo Neira Ayuso Date: Tue Nov 12 00:29:55 2019 +0100 netfilter: nf_tables: add flowtable offload control plane This patch adds the NFTA_FLOWTABLE_FLAGS attribute that allows users to specify the NF_FLOWTABLE_HW_OFFLOAD flag. This patch also adds a new setup interface for the flowtable type to perform the flowtable offload block callback configuration. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit f1363e058b84e61d39f9796fa806090ad7a28ebd Author: Pablo Neira Ayuso Date: Tue Nov 12 00:29:54 2019 +0100 netfilter: nf_flow_table: detach routing information from flow description This patch adds the infrastructure to support for flow entry types. The initial type is NF_FLOW_OFFLOAD_ROUTE that stores the routing information into the flow entry to define a fastpath for the classic forwarding path. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 62248df88a406a443b838a3633a7f60a716f999e Author: Pablo Neira Ayuso Date: Tue Nov 12 00:29:53 2019 +0100 netfilter: nf_flowtable: remove flow_offload_entry structure Move rcu_head to struct flow_offload, then remove the flow_offload_entry structure definition. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 9f48e9bf253aa292dbf10f173f6f4c02d0349f45 Author: Pablo Neira Ayuso Date: Tue Nov 12 00:29:52 2019 +0100 netfilter: nf_flow_table: remove union from flow_offload structure Drivers do not have access to the flow_offload structure, hence remove this union from this flow_offload object as well as the original comment on top of it. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit b32d2f341623765f525b1a559aa1758599ed7094 Author: Pablo Neira Ayuso Date: Tue Nov 12 00:29:51 2019 +0100 netfilter: nf_flow_table: move conntrack object to struct flow_offload Simplify this code by storing the pointer to conntrack object in the flow_offload structure. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 4717b05328ba75232befb72657a110e0f7354be4 Author: Roman Mashak Date: Mon Nov 11 15:55:30 2019 -0500 tc-testing: Introduced tdc tests for basic filter Added tests for 'cmp' extended match rules. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller commit ce9db46436960fa3fb30db0eb50c4e4dde8c9530 Merge: e0580b50d9d4 7d250a062f75 Author: David S. Miller Date: Tue Nov 12 19:29:57 2019 -0800 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: linux-bluetooth 2019-11-11 Here's one more bluetooth-next pull request for the 5.5 kernel release. - Several fixes for LE advertising - Added PM support to hci_qca driver - Added support for WCN3991 SoC in hci_qca driver - Added DT bindings for BCM43540 module - A few other small cleanups/fixes ==================== Signed-off-by: David S. Miller commit 35c3363363ac7c8877b4984cdd8a2af377a4e92e Author: Finn Thain Date: Sat Nov 2 12:06:54 2019 +1100 scsi: core: Clean up SG_NONE Remove SG_NONE and a related misleading comment. Update documentation. This patch does not affect behaviour as zero initialization is redundant. Cc: Jonathan Corbet Cc: Bartlomiej Zolnierkiewicz Cc: Jens Axboe Cc: Viresh Kumar Cc: Oliver Neukum Cc: Alan Stern Cc: Greg Kroah-Hartman Cc: usb-storage@lists.one-eyed-alien.net Link: https://lore.kernel.org/r/b4779b7a6563f6bd8d259ee457871c1c463c420e.1572656814.git.fthain@telegraphics.com.au Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 79172ab20bfd8437b277254028efdb68484e2c21 Author: Finn Thain Date: Sat Nov 2 12:06:54 2019 +1100 scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE Since the scsi subsystem adopted the blk-mq API, a host with zero sg_tablesize crashes with a NULL pointer dereference. blk_queue_max_segments: set to minimum 1 scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5 scsi target0:0:0: Beginning Domain Validation scsi target0:0:0: Domain Validation skipping write tests scsi target0:0:0: Ending Domain Validation blk_queue_max_segments: set to minimum 1 scsi 0:0:1:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5 scsi target0:0:1: Beginning Domain Validation scsi target0:0:1: Domain Validation skipping write tests scsi target0:0:1: Ending Domain Validation blk_queue_max_segments: set to minimum 1 scsi 0:0:2:0: CD-ROM QEMU QEMU CD-ROM 2.5+ PQ: 0 ANSI: 5 scsi target0:0:2: Beginning Domain Validation scsi target0:0:2: Domain Validation skipping write tests scsi target0:0:2: Ending Domain Validation blk_queue_max_segments: set to minimum 1 blk_queue_max_segments: set to minimum 1 blk_queue_max_segments: set to minimum 1 blk_queue_max_segments: set to minimum 1 sr 0:0:2:0: Power-on or device reset occurred sd 0:0:0:0: Power-on or device reset occurred sd 0:0:1:0: Power-on or device reset occurred sd 0:0:0:0: [sda] 10485762 512-byte logical blocks: (5.37 GB/5.00 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Unable to handle kernel NULL pointer dereference at virtual address (ptrval) Oops: 00000000 Modules linked in: PC: [<001cd874>] blk_mq_free_request+0x66/0xe2 SR: 2004 SP: (ptrval) a2: 00874520 d0: 00000000 d1: 00000000 d2: 009ba800 d3: 00000000 d4: 00000000 d5: 08000002 a0: 0087be68 a1: 009a81e0 Process kworker/u2:2 (pid: 15, task=(ptrval)) Frame format=7 eff addr=0000007a ssw=0505 faddr=0000007a wb 1 stat/addr/data: 0000 00000000 00000000 wb 2 stat/addr/data: 0000 00000000 00000000 wb 3 stat/addr/data: 0000 0000007a 00000000 push data: 00000000 00000000 00000000 00000000 Stack from 0087bd98: 00000002 00000000 0087be72 009a7820 0087bdb4 001c4f6c 009a7820 0087bdd4 0024d200 009a7820 0024d0dc 0087be72 009baa00 0087be68 009a5000 0087be7c 00265d10 009a5000 0087be72 00000003 00000000 00000000 00000000 0087be68 00000bb8 00000005 00000000 00000000 00000000 00000000 00265c56 00000000 009ba60c 0036ddf4 00000002 ffffffff 009baa00 009ba600 009a50d6 0087be74 00227ba0 009baa08 00000001 009baa08 009ba60c 0036ddf4 00000000 00000000 Call Trace: [<001c4f6c>] blk_put_request+0xe/0x14 [<0024d200>] __scsi_execute+0x124/0x174 [<0024d0dc>] __scsi_execute+0x0/0x174 [<00265d10>] sd_revalidate_disk+0xba/0x1f02 [<00265c56>] sd_revalidate_disk+0x0/0x1f02 [<0036ddf4>] strlen+0x0/0x22 [<00227ba0>] device_add+0x3da/0x604 [<0036ddf4>] strlen+0x0/0x22 [<00267e64>] sd_probe+0x30c/0x4b4 [<0002da44>] process_one_work+0x0/0x402 [<0022b978>] really_probe+0x226/0x354 [<0022bc34>] driver_probe_device+0xa4/0xf0 [<0002da44>] process_one_work+0x0/0x402 [<0022bcd0>] __driver_attach_async_helper+0x50/0x70 [<00035dae>] async_run_entry_fn+0x36/0x130 [<0002db88>] process_one_work+0x144/0x402 [<0002e1aa>] worker_thread+0x0/0x570 [<0002e29a>] worker_thread+0xf0/0x570 [<0002e1aa>] worker_thread+0x0/0x570 [<003768d8>] schedule+0x0/0xb8 [<0003f58c>] __init_waitqueue_head+0x0/0x12 [<00033e92>] kthread+0xc2/0xf6 [<000331e8>] kthread_parkme+0x0/0x4e [<003768d8>] schedule+0x0/0xb8 [<00033dd0>] kthread+0x0/0xf6 [<00002c10>] ret_from_kernel_thread+0xc/0x14 Code: 0280 0006 0800 56c0 4400 0280 0000 00ff <52b4> 0c3a 082b 0006 0013 6706 2042 53a8 00c4 4ab9 0047 3374 6640 202d 000c 670c Disabling lock debugging due to kernel taint Avoid this by setting sg_tablesize = 1. Link: https://lore.kernel.org/r/4567bcae94523b47d6f3b77450ba305823bca479.1572656814.git.fthain@telegraphics.com.au Reported-and-tested-by: Michael Schmitz Reviewed-by: Michael Schmitz References: commit 68ab2d76e4be ("scsi: cxlflash: Set sg_tablesize to 1 instead of SG_NONE") Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit d04adaa475082e7f86ccb20bcfdd2601d1d1cb7b Author: Johan Hovold Date: Tue Nov 5 09:56:09 2019 +0100 scsi: nsp_cs: enable compile-testing on 64-bit For some reason this driver depends on !64BIT, but it can still be useful to allow compile-testing on 64-bit machines. Link: https://lore.kernel.org/r/20191105085609.2338-3-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Martin K. Petersen commit 63cb70a1ee89d6d301466550f7306cd8d8892e66 Author: Johan Hovold Date: Tue Nov 5 09:56:08 2019 +0100 scsi: nsp_cs: drop redundant MODULE_LICENSE ifdef The MODULE_LICENSE macro is unconditionally defined in module.h, no need to ifdef its use. Link: https://lore.kernel.org/r/20191105085609.2338-2-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Martin K. Petersen commit 70e8d9accd0a9165972031ff51b4f28ee8287c0f Author: YueHaibing Date: Fri Nov 1 22:00:58 2019 +0800 scsi: ufs: ufshcd: Remove dev_err() on platform_get_irq() failure platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle. Link: https://lore.kernel.org/r/20191101140058.23212-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit 02f7e9f351a9de95577eafdc3bd413ed1c3b589f Author: Kars de Jong Date: Tue Nov 12 18:55:23 2019 +0100 scsi: zorro_esp: Limit DMA transfers to 65536 bytes (except on Fastlane) When using this driver on a Blizzard 1260, there were failures whenever DMA transfers from the SCSI bus to memory of 65535 bytes were followed by a DMA transfer of 1 byte. This caused the byte at offset 65535 to be overwritten with 0xff. The Blizzard hardware can't handle single byte DMA transfers. Besides this issue, limiting the DMA length to something that is not a multiple of the page size is very inefficient on most file systems. It seems this limit was chosen because the DMA transfer counter of the ESP by default is 16 bits wide, thus limiting the length to 65535 bytes. However, the value 0 means 65536 bytes, which is handled by the ESP and the Blizzard just fine. It is also the default maximum used by esp_scsi when drivers don't provide their own dma_length_limit() function. The limit of 65536 bytes can be used by all boards except the Fastlane. The old driver used a limit of 65532 bytes (0xfffc), which is reintroduced in this patch. Fixes: b7ded0e8b0d1 ("scsi: zorro_esp: Limit DMA transfers to 65535 bytes") Link: https://lore.kernel.org/r/20191112175523.23145-1-jongk@linux-m68k.org Signed-off-by: Kars de Jong Reviewed-by: Finn Thain Signed-off-by: Martin K. Petersen commit 63f565aa6e06d07bcf0cb7cfac82889c12c465a3 Author: YueHaibing Date: Tue Oct 29 06:15:30 2019 +0000 scsi: csiostor: Remove set but not used variable 'rln' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/csiostor/csio_lnode.c: In function 'csio_ln_init': drivers/scsi/csiostor/csio_lnode.c:1995:21: warning: variable 'rln' set but not used [-Wunused-but-set-variable] It is never used since introduction, so remove it. Link: https://lore.kernel.org/r/20191029061530.98197-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit cfcbae3895b86c390ede57b2a8f601dd5972b47b Author: Bean Huo Date: Tue Nov 12 23:34:36 2019 +0100 scsi: ufs: fix potential bug which ends in system hang In function __ufshcd_query_descriptor(), in the event of an error happening, we directly goto out_unlock and forget to invaliate hba->dev_cmd.query.descriptor pointer. This results in this pointer still valid in ufshcd_copy_query_response() for other query requests which go through ufshcd_exec_raw_upiu_cmd(). This will cause __memcpy() crash and system hangs. Log as shown below: Unable to handle kernel paging request at virtual address ffff000012233c40 Mem abort info: ESR = 0x96000047 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000047 CM = 0, WnR = 1 swapper pgtable: 4k pages, 48-bit VAs, pgdp = 0000000028cc735c [ffff000012233c40] pgd=00000000bffff003, pud=00000000bfffe003, pmd=00000000ba8b8003, pte=0000000000000000 Internal error: Oops: 96000047 [#2] PREEMPT SMP ... Call trace: __memcpy+0x74/0x180 ufshcd_issue_devman_upiu_cmd+0x250/0x3c0 ufshcd_exec_raw_upiu_cmd+0xfc/0x1a8 ufs_bsg_request+0x178/0x3b0 bsg_queue_rq+0xc0/0x118 blk_mq_dispatch_rq_list+0xb0/0x538 blk_mq_sched_dispatch_requests+0x18c/0x1d8 __blk_mq_run_hw_queue+0xb4/0x118 blk_mq_run_work_fn+0x28/0x38 process_one_work+0x1ec/0x470 worker_thread+0x48/0x458 kthread+0x130/0x138 ret_from_fork+0x10/0x1c Code: 540000ab a8c12027 a88120c7 a8c12027 (a88120c7) ---[ end trace 793e1eb5dff69f2d ]--- note: kworker/0:2H[2054] exited with preempt_count 1 This patch is to move "descriptor = NULL" down to below the label "out_unlock". Fixes: d44a5f98bb49b2(ufs: query descriptor API) Link: https://lore.kernel.org/r/20191112223436.27449-3-huobean@gmail.com Reviewed-by: Alim Akhtar Reviewed-by: Bart Van Assche Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 3d4881d1d6450b7b60da498e607610ac382bdb49 Author: Bean Huo Date: Tue Nov 12 23:34:35 2019 +0100 scsi: ufs: print helpful hint when response size exceed buffer size Print out returned response size and buffer size, while the front one is bigger than the back one. Link: https://lore.kernel.org/r/20191112223436.27449-2-huobean@gmail.com Reviewed-by: Alim Akhtar Reviewed-by: Bart Van Assche Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 964231aa0c7ef53ebc9c2a6889bbc50d8a3f2220 Author: John Garry Date: Tue Nov 12 17:30:59 2019 +0800 scsi: hisi_sas: Stop converting a bool into a bool The !! operator on a bool is pointless, so remove an example in hisi_sas_rescan_topology(). Link: https://lore.kernel.org/r/1573551059-107873-5-git-send-email-john.garry@huawei.com Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 7c0ecd40c31246a2d0de81879966436ff07505a4 Author: Xiang Chen Date: Tue Nov 12 17:30:58 2019 +0800 scsi: hisi_sas: Relocate call to hisi_sas_debugfs_exit() Currently we call function hisi_sas_debugfs_exit() to remove debugfs_dir before freeing interrupt irqs and destroying workqueue in the driver remove path. If a dump is triggered before function hisi_sas_debugfs_exit() but debugfs_work may be called after it, so it may refer to already removed debugfs_dir which will cause NULL pointer dereference. To avoid it, put function hisi_sas_debugfs_exit() after free_irqs and destroy workqueue when removing hisi_sas driver. Link: https://lore.kernel.org/r/1573551059-107873-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 547fde8b5a1923050f388caae4f76613b5a620e0 Author: Xiang Chen Date: Tue Nov 12 17:30:57 2019 +0800 scsi: hisi_sas: Return directly if init hardware failed Need to return directly if init hardware failed. Fixes: 73a4925d154c ("scsi: hisi_sas: Update all the registers after suspend and resume") Link: https://lore.kernel.org/r/1573551059-107873-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 8c39673d5474b95374df2104dc1f65205c5278b8 Author: Xiang Chen Date: Tue Nov 12 17:30:56 2019 +0800 scsi: hisi_sas: Check sas_port before using it Need to check the structure sas_port before using it. Link: https://lore.kernel.org/r/1573551059-107873-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 3b294c0fb910dc91250abab574e85c9c1957c795 Author: James Smart Date: Mon Nov 11 15:04:01 2019 -0800 scsi: lpfc: Update lpfc version to 12.6.0.2 Update lpfc version to 12.6.0.2 Link: https://lore.kernel.org/r/20191111230401.12958-7-jsmart2021@gmail.com Reviewed-by: Ewan D. Milne Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 542ddc9b346984cb5bbc2a923d3f3f27ae961ffa Author: James Smart Date: Mon Nov 11 15:04:00 2019 -0800 scsi: lpfc: revise nvme max queues to be hdwq count Driver is setting the initiator nvme template with a max hw queues value of the present cpu count which is odd. It should be registering the number of hdwq queues (queues created on the adapter). Change to set nvme tempate, in all cases, to the number of hardware queues. Link: https://lore.kernel.org/r/20191111230401.12958-6-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit bc227dde0d8b687aa525d01b0df5556d4d37eca3 Author: James Smart Date: Mon Nov 11 15:03:59 2019 -0800 scsi: lpfc: Initialize cpu_map for not present cpus Currently, cpu_map[cpu#]->hdwq is left to equal LPFC_VECTOR_MAP_EMPTY for not present CPUs. If a CPU is dynamically hot-added, it is possible we may crash due to not assigning an allocated hdwq. Correct by assigning a hdwq at initialization for all not-present CPUs. Fixes: dcaa21367938 ("scsi: lpfc: Change default IRQ model on AMD architectures") Link: https://lore.kernel.org/r/20191111230401.12958-5-jsmart2021@gmail.com Reviewed-by: Ewan D. Milne Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit d480e57809a043333a3b9e755c0bdd43e10a9f12 Author: James Smart Date: Mon Nov 11 15:03:58 2019 -0800 scsi: lpfc: fix inlining of lpfc_sli4_cleanup_poll_list() Compilation can fail due to having an inline function reference where the function body is not present. Fix by removing the inline tag. Fixes: 93a4d6f40198 ("scsi: lpfc: Add registration for CPU Offline/Online events") Link: https://lore.kernel.org/r/20191111230401.12958-4-jsmart2021@gmail.com Reviewed-by: Ewan D. Milne Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 6c6d59e0fe5b86cf273d6d744a6a9768c4ecc756 Author: James Smart Date: Mon Nov 11 15:03:57 2019 -0800 scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences Coverity reported the following: *** CID 101747: Null pointer dereferences (FORWARD_NULL) /drivers/scsi/lpfc/lpfc_els.c: 4439 in lpfc_cmpl_els_rsp() 4433 kfree(mp); 4434 } 4435 mempool_free(mbox, phba->mbox_mem_pool); 4436 } 4437 out: 4438 if (ndlp && NLP_CHK_NODE_ACT(ndlp)) { vvv CID 101747: Null pointer dereferences (FORWARD_NULL) vvv Dereferencing null pointer "shost". 4439 spin_lock_irq(shost->host_lock); 4440 ndlp->nlp_flag &= ~(NLP_ACC_REGLOGIN | NLP_RM_DFLT_RPI); 4441 spin_unlock_irq(shost->host_lock); 4442 4443 /* If the node is not being used by another discovery thread, 4444 * and we are sending a reject, we are done with it. Fix by adding a check for non-null shost in line 4438. The scenario when shost is set to null is when ndlp is null. As such, the ndlp check present was sufficient. But better safe than sorry so add the shost check. Reported-by: coverity-bot Addresses-Coverity-ID: 101747 ("Null pointer dereferences") Fixes: 2e0fef85e098 ("[SCSI] lpfc: NPIV: split ports") CC: James Bottomley CC: "Gustavo A. R. Silva" CC: linux-next@vger.kernel.org Link: https://lore.kernel.org/r/20191111230401.12958-3-jsmart2021@gmail.com Reviewed-by: Ewan D. Milne Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 6f23f8c5c9f1be4eb17c035129c80e49000c18a7 Author: James Smart Date: Mon Nov 11 15:03:56 2019 -0800 scsi: lpfc: fix: Coverity: lpfc_get_scsi_buf_s3(): Null pointer dereferences Coverity reported the following: *** CID 1487391: Null pointer dereferences (FORWARD_NULL) /drivers/scsi/lpfc/lpfc_scsi.c: 614 in lpfc_get_scsi_buf_s3() 608 spin_unlock(&phba->scsi_buf_list_put_lock); 609 } 610 spin_unlock_irqrestore(&phba->scsi_buf_list_get_lock, iflag); 611 612 if (lpfc_ndlp_check_qdepth(phba, ndlp)) { 613 atomic_inc(&ndlp->cmd_pending); vvv CID 1487391: Null pointer dereferences (FORWARD_NULL) vvv Dereferencing null pointer "lpfc_cmd". 614 lpfc_cmd->flags |= LPFC_SBUF_BUMP_QDEPTH; 615 } 616 return lpfc_cmd; 617 } 618 /** 619 * lpfc_get_scsi_buf_s4 - Get a scsi buffer from io_buf_list of the HBA Fix by checking lpfc_cmd to be non-NULL as part of line 612 Reported-by: coverity-bot Addresses-Coverity-ID: 1487391 ("Null pointer dereferences") Fixes: 2a5b7d626ed2 ("scsi: lpfc: Limit tracking of tgt queue depth in fast path") CC: "Martin K. Petersen" CC: "Gustavo A. R. Silva" CC: linux-next@vger.kernel.org Link: https://lore.kernel.org/r/20191111230401.12958-2-jsmart2021@gmail.com Reviewed-by: Ewan D. Milne Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 6979e56cec9782db0d7b5700058c0d60dc31b7cc Author: Vignesh Raghavendra Date: Fri Nov 8 22:18:57 2019 +0530 scsi: ufs: Add driver for TI wrapper for Cadence UFS IP TI's J721e SoC has a Cadence UFS IP with a TI specific wrapper. This is a minimal driver to configure the wrapper. It releases the UFS slave device out of reset and sets up registers to indicate PHY reference clock input frequency before probing child Cadence UFS driver. Link: https://lore.kernel.org/r/20191108164857.11466-3-vigneshr@ti.com Reviewed-by: Avri Altman Reviewed-by: Alim Akhtar Signed-off-by: Vignesh Raghavendra Signed-off-by: Martin K. Petersen commit 8e31a94938adffb208f714a33ba651491b53a5d0 Author: Vignesh Raghavendra Date: Fri Nov 8 22:18:56 2019 +0530 scsi: dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper Add binding documentation of TI wrapper for Cadence UFS Controller. Link: https://lore.kernel.org/r/20191108164857.11466-2-vigneshr@ti.com Reviewed-by: Rob Herring Signed-off-by: Vignesh Raghavendra Signed-off-by: Martin K. Petersen commit 3afd6389f3206fd45afe6101a1589258577dacbd Author: Marian Mihailescu Date: Thu Nov 7 09:25:26 2019 +1030 dt-bindings: gpu: mali-midgard: add samsung exynos 5420 compatible Add "samsung,exynos5420-mali" binding Signed-off-by: Marian Mihailescu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 0211b71c52da62fea7c2ade1c36cb74651b80d5f Author: Andreas Färber Date: Mon Nov 4 02:39:32 2019 +0100 dt-bindings: gpu: mali-bifrost: Add Realtek RTD1619 Define a compatible string for Realtek RTD1619 SoC family. Signed-off-by: Andreas Färber Signed-off-by: Rob Herring commit d41003513e61dd9d4974cb441d30b63650b85654 Author: Christoph Hellwig Date: Mon Nov 11 11:39:30 2019 +0900 block: rework zone reporting Avoid the need to allocate a potentially large array of struct blk_zone in the block layer by switching the ->report_zones method interface to a callback model. Now the caller simply supplies a callback that is executed on each reported zone, and private data for it. Signed-off-by: Christoph Hellwig Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Mike Snitzer Signed-off-by: Jens Axboe commit 23a50861adda26a3f3b3ec5fbca0583133d89538 Author: Damien Le Moal Date: Mon Nov 11 11:39:29 2019 +0900 scsi: sd_zbc: Cleanup sd_zbc_alloc_report_buffer() There is no need to arbitrarily limit the size of a report zone to the number of zones defined by SD_ZBC_REPORT_MAX_ZONES. Rather, simply calculate the report buffer size needed for the requested number of zones without exceeding the device total number of zones. This buffer size limitation to the hardware maximum transfer size and page mapping capabilities is kept unchanged. Starting with this initial buffer size, the allocation is optimized by iterating over decreasing buffer size until the allocation succeeds (each iteration is allowed to fail fast using the __GFP_NORETRY flag). This ensures forward progress for zone reports and avoids failures of zones revalidation under memory pressure. While at it, also replace the hard coded 512 B sector size with the SECTOR_SIZE macro. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Martin K. Petersen Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 6d09c4086ed9fc72afb3be4b47ecfa34f57f15f9 Author: Damien Le Moal Date: Mon Nov 11 11:39:28 2019 +0900 null_blk: Add zone_nr_conv to features For a null_blk device with zoned mode enabled, the number of conventional zones can be configured through configfs with the zone_nr_conv parameter. Add this missing parameter in the features string. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe commit 7fc8fb51a143a7efc9b199179e43a6d28f69b1f9 Author: Christoph Hellwig Date: Mon Nov 11 11:39:27 2019 +0900 null_blk: clean up report zones Make the instance name match the method name and define the name to NULL instead of providing an inline stub, which is rather pointless for a method call. Signed-off-by: Christoph Hellwig Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe commit e3f89564c557ab756fd147cfe68648b935bc5b42 Author: Christoph Hellwig Date: Mon Nov 11 11:39:26 2019 +0900 null_blk: clean up the block device operations Remove the pointless stub open and release methods, give the operations vector a slightly less confusing name, and use normal alignment for the assignment operators. Signed-off-by: Christoph Hellwig Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe commit 5eac3eb30c9ab9ee7fe2bd9aa9db6373cabb77f8 Author: Damien Le Moal Date: Mon Nov 11 11:39:25 2019 +0900 block: Remove partition support for zoned block devices No known partitioning tool supports zoned block devices, especially the host managed flavor with strong sequential write constraints. Furthermore, there are also no known user nor use cases for partitioned zoned block devices. This patch removes partition device creation for zoned block devices, which allows simplifying the processing of zone commands for zoned block devices. A warning is added if a partition table is found on the device. For report zones operations no zone sector information remapping is necessary anymore, simplifying the code. Of note is that remapping of zone reports for DM targets is still necessary as done by dm_remap_zone_report(). Similarly, remaping of a zone reset bio is not necessary anymore. Testing for the applicability of the zone reset all request also becomes simpler and only needs to check that the number of sectors of the requested zone range is equal to the disk capacity. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit ceeb373aa6b9eb75ed3278d4b3ff2318c304e70c Author: Damien Le Moal Date: Mon Nov 11 11:39:24 2019 +0900 block: Simplify report zones execution All kernel users of blkdev_report_zones() as well as applications use through ioctl(BLKZONEREPORT) expect to potentially get less zone descriptors than requested. As such, the use of the internal report zones command execution loop implemented by blk_report_zones() is not necessary and can even be harmful to performance by causing the execution of inefficient small zones report command to service the reminder of a requested zone array. This patch removes blk_report_zones(), simplifying the code. Also remove a now incorrect comment in dm_blk_report_zones(). Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Javier Gonzalez Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit c98c3d09fca41323765af0dc7926b150cf29ebff Author: Christoph Hellwig Date: Mon Nov 11 11:39:23 2019 +0900 block: cleanup the !zoned case in blk_revalidate_disk_zones blk_revalidate_disk_zones is never called for non-zoned devices. Just return early and warn instead of trying to handle this case. Signed-off-by: Christoph Hellwig Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe commit d9dd73087a8b6d78d3bf8411620306f2313cdbae Author: Damien Le Moal Date: Mon Nov 11 11:39:22 2019 +0900 block: Enhance blk_revalidate_disk_zones() For ZBC and ZAC zoned devices, the scsi driver revalidation processing implemented by sd_revalidate_disk() includes a call to sd_zbc_read_zones() which executes a full disk zone report used to check that all zones of the disk are the same size. This processing is followed by a call to blk_revalidate_disk_zones(), used to initialize the device request queue zone bitmaps (zone type and zone write lock bitmaps). To do so, blk_revalidate_disk_zones() also executes a full device zone report to obtain zone types. As a result, the entire zoned block device revalidation process includes two full device zone report. By moving the zone size checks into blk_revalidate_disk_zones(), this process can be optimized to a single full device zone report, leading to shorter device scan and revalidation times. This patch implements this optimization, reducing the original full device zone report implemented in sd_zbc_check_zones() to a single, small, report zones command execution to obtain the size of the first zone of the device. Checks whether all zones of the device are the same size as the first zone size are moved to the generic blk_check_zone() function called from blk_revalidate_disk_zones(). This optimization also has the following benefits: 1) fewer memory allocations in the scsi layer during disk revalidation as the potentailly large buffer for zone report execution is not needed. 2) Implement zone checks in a generic manner, reducing the burden on device driver which only need to obtain the zone size and check that this size is a power of 2 number of LBAs. Any new type of zoned block device will benefit from this. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 0788c4eda006148f9c3c2ed30e6f746bd538f11f Merge: d29510d35242 ad512f2023b3 Author: Jens Axboe Date: Tue Nov 12 19:11:33 2019 -0700 Merge branch 'for-5.5/drivers-post' into for-5.5/zoned * for-5.5/drivers-post: scsi: sd_zbc: add zone open, close, and finish support scsi: core: Handle drivers which set sg_tablesize to zero scsi: qla2xxx: fix NPIV tear down process scsi: sd_zbc: Fix sd_zbc_complete() scsi: qla2xxx: stop timer in shutdown path scsi: sd: define variable dif as unsigned int instead of bool scsi: target: cxgbit: Fix cxgbit_fw4_ack() scsi: qla2xxx: Fix partial flash write of MBI scsi: qla2xxx: Initialized mailbox to prevent driver load failure scsi: lpfc: Honor module parameter lpfc_use_adisc scsi: ufs-bsg: Wake the device before sending raw upiu commands scsi: lpfc: Check queue pointer before use scsi: qla2xxx: fixup incorrect usage of host_byte commit d29510d3524200f4591d1aac58b4b8fa375bd20a Merge: 6952a7f8446e da644b2cc1a4 Author: Jens Axboe Date: Tue Nov 12 19:11:30 2019 -0700 Merge branch 'for-5.5/drivers' into for-5.5/zoned * for-5.5/drivers: (38 commits) null_blk: add zone open, close, and finish support dm: add zone open, close and finish support nvme: Fix parsing of ANA log page nvmet: stop using bio_set_op_attrs nvmet: add plugging for read/write when ns is bdev nvmet: clean up command parsing a bit nvme-pci: Spelling s/resdicovered/rediscovered/ nvmet: fill discovery controller sn, fr and mn correctly nvmet: Open code nvmet_req_execute() nvmet: Remove the data_len field from the nvmet_req struct nvmet: Introduce nvmet_dsm_len() helper nvmet: Cleanup discovery execute handlers nvmet: Introduce common execute function for get_log_page and identify nvmet-tcp: Don't set the request's data_len nvmet-tcp: Don't check data_len in nvmet_tcp_map_data() nvme: Introduce nvme_lba_to_sect() nvme: Cleanup and rename nvme_block_nr() nvme: resync include/linux/nvme.h with nvmecli nvme: move common call to nvme_cleanup_cmd to core layer nvme: introduce "Command Aborted By host" status code ... commit f9e0370648b9f9908ec97f44459a1152aecbbf45 Author: Darrick J. Wong Date: Mon Nov 11 12:52:18 2019 -0800 xfs: kill the XFS_WANT_CORRUPT_* macros The XFS_WANT_CORRUPT_* macros conceal subtle side effects such as the creation of local variables and redirections of the code flow. This is pretty ugly, so replace them with explicit XFS_IS_CORRUPT tests that remove both of those ugly points. The change was performed with the following coccinelle script: @@ expression mp, test; identifier label; @@ - XFS_WANT_CORRUPTED_GOTO(mp, test, label); + if (XFS_IS_CORRUPT(mp, !test)) { error = -EFSCORRUPTED; goto label; } @@ expression mp, test; @@ - XFS_WANT_CORRUPTED_RETURN(mp, test); + if (XFS_IS_CORRUPT(mp, !test)) return -EFSCORRUPTED; @@ expression mp, lval, rval; @@ - XFS_IS_CORRUPT(mp, !(lval == rval)) + XFS_IS_CORRUPT(mp, lval != rval) @@ expression mp, e1, e2; @@ - XFS_IS_CORRUPT(mp, !(e1 && e2)) + XFS_IS_CORRUPT(mp, !e1 || !e2) @@ expression e1, e2; @@ - !(e1 == e2) + e1 != e2 @@ expression e1, e2, e3, e4, e5, e6; @@ - !(e1 == e2 && e3 == e4) || e5 != e6 + e1 != e2 || e3 != e4 || e5 != e6 @@ expression e1, e2, e3, e4, e5, e6; @@ - !(e1 == e2 || (e3 <= e4 && e5 <= e6)) + e1 != e2 && (e3 > e4 || e5 > e6) @@ expression mp, e1, e2; @@ - XFS_IS_CORRUPT(mp, !(e1 <= e2)) + XFS_IS_CORRUPT(mp, e1 > e2) @@ expression mp, e1, e2; @@ - XFS_IS_CORRUPT(mp, !(e1 < e2)) + XFS_IS_CORRUPT(mp, e1 >= e2) @@ expression mp, e1; @@ - XFS_IS_CORRUPT(mp, !!e1) + XFS_IS_CORRUPT(mp, e1) @@ expression mp, e1, e2; @@ - XFS_IS_CORRUPT(mp, !(e1 || e2)) + XFS_IS_CORRUPT(mp, !e1 && !e2) @@ expression mp, e1, e2, e3, e4; @@ - XFS_IS_CORRUPT(mp, !(e1 == e2) && !(e3 == e4)) + XFS_IS_CORRUPT(mp, e1 != e2 && e3 != e4) @@ expression mp, e1, e2, e3, e4; @@ - XFS_IS_CORRUPT(mp, !(e1 <= e2) || !(e3 >= e4)) + XFS_IS_CORRUPT(mp, e1 > e2 || e3 < e4) @@ expression mp, e1, e2, e3, e4; @@ - XFS_IS_CORRUPT(mp, !(e1 == e2) && !(e3 <= e4)) + XFS_IS_CORRUPT(mp, e1 != e2 && e3 > e4) Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 1ec28615d2489882e7d47da4214c7ea1f5728fc7 Author: Darrick J. Wong Date: Mon Nov 11 12:52:01 2019 -0800 xfs: add a XFS_IS_CORRUPT macro Add a new macro, XFS_IS_CORRUPT, which we will use to integrate some corruption reporting when the corruption test expression is true. This will be used in the next patch to remove the ugly XFS_WANT_CORRUPT* macros. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e26e7b88f6b7482cbff633c6fc9eaee3ecbd41b1 Author: Leon Romanovsky Date: Tue Oct 29 08:27:45 2019 +0200 RDMA: Change MAD processing function to remove extra casting and parameter All users of process_mad() converts input pointers from ib_mad_hdr to be ib_mad, update the function declaration to use ib_mad directly. Also remove not used input MAD size parameter. Link: https://lore.kernel.org/r/20191029062745.7932-17-leon@kernel.org Signed-off-by: Leon Romanovsky Tested-By: Mike Marciniszyn Signed-off-by: Jason Gunthorpe commit 333ee7e2d0b6590cde2bea3e17f30262e0dc0706 Author: Leon Romanovsky Date: Tue Oct 29 08:27:36 2019 +0200 RDMA/hfi1: Delete unreachable code All callers allocate MAD structures with proper sizes, there is no need to recheck it. Link: https://lore.kernel.org/r/20191029062745.7932-8-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 56f434f40f059eb3769d50b9c244a850096c3d6f Author: Jason Gunthorpe Date: Tue Nov 12 16:22:18 2019 -0400 mm/mmu_notifier: define the header pre-processor parts even if disabled Now that we have KERNEL_HEADER_TEST all headers are generally compile tested, so relying on makefile tricks to avoid compiling code that depends on CONFIG_MMU_NOTIFIER is more annoying. Instead follow the usual pattern and provide most of the header with only the functions stubbed out when CONFIG_MMU_NOTIFIER is disabled. This ensures code compiles no matter what the config setting is. While here, struct mmu_notifier_mm is private to mmu_notifier.c, move it. Link: https://lore.kernel.org/r/20191112202231.3856-2-jgg@ziepe.ca Reviewed-by: Jérôme Glisse Tested-by: Ralph Campbell Reviewed-by: John Hubbard Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit cc12ba1872c6bf05b5f177fae5082bcbea335f2b Author: Sven Van Asbroeck Date: Tue Nov 12 15:44:10 2019 -0800 Input: ili210x - optionally show calibrate sysfs attribute Only show the 'calibrate' sysfs attribute on chip flavours which support calibration by writing to a calibration register. Do this by adding a flag to the chip operations structure. Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20191112210148.3535-2-TheSven73@gmail.com Signed-off-by: Dmitry Torokhov commit b32fbeaec52d387004dd7fa15877b8adf7b396c3 Author: Sven Van Asbroeck Date: Tue Nov 12 15:40:48 2019 -0800 Input: ili210x - add resolution to chip operations structure Optionally allow the touch screen resolution to be set by adding it to the chip operations structure. If it is omitted (left zero), the resolution defaults to 64K. Which is the previously hard-coded value. Set the ili2117 resolution to 2048, as indicated in its datasheet. Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20191112210148.3535-1-TheSven73@gmail.com Signed-off-by: Dmitry Torokhov commit c7dded5b2980de9811f47a1a576e0596a5a775ce Author: Sven Van Asbroeck Date: Tue Nov 12 15:40:03 2019 -0800 Input: ili210x - do not retrieve/print chip firmware version The driver's method to retrieve the firmware version on ili2117/ ili2118 chip flavours is incorrect. The firmware version register address and layout are wrong. The firmware version is not actually used anywhere inside or outside this driver. There is a dev_dbg() print, but that is only visible when the developer explicitly compiles in debug support. Don't make the code more complicated to preserve a feature that no-one is using. Remove all code associated with chip firmware version. Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20191112164429.11225-1-TheSven73@gmail.com Signed-off-by: Dmitry Torokhov commit 6366e523eb56b4b7191fd4261941a2762b6957bd Author: Valdis Kletnieks Date: Tue Nov 12 17:36:08 2019 -0500 staging: exfat: Update the TODO file Updating with the current laundry list of things that need attention. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112223609.163501-1-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 87d0f2a5536fdf5053a6d341880f96135549a644 Author: Mika Westerberg Date: Tue Oct 29 20:00:22 2019 +0300 PCI: pciehp: Prevent deadlock on disconnect This addresses deadlocks in these common cases in hierarchies containing two switches: - All involved ports are runtime suspended and they are unplugged. This can happen easily if the drivers involved automatically enable runtime PM (xHCI for example does that). - System is suspended (e.g., closing the lid on a laptop) with a dock + something else connected, and the dock is unplugged while suspended. These cases lead to the following deadlock: INFO: task irq/126-pciehp:198 blocked for more than 120 seconds. irq/126-pciehp D 0 198 2 0x80000000 Call Trace: schedule+0x2c/0x80 schedule_timeout+0x246/0x350 wait_for_completion+0xb7/0x140 kthread_stop+0x49/0x110 free_irq+0x32/0x70 pcie_shutdown_notification+0x2f/0x50 pciehp_remove+0x27/0x50 pcie_port_remove_service+0x36/0x50 device_release_driver+0x12/0x20 bus_remove_device+0xec/0x160 device_del+0x13b/0x350 device_unregister+0x1a/0x60 remove_iter+0x1e/0x30 device_for_each_child+0x56/0x90 pcie_port_device_remove+0x22/0x40 pcie_portdrv_remove+0x20/0x60 pci_device_remove+0x3e/0xc0 device_release_driver_internal+0x18c/0x250 device_release_driver+0x12/0x20 pci_stop_bus_device+0x6f/0x90 pci_stop_bus_device+0x31/0x90 pci_stop_and_remove_bus_device+0x12/0x20 pciehp_unconfigure_device+0x88/0x140 pciehp_disable_slot+0x6a/0x110 pciehp_handle_presence_or_link_change+0x263/0x400 pciehp_ist+0x1c9/0x1d0 irq_thread_fn+0x24/0x60 irq_thread+0xeb/0x190 kthread+0x120/0x140 INFO: task irq/190-pciehp:2288 blocked for more than 120 seconds. irq/190-pciehp D 0 2288 2 0x80000000 Call Trace: __schedule+0x2a2/0x880 schedule+0x2c/0x80 schedule_preempt_disabled+0xe/0x10 mutex_lock+0x2c/0x30 pci_lock_rescan_remove+0x15/0x20 pciehp_unconfigure_device+0x4d/0x140 pciehp_disable_slot+0x6a/0x110 pciehp_handle_presence_or_link_change+0x263/0x400 pciehp_ist+0x1c9/0x1d0 irq_thread_fn+0x24/0x60 irq_thread+0xeb/0x190 kthread+0x120/0x140 What happens here is that the whole hierarchy is runtime resumed and the parent PCIe downstream port, which got the hot-remove event, starts removing devices below it, taking pci_lock_rescan_remove() lock. When the child PCIe port is runtime resumed it calls pciehp_check_presence() which ends up calling pciehp_card_present() and pciehp_check_link_active(). Both of these use pcie_capability_read_word(), which notices that the underlying device is already gone and returns PCIBIOS_DEVICE_NOT_FOUND with the capability value set to 0. When pciehp gets this value it thinks that its child device is also hot-removed and schedules its IRQ thread to handle the event. The deadlock happens when the child's IRQ thread runs and tries to acquire pci_lock_rescan_remove() which is already taken by the parent and the parent waits for the child's IRQ thread to finish. Prevent this from happening by checking the return value of pcie_capability_read_word() and if it is PCIBIOS_DEVICE_NOT_FOUND stop performing any hot-removal activities. [bhelgaas: add common scenarios to commit log] Link: https://lore.kernel.org/r/20191029170022.57528-2-mika.westerberg@linux.intel.com Tested-by: Kai-Heng Feng Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas commit 65b88d81f5c9603ddfc86fc86c28f282408ffe8e Author: Valdis Kletnieks Date: Tue Nov 12 16:12:38 2019 -0500 staging: exfat: Clean up the namespace pollution part 8 Rename all the FAT_* functions to exfat_fat_*. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-13-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 99a4b135289ed3e633a2f6bba1750513d9e4f731 Author: Valdis Kletnieks Date: Tue Nov 12 16:12:37 2019 -0500 staging: exfat: Clean up the namespace pollution part 7 Global functions called 'buf*' are a linkage editor disaster waiting to happen. Rename our buf_* functions to exfat_buf_* Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-12-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit e5a490e03756ab07adbb736c9ecd3c34b40e0da4 Author: Valdis Kletnieks Date: Tue Nov 12 16:12:36 2019 -0500 staging: exfat: Clean up the namespace pollution part 6 Move a few more things so we can make them static and clear exfat.h out. At this point, pretty much everything that can be static is static. (Note: FAT_sync(), buf_sync(), and sync_alloc_bitmap() aren't called anyplace, but aren't static because (a) that will toss an error and (b) they probably *should* be getting called someplace Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-11-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit a78b34b89bcbb919b912fc8c0e1e964189972d87 Author: Valdis Kletnieks Date: Tue Nov 12 16:12:35 2019 -0500 staging: exfat: Clean up the namespace pollution part 5 Some more functions that can be moved and made static Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-10-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 9435fa8d0601b22d30a6e0d0d78a28aca5e1a7b7 Author: Valdis Kletnieks Date: Tue Nov 12 16:12:34 2019 -0500 staging: exfat: Clean up the namespace pollution part 4 Relocating these functions to before first use lets us make them static Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-9-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 388cd66808d52cd761c2885defd22f7f52ce4c52 Author: Valdis Kletnieks Date: Tue Nov 12 16:12:33 2019 -0500 staging: exfat: Clean up the namespace pollution part 3 These functions are only used in the local file, make them static Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-8-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit ed5916c1e8db99eeab6cbbf7cba150a5cee90c0f Author: Valdis Kletnieks Date: Tue Nov 12 16:12:32 2019 -0500 staging: exfat: Clean up the namespace pollution part 2 Rename all the bdev_* to exfat_bdev_* Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-7-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 19e2bfe6ed135ed45d6adb6860181cad49dbb90e Author: Valdis Kletnieks Date: Tue Nov 12 16:12:31 2019 -0500 staging: exfat: Clean up the namespace pollution part 1 Everything referenced in the struct fs_func exfat_fs_func is located in that same .c file. Make them static and remove from exfat.h Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-6-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 35a829c1b797d1a927bf54b6a958e154eb248026 Author: Valdis Kletnieks Date: Tue Nov 12 16:12:30 2019 -0500 staging: exfat: Remove FAT/VFAT mount support, part 4 The code simplification from the previous patch rendered a few more routines unreferenced, so heave them over the side as well. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-5-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 2a17b09fdecd580c88a5b80fd7ccd33bee576e4d Author: Valdis Kletnieks Date: Tue Nov 12 16:12:29 2019 -0500 staging: exfat: Remove FAT/VFAT mount support, part 3 In this patch, we straighten out most of the cases where the code was testing 'p_fs->vol_type == EXFAT' and '!= EXFAT' There's still some ?: ops and a few places where the code is doing checks for '.' and '..' that require looking at, but those are future patches Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-4-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 7c6d78eb7c9c55952e354fe9fd212d45d9af0807 Author: Valdis Kletnieks Date: Tue Nov 12 16:12:28 2019 -0500 staging: exfat: Remove FAT/VFAT mount support, part 2 Remove no longer referenced FAT/VFAT routines. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-3-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 04a991cd9066dd182602a82e234bf91b1ea423d7 Author: Valdis Kletnieks Date: Tue Nov 12 16:12:27 2019 -0500 staging: exfat: Remove FAT/VFAT mount support, part 1 Remove the top-level mount functionality, to make this driver handle only exfat file systems. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112211238.156490-2-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit ecbc9e989f62e59cdd3e87b1e7babacc765041ba Author: Valdis Kletnieks Date: Mon Nov 11 21:09:57 2019 -0500 staging: exfat: Correct return code Use -ENOTEMPTY rather than -EEXIST for attempting to remove a directory that still has files in it. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-10-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit ad03f80f7b7229f39623f6a11fe8cb07cab1c05e Author: Valdis Kletnieks Date: Mon Nov 11 21:09:56 2019 -0500 staging: exfat: Collapse redundant return code translations Now that we no longer use odd internal return codes, we can heave the translation code over the side, and just pass the error code back up the call chain. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-9-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 4b18672132332d3ec429ea9370d0b380dae730cd Author: Valdis Kletnieks Date: Mon Nov 11 21:09:55 2019 -0500 staging: exfat: Clean up return codes - FFS_SUCCESS Convert FFS_SUCCESS to 0. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-8-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 97eab6cee3a6ac679a2f531a248df3c994182522 Author: Valdis Kletnieks Date: Mon Nov 11 21:09:54 2019 -0500 staging: exfat: Clean up return codes - remove unused codes There are 6 FFS_* error values not used at all. Remove them. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-7-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 0a7ef8d9483b96bea89c8b99b7b509697d48701d Author: Valdis Kletnieks Date: Mon Nov 11 21:09:53 2019 -0500 staging: exfat: Clean up return codes - FFS_ERROR Convert FFS_ERROR to -EINVAL Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-6-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 7785913b079fafd461a668034c76d604fe513770 Author: Valdis Kletnieks Date: Mon Nov 11 21:09:52 2019 -0500 staging: exfat: Clean up return codes - FFS_INVALIDFID Covert FFS_INVALIDFID to -EINVAL Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-5-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit f9c53abb42997d5af1232712a39f81c7f1ba1c01 Author: Valdis Kletnieks Date: Mon Nov 11 21:09:51 2019 -0500 staging: exfat: Clean up return codes - FFS_EOF Convert FFS_EOF to return 0 for a zero-length read() as per 'man 2 read'. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-4-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit a75500c5d3106d1b8f967b26edfcb9f945871516 Author: Valdis Kletnieks Date: Mon Nov 11 21:09:50 2019 -0500 staging: exfat: Clean up return codes - FFS_MEDIAERR Convert FFS_MEDIAERR to (mostly) -ENOENT and -EIO. Some additional code surgery needed to propogate correct error codes upwards. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-3-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 133c887424712b50f184731b1cfe26ed7201cd6b Author: Valdis Kletnieks Date: Mon Nov 11 21:09:49 2019 -0500 staging: exfat: Clean up return codes - FFS_FORMATERR Convert FFS_FORMATERR to -EFSCORRUPTED Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-2-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit b8f64757bad8278f03c918b573687925ff55cd84 Author: Ioana Ciornei Date: Mon Nov 11 18:50:58 2019 +0200 staging: dpaa2-ethsw: ordered workqueue should be per ethsw Create a different ordered workqueue per dpaa2-ethsw instance. Without this change, we overwrite the global queue and leak memory when probing multiple instances of the driver. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/1573491058-24766-5-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 910f30917cdffedff5663f5ac451424bd7176ce7 Author: Ioana Ciornei Date: Mon Nov 11 18:50:57 2019 +0200 staging: dpaa2-ethsw: move port switchdev blocking notifier per ethsw Register a different switchdev blocking notifier block per ethsw instance. When probing multiple dpaa2-ethsw instances, without this the register will fail. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/1573491058-24766-4-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit a3c6345e9f04510bcca88f0faefbcd2399dbca47 Author: Ioana Ciornei Date: Mon Nov 11 18:50:56 2019 +0200 staging: dpaa2-ethsw: move port switchdev notifier per ethsw Register a different switchdev notifier block per ethsw instance. When probing multiple dpaa2-ethsw instances, without this the register will fail. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/1573491058-24766-3-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit c5e648f8574d4644fe3efd46c4d34b5fceea2781 Author: Ioana Ciornei Date: Mon Nov 11 18:50:55 2019 +0200 staging: dpaa2-ethsw: move port notifier per ethsw Register a different net_device notifier block per ethsw instance. When probing multiple dpaa2-ethsw instances, without this the register will fail. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/1573491058-24766-2-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 7db57ca4b1340ca8cc3cf864d5e1acdb66919ab4 Author: Javier F. Arias Date: Tue Nov 12 11:54:11 2019 -0500 staging: rtl8723bs: Remove unnecessary braces This patch removes unnecessary braces on single statement blocks or that aren't necessary in any arm of the statement. Issue found by Checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/041503946a1c58111e69579838b184359745d8c1.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 309e05f5f91f63b0ee387b2bf4d595cef25ad76d Author: Javier F. Arias Date: Tue Nov 12 11:53:53 2019 -0500 staging: rtl8723bs: Remove blank lines after an open brace This patch removes blank lines after an open brace. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/847ce59f8429afaac1299794987779d0db54d0be.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 839e18aa1ef6d0098ceb3ca69972faadbc6dc79b Author: Javier F. Arias Date: Tue Nov 12 11:53:28 2019 -0500 staging: rtl8723bs: Remove blank lines before a close brace This patch removes blank lines before a close brase. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/369fa1068078d98d658fe5e8fc335df1b22f5238.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c3cc574f2bcd6185f78302ffbd21120b04b22028 Author: Javier F. Arias Date: Tue Nov 12 11:53:01 2019 -0500 staging: rtl8723bs: Remove multiple blank lines This patch removes multiple blank lines to solve the warning found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/257b08ad13aa23c2ee53fc333ea3c3f7e3105791.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit af96ce03218eead79f8925e6fe21dd93863affbd Author: Christian Gromm Date: Tue Nov 12 14:40:36 2019 +0100 staging: most: core: add comments to mutex and spinlock definitions This patch adds a comment to the start_mutex and fifo_lock fields of the most_channel structure definition. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1573566036-2279-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 75fcc0ce72e5cea2e357cdde858216c5bad40442 Author: Mika Westerberg Date: Tue Oct 29 20:00:21 2019 +0300 PCI: pciehp: Do not disable interrupt twice on suspend We try to keep PCIe hotplug ports runtime suspended when entering system suspend. Because the PCIe portdrv sets the DPM_FLAG_NEVER_SKIP flag, the PM core always calls system suspend/resume hooks even if the device is left runtime suspended. Since PCIe hotplug driver re-used the same function for both runtime suspend and system suspend, it ended up disabling hotplug interrupt twice and the second time following was printed: pciehp 0000:03:01.0:pcie204: pcie_do_write_cmd: no response from device Prevent this from happening by checking whether the device is already runtime suspended when the system suspend hook is called. Fixes: 9c62f0bfb832 ("PCI: pciehp: Implement runtime PM callbacks") Link: https://lore.kernel.org/r/20191029170022.57528-1-mika.westerberg@linux.intel.com Reported-by: Kai-Heng Feng Tested-by: Kai-Heng Feng Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 530436c45ef2e446c12538a400e465929a0b3ade Author: Eduard Hasenleithner Date: Tue Nov 12 21:55:01 2019 +0100 nvme: Discard workaround for non-conformant devices Users observe IOMMU related errors when performing discard on nvme from non-compliant nvme devices reading beyond the end of the DMA mapped ranges to discard. Two different variants of this behavior have been observed: SM22XX controllers round up the read size to a multiple of 512 bytes, and Phison E12 unconditionally reads the maximum discard size allowed by the spec (256 segments or 4kB). Make nvme_setup_discard unconditionally allocate the maximum DSM buffer so the driver DMA maps a memory range that will always succeed. Link: https://bugzilla.kernel.org/show_bug.cgi?id=202665 many Signed-off-by: Eduard Hasenleithner [changelog, use existing define, kernel coding style] Signed-off-by: Keith Busch commit 3b8db0348c503823fb09b5f304b196c3362754ea Author: Ran Wang Date: Thu Oct 24 17:26:44 2019 +0800 soc: fsl: add RCPM driver The NXP's QorIQ processors based on ARM Core have RCPM module (Run Control and Power Management), which performs system level tasks associated with power management such as wakeup source control. Note that this driver will not support PowerPC based QorIQ processors, and it depends on PM wakeup source framework which provide collect wake information. Signed-off-by: Ran Wang Reviewed-by: Rafael J. Wysocki Signed-off-by: Li Yang commit 218325370e0768f7c06d09e05b77cf5b8e2c9b34 Author: Ran Wang Date: Thu Oct 24 17:26:43 2019 +0800 dt-bindings: fsl: rcpm: Add 'little-endian' and update Chassis definition By default, QorIQ SoC's RCPM register block is Big Endian. But there are some exceptions, such as LS1088A and LS2088A, are Little Endian. So add this optional property to help identify them. Actually LS2021A and other Layerscapes won't totally follow Chassis 2.1, so separate them from powerpc SoC. Signed-off-by: Ran Wang Reviewed-by: Rob Herring Signed-off-by: Li Yang commit e0580b50d9d4b61d6c56085acdc2bb01c040aca9 Merge: 9440a875b835 b9468ad8ff65 Author: David S. Miller Date: Tue Nov 12 12:27:05 2019 -0800 Merge tag 'linux-can-next-for-5.5-20191111' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2019-10-07 this is a pull request for net-next/master consisting of 32 patches. The first patch is by Gustavo A. R. Silva and removes unused code in the generic CAN infrastructure. The next three patches target the mcp251x driver. The one by Andy Shevchenko removes the legacy platform data support from the driver. The other two are by Timo Schlüßler and reset the device only when needed, to prevent glitches on the output when GPIO support is added. I'm contributing two patches fixing checkpatch warnings in the c_can_platform and peak_canfd driver. Stephane Grosjean's patch for the peak_canfd driver adds hw timestamps support in rx skbs. The next three patches target the xilinx_can driver. One patch by me to fix checkpatch warnings, one patch by Anssi Hannula to avoid non requested bus error frames, and a patch by YueHaibing that switches the driver to devm_platform_ioremap_resource(). Pankaj Sharma contributes two patches for the m_can driver, the first one adds support for one shot mode, the other support for handling arbitration errors. Followed by four patches by YueHaibing, switching the grcan, ifi, rcar, and sun4i drivers to devm_platform_ioremap_resource() I'm contributing cleanup patches for the rx-offload helper, while Joakim Zhang's patch prepares the rx-offload helper for CAN-FD support. The rx offload users flexcan and ti_hecc are converted accordingly. The remaining twelve patches target the flexcan driver. First Joakim Zhang switches the driver to devm_platform_ioremap_resource(). The remaining eleven patch are by me and clean up the abstract the access of the iflag1 and iflag2 register both for RX and TX mailboxes. This is a preparation for the upcoming CAN-FD support. ==================== Signed-off-by: David S. Miller commit 9440a875b8359090fa9ae65b4fb640893c04a80d Author: Arthur Fabre Date: Tue Nov 12 15:36:01 2019 +0000 sfc: trace_xdp_exception on XDP failure The sfc driver can drop packets processed with XDP, notably when running out of buffer space on XDP_TX, or returning an unknown XDP action. This increments the rx_xdp_bad_drops ethtool counter. Call trace_xdp_exception everywhere rx_xdp_bad_drops is incremented, except for fragmented RX packets as the XDP program hasn't run yet. This allows it to easily be monitored from userspace. This mirrors the behavior of other drivers. Signed-off-by: Arthur Fabre Acked-by: Edward Cree Signed-off-by: David S. Miller commit 1e86606ba05d5e6269dabb209f5406745cb5b141 Author: YueHaibing Date: Tue Nov 12 22:35:14 2019 +0800 ptp: ptp_clockmatrix: Fix build error When do randbuilding, we got this warning: WARNING: unmet direct dependencies detected for PTP_1588_CLOCK Depends on [n]: NET [=y] && POSIX_TIMERS [=n] Selected by [y]: - PTP_1588_CLOCK_IDTCM [=y] Make PTP_1588_CLOCK_IDTCM depends on PTP_1588_CLOCK to fix this. Fixes: 3a6ba7dc7799 ("ptp: Add a ptp clock driver for IDT ClockMatrix.") Signed-off-by: YueHaibing Reviewed-by: Vincent Cheng Signed-off-by: David S. Miller commit e0e2b35b790fefbcff5689984a134cdaa4ce051c Author: Davide Caratti Date: Tue Nov 12 15:33:11 2019 +0100 net/sched: actions: remove unused 'order' after commit 4097e9d250fb ("net: sched: don't use tc_action->order during action dump"), 'act->order' is initialized but then it's no more read, so we can just remove this member of struct tc_action. CC: Ivan Vecera Signed-off-by: Davide Caratti Acked-by: Jiri Pirko Reviewed-by: Ivan Vecera Signed-off-by: David S. Miller commit 8083c629dc318c3191d06fcb226528b08ae2acdd Author: Atish Patra Date: Tue Nov 5 16:06:52 2019 -0800 RISC-V: Add multiple compression image format. Currently, there is only support for .gz compression type for generating kernel Image. Add support for other compression methods(lzma, lz4, lzo, bzip2) that helps in generating a even smaller kernel image. Image.gz will still be the default compressed image. Signed-off-by: Atish Patra Signed-off-by: Paul Walmsley commit 6b57ba8ed48a3ee3d6b53294ccbf02b8cb83c604 Author: Zong Li Date: Mon Oct 28 00:42:47 2019 -0700 riscv: clean up the macro format in each header file There are many different formats in each header now, such as _ASM_XXX_H, __ASM_XXX_H, _ASM_RISCV_XXX_H, RISCV_XXX_H, etc., This patch tries to unify the format by using _ASM_RISCV_XXX_H, because the most header use it now. This patch also adds the conditional to the headers if they lost it. Signed-off-by: Zong Li Signed-off-by: Paul Walmsley commit 0fdc636cd95ceeba48b8c171ac338df46b795101 Author: Zong Li Date: Fri Nov 8 01:00:40 2019 -0800 riscv: Use PMD_SIZE to replace PTE_PARENT_SIZE The PMD_SIZE is equal to PGDIR_SIZE when __PAGETABLE_PMD_FOLDED is defined. Signed-off-by: Zong Li Reviewed-by: Anup Patel Reviewed-by: Christoph Hellwig [paul.walmsley@sifive.com: fixed spelling in commit summary] Signed-off-by: Paul Walmsley commit a2e2f2dc77a18d2b0f450fb7fcb4871c9f697822 Author: Scott Mayhew Date: Tue Nov 12 14:01:55 2019 -0500 nfsd: v4 support requires CRYPTO_SHA256 The new nfsdcld client tracking operations use sha256 to compute hashes of the kerberos principals, so make sure CRYPTO_SHA256 is enabled. Fixes: 6ee95d1c8991 ("nfsd: add support for upcall version 2") Reported-by: Jamie Heilman Signed-off-by: Scott Mayhew Signed-off-by: J. Bruce Fields commit 18b9a895e652979b70f9c20565394a69354dfebc Author: Scott Mayhew Date: Tue Nov 12 14:01:43 2019 -0500 nfsd: Fix cld_net->cn_tfm initialization Don't assign an error pointer to cld_net->cn_tfm, otherwise an oops will occur in nfsd4_remove_cld_pipe(). Also, move the initialization of cld_net->cn_tfm so that it occurs after the check to see if nfsdcld is running. This is necessary because nfsd4_client_tracking_init() looks for -ETIMEDOUT to determine whether to use the "old" nfsdcld tracking ops. Fixes: 6ee95d1c8991 ("nfsd: add support for upcall version 2") Reported-by: Jamie Heilman Signed-off-by: Scott Mayhew Signed-off-by: J. Bruce Fields commit 0b40dbcbba923b5379bd1d601edd6d51e23fe72c Author: zhengbin Date: Tue Oct 29 17:33:32 2019 +0800 KEYS: trusted: Remove set but not used variable 'keyhndl' Fixes gcc '-Wunused-but-set-variable' warning: security/keys/trusted-keys/trusted_tpm1.c: In function tpm_unseal: security/keys/trusted-keys/trusted_tpm1.c:588:11: warning: variable keyhndl set but not used [-Wunused-but-set-variable] Fixes: 00aa975bd031 ("KEYS: trusted: Create trusted keys subsystem") Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 9c8c5742b6af76a3fd93b4e56d1d981173cf9016 Author: Hans de Goede Date: Fri Oct 25 11:14:48 2019 +0200 tpm: Switch to platform_get_irq_optional() platform_get_irq() calls dev_err() on an error. As the IRQ usage in the tpm_tis driver is optional, this is undesirable. Specifically this leads to this new false-positive error being logged: [ 5.135413] tpm_tis MSFT0101:00: IRQ index 0 not found This commit switches to platform_get_irq_optional(), which does not log an error, fixing this. Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()" Cc: # 5.4.x Signed-off-by: Hans de Goede Reviewed-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 3ef193822b25e9ee629974f66dc1ff65167f770c Author: Ivan Lazeev Date: Wed Oct 16 21:28:14 2019 +0300 tpm_crb: fix fTPM on AMD Zen+ CPUs Bug link: https://bugzilla.kernel.org/show_bug.cgi?id=195657 cmd/rsp buffers are expected to be in the same ACPI region. For Zen+ CPUs BIOS's might report two different regions, some of them also report region sizes inconsistent with values from TPM registers. Memory configuration on ASRock x470 ITX: db0a0000-dc59efff : Reserved dc57e000-dc57efff : MSFT0101:00 dc582000-dc582fff : MSFT0101:00 Work around the issue by storing ACPI regions declared for the device in a fixed array and adding an array for pointers to corresponding possibly allocated resources in crb_map_io function. This data was previously held for a single resource in struct crb_priv (iobase field) and local variable io_res in crb_map_io function. ACPI resources array is used to find index of corresponding region for each buffer and make the buffer size consistent with region's length. Array of pointers to allocated resources is used to map the region at most once. Signed-off-by: Ivan Lazeev Tested-by: Jerry Snitselaar Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 2e19e10131a08dc65079c755fb6e8af936bfedbd Author: Sumit Garg Date: Wed Oct 16 10:44:55 2019 +0530 KEYS: trusted: Move TPM2 trusted keys code Move TPM2 trusted keys code to trusted keys subsystem. The reason being it's better to consolidate all the trusted keys code to a single location so that it can be maintained sanely. Also, utilize existing tpm_send() exported API which wraps the internal tpm_transmit_cmd() API. Suggested-by: Jarkko Sakkinen Signed-off-by: Sumit Garg Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 47f9c279689107f306fff506753971a39a8a7ffc Author: Sumit Garg Date: Wed Oct 16 10:44:54 2019 +0530 KEYS: trusted: Create trusted keys subsystem Move existing code to trusted keys subsystem. Also, rename files with "tpm" as suffix which provides the underlying implementation. Suggested-by: Jarkko Sakkinen Signed-off-by: Sumit Garg Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit c6f61e59760df04a245ef48c8805b4eb3d958230 Author: Sumit Garg Date: Wed Oct 16 10:44:53 2019 +0530 KEYS: Use common tpm_buf for trusted and asymmetric keys Switch to utilize common heap based tpm_buf code for TPM based trusted and asymmetric keys rather than using stack based tpm1_buf code. Also, remove tpm1_buf code. Suggested-by: Jarkko Sakkinen Signed-off-by: Sumit Garg Reviewed-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 74edff2d74c64ca5977a57efb5c238c8f5318ba9 Author: Sumit Garg Date: Wed Oct 16 10:44:52 2019 +0530 tpm: Move tpm_buf code to include/linux/ Move tpm_buf code to common include/linux/tpm.h header so that it can be reused via other subsystems like trusted keys etc. Also rename trusted keys and asymmetric keys usage of TPM 1.x buffer implementation to tpm1_buf to avoid any compilation errors. Suggested-by: Jarkko Sakkinen Signed-off-by: Sumit Garg Reviewed-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 44abdb377b7c399dfec48de7252c564bdde8d26e Author: James Bottomley Date: Fri Oct 11 09:02:59 2019 -0700 tpm: use GFP_KERNEL instead of GFP_HIGHMEM for tpm_buf The current code uses GFP_HIGHMEM, which is wrong because GFP_HIGHMEM (on 32 bit systems) is memory ordinarily inaccessible to the kernel and should only be used for allocations affecting userspace. In order to make highmem visible to the kernel on 32 bit it has to be kmapped, which consumes valuable entries in the kmap region. Since the tpm_buf is only ever used in the kernel, switch to using a GFP_KERNEL allocation so as not to waste kmap space on 32 bits. Reviewed-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Signed-off-by: James Bottomley Signed-off-by: Jarkko Sakkinen commit f1689114acc5e89a196fec6d732dae3e48edb6ad Author: Tadeusz Struk Date: Mon Oct 7 14:46:37 2019 -0700 tpm: add check after commands attribs tab allocation devm_kcalloc() can fail and return NULL so we need to check for that. Cc: stable@vger.kernel.org Fixes: 58472f5cd4f6f ("tpm: validate TPM 2.0 commands") Signed-off-by: Tadeusz Struk Reviewed-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 1fce4d8a19fe3e49157327e7db1611269cd49d10 Author: Stephen Boyd Date: Fri Sep 20 11:32:40 2019 -0700 tpm: tpm_tis_spi: Drop THIS_MODULE usage from driver struct The module_spi_driver() macro already inserts THIS_MODULE into the driver .owner field. Remove it to save a line. Cc: Andrey Pronin Cc: Duncan Laurie Cc: Jason Gunthorpe Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Guenter Roeck Cc: Alexander Steffen Cc: Heiko Stuebner Signed-off-by: Stephen Boyd Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 86cd45e084b18f9a096f543c782b7ae7c88c6a24 Author: Stephen Boyd Date: Fri Sep 20 11:32:39 2019 -0700 tpm: tpm_tis_spi: Cleanup includes Some of these includes aren't used, for example of_gpio.h and freezer.h, or they are missing, for example kernel.h for min_t() usage. Add missing headers and remove unused ones so that we don't have to expand all these headers into this file when they're not actually necessary. Cc: Andrey Pronin Cc: Duncan Laurie Cc: Jason Gunthorpe Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Guenter Roeck Cc: Alexander Steffen Cc: Heiko Stuebner Signed-off-by: Stephen Boyd Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 797c0113c9a481d4554988d70b5b52fae657262f Author: Andrey Pronin Date: Fri Sep 20 11:32:38 2019 -0700 tpm: tpm_tis_spi: Support cr50 devices Add TPM2.0 PTP FIFO compatible SPI interface for chips with Cr50 firmware. The firmware running on the currently supported H1 Secure Microcontroller requires a special driver to handle its specifics: - need to ensure a certain delay between SPI transactions, or else the chip may miss some part of the next transaction - if there is no SPI activity for some time, it may go to sleep, and needs to be waken up before sending further commands - access to vendor-specific registers Cr50 firmware has a requirement to wait for the TPM to wakeup before sending commands over the SPI bus. Otherwise, the firmware could be in deep sleep and not respond. The method to wait for the device to wakeup is slightly different than the usual flow control mechanism described in the TCG SPI spec. Add a completion to tpm_tis_spi_transfer() before we start a SPI transfer so we can keep track of the last time the TPM driver accessed the SPI bus to support the flow control mechanism. Split the cr50 logic off into a different file to keep it out of the normal code flow of the existing SPI driver while making it all part of the same module when the code is optionally compiled into the same module. Export a new function, tpm_tis_spi_init(), and the associated read/write/transfer APIs so that we can do this. Make the cr50 code wrap the tpm_tis_spi_phy struct with its own struct to override the behavior of tpm_tis_spi_transfer() by supplying a custom flow control hook. This shares the most code between the core driver and the cr50 support without combining everything into the core driver or exporting module symbols. Signed-off-by: Andrey Pronin Cc: Andrey Pronin Cc: Duncan Laurie Cc: Jason Gunthorpe Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Guenter Roeck Cc: Alexander Steffen Cc: Heiko Stuebner [swboyd@chromium.org: Replace boilerplate with SPDX tag, drop suspended bit and remove ifdef checks in cr50.h, migrate to functions exported in tpm_tis_spi.h, combine into one module instead of two] Signed-off-by: Stephen Boyd Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 8ab5e82afa969b65b286d8949c12d2a64c83960c Author: Stephen Boyd Date: Fri Sep 20 11:32:37 2019 -0700 tpm: tpm_tis_spi: Introduce a flow control callback Cr50 firmware has a different flow control protocol than the one used by this TPM PTP SPI driver. Introduce a flow control callback so we can override the standard sequence with the custom one that Cr50 uses. Cc: Andrey Pronin Cc: Duncan Laurie Cc: Jason Gunthorpe Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Guenter Roeck Cc: Alexander Steffen Cc: Heiko Stuebner Signed-off-by: Stephen Boyd Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 2e2ee5a2db06c4b81315514b01d06fe5644342e9 Author: Stephen Boyd Date: Fri Sep 20 11:32:36 2019 -0700 tpm: Add a flag to indicate TPM power is managed by firmware On some platforms, the TPM power is managed by firmware and therefore we don't need to stop the TPM on suspend when going to a light version of suspend such as S0ix ("freeze" suspend state). Add a chip flag, TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED, to indicate this so that certain platforms can probe for the usage of this light suspend and avoid touching the TPM state across suspend/resume. Cc: Andrey Pronin Cc: Duncan Laurie Cc: Jason Gunthorpe Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Guenter Roeck Cc: Alexander Steffen Cc: Heiko Stuebner Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Signed-off-by: Stephen Boyd Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit fb8d6c8db3ba1f91e573d0f8d4d00c9776abe620 Author: Andrey Pronin Date: Fri Sep 20 11:32:35 2019 -0700 dt-bindings: tpm: document properties for cr50 Add TPM2.0 PTP FIFO compatible SPI interface for chips with Cr50 firmware. Cc: Andrey Pronin Cc: Duncan Laurie Cc: Jason Gunthorpe Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Guenter Roeck Cc: Alexander Steffen Cc: Heiko Stuebner Signed-off-by: Andrey Pronin Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 5af4f1d5cb4dc875db4bf678c7168c3cc02e3afa Author: Jerry Snitselaar Date: Mon Sep 2 07:27:35 2019 -0700 tpm_tis: override durations for STM tpm with firmware 1.2.8.28 There was revealed a bug in the STM TPM chipset used in Dell R415s. Bug is observed so far only on chipset firmware 1.2.8.28 (1.2 TPM, device-id 0x0, rev-id 78). After some number of operations chipset hangs and stays in inconsistent state: tpm_tis 00:09: Operation Timed out tpm_tis 00:09: tpm_transmit: tpm_send: error -5 Durations returned by the chip are the same like on other firmware revisions but apparently with specifically 1.2.8.28 fw durations should be reset to 2 minutes to enable tpm chip work properly. No working way of updating firmware was found. This patch adds implementation of ->update_durations method that matches only STM devices with specific firmware version. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Signed-off-by: Alexey Klimov Signed-off-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen (!update_durations path) Signed-off-by: Jarkko Sakkinen (!update_durations path) commit 15d0b22c01e6320241fe4d570e02de2935b842bf Author: Jerry Snitselaar Date: Mon Sep 2 07:27:34 2019 -0700 tpm: provide a way to override the chip returned durations Patch adds method ->update_durations to override returned durations in case TPM chip misbehaves for TPM 1.2 drivers. Cc: Peter Huewe Cc: Jason Gunthorpe Signed-off-by: Alexey Klimov Signed-off-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen (!update_durations path) Signed-off-by: Jarkko Sakkinen commit f2f5820e3ba6b7ce17dc7cc10a1e838378edcf75 Author: Jarkko Sakkinen Date: Mon Sep 2 07:27:33 2019 -0700 tpm: Remove duplicate code from caps_show() in tpm-sysfs.c Replace existing TPM 1.x version structs with new structs that consolidate the common parts into a single struct so that code duplication is no longer needed in caps_show(). Cc: Peter Huewe Cc: Jason Gunthorpe Cc: Alexey Klimov Reviewed-by: Jerry Snitselaar Tested-by: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen commit 4e4637b10374ede3cd33d7e1b389e6cea6343ea3 Author: Colin Ian King Date: Tue Nov 12 13:05:23 2019 +0000 net: dsa: mv88e6xxx: fix broken if statement because of a stray semicolon There is a stray semicolon in an if statement that will cause a dev_err message to be printed unconditionally. Fix this by removing the stray semicolon. Addresses-Coverity: ("Stay semicolon") Fixes: f0942e00a1ab ("net: dsa: mv88e6xxx: Add support for port mirroring") Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7c9e7f0fe0d8abf856a957c150c48778e75154c1 Author: Jens Axboe Date: Tue Nov 12 08:15:53 2019 -0700 io_uring: fix potential deadlock in io_poll_wake() We attempt to run the poll completion inline, but we're using trylock to do so. This avoids a deadlock since we're grabbing the locks in reverse order at this point, we already hold the poll wq lock and we're trying to grab the completion lock, while the normal rules are the reverse of that order. IO completion for a timeout link will need to grab the completion lock, but that's not safe from this context. Put the completion under the completion_lock in io_poll_wake(), and mark the request as entering the completion with the completion_lock already held. Fixes: 2665abfd757f ("io_uring: add support for linked SQE timeouts") Signed-off-by: Jens Axboe commit 084346be800697d505ffc41b7af919096a4c44a5 Merge: 6c0867022352 ff18176ad806 Author: David S. Miller Date: Tue Nov 12 11:25:44 2019 -0800 Merge branch 'Update-devlink-binary-output' Aya Levin says: ==================== Update devlink binary output This series changes the devlink binary interface: -The first patch forces binary values to be enclosed in an array. In addition, devlink_fmsg_binary_pair_put breaks the binary value into chunks to comply with devlink's restriction for value length. -The second patch removes redundant code and uses the fixed devlink interface (devlink_fmsg_binary_pair_put). -The third patch make self test to use the updated devlink interface. -The fourth, adds a verification of dumping a very large binary content. This test verifies breaking the data into chunks in a valid JSON output. Series was generated against net-next commit: ca22d6977b9b Merge branch 'stmmac-next' ==================== Signed-off-by: David S. Miller commit ff18176ad806ea1a7f5f9b404182f97dbb6f9691 Author: Aya Levin Date: Tue Nov 12 14:07:52 2019 +0200 selftests: Add a test of large binary to devlink health test Add a test of 2 PAGEs size (exceeds devlink previous length limitation) of binary data on a 'devlink health dump show' command. Set binary length to 8192, issue a dump show command and clear it. Signed-off-by: Aya Levin Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 8fdcd8fb21c054217b5ca5cb627a9a726dba630f Author: Aya Levin Date: Tue Nov 12 14:07:51 2019 +0200 netdevsim: Update dummy reporter's devlink binary interface Update dummy reporter's output to use updated devlink interface of binary fmsg pair. Signed-off-by: Aya Levin Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit d4e82cf4df300368e8d271a2caf14611a5e176a6 Author: Aya Levin Date: Tue Nov 12 14:07:50 2019 +0200 net/mlx5: Dump of fw_fatal use updated devlink binary interface Remove redundant code from fw_fatal reporter's dump callback. Use updated devlink interface of binary fmsg pair which breaks the output into chunks internally. Signed-off-by: Aya Levin Acked-by: Jiri Pirko Acked-by: Saeed Mahameed Signed-off-by: David S. Miller commit e2cde864a1d3e3626bfc8fa088fbc82b04ce66ed Author: Aya Levin Date: Tue Nov 12 14:07:49 2019 +0200 devlink: Allow large formatted message of binary output Devlink supports pair output of name and value. When the value is binary, it must be presented in an array. If the length of the binary value exceeds fmsg limitation, break the value into chunks internally. Signed-off-by: Aya Levin Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 5cff6fddb8dca9b3a367c190ec043f4f484c0679 Author: Rob Herring Date: Fri Nov 8 09:35:38 2019 -0600 dt-bindings: vendor-prefixes: Add 'fsi[ab]' to the list of non-vendor prefixes 'fsia' and 'fsib' property prefixes were added as schema in commit 2f52475bac7e ("ASoC: fsi: switch to yaml base Documentation"). Unfortunately to do checks on actual vendor prefixes, we have to track the handful of prefixes which are not vendors like 'fsia' and 'fsib'. Fixes: 2f52475bac7e ASoC: fsi: switch to yaml base Documentation Cc: Kuninori Morimoto Cc: Mark Brown Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20191108153538.11970-1-robh@kernel.org Signed-off-by: Mark Brown commit 6c0867022352027409f5a9fee1d3c6923f9e083e Author: Russell King Date: Tue Nov 12 11:35:00 2019 +0000 net: sfp: fix sfp_bus_add_upstream() warning When building with SFP disabled, the stub for sfp_bus_add_upstream() missed "inline". Add it. Fixes: 727b3668b730 ("net: sfp: rework upstream interface") Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8b8371b5bad3aea1e1e4b9682066f07afe2efdea Author: zhengbin Date: Tue Nov 12 15:08:40 2019 +0800 cxgb4: make function 'cxgb4_mqprio_free_hw_resources' static Fix sparse warnings: drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c:242:6: warning: symbol 'cxgb4_mqprio_free_hw_resources' was not declared. Should it be static? Reported-by: Hulk Robot Fixes: 2d0cb84dd973 ("cxgb4: add ETHOFLD hardware queue support") Signed-off-by: zhengbin Signed-off-by: David S. Miller commit 13eef6fc2c1ff71f3245448c6b22a1c51040140e Merge: b55cbbee74b7 7b094968ccbb Author: David S. Miller Date: Tue Nov 12 10:55:41 2019 -0800 Merge branch 'atlantic-static' zhengbin says: ==================== net: atlantic: make some symbol & function static v1->v2: add Fixes tag ==================== Signed-off-by: David S. Miller commit 7b094968ccbb55da9e9fa749bdfd9b90b57d64e5 Author: zhengbin Date: Tue Nov 12 14:59:42 2019 +0800 net: atlantic: make function 'aq_ethtool_get_priv_flags', 'aq_ethtool_set_priv_flags' static Fix sparse warnings: drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c:706:5: warning: symbol 'aq_ethtool_get_priv_flags' was not declared. Should it be static? drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c:713:5: warning: symbol 'aq_ethtool_set_priv_flags' was not declared. Should it be static? Reported-by: Hulk Robot Fixes: ea4b4d7fc106 ("net: atlantic: loopback tests via private flags") Signed-off-by: zhengbin Signed-off-by: David S. Miller commit 0ee0bbb018938addf87b54d447cc5633d2e53490 Author: zhengbin Date: Tue Nov 12 14:59:41 2019 +0800 net: atlantic: make symbol 'aq_pm_ops' static Fix sparse warnings: drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:426:25: warning: symbol 'aq_pm_ops' was not declared. Should it be static? Reported-by: Hulk Robot Fixes: 8aaa112a57c1 ("net: atlantic: refactoring pm logic") Signed-off-by: zhengbin Signed-off-by: David S. Miller commit b55cbbee74b77dc17165f6c80dfa31e12c5cb1ff Merge: b2ef81dcdf38 9032b9e8f210 Author: David S. Miller Date: Tue Nov 12 10:54:02 2019 -0800 Merge branch 'mlxsw-Add-extended-ACK-for-EMADs' Ido Schimmel says: ==================== mlxsw: Add extended ACK for EMADs Shalom says: Ethernet Management Datagrams (EMADs) are Ethernet packets sent between the driver and device's firmware. They are used to pass various configurations to the device, but also to get events (e.g., port up) from it. After the Ethernet header, these packets are built in a TLV format. Up until now, whenever the driver issued an erroneous register access it only got an error code indicating a bad parameter was used. This patch set adds a new TLV (string TLV) that can be used by the firmware to encode a 128 character string describing the error. The new TLV is allocated by the driver and set to zeros. In case of error, the driver will check the length of the string in the response and report it using devlink hwerr tracepoint. Example: $ perf record -a -q -e devlink:devlink_hwerr & $ pkill -2 perf $ perf script -F trace:event,trace | grep hwerr devlink:devlink_hwerr: bus_name=pci dev_name=0000:03:00.0 driver_name=mlxsw_spectrum err=7 (tid=9913892d00001593,reg_id=8018(rauhtd)) bad parameter (inside er_rauhtd_write_query(), num_rec=32 is over the maximum number of records supported) Patch #1 parses the offsets of the different TLVs in incoming EMADs and stores them in the skb's control block. This makes it easier to later add new TLVs. Patches #2-#3 remove deprecated TLVs and add string TLV definition. Patches #4-#7 gradually add support for the new string TLV. v2: * Use existing devlink hwerr tracepoint to report the error string, instead of printing it to kernel log ==================== Signed-off-by: David S. Miller commit 9032b9e8f2107c6d30327492e4e4b32f92956a8f Author: Shalom Toledo Date: Tue Nov 12 08:48:30 2019 +0200 mlxsw: spectrum: Enable EMAD string TLV Make sure to enable EMAD string TLV only after using the required firmware version. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5d716ab45ad5e02461cb3b33062573d7cf43596a Author: Shalom Toledo Date: Tue Nov 12 08:48:29 2019 +0200 mlxsw: core: Add support for using EMAD string TLV In case the firmware had an error while processing EMADs, it can send back an ASCII string with the reason using EMAD string TLV. This patch adds the support for using EMAD string TLV. In case of an error, reports the reason using devlink hwerr tracepoint. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 72c8f428b5dc786d901d00370fa88923b40d7539 Author: Shalom Toledo Date: Tue Nov 12 08:48:28 2019 +0200 mlxsw: core: Extend EMAD information reported to devlink hwerr Extend EMAD information reported to devlink hwerr tracepoint with transaction id and reg id (both, hex and string). Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2aa4aa2051f86d032ef86a268b38569cb3d450d0 Author: Shalom Toledo Date: Tue Nov 12 08:48:27 2019 +0200 mlxsw: core: Add support for EMAD string TLV parsing During parsing of incoming EMADs, fill the string TLV's offset when it is used. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 664b3dd9ba58462d1f74f2c9536e500898450edc Author: Shalom Toledo Date: Tue Nov 12 08:48:26 2019 +0200 mlxsw: core: Add EMAD string TLV Add EMAD string TLV, an ASCII string the driver can receive from the firmware in case of an error. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d17eb4030cc3061d3d2f313b9b898103701c44a4 Author: Shalom Toledo Date: Tue Nov 12 08:48:25 2019 +0200 mlxsw: emad: Remove deprecated EMAD TLVs Remove deprecated EMAD TLVs. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5aa4165c60aaade3aebe0c5278111781142a5636 Author: Shalom Toledo Date: Tue Nov 12 08:48:24 2019 +0200 mlxsw: core: Parse TLVs' offsets of incoming EMADs Until now the code assumes a fixed structure which makes it difficult to support EMADs with and without new TLVs. Make it more generic by parsing the TLVs when the EMADs are received and store the offset to the different TLVs in the control block. Using these offsets to extract information from the EMADs without relying on a specific structure. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b2ef81dcdf3835bd55e5f97ff30131bb327be7fa Author: Mao Wenan Date: Tue Nov 12 14:33:58 2019 +0800 net: ethernet: ti: Add dependency for TI_DAVINCI_EMAC If TI_DAVINCI_EMAC=y and GENERIC_ALLOCATOR is not set, below erros can be seen: drivers/net/ethernet/ti/davinci_cpdma.o: In function `cpdma_desc_pool_destroy.isra.14': davinci_cpdma.c:(.text+0x359): undefined reference to `gen_pool_size' davinci_cpdma.c:(.text+0x365): undefined reference to `gen_pool_avail' davinci_cpdma.c:(.text+0x373): undefined reference to `gen_pool_avail' davinci_cpdma.c:(.text+0x37f): undefined reference to `gen_pool_size' drivers/net/ethernet/ti/davinci_cpdma.o: In function `__cpdma_chan_free': davinci_cpdma.c:(.text+0x4a2): undefined reference to `gen_pool_free_owner' drivers/net/ethernet/ti/davinci_cpdma.o: In function `cpdma_chan_submit_si': davinci_cpdma.c:(.text+0x66c): undefined reference to `gen_pool_alloc_algo_owner' davinci_cpdma.c:(.text+0x805): undefined reference to `gen_pool_free_owner' drivers/net/ethernet/ti/davinci_cpdma.o: In function `cpdma_ctlr_create': davinci_cpdma.c:(.text+0xabd): undefined reference to `devm_gen_pool_create' davinci_cpdma.c:(.text+0xb79): undefined reference to `gen_pool_add_owner' drivers/net/ethernet/ti/davinci_cpdma.o: In function `cpdma_check_free_tx_desc': davinci_cpdma.c:(.text+0x16c6): undefined reference to `gen_pool_avail' This patch mades TI_DAVINCI_EMAC select GENERIC_ALLOCATOR. Fixes: 99f629718272 ("net: ethernet: ti: cpsw: drop TI_DAVINCI_CPDMA config option") Signed-off-by: Mao Wenan Signed-off-by: David S. Miller commit 74bd3f92d0d173fe4c0a12cf736c505ceb15576a Author: Kuninori Morimoto Date: Wed Nov 6 10:08:06 2019 +0900 ASoC: soc-core: tidyup soc_probe_aux_devices() snd_soc_bind_card() is calling many initialize functions for each card / link / dai / aux etc, etc, etc... When error happen, the message is indicated at snd_soc_bind_card(), not at each functions. But, only soc_probe_aux_devices() case is indicating error at functions, not at snd_soc_bind_card(). It is not an issue, but unbalanced. This patch moves error message to snd_soc_bind_card(). Also avoids deep-nested code. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfsthkw9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ed90c013a773b5f9e06089d0eed6714761152d14 Author: Kuninori Morimoto Date: Wed Nov 6 10:07:56 2019 +0900 ASoC: soc-core: merge snd_soc_bind_card() and snd_soc_instantiate_card() having both soc_bind_card() and snd_soc_instantiate_card() is very confusable. Let's merge these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mud9hkwj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c6619b729814c855fc7bfa5a6936f5ea94d60dfd Author: Kuninori Morimoto Date: Wed Nov 6 10:07:46 2019 +0900 ASoC: soc-core: merge soc_remove_component() and soc_cleanup_component() having both soc_remove_component() and soc_cleanup_component() is very confusable. Let's merge these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8xphkwt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit da704f26ba376bd93ac5234fa4605c4a8e4a5648 Author: Kuninori Morimoto Date: Wed Nov 6 10:07:38 2019 +0900 ASoC: soc-core: merge snd_soc_remove_dai_link() and soc_unbind_dai_link() We don't need to separete snd_soc_remove_dai_link() and soc_unbind_dai_link() anymore. Let's merge these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pni5hkx1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 63dc47da1f396fecd2373e41928e275f9ca3d924 Author: Kuninori Morimoto Date: Wed Nov 6 10:07:31 2019 +0900 ASoC: soc-core: merge snd_soc_add_dai_link() and soc_bind_dai_link() We don't need to separete snd_soc_add_dai_link() and soc_bind_dai_link() anymore. Let's merge these. One note is that before this patch, it adds list (A) eventhough if it had dai_link->ignore (1), or already bounded dai_link (2). But I guess it is wrong. This patch also solve this issue. /* BEFORE */ int soc_bind_dai_link(...) { ... (1) if (dai_link->ignore) return 0; (2) if (soc_is_dai_link_bound(...)) return 0; ... } int snd_soc_add_dai_link(...) { ... => ret = soc_bind_dai_link(...); => if (ret < 0) => return ret; (A) list_add_tail(&dai_link->list, &card->dai_link_list); ... } /* AFTER */ int snd_soc_add_dai_link(...) { ... (1) if (dai_link->ignore) return 0; (2) if (soc_is_dai_link_bound(...)) return 0; ... (A) list_add_tail(&dai_link->list, &card->dai_link_list); return 0; } Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r22lhkx8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit da3ef7f6cd5222f5a0289c4eb34254c62629b603 Author: James Clark Date: Tue Nov 12 16:03:41 2019 +0000 perf vendor events power9: Fix commas so PMU event files are valid JSON No functional change. Remove extra commas in the power9 JSON files so that the files can be parsed and validated by other utilities such as Python that fail to parse invalid JSON. Before: $ diffstat -l -p1 /wb/1.patch | while read filename ; do echo $filename ; cat $filename | json_verify ; done tools/perf/pmu-events/arch/powerpc/power9/cache.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x300 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power9/floating-point.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x141 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power9/frontend.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x250 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power9/marked.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x301 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power9/memory.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x300 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power9/other.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x308 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power9/pipeline.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x4D0 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power9/pmc.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x200 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power9/translation.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x1E" (right here) ------^ JSON is invalid $ After: $ diffstat -l -p1 /wb/1.patch | while read filename ; do echo $filename ; cat $filename | json_verify ; done tools/perf/pmu-events/arch/powerpc/power9/cache.json JSON is valid tools/perf/pmu-events/arch/powerpc/power9/floating-point.json JSON is valid tools/perf/pmu-events/arch/powerpc/power9/frontend.json JSON is valid tools/perf/pmu-events/arch/powerpc/power9/marked.json JSON is valid tools/perf/pmu-events/arch/powerpc/power9/memory.json JSON is valid tools/perf/pmu-events/arch/powerpc/power9/other.json JSON is valid tools/perf/pmu-events/arch/powerpc/power9/pipeline.json JSON is valid tools/perf/pmu-events/arch/powerpc/power9/pmc.json JSON is valid tools/perf/pmu-events/arch/powerpc/power9/translation.json JSON is valid $ Signed-off-by: James Clark Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kevin Mooney Cc: Madhavan Srinivasan Cc: Mamatha Inamdar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: nd@arm.com Link: http://lore.kernel.org/lkml/20191112160342.26470-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 835e5bd90926f88d57a8d3edebf4628d01ff43ad Author: James Clark Date: Tue Nov 12 16:03:40 2019 +0000 perf vendor events power8: Fix commas so PMU event files are valid JSON No functional change. Remove extra commas in the power8 JSON files so that the files can be parsed and validated by other utilities such as Python that fail to parse invalid JSON. Committer testing: Before: $ diffstat -l -p1 /wb/1.patch | while read filename ; do echo $filename ; cat $filename | json_verify ; done tools/perf/pmu-events/arch/powerpc/power8/cache.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x4c0 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power8/floating-point.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x200 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power8/frontend.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x250 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power8/marked.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x351 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power8/memory.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x100 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power8/other.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x1f0 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power8/pipeline.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x100 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power8/pmc.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x200 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/powerpc/power8/translation.json parse error: invalid object key (must be a string) [ {, "EventCode": "0x4c0 (right here) ------^ JSON is invalid $ After: $ diffstat -l -p1 /wb/1.patch | while read filename ; do echo $filename ; cat $filename | json_verify ; done tools/perf/pmu-events/arch/powerpc/power8/cache.json JSON is valid tools/perf/pmu-events/arch/powerpc/power8/floating-point.json JSON is valid tools/perf/pmu-events/arch/powerpc/power8/frontend.json JSON is valid tools/perf/pmu-events/arch/powerpc/power8/marked.json JSON is valid tools/perf/pmu-events/arch/powerpc/power8/memory.json JSON is valid tools/perf/pmu-events/arch/powerpc/power8/other.json JSON is valid tools/perf/pmu-events/arch/powerpc/power8/pipeline.json JSON is valid tools/perf/pmu-events/arch/powerpc/power8/pmc.json JSON is valid tools/perf/pmu-events/arch/powerpc/power8/translation.json JSON is valid $ Signed-off-by: James Clark Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kevin Mooney Cc: Madhavan Srinivasan Cc: Mamatha Inamdar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: nd@arm.com Link: http://lore.kernel.org/lkml/20191112160342.26470-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit a44e4f3ab16bc808590763a543a93b6fbf3abcc4 Author: James Clark Date: Tue Nov 12 16:03:39 2019 +0000 perf vendor events arm64: Fix commas so PMU event files are valid JSON No functional change. Add and remove extra commas in the arm64 JSON files so that the files can be parsed and validated by other utilities such as Python that fail to parse invalid JSON. Committer testing: Before: $ diffstat -l -p1 /wb/1.patch | while read filename ; do echo $filename ; cat $filename | json_verify ; done tools/perf/pmu-events/arch/arm64/ampere/emag/branch.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/ampere/emag/bus.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/ampere/emag/cache.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/ampere/emag/clock.json parse error: unallowed token at this point in JSON text [ { "PublicDescrip (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/ampere/emag/exception.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/ampere/emag/instruction.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/ampere/emag/intrinsic.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/ampere/emag/memory.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/ampere/emag/pipeline.json parse error: unallowed token at this point in JSON text [ { "PublicDescrip (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/arm/cortex-a53/branch.json parse error: invalid object key (must be a string) [ { "ArchStdEvent": "BR (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/arm/cortex-a53/bus.json parse error: invalid object key (must be a string) [ { "ArchStdEvent": (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/arm/cortex-a53/other.json parse error: invalid object key (must be a string) [ { "ArchStdEvent": (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/arm/cortex-a57-a72/core-imp-def.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/armv8-recommended.json parse error: after array element, I expect ',' or ']' [ { "PublicDescrip (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json parse error: invalid object key (must be a string) [ { "ArchStdEvent" (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json parse error: invalid object key (must be a string) [ { "EventCode": "0x00 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-hha.json parse error: invalid object key (must be a string) [ { "EventCode": "0x00 (right here) ------^ JSON is invalid tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-l3c.json parse error: invalid object key (must be a string) [ { "EventCode": "0x00 (right here) ------^ JSON is invalid $ After: $ diffstat -l -p1 /wb/1.patch | while read filename ; do echo $filename ; cat $filename | json_verify ; done tools/perf/pmu-events/arch/arm64/ampere/emag/branch.json JSON is valid tools/perf/pmu-events/arch/arm64/ampere/emag/bus.json JSON is valid tools/perf/pmu-events/arch/arm64/ampere/emag/cache.json JSON is valid tools/perf/pmu-events/arch/arm64/ampere/emag/clock.json JSON is valid tools/perf/pmu-events/arch/arm64/ampere/emag/exception.json JSON is valid tools/perf/pmu-events/arch/arm64/ampere/emag/instruction.json JSON is valid tools/perf/pmu-events/arch/arm64/ampere/emag/intrinsic.json JSON is valid tools/perf/pmu-events/arch/arm64/ampere/emag/memory.json JSON is valid tools/perf/pmu-events/arch/arm64/ampere/emag/pipeline.json JSON is valid tools/perf/pmu-events/arch/arm64/arm/cortex-a53/branch.json JSON is valid tools/perf/pmu-events/arch/arm64/arm/cortex-a53/bus.json JSON is valid tools/perf/pmu-events/arch/arm64/arm/cortex-a53/other.json JSON is valid tools/perf/pmu-events/arch/arm64/arm/cortex-a57-a72/core-imp-def.json JSON is valid tools/perf/pmu-events/arch/arm64/armv8-recommended.json JSON is valid tools/perf/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json JSON is valid tools/perf/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json JSON is valid tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-ddrc.json JSON is valid tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-hha.json JSON is valid tools/perf/pmu-events/arch/arm64/hisilicon/hip08/uncore-l3c.json JSON is valid $ Signed-off-by: James Clark Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: John Garry Cc: Kevin Mooney Cc: Mark Rutland Cc: Peter Zijlstra Cc: nd@arm.com Link: http://lore.kernel.org/lkml/20191112160342.26470-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 57a9460705f105e1d79d1410c5cfe285beda8986 Author: Tony Lindgren Date: Mon Nov 11 11:53:34 2019 -0800 spi: Fix regression to return zero on success instead of positive value Commit d948e6ca1899 ("spi: add power control when set_cs") added generic runtime PM handling, but also changed the return value to be 1 instead of 0 that we had earlier as pm_runtime_get functions return a positve value on success. This causes SPI devices to return errors for cases where they do: ret = spi_setup(spi); if (ret) return ret; As in many cases the SPI devices do not check for if (ret < 0). Let's fix this by setting the status to 0 on succeess after the runtime PM calls. Let's not return 0 at the end of the function as this might break again later on if the function changes and starts returning status again. Fixes: d948e6ca1899 ("spi: add power control when set_cs") Cc: Luhua Xu Cc: wsd_upstream@mediatek.com Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20191111195334.44833-1-tony@atomide.com Signed-off-by: Mark Brown commit ffdbca0be6c78ea32b9243eea976270441210f2f Author: Kuninori Morimoto Date: Wed Nov 6 10:07:23 2019 +0900 ASoC: soc-core: merge snd_soc_unregister_dai() and soc_del_dai() We don't need to separete snd_soc_unregister_dai() and soc_del_dai() anymore. Let's merge these Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sgn1hkxg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7ca24386a7c2fb3828303b7c694cb0b4af1eac5c Author: Kuninori Morimoto Date: Wed Nov 6 10:07:17 2019 +0900 ASoC: soc-core: merge snd_soc_register_dai() and soc_add_dai() We don't need to separete snd_soc_register_dai() and soc_add_dai() anymore. Let's merge these Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tv7hhkxm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0d18a7caa654ea1a0c02b3a253adfd5c10723871 Author: Kuninori Morimoto Date: Wed Nov 6 10:07:07 2019 +0900 ASoC: soc-core: remove soc_is_dai_link_bound() Because complex separeted "card pre-listed component" and "topology added component" duplicated operation is now becoming simple, we don't need to check already bound dai_link which is not exist anymore. This patch removes soc_is_dai_link_bound(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v9rxhkxw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1ec13abac58b6f24e32f0d3081ef4e7456e62ed8 Author: Oliver Neukum Date: Tue Nov 12 16:49:39 2019 +0100 USBIP: add config dependency for SGL_ALLOC USBIP uses lib/scatterlist.h Hence it needs to set CONFIG_SGL_ALLOC Signed-off-by: Oliver Neukum Cc: stable Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20191112154939.21217-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 8f157d4ff039e03e2ed4cb602eeed2fd4687a58f Author: Pawel Harlozinski Date: Tue Nov 12 14:02:36 2019 +0100 ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report Check for existance of jack before tracing. NULL pointer dereference has been reported by KASAN while unloading machine driver (snd_soc_cnl_rt274). Signed-off-by: Pawel Harlozinski Link: https://lore.kernel.org/r/20191112130237.10141-1-pawel.harlozinski@linux.intel.com Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 1b4efdaf6d6053c8944cee0edba0969dc1be7d4b Author: Dragos Tarcatu Date: Mon Nov 11 16:20:38 2019 -0600 ASoC: SOF: topology: free kcontrol memory on error The volume and bytes kcontrols are currently not freeing their memory on initialization failures. When an error occurs, all the widgets loaded so far are unloaded via sof_widget_unload(). But this only happens for the widgets that got successfully loaded. Fix that by kfree()-ing the allocated memory on load error. Fixes: 311ce4fe7637d ("ASoC: SOF: Add support for loading topologies") Reviewed-by: Paul Olaru Reviewed-by: Ranjani Sridharan Signed-off-by: Dragos Tarcatu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111222039.19651-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fb7dd0a1ba8690527c2394c6c55f909aa87d8f44 Author: Christoph Hellwig Date: Tue Nov 12 16:34:23 2019 +0100 lockd: remove __KERNEL__ ifdefs Remove the __KERNEL__ ifdefs from the non-UAPI sunrpc headers, as those can't be included from user space programs. Signed-off-by: Christoph Hellwig Signed-off-by: J. Bruce Fields commit d05a0201969045f4c488f7cf1d024089949a68b6 Author: Christoph Hellwig Date: Tue Nov 12 16:34:22 2019 +0100 sunrpc: remove __KERNEL__ ifdefs Remove the __KERNEL__ ifdefs from the non-UAPI sunrpc headers, as those can't be included from user space programs. Signed-off-by: Christoph Hellwig Signed-off-by: J. Bruce Fields commit 14d3fe428be5d332b33a3ad04bcc818641c197a8 Author: Jonathan Corbet Date: Tue Nov 12 09:43:15 2019 -0700 Revert "Documentation: admin-guide: add earlycon documentation for RISC-V" This reverts commit 7f70ae564b807f81263326d641514c6dca88e5ef. Christoph H. notes that the information is redundant, and Paul W. agrees with reverting. Signed-off-by: Jonathan Corbet commit 743210386c0354a2f8ef3d697353c7d8477fa81d Author: Tejun Heo Date: Mon Nov 4 15:54:30 2019 -0800 cgroup: use cgrp->kn->id as the cgroup ID cgroup ID is currently allocated using a dedicated per-hierarchy idr and used internally and exposed through tracepoints and bpf. This is confusing because there are tracepoints and other interfaces which use the cgroupfs ino as IDs. The preceding changes made kn->id exposed as ino as 64bit ino on supported archs or ino+gen (low 32bits as ino, high gen). There's no reason for cgroup to use different IDs. The kernfs IDs are unique and userland can easily discover them and map them back to paths using standard file operations. This patch replaces cgroup IDs with kernfs IDs. * cgroup_id() is added and all cgroup ID users are converted to use it. * kernfs_node creation is moved to earlier during cgroup init so that cgroup_id() is available during init. * While at it, s/cgroup/cgrp/ in psi helpers for consistency. * Fallback ID value is changed to 1 to be consistent with root cgroup ID. Signed-off-by: Tejun Heo Reviewed-by: Greg Kroah-Hartman Cc: Namhyung Kim commit 40430452fd5da1509177ac597b394614cd3a121f Author: Tejun Heo Date: Mon Nov 4 15:54:30 2019 -0800 kernfs: use 64bit inos if ino_t is 64bit Each kernfs_node is identified with a 64bit ID. The low 32bit is exposed as ino and the high gen. While this already allows using inos as keys by looking up with wildcard generation number of 0, it's adding unnecessary complications for 64bit ino archs which can directly use kernfs_node IDs as inos to uniquely identify each cgroup instance. This patch exposes IDs directly as inos on 64bit ino archs. The conversion is mostly straight-forward. * 32bit ino archs behave the same as before. 64bit ino archs now use the whole 64bit ID as ino and the generation number is fixed at 1. * 64bit inos still use the same idr allocator which gurantees that the lower 32bits identify the current live instance uniquely and the high 32bits are incremented whenever the low bits wrap. As the upper 32bits are no longer used as gen and we don't wanna start ino allocation with 33rd bit set, the initial value for highbits allocation is changed to 0 on 64bit ino archs. * blktrace exposes two 32bit numbers - (INO,GEN) pair - to identify the issuing cgroup. Userland builds FILEID_INO32_GEN fids from these numbers to look up the cgroups. To remain compatible with the behavior, always output (LOW32,HIGH32) which will be constructed back to the original 64bit ID by __kernfs_fh_to_dentry(). Signed-off-by: Tejun Heo Reviewed-by: Greg Kroah-Hartman Cc: Namhyung Kim commit 33c5ac9175195c36a0b7005aaf503a2e81f117a1 Author: Tejun Heo Date: Mon Nov 4 15:54:30 2019 -0800 kernfs: implement custom exportfs ops and fid type The current kernfs exportfs implementation uses the generic_fh_*() helpers and FILEID_INO32_GEN[_PARENT] which limits ino to 32bits. Let's implement custom exportfs operations and fid type to remove the restriction. * FILEID_KERNFS is a single u64 value whose content is kernfs_node->id. This is the only native fid type. * For backward compatibility with blk_log_action() path which exposes (ino,gen) pairs which userland assembles into FILEID_INO32_GEN keys, combine the generic keys into 64bit IDs in the same order. Signed-off-by: Tejun Heo Reviewed-by: Greg Kroah-Hartman Cc: Namhyung Kim commit fe0f726c9fb626b1092a9ea3bf75f57f2eed676e Author: Tejun Heo Date: Mon Nov 4 15:54:30 2019 -0800 kernfs: combine ino/id lookup functions into kernfs_find_and_get_node_by_id() kernfs_find_and_get_node_by_ino() looks the kernfs_node matching the specified ino. On top of that, kernfs_get_node_by_id() and kernfs_fh_get_inode() implement full ID matching by testing the rest of ID. On surface, confusingly, the two are slightly different in that the latter uses 0 gen as wildcard while the former doesn't - does it mean that the latter can't uniquely identify inodes w/ 0 gen? In practice, this is a distinction without a difference because generation number starts at 1. There are no actual IDs with 0 gen, so it can always safely used as wildcard. Let's simplify the code by renaming kernfs_find_and_get_node_by_ino() to kernfs_find_and_get_node_by_id(), moving all lookup logics into it, and removing now unnecessary kernfs_get_node_by_id(). Signed-off-by: Tejun Heo Reviewed-by: Greg Kroah-Hartman commit 67c0496e87d193b8356d2af49ab95e8a1b954b3c Author: Tejun Heo Date: Mon Nov 4 15:54:30 2019 -0800 kernfs: convert kernfs_node->id from union kernfs_node_id to u64 kernfs_node->id is currently a union kernfs_node_id which represents either a 32bit (ino, gen) pair or u64 value. I can't see much value in the usage of the union - all that's needed is a 64bit ID which the current code is already limited to. Using a union makes the code unnecessarily complicated and prevents using 64bit ino without adding practical benefits. This patch drops union kernfs_node_id and makes kernfs_node->id a u64. ino is stored in the lower 32bits and gen upper. Accessors - kernfs[_id]_ino() and kernfs[_id]_gen() - are added to retrieve the ino and gen. This simplifies ID handling less cumbersome and will allow using 64bit inos on supported archs. This patch doesn't make any functional changes. Signed-off-by: Tejun Heo Reviewed-by: Greg Kroah-Hartman Cc: Namhyung Kim Cc: Jens Axboe Cc: Alexei Starovoitov commit 880df131617393252f1fff701ed5b7b6d14c52c4 Author: Tejun Heo Date: Mon Nov 4 15:54:29 2019 -0800 kernfs: kernfs_find_and_get_node_by_ino() should only look up activated nodes kernfs node can be created in two separate steps - allocation and activation. This is used to make kernfs nodes visible only after the internal states attached to the node are fully initialized. kernfs_find_and_get_node_by_id() currently allows lookups of nodes which aren't activated yet and thus can expose nodes are which are still being prepped by kernfs users. Fix it by disallowing lookups of nodes which aren't activated yet. kernfs_find_and_get_node_by_ino() Signed-off-by: Tejun Heo Reviewed-by: Greg Kroah-Hartman Cc: Namhyung Kim commit b680b08171ebf890a4ebb7f82ada9959f4534ade Author: Tejun Heo Date: Mon Nov 4 15:54:29 2019 -0800 kernfs: use dumber locking for kernfs_find_and_get_node_by_ino() kernfs_find_and_get_node_by_ino() uses RCU protection. It's currently a bit buggy because it can look up a node which hasn't been activated yet and thus may end up exposing a node that the kernfs user is still prepping. While it can be fixed by pushing it further in the current direction, it's already complicated and isn't clear whether the complexity is justified. The main use of kernfs_find_and_get_node_by_ino() is for exportfs operations. They aren't super hot and all the follow-up operations (e.g. mapping to path) use normal locking anyway. Let's switch to a dumber locking scheme and protect the lookup with kernfs_idr_lock. Signed-off-by: Tejun Heo Reviewed-by: Greg Kroah-Hartman Cc: Namhyung Kim commit db53c73a8b5db120cb741d7d932cdf831a576e8f Author: Tejun Heo Date: Mon Nov 4 15:54:29 2019 -0800 netprio: use css ID instead of cgroup ID netprio uses cgroup ID to index the priority mapping table. This is currently okay as cgroup IDs are allocated using idr and packed. However, cgroup IDs will be changed to use full 64bit range and won't be packed making this impractical. netprio doesn't care what type of IDs it uses as long as they can identify the controller instances and are packed. Let's switch to css IDs instead of cgroup IDs. Signed-off-by: Tejun Heo Acked-by: Neil Horman Reviewed-by: Greg Kroah-Hartman Cc: "David S. Miller" Cc: Namhyung Kim commit f05499a06fb4348b935dd2ffc2c86a76705486be Author: Tejun Heo Date: Mon Nov 4 15:54:29 2019 -0800 writeback: use ino_t for inodes in tracepoints Writeback TPs currently use mix of 32 and 64bits for inos. This isn't currently broken because only cgroup inos are using 32bits and they're limited to 32bits. cgroup inos will make use of 64bits. Let's uniformly use ino_t. While at it, switch the default cgroup ino value used when cgroup is disabled to 1 instead of -1U as root cgroup always uses ino 1. Signed-off-by: Tejun Heo Reviewed-by: Jan Kara Reviewed-by: Greg Kroah-Hartman Cc: Jens Axboe Cc: Namhyung Kim commit e23f568aa63f64cd6b355094224cc9356c0f696b Author: Tejun Heo Date: Mon Nov 4 15:54:29 2019 -0800 kernfs: fix ino wrap-around detection When the 32bit ino wraps around, kernfs increments the generation number to distinguish reused ino instances. The wrap-around detection tests whether the allocated ino is lower than what the cursor but the cursor is pointing to the next ino to allocate so the condition never triggers. Fix it by remembering the last ino and comparing against that. Signed-off-by: Tejun Heo Reviewed-by: Greg Kroah-Hartman Fixes: 4a3ef68acacf ("kernfs: implement i_generation") Cc: Namhyung Kim Cc: stable@vger.kernel.org # v4.14+ commit 9b3a713feef8db41d4bcccb3b97e86ee906690c8 Merge: 4e7120d79edb da6b05dce2a9 1289f7f15001 5b47748ecf2e c90ae4a63541 96d3ab802e49 34d1b0895dbd 3c124435e8dd 6c3a44ed3c55 c1c8058dfb98 808be0aae53a Author: Joerg Roedel Date: Tue Nov 12 17:11:25 2019 +0100 Merge branches 'iommu/fixes', 'arm/qcom', 'arm/renesas', 'arm/rockchip', 'arm/mediatek', 'arm/tegra', 'arm/smmu', 'x86/amd', 'x86/vt-d', 'virtio' and 'core' into next commit 5b47748ecf2e3b7e346d6ce136e1c57239f995b0 Author: Robin Murphy Date: Mon Nov 11 18:55:18 2019 +0000 iommu/rockchip: Don't provoke WARN for harmless IRQs Although we don't generally expect IRQs to fire for a suspended IOMMU, there are certain situations (particularly with debug options) where we might legitimately end up with the pm_runtime_get_if_in_use() call from rk_iommu_irq() returning 0. Since this doesn't represent an actual error, follow the other parts of the driver and save the WARN_ON() condition for a genuine negative value. Even if we do have spurious IRQs due to a wedged VOP asserting the shared line, it's not this driver's job to try to second-guess the IRQ core to warn about that. Reported-by: Vasily Khoruzhick Signed-off-by: Robin Murphy Acked-by: Marc Zyngier Signed-off-by: Joerg Roedel commit 4a9acb6de0f260ff54d45e163fdd1cb17a01beed Author: Tom Lendacky Date: Mon Nov 11 13:34:37 2019 -0600 Documentation/process: Add AMD contact for embargoed hardware issues Add myself as the AMD ambassador to the embargoed hardware issues document. Signed-off-by: Tom Lendacky Signed-off-by: Jonathan Corbet commit d671fa6393d6788fc65555d4643b71cb3a361f36 Author: Hewenliang Date: Mon Nov 11 21:16:55 2019 -0500 kselftests: cgroup: Avoid the reuse of fd after it is deallocated It is necessary to set fd to -1 when inotify_add_watch() fails in cg_prepare_for_wait. Otherwise the fd which has been closed in cg_prepare_for_wait may be misused in other functions such as cg_enter_and_wait_for_frozen and cg_freeze_wait. Fixes: 5313bfe425c8 ("selftests: cgroup: add freezer controller self-tests") Signed-off-by: Hewenliang Signed-off-by: Tejun Heo commit adce1183932265e94bbaf92138b9c98d1c5359b9 Author: Thierry Reding Date: Fri Nov 8 16:33:53 2019 +0100 gpio: tegra186: Add debounce support The GPIO controller found on Tegra186 and later supports debouncing for inputs for up to 255 ms. Signed-off-by: Thierry Reding Signed-off-by: Bartosz Golaszewski commit 22635ed8a20d47ae3a590171aee90ccecfb62241 Author: Thierry Reding Date: Fri Nov 8 16:33:52 2019 +0100 gpio: tegra186: Program interrupt route mapping The controls for the GG port on Tegra194 resides in the power partition of the C5 PCIe controller and its interrupt route mapping can therefore not be programmed by early boot firmware along with that of the other ports. Detect this generically by looking at which controls have already been locked down using the security registers and fill in default values for controls that are unlocked. Signed-off-by: Thierry Reding Signed-off-by: Bartosz Golaszewski commit 13a62a56aa4cdab94e696bc0a3e4fb6dc4200b0f Author: Thierry Reding Date: Fri Nov 8 16:33:51 2019 +0100 gpio: tegra186: Derive register offsets from bank/port The register offsets for a given bank and port can be easily derived from the bank and port indices. Update the port descriptors to list only the bank and port numbers to simplify this. Signed-off-by: Thierry Reding Signed-off-by: Bartosz Golaszewski commit e588bb1eae31be73fbec2b731be986a7c09635a4 Author: Kent Gibson Date: Tue Nov 5 10:04:29 2019 +0800 gpio: add new SET_CONFIG ioctl() to gpio chardev Add the GPIOHANDLE_SET_CONFIG_IOCTL to the gpio chardev. The ioctl allows some of the configuration of a requested handle to be changed without having to release the line. The primary use case is the changing of direction for bi-directional lines. Based on initial work by Bartosz Golaszewski Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit b043ed7ef0b358d7f32dc57c218f925fd2802aba Author: Kent Gibson Date: Tue Nov 5 10:04:28 2019 +0800 gpiolib: move validation of line handle flags into helper function Move validation of line handle flags into helper function. This reduces the size and complexity of linehandle_create and allows the validation to be reused elsewhere. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 64e7112ee307834680eed578fdc0cfee63263fa7 Author: Kent Gibson Date: Tue Nov 5 10:04:27 2019 +0800 gpio: mockup: add set_config to support pull up/down Add support for the pull up/down state set via gpiolib line requests to be reflected in the state of the mockup. Use case is for testing of the GPIO uAPI, specifically the pull up/down flags. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 2821ae5f3033fb4140855ffd728c28fb42ba2bb9 Author: Kent Gibson Date: Tue Nov 5 10:04:26 2019 +0800 gpiolib: add support for biasing output lines Allow pull up/down bias to be set on output lines. Use case is for open source or open drain applications where internal pull up/down may conflict with external biasing. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 2148ad7790ea4f1f0081e6404fbb776bdbc793bb Author: Kent Gibson Date: Tue Nov 5 10:04:25 2019 +0800 gpiolib: add support for disabling line bias Allow pull up/down bias to be disabled, allowing the line to float or to be biased only by external circuitry. Use case is for where the bias has been applied previously, either by default or by the user, but that setting may conflict with the current use of the line. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 7b479a8448c2e5ced36ca6a2d03178b920298ee5 Author: Kent Gibson Date: Tue Nov 5 10:04:24 2019 +0800 gpiolib: add support for pull up/down to lineevent_create Add support for pull up/down to lineevent_create. Use cases include receiving asynchronous presses from a push button without an external pull up/down. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 9225d5169d110734099a82c39c073a11e399cb3f Author: Drew Fustini Date: Tue Nov 5 10:04:23 2019 +0800 gpio: expose pull-up/pull-down line flags to userspace Add pull-up/pull-down flags to the gpio line get and set ioctl() calls. Use cases include a push button that does not have an external resistor. Addition use cases described by Limor Fried (ladyada) of Adafruit in this PR for Adafruit_Blinka Python lib: https://github.com/adafruit/Adafruit_Blinka/pull/59 Signed-off-by: Drew Fustini [Kent: added BIAS to GPIO flag names and restrict application to input lines] Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit f932a68695e4c7d92e721d2c23580d9f35494662 Author: Geert Uytterhoeven Date: Thu Oct 24 14:22:24 2019 +0200 gpio: rcar: Use proper irq_chip name The irq_chip .name field should contain the device's class name, not the instance's name. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit b74f0456c120289b026701f849e0fd7de56fd2d7 Author: Geert Uytterhoeven Date: Thu Oct 24 14:22:23 2019 +0200 gpio: em: Use proper irq_chip name The irq_chip .name field should contain the device's class name, not the instance's name. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit bd84f2881a8d4c720bb4acaab371578f4f96b3de Author: Matti Vaittinen Date: Wed Oct 23 15:21:50 2019 +0300 gpio: bd70528: Add MODULE ALIAS to autoload module The bd70528 GPIO driver is probed by MFD driver. Add MODULE_ALIAS in order to allow udev to load the module when MFD sub-device cell for GPIO is added. Signed-off-by: Matti Vaittinen Signed-off-by: Bartosz Golaszewski commit a6e191963f3b367c769d5231e0f3870ed981c6c4 Merge: 5be85ec0de84 b52517e456f8 Author: Bartosz Golaszewski Date: Tue Nov 12 16:30:17 2019 +0100 Merge remote-tracking branch 'driver-core/driver-core-next' into gpio/for-next commit 1cb0d2aee26335d0bccf29100c7bed00ebece851 Author: Candle Sun Date: Tue Oct 22 22:21:39 2019 +0800 HID: core: check whether Usage Page item is after Usage ID items Upstream commit 58e75155009c ("HID: core: move Usage Page concatenation to Main item") adds support for Usage Page item after Usage ID items (such as keyboards manufactured by Primax). Usage Page concatenation in Main item works well for following report descriptor patterns: USAGE_PAGE (Keyboard) 05 07 USAGE_MINIMUM (Keyboard LeftControl) 19 E0 USAGE_MAXIMUM (Keyboard Right GUI) 29 E7 LOGICAL_MINIMUM (0) 15 00 LOGICAL_MAXIMUM (1) 25 01 REPORT_SIZE (1) 75 01 REPORT_COUNT (8) 95 08 INPUT (Data,Var,Abs) 81 02 ------------- USAGE_MINIMUM (Keyboard LeftControl) 19 E0 USAGE_MAXIMUM (Keyboard Right GUI) 29 E7 LOGICAL_MINIMUM (0) 15 00 LOGICAL_MAXIMUM (1) 25 01 REPORT_SIZE (1) 75 01 REPORT_COUNT (8) 95 08 USAGE_PAGE (Keyboard) 05 07 INPUT (Data,Var,Abs) 81 02 But it makes the parser act wrong for the following report descriptor pattern(such as some Gamepads): USAGE_PAGE (Button) 05 09 USAGE (Button 1) 09 01 USAGE (Button 2) 09 02 USAGE (Button 4) 09 04 USAGE (Button 5) 09 05 USAGE (Button 7) 09 07 USAGE (Button 8) 09 08 USAGE (Button 14) 09 0E USAGE (Button 15) 09 0F USAGE (Button 13) 09 0D USAGE_PAGE (Consumer Devices) 05 0C USAGE (Back) 0a 24 02 USAGE (HomePage) 0a 23 02 LOGICAL_MINIMUM (0) 15 00 LOGICAL_MAXIMUM (1) 25 01 REPORT_SIZE (1) 75 01 REPORT_COUNT (11) 95 0B INPUT (Data,Var,Abs) 81 02 With Usage Page concatenation in Main item, parser recognizes all the 11 Usages as consumer keys, it is not the HID device's real intention. This patch checks whether Usage Page is really defined after Usage ID items by comparing usage page using status. Usage Page concatenation on currently defined Usage Page will always do in local parsing when Usage ID items encountered. When Main item is parsing, concatenation will do again with last defined Usage Page if this page has not been used in the previous usages concatenation. Signed-off-by: Candle Sun Signed-off-by: Nianfu Bai Benjamin Tissoires Signed-off-by: Jiri Kosina commit b3c72fc9a78e74161f9d05ef7191706060628f8c Author: Daniel Kiper Date: Tue Nov 12 14:46:40 2019 +0100 x86/boot: Introduce setup_indirect The setup_data is a bit awkward to use for extremely large data objects, both because the setup_data header has to be adjacent to the data object and because it has a 32-bit length field. However, it is important that intermediate stages of the boot process have a way to identify which chunks of memory are occupied by kernel data. Thus introduce an uniform way to specify such indirect data as setup_indirect struct and SETUP_INDIRECT type. And finally bump setup_header version in arch/x86/boot/header.S. Suggested-by: H. Peter Anvin (Intel) Signed-off-by: Daniel Kiper Signed-off-by: Borislav Petkov Reviewed-by: Ross Philipson Reviewed-by: H. Peter Anvin (Intel) Acked-by: Konrad Rzeszutek Wilk Cc: Andy Lutomirski Cc: ard.biesheuvel@linaro.org Cc: Boris Ostrovsky Cc: dave.hansen@linux.intel.com Cc: eric.snowberg@oracle.com Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Juergen Gross Cc: kanth.ghatraju@oracle.com Cc: linux-doc@vger.kernel.org Cc: linux-efi Cc: Peter Zijlstra Cc: rdunlap@infradead.org Cc: ross.philipson@oracle.com Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191112134640.16035-4-daniel.kiper@oracle.com commit 00cd1c154d565c62ad5e065bf3530f68bdf59490 Author: Daniel Kiper Date: Tue Nov 12 14:46:39 2019 +0100 x86/boot: Introduce kernel_info.setup_type_max This field contains maximal allowed type for setup_data. Do not bump setup_header version in arch/x86/boot/header.S because it will be followed by additional changes coming into the Linux/x86 boot protocol. Suggested-by: H. Peter Anvin (Intel) Signed-off-by: Daniel Kiper Signed-off-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Ross Philipson Reviewed-by: H. Peter Anvin (Intel) Cc: Andy Lutomirski Cc: ard.biesheuvel@linaro.org Cc: Boris Ostrovsky Cc: dave.hansen@linux.intel.com Cc: eric.snowberg@oracle.com Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Juergen Gross Cc: kanth.ghatraju@oracle.com Cc: linux-doc@vger.kernel.org Cc: linux-efi Cc: Peter Zijlstra Cc: rdunlap@infradead.org Cc: ross.philipson@oracle.com Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191112134640.16035-3-daniel.kiper@oracle.com commit 3bbc53f4ae1686b501d92d4a5fd400f4958c8a98 Author: Sebastian Andrzej Siewior Date: Thu Nov 7 10:19:24 2019 +0100 hrtimer: Remove the comment about not used HRTIMER_SOFTIRQ The softirq `HRTIMER_SOFTIRQ' was not used since commit c6eb3f70d448 ("hrtimer: Get rid of hrtimer softirq"). But it got used again, beginning with commit 5da70160462e ("hrtimer: Implement support for softirq based hrtimers"), which did not remove the comment. Remove it now. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20191107091924.13410-1-bigeasy@linutronix.de commit 2c33c27fd6033ced942c9a591b8ac15c07c57d70 Author: Daniel Kiper Date: Tue Nov 12 14:46:38 2019 +0100 x86/boot: Introduce kernel_info The relationships between the headers are analogous to the various data sections: setup_header = .data boot_params/setup_data = .bss What is missing from the above list? That's right: kernel_info = .rodata We have been (ab)using .data for things that could go into .rodata or .bss for a long time, for lack of alternatives and -- especially early on -- inertia. Also, the BIOS stub is responsible for creating boot_params, so it isn't available to a BIOS-based loader (setup_data is, though). setup_header is permanently limited to 144 bytes due to the reach of the 2-byte jump field, which doubles as a length field for the structure, combined with the size of the "hole" in struct boot_params that a protected-mode loader or the BIOS stub has to copy it into. It is currently 119 bytes long, which leaves us with 25 very precious bytes. This isn't something that can be fixed without revising the boot protocol entirely, breaking backwards compatibility. boot_params proper is limited to 4096 bytes, but can be arbitrarily extended by adding setup_data entries. It cannot be used to communicate properties of the kernel image, because it is .bss and has no image-provided content. kernel_info solves this by providing an extensible place for information about the kernel image. It is readonly, because the kernel cannot rely on a bootloader copying its contents anywhere, but that is OK; if it becomes necessary it can still contain data items that an enabled bootloader would be expected to copy into a setup_data chunk. Do not bump setup_header version in arch/x86/boot/header.S because it will be followed by additional changes coming into the Linux/x86 boot protocol. Suggested-by: H. Peter Anvin (Intel) Signed-off-by: Daniel Kiper Signed-off-by: Borislav Petkov Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Ross Philipson Reviewed-by: H. Peter Anvin (Intel) Cc: Andy Lutomirski Cc: ard.biesheuvel@linaro.org Cc: Boris Ostrovsky Cc: dave.hansen@linux.intel.com Cc: eric.snowberg@oracle.com Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Juergen Gross Cc: kanth.ghatraju@oracle.com Cc: linux-doc@vger.kernel.org Cc: linux-efi Cc: Peter Zijlstra Cc: rdunlap@infradead.org Cc: ross.philipson@oracle.com Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191112134640.16035-2-daniel.kiper@oracle.com commit 960e432dfa5927892a9b170d14de874597b84849 Author: Jens Axboe Date: Tue Nov 12 07:56:39 2019 -0700 io_uring: use correct "is IO worker" helper Since we switched to io-wq, the dependent link optimization for when to pass back work inline has been broken. Fix this by providing a suitable io-wq helper for io_uring to use to detect when to do this. Fixes: 561fb04a6a22 ("io_uring: replace workqueue usage with io-wq") Signed-off-by: Jens Axboe commit f6656208f04e5b3804054008eba4bf7170f4c841 Author: Srinivas Pandruvada Date: Mon Nov 11 13:43:12 2019 -0800 x86/mce/therm_throt: Optimize notifications of thermal throttle Some modern systems have very tight thermal tolerances. Because of this they may cross thermal thresholds when running normal workloads (even during boot). The CPU hardware will react by limiting power/frequency and using duty cycles to bring the temperature back into normal range. Thus users may see a "critical" message about the "temperature above threshold" which is soon followed by "temperature/speed normal". These messages are rate-limited, but still may repeat every few minutes. This issue became worse starting with the Ivy Bridge generation of CPUs because they include a TCC activation offset in the MSR IA32_TEMPERATURE_TARGET. OEMs use this to provide alerts long before critical temperatures are reached. A test run on a laptop with Intel 8th Gen i5 core for two hours with a workload resulted in 20K+ thermal interrupts per CPU for core level and another 20K+ interrupts at package level. The kernel logs were full of throttling messages. The real value of these threshold interrupts, is to debug problems with the external cooling solutions and performance issues due to excessive throttling. So the solution here is the following: - In the current thermal_throttle folder, show: - the maximum time for one throttling event and, - the total amount of time the system was in throttling state. - Do not log short excursions. - Log only when, in spite of thermal throttling, the temperature is rising. On the high threshold interrupt trigger a delayed workqueue that monitors the threshold violation log bit (THERM_STATUS_PROCHOT_LOG). When the log bit is set, this workqueue callback calculates three point moving average and logs a warning message when the temperature trend is rising. When this log bit is clear and temperature is below threshold temperature, then the workqueue callback logs a "Normal" message. Once a high threshold event is logged, the logging is rate-limited. With this patch on the same test laptop, no warnings are printed in the logs as the max time the processor could bring the temperature under control is only 280 ms. This implementation is done with the inputs from Alan Cox and Tony Luck. [ bp: Touchups. ] Signed-off-by: Srinivas Pandruvada Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: bberg@redhat.com Cc: ckellner@redhat.com Cc: hdegoede@redhat.com Cc: Ingo Molnar Cc: linux-edac Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/20191111214312.81365-1-srinivas.pandruvada@linux.intel.com commit c311ed6183f4fd137bb8451ef77f4011c225ddaf Author: Rahul Tanwar Date: Thu Oct 10 17:28:56 2019 +0800 x86/init: Allow DT configured systems to disable RTC at boot time Systems which do not support RTC run into boot problems as the kernel assumes the availability of the RTC by default. On device tree configured systems the availability of the RTC can be detected by querying the corresponding device tree node. Implement a wallclock init function to query the device tree and disable RTC if the RTC is marked as not available in the corresponding node. [ tglx: Rewrote changelog and comments. Added proper __init(const) annotations. ] Suggested-by: Andy Shevchenko Signed-off-by: Rahul Tanwar Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/b84d9152ce0c1c09896ff4987e691a0715cb02df.1570693058.git.rahul.tanwar@linux.intel.com commit 509526706e68e4fb47519f02f78b48c818869d4e Author: Takashi Iwai Date: Tue Nov 12 15:32:43 2019 +0100 ALSA: au88x0: Fix incorrect device pointer for preallocation The code change in commit 6974f8ad4494 ("ALSA: pci: Avoid non-standard macro usage") contained an incorrect conversion, which left the invalid pointer passed to the allocator for au88x0 driver. Fix it. Fixes: 6974f8ad4494 ("ALSA: pci: Avoid non-standard macro usage") Link: https://lore.kernel.org/r/20191112143243.22216-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 19ebc050e48c3ae05b9c854001c0893127d118d6 Author: Andreas Gruenbacher Date: Wed Aug 28 22:21:34 2019 +0200 gfs2: Remove active journal side effect from gfs2_write_log_header Function gfs2_write_log_header can be used to write a log header into any of the journals of a filesystem. When used on the node's own journal, gfs2_write_log_header advances the current position in the log (sdp->sd_log_flush_head) as a side effect, through function gfs2_log_bmap. This is confusing, and it also means that we can't use gfs2_log_bmap for other journals even if they have an extent map. So clean this mess up by not advancing sdp->sd_log_flush_head in gfs2_write_log_header or gfs2_log_bmap anymore and making that a responsibility of the callers instead. This is related to commit 7c70b896951c ("gfs2: clean_journal improperly set sd_log_flush_head"). Signed-off-by: Andreas Gruenbacher commit c745da8d4320c49e54662c0a8f7cb6b8204f44c4 Author: Jon Hunter Date: Fri Oct 11 09:34:59 2019 +0100 mailbox: tegra: Fix superfluous IRQ error message Commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") added an error message to avoid drivers having to print an error message when IRQ lookup fails. However, there are some cases where IRQs are optional and so new optional versions of the platform_get_irq*() APIs have been added for these cases. The IRQs for Tegra HSP module are optional because not all instances of the module have the doorbell and all of the shared interrupts. Hence, since the above commit was applied the following error messages are now seen on Tegra194 ... ERR KERN tegra-hsp c150000.hsp: IRQ doorbell not found ERR KERN tegra-hsp c150000.hsp: IRQ shared0 not found The Tegra HSP driver deliberately does not fail if these are not found and so fix the above errors by updating the Tegra HSP driver to use the platform_get_irq_byname_optional() API. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20191011083459.11551-1-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 8220e22d11a05049aab9693839ab82e5e177ccde Author: Nayna Jain Date: Sun Nov 10 21:10:36 2019 -0600 powerpc: Load firmware trusted keys/hashes into kernel keyring The keys used to verify the Host OS kernel are managed by firmware as secure variables. This patch loads the verification keys into the .platform keyring and revocation hashes into .blacklist keyring. This enables verification and loading of the kernels signed by the boot time keys which are trusted by firmware. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Signed-off-by: Eric Richter [mpe: Search by compatible in load_powerpc_certs(), not using format] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573441836-3632-5-git-send-email-nayna@linux.ibm.com commit ad723674d6758478829ee766e3f1a2a24d56236f Author: Nayna Jain Date: Sun Nov 10 21:10:35 2019 -0600 x86/efi: move common keyring handler functions to new file The handlers to add the keys to the .platform keyring and blacklisted hashes to the .blacklist keyring is common for both the uefi and powerpc mechanisms of loading the keys/hashes from the firmware. This patch moves the common code from load_uefi.c to keyring_handler.c Signed-off-by: Nayna Jain Acked-by: Mimi Zohar Signed-off-by: Eric Richter Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573441836-3632-4-git-send-email-nayna@linux.ibm.com commit bd5d9c743d38f67d64ea1b512a461f6b5a5f6bec Author: Nayna Jain Date: Sun Nov 10 21:10:34 2019 -0600 powerpc: expose secure variables to userspace via sysfs PowerNV secure variables, which store the keys used for OS kernel verification, are managed by the firmware. These secure variables need to be accessed by the userspace for addition/deletion of the certificates. This patch adds the sysfs interface to expose secure variables for PowerNV secureboot. The users shall use this interface for manipulating the keys stored in the secure variables. Signed-off-by: Nayna Jain Reviewed-by: Greg Kroah-Hartman Signed-off-by: Eric Richter Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573441836-3632-3-git-send-email-nayna@linux.ibm.com commit 9155e2341aa8b5df057dc1c77633b33d1a4f17d2 Author: Nayna Jain Date: Sun Nov 10 21:10:33 2019 -0600 powerpc/powernv: Add OPAL API interface to access secure variable The X.509 certificates trusted by the platform and required to secure boot the OS kernel are wrapped in secure variables, which are controlled by OPAL. This patch adds firmware/kernel interface to read and write OPAL secure variables based on the unique key. This support can be enabled using CONFIG_OPAL_SECVAR. Signed-off-by: Claudio Carvalho Signed-off-by: Nayna Jain Signed-off-by: Eric Richter [mpe: Make secvar_ops __ro_after_init, only build opal-secvar.c if PPC_SECURE_BOOT=y] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573441836-3632-2-git-send-email-nayna@linux.ibm.com commit 39a963b457b5c6cbbdc70441c9d496e39d151582 Author: Nayna Jain Date: Tue Oct 1 19:37:18 2019 -0400 sysfs: Fixes __BIN_ATTR_WO() macro This patch fixes the size and write parameter for the macro __BIN_ATTR_WO(). Fixes: 7f905761e15a8 ("sysfs: add BIN_ATTR_WO() macro") Signed-off-by: Nayna Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1569973038-2710-1-git-send-email-nayna@linux.ibm.com commit 26b1959f85afad2215c7ba42cf830ed469644382 Merge: da0c9ea146cb d72ea4915c7e Author: Michael Ellerman Date: Wed Nov 13 00:32:03 2019 +1100 Merge branch 'topic/ima' into topic/secureboot From Nayna's cover letter: The IMA subsystem supports custom, built-in, arch-specific policies to define the files to be measured and appraised. These policies are honored based on priority, where arch-specific policy is the highest and custom is the lowest. PowerNV systems use a Linux-based bootloader to kexec the OS. The bootloader kernel relies on IMA for signature verification of the OS kernel before doing the kexec. This patchset adds support for powerpc arch-specific IMA policies that are conditionally defined based on a system's secure boot and trusted boot states. The OS secure boot and trusted boot states are determined via device-tree properties. The verification needs to be performed only for binaries that are not blacklisted. The kernel currently only checks against the blacklist of keys. However, doing so results in blacklisting all the binaries that are signed by the same key. In order to prevent just one particular binary from being loaded, it must be checked against a blacklist of binary hashes. This patchset also adds support to IMA for checking against a hash blacklist for files. signed by appended signature. commit 5e35d5f4224adb24c2bfa814b9fb562050aba3ea Author: Keyon Jie Date: Mon Nov 11 16:33:43 2019 -0600 ASoC: SOF: PM: only suspend to D0I3 when needed We should suspend audio to D3 by default, for the sake of power saving, change the condition of D0I3 suspending here to that when there is stream with suspend_ignored specified. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111223343.19986-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a77e5d573f847d2f984c38eb711351326bc55258 Author: Keyon Jie Date: Mon Nov 11 16:33:42 2019 -0600 ASoC: SOF: add helper to check if we should enter d0i3 suspend Add helper to check if the DSP should be put in D0i3. This function returns true if a stream has ignored the SUSPEND trigger to keep the pipelines running in the DSP. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111223343.19986-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 58a972efd21bb5adadd97f2546693ec64bfc99b9 Author: Keyon Jie Date: Mon Nov 11 16:33:41 2019 -0600 ASoC: SOF: PM: add check before setting d0_substate Add check before seeting d0_substate and return success if Audio DSP is already in the target substate. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111223343.19986-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 74b4dd04b19cc03e1cc369d9c371cf4206367df4 Author: Keyon Jie Date: Mon Nov 11 16:33:40 2019 -0600 ASoC: SOF: PM: add state machine to comments Add Audio DSP state machine with comments. Note that the 'D0<-->runtime D0I3' part is not implemented yet. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111223343.19986-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0af237d51a4e734db959a158185f79019f022f59 Author: Pierre-Louis Bossart Date: Mon Nov 11 16:29:01 2019 -0600 ASoC: SOF: Intel: hda: use fallback for firmware name We have platforms such as CFL with no known I2S codec being used, and the ACPI tables are currently empty, so fall-back to using the firmware filename used in nocodec mode Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111222901.19892-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1f24d93c4f4ec0bb0b73c5b020060aa2d9faa756 Author: Pierre-Louis Bossart Date: Mon Nov 11 16:28:59 2019 -0600 ASoC: Intel: acpi-match: split CNL tables in three Due to firmware manifest/signature differences, we have to use different firmware names, so split CNL machine table in three (CNL, CFL, CML). The CFL table is currently empty since all known platforms use HDaudio, but let's plan ahead. Reviewed-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111222901.19892-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 130d3e90777fe974e4b8fa100cec8faf19cac998 Author: Liam Girdwood Date: Mon Nov 11 16:29:00 2019 -0600 ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names. The manifest information is different between CNL, CML and CFL platforms hence we need to load different files. Signed-off-by: Liam Girdwood Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111222901.19892-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 24de63562b9da9fb3145329abb226ab623e6af19 Author: Bard liao Date: Mon Nov 11 16:21:52 2019 -0600 ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null jack_detect_work will be triggered by rt5682_irq. We should cancel it if hs_jack is set to null. Signed-off-by: Bard liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191111222152.19723-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8b57e7c852fc58a62e668a83c0fa8d9246131803 Author: Markus Elfring Date: Mon Nov 11 15:20:44 2019 +0100 s390/pkey: use memdup_user() to simplify code Generated by: scripts/coccinelle/api/memdup_user.cocci Link: http://lkml.kernel.org/r/aca044e8-e4b2-eda8-d724-b08772a44ed9@web.de [borntraeger@de.ibm.com: use ==0 instead of <=0 for a size_t variable] [heiko.carstens@de.ibm.com: split bugfix into separate patch; shorten changelog] Signed-off-by: Markus Elfring Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f9cac4fd8878929c6ebff0bd272317905d77c38a Author: Heiko Carstens Date: Tue Nov 12 09:19:26 2019 +0100 s390/pkey: fix memory leak within _copy_apqns_from_user() Fixes: f2bbc96e7cfad ("s390/pkey: add CCA AES cipher key support") Reported-by: Markus Elfring Reported-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4ff4ba153ab35710c81046b4a71b2eda0cc798f0 Merge: 544f1d62e3e6 8529888070f1 Author: Vasily Gorbik Date: Tue Nov 12 12:48:01 2019 +0100 Merge tag 'vfio-ccw-20191111' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features enhance tracing in vfio-ccw * tag 'vfio-ccw-20191111' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw: vfio-ccw: Rework the io_fctl trace vfio-ccw: Add a trace for asynchronous requests vfio-ccw: Trace the FSM jumptable vfio-ccw: Refactor how the traces are built Signed-off-by: Vasily Gorbik commit e1e9b78d3957a267346a86c8f2c433f6a332af65 Author: Ian Rogers Date: Fri Nov 8 23:58:40 2019 -0800 perf parse: Use YYABORT to clear stack after failure, plugging leaks Using return rather than YYABORT means that the stack isn't cleared up following a failure. The change to YYABORT means the return value is 1 rather than -1, but the callers just check for a result of 0 (success). Add missing free of a list when an error occurs in event_pmu. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191109075840.181231-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ccd26741f5e6bdf2c18ea38b32e6a347c5648a97 Author: Ravi Bangoria Date: Fri Nov 8 15:11:28 2019 +0530 perf tool: Provide an option to print perf_event_open args and return value Perf record with verbose=2 already prints this information along with whole lot of other traces which requires lot of scrolling. Introduce an option to print only perf_event_open() arguments and return value. Sample o/p: $ perf --debug perf-event-open=1 record -- ls > /dev/null ------------------------------------------------------------ perf_event_attr: size 112 { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|PERIOD read_format ID disabled 1 inherit 1 exclude_kernel 1 mmap 1 comm 1 freq 1 enable_on_exec 1 task 1 precise_ip 3 sample_id_all 1 exclude_guest 1 mmap2 1 comm_exec 1 ksymbol 1 bpf_event 1 ------------------------------------------------------------ sys_perf_event_open: pid 4308 cpu 0 group_fd -1 flags 0x8 = 4 sys_perf_event_open: pid 4308 cpu 1 group_fd -1 flags 0x8 = 5 sys_perf_event_open: pid 4308 cpu 2 group_fd -1 flags 0x8 = 6 sys_perf_event_open: pid 4308 cpu 3 group_fd -1 flags 0x8 = 8 sys_perf_event_open: pid 4308 cpu 4 group_fd -1 flags 0x8 = 9 sys_perf_event_open: pid 4308 cpu 5 group_fd -1 flags 0x8 = 10 sys_perf_event_open: pid 4308 cpu 6 group_fd -1 flags 0x8 = 11 sys_perf_event_open: pid 4308 cpu 7 group_fd -1 flags 0x8 = 12 ------------------------------------------------------------ perf_event_attr: type 1 size 112 config 0x9 watermark 1 sample_id_all 1 bpf_event 1 { wakeup_events, wakeup_watermark } 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 sys_perf_event_open failed, error -13 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.002 MB perf.data (9 samples) ] Committer notes: Just like the 'verbose' variable this new 'debug_peo_args' needs to be added to util/python.c, since we don't link the debug.o file in the python binding, which ended up making 'perf test python' fail with: # perf test -v python 18: 'import perf' in python : --- start --- test child forked, pid 19237 Traceback (most recent call last): File "", line 1, in ImportError: /tmp/build/perf/python/perf.so: undefined symbol: debug_peo_args test child finished with -1 ---- end ---- 'import perf' in python: FAILED! # After adding that new variable to util/python.c: # perf test -v python 18: 'import perf' in python : --- start --- test child forked, pid 22364 test child finished with 0 ---- end ---- 'import perf' in python: Ok # Signed-off-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191108094128.28769-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 7b018e298752b9bcaf34eba8e1d3c08e3207dfd8 Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 16:55:53 2019 -0300 perf map: Remove ->groups from 'struct map' With this 'struct map' uses a bit over 3 cachelines: $ pahole -C map ~/bin/perf /* --- cacheline 2 boundary (128 bytes) --- */ u64 (*unmap_ip)(struct map *, u64); /* 128 8 */ struct dso * dso; /* 136 8 */ refcount_t refcnt; /* 144 4 */ /* size: 152, cachelines: 3, members: 18 */ /* sum members: 145, holes: 1, sum holes: 3 */ /* padding: 4 */ /* forced alignments: 2 */ /* last cacheline: 24 bytes */ } __attribute__((__aligned__(8))); $ We probably can move map->map/unmap_ip() moved to 'struct map_groups', that will shave more 16 bytes, getting this almost to two cachelines. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ymlv3nzpofv2fugnjnizkrwy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3f662fc08dddebd7bab654eada1f3e7568959eef Author: Arnaldo Carvalho de Melo Date: Fri Nov 1 17:53:02 2019 -0300 perf map: Combine maps__fixup_overlappings with its only use In the process we can kill some of the struct map->groups usage, trying to get rid of this per-full struct map fields getting in the way of sharing a map across father/parent processes. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-e50eqtqw3za24vmbjnqmmcs6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 94e44b9ca52a72cddd07111a8beb12a2f217c6a2 Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 16:52:19 2019 -0300 perf annotate: Stop using map->groups, use map_symbol->mg instead These were the last uses of map->groups, next cset will nuke it. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-n3g0foos7l7uxq9nar0zo0vj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 08f6680e627edf913c6d6adb9bb9ecc9d57a408d Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 16:02:35 2019 -0300 perf tools: Add a 'struct map_groups' pointer to 'struct map_symbol' And fill it whenever we setup a a 'struct map_symbol', now we need to use it, next cset. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-fzwfcnddenz1o7uj1fzw3g46@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 93fcce96c71931f65c9bb1a0f2303008e6862c97 Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 16:25:11 2019 -0300 perf symbols: Use kmaps(map)->machine when we know its a kernel map And then stop using map->groups to achieve that. To test that that branch is being taken, probe the function that is only called from there and then run something like 'perf top' in another xterm: # perf probe -x ~/bin/perf machine__map_x86_64_entry_trampolines Added new event: probe_perf:machine__map_x86_64_entry_trampolines (on machine__map_x86_64_entry_trampolines in /home/acme/bin/perf) You can now use it in all perf tools, such as: perf record -e probe_perf:machine__map_x86_64_entry_trampolines -aR sleep 1 # perf trace -e probe_perf:* 0.000 bash/10614 probe_perf:machine__map_x86_64_entry_trampolines(__probe_ip: 5224944) ^C# Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-lgrrzdxo2p9liq2keivcg887@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d46a4cdf49937b0b3abeb2cd7fa5dc65795e7ea7 Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 15:57:38 2019 -0300 pref tools: Make 'struct addr_map_symbol' contain 'struct map_symbol' So that we pass that substructure around and with it consolidate lots of functions that receive a (map, symbol) pair and now can receive just a 'struct map_symbol' pointer. This further paves the way to add 'struct map_groups' to 'struct map_symbol' so that we can have all we need for annotation so that we can ditch 'struct map'->groups, i.e. have the map_groups pointer in a more central place, avoiding the pointer in the 'struct map' that have tons of instances. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-fs90ttd9q12l7989fo7pw81q@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5f0fef8ac3e7a5707751493293ba8ff2ffc0f8a4 Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 12:14:32 2019 -0300 perf callchain: Use 'struct map_symbol' in 'struct callchain_cursor_node' To ease passing around map+symbol, just like done for other parts of the tree recently. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit c1529738f5eb5fe7c472e0374ad7954d52566df9 Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 11:58:21 2019 -0300 perf unwind: Use 'struct map_symbol' in 'struct unwind_entry' To help in passing that info around to callchain routines that, for the same reason, are moving to use 'struct map_symbol'. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-epsiibeprpxa8qpwji47uskc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2975489458c59ce2e348b1b3aef5d8d2acb5cc8d Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 11:10:00 2019 -0300 perf annotate: Pass a 'map_symbol' in places receiving a pair of 'map' and 'symbol' pointers We are already passing things like: symbol__annotate(ms->sym, ms->map, ...) So shorten the signature of such functions to receive the 'map_symbol' pointer. This also paves the way to having the 'struct map_groups' pointer in the 'struct map_symbol' so that we can get rid of 'struct map'->groups. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-23yx8v1t41nzpkpi7rdrozww@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d3a022cbdce6f361b1effbff1eb18546690592c8 Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 09:59:48 2019 -0300 perf tools: Add map_groups to 'struct addr_location' From there we can get al->mg->machine, so replace that field with the more useful 'struct map_groups' that for now we're obtaining from al->map->groups, and that is one thing getting into the way of maps being fully shareable. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-4qdducrm32tgrjupcp0kjh1e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9d355b381b35be1ac4e77600d6b9b27c674c5d5f Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 10:14:05 2019 -0300 perf map_groups: Pass the object to map_groups__find_ams() We were just passing a map to look for and reuse its map->groups member, but the idea is that this is going away, as a map can be in multiple rb_trees when being reused via a map_node, so do as all the other map_groups methods and pass as its first arg the object being operated on. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-nmi2pbggqloogwl6vxrvex5a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f2baa060cd766f4e585339423891e0063179d702 Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 16:09:48 2019 -0300 perf symbols: Stop using map->groups, we can use kmaps instead To test that that function is being called I just added a probe on that place, enabled it via 'perf trace' asking for at most 16 levels of backtraces, system wide, and then ran 'perf top' on another xterm, voilà: # perf probe -x ~/bin/perf dso__process_kernel_symbol Added new event: probe_perf:dso__process_kernel_symbol (on dso__process_kernel_symbol in /home/acme/bin/perf) You can now use it in all perf tools, such as: perf record -e probe_perf:dso__process_kernel_symbol -aR sleep 1 # perf trace -e probe_perf:dso__process_kernel_symbol/max-stack=16/ --max-events=2 # perf trace -e probe_perf:dso__process_kernel_symbol/max-stack=16/ --max-events=2 0.000 :17345/17345 probe_perf:dso__process_kernel_symbol(__probe_ip: 5680224) dso__process_kernel_symbol (/home/acme/bin/perf) dso__load_vmlinux (/home/acme/bin/perf) dso__load_vmlinux_path (/home/acme/bin/perf) dso__load (/home/acme/bin/perf) map__load (/home/acme/bin/perf) thread__find_map (/home/acme/bin/perf) machine__resolve (/home/acme/bin/perf) deliver_event (/home/acme/bin/perf) __ordered_events__flush.part.0 (/home/acme/bin/perf) process_thread (/home/acme/bin/perf) start_thread (/usr/lib64/libpthread-2.29.so) 0.064 :17345/17345 probe_perf:dso__process_kernel_symbol(__probe_ip: 5680224) dso__process_kernel_symbol (/home/acme/bin/perf) dso__load_vmlinux (/home/acme/bin/perf) dso__load_vmlinux_path (/home/acme/bin/perf) dso__load (/home/acme/bin/perf) map__load (/home/acme/bin/perf) thread__find_map (/home/acme/bin/perf) machine__resolve (/home/acme/bin/perf) deliver_event (/home/acme/bin/perf) __ordered_events__flush.part.0 (/home/acme/bin/perf) process_thread (/home/acme/bin/perf) start_thread (/usr/lib64/libpthread-2.29.so) # # perf stat -e probe_perf:dso__process_kernel_symbol ^C Performance counter stats for 'system wide': 107,308 probe_perf:dso__process_kernel_symbol 8.215399813 seconds time elapsed # Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-5fy66x5hr5ct9pmw84jkiwvm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit de90d513b2464d28a17fc4eaada97f4ad742ba00 Author: Arnaldo Carvalho de Melo Date: Mon Nov 4 16:31:33 2019 -0300 perf map: Use map->dso->kernel + map__kmaps() in map__kmaps() Its equivalent to using map->groups to obtain the machine struct. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-bdbazuj4ggrmzxdviaqdrdwh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 17a810699c189cb8f2f0ba21c7f83396599bea26 Author: Adrian Reber Date: Tue Nov 12 10:58:51 2019 +0100 selftests: add tests for clone3() This adds tests for clone3() with different values and sizes of struct clone_args. This selftest was initially part of of the clone3() with PID selftest. After that patch was almost merged Eugene sent out a couple of patches to fix problems with these test. This commit now only contains the clone3() selftest after the LPC decision to rework clone3() with PID to allow setting the PID in multiple PID namespaces including all of Eugene's patches. Signed-off-by: Eugene Syromiatnikov Signed-off-by: Adrian Reber Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20191112095851.811884-1-areber@redhat.com Signed-off-by: Christian Brauner commit 56b2147f34d057b0898c53a3eb2e9e70756ab89f Merge: 8f05c1ff8bfb 7fa46cbf20d3 Author: Ingo Molnar Date: Tue Nov 12 12:06:08 2019 +0100 Merge tag 'perf-core-for-mingo-5.5-20191107' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf report: Jin Yao: - Introduce --total-cycles, for basic block profiling, further using data obtained from LBR, an example should suffice: # perf record -b ^C[ perf record: Woken up 595 times to write data ] [ perf record: Captured and wrote 156.672 MB perf.data (196873 samples) ] # perf evlist -v cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CPU|PERIOD|BRANCH_STACK, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1, branch_sample_type: ANY # perf report --total-cycles --stdio # To display the perf.data header info, please use --header/--header-only options. # # Total Lost Samples: 0 # # Samples: 6M of event 'cycles' # Event count (approx.): 6299936 # # Sampled Sampled Avg Avg # Cycles% Cycles Cycles% Cycles [Program Block Range] Shared Object # ....... ...... ....... ..... .................................... ................ # 2.17% 1.7M 0.08% 607 [compiler.h:199 -> common.c:221] [kernel.vmlinux] 0.72% 544.5K 0.03% 230 [entry_64.S:657 -> entry_64.S:662] [kernel.vmlinux] 0.56% 541.8K 0.09% 672 [compiler.h:199 -> common.c:300] [kernel.vmlinux] 0.39% 293.2K 0.01% 104 [list_debug.c:43 -> list_debug.c:61] [kernel.vmlinux] 0.36% 278.6K 0.03% 272 [entry_64.S:1289 -> entry_64.S:1308] [kernel.vmlinux] perf record: Adrian Hunter: - Allow storing perf.data in a directory together with a copy of /proc/kcore. Jiwei Sun: - Add support for limit perf output file size, i.e.: # perf record --all-cpus -F 10000 --max-size=4M sleep 10h [ perf record: perf size limit reached (4097 KB), stopping session ] [ perf record: Woken up 6 times to write data ] [ perf record: Captured and wrote 4.048 MB perf.data (54094 samples) ] Terminated # ls -lah perf.data -rw-------. 1 root root 4.1M Nov 7 15:27 perf.data # perf stat: Jiri Olsa: - Add --per-node agregation support: In live mode: # perf stat -a -I 1000 -e cycles --per-node # time node cpus counts unit events 1.000542550 N0 20 6,202,097 cycles 1.000542550 N1 20 639,559 cycles 2.002040063 N0 20 7,412,495 cycles 2.002040063 N1 20 2,185,577 cycles 3.003451699 N0 20 6,508,917 cycles 3.003451699 N1 20 765,607 cycles ... Or in the record/report stat session: # perf stat record -a -I 1000 -e cycles # time counts unit events 1.000536937 10,008,468 cycles 2.002090152 9,578,539 cycles 3.003625233 7,647,869 cycles 4.005135036 7,032,086 cycles ^C 4.340902364 3,923,893 cycles # perf stat report --per-node # time node cpus counts unit events 1.000536937 N0 20 9,355,086 cycles 1.000536937 N1 20 653,382 cycles 2.002090152 N0 20 7,712,838 cycles 2.002090152 N1 20 1,865,701 cycles ... perf probe: Masami Hiramatsu: Various fixes related to recent additions to the DWARF format: - Fix to find range-only function instance - Walk function lines in lexical blocks - Fix to show function entry line as probe-able - Fix wrong address verification - Fix to probe a function which has no entry pc - Fix to probe an inline function which has no entry pc - Fix to list probe event with correct line number - Fix to show inlined function callsite without entry_pc - Fix to show ranges of variables in functions without entry_pc - Return a better scope DIE if there is no best scope - Skip end-of-sequence and non statement lines - Filter out instances except for inlined subroutine and subprogram - Fix to show calling lines of inlined functions - Skip overlapped location on searching variables perf inject: Adrian Hunter: - Do not strip evsels with --strip, as they are needed for create_gcov (see the autofdo example in tools/perf/Documentation/intel-pt.txt). Intel PT: Adrian Hunter: - Intel PT uses an auxtrace_cache to store the results of code-walking, to avoid repeated decoding. Add an auxtrace_cache__remove to handle text poke events. core: Andi Kleen: - Always preserve errno while cleaning up perf_event_open failures. llvm: Arnaldo Carvalho de Melo: - No need to tell that the request for saving a .o file for BPF events, as expressed in ~/.perfconfig was satisfied, make that a debug message. perf vendor events: Intel: Haiyan Song: - Update CascadelakeX events to v1.05. - Update all the Intel JSON metrics from TMAM 3.6. Treewide: Ian Rogers: - Improve error paths, plugging leaks found using LLVM tools such as libFuzzer. jevents: Yunfeng Ye: - Fix resource leak in process_mapfile() and main() perf kvm: Igor Lubashev: - Use evlist layer api when possible. libsubcmd: James Clark: - Move EXTRA_FLAGS to the end to allow overriding existing flags. - Use -O0 with DEBUG=1 perf diff: Jin Yao: - Don't use hack to skip column length calculation CoreSight ETM: Leo yan: - Fix definition of macro TO_CS_QUEUE_NR ARM64: John Garry: - Do not try to include libelf header files when its feature detection failed, fixing the cross build for ARM64. perf tests: Leo Yan: - Fix out of bounds memory access in the backward ring buffer test. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 7c7e53e1c93df14690bd12c1f84730fef927a6f1 Author: Yoshihiro Shimoda Date: Tue Nov 5 19:51:29 2019 +0900 PCI: rcar: Fix missing MACCTLR register setting in initialization sequence The R-Car Gen2/3 manual - available at: https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz/rzg/rzg1m.html#documents "RZ/G Series User's Manual: Hardware" section strictly enforces the MACCTLR inizialization value - 39.3.1 - "Initial Setting of PCI Express": "Be sure to write the initial value (= H'80FF 0000) to MACCTLR before enabling PCIETCTLR.CFINIT". To avoid unexpected behavior and to match the SW initialization sequence guidelines, this patch programs the MACCTLR with the correct value. Note that the MACCTLR.SPCHG bit in the MACCTLR register description reports that "Only writing 1 is valid and writing 0 is invalid" but this "invalid" has to be interpreted as a write-ignore aka "ignored", not "prohibited". Reported-by: Eugeniu Rosca Fixes: c25da4778803 ("PCI: rcar: Add Renesas R-Car PCIe driver") Fixes: be20bbcb0a8c ("PCI: rcar: Add the initialization of PCIe link in resume_noirq()") Signed-off-by: Yoshihiro Shimoda Signed-off-by: Lorenzo Pieralisi Reviewed-by: Geert Uytterhoeven Cc: # v5.2+ commit 00929447f5758c4f64c74d0a4b40a6eb3d9df0e3 Author: YueHaibing Date: Mon Nov 11 20:23:59 2019 +0800 virtiofs: Fix old-style declaration There expect the 'static' keyword to come first in a declaration, and we get warnings like this with "make W=1": fs/fuse/virtio_fs.c:687:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] fs/fuse/virtio_fs.c:692:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] fs/fuse/virtio_fs.c:1029:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: YueHaibing Reviewed-by: Stefan Hajnoczi Signed-off-by: Miklos Szeredi commit c634da718db9b2fac201df2ae1b1b095344ce5eb Author: Miklos Szeredi Date: Tue Nov 12 11:49:04 2019 +0100 fuse: verify nlink When adding a new hard link, make sure that i_nlink doesn't overflow. Fixes: ac45d61357e8 ("fuse: fix nlink after unlink") Cc: # v3.4 Signed-off-by: Miklos Szeredi commit 8aab336b14c115c6bf1d4baeb9247e41ed9ce6de Author: Miklos Szeredi Date: Tue Nov 12 11:49:04 2019 +0100 fuse: verify write return Make sure filesystem is not returning a bogus number of bytes written. Fixes: ea9b9907b82a ("fuse: implement perform_write") Cc: # v2.6.26 Signed-off-by: Miklos Szeredi commit eb59bd17d2fa6e5e84fba61a5ebdea984222e6d5 Author: Miklos Szeredi Date: Tue Nov 12 11:49:04 2019 +0100 fuse: verify attributes If a filesystem returns negative inode sizes, future reads on the file were causing the cpu to spin on truncate_pagecache. Create a helper to validate the attributes. This now does two things: - check the file mode - check if the file size fits in i_size without overflowing Reported-by: Arijit Banerjee Fixes: d8a5ba45457e ("[PATCH] FUSE - core") Cc: # v2.6.14 Signed-off-by: Miklos Szeredi commit dce7cd62754b5d4a6e401b8b0769ec94cf971041 Author: Andrea Parri Date: Thu Oct 3 17:52:00 2019 +0200 x86/hyperv: Allow guests to enable InvariantTSC If the hardware supports TSC scaling, Hyper-V will set bit 15 of the HV_PARTITION_PRIVILEGE_MASK in guest VMs with a compatible Hyper-V configuration version. Bit 15 corresponds to the AccessTscInvariantControls privilege. If this privilege bit is set, guests can access the HvSyntheticInvariantTscControl MSR: guests can set bit 0 of this synthetic MSR to enable the InvariantTSC feature. After setting the synthetic MSR, CPUID will enumerate support for InvariantTSC. Signed-off-by: Andrea Parri Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Reviewed-by: Vitaly Kuznetsov Link: https://lkml.kernel.org/r/20191003155200.22022-1-parri.andrea@gmail.com commit b264f57fde0c686c5c1dfdd0c21992c49196bb87 Author: Vitaly Kuznetsov Date: Sun Oct 27 16:19:38 2019 +0100 x86/hyperv: Micro-optimize send_ipi_one() When sending an IPI to a single CPU there is no need to deal with cpumasks. With 2 CPU guest on WS2019 a minor (like 3%, 8043 -> 7761 CPU cycles) improvement with smp_call_function_single() loop benchmark can be seeb. The optimization, however, is tiny and straitforward. Also, send_ipi_one() is important for PV spinlock kick. Switching to the regular APIC IPI send for CPU > 64 case does not make sense as it is twice as expesive (12650 CPU cycles for __send_ipi_mask_ex() call, 26000 for orig_apic.send_IPI(cpu, vector)). Signed-off-by: Vitaly Kuznetsov Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Reviewed-by: Roman Kagan Link: https://lkml.kernel.org/r/20191027151938.7296-1-vkuznets@redhat.com commit eafee59440623e06b0ce4a0e49f814a8cf31d8ca Author: Christoph Hellwig Date: Tue Aug 13 11:52:20 2019 +0200 nds32: use generic ioremap Use the generic ioremap_prot and iounmap helpers. Note that the io.h include in pgtable.h had to be removed to not create an include loop. As far as I can tell there was no need for it to start with. Signed-off-by: Christoph Hellwig Acked-by: Greentime Hu commit 0055f67b596c3a8963192a42e25797b0e7fc0e92 Author: Christoph Hellwig Date: Tue Aug 13 11:41:57 2019 +0200 csky: use generic ioremap Use the generic ioremap_prot and iounmap helpers. Signed-off-by: Christoph Hellwig Acked-by: Guo Ren commit d61ca3c25e0330c44d9a18b2a767197f10c0cd16 Author: Srivatsa S. Bhat (VMware) Date: Fri Oct 25 16:02:07 2019 -0700 sched/Kconfig: Fix spelling mistake in user-visible help text Fix a spelling mistake in the help text for PREEMPT_RT. Signed-off-by: Srivatsa S. Bhat (VMware) Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/157204450499.10518.4542293884417101528.stgit@srivatsa-ubuntu commit 1d6acc18fee71a0db6e4fbbfbdb247e0bd5b0655 Author: Mukesh Ojha Date: Tue Oct 15 13:03:39 2019 +0530 time: Fix spelling mistake in comment witin => within Signed-off-by: Mukesh Ojha Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1571124819-9639-1-git-send-email-mojha@codeaurora.org commit 544f1d62e3e6c6e6d17a5e56f6139208acb5ff46 Author: Ilya Leoshkevich Date: Thu Oct 31 18:25:16 2019 +0100 s390/disassembler: don't hide instruction addresses Due to kptr_restrict, JITted BPF code is now displayed like this: 000000000b6ed1b2: ebdff0800024 stmg %r13,%r15,128(%r15) 000000004cde2ba0: 41d0f040 la %r13,64(%r15) 00000000fbad41b0: a7fbffa0 aghi %r15,-96 Leaking kernel addresses to dmesg is not a concern in this case, because this happens only when JIT debugging is explicitly activated, which only root can do. Use %px in this particular instance, and also to print an instruction address in show_code and PCREL (e.g. brasl) arguments in print_insn. While at present functionally equivalent to %016lx, %px is recommended by Documentation/core-api/printk-formats.rst for such cases. Signed-off-by: Ilya Leoshkevich Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit 72fbcd057fa1d25da70e33312a0c8401d4295599 Author: Thomas Richter Date: Thu Oct 31 10:38:53 2019 +0100 s390/cpum_sf: Assign error value to err variable When starting the CPU Measurement sampling facility using qsi() function, this function may return an error value. This error value is referenced in the else part of the if statement to dump its value in a debug statement. Right now this value is always zero because it has not been assigned a value. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit c18388340c4165c53f82d30569e8a5fc2f8a850e Author: Thomas Richter Date: Thu Oct 31 10:21:05 2019 +0100 s390/cpum_sf: Replace function name in debug statements Replace hard coded function names in debug statements by the "%s ...", __func__ construct suggested by checkpatch.pl script. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit d98b5d0728d6d9f49f370d1846dbac30ec596a42 Author: Thomas Richter Date: Thu Oct 31 09:54:31 2019 +0100 s390/cpum_sf: Use consistant debug print format for sampling Use consistant debug print format of the form variable blank value. Also add leading 0x for all hex values. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit 2278f452a12d5b5b01f96441a7a4336710365022 Merge: a99d8080aaf3 d99c1ba6a73b Author: Thomas Gleixner Date: Tue Nov 12 11:20:17 2019 +0100 Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/core Pull EFI changes for v5.5 from Ard Biesheuvel: - Change my email address to @kernel.org so I am no longer at the mercy of useless corporate email infrastructure - Wire up the EFI RNG code for x86. This enables an additional source of entropy during early boot. - Enable the TPM event log code on ARM platforms. commit 5be85ec0de8425fb22c7b38fbaf4f245e41a5dca Merge: 1720624ee473 6b240aeb121e Author: Bartosz Golaszewski Date: Tue Nov 12 10:34:00 2019 +0100 Merge remote-tracking branch 'linusw/for-next' into gpio/for-next commit 0f1839d0888700389e3062b4787046d61780d6d9 Author: Tao Xu Date: Wed Oct 30 14:34:03 2019 +0800 ACPI: HMAT: use %u instead of %d to print u32 values Use %u instead of %d to print u32 values to expand the value range, especially when latency or bandwidth value is bigger than INT_MAX. Then HMAT latency can support up to 4.29s and bandwidth can support up to 4PB/s. Reviewed-by: Dan Williams Reviewed-by: Jingqi Liu Signed-off-by: Tao Xu Signed-off-by: Rafael J. Wysocki commit 59b2c5b63587a9ed2292ccce32fd69d8de815036 Author: Qian Cai Date: Mon Nov 11 16:34:26 2019 -0500 ACPI: NUMA: HMAT: fix a section mismatch Commit cf8741ac57ed ("ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device") introduced a linker warning, WARNING: vmlinux.o(.text+0x64ec3c): Section mismatch in reference from the function hmat_register_target() to the function .init.text:hmat_register_target_devices() The function hmat_register_target() references the function __init hmat_register_target_devices(). Since hmat_register_target() is also called from hmat_callback(), and then register_hotmemory_notifier(), where it should not be freed when hmat_init() is done, it indicates that the __init annotation of hmat_register_target_devices() is incorrect. Fixes: cf8741ac57ed ("ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device") Signed-off-by: Qian Cai Signed-off-by: Rafael J. Wysocki commit 067814c97494ea99e9cf8b77523e17369d38ec25 Author: Johan Hovold Date: Thu Nov 7 14:29:04 2019 +0100 USB: serial: mos7840: drop port open flag Drop the redundant port open flag and corresponding checks. USB serial core will not call any of these driver callbacks for a closed port, and the write URBs are stopped at close(). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit f8e8dcaf14d9c2bfb34018cb02e7a40f3d56c8eb Author: Johan Hovold Date: Thu Nov 7 14:29:03 2019 +0100 USB: serial: mos7840: drop read-urb check Drop read-urb check which is always false from completion the callback. The driver read-urb pointer is set at every open and is never cleared. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 7b2faede671adc0a7edbb5f6b1e228aa8b62f7c0 Author: Johan Hovold Date: Thu Nov 7 14:29:02 2019 +0100 USB: serial: mos7840: drop port driver data accessors Drop the custom port driver data accessors and paranoid sanity checks. The driver data is not cleared until the driver is unbound. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 2d52f0763f8ea965d35dc13958b85d0e88e596b2 Author: Johan Hovold Date: Thu Nov 7 14:29:01 2019 +0100 USB: serial: mos7840: drop serial struct accessor Drop the helper used to retrieve the serial struct pointer from the port structure. Note that this helper was only used when the serial structure was actually not needed. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 6d3471eded5e64c0310ceeff4adf9ca6d324ddd7 Author: Johan Hovold Date: Thu Nov 7 14:29:00 2019 +0100 USB: serial: mos7840: drop paranoid serial checks Drop the likewise paranoid serial structure sanity checks. USB serial core sets the serial pointer in the port structures at initialisation and it is never cleared, and similar for the serial structure type. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit ce039bd4b21fdd158e6dbe8baeb577e6347ea7aa Author: Johan Hovold Date: Thu Nov 7 14:28:59 2019 +0100 USB: serial: mos7840: drop paranoid port checks Drop the paranoid port structure sanity checks which are confusing at best. The driver data port pointer is set at port probe and never cleared, while USB serial core sets the tty driver data at install and won't call any driver functions with a NULL port pointer. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 3ec9fb6f385461923b77de6072403e97d2efe01b Author: Johan Hovold Date: Thu Nov 7 14:28:58 2019 +0100 USB: serial: mos7840: drop redundant urb context check The bulk-in URB context is set to the driver-data struct at open and is never cleared so drop the redundant check in the completion callback. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 7183192196a63e265254631ca53984e6c7899c3c Author: Johan Hovold Date: Thu Nov 7 14:28:57 2019 +0100 USB: serial: mos7840: rip out broken interrupt handling The interrupt handling is completely broken and has in fact never been been enabled due to an inverted test for an interrupt endpoint in open() that prevented the interrupt URB from being submitted. Other highlights include missing interrupt URB resubmission (had it ever been submitted), missing locking when managing the open-port count, and NULL-pointer dereferences that could have been triggered by a malicious device. Rip out this broken crap which is beyond repair instead of pretending we support this feature. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit de7156689d69e9861d9ddc54a9dea623c25020c5 Author: Kees Cook Date: Mon Nov 11 09:22:00 2019 -0800 m68k: Convert missed RODATA to RO_DATA I missed two instances of the old RODATA macro (seems I was searching for vmlinux.lds* not vmlinux*lds*). Fix both instances and double-check the entire tree for other "RODATA" instances in linker scripts. Fixes: c82318254d15 ("vmlinux.lds.h: Replace RODATA with RO_DATA") Reported-by: Geert Uytterhoeven Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Geert Uytterhoeven Cc: Heiko Carstens Cc: linux-m68k@lists.linux-m68k.org Cc: Sam Creasey Link: https://lkml.kernel.org/r/201911110920.5840E9AF1@keescook commit 960fbd1ca584a5b4cd818255769769d42bfc6dbe Author: Johan Hovold Date: Thu Nov 7 14:28:56 2019 +0100 USB: serial: mos7840: fix probe error handling The driver would return success and leave the port structures half-initialised if any of the register accesses during probe fails. This would specifically leave the port control urb unallocated, something which could trigger a NULL pointer dereference on interrupt events. Fortunately the interrupt implementation is completely broken and has never even been enabled... Note that the zero-length-enable register write used to set the zle-flag for all ports is moved to attach. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 1c333550ea92a9c7a5fdf0f3474eba3387478f20 Author: Johan Hovold Date: Thu Nov 7 14:28:55 2019 +0100 USB: serial: mos7840: document MCS7810 detection hack Document the MCS7810 detection hack which relies on having the GPO and GPI pins connected as recommended by ASIX. Note that GPO (pin 42) is really RTS of the third port which will be toggled for the corresponding physical port on two- and four-port devices. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 375cb533c00a237264cc1d810d22f70de30362c2 Author: Johan Hovold Date: Thu Nov 7 14:28:54 2019 +0100 USB: serial: mos7840: clean up device-type handling The current device-type detection is fragile and can't really be relied upon. Instead of sprinkling device-id conditionals throughout the driver, let's use the device-id table to encode the number of ports and whether the device has a driver-controlled activity LED (MCS7810). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 92fe35fb9c70a00d8fbbf5bd6172c921dd9c7815 Author: Johan Hovold Date: Thu Nov 7 14:21:19 2019 +0100 USB: serial: mos7840: fix remote wakeup The driver was setting the device remote-wakeup feature during probe in violation of the USB specification (which says it should only be set just prior to suspending the device). This could potentially waste power during suspend as well as lead to spurious wakeups. Note that USB core would clear the remote-wakeup feature at first resume. Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver") Cc: stable # 2.6.19 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit ea422312a462696093b5db59d294439796cba4ad Author: Johan Hovold Date: Thu Nov 7 14:21:18 2019 +0100 USB: serial: mos7720: fix remote wakeup The driver was setting the device remote-wakeup feature during probe in violation of the USB specification (which says it should only be set just prior to suspending the device). This could potentially waste power during suspend as well as lead to spurious wakeups. Note that USB core would clear the remote-wakeup feature at first resume. Fixes: 0f64478cbc7a ("USB: add USB serial mos7720 driver") Cc: stable # 2.6.19 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit cee7fb437edcdb2f9f8affa959e274997f5dca4d Author: Chris Wilson Date: Mon Nov 11 13:32:03 2019 +0000 drm/i915/userptr: Try to acquire the page lock around set_page_dirty() set_page_dirty says: For pages with a mapping this should be done under the page lock for the benefit of asynchronous memory errors who prefer a consistent dirty state. This rule can be broken in some special cases, but should be better not to. Under those rules, it is only safe for us to use the plain set_page_dirty calls for shmemfs/anonymous memory. Userptr may be used with real mappings and so needs to use the locked version (set_page_dirty_lock). However, following a try_to_unmap() we may want to remove the userptr and so call put_pages(). However, try_to_unmap() acquires the page lock and so we must avoid recursively locking the pages ourselves -- which means that we cannot safely acquire the lock around set_page_dirty(). Since we can't be sure of the lock, we have to risk skip dirtying the page, or else risk calling set_page_dirty() without a lock and so risk fs corruption. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112012 Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl") References: cb6d7c7dc7ff ("drm/i915/userptr: Acquire the page lock around set_page_dirty()") References: 505a8ec7e11a ("Revert "drm/i915/userptr: Acquire the page lock around set_page_dirty()"") References: 6dcc693bc57f ("ext4: warn when page is dirtied without buffers") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191111133205.11590-1-chris@chris-wilson.co.uk (cherry picked from commit 0d4bbe3d407f79438dc4f87943db21f7134cfc65) Signed-off-by: Joonas Lahtinen commit a7d87b70d6da96c6772e50728c8b4e78e4cbfd55 Author: Chris Wilson Date: Sat Nov 9 10:53:56 2019 +0000 drm/i915/pmu: "Frequency" is reported as accumulated cycles We report "frequencies" (actual-frequency, requested-frequency) as the number of accumulated cycles so that the average frequency over that period may be determined by the user. This means the units we report to the user are Mcycles (or just M), not MHz. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191109105356.5273-1-chris@chris-wilson.co.uk (cherry picked from commit e88866ef02851c88fe95a4bb97820b94b4d46f36) Signed-off-by: Joonas Lahtinen commit d231c15aff1eb4bde51036fb1e0aaec1706cf940 Author: Chris Wilson Date: Mon Nov 11 11:43:19 2019 +0000 drm/i915: Protect context while grabbing its name for the request Inside print_request(), we query the context/timeline name. Nothing immediately protects the context from being freed if the request is complete -- we rely on serialisation by the caller to keep the name valid until they finish using it. Inside intel_engine_dump(), we generally only print the requests in the execution queue protected by the engine->active.lock, but we also show the pending execlists ports which are not protected and so require a rcu_read_lock to keep the pointer valid. [ 1695.700883] BUG: KASAN: use-after-free in i915_fence_get_timeline_name+0x53/0x90 [i915] [ 1695.700981] Read of size 8 at addr ffff8887344f4d50 by task gem_ctx_persist/2968 [ 1695.701068] [ 1695.701156] CPU: 1 PID: 2968 Comm: gem_ctx_persist Tainted: G U 5.4.0-rc6+ #331 [ 1695.701246] Hardware name: Intel Corporation NUC7i5BNK/NUC7i5BNB, BIOS BNKBL357.86A.0052.2017.0918.1346 09/18/2017 [ 1695.701334] Call Trace: [ 1695.701424] dump_stack+0x5b/0x90 [ 1695.701870] ? i915_fence_get_timeline_name+0x53/0x90 [i915] [ 1695.701964] print_address_description.constprop.7+0x36/0x50 [ 1695.702408] ? i915_fence_get_timeline_name+0x53/0x90 [i915] [ 1695.702856] ? i915_fence_get_timeline_name+0x53/0x90 [i915] [ 1695.702947] __kasan_report.cold.10+0x1a/0x3a [ 1695.703390] ? i915_fence_get_timeline_name+0x53/0x90 [i915] [ 1695.703836] i915_fence_get_timeline_name+0x53/0x90 [i915] [ 1695.704241] print_request+0x82/0x2e0 [i915] [ 1695.704638] ? fwtable_read32+0x133/0x360 [i915] [ 1695.705042] ? write_timestamp+0x110/0x110 [i915] [ 1695.705133] ? _raw_spin_lock_irqsave+0x79/0xc0 [ 1695.705221] ? refcount_inc_not_zero_checked+0x91/0x110 [ 1695.705306] ? refcount_dec_and_mutex_lock+0x50/0x50 [ 1695.705709] ? intel_engine_find_active_request+0x202/0x230 [i915] [ 1695.706115] intel_engine_dump+0x2c9/0x900 [i915] Fixes: c36eebd9ba5d ("drm/i915/gt: execlists->active is serialised by the tasklet") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191111114323.5833-1-chris@chris-wilson.co.uk (cherry picked from commit fecffa4668cf62e679aeea8caa9d0f241f822578) Signed-off-by: Joonas Lahtinen commit 2b3c7f0db8b4518713bad16e99271439d22dbc9d Author: Lionel Landwerlin Date: Mon Nov 11 11:53:08 2019 +0200 drm/i915/perf: always consider holding preemption a privileged op The ordering of the checks in the existing code can lead to holding preemption not being considered as privileged op. Signed-off-by: Lionel Landwerlin Fixes: 9cd20ef7803c ("drm/i915/perf: allow holding preemption on filtered ctx") Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191111095308.2550-1-lionel.g.landwerlin@intel.com (cherry picked from commit 0b0120d4c7b013eba59b33254febc0a6e4049e13) Signed-off-by: Joonas Lahtinen commit 20d087368d38c7350a4519a3b316ef7eb2504692 Author: Arnd Bergmann Date: Fri Nov 8 21:34:25 2019 +0100 time: Optimize ns_to_timespec64() ns_to_timespec64() calls div_s64_rem(), which is a rather slow function on 32-bit architectures, as it cannot take advantage of the do_div() optimizations for constant arguments. Open-code the div_s64_rem() function in ns_to_timespec64(), so a constant divider can be passed into the optimized div_u64_rem() function. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20191108203435.112759-3-arnd@arndb.de commit ca22d6977b9b4ab0fd2e7909b57e32ba5b95046f Merge: 29711306ce97 b776620651a1 Author: David S. Miller Date: Mon Nov 11 23:13:19 2019 -0800 Merge branch 'stmmac-next' Jose Abreu says: ==================== net: stmmac: Improvements for -next Misc improvements for stmmac. Patch 1/6, fixes a sparse warning that was introduced in recent commit in -next. Patch 2/6, adds the Split Header support which is also available in XGMAC cores and now in GMAC4+ with this patch. Patch 3/6, adds the C45 support for MDIO transactions when using XGMAC cores. Patch 4/6, removes the speed dependency on CBS callbacks so that it can be used in XGMAC cores. Patch 5/6, reworks the over-engineered stmmac_rx() function so that its easier to read. Patch 6/6, implements the UDP Segmentation Offload feature in GMAC4+ cores. ==================== Signed-off-by: David S. Miller commit b776620651a1182976b51643bb2c5b08d535fb2e Author: Jose Abreu Date: Mon Nov 11 15:42:39 2019 +0100 net: stmmac: Implement UDP Segmentation Offload Implement the UDP Segmentation Offload feature in stmmac. This is only available in GMAC4+ cores. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 88ebe2cf7f3fc9da95e0f06483fd58da3e67e675 Author: Jose Abreu Date: Mon Nov 11 15:42:38 2019 +0100 net: stmmac: Rework stmmac_rx() This looks over-engineered. Let's use some helpers to get the buffer length and hereby simplify the stmmac_rx() function. No performance drop was seen with the new implementation. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit bc41a6689b30abaf213c66ac574beefb6d02717c Author: Jose Abreu Date: Mon Nov 11 15:42:37 2019 +0100 net: stmmac: tc: Remove the speed dependency XGMAC3 supports full CBS features with speeds that can go up to 10G so we can now remove the maximum speed check of CBS. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 04d1190aca774792e0304bef5624ee8a47331ca2 Author: Jose Abreu Date: Mon Nov 11 15:42:36 2019 +0100 net: stmmac: xgmac: Add C45 PHY support in the MDIO callbacks Add the support for C45 PHYs in the MDIO callbacks for XGMAC. This was tested using Synopsys DesignWare XPCS. v2: - Pull out the readl_poll_timeout() calls into common code (Andrew) Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 8c6fc097a2f4acf2e9c217e04e2620bf98cfddd3 Author: Jose Abreu Date: Mon Nov 11 15:42:35 2019 +0100 net: stmmac: gmac4+: Add Split Header support GMAC4+ cores also support the Split Header feature. Add the support for Split Header feature in the RX path following the same implementation logic that XGMAC followed. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit a24cae7012b59bfe1aed01fe3fc13d81b7b97b08 Author: Jose Abreu Date: Mon Nov 11 15:42:34 2019 +0100 net: stmmac: Fix sparse warning The VID is converted to le16 so the variable must be __le16 type. Reported-by: kbuild test robot Fixes: c7ab0b8088d7 ("net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 00a0eec59ddbb1ce966b19097d8a8d2f777e726a Author: Clement Leger Date: Fri Oct 4 09:37:36 2019 +0200 remoteproc: Fix wrong rvring index computation Index of rvring is computed using pointer arithmetic. However, since rvring->rvdev->vring is the base of the vring array, computation of rvring idx should be reversed. It previously lead to writing at negative indices in the resource table. Signed-off-by: Clement Leger Link: https://lore.kernel.org/r/20191004073736.8327-1-cleger@kalray.eu Signed-off-by: Bjorn Andersson commit 29711306ce971d55903a4a2de7ac5d051d4a8306 Author: Colin Ian King Date: Mon Nov 11 12:44:13 2019 +0000 cxgb4: remove redundant assignment to hdr_len Variable hdr_len is being assigned a value that is never read. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit c33fdc3453313137f8740a227525ed518bc68e28 Author: Colin Ian King Date: Mon Nov 11 12:33:34 2019 +0000 tipc: fix update of the uninitialized variable err Variable err is not uninitialized and hence can potentially contain any garbage value. This may cause an error when logical or'ing the return values from the calls to functions crypto_aead_setauthsize or crypto_aead_setkey. Fix this by setting err to the return of crypto_aead_setauthsize rather than or'ing in the return into the uninitialized variable Addresses-Coverity: ("Uninitialized scalar variable") Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 59618bc0e3949f9907ca236761bfca4ba39700e6 Author: Madalin Bucur Date: Mon Nov 11 14:03:12 2019 +0200 Documentation: networking: dpaa_eth: adjust sysfs paths The sysfs paths changed, updating to the current ones. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 9c64ecaef1690545db2257a92b3cb3916823d6a7 Author: Madalin Bucur Date: Mon Nov 11 14:03:11 2019 +0200 Documentation: networking: dpaa_eth: adjust buffer pool info Recent changes in the dpaa_eth driver reduced the number of buffer pools per interface from three to one. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 6cc2c8762dfdd8c3eeb9d71ed6ad6314d7d5d79c Author: Jesper Dangaard Brouer Date: Sun Nov 10 17:31:16 2019 +0100 samples/bpf: adjust Makefile and README.rst Side effect of some kbuild changes resulted in breaking the documented way to build samples/bpf/. This patch change the samples/bpf/Makefile to work again, when invoking make from the subdir samples/bpf/. Also update the documentation in README.rst, to reflect the new way to build. Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Signed-off-by: David S. Miller commit 5b67a3ed4fe3f859045cfcc5b1dbd80d058075b5 Author: Jiri Pirko Date: Sun Nov 10 16:31:44 2019 +0100 mlxsw: core: Enable devlink reload only on probe Call devlink enable only during probe time and avoid deadlock during reload. Reported-by: Shalom Toledo Fixes: a0c76345e3d3 ("devlink: disallow reload operation during device cleanup") Signed-off-by: Jiri Pirko Tested-by: Shalom Toledo Signed-off-by: David S. Miller commit 1287723aa139b46dc0b9b53c7212af71f1acfc39 Author: Heiner Kallweit Date: Sun Nov 10 16:13:35 2019 +0100 r8169: add support for RTL8117 Add support for chip version RTL8117. Settings have been copied from Realtek's r8168 driver, there however chip ID 54a belongs to a chip version called RTL8168FP. It was confirmed that RTL8117 works with Realtek's driver, so both chip versions seem to be the same or at least compatible. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit d72ea4915c7e6fa5e7b9022a34df66e375bfe46c Author: Mimi Zohar Date: Wed Oct 30 23:31:34 2019 -0400 powerpc/ima: Indicate kernel modules appended signatures are enforced The arch specific kernel module policy rule requires kernel modules to be signed, either as an IMA signature, stored as an xattr, or as an appended signature. As a result, kernel modules appended signatures could be enforced without "sig_enforce" being set or reflected in /sys/module/module/parameters/sig_enforce. This patch sets "sig_enforce". Signed-off-by: Mimi Zohar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1572492694-6520-10-git-send-email-zohar@linux.ibm.com commit dc87f18615db9dc74a75cfb4a57ed33b07a3903a Author: Nayna Jain Date: Wed Oct 30 23:31:33 2019 -0400 powerpc/ima: Update ima arch policy to check for blacklist This patch updates the arch-specific policies for PowerNV system to make sure that the binary hash is not blacklisted. Signed-off-by: Nayna Jain Signed-off-by: Mimi Zohar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1572492694-6520-9-git-send-email-zohar@linux.ibm.com commit 273df864cf7466fb170b8dcc1abd672cd08ad8d3 Author: Nayna Jain Date: Wed Oct 30 23:31:32 2019 -0400 ima: Check against blacklisted hashes for files with modsig Asymmetric private keys are used to sign multiple files. The kernel currently supports checking against blacklisted keys. However, if the public key is blacklisted, any file signed by the blacklisted key will automatically fail signature verification. Blacklisting the public key is not fine enough granularity, as we might want to only blacklist a particular file. This patch adds support for checking against the blacklisted hash of the file, without the appended signature, based on the IMA policy. It defines a new policy option "appraise_flag=check_blacklist". In addition to the blacklisted binary hashes stored in the firmware "dbx" variable, the Linux kernel may be configured to load blacklisted binary hashes onto the .blacklist keyring as well. The following example shows how to blacklist a specific kernel module hash. $ sha256sum kernel/kheaders.ko 77fa889b35a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3 kernel/kheaders.ko $ grep BLACKLIST .config CONFIG_SYSTEM_BLACKLIST_KEYRING=y CONFIG_SYSTEM_BLACKLIST_HASH_LIST="blacklist-hash-list" $ cat certs/blacklist-hash-list "bin:77fa889b35a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3" Update the IMA custom measurement and appraisal policy rules (/etc/ima-policy): measure func=MODULE_CHECK template=ima-modsig appraise func=MODULE_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig After building, installing, and rebooting the kernel: 545660333 ---lswrv 0 0 \_ blacklist: bin:77fa889b35a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3 measure func=MODULE_CHECK template=ima-modsig appraise func=MODULE_CHECK appraise_flag=check_blacklist appraise_type=imasig|modsig modprobe: ERROR: could not insert 'kheaders': Permission denied 10 0c9834db5a0182c1fb0cdc5d3adcf11a11fd83dd ima-sig sha256:3bc6ed4f0b4d6e31bc1dbc9ef844605abc7afdc6d81a57d77a1ec9407997c40 2 /usr/lib/modules/5.4.0-rc3+/kernel/kernel/kheaders.ko 10 82aad2bcc3fa8ed94762356b5c14838f3bcfa6a0 ima-modsig sha256:3bc6ed4f0b4d6e31bc1dbc9ef844605abc7afdc6d81a57d77a1ec9407997c40 2 /usr/lib/modules/5.4.0rc3+/kernel/kernel/kheaders.ko sha256:77fa889b3 5a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3 3082029a06092a864886f70d010702a082028b30820287020101310d300b0609608648 016503040201300b06092a864886f70d01070131820264.... 10 25b72217cc1152b44b134ce2cd68f12dfb71acb3 ima-buf sha256:8b58427fedcf8f4b20bc8dc007f2e232bf7285d7b93a66476321f9c2a3aa132 b blacklisted-hash 77fa889b35a05338ec52e51591c1b89d4c8d1c99a21251d7c22b1a8642a6bad3 Signed-off-by: Nayna Jain [zohar@linux.ibm.com: updated patch description] Signed-off-by: Mimi Zohar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1572492694-6520-8-git-send-email-zohar@linux.ibm.com commit 2434f7d2d488c3301ae81f1031e1c66c6f076fb7 Author: Nayna Jain Date: Wed Oct 30 23:31:31 2019 -0400 certs: Add wrapper function to check blacklisted binary hash The -EKEYREJECTED error returned by existing is_hash_blacklisted() is misleading when called for checking against blacklisted hash of a binary. This patch adds a wrapper function is_binary_blacklisted() to return -EPERM error if binary is blacklisted. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1572492694-6520-7-git-send-email-zohar@linux.ibm.com commit e14555e3d0e9edfad0a6840c0152f71aba97e793 Author: Nayna Jain Date: Wed Oct 30 23:31:30 2019 -0400 ima: Make process_buffer_measurement() generic process_buffer_measurement() is limited to measuring the kexec boot command line. This patch makes process_buffer_measurement() more generic, allowing it to measure other types of buffer data (e.g. blacklisted binary hashes or key hashes). process_buffer_measurement() may be called directly from an IMA hook or as an auxiliary measurement record. In both cases the buffer measurement is based on policy. This patch modifies the function to conditionally retrieve the policy defined PCR and template for the IMA hook case. Signed-off-by: Nayna Jain [zohar@linux.ibm.com: added comment in process_buffer_measurement()] Signed-off-by: Mimi Zohar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1572492694-6520-6-git-send-email-zohar@linux.ibm.com commit 1917855f4e0658c313e280671ad87774dbfb7b24 Author: Nayna Jain Date: Wed Oct 30 23:31:29 2019 -0400 powerpc/ima: Define trusted boot policy This patch defines an arch-specific trusted boot only policy and a combined secure and trusted boot policy. Signed-off-by: Nayna Jain Signed-off-by: Mimi Zohar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1572492694-6520-5-git-send-email-zohar@linux.ibm.com commit 2702809a4a1ab414d75c00936cda70ea77c8234e Author: Nayna Jain Date: Tue Nov 5 17:02:07 2019 -0600 powerpc: Detect the trusted boot state of the system While secure boot permits only properly verified signed kernels to be booted, trusted boot calculates the file hash of the kernel image and stores the measurement prior to boot, that can be subsequently compared against good known values via attestation services. This patch reads the trusted boot state of a PowerNV system. The state is used to conditionally enable additional measurement rules in the IMA arch-specific policies. Signed-off-by: Nayna Jain Signed-off-by: Eric Richter Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e9eeee6b-b9bf-1e41-2954-61dbd6fbfbcf@linux.ibm.com commit 4238fad366a660cbc6499ca1ea4be42bd4d1ac5b Author: Nayna Jain Date: Wed Oct 30 23:31:27 2019 -0400 powerpc/ima: Add support to initialize ima policy rules PowerNV systems use a Linux-based bootloader, which rely on the IMA subsystem to enforce different secure boot modes. Since the verification policy may differ based on the secure boot mode of the system, the policies must be defined at runtime. This patch implements arch-specific support to define IMA policy rules based on the runtime secure boot mode of the system. This patch provides arch-specific IMA policies if PPC_SECURE_BOOT config is enabled. Signed-off-by: Nayna Jain Signed-off-by: Mimi Zohar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1572492694-6520-3-git-send-email-zohar@linux.ibm.com commit 1a8916ee3ac29054322cdac687d36e1b5894d272 Author: Nayna Jain Date: Tue Nov 5 17:00:22 2019 -0600 powerpc: Detect the secure boot mode of the system This patch defines a function to detect the secure boot state of a PowerNV system. The PPC_SECURE_BOOT config represents the base enablement of secure boot for powerpc. Signed-off-by: Nayna Jain Signed-off-by: Eric Richter [mpe: Fold in change from Nayna to add "ibm,secureboot" to ids] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/46b003b9-3225-6bf7-9101-ed6580bb748c@linux.ibm.com commit 45422b704db392a6d79d07ee3e3670b11048bd53 Author: John Pittman Date: Mon Nov 11 16:43:20 2019 -0800 md/raid10: prevent access of uninitialized resync_pages offset Due to unneeded multiplication in the out_free_pages portion of r10buf_pool_alloc(), when using a 3-copy raid10 layout, it is possible to access a resync_pages offset that has not been initialized. This access translates into a crash of the system within resync_free_pages() while passing a bad pointer to put_page(). Remove the multiplication, preventing access to the uninitialized area. Fixes: f0250618361db ("md: raid10: don't use bio's vec table to manage resync pages") Cc: stable@vger.kernel.org # 4.12+ Signed-off-by: John Pittman Suggested-by: David Jeffery Reviewed-by: Laurence Oberman Signed-off-by: Song Liu commit 228fc7d76db68732677230a3c64337908fd298e3 Author: Yufen Yu Date: Wed Oct 30 18:47:02 2019 +0800 md: avoid invalid memory access for array sb->dev_roles we need to gurantee 'desc_nr' valid before access array of sb->dev_roles. In addition, we should avoid .load_super always return '0' when level is LEVEL_MULTIPATH, which is not expected. Reported-by: coverity-bot Addresses-Coverity-ID: 1487373 ("Memory - illegal accesses") Fixes: 6a5cb53aaa4e ("md: no longer compare spare disk superblock events in super_load") Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 5fa4f8bac9516b988d2ccd3f05f4267f8da24269 Author: Hannes Reinecke Date: Fri Oct 25 09:08:56 2019 +0200 md/raid1: avoid soft lockup under high load As all I/O is being pushed through a kernel thread the softlockup watchdog might be triggered under high load. Signed-off-by: Hannes Reinecke Signed-off-by: Song Liu commit 8d13c7642fabb0f9fb044041ebcce23fb002d86b Author: Stephan Gerhold Date: Tue Oct 8 16:48:02 2019 -0700 Input: mms114 - use device_get_match_data device_get_match_data is available now, so we can replace the call to of_device_get_match_data and remove the FIXME comment. Signed-off-by: Stephan Gerhold Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20191007203343.101466-2-stephan@gerhold.net Signed-off-by: Dmitry Torokhov commit 7a28c886f645e5c7c3b26981e29dc70c803f6ae9 Merge: 2fca4ac914a1 139d3a212a1f Author: David S. Miller Date: Mon Nov 11 16:17:01 2019 -0800 Merge branch 'sfp-Allow-slow-to-initialise-GPON-modules-to-work' Russell King says: ==================== sfp: Allow slow to initialise GPON modules to work Some GPON modules take longer than the SFF MSA specified time to initialise and respond to transactions on the I2C bus for either both 0x50 and 0x51, or 0x51 bus addresses. Technically these modules are non-compliant with the SFP Multi-Source Agreement, they have been around for some time, so are difficult to just ignore. Most of the patch series is restructuring the code to make it more readable, and split various things into separate functions. We split the three state machines into three separate functions, and re-arrange them to start probing the module as soon as a module has been detected (without waiting for the network device.) We try to read the module's EEPROM, retrying quickly for the first second, and then once every five seconds for about a minute until we have read the EEPROM. So that the kernel isn't entirely silent, we print a message indicating that we're waiting for the module to respond after the first second, or when all retries have expired. Once the module ID has been read, we kick off a delayed work queue which attempts to register the hwmon, retrying for up to a minute if the monitoring parameters are unreadable; this allows us to proceed with module initialisation independently of the hwmon state. With high-power modules, we wait for the netdev to be attached before switching the module power mode, and retry this in a similar way to before until we have successfully read and written the EEPROM at 0x51. We also move the handling of the TX_DISABLE signal entirely to the main state machine, and avoid probing any on-board PHY while TX_FAULT is set. ==================== Signed-off-by: David S. Miller commit 139d3a212a1f009251ffaef174c0638f646dbae8 Author: Russell King Date: Sun Nov 10 14:07:35 2019 +0000 net: sfp: allow modules with slow diagnostics to probe When a module is inserted, we attempt to read read the ID from address 0x50. Once we are able to read the ID, we immediately attempt to initialise the hwmon support by reading from address 0x51. If this fails, then we fall into error state, and assume that the module is not usable. Modules such as the ALCATELLUCENT 3FE46541AA use a real EEPROM for I2C address 0x50, which responds immediately. However, address 0x51 is an emulated, which only becomes available once the on-board firmware has booted. This prompts us to fall into the error state. Since the module may be usable without diagnostics, arrange for the hwmon probe independent of the rest of the SFP itself, retrying every 5s for up to about 60s for the monitoring to become available, and print an error message if it doesn't become available. Signed-off-by: Russell King Signed-off-by: David S. Miller commit e117be74c5593d8aef9d62833d637839f3eae4e7 Author: Russell King Date: Sun Nov 10 14:07:30 2019 +0000 net: sfp: allow sfp to probe slow to initialise GPON modules Some GPON modules (e.g. Huawei MA5671A) take a significant amount of time to start responding on the I2C bus, contary to the SFF specifications. Work around this by implementing a two-level timeout strategy, where we initially quickly retry for the module, and then use a slower retry after we exceed a maximum number of quick attempts. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 73f5e847d83a2e1a06b47190291d2eebf6353499 Author: Russell King Date: Sun Nov 10 14:07:25 2019 +0000 net: sfp: move module insert reporting out of probe Move the module insertion reporting out of the probe handling, but after we have detected that the upstream has attached (since that is whom we are reporting insertion to.) Only report module removal if we had previously reported a module insertion. This gives cleaner semantics, and means we can probe the module before we have an upstream attached. Signed-off-by: Russell King Signed-off-by: David S. Miller commit b036a554d0806a711cdd0abb4f5fdbbf0253cc46 Author: Russell King Date: Sun Nov 10 14:07:20 2019 +0000 net: sfp: split power mode switching from probe Switch the power mode switching from the probe, so that we don't repeatedly re-probe the SFP device if there is a problem accessing the registers at I2C address 0x51. In splitting this out, we can also fix a bug where we leave the module in high-power mode when the upstream device is detached but the module is still inserted. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 6b0da5c9c1a39eeead9c75eef3a0f2f62c375b2f Author: Russell King Date: Sun Nov 10 14:07:14 2019 +0000 net: sfp: track upstream's attachment state in state machine Track the upstream's attachment state in the state machine rather than maintaining a boolean, which ensures that we have a strict order of ATTACH followed by an UP event - we can never believe that a newly attached upstream will be anything but down. Rearrange the order of state machines so we run the module state machine after the upstream device's state machine, so the module state machine can check the current state of the device and take action to e.g. reset back to empty state when the upstream is detached. This is to allow the module detection to run independently of the network device becoming available. Signed-off-by: Russell King Signed-off-by: David S. Miller commit d23751a094012f7d0d7b6fb694f3c1ecb19e4a41 Author: Russell King Date: Sun Nov 10 14:07:09 2019 +0000 net: sfp: ensure TX_FAULT has deasserted before probing the PHY TX_FAULT should be deasserted to indicate that the module has completed its initialisation. This may include the on-board PHY, so wait until the module has deasserted TX_FAULT before probing the PHY. This means that we need an extra state to handle a TX_FAULT that remains set for longer than t_init, since using the existing handling state would bypass the PHY probe. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 63ec1c7c3f3b55b7e126d5fb54744869f2b6608e Author: Russell King Date: Sun Nov 10 14:07:04 2019 +0000 net: sfp: allow fault processing to transition to other states Add the next state to sfp_sm_fault() so that it can branch to other states. This will be necessary to improve the initialisation path. Signed-off-by: Russell King Signed-off-by: David S. Miller commit eefa6f1fa74f20420e536a79fa7e2c539b036be0 Author: Russell King Date: Sun Nov 10 14:06:59 2019 +0000 net: sfp: eliminate mdelay() from PHY probe Rather than using mdelay() to wait before probing the PHY (which holds several locks, including the rtnl lock), add an extra wait state to the state machine to introduce the 50ms delay without holding any locks. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 181f29da1582dec29f58ccd2a3dfbe917a1953cf Author: Russell King Date: Sun Nov 10 14:06:54 2019 +0000 net: sfp: split the PHY probe from sfp_sm_mod_init() Move the PHY probe into a separate function, splitting it from sfp_sm_mod_init(). This will allow us to eliminate the 50ms mdelay() inside the state machine. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8e210b6bdc2c91492735c9ff913e3cdf2161f8dc Author: Russell King Date: Sun Nov 10 14:06:49 2019 +0000 net: sfp: control TX_DISABLE and phy only from main state machine We initialise TX_DISABLE when the sfp cage is probed, and then maintain its state in the main state machine. However, the module state machine: - negates it when detecting a newly inserted module when it's already guaranteed to be negated. - negates it when the module is removed, but the main state machine will do this anyway. Make TX_DISABLE entirely controlled by the main state machine. The main state machine also probes the module for a PHY, and removes the PHY when the the module is removed. Hence, removing the PHY in sfp_sm_module_remove() is also redundant, and is a left-over from when we tried to probe for the PHY from the module state machine. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7cfa9c92d0a325f97ac13f894a7b47d37bd2040e Author: Russell King Date: Sun Nov 10 14:06:44 2019 +0000 net: sfp: avoid power switch on address-change modules If the module indicates that it requires an address change sequence to switch between address 0x50 and 0x51, which we don't support, we can't write to the register that controls the power mode to switch to high power mode. Warn the user that the module may not be functional in this case, and don't try to change the power mode. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ed32abb1ee716da02e7d795e3057efc1551168f2 Author: Russell King Date: Sun Nov 10 14:06:39 2019 +0000 net: sfp: parse SFP power requirement earlier Parse the SFP power requirement earlier, in preparation for moving the power level setup code. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d900954f57c61b3fbca6df5c2af1f3207fcabf0e Author: Russell King Date: Sun Nov 10 14:06:33 2019 +0000 net: sfp: rename T_PROBE_WAIT to T_SERIAL SFF-8472 rev 12.2 defines the time for the serial bus to become ready using t_serial. Use this as our identifier for this timeout to make it clear what we are referring to. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d2e816c0293fc263b3f168c14992a5f1a50d7593 Author: Russell King Date: Sun Nov 10 14:06:28 2019 +0000 net: sfp: handle module remove outside state machine Removing a module resets the module state machine back to its initial state. Rather than explicitly handling this in every state, handle it early on outside of the state machine. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0936ebc42f5909da7cf4c58468d4107f7029fe29 Author: Russell King Date: Sun Nov 10 14:06:23 2019 +0000 net: sfp: rename sfp_sm_ins_next() as sfp_sm_mod_next() sfp_sm_ins_next() modifies the module state machine. Change it's name to reflect this. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 1539e0d33bbc948351e340daaff1f9d98acb3dde Author: Russell King Date: Sun Nov 10 14:06:18 2019 +0000 net: sfp: move tx disable on device down to main state machine Move the tx disable assertion on device down to the main state machine. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e85d81a1840a000adc00ed75be553b886660884f Author: Russell King Date: Sun Nov 10 14:06:13 2019 +0000 net: sfp: move sfp sub-state machines into separate functions Move the SFP sub-state machines out of the main state machine function, in preparation for it doing a bit more with the device state. By doing so, we ensure that our debug after the main state machine is always printed. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit b94ec12dfaee41bdd6a8b6d75e5715d9ba2c92cc Author: Andy Shevchenko Date: Fri Nov 8 13:18:55 2019 +0200 PCI: pciehp: Refactor infinite loop in pcie_poll_cmd() Infinite timeout loops are hard to read. Refactor it to plausible 'do {} while ()'. Note, the supplied timeout can't be negative for current use, though if it's not dividable to 10, we may go below 0, that's why type of the parameter is int. And thus, we may move the check to the loop condition. No functional change intended. Link: https://lore.kernel.org/r/20191108111855.85866-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas Reviewed-by: Andrew Murray commit 2fca4ac914a16c85721a83fa30cc586faf46ca18 Author: Russell King Date: Sun Nov 10 14:04:11 2019 +0000 net: sfp: fix sfp_bus_put() kernel documentation The kbuild test robot found a problem with htmldocs with the recent change to the SFP interfaces. Fix the kernel documentation for sfp_bus_put() which was missing an '@' before the argument name description. Fixes: 727b3668b730 ("net: sfp: rework upstream interface") Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7ca7cb2382d87bb4328e6d4a01c52a1f5be9e27a Merge: 92d6d0a19246 a5fdf7d02656 Author: Dmitry Torokhov Date: Mon Nov 11 16:12:43 2019 -0800 Merge branch 'ili2xxx-touchscreen' into next Bring in improvements to ili2xxx driver, including support for 2117A/2118A controllers. commit a5fdf7d02656e71071d1a13ab887f94e58651baf Author: Dmitry Torokhov Date: Mon Nov 4 15:30:22 2019 -0800 Input: ili210x - remove unneeded suspend and resume handlers When I2C client is instantiated with I2C_CLIENT_WAKE flag (either via "wakeup-source" device property, or via board info flag), it will mark the main IRQ line as wakeup IRQ, which will ensure that it will be enabled for wakeup when system transitions to suspend state. Since our suspend/resume handlers were only managing IRQ wakeup state, they are no longer needed, and can be removed. Tested-by: Adam Ford #imx6q-logicpd Tested-by: Sven Van Asbroeck # ILI2118A variant Signed-off-by: Dmitry Torokhov commit 172bb5f34c0dd5e94eb877edb3e8721d1ebd5c75 Author: Dmitry Torokhov Date: Mon Nov 4 15:27:41 2019 -0800 Input: ili210x - do not unconditionally mark touchscreen as wakeup source I2C devices that are supposed to be wakeup sources should be instantiated with I2C_CLIENT_WAKE flag (which can be either set by in board info, or retrieved from "wakeup-source" property); individual drivers should not be marking devices as wakeup sources unconditionally. Tested-by: Adam Ford #imx6q-logicpd Tested-by: Sven Van Asbroeck # ILI2118A variant Signed-off-by: Dmitry Torokhov commit ef536abd3afd1e3cbddf04c724db793f12ab9c44 Author: Dmitry Torokhov Date: Wed Feb 6 22:33:05 2019 -0800 Input: ili210x - define and use chip operations structure Instead of doing if/else if/else on the chip's model number let's define chip operations structure and use it to perform indirect calls. With number of protocols supported by the driver growing, this makes it better maintainable. This change includes fixes to checks whether the driver should continue polling the controller by Sven Van Asbroeck . Tested-by: Adam Ford #imx6q-logicpd Tested-by: Sven Van Asbroeck # ILI2118A variant Signed-off-by: Dmitry Torokhov commit efda86a49553bc7e44b3f7254208577bff2da932 Author: Dmitry Torokhov Date: Mon Nov 4 15:20:47 2019 -0800 Input: ili210x - do not set parent device explicitly We are using devm_input_allocate_device() that set's up the parent for us, no need to do it ourselves. Tested-by: Adam Ford #imx6q-logicpd Tested-by: Sven Van Asbroeck # ILI2118A variant Signed-off-by: Dmitry Torokhov commit 43f06a4c639de8ee89fc348a9a3ecd70320a04dd Author: Dmitry Torokhov Date: Mon Nov 4 10:39:41 2019 -0800 Input: ili210x - handle errors from input_mt_init_slots() input_mt_init_slots() may fail and we need to handle such failures. Tested-by: Adam Ford #imx6q-logicpd Tested-by: Sven Van Asbroeck # ILI2118A variant Signed-off-by: Dmitry Torokhov commit 71f8e38ae635d92e553eec8d7359cb88b539b306 Author: Dmitry Torokhov Date: Sat Aug 10 23:19:24 2019 -0700 Input: ili210x - switch to using threaded IRQ Let's switch the driver to using threaded IRQ so that we do not need to manage the interrupt and work separately, and we do not acknowledge interrupt until we finished handling it completely. Tested-by: Adam Ford #imx6q-logicpd Tested-by: Sven Van Asbroeck # ILI2118A variant Tested-by: Marek Vasut # ILI2117 Signed-off-by: Dmitry Torokhov commit eb91ecc9fc43fbefdfdfe1ea8b3f136ccbc02f66 Author: Marek Vasut Date: Sun Aug 11 09:16:37 2019 -0700 Input: ili210x - add ILI2117 support Add support for ILI2117 touch controller. This controller is similar to the ILI210x and ILI251x, except for the following differences: - Reading out of touch data must happen at most 300 mS after the interrupt line was asserted. No command must be sent, the data are returned upon pure I2C read of 43 bytes long. - Supports 10 simultaneous touch inputs. - Touch data format is slightly different. Signed-off-by: Marek Vasut Reviewed-by: Rob Herring # for DT binding Tested-by: Adam Ford #imx6q-logicpd Tested-by: Sven Van Asbroeck # ILI2118A variant Signed-off-by: Dmitry Torokhov commit 7ec3f872bc85ada93db34448d73bb399d6b82c2c Author: Heiner Kallweit Date: Sun Nov 10 14:44:54 2019 +0100 r8169: respect EEE user setting when restarting network Currently, if network is re-started, we advertise all supported EEE modes, thus potentially overriding a manual adjustment the user made e.g. via ethtool. Be friendly to the user and preserve a manual setting on network re-start. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 92d6d0a19246921264147a5edf6a72dea8dc4b40 Author: Marcel Ziswiler Date: Wed Oct 30 16:10:39 2019 -0700 dt-bindings: input: touchscreen: ad7879: generic node names in example Update example in ad7879 device tree documentation to use generic touch controller node names. Signed-off-by: Marcel Ziswiler Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191026090403.3057-3-marcel@ziswiler.com Signed-off-by: Dmitry Torokhov commit ee85fbe14fd62a30df76f0a8dcee590d9c759703 Author: Flavio Suligoi Date: Mon Nov 11 10:20:03 2019 -0800 Input: ar1021 - fix typo in preprocessor macro name Fix spelling mistake. Signed-off-by: Flavio Suligoi Link: https://lore.kernel.org/r/1573211947-660-1-git-send-email-f.suligoi@asem.it Signed-off-by: Dmitry Torokhov commit 76a46e066e2d93bd333599d1c84c605c2c4cc909 Author: Jens Axboe Date: Sun Nov 10 23:34:16 2019 -0700 io_uring: fix -ENOENT issue with linked timer with short timeout If you prep a read (for example) that needs to get punted to async context with a timer, if the timeout is sufficiently short, the timer request will get completed with -ENOENT as it could not find the read. The issue is that we prep and start the timer before we start the read. Hence the timer can trigger before the read is even started, and the end result is then that the timer completes with -ENOENT, while the read starts instead of being cancelled by the timer. Fix this by splitting the linked timer into two parts: 1) Prep and validate the linked timer 2) Start timer The read is then started between steps 1 and 2, so we know that the timer will always have a consistent view of the read request state. Reported-by: Hrvoje Zeba Signed-off-by: Jens Axboe commit 768134d4f48109b90f4248feecbeeb7d684e410c Author: Jens Axboe Date: Sun Nov 10 20:30:53 2019 -0700 io_uring: don't do flush cancel under inflight_lock We can't safely cancel under the inflight lock. If the work hasn't been started yet, then io_wq_cancel_work() simply marks the work as cancelled and invokes the work handler. But if the work completion needs to grab the inflight lock because it's grabbing user files, then we'll deadlock trying to finish the work as we already hold that lock. Instead grab a reference to the request, if it isn't already zero. If it's zero, then we know it's going through completion anyway, and we can safely ignore it. If it's not zero, then we can drop the lock and attempt to cancel from there. This also fixes a missing finish_wait() at the end of io_uring_cancel_files(). Signed-off-by: Jens Axboe commit c1edbf5f081be9fbbea68c1d564b773e59c1acf3 Author: Jens Axboe Date: Sun Nov 10 16:56:04 2019 -0700 io_uring: flag SQPOLL busy condition to userspace Now that we have backpressure, for SQPOLL, we have one more condition that warrants flagging that the application needs to enter the kernel: we failed to submit IO due to backpressure. Make sure we catch that and flag it appropriately. If we run into backpressure issues with the SQPOLL thread, flag it as such to the application by setting IORING_SQ_NEED_WAKEUP. This will cause the application to enter the kernel, and that will flush the backlog and clear the condition. Signed-off-by: Jens Axboe commit 47f467686ec02fc07fd5c6bb34b6f6736e2884b0 Author: Jens Axboe Date: Sat Nov 9 17:43:02 2019 -0700 io_uring: make ASYNC_CANCEL work with poll and timeout It's a little confusing that we have multiple types of command cancellation opcodes now that we have a generic one. Make the generic one work with POLL_ADD and TIMEOUT commands as well, that makes for an easier to use API for the application. The fact that they currently don't is a bit confusing. Add a helper that takes care of it, so we can user it from both IORING_OP_ASYNC_CANCEL and from the linked timeout cancellation. Reported-by: Hrvoje Zeba Signed-off-by: Jens Axboe commit 0ddf92e848ab7abf216f218ee363eb9b9650e98f Author: Jens Axboe Date: Fri Nov 8 08:52:53 2019 -0700 io_uring: provide fallback request for OOM situations One thing that really sucks for userspace APIs is if the kernel passes back -ENOMEM/-EAGAIN for resource shortages. The application really has no idea of what to do in those cases. Should it try and reap completions? Probably a good idea. Will it solve the issue? Who knows. This patch adds a simple fallback mechanism if we fail to allocate memory for a request. If we fail allocating memory from the slab for a request, we punt to a pre-allocated request. There's just one of these per io_ring_ctx, but the important part is if we ever return -EBUSY to the application, the applications knows that it can wait for events and make forward progress when events have completed. This is the important part. Signed-off-by: Jens Axboe commit f338bb9f0179cb959977b74e8331b312264d720b Author: George Cherian Date: Mon Nov 11 02:43:03 2019 +0000 PCI: Apply Cavium ACS quirk to ThunderX2 and ThunderX3 Enhance the ACS quirk for Cavium Processors. Add the root port vendor IDs for ThunderX2 and ThunderX3 series of processors. [bhelgaas: add Fixes: and stable tag] Fixes: f2ddaf8dfd4a ("PCI: Apply Cavium ThunderX ACS quirk to more Root Ports") Link: https://lore.kernel.org/r/20191111024243.GA11408@dc5-eodlnx05.marvell.com Signed-off-by: George Cherian Signed-off-by: Bjorn Helgaas Reviewed-by: Robert Richter Cc: stable@vger.kernel.org # v4.12+ commit 0c06d166eacdb3176fbce589d44ffe810a95ab97 Author: Xin Long Date: Sun Nov 10 12:26:21 2019 +0800 lwtunnel: ignore any TUNNEL_OPTIONS_PRESENT flags set by users TUNNEL_OPTIONS_PRESENT (TUNNEL_GENEVE_OPT|TUNNEL_VXLAN_OPT| TUNNEL_ERSPAN_OPT) flags should be set only according to tb[LWTUNNEL_IP_OPTS], which is done in ip_tun_parse_opts(). When setting info key.tun_flags, the TUNNEL_OPTIONS_PRESENT bits in tb[LWTUNNEL_IP(6)_FLAGS] passed from users should be ignored. While at it, replace all (TUNNEL_GENEVE_OPT|TUNNEL_VXLAN_OPT| TUNNEL_ERSPAN_OPT) with 'TUNNEL_OPTIONS_PRESENT'. Fixes: 3093fbe7ff4b ("route: Per route IP tunnel metadata via lightweight tunnel") Fixes: 32a2b002ce61 ("ipv6: route: per route IP tunnel metadata via lightweight tunnel") Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 58e8494eb033eb9134989dbc52e2a236e3f8a462 Author: Xin Long Date: Sun Nov 10 12:21:18 2019 +0800 lwtunnel: get nlsize for erspan options properly erspan v1 has OPT_ERSPAN_INDEX while erspan v2 has OPT_ERSPAN_DIR and OPT_ERSPAN_HWID attributes, and they require different nlsize when dumping. So this patch is to get nlsize for erspan options properly according to erspan version. Fixes: b0a21810bd5e ("lwtunnel: add options setting and dumping for erspan") Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ed02551f58b92812974bf7bec6c9cc98c3e9263f Author: Xin Long Date: Sun Nov 10 12:16:22 2019 +0800 lwtunnel: change to use nla_parse_nested on new options As the new options added in kernel, all should always use strict parsing from the beginning with nla_parse_nested(), instead of nla_parse_nested_deprecated(). Fixes: b0a21810bd5e ("lwtunnel: add options setting and dumping for erspan") Fixes: edf31cbb1502 ("lwtunnel: add options setting and dumping for vxlan") Fixes: 4ece47787077 ("lwtunnel: add options setting and dumping for geneve") Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 73abde4d864b381be8b36d460d127fd479a560d3 Author: Matt Coffin Date: Mon Nov 11 11:36:31 2019 -0700 drm/amdgpu/smu_v11: Unify and fix power limits [Why] On Navi10, and presumably arcterus, updating pp_table via sysfs would not re-scale the maximum possible power limit one can set. On navi10, the SMU code ignored the power percentage overdrive setting entirely, and would not allow you to exceed the default power limit at all. [How] Adding a function to the SMU interface to get the pptable version of the default power limit allows ASIC-specific code to provide the correct maximum-settable power limit for the current pptable. v3: fix spelling (Alex) Reviewed-by: Evan Quan Signed-off-by: Matt Coffin Signed-off-by: Alex Deucher commit 7f3353f60e75c6cdfdfc170733a32db3853007bb Author: Matt Coffin Date: Fri Nov 8 14:28:08 2019 -0700 drm/amdgpu/navi10: Implement od clk printing [Why] Before this patch, navi10 overdrive settings could not be printed via pp_od_clk_voltage [How] Implement printing for the overdrive settings for the following clocks in navi10's ppt print_clk_levels implementation: * SMU_OD_SCLK * SMU_OD_MCLK * SMU_OD_VDDC_CURVE Reviewed-by: Evan Quan Signed-off-by: Matt Coffin Signed-off-by: Alex Deucher commit 6610713211b139985ffdb10472f7bc7a18f5e546 Author: Matt Coffin Date: Fri Nov 8 14:28:07 2019 -0700 drm/amdgpu/navi10: implement GFXCLK_CURVE overdrive [Why] Before this patch, there was no way to set the gfxclk voltage curve in the overdrive settings for navi10 through pp_od_clk_voltage [How] Add the required implementation to navi10's ppt dpm table editing implementation, similar to the vega20 implementation and interface. Reviewed-by: Evan Quan Signed-off-by: Matt Coffin Signed-off-by: Alex Deucher commit 21677d0880957a81910d83f042e788b684472d1e Author: Matt Coffin Date: Fri Nov 8 14:28:06 2019 -0700 drm/amdgpu/navi10: implement sclk/mclk OD via pp_od_clk_voltage [Why] Before this patch, there was no way to use pp_od_clk_voltage on navi [How] Similar to the vega20 implementation, but using the common smc_v11_0 headers, implemented the pp_od_clk_voltage API for navi10's pptable implementation Reviewed-by: Evan Quan Signed-off-by: Matt Coffin Signed-off-by: Alex Deucher commit 9f87516764a9f2a6a6a9552844efb41d9748afec Author: Jesse Zhang Date: Fri Nov 8 18:06:07 2019 +0800 drm/amd/amdgpu: finish delay works before release resources flush/cancel delayed works before doing finalization to avoid concurrently requests. Signed-off-by: Jesse Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 4cae34d065e8702421ca4332aa249ec00d8b37c2 Author: KyleMahlkuch Date: Mon Nov 11 14:27:58 2019 -0600 drm/radeon: Clean up code in radeon_pci_shutdown() This fixes the formatting on one comment and consolidates the pci_get_drvdata() into the radeon_suspend_kms(). Signed-off-by: Kyle Mahlkuch Signed-off-by: Alex Deucher commit 901245624c7812b6c95d67177bae850e783b5212 Author: Alex Deucher Date: Fri Nov 8 11:15:17 2019 -0500 drm/amdgpu/powerplay/smu7: fix AVFS handling with custom powerplay table When a custom powerplay table is provided, we need to update the OD VDDC flag to avoid AVFS being enabled when it shouldn't be. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205393 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 51bd363857c09fb9ef3cd3bbf972aeecf43c0ff8 Author: Hawking Zhang Date: Mon Nov 11 12:26:36 2019 +0800 drm/amdgpu: avoid upload corrupted ta ucode to psp xgmi, ras, hdcp and dtm ta are actually separated ucode and need to handled case by case to upload to psp. We support the case that ta binary have one or multiple of them built-in. As a result, the driver should check each ta binariy's availablity before decide to upload them to psp. In the terminate (unload) case, the driver will check the context readiness before perform unload activity. It's fine to keep it as is. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit e47a179997ceee6864fbae620eee09ea9c345a4d Author: Anders Roxell Date: Mon Nov 11 17:17:28 2019 +0100 bpf, testing: Add missing object file to TEST_FILES When installing kselftests to its own directory and run the test_lwt_ip_encap.sh it will complain that test_lwt_ip_encap.o can't be found. Same with the test_tc_edt.sh test it will complain that test_tc_edt.o can't be found. $ ./test_lwt_ip_encap.sh starting egress IPv4 encap test Error opening object test_lwt_ip_encap.o: No such file or directory Object hashing failed! Cannot initialize ELF context! Failed to parse eBPF program: Invalid argument Rework to add test_lwt_ip_encap.o and test_tc_edt.o to TEST_FILES so the object file gets installed when installing kselftest. Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule") Signed-off-by: Anders Roxell Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191111161728.8854-1-anders.roxell@linaro.org commit 57a54dfe4895222dcb8e22ca6f49bf42d1b197aa Merge: 13c1eff1755b 141bef44e123 Author: Olof Johansson Date: Mon Nov 11 13:13:22 2019 -0800 Merge tag 'tegra-for-5.5-memory-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers memory: tegra: Changes for v5.5-rc1 This contains a couple of fixes and adds support for EMC frequency scaling on Tegra30. * tag 'tegra-for-5.5-memory-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra: Consolidate registers definition into common header memory: tegra: Ensure timing control debug features are disabled memory: tegra: Introduce Tegra30 EMC driver memory: tegra: Do not handle error from wait_for_completion_timeout() memory: tegra: Increase handshake timeout on Tegra20 memory: tegra: Print a brief info message about EMC timings memory: tegra: Pre-configure debug register on Tegra20 memory: tegra: Include io.h instead of iopoll.h memory: tegra: Adapt for Tegra20 clock driver changes memory: tegra: Don't set EMC rate to maximum on probe for Tegra20 memory: tegra: Add gr2d and gr3d to DRM IOMMU group memory: tegra: Set DMA mask based on supported address bits clk: tegra: Add Tegra20/30 EMC clock implementation Link: https://lore.kernel.org/r/20191111143836.4027200-1-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit d9f7aef83e007ce2137fcd5f3b8036565d639dee Merge: eb9809b94db0 c23734487fb4 Author: Rafael J. Wysocki Date: Mon Nov 11 22:09:49 2019 +0100 Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq drivers updates for v5.5 from Viresh Kumar: "This pull request contains: - Updates to ti-cpufreq driver and DT files to support new platforms and migrate from opp-v1 bindings to opp-v2 bindings (H. Nikolaus Schaller and Adam Ford). - Merging of arm_big_little and vexpress-spc drivers and related cleanup (Sudeep Holla). - Fix for imx's default speed grade value (Anson Huang). - Minor cleanup patch for s3c64xx (Nathan Chancellor). - Fix CPU speed bin detection for sun50i (Ondrej Jirman)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: sun50i: Fix CPU speed bin detection cpufreq: vexpress-spc: find and skip duplicates when merging frequencies cpufreq: vexpress-spc: use macros instead of hardcoded values for cluster ids cpufreq: s3c64xx: Remove pointless NULL check in s3c64xx_cpufreq_driver_init cpufreq: imx-cpufreq-dt: Correct i.MX8MN's default speed grade value cpufreq: vexpress-spc: fix some coding style issues cpufreq: vexpress-spc: remove lots of debug messages cpufreq: vexpress-spc: drop unnessary cpufreq_arm_bL_ops abstraction cpufreq: merge arm_big_little and vexpress-spc cpufreq: scpi: remove stale/outdated comment about the driver ARM: dts: Add OPP-V2 table for AM3517 cpufreq: ti-cpufreq: Add support for AM3517 ARM: dts: omap36xx: using OPP1G needs to control the abb_ldo cpufreq: ti-cpufreq: omap36xx use "cpu0","vbb" if run in multi_regulator mode ARM: dts: omap3: bulk convert compatible to be explicitly ti,omap3430 or ti,omap3630 or ti,am3517 DTS: bindings: omap: update bindings documentation ARM: dts: omap34xx & omap36xx: replace opp-v1 tables by opp-v2 for cpufreq: ti-cpufreq: add support for omap34xx and omap36xx commit 13c1eff1755bdea7fede4b238aadc0228e410dfe Merge: 01d1a860a59b f361c863b3bf Author: Olof Johansson Date: Mon Nov 11 13:09:34 2019 -0800 Merge tag 'hisi-drivers-for-5.5' of git://github.com/hisilicon/linux-hisi into arm/drivers ARM64: hisi: SoC driver updates for 5.5 - check the LOGIC_PIO_INDIRECT region ops at registration instead of in the IO port accessors to optimise the lib/ligic_pio.c - add the hisi LPC driver to the build test for the other architectures except ALPHA, C6X, HEXAGON and PARISC as they do not define {read,write}sb by updating the hisi LPC Kconfig and adding a dummy PIO_INDIRECT_SIZE - clean the sparse complains of the hisi LPC driver - build logic_pio into a lib to avoid including in the vmlinux when not referenced * tag 'hisi-drivers-for-5.5' of git://github.com/hisilicon/linux-hisi: logic_pio: Build into a library bus: hisi_lpc: Expand build test coverage bus: hisi_lpc: Clean some types logic_pio: Define PIO_INDIRECT_SIZE for !CONFIG_INDIRECT_PIO lib: logic_pio: Enforce LOGIC_PIO_INDIRECT region ops are set at registration Link: https://lore.kernel.org/r/5DC959B9.80301@hisilicon.com Signed-off-by: Olof Johansson commit 01d1a860a59b743426845e99c22a21aad35819d2 Merge: 13a6c8efb3b3 662c9d55c5cc Author: Olof Johansson Date: Mon Nov 11 13:09:02 2019 -0800 Merge tag 'v5.4-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers refactor code of mtk-scpsys * tag 'v5.4-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: Refactor bus protection control soc: mediatek: Refactor sram control soc: mediatek: Refactor clock control soc: mediatek: Refactor regulator control soc: mediatek: Refactor polling timeout and documentation Link: https://lore.kernel.org/r/294422a4-37b2-def5-5d32-8988f27c3a5b@gmail.com Signed-off-by: Olof Johansson commit f1deadb5bed4432eac9b793b5b94ad4576082ba0 Merge: 550f2af290c4 5bc8e2875ffb Author: Olof Johansson Date: Mon Nov 11 13:08:42 2019 -0800 Merge tag 'v5.4-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt mt8183: add systimer node and bindings * tag 'v5.4-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: mt8183: add systimer0 device node dt-bindings: mediatek: update bindings for MT8183 systimer Link: https://lore.kernel.org/r/4d3984bd-4bb3-b8c4-6e02-19a7185cd682@gmail.com Signed-off-by: Olof Johansson commit 550f2af290c4c1693df8757f95a3ed9b71b074c6 Merge: 5588aa81d212 4ab88db095c3 Author: Olof Johansson Date: Mon Nov 11 13:08:28 2019 -0800 Merge tag 'v5.4-next-dts' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt mt6323 pmic: add nodes for RTC, keys, codec and power-controller * tag 'v5.4-next-dts' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm: dts: mt6323: add keys, power-controller, rtc and codec Link: https://lore.kernel.org/r/82f16220-d0e1-6e32-088e-c889ef6bdff3@gmail.com Signed-off-by: Olof Johansson commit 16c71c51132847fb260e6b7e741bf6d241a8b9df Merge: 31f4f5b495a6 25cb20a212a1 Author: Rafael J. Wysocki Date: Mon Nov 11 22:06:52 2019 +0100 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework update for v5.5 from Viresh Kumar: "This pull request contains a single patch to allow modification of the OPP voltages at run time." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: PM / OPP: Support adjusting OPP voltages at runtime commit abb0e36b434d784864fe0e4d5dedd17f4d72f3e3 Author: Adam Ford Date: Fri Nov 8 08:40:25 2019 -0600 ARM: dts: logicpd-torpedo: Disable USB Host While the OMAP3 family has a USB Host controller, the Torpedo does not route the host pins off the board rendering it useless. This patch removes the host references. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit fe2b8a880809060f8e9b9e7668f3d319fd09184f Merge: c82488df2460 c9d2203bcb81 Author: David S. Miller Date: Mon Nov 11 12:59:11 2019 -0800 Merge branch 'Accomodate-DSA-front-end-into-Ocelot' Vladimir Oltean says: ==================== Accomodate DSA front-end into Ocelot After the nice "change-my-mind" discussion about Ocelot, Felix and LS1028A (which can be read here: https://lkml.org/lkml/2019/6/21/630), we have decided to take the route of reworking the Ocelot implementation in a way that is DSA-compatible. This is a large series, but hopefully is easy enough to digest, since it contains mostly code refactoring. What needs to be changed: - The struct net_device, phy_device needs to be isolated from Ocelot private structures (struct ocelot, struct ocelot_port). These will live as 1-to-1 equivalents to struct dsa_switch and struct dsa_port. - The function prototypes need to be compatible with DSA (of course, struct dsa_switch will become struct ocelot). - The CPU port needs to be assigned via a higher-level API, not hardcoded in the driver. What is going to be interesting is that the new DSA front-end of Ocelot will need to have features in lockstep with the DSA core itself. At the moment, some more advanced tc offloading features of Ocelot (tc-flower, etc) are not available in the DSA front-end due to lack of API in the DSA core. It also means that Ocelot practically re-implements large parts of DSA (although it is not a DSA switch per se) - see the FDB API for example. The code has been only compile-tested on Ocelot, since I don't have access to any VSC7514 hardware. It was proven to work on NXP LS1028A, which instantiates a DSA derivative of Ocelot. So I would like to ask Alex Belloni if you could confirm this series causes no regression on the Ocelot MIPS SoC. The goal is to get this rework upstream as quickly as possible, precisely because it is a large volume of code that risks gaining merge conflicts if we keep it for too long. This is but the first chunk of the LS1028A Felix DSA driver upstreaming. For those who are interested, the concept can be seen on my private Github repo, the user of this reworked Ocelot driver living under drivers/net/dsa/vitesse/: https://github.com/vladimiroltean/ls1028ardb-linux ==================== Acked-by: Horatiu Vultur Signed-off-by: David S. Miller commit c9d2203bcb813805cd74abe17e9a4c811fc0bf02 Author: Vladimir Oltean Date: Sat Nov 9 15:03:01 2019 +0200 net: mscc: ocelot: don't hardcode the number of the CPU port VSC7514 is a 10-port switch with 2 extra "CPU ports" (targets in the queuing subsystem for terminating traffic locally). There are 2 issues with hardcoding the CPU port as #10: - It is not clear which snippets of the code are configuring something for one of the CPU ports, and which snippets are just doing something related to the number of physical ports. - Actually any physical port can act as a CPU port connected to an external CPU (in addition to the local CPU). This is called NPI mode (Node Processor Interface) and is the way that the 6-port VSC9959 (Felix) switch is integrated inside NXP LS1028A (the "local management CPU" functionality is not used there). This patch makes it clear that the ocelot_bridge_stp_state_set function operates on the CPU port (by making it an implicit member of the bridging domain), and at the same time adds logic for the NPI port (aka a physical port) to play the role of a CPU port (it shouldn't be part of bridge_fwd_mask, as it's not explicitly enslaved to a bridge). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 21468199016f4e4983c7c22368d1cfba3914facb Author: Vladimir Oltean Date: Sat Nov 9 15:03:00 2019 +0200 net: mscc: ocelot: split assignment of the cpu port into a separate function Now that the places that configure routing destinations for the CPU port have been marked as such, allow callers to specify their own CPU port that is different than ocelot->num_phys_ports. A user will be the Felix DSA driver, where the CPU port is one of the physical ports (NPI mode). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 26f4dbab7de240f697cbe4d46dfc37b8a7e58d70 Author: Vladimir Oltean Date: Sat Nov 9 15:02:59 2019 +0200 net: mscc: ocelot: refactor adjust_link into a netdev-independent function This will be called from the Felix DSA frontend, which will work in PHYLIB compatibility mode initially. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2b120dded260adc5c6fb4600cd383b2c7f3537e8 Author: Claudiu Manoil Date: Sat Nov 9 15:02:58 2019 +0200 net: mscc: ocelot: initialize list of multicast addresses in common code This is just common path code that belongs to ocelot_init, it has nothing to do with a specific SoC/board instance. Signed-off-by: Claudiu Manoil Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 889b8950d85287e870288c7503870fd11db3d551 Author: Vladimir Oltean Date: Sat Nov 9 15:02:57 2019 +0200 net: mscc: ocelot: separate the common implementation of ndo_open and ndo_stop Allow these functions to be called from the .port_enable and .port_disable callbacks of DSA. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 31350d7fb985398a61cad8fd7acb6aa3272939d2 Author: Vladimir Oltean Date: Sat Nov 9 15:02:56 2019 +0200 net: mscc: ocelot: move port initialization into separate function We need a function for the DSA front-end that does none of the net_device registration, but initializes the hardware ports. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 714d0ffabeb21550895ff32a8ba8866b684b5203 Author: Vladimir Oltean Date: Sat Nov 9 15:02:55 2019 +0200 net: mscc: ocelot: limit vlan ingress filtering to actual number of ports The VSC7514 switch (Ocelot) is a 10-port device, while VSC9959 (Felix) is 6-port. Therefore the VLAN filtering mask would be out of bounds when calling for this new switch. Fix that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit c7282d387695e711b5edc08aa4111b3a4a8a4c23 Author: Vladimir Oltean Date: Sat Nov 9 15:02:54 2019 +0200 net: mscc: ocelot: refactor ethtool callbacks Convert them into an implementation that can be called from DSA as well. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 004d44f6e5a80429424632467cabba34ccdb79f3 Author: Vladimir Oltean Date: Sat Nov 9 15:02:53 2019 +0200 net: mscc: ocelot: separate net_device related items out of ocelot_port The ocelot and ocelot_port structures will be used by a new DSA driver, so the ocelot_board.c file will have to allocate and work with a private structure (ocelot_port_private), which embeds the generic struct ocelot_port. This is because in DSA, at least one interface does not have a net_device, and the DSA driver API does not interact with that anyway. The ocelot_port structure is equivalent to dsa_port, and ocelot to dsa_switch. The members of ocelot_port which have an equivalent in dsa_port (such as dp->vlan_filtering) have been moved to ocelot_port_private. We want to enforce the coding convention that "ocelot_port" refers to the structure, and "port" refers to the integer index. One can retrieve the structure at any time from ocelot->ports[port]. The patch is large but only contains variable renaming and mechanical movement of fields from one structure to another. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f270dbfab8799f9fd9cfb275df1cabd36c06e918 Author: Vladimir Oltean Date: Sat Nov 9 15:02:52 2019 +0200 net: mscc: ocelot: refactor struct ocelot_port out of function prototypes The ocelot_port structure has a net_device embedded in it, which makes it unsuitable for leaving it in the driver implementation functions. Leave ocelot_flower.c untouched. In that file, ocelot_port is used as an interface to the tc shared blocks. That will be addressed in the next patch. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4bda14156ee22af4825c2dd140e76d0b301bcd1b Author: Vladimir Oltean Date: Sat Nov 9 15:02:51 2019 +0200 net: mscc: ocelot: change prototypes of switchdev port attribute handlers This is needed so that the Felix DSA front-end can call the Ocelot implementations. The implementation of the "mc_disabled" switchdev attribute has also been simplified by using the read-modify-write macro instead of open-coding that operation. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 306fd44b1af9b2a5c245b0f14979cfe62e50fae3 Author: Vladimir Oltean Date: Sat Nov 9 15:02:50 2019 +0200 net: mscc: ocelot: change prototypes of hwtstamping ioctls This is needed in order to present a simpler prototype to the DSA front-end of ocelot. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 531ee1a6a325c877b069a186999c1b9c911027b3 Author: Vladimir Oltean Date: Sat Nov 9 15:02:49 2019 +0200 net: mscc: ocelot: break out fdb operations into abstract implementations To be able to implement a DSA front-end over ocelot_fdb_add, ocelot_fdb_del, ocelot_fdb_dump, these need to have a simple function prototype that is independent of struct net_device, netlink skb, etc. So rename the ndo ops of the ocelot driver into ocelot_port_fdb_{add,del,dump}, and have them all call the abstract implementations. At the same time, refactor ocelot_port_fdb_do_dump into a function whose prototype is compatible with dsa_fdb_dump_cb_t, so that the do_dump implementations can live together and be called by the ocelot_fdb_dump through a function pointer. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9855934c27855002aa977bb879c6e1fe74ee5f03 Author: Vladimir Oltean Date: Sat Nov 9 15:02:48 2019 +0200 net: mscc: ocelot: break apart vlan operations into ocelot_vlan_{add, del} We need an implementation of these functions that is agnostic to the higher layer (switchdev or dsa). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 97bb69e1e36e960b0ecfa2be5ea75ec357a61c3f Author: Vladimir Oltean Date: Sat Nov 9 15:02:47 2019 +0200 net: mscc: ocelot: break apart ocelot_vlan_port_apply This patch transforms the ocelot_vlan_port_apply function ("apply what?") into 3 standalone functions: - ocelot_port_vlan_filtering - ocelot_port_set_native_vlan - ocelot_port_set_pvid These functions have a prototype that is better aligned to the DSA API. The function also had some static initialization (TPID, drop frames with multicast source MAC) which was not being changed from any place, so that was just moved to ocelot_probe_port (one of the 6 callers of ocelot_vlan_port_apply). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e9f930ac88a8936ccc2d021110c98810cf5aa810 Author: Jan Stancek Date: Mon Nov 11 12:58:24 2019 -0800 iomap: fix return value of iomap_dio_bio_actor on 32bit systems Naresh reported LTP diotest4 failing for 32bit x86 and arm -next kernels on ext4. Same problem exists in 5.4-rc7 on xfs. The failure comes down to: openat(AT_FDCWD, "testdata-4.5918", O_RDWR|O_DIRECT) = 4 mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f7b000 read(4, 0xb7f7b000, 4096) = 0 // expects -EFAULT Problem is conversion at iomap_dio_bio_actor() return. Ternary operator has a return type and an attempt is made to convert each of operands to the type of the other. In this case "ret" (int) is converted to type of "copied" (unsigned long). Both have size of 4 bytes: size_t copied = 0; int ret = -14; long long actor_ret = copied ? copied : ret; On x86_64: actor_ret == -14; On x86 : actor_ret == 4294967282 Replace ternary operator with 2 return statements to avoid this unwanted conversion. Fixes: 4721a6010990 ("iomap: dio data corruption and spurious errors when pipes fill") Reported-by: Naresh Kamboju Signed-off-by: Jan Stancek Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b9468ad8ff65e6dcfeb69cab15deecafdb883643 Author: Marc Kleine-Budde Date: Fri Mar 1 16:27:59 2019 +0100 can: flexcan: flexcan_mailbox_read() make use of flexcan_write64() to mark the mailbox as read In the previous patch the function flexcan_write64() was introduced. This patch replaces the open coded variant in flexcan_mailbox_read() that marks a mailbox as read, by a single call to flexcan_write64(). Signed-off-by: Marc Kleine-Budde commit b87c28b726daaa5ac315b59a0ae04282c265580b Author: Marc Kleine-Budde Date: Fri Mar 1 15:38:05 2019 +0100 can: flexcan: flexcan_irq(): add support for TX mailbox in iflag1 The flexcan IP core has up to 64 mailboxes, each one has a corresponding interrupt bit in the iflag1 or iflag2 registers and a mask bit in the imask1 or imask2 registers. The driver will always use the last mailbox for TX, which falls into the iflag2 register. To support CANFD the payload size has to increase to 64 bytes and the number of mailboxes will decrease so much that the TX mailbox will be handled in the iflag1 register. This patch add support to handle the TX mailbox independent whether it's in iflag1 or iflag2 by introducing th flexcan_read_reg_iflag_tx() function, similar to flexcan_read_reg_iflag_rx(), for the read path. For the write path the function flexcan_write64() is added. Signed-off-by: Marc Kleine-Budde commit d3a51507e45e06b22ea892fccfba4b42f704f859 Author: Marc Kleine-Budde Date: Fri Mar 1 15:38:05 2019 +0100 can: flexcan: flexcan_read_reg_iflag_rx(): optimize reading The flexcan IP core has up to 64 mailboxes, each one has a corresponding interrupt bit in the iflag1 or iflag2 registers and a mask bit in the imask1 or imask2 registers. In the timestamp (i.e. non FIFO) mode the driver needs to mask all non RX interrupt sources, it uses the precomputed value rx_mask of struct flexcan_priv for this. In certain use cases, for example the CANFD mode, the contents of the iflag2 register is completely masked. This patch optimizes the flexcan_read_reg_iflag_rx() function by not reading the iflag1 or iflag2 register if the contents is masked. Signed-off-by: Marc Kleine-Budde commit 0ca64f02de380e0b75b9555d325e6dcfe36470ef Author: Marc Kleine-Budde Date: Fri Mar 1 13:54:19 2019 +0100 can: flexcan: introduce struct flexcan_priv::tx_mask and make use of it The current driver uses FLEXCAN_IFLAG2_MB() to generate the mask to check for the TX complete interrupt. This works well, as the driver will always use the last mailbox for TX, which falls into the iflag2 register. To support CANFD the payload size has to increase to 64 bytes and the number of mailboxes will decrease so much that the TX mailbox will be handled in the iflag1 register. This patch introduces a tx_mask in the struct flexcan_priv (similar to rx_mask) and makes use of it. The actual support to handle the TX mailbox in iflag1 will be added in the next patches. Signed-off-by: Marc Kleine-Budde commit 8ce5139e3db829d53c2f33ff812cea4f1f075e9c Author: Marc Kleine-Budde Date: Fri Mar 1 12:17:30 2019 +0100 can: flexcan: convert struct flexcan_priv::rx_mask{1,2} to rx_mask The flexcan IP core has up to 64 mailboxes, each one has a corresponding interrupt bit in the iflag1 or iflag2 registers and a mask bit in the imask1 or imask2 registers. In the timestamp (i.e. non FIFO) mode the driver needs to mask out all non RX interrupt sources and uses the precomputed values rx_mask1 and rx_mask2 of struct flexcan_priv for this. This patch merges the two u32 rx_mask1 and rx_mask2 to a single u64 rx_mask variable, which simplifies the code a bit. Signed-off-by: Marc Kleine-Budde commit 9ed63c60c9e3ace16e4307866cc01e8ddf296155 Author: Marc Kleine-Budde Date: Fri Mar 1 10:22:26 2019 +0100 can: flexcan: remove TX mailbox bit from struct flexcan_priv::rx_mask{1,2} The flexcan IP core has up to 64 mailboxes, each one has a corresponding interrupt bit in the iflag1 or iflag2 registers and a mask bit in the imask1 or imask2 registers. In the timestamp (i.e. non FIFO) mode the driver needs to mask out all non RX interrupt sources and uses the precomputed values rx_mask1 and rx_mask2 of struct flexcan_priv for this. Currently these values cannot be used directly, as they contain the TX mailbox flag. This patch removes the TX flag from flexcan_priv::rx_mask1 and flexcan_priv::rx_mask2, and sets the TX flag directly when writing the regs->iflag1 and regs->iflag2 into the hardware. Signed-off-by: Marc Kleine-Budde commit 07c054d3e53fe27025dae5e232465c8ecf658ebf Author: Marc Kleine-Budde Date: Fri Mar 1 09:18:54 2019 +0100 can: flexcan: rename struct flexcan_priv::reg_imask{1,2}_default to rx_mask{1,2} The flexcan IP core has up to 64 mailboxes, each one has a corresponding interrupt bit in the iflag1 or iflag2 registers and a mask bit in the imask1 or imask2 registers. In the timestamp (i.e. non FIFO) mode the driver needs to mask out all non RX interrupt sources and uses the precomputed values reg_imask1_default and reg_imask2_default of struct flexcan_priv for this. However in the current driver the reg_imask{1,2}_default cannot be used directly to get the pending RX interrupts. The TX interrupt is part of these variables, so it needs to be masked out, too. This is a preparation patch to clean up calculation of the pending RX interrupts, it only renames the variables from reg_imask{1,2}_default to rx_mask{1,2} To better reflect their meaning after the complete conversion. This change is done with the following sed command: sed -i -e "s/reg_imask\(1\|2\)_default/rx_mask\1/" drivers/net/can/flexcan.c Signed-off-by: Marc Kleine-Budde commit 4e26598a7d3cd1bf6a0843042997963f9828a6ba Author: Marc Kleine-Budde Date: Fri Mar 1 16:29:47 2019 +0100 can: flexcan: flexcan_irq(): rename variable reg_iflag -> reg_iflag_rx This patch renames the variable reg_iflag in the flexcan_irq() function to reg_iflag_rx. This better reflects the contents of the varibale. It does not hold the unmodified iflag registers, instead all non RX interrupts have been masked. Signed-off-by: Marc Kleine-Budde commit b36d3c0f7e70dff646b87e2c3d4ee0ac953d8b49 Author: Marc Kleine-Budde Date: Fri Mar 1 11:12:13 2019 +0100 can: flexcan: rename macro FLEXCAN_IFLAG_MB() -> FLEXCAN_IFLAG2_MB() The macro FLEXCAN_IFLAG_MB() is always used for the iflag2 register, so rename it to FLEXCAN_IFLAG2_MB() Signed-off-by: Marc Kleine-Budde commit 58ed8e77d3123acb6ece7d016c8db393d5c0d488 Author: Marc Kleine-Budde Date: Wed Oct 9 15:15:37 2019 +0200 can: flexcan: flexcan_irq_state(): only read timestamp if needed The function flexcan_irq_state() checks the controller for CAN state changes and pushes a skb with the new state and a timestamp into the rx-offload framework. This patch optimizes the function by only reading the timestamp, if a state change is detected. Signed-off-by: Marc Kleine-Budde commit a4721f27b94a807205d96a24c9f70fe7caf81b3b Author: Joakim Zhang Date: Sun Sep 29 08:32:09 2019 +0000 can: flexcan: use devm_platform_ioremap_resource() to simplify code Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together to simplify the code. Signed-off-by: Joakim Zhang Reviewed-by: Sean Nyekjaer Signed-off-by: Marc Kleine-Budde commit 4e9c9484b085dbba60b299182dd490eaeb84d18a Author: Joakim Zhang Date: Fri Jul 12 08:02:38 2019 +0000 can: rx-offload: Prepare for CAN FD support The skbs for classic CAN and CAN FD frames are allocated with seperate functions: alloc_can_skb() and alloc_canfd_skb(). In order to support CAN FD frames via the rx-offload helper, the driver itself has to allocate the skb (depending whether it received a classic CAN or CAN FD frame), as the rx-offload helper cannot know which kind of CAN frame the driver has received. This patch moves the allocation of the skb into the struct can_rx_offload::mailbox_read callbacks of the the flexcan and ti_hecc driver and adjusts the rx-offload helper accordingly. Signed-off-by: Joakim Zhang Signed-off-by: Marc Kleine-Budde commit 61d2350615c2c42f7af65d9a575f5dbf9738a10e Author: Marc Kleine-Budde Date: Mon Oct 7 13:36:58 2019 +0200 can: rx-offload: can_rx_offload_reset(): remove no-op function This patch removes the function can_rx_offload_reset(), as it does nothing. If we ever need this function, add it back again. Signed-off-by: Marc Kleine-Budde commit f1242cd981e36385169281bf7b978e2bfa942eb5 Author: Marc Kleine-Budde Date: Mon Oct 7 10:00:52 2019 +0200 can: rx-offload: can_rx_offload_irq_offload_timestamp(): don't use assignment in if condition This patch moves the assignment of queue_len out of the if condition. Signed-off-by: Marc Kleine-Budde commit a7b70e2d62d86fcb3f665d325dbc6f0303ee3c51 Author: Marc Kleine-Budde Date: Mon Oct 7 10:00:25 2019 +0200 can: rx-offload: can_rx_offload_compare(): fix typo This patch fixes a typo found by checkpatch. Signed-off-by: Marc Kleine-Budde commit 54dd0b8904ac4c70df7616d39b80390835fede80 Author: Marc Kleine-Budde Date: Mon Oct 7 09:59:49 2019 +0200 can: rx-offload: fix long lines This patch fixes the checkpatch warnings about too long lines. Signed-off-by: Marc Kleine-Budde commit 0767bbe530c123e0945f4c4c60639005ce44fede Author: YueHaibing Date: Tue Oct 15 22:27:44 2019 +0800 can: sun4i: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Marc Kleine-Budde commit ac9921ded292bf3e8c201387bbbc0c3e171cae26 Author: YueHaibing Date: Tue Oct 15 22:30:47 2019 +0800 can: rcar: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Marc Kleine-Budde commit 8dab8c65d1b519aa6466dbd433b7062382d24ade Author: YueHaibing Date: Tue Oct 15 22:20:46 2019 +0800 can: ifi: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Reviewed-by: Simon Horman Signed-off-by: Marc Kleine-Budde commit 65725aa8829f0042db888c2b7e6cc8f1d79e7131 Author: YueHaibing Date: Mon Sep 30 17:49:09 2019 +0800 can: grcan: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Sean Nyekjaer Signed-off-by: Marc Kleine-Budde commit 6b43a2650806ca59e9ac2554cfd1cf23ed491879 Author: Pankaj Sharma Date: Wed Oct 30 17:08:59 2019 +0530 can: m_can: add support for handling arbitration error The Bosch MCAN hardware (3.1.0 and above) supports interrupt flag to detect Protocol error in arbitration phase. Transmit error statistics is currently not updated from the MCAN driver. Protocol error in arbitration phase is a TX error and the network statistics should be updated accordingly. The member "tx_error" of "struct net_device_stats" should be incremented as arbitration is a transmit protocol error. Also "arbitration_lost" of "struct can_device_stats" should be incremented to report arbitration lost. Signed-off-by: Pankaj Sharma Signed-off-by: Sriram Dash Signed-off-by: Marc Kleine-Budde commit fb7d6a81c220178851badef9dd6eeba88264320a Author: Pankaj Sharma Date: Mon Oct 21 17:34:40 2019 +0530 can: m_can: add support for one shot mode According to the CAN Specification (see ISO 11898-1:2015, 8.3.4 Recovery Management), the M_CAN provides means for automatic retransmission of frames that have lost arbitration or that have been disturbed by errors during transmission. By default automatic retransmission is enabled. The Bosch MCAN controller has support for disabling automatic retransmission. To support time-triggered communication as described in ISO 11898-1:2015, chapter 9.2, the automatic retransmission may be disabled via CCCR.DAR. CAN_CTRLMODE_ONE_SHOT is used for disabling automatic retransmission. Signed-off-by: Pankaj Sharma Signed-off-by: Sriram Dash Signed-off-by: Marc Kleine-Budde commit 0ff8ee89624aaa74ee48a3015b4c1305b357e401 Author: YueHaibing Date: Tue Oct 15 22:26:19 2019 +0800 can: xilinx_can: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Marc Kleine-Budde commit 91e9f2c0e7a49ec6a6673b4d97d535b838396fc9 Author: Anssi Hannula Date: Fri Oct 4 12:02:56 2019 +0300 can: xilinx_can: avoid non-requested bus error frames Userspace can signal with CAN_CTRLMODE_BERR_REPORTING whether they need reporting of bus errors (CAN_ERR_BUSERROR) or not. However, xilinx_can driver currently always sends CAN_ERR_BUSERROR frames to userspace on bus errors. To improve performance on error conditions when bus error reporting is not needed, avoid sending CAN_ERR_BUSERROR frames unless requested via CAN_CTRLMODE_BERR_REPORTING. The error interrupt is still kept enabled as there is no dedicated state transition interrupt, but just disabling error frame submission still yields a significant performance improvement. In a simple test with continuous bus errors and no userspace programs reading/writing CAN I saw system CPU load reduced by 1/3. Tested on a ZynqMP board with CAN-FD v1.0. Signed-off-by: Anssi Hannula Signed-off-by: Marc Kleine-Budde commit b687a7792b9c28778f1d4359fafcec3c17147c58 Author: Marc Kleine-Budde Date: Fri Oct 4 20:22:22 2019 +0200 can: xilinx_can: fix checkpatch warnings This patch fixes several checkpatch warnings. Signed-off-by: Marc Kleine-Budde commit 2b1a4547c122dcb9999e1a876236b44408c7d01c Author: Stephane Grosjean Date: Mon Sep 16 16:15:44 2019 +0200 can: peak_canfd: provide hw timestamps in rx skbs PEAK-System's CAN FD interfaces based on an IP core provide a timestamp for each CAN and STATUS message received. This patch transfers these received timestamps (clocked in microseconds) to hardware timestamps (clocked in nanoseconds) in the corresponding skbs raised to the network layer. Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit 3cc9358fb51f160e78746fce4adb60b913fb5cc1 Author: Marc Kleine-Budde Date: Tue Oct 1 21:50:20 2019 +0200 can: peak_canfd: fix checkpatch warnings This patch fixes checkpatch warnings in the peak_canfd driver. Signed-off-by: Marc Kleine-Budde commit e577ba728bf50ea0b6b9b9a833d75fa45ed9a26a Author: Marc Kleine-Budde Date: Tue Oct 8 10:16:48 2019 +0200 can: c_can: c_can_plaform: fix checkpatch warnings This patch fixes several checkpatch warnings in the c_can_platform driver glue code. Signed-off-by: Marc Kleine-Budde commit 8ce8c0abcba314e1fe954a1840f6568bf5aef2ef Author: Timo Schlüßler Date: Fri Oct 11 15:38:20 2019 +0200 can: mcp251x: only reset hardware as required This prevents unwanted glitches on the outputs when changing the link state of the can interface or when resuming from suspend. Only if the device is powered off during suspend it needs to be resetted as required by the specs. Signed-off-by: Timo Schlüßler Signed-off-by: Marc Kleine-Budde commit 877a902103fd3ed15872a5d740fca8aa3f5fa33f Author: Timo Schlüßler Date: Fri Oct 11 15:38:20 2019 +0200 can: mcp251x: add mcp251x_write_2regs() and make use of it This patch introduces the function mcp251x_write_2regs() to write two registers with one SPI transfer and converts the disabling of pending interrupts in mcp251x_stop() to it. Signed-off-by: Timo Schlüßler Signed-off-by: Marc Kleine-Budde commit 50ec88120ea16cf8b9aabf8422c364166ce3ee17 Author: Andy Shevchenko Date: Tue Oct 8 19:20:39 2019 +0300 can: mcp251x: get rid of legacy platform data Instead of using legacy platform data, switch to use device properties. For clock frequency we are using well established clock-frequency property. Users, two for now, are also converted here. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Russell King Signed-off-by: Andy Shevchenko Signed-off-by: Marc Kleine-Budde commit 371fd7baa81d2adb05c390f8f8a42a4f02173cbd Author: Gustavo A. R. Silva Date: Fri Oct 20 22:36:52 2017 -0500 can: dev: can_restart(): remove unused code Value assigned to variable err is overwritten at line 562: err = priv->do_set_mode(dev, CAN_MODE_START); before it can be used. Also, notice that this code has been there since 2014. Addresses-Coverity-ID: 1227031 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Marc Kleine-Budde commit c1d51f684c72b5eb2aecbbd47be3a2977a2dc903 Author: Rafael J. Wysocki Date: Thu Nov 7 15:25:12 2019 +0100 cpuidle: Use nanoseconds as the unit of time Currently, the cpuidle subsystem uses microseconds as the unit of time which (among other things) causes the idle loop to incur some integer division overhead for no clear benefit. In order to allow cpuidle to measure time in nanoseconds, add two new fields, exit_latency_ns and target_residency_ns, to represent the exit latency and target residency of an idle state in nanoseconds, respectively, to struct cpuidle_state and initialize them with the help of the corresponding values in microseconds provided by drivers. Additionally, change cpuidle_governor_latency_req() to return the idle state exit latency constraint in nanoseconds. Also meeasure idle state residency (last_residency_ns in struct cpuidle_device and time_ns in struct cpuidle_driver) in nanoseconds and update the cpuidle core and governors accordingly. However, the menu governor still computes typical intervals in microseconds to avoid integer overflows. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Acked-by: Doug Smythies Tested-by: Doug Smythies commit 0b491904f053e41685162af5c5411b85b18c97a7 Author: Markus Elfring Date: Sat Nov 9 17:19:35 2019 +0100 ARM: OMAP2+: Add missing put_device() call in omapdss_init_of() A coccicheck run provided information like the following. arch/arm/mach-omap2/display.c:268:2-8: ERROR: missing put_device; call of_find_device_by_node on line 258, but without a corresponding object release within this function. Generated by: scripts/coccinelle/free/put_device.cocci Thus add the missed function call to fix the exception handling for this function implementation. Fixes: e0c827aca0730b51f38081aa4e8ecf0912aab55f ("drm/omap: Populate DSS children in omapdss driver") Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren commit c82488df2460e6cec68e99fd2a850b1b5aa47a0a Merge: 228200179213 f0942e00a1ab Author: David S. Miller Date: Mon Nov 11 12:51:03 2019 -0800 Merge branch 'net-dsa-mv88e6xxx-Add-support-for-port-mirroring' Iwan R Timmer says: ==================== net: dsa: mv88e6xxx: Add support for port mirroring This patch series add support for port mirroring in the mv88e6xx switch driver. The first patch changes the set_egress_port function to allow different egress ports for egress and ingress traffic. The second patch adds the actual code for port mirroring support. Tested on a 88E6176 with: tc qdisc add dev wan0 clsact tc filter add dev wan0 ingress matchall skip_sw \ action mirred egress mirror dev lan2 tc filter add dev wan0 egress matchall skip_sw \ action mirred egress mirror dev lan3 Changes in v3 - Use enum for egress traffic direction - Keep track of egress ports on mv88e6390 - Move booleans in struct for better structure packing Changes in v2 - Support mirroring egress and ingress traffic to different ports - Check for invalid configurations when multiple ports are mirrored ==================== Signed-off-by: David S. Miller commit f0942e00a1abb6404ca4302c66497fc623676c11 Author: Iwan R Timmer Date: Thu Nov 7 22:11:14 2019 +0100 net: dsa: mv88e6xxx: Add support for port mirroring Add support for configuring port mirroring through the cls_matchall classifier. We do a full ingress and/or egress capture towards a capture port. It allows setting a different capture port for ingress and egress traffic. It keeps track of the mirrored ports and the destination ports to prevent changes to the capture port while other ports are being mirrored. Signed-off-by: Iwan R Timmer Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5c74c54ce6fff719999ff48f128cf4150ee4ff59 Author: Iwan R Timmer Date: Thu Nov 7 22:11:13 2019 +0100 net: dsa: mv88e6xxx: Split monitor port configuration Separate the configuration of the egress and ingress monitor port. This allows the port mirror functionality to do ingress and egress port mirroring to separate ports. Signed-off-by: Iwan R Timmer Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7b6560b4bc623dd1344de32404fd5a901cd1b28e Author: Ben Dooks (Codethink) Date: Wed Nov 6 11:59:45 2019 +0000 OMAP2: fixup doc comments in omap_device The documentation comments in this file are out of date with the code, so fix this to avoid the following warnings: arch/arm/mach-omap2/omap_device.c:133: warning: Function parameter or member 'pdev' not described in 'omap_device_build_from_dt' arch/arm/mach-omap2/omap_device.c:133: warning: Excess function parameter 'pdev_name' description in 'omap_device_build_from_dt' arch/arm/mach-omap2/omap_device.c:133: warning: Excess function parameter 'pdev_id' description in 'omap_device_build_from_dt' arch/arm/mach-omap2/omap_device.c:133: warning: Excess function parameter 'oh' description in 'omap_device_build_from_dt' arch/arm/mach-omap2/omap_device.c:133: warning: Excess function parameter 'pdata' description in 'omap_device_build_from_dt' arch/arm/mach-omap2/omap_device.c:133: warning: Excess function parameter 'pdata_len' description in 'omap_device_build_from_dt' arch/arm/mach-omap2/omap_device.c:309: warning: Function parameter or member 'pdev' not described in 'omap_device_get_context_loss_count' arch/arm/mach-omap2/omap_device.c:309: warning: Excess function parameter 'od' description in 'omap_device_get_context_loss_count' arch/arm/mach-omap2/omap_device.c:335: warning: Function parameter or member 'ohs' not described in 'omap_device_alloc' arch/arm/mach-omap2/omap_device.c:335: warning: Function parameter or member 'oh_cnt' not described in 'omap_device_alloc' arch/arm/mach-omap2/omap_device.c:335: warning: Excess function parameter 'oh' description in 'omap_device_alloc' arch/arm/mach-omap2/omap_device.c:335: warning: Excess function parameter 'pdata' description in 'omap_device_alloc' arch/arm/mach-omap2/omap_device.c:335: warning: Excess function parameter 'pdata_len' description in 'omap_device_alloc' arch/arm/mach-omap2/omap_device.c:659: warning: Function parameter or member 'pdev' not described in 'omap_device_register' arch/arm/mach-omap2/omap_device.c:659: warning: Excess function parameter 'od' description in 'omap_device_register' arch/arm/mach-omap2/omap_device.c:682: warning: Function parameter or member 'pdev' not described in 'omap_device_enable' arch/arm/mach-omap2/omap_device.c:682: warning: Excess function parameter 'od' description in 'omap_device_enable' arch/arm/mach-omap2/omap_device.c:713: warning: Function parameter or member 'pdev' not described in 'omap_device_idle' arch/arm/mach-omap2/omap_device.c:713: warning: Excess function parameter 'od' description in 'omap_device_idle' Signed-off-by: Ben Dooks (Codethink) Signed-off-by: Tony Lindgren commit f87a2537cd9a1d2553f3f076c92fe0c11718c365 Merge: bc794744cdc5 dafd24c727e8 Author: Tony Lindgren Date: Mon Nov 11 12:48:55 2019 -0800 Merge branch 'omap-for-v5.5/omap1' into omap-for-v5.5/soc commit 228200179213bfc9b4d6097e1c26de30bd18c1e6 Author: John Efstathiades Date: Thu Nov 7 17:08:33 2019 +0000 Support LAN743x PTP periodic output on any GPIO The LAN743x Ethernet controller provides two independent PTP event channels. Each one can be used to generate a periodic output from the PTP clock. The output can be routed to any one of the available GPIO pins on the device. The PTP clock API can now be used to: - select any LAN743x GPIO pin to function as a periodic output - select either LAN743x PTP event channel to generate the output The LAN7430 has 4 GPIO pins that are multiplexed with its internal PHY LED control signals. A pin assigned to the LED control function will be assigned to the GPIO function if selected for PTP periodic output. Signed-off-by: John Efstathiades Signed-off-by: David S. Miller commit 26285f1359695e94751e01a4755d322af0e74145 Merge: 7941af9b38fa af580ae2dcb2 Author: David S. Miller Date: Mon Nov 11 12:45:31 2019 -0800 Merge branch 'Unlock-new-potential-in-SJA1105-with-PTP-system-timestamping' Vladimir Oltean says: ==================== Unlock new potential in SJA1105 with PTP system timestamping The SJA1105 being an automotive switch means it is designed to live in a set-and-forget environment, far from the configure-at-runtime nature of Linux. Frequently resetting the switch to change its static config means it loses track of its PTP time, which is not good. This patch series implements PTP system timestamping for this switch (using the API introduced for SPI here: https://www.mail-archive.com/netdev@vger.kernel.org/msg316725.html), adding the following benefits to the driver: - When under control of a user space PTP servo loop (ptp4l, phc2sys), the loss of sync during a switch reset is much more manageable, and the switch still remains in the s2 (locked servo) state. - When synchronizing the switch using the software technique (based on reading clock A and writing the value to clock B, as opposed to relying on hardware timestamping), e.g. by using phc2sys, the sync accuracy is vastly improved due to the fact that the actual switch PTP time can now be more precisely correlated with something of better precision (CLOCK_REALTIME). The issue is that SPI transfers are inherently bad for measuring time with low jitter, but the newly introduced API aims to alleviate that issue somewhat. This series is also a requirement for a future patch set that adds full time-aware scheduling offload support for the switch. ==================== Acked-by: Richard Cochran Signed-off-by: David S. Miller commit af580ae2dcb250719857b4b7024bd4bb0c2e05fb Author: Vladimir Oltean Date: Sat Nov 9 13:32:24 2019 +0200 net: dsa: sja1105: Disallow management xmit during switch reset The purpose here is to avoid ptp4l fail due to this condition: timed out while polling for tx timestamp increasing tx_timestamp_timeout may correct this issue, but it is likely caused by a driver bug port 1: send peer delay request failed So either reset the switch before the management frame was sent, or after it was timestamped as well, but not in the middle. The condition may arise either due to a true timeout (i.e. because re-uploading the static config takes time), or due to the TX timestamp actually getting lost due to reset. For the former we can increase tx_timestamp_timeout in userspace, for the latter we need this patch. Locking all traffic during switch reset does not make sense at all, though. Forcing all CPU-originated traffic to potentially block waiting for a sleepable context to send > 800 bytes over SPI is not a good idea. Flows that are autonomously forwarded by the switch will get dropped anyway during switch reset no matter what. So just let all other CPU-originated traffic be dropped as well. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6cf99c13ea07b5cb345d83598adea60823cea576 Author: Vladimir Oltean Date: Sat Nov 9 13:32:23 2019 +0200 net: dsa: sja1105: Restore PTP time after switch reset The PTP time of the switch is not preserved when uploading a new static configuration. Work around this hardware oddity by reading its PTP time before a static config upload, and restoring it afterwards. Static config changes are expected to occur at runtime even in scenarios directly related to PTP, i.e. the Time-Aware Scheduler of the switch is programmed in this way. Perhaps the larger implication of this patch is that the PTP .gettimex64 and .settime functions need to be exposed to sja1105_main.c, where the PTP lock needs to be held during this entire process. So their core implementation needs to move to some common functions which get exposed in sja1105_ptp.h. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 34d76e9fa846a87e7924ab974e4cb70394a4fcac Author: Vladimir Oltean Date: Sat Nov 9 13:32:22 2019 +0200 net: dsa: sja1105: Implement the .gettimex64 system call for PTP Through the PTP_SYS_OFFSET_EXTENDED ioctl, it is possible for userspace applications (i.e. phc2sys) to compensate for the delays incurred while reading the PHC's time. The task itself of taking the software timestamp is delegated to the SPI subsystem, through the newly introduced API in struct spi_transfer. The goal is to cross-timestamp I/O operations on the switch's PTP clock with values in the local system clock (CLOCK_REALTIME). For that we need to understand a bit of the hardware internals. The 'read PTP time' message is a 12 byte structure, first 4 bytes of which represent the SPI header, and the last 8 bytes represent the 64-bit PTP time. The switch itself starts processing the command immediately after receiving the last bit of the address, i.e. at the middle of byte 3 (last byte of header). The PTP time is shadowed to a buffer register in the switch, and retrieved atomically during the subsequent SPI frames. A similar thing goes on for the 'write PTP time' message, although in that case the switch waits until the 64-bit PTP time becomes fully available before taking any action. So the byte that needs to be software-timestamped is byte 11 (last) of the transfer. The patch creates a common (and local) sja1105_xfer implementation for the SPI I/O, and offers 3 front-ends: - sja1105_xfer_u32 and sja1105_xfer_u64: these are capable of optionally requesting a PTP timestamp - sja1105_xfer_buf: this is for large transfers (e.g. the static config buffer) and other misc data, and there is no point in giving timestamping capabilities to this. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2713fefa5dd511b18ddc73b978273eec3ae08f6d Author: Darrick J. Wong Date: Sat Nov 9 12:04:30 2019 -0800 xfs: attach dquots before performing xfs_swap_extents Make sure we attach dquots to both inodes before swapping their extents. This was found via manual code inspection by looking for places where we could call xfs_trans_mod_dquot without dquots attached to inodes, and confirmed by instrumenting the kernel and running xfs/328. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 2815a16d7ff6230a8e37928829d221bb075aa160 Author: Darrick J. Wong Date: Fri Nov 8 23:04:20 2019 -0800 xfs: attach dquots and reserve quota blocks during unwritten conversion In xfs_iomap_write_unwritten, we need to ensure that dquots are attached to the inode and quota blocks reserved so that we capture in the quota counters any blocks allocated to handle a bmbt split. This can happen on the first unwritten extent conversion to a preallocated sparse file on a fresh mount. This was found by running generic/311 with quotas enabled. The bug seems to have been introduced in "[XFS] rework iocore infrastructure, remove some code and make it more" from ~2002? Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 27d9ee577dccec94fb0fc1a14728de64db342f86 Author: Darrick J. Wong Date: Wed Nov 6 08:47:09 2019 -0800 xfs: actually check xfs_btree_check_block return in xfs_btree_islastblock Coverity points out that xfs_btree_islastblock doesn't check the return value of xfs_btree_check_block. Since the question "Does the cursor point to the last block in this level?" only makes sense if the caller previously performed a lookup or seek operation, the block should already have been checked. Therefore, check the return value in an ASSERT and turn the whole thing into a static inline predicate. Coverity-id: 114069 Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 7be5f90f689af5abb6b16755e212f76ed97a20dd Author: Patrick Williams Date: Tue Oct 1 11:00:00 2019 -0500 i2c: pxa: remove unused i2c-slave APIs With the i2c-pxa driver migrated to the standard i2c-slave APIs, the custom APIs and structures are no longer needed or used. Remove them. Signed-off-by: Patrick Williams Signed-off-by: Wolfram Sang commit 4d51b4cea21831422614366de4e929701846d801 Author: Patrick Williams Date: Tue Oct 1 10:59:59 2019 -0500 i2c: pxa: migrate to new i2c_slave APIs The i2c subsystem was enhanced circa 2015 to support operating as an i2c-slave device. Prior to that, the i2c-pxa driver supported an i2c-slave but had its own APIs. There are no existing in-kernel drivers or platforms that utilize the i2c-pxa APIs. Migrate the i2c-pxa driver to the general i2c-slave APIs so that existing drivers, such as the i2c-slave-eeprom, can be used. This has been tested with a Marvell EspressoBin, using i2c-pxa and i2c-slave-eeprom, acting as a slave, and a RaspeberryPi 3, using the at24 driver, acting as a master. Signed-off-by: Patrick Williams Signed-off-by: Wolfram Sang commit 9af1563a54865a2973d4c0cbeaa95809cf4b14e0 Author: Akshu Agrawal Date: Mon Nov 11 21:44:28 2019 +0530 i2c: cros-ec-tunnel: Make the device acpi compatible Add ACPI entry and use device_property_read to get fw value which is common to both dtsi and acpi. Signed-off-by: Akshu Agrawal Acked-by: Raul E Rangel Reviewed-by: Enric Balletbo i Serra Signed-off-by: Wolfram Sang commit d77eceb2de99f5d7e0c645bad15511fe1af59e09 Author: Alain Volmat Date: Thu Oct 24 14:52:00 2019 +0200 i2c: stm32f7: report dma error during probe Distinguish between the case where dma information is not provided within the DT and the case of an error during the dma init. Exit the probe with error in case of an error during dma init. Fixes: bb8822cbbc53 ("i2c: i2c-stm32: Add generic DMA API") Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit dafd24c727e8115266c0dc1ae088f691b6d1e4c4 Author: Uwe Kleine-König Date: Mon Nov 11 18:10:34 2019 +0100 ARM: OMAP1: drop duplicated dependency on ARCH_OMAP1 All of arch/arm/mach-omap1/Kconfig is enclosed in a big "if ARCH_OMAP1" and so every symbol already has a dependency on ARCH_OMAP1 even without mentioning it in their list of dependencies. Also dependencies on ARCH_OMAP can be dropped as it is selected by ARCH_OMAP1. Signed-off-by: Uwe Kleine-König Acked-by: Aaro Koskinen Signed-off-by: Tony Lindgren commit 1246b8146c550641b3217eef65792685ca2dcdc5 Author: Christoph Hellwig Date: Wed Oct 16 08:11:43 2019 +0200 csky: remove ioremap_cache No driver that can be used on csky uses ioremap_cache, and this interface has been deprecated in favor of memremap. Signed-off-by: Christoph Hellwig Acked-by: Guo Ren commit 38af57825313f6c9404b42c4e4fa22311f60383a Author: Christoph Hellwig Date: Tue Aug 13 11:27:56 2019 +0200 riscv: use the generic ioremap code Use the generic ioremap code instead of providing a local version. Note that this relies on the asm-generic no-op definition of pgprot_noncached. Signed-off-by: Christoph Hellwig Reviewed-by: Paul Walmsley Tested-by: Paul Walmsley # rv32, rv64 boot Acked-by: Paul Walmsley # arch/riscv commit 80b0ca98f91ddbc09828aff5a00af1c73837713e Author: Christoph Hellwig Date: Tue Aug 13 11:24:04 2019 +0200 lib: provide a simple generic ioremap implementation A lot of architectures reuse the same simple ioremap implementation, so start lifting the most simple variant to lib/ioremap.c. It provides ioremap_prot and iounmap, plus a default ioremap that uses prot_noncached, although that can be overridden by asm/io.h. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Reviewed-by: Palmer Dabbelt commit 98c90e5ea34e98bdd4bcb67c48a0bdfd59bcd6cd Author: Christoph Hellwig Date: Tue Aug 13 08:11:46 2019 +0200 sh: remove __iounmap No need to indirect iounmap for sh. Signed-off-by: Christoph Hellwig commit 3f3ded99aecf3498ac9a976ec2b02cf5c6281bd4 Author: Christoph Hellwig Date: Tue Aug 13 08:11:46 2019 +0200 nios2: remove __iounmap No need to indirect iounmap for nios2. Signed-off-by: Christoph Hellwig commit 9425172ecd5df77bc3ba317484132f820ff6b1db Author: Christoph Hellwig Date: Tue Aug 13 08:11:46 2019 +0200 hexagon: remove __iounmap No need to indirect iounmap for hexagon. Signed-off-by: Christoph Hellwig commit 076863473c0cdbf7fdcbf97e1878028ccde3b4ec Author: Christoph Hellwig Date: Tue Aug 13 08:14:41 2019 +0200 m68k: rename __iounmap and mark it static m68k uses __iounmap as the name for an internal helper that is only used for some CPU types. Mark it static, give it a better name and move it around a bit to avoid a forward declaration. Signed-off-by: Christoph Hellwig Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven commit d092a87073269677b7ff09e71a8d91912b7f969a Author: Christoph Hellwig Date: Wed Oct 16 08:09:38 2019 +0200 arch: rely on asm-generic/io.h for default ioremap_* definitions Various architectures that use asm-generic/io.h still defined their own default versions of ioremap_nocache, ioremap_wt and ioremap_wc that point back to plain ioremap directly or indirectly. Remove these definitions and rely on asm-generic/io.h instead. For this to work the backup ioremap_* defintions needs to be changed to purely cpp macros instea of inlines to cover for architectures like openrisc that only define ioremap after including . Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Reviewed-by: Palmer Dabbelt commit 97c9801a15e5b0c9a20e495b2ccabf010894e74b Author: Christoph Hellwig Date: Sun Aug 11 14:53:20 2019 +0200 asm-generic: don't provide ioremap for CONFIG_MMU All MMU-enabled ports have a non-trivial ioremap and should thus provide the prototype for their implementation instead of providing a generic one unless a different symbol is not defined. Note that this only affects sparc32 nds32 as all others do provide their own version. Also update the kerneldoc comments in asm-generic/io.h to explain the situation around the default ioremap* implementations correctly. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann commit e97133959ad2942ae43c81a08858bef01bc0ec18 Author: Christoph Hellwig Date: Tue Aug 13 07:53:05 2019 +0200 asm-generic: ioremap_uc should behave the same with and without MMU Whatever reason there is for the existence of ioremap_uc, and the fact that it returns NULL by default on architectures with an MMU applies equally to nommu architectures, so don't provide different defaults. In practice the difference is meaningless as the only portable driver that uses ioremap_uc is atyfb which probably doesn't show up on nommu devices. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Reviewed-by: Palmer Dabbelt commit 94de879c28d8e6c20bfec308de84703625221712 Author: Michael Guralnik Date: Fri Nov 8 23:45:28 2019 +0000 IB/mlx5: Load profile according to RoCE enablement state When RoCE is disabled load mlx5_ib in raw_eth profile. Clean pf_profile roce capability checks as it will not be used without roce capability. Signed-off-by: Michael Guralnik Reviewed-by: Maor Gottlieb Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit b5a498baf929a15536a4275967cf2377ad1b6015 Author: Michael Guralnik Date: Fri Nov 8 23:45:26 2019 +0000 IB/mlx5: Rename profile and init methods Rename uplink_rep_profile and its unique init and cleanup stages to suit its upcoming use as the profile when RoCE is disabled. Signed-off-by: Michael Guralnik Reviewed-by: Maor Gottlieb Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit cc9defcbb8fae52810f7795b039223edae51ef95 Author: Michael Guralnik Date: Fri Nov 8 23:45:24 2019 +0000 net/mlx5: Handle "enable_roce" devlink param Register "enable_roce" param, default value is RoCE enabled. Current configuration is stored on mlx5_core_dev and exposed to user through the cmode runtime devlink param. Changing configuration requires changing the cmode driverinit devlink param and calling devlink reload. Signed-off-by: Michael Guralnik Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit e90cde0d76f01fd3b60da0a983d2e93c5c35bedc Author: Michael Guralnik Date: Fri Nov 8 23:45:22 2019 +0000 net/mlx5: Document flow_steering_mode devlink param Add documentation for current mlx5 supported devlink param. Signed-off-by: Michael Guralnik Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 6c7295e13ffd5623b02f1adc1442f1d8a3d52424 Author: Michael Guralnik Date: Fri Nov 8 23:45:20 2019 +0000 devlink: Add new "enable_roce" generic device param New device parameter to enable/disable handling of RoCE traffic in the device. Signed-off-by: Michael Guralnik Acked-by: Jiri Pirko Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit e7cfd867fd9842f346688f28412eb83dec342900 Author: Jacob Rasmussen Date: Mon Nov 11 11:59:57 2019 -0700 ASoC: rt5645: Fixed buddy jack support. The headphone jack on buddy was broken with the following commit: commit 6b5da66322c5 ("ASoC: rt5645: read jd1_1 status for jd detection"). This changes the jd_mode for buddy to 4 so buddy can read from the same register that was used in the working version of this driver without affecting any other devices that might use this, since no other device uses jd_mode = 4. To test this I plugged and uplugged the headphone jack, verifying audio works. Signed-off-by: Jacob Rasmussen Reviewed-by: Ross Zwisler Link: https://lore.kernel.org/r/20191111185957.217244-1-jacobraz@google.com Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 7bdf7c84c216c6d0447e5e15d229e2c3d6b705fa Author: Wolfram Sang Date: Wed Nov 6 16:02:31 2019 +0100 i2c: icy: no need to populate address for scanned device i2c_new_{probed|scanned}_device will update the address after scanning. No need to preset it. Signed-off-by: Wolfram Sang Acked-by: Max Staudt Tested-by: Max Staudt Signed-off-by: Wolfram Sang commit bcc156e2289d35673928fecf85c798a9d55f0b14 Author: Shubhrajyoti Datta Date: Tue Nov 5 10:57:45 2019 +0530 i2c: xiic: Fix kerneldoc warnings Fix the below warning by adding the description of clock and dev. drivers/i2c/busses/i2c-xiic.c:57: info: Scanning doc for struct xiic_i2c drivers/i2c/busses/i2c-xiic.c:84: warning: Function parameter or member 'dev' not described in 'xiic_i2c' drivers/i2c/busses/i2c-xiic.c:84: warning: Function parameter or member 'clk' not described in 'xiic_i2c' Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Reviewed-by: Luca Ceresoli Signed-off-by: Wolfram Sang commit 13409d27cb39fb1dfcb28418a9bc3d26907e1dbc Author: Michael Walle Date: Fri Nov 8 21:31:52 2019 +0100 ASoC: wm8904: configure sysclk/FLL automatically This adds a new mode WM8904_CLK_AUTO which automatically enables the FLL if a frequency different than the MCLK is set. These additions make the codec work with the simple-card driver in general and especially in systems where the MCLK doesn't match the required clock. Signed-off-by: Michael Walle Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20191108203152.19098-1-michael@walle.cc Signed-off-by: Mark Brown commit e2db787bdcb4f2722ecf410168f0583764634e45 Author: Yu-Hsuan Hsu Date: Tue Sep 24 00:29:40 2019 +0800 ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint On KBL platform, the microphone is attached to external codec(rt5514) instead of PCH. However, TDM slot between PCH and codec is 16 bits only. In order to avoid setting wrong format, we should add a constraint to force to use 16 bits format forever. Signed-off-by: Yu-Hsuan Hsu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190923162940.199580-1-yuhsuan@chromium.org Signed-off-by: Mark Brown commit 36da67630d3159e48e37a9f9b2d26ceece426482 Author: Sebastian Reichel Date: Fri Nov 8 18:48:40 2019 +0100 ASoC: Add DA7213 audio codec as selectable option This commit adds the Dialog DA7213 audio codec as a selectable option in the kernel config. Currently the driver can only be selected for Intel Baytrail/Cherrytrail devices or if SND_SOC_ALL_CODECS is enabled. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20191108174843.11227-3-sebastian.reichel@collabora.com Signed-off-by: Mark Brown commit 53aaaa5d9b1e95eb40e877fbffa6f964a8394bb7 Author: Alain Volmat Date: Fri Oct 25 16:04:24 2019 +0200 i2c: stm32f7: fix & reorder remove & probe error handling Add missing dma channels free calls in case of error during probe and reorder the remove function so that dma channels are freed after the i2c adapter is deleted. Overall, reorder the remove function so that probe error handling order and remove function order are same. Fixes: 7ecc8cfde553 ("i2c: i2c-stm32f7: Add DMA support") Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 7375e079eb3dcd2619fde519def4fbc5f3fcffcb Author: Neil Armstrong Date: Mon Oct 21 16:00:53 2019 +0200 dt-bindings: i2c: meson: convert to yaml Now that we have the DT validation in place, let's convert the device tree bindings for the Amlogic I2C Controller over to YAML schemas. Signed-off-by: Neil Armstrong Acked-by: Beniamino Galvani Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 7d73d572111ff585b953b88be4edaf2769bc017e Author: Paul Burton Date: Mon Nov 11 10:50:59 2019 -0800 MIPS: math-emu: Reuse name array in debugfs_fpuemu() The FPU_STAT_CREATE_EX() macro used 114 times in debugfs_fpuemu() declares a 32 byte char array to hold the name of a debugfs file. Since each use of the macro declares a new char array out of the scope of all the other uses, we end up with an unnecessarily large stack frame of 3648 bytes (ie. 114*32) plus the size of 2 pointers (fpuemu_debugfs_base_dir & fpuemu_debugfs_inst_dir). This is enough to trigger the frame size warnings from GCC in common configurations. Avoid the unnecessary stack bloat by using a single name char array which each usage of FPU_STAT_CREATE_EX() will reinitialize via the strcpy() in adjust_instruction_counter_name(). Signed-off-by: Paul Burton Reported-by: kbuild test robot URL: https://lore.kernel.org/linux-mips/201911090929.xvXYuHUz%25lkp@intel.com/ commit dcf78ee660888d8302a0f0888bf746a164d267fa Author: Alexey Khoroshilov Date: Wed Nov 6 20:28:42 2019 +0300 MIPS: allow building with kcov coverage Add ARCH_HAS_KCOV and HAVE_GCC_PLUGINS to MIPS config. Disable instrumentation of vdso to avoid build failure. Signed-off-by: Alexey Khoroshilov Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 53949e0a65b72f1551067d13a4dea3cbce184ded Author: Jiaxun Yang Date: Thu Nov 7 12:01:18 2019 +0800 MIPS: Loongson64: Drop setup_pcimap setup_pcimap is used to setup address windows for Loongson-3 built-in PCI-X controller, but this function is never been used in the real world and lack of support in kernel. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhe@lemote.com commit 574b9a04abfc68c41c3915c2eba2767b78e3e923 Author: Jiaxun Yang Date: Thu Nov 7 12:01:17 2019 +0800 MIPS: Loongson2ef: Convert to early_printk_8250 early_printk.c is doing the same with early_printk_8250. Remove duplicated code. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhe@lemote.com commit 2a5984360b015929e62c7f77924535dfbf2b2b35 Author: Jiaxun Yang Date: Thu Nov 7 12:01:16 2019 +0800 MIPS: Drop CPU_SUPPORTS_UNCACHED_ACCELERATED CPU_SUPPORTS_UNCACHED_ACCELERATED was introduced when kernel can't handle writecombine remap well. Nowadays drivers can try writecombine remap by themselves so this function is nolonger needed. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhe@lemote.com commit 75cac781dca43e735fbb4166d994263a14f0823e Author: Jiaxun Yang Date: Thu Nov 7 12:01:15 2019 +0800 MIPS: Loongson{2ef, 32, 64} convert to generic fw cmdline All of Loongson firmwares are passing boot cmdline/env in the manner of YAMON/PMON. Thus we can remove duplicated cmdline initialize code and convert to generic fw method. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhe@lemote.com commit 28e6b875fdbb17ef57cc4343d8825e0d5770f427 Author: Jiaxun Yang Date: Thu Nov 7 12:01:14 2019 +0800 MIPS: Drop pmon.h There is no code still using pmon callvectors. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhe@lemote.com commit caed1d1b20cbf7ecf7e8be629fd593c96c8ff2d2 Author: Huacai Chen Date: Mon Nov 4 14:11:21 2019 +0800 MIPS: Loongson: Unify LOONGSON3/LOONGSON64 Kconfig usage There are mixed LOONGSON3/LOONGSON64 usages in recently changes, let's establish some rules: 1, In Kconfig symbols, we only use CPU_LOONGSON64, MACH_LOONGSON64 and SYS_HAS_CPU_LOONGSON64, all other derived symbols use "LOONGSON3" since they all not widely-used symbols and sometimes not suitable for all 64-bit Loongson processors. E.g., we use symbols LOONGSON3_ENHANCEMENT, CPU_LOONGSON3_WORKAROUNDS, etc. 2, Hide GSx64/GSx64E in Kconfig title since it is not useful for general users. However, in the full description we use a more detailed manner. E.g., GS264/GS464/GS464E/GS464V. All Kconfig titles and descriptions of Loongson processors and machines have also been updated in this patch for consistency. Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-mips@vger.kernel.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit b2afb64cccd243afd8a4337d8ee4c2f2afbe991d Author: Huacai Chen Date: Mon Nov 4 14:11:20 2019 +0800 MIPS: Loongson: Rename LOONGSON1 to LOONGSON32 Now old Loongson-2E/2F use LOONGSON2EF and will be removed in future, newer Loongson-2/3 use LOONGSON64. So rename LOONGSON1 to LOONGSON32 will make the naming style more unified. Signed-off-by: Huacai Chen [paulburton@kernel.org: Fix checkpatch whitespace warning in irqflags.h] Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-mips@vger.kernel.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit 83cba933a6db1dd4d7ac85170f99461fbc339eff Author: Sagar Shrikant Kadam Date: Tue Oct 22 17:22:19 2019 +0000 mtd: spi-nor: Set default Quad Enable method for ISSI flashes Set the default Quad Enable method for ISSI flashes. Used for ISSI flashes (IS25WP256D-JMLE) that do not support SFDP tables and can not determine the Quad Enable method by parsing BFPT. Based on code originally written by Wesley Terpstra and/or Palmer Dabbelt https://github.com/riscv/riscv-linux/commit/c94e267766d62bc9a669611c3d0c8ed5ea26569b Signed-off-by: Sagar Shrikant Kadam [tudor.ambarus@microchip.com: - rebase, split and adapt for latest spi-nor/next, - use PMC CFI ID for ISSI. According to JEP106BA, "Programmable Micro Corp" changed its name to Integrated Silicon Solution (ISSI)] Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit d6ee51637239de0066e2720351f0cda0db5371b3 Author: Sagar Shrikant Kadam Date: Tue Oct 22 17:22:18 2019 +0000 mtd: spi-nor: Add support for is25wp256 Update the spi_nor_id table for is25wp256 (32MB) device from ISSI, present on HiFive Unleashed dev board (Rev: A00). Use the post bfpt fixup hook for the is25wp256 device, as done for the is25lp256 device to overwrite the wrong address width advertised by BFPT. Signed-off-by: Sagar Shrikant Kadam [tudor.ambarus@microchip.com: rebase, split and adapt for latest spi-nor/next] Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 4c42f63553d79295910f7b4efd5f6dc37fe1a2a5 Author: Manivannan Sadhasivam Date: Wed Oct 30 14:31:24 2019 +0530 mtd: spi-nor: Add support for w25q256jw Add MTD support for w25q256jw SPI NOR chip from Winbond. This chip supports dual/quad I/O mode with 512 blocks of memory organized in 64KB sectors. In addition to this, there is also small 4KB sectors available for flexibility. The device has been validated using Thor96 board. Cc: Marek Vasut Cc: Tudor Ambarus Cc: David Woodhouse Cc: Brian Norris Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Darshak Patel [Mani: cleaned up for upstream] Signed-off-by: Manivannan Sadhasivam Signed-off-by: Tudor Ambarus commit 9326b4e078cd99d3cae3c6c06b6f5893f8ea0c89 Author: Tudor Ambarus Date: Fri Oct 25 14:28:36 2019 +0000 mtd: spi-nor: Move condition to avoid a NULL check When the controller is not under the SPI-MEM interface it may implement the optional controller_ops->erase() method. nor->spimem and nor->controller_ops are mutually exclusive. Move the nor->controller_ops->erase != NULL check as an 'else if' case to nor->spimem, in order to avoid the nor->controller_ops != NULL check. Reported-by: Dan Carpenter Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit ac82229d4e0a060194f66f44cb65fb98f3524e41 Author: Tudor Ambarus Date: Fri Oct 25 14:28:34 2019 +0000 mtd: spi-nor: Make sure nor->spimem and nor->controller_ops are mutually exclusive Expand the spi_nor_check() to make sure that nor->spimem and nor->controller_ops are mutually exclusive. Fixes: b35b9a10362d ("mtd: spi-nor: Move m25p80 code in spi-nor.c") Reported-by: Dan Carpenter Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 4c35b7a51e2f291471f7221d112c6a45c63e83bc Author: Nuno Sá Date: Mon Oct 28 17:33:49 2019 +0100 iio: adis16480: Add debugfs_reg_access entry The driver is defining debugfs entries by calling `adis16480_debugfs_init()`. However, those entries are attached to the iio_dev debugfs entry which won't exist if no debugfs_reg_access callback is provided. Fixes: 2f3abe6cbb6c ("iio:imu: Add support for the ADIS16480 and similar IMUs") Signed-off-by: Nuno Sá Cc: Signed-off-by: Jonathan Cameron commit 49549cb23a2926eba70bb634e361daea0f319794 Author: Nuno Sá Date: Mon Oct 28 17:33:48 2019 +0100 iio: adis16480: Fix scales factors This patch fixes the scales for the gyroscope, accelerometer and barometer. The pressure scale was just wrong. For the others, the scale factors were not taking into account that a 32bit word is being read from the device. Fixes: 7abad1063deb ("iio: adis16480: Fix scale factors") Fixes: 82e7a1b25017 ("iio: imu: adis16480: Add support for ADIS1649x family of devices") Signed-off-by: Nuno Sá Cc: Signed-off-by: Jonathan Cameron commit 32667745cab91cda458fade64d591136dff1422b Author: Colin Ian King Date: Mon Nov 11 09:12:36 2019 +0000 kselftest: arm64: fix spelling mistake "contiguos" -> "contiguous" There is a spelling mistake in an error message literal string. Fix it. Fixes: f96bf4340316 ("kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils") Signed-off-by: Colin Ian King Signed-off-by: Catalin Marinas commit f70c08e46d55126efa6d23e149f8472c178686f2 Author: Anders Roxell Date: Mon Nov 11 09:59:56 2019 +0100 arm64: Kconfig: make CMDLINE_FORCE depend on CMDLINE When building allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/arm64/configs/defconfig CONFIG_CMDLINE_FORCE gets enabled. Which forces the user to pass the full cmdline to CONFIG_CMDLINE="...". Rework so that CONFIG_CMDLINE_FORCE gets set only if CONFIG_CMDLINE is set to something except an empty string. Suggested-by: John Garry Acked-by: Will Deacon Signed-off-by: Anders Roxell Signed-off-by: Catalin Marinas commit ba603c2f0794a5c44516ad42f1064008048329ba Author: Catalin Marinas Date: Fri Nov 8 14:46:54 2019 +0000 MAINTAINERS: Add arm64 selftests to the ARM64 PORT entry Since these are tests specific to the arm64 architecture, it makes sense for the arm64 maintainers to gatekeep the corresponding changes. Cc: Shuah Khan Cc: Will Deacon Signed-off-by: Catalin Marinas commit 0c4f09ceec3d7afbef6ad4077d96e36e0fad4028 Author: Takashi Iwai Date: Mon Nov 11 18:36:42 2019 +0100 ALSA: timer: Fix the breakage of slave link open A silly mistake was made while applying the fix for potential races in commit 6a34367e52ca ("ALSA: timer: Fix possible race at assigning a timer instance"): when a slave PCM is opened and succeeds, it doesn't return but proceeds to the master timer open code instead. Plug the hole and beautify a bit. Fixes: 6a34367e52ca ("ALSA: timer: Fix possible race at assigning a timer instance") Reported-by: syzbot+4476917c053f60112c99@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20191111173642.6093-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit a17f07d61cecabc60ad3479b3a8be044e682e004 Author: Andreas Färber Date: Mon Nov 4 02:39:27 2019 +0100 dt-bindings: gpu: mali-midgard: Add Realtek RTD1295 Define a compatible string for Realtek RTD1295 SoC family. Signed-off-by: Andreas Färber Signed-off-by: Rob Herring commit 59b3d30f689d3660bb25ad557b60be6fecbdada6 Author: Andreas Färber Date: Mon Nov 4 02:39:26 2019 +0100 dt-bindings: gpu: mali-midgard: Tidy up conversion to YAML Instead of grouping alphabetically by third-party vendor, leading to one-element enums, start sorting by Mali model number, as done for Utgard. This already allows us to de-duplicate two "arm,mali-t760" sections and will make it easier to add new vendor compatibles. Fixes: 553cedf60056 ("dt-bindings: Convert Arm Mali Midgard GPU to DT schema") Fixes: 1be5b54d26ae ("dt-bindings: gpu: mali-midgard: Add samsung exynos5250 compatible") Cc: Rob Herring Signed-off-by: Andreas Färber [robh: don't resort everything to avoid conflicts] Signed-off-by: Rob Herring commit 2fa0a530594d17bc858280fe1215e2558ed94f49 Author: Rob Herring Date: Wed Nov 6 20:19:59 2019 -0600 dt-bindings: example-schema: Standard unit should be microvolt not microvolts Even the DT maintainer gets confused. The schema in dt-schema was wrong too, so this was passing validation until trying to add some common incorrect patterns to check. Fixes: 58fbe999ff40 ("dt-bindings: example-schema: Add some additional examples and commentary") Signed-off-by: Rob Herring commit 6aec97513a8c26a6f9c7a0424a2c55d6751e0c33 Author: Neil Armstrong Date: Wed Nov 6 11:44:58 2019 +0100 dt-bindings: usb: dwc3: Move Amlogic G12A DWC3 Glue Bindings to YAML schemas Now that we have the DT validation in place, let's convert the device tree bindings for the Amlogic G12A DWC3 Glue Bindings over to a YAML schemas, the AXG and GXL glue bindings will be converted later. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl [robh: drop maxItems on vbus-supply] Signed-off-by: Rob Herring commit f0d83c6614ad63b6742716ebef63cbda93d964b1 Author: Rajendra Nayak Date: Wed Nov 6 12:20:06 2019 +0530 dt-bindings: arm-smmu: update binding for qcom sc7180 SoC Add the soc specific compatible for sc7180 smmu-500 Signed-off-by: Rajendra Nayak Cc: Joerg Roedel Cc: Mark Rutland Signed-off-by: Rob Herring commit 400b6a7b13a3fd71cff087139ce45dd1e5fff444 Author: Guenter Roeck Date: Wed Nov 6 06:35:18 2019 -0800 nvme: Add hardware monitoring support nvme devices report temperature information in the controller information (for limits) and in the smart log. Currently, the only means to retrieve this information is the nvme command line interface, which requires super-user privileges. At the same time, it would be desirable to be able to use NVMe temperature information for thermal control. This patch adds support to read NVMe temperatures from the kernel using the hwmon API and adds temperature zones for NVMe drives. The thermal subsystem can use this information to set thermal policies, and userspace can access it using libsensors and/or the "sensors" command. Example output from the "sensors" command: nvme0-pci-0100 Adapter: PCI adapter Composite: +39.0°C (high = +85.0°C, crit = +85.0°C) Sensor 1: +39.0°C Sensor 2: +41.0°C Reviewed-by: Christoph Hellwig Signed-off-by: Guenter Roeck Signed-off-by: Keith Busch commit ab53cea4186162cdc5e1f038dd656d4c983a2647 Author: Christoph Hellwig Date: Mon Aug 12 23:39:23 2019 +0200 xtensa: clean up ioremap Use ioremap as the main implemented function, and defined ioremap_nocache to it as a deprecated alias. Signed-off-by: Christoph Hellwig commit c0d94aa54bd893bd41ca35e2a2de332742bb167d Author: Christoph Hellwig Date: Mon Aug 12 23:35:59 2019 +0200 x86: Clean up ioremap() Use ioremap() as the main implemented function, and defines ioremap_nocache() as a deprecated alias of ioremap() in preparation of removing ioremap_nocache() entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner commit a1fd79ad0d906b736228684f5040a637de86d2b2 Author: Christoph Hellwig Date: Wed Aug 7 19:01:38 2019 +0300 parisc: remove __ioremap __ioremap is always called with the _PAGE_NO_CACHE, so fold the whole thing and rename it to ioremap. Signed-off-by: Christoph Hellwig Acked-by: Helge Deller commit 5ace77e0b41af6b9a3a8cd189a79270e8840fe0a Author: Christoph Hellwig Date: Wed Aug 7 18:56:08 2019 +0300 nios2: remove __ioremap The cacheflag argument to __ioremap is always 0, so just implement ioremap directly. Signed-off-by: Christoph Hellwig commit dda85fba6706a95b46e86975cd4c45bbe35a3280 Author: Christoph Hellwig Date: Wed Aug 7 18:49:31 2019 +0300 alpha: remove the unused __ioremap wrapper No need for the additional namespace pollution. Signed-off-by: Christoph Hellwig commit ac32292c8552f7e8517be184e65dd09786e991f9 Author: Christoph Hellwig Date: Mon Aug 12 23:27:12 2019 +0200 hexagon: clean up ioremap Use ioremap as the main implemented function, and defined ioremap_nocache to it as a deprecated alias. Signed-off-by: Christoph Hellwig commit fded1829a24b34006664c72e580df5410fd900f5 Author: Christoph Hellwig Date: Sun Aug 11 14:30:14 2019 +0200 ia64: rename ioremap_nocache to ioremap_uc On ia64 ioremap_nocache fails if attributes don't match. Not other architectures does this, and we plan to get rid of ioremap_nocache. So get rid of the special semantics and define ioremap_nocache in terms of ioremap as no portable driver could rely on the behavior anyway. However x86 implements ioremap_uc in a similar way as the ia64 version of ioremap_nocache, in that it ignores the firmware tables. Switch ia64 to override ioremap_uc instead. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann commit 315e5211aef97856c20609373b67ab75431202cf Author: Christoph Hellwig Date: Sun Aug 11 14:03:29 2019 +0200 unicore32: remove ioremap_cached No users of ioremap_cached are left, remove it. Signed-off-by: Christoph Hellwig commit 6a22d824a4154004c25850b0e1b710c2a88fb348 Author: Christoph Hellwig Date: Sun Aug 11 14:03:29 2019 +0200 arm: remove ioremap_cached No users of ioremap_cached are left, remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Arnd Bergmann commit e11898460e8908482d0e0a3c0e529ee9455cd376 Author: Javier F. Arias Date: Fri Nov 8 08:30:38 2019 -0500 staging: rtl8723bs: Remove commented code This patch removes unnecessary commented code. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/1dfda6d22e4a972b9c91c6f56d2dc76603007626.1573219728.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 08283d30744434d8f30d386622372e8f5b03bcf2 Author: Christian Gromm Date: Fri Nov 8 17:21:08 2019 +0100 staging: most: block module removal while having active configfs items This patch avoids that core component modules are being unloaded while the related configfs interface has active items in its directories. It is needed to prevent the situation where the core module cannot be unloaded anymore, because the reference count 'used by' indicates that the module is still being used and the usage count cannot be decreased by calling rmdir, as the configfs directory has already been removed. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1573230068-27658-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 4845b3c8c8d221441605a1eff8aab7f1622dce93 Author: Christian Gromm Date: Fri Nov 8 17:21:07 2019 +0100 staging: most: configfs: move configfs subsystems to container struct This patch moves the declarations of the configfs subsystems to a superordinate container structure. This is done to get access to private subsystem data. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1573230068-27658-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 2d9d2491530a156b9a5614adf9dc79285e35d55e Author: Hans de Goede Date: Mon Nov 11 12:38:46 2019 +0100 staging: rtl8723bs: Drop ACPI device ids The driver only binds by SDIO device-ids, all the ACPI device-id does is causing the driver to load unnecessarily on devices where the DSDT contains a bogus OBDA8723 device. Signed-off-by: Hans de Goede Cc: stable Link: https://lore.kernel.org/r/20191111113846.24940-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 3d5f1eedbfd22ceea94b39989d6021b1958181f4 Author: Hans de Goede Date: Mon Nov 11 12:38:45 2019 +0100 staging: rtl8723bs: Add 024c:0525 to the list of SDIO device-ids Add 024c:0525 to the list of SDIO device-ids, based on a patch found in the Android X86 kernels. According to that patch this device id is used on the Alcatel Plus 10 device. Reported-and-tested-by: youling257 Signed-off-by: Hans de Goede Cc: stable Link: https://lore.kernel.org/r/20191111113846.24940-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit ff8292f78bcfb05828d3fe61c4cbc66a7ef1f57b Author: Xianting Tian Date: Sat Nov 9 08:36:54 2019 -0500 staging: rtl8192u: Fix typo in comment Fix the typo "cheked" -> "checked" in comment Signed-off-by: Xianting Tian Link: https://lore.kernel.org/r/1573306614-21490-1-git-send-email-xianting_tian@126.com Signed-off-by: Greg Kroah-Hartman commit c7e621bb981b76d3bfd8a595070ee8282ac4a32b Author: Ajay Singh Date: Thu Nov 7 15:58:54 2019 +0000 staging: wilc1000: fix illegal memory access in wilc_parse_join_bss_param() Do not copy the extended supported rates in 'param->supp_rates' if the array is already full with basic rates values. The array size check helped to avoid possible illegal memory access [1] while copying to 'param->supp_rates' array. 1. https://marc.info/?l=linux-next&m=157301720517456&w=2 Reported-by: coverity-bot Addresses-Coverity-ID: 1487400 ("Memory - illegal accesses") Fixes: 4e0b0f42c9c7 ("staging: wilc1000: use struct to pack join parameters for FW") Cc: stable@vger.kernel.org Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191106062127.3165-1-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit a46e810975b8bde22e612c12331e1c5207797435 Author: Arnd Bergmann Date: Fri Nov 8 22:32:39 2019 +0100 staging: exfat: use prandom_u32() for i_generation Similar to commit 46c9a946d766 ("shmem: use monotonic time for i_generation") we should not use the deprecated get_seconds() interface for i_generation. prandom_u32() is the replacement used in other file systems. Signed-off-by: Arnd Bergmann Acked-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191108213257.3097633-2-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 1fa489b14dbc4968284711874ed35566fcdf712b Author: Valery Ivanov Date: Fri Nov 8 14:23:29 2019 +0000 staging: octeon: fix missing a blank line after declaration This patch fixes "WARNING: Missing a blank line after declarations" Issue found by checkpatch.pl Signed-off-by: Valery Ivanov Link: https://lore.kernel.org/r/20191108142329.GA3192@hwsrv-485799.hostwindsdns.com Signed-off-by: Greg Kroah-Hartman commit 6c3a44ed3c553c324845744f30bcd1d3b07d61fd Author: Deepa Dinamani Date: Sun Nov 10 09:27:44 2019 -0800 iommu/vt-d: Turn off translations at shutdown The intel-iommu driver assumes that the iommu state is cleaned up at the start of the new kernel. But, when we try to kexec boot something other than the Linux kernel, the cleanup cannot be relied upon. Hence, cleanup before we go down for reboot. Keeping the cleanup at initialization also, in case BIOS leaves the IOMMU enabled. I considered turning off iommu only during kexec reboot, but a clean shutdown seems always a good idea. But if someone wants to make it conditional, such as VMM live update, we can do that. There doesn't seem to be such a condition at this time. Tested that before, the info message 'DMAR: Translation was enabled for but we are not in kdump mode' would be reported for each iommu. The message will not appear when the DMA-remapping is not enabled on entry to the kernel. Signed-off-by: Deepa Dinamani Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit f036c7fa0ab60b7ea47560c32c78e435eb1cd214 Author: Yian Chen Date: Thu Oct 17 04:39:19 2019 -0700 iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved VT-d RMRR (Reserved Memory Region Reporting) regions are reserved for device use only and should not be part of allocable memory pool of OS. BIOS e820_table reports complete memory map to OS, including OS usable memory ranges and BIOS reserved memory ranges etc. x86 BIOS may not be trusted to include RMRR regions as reserved type of memory in its e820 memory map, hence validate every RMRR entry with the e820 memory map to make sure the RMRR regions will not be used by OS for any other purposes. ia64 EFI is working fine so implement RMRR validation as a dummy function Reviewed-by: Lu Baolu Reviewed-by: Sohil Mehta Signed-off-by: Yian Chen Signed-off-by: Joerg Roedel commit de80f95ccb9c4de5a0fae0334de5ab438acf3453 Author: Tom Joseph Date: Mon Nov 11 12:30:44 2019 +0000 PCI: cadence: Move all files to per-device cadence directory Cadence core library files may be used by various platform drivers. Add a new directory "cadence" to group all the Cadence core library files and the platforms using Cadence core library. Signed-off-by: Tom Joseph Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit bd22885aa188f135fd98382febfec650601ec998 Author: Tom Joseph Date: Mon Nov 11 12:30:43 2019 +0000 PCI: cadence: Refactor driver to use as a core library Cadence PCIe host and endpoint IP may be embedded into a variety of SoCs/platforms. Let's extract the platform related APIs/Structures in the current driver to a separate file (pcie-cadence-plat.c), such that the common functionality can be used by future platforms. Signed-off-by: Tom Joseph Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit 5cd382b2693358be99b9ae1c524854f5715b5dc2 Author: Jules Irenge Date: Mon Nov 11 13:30:53 2019 +0000 staging: wfx: replace uintXX_t to uXX and intXX_t to sXX Replace uint8_t to u8, uint16_t to u16, uint32_t to u32 int8_t to s8,int16_t to s16 and int32_t to s32 As per recommendation of checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191111133055.214410-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 34d1b0895dbd10713c73615d8f532e78509e12d9 Author: Jean-Philippe Brucker Date: Mon Nov 11 12:17:21 2019 +0100 iommu/arm-smmu: Remove duplicate error message Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()"), platform_get_irq() displays an error when the IRQ isn't found. Remove the error print from the SMMU driver. Note the slight change of behaviour: no message is printed if platform_get_irq() returns -EPROBE_DEFER, which probably doesn't concern the SMMU. Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Jean-Philippe Brucker Acked-by: Will Deacon Signed-off-by: Joerg Roedel commit f7aff1a93f52047739af31072de0ad8d149641f3 Author: Jean-Philippe Brucker Date: Mon Nov 11 12:17:20 2019 +0100 iommu/arm-smmu-v3: Don't display an error when IRQ lines are missing Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()"), platform_get_irq_byname() displays an error when the IRQ isn't found. Since the SMMUv3 driver uses that function to query which interrupt method is available, the message is now displayed during boot for any SMMUv3 that doesn't implement the combined interrupt, or that implements MSIs. [ 20.700337] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ combined not found [ 20.706508] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ eventq not found [ 20.712503] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ priq not found [ 20.718325] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ gerror not found Use platform_get_irq_byname_optional() to avoid displaying a spurious error. Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Jean-Philippe Brucker Acked-by: Will Deacon Signed-off-by: Joerg Roedel commit 767c7846419cc562c9dd4f14cc617c2b9b1b96cd Author: Marek Vasut Date: Sat Oct 26 20:26:59 2019 +0200 PCI: rcar: Recalculate inbound range alignment for each controller entry Due to hardware constraints, the size of each inbound range entry populated into the controller cannot be larger than the alignment of the entry's start address. Currently, the alignment for each "dma-ranges" inbound range is calculated only once for each range and the increment for programming the controller is also derived from it only once. Thus, a "dma-ranges" entry describing a memory at 0x48000000 and size 0x38000000 would lead to multiple controller entries, each 0x08000000 long. This is inefficient, especially considering that by adding the size to the start address, the alignment increases. This patch moves the alignment calculation into the loop populating the controller entries, thus updating the alignment for each controller entry. Tested-by: Yoshihiro Shimoda Signed-off-by: Marek Vasut Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Reviewed-by: Simon Horman Reviewed-by: Yoshihiro Shimoda Cc: Geert Uytterhoeven Cc: Lorenzo Pieralisi Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org commit 85bff4c3d320bffceab0c96ee2be4d5f55a3a4e7 Author: Marek Vasut Date: Sat Oct 26 20:26:58 2019 +0200 PCI: rcar: Move the inbound index check Since the 'idx' variable value is stored across multiple calls to rcar_pcie_inbound_ranges() function, and the 'idx' value is used to index registers which are written, subsequent calls might cause the 'idx' value to be high enough to trigger writes into nonexistent registers. Fix this by moving the 'idx' value check to the beginning of the loop. Signed-off-by: Marek Vasut Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Reviewed-by: Yoshihiro Shimoda Cc: Geert Uytterhoeven Cc: Lorenzo Pieralisi Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org commit af072edb83555e768d2b30c6a31629d3eb3e0527 Author: Andrew Murray Date: Thu Sep 5 16:05:28 2019 +0100 PCI: rcar: Remove unnecessary header include (../pci.h) Remove unnecessary header include (../pci.h) since it doesn't provide any needed symbols. Signed-off-by: Andrew Murray Signed-off-by: Lorenzo Pieralisi Reviewed-by: Simon Horman Reviewed-by: Kieran Bingham Reviewed-by: Geert Uytterhoeven commit 581ae686f269194de975fd3385b881fe622a24ab Author: Al Viro Date: Sat Nov 9 03:13:33 2019 +0000 race in exportfs_decode_fh() On Sat, Nov 02, 2019 at 06:08:42PM +0000, Al Viro wrote: > It is converging to a reasonably small and understandable surface, actually, > most of that being in core pathname resolution. Two big piles of nightmares > left to review - overlayfs and (somewhat surprisingly) setxattr call chains, > the latter due to IMA/EVM/LSM insanity... Oh, lovely - in exportfs_decode_fh() we have this: err = exportfs_get_name(mnt, target_dir, nbuf, result); if (!err) { inode_lock(target_dir->d_inode); nresult = lookup_one_len(nbuf, target_dir, strlen(nbuf)); inode_unlock(target_dir->d_inode); if (!IS_ERR(nresult)) { if (nresult->d_inode) { dput(result); result = nresult; } else dput(nresult); } } We have derived the parent from fhandle, we have a disconnected dentry for child, we go look for the name. We even find it. Now, we want to look it up. And some bastard goes and unlinks it, just as we are trying to lock the parent. We do a lookup, and get a negative dentry. Then we unlock the parent... and some other bastard does e.g. mkdir with the same name. OK, nresult->d_inode is not NULL (anymore). It has fuck-all to do with the original fhandle (different inumber, etc.) but we happily accept it. Even better, we have no barriers between our check and nresult becoming positive. IOW, having observed non-NULL ->d_inode doesn't give us enough - e.g. we might still see the old ->d_flags value, from back when ->d_inode used to be NULL. On something like alpha we also have no promises that we'll observe anything about the fields of nresult->d_inode, but ->d_flags alone is enough for fun. The callers can't e.g. expect d_is_reg() et.al. to match the reality. This is obviously bogus. And the fix is obvious: check that nresult->d_inode is equal to result->d_inode before unlocking the parent. Note that we'd *already* had the original result and all of its aliases rejected by the 'acceptable' predicate, so if nresult doesn't supply us a better alias, we are SOL. Does anyone see objections to the following patch? Christoph, that seems to be your code; am I missing something subtle here? AFAICS, that goes back to 2007 or so... Signed-off-by: Al Viro Signed-off-by: J. Bruce Fields commit 7f7f0d9c0bcbed864551012e4eb88a631fd376f9 Author: Miaohe Lin Date: Fri Oct 25 18:54:34 2019 +0800 KVM: x86: get rid of odd out jump label in pdptrs_changed The odd out jump label is really not needed. Get rid of it by return true directly while r < 0 as suggested by Paolo. This further lead to var changed being unused. Remove it too. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 5be9aa95f0450aadf015b706b6afa8db6b0e8f92 Merge: 4f5cafb5cb84 dd5ddd3c7a8c Author: Joerg Roedel Date: Mon Nov 11 15:10:08 2019 +0100 Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu commit 1289f7f15001c7ed36be6d23cb145c1d5feacdc8 Author: Yoshihiro Shimoda Date: Wed Nov 6 11:35:50 2019 +0900 iommu/ipmmu-vmsa: Add utlb_offset_base Since we will have changed memory mapping of the IPMMU in the future, this patch adds a utlb_offset_base into struct ipmmu_features for IMUCTR and IMUASID registers. No behavior change. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Niklas Söderlund Signed-off-by: Joerg Roedel commit 3667c9978b2911dc1ded77f5971df477885409c4 Author: Yoshihiro Shimoda Date: Wed Nov 6 11:35:49 2019 +0900 iommu/ipmmu-vmsa: Add helper functions for "uTLB" registers Since we will have changed memory mapping of the IPMMU in the future, This patch adds helper functions ipmmu_utlb_reg() and ipmmu_imu{asid,ctr}_write() for "uTLB" registers. No behavior change. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Joerg Roedel commit 3dc28d9f59eaae41461542b27afe70339347ebb3 Author: Yoshihiro Shimoda Date: Wed Nov 6 11:35:48 2019 +0900 iommu/ipmmu-vmsa: Calculate context registers' offset instead of a macro Since we will have changed memory mapping of the IPMMU in the future, this patch uses ipmmu_features values instead of a macro to calculate context registers offset. No behavior change. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Joerg Roedel commit 16d9454f5e0447f9c19cbf350b35ed377b9f64eb Author: Yoshihiro Shimoda Date: Wed Nov 6 11:35:47 2019 +0900 iommu/ipmmu-vmsa: Add helper functions for MMU "context" registers Since we will have changed memory mapping of the IPMMU in the future, This patch adds helper functions ipmmu_ctx_{reg,read,write}() for MMU "context" registers. No behavior change. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Joerg Roedel commit df9828aaa43256bda7e26573c44af25e78596b09 Author: Yoshihiro Shimoda Date: Wed Nov 6 11:35:46 2019 +0900 iommu/ipmmu-vmsa: tidyup register definitions To support different registers memory mapping hardware easily in the future, this patch tidies up the register definitions as below: - Add comments to state to which SoCs or SoC families they apply - Add categories about MMU "context" and uTLB registers No change behavior. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Niklas Söderlund Signed-off-by: Joerg Roedel commit 77cf983892b2e0d40dc256b784930a9ffaad4fc8 Author: Yoshihiro Shimoda Date: Wed Nov 6 11:35:45 2019 +0900 iommu/ipmmu-vmsa: Remove all unused register definitions To support different registers memory mapping hardware easily in the future, this patch removes all unused register definitions. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Niklas Söderlund Signed-off-by: Joerg Roedel commit c90ae4a63541e05f77815762ddb0f7aee917b083 Author: Yong Wu Date: Mon Nov 4 15:01:08 2019 +0800 iommu/mediatek: Reduce the tlb flush timeout value Reduce the tlb timeout value from 100000us to 1000us. The original value would make the kernel stuck for 100 ms with interrupts disabled, which could have other side effects. The flush is expected to always take much less than 1 ms, so use that instead. Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel commit 60829b4d00aa2f45f419ff62fb487063153a1d71 Author: Yong Wu Date: Mon Nov 4 15:01:07 2019 +0800 iommu/mediatek: Get rid of the pgtlock Now we have tlb_lock for the HW tlb flush, then pgtable code hasn't needed the external "pgtlock" for a while. this patch remove the "pgtlock". Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel commit 1f4fd6248139b5406bb9cf1dde25dbec05f6c57e Author: Yong Wu Date: Mon Nov 4 15:01:06 2019 +0800 iommu/mediatek: Move the tlb_sync into tlb_flush Right now, the tlb_add_flush_nosync and tlb_sync always appear together. we merge the two functions into one(also move the tlb_lock into the new function). No functional change. Signed-off-by: Chao Hao Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel commit 67caf7e2b5a4701b24ef8ccc3b49f4e24f473fc8 Author: Yong Wu Date: Mon Nov 4 15:01:05 2019 +0800 iommu/mediatek: Delete the leaf in the tlb_flush In our tlb range flush, we don't care the "leaf". Remove it to simplify the code. no functional change. "granule" also is unnecessary for us, Keep it satisfy the format of tlb_flush_walk. Signed-off-by: Yong Wu Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit a7a04ea34e1c483d10d3e72250ff5503b1076fe3 Author: Yong Wu Date: Mon Nov 4 15:01:04 2019 +0800 iommu/mediatek: Use gather to achieve the tlb range flush Use the iommu_gather mechanism to achieve the tlb range flush. Gather the iova range in the "tlb_add_page", then flush the merged iova range in iotlb_sync. Suggested-by: Tomasz Figa Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel commit da3cc91b8db403728cde03c8a95cba268d8cbf1b Author: Yong Wu Date: Mon Nov 4 15:01:03 2019 +0800 iommu/mediatek: Add a new tlb_lock for tlb_flush The commit 4d689b619445 ("iommu/io-pgtable-arm-v7s: Convert to IOMMU API TLB sync") help move the tlb_sync of unmap from v7s into the iommu framework. It helps add a new function "mtk_iommu_iotlb_sync", But it lacked the lock, then it will cause the variable "tlb_flush_active" may be changed unexpectedly, we could see this warning log randomly: mtk-iommu 10205000.iommu: Partial TLB flush timed out, falling back to full flush The HW requires tlb_flush/tlb_sync in pairs strictly, this patch adds a new tlb_lock for tlb operations to fix this issue. Fixes: 4d689b619445 ("iommu/io-pgtable-arm-v7s: Convert to IOMMU API TLB sync") Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel commit 2009122f1d83dd8375572661961eab1e7e86bffe Author: Yong Wu Date: Mon Nov 4 15:01:02 2019 +0800 iommu/mediatek: Correct the flush_iotlb_all callback Use the correct tlb_flush_all instead of the original one. Fixes: 4d689b619445 ("iommu/io-pgtable-arm-v7s: Convert to IOMMU API TLB sync") Signed-off-by: Yong Wu Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit 141bef44e123c101c0da0443ab6b3cfa750f251a Author: Dmitry Osipenko Date: Mon Aug 12 00:00:42 2019 +0300 memory: tegra: Consolidate registers definition into common header The Memory Controller registers definition is sparse and duplicated, let's consolidate everything into a common place for consistency. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 77b7182ff18dd5a83d938ab42772db5cb82c75b8 Author: Dmitry Osipenko Date: Mon Aug 12 00:00:41 2019 +0300 memory: tegra: Ensure timing control debug features are disabled Timing control debug features should be disabled at a boot time, but you never now and hence it's better to disable them explicitly because some of those features are crucial for the driver to do a proper thing. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit e34212c75a68990f7215d64d725c61e57ca70357 Author: Dmitry Osipenko Date: Mon Aug 12 00:00:40 2019 +0300 memory: tegra: Introduce Tegra30 EMC driver Introduce driver for the External Memory Controller (EMC) found on Tegra30 chips, it controls the external DRAM on the board. The purpose of this driver is to program memory timing for external memory on the EMC clock rate change. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Tested-by: Peter Geis Signed-off-by: Thierry Reding commit 88c5bfecaa36c1b92666f9f0a02b4fa36e7f6337 Author: Dmitry Osipenko Date: Mon Aug 12 00:00:36 2019 +0300 memory: tegra: Do not handle error from wait_for_completion_timeout() Contrary to its wait_for_completion_timeout_interruptible() sibling, the wait_for_completion_timeout() function does not return an error. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit b56563d0138c3622634e50f3dbca1359b5e7237b Author: Dmitry Osipenko Date: Mon Aug 12 00:00:35 2019 +0300 memory: tegra: Increase handshake timeout on Tegra20 Turned out that it could take over a millisecond under some circumstances, like running on a very low CPU/memory frequency. TRM says that handshake happens when there is a "safe" moment, but not explains exactly what that moment is. Apparently at least memory should be idling and thus the low frequency should be a reasonable cause for a longer handshake delay. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit f541efaa7459621fb68eb6e54546e195ab48d43a Author: Dmitry Osipenko Date: Mon Aug 12 00:00:34 2019 +0300 memory: tegra: Print a brief info message about EMC timings During boot print how many memory timings got the driver and what's the RAM code. This is a very useful information when something is wrong with boards memory timing. Suggested-by: Marc Dietrich Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c72396f941fb9d4113fb2fe18c00ae75c6c92c3e Author: Dmitry Osipenko Date: Mon Aug 12 00:00:33 2019 +0300 memory: tegra: Pre-configure debug register on Tegra20 The driver expects certain debug features to be disabled in order to work properly. Let's disable them explicitly for consistency and to not rely on a boot state. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit d039cf2834e9eb7cfd14f245172ca4f4a67c106b Author: Dmitry Osipenko Date: Mon Aug 12 00:00:32 2019 +0300 memory: tegra: Include io.h instead of iopoll.h The register polling code was gone, but the included header change was missed. Fix it up for consistency. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 77ab499dca5d7426a84f76988b3f84e7c9db7e12 Author: Dmitry Osipenko Date: Mon Aug 12 00:00:31 2019 +0300 memory: tegra: Adapt for Tegra20 clock driver changes Now Tegra20 and Tegra30 EMC drivers should provide clock-rounding functionality using the new Tegra clock driver API. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit fa6749d40e99d3e780b60f2a2e0a3ad97af45b3c Author: Dmitry Osipenko Date: Mon Aug 12 00:00:30 2019 +0300 memory: tegra: Don't set EMC rate to maximum on probe for Tegra20 The memory frequency scaling will be managed by tegra20-devfreq driver and PM QoS once all the prerequisite patches will get upstreamed. The parent clock is now managed by the clock driver and we also should assume that PLLM rate can't be changed on some devices (Galaxy Tab 10.1 for example). Altogether there is no point in touching of clock's rate from the EMC driver. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 63a613fdb16cc2efba7222b1eb8cee0aba070fb2 Author: Thierry Reding Date: Mon Oct 28 13:37:07 2019 +0100 memory: tegra: Add gr2d and gr3d to DRM IOMMU group All of the devices making up the Tegra DRM device want to share a single IOMMU domain. Put them into a single group to allow them to do that. Signed-off-by: Thierry Reding commit c4c21f22150ff5bffffb9454ce556ffa047e780d Author: Thierry Reding Date: Fri Feb 15 16:28:19 2019 +0100 memory: tegra: Set DMA mask based on supported address bits The memory controller on Tegra124 and later supports 34 or more address bits. Advertise that by setting the DMA mask based on the number of the address bits. Signed-off-by: Thierry Reding commit 3feb4a3cf0f8542ed00f4b257c842ffad8008b4e Merge: 54ecb8f7028c ed1a2459e20c Author: Thierry Reding Date: Mon Nov 11 14:54:48 2019 +0100 Merge branch 'for-5.5/clk' into for-5.5/memory commit 07b293c5b01483f3c65372e72e62a2ee559ce1cf Author: YueHaibing Date: Wed Oct 30 20:56:50 2019 +0800 clk: tegra: Fix build error without CONFIG_PM_SLEEP If CONFIG_PM_SLEEP is n, build fails: drivers/clk/tegra/clk-tegra210.c:3426:13: error: tegra210_clk_suspend undeclared here (not in a function); did you mean tegra_clk_ndspeed? .suspend = tegra210_clk_suspend, ^~~~~~~~~~~~~~~~~~~~ tegra_clk_ndspeed drivers/clk/tegra/clk-tegra210.c:3427:12: error: tegra210_clk_resume undeclared here (not in a function); did you mean tegra210_clk_suspend? .resume = tegra210_clk_resume, Use ifdef to guard this. Reported-by: Hulk Robot Fixes: 27d10d548c04 ("clk: tegra: Add suspend and resume support on Tegra210") Signed-off-by: YueHaibing Signed-off-by: Thierry Reding commit 5699d160550b1e480c920f8182bd4b73b8c9ae43 Author: Dmitry Osipenko Date: Tue Oct 15 20:00:06 2019 +0300 clk: tegra: Add missing stubs for the case of !CONFIG_PM_SLEEP The new CPUIDLE driver uses the Tegra's CLK API and that driver won't strictly depend on CONFIG_PM_SLEEP, hence add the required stubs in order to allow compiling of the new driver with the CONFIG_PM_SLEEP=n. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 204ce75b897035447f29b1ec4423f9f25baf8a60 Author: Dmitry Osipenko Date: Mon Sep 23 00:52:03 2019 +0300 clk: tegra: Optimize PLLX restore on Tegra20/30 There is no need to re-configure PLLX if its configuration in unchanged on return from suspend / cpuidle, this saves 300us if PLLX is already enabled (common case for cpuidle). Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver Signed-off-by: Thierry Reding commit 535f296d47de327287fe65b5843713bd9b01a267 Author: Sowjanya Komatineni Date: Fri Aug 16 12:42:00 2019 -0700 clk: tegra: Add suspend and resume support on Tegra210 All the CAR controller settings are lost on suspend when core power goes off. This implement saving and restoring context for all PLLs and clocks during system suspend and resume to have the clocks back to same state for normal operation. Clock driver suspend and resume are registered as syscore_ops as clocks restore need to happen before the other drivers resume to have all their clocks back to the same state as before suspend. Signed-off-by: Sowjanya Komatineni Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 3214be6cb1e487b0f8c3bb2eac9b06df07a07e06 Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:59 2019 -0700 clk: tegra: Share clk and rst register defines with Tegra clock driver Move CLK_OUT_ENB and RST_DEVICES registers to clk.h to share these with Tegra clock driver. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit f68cbb35788e3d4e76638e4cc4cc1df9cac03587 Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:58 2019 -0700 clk: tegra: Use fence_udelay() during PLLU init This patch uses fence_udelay rather than udelay during PLLU initialization to ensure writes to clock registers happens before waiting for specified delay. Acked-by: Thierry Reding Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit a99d744d8c9ca7e00adeb14dd11971b4b5b8271f Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:56 2019 -0700 clk: tegra: clk-dfll: Add suspend and resume support This patch implements DFLL suspend and resume operation. During system suspend entry, CPU clock will switch CPU to safe clock source of PLLP and disables DFLL clock output. DFLL driver suspend confirms DFLL disable state and errors out on being active. DFLL is re-initialized during the DFLL driver resume as it goes through complete reset during suspend entry. Acked-by: Thierry Reding Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit f8fd97521d6381b4a19b1b88692a426a79fe1794 Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:55 2019 -0700 clk: tegra: clk-super: Add restore-context support This patch implements restore_context for clk_super_mux and clk_super. During system supend, core power goes off the and context of Tegra CAR registers is lost. So on system resume, context of super clock registers are restored to have them in same state as before suspend. Acked-by: Thierry Reding Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 68a14a5634dacb37d18618d62f0410f1ec69ab28 Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:54 2019 -0700 clk: tegra: clk-super: Fix to enable PLLP branches to CPU This patch has a fix to enable PLLP branches to CPU before changing the CPU cluster clock source to PLLP for Gen5 Super clock and disables PLLP branches to CPU when not in use. During system suspend entry and exit, CPU source will be switched to PLLP and this needs PLLP branches to be enabled to CPU prior to the switch. On system resume, warmboot code enables PLLP branches to CPU and powers up the CPU with PLLP clock source. Acked-by: Thierry Reding Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 2b8cfd6b52cbf951d9b90862d95b8473d34d02ee Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:53 2019 -0700 clk: tegra: periph: Add restore_context support This patch implements restore_context support for clk-periph and clk-sdmmc-mux clock operations to restore clock parent and rates on system resume. During system suspend, core power goes off and looses the context of the Tegra clock controller registers. So on system resume, clocks parent and rate are restored back to the context before suspend based on cached data. Acked-by: Thierry Reding Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 50d4da9b10edb885b2c5f95750e96b3695fa7c04 Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:51 2019 -0700 clk: tegra: Support for OSC context save and restore This patch adds support for saving OSC clock frequency and the drive-strength during OSC clock init and creates an API to restore OSC control register value from the saved context. This API is invoked by Tegra210 clock driver during system resume to restore the OSC clock settings. Acked-by: Thierry Reding Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit bc0b3a60fe19610d649a62879dd318d133ed10c0 Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:50 2019 -0700 clk: tegra: pll: Save and restore pll context This patch implements save and restore of PLL context. During system suspend, core power goes off and looses the settings of the Tegra CAR controller registers. So during resume, pll context is restored based on cached rate and state. Acked-by: Thierry Reding Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit fa62228240ec5f53bbdef6d4d821518541dc92c0 Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:49 2019 -0700 clk: tegra: pllout: Save and restore pllout context This patch implements save and restore of pllout context. During system suspend, core power goes off and looses the settings of the Tegra CAR controller registers. So during suspend entry the state of pllout is saved and on resume it is restored back to have pllout in same state as before suspend. pllout rate is saved and restore in clock divider so it will be at same rate as before suspend when pllout state is restored. Acked-by: Thierry Reding Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit d64422d93dca8fb630a132b0c24680c82c51788b Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:48 2019 -0700 clk: tegra: divider: Save and restore divider rate This patch implements context restore for clock divider. During system suspend, core power goes off and looses the settings of the Tegra CAR controller registers. So on resume, clock dividers are restored back for normal operation. Acked-by: Thierry Reding Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 05308d7e7bbc932025f1dafc401c73ce83c6f414 Author: Thierry Reding Date: Mon Jun 24 17:06:13 2019 +0200 clk: tegra: Reimplement SOR clocks on Tegra210 In order to allow the display driver to deal uniformly with all SOR generations, implement the SOR clocks in a way that is compatible with Tegra186 and later. Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit 25175c806a6841149abe46168e0af12593141612 Author: Thierry Reding Date: Thu Jul 25 18:19:00 2019 +0200 clk: tegra: Reimplement SOR clock on Tegra124 In order to allow the display driver to deal uniformly with all SOR generations, implement the SOR clocks in a way that is compatible with Tegra186 and later. Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit da8d1a3555406275650b366460c6235f1696bf8b Author: Thierry Reding Date: Wed Jul 24 15:50:04 2019 +0200 clk: tegra: Rename sor0_lvds to sor0_out This makes Tegra124 and Tegra210 consistent with subsequent Tegra generations. Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit e5f8a107d92db30a7ad7d8d95aee59f5ad76206a Author: Thierry Reding Date: Fri Jun 28 11:01:16 2019 +0200 clk: tegra: Move SOR0 implementation to Tegra124 The SOR0 clock on Tegra210 is very different from the SOR0 clock found on Tegra124. Move the Tegra124 implementation to the Tegra124 driver so that a custom implementation can be provided on Tegra210 without clashing with the existing clock. Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit 991a051ea5f15266903f52acb5832a596dd3da51 Author: Thierry Reding Date: Fri Jun 28 11:06:35 2019 +0200 clk: tegra: Remove last remains of TEGRA210_CLK_SOR1_SRC Later SoC generations implement this clock as SOR1_OUT. For consistency, the Tegra210 implementation was adapted to match the same name in commit 4d1dc4018573 ("dt-bindings: clock: tegra: Add sor1_out clock"). Clean up the remaining pieces by adopting the new name for the internal identifiers and remove the old alias. Note that since both SOR1_SRC and SOR1_OUT were referring to the same device tree clock ID, this does not break device tree ABI. Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit 92aa5986f4f7b5a8bf282ca0f50967f4326559f5 Author: Oliver Neukum Date: Thu Nov 7 15:28:55 2019 +0100 USB: chaoskey: fix error case of a timeout In case of a timeout or if a signal aborts a read communication with the device needs to be ended lest we overwrite an active URB the next time we do IO to the device, as the URB may still be active. Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20191107142856.16774-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit c368a411be0005a8d8d5e06146b0ebc097ce460f Author: John Stultz Date: Fri Nov 8 00:56:57 2019 +0000 dt-bindings: usb: rt1711h: Add connector bindings Add connector binding documentation for Richtek RT1711H Type-C chip driver It was noted by Rob Herring that the rt1711h binding docs doesn't include the connector binding. Thus this patch adds such documentation following the details in Documentation/devicetree/bindings/usb/typec-tcpci.txt Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland CC: ShuFan Lee Cc: Heikki Krogerus Cc: Suzuki K Poulose Cc: Chunfeng Yun Cc: Yu Chen Cc: Felipe Balbi Cc: Hans de Goede Cc: Andy Shevchenko Cc: Jun Li Cc: Valentin Schneider Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: John Stultz Link: https://lore.kernel.org/r/20191108005657.31464-1-john.stultz@linaro.org Signed-off-by: Greg Kroah-Hartman commit ec5f8dfd89d289361efa7348a778f888edc1feca Author: Yoshihiro Shimoda Date: Thu Nov 7 14:02:24 2019 +0900 dt-bindings: usb: renesas_usbhs: convert bindings to json-schema Convert Renesas USBHS (HS-USB) controller bindings documentation to json-schema. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1573102944-11095-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman commit d1ee3173a139ed2eb8d87e06216f0426b16084d8 Merge: 73616d0d7e48 cdc2d6685c13 Author: Thierry Reding Date: Mon Nov 11 14:09:15 2019 +0100 Merge branch 'for-5.5/dt-bindings' into for-5.5/clk commit 73616d0d7e48d564ee8e63ad845f86d69c566264 Merge: ed1a2459e20c d9b86cc48283 Author: Thierry Reding Date: Mon Nov 11 14:07:45 2019 +0100 Merge branch 'for-5.5/clk-core' into for-5.5/clk commit b7a0d65d80a0c5034b366392624397a0915b7556 Author: Yonghong Song Date: Thu Nov 7 09:00:45 2019 -0800 bpf, testing: Workaround a verifier failure for test_progs With latest llvm compiler, running test_progs will have the following verifier failure for test_sysctl_loop1.o: libbpf: load bpf program failed: Permission denied libbpf: -- BEGIN DUMP LOG --- libbpf: invalid indirect read from stack var_off (0x0; 0xff)+196 size 7 ... libbpf: -- END LOG -- libbpf: failed to load program 'cgroup/sysctl' libbpf: failed to load object 'test_sysctl_loop1.o' The related bytecode looks as below: 0000000000000308 LBB0_8: 97: r4 = r10 98: r4 += -288 99: r4 += r7 100: w8 &= 255 101: r1 = r10 102: r1 += -488 103: r1 += r8 104: r2 = 7 105: r3 = 0 106: call 106 107: w1 = w0 108: w1 += -1 109: if w1 > 6 goto -24 110: w0 += w8 111: r7 += 8 112: w8 = w0 113: if r7 != 224 goto -17 And source code: for (i = 0; i < ARRAY_SIZE(tcp_mem); ++i) { ret = bpf_strtoul(value + off, MAX_ULONG_STR_LEN, 0, tcp_mem + i); if (ret <= 0 || ret > MAX_ULONG_STR_LEN) return 0; off += ret & MAX_ULONG_STR_LEN; } Current verifier is not able to conclude that register w0 before '+' at insn 110 has a range of 1 to 7 and thinks it is from 0 - 255. This leads to more conservative range for w8 at insn 112, and later verifier complaint. Let us workaround this issue until we found a compiler and/or verifier solution. The workaround in this patch is to make variable 'ret' volatile, which will force a reload and then '&' operation to ensure better value range. With this patch, I got the below byte code for the loop: 0000000000000328 LBB0_9: 101: r4 = r10 102: r4 += -288 103: r4 += r7 104: w8 &= 255 105: r1 = r10 106: r1 += -488 107: r1 += r8 108: r2 = 7 109: r3 = 0 110: call 106 111: *(u32 *)(r10 - 64) = r0 112: r1 = *(u32 *)(r10 - 64) 113: if w1 s< 1 goto -28 114: r1 = *(u32 *)(r10 - 64) 115: if w1 s> 7 goto -30 116: r1 = *(u32 *)(r10 - 64) 117: w1 &= 7 118: w1 += w8 119: r7 += 8 120: w8 = w1 121: if r7 != 224 goto -21 Insn 117 did the '&' operation and we got more precise value range for 'w8' at insn 120. The test is happy then: #3/17 test_sysctl_loop1.o:OK Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191107170045.2503480-1-yhs@fb.com commit 9da776ba7852f9b5cbfdfaa80a1dc07cda592b55 Author: Curtis Malainey Date: Tue Nov 5 17:13:36 2019 -0800 ASoC: rt5677: Wait for DSP to boot before loading firmware Wait for hardware to startup. If we load before hardware is ready we could end up corrupting the firmware. Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-12-cujomalainey@chromium.org Signed-off-by: Mark Brown commit ba0b3a977ecf525231d36f2d9f3a6ea05c35090a Author: Curtis Malainey Date: Tue Nov 5 17:13:35 2019 -0800 ASoC: rt5677: Set ADC clock to use PLL and enable ASRC Use the PLL to kept the correct 24M clock rate so frequency shift does not occur when using the DSP VAD. Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-11-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 55229597a94531726878229ccfcd3fe4ec572dc3 Author: Curtis Malainey Date: Tue Nov 5 17:13:34 2019 -0800 ASoC: bdw-rt5677: Turn on MCLK1 for DSP via DAPM The RT5677 DSP needs the I2S MCLK1 to run its DSP. Add a dapm route to SSP0 CODEC IN so the clock is turned on automatically when the DSP is turned on. Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-10-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 395f02ef210e6f7dad2ca0efc16ffaea4a9ed030 Author: Curtis Malainey Date: Tue Nov 5 17:13:33 2019 -0800 ASoC: rt5677: Allow VAD to be shut on/off at all times Due to limitations of the clocking configuration, we have no way of scheduling our hibernation before the bdw dsp hibernates. This causes issues when the system suspends with an open stream. We need userspace to toggle the kcontrol before we are suspended so that any writes on suspend are not lost and we don't corrupt the regmap. Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-9-cujomalainey@chromium.org Signed-off-by: Mark Brown commit ee0be4a99d4923a9b9c681b008df561648731793 Author: Ben Zhang Date: Tue Nov 5 17:13:32 2019 -0800 ASoC: rt5677: Disable irq at suspend The irq is disabled at suspend to avoid running the threaded irq handler after the codec has been powered off. At resume, codec irq is re-enabled and the interrupt status register is checked to see if headphone has been pluggnd/unplugged while the device is suspended. There is still a chance that the headphone gets enabled or disabled after the codec is suspended. disable_irq syncs the threaded irq handler, but soc-jack's threaded irq handler schedules a delayed work to poll gpios (for debounce). This is still OK. The codec won't be powered back on again because all audio paths have been suspended, and there are no force enabled supply widgets (MICBIAS1 is disabled). The gpio status read after codec power off could be wrong, so the gpio values are checked again after resume. Signed-off-by: Ben Zhang Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-8-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 3f81068dc8e5fc0d3b0d67a5ae99c5140a4e96cb Author: Ben Zhang Date: Tue Nov 5 17:13:31 2019 -0800 ASoC: rt5677: Stop and restart DSP over suspend/resume MCLK1 gets disabled at suspend and re-enabled at resume. Before MCLK1 is re-enabled, if the DSP is already on (either the DSP was left on during suspend, or the DSP is turned on early at resume), i2c register read returns garbage and corrupts the regmap cache. This patch stops the DSP before suspend and restarts it after resume with a dalay to ensure MCLK is on while loading firmware. Signed-off-by: Ben Zhang Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-7-cujomalainey@chromium.org Signed-off-by: Mark Brown commit eabf424f7b60246c76dcb0ea6f1e83ef9abbeaa6 Author: Ben Zhang Date: Tue Nov 5 17:13:30 2019 -0800 ASoC: rt5677: Mark reg RT5677_PWR_ANLG2 as volatile The codec dies when RT5677_PWR_ANLG2(MX-64h) is set to 0xACE1 while it's streaming audio over SPI. The DSP firmware turns on PLL2 (MX-64 bit 8) when SPI streaming starts. However regmap does not believe that register can change by itself. When BST1 (bit 15) is turned on with regmap_update_bits(), it doesn't read the register first before write, so PLL2 power bit is cleared by accident. Marking MX-64h as volatile in regmap solved the issue. Signed-off-by: Ben Zhang Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-6-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 29073ae40c472f17d42aa38850da861b5e3f912e Author: Ben Zhang Date: Tue Nov 5 17:13:29 2019 -0800 ASoC: rt5677: Add DAPM audio path for hotword stream Add a DAPM audio path from "DMIC L1" to "DSP Buffer" so that when hotwording is enabled, DAPM does not power off the codec with SND_SOC_BIAS_OFF. Signed-off-by: Ben Zhang Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-5-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 21c00e5df4397870ee835c974bf50570f9d24253 Author: Ben Zhang Date: Tue Nov 5 17:13:28 2019 -0800 ASoC: rt5677: Enable jack detect while DSP is running Before a hotword is detected, GPIO1 pin is configured as IRQ output so that jack detect works. When a hotword is detected, the DSP firmware configures the GPIO1 pin as GPIO1 and drives a 1. rt5677_irq() is called after a rising edge on the GPIO1 pin, due to either jack detect event or hotword event, or both. All possible events are checked and handled in rt5677_irq() where GPIO1 pin is configured back to IRQ output if a hotword is detected. Signed-off-by: Ben Zhang Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-4-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 157b006f6be46be833b2941856b86e0a9d8bfb0e Author: Ben Zhang Date: Tue Nov 5 17:13:27 2019 -0800 ASoC: bdw-rt5677: Add a DAI link for rt5677 SPI PCM device This link is needed for the RT5677 DSP to do hotwording Signed-off-by: Ben Zhang Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-3-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 461c623270e4fa9cbab44e3ac2f0ddab2842c034 Author: Ben Zhang Date: Tue Nov 5 17:13:26 2019 -0800 ASoC: rt5677: Load firmware via SPI using delayed work The firmware rt5677_elf_vad is an ELF binary obtained from request_firmware(). Sections of the ELF are loaded to the DSP via SPI. A model (e.g. en_us.mmap) can optionally be loaded to the DSP at RT5677_MODEL_ADDR to overwrite the baked-in model in rt5677_elf_vad. Then we switch to DSP mode, load firmware, and let DSP run. When a hotword is detected, an interrupt is fired and rt5677_irq() is called. When 'DSP VAD Switch' is turned off, the codec is set back to normal mode. The kcontrol 'DSP VAD Switch' is automatically enabled/disabled when the hotwording PCM stream is opened/closed. Signed-off-by: Ben Zhang Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191106011335.223061-2-cujomalainey@chromium.org Signed-off-by: Mark Brown commit fe965096c9495ddcf78ec163348105e2baf8d185 Author: Shengjiu Wang Date: Mon Nov 11 15:50:48 2019 +0800 ASoC: fsl_audmix: Add spin lock to protect tdms Audmix support two substream, When two substream start to run, the trigger function may be called by two substream in same time, that the priv->tdms may be updated wrongly. The expected priv->tdms is 0x3, but sometimes the result is 0x2, or 0x1. Fixes: be1df61cf06e ("ASoC: fsl: Add Audio Mixer CPU DAI driver") Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/1e706afe53fdd1fbbbc79277c48a98f8416ba873.1573458378.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown Cc: commit ed1a2459e20c0dfc9d184230c480ace439bececb Author: Dmitry Osipenko Date: Mon Aug 12 00:00:29 2019 +0300 clk: tegra: Add Tegra20/30 EMC clock implementation A proper External Memory Controller clock rounding and parent selection functionality is required by the EMC drivers, it is not available using the generic clock implementation because only the Memory Controller driver is aware of what clock rates are actually available for a particular device. EMC drivers will have to register a Tegra-specific CLK-API callback which will perform rounding of a requested rate. EMC clock users won't be able to request EMC clock by getting -EPROBE_DEFER until EMC driver is probed and the callback is set up. The functionality is somewhat similar to the clk-emc.c which serves Tegra124+ SoCs. The later HW generations support more parent clock sources and the HW configuration / integration with the EMC drivers differs a tad from the older gens, hence it's not really worth to try to squash everything into a single source file. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit d9b86cc48283112f06738d45031b88bd3f9ecb92 Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:52 2019 -0700 clk: Add API to get index of the clock parent This patch adds a new clk_hw_get_parent_index() function that can be used to retrieve the index of a given clock's parent. This can be useful for restoring a clock on system resume. Reviewed-by: Thierry Reding Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 5eb263ef08b5014cfc2539a838f39d2fd3531423 Author: Chuhong Yuan Date: Sat Nov 9 16:09:43 2019 +0800 spi: pxa2xx: Add missed security checks pxa2xx_spi_init_pdata misses checks for devm_clk_get and platform_get_irq. Add checks for them to fix the bugs. Since ssp->clk and ssp->irq are used in probe, they are mandatory here. So we cannot use _optional() for devm_clk_get and platform_get_irq. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191109080943.30428-1-hslester96@gmail.com Signed-off-by: Mark Brown commit 69c23dbf5f695c219008257b3bd86cff63edbe0b Author: Chuhong Yuan Date: Sat Nov 9 15:55:17 2019 +0800 spi: nxp-fspi: Use devm API to fix missed unregistration of controller This driver forgets to unregister controller when remove. Use devm API to unregister it automatically to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191109075517.29988-1-hslester96@gmail.com Signed-off-by: Mark Brown commit 8d8584912a4348ca41653dca70f2099a82e644d9 Author: Vignesh Raghavendra Date: Sat Nov 9 09:48:27 2019 +0530 spi: omap2-mcspi: Remove redundant checks Both omap2_mcspi_tx_dma() and omap2_mcspi_rx_dma() are only called from omap2_mcspi_txrx_dma() and omap2_mcspi_txrx_dma() is always called after making sure that mcspi_dma->dma_rx and mcspi_dma->dma_tx are not NULL (see omap2_mcspi_transfer_one()). Therefore remove redundant NULL checks for omap2_mcspi->dma_tx and omap2_mcspi->dma_rx pointers in omap2_mcspi_tx_dma() and omap2_mcspi_rx_dma() respectively. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20191109041827.26934-1-vigneshr@ti.com Signed-off-by: Mark Brown commit 9afa302473f3ed925acd2499b624fdc0c527e0d0 Author: Bartosz Golaszewski Date: Tue Oct 22 10:36:30 2019 +0200 backlight: gpio: Pull gpio_backlight_initial_power_state() into probe The probe function in the gpio-backlight driver is quite short. If we pull gpio_backlight_initial_power_state() into probe we can drop two more fields from struct gpio_backlight and shrink the driver code. Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit d17465a0af3f669f56289649be0fe6ab0fb63e39 Author: Bartosz Golaszewski Date: Tue Oct 22 10:36:29 2019 +0200 backlight: gpio: Use a helper variable for &pdev->dev Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones commit 2e7ec69d645210ea8a94cbb91799f57f62418bca Author: Bartosz Golaszewski Date: Tue Oct 22 10:36:28 2019 +0200 backlight: gpio: Remove unused fields from platform data Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 1c48b27a7868bf2e6bdb911285f6252339ad185b Author: Bartosz Golaszewski Date: Tue Oct 22 10:36:27 2019 +0200 sh: ecovec24: don't set unused fields in platform data Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Tested-by: Jacopo Mondi Signed-off-by: Lee Jones commit f35f06b784a1603aae3542918b09da8c8627e9fb Author: Bartosz Golaszewski Date: Tue Oct 22 10:36:26 2019 +0200 backlight: gpio: Simplify the platform data handling Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now the fbdev pointer. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones commit d9e2b6eeaaa13085470f8d283f2c8de1c3fe7546 Author: Bartosz Golaszewski Date: Tue Oct 22 10:36:25 2019 +0200 sh: ecovec24: add additional properties to the backlight device Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio backlight driver is modified. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Tested-by: Jacopo Mondi Signed-off-by: Lee Jones commit 706dc68102bc7421a9e6573d149ab6d769d71cc7 Author: Bartosz Golaszewski Date: Tue Oct 22 10:36:24 2019 +0200 backlight: gpio: Explicitly set the direction of the GPIO The GPIO backlight driver currently requests the line 'as is', without acively setting its direction. This can lead to problems: if the line is in input mode by default, we won't be able to drive it later when updating the status and also reading its initial value doesn't make sense for backlight setting. Request the line 'as is' initially, so that we can read its value without affecting it but then change the direction to output explicitly when setting the initial brightness. Also: check the current direction and only read the value if it's output. Signed-off-by: Bartosz Golaszewski Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 3cfc291bfe3f071a285fa6b1c0c6ca22a83c2f06 Author: Bartosz Golaszewski Date: Tue Oct 22 10:36:23 2019 +0200 backlight: gpio: Remove stray newline Remove a double newline from the driver. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 8a05548375713c0320d6746dfaff6329fdafd0fd Author: Bartosz Golaszewski Date: Tue Oct 22 10:36:22 2019 +0200 backlight: gpio: Remove unneeded include We no longer use any symbols from of_gpio.h. Remove this include. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones commit de98a43eb76b8442c02a2fe31c2a50d72cf6ded3 Author: Vignesh Raghavendra Date: Sat Nov 9 10:36:18 2019 +0530 mfd: ti_am335x_tscadc: Fix static checker warning It is possible that platform_get_resource() might return NULL and therefore code needs to check for this condition before de-referencing the pointer. Therefore move the de-referencing of 'res' pointer after devm_ioremap_resource() which would have checked the validity of the pointer. Reported-by: Dan Murphy Signed-off-by: Vignesh Raghavendra Signed-off-by: Lee Jones commit cfca8bb24e0c7e7241e8ef8af27881dd12b4543e Author: Matti Vaittinen Date: Fri Nov 8 10:15:51 2019 +0200 mfd: bd70528: Staticize bit value definitions Make bit definitions static to reduce the scope. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit 6b5c350648b857047b47acf74a57087ad27d6183 Author: Lee Jones Date: Thu Nov 7 11:19:50 2019 +0000 mfd: mfd-core: Honour Device Tree's request to disable a child-device Until now, MFD has assumed all child devices passed to it (via mfd_cells) are to be registered. It does not take into account requests from Device Tree and the like to disable child devices on a per-platform basis. Well now it does. Link: https://www.spinics.net/lists/arm-kernel/msg366309.html Link: https://lkml.org/lkml/2019/8/22/1350 Reported-by: Barry Song Reported-by: Stephan Gerhold Reviewed-by: Daniel Thompson Reviewed-by: Mark Brown Tested-by: Stephan Gerhold Signed-off-by: Lee Jones commit eba19032f99c32ecfbe23ce99bb1546db0a23bee Author: Masahiro Yamada Date: Fri Nov 8 00:09:45 2019 +0900 kbuild: rename any-prereq to newer-prereqs GNU Make manual says: $? The names of all the prerequisites that are newer than the target, with spaces between them. To reflect this, rename any-prereq to newer-prereqs, which is clearer and more intuitive. Signed-off-by: Masahiro Yamada commit 2d3b1b8f0da7b1b09f42231580d88f93b803ae7f Author: Masahiro Yamada Date: Fri Nov 8 00:09:44 2019 +0900 kbuild: drop $(wildcard $^) check in if_changed* for faster rebuild The incremental build of Linux kernel is pretty slow when lots of objects are compiled. The rebuild of allmodconfig may take a few minutes even when none of the objects needs to be rebuilt. The time-consuming part in the incremental build is the evaluation of if_changed* macros since they are used in the recipes to compile C and assembly source files into objects. I notice the following code in if_changed* is expensive: $(filter-out $(PHONY) $(wildcard $^),$^) In the incremental build, every object has its .*.cmd file, which contains the auto-generated list of included headers. So, $^ are expanded into the long list of the source file + included headers, and $(wildcard $^) checks whether they exist. It may not be clear why this check exists there. Here is the record of my research. [1] The first code addition into Kbuild This code dates back to 2002. It is the pre-git era. So, I copy-pasted it from the historical git tree. | commit 4a6db0791528c220655b063cf13fefc8470dbfee (HEAD) | Author: Kai Germaschewski | Date: Mon Jun 17 00:22:37 2002 -0500 | | kbuild: Handle removed headers | | New and old way to handle dependencies would choke when a file | #include'd by other files was removed, since the dependency on it was | still recorded, but since it was gone, make has no idea what to do about | it (and would complain with "No rule to make ...") | | We now add targets for all the previously included files, so make will | just ignore them if they disappear. | | diff --git a/Rules.make b/Rules.make | index 6ef827d3df39..7db5301ea7db 100644 | --- a/Rules.make | +++ b/Rules.make | @@ -446,7 +446,7 @@ if_changed = $(if $(strip $? \ | # execute the command and also postprocess generated .d dependencies | # file | | -if_changed_dep = $(if $(strip $? \ | +if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ | $(filter-out $(cmd_$(1)),$(cmd_$@))\ | $(filter-out $(cmd_$@),$(cmd_$(1)))),\ | @set -e; \ | diff --git a/scripts/fixdep.c b/scripts/fixdep.c | index b5d7bee8efc7..db45bd1888c0 100644 | --- a/scripts/fixdep.c | +++ b/scripts/fixdep.c | @@ -292,7 +292,7 @@ void parse_dep_file(void *map, size_t len) | exit(1); | } | memcpy(s, m, p-m); s[p-m] = 0; | - printf("%s: \\\n", target); | + printf("deps_%s := \\\n", target); | m = p+1; | | clear_config(); | @@ -314,7 +314,8 @@ void parse_dep_file(void *map, size_t len) | } | m = p + 1; | } | - printf("\n"); | + printf("\n%s: $(deps_%s)\n\n", target, target); | + printf("$(deps_%s):\n", target); | } | | void print_deps(void) The "No rule to make ..." error can be solved by passing -MP to the compiler, but I think the detection of header removal is a good feature. When a header is removed, all source files that previously included it should be re-compiled. This makes sure we has correctly got rid of #include directives of it. This is also related with the behavior of $?. The GNU Make manual says: $? The names of all the prerequisites that are newer than the target, with spaces between them. This does not explain whether a non-existent prerequisite is considered to be newer than the target. At this point of time, GNU Make 3.7x was used, where the $? did not include non-existent prerequisites. Therefore, $(filter-out FORCE $(wildcard $^),$^) was useful to detect the header removal, and to rebuild the related objects if it is the case. [2] Change of $? behavior Later, the behavior of $? was changed (fixed) to include prerequisites that did not exist. First, GNU Make commit 64e16d6c00a5 ("Various changes getting ready for the release of 3.81.") changed it, but in the release test of 3.81, it turned out to break the kernel build. See these: - http://lists.gnu.org/archive/html/bug-make/2006-03/msg00003.html - https://savannah.gnu.org/bugs/?16002 - https://savannah.gnu.org/bugs/?16051 Then, GNU Make commit 6d8d9b74d9c5 ("Numerous updates to tests for issues found on Cygwin and Windows.") reverted it for the 3.81 release to give Linux kernel time to adjust to the new behavior. After the 3.81 release, GNU Make commit 7595f38f62af ("Fixed a number of documentation bugs, plus some build/install issues:") re-added it. [3] Adjustment to the new $? behavior on Kbuild side Meanwhile, the kernel build was changed by commit 4f1933620f57 ("kbuild: change kbuild to not rely on incorrect GNU make behavior") to adjust to the new $? behavior. [4] GNU Make 3.82 released in 2010 GNU Make 3.82 was the first release that integrated the correct $? behavior. At this point, Kbuild dealt with GNU Make versions with different $? behaviors. 3.81 or older: $? does not contain any non-existent prerequisite. $(filter-out $(PHONY) $(wildcard $^),$^) was useful to detect removed include headers. 3.82 or newer: $? contains non-existent prerequisites. When a header is removed, it appears in $?. $(filter-out $(PHONY) $(wildcard $^),$^) became a redundant check. With the correct $? behavior, we could have dropped the expensive check for 3.82 or later, but we did not. (Maybe nobody noticed this optimization.) [5] The .SECONDARY special target trips up $? Some time later, I noticed $? did not work as expected under some circumstances. As above, $? should contain non-existent prerequisites, but the ones specified as SECONDARY do not appear in $?. I asked this in GNU Make ML, and it seems a bug: https://lists.gnu.org/archive/html/bug-make/2019-01/msg00001.html Since commit 8e9b61b293d9 ("kbuild: move .SECONDARY special target to Kbuild.include"), all files, including headers listed in .*.cmd files, are treated as secondary. So, we are back into the incorrect $? behavior. If we Kbuild want to react to the header removal, we need to keep $(filter-out $(PHONY) $(wildcard $^),$^) but this makes the rebuild so slow. [Summary] - I believe noticing the header removal and recompiling related objects is a nice feature for the build system. - If $? worked correctly, $(filter-out $(PHONY),$?) would be enough to detect the header removal. - Currently, $? does not work correctly when used with .SECONDARY, and Kbuild is hit by this bug. - I filed a bug report for this, but not fixed yet as of writing. - Currently, the header removal is detected by the following expensive code: $(filter-out $(PHONY) $(wildcard $^),$^) - I do not want to revert commit 8e9b61b293d9 ("kbuild: move .SECONDARY special target to Kbuild.include"). Specifying .SECONDARY globally is clean, and it matches to the Kbuild policy. This commit proactively removes the expensive check since it makes the incremental build faster. A downside is Kbuild will no longer be able to notice the header removal. You can confirm it by the full-build followed by a header removal, and then re-build. $ make defconfig all [ full build ] $ rm include/linux/device.h $ make CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool CHK include/generated/compile.h Kernel: arch/x86/boot/bzImage is ready (#11) Building modules, stage 2. MODPOST 12 modules Previously, Kbuild noticed a missing header and emits a build error. Now, Kbuild is fine with it. This is an unusual corner-case, not a big deal. Once the $? bug is fixed in GNU Make, everything will work fine. Signed-off-by: Masahiro Yamada commit d2a99dbdade45ee1a0f99faffa714f5bb6f82d4b Author: Masahiro Yamada Date: Fri Nov 8 00:04:52 2019 +0900 kbuild: update compile-test header list for v5.5-rc1 Since commit 707816c8b050 ("netfilter: remove deprecation warnings from uapi headers."), you can compile linux/netfilter_ipv4/ipt_LOG.h and linux/netfilter_ipv6/ip6t_LOG.h without warnings. Signed-off-by: Masahiro Yamada commit 76b54cf033c9f2effc70066a2bbb2331013889a1 Author: Masahiro Yamada Date: Tue Oct 29 21:38:09 2019 +0900 modpost: remove unneeded local variable in contains_namespace() The local variable, ns_entry, is unneeded. While I was here, I also cleaned up the comparison with NULL or 0. Signed-off-by: Masahiro Yamada Reviewed-by: Matthias Maennich commit bc35d4bda205d85bf8f87bb013a59afb6b87bc89 Author: Masahiro Yamada Date: Tue Oct 29 21:38:08 2019 +0900 scripts/nsdeps: support nsdeps for external module builds scripts/nsdeps is written to take care of only in-tree modules. Perhaps, this is not a bug, but just a design. At least, Documentation/core-api/symbol-namespaces.rst focuses on in-tree modules. Having said that, some people already tried nsdeps for external modules. So, it would be nice to support it. Reported-by: Steve French Reported-by: Jessica Yu Signed-off-by: Masahiro Yamada Tested-by: Jessica Yu Acked-by: Jessica Yu Reviewed-by: Matthias Maennich Tested-by: Matthias Maennich commit bbc55bded4aaf47d6f2bd9389fc8d3a3821d18c0 Author: Masahiro Yamada Date: Tue Oct 29 21:38:07 2019 +0900 modpost: dump missing namespaces into a single modules.nsdeps file The modpost, with the -d option given, generates per-module .ns_deps files. Kbuild generates per-module .mod files to carry module information. This is convenient because Make handles multiple jobs in parallel when the -j option is given. On the other hand, the modpost always runs as a single thread. I do not see a strong reason to produce separate .ns_deps files. This commit changes the modpost to generate just one file, modules.nsdeps, each line of which has the following format: : Please note it contains *missing* namespaces instead of required ones. So, modules.nsdeps is empty if the namespace dependency is all good. This will work more efficiently because spatch will no longer process already imported namespaces. I removed the '(if needed)' from the nsdeps log since spatch is invoked only when needed. This also solves the stale .ns_deps problem reported by Jessica Yu: https://lkml.org/lkml/2019/10/28/467 Signed-off-by: Masahiro Yamada Tested-by: Jessica Yu Acked-by: Jessica Yu Reviewed-by: Matthias Maennich Tested-by: Matthias Maennich commit 0241ea8cae19b49fc1b1459f7bbe9a77f4f9cc89 Author: Masahiro Yamada Date: Thu Nov 7 00:19:59 2019 +0900 modpost: free ns_deps_buf.p after writing ns_deps files buf_write() allocates memory. Free it. Signed-off-by: Masahiro Yamada commit bff9c62b5d20d26f54bab81b33b6d9d1f9afcdf6 Author: Masahiro Yamada Date: Tue Oct 29 21:38:06 2019 +0900 modpost: do not invoke extra modpost for nsdeps 'make nsdeps' invokes the modpost three times at most; before linking vmlinux, before building modules, and finally for generating .ns_deps files. Running the modpost again and again is not efficient. The last two can be unified. When the -d option is given, the modpost still does the usual job, and in addition, generates .ns_deps files. Signed-off-by: Masahiro Yamada Tested-by: Matthias Maennich Reviewed-by: Matthias Maennich commit faade9610246e9e443068be8cb24c784e9a91f2e Author: Bhaskar Chowdhury Date: Wed Nov 6 09:06:10 2019 +0530 scripts/ver_linux: add Bison and Flex to the checklist Signed-off-by: Bhaskar Chowdhury Acked-by: Alexander Kapshuk Signed-off-by: Masahiro Yamada commit 46b2afa6890d0ffd234741deea2e24ee222a827f Author: Alyssa Ross Date: Tue Nov 5 15:07:36 2019 +0000 kconfig: be more helpful if pkg-config is missing If ncurses is installed, but at a non-default location, the previous error message was not helpful in resolving the situation. Now it will suggest that pkg-config might need to be installed in addition to ncurses. Signed-off-by: Alyssa Ross Signed-off-by: Masahiro Yamada commit 5d8b42aa7ccbfa09c361b3a5289c1a7e380847ff Author: Laura Abbott Date: Mon Nov 4 17:10:08 2019 -0500 kconfig: Add option to get the full help text with listnewconfig make listnewconfig will list the individual options that need to be set. This is useful but there's no easy way to get the help text associated with the options at the same time. Introduce a new targe 'make helpnewconfig' which lists the full help text of all the new options as well. This makes it easier to automatically generate changes that are easy for humans to review. This command also adds markers between each option for easier parsing. Signed-off-by: Laura Abbott Acked-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit af7db99a1caf29b05a81bfee596b9d2778eb7e39 Author: Matteo Croce Date: Mon Nov 4 14:11:44 2019 +0100 kbuild: Add make dir-pkg build option Add a 'dir-pkg' target which just creates the same directory structures as in tar-pkg, but doesn't package anything. Useful when the user wants to copy the kernel tree on a machine using ssh, rsync or whatever. Signed-off-by: Matteo Croce Signed-off-by: Masahiro Yamada commit 4234448b7073dfcd5792b5c9ad223fbe8b9520ef Author: Geert Uytterhoeven Date: Fri Oct 25 13:53:05 2019 +0200 kbuild: Extend defconfig field size from 24 to 27 There are 6 defconfigs with names longer than 24 characters, breaking alignment in "make help". The "winner" is "ecovec24-romimage_defconfig", counting in at 27 characters. Extend the defconfig field size to 27 to restore alignment. Don't use a larger value, to not encourage people to create even longer defconfig names. Signed-off-by: Geert Uytterhoeven Acked-by: Hans-Christian Egtvedt Signed-off-by: Masahiro Yamada commit a64c0440dda1fff1fb5723140828983d0ca821d4 Author: Geert Uytterhoeven Date: Fri Oct 25 13:52:32 2019 +0200 kbuild: Wrap long "make help" text lines Some "make help" text lines extend beyond 80 characters. Wrap them before an opening parenthesis, or before 80 characters. Signed-off-by: Geert Uytterhoeven Signed-off-by: Masahiro Yamada commit 3c96bdd0ebfaf750a91016433adc7a6ee711a519 Author: Bhaskar Chowdhury Date: Wed Oct 23 07:24:27 2019 +0530 scripts: setlocalversion: replace backquote to dollar parenthesis This patch replaces backquote to dollar parenthesis syntax for better readability. Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Acked-by: Nico Schottelius Signed-off-by: Masahiro Yamada commit 03034dbdaed8b47282d647c1100dbb0f522798f3 Author: Masahiro Yamada Date: Fri Oct 18 13:31:48 2019 +0900 asm-generic/export.h: remove unneeded __kcrctab_* symbols EXPORT_SYMBOL from assembly code produces an unused symbol __kcrctab_*. kcrctab is used as a section name (prefixed with three underscores), but never used as a symbol. Signed-off-by: Masahiro Yamada commit a31ec048ef01a76ff893e0fa482e569d04d0c4b4 Author: Masahiro Yamada Date: Fri Oct 18 13:31:47 2019 +0900 asm-generic/export.h: make __ksymtab_* local symbols For EXPORT_SYMBOL from C files, defines __ksymtab_* as local symbols. For EXPORT_SYMBOL from assembly, in contrast, produces globally-visible __ksymtab_* symbols due to this .globl directive. I do not know why this must be global. It still works without this. Signed-off-by: Masahiro Yamada commit 2dffd23f81a365307c0edcf9cb40b6ddae2b481e Author: Masahiro Yamada Date: Wed Oct 16 14:15:47 2019 +0900 kbuild: make single target builds much faster Since commit 394053f4a4b3 ("kbuild: make single targets work more correctly"), building single targets is really slow. Speed it up by not descending into unrelated directories. Signed-off-by: Masahiro Yamada commit 203126293cd78c56578e33dfe8d517e7e83941a8 Author: Masahiro Yamada Date: Wed Oct 16 14:15:46 2019 +0900 kbuild: reduce KBUILD_SINGLE_TARGETS as descending into subdirectories KBUILD_SINGLE_TARGETS does not need to contain all the targets. Change it to keep track the targets only from the current directory and its subdirectories. Signed-off-by: Masahiro Yamada commit 35e046a203ee3bc8ba9ae3561b50de02646dfb81 Author: Masahiro Yamada Date: Wed Oct 16 14:12:15 2019 +0900 kbuild: remove unneeded variable, single-all When single-build is set, everything in $(MAKECMDGOALS) is a single target. You can use $(MAKECMDGOALS) to list out the single targets. Signed-off-by: Masahiro Yamada commit f276031b4e2f4c961ed6d8a42f0f0124ccac2e09 Author: Masahiro Yamada Date: Tue Oct 8 21:05:56 2019 +0900 kheaders: explain why include/config/autoconf.h is excluded from md5sum This comment block explains why include/generated/compile.h is omitted, but nothing about include/generated/autoconf.h, which might be more difficult to understand. Add more comments. Signed-off-by: Masahiro Yamada commit 1463f74f492eea7191f0178e01f3d38371a48210 Author: Masahiro Yamada Date: Tue Oct 8 21:05:55 2019 +0900 kheaders: remove the last bashism to allow sh to run it 'pushd' ... 'popd' is the last bash-specific code in this script. One way to avoid it is to run the code in a sub-shell. With that addressed, you can run this script with sh. I replaced $(BASH) with $(CONFIG_SHELL), and I changed the hashbang to #!/bin/sh. Signed-off-by: Masahiro Yamada commit ea79e5168be644fdaf7d4e6a73eceaf07b3da76a Author: Masahiro Yamada Date: Tue Oct 8 21:05:54 2019 +0900 kheaders: optimize header copy for in-tree builds This script copies headers by the cpio command twice; first from srctree, and then from objtree. However, when we building in-tree, we know the srctree and the objtree are the same. That is, all the headers copied by the first cpio are overwritten by the second one. Skip the first cpio when we are building in-tree. Signed-off-by: Masahiro Yamada commit 0e11773e76098729552b750ccff79374d1e62002 Author: Masahiro Yamada Date: Tue Oct 8 21:05:53 2019 +0900 kheaders: optimize md5sum calculation for in-tree builds This script computes md5sum of headers in srctree and in objtree. However, when we are building in-tree, we know the srctree and the objtree are the same. That is, we end up with the same computation twice. In fact, the first two lines of kernel/kheaders.md5 are always the same for in-tree builds. Unify the two md5sum calculations. For in-tree builds ($building_out_of_srctree is empty), we check only two directories, "include", and "arch/$SRCARCH/include". For out-of-tree builds ($building_out_of_srctree is 1), we check 4 directories, "$srctree/include", "$srctree/arch/$SRCARCH/include", "include", and "arch/$SRCARCH/include" since we know they are all different. Signed-off-by: Masahiro Yamada commit 9a066357184485784f782719093ff804d05b85db Author: Masahiro Yamada Date: Tue Oct 8 21:05:52 2019 +0900 kheaders: remove unneeded 'cat' command piped to 'head' / 'tail' The 'head' and 'tail' commands can take a file path directly. So, you do not need to run 'cat'. cat kernel/kheaders.md5 | head -1 ... is equivalent to: head -1 kernel/kheaders.md5 and the latter saves forking one process. While I was here, I replaced 'head -1' with 'head -n 1'. I also replaced '==' with '=' since we do not have a good reason to use the bashism. Signed-off-by: Masahiro Yamada commit 39808e451fdf30d20099a92e5185a0acb028d826 Author: Masahiro Yamada Date: Thu Oct 3 19:29:14 2019 +0900 kbuild: do not read $(KBUILD_EXTMOD)/Module.symvers Since commit 040fcc819a2e ("kbuild: improved modversioning support for external modules"), the external module build reads Module.symvers in the directory of the module itself, then dumps symbols back into it. It accumulates stale symbols in the file when you build an external module incrementally. The idea behind it was, as the commit log explained, you can copy Modules.symvers from one module to another when you need to pass symbol information between two modules. However, the manual copy of the file sounds questionable to me, and containing stale symbols is a downside. Some time later, commit 0d96fb20b7ed ("kbuild: Add new Kbuild variable KBUILD_EXTRA_SYMBOLS") introduced a saner approach. So, this commit removes the former one. Going forward, the external module build dumps symbols into Module.symvers to be carried via KBUILD_EXTRA_SYMBOLS, but never reads it automatically. With the -I option removed, there is no one to set the external_module flag unless KBUILD_EXTRA_SYMBOLS is passed. Now the -i option does it instead. Signed-off-by: Masahiro Yamada commit 1747269ab016b49650c952099b0ca096ed5c06f1 Author: Masahiro Yamada Date: Thu Oct 3 19:29:13 2019 +0900 modpost: do not parse vmlinux for external module builds When building external modules, $(objtree)/Module.symvers is scanned for symbol information of vmlinux and in-tree modules. Additionally, vmlinux is parsed if it exists in $(objtree)/. This is totally redundant since all the necessary information is contained in $(objtree)/Module.symvers. Do not parse vmlinux at all for external module builds. This makes sense because vmlinux is deleted by 'make clean'. 'make clean' leaves all the build artifacts for building external modules. vmlinux is unneeded for that. Signed-off-by: Masahiro Yamada commit fab546e6cd7aee6574472ad3239db07ee1d94c09 Author: Masahiro Yamada Date: Wed Nov 6 23:52:15 2019 +0900 kbuild: update comments in scripts/Makefile.modpost The comment line "When building external modules ..." explains the same thing as "Include the module's Makefile ..." a few lines below. The comment "they may be used when building the .mod.c file" is no longer true; .mod.c file is compiled in scripts/Makefile.modfinal since commit 9b9a3f20cbe0 ("kbuild: split final module linking out into Makefile.modfinal"). I still keep the code in case $(obj) or $(src) is used in the external module Makefile. Signed-off-by: Masahiro Yamada commit 521b29b6ff53aa642ca0964ad34c2ebcb8dbad14 Author: Masahiro Yamada Date: Mon Aug 26 02:28:33 2019 +0900 kconfig: split util.c out of parser.y util.c exists both in scripts/kconfig/ and scripts/kconfig/lxdialog. Prior to commit 54b8ae66ae1a ("kbuild: change *FLAGS_.o to take the path relative to $(obj)"), Kbuild could not pass different flags to source files with the same basename. Now that this issue was solved, you can split util.c out of parser.y and compile them independently of each other. Signed-off-by: Masahiro Yamada commit 78a20a012ecea857e438b1f9e8091acb290bd0f5 Author: Masahiro Yamada Date: Wed Aug 21 13:12:37 2019 +0900 video/logo: move pnmtologo tool to drivers/video/logo/ from scripts/ This tool is only used by drivers/video/logo/Makefile. No reason to keep it in scripts/. Signed-off-by: Masahiro Yamada commit e3c639b899335684a2c675632524ae561cd326d2 Author: Masahiro Yamada Date: Wed Aug 21 13:12:36 2019 +0900 video/logo: simplify cmd_logo Shorten the code. It still works in the same way. Signed-off-by: Masahiro Yamada commit c25f867ddd00d336019362da71192be71a42c245 Author: Masahiro Yamada Date: Tue Jul 23 20:32:52 2019 +0900 ia64: remove unneeded uapi asm-generic wrappers These are listed in include/uapi/asm-generic/Kbuild, so Kbuild will automatically generate them. Signed-off-by: Masahiro Yamada commit 872e24d5c698c7a191201aec5ca2a9fe6326898b Author: Masahiro Yamada Date: Tue Jul 23 19:27:45 2019 +0900 hexagon: remove asm/bitsperlong.h Remove hexagon-specific bitsperlong.h so that it falls back to include/uapi/asm-generic/bitsperlong.h Kbuild will automatically create a wrapper of it. Signed-off-by: Masahiro Yamada commit 761becb29183c4e2ad9ff5f63933170c8fffd544 Author: Markus Elfring Date: Tue Nov 5 12:19:39 2019 +0100 irqchip/ti-sci-inta: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) A coccicheck run provided information like the following. drivers/irqchip/irq-ti-sci-inta.c:250:9-16: WARNING: ERR_CAST can be used with vint_desc. Generated by: scripts/coccinelle/api/err_cast.cocci Thus adjust the exception handling in one if branch. Signed-off-by: Markus Elfring Signed-off-by: Marc Zyngier Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/776b7135-26af-df7d-c3a9-4339f7bf1f15@web.de commit 6fcbcec9cfc7b3c6a2c1f1a23ebacedff7073e0a Author: Konstantin Khlebnikov Date: Sun Nov 10 12:49:06 2019 +0300 fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long Quota statistics counted as 64-bit per-cpu counter. Reading sums per-cpu fractions as signed 64-bit int, filters negative values and then reports lower half as signed 32-bit int. Result may looks like: fs.quota.allocated_dquots = 22327 fs.quota.cache_hits = -489852115 fs.quota.drops = -487288718 fs.quota.free_dquots = 22083 fs.quota.lookups = -486883485 fs.quota.reads = 22327 fs.quota.syncs = 335064 fs.quota.writes = 3088689 Values bigger than 2^31-1 reported as negative. All counters except "allocated_dquots" and "free_dquots" are monotonic, thus they should be reported as is without filtering negative values. Kernel doesn't have generic helper for 64-bit sysctl yet, let's use at least unsigned long. Link: https://lore.kernel.org/r/157337934693.2078.9842146413181153727.stgit@buzz Signed-off-by: Konstantin Khlebnikov Signed-off-by: Jan Kara commit e380a0394c36a3a878c858418d5dd7f5f195b6fc Author: Nicolas Saenz Julienne Date: Thu Nov 7 16:06:45 2019 +0100 x86/PCI: sta2x11: use default DMA address translation The devices found behind this PCIe chip have unusual DMA mapping constraints as there is an AMBA interconnect placed in between them and the different PCI endpoints. The offset between physical memory addresses and AMBA's view is provided by reading a PCI config register, which is saved and used whenever DMA mapping is needed. It turns out that this DMA setup can be represented by properly setting 'dma_pfn_offset', 'dma_bus_mask' and 'dma_mask' during the PCI device enable fixup. And ultimately allows us to get rid of this device's custom DMA functions. Aside from the code deletion and DMA setup, sta2x11_pdev_to_mapping() is moved to avoid warnings whenever CONFIG_PM is not enabled. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Christoph Hellwig commit b12d66278dd627cbe1ea7c000aa4715aaf8830c8 Author: Nicolas Saenz Julienne Date: Thu Nov 7 16:06:44 2019 +0100 dma-direct: check for overflows on 32 bit DMA addresses As seen on the new Raspberry Pi 4 and sta2x11's DMA implementation it is possible for a device configured with 32 bit DMA addresses and a partial DMA mapping located at the end of the address space to overflow. It happens when a higher physical address, not DMAable, is translated to it's DMA counterpart. For example the Raspberry Pi 4, configurable up to 4 GB of memory, has an interconnect capable of addressing the lower 1 GB of physical memory with a DMA offset of 0xc0000000. It transpires that, any attempt to translate physical addresses higher than the first GB will result in an overflow which dma_capable() can't detect as it only checks for addresses bigger then the maximum allowed DMA address. Fix this by verifying in dma_capable() if the DMA address range provided is at any point lower than the minimum possible DMA address on the bus. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Christoph Hellwig commit 5e76f564572b85735de4b75a5e73b514be2562be Author: Eric Dumazet Date: Wed Oct 30 11:48:44 2019 -0700 dma-debug: increase HASH_SIZE With modern NIC, it is not unusual having about ~256,000 active dma mappings and a hash size of 1024 buckets is too small. Forcing full cache line per bucket does not seem useful, especially now that we have contention on free_entries_lock for allocations and freeing of entries. Better use the space to fit more buckets. Signed-off-by: Eric Dumazet Signed-off-by: Christoph Hellwig commit d3694f30732fd2a334b93f087033c5a5836f7aba Author: Eric Dumazet Date: Wed Oct 30 12:32:04 2019 -0700 dma-debug: reorder struct dma_debug_entry fields Move all fields used during exact match lookups to the first cache line. This makes debug_dma_mapping_error() and friends about 50% faster. Since it removes two 32bit holes, force a cacheline alignment on struct dma_debug_entry. Signed-off-by: Eric Dumazet Signed-off-by: Christoph Hellwig commit 0f665b9e2a6d4cc963e6cd349d40320ed5281f95 Author: Christoph Hellwig Date: Tue Oct 29 10:53:30 2019 +0100 xtensa: use the generic uncached segment support Switch xtensa over to use the generic uncached support, and thus the generic implementations of dma_alloc_* and dma_alloc_*, which also gains support for mmaping DMA memory. The non-working nommu DMA support has been disabled, but could be re-enabled easily if platforms that actually have an uncached segment show up. Signed-off-by: Christoph Hellwig Reviewed-by: Max Filippov Tested-by: Max Filippov commit 3acac065508f6cc60ac9d3e4b7c6cc37fd91d531 Author: Christoph Hellwig Date: Tue Oct 29 11:06:32 2019 +0100 dma-mapping: merge the generic remapping helpers into dma-direct Integrate the generic dma remapping implementation into the main flow. This prepares for architectures like xtensa that use an uncached segment for pages in the kernel mapping, but can also remap highmem from CMA. To simplify that implementation we now always deduct the page from the physical address via the DMA address instead of the virtual address. Signed-off-by: Christoph Hellwig Reviewed-by: Max Filippov commit 34dc0ea6bc960f1f57b2148f01a3f4da23f87013 Author: Christoph Hellwig Date: Tue Oct 29 11:01:37 2019 +0100 dma-direct: provide mmap and get_sgtable method overrides For dma-direct we know that the DMA address is an encoding of the physical address that we can trivially decode. Use that fact to provide implementations that do not need the arch_dma_coherent_to_pfn architecture hook. Note that we still can only support mmap of non-coherent memory only if the architecture provides a way to set an uncached bit in the page tables. This must be true for architectures that use the generic remap helpers, but other architectures can also manually select it. Signed-off-by: Christoph Hellwig Reviewed-by: Max Filippov commit f77021372e2880237278e0ee57faadc077a8256a Author: Ville Syrjälä Date: Wed Oct 30 21:08:15 2019 +0200 drm/i915: Preload LUTs if the hw isn't currently using them The LUTs are single buffered so in order to program them without tearing we'd have to do it during vblank (actually to be 100% effective it has to happen between start of vblank and frame start). We have no proper mechanism for that at the moment so we just defer loading them after the vblank waits have happened. That is not quite sufficient (especially when committing multiple pipes whose vblanks don't line up) so the LUT load will often leak into the following frame causing tearing. However in case the hardware wasn't previously using the LUT we can preload it before setting the enable bit (which is double buffered so won't tear). Let's determine if we can do such preloading and make it happen. Slight variation between the hardware requires some platforms specifics in the checks. Hans is seeing ugly colored flash on VLV/CHV macchines (GPD win and Asus T100HA) when the gamma LUT gets loaded for the first time as the BIOS has left some junk in the LUT memory. v2: Deal with uapi vs. hw crtc state split s/GCM/CGM/ typo fix Cc: Hans de Goede Fixes: 051a6d8d3ca0 ("drm/i915: Move LUT programming to happen after vblank waits") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191030190815.7359-1-ville.syrjala@linux.intel.com Tested-by: Hans de Goede Reviewed-by: Hans de Goede (cherry picked from commit 0ccc42a2fd5107a7f58e62c8b35b61de9a70ce82) Signed-off-by: Joonas Lahtinen commit 4b48512c2e9c63b62d7da23563cdb224b4d61d72 Author: Jiri Slaby Date: Mon Nov 11 10:26:47 2019 +0100 stacktrace: Get rid of unneeded '!!' pattern My commit b0c51f158455 ("stacktrace: Don't skip first entry on noncurrent tasks") adds one or zero to skipnr by "!!(current == tsk)". But the C99 standard says: The == (equal to) and != (not equal to) operators are ... Each of the operators yields 1 if the specified relation is true and 0 if it is false. So there is no need to prepend the above expression by "!!" -- remove it. Reported-by: Joe Perches Signed-off-by: Jiri Slaby Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111092647.27419-1-jslaby@suse.cz Signed-off-by: Ingo Molnar commit 0b0cb52bd80eda76c4b9921f5cf9c1b709d44e83 Author: Arnd Bergmann Date: Fri Oct 18 17:41:53 2019 +0200 video: backlight: tosa: Use GPIO lookup table The driver should not require a machine specific header. Change it to pass the GPIO line through a lookup table, and move the timing generator definitions into the drivers itself. Signed-off-by: Arnd Bergmann Acked-by: Robert Jarzmik Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 49461659bde134d91159f904eb8eca8625738f8f Author: Matti Vaittinen Date: Wed Oct 23 12:34:37 2019 +0300 dt-bindings: mfd: max77693: Fix missing curly brace Add missing curly brace to charger node example. Signed-off-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Lee Jones commit dd047dce3a6f5233b98e792e2287cc549da35879 Author: Andy Shevchenko Date: Tue Oct 29 11:44:09 2019 +0200 mfd: intel-lpss: Add Intel Comet Lake PCH-H PCI IDs Intel Comet Lake PCH-H has the same LPSS than Intel Cannon Lake. Add the new IDs to the list of supported devices. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 22fb3ad0cc5f578398953ddcab9c8239a08caccd Author: Linus Walleij Date: Sat Oct 26 23:47:32 2019 +0200 mfd: db8500-prcmu: Support U8420-sysclk firmware There is a distinct version of the Ux500 U8420 variant with "sysclk", as can be seen from the vendor code that didn't make it upstream, this firmware lacks the ULPPLL (ultra-low power phase locked loop) which in effect means that the timer clock is instead wired to the 32768 Hz always-on clock. This has some repercussions when enabling the timer clock as the code as it stands will disable the timer clock on these platforms (lacking the so-called "doze mode") and obtaining the wrong rate of the timer clock. The timer frequency is of course needed very early in the boot, and as a consequence, we need to shuffle around the early PRCMU init code: whereas in the past we did not need to look up the PRCMU firmware version in the early init, but now we need to know the version before the core system timers are registered so we restructure the platform callbacks to the PRCMU so as not to take any arguments and instead look up the resources it needs directly from the device tree when initializing. As we do not yet support any platforms using this firmware it is not a regression, but as PostmarketOS is starting to support products with this firmware we need to fix this up. The low rate of 32kHz also makes the MTU timer unsuitable as delay timer but this needs to be fixed in a separate patch. Signed-off-by: Linus Walleij Reviewed-by: Stephan Gerhold Acked-by: Olof Johansson Signed-off-by: Lee Jones commit 59dbc0e0d498c8bdb26a661ee080ee8d147c3c5d Author: Bartosz Golaszewski Date: Mon Oct 21 14:44:27 2019 +0200 dt-bindings: mfd: max77650: Convert the binding document to yaml Convert the binding document for MAX77650 core MFD module to YAML. Signed-off-by: Bartosz Golaszewski Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit b944a688063c544469db713e0d613caaddd598fe Author: Lee Jones Date: Mon Oct 21 10:55:23 2019 +0100 mfd: mfd-core: Move pdev->mfd_cell creation back into mfd_add_device() Most of the complexity of mfd_platform_add_cell() has been removed. The only functionality left duplicates cell memory into the child's platform device. Since it's only a few lines, moving it to the main thread and removing the superfluous function makes sense. Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Mark Brown commit 5a47c0fbd276b7f57bd38f153e8b15784b2f6f22 Author: Lee Jones Date: Mon Oct 21 10:47:37 2019 +0100 mfd: mfd-core: Remove usage counting for .{en,dis}able() call-backs The MFD implementation for reference counting was complex and unnecessary. There was only one bona fide user which has now been converted to handle the process in a different way. Any future resource protection, shared enablement functions should be handed by the parent device, rather than through the MFD subsystem API. Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Mark Brown commit 504c3fad8c38d5ff5a16b76c815f51c1aa375586 Author: Lee Jones Date: Mon Oct 21 13:50:59 2019 +0100 x86: olpc-xo1-sci: Remove invocation of MFD's .enable()/.disable() call-backs IO regions are now requested and released by this device's parent. Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson commit 0cfe013c22789f4253e4ed54cd880bfffaea3d46 Author: Lee Jones Date: Mon Oct 21 08:59:14 2019 +0100 x86: olpc-xo1-pm: Remove invocation of MFD's .enable()/.disable() call-backs IO regions are now requested and released by this device's parent. Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson commit ead1c83ddd7613d9e61368dc686d014e37955192 Author: Lee Jones Date: Fri Oct 18 13:31:39 2019 +0100 mfd: mfd-core: Remove mfd_clone_cell() Providing a subsystem-level API helper seems over-kill just to save a few lines of C-code. Previous commits saw us convert mfd_clone_cell()'s only user over to use a more traditional style of MFD child-device registration. Now we can remove the superfluous helper from the MFD API. Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson commit b195e101580db390f50b0d587b7f66f241d2bc88 Author: Lee Jones Date: Mon Oct 21 10:16:34 2019 +0100 mfd: mfd-core: Protect against NULL call-back function pointer If a child device calls mfd_cell_{en,dis}able() without an appropriate call-back being set, we are likely to encounter a panic. Avoid this by adding suitable checking. Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Mark Brown commit 99cd1059759833f83cc7e442fe2c3b0bd4dff399 Author: Lee Jones Date: Fri Oct 18 11:36:44 2019 +0100 mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entries CS5535 is the only user of mfd_clone_cell(). It makes more sense to register child devices in the traditional way and remove the quite bespoke mfd_clone_cell() call from the MFD API. Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson commit 2d4ba9173aecc7e69ae6b842564437b9209c7a71 Author: Lee Jones Date: Mon Oct 21 08:49:49 2019 +0100 mfd: cs5535-mfd: Request shared IO regions centrally Prior to this patch, IO regions were requested via an MFD subsytem-level .enable() call-back and similarly released by a .disable() call-back. Double requests/releases were avoided by a centrally handled usage count mechanism. This complexity can all be avoided by handling IO regions only once during .probe() and .remove() of the parent device. Since this is the only legitimate user of the aforementioned usage count mechanism, this patch will allow it to be removed from MFD core in subsequent steps. Suggested-by: Daniel Thompson Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson commit 2129e56e95f877c71989e7d0391de47f3907a261 Author: Lee Jones Date: Fri Oct 18 10:23:49 2019 +0100 mfd: cs5535-mfd: Remove mfd_cell->id hack The current implementation abuses the platform 'id' mfd_cell member to index into the correct resources entry. Seeing as enough resource slots are already available, let's just loop through all available bars and allocate them to their appropriate slot, even if they happen to be zero. Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson commit 601e4289a01f70fd78b19dc7da0e10b902485ae6 Author: Lee Jones Date: Fri Oct 18 10:09:24 2019 +0100 mfd: cs5535-mfd: Use PLATFORM_DEVID_* defines and tidy error message In most contexts '-1' doesn't really mean much to the casual observer. In almost all cases, it's better to use a human readable define. In this case PLATFORM_DEVID_* defines have already been provided for this purpose. While we're here, let's be specific about the 'MFD devices' which failed. It will help when trying to distinguish which of the 2 sets of sub-devices we actually failed to register. Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson commit 36f1b26b4bc4f8c59288c477216aa52ba347c14c Author: Hans de Goede Date: Thu Oct 24 23:38:27 2019 +0200 mfd: intel_soc_pmic_crc: Add "cht_crystal_cove_pmic" cell to CHT cells Add a "cht_crystal_cove_pmic" cell to the cells for the Cherry Trail variant of the Crystal Cove PMIC. Adding this cell enables / hooks-up the new Cherry Trail Crystal Cove PMIC OpRegion driver. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones commit 1e624fce3a1ca03fcea167cc43399d0073472edc Author: Charles Keepax Date: Mon Oct 21 14:58:13 2019 +0100 mfd: madera: Add support for requesting the supply clocks Add the ability to get the clock for each clock input pin of the chip and enable MCLK2 since that is expected to be a permanently enabled 32kHz clock. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit c9d93428bf6212a61482a688d8201e66de9c0a0b Author: Charles Keepax Date: Mon Oct 21 14:58:12 2019 +0100 mfd: madera: Update DT binding document to support clock supplies Add the 3 input clock sources for the chip into the device tree binding document. Signed-off-by: Charles Keepax Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 28eafe9162b6a8b7d0266889d55567ba5a7809d5 Author: Charles Keepax Date: Mon Oct 21 14:58:11 2019 +0100 mfd: wm8998: Remove some unused registers Save a few bytes by removing some registers from the driver that are not currently used and not intended to be used at any point in the future. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit eb00f70d774fd28142148ad8a4f97db6b1d55f7b Author: Fabien Parent Date: Sun Oct 20 17:07:20 2019 +0200 mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1 Use the correct macro when adding the MFD devices instead of using directly '-1' value. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Signed-off-by: Lee Jones commit cbfdc839ea913250bd38528408addf44b27e9e5f Author: Jonathan Cameron Date: Sun Oct 13 10:30:15 2019 +0100 mfd: twl: Endian fixups in i2c write and read wrappers Use a local variable to ensure correct endian types for intermediate results. Identified by sparse when building the IIO driver. Signed-off-by: Jonathan Cameron Signed-off-by: Lee Jones commit 11c4f2be58c24a43e60f1379e6f23ba027b740e3 Author: Frank Wunderlich Date: Thu Oct 3 20:53:23 2019 +0200 mfd: mt6397: Fix probe after changing mt6397-core Part 3 from this series [1] was not merged due to wrong splitting and breaks mt6323 pmic on bananapi-r2 dmesg prints this line and at least switch is not initialized on bananapi-r2 mt6397 1000d000.pwrap:mt6323: unsupported chip: 0x0 this patch contains only the probe-changes and chip_data structs from original part 3 by Hsin-Hsiung Wang [1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=164155 Fixes: a4872e80ce7d ("mfd: mt6397: Extract IRQ related code from core driver") Signed-off-by: Frank Wunderlich Signed-off-by: Lee Jones commit 5da3f7673764906ce211497c8034ed764077f183 Author: Dmitry Torokhov Date: Wed Oct 2 17:28:32 2019 -0700 mfd: arizona: Switch to using devm_gpiod_get() Now that gpiolib recognizes wlf,reset legacy GPIO and will handle it even if DTS uses it without -gpio[s] suffix, we can switch to more standard devm_gpiod_get() and later remove devm_gpiod_get_from_of_node(). Note that we will lose "arizona /RESET" custom GPIO label, but since we do not set such custom label when using the modern binding, I opted to not having it here either. Signed-off-by: Dmitry Torokhov Acked-by: Charles Keepax Signed-off-by: Lee Jones commit 7f0e60c751dc7252276230c7f8def447ffc0af4e Author: Thierry Reding Date: Wed Oct 2 16:43:18 2019 +0200 mfd: max77620: Do not allocate IRQs upfront regmap_add_irq_chip() will try to allocate all of the IRQ descriptors upfront if passed a non-zero irq_base parameter. However, the intention is to allocate IRQ descriptors on an as-needed basis if possible. Pass 0 instead of -1 to fix that use-case. Signed-off-by: Thierry Reding Signed-off-by: Lee Jones commit f5b4c8b45d937a94302ba135c9909423d89b0834 Author: Angelo G. Del Regno Date: Sat Sep 21 11:50:42 2019 +0200 mfd: qcom-spmi-pmic: Add support for PM/PMI8950 Add the subtype and compatible strings for PM8950 and PMI8950, found in various SoCs, including MSM8953, MSM8956, MSM8976 and APQ variants. Signed-off-by: Angelo G. Del Regno Signed-off-by: Lee Jones commit a04b4be677311113fe05e02bbf1c2a7dfb7ce7c4 Author: Lee Jones Date: Thu Jun 30 15:40:21 2016 +0100 mfd: db8500-prcmu: Example using new OF_MFD_CELL/MFD_CELL_BASIC MACROs ... with and without 'resources'. Signed-off-by: Lee Jones Acked-by: Linus Walleij commit f4d41ad844331c4fe000dffccb017779a2a426a4 Author: Lee Jones Date: Wed Feb 10 15:35:36 2016 +0000 mfd: ab8500: Example using new OF_MFD_CELL MACRO ... with and without platform ID. Signed-off-by: Lee Jones Acked-by: Linus Walleij commit 393f05f1d4651f7e4661a8739c381300dd9e39dc Author: Lee Jones Date: Tue Feb 9 14:08:27 2016 +0000 mfd: Provide MACRO to declare commonly defined MFD cell attributes Signed-off-by: Lee Jones Acked-by: Laxman Dewangan Tested-by: Laxman Dewangan commit f20781e5f38eec12174c6d3f018ba001d2e9087d Author: Markus Elfring Date: Wed Sep 18 13:40:30 2019 +0200 mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Lee Jones commit eeb86ed3eafadd51dd97677856b68d6294eea00f Author: Heiko Stuebner Date: Tue Sep 17 10:12:56 2019 +0200 mfd: rk808: Use DEFINE_RES_IRQ for rk808 RTC alarm IRQ Do not open code the definition, instead use the nice DEFINE_RES_IRQ macro for it. Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones commit dbd16ef53487084816a20f662423ab543a75fc83 Author: Heiko Stuebner Date: Tue Sep 17 10:12:55 2019 +0200 mfd: rk808: Set RK817 interrupt polarity to low All other rk8xx operate with the polarity on low and even the old submitted devicetree snippet for the px30-evb declared the irq as low. So bring the rk817 preset in line with this, as there is really no reason for it to be the only with with a high polarity. The rk809/rk817 hasn't been added to any devicetrees so far, so this won't break anything. Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones commit bc85e4adbd50ee016f218eb0a2d5c0d64d22c1d5 Author: Heiko Stuebner Date: Tue Sep 17 10:12:54 2019 +0200 mfd: rk808: Fix RK817 powerkey integration The pwrkey integration seems to stem from the vendor kernel, as the compatible is wrong and also the order of key-irqs is swapped. So fix these issues to make the pwrkey on rk817 actually work. Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones commit 37ef8c2c15bdc1322b160e38986c187de2b877b2 Author: Daniel Schultz Date: Tue Sep 17 10:12:53 2019 +0200 mfd: rk808: Fix RK818 ID template The Rockchip PMIC driver can automatically detect connected component versions by reading the ID_MSB and ID_LSB registers. The probe function will always fail with RK818 PMICs because the ID_MSK is 0xFFF0 and the RK818 template ID is 0x8181. This patch changes this value to 0x8180. Fixes: 9d6105e19f61 ("mfd: rk808: Fix up the chip id get failed") Cc: stable@vger.kernel.org Cc: Elaine Zhang Cc: Joseph Chen Signed-off-by: Daniel Schultz Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones commit 3f31bc67e4dc6a555341dffefe328ddd58e8b431 Author: Jarkko Nikula Date: Wed Sep 4 08:56:25 2019 +0300 mfd: intel-lpss: Add default I2C device properties for Gemini Lake It turned out Intel Gemini Lake doesn't use the same I2C timing parameters as Broxton. I got confirmation from the Windows team that Gemini Lake systems should use updated timing parameters that differ from those used in Broxton based systems. Fixes: f80e78aa11ad ("mfd: intel-lpss: Add Intel Gemini Lake PCI IDs") Tested-by: Chris Chiu Signed-off-by: Jarkko Nikula Acked-by: Andy Shevchenko Signed-off-by: Lee Jones commit 7c5b0264ee8052b361bb4ddc231bcaede3570198 Merge: 7b8c4d73d7fe 9d0863baff49 Author: Lee Jones Date: Mon Nov 11 08:44:36 2019 +0000 Merge branches 'ib-mfd-doc-sparc-libdevres-5.5' and 'ib-mfd-power-rtc-5.5' into ibs-for-mfd-merged commit 7b8c4d73d7fe68f371d11b38a353134e1ffe199f Author: Tuowen Zhao Date: Wed Oct 16 15:06:30 2019 -0600 docs: driver-model: add devm_ioremap_uc Signed-off-by: Tuowen Zhao Acked-by: Luis Chamberlain Signed-off-by: Lee Jones commit a8ff78f7f773142eb8a8befe5a95dd6858ebd635 Author: Tuowen Zhao Date: Wed Oct 16 15:06:29 2019 -0600 mfd: intel-lpss: Use devm_ioremap_uc for MMIO Some BIOS erroneously specifies write-combining BAR for intel-lpss-pci in MTRR. This will cause the system to hang during boot. If possible, this bug could be corrected with a firmware update. This patch use devm_ioremap_uc to overwrite/ignore the MTRR settings by forcing the use of strongly uncachable pages for intel-lpss. The BIOS bug is present on Dell XPS 13 7390 2-in-1: [ 0.001734] 5 base 4000000000 mask 6000000000 write-combining 4000000000-7fffffffff : PCI Bus 0000:00 4000000000-400fffffff : 0000:00:02.0 (i915) 4010000000-4010000fff : 0000:00:15.0 (intel-lpss-pci) Link: https://bugzilla.kernel.org/show_bug.cgi?id=203485 Cc: # v4.19+ Tested-by: AceLan Kao Signed-off-by: Tuowen Zhao Acked-by: Mika Westerberg Acked-by: Andy Shevchenko Tested-by: Roman Gilg Signed-off-by: Lee Jones commit e537654b7039aacfe8ae629d49655c0e5692ad44 Author: Tuowen Zhao Date: Wed Oct 16 15:06:28 2019 -0600 lib: devres: add a helper function for ioremap_uc Implement a resource managed strongly uncachable ioremap function. Cc: # v4.19+ Tested-by: AceLan Kao Signed-off-by: Tuowen Zhao Acked-by: Mika Westerberg Acked-by: Andy Shevchenko Acked-by: Luis Chamberlain Signed-off-by: Lee Jones commit 38e45d81d14e5f78cd67922596b1c37b4c22ec74 Author: Tuowen Zhao Date: Wed Oct 16 15:06:27 2019 -0600 sparc64: implement ioremap_uc On sparc64, the whole physical IO address space is accessible using physically addressed loads and stores. *_uc does nothing like the others. Cc: # v4.19+ Reported-by: kbuild test robot Signed-off-by: Tuowen Zhao Acked-by: David S. Miller Signed-off-by: Lee Jones commit aeec766133f99d45aad60d650de50fb382104d95 Author: Ville Syrjälä Date: Wed Nov 6 19:23:49 2019 +0200 drm/i915: Don't oops in dumb_create ioctl if we have no crtcs Make sure we have a crtc before probing its primary plane's max stride. Initially I thought we can't get this far without crtcs, but looks like we can via the dumb_create ioctl. Not sure if we shouldn't disable dumb buffer support entirely when we have no crtcs, but that would require some amount of work as the only thing currently being checked is dev->driver->dumb_create which we'd have to convert to some device specific dynamic thing. Cc: stable@vger.kernel.org Reported-by: Mika Kuoppala Fixes: aa5ca8b7421c ("drm/i915: Align dumb buffer stride to 4k to allow for gtt remapping") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191106172349.11987-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit baea9ffe64200033499a4955f431e315bb807899) Signed-off-by: Joonas Lahtinen commit 3cac195875ef5b032a3ea5d4205b0c45a6a95863 Author: Chris Wilson Date: Wed Nov 6 22:12:23 2019 +0000 drm/i915: Leave the aliasing-ppgtt size alone The hidden aliasing-ppgtt's size is never revealed, as we only inspect the front GTT when engaged. However, we were "fixing" the hidden ppgtt to match, with the net result that we ended up leaking the unused portion on Braswell were we preallocated the entire set of top level PDP, see gen8_preallocate_top_level_pdp(). [ 26.025364] DMA-API: pci 0000:00:02.0: device driver has pending DMA allocations while released from device [count=2] [ 26.025364] One of leaked entries details: [device address=0x0000000230778000] [size=4096 bytes] [mapped with DMA_BIDIRECTIONAL] [mapped as single] [ 26.025683] WARNING: CPU: 0 PID: 415 at kernel/dma/debug.c:894 dma_debug_device_change+0x1a4/0x1f0 [ 26.025905] Modules linked in: i915(E-) intel_powerclamp(E) nls_ascii(E) nls_cp437(E) crct10dif_pclmul(E) crc32_pclmul(E) vfat(E) crc32c_intel(E) fat(E) ghash_clmulni_intel(E) prime_numbers(E) intel_gtt(E) i2c_algo_bit(E) efi_pstore(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) evdev(E) drm(E) aesni_intel(E) glue_helper(E) crypto_simd(E) cryptd(E) intel_cstate(E) sg(E) efivars(E) pcspkr(E) video(E) button(E) efivarfs(E) ip_tables(E) x_tables(E) autofs4(E) sd_mod(E) lpc_ich(E) ahci(E) mfd_core(E) i2c_i801(E) libahci(E) i2c_designware_pci(E) i2c_designware_core(E) [ 26.026613] CPU: 0 PID: 415 Comm: rmmod Tainted: G E 5.4.0-rc6+ #25 [ 26.026837] Hardware name: /, BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [ 26.027080] RIP: 0010:dma_debug_device_change+0x1a4/0x1f0 [ 26.027319] Code: 89 54 24 08 e8 ad 60 62 00 48 8b 54 24 08 48 89 c6 41 57 4d 89 e9 49 89 d8 44 89 f1 41 54 48 c7 c7 e0 61 06 82 e8 c1 aa f5 ff <0f> 0b 5a 59 48 83 3c 24 00 0f 85 97 26 00 00 8b 05 77 47 92 01 85 [ 26.027600] RSP: 0018:ffff888228d2fcc8 EFLAGS: 00010282 [ 26.027831] RAX: 0000000000000000 RBX: 0000000230778000 RCX: 0000000000000000 [ 26.028053] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffed10451a5f8f [ 26.028279] RBP: ffff88823480c0b0 R08: 0000000000000001 R09: ffffed1046e83eb1 [ 26.028500] R10: ffffed1046e83eb0 R11: ffff88823741f587 R12: ffffffff82067340 [ 26.028725] R13: 0000000000001000 R14: 0000000000000002 R15: ffffffff82067480 [ 26.028952] FS: 00007fdf3ed174c0(0000) GS:ffff888237400000(0000) knlGS:0000000000000000 [ 26.029185] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 26.029405] CR2: 000055e211109030 CR3: 0000000230139000 CR4: 00000000001006f0 [ 26.029622] Call Trace: [ 26.029846] notifier_call_chain+0x67/0xa0 [ 26.030076] blocking_notifier_call_chain+0x5a/0x80 [ 26.030305] device_release_driver_internal+0x20d/0x260 [ 26.030535] driver_detach+0x7b/0xe1 [ 26.030761] bus_remove_driver+0x8c/0x153 [ 26.030993] pci_unregister_driver+0x2d/0xf0 [ 26.032603] i915_exit+0x16/0x1c [i915] Reported-by: Ville Syrjälä Fixes: 1eda701eace2 ("drm/i915/gtt: Recursive cleanup for gen8") References: c082afac86cb ("drm/i915: Move aliasing_ppgtt underneath its i915_ggtt") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191106221223.7437-1-chris@chris-wilson.co.uk (cherry picked from commit 2b0a4fc25ad8e3da4a156995a513dca6abf247de) Signed-off-by: Joonas Lahtinen commit 56a327f983f4e66a9cbb15bcc39499dc3107c58d Author: Jani Nikula Date: Tue Oct 29 12:39:47 2019 +0200 drm/i915/display: only include intel_dp_link_training.h where needed The intel_dp_link_training.h include has no need or place in intel_display.h. Include it in intel_display.c instead. Cc: Manasi Navare Fixes: eadf6f9170d5 ("drm/i915/display/icl: Enable master-slaves in trans port sync") Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191029103947.7535-1-jani.nikula@intel.com (cherry picked from commit 3c954c418eb363343ff515756e440aa1dc216e0b) Signed-off-by: Joonas Lahtinen commit 6300c663725187f80de53631bf516971505327f2 Author: Chris Wilson Date: Wed Nov 6 14:41:55 2019 +0000 drm/i915/gem: Fix error path to unlock if the GEM context is closed When inside the lock, remember to unlock even if you want to leave early. Reported-by: Dan Carpenter Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191106144155.25727-1-chris@chris-wilson.co.uk (cherry picked from commit feba2b8146633390f8df44946eceb4274f7377ed) Signed-off-by: Joonas Lahtinen commit d29926fa5f580565a7240c4d6a428795c773fb76 Author: Chris Wilson Date: Wed Nov 6 13:31:29 2019 +0000 drm/i915/gt: Only drop heartbeat.systole if the sole owner Mika spotted that only using cancel_delayed_work() could mean that we attempted to clear the heartbeat.systole while the worker was still running. Rectify the situation by only touching the systole from outside the worker if we suceeded in cancelling the worker before it could run. The worker is expected to clean up by itself upon idling. Reported-by: Mika Kuoppala Fixes: 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191106133129.17732-1-chris@chris-wilson.co.uk (cherry picked from commit 841e86728615baa77b0ea9d8b357e66052c75fe5) Signed-off-by: Joonas Lahtinen commit 2bc1e1fdd0fc54ef6aee14c7710af21ce816b398 Author: Takashi Iwai Date: Tue Nov 5 08:14:59 2019 +0100 ALSA: memalloc: Drop snd_dma_pci_data() macro Now that all users have been converted, we can drop snd_dma_pci_data() macro definition. Link: https://lore.kernel.org/r/20191108164637.1110-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3b316a8f6077a0003331aae43f02279ea62d54f9 Author: Takashi Iwai Date: Tue Nov 5 08:01:47 2019 +0100 media: tw686x: audio: Avoid non-standard macro usage Pass the device pointer from the PCI pointer directly, instead of a non-standard macro. The macro didn't give any better readability. Acked-by: Hans Verkuil Signed-off-by: Takashi Iwai commit ef99d99b2fd921148dc15e706f2fb071ba3fee6c Author: Takashi Iwai Date: Mon Nov 4 14:33:58 2019 +0100 media: solo6x10: Remove superfluous snd_dma_continuous_data() The recent change (commit 08422d2c559d: "ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINOUS type") made the PCM preallocation helper accepting NULL as the device pointer for the default usage. Drop the snd_dma_continuous_data() usage that became superfluous from the callers. Acked-by: Hans Verkuil Signed-off-by: Takashi Iwai commit feb4a51323babe13315c3b783ea7f1cf25368918 Author: Frederic Weisbecker Date: Fri Nov 8 17:08:57 2019 +0100 irq_work: Slightly simplify IRQ_WORK_PENDING clearing Instead of fetching the value of flags and perform an xchg() to clear a bit, just use atomic_fetch_andnot() that is more suitable to do that job in one operation while keeping the full ordering. Signed-off-by: Frederic Weisbecker Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191108160858.31665-4-frederic@kernel.org Signed-off-by: Ingo Molnar commit 25269871db1ad0cbbaafd5098cbdb40c8db4ccb9 Author: Frederic Weisbecker Date: Fri Nov 8 17:08:56 2019 +0100 irq_work: Fix irq_work_claim() memory ordering When irq_work_claim() finds IRQ_WORK_PENDING flag already set, we just return and don't raise a new IPI. We expect the destination to see and handle our latest updades thanks to the pairing atomic_xchg() in irq_work_run_list(). But cmpxchg() doesn't guarantee a full memory barrier upon failure. So it's possible that the destination misses our latest updates. So use atomic_fetch_or() instead that is unconditionally fully ordered and also performs exactly what we want here and simplify the code. Signed-off-by: Frederic Weisbecker Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191108160858.31665-3-frederic@kernel.org Signed-off-by: Ingo Molnar commit 153bedbac2ebd475e1c7c2d2fa0c042f5525927d Author: Frederic Weisbecker Date: Fri Nov 8 17:08:55 2019 +0100 irq_work: Convert flags to atomic_t We need to convert flags to atomic_t in order to later fix an ordering issue on atomic_cmpxchg() failure. This will allow us to use atomic_fetch_or(). Also clarify the nature of those flags. [ mingo: Converted two more usage site the original patch missed. ] Signed-off-by: Frederic Weisbecker Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191108160858.31665-2-frederic@kernel.org Signed-off-by: Ingo Molnar commit a0e813f26ebcb25c0b5e504498fbd796cca1a4ba Author: Peter Zijlstra Date: Fri Nov 8 14:16:00 2019 +0100 sched/core: Further clarify sched_class::set_next_task() It turns out there really is something special to the first set_next_task() invocation. In specific the 'change' pattern really should not cause balance callbacks. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: juri.lelli@redhat.com Cc: ktkhai@virtuozzo.com Cc: mgorman@suse.de Cc: qais.yousef@arm.com Cc: qperret@google.com Cc: rostedt@goodmis.org Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Fixes: f95d4eaee6d0 ("sched/{rt,deadline}: Fix set_next_task vs pick_next_task") Link: https://lkml.kernel.org/r/20191108131909.775434698@infradead.org Signed-off-by: Ingo Molnar commit 2eeb01a28c9233333bf229a5b4b0559f4bd22b52 Author: Peter Zijlstra Date: Fri Nov 8 14:15:59 2019 +0100 sched/fair: Use mul_u32_u32() While reading the code I encountered another site where we should be using mul_u32_u32() because GCC just won't take a hint. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: juri.lelli@redhat.com Cc: ktkhai@virtuozzo.com Cc: mgorman@suse.de Cc: qais.yousef@arm.com Cc: qperret@google.com Cc: rostedt@goodmis.org Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: https://lkml.kernel.org/r/20191108131909.717931380@infradead.org Signed-off-by: Ingo Molnar commit 98c2f700edb413e4baa4a0368c5861d96211a775 Author: Peter Zijlstra Date: Fri Nov 8 14:15:58 2019 +0100 sched/core: Simplify sched_class::pick_next_task() Now that the indirect class call never uses the last two arguments of pick_next_task(), remove them. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: juri.lelli@redhat.com Cc: ktkhai@virtuozzo.com Cc: mgorman@suse.de Cc: qais.yousef@arm.com Cc: qperret@google.com Cc: rostedt@goodmis.org Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: https://lkml.kernel.org/r/20191108131909.660595546@infradead.org Signed-off-by: Ingo Molnar commit 5d7d605642b28a5911198a405a6072f091bfbee6 Author: Peter Zijlstra Date: Fri Nov 8 14:15:57 2019 +0100 sched/core: Optimize pick_next_task() Ever since we moved the sched_class definitions into their own files, the constant expression {fair,idle}_sched_class.pick_next_task() is not in fact a compile time constant anymore and results in an indirect call (barring LTO). Fix that by exposing pick_next_task_{fair,idle}() directly, this gets rid of the indirect call (and RETPOLINE) on the fast path. Also remove the unlikely() from the idle case, it is in fact /the/ way we select idle -- and that is a very common thing to do. Performance for will-it-scale/sched_yield improves by 2% (as reported by 0-day). Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: juri.lelli@redhat.com Cc: ktkhai@virtuozzo.com Cc: mgorman@suse.de Cc: qais.yousef@arm.com Cc: qperret@google.com Cc: rostedt@goodmis.org Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: https://lkml.kernel.org/r/20191108131909.603037345@infradead.org Signed-off-by: Ingo Molnar commit f488e1057bb97b881ed317557dc5e62ff8747393 Author: Peter Zijlstra Date: Fri Nov 8 14:15:56 2019 +0100 sched/core: Make pick_next_task_idle() more consistent Only pick_next_task_fair() needs the @prev and @rf argument; these are required to implement the cpu-cgroup optimization. None of the other pick_next_task() methods need this. Make pick_next_task_idle() more consistent. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: juri.lelli@redhat.com Cc: ktkhai@virtuozzo.com Cc: mgorman@suse.de Cc: qais.yousef@arm.com Cc: qperret@google.com Cc: rostedt@goodmis.org Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: https://lkml.kernel.org/r/20191108131909.545730862@infradead.org Signed-off-by: Ingo Molnar commit 7277a34c6be0b2972bdd1fea88c7cef409bed5b4 Author: Peter Zijlstra Date: Fri Nov 8 14:15:55 2019 +0100 sched/fair: Better document newidle_balance() Whilst chasing the pick_next_task() race, there was some confusion about the newidle_balance() return values. Document them. [ mingo: Minor edits. ] Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: juri.lelli@redhat.com Cc: ktkhai@virtuozzo.com Cc: mgorman@suse.de Cc: qais.yousef@arm.com Cc: qperret@google.com Cc: rostedt@goodmis.org Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Link: https://lkml.kernel.org/r/20191108131909.488364308@infradead.org Signed-off-by: Ingo Molnar commit 6d5a763c303bc9d78b17361d30b692ba2facf9b4 Merge: e79b3ddad679 31f4f5b495a6 Author: Ingo Molnar Date: Mon Nov 11 08:34:59 2019 +0100 Merge tag 'v5.4-rc7' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 8f05c1ff8bfb8cbae0898e5dc6791927d1e5c503 Author: Zheng Yongjun Date: Sun Nov 10 17:44:53 2019 +0800 perf/x86/amd: Remove set but not used variable 'active' '-Wunused-but-set-variable' triggers this warning: arch/x86/events/amd/core.c: In function amd_pmu_handle_irq: arch/x86/events/amd/core.c:656:6: warning: variable active set but not used [-Wunused-but-set-variable] GCC is right, 'active' is not used anymore. This variable was introduced earlier this year and then removed in: df4d29732fdad perf/x86/amd: Change/fix NMI latency mitigation to use a timestamp [ mingo: Improved the changelog, fixed build warning caused by this fix, improved surrounding code. ] Reported-by: Hulk Robot Signed-off-by: Zheng Yongjun Cc: Cc: Cc: Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191110094453.113001-1-zhengyongjun3@huawei.com Signed-off-by: Ingo Molnar commit 1ca7feb59087a3d1a4ef79e09c42eca5c2e7fa38 Merge: d44f821b0e13 31f4f5b495a6 Author: Ingo Molnar Date: Mon Nov 11 07:59:06 2019 +0100 Merge tag 'v5.4-rc7' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 658488ed2108f5772572c5a17c3f31ed6e554edc Author: Tudor Ambarus Date: Thu Nov 7 08:42:09 2019 +0000 mtd: spi-nor: Rename Quad Enable methods Rename macronix_quad_enable() to a generic name: spi_nor_sr1_bit6_quad_enable(). Prepend "spi_nor_" to "sr2_bit7_quad_enable". All SPI NOR generic methods should be prepended by "spi_nor_". Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 7b678c69c0ca59ed4a1e65055b1e58918db38968 Author: Tudor Ambarus Date: Thu Nov 7 08:42:05 2019 +0000 mtd: spi-nor: Merge spansion Quad Enable methods Merge spansion_no_read_cr_quad_enable() spansion_read_cr_quad_enable() into spi_nor_sr2_bit1_quad_enable(). Reduce code duplication by introducing spi_nor_write_16bit_cr_and_check(). The Configuration Register contains bits that can be updated in future: FREEZE, CMP. Provide a generic method that allows updating all bits of the Configuration Register. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit bb2dc7f46ad897ba1c2d8ae773c77601ba240932 Author: Tudor Ambarus Date: Thu Nov 7 08:42:01 2019 +0000 mtd: spi-nor: Rename CR_QUAD_EN_SPAN to SR2_QUAD_EN_BIT1 JEDEC Basic Flash Parameter Table, 15th DWORD, bits 22:20, refers to this bit as "bit 1 of the status register 2". Rename the macro accordingly. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 4da11da15a7cc56432a92ee47748c95cf29dbe3d Author: Tudor Ambarus Date: Thu Nov 7 08:41:58 2019 +0000 mtd: spi-nor: Extend the SR Read Back test Test that all the bits from Status Register 1 and Status Register 2 were written correctly. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 3e0930f109e76922ea1742a9c8c1cc16f052ad45 Author: Tudor Ambarus Date: Thu Nov 7 08:41:55 2019 +0000 mtd: spi-nor: Rework the disabling of block write protection spi_nor_unlock() unlocks blocks of memory or the entire flash memory array, if requested. clear_sr_bp() unlocks the entire flash memory array at boot time. This calls for some unification, clear_sr_bp() is just an optimization for the case when the unlock request covers the entire flash size. Get rid of clear_sr_bp() and introduce spi_nor_unlock_all(), which is just a call to spi_nor_unlock() for the entire flash memory array. This fixes a bug that was present in spi_nor_spansion_clear_sr_bp(). When the QE bit was zero, we used the Write Status (01h) command with one data byte, which might cleared the Status Register 2. We now always use the Write Status (01h) command with two data bytes when SNOR_F_HAS_16BIT_SR is set, to avoid clearing the Status Register 2. The SNOR_F_NO_READ_CR case is treated as well. When the flash doesn't support the CR Read command, we make an assumption about the value of the QE bit. In spi_nor_init(), call spi_nor_quad_enable() first, then spi_nor_unlock_all(), so that at the spi_nor_unlock_all() time we can be sure the QE bit has value one, because of the previous call to spi_nor_quad_enable(). Get rid of the MFR handling and implement specific manufacturer default_init() fixup hooks. Note that this changes a bit the logic for the SNOR_MFR_ATMEL, SNOR_MFR_INTEL and SNOR_MFR_SST cases. Before this patch, the Atmel, Intel and SST chips did not set the locking ops, but unlocked the entire flash at boot time, while now they are setting the locking ops to stm_locking_ops. This should work, since the disable of the block protection at the boot time used the same Status Register bits to unlock the flash, as in the stm_locking_ops case. Suggested-by: Boris Brezillon Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 39d1e3340c73e8f7eb1d6a8cae561c255ca7b1b0 Author: Tudor Ambarus Date: Thu Nov 7 08:41:51 2019 +0000 mtd: spi-nor: Fix clearing of QE bit on lock()/unlock() Make sure that when doing a lock() or an unlock() operation we don't clear the QE bit from Status Register 2. JESD216 revB or later offers information about the *default* Status Register commands to use (see BFPT DWORDS[15], bits 22:20). In this standard, Status Register 1 refers to the first data byte transferred on a Read Status (05h) or Write Status (01h) command. Status register 2 refers to the byte read using instruction 35h. Status register 2 is the second byte transferred in a Write Status (01h) command. Industry naming and definitions of these Status Registers may differ. The definitions are described in JESD216B, BFPT DWORDS[15], bits 22:20. There are cases in which writing only one byte to the Status Register 1 has the side-effect of clearing Status Register 2 and implicitly the Quad Enable bit. This side-effect is hit just by the BFPT_DWORD15_QER_SR2_BIT1_BUGGY and BFPT_DWORD15_QER_SR2_BIT1 cases. Suggested-by: Boris Brezillon Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 5588aa81d2128ff51228514237713d8eafd944c8 Merge: 077f46db6365 87297878b5b7 Author: Olof Johansson Date: Sun Nov 10 21:29:02 2019 -0800 Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dts: Amlogic updates for v5.5 Hightlights - new board; ugoos am6, based on G12B SoC - g12: add thermal driver and cooling properties - sm1: enable audio on SEI610 board - IR: add several keymaps - sdio: add keep-power-in-suspend property for multiple boards - pcie: add support for G12A - multiple fixes, cleanups * tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (62 commits) arm64: dts: meson-gx: fix i2c compatible arm64: dts: meson-gx: cec node should be disabled by default arm64: dts: meson-g12b-odroid-n2: add missing amlogic, s922x compatible arm64: dts: meson-gxm: fix gpu irq order arm64: dts: meson-g12a: fix gpu irq order ARM64: dts: amlogic: adds crypto hardware node arm64: dts: meson-gxbb-vega-s95: set rc-vega-s9x ir keymap arm64: dts: meson-gxm-vega-s96: set rc-vega-s9x ir keymap arm64: dts: meson: g12b: add cooling properties arm64: dts: meson: g12a: add cooling properties arm64: dts: meson: g12: Add minimal thermal zone arm64: dts: meson: g12: add temperature sensor arm64: dts: meson: sei610: enable audio arm64: dts: meson: sm1: add audio devices dt-bindings: clock: meson: add sm1 resets to the axg-audio controller dt-bindings: clk: axg-audio: add sm1 bindings arm64: dts: meson-g12: add support for simplefb arm64: dts: meson: g12a: add audio devices resets arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI supply arm64: dts: meson: odroid-c2: Add missing regulator linked to VDDIO_AO3V3 regulator ... Link: https://lore.kernel.org/r/7hd0dzs0m1.fsf@baylibre.com Signed-off-by: Olof Johansson commit 077f46db63652fb16e60bcd0d623acc2ef282065 Merge: 4ed56fca6ea1 75aa567803b1 Author: Olof Johansson Date: Sun Nov 10 21:28:09 2019 -0800 Merge tag 'v5.5-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt One new soc the rk3308 with quad-Cortex-A35 cores. New boards are Beelink A1, roc-rk3308-cc, rk3308-evb A big number of improvements for the rk3399-roc-pc board (support for M.2 variant, reworked power-tree, buttons, leds) and further improvements of the px30-evb (usb2phy, otp controller, removal of default optee node - optee does add its own when loaded) And finally rk3328 audio support, sdmmc detection fix and enabled of the gpu on rk3399-puma. * tag 'v5.5-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (21 commits) arm64: dts: rockchip: fix sdmmc detection on boot on rk3328-roc-cc arm64: dts: rockchip: Split rk3399-roc-pc for with and without mezzanine board. arm64: dts: rockchip: Add Beelink A1 dt-bindings: ARM: rockchip: Add Beelink A1 arm64: dts: rockchip: Add RK3328 audio pipelines arm64: dts: rockchip: Add devicetree for board roc-rk3308-cc dt-bindings: Add doc for Firefly ROC-RK3308-CC board dt-bindings: clean up rockchip grf binding document arm64: dts: rockchip: Rework voltage supplies for regulators on rk3399-roc-pc arm64: dts: rockchip: Add vcc_sys enable pin on rk3399-roc-pc arm64: dts: rockchip: Add nodes for buttons on rk3399-roc-pc arm64: dts: rockchip: enable usb2phy on px30-evb arm64: dts: rockchip: add usb2phy for px30 arm64: dts: rockchip: remove px30 default optee node arm64: dts: rockchip: enable gpu on rk3399-puma arm64: dts: rockchip: add px30 otp controller arm64: dts: rockchip: Add LED nodes on rk3399-roc-pc arm64: dts: rockchip: Add basic dts for RK3308 EVB dt-bindings: Add doc for rk3308-evb arm64: dts: rockchip: Add core dts for RK3308 SOC ... Link: https://lore.kernel.org/r/12204771.K8DX0fml49@phil Signed-off-by: Olof Johansson commit 4ed56fca6ea1d23d79e46233afc431c2f05e1a70 Merge: 7c3ddc6b038f bbf8f6fef71a Author: Olof Johansson Date: Sun Nov 10 21:27:32 2019 -0800 Merge tag 'v5.5-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt HDMI-audio support for Veyron devices. * tag 'v5.5-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Add HDMI audio support to rk3288-veyron-mickey ARM: dts: rockchip: Add HDMI support to rk3288-veyron-analog-audio Link: https://lore.kernel.org/r/1926436.N9mSsAMzn9@phil Signed-off-by: Olof Johansson commit 13a6c8efb3b31cc633fb04772c3ea0957b053f65 Merge: e24eb5e6e957 fdfc6997bd08 Author: Olof Johansson Date: Sun Nov 10 21:26:56 2019 -0800 Merge tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/drivers soc: amlogic: updates for v5.5 Highlights - socinfo: more SoC IDs - firmware: misc secure-monitor cleanups * tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: soc: amlogic: meson-gx-socinfo: Fix S905D3 ID for VIM3L soc: amlogic: meson-gx-socinfo: Add S905X3 ID for VIM3L soc: amlogic: meson-gx-socinfo: Add A1 and A113L IDs firmware: meson_sm: use %*ph to print small buffer firmware: meson_sm: Rework driver as a proper platform driver nvmem: meson-efuse: bindings: Add secure-monitor phandle firmware: meson_sm: Mark chip struct as static const Link: https://lore.kernel.org/r/7hftivs11f.fsf@baylibre.com Signed-off-by: Olof Johansson commit 01b59c763fe2de845b65900485b141fdd7bbf93e Merge: a61ead03a6f2 31f4f5b495a6 Author: Greg Kroah-Hartman Date: Mon Nov 11 06:24:30 2019 +0100 Merge 5.4-rc7 into char-misc-next We need the char/misc driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit f0cb9b5dfd1a6014349354e63768500a860cad53 Merge: b79967a27f34 31f4f5b495a6 Author: Greg Kroah-Hartman Date: Mon Nov 11 06:23:37 2019 +0100 Merge 5.4-rc7 into staging-next We want the staging fixes in here, and it resolves some merge issues. Signed-off-by: Greg Kroah-Hartman commit 25cb20a212a1f989385dfe23230817e69c62bee5 Author: Stephen Boyd Date: Wed Oct 16 16:57:53 2019 +0200 PM / OPP: Support adjusting OPP voltages at runtime On some SoCs the Adaptive Voltage Scaling (AVS) technique is employed to optimize the operating voltage of a device. At a given frequency, the hardware monitors dynamic factors and either makes a suggestion for how much to adjust a voltage for the current frequency, or it automatically adjusts the voltage without software intervention. Add an API to the OPP library for the former case, so that AVS type devices can update the voltages for an OPP when the hardware determines the voltage should change. The assumption is that drivers like CPUfreq or devfreq will register for the OPP notifiers and adjust the voltage according to suggestions that AVS makes. This patch is derived from [1] submitted by Stephen. [1] https://lore.kernel.org/patchwork/patch/599279/ Signed-off-by: Stephen Boyd [Roger Lu: Changed to rcu less implementation] Signed-off-by: Roger Lu [s.nawrocki@samsung.com: added handling of OPP min/max voltage] Signed-off-by: Sylwester Nawrocki Signed-off-by: Viresh Kumar commit 0d2ec5b51dc6925f07bff9f1352970d5fc8f297f Merge: 472aeb386eda 57afa8b0cfa6 Author: Alexei Starovoitov Date: Sun Nov 10 19:30:46 2019 -0800 Merge branch 'share-umem' Magnus Karlsson says: ==================== This patch set extends libbpf and the xdpsock sample program to demonstrate the shared umem mode (XDP_SHARED_UMEM) as well as Rx-only and Tx-only sockets. This in order for users to have an example to use as a blue print and also so that these modes will be exercised more frequently. Note that the user needs to supply an XDP program with the XDP_SHARED_UMEM mode that distributes the packets over the sockets according to some policy. There is an example supplied with the xdpsock program, but there is no default one in libbpf similarly to when XDP_SHARED_UMEM is not used. The reason for this is that I felt that supplying one that would work for all users in this mode is futile. There are just tons of ways to distribute packets, so whatever I come up with and build into libbpf would be wrong in most cases. This patch has been applied against commit 30ee348c1267 ("Merge branch 'bpf-libbpf-fixes'") Structure of the patch set: Patch 1: Adds shared umem support to libbpf Patch 2: Shared umem support and example XPD program added to xdpsock sample Patch 3: Adds Rx-only and Tx-only support to libbpf Patch 4: Uses Rx-only sockets for rxdrop and Tx-only sockets for txpush in the xdpsock sample Patch 5: Add documentation entries for these two features ==================== Signed-off-by: Alexei Starovoitov commit 57afa8b0cfa61f35d4175a66e0f0e38ce12a1db5 Author: Magnus Karlsson Date: Thu Nov 7 18:47:40 2019 +0100 xsk: Extend documentation for Rx|Tx-only sockets and shared umems Add more documentation about the new Rx-only and Tx-only sockets in libbpf and also how libbpf can now support shared umems. Also found two pieces that could be improved in the text, that got fixed in this commit. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Tested-by: William Tu Acked-by: Jonathan Lemon Link: https://lore.kernel.org/bpf/1573148860-30254-6-git-send-email-magnus.karlsson@intel.com commit 661842c46de2151758083b2ead605920b4770c2b Author: Magnus Karlsson Date: Thu Nov 7 18:47:39 2019 +0100 samples/bpf: Use Rx-only and Tx-only sockets in xdpsock Use Rx-only sockets for the rxdrop sample and Tx-only sockets for the txpush sample in the xdpsock application. This so that we exercise and show case these socket types too. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Tested-by: William Tu Acked-by: Jonathan Lemon Link: https://lore.kernel.org/bpf/1573148860-30254-5-git-send-email-magnus.karlsson@intel.com commit a68977d269dac0c7aa4a6f650b5e9191dd764861 Author: Magnus Karlsson Date: Thu Nov 7 18:47:38 2019 +0100 libbpf: Allow for creating Rx or Tx only AF_XDP sockets The libbpf AF_XDP code is extended to allow for the creation of Rx only or Tx only sockets. Previously it returned an error if the socket was not initialized for both Rx and Tx. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Tested-by: William Tu Acked-by: Jonathan Lemon Link: https://lore.kernel.org/bpf/1573148860-30254-4-git-send-email-magnus.karlsson@intel.com commit 2e5d72c15f0dc713c203464c5c76eb4ec285f598 Author: Magnus Karlsson Date: Thu Nov 7 18:47:37 2019 +0100 samples/bpf: Add XDP_SHARED_UMEM support to xdpsock Add support for the XDP_SHARED_UMEM mode to the xdpsock sample application. As libbpf does not have a built in XDP program for this mode, we use an explicitly loaded XDP program. This also serves as an example on how to write your own XDP program that can route to an AF_XDP socket. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Tested-by: William Tu Acked-by: Jonathan Lemon Link: https://lore.kernel.org/bpf/1573148860-30254-3-git-send-email-magnus.karlsson@intel.com commit cbf07409d0c2afad7bb54be039490bffad8bc737 Author: Magnus Karlsson Date: Thu Nov 7 18:47:36 2019 +0100 libbpf: Support XDP_SHARED_UMEM with external XDP program Add support in libbpf to create multiple sockets that share a single umem. Note that an external XDP program need to be supplied that routes the incoming traffic to the desired sockets. So you need to supply the libbpf_flag XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD and load your own XDP program. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Tested-by: William Tu Acked-by: Jonathan Lemon Link: https://lore.kernel.org/bpf/1573148860-30254-2-git-send-email-magnus.karlsson@intel.com commit 8e3cca12706231daf8daf90dbde59f1665135e48 Author: Jens Axboe Date: Sat Nov 9 19:52:33 2019 -0700 io_uring: convert accept4() -ERESTARTSYS into -EINTR If we cancel a pending accept operating with a signal, we get -ERESTARTSYS returned. Turn that into -EINTR for userspace, we should not be return -ERESTARTSYS. Fixes: 17f2fe35d080 ("io_uring: add support for IORING_OP_ACCEPT") Reported-by: Hrvoje Zeba Signed-off-by: Jens Axboe commit 46568e9be70ff8211d986685f08d919376c32998 Author: Jens Axboe Date: Sun Nov 10 08:40:53 2019 -0700 io_uring: fix error clear of ->file_table in io_sqe_files_register() syzbot reports that when using failslab and friends, we can get a double free in io_sqe_files_unregister(): BUG: KASAN: double-free or invalid-free in io_sqe_files_unregister+0x20b/0x300 fs/io_uring.c:3185 CPU: 1 PID: 8819 Comm: syz-executor452 Not tainted 5.4.0-rc6-next-20191108 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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 kasan_report_invalid_free+0x65/0xa0 mm/kasan/report.c:468 __kasan_slab_free+0x13a/0x150 mm/kasan/common.c:450 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 io_sqe_files_unregister+0x20b/0x300 fs/io_uring.c:3185 io_ring_ctx_free fs/io_uring.c:3998 [inline] io_ring_ctx_wait_and_kill+0x348/0x700 fs/io_uring.c:4060 io_uring_release+0x42/0x50 fs/io_uring.c:4068 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x904/0x2e60 kernel/exit.c:817 do_group_exit+0x135/0x360 kernel/exit.c:921 __do_sys_exit_group kernel/exit.c:932 [inline] __se_sys_exit_group kernel/exit.c:930 [inline] __x64_sys_exit_group+0x44/0x50 kernel/exit.c:930 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x43f2c8 Code: 31 b8 c5 f7 ff ff 48 8b 5c 24 28 48 8b 6c 24 30 4c 8b 64 24 38 4c 8b 6c 24 40 4c 8b 74 24 48 4c 8b 7c 24 50 48 83 c4 58 c3 66 <0f> 1f 84 00 00 00 00 00 48 8d 35 59 ca 00 00 0f b6 d2 48 89 fb 48 RSP: 002b:00007ffd5b976008 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043f2c8 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00000000004bf0a8 R08: 00000000000000e7 R09: ffffffffffffffd0 R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006d1180 R14: 0000000000000000 R15: 0000000000000000 This happens if we fail allocating the file tables. For that case we do free the file table correctly, but we forget to set it to NULL. This means that ring teardown will see it as being non-NULL, and attempt to free it again. Fix this by clearing the file_table pointer if we free the table. Reported-by: syzbot+3254bc44113ae1e331ee@syzkaller.appspotmail.com Fixes: 65e19f54d29c ("io_uring: support for larger fixed file sets") Reviewed-by: Bob Liu Signed-off-by: Jens Axboe commit c69f8dbe2426cbf6150407b7e86ce85bb463c1dc Author: Jackie Liu Date: Sat Nov 9 11:00:08 2019 +0800 io_uring: separate the io_free_req and io_free_req_find_next interface Similar to the distinction between io_put_req and io_put_req_find_next, io_free_req has been modified similarly, with no functional changes. Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe commit ec9c02ad4c3808d6d9ed28ad1d0485d6e2a33ac5 Author: Jackie Liu Date: Fri Nov 8 23:50:36 2019 +0800 io_uring: keep io_put_req only responsible for release and put req We already have io_put_req_find_next to find the next req of the link. we should not use the io_put_req function to find them. They should be functions of the same level. Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe commit a197f664a0db8a6219d9ce949f5f29b89f60fb2b Author: Jackie Liu Date: Fri Nov 8 08:09:12 2019 -0700 io_uring: remove passed in 'ctx' function parameter ctx if possible Many times, the core of the function is req, and req has already set req->ctx at initialization time, so there is no need to pass in the ctx from the caller. Cleanup, no functional change. Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe commit 206aefde4f886fdeb3b6339aacab3a85fb74cb7e Author: Jens Axboe Date: Thu Nov 7 18:27:42 2019 -0700 io_uring: reduce/pack size of io_ring_ctx With the recent flurry of additions and changes to io_uring, the layout of io_ring_ctx has become a bit stale. We're right now at 704 bytes in size on my x86-64 build, or 11 cachelines. This patch does two things: - We have to completion structs embedded, that we only use for quiesce of the ctx (or shutdown) and for sqthread init cases. That 2x32 bytes right there, let's dynamically allocate them. - Reorder the struct a bit with an eye on cachelines, use cases, and holes. With this patch, we're down to 512 bytes, or 8 cachelines. Reviewed-by: Jackie Liu Signed-off-by: Jens Axboe commit 472aeb386eda3b73bbd38a2ec8c928708f77d7ee Merge: 451d1dc886b5 1a734efe0694 Author: Alexei Starovoitov Date: Sun Nov 10 19:26:31 2019 -0800 Merge branch 'map-pinning' Toke Høiland-Jørgensen says: ==================== This series fixes a few bugs in libbpf that I discovered while playing around with the new auto-pinning code, and writing the first utility in xdp-tools[0]: - If object loading fails, libbpf does not clean up the pinnings created by the auto-pinning mechanism. - EPERM is not propagated to the caller on program load - Netlink functions write error messages directly to stderr In addition, libbpf currently only has a somewhat limited getter function for XDP link info, which makes it impossible to discover whether an attached program is in SKB mode or not. So the last patch in the series adds a new getter for XDP link info which returns all the information returned via netlink (and which can be extended later). Finally, add a getter for BPF program size, which can be used by the caller to estimate the amount of locked memory needed to load a program. A selftest is added for the pinning change, while the other features were tested in the xdp-filter tool from the xdp-tools repo. The 'new-libbpf-features' branch contains the commits that make use of the new XDP getter and the corrected EPERM error code. [0] https://github.com/xdp-project/xdp-tools Changelog: v4: - Don't do any size checks on struct xdp_info, just copy (and/or zero) whatever size the caller supplied. v3: - Pass through all kernel error codes on program load (instead of just EPERM). - No new bpf_object__unload() variant, just do the loop at the caller - Don't reject struct xdp_info sizes that are bigger than what we expect. - Add a comment noting that bpf_program__size() returns the size in bytes v2: - Keep function names in libbpf.map sorted properly ==================== Signed-off-by: Alexei Starovoitov commit 1a734efe06948c17122808f74f0c8cc550c10cf5 Author: Toke Høiland-Jørgensen Date: Sat Nov 9 21:37:32 2019 +0100 libbpf: Add getter for program size This adds a new getter for the BPF program size (in bytes). This is useful for a caller that is trying to predict how much memory will be locked by loading a BPF object into the kernel. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: David S. Miller Acked-by: Song Liu Link: https://lore.kernel.org/bpf/157333185272.88376.10996937115395724683.stgit@toke.dk commit 473f4e133a12dd083bae044ba1782be4767177c1 Author: Toke Høiland-Jørgensen Date: Sat Nov 9 21:37:31 2019 +0100 libbpf: Add bpf_get_link_xdp_info() function to get more XDP information Currently, libbpf only provides a function to get a single ID for the XDP program attached to the interface. However, it can be useful to get the full set of program IDs attached, along with the attachment mode, in one go. Add a new getter function to support this, using an extendible structure to carry the information. Express the old bpf_get_link_id() function in terms of the new function. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: David S. Miller Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157333185164.88376.7520653040667637246.stgit@toke.dk commit b6e99b010ecf829fd8453a7a77e389501bb81990 Author: Toke Høiland-Jørgensen Date: Sat Nov 9 21:37:30 2019 +0100 libbpf: Use pr_warn() when printing netlink errors The netlink functions were using fprintf(stderr, ) directly to print out error messages, instead of going through the usual logging macros. This makes it impossible for the calling application to silence or redirect those error messages. Fix this by switching to pr_warn() in nlattr.c and netlink.c. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: David S. Miller Acked-by: Song Liu Link: https://lore.kernel.org/bpf/157333185055.88376.15999360127117901443.stgit@toke.dk commit 4f33ddb4e3e28ade924fbf05ec8bcd7d5c022fee Author: Toke Høiland-Jørgensen Date: Sat Nov 9 21:37:29 2019 +0100 libbpf: Propagate EPERM to caller on program load When loading an eBPF program, libbpf overrides the return code for EPERM errors instead of returning it to the caller. This makes it hard to figure out what went wrong on load. In particular, EPERM is returned when the system rlimit is too low to lock the memory required for the BPF program. Previously, this was somewhat obscured because the rlimit error would be hit on map creation (which does return it correctly). However, since maps can now be reused, object load can proceed all the way to loading programs without hitting the error; propagating it even in this case makes it possible for the caller to react appropriately (and, e.g., attempt to raise the rlimit before retrying). Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: David S. Miller Acked-by: Song Liu Link: https://lore.kernel.org/bpf/157333184946.88376.11768171652794234561.stgit@toke.dk commit 9c4e395a1e8c1dc14189b88f24d111f80353b9a4 Author: Toke Høiland-Jørgensen Date: Sat Nov 9 21:37:28 2019 +0100 selftests/bpf: Add tests for automatic map unpinning on load failure This add tests for the different variations of automatic map unpinning on load failure. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: David S. Miller Acked-by: Song Liu Link: https://lore.kernel.org/bpf/157333184838.88376.8243704248624814775.stgit@toke.dk commit ec6d5f47bfe36f46aa0de707e5beb2f58d96b76d Author: Toke Høiland-Jørgensen Date: Sat Nov 9 21:37:27 2019 +0100 libbpf: Unpin auto-pinned maps if loading fails Since the automatic map-pinning happens during load, it will leave pinned maps around if the load fails at a later stage. Fix this by unpinning any pinned maps on cleanup. To avoid unpinning pinned maps that were reused rather than newly pinned, add a new boolean property on struct bpf_map to keep track of whether that map was reused or not; and only unpin those maps that were not reused. Fixes: 57a00f41644f ("libbpf: Add auto-pinning of maps when loading BPF objects") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: David S. Miller Acked-by: Song Liu Link: https://lore.kernel.org/bpf/157333184731.88376.9992935027056165873.stgit@toke.dk commit 3ad3cbe305b5a23d829d3723b60be59c36713992 Author: Thomas Gleixner Date: Tue Oct 15 21:17:57 2019 +0200 m68k/coldfire: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Cc: Greg Ungerer Cc: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Greg Ungerer commit 23220fe260c4b307da1c1fa82a944c50bf0742e4 Author: Christoph Hellwig Date: Fri Nov 8 15:06:03 2019 -0800 xfs: always pass a valid hdr to xfs_dir3_leaf_check_int Move the code for extracting the incore header to the only caller that didn't already do that. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ae42976de7f1022e6d83f5560debc072929921a9 Author: Christoph Hellwig Date: Fri Nov 8 15:06:02 2019 -0800 xfs: merge xfs_dir2_data_freescan and xfs_dir2_data_freescan_int There is no real need for xfs_dir2_data_freescan wrapper, so rename xfs_dir2_data_freescan_int to xfs_dir2_data_freescan and let the callers dereference the mount pointer from the inode. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 957ee13e204a5ffe814139aa89e62eece4b969fd Author: Christoph Hellwig Date: Fri Nov 8 15:06:02 2019 -0800 xfs: remove the now unused dir ops infrastructure Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 59b8b465058ec203493c0436f243263051e08f5a Author: Christoph Hellwig Date: Fri Nov 8 15:05:48 2019 -0800 xfs: devirtualize ->data_get_ftype and ->data_put_ftype Replace the ->data_get_ftype and ->data_put_ftype dir ops methods with directly called xfs_dir2_data_get_ftype and xfs_dir2_data_put_ftype helpers that takes care of the differences between the directory format with and without the file type field. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1848b607a9ad084db0180118304b9af2be68384e Author: Christoph Hellwig Date: Fri Nov 8 15:05:39 2019 -0800 xfs: devirtualize ->data_bestfree_p Replace the ->data_bestfree_p dir ops method with a directly called xfs_dir2_data_bestfree_p helper that takes care of the differences between the v4 and v5 on-disk format. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 711c7dbf5fdafdbb2fb906b38cefb113bfdd4a79 Author: Christoph Hellwig Date: Fri Nov 8 15:05:38 2019 -0800 xfs: cleanup xfs_dir2_data_entsize Remove the XFS_DIR2_DATA_ENTSIZE and XFS_DIR3_DATA_ENTSIZE and open code them in their only caller, which now becomes so simple that we can turn it into an inline function. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d73e1cee8add0d18d5401b81db2351b9e8af899a Author: Christoph Hellwig Date: Fri Nov 8 15:05:38 2019 -0800 xfs: move the dir2 data block fixed offsets to struct xfs_da_geometry Move the data block fixed offsets towards our structure for dir/attr geometry parameters. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7e8ae7bd1c5d806316e6b6403ac2dd0be7a1f82b Author: Christoph Hellwig Date: Fri Nov 8 15:05:37 2019 -0800 xfs: devirtualize ->data_entry_tag_p Replace the ->data_entry_tag_p dir ops method with a directly called xfs_dir2_data_entry_tag_p helper that takes care of the differences between the directory format with and without the file type field. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit fdbb8c5b805c19bc2764aa1b91952e75e4c1c086 Author: Christoph Hellwig Date: Fri Nov 8 15:05:37 2019 -0800 xfs: devirtualize ->data_entsize Replace the ->data_entsize dir ops method with a directly called xfs_dir2_data_entsize helper that takes care of the differences between the directory format with and without the file type field. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5c072127d31d3a605a3048dc5d3fdfc0cdd47212 Author: Christoph Hellwig Date: Fri Nov 8 15:05:36 2019 -0800 xfs: replace xfs_dir3_data_endp with xfs_dir3_data_end_offset All the callers really want an offset into the buffer, so adopt the helper to return that instead. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9eedae10899af882f3d34dc49c89d3220cd145f6 Author: Christoph Hellwig Date: Fri Nov 8 15:05:35 2019 -0800 xfs: remove the now unused ->data_entry_p method Now that all users use the data_entry_offset field this method is unused and can be removed. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 48a71399e7477043ee25573b3df2505787fcf0c4 Author: Christoph Hellwig Date: Fri Nov 8 15:05:35 2019 -0800 xfs: cleanup __xfs_dir3_data_check Use an offset as the main means for iteration, and only do pointer arithmetics to find the data/unused entries. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 62479f573459827edacb296dac4ad7ca714ab71c Author: Christoph Hellwig Date: Fri Nov 8 15:05:34 2019 -0800 xfs: cleanup xfs_dir2_data_freescan_int Use an offset as the main means for iteration, and only do pointer arithmetics to find the data/unused entries. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8073af5153ce25fd936e5c190d6ccf30b9cae89d Author: Christoph Hellwig Date: Fri Nov 8 15:05:34 2019 -0800 xfs: cleanup xfs_dir2_block_to_sf Use an offset as the main means for iteration, and only do pointer arithmetics to find the data/unused entries. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4a1a8b2f5f7840f6808782c5f7a515a9c8f58b11 Author: Christoph Hellwig Date: Fri Nov 8 15:05:33 2019 -0800 xfs: cleanup xchk_directory_data_bestfree Use an offset as the main means for iteration, and only do pointer arithmetics to find the data/unused entries. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4c037dd5fd32240066f5a222e432cd609ce620fd Author: Christoph Hellwig Date: Fri Nov 8 15:05:33 2019 -0800 xfs: cleanup xchk_dir_rec Use an offset as the main means for iteration, and only do pointer arithmetics to find the data/unused entries. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2f4369a862b637b20ac083a2e674a2d5d1489bda Author: Christoph Hellwig Date: Fri Nov 8 15:05:32 2019 -0800 xfs: cleanup xfs_dir2_leaf_getdents Use an offset as the main means for iteration, and only do pointer arithmetics to find the data/unused entries. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 263dde869bd09b1a709fd92118c7fff832773689 Author: Christoph Hellwig Date: Fri Nov 8 15:05:32 2019 -0800 xfs: cleanup xfs_dir2_block_getdents Use an offset as the main means for iteration, and only do pointer arithmetics to find the data/unused entries. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ee641d5af5e638d53d9bcde459836b1cb90f12e2 Author: Christoph Hellwig Date: Fri Nov 8 15:05:31 2019 -0800 xfs: remove the ->data_unused_p method Replace the two users of the ->data_unused_p dir ops method with a direct calculation using ->data_entry_offset, and clean them up a bit. xfs_dir2_sf_to_block already had an offset variable containing the value of ->data_entry_offset, which we are now reusing to make it clear that the initial freespace entry is at the same place that we later fill in the 1 entry, and in xfs_dir3_data_init the function is cleaned up a bit to keep the initialization of fields of a given structure close to each other, and to avoid a local variable. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit da3ca0df8bd146bf1c83db1b9763189976175e87 Author: Christoph Hellwig Date: Fri Nov 8 15:05:31 2019 -0800 xfs: remove the ->data_dot_entry_p and ->data_dotdot_entry_p methods The only user of the ->data_dot_entry_p and ->data_dotdot_entry_p methods is the xfs_dir2_sf_to_block function that builds block format directorys from a short form directory. It already uses pointer arithmetics with a offset variable to do so for the real entries in the directory, so switch the generation of the . and .. entries to the same scheme, and clean up some of the later pointer arithmetics to use bp->b_addr directly as well and avoid some casts. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2eb68a5d3619b80dec745f71df8af5f80cda16f8 Author: Christoph Hellwig Date: Fri Nov 8 15:05:30 2019 -0800 xfs: remove the data_dotdot_offset field in struct xfs_dir_ops The data_dotdot_offset value is always equal to data_entry_offset plus the fixed size of the "." entry. Right now calculating that fixed size requires an indirect call, but by the end of this series it will be an inline function that can be constant folded. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1682310474b2f223951ee46f21e34eb462cf71c2 Author: Christoph Hellwig Date: Fri Nov 8 15:05:30 2019 -0800 xfs: remove the data_dot_offset field in struct xfs_dir_ops The data_dot_offset value is always equal to data_entry_offset given that "." is always the first entry in the directory. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c81484e2b97f27683b5bdc3aee266d4685a48f8b Author: Christoph Hellwig Date: Fri Nov 8 15:05:29 2019 -0800 xfs: remove the unused ->data_first_entry_p method Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4501ed2a3a863ae5d43629b98f6a4d7f6147c4df Author: Christoph Hellwig Date: Fri Nov 8 15:03:30 2019 -0800 xfs: devirtualize ->sf_get_ftype and ->sf_put_ftype Replace the ->sf_get_ftype and ->sf_put_ftype dir ops methods with directly called xfs_dir2_sf_get_ftype and xfs_dir2_sf_put_ftype helpers that takes care of the differences between the directory format with and without the file type field. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 93b1e96a42006813e58e5052718f7b24a9312258 Author: Christoph Hellwig Date: Fri Nov 8 15:02:59 2019 -0800 xfs: devirtualize ->sf_get_ino and ->sf_put_ino Replace the ->sf_get_ino and ->sf_put_ino dir ops methods with directly called xfs_dir2_sf_get_ino and xfs_dir2_sf_put_ino helpers that take care of the difference between the directory format with and without the file type field. Also move xfs_dir2_sf_get_parent_ino and xfs_dir2_sf_put_parent_ino to xfs_dir2_sf.c with the rest of the low-level short form entry handling and use XFS_MAXINUMBER istead of opencoded constants. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 50f6bb6b7aea8177110e55355c455f18912a7a73 Author: Christoph Hellwig Date: Fri Nov 8 15:02:38 2019 -0800 xfs: devirtualize ->sf_entsize and ->sf_nextentry Just check for file-type enabled directories directly. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 84915e1bdddf9de3edf79a2813982b886e76658f Author: Christoph Hellwig Date: Fri Nov 8 15:02:31 2019 -0800 xfs: devirtualize ->sf_get_parent_ino and ->sf_put_parent_ino The parent inode handling is the same for all directory format variants, just use direct calls instead of going through a pointless indirect call. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3d92c93b7065be28eda33f92681d2f1121fbf8bf Author: Christoph Hellwig Date: Fri Nov 8 15:01:39 2019 -0800 xfs: devirtualize ->db_to_fdb and ->db_to_fdindex Now that the max bests value is in struct xfs_da_geometry both instances of ->db_to_fdb and ->db_to_fdindex are identical. Replace them with local xfs_dir2_db_to_fdb and xfs_dir2_db_to_fdindex functions in xfs_dir2_node.c. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5893e4feb0eac11aab7b93ff9fe7e6e58bcec5ec Author: Christoph Hellwig Date: Fri Nov 8 15:01:30 2019 -0800 xfs: move the max dir2 free bests count to struct xfs_da_geometry Move the max free bests count towards our structure for dir/attr geometry parameters. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ed1d612fbe6ba95a4d16b56bbfb1f90d48a42149 Author: Christoph Hellwig Date: Fri Nov 8 15:01:29 2019 -0800 xfs: move the dir2 free header size to struct xfs_da_geometry Move the free header size towards our structure for dir/attr geometry parameters. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a84f3d5cb04f7dff1bf6904f0a05bc8df16137fb Author: Christoph Hellwig Date: Fri Nov 8 14:58:05 2019 -0800 xfs: add a bests pointer to struct xfs_dir3_icfree_hdr All but two callers of the ->free_bests_p dir operation already have a struct xfs_dir3_icfree_hdr from a previous call to xfs_dir2_free_hdr_from_disk at hand. Add a pointer to the bests to struct xfs_dir3_icfree_hdr to clean up this pattern. To optimize this pattern, pass the struct xfs_dir3_icfree_hdr to xfs_dir2_free_log_bests instead of recalculating the pointer there. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 195b0a44ab73f0275683e7a0b1985751ea2ef6ae Author: Christoph Hellwig Date: Fri Nov 8 14:57:53 2019 -0800 xfs: make the xfs_dir3_icfree_hdr available to xfs_dir2_node_addname_int Return the xfs_dir3_icfree_hdr used by the helpers called from xfs_dir2_node_addname_int to the main function to prepare for the next round of changes where we'll use the ichdr in xfs_dir3_icfree_hdr to avoid extra operations to find the bests pointers. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 200dada70008a1204ddd3d95250d23d6477e20e6 Author: Christoph Hellwig Date: Fri Nov 8 14:57:52 2019 -0800 xfs: devirtualize ->free_hdr_to_disk Replace the ->free_hdr_to_disk dir ops method with a directly called xfs_dir2_free_hdr_to_disk helper that takes care of the differences between the v4 and v5 on-disk format. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5ba30919a6fcf0d3d52507082ea67fab32c8bb29 Author: Christoph Hellwig Date: Fri Nov 8 14:57:52 2019 -0800 xfs: devirtualize ->free_hdr_from_disk Replace the ->free_hdr_from_disk dir ops method with a directly called xfs_dir_free_hdr_from_disk helper that takes care of the differences between the v4 and v5 on-disk format. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 478c7835cb8ee28e73e732642866995f8555df7e Author: Christoph Hellwig Date: Fri Nov 8 14:57:51 2019 -0800 xfs: move the max dir2 leaf entries count to struct xfs_da_geometry Move the max leaf entries count towards our structure for dir/attr geometry parameters. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 545910bcc875377160b7b669e790865602a006f3 Author: Christoph Hellwig Date: Fri Nov 8 14:57:51 2019 -0800 xfs: move the dir2 leaf header size to struct xfs_da_geometry Move the leaf header size towards our structure for dir/attr geometry parameters. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 787b0893ad1e315ea014dc3f0e01a5bc9236c623 Author: Christoph Hellwig Date: Fri Nov 8 14:57:50 2019 -0800 xfs: add an entries pointer to struct xfs_dir3_icleaf_hdr All callers of the ->node_tree_p dir operation already have a struct xfs_dir3_icleaf_hdr from a previous call to xfs_da_leaf_hdr_from_disk at hand, or just need slight changes to the calling conventions to do so. Add a pointer to the entries to struct xfs_dir3_icleaf_hdr to clean up this pattern. To make this possible the xfs_dir3_leaf_log_ents function grow a new argument to pass the xfs_dir3_icleaf_hdr that call callers already have, and xfs_dir2_leaf_lookup_int returns the xfs_dir3_icleaf_hdr to the callers so that they can later use it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 163fbbb3568b6acf762449b8aa7713c764cf860a Author: Christoph Hellwig Date: Fri Nov 8 14:57:50 2019 -0800 xfs: devirtualize ->leaf_hdr_to_disk Replace the ->leaf_hdr_to_disk dir ops method with a directly called xfs_dir_leaf_hdr_to_disk helper that takes care of the differences between the v4 and v5 on-disk format. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 518425560a8b6ec7516505846c1b79623b467148 Author: Christoph Hellwig Date: Fri Nov 8 14:57:49 2019 -0800 xfs: devirtualize ->leaf_hdr_from_disk Replace the ->leaf_hdr_from_disk dir ops method with a directly called xfs_dir2_leaf_hdr_from_disk helper that takes care of the differences between the v4 and v5 on-disk format. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3b34441309f364bba59a6ee5d1aa32206456142f Author: Christoph Hellwig Date: Fri Nov 8 14:57:49 2019 -0800 xfs: move the node header size to struct xfs_da_geometry Move the node header size field to struct xfs_da_geometry, and remove the now unused non-directory dir ops infrastructure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 51908ca75feb5b2dd4f0d0146f9c92775520812c Author: Christoph Hellwig Date: Fri Nov 8 14:57:48 2019 -0800 xfs: add a btree entries pointer to struct xfs_da3_icnode_hdr All but two callers of the ->node_tree_p dir operation already have a xfs_da3_icnode_hdr from a previous call to xfs_da3_node_hdr_from_disk at hand. Add a pointer to the btree entries to struct xfs_da3_icnode_hdr to clean up this pattern. The two remaining callers now expand the whole header as well, but that isn't very expensive and not in a super hot path anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e1c8af1e02c7893f2d056aa44c4daf59fe0881ed Author: Christoph Hellwig Date: Fri Nov 8 14:57:48 2019 -0800 xfs: devirtualize ->node_hdr_to_disk Replace the ->node_hdr_to_disk dir ops method with a directly called xfs_da_node_hdr_to_disk helper that takes care of the v4 vs v5 difference. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f475dc4dc7cc98ad653135db174084a55076b1ba Author: Christoph Hellwig Date: Fri Nov 8 14:53:00 2019 -0800 xfs: devirtualize ->node_hdr_from_disk Replace the ->node_hdr_from_disk dir ops method with a directly called xfs_da_node_hdr_from_disk helper that takes care of the v4 vs v5 difference. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 649d9d98c60ec5e76e2a3c010f21667746765e9c Author: Christoph Hellwig Date: Fri Nov 8 14:52:07 2019 -0800 xfs: refactor btree node scrubbing Break up xchk_da_btree_entry and handle looking up leaf node entries in the attr / dir callbacks, so that only the generic node handling is left in the common core code. Note that the checks for the crc enabled blocks are removed, as the scrubbing code already remaps the magic numbers earlier. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b16be561876ed9b72dcb2bf8c48b30f573f63c1c Author: Christoph Hellwig Date: Fri Nov 8 14:52:07 2019 -0800 xfs: use unsigned int for all size values in struct xfs_da_geometry None of these can ever be negative, so use unsigned types. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a39f089a25e75c3d17b955d8eb8bc781f23364f3 Author: Christoph Hellwig Date: Fri Nov 8 14:52:06 2019 -0800 xfs: move incore structures out of xfs_da_format.h Move the abstract in-memory version of various btree block headers out of xfs_da_format.h as they aren't on-disk formats. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7f6bcf7c29410747fb05258870bd2254855af9c2 Author: Dan Carpenter Date: Fri Nov 8 08:06:36 2019 -0800 xfs: remove a stray tab in xfs_remount_rw() The extra tab makes the code slightly confusing. Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Reviewed-by: Ian Kent Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 895e196fb6f84402dcd0c1d3c3feb8a58049564e Author: Darrick J. Wong Date: Wed Nov 6 09:17:43 2019 -0800 xfs: convert EIO to EFSCORRUPTED when log contents are invalid Convert EIO to EFSCORRUPTED in the logging code when we can determine that the log contents are invalid. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 4d06bfb97ecb0df4f5b057a73db002e28c22c35c Author: Ritesh Harjani Date: Wed Nov 6 15:08:09 2019 +0530 ext4: Add error handling for io_end_vec struct allocation This patch adds the error handling in case of any memory allocation failure for io_end_vec. This was missing in original patch series which enables dioread_nolock for blocksize < pagesize. Fixes: c8cc88163f40 ("ext4: Add support for blocksize < pagesize in dioread_nolock") Reported-by: Dan Carpenter Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20191106093809.10673-1-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit 4ab88db095c3a2ebbd6108cafcf327326f989ff8 Author: Josef Friedl Date: Tue Sep 10 09:04:46 2019 +0200 arm: dts: mt6323: add keys, power-controller, rtc and codec support poweroff and power-related keys on bpi-r2 Suggested-by: Frank Wunderlich Signed-off-by: Josef Friedl Signed-off-by: Frank Wunderlich Signed-off-by: Matthias Brugger commit 5bc8e2875ffbc5d1679b0966d48308f3d93637d4 Author: Dehui Sun Date: Mon Oct 28 14:09:44 2019 +0800 arm64: dts: mt8183: add systimer0 device node Add systimer device node for MT8183. Signed-off-by: Dehui Sun Signed-off-by: Matthias Brugger commit d14e0fe39c6204f0c35d7d7da50b5727df8a3560 Author: Dehui Sun Date: Mon Oct 28 14:09:43 2019 +0800 dt-bindings: mediatek: update bindings for MT8183 systimer This commit adds mt8183 compatible node in mtk-timer binding document. Reviewed-by: Rob Herring Signed-off-by: Dehui Sun Acked-by: Daniel Lezcano Signed-off-by: Matthias Brugger commit b8b0145f7d0e24d98a58b7e54051dca0c1d77526 Author: Zhou Yanjie Date: Wed Oct 2 19:25:25 2019 +0800 irqchip: Ingenic: Add process for more than one irq at the same time. Add process for the situation that more than one irq is coming to a single chip at the same time. The original code will only respond to the lowest setted bit in JZ_REG_INTC_PENDING, and then exit the interrupt dispatch function. After exiting the interrupt dispatch function, since the second interrupt has not yet responded, the interrupt dispatch function is again entered to process the second interrupt. This creates additional unnecessary overhead, and the more interrupts that occur at the same time, the more overhead is added. The improved method in this patch is to check whether there are still unresponsive interrupts after processing the lowest setted bit interrupt. If there are any, the processing will be processed according to the bit in JZ_REG_INTC_PENDING, and the interrupt dispatch function will be exited until all processing is completed. Signed-off-by: Zhou Yanjie Signed-off-by: Marc Zyngier Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1570015525-27018-6-git-send-email-zhouyanjie@zoho.com commit 8bc7464b5140218cb714abae55ea4cfe26b30c96 Author: Paul Cercueil Date: Wed Oct 2 19:25:24 2019 +0800 irqchip: ingenic: Alloc generic chips from IRQ domain By creating the generic chips from the IRQ domain, we don't rely on the JZ4740_IRQ_BASE macro. It also makes the code a bit cleaner. Signed-off-by: Paul Cercueil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1570015525-27018-5-git-send-email-zhouyanjie@zoho.com commit 208caadce5d4d38f48af965206bbd4473d265080 Author: Paul Cercueil Date: Wed Oct 2 19:25:23 2019 +0800 irqchip: ingenic: Get virq number from IRQ domain Get the virq number from the IRQ domain instead of calculating it from the hardcoded irq base. Signed-off-by: Paul Cercueil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1570015525-27018-4-git-send-email-zhouyanjie@zoho.com commit 52ecc87642f273a599c9913b29fd179c13de457b Author: Paul Cercueil Date: Wed Oct 2 19:25:22 2019 +0800 irqchip: ingenic: Error out if IRQ domain creation failed If we cannot create the IRQ domain, the driver should fail to probe instead of succeeding with just a warning message. Signed-off-by: Paul Cercueil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1570015525-27018-3-git-send-email-zhouyanjie@zoho.com commit 20b44b4de61f2887694981e8cae74fe1bf58f950 Author: Paul Cercueil Date: Wed Oct 2 19:25:21 2019 +0800 irqchip: ingenic: Drop redundant irq_suspend / irq_resume functions The same behaviour can be obtained by using the IRQCHIP_MASK_ON_SUSPEND flag on the IRQ chip. Signed-off-by: Paul Cercueil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1570015525-27018-2-git-send-email-zhouyanjie@zoho.com commit 0149385537e6d36f535fcd83cfcabf83a32f0836 Author: Jonathan Neuschäfer Date: Wed Oct 2 16:44:52 2019 +0200 irqchip: Place CONFIG_SIFIVE_PLIC into the menu Somehow CONFIG_SIFIVE_PLIC ended up outside of the "IRQ chip support" menu. Fixes: 8237f8bc4f6e ("irqchip: add a SiFive PLIC driver") Signed-off-by: Jonathan Neuschäfer Signed-off-by: Marc Zyngier Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20191002144452.10178-1-j.neuschaefer@gmx.net commit 11635fa26dc7a715f3fc1c351846859e90985ae1 Author: Marc Zyngier Date: Fri Nov 8 16:58:05 2019 +0000 irqchip/gic-v3-its: Make vlpi_lock a spinlock The VLPI map is currently a mutex, and that's a bad idea as this lock can be taken in non-preemptible contexts. Convert it to a raw spinlock, and turn the memory allocation of the VLPI map to be atomic. Reported-by: Heyi Guo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191108165805.3071-12-maz@kernel.org commit 046b5054f56691c7f5861197a812f3990f66b30e Author: Marc Zyngier Date: Fri Nov 8 16:58:04 2019 +0000 irqchip/gic-v3-its: Lock VLPI map array before translating it Obtaining the mapping ivformation for a VLPI should always be done with the vlpi_lock for this device held. Otherwise, we expose ourselves to races against a concurrent unmap. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191108165805.3071-11-maz@kernel.org commit ed0e4aa9cc74c08a429f4a389483c1076da2ca51 Author: Marc Zyngier Date: Fri Nov 8 16:58:03 2019 +0000 irqchip/gic-v3-its: Synchronise INT/CLEAR commands targetting a VLPI using VSYNC We have so far always injected/cleared VLPIs using either INT+SYNC or CLEAR+SYNC sequences, but that's pretty wrong for two reasons: - SYNC only synchronises physical LPIs - The collection ID that for the associated LPI doesn't match the redistributor the vPE is associated with Instead, send an {INT,CLEAR}+VSYNC for forwarded LPIs, ensuring that the ITS synchronises against the virtual pending table. Reported-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191108165805.3071-10-maz@kernel.org commit 286146960a110cdae455a18cef47d5113d9a95c6 Author: Marc Zyngier Date: Fri Nov 8 16:58:02 2019 +0000 irqchip/gic-v3-its: Synchronise INV command targetting a VLPI using VSYNC We have so far alwways invalidated VLPIs usinc an INV+SYNC sequence, but that's pretty wrong for two reasons: - SYNC only synchronises physical LPIs - The collection ID that for the associated LPI doesn't match the redistributor the vPE is associated with Instead, send an INV+VSYNC for forwarded LPIs, ensuring that the ITS can properly synchronise the invalidation of VLPIs. Fixes: 015ec0386ab6 ("irqchip/gic-v3-its: Add VLPI configuration handling") Reported-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191108165805.3071-9-maz@kernel.org commit c1d4d5cd203cc8ec83d67d4e2af51f1a9f01ba34 Author: Marc Zyngier Date: Fri Nov 8 16:58:01 2019 +0000 irqchip/gic-v3-its: Add its_vlpi_map helpers Obtaining the mapping information for a VLPI is something quite common, and the GICv4.1 code is going to make even more use of it. Expose it as a separate set of helpers. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191027144234.8395-8-maz@kernel.org Link: https://lore.kernel.org/r/20191108165805.3071-8-maz@kernel.org commit 576a83429757999f220f36f206044af2b9026672 Author: Marc Zyngier Date: Fri Nov 8 16:58:00 2019 +0000 irqchip/gic-v3-its: Kill its->device_ids and use TYPER copy instead Now that we have a copy of TYPER in the ITS structure, rely on this to provide the same service as its->device_ids, which gets axed. Errata workarounds are now updating the cached fields instead of requiring a separate field in the ITS structure. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191027144234.8395-7-maz@kernel.org Link: https://lore.kernel.org/r/20191108165805.3071-7-maz@kernel.org commit ffedbf0cba153c91a0da5d1280a5e639664c5ab3 Author: Marc Zyngier Date: Fri Nov 8 16:57:59 2019 +0000 irqchip/gic-v3-its: Kill its->ite_size and use TYPER copy instead Now that we have a copy of TYPER in the ITS structure, rely on this to provide the same service as its->ite_size, which gets axed. Errata workarounds are now updating the cached fields instead of requiring a separate field in the ITS structure. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191027144234.8395-6-maz@kernel.org Link: https://lore.kernel.org/r/20191108165805.3071-6-maz@kernel.org commit 0dd57fed6b46659b2db1156cb9100fbcfef6fe5d Author: Marc Zyngier Date: Fri Nov 8 16:57:58 2019 +0000 irqchip/gic-v3-its: Make is_v4 use a TYPER copy Instead of caching the GICv4 compatibility in a discrete way, cache the TYPER register instead, which can then be used to implement the same functionnality. This will get used more extensively in subsequent patches. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191027144234.8395-5-maz@kernel.org Link: https://lore.kernel.org/r/20191108165805.3071-5-maz@kernel.org commit 425c09be0f091a3b5940261d9a5d8467d62987e7 Author: Marc Zyngier Date: Fri Nov 8 16:57:57 2019 +0000 irqchip/gic-v3-its: Allow LPI invalidation via the DirectLPI interface We currently don't make much use of the DirectLPI feature, and it would be beneficial to do this more, if only because it becomes a mandatory feature for GICv4.1. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191027144234.8395-4-maz@kernel.org Link: https://lore.kernel.org/r/20191108165805.3071-4-maz@kernel.org commit 2f4f064b31315c7c8986522cf38ef6d11fb77986 Author: Marc Zyngier Date: Fri Nov 8 16:57:56 2019 +0000 irqchip/gic-v3-its: Factor out wait_for_syncr primitive Waiting for a redistributor to have performed an operation is a common thing to do, and the idiom is already spread around. As we're going to make even more use of this, let's have a primitive that does just that. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191027144234.8395-3-maz@kernel.org Link: https://lore.kernel.org/r/20191108165805.3071-3-maz@kernel.org commit 898aa5ce6158c5ccfc256bfc17963bc81981eef8 Author: Marc Zyngier Date: Fri Nov 8 16:57:55 2019 +0000 irqchip/gic-v3-its: Free collection mapping on device teardown We allocate the collection mapping on device creation, but somehow free it on the irqdomain free path, which is pretty inconsistent and has led to bugs in the past. Move it to the point where we teardown the device, making the alloc/free symetric. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191108165805.3071-2-maz@kernel.org commit bf93b04cd85d74c34335e76882cf8bf206caab6e Author: Rajendra Nayak Date: Fri Nov 8 14:58:18 2019 +0530 dt-bindings: qcom,pdc: Add compatible for sc7180 Add the compatible string for sc7180 SoC from Qualcomm. Signed-off-by: Rajendra Nayak Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-8-rnayak@codeaurora.org commit 8e4d5a5bde8896c7fa36b173c613dbbbf9d5dc32 Author: Rajendra Nayak Date: Fri Nov 8 14:58:17 2019 +0530 drivers: irqchip: qcom-pdc: Move to an SoC independent compatible Remove the sdm845 SoC specific compatible to make the driver easily reusable across other SoC's with the same IP block. This will reduce further churn adding any SoC specific compatibles unless really needed. Signed-off-by: Rajendra Nayak Signed-off-by: Marc Zyngier Reviewed-by: Lina Iyer Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-7-rnayak@codeaurora.org commit 0dcd9f872769547f336741880bc7e721149c8d0a Author: Rasmus Villemoes Date: Thu Nov 7 13:21:15 2019 +0100 irqchip: Add support for Layerscape external interrupt lines The LS1021A allows inverting the polarity of six interrupt lines IRQ[0:5] via the scfg_intpcr register, effectively allowing IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_EDGE_FALLING for those. We just need to check the type, set the relevant bit in INTPCR accordingly, and fixup the type argument before calling the GIC's irq_set_type. In fact, the power-on-reset value of the INTPCR register on the LS1021A is so that all six lines have their polarity inverted. Hence any hardware connected to those lines is unusable without this: If the line is indeed active low, the generic GIC code will reject an irq spec with IRQ_TYPE_LEVEL_LOW, while if the line is active high, we must obviously disable the polarity inversion (writing 0 to the relevant bit) before unmasking the interrupt. Some other Layerscape SOCs (LS1043A, LS1046A) have a similar feature, just with a different number of external interrupt lines (and a different POR value for the INTPCR register). This driver should be prepared for supporting those by properly filling out the device tree node. I have the reference manuals for all three boards, but I've only tested the driver on an LS1021A. Unfortunately, the Kconfig symbol ARCH_LAYERSCAPE only exists on arm64, so do as is done for irq-ls-scfg-msi.c: introduce a new symbol which is set when either ARCH_LAYERSCAPE or SOC_LS1021A is set. Signed-off-by: Rasmus Villemoes Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191107122115.6244-3-linux@rasmusvillemoes.dk commit 87cd38dfd9e67ffa7c3d3d1a54a2482ed23f1307 Author: Rasmus Villemoes Date: Thu Nov 7 13:21:14 2019 +0100 dt/bindings: Add bindings for Layerscape external irqs This adds Device Tree binding documentation for the external interrupt lines with configurable polarity present on some Layerscape SOCs. Signed-off-by: Rasmus Villemoes Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191107122115.6244-2-linux@rasmusvillemoes.dk commit 96de80c14bc6b43b797299270e31b8924f89fa52 Author: Florian Fainelli Date: Thu Oct 24 13:14:15 2019 -0700 irqchip/irq-bcm7038-l1: Support brcm,int-fwd-mask On some specific chips like 7211 we need to leave some interrupts untouched/forwarded to the VPU which is another agent in the system making use of that interrupt controller hardware (goes to both ARM GIC and VPU L1 interrupt controller). Make that possible by using the existing brcm,int-fwd-mask property and take necessary actions to avoid masking that interrupt as well as not allowing Linux to map them. Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191024201415.23454-6-f.fainelli@gmail.com commit e14b5e5ff0841270e6262e3e5fd69ad764a80aee Author: Florian Fainelli Date: Thu Oct 24 13:14:14 2019 -0700 dt-bindings: Document brcm, int-fwd-mask property for bcm7038-l1-intc Indicate that the brcm,int-fwd-mask property is optional and can be set on platforms which require to leave specific interrupts unmanaged by Linux and need to retain the firmware configuration. Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191024201415.23454-5-f.fainelli@gmail.com commit 27eebb60357ed5aa6659442f92907c0f7368d6ae Author: Florian Fainelli Date: Thu Oct 24 13:14:13 2019 -0700 irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary If the 'brcm,irq-can-wake' property is specified, make sure we also enable the corresponding parent interrupt we are attached to. Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191024201415.23454-4-f.fainelli@gmail.com commit b94f9008f2ad551f4d6a9537b10238847cb81e5d Author: Florian Fainelli Date: Thu Oct 24 13:14:12 2019 -0700 dt-bindings: Document brcm, irq-can-wake for brcm, bcm7038-l1-intc.txt The BCM7038 L1 interrupt controller can be used as a wake-up interrupt controller on MIPS and ARM-based systems, document the brcm,irq-can-wake which has been "standardized" across Broadcom interrupt controllers. Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191024201415.23454-3-f.fainelli@gmail.com commit 6468fc18b00685c82408f40e9569c0d3527862b8 Author: Justin Chen Date: Thu Oct 24 13:14:11 2019 -0700 irqchip/irq-bcm7038-l1: Add PM support The current L1 controller does not mask any interrupts when dropping into suspend. This mean we can receive unexpected wake up sources. Modified the BCM7038 L1 controller to mask the all non-wake interrupts before dropping into suspend. Signed-off-by: Justin Chen Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191024201415.23454-2-f.fainelli@gmail.com commit f8af4519dfb6156045173f38cbd528c043fb25e2 Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:33:41 2019 +0100 irqchip/gic-v3: Fix __iomem warning The __iomem attribute should go before the * in the prototype. Move to silence the following sparse warnings: ./arch/arm/include/asm/arch_gicv3.h:340:15: warning: incorrect type in argument 1 (different address spaces) ./arch/arm/include/asm/arch_gicv3.h:340:15: expected void const volatile [noderef] *addr ./arch/arm/include/asm/arch_gicv3.h:340:15: got void * ./arch/arm/include/asm/arch_gicv3.h:343:17: warning: incorrect type in argument 2 (different address spaces) ./arch/arm/include/asm/arch_gicv3.h:343:17: expected void volatile [noderef] *addr ./arch/arm/include/asm/arch_gicv3.h:343:17: got void * ./arch/arm/include/asm/arch_gicv3.h:350:37: warning: incorrect type in argument 2 (different address spaces) ./arch/arm/include/asm/arch_gicv3.h:350:37: expected void volatile [noderef] *addr ./arch/arm/include/asm/arch_gicv3.h:350:37: got void *[noderef] addr drivers/irqchip/irq-gic-v3-its.c:2832:46: warning: incorrect type in argument 2 (different address spaces) drivers/irqchip/irq-gic-v3-its.c:2832:46: expected void *[noderef] addr drivers/irqchip/irq-gic-v3-its.c:2832:46: got void [noderef] * ./arch/arm/include/asm/arch_gicv3.h:340:15: warning: incorrect type in argument 1 (different address spaces) ./arch/arm/include/asm/arch_gicv3.h:340:15: expected void const volatile [noderef] *addr ./arch/arm/include/asm/arch_gicv3.h:340:15: got void * ./arch/arm/include/asm/arch_gicv3.h:343:17: warning: incorrect type in argument 2 (different address spaces) ./arch/arm/include/asm/arch_gicv3.h:343:17: expected void volatile [noderef] *addr ./arch/arm/include/asm/arch_gicv3.h:343:17: got void * ./arch/arm/include/asm/arch_gicv3.h:350:37: warning: incorrect type in argument 2 (different address spaces) ./arch/arm/include/asm/arch_gicv3.h:350:37: expected void volatile [noderef] *addr ./arch/arm/include/asm/arch_gicv3.h:350:37: got void *[noderef] addr Signed-off-by: Ben Dooks Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191017113341.13778-1-ben.dooks@codethink.co.uk commit 2bbdfcc54ba857ce5da9a5741379dd03ba94c947 Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:29:55 2019 +0100 irqchip/gic-v3-its: Fix u64 to __le64 warnings The its_cmd_block struct can either have u64 or __le64 data in it, so make a anonymous union to remove the sparse warnings when converting to/from these. Signed-off-by: Ben Dooks Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191017112955.15853-1-ben.dooks@codethink.co.uk commit 2c542426128a4e3d247939f868d19279ad48cb1f Author: Daode Huang Date: Thu Oct 17 16:25:29 2019 +0800 irqchip: Remove redundant semicolon after while check drivers/irqchip with "make coccicheck M=drivers/irqchip/", it will report unneeded semicolon like below, just remove them. drivers/irqchip/irq-zevio.c:54:2-3: Unneeded semicolon drivers/irqchip/irq-gic-v3.c:177:2-3: Unneeded semicolon drivers/irqchip/irq-gic-v3.c:234:2-3: Unneeded semicolon Signed-off-by: Daode Huang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1571300729-38822-1-git-send-email-huangdaode@hisilicon.com commit 2fe4f92834c40e81945284b3eaf4610c4dd84e9d Author: Darrick J. Wong Date: Thu Nov 7 15:05:21 2019 -0800 xfs: refactor "does this fork map blocks" predicate Replace the open-coded checks for whether or not an inode fork maps blocks with a macro that will implant the code for us. This helps us declutter the bmap code a bit. Note that I had to use a macro instead of a static inline function because of C header dependency problems between xfs_inode.h and xfs_inode_fork.h. Conversion was performed with the following Coccinelle script: @@ expression ip, w; @@ - XFS_IFORK_FORMAT(ip, w) == XFS_DINODE_FMT_EXTENTS || XFS_IFORK_FORMAT(ip, w) == XFS_DINODE_FMT_BTREE + xfs_ifork_has_extents(ip, w) @@ expression ip, w; @@ - XFS_IFORK_FORMAT(ip, w) != XFS_DINODE_FMT_EXTENTS && XFS_IFORK_FORMAT(ip, w) != XFS_DINODE_FMT_BTREE + !xfs_ifork_has_extents(ip, w) @@ expression ip, w; @@ - XFS_IFORK_FORMAT(ip, w) == XFS_DINODE_FMT_BTREE || XFS_IFORK_FORMAT(ip, w) == XFS_DINODE_FMT_EXTENTS + xfs_ifork_has_extents(ip, w) @@ expression ip, w; @@ - XFS_IFORK_FORMAT(ip, w) != XFS_DINODE_FMT_BTREE && XFS_IFORK_FORMAT(ip, w) != XFS_DINODE_FMT_EXTENTS + !xfs_ifork_has_extents(ip, w) @@ expression ip, w; @@ - (xfs_ifork_has_extents(ip, w)) + xfs_ifork_has_extents(ip, w) @@ expression ip, w; @@ - (!xfs_ifork_has_extents(ip, w)) + !xfs_ifork_has_extents(ip, w) Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 5113f8ec3753ed4d68a5d54d3345fee33a914bfe Author: Darrick J. Wong Date: Thu Nov 7 12:29:00 2019 -0800 xfs: clean up weird while loop in xfs_alloc_ag_vextent_near Refactor the weird while loop out of existence. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit f755979355d46ef088f9c9fdb5d11c4a425e738e Author: Darrick J. Wong Date: Wed Nov 6 08:41:20 2019 -0800 xfs: annotate functions that trip static checker locking checks Add some lock annotations to helper functions that seem to have unbalanced locking that confuses the static analyzers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit cf085a1b5d221448c0c7425f3b9b9a9e2134e53e Author: Joe Perches Date: Thu Nov 7 13:24:52 2019 -0800 xfs: Correct comment tyops -> typos Just fix the typos checkpatch notices... Signed-off-by: Joe Perches Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 731b60afcb3d318581af7f4e1ac9a66f9e12f1a5 Author: Laura Abbott Date: Fri Oct 18 13:29:08 2019 -0400 tools: iio: Correctly add make dependency for iio_utils iio tools fail to build correctly with make parallelization: $ make -s -j24 fixdep: error opening depfile: ./.iio_utils.o.d: No such file or directory make[1]: *** [/home/labbott/linux_upstream/tools/build/Makefile.build:96: iio_utils.o] Error 2 make: *** [Makefile:43: iio_event_monitor-in.o] Error 2 make: *** Waiting for unfinished jobs.... This is because iio_utils.o is used across multiple targets. Fix this by making iio_utils.o a proper dependency. Signed-off-by: Laura Abbott Signed-off-by: Jonathan Cameron commit dca6b3733a4a46e63603496f544ece8ace541fde Author: Hans Verkuil Date: Sun Nov 10 14:30:18 2019 +0100 media: Revert "media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding" This reverts commit 3192b2ca79b3f72fbc0eab9cd95432e3c317ab0d. There are indications that this patch causes problems on some platforms due to some hardware prefetch. Reverting this patch for now until this is better understood. Reported-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 506d2e317a0a02631a74bbc4c508334c29e26eae Author: Marcelo Schmitt Date: Fri Nov 8 10:56:50 2019 -0300 iio: adc: Add driver support for AD7292 The AD7292 is a 10-bit monitor and control system with ADC, DACs, temperature sensor, and GPIOs. Configure AD7292 devices in direct access mode, enabling single-ended ADC readings. Datasheet: Link: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7292.pdf Signed-off-by: Marcelo Schmitt Signed-off-by: Jonathan Cameron commit a2cbf80a842add9663522bf898cf13cb2ac4e423 Author: Jonas Karlman Date: Wed Nov 6 23:35:11 2019 +0100 media: hantro: Set H264 FIELDPIC_FLAG_E flag correctly The FIELDPIC_FLAG_E bit should be set when field_pic_flag exists in stream, it is currently set based on field_pic_flag of current frame. The PIC_FIELDMODE_E bit is correctly set based on the field_pic_flag. Fix this by setting the FIELDPIC_FLAG_E bit when frame_mbs_only is not set. Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1") Signed-off-by: Jonas Karlman Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0875962af488e1bbfe6dc4f773495529459d2a28 Author: Jonas Karlman Date: Wed Nov 6 23:35:10 2019 +0100 media: hantro: Remove now unused H264 pic_size pic_size in hantro_h264_dec_hw_ctx struct is no longer used, lets remove it. Signed-off-by: Jonas Karlman Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 79c523291ea22f5b3289d92f180ed6b76fd80502 Author: Jonas Karlman Date: Wed Nov 6 23:34:22 2019 +0100 media: hantro: Use output buffer width and height for H264 decoding Calculations for motion vector buffer offset is based on width and height from the configured output format, lets use the same values for macroblock width and height hw regs. Signed-off-by: Jonas Karlman Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a8fe996084e358c6f4ec7c51ec28fd3c1ddf68d1 Author: Jonas Karlman Date: Wed Nov 6 23:34:21 2019 +0100 media: hantro: Reduce H264 extra space for motion vectors A decoded 8-bit 4:2:0 frame need memory for up to 448 bytes per macroblock with additional 32 bytes on multi-core variants. Memory layout is as follow: +---------------------------+ | Y-plane 256 bytes x MBs | +---------------------------+ | UV-plane 128 bytes x MBs | +---------------------------+ | MV buffer 64 bytes x MBs | +---------------------------+ | MC sync 32 bytes | +---------------------------+ Reduce the extra space allocated now that motion vector buffer offset no longer is based on the extra space. Only allocate extra space for 64 bytes x MBs of motion vector buffer and 32 bytes for multi-core sync. Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding") Signed-off-by: Jonas Karlman Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 329f268821509b9a3713f1bc3680d298d61d6230 Author: Jonas Karlman Date: Wed Nov 6 23:34:20 2019 +0100 media: hantro: Fix H264 motion vector buffer offset A decoded 8-bit 4:2:0 frame need memory for up to 448 bytes per macroblock and is laid out in memory as follow: +---------------------------+ | Y-plane 256 bytes x MBs | +---------------------------+ | UV-plane 128 bytes x MBs | +---------------------------+ | MV buffer 64 bytes x MBs | +---------------------------+ The motion vector buffer offset is currently correct for 4:2:0 because the extra space for motion vectors is overallocated with an extra 64 bytes x MBs. Wrong offset for both destination and motion vector buffer are used for the bottom field of field encoded content, wrong offset is also used for 4:0:0 (monochrome) content. Fix this by setting the motion vector address to the expected 384 bytes x MBs offset for 4:2:0 and 256 bytes x MBs offset for 4:0:0 content. Also use correct destination and motion vector buffer offset for the bottom field of field encoded content. While at it also extend the check for 4:0:0 (monochrome) to include an additional check for High Profile (100). Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1") Signed-off-by: Jonas Karlman Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a79b200af75cd6c55079213ad6c9cb93c9a78aa8 Author: Benoit Parrot Date: Wed Nov 6 21:26:22 2019 +0100 media: ti-vpe: vpe: fix compatible to match bindings Update the compatible string to match the updated bindings. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ce01100c5d790f19b01e06d72eadb057eb95e4fa Author: Benoit Parrot Date: Wed Nov 6 21:26:18 2019 +0100 media: dt-bindings: media: ti-vpe: Document VPE driver Device Tree bindings for the Video Processing Engine (VPE). Signed-off-by: Benoit Parrot Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eb9809b94db0b3c26b031d97db08f7e1273dd757 Merge: c31432fa7f82 e6e8df07268c Author: Rafael J. Wysocki Date: Sun Nov 10 17:50:26 2019 +0100 Merge back cpufreq changes for v5.5. commit 1dea68495da582da459fcfca60428457acae8063 Author: Colin Ian King Date: Fri Oct 25 15:46:12 2019 +0200 media: zr364xx: remove redundant assigmnent to idx, clean up code The variable cable_type is being initialized with a value that is never read and is being re-assigned a little later on. Replace the redundant initializtion with the assignment that occurs a little later. Also initialize frm too rather than have a later assignment. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4edead77fa16ac4ec880ebceed83da2415401d18 Author: Ricardo Ribalda Delgado Date: Fri Oct 25 11:47:06 2019 +0200 media: Documentation: media: *_DEFAULT targets for subdevs Some sensors have optical blanking areas, this is, pixels that are painted and do not account for light, only noise. These special pixels are very useful for calibrating the sensor, but should not be displayed on a DEFAULT target. Signed-off-by: Ricardo Ribalda Delgado Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ae02d49493b5d32bb3e035fdeb1655346f5e1ea5 Author: Ezequiel Garcia Date: Mon Oct 7 19:45:02 2019 +0200 media: hantro: Fix s_fmt for dynamic resolution changes Commit 953aaa1492c53 ("media: rockchip/vpu: Prepare things to support decoders") changed the conditions under S_FMT was allowed for OUTPUT CAPTURE buffers. However, and according to the mem-to-mem stateless decoder specification, in order to support dynamic resolution changes, S_FMT should be allowed even if OUTPUT buffers have been allocated. Relax decoder S_FMT restrictions on OUTPUT buffers, allowing a resolution modification, provided the pixel format stays the same. Tested on RK3288 platforms using ChromiumOS Video Decode/Encode Accelerator Unittests. [hverkuil: fix typo: In other -> In order] Fixes: 953aaa1492c53 ("media: rockchip/vpu: Prepare things to support decoders") Signed-off-by: Ezequiel Garcia Reviewed-by: Boris Brezillon Cc: # for v5.4 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 59d8bf5ddfcfdd16e4dcb1a23915d09648a05558 Author: Nishad Kamdar Date: Wed Sep 4 16:58:27 2019 +0200 media: i2c: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to I2C controlled media codec drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 and some manual changes. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 01da44446b3b9f82f4f629aa20cad9371a287dd5 Author: Nishad Kamdar Date: Sat Aug 31 17:11:51 2019 +0200 media: siano: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to Siano Mobile Silicon Digital TV. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d898f9ac542f9c60c5760cfe4b9cb10c635feb38 Author: Marcelo Schmitt Date: Fri Nov 8 10:56:09 2019 -0300 dt-bindings: iio: adc: Add dt-schema for AD7292 Add a devicetree schema for AD7292 monitor and control system. Signed-off-by: Marcelo Schmitt Signed-off-by: Jonathan Cameron commit 5313513d4a633dde0ae9be680bb93761591f475d Author: Marcus Folkesson Date: Fri Nov 8 08:25:30 2019 +0100 dt-bindings: iio: adc: Migrate MCP3911 documentation to yaml Rewrite bindings to use json-schema vocabulary. Signed-off-by: Marcus Folkesson Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 26a0ffeed95190c72da398ae9f655507dc87550f Author: Stephan Gerhold Date: Thu Nov 7 19:43:42 2019 +0100 iio: imu: mpu6050: Add support for vdd-supply regulator MPU6050 has two power supply pins: VDD and VLOGIC, but the mpu6050 driver only supports enabling one of them at the moment. In some cases, they may need to be enabled separately. Add an additional "vdd-supply" that stays enabled for as long as the driver is loaded. We cannot turn off the VDD regulator during suspend as this would cause register settings (FSR, sampling rate, ...) to be lost. Signed-off-by: Stephan Gerhold Reviewed-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit ea3b263e83ed706343b935b1b239ae15ecdf176a Author: Stephan Gerhold Date: Thu Nov 7 19:43:41 2019 +0100 dt-bindings: iio: imu: mpu6050: add vdd-supply inv_mpu6050 now supports an additional vdd-supply; document it. Reviewed-by: Linus Walleij Signed-off-by: Stephan Gerhold Reviewed-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit e9a4cbcaaa391ef44d623d548ee715e77265030c Author: Gwendal Grignou Date: Wed Nov 6 09:55:33 2019 -0800 iio: cros_ec_baro: set info_mask_shared_by_all_available field Field was already set for light/proximity and accelerometer/gyroscope/magnetometer sensors. Fixes: ae7b02ad2f32 ("iio: common: cros_ec_sensors: Expose cros_ec_sensors frequency range via iio sysfs") Signed-off-by: Gwendal Grignou Signed-off-by: Jonathan Cameron commit 6376cbe549fffb378403cee78efd26b8a2c8e450 Author: Stefan Popa Date: Wed Nov 6 11:47:21 2019 +0200 iio: dac: ad5446: Add support for new AD5600 DAC The AD5600 is a single channel, 16-bit resolution, voltage output digital to analog converter (DAC). The AD5600 uses a 3-wire SPI interface. It is part of the AD5541 family of DACs. The ad5446 IIO driver implements support for some of these DACs (in the AD5441 family), so the change is a simple entry in this driver. Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD5600.pdf Signed-off-by: Stefan Popa Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 778f3a9673ac48bcf4c4ee640b2b29578cded8c1 Author: Robert Richter Date: Wed Nov 6 09:33:30 2019 +0000 EDAC/Documentation: Describe CPER module definition and DIMM ranks Update on CPER DIMM naming convention and DIMM ranks. [ bp: Touchups. ] Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-doc@vger.kernel.org" Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Jonathan Corbet Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-14-rrichter@marvell.com commit 787d899914aae1c8cdb467931cfd7c369ef8d37b Author: Robert Richter Date: Wed Nov 6 09:33:27 2019 +0000 EDAC: Unify the mc_event tracepoint call The code in ghes_edac.c and edac_mc.c for grain_bits calculation and calling trace_mc_event() is now the same. Move it to a single location in edac_raw_mc_handle_error(). The only difference is the missing IS_ENABLED(CONFIG_RAS) switch, but this is needed for ghes too. Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-13-rrichter@marvell.com commit 501eb40d2b85ae70a617a3b46dbb519fb9c76532 Author: Robert Richter Date: Wed Nov 6 09:33:25 2019 +0000 EDAC/ghes: Remove intermediate buffer pvt->detail_location detail_location[] is used to collect two location strings so they can be passed as one to trace_mc_event(). Instead of having an extra copy step, assemble the location string in other_detail[] from the beginning. Using other_detail[] to call trace_mc_event() is now the same as in edac_mc.c and code can be unified. Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: James Morse Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-12-rrichter@marvell.com commit 7088e29e0423d3195e09079b4f849ec4837e5a75 Author: Robert Richter Date: Wed Nov 6 09:33:23 2019 +0000 EDAC/ghes: Fix grain calculation The current code to convert a physical address mask to a grain (defined as granularity in bytes) is: e->grain = ~(mem_err->physical_addr_mask & ~PAGE_MASK); This is broken in several ways: 1) It calculates to wrong grain values. E.g., a physical address mask of ~0xfff should give a grain of 0x1000. Without considering PAGE_MASK, there is an off-by-one. Things are worse when also filtering it with ~PAGE_MASK. This will calculate to a grain with the upper bits set. In the example it even calculates to ~0. 2) The grain does not depend on and is unrelated to the kernel's page-size. The page-size only matters when unmapping memory in memory_failure(). Smaller grains are wrongly rounded up to the page-size, on architectures with a configurable page-size (e.g. arm64) this could round up to the even bigger page-size of the hypervisor. Fix this with: e->grain = ~mem_err->physical_addr_mask + 1; The grain_bits are defined as: grain = 1 << grain_bits; Change also the grain_bits calculation accordingly, it is the same formula as in edac_mc.c now and the code can be unified. The value in ->physical_addr_mask coming from firmware is assumed to be contiguous, but this is not sanity-checked. However, in case the mask is non-contiguous, a conversion to grain_bits effectively converts the grain bit mask to a power of 2 by rounding it up. Suggested-by: James Morse Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-11-rrichter@marvell.com commit 7c1049317042a37638788bb8a892dbd75b742655 Author: Robert Richter Date: Wed Nov 6 09:33:20 2019 +0000 EDAC/ghes: Use standard kernel macros for page calculations Use standard macros for page calculations. Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: James Morse Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-10-rrichter@marvell.com commit 98edb865bd3ee2a67e51e0d947208f3a2129a460 Author: Robert Richter Date: Wed Nov 6 09:33:18 2019 +0000 EDAC: Remove misleading comment in struct edac_raw_error_desc There never has been such function edac_raw_error_desc_clean() and in function ghes_edac_report_mem_error() the whole struct is zero'ed including the string arrays. Remove that comment. Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-9-rrichter@marvell.com commit 0d8292e003effface2a613e5369deb0a913516d8 Author: Robert Richter Date: Wed Nov 6 09:33:14 2019 +0000 EDAC/mc: Reduce indentation level in edac_mc_handle_error() Reduce the indentation level in edac_mc_handle_error() a bit. No functional changes. Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-7-rrichter@marvell.com commit 47bec6b4c399fafbf984431c6a15baac06729829 Author: Robert Richter Date: Wed Nov 6 09:33:11 2019 +0000 EDAC/mc: Remove needless zero string termination The e string to which this is pointing to has already been cleared earlier in the function so remove the needless zero string termination. [ bp: Correct the commit message. ] Suggested-by: Joe Perches Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-6-rrichter@marvell.com commit d260e8ff5195d3080cc11ae1f35cf4e6eb1a5d24 Author: Robert Richter Date: Wed Nov 6 09:33:09 2019 +0000 EDAC/mc: Do not BUG_ON() in edac_mc_alloc() No need to crash the system in case edac_mc_alloc() is called with invalid arguments, just warn and return. This would cause a checkpatch warning when touching the code later, so just fix it. Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-5-rrichter@marvell.com commit c498afaf7df87f44e7cb383c135baec52b5259be Author: Robert Richter Date: Wed Nov 6 09:33:07 2019 +0000 EDAC: Introduce an mci_for_each_dimm() iterator Introduce an mci_for_each_dimm() iterator. It returns a pointer to a struct dimm_info. This makes the declaration and use of an index obsolete and avoids access to internal data of struct mci (direct array access etc). [ bp: push the struct dimm_info *dimm; declaration into the CONFIG_EDAC_DEBUG block. ] Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-4-rrichter@marvell.com commit 0cdd991bbc519628ae6681a81a2bf75e375ac2d9 Author: Marcus Folkesson Date: Fri Nov 8 08:25:39 2019 +0100 dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml Rewrite bindings to use json-schema vocabulary. Signed-off-by: Marcus Folkesson Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 56a8e6832874c977ea7b11a0e096031f9b4f3e11 Author: Rishi Gupta Date: Mon Nov 4 21:09:28 2019 +0530 iio: documentation: light: Add veml6030 sysfs documentation The driver for veml6030 light sensor provides sysfs entries like configuring cutoff for interrupt. This commit document them. Signed-off-by: Rishi Gupta Signed-off-by: Jonathan Cameron commit fcefddc4b735e934eda5d4a340ae7c072fdaa428 Author: Rishi Gupta Date: Mon Nov 4 21:09:00 2019 +0530 dt-bindings: iio: light: add veml6030 ALS bindings This commit adds device tree bindings for veml6030 ambient light sensor. Signed-off-by: Rishi Gupta Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 7b779f573c48e1ad6da1d6ea5f181f3ecd666bf6 Author: Rishi Gupta Date: Mon Nov 4 21:08:24 2019 +0530 iio: light: add driver for veml6030 ambient light sensor veml6030 is an ambient light sensor from Vishay semiconductors. It has 16-bit resolution, supports both ambient light measurement and white channel which is more responsive to wider wavelength spectrum. It has flexible power saving, integration time and gain options. Communication with host is over I2C. Signed-off-by: Rishi Gupta Signed-off-by: Jonathan Cameron commit 693c5f144aeb9636ae161a3c61a838c50b2ae41c Author: Hans Verkuil Date: Sat Nov 9 15:06:18 2019 +0100 media: vicodec: media_device_cleanup was called too early Running the contrib/test/test-media script in v4l-utils with the vicodec argument will cause this kernel warning: [ 372.298824] ------------[ cut here ]------------ [ 372.298848] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 372.298896] WARNING: CPU: 11 PID: 2220 at kernel/locking/mutex.c:938 __mutex_lock+0x919/0xc10 [ 372.298907] Modules linked in: vicodec v4l2_mem2mem vivid rc_cec v4l2_tpg videobuf2_dma_contig cec rc_core v4l2_dv_timings videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc vmw_balloon vmw_vmci button vmwgfx [last unloaded: vimc] [ 372.298961] CPU: 11 PID: 2220 Comm: sleep Not tainted 5.4.0-rc1-test-no #150 [ 372.298970] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/29/2019 [ 372.298983] RIP: 0010:__mutex_lock+0x919/0xc10 [ 372.298995] Code: 59 83 e8 9a fc 16 ff 44 8b 05 23 61 38 01 45 85 c0 0f 85 ef f7 ff ff 48 c7 c6 a0 1f 87 82 48 c7 c7 a0 1e 87 82 e8 cd bb f7 fe <0f> 0b e9 d5 f7 ff ff f6 c3 04 0f 84 3b fd ff ff 49 89 df 41 83 e7 [ 372.299004] RSP: 0018:ffff8881b400fb80 EFLAGS: 00010286 [ 372.299014] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 372.299022] RDX: 0000000000000003 RSI: 0000000000000004 RDI: ffffed1036801f62 [ 372.299030] RBP: ffff8881b400fcf0 R08: ffffffff81217c91 R09: fffffbfff061c271 [ 372.299038] R10: fffffbfff061c270 R11: ffffffff830e1383 R12: ffff88814761dc80 [ 372.299046] R13: 0000000000000000 R14: ffff88814761cbf0 R15: ffff88814761d030 [ 372.299055] FS: 0000000000000000(0000) GS:ffff8881b68c0000(0000) knlGS:0000000000000000 [ 372.299063] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 372.299071] CR2: 00007f606d78aa20 CR3: 0000000003013002 CR4: 00000000001606e0 [ 372.299153] Call Trace: [ 372.299176] ? __kasan_slab_free+0x12f/0x180 [ 372.299187] ? kmem_cache_free+0x9b/0x250 [ 372.299200] ? do_exit+0xcdf/0x1200 [ 372.299210] ? do_group_exit+0x85/0x130 [ 372.299220] ? __x64_sys_exit_group+0x23/0x30 [ 372.299231] ? do_syscall_64+0x5e/0x1c0 [ 372.299241] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 372.299295] ? v4l2_release+0xed/0x190 [videodev] [ 372.299309] ? mutex_lock_io_nested+0xb80/0xb80 [ 372.299323] ? find_held_lock+0x85/0xa0 [ 372.299335] ? fsnotify+0x5b0/0x600 [ 372.299351] ? locks_remove_file+0x78/0x2b0 [ 372.299363] ? __fsnotify_update_child_dentry_flags.part.0+0x170/0x170 [ 372.299383] ? vidioc_querycap+0x50/0x50 [vicodec] [ 372.299426] ? v4l2_release+0xed/0x190 [videodev] [ 372.299467] v4l2_release+0xed/0x190 [videodev] [ 372.299484] __fput+0x15a/0x390 [ 372.299499] task_work_run+0xb2/0xe0 [ 372.299512] do_exit+0x4d0/0x1200 [ 372.299528] ? do_user_addr_fault+0x367/0x610 [ 372.299538] ? release_task+0x990/0x990 [ 372.299552] ? rwsem_spin_on_owner+0x170/0x170 [ 372.299567] ? vmacache_find+0xb2/0x100 [ 372.299580] do_group_exit+0x85/0x130 [ 372.299592] __x64_sys_exit_group+0x23/0x30 [ 372.299602] do_syscall_64+0x5e/0x1c0 [ 372.299614] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 372.299624] RIP: 0033:0x7f606d74a9d6 [ 372.299640] Code: Bad RIP value. [ 372.299648] RSP: 002b:00007fff65364468 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 372.299658] RAX: ffffffffffffffda RBX: 00007f606d83b760 RCX: 00007f606d74a9d6 [ 372.299666] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 372.299673] RBP: 0000000000000000 R08: 00000000000000e7 R09: ffffffffffffff80 [ 372.299681] R10: 00007fff65364334 R11: 0000000000000246 R12: 00007f606d83b760 [ 372.299689] R13: 0000000000000002 R14: 00007f606d844428 R15: 0000000000000000 [ 372.299704] ---[ end trace add7d62ca4bc65e3 ]--- This is caused by media_device_cleanup() which destroys v4l2_dev->mdev->req_queue_mutex. But v4l2_release() tries to lock that mutex after media_device_cleanup() is called. By moving media_device_cleanup() to the v4l2_device's release function it is guaranteed that the mutex is valid whenever v4l2_release is called. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9f22e88a4bba270d3427684cee84dfbf67489e86 Author: Hans Verkuil Date: Sat Nov 9 14:03:08 2019 +0100 media: vim2m: media_device_cleanup was called too early Running the contrib/test/test-media script in v4l-utils with the vim2m argument will cause this kernel warning: [ 554.430157] ------------[ cut here ]------------ [ 554.433034] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 554.433064] WARNING: CPU: 0 PID: 616 at kernel/locking/mutex.c:938 __mutex_lock+0xd7a/0x1380 [ 554.439736] Modules linked in: vim2m v4l2_mem2mem vivid rc_cec videobuf2_dma_contig v4l2_dv_timings cec videobuf2_vmalloc videobuf2_memops v4l2_tpg videobuf2_v4l2 videobuf2_common videodev mc rc_core [last unloaded: vivid] [ 554.445794] CPU: 0 PID: 616 Comm: sleep Not tainted 5.4.0-rc1-virtme #1 [ 554.448481] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014 [ 554.453088] RIP: 0010:__mutex_lock+0xd7a/0x1380 [ 554.454955] Code: d2 0f 85 de 05 00 00 44 8b 05 82 d9 f7 00 45 85 c0 0f 85 bf f3 ff ff 48 c7 c6 e0 30 a6 b7 48 c7 c7 e0 2e a6 b7 e8 5c 76 36 fe <0f> 0b e9 a5 f3 ff ff 65 48 8b 1c 25 80 ef 01 00 be 08 00 00 00 48 [ 554.462836] RSP: 0018:ffff88803a4cfad0 EFLAGS: 00010282 [ 554.465129] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffb5a3d24f [ 554.468143] RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffffb85273f4 [ 554.471000] RBP: ffff88803a4cfc50 R08: fffffbfff701e681 R09: fffffbfff701e681 [ 554.473990] R10: fffffbfff701e680 R11: ffffffffb80f3403 R12: 0000000000000000 [ 554.476831] R13: dffffc0000000000 R14: ffffffffb9714f00 R15: ffff888053103fc8 [ 554.479622] FS: 00007fac6358a540(0000) GS:ffff88805d000000(0000) knlGS:0000000000000000 [ 554.482673] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 554.484949] CR2: 00007fac6343faf0 CR3: 0000000036c22000 CR4: 00000000003406f0 [ 554.487811] Call Trace: [ 554.488860] ? v4l2_release+0x1b8/0x390 [videodev] [ 554.490818] ? do_exit+0x946/0x2980 [ 554.492269] ? mutex_lock_io_nested+0x1250/0x1250 [ 554.494128] ? __lock_acquire+0xe90/0x3c30 [ 554.495774] ? fsnotify_first_mark+0x120/0x120 [ 554.497487] ? vim2m_device_release+0x50/0x50 [vim2m] [ 554.499469] ? v4l2_release+0x1b8/0x390 [videodev] [ 554.501493] v4l2_release+0x1b8/0x390 [videodev] [ 554.503430] __fput+0x256/0x790 [ 554.504711] task_work_run+0x109/0x190 [ 554.506145] do_exit+0x95e/0x2980 [ 554.507421] ? vfs_lock_file+0x21/0xf0 [ 554.509013] ? find_held_lock+0x33/0x1c0 [ 554.510382] ? __close_fd+0xee/0x190 [ 554.511862] ? release_task.part.21+0x1310/0x1310 [ 554.513701] ? lock_downgrade+0x6d0/0x6d0 [ 554.515299] do_group_exit+0xeb/0x2d0 [ 554.516862] __x64_sys_exit_group+0x35/0x40 [ 554.518610] do_syscall_64+0x90/0x450 [ 554.520142] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 554.522289] RIP: 0033:0x7fac6348ecf6 [ 554.523876] Code: Bad RIP value. [ 554.525294] RSP: 002b:00007ffe6373dc58 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 554.528555] RAX: ffffffffffffffda RBX: 00007fac6357f760 RCX: 00007fac6348ecf6 [ 554.531537] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 554.534709] RBP: 0000000000000000 R08: 00000000000000e7 R09: ffffffffffffff80 [ 554.536752] R10: 00007ffe6373db24 R11: 0000000000000246 R12: 00007fac6357f760 [ 554.538643] R13: 0000000000000002 R14: 00007fac63588428 R15: 0000000000000000 [ 554.540634] irq event stamp: 21731 [ 554.541618] hardirqs last enabled at (21731): [] _raw_spin_unlock_irq+0x24/0x30 [ 554.544145] hardirqs last disabled at (21730): [] _raw_spin_lock_irq+0xa/0x40 [ 554.547027] softirqs last enabled at (20148): [] __do_softirq+0x64d/0x906 [ 554.550385] softirqs last disabled at (19857): [] irq_exit+0x175/0x1a0 [ 554.553668] ---[ end trace a389c80c2ca84244 ]--- This is caused by media_device_cleanup() which destroys v4l2_dev->mdev->req_queue_mutex. But v4l2_release() tries to lock that mutex after media_device_cleanup() is called. By moving media_device_cleanup() to the video_device's release function it is guaranteed that the mutex is valid whenever v4l2_release is called. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0b3e5c15f9cb8b56599c50e6bf4f46ee1c1253bc Author: Jernej Skrabec Date: Wed Nov 6 22:05:38 2019 +0100 media: cedrus: Increase maximum supported size There are few variations of 4k resolutions. The biggest one is 4096x2304 which is also supported by HW. It has also nice property that both width and size are divisible by maximum HEVC CTB size, which is 64. Signed-off-by: Jernej Skrabec Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 03e612e701a61aa9cc9fd8e25cd47d8d685ef675 Author: Jernej Skrabec Date: Wed Nov 6 22:05:37 2019 +0100 media: cedrus: Fix H264 4k support H264 decoder needs additional or bigger buffers in order to decode 4k videos. Signed-off-by: Jernej Skrabec Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3aef46bd5bf24a845e05d2531ed61f53ee8c7797 Author: Jernej Skrabec Date: Sun Nov 10 07:30:01 2019 +0100 media: cedrus: Properly signal size in mode register Mode register also holds information if video width is bigger than 2048 and if it is equal to 4096. Rework cedrus_engine_enable() to properly signal this properties. Signed-off-by: Jernej Skrabec Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit df4a3e7f88e3b0d7ae46d70b9ff8e3c0ea730785 Author: Pi-Hsun Shih Date: Sun Nov 10 07:29:10 2019 +0100 media: v4l2-ctrl: Lock main_hdl on operations of requests_queued. There's a race condition between the list_del_init in the v4l2_ctrl_request_complete, and the list_add_tail in the v4l2_ctrl_request_queue, since they can be called in different thread and the requests_queued list is not protected by a lock. This can lead to that the v4l2_ctrl_handler is still in the requests_queued list while the request_is_queued is already set to false, which would cause use-after-free if the v4l2_ctrl_handler is later released. Fix this by locking the ->lock of main_hdl (which is the owner of the requests_queued list) when doing list operations on the ->requests_queued list. Signed-off-by: Pi-Hsun Shih Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2df200ab234a86836a8879a05a8007d6b884eb14 Author: Chuhong Yuan Date: Sun Nov 10 07:28:15 2019 +0100 media: si470x-i2c: add missed operations in remove The driver misses calling v4l2_ctrl_handler_free and v4l2_device_unregister in remove like what is done in probe failure. Add the calls to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4ffd31463ce303de92724d4e1faf7807f68a4aa5 Author: Philipp Zabel Date: Sun Nov 10 07:27:40 2019 +0100 media: coda: disable decoder crop selections Disable output side crop selections for the decoder. This fixes the following v4l2-compliance complaint: fail: v4l2-test-formats.cpp(1576): IS_DECODER(node) test Cropping: FAIL Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ee8951e56c0f960b9621636603a822811cef3158 Author: Hans Verkuil Date: Sun Nov 10 07:27:04 2019 +0100 media: v4l2-ioctl.c: zero reserved fields for S/TRY_FMT v4l2_vbi_format, v4l2_sliced_vbi_format and v4l2_sdr_format have a reserved array at the end that should be zeroed by drivers as per the V4L2 spec. Older drivers often do not do this, so just handle this in the core. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ff1c21f4cffdd490f2d7fd1ce28462e3dca610de Author: Philipp Zabel Date: Sun Nov 10 07:26:11 2019 +0100 media: coda: disable encoder compose selections Disable capture side compose selections for the encoder. This fixes the following v4l2-compliance complaint: fail: v4l2-test-formats.cpp(1662): IS_ENCODER(node) test Composing: FAIL Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3192b2ca79b3f72fbc0eab9cd95432e3c317ab0d Author: Hirokazu Honda Date: Sun Nov 10 07:25:34 2019 +0100 media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding MediaTek encoder allocates non pixel data area for an input buffer every plane. As the input buffer should be read-only, the driver should not write anything in the buffer. Therefore, the extra data should be unnecessary. Signed-off-by: Hirokazu Honda Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c20df61861b702605046a7b61b1da6143c05fc4d Author: Dafna Hirschfeld Date: Sun Nov 10 07:25:03 2019 +0100 media: vimc: upon streaming, check that the pipeline starts with a source entity Userspace can disable links and create pipelines that do not start with a source entity. Trying to stream from such a pipeline should fail with -EPIPE currently this is not handled and cause kernel crash. Reproducing the crash: media-ctl -d0 -l "5:1->21:0[0]" -v v4l2-ctl -z platform:vimc -d "RGB/YUV Capture" -v width=1920,height=1440 v4l2-ctl --stream-mmap --stream-count=100 -d /dev/video2 Panic message: [ 39.078841][ T248] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 39.079338][ T248] #PF: supervisor read access in kernel mode [ 39.079704][ T248] #PF: error_code(0x0000) - not-present page [ 39.080071][ T248] PGD 0 P4D 0 [ 39.080279][ T248] Oops: 0000 [#1] SMP PTI [ 39.080546][ T248] CPU: 0 PID: 248 Comm: vimc-streamer t Not tainted 5.4.0-rc1+ #17 [ 39.081030][ T248] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014 [ 39.081779][ T248] RIP: 0010:vimc_sca_process_frame+0xdb/0x210 [vimc] [ 39.082191][ T248] Code: 44 8d 0c 28 8b 93 a4 01 00 00 48 8b 8b 98 01 00 00 85 d2 74 40 48 8b 74 24 10 8d 7a ff 4c 01 c9 31 d2 4c 01 fe eb 03 4c 89 c2 <44> 0f b6 04 16 44 88 04 11 4c 8d 42 01 48 39 fa 75 eb 8b 93 a4 01 [ 39.083436][ T248] RSP: 0018:ffffb15a005abe90 EFLAGS: 00010246 [ 39.083808][ T248] RAX: 0000000000000000 RBX: ffffa3fdc46d2e00 RCX: ffffb15a02579000 [ 39.084298][ T248] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000002 [ 39.084792][ T248] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 39.085280][ T248] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 [ 39.085770][ T248] R13: ffffa3fdc46d2ee0 R14: 0000000000000000 R15: 0000000000000000 [ 39.086258][ T248] FS: 0000000000000000(0000) GS:ffffa3fdc7800000(0000) knlGS:0000000000000000 [ 39.086806][ T248] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 39.087217][ T248] CR2: 0000000000000000 CR3: 0000000003c92005 CR4: 0000000000360ef0 [ 39.087706][ T248] Call Trace: [ 39.087909][ T248] ? vimc_streamer_pipeline_terminate+0x90/0x90 [vimc] [ 39.088318][ T248] vimc_streamer_thread+0x7c/0xe0 [vimc] [ 39.088663][ T248] kthread+0x10d/0x130 [ 39.088919][ T248] ? kthread_park+0x80/0x80 [ 39.089205][ T248] ret_from_fork+0x35/0x40 [ 39.089475][ T248] Modules linked in: vimc videobuf2_vmalloc videobuf2_memops v4l2_tpg videobuf2_v4l2 videobuf2_common videodev mc [ 39.090208][ T248] CR2: 0000000000000000 [ 39.090463][ T248] ---[ end trace 697650fefbf78bee ]--- [ 39.090796][ T248] RIP: 0010:vimc_sca_process_frame+0xdb/0x210 [vimc] [ 39.091209][ T248] Code: 44 8d 0c 28 8b 93 a4 01 00 00 48 8b 8b 98 01 00 00 85 d2 74 40 48 8b 74 24 10 8d 7a ff 4c 01 c9 31 d2 4c 01 fe eb 03 4c 89 c2 <44> 0f b6 04 16 44 88 04 11 4c 8d 42 01 48 39 fa 75 eb 8b 93 a4 01 [ 39.092417][ T248] RSP: 0018:ffffb15a005abe90 EFLAGS: 00010246 [ 39.092789][ T248] RAX: 0000000000000000 RBX: ffffa3fdc46d2e00 RCX: ffffb15a02579000 [ 39.093278][ T248] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000002 [ 39.093766][ T248] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 39.094254][ T248] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 [ 39.094742][ T248] R13: ffffa3fdc46d2ee0 R14: 0000000000000000 R15: 0000000000000000 [ 39.095309][ T248] FS: 0000000000000000(0000) GS:ffffa3fdc7800000(0000) knlGS:0000000000000000 [ 39.095974][ T248] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 39.096372][ T248] CR2: 0000000000000000 CR3: 0000000003c92005 CR4: 0000000000360ef0 Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c3df30a01da4955e04fa068c503cd784b31dad92 Author: Navid Emamdoost Date: Sun Nov 10 07:23:38 2019 +0100 media: aspeed-video: Fix memory leaks in aspeed_video_probe In the implementation of aspeed_video_probe() the allocated memory for video should be released if either devm_ioremap_resource() or aspeed_video_init() or aspeed_video_setup_video() fails. Replace kzalloc() with devm_kzalloc to avoid explicit release for video. Fixes: d2b4387f3bdf ("media: platform: Add Aspeed Video Engine driver") Signed-off-by: Navid Emamdoost Reviewed-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 99cf8a7074c4ce3ff3685cd389f54e7bd4bbf510 Author: Pragnesh Patel Date: Sun Nov 10 07:22:46 2019 +0100 media: dt-bindings: Fix building error for dt_binding_check $id doesn't match the actual filename, so update the $id Signed-off-by: Pragnesh Patel Acked-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 40ee7524722836bd5fd40d45f8ee872a41f6ea8e Author: zhong jiang Date: Sun Nov 10 07:22:17 2019 +0100 media: v4l2: Use FIELD_SIZEOF directly It's more clear to use FIELD_SIZEOF instead of its implementation. Signed-off-by: zhong jiang Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7204e062aede46607fe8c63418e3e703443764dd Author: Simon Horman Date: Sun Nov 10 07:21:35 2019 +0100 media: dt-bindings: sh-mobile-ceu: Remove now unimplemented bindings documentation Remove the SH Mobile CEU bindings documentation as the corresponding driver was removed v5.1 by the following commit: 43a445f188e1 ("media: sh_mobile_ceu_camera: remove obsolete soc_camera driver") Signed-off-by: Simon Horman Acked-by: Rob Herring Acked-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7941af9b38fa97f4b800fc7c0a097cc71415df5e Merge: 727b3668b730 afa2642778f3 Author: David S. Miller Date: Sat Nov 9 19:57:20 2019 -0800 Merge branch 'r8169-improve-PHY-configuration' Heiner Kallweit says: ==================== r8169: improve PHY configuration This series adds helpers to improve and simplify the PHY configuration on various network chip versions. ==================== Signed-off-by: David S. Miller commit afa2642778f3cbe99a6c315800c6ed429b6017c8 Author: Heiner Kallweit Date: Sat Nov 9 22:02:30 2019 +0100 r8169: remove rtl8168c_4_hw_phy_config rtl8168c_4_hw_phy_config() duplicates rtl8168c_3_hw_phy_config(), so we can remove the function. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 0721914a3d2bc31b5c6bd4b0c10cecab939b315e Author: Heiner Kallweit Date: Sat Nov 9 22:01:36 2019 +0100 r8169: add helper r8168d_modify_extpage Certain integrated PHY's from RTL8168d support extended pages. On page 0x0007 the number of the extended page is written to register 0x1e, then the registers on the extended page can be accessed. Add a helper for this to improve readability and simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 3a129e3f9ac4fc2f977af1ad8f17ab343a468cc1 Author: Heiner Kallweit Date: Sat Nov 9 22:00:51 2019 +0100 r8169: switch to phylib functions in more places Use the phylib MDIO access functions in more places to simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit b5e189b4f5902ec92dba769fc88ebdef44a68941 Author: Heiner Kallweit Date: Sat Nov 9 22:00:13 2019 +0100 r8169: add helper r8168d_phy_param Integrated PHY's from RTL8168d support an indirect access method for PHY parameters. On page 0x0005 parameter number is written to register 0x05, then the parameter can be accessed via register 0x06. Add a helper for this to improve readability and simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8bfdce1defb1fb62bcc0e4929abd756585dabd0d Author: Heiner Kallweit Date: Sat Nov 9 21:59:43 2019 +0100 r8169: add helper r8168g_phy_param Integrated PHY's from RTL8168g support an indirect access method for PHY parameters. On page 0x0a43 parameter number is written to register 0x13, then the parameter can be accessed via register 0x14. Add a helper for this to improve readability and simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 727b3668b730634228fc65c336c2a7a080e02885 Author: Russell King Date: Fri Nov 8 17:39:29 2019 +0000 net: sfp: rework upstream interface The current upstream interface is an all-or-nothing, which is sub-optimal for future changes, as it doesn't allow the upstream driver to prepare for the SFP module becoming available, as it is at boot. Switch to a find-sfp-bus, add-upstream, del-upstream, put-sfp-bus interface structure instead, which allows the upstream driver to prepare for a module being available as soon as add-upstream is called. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 14684b93019a2d2ece0df5acaf921924541b928d Merge: 92da362c07d4 0058b0a506e4 Author: David S. Miller Date: Sat Nov 9 11:04:37 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net One conflict in the BPF samples Makefile, some fixes in 'net' whilst we were converting over to Makefile.target rules in 'net-next'. Signed-off-by: David S. Miller commit 9cb7831384cefdb91378738b66c7f3e1bfd7e26c Author: Takashi Iwai Date: Mon Nov 4 16:16:57 2019 +0100 staging: most: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191108164528.998-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 67b2945d632328fa0245279e8281e34bf1c78ae2 Author: Takashi Iwai Date: Mon Nov 4 14:36:17 2019 +0100 usb: gadget: u_audio: Remove superfluous snd_dma_continuous_data() The recent change (commit 08422d2c559d: "ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type") made the PCM preallocation helper accepting NULL as the device pointer for the default usage. Drop the snd_dma_continuous_data() usage that became superfluous from the callers. Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191108164214.611-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit fc7af6bc2707e32d73c639d63f1543d890a00db4 Author: Takashi Iwai Date: Fri Nov 8 10:46:41 2019 +0100 ALSA: pcm: Unexport snd_pcm_sgbuf_ops_page The helper is no longer referred after the recent code refactoring. Drop the export for saving some bits and future misuse. Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191108094641.20086-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit e610748ad4388f02a2cd8b3ad051a662c03dbfbc Author: Takashi Iwai Date: Fri Nov 8 10:46:40 2019 +0100 ASoC: cros_ec_codec: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191108094641.20086-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit f541220cd590e4a7436913d6f7d41ff4aba67982 Author: Takashi Iwai Date: Fri Nov 8 10:46:39 2019 +0100 ASoC: rt5677-spi: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Acked-by: Mark Brown Acked-by: Curtis Malainey Link: https://lore.kernel.org/r/20191108094641.20086-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit b01aa131fae9da3c1898baff17176307c0e23e12 Author: Takashi Iwai Date: Fri Nov 8 10:46:38 2019 +0100 ASoC: SOF: Drop superfluous snd_pcm_sgbuf_ops_page snd_pcm_sgbuf_ops_page is no longer needed to be set explicitly to PCM page ops since the recent change in the PCM core (*). Leaving it NULL should work as long as the preallocation has been done properly. This patch drops the redundant lines. (*) 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191108094641.20086-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6420c24a30006e2fdbc292f88d37db56ca28f6e8 Author: Takashi Iwai Date: Fri Nov 8 10:46:37 2019 +0100 ASoC: intel: Avoid non-standard macro usage Pass the device pointer from the PCI pointer directly, instead of a non-standard macro. The macro didn't give any better readability. Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191108094641.20086-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1508f32f1adb220e61d1b7839e35d93ebee89f58 Author: Takashi Iwai Date: Fri Nov 8 10:46:36 2019 +0100 ASoC: intel: Drop superfluous snd_pcm_sgbuf_ops_page snd_pcm_sgbuf_ops_page is no longer needed to be set explicitly to PCM page ops since the recent change in the PCM core (*). Leaving it NULL should work as long as the preallocation has been done properly. This patch drops the redundant lines. (*) 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191108094641.20086-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 26105a6f05709ad7059c91e28005a5c75be24819 Author: Takashi Iwai Date: Fri Nov 8 10:46:35 2019 +0100 ASoC: rt5514-spi: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Since it requires the specific buffer type (SNDRV_DMA_TYPE_VMALLOC), it's set in the pcm_new ops now. Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191108094641.20086-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1a4860325cc740b4ec4b849f31fa694cf8870569 Author: Takashi Iwai Date: Fri Nov 8 10:46:34 2019 +0100 ASoC: Remove superfluous snd_dma_continuous_data() The recent change (commit 08422d2c559d: "ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINOUS type") made the PCM preallocation helper accepting NULL as the device pointer for the default usage. Drop the snd_dma_continuous_data() usage that became superfluous from the callers. Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191108094641.20086-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2406ff9b86aa1b77fe1a6d15f37195ac1fdb2a14 Author: Takashi Iwai Date: Fri Nov 8 17:56:26 2019 +0100 ALSA: pcm: Yet another missing check of non-cached buffer type For non-x86 architectures, SNDRV_DMA_TYPE_DEV_UC should be treated equivalent with SNDRV_DMA_TYPE_DEV, where the default mmap handler still checks only about SNDRV_DMA_TYPE_DEV. Make the check more proper. Note that all existing users of *_UC buffer types are x86-only, so this doesn't fix any bug, but just for consistency. Fixes: 42e748a0b325 ("ALSA: memalloc: Add non-cached buffer type") Link: https://lore.kernel.org/r/20191108165626.5947-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f8710f0357bc36c740782c95f34ea847c75b7498 Author: Lorenzo Bianconi Date: Sun Nov 3 20:47:18 2019 +0100 iio: imu: st_lsm6dsx: express odr in mHZ Express available frequencies in mHZ in order to support even rational ODRs. This patch is need to fix an Android CTS failure Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit fc3f6ad7f5dc6c899fbda0255865737bac88c2e0 Author: Lorenzo Bianconi Date: Sun Oct 27 19:02:30 2019 +0100 iio: imu: st_lsm6dsx: fix ODR check in st_lsm6dsx_write_raw Since st_lsm6dsx i2c master controller relies on accel device as trigger and slave devices can run at different ODRs we must select an accel_odr >= slave_odr. Report real accel ODR in st_lsm6dsx_check_odr() in order to properly set sensor frequency in st_lsm6dsx_write_raw and avoid to report unsupported frequency Fixes: 6ffb55e5009ff ("iio: imu: st_lsm6dsx: introduce ST_LSM6DSX_ID_EXT sensor ids") Signed-off-by: Lorenzo Bianconi Cc: Signed-off-by: Jonathan Cameron commit 59af4e206365d38fe78a94852f1f9c28f4f92c9d Author: Lorenzo Bianconi Date: Sun Nov 3 20:47:17 2019 +0100 iio: imu: st_lsm6dsx: explicitly define odr table size Introduce odr_len in st_lsm6dsx_odr_table_entry data structure in order to explicitly define odr table size and support devices with different odr table map Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit cb7e1b50e4e382c2c63ac0c80260db55c3a3c7ee Author: Fabrice Gasnier Date: Mon Oct 28 17:11:48 2019 +0100 iio: adc: stm32: allow to tune analog clock Add new optional dt property to tune analog clock prescaler. Driver looks for optional "st,max-clk-rate-hz", then computes best approximation below that rate, using ADC internal prescaler. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit a1acbc223a0c000edc5353f0710d0001772c158d Author: Fabrice Gasnier Date: Mon Oct 28 17:11:47 2019 +0100 dt-bindings: iio: stm32-adc: add max clock rate property Add optional dt property to tune maximum desired analog clock rate. Signed-off-by: Fabrice Gasnier Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 2969c51e3a201799228f03b2838f750aaca8d104 Author: Jonathan Cameron Date: Sun Oct 13 18:17:32 2019 +0100 iio: dac: vf610: Use devm_platform_ioremap_resource Reduce local boilerplate. Suggested by coccinelle CHECK drivers/iio/dac/vf610_dac.c drivers/iio/dac/vf610_dac.c:189:1-11: WARNING: Use devm_platform_ioremap_resource for info -> regs Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Sanchayan Maity commit 29ec12e29f7f6f31f0b5b8271b0a678b08e82ec1 Author: Jonathan Cameron Date: Sun Oct 13 18:14:14 2019 +0100 iio: dac: lpc18xx: Use devm_platform_ioremap_resource Reduce boilerplate. Suggested by coccinelle CHECK drivers/iio/dac/lpc18xx_dac.c drivers/iio/dac/lpc18xx_dac.c:121:1-10: WARNING: Use devm_platform_ioremap_resource for dac -> base Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean CC: Joachim Eastwood commit afac22e3cf9598df1ab02973f0ea70de098250da Author: Jonathan Cameron Date: Sun Oct 13 17:43:49 2019 +0100 iio: adc: vf610: use devm_platform_ioremap_resource Reduces boilerplate. Suggested by coccinelle CHECK drivers/iio/adc/vf610_adc.c drivers/iio/adc/vf610_adc.c:819:1-11: WARNING: Use devm_platform_ioremap_resource for info -> regs Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Fugang Duan commit e8ad78658ecc97c7f5b6d70fc5266bc19c3bbf29 Author: Jonathan Cameron Date: Sun Oct 13 16:52:39 2019 +0100 iio: adc: spear_adc: Use devm_platform_ioremap_resource Avoids local boilerplate doing the same thing. Suggested by coccinelle CHECK drivers/iio/adc/spear_adc.c drivers/iio/adc/spear_adc.c:283:1-22: WARNING: Use devm_platform_ioremap_resource for st -> adc_base_spear6xx Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean commit 6c78cc9c4a530af6c617a7c14b5518c10bc6eadf Author: Jonathan Cameron Date: Sun Oct 13 16:48:32 2019 +0100 iio: adc: rcar-gyroadc: use devm_platform_ioremap_resource Avoids some local boilerplate. Suggested by coccinelle. CHECK drivers/iio/adc/rcar-gyroadc.c drivers/iio/adc/rcar-gyroadc.c:495:1-11: WARNING: Use devm_platform_ioremap_resource for priv -> regs Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Marek Vasut commit 08cf48c7fa0b2fee2ad547e42580a9a1904061f6 Author: Jonathan Cameron Date: Sun Oct 13 16:44:27 2019 +0100 iio: adc: npcm: use devm_platform_ioremap_resource Reduces local boilerplate code. Suggested by coccinelle via coccicheck. CHECK drivers/iio/adc/npcm_adc.c drivers/iio/adc/npcm_adc.c:200:1-11: WARNING: Use devm_platform_ioremap_resource for info -> regs Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Tomer Maimon commit 18d031f46e9c2d9315d8eb383472f9e7b2239cbd Author: Jonathan Cameron Date: Sun Oct 13 16:32:34 2019 +0100 iio: adc: lpc18xx: use devm_platform_ioremap_resource Avoid local boilerplate. Identified by coccinelle CHECK drivers/iio/adc/lpc18xx_adc.c drivers/iio/adc/lpc18xx_adc.c:137:1-10: WARNING: Use devm_platform_ioremap_resource for adc -> base Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Joachim Eastwood commit f449aa3edd6536d03ee1ec4a4fe68c7554baf1e1 Author: Jonathan Cameron Date: Sun Oct 13 16:27:16 2019 +0100 iio: adc: ingenic: Use devm_platform_ioremap_resource Replaces local boilerplate. Identified by coccinelle. CHECK drivers/iio/adc/ingenic-adc.c drivers/iio/adc/ingenic-adc.c:449:1-10: WARNING: Use devm_platform_ioremap_resource for adc -> base Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Artur Rojek commit a61ead03a6f2768d501be08d7f5efd7fb3e71555 Merge: bce92136c28f 2e8c4ad1f044 Author: Greg Kroah-Hartman Date: Sat Nov 9 13:18:25 2019 +0100 Merge tag 'soundwire-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for v5.5-rc1 This round we have bunch of core and Intel driver updates spearheaded by Pierre Details - Update unique id checks in core and ACPI helpers - Improvements to to Intel driver and cadence lib * tag 'soundwire-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: ignore uniqueID when irrelevant soundwire: slave: add helper to extract slave ID soundwire: remove bitfield for unique_id, use u8 soundwire: intel: fix PDI/stream mapping for Bulk soundwire: cadence_master: make clock stop exit configurable on init soundwire: intel/cadence: add flag for interrupt enable soundwire: intel: add helper for initialization soundwire: cadence_master: add hw_reset capability in debugfs soundwire: intel/cadence: fix startup sequence soundwire: intel: use correct header for io calls soundwire: cadence_master: improve PDI allocation soundwire: intel: don't filter out PDI0/1 soundwire: cadence/intel: simplify PDI/port mapping soundwire: intel: remove playback/capture stream_name soundwire: remove DAI_ID_RANGE definitions soundwire: intel: remove X86 dependency soundwire: intel: add missing headers for cross-compilation commit 46e55d065394ded9c4dd5b2396a07e5810185024 Author: Jonathan Cameron Date: Sun Oct 13 13:25:12 2019 +0100 iio: adc: cc10001: use devm_platform_ioremap_resource Reduces local boilerplate. Found by coccinelle: drivers/iio/adc/cc10001_adc.c:344:1-18: WARNING: Use devm_platform_ioremap_resource for adc_dev -> reg_base Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Naidu Tellapati commit f2d025d3f237686b1b20c323847ce6b368302b2a Author: Jonathan Cameron Date: Sun Oct 13 13:18:56 2019 +0100 iio: adc: bcm_iproc_adc: drop a stray semicolon Found by coccinelle / coccicheck CHECK drivers/iio/adc/bcm_iproc_adc.c drivers/iio/adc/bcm_iproc_adc.c:311:3-4: Unneeded semicolon Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Raveendra Padasalagi commit 38877a376adf5d11c56bacd4b953050931c1bd0a Author: Jonathan Cameron Date: Sun Oct 13 13:15:38 2019 +0100 iio: adc: mt6577_auxdac: use devm_platform_ioremap_resource Reduces boilerplate. Identified by coccinelle CHECK drivers/iio/adc/mt6577_auxadc.c drivers/iio/adc/mt6577_auxadc.c:257:1-18: WARNING: Use devm_platform_ioremap_resource for adc_dev -> reg_base Signed-off-by: Jonathan Cameron Cc: Zhiyong Tao Reviewed-by: Alexandru Ardelean commit d19aeb295154ae749ca8236b6b69c41c7a7b3891 Author: Jonathan Cameron Date: Sun Oct 13 12:37:05 2019 +0100 iio: adc: aspeed: use devm_platform_ioremap_resource Reduces boilerplate. Identified by: Coccinelle / coccicheck CHECK drivers/iio/adc/aspeed_adc.c drivers/iio/adc/aspeed_adc.c:189:1-11: WARNING: Use devm_platform_ioremap_resource for data -> base Signed-off-by: Jonathan Cameron Cc: Rick Altherr Reviewed-by: Alexandru Ardelean commit 2e8c4ad1f04413a4a67ef10746a7566007d2ed55 Author: Pierre-Louis Bossart Date: Tue Oct 22 18:48:08 2019 -0500 soundwire: ignore uniqueID when irrelevant The uniqueID is useful when there are two or more devices of the same type (identical manufacturer ID, part ID) on the same link. When there is a single device of a given type on a link, its uniqueID is irrelevant. It's not uncommon on actual platforms to see variations of the uniqueID, or differences between devID registers and ACPI _ADR fields. This patch suggests a filter on startup to identify 'single' devices and tag them accordingly. The uniqueID is then not used for the probe, and the device name omits the uniqueID as well. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022234808.17432-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit de5b174b3bc8b8fa4921a7d6bd4b2e646120640d Author: Pierre-Louis Bossart Date: Tue Oct 22 18:48:07 2019 -0500 soundwire: slave: add helper to extract slave ID Simplify the loop with a helper. The only functionality change is that we continue the loop even with an ACPI error. Follow-up patches will build on this change. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022234808.17432-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 5bd54539788b3b3a415e84204cc89f918658d56d Author: Pierre-Louis Bossart Date: Tue Oct 22 18:48:06 2019 -0500 soundwire: remove bitfield for unique_id, use u8 There is no good reason why the unique_id needs to be stored as 4 bits. The code will work without changes with a u8 since all values are already filtered while parsing the ACPI tables and Slave devID registers. Use u8 representation. This will allow us to encode a "IGNORE_UNIQUE_ID" value to account for firmware/BIOS creativity. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022234808.17432-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit c134f914e9f55b7817e2bae625ec0e5f1379f7cd Author: Pierre-Louis Bossart Date: Tue Oct 22 18:29:48 2019 -0500 soundwire: intel: fix PDI/stream mapping for Bulk The previous formula is incorrect for PDI0/1, the mapping is not linear but has a discontinuity between PDI1 and PDI2. This change has no effect on PCM PDIs (same mapping). Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022232948.17156-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit b52517e456f8bb6ae720feab891af6d5b8a8f217 Author: Geert Uytterhoeven Date: Fri Oct 25 11:41:26 2019 +0200 net: caif: Fix debugfs on 64-bit platforms "ser_device.state" is "unsigned long", i.e. 32-bit or 64-bit, depending on the platform. Hence casting its address to "u32 *", and calling debugfs_create_x32() breaks operation on 64-bit platforms. Fix this by using the new debugfs_create_xul() helper instead. Fixes: 9b27105b4a44c54b ("net-caif-driver: add CAIF serial driver (ldisc)") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191025094130.26033-4-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 0628cda318df6baec439ca6e6e274007492f1ccd Author: Geert Uytterhoeven Date: Fri Oct 25 11:41:25 2019 +0200 mac80211: Use debugfs_create_xul() helper Use the new debugfs_create_xul() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Acked-by: Johannes Berg Link: https://lore.kernel.org/r/20191025094130.26033-3-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit d0dd61a2774fa50304eccfb2b8d67265b29f3bd8 Author: Greg Kroah-Hartman Date: Thu Nov 7 09:52:38 2019 +0100 media: c8sectpfe: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Mauro Carvalho Chehab Cc: linux-arm-kernel@lists.infradead.org Cc: linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Patrice Chotard Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191107085238.GA1285658@kroah.com Signed-off-by: Greg Kroah-Hartman commit 977b1ce7c117905b3138dc727ed25f8af2ba2902 Author: Robert Richter Date: Wed Nov 6 09:33:04 2019 +0000 EDAC: Remove EDAC_DIMM_OFF() macro The EDAC_DIMM_OFF() macro takes 5 arguments to get the DIMM's index. Simplify this by storing the index in struct dimm_info to avoid its calculation and remove the EDAC_DIMM_OFF() macro. The index can be directly used then. Another advantage is that edac_mc_alloc() could be used even if the exact size of the layers is unknown. Only the number of DIMMs would be needed. Rename iterator variable to idx, while at it. The name is more handy, esp. when searching for it in the code. Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-3-rrichter@marvell.com commit bc9ad9e40dbc4c8874e806345df393a9cfeadad3 Author: Robert Richter Date: Wed Nov 6 09:33:02 2019 +0000 EDAC: Replace EDAC_DIMM_PTR() macro with edac_get_dimm() function The EDAC_DIMM_PTR() macro takes 3 arguments from struct mem_ctl_info. Clean up this interface to only pass the mci struct and replace this macro with a new function edac_get_dimm(). Also introduce an edac_get_dimm_by_index() function for later use. This allows it to get a DIMM pointer only by a given index. This can be useful if the DIMM's position within the layers of the memory controller or the exact size of the layers are unknown. Small style changes made for some hunks after applying the semantic patch. Semantic patch used: @@ expression mci, a, b,c; @@ -EDAC_DIMM_PTR(mci->layers, mci->dimms, mci->n_layers, a, b, c) +edac_get_dimm(mci, a, b, c) [ bp: Touchups. ] Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Jason Baron Cc: Qiuxu Zhuo Cc: Tero Kristo Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106093239.25517-2-rrichter@marvell.com commit c15995695ea971253ea9507f6732c8cd35384e01 Author: Sergei Shtylyov Date: Thu Oct 31 23:39:39 2019 +0300 mtd: cfi_cmdset_0002: fix delayed error detection on HyperFlash The commit 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") added checking for the status register error bits into chip_good() to only return 1 if these bits are 0s. Unfortunately, this means that polling using chip_good() always reaches a timeout condition when erase or program failure bits are set. Let's fully delegate the task of determining the error conditions to cfi_check_err_status() and make chip_good() only look for the Device Ready/Busy condition. Fixes: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") Signed-off-by: Sergei Shtylyov Signed-off-by: Vignesh Raghavendra commit 72914a8cff7e1d910c58e125e15a0da409e3135f Author: Sergei Shtylyov Date: Thu Oct 31 23:37:27 2019 +0300 mtd: cfi_cmdset_0002: only check errors when ready in cfi_check_err_status() Cypress S26K{L|S}P{128|256|512}S datasheet says that the error bits in the status register are only valid when the "device ready" bit 7 is set. Add the check for the device ready bit in cfi_check_err_status() as that function isn't always called with this bit set. Fixes: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") Signed-off-by: Sergei Shtylyov Signed-off-by: Vignesh Raghavendra commit 03976af89e3bd9489d542582a325892e6a8cacc0 Author: Hou Tao Date: Tue Oct 8 10:36:37 2019 +0800 mtd: cfi_cmdset_0002: don't free cfi->cfiq in error path of cfi_amdstd_setup() Else there may be a double-free problem, because cfi->cfiq will be freed by mtd_do_chip_probe() if both the two invocations of check_cmd_set() return failure. Signed-off-by: Hou Tao Reviewed-by: Richard Weinberger Signed-off-by: Vignesh Raghavendra commit ea4f51356fd986124beeab8e21b048dfe06d67e7 Author: Sergei Shtylyov Date: Thu Oct 3 23:27:39 2019 +0300 mtd: cfi_cmdset_*: kill useless 'ret' variable initializers The 'ret' local variables are typically initialized to 0 but this value is often unused, thus we can kill those initializers. Signed-off-by: Sergei Shtylyov Signed-off-by: Vignesh Raghavendra commit d532c28b8c151cdb5b50280801c748ac4d93d563 Author: Sergei Shtylyov Date: Fri Sep 27 23:22:32 2019 +0300 mtd: cfi_util: use DIV_ROUND_UP() in cfi_udelay() Use DIV_ROUND_UP() in cfi_udelay() instead of open-coding it... Doing this also helpfully gets rid of two complaints from 'scripts/checkpatch.pl --strict': CHECK: spaces preferred around that '+' (ctx:VxV) #29: FILE: drivers/mtd/chips/cfi_util.c:29: + msleep((us+999)/1000); ^ CHECK: spaces preferred around that '/' (ctx:VxV) #29: FILE: drivers/mtd/chips/cfi_util.c:29: + msleep((us+999)/1000); ^ Signed-off-by: Sergei Shtylyov Signed-off-by: Vignesh Raghavendra commit 7fdfee926be74dbde254308fd538310f11f6314b Author: Borislav Petkov Date: Sat Nov 9 10:00:54 2019 +0100 EDAC/amd64: Get rid of the ECC disabled long message This message keeps flooding dmesg on boxes where ECC is disabled or the DIMMs do not support ECC but the module gets auto-probed. What's even worse is that autoprobing happens on every CPU due to the CPU-family matching the driver does and uevent being generated for each CPU device. What is more, this message is becoming even more useless on newer systems where forcing ECC is not recommended and it should be done in the BIOS so the BIOS can do all the necessary work, i.e., just setting a bit in an MSR is not enough anymore. So get rid of it. Signed-off-by: Borislav Petkov Cc: Yazen Ghannam Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20191106160607.GC28380@zn.tnic commit 6555431ba2c58ac3a2fccde2b92607437577cc8f Author: Clément Péron Date: Sun Oct 27 21:07:38 2019 +0100 media: arm64: dts: allwinner: beelink-gs1: Add rc-beelink-gs1 keymap Beelink GS1 ships with a NEC remote control. Add the rc keymap to the device-tree. Signed-off-by: Clément Péron Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 4f0fac3b1aa5f356e0625f7d767ec71e1c198a73 Author: Clément Péron Date: Sun Oct 27 21:07:37 2019 +0100 media: rc: add keymap for Beelink GS1 remote control Beelink GS1 Andoid TV Box ships with a simple NEC remote. Signed-off-by: Clément Péron Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 130ec3dfa5b8f34d29a0b3adf2dfeaebf7627cab Author: Jan Pieter van Woerkom Date: Tue Oct 22 14:07:37 2019 +0200 media: dvbsky: remove unused code remove unused code Signed-off-by: Jan Pieter van Woerkom Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 74a96b51a36de4d86660fbc56b05d86668162d6b Author: Colin Ian King Date: Fri Oct 25 15:33:39 2019 +0200 media: flexcop-usb: ensure -EIO is returned on error condition An earlier commit hard coded a return 0 to function flexcop_usb_i2c_req even though the an -EIO was intended to be returned in the case where ret != buflen. Fix this by replacing the return 0 with the return of ret to return the error return code. Addresses-Coverity: ("Unused value") Fixes: b430eaba0be5 ("[media] flexcop-usb: don't use stack for DMA") Signed-off-by: Colin Ian King Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 1b976fc6d684e3282914cdbe7a8d68fdce19095c Author: Oliver Neukum Date: Tue Jul 30 09:48:27 2019 +0200 media: b2c2-flexcop-usb: add sanity checking The driver needs an isochronous endpoint to be present. It will oops in its absence. Add checking for it. Reported-by: syzbot+d93dff37e6a89431c158@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d52741728a518afe536d22dc6e9b60193c5fa942 Author: Philipp Zabel Date: Wed Nov 6 12:38:36 2019 +0100 media: coda: drop unused irqlock The irqlock spinlock has been unused from the start. Remove it. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7f404ae9cf2a285f73b3c18ab9303d54b7a3d8e1 Author: Mike Isely Date: Wed Nov 6 12:11:14 2019 +0100 media: pvrusb2: Fix oops on tear-down when radio support is not present In some device configurations there's no radio or radio support in the driver. That's OK, as the driver sets itself up accordingly. However on tear-down in these caes it's still trying to tear down radio related context when there isn't anything there, leading to dereferences through a null pointer and chaos follows. How this bug survived unfixed for 11 years in the pvrusb2 driver is a mystery to me. [hverkuil: fix two checkpatch warnings] Signed-off-by: Mike Isely Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 44c77cd9e1a8c1d271d88c8ff3ee2ad1411d78f0 Author: Neil Armstrong Date: Wed Nov 6 11:49:35 2019 +0100 media: MAINTAINERS: ao-cec: Update path for yaml bindings Update the path to the ao-cec bindings after conversion to DT Schemas. Suggested-by: Hans Verkuil Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4adc0423de92cf850d1ef5c0e7cb28fd7a38219e Author: Arnd Bergmann Date: Wed Nov 6 10:06:54 2019 +0100 media: venus: remove invalid compat_ioctl32 handler v4l2_compat_ioctl32() is the function that calls into v4l2_file_operations->compat_ioctl32(), so setting that back to the same function leads to a trivial endless loop, followed by a kernel stack overrun. Remove the incorrect assignment. Cc: stable@vger.kernel.org Fixes: 7472c1c69138 ("[media] media: venus: vdec: add video decoder files") Fixes: aaaa93eda64b ("[media] media: venus: venc: add video encoder files") Signed-off-by: Arnd Bergmann Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1076df3a77b490d33429560a9e0603b3673223e2 Author: Jernej Skrabec Date: Wed Nov 6 08:02:53 2019 +0100 media: v4l2-mem2mem: Fix hold buf flag checks Hold buf flag is set on output queue, not capture. Fix that. Fixes: f07602ac3887 ("media: v4l2-mem2mem: add new_frame detection") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3ea35d5db448c27807acbcc7a2306cf65c5e6397 Author: Dafna Hirschfeld Date: Tue Nov 5 18:53:17 2019 +0100 media: vimc: sen: remove unused kthread_sen field The field kthread_sen in the vimc_sen_device is not set and used. So remove the field and the code that check if it is non NULL Signed-off-by: Dafna Hirschfeld Cc: # for v5.4 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 58c93a548b0248fad6437f8c8921f9b031c3892a Author: Francois Buergisser Date: Tue Oct 29 02:24:48 2019 +0100 media: hantro: Fix picture order count table enable The picture order count table only makes sense for profiles higher than Baseline. This is confirmed by the H.264 specification (See 8.2.1 Decoding process for picture order count), which clarifies how POC are used for features not present in Baseline. """ Picture order counts are used to determine initial picture orderings for reference pictures in the decoding of B slices, to represent picture order differences between frames or fields for motion vector derivation in temporal direct mode, for implicit mode weighted prediction in B slices, and for decoder conformance checking. """ As a side note, this change matches various vendors downstream codebases, including ChromiumOS and IMX VPU libraries. Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1") Signed-off-by: Francois Buergisser Signed-off-by: Ezequiel Garcia Signed-off-by: Jonas Karlman Reviewed-by: Boris Brezillon Tested-by: Boris Brezillon Cc: # for v5.4 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 658f9d9921d7e76af03f689b5f0ffde042b8bf5b Author: Francois Buergisser Date: Tue Oct 29 02:24:47 2019 +0100 media: hantro: Fix motion vectors usage condition The setting of the motion vectors usage and the setting of motion vectors address are currently done under different conditions. When decoding pre-recorded videos, this results of leaving the motion vectors address unset, resulting in faulty memory accesses. Fix it by using the same condition everywhere, which matches the profiles that support motion vectors. Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1") Signed-off-by: Francois Buergisser Signed-off-by: Ezequiel Garcia Signed-off-by: Jonas Karlman Reviewed-by: Boris Brezillon Tested-by: Boris Brezillon Cc: # for v5.4 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit edeb237884d6c3158387528b0490e98fb9bb5e8d Author: Jonas Karlman Date: Tue Oct 29 02:24:47 2019 +0100 media: hantro: Fix H264 max frmsize supported on RK3288 TRM specify supported image size 48x48 to 4096x2304 at step size 16 pixels, change frmsize max_width/max_height to match TRM at [1]. This patch makes it possible to decode the 4096x2304 sample at [2]. [1] http://www.t-firefly.com/download/firefly-rk3288/docs/TRM/rk3288-chapter-25-video-encoder-decoder-unit-(vcodec).pdf [2] https://4ksamples.com/puppies-bath-in-4k/ Fixes: 760327930e10 ("media: hantro: Enable H264 decoding on rk3288") Signed-off-by: Jonas Karlman Reviewed-by: Boris Brezillon Tested-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e17f08e3166635d2eaa6a894afeb28ca651ddd35 Author: Jonas Karlman Date: Tue Oct 29 01:00:53 2019 +0100 media: hantro: Do not reorder H264 scaling list Scaling list supplied from userspace should be in matrix order and can be used without applying the inverse scanning process. The HW also only support 8x8 scaling list for the Y component, indices 0 and 1 in the scaling list supplied from userspace. Remove reordering and write the scaling matrix in an order expected by the VPU, also only allocate memory for the two 8x8 lists supported. Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding") Signed-off-by: Jonas Karlman Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a6b8feae7c88343212686120740cf7551dd16e08 Author: Jonas Karlman Date: Tue Oct 29 01:00:52 2019 +0100 media: cedrus: Use correct H264 8x8 scaling list Documentation now defines the expected order of scaling lists, change to use correct indices. Fixes: 6eb9b758e307 ("media: cedrus: Add H264 decoding support") Signed-off-by: Jonas Karlman Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0b0393d59eb4a58456d128a782c42f924eedab16 Author: Jonas Karlman Date: Tue Oct 29 01:00:51 2019 +0100 media: uapi: h264: clarify expected scaling_list_4x4/8x8 order Clarify that the expected order of scaling lists should follow the order they are listed in the H264 standard. The expected scaling list order, for 4x4: Intra Y, Intra Cb, Intra Cr, Inter Y, Inter Cb, Inter Cr, for 8x8: Intra Y, Inter Y, Intra Cb, Inter Cb, Intra Cr, Inter Cr. Also clarify that the values in a scaling list should be in matrix order, the same value order that vaapi, vdpau and nvdec use. Signed-off-by: Jonas Karlman Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1fd50a2c294457508f06b8b631d01a58de81cdd2 Author: Jernej Skrabec Date: Sat Oct 26 09:27:52 2019 +0200 media: cedrus: Use helpers to access capture queue Accessing capture queue structue directly is not safe. Use helpers for that. Acked-by: Paul Kocialkowski Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 61ad123318c28679b8846baab0df9240c29c21c9 Author: Jernej Skrabec Date: Sat Oct 26 09:27:51 2019 +0200 media: cedrus: Fix decoding for some H264 videos It seems that for some H264 videos at least one bitstream parsing trigger must be called in order to be decoded correctly. There is no explanation why this helps, but it was observed that two sample videos with this fix are now decoded correctly and there is no regression with others. Acked-by: Paul Kocialkowski Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6b81141deb7358dbd64ce3e793cd1e3f5939f807 Author: Matthew Wilcox (Oracle) Date: Fri Nov 8 23:45:56 2019 -0500 XArray: Improve documentation of search marks Move most of the mark-related documentation to its own section to make it easier to understand. Add clarification that you can't search for an unset mark, and you can't yet search for combinations of marks. Signed-off-by: Matthew Wilcox (Oracle) commit 82a22311b7a68a78709699dc8c098953b70e4fd2 Author: Matthew Wilcox (Oracle) Date: Thu Nov 7 22:49:11 2019 -0500 XArray: Fix xas_pause at ULONG_MAX If we were unlucky enough to call xas_pause() when the index was at ULONG_MAX (or a multi-slot entry which ends at ULONG_MAX), we would wrap the index back around to 0 and restart the iteration from the beginning. Use the XAS_BOUNDS state to indicate that we should just stop the iteration. Signed-off-by: Matthew Wilcox (Oracle) commit 451d1dc886b548d6e18c933adca326c1307023c9 Author: Daniel T. Lee Date: Thu Nov 7 09:51:53 2019 +0900 samples: bpf: update map definition to new syntax BTF-defined map Since, the new syntax of BTF-defined map has been introduced, the syntax for using maps under samples directory are mixed up. For example, some are already using the new syntax, and some are using existing syntax by calling them as 'legacy'. As stated at commit abd29c931459 ("libbpf: allow specifying map definitions using BTF"), the BTF-defined map has more compatablility with extending supported map definition features. The commit doesn't replace all of the map to new BTF-defined map, because some of the samples still use bpf_load instead of libbpf, which can't properly create BTF-defined map. This will only updates the samples which uses libbpf API for loading bpf program. (ex. bpf_prog_load_xattr) Signed-off-by: Daniel T. Lee Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit afbe3c27d9ae151be33ccd6b05699d3c49dabad2 Author: Daniel T. Lee Date: Thu Nov 7 09:51:52 2019 +0900 samples: bpf: Update outdated error message Currently, under samples, several methods are being used to load bpf program. Since using libbpf is preferred solution, lots of previously used 'load_bpf_file' from bpf_load are replaced with 'bpf_prog_load_xattr' from libbpf. But some of the error messages still show up as 'load_bpf_file' instead of 'bpf_prog_load_xattr'. This commit fixes outdated errror messages under samples and fixes some code style issues. Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191107005153.31541-2-danieltimlee@gmail.com commit 0eccce866f84db2cd23e1f28737920aa7b9e70d7 Author: Damien Le Moal Date: Fri Nov 8 17:29:01 2019 +0900 scsi: target: tcmu: Prevent memory reclaim recursion Prevent recursion into the IO path under low memory conditions by using GFP_NOIO in place of GFP_KERNEL when allocating a new command with tcmu_alloc_cmd() and user ring space with tcmu_get_empty_block(). Link: https://lore.kernel.org/r/20191108082901.417950-1-damien.lemoal@wdc.com Reported-by: Masato Suzuki Signed-off-by: Damien Le Moal Acked-by: Mike Christie Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 9237f04e12cc385334043cd7cf84b74dcbda0256 Author: Damien Le Moal Date: Wed Oct 30 18:08:47 2019 +0900 scsi: core: Fix scsi_get/set_resid() interface struct scsi_cmnd cmd->req.resid_len which is returned and set respectively by the helper functions scsi_get_resid() and scsi_set_resid() is an unsigned int. Reflect this fact in the interface of these helper functions. Also fix compilation errors due to min() and max() type mismatch introduced by this change in scsi debug code, usb transport code and in the USB ENE card reader driver. Link: https://lore.kernel.org/r/20191030090847.25650-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 61951a6d3153b4482404b739be921a7459f8dc12 Author: Bart Van Assche Date: Fri Nov 8 14:59:47 2019 -0800 scsi: lpfc: Fix lpfc_cpumask_of_node_init() Fix the following kernel warning: cpumask_of_node(-1): (unsigned)node >= nr_node_ids(1) Fixes: dcaa21367938 ("scsi: lpfc: Change default IRQ model on AMD architectures") Link: https://lore.kernel.org/r/20191108225947.1395-1-jsmart2021@gmail.com Signed-off-by: Bart Van Assche Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit eea2d396aa57acb3607f79ef04c08c2c5166f3fa Author: Bart Van Assche Date: Wed Nov 6 21:21:56 2019 -0800 scsi: lpfc: Fix a kernel warning triggered by lpfc_sli4_enable_intr() Fix the following lockdep warning: ============================================ WARNING: possible recursive locking detected 5.4.0-rc6-dbg+ #2 Not tainted -------------------------------------------- systemd-udevd/130 is trying to acquire lock: ffffffff826b05d0 (cpu_hotplug_lock.rw_sem){++++}, at: irq_calc_affinity_vectors+0x63/0x90 but task is already holding lock: ffffffff826b05d0 (cpu_hotplug_lock.rw_sem){++++}, at: lpfc_sli4_enable_intr+0x422/0xd50 [lpfc] other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(cpu_hotplug_lock.rw_sem); lock(cpu_hotplug_lock.rw_sem); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by systemd-udevd/130: #0: ffff8880d53fe210 (&dev->mutex){....}, at: __device_driver_lock+0x4a/0x70 #1: ffffffff826b05d0 (cpu_hotplug_lock.rw_sem){++++}, at: lpfc_sli4_enable_intr+0x422/0xd50 [lpfc] stack backtrace: CPU: 1 PID: 130 Comm: systemd-udevd Not tainted 5.4.0-rc6-dbg+ #2 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 Call Trace: dump_stack+0xa5/0xe6 __lock_acquire.cold+0xf7/0x23a lock_acquire+0x106/0x240 cpus_read_lock+0x41/0xe0 irq_calc_affinity_vectors+0x63/0x90 __pci_enable_msix_range+0x10a/0x950 pci_alloc_irq_vectors_affinity+0x144/0x210 lpfc_sli4_enable_intr+0x4b2/0xd50 [lpfc] lpfc_pci_probe_one+0x1411/0x22b0 [lpfc] local_pci_probe+0x7c/0xc0 pci_device_probe+0x25d/0x390 really_probe+0x170/0x510 driver_probe_device+0x127/0x190 device_driver_attach+0x98/0xa0 __driver_attach+0xb6/0x1a0 bus_for_each_dev+0x100/0x150 driver_attach+0x31/0x40 bus_add_driver+0x246/0x300 driver_register+0xe0/0x170 __pci_register_driver+0xde/0xf0 lpfc_init+0x134/0x1000 [lpfc] do_one_initcall+0xda/0x47e do_init_module+0x10a/0x3b0 load_module+0x4318/0x47c0 __do_sys_finit_module+0x134/0x1d0 __x64_sys_finit_module+0x47/0x50 do_syscall_64+0x6f/0x2e0 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: dcaa21367938 ("scsi: lpfc: Change default IRQ model on AMD architectures") Link: https://lore.kernel.org/r/20191107052158.25788-4-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: James Smart Signed-off-by: Martin K. Petersen commit 765ab6cdac3b681952da0e22184bf6cf1ae41cf8 Author: Bart Van Assche Date: Wed Nov 6 21:21:54 2019 -0800 scsi: lpfc: Fix a kernel warning triggered by lpfc_get_sgl_per_hdwq() Fix the following kernel bug report: BUG: using smp_processor_id() in preemptible [00000000] code: systemd-udevd/954 Fixes: d79c9e9d4b3d ("scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware.") Link: https://lore.kernel.org/r/20191107052158.25788-2-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: James Smart Signed-off-by: Martin K. Petersen commit 7d250a062f75e6ee8368b64ac6ff1e09fbb6783d Author: Balakrishna Godavarthi Date: Wed Nov 6 15:18:32 2019 +0530 Bluetooth: hci_qca: Add support for Qualcomm Bluetooth SoC WCN3991 This patch add support for WCN3991 i.e. current values and fw download support. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit e303d124b70920ef86b26d792d8b959166a28f6e Author: Balakrishna Godavarthi Date: Wed Nov 6 15:18:31 2019 +0530 Bluetooth: btqca: Rename ROME specific variables to generic variables Variables which are named with rome are commonly used for all the BT SoC's. Instead of continuing further, renamed them to generic name. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit a10c8803d0dbab54370eeac2a07e6540c6215908 Author: Martin Wilck Date: Thu Nov 7 22:48:57 2019 +0000 scsi: qla2xxx: don't use zero for FC4_PRIORITY_NVME Avoid an uninitialized value (0) for ha->fc4_type_priority being falsely interpreted as NVMe priority. Not strictly needed any more after the previous patch, but makes the fc4_type_priority handling more explicit. Link: https://lore.kernel.org/r/20191107224839.32417-3-martin.wilck@suse.com Tested-by: David Bond Acked-by: Himanshu Madhani Reviewed-by: Bart Van Assche Signed-off-by: Martin Wilck Signed-off-by: Martin K. Petersen commit f5a2b219a7897751f9bb1c8d7308933e33000f2f Author: Martin Wilck Date: Thu Nov 7 22:48:55 2019 +0000 scsi: qla2xxx: initialize fc4_type_priority ha->fc4_type_priority is currently initialized only in qla81xx_nvram_config(). That makes it default to NVMe for other adapters. Fix it. Fixes: 84ed362ac40c ("scsi: qla2xxx: Dual FCP-NVMe target port support") Link: https://lore.kernel.org/r/20191107224839.32417-2-martin.wilck@suse.com Tested-by: David Bond Acked-by: Himanshu Madhani Reviewed-by: Bart Van Assche Signed-off-by: Martin Wilck Signed-off-by: Martin K. Petersen commit 162b805e38327135168cb0938bd37b131b481cb0 Author: Bart Van Assche Date: Tue Nov 5 20:42:26 2019 -0800 scsi: qla2xxx: Fix a dma_pool_free() call This patch fixes the following kernel warning: DMA-API: qla2xxx 0000:00:0a.0: device driver frees DMA memory with different size [device address=0x00000000c7b60000] [map size=4088 bytes] [unmap size=512 bytes] WARNING: CPU: 3 PID: 1122 at kernel/dma/debug.c:1021 check_unmap+0x4d0/0xbd0 CPU: 3 PID: 1122 Comm: rmmod Tainted: G O 5.4.0-rc1-dbg+ #1 RIP: 0010:check_unmap+0x4d0/0xbd0 Call Trace: debug_dma_free_coherent+0x123/0x173 dma_free_attrs+0x76/0xe0 qla2x00_mem_free+0x329/0xc40 [qla2xxx_scst] qla2x00_free_device+0x170/0x1c0 [qla2xxx_scst] qla2x00_remove_one+0x4f0/0x6d0 [qla2xxx_scst] pci_device_remove+0xd5/0x1f0 device_release_driver_internal+0x159/0x280 driver_detach+0x8b/0xf2 bus_remove_driver+0x9a/0x15a driver_unregister+0x51/0x70 pci_unregister_driver+0x2d/0x130 qla2x00_module_exit+0x1c/0xbc [qla2xxx_scst] __x64_sys_delete_module+0x22a/0x300 do_syscall_64+0x6f/0x2e0 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 3f006ac342c0 ("scsi: qla2xxx: Secure flash update support for ISP28XX") # v5.2-rc1~130^2~270. Cc: Michael Hernandez Cc: Himanshu Madhani Link: https://lore.kernel.org/r/20191106044226.5207-3-bvanassche@acm.org Reviewed-by: Martin Wilck Acked-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 47140a20a8198192af9957dc8bb8f7c8e578b5a9 Author: Bart Van Assche Date: Tue Nov 5 20:42:25 2019 -0800 scsi: qla2xxx: Remove an include directive Since the code in qla_init.c is initiator code, remove the SCSI target core include directive. Cc: Himanshu Madhani Link: https://lore.kernel.org/r/20191106044226.5207-2-bvanassche@acm.org Reviewed-by: Martin Wilck Acked-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit b3f74568411b2df0806e0d1df6458cb270eb29ce Author: Himanshu Madhani Date: Tue Nov 5 07:06:57 2019 -0800 scsi: qla2xxx: Update driver version to 10.01.00.21-k Link: https://lore.kernel.org/r/20191105150657.8092-9-hmadhani@marvell.com Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 65e9200938052ce90f24421bb057e1be1d6147c7 Author: Arun Easi Date: Tue Nov 5 07:06:56 2019 -0800 scsi: qla2xxx: Fix device connect issues in P2P configuration P2P needs to take the alternate plogi route. Link: https://lore.kernel.org/r/20191105150657.8092-8-hmadhani@marvell.com Reviewed-by: Ewan D. Milne Signed-off-by: Arun Easi Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 2f856d4e8c23f5ad5221f8da4a2f22d090627f19 Author: Arun Easi Date: Tue Nov 5 07:06:55 2019 -0800 scsi: qla2xxx: Fix memory leak when sending I/O fails On heavy loads, a memory leak of the srb_t structure is observed. This would make the qla2xxx_srbs cache gobble up memory. Fixes: 219d27d7147e0 ("scsi: qla2xxx: Fix race conditions in the code for aborting SCSI commands") Cc: stable@vger.kernel.org # 5.2 Link: https://lore.kernel.org/r/20191105150657.8092-7-hmadhani@marvell.com Reviewed-by: Ewan D. Milne Signed-off-by: Arun Easi Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit f45bca8c5052e8c59bab64ee90c44441678b9a52 Author: Quinn Tran Date: Tue Nov 5 07:06:54 2019 -0800 scsi: qla2xxx: Fix double scsi_done for abort path Current code assumes abort will remove the original command from the active list where scsi_done will not be called. Instead, the eh_abort thread will do the scsi_done. That is not the case. Instead, we have a double scsi_done calls triggering use after free. Abort will tell FW to release the command from FW possesion. The original command will return to ULP with error in its normal fashion via scsi_done. eh_abort path would wait for the original command completion before returning. eh_abort path will not perform the scsi_done call. Fixes: 219d27d7147e0 ("scsi: qla2xxx: Fix race conditions in the code for aborting SCSI commands") Cc: stable@vger.kernel.org # 5.2 Link: https://lore.kernel.org/r/20191105150657.8092-6-hmadhani@marvell.com Reviewed-by: Ewan D. Milne Signed-off-by: Quinn Tran Signed-off-by: Arun Easi Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit dd322b7f3efc8cda085bb60eadc4aee6324eadd8 Author: Quinn Tran Date: Tue Nov 5 07:06:53 2019 -0800 scsi: qla2xxx: Fix driver unload hang This patch fixes driver unload hang by removing msleep() Fixes: d74595278f4ab ("scsi: qla2xxx: Add multiple queue pair functionality.") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191105150657.8092-5-hmadhani@marvell.com Reviewed-by: Ewan D. Milne Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit af2a0c51b1205327f55a7e82e530403ae1d42cbb Author: Quinn Tran Date: Tue Nov 5 07:06:52 2019 -0800 scsi: qla2xxx: Fix SRB leak on switch command timeout when GPSC/GPDB switch command fails, driver just returns without doing a proper cleanup. This patch fixes this memory leak by calling sp->free() in the error path. Link: https://lore.kernel.org/r/20191105150657.8092-4-hmadhani@marvell.com Reviewed-by: Ewan D. Milne Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 71c80b75ce8f08c0978ce9a9816b81b5c3ce5e12 Author: Quinn Tran Date: Tue Nov 5 07:06:51 2019 -0800 scsi: qla2xxx: Do command completion on abort timeout On switch, fabric and mgt command timeout, driver send Abort to tell FW to return the original command. If abort is timeout, then return both Abort and original command for cleanup. Fixes: 219d27d7147e0 ("scsi: qla2xxx: Fix race conditions in the code for aborting SCSI commands") Cc: stable@vger.kernel.org # 5.2 Link: https://lore.kernel.org/r/20191105150657.8092-3-hmadhani@marvell.com Reviewed-by: Ewan D. Milne Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 983f127603fac650fa34ee69db363e4615eaf9e7 Author: Quinn Tran Date: Tue Nov 5 07:06:50 2019 -0800 scsi: qla2xxx: Retry PLOGI on FC-NVMe PRLI failure Current code will send PRLI with FC-NVMe bit set for the targets which support only FCP. This may result into issue with targets which do not understand NVMe and will go into a strange state. This patch would restart the login process by going back to PLOGI state. The PLOGI state will force the target to respond to correct PRLI request. Fixes: c76ae845ea836 ("scsi: qla2xxx: Add error handling for PLOGI ELS passthrough") Cc: stable@vger.kernel.org # 5.4 Link: https://lore.kernel.org/r/20191105150657.8092-2-hmadhani@marvell.com Reviewed-by: Ewan D. Milne Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 714cf5e3846047052fae89c7b927b886cc69d60c Author: Arnaud Pouliquen Date: Fri Oct 25 10:56:39 2019 +0200 remoteproc: stm32: use workqueue to treat mailbox callback The mailbox callback is under interrupt context. A consequence is that RPMsg Callbacks are also in interrupt context. Create workqueue to treat the callbacks in normal context. Signed-off-by: Arnaud Pouliquen Signed-off-by: Bjorn Andersson commit 99cf0361e7af29511309804bbedd240bf939cebd Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:59:52 2019 +0100 remoteproc: fix argument 2 of rproc_mem_entry_init The rproc_mem_entry_init() call takes a pointer to a vm as the second argument. The code is currently using a plain 0 as "NULL". Change to using NULL to fix the following sparse warnings: drivers/remoteproc/remoteproc_core.c:339:49: warning: Using plain integer as NULL pointer drivers/remoteproc/remoteproc_core.c:916:46: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks Signed-off-by: Bjorn Andersson commit 75aa567803b15e679432655badf95cd30b66b930 Author: Peter Geis Date: Wed Oct 16 18:59:46 2019 +0000 arm64: dts: rockchip: fix sdmmc detection on boot on rk3328-roc-cc With working GPIO, during init the GPIO state s reset. This causes the sdmmc regulator to shut down, preventing detection. Removing and replacing the card will allow it to be detected, but that should not be necessary. Fix this by setting the regulator on at boot. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20191016185945.1962-1-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner commit bb06a5ce88fd3489d2415470b20ab949550a62ec Author: Christophe JAILLET Date: Tue Oct 29 07:09:14 2019 +0100 rpmsg: char: Simplify 'rpmsg_eptdev_release()' Use 'skb_queue_purge()' instead of re-implementing it. Signed-off-by: Christophe JAILLET Signed-off-by: Bjorn Andersson commit 9d399f0c52951c1acf972bf98ea55ba8798fea7a Author: Baolin Wang Date: Mon Oct 14 15:07:46 2019 +0800 hwspinlock: u8500_hsem: Remove redundant PM runtime implementation Since the hwspinlock core has changed the PM runtime to be optional, thus remove the redundant PM runtime implementation in the u8500 HWSEM driver. Reviewed-by: Linus Walleij Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit 4d0c1c57329ac2db987160aa55ffdca479181dbe Author: Baolin Wang Date: Mon Oct 14 15:07:45 2019 +0800 hwspinlock: sprd: Remove redundant PM runtime implementation Since the hwspinlock core has changed the PM runtime to be optional, thus remove the redundant PM runtime implementation in the Spreadtrum hwlock driver. Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit a6fc49051cdb847428edf189023b087c1b4fc598 Author: Baolin Wang Date: Mon Oct 14 15:07:44 2019 +0800 hwspinlock: Let the PM runtime can be optional Now some hwspinlock controllers did not have the requirement to implement the PM runtime, but drivers must enable the PM runtime to comply with the hwspinlock core. Thus we can change the PM runtime support to be optional by validating the -EACCES error number which means the PM runtime is not enabled, and removing the return value validating of pm_runtime_put(). So that we can remove some redundant PM runtime code in drivers. Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit b2547dce4d4a23e8c4a2b0258e3bd31d43dddfad Author: Baolin Wang Date: Mon Oct 14 15:07:43 2019 +0800 hwspinlock: Remove BUG_ON() from the hwspinlock core The original code use BUG_ON() to validate the parameters when locking or unlocking one hardware lock, but we should not crash the whole kernel though the hwlock parameters are incorrect, instead we can return the error number for users and give some warning. Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit f091d5a426447cc427680bdd3adc7773aa2867df Author: Eugeniy Paltsev Date: Fri Nov 8 19:20:22 2019 +0300 ARC: ARCv2: jump label: implement jump label patching Implement jump label patching for ARC. Jump labels provide an interface to generate dynamic branches using self-modifying code. This allows us to implement conditional branches where changing branch direction is expensive but branch selection is basically 'free' This implementation uses 32-bit NOP and BRANCH instructions which forced to be aligned by 4 to guarantee that they don't cross L1 cache line boundary and can be update atomically. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 92da362c07d413786ab59db1665376fb63805586 Merge: a0c76345e3d3 d467ac0a3855 Author: David S. Miller Date: Fri Nov 8 14:18:32 2019 -0800 Merge branch 'sctp-rfc7829' Xin Long says: ==================== sctp: update from rfc7829 SCTP-PF was implemented based on a Internet-Draft in 2012: https://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05 It's been updated quite a few by rfc7829 in 2016. This patchset adds the following features: 1. add SCTP_ADDR_POTENTIALLY_FAILED notification 2. add pf_expose per netns/sock/asoc 3. add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt 4. add ps_retrans per netns/sock/asoc/transport (Primary Path Switchover) 5. add spt_pathcpthld for SCTP_PEER_ADDR_THLDS sockopt v1->v2: - See Patch 2/5 and Patch 5/5. v2->v3: - See Patch 1/5, 2/5 and 3/5. v3->v4: - See Patch 1/5, 2/5, 3/5 and 4/5. ==================== Signed-off-by: David S. Miller commit d467ac0a38551a5904878b1f5a2fe20a040c0e11 Author: Xin Long Date: Fri Nov 8 13:20:36 2019 +0800 sctp: add SCTP_PEER_ADDR_THLDS_V2 sockopt Section 7.2 of rfc7829: "Peer Address Thresholds (SCTP_PEER_ADDR_THLDS) Socket Option" extends 'struct sctp_paddrthlds' with 'spt_pathcpthld' added to allow a user to change ps_retrans per sock/asoc/transport, as other 2 paddrthlds: pf_retrans, pathmaxrxt. Note: to not break the user's program, here to support pf_retrans dump and setting by adding a new sockopt SCTP_PEER_ADDR_THLDS_V2, and a new structure sctp_paddrthlds_v2 instead of extending sctp_paddrthlds. Also, when setting ps_retrans, the value is not allowed to be greater than pf_retrans. v1->v2: - use SCTP_PEER_ADDR_THLDS_V2 to set/get pf_retrans instead, as Marcelo and David Laight suggested. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller commit 34515e94c92c3f593cd696abca8609246cbd75e6 Author: Xin Long Date: Fri Nov 8 13:20:35 2019 +0800 sctp: add support for Primary Path Switchover This is a new feature defined in section 5 of rfc7829: "Primary Path Switchover". By introducing a new tunable parameter: Primary.Switchover.Max.Retrans (PSMR) The primary path will be changed to another active path when the path error counter on the old primary path exceeds PSMR, so that "the SCTP sender is allowed to continue data transmission on a new working path even when the old primary destination address becomes active again". This patch is to add this tunable parameter, 'ps_retrans' per netns, sock, asoc and transport. It also allows a user to change ps_retrans per netns by sysctl, and ps_retrans per sock/asoc/transport will be initialized with it. The check will be done in sctp_do_8_2_transport_strike() when this feature is enabled. Note this feature is disabled by initializing 'ps_retrans' per netns as 0xffff by default, and its value can't be less than 'pf_retrans' when changing by sysctl. v3->v4: - add define SCTP_PS_RETRANS_MAX 0xffff, and use it on extra2 of sysctl 'ps_retrans'. - add a new entry for ps_retrans on ip-sysctl.txt. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller commit 8d2a6935d842f12c25611b165eace778adb09a53 Author: Xin Long Date: Fri Nov 8 13:20:34 2019 +0800 sctp: add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt This is a sockopt defined in section 7.3 of rfc7829: "Exposing the Potentially Failed Path State", by which users can change pf_expose per sock and asoc. The new sockopt SCTP_EXPOSE_POTENTIALLY_FAILED_STATE is also known as SCTP_EXPOSE_PF_STATE for short. v2->v3: - return -EINVAL if params.assoc_value > SCTP_PF_EXPOSE_MAX. - define SCTP_EXPOSE_PF_STATE SCTP_EXPOSE_POTENTIALLY_FAILED_STATE. v3->v4: - improve changelog. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller commit 768e15182dcb809e39c338290dda10c4e271d133 Author: Xin Long Date: Fri Nov 8 13:20:33 2019 +0800 sctp: add SCTP_ADDR_POTENTIALLY_FAILED notification SCTP Quick failover draft section 5.1, point 5 has been removed from rfc7829. Instead, "the sender SHOULD (i) notify the Upper Layer Protocol (ULP) about this state transition", as said in section 3.2, point 8. So this patch is to add SCTP_ADDR_POTENTIALLY_FAILED, defined in section 7.1, "which is reported if the affected address becomes PF". Also remove transport cwnd's update when moving from PF back to ACTIVE , which is no longer in rfc7829 either. Note that ulp_notify will be set to false if asoc->expose is not 'enabled', according to last patch. v2->v3: - define SCTP_ADDR_PF SCTP_ADDR_POTENTIALLY_FAILED. v3->v4: - initialize spc_state with SCTP_ADDR_AVAILABLE, as Marcelo suggested. - check asoc->pf_expose in sctp_assoc_control_transport(), as Marcelo suggested. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller commit aef587be42925f92418083f08852d0011b2766ca Author: Xin Long Date: Fri Nov 8 13:20:32 2019 +0800 sctp: add pf_expose per netns and sock and asoc As said in rfc7829, section 3, point 12: The SCTP stack SHOULD expose the PF state of its destination addresses to the ULP as well as provide the means to notify the ULP of state transitions of its destination addresses from active to PF, and vice versa. However, it is recommended that an SCTP stack implementing SCTP-PF also allows for the ULP to be kept ignorant of the PF state of its destinations and the associated state transitions, thus allowing for retention of the simpler state transition model of [RFC4960] in the ULP. Not only does it allow to expose the PF state to ULP, but also allow to ignore sctp-pf to ULP. So this patch is to add pf_expose per netns, sock and asoc. And in sctp_assoc_control_transport(), ulp_notify will be set to false if asoc->expose is not 'enabled' in next patch. It also allows a user to change pf_expose per netns by sysctl, and pf_expose per sock and asoc will be initialized with it. Note that pf_expose also works for SCTP_GET_PEER_ADDR_INFO sockopt, to not allow a user to query the state of a sctp-pf peer address when pf_expose is 'disabled', as said in section 7.3. v1->v2: - Fix a build warning noticed by Nathan Chancellor. v2->v3: - set pf_expose to UNUSED by default to keep compatible with old applications. v3->v4: - add a new entry for pf_expose on ip-sysctl.txt, as Marcelo suggested. - change this patch to 1/5, and move sctp_assoc_control_transport change into 2/5, as Marcelo suggested. - use SCTP_PF_EXPOSE_UNSET instead of SCTP_PF_EXPOSE_UNUSED, and set SCTP_PF_EXPOSE_UNSET to 0 in enum, as Marcelo suggested. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller commit a0c76345e3d3dbc40c39de2e00d15a3b7eef7885 Author: Jiri Pirko Date: Fri Nov 8 21:42:43 2019 +0100 devlink: disallow reload operation during device cleanup There is a race between driver code that does setup/cleanup of device and devlink reload operation that in some drivers works with the same code. Use after free could we easily obtained by running: while true; do echo 10 > /sys/bus/netdevsim/new_device devlink dev reload netdevsim/netdevsim10 & echo 10 > /sys/bus/netdevsim/del_device done Fix this by enabling reload only after setup of device is complete and disabling it at the beginning of the cleanup process. Reported-by: Ido Schimmel Fixes: 2d8dc5bbf4e7 ("devlink: Add support for reload") Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit f95e6c9c461709a1faa37b20c4d3eb50253f616a Author: Jiri Pirko Date: Fri Nov 8 15:26:33 2019 +0100 selftest: net: add alternative names test Add a simple test for recently added netdevice alternative names. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit f9010b0edcd5a3112ab3d4fc79c296c5a1c5ee16 Author: Markus Reichl Date: Fri Nov 8 22:04:33 2019 +0100 arm64: dts: rockchip: Split rk3399-roc-pc for with and without mezzanine board. For rk3399-roc-pc is a mezzanine board available that carries M.2 and POE interfaces. Use it with a separate dts. Signed-off-by: Markus Reichl Acked-by: Rob Herring Link: https://lore.kernel.org/r/0fb4e21a-fe78-00aa-6142-ca8682a913eb@fivetechno.de Signed-off-by: Heiko Stuebner commit 79702ded8c2fa233fa2e05b82c8cbf0d0a5aaea0 Author: Robin Murphy Date: Mon Oct 14 23:19:06 2019 +0100 arm64: dts: rockchip: Add Beelink A1 Beelink A1 is a TV box implementing the higher-end options of the RK3328 reference design - the DTB from the stock Android firmware is clearly the "rk3328-box-plus" variant from the Rockchip 3.10 BSP with minor modifications to accommodate the USB WiFi module and additional VFD-style LED driver. It features: - 4GB of 32-bit LPDDR3 - 16GB of HS200 eMMC (newer models with 32GB also exist) - Realtek RTL8211F phy for gigabit ethernet - Fn-Link 6221E-UUC module (RealTek RTL8821CU) for 11ac WiFi and Bluetooth 4.2 - HDMI and analog A/V - 1x USB 3.0 type A host, 1x USB 2.0 type A OTG, 1x micro SD - IR receiver and a neat little LED clock display. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/2aa21c5f3020062cf6a47057bdf3c01f0ec863ea.1571090991.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit e09a17df35c4d2185befd4e6db0f8e035aa86e57 Author: Robin Murphy Date: Mon Oct 14 23:19:04 2019 +0100 dt-bindings: ARM: rockchip: Add Beelink A1 Add a binding for the RK3328-based Beelink A1 TV box. Signed-off-by: Robin Murphy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/82324d17b770fa8ea189fa708490d2c8c0c9290e.1571090991.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit b756ad928d98e5ef0b74af7546a6a31a8dadde00 Author: Eric Dumazet Date: Fri Nov 8 05:07:46 2019 -0800 packet: fix data-race in fanout_flow_is_huge() KCSAN reported the following data-race [1] Adding a couple of READ_ONCE()/WRITE_ONCE() should silence it. Since the report hinted about multiple cpus using the history concurrently, I added a test avoiding writing on it if the victim slot already contains the desired value. [1] BUG: KCSAN: data-race in fanout_demux_rollover / fanout_demux_rollover read to 0xffff8880b01786cc of 4 bytes by task 18921 on cpu 1: fanout_flow_is_huge net/packet/af_packet.c:1303 [inline] fanout_demux_rollover+0x33e/0x3f0 net/packet/af_packet.c:1353 packet_rcv_fanout+0x34e/0x490 net/packet/af_packet.c:1453 deliver_skb net/core/dev.c:1888 [inline] dev_queue_xmit_nit+0x15b/0x540 net/core/dev.c:1958 xmit_one net/core/dev.c:3195 [inline] dev_hard_start_xmit+0x3f5/0x430 net/core/dev.c:3215 __dev_queue_xmit+0x14ab/0x1b40 net/core/dev.c:3792 dev_queue_xmit+0x21/0x30 net/core/dev.c:3825 neigh_direct_output+0x1f/0x30 net/core/neighbour.c:1530 neigh_output include/net/neighbour.h:511 [inline] ip6_finish_output2+0x7a2/0xec0 net/ipv6/ip6_output.c:116 __ip6_finish_output net/ipv6/ip6_output.c:142 [inline] __ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127 ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] ip6_local_out+0x74/0x90 net/ipv6/output_core.c:179 ip6_send_skb+0x53/0x110 net/ipv6/ip6_output.c:1795 udp_v6_send_skb.isra.0+0x3ec/0xa70 net/ipv6/udp.c:1173 udpv6_sendmsg+0x1906/0x1c20 net/ipv6/udp.c:1471 inet6_sendmsg+0x6d/0x90 net/ipv6/af_inet6.c:576 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0x9f/0xc0 net/socket.c:657 ___sys_sendmsg+0x2b7/0x5d0 net/socket.c:2311 __sys_sendmmsg+0x123/0x350 net/socket.c:2413 __do_sys_sendmmsg net/socket.c:2442 [inline] __se_sys_sendmmsg net/socket.c:2439 [inline] __x64_sys_sendmmsg+0x64/0x80 net/socket.c:2439 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 write to 0xffff8880b01786cc of 4 bytes by task 18922 on cpu 0: fanout_flow_is_huge net/packet/af_packet.c:1306 [inline] fanout_demux_rollover+0x3a4/0x3f0 net/packet/af_packet.c:1353 packet_rcv_fanout+0x34e/0x490 net/packet/af_packet.c:1453 deliver_skb net/core/dev.c:1888 [inline] dev_queue_xmit_nit+0x15b/0x540 net/core/dev.c:1958 xmit_one net/core/dev.c:3195 [inline] dev_hard_start_xmit+0x3f5/0x430 net/core/dev.c:3215 __dev_queue_xmit+0x14ab/0x1b40 net/core/dev.c:3792 dev_queue_xmit+0x21/0x30 net/core/dev.c:3825 neigh_direct_output+0x1f/0x30 net/core/neighbour.c:1530 neigh_output include/net/neighbour.h:511 [inline] ip6_finish_output2+0x7a2/0xec0 net/ipv6/ip6_output.c:116 __ip6_finish_output net/ipv6/ip6_output.c:142 [inline] __ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127 ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] ip6_local_out+0x74/0x90 net/ipv6/output_core.c:179 ip6_send_skb+0x53/0x110 net/ipv6/ip6_output.c:1795 udp_v6_send_skb.isra.0+0x3ec/0xa70 net/ipv6/udp.c:1173 udpv6_sendmsg+0x1906/0x1c20 net/ipv6/udp.c:1471 inet6_sendmsg+0x6d/0x90 net/ipv6/af_inet6.c:576 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0x9f/0xc0 net/socket.c:657 ___sys_sendmsg+0x2b7/0x5d0 net/socket.c:2311 __sys_sendmmsg+0x123/0x350 net/socket.c:2413 __do_sys_sendmmsg net/socket.c:2442 [inline] __se_sys_sendmmsg net/socket.c:2439 [inline] __x64_sys_sendmmsg+0x64/0x80 net/socket.c:2439 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 18922 Comm: syz-executor.3 Not tainted 5.4.0-rc6+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Fixes: 3b3a5b0aab5b ("packet: rollover huge flows before small flows") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Signed-off-by: David S. Miller commit 29e8976e604f15838a71959ab853a802617113f9 Author: Robin Murphy Date: Mon Oct 14 23:19:05 2019 +0100 arm64: dts: rockchip: Add RK3328 audio pipelines The audio pipelines for HDMI and the analog codec are internal to the SoC, so it makes sense to describe them at that level such that boards need only enable the respective nodes for outputs they implement. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/a09c8d795e7a66fb7bc47af2b6580f6e8dbec91e.1571090991.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit 8d73b2aeb8088517b0895f209b68237ea1bc1c02 Author: Arnd Bergmann Date: Fri Nov 8 21:34:27 2019 +0100 ipmi: kill off 'timespec' usage again 'struct timespec' is getting removed from the kernel. The usage in ipmi was fixed before in commit 48862ea2ce86 ("ipmi: Update timespec usage to timespec64"), but unfortunately it crept back in. The busy looping code can better use ktime_t anyway, so use that there to simplify the implementation. Fixes: cbb19cb1eef0 ("ipmi_si: Convert timespec64 to timespec") Signed-off-by: Arnd Bergmann Message-Id: <20191108203435.112759-5-arnd@arndb.de> Signed-off-by: Corey Minyard commit 1c8f11d057d61d9039a55545124ecb4248c6e625 Merge: f1ff4e80f848 e1f32190cf7d Author: David S. Miller Date: Fri Nov 8 14:01:59 2019 -0800 Merge branch 'TIPC-Encryption' Tuong Lien says: ==================== TIPC Encryption This series provides TIPC encryption feature, kernel part. There will be another one in the 'iproute2/tipc' for user space to set key. v2: add select crypto 'aes(gcm)' for TIPC_CRYPTO in Kconfig ==================== Signed-off-by: David S. Miller commit e1f32190cf7ddd55778b460e7d44af3f76529698 Author: Tuong Lien Date: Fri Nov 8 12:05:12 2019 +0700 tipc: add support for AEAD key setting via netlink This commit adds two netlink commands to TIPC in order for user to be able to set or remove AEAD keys: - TIPC_NL_KEY_SET - TIPC_NL_KEY_FLUSH When the 'KEY_SET' is given along with the key data, the key will be initiated and attached to TIPC crypto. On the other hand, the 'KEY_FLUSH' command will remove all existing keys if any. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit fc1b6d6de2208774efd2a20bf0daddb02d18b1e0 Author: Tuong Lien Date: Fri Nov 8 12:05:11 2019 +0700 tipc: introduce TIPC encryption & authentication This commit offers an option to encrypt and authenticate all messaging, including the neighbor discovery messages. The currently most advanced algorithm supported is the AEAD AES-GCM (like IPSec or TLS). All encryption/decryption is done at the bearer layer, just before leaving or after entering TIPC. Supported features: - Encryption & authentication of all TIPC messages (header + data); - Two symmetric-key modes: Cluster and Per-node; - Automatic key switching; - Key-expired revoking (sequence number wrapped); - Lock-free encryption/decryption (RCU); - Asynchronous crypto, Intel AES-NI supported; - Multiple cipher transforms; - Logs & statistics; Two key modes: - Cluster key mode: One single key is used for both TX & RX in all nodes in the cluster. - Per-node key mode: Each nodes in the cluster has one specific TX key. For RX, a node requires its peers' TX key to be able to decrypt the messages from those peers. Key setting from user-space is performed via netlink by a user program (e.g. the iproute2 'tipc' tool). Internal key state machine: Attach Align(RX) +-+ +-+ | V | V +---------+ Attach +---------+ | IDLE |---------------->| PENDING |(user = 0) +---------+ +---------+ A A Switch| A | | | | | | Free(switch/revoked) | | (Free)| +----------------------+ | |Timeout | (TX) | | |(RX) | | | | | | v | +---------+ Switch +---------+ | PASSIVE |<----------------| ACTIVE | +---------+ (RX) +---------+ (user = 1) (user >= 1) The number of TFMs is 10 by default and can be changed via the procfs 'net/tipc/max_tfms'. At this moment, as for simplicity, this file is also used to print the crypto statistics at runtime: echo 0xfff1 > /proc/sys/net/tipc/max_tfms The patch defines a new TIPC version (v7) for the encryption message (- backward compatibility as well). The message is basically encapsulated as follows: +----------------------------------------------------------+ | TIPCv7 encryption | Original TIPCv2 | Authentication | | header | packet (encrypted) | Tag | +----------------------------------------------------------+ The throughput is about ~40% for small messages (compared with non- encryption) and ~9% for large messages. With the support from hardware crypto i.e. the Intel AES-NI CPU instructions, the throughput increases upto ~85% for small messages and ~55% for large messages. By default, the new feature is inactive (i.e. no encryption) until user sets a key for TIPC. There is however also a new option - "TIPC_CRYPTO" in the kernel configuration to enable/disable the new code when needed. MAINTAINERS | add two new files 'crypto.h' & 'crypto.c' in tipc Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 134bdac397661a5841d9f27f508190c68b26232b Author: Tuong Lien Date: Fri Nov 8 12:05:10 2019 +0700 tipc: add new AEAD key structure for user API The new structure 'tipc_aead_key' is added to the 'tipc.h' for user to be able to transfer a key to TIPC in kernel. Netlink will be used for this purpose in the later commits. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 4cbf8ac2fe5a0846508fe02b95a5de1a90fa73f4 Author: Tuong Lien Date: Fri Nov 8 12:05:09 2019 +0700 tipc: enable creating a "preliminary" node When user sets RX key for a peer not existing on the own node, a new node entry is needed to which the RX key will be attached. However, since the peer node address (& capabilities) is unknown at that moment, only the node-ID is provided, this commit allows the creation of a node with only the data that we call as “preliminary”. A preliminary node is not the object of the “tipc_node_find()” but the “tipc_node_find_by_id()”. Once the first message i.e. LINK_CONFIG comes from that peer, and is successfully decrypted by the own node, the actual peer node data will be properly updated and the node will function as usual. In addition, the node timer always starts when a node object is created so if a preliminary node is not used, it will be cleaned up. The later encryption functions will also use the node timer and be able to create a preliminary node automatically when needed. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 2a7ee696f7b000a970dcce0cb06fdcd0a9e6ee76 Author: Tuong Lien Date: Fri Nov 8 12:05:08 2019 +0700 tipc: add reference counter to bearer As a need to support the crypto asynchronous operations in the later commits, apart from the current RCU mechanism for bearer pointer, we add a 'refcnt' to the bearer object as well. So, a bearer can be hold via 'tipc_bearer_hold()' without being freed even though the bearer or interface can be disabled in the meanwhile. If that happens, the bearer will be released then when the crypto operation is completed and 'tipc_bearer_put()' is called. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit f1ff4e80f848a2ea0622cbe2c72e44409ba90546 Merge: bbab7ef23503 fb0254b28434 Author: David S. Miller Date: Fri Nov 8 13:54:38 2019 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2019-11-08 Another series that contains updates to the ice driver only. Anirudh cleans up the code of kernel config of ifdef wrappers by moving code that is needed by DCB to disable and enable the PF VSI for configuration. Implements ice_vsi_type_str() to convert an VSI type enum value to its string equivalent to help identify VSI types from module print statements. Usha and Tarun add support for setting the maximum per-queue bit rate for transmit queues. Dave implements dcb_nl set functions and supporting software DCB functions to support the callbacks defined in the dcbnl_rtnl_ops structure. Henry adds a check to ensure we are not resetting the device when trying to configure it, and to return -EBUSY during a reset. Usha fixes a call trace caused by the receive/transmit descriptor size change request via ethtool when DCB is configured by using the number of enabled queues and not the total number of allocated queues. Paul cleans up and refactors the software LLDP configuration to handle when firmware DCBX is disabled. Akeem adds checks to ensure the VF or PF is not disabled before honoring mailbox messages to configure the VF. Brett corrects the check to make sure the vector_id passed down from iavf is less than the max allowed interrupts per VF. Updates a flag bit to align with the current specification. Bruce updates a switch statement to use the correct status of the Download Package AQ command. Does some housekeeping by cleaning up a conditional check that is not needed. Mitch shortens up the delay for SQ responses to resolve issues with VF resets failing. Jake cleans up the code reducing namespace pollution and to simplify ice_debug_cq() since it always uses the same mask, not need to pass it in. Improve debugging by adding the command opcode in the debug messages that print an error code. v2: fixed reverse christmas tree issue in patch 3 of the series. ==================== Signed-off-by: David S. Miller commit fc59462c5ce60da119568fac325c92fc6b7c6175 Author: Michael Hennerich Date: Fri Nov 8 09:17:18 2019 +0200 clk: clk-gpio: propagate rate change to parent For an external clock source, which is gated via a GPIO, the rate change should typically be propagated to the parent clock. The situation where we are requiring this propagation, is when an external clock is connected to override an internal clock (which typically has a fixed rate). The external clock can have a different rate than the internal one, and may also be variable, thus requiring the rate propagation. This rate change wasn't propagated until now, and it's unclear about cases where this shouldn't be propagated. Thus, it's unclear whether this is fixing a bug, or extending the current driver behavior. Also, it's unsure about whether this may break any existing setups; in the case that it does, a device-tree property may be added to disable this flag. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean Link: https://lkml.kernel.org/r/20191108071718.17985-1-alexandru.ardelean@analog.com Signed-off-by: Stephen Boyd commit f5790382edef4e97514dc7af75344b06b8cac3ee Author: Stephen Boyd Date: Thu Nov 7 13:40:18 2019 -0800 clk: qcom: rpmh: Reuse sdm845 clks for sm8150 The SM8150 list of clks is almost the same as the list for SDM845, except there isn't an IPA clk. Just point to the SDM845 clks from the SM8150 list for now so we can reduce the amount of struct bloat in this driver. Suggested-by: Vinod Koul Cc: Taniya Das Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20191107214018.184105-1-sboyd@kernel.org Reviewed-by: Vinod Koul commit d11769fdc1bbf6664083c0caabd9f2f864dd72ec Author: Wenpeng Liang Date: Tue Nov 5 19:08:02 2019 +0800 RDMA/hns: Modify appropriate printings Modify some printings that is not in uniformed style, non-standard or with spelling errors. Link: https://lore.kernel.org/r/1572952082-6681-10-git-send-email-liweihang@hisilicon.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 1ceb0b11a8a2363db3bf44f3e0ae4615134733e9 Author: Yixian Liu Date: Tue Nov 5 19:08:01 2019 +0800 RDMA/hns: Fix non-standard error codes It is better to return a linux error code than define a private constant. Link: https://lore.kernel.org/r/1572952082-6681-9-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixian Liu Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 301cc7eb2cd9b0292658b9bfd45e5226cd1fef27 Author: Lang Cheng Date: Tue Nov 5 19:08:00 2019 +0800 RDMA/hns: Modify hns_roce_hw_v2_get_cfg to simplify the code Merge base configuration of hr_dev into hns_roce_hw_v2_get_cfg(). In addition, there is no need to return 0 at last, so we change return type of it to void. Link: https://lore.kernel.org/r/1572952082-6681-8-git-send-email-liweihang@hisilicon.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 880f133c6026bee250220b773f556cc27bb62457 Author: Lang Cheng Date: Tue Nov 5 19:07:59 2019 +0800 RDMA/hns: Simplify doorbell initialization code If a variable needs to be set to 0 before use, it can be directly initialized to 0. Link: https://lore.kernel.org/r/1572952082-6681-7-git-send-email-liweihang@hisilicon.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 6eef524201deaaaf980bd21b80aac1b052cd56a7 Author: Yixing Liu Date: Tue Nov 5 19:07:58 2019 +0800 RDMA/hns: Replace not intuitive function/macro names Replace "sw2hw" and "hw2sw" which is hard to understand with "create" and "destroy". Link: https://lore.kernel.org/r/1572952082-6681-6-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d938d7856f4253f81906af0b9ca67c6a6e51cbaf Author: Yixian Liu Date: Tue Nov 5 19:07:57 2019 +0800 RDMA/hns: Modify fields of struct hns_roce_srq Use wqe_cnt instead of max which means the queue size of srq, and remove wqe_ctr which is not used. Link: https://lore.kernel.org/r/1572952082-6681-5-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 03ccba5c2cf7ec5149c59039a5644233a2f60ca9 Author: Yixian Liu Date: Tue Nov 5 19:07:56 2019 +0800 RDMA/hns: Delete unnecessary uar from hns_roce_cq The uar information is already recorded in priv_uar of hns_roce_dev, there is no need to record it in hns_roce_cq again. Link: https://lore.kernel.org/r/1572952082-6681-4-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 16a11e0bffcab729bd2e8f315e1252e7ef3ddf33 Author: Lang Cheng Date: Tue Nov 5 19:07:55 2019 +0800 RDMA/hns: Remove unnecessary structure hns_roce_sqp Special QP have no differences with normal qp in data structure, so definition of struct hns_roce_sqp should be removed and replaced by struct hns_roce_qp. Link: https://lore.kernel.org/r/1572952082-6681-3-git-send-email-liweihang@hisilicon.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit ec6adad0a1e3ef3064c12146b00c2bd1e6835b0c Author: Yixian Liu Date: Tue Nov 5 19:07:54 2019 +0800 RDMA/hns: Delete unnecessary variable max_post There is no need to define max_post in hns_roce_wq, as it does same thing as wqe_cnt. Link: https://lore.kernel.org/r/1572952082-6681-2-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit bbab7ef235031f6733b5429ae7877bfa22339712 Author: Eric Dumazet Date: Fri Nov 8 10:34:47 2019 -0800 net: icmp: fix data-race in cmp_global_allow() This code reads two global variables without protection of a lock. We need READ_ONCE()/WRITE_ONCE() pairs to avoid load/store-tearing and better document the intent. KCSAN reported : BUG: KCSAN: data-race in icmp_global_allow / icmp_global_allow read to 0xffffffff861a8014 of 4 bytes by task 11201 on cpu 0: icmp_global_allow+0x36/0x1b0 net/ipv4/icmp.c:254 icmpv6_global_allow net/ipv6/icmp.c:184 [inline] icmpv6_global_allow net/ipv6/icmp.c:179 [inline] icmp6_send+0x493/0x1140 net/ipv6/icmp.c:514 icmpv6_send+0x71/0xb0 net/ipv6/ip6_icmp.c:43 ip6_link_failure+0x43/0x180 net/ipv6/route.c:2640 dst_link_failure include/net/dst.h:419 [inline] vti_xmit net/ipv4/ip_vti.c:243 [inline] vti_tunnel_xmit+0x27f/0xa50 net/ipv4/ip_vti.c:279 __netdev_start_xmit include/linux/netdevice.h:4420 [inline] netdev_start_xmit include/linux/netdevice.h:4434 [inline] xmit_one net/core/dev.c:3280 [inline] dev_hard_start_xmit+0xef/0x430 net/core/dev.c:3296 __dev_queue_xmit+0x14c9/0x1b60 net/core/dev.c:3873 dev_queue_xmit+0x21/0x30 net/core/dev.c:3906 neigh_direct_output+0x1f/0x30 net/core/neighbour.c:1530 neigh_output include/net/neighbour.h:511 [inline] ip6_finish_output2+0x7a6/0xec0 net/ipv6/ip6_output.c:116 __ip6_finish_output net/ipv6/ip6_output.c:142 [inline] __ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127 ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] ip6_local_out+0x74/0x90 net/ipv6/output_core.c:179 write to 0xffffffff861a8014 of 4 bytes by task 11183 on cpu 1: icmp_global_allow+0x174/0x1b0 net/ipv4/icmp.c:272 icmpv6_global_allow net/ipv6/icmp.c:184 [inline] icmpv6_global_allow net/ipv6/icmp.c:179 [inline] icmp6_send+0x493/0x1140 net/ipv6/icmp.c:514 icmpv6_send+0x71/0xb0 net/ipv6/ip6_icmp.c:43 ip6_link_failure+0x43/0x180 net/ipv6/route.c:2640 dst_link_failure include/net/dst.h:419 [inline] vti_xmit net/ipv4/ip_vti.c:243 [inline] vti_tunnel_xmit+0x27f/0xa50 net/ipv4/ip_vti.c:279 __netdev_start_xmit include/linux/netdevice.h:4420 [inline] netdev_start_xmit include/linux/netdevice.h:4434 [inline] xmit_one net/core/dev.c:3280 [inline] dev_hard_start_xmit+0xef/0x430 net/core/dev.c:3296 __dev_queue_xmit+0x14c9/0x1b60 net/core/dev.c:3873 dev_queue_xmit+0x21/0x30 net/core/dev.c:3906 neigh_direct_output+0x1f/0x30 net/core/neighbour.c:1530 neigh_output include/net/neighbour.h:511 [inline] ip6_finish_output2+0x7a6/0xec0 net/ipv6/ip6_output.c:116 __ip6_finish_output net/ipv6/ip6_output.c:142 [inline] __ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127 ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 11183 Comm: syz-executor.2 Not tainted 5.4.0-rc3+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Fixes: 4cdf507d5452 ("icmp: add a global rate limitation") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 90b2be27bb0e56483f335cc10fb59ec66882b949 Author: Eric Dumazet Date: Fri Nov 8 08:45:23 2019 -0800 net/sched: annotate lockless accesses to qdisc->empty KCSAN reported the following race [1] BUG: KCSAN: data-race in __dev_queue_xmit / net_tx_action read to 0xffff8880ba403508 of 1 bytes by task 21814 on cpu 1: __dev_xmit_skb net/core/dev.c:3389 [inline] __dev_queue_xmit+0x9db/0x1b40 net/core/dev.c:3761 dev_queue_xmit+0x21/0x30 net/core/dev.c:3825 neigh_hh_output include/net/neighbour.h:500 [inline] neigh_output include/net/neighbour.h:509 [inline] ip6_finish_output2+0x873/0xec0 net/ipv6/ip6_output.c:116 __ip6_finish_output net/ipv6/ip6_output.c:142 [inline] __ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127 ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] ip6_local_out+0x74/0x90 net/ipv6/output_core.c:179 ip6_send_skb+0x53/0x110 net/ipv6/ip6_output.c:1795 udp_v6_send_skb.isra.0+0x3ec/0xa70 net/ipv6/udp.c:1173 udpv6_sendmsg+0x1906/0x1c20 net/ipv6/udp.c:1471 inet6_sendmsg+0x6d/0x90 net/ipv6/af_inet6.c:576 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0x9f/0xc0 net/socket.c:657 ___sys_sendmsg+0x2b7/0x5d0 net/socket.c:2311 __sys_sendmmsg+0x123/0x350 net/socket.c:2413 __do_sys_sendmmsg net/socket.c:2442 [inline] __se_sys_sendmmsg net/socket.c:2439 [inline] __x64_sys_sendmmsg+0x64/0x80 net/socket.c:2439 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 write to 0xffff8880ba403508 of 1 bytes by interrupt on cpu 0: qdisc_run_begin include/net/sch_generic.h:160 [inline] qdisc_run include/net/pkt_sched.h:120 [inline] net_tx_action+0x2b1/0x6c0 net/core/dev.c:4551 __do_softirq+0x115/0x33f kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082 do_softirq.part.0+0x6b/0x80 kernel/softirq.c:337 do_softirq kernel/softirq.c:329 [inline] __local_bh_enable_ip+0x76/0x80 kernel/softirq.c:189 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:688 [inline] ip6_finish_output2+0x7bb/0xec0 net/ipv6/ip6_output.c:117 __ip6_finish_output net/ipv6/ip6_output.c:142 [inline] __ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127 ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] ip6_local_out+0x74/0x90 net/ipv6/output_core.c:179 ip6_send_skb+0x53/0x110 net/ipv6/ip6_output.c:1795 udp_v6_send_skb.isra.0+0x3ec/0xa70 net/ipv6/udp.c:1173 udpv6_sendmsg+0x1906/0x1c20 net/ipv6/udp.c:1471 inet6_sendmsg+0x6d/0x90 net/ipv6/af_inet6.c:576 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0x9f/0xc0 net/socket.c:657 ___sys_sendmsg+0x2b7/0x5d0 net/socket.c:2311 __sys_sendmmsg+0x123/0x350 net/socket.c:2413 __do_sys_sendmmsg net/socket.c:2442 [inline] __se_sys_sendmmsg net/socket.c:2439 [inline] __x64_sys_sendmmsg+0x64/0x80 net/socket.c:2439 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 21817 Comm: syz-executor.2 Not tainted 5.4.0-rc6+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Fixes: d518d2ed8640 ("net/sched: fix race between deactivation and dequeue for NOLOCK qdisc") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Paolo Abeni Cc: Davide Caratti Signed-off-by: David S. Miller commit fb0254b28434697dc7edd986b0811813ac862368 Author: Jacob Keller Date: Wed Nov 6 02:05:41 2019 -0800 ice: print opcode when printing controlq errors To help aid in debugging, display the command opcode in debug messages that print an error code. This makes it easier to see what command failed if only ICE_DBG_AQ_MSG is enabled. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit faa01721ced5952e05e3baa8d375a9d37e81285b Author: Jacob Keller Date: Wed Nov 6 02:05:40 2019 -0800 ice: use more accurate ICE_DBG mask types ice_debug_cq is passed a mask which is always ICE_DBG_AQ_CMD. Modify this function, removing the mask parameter entirely, and directly use the more appropriate ICE_DBG_AQ_DESC and ICE_DBG_AQ_DESC_BUF. The function is only called from ice_controlq.c, and has no other callers outside of that file. Move it and mark it static to avoid namespace pollution. Signed-off-by: Jacob Keller Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 964674f1ddc10a27702be63b241618570c611e9d Author: Anirudh Venkataramanan Date: Wed Nov 6 02:05:39 2019 -0800 ice: Introduce and use ice_vsi_type_str ice_vsi_type_str converts an ice_vsi_type enum value to its string equivalent. This is expected to help easily identify VSI types from module print statements. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 87a2e4988994df699f674af33e5cc30db5bf0690 Author: Bruce Allan Date: Wed Nov 6 02:05:38 2019 -0800 ice: remove unnecessary conditional check There is no reason to do this conditional check before the assignment so simply remove it. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 893869d5d0c922c41d044e92ddd79fff28a27fc1 Author: Brett Creeley Date: Wed Nov 6 02:05:37 2019 -0800 ice: Update enum ice_flg64_bits to current specification Currently the VLAN ice_flg64_bits are off by 1. Fix this by setting the ICE_FLG_EVLAN_x8100 flag to 14, which also updates ICE_FLG_EVLAN_x9100 to 15 and ICE_FLG_VLAN_x8100 to 16. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 88bb432a55de8ae62106305083a8bfbb23b01ad2 Author: Mitch Williams Date: Wed Nov 6 02:05:36 2019 -0800 ice: delay less Shorten the delay for SQ responses, but increase the number of loops. Max delay time is unchanged, but some operations complete much more quickly. In the process, add a new define to make the delay count and delay time more explicit. Add comments to make things more explicit. This fixes a problem with VF resets failing on with many VFs. Signed-off-by: Mitch Williams Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e000248ec870b2e5e2c9934191b057b5d136f267 Author: Bruce Allan Date: Wed Nov 6 02:05:35 2019 -0800 ice: use pkg_dwnld_status instead of sq_last_status Since the return value from the Download Package AQ command is stored in hw->pkg_dwnld_status, use that instead of sq_last_status since that may have the return value from some other AQ command leading to unexpected results. Signed-off-by: Bruce Allan Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b791cdd5c78c74a165ee8da69d6c8ae683d17c38 Author: Brett Creeley Date: Wed Nov 6 02:05:34 2019 -0800 ice: Change max MSI-x vector_id check in cfg_irq_map Currently we check to make sure the vector_id passed down from iavf is less than or equal to pf->hw.func_caps.common_caps.num_msix_vectors. This is incorrect because the vector_id is always 0-based and never greater than or equal to the ICE_MAX_INTR_PER_VF. Fix this by checking to make sure the vector_id is less than the max allowed interrupts per VF (ICE_MAX_INTR_PER_VF). Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ec4f5a436bdf0e5453ad15c4f34a59b9b675ff48 Author: Akeem G Abodunrin Date: Wed Nov 6 02:05:33 2019 -0800 ice: Check if VF is disabled for Opcode and other operations This patch adds code to check if PF or VF is disabled before honoring mailbox message to configure VF - If it is disabled, and opcode is for resetting VF, the PF driver simply tell VF that all is set. In addition, if reset is ongoing, and Admin intend to configure VF on the host, we can poll the VF enabling bit to make sure it is ready before continue - If after ~250 milliseconds, VF is not in active state, we can bail out with invalid error. Signed-off-by: Akeem G Abodunrin Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 241c8cf052e7b1ee32e60bd31214afdaaaa28c55 Author: Paul Greenwalt Date: Wed Nov 6 02:05:32 2019 -0800 ice: configure software LLDP in ice_init_pf_dcb Move software LLDP configuration when FW DCBX is disabled to ice_init_pf_dcb, since that is where the FW DCBX state is determined. Remove this software LLDP configuration from ice_vsi_setup and ice_set_priv_flags. Software configuration includes redirecting Rx LLDP packets up the stack, when FW DCBX is not running. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c0a3665f71a2f086800abea4d9d14d28269089d6 Author: Usha Ketineni Date: Wed Nov 6 02:05:31 2019 -0800 ice: Fix to change Rx/Tx ring descriptor size via ethtool with DCBx This patch fixes the call trace caused by the kernel when the Rx/Tx descriptor size change request is initiated via ethtool when DCB is configured. ice_set_ringparam() should use vsi->num_txq instead of vsi->alloc_txq as it represents the queues that are enabled in the driver when DCB is enabled/disabled. Otherwise, queue index being used can go out of range. For example, when vsi->alloc_txq has 104 queues and with 3 TCS enabled via DCB, each TC gets 34 queues, vsi->num_txq will be 102 and only 102 queues will be enabled. Signed-off-by: Usha Ketineni Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5f8cc355c4134767aa586920458cc21e01295715 Author: Henry Tieman Date: Wed Nov 6 02:05:30 2019 -0800 ice: avoid setting features during reset Certain subsystems behave very badly when called during reset (core dump). This patch returns -EBUSY when reconfiguring some subsystems during reset. With this patch some ethtool functions will not core dump during reset. Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b94b013eb6269526eeb3768101666ba6f526313e Author: Dave Ertman Date: Wed Nov 6 02:05:29 2019 -0800 ice: Implement DCBNL support Implement interface layer for the DCBNL subsystem. These are the functions to support the callbacks defined in the dcbnl_rtnl_ops struct. These callbacks are going to be used to interface with the DCB settings of the device. Implementation of dcb_nl set functions and supporting SW DCB functions. Signed-off-by: Dave Ertman Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1ddef455f4a8ba6374ce6a3ec88c815b3d4a4ad2 Author: Usha Ketineni Date: Wed Nov 6 02:05:28 2019 -0800 ice: Add NDO callback to set the maximum per-queue bitrate Allow for rate limiting Tx queues. Bitrate is set in Mbps(megabits per second). Mbps max-rate is set for the queue via sysfs: /sys/class/net//queues/tx-/tx_maxrate ex: echo 100 >/sys/class/net/ens7/queues/tx-0/tx_maxrate echo 200 >/sys/class/net/ens7/queues/tx-1/tx_maxrate Note: A value of zero for tx_maxrate means disabled, default is disabled. Signed-off-by: Usha Ketineni Co-developed-by: Tarun Singh Signed-off-by: Tarun Singh Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9d614b6425f844a722630d66b9cb7eb531fd706e Author: Anirudh Venkataramanan Date: Wed Nov 6 02:05:27 2019 -0800 ice: Use ice_ena_vsi and ice_dis_vsi in DCB configuration flow DCB configuration flow needs to disable and enable only the PF (main) VSI, so use ice_ena_vsi and ice_dis_vsi. To avoid the use of ifdef to control the staticness of these functions, move them to ice_lib.c. Also replace the allocate and copy of old_cfg to kmemdup() in ice_pf_dcb_cfg(). Signed-off-by: Anirudh Venkataramanan Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 97c20ea8a115b405288404d8c84a90f43425630d Author: Rahul Lakkireddy Date: Fri Nov 8 20:05:22 2019 +0530 cxgb4: fix 64-bit division on i386 Fix following compile error on i386 architecture. ERROR: "__udivdi3" [drivers/net/ethernet/chelsio/cxgb4/cxgb4.ko] undefined! Fixes: 0e395b3cb1fb ("cxgb4: add FLOWC based QoS offload") Reported-by: kbuild test robot Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 5bd2ce6aa581c6ae42f637a0f9b890512d545033 Merge: c8119fa8922b 14f34e36b36c Author: David S. Miller Date: Fri Nov 8 11:36:48 2019 -0800 Merge tag 'mac80211-next-for-net-next-2019-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Some relatively small changes: * typo fixes in docs * APIs for station separation using VLAN tags rather than separate wifi netdevs * some preparations for upcoming features (802.3 offload and airtime queue limits (AQL) * stack reduction in ieee80211_assoc_success() * use DEFINE_DEBUGFS_ATTRIBUTE in hwsim ==================== Signed-off-by: David S. Miller commit c8119fa8922b0dfdda7c7152f7de55040aa5eb1d Author: YueHaibing Date: Thu Nov 7 22:35:58 2019 +0800 cxgb4: Use match_string() helper to simplify the code match_string() returns the array index of a matching string. Use it instead of the open-coded implementation. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit caee3174731ca342f8e418c642ae780ea9664a73 Author: Christophe Roullier Date: Thu Nov 7 09:47:54 2019 +0100 net: ethernet: stmmac: Add support for syscfg clock Add optional support for syscfg clock in dwmac-stm32.c Now Syscfg clock is activated automatically when syscfg registers are used Signed-off-by: Christophe Roullier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7c3ddc6b038feaa9a05b09c3f20e64fed50f9a3f Merge: fa9a2f92983b 49e19745e4b5 Author: Olof Johansson Date: Fri Nov 8 10:34:54 2019 -0800 Merge tag 'ti-k3-soc-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into arm/dt Texas Instruments K3 SoC family changes for 5.5 - Add USB support for J721E - Add mailbox support for AM65x and J721E - Add MMC/SD support for J721E - Disable WP for AM654 MMC0 * tag 'ti-k3-soc-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: arm64: dts: ti: k3-j721e-common-proc-board: Add USB ports arm64: dts: ti: k3-j721e-main: add USB controller nodes arm64: dts: ti: k3-am654-base-board: Add disable-wp for mmc0 arm64: dts: ti: j721e-common-proc-board: Add Support for eMMC and SD card arm64: dts: ti: j721e-main: Add SDHCI nodes arm64: dts: ti: k3-j721e-common-proc-board: Add IPC sub-mailbox nodes arm64: dts: ti: k3-j721e-main: Add mailbox cluster nodes arm64: dts: ti: k3-am65-base-board: Add IPC sub-mailbox nodes for R5Fs arm64: dts: ti: k3-am65-main: Add mailbox cluster nodes Link: https://lore.kernel.org/r/681f1bb5-d28c-a302-690a-82f0be4a7f34@ti.com Signed-off-by: Olof Johansson commit 8400f492a06871a1b0e9f48eb5169bdd27244248 Merge: 536c43b41d1a 0fc21fdf4e10 Author: Olof Johansson Date: Fri Nov 8 10:34:10 2019 -0800 Merge tag 'at91-5.5-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig AT91 defconfig for 5.5 - Unselect PIT now that the TCBs can be used at boot time * tag 'at91-5.5-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91: unselect PIT Link: https://lore.kernel.org/r/20191107222445.GA202433@piout.net Signed-off-by: Olof Johansson commit fa9a2f92983b6882686b1ca71cb2ebc69f126d04 Merge: 743f4e5bc01f cf79e41074b1 Author: Olof Johansson Date: Fri Nov 8 10:33:45 2019 -0800 Merge tag 'at91-5.5-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for 5.5 - New Overkiz Kizbox3 board - Rework of the other Kizbox device trees - New filters for i2c on sama5d4 and sama5d2 * tag 'at91-5.5-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: add a dts and dtsi file for kizbox2 based boards dt-bindings: arm: at91: Document Kizbox2-2 board binding ARM: dts: at91: sama5d4_xplained: add digital filter for i2c ARM: dts: at91: sama5d2_xplained: add analog and digital filter for i2c ARM: dts: at91: add Overkiz KIZBOX3 board dt-bindings: arm: at91: Document Kizbox3 HS board binding dt-bindings: Add vendor prefix for Overkiz SAS ARM: dts: at91: sama5d2: add an rtc label for derived boards ARM: dts: at91: sama5d27_som1_ek: add mmc capabilities for SDMMC0 Link: https://lore.kernel.org/r/20191108070938.GA215379@piout.net Signed-off-by: Olof Johansson commit e24eb5e6e9577360f54f19e4705991cd9ecd0001 Merge: 44a39847787b c3277f8ee8cd Author: Olof Johansson Date: Fri Nov 8 10:33:18 2019 -0800 Merge tag 'at91-5.5-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/drivers AT91 drivers for 5.5 - a new driver exposing the serial number registers through nvmem - a few documentation and definition changes * tag 'at91-5.5-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: soc: at91: Add Atmel SFR SN (Serial Number) support memory: atmel-ebi: switch to SPDX license identifiers memory: atmel-ebi: move NUM_CS definition inside EBI driver ARM: at91: Documentation: update the sama5d3 and armv7m datasheets Link: https://lore.kernel.org/r/20191107221644.GA201884@piout.net Signed-off-by: Olof Johansson commit 743f4e5bc01f4f5b1d041c8dac5f471c010d8d8c Merge: 44124df44db0 3eca037f2dfc Author: Olof Johansson Date: Fri Nov 8 10:32:19 2019 -0800 Merge tag 'aspeed-5.5-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/dt ASPEED device tree updates for 5.5 - Lots of work on the AST2600 boards as bringup continues. There's the eval board, and two IBM boards called Tacoma and Rainier - A new flash layout for OpenBMC systems with larger flashes - Better support for the MAC clocking when talking to a NCSI device, making Linux less reliant on u-boot having done the correct thing - LED fixes for vesin and fp5280g2 - SGPIO support - Facebook network BMC cleanup with the common hardware moved to a shared dtsi * tag 'aspeed-5.5-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: (48 commits) ARM: dts: aspeed-g6: Add timer description ARM: dts: aspeed: ast2600evb: Enable i2c buses ARM: dts: aspeed-g5: Add SGPIO description ARM: dts: aspeed: yamp: Use common dtsi ARM: dts: aspeed: minipack: Use common dtsi ARM: dts: aspeed: cmm: Use common dtsi ARM: dts: aspeed: Common dtsi for Facebook AST2500 Network BMCs ARM: dts: aspeed: rainier: gpio-keys for PSU presence ARM: dts: aspeed: rainier: Fix i2c eeprom size ARM: dts: tacoma: Hog LPC pinmux ARM: dts: aspeed: rainier: Enable VUART1 ARM: dts: aspeed: rainier: Add i2c eeproms ARM: dts: aspeed: tacoma: Use 64MB for firmware memory ARM: dts: aspeed: tacoma: Add host FSI description ARM: dts: ast2600evb: Enable UART workaround ARM: dts: aspeed: tacoma: Add UART1 and workaround ARM: dts: aspeed-g6: Add remaining UARTs ARM: dts: aspeed-g6: Fix i2c clock source ARM: dts: aspeed: Add RCLK to MAC clocks for RMII interfaces ARM: dts: aspeed: tacoma: Enable FMC and SPI devices ... Link: https://lore.kernel.org/r/CACPK8Xe8XiJ+oEp3_AXO5Mox-mXWVrOJKQLJMKJxg1WdYCTzMw@mail.gmail.com Signed-off-by: Olof Johansson commit 44a39847787b022c9f64b48b41c9d2f9dcd815f4 Merge: d4b0c97a8089 af3f1afac38d Author: Olof Johansson Date: Fri Nov 8 10:27:55 2019 -0800 Merge tag 'zynqmp-soc-for-v5.5' of https://github.com/Xilinx/linux-xlnx into arm/drivers arm64: soc: Xilinx SoC changes for v5.5 - Extend firmware interface to cover Versal chip * tag 'zynqmp-soc-for-v5.5' of https://github.com/Xilinx/linux-xlnx: firmware: xilinx: Add support for versal soc dt-bindings: firmware: Add bindings for Versal firmware soc: xilinx: Set CAP_UNUSABLE requirement for versal while powering down domain Link: https://lore.kernel.org/r/6954a53c-6dab-c7a3-7257-58460ca952cb@monstr.eu Signed-off-by: Olof Johansson commit 44124df44db01b6ded323317f8d07b8541517c54 Merge: 86a56b2c612d b7178639516c Author: Olof Johansson Date: Fri Nov 8 10:24:34 2019 -0800 Merge tag 'zynqmp-dt-for-v5.5' of https://github.com/Xilinx/linux-xlnx into arm/dt arm64: dts: zynqmp: DT changes for v5.5 - Add firmware node with fpga and nvmem support * tag 'zynqmp-dt-for-v5.5' of https://github.com/Xilinx/linux-xlnx: arm64: zynqmp: Add support for zynqmp nvmem firmware driver arm64: zynqmp: Label whole PL part as fpga_full region arm64: zynqmp: Add support for zynqmp fpga manager arm64: zynqmp: Add firmware DT node Link: https://lore.kernel.org/r/543394c2-ddff-33be-4c90-e01847539c64@monstr.eu Signed-off-by: Olof Johansson commit bce92136c28f3ae9ddbbac0ee7c0df2eb0ae0bef Merge: 4e60a9568dc6 fddc9fcbe69a Author: Greg Kroah-Hartman Date: Fri Nov 8 18:48:40 2019 +0100 Merge tag 'fpga-dfl-for-5.5' 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 FPGA changes for 5.5 The first patch from Stephen is a trivial cleanup patch. The following three patches add hwmon support to DFL FPGAs. All of this patches have been reviewed and been in the last couple of linux-next releases without issues. Signed-off-by: Moritz Fischer * tag 'fpga-dfl-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga: fpga: dfl: fme: add power management support fpga: dfl: fme: add thermal management support Documentation: fpga: dfl: add descriptions for thermal/power management interfaces fpga: Remove dev_err() usage after platform_get_irq() commit 6be22809e5c8f286877127e8a24c13c959b9fb4e Merge: 51effa6d1153 478016c3839d e6ea46511b1a bff3b04460a8 7e3a57fa6ca8 83d116c53058 918e1946c8ac 3f484ce3750f 2203e1adb936 Author: Catalin Marinas Date: Fri Nov 8 17:46:11 2019 +0000 Merge branches 'for-next/elf-hwcap-docs', 'for-next/smccc-conduit-cleanup', 'for-next/zone-dma', 'for-next/relax-icc_pmr_el1-sync', 'for-next/double-page-fault', 'for-next/misc', 'for-next/kselftest-arm64-signal' and 'for-next/kaslr-diagnostics' into for-next/core * for-next/elf-hwcap-docs: : Update the arm64 ELF HWCAP documentation docs/arm64: cpu-feature-registers: Rewrite bitfields that don't follow [e, s] docs/arm64: cpu-feature-registers: Documents missing visible fields docs/arm64: elf_hwcaps: Document HWCAP_SB docs/arm64: elf_hwcaps: sort the HWCAP{, 2} documentation by ascending value * for-next/smccc-conduit-cleanup: : SMC calling convention conduit clean-up firmware: arm_sdei: use common SMCCC_CONDUIT_* firmware/psci: use common SMCCC_CONDUIT_* arm: spectre-v2: use arm_smccc_1_1_get_conduit() arm64: errata: use arm_smccc_1_1_get_conduit() arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit() * for-next/zone-dma: : Reintroduction of ZONE_DMA for Raspberry Pi 4 support arm64: mm: reserve CMA and crashkernel in ZONE_DMA32 dma/direct: turn ARCH_ZONE_DMA_BITS into a variable arm64: Make arm64_dma32_phys_limit static arm64: mm: Fix unused variable warning in zone_sizes_init mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type' arm64: use both ZONE_DMA and ZONE_DMA32 arm64: rename variables used to calculate ZONE_DMA32's size arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys() * for-next/relax-icc_pmr_el1-sync: : Relax ICC_PMR_EL1 (GICv3) accesses when ICC_CTLR_EL1.PMHE is clear arm64: Document ICC_CTLR_EL3.PMHE setting requirements arm64: Relax ICC_PMR_EL1 accesses when ICC_CTLR_EL1.PMHE is clear * for-next/double-page-fault: : Avoid a double page fault in __copy_from_user_inatomic() if hw does not support auto Access Flag mm: fix double page fault on arm64 if PTE_AF is cleared x86/mm: implement arch_faults_on_old_pte() stub on x86 arm64: mm: implement arch_faults_on_old_pte() on arm64 arm64: cpufeature: introduce helper cpu_has_hw_af() * for-next/misc: : Various fixes and clean-ups arm64: kpti: Add NVIDIA's Carmel core to the KPTI whitelist arm64: mm: Remove MAX_USER_VA_BITS definition arm64: mm: simplify the page end calculation in __create_pgd_mapping() arm64: print additional fault message when executing non-exec memory arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill() arm64: pgtable: Correct typo in comment arm64: docs: cpu-feature-registers: Document ID_AA64PFR1_EL1 arm64: cpufeature: Fix typos in comment arm64/mm: Poison initmem while freeing with free_reserved_area() arm64: use generic free_initrd_mem() arm64: simplify syscall wrapper ifdeffery * for-next/kselftest-arm64-signal: : arm64-specific kselftest support with signal-related test-cases kselftest: arm64: fake_sigreturn_misaligned_sp kselftest: arm64: fake_sigreturn_bad_size kselftest: arm64: fake_sigreturn_duplicated_fpsimd kselftest: arm64: fake_sigreturn_missing_fpsimd kselftest: arm64: fake_sigreturn_bad_size_for_magic0 kselftest: arm64: fake_sigreturn_bad_magic kselftest: arm64: add helper get_current_context kselftest: arm64: extend test_init functionalities kselftest: arm64: mangle_pstate_invalid_mode_el[123][ht] kselftest: arm64: mangle_pstate_invalid_daif_bits kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils kselftest: arm64: extend toplevel skeleton Makefile * for-next/kaslr-diagnostics: : Provide diagnostics on boot for KASLR arm64: kaslr: Check command line before looking for a seed arm64: kaslr: Announce KASLR status on boot commit d575c9b7c8b4c5ddfb1aa75ac91fdcc20ce328c4 Author: Miquel Raynal Date: Fri Nov 8 15:07:44 2019 +0100 spi: zynq-qspi: Support two chip selects The Zynq QSPI controller features 2 CS. When the num-cs DT property is set to 2, the hardware will be initialized to support having two devices connected over each CS. In this case, both CS lines are driven by the state of the U_PAGE (upper page) bit. When unset, the lower page (CS0) is selected, otherwise it is the upper page (CS1). Change tested on a custom design featuring two SPI-NORs with different CS on the Zynq-7000 QSPI bus. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191108140744.1734-8-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 8f16292d8b492ca6b0d58ac0769de1c1a7bbb544 Author: Miquel Raynal Date: Fri Nov 8 15:07:43 2019 +0100 spi: zynq-qspi: Do the actual hardware initialization later in the probe Supporting more than one CS will need some tweaking of the linear configuration register which is (rightfully) initialized in the hardware initialization helper. The extra initialization needs the knowledge of the actual number of CS, which is retrieved by reading the value of the num-cs DT property. As the initialization helper is called pretty early and might be called much later in the probe without side effect, let's delay it a bit so that the number of CS will be available when running this helper. This way, adding support for multiple CS lines in a next patch will be eased. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191108140744.1734-7-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit dffaf7439979e6dbb820633bb4f44dcadcac847e Author: Miquel Raynal Date: Fri Nov 8 15:07:42 2019 +0100 spi: zynq-qspi: Clarify the select chip function The code used to assert and de-assert a chip select line is very complicated for no reason. Simplify the logic by either setting or resetting the concerned bit, which actually only changes an electrical state. Update the comment to reflect that there is no possibility to actually choose a CS as the default (CS0) will be driven in any case. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191108140744.1734-6-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 044ac826200f08adebe3207a618d829279e9f3b1 Author: Miquel Raynal Date: Fri Nov 8 15:07:41 2019 +0100 spi: zynq-qspi: Enhance the Linear CFG bit definitions Using masks makes sense when manipulating fields of several bits. When only one bit is involved, it is usual to just use the BIT() macro but in this case using the term mask is abusive. Fix the #define macros and their comments. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191108140744.1734-5-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 941be723735113028361c4664cd10134d3d27006 Author: Miquel Raynal Date: Fri Nov 8 15:07:40 2019 +0100 spi: zynq-qspi: Keep the bitfields naming consistent Most of the bits/bitfields #define'd in this driver are composed with: 1/ the driver prefix 2/ the name of the register they apply to Keep the naming consistent by applying this rule to the CONFIG register internals. These definitions will be used in a following change set. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191108140744.1734-4-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 087622d09472f96f1f5d6ced36ca75c92e86af21 Author: Miquel Raynal Date: Fri Nov 8 15:07:38 2019 +0100 spi: zynq-qspi: Anything else than CS0 is not supported yet Unlike what the driver is currently advertizing, CS0 only can be used, CS1 is not supported at all. Prevent people to use CS1. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191108140744.1734-2-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 2203e1adb936a92ab2fd8f705e888af322462736 Author: Mark Brown Date: Fri Nov 8 17:12:44 2019 +0000 arm64: kaslr: Check command line before looking for a seed Now that we print diagnostics at boot the reason why we do not initialise KASLR matters. Currently we check for a seed before we check if the user has explicitly disabled KASLR on the command line which will result in misleading diagnostics so reverse the order of those checks. We still parse the seed from the DT early so that if the user has both provided a seed and disabled KASLR on the command line we still mask the seed on the command line. Signed-off-by: Mark Brown Acked-by: Mark Rutland Signed-off-by: Catalin Marinas commit 294a9ddde6cdbf931a28b8c8c928d3f799b61cb5 Author: Mark Brown Date: Fri Nov 8 17:12:43 2019 +0000 arm64: kaslr: Announce KASLR status on boot Currently the KASLR code is silent at boot unless it forces on KPTI in which case a message will be printed for that. This can lead to users incorrectly believing their system has the feature enabled when it in fact does not, and if they notice the problem the lack of any diagnostics makes it harder to understand the problem. Add an initcall which prints a message showing the status of KASLR during boot to make the status clear. This is particularly useful in cases where we don't have a seed. It seems to be a relatively common error for system integrators and administrators to enable KASLR in their configuration but not provide the seed at runtime, often due to seed provisioning breaking at some later point after it is initially enabled and verified. Signed-off-by: Mark Brown Acked-by: Mark Rutland Signed-off-by: Catalin Marinas commit 2a67803e1305b6b829b361e0b2f243aafcddab0b Author: Mao Wenan Date: Fri Nov 1 19:40:54 2019 +0800 nfsd: Drop LIST_HEAD where the variable it declares is never used. The declarations were introduced with the file, but the declared variables were not used. Fixes: 65294c1f2c5e ("nfsd: add a new struct file caching facility to nfsd") Signed-off-by: Mao Wenan Signed-off-by: J. Bruce Fields commit cc1ce2f13ea1c13d7f1f322146b01446d9f7ad8b Author: J. Bruce Fields Date: Tue Oct 29 16:02:18 2019 -0400 nfsd: document callback_wq serialization of callback code The callback code relies on the fact that much of it is only ever called from the ordered workqueue callback_wq, and this is worth documenting. Reported-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 20428a8047eac2fe3b493b454232dfd18d7f3d34 Author: J. Bruce Fields Date: Tue Oct 22 12:29:37 2019 -0400 nfsd: mark cb path down on unknown errors An unexpected error is probably a sign that something is wrong with the callback path. Signed-off-by: J. Bruce Fields commit 2bbfed98a4d82ac4e7abfcd4eba40bddfc670b1d Author: Trond Myklebust Date: Wed Oct 23 17:43:18 2019 -0400 nfsd: Fix races between nfsd4_cb_release() and nfsd4_shutdown_callback() When we're destroying the client lease, and we call nfsd4_shutdown_callback(), we must ensure that we do not return before all outstanding callbacks have terminated and have released their payloads. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 12357f1b2c8e0d06f34a045498d4a1e7877153ee Author: Trond Myklebust Date: Thu Nov 7 17:11:57 2019 -0500 nfsd: minor 4.1 callback cleanup Move all the cb_holds_slot management into helper functions. No change in behavior. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 53dbc27ad5a93932ff1892a8e4ef266827d74a0f Author: Alex Deucher Date: Thu Nov 7 09:50:18 2019 -0500 drm/amdgpu/powerplay: fix AVFS handling with custom powerplay table When a custom powerplay table is provided, we need to update the OD VDDC flag to avoid AVFS being enabled when it shouldn't be. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205393 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 558491dda004b8fc60fef0fcf2329f5bf0e53b08 Author: Kenneth Feng Date: Fri Nov 8 13:20:30 2019 +0800 drm/amd/powerplay: dynamically disable ds and ulv for compute This is to improve the performance in the compute mode for vega10. For example, the original performance for a rocm bandwidth test: 2G internal GPU copy, is about 99GB/s. With the idle power features disabled dynamically, the porformance is promoted to about 215GB/s. Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 875dc7c4ff224afd4e3c61a7b4e06d4600dd8c0a Author: Evan Quan Date: Thu Nov 7 15:33:50 2019 +0800 drm/amd/powerplay: correct Arcturus OD support OD is not supported on Arcturus. Thus the pp_od_clk_voltage sysfs interface is also not supported. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit eebc7f4d7ffa09f2a620bd1e2c67ddd579118af9 Author: changzhu Date: Thu Nov 7 14:09:27 2019 +0800 drm/amdgpu: allow direct upload save restore list for raven2 It will cause modprobe atombios stuck problem in raven2 if it doesn't allow direct upload save restore list from gfx driver. So it needs to allow direct upload save restore list for raven2 temporarily. Signed-off-by: changzhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit dc10218da86b2ab40b9471c05edd53a9097c29c3 Author: Stephen Rothwell Date: Fri Nov 8 16:31:10 2019 +1100 drm/sched: struct completion requires linux/completion.h inclusion Fixes: 83a7772ba223 ("drm/sched: Use completion to wait for sched->thread idle v2.") Signed-off-by: Stephen Rothwell Signed-off-by: Alex Deucher commit 7e16f581a81759bafea04d049134b32d1a881226 Author: Steven Rostedt (VMware) Date: Fri Nov 8 12:26:46 2019 -0500 ftrace: Separate out functionality from ftrace_location_range() Create a new function called lookup_rec() from the functionality of ftrace_location_range(). The difference between lookup_rec() is that it returns the record that it finds, where as ftrace_location_range() returns only if it found a match or not. The lookup_rec() is static, and can be used for new functionality where ftrace needs to find a record of a specific address. Signed-off-by: Steven Rostedt (VMware) commit 714641c3670cdc75371a7ff5bdfd5e9a170c7ffd Author: Steven Rostedt (VMware) Date: Fri Nov 8 12:25:46 2019 -0500 ftrace: Separate out the copying of a ftrace_hash from __ftrace_hash_move() Most of the functionality of __ftrace_hash_move() can be reused, but not all of it. That is, __ftrace_hash_move() is used to simply make a new hash from an existing one, using the same size as the original. Creating a dup_hash(), where we can specify a new size will be useful when we want to create a hash with a default size, or simply copy the old one. Signed-off-by: Steven Rostedt (VMWare) commit 7f6ac72946b88b89ee44c1c527aa8591ac5ffcbe Author: Stephen Kitt Date: Sat Oct 19 16:06:34 2019 +0200 clk/ti/adpll: allocate room for terminating null The buffer allocated in ti_adpll_clk_get_name doesn't account for the terminating null. This patch switches to devm_kasprintf to avoid overflowing. Signed-off-by: Stephen Kitt Link: https://lkml.kernel.org/r/20191019140634.15596-1-steve@sk2.org Acked-by: Tony Lindgren Signed-off-by: Stephen Boyd commit 3696eebd810cf084b3662d3c3b85cd84b61090f3 Author: Andrew Jeffery Date: Thu Oct 10 12:37:25 2019 +1030 clk: ast2600: Add RMII RCLK gates for all four MACs RCLK is a fixed 50MHz clock derived from HPLL/HCLK that is described by a single gate for each MAC. Signed-off-by: Andrew Jeffery Link: https://lkml.kernel.org/r/20191010020725.3990-3-andrew@aj.id.au Reviewed-by: Joel Stanley Signed-off-by: Stephen Boyd commit 309d673e9596f9706e72615583f2f689cf3fbfb5 Merge: 54ecb8f7028c d8d9ad83a497 Author: Stephen Boyd Date: Fri Nov 8 08:40:49 2019 -0800 Merge tag 'aspeed-5.5-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into clk-aspeed Pull ASPEED clk dt binding updates from Joel Stanley * tag 'aspeed-5.5-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: dt-bindings: clock: Add AST2600 RMII RCLK gate definitions dt-bindings: clock: Add AST2500 RMII RCLK definitions commit e620a1e061c4738e26c3edf2abaae7842532cd80 Author: Stephen Kitt Date: Fri Sep 27 20:51:10 2019 +0200 drivers/clk: convert VL struct to struct_size There are a few manually-calculated variable-length struct allocations left, this converts them to use struct_size. Found with the following git grep command git grep -A1 'kzalloc.*sizeof[^_].*+' Signed-off-by: Stephen Kitt Link: https://lkml.kernel.org/r/20190927185110.29897-1-steve@sk2.org Acked-by: Gustavo A. R. Silva [sboyd@kernel.org: Add grep command] Signed-off-by: Stephen Boyd commit 4e60a9568dc6f411d4f631fe33b5553d080b7e8c Author: Brian Masney Date: Fri Nov 8 14:53:49 2019 +0200 interconnect: qcom: add msm8974 driver Add driver for the Qualcomm MSM8974 interconnect providers that support setting system bandwidth requirements between various network-on-chip fabrics. Signed-off-by: Brian Masney Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191024103054.9770-3-masneyb@onstation.org Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20191108125349.24191-3-georgi.djakov@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6120e5d821c0e3104ddbc2ad5dd126e0c9eb20f2 Author: Brian Masney Date: Fri Nov 8 14:53:48 2019 +0200 dt-bindings: interconnect: qcom: add msm8974 bindings Add device tree bindings for the Qualcomm MSM8974 interconnect providers that support setting system bandwidth requirements between various network-on-chip fabrics. Signed-off-by: Brian Masney Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191024103054.9770-2-masneyb@onstation.org Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20191108125349.24191-2-georgi.djakov@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7ad295d5196a58c22abecef62dd4f99e2f86e831 Author: Jinke Fan Date: Tue Nov 5 16:39:43 2019 +0800 rtc: Fix the AltCentury value on AMD/Hygon platform When using following operations: date -s "21190910 19:20:00" hwclock -w to change date from 2019 to 2119 for test, it will fail on Hygon Dhyana and AMD Zen CPUs, while the same operations run ok on Intel i7 platform. MC146818 driver use function mc146818_set_time() to set register RTC_FREQ_SELECT(RTC_REG_A)'s bit4-bit6 field which means divider stage reset value on Intel platform to 0x7. While AMD/Hygon RTC_REG_A(0Ah)'s bit4 is defined as DV0 [Reference]: DV0 = 0 selects Bank 0, DV0 = 1 selects Bank 1. Bit5-bit6 is defined as reserved. DV0 is set to 1, it will select Bank 1, which will disable AltCentury register(0x32) access. As UEFI pass acpi_gbl_FADT.century 0x32 (AltCentury), the CMOS write will be failed on code: CMOS_WRITE(century, acpi_gbl_FADT.century). Correct RTC_REG_A bank select bit(DV0) to 0 on AMD/Hygon CPUs, it will enable AltCentury(0x32) register writing and finally setup century as expected. Test results on Intel i7, AMD EPYC(17h) and Hygon machine show that it works as expected. Compiling for sparc64 and alpha architectures are passed. Reference: https://www.amd.com/system/files/TechDocs/51192_Bolton_FCH_RRG.pdf section: 3.13 Real Time Clock (RTC) Reported-by: kbuild test robot Signed-off-by: Jinke Fan Link: https://lore.kernel.org/r/20191105083943.115320-1-fanjinke@hygon.cn Signed-off-by: Alexandre Belloni commit afe19a7ae8b6b6032d04d3895ebd5bbac7fe9f30 Author: Colin Ian King Date: Wed Nov 6 08:34:18 2019 +0000 rtc: bd70528: fix module alias to autoload module The module alias platform tag contains a spelling mistake. Fix it. Fixes: f33506abbcdd ("rtc: bd70528: Add MODULE ALIAS to autoload module") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191106083418.159045-1-colin.king@canonical.com Signed-off-by: Alexandre Belloni commit 2b91b28e29f6491efbe77694c17465a3054f37cf Author: Darrick J. Wong Date: Thu Nov 7 07:28:18 2019 -0800 iomap: iomap_bmap should check iomap_apply return value Coverity caught this fairly minor bug, but we should check the return value of iomap_apply regardless. Coverity-id: 1437065 Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 23f61b9fc5cc10d87f66e50518707eec2a0fbda1 Author: Robert Richter Date: Tue Nov 5 20:07:51 2019 +0000 EDAC/ghes: Fix locking and memory barrier issues The ghes registration and refcount is broken in several ways: * ghes_edac_register() returns with success for a 2nd instance even if a first instance's registration is still running. This is not correct as the first instance may fail later. A subsequent registration may not finish before the first. Parallel registrations must be avoided. * The refcount was increased even if a registration failed. This leads to stale counters preventing the device from being released. * The ghes refcount may not be decremented properly on unregistration. Always decrement the refcount once ghes_edac_unregister() is called to keep the refcount sane. * The ghes_pvt pointer is handed to the irq handler before registration finished. * The mci structure could be freed while the irq handler is running. Fix this by adding a mutex to ghes_edac_register(). This mutex serializes instances to register and unregister. The refcount is only increased if the registration succeeded. This makes sure the refcount is in a consistent state after registering or unregistering a device. Note: A spinlock cannot be used here as the code section may sleep. The ghes_pvt is protected by ghes_lock now. This ensures the pointer is not updated before registration was finished or while the irq handler is running. It is unset before unregistering the device including necessary (implicit) memory barriers making the changes visible to other CPUs. Thus, the device can not be used anymore by an interrupt. Also, rename ghes_init to ghes_refcount for better readability and switch to refcount API. A refcount is needed because there can be multiple GHES structures being defined (see ACPI 6.3 specification, 18.3.2.7 Generic Hardware Error Source, "Some platforms may describe multiple Generic Hardware Error Source structures with different notification types, ..."). Another approach to use the mci's device refcount (get_device()) and have a release function does not work here. A release function will be called only for device_release() with the last put_device() call. The device must be deleted *before* that with device_del(). This is only possible by maintaining an own refcount. [ bp: touchups. ] Fixes: 0fe5f281f749 ("EDAC, ghes: Model a single, logical memory controller") Fixes: 1e72e673b9d1 ("EDAC/ghes: Fix Use after free in ghes_edac remove path") Co-developed-by: James Morse Signed-off-by: James Morse Co-developed-by: Borislav Petkov Signed-off-by: Borislav Petkov Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Cc: "linux-edac@vger.kernel.org" Cc: Mauro Carvalho Chehab Cc: Tony Luck Link: https://lkml.kernel.org/r/20191105200732.3053-1-rrichter@marvell.com commit d158367682cd822aca811971e988be6a8d8f679f Author: Tudor Ambarus Date: Fri Nov 1 16:40:37 2019 +0000 crypto: atmel - Fix selection of CRYPTO_AUTHENC The following error is raised when CONFIG_CRYPTO_DEV_ATMEL_AES=y and CONFIG_CRYPTO_DEV_ATMEL_AUTHENC=m: drivers/crypto/atmel-aes.o: In function `atmel_aes_authenc_setkey': atmel-aes.c:(.text+0x9bc): undefined reference to `crypto_authenc_extractkeys' Makefile:1094: recipe for target 'vmlinux' failed Fix it by moving the selection of CRYPTO_AUTHENC under config CRYPTO_DEV_ATMEL_AES. Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...") Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit df40c4e6cdaaacbf26d1206adb2419733de3bbf1 Author: Chuhong Yuan Date: Fri Nov 1 22:37:15 2019 +0800 crypto: inside-secure - Add missed clk_disable_unprepare safexcel_remove misses disabling priv->reg_clk like what is done when probe fails. Add the missed call to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Herbert Xu commit 1e67ee9344abbbd35ee286d641461faecf43933f Author: Zhou Wang Date: Fri Nov 1 20:21:49 2019 +0800 crypto: hisilicon - replace #ifdef with IS_ENABLED for CONFIG_NUMA Replace #ifdef CONFIG_NUMA with IS_ENABLED(CONFIG_NUMA) to fix kbuild error. Fixes: 700f7d0d29c7 ("crypto: hisilicon - fix to return...") Signed-off-by: Zhou Wang Reported-by: kbuild test robot Acked-by: Olof Johansson Signed-off-by: Herbert Xu commit 44eff4ad18de75bbc36f98eaa23301da5b81b178 Author: kbuild test robot Date: Fri Nov 1 09:55:34 2019 +0100 crypto: sun8i-ss - fix memdup.cocci warnings Use kmemdup rather than duplicating its implementation Generated by: scripts/coccinelle/api/memdup.cocci Fixes: f08fcced6d00 ("crypto: allwinner - Add sun8i-ss cryptographic offloader") CC: Corentin Labbe Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu commit 09b6816437514e2e857f6ad7fe07c668989b7399 Author: kbuild test robot Remove unneeded semicolon Date: Fri Nov 1 09:52:06 2019 +0100 crypto: sun8i-ss - fix semicolon.cocci warnings Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: f08fcced6d00 ("crypto: allwinner - Add sun8i-ss cryptographic offloader") CC: Corentin Labbe Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 746c908c4d72e49068ab216c3926d2720d71a90d Author: Christian Lamparter Date: Thu Oct 31 17:14:38 2019 +0100 crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr This patch fixes a crash that can happen during probe when the available dma memory is not enough (this can happen if the crypto4xx is built as a module). The descriptor window mapping would end up being free'd twice, once in crypto4xx_build_pdr() and the second time in crypto4xx_destroy_sdr(). Fixes: 5d59ad6eea82 ("crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak") Cc: Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu commit 6a101349f8a71ec5f9466e61f22306b68ef49600 Author: Zaibo Xu Date: Thu Oct 31 16:34:30 2019 +0800 MAINTAINERS: Add maintainer for HiSilicon TRNG V2 driver Here adds maintainer information for HiSilicon TRNG V2 driver. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 3e90efd129593cf693d721e13f031f760d5a6343 Author: Zaibo Xu Date: Thu Oct 31 16:34:29 2019 +0800 hwrng: hisi - add HiSilicon TRNG driver support This series adds HiSilicon true random number generator(TRNG) driver in hw_random subsystem. Signed-off-by: Zaibo Xu Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit c3e12e66b14a043daac6b3d0559df80b9ed7679c Author: Matti Vaittinen Date: Wed Oct 23 14:47:11 2019 +0300 rtc: bd70528: Add MODULE ALIAS to autoload module The bd70528 RTC driver is probed by MFD driver. Add MODULE_ALIAS in order to allow udev to load the module when MFD sub-device cell for RTC is added. I'm not sure if this is a bugfix or feature addition but I guess fixes tag won't harm in this case. Fixes: 32a4a4ebf768 ("rtc: bd70528: Initial support for ROHM bd70528 RTC") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/20191023114711.GA13954@localhost.localdomain Signed-off-by: Alexandre Belloni commit 394c051d0fe2d94254522514d4454338f266e98d Author: Ilya Ledvich Date: Fri Nov 1 11:54:22 2019 +0200 rtc: em3027: correct month value The RTC month value is 1-indexed, but the kernel assumes it is 0-indexed. This may result in the RTC not rolling over correctly. Signed-off-by: Ilya Ledvich Reviewed-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191101095422.14787-1-ilya@compulab.co.il Signed-off-by: Alexandre Belloni commit 94303f8930ed78aea0f189b703c9d79fff9555d7 Author: Chuhong Yuan Date: Wed Nov 6 00:00:43 2019 +0800 rtc: brcmstb-waketimer: add missed clk_disable_unprepare This driver forgets to disable and unprepare clock when remove. Add a call to clk_disable_unprepare to fix it. Fixes: c4f07ecee22e ("rtc: brcmstb-waketimer: Add Broadcom STB wake-timer") Signed-off-by: Chuhong Yuan Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20191105160043.20018-1-hslester96@gmail.com Signed-off-by: Alexandre Belloni commit 0e8431379e3c451067a49080c5ef619a0c633a8d Author: Alexandre Belloni Date: Wed Oct 16 22:14:14 2019 +0200 rtc: cros-ec: let the core handle rtc range Let the rtc core check the date/time against the RTC range. Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20191016201414.30934-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 4fc0d13f80a66170283695ed228509b524db818e Author: Alexandre Belloni Date: Wed Oct 16 22:14:13 2019 +0200 rtc: cros-ec: remove superfluous error message The RTC core now has error messages in case of registration failure, there is no need to have other messages in the drivers. Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20191016201414.30934-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit d5e6dd9f5c75daa0b1fe4e1b658482398f401af6 Author: Alexandre Belloni Date: Mon Oct 21 17:58:05 2019 +0200 rtc: sirfsoc: remove .remove dpm_sysfs_remove() and device_pm_remove() are already called by device_del() on device removal so there is no need to call device_init_wakeup(dev, false) from the driver and it allows to remove the .remove callback. Link: https://lore.kernel.org/r/20191021155806.3625-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit c202ec09ceebbd5687554e7fc6a494c9fbcbb570 Author: Alexandre Belloni Date: Mon Oct 21 17:58:06 2019 +0200 rtc: sc27xx: remove .remove dpm_sysfs_remove() and device_pm_remove() are already called by device_del() on device removal so there is no need to call device_init_wakeup(dev, false) from the driver and it allows to remove the .remove callback. Link: https://lore.kernel.org/r/20191021155806.3625-4-alexandre.belloni@bootlin.com Reviewed-by: Baolin Wang Signed-off-by: Alexandre Belloni commit aef069a277dc716eec41a15b68cef617688cd794 Author: Alexandre Belloni Date: Mon Oct 21 17:58:04 2019 +0200 rtc: lpc32xx: remove .remove dpm_sysfs_remove() and device_pm_remove() are already called by device_del() on device removal so there is no need to call device_init_wakeup(dev, false) from the driver and it allows to remove the .remove callback. Link: https://lore.kernel.org/r/20191021155806.3625-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit daa2695fcfdcb5ae31c12942a9a1189bff76a772 Author: Alexandre Belloni Date: Mon Oct 21 17:58:03 2019 +0200 rtc: ab-b5ze-s3: remove .remove dpm_sysfs_remove() and device_pm_remove() are already called by device_del() on device removal so there is no need to call device_init_wakeup(dev, false) from the driver and it allows to remove the .remove callback. Link: https://lore.kernel.org/r/20191021155806.3625-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 3e74ddaa7ca06f4c41bc3c83286534cb7ebc90eb Author: Alexandre Belloni Date: Mon Oct 21 17:56:31 2019 +0200 rtc: disallow update interrupts when time is invalid Never enable update interrupts when the time set on the rtc is invalid. In that case, also avoid enabling the emulation because it will fail for the same reason. Link: https://lore.kernel.org/r/20191021155631.3342-2-alexandre.belloni@bootlin.com Link: https://lore.kernel.org/r/CA+ASDXMarBG5C1Kz42B9i_iVZ1=i6GgH9Yja2cdmSueKD_As_g@mail.gmail.com Reported-by: Jeffy Chen Reported-by: Brian Norris Signed-off-by: Alexandre Belloni commit 7e7c005b4b1f1f169bcc4b2c3a40085ecc663df2 Author: Alexandre Belloni Date: Mon Oct 21 01:13:20 2019 +0200 rtc: disable uie before setting time and enable after When setting the time in the future with the uie timer enabled, rtc_timer_do_work will loop for a while because the expiration of the uie timer was way before the current RTC time and a new timer will be enqueued until the current rtc time is reached. If the uie timer is enabled, disable it before setting the time and enable it after expiring current timers (which may actually be an alarm). This is the safest thing to do to ensure the uie timer is still synchronized with the RTC, especially in the UIE emulation case. Reported-by: syzbot+08116743f8ad6f9a6de7@syzkaller.appspotmail.com Fixes: 6610e0893b8b ("RTC: Rework RTC code to use timerqueue for events") Link: https://lore.kernel.org/r/20191020231320.8191-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit bb451661db2462709674d156e8ca137fbfd3da6c Author: Alexandre Belloni Date: Wed Oct 16 22:12:23 2019 +0200 rtc: fsl-ftm-alarm: avoid struct rtc_time conversions Directly call ktime_get_real_seconds instead of converting the result to a struct rtc_time and then back to a time64_t. Link: https://lore.kernel.org/r/20191016201223.30568-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 9323e9631c8502a08a92b831db55ce9c7434d1bd Author: Alexandre Belloni Date: Wed Oct 16 22:12:22 2019 +0200 rtc: fsl-ftm-alarm: switch to rtc_time64_to_tm/rtc_tm_to_time64 Call the 64bit versions of rtc_tm time conversion to avoid the y2038 issue. Link: https://lore.kernel.org/r/20191016201223.30568-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit db2a4af115c4d421bbde6ffedb67112134e3ccd2 Author: Alexandre Belloni Date: Wed Oct 16 22:12:21 2019 +0200 rtc: fsl-ftm-alarm: switch to ktime_get_real_seconds The driver drops the nanoseconds part of the timespec64, there is no need to call ktime_get_real_ts64. Link: https://lore.kernel.org/r/20191016201223.30568-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit a970429366ceface03beded582b911277f8f2570 Author: Colin Ian King Date: Tue Oct 29 11:32:30 2019 +0000 crypto: amlogic - ensure error variable err is set before returning it Currently when the call to crypto_engine_alloc_init fails the error return path returns an uninitialized value in the variable err. Fix this by setting err to -ENOMEM. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 48fe583fe541 ("crypto: amlogic - Add crypto accelerator for amlogic GXL") Signed-off-by: Colin Ian King Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit d832a6128558503feb6ab18ac6e2cdefbc32e5a9 Author: YueHaibing Date: Tue Oct 29 01:55:23 2019 +0000 crypto: amlogic - Use kmemdup in meson_aes_setkey() Use kmemdup rather than duplicating its implementation Signed-off-by: YueHaibing Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 427e6e3ad98ce17dae2ef61f56664c7b97745320 Author: Herbert Xu Date: Mon Oct 28 15:45:02 2019 +0800 crypto: atmel - Fix remaining endianess warnings This patch fixes the remaining sparse endianness warnings. Signed-off-by: Herbert Xu commit 1520c72596dde7f22b8bd6bed3ef7df2b8b7ef39 Author: Herbert Xu Date: Mon Oct 28 15:39:07 2019 +0800 crypto: atmel - Fix authenc support when it is set to m As it is if CONFIG_CRYPTO_DEV_ATMEL_AUTHENC is set to m it is in effect disabled. This patch fixes it by using IS_ENABLED instead of ifdef. Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...") Signed-off-by: Herbert Xu Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 44bdc2fb63aafaa5984caf7d1e9d2b6d0d381766 Author: Colin Ian King Date: Sun Oct 6 15:29:56 2019 +0100 ata: pata_artop: make arrays static const, makes object smaller Don't populate the const arrays on the stack but instead make them static. Makes the object code smaller by 292 bytes. Before: text data bss dec hex filename 6988 3132 128 10248 2808 drivers/ata/pata_artop.o After: text data bss dec hex filename 6536 3292 128 9956 26e4 drivers/ata/pata_artop.o (gcc version 9.2.1, amd64) Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe commit 6952a7f8446ee85ea9d10ab87b64797a031eaae3 Author: Ming Lei Date: Fri Nov 8 18:15:28 2019 +0800 block: split bio if the only bvec's length is > SZ_4K 64K PAGE_SIZE is popular on ARM64 or other ARCHs, and 64K has been big enough to break some devices probably, so change the logic to split bio if the only bvec's length is > SZ_4K instead of PAGE_SIZE. Fixes: fa5322872187 (block: avoid blk_bio_segment_split for small I/O operations) Cc: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 59db8ba2f6528a9c39668f9ed8c81eac1dff3b38 Author: Ming Lei Date: Fri Nov 8 18:15:27 2019 +0800 block: still try to split bio if the bvec crosses pages Some device may set segment boundary as PAGE_SIZE - 1. If the bvec crosses pages, and meantime its length is <= PAGE_SIZE, we still need to split the bvec into 2 segments. Fixes this issue by still splitting bio if the single bvec crosses pages. Reported-by: kernel test robot Fixes: fa5322872187 (block: avoid blk_bio_segment_split for small I/O operations) Cc: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 6a34367e52caea1413eb0a0dcbb524f0c9b67e82 Author: Takashi Iwai Date: Thu Nov 7 20:20:08 2019 +0100 ALSA: timer: Fix possible race at assigning a timer instance When a new timer instance is created and assigned to the active link in snd_timer_open(), the caller still doesn't (can't) set its callback and callback data. In both the user-timer and the sequencer-timer code, they do manually set up the callbacks after calling snd_timer_open(). This has a potential risk of race when the timer instance is added to the already running timer target, as the callback might get triggered during setting up the callback itself. This patch tries to address it by changing the API usage slightly: - An empty timer instance is created at first via the new function snd_timer_instance_new(). This object isn't linked to the timer list yet. - The caller sets up the callbacks and others stuff for the new timer instance. - The caller invokes snd_timer_open() with this instance, so that it's linked to the target timer. For closing, do similarly: - Call snd_timer_close(). This unlinks the timer instance from the timer list. - Free the timer instance via snd_timer_instance_free() after that. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191107192008.32331-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 33bbb8a0ecd142fb5e78f26f3a0b927ae77c30e7 Author: Takashi Iwai Date: Thu Nov 7 20:20:07 2019 +0100 ALSA: timer: Make snd_timer_close() returning void The function doesn't return any useful value, so let's make it void to be clearer. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191107192008.32331-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit ebfc6de29ae8e48f91e280fd37539188b5252b38 Author: Takashi Iwai Date: Thu Nov 7 20:20:06 2019 +0100 ALSA: timer: Unify master/slave linking code The code in both snd_timer_check_master() and snd_timer_check_slave() are almost identical, both check whether the master/slave link and does linkage. Factor out the common code and call it from both functions for readability. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191107192008.32331-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 61b7805a9b25bc1a31386c904fb5b03512c801c7 Author: YueHaibing Date: Fri Nov 8 01:35:43 2019 +0000 gpio: xgs-iproc: Fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Signed-off-by: Linus Walleij commit 6b240aeb121ec14a528a58413baa9a74f8749604 Merge: 1173c3c28abf 70d97e099bb4 Author: Linus Walleij Date: Fri Nov 8 14:10:38 2019 +0100 Merge branch 'devel' into for-next commit 70d97e099bb426ecb3ad4bf31e88dbf2ef4b2e4c Author: Linus Walleij Date: Fri Nov 8 13:37:54 2019 +0100 Revert "gpio: expose pull-up/pull-down line flags to userspace" This reverts commit 8c550e94b8835170593169a45b5ba30d3fc72a70. This was prematurely applied and we need to back it out to merge a better version of the development track for this feature. Signed-off-by: Linus Walleij commit 16299326a0cbbc88d4d6491a8ceebbfca81064c5 Author: Keyon Jie Date: Fri Nov 1 12:09:15 2019 -0500 ASoC: SOF: Intel: hda: set L1SEN on S0ix suspend Set L1SEN to make sure the system can enter S0ix, and restore it on resume. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101170916.26517-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8cd73ce7ba6381feb9df763240dee3a6d4aff1ca Author: Keyon Jie Date: Fri Nov 1 12:09:14 2019 -0500 ASoC: SOF: topology: fix missing NULL pointer check Add check to avoid possible NULL pointer dereference issue. This issue was reported by static analysis tools, we didn't face this issue but we can't rule it out either as a false positive. Reported-by: Keqiao Zhang Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101170916.26517-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9b10fa363baf3a506b089f3df3a5afd5e2f244db Author: Miquel Raynal Date: Fri Nov 8 11:59:15 2019 +0100 spi: zynq-qspi: Keep the naming consistent across the driver In this driver (and also in a lot of other drivers in drivers/spi/), the spi_controller structure is sometimes referred as 'ctlr' and sometimes as 'ctrl'. Grepping there shows that 'ctlr' seems to be more common so keep the naming consistent in this driver and s/ctrl/ctlr/. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191108105920.19014-3-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit bd0b609e0c3362cb167c51d4bd4330d79fc00987 Author: Takashi Iwai Date: Thu Nov 7 14:48:33 2019 +0100 ASoC: core: Fix compile warning with CONFIG_DEBUG_FS=n Paper over a compile warning: sound/soc/soc-pcm.c:1185:8: warning: unused variable ‘name’ Fixes: 0632fa042541 ("ASoC: core: Fix pcm code debugfs error") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191107134833.1502-1-tiwai@suse.de Signed-off-by: Mark Brown commit ea0d11c9dd95d685fe94299847446e6ad9594c39 Author: Ulf Hansson Date: Wed Oct 16 16:16:27 2019 +0200 PM / core: Clean up some function headers in power.h The power.h is a bit messy due to the various existing CONFIG_PM* Kconfig combinations. However the final section for wakeup_source_sysfs*() can be moved inside one of the existing sections rather than adding yet another one, so let's do that to clean up the code a little bit. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit cd7056ae34af0e9424da97bbc7d2b38246ba8a2c Merge: a4b28f5c6798 ef2e78ddadbb Author: Marc Zyngier Date: Fri Nov 8 11:27:29 2019 +0000 Merge remote-tracking branch 'kvmarm/misc-5.5' into kvmarm/next commit ef2e78ddadbb939ce79553b10dee0131d65d8f3e Author: Marc Zyngier Date: Thu Nov 7 16:04:12 2019 +0000 KVM: arm64: Opportunistically turn off WFI trapping when using direct LPI injection Just like we do for WFE trapping, it can be useful to turn off WFI trapping when the physical CPU is not oversubscribed (that is, the vcpu is the only runnable process on this CPU) *and* that we're using direct injection of interrupts. The conditions are reevaluated on each vcpu_load(), ensuring that we don't switch to this mode on a busy system. On a GICv4 system, this has the effect of reducing the generation of doorbell interrupts to zero when the right conditions are met, which is a huge improvement over the current situation (where the doorbells are screaming if the CPU ever hits a blocking WFI). Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Reviewed-by: Christoffer Dall Link: https://lore.kernel.org/r/20191107160412.30301-3-maz@kernel.org commit 5bd90b0989731520f2cdcfbbe467f1271f3cc803 Author: Marc Zyngier Date: Thu Nov 7 16:04:11 2019 +0000 KVM: vgic-v4: Track the number of VLPIs per vcpu In order to find out whether a vcpu is likely to be the target of VLPIs (and to further optimize the way we deal with those), let's track the number of VLPIs a vcpu can receive. This gets implemented with an atomic variable that gets incremented or decremented on map, unmap and move of a VLPI. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Reviewed-by: Christoffer Dall Link: https://lore.kernel.org/r/20191107160412.30301-2-maz@kernel.org commit 3f484ce3750f7a29c3be806e891de99aa5c4ca43 Author: Cristian Marussi Date: Fri Oct 25 18:57:17 2019 +0100 kselftest: arm64: fake_sigreturn_misaligned_sp Add a simple fake_sigreturn testcase which places a valid sigframe on a non-16 bytes aligned SP. Expects a SIGSEGV on test PASS. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 49978aa8f079633192928cb966dcde39a3ff0747 Author: Cristian Marussi Date: Fri Oct 25 18:57:16 2019 +0100 kselftest: arm64: fake_sigreturn_bad_size Add a simple fake_sigreturn testcase which builds a ucontext_t with a badly sized header that causes a overrun in the __reserved area and place it onto the stack. Expects a SIGSEGV on test PASS. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 46185cd1241b46c94933752137cde18ecfaf3766 Author: Cristian Marussi Date: Fri Oct 25 18:57:15 2019 +0100 kselftest: arm64: fake_sigreturn_duplicated_fpsimd Add a simple fake_sigreturn testcase which builds a ucontext_t with an anomalous additional fpsimd_context and place it onto the stack. Expects a SIGSEGV on test PASS. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 8aa9d08fcb5368777f64d4a7c94899159249f0a0 Author: Cristian Marussi Date: Fri Oct 25 18:57:14 2019 +0100 kselftest: arm64: fake_sigreturn_missing_fpsimd Add a simple fake_sigreturn testcase which builds a ucontext_t without the required fpsimd_context and place it onto the stack. Expects a SIGSEGV on test PASS. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 4c94a0ba02b20068a8e3f80b471dfcedb5c8800a Author: Cristian Marussi Date: Fri Oct 25 18:57:13 2019 +0100 kselftest: arm64: fake_sigreturn_bad_size_for_magic0 Add a simple fake_sigreturn testcase which builds a ucontext_t with a badly sized terminator record and place it onto the stack. Expects a SIGSEGV on test PASS. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 6c2aa4284513585e9cc0c25b125ab4d57ef4ce76 Author: Cristian Marussi Date: Fri Oct 25 18:57:12 2019 +0100 kselftest: arm64: fake_sigreturn_bad_magic Add a simple fake_sigreturn testcase which builds a ucontext_t with a bad magic header and place it onto the stack. Expects a SIGSEGV on test PASS. Introduce a common utility assembly trampoline function to invoke a sigreturn while placing the provided sigframe at wanted alignment and also an helper to make space when needed inside the sigframe reserved area. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 34306b05d3106447c87d29d262e824ca4a30c569 Author: Cristian Marussi Date: Fri Oct 25 18:57:11 2019 +0100 kselftest: arm64: add helper get_current_context Introduce a new common utility function get_current_context() which can be used to grab a ucontext without the help of libc, and also to detect if such ucontext has been successfully used by placing it on the stack as a fake sigframe. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 837387a2cbc719667822856beabac127921a36c4 Author: Cristian Marussi Date: Fri Oct 25 18:57:10 2019 +0100 kselftest: arm64: extend test_init functionalities Extend signal testing framework to allow the definition of a custom per test initialization function to be run at the end of the common test_init after test setup phase has completed and before test-run routine. This custom per-test initialization function also enables the test writer to decide on its own when forcibly skip the test itself using standard KSFT mechanism. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit c2820987047c08d813396b2b1d8ac2894ba0bd5f Author: Cristian Marussi Date: Fri Oct 25 18:57:09 2019 +0100 kselftest: arm64: mangle_pstate_invalid_mode_el[123][ht] Add 6 simple mangle testcases that mess with the ucontext_t from within the signal handler, trying to toggle PSTATE mode bits to trick the system into switching to EL1/EL2/EL3 using both SP_EL0(t) and SP_ELx(h). Expects SIGSEGV on test PASS. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 0fc89f08df8cf9878eb0a1a957f5948f831fbb8c Author: Cristian Marussi Date: Fri Oct 25 18:57:08 2019 +0100 kselftest: arm64: mangle_pstate_invalid_daif_bits Add a simple mangle testcase which messes with the ucontext_t from within the signal handler, trying to set PSTATE DAIF bits to an invalid value (masking everything). Expects SIGSEGV on test PASS. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit f96bf43403165e4478942b0998931b14621ec207 Author: Cristian Marussi Date: Fri Oct 25 18:57:07 2019 +0100 kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils Add some arm64/signal specific boilerplate and utility code to help further testcases' development. Introduce also one simple testcase mangle_pstate_invalid_compat_toggle and some related helpers: it is a simple mangle testcase which messes with the ucontext_t from within the signal handler, trying to toggle PSTATE state bits to switch the system between 32bit/64bit execution state. Expects SIGSEGV on test PASS. Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 313a4db7f3387608a3ab4531ac8c0509a3d7617f Author: Cristian Marussi Date: Fri Oct 25 18:57:06 2019 +0100 kselftest: arm64: extend toplevel skeleton Makefile Modify KSFT arm64 toplevel Makefile to maintain arm64 kselftests organized by subsystem, keeping them into distinct subdirectories under arm64 custom KSFT directory: tools/testing/selftests/arm64/ Add to such toplevel Makefile a mechanism to guess the effective location of Kernel headers as installed by KSFT framework. Fit existing arm64 tags kselftest into this new schema moving them into their own subdirectory (arm64/tags). Reviewed-by: Dave Martin Signed-off-by: Cristian Marussi Signed-off-by: Catalin Marinas commit 51effa6d1153cd67313d183c304cdb49391d9427 Merge: c1c9ea6371e3 8703317ae576 Author: Catalin Marinas Date: Fri Nov 8 10:57:14 2019 +0000 Merge branch 'for-next/perf' into for-next/core - Support for additional PMU topologies on HiSilicon platforms - Support for CCN-512 interconnect PMU - Support for AXI ID filtering in the IMX8 DDR PMU - Support for the CCPI2 uncore PMU in ThunderX2 - Driver cleanup to use devm_platform_ioremap_resource() * for-next/perf: drivers/perf: hisi: update the sccl_id/ccl_id for certain HiSilicon platform perf/imx_ddr: Dump AXI ID filter info to userspace docs/perf: Add AXI ID filter capabilities information perf/imx_ddr: Add driver for DDR PMU in i.MX8MPlus perf/imx_ddr: Add enhanced AXI ID filter support bindings: perf: imx-ddr: Add new compatible string docs/perf: Add explanation for DDR_CAP_AXI_ID_FILTER_ENHANCED quirk arm64: perf: Simplify the ARMv8 PMUv3 event attributes drivers/perf: Add CCPI2 PMU support in ThunderX2 UNCORE driver. Documentation: perf: Update documentation for ThunderX2 PMU uncore driver Documentation: Add documentation for CCN-512 DTS binding perf: arm-ccn: Enable stats for CCN-512 interconnect perf/smmuv3: use devm_platform_ioremap_resource() to simplify code perf/arm-cci: use devm_platform_ioremap_resource() to simplify code perf/arm-ccn: use devm_platform_ioremap_resource() to simplify code perf: xgene: use devm_platform_ioremap_resource() to simplify code perf: hisi: use devm_platform_ioremap_resource() to simplify code commit e6e8df07268c1f75dd9215536e2ce4587b70f977 Author: Kai Shen Date: Thu Nov 7 05:08:17 2019 +0000 cpufreq: Add NULL checks to show() and store() methods of cpufreq Add NULL checks to show() and store() in cpufreq.c to avoid attempts to invoke a NULL callback. Though some interfaces of cpufreq are set as read-only, users can still get write permission using chmod which can lead to a kernel crash, as follows: chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq This bug was found in linux 4.19. Signed-off-by: Kai Shen Reported-by: Feilong Lin Reviewed-by: Feilong Lin Acked-by: Viresh Kumar [ rjw: Subject & changelog ] Cc: All applicable Signed-off-by: Rafael J. Wysocki commit 7973eb13aecfeebe2881c4285b0bedbfe89ff0fd Author: Xiaowei Bao Date: Mon Sep 2 11:43:19 2019 +0800 PCI: layerscape: Add LS1028a support Add support for the LS1028a PCIe controller. Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Acked-by: Minghuan Lian commit 5e5022995683539609b3904213b7d72ab71188b7 Author: Andrew Jeffery Date: Fri Nov 8 15:49:45 2019 +1030 fsi: aspeed: Fix OPB0 byte order register values The data byte order selection registers in the APB2OPB primarily expose some internal plumbing necessary to get correct write accesses onto the OPB. OPB write cycles require "data mirroring" across the 32-bit data bus to support variable data width slaves that don't implement "byte enables". For slaves that do implement byte enables the master can signal which bytes on the data bus the slave should consider valid. The data mirroring behaviour is specified by the following table: +-----------------+----------+-----------------------------------+ | | | 32-bit Data Bus | +---------+-------+----------+---------+---------+-------+-------+ | | | | | | | | | ABus | Mn_BE | Request | Dbus | Dbus | Dbus | Dbus | | (30:31) | (0:3) | Transfer | 0:7 | 8:15 | 16:23 | 24:31 | | | | Size | byte0 | byte1 | byte2 | byte3 | +---------+-------+----------+---------+---------+-------+-------+ | 00 | 1111 | fullword | byte0 | byte1 | byte2 | byte3 | +---------+-------+----------+---------+---------+-------+-------+ | 00 | 1110 | halfword | byte0 | byte1 | byte2 | | +---------+-------+----------+---------+---------+-------+-------+ | 01 | 0111 | byte | _byte1_ | byte1 | byte2 | byte3 | +---------+-------+----------+---------+---------+-------+-------+ | 00 | 1100 | halfword | byte0 | byte1 | | | +---------+-------+----------+---------+---------+-------+-------+ | 01 | 0110 | byte | _byte1_ | byte1 | byte2 | | +---------+-------+----------+---------+---------+-------+-------+ | 10 | 0011 | halfword | _byte2_ | _byte3_ | byte2 | byte3 | +---------+-------+----------+---------+---------+-------+-------+ | 00 | 1000 | byte | byte0 | | | | +---------+-------+----------+---------+---------+-------+-------+ | 01 | 0100 | byte | _byte1_ | byte1 | | | +---------+-------+----------+---------+---------+-------+-------+ | 10 | 0010 | byte | _byte2_ | | byte2 | | +---------+-------+----------+---------+---------+-------+-------+ | 11 | 0001 | byte | _byte3_ | _byte3_ | | byte3 | +---------+-------+----------+---------+---------+-------+-------+ Mirrored data values are highlighted by underscores in the Dbus columns. The values in the ABus and Request Transfer Size columns correspond to values in the field names listed in the write data order select register descriptions. Similar configuration registers are exposed for reads which enables the secondary purpose of configuring hardware endian conversions. It appears the data bus byte order is switched around in hardware so set the registers such that we can access the correct values for all widths. The values were determined by experimentation on hardware against fixed CFAM register values to configure the read data order, then in combination with the table above and the register layout documentation in the AST2600 datasheet performing write/read cycles to configure the write data order registers. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley Acked-by: Alistair Popple Link: https://lore.kernel.org/r/20191108051945.7109-12-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit 913b73730e15eebbe7182834a3a923ca0c1255e8 Author: Joel Stanley Date: Fri Nov 8 15:49:44 2019 +1030 fsi: aspeed: Add trace points These trace points help with debugging the FSI master. They show the low level reads, writes and error states of the master. Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20191108051945.7109-11-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit 606397d67f4184a40732537be72e7e8658c26717 Author: Joel Stanley Date: Fri Nov 8 15:49:43 2019 +1030 fsi: Add ast2600 master driver The ast2600 BMC has a pair of FSI masters in it, behind an AHB to OPB bridge. The master driver supports reads and writes of full words, half word and byte accesses to remote CFAMs. It can perform very basic error recovery through resetting of the FSI port when an error is detected, and the issuing of breaks and terms. Signed-off-by: Joel Stanley Acked-by: Alistair Popple -- v2: - remove debugging - squash in fixes Link: https://lore.kernel.org/r/20191108051945.7109-10-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit cccaa160c37639ea7d71c59a56a276264110ed62 Author: Joel Stanley Date: Fri Nov 8 15:49:42 2019 +1030 dt-bindings: fsi: Add description of FSI master This describes the FSI master present in the AST2600. Signed-off-by: Joel Stanley Acked-by: Alistair Popple Link: https://lore.kernel.org/r/20191108051945.7109-9-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit 8bcd06d0cb3d991b45231cf22c467759b11f18aa Author: Joel Stanley Date: Fri Nov 8 15:49:41 2019 +1030 fsi: Move defines to common header The FSI master registers are common to the hub and AST2600 master (and the FSP2, if someone was to upstream a driver for that). Add defines to the fsi-master.h header, and introduce headings to delineate the existing low level details. Acked-by: Andrew Jeffery Acked-by: Jeremy Kerr Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20191108051945.7109-8-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit 56ec311fddacd0e18795322e1d25048179787b4b Author: kbuild test robot Date: Fri Nov 8 15:49:40 2019 +1030 fsi: fsi_master_class can be static There are no users outside of this file. Fixes: 0604d53d4da8 ("fsi: Add fsi-master class") Signed-off-by: kbuild test robot Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20191108051945.7109-7-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit 9f4c2b516b4f031e3cd0e45957f4150b3c1a083d Author: Andrew Jeffery Date: Fri Nov 8 15:49:39 2019 +1030 fsi: core: Fix small accesses and unaligned offsets via sysfs Subtracting the offset delta from four-byte alignment lead to wrapping of the requested length where `count` is less than `off`. Generalise the length handling to enable and optimise aligned access sizes for all offset and size combinations. The new formula produces the following results for given offset and count values: offset count | length --------------+------- 0 1 | 1 0 2 | 2 0 3 | 2 0 4 | 4 0 5 | 4 1 1 | 1 1 2 | 1 1 3 | 1 1 4 | 1 1 5 | 1 2 1 | 1 2 2 | 2 2 3 | 2 2 4 | 2 2 5 | 2 3 1 | 1 3 2 | 1 3 3 | 1 3 4 | 1 3 5 | 1 We might need something like this for the cfam chardevs as well, for example we don't currently implement any alignment restrictions / handling in the hardware master driver. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20191108051945.7109-6-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit ae77481601596096939e1eac9b6e0c8e709b37c9 Author: Andrew Jeffery Date: Fri Nov 8 15:49:38 2019 +1030 trace: fsi: Print transfer size unsigned Due to other bugs I observed a spurious -1 transfer size. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley Acked-by: Alistair Popple Link: https://lore.kernel.org/r/20191108051945.7109-5-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit 2fc95e04131cc9cf1d89a5829ada5e6ce5390c03 Author: Joel Stanley Date: Fri Nov 8 15:49:37 2019 +1030 ABI: Update FSI path documentation The paths added back in 4.13 weren't quite correct. The in reality the files documented lived under /sys/devices/../fsi0/rescan /sys/devices/../fsi0/break /sys/devices/../fsi0/slave@00:00/term /sys/devices/../fsi0/slave@00:00/raw In 5.5 with the addition of the FSI class they move to /sys/devices/../fsi-master/fsi0/rescan /sys/devices/../fsi-master/fsi0/break /sys/devices/../fsi-master/fsi0/slave@00:00/term /sys/devices/../fsi-master/fsi0/slave@00:00/raw This is closer to how the (incorrect) documentation described them. Signed-off-by: Joel Stanley Acked-by: Alistair Popple Link: https://lore.kernel.org/r/20191108051945.7109-4-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit cf700ba035dce78f17f6ce9405a485e490656666 Author: Jeremy Kerr Date: Fri Nov 8 15:49:36 2019 +1030 fsi: Move master attributes to fsi-master class Populate fsi_master_class->dev_attrs with the existing attribute definitions, so we don't need to explicitly register. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Acked-by: Alistair Popple Link: https://lore.kernel.org/r/20191108051945.7109-3-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit 2e32c2d675ac19730ec656322414649f04eddaa8 Author: Jeremy Kerr Date: Fri Nov 8 15:49:35 2019 +1030 fsi: Add fsi-master class This change adds a device class for FSI masters, allowing access under /sys/class/fsi-master/, and easier udev rules. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Acked-by: Alistair Popple Link: https://lore.kernel.org/r/20191108051945.7109-2-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit 14f34e36b36ceede9877ca422a62fcac17b52023 Author: Gurumoorthi Gnanasambandhan Date: Thu Oct 31 23:46:40 2019 +0200 cfg80211: VLAN offload support for set_key and set_sta_vlan This provides an alternative mechanism for AP VLAN support where a single netdev is used with VLAN tagged frames instead of separate netdevs for each VLAN without tagged frames from the WLAN driver. By setting NL80211_EXT_FEATURE_VLAN_OFFLOAD flag the driver indicates support for a single netdev with VLAN tagged frames. Separate VLAN-specific netdevs can be added using RTM_NEWLINK/IFLA_VLAN_ID similarly to Ethernet. NL80211_CMD_NEW_KEY (for group keys), NL80211_CMD_NEW_STATION, and NL80211_CMD_SET_STATION will optionally specify vlan_id using NL80211_ATTR_VLAN_ID. Signed-off-by: Gurumoorthi Gnanasambandhan Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20191031214640.5012-1-jouni@codeaurora.org Signed-off-by: Johannes Berg commit 49e19745e4b55ceb5d4d9199a5860044284f5c69 Author: Roger Quadros Date: Mon Oct 28 11:37:30 2019 +0200 arm64: dts: ti: k3-j721e-common-proc-board: Add USB ports Add USB0 as otg port and USB1 as host port. Although USB0 can be used at super-speed, limit the speed to high-speed for now till SERDES PHY support is added. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori Signed-off-by: Tero Kristo commit 451555c80bc66551278d92575030fab6bf04641c Author: Roger Quadros Date: Mon Oct 28 11:37:29 2019 +0200 arm64: dts: ti: k3-j721e-main: add USB controller nodes J721e has 2 USB super-speed controllers add them. The USB2 PHY doesn't need any configuration. USB3 PHY needs to be implemented using the Cadence Sierra PHY. This support will be added later. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori Signed-off-by: Tero Kristo commit 6912daed05e1370af5253aea6f2116805c0e57f8 Author: Toke Høiland-Jørgensen Date: Wed Oct 23 11:59:00 2019 +0200 mac80211: Shrink the size of ack_frame_id to make room for tx_time_est To implement airtime queue limiting, we need to keep a running account of the estimated airtime of all skbs queued into the device. Do to this correctly, we need to store the airtime estimate into the skb so we can decrease the outstanding balance when the skb is freed. This means that the time estimate must be stored somewhere that will survive for the lifetime of the skb. To get this, decrease the size of the ack_frame_id field to 6 bits, and lower the size of the ID space accordingly. This leaves 10 bits for use for tx_time_est, which is enough to store a maximum of 4096 us, if we shift the values so they become units of 4us. Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/157182474063.150713.16132669599100802716.stgit@toke.dk Signed-off-by: Johannes Berg commit f61d7884cef8f1a46ed676adac313b7b53211a8a Author: Johannes Berg Date: Mon Oct 28 12:52:42 2019 +0100 mac80211: don't re-parse elems in ieee80211_assoc_success() We've already parsed the same data in the caller, so we can pass it. The only thing is that we might fill in more details in ieee80211_assoc_success(), but that doesn't bother the caller, so it's fine to do even when we share the parsed data. This reduces the stack space usage of the call stack here, Arnd reported it had grown above the 1024 byte warning limit. Reported-by: Arnd Bergmann Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20191028125240.cb7661671bd2.I757c8752bf4f2f35e54f5e0a2c0a9cd9216c3d8b@changeid Signed-off-by: Johannes Berg commit 5d8983c8c3b5d7ec3326c75814e77fe167911676 Author: John Crispin Date: Tue Oct 29 10:13:02 2019 +0100 mac80211: move store skb ack code to its own function This patch moves the code handling SKBTX_WIFI_STATUS inside the TX path into an extra function. This allows us to reuse it inside the 802.11 encap offloading datapath. Signed-off-by: John Crispin Link: https://lore.kernel.org/r/20191029091304.7330-2-john@phrozen.org Signed-off-by: Johannes Berg commit 7d13cf1e1d5300e9e0fd5ef110b5abe3854ea90b Author: zhong jiang Date: Wed Oct 30 11:01:02 2019 +0800 mac80211_hwsim: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file operation rather than DEFINE_SIMPLE_ATTRIBUTE. It is detected with the help of coccinelle. Signed-off-by: zhong jiang Link: https://lore.kernel.org/r/1572404462-45462-1-git-send-email-zhongjiang@huawei.com Signed-off-by: Johannes Berg commit 3b58d6a599ba8c42cb4a3df8080f459ce7edcaa7 Author: Ikjoon Jang Date: Wed Nov 6 20:04:45 2019 +0200 ath10k: disable cpuidle during downloading firmware Downloading ath10k firmware needs a large number of IOs and cpuidle's miss predictions make it worse. In the worst case, resume time can be three times longer than the average on sdio. This patch disables cpuidle during firmware downloading by applying PM_QOS_CPU_DMA_LATENCY in ath10k_download_fw(). Tested-on: QCA9880 Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00029 Signed-off-by: Ikjoon Jang Signed-off-by: Kalle Valo commit 402838a05def2e23736cec834752f3edcc38dda7 Author: Zhi Chen Date: Wed Nov 6 20:04:42 2019 +0200 ath10k: fix potential issue of peer stats allocation STA number was not restored if OOM happened. Tested: QCA9984 with firmware ver 10.4-3.9.0.1-00018 Signed-off-by: Zhi Chen Signed-off-by: Kalle Valo commit 05a11003a56507023f18d3249a4d4d119c0a3e9c Author: Miaoqing Pan Date: Wed Nov 6 20:04:37 2019 +0200 ath10k: fix get invalid tx rate for Mesh metric ath10k does not provide transmit rate info per MSDU in tx completion, mark that as -1 so mac80211 will ignore the rates. This fixes mac80211 update Mesh link metric with invalid transmit rate info. Tested HW: QCA9984 Tested FW: 10.4-3.9.0.2-00035 Signed-off-by: Hou Bao Hou Signed-off-by: Anilkumar Kolli Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo commit 21c60a28af58d7c376502c26fbb0064b39c32917 Author: Brian Norris Date: Wed Nov 6 13:30:55 2019 -0800 rtw88: signal completion even on firmware-request failure Otherwise, the waiters (e.g., "modprobe rtwpci") will block forever. Fixes: f530c1961af2 ("rtw88: fix potential NULL pointer access for firmware") Cc: Dan Carpenter Cc: Yan-Hsuan Chuang Signed-off-by: Brian Norris Acked-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 3ca3a9eab7085b3c938b5d088c3020269cfecdc8 Merge: 23aae183ffdf b149cbfeecaa Author: Dave Airlie Date: Fri Nov 8 16:04:42 2019 +1000 Merge tag 'drm-misc-next-fixes-2019-11-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-next msm: Fix up a6xx debugbus register names (Sharat) mst: Avoid u64 division (Sean) Cc: Sharat Masetty Cc: Sean Paul Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191106202730.GA199896@art_vandelay commit b95182a6e82209fa3c98bde8ec79c51b1870aca5 Author: Hans Verkuil Date: Tue Nov 5 09:17:28 2019 +0100 media: v4l2-device.h: fix typo: putss -> puts Fix typo: putss -> puts Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 57d024f8db65ca3188d23487ca6980150356b7a3 Author: Ricardo Ribalda Delgado Date: Mon Nov 4 14:09:23 2019 +0100 media: v4l2-ctrl: Use p_const when possible After adding a const pointer to ctrl_ptr, lets use it where it make sense. Suggested-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8508a2d519ed190a77061c5159b000f1035b3522 Author: Ricardo Ribalda Delgado Date: Mon Nov 4 14:09:22 2019 +0100 media: Documentation: v42l_core: v4l2_ext_control Describe p_area field from v4l2_ext_ctrl Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 134f9e9ef202f72296f4d9a6e80e84d6efabbba7 Author: Ricardo Ribalda Delgado Date: Mon Nov 4 14:09:21 2019 +0100 media: v4l2_core: Add p_area to struct v4l2_ext_control Allow accessing V4L2_CTRL_TYPE_AREA controls without any casting. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 483b2217dbb05f1326578767c6d7fb5ec2dc1c51 Author: Ricardo Ribalda Delgado Date: Mon Nov 4 14:09:20 2019 +0100 media: vivid: Add an area control This control represents a generic read/write area. Suggested-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f1bd5eae7de76ef8eabc9e393f5a8718d8f25d2a Author: Ricardo Ribalda Delgado Date: Mon Nov 4 14:09:19 2019 +0100 media: v4l2_ctrl: Add const pointer to ctrl_ptr This pointer is used to point to data that is constant. Thanks to this we can avoid a lot of casting and we make more clear when the data is constant or variable. Suggested-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b98a21a3202aeb9a47c0b57cab3d3ed420c1e05 Author: Ricardo Ribalda Delgado Date: Mon Nov 4 14:09:18 2019 +0100 media: v4l2_ctrl: Add p_def to v4l2_ctrl_config This allows setting the default value on compound controls created via v4l2_ctrl_new_custom. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4d741cbd58bf889c8a68cf6e592a7892b5c2802e Author: Seung-Woo Kim Date: Mon Nov 4 10:46:32 2019 +0100 media: exynos4-is: fix wrong mdev and v4l2 dev order in error path When driver is built as module and probe during insmod is deferred because of sensor subdevs, there is NULL pointer deference because mdev is cleaned up and then access it from v4l2_device_unregister(). Fix the wrong mdev and v4l2 dev order in error path of probe. This fixes below null pointer deference: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = ca026f68 [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM [...] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) PC is at ida_free+0x7c/0x160 LR is at xas_start+0x44/0x204 [...] [] (ida_free) from [] (__media_device_unregister_entity+0x18/0xc0) [] (__media_device_unregister_entity) from [] (media_device_unregister_entity+0x2c/0x38) [] (media_device_unregister_entity) from [] (v4l2_device_release+0xd0/0x104) [] (v4l2_device_release) from [] (device_release+0x28/0x98) [] (device_release) from [] (kobject_put+0xa4/0x208) [] (kct_put) from [] (fimc_capture_subdev_unregistered+0x58/0x6c [s5p_fimc]) [] (fimc_capture_subdev_unregistered [s5p_fimc]) from [] (v4l2_device_unregister_subdev+0x6c/0xa8) [] (v4l2_device_unregister_subdev) from [] (v4l2_device_unregister+0x64/0x94) [] (v4l2_device_unregister) from [] (fimc_md_probe+0x4ec/0xaf8 [s5p_fimc]) [...] Signed-off-by: Seung-Woo Kim Reviewed-by: Sylwester Nawrocki Fixes: 9832e155f1ed ("[media] media-device: split media initialization and registration") Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6dcd5d7a7a29c1e4b8016a06aed78cd650cd8c27 Author: Alexander Popov Date: Sun Nov 3 23:17:19 2019 +0100 media: vivid: Fix wrong locking that causes race conditions on streaming stop There is the same incorrect approach to locking implemented in vivid_stop_generating_vid_cap(), vivid_stop_generating_vid_out() and sdr_cap_stop_streaming(). These functions are called during streaming stopping with vivid_dev.mutex locked. And they all do the same mistake while stopping their kthreads, which need to lock this mutex as well. See the example from vivid_stop_generating_vid_cap(): /* shutdown control thread */ vivid_grab_controls(dev, false); mutex_unlock(&dev->mutex); kthread_stop(dev->kthread_vid_cap); dev->kthread_vid_cap = NULL; mutex_lock(&dev->mutex); But when this mutex is unlocked, another vb2_fop_read() can lock it instead of vivid_thread_vid_cap() and manipulate the buffer queue. That causes a use-after-free access later. To fix those issues let's: 1. avoid unlocking the mutex in vivid_stop_generating_vid_cap(), vivid_stop_generating_vid_out() and sdr_cap_stop_streaming(); 2. use mutex_trylock() with schedule_timeout_uninterruptible() in the loops of the vivid kthread handlers. Signed-off-by: Alexander Popov Acked-by: Linus Torvalds Tested-by: Hans Verkuil Signed-off-by: Hans Verkuil Cc: # for v3.18 and up Signed-off-by: Mauro Carvalho Chehab commit 0c90f649d2f5b9c6c585cab293a4e40172ddaa73 Author: Hans Verkuil Date: Sun Nov 3 15:01:42 2019 +0100 media: vivid: add vivid_create_queue() helper Refactor some of the vivid_create_instance code by using a new vivid_create_queue() helper function. Also add some sanity checks for the node_types vs input/output_types module options. This patch resolves these two smatch parse errors: drivers/media/platform/vivid/vivid-core.c:1679 vivid_create_instance() parse error: OOM: 3002600Kb sm_state_count = 6160113 drivers/media/platform/vivid/vivid-core.c: drivers/media/platform/vivid/vivid-core.c:1679 vivid_create_instance() parse error: __split_smt: function too hairy. Giving up after 33 seconds Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1318372450954b4fcd4b3886703286103b040ded Author: Colin Ian King Date: Sun Nov 3 14:07:20 2019 +0100 media: siano: fix spelling mistake "ENBALE" -> "ENABLE" Macros MSG_SMS_ENBALE_TS_INTERFACE_REQ and MSG_SMS_ENBALE_TS_INTERFACE_RES contain a spelling mistake. Fix these by replacing ENBALE with ENABLE. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 61b8584a2f3a212283667af887d4aa05973569df Author: Hans Verkuil Date: Sun Nov 3 12:23:38 2019 +0100 media: mantis: fix two smatch errors Drop two dprintk's that relied on a non-NULL mantis pointer when it was in fact a NULL pointer. Fix those warnings: drivers/media/pci/mantis/mantis_cards.c:73 mantis_irq_handler() error: we previously assumed 'mantis' could be null (see line 72) drivers/media/pci/mantis/hopper_cards.c:64 hopper_irq_handler() error: we previously assumed 'mantis' could be null (see line 63) Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b5f72a17b1b2f5363f61075d501367ac7461581e Author: Hans Verkuil Date: Sun Nov 3 12:23:37 2019 +0100 media: ov6650: fix smatch warning Initialize ret to 0 to fix this smatch error: drivers/media/i2c/ov6650.c:853 ov6650_video_probe() error: uninitialized symbol 'ret'. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2c3e42bf78c7ad646856089eba9839f3942a5165 Author: Hans Verkuil Date: Sun Nov 3 12:23:36 2019 +0100 media: ti-vpe: fix smatch error This patch fixes this error: drivers/media/platform/ti-vpe/vpdma.c:767 dump_dtd() error: '%pad' expects argument of type 'dma_addr_t*', argument 2 has type 'uint*' dtd->start_addr is a u32, so no need for %pad. Signed-off-by: Hans Verkuil Reviewed-by: Benoit Parrot Signed-off-by: Mauro Carvalho Chehab commit 2df34d3a27c1f3b043689edb017a6572ac8a7934 Author: Hans Verkuil Date: Sun Nov 3 12:23:35 2019 +0100 media: em28xx: fix two smatch warnings Use sizeof instead of ARRAY_SIZE to fix this smatch warning: drivers/media/usb/em28xx/em28xx-i2c.c:952 em28xx_do_i2c_scan() warn: calling memset(x, y, ARRAY_SIZE()); Do the same for the em28xx_hash_mem() call in the same function. smatch didn't pick that up, but there too it should use sizeof instead of ARRAY_SIZE. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 492b53a50a1c565d067f48de96b85336f1ea601e Author: Hans Verkuil Date: Sun Nov 3 12:23:34 2019 +0100 media: rc/ite-cir: fix smatch warning Use sizeof instead of ARRAY_SIZE to fix this smatch warning: drivers/media/rc/ite-cir.c:385 ite_tx_ir() warn: calling memset(x, y, ARRAY_SIZE()); Signed-off-by: Hans Verkuil Acked-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit c4abb192caca96a53c2e833d25b1f7f12b454bf4 Author: Hans Verkuil Date: Sun Nov 3 12:23:33 2019 +0100 media: mtk-vpu: fix two smatch warnings Drop the "id >= 0" test in two conditions to fix these warnings: drivers/media/platform/mtk-vpu/mtk_vpu.c:276 vpu_ipi_register() warn: always true condition '(id >= 0) => (0-u32max >= 0)' drivers/media/platform/mtk-vpu/mtk_vpu.c:401 vpu_wdt_reg_handler() warn: always true condition '(id >= 0) => (0-u32max >= 0)' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d408bef4bfa60bac665b6e7239269570039a968b Author: Hoang Le Date: Fri Nov 8 10:02:37 2019 +0700 tipc: eliminate checking netns if node established Currently, we scan over all network namespaces at each received discovery message in order to check if the sending peer might be present in a host local namespaces. This is unnecessary since we can assume that a peer will not change its location during an established session. We now improve the condition for this testing so that we don't perform any redundant scans. Fixes: f73b12812a3d ("tipc: improve throughput between nodes in netns") Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit f8cc62ca3e660ae3fdaee533b1d554297cd2ae82 Author: Eric Dumazet Date: Thu Nov 7 18:49:43 2019 -0800 net: add a READ_ONCE() in skb_peek_tail() skb_peek_tail() can be used without protection of a lock, as spotted by KCSAN [1] In order to avoid load-stearing, add a READ_ONCE() Note that the corresponding WRITE_ONCE() are already there. [1] BUG: KCSAN: data-race in sk_wait_data / skb_queue_tail read to 0xffff8880b36a4118 of 8 bytes by task 20426 on cpu 1: skb_peek_tail include/linux/skbuff.h:1784 [inline] sk_wait_data+0x15b/0x250 net/core/sock.c:2477 kcm_wait_data+0x112/0x1f0 net/kcm/kcmsock.c:1103 kcm_recvmsg+0xac/0x320 net/kcm/kcmsock.c:1130 sock_recvmsg_nosec net/socket.c:871 [inline] sock_recvmsg net/socket.c:889 [inline] sock_recvmsg+0x92/0xb0 net/socket.c:885 ___sys_recvmsg+0x1a0/0x3e0 net/socket.c:2480 do_recvmmsg+0x19a/0x5c0 net/socket.c:2601 __sys_recvmmsg+0x1ef/0x200 net/socket.c:2680 __do_sys_recvmmsg net/socket.c:2703 [inline] __se_sys_recvmmsg net/socket.c:2696 [inline] __x64_sys_recvmmsg+0x89/0xb0 net/socket.c:2696 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 write to 0xffff8880b36a4118 of 8 bytes by task 451 on cpu 0: __skb_insert include/linux/skbuff.h:1852 [inline] __skb_queue_before include/linux/skbuff.h:1958 [inline] __skb_queue_tail include/linux/skbuff.h:1991 [inline] skb_queue_tail+0x7e/0xc0 net/core/skbuff.c:3145 kcm_queue_rcv_skb+0x202/0x310 net/kcm/kcmsock.c:206 kcm_rcv_strparser+0x74/0x4b0 net/kcm/kcmsock.c:370 __strp_recv+0x348/0xf50 net/strparser/strparser.c:309 strp_recv+0x84/0xa0 net/strparser/strparser.c:343 tcp_read_sock+0x174/0x5c0 net/ipv4/tcp.c:1639 strp_read_sock+0xd4/0x140 net/strparser/strparser.c:366 do_strp_work net/strparser/strparser.c:414 [inline] strp_work+0x9a/0xe0 net/strparser/strparser.c:423 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 worker_thread+0xa0/0x800 kernel/workqueue.c:2415 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 451 Comm: kworker/u4:3 Not tainted 5.4.0-rc3+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: kstrp strp_work Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit c305c6ae79e2ce20c22660ceda94f0d86d639a82 Author: Eric Dumazet Date: Thu Nov 7 18:29:11 2019 -0800 net: add annotations on hh->hh_len lockless accesses KCSAN reported a data-race [1] While we can use READ_ONCE() on the read sides, we need to make sure hh->hh_len is written last. [1] BUG: KCSAN: data-race in eth_header_cache / neigh_resolve_output write to 0xffff8880b9dedcb8 of 4 bytes by task 29760 on cpu 0: eth_header_cache+0xa9/0xd0 net/ethernet/eth.c:247 neigh_hh_init net/core/neighbour.c:1463 [inline] neigh_resolve_output net/core/neighbour.c:1480 [inline] neigh_resolve_output+0x415/0x470 net/core/neighbour.c:1470 neigh_output include/net/neighbour.h:511 [inline] ip6_finish_output2+0x7a2/0xec0 net/ipv6/ip6_output.c:116 __ip6_finish_output net/ipv6/ip6_output.c:142 [inline] __ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127 ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] NF_HOOK include/linux/netfilter.h:305 [inline] ndisc_send_skb+0x459/0x5f0 net/ipv6/ndisc.c:505 ndisc_send_ns+0x207/0x430 net/ipv6/ndisc.c:647 rt6_probe_deferred+0x98/0xf0 net/ipv6/route.c:615 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 worker_thread+0xa0/0x800 kernel/workqueue.c:2415 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 read to 0xffff8880b9dedcb8 of 4 bytes by task 29572 on cpu 1: neigh_resolve_output net/core/neighbour.c:1479 [inline] neigh_resolve_output+0x113/0x470 net/core/neighbour.c:1470 neigh_output include/net/neighbour.h:511 [inline] ip6_finish_output2+0x7a2/0xec0 net/ipv6/ip6_output.c:116 __ip6_finish_output net/ipv6/ip6_output.c:142 [inline] __ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127 ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] NF_HOOK include/linux/netfilter.h:305 [inline] ndisc_send_skb+0x459/0x5f0 net/ipv6/ndisc.c:505 ndisc_send_ns+0x207/0x430 net/ipv6/ndisc.c:647 rt6_probe_deferred+0x98/0xf0 net/ipv6/route.c:615 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 worker_thread+0xa0/0x800 kernel/workqueue.c:2415 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 29572 Comm: kworker/1:4 Not tainted 5.4.0-rc6+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events rt6_probe_deferred Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 9dfd871481c8e9c512938e9ce632beed645363e0 Merge: 0f030bdb16dc fd2f4737870e Author: David S. Miller Date: Thu Nov 7 20:03:09 2019 -0800 Merge branch 'u64_stats_t' Eric Dumazet says: ==================== net: introduce u64_stats_t KCSAN found a data-race in per-cpu u64 stats accounting. (The stack traces are included in the 8th patch : tun: switch to u64_stats_t) This patch series first consolidate code in five patches. Then the last three patches address the data-race resolution. ==================== Signed-off-by: David S. Miller commit fd2f4737870eb866537fbbffa2b59414b9b0c0a2 Author: Eric Dumazet Date: Thu Nov 7 16:27:22 2019 -0800 net: use u64_stats_t in struct pcpu_lstats In order to fix the data-race found by KCSAN, we can use the new u64_stats_t type and its accessors instead of plain u64 fields. This will still generate optimal code for both 32 and 64 bit platforms. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 5260dd3ed1ff7eba39251b28977e4d8950e2f099 Author: Eric Dumazet Date: Thu Nov 7 16:27:21 2019 -0800 tun: switch to u64_stats_t In order to fix this data-race found by KCSAN [1], switch to u64_stats_t helpers. They provide all the needed annotations, without adding extra cost. [1] BUG: KCSAN: data-race in tun_get_user / tun_net_get_stats64 read to 0xffffe8ffffd8aca8 of 8 bytes by task 4882 on cpu 0: tun_net_get_stats64+0x9b/0x230 drivers/net/tun.c:1171 dev_get_stats+0x89/0x1e0 net/core/dev.c:9103 rtnl_fill_stats+0x56/0x370 net/core/rtnetlink.c:1177 rtnl_fill_ifinfo+0xd3b/0x2100 net/core/rtnetlink.c:1667 rtmsg_ifinfo_build_skb+0xb0/0x150 net/core/rtnetlink.c:3472 rtmsg_ifinfo_event.part.0+0x4e/0xb0 net/core/rtnetlink.c:3504 rtmsg_ifinfo_event net/core/rtnetlink.c:3515 [inline] rtmsg_ifinfo+0x85/0x90 net/core/rtnetlink.c:3513 __dev_notify_flags+0x18b/0x200 net/core/dev.c:7649 dev_change_flags+0xb8/0xe0 net/core/dev.c:7691 dev_ifsioc+0x201/0x6a0 net/core/dev_ioctl.c:237 dev_ioctl+0x149/0x660 net/core/dev_ioctl.c:489 sock_do_ioctl+0xdb/0x230 net/socket.c:1061 sock_ioctl+0x3a3/0x5e0 net/socket.c:1189 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x991/0xc60 fs/ioctl.c:696 write to 0xffffe8ffffd8aca8 of 8 bytes by task 4883 on cpu 1: tun_get_user+0x1d94/0x2ba0 drivers/net/tun.c:2002 tun_chr_write_iter+0x79/0xd0 drivers/net/tun.c:2022 call_write_iter include/linux/fs.h:1895 [inline] new_sync_write+0x388/0x4a0 fs/read_write.c:483 __vfs_write+0xb1/0xc0 fs/read_write.c:496 __kernel_write+0xb8/0x240 fs/read_write.c:515 write_pipe_buf+0xb6/0xf0 fs/splice.c:794 splice_from_pipe_feed fs/splice.c:500 [inline] __splice_from_pipe+0x248/0x480 fs/splice.c:624 splice_from_pipe+0xbb/0x100 fs/splice.c:659 default_file_splice_write+0x45/0x90 fs/splice.c:806 do_splice_from fs/splice.c:848 [inline] direct_splice_actor+0xa0/0xc0 fs/splice.c:1020 splice_direct_to_actor+0x215/0x510 fs/splice.c:975 do_splice_direct+0x161/0x1e0 fs/splice.c:1063 do_sendfile+0x384/0x7f0 fs/read_write.c:1464 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 4883 Comm: syz-executor.1 Not tainted 5.4.0-rc3+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 316580b69d0a7aeeee5063af47438b626bc47cbd Author: Eric Dumazet Date: Thu Nov 7 16:27:20 2019 -0800 u64_stats: provide u64_stats_t type On 64bit arches, struct u64_stats_sync is empty and provides no help against load/store tearing. Using READ_ONCE()/WRITE_ONCE() would be needed. But the update side would be slightly more expensive. local64_t was defined so that we could use regular adds in a manner which is atomic wrt IRQs. However the u64_stats infra means we do not have to use local64_t on 32bit arches since the syncp provides the needed protection. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 4a43b1f96b1d94adcd296b2ff80d7294f82a9dc9 Author: Eric Dumazet Date: Thu Nov 7 16:27:19 2019 -0800 net: dummy: use standard dev_lstats_add() and dev_lstats_read() This driver can simply use the common infrastructure instead of duplicating it. This cleanup will ease u64_stats_t adoption in a single location. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 4f77eb0941d182e94b4f54d49cf9de2b19e0a317 Author: Eric Dumazet Date: Thu Nov 7 16:27:18 2019 -0800 vsockmon: use standard dev_lstats_add() and dev_lstats_read() This cleanup will ease u64_stats_t adoption in a single location. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit b4fba476dc4ee56fa1a85659c79fa94bb648b39a Author: Eric Dumazet Date: Thu Nov 7 16:27:17 2019 -0800 veth: use standard dev_lstats_add() and dev_lstats_read() This cleanup will ease u64_stats_t adoption in a single location. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 3ed912264f1c057be6afcbbd2a362787ee020a92 Author: Eric Dumazet Date: Thu Nov 7 16:27:16 2019 -0800 net: nlmon: use standard dev_lstats_add() and dev_lstats_read() No need to hand-code the exact same functions. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit dd5382a08157756510aa8d7269c662eccde775cb Author: Eric Dumazet Date: Thu Nov 7 16:27:15 2019 -0800 net: provide dev_lstats_add() helper Many network drivers need it and hand-coded the same function. In order to ease u64_stats_t adoption, it is time to factorize. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit de7d5084d82794a8e83afb994fcb07f82da3cd7b Author: Eric Dumazet Date: Thu Nov 7 16:27:14 2019 -0800 net: provide dev_lstats_read() helper Many network drivers use hand-coded implementation of the same thing, let's factorize things so that u64_stats_t adoption is done once. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 0f030bdb16dc1282e58c5825e5662e351142f605 Merge: 693bd8b7ae46 540938667986 Author: David S. Miller Date: Thu Nov 7 20:01:14 2019 -0800 Merge branch 'net-Demote-MTU-change-prints-to-debug' Florian Fainelli says: ==================== net: Demote MTU change prints to debug This patch series demotes several drivers that printed MTU change and could therefore spam the kernel console if one has a test that it's all about testing the values. Intel drivers were not also particularly consistent in how they printed the same message, so now they are. ==================== Signed-off-by: David S. Miller commit 5409386679860fded7f666da143e4c33926c62da Author: Florian Fainelli Date: Thu Nov 7 14:35:37 2019 -0800 net: qcom/emac: Demote MTU change print to debug Changing the MTU can be a frequent operation and it is already clear when (or not) a MTU change is successful, demote prints to debug prints. Signed-off-by: Florian Fainelli Acked-by: Timur Tabi Signed-off-by: David S. Miller commit 12299132b3d3bad58eff16e227891405b14c7d80 Author: Florian Fainelli Date: Thu Nov 7 14:35:36 2019 -0800 net: ethernet: intel: Demote MTU change prints to debug Changing a network device MTU can be a fairly frequent operation, and failure to change the MTU is reflected to user-space properly, both by an appropriate message as well as by looking at whether the device's MTU matches the configuration. Demote the prints to debug prints by using netdev_dbg(), making all Intel wired LAN drivers consistent, since they used a mixture of PCI device and network device prints before. Signed-off-by: Florian Fainelli Acked-by: Jeff Kirsher Signed-off-by: David S. Miller commit 693bd8b7ae46f04d6d7c868a08b35d28baacdab1 Author: Ivan Khoronzhuk Date: Thu Nov 7 22:01:58 2019 +0200 ethernet: ti: cpts: use ktime_get_real_ns helper Update on more short variant for getting real clock in ns. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit 23aae183ffdf38a2772e031292251c101b03d8db Merge: 393fdfdb4aee d9dace943894 Author: Dave Airlie Date: Fri Nov 8 13:59:02 2019 +1000 Merge tag 'drm-intel-next-fixes-2019-11-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next One RCU fix and fix for suspend GEM_BUG_ON (with dependencies). Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191107145058.GA17401@jlahtine-desk.ger.corp.intel.com commit cdc3e306236bf3a43962683b283a36095c21c202 Author: Vinod Koul Date: Wed Nov 6 22:01:28 2019 +0530 dmaengine: milbeaut-xdmac: remove redundant error log platform_get_irq() prints the error message, so caller need not do so, remove the error line in this driver for platform_get_irq() Reported-by: kbuild test robot Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20191106163128.1980714-2-vkoul@kernel.org Signed-off-by: Vinod Koul commit 7d4a069c5889b4f36f89841d5dea538aef88a9e1 Author: Vinod Koul Date: Wed Nov 6 22:01:27 2019 +0530 dmaengine: milbeaut-hdmac: remove redundant error log platform_get_irq() prints the error message, so caller need not do so, remove the error line in this driver for platform_get_irq() Reported-by: kbuild test robot Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20191106163128.1980714-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit a9ae168303e1d88bce686d89e67562a851780658 Merge: 7b89c580fb85 362cabda8d4d Author: David S. Miller Date: Thu Nov 7 19:54:43 2019 -0800 Merge branch 'aquantia-next' Igor Russkikh says: ==================== Aquantia Marvell atlantic driver updates 11-2019 Here is a bunch of atlantic driver new features and updates. Shortlist: - Me adding ethtool private flags for various loopback test modes, - Nikita is doing some work here on power management, implementing new PM API, He also did some checkpatch style cleanup of older driver parts. - I'm also adding a new UDP GSO offload support and flags for loopback activation - We are now Marvell, so I am changing email addresses on maintainers list. v2: styling, ip6 correct handling in udpgso ==================== Signed-off-by: David S. Miller commit 362cabda8d4da80152c20e11502ceee6672eb1c1 Author: Igor Russkikh Date: Thu Nov 7 22:42:08 2019 +0000 net: atlantic: change email domains to Marvell Aquantia is now part of Marvell, eventually we'll cease standalone aquantia.com domain. Thus, change the maintainers file and some other references to @marvell.com domain Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 822cd114cd05a47b7c272de9b3a4da73114894ca Author: Igor Russkikh Date: Thu Nov 7 22:42:06 2019 +0000 net: atlantic: implement UDP GSO offload atlantic hardware does support UDP hardware segmentation offload. This allows user to specify one large contiguous buffer with data which then will be split automagically into multiple UDP packets of specified size. Bulk sending of large UDP streams lowers CPU usage and increases bandwidth. We did estimations both with udpgso_bench_tx test tool and with modified iperf3 measurement tool (4 streams, multithread, 200b packet size) over AQC<->AQC 10G link. Flow control is disabled to prevent RX side impact on measurements. No UDP GSO: iperf3 -c 10.0.1.2 -u -b0 -l 200 -P4 --multithread UDP GSO: iperf3 -c 10.0.1.2 -u -b0 -l 12600 --udp-lso 200 -P4 --multithread Mode CPU iperf speed Line speed Packets per second ------------------------------------------------------------- NO UDP GSO 350% 3.07 Gbps 3.8 Gbps 1,919,419 SW UDP GSO 200% 5.55 Gbps 6.4 Gbps 3,286,144 HW UDP GSO 90% 6.80 Gbps 8.4 Gbps 4,273,117 Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 8009bb1928a6d5b0ce2d8a1dba79972f01e50533 Author: Nikita Danilov Date: Thu Nov 7 22:42:04 2019 +0000 net: atlantic: update flow control logic We now differentiate requested and negotiated flow control modes. Therefore `ethtool -A` now operates on local requested FC values, and regular link settings shows the negotiated FC settings. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit ddef55263271cd7108db3821c376e7104ba7cc5f Author: Igor Russkikh Date: Thu Nov 7 22:42:02 2019 +0000 net: atlantic: stylistic renames We are trying to follow the naming of the chip (atlantic), not company. So replace some old namings. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 7b0c342f1f67543f1f16099238d279584d6834e0 Author: Nikita Danilov Date: Thu Nov 7 22:42:00 2019 +0000 net: atlantic: code style cleanup Thats a pure checkpatck walkthrough the code with no functional changes. Reverse christmas tree, spacing, etc. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit ea4b4d7fc1065165874c27b8add252e04d104137 Author: Igor Russkikh Date: Thu Nov 7 22:41:58 2019 +0000 net: atlantic: loopback tests via private flags Here we add a number of ethtool private flags to allow enabling various loopbacks on HW. Thats useful for verification and bringup works. Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit dc12f75afcc677f225e5465b0654c54a14945168 Author: Nikita Danilov Date: Thu Nov 7 22:41:57 2019 +0000 net: atlantic: add fw configuration memory area Device FW has a separate memory area where various config fields are stored and could be used by the driver. Here we modify download/upload infrastructure to allow accessing this area. Lateron this will be used to configure various behaviours Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit d1287ce4ffa1d1f121571ce90ed7ebd410e31a21 Author: Nikita Danilov Date: Thu Nov 7 22:41:55 2019 +0000 net: atlantic: adding ethtool physical identification `ethtool -p eth0` will blink leds helping identify physical port. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 58128fa0265b75be21ec244680426da50ca72850 Author: Nikita Danilov Date: Thu Nov 7 22:41:54 2019 +0000 net: atlantic: add msglevel configuration We add ethtool msglevel configuration and change some printouts to use netdev_info set of functions. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 8aaa112a57c1d725c92dfad32c0694bd21b374d0 Author: Nikita Danilov Date: Thu Nov 7 22:41:52 2019 +0000 net: atlantic: refactoring pm logic We now implement .driver.pm callbacks, these allows driver to work correctly in hibernate usecases, especially when used in conjunction with WOL feature. Before that driver only reacted to legacy .suspend/.resume callbacks, that was a limitation in some cases. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 837c637869bef28b06653462cd010ccc0c2ce984 Author: Nikita Danilov Date: Thu Nov 7 22:41:50 2019 +0000 net: atlantic: implement wake_phy feature Wake on PHY allows to configure device to wakeup host as soon as PHY link status is changed to active. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit d993e14bd872e1e30e2028cbaa0302acf2661579 Author: Nikita Danilov Date: Thu Nov 7 22:41:49 2019 +0000 net: atlantic: update firmware interface Here we improve FW interface structures layout and prepare these for the wake phy feature implementation. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 9568feda4e2914bc50c5cd4fbca57210815f9dc9 Author: Chuhong Yuan Date: Tue Nov 5 00:16:22 2019 +0800 dmaengine: dma-jz4780: add missed clk_disable_unprepare in remove The remove misses to disable and unprepare jzdma->clk. Add a call to clk_disable_unprepare to fix it. Signed-off-by: Chuhong Yuan Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20191104161622.11758-1-hslester96@gmail.com Signed-off-by: Vinod Koul commit 7b89c580fb85270d0b58d4d21ad6cd9810300b75 Merge: c55b810abb13 83b2b61e05f8 Author: David S. Miller Date: Thu Nov 7 19:51:41 2019 -0800 Merge branch 'mlxsw-Add-layer-3-devlink-trap-support' Ido Schimmel says: ==================== mlxsw: Add layer 3 devlink-trap support This patch set from Amit adds support in mlxsw for layer 3 traps that can report drops and exceptions via devlink-trap. In a similar fashion to the existing layer 2 traps, these traps can send packets to the CPU that were not routed as intended by the underlying device. The traps are divided between the two types detailed in devlink-trap documentation: drops and exceptions. Unlike drops, packets received via exception traps are also injected to the kernel's receive path, as they are required for the correct functioning of the control plane. For example, packets trapped due to TTL error must be injected to kernel's receive path for traceroute to work properly. Patch set overview: Patch #1 adds the layer 3 drop traps to devlink along with their documentation. Patch #2 adds support for layer 3 drop traps in mlxsw. Patches #3-#5 add selftests for layer 3 drop traps. Patch #6 adds the layer 3 exception traps to devlink along with their documentation. Patches #7-#9 gradually add support for layer 3 exception traps in mlxsw. Patches #10-#12 add selftests for layer 3 exception traps. ==================== Signed-off-by: David S. Miller commit 83b2b61e05f83edb7f253ebd9f9eb71b42dd1f5d Author: Amit Cohen Date: Thu Nov 7 18:42:20 2019 +0200 selftests: mlxsw: Add test cases for devlink-trap layer 3 exceptions Test that each supported packet trap exception is triggered under the right conditions. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f10caf0278d150beacc97090c911ee7cb43bfba3 Author: Amit Cohen Date: Thu Nov 7 18:42:19 2019 +0200 selftests: forwarding: tc_common: Add hitting check Add an option to check that packets hit the tc filter without providing the exact number of packets that should hit it. It is useful while sending many packets in background and checking that at least one of them hit the tc filter. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 7ce4e7608674ff4ba78157eea4bea464e4106545 Author: Amit Cohen Date: Thu Nov 7 18:42:18 2019 +0200 selftests: forwarding: devlink: Add functionality for trap exceptions test Add common part of all the tests - check devlink status to ensure that packets were trapped. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit fd74feeb2452c94f6e381e1fcef00d69b55723b8 Author: Amit Cohen Date: Thu Nov 7 18:42:17 2019 +0200 mlxsw: Add layer 3 devlink-trap exceptions support Add the trap IDs used to report layer 3 exceptions. Trapped packets are first reported to devlink and then injected to the kernel's receive path. All the packets have 'offload_fwd_mark' set in order to prevent them from potentially being forwarded by the bridge again. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0c3cbbf96def619ef1c766c53a7db5f3602898df Author: Amit Cohen Date: Thu Nov 7 18:42:16 2019 +0200 mlxsw: Add specific trap for packets routed via invalid nexthops Currently, mlxsw does not differentiate between these two cases of routes with invalid nexthops: 1. Nexthops whose nexthop device is a mlxsw upper (has a RIF), but whose neighbour could not be resolved 2. Nexthops whose nexthop device is not a mlxsw upper (e.g., management interface) Up until now this did not matter and mlxsw trapped packets for both cases using the same trap ID. However, packets that should have been routed in hardware (case 1), but incurred a problem are considered exceptions and should be reported to the user. The two cases should therefore be split between two different trap IDs. Allocate a new adjacency entry during initialization and upon the insertion of the first route with an invalid mlxsw nexthop, program this entry to discard packets. Packets hitting this entry will be reported using new trap ID - "DISCARD_ROUTER3". In the future, the entry could be written during initialization, but currently firmware requires a valid RIF, which is not available at this stage. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 21151f64a458bef8308d57cc08551e043d20ace0 Author: Amit Cohen Date: Thu Nov 7 18:42:15 2019 +0200 mlxsw: Add new FIB entry type for reject routes Currently, packets that cannot be routed in hardware (e.g., nexthop device is not upper of mlxsw), are trapped to the kernel for forwarding. Such packets are trapped using "RTR_INGRESS0" trap. This trap also traps packets that hit reject routes (e.g., "unreachable") so that the kernel will generate the appropriate ICMP error message for them. Subsequent patch will need to only report to devlink packets that hit a reject route, which is impossible as long as "RTR_INGRESS0" is overloaded like that. Solve this by using "RTR_INGRESS1" trap for packets that hit reject routes. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 3b063ae57bdfec5e574ace440e6c3f34c4115a92 Author: Amit Cohen Date: Thu Nov 7 18:42:14 2019 +0200 devlink: Add layer 3 generic packet exception traps Add layer 3 generic packet exception traps that can report trapped packets and documentation of the traps. Unlike drop traps, these exception traps also need to inject the packet to the kernel's receive path. For example, a packet that was trapped due to unreachable neighbour need to be injected into the kernel so that it will trigger an ARP request or a neighbour solicitation message. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d3e985c917388a719dd17271016219401b994522 Author: Amit Cohen Date: Thu Nov 7 18:42:13 2019 +0200 selftests: mlxsw: Add test cases for devlink-trap layer 3 drops Test that each supported packet trap is triggered under the right conditions and that packets are indeed dropped and not forwarded. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ef7f6b16156f2a0d87a7315ede6b776e5280372c Author: Amit Cohen Date: Thu Nov 7 18:42:12 2019 +0200 selftests: devlink: Make devlink_trap_cleanup() more generic Add proto parameter in order to enable the use of devlink_trap_cleanup() in tests that use IPv6 protocol. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6b45fe95fdbed9950c58186af7940cfed67a08c7 Author: Amit Cohen Date: Thu Nov 7 18:42:11 2019 +0200 selftests: devlink: Export functions to devlink library l2_drops_test() is used to check that drop traps are functioning as intended. Currently it is only used in the layer 2 test, but it is also useful for the layer 3 test introduced in the subsequent patch. l2_drops_cleanup() is used to clean configurations and kill mausezahn proccess. Export the functions to the common devlink library to allow it to be re-used by future tests. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit dbc684f15818c081421300560dc7edc856a33e73 Author: Amit Cohen Date: Thu Nov 7 18:42:10 2019 +0200 mlxsw: Add layer 3 devlink-trap support Add the trap IDs and trap group used to report layer 3 drops. Register layer 3 packet traps and associated layer 3 trap group with devlink during driver initialization. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6896cc4d8fe6fe6163d6f0baa02a270da68896e8 Author: Amit Cohen Date: Thu Nov 7 18:42:09 2019 +0200 devlink: Add layer 3 generic packet traps Add packet traps that can report packets that were dropped during layer 3 forwarding. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c55b810abb136191b6c9f40301eb5efcf8503f38 Author: Michael Walle Date: Fri Nov 8 00:58:21 2019 +0100 enetc: fix return value for enetc_ioctl() Return -EOPNOTSUPP instead of -EINVAL if the requested ioctl is not implemented. Signed-off-by: Michael Walle Signed-off-by: David S. Miller commit 393fdfdb4aeef7dc3a45c9e28cafdc9f8a8830f2 Merge: cea35f5ad5ff df4444577118 Author: Dave Airlie Date: Fri Nov 8 13:19:51 2019 +1000 Merge tag 'mediatek-drm-next-5.5-2' of https://github.com/ckhu-mediatek/linux.git-tags into drm-next Mediatek DRM next for Linux 5.5 - 2 Signed-off-by: Dave Airlie From: CK Hu Link: https://patchwork.freedesktop.org/patch/msgid/1573093419.13645.5.camel@mtksdaap41 commit 83faaf074e6d1ca4d1441aded0d3f01bce413479 Author: Tina Zhang Date: Mon Nov 4 13:31:48 2019 +0800 drm/i915/gvt: Stop initializing pvinfo through reading mmio The region of pvinfo is reserved for communication between a VMM and the GPU driver executing on a virtual machine. HW doesn't have any backing mmio store support for the pvinfo region, thus accessing to this range through MMIO read/write from host side is forbidden which is regarded as unclaimed register access. This patch leaves pvinfo range be initialized with zero. Signed-off-by: Tina Zhang Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang commit 200ecef67b8d09d16ec55f91c92751dcc7a38d40 Author: Eric Dumazet Date: Thu Nov 7 11:51:18 2019 -0800 tcp: Remove one extra ktime_get_ns() from cookie_init_timestamp tcp_make_synack() already uses tcp_clock_ns(), and can pass the value to cookie_init_timestamp() to avoid another call to ktime_get_ns() helper. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 2386d74845c358f464429c4b071bfc681e913013 Author: David Ahern Date: Thu Nov 7 18:32:32 2019 +0000 selftests: Add source route tests to fib_tests Add tests to verify routes with source address set are deleted when source address is deleted. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 71685eb4ce80ae9c49eff82ca4dd15acab215de9 Author: Eric Dumazet Date: Thu Nov 7 10:30:42 2019 -0800 inetpeer: fix data-race in inet_putpeer / inet_putpeer We need to explicitely forbid read/store tearing in inet_peer_gc() and inet_putpeer(). The following syzbot report reminds us about inet_putpeer() running without a lock held. BUG: KCSAN: data-race in inet_putpeer / inet_putpeer write to 0xffff888121fb2ed0 of 4 bytes by interrupt on cpu 0: inet_putpeer+0x37/0xa0 net/ipv4/inetpeer.c:240 ip4_frag_free+0x3d/0x50 net/ipv4/ip_fragment.c:102 inet_frag_destroy_rcu+0x58/0x80 net/ipv4/inet_fragment.c:228 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch+0x256/0x5b0 kernel/rcu/tree.c:2157 rcu_core+0x369/0x4d0 kernel/rcu/tree.c:2377 rcu_core_si+0x12/0x20 kernel/rcu/tree.c:2386 __do_softirq+0x115/0x33f kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0xbb/0xe0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0xe6/0x280 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 native_safe_halt+0xe/0x10 arch/x86/kernel/paravirt.c:71 arch_cpu_idle+0x1f/0x30 arch/x86/kernel/process.c:571 default_idle_call+0x1e/0x40 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x1af/0x280 kernel/sched/idle.c:263 write to 0xffff888121fb2ed0 of 4 bytes by interrupt on cpu 1: inet_putpeer+0x37/0xa0 net/ipv4/inetpeer.c:240 ip4_frag_free+0x3d/0x50 net/ipv4/ip_fragment.c:102 inet_frag_destroy_rcu+0x58/0x80 net/ipv4/inet_fragment.c:228 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch+0x256/0x5b0 kernel/rcu/tree.c:2157 rcu_core+0x369/0x4d0 kernel/rcu/tree.c:2377 rcu_core_si+0x12/0x20 kernel/rcu/tree.c:2386 __do_softirq+0x115/0x33f kernel/softirq.c:292 run_ksoftirqd+0x46/0x60 kernel/softirq.c:603 smpboot_thread_fn+0x37d/0x4a0 kernel/smpboot.c:165 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.4.0-rc3+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Fixes: 4b9d9be839fd ("inetpeer: remove unused list") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit dddb318b9f989acba9ccca9babc4715a9075eae8 Author: Madalin Bucur Date: Thu Nov 7 15:03:44 2019 +0200 net: phy: at803x: add missing dependency on CONFIG_REGULATOR Compilation fails on PPC targets as CONFIG_REGULATOR is not set and drivers/regulator/devres.c is not compiled in while functions exported there are used by drivers/net/phy/at803x.c. Here's the error log: LD .tmp_vmlinux1 drivers/net/phy/at803x.o: In function `at803x_rgmii_reg_set_voltage_sel': drivers/net/phy/at803x.c:294: undefined reference to `.rdev_get_drvdata' drivers/net/phy/at803x.o: In function `at803x_rgmii_reg_get_voltage_sel': drivers/net/phy/at803x.c:306: undefined reference to `.rdev_get_drvdata' drivers/net/phy/at803x.o: In function `at8031_register_regulators': drivers/net/phy/at803x.c:359: undefined reference to `.devm_regulator_register' drivers/net/phy/at803x.c:365: undefined reference to `.devm_regulator_register' drivers/net/phy/at803x.o:(.data.rel+0x0): undefined reference to `regulator_list_voltage_table' linux/Makefile:1074: recipe for target 'vmlinux' failed make[1]: *** [vmlinux] Error 1 Fixes: 2f664823a470 ("net: phy: at803x: add device tree binding") Signed-off-by: Madalin Bucur Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 991df1fbb0dc3b44a88b4775b32d95839bf779e6 Author: Ioana Ciornei Date: Thu Nov 7 12:44:48 2019 +0200 dpaa2-eth: add ethtool MAC counters When a DPNI is connected to a MAC, export its associated counters. Ethtool related functions are added in dpaa2_mac for returning the number of counters, their strings and also their values. Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 88c8562b16a031045acb519fcbaae9908f323017 Author: Michael Walle Date: Thu Nov 7 09:40:00 2019 +0100 enetc: ethtool: add wake-on-lan callbacks If there is an external PHY, pass the wake-on-lan request to the PHY. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a613bafec516bcca3658d054bdc339008d20ac8a Author: Michael Walle Date: Thu Nov 7 09:39:37 2019 +0100 enetc: add ioctl() support for PHY-related ops If there is an attached PHY try to handle the requested ioctl with its handler, which allows the userspace to access PHY registers, for example. This will make mii-diag and similar tools work. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 630d4e75dd2969bf7da40beb3d4704356d12ae39 Author: Wei Yongjun Date: Wed Nov 6 14:52:31 2019 +0000 mlxsw: spectrum: Fix error return code in mlxsw_sp_port_module_info_init() Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 4a7f970f1240 ("mlxsw: spectrum: Replace port_to_module array with array of structs") Signed-off-by: Wei Yongjun Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit a28fda312a9fabdf0e5f5652449d6197c9fb0a90 Author: Andrey Grodzovsky Date: Wed Nov 6 12:36:29 2019 -0500 drm/amdgpu: Avoid accidental thread reactivation. Problem: During GPU reset we call the GPU scheduler to suspend it's thread, those two functions in amdgpu also suspend and resume the sceduler for their needs but this can collide with GPU reset in progress and accidently restart a suspended thread before time. Fix: Serialize with GPU reset. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2b6f717c33ef40257383478479a97d9ba2da8dab Author: Andrey Grodzovsky Date: Thu Nov 7 17:55:15 2019 -0500 drm/sched: Avoid job cleanup if sched thread is parked. When the sched thread is parked we assume ring_mirror_list is not accessed from here. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7c55adb0a9a004a1857bec1f1cd28a5bce95e40a Author: Andrey Grodzovsky Date: Mon Nov 4 15:03:27 2019 -0500 Revert "drm/amdgpu: dont schedule jobs while in reset" This reverts commit 89b3d86403f1025f6b430d8f9ffc590efbadce62. We will do a proper fix in next patch. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 83a7772ba223333755d8afd90ab8b2ea3f57d4e6 Author: Andrey Grodzovsky Date: Mon Nov 4 16:30:05 2019 -0500 drm/sched: Use completion to wait for sched->thread idle v2. Removes thread park/unpark hack from drm_sched_entity_fini and by this fixes reactivation of scheduler thread while the thread is supposed to be stopped. v2: Per sched entity completion. Signed-off-by: Andrey Grodzovsky Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cb5932f866f50ea4a95459f0b6ebe93882d0aac6 Author: Jonathan Kim Date: Wed Nov 6 08:20:21 2019 -0500 drm/amdgpu: fix vega20 pstate status change vega20 only requires all devices be set to same pstate level for low pstate and not high. Signed-off-by: Jonathan Kim Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 2af8153126e1cdd93891a9edef76fbbd497e90ab Author: Kevin Wang Date: Tue Nov 5 18:53:30 2019 +0800 drm/amdgpu: fix sysfs interface pcie_replay_count error on navi asic the asic callback function of get_pcie_replay_count is not implement on navi asic, it will cause null pinter error when read this interface. Signed-off-by: Kevin Wang Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit e31dcdcfabc1694a2af3a418827605092ac6786f Author: Emily Deng Date: Thu Nov 7 10:26:43 2019 +0800 drm/amdgpu: Need to disable msix when unloading driver For driver reload test, it will report "can't enable MSI (MSI-X already enabled)". Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f6baa07497fbebcc05096097dfd9f32b8caa50b1 Author: Oak Zeng Date: Wed Nov 6 11:18:54 2019 -0600 drm/amdgpu: Add comments to gmc structure Explain fields like aper_base, agp_start etc. The definition of those fields are confusing as they are from different view (CPU or GPU). Add comments for easier understand. Signed-off-by: Oak Zeng Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ed2d8fa734e7759ac3788a19f308d3243d0eb164 Author: Masami Hiramatsu Date: Wed Oct 23 13:58:16 2019 +0900 selftests: sync: Fix cast warnings on arm Fix warnings on __u64 and pointer translation on arm and other 32bit architectures. Since the pointer is 32bits on those archs, we should not directly cast those types. Signed-off-by: Masami Hiramatsu Cc: Emilio López Signed-off-by: Shuah Khan commit 670cd6849ea36ea4df2f2941cf4717dff8755abe Author: Masami Hiramatsu Date: Wed Oct 23 13:58:07 2019 +0900 selftests: net: Fix printf format warnings on arm Fix printf format warnings on arm (and other 32bit arch). - udpgso.c and udpgso_bench_tx use %lu for size_t but it should be unsigned long long on 32bit arch. - so_txtime.c uses %ld for int64_t, but it should be unsigned long long on 32bit arch. Signed-off-by: Masami Hiramatsu Cc: Willem de Bruijn Cc: David S. Miller Signed-off-by: Shuah Khan commit e698a2378e70cac1d6f70e7f119968a0716f8566 Author: Masami Hiramatsu Date: Wed Oct 23 13:57:58 2019 +0900 selftests: net: Use size_t and ssize_t for counting file size Use size_t and ssize_t correctly for counting send file size instead of unsigned long and long, because long is 32bit on 32bit arch, which is not enough for counting long file size (>4GB). Signed-off-by: Masami Hiramatsu Cc: Eric Dumazet Cc: David S. Miller Signed-off-by: Shuah Khan commit 7549b33642019f19241e910de556368ab55f0f32 Author: Masami Hiramatsu Date: Wed Oct 23 13:57:49 2019 +0900 selftests: vm: Build/Run 64bit tests only on 64bit arch Some virtual address range tests requires 64bit address space, and we can not build and run those tests on the 32bit machine. Filter the 64bit architectures in Makefile and run_vmtests, so that those tests are built/run only on 64bit archs. Signed-off-by: Masami Hiramatsu Cc: Anshuman Khandual Cc: Aneesh Kumar K.V Signed-off-by: Shuah Khan commit 2f3571ea71311bbb2cbb9c3bbefc9c1969a3e889 Author: Masami Hiramatsu Date: Wed Oct 23 13:57:40 2019 +0900 selftests: proc: Make va_max 1MB Currently proc-self-map-files-002.c sets va_max (max test address of user virtual address) to 4GB, but it is too big for 32bit arch and 1UL << 32 is overflow on 32bit long. Also since this value should be enough bigger than vm.mmap_min_addr (64KB or 32KB by default), 1MB should be enough. Make va_max 1MB unconditionally. Signed-off-by: Masami Hiramatsu Cc: Alexey Dobriyan Signed-off-by: Shuah Khan commit 02bf1f8b3c43eec5053c35c14fb9f138186b4123 Author: Prabhakar Kushwaha Date: Tue Oct 22 13:27:17 2019 +0000 kselftest: Fix NULL INSTALL_PATH for TARGETS runlist As per commit 131b30c94fbc ("kselftest: exclude failed TARGETS from runlist") failed targets were excluded from the runlist. But value $$INSTALL_PATH is always NULL. It should be $INSTALL_PATH instead $$INSTALL_PATH. So, fix Makefile to use $INSTALL_PATH. Fixes: 131b30c94fbc ("kselftest: exclude failed TARGETS from runlist") Signed-off-by: Prabhakar Kushwaha Reviewed-by: Cristian Marussi Signed-off-by: Shuah Khan commit c78fd76f2b673d1fb5306612c87df812c0a9ad0c Author: Kees Cook Date: Wed Oct 30 12:45:36 2019 -0700 selftests: Move kselftest_module.sh into kselftest/ The kselftest_module.sh file was not being installed by the Makefile "install" target, rendering the lib/*.sh tests nonfunction. This fixes that and takes the opportunity to move it into the kselftest/ subdirectory which is where the kselftest infrastructure bits are collecting. Reported-by: Naresh Kamboju Link: https://lore.kernel.org/lkml/CA+G9fYsfJpXQvOvHdjtg8z4a89dSStOQZOKa9zMjjQgWKng1aw@mail.gmail.com Fixes: d3460527706e ("kselftest: Add test runner creation script") Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit ea1bf0bb18c0bd627d7b551196453ff2fff44225 Author: Kees Cook Date: Wed Oct 30 12:46:08 2019 -0700 selftests: gen_kselftest_tar.sh: Do not clobber kselftest/ The default installation location for gen_kselftest_tar.sh was still "kselftest/" which collides with the existing directory. Instead, this moves the installation target into "kselftest_install/kselftest/" and adjusts the tar creation accordingly. This also adjusts indentation and logic to be consistent. Fixes: 42d46e57ec97 ("selftests: Extract single-test shell logic from lib.mk") Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 3f7df5baa2593d86c0dd206c3e63a76fce0efa4b Author: Jeffrey Hugo Date: Thu Oct 31 11:57:33 2019 -0700 clk: qcom: Add MSM8998 GPU Clock Controller (GPUCC) driver The GPUCC manages the clocks for the Adreno GPU found on MSM8998. Signed-off-by: Jeffrey Hugo Link: https://lkml.kernel.org/r/20191031185733.15553-1-jeffrey.l.hugo@gmail.com Signed-off-by: Stephen Boyd commit efd164b5520afd6fb2883b68e0d408a7de29c491 Author: Jeffrey Hugo Date: Thu Oct 31 11:57:15 2019 -0700 clk: qcom: Allow constant ratio freq tables for rcg Some RCGs (the gfx_3d_src_clk in msm8998 for example) are basically just some constant ratio from the input across the entire frequency range. It would be great if we could specify the frequency table as a single entry constant ratio instead of a long list, ie: { .src = P_GPUPLL0_OUT_EVEN, .pre_div = 3 }, { } So, lets support that. We need to fix a corner case in qcom_find_freq() where if the freq table is non-null, but has no frequencies, we end up returning an "entry" before the table array, which is bad. Then, we need ignore the freq from the table, and instead base everything on the requested freq. Suggested-by: Stephen Boyd Signed-off-by: Jeffrey Hugo Link: https://lkml.kernel.org/r/20191031185715.15504-1-jeffrey.l.hugo@gmail.com Signed-off-by: Stephen Boyd commit ba1d366de261981c0dd04fac44d2ce3a5eba2eaa Author: Jeffrey Hugo Date: Thu Nov 7 11:06:15 2019 -0800 clk: qcom: smd: Add missing pnoc clock When MSM8998 support was added, and analysis was done to determine what clocks would be consumed. That analysis had a flaw, which caused the pnoc to be skipped. The pnoc clock needs to be on to access the uart for the console. The clock is on from boot, but has no consumer votes in the RPM. When we attempt to boot the modem, it causes the RPM to turn off pnoc, which kills our access to the console and causes CPU hangs. We need pnoc to be defined, so that clk_smd_rpm_handoff() will put in an implicit vote for linux and prevent issues when booting modem. Hopefully pnoc can be consumed by the interconnect framework in future so that Linux can rely on explicit votes. Fixes: 6131dc81211c ("clk: qcom: smd: Add support for MSM8998 rpm clocks") Signed-off-by: Jeffrey Hugo Link: https://lkml.kernel.org/r/20191107190615.5656-1-jeffrey.l.hugo@gmail.com Signed-off-by: Stephen Boyd commit 95183d381a4445cb5e3edbc678a4b6267e50a738 Author: Jeffrey Hugo Date: Thu Nov 7 11:21:36 2019 -0800 clk: qcom: Enumerate clocks and reset needed to boot the 8998 modem We need to control five additional clocks and a reset inorder to boot the modem on msm8998. If we can boot the modem, we have a place to run the wlan firmware and get wifi up and running. Signed-off-by: Jeffrey Hugo Link: https://lkml.kernel.org/r/20191107192136.5880-1-jeffrey.l.hugo@gmail.com Signed-off-by: Stephen Boyd commit c3277f8ee8cdadf011b8390dfdb4c44ecfaa1a7a Author: Kamel Bouhara Date: Fri Oct 4 17:18:02 2019 +0200 soc: at91: Add Atmel SFR SN (Serial Number) support Add support to read SFR's read-only registers providing the SoC Serial Numbers (SN0+SN1) to userspace. ~ # hexdump -n 8 -e'"%d\n"' /sys/bus/nvmem/devices/atmel-sfr0/nvmem 959527243 371539274 Signed-off-by: Kamel Bouhara Tested-by: Tudor Ambarus Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20191004151802.21793-1-kamel.bouhara@bootlin.com Signed-off-by: Alexandre Belloni commit 5db3fb404af55df9d0a26bd3314bc6cd3fe9f5d6 Author: Tudor Ambarus Date: Fri Sep 6 15:15:28 2019 +0000 memory: atmel-ebi: switch to SPDX license identifiers Adopt the SPDX license identifiers to ease license compliance management. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20190906151519.19442-1-tudor.ambarus@microchip.com Signed-off-by: Alexandre Belloni commit dbbf98392af6e2cf3673908c1388ca1ae915c8bb Author: Tudor Ambarus Date: Fri Sep 6 15:06:41 2019 +0000 memory: atmel-ebi: move NUM_CS definition inside EBI driver The total number of EBI CS lines is described by the EBI controller and not by the Matrix. Move the definition for the number of CS inside EBI driver. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20190906150632.19039-1-tudor.ambarus@microchip.com Signed-off-by: Alexandre Belloni commit 5b06eeae52c02dd0d9bc8488275a1207d410870b Author: Masami Hiramatsu Date: Thu Oct 31 21:23:00 2019 +0900 selftests: breakpoints: Fix a typo of function name Since commit 5821ba969511 ("selftests: Add test plan API to kselftest.h and adjust callers") accidentally introduced 'a' typo in the front of run_test() function, breakpoint_test_arm64.c became not able to be compiled. Remove the 'a' from arun_test(). Fixes: 5821ba969511 ("selftests: Add test plan API to kselftest.h and adjust callers") Reported-by: Jun Takahashi Signed-off-by: Masami Hiramatsu Cc: Kees Cook Reviewed-by: Kees Cook Signed-off-by: Shuah Khan commit eee28109f871ea43f65cb19f429ed95ddda79343 Author: Taniya Das Date: Tue Oct 29 23:18:19 2019 +0530 clk: qcom: clk-rpmh: Add support for RPMHCC for SC7180 Add support for clock RPMh driver to vote for ARC and VRM managed clock resources. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1572371299-16774-4-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 36b355c84042d0d7d3bedbcdf7b92b3e5f187060 Author: Taniya Das Date: Tue Oct 29 23:18:18 2019 +0530 dt-bindings: clock: Introduce RPMHCC bindings for SC7180 Add compatible for SC7180 RPMHCC. Signed-off-by: Taniya Das Acked-by: Rob Herring Link: https://lkml.kernel.org/r/1572371299-16774-3-git-send-email-tdas@codeaurora.org [sboyd@kernel.org: Sort compatible list] Signed-off-by: Stephen Boyd commit 681a6ad5c009e53f175db537f79314cbe6c7c816 Author: Taniya Das Date: Tue Oct 29 23:18:17 2019 +0530 dt-bindings: clock: Add YAML schemas for the QCOM RPMHCC clock bindings The RPMHCC clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1572371299-16774-2-git-send-email-tdas@codeaurora.org Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 17269568f72670e97b19b14897137a8f5c21c09b Author: Taniya Das Date: Mon Oct 14 15:53:08 2019 +0530 clk: qcom: Add Global Clock controller (GCC) driver for SC7180 Add support for the global clock controller found on SC7180 based devices. This should allow most non-multimedia device drivers to probe and control their clocks. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/20191014102308.27441-6-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 8b9e0562f330ac20f0e77c0feb38cc7953274d7f Author: Taniya Das Date: Mon Oct 14 15:53:07 2019 +0530 dt-bindings: clock: Add sc7180 GCC clock binding Add device tree bindings for global clock subsystem clock controller for Qualcomm Technology Inc's SC7180 SoCs. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/20191014102308.27441-5-tdas@codeaurora.org Reviewed-by: Rob Herring [sboyd@kernel.org: Reword subject to make sc7180 specific, sort compatible] Signed-off-by: Stephen Boyd commit 9de7269e9703f32f742d8c88211320baaece58bc Author: Taniya Das Date: Mon Oct 14 15:53:06 2019 +0530 dt-bindings: clock: Add YAML schemas for the QCOM GCC clock bindings The GCC clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/20191014102308.27441-4-tdas@codeaurora.org Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit ffe37ede0a9eb524162c683f48da8558d5323ddb Author: Taniya Das Date: Mon Oct 14 15:53:05 2019 +0530 clk: qcom: common: Return NULL from clk_hw OF provider Return NULL in the cases where the clk_hw is not registered with the clock provider, but the clock consumer still requests for a clock id. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/20191014102308.27441-3-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 1a1c78217a779eadc6ef75d0dfb5f33088c6b481 Author: Taniya Das Date: Mon Oct 14 15:53:04 2019 +0530 clk: qcom: rcg: update the DFS macro for RCG Update the init data name for each of the dynamic frequency switch controlled clock associated with the RCG clock name, so that it can be generated as per the hardware plan. Thus update the macro accordingly. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/20191014102308.27441-2-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 57b2364d0ece3e38cd80ad0d87ff4b7c73ec474f Author: YueHaibing Date: Fri Oct 25 17:33:32 2019 +0800 clk: qcom: remove unneeded semicolon remove unneeded semicolon. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191025093332.27592-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 6cdef2738db031bfd06e3bc1c7d3c8cd16846d9e Author: Govind Singh Date: Fri Oct 11 18:59:28 2019 +0530 clk: qcom: Add Q6SSTOP clock controller for QCS404 Add support for the Q6SSTOP clock control used on qcs404 based devices. This would allow wcss remoteproc driver to control the required WCSS Q6SSTOP clock/reset controls to bring the subsystem out of reset and shutdown the WCSS Q6DSP. Signed-off-by: Govind Singh Link: https://lkml.kernel.org/r/20191011132928.9388-3-govinds@codeaurora.org [sboyd@kernel.org: Sort makefile] Signed-off-by: Stephen Boyd commit d6abecb82573fed5f7e4b595b5c0bd37707d2848 Author: Darrick J. Wong Date: Wed Nov 6 09:11:23 2019 -0800 xfs: range check ri_cnt when recovering log items Range check the region counter when we're reassembling regions from log items during log recovery. In the old days ASSERT would halt the kernel, but this isn't true any more so we have to make an explicit error return. Coverity-id: 1132508 Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 120254608f042e01e0ad1da9285006f122943a1e Author: Darrick J. Wong Date: Wed Nov 6 08:58:33 2019 -0800 xfs: "optimize" buffer item log segment bitmap setting Optimize the setting of full words of bits in xfs_buf_item_log_segment. The optimization is purely within the bug triage process. No functional changes. Coverity-id: 1446793 Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit f5be08446ee748785697527c8d772d896814b95f Author: Darrick J. Wong Date: Wed Nov 6 08:53:54 2019 -0800 xfs: null out bma->prev if no previous extent Coverity complains that we don't check the return value of xfs_iext_peek_prev_extent like we do nearly all of the time. If there is no previous extent then just null out bma->prev like we do elsewhere in the bmap code. Coverity-id: 1424057 Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 5f213ddbcbe86577f517437ef0ecb4ef3bcc3434 Author: Darrick J. Wong Date: Wed Nov 6 17:19:33 2019 -0800 xfs: fix missing header includes Some of the xfs source files are missing header includes, so add them back. Sparse complains about non-static functions that don't have a forward declaration anywhere. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 5d1116d4c6af3e580f1ed0382ca5a94bd65a34cf Author: Darrick J. Wong Date: Tue Nov 5 15:33:57 2019 -0800 xfs: periodically yield scrub threads to the scheduler Christoph Hellwig complained about the following soft lockup warning when running scrub after generic/175 when preemption is disabled and slub debugging is enabled: watchdog: BUG: soft lockup - CPU#3 stuck for 22s! [xfs_scrub:161] Modules linked in: irq event stamp: 41692326 hardirqs last enabled at (41692325): [] _raw_0 hardirqs last disabled at (41692326): [] trace0 softirqs last enabled at (41684994): [] __do_e softirqs last disabled at (41684987): [] irq_e0 CPU: 3 PID: 16189 Comm: xfs_scrub Not tainted 5.4.0-rc3+ #30 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.124 RIP: 0010:_raw_spin_unlock_irqrestore+0x39/0x40 Code: 89 f3 be 01 00 00 00 e8 d5 3a e5 fe 48 89 ef e8 ed 87 e5 f2 RSP: 0018:ffffc9000233f970 EFLAGS: 00000286 ORIG_RAX: ffffffffff3 RAX: ffff88813b398040 RBX: 0000000000000286 RCX: 0000000000000006 RDX: 0000000000000006 RSI: ffff88813b3988c0 RDI: ffff88813b398040 RBP: ffff888137958640 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffea00042b0c00 R13: 0000000000000001 R14: ffff88810ac32308 R15: ffff8881376fc040 FS: 00007f6113dea700(0000) GS:ffff88813bb80000(0000) knlGS:00000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6113de8ff8 CR3: 000000012f290000 CR4: 00000000000006e0 Call Trace: free_debug_processing+0x1dd/0x240 __slab_free+0x231/0x410 kmem_cache_free+0x30e/0x360 xchk_ag_btcur_free+0x76/0xb0 xchk_ag_free+0x10/0x80 xchk_bmap_iextent_xref.isra.14+0xd9/0x120 xchk_bmap_iextent+0x187/0x210 xchk_bmap+0x2e0/0x3b0 xfs_scrub_metadata+0x2e7/0x500 xfs_ioc_scrub_metadata+0x4a/0xa0 xfs_file_ioctl+0x58a/0xcd0 do_vfs_ioctl+0xa0/0x6f0 ksys_ioctl+0x5b/0x90 __x64_sys_ioctl+0x11/0x20 do_syscall_64+0x4b/0x1a0 entry_SYSCALL_64_after_hwframe+0x49/0xbe If preemption is disabled, all metadata buffers needed to perform the scrub are already in memory, and there are a lot of records to check, it's possible that the scrub thread will run for an extended period of time without sleeping for IO or any other reason. Then the watchdog timer or the RCU stall timeout can trigger, producing the backtrace above. To fix this problem, call cond_resched() from the scrub thread so that we back out to the scheduler whenever necessary. Reported-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 88288ed050adb5a96f6063d2d0e3e35bac8e84c2 Author: Miles Chen Date: Tue Oct 1 18:04:49 2019 +0800 docs: printk-formats: add ptrdiff_t type to printk-formats When print the difference between two pointers, we should use the ptrdiff_t modifier %t. Signed-off-by: Miles Chen Signed-off-by: Jonathan Corbet commit f0ae2cfae53b8057380801a7549f388adee59a8e Author: Mike Leach Date: Thu Oct 31 11:58:34 2019 -0600 coresight: etm4x: docs: Adds detailed document for programming etm4x. Add in detailed programmers reference for users wanting to program the CoreSight ETM 4.x driver using sysfs. Signed-off-by: Mike Leach Reviewed-by: Mathieu Poirier Signed-off-by: Jonathan Corbet commit 8adf42e293921e2ebbcfcadd89f6d4d25db04ddc Author: Mike Leach Date: Thu Oct 31 11:58:33 2019 -0600 coresight: docs: Create common sub-directory for coresight trace. There are two files in the Documentation/trace directory relating to coresight, with more to follow, so create a Documentation/trace/coresight directory and move existing files there. Fixup index to reference new location. Update MAINTAINERS to reference this sub-directory rather than the individual files. Signed-off-by: Mike Leach Reviewed-by: Mathieu Poirier Signed-off-by: Jonathan Corbet commit b3ef0df18132324b5cca436d004c1ee65fb288af Author: Mike Leach Date: Thu Oct 31 11:58:32 2019 -0600 coresight: etm4x: docs: Update ABI doc for new sysfs etm4 attributes This updates the ABI document to reflect recent additions to the ETM4.X driver sysfs interface. Signed-off-by: Mike Leach [Updated Date and KernelVersion fields] Reviewed-by: Mathieu Poirier Signed-off-by: Jonathan Corbet commit 5c8fac10c837957cd65d2c318d87c912d333dba3 Author: Mike Leach Date: Thu Oct 31 11:58:31 2019 -0600 coresight: etm4x: docs: Update ABI doc for new sysfs name scheme. Recent updates to CoreSight drivers have changed the component naming schema used in sysfs. This updates the ABI document to reflect the new naming schema. Signed-off-by: Mike Leach Reviewed-by: Mathieu Poirier Signed-off-by: Jonathan Corbet commit ff467342d3090350b3b5aa6885d6a55fbb1d0c35 Author: Jeff Layton Date: Wed Oct 30 06:46:54 2019 -0400 Documentation: atomic_open called with shared lock on non-O_CREAT open The exclusive lock is only held when O_CREAT is set. Signed-off-by: Jeff Layton Signed-off-by: Jonathan Corbet commit e8686a40a32aee572b87552b0835922a1e47bd87 Author: Konstantin Ryabitsev Date: Wed Oct 30 10:00:50 2019 -0400 docs: process: Add base-commit trailer usage One of the recurring complaints from both maintainers and CI system operators is that performing git-am on received patches is difficult without knowing the parent object in the git history on which the patches are based. Without this information, there is a high likelihood that git-am will fail due to conflicts, which is particularly frustrating to CI operators. Git versions starting with v2.9.0 are able to automatically include base-commit information using the --base flag of git-format-patch. Document this usage in process/submitting-patches, and add the rationale for its inclusion, plus instructions for those not using git on where the "base-commit:" trailer should go. Signed-off-by: Konstantin Ryabitsev Signed-off-by: Jonathan Corbet commit 36bc683dde0af61c6e677e5832ad4380771380d3 Author: Changbin Du Date: Thu Oct 31 21:52:45 2019 +0800 kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' The 'functions' directive is not only for functions, but also works for structs/unions. So the name is misleading. This patch renames it to 'identifiers', which specific the functions/types to be included in documentation. We keep the old name as an alias of the new one before all documentation are updated. Signed-off-by: Changbin Du Signed-off-by: Jonathan Corbet commit e80d89380c5a8553f208d002ee0f7877ed08eb6c Author: Masanari Iida Date: Fri Nov 1 13:04:38 2019 +0900 docs: admin-guide: Remove threads-max auto-tuning Since following path was merged in 5.4-rc3, auto-tuning feature in threads-max does not exist any more. Fix the admin-guide document as is. kernel/sysctl.c: do not override max_threads provided by userspace b0f53dbc4bc4c371f38b14c391095a3bb8a0bb40 Fixes: b0f53dbc4bc4 ("kernel/sysctl.c: do not override max_threads provided by userspace") Signed-off-by: Masanari Iida Acked-by: Michal Hocko Signed-off-by: Jonathan Corbet commit 73eb802ad97f814aa86d83cfd1d139cadbb4f0fb Author: Masanari Iida Date: Fri Nov 1 13:04:37 2019 +0900 docs: admin-guide: Fix min value of threads-max in kernel.rst Since following patch was merged 5.4-rc3, minimum value for threads-max changed to 1. kernel/sysctl.c: do not override max_threads provided by userspace b0f53dbc4bc4c371f38b14c391095a3bb8a0bb40 Fixes: b0f53dbc4bc4 ("kernel/sysctl.c: do not override max_threads provided by userspace") Signed-off-by: Masanari Iida Acked-by: Michal Hocko Signed-off-by: Jonathan Corbet commit 0d0da9aa03a178d343f64f3bd7d545b0d3bf8b7e Author: Louis Taylor Date: Sat Nov 2 18:45:11 2019 +0000 scripts/sphinx-pre-install: fix Arch latexmk dependency On Arch Linux, latexmk is installed in the texlive-core package. Signed-off-by: Louis Taylor Signed-off-by: Jonathan Corbet commit 67dd7d87d4dde482556b2e1b31d09bf19438184f Author: Louis Taylor Date: Fri Nov 1 19:33:14 2019 +0000 docs: driver-api: make interconnect title quieter This makes it consistent with the other headings in the Linux driver implementer's API guide. Signed-off-by: Louis Taylor Signed-off-by: Jonathan Corbet commit 43756e347f213b68f884c3b4082e95e7f98204f1 Author: Jonathan Neuschäfer Date: Thu Nov 7 14:41:33 2019 +0100 scripts/kernel-doc: Add support for named variable macro arguments Currently, when kernel-doc encounters a macro with a named variable argument[1], such as this: #define hlist_for_each_entry_rcu(pos, head, member, cond...) ... it expects the variable argument to be documented as `cond...`, rather than `cond`. This is semantically wrong, because the name (as used in the macro body) is actually `cond`. With this patch, kernel-doc will accept the name without dots (`cond` in the example above) in doc comments, and warn if the name with dots (`cond...`) is used and verbose mode[2] is enabled. The support for the `cond...` syntax can be removed later, when the documentation of all such macros has been switched to the new syntax. Testing this patch on top of v5.4-rc6, `make htmldocs` shows a few changes in log output and HTML output: 1) The following warnings[3] are eliminated: ./include/linux/rculist.h:374: warning: Excess function parameter 'cond' description in 'list_for_each_entry_rcu' ./include/linux/rculist.h:651: warning: Excess function parameter 'cond' description in 'hlist_for_each_entry_rcu' 2) For list_for_each_entry_rcu and hlist_for_each_entry_rcu, the correct description is shown 3) Named variable arguments are shown without dots [1]: https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html [2]: scripts/kernel-doc -v [3]: See also https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?h=dev&id=5bc4bc0d6153617eabde275285b7b5a8137fdf3c Signed-off-by: Jonathan Neuschäfer Tested-by: Paul E. McKenney Signed-off-by: Jonathan Corbet commit 184b4e60853dfeef36b96948ab8fedb7e271063c Author: Andreas Gruenbacher Date: Wed Nov 6 14:09:25 2019 +0000 gfs2: Fix end-of-file handling in gfs2_page_mkwrite When the filesystem block size is smaller than the page size, the last page may contain blocks that lie entirely beyond the end of the file. Make sure to only allocate blocks that lie at least partially in the file. Allocating blocks beyond that isn't useful, and what's more, they will not be zeroed out and may end up containing random data. With that change in place, make sure we'll still always unstuff stuffed inodes: iomap_writepage and iomap_writepages currently can't handle stuffed files. In addition, simplify and move the end-of-file check further to the top in gfs2_page_mkwrite to avoid weird side effects like unstuffing when we're not. Fixes xfstest generic/263. Signed-off-by: Andreas Gruenbacher commit f53056c43063257ae4159d83c425eaeb772bcd71 Author: Andreas Gruenbacher Date: Thu Nov 7 18:06:14 2019 +0000 gfs2: Multi-block allocations in gfs2_page_mkwrite In gfs2_page_mkwrite's gfs2_allocate_page_backing helper, try to allocate as many blocks at once as we need. Pass in the size of the requested allocation. Fixes: 35af80aef99b ("gfs2: don't use buffer_heads in gfs2_allocate_page_backing") Cc: stable@vger.kernel.org # v5.3+ Signed-off-by: Andreas Gruenbacher commit 39c3a948ecf6e7b8f55f0e91a5febc924fede4d7 Author: Andreas Gruenbacher Date: Fri Sep 6 14:51:38 2019 +0100 gfs2: Improve mmap write vs. punch_hole consistency When punching a hole in a file, use filemap_write_and_wait_range to write back any dirty pages in the range of the hole. As a side effect, if the hole isn't page aligned, this marks unaligned pages at the beginning and the end of the hole read-only. This is required when the block size is smaller than the page size: when those pages are written to again after the hole punching, we must make sure that page_mkwrite is called for those pages so that the page will be fully allocated and any blocks turned into holes from the hole punching will be reallocated. (If a page is writably mapped, page_mkwrite won't be called.) Fixes xfstest generic/567. Signed-off-by: Andreas Gruenbacher commit 1d156646e0d8ec390e5d5ac288137df02d4207be Author: Tejun Heo Date: Thu Nov 7 11:18:04 2019 -0800 blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT blkg_rwstat is now only used by bfq-iosched and blk-throtl when on cgroup1. Let's move it into its own files and gate it behind a config option. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit f73316482977ac401ac37245c9df48079d4e11f3 Author: Tejun Heo Date: Thu Nov 7 11:18:03 2019 -0800 blk-cgroup: reimplement basic IO stats using cgroup rstat blk-cgroup has been using blkg_rwstat to track basic IO stats. Unfortunately, reading recursive stats scales badly as itinvolves walking all descendants. On systems with a huge number of cgroups (dead or alive), this can lead to substantial CPU cost when reading IO stats. This patch reimplements basic IO stats using cgroup rstat which uses more memory but makes recursive stat reading O(# descendants which have been active since last reading) instead of O(# descendants). * blk-cgroup core no longer uses sync/async stats. Introduce new stat enums - BLKG_IOSTAT_{READ|WRITE|DISCARD}. * Add blkg_iostat[_set] which encapsulates byte and io stats, last values for propagation delta calculation and u64_stats_sync for correctness on 32bit archs. * Update the new percpu stat counters directly and implement blkcg_rstat_flush() to implement propagation. * blkg_print_stat() can now bring the stats up to date by calling cgroup_rstat_flush() and print them instead of directly summing up all descendants. * It now allocates 96 bytes per cpu. It used to be 40 bytes. Signed-off-by: Tejun Heo Cc: Dan Schatzberg Cc: Daniel Xu Signed-off-by: Jens Axboe commit 8a80d5d6638b7d58480a83aef49d587de63d4cbb Author: Tejun Heo Date: Thu Nov 7 11:18:02 2019 -0800 blk-cgroup: remove now unused blkg_print_stat_{bytes|ios}_recursive() These don't have users anymore. Remove them. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 7ca464383aecef5c2e32b987030187ee1e4848fb Author: Tejun Heo Date: Thu Nov 7 11:18:01 2019 -0800 blk-throtl: stop using blkg->stat_bytes and ->stat_ios When used on cgroup1, blk-throtl uses the blkg->stat_bytes and ->stat_ios from blk-cgroup core to populate four stat knobs. blk-cgroup core is moving away from blkg_rwstat to improve scalability and won't be able to support this usage. It isn't like the sharing gains all that much. Let's break them out to dedicated rwstat counters which are updated when on cgroup1. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit fd41e60331b13b8fb35cc5048185a46de98db77c Author: Tejun Heo Date: Thu Nov 7 11:18:00 2019 -0800 bfq-iosched: stop using blkg->stat_bytes and ->stat_ios When used on cgroup1, bfq uses the blkg->stat_bytes and ->stat_ios from blk-cgroup core to populate six stat knobs. blk-cgroup core is moving away from blkg_rwstat to improve scalability and won't be able to support this usage. It isn't like the sharing gains all that much. Let's break it out to dedicated rwstat counters which are updated when on cgroup1. This makes use of bfqg_*rwstat*() helpers outside of CONFIG_BFQ_CGROUP_DEBUG. Move them out. v2: Compile fix when !CONFIG_BFQ_CGROUP_DEBUG. Signed-off-by: Tejun Heo Cc: Paolo Valente Signed-off-by: Jens Axboe commit a557f1c7fee2f2059234647fea32ed1f3c07dce2 Author: Tejun Heo Date: Thu Nov 7 11:17:59 2019 -0800 bfq-iosched: relocate bfqg_*rwstat*() helpers Collect them right under #ifdef CONFIG_BFQ_CGROUP_DEBUG. The next patch will use them from !DEBUG path and this makes it easy to move them out of the ifdef block. This is pure code reorganization. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 912c0a85911a6364ac127b6e1de8c2c7782db1bc Merge: e876df1fe0ad b0814361a25c Author: Jens Axboe Date: Thu Nov 7 12:27:19 2019 -0700 Merge branch 'for-linus' into for-5.5/block Pull on for-linus to resolve what otherwise would have been a conflict with the cgroups rstat patchset from Tejun. * for-linus: (942 commits) blkcg: make blkcg_print_stat() print stats only for online blkgs nvme: change nvme_passthru_cmd64 to explicitly mark rsvd nvme-multipath: fix crash in nvme_mpath_clear_ctrl_paths nvme-rdma: fix a segmentation fault during module unload iocost: don't nest spin_lock_irq in ioc_weight_write() io_uring: ensure we clear io_kiocb->result before each issue um-ubd: Entrust re-queue to the upper layers nvme-multipath: remove unused groups_only mode in ana log nvme-multipath: fix possible io hang after ctrl reconnect io_uring: don't touch ctx in setup after ring fd install io_uring: Fix leaked shadow_req Linux 5.4-rc5 riscv: cleanup do_trap_break nbd: verify socket is supported during setup ata: libahci_platform: Fix regulator_get_optional() misuse nbd: handle racing with error'ed out commands nbd: protect cmd->status with cmd->lock io_uring: fix bad inflight accounting for SETUP_IOPOLL|SETUP_SQTHREAD io_uring: used cached copies of sq->dropped and cq->overflow ARM: dts: stm32: relax qspi pins slew-rate for stm32mp157 ... commit 1f0d5c911b64165c9754139a26c8c2fad352c132 Author: Chao Yu Date: Thu Nov 7 17:29:00 2019 +0800 f2fs: fix potential overflow We expect 64-bit calculation result from below statement, however in 32-bit machine, looped left shift operation on pgoff_t type variable may cause overflow issue, fix it by forcing type cast. page->index << PAGE_SHIFT; Fixes: 26de9b117130 ("f2fs: avoid unnecessary updating inode during fsync") Fixes: 0a2aa8fbb969 ("f2fs: refactor __exchange_data_block for speed up") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2a60637f06ac94869b2e630eaf837110d39bf291 Author: Chao Yu Date: Thu Nov 7 14:12:05 2019 +0800 f2fs: fix to update dir's i_pino during cross_rename As Eric reported: RENAME_EXCHANGE support was just added to fsstress in xfstests: commit 65dfd40a97b6bbbd2a22538977bab355c5bc0f06 Author: kaixuxia Date: Thu Oct 31 14:41:48 2019 +0800 fsstress: add EXCHANGE renameat2 support This is causing xfstest generic/579 to fail due to fsck.f2fs reporting errors. I'm not sure what the problem is, but it still happens even with all the fs-verity stuff in the test commented out, so that the test just runs fsstress. generic/579 23s ... [10:02:25] [ 7.745370] run fstests generic/579 at 2019-11-04 10:02:25 _check_generic_filesystem: filesystem on /dev/vdc is inconsistent (see /results/f2fs/results-default/generic/579.full for details) [10:02:47] Ran: generic/579 Failures: generic/579 Failed 1 of 1 tests Xunit report: /results/f2fs/results-default/result.xml Here's the contents of 579.full: _check_generic_filesystem: filesystem on /dev/vdc is inconsistent *** fsck.f2fs output *** [ASSERT] (__chk_dots_dentries:1378) --> Bad inode number[0x24] for '..', parent parent ino is [0xd10] The root cause is that we forgot to update directory's i_pino during cross_rename, fix it. Fixes: 32f9bc25cbda0 ("f2fs: support ->rename2()") Signed-off-by: Chao Yu Tested-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit ed5941af3f67ba9062b98aba1a6ca398867dc0de Author: Martin KaFai Lau Date: Thu Nov 7 10:09:05 2019 -0800 bpf: Add cb access in kfree_skb test Access the skb->cb[] in the kfree_skb test. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191107180905.4097871-1-kafai@fb.com commit 7e3617a72df32341fea6d226cd6bb21de40c558d Author: Martin KaFai Lau Date: Thu Nov 7 10:09:03 2019 -0800 bpf: Add array support to btf_struct_access This patch adds array support to btf_struct_access(). It supports array of int, array of struct and multidimensional array. It also allows using u8[] as a scratch space. For example, it allows access the "char cb[48]" with size larger than the array's element "char". Another potential use case is "u64 icsk_ca_priv[]" in the tcp congestion control. btf_resolve_size() is added to resolve the size of any type. It will follow the modifier if there is any. Please see the function comment for details. This patch also adds the "off < moff" check at the beginning of the for loop. It is to reject cases when "off" is pointing to a "hole" in a struct. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191107180903.4097702-1-kafai@fb.com commit 5f8fd2d3e0a7aa7fc9d97226be24286edd289835 Author: Jens Axboe Date: Thu Nov 7 10:57:36 2019 -0700 io_uring: properly mark async work as bounded vs unbounded Now that io-wq supports separating the two request lifetime types, mark the following IO as having unbounded runtimes: - Any read/write to a non-regular file - Any specific networked IO - Any poll command Signed-off-by: Jens Axboe commit 69625ea7bdfc928a9251435123bcf642462ef6c6 Merge: 1c8dd9cb4697 0e395b3cb1fb Author: David S. Miller Date: Thu Nov 7 10:41:59 2019 -0800 Merge branch 'cxgb4-add-support-for-TC-MQPRIO-Qdisc-Offload' Rahul Lakkireddy says: ==================== cxgb4: add support for TC-MQPRIO Qdisc Offload This series of patches add support for offloading TC-MQPRIO Qdisc to Chelsio T5/T6 NICs. Offloading QoS traffic shaping and pacing requires using Ethernet Offload (ETHOFLD) resources available on Chelsio NICs. The ETHOFLD resources are configured by firmware and taken from the resource pool shared with other Chelsio Upper Layer Drivers. Traffic flowing through ETHOFLD region requires a software netdev Tx queue (EOSW_TXQ) exposed to networking stack, and an underlying hardware Tx queue (EOHW_TXQ) used for sending packets through hardware. ETHOFLD region is addressed using EOTIDs, which are per-connection resource. Hence, EOTIDs are capable of storing only a very small number of packets in flight. To allow more connections to share the the QoS rate limiting configuration, multiple EOTIDs must be allocated to reduce packet drops. EOTIDs are 1-to-1 mapped with software EOSW_TXQ. Several software EOSW_TXQs can post packets to a single hardware EOHW_TXQ. The series is broken down as follows: Patch 1 queries firmware for maximum available traffic classes, as well as, start and maximum available indices (EOTID) into ETHOFLD region, supported by the underlying device. Patch 2 reworks queue configuration and simplifies MSI-X allocation logic in preparation for ETHOFLD queues support. Patch 3 adds skeleton for validating and configuring TC-MQPRIO Qdisc offload. Also, adds support for software EOSW_TXQs and exposes them to network stack. Updates Tx queue selection to use fallback NIC Tx path for unsupported traffic that can't go through ETHOFLD queues. Patch 4 adds support for managing hardware queues to rate limit traffic flowing through them. The queues are allocated/removed based on enabling/disabling TC-MQPRIO Qdisc offload, respectively. Patch 5 adds Tx path for traffic flowing through software EOSW_TXQ and EOHW_TXQ. Also, adds Rx path to handle Tx completions. Patch 6 updates exisiting SCHED API to configure FLOWC based QoS offload. In the existing QUEUE based rate limiting, multiple queues sharing a traffic class get the aggreagated max rate limit value. On the other hand, in FLOWC based rate limiting, multiple queues sharing a traffic class get their own individual max rate limit value. For example, if 2 queues are bound to class 0, which is rate limited to 1 Gbps, then in QUEUE based rate limiting, both the queues get the aggregate max output of 1 Gbps only. In FLOWC based rate limiting, each queue gets its own output of max 1 Gbps each; i.e. 2 queues * 1 Gbps rate limit = 2 Gbps max output. ==================== Signed-off-by: David S. Miller commit 0e395b3cb1fb82f5d056fd5425025a77da4d4f62 Author: Rahul Lakkireddy Date: Thu Nov 7 21:29:09 2019 +0530 cxgb4: add FLOWC based QoS offload Rework SCHED API to allow offloading TC-MQPRIO QoS configuration. The existing QUEUE based rate limiting throttles all queues sharing a traffic class, to the specified max rate limit value. So, if multiple queues share a traffic class, then all the queues get the aggregate specified max rate limit. So, introduce the new FLOWC based rate limiting, where multiple queues can share a traffic class with each queue getting its own individual specified max rate limit. For example, if 2 queues are bound to class 0, which is rate limited to 1 Gbps, then 2 queues using QUEUE based rate limiting, get the aggregate output of 1 Gbps only. In FLOWC based rate limiting, each queue gets its own output of max 1 Gbps each; i.e. 2 queues * 1 Gbps rate limit = 2 Gbps. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 4846d5330dafc82990be7ffe1d1b383157268bd9 Author: Rahul Lakkireddy Date: Thu Nov 7 21:29:08 2019 +0530 cxgb4: add Tx and Rx path for ETHOFLD traffic Implement Tx path for traffic flowing through software EOSW_TXQ and EOHW_TXQ. Since multiple EOSW_TXQ can post packets to a single EOHW_TXQ, protect the hardware queue with necessary spinlock. Also, move common code used to generate TSO work request to a common function. Implement Rx path to handle Tx completions for successfully transmitted packets. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 2d0cb84dd9731d5d0e1326f0e10be893cb2fe698 Author: Rahul Lakkireddy Date: Thu Nov 7 21:29:07 2019 +0530 cxgb4: add ETHOFLD hardware queue support Add support for configuring and managing ETHOFLD hardware queues. Keep the queue count and MSI-X allocation scheme same as NIC queues. ETHOFLD hardware queues are dynamically allocated/destroyed as TC-MQPRIO Qdisc offload is enabled/disabled on the corresponding interface, respectively. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit b1396c2bd67556b8d9a31ea2b26e133cb6c802d3 Author: Rahul Lakkireddy Date: Thu Nov 7 21:29:06 2019 +0530 cxgb4: parse and configure TC-MQPRIO offload Add logic for validation and configuration of TC-MQPRIO Qdisc offload. Also, add support to manage EOSW_TXQ, which have 1-to-1 mapping with EOTIDs, and expose them to network stack. Move common skb validation in Tx path to a separate function and add minimal Tx path for ETHOFLD. Update Tx queue selection to return normal NIC Txq to send traffic pattern that can't go through ETHOFLD Tx path. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 76c3a552e80ea47b7a9e4ba3f6e6af9659b23e7f Author: Rahul Lakkireddy Date: Thu Nov 7 21:29:05 2019 +0530 cxgb4: rework queue config and MSI-X allocation Simplify queue configuration and MSI-X allocation logic. Use a single MSI-X information table for both NIC and ULDs. Remove hard-coded MSI-X indices for firmware event queue and non data interrupts. Instead, use the MSI-X bitmap to obtain a free MSI-X index dynamically. Save each Rxq's index into the MSI-X information table, within the Rxq structures themselves, for easier cleanup. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit ab0367ea42217d45f0d8681a12ccff0efede9c39 Author: Rahul Lakkireddy Date: Thu Nov 7 21:29:04 2019 +0530 cxgb4: query firmware for QoS offload resources QoS offload needs Ethernet Offload (ETHOFLD) resources present in the NIC. These resources are shared with other ULDs. So, query firmware for the available number of traffic classes, as well as, start and end indices (EOTID) of the ETHOFLD region. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit c5def4ab849494d3c97f6c9fc84b2ddb868fe78c Author: Jens Axboe Date: Thu Nov 7 11:41:16 2019 -0700 io-wq: add support for bounded vs unbunded work io_uring supports request types that basically have two different lifetimes: 1) Bounded completion time. These are requests like disk reads or writes, which we know will finish in a finite amount of time. 2) Unbounded completion time. These are generally networked IO, where we have no idea how long they will take to complete. Another example is POLL commands. This patch provides support for io-wq to handle these differently, so we don't starve bounded requests by tying up workers for too long. By default all work is bounded, unless otherwise specified in the work item. Signed-off-by: Jens Axboe commit 91d666ea43adef57a6cd50c81b9603c545654981 Author: Jens Axboe Date: Thu Nov 7 09:17:36 2019 -0700 io-wq: io_wqe_run_queue() doesn't need to use list_empty_careful() We hold the wqe lock at this point (which is also annotated), so there's no need to use the careful variant of list_empty(). Signed-off-by: Jens Axboe commit 1d7bb1d50fb4dc141c7431cc21fdd24ffcc83c76 Author: Jens Axboe Date: Wed Nov 6 11:31:17 2019 -0700 io_uring: add support for backlogged CQ ring Currently we drop completion events, if the CQ ring is full. That's fine for requests with bounded completion times, but it may make it harder or impossible to use io_uring with networked IO where request completion times are generally unbounded. Or with POLL, for example, which is also unbounded. After this patch, we never overflow the ring, we simply store requests in a backlog for later flushing. This flushing is done automatically by the kernel. To prevent the backlog from growing indefinitely, if the backlog is non-empty, we apply back pressure on IO submissions. Any attempt to submit new IO with a non-empty backlog will get an -EBUSY return from the kernel. This is a signal to the application that it has backlogged CQ events, and that it must reap those before being allowed to submit more IO. Note that if we do return -EBUSY, we will have filled whatever backlogged events into the CQ ring first, if there's room. This means the application can safely reap events WITHOUT entering the kernel and waiting for them, they are already available in the CQ ring. Signed-off-by: Jens Axboe commit 78e19bbef38362cebff38aa1ca12e2c82bb72eb8 Author: Jens Axboe Date: Wed Nov 6 15:21:34 2019 -0700 io_uring: pass in io_kiocb to fill/add CQ handlers This is in preparation for handling CQ ring overflow a bit smarter. We should not have any functional changes in this patch. Most of the changes are fairly straight forward, the only ones that stick out a bit are the ones that change __io_free_req() to take the reference count into account. If the request hasn't been submitted yet, we know it's safe to simply ignore references and free it. But let's clean these up too, as later patches will depend on the caller doing the right thing if the completion logging grabs a reference to the request. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 84f97dc2333c626979bb547fce343a1003544dcc Author: Jens Axboe Date: Wed Nov 6 11:27:53 2019 -0700 io_uring: make io_cqring_events() take 'ctx' as argument The rings can be derived from the ctx, and we need the ctx there for a future change. No functional changes in this patch. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2665abfd757fb35a241c6f0b1ebf620e3ffb36fb Author: Jens Axboe Date: Tue Nov 5 12:40:47 2019 -0700 io_uring: add support for linked SQE timeouts While we have support for generic timeouts, we don't have a way to tie a timeout to a specific SQE. The generic timeouts simply trigger wakeups on the CQ ring. This adds support for IORING_OP_LINK_TIMEOUT. This command is only valid as a link to a previous command. The timeout specific can be either relative or absolute, following the same rules as IORING_OP_TIMEOUT. If the timeout triggers before the dependent command completes, it will attempt to cancel that command. Likewise, if the dependent command completes before the timeout triggers, it will cancel the timeout. Signed-off-by: Jens Axboe commit e977d6d34f0c08e3c3b132c9e73b98d0db50abc1 Author: Jens Axboe Date: Tue Nov 5 12:39:45 2019 -0700 io_uring: abstract out io_async_cancel_one() helper We're going to need this helper in a future patch, so move it out of io_async_cancel() and into its own separate function. No functional changes in this patch. Signed-off-by: Jens Axboe commit f5a53edcf01eae21dc3ef1845515229e8459e5cc Author: Jaegeuk Kim Date: Fri Oct 18 10:06:40 2019 -0700 f2fs: support aligned pinned file This patch supports 2MB-aligned pinned file, which can guarantee no GC at all by allocating fully valid 2MB segment. Check free segments by has_not_enough_free_secs() with large budget. Signed-off-by: Jaegeuk Kim commit bc005a4d5347da68e690f78d365d8927c87dc85a Author: Jaegeuk Kim Date: Fri Nov 1 09:34:21 2019 -0700 f2fs: avoid kernel panic on corruption test xfstests/generic/475 complains kernel warn/panic while testing corrupted disk. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1720624ee47369d6221dde477a883ddf57379531 Merge: 228fc0104070 a99d8080aaf3 Author: Bartosz Golaszewski Date: Thu Nov 7 18:41:27 2019 +0100 Merge tag 'v5.4-rc6' into gpio/for-next Linux 5.4-rc6 commit 5c14aba77874d350db8973f4c980fd92c8b1fa07 Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:46 2019 -0800 tools/power/x86/intel-speed-select: Increment version Since the tool now adds support for another Intel SST implementation, increment version number. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit de7f9d3ddc8c71a116fbdfa298a19abd8d46e696 Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:45 2019 -0800 tools/power/x86/intel-speed-select: Use core count for base-freq mask Some firmware implementation gives error when a command is sent get mask for core count 32-61. So use core count to decide. But there is no function to get core count. So introduce one function to get core count. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 7af5a95bb752702bfc91fc513d37f1f799e6fd1f Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:44 2019 -0800 tools/power/x86/intel-speed-select: Support platform with limited Intel(R) Speed Select There are some platforms, where there limited support of Intel(R) SST features. Here perf-profile has only one base configuration and limited support of commands. But still has support for discovery of base-freq and turbo-freq features. So it is important to show minimum features to use base-freq and turbo-freq features. Here the change are: - When there is no support of CONFIG_TDP_GET_LEVELS_INFO, then instead of treating this as fatal error, treat this with number of config levels = 0, that means only base level 0 is present. - There is no support of mail box commands to get base frequencies or turbo frequencies. Here present base frequency by reading cpufreq base freq and turbo frequency by reading MSR 0x1AD. - Don't display any field, which has value == 0. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 21c3390d61286912cef312dc4752719142ce0d54 Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:43 2019 -0800 tools/power/x86/intel-speed-select: Use Frequency weight for CLOS Use different frequency weights for CLOS 0 and and CLOS1-3, to define relative priority for power budgeting. This will be used for --auto mode to enable base-freq and turbo-freq feature. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 40dee9dda37d5596ad119d3c3962ca49d3f035a5 Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:42 2019 -0800 tools/power/x86/intel-speed-select: Make CLOS frequency in MHz To be consistant with the other frequency units, change the CLOS unit to MHz instead of ratios. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit cd0e63706549c3e0d61f5fe48806a4528c575035 Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:41 2019 -0800 tools/power/x86/intel-speed-select: Use mailbox for CLOS_PM_QOS_CONFIG Use mailbox to read/write CLOS_PM_QOS_CONFIG instead of read/write to MMIO offset. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit a9b2f8e2fa6c0f791f2345afb826d47c6a0f0e2c Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:40 2019 -0800 tools/power/x86/intel-speed-select: Auto mode for CLX There is an expectation in the CLX platform for SST base-freq feature that Scaling min frequency be different for high and low priority cores. This is the way the firmware will understand the priority. So this change will look at high priority and low priority cores, and set scaling_min_freq to P1High for high priority cores and P1Low to low priority cores. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 91d928147bb0d03219fd6cc079e16fd74e232e2b Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:39 2019 -0800 tools/power/x86/intel-speed-select: Correct CLX-N frequency units In CLX_N base_frequency is read from cpufreq sysfs, where units are in KHz. The internal units in the code matches the real ratios which are in 100MHz scale. So when storing units for CLX-N frequencies, convert to 100MHz scale. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 82d4a34ee6196a652f04f81d23ab296bddf8486d Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:38 2019 -0800 tools/power/x86/intel-speed-select: Change display of "avx" to "avx2" Make the avx level display consistent. Except for "turbo-ratio-limits-avx", everywhere else it is avx2. So change "turbo-ratio-limits-avx" to "turbo-ratio-limits-avx2". Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 263225c983aa27719fe06836426e270b658036ed Author: Srinivas Pandruvada Date: Mon Nov 4 03:02:37 2019 -0800 tools/power/x86/intel-speed-select: Extend command set for perf-profile Add support for uncore P0, uncore P1, P1 for base and AVX levels and memory frequency. These commands are optional, so continue on failure. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 35ad035b8398c634d888324a299ec50a84cbc6cc Author: Nathan Chancellor Date: Thu Oct 24 13:28:03 2019 -0700 dm raid: Remove unnecessary negation of a shift in raid10_format_to_md_layout When building with Clang + -Wtautological-constant-compare: drivers/md/dm-raid.c:619:8: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare] r = !RAID10_OFFSET; ^ drivers/md/dm-raid.c:517:28: note: expanded from macro 'RAID10_OFFSET' #define RAID10_OFFSET (1 << 16) /* stripes with data copies area adjacent on devices */ ^ 1 warning generated. Negating a non-zero number will always make it zero, which is the default value of r in this function so this statement is unnecessary; remove it so that clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/753 Signed-off-by: Nathan Chancellor Acked-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 4e1003aa56a7d60ddb048e43a7a51368fcfe36af Author: Christoph Hellwig Date: Tue Oct 29 09:57:32 2019 +0100 dma-direct: remove the dma_handle argument to __dma_direct_alloc_pages The argument isn't used anywhere, so stop passing it. Signed-off-by: Christoph Hellwig Reviewed-by: Max Filippov commit acaade1af3587132e7ea585f470a95261e14f60c Author: Christoph Hellwig Date: Tue Oct 29 09:57:09 2019 +0100 dma-direct: remove __dma_direct_free_pages We can just call dma_free_contiguous directly instead of wrapping it. Signed-off-by: Christoph Hellwig Reviewed-by: Max Filippov commit 9090825fa99740f0c794f94b9cbd57ad79101228 Author: Thomas Gleixner Date: Thu Nov 7 10:54:24 2019 +0100 KVM: arm/arm64: Let the timer expire in hardirq context on RT The timers are canceled from an preempt-notifier which is invoked with disabled preemption which is not allowed on PREEMPT_RT. The timer callback is short so in could be invoked in hard-IRQ context on -RT. Let the timer expire on hard-IRQ context even on -RT. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Marc Zyngier Tested-by: Julien Grall Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20191107095424.16647-1-bigeasy@linutronix.de commit 742e8cd3e1ba6f19cad6d912f8d469df5557d0fd Author: Honglei Wang Date: Wed Oct 30 16:18:10 2019 +0800 cgroup: freezer: don't change task and cgroups status unnecessarily It's not necessary to adjust the task state and revisit the state of source and destination cgroups if the cgroups are not in freeze state and the task itself is not frozen. And in this scenario, it wakes up the task who's not supposed to be ready to run. Don't do the unnecessary task state adjustment can help stop waking up the task without a reason. Signed-off-by: Honglei Wang Acked-by: Roman Gushchin Signed-off-by: Tejun Heo commit add66fcbd3fbe5aa0dd4dddfa23e119c12989a27 Author: Andreas Gruenbacher Date: Thu Nov 7 07:28:18 2019 -0800 iomap: Fix overflow in iomap_page_mkwrite On architectures where loff_t is wider than pgoff_t, the expression ((page->index + 1) << PAGE_SHIFT) can overflow. Rewrite to use the page offset, which we already compute here anyway. Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 66a8966aac12f2a79de514dbbe99c9b3e90c9280 Merge: 9ff7759731db df37d941c4b5 Author: Takashi Iwai Date: Thu Nov 7 16:27:49 2019 +0100 Merge branch 'for-linus' into for-next Merge 5.4-devel branch for applying the further ALSA timer fixes. Signed-off-by: Takashi Iwai commit b79967a27f347d39a6e0b85b49bd11963cacf5c1 Author: Marcelo Diop-Gonzalez Date: Tue Nov 5 17:27:56 2019 -0500 staging: vchiq: Have vchiu_queue_init() return 0 on success. It could be confusing to return 1 on success and 0 on error given the style elswhere. Signed-off-by: Marcelo Diop-Gonzalez Link: https://lore.kernel.org/r/20191105222756.25369-1-marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman commit 4df0991b0c92c74c5e81bf55fd156ce92d812d01 Author: Christian Gromm Date: Thu Nov 7 15:49:28 2019 +0100 staging: most: remove string termination dependency from user space data This patch removes the constraint that user space data has to be terminated with a new line character. It is needed to let the user choose how the data is formatted. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1573138169-27562-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 885961fed45dca0de605a94aa6d12d694acfb787 Author: Jamal Shareef Date: Tue Nov 5 14:55:31 2019 -0800 staging: vc04_services: Replace VCHIQ_PLATFORM_STATE_T typedef with struct opaque_platform_state Replace VCHIQ_PLATFORM_STATE_T typedef with struct opaque_platform_state to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/ed1a877637a53881ed65dc232da04dc40fbd9fc3.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4ddf9a2555caf210f60fdcec35d8081aa4135ea0 Author: Jamal Shareef Date: Tue Nov 5 14:55:30 2019 -0800 staging: vc04_services: Replace VCHIQ_INSTANCE_T typedef with struct vchiq_instance Replaces VCHIQ_INSTANCE_T typedef with struct vchiq_instance to match kernel code style. Issue found by checkpatch. Additionally, as part of the process renames "struct vchiq_instance_struct" to "struct vchiq_instance". Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/ed2b3076f93a920149716687b48e0c5e3ddf0569.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9ce46d55510fae690f3104dda591c3a9b0085f38 Author: Jamal Shareef Date: Tue Nov 5 14:55:29 2019 -0800 staging: vc04_services: Replace VCHIQ_SERVICE_HANDLE_T typedef with unsigned int Replaces VCHIQ_SERVICE_HANDLE_T typedef with unsigned int to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/9d35b9fea684d18cc1e989621808d77eef3081c6.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit c8bf4d3db9ef3a0ed8b53b622ffa1aca7559a352 Author: Jamal Shareef Date: Tue Nov 5 14:55:28 2019 -0800 staging: vc04_services: Rename VCHIQ_REMOTE_USE_CALLBACK_T to vchiq_remote_callback Renames VCHIQ_REMOTE_USE_CALLBACK_T to vchiq_remote_callback to match kernel code style. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/dacc944e3981290d3e5b81aa600f4c19be8e6f10.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 80be64b2bf6dd67fc201377beedecb6f8011301e Author: Jamal Shareef Date: Tue Nov 5 14:55:27 2019 -0800 staging: vc04_services: Rename VCHIQ_CALLBACK_T to vchiq_callback Renames VCHIQ_CALLBACK_T to vchiq_callback to match kernel code style. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/6abe37fb39f896b257d7b370e1c2ad861ed8b675.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit e661ad496a6fdd18c07de66f1d6c2aa1246619aa Author: Jamal Shareef Date: Tue Nov 5 14:55:26 2019 -0800 staging: vc04_services: Rename callback VCHIQ_USERDATA_TERM_T to vchiq_userdata_term Renames callback VCHIQ_USERDATA_TERM_T to vchiq_userdata_term to match kernel code style. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/478914a1e756f78c3277acb3852c1ccdcb2d5750.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit d2684ce853cf275c724d14f5df5cdfac9064d2bd Author: Jamal Shareef Date: Tue Nov 5 14:55:25 2019 -0800 staging: vc04_services: Replace VCHIQ_BULK_DIR_T enum typedef with enum vchiq_bulk_dir Replaces VCHIQ_BULK_DIR_T enum typedef with enum vchiq_bulk_dir to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/344e01e371aa7fbf670ba118be174e391e078e6a.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 051fbf4739bddb7e22255b67029e083b37f68586 Author: Jamal Shareef Date: Tue Nov 5 14:55:24 2019 -0800 staging: vc04_services: Replace VCHIQ_CONNSTATE_T enum typedef with enum vchiq_connstate Replaces VCHIQ_CONNSTATE_T enum typedef with enum vchiq_connstate to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/7e64765a55193413e9668dc53f751c435369ed80.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 27c53ee865bab3ac94461c6a6dbaec435262c629 Author: Jamal Shareef Date: Tue Nov 5 14:55:23 2019 -0800 staging: vc04_services: Replace VCHIQ_SERVICE_OPTION_T enum typedef with enum vchiq_service_option Replaces VCHIQ_SERVICE_OPTION_T enum typedef with enum vchiq_service_option to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/f8e9c9170ed008043186dda99d40b60fb16c1d85.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit c6ac64b1e81c95a2e9a8927dd730081331670e30 Author: Jamal Shareef Date: Tue Nov 5 14:55:22 2019 -0800 staging: vc04_services: Replace VCHIQ_BULK_MODE_T enum typedef with enum vchiq_bulk_mode Replaces VCHIQ_BULK_MODE_T enum typedef with enum vchiq_bulk_mode to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/667037e1810921e30371dbeb52c1ae489bf31f8c.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 00d36494dee9e5020250e9bb5afd54362795847e Author: Jamal Shareef Date: Tue Nov 5 14:55:21 2019 -0800 staging: vc04_services: Replace VCHIQ_STATUS_T enum typedef with enum vchiq_status Replaces VCHIQ_STATUS_T enum typedef with enum vchiq_status to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/7509cfa679c6d383ad979282f3d33b227d4d7f87.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0ff3c366a7eb53f1c12f6d6ddb08b68c89841dcb Author: Jamal Shareef Date: Tue Nov 5 14:55:20 2019 -0800 staging: vc04_services: Rename callback VCHI_CALLBACK_T to vchi_callback Renames callback function pointer typedef VCHI_CALLBACK_T to vchi_callback to better match kernel code style. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/0b0f85060b38e6195fe2d58989621e7b09eafe51.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 29ebf64f741e7f40d6c0e5d187fa0cd0a0ddd4f1 Author: Jamal Shareef Date: Tue Nov 5 14:55:19 2019 -0800 staging: vc04_services: Replace VCHI_SERVICE_HANDLE_T typedef with struct vchi_service_handle Replaces VCHI_SERVICE_HANDLE_T typedef with vchi_service_handle struct to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/ec9a1a4bdd87ff008e48835cf7c39847d999b147.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit fb22360db6517e2392d432737e4859ee07c43533 Author: Jamal Shareef Date: Tue Nov 5 14:55:18 2019 -0800 staging: vc04_services: Replace VCHI_INSTANCE_T with struct vhci_instance_handle Replaces VCHI_INSTANCE_T typedef with struct vchi_instance_handle to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/0b481a90b8a2b9cd6718e972dab681854ff312d7.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 30ee348c1267f5e69875a953e3b9cd5da83252a4 Merge: 9656b346b280 98e527af30a6 Author: Daniel Borkmann Date: Thu Nov 7 16:20:38 2019 +0100 Merge branch 'bpf-libbpf-fixes' Andrii Nakryiko says: ==================== Github's mirror of libbpf got LGTM and Coverity statis analysis running against it and spotted few real bugs and few potential issues. This patch series fixes found issues. ==================== Signed-off-by: Daniel Borkmann commit 98e527af30a62cfb1e26f2a0ca76289bc7aba4d2 Author: Andrii Nakryiko Date: Wed Nov 6 18:08:55 2019 -0800 libbpf: Improve handling of corrupted ELF during map initialization If we get ELF file with "maps" section, but no symbols pointing to it, we'll end up with division by zero. Add check against this situation and exit early with error. Found by Coverity scan against Github libbpf sources. Fixes: bf82927125dd ("libbpf: refactor map initialization") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107020855.3834758-6-andriin@fb.com commit 994021a7e08477f7e51285920aac99fc967fae8a Author: Andrii Nakryiko Date: Wed Nov 6 18:08:54 2019 -0800 libbpf: Make btf__resolve_size logic always check size error condition Perform size check always in btf__resolve_size. Makes the logic a bit more robust against corrupted BTF and silences LGTM/Coverity complaining about always true (size < 0) check. Fixes: 69eaab04c675 ("btf: extract BTF type size calculation") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107020855.3834758-5-andriin@fb.com commit dd3ab126379ec040b3edab8559f9c72de6ef9d29 Author: Andrii Nakryiko Date: Wed Nov 6 18:08:53 2019 -0800 libbpf: Fix another potential overflow issue in bpf_prog_linfo Fix few issues found by Coverity and LGTM. Fixes: b053b439b72a ("bpf: libbpf: bpftool: Print bpf_line_info during prog dump") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107020855.3834758-4-andriin@fb.com commit 4ee1135615713387b869dfd099ffdf8656be6784 Author: Andrii Nakryiko Date: Wed Nov 6 18:08:52 2019 -0800 libbpf: Fix potential overflow issue Fix a potential overflow issue found by LGTM analysis, based on Github libbpf source code. Fixes: 3d65014146c6 ("bpf: libbpf: Add btf_line_info support to libbpf") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107020855.3834758-3-andriin@fb.com commit 3dc5e059821376974177cc801d377e3fcdac6712 Author: Andrii Nakryiko Date: Wed Nov 6 18:08:51 2019 -0800 libbpf: Fix memory leak/double free issue Coverity scan against Github libbpf code found the issue of not freeing memory and leaving already freed memory still referenced from bpf_program. Fix it by re-assigning successfully reallocated memory sooner. Fixes: 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107020855.3834758-2-andriin@fb.com commit 9d95f0ce36df70e6d7b1f658277c772f589acd84 Author: Petr Mladek Date: Thu Oct 31 14:33:37 2019 +0100 MAINTAINERS: Add VSPRINTF printk maintainers have been reviewing patches against vsprintf code last few years. Most changes have been committed via printk.git last two years. New group is used because printk() is not the only vsprintf() user. Also the group of interested people is not the same. Link: http://lkml.kernel.org/r/20191031133337.9306-1-pmladek@suse.com Cc: Rasmus Villemoes Cc: Sergey Senozhatsky Cc: linux-kernel@vger.kernel.org Cc: Andrew Morton Cc: Uwe Kleine-König Cc: Joe Perches Cc: Sakari Ailus Acked-by: Steven Rostedt (VMware) Acked-by: Andy Shevchenko Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 9656b346b280c3e49c8a116c3a715f966633b161 Author: Andrii Nakryiko Date: Wed Nov 6 21:40:59 2019 -0800 libbpf: Fix negative FD close() in xsk_setup_xdp_prog() Fix issue reported by static analysis (Coverity). If bpf_prog_get_fd_by_id() fails, xsk_lookup_bpf_maps() will fail as well and clean-up code will attempt close() with fd=-1. Fix by checking bpf_prog_get_fd_by_id() return result and exiting early. Fixes: 10a13bb40e54 ("libbpf: remove qidconf and better support external bpf programs.") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107054059.313884-1-andriin@fb.com commit c3a12cc1ec4c9cb52a82d3691f35019816bda0a7 Author: Javier F. Arias Date: Tue Nov 5 14:14:19 2019 -0500 staging: rtl8723bs: Simplify boolean expression Simplify expression that it's inverting a boolean value. Issue found by Coccinelle. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/9799bed4370f8cc1bd6a1735721fcd91fac30e09.1572640293.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit a8fa78b8f49752896aa208400519555e01512e47 Author: Javier F. Arias Date: Tue Nov 5 14:13:48 2019 -0500 staging: rtl8723bs: Fix line over 80 characters Fix line over 80 characters by wrapping arguments in function call. Suggested-by: Julia Lawall . Signed-off-by: Javier F. Arias -- Changes in V4: - Changed the number of arguments before wrapping to make the code more readable. Changes in V3: - Edit the commit message to properly use the Suggested-by tag. Changes in V2: - Edit the commit message to use the Suggested-by tag. drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Link: https://lore.kernel.org/r/61967dc169db6d343b9183361cd6c1ad7ad149fd.1572640293.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit e71903106721dc53923e90aa484d78bc86c039a9 Author: Jules Irenge Date: Tue Nov 5 22:03:20 2019 +0000 staging: mt7621-dma: align to match open parenthesis Align to match open parenthesis. "CHECK: Alignment should match open parenthesis". Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191105220320.50180-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit dab2e9eb187cb53c951c0c556172a73ac7f0e834 Author: Ilya Leoshkevich Date: Thu Nov 7 12:40:33 2019 +0100 s390/bpf: Remove unused SEEN_RET0, SEEN_REG_AX and ret0_ip We don't need them since commit e1cf4befa297 ("bpf, s390x: remove ld_abs/ld_ind") and commit a3212b8f15d8 ("bpf, s390x: remove obsolete exception handling from div/mod"). Also, use BIT(n) instead of 1 << n, because checkpatch says so. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107114033.90505-1-iii@linux.ibm.com commit e7fad909b68aa37470d9f2d2731b5bec355ee5d6 Author: Dmitry Fomichev Date: Wed Nov 6 14:34:35 2019 -0800 dm zoned: reduce overhead of backing device checks Commit 75d66ffb48efb3 added backing device health checks and as a part of these checks, check_events() block ops template call is invoked in dm-zoned mapping path as well as in reclaim and flush path. Calling check_events() with ATA or SCSI backing devices introduces a blocking scsi_test_unit_ready() call being made in sd_check_events(). Even though the overhead of calling scsi_test_unit_ready() is small for ATA zoned devices, it is much larger for SCSI and it affects performance in a very negative way. Fix this performance regression by executing check_events() only in case of any I/O errors. The function dmz_bdev_is_dying() is modified to call only blk_queue_dying(), while calls to check_events() are made in a new helper function, dmz_check_bdev(). Reported-by: zhangxiaoxu Fixes: 75d66ffb48efb3 ("dm zoned: properly handle backing device failure") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Fomichev Signed-off-by: Mike Snitzer commit 6ad2e1a00729f9a27b80f8d9962520b89420280d Author: Ilya Leoshkevich Date: Thu Nov 7 12:32:11 2019 +0100 s390/bpf: Wrap JIT macro parameter usages in parentheses This change does not alter JIT behavior; it only makes it possible to safely invoke JIT macros with complex arguments in the future. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107113211.90105-1-iii@linux.ibm.com commit 166f11d11f6f70439830d09bfa5552ec1b368494 Author: Ilya Leoshkevich Date: Thu Nov 7 15:18:38 2019 +0100 s390/bpf: Use kvcalloc for addrs array A BPF program may consist of 1m instructions, which means JIT instruction-address mapping can be as large as 4m. s390 has FORCE_MAX_ZONEORDER=9 (for memory hotplug reasons), which means maximum kmalloc size is 1m. This makes it impossible to JIT programs with more than 256k instructions. Fix by using kvcalloc, which falls back to vmalloc for larger allocations. An alternative would be to use a radix tree, but that is not supported by bpf_prog_fill_jited_linfo. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107141838.92202-1-iii@linux.ibm.com commit 7e22077d0c73a68ff3fd8b3d2f6564fcbcf8cb23 Author: Ilya Leoshkevich Date: Thu Nov 7 11:03:49 2019 +0100 tools, bpf_asm: Warn when jumps are out of range When compiling larger programs with bpf_asm, it's possible to accidentally exceed jt/jf range, in which case it won't complain, but rather silently emit a truncated offset, leading to a "happy debugging" situation. Add a warning to help detecting such issues. It could be made an error instead, but this might break compilation of existing code (which might be working by accident). Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191107100349.88976-1-iii@linux.ibm.com commit e9f37e0900585bad631fbadbc2bee9af61ba0d0d Author: Joe Lawrence Date: Wed Nov 6 22:29:58 2019 -0500 x86/stacktrace: update kconfig help text for reliable unwinders commit 6415b38bae26 ("x86/stacktrace: Enable HAVE_RELIABLE_STACKTRACE for the ORC unwinder") added the ORC unwinder as a "reliable" unwinder. Update the help text to reflect that change: the frame pointer unwinder is no longer the only one that can provide HAVE_RELIABLE_STACKTRACE. Link: http://lkml.kernel.org/r/20191107032958.14034-1-joe.lawrence@redhat.com To: linux-kernel@vger.kernel.org To: live-patching@vger.kernel.org Signed-off-by: Joe Lawrence Acked-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Signed-off-by: Petr Mladek commit 4caa525b783b0abe7bc06e41220b337ba311bbf7 Author: Brice Goglin Date: Mon Oct 28 10:11:18 2019 +0100 ACPI: HMAT: don't mix pxm and nid when setting memory target processor_pxm On systems where PXMs and nids are in different order, memory initiators exposed in sysfs could be wrong: On dual-socket CLX with SNC enabled (4 nodes, 1 and 2 swapped between PXMs and nids), node1 would only get node2 as initiator, and node2 would only get node1. With this patch, we get node1 as the only initiator of itself, and node2 as the only initiator of itself, as expected. This should likely go to stable up to 5.2. Signed-off-by: Brice Goglin Signed-off-by: Rafael J. Wysocki commit cf8741ac57ed48613e49559d3e5ae43f56291e4c Author: Dan Williams Date: Wed Nov 6 17:43:55 2019 -0800 ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device Memory that has been tagged EFI_MEMORY_SP, and has performance properties described by the ACPI HMAT is expected to have an application specific consumer. Those consumers may want 100% of the memory capacity to be reserved from any usage by the kernel. By default, with this enabling, a platform device is created to represent this differentiated resource. The device-dax "hmem" driver claims these devices by default and provides an mmap interface for the target application. If the administrator prefers, the hmem resource range can be made available to the core-mm via the device-dax hotplug facility, kmem, to online the memory with its own numa node. This was tested with an emulated HMAT produced by qemu (with the pending HMAT enabling patches), and "efi_fake_mem=8G@9G:0x40000" on the kernel command line to mark the memory ranges associated with node2 and node3 as EFI_MEMORY_SP. qemu numa configuration options: -numa node,mem=4G,cpus=0-19,nodeid=0 -numa node,mem=4G,cpus=20-39,nodeid=1 -numa node,mem=4G,nodeid=2 -numa node,mem=4G,nodeid=3 -numa dist,src=0,dst=0,val=10 -numa dist,src=0,dst=1,val=21 -numa dist,src=0,dst=2,val=21 -numa dist,src=0,dst=3,val=21 -numa dist,src=1,dst=0,val=21 -numa dist,src=1,dst=1,val=10 -numa dist,src=1,dst=2,val=21 -numa dist,src=1,dst=3,val=21 -numa dist,src=2,dst=0,val=21 -numa dist,src=2,dst=1,val=21 -numa dist,src=2,dst=2,val=10 -numa dist,src=2,dst=3,val=21 -numa dist,src=3,dst=0,val=21 -numa dist,src=3,dst=1,val=21 -numa dist,src=3,dst=2,val=21 -numa dist,src=3,dst=3,val=10 -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-latency,base-lat=10,latency=5 -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-bandwidth,base-bw=20,bandwidth=5 -numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-latency,base-lat=10,latency=10 -numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-bandwidth,base-bw=20,bandwidth=10 -numa hmat-lb,initiator=0,target=2,hierarchy=memory,data-type=access-latency,base-lat=10,latency=15 -numa hmat-lb,initiator=0,target=2,hierarchy=memory,data-type=access-bandwidth,base-bw=20,bandwidth=15 -numa hmat-lb,initiator=0,target=3,hierarchy=memory,data-type=access-latency,base-lat=10,latency=20 -numa hmat-lb,initiator=0,target=3,hierarchy=memory,data-type=access-bandwidth,base-bw=20,bandwidth=20 -numa hmat-lb,initiator=1,target=0,hierarchy=memory,data-type=access-latency,base-lat=10,latency=10 -numa hmat-lb,initiator=1,target=0,hierarchy=memory,data-type=access-bandwidth,base-bw=20,bandwidth=10 -numa hmat-lb,initiator=1,target=1,hierarchy=memory,data-type=access-latency,base-lat=10,latency=5 -numa hmat-lb,initiator=1,target=1,hierarchy=memory,data-type=access-bandwidth,base-bw=20,bandwidth=5 -numa hmat-lb,initiator=1,target=2,hierarchy=memory,data-type=access-latency,base-lat=10,latency=15 -numa hmat-lb,initiator=1,target=2,hierarchy=memory,data-type=access-bandwidth,base-bw=20,bandwidth=15 -numa hmat-lb,initiator=1,target=3,hierarchy=memory,data-type=access-latency,base-lat=10,latency=20 -numa hmat-lb,initiator=1,target=3,hierarchy=memory,data-type=access-bandwidth,base-bw=20,bandwidth=20 Result: [ { "path":"\/platform\/hmem.1", "id":1, "size":"4.00 GiB (4.29 GB)", "align":2097152, "devices":[ { "chardev":"dax1.0", "size":"4.00 GiB (4.29 GB)" } ] }, { "path":"\/platform\/hmem.0", "id":0, "size":"4.00 GiB (4.29 GB)", "align":2097152, "devices":[ { "chardev":"dax0.0", "size":"4.00 GiB (4.29 GB)" } ] } ] [..] 240000000-43fffffff : Soft Reserved 240000000-33fffffff : hmem.0 240000000-33fffffff : dax0.0 340000000-43fffffff : hmem.1 340000000-43fffffff : dax1.0 Reviewed-by: Dave Hansen Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 0f847f8c0813c8ad7df5174c8f27bcba5926b972 Author: Dan Williams Date: Wed Nov 6 17:43:49 2019 -0800 ACPI: NUMA: HMAT: Register HMAT at device_initcall level In preparation for registering device-dax instances for accessing EFI specific-purpose memory, arrange for the HMAT registration to occur later in the init process. Critically HMAT initialization needs to occur after e820__reserve_resources_late() which is the point at which the iomem resource tree is populated with "Application Reserved" (IORES_DESC_APPLICATION_RESERVED). e820__reserve_resources_late() happens at subsys_initcall time. Reviewed-by: Dave Hansen Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit a6c7f4c6aea5f4ca6056b06cec7ebd79f8c23e33 Author: Dan Williams Date: Wed Nov 6 17:43:43 2019 -0800 device-dax: Add a driver for "hmem" devices Platform firmware like EFI/ACPI may publish "hmem" platform devices. Such a device is a performance differentiated memory range likely reserved for an application specific use case. The driver gives access to 100% of the capacity via a device-dax mmap instance by default. However, if over-subscription and other kernel memory management is desired the resulting dax device can be assigned to the core-mm via the kmem driver. This consumes "hmem" devices the producer of "hmem" devices is saved for a follow-on patch so that it can reference the new CONFIG_DEV_DAX_HMEM symbol to gate performing the enumeration work. Reported-by: kbuild test robot Reviewed-by: Dave Hansen Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 460370ab20b6cc174256e46e192adf01e730faf6 Author: Dan Williams Date: Wed Nov 6 17:43:37 2019 -0800 dax: Fix alloc_dax_region() compile warning PFN flags are (unsigned long long), fix the alloc_dax_region() calling convention to fix warnings of the form: >> include/linux/pfn_t.h:18:17: warning: large integer implicitly truncated to unsigned type [-Woverflow] #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3)) Reported-by: kbuild test robot Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 33dd70752cd76f4d883a165a674f13121a4155ed Author: Dan Williams Date: Wed Nov 6 17:43:31 2019 -0800 lib: Uplevel the pmem "region" ida to a global allocator In preparation for handling platform differentiated memory types beyond persistent memory, uplevel the "region" identifier to a global number space. This enables a device-dax instance to be registered to any memory type with guaranteed unique names. Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 199c8471761273b7e287914cee968ddf21dfbfe0 Author: Dan Williams Date: Wed Nov 6 17:43:26 2019 -0800 x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP Given that EFI_MEMORY_SP is platform BIOS policy decision for marking memory ranges as "reserved for a specific purpose" there will inevitably be scenarios where the BIOS omits the attribute in situations where it is desired. Unlike other attributes if the OS wants to reserve this memory from the kernel the reservation needs to happen early in init. So early, in fact, that it needs to happen before e820__memblock_setup() which is a pre-requisite for efi_fake_memmap() that wants to allocate memory for the updated table. Introduce an x86 specific efi_fake_memmap_early() that can search for attempts to set EFI_MEMORY_SP via efi_fake_mem and update the e820 table accordingly. The KASLR code that scans the command line looking for user-directed memory reservations also needs to be updated to consider "efi_fake_mem=nn@ss:0x40000" requests. Acked-by: Ard Biesheuvel Reviewed-by: Dave Hansen Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 16993c0f0a43213e23666ea40e9163887f593ac7 Author: Dan Williams Date: Wed Nov 6 17:43:21 2019 -0800 arm/efi: EFI soft reservation to memblock UEFI 2.8 defines an EFI_MEMORY_SP attribute bit to augment the interpretation of the EFI Memory Types as "reserved for a specific purpose". The proposed Linux behavior for specific purpose memory is that it is reserved for direct-access (device-dax) by default and not available for any kernel usage, not even as an OOM fallback. Later, through udev scripts or another init mechanism, these device-dax claimed ranges can be reconfigured and hot-added to the available System-RAM with a unique node identifier. This device-dax management scheme implements "soft" in the "soft reserved" designation by allowing some or all of the reservation to be recovered as typical memory. This policy can be disabled at compile-time with CONFIG_EFI_SOFT_RESERVE=n, or runtime with efi=nosoftreserve. For this patch, update the ARM paths that consider EFI_CONVENTIONAL_MEMORY to optionally take the EFI_MEMORY_SP attribute into account as a reservation indicator. Publish the soft reservation as IORES_DESC_SOFT_RESERVED memory, similar to x86. (Based on an original patch by Ard) Reviewed-by: Ard Biesheuvel Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 262b45ae3ab4bf8e2caf1fcfd0d8307897519630 Author: Dan Williams Date: Wed Nov 6 17:43:16 2019 -0800 x86/efi: EFI soft reservation to E820 enumeration UEFI 2.8 defines an EFI_MEMORY_SP attribute bit to augment the interpretation of the EFI Memory Types as "reserved for a specific purpose". The proposed Linux behavior for specific purpose memory is that it is reserved for direct-access (device-dax) by default and not available for any kernel usage, not even as an OOM fallback. Later, through udev scripts or another init mechanism, these device-dax claimed ranges can be reconfigured and hot-added to the available System-RAM with a unique node identifier. This device-dax management scheme implements "soft" in the "soft reserved" designation by allowing some or all of the reservation to be recovered as typical memory. This policy can be disabled at compile-time with CONFIG_EFI_SOFT_RESERVE=n, or runtime with efi=nosoftreserve. This patch introduces 2 new concepts at once given the entanglement between early boot enumeration relative to memory that can optionally be reserved from the kernel page allocator by default. The new concepts are: - E820_TYPE_SOFT_RESERVED: Upon detecting the EFI_MEMORY_SP attribute on EFI_CONVENTIONAL memory, update the E820 map with this new type. Only perform this classification if the CONFIG_EFI_SOFT_RESERVE=y policy is enabled, otherwise treat it as typical ram. - IORES_DESC_SOFT_RESERVED: Add a new I/O resource descriptor for a device driver to search iomem resources for application specific memory. Teach the iomem code to identify such ranges as "Soft Reserved". Note that the comment for do_add_efi_memmap() needed refreshing since it seemed to imply that the efi map might overflow the e820 table, but that is not an issue as of commit 7b6e4ba3cb1f "x86/boot/e820: Clean up the E820_X_MAX definition" that removed the 128 entry limit for e820__range_add(). A follow-on change integrates parsing of the ACPI HMAT to identify the node and sub-range boundaries of EFI_MEMORY_SP designated memory. For now, just identify and reserve memory of this type. Acked-by: Ard Biesheuvel Reported-by: kbuild test robot Reviewed-by: Dave Hansen Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit b617c5266eedbef2ccbb90931bb9175faa4ae0bc Author: Dan Williams Date: Wed Nov 6 17:43:11 2019 -0800 efi: Common enable/disable infrastructure for EFI soft reservation UEFI 2.8 defines an EFI_MEMORY_SP attribute bit to augment the interpretation of the EFI Memory Types as "reserved for a specific purpose". The proposed Linux behavior for specific purpose memory is that it is reserved for direct-access (device-dax) by default and not available for any kernel usage, not even as an OOM fallback. Later, through udev scripts or another init mechanism, these device-dax claimed ranges can be reconfigured and hot-added to the available System-RAM with a unique node identifier. This device-dax management scheme implements "soft" in the "soft reserved" designation by allowing some or all of the reservation to be recovered as typical memory. This policy can be disabled at compile-time with CONFIG_EFI_SOFT_RESERVE=n, or runtime with efi=nosoftreserve. As for this patch, define the common helpers to determine if the EFI_MEMORY_SP attribute should be honored. The determination needs to be made early to prevent the kernel from being loaded into soft-reserved memory, or otherwise allowing early allocations to land there. Follow-on changes are needed per architecture to leverage these helpers in their respective mem-init paths. Reviewed-by: Ard Biesheuvel Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 6950e31b35fdf4588cbbdec1813091bb02cf8871 Author: Dan Williams Date: Wed Nov 6 17:43:05 2019 -0800 x86/efi: Push EFI_MEMMAP check into leaf routines In preparation for adding another EFI_MEMMAP dependent call that needs to occur before e820__memblock_setup() fixup the existing efi calls to check for EFI_MEMMAP internally. This ends up being cleaner than the alternative of checking EFI_MEMMAP multiple times in setup_arch(). Reviewed-by: Dave Hansen Reviewed-by: Ard Biesheuvel Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit fe3e5e65c06edb1c56e64e567f053e243142001f Author: Dan Williams Date: Wed Nov 6 17:43:00 2019 -0800 efi: Enumerate EFI_MEMORY_SP UEFI 2.8 defines an EFI_MEMORY_SP attribute bit to augment the interpretation of the EFI Memory Types as "reserved for a specific purpose". The intent of this bit is to allow the OS to identify precious or scarce memory resources and optionally manage it separately from EfiConventionalMemory. As defined older OSes that do not know about this attribute are permitted to ignore it and the memory will be handled according to the OS default policy for the given memory type. In other words, this "specific purpose" hint is deliberately weaker than EfiReservedMemoryType in that the system continues to operate if the OS takes no action on the attribute. The risk of taking no action is potentially unwanted / unmovable kernel allocations from the designated resource that prevent the full realization of the "specific purpose". For example, consider a system with a high-bandwidth memory pool. Older kernels are permitted to boot and consume that memory as conventional "System-RAM" newer kernels may arrange for that memory to be set aside (soft reserved) by the system administrator for a dedicated high-bandwidth memory aware application to consume. Specifically, this mechanism allows for the elimination of scenarios where platform firmware tries to game OS policy by lying about ACPI SLIT values, i.e. claiming that a precious memory resource has a high distance to trigger the OS to avoid it by default. This reservation hint allows platform-firmware to instead tell the truth about performance characteristics by indicate to OS memory management to put immovable allocations elsewhere. Implement simple detection of the bit for EFI memory table dumps and save the kernel policy for a follow-on change. Reviewed-by: Ard Biesheuvel Reviewed-by: Dave Hansen Signed-off-by: Dan Williams Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit c710fcc5d95a5e0d1648c40c0b101e198bfc3459 Author: Dan Williams Date: Wed Nov 6 17:42:55 2019 -0800 ACPI: NUMA: Establish a new drivers/acpi/numa/ directory Currently hmat.c lives under an "hmat" directory which does not enhance the description of the file. The initial motivation for giving hmat.c its own directory was to delineate it as mm functionality in contrast to ACPI device driver functionality. As ACPI continues to play an increasing role in conveying memory location and performance topology information to the OS take the opportunity to co-locate these NUMA relevant tables in a combined directory. numa.c is renamed to srat.c and moved to drivers/acpi/numa/ along with hmat.c. Signed-off-by: Dan Williams Reviewed-by: Dave Hansen Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki commit 4180468e16cd4e332027ab680bf5e31ca257e9dc Merge: 52f6efdf8092 354a7a7716ed Author: Greg Kroah-Hartman Date: Thu Nov 7 15:24:16 2019 +0100 Merge tag 'thunderbolt-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into char-misc-next Mika writes: thunderbolt: Changes for v5.5 merge window This adds Thunderbolt 3 support for the software connection manager. It is currently only used in Apple systems. Previously the driver started the firmware connection manager on those but it is not necessary anymore with these patches (we still leave user an option to start the firmware in case there are problems with the software connection manager). This includes: - Expose 'generation' attribute under each device in sysfs - Converting register names to follow the USB4 spec. - Lane bonding support - Expose link speed and width in sysfs - Display Port handshake needed for Titan Ridge devices - Display Port pairing and resource management - Display Port bandwidth management * tag 'thunderbolt-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: (21 commits) thunderbolt: Do not start firmware unless asked by the user thunderbolt: Add bandwidth management for Display Port tunnels thunderbolt: Add Display Port adapter pairing and resource management thunderbolt: Add Display Port CM handshake for Titan Ridge devices thunderbolt: Add downstream PCIe port mappings for Alpine and Titan Ridge thunderbolt: Expand controller name in tb_switch_is_xy() thunderbolt: Add default linking between lane adapters if not provided by DROM thunderbolt: Add support for lane bonding thunderbolt: Refactor add_switch() into two functions thunderbolt: Add helper macro to iterate over switch ports thunderbolt: Make tb_sw_write() take const parameter thunderbolt: Convert DP adapter register names to follow the USB4 spec thunderbolt: Convert PCIe adapter register names to follow the USB4 spec thunderbolt: Convert basic adapter register names to follow the USB4 spec thunderbolt: Log error if adding switch fails thunderbolt: Log switch route string on config read/write timeout thunderbolt: Introduce tb_switch_is_icm() thunderbolt: Add 'generation' attribute for devices thunderbolt: Drop unnecessary read when writing LC command in Ice Lake thunderbolt: Fix lockdep circular locking depedency warning ... commit 53121a7cc33b16f9f3dc4bed6d1df1a93a4f41de Author: Bartosz Golaszewski Date: Thu Nov 7 10:46:10 2019 +0100 Bluetooth: btmtksdio: add MODULE_DEVICE_TABLE() This adds the missing MODULE_DEVICE_TABLE() for SDIO IDs. While certain platforms using this driver indeed have HW issues causing problems if the module is loaded too early - this should be handled from user-space by blacklisting it or delaying the loading. Signed-off-by: Bartosz Golaszewski Signed-off-by: Marcel Holtmann commit e2854a1054ab171a2c5cad6e9b7f0c580bab409d Author: Zhenzhong Duan Date: Mon Nov 4 17:09:37 2019 +0800 moduleparam: fix parameter description mismatch The first parameter of module_param is @name, but @value is used in description. Fix it. Fixes: 546970bc6afc ("param: add kerneldoc to moduleparam.h") Signed-off-by: Zhenzhong Duan Signed-off-by: Jessica Yu commit ad512f2023b387d5c3c3624342c2b11de848b491 Author: Ajay Joshi Date: Sun Oct 27 23:05:47 2019 +0900 scsi: sd_zbc: add zone open, close, and finish support Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH support to allow explicit control of zone states. Contains contributions from Matias Bjorling, Hans Holmberg, Keith Busch and Damien Le Moal. Reviewed-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Signed-off-by: Ajay Joshi Signed-off-by: Matias Bjorling Signed-off-by: Hans Holmberg Signed-off-by: Keith Busch Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 6d1ec7814dce416676b72104bb0ce4aa8c8b3747 Merge: e16381720a1b 9393c8de628c Author: Jens Axboe Date: Thu Nov 7 06:45:53 2019 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi into for-5.5/drivers-post * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi: scsi: core: Handle drivers which set sg_tablesize to zero scsi: qla2xxx: fix NPIV tear down process scsi: sd_zbc: Fix sd_zbc_complete() commit e16381720a1bbfdc95a868c2350371cdfeaa65d8 Merge: da644b2cc1a4 d3566abb1a1e Author: Jens Axboe Date: Thu Nov 7 06:43:18 2019 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi into for-5.5/drivers-post SCSI fixes on 20191101 Nine changes, eight in drivers [ufs, target, lpfc x 2, qla2xxx x 4] and one core change in sd that fixes an I/O failure on DIF type 3 devices. Signed-off-by: James E.J. Bottomley * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (23 commits) scsi: qla2xxx: stop timer in shutdown path scsi: sd: define variable dif as unsigned int instead of bool scsi: target: cxgbit: Fix cxgbit_fw4_ack() scsi: qla2xxx: Fix partial flash write of MBI scsi: qla2xxx: Initialized mailbox to prevent driver load failure scsi: lpfc: Honor module parameter lpfc_use_adisc scsi: ufs-bsg: Wake the device before sending raw upiu commands scsi: lpfc: Check queue pointer before use scsi: qla2xxx: fixup incorrect usage of host_byte scsi: lpfc: remove left-over BUILD_NVME defines scsi: core: try to get module before removing device scsi: hpsa: add missing hunks in reset-patch scsi: target: core: Do not overwrite CDB byte 1 scsi: ch: Make it possible to open a ch device multiple times again scsi: fix kconfig dependency warning related to 53C700_LE_ON_BE scsi: sni_53c710: fix compilation error scsi: scsi_dh_alua: handle RTPG sense code correctly during state transitions scsi: qla2xxx: fix a potential NULL pointer dereference scsi: MAINTAINERS: Update qla2xxx driver scsi: zfcp: fix reaction on bit error threshold notification ... commit da644b2cc1a4664ff7f75d3ae50e3fcf638580d9 Author: Ajay Joshi Date: Sun Oct 27 23:05:49 2019 +0900 null_blk: add zone open, close, and finish support Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH support to allow explicit control of zone states. Contains contributions from Matias Bjorling, Hans Holmberg, Keith Busch and Damien Le Moal. Reviewed-by: Christoph Hellwig Signed-off-by: Ajay Joshi Signed-off-by: Matias Bjorling Signed-off-by: Hans Holmberg Signed-off-by: Keith Busch Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 2e2d6f7e44a2b9f96ca8af445ae0150a6cefde41 Author: Ajay Joshi Date: Sun Oct 27 23:05:48 2019 +0900 dm: add zone open, close and finish support Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH support to allow explicit control of zone states. Contains contributions from Matias Bjorling, Hans Holmberg and Damien Le Moal. Acked-by: Mike Snitzer Reviewed-by: Christoph Hellwig Signed-off-by: Ajay Joshi Signed-off-by: Matias Bjorling Signed-off-by: Hans Holmberg Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 957c31ea082e3fe5196f46d5b04018b10de47400 Author: Aleksander Morgado Date: Thu Nov 7 11:55:08 2019 +0100 USB: serial: option: add support for DW5821e with eSIM support The device exposes AT, NMEA and DIAG ports in both USB configurations. Exactly same layout as the default DW5821e module, just a different vid/pid. P: Vendor=413c ProdID=81e0 Rev=03.18 S: Manufacturer=Dell Inc. S: Product=DW5821e-eSIM Snapdragon X20 LTE S: SerialNumber=0123456789ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option P: Vendor=413c ProdID=81e0 Rev=03.18 S: Manufacturer=Dell Inc. S: Product=DW5821e-eSIM Snapdragon X20 LTE S: SerialNumber=0123456789ABCDEF C: #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) Signed-off-by: Aleksander Morgado Cc: stable Signed-off-by: Johan Hovold commit 439b84fa17e96f6d171ad691370b110bf76adc2c Merge: 64fab7290dc3 e876df1fe0ad Author: Jens Axboe Date: Thu Nov 7 06:33:05 2019 -0700 Merge branch 'for-5.5/block' into for-5.5/drivers Pull in dependencies for the new zoned open/close/finish support. * for-5.5/block: (32 commits) block: add zone open, close and finish ioctl support block: add zone open, close and finish operations block: Simplify REQ_OP_ZONE_RESET_ALL handling block: Remove REQ_OP_ZONE_RESET plugging block: Warn if elevator= parameter is used block: avoid blk_bio_segment_split for small I/O operations blk-mq: make sure that line break can be printed block: sed-opal: Introduce Opal Datastore UID block: sed-opal: Add support to read/write opal tables generically block: sed-opal: Generalizing write data to any opal table bdev: Refresh bdev size for disks without partitioning bdev: Factor out bdev revalidation into a common helper blk-mq: avoid sysfs buffer overflow with too many CPU cores blk-mq: Make blk_mq_run_hw_queue() return void fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint name blk-mq: fill header with kernel-doc blk-mq: remove needless goto from blk_mq_get_driver_tag block: reorder bio::__bi_remaining for better packing block: Reduce the amount of memory used for tag sets block: Reduce the amount of memory required per request queue ... commit 0d8633bf5311177c9a26d75daec677cd87e3261b Author: Vijay Khemka Date: Wed Nov 6 10:29:21 2019 -0800 drivers: ipmi: Support for both IPMB Req and Resp Removed check for request or response in IPMB packets coming from device as well as from host. Now it supports both way communication to device via IPMB. Both request and response will be passed to application. Signed-off-by: Vijay Khemka Message-Id: <20191106182921.1086795-1-vijaykhemka@fb.com> Reviewed-by: Asmaa Mnebhi Signed-off-by: Corey Minyard commit e876df1fe0ad1b191284ee6ed2db7960bd322d00 Author: Ajay Joshi Date: Sun Oct 27 23:05:46 2019 +0900 block: add zone open, close and finish ioctl support Introduce three new ioctl commands BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE to allow applications to control the condition of zones on a zoned block device through the execution of the REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH operations. Contains contributions from Matias Bjorling, Hans Holmberg, Dmitry Fomichev, Keith Busch, Damien Le Moal and Christoph Hellwig. Reviewed-by: Javier González Reviewed-by: Christoph Hellwig Signed-off-by: Ajay Joshi Signed-off-by: Matias Bjorling Signed-off-by: Hans Holmberg Signed-off-by: Dmitry Fomichev Signed-off-by: Keith Busch Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 6c1b1da58f8c7a697a88ae35afeba196fc7b701e Author: Ajay Joshi Date: Sun Oct 27 23:05:45 2019 +0900 block: add zone open, close and finish operations Zoned block devices (ZBC and ZAC devices) allow an explicit control over the condition (state) of zones. The operations allowed are: * Open a zone: Transition to open condition to indicate that a zone will actively be written * Close a zone: Transition to closed condition to release the drive resources used for writing to a zone * Finish a zone: Transition an open or closed zone to the full condition to prevent write operations To enable this control for in-kernel zoned block device users, define the new request operations REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH as well as the generic function blkdev_zone_mgmt() for submitting these operations on a range of zones. This results in blkdev_reset_zones() removal and replacement with this new zone magement function. Users of blkdev_reset_zones() (f2fs and dm-zoned) are updated accordingly. Contains contributions from Matias Bjorling, Hans Holmberg, Dmitry Fomichev, Keith Busch, Damien Le Moal and Christoph Hellwig. Reviewed-by: Javier González Reviewed-by: Christoph Hellwig Signed-off-by: Ajay Joshi Signed-off-by: Matias Bjorling Signed-off-by: Hans Holmberg Signed-off-by: Dmitry Fomichev Signed-off-by: Keith Busch Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit c7a1d926dc4076aadad187614500afcd8de78818 Author: Damien Le Moal Date: Sun Oct 27 23:05:43 2019 +0900 block: Simplify REQ_OP_ZONE_RESET_ALL handling There is no need for the function __blkdev_reset_all_zones() as REQ_OP_ZONE_RESET_ALL can be handled directly in blkdev_reset_zones() bio loop with an early break from the loop. This patch removes this function and modifies blkdev_reset_zones(), simplifying the code. Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit a84324d2ed05c06b46fb6079d39a0736bde6e16a Author: Damien Le Moal Date: Sun Oct 27 23:05:42 2019 +0900 block: Remove REQ_OP_ZONE_RESET plugging REQ_OP_ZONE_RESET operations cannot be merged as these bios and requests do not have a size and are never sequential due to the zone start sector position required for their execution. As a result, there is no point in using a plug around blkdev_reset_zones() bio issuing loop. This patch removes this unnecessary plugging. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Javier González Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 7fa46cbf20d327d78114b1c8c7e69fabe7c57794 Author: Jin Yao Date: Thu Nov 7 15:47:19 2019 +0800 perf report: Sort by sampled cycles percent per block for tui Previous patch has implemented a new option "--total-cycles". But only stdio mode is supported. This patch supports the tui mode and support '--percent-limit'. For example, perf record -b ./div perf report --total-cycles --percent-limit 1 # Samples: 2753248 of event 'cycles' Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object 26.04% 2.8M 0.40% 18 [div.c:42 -> div.c:39] div 15.17% 1.2M 0.16% 7 [random_r.c:357 -> random_r.c:380] libc-2.27.so 5.11% 402.0K 0.04% 2 [div.c:27 -> div.c:28] div 4.87% 381.6K 0.04% 2 [random.c:288 -> random.c:291] libc-2.27.so 4.53% 381.0K 0.04% 2 [div.c:40 -> div.c:40] div 3.85% 300.9K 0.02% 1 [div.c:22 -> div.c:25] div 3.08% 241.1K 0.02% 1 [rand.c:26 -> rand.c:27] libc-2.27.so 3.06% 240.0K 0.02% 1 [random.c:291 -> random.c:291] libc-2.27.so 2.78% 215.7K 0.02% 1 [random.c:298 -> random.c:298] libc-2.27.so 2.52% 198.3K 0.02% 1 [random.c:293 -> random.c:293] libc-2.27.so 2.36% 184.8K 0.02% 1 [rand.c:28 -> rand.c:28] libc-2.27.so 2.33% 180.5K 0.02% 1 [random.c:295 -> random.c:295] libc-2.27.so 2.28% 176.7K 0.02% 1 [random.c:295 -> random.c:295] libc-2.27.so 2.20% 168.8K 0.02% 1 [rand@plt+0 -> rand@plt+0] div 1.98% 158.2K 0.02% 1 [random_r.c:388 -> random_r.c:388] libc-2.27.so 1.57% 123.3K 0.02% 1 [div.c:42 -> div.c:44] div 1.44% 116.0K 0.42% 19 [random_r.c:357 -> random_r.c:394] libc-2.27.so -------------------------------------------------- v7: --- 1. Since we have used use_browser in report__browse_block_hists to support stdio mode, now we also add supporting for tui. 2. Move block tui browser code from ui/browsers/hists.c to block-info.c. v6: --- Create report__tui_browse_block_hists in block-info.c (codes are moved from builtin-report.c). v5: --- Fix a crash issue when running perf report without '--total-cycles'. The issue is because the internal flag is renamed from 'total_cycles' to 'total_cycles_mode' in previous patch but this patch still uses 'total_cycles' to check if the '--total-cycles' option is enabled, which causes the code to be inconsistent. v4: --- Since the block collection is moved out of printing in previous patch, this patch is updated accordingly for tui supporting. v3: --- Minor change since the function name is changed: block_total_cycles_percent -> block_info__total_cycles_percent Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191107074719.26139-8-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0b49f83657d5fb9a35c592faab7c5ea16e387539 Author: Jin Yao Date: Thu Nov 7 15:47:18 2019 +0800 perf report: Support --percent-limit for --total-cycles We have already supported the '--total-cycles' option in previous patch. It's also useful to show entries only above a threshold percent. This patch enables '--percent-limit' for not showing entries under that percent. For example: perf report --total-cycles --stdio --percent-limit 1 # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 2M of event 'cycles' # Event count (approx.): 2753248 # # Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object # ............... .............. ........... .......... ................................................................. .................... # 26.04% 2.8M 0.40% 18 [div.c:42 -> div.c:39] div 15.17% 1.2M 0.16% 7 [random_r.c:357 -> random_r.c:380] libc-2.27.so 5.11% 402.0K 0.04% 2 [div.c:27 -> div.c:28] div 4.87% 381.6K 0.04% 2 [random.c:288 -> random.c:291] libc-2.27.so 4.53% 381.0K 0.04% 2 [div.c:40 -> div.c:40] div 3.85% 300.9K 0.02% 1 [div.c:22 -> div.c:25] div 3.08% 241.1K 0.02% 1 [rand.c:26 -> rand.c:27] libc-2.27.so 3.06% 240.0K 0.02% 1 [random.c:291 -> random.c:291] libc-2.27.so 2.78% 215.7K 0.02% 1 [random.c:298 -> random.c:298] libc-2.27.so 2.52% 198.3K 0.02% 1 [random.c:293 -> random.c:293] libc-2.27.so 2.36% 184.8K 0.02% 1 [rand.c:28 -> rand.c:28] libc-2.27.so 2.33% 180.5K 0.02% 1 [random.c:295 -> random.c:295] libc-2.27.so 2.28% 176.7K 0.02% 1 [random.c:295 -> random.c:295] libc-2.27.so 2.20% 168.8K 0.02% 1 [rand@plt+0 -> rand@plt+0] div 1.98% 158.2K 0.02% 1 [random_r.c:388 -> random_r.c:388] libc-2.27.so 1.57% 123.3K 0.02% 1 [div.c:42 -> div.c:44] div 1.44% 116.0K 0.42% 19 [random_r.c:357 -> random_r.c:394] libc-2.27.so Committer testing: From second exapmple onwards slightly edited for brevity: # perf report --total-cycles --percent-limit 2 --stdio # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 6M of event 'cycles' # Event count (approx.): 6299936 # # Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object # ............... .............. ........... .......... ...................................................................... .................... # 2.17% 1.7M 0.08% 607 [compiler.h:199 -> common.c:221] [kernel.vmlinux] # # (Tip: Create an archive with symtabs to analyse on other machine: perf archive) # # perf report --total-cycles --percent-limit 1 --stdio # Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object 2.17% 1.7M 0.08% 607 [compiler.h:199 -> common.c:221] [kernel.vmlinux] 1.75% 1.3M 8.34% 65.5K [memset-vec-unaligned-erms.S:147 -> memset-vec-unaligned-erms.S:151] libc-2.29.so # # perf report --total-cycles --percent-limit 0.7 --stdio # Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object 2.17% 1.7M 0.08% 607 [compiler.h:199 -> common.c:221] [kernel.vmlinux] 1.75% 1.3M 8.34% 65.5K [memset-vec-unaligned-erms.S:147 -> memset-vec-unaligned-erms.S:151] libc-2.29.so 0.72% 544.5K 0.03% 230 [entry_64.S:657 -> entry_64.S:662] [kernel.vmlinux] # ------------------------------------------- It only shows the entries which 'Sampled Cycles%' > 1%. v7: --- No functional change. Only fix the conflict issue because previous patches are changed. v6: --- No functional change. Only fix the conflict issue because previous patches are changed. v5: --- No functional change. Only fix the conflict issue because previous patches are changed. v4: --- No functional change. Only fix the build issue because previous patches are changed. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191107074719.26139-7-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6f7164fa231a5f360e576593c547bea7dc56ddbc Author: Jin Yao Date: Thu Nov 7 15:47:17 2019 +0800 perf report: Sort by sampled cycles percent per block for stdio It would be useful to support sorting for all blocks by the sampled cycles percent per block. This is useful to concentrate on the globally hottest blocks. This patch implements a new option "--total-cycles" which sorts all blocks by 'Sampled Cycles%'. The 'Sampled Cycles%' is the percent: percent = block sampled cycles aggregation / total sampled cycles Note that, this patch only supports "--stdio" mode. For example, # perf record -b ./div # perf report --total-cycles --stdio # To display the perf.data header info, please use --header/--header-only options. # # Total Lost Samples: 0 # # Samples: 2M of event 'cycles' # Event count (approx.): 2753248 # # Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object # ............... .............. ........... .......... ................................................ ................. # 26.04% 2.8M 0.40% 18 [div.c:42 -> div.c:39] div 15.17% 1.2M 0.16% 7 [random_r.c:357 -> random_r.c:380] libc-2.27.so 5.11% 402.0K 0.04% 2 [div.c:27 -> div.c:28] div 4.87% 381.6K 0.04% 2 [random.c:288 -> random.c:291] libc-2.27.so 4.53% 381.0K 0.04% 2 [div.c:40 -> div.c:40] div 3.85% 300.9K 0.02% 1 [div.c:22 -> div.c:25] div 3.08% 241.1K 0.02% 1 [rand.c:26 -> rand.c:27] libc-2.27.so 3.06% 240.0K 0.02% 1 [random.c:291 -> random.c:291] libc-2.27.so 2.78% 215.7K 0.02% 1 [random.c:298 -> random.c:298] libc-2.27.so 2.52% 198.3K 0.02% 1 [random.c:293 -> random.c:293] libc-2.27.so 2.36% 184.8K 0.02% 1 [rand.c:28 -> rand.c:28] libc-2.27.so 2.33% 180.5K 0.02% 1 [random.c:295 -> random.c:295] libc-2.27.so 2.28% 176.7K 0.02% 1 [random.c:295 -> random.c:295] libc-2.27.so 2.20% 168.8K 0.02% 1 [rand@plt+0 -> rand@plt+0] div 1.98% 158.2K 0.02% 1 [random_r.c:388 -> random_r.c:388] libc-2.27.so 1.57% 123.3K 0.02% 1 [div.c:42 -> div.c:44] div 1.44% 116.0K 0.42% 19 [random_r.c:357 -> random_r.c:394] libc-2.27.so 0.25% 182.5K 0.02% 1 [random_r.c:388 -> random_r.c:391] libc-2.27.so 0.00% 48 1.07% 48 [x86_pmu_enable+284 -> x86_pmu_enable+298] [kernel.kallsyms] 0.00% 74 1.64% 74 [vm_mmap_pgoff+0 -> vm_mmap_pgoff+92] [kernel.kallsyms] 0.00% 73 1.62% 73 [vm_mmap+0 -> vm_mmap+48] [kernel.kallsyms] 0.00% 63 0.69% 31 [up_write+0 -> up_write+34] [kernel.kallsyms] 0.00% 13 0.29% 13 [setup_arg_pages+396 -> setup_arg_pages+413] [kernel.kallsyms] 0.00% 3 0.07% 3 [setup_arg_pages+418 -> setup_arg_pages+450] [kernel.kallsyms] 0.00% 616 6.84% 308 [security_mmap_file+0 -> security_mmap_file+72] [kernel.kallsyms] 0.00% 23 0.51% 23 [security_mmap_file+77 -> security_mmap_file+87] [kernel.kallsyms] 0.00% 4 0.02% 1 [sched_clock+0 -> sched_clock+4] [kernel.kallsyms] 0.00% 4 0.02% 1 [sched_clock+9 -> sched_clock+12] [kernel.kallsyms] 0.00% 1 0.02% 1 [rcu_nmi_exit+0 -> rcu_nmi_exit+9] [kernel.kallsyms] Committer testing: This should provide material for hours of endless joy, both from looking for suspicious things in the implementation of this patch, such as the top one: # Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object 2.17% 1.7M 0.08% 607 [compiler.h:199 -> common.c:221] [kernel.vmlinux] As well from things that look legit: # Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object 0.16% 123.0K 0.60% 4.7K [nospec-branch.h:265 -> nospec-branch.h:278] [kernel.vmlinux] :-) Very short system wide taken branches session: # perf record -h -b Usage: perf record [] [] or: perf record [] -- [] -b, --branch-any sample any taken branches # # perf record -b ^C[ perf record: Woken up 595 times to write data ] [ perf record: Captured and wrote 156.672 MB perf.data (196873 samples) ] # # perf evlist -v cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CPU|PERIOD|BRANCH_STACK, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1, branch_sample_type: ANY # # perf report --total-cycles --stdio # To display the perf.data header info, please use --header/--header-only options. # # Total Lost Samples: 0 # # Samples: 6M of event 'cycles' # Event count (approx.): 6299936 # # Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object # ............... .............. ........... .......... ...................................................................... .................... # 2.17% 1.7M 0.08% 607 [compiler.h:199 -> common.c:221] [kernel.vmlinux] 1.75% 1.3M 8.34% 65.5K [memset-vec-unaligned-erms.S:147 -> memset-vec-unaligned-erms.S:151] libc-2.29.so 0.72% 544.5K 0.03% 230 [entry_64.S:657 -> entry_64.S:662] [kernel.vmlinux] 0.56% 541.8K 0.09% 672 [compiler.h:199 -> common.c:300] [kernel.vmlinux] 0.39% 293.2K 0.01% 104 [list_debug.c:43 -> list_debug.c:61] [kernel.vmlinux] 0.36% 278.6K 0.03% 272 [entry_64.S:1289 -> entry_64.S:1308] [kernel.vmlinux] 0.30% 260.8K 0.07% 564 [clear_page_64.S:47 -> clear_page_64.S:50] [kernel.vmlinux] 0.28% 215.3K 0.05% 369 [traps.c:623 -> traps.c:628] [kernel.vmlinux] 0.23% 178.1K 0.04% 278 [entry_64.S:271 -> entry_64.S:275] [kernel.vmlinux] 0.20% 152.6K 0.09% 706 [paravirt.c:177 -> paravirt.c:179] [kernel.vmlinux] 0.20% 155.8K 0.05% 373 [entry_64.S:153 -> entry_64.S:175] [kernel.vmlinux] 0.18% 136.6K 0.03% 222 [msr.h:105 -> msr.h:166] [kernel.vmlinux] 0.16% 123.0K 0.60% 4.7K [nospec-branch.h:265 -> nospec-branch.h:278] [kernel.vmlinux] 0.16% 118.3K 0.01% 44 [entry_64.S:632 -> entry_64.S:657] [kernel.vmlinux] 0.14% 104.5K 0.00% 28 [rwsem.c:1541 -> rwsem.c:1544] [kernel.vmlinux] 0.13% 99.2K 0.01% 53 [spinlock.c:150 -> spinlock.c:152] [kernel.vmlinux] 0.13% 95.5K 0.00% 35 [swap.c:456 -> swap.c:471] [kernel.vmlinux] 0.12% 96.2K 0.05% 407 [copy_user_64.S:175 -> copy_user_64.S:209] [kernel.vmlinux] 0.11% 85.9K 0.00% 31 [swap.c:400 -> page-flags.h:188] [kernel.vmlinux] 0.10% 73.0K 0.01% 52 [paravirt.h:763 -> list.h:131] [kernel.vmlinux] 0.07% 56.2K 0.03% 214 [filemap.c:1524 -> filemap.c:1557] [kernel.vmlinux] 0.07% 54.2K 0.02% 145 [memory.c:1032 -> memory.c:1049] [kernel.vmlinux] 0.07% 50.3K 0.00% 39 [mmzone.c:49 -> mmzone.c:69] [kernel.vmlinux] 0.06% 48.3K 0.01% 40 [paravirt.h:768 -> page_alloc.c:3304] [kernel.vmlinux] 0.06% 46.7K 0.02% 155 [memory.c:1032 -> memory.c:1056] [kernel.vmlinux] 0.06% 46.9K 0.01% 103 [swap.c:867 -> swap.c:902] [kernel.vmlinux] 0.06% 47.8K 0.00% 34 [entry_64.S:1201 -> entry_64.S:1202] [kernel.vmlinux] ----------------------------------------------------------- v7: --- Use use_browser in report__browse_block_hists for supporting stdio and potential tui mode. v6: --- Create report__browse_block_hists in block-info.c (codes are moved from builtin-report.c). It's called from perf_evlist__tty_browse_hists. v5: --- 1. Move all block functions to block-info.c 2. Move the code of setting ms in block hist_entry to other patch. v4: --- 1. Use new option '--total-cycles' to replace '-s total_cycles' in v3. 2. Move block info collection out of block info printing. v3: --- 1. Use common function block_info__process_sym to process the blocks per symbol. 2. Remove the nasty hack for skipping calculation of column length 3. Some minor cleanup Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191107074719.26139-6-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b65a7d372b1a55db6fb48a5b3c48941eb68716cb Author: Jin Yao Date: Thu Nov 7 15:47:16 2019 +0800 perf hist: Support block formats with compare/sort/display This patch provides helper routines to support new columns for block info output. The new columns are: Sampled Cycles% Sampled Cycles Avg Cycles% Avg Cycles [Program Block Range] Shared Object v5: --- 1. Move more block related functions from builtin-report.c to block-info.c 2. Set ms (map+sym) in block hist_entry. Because this info is needed for reporting the block range (i.e. source line) Committer notes: Remove unused set_fmt() function, some build were not completing with: util/block-info.c:396:20: error: unused function 'set_fmt' [-Werror,-Wunused-function] static inline void set_fmt(struct block_fmt *block_fmt, ^ 1 error generated. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191107074719.26139-5-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9ff7759731db1df8dfe036046d05c3f7ed1e37b0 Merge: fdea53fe5de5 2acdcabb8a40 Author: Takashi Iwai Date: Thu Nov 7 14:12:30 2019 +0100 Merge tag 'asoc-v5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v5.5 Some big changes in the core but more about cleanps and refactorings than new features, plus a collection of new drivers and lots of small fixes and improvements to existing ones. - Lots more cleanups from Morimoto-san. Now that everything is a component this is mostly about refactorings to clarify and simplify the core, a combination of things that are no longer required due to refactorings and spotting similarities. - Many fixes to the Sound Open Firmware code. - Wake on voice support for Chromebooks. - SPI support for RT5677. - New drivers for Analog Devices ADAU7118, Intel Cannonlake systems with RT1011 and RT5682, Texas Instruments TAS2562 and TAS2770. commit 05766050d5bd9af24dcaec6b29255a6f2b324543 Author: Chris Packham Date: Thu Nov 7 17:42:35 2019 +1300 spi: spi-mem: fallback to using transfers when CS gpios are used Devices with chip selects driven via GPIO are not compatible with the spi-mem operations. Fallback to using standard spi transfers when the device is connected with a gpio CS. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20191107044235.4864-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Mark Brown commit 27fb2313f28d8c82adace68bf49f12fe810ba58c Author: Chris Packham Date: Thu Nov 7 17:42:34 2019 +1300 spi: bcm-qspi: Convert to use CS GPIO descriptors Set use_gpio_descriptors to true and avoid asserting the native chip select if the spi core has done it for us. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20191107044235.4864-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Mark Brown commit 458ea3ad033fc86e291712ce50cbe60c3428cf30 Author: Stephan Gerhold Date: Wed Nov 6 18:31:25 2019 +0100 regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id Those regulators are not actually supported by the AB8500 regulator driver. There is no ab8500_regulator_info for them and no entry in ab8505_regulator_match. As such, they cannot be registered successfully, and looking them up in ab8505_regulator_match causes an out-of-bounds array read. Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505") Cc: Linus Walleij Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20191106173125.14496-2-stephan@gerhold.net Signed-off-by: Mark Brown commit 99c4f70df3a6446c56ca817c2d0f9c12d85d4e7c Author: Stephan Gerhold Date: Wed Nov 6 18:31:24 2019 +0100 regulator: ab8500: Remove AB8505 USB regulator The USB regulator was removed for AB8500 in commit 41a06aa738ad ("regulator: ab8500: Remove USB regulator"). It was then added for AB8505 in commit 547f384f33db ("regulator: ab8500: add support for ab8505"). However, there was never an entry added for it in ab8505_regulator_match. This causes all regulators after it to be initialized with the wrong device tree data, eventually leading to an out-of-bounds array read. Given that it is not used anywhere in the kernel, it seems likely that similar arguments against supporting it exist for AB8505 (it is controlled by hardware). Therefore, simply remove it like for AB8500 instead of adding an entry in ab8505_regulator_match. Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505") Cc: Linus Walleij Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20191106173125.14496-1-stephan@gerhold.net Signed-off-by: Mark Brown commit 2f52475bac7e1572cdc1f045bbd69205f828ed68 Author: Kuninori Morimoto Date: Tue Oct 29 16:01:41 2019 +0900 ASoC: fsi: switch to yaml base Documentation This patch switches from .txt base to .yaml base Document for FSI. Signed-off-by: Kuninori Morimoto Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/878sp4jaqy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8703317ae576c9bf3e07e5b97275e3f957e8d74b Author: Shaokun Zhang Date: Thu Nov 7 15:56:04 2019 +0800 drivers/perf: hisi: update the sccl_id/ccl_id for certain HiSilicon platform For some HiSilicon platform, the originally designed SCCL_ID and CCL_ID are not satisfied with much rich topology when the MT is set, so we extend the SCCL_ID to MPIDR[aff3] and CCL_ID to MPIDR[aff2]. Let's update this for HiSilicon uncore PMU driver. Cc: John Garry Cc: Hanjun Guo Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon commit 9581e24c3f006edcc515cd1b317876d37769166f Merge: fef4ac873369 4611a4fb0cce Author: Rafael J. Wysocki Date: Thu Nov 7 13:58:13 2019 +0100 Merge tag 'linux-cpupower-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates for v5.5 from Shuah Khan: "This cpupower update for Linux 5.5-rc1 consists of bug fixes and improvements to make it more accurate by removing the userspace to kernel transition and read_msr initiated IPI delays." * tag 'linux-cpupower-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: ToDo: Update ToDo with ideas for per_cpu_schedule handling cpupower: mperf_monitor: Update cpupower to use the RDPRU instruction cpupower: mperf_monitor: Introduce per_cpu_schedule flag cpupower: Move needs_root variable into a sub-struct cpupower : Handle set and info subcommands correctly tools/power/cpupower: Fix initializer override in hsw_ext_cstates commit 2b328421e4ed1a8dca6261d302ec0b7c9f915a5b Merge: c389ec67b7f8 fee22854c027 Author: Rafael J. Wysocki Date: Thu Nov 7 13:48:31 2019 +0100 Merge tag 'devfreq-next-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for v5.5 from Chanwoo Choi: "1. Update devfreq core - Check NULL governor in available_governors_show sysfs in order to prevent showing wrong governor information. - Fix race condition between devfreq_update_status() and trans_stat_show() - Add new 'interrupt-driven' flag for devfreq goveroris. Each devfreq driver can add their own interrupt-driven governor (NIVIDIA Tegra30 ACTMON governor). It needs to use the following sysfs interface to get the new polling interval in order to change the NVIDIA Tegra30 hardware's polling interval. : /sys/class/devfreq/devfreqX/polling_interval So, if 'interrupt-driven' flag of devfreq governor is 1, the devfreq governor is able to use the 'polling_interval' sysfs interface to get the new polling interval value. But, the devfreq core doesn't schedule out the polling work for this governor like NVIDIA Tegra30 ACTMON governor. 2. Update devfreq drivers - For exynos-bus.c, remove unused property from dt-binding documentation - For tegra30-devfreq.c, update the internal behavior like fixing the overflow integer issue and clean-up code. 3. Update devfreq-event driver - For exynos-ppmu.c, add exynos_ppmu.h dt-binding file for 'event-data-type' filed. and update dt-binging documentation. Also, Fix minor coding style." * tag 'devfreq-next-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: (25 commits) PM / devfreq: tegra30: Tune up MCCPU boost-down coefficient PM / devfreq: tegra30: Support variable polling interval PM / devfreq: Add new interrupt_driven flag for governors PM / devfreq: tegra30: Use kHz units for dependency threshold PM / devfreq: tegra30: Disable consecutive interrupts when appropriate PM / devfreq: tegra30: Don't enable already enabled consecutive interrupts PM / devfreq: tegra30: Include appropriate header PM / devfreq: tegra30: Constify structs PM / devfreq: tegra30: Don't enable consecutive-down interrupt on startup PM / devfreq: tegra30: Reset boosting on startup PM / devfreq: tegra30: Move clk-notifier's registration to governor's start PM / devfreq: tegra30: Use CPUFreq notifier PM / devfreq: tegra30: Use kHz units uniformly in the code PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out PM / devfreq: tegra30: Drop write-barrier PM / devfreq: tegra30: Handle possible round-rate error PM / devfreq: tegra30: Keep interrupt disabled while governor is stopped PM / devfreq: tegra30: Change irq type to unsigned int PM / devfreq: exynos-ppmu: remove useless assignment PM / devfreq: Lock devfreq in trans_stat_show ... commit ea458effa88e4f4739551d76fe3f702daf607995 Author: Alastair D'Silva Date: Mon Nov 4 13:32:58 2019 +1100 powerpc: Don't flush caches when adding memory This operation takes a significant amount of time when hotplugging large amounts of memory (~50 seconds with 890GB of persistent memory). This was orignally in commit fb5924fddf9e ("powerpc/mm: Flush cache on memory hot(un)plug") to support memtrace, but the flush on add is not needed as it is flushed on remove. Signed-off-by: Alastair D'Silva Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191104023305.9581-7-alastair@au1.ibm.com commit 076265907cf9633bbef861c7c2a1c26a8209f283 Author: Alastair D'Silva Date: Mon Nov 4 13:32:57 2019 +1100 powerpc: Chunk calls to flush_dcache_range in arch_*_memory When presented with large amounts of memory being hotplugged (in my test case, ~890GB), the call to flush_dcache_range takes a while (~50 seconds), triggering RCU stalls. This patch breaks up the call into 1GB chunks, calling cond_resched() inbetween to allow the scheduler to run. Fixes: fb5924fddf9e ("powerpc/mm: Flush cache on memory hot(un)plug") Signed-off-by: Alastair D'Silva Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191104023305.9581-6-alastair@au1.ibm.com commit 23eb7f560a2a6a1b0dbaaaae8685da75314347e4 Author: Alastair D'Silva Date: Mon Nov 4 13:32:56 2019 +1100 powerpc: Convert flush_icache_range & friends to C Similar to commit 22e9c88d486a ("powerpc/64: reuse PPC32 static inline flush_dcache_range()") this patch converts the following ASM symbols to C: flush_icache_range() __flush_dcache_icache() __flush_dcache_icache_phys() This was done as we discovered a long-standing bug where the length of the range was truncated due to using a 32 bit shift instead of a 64 bit one. By converting these functions to C, it becomes easier to maintain. flush_dcache_icache_phys() retains a critical assembler section as we must ensure there are no memory accesses while the data MMU is disabled (authored by Christophe Leroy). Since this has no external callers, it has also been made static, allowing the compiler to inline it within flush_dcache_icache_page(). Signed-off-by: Alastair D'Silva Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman [mpe: Minor fixups, don't export __flush_dcache_icache()] Link: https://lore.kernel.org/r/20191104023305.9581-5-alastair@au1.ibm.com commit dd5ddd3c7a8c7ac382a82d15757f0ca3ab2b2dbc Author: Will Deacon Date: Thu Oct 24 16:57:39 2019 +0100 iommu/io-pgtable-arm: Rename IOMMU_QCOM_SYS_CACHE and improve doc The 'IOMMU_QCOM_SYS_CACHE' IOMMU protection flag is exposed to all users of the IOMMU API. Despite its name, the idea behind it isn't especially tied to Qualcomm implementations and could conceivably be used by other systems. Rename it to 'IOMMU_SYS_CACHE_ONLY' and update the comment to describe a bit better the idea behind it. Cc: Robin Murphy Cc: "Isaac J. Manjarres" Signed-off-by: Will Deacon commit 7841f40aed933dd3838f8d9f2dfcf286c352b7ee Author: Jin Yao Date: Thu Nov 7 15:47:15 2019 +0800 perf hist: Count the total cycles of all samples We can get the per sample cycles by hist__account_cycles(). It's also useful to know the total cycles of all samples in order to get the cycles coverage for a single program block in further. For example: coverage = per block sampled cycles / total sampled cycles This patch creates a new argument 'total_cycles' in hist__account_cycles(), which will be added with the cycles of each sample. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191107074719.26139-4-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6041441870ab521a2652f1d558a770c586b790be Author: Jin Yao Date: Thu Nov 7 15:47:14 2019 +0800 perf block: Cleanup and refactor block info functions We have already implemented some block-info related functions. Now it's time to do some cleanup, refactoring and move the functions and structures to new block-info.h/block-info.c. v4: --- Move code for skipping column length calculation to patch: 'perf diff: Don't use hack to skip column length calculation' v3: --- 1. Rename the patch title 2. Rename from block.h/block.c to block-info.h/block-info.c 3. Move more common part to block-info, such as block_info__process_sym. 4. Remove the nasty hack for skipping calculation of column length Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191107074719.26139-3-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0bdf181fe0e5b6f6d5764ff482d7ae4707f8986b Author: Jin Yao Date: Thu Nov 7 15:47:13 2019 +0800 perf diff: Don't use hack to skip column length calculation Previously we use a nasty hack to skip the hists__calc_col_len for block since this function is not very suitable for block column length calculation. This patch removes the hack code and add a check at the entry of hists__calc_col_len to skip for block case. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191107074719.26139-2-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit af8490eb2b33684e26a0a927a9d93ae43cd08890 Author: Leo Yan Date: Thu Nov 7 10:02:44 2019 +0800 perf tests: Fix out of bounds memory access The test case 'Read backward ring buffer' failed on 32-bit architectures which were found by LKFT perf testing. The test failed on arm32 x15 device, qemu_arm32, qemu_i386, and found intermittent failure on i386; the failure log is as below: 50: Read backward ring buffer : --- start --- test child forked, pid 510 Using CPUID GenuineIntel-6-9E-9 mmap size 1052672B mmap size 8192B Finished reading overwrite ring buffer: rewind free(): invalid next size (fast) test child interrupted ---- end ---- Read backward ring buffer: FAILED! The log hints there have issue for memory usage, thus free() reports error 'invalid next size' and directly exit for the case. Finally, this issue is root caused as out of bounds memory access for the data array 'evsel->id'. The backward ring buffer test invokes do_test() twice. 'evsel->id' is allocated at the first call with the flow: test__backward_ring_buffer() `-> do_test() `-> evlist__mmap() `-> evlist__mmap_ex() `-> perf_evsel__alloc_id() So 'evsel->id' is allocated with one item, and it will be used in function perf_evlist__id_add(): evsel->id[0] = id evsel->ids = 1 At the second call for do_test(), it skips to initialize 'evsel->id' and reuses the array which is allocated in the first call. But 'evsel->ids' contains the stale value. Thus: evsel->id[1] = id -> out of bound access evsel->ids = 2 To fix this issue, we will use evlist__open() and evlist__close() pair functions to prepare and cleanup context for evlist; so 'evsel->id' and 'evsel->ids' can be initialized properly when invoke do_test() and avoid the out of bounds memory access. Fixes: ee74701ed8ad ("perf tests: Add test to check backward ring buffer") Signed-off-by: Leo Yan Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Naresh Kamboju Cc: Peter Zijlstra Cc: Wang Nan Cc: stable@vger.kernel.org # v4.10+ Link: http://lore.kernel.org/lkml/20191107020244.2427-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 7a0745c5e03ff1129864bc6d80f5c4417e8d7893 Author: Alastair D'Silva Date: Mon Nov 4 13:32:55 2019 +1100 powerpc: define helpers to get L1 icache sizes This patch adds helpers to retrieve icache sizes, and renames the existing helpers to make it clear that they are for dcache. Signed-off-by: Alastair D'Silva Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191104023305.9581-4-alastair@au1.ibm.com commit f9ec11165301982585e5e5f606739b5bae5331f3 Author: Alastair D'Silva Date: Mon Nov 4 13:32:54 2019 +1100 powerpc: Allow 64bit VDSO __kernel_sync_dicache to work across ranges >4GB When calling __kernel_sync_dicache with a size >4GB, we were masking off the upper 32 bits, so we would incorrectly flush a range smaller than intended. This patch replaces the 32 bit shifts with 64 bit ones, so that the full size is accounted for. Signed-off-by: Alastair D'Silva Cc: stable@vger.kernel.org Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191104023305.9581-3-alastair@au1.ibm.com commit 29430fae82073d39b1b881a3cd507416a56a363f Author: Alastair D'Silva Date: Mon Nov 4 13:32:53 2019 +1100 powerpc: Allow flush_icache_range to work across ranges >4GB When calling flush_icache_range with a size >4GB, we were masking off the upper 32 bits, so we would incorrectly flush a range smaller than intended. This patch replaces the 32 bit shifts with 64 bit ones, so that the full size is accounted for. Signed-off-by: Alastair D'Silva Cc: stable@vger.kernel.org Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191104023305.9581-2-alastair@au1.ibm.com commit 355b9aae868512747c0ff90231e8ae8ea0278a60 Author: Chengguang Xu Date: Mon Nov 4 19:40:36 2019 +0800 ext2: fix improper function comment Just fix a improper function comment. Link: https://lore.kernel.org/r/20191104114036.9893-5-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit 44dd6161338ef528b5b011184639beadcf038b14 Author: Chengguang Xu Date: Mon Nov 4 19:40:35 2019 +0800 ext2: code cleanup for ext2_try_to_allocate() Code cleanup by removing duplicated code. Link: https://lore.kernel.org/r/20191104114036.9893-4-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit ac3820f8222b6563580605f427ff03474a2f003a Author: Chengguang Xu Date: Mon Nov 4 19:40:34 2019 +0800 ext2: skip unnecessary operations in ext2_try_to_allocate() Move 'repeat' tag to proper place so that we can skip unnecessary operations in ext2_try_to_allocate(). Link: https://lore.kernel.org/r/20191104114036.9893-3-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit cf4eb321b3ad63248069a8038df126fcf9ed9100 Author: Jan Kara Date: Wed Nov 6 16:39:26 2019 +0100 ext2: Simplify initialization in ext2_try_to_allocate() Somewhat simplify the logic initializing search start and end in ext2_try_to_allocate(). No functional change. Signed-off-by: Jan Kara commit 6d57581659f7229903d141455c7308e309056e89 Author: Jiwei Sun Date: Tue Oct 22 16:09:01 2019 +0800 perf record: Add support for limit perf output file size The patch adds a new option to limit the output file size, then based on it, we can create a wrapper of the perf command that uses the option to avoid exhausting the disk space by the unconscious user. In order to make the perf.data parsable, we just limit the sample data size, since the perf.data consists of many headers and sample data and other data, the actual size of the recorded file will bigger than the setting value. Testing it: # ./perf record -a -g --max-size=10M Couldn't synthesize bpf events. [ perf record: perf size limit reached (10249 KB), stopping session ] [ perf record: Woken up 32 times to write data ] [ perf record: Captured and wrote 10.133 MB perf.data (71964 samples) ] # ls -lh perf.data -rw------- 1 root root 11M Oct 22 14:32 perf.data # ./perf record -a -g --max-size=10K [ perf record: perf size limit reached (10 KB), stopping session ] Couldn't synthesize bpf events. [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 1.546 MB perf.data (69 samples) ] # ls -l perf.data -rw------- 1 root root 1626952 Oct 22 14:36 perf.data Committer notes: Fixed the build in multiple distros by using PRIu64 to print u64 struct members, fixing this: builtin-record.c: In function 'record__write': builtin-record.c:150:5: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'u64' [-Werror=format=] rec->bytes_written >> 10); ^ CC /tmp/build/pe Signed-off-by: Jiwei Sun Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Richard Danter Link: http://lore.kernel.org/lkml/20191022080901.3841-1-jiwei.sun@windriver.com Signed-off-by: Arnaldo Carvalho de Melo commit dee36a2abb67c175265d49b9a8c7dfa564463d9a Author: Masami Hiramatsu Date: Wed Oct 30 16:09:49 2019 +0900 perf probe: Skip overlapped location on searching variables Since debuginfo__find_probes() callback function can be called with the location which already passed, the callback function must filter out such overlapped locations. add_probe_trace_event() has already done it by commit 1a375ae7659a ("perf probe: Skip same probe address for a given line"), but add_available_vars() doesn't. Thus perf probe -v shows same address repeatedly as below: # perf probe -V vfs_read:18 Available variables at vfs_read:18 @ char* buf loff_t* pos ssize_t ret struct file* file @ char* buf loff_t* pos ssize_t ret struct file* file @ char* buf loff_t* pos ssize_t ret struct file* file With this fix, perf probe -V shows it correctly: # perf probe -V vfs_read:18 Available variables at vfs_read:18 @ char* buf loff_t* pos ssize_t ret struct file* file @ char* buf loff_t* pos ssize_t ret struct file* file Fixes: cf6eb489e5c0 ("perf probe: Show accessible local variables") Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157241938927.32002.4026859017790562751.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 86c0bf8539e7f46d91bd105e55eda96e0064caef Author: Masami Hiramatsu Date: Wed Oct 30 16:09:40 2019 +0900 perf probe: Fix to show calling lines of inlined functions Fix to show calling lines of inlined functions (where an inline function is called). die_walk_lines() filtered out the lines inside inlined functions based on the address. However this also filtered out the lines which call those inlined functions from the target function. To solve this issue, check the call_file and call_line attributes and do not filter out if it matches to the line information. Without this fix, perf probe -L doesn't show some lines correctly. (don't see the lines after 17) # perf probe -L vfs_read 0 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) 1 { 2 ssize_t ret; 4 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) { 13 if (count > MAX_RW_COUNT) count = MAX_RW_COUNT; 15 ret = __vfs_read(file, buf, count, pos); 16 if (ret > 0) { fsnotify_access(file); add_rchar(current, ret); } With this fix: # perf probe -L vfs_read 0 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) 1 { 2 ssize_t ret; 4 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) { 13 if (count > MAX_RW_COUNT) count = MAX_RW_COUNT; 15 ret = __vfs_read(file, buf, count, pos); 16 if (ret > 0) { 17 fsnotify_access(file); 18 add_rchar(current, ret); } 20 inc_syscr(current); } Fixes: 4cc9cec636e7 ("perf probe: Introduce lines walker interface") Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157241937995.32002.17899884017011512577.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit da6cb952a89efe24bb76c4971370d485737a2d85 Author: Masami Hiramatsu Date: Wed Oct 30 16:09:30 2019 +0900 perf probe: Filter out instances except for inlined subroutine and subprogram Filter out instances except for inlined_subroutine and subprogram DIE in die_walk_instances() and die_is_func_instance(). This fixes an issue that perf probe sets some probes on calling address instead of a target function itself. When perf probe walks on instances of an abstruct origin (a kind of function prototype of inlined function), die_walk_instances() can also pass a GNU_call_site (a GNU extension for call site) to callback. Since it is not an inlined instance of target function, we have to filter out when searching a probe point. Without this patch, perf probe sets probes on call site address too.This can happen on some function which is marked "inlined", but has actual symbol. (I'm not sure why GCC mark it "inlined"): # perf probe -D vfs_read p:probe/vfs_read _text+2500017 p:probe/vfs_read_1 _text+2499468 p:probe/vfs_read_2 _text+2499563 p:probe/vfs_read_3 _text+2498876 p:probe/vfs_read_4 _text+2498512 p:probe/vfs_read_5 _text+2498627 With this patch: Slightly different results, similar tho: # perf probe -D vfs_read p:probe/vfs_read _text+2498512 Committer testing: # uname -a Linux quaco 5.3.8-200.fc30.x86_64 #1 SMP Tue Oct 29 14:46:22 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux Before: # perf probe -D vfs_read p:probe/vfs_read _text+3131557 p:probe/vfs_read_1 _text+3130975 p:probe/vfs_read_2 _text+3131047 p:probe/vfs_read_3 _text+3130380 p:probe/vfs_read_4 _text+3130000 # uname -a Linux quaco 5.3.8-200.fc30.x86_64 #1 SMP Tue Oct 29 14:46:22 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux # After: # perf probe -D vfs_read p:probe/vfs_read _text+3130000 # Fixes: db0d2c6420ee ("perf probe: Search concrete out-of-line instances") Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157241937063.32002.11024544873990816590.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit f4d99bdfd124823a81878b44b5e8750b97f73902 Author: Masami Hiramatsu Date: Wed Oct 30 16:09:21 2019 +0900 perf probe: Skip end-of-sequence and non statement lines Skip end-of-sequence and non-statement lines while walking through lines list. The "end-of-sequence" line information means: "the current address is that of the first byte after the end of a sequence of target machine instructions." (DWARF version 4 spec 6.2.2) This actually means out of scope and we can not probe on it. On the other hand, the statement lines (is_stmt) means: "the current instruction is a recommended breakpoint location. A recommended breakpoint location is intended to “represent” a line, a statement and/or a semantically distinct subpart of a statement." (DWARF version 4 spec 6.2.2) So, non-statement line info also should be skipped. These can reduce unneeded probe points and also avoid an error. E.g. without this patch: # perf probe -a "clear_tasks_mm_cpumask:1" Added new events: probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask:1) probe:clear_tasks_mm_cpumask_1 (on clear_tasks_mm_cpumask:1) probe:clear_tasks_mm_cpumask_2 (on clear_tasks_mm_cpumask:1) probe:clear_tasks_mm_cpumask_3 (on clear_tasks_mm_cpumask:1) probe:clear_tasks_mm_cpumask_4 (on clear_tasks_mm_cpumask:1) You can now use it in all perf tools, such as: perf record -e probe:clear_tasks_mm_cpumask_4 -aR sleep 1 # This puts 5 probes on one line, but acutally it's not inlined function. This is because there are many non statement instructions at the function prologue. With this patch: # perf probe -a "clear_tasks_mm_cpumask:1" Added new event: probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask:1) You can now use it in all perf tools, such as: perf record -e probe:clear_tasks_mm_cpumask -aR sleep 1 # Now perf-probe skips unneeded addresses. Committer testing: Slightly different results, but similar: Before: # uname -a Linux quaco 5.3.8-200.fc30.x86_64 #1 SMP Tue Oct 29 14:46:22 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux # # perf probe -a "clear_tasks_mm_cpumask:1" Added new events: probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask:1) probe:clear_tasks_mm_cpumask_1 (on clear_tasks_mm_cpumask:1) probe:clear_tasks_mm_cpumask_2 (on clear_tasks_mm_cpumask:1) You can now use it in all perf tools, such as: perf record -e probe:clear_tasks_mm_cpumask_2 -aR sleep 1 # After: # perf probe -a "clear_tasks_mm_cpumask:1" Added new event: probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask:1) You can now use it in all perf tools, such as: perf record -e probe:clear_tasks_mm_cpumask -aR sleep 1 # perf probe -l probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask@kernel/cpu.c) # Fixes: 4cc9cec636e7 ("perf probe: Introduce lines walker interface") Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157241936090.32002.12156347518596111660.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit c701636aeec4c173208697d68da6e4271125564b Author: Masami Hiramatsu Date: Tue Nov 5 09:16:49 2019 +0900 perf probe: Return a better scope DIE if there is no best scope Make find_best_scope() returns innermost DIE at given address if there is no best matched scope DIE. Since Gcc sometimes generates intuitively strange line info which is out of inlined function address range, we need this fixup. Without this, sometimes perf probe failed to probe on a line inside an inlined function: # perf probe -D ksys_open:3 Failed to find scope of probe point. Error: Failed to add events. With this fix, 'perf probe' can probe it: # perf probe -D ksys_open:3 p:probe/ksys_open _text+25707308 p:probe/ksys_open_1 _text+25710596 p:probe/ksys_open_2 _text+25711114 p:probe/ksys_open_3 _text+25711343 p:probe/ksys_open_4 _text+25714058 p:probe/ksys_open_5 _text+2819653 p:probe/ksys_open_6 _text+2819701 Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Steven Rostedt (VMware) Cc: Tom Zanussi Link: http://lore.kernel.org/lkml/157291300887.19771.14936015360963292236.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 5c65b1c0842f9daddc6aec4bdb4b5d898006be19 Author: Ian Rogers Date: Fri Oct 25 20:56:44 2019 -0700 perf annotate: Fix heap overflow Fix expand_tabs that copies the source lines '\0' and then appends another '\0' at a potentially out of bounds address. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Jin Yao Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191026035644.217548-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 93730f85eb37d9cf592c18dad7e488abed09b461 Author: Arnaldo Carvalho de Melo Date: Thu Oct 31 15:22:24 2019 -0300 perf machine: Add kernel_dso() method To reduce boilerplate in some places. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-9s1bgoxxhlnu037e1nqx0tw3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b0c76fc4cfd96ae859cc50afe5deb523276f75ae Author: Arnaldo Carvalho de Melo Date: Fri Nov 1 18:34:44 2019 -0300 perf symbols: Remove needless checks for map->groups->machine Its sufficient to check if map->groups is NULL before using it to get ->machine value. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-utiepyiv8b1tf8f79ok9d6j8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1dc925568f015edfdbb89e20ad41755bb70538b9 Author: Ian Rogers Date: Wed Oct 30 15:34:47 2019 -0700 perf parse: Add a deep delete for parse event terms Add a parse_events_term deep delete function so that owned strings and arrays are freed. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jin Yao Cc: John Garry Cc: Kan Liang 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: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191030223448.12930-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 38f2c4226e6bc3e8c41c318242821ba5dc825aba Author: Ian Rogers Date: Wed Oct 30 15:34:46 2019 -0700 perf parse: If pmu configuration fails free terms Avoid a memory leak when the configuration fails. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jin Yao Cc: John Garry Cc: Kan Liang 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: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191030223448.12930-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit cabbf26821aa210f1abfb07cc0e8339303e8e16c Author: Ian Rogers Date: Wed Oct 30 15:34:45 2019 -0700 perf parse: Before yyabort-ing free components Yyabort doesn't destruct inputs and so this must be done manually before using yyabort. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jin Yao Cc: John Garry Cc: Kan Liang 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: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191030223448.12930-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f2a8ecd8b1f4df096d9597388eda1c994c72d373 Author: Ian Rogers Date: Wed Oct 30 15:34:44 2019 -0700 perf parse: Add destructors for parse event terms If parsing fails then destructors are ran to clean the up the stack. Rename the head union member to make the term and evlist use cases more distinct, this simplifies matching the correct destructor. Committer notes: Jiri: "Nice did not know about this.. looks like it's been in bison for some time, right?" Ian: "Looks like it wasn't in Bison 1 but in Bison 2, we're at Bison 3 and Bison 2 is > 14 years old: https://web.archive.org/web/20050924004158/http://www.gnu.org/software/bison/manual/html_mono/bison.html#Destructor-Decl" Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jin Yao Cc: John Garry Cc: Kan Liang 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: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191030223448.12930-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c1c9ea6371e3c9833cb91696e3e50a54dc6b3533 Merge: 8301ae822d8d 7f08ae53a7e3 Author: Catalin Marinas Date: Thu Nov 7 11:26:54 2019 +0000 Merge branch 'arm64/ftrace-with-regs' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core FTRACE_WITH_REGS support for arm64. * 'arm64/ftrace-with-regs' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux: arm64: ftrace: minimize ifdeffery arm64: implement ftrace with regs arm64: asm-offsets: add S_FP arm64: insn: add encoder for MOV (register) arm64: module/ftrace: intialize PLT at load time arm64: module: rework special section handling module/ftrace: handle patchable-function-entry ftrace: add ftrace_init_nop() commit bff3b04460a80f425442fe8e5c6ee8c3ebef611f Author: Nicolas Saenz Julienne Date: Thu Nov 7 10:56:11 2019 +0100 arm64: mm: reserve CMA and crashkernel in ZONE_DMA32 With the introduction of ZONE_DMA in arm64 we moved the default CMA and crashkernel reservation into that area. This caused a regression on big machines that need big CMA and crashkernel reservations. Note that ZONE_DMA is only 1GB big. Restore the previous behavior as the wide majority of devices are OK with reserving these in ZONE_DMA32. The ones that need them in ZONE_DMA will configure it explicitly. Fixes: 1a8e1cef7603 ("arm64: use both ZONE_DMA and ZONE_DMA32") Reported-by: Qian Cai Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Catalin Marinas commit fa6614d8ef13c63aac52ad7c07c5e69ce4aba3dd Author: Jason Gunthorpe Date: Mon Oct 28 17:10:25 2019 -0300 xen/gntdev: Use select for DMA_SHARED_BUFFER DMA_SHARED_BUFFER can not be enabled by the user (it represents a library set in the kernel). The kconfig convention is to use select for such symbols so they are turned on implicitly when the user enables a kconfig that needs them. Otherwise the XEN_GNTDEV_DMABUF kconfig is overly difficult to enable. Fixes: 932d6562179e ("xen/gntdev: Add initial support for dma-buf UAPI") Cc: Oleksandr Andrushchenko Cc: Boris Ostrovsky Cc: xen-devel@lists.xenproject.org Cc: Juergen Gross Cc: Stefano Stabellini Reviewed-by: Juergen Gross Reviewed-by: Oleksandr Andrushchenko Signed-off-by: Jason Gunthorpe Signed-off-by: Juergen Gross commit 88920ddebd2f4afe67eb39a9fe3661275e6e3e2d Author: Ben Dooks (Codethink) Date: Tue Oct 22 13:52:51 2019 +0100 xen: mm: make xen_mm_init static The xen_mm_init is not exported or used outside of the file it is declared in, so make it static. This fixes the following sparse warning: arch/arm/xen/mm.c:136:12: warning: symbol 'xen_mm_init' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Reviewed-by: Stefano Stabellini Signed-off-by: Juergen Gross commit e8d255e4703a820bab46f856460f318a60d42ace Author: Ben Dooks (Codethink) Date: Tue Oct 22 13:50:06 2019 +0100 xen: mm: include for missing declarations Include for xen_{create,destroy}_contigous_region call declarations. Fixes the following sparse warnings: arch/arm/xen/mm.c:119:5: warning: symbol 'xen_create_contiguous_region' was not declared. Should it be static? arch/arm/xen/mm.c:131:6: warning: symbol 'xen_destroy_contiguous_region' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Reviewed-by: Stefano Stabellini Signed-off-by: Juergen Gross commit 3eca037f2dfce07a31da0a837ac35d6d846614b0 Author: Joel Stanley Date: Wed Nov 6 19:47:02 2019 +1030 ARM: dts: aspeed-g6: Add timer description The AST2600 has 8 32-bit timers on the APB bus. Reviewed-by: Cédric Le Goater Signed-off-by: Joel Stanley commit ea4bb33a9da21da30604fc89f3341f1526b97a49 Author: Joel Stanley Date: Wed Oct 16 14:38:11 2019 +1030 ARM: dts: aspeed: ast2600evb: Enable i2c buses With the exception of i2c10 and i2c11 which conflict with the pins for the third and forth MDIO controllers. i2c0 has an ADT7490 fan controller/thermal monitor device connected. The devicetree describes an adt74490 on i2c0, however bus that it appears on depends on jumper settings, so it may not be present on all EVBs. It is included to assist testing of I2C. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 26a4d4c00f85cb844dd11dd35e848b079c2f5e8f Author: Hewenliang Date: Fri Oct 25 00:35:15 2019 -0400 usbip: tools: fix fd leakage in the function of read_attr_usbip_status We should close the fd before the return of read_attr_usbip_status. Fixes: 3391ba0e2792 ("usbip: tools: Extract generic code to be shared with vudc backend") Signed-off-by: Hewenliang Cc: stable Link: https://lore.kernel.org/r/20191025043515.20053-1-hewenliang4@huawei.com Signed-off-by: Greg Kroah-Hartman commit 91feb01596e5efc0cc922cc73f5583114dccf4d2 Author: Oliver Neukum Date: Wed Nov 6 13:49:01 2019 +0100 appledisplay: fix error handling in the scheduled work The work item can operate on 1. stale memory left over from the last transfer the actual length of the data transfered needs to be checked 2. memory already freed the error handling in appledisplay_probe() needs to cancel the work in that case Reported-and-tested-by: syzbot+495dab1f175edc9c2f13@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20191106124902.7765-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit c1f602da92ccc40cfe6ea60c1b3dcd172b4f7b5e Author: Johan Hovold Date: Tue Nov 5 09:41:52 2019 +0100 USB: legousbtower: drop superfluous newlines Drop some superfluous newlines before conditionals which made the code harder to read. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-15-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3c84f4bbe33f1f83a217499248a9f7dc20764040 Author: Johan Hovold Date: Tue Nov 5 09:41:51 2019 +0100 USB: legousbtower: drop superfluous brackets Drop superfluous brackets around single-line blocks. Also add missing white space around operators in a for-expression being modified. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-14-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit a0cd1df9d3e2de949379738b9e2e06172494c5d8 Author: Johan Hovold Date: Tue Nov 5 09:41:50 2019 +0100 USB: legousbtower: clean up runaway white space Drop space between function identifiers and opening parenthesis, which was no longer even used consistently within the driver. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-13-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 728772489d9d9dde24739bb9f0b4a4fc8ce61506 Author: Johan Hovold Date: Tue Nov 5 09:41:49 2019 +0100 USB: legousbtower: drop redundant endianness comments The endianness is already encoded in the type specifier so drop the redundant little-endian comments from the message structs. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-12-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit a76c234faf7a904e57515346f66317b0b3543d3c Author: Johan Hovold Date: Tue Nov 5 09:41:48 2019 +0100 USB: legousbtower: drop unnecessary packed attributes Drop the packed attributes from the two message structs whose fields are naturally aligned and do not have any padding. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-11-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7cfa11a5739d2d4bd9f143b7cd986bccbf7e5d01 Author: Johan Hovold Date: Tue Nov 5 09:41:47 2019 +0100 USB: legousbtower: clean up pointer declarations in driver data Clean up the pointer declarations in the driver data, whose style wasn't even consistent with the rest of the driver. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-10-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit aa6f3832458dab256f17f451e00270ae3f5736e4 Author: Johan Hovold Date: Tue Nov 5 09:41:46 2019 +0100 USB: legousbtower: remove tower_abort_transfers() Drop the tower_abort_transfers() function which is now only called from release and instead explicitly kill the two URBs. This incidentally also fixes the outdated comment about freeing memory. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-9-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit bafd1b1c2cee5513a400efffa58e9d02d8577423 Author: Johan Hovold Date: Tue Nov 5 09:41:45 2019 +0100 USB: legousbtower: stop interrupt-out URB unconditionally Stop also the interrupt-out URB unconditionally in tower_abort_transfers() which is called from release() (for connected devices). Calling usb_kill_urb() for an idle URB is perfectly fine. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-8-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 728fcd55e9ac3c7058949d78a443bedc7251b320 Author: Johan Hovold Date: Tue Nov 5 09:41:44 2019 +0100 USB: legousbtower: drop redundant interrupt-in running flag Drop the redundant interrupt-in-running flag, which tried to keep track of when the interrupt-in URB was in flight. This isn't needed since we can stop the URB unconditionally in tower_abort_transfers() and the URB can not be submitted while usb_kill_urb() is running anyway. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-7-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 835bd2b5672b632b7aedf29e48e3453c182a1b9a Author: Johan Hovold Date: Tue Nov 5 09:41:43 2019 +0100 USB: legousbtower: drop noisy disconnect messages User space already sees -ENODEV in case it tries to do I/O post disconnect, no need to spam the logs with printk messages that don't even include any device-id information. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-6-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit b5a80252e09c2791380cdf10a6ebd7987900748c Author: Johan Hovold Date: Tue Nov 5 09:41:42 2019 +0100 USB: legousbtower: drop redundant open_count check Drop redundant open_count check in release; the open count is used as a flag and is only set to 0 or 1. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-5-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 30da837a4938438a0259a7bc38dc05d66fa77c08 Author: Johan Hovold Date: Tue Nov 5 09:41:41 2019 +0100 USB: legousbtower: zero driver data at allocation Zero the driver data at allocation rather than depend on explicit zeroing, which easy to miss. Also drop an unnecessary driver-data pointer initialisation. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 07efa8738853696f100b0495b767823308330b3d Author: Johan Hovold Date: Tue Nov 5 09:41:40 2019 +0100 USB: legousbtower: drop redundant NULL check Drop redundant NULL check from tower_abort_transfers(), which is never called with a NULL argument. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit fa5e146eece5657b8bbfae9facce13b7b7dc65b5 Author: Johan Hovold Date: Tue Nov 5 09:41:39 2019 +0100 USB: legousbtower: drop redundant MODULE_LICENSE ifdef The MODULE_LICENSE macro is unconditionally defined in module.h, no need to ifdef its use. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105084152.16322-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit d3db9c4dc14dae5ebfb74dd5a5ca502a8db63535 Author: Johan Hovold Date: Tue Nov 5 11:36:38 2019 +0100 USB: idmouse: clean up runaway white space Drop space between function identifiers and opening parenthesis, which was no longer even used consistently within the driver. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105103638.4929-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6710f773b51f21ad7d10198ca6424bea7faaf9d4 Author: Johan Hovold Date: Tue Nov 5 11:36:37 2019 +0100 USB: idmouse: drop redundant open-count check from release The open count will always be exactly one when release is called, so drop the redundant sanity check. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105103638.4929-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 79c36a704a87533ba1551170354f3fb507ff5b70 Author: Johan Hovold Date: Tue Nov 5 11:36:36 2019 +0100 USB: idmouse: simplify disconnect handling Since commit d4ead16f50f9 ("USB: prevent char device open/deregister race") core prevents further calls to open() after usb_deregister_dev() returns so there's no need to use the interface data for synchronisation. This effectively reverts commit 54d2bc068fd2 ("USB: fix locking in idmouse") with respect to the open-disconnect race. Note that the driver already uses a present flag to suppress I/O post disconnect (even if all USB I/O take place at open). Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191105103638.4929-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9774a96f785bf0fa6d956ce33300463f1704dbeb Author: Babu Moger Date: Tue Nov 5 21:25:40 2019 +0000 x86/umip: Make the comments vendor-agnostic AMD 2nd generation EPYC processors also support the UMIP feature. Make the comments vendor-agnostic. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/157298913784.17462.12654728938970637305.stgit@naples-babu.amd.com commit d79fbb3a32f05a7e1cc0294b86dacdb9cc3ad7f5 Author: Chris Packham Date: Fri Aug 2 10:50:06 2019 +1200 powerpc: Support CMDLINE_EXTEND Bring powerpc in line with other architectures that support extending or overriding the bootloader provided command line. The current behaviour is most like CMDLINE_FROM_BOOTLOADER where the bootloader command line is preferred but the kernel config can provide a fallback so CMDLINE_FROM_BOOTLOADER is the default. CMDLINE_EXTEND can be used to append the CMDLINE from the kernel config to the one provided by the bootloader. Signed-off-by: Chris Packham Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190801225006.21952-1-chris.packham@alliedtelesis.co.nz commit e76b3bf7654c3c94554c24ba15a3d105f4006c80 Author: Kai-Heng Feng Date: Wed Nov 6 14:27:10 2019 +0800 usb: Allow USB device to be warm reset in suspended state On Dell WD15 dock, sometimes USB ethernet cannot be detected after plugging cable to the ethernet port, the hub and roothub get runtime resumed and runtime suspended immediately: ... [ 433.315169] xhci_hcd 0000:3a:00.0: hcd_pci_runtime_resume: 0 [ 433.315204] usb usb4: usb auto-resume [ 433.315226] hub 4-0:1.0: hub_resume [ 433.315239] xhci_hcd 0000:3a:00.0: Get port status 4-1 read: 0x10202e2, return 0x10343 [ 433.315264] usb usb4-port1: status 0343 change 0001 [ 433.315279] xhci_hcd 0000:3a:00.0: clear port1 connect change, portsc: 0x10002e2 [ 433.315293] xhci_hcd 0000:3a:00.0: Get port status 4-2 read: 0x2a0, return 0x2a0 [ 433.317012] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling. [ 433.422282] xhci_hcd 0000:3a:00.0: Get port status 4-1 read: 0x10002e2, return 0x343 [ 433.422307] usb usb4-port1: do warm reset [ 433.422311] usb 4-1: device reset not allowed in state 8 [ 433.422339] hub 4-0:1.0: state 7 ports 2 chg 0002 evt 0000 [ 433.422346] xhci_hcd 0000:3a:00.0: Get port status 4-1 read: 0x10002e2, return 0x343 [ 433.422356] usb usb4-port1: do warm reset [ 433.422358] usb 4-1: device reset not allowed in state 8 [ 433.422428] xhci_hcd 0000:3a:00.0: set port remote wake mask, actual port 0 status = 0xf0002e2 [ 433.422455] xhci_hcd 0000:3a:00.0: set port remote wake mask, actual port 1 status = 0xe0002a0 [ 433.422465] hub 4-0:1.0: hub_suspend [ 433.422475] usb usb4: bus auto-suspend, wakeup 1 [ 433.426161] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling. [ 433.466209] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.510204] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.554051] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.598235] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.642154] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.686204] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.730205] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.774203] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.818207] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.862040] xhci_hcd 0000:3a:00.0: port 0 polling in bus suspend, waiting [ 433.862053] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling. [ 433.862077] xhci_hcd 0000:3a:00.0: xhci_suspend: stopping port polling. [ 433.862096] xhci_hcd 0000:3a:00.0: // Setting command ring address to 0x8578fc001 [ 433.862312] xhci_hcd 0000:3a:00.0: hcd_pci_runtime_suspend: 0 [ 433.862445] xhci_hcd 0000:3a:00.0: PME# enabled [ 433.902376] xhci_hcd 0000:3a:00.0: restoring config space at offset 0xc (was 0x0, writing 0x20) [ 433.902395] xhci_hcd 0000:3a:00.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100403) [ 433.902490] xhci_hcd 0000:3a:00.0: PME# disabled [ 433.902504] xhci_hcd 0000:3a:00.0: enabling bus mastering [ 433.902547] xhci_hcd 0000:3a:00.0: // Setting command ring address to 0x8578fc001 [ 433.902649] pcieport 0000:00:1b.0: PME: Spurious native interrupt! [ 433.902839] xhci_hcd 0000:3a:00.0: Port change event, 4-1, id 3, portsc: 0xb0202e2 [ 433.902842] xhci_hcd 0000:3a:00.0: resume root hub [ 433.902845] xhci_hcd 0000:3a:00.0: handle_port_status: starting port polling. [ 433.902877] xhci_hcd 0000:3a:00.0: xhci_resume: starting port polling. [ 433.902889] xhci_hcd 0000:3a:00.0: xhci_hub_status_data: stopping port polling. [ 433.902891] xhci_hcd 0000:3a:00.0: hcd_pci_runtime_resume: 0 [ 433.902919] usb usb4: usb wakeup-resume [ 433.902942] usb usb4: usb auto-resume [ 433.902966] hub 4-0:1.0: hub_resume ... As Mathias pointed out, the hub enters Cold Attach Status state and requires a warm reset. However usb_reset_device() bails out early when the device is in suspended state, as its callers port_event() and hub_event() don't always resume the device. Since there's nothing wrong to reset a suspended device, allow usb_reset_device() to do so to solve the issue. Signed-off-by: Kai-Heng Feng Acked-by: Alan Stern Cc: stable Link: https://lore.kernel.org/r/20191106062710.29880-1-kai.heng.feng@canonical.com Signed-off-by: Greg Kroah-Hartman commit 66d1b0c0580b7f1b1850ee4423f32ac42afa2e92 Author: Gustavo A. R. Silva Date: Wed Nov 6 14:28:21 2019 -0600 usb: gadget: pch_udc: fix use after free Remove pointer dereference after free. pci_pool_free doesn't care about contents of td. It's just a void* for it Addresses-Coverity-ID: 1091173 ("Use after free") Cc: stable@vger.kernel.org Acked-by: Michal Nazarewicz Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20191106202821.GA20347@embeddedor Signed-off-by: Greg Kroah-Hartman commit 51d11d0a9ea46203241e25651af90ca4c5e2d71a Author: Yoshihiro Shimoda Date: Wed Nov 6 19:34:53 2019 +0900 dt-bindings: usb: renesas: usb3-peri: convert bindings to json-schema Convert Renesas USB 3.0 Peripheral controller bindings documentation to json-schema. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1573036493-16525-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman commit b971880fe79f4042aaaf426744a5b19521bf77b3 Author: Babu Moger Date: Tue Nov 5 21:25:32 2019 +0000 x86/Kconfig: Rename UMIP config parameter AMD 2nd generation EPYC processors support the UMIP (User-Mode Instruction Prevention) feature. So, rename X86_INTEL_UMIP to generic X86_UMIP and modify the text to cover both Intel and AMD. [ bp: take of the disabled-features.h copy in tools/ too. ] Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/157298912544.17462.2018334793891409521.stgit@naples-babu.amd.com commit d99c1ba6a73b9e93e2884b7893fe19e3c082ba03 Author: Xinwei Kong Date: Thu Nov 7 16:24:21 2019 +0800 efi: libstub/tpm: enable tpm eventlog function for ARM platforms Wire up the existing code for ARM that loads the TPM event log into OS accessible buffers while running the EFI stub so that the kernel proper can access it at runtime. Tested-by: Zou Cao Signed-off-by: Xinwei Kong Signed-off-by: Ard Biesheuvel commit 0d95981438c3bdb53cc99b0fb656d24d7a80e1f3 Author: Dominik Brodowski Date: Wed Nov 6 08:06:13 2019 +0100 x86: efi/random: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table Invoke the EFI_RNG_PROTOCOL protocol in the context of the x86 EFI stub, same as is done on arm/arm64 since commit 568bc4e87033 ("efi/arm*/libstub: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table"). Within the stub, a Linux-specific RNG seed UEFI config table will be seeded. The EFI routines in the core kernel will pick that up later, yet still early during boot, to seed the kernel entropy pool. If CONFIG_RANDOM_TRUST_BOOTLOADER, entropy is credited for this seed. Signed-off-by: Dominik Brodowski Signed-off-by: Ard Biesheuvel commit 41e8a7c249bf50f2f719c2ff21ab92be70651f06 Author: Dominik Brodowski Date: Wed Nov 6 08:06:12 2019 +0100 efi/random: use arch-independent efi_call_proto() To handle all arch-specific peculiarities when calling an EFI protocol function, a wrapper efi_call_proto() exists on all relevant architectures. On arm/arm64, this is merely a plain function call. On x86, a special EFI entry stub needs to be used, however, as the calling convention differs. To make the efi/random stub arch-independent, use efi_call_proto() instead of the existing non-portable calls to the EFI get_rng protocol function. This also requires the addition of some typedefs. Signed-off-by: Dominik Brodowski Signed-off-by: Ard Biesheuvel commit 8b5c712f27044dc7812ceea5964eb2ea8952da78 Author: Ard Biesheuvel Date: Wed Nov 6 15:41:32 2019 +0100 MAINTAINERS: update Ard's email address to @kernel.org Cc: Ard Biesheuvel Cc: Ard Biesheuvel Signed-off-by: Ard Biesheuvel commit 2f4133bb5f14f49a99acf0cc55b84996dbfb4dff Author: Andy Shevchenko Date: Tue Nov 5 20:06:54 2019 +0200 gpiolib: No need to call gpiochip_remove_pin_ranges() twice of_gpiochip_add(), when fails, calls gpiochip_remove_pin_ranges(). ADD: gpiochip_add_data_with_key() -> of_gpiochip_add() -> (ERROR path) gpiochip_remove_pin_ranges() At the same time of_gpiochip_remove() calls exactly the above mentioned function unconditionally and so does gpiochip_remove(). REMOVE: gpiochip_remove() -> gpiochip_remove_pin_ranges() of_gpiochip_remove() -> gpiochip_remove_pin_ranges() Since gpiochip_remove() calls gpiochip_remove_pin_ranges() unconditionally, we have duplicate call to the same function when it's not necessary. Move gpiochip_remove_pin_ranges() from of_gpiochip_add() to gpiochip_add() to avoid duplicate calls and be consistent with the explicit call in gpiochip_remove(). Fixes: e93fa3f24353 ("gpiolib: remove duplicate pin range code") Depends-on: f7299d441a4d ("gpio: of: Fix of_gpiochip_add() error path") Cc: Geert Uytterhoeven Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij commit 8ae93b5ed9bec003b77c1ffaca852388b8ca490e Author: Andy Shevchenko Date: Wed Nov 6 16:39:48 2019 +0200 pinctrl: cherryview: Missed type change to unsigned int We converted 'unsigned' type to be 'unsigned int' in the driver, but there are couple of leftovers. So, finish the task now. Signed-off-by: Andy Shevchenko commit 662c9d55c5ccb37f3920ecab9720f2ebf2a6ca18 Author: Weiyi Lu Date: Wed Aug 28 17:11:40 2019 +0800 soc: mediatek: Refactor bus protection control Put bus protection enable and disable control in separate functions. Signed-off-by: Weiyi Lu Signed-off-by: Matthias Brugger commit 0545aa1b7a1472a4d0499ccc7666634c8cf47305 Author: Weiyi Lu Date: Wed Aug 28 17:11:39 2019 +0800 soc: mediatek: Refactor sram control Put sram enable and disable control in separate functions. Signed-off-by: Weiyi Lu Reviewed-by: Nicolas Boichat [mb: fix coding style of reading register and changing the read value] Signed-off-by: Matthias Brugger commit cef021e2f5cb8a1c8cd23ebc77232e6563ce251d Author: Weiyi Lu Date: Wed Aug 28 17:11:38 2019 +0800 soc: mediatek: Refactor clock control Put clock enable and disable control in separate function. Signed-off-by: Weiyi Lu Signed-off-by: Matthias Brugger commit d744d035ecb57decf0ae1711228756445708545a Author: Weiyi Lu Date: Wed Aug 28 17:11:37 2019 +0800 soc: mediatek: Refactor regulator control Put regulator enable and disable control in separate functions. Signed-off-by: Weiyi Lu Signed-off-by: Matthias Brugger commit 90a943145e2ef17b559ef9e98a7c12a1abc9ae84 Author: Weiyi Lu Date: Wed Aug 28 17:11:36 2019 +0800 soc: mediatek: Refactor polling timeout and documentation Use USEC_PER_SEC to indicate the polling timeout directly. And add documentation of scp_domain_data. Signed-off-by: Weiyi Lu Signed-off-by: Matthias Brugger commit 11b389cc05bf70b54e9154aa8ad034aa09111af5 Author: Andy Shevchenko Date: Wed Nov 6 16:39:48 2019 +0200 pinctrl: intel: Missed type change to unsigned int We converted 'unsigned' type to be 'unsigned int' in the driver, but there are couple of leftovers. So, finish the task now. Signed-off-by: Andy Shevchenko commit 8e12257dead76131701c90a3555b0967727efc3f Author: Saravana Kannan Date: Mon Nov 4 22:50:00 2019 -0800 of: property: Add device link support for iommus, mboxes and io-channels Add support for creating device links out of more DT properties. Signed-off-by: Saravana Kannan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191105065000.50407-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit a436ef4aba1f011fa25f35fe7922d577ecde6c7c Author: Saravana Kannan Date: Mon Nov 4 22:49:59 2019 -0800 of: property: Make it easy to add device links from DT properties Add a DEFINE_SIMPLE_PROP macro to make it easy to add support for simple properties with fixed names that just list phandles and phandle args. Add a DEFINE_SUFFIX_PROP macro to make it easy to add support for properties with fixes suffix that just list phandles and phandle args. Signed-off-by: Saravana Kannan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191105065000.50407-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit ba861f8e07bf38c457b98e1abf6ecd9fd8c4ee92 Author: Saravana Kannan Date: Mon Nov 4 22:49:58 2019 -0800 of: property: Minor style clean up of of_link_to_phandle() Adding a debug log instead of silently ignoring a phandle for an early device. Also, return the right error code instead of 0 even though the actual execution flow won't change. Signed-off-by: Saravana Kannan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191105065000.50407-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 52f6efdf80924449023c559c3134258c2c6da43b Author: Alexander Usyskin Date: Thu Nov 7 12:44:45 2019 +0200 mei: add trc detection register to sysfs The glitch detection HW (TRC) save it status information into TRC status register. Make it available to user-space via read-only sysfs file. The TRC register is availab for PCH15 gen and newer, for older platforms reading the sysfs file will fail with EOPNOTSUPP. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191107104445.19101-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 261e071acd9bcbcfbc30652640385615ced27f4f Author: Tomas Winkler Date: Thu Nov 7 00:38:41 2019 +0200 mei: abstract fw status register read. This is to allow working with mei devices embedded within another pci device, where mei device is represented as a platform child device and fw status registers are not necessarily resident in the device pci config space. Bump the copyright year to 2019 on the modified files. Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191106223841.15802-4-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 261b3e1f2a01c72b1882cf5bccfbd4bf40ea62e8 Author: Alexander Usyskin Date: Thu Nov 7 00:38:40 2019 +0200 mei: me: store irq number in the hw struct. Store irq number in hw struct to by used by synchronize_irq(). This is to allow working with mei devices embedded within another pci devices, via MFD framework, where mei device is represented as a platform device. Bump the copyright year to 2019 on hw-me.c and hw-me.h Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191106223841.15802-3-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 907b471ca228a5fc95f7ee8b3d189e64ade7ce9b Author: Tomas Winkler Date: Thu Nov 7 00:38:39 2019 +0200 mei: me: mei_me_dev_init() use struct device instead of struct pci_dev. It's enough to bind mei_device with associated 'struct device' instead of actual 'struct pci_dev'. This is to allow working with mei devices embedded within another pci device, usually via MFD framework, where mei device is represented as a platform device. Bump copyright year to 2019 on effected files. Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191106223841.15802-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit e42615ec233b30dfaf117b108d4cb49455b4df1d Author: Matti Vaittinen Date: Wed Nov 6 10:54:12 2019 +0200 gpio: Use new GPIO_LINE_DIRECTION It's hard for occasional GPIO code reader/writer to know if values 0/1 equal to IN or OUT. Use defined GPIO_LINE_DIRECTION_IN and GPIO_LINE_DIRECTION_OUT to help them out. NOTE - for gpio-amd-fch and gpio-bd9571mwv: This commit also changes the return value for direction get to equal 1 for direction INPUT. Prior this commit these drivers might have returned some other positive value but 1 for INPUT. Signed-off-by: Matti Vaittinen Acked-by: Scott Branden Reviewed-by: Grygorii Strashko Reviewed-by: Michal Simek Reviewed-by: Geert Uytterhoeven Acked-by: Andy Shevchenko Acked-by: William Breathitt Gray Acked-by: Kuppuswamy Sathyanarayanan Signed-off-by: Linus Walleij commit 7383092c4d4c106e09caffaba5eb91f96f48a949 Merge: 755864feb729 4569e64ab6a5 Author: Greg Kroah-Hartman Date: Thu Nov 7 09:25:29 2019 +0100 Merge tag 'phy-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into char-misc-next Kishon writes: phy: for 5.5 *) Add a new PHY driver for USB3 PHY on Allwinner H6 SoC *) Add a new PHY driver for Innosilicon Video Combo PHY(MIPI/LVDS/TTL) *) Add support in xusb-tegra210 PHY driver to get USB device mode functional in Tegra 210 *) Add support for SM8150 QMP UFS PHY in phy-qcom-qmp PHY driver *) Fix smatch warning (array off by one) in phy-rcar-gen2 PHY driver *) Enable mac tx internal delay for rgmii-rxid in phy-gmii-sel driver *) Fix phy-qcom-usb-hs from registering multiple extcon notifiers during PHY power cycle *) Use devm_platform_ioremap_resource() in phy-mvebu-a3700-utmi, phy-hisi-inno-usb2, phy-histb-combphy and regulator_bulk_set_supply_names() in xusb to simplify code *) Remove unused variable in xusb-tegra210 and phy-dm816x-usb *) Fix sparse warnings in phy-brcm-usb-init Signed-off-by: Kishon Vijay Abraham I * tag 'phy-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: (28 commits) phy: phy-rockchip-inno-usb2: add phy description for px30 phy: qcom-usb-hs: Fix extcon double register after power cycle phy: renesas: phy-rcar-gen2: Fix the array off by one warning phy: lantiq: vrx200-pcie: fix error return code in ltq_vrx200_pcie_phy_power_on() dt-bindings: phy: add yaml binding for rockchip,px30-dsi-dphy phy/rockchip: Add support for Innosilicon MIPI/LVDS/TTL PHY phy: add PHY_MODE_LVDS phy: allwinner: add phy driver for USB3 PHY on Allwinner H6 SoC dt-bindings: Add bindings for USB3 phy on Allwinner H6 phy: qcom-qmp: Add SM8150 QMP UFS PHY support dt-bindings: phy-qcom-qmp: Add sm8150 UFS phy compatible string phy: ti: gmii-sel: fix mac tx internal delay for rgmii-rxid phy: tegra: use regulator_bulk_set_supply_names() phy: ti: dm816x: remove set but not used variable 'phy_data' phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role" phy: tegra: xusb: Add vbus override support on Tegra186 phy: tegra: xusb: Add vbus override support on Tegra210 phy: tegra: xusb: Add usb3 port fake support on Tegra210 phy: tegra: xusb: Add XUSB dual mode support on Tegra210 dt-bindings: rcar-gen3-phy-usb3: Add r8a774b1 support ... commit 9208b1e77d6e8e9776f34f46ef4079ecac9c3c25 Author: Matti Vaittinen Date: Wed Nov 6 10:51:47 2019 +0200 gpio: Add definition for GPIO direction At least for me it is difficult to remember the meaning of GPIO direction values. Define GPIO_LINE_DIRECTION_IN and GPIO_LINE_DIRECTION_OUT so that occasional GPIO contributors would not need to always check the meaning of hard coded values 1 and 0. Signed-off-by: Matti Vaittinen Signed-off-by: Linus Walleij commit 5d682fa3d8943c19a632ebeaf70e8b9e41c78a5b Author: Mark Brown Date: Tue Nov 5 12:49:15 2019 +0000 gpio: xgs-iproc: Fix section mismatch on device tree match table The table of devicetree identifiers is annotated as __initconst indicating that it can be discarded after kernel boot but it is referenced from the driver struct which has no init annotation leading to a linker warning: WARNING: vmlinux.o(.data+0x82d58): Section mismatch in reference from the variable bcm_iproc_gpio_driver to the variable .init.rodata:bcm_iproc_gpio_of_match The variable bcm_iproc_gpio_driver references the variable __initconst bcm_iproc_gpio_of_match Since drivers can be probed after init the lack of annotation on the driver struct is correct so remove the annotation from the match table. Fixes: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver") Signed-off-by: Mark Brown Reviewed-by: Chris Packham Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Linus Walleij commit b24eaf5f23754cbfc80f3077440acaafc9551290 Author: Tudor Ambarus Date: Sat Nov 2 11:23:44 2019 +0000 mtd: spi-nor: Print debug message when the read back test fails Demystify where the EIO error occurs. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 40b7d5cccc59e1e69db8121400d367c37aecac17 Author: Tudor Ambarus Date: Sat Nov 2 11:23:43 2019 +0000 mtd: spi-nor: Check all the bits written, not just the BP ones Check that all the bits written in the write_sr_and_check() method match the status_new received value. Failing to write the other bits is dangerous too, extend the check. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit b0db77f5aa0313561420c49acee66e94b33be6b6 Author: Tudor Ambarus Date: Sat Nov 2 11:23:41 2019 +0000 mtd: spi-nor: Fix errno on Quad Enable methods When the Read-Modify-Write-Read-Back Quad Enable methods failed on the Read-Back, they returned -EINVAL. Since this is an I/O error, return -EIO. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 6011b484f1647f2a944c87c31b2adee2a7c47f58 Author: Tudor Ambarus Date: Sat Nov 2 11:23:39 2019 +0000 mtd: spi-nor: Drop spansion_quad_enable() Drop the default spansion_quad_enable() method and replace it with spansion_read_cr_quad_enable(). The function was buggy, it didn't care about the previous values of the Status and Configuration Registers. spansion_read_cr_quad_enable() is a Read-Modify-Write-Check function that keeps track of what were the previous values of the Status and Configuration Registers. In terms of instruction types sent to the flash, the only difference between the spansion_quad_enable() and spansion_read_cr_quad_enable() is that the later calls spi_nor_read_sr(). We can safely assume that all flashes support spi_nor_read_sr(), because all flashes call it in spi_nor_sr_ready(). The transition from spansion_quad_enable() to spansion_read_cr_quad_enable() will not affect anybody, drop the buggy code. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 78f1ddf7bb6ee77815e8d91275356b453524140c Author: Tudor Ambarus Date: Sat Nov 2 11:23:37 2019 +0000 mtd: spi-nor: Describe all the Reg Ops Document all the Register Operations. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit 6e3087a863294d976a899f36373fa1d4c562afd6 Author: Tudor Ambarus Date: Sat Nov 2 11:23:35 2019 +0000 mtd: spi-nor: Merge spi_nor_write_sr() and spi_nor_write_sr_cr() Merge static int spi_nor_write_sr(struct spi_nor *nor, u8 val) static int spi_nor_write_sr_cr(struct spi_nor *nor, const u8 *sr_cr) into static int spi_nor_write_sr(struct spi_nor *nor, const u8 *sr, size_t len) The Status Register can be written with one or two bytes. Merge the two functions to avoid code duplication. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 718dd9e69f7c4558f72f5d68583bbf51d46a4d4b Author: Tudor Ambarus Date: Sat Nov 2 11:23:34 2019 +0000 mtd: spi-nor: Move the WE and wait calls inside Write SR methods Avoid duplicating code by moving the calls to spi_nor_write_enable() and spi_nor_wait_till_ready() inside the Write Status Register methods. Move spi_nor_write_sr() to avoid forward declaration of spi_nor_wait_till_ready(). Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit abd494bb071f9d988f5e36499923ab00439dc0d2 Author: Tudor Ambarus Date: Sat Nov 2 11:23:32 2019 +0000 mtd: spi-nor: Void return type for spi_nor_clear_sr/fsr() spi_nor_clear_sr() and spi_nor_clear_fsr() are called just in case of errors. The callers didn't check their return value, make them of type void. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit cd1ebe1ca065a749d48cdfccdc271f91e8f84623 Author: Tudor Ambarus Date: Sat Nov 2 11:23:30 2019 +0000 mtd: spi-nor: Rename label as it is no longer generic Rename 'sst_write_err' label to 'out' as it is no longer generic for all the errors in the sst_write() method, and may introduce confusion. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit bce679e5ae3a3885d9a66ae90f3a9e9a39e4ec99 Author: Tudor Ambarus Date: Sat Nov 2 11:23:28 2019 +0000 mtd: spi-nor: Check for errors after each Register Operation Check for the return vales of each Register Operation. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit d1ed88eae3fba880963ba37901177c860d9956cf Author: Tudor Ambarus Date: Sat Nov 2 11:23:27 2019 +0000 mtd: spi-nor: Print debug info inside Reg Ops methods Spare the callers of printing debug messages by themselves. Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit f633ebe4879b4e9876a8835d90435d9250c65bf2 Author: Tudor Ambarus Date: Sat Nov 2 11:23:25 2019 +0000 mtd: spi-nor: Use dev_dbg insted of dev_err for low level info What most users care about is "my dev is not working properly". All low level information should be discovered when activating the debug traces. Keep error messages just for the following cases: - when the SR/FSR report program or erase fails, or attempts of modifying a protected sector, - when the JEDEC ID is not recognized, - when the resume() call fails, - when the spi_nor_check() fails. Suggested-by: Boris Brezillon Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra commit a4e893e802e6a807df2e2f3f660f7399bc7e104e Author: Quentin Perret Date: Wed Oct 30 15:14:51 2019 +0000 thermal: cpu_cooling: Migrate to using the EM framework The newly introduced Energy Model framework manages power cost tables in a generic way. Moreover, it supports several types of models since the tables can come from DT or firmware (through SCMI) for example. On the other hand, the cpu_cooling subsystem manages its own power cost tables using only DT data. In order to avoid the duplication of data in the kernel, and in order to enable IPA with EMs coming from more than just DT, remove the private tables from cpu_cooling.c and migrate it to using the centralized EM framework. Doing so should have no visible functional impact for existing users of IPA since: - recent extenstions to the the PM_OPP infrastructure enable the registration of EMs in PM_EM using the DT property used by IPA; - the existing upstream cpufreq drivers marked with the 'CPUFREQ_IS_COOLING_DEV' flag all use the aforementioned PM_OPP infrastructure, which means they all support PM_EM. The only two exceptions are qoriq-cpufreq which doesn't in fact use an EM and scmi-cpufreq which doesn't use DT for power costs. For existing users of cpu_cooling, PM_EM tables will contain the exact same power values that IPA used to compute on its own until now. The only new dependency for them is to compile in CONFIG_ENERGY_MODEL. The case where the thermal subsystem is used without an Energy Model (cpufreq_cooling_ops) is handled by looking directly at CPUFreq's frequency table which is already a dependency for cpu_cooling.c anyway. Since the thermal framework expects the cooling states in a particular order, bail out whenever the CPUFreq table is unsorted, since that is fairly uncommon in general, and there are currently no users of cpu_cooling for this use-case. Acked-by: Daniel Lezcano Acked-by: Viresh Kumar Signed-off-by: Quentin Perret Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191030151451.7961-5-qperret@google.com commit 5a4e5b78956a570cd827f74e4b94d506d13b37b0 Author: Quentin Perret Date: Wed Oct 30 15:14:50 2019 +0000 thermal: cpu_cooling: Make the power-related code depend on IPA The core CPU cooling infrastructure has power-related functions that have only one client: IPA. Since there can be no user of those functions if IPA is not compiled in, make sure to guard them with checks on CONFIG_THERMAL_GOV_POWER_ALLOCATOR to not waste space unnecessarily. Acked-by: Daniel Lezcano Acked-by: Viresh Kumar Suggested-by: Daniel Lezcano Signed-off-by: Quentin Perret Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191030151451.7961-4-qperret@google.com commit 27a47e422ef3cb09f6a428e2b05eb79079506875 Author: Quentin Perret Date: Wed Oct 30 15:14:49 2019 +0000 PM / EM: Declare EM data types unconditionally The structs representing capacity states and performance domains of an Energy Model are currently only defined for CONFIG_ENERGY_MODEL=y. That makes it hard for code outside PM_EM to manipulate those structures without a lot of ifdefery or stubbed accessors. So, move the declaration of the two structs outside of the CONFIG_ENERGY_MODEL ifdef. The client code (e.g. EAS or thermal) always checks the return of em_cpu_get() before using it, so the exising code is still safe to use as-is. Reported-by: kbuild test robot Signed-off-by: Quentin Perret Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191030151451.7961-3-qperret@google.com commit 48da6f80057c3f8d81aa387dc755668a43884b34 Author: Quentin Perret Date: Wed Oct 30 15:14:48 2019 +0000 arm64: defconfig: Enable CONFIG_ENERGY_MODEL The recently introduced Energy Model (EM) framework manages power cost tables for the CPUs of the system. Its only user right now is the scheduler, in the context of Energy Aware Scheduling (EAS). However, the EM framework also offers a generic infrastructure that could replace subsystem-specific implementations of the same concepts, as this is the case in the thermal framework. So, in order to prepare the migration of the thermal subsystem to use the EM framework, enable it in the default arm64 defconfig, which is the most commonly used architecture for IPA. This will also compile-in all of the EAS code, although it won't be enabled by default -- EAS requires to use the 'schedutil' CPUFreq governor while arm64 defaults to 'performance'. Acked-by: Daniel Lezcano Acked-by: Viresh Kumar Signed-off-by: Quentin Perret Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191030151451.7961-2-qperret@google.com commit f0a353b4d184b36a68e3d6951b5027a0c6c0c526 Author: Colin Ian King Date: Fri Nov 1 10:00:35 2019 +0000 drivers: thermal: tsens: fix potential integer overflow on multiply Currently a multiply operation is being performed on two int values and the result is being assigned to a u64, presumably because the end result is expected to be probably larger than an int. However, because the multiply is an int multiply one can get overflow. Avoid the overflow by casting degc to a u64 to force a u64 multiply. Also use div_u64 for the divide as suggested by Daniel Lezcano. Addresses-Coverity: ("Unintentional integer overflow") Fixes: fbfe1a042cfd ("drivers: thermal: tsens: Add interrupt support") Signed-off-by: Colin Ian King Signed-off-by: Daniel Lezcano Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20191101100035.25502-1-colin.king@canonical.com commit 0cac7559f1b67aa29879ead6b6b6a856d963905f Author: Daniel Lezcano Date: Wed Oct 30 10:10:37 2019 +0100 thermal: cpu_cooling: Reorder the header file As the conditions are simplified and unified, it is useless to have different blocks of definitions under the same compiler condition, let's merge the blocks. There is no functional change. Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20191030091038.678-2-daniel.lezcano@linaro.org commit f5bf3c06730c1bd85a3c064357de433736facc5a Author: Daniel Lezcano Date: Wed Oct 30 10:10:36 2019 +0100 thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF The option CONFIG_CPU_THERMAL depends on CONFIG_OF in the Kconfig. It it pointless to check if CONFIG_OF is set in the header file as this is always true if CONFIG_CPU_THERMAL is true. Remove it. Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20191030091038.678-1-daniel.lezcano@linaro.org commit 76bf653f08dd3616ad067980f52d462a97e5257b Author: Tian Tao Date: Sat Oct 26 09:04:35 2019 +0800 thermal: no need to set .owner when using module_platform_driver the module_platform_driver will call platform_driver_register. and It will set the .owner to THIS_MODULE Signed-off-by: Tian Tao Acked-by: Talel Shenhar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1572051875-35861-1-git-send-email-tiantao6@huawei.com commit c7071f4914a40ae0027f4bc6d13f2a4eea7cab70 Author: Colin Ian King Date: Tue Oct 22 12:18:06 2019 +0100 thermal: qcom: tsens-v1: Fix kfree of a non-pointer value Currently the kfree of pointer qfprom_cdata is kfreeing an error value that has been cast to a pointer rather than a valid address. Fix this by removing the kfree. Fixes: 95ededc17e4e ("thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976") Signed-off-by: Colin Ian King Tested-by: AngeloGioacchino Del Regno Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191022111806.23143-1-colin.king@canonical.com commit 11ff4bdd1ab4a6c75d49fbd752a1d9b79e8ca8cb Author: Amit Kucheria Date: Mon Oct 21 17:45:15 2019 +0530 cpufreq: qcom-hw: Move driver initialization earlier Allow qcom-hw driver to initialize right after the cpufreq and thermal subsystems are initialised in core_initcall so we get earlier access to thermal mitigation. Signed-off-by: Amit Kucheria Acked-by: Daniel Lezcano Acked-by: Taniya Das Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/eacce8d08388b0bdfc908d2701fe7c2b78d90441.1571656015.git.amit.kucheria@linaro.org commit b418bab452cd2a0501bd3f53abb89b80a642702c Author: Amit Kucheria Date: Mon Oct 21 17:45:14 2019 +0530 clk: qcom: Initialize clock drivers earlier Initialize the clock drivers on sdm845 and qcs404 in core_initcall so we can have earlier access to cpufreq during booting. Signed-off-by: Amit Kucheria Acked-by: Stephen Boyd Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/75ae9c3a1c0e69b95818c6ffe7181fdeaaf2d70e.1571656015.git.amit.kucheria@linaro.org commit 57db08f41b2a8f6c22036290400a59a2b3ff3390 Author: Amit Kucheria Date: Mon Oct 21 17:45:13 2019 +0530 cpufreq: Initialize cpufreq-dt driver earlier This allows HW drivers that depend on cpufreq-dt to initialize earlier. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/353c745d4ca1feff600bd44154c01c013f185ca4.1571656015.git.amit.kucheria@linaro.org commit 3f6ec871e1c2b360aaf022e90bb99dcc016b3874 Author: Amit Kucheria Date: Mon Oct 21 17:45:12 2019 +0530 cpufreq: Initialize the governors in core_initcall Initialize the cpufreq governors earlier to allow for earlier performance control during the boot process. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Reviewed-by: Rafael J. Wysocki Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/b98eae9b44eb2f034d7f5d12a161f5f831be1eb7.1571656015.git.amit.kucheria@linaro.org commit ae16a688f6916e06ef48d0ae9b608c02d0e507cd Author: Amit Kucheria Date: Mon Oct 21 17:45:11 2019 +0530 thermal: Initialize thermal subsystem earlier Now that the thermal framework is built-in, in order to facilitate thermal mitigation as early as possible in the boot cycle, move the thermal framework initialization to core_initcall. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/f8ff0ab4a8e9c2eca5a26fb2256365b26cb326ce.1571656015.git.amit.kucheria@linaro.org commit f96c8e50152814d05a4002b8c03a80366a27afa3 Author: Amit Kucheria Date: Mon Oct 21 17:45:10 2019 +0530 thermal: Remove netlink support There are no users of netlink messages for thermal inside the kernel. Remove the code and adjust the documentation. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/8ff02cf62186c7a54fff325fad40a2e9ca3affa6.1571656014.git.amit.kucheria@linaro.org commit da73f9b898b26fadb278a7538e5a9ceb24ea031f Author: AngeloGioacchino Del Regno Date: Sat Oct 5 12:41:32 2019 +0200 dt: thermal: tsens: Document compatible for MSM8976/56 Support for MSM8976 and MSM8956 (having tsens ip version 1) has been added to the qcom tsens driver: document the addition here. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191005104133.30297-3-kholk11@gmail.com commit 0e580290170dfb438d911c306b27d89d5b99c1d9 Author: AngeloGioacchino Del Regno Date: Sat Oct 5 12:41:31 2019 +0200 thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976 Add support for reading calibrated value from thermistors in MSM8956, MSM8976 and their APQ variants. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191005104133.30297-2-kholk11@gmail.com commit 573ae2d9e00c72dcbe35803e20ce2b11334e43cd Author: Guillaume La Roque Date: Fri Oct 4 11:01:14 2019 +0200 MAINTAINERS: add entry for Amlogic Thermal driver Add myself as maintainer for Amlogic Thermal driver. Reviewed-by: Neil Armstrong Signed-off-by: Guillaume La Roque Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191004090114.30694-8-glaroque@baylibre.com commit 421eda108e6c63a72feb178c441bb769d4076836 Author: Guillaume La Roque Date: Fri Oct 4 11:01:09 2019 +0200 thermal: amlogic: Add thermal driver to support G12 SoCs Amlogic G12A and G12B SoCs integrate two thermal sensors with the same design. One is located close to the DDR controller and the other one is located close to the PLLs (between the CPU and GPU). The calibration data for each of the thermal sensors instance is stored in a different location within the AO region. Implement reading the temperature from each thermal sensor. The IP block has more functionality, which may be added to this driver in the future: - chip reset when the temperature exceeds a configurable threshold - up to four interrupts when the temperature has risen above a configurable threshold - up to four interrupts when the temperature has fallen below a configurable threshold Tested-by: Christian Hewitt Tested-by: Kevin Hilman Reviewed-by: Amit Kucheria Signed-off-by: Guillaume La Roque Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191004090114.30694-3-glaroque@baylibre.com commit 66798674026398e10f6a0bce7ffb3f5ced565847 Author: Guillaume La Roque Date: Fri Oct 4 11:01:08 2019 +0200 dt-bindings: thermal: Add DT bindings documentation for Amlogic Thermal Adding the devicetree binding documentation for the Amlogic temperature sensor found in the Amlogic Meson G12A and G12B SoCs. Reviewed-by: Rob Herring Reviewed-by: Amit Kucheria Tested-by: Christian Hewitt Tested-by: Kevin Hilman Signed-off-by: Guillaume La Roque Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191004090114.30694-2-glaroque@baylibre.com commit 634e11d5b450a9bcc921219611c5d2cdc0f9066e Author: Amit Kucheria Date: Fri Nov 1 00:07:39 2019 +0530 drivers: thermal: tsens: Add interrupt support Depending on the IP version, TSENS supports upper, lower and critical threshold interrupts. We only add support for upper and lower threshold interrupts for now. TSENSv2 has an irq [status|clear|mask] bit tuple for each sensor while earlier versions only have a single bit per sensor to denote status and clear. These differences are handled transparently by the interrupt handler. At each interrupt, we reprogram the new upper and lower threshold in the .set_trip callback. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/7508ba143f144407e5dd546107ddae65c380a76f.1572526427.git.amit.kucheria@linaro.org commit bd93ee3cb43b6a0ab4a78edd9e26dcda01b3b77e Author: Amit Kucheria Date: Fri Nov 1 00:07:38 2019 +0530 drivers: thermal: tsens: Create function to return sign-extended temperature Hide the details of how to convert values read from TSENS HW to mCelsius behind a function. All versions of the IP can be supported as a result. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/0689917475cf83b7e01f6978504fd37352a5e3ca.1572526427.git.amit.kucheria@linaro.org commit a877e768f6552126603b5e88d3ad18c6f7ca2cf7 Author: Amit Kucheria Date: Fri Nov 1 00:07:31 2019 +0530 dt-bindings: thermal: tsens: Convert over to a yaml schema Older IP only supports the 'uplow' interrupt, but newer IP supports 'uplow' and 'critical' interrupts. Document interrupt support in the tsens driver by converting over to a YAML schema. Suggested-by: Stephen Boyd Signed-off-by: Amit Kucheria Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/d519be4c7198f47c3661f7326d1a724b97dc4973.1572526427.git.amit.kucheria@linaro.org commit 7c938f4837ab469183e1281d8525ab428f996e76 Author: Amit Kucheria Date: Fri Nov 1 00:07:28 2019 +0530 drivers: thermal: tsens: Add debugfs support Dump some basic version info and sensor details into debugfs. Example from qcs404 below: --(/sys/kernel/debug) $ ls tsens/ 4a9000.thermal-sensor version --(/sys/kernel/debug) $ cat tsens/version 1.4.0 --(/sys/kernel/debug) $ cat tsens/4a9000.thermal-sensor/sensors max: 11 num: 10 id slope offset ------------------------ 0 3200 404000 1 3200 404000 2 3200 404000 3 3200 404000 4 3200 404000 5 3200 404000 6 3200 404000 7 3200 404000 8 3200 404000 9 3200 404000 Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/16e39c1bbfc18b5cf6274620cd72cc63205f53a5.1572526427.git.amit.kucheria@linaro.org commit 3795ad5e2669082ff4e4b5a2c9e002a0e8fe66b2 Author: Amit Kucheria Date: Fri Nov 1 00:07:27 2019 +0530 drivers: thermal: tsens: Add __func__ identifier to debug statements Printing the function name when enabling debugging makes logs easier to read. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/18717de35f31098d3ebc12564c2767b6d54d37d8.1572526427.git.amit.kucheria@linaro.org commit 0e9c0bc73082403ec13361c4af9e9243d88f9580 Author: Amit Kucheria Date: Fri Nov 1 00:07:26 2019 +0530 drivers: thermal: tsens: Simplify code flow in tsens_probe Move platform_set_drvdata up to avoid an extra 'if (ret)' check after the call to tsens_register. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/184422dcc1c12553e71a58c62e01425fd7d1172a.1572526427.git.amit.kucheria@linaro.org commit 8b71bce407b3f13c5db3795ee469da7773a7d230 Author: Amit Kucheria Date: Fri Nov 1 00:07:25 2019 +0530 drivers: thermal: tsens: Get rid of id field in tsens_sensor There are two fields - id and hw_id - to track what sensor an action was to performed on. This was because the sensors connected to a TSENS IP might not be contiguous i.e. 1, 2, 4, 5 with 3 being skipped. This causes confusion in the code which uses hw_id sometimes and id other times (tsens_get_temp, tsens_get_trend). Switch to only using the hw_id field to track the physical ID of the sensor. When we iterate through all the sensors connected to an IP block, we use an index i to loop through the list of sensors, and then return the actual hw_id that is registered on that index. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/30206cd47d303d2dcaef87f4e3c7173481a0bddd.1572526427.git.amit.kucheria@linaro.org commit 9809797b932e7d0485a37bd8a14bccb2c893b6c6 Author: Yuantian Tang Date: Fri Oct 11 10:05:34 2019 +0800 thermal: qoriq: add thermal monitor unit version 2 support Thermal Monitor Unit v2 is introduced on new Layscape SoC. Compared to v1, TMUv2 has a little different register layout and digital output is fairly linear. Signed-off-by: Yuantian Tang Reviewed-by: Anson Huang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191011020534.334-1-andy.tang@nxp.com commit 86bd20a5a518c0690bfca2cc64bc28af0e46863e Author: Hsin-Yi Wang Date: Tue Sep 10 15:59:07 2019 +0800 thermal-generic-adc: Silent error message for EPROBE_DEFER If devm_iio_channel_get() or devm_thermal_zone_of_sensor_register() fail with EPROBE_DEFER, we shouldn't print an error message, as the device will be probed again later. Signed-off-by: Hsin-Yi Wang Reviewed-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20190910075907.132200-1-hsinyi@chromium.org commit 554cee820e22847ddb0925d5e3b3ea8b2a1f840c Author: Biju Das Date: Mon Sep 23 15:23:09 2019 +0100 dt-bindings: thermal: rcar-gen3-thermal: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1569248589-52372-1-git-send-email-biju.das@bp.renesas.com commit 1a005912410f5026d59620fdcd4340c1758ec0a3 Author: Biju Das Date: Mon Sep 23 15:25:46 2019 +0100 thermal: rcar_gen3_thermal: Add r8a774b1 support Add r8a774b1 specific compatible string. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1569248746-56718-1-git-send-email-biju.das@bp.renesas.com commit 85d31dd07002315c0d1816543fdc392c8cc6b73a Author: Martin KaFai Lau Date: Wed Nov 6 17:46:40 2019 -0800 bpf: Account for insn->off when doing bpf_probe_read_kernel In the bpf interpreter mode, bpf_probe_read_kernel is used to read from PTR_TO_BTF_ID's kernel object. It currently missed considering the insn->off. This patch fixes it. Fixes: 2a02759ef5f8 ("bpf: Add support for BTF pointers to interpreter") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191107014640.384083-1-kafai@fb.com commit 1c8dd9cb4697a425ecb9e9fb8a6c05955642e141 Author: Eric Dumazet Date: Wed Nov 6 20:52:40 2019 -0800 net_sched: gen_estimator: extend packet counter to 64bit I forgot to change last_packets field in struct net_rate_estimator. Without this fix, rate estimators would misbehave after more than 2^32 packets have been sent. Another solution would be to be careful and only use the 32 least significant bits of packets counters, but we have a hole in net_rate_estimator structure and this looks easier to read/maintain. Fixes: d0083d98f685 ("net_sched: extend packet counter to 64bit") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 2d791e3bf218a8880e306eb2fa79dcf1429d01b3 Author: Chenwandun Date: Thu Nov 7 09:39:49 2019 +0800 dpaa2-ptp: fix compile error phylink_set_port_modes will be compiled if CONFIG_PHYLINK enabled, dpaa2_mac_validate will be compiled if CONFIG_FSL_DPAA2_ETH enabled, it should select CONFIG_PHYLINK when dpaa2_mac_validate call phylink_set_port_modes drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.o: In function `dpaa2_mac_validate': dpaa2-mac.c:(.text+0x3a1): undefined reference to `phylink_set_port_modes' drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.o: In function `dpaa2_mac_connect': dpaa2-mac.c:(.text+0x91a): undefined reference to `phylink_create' dpaa2-mac.c:(.text+0x94e): undefined reference to `phylink_of_phy_connect' dpaa2-mac.c:(.text+0x97f): undefined reference to `phylink_destroy' drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.o: In function `dpaa2_mac_disconnect': dpaa2-mac.c:(.text+0xa9f): undefined reference to `phylink_disconnect_phy' dpaa2-mac.c:(.text+0xab0): undefined reference to `phylink_destroy' make: *** [vmlinux] Error 1 Fixes: 719479230893 ("dpaa2-eth: add MAC/PHY support through phylink") Signed-off-by: Chenwandun Signed-off-by: David S. Miller commit fdc66c3da93b6fa51192c4b33cf28c75b7141e67 Merge: 64a26007a8f5 039c60c5970f Author: David S. Miller Date: Wed Nov 6 21:45:01 2019 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2019-11-06 This series contains updates to ice driver only. Scott adds ethtool -m support so that we can read eeprom data on SFP/OSFP modules. Anirudh updates the return value to properly reflect when SRIOV is not supported. Md Fahad updates the driver to handle a change in the NVM, where the boot configuration section was moved to the Preserved Field Area (PFA) of the NVM. Paul resolves an issue when DCBx requests non-contiguous TCs, transmit hangs could occur, so configure a default traffic class (TC0) in these cases to prevent traffic hangs. Adds a print statement to notify the user when unsupported modules are inserted. Bruce fixes up the driver unload code flow to ensure we do not clear the interrupt scheme until the reset is complete, otherwise a hardware error may occur. Dave updates the DCB initialization to set is_sw_lldp boolean when the firmware has been detected to be in an untenable state. This will ensure that the firmware is in a known state. Michal saves off the PCI state and I/O BARs address after PCI bus reset so that after the reset, device registers can be read. Also adds a NULL pointer check to prevent a potential kernel panic. Mitch resolves an issue where VF's on PF's other than 0 were not seeing resets by using the per-PF VF ID instead of the absolute VF ID. Krzysztof does some code cleanup to remove a unneeded wrapper and reduces the code complexity. Brett reduces confusion by changing the name of ice_vc_dis_vf() to ice_vc_reset_vf() to better describe what the function is actually doing. v2: dropped patch 3 "ice: Add support for FW recovery mode detection" from the origin al series, while Ani makes changes based on community feedback to implement devlink into the changes. v3: dropped patch 1 "ice: implement set_eeprom functionality" due to a bug found and additional changes will be needed when Ani implements devlink in the driver. ==================== Signed-off-by: David S. Miller commit 64a26007a8f51442a9efddf7d98d50e2ca4349cd Author: Andrew Lunn Date: Thu Nov 7 01:18:00 2019 +0100 net: dsa: mv8e6xxx: Fix stub function parameters mv88e6xxx_g2_atu_stats_get() takes two parameters. Make the stub function also take two, otherwise we get compile errors. Fixes: c5f299d59261 ("net: dsa: mv88e6xxx: global1_atu: Add helper for get next") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 16cf4222beedb8f20ee6ff0927f41ce96c1f4464 Merge: a5a7daa52edb ed7fa2ad4055 Author: David S. Miller Date: Wed Nov 6 21:42:06 2019 -0800 Merge branch 'net-phy-at803x-device-tree-binding' Michael Walle says: ==================== net: phy: at803x device tree binding Adds a device tree binding to configure the clock and the RGMII voltage. Changes since v1: - rebased to latest net-next - renamed "Atheros" to "Qualcomm Atheros" - add a new patch to remove config_init() from AR9331 Changes since the RFC: - renamed the Kconfig entry to "Qualcomm Atheros.." and reordered the item - renamed the prefix from atheros to qca - use the correct name AR803x (instead of AT803x) in new files and dt-bindings. - listed the PHY maintainers in the new schema. Hopefully, thats ok. - fixed a typo in the bindings schema - run dtb_checks and dt_binding_check and fixed the schema - dropped the rgmii-io-1v8 property; instead provide two regulators vddh and vddio, add one consumer vddio-supply - fix the clock settings for the AR8030/AR8035 - only the AR8031 supports chaning the LDO and the PLL mode in software. Check if we have the correct PHY. - new patch to mention the AR8033 which is the same as the AR8031 just without PTP support - new patch which corrects any displayed PHY names and comments. Be consistent. ==================== Signed-off-by: David S. Miller commit ed7fa2ad40556557cc0ba12649191680d992ed58 Author: Michael Walle Date: Wed Nov 6 23:36:17 2019 +0100 net: phy: at803x: remove config_init for AR9331 According to its datasheet, the internal PHY doesn't have debug registers nor MMDs. Since config_init() only configures delays and clocks and so on in these registers it won't be needed on this PHY. Remove it. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 96c3671204b86042cd69dfdf06f4f65997cb9452 Author: Michael Walle Date: Wed Nov 6 23:36:16 2019 +0100 net: phy: at803x: fix the PHY names Fix at least the displayed strings. The actual name of the chip is AR803x. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 428061f70f1aa3a56fdf53d57adbac0caef3e663 Author: Michael Walle Date: Wed Nov 6 23:36:15 2019 +0100 net: phy: at803x: mention AR8033 as same as AR8031 The AR8033 is the AR8031 without PTP support. All other registers are the same. Unfortunately, they share the same PHY ID. Therefore, we cannot distinguish between the one with PTP support and the one without. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2f664823a47021ae029fe91272adbf0a223e477f Author: Michael Walle Date: Wed Nov 6 23:36:14 2019 +0100 net: phy: at803x: add device tree binding Add support for configuring the CLK_25M pin as well as the RGMII I/O voltage by the device tree. Signed-off-by: Michael Walle Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2c63221cd9e5c0dad0424029aeb1c40faada8330 Author: Michael Walle Date: Wed Nov 6 23:36:13 2019 +0100 dt-bindings: net: phy: Add support for AT803X Document the Atheros AR803x PHY bindings. Signed-off-by: Michael Walle Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4985dffced1471385af234b7d4aab4830df78121 Author: Michael Walle Date: Wed Nov 6 23:36:12 2019 +0100 net: phy: at803x: fix Kconfig description The name of the PHY is actually AR803x not AT803x. Additionally, add the name of the vendor and mention the AR8031 support. Signed-off-by: Michael Walle Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a5a7daa52edb5197a3b696afee13ef174dc2e993 Author: Eric Dumazet Date: Wed Nov 6 12:59:33 2019 -0800 tcp: fix data-race in tcp_recvmsg() Reading tp->recvmsg_inq after socket lock is released raises a KCSAN warning [1] Replace has_tss & has_cmsg by cmsg_flags and make sure to not read tp->recvmsg_inq a second time. [1] BUG: KCSAN: data-race in tcp_chrono_stop / tcp_recvmsg write to 0xffff888126adef24 of 2 bytes by interrupt on cpu 0: tcp_chrono_set net/ipv4/tcp_output.c:2309 [inline] tcp_chrono_stop+0x14c/0x280 net/ipv4/tcp_output.c:2338 tcp_clean_rtx_queue net/ipv4/tcp_input.c:3165 [inline] tcp_ack+0x274f/0x3170 net/ipv4/tcp_input.c:3688 tcp_rcv_established+0x37e/0xf50 net/ipv4/tcp_input.c:5696 tcp_v4_do_rcv+0x381/0x4e0 net/ipv4/tcp_ipv4.c:1561 tcp_v4_rcv+0x19dc/0x1bb0 net/ipv4/tcp_ipv4.c:1942 ip_protocol_deliver_rcu+0x4d/0x420 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x110/0x140 net/ipv4/ip_input.c:231 NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] ip_local_deliver+0x133/0x210 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:442 [inline] ip_rcv_finish+0x121/0x160 net/ipv4/ip_input.c:413 NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] ip_rcv+0x18f/0x1a0 net/ipv4/ip_input.c:523 __netif_receive_skb_one_core+0xa7/0xe0 net/core/dev.c:5010 __netif_receive_skb+0x37/0xf0 net/core/dev.c:5124 netif_receive_skb_internal+0x59/0x190 net/core/dev.c:5214 napi_skb_finish net/core/dev.c:5677 [inline] napi_gro_receive+0x28f/0x330 net/core/dev.c:5710 read to 0xffff888126adef25 of 1 bytes by task 7275 on cpu 1: tcp_recvmsg+0x77b/0x1a30 net/ipv4/tcp.c:2187 inet_recvmsg+0xbb/0x250 net/ipv4/af_inet.c:838 sock_recvmsg_nosec net/socket.c:871 [inline] sock_recvmsg net/socket.c:889 [inline] sock_recvmsg+0x92/0xb0 net/socket.c:885 sock_read_iter+0x15f/0x1e0 net/socket.c:967 call_read_iter include/linux/fs.h:1889 [inline] new_sync_read+0x389/0x4f0 fs/read_write.c:414 __vfs_read+0xb1/0xc0 fs/read_write.c:427 vfs_read fs/read_write.c:461 [inline] vfs_read+0x143/0x2c0 fs/read_write.c:446 ksys_read+0xd5/0x1b0 fs/read_write.c:587 __do_sys_read fs/read_write.c:597 [inline] __se_sys_read fs/read_write.c:595 [inline] __x64_sys_read+0x4c/0x60 fs/read_write.c:595 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 7275 Comm: sshd Not tainted 5.4.0-rc3+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Fixes: b75eba76d3d7 ("tcp: send in-queue bytes in cmsg upon read") Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Reported-by: syzbot Signed-off-by: David S. Miller commit 9ed498c6280a2f2b51d02df96df53037272ede49 Author: Eric Dumazet Date: Wed Nov 6 10:04:11 2019 -0800 net: silence data-races on sk_backlog.tail sk->sk_backlog.tail might be read without holding the socket spinlock, we need to add proper READ_ONCE()/WRITE_ONCE() to silence the warnings. KCSAN reported : BUG: KCSAN: data-race in tcp_add_backlog / tcp_recvmsg write to 0xffff8881265109f8 of 8 bytes by interrupt on cpu 1: __sk_add_backlog include/net/sock.h:907 [inline] sk_add_backlog include/net/sock.h:938 [inline] tcp_add_backlog+0x476/0xce0 net/ipv4/tcp_ipv4.c:1759 tcp_v4_rcv+0x1a70/0x1bd0 net/ipv4/tcp_ipv4.c:1947 ip_protocol_deliver_rcu+0x4d/0x420 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x110/0x140 net/ipv4/ip_input.c:231 NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] ip_local_deliver+0x133/0x210 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:442 [inline] ip_rcv_finish+0x121/0x160 net/ipv4/ip_input.c:413 NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] ip_rcv+0x18f/0x1a0 net/ipv4/ip_input.c:523 __netif_receive_skb_one_core+0xa7/0xe0 net/core/dev.c:4929 __netif_receive_skb+0x37/0xf0 net/core/dev.c:5043 netif_receive_skb_internal+0x59/0x190 net/core/dev.c:5133 napi_skb_finish net/core/dev.c:5596 [inline] napi_gro_receive+0x28f/0x330 net/core/dev.c:5629 receive_buf+0x284/0x30b0 drivers/net/virtio_net.c:1061 virtnet_receive drivers/net/virtio_net.c:1323 [inline] virtnet_poll+0x436/0x7d0 drivers/net/virtio_net.c:1428 napi_poll net/core/dev.c:6311 [inline] net_rx_action+0x3ae/0xa90 net/core/dev.c:6379 __do_softirq+0x115/0x33f kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0xbb/0xe0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] do_IRQ+0xa6/0x180 arch/x86/kernel/irq.c:263 ret_from_intr+0x0/0x19 native_safe_halt+0xe/0x10 arch/x86/kernel/paravirt.c:71 arch_cpu_idle+0x1f/0x30 arch/x86/kernel/process.c:571 default_idle_call+0x1e/0x40 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x1af/0x280 kernel/sched/idle.c:263 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:355 start_secondary+0x208/0x260 arch/x86/kernel/smpboot.c:264 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241 read to 0xffff8881265109f8 of 8 bytes by task 8057 on cpu 0: tcp_recvmsg+0x46e/0x1b40 net/ipv4/tcp.c:2050 inet_recvmsg+0xbb/0x250 net/ipv4/af_inet.c:838 sock_recvmsg_nosec net/socket.c:871 [inline] sock_recvmsg net/socket.c:889 [inline] sock_recvmsg+0x92/0xb0 net/socket.c:885 sock_read_iter+0x15f/0x1e0 net/socket.c:967 call_read_iter include/linux/fs.h:1889 [inline] new_sync_read+0x389/0x4f0 fs/read_write.c:414 __vfs_read+0xb1/0xc0 fs/read_write.c:427 vfs_read fs/read_write.c:461 [inline] vfs_read+0x143/0x2c0 fs/read_write.c:446 ksys_read+0xd5/0x1b0 fs/read_write.c:587 __do_sys_read fs/read_write.c:597 [inline] __se_sys_read fs/read_write.c:595 [inline] __x64_sys_read+0x4c/0x60 fs/read_write.c:595 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 8057 Comm: syz-fuzzer Not tainted 5.4.0-rc6+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 226df3ef1c02a99e7303d91dc27267fae529a820 Author: Ioana Ciornei Date: Wed Nov 6 19:06:50 2019 +0200 dpaa2-eth: fix an always true condition in dpaa2_mac_get_if_mode Convert the phy_mode() function to return the if_mode through an argument, similar to the new form of of_get_phy_mode(). This will help with handling errors in a common manner and also will fix an always true condition. Fixes: 0c65b2b90d13 ("net: of_get_phy_mode: Change API to solve int/unit warnings") Reported-by: Dan Carpenter Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 90ce9f23a886bdef7a4b7a9bd52c7a50a6a81635 Author: Tonghao Zhang Date: Thu Nov 7 00:34:28 2019 +0800 net: openvswitch: select vport upcall portid directly The commit 69c51582ff786 ("dpif-netlink: don't allocate per thread netlink sockets"), in Open vSwitch ovs-vswitchd, has changed the number of allocated sockets to just one per port by moving the socket array from a per handler structure to a per datapath one. In the kernel datapath, a vport will have only one socket in most case, if so select it directly in fast-path. Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit eb34e98baf4ce269423948dacefea6747e963b48 Author: Wei Yongjun Date: Wed Nov 6 15:54:49 2019 +0000 net: axienet: Fix error return code in axienet_probe() In the DMA memory resource get failed case, the error is not set and 0 will be returned. Fix it by removing redundant check since devm_ioremap_resource() will handle it. Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional") Signed-off-by: Wei Yongjun Reviewed-by: Radhey Shyam Pandey Signed-off-by: David S. Miller commit 1dcff44a9d2b74b3de2c854bbf11a5f765e7ba77 Author: Wei Yongjun Date: Wed Nov 6 14:59:21 2019 +0000 net: aquantia: fix return value check in aq_ptp_init() Function ptp_clock_register() returns ERR_PTR() and never returns NULL. The NULL test should be removed. Signed-off-by: Wei Yongjun Acked-by: Igor Russkikh Signed-off-by: David S. Miller commit b97fa0b54447107e572ac7ba6ad0f0fd64170104 Author: Wei Yongjun Date: Wed Nov 6 14:33:09 2019 +0000 ptp: ptp_clockmatrix: Fix missing unlock on error in idtcm_probe() Add the missing unlock before return from function idtcm_probe() in the error handling case. Fixes: 3a6ba7dc7799 ("ptp: Add a ptp clock driver for IDT ClockMatrix.") Signed-off-by: Wei Yongjun Reviewed-by: Vincent Cheng Signed-off-by: David S. Miller commit d0d605c5e10af0714b7b7ed5e4d3918b308c28c0 Author: Tuong Lien Date: Wed Nov 6 18:12:17 2019 +0700 tipc: eliminate the dummy packet in link synching When preparing tunnel packets for the link failover or synchronization, as for the safe algorithm, we added a dummy packet on the pair link but never sent it out. In the case of failover, the pair link will be reset anyway. But for link synching, it will always result in retransmission of the dummy packet after that. We have also observed that such the retransmission at the early stage when a new node comes in a large cluster will take some time and hard to be done, leading to the repeated retransmit failures and the link is reset. Since in commit 4929a932be33 ("tipc: optimize link synching mechanism") we have already built a dummy 'TUNNEL_PROTOCOL' message on the new link for the synchronization, there's no need for the dummy on the pair one, this commit will skip it when the new mechanism takes in place. In case nothing exists in the pair link's transmq, the link synching will just start and stop shortly on the peer side. The patch is backward compatible. Acked-by: Jon Maloy Tested-by: Hoang Le Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 3924f72a3a1e568f797a72ed964f77eeea169712 Merge: 426071f1f399 b0a21810bd5e Author: David S. Miller Date: Wed Nov 6 21:14:22 2019 -0800 Merge branch 'lwtunnel-add-ip-and-ip6-options-setting-and-dumping' Xin Long says: ==================== lwtunnel: add ip and ip6 options setting and dumping With this patchset, users can configure options by ip route encap for geneve, vxlan and ersapn lwtunnel, like: # ip r a 1.1.1.0/24 encap ip id 1 geneve class 0 type 0 \ data "1212121234567890" dst 10.1.0.2 dev geneve1 # ip r a 1.1.1.0/24 encap ip id 1 vxlan gbp 456 \ dst 10.1.0.2 dev erspan1 # ip r a 1.1.1.0/24 encap ip id 1 erspan ver 1 idx 123 \ dst 10.1.0.2 dev erspan1 iproute side patch is attached on the reply of this mail. ==================== Signed-off-by: David S. Miller commit b0a21810bd5e1f92e3379899cc8ca9fe144ee8b3 Author: Xin Long Date: Wed Nov 6 17:01:07 2019 +0800 lwtunnel: add options setting and dumping for erspan Based on the code framework built on the last patch, to support setting and dumping for vxlan, we only need to add ip_tun_parse_opts_erspan() for .build_state and ip_tun_fill_encap_opts_erspan() for .fill_encap and if (tun_flags & TUNNEL_ERSPAN_OPT) for .get_encap_size. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit edf31cbb1502481da181a09148adb33e12599185 Author: Xin Long Date: Wed Nov 6 17:01:06 2019 +0800 lwtunnel: add options setting and dumping for vxlan Based on the code framework built on the last patch, to support setting and dumping for vxlan, we only need to add ip_tun_parse_opts_vxlan() for .build_state and ip_tun_fill_encap_opts_vxlan() for .fill_encap and if (tun_flags & TUNNEL_VXLAN_OPT) for .get_encap_size. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 4ece477870774698e6e73d5821a3dd1605ca123b Author: Xin Long Date: Wed Nov 6 17:01:05 2019 +0800 lwtunnel: add options setting and dumping for geneve To add options setting and dumping, .build_state(), .fill_encap() and .get_encap_size() in ip_tun_lwt_ops needs to be extended: ip_tun_build_state(): ip_tun_parse_opts(): ip_tun_parse_opts_geneve() ip_tun_fill_encap_info(): ip_tun_fill_encap_opts(): ip_tun_fill_encap_opts_geneve() ip_tun_encap_nlsize() ip_tun_opts_nlsize(): if (tun_flags & TUNNEL_GENEVE_OPT) ip_tun_parse_opts(), ip_tun_fill_encap_opts() and ip_tun_opts_nlsize() processes LWTUNNEL_IP_OPTS. ip_tun_parse_opts_geneve(), ip_tun_fill_encap_opts_geneve() and if (tun_flags & TUNNEL_GENEVE_OPT) processes LWTUNNEL_IP_OPTS_GENEVE. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 0eb8eb2f96851e49d54c301aa3b0672706e6b171 Author: Xin Long Date: Wed Nov 6 17:01:04 2019 +0800 lwtunnel: add options process for cmp_encap When comparing two tun_info, dst_cache member should have been skipped, as dst_cache is a per cpu pointer and they are always different values even in two tun_info with the same keys. So this patch is to skip dst_cache member and compare the key, mode and options_len only. For the future opts setting support, also to compare options. Fixes: 2d79849903e0 ("lwtunnel: ip tunnel: fix multiple routes with different encap") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit f52f11ec8ad49f697e5158ff87c39b44dab45f51 Author: Xin Long Date: Wed Nov 6 17:01:03 2019 +0800 lwtunnel: add options process for arp request Without options copied to the dst tun_info in iptunnel_metadata_reply() called by arp_process for handling arp_request, the generated arp_reply packet may be dropped or sent out with wrong options for some tunnels like erspan and vxlan, and the traffic will break. Fixes: 63d008a4e9ee ("ipv4: send arp replies to the correct tunnel") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit dee58fe8dc57dfd5a760ad05c3526787f832ad78 Author: Michał Mirosław Date: Thu Nov 7 04:32:53 2019 +0100 ata_piix: remove open-coded dmi_match(DMI_OEM_STRING) Since de40614de99 ("firmware: dmi_scan: Add DMI_OEM_STRING support to dmi_matches") dmi_check_system() can match OEM_STRINGs itself. Use the feature. Signed-off-by: Michał Mirosław Signed-off-by: Jens Axboe commit 267bc90442aa47002e2991f7d9dd141e168b466b Author: Pavel Begunkov Date: Thu Nov 7 01:41:08 2019 +0300 io_uring: use inlined struct sqe_submit req->submit is always up-to-date, use it directly Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 50585b9a07367b92382c1e975265344daeba78cd Author: Pavel Begunkov Date: Thu Nov 7 01:41:07 2019 +0300 io_uring: Use submit info inlined into req Stack allocated struct sqe_submit is passed down to the submission path along with a request (a.k.a. struct io_kiocb), and will be copied into req->submit for async requests. As space for it is already allocated, fill req->submit in the first place instead of using on-stack one. As a result: 1. sqe->submit is the only place for sqe_submit and is always valid, so we don't need to track which one to use. 2. don't need to copy in case of async 3. allows to simplify the code by not carrying it as an argument all the way down 4. allows to reduce number of function arguments / potentially improve spilling The downside is that stack is most probably be cached, that's not true for just allocated memory for a request. Another concern is cache pollution. Though, a request would be touched and fetched along with req->submit at some point anyway, so shouldn't be a problem. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 196be95cd5572078be9deb81cbea145fab246029 Author: Pavel Begunkov Date: Thu Nov 7 01:41:06 2019 +0300 io_uring: allocate io_kiocb upfront Let io_submit_sqes() to allocate io_kiocb before fetching an sqe. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 5bece3d66153d78f1fd62108a1553c3f15e71412 Author: Daniel Axtens Date: Tue Aug 20 12:49:41 2019 +1000 powerpc: support KASAN instrumentation of bitops The powerpc-specific bitops are not being picked up by the KASAN test suite. Instrumentation is done via the bitops/instrumented-{atomic,lock}.h headers. They require that arch-specific versions of bitop functions are renamed to arch_*. Do this renaming. For clear_bit_unlock_is_negative_byte, the current implementation uses the PG_waiters constant. This works because it's a preprocessor macro - so it's only actually evaluated in contexts where PG_waiters is defined. With instrumentation however, it becomes a static inline function, and all of a sudden we need the actual value of PG_waiters. Because of the order of header includes, it's not available and we fail to compile. Instead, manually specify that we care about bit 7. This is still correct: bit 7 is the bit that would mark a negative byte. While we're at it, replace __inline__ with inline across the file. Reviewed-by: Christophe Leroy Signed-off-by: Daniel Axtens Tested-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190820024941.12640-2-dja@axtens.net commit 81d2c6f81996e01fbcd2b5aeefbb519e21c806e9 Author: Daniel Axtens Date: Tue Aug 20 12:49:40 2019 +1000 kasan: support instrumented bitops combined with generic bitops Currently bitops-instrumented.h assumes that the architecture provides atomic, non-atomic and locking bitops (e.g. both set_bit and __set_bit). This is true on x86 and s390, but is not always true: there is a generic bitops/non-atomic.h header that provides generic non-atomic operations, and also a generic bitops/lock.h for locking operations. powerpc uses the generic non-atomic version, so it does not have it's own e.g. __set_bit that could be renamed arch___set_bit. Split up bitops-instrumented.h to mirror the atomic/non-atomic/lock split. This allows arches to only include the headers where they have arch-specific versions to rename. Update x86 and s390. (The generic operations are automatically instrumented because they're written in C, not asm.) Suggested-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Daniel Axtens Acked-by: Marco Elver Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190820024941.12640-1-dja@axtens.net commit 426071f1f3995d7e9603246bffdcbf344cd31719 Author: Hoang Le Date: Wed Nov 6 13:26:10 2019 +0700 tipc: reduce sensitive to retransmit failures With huge cluster (e.g >200nodes), the amount of that flow: gap -> retransmit packet -> acked will take time in case of STATE_MSG dropped/delayed because a lot of traffic. This lead to 1.5 sec tolerance value criteria made link easy failure around 2nd, 3rd of failed retransmission attempts. Instead of re-introduced criteria of 99 faled retransmissions to fix the issue, we increase failure detection timer to ten times tolerance value. Fixes: 77cf8edbc0e7 ("tipc: simplify stale link failure criteria") Acked-by: Jon Maloy Signed-off-by: Hoang Le Acked-by: Jon Signed-off-by: David S. Miller commit 6708ef779249b3d8a7a1b7a52ae0b5e7d5a0a9b2 Author: Hoang Le Date: Wed Nov 6 13:26:09 2019 +0700 tipc: update cluster capabilities if node deleted There are two improvements when re-calculate cluster capabilities: - When deleting a specific down node, need to re-calculate. - In tipc_node_cleanup(), do not need to re-calculate if node is still existing in cluster. Acked-by: Jon Maloy Signed-off-by: Hoang Le Acked-by: Jon Signed-off-by: David S. Miller commit 3c28d99fc62d64a2a9a2d99971bbe9ba17d187cb Author: Francesco Ruggeri Date: Tue Nov 5 14:48:35 2019 -0800 selftest: net: add some traceroute tests Added the following traceroute tests. IPV6: Verify that in this scenario ------------------------ N2 | | ------ ------ N3 ---- | R1 | | R2 |------|H2| ------ ------ ---- | | ------------------------ N1 | ---- |H1| ---- where H1's default route goes through R1 and R1's default route goes through R2 over N2, traceroute6 from H1 to H2 reports R2's address on N2 and not N1. IPV4: Verify that traceroute from H1 to H2 shows 1.0.1.1 in this scenario 1.0.3.1/24 ---- 1.0.1.3/24 1.0.1.1/24 ---- 1.0.2.1/24 1.0.2.4/24 ---- |H1|--------------------------|R1|--------------------------|H2| ---- N1 ---- N2 ---- where net.ipv4.icmp_errors_use_inbound_ifaddr is set on R1 and 1.0.3.1/24 and 1.0.1.1/24 are respectively R1's primary and secondary address on N1. v2: fixed some typos, and have bridge in R1 instead of R2 in IPV6 test. Signed-off-by: Francesco Ruggeri Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 039c60c5970ff7dcf8ff3033397a77f3a283cb3e Author: Anirudh Venkataramanan Date: Wed Oct 9 07:09:53 2019 -0700 ice: Fix return value when SR-IOV is not supported When the device is not capable of supporting SR-IOV -ENODEV is being returned; -EOPNOTSUPP is more appropriate. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ff010eca05fae91e23a88a3b6604b88dd9bef7dc Author: Brett Creeley Date: Wed Oct 9 07:09:52 2019 -0700 ice: Rename VF function ice_vc_dis_vf to match its behavior ice_vc_dis_vf() tells iavf that it's going to perform a reset and then performs a software reset. This is misleading based on the function name because the VF does not get disabled. So fix this by changing the name to ice_vc_reset_vf(). Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 133f4883f9066822a684252f7850cf06db7c10de Author: Krzysztof Kazimierczak Date: Wed Oct 9 07:09:51 2019 -0700 ice: Get rid of ice_cleanup_header ice_cleanup_hdrs() has been stripped of most of its content, it only serves as a wrapper for eth_skb_pad(). We can get rid of it altogether and simplify the codebase. Signed-off-by: Krzysztof Kazimierczak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e18ff118181bca507a9e52effc8dd587224925f5 Author: Paul Greenwalt Date: Wed Oct 9 07:09:50 2019 -0700 ice: print PCI link speed and width Print message to inform user of PCI link speed and width. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5878589dc3182795c9a7f04aec4ae5e0a7636d35 Author: Paul Greenwalt Date: Wed Oct 9 07:09:49 2019 -0700 ice: print unsupported module message Print message to inform user if unsupported module is inserted, and extend the topology / configuration detection. Signed-off-by: Paul Greenwalt Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 395594563b29fbcd8d9a4f0a642484e5d3bb6db1 Author: Mitch Williams Date: Wed Oct 9 07:09:48 2019 -0700 ice: write register with correct offset The VF_MBX_ARQLEN register array is per-PF, not global, so we should not use the absolute VF ID as an index. Instead, use the per-PF VF ID. This fixes an issue with VFs on PFs other than 0 not seeing reset. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit eb0ee8abfeb9ff4b98e8e40217b8667bfb08587a Author: Michal Swiatkowski Date: Wed Oct 9 07:09:47 2019 -0700 ice: Check for null pointer dereference when setting rings Without this check rebuild vsi can lead to kernel panic. Signed-off-by: Michal Swiatkowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 4e56802e0ef3ed92cb28196ebd91d8fa6455c45f Author: Michal Swiatkowski Date: Wed Oct 9 07:09:46 2019 -0700 ice: save PCI state in probe Save state to correct recovery memory and I/O BARs address after PCI bus reset. Without this after reset kernel can't read device registers. Signed-off-by: Michal Swiatkowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b2883dfe1ffce63364ee8ba7476bcd0cf8a63009 Author: Dave Ertman Date: Wed Oct 9 07:09:45 2019 -0700 ice: Adjust DCB INIT for SW mode Adjust ice_init_dcb to set the is_sw_lldp boolean in the case where the FW has been detected to be in an untenable state such that the driver should forcibly make sure it is off. This will ensure that the FW is in a known state. Signed-off-by: Dave Ertman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c6012ac1c35bc49fba0f133dffe233ae7d04a881 Author: Bruce Allan Date: Wed Oct 9 07:09:44 2019 -0700 ice: fix driver unload flow As part of the driver unload flow, a PF reset is issued which may still cause an interrupt to be generated by the device. Do not clear the interrupt scheme until the reset is complete and there are no pending transactions otherwise a hardware error may occur. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit cfbf13674be4ecb9a38048cd228c382825807b12 Author: Paul Greenwalt Date: Wed Oct 9 07:09:43 2019 -0700 ice: handle DCBx non-contiguous TC request If DCBx request non-contiguous TCs, then the driver will configure default traffic class (TC0). This is done to prevent Tx hang since the driver currently does not support non-contiguous TC. Signed-off-by: Paul Greenwalt Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 031f21475297042d86534246c1b2948fc58172b6 Author: Md Fahad Iqbal Polash Date: Wed Oct 9 07:09:42 2019 -0700 ice: Update Boot Configuration Section read of NVM The Boot Configuration Section Block has been moved to the Preserved Field Area (PFA) of NVM. Update the NVM reads that involves Boot Configuration Section. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit a012dca9f7a2bc44b6680c20bec06fe9b2e55d37 Author: Scott W Taylor Date: Wed Oct 9 07:09:40 2019 -0700 ice: add ethtool -m support for reading i2c eeprom modules Implement ethtool -m support to read eeprom data from SFP/QSFP modules. Signed-off-by: Scott W Taylor Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 3edcc5680148d74b370c95272b40a1f215f13e4f Merge: 71c780f1191f 099ecf59f05b Author: David S. Miller Date: Wed Nov 6 16:14:48 2019 -0800 Merge branch 'net-various-KCSAN-inspired-fixes' Eric Dumazet says: ==================== net: various KCSAN inspired fixes This is a series of minor fixes, mostly dealing with lockless accesses to socket 'sk_ack_backlog', 'sk_max_ack_backlog' ane neighbour 'confirmed' fields. ==================== Signed-off-by: David S. Miller commit 099ecf59f05b5f30f42ebac0ab8cb94f9b18c90c Author: Eric Dumazet Date: Tue Nov 5 14:11:54 2019 -0800 net: annotate lockless accesses to sk->sk_max_ack_backlog sk->sk_max_ack_backlog can be read without any lock being held at least in TCP/DCCP cases. We need to use READ_ONCE()/WRITE_ONCE() to avoid load/store tearing and/or potential KCSAN warnings. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 288efe8606b62d0753ba6722b36ef241877251fd Author: Eric Dumazet Date: Tue Nov 5 14:11:53 2019 -0800 net: annotate lockless accesses to sk->sk_ack_backlog sk->sk_ack_backlog can be read without any lock being held. We need to use READ_ONCE()/WRITE_ONCE() to avoid load/store tearing and/or potential KCSAN warnings. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 7976a11b30929871a4c84c3c406d7681a3dbcc10 Author: Eric Dumazet Date: Tue Nov 5 14:11:52 2019 -0800 net: use helpers to change sk_ack_backlog Writers are holding a lock, but many readers do not. Following patch will add appropriate barriers in sk_acceptq_removed() and sk_acceptq_added(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 25c7a6d1f90e208ec27ca854b1381ed39842ec57 Author: Eric Dumazet Date: Tue Nov 5 14:11:51 2019 -0800 net: avoid potential false sharing in neighbor related code There are common instances of the following construct : if (n->confirmed != now) n->confirmed = now; A C compiler could legally remove the conditional. Use READ_ONCE()/WRITE_ONCE() to avoid this problem. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 3828a93f5cfdf5d8a4ff9dead741e9a2871ff57b Author: Eric Dumazet Date: Tue Nov 5 14:11:50 2019 -0800 inet_diag: use jiffies_delta_to_msecs() Use jiffies_delta_to_msecs() to avoid reporting 'infinite' timeouts and to cleanup code. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 9d027e3a83f39b819e908e4e09084277a2e45e95 Author: Eric Dumazet Date: Tue Nov 5 14:11:49 2019 -0800 net: neigh: use long type to store jiffies delta A difference of two unsigned long needs long storage. Fixes: c7fb64db001f ("[NETLINK]: Neighbour table configuration and statistics via rtnetlink") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit cf79e41074b1759d8d264913b6a15b49c49f9b48 Author: Kamel Bouhara Date: Tue Nov 5 22:22:34 2019 +0100 ARM: dts: at91: add a dts and dtsi file for kizbox2 based boards There are several boards available depending on the PCB (3 antennas support and several revison). Add a dtsi file to share common binding between all kizbox2 boards. This patch also add support for the kizbox2-2 variant. Signed-off-by: Kévin RAYMOND Signed-off-by: Mickael GARDET Signed-off-by: Kamel Bouhara Link: https://lore.kernel.org/r/20191105212234.22999-2-kamel.bouhara@bootlin.com Signed-off-by: Alexandre Belloni commit cd584d251554f736e0d3830be0d7cf2b62152b18 Author: Kamel Bouhara Date: Tue Nov 5 22:22:33 2019 +0100 dt-bindings: arm: at91: Document Kizbox2-2 board binding Document devicetree's binding for the Kizbox2-2 board of Overkiz SAS based on SAMA5D31 SoC. Signed-off-by: Kamel Bouhara Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191105212234.22999-1-kamel.bouhara@bootlin.com Signed-off-by: Alexandre Belloni commit 61412ef12a8450e0a8e64d9f30eca5fb07d19996 Author: Tao Ren Date: Tue Oct 29 11:20:54 2019 -0700 docs: hwmon: Document bel-pfe pmbus driver Add documentation for bel-pfe pmbus driver which supports BEL PFE1100 and PFE3000 power supplies. Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20191029182054.32279-3-rentao.bupt@gmail.com [groeck: Added bel-pfe to index.rst] Signed-off-by: Guenter Roeck commit 626bb2f3fb3c4f1faa084d81112edda555bacb68 Author: Tao Ren Date: Tue Oct 29 11:20:53 2019 -0700 hwmon: (pmbus) add driver for BEL PFE1100 and PFE3000 Add "bel-pfe" pmbus driver to support hardware monitoring for BEL PFE1100 and PFE3000 power supplies. Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20191029182054.32279-2-rentao.bupt@gmail.com Signed-off-by: Guenter Roeck commit 8ae93ea710d470c1cf1bf068013e6b264f021a19 Author: Nuno Sá Date: Fri Oct 11 13:48:53 2019 +0200 dt-bindings: hwmon: Add ltc2947 documentation Document the LTC2947 device devicetree bindings. Signed-off-by: Nuno Sá Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191011114853.159327-2-nuno.sa@analog.com Signed-off-by: Guenter Roeck commit 9f90fd652bed0a7295c13f413ab7b5c19152326c Author: Nuno Sá Date: Mon Oct 21 17:41:14 2019 +0200 hwmon: Add support for ltc2947 The ltc2947 is a high precision power and energy monitor with an internal sense resistor supporting up to +/- 30A. Three internal no Latency ADCs ensure accurate measurement of voltage and current, while high-bandwidth analog multiplication of voltage and current provides accurate power measurement in a wide range of applications. Internal or external clocking options enable precise charge and energy measurements. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20191021154115.319073-1-nuno.sa@analog.com [groeck: Removed unnecessary checks when reading temperature and energy; PAGE{0,1} -> LTC2947_PAGE_{0,1}] Signed-off-by: Guenter Roeck commit 2057bdfb7184e9833182bf9ffcb234988f545f41 Author: Nicolin Chen Date: Wed Oct 16 16:57:02 2019 -0700 hwmon: (ina3221) Add summation feature support This patch implements the summation feature of INA3221, mainly the SCC (enabling) and SF (warning flag) bits of MASK_ENABLE register, INA3221_SHUNT_SUM (summation of shunt voltages) register, and the INA3221_CRIT_SUM (its critical alert setting) register. Although the summation feature allows user to select which channels to be added to the result, as an initial support, this patch simply selects all channels by default, with one only condition: all shunt resistor values need to be the same. This is because the summation of current channels can be only accurately calculated, using shunt voltage sum register, if all shunt resistors are equivalent. Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20191016235702.22039-1-nicoleotsuka@gmail.com [groeck: summation->sum in documentation and label] Signed-off-by: Guenter Roeck commit 5ff02752b318ecfabe2a79cf50f8a1d563b9eb02 Author: Kyle Roeschley Date: Mon Oct 14 09:03:10 2019 -0500 hwmon: (tmp421) Allow reading at 2Hz instead of 0.5Hz Our driver configures the device to read at 2Hz, but then only allows the user to read cached temp values at up to 0.5Hz. Let's allow users to read as quickly as we do. Signed-off-by: Kyle Roeschley Link: https://lore.kernel.org/r/20191014140310.7438-1-kyle.roeschley@ni.com Signed-off-by: Guenter Roeck commit 58a24b5241e6a86a965bb5d4a7a3df8767660611 Author: Colin Ian King Date: Fri Oct 11 18:02:15 2019 +0100 hwmon: (w83793d) remove redundant assignment to variable res The variable res is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191011170215.11539-1-colin.king@canonical.com Signed-off-by: Guenter Roeck commit da806a1777e94e04c6c291dc500474cdde8f12e7 Author: Eddie James Date: Wed Oct 9 14:11:02 2019 -0500 hwmon: (pmbus/ibm-cffps) Add version detection capability Some systems may plug in either version 1 or version 2 of the IBM common form factor power supply. Add a version-less compatibility string that tells the driver to try and detect which version of the power supply is connected. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/1570648262-25383-3-git-send-email-eajames@linux.ibm.com Signed-off-by: Guenter Roeck commit c6d294d1aa5b962afcea0a6e35e909b46ac47494 Author: Eddie James Date: Wed Oct 9 14:11:01 2019 -0500 dt-bindings: hwmon: Document ibm,cffps compatible string Document this string that indicates that any version of the power supply may be connected. In this case, the driver must detect the version automatically. Signed-off-by: Eddie James Acked-by: Rob Herring Link: https://lore.kernel.org/r/1570648262-25383-2-git-send-email-eajames@linux.ibm.com Signed-off-by: Guenter Roeck commit 16f7f3bccb304a3257052bcb1538e85c67b506e4 Author: Colin Ian King Date: Sun Oct 6 15:52:31 2019 +0100 hwmon: abituguru: make array probe_order static, makes object smaller Don't populate the array probe_order on the stack but instead make it static. Makes the object code smaller by 94 bytes. Before: text data bss dec hex filename 41473 13448 320 55241 d7c9 drivers/hwmon/abituguru.o After: text data bss dec hex filename 41315 13512 320 55147 d76b drivers/hwmon/abituguru.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20191006145231.24022-1-colin.king@canonical.com Signed-off-by: Guenter Roeck commit 58d5aa5c75ce5748a489c3b8916de9b448d954b7 Author: Dmitry Torokhov Date: Wed Oct 2 14:43:45 2019 -0700 hwmon: (applesmc) switch to using input device polling mode Now that instances of input_dev support polling mode natively, we no longer need to create input_polled_dev instance. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20191002214345.GA108728@dtor-ws Signed-off-by: Guenter Roeck commit 7b10e17067dc459642ecf88f7ecf552ceded121c Author: Markus Elfring Date: Wed Sep 18 10:12:31 2019 +0200 hwmon: (aspeed-pwm-tacho) Use devm_platform_ioremap_resource() in aspeed_pwm_tacho_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/cd5bab7b-9333-2a43-bcf0-a47bbbe719eb@web.de Signed-off-by: Guenter Roeck commit 92b39ad440968bab38eb6577d63c12994601ed94 Author: Eddie James Date: Wed Nov 6 14:01:06 2019 -0600 hwmon: (pmbus/ibm-cffps) Fix LED blink behavior The LED blink_set function incorrectly did not tell the PSU LED to blink if brightness was LED_OFF. Fix this, and also correct the LED_OFF command data, which should give control of the LED back to the PSU firmware. Also prevent I2C failures from getting the driver LED state out of sync and add some dev_dbg statements. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20191106200106.29519-3-eajames@linux.ibm.com Fixes: ef9e1cdf419a3 ("hwmon: (pmbus/cffps) Add led class device for power supply fault led") Signed-off-by: Guenter Roeck commit 9861ff954c7e83e2f738ce16fbe15f8a1e121771 Author: Eddie James Date: Wed Nov 6 14:01:05 2019 -0600 hwmon: (pmbus/ibm-cffps) Switch LEDs to blocking brightness call Since i2c_smbus functions can sleep, the brightness setting function for this driver must be the blocking version to avoid scheduling while atomic. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20191106200106.29519-2-eajames@linux.ibm.com Fixes: ef9e1cdf419a3 ("hwmon: (pmbus/cffps) Add led class device for power supply fault led") Signed-off-by: Guenter Roeck commit bb302711d141678618027f7b724879a9692b07ae Merge: 54ecb8f7028c 4441b57ec27e Author: Stephen Boyd Date: Wed Nov 6 14:30:45 2019 -0800 Merge tag 'sunxi-clk-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Maxime Ripard: A few clock patches for sunxi, mostly to export new clocks to the DT, and fix some issues with the clock tree on the H6. * tag 'sunxi-clk-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: h3: Export MBUS clock clk: sunxi-ng: h6: Allow GPU to change parent rate clk: sunxi-ng: h6: Use sigma-delta modulation for audio PLL commit 049325870aa86a6c6b17ce3db667a6adbb6e6a76 Merge: 54ecb8f7028c f58691906679 Author: Stephen Boyd Date: Wed Nov 6 14:26:56 2019 -0800 Merge tag 'ti-clk-for-5.5-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into clk-ti Pull TI clk driver updates from Tero Kristo: As the clock and reset handling is tightly coupled on the hardware level on OMAP SoCs, we must ensure the events are sequenced properly. This series makes sure that the clock side is behaving properly, and the sequencing of the events is left for the bus driver (ti-sysc.) The series also includes revamp of the TI divider clock implementation to handle max divider values properly in cases where the max value is not limited by the bitfield of the IO register but instead limited to some arbitrary value. Previously this resulted in too high divider values to be used in some cases causing HW malfunction. Additionally, a couple of smaller changes needed by remoteproc support are added; checking of the standby status and some missing clkctrl data for omap5/dra7. * tag 'ti-clk-for-5.5-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: ARM: dts: omap3: fix DPLL4 M4 divider max value clk: ti: divider: convert to use min,max,mask instead of width clk: ti: divider: cleanup ti_clk_parse_divider_data API clk: ti: divider: cleanup _register_divider and ti_clk_get_div_table clk: ti: am43xx: drop idlest polling from gfx clock clk: ti: am33xx: drop idlest polling from gfx clock clk: ti: am33xx: drop idlest polling from pruss clkctrl clock clk: ti: am43xx: drop idlest polling from pruss clkctrl clock clk: ti: omap5: Drop idlest polling from IPU & DSP clkctrl clocks clk: ti: omap4: Drop idlest polling from IPU & DSP clkctrl clocks clk: ti: dra7xx: Drop idlest polling from IPU & DSP clkctrl clocks clk: ti: omap5: add IVA subsystem clkctrl data dt-bindings: clk: add omap5 iva clkctrl definitions clk: ti: clkctrl: add new exported API for checking standby info clk: ti: clkctrl: convert to use bit helper macros instead of bitops clk: ti: clkctrl: fix setting up clkctrl clocks commit 56144737e67329c9aaed15f942d46a6302e2e3d8 Author: Eric Dumazet Date: Wed Nov 6 09:48:04 2019 -0800 hrtimer: Annotate lockless access to timer->state syzbot reported various data-race caused by hrtimer_is_queued() reading timer->state. A READ_ONCE() is required there to silence the warning. Also add the corresponding WRITE_ONCE() when timer->state is set. In remove_hrtimer() the hrtimer_is_queued() helper is open coded to avoid loading timer->state twice. KCSAN reported these cases: BUG: KCSAN: data-race in __remove_hrtimer / tcp_pacing_check write to 0xffff8880b2a7d388 of 1 bytes by interrupt on cpu 0: __remove_hrtimer+0x52/0x130 kernel/time/hrtimer.c:991 __run_hrtimer kernel/time/hrtimer.c:1496 [inline] __hrtimer_run_queues+0x250/0x600 kernel/time/hrtimer.c:1576 hrtimer_run_softirq+0x10e/0x150 kernel/time/hrtimer.c:1593 __do_softirq+0x115/0x33f kernel/softirq.c:292 run_ksoftirqd+0x46/0x60 kernel/softirq.c:603 smpboot_thread_fn+0x37d/0x4a0 kernel/smpboot.c:165 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 read to 0xffff8880b2a7d388 of 1 bytes by task 24652 on cpu 1: tcp_pacing_check net/ipv4/tcp_output.c:2235 [inline] tcp_pacing_check+0xba/0x130 net/ipv4/tcp_output.c:2225 tcp_xmit_retransmit_queue+0x32c/0x5a0 net/ipv4/tcp_output.c:3044 tcp_xmit_recovery+0x7c/0x120 net/ipv4/tcp_input.c:3558 tcp_ack+0x17b6/0x3170 net/ipv4/tcp_input.c:3717 tcp_rcv_established+0x37e/0xf50 net/ipv4/tcp_input.c:5696 tcp_v4_do_rcv+0x381/0x4e0 net/ipv4/tcp_ipv4.c:1561 sk_backlog_rcv include/net/sock.h:945 [inline] __release_sock+0x135/0x1e0 net/core/sock.c:2435 release_sock+0x61/0x160 net/core/sock.c:2951 sk_stream_wait_memory+0x3d7/0x7c0 net/core/stream.c:145 tcp_sendmsg_locked+0xb47/0x1f30 net/ipv4/tcp.c:1393 tcp_sendmsg+0x39/0x60 net/ipv4/tcp.c:1434 inet_sendmsg+0x6d/0x90 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0x9f/0xc0 net/socket.c:657 BUG: KCSAN: data-race in __remove_hrtimer / __tcp_ack_snd_check write to 0xffff8880a3a65588 of 1 bytes by interrupt on cpu 0: __remove_hrtimer+0x52/0x130 kernel/time/hrtimer.c:991 __run_hrtimer kernel/time/hrtimer.c:1496 [inline] __hrtimer_run_queues+0x250/0x600 kernel/time/hrtimer.c:1576 hrtimer_run_softirq+0x10e/0x150 kernel/time/hrtimer.c:1593 __do_softirq+0x115/0x33f kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0xbb/0xe0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0xe6/0x280 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 read to 0xffff8880a3a65588 of 1 bytes by task 22891 on cpu 1: __tcp_ack_snd_check+0x415/0x4f0 net/ipv4/tcp_input.c:5265 tcp_ack_snd_check net/ipv4/tcp_input.c:5287 [inline] tcp_rcv_established+0x750/0xf50 net/ipv4/tcp_input.c:5708 tcp_v4_do_rcv+0x381/0x4e0 net/ipv4/tcp_ipv4.c:1561 sk_backlog_rcv include/net/sock.h:945 [inline] __release_sock+0x135/0x1e0 net/core/sock.c:2435 release_sock+0x61/0x160 net/core/sock.c:2951 sk_stream_wait_memory+0x3d7/0x7c0 net/core/stream.c:145 tcp_sendmsg_locked+0xb47/0x1f30 net/ipv4/tcp.c:1393 tcp_sendmsg+0x39/0x60 net/ipv4/tcp.c:1434 inet_sendmsg+0x6d/0x90 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0x9f/0xc0 net/socket.c:657 __sys_sendto+0x21f/0x320 net/socket.c:1952 __do_sys_sendto net/socket.c:1964 [inline] __se_sys_sendto net/socket.c:1960 [inline] __x64_sys_sendto+0x89/0xb0 net/socket.c:1960 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 24652 Comm: syz-executor.3 Not tainted 5.4.0-rc3+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ tglx: Added comments ] Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20191106174804.74723-1-edumazet@google.com commit 86a56b2c612d34e5b8794dd6ceab2d943abc4bc5 Merge: 1d16a9172c38 140647f84dd8 Author: Olof Johansson Date: Wed Nov 6 14:06:34 2019 -0800 Merge tag 'qcom-dts-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm Device Tree Changes for v5.5 * Add thermal zones and IRQ support for MSM8974 * Add 5vs2 regulator node for PM8941 * Add reboot-mode node, fix sdhci and card detect on MSM8974-FP2 * Add IPQ4019 SDHCI node * tag 'qcom-dts-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: msm8974: thermal: Add thermal zones for each sensor ARM: dts: msm8974: thermal: Add interrupt support ARM: dts: qcom: pm8941: add 5vs2 regulator node ARM: dts: msm8974-FP2: add reboot-mode node ARM: dts: msm8974-FP2: Increase load on l20 for sdhci ARM: dts: msm8974-FP2: Drop unused card-detect pin ARM: dts: qcom: ipq4019: Add SDHCI controller node Link: https://lore.kernel.org/r/1573068840-13098-5-git-send-email-agross@kernel.org Signed-off-by: Olof Johansson commit d4b0c97a80891d5fb8d73230730f28a42f16fe28 Merge: 8cbbff3a6423 971112e07293 Author: Olof Johansson Date: Wed Nov 6 14:05:52 2019 -0800 Merge tag 'qcom-drivers-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm ARM Based Driver Updates for v5.5 * Add Bjorn as QCOM co-maintainer * Add LLLC yaml bindings and SC7180 support * Fixups/Cleanup for LLLC * Add SMD-RPM MSM8976 compatible and interconnect device * Add missing RPMD SMD perf level * tag 'qcom-drivers-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: MAINTAINERS: Add myself as co-maintainer for QCOM dt-bindings: msm: Add LLCC for SC7180 dt-bindings: msm: Convert LLCC bindings to YAML soc: qcom: llcc: Add configuration data for SC7180 soc: qcom: llcc: Move regmap config to local variable soc: qcom: llcc: Name regmaps to avoid collisions soc: qcom: Fix llcc-qcom definitions to include soc: qcom: rpmpd: Add rpm power domains for msm8976 dt-bindings: power: Add missing rpmpd smd performance level soc: qcom: smd-rpm: Add MSM8976 compatible soc: qcom: socinfo: add sdm845 and sda845 soc ids soc: qcom: smd-rpm: Create RPM interconnect proxy child device soc: qcom: Make llcc-qcom a generic driver soc: qcom: Rename llcc-slice to llcc-qcom soc: qcom: llcc cleanup to get rid of sdm845 specific driver file Link: https://lore.kernel.org/r/1573068840-13098-4-git-send-email-agross@kernel.org Signed-off-by: Olof Johansson commit 536c43b41d1a05c262f47b97cb302d7ade97dae4 Merge: 1f0753ea6a38 b2181be1cfb8 Author: Olof Johansson Date: Wed Nov 6 14:05:21 2019 -0800 Merge tag 'qcom-defconfig-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM Based defconfig Updates for v5.5 * Enable OCMEM support * tag 'qcom-defconfig-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: qcom_defconfig: add ocmem support Link: https://lore.kernel.org/r/1573068840-13098-3-git-send-email-agross@kernel.org Signed-off-by: Olof Johansson commit 1d16a9172c385e304fe4c2467d52e7f2ac301c6b Merge: 17795bf9aab9 915603b10616 Author: Olof Johansson Date: Wed Nov 6 14:04:50 2019 -0800 Merge tag 'qcom-arm64-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 Updates for v5.5 * Add thermal IRQ support on MSM8916, SDM845, MSM8996, and QCS404 * Fix thermal HW ids for cpus on MSM8916 * Add blsp1 UART3 and blsp1 BAM on MSM8998 * Add volume buttons and WCNSS for Wifi and BT on MSM8916 LongCheer-l8150 * Fixup load on l21 for SD on apq8096-db820c * Enable LVS1/2, APSS watchdog, and select UFS reset gpio for SDM845 * Disable coresight by default on MSM8998 * Enable bluetooth and remove retention idle state on MSM8998-clamshell * Enable adsp, cdsp, and mpss on C630 * Enable bluetooth on MSM8998-mtp * Delete zap shader on SDM845-cheza * Add tactile buttons and hall sensor on MSM8916-Samsung-A2015 * Add Interconnect nodes, watchdog, and sleep clk on QCS404 * Override Iris compatible on MSM8916-Samsung-A5U * Enable WCNSS Wifi and bluetooth on MSM8916-Samsung-A2015 * Fixup cooling states for the aoss warming devices * tag 'qcom-arm64-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (26 commits) arm64: dts: qcom: db845c: Enable LVS 1 and 2 arm64: dts: qcom: msm8998: Disable coresight by default arm64: dts: qcom: msm8998-clamshell: Remove retention idle state arm64: dts: qcom: sdm845-cheza: delete zap-shader arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors arm64: dts: sdm845: thermal: Add interrupt support arm64: dts: msm8996: thermal: Add interrupt support arm64: dts: msm8998: thermal: Add interrupt support arm64: dts: qcs404: thermal: Add interrupt support arm64: dts: qcom: sdm845: Add APSS watchdog node arm64: dts: qcom: c630: Enable adsp, cdsp and mpss arm64: dts: qcom: msm8998-clamshell: Enable bluetooth arm64: dts: qcom: msm8998-mtp: Enable bluetooth arm64: dts: qcom: msm8998: Add blsp1_uart3 arm64: dts: qcom: msm8998: Add blsp1 BAM arm64: dts: msm8916-longcheer-l8150: Add Volume buttons arm64: dts: msm8916-longcheer-l8150: Enable WCNSS for WiFi and BT soc: qcom: Invert the cooling states for the aoss warming devices arm64: dts: apq8096-db820c: Increase load on l21 for SDCARD arm64: dts: msm8916-samsung-a2015: add tactile buttons and hall sensor ... Link: https://lore.kernel.org/r/1573068840-13098-2-git-send-email-agross@kernel.org Signed-off-by: Olof Johansson commit ed578021210e14f15a654c825fba6a700c9a39a7 Author: Andrii Nakryiko Date: Wed Nov 6 12:15:00 2019 -0800 libbpf: Simplify BPF_CORE_READ_BITFIELD_PROBED usage Streamline BPF_CORE_READ_BITFIELD_PROBED interface to follow BPF_CORE_READ_BITFIELD (direct) and BPF_CORE_READ, in general, i.e., just return read result or 0, if underlying bpf_probe_read() failed. In practice, real applications rarely check bpf_probe_read() result, because it has to always work or otherwise it's a bug. So propagating internal bpf_probe_read() error from this macro hurts usability without providing real benefits in practice. This patch fixes the issue and simplifies usage, noticeable even in selftest itself. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191106201500.2582438-1-andriin@fb.com commit 65a052d537f40e992eb1629cc6c25874064f51fd Author: Andrii Nakryiko Date: Wed Nov 6 09:36:59 2019 -0800 selftests/bps: Clean up removed ints relocations negative tests As part of 42765ede5c54 ("selftests/bpf: Remove too strict field offset relo test cases"), few ints relocations negative (supposed to fail) tests were removed, but not completely. Due to them being negative, some leftovers in prog_tests/core_reloc.c went unnoticed. Clean them up. Fixes: 42765ede5c54 ("selftests/bpf: Remove too strict field offset relo test cases") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191106173659.1978131-1-andriin@fb.com commit ef177d11d696fe0eea36ef74edfeaeb62cd89c35 Author: Alex Deucher Date: Wed Oct 30 14:40:09 2019 -0400 drm/amdgpu: Improve RAS documentation (v2) Clarify some areas, clean up formatting, add section for unrecoverable error handling. v2: fix grammatical errors Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 7158ca8476c96f0c828bd6a35e79661eb33dfb91 Author: Alex Deucher Date: Wed Oct 30 10:21:28 2019 -0400 drm/radeon: fix si_enable_smc_cac() failed issue Need to set the dte flag on this asic. Port the fix from amdgpu: 5cb818b861be114 ("drm/amd/amdgpu: fix si_enable_smc_cac() failed issue") Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit ad4d81dc57e2dff7cf3b55f63356f0d0017050a1 Author: Alex Deucher Date: Tue Oct 29 10:36:22 2019 -0400 drm/amdgpu/renoir: move gfxoff handling into gfx9 module To properly handle the option parsing ordering. Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 365f7f8db8a48c8c7ef63a1cc835f200e578757b Author: Pan Bian Date: Wed Nov 6 19:35:43 2019 +0800 drm/amdgpu: fix double reference dropping The reference to object fence is dropped at the end of the loop. However, it is dropped again outside the loop. The reference can be dropped immediately after calling dma_fence_wait() in the loop and thus the dropping operation outside the loop can be removed. Reviewed-by: Christian König Signed-off-by: Pan Bian Signed-off-by: Alex Deucher commit d942070575910fdb687b9c8fd5467704b2f77c24 Author: Raul E Rangel Date: Tue Nov 5 15:58:02 2019 -0700 drm/amd/powerplay: fix struct init in renoir_print_clk_levels drivers/gpu/drm/amd/powerplay/renoir_ppt.c:186:2: error: missing braces around initializer [-Werror=missing-braces] SmuMetrics_t metrics = {0}; ^ Fixes: 8b8031703bd7 ("drm/amd/powerplay: implement sysfs for getting dpm clock") Signed-off-by: Raul E Rangel Signed-off-by: Alex Deucher commit 946ab8db6953535a3a88c957db8328beacdfed9d Author: Pan Bian Date: Wed Nov 6 17:14:45 2019 +0800 drm/amdgpu: fix potential double drop fence reference The object fence is not set to NULL after its reference is dropped. As a result, its reference may be dropped again if error occurs after that, which may lead to a use after free bug. To avoid the issue, fence is explicitly set to NULL after dropping its reference. Acked-by: Christian König Signed-off-by: Pan Bian Signed-off-by: Alex Deucher commit f88e2d1f8ec40854c684d73ecf1cf66d4c6dad35 Author: Eric Huang Date: Tue Nov 5 16:29:57 2019 -0500 drm/amdgpu: change read of GPU clock counter on Vega10 VF Using unified VBIOS has performance drop in sriov environment. The fix is switching to another register instead. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 11c610893410b5d550629ce8d10006fdbc2812b4 Author: changzhu Date: Tue Nov 5 18:29:12 2019 +0800 drm/amdgpu: add warning for GRBM 1-cycle delay issue in gfx9 It needs to add warning to update firmware in gfx9 in case that firmware is too old to have function to realize dummy read in cp firmware. Signed-off-by: changzhu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a6522a5c6388c5f5b63f022af9a48f2d1e68fd81 Author: changzhu Date: Thu Oct 10 11:02:33 2019 +0800 drm/amdgpu: add dummy read by engines for some GCVM status registers in gfx10 The GRBM register interface is now capable of bursting 1 cycle per register wr->wr, wr->rd much faster than previous muticycle per transaction done interface. This has caused a problem where status registers requiring HW to update have a 1 cycle delay, due to the register update having to go through GRBM. For cp ucode, it has realized dummy read in cp firmware.It covers the use of WAIT_REG_MEM operation 1 case only.So it needs to call gfx_v10_0_wait_reg_mem in gfx10. Besides it also needs to add warning to update firmware in case firmware is too old to have function to realize dummy read in cp firmware. For sdma ucode, it hasn't realized dummy read in sdma firmware. sdma is moved to gfxhub in gfx10. So it needs to add dummy read in driver between amdgpu_ring_emit_wreg and amdgpu_ring_emit_reg_wait for sdma_v5_0. Signed-off-by: changzhu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cf3fde893d3a86fe5275061fbf80d67271d2d0cf Author: Evan Quan Date: Wed Nov 6 12:40:12 2019 +0800 drm/amd/powerplay: fix deadlock on setting power_dpm_force_performance_level smu_enable_umd_pstate() will try to get the smu->mutex which was already hold by its parent API smu_force_performance_level() on the call path. Thus deadlock happens. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 60599a03638a611574a177fa6e6d7394abad0d7f Author: Evan Quan Date: Tue Nov 5 15:15:33 2019 +0800 drm/amdgpu: perform p-state switch after the whole hive initialized P-state switch should be performed after all devices from the hive get initialized. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher commit 5c5b2ba00667edd6c5c0df9f97ba2b179d013e1d Author: Evan Quan Date: Thu Oct 31 14:15:29 2019 +0800 drm/amdgpu: fix possible pstate switch race condition Added lock protection so that the p-state switch will be guarded to be sequential. Also update the hive pstate only all device from the hive are in the same state. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit b0adca4d50169d9a05912e208a89cdd615da40d4 Author: Evan Quan Date: Tue Nov 5 18:13:49 2019 +0800 drm/amdgpu: register gpu instance before fan boost feature enablment Otherwise, the feature enablement will be skipped due to wrong count. Fixes: beff74bc6e0fa91 ("drm/amdgpu: fix a race in GPU reset with IB test (v2)") Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2c874ad9d6293cd387b13304894e4322ec3eab6f Author: Kevin Wang Date: Tue Nov 5 18:16:38 2019 +0800 drm/amd/swSMU: fix smu workload bit map error fix workload bit (WORKLOAD_PPLIB_COMPUTE_BIT) map error on vega20 and navi asic. fix commit: drm/amd/powerplay: add function get_workload_type_map for swsmu Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 8d3bf936bafe75ad22f80420f052ab737c0515fb Author: Evan Quan Date: Tue Nov 5 16:13:05 2019 +0800 drm/amd/powerplay: update Arcturus driver-smu interface header To fit the latest SMU firmware. Signed-off-by: Evan Quan Reviewed-by: Le Ma Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 58f46d4b65021083ef4b4d49c6e2c58e5783f626 Author: Hawking Zhang Date: Mon Nov 4 16:20:06 2019 +0800 drm/amdgpu: disallow direct upload save restore list from gfx driver Direct uploading save/restore list via mmio register writes breaks the security policy. Instead, the driver should pass s&r list to psp. For all the ASICs that use rlc v2_1 headers, the driver actually upload s&r list twice, in non-psp ucode front door loading phase and gfx pg initialization phase. The latter is not allowed. VG12 is the only exception where the driver still keeps legacy approach for S&R list uploading. In theory, this can be elimnated if we have valid srcntl ucode for VG12. Signed-off-by: Hawking Zhang Reviewed-by: Candice Li Signed-off-by: Alex Deucher commit d7c5782acd354bdb5ed0fa10e1e397eaed558390 Author: Andrey Grodzovsky Date: Tue Oct 29 11:03:05 2019 -0400 drm/sched: Fix passing zero to 'PTR_ERR' warning v2 Fix a static code checker warning. v2: Drop PTR_ERR_OR_ZERO. Signed-off-by: Andrey Grodzovsky Reviewed-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 224f82e5b7bf6cb739179891a0e7093466e363d7 Author: Emily Deng Date: Mon Nov 4 12:45:09 2019 +0800 drm/amdgpu/discovery: Need to free discovery memory When unloading driver, need to free discovery memory. Signed-off-by: Emily Deng Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher commit 91872960caf5b6b7e1810ae16d64b12b4f8c4ada Author: Xiaojie Yuan Date: Wed Oct 30 11:38:53 2019 +0800 drm/amd/powerplay: print the pptable provider So we know where the tables came from. Signed-off-by: Xiaojie Yuan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit b73b7f48895a6a944a76a2d8cdd7feee72bb1f0b Author: Zhan Liu Date: Mon Nov 4 15:46:56 2019 -0400 Revert "drm/amd/display: setting the DIG_MODE to the correct value." This reverts commit 967a3b85bac91c55eff740e61bf270c2732f48b2. Reason for revert: Root cause of this issue is found. The workaround is not needed anymore. Signed-off-by: Zhan Liu Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit 9fd4c2d712377f5fb9d3a1ad4f3106bf7833ccad Author: Zhan Liu Date: Fri Nov 1 21:10:17 2019 -0400 drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14 [Why] Navi10 has 6 PHY, but Navi14 only has 5 PHY, that is because there is no ENGINE_ID_DIGD in Navi14. Without this patch, many HDMI related issues (e.g. HDMI S3 resume failure, HDMI pink screen on boot) will be observed. [How] If "eng_id" is larger than ENGINE_ID_DIGD, then add "eng_id" by 1. Signed-off-by: Zhan Liu Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit 26e99ba6d1024d77b0620c3b7c753af9f8a6ebe3 Author: Neil Mayhew Date: Wed Oct 30 12:58:37 2019 -0600 drm/amdgpu: Show resolution correctly in mode validation debug output Reviewed-by: Harry Wentland Signed-off-by: Neil Mayhew Signed-off-by: Alex Deucher commit 8863baefaf02415fcb9894b03793711157fa1c82 Author: Alex Deucher Date: Wed Oct 30 13:53:27 2019 -0400 drm/amdgpu/gpuvm: add some additional comments in amdgpu_vm_update_ptes To better clarify what is happening in this function. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a4840d91c984f93b2acdcd44441d624bbc1af0d2 Author: Alex Deucher Date: Thu Oct 31 10:37:02 2019 -0400 drm/amdgpu: enable VCN DPG on Raven and Raven2 It's safe to enable dynamic VCN powergating on raven and raven2 for increased power savings. Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 84e4e8205efc70dcbfa1a24554b1a85f129c991f Author: Tianci.Yin Date: Wed Nov 6 14:29:35 2019 -0500 drm/amdgpu: add navi14 PCI ID Add the navi14 PCI device id. Reviewed-by: Hawking Zhang Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 3e454860f2a469e82c0f0dd7ff058a70a84a6f8b Author: Evan Quan Date: Thu Oct 31 09:41:19 2019 +0800 drm/amd/powerplay: support xgmi pstate setting on powerplay routine V2 Add xgmi pstate setting on powerplay routine. V2: split the change of is_support_sw_smu_xgmi into a separate patch Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 086e1c56162611aba933d61d6037bd471ee48f48 Author: Evan Quan Date: Thu Oct 31 14:29:48 2019 +0800 drm/amd/powerplay: update is_sw_smu_xgmi check Add check for is_sw_smu routine and drop check for amdgpu_dpm which seems non-sense. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 39ea6e5f9e2d6e094b7a48592ecae6c69a82e471 Author: Evan Quan Date: Thu Oct 31 14:10:27 2019 +0800 drm/amdgpu: change pstate only after all XGMI device initialized Pstate settings should be performed after all device of the XGMI setup get initialized. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit bfd582aa8569c2b2f44fd8025d56a3b480fdc01d Merge: 54ecb8f7028c bceed71ba131 Author: Stephen Boyd Date: Wed Nov 6 13:04:28 2019 -0800 Merge tag 'imx-clk-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-imx Pull i.MX clk updates from Shawn Guo: - Make 1443X/1416X PLL clock structure common for reusing among i.MX8 SoCs - A couple of imx7ulp clock multiplexer option corrections. - Drop IMX7ULP_CLK_MIPI_PLL clock, as it's a MIPI DSI local clock and shouldn't be used externally - Add VIDEO2_PLL clock for imx8mq which is needed by DCSS when high resolutions are used - Add missing gate clock for pll1/2 fixed dividers on i.MX8 SoCs - Register SYS_PLL1 and SYS_PLL2 as fixed clock rather than pll14xx type of clock - Use imx_obtain_fixed_clk_hw() to simplify i.MX6/7/8 clock driver code a little bit - One cosmetic change on clk-pll14xx code to make variables static * tag 'imx-clk-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx: imx8mq: fix sys3_pll_out_sels clk: imx7ulp: do not export out IMX7ULP_CLK_MIPI_PLL clock clk: imx: imx6ul: use imx_obtain_fixed_clk_hw to simplify code clk: imx: imx6sx: use imx_obtain_fixed_clk_hw to simplify code clk: imx: imx6sll: use imx_obtain_fixed_clk_hw to simplify code clk: imx: imx7d: use imx_obtain_fixed_clk_hw to simplify code clk: imx7ulp: Correct DDR clock mux options clk: imx7ulp: Correct system clock source option #7 clk: imx: imx8mq: mark sys1/2_pll as fixed clock clk: imx: imx8mn: mark sys_pll1/2 as fixed clock clk: imx: imx8mm: mark sys_pll1/2 as fixed clock clk: imx8mn: Define gates for pll1/2 fixed dividers clk: imx8mm: Define gates for pll1/2 fixed dividers clk: imx8mq: Define gates for pll1/2 fixed dividers clk: imx: clk-pll14xx: Make two variables static clk: imx8mq: Add VIDEO2_PLL clock clk: imx8mn: Use common 1443X/1416X PLL clock structure clk: imx8mm: Move 1443X/1416X PLL clock structure to common place clk: imx: pll14xx: Fix quick switch of S/K parameter commit 1bb5ec2eec48dcab1d8ae3707e4a388da6a9c9dc Author: Tejun Heo Date: Wed Nov 6 12:49:57 2019 -0800 cgroup: use cgroup->last_bstat instead of cgroup->bstat_pending for consistency cgroup->bstat_pending is used to determine the base stat delta to propagate to the parent. While correct, this is different from how percpu delta is determined for no good reason and the inconsistency makes the code more difficult to understand. This patch makes parent propagation delta calculation use the same method as percpu to global propagation. * cgroup_base_stat_accumulate() is renamed to cgroup_base_stat_add() and cgroup_base_stat_sub() is added. * percpu propagation calculation is updated to use the above helpers. * cgroup->bstat_pending is replaced with cgroup->last_bstat and updated to use the same calculation as percpu propagation. Signed-off-by: Tejun Heo commit 0eee17e3322625b87ce5fa631bda16562a8dc494 Author: Eric Biggers Date: Thu Oct 24 14:54:38 2019 -0700 f2fs: add support for IV_INO_LBLK_64 encryption policies f2fs inode numbers are stable across filesystem resizing, and f2fs inode and file logical block numbers are always 32-bit. So f2fs can always support IV_INO_LBLK_64 encryption policies. Wire up the needed fscrypt_operations to declare support. Acked-by: Jaegeuk Kim Signed-off-by: Eric Biggers commit b925acb8f83d7ce3582b34018c05aae1be666abf Author: Eric Biggers Date: Thu Oct 24 14:54:37 2019 -0700 ext4: add support for IV_INO_LBLK_64 encryption policies IV_INO_LBLK_64 encryption policies have special requirements from the filesystem beyond those of the existing encryption policies: - Inode numbers must never change, even if the filesystem is resized. - Inode numbers must be <= 32 bits. - File logical block numbers must be <= 32 bits. ext4 has 32-bit inode and file logical block numbers. However, resize2fs can re-number inodes when shrinking an ext4 filesystem. However, typically the people who would want to use this format don't care about filesystem shrinking. They'd be fine with a solution that just prevents the filesystem from being shrunk. Therefore, add a new feature flag EXT4_FEATURE_COMPAT_STABLE_INODES that will do exactly that. Then wire up the fscrypt_operations to expose this flag to fs/crypto/, so that it allows IV_INO_LBLK_64 policies when this flag is set. Acked-by: Theodore Ts'o Signed-off-by: Eric Biggers commit b103fb7653fff09e7a6fb6ba9398a41584e7ae36 Author: Eric Biggers Date: Thu Oct 24 14:54:36 2019 -0700 fscrypt: add support for IV_INO_LBLK_64 policies Inline encryption hardware compliant with the UFS v2.1 standard or with the upcoming version of the eMMC standard has the following properties: (1) Per I/O request, the encryption key is specified by a previously loaded keyslot. There might be only a small number of keyslots. (2) Per I/O request, the starting IV is specified by a 64-bit "data unit number" (DUN). IV bits 64-127 are assumed to be 0. The hardware automatically increments the DUN for each "data unit" of configurable size in the request, e.g. for each filesystem block. Property (1) makes it inefficient to use the traditional fscrypt per-file keys. Property (2) precludes the use of the existing DIRECT_KEY fscrypt policy flag, which needs at least 192 IV bits. Therefore, add a new fscrypt policy flag IV_INO_LBLK_64 which causes the encryption to modified as follows: - The encryption keys are derived from the master key, encryption mode number, and filesystem UUID. - The IVs are chosen as (inode_number << 32) | file_logical_block_num. For filenames encryption, file_logical_block_num is 0. Since the file nonces aren't used in the key derivation, many files may share the same encryption key. This is much more efficient on the target hardware. Including the inode number in the IVs and mixing the filesystem UUID into the keys ensures that data in different files is nevertheless still encrypted differently. Additionally, limiting the inode and block numbers to 32 bits and placing the block number in the low bits maintains compatibility with the 64-bit DUN convention (property (2) above). Since this scheme assumes that inode numbers are stable (which may preclude filesystem shrinking) and that inode and file logical block numbers are at most 32-bit, IV_INO_LBLK_64 will only be allowed on filesystems that meet these constraints. These are acceptable limitations for the cases where this format would actually be used. Note that IV_INO_LBLK_64 is an on-disk format, not an implementation. This patch just adds support for it using the existing filesystem layer encryption. A later patch will add support for inline encryption. Reviewed-by: Paul Crowley Co-developed-by: Satya Tangirala Signed-off-by: Satya Tangirala Signed-off-by: Eric Biggers commit ff73c2c016f8569b728eb1e9ebfab383545e4d65 Author: Eric Biggers Date: Mon Oct 21 13:49:03 2019 -0700 fscrypt: avoid data race on fscrypt_mode::logged_impl_name The access to logged_impl_name is technically a data race, which tools like KCSAN could complain about in the future. See: https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE Fix by using xchg(), which also ensures that only one thread does the logging. This also required switching from bool to int, to avoid a build error on the RISC-V architecture which doesn't implement xchg on bytes. Signed-off-by: Eric Biggers commit b149cbfeecaa2b2870d2c4f878382a024e6e4975 Author: Sean Paul Date: Wed Nov 6 14:41:15 2019 -0500 drm/mst: Fix up u64 division Change rem_nsec to u32 since that's what do_div returns, this avoids the u64 divide in the drm_print args. Changes in v2: - Instead of doing do_div in drm_print, make rem_nsec u32 (Ville) Link to v1: https://patchwork.freedesktop.org/patch/msgid/20191106173622.15573-1-sean@poorly.run Fixes: 12a280c72868 ("drm/dp_mst: Add topology ref history tracking for debugging") Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Cc: Sean Paul Cc: Lyude Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Reviewed-by: Ville Syrjälä Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191106194121.164458-1-sean@poorly.run commit ffa2fd1323e32093abc23e7d71ed92b85e566ffe Author: Leon Romanovsky Date: Tue Oct 29 08:27:42 2019 +0200 RDMA/mlx5: Rewrite MAD processing logic to be readable Multiple "if"s and "||" make extension of process_mad() function as a tedious task, rewrite that function to be more readable. Link: https://lore.kernel.org/r/20191029062745.7932-14-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 84b56d57cf3cc9640b69cbb3a5d023d010ccb62a Author: Leon Romanovsky Date: Tue Oct 29 08:27:40 2019 +0200 RDMA/ocrdma: Simplify process_mad function Change the switch with one case into a simple if statement so the code is less confusing. Link: https://lore.kernel.org/r/20191029062745.7932-12-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit dd0b0159f7b31439679879fcf2574d7ad744b6f1 Author: Leon Romanovsky Date: Tue Oct 29 08:27:37 2019 +0200 RDMA/mad: Do not check MAD sizes in roce and ib drivers All callers for process_mad allocate MAD structures with proper sizes, there is no need to recheck it. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6a42265c9116a2ff8b94b52525c95f177cb15db2 Author: Leon Romanovsky Date: Tue Oct 29 08:27:34 2019 +0200 RDMA/ocrdma: Make ocrdma_pma_counters() return void This function always returns 0, so just use void and remove the bogus checking at the only call site. Link: https://lore.kernel.org/r/20191029062745.7932-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit be4a8d46732a45e78aa27c34b58431a917cd644d Author: Leon Romanovsky Date: Tue Oct 29 08:27:31 2019 +0200 RDMA/mad: Allocate zeroed MAD buffer Ensure that MAD output buffer is zero-based allocated in all the callers of process_mad and remove the various memset()'s from the drivers. Link: https://lore.kernel.org/r/20191029062745.7932-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 87297878b5b7c2fc4cecd66fc96b3061d04b6b3b Author: Neil Armstrong Date: Mon Oct 21 16:29:04 2019 +0200 arm64: dts: meson-gx: fix i2c compatible This fixes the following DT schemas check errors: meson-gxbb-nanopi-k2.dt.yaml: i2c@8500: compatible: Additional items are not allowed ('amlogic,meson-gxbb-i2c' was unexpected) meson-gxbb-nanopi-k2.dt.yaml: i2c@8500: compatible:0: 'amlogic,meson-gx-i2c' is not one of ['amlogic,meson6-i2c', 'amlogic,meson-gxbb-i2c', 'amlogic,meson-axg-i2c'] meson-gxbb-nanopi-k2.dt.yaml: i2c@8500: compatible: ['amlogic,meson-gx-i2c', 'amlogic,meson-gxbb-i2c'] is too long Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit b485a6a4e889f406b38038027557b78f33b571fe Author: Neil Armstrong Date: Mon Oct 21 16:29:03 2019 +0200 arm64: dts: meson-gx: cec node should be disabled by default This fixes the following DT schemas check errors: meson-gxl-s905x-hwacom-amazetv.dt.yaml: cec@100: 'hdmi-phandle' is a required property meson-gxm-rbox-pro.dt.yaml: cec@100: 'hdmi-phandle' is a required property because CEC is not enabled on these boards. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 409a0daa72f6fc1652e17cfea7ea1055e9c483c9 Author: Neil Armstrong Date: Mon Oct 21 16:29:02 2019 +0200 arm64: dts: meson-g12b-odroid-n2: add missing amlogic, s922x compatible This fixes the following DT schemas check errors: meson-g12b-odroid-n2.dt.yaml: /: compatible: ['hardkernel,odroid-n2', 'amlogic,g12b'] is not valid under any of the given schemas Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 69fb3f21f865ef110cb94a59bbf84adc2c376d9a Author: Neil Armstrong Date: Mon Oct 21 16:29:01 2019 +0200 arm64: dts: meson-gxm: fix gpu irq order This fixes the following DT schemas check errors: meson-gxm-khadas-vim2.dt.yaml: gpu@c0000: interrupt-names:0: 'job' was expected meson-gxm-khadas-vim2.dt.yaml: gpu@c0000: interrupt-names:2: 'gpu' was expected Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 711f9cb1f13aff940cd0a469dcb1a041330af019 Author: Neil Armstrong Date: Mon Oct 21 16:29:00 2019 +0200 arm64: dts: meson-g12a: fix gpu irq order This fixes the following DT schemas check errors: meson-g12b-s922x-khadas-vim3.dt.yaml: gpu@ffe40000: interrupt-names:0: 'job' was expected meson-g12b-s922x-khadas-vim3.dt.yaml: gpu@ffe40000: interrupt-names:2: 'gpu' was expected Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit b7c1b40abc6678404a64fc8ea3a144d62abaca50 Merge: 54ecb8f7028c 2ba738d56db4 Author: Stephen Boyd Date: Wed Nov 6 11:32:03 2019 -0800 Merge tag 'clk-renesas-for-v5.5-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: - Switch some clocks on R-Car Gen2/3 to .determine_rate() - Add support for the new R-Car M3-W+ (r8a77961) SoC - Add support for the new RZ/G2N (r8a774b1) SoC - Remove R-Car Gen2 legacy DT clock support - Improve arithmetic divisions on R-Car Gen2 and Gen3 - Improve R-Car Gen3 SD clock handling * tag 'clk-renesas-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: (23 commits) clk: renesas: r8a7796: Add R8A77961 CPG/MSSR support clk: renesas: Rename CLK_R8A7796 to CLK_R8A77960 dt-bindings: clock: renesas: cpg-mssr: Document r8a77961 support clk: renesas: r8a77965: Remove superfluous semicolon dt-bindings: clock: renesas: rcar-usb2-clock-sel: Fix typo in example dt-bindings: clock: renesas: Remove R-Car Gen2 legacy DT bindings dt-bindings: clock: Add r8a77961 CPG Core Clock Definitions dt-bindings: power: Add r8a77961 SYSC power domain definitions clk: renesas: rcar-gen3: Switch SD clocks to .determine_rate() clk: renesas: rcar-gen3: Switch Z clocks to .determine_rate() clk: renesas: rcar-gen2: Switch Z clock to .determine_rate() clk: renesas: r8a774b1: Add TMU clock clk: renesas: cpg-mssr: Add r8a774b1 support dt-bindings: clock: renesas: cpg-mssr: Document r8a774b1 binding clk: renesas: rcar-gen3: Loop to find best rate in cpg_sd_clock_round_rate() clk: renesas: rcar-gen3: Absorb cpg_sd_clock_calc_div() clk: renesas: rcar-gen3: Avoid double table iteration in SD .set_rate() clk: renesas: rcar-gen3: Improve arithmetic divisions clk: renesas: rcar-gen2: Improve arithmetic divisions clk: renesas: Remove R-Car Gen2 legacy DT clock support ... commit 606324409b266b09bd7dd12d802672d7fa9aaf21 Merge: 54ecb8f7028c 45f10dabb56b Author: Stephen Boyd Date: Wed Nov 6 11:28:50 2019 -0800 Merge tag 'clk-v5.5-samsung' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-samsung Pull Samsung clk driver updates from Sylwester Nawrocki: - Addition of rate table for the VPLL and GPU related clock tree definition update to allow the GPU driver for setting the GPU's clock without requiring detailed knowledge of clock topology on each exynos542x SoC - Fix for potential CPU performance degradation after system suspend/resume cycle on exynos542x SoCs * tag 'clk-v5.5-samsung' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: exynos5420: Add SET_RATE_PARENT flag to clocks on G3D path clk: samsung: exynos5420: Preserve CPU clocks configuration during suspend/resume clk: samsung: exynos5420: Add VPLL rate table clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU clk: samsung: exynos5433: Fix error paths commit 874e476ba949deb475378e10df7527921e4ff6c1 Author: Leon Romanovsky Date: Tue Oct 29 08:27:44 2019 +0200 RDMA/qib: Delete empty check_cc_key function Function always returns zero, just delete it. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit fac3810fb0b261716122b8337357358013920938 Merge: 54ecb8f7028c 50bf025b7590 Author: Stephen Boyd Date: Wed Nov 6 11:20:14 2019 -0800 Merge tag 'clk-meson-v5.5-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clk updates from Jerome Brunet: - Add sm1 support in the Amlogic audio clock controller * tag 'clk-meson-v5.5-1' of https://github.com/BayLibre/clk-meson: clk: meson: axg-audio: use devm_platform_ioremap_resource() to simplify code clk: meson: axg_audio: add sm1 support clk: meson: axg-audio: provide clk top signal name clk: meson: axg-audio: prepare sm1 addition clk: meson: axg-audio: fix regmap last register clk: meson: axg-audio: remove useless defines dt-bindings: clock: meson: add sm1 resets to the axg-audio controller dt-bindings: clk: axg-audio: add sm1 bindings clk: meson: g12a: set CLK_MUX_ROUND_CLOSEST on the cpu clock muxes clk: meson: g12a: fix cpu clock rate setting clk: meson: gxbb: let sar_adc_clk_div set the parent clock rate commit 89b3d86403f1025f6b430d8f9ffc590efbadce62 Author: Shirish S Date: Wed Oct 30 14:20:46 2019 +0530 drm/amdgpu: dont schedule jobs while in reset [Why] doing kthread_park()/unpark() from drm_sched_entity_fini while GPU reset is in progress defeats all the purpose of drm_sched_stop->kthread_park. If drm_sched_entity_fini->kthread_unpark() happens AFTER drm_sched_stop->kthread_park nothing prevents from another (third) thread to keep submitting job to HW which will be picked up by the unparked scheduler thread and try to submit to HW but fail because the HW ring is deactivated. [How] grab the reset lock before calling drm_sched_entity_fini() Signed-off-by: Shirish S Suggested-by: Christian König Reviewed-by: Christian König Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit e2f619aa14b68aff4c1442acffdb6a322c613c06 Author: Alex Deucher Date: Wed Oct 30 13:29:52 2019 -0400 drm/amdgpu/arcturus: properly set BANK_SELECT and FRAGMENT_SIZE These were not aligned for optimal performance for GPUVM. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 688eec9d3dca2a3db3824e66463f086c70fa1b9f Author: Leon Romanovsky Date: Tue Oct 29 08:27:43 2019 +0200 RDMA/qib: Delete extra line Trivial cleanup to fix the following warning: drivers/infiniband/hw/qib/qib_iba6120.c:1420: warning: bad line: Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters") Link: https://lore.kernel.org/r/20191029062745.7932-15-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8a80cf93106045cd9e36330e153d0e606428619e Author: Leon Romanovsky Date: Tue Oct 29 08:27:30 2019 +0200 RDMA/mad: Delete never implemented functions Delete never implemented and used MAD functions. Link: https://lore.kernel.org/r/20191029062745.7932-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 77cf98d4ec90e8c48592c6537cfc2281c58f7ac3 Author: Bart Van Assche Date: Fri Nov 1 13:47:56 2019 -0700 Revert "RDMA/srpt: Postpone HCA removal until after configfs directory removal" Although the mentioned patch fixes a use-after-free bug, it introduces a hang during shutdown. Since the latter is worse, revert this patch. Link: https://lore.kernel.org/r/20191101204756.182162-1-bvanassche@acm.org Reported-by: Honggang Li Fixes: 9b64f7d0bb0a ("RDMA/srpt: Postpone HCA removal until after configfs directory removal") Signed-off-by: Bart Van Assche Acked-by: Honggang Li Signed-off-by: Jason Gunthorpe commit fdfc6997bd083acd066db99792694fa8a31a6cac Author: Christian Hewitt Date: Mon Oct 21 12:20:04 2019 +0400 soc: amlogic: meson-gx-socinfo: Fix S905D3 ID for VIM3L Chip on the board is S905D3 not S905X3: [ 0.098998] soc soc0: Amlogic Meson SM1 (S905D3) Revision 2b:c (b0:2) Detected Change from v1: use 0xf0 mask instead of 0xf2 as advised by Neil Armstrong. Fixes: 1d7c541b8a5b ("soc: amlogic: meson-gx-socinfo: Add S905X3 ID for VIM3L") Signed-off-by: Christian Hewitt Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 71c780f1191fbbc63dcd76dd750ee413d373dabd Author: Roman Mashak Date: Tue Nov 5 16:43:28 2019 -0500 tc-testing: updated pedit TDC tests Added tests for u8/u32 clear value, u8/16 retain value, u16/32 invert value, u8/u16/u32 preserve value and test for negative offsets. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller commit 462ef97526861900f1e66541d23e0c37b8c7d1cc Author: Jakub Kicinski Date: Tue Nov 5 13:28:17 2019 -0800 selftests: devlink: undo changes at the end of resource_test The netdevsim object is reused by all the tests, but the resource tests puts it into a broken state (failed reload in a different namespace). Make sure it's fixed up at the end of that test otherwise subsequent tests fail. Fixes: b74c37fd35a2 ("selftests: netdevsim: add tests for devlink reload with resources") Signed-off-by: Jakub Kicinski Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit b6645a72359590ad7f57050d192cd5d8885320df Author: Ian Rogers Date: Wed Oct 30 15:34:43 2019 -0700 perf parse: Ensure config and str in terms are unique Make it easier to release memory associated with parse event terms by duplicating the string for the config name and ensuring the val string is a duplicate. Currently the parser may memory leak terms and this is addressed in a later patch. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jin Yao Cc: John Garry Cc: Kan Liang 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: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191030223448.12930-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 448d732cefb3b4017f687f18c300e48354ddc240 Author: Ian Rogers Date: Wed Oct 30 15:34:39 2019 -0700 perf parse: Add parse events handle error Parse event error handling may overwrite one error string with another creating memory leaks. Introduce a helper routine that warns about multiple error messages as well as avoiding the memory leak. A reproduction of this problem can be seen with: perf stat -e c/c/ After this change this produces: WARNING: multiple event parsing errors event syntax error: 'c/c/' \___ unknown term valid terms: event,filter_rem,filter_opc0,edge,filter_isoc,filter_tid,filter_loc,filter_nc,inv,umask,filter_opc1,tid_en,thresh,filter_all_op,filter_not_nm,filter_state,filter_nm,config,config1,config2,name,period,percore Run 'perf list' for a list of valid events Usage: perf stat [] [] -e, --event event selector. use 'perf list' to list available events Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jin Yao Cc: John Garry Cc: Kan Liang 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: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191030223448.12930-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ef5502a1d9bd042dcf457378a6ac96701e498b1b Author: Adrian Hunter Date: Tue Nov 5 12:00:57 2019 +0200 perf inject: Make --strip keep evsels create_gcov (refer to the autofdo example in tools/perf/Documentation/intel-pt.txt) now needs the evsels to read the perf.data file. So don't strip them. Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191105100057.21465-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 71f699078b154fcb1c9162fd0208ada9ce532ffc Author: John Garry Date: Wed Nov 6 21:00:54 2019 +0800 perf tools: Fix cross compile for ARM64 Currently when cross compiling perf tool for ARM64 on my x86 machine I get this error: arch/arm64/util/sym-handling.c:9:10: fatal error: gelf.h: No such file or directory #include For the build, libelf is reported off: Auto-detecting system features: ... ... libelf: [ OFF ] Indeed, test-libelf is not built successfully: more ./build/feature/test-libelf.make.output test-libelf.c:2:10: fatal error: libelf.h: No such file or directory #include ^~~~~~~~~~ compilation terminated. I have no such problems natively compiling on ARM64, and I did not previously have this issue for cross compiling. Fix by relocating the gelf.h include. Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/1573045254-39833-1-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 86895b480a2f10c7c6659fc5312f84b93011ce2d Author: Jiri Olsa Date: Wed Aug 28 10:17:43 2019 +0200 perf stat: Add --per-node agregation support Adding new --per-node option to aggregate counts per NUMA nodes for system-wide mode measurements. You can specify --per-node in live mode: # perf stat -a -I 1000 -e cycles --per-node # time node cpus counts unit events 1.000542550 N0 20 6,202,097 cycles 1.000542550 N1 20 639,559 cycles 2.002040063 N0 20 7,412,495 cycles 2.002040063 N1 20 2,185,577 cycles 3.003451699 N0 20 6,508,917 cycles 3.003451699 N1 20 765,607 cycles ... Or in the record/report stat session: # perf stat record -a -I 1000 -e cycles # time counts unit events 1.000536937 10,008,468 cycles 2.002090152 9,578,539 cycles 3.003625233 7,647,869 cycles 4.005135036 7,032,086 cycles ^C 4.340902364 3,923,893 cycles # perf stat report --per-node # time node cpus counts unit events 1.000536937 N0 20 9,355,086 cycles 1.000536937 N1 20 653,382 cycles 2.002090152 N0 20 7,712,838 cycles 2.002090152 N1 20 1,865,701 cycles 3.003625233 N0 20 6,604,441 cycles 3.003625233 N1 20 1,043,428 cycles 4.005135036 N0 20 6,350,522 cycles 4.005135036 N1 20 681,564 cycles 4.340902364 N0 20 3,403,188 cycles 4.340902364 N1 20 520,705 cycles Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Joe Mario Cc: Kan Liang Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190904073415.723-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 389799a7a1e86c55f38897e679762efadcc9dedd Author: Jiri Olsa Date: Thu Aug 29 13:31:48 2019 +0200 perf env: Add perf_env__numa_node() To speed up cpu to node lookup, add perf_env__numa_node(), that creates cpu array on the first lookup, that holds numa nodes for each stored cpu. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Joe Mario Cc: Kan Liang Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190904073415.723-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 61ec07f5917ec6d58d415d46e54dea452237b26e Author: Haiyan Song Date: Thu Oct 31 12:36:08 2019 -0300 perf vendor events intel: Update all the Intel JSON metrics from TMAM 3.6. New Metrics: - DSB_Switches: fraction of cycles CPU was stalled due to switches from DSB to MITE pipeline [all] - L2_Evictions_{Silent|NonSilent}_PKI: L2 {silent|non silent} ecivtions rate per Kilo instruction [SKX+] - IpFarBranch - Instructions per Far Branch Other Enhancements & fixes: - KBLR/CFL & CLX move to separate columns (no column sharing via if #model) - Re-organized/renamed Metric Group Signed-off-by: Haiyan Song Reviewed-by: Kan Liang Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Link: http://lore.kernel.org/lkml/20191030082308.10919-1-haiyanx.song@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 7fcf1b89c88d9db4337914ef275f2da8a4253bca Author: Haiyan Song Date: Tue Oct 15 11:08:24 2019 +0800 perf vendor events intel: Update CascadelakeX events to v1.05 Update CascadelakeX events to v1.05. Other changes: remove duplicated and without description events. Signed-off-by: Haiyan Song Reviewed-by: Kan Liang Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Link: http://lore.kernel.org/lkml/20191030082308.10919-1-haiyanx.song@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8e8714c3d157568b7a769917a5e05573bbaf5af0 Author: Ian Rogers Date: Fri Oct 25 11:08:22 2019 -0700 perf tools: Splice events onto evlist even on error If event parsing fails the event list is leaked, instead splice the list onto the out result and let the caller cleanup. An example input for parse_events found by libFuzzer that reproduces this memory leak is 'm{'. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jin Yao Cc: John Garry Cc: Kan Liang 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: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191025180827.191916-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 22bd8f1b5a1dd168ba4eba27cb17643a11012f5d Author: James Clark Date: Mon Oct 28 11:34:01 2019 +0000 libsubcmd: Use -O0 with DEBUG=1 When a 'make DEBUG=1' build is done, the command parser is still built with -O6 and is hard to step through, fix it making it use -O0 in that case. Signed-off-by: James Clark Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: nd Link: http://lore.kernel.org/lkml/20191028113340.4282-1-james.clark@arm.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit d894967fcaa469cb4c43544855f6fcc18045d526 Author: James Clark Date: Mon Oct 28 11:34:01 2019 +0000 libsubcmd: Move EXTRA_FLAGS to the end to allow overriding existing flags Move EXTRA_WARNINGS and EXTRA_FLAGS to the end of the compilation line, otherwise they cannot be used to override the default values. Signed-off-by: James Clark Cc: Adrian Hunter Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: nd Link: http://lore.kernel.org/lkml/20191028113340.4282-1-james.clark@arm.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 50481461cfe937289724643691a752fa15a600c9 Author: Arnaldo Carvalho de Melo Date: Mon Oct 28 11:55:28 2019 -0300 perf map_groups: Introduce for_each_entry() and for_each_entry_safe() iterators To reduce boilerplate, providing a more compact form to iterate over the maps in a map_group. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-gc3go6fmdn30twusg91t2q56@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8efc4f05685dae2da1d21973eba5e59e7863c77f Author: Arnaldo Carvalho de Melo Date: Mon Oct 28 11:31:38 2019 -0300 perf maps: Add for_each_entry()/_safe() iterators To reduce boilerplate, provide a more compact form using an idiom present in other trees of data structures. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-59gmq4kg1r68ou1wknyjl78x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 20419d3a5bc0a278ed7e2ee54943674004411933 Author: Arnaldo Carvalho de Melo Date: Mon Oct 28 11:50:12 2019 -0300 perf map: Allow map__next() to receive a NULL arg Just like free(), return NULL in that case, will simplify the for_each_entry_safe() iterators. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-pbde2ucn49khnrebclys9pny@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ee2555b612869a763563c5389ad789a52db0afd1 Author: Arnaldo Carvalho de Melo Date: Fri Oct 25 15:14:50 2019 -0300 perf map: Check if the map still has some refcounts on exit We were checking just if it was still on some rb tree, but that is not the only way that this map can still have references, map->refcnt is there exactly for this, use it. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-hany65tbeavsax7n3xvwl9pc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b86a9d918a389162803d833d4dc491fde9b62fa2 Author: Adrian Hunter Date: Fri Oct 25 15:59:57 2019 +0300 perf dso: Add dso__data_write_cache_addr() Add functions to write into the dso file data cache, but not change the file itself. Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20191025130000.13032-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 366df72657e0cd6bd072b56a48e63b8d89718f70 Author: Adrian Hunter Date: Fri Oct 25 15:59:56 2019 +0300 perf dso: Refactor dso_cache__read() Refactor dso_cache__read() to separate populating the cache from copying data from it. This is preparation for adding a cache "write" that will update the data in the cache. Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20191025130000.13032-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit fd62c1097a0700484fc2cbc9a182f341f30890cd Author: Adrian Hunter Date: Fri Oct 25 15:59:59 2019 +0300 perf auxtrace: Add auxtrace_cache__remove() Add auxtrace_cache__remove(). Intel PT uses an auxtrace_cache to store the results of code-walking, so that the same block of instructions does not have to be decoded repeatedly. However, when there are text poke events, the associated cache entries need to be removed. Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20191025130000.13032-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit af04dd2f8ebaa8fbd46f698714acbf43da14da45 Author: Masami Hiramatsu Date: Fri Oct 25 17:47:10 2019 +0900 perf probe: Fix to show ranges of variables in functions without entry_pc Fix to show ranges of variables (--range and --vars option) in functions which DIE has only ranges but no entry_pc attribute. Without this fix: # perf probe --range -V clear_tasks_mm_cpumask Available variables at clear_tasks_mm_cpumask @ (No matched variables) With this fix: # perf probe --range -V clear_tasks_mm_cpumask Available variables at clear_tasks_mm_cpumask @ [VAL] int cpu @ Committer testing: Before: [root@quaco ~]# perf probe --range -V clear_tasks_mm_cpumask Available variables at clear_tasks_mm_cpumask @ (No matched variables) [root@quaco ~]# After: [root@quaco ~]# perf probe --range -V clear_tasks_mm_cpumask Available variables at clear_tasks_mm_cpumask @ [VAL] int cpu @ [root@quaco ~]# Using it: [root@quaco ~]# perf probe clear_tasks_mm_cpumask cpu Added new event: probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask with cpu) You can now use it in all perf tools, such as: perf record -e probe:clear_tasks_mm_cpumask -aR sleep 1 [root@quaco ~]# perf probe -l probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask@kernel/cpu.c with cpu) [root@quaco ~]# [root@quaco ~]# perf trace -e probe:*cpumask ^C[root@quaco ~]# Fixes: 349e8d261131 ("perf probe: Add --range option to show a variable's location range") Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157199323018.8075.8179744380479673672.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 18e21eb671dc87a4f0546ba505a89ea93598a634 Author: Masami Hiramatsu Date: Fri Oct 25 17:47:01 2019 +0900 perf probe: Fix to show inlined function callsite without entry_pc Fix 'perf probe --line' option to show inlined function callsite lines even if the function DIE has only ranges. Without this: # perf probe -L amd_put_event_constraints ... 2 { 3 if (amd_has_nb(cpuc) && amd_is_nb_event(&event->hw)) __amd_put_nb_event_constraints(cpuc, event); 5 } With this patch: # perf probe -L amd_put_event_constraints ... 2 { 3 if (amd_has_nb(cpuc) && amd_is_nb_event(&event->hw)) 4 __amd_put_nb_event_constraints(cpuc, event); 5 } Committer testing: Before: [root@quaco ~]# perf probe -L amd_put_event_constraints 0 static void amd_put_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) 2 { 3 if (amd_has_nb(cpuc) && amd_is_nb_event(&event->hw)) __amd_put_nb_event_constraints(cpuc, event); 5 } PMU_FORMAT_ATTR(event, "config:0-7,32-35"); PMU_FORMAT_ATTR(umask, "config:8-15" ); [root@quaco ~]# After: [root@quaco ~]# perf probe -L amd_put_event_constraints 0 static void amd_put_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) 2 { 3 if (amd_has_nb(cpuc) && amd_is_nb_event(&event->hw)) 4 __amd_put_nb_event_constraints(cpuc, event); 5 } PMU_FORMAT_ATTR(event, "config:0-7,32-35"); PMU_FORMAT_ATTR(umask, "config:8-15" ); [root@quaco ~]# perf probe amd_put_event_constraints:4 Added new event: probe:amd_put_event_constraints (on amd_put_event_constraints:4) You can now use it in all perf tools, such as: perf record -e probe:amd_put_event_constraints -aR sleep 1 [root@quaco ~]# [root@quaco ~]# perf probe -l probe:amd_put_event_constraints (on amd_put_event_constraints:4@arch/x86/events/amd/core.c) probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask@kernel/cpu.c) [root@quaco ~]# Using it: [root@quaco ~]# perf trace -e probe:* ^C[root@quaco ~]# Ok, Intel system here... :-) Fixes: 4cc9cec636e7 ("perf probe: Introduce lines walker interface") Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157199322107.8075.12659099000567865708.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 3895534dd78f0fd4d3f9e05ee52b9cdd444a743e Author: Masami Hiramatsu Date: Fri Oct 25 17:46:52 2019 +0900 perf probe: Fix to list probe event with correct line number Since debuginfo__find_probe_point() uses dwarf_entrypc() for finding the entry address of the function on which a probe is, it will fail when the function DIE has only ranges attribute. To fix this issue, use die_entrypc() instead of dwarf_entrypc(). Without this fix, perf probe -l shows incorrect offset: # perf probe -l probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask+18446744071579263632@work/linux/linux/kernel/cpu.c) probe:clear_tasks_mm_cpumask_1 (on clear_tasks_mm_cpumask+18446744071579263752@work/linux/linux/kernel/cpu.c) With this: # perf probe -l probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask@work/linux/linux/kernel/cpu.c) probe:clear_tasks_mm_cpumask_1 (on clear_tasks_mm_cpumask:21@work/linux/linux/kernel/cpu.c) Committer testing: Before: [root@quaco ~]# perf probe -l probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask+18446744071579765152@kernel/cpu.c) [root@quaco ~]# After: [root@quaco ~]# perf probe -l probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask@kernel/cpu.c) [root@quaco ~]# Fixes: 1d46ea2a6a40 ("perf probe: Fix listing incorrect line number with inline function") Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157199321227.8075.14655572419136993015.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit eb6933b29d20bf2c3053883d409a53f462c1a3ac Author: Masami Hiramatsu Date: Fri Oct 25 17:46:43 2019 +0900 perf probe: Fix to probe an inline function which has no entry pc Fix perf probe to probe an inlne function which has no entry pc or low pc but only has ranges attribute. This seems very rare case, but I could find a few examples, as same as probe_point_search_cb(), use die_entrypc() to get the entry address in probe_point_inline_cb() too. Without this patch: # perf probe -D __amd_put_nb_event_constraints Failed to get entry address of __amd_put_nb_event_constraints. Probe point '__amd_put_nb_event_constraints' not found. Error: Failed to add events. With this patch: # perf probe -D __amd_put_nb_event_constraints p:probe/__amd_put_nb_event_constraints amd_put_event_constraints+43 Committer testing: Before: [root@quaco ~]# perf probe -D __amd_put_nb_event_constraints Failed to get entry address of __amd_put_nb_event_constraints. Probe point '__amd_put_nb_event_constraints' not found. Error: Failed to add events. [root@quaco ~]# After: [root@quaco ~]# perf probe -D __amd_put_nb_event_constraints p:probe/__amd_put_nb_event_constraints _text+33789 [root@quaco ~]# Fixes: 4ea42b181434 ("perf: Add perf probe subcommand, a kprobe-event setup helper") Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157199320336.8075.16189530425277588587.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 5d16dbcc311d91267ddb45c6da4f187be320ecee Author: Masami Hiramatsu Date: Fri Oct 25 17:46:34 2019 +0900 perf probe: Fix to probe a function which has no entry pc Fix 'perf probe' to probe a function which has no entry pc or low pc but only has ranges attribute. probe_point_search_cb() uses dwarf_entrypc() to get the probe address, but that doesn't work for the function DIE which has only ranges attribute. Use die_entrypc() instead. Without this fix: # perf probe -k ../build-x86_64/vmlinux -D clear_tasks_mm_cpumask:0 Probe point 'clear_tasks_mm_cpumask' not found. Error: Failed to add events. With this: # perf probe -k ../build-x86_64/vmlinux -D clear_tasks_mm_cpumask:0 p:probe/clear_tasks_mm_cpumask clear_tasks_mm_cpumask+0 Committer testing: Before: [root@quaco ~]# perf probe clear_tasks_mm_cpumask:0 Probe point 'clear_tasks_mm_cpumask' not found. Error: Failed to add events. [root@quaco ~]# After: [root@quaco ~]# perf probe clear_tasks_mm_cpumask:0 Added new event: probe:clear_tasks_mm_cpumask (on clear_tasks_mm_cpumask) You can now use it in all perf tools, such as: perf record -e probe:clear_tasks_mm_cpumask -aR sleep 1 [root@quaco ~]# Using it with 'perf trace': [root@quaco ~]# perf trace -e probe:clear_tasks_mm_cpumask Doesn't seem to be used in x86_64: $ find . -name "*.c" | xargs grep clear_tasks_mm_cpumask ./kernel/cpu.c: * clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU ./kernel/cpu.c:void clear_tasks_mm_cpumask(int cpu) ./arch/xtensa/kernel/smp.c: clear_tasks_mm_cpumask(cpu); ./arch/csky/kernel/smp.c: clear_tasks_mm_cpumask(cpu); ./arch/sh/kernel/smp.c: clear_tasks_mm_cpumask(cpu); ./arch/arm/kernel/smp.c: clear_tasks_mm_cpumask(cpu); ./arch/powerpc/mm/nohash/mmu_context.c: clear_tasks_mm_cpumask(cpu); $ find . -name "*.h" | xargs grep clear_tasks_mm_cpumask ./include/linux/cpu.h:void clear_tasks_mm_cpumask(int cpu); $ find . -name "*.S" | xargs grep clear_tasks_mm_cpumask $ Fixes: e1ecbbc3fa83 ("perf probe: Fix to handle optimized not-inlined functions") Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157199319438.8075.4695576954550638618.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 07d369857808b7e8e471bbbbb0074a6718f89b31 Author: Masami Hiramatsu Date: Fri Oct 25 17:46:25 2019 +0900 perf probe: Fix wrong address verification Since there are some DIE which has only ranges instead of the combination of entrypc/highpc, address verification must use dwarf_haspc() instead of dwarf_entrypc/dwarf_highpc. Also, the ranges only DIE will have a partial code in different section (e.g. unlikely code will be in text.unlikely as "FUNC.cold" symbol). In that case, we can not use dwarf_entrypc() or die_entrypc(), because the offset from original DIE can be a minus value. Instead, this simply gets the symbol and offset from symtab. Without this patch; # perf probe -D clear_tasks_mm_cpumask:1 Failed to get entry address of clear_tasks_mm_cpumask Error: Failed to add events. And with this patch: # perf probe -D clear_tasks_mm_cpumask:1 p:probe/clear_tasks_mm_cpumask clear_tasks_mm_cpumask+0 p:probe/clear_tasks_mm_cpumask_1 clear_tasks_mm_cpumask+5 p:probe/clear_tasks_mm_cpumask_2 clear_tasks_mm_cpumask+8 p:probe/clear_tasks_mm_cpumask_3 clear_tasks_mm_cpumask+16 p:probe/clear_tasks_mm_cpumask_4 clear_tasks_mm_cpumask+82 Committer testing: I managed to reproduce the above: [root@quaco ~]# perf probe -D clear_tasks_mm_cpumask:1 p:probe/clear_tasks_mm_cpumask _text+919968 p:probe/clear_tasks_mm_cpumask_1 _text+919973 p:probe/clear_tasks_mm_cpumask_2 _text+919976 [root@quaco ~]# But then when trying to actually put the probe in place, it fails if I use :0 as the offset: [root@quaco ~]# perf probe -L clear_tasks_mm_cpumask | head -5 0 void clear_tasks_mm_cpumask(int cpu) 1 { 2 struct task_struct *p; [root@quaco ~]# perf probe clear_tasks_mm_cpumask:0 Probe point 'clear_tasks_mm_cpumask' not found. Error: Failed to add events. [root@quaco The next patch is needed to fix this case. Fixes: 576b523721b7 ("perf probe: Fix probing symbols with optimization suffix") Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157199318513.8075.10463906803299647907.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 1785fbb73896dbd9d27a406f0d73047df42db710 Author: Yunfeng Ye Date: Wed Oct 16 21:50:17 2019 +0800 perf jevents: Fix resource leak in process_mapfile() and main() There are memory leaks and file descriptor resource leaks in process_mapfile() and main(). Fix this by adding free(), fclose() and free_arch_std_events() on the error paths. Fixes: 80eeb67fe577 ("perf jevents: Program to convert JSON file") Fixes: 3f056b66647b ("perf jevents: Make build fail on JSON parse error") Fixes: e9d32c1bf0cd ("perf vendor events: Add support for arch standard events") Signed-off-by: Yunfeng Ye Cc: Alexander Shishkin Cc: Andi Kleen Cc: Feilong Lin Cc: Hu Shiyuan Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Luke Mujica Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zenghui Yu Link: http://lore.kernel.org/lkml/d7907042-ec9c-2bef-25b4-810e14602f89@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 91e2f539eeda26ab00bd03fae8dc434c128c85ed Author: Masami Hiramatsu Date: Thu Oct 24 18:12:54 2019 +0900 perf probe: Fix to show function entry line as probe-able Fix die_walk_lines() to list the function entry line correctly. Since the dwarf_entrypc() does not return the entry pc if the DIE has only range attribute, __die_walk_funclines() fails to list the declaration line (entry line) in that case. To solve this issue, this introduces die_entrypc() which correctly returns the entry PC (the first address range) even if the DIE has only range attribute. With this fix die_walk_lines() shows the function entry line is able to probe correctly. Fixes: 4cc9cec636e7 ("perf probe: Introduce lines walker interface") Signed-off-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157190837419.1859.4619125803596816752.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit acb6a7047ac2146b723fef69ee1ab6b7143546bf Author: Masami Hiramatsu Date: Thu Oct 24 18:12:45 2019 +0900 perf probe: Walk function lines in lexical blocks Since some inlined functions are in lexical blocks of given function, we have to recursively walk through the DIE tree. Without this fix, perf-probe -L can miss the inlined functions which is in a lexical block (like if (..) { func() } case.) However, even though, to walk the lines in a given function, we don't need to follow the children DIE of inlined functions because those do not have any lines in the specified function. We need to walk though whole trees only if we walk all lines in a given file, because an inlined function can include another inlined function in the same file. Fixes: b0e9cb2802d4 ("perf probe: Fix to search nested inlined functions in CU") Signed-off-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157190836514.1859.15996864849678136353.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit b77afa1f810f37bd8a36cb1318178dfe2d7af6b6 Author: Masami Hiramatsu Date: Thu Oct 24 18:12:36 2019 +0900 perf probe: Fix to find range-only function instance Fix die_is_func_instance() to find range-only function instance. In some case, a function instance can be made without any low PC or entry PC, but only with address ranges by optimization. (e.g. cold text partially in "text.unlikely" section) To find such function instance, we have to check the range attribute too. Fixes: e1ecbbc3fa83 ("perf probe: Fix to handle optimized not-inlined functions") Signed-off-by: Masami Hiramatsu Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/157190835669.1859.8368628035930950596.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 4bfbcf3ee1cce3c2ea9870287fc34d3391d5a9b0 Author: Igor Lubashev Date: Tue Oct 22 21:54:53 2019 -0400 perf kvm: Use evlist layer api when possible No need for layer violations when a proper evlist api is available. Signed-off-by: Igor Lubashev Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1571795693-23558-4-git-send-email-ilubashe@akamai.com Signed-off-by: Arnaldo Carvalho de Melo commit b7dc21f546d854aea75245efd88d455f39f5d005 Author: Leo Yan Date: Wed Oct 23 16:33:24 2019 +0800 perf tests: Fix a typo Correct typo in comment: s/suck/stuck. Signed-off-by: Leo Yan Reported-by: Will Deacon Cc: Alexander Shishkin Cc: Florian Fainelli Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191023083324.12093-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 826100a7ce9a659b42140710ebe789d710799048 Author: Ian Rogers Date: Tue Oct 22 17:53:33 2019 -0700 perf tools: Avoid a malloc() for array events Use realloc() rather than malloc()+memcpy() to possibly avoid a memory allocation when appending array elements. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jin Yao Cc: John Garry Cc: Kan Liang 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: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191023005337.196160-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a26e47162d7670ddea4f67978ecf848dc23ef671 Author: Ian Rogers Date: Tue Oct 22 17:53:32 2019 -0700 perf tools: Move ALLOC_LIST into a function Having a YYABORT in a macro makes it hard to free memory for components of a rule. Separate the logic out. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jin Yao Cc: John Garry Cc: Kan Liang 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: clang-built-linux@googlegroups.com Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191023005337.196160-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2ccfb8bc2143ca347609d1d4434176d73a78d805 Author: Andi Kleen Date: Sun Oct 20 10:51:55 2019 -0700 perf evsel: Avoid close(-1) In some weak fallback cases close can be called a lot with -1. Check for this case and avoid calling close then. This is mainly to shut up valgrind which complains about this case. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191020175202.32456-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 796c01a4bfb4b35ec6d1bd1cd5d520515d078b51 Author: Andi Kleen Date: Sun Oct 20 10:51:54 2019 -0700 perf evsel: Always preserve errno while cleaning up perf_event_open failures In some cases when perf_event_open fails, it may do some closes to clean up. In special cases these closes can fail too, which overwrites the errno of the perf_event_open, which is then incorrectly reported. Save/restore errno around closes. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191020175202.32456-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 9d604aad4bb022e848dec80d6fe5f73fe87061a2 Author: Leo Yan Date: Mon Oct 21 15:48:08 2019 +0800 perf cs-etm: Fix definition of macro TO_CS_QUEUE_NR Macro TO_CS_QUEUE_NR definition has a typo, which uses 'trace_id_chan' as its parameter, this doesn't match with its definition body which uses 'trace_chan_id'. So renames the parameter to 'trace_chan_id'. It's luck to have a local variable 'trace_chan_id' in the function cs_etm__setup_queue(), even we wrongly define the macro TO_CS_QUEUE_NR, the local variable 'trace_chan_id' is used rather than the macro's parameter 'trace_id_chan'; so the compiler doesn't complain for this before. After renaming the parameter, it leads to a compiling error due cs_etm__setup_queue() has no variable 'trace_id_chan'. This patch uses the variable 'trace_chan_id' for the macro so that fixes the compiling error. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight ml Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20191021074808.25795-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit a33d2611986ab7c0ac617a8b637fedf013184b98 Author: Arnaldo Carvalho de Melo Date: Mon Oct 21 16:01:26 2019 -0300 perf llvm: Make .o saving a debug message, not an info one Its a bit annoying to have that message, better make it a debug one. I.e. now this message will only appear when using '-v': [root@quaco tracebuffer]# trace -e bristot.c LLVM: dumping bristot.o ^C[root@quaco tracebuffer]# Cc: Adrian Hunter Cc: Daniel Bristot de Oliveira Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-o7jd4i7s66kosec5torubqps@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit eeb399b531a1576e36016f8a7f0c50d10194e190 Author: Adrian Hunter Date: Fri Oct 4 11:31:21 2019 +0300 perf record: Put a copy of kcore into the perf.data directory Add a new 'perf record' option '--kcore' which will put a copy of /proc/kcore, kallsyms and modules into a perf.data directory. Note, that without the --kcore option, output goes to a file as previously. The tools' -o and -i options work with either a file name or directory name. Example: $ sudo perf record --kcore uname $ sudo tree perf.data perf.data ├── kcore_dir │   ├── kallsyms │   ├── kcore │   └── modules └── data $ sudo perf script -v build id event received for vmlinux: 1eaa285996affce2d74d8e66dcea09a80c9941de build id event received for [vdso]: 8bbaf5dc62a9b644b4d4e4539737e104e4a84541 Samples for 'cycles' event do not have CPU attribute set. Skipping 'cpu' field. Using CPUID GenuineIntel-6-8E-A Using perf.data/kcore_dir/kcore for kernel data Using perf.data/kcore_dir/kallsyms for symbols perf 19058 506778.423729: 1 cycles: ffffffffa2caa548 native_write_msr+0x8 (vmlinux) perf 19058 506778.423733: 1 cycles: ffffffffa2caa548 native_write_msr+0x8 (vmlinux) perf 19058 506778.423734: 7 cycles: ffffffffa2caa548 native_write_msr+0x8 (vmlinux) perf 19058 506778.423736: 117 cycles: ffffffffa2caa54a native_write_msr+0xa (vmlinux) perf 19058 506778.423738: 2092 cycles: ffffffffa2c9b7b0 native_apic_msr_write+0x0 (vmlinux) perf 19058 506778.423740: 37380 cycles: ffffffffa2f121d0 perf_event_addr_filters_exec+0x0 (vmlinux) uname 19058 506778.423751: 582673 cycles: ffffffffa303a407 propagate_protected_usage+0x147 (vmlinux) uname 19058 506778.423892: 2241841 cycles: ffffffffa2cae0c9 unwind_next_frame.part.5+0x79 (vmlinux) uname 19058 506778.424430: 2457397 cycles: ffffffffa3019232 check_memory_region+0x52 (vmlinux) Committer testing: # rm -rf perf.data* # perf record sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.024 MB perf.data (7 samples) ] # ls -l perf.data -rw-------. 1 root root 34772 Oct 21 11:08 perf.data # perf record --kcore uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.024 MB perf.data (7 samples) ] ls[root@quaco ~]# ls -lad perf.data* drwx------. 3 root root 4096 Oct 21 11:08 perf.data -rw-------. 1 root root 34772 Oct 21 11:08 perf.data.old # perf evlist -v cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 # perf evlist -v -i perf.data/data cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 # Signed-off-by: Adrian Hunter Reviewed-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: http://lore.kernel.org/lkml/20191004083121.12182-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 46e201efa15b70ec39df5237116fddebb4f5057c Author: Adrian Hunter Date: Fri Oct 4 11:31:20 2019 +0300 perf data: Support single perf.data file directory Support directory output that contains a regular perf.data file, named "data". By default the directory is named perf.data i.e. perf.data └── data Most of the infrastructure to support a directory is already there. This patch makes the changes needed to support the format above. Presently there is no 'perf record' option to output a directory. This is preparation for adding support for putting a copy of /proc/kcore in the directory. Signed-off-by: Adrian Hunter Reviewed-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191004083121.12182-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 01e97a59ea3e071e5c60ad46c40b4db748bfe928 Author: Jiri Olsa Date: Mon Oct 7 13:20:27 2019 +0200 perf session: Fix indent in perf_session__new()" Fix up indentation. Signed-off-by: Jiri Olsa Acked-by: Adrian Hunter Link: http://lore.kernel.org/lkml/20191007112027.GD6919@krava Signed-off-by: Arnaldo Carvalho de Melo commit 9b70b9db4e0cc03d224795a18088fdb916dec823 Author: Adrian Hunter Date: Fri Oct 4 11:31:19 2019 +0300 perf data: Rename directory "header" file to "data" In preparation to support a single file directory format, rename "header" to "data" because "header" is a mis-leading name when there is only 1 file. Note, in the multi-file case, the "header" file also contains data. Signed-off-by: Adrian Hunter Reviewed-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191004083121.12182-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3dedec4f5ccc8048b9a2cfe89838c3b3275b6b2b Author: Adrian Hunter Date: Fri Oct 4 11:31:18 2019 +0300 perf data: Move perf_dir_version into data.h perf_dir_version belongs to struct perf_data which is declared in data.h. To allow its use in inline perf_data functions, move perf_dir_version to data.h Signed-off-by: Adrian Hunter Reviewed-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191004083121.12182-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 490e6db09a9035d7b40a328a2a004ef70b6bdee6 Author: Adrian Hunter Date: Fri Oct 4 11:31:17 2019 +0300 perf data: Correctly identify directory data files In order to rename the "header" file to "data" without conflicting, correctly identify the non-header files as starting with "data." Signed-off-by: Adrian Hunter Reviewed-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191004083121.12182-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a9b97286fec1a87976ac7852ad65f2013faad9f6 Author: Claudiu Manoil Date: Tue Nov 5 20:18:21 2019 +0200 gianfar: Maximize Rx buffer size Until now the size of a Rx buffer was artificially limited to 1536B (which happens to be the default, after reset, hardware value for a Rx buffer). This approach however leaves unused memory space for Rx packets, since the driver uses a paged allocation scheme that reserves half a page for each Rx skb. There's also the inconvenience that frames around 1536 bytes can get scattered if the limit is slightly exceeded. This limit can be exceeded even for standard MTU of 1500B traffic, for common cases like stacked VLANs, or DSA tags. To address these issues, let's just compute the buffer size starting from the upper limit of 2KB (half a page) and subtract the skb overhead and alignment restrictions. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit 9439bb0f3656003308a479a9a785ec2e79cfeb39 Author: Yunfeng Ye Date: Tue Nov 5 19:30:45 2019 +0800 ehea: replace with page_shift() in ehea_is_hugepage() The function page_shift() is supported after the commit 94ad9338109f ("mm: introduce page_shift()"). So replace with page_shift() in ehea_is_hugepage() for readability. Signed-off-by: Yunfeng Ye Signed-off-by: David S. Miller commit 5d8876e2c2517e8f0b035f5566b1775f99d785ea Author: Zhu Yanjun Date: Wed Nov 6 01:01:11 2019 -0500 net: forcedeth: add xmit_more support This change adds support for xmit_more based on the igb commit 6f19e12f6230 ("igb: flush when in xmit_more mode and under descriptor pressure") and commit 6b16f9ee89b8 ("net: move skb->xmit_more hint to softnet data") that were made to igb to support this feature. The function netif_xmit_stopped is called to check whether transmit queue on device is currently unable to send to determine whether we must write the tail because we can add no further buffers. When normal packets and/or xmit_more packets fill up tx_desc, it is necessary to trigger NIC tx reg. Following the advice from David Miller and Jakub Kicinski, after the xmit_more feature is added, the following scenario will occur. | xmit_more packets | DMA_MAPPING | DMA_MAPPING error check | xmit_more packets already in HW xmit queue | In the above scenario, if DMA_MAPPING error occurrs, the xmit_more packets already in HW xmit queue will also be dropped. This is different from the behavior before xmit_more feature. So it is necessary to trigger NIC HW tx reg in the above scenario. To the non-xmit_more packets, the above scenario will not occur. Tested: - pktgen (xmit_more packets) SMP x86_64 -> Test command: ./pktgen_sample03_burst_single_flow.sh ... -b 8 -n 1000000 Test results: Params: ... burst: 8 ... Result: OK: 12194004(c12188996+d5007) usec, 1000001 (1500byte,0frags) 82007pps 984Mb/sec (984084000bps) errors: 0 - iperf (normal packets) SMP x86_64 -> Test command: Server: iperf -s Client: iperf -c serverip Result: TCP window size: 85.0 KByte (default) ------------------------------------------------------------ [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 1.10 GBytes 942 Mbits/sec CC: Joe Jin CC: JUNXIAO_BI Reported-and-tested-by: Nan san Signed-off-by: Zhu Yanjun Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit e5eb6366ac2d1df8ad5b010718ac1997ceae45be Author: Pavel Begunkov Date: Wed Nov 6 00:22:15 2019 +0300 io_uring: io_queue_link*() right after submit After a call to io_submit_sqe(), it's already known whether it needs to queue a link or not. Do it there, as it's simplier and doesn't keep an extra variable across the loop. Reviewed-by:Bob Liu Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ae9428ca61271b6b7f52ebbc359676c9fdfde523 Author: Pavel Begunkov Date: Wed Nov 6 00:22:14 2019 +0300 io_uring: Merge io_submit_sqes and io_ring_submit io_submit_sqes() and io_ring_submit() are doing the same stuff with a little difference. Deduplicate them. Reviewed-by:Bob Liu Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2acdcabb8a4089476208a822050dd47a6557290d Author: Dragos Tarcatu Date: Wed Nov 6 08:58:16 2019 -0600 ASoC: SOF: topology: Fix bytes control size checks When using the example SOF amp widget topology, KASAN dumps this when the AMP bytes kcontrol gets loaded: [ 9.579548] BUG: KASAN: slab-out-of-bounds in sof_control_load+0x8cc/0xac0 [snd_sof] [ 9.588194] Write of size 40 at addr ffff8882314559dc by task systemd-udevd/2411 Fix that by rejecting the topology if the bytes data size > max_size Fixes: 311ce4fe7637d ("ASoC: SOF: Add support for loading topologies") Reviewed-by: Jaska Uimonen Reviewed-by: Ranjani Sridharan Signed-off-by: Dragos Tarcatu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191106145816.9367-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fb90ab6ba93cb6bd590b031630e250a5367a5336 Merge: a3ead21d6eec acceca8d2416 Author: David S. Miller Date: Wed Nov 6 09:59:58 2019 -0800 Merge branch 'netdevsim-fix-tests-and-netdevsim' Jakub Kicinski says: ==================== netdevsim: fix tests and netdevsim The first patch fixes a merge which brought back some dead code. Next a tiny re-write of the main test using netdevsim aims to ease debugging. ==================== Signed-off-by: David S. Miller commit acceca8d2416bf866c5826240f9907cc91273f95 Author: Jakub Kicinski Date: Tue Nov 5 13:26:12 2019 -0800 selftests: bpf: log direct file writes Recent changes to netdevsim moved creating and destroying devices from netlink to sysfs. The sysfs writes have been implemented as direct writes, without shelling out. This is faster, but leaves no trace in the logs. Add explicit logs to make debugging possible. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller commit bfcccfe78b361f5f6ef48554aed5bcd30c72f67f Author: Jakub Kicinski Date: Tue Nov 5 13:26:11 2019 -0800 netdevsim: drop code duplicated by a merge Looks like the port adding loop makes a re-appearance on net-next after net was merged back into it (even though it doesn't feature in the merge diff). The ports are already added in nsim_dev_create() so when we try to add them again get EEXIST, and see: netdevsim: probe of netdevsim0 failed with error -17 in the logs. When we remove the loop again the nsim_dev_probe() and nsim_dev_remove() become a wrapper of nsim_dev_create() and nsim_dev_destroy(). Remove this layer of indirection. Fixes: d31e95585ca6 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") Signed-off-by: Jakub Kicinski Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit f530c1961af27f68a009b5fa532a4ed14f9c0e8c Author: Yan-Hsuan Chuang Date: Tue Nov 5 17:04:42 2019 +0800 rtw88: fix potential NULL pointer access for firmware Driver could access a NULL firmware pointer if we don't return here. Fixes: 5195b90426409 ("rtw88: avoid FW info flood") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 5174f1e41074b5186608badc2e89441d021e8c08 Author: Ping-Ke Shih Date: Tue Nov 5 10:18:38 2019 +0800 rtlwifi: fix memory leak in rtl92c_set_fw_rsvdpagepkt() This leak was found by testing the EDIMAX EW-7612 on Raspberry Pi 3B+ with Linux 5.4-rc5 (multi_v7_defconfig + rtlwifi + kmemleak) and noticed a single memory leak during probe: unreferenced object 0xec13ee40 (size 176): comm "kworker/u8:1", pid 36, jiffies 4294939321 (age 5580.790s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] __netdev_alloc_skb+0x9c/0x164 [<863dfa6e>] rtl92c_set_fw_rsvdpagepkt+0x254/0x340 [rtl8192c_common] [<9572be0d>] rtl92cu_set_hw_reg+0xf48/0xfa4 [rtl8192cu] [<116df4d8>] rtl_op_bss_info_changed+0x234/0x96c [rtlwifi] [<8933575f>] ieee80211_bss_info_change_notify+0xb8/0x264 [mac80211] [] ieee80211_assoc_success+0x934/0x1798 [mac80211] [] ieee80211_rx_mgmt_assoc_resp+0x174/0x314 [mac80211] [<5974629e>] ieee80211_sta_rx_queued_mgmt+0x3f4/0x7f0 [mac80211] [] ieee80211_iface_work+0x208/0x318 [mac80211] [] process_one_work+0x22c/0x564 [] worker_thread+0x44/0x5d8 [<82c7b073>] kthread+0x150/0x154 [] ret_from_fork+0x14/0x2c [<794dff30>] 0x0 It is because 8192cu doesn't implement usb_cmd_send_packet(), and this patch just frees the skb within the function to resolve memleak problem by now. Since 8192cu doesn't turn on fwctrl_lps that needs to download command packet for firmware via the function, applying this patch doesn't affect driver behavior. Reported-by: Stefan Wahren Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit a1f7c2cabf701a17b1a05d6526bbdadc3d05e05c Author: Daniel Golle Date: Sat Nov 2 18:47:01 2019 +0100 rt2800: remove errornous duplicate condition On 2019-10-28 06:07, wbob wrote: > Hello Roman, > > while reading around drivers/net/wireless/ralink/rt2x00/rt2800lib.c > I stumbled on what I think is an edit of yours made in error in march > 2017: > > https://github.com/torvalds/linux/commit/41977e86#diff-dae5dc10da180f3b055809a48118e18aR5281 > > RT6352 in line 5281 should not have been introduced as the "else if" > below line 5291 can then not take effect for a RT6352 device. Another > possibility is for line 5291 to be not for RT6352, but this seems > very unlikely. Are you able to clarify still after this substantial time? > > 5277: static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) > ... > 5279: } else if (rt2x00_rt(rt2x00dev, RT5390) || > 5280: rt2x00_rt(rt2x00dev, RT5392) || > 5281: rt2x00_rt(rt2x00dev, RT6352)) { > ... > 5291: } else if (rt2x00_rt(rt2x00dev, RT6352)) { > ... Hence remove errornous line 5281 to make the driver actually execute the correct initialization routine for MT7620 chips. As it was requested by Stanislaw Gruszka remove setting values of MIMO_PS_CFG and TX_PIN_CFG. MIMO_PS_CFG is responsible for MIMO power-safe mode (which is disabled), hence we can drop setting it. TX_PIN_CFG is set correctly in other functions, and as setting this value breaks some devices, rather don't set it here during init, but only modify it later on. Fixes: 41977e86c984 ("rt2x00: add support for MT7620") Reported-by: wbob Reported-by: Roman Yeryomin Signed-off-by: Daniel Golle Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit a3a03716196fa32991ecda5667595f78c61cbd95 Author: YueHaibing Date: Sat Nov 2 15:46:03 2019 +0800 rtlwifi: rtl8225se: remove some unused const variables drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:83:17: warning: 'rtl8225sez2_tx_power_cck' defined but not used [-Wunused-const-variable=] drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:79:17: warning: 'rtl8225sez2_tx_power_cck_A' defined but not used [-Wunused-const-variable=] drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:75:17: warning: 'rtl8225sez2_tx_power_cck_B' defined but not used [-Wunused-const-variable=] drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:71:17: warning: 'rtl8225sez2_tx_power_cck_ch14' defined but not used [-Wunused-const-variable=] drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:62:17: warning: 'rtl8225se_tx_power_ofdm' defined but not used [-Wunused-const-variable=] drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:53:17: warning: 'rtl8225se_tx_power_cck_ch14' defined but not used [-Wunused-const-variable=] drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:44:17: warning: 'rtl8225se_tx_power_cck' defined but not used [-Wunused-const-variable=] drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:40:17: warning: 'rtl8225se_tx_gain_cck_ofdm' defined but not used [-Wunused-const-variable=] They are never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 5565331152ee0d5a46aced51c35df637465bb5e1 Author: YueHaibing Date: Fri Nov 1 21:50:35 2019 +0800 brcmsmac: remove set but not used variables drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:841:7: warning: variable free_pdu set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:842:30: warning: variable tx_rts_count set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:842:6: warning: variable tx_rts set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:843:7: warning: variable totlen set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit bf9840ccf8efbdac755772501bd05f6662e1d799 Author: Yan-Hsuan Chuang Date: Fri Nov 1 13:19:42 2019 +0800 rtw88: raise LPS threshold to 50, for less power consumption The LPS threshold was set to 2, means driver will leave LPS mode if there is more than 2 frames TX/RX for every 2 seconds. This makes driver enter/leave LPS frequently even if we just "ping -i1" to the others. Apparently we do not want to leave LPS mode if there is only some background traffics or web surfing. By experiment, set this to 50 is a more reasonable value to lower the over all power consumption. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit ea7ad5f12ca2e1b067d6177ee0141a96ae8f1c53 Author: zhong jiang Date: Sat Nov 2 16:55:22 2019 +0800 iwlegacy: Remove redundant variable "ret" local variable "ret" is not used. hence it is safe to remove and just return 0. Signed-off-by: zhong jiang Signed-off-by: Kalle Valo commit e310813279b7ea0f5401384675de818f852445c6 Author: zhong jiang Date: Sat Nov 2 16:55:21 2019 +0800 ipw2x00: Remove redundant variable "rc" local variable "rc" is not used. It is safe to remove and There is only one caller of libipw_qos_convert_ac_to_parameters(). hence make it void Signed-off-by: zhong jiang Signed-off-by: Kalle Valo commit 83e3a6729d5c501be1e59ba61434831aa0407e5c Merge: a3ead21d6eec 6dea30b4fd54 Author: Kalle Valo Date: Wed Nov 6 19:49:28 2019 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 5.5. Major changes: wil6210 * add SPDX license identifiers commit 7f4009c4bbea4438b50f3b12d1c57da3f5cd8db3 Author: Sharat Masetty Date: Wed Nov 6 17:19:23 2019 +0530 drm: msm: a6xx: fix debug bus register configuration Fix the cx debugbus related register configuration, to collect accurate bus data during gpu snapshot. This helps with complete snapshot dump and also complete proper GPU recovery. Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state") Reviewed-by: Rob Clark Signed-off-by: Sharat Masetty Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/339165 commit ad0593ec8930d2e3fa4252cb7ad666bdfe4ed4f1 Author: Kamal Heib Date: Mon Oct 28 17:59:31 2019 +0200 RDMA/qedr: Remove unsupported modify_port callback There is no need to return always zero for function which is not supported. Fixes: ac1b36e55a51 ("qedr: Add support for user context verbs") Link: https://lore.kernel.org/r/20191028155931.1114-5-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 6135b71159de3bc66964ad9157f1a62a77590006 Author: Kamal Heib Date: Mon Oct 28 17:59:30 2019 +0200 RDMA/ocrdma: Remove unsupported modify_port callback There is no need to return always zero for function which is not supported. Fixes: fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter") Link: https://lore.kernel.org/r/20191028155931.1114-4-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 25f3b49b9288a873b8c2ed94d7f66fad74e82296 Author: Kamal Heib Date: Mon Oct 28 17:59:29 2019 +0200 RDMA/hns: Remove unsupported modify_port callback There is no need to return always zero for function which is not supported. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Link: https://lore.kernel.org/r/20191028155931.1114-3-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 55bfe905fa97633438c13fb029aed85371d85480 Author: Kamal Heib Date: Mon Oct 28 17:59:28 2019 +0200 RDMA/core: Fix return code when modify_port isn't supported Improve return code from ib_modify_port() by doing the following: - Use "-EOPNOTSUPP" instead "-ENOSYS" which is the proper return code - Allow only fake IB_PORT_CM_SUP manipulation for RoCE providers that didn't implement the modify_port callback, otherwise return "-EOPNOTSUPP" Fixes: 61e0962d5221 ("IB: Avoid ib_modify_port() failure for RoCE devices") Link: https://lore.kernel.org/r/20191028155931.1114-2-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit fee175e44cb34ee86e589b2c22c617d00aaac21b Author: Zhou Yanjie Date: Fri Oct 25 01:21:10 2019 +0800 dmaengine: JZ4780: Add support for the X1000. Add support for probing the dma-jz4780 driver on the X1000 Soc. Signed-off-by: Zhou Yanjie Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1571937670-30828-3-git-send-email-zhouyanjie@zoho.com Signed-off-by: Vinod Koul commit be80507d45bea0358b54d1918db144d90a2ecd78 Author: Zhou Yanjie Date: Fri Oct 25 01:21:09 2019 +0800 dt-bindings: dmaengine: Add X1000 bindings. Add the dmaengine bindings for the X1000 Soc from Ingenic. Signed-off-by: Zhou Yanjie Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1571937670-30828-2-git-send-email-zhouyanjie@zoho.com Signed-off-by: Vinod Koul commit 6ccd692bfb7fc44a6b4acd97874d8be78ecb5c91 Author: Radhey Shyam Pandey Date: Tue Oct 22 22:30:22 2019 +0530 dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support Add support for AXI Multichannel Direct Memory Access (AXI MCDMA) core, which is a soft Xilinx IP core that provides high-bandwidth direct memory access between memory and AXI4-Stream target peripherals. The AXI MCDMA core provides scatter-gather interface with multiple independent transmit and receive channels. The driver supports device_prep_slave_sg slave transfer mode. Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571763622-29281-7-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit b4bc76609722f175a257184cc17ad73226d4b716 Author: Michal Kalderon Date: Wed Oct 30 11:44:17 2019 +0200 RDMA/qedr: Add iWARP doorbell recovery support This patch adds the iWARP specific doorbells to the doorbell recovery mechanism. Link: https://lore.kernel.org/r/20191030094417.16866-9-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit c2f6b67db2bd2c333ccd30099c9bde197fa3943d Author: Radhey Shyam Pandey Date: Tue Oct 22 22:30:21 2019 +0530 dmaengine: xilinx_dma: Extend dma_config struct to store irq routine handle Extend dma_config structure to store irq routine handle. It enables runtime handler selection based on xdma_ip_type and serves as preparatory patch for adding MCDMA IP support. Signed-off-by: Radhey Shyam Pandey Suggested-by: Vinod Koul Link: https://lore.kernel.org/r/1571763622-29281-6-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 97f612509294aadabb8b431782794544df10cd13 Author: Michal Kalderon Date: Wed Oct 30 11:44:16 2019 +0200 RDMA/qedr: Add doorbell overflow recovery support Use the doorbell recovery mechanism to register rdma related doorbells that will be restored in case there is a doorbell overflow attention. Link: https://lore.kernel.org/r/20191030094417.16866-8-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit bcb2dc7b6c1ed0d13f640f4a0ea713088f188b19 Author: Radhey Shyam Pandey Date: Tue Oct 22 22:30:20 2019 +0530 dmaengine: xilinx_dma: Remove axidma multichannel mode support The AXI DMA multichannel support is deprecated in the IP and it is no longer actively supported. For multichannel support, refer to the AXI multichannel direct memory access IP product guide(PG228) and MCDMA driver. So inline with it remove axidma multichannel support from from the driver. Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571763622-29281-5-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 4c6bb02d598003e525e83532280ae895213aab20 Author: Michal Kalderon Date: Wed Oct 30 11:44:15 2019 +0200 RDMA/qedr: Use the common mmap API Remove all functions related to mmap from qedr and use the common API. Link: https://lore.kernel.org/r/20191030094417.16866-7-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 11f1a75567c43e1f9e01b37ab524b770a0a0ca78 Author: Michal Kalderon Date: Wed Oct 30 11:44:14 2019 +0200 RDMA/siw: Use the common mmap_xa helpers Remove the functions related to managing the mmap_xa database. This code is now common in ib_core. Link: https://lore.kernel.org/r/20191030094417.16866-6-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Bernard Metzler Reviewed-by: Bernard Metzler Tested-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit e84d3c184e7967559d511e4569c111a02d64031e Author: Michal Kalderon Date: Wed Oct 30 11:44:13 2019 +0200 RDMA/efa: Use the common mmap_xa helpers Remove the functions related to managing the mmap_xa database. This code was replaced with common code in ib_core. Link: https://lore.kernel.org/r/20191030094417.16866-5-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit c043ff2cfb7f6fdd9a1cb1a7ba3800f19b70bf65 Author: Michal Kalderon Date: Wed Oct 30 11:44:12 2019 +0200 RDMA: Connect between the mmap entry and the umap_priv structure The rdma_user_mmap_io interface created a common interface for drivers to correctly map hw resources and zap them once the ucontext is destroyed enabling the drivers to safely free the hw resources. However, this meant the drivers need to delay freeing the resource to the ucontext destroy phase to ensure they were no longer mapped. The new mechanism for a common way of handling user/driver address mapping enabled notifying the driver if all umap_priv mappings were removed, and enabled freeing the hw resources when they are done with and not delay it until ucontext destroy. Since not all drivers use the mechanism, NULL can be sent to the rdma_user_mmap_io interface to continue working as before. Drivers that use the mmap_xa interface can pass the entry being mapped to the rdma_user_mmap_io function to be linked together. Link: https://lore.kernel.org/r/20191030094417.16866-4-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 3411f9f01b76bd88aa6e0e013847ab6479cb4f24 Author: Michal Kalderon Date: Wed Oct 30 11:44:11 2019 +0200 RDMA/core: Create mmap database and cookie helper functions Create some common API's for adding entries to a xa_mmap. Searching for an entry and freeing one. The general approach is copied from the EFA driver and improved to be more general and do more to help the drivers. Integration with the core allows a reference counted scheme with a free function so that the driver can know when its mmaps are all gone. This significant new functionality will be helpful for drivers to have the correct lifetime model for mmap objects. Link: https://lore.kernel.org/r/20191030094417.16866-3-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 7cb1e57544e5d11e3a2742c5acb69562d02af235 Author: Radhey Shyam Pandey Date: Tue Oct 22 22:30:19 2019 +0530 dt-bindings: dmaengine: xilinx_dma: Add binding for Xilinx MCDMA IP Add devicetree binding for Xilinx AXI Multichannel Direct Memory Access (AXI MCDMA) IP. The AXI MCDMA provides high-bandwidth direct memory access between memory and AXI4-Stream target peripherals. The AXI MCDMA core provides a scatter-gather interface with multiple channel support with independent configuration. Signed-off-by: Radhey Shyam Pandey Acked-by: Rob Herring Link: https://lore.kernel.org/r/1571763622-29281-4-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 535b4b0c050b79db6a63097599fc87a156db6b2c Author: Radhey Shyam Pandey Date: Tue Oct 22 22:30:18 2019 +0530 dt-bindings: dmaengine: xilinx_dma: Fix formatting and style Trivial formatting(keep compatible string one per line, caps change etc). It doesn't modify the content of the binding. Signed-off-by: Radhey Shyam Pandey Acked-by: Rob Herring Link: https://lore.kernel.org/r/1571763622-29281-3-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 96336cc043ba8f4999bbeb7a9a29b46fc05d2bc4 Author: Radhey Shyam Pandey Date: Tue Oct 22 22:30:17 2019 +0530 dt-bindings: dmaengine: xilinx_dma: Remove axidma multichannel support The AXI DMA multichannel support is deprecated in the IP and it is no longer actively supported. For multichannel support, refer to the AXI multichannel direct memory access IP product guide(PG228) and MCDMA driver(added in the subsequent commits). Inline with it remove axidma multichannel optional properties i.e xlnx,mcdma and dma-channels from the binding description. Signed-off-by: Radhey Shyam Pandey Acked-by: Rob Herring Link: https://lore.kernel.org/r/1571763622-29281-2-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit e696d00e65e81d46e911f24b12e441037bf11b38 Author: Pavel Löbl Date: Fri Nov 1 08:01:50 2019 +0100 USB: serial: mos7840: add USB ID to support Moxa UPort 2210 Add USB ID for MOXA UPort 2210. This device contains mos7820 but it passes GPIO0 check implemented by driver and it's detected as mos7840. Hence product id check is added to force mos7820 mode. Signed-off-by: Pavel Löbl Cc: stable [ johan: rename id defines and add vendor-id check ] Signed-off-by: Johan Hovold commit fdea53fe5de532969a332d6e5e727f2ad8bf084d Author: Takashi Iwai Date: Wed Nov 6 16:42:57 2019 +0100 ALSA: timer: Limit max amount of slave instances The fuzzer tries to open the timer instances as much as possible, and this may cause a system hiccup easily. We've already introduced the cap for the max number of available instances for the h/w timers, and we should put such a limit also to the slave timers, too. This patch introduces the limit to the multiple opened slave timers. The upper limit is hard-coded to 1000 for now, which should suffice for any practical usages up to now. Link: https://lore.kernel.org/r/20191106154257.5853-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 992fd39a349ac62044d9e20d17d309c2cf0f5c27 Merge: 18dd66ea8446 9508ef5a980f Author: Mark Brown Date: Wed Nov 6 16:29:34 2019 +0000 Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5 commit 5365e3df422938e6b34e1afdd2ff1cfc5768290e Author: Vasily Khoruzhick Date: Wed Nov 6 08:12:11 2019 -0800 regulator: fan53555: add chip id for Silergy SYR83X SYR83X is used in Rockpro64 and it has die ID == 9. All other registers are the same as in SYR82X Signed-off-by: Vasily Khoruzhick Link: https://lore.kernel.org/r/20191106161211.1700663-1-anarsoul@gmail.com Signed-off-by: Mark Brown commit 0279c71fe0d14c510001e9a7dd1ce2e0c77dd06c Author: Colin Ian King Date: Wed Nov 6 08:07:46 2019 -0800 xfs: remove redundant assignment to variable error Variable error is being initialized with a value that is never read and is being re-assigned a couple of statements later on. The assignment is redundant and hence can be removed. Signed-off-by: Colin Ian King Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8ef34723eff08806e3e9c1c756c62a3cb482a3b8 Author: Darrick J. Wong Date: Tue Nov 5 15:33:56 2019 -0800 xfs: add missing early termination checks to record scrubbing functions Scrubbing directories, quotas, and fs counters all involve iterating some collection of metadata items. The per-item scrub functions for these three are missing some of the components they need to be able to check for a fatal signal and terminate early. Per-item scrub functions need to call xchk_should_terminate to look for fatal signals, and they need to check the scrub context's corruption flag because there's no point in continuing a scan once we've decided the data structure is bad. Add both of these where missing. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 1f0753ea6a38addd488ea62adac7fb0e81ac73ea Merge: 1903de7777c0 c7cb7c96f312 Author: Olof Johansson Date: Wed Nov 6 07:49:00 2019 -0800 Merge tag 'imx-defconfig-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig update for 5.5: - Enable i.MX7ULP watchdog, DA9052 touch and USB configfs support in imx_v6_v7_defconfig. - Enable newly added S32V234 SoC and its UART driver support in arm64 defconfig. - Built i.MX8QXP SCU key driver as module in arm64 defconfig. - Change AT803X Ethernet PHY driver from module to built-in, so that we can boot i.MX8MM EVK board with rootfs on NFS. * tag 'imx-defconfig-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: Change CONFIG_AT803X_PHY from m to y ARM: imx_v6_v7_defconfig: Enable CONFIG_TOUCHSCREEN_DA9052 arm64: defconfig: Enable configs for S32V234 arm64: defconfig: Enable CONFIG_KEYBOARD_IMX_SC_KEY as module ARM: imx_v6_v7_defconfig: Build USB_CONFIGFS into kernel ARM: imx_v6_v7_defconfig: Enable CONFIG_IMX7ULP_WDT by default Link: https://lore.kernel.org/r/20191105150315.15477-7-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 17795bf9aab9f5b11a8401c999ef1dfe03df51e5 Merge: 06e78df33d3d 5363eaaeb8e5 Author: Olof Johansson Date: Wed Nov 6 07:48:35 2019 -0800 Merge tag 'imx-dt64-tmu-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt LX2160A TMU support for 5.5: - Add TMU (Thermal Monitoring Unit) device node to enable thermal support on LX2160A SoC. * tag 'imx-dt64-tmu-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: lx2160a: add tmu device node ARM: imx_v6_v7_defconfig: Enable CONFIG_DRM_MSM arm64: dts: imx8mn: Use correct clock for usdhc's ipg clk arm64: dts: imx8mm: Use correct clock for usdhc's ipg clk arm64: dts: imx8mq: Use correct clock for usdhc's ipg clk ARM: dts: imx7s: Correct GPT's ipg clock source ARM: dts: vf610-zii-scu4-aib: Specify 'i2c-mux-idle-disconnect' ARM: dts: imx6q-logicpd: Re-Enable SNVS power key arm64: dts: lx2160a: Correct CPU core idle state name arm64: dts: zii-ultra: fix ARM regulator states soc: imx: imx-scu: Getting UID from SCU should have response Link: https://lore.kernel.org/r/20191105150315.15477-6-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 06e78df33d3d3cdf144af070f2892774cdc1725f Merge: 405b7b271c8b 227125fe728b Author: Olof Johansson Date: Wed Nov 6 07:47:54 2019 -0800 Merge tag 'imx-dt64-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree changes for 5.5: - Add the initial support for a new arm64 family SoC from NXP: S32V234 ("Treerunner") vision microprocessors which are targeted for high-performance, computationally intensive vision and sensor fusion applications that require automotive safety levels. - New board support: i.MX8MN LPDDR4 EVK, i.MX8QXP Colibri and S32V234 EVB. - A series of patch from Andrey Smirnov to improve zii-ultra support by fixing regulator and adding accelerometer, switch watchdog. - Add system counter device and enable cpuidle support for i.MX8MN. - Move usdhc clocks assignment from SoC to board level DTS for i.MX8 based boards. - Add PCA6416 on I2C3 bus for imx8mm-evk, and enable SCU key for imx8qxp-mek board. - Enable GPU passive throttling on i.MX8MQ SoC, and add DDR PMU device for i.MX8MN. - A series from Fabio Estevam to fix DTC W=1 warnings for LS1028A device. - Update the clock providers for the Mali DP500 and '#clock-cells' of DPCLK node for LS1028A SoC. - Misc small updates on various boards. * tag 'imx-dt64-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (40 commits) arm64: dts: imx8mn-evk: Remove invalid Atheros properties arm64: dts: freescale: add initial support for colibri imx8x arm64: dts: ls1028a: Fix tmu unit address arm64: dts: ls1028a: Move thermal-zone out of SoC arm64: dts: ls1028a-qds: Remove unnecessary #address-cells/#size-cells arm64: dts: imx8mn: Remove duplicated machine compatible arm64: dts: imx8mm: Remove duplicated machine compatible arm64: dts: imx8mq-evk: Add remote control arm64: dts: imx8mn: Add LPDDR4 EVK board support arm64: dts: imx8mn: Create EVK dtsi file for common use arm64: dts: imx8mn: Move usdhc clocks assignment to board DT arm64: dts: imx8mm: Move usdhc clocks assignment to board DT arm64: dts: imx8mq: Move usdhc clocks assignment to board DT arm64: dts: imx8qxp: Move usdhc clocks assignment to board DT arm64: dts: fsl: Add device tree for S32V234-EVB arm64: dts: imx8mm-evk: Assigned clocks for audio plls arm64: dts: zii-ultra: Add node for switch watchdog arm64: dts: zii-ultra: Add node for accelerometer arm64: dts: zii-ultra: Fix regulator-3p3-main's name arm64: dts: zii-ultra: Fix regulator-vsd-3v3's vin-supply ... Link: https://lore.kernel.org/r/20191105150315.15477-5-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 405b7b271c8bbcd72bab9909523d2c38c8c040e9 Merge: 51535d88ac97 cc55c85d257e Author: Olof Johansson Date: Wed Nov 6 07:47:19 2019 -0800 Merge tag 'imx-dt-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX device tree changes for 5.5: - New board support: Netronix E60K02 and Kobo Clara HD, Kontron N6311 and N6411, OPOS6UL and OPOS6ULDev. - Correct speed grading fuse settings and add opp-suspend property for i.MX7D device tree. - Move usdhc clocks assignment from SoC to board level DTS for imx7ulp, and use APLL_PFD1 as usdhc's clock source on imx7ulp-evk board. - Add missing cooling device properties for CPUs for i.MX6/7 SoCs. - Add sensor GPIO regulator and assign power supplies for magnetometer for imx6ul-14x14-evk board. - Replace "simple-bus" with "simple-mfd" for ANATOP device for i.MX6/7 SoCs. - Fix DTC W=1 warnings by not using simple-audio-card,dai-link on imx6qdl-gw551x and imx6q-gw54xx board. - Move to use DRM bindings for the Seiko 43WVF1G panel on imx53-qsb. - A series from Frieder Schrempf to support more i.MX6UL/ULL-based SoMs and boards from Kontron Electronics GmbH. - A few patches from Michal Vokáč to enable more devices support on imx6dl-yapp4 board. - A patch series from Philippe Schenker to improve i.MX6/7 Apalis and Colibri board support. - A patch series from Sébastien Szymanski to update i.MX6 APF6/APF6Dev device tree with more devices added and adopting DRM bindings for display. - Random improvements, clean-up and device additions on various boards. * tag 'imx-dt-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (68 commits) ARM: dts: imx6ul-kontron-n6x1x-s: Remove an obsolete comment and fix indentation ARM: dts: imx6ul-kontron-n6x1x-s: Add vbus-supply and overcurrent polarity to usb nodes ARM: dts: imx6ul-kontron-n6x1x: Add 'chosen' node with 'stdout-path' ARM: dts: Add support for two more Kontron evalkit boards 'N6311 S' and 'N6411 S' ARM: dts: imx6ul-kontron-n6310-s: Move common nodes to a separate file ARM: dts: imx6ul-kontron-n6310-s: Disable the snvs-poweroff driver ARM: dts: Add support for two more Kontron SoMs N6311 and N6411 ARM: dts: imx6ul-kontron-n6310: Move common SoM nodes to a separate file ARM: dts: imx7ulp-evk: Use APLL_PFD1 as usdhc's clock source ARM: dts: imx: add devicetree for Kobo Clara HD ARM: dts: add Netronix E60K02 board common file ARM: dts: vf-colibri: fix typo in top-level module compatible ARM: dts: imx53-qsb: Use DRM bindings for the Seiko 43WVF1G panel ARM: dts: imx53: Spelling s/configration/configuration/ ARM: dts: imx6ul-14x14-evk: Assign power supplies for magnetometer ARM: dts: imx6ul-14x14-evk: Fix the magnetometer node name ARM: dts: imx6ul-14x14-evk: Add sensors' GPIO regulator ARM: dts: imx6ul: Disable gpt2 by default ARM: dts: imx7d: Add missing cooling device properties for CPUs ARM: dts: imx6dl: Add missing cooling device properties for CPUs ... Link: https://lore.kernel.org/r/20191105150315.15477-4-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 51535d88ac974c4965c45b9e3a5cafd83f1f6ab7 Merge: ea21768a8a46 bb40c3f7d63a Author: Olof Johansson Date: Wed Nov 6 07:47:03 2019 -0800 Merge tag 'imx-bindings-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX dt-bindings update for 5.5: - Update fsl.yaml to include DT compatibles for following devices: Kobo Clara HD, i.MX8MN LPDDR4 EVK, S32V234-EVB, Kontron i.MX6UL/ULL boards, Toradex apalis/colibri boards, Variscite and Armadeus i.MX6 boards. * tag 'imx-bindings-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add more Kontron i.MX6UL/ULL compatibles dt-bindings: arm: fsl: add compatible string for Kobo Clara HD dt-bindings: arm: fsl: add nxp based toradex colibri-imx8x bindings dt-bindings: arm: fsl: add nxp based toradex apalis/colibri bindings dt-bindings: arm: fsl: Document Variscite i.MX6q devicetree dt-bindings: arm: imx: Add the i.MX8MN LPDDR4 EVK board dt-bindings: arm: fsl: Add the S32V234-EVB board dt-bindings: arm: Document Armadeus SoM and Dev boards devicetree binding Link: https://lore.kernel.org/r/20191105150315.15477-3-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 0f3dac611060058524c68dadcc0ddaf923c84d1c Merge: 3166c3dd4c87 d7eb28d2740f Author: Olof Johansson Date: Wed Nov 6 07:46:41 2019 -0800 Merge tag 'imx-soc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC update for 5.5: - Add arm64 Kconfig option for the NXP S32 platform. - Drop imx_anatop_usb_chrg_detect_disable() function which becomes unneeded, since all the necessary charger setup is done by the USB PHY driver now. - Add serial number support for i.MX6/7 SoCs by reading 64-bit SoC unique ID from OCOTP block. - Replace i.MX machine specific coherency exit implementation using the generic v7_exit_coherency_flush() function. * tag 'imx-soc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: use generic function to exit coherency ARM: imx: Add serial number support for i.MX6/7 SoCs ARM: imx: Drop imx_anatop_usb_chrg_detect_disable() arm64: Introduce config for S32 Link: https://lore.kernel.org/r/20191105150315.15477-2-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 8cbbff3a6423cc95fbd00c49da54952a87088d4f Merge: 171cfeec987d 768e1a8e0936 Author: Olof Johansson Date: Wed Nov 6 07:46:02 2019 -0800 Merge tag 'imx-drivers-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX drivers update for 5.5: - Skip return check for those SCU firmware APIs that are defined as void function in firmware. - Use established serial_number attribute instead of custom one to show SoC's unique ID for i.MX8 SoC drivers. - Read i.MX8MQ SOC revision from TF-A which parses ROM and exposes the value through a SMC call. This improves the situation that SOC revision reports 'unknown' on some older revisions. - Add a check and warn on unexpected SCU RX to avoid potential stack corruption in imx-scu driver. - Fix a sparse warning in imx-scu-irq driver by adding missing header. - Remove an unneeded call to devm_of_platform_populate() from imx-dsp driver. * tag 'imx-drivers-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx8mq: Read SOC revision from TF-A soc: imx-scu: Using existing serial_number instead of UID soc: imx8: Using existing serial_number instead of UID firmware: imx: add missing include of firmware: imx: Remove call to devm_of_platform_populate firmware: imx: Skip return value check for some special SCU firmware APIs firmware: imx: warn on unexpected RX Link: https://lore.kernel.org/r/20191105150315.15477-1-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 3166c3dd4c87d118cbf66f827f4b41765a0b1ba6 Merge: f5ed5010dfaa 4134b762eb13 Author: Olof Johansson Date: Wed Nov 6 07:45:28 2019 -0800 Merge tag 'samsung-soc-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.5 1. Minor cleanups in S3C platforms, 2. Enable newly added EXYNOS_ASV (Adaptive Supply Voltage) driver. * tag 'samsung-soc-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos: Enable exynos-asv driver for ARCH_EXYNOS ARM: s3c: Rename s5p_usb_phy functions ARM: s3c: Rename s3c64xx_spi_setname() function Link: https://lore.kernel.org/r/20191104175902.12224-2-krzk@kernel.org Signed-off-by: Olof Johansson commit 171cfeec987d29f4d6d6fee6feab486180dc8ef4 Merge: b4067b105023 89e551e83869 Author: Olof Johansson Date: Wed Nov 6 07:45:06 2019 -0800 Merge tag 'samsung-drivers-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers Samsung soc drivers changes for v5.5 1. Minor fixes to Exynos Chipid driver. 2. Add Exynos Adaptive Supply Voltage driver allowing to adjust voltages used during CPU frequency scaling based on revision of SoC. This also pulls dependency from PM/OPP tree - driver uses newly added dev_pm_opp_adjust_voltage() function. * tag 'samsung-drivers-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: exynos-asv: Potential NULL dereference in exynos_asv_update_opps() soc: samsung: chipid: Drop "syscon" compatible requirement soc: samsung: Add Exynos Adaptive Supply Voltage driver PM / OPP: Support adjusting OPP voltages at runtime soc: samsung: chipid: Make exynos_chipid_early_init() static Link: https://lore.kernel.org/r/20191104175902.12224-1-krzk@kernel.org Signed-off-by: Olof Johansson commit ea21768a8a46cd1e2085d34fedfcda29eda7ceff Merge: f129230b8c1f 74ab6d9d7dce Author: Olof Johansson Date: Wed Nov 6 07:42:02 2019 -0800 Merge tag 'sunxi-dt-for-5.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt A few more DT patches for 5.5, mostly: - USB3 support for the H6 - Deinterlacer support for the H3 - eDP Bridge support on the Teres-I - More DT cleanups thanks to the validation * tag 'sunxi-dt-for-5.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h6: Remove useless reset name ARM: dts: sun6i: Remove useless reset-names arm64: dts: allwinner: orange-pi-3: Enable USB 3.0 host support arm64: dts: allwinner: h6: add USB3 device nodes dt-bindings: Add ANX6345 DP/eDP transmitter binding arm64: dts: allwinner: a64: enable ANX6345 bridge on Teres-I dts: arm: sun8i: h3: Enable deinterlace unit ARM: dts: sunxi: h3/h5: Add MBUS controller node dt-bindings: bus: sunxi: Add H3 MBUS compatible Link: https://lore.kernel.org/r/58ad00a8-9579-4811-969a-a74e331ee9a2.lettre@localhost Signed-off-by: Olof Johansson commit f129230b8c1f12e308dae89209c8b0d28136e81d Merge: e315c7b3da0e 6b832a148717 Author: Olof Johansson Date: Wed Nov 6 07:41:29 2019 -0800 Merge tag 'sunxi-fixes-for-5.4-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt One patch to add back the PMU node that was removed because the interrupts were improper in a previous fixes PR. * tag 'sunxi-fixes-for-5.4-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: a64: Re-add PMU node ARM: sunxi: Fix CPU powerdown on A83T ARM: dts: sun8i-a83t-tbs-a711: Fix WiFi resume from suspend ARM: dts: sun7i: Drop the module clock from the device tree dt-bindings: media: sun4i-csi: Drop the module clock media: dt-bindings: Fix building error for dt_binding_check arm64: dts: allwinner: a64: sopine-baseboard: Add PHY regulator delay arm64: dts: allwinner: a64: Drop PMU node arm64: dts: allwinner: a64: pine64-plus: Add PHY regulator delay Link: https://lore.kernel.org/r/45023fa6-b2bc-4934-b85c-3e7841dde0b1.lettre@localhost Signed-off-by: Olof Johansson commit e9a8ba9769a0e354341bc6cc01b98aadcea1dfe9 Author: Pan Bian Date: Wed Nov 6 10:36:09 2019 +0800 spi: img-spfi: fix potential double release The channels spfi->tx_ch and spfi->rx_ch are not set to NULL after they are released. As a result, they will be released again, either on the error handling branch in the same function or in the corresponding remove function, i.e. img_spfi_remove(). This patch fixes the bug by setting the two members to NULL. Signed-off-by: Pan Bian Link: https://lore.kernel.org/r/1573007769-20131-1-git-send-email-bianpan2016@163.com Signed-off-by: Mark Brown commit 18dd66ea84464a4bc86089276d5f75cadeb94a09 Author: Kuninori Morimoto Date: Wed Nov 6 16:05:05 2019 +0900 ASoC: soc-core: fixup dead-lock at snd_soc_unregister_component() snd_soc_unregister_component() is calling snd_soc_lookup_component() under mutex_lock(). But, snd_soc_lookup_component() itself is using mutex_lock(), thus it will be dead-lock. This patch adds _nolocked version of it, and avoid dead-lock issue. Fixes: ac6a4dd3e9f0("ASoC: soc-core: use snd_soc_lookup_component() at snd_soc_unregister_component()") Reported-by: "kernelci.org bot" " Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bltph4da.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit df95a16d2a9626dcfc3f2b3671c9b91fa076c997 Author: Pierre-Louis Bossart Date: Wed Nov 6 08:58:01 2019 -0600 ASoC: soc-core: fix RIP warning on card removal SOF module load/unload tests show nasty recurring warnings: WARNING: CPU: 5 PID: 1339 at sound/core/control.c:466 snd_ctl_remove+0xf0/0x100 [snd] RIP: 0010:snd_ctl_remove+0xf0/0x100 [snd] This regression was introduced by the removal of the call to soc_remove_link_components() before soc_card_free() is invoked. Go back to the initial order but only call soc_remove_link_components() once. Reviewed-by: Ranjani Sridharan Acked-by: Kuninori Morimoto Fixes: 5a4c9f054ceea ("ASoC: soc-core: snd_soc_unbind_card() cleanup") GitHub issue: https://github.com/thesofproject/linux/issues/1424 Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191106145801.9316-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 90f3741c2b567d3f16c13d574dbd5d42ed076b2e Author: Chengguang Xu Date: Mon Nov 4 19:40:33 2019 +0800 ext2: code cleanup by calling ext2_group_last_block_no() Call common helper ext2_group_last_block_no() to calculate group last block number. Link: https://lore.kernel.org/r/20191104114036.9893-2-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit eb9e47fc230aafc3ac1e5eeae6d0d8d5e108bbae Author: Chengguang Xu Date: Mon Nov 4 19:40:32 2019 +0800 ext2: introduce new helper ext2_group_last_block_no() Introduce new helper ext2_group_last_block_no() to calculate last block num for specific block group, we can replace open coded logic by calling this common helper. Link: https://lore.kernel.org/r/20191104114036.9893-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit d8725e38dd9fe88bc7dab6e53acdf2e257c241db Author: Xiaowei Bao Date: Mon Sep 2 11:43:17 2019 +0800 dt-bindings: pci: layerscape-pci: add compatible strings "fsl, ls1028a-pcie" Add the PCIe compatible string for LS1028A. Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Andrew Murray commit b65f131b8f47b399a0635f028af3888f8c741ae1 Author: Takashi Iwai Date: Tue Nov 5 16:18:56 2019 +0100 ALSA: docs: Remove snd_dma_pci_data() usage in documentation The macro will be removed soon later, so update the documentation to reflect that as well. Link: https://lore.kernel.org/r/20191105151856.10785-25-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6974f8ad44946701779209cb03cd8c6b598c3342 Author: Takashi Iwai Date: Tue Nov 5 16:18:55 2019 +0100 ALSA: pci: Avoid non-standard macro usage Pass the device pointer from the PCI pointer directly, instead of a non-standard macro. The macro didn't give any better readability. Link: https://lore.kernel.org/r/20191105151856.10785-24-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1a810436a2eff372aa1a934fe4d1bef50bd9dac8 Author: Takashi Iwai Date: Tue Nov 5 16:18:54 2019 +0100 ALSA: rme: Avoid non-standard macro usage Pass the device pointer from the PCI pointer directly, instead of a non-standard macro. The macro didn't give any better readability. Along with it, drop the unnecessary assignment before the snd_dma_alloc_pages() call and simplify by returning the error code directly. Link: https://lore.kernel.org/r/20191105151856.10785-23-tiwai@suse.de Signed-off-by: Takashi Iwai commit af7153a29d5f0bed1f62b5347dc6cce291d40d69 Author: Takashi Iwai Date: Tue Nov 5 16:18:53 2019 +0100 ALSA: es1968: Avoid non-standard macro usage Pass the device pointer from the PCI pointer directly, instead of a non-standard macro. The macro didn't give any better readability. Along with it, the unneeded assignment before snd_dma_alloc_pages*() call is dropped. Link: https://lore.kernel.org/r/20191105151856.10785-22-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7564d3b6334c5dd619827a85dd32bf7c21df6667 Author: Takashi Iwai Date: Tue Nov 5 16:18:52 2019 +0100 ALSA: echoaudio: Avoid non-standard macro usage Pass the device pointer from the PCI pointer directly, instead of a non-standard macro. The macro didn't give any better readability. Also slightly refactor the code (drop the return value check from the preallocation) as it never returns an error. Link: https://lore.kernel.org/r/20191105151856.10785-21-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3ca5fc0664ec47fae86bc07749ceb185f7b175f6 Author: Takashi Iwai Date: Tue Nov 5 16:18:51 2019 +0100 ALSA: aoa: Avoid non-standard macro usage Pass the device pointer from the PCI pointer directly, instead of a non-standard macro. The macro didn't give any better readability. Link: https://lore.kernel.org/r/20191105151856.10785-20-tiwai@suse.de Signed-off-by: Takashi Iwai commit 16ccca11088c1bdd9311a2c630b453541305c48a Author: Takashi Iwai Date: Tue Nov 5 16:18:50 2019 +0100 ALSA: pci: Drop superfluous snd_pcm_sgbuf_ops_page snd_pcm_sgbuf_ops_page is no longer needed to be set explicitly to PCM page ops since the recent change in the PCM core (*). Leaving it NULL should work as long as the preallocation has been done properly. This patch drops the redundant lines. (*) 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Link: https://lore.kernel.org/r/20191105151856.10785-19-tiwai@suse.de Signed-off-by: Takashi Iwai commit 30f2ce712d29325b0150243a9a2dd215c2ff60c8 Author: Takashi Iwai Date: Tue Nov 5 16:18:49 2019 +0100 ALSA: mips: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Link: https://lore.kernel.org/r/20191105151856.10785-18-tiwai@suse.de Signed-off-by: Takashi Iwai commit d5dec270c00c155db64c3d2151b94002dfb2c6c7 Author: Takashi Iwai Date: Tue Nov 5 16:18:48 2019 +0100 ALSA: pdaudiocf: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Since the driver requires the DMA32 allocation, it passes the specially encoded device to snd_pcm_lib_preallocate_pages(). Link: https://lore.kernel.org/r/20191105151856.10785-17-tiwai@suse.de Signed-off-by: Takashi Iwai commit 748a76b215a36e9bb88a5bd8b56c5088371b2f19 Author: Takashi Iwai Date: Tue Nov 5 16:18:47 2019 +0100 ALSA: vx: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Since the driver requires the DMA32 allocation, it passes the specially encoded device to snd_pcm_lib_preallocate_pages(). Link: https://lore.kernel.org/r/20191105151856.10785-16-tiwai@suse.de Signed-off-by: Takashi Iwai commit 95ef15c65ae0d36569ac374e83498b6bf08d861f Author: Takashi Iwai Date: Tue Nov 5 16:18:46 2019 +0100 ALSA: ua101: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Link: https://lore.kernel.org/r/20191105151856.10785-15-tiwai@suse.de Signed-off-by: Takashi Iwai commit d7867ee7d264d4760214de2a1cb10c694d935dab Author: Takashi Iwai Date: Tue Nov 5 16:18:45 2019 +0100 ALSA: hiface: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Link: https://lore.kernel.org/r/20191105151856.10785-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit c7b03852e74dc294d0f09c2c6f3d5e28615ce689 Author: Takashi Iwai Date: Tue Nov 5 16:18:44 2019 +0100 ALSA: caiaq: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Link: https://lore.kernel.org/r/20191105151856.10785-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit 94ce90c562efd4222c1d58c52bb7dc8e2ba5827d Author: Takashi Iwai Date: Tue Nov 5 16:18:43 2019 +0100 ALSA: 6fire: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Link: https://lore.kernel.org/r/20191105151856.10785-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit a3f4f2d5d02095d098ff03c4d0bdbae2e53a5bba Author: Takashi Iwai Date: Tue Nov 5 16:18:42 2019 +0100 ALSA: firewire: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Link: https://lore.kernel.org/r/20191105151856.10785-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit b29e5ef15115cd77cdd250b7ec4fdb4cb8d40ddd Author: Takashi Iwai Date: Tue Nov 5 16:18:41 2019 +0100 ALSA: aloop: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Link: https://lore.kernel.org/r/20191105151856.10785-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit b315997d7c2295b2b32cb661a584208ab05ffaea Author: Takashi Iwai Date: Tue Nov 5 16:18:40 2019 +0100 ALSA: usb-audio: Convert to the common vmalloc memalloc The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Also, since the SG-buffer-specific PCM ops becomes identical with the normal PCM ops, unify them again to the single ops, too. Link: https://lore.kernel.org/r/20191105151856.10785-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1158e89c9d8f5e676870ab0a729de16ac39e59af Author: Takashi Iwai Date: Tue Nov 5 16:18:39 2019 +0100 ALSA: 6fire: Drop the dead code A few error handling code was forgotten where it never reaches. Drop it. Link: https://lore.kernel.org/r/20191105151856.10785-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0af0a4fec0c48d591a3788cb6c08b21a17201dd3 Author: Takashi Iwai Date: Tue Nov 5 16:18:38 2019 +0100 ALSA: usb: Remove superfluous snd_dma_continuous_data() The recent change (commit 08422d2c559d: "ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type") made the PCM preallocation helper accepting NULL as the device pointer for the default usage. Drop the snd_dma_continuous_data() usage that became superfluous from the callers. Link: https://lore.kernel.org/r/20191105151856.10785-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0382e4e18fafcaea75ffab85838ef2110fac1668 Author: Takashi Iwai Date: Tue Nov 5 16:18:37 2019 +0100 ALSA: sparc: Remove superfluous snd_dma_continuous_data() The recent change (commit 08422d2c559d: "ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type") made the PCM preallocation helper accepting NULL as the device pointer for the default usage. Drop the snd_dma_continuous_data() usage that became superfluous from the callers. Link: https://lore.kernel.org/r/20191105151856.10785-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit a1aef4881cf1781e3d5c5c07df1b8774d3fe2def Author: Takashi Iwai Date: Tue Nov 5 16:18:36 2019 +0100 ALSA: sh: Remove superfluous snd_dma_continuous_data() The recent change (commit 08422d2c559d: "ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type") made the PCM preallocation helper accepting NULL as the device pointer for the default usage. Drop the snd_dma_continuous_data() usage that became superfluous from the callers. Link: https://lore.kernel.org/r/20191105151856.10785-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1422bc5001a98f5be618a4abc62325f8a9310941 Author: Takashi Iwai Date: Tue Nov 5 16:18:35 2019 +0100 ALSA: rme32: Remove superfluous snd_dma_continuous_data() The recent change (commit 08422d2c559d: "ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type") made the PCM preallocation helper accepting NULL as the device pointer for the default usage. Drop the snd_dma_continuous_data() usage that became superfluous from the callers. Link: https://lore.kernel.org/r/20191105151856.10785-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 987334266d087a4974c73f4a071bc24596f545aa Author: Takashi Iwai Date: Tue Nov 5 16:18:34 2019 +0100 ALSA: mips: Remove superfluous snd_dma_continuous_data() The recent change (commit 08422d2c559d: "ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type") made the PCM preallocation helper accepting NULL as the device pointer for the default usage. Drop the snd_dma_continuous_data() usage that became superfluous from the callers. Link: https://lore.kernel.org/r/20191105151856.10785-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8fd9da750e76c321cd0a781c89a0d70cc399b22d Author: Takashi Iwai Date: Tue Nov 5 16:18:33 2019 +0100 ALSA: drivers: Remove superfluous snd_dma_continuous_data() The recent change (commit 08422d2c559d: "ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type") made the PCM preallocation helper accepting NULL as the device pointer for the default usage. Drop the snd_dma_continuous_data() usage that became superfluous from the callers. Link: https://lore.kernel.org/r/20191105151856.10785-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9ca7d19ff8ba6207bccab46536814fe4839df80a Author: Thomas Hellstrom Date: Tue Mar 19 13:27:50 2019 +0100 drm/vmwgfx: Add surface dirty-tracking callbacks Add the callbacks necessary to implement emulated coherent memory for surfaces. Add a flag to the gb_surface_create ioctl to indicate that surface memory should be coherent. Also bump the drm minor version to signal the availability of coherent surfaces. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Jérôme Glisse Cc: Kirill A. Shutemov Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat commit d39789912f150b66515ccda7ed00bba828a334d4 Author: Takashi Iwai Date: Tue Nov 5 20:10:07 2019 +0100 ALSA: pcm: Create proc files only for non-empty preallocations It makes little sense to create prealloc proc files for streams that have the zero max size, which is a typical case for vmalloc buffers. Skip the proc file creations to save resources in such a case. Link: https://lore.kernel.org/r/20191105191007.18150-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit a55eaf177a36f7789eec0985a7edd00fe7353d90 Author: Takashi Iwai Date: Tue Nov 5 20:10:06 2019 +0100 ALSA: pcm: Warn if doubly preallocated Warn if snd_pcm_lib_preallocate_pages*() is applied to the stream that has already the preallocated buffers and skip the allocation. It's a clearly a driver bug. Link: https://lore.kernel.org/r/20191105191007.18150-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit abffd8d0d5380e2c37759ba6be1f6bf47bfe975f Author: Takashi Iwai Date: Tue Nov 5 09:01:38 2019 +0100 ALSA: docs: Update documentation about SG- and vmalloc-buffers The recent changes simplified the required setup for SG- and vmalloc- buffers. Update the documentation accordingly. Link: https://lore.kernel.org/r/20191105080138.1260-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7e8edae39fd1f880f098612c991cf6d0f646c20d Author: Takashi Iwai Date: Tue Nov 5 09:01:37 2019 +0100 ALSA: pcm: Handle special page mapping in the default mmap handler When a driver needs to deal with a special buffer like a SG or a vmalloc buffer, it has to set up the PCM page ops explicitly for the corresponding helper function. This is rather error-prone and many people forgot or incorrectly used it. For simplifying the call patterns and avoiding such a potential bug, this patch enhances the PCM default mmap handler to check the (pre-)allocated buffer type and handles the page gracefully depending on the buffer type. If the PCM page ops is given, the ops is still used in a higher priority. The new code path is only for the default (NULL page ops) case. Link: https://lore.kernel.org/r/20191105080138.1260-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1fe7f397cfe229494a88c6496b53ba532d4d4a42 Author: Takashi Iwai Date: Tue Nov 5 09:01:36 2019 +0100 ALSA: memalloc: Add vmalloc buffer allocation support This patch adds the vmalloc buffer support to ALSA memalloc core. A new type, SNDRV_DMA_TYPE_VMALLOC was added. The vmalloc buffer has been already supported in the PCM via a few own helper functions, but the user sometimes get confused and misuse them. With this patch, the whole buffer management is integrated into the memalloc core, so they can be used in a sole common way. Link: https://lore.kernel.org/r/20191105080138.1260-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 08422d2c559d1119b17c14e79b2d8ff89f46a356 Author: Takashi Iwai Date: Tue Nov 5 09:01:35 2019 +0100 ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type Currently we pass the artificial device pointer to the allocation helper in the case of SNDRV_DMA_TYPE_CONTINUOUS for passing the GFP flags. But all common cases are the allocations with GFP_KERNEL, and it's messy to put this in each place. In this patch, the memalloc core helper is changed to accept the NULL device pointer and it treats as the default mode, GFP_KERNEL, so that all callers can omit the complex argument but just leave NULL. Link: https://lore.kernel.org/r/20191105080138.1260-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7f08ae53a7e3ac2a2f86175226ee19f0117d5b6c Author: Mark Rutland Date: Mon Oct 21 15:05:52 2019 +0100 arm64: ftrace: minimize ifdeffery Now that we no longer refer to mod->arch.ftrace_trampolines in the body of ftrace_make_call(), we can use IS_ENABLED() rather than ifdeffery, and make the code easier to follow. Likewise in ftrace_make_nop(). Let's do so. Signed-off-by: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Torsten Duwe Tested-by: Amit Daniel Kachhap Tested-by: Torsten Duwe Cc: Catalin Marinas Cc: Will Deacon commit 3b23e4991fb66f6d152f9055ede271a726ef9f21 Author: Torsten Duwe Date: Fri Feb 8 16:10:19 2019 +0100 arm64: implement ftrace with regs This patch implements FTRACE_WITH_REGS for arm64, which allows a traced function's arguments (and some other registers) to be captured into a struct pt_regs, allowing these to be inspected and/or modified. This is a building block for live-patching, where a function's arguments may be forwarded to another function. This is also necessary to enable ftrace and in-kernel pointer authentication at the same time, as it allows the LR value to be captured and adjusted prior to signing. Using GCC's -fpatchable-function-entry=N option, we can have the compiler insert a configurable number of NOPs between the function entry point and the usual prologue. This also ensures functions are AAPCS compliant (e.g. disabling inter-procedural register allocation). For example, with -fpatchable-function-entry=2, GCC 8.1.0 compiles the following: | unsigned long bar(void); | | unsigned long foo(void) | { | return bar() + 1; | } ... to: | : | nop | nop | stp x29, x30, [sp, #-16]! | mov x29, sp | bl 0 | add x0, x0, #0x1 | ldp x29, x30, [sp], #16 | ret This patch builds the kernel with -fpatchable-function-entry=2, prefixing each function with two NOPs. To trace a function, we replace these NOPs with a sequence that saves the LR into a GPR, then calls an ftrace entry assembly function which saves this and other relevant registers: | mov x9, x30 | bl Since patchable functions are AAPCS compliant (and the kernel does not use x18 as a platform register), x9-x18 can be safely clobbered in the patched sequence and the ftrace entry code. There are now two ftrace entry functions, ftrace_regs_entry (which saves all GPRs), and ftrace_entry (which saves the bare minimum). A PLT is allocated for each within modules. Signed-off-by: Torsten Duwe [Mark: rework asm, comments, PLTs, initialization, commit message] Signed-off-by: Mark Rutland Reviewed-by: Amit Daniel Kachhap Reviewed-by: Ard Biesheuvel Reviewed-by: Torsten Duwe Tested-by: Amit Daniel Kachhap Tested-by: Torsten Duwe Cc: AKASHI Takahiro Cc: Catalin Marinas Cc: Josh Poimboeuf Cc: Julien Thierry Cc: Will Deacon commit 1f377e043b3b8ef68caffe47bdad794f4e2cb030 Author: Mark Rutland Date: Fri Oct 18 16:37:47 2019 +0100 arm64: asm-offsets: add S_FP So that assembly code can more easily manipulate the FP (x29) within a pt_regs, add an S_FP asm-offsets definition. Signed-off-by: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Torsten Duwe Tested-by: Amit Daniel Kachhap Tested-by: Torsten Duwe Cc: Catalin Marinas Cc: Will Deacon commit e3bf8a67f759b498e09999804c3837688e03b304 Author: Mark Rutland Date: Fri Oct 18 11:25:26 2019 +0100 arm64: insn: add encoder for MOV (register) For FTRACE_WITH_REGS, we're going to want to generate a MOV (register) instruction as part of the callsite intialization. As MOV (register) is an alias for ORR (shifted register), we can generate this with aarch64_insn_gen_logical_shifted_reg(), but it's somewhat verbose and difficult to read in-context. Add a aarch64_insn_gen_move_reg() wrapper for this case so that we can write callers in a more straightforward way. Signed-off-by: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Torsten Duwe Tested-by: Amit Daniel Kachhap Tested-by: Torsten Duwe Cc: Catalin Marinas Cc: Will Deacon commit f1a54ae9af0da4d76239256ed640a93ab3aadac0 Author: Mark Rutland Date: Thu Oct 17 15:26:38 2019 +0100 arm64: module/ftrace: intialize PLT at load time Currently we lazily-initialize a module's ftrace PLT at runtime when we install the first ftrace call. To do so we have to apply a number of sanity checks, transiently mark the module text as RW, and perform an IPI as part of handling Neoverse-N1 erratum #1542419. We only expect the ftrace trampoline to point at ftrace_caller() (AKA FTRACE_ADDR), so let's simplify all of this by intializing the PLT at module load time, before the module loader marks the module RO and performs the intial I-cache maintenance for the module. Thus we can rely on the module having been correctly intialized, and can simplify the runtime work necessary to install an ftrace call in a module. This will also allow for the removal of module_disable_ro(). Tested by forcing ftrace_make_call() to use the module PLT, and then loading up a module after setting up ftrace with: | echo ":mod:" > set_ftrace_filter; | echo function > current_tracer; | modprobe Since FTRACE_ADDR is only defined when CONFIG_DYNAMIC_FTRACE is selected, we wrap its use along with most of module_init_ftrace_plt() with ifdeffery rather than using IS_ENABLED(). Signed-off-by: Mark Rutland Reviewed-by: Amit Daniel Kachhap Reviewed-by: Ard Biesheuvel Reviewed-by: Torsten Duwe Tested-by: Amit Daniel Kachhap Tested-by: Torsten Duwe Cc: Catalin Marinas Cc: James Morse Cc: Peter Zijlstra Cc: Will Deacon commit bd8b21d3dd661658addc1cd4cc869bab11d28596 Author: Mark Rutland Date: Thu Oct 17 14:03:26 2019 +0100 arm64: module: rework special section handling When we load a module, we have to perform some special work for a couple of named sections. To do this, we iterate over all of the module's sections, and perform work for each section we recognize. To make it easier to handle the unexpected absence of a section, and to make the section-specific logic easer to read, let's factor the section search into a helper. Similar is already done in the core module loader, and other architectures (and ideally we'd unify these in future). If we expect a module to have an ftrace trampoline section, but it doesn't have one, we'll now reject loading the module. When ARM64_MODULE_PLTS is selected, any correctly built module should have one (and this is assumed by arm64's ftrace PLT code) and the absence of such a section implies something has gone wrong at build time. Subsequent patches will make use of the new helper. Signed-off-by: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Torsten Duwe Tested-by: Amit Daniel Kachhap Tested-by: Torsten Duwe Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon commit a1326b17ac03a9012cb3d01e434aacb4d67a416c Author: Mark Rutland Date: Wed Oct 16 18:17:11 2019 +0100 module/ftrace: handle patchable-function-entry When using patchable-function-entry, the compiler will record the callsites into a section named "__patchable_function_entries" rather than "__mcount_loc". Let's abstract this difference behind a new FTRACE_CALLSITE_SECTION, so that architectures don't have to handle this explicitly (e.g. with custom module linker scripts). As parisc currently handles this explicitly, it is fixed up accordingly, with its custom linker script removed. Since FTRACE_CALLSITE_SECTION is only defined when DYNAMIC_FTRACE is selected, the parisc module loading code is updated to only use the definition in that case. When DYNAMIC_FTRACE is not selected, modules shouldn't have this section, so this removes some redundant work in that case. To make sure that this is keep up-to-date for modules and the main kernel, a comment is added to vmlinux.lds.h, with the existing ifdeffery simplified for legibility. I built parisc generic-{32,64}bit_defconfig with DYNAMIC_FTRACE enabled, and verified that the section made it into the .ko files for modules. Signed-off-by: Mark Rutland Acked-by: Helge Deller Acked-by: Steven Rostedt (VMware) Reviewed-by: Ard Biesheuvel Reviewed-by: Torsten Duwe Tested-by: Amit Daniel Kachhap Tested-by: Sven Schnelle Tested-by: Torsten Duwe Cc: Ingo Molnar Cc: James E.J. Bottomley Cc: Jessica Yu Cc: linux-parisc@vger.kernel.org commit fbf6c73c5b264c25484fa9f449b5546569fe11f0 Author: Mark Rutland Date: Wed Oct 16 17:51:10 2019 +0100 ftrace: add ftrace_init_nop() Architectures may need to perform special initialization of ftrace callsites, and today they do so by special-casing ftrace_make_nop() when the expected branch address is MCOUNT_ADDR. In some cases (e.g. for patchable-function-entry), we don't have an mcount-like symbol and don't want a synthetic MCOUNT_ADDR, but we may need to perform some initialization of callsites. To make it possible to separate initialization from runtime modification, and to handle cases without an mcount-like symbol, this patch adds an optional ftrace_init_nop() function that architectures can implement, which does not pass a branch address. Where an architecture does not provide ftrace_init_nop(), we will fall back to the existing behaviour of calling ftrace_make_nop() with MCOUNT_ADDR. At the same time, ftrace_code_disable() is renamed to ftrace_nop_initialize() to make it clearer that it is intended to intialize a callsite into a disabled state, and is not for disabling a callsite that has been runtime enabled. The kerneldoc description of rec arguments is updated to cover non-mcount callsites. Signed-off-by: Mark Rutland Reviewed-by: Amit Daniel Kachhap Reviewed-by: Ard Biesheuvel Reviewed-by: Miroslav Benes Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Torsten Duwe Tested-by: Amit Daniel Kachhap Tested-by: Sven Schnelle Tested-by: Torsten Duwe Cc: Ingo Molnar commit f8db383507d658c5a729b062c97710efda876cd4 Author: Jan Kara Date: Wed Nov 6 11:48:57 2019 +0100 block: Warn if elevator= parameter is used With transition to blk-mq, the elevator= kernel argument was removed as it makes less and less sense with the current variety of devices. Since this may surprise some users and there are advices on the Internet that still suggest to use it, let's at least warn if the parameter is used. Reviewed-by: Jeff Moyer Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 634d811c619b0dbe16dc890a53d2c978e9d055d5 Author: Trond Myklebust Date: Tue Nov 5 14:59:02 2019 -0500 nfsv4: Move NFSPROC4_CLNT_COPY_NOTIFY to end of list We shouldn't insert things into the NFSPROC4_CLNT enums, since that causes the nfsstat array to be reordered. Signed-off-by: Trond Myklebust commit 807ce06c24fb1c24c3087a979b664c98eecf7b25 Merge: 66eb3add452a 8dff1df551df Author: Trond Myklebust Date: Tue Nov 5 14:53:29 2019 -0500 Merge branch 'linux-ssc-for-5.5' commit 66eb3add452aa1be65ad536da99fac4b8f620b74 Author: Trond Myklebust Date: Tue Nov 5 09:10:54 2019 -0500 SUNRPC: Avoid RPC delays when exiting suspend Jon Hunter: "I have been tracking down another suspend/NFS related issue where again I am seeing random delays exiting suspend. The delays can be up to a couple minutes in the worst case and this is causing a suspend test we have to fail." Change the use of a deferrable work to a standard delayed one. Reported-by: Jon Hunter Tested-by: Jon Hunter Fixes: 7e0a0e38fcfea ("SUNRPC: Replace the queue timer with a delayed work function") Signed-off-by: Trond Myklebust commit 8d2eecead5bf23865cb73062a4e7139a9dbce5a1 Author: Jamal Shareef Date: Mon Nov 4 21:54:27 2019 -0800 cpufreq: intel_pstate: Fix plain int as pointer warning from sparse Fix sparse warning: Using plain integer as NULL pointer. Replace assignment of 0 to pointers with NULL assignment. Signed-off-by: Jamal Shareef Signed-off-by: Rafael J. Wysocki commit fb80edb0d7662d8a9453f693055cce4c656142a9 Author: Thomas Hellstrom Date: Thu Mar 28 11:36:25 2019 +0100 drm/vmwgfx: Implement an infrastructure for read-coherent resources Similar to write-coherent resources, make sure that from the user-space point of view, GPU rendered contents is automatically available for reading by the CPU. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Jérôme Glisse Cc: Kirill A. Shutemov Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat commit 61335d7a5a2d26173160198f5257bea072dfe086 Author: Thomas Hellstrom Date: Tue Mar 5 08:24:35 2019 +0100 drm/vmwgfx: Use an RBtree instead of linked list for MOB resources With emulated coherent memory we need to be able to quickly look up a resource from the MOB offset. Instead of traversing a linked list with O(n) worst case, use an RBtree with O(log n) worst case complexity. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Jérôme Glisse Cc: Kirill A. Shutemov Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat commit 99e98d3fb1008ef7416e16a1fd355cb73a253502 Author: Rafael J. Wysocki Date: Mon Nov 4 12:16:17 2019 +0100 cpuidle: Consolidate disabled state checks There are two reasons why CPU idle states may be disabled: either because the driver has disabled them or because they have been disabled by user space via sysfs. In the former case, the state's "disabled" flag is set once during the initialization of the driver and it is never cleared later (it is read-only effectively). In the latter case, the "disable" field of the given state's cpuidle_state_usage struct is set and it may be changed via sysfs. Thus checking whether or not an idle state has been disabled involves reading these two flags every time. In order to avoid the additional check of the state's "disabled" flag (which is effectively read-only anyway), use the value of it at the init time to set a (new) flag in the "disable" field of that state's cpuidle_state_usage structure and use the sysfs interface to manipulate another (new) flag in it. This way the state is disabled whenever the "disable" field of its cpuidle_state_usage structure is nonzero, whatever the reason, and it is the only place to look into to check whether or not the state has been disabled. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Acked-by: Peter Zijlstra (Intel) commit 6b832a148717f1718f57805a9a4aa7f092582d15 Author: Andre Przywara Date: Tue Nov 5 11:06:51 2019 +0000 arm64: dts: allwinner: a64: Re-add PMU node As it was found recently, the Performance Monitoring Unit (PMU) on the Allwinner A64 SoC was not generating (the right) interrupts. With the SPI numbers from the manual the kernel did not receive any overflow interrupts, so perf was not happy at all. It turns out that the numbers were just off by 4, so the PMU interrupts are from 148 to 151, not from 152 to 155 as the manual describes. This was found by playing around with U-Boot, which typically does not use interrupts, so the GIC is fully available for experimentation: With *every* PPI and SPI enabled, an overflowing PMU cycle counter was found to set a bit in one of the GICD_ISPENDR registers, with careful counting this was determined to be number 148. Tested with perf record and perf top on a Pine64-LTS. Also tested with tasksetting to every core to confirm the assignment between IRQs and cores. This somewhat "revert-fixes" commit ed3e9406bcbc ("arm64: dts: allwinner: a64: Drop PMU node"). Fixes: 34a97fcc71c2 ("arm64: dts: allwinner: a64: Add PMU node") Fixes: ed3e9406bcbc ("arm64: dts: allwinner: a64: Drop PMU node") Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard commit b7468b15d27106d24fb30d543d1fbbc6756ae7ca Author: Thomas Hellstrom Date: Wed Mar 27 10:56:08 2019 +0100 drm/vmwgfx: Implement an infrastructure for write-coherent resources This infrastructure will, for coherent resources, make sure that from the user-space point of view, data written by the CPU is immediately automatically available to the GPU at resource validation time. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Jérôme Glisse Cc: Kirill A. Shutemov Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat commit c5acad84cf1e33ca1a50984952e1c5b2caa0e13f Author: Thomas Hellstrom Date: Tue Mar 19 13:12:30 2019 +0100 mm: Add write-protect and clean utilities for address space ranges Add two utilities to 1) write-protect and 2) clean all ptes pointing into a range of an address space. The utilities are intended to aid in tracking dirty pages (either driver-allocated system memory or pci device memory). The write-protect utility should be used in conjunction with page_mkwrite() and pfn_mkwrite() to trigger write page-faults on page accesses. Typically one would want to use this on sparse accesses into large memory regions. The clean utility should be used to utilize hardware dirtying functionality and avoid the overhead of page-faults, typically on large accesses into small memory regions. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Jérôme Glisse Cc: Kirill A. Shutemov Signed-off-by: Thomas Hellstrom Acked-by: Andrew Morton commit ecaad8aca20432fa60821282d8ff479629c9f7b9 Author: Thomas Hellstrom Date: Tue Oct 1 11:17:34 2019 +0200 mm: Add a walk_page_mapping() function to the pagewalk code For users that want to travers all page table entries pointing into a region of a struct address_space mapping, introduce a walk_page_mapping() function. The walk_page_mapping() function will be initially be used for dirty- tracking in virtual graphics drivers. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Jérôme Glisse Cc: Kirill A. Shutemov Signed-off-by: Thomas Hellstrom Reviewed-by: Andrew Morton commit ace88f1018b88167a78bafd545d30816d6e207bf Author: Thomas Hellstrom Date: Fri Oct 4 11:04:43 2019 +0200 mm: pagewalk: Take the pagetable lock in walk_pte_range() Without the lock, anybody modifying a pte from within this function might have it concurrently modified by someone else. Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Jérôme Glisse Cc: Kirill A. Shutemov Suggested-by: Linus Torvalds Signed-off-by: Thomas Hellstrom Acked-by: Kirill A. Shutemov commit ea81bae46032022656d45d4a395f1bf3b96697f0 Author: Thomas Hellstrom Date: Tue Oct 1 10:37:33 2019 +0200 mm: Remove BUG_ON mmap_sem not held from xxx_trans_huge_lock() The caller needs to make sure that the vma is not torn down during the lock operation and can also use the i_mmap_rwsem for file-backed vmas. Remove the BUG_ON. We could, as an alternative, add a test that either vma->vm_mm->mmap_sem or vma->vm_file->f_mapping->i_mmap_rwsem are held. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Jérôme Glisse Cc: Kirill A. Shutemov Signed-off-by: Thomas Hellstrom Acked-by: Kirill A. Shutemov commit 7aef29f4d4613570f413301b0807ea66a21f5e3b Author: Thomas Hellstrom Date: Wed Feb 6 12:55:08 2019 +0100 drm/ttm: Convert vm callbacks to helpers The default TTM fault handler may not be completely sufficient (vmwgfx needs to do some bookkeeping, control the write protectionand also needs to restrict the number of prefaults). Also make it possible replicate ttm_bo_vm_reserve() functionality for, for example, mkwrite handlers. So turn the TTM vm code into helpers: ttm_bo_vm_fault_reserved(), ttm_bo_vm_open(), ttm_bo_vm_close() and ttm_bo_vm_reserve(). Also provide a default TTM fault handler for other drivers to use. Signed-off-by: Thomas Hellstrom Reviewed-by: Christian König commit 13f8a6148a50e9219491c3d0843056377695cb85 Author: Thomas Hellstrom Date: Wed Sep 18 11:03:13 2019 +0200 drm/ttm: Remove explicit typecasts of vm_private_data The explicit typcasts are meaningless, so remove them. Suggested-by: Matthew Wilcox Signed-off-by: Thomas Hellstrom Reviewed-by: Christian König commit 918e1946c8ac2c0473eefc1dc910780178490e95 Author: Rich Wiley Date: Tue Nov 5 10:45:10 2019 -0800 arm64: kpti: Add NVIDIA's Carmel core to the KPTI whitelist NVIDIA Carmel CPUs don't implement ID_AA64PFR0_EL1.CSV3 but aren't susceptible to Meltdown, so add Carmel to kpti_safe_list[]. Signed-off-by: Rich Wiley Signed-off-by: Catalin Marinas commit 218564b164ad9d283d3cb3d5367705726123a610 Author: Bhupesh Sharma Date: Tue Nov 5 03:26:46 2019 +0530 arm64: mm: Remove MAX_USER_VA_BITS definition commit 9b31cf493ffa ("arm64: mm: Introduce MAX_USER_VA_BITS definition") introduced the MAX_USER_VA_BITS definition, which was used to support the arm64 mm use-cases where the user-space could use 52-bit virtual addresses whereas the kernel-space would still could a maximum of 48-bit virtual addressing. But, now with commit b6d00d47e81a ("arm64: mm: Introduce 52-bit Kernel VAs"), we removed the 52-bit user/48-bit kernel kconfig option and hence there is no longer any scenario where user VA != kernel VA size (even with CONFIG_ARM64_FORCE_52BIT enabled, the same is true). Hence we can do away with the MAX_USER_VA_BITS macro as it is equal to VA_BITS (maximum VA space size) in all possible use-cases. Note that even though the 'vabits_actual' value would be 48 for arm64 hardware which don't support LVA-8.2 extension (even when CONFIG_ARM64_VA_BITS_52 is enabled), VA_BITS would still be set to a value 52. Hence this change would be safe in all possible VA address space combinations. Cc: James Morse Cc: Will Deacon Cc: Steve Capper Cc: Ard Biesheuvel Cc: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org Reviewed-by: Mark Rutland Signed-off-by: Bhupesh Sharma Signed-off-by: Catalin Marinas commit 32d1870877ba7675c642e903e5ef71c82a245325 Author: Masahiro Yamada Date: Sun Nov 3 21:35:58 2019 +0900 arm64: mm: simplify the page end calculation in __create_pgd_mapping() Calculate the page-aligned end address more simply. The local variable, "length" is unneeded. Reviewed-by: Mark Rutland Signed-off-by: Masahiro Yamada Signed-off-by: Catalin Marinas commit 582f94b5900a9bccca993dc16ca77364a0aa12a9 Author: Yazen Ghannam Date: Wed Nov 6 01:25:01 2019 +0000 EDAC/amd64: Check for memory before fully initializing an instance Return early before checking for ECC if the node does not have any populated memory. Free any cached hardware data before returning. Also, return 0 in this case since this is not a failure. Other nodes may have memory and the module should attempt to load an instance for them. Move printing of hardware information to after the instance is initialized, so that the information is only printed for nodes with memory. Return an error code when ECC is disabled. This check happens after checking for memory. The module should explicitly fail to load if memory is populated on a node and ECC is disabled. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106012448.243970-6-Yazen.Ghannam@amd.com commit 1c9b08bac5bf4f4825631c885eba84461e4eed79 Author: Yazen Ghannam Date: Tue Oct 22 20:35:12 2019 +0000 EDAC/amd64: Use cached data when checking for ECC ...now that the data is available earlier. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106012448.243970-5-Yazen.Ghannam@amd.com commit 5e4c55276ae8758f5789722b384bb2ab3de3a24f Author: Yazen Ghannam Date: Tue Oct 22 20:35:11 2019 +0000 EDAC/amd64: Save max number of controllers to family type The maximum number of memory controllers is fixed within a family/model group. In most cases, this has been fixed at 2, but some systems may have up to 8. The struct amd64_family_type already contains family/model-specific information, and this can be used rather than adding model checks to various functions. Create a new field in struct amd64_family_type for max_mcs. Set this when setting other family type information, and use this when needing the maximum number of memory controllers possible for a system. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106012448.243970-4-Yazen.Ghannam@amd.com commit 80355a3b2db9d0b713af5169e2cdd7f8fbfdad82 Author: Yazen Ghannam Date: Tue Oct 22 20:35:10 2019 +0000 EDAC/amd64: Gather hardware information early Split out gathering hardware information from init_one_instance() into a separate function hw_info_get(). This is necessary so that the information can be cached earlier and used to check if memory is populated and if ECC is enabled on a node. Also, define a function hw_info_put() to back out changes made in hw_info_get(). Check for an allocated PCI device (Function 0 for Family 17h or Function 1 for pre-Family 17h) before freeing, since hw_info_put() may be called before PCI siblings are reserved. Drop the family check when freeing pvt->umc. This will be NULL on pre-Family 17h systems. However, kfree() is safe and will check for a NULL pointer before freeing. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106012448.243970-3-Yazen.Ghannam@amd.com commit 38ddd4d1574530e1447b6ad91d27225d0f7662fb Author: Yazen Ghannam Date: Tue Oct 22 20:35:09 2019 +0000 EDAC/amd64: Make struct amd64_family_type global The struct amd64_family_type doesn't change between multiple nodes and instances of the module, so make it global. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Tony Luck Link: https://lkml.kernel.org/r/20191106012448.243970-2-Yazen.Ghannam@amd.com commit dae82c7fd0926840c832151f3258ba751f73d348 Merge: a9913d7eafa7 a0828b6ccbdf Author: Jan Kara Date: Wed Nov 6 10:52:10 2019 +0100 Pull series refactoring quota enabling and disabling code. commit df444457711858d398896d678bd3cd7f43f1c1f5 Author: Sean Paul Date: Tue Nov 5 16:10:24 2019 -0500 drm/mediatek: Support 180 degree rotation Now that we support both reflections, we can expose 180 degree rotation and rely on the simplify routine to convert that into REFLECT_X | REFLECT_Y Signed-off-by: Sean Paul Signed-off-by: CK Hu commit b368d3ecab2db45a4fa296fe825d4ef6893f4620 Author: Sean Paul Date: Tue Nov 5 16:10:23 2019 -0500 drm/mediatek: Support reflect-x plane rotation Add support for REFLECT_X rotations. Cc: Fritz Koenig Cc: Daniele Castagna Cc: Miguel Casas Cc: Mark Yacoub Signed-off-by: Sean Paul Signed-off-by: CK Hu commit 84d805753983757ea3655acbd47887764acf293f Author: Sean Paul Date: Tue Nov 5 16:10:22 2019 -0500 drm/mediatek: Support reflect-y plane rotation Expose the rotation property and handle REFLECT_Y rotations. Cc: Fritz Koenig Cc: Daniele Castagna Cc: Miguel Casas Cc: Mark Yacoub Signed-off-by: Sean Paul Signed-off-by: CK Hu commit ef87d3e2dd251374c5c9fa3b6502aeff8fe29da9 Author: Sean Paul Date: Tue Nov 5 16:10:21 2019 -0500 drm/mediatek: Plumb supported rotation values from components to plane init This patch adds the ability for components to expose supported rotations which will be exposed to userspace via a plane rotation property. No functional changes in this patch. Signed-off-by: Sean Paul Signed-off-by: CK Hu commit f7c710d1e48414b16e5b1b64e2940606148123a7 Author: Sean Paul Date: Tue Nov 5 16:10:20 2019 -0500 drm/mediatek: Add plumbing for layer_check hook This allows components to implement a .layer_check callback for their layers which is called during atomic_check. Signed-off-by: Sean Paul Signed-off-by: CK Hu commit d6b53f68356f74d11530cb834b1c8acfe5f2bae2 Author: Sean Paul Date: Tue Nov 5 16:10:19 2019 -0500 drm/mediatek: Add helper to get component for a plane Instead of hard-coding which components have planes, add a helper function to walk the components and map a plane index to a component layer. Signed-off-by: Sean Paul Signed-off-by: CK Hu commit 31c5558dae0513bd2bae33ea37543f584c6c35a5 Author: Sean Paul Date: Tue Nov 5 16:10:18 2019 -0500 drm/mediatek: Refactor plane init Add a couple of functions which enumerate the number of planes for a component and initialize the planes for a component. No functional changes in this patch, but it will allow us to selectively support rotation if the component supports it. Signed-off-by: Sean Paul Signed-off-by: CK Hu commit ed24d5d05e5d6cdae1358c71278041d75ef51051 Author: Sean Paul Date: Wed Oct 23 15:51:17 2019 -0400 drm/mediatek: Add RGB[A] variants to published plane formats These formats are handled in the rdma code, but for some reason they're not published as supported formats for the planes. So add them to the list. Cc: Nicolas Boichat Cc: Daniele Castagna Cc: Miguel Casas Tested-by: Miguel Casas Signed-off-by: Sean Paul Signed-off-by: CK Hu commit 9ea7f01f470a25bb795224cc0ecc57c91a1519c6 Author: Colin Ian King Date: Tue Nov 5 14:54:16 2019 +0000 net/mlx5: fix spelling mistake "metdata" -> "metadata" There is a spelling mistake in a esw_warn warning message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 8b3f2eb038d3098b37715afced1e62bbc72da90f Author: Colin Ian King Date: Tue Nov 5 18:27:40 2019 +0000 net/mlx5: fix kvfree of uninitialized pointer spec Currently when a call to esw_vport_create_legacy_ingress_acl_group fails the error exit path to label 'out' will cause a kvfree on the uninitialized pointer spec. Fix this by ensuring pointer spec is initialized to NULL to avoid this issue. Addresses-Coverity: ("Uninitialized pointer read") Fixes: 10652f39943e ("net/mlx5: Refactor ingress acl configuration") Signed-off-by: Colin Ian King Signed-off-by: Saeed Mahameed commit c8510d240306075ebb2ac2a44054d664cb39908b Author: Vinod Koul Date: Thu Oct 24 13:18:00 2019 +0530 scsi: dt-bindings: ufs: Add sm8150 compatible string Document "qcom,sm8150-ufshc" compatible string for UFS HC found on SM8150. Link: https://lore.kernel.org/r/20191024074802.26526-2-vkoul@kernel.org Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Acked-by: Rob Herring Signed-off-by: Vinod Koul Signed-off-by: Martin K. Petersen commit f9fab3d9860050ed69b7cee348a449a7853a3259 Author: Maurizio Lombardi Date: Thu Oct 17 15:10:37 2019 +0200 scsi: target: iscsi: rename some variables to avoid confusion. This patch renames some variables in chap_server_compute_hash() to make it harder to confuse the initiator's challenge with the target's challenge when the mutual chap authentication is used. Link: https://lore.kernel.org/r/20191017131037.9903-4-mlombard@redhat.com Signed-off-by: Maurizio Lombardi Signed-off-by: Martin K. Petersen commit 19f5f88ed779180f16e236949e18389a0dca4aae Author: Maurizio Lombardi Date: Thu Oct 17 15:10:36 2019 +0200 scsi: target: iscsi: tie the challenge length to the hash digest size Link: https://lore.kernel.org/r/20191017131037.9903-3-mlombard@redhat.com Signed-off-by: Maurizio Lombardi Tested-by: Chris Leech Signed-off-by: Martin K. Petersen commit 6266a4dadb1d0976490fdf5af4f7941e36f64e80 Author: Michael Ellerman Date: Wed Nov 6 13:30:25 2019 +1100 powerpc/64s: Always disable branch profiling for prom_init.o Otherwise the build fails because prom_init is calling symbols it's not allowed to, eg: Error: External symbol 'ftrace_likely_update' referenced from prom_init.c make[3]: *** [arch/powerpc/kernel/Makefile:197: arch/powerpc/kernel/prom_init_check] Error 1 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191106051129.7626-1-mpe@ellerman.id.au commit a572d24af4d16e70743feb0b4decb17aaae7ce43 Author: Maurizio Lombardi Date: Mon Oct 28 13:38:20 2019 +0100 scsi: target: iscsi: CHAP: add support for SHA1, SHA256 and SHA3-256 This patch modifies the chap_server_compute_hash() function to make it agnostic to the choice of hash algorithm that is used. It also adds support to three new hash algorithms: SHA1, SHA256 and SHA3-256. The chap_got_response() function has been removed because the digest type validity is already checked by chap_server_open() Link: https://lore.kernel.org/r/20191028123822.5864-2-mlombard@redhat.com Signed-off-by: Maurizio Lombardi Tested-by: Chris Leech Signed-off-by: Martin K. Petersen commit f6b8540f40201bff91062dd64db8e29e4ddaaa9d Author: Bart Van Assche Date: Tue Nov 5 13:55:53 2019 -0800 scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6) According to SBC-2 a TRANSFER LENGTH field of zero means that 256 logical blocks must be transferred. Make the SCSI tracing code follow SBC-2. Fixes: bf8162354233 ("[SCSI] add scsi trace core functions and put trace points") Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Douglas Gilbert Link: https://lore.kernel.org/r/20191105215553.185018-1-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit aff6ab9e7221c1b5d15418419b9797e5badd4aec Author: James Smart Date: Mon Nov 4 16:57:08 2019 -0800 scsi: lpfc: Update lpfc version to 12.6.0.1 Update lpfc version to 12.6.0.1 Link: https://lore.kernel.org/r/20191105005708.7399-12-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 171f6c41949f6e9d5e09dcac842a10bf8dda8dcc Author: James Smart Date: Mon Nov 4 16:57:07 2019 -0800 scsi: lpfc: Add enablement of multiple adapter dumps Some adapters support the ability to hold multiple adapter dumps on the adapter flash. Some adapters default to enabling this feature while others default to single-dump. Make support uniform by enabling dual dump by default. Link: https://lore.kernel.org/r/20191105005708.7399-11-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit dcaa213679387e95a315dca05c57dbb15273703c Author: James Smart Date: Mon Nov 4 16:57:06 2019 -0800 scsi: lpfc: Change default IRQ model on AMD architectures The current driver attempts to allocate an interrupt vector per cpu using the systems managed IRQ allocator (flag PCI_IRQ_AFFINITY). The system IRQ allocator will either provide the per-cpu vector, or return fewer vectors. When fewer vectors, they are evenly spread between the numa nodes on the system. When run on an AMD architecture, if interrupts occur to a cpu that is not in the same numa node as the adapter generating the interrupt, there are extreme costs and overheads in performance. Thus, if 1:1 vector allocation is used, or the "balanced" vectors in the other numa nodes, performance can be hit significantly. A much more performant model is to allocate interrupts only on the cpus that are in the numa node where the adapter resides. I/O completion is still performed by the cpu where the I/O was generated. Unfortunately, there is no flag to request the managed IRQ subsystem allocate vectors only for the CPUs in the numa node as the adapter. On AMD architecture, revert the irq allocation to the normal style (non-managed) and then use irq_set_affinity_hint() to set the cpu affinity and disable user-space rebalancing. Tie the support into CPU offline/online. If the cpu being offlined owns a vector, the vector is re-affinitized to one of the other CPUs on the same numa node. If there are no more CPUs on the numa node, the vector has all affinity removed and lets the system determine where it's serviced. Similarly, when the cpu that owned a vector comes online, the vector is reaffinitized to the cpu. Link: https://lore.kernel.org/r/20191105005708.7399-10-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 93a4d6f40198dffcca35d9a928c409f9290f1fe0 Author: James Smart Date: Mon Nov 4 16:57:05 2019 -0800 scsi: lpfc: Add registration for CPU Offline/Online events The recent affinitization didn't address cpu offlining/onlining. If an interrupt vector is shared and the low order cpu owning the vector is offlined, as interrupts are managed, the vector is taken offline. This causes the other CPUs sharing the vector will hang as they can't get io completions. Correct by registering callbacks with the system for Offline/Online events. When a cpu is taken offline, its eq, which is tied to an interrupt vector is found. If the cpu is the "owner" of the vector and if the eq/vector is shared by other CPUs, the eq is placed into a polled mode. Additionally, code paths that perform io submission on the "sharing CPUs" will check the eq state and poll for completion after submission of new io to a wq that uses the eq. Similarly, when a cpu comes back online and owns an offlined vector, the eq is taken out of polled mode and rearmed to start driving interrupts for eq. Link: https://lore.kernel.org/r/20191105005708.7399-9-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit b9da814cd5f5bb93041a6e4dbc9c5149713186ff Author: James Smart Date: Mon Nov 4 16:57:04 2019 -0800 scsi: lpfc: Clarify FAWNN error message Current message on FAWWN events is rather cryptic. Expand the message to clarify its meaning. Link: https://lore.kernel.org/r/20191105005708.7399-8-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 69641627c653464db46f3e3d8c438349be055670 Author: James Smart Date: Mon Nov 4 16:57:03 2019 -0800 scsi: lpfc: Sync with FC-NVMe-2 SLER change to require Conf with SLER Prior to the last FC-NVME-2 draft, SLER and CONF were independent. SLER now requires CONF to be set. Revise the NVME PRLI checking to look for both inorder to enable SLER. Link: https://lore.kernel.org/r/20191105005708.7399-7-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit dda5bdf074da3782ff9e785ee50cd2a3f214d498 Author: James Smart Date: Mon Nov 4 16:57:02 2019 -0800 scsi: lpfc: Fix dynamic fw log enablement check The recently posted patch had a typo that incorrectly tested the receiving function. Fix the typo (change == to !=) Fixes: 95bfc6d8ad86 ("scsi: lpfc: Make FW logging dynamically configurable") Link: https://lore.kernel.org/r/20191105005708.7399-6-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 2332e6e475b016e2026763f51333f84e2e6c57a3 Author: James Smart Date: Mon Nov 4 16:57:01 2019 -0800 scsi: lpfc: Fix unexpected error messages during RSCN handling During heavy RCN activity and log_verbose = 0 we see these messages: 2754 PRLI failure DID:521245 Status:x9/xb2c00, data: x0 0231 RSCN timeout Data: x0 x3 0230 Unexpected timeout, hba link state x5 This is due to delayed RSCN activity. Correct by avoiding the timeout thus the messages by restarting the discovery timeout whenever an rscn is received. Filter PRLI responses such that severity depends on whether expected for the configuration or not. For example, PRLI errors on a fabric will be informational (they are expected), but Point-to-Point errors are not necessarily expected so they are raised to an error level. Link: https://lore.kernel.org/r/20191105005708.7399-5-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 6c1e803eac846f886cd35131e6516fc51a8414b9 Author: James Smart Date: Mon Nov 4 16:57:00 2019 -0800 scsi: lpfc: Fix kernel crash at lpfc_nvme_info_show during remote port bounce When reading sysfs nvme_info file while a remote port leaves and comes back, a NULL pointer is encountered. The issue is due to ndlp list corruption as the the nvme_info_show does not use the same lock as the rest of the code. Correct by removing the rcu_xxx_lock calls and replace by the host_lock and phba->hbaLock spinlocks that are used by the rest of the driver. Given we're called from sysfs, we are safe to use _irq rather than _irqsave. Link: https://lore.kernel.org/r/20191105005708.7399-4-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 6bfb1620829825c01e1dcdd63b6a7700352babd9 Author: James Smart Date: Mon Nov 4 16:56:59 2019 -0800 scsi: lpfc: Fix configuration of BB credit recovery in service parameters The driver today is reading service parameters from the firmware and then overwriting the firmware-provided values with values of its own. There are some switch features that require preliminary FLOGI's that are switch-specific and done prior to the actual fabric FLOGI for traffic. The fw will perform those FLOGIs and will revise the service parameters for the features configured. As the driver later overwrites those values with its own values, it misconfigures things like BBSCN use by doing so. Correct by eliminating the driver-overwrite of firmware values. The driver correctly re-reads the service parameters after each link up to obtain the latest values from firmware. Link: https://lore.kernel.org/r/20191105005708.7399-3-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 7cfd5639d99bec0d27af089d0c8c114330e43a72 Author: James Smart Date: Mon Nov 4 16:56:58 2019 -0800 scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow If the driver receives a login that is later then LOGO'd by the remote port (aka ndlp), the driver, upon the completion of the LOGO ACC transmission, will logout the node and unregister the rpi that is being used for the node. As part of the unreg, the node's rpi value is replaced by the LPFC_RPI_ALLOC_ERROR value. If the port is subsequently offlined, the offline walks the nodes and ensures they are logged out, which possibly entails unreg'ing their rpi values. This path does not validate the node's rpi value, thus doesn't detect that it has been unreg'd already. The replaced rpi value is then used when accessing the rpi bitmask array which tracks active rpi values. As the LPFC_RPI_ALLOC_ERROR value is not a valid index for the bitmask, it may fault the system. Revise the rpi release code to detect when the rpi value is the replaced RPI_ALLOC_ERROR value and ignore further release steps. Link: https://lore.kernel.org/r/20191105005708.7399-2-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 1feefb7ec2fe11d666f6bdca6daa7affbf9c6ce9 Author: Al Viro Date: Thu Oct 17 20:39:25 2019 +0100 scsi: sg: sg_ioctl(): get rid of access_ok() simply not needed there - neither sg_new_read() nor sg_new_write() need it. Link: https://lore.kernel.org/r/20191017193925.25539-8-viro@ZenIV.linux.org.uk Signed-off-by: Al Viro Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit a64e5a868573d6fe3b76e8d17538b10499239631 Author: Al Viro Date: Thu Oct 17 20:39:24 2019 +0100 scsi: sg: sg_write(): get rid of access_ok()/__copy_from_user()/__get_user() Just use plain copy_from_user() and get_user(). Note that while a buf-derived pointer gets stored into ->dxferp, all places that actually use the resulting value feed it either to import_iovec() or to import_single_range(), and both will do validation. Link: https://lore.kernel.org/r/20191017193925.25539-7-viro@ZenIV.linux.org.uk Signed-off-by: Al Viro Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit c8c12792d5fe11375af54c6bbbbebdda105eb933 Author: Al Viro Date: Thu Oct 17 20:39:23 2019 +0100 scsi: sg: sg_read(): get rid of access_ok()/__copy_..._user() Use copy_..._user() instead, both in sg_read() and in sg_read_oxfer(). And don't open-code memdup_user()... Link: https://lore.kernel.org/r/20191017193925.25539-6-viro@ZenIV.linux.org.uk Signed-off-by: Al Viro Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit d9fc5617bcb6f8278ffedd0f25bfbb697da5ca87 Author: Al Viro Date: Thu Oct 17 20:39:22 2019 +0100 scsi: sg: sg_new_write(): don't bother with access_ok ... just use copy_from_user(). We copy only SZ_SG_IO_HDR bytes, so that would, strictly speaking, loosen the check. However, for call chains via ->write() the caller has actually checked the entire range and SG_IO passes exactly SZ_SG_IO_HDR for count. So no visible behaviour changes happen if we check only what we really need for copyin. Link: https://lore.kernel.org/r/20191017193925.25539-5-viro@ZenIV.linux.org.uk Signed-off-by: Al Viro Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit c35a5cfb41509c2214228aa321509ffd91cbf063 Author: Al Viro Date: Thu Oct 17 20:39:21 2019 +0100 scsi: sg: sg_read(): simplify reading ->pack_id of userland sg_io_hdr_t We don't need to allocate a temporary buffer and read the entire structure in it, only to fetch a single field and free what we'd allocated. Just use get_user() and be done with it... Link: https://lore.kernel.org/r/20191017193925.25539-4-viro@ZenIV.linux.org.uk Signed-off-by: Al Viro Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 062c9d4527ccbdbf49139607efd44c9c3f82a2fd Author: Al Viro Date: Thu Oct 17 20:39:20 2019 +0100 scsi: sg: sg_write(): __get_user() can fail... Link: https://lore.kernel.org/r/20191017193925.25539-3-viro@ZenIV.linux.org.uk Signed-off-by: Al Viro Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit a62726cb9cb42b366f2af2c1951ae2fff66e2ad3 Author: Al Viro Date: Thu Oct 17 20:39:19 2019 +0100 scsi: sg: sg_new_write(): replace access_ok() + __copy_from_user() with copy_from_user() Link: https://lore.kernel.org/r/20191017193925.25539-2-viro@ZenIV.linux.org.uk Signed-off-by: Al Viro Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit a16a47416d3f4f78dd8766e3278459ead45d6193 Author: Al Viro Date: Thu Oct 17 20:39:18 2019 +0100 scsi: sg: sg_ioctl(): fix copyout handling First of all, __put_user() can fail with access_ok() succeeding. And access_ok() + __copy_to_user() is spelled copy_to_user()... __put_user() *can* fail with access_ok() succeeding... Link: https://lore.kernel.org/r/20191017193925.25539-1-viro@ZenIV.linux.org.uk Signed-off-by: Al Viro Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit ec990306f77fd4c58c3b27cc3b3c53032d6e6670 Author: Pan Bian Date: Mon Nov 4 23:26:22 2019 +0800 scsi: fnic: fix use after free The memory chunk io_req is released by mempool_free. Accessing io_req->start_time will result in a use after free bug. The variable start_time is a backup of the timestamp. So, use start_time here to avoid use after free. Link: https://lore.kernel.org/r/1572881182-37664-1-git-send-email-bianpan2016@163.com Signed-off-by: Pan Bian Reviewed-by: Satish Kharat Signed-off-by: Martin K. Petersen commit 6453ae7f083b86f31e5633c847b8226e09806583 Author: Grygorii Strashko Date: Fri Nov 1 18:45:02 2019 +0200 dt-bindings: net: davinci-mdio: convert bindings to json-schema Now that we have the DT validation in place, let's convert the device tree bindings for the TI SoC Davinci/OMAP/Keystone2 MDIO Controllerr over to a YAML schemas. Signed-off-by: Grygorii Strashko Reviewed-by: Simon Horman Signed-off-by: Rob Herring commit 454f5d9da1953e05c4df51b28c335daf49dd5425 Author: Maxime Ripard Date: Fri Nov 1 14:58:08 2019 +0100 dt-bindings: Remove FIXME in yaml bindings Some binding that were introduced early on got a comment to enable additionalProperties, but we couldn't due to the generic properties being reported as errors. The way we're dealing with this now is to use the draft-08's unevaluatedProperties (even though the tools doesn't do anything with it yet). Let's convert those old bindings to it. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit 07e6315e75cde3223b2fe19b54bf0c3ff41da42a Author: Georgi Djakov Date: Wed Oct 30 12:15:55 2019 +0200 dt-bindings: interconnect: Convert qcom, qcs404 to DT schema Convert the qcom,qcs404 interconnect provider binding to DT schema. Signed-off-by: Georgi Djakov Signed-off-by: Rob Herring commit 3aa5fa030558e2b0da284fd069aeb7178543c987 Author: Jens Axboe Date: Tue Nov 5 20:34:32 2019 -0700 io_uring: kill dead REQ_F_LINK_DONE flag We had no more use for this flag after the conversion to io-wq, kill it off. Fixes: 561fb04a6a22 ("io_uring: replace workqueue usage with io-wq") Signed-off-by: Jens Axboe commit f1f40853c01b5ccd0a1a29ce0b515c6f5405a798 Author: Jens Axboe Date: Tue Nov 5 20:33:16 2019 -0700 io_uring: fixup a few spots where link failure isn't flagged If a request fails, we need to ensure we set REQ_F_FAIL_LINK on it if REQ_F_LINK is set. Any failure in the chain should break the chain. We were missing a few spots where this should be done. It might be nice to generalize this somewhat at some point, as long as we factor in the fact that failure looks different for each request type. Signed-off-by: Jens Axboe commit 3d9d879324bf45380f807048ac5158f2df2eddbf Author: Sylwester Nawrocki Date: Mon Oct 28 16:20:50 2019 +0100 dt-bindings: arm: samsung: Drop syscon compatible from CHIPID binding The "syscon" compatible string was introduced mainly to allow sharing of the CHIPID IO region between multiple drivers. However, such sharing can be also done without an additional compatible so remove "syscon". Suggested-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit fee22854c0273569836de2039d9c432ea4df2cfc Author: Dmitry Osipenko Date: Tue Nov 5 00:56:16 2019 +0300 PM / devfreq: tegra30: Tune up MCCPU boost-down coefficient MCCPU boosts up very aggressively by 800% and boosts down very mildly by 10%. This doesn't work well when system is idling because the very slow de-boosting results in lots of consecutive-down interrupts, in result memory stays clocked high and CPU doesn't enter deepest idling state instead of keeping memory at lowest freq and having CPU cluster turned off. A more faster de-boosting fixes the case of idling system and doesn't affect the case of an active system. Reviewed-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit f61ee201068ac844cc8ed7f9112e47f3452f8262 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:15 2019 +0300 PM / devfreq: tegra30: Support variable polling interval The ACTMON governor is interrupt-driven and currently hardware's polling interval is fixed to 16ms in the driver. Devfreq supports variable polling interval by the generic governors, let's re-use the generic interface for changing of the polling interval. Now the polling interval can be changed dynamically via /sys/class/devfreq/devfreq0/polling_interval. Signed-off-by: Dmitry Osipenko Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit 5c0f6c79595760c9e366c3517314051af530e3e6 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:14 2019 +0300 PM / devfreq: Add new interrupt_driven flag for governors Currently interrupt-driven governors (like NVIDIA Tegra30 ACTMON governor) are used to set polling_ms=0 in order to avoid periodic polling of device status by devfreq core. This means that polling interval can't be changed by userspace for such governors. The new governor flag allows interrupt-driven governors to convey that devfreq core shouldn't perform polling of device status and thus generic devfreq polling interval could be supported by these governors now. Signed-off-by: Dmitry Osipenko Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit 28615e37be96877e5bb3559f566e50a291cf7a05 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:13 2019 +0300 PM / devfreq: tegra30: Use kHz units for dependency threshold The dependency threshold designates a memory activity level below which CPU's frequency isn't accounted. Currently the threshold is given in "memory cycle" units and that value depends on the polling interval which is fixed to 12ms in the driver. Later on we'd want to add support for a variable polling interval and thus the threshold value either needs to be scaled in accordance to the polling interval or it needs to be represented in a units that do not depend on the polling interval. It is nicer to have threshold value being defined independently of the polling interval, thus this patch converts the dependency threshold units from "cycle" to "kHz". Having this change as a separate-preparatory patch will make easier to follow further patches. Signed-off-by: Dmitry Osipenko Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit 88ec816446fab2012c73c7096fb8b1924fe6837c Author: Dmitry Osipenko Date: Tue Nov 5 00:56:12 2019 +0300 PM / devfreq: tegra30: Disable consecutive interrupts when appropriate Consecutive interrupts should be disabled when boosting is completed. Currently the disabling of "lower" interrupt happens only for MCCPU monitor that uses dependency threshold, but even in a case of MCCPU the interrupt isn't getting disabled if CPU's activity is above the threshold. This results in a lot of dummy interrupt requests. The boosting feature is used by both MCCPU and MCALL, boosting should be stopped once it reaches 0 for both of the monitors and regardless of the activity level. The boosting stops to grow once the maximum limit is hit and thus the "upper" interrupt needs to be disabled when the limit is reached. Reviewed-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 333abefb281218ab965e34932feecb1be064d535 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:11 2019 +0300 PM / devfreq: tegra30: Don't enable already enabled consecutive interrupts Consecutive up/down interrupt-bit is set in the interrupt status register only if that interrupt was previously enabled. Thus enabling the already enabled interrupt doesn't do much for us. Reviewed-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 9cff2177789f2cf87432be76620c13ba9c632b68 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:10 2019 +0300 PM / devfreq: tegra30: Include appropriate header It's not very correct to include mod_devicetable.h for the OF device drivers and of_device.h should be included instead. Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit b87dea3bbab276fc34f5cc65749f1f39f213afd0 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:09 2019 +0300 PM / devfreq: tegra30: Constify structs Constify unmodifiable structs, for consistency. Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 61d932084174ceb4876a2b1a792dceb4fe5526eb Author: Dmitry Osipenko Date: Tue Nov 5 00:56:08 2019 +0300 PM / devfreq: tegra30: Don't enable consecutive-down interrupt on startup The consecutive-down event tells that we should perform frequency de-boosting, but boosting is in a reset state on start and hence the event won't do anything useful for us and it will be just a dummy interrupt request. Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 142665582736f7f0a5c11a606271705020ba2f4e Author: Dmitry Osipenko Date: Tue Nov 5 00:56:07 2019 +0300 PM / devfreq: tegra30: Reset boosting on startup Governor could be stopped while boosting is active. We have assumption that everything is reset on governor's restart, including the boosting value, which was missed. Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 6f2a35d65b3c4bbc579a115589edcc7ed6239dce Author: Dmitry Osipenko Date: Tue Nov 5 00:56:06 2019 +0300 PM / devfreq: tegra30: Move clk-notifier's registration to governor's start There is no point in receiving of the notifications while governor is stopped, let's keep them disabled like we do for the CPU freq-change notifications. This also fixes a potential use-after-free bug if notification happens after device's removal. Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 11eb6ec5c0d4ad513c62e33009bcb15d84dfff56 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:05 2019 +0300 PM / devfreq: tegra30: Use CPUFreq notifier The CPU's client need to take into account that CPUFreq may change while memory activity not, staying high. Thus an appropriate frequency notifier should be used in addition to the clk-notifier. Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 0ce3884654d186842eed858b6d41925539696454 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:04 2019 +0300 PM / devfreq: tegra30: Use kHz units uniformly in the code Part of the code uses Hz units and the other kHz, let's switch to kHz everywhere for consistency. A small benefit from this change (besides code's cleanup) is that now powertop utility correctly displays devfreq's stats, for some reason it expects them to be in kHz. Tested-by: Peter Geis Reviewed-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 53b4b2aeee26f42cde5ff2a16dd0d8590c51a55a Author: Dmitry Osipenko Date: Tue Nov 5 00:56:03 2019 +0300 PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out There is another kHz-conversion bug in the code, resulting in integer overflow. Although, this time the resulting value is 4294966296 and it's close to ULONG_MAX, which is okay in this case. Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit e7955a34a2344b5a237aabd4d8a43e30c3183b79 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:02 2019 +0300 PM / devfreq: tegra30: Drop write-barrier There is no need in a write-barrier now, given that interrupt masking is handled by CPU's GIC now. Hence we know exactly that interrupt won't fire after stopping the devfreq's governor. In other cases we don't care about potential buffering of the writes to hardware and thus there is no need to stall CPU. Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 7296443b900e6a432da3d6b1a7862beb83946d19 Author: Dmitry Osipenko Date: Tue Nov 5 00:56:01 2019 +0300 PM / devfreq: tegra30: Handle possible round-rate error The EMC clock rate rounding technically could fail, hence let's handle the error cases properly. Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit d49eeb1e838594b8fea9ac29736d7b4e949a530f Author: Dmitry Osipenko Date: Tue Nov 5 00:56:00 2019 +0300 PM / devfreq: tegra30: Keep interrupt disabled while governor is stopped There is no real need to keep interrupt always-enabled, will be nicer to keep it disabled while governor is inactive. Suggested-by: Thierry Reding Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit dccdea01adf3b1413fbbb342128702741069cb6c Author: Dmitry Osipenko Date: Tue Nov 5 00:55:59 2019 +0300 PM / devfreq: tegra30: Change irq type to unsigned int IRQ numbers are always positive, hence the corresponding variable should be unsigned to keep types consistent. This is a minor change that cleans up code a tad more. Suggested-by: Thierry Reding Acked-by: MyungJoo Ham Reviewed-by: Chanwoo Choi Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 1f125dee4feda21bca39ed7f1165198d96fca233 Author: Marek Szyprowski Date: Tue Oct 1 14:46:41 2019 +0200 PM / devfreq: exynos-ppmu: remove useless assignment The error code is propagated to the caller, so there is no need to keep it additionally in the unused variable. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit 2abb0d5268ae7b5ddf82099b1f8d5aa8414637d4 Author: Leonard Crestez Date: Tue Sep 24 10:52:23 2019 +0300 PM / devfreq: Lock devfreq in trans_stat_show There is no locking in this sysfs show function so stats printing can race with a devfreq_update_status called as part of freq switching or with initialization. Also add an assert in devfreq_update_status to make it clear that lock must be held by caller. Fixes: 39688ce6facd ("PM / devfreq: account suspend/resume for stats") Cc: stable@vger.kernel.org Signed-off-by: Leonard Crestez Reviewed-by: Matthias Kaehlcke Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit d68adc8f85cd757bd33c8d7b2660ad6f16f7f3dc Author: Leonard Crestez Date: Tue Sep 24 10:26:53 2019 +0300 PM / devfreq: Check NULL governor in available_governors_show The governor is initialized after sysfs attributes become visible so in theory the governor field can be NULL here. Fixes: bcf23c79c4e46 ("PM / devfreq: Fix available_governor sysfs") Signed-off-by: Leonard Crestez Reviewed-by: Matthias Kaehlcke Reviewed-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit 36eba5deffac3793372ebad4899591103aa3a947 Author: Kamil Konieczny Date: Wed Aug 7 15:38:38 2019 +0200 dt-bindings: devfreq: exynos-bus: Remove unused property Remove unused DT property "exynos,voltage-tolerance". Signed-off-by: Kamil Konieczny Acked-by: Chanwoo Choi Acked-by: Rob Herring Signed-off-by: Chanwoo Choi commit df4d7b1451bf51e75406b6339e964d816f8e947e Author: Matthias Kaehlcke Date: Wed Sep 18 17:09:46 2019 -0700 PM / devfreq: Make log message more explicit when devfreq device already exists Before creating a new devfreq device devfreq_add_device() checks if there is already a devfreq dev associated with the requesting device (parent). If that's the case the function rejects to create another devfreq dev for that parent and logs an error. The error message is very unspecific, make it a bit more explicit. Reviewed-by: Chanwoo Choi Signed-off-by: Matthias Kaehlcke Signed-off-by: MyungJoo Ham Signed-off-by: Chanwoo Choi commit 3b7b37846ba69232343a2f2e7eb5f66aaa81c071 Author: Lukasz Luba Date: Wed Jun 5 11:12:35 2019 +0200 Documentation: devicetree: add PPMU events description Extend the documenation by events description with new 'event-data-type' field. Add example how the event might be defined in DT. Signed-off-by: Lukasz Luba Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit fcbd8037f7df694aa7bfb7ce82c0c7f5e53e7b7b Author: Lukasz Luba Date: Wed Jun 5 11:12:32 2019 +0200 include: dt-bindings: add Performance Monitoring Unit for Exynos This patch add support of a new feature which can be used in DT: Performance Monitoring Unit with defined event data type. In this patch the event data types are defined for Exynos PPMU. The patch also updates the MAINTAINERS file accordingly and adds the header file to devfreq event subsystem. Acked-by: Chanwoo Choi Reviewed-by: Rob Herring Signed-off-by: Lukasz Luba Signed-off-by: Chanwoo Choi commit a3ead21d6eec4d18b48466c7b978566bc9cab676 Merge: d673f5635852 086ddf860650 Author: David S. Miller Date: Tue Nov 5 18:36:35 2019 -0800 Merge tag 'wireless-drivers-next-2019-11-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 5.5 First set of patches for 5.5. The most active driver here clearly is rtw88, lots of patches for it. More quiet on other drivers, smaller fixes and cleanups all over. This pull request also has a trivial conflict, the report and example resolution here: https://lkml.kernel.org/r/20191031111242.50ab1eca@canb.auug.org.au Major changes: rtw88 * add deep power save support * add mac80211 software tx queue (wake_tx_queue) support * enable hardware rate control * add TX-AMSDU support * add NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 support * add power tracking support * add 802.11ac beamformee support * add set_bitrate_mask support * add phy_info debugfs to show Tx/Rx physical status * add RFE type 3 support for 8822b ath10k * add support for hardware rfkill on devices where firmware supports it rtl8xxxu * add bluetooth co-existence support for single antenna iwlwifi * Revamp the debugging infrastructure ==================== Signed-off-by: David S. Miller commit d673f56358528fca20bc140a4343a16c24ffeb97 Merge: 9647722befbe 5759af0682b3 Author: David S. Miller Date: Tue Nov 5 18:33:05 2019 -0800 Merge tag 'batadv-next-for-davem-20191105' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature/cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - Simplify batadv_v_ogm_aggr_list_free using skb_queue_purge, by Christophe Jaillet - Replace aggr_list_lock with lock free skb handlers, by Christophe Jaillet - explicitly mark fallthrough cases, by Sven Eckelmann - Drop lockdep.h include from soft-interface.c, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 9647722befbedcd6735e00655ffec392c05f0c56 Author: Kai-Heng Feng Date: Tue Nov 5 19:24:52 2019 +0800 r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2 ThinkPad Thunderbolt 3 Dock Gen 2 is another docking station that uses RTL8153 based USB ethernet. The device supports macpassthru, but it failed to pass the test of -AD, -BND and -BD. Simply bypass these tests since the device supports this feature just fine. Also the ACPI objects have some differences between Dell's and Lenovo's, so make those ACPI infos no longer hardcoded. BugLink: https://bugs.launchpad.net/bugs/1827961 Signed-off-by: Kai-Heng Feng Acked-by: Hayes Wang Signed-off-by: David S. Miller commit 86e8f2988786cb7ccf4833e6d32bc91a28a989b2 Author: Vishal Kulkarni Date: Tue Nov 5 11:49:15 2019 +0530 cxgb4: Add pci reset handler This patch implements reset_prepare and reset_done, which are used for handling FLR. Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit 7b3a768b2bb254b6df38b3c61412854087ce03f9 Merge: f92186177620 888f43e5da61 Author: David S. Miller Date: Tue Nov 5 18:25:14 2019 -0800 Merge branch 'bnx2x-cnic-Enable-Multi-Cos' Sudarsana Reddy Kalluru says: ==================== bnx2x/cnic: Enable Multi-Cos. The patch series enables Multi-cos feature in the driver. This require the use of new firmware 7.13.15.0. Patch (1) adds driver changes to use new FW. Patches (2) - (3) enables multi-cos functionality in bnx2x driver. Patch (4) adds cnic driver change as required by new FW. ==================== Signed-off-by: David S. Miller commit 888f43e5da61100b967445220123378da3426711 Author: Manish Rangankar Date: Mon Nov 4 21:51:12 2019 -0800 cnic: Set fp_hsi_ver as part of CLIENT_SETUP ramrod The new FW has added extra validation for HSI version to make FW backward compatible with older VF drivers. Hence set fp_hsi_ver to Fast Path HSI version of the FW in use. Signed-off-by: Manish Rangankar Signed-off-by: Nilesh Javali Signed-off-by: Manish Chopra Signed-off-by: David S. Miller commit dc5a3d79c345871439ffe72550b604fcde9770e1 Author: Manish Chopra Date: Mon Nov 4 21:51:11 2019 -0800 bnx2x: Fix PF-VF communication over multi-cos queues. PF driver doesn't enable tx-switching for all cos queues/clients, which causes packets drop from PF to VF. Fix this by enabling tx-switching on all cos queues/clients. Signed-off-by: Manish Chopra Signed-off-by: David S. Miller commit 069e47823fff2c634b2d46a328b5096fdc8c2a0c Author: Sudarsana Reddy Kalluru Date: Mon Nov 4 21:51:10 2019 -0800 bnx2x: Enable Multi-Cos feature. FW version 7.13.15 addresses the issue in Multi-cos implementation. This patch re-enables the Multi-Cos support in the driver. Fixes: d1f0b5dce8fd ("bnx2x: Disable multi-cos feature.") Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 0a6890b9b4df89a83678eba0bee3541bcca8753c Author: Sudarsana Reddy Kalluru Date: Mon Nov 4 21:51:09 2019 -0800 bnx2x: Utilize FW 7.13.15.0. Commit 97a27d6d6e8d "bnx2x: Add FW 7.13.15.0" added said .bin FW to linux-firmware tree. This FW addresses few important issues in the earlier FW release. This patch incorporates FW 7.13.15.0 in the bnx2x driver. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit f92186177620c9bcc4fc314d5c3ec79f32153348 Author: Andrew Lunn Date: Tue Nov 5 18:53:23 2019 +0100 net: ethernet: emac: Fix phy mode type Pass a phy_interface_t to of_get_phy_mode(), by changing the type of phy_mode in the device structure. This then requires that zmii_attach() is also changes, since it takes a pointer to phy_mode. Fixes: 0c65b2b90d13 ("net: of_get_phy_mode: Change API to solve int/unit warnings") Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 5ea4b122e7ed9aa921fe019a7a0649ba67919ecf Merge: 973ff55bef38 b33e699fe43a Author: David S. Miller Date: Tue Nov 5 18:20:55 2019 -0800 Merge branch 'net_sched-convert-packet-counters-to-64bit' Eric Dumazet says: ==================== net_sched: convert packet counters to 64bit This small patch series add 64bit support for packet counts. Fact that the counters were still 32bit has been quite painful. tc -s -d qd sh dev eth0 | head -3 qdisc mq 1: root Sent 665706335338 bytes 6526520373 pkt (dropped 2441, overlimits 0 requeues 91) backlog 0b 0p requeues 91 ==================== Signed-off-by: David S. Miller commit b33e699fe43aa63f29113311f69357e119ef5276 Author: Eric Dumazet Date: Mon Nov 4 19:13:15 2019 -0800 net_sched: add TCA_STATS_PKT64 attribute Now the kernel uses 64bit packet counters in scheduler layer, we want to export these counters to user space. Instead risking breaking user space by adding fields to struct gnet_stats_basic, add a new TCA_STATS_PKT64. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d0083d98f685b9f4fe810570f93cef0b0bb6b354 Author: Eric Dumazet Date: Mon Nov 4 19:13:14 2019 -0800 net_sched: extend packet counter to 64bit After this change, qdisc packet counter is no longer a 32bit quantity. We still export 32bit values to user. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 4d390c287b2f3fbd0bb64c52c1a9418f790986e1 Author: Eric Dumazet Date: Mon Nov 4 19:13:13 2019 -0800 net_sched: do not export gnet_stats_basic_packed to uapi gnet_stats_basic_packed was really meant to be private kernel structure. If this proves to be a problem, we will have to rename the in-kernel version. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 973ff55bef3899dec111248b4a71f84aa4ac05ef Merge: 2ee6ad1ddf77 e0c69ca7dfbb Author: David S. Miller Date: Tue Nov 5 18:09:45 2019 -0800 Merge branch 'mv88e6xxx-ATU-occupancy-as-devlink-resource' Andrew Lunn says: ==================== mv88e6xxx ATU occupancy as devlink resource This patchset add generic support to DSA for devlink resources. The Marvell switch Address Translation Unit occupancy is then exported as a resource. In order to do this, the number of ATU entries is added to the per switch info structure. Helpers are added, and then the resource itself is then added. ==================== Signed-off-by: David S. Miller commit e0c69ca7dfbbaaa6f9167c65f5cde740557aaed9 Author: Andrew Lunn Date: Tue Nov 5 01:13:01 2019 +0100 net: dsa: mv88e6xxx: Add ATU occupancy via devlink resources The ATU can report how many entries it contains. It does this per bin, there being 4 bins in total. Export the ATU as a devlink resource, and provide a method the needed callback to get the resource occupancy. Signed-off-by: Andrew Lunn Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit c5f299d592617847124900d75e5765cb0368ffae Author: Andrew Lunn Date: Tue Nov 5 01:13:00 2019 +0100 net: dsa: mv88e6xxx: global1_atu: Add helper for get next When retrieving the ATU statistics, and ATU get next has to be performed to trigger the ATU to collect the statistics. Export a helper from global1_atu to perform this. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 6239a386e784aed13c3ead54c3992ebcb0512d5f Author: Andrew Lunn Date: Tue Nov 5 01:12:59 2019 +0100 net: dsa: mv88e6xxx: global2: Expose ATU stats register Add helpers to set/get the ATU statistics register. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit d9ea56206c4df77175321874544eb4ca48c0bac8 Author: Andrew Lunn Date: Tue Nov 5 01:12:58 2019 +0100 net: dsa: mv88e6xxx: Add number of MACs in the ATU For each supported switch, add an entry to the info structure for the number of MACs which can be stored in the ATU. This will later be used to export the ATU as a devlink resource, and indicate its occupancy, how full the ATU is. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 5cd73fbd78794d9c9c4e7a61dc8fa83489b43d03 Author: Andrew Lunn Date: Tue Nov 5 01:12:57 2019 +0100 net: dsa: Add support for devlink resources Add wrappers around the devlink resource API, so that DSA drivers can register and unregister devlink resources. Signed-off-by: Andrew Lunn Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 2ee6ad1ddf77ca13ae5a72ddc5cad3d64dc6443c Merge: fbdcdd78da7c eee87e4377a4 Author: David S. Miller Date: Tue Nov 5 18:06:38 2019 -0800 Merge branch 'net-dsa-bcm_sf2-Add-support-for-optional-reset-controller-line' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Add support for optional reset controller line This patch series definest the optional reset controller line for the BCM7445/BCM7278 integrated Ethernet switches and updates the driver to drive that reset line in lieu of the internal watchdog based reset since it does not work on BCM7278. Changes in v2: - make the reset_control_assert() conditional to BCM7278 in the remove function as well ==================== Signed-off-by: David S. Miller commit eee87e4377a4b86dc2eea0ade162b0dc33f40576 Author: Florian Fainelli Date: Mon Nov 4 13:51:39 2019 -0800 net: dsa: bcm_sf2: Add support for optional reset controller line Grab an optional and exclusive reset controller line for the switch and manage it during probe/remove functions accordingly. For 7278 devices we change bcm_sf2_sw_rst() to use the reset controller line since the WATCHDOG_CTRL register does not reset the switch contrary to stated documentation. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9482d036cc02848f7001f2cc13e417fae0f4a1e8 Author: Florian Fainelli Date: Mon Nov 4 13:51:38 2019 -0800 dt-bindings: net: Describe BCM7445 switch reset property The BCM7445/BCM7278 built-in Ethernet switch have an optional reset line to the SoC's reset controller, describe the 'resets' and 'reset-names' properties as optional. Reviewed-by: Andrew Lunn Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3 Author: Martin Varghese Date: Mon Nov 4 07:27:44 2019 +0530 Change in Openvswitch to support MPLS label depth of 3 in ingress direction The openvswitch was supporting a MPLS label depth of 1 in the ingress direction though the userspace OVS supports a max depth of 3 labels. This change enables openvswitch module to support a max depth of 3 labels in the ingress. Signed-off-by: Martin Varghese Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit a5ec65169c6000bb525b45cb5615dd98356dbf73 Author: Colin Ian King Date: Sun Nov 3 13:15:38 2019 +0000 net: hns3: remove unused macros The macros HCLGE_MPF_ENBALE and HCLGEVF_MPF_ENBALE are defined but never used. I was going to fix the spelling mistake "ENBALE" -> "ENABLE" but found these macros are not used, so they can be removed. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 3b7ad08b5153b0eda2f4d57ac53d815c30acd172 Author: Christophe JAILLET Date: Sun Nov 3 07:11:11 2019 +0100 vsock: Simplify '__vsock_release()' Use 'skb_queue_purge()' instead of re-implementing it. Signed-off-by: Christophe JAILLET Reviewed-by: Stefano Garzarella Reviewed-by: Stefan Hajnoczi Signed-off-by: David S. Miller commit c058f6dfeb1c645e77dc89d1690848ca06f45735 Author: Florian Fainelli Date: Sat Nov 2 20:13:26 2019 -0700 net: dsa: Fix use after free in dsa_switch_remove() The order in which the ports are deleted from the list and freed and the call to dsa_switch_remove() is done is reversed, which leads to an use after free condition. Reverse the two: first tear down the ports and switch from the fabric, then free the ports associated with that switch fabric. Fixes: 05f294a85235 ("net: dsa: allocate ports on touch") Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit 2bceefbe557f4b4e875ca6db19a9f8a8bb3d557d Author: Roman Mashak Date: Sat Nov 2 18:25:51 2019 -0400 tc-testing: added tests with cookie for mpls TC action Signed-off-by: Roman Mashak Signed-off-by: David S. Miller commit 4611a4fb0cce3973dce8c9d74e5d6261ffa4210f Author: Janakarajan Natarajan Date: Tue Nov 5 17:16:57 2019 +0000 cpupower: ToDo: Update ToDo with ideas for per_cpu_schedule handling Based on Thomas Renninger's feedback/ideas. Re-structure the code to better handle the per_cpu_schedule mechanism which was introduced when adding support for AMD Zen based processors. Signed-off-by: Janakarajan Natarajan Acked-by: Thomas Renninger Signed-off-by: Shuah Khan commit 6af2ed53f0402c09b36d2b38698e18a25ca732a7 Author: Janakarajan Natarajan Date: Tue Nov 5 17:16:55 2019 +0000 cpupower: mperf_monitor: Update cpupower to use the RDPRU instruction AMD Zen 2 introduces the RDPRU instruction which can be used to access some processor registers which are typically only accessible in privilege level 0. ECX specifies the register to read and EDX:EAX will contain the value read. ECX: 0 - Register MPERF 1 - Register APERF This has the added advantage of not having to use the msr module, since the userspace to kernel transitions which occur during each read_msr() might cause APERF and MPERF to go out of sync. Signed-off-by: Janakarajan Natarajan Acked-by: Thomas Renninger Signed-off-by: Shuah Khan commit 7adafe541fe5e015261a92d39db8b163db477337 Author: Janakarajan Natarajan Date: Tue Nov 5 17:16:54 2019 +0000 cpupower: mperf_monitor: Introduce per_cpu_schedule flag The per_cpu_schedule flag is used to move the cpupower process to the cpu on which we are looking to read the APERF/MPERF registers. This prevents IPIs from being generated by read_msr()s as we are already on the cpu of interest. Ex: If cpupower is running on CPU 0 and we execute read_msr(20, MSR_APERF, val) then, read_msr(20, MSR_MPERF, val) the msr module will generate an IPI from CPU 0 to CPU 20 to query for the MSR_APERF and then the MSR_MPERF in separate IPIs. This delay, caused by IPI latency, between reading the APERF and MPERF registers may cause both of them to go out of sync. The use of the per_cpu_schedule flag reduces the probability of this from happening. It comes at the cost of a negligible increase in cpu consumption caused by the migration of cpupower across each of the cpus of the system. Signed-off-by: Janakarajan Natarajan Acked-by: Thomas Renninger Signed-off-by: Shuah Khan commit d3f5d2a192a299f56579ae6e6283f9011b00208f Author: Janakarajan Natarajan Date: Tue Nov 5 17:16:52 2019 +0000 cpupower: Move needs_root variable into a sub-struct Move the needs_root variable into a sub-struct. This is in preparation for adding a new flag for cpuidle_monitor. Update all uses of the needs_root variable to reflect this change. Signed-off-by: Janakarajan Natarajan Acked-by: Thomas Renninger Signed-off-by: Shuah Khan commit 509ba54fcfd1e45bceebe8ccea59dc496312f1a0 Author: Kuninori Morimoto Date: Tue Nov 5 15:47:26 2019 +0900 ASoC: soc.h: dobj is used only when SND_SOC_TOPOLOGY snd_soc_dobj is used only when SND_SOC_TOPOLOGY was selected. Let's enable it under SND_SOC_TOPOLOGY. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87o8xq251d.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 237d19080cd37e1ccf5462e63d8577d713f6da46 Author: Kuninori Morimoto Date: Tue Nov 5 15:47:22 2019 +0900 ASoC: soc-core: remove topology specific operation soc-core has some API which is used from topology, but it is doing topology specific operation at soc-core. soc-core should care about core things, and topology should care about topology things, otherwise, it is very confusable. For example topology type is not related to soc-core, it is topology side issue. This patch removes meaningless check from soc-core. This patch keeps extra initialization/destruction at snd_soc_add_dai_link() / snd_soc_remove_dai_link() which were for topology. From this patch, non-topology card can use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87pni6251h.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 71cb85f5e9da4aa3ab62020389b513275121083d Author: Kuninori Morimoto Date: Tue Nov 5 15:47:18 2019 +0900 ASoC: soc-core: call snd_soc_register_dai() from snd_soc_register_dais() ALSA SoC has 2 functions. snd_soc_register_dai() is used from topology snd_soc_register_dais() is used from snd_soc_add_component() In general, people think like _dai() is called from _dais() with for loop. But in reality, these are very similar but different implementation. We shouldn't have duplicated and confusing implementation. This patch calls snd_soc_register_dai() from snd_soc_register_dais() Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87r22m251l.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e443c20593de9f8efd9b2935ed40eb0bbacce30b Author: Kuninori Morimoto Date: Tue Nov 5 15:47:14 2019 +0900 ASoC: soc-core: don't call snd_soc_dapm_new_dai_widgets() at snd_soc_register_dai() ALSA SoC has 2 functions. snd_soc_register_dai() is used from topology snd_soc_register_dais() is used from snd_soc_add_component() In general, people think like _dai() is called from _dais() with for loop. But in reality, these are very similar but different implementation. We shouldn't have duplicated and confusing implementation. snd_soc_register_dai() is now used from topology. But to reduce duplicated code, it should be used from _dais(), too. Because of topology side specific reason, it is calling snd_soc_dapm_new_dai_widgets(), but it is not needed _dais() side. This patch factorizes snd_soc_register_dai() to topology / _dais() common part, and topology specific part. And do topology specific part at soc-topology. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87sgn2251p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5d07519703bc2f0bf19d33652401552a480d68b8 Author: Kuninori Morimoto Date: Tue Nov 5 15:47:09 2019 +0900 ASoC: soc-core: have legacy_dai_naming at snd_soc_register_dai() ALSA SoC has 2 functions. snd_soc_register_dai() is used from topology snd_soc_register_dais() is used from snd_soc_add_component() In general, people think like _dai() is called from _dais() with for loop. But in reality, these are very similar but different implementation. We shouldn't have duplicated and confusing implementation. snd_soc_register_dai() is now used from topology. But to reduce duplicated code, it should be used from _dais(), too. To prepare it, this patch adds missing parameter legacy_dai_naming to snd_soc_register_dai(). Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87tv7i251u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e11381f38f34789b374880c4a149e25e8d7f0cfd Author: Kuninori Morimoto Date: Tue Nov 5 15:47:04 2019 +0900 ASoC: soc-core: add snd_soc_unregister_dai() It is easy to read code if it is cleanly using paired function/naming, like start <-> stop, register <-> unregister, etc, etc. But, current ALSA SoC code is very random, unbalance, not paired, etc. It is easy to create bug at the such code, and is difficult to debug. This patch adds missing soc_del_dai() and snd_soc_unregister_dai(). Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87v9ry251z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3f6674ae13a1e498f249b0255659bfc4f692a7e0 Author: Kuninori Morimoto Date: Tue Nov 5 15:47:00 2019 +0900 ASoC: soc-core: move snd_soc_unregister_dais() This patch moves snd_soc_unregister_dais() next to snd_soc_register_dais(). This is prepare for snd_soc_register_dais() cleanup Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87woce2524.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit daf7737335bf555abf14031530fe8e47b46b373a Author: Kuninori Morimoto Date: Tue Nov 5 15:46:55 2019 +0900 ASoC: soc-core: move snd_soc_register_dai() This patch moves snd_soc_register_dai() next to snd_soc_register_dais(). This is prepare for snd_soc_register_dais() cleanup. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87y2wu2528.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ac6a4dd3e9f09697ab6a1774d7ab6a34e7ab36fa Author: Kuninori Morimoto Date: Tue Nov 5 15:46:51 2019 +0900 ASoC: soc-core: use snd_soc_lookup_component() at snd_soc_unregister_component() snd_soc_unregister_component() is now finding component manually, but we already have snd_soc_lookup_component() to find component; Let's use existing function. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87zhha252c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b18768f56162964f70bbb9119dba59a947d7d577 Author: Kuninori Morimoto Date: Tue Nov 5 15:46:45 2019 +0900 ASoC: soc-core: remove snd_soc_component_add/del() soc-core has snd_soc_add_component(), snd_soc_component_add(), snd_soc_del_component(), snd_soc_component_del(). These are very confusing naming. snd_soc_component_xxx() are called from snd_soc_xxx_component(), and these are very small. Let's merge these into snd_soc_xxx_component(), and remove snd_soc_component_xxx(). Reported-by: Pierre-Louis Bossart Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/871rum3jmy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 486c7978ff665eb763f70cc9477e0de6326e1c41 Author: Kuninori Morimoto Date: Tue Nov 5 15:46:39 2019 +0900 ASoC: soc-core: add snd_soc_del_component_unlocked() It is easy to read code if it is cleanly using paired function/naming, like start <-> stop, register <-> unregister, etc, etc. But, current ALSA SoC code is very random, unbalance, not paired, etc. It is easy to create bug at the such code, and is difficult to debug. Now ALSA SoC has snd_soc_add_component(), but there is no paired snd_soc_del_component(). Thus, snd_soc_unregister_component() is calling cleanup function randomly. it is difficult to read. This patch adds missing snd_soc_del_component_unlocked() and balance up code. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/8736f23jn4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5bd7e08b3c5f3924259643e1f413e10ca6c97634 Author: Kuninori Morimoto Date: Tue Nov 5 15:46:35 2019 +0900 ASoC: soc-core: tidyup snd_soc_lookup_component() snd_soc_lookup_component() is using mix of continue and break in the same loop. It is odd. This patch cleanup it. Reported-by: Pierre-Louis Bossart Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/874kzi3jn8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b8132657990b5a09ad8e1c9e2c8efc20b5f9372a Author: Kuninori Morimoto Date: Tue Nov 5 15:46:30 2019 +0900 ASoC: soc-core: move snd_soc_lookup_component() This patch moves snd_soc_lookup_component() to upper side. This is prepare for snd_soc_unregister_component() Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/875zjy3jnd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bc7a9091e5b927ecc20dbb3bc07a5a09783fc27b Author: Kuninori Morimoto Date: Tue Nov 5 15:46:25 2019 +0900 ASoC: soc-core: add soc_unbind_dai_link() It is easy to read code if it is cleanly using paired function/naming, like start <-> stop, register <-> unregister, etc, etc. But, current ALSA SoC code is very random, unbalance, not paired, etc. It is easy to create bug at the such code, and it will be difficult to debug. ALSA SoC has soc_bind_dai_link(), but its paired soc_unbind_dai_link() is not implemented. More confusable is that soc_remove_pcm_runtimes() which should be soc_unbind_dai_link() is implemented without synchronised to soc_bind_dai_link(). This patch cleanup this unbalance. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/877e4e3jni.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6b1dff0266a30df16846a20d1109ab25b985f0d7 Author: Kuninori Morimoto Date: Tue Nov 5 15:46:20 2019 +0900 ASoC: soc-core: call soc_bind_dai_link() under snd_soc_add_dai_link() If we focus to soc_bind_dai_link() at snd_soc_instantiate_card(), we will notice very complex operation. static int snd_soc_instantiate_card(...) { ... /* * (1) Bind dai_link via card pre-linked dai_link * * Bind dai_link via card pre-linked. * 1 dai_link will be 1 rtd, and connected to card. * for_each_card_prelinks() is for card pre-linked dai_link. * * Image * * card * - rtd(A) * - rtd(A) */ for_each_card_prelinks(card, i, dai_link) { ret = soc_bind_dai_link(card, dai_link); ... } ... /* * (2) Connect card pre-linked dai_link to card list * * Connect all card pre-linked dai_link to *card list*. * Here, (A) means from card pre-linked. * * Image * * card card list * - rtd(A) - dai_link(A) * - rtd(A) - dai_link(A) * - ... - ... */ for_each_card_prelinks(card, i, dai_link) { ret = snd_soc_add_dai_link(card, dai_link); ... } ... /* * (3) Probe binded component * * Each rtd has many components. * Here probes each rtd connected components. * rtd(A) in Image is the probe target. * * During this component probe, topology may add new dai_link to * *card list* by using snd_soc_add_dai_link() which is * used at (2). * Here, (B) means from topology * * Image * * card card list * - rtd(A) - dai_link(A) * - rtd(A) - dai_link(A) * - ... - ... * - dai_link(B) * - dai_link(B) */ ret = soc_probe_link_components(card); ... /* * (4) Bind dai_link again * * Bind dai_link again for topology. * Note, (1) used for_each_card_prelinks(), * here is using for_each_card_links() * * This means from card list. * As Image indicating, it has dai_link(A) (from card pre-link) * and dai_link(B) (from topology). * main target here is dai_link(B). * soc_bind_dai_link() ignores already used * dai_link (= dai_link(A)) * * Image * * card card list * - rtd(A) - dai_link(A) * - rtd(A) - dai_link(A) * - ... - ... * - rtd(B) - dai_link(B) * - rtd(B) - dai_link(B) */ for_each_card_links(card, dai_link) { ret = soc_bind_dai_link(card, dai_link); ... } ... } As you see above, it is doing very complex method. The problem is binding dai_link via "card pre-linked" (= (1)) and "topology added dai_link" (= (3)) are separated. The code can be simple if we can bind dai_link when dai_link is connected to *card list*. This patch do it. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/878sou3jnn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 95b562e57f0b3a21a3945297862cb51bc2072c7b Author: Kuninori Morimoto Date: Tue Nov 5 15:46:15 2019 +0900 ASoC: soc-core: remove duplicated soc_is_dai_link_bound() soc_is_dai_link_bound() check will be called both *before* soc_bind_dai_link() (A), and *under* soc_bind_dai_link() (B). These are very verbose code. Let's remove one of them. * static int soc_bind_dai_link(...) { ... (B) if (soc_is_dai_link_bound(...)) { ... return 0; } ... } static int snd_soc_instantiate_card(...) { ... for_each_card_links(...) { (A) if (soc_is_dai_link_bound(...)) continue; * ret = soc_bind_dai_link(...); if (ret) goto probe_end; } ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87a79a3jns.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit cd3c5ad7b2503f4fb4dfcc095b3fccc2b3603c36 Author: Kuninori Morimoto Date: Tue Nov 5 15:46:00 2019 +0900 ASoC: soc-core: typo fix at soc_dai_link_sanity_check() Reported-by: Pierre-Louis Bossart Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87bltq3jo7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bfce78a559655c5c4512a898a7e5d3a796fbb473 Author: Kuninori Morimoto Date: Tue Nov 5 15:45:50 2019 +0900 ASoC: soc-core: tidyup soc_init_dai_link() soc_init_dai_link() is needed to be called before soc_bind_dai_link(). int snd_soc_instantiate_card() { for_each_card_prelinks(...) { (1) ret = soc_init_dai_link(...); ... } ... for_each_card_prelinks(...) { (2) ret = soc_bind_dai_link(...); ... } ... for_each_card_links(...) { ... (A) ret = soc_init_dai_link(...); ... (B) ret = soc_bind_dai_link(...); } ... (1) is for (2), and (A) is for (B) (1) and (2) are for card prelink dai_link. (A) and (B) are for topology added dai_link. soc_init_dai_link() is sanity check for dai_link, not initializing today. Therefore, it is confusable naming. We can rename it as sanity_check. And this check is for soc_bind_dai_link(). It can be more simple code if we can call it from soc_bind_dai_link(). This patch renames it to soc_dai_link_sanity_check(), and call it from soc_bind_dai_link(). Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87d0e63joh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 36794902de1fe6f46f8aa5e0d6a8d9884eecae1d Author: Kuninori Morimoto Date: Tue Nov 5 15:45:41 2019 +0900 ASoC: soc-core: move soc_init_dai_link() This patch moves soc_init_dai_link() next to soc_bind_dai_link(). This is prepare for soc_bind_dai_link() cleanup. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87eeym3joq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3e2e193773b3e79cd793d061c2ce9357817e7486 Author: Maxime Ripard Date: Tue Nov 5 11:56:15 2019 +0100 ASoC: adau7118: Fix example warning The ADAU7118 has an example where the codec has an i2c address of 14, and the unit address set to 14 as well. However, while the address is expressed in decimal, the unit-address is supposed to be in hexadecimal, which ends up with two different addresses that trigger a DTC warning. Fix this by setting the address to 0x14. Cc: Nuno Sá Cc: Lars-Peter Clausen Fixes: 969d49b2cdc8 ("dt-bindings: asoc: Add ADAU7118 documentation") Signed-off-by: Maxime Ripard Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191105105615.21391-1-maxime@cerno.tech Signed-off-by: Mark Brown commit c2f102f1e884fe1a6a54c36f232e560675657f12 Author: Chris Packham Date: Wed Nov 6 10:41:34 2019 +1300 spi: bcm2835: fix typo in comment GPIOS_OUT_LOW should be GPIOD_OUT_LOW. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20191105214134.25142-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Mark Brown commit 1403cfa69d310781f9548951c97725c67ffcf613 Author: Thor Thayer Date: Tue Nov 5 14:22:10 2019 -0600 spi: dw: Fix Designware SPI loopback The SPI_LOOP is set in spi->mode but not propagated to the register. A previous patch removed the bit during a cleanup. Fixes: e1bc204894ea ("spi: dw: fix potential variable assignment error") Signed-off-by: Thor Thayer Link: https://lore.kernel.org/r/1572985330-5525-1-git-send-email-thor.thayer@linux.intel.com Signed-off-by: Mark Brown commit 6a24490fd664d4fc581971dbc12beb914b147726 Author: Krzysztof Kozlowski Date: Sun Nov 3 17:01:12 2019 +0100 dt-bindings: serial: Convert Samsung UART bindings to json-schema Convert Samsung S3C/S5P/Exynos Serial/UART bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 23c091d95a9860b5afb245fee7c20931ab1dce28 Author: Maxime Ripard Date: Fri Nov 1 15:32:16 2019 +0100 dt-bindings: usb: Convert Allwinner A10 mUSB controller to a schema The Allwinner SoCs have an mUSB controller that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit 89723d0bd6c77540c01ce7db2cd6f8c3be2fd958 Author: Jens Axboe Date: Tue Nov 5 15:32:58 2019 -0700 io_uring: enable optimized link handling for IORING_OP_POLL_ADD As introduced by commit: ba816ad61fdf ("io_uring: run dependent links inline if possible") enable inline dependent link running for poll commands. io_poll_complete_work() is the most important change, as it allows a linked sequence of { POLL, READ } (for example) to proceed inline instead of needing to get punted to another async context. The submission side only potentially matters for sqthread, but may as well include that bit. Signed-off-by: Jens Axboe commit 1afc14032e54a7e6c38304dc9a6bda1b6416f2b7 Author: Dmitry Torokhov Date: Wed Oct 23 13:02:27 2019 -0700 software node: simplify property_entry_read_string_array() There is no need to treat string arrays and single strings separately, we can go exclusively by the element length in relation to data type size. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit daeba9bf62e6d03667915899af48471cdf26fde4 Author: Dmitry Torokhov Date: Wed Oct 23 13:02:26 2019 -0700 software node: unify PROPERTY_ENTRY_XXX macros We can unify string properties initializer macros with integer initializers. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 5236f5fe23192aeb7ee644ea18cd8e54b46d3d76 Author: Dmitry Torokhov Date: Wed Oct 23 13:02:25 2019 -0700 software node: remove property_entry_read_uNN_array functions There is absolutely no reason to have them as we can handle it all nicely in property_entry_read_int_array(). Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 1f74d70ff21249670eb68c1344e0687aa909861d Author: Dmitry Torokhov Date: Wed Oct 23 13:02:24 2019 -0700 software node: get rid of property_set_pointer() Instead of explicitly setting values of integer types when copying property entries lets just copy entire value union when processing non-array values. For value arrays we no longer use union of pointers, but rather a single void pointer, which allows us to remove property_set_pointer(). In property_get_pointer() we do not need to handle each data type separately, we can simply return either the pointer or pointer to values union. We are not losing anything from removing typed pointer union because the upper layers do their accesses through void pointers anyway, and we trust the "type" of the property when interpret the data. We rely on users of property entries on using PROPERTY_ENTRY_XXX() macros to properly initialize entries instead of poking in the instances directly. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 75dd63c968d8e91707d74845ccb96bda3664cdaa Author: Dmitry Torokhov Date: Wed Oct 23 13:02:23 2019 -0700 software node: clean up property_copy_string_array() Because property_copy_string_array() stores the newly allocated pointer in the destination property, we have an awkward code in property_entry_copy_data() where we fetch the new pointer from dst. Let's change property_copy_string_array() to return pointer and rely on the common path in property_entry_copy_data() to store it in destination structure. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit b871160fbc61d8cd43440b3903d402e90e28e321 Author: Dmitry Torokhov Date: Wed Oct 23 13:02:22 2019 -0700 software node: mark internal macros with double underscores Let's mark PROPERTY_ENTRY_* macros that are internal with double leading underscores so users are not tempted to use them. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 4466bf82821be512da5ae973097a9afd38cf36f6 Author: Dmitry Torokhov Date: Wed Oct 23 13:02:21 2019 -0700 efi/apple-properties: use PROPERTY_ENTRY_U8_ARRAY_LEN Let's switch to using PROPERTY_ENTRY_U8_ARRAY_LEN() to initialize property entries. Also, when dumping data, rely on local variables instead of poking into the property entry structure directly. Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 1741cfacfa9ba047b3f2244fbe6e865602e70ddb Author: Dmitry Torokhov Date: Wed Oct 23 13:02:20 2019 -0700 software node: introduce PROPERTY_ENTRY_XXX_ARRAY_LEN() Sometimes we want to initialize property entry array from a regular pointer, when we can't determine length automatically via ARRAY_SIZE. Let's introduce PROPERTY_ENTRY_XXX_ARRAY_LEN macros that take explicit "len" argument. Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit a00351687f8a05773c1c57be80a5bbca68fa9ae8 Author: Dmitry Torokhov Date: Wed Oct 23 13:02:19 2019 -0700 software node: remove DEV_PROP_MAX This definition is not used anywhere, let's remove it. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit fd4b355829ec2c78b4503147062c3ca16c081f55 Merge: b8fed591df6b 54074f1dbd6f Author: David S. Miller Date: Tue Nov 5 14:03:11 2019 -0800 Merge branch 'icmp-move-duplicate-code-in-helper-functions' Matteo Croce says: ==================== icmp: move duplicate code in helper functions Remove some duplicate code by moving it in two helper functions. First patch adds the helpers, the second one uses it. ==================== Signed-off-by: David S. Miller commit 54074f1dbd6fbc0f0a085a54f3297ae26e424d59 Author: Matteo Croce Date: Sat Nov 2 01:12:04 2019 +0100 icmp: remove duplicate code The same code which recognizes ICMP error packets is duplicated several times. Use the icmp_is_err() and icmpv6_is_err() helpers instead, which do the same thing. ip_multipath_l3_keys() and tcf_nat_act() didn't check for all the error types, assume that they should instead. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 15122464d525f684a61806d28597050cdcef0f32 Author: Matteo Croce Date: Sat Nov 2 01:12:03 2019 +0100 icmp: add helpers to recognize ICMP error packets Add two helper functions, one for IPv4 and one for IPv6, to recognize the ICMP packets which are error responses. This packets are special because they have as payload the original header of the packet which generated it (RFC 792 says at least 8 bytes, but Linux actually includes much more than that). Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit b8fed591df6bf7a86a5f55a3d67a3a1a4d0fce73 Merge: 39069faac292 1fac7ca4e63b Author: David S. Miller Date: Tue Nov 5 14:01:35 2019 -0800 Merge branch 'netvsc-RSS-related-patches' Stephen Hemminger says: ==================== netvsc: RSS related patches Address a couple of issues related to recording RSS hash value in skb. These were found by reviewing RSS support. ==================== Signed-off-by: David S. Miller commit 1fac7ca4e63bf935780cc632ccb6ba8de5f22321 Author: Stephen Hemminger Date: Fri Nov 1 16:42:38 2019 -0700 hv_netvsc: record hardware hash in skb Since RSS hash is available from the host, record it in the skb. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit df9f540ca74297a84bafacfa197e9347b20beea5 Author: Stephen Hemminger Date: Fri Nov 1 16:42:37 2019 -0700 hv_netvsc: flag software created hash value When the driver needs to create a hash value because it was not done at higher level, then the hash should be marked as a software not hardware hash. Fixes: f72860afa2e3 ("hv_netvsc: Exclude non-TCP port numbers from vRSS hashing") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 39069faac292427df62097468e7a4466f87d6b2f Merge: eeb2045bb7d2 23b44513c3e6 Author: David S. Miller Date: Tue Nov 5 13:40:12 2019 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2019-11-04 This series contains updates to the ice driver only. Anirudh refactors the code to reduce the kernel configuration flags and introduces ice_base.c file. Maciej does additional refactoring on the configuring of transmit rings so that we are not configuring per each traffic class flow. Added support for XDP in the ice driver. Provides additional re-organizing of the code in preparation for adding build_skb() support in the driver. Adjusted the computational padding logic for headroom and tailroom to better support build_skb(), which also aligns with the logic in other Intel LAN drivers. Added build_skb support and make use of the XDP's data_meta. Krzysztof refactors the driver to prepare for AF_XDP support in the driver and then adds support for AF_XDP. v2: Updated patch 3 of the series based on community feedback with the following changes... - return -EOPNOTSUPP instead of ENOTSUPP for too large MTU which makes it impossible to attach XDP prog - don't check for case when there's no XDP prog currently on interface and ice_xdp() is called with NULL bpf_prog; this happens when user does "ip link set eth0 xdp off" and no prog is present on VSI; no need for that as it is handled by higher layer - drop the extack message for unknown xdp->command - use the smp_processor_id() for accessing the XDP Tx ring for XDP_TX action - don't leave the interface in downed state in case of any failure during the XDP Tx resources handling - undo rename of ice_build_ctob The above changes caused a ripple effect in patches 4 & 5 to update references to ice_build_ctob() which are now build_ctob() ==================== Signed-off-by: David S. Miller commit eeb2045bb7d20fea0a242148059377cd0cb4a499 Merge: 56c1291ee48b dc645daef9af Author: David S. Miller Date: Tue Nov 5 13:36:31 2019 -0800 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2019-11-04 This series contains old Halloween candy updates, yet still sweet, to fm10k, ixgbe and i40e. Jake adds the missing initializers for a couple of the TLV attribute macros. Added support for capturing and reporting statistics for all of the VFs in a given PF. Lastly, bump the version of the fm10k driver to reflect the recent changes. Alex addresses locality issues in the ixgbe driver when it is loaded on a system supporting multiple NUMA nodes. Manjunath Patil provides changes to the ixgbe driver, similar to those made to igb, to prevent transmit packets to request a hardware timestamp when the NIC has not been setup via the SIOCSHWTSTAMP ioctl. Alice adds support for x710 by adding the missing device id's in the appropriate places to ensure all the features are enabled in i40e. Jesse adds support for VF stats gathering in the i40e via the kernel via ndo_get_vf_stats function. v2: Fixed up commit id references in patch 5's description to align with how commit id's should be referenced. ==================== Signed-off-by: David S. Miller commit 8d0d47ea1640b23678306c007ccc813b5b930af4 Merge: a6d4040846bf 378f32bab371 Author: Theodore Ts'o Date: Tue Nov 5 16:21:09 2019 -0500 Merge branch 'mb/dio' into master commit a6d4040846bff49c7e870cee5693245f87f2cfce Merge: 0d0a60c92fed 19014d697147 Author: Theodore Ts'o Date: Tue Nov 5 16:02:20 2019 -0500 Merge branch 'jk/jbd2-revoke-overflow' commit 19014d697147c6aea3a34eea00a2844e698d070f Author: Jan Kara Date: Tue Nov 5 17:44:31 2019 +0100 jbd2: Fine tune estimate of necessary descriptor blocks Currently we reserve j_max_transaction_buffers / 32 for transaction descriptor blocks. Now that revoke descriptors are accounted for separately this estimate is unnecessarily high and we can actually compute much tighter estimate. In the common case of 32k journal blocks and 4k blocksize this actually reduces the amount of reserved descriptor blocks from 256 to ~25 which allows us to fit more real data into a transaction. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-25-jack@suse.cz Signed-off-by: Theodore Ts'o commit 0094f981bbaca3ae707c95c5e5977429d29c2dd0 Author: Jan Kara Date: Tue Nov 5 17:44:30 2019 +0100 jbd2: Provide trace event for handle restarts Provide trace event for handle restarts to ease debugging. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-24-jack@suse.cz Signed-off-by: Theodore Ts'o commit 83448bdfb59731c2f54784ed3f4a93ff95be6e7e Author: Jan Kara Date: Tue Nov 5 17:44:29 2019 +0100 ext4: Reserve revoke credits for freed blocks So far we have reserved only relatively high fixed amount of revoke credits for each transaction. We over-reserved by large amount for most cases but when freeing large directories or files with data journalling, the fixed amount is not enough. In fact the worst case estimate is inconveniently large (maximum extent size) for freeing of one extent. We fix this by doing proper estimate of the amount of blocks that need to be revoked when removing blocks from the inode due to truncate or hole punching and otherwise reserve just a small amount of revoke credits for each transaction to accommodate freeing of xattrs block or so. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-23-jack@suse.cz Signed-off-by: Theodore Ts'o commit d090707edab59cb07047d6d7e138ffcc3bdc42be Author: Jan Kara Date: Tue Nov 5 17:44:28 2019 +0100 jbd2: Make credit checking more strict Make checking of available credits in jbd2_journal_dirty_metadata() more strict. There should be always enough credits in the handle to write all potential revoke descriptors. Also we warn in case there are not enough credits since this is a bug in the filesystem. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-22-jack@suse.cz Signed-off-by: Theodore Ts'o commit 933f1c1e0b75bbc29730eef07c9e196c6dfd37e5 Author: Jan Kara Date: Tue Nov 5 17:44:27 2019 +0100 jbd2: Rename h_buffer_credits to h_total_credits The credit counter now contains both buffer and revoke descriptor block credits. Rename to counter to h_total_credits to reflect that. No functional change. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-21-jack@suse.cz Signed-off-by: Theodore Ts'o commit fdc3ef882a5d59c1709a13b5486ae2b1632e12b6 Author: Jan Kara Date: Tue Nov 5 17:44:26 2019 +0100 jbd2: Reserve space for revoke descriptor blocks Extend functions for starting, extending, and restarting transaction handles to take number of revoke records handle must be able to accommodate. These functions then make sure transaction has enough credits to be able to store resulting revoke descriptor blocks. Also revoke code tracks number of revoke records created by a handle to catch situation where some place didn't reserve enough space for revoke records. Similarly to standard transaction credits, space for unused reserved revoke records is released when the handle is stopped. On the ext4 side we currently take a simplistic approach of reserving space for 1024 revoke records for any transaction. This grows amount of credits reserved for each handle only by a few and is enough for any normal workload so that we don't hit warnings in jbd2. We will refine the logic in following commits. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-20-jack@suse.cz Signed-off-by: Theodore Ts'o commit 77444ac4f9537bc4211f928959d5231445e30c6e Author: Jan Kara Date: Tue Nov 5 17:44:25 2019 +0100 jbd2: Drop jbd2_space_needed() The function is now just a trivial wrapper returning journal->j_max_transaction_buffers. Drop it. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-19-jack@suse.cz Signed-off-by: Theodore Ts'o commit 9f356e5a4f12008fa0df8b6385fc0ab830416e72 Author: Jan Kara Date: Tue Nov 5 17:44:24 2019 +0100 jbd2: Account descriptor blocks into t_outstanding_credits Currently, journal descriptor blocks were not accounted in transaction->t_outstanding_credits and we were just leaving some slack space in the journal for them (in jbd2_log_space_left() and jbd2_space_needed()). This is making proper accounting (and reservation we want to add) of descriptor blocks difficult so switch to accounting descriptor blocks in transaction->t_outstanding_credits and just reserve the same amount of credits in t_outstanding credits for journal descriptor blocks when creating transaction. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-18-jack@suse.cz Signed-off-by: Theodore Ts'o commit ec8b6f600e49dc87a8564807fec4193bf93ee2b5 Author: Jan Kara Date: Tue Nov 5 17:44:23 2019 +0100 jbd2: Factor out common parts of stopping and restarting a handle jbd2__journal_restart() has quite some code that is common with jbd2_journal_stop(). Factor this functionality into stop_this_handle() helper and use it from both functions. Note that this also drops t_handle_lock protection from jbd2__journal_restart() as jbd2_journal_stop() does the same thing without it. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-17-jack@suse.cz Signed-off-by: Theodore Ts'o commit 5559b2d81b51de75cb7864bb1fbb82982f7e8fff Author: Jan Kara Date: Tue Nov 5 17:44:22 2019 +0100 jbd2: Drop pointless wakeup from jbd2_journal_stop() When we drop last handle from a transaction and journal->j_barrier_count > 0, jbd2_journal_stop() wakes up journal->j_wait_transaction_locked wait queue. This looks pointless - wait for outstanding handles always happens on journal->j_wait_updates waitqueue. journal->j_wait_transaction_locked is used to wait for transaction state changes and by start_this_handle() for waiting until journal->j_barrier_count drops to 0. The first case is clearly irrelevant here since only jbd2 thread changes transaction state. The second case looks related but jbd2_journal_unlock_updates() is responsible for the wakeup in this case. So just drop the wakeup. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-16-jack@suse.cz Signed-off-by: Theodore Ts'o commit 150549ed2fcf4be9bf3efedd99b72924dff26166 Author: Jan Kara Date: Tue Nov 5 17:44:21 2019 +0100 jbd2: Drop pointless check from jbd2_journal_stop() If a transaction is larger than journal->j_max_transaction_buffers, that is a bug and not a trigger for transaction commit. Also the very next attempt to start new handle will start transaction commit anyway. So just remove the pointless check. Arguably, we could start transaction commit whenever the transaction size is *close* to journal->j_max_transaction_buffers. This has a potential to reduce latency of the next jbd2_journal_start() at the cost of somewhat smaller transactions. However for this to have any effect, it would mean that there isn't someone already waiting in jbd2_journal_start() which means metadata load for the fs is pretty light anyway so probably this optimization is not worth it. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-15-jack@suse.cz Signed-off-by: Theodore Ts'o commit dfaf5ffda227be3e867fee7c0f6a66749392fbd0 Author: Jan Kara Date: Tue Nov 5 17:44:20 2019 +0100 jbd2: Reorganize jbd2_journal_stop() Move code in jbd2_journal_stop() around a bit. It removes some unnecessary code duplication and will make factoring out parts common with jbd2__journal_restart() easier. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-14-jack@suse.cz Signed-off-by: Theodore Ts'o commit 015c6033068208d6227612c878877919f3fcf6b6 Author: Jan Kara Date: Tue Nov 5 17:44:19 2019 +0100 jbd2: Fix statistics for the number of logged blocks jbd2 statistics counting number of blocks logged in a transaction was wrong. It didn't count the commit block and more importantly it didn't count revoke descriptor blocks. Make sure these get properly counted. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-13-jack@suse.cz Signed-off-by: Theodore Ts'o commit 9797a902480521dc8e7a478e38f0c896ffff8784 Author: Jan Kara Date: Tue Nov 5 17:44:18 2019 +0100 ocfs2: Use accessor function for h_buffer_credits Use the jbd2 accessor function for h_buffer_credits. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-12-jack@suse.cz Signed-off-by: Theodore Ts'o commit a9a8344ee1714f835ba394077e8c13d751e2f148 Author: Jan Kara Date: Tue Nov 5 17:44:17 2019 +0100 ext4, jbd2: Provide accessor function for handle credits Provide accessor function to get number of credits available in a handle and use it from ext4. Later, computation of available credits won't be so straightforward. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-11-jack@suse.cz Signed-off-by: Theodore Ts'o commit a413036791d040e33badcc634453a4d0c0705499 Author: Jan Kara Date: Tue Nov 5 17:44:16 2019 +0100 ext4: Provide function to handle transaction restarts Provide ext4_journal_ensure_credits_fn() function to ensure transaction has given amount of credits and call helper function to prepare for restarting a transaction. This allows to remove some boilerplate code from various places, add proper error handling for the case where transaction extension or restart fails, and reduces following changes needed for proper revoke record reservation tracking. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-10-jack@suse.cz Signed-off-by: Theodore Ts'o commit f2890730f8292831b7741d89a65b9c6834d85ee6 Author: Jan Kara Date: Tue Nov 5 17:44:15 2019 +0100 ext4: Avoid unnecessary revokes in ext4_alloc_branch() Error cleanup path in ext4_alloc_branch() calls ext4_forget() on freshly allocated indirect blocks with 'metadata' set to 1. This results in generating revoke records for these blocks. However this is unnecessary as the freed blocks are only allocated in the current transaction and thus they will never be journalled. Make this cleanup path similar to e.g. cleanup in ext4_splice_branch() and use ext4_free_blocks() to handle block forgetting by passing EXT4_FREE_BLOCKS_FORGET and not EXT4_FREE_BLOCKS_METADATA to ext4_free_blocks(). This also allows allocating transaction not to reserve any credits for revoke records. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-9-jack@suse.cz Signed-off-by: Theodore Ts'o commit 6cb367c2d1f8875043aa2d238eca9a2602dc1f72 Author: Jan Kara Date: Tue Nov 5 17:44:14 2019 +0100 ext4: Use ext4_journal_extend() instead of jbd2_journal_extend() Use ext4 helper ext4_journal_extend() instead of opencoding it in ext4_try_to_expand_extra_isize(). Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-8-jack@suse.cz Signed-off-by: Theodore Ts'o commit 321238fbfb49003c66caecb1eefb5238dce27b61 Author: Jan Kara Date: Tue Nov 5 17:44:13 2019 +0100 ext4: Fix ext4_should_journal_data() for EA inodes Similarly to directories, EA inodes do only journalled modifications to their data. Change ext4_should_journal_data() to return true for them so that we don't have to special-case them during truncate. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-7-jack@suse.cz Signed-off-by: Theodore Ts'o commit 65db869c754e7c271691dd5feabf884347e694f5 Author: Jan Kara Date: Tue Nov 5 17:44:12 2019 +0100 ext4: Fix credit estimate for final inode freeing Estimate for the number of credits needed for final freeing of inode in ext4_evict_inode() was to small. We may modify 4 blocks (inode & sb for orphan deletion, bitmap & group descriptor for inode freeing) and not just 3. [ Fixed minor whitespace nit. -- TYT ] Fixes: e50e5129f384 ("ext4: xattr-in-inode support") CC: stable@vger.kernel.org Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-6-jack@suse.cz Signed-off-by: Theodore Ts'o commit 6f72653e76a511db47addad6ab690390233fc250 Author: Jens Axboe Date: Tue Nov 5 13:51:51 2019 -0700 io-wq: use proper nesting IRQ disabling spinlocks for cancel We don't know what context we'll be called in for cancel, it could very well be with IRQs disabled already. Use the IRQ saving variants of the locking primitives. Signed-off-by: Jens Axboe commit 378f32bab3714f04c4e0c3aee4129f6703805550 Author: Matthew Bobrowski Date: Tue Nov 5 23:02:39 2019 +1100 ext4: introduce direct I/O write using iomap infrastructure This patch introduces a new direct I/O write path which makes use of the iomap infrastructure. All direct I/O writes are now passed from the ->write_iter() callback through to the new direct I/O handler ext4_dio_write_iter(). This function is responsible for calling into the iomap infrastructure via iomap_dio_rw(). Code snippets from the existing direct I/O write code within ext4_file_write_iter() such as, checking whether the I/O request is unaligned asynchronous I/O, or whether the write will result in an overwrite have effectively been moved out and into the new direct I/O ->write_iter() handler. The block mapping flags that are eventually passed down to ext4_map_blocks() from the *_get_block_*() suite of routines have been taken out and introduced within ext4_iomap_alloc(). For inode extension cases, ext4_handle_inode_extension() is effectively the function responsible for performing such metadata updates. This is called after iomap_dio_rw() has returned so that we can safely determine whether we need to potentially truncate any allocated blocks that may have been prepared for this direct I/O write. We don't perform the inode extension, or truncate operations from the ->end_io() handler as we don't have the original I/O 'length' available there. The ->end_io() however is responsible fo converting allocated unwritten extents to written extents. In the instance of a short write, we fallback and complete the remainder of the I/O using buffered I/O via ext4_buffered_write_iter(). The existing buffer_head direct I/O implementation has been removed as it's now redundant. [ Fix up ext4_dio_write_iter() per Jan's comments at https://lore.kernel.org/r/20191105135932.GN22379@quack2.suse.cz -- TYT ] Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/e55db6f12ae6ff017f36774135e79f3e7b0333da.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit 72d7df4c8079306e7fbd6243bf951461ed647a47 Author: Bryan Gurney Date: Tue Oct 22 16:46:01 2019 -0400 dm dust: add limited write failure mode Add a limited write failure mode which allows a write to a block to fail a specified amount of times, prior to remapping. The "addbadblock" message is extended to allow specifying the limited number of times a write fails. Example: add bad block on block 60, with 5 write failures: dmsetup message 0 dust1 addbadblock 60 5 The write failure counter will be printed for newly added bad blocks. Signed-off-by: Bryan Gurney Signed-off-by: Mike Snitzer commit cc7a7fb3b689996d35404080dde09de03fc1d09b Author: Bryan Gurney Date: Fri Oct 4 11:42:09 2019 -0400 dm dust: change ret to r in dust_map_read and dust_map In the dust_map_read() and dust_map() functions, change the return code variable "ret" to "r", to match the convention of the other device-mapper targets. Signed-off-by: Bryan Gurney Signed-off-by: Mike Snitzer commit 6ec1be501500787264ce62b8786ed7723bcd93f5 Author: Bryan Gurney Date: Fri Oct 4 11:42:08 2019 -0400 dm dust: change result vars to r Change the "result" variables to "r" in dust_status() and dust_message(). Signed-off-by: Bryan Gurney Signed-off-by: Mike Snitzer commit 3b0b4ebfd761943179fe03b107f66c72c3b5c8d4 Author: Heiko Stuebner Date: Tue Sep 17 10:19:03 2019 +0200 clk: rockchip: protect the pclk_usb_grf as critical on px30 Make this clock a real critical clock, so that writes to the usbphy grf always succeed. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917081903.25139-5-heiko@sntech.de commit 8a88550fe7bb9c3cf051ceb3b130b1014fd5dcb4 Author: Heiko Stuebner Date: Tue Sep 17 10:19:02 2019 +0200 clk: rockchip: add video-related niu clocks as critical on px30 Video-In and -Out interconnect clocks need to stay on all the time for the peripheral to work and we do not model the actual interconnect at this point. So mark them as critical for now. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917081903.25139-4-heiko@sntech.de commit 7990660f36bea5fc2d610e0b0b73dd57ce1682b0 Author: Heiko Stuebner Date: Tue Sep 17 10:19:01 2019 +0200 clk: rockchip: move px30 critical clocks to correct clock controller The clocks in the px30 critical clock section are from the regular cru not the pmucru, so move them to the correct place. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917081903.25139-3-heiko@sntech.de commit e40781098f56dab52e92b7651d87b38805536d28 Author: Finley Xiao Date: Tue Sep 17 10:19:00 2019 +0200 clk: rockchip: Add div50 clocks for px30 sdmmc, emmc, sdio and nandc Some IPs, such as NAND, EMMC, SDIO and SDMMC need clock of 50% duty cycle, divfree50 can generate clock of 50% duty cycle even in odd value divisor. Signed-off-by: Finley Xiao Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917081903.25139-2-heiko@sntech.de commit 762539d6999caa1d9a916a4ce72004977b2433cf Author: Finley Xiao Date: Tue Sep 17 10:18:59 2019 +0200 clk: rockchip: Add div50 clock-ids for sdmmc on px30 and nandc EMMC and SDIO already have these clock-ids (still unused) only sdmmc is missing them, so fix that. Signed-off-by: Finley Xiao Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917081903.25139-1-heiko@sntech.de commit 26b924b93c7bd68add372e24d25b86848c507921 Author: Mikulas Patocka Date: Wed Oct 23 09:39:15 2019 -0400 dm cache: replace spin_lock_irqsave with spin_lock_irq If we are in a place where it is known that interrupts are enabled, functions spin_lock_irq/spin_unlock_irq should be used instead of spin_lock_irqsave/spin_unlock_irqrestore. spin_lock_irq and spin_unlock_irq are faster because they don't need to push and pop the flags register. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 235bc8616060514ce57053e51d0a81f7fab96f01 Author: Mikulas Patocka Date: Tue Oct 15 08:16:51 2019 -0400 dm bio prison: replace spin_lock_irqsave with spin_lock_irq Replace spin_lock_irqsave/irqrestore with spin_lock_irq/spin_unlock_irq. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit cea35f5ad5ffac06ea29e0d7a7f748683e1f1b7d Author: Daniel Vetter Date: Tue Nov 5 20:38:29 2019 +0100 drm/i915: Don't select BROKEN It's broken. Reported-by: Stephen Rothwell References: https://lists.freedesktop.org/archives/dri-devel/2019-November/242625.html Signed-off-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20191105193829.11599-1-daniel.vetter@ffwll.ch commit 68acde7629d75d460760a3124c52f358eecc6d26 Author: Chenwandun Date: Thu Oct 31 17:43:49 2019 +0800 drm/dp_mst: fix gcc compile error drivers/gpu/drm/drm_dp_mst_topology.c: In function __topology_ref_save: drivers/gpu/drm/drm_dp_mst_topology.c:1424:6: error: implicit declaration of function stack_trace_save; did you mean stack_depot_save? [-Werror=implicit-function-declaration] n = stack_trace_save(stack_entries, ARRAY_SIZE(stack_entries), 1); ^~~~~~~~~~~~~~~~ stack_depot_save drivers/gpu/drm/drm_dp_mst_topology.c: In function __dump_topology_ref_history: drivers/gpu/drm/drm_dp_mst_topology.c:1513:3: error: implicit declaration of function stack_trace_snprint; did you mean acpi_trace_point? [-Werror=implicit-function-declaration] stack_trace_snprint(buf, PAGE_SIZE, entries, nr_entries, 4); ^~~~~~~~~~~~~~~~~~~ acpi_trace_point stack_trace_save and stack_trace_snprint are declared in , so there is need to include it, and is already included by practices, so just replace by . Signed-off-by: Chenwandun Reviewed-by: Lyude Paul Acked-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1572515029-42087-1-git-send-email-chenwandun@huawei.com commit 4403e1237be3af0977aa23ef399e3496316317a0 Author: Andy Yan Date: Wed Oct 30 15:28:11 2019 +0800 arm64: dts: rockchip: Add devicetree for board roc-rk3308-cc ROC-RK3308-CC is a rk3308 based board designed by Firelfy, with eMMC and 256MB DDR3 and RTL8188 Wifi on board. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20191030072811.29882-1-andy.yan@rock-chips.com Signed-off-by: Heiko Stuebner commit ab14c422a1d1877676a001d27f8c64a916ec077e Author: Andy Yan Date: Wed Oct 30 15:26:48 2019 +0800 dt-bindings: Add doc for Firefly ROC-RK3308-CC board Add compatible for Firefly ROC-RK3308-CC board. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20191030072648.29738-1-andy.yan@rock-chips.com Signed-off-by: Heiko Stuebner commit 21e3311a6a15cce30d6903d3bd4870c16f4672a2 Author: Peter Geis Date: Mon Oct 28 18:22:51 2019 +0000 dt-bindings: clean up rockchip grf binding document Fixup some typos and inconsistencies in the grf binding. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20191028182254.30739-3-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner commit f00736e38e98a6e7afd4637f33cc77280e2fb6df Author: Markus Reichl Date: Thu Oct 31 14:30:06 2019 +0100 arm64: dts: rockchip: Rework voltage supplies for regulators on rk3399-roc-pc Correct the voltage supplies according to the board schematics ROC-3399-PC-V10-A-20180804. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/22b56700-3c9e-0f60-cd74-7ff24d4f1a23@fivetechno.de Signed-off-by: Heiko Stuebner commit 88e0b7822d2d4e8b5acb1e8372087045ef190304 Author: Markus Reichl Date: Thu Oct 31 09:51:56 2019 +0100 arm64: dts: rockchip: Add vcc_sys enable pin on rk3399-roc-pc rk3399-roc-pc has vcc_sys 5V supply for USB and other peripherals. Add the GPIO pin to enable the regulator. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/c72db0ad-c261-af4f-efe6-22bbcf4a0b7b@fivetechno.de Signed-off-by: Heiko Stuebner commit 389989270e5fef7782e168e102f81e3ceb1ac7db Author: Markus Reichl Date: Thu Oct 31 12:04:29 2019 +0100 arm64: dts: rockchip: Add nodes for buttons on rk3399-roc-pc rk3399-roc-pc has a power and a recovery button, enable them. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/1ce152cc-bd6b-63af-7892-221e084d087f@fivetechno.de Signed-off-by: Heiko Stuebner commit 0815dc22c2387ae681203a98dceef339408b8412 Author: Heiko Stuebner Date: Tue Sep 17 10:26:59 2019 +0200 arm64: dts: rockchip: enable usb2phy on px30-evb Enable the phy node ion the px30 evb board. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-13-heiko@sntech.de commit f952b45bf37076675f4225d472451373ad5158b7 Author: Heiko Stuebner Date: Tue Sep 17 10:26:58 2019 +0200 arm64: dts: rockchip: add usb2phy for px30 Add the usb2phy node on the px30 and hook it up to the usb controllers it supplies. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-12-heiko@sntech.de commit 7272d6e03d11f3510c28cef081ad01c08d1f2001 Author: Heiko Stuebner Date: Thu Oct 24 00:44:09 2019 +0200 arm64: dts: rockchip: remove px30 default optee node Having a default optee node in a soc devicetree is not really good. For one there is no guarantee that any tee got loaded and there's even the possibility that a completely different TEE got loaded. OP-Tee however will insert relevant nodes to the devicetree (firmware +reserved memory sections) during its own startup, so there really is no need to provide a default node. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191023224409.3550-1-heiko@sntech.de commit 2e7f8764dcb19a514d72eb5420194eae5cd6b480 Author: Heiko Stuebner Date: Thu Oct 24 00:39:54 2019 +0200 arm64: dts: rockchip: enable gpu on rk3399-puma Set the supplying regulator and enable the gpu node on the rk3399-puma som. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191023223954.3139-1-heiko@sntech.de commit fbb78418c870c6d43d1bebfc59aa8062b7175f4d Author: Heiko Stuebner Date: Thu Oct 24 00:41:13 2019 +0200 arm64: dts: rockchip: add px30 otp controller The px30 soc contains a controller for one-time-programmable memory, so add the necessary node for it and the fields defined in it by default. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191023224113.3268-1-heiko@sntech.de commit 8e0c9dacc39eccd27e70cf3243896b43f5398c17 Author: Mikulas Patocka Date: Tue Oct 15 08:16:29 2019 -0400 dm thin: replace spin_lock_irqsave with spin_lock_irq If we are in a place where it is known that interrupts are enabled, functions spin_lock_irq/spin_unlock_irq should be used instead of spin_lock_irqsave/spin_unlock_irqrestore. spin_lock_irq and spin_unlock_irq are faster because they don't need to push and pop the flags register. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 52c67d416b26be1f91fbcbd57cfcf6ffca76ff29 Author: Nikos Tsironis Date: Mon Oct 7 20:54:41 2019 +0300 dm clone: add bucket_lock_irq/bucket_unlock_irq helpers Introduce bucket_lock_irq() and bucket_unlock_irq() helpers and use them in places where it is known that interrupts are enabled. Signed-off-by: Nikos Tsironis Signed-off-by: Mike Snitzer commit 6ca43ed8376a51afec790dd484a51804ade4352a Author: Mikulas Patocka Date: Fri Oct 4 10:17:37 2019 -0400 dm clone: replace spin_lock_irqsave with spin_lock_irq If we are in a place where it is known that interrupts are enabled, functions spin_lock_irq/spin_unlock_irq should be used instead of spin_lock_irqsave/spin_unlock_irqrestore. spin_lock_irq and spin_unlock_irq are faster because they don't need to push and pop the flags register. Signed-off-by: Mikulas Patocka Signed-off-by: Nikos Tsironis Signed-off-by: Mike Snitzer commit c1005322ff02110a4df7f0033368ea015062b583 Author: Maged Mokhtar Date: Wed Oct 23 22:41:17 2019 +0200 dm writecache: handle REQ_FUA Call writecache_flush() on REQ_FUA in writecache_map(). Cc: stable@vger.kernel.org # 4.18+ Signed-off-by: Maged Mokhtar Acked-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 8dd85873a0bd8f162e95bc9402eea0050dbdac01 Author: Mikulas Patocka Date: Wed Oct 2 07:07:57 2019 -0400 dm writecache: fix uninitialized variable warning This fixes coverity warning CID 1454301. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 8adeac3be03d400f9c2391d52f85cd27bd188800 Author: Gustavo A. R. Silva Date: Wed Oct 2 14:03:41 2019 -0500 dm stripe: use struct_size() in kmalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct stripe_c { ... struct stripe stripe[0]; }; In this case alloc_context() and dm_array_too_big() are removed and replaced by the direct use of the struct_size() helper in kmalloc(). Notice that open-coded form is prone to type mistakes. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mike Snitzer commit 53be73a5d75f477e52c9275ed7aa9307a8b73e5c Author: Heinz Mauelshagen Date: Tue Oct 1 17:47:55 2019 +0200 dm raid: streamline rs_get_progress() and its raid_status() caller side Pass already deciphered state into rs_get_progress, simplify recovery offset definition and combine two st_resync, st_reshape conditionals into one as is already the case with st_check and st_repair. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit f9f3ee9130eb588c75e4a145837d4e6214947c40 Author: Heinz Mauelshagen Date: Tue Oct 1 17:47:54 2019 +0200 dm raid: simplify rs_setup_recovery call chain rs_setup_recovery() sets the starting recovery offset. Drop superfluous rs_setup_recovery() and replace with __rs_setup_recovery(). Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 99273d9e6e19ce7bc393d294d60b8e0c0b971121 Author: Heinz Mauelshagen Date: Tue Oct 1 17:47:53 2019 +0200 dm raid: to ensure resynchronization, perform raid set grow in preresume This fixes a flaw causing raid set extensions not to be synchronized in case the MD bitmap resize required additional pages to be allocated. Also share resize code in the raid constructor between new size changes and those occuring during recovery. Bump the target version to define the change and document it in Documentation/admin-guide/device-mapper/dm-raid.rst. Reported-by: Steve D Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 22c992e1a868478b9fe83701cdf6329103c2ac06 Author: Heinz Mauelshagen Date: Tue Oct 1 17:47:52 2019 +0200 dm raid: change rs_set_dev_and_array_sectors API and callers Add a size argument to rs_set_dev_and_array_sectors as prerequisite to fixing grown device resynchronization not occuring when new MD bitmap pages have to be allocated as a result of the extension in a follwup patch. Also avoid code duplication by using rs_set_rdev_sectors in the aforementioned function. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 5eee2b3f60065a2530d13f28e771be48b989eb4c Author: Ranjani Sridharan Date: Mon Nov 4 14:48:12 2019 -0800 ASoC: SOF: topology: set trigger order for FE DAI link Set trigger order for FE DAI links to SND_SOC_DPCM_TRIGGER_POST to trigger the BE DAI's before the FE DAI's. This prevents the xruns seen on playback pipelines using the link DMA. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191104224812.3393-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit acbf27746ecfa96b290b54cc7f05273482ea128a Author: Ranjani Sridharan Date: Mon Nov 4 14:48:11 2019 -0800 ASoC: pcm: update FE/BE trigger order based on the command Currently, the trigger orders SND_SOC_DPCM_TRIGGER_PRE/POST determine the order in which FE DAI and BE DAI are triggered. In the case of SND_SOC_DPCM_TRIGGER_PRE, the FE DAI is triggered before the BE DAI and in the case of SND_SOC_DPCM_TRIGGER_POST, the BE DAI is triggered before the FE DAI. And this order remains the same irrespective of the trigger command. In the case of the SOF driver, during playback, the FW expects the BE DAI to be triggered before the FE DAI during the START trigger. The BE DAI trigger handles the starting of Link DMA and so it must be started before the FE DAI is started to prevent xruns during pause/release. This can be addressed by setting the trigger order for the FE dai link to SND_SOC_DPCM_TRIGGER_POST. But during the STOP trigger, the FW expects the FE DAI to be triggered before the BE DAI. Retaining the same order during the START and STOP commands, results in FW error as the DAI component in the FW is still active. The issue can be fixed by mirroring the trigger order of FE and BE DAI's during the START and STOP trigger. So, with the trigger order set to SND_SOC_DPCM_TRIGGER_PRE, the FE DAI will be trigger first during SNDRV_PCM_TRIGGER_START/STOP/RESUME and the BE DAI will be triggered first during the STOP/SUSPEND/PAUSE commands. Conversely, with the trigger order set to SND_SOC_DPCM_TRIGGER_POST, the BE DAI will be triggered first during the SNDRV_PCM_TRIGGER_START/STOP/RESUME commands and the FE DAI will be triggered first during the SNDRV_PCM_TRIGGER_STOP/SUSPEND/PAUSE commands. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191104224812.3393-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 755864feb729a791e1fd0f3338ddc5aae32c8ac1 Author: Finley Xiao Date: Tue Oct 29 11:42:40 2019 +0000 nvmem: add Rockchip OTP driver Newer Rockchip socs like the px30 use a different one-time-programmable memory controller for things like cpu-id and leakage information, so add the necessary driver for it. Signed-off-by: Finley Xiao [ported from vendor 4.4, converted to clock-bulk API and cleanups] Signed-off-by: Heiko Stuebner Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit de02fc40fc63aa6950435a18e99843603b1bda01 Author: Heiko Stuebner Date: Tue Oct 29 11:42:39 2019 +0000 dt-bindings: nvmem: add binding for Rockchip OTP controller Newer Rockchip SoCs use a different IP for accessing special one- time-programmable memory, so add a binding for these controllers. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit b210fac7f636a1859cb3773a245452213fa32c59 Author: Srinivas Kandagatla Date: Tue Oct 29 11:42:38 2019 +0000 nvmem: imx: scu: fix dependency in Kconfig Fix below error by adding HAVE_ARM_SMCCC dependency in Kconfig ERROR: "__arm_smccc_smc" [drivers/nvmem/nvmem-imx-ocotp-scu.ko] undefined! Reported-by: kbuild test robot Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 096030e7f449caac81ee140d10d9b4b360b723fd Author: Freeman Liu Date: Tue Oct 29 11:42:37 2019 +0000 nvmem: sprd: Add Spreadtrum SoCs eFuse support The Spreadtrum eFuse controller is widely used to dump chip ID, configuration setting, function select and so on, as well as supporting one-time programming. Signed-off-by: Freeman Liu Signed-off-by: Baolin Wang Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 95d25206eb1dd03677b87f54792816ef0ef6ce08 Author: Freeman Liu Date: Tue Oct 29 11:42:36 2019 +0000 dt-bindings: nvmem: Add Spreadtrum eFuse controller documentation This patch adds the binding documentation for Spreadtrum eFuse controller. Signed-off-by: Freeman Liu Signed-off-by: Baolin Wang Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c33c585f1b3a99d53920bdac614aca461d8db06f Author: Lucas Stach Date: Tue Oct 29 11:42:35 2019 +0000 nvmem: imx-ocotp: reset error status on probe If software running before the OCOTP driver is loaded left the controller with the error status pending, the driver will never be able to complete the read timing setup. Reset the error status on probe to make sure the controller is in usable state. Signed-off-by: Lucas Stach Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 885ce72a09d072a3d75231c68e27f21c956c9f46 Author: Peng Fan Date: Tue Oct 29 11:42:34 2019 +0000 nvmem: imx: scu: support write The fuse programming from non-secure world is blocked, so we could only use Arm Trusted Firmware SIP call to let ATF program fuse. Because there is ECC region that could only be programmed once, so add a heler in_ecc to check the ecc region. Signed-off-by: Peng Fan Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit f8017bfc14146d3f392aad08d060dfde5fd563b0 Author: Peng Fan Date: Tue Oct 29 11:42:33 2019 +0000 nvmem: imx: scu: support hole region check Introduce HOLE/ECC_REGION flag and in_hole helper to ease the check of hole region. The ECC_REGION is also introduced here which is preparing for programming support. ECC_REGION could only be programmed once, so need take care. Signed-off-by: Peng Fan Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1e6d8e5f44414de1bb6d11b7ff69e8385b5007d0 Author: Baolin Wang Date: Tue Oct 29 11:42:32 2019 +0000 nvmem: sc27xx: Change to use devm_hwspin_lock_request_specific() to request one hwlock Change to use devm_hwspin_lock_request_specific() to help to simplify the cleanup code for drivers requesting one hwlock. Thus we can remove the redundant sc27xx_efuse_remove() and platform_set_drvdata(). Signed-off-by: Baolin Wang Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9b8303fc6efa724bd6a90656434fbde2cc6ceb2c Author: Sebastian Reichel Date: Tue Oct 29 11:42:31 2019 +0000 nvmem: core: fix nvmem_cell_write inline function nvmem_cell_write's buf argument uses different types based on the configuration of CONFIG_NVMEM. The function prototype for enabled NVMEM uses 'void *' type, but the static dummy function for disabled NVMEM uses 'const char *' instead. Fix the different behaviour by always expecting a 'void *' typed buf argument. Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface") Reported-by: kbuild test robot Cc: Han Nandor Cc: Srinivas Kandagatla Cc: linux-kernel@vger.kernel.org Signed-off-by: Sebastian Reichel Reviewed-By: Han Nandor Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191029114240.14905-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit cc4c831811c2901b4b896c76ecb97212d73ad5aa Author: Bartosz Golaszewski Date: Tue Oct 22 10:43:18 2019 +0200 gpio: tegra186: 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: Bartosz Golaszewski Reviewed-by: Arnd Bergmann Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191022084318.22256-9-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit f51b18d92b6668dde131247928233e8a7de6f7b2 Author: Bartosz Golaszewski Date: Tue Oct 22 10:43:17 2019 +0200 gpio: mvebu: use devm_platform_ioremap_resource_byname() Use devm_platform_ioremap_resource_byname() instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191022084318.22256-8-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit c9c8641d3ebd79274af75f7df3e6a9c6cc8a66e9 Author: Bartosz Golaszewski Date: Tue Oct 22 10:43:16 2019 +0200 drivers: provide devm_platform_ioremap_resource_byname() Provide a variant of devm_platform_ioremap_resource() that allows to lookup resources from platform devices by name rather than by index. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191022084318.22256-7-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 444b0111f3bc8f3b2bc83dc15f85123034a79bc2 Author: Bartosz Golaszewski Date: Tue Oct 22 10:43:15 2019 +0200 misc: sram: use devm_platform_ioremap_resource_wc() Use the new devm_platform_ioremap_resource_wc() helper instead of devm_ioremap_wc() combinded with a call to platform_get_resource(). Also use devm_platform_ioremap_resource() where applicable. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191022084318.22256-6-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit bb6243b4f73d29f8c8faf8f805a2042ac3973b71 Author: Bartosz Golaszewski Date: Tue Oct 22 10:43:14 2019 +0200 drivers: platform: provide devm_platform_ioremap_resource_wc() Provide a write-combined variant of devm_platform_ioremap_resource(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191022084318.22256-5-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit b873af620e58863b70ae9cf97f6fab4cf4c544af Author: Bartosz Golaszewski Date: Tue Oct 22 10:43:13 2019 +0200 lib: devres: provide devm_ioremap_resource_wc() Provide a variant of devm_ioremap_resource() for write-combined ioremap. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191022084318.22256-4-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 6e924822752cb1664fa8f76cb9c0927490bca139 Author: Bartosz Golaszewski Date: Tue Oct 22 10:43:12 2019 +0200 lib: devres: prepare devm_ioremap_resource() for more variants We want to add the write-combined variant of devm_ioremap_resource(). Let's first implement __devm_ioremap_resource() which takes an additional argument type. The types are the same as for __devm_ioremap(). The existing devm_ioremap_resource() now simply calls __devm_ioremap_resource() with regular DEVM_IOREMAP type. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191022084318.22256-3-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 4154abca299e0f27dfe362733bb5296c7bb4d63f Author: Bartosz Golaszewski Date: Tue Oct 22 10:43:11 2019 +0200 Documentation: devres: add missing entry for devm_platform_ioremap_resource() devm_platform_ioremap_resource() should be documented in devres.rst. Add the missing entry. Signed-off-by: Bartosz Golaszewski Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191022084318.22256-2-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 482c86cc37b7fa884843ec37edd1847c5463e3a9 Author: YueHaibing Date: Wed Oct 16 17:25:46 2019 +0800 char: xillybus: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Acked-by: Eli Billauer Link: https://lore.kernel.org/r/20191016092546.26332-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8670b2b8b029a6650d133486be9d2ace146fd29a Author: Marcel Holtmann Date: Thu Oct 24 19:40:42 2019 +0200 rfkill: allocate static minor udev has a feature of creating /dev/ device-nodes if it finds a devnode: modalias. This allows for auto-loading of modules that provide the node. This requires to use a statically allocated minor number for misc character devices. However, rfkill uses dynamic minor numbers and prevents auto-loading of the module. So allocate the next static misc minor number and use it for rfkill. Signed-off-by: Marcel Holtmann Link: https://lore.kernel.org/r/20191024174042.19851-1-marcel@holtmann.org Signed-off-by: Greg Kroah-Hartman commit e1955fcdc71eb1c3572851dc0c94ff51f9fb495b Author: Nachammai Karuppiah Date: Tue Nov 5 09:06:31 2019 -0800 staging: rtl8723bs: hal: Remove unnecessary typecast in kfree. Remove typecast in the call to kfree as it is not needed. Issue fixed using Coccinelle. Signed-off-by: Nachammai Karuppiah Link: https://lore.kernel.org/r/1572973591-12892-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman commit a4c3733d32a72f11dee86d0731d7565aa6ebe22d Author: Christoph Hellwig Date: Mon Oct 28 13:10:32 2019 +0100 riscv: abstract out CSR names for supervisor vs machine mode Many of the privileged CSRs exist in a supervisor and machine version that are used very similarly. Provide versions of the CSR names and fields that map to either the S-mode or M-mode variant depending on a new CONFIG_RISCV_M_MODE kconfig symbol. Contains contributions from Damien Le Moal and Paul Walmsley . Signed-off-by: Christoph Hellwig Acked-by: Thomas Gleixner # for drivers/clocksource, drivers/irqchip [paul.walmsley@sifive.com: updated to apply] Signed-off-by: Paul Walmsley commit 82b29b9f72afdccb40ea5f3c13c6a3cb65a597bc Author: Alexander Usyskin Date: Tue Nov 5 17:05:14 2019 +0200 mei: me: add comet point V device id Comet Point (Comet Lake) V device id. Cc: Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191105150514.14010-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 7a2b9e6ec84588b0be65cc0ae45a65bac431496b Author: Alexander Usyskin Date: Tue Nov 5 17:05:13 2019 +0200 mei: bus: prefix device names on bus with the bus name Add parent device name to the name of devices on bus to avoid device names collisions for same client UUID available from different MEI heads. Namely this prevents sysfs collision under /sys/bus/mei/device/ In the device part leave just UUID other parameters that are required for device matching are not required here and are just bloating the name. Cc: Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191105150514.14010-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 487ee861de176090b055eba5b252b56a3b9973d6 Author: Peng Fan Date: Tue Nov 5 05:51:10 2019 +0000 tty: serial: fsl_lpuart: use the sg count from dma_map_sg The dmaengine_prep_slave_sg needs to use sg count returned by dma_map_sg, not use sport->dma_tx_nents, because the return value of dma_map_sg is not always same with "nents". When enabling iommu for lpuart + edma, iommu framework may concatenate two sgs into one. Fixes: 6250cc30c4c4e ("tty: serial: fsl_lpuart: Use scatter/gather DMA for Tx") Cc: Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1572932977-17866-1-git-send-email-peng.fan@nxp.com Signed-off-by: Greg Kroah-Hartman commit 9b88f9fb0d2fc8f7e71e75a42c5a064bc6cfffd2 Author: Jan Kara Date: Tue Nov 5 17:44:11 2019 +0100 ext4: Do not iput inode under running transaction When ext4_mkdir(), ext4_symlink(), ext4_create(), or ext4_mknod() fail to add entry into directory, it ends up dropping freshly created inode under the running transaction and thus inode truncation happens under that transaction. That breaks assumptions that evict() does not get called from a transaction context and at least in ext4_symlink() case it can result in inode eviction deadlocking in inode_wait_for_writeback() when flush worker finds symlink inode, starts to write it back and blocks on starting a transaction. So change the code in ext4_mkdir() and ext4_add_nondir() to drop inode reference only after the transaction is stopped. We also have to add inode to the orphan list in that case as otherwise the inode would get leaked in case we crash before inode deletion is committed. CC: stable@vger.kernel.org Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-5-jack@suse.cz Signed-off-by: Theodore Ts'o commit a9e26328adfa82b1f3c941bc6e3daea47631abce Author: Jan Kara Date: Tue Nov 5 17:44:10 2019 +0100 ext4: Move marking of handle as sync to ext4_add_nondir() Every caller of ext4_add_nondir() marks handle as sync if directory has DIRSYNC set. Move this marking to ext4_add_nondir() so reduce some duplication. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-4-jack@suse.cz Signed-off-by: Theodore Ts'o commit b90bfdf581194a0fa5f6c26fef1e522f15f6212e Author: Jan Kara Date: Tue Nov 5 17:44:09 2019 +0100 jbd2: Completely fill journal descriptor blocks With 32-bit block numbers, we don't allocate the array for journal buffer heads large enough for corresponding descriptor tags to fill the descriptor block. Thus we end up writing out half-full descriptor blocks to the journal unnecessarily growing the transaction. Fix the logic to allocate the array large enough. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-3-jack@suse.cz Signed-off-by: Theodore Ts'o commit 0db45889453644bb5d3e3c6044f4d81b910d41ef Author: Jan Kara Date: Tue Nov 5 17:44:08 2019 +0100 jbd2: Fixup stale comment in commit code jbd2_journal_next_log_block() does not look at transaction->t_outstanding_credits. Remove the misleading comment. Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit add3efdd78b8a0478ce423bb9d4df6bd95e8b335 Author: Jan Kara Date: Tue Nov 5 17:44:07 2019 +0100 jbd2: Fix possible overflow in jbd2_log_space_left() When number of free space in the journal is very low, the arithmetic in jbd2_log_space_left() could underflow resulting in very high number of free blocks and thus triggering assertion failure in transaction commit code complaining there's not enough space in the journal: J_ASSERT(journal->j_free > 1); Properly check for the low number of free blocks. CC: stable@vger.kernel.org Reviewed-by: Theodore Ts'o Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191105164437.32602-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 0c3ac28931d578324e93afab6ee7b740dfdaff6f Author: Paul Walmsley Date: Mon Oct 28 13:53:50 2019 -0700 riscv: separate MMIO functions into their own header file Separate the low-level MMIO static inline functions and macros, such as {read,write}{b,w,l,q}(), into their own header file under arch/riscv/include: asm/mmio.h. This is done to break a header dependency chain that arises when both asm/pgtable.h and asm/io.h are included by asm/timex.h. Since the problem is related to the legacy I/O port support in asm/io.h, this allows files under arch/riscv that encounter those issues to simply include asm/mmio.h instead, and bypass the legacy I/O port functions. Existing users of asm/io.h don't need to change anything, since asm/mmio.h is included by asm/io.h. While here, clean up some checkpatch.pl-related issues with the original code. Signed-off-by: Paul Walmsley commit 86fe639a1c1678d81fc4c82a39a5299df6deb944 Author: Christoph Hellwig Date: Wed Oct 30 16:11:47 2019 -0700 riscv: enter WFI in default_power_off() if SBI does not shutdown Provide a new default fallback power off that just sits in a wfi loop to save some power. Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel Reviewed-by: Atish Patra [paul.walmsley@sifive.com: split the WFI fix apart from the nommu-related default_power_off() changes] Signed-off-by: Paul Walmsley commit 156aafd2bec0b707dc50cffb846e43cbc8258e80 Author: Ajay Singh Date: Tue Nov 5 09:51:36 2019 +0000 staging: wilc1000: use defines for msg types received from firmware Added defines for different types of messages received from firmware. Removed the unnecessary comments because after the addition of macros the message types are self-explanatory. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191105095058.24223-7-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 027caaab0de784c57535d794459cf34cf6f12592 Author: Ajay Singh Date: Tue Nov 5 09:51:33 2019 +0000 staging: wilc1000: added proper spacing for comments Added proper space for the comments and added newline before the comments inside a struct. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191105095058.24223-6-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit f1f24260fc25adb8b563d14dc7d5cd628b448c2a Author: Ajay Singh Date: Tue Nov 5 09:51:30 2019 +0000 staging: wilc1000: avoid use of C++ style comments Replace C++ style comment with C style. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191105095058.24223-5-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 664578d581a9699623255d6a7effbf563ff7cd79 Author: Ajay Singh Date: Tue Nov 5 09:51:28 2019 +0000 staging: wilc1000: added 'WILC_' prefix in header guard macro Use 'WILC_' prefix in header guard to follow the proper naming convention for macro name. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191105095058.24223-4-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 6cecbb2c67598db47eac301a5fe09e1bb380a08d Author: Ajay Singh Date: Tue Nov 5 09:51:25 2019 +0000 staging: wilc1000: remove 'wilc_' prefix from filenames Remove 'wilc_' prefix from filenames, the driver is already present inside the 'wilc1000' directory so no need to add 'wilc_' in filenames. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191105095058.24223-3-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 5e3bafbd14b553e30234d234cb6d1fa004e292ab Author: Ajay Singh Date: Tue Nov 5 09:51:22 2019 +0000 staging: wilc1000: avoid 'bool' datatype in struct sent to firmware Use 'u8' instead of 'bool' datatype for struct element sent to firmware because storage of bool datatype is not guaranteed. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191105095058.24223-2-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 31f4b28f6c41f734957ea66ac84c6abb69e696f0 Author: Peter Ujfalusi Date: Fri Oct 25 10:30:56 2019 +0300 dmaengine: ti: edma: Add support for handling reserved channels Like paRAM slots, channels could be used by other cores and in this case we need to make sure that the driver do not alter these channels. Handle the generic dma-channel-mask property to mark channels in a bitmap which can not be used by Linux and convert the legacy rsv_chans if it is provided by platform_data. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191025073056.25450-4-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 115b60a93ee4e29e103c4bf067aeab45c6d51725 Author: Peter Ujfalusi Date: Fri Oct 25 10:30:55 2019 +0300 dt-bindings: dma: ti-edma: Document dma-channel-mask for EDMA Similarly to paRAM slots, channels can be used by other cores. The common dma-channel-mask property can be used for specifying the available channels. Signed-off-by: Peter Ujfalusi Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191025073056.25450-3-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 4868d87c18aa47ed155f48167387a3b716b461d1 Author: Peter Ujfalusi Date: Fri Oct 25 10:30:54 2019 +0300 dt-bindings: dmaengine: dma-common: Change dma-channel-mask to uint32-array Make the dma-channel-mask to be usable for controllers with more than 32 channels. Signed-off-by: Peter Ujfalusi Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191025073056.25450-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 8888ed03237d07d8a325cf0b8e9f5473796c02f2 Author: Javier F. Arias Date: Sun Nov 3 17:44:30 2019 -0500 staging: rtl8723bs: Fix lines over 80 characters This patch fixes the "lines over 80 characters" warnings in lines affected by a previous patch. Issue found by Checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/cb27cffda680eda05c44ee90db98c660fbf98b39.1572820893.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 55238d7a468d5328a0f7b7155ea8855f158cbcc5 Author: Nachammai Karuppiah Date: Mon Nov 4 20:51:23 2019 -0800 staging: rtl8723bs: os_dep: Remove unnecessary variable used in return statement Remove the variable that is used only in return statement and return the expression itself. Issue found using coccinelle. Signed-off-by: Nachammai Karuppiah Link: https://lore.kernel.org/r/1572929483-78993-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman commit b7aa39a2ed0112d07fc277ebd24a08a7b2368ab9 Author: Pan Bian Date: Tue Nov 5 22:49:11 2019 +0800 staging: rtl8192e: fix potential use after free The variable skb is released via kfree_skb() when the return value of _rtl92e_tx is not zero. However, after that, skb is accessed again to read its length, which may result in a use after free bug. This patch fixes the bug by moving the release operation to where skb is never used later. Signed-off-by: Pan Bian Reviewed-by: Dan Carpenter Cc: stable Link: https://lore.kernel.org/r/1572965351-6745-1-git-send-email-bianpan2016@163.com Signed-off-by: Greg Kroah-Hartman commit 78ce93f3e80bf8dff320a6d084c9933e81aa4a3f Author: Nachammai Karuppiah Date: Tue Nov 5 01:21:31 2019 -0800 staging: wfx: Remove local variable used only in return statement. Remove unnecessary local variable that is used in return statement and return the expression directly. Issue found using coccinelle. Signed-off-by: Nachammai Karuppiah Link: https://lore.kernel.org/r/1572945691-109992-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman commit 168c7d76425d053ca6a311e450ac3627cffff5a7 Author: Jules Irenge Date: Tue Nov 5 01:03:52 2019 +0000 staging: wfx: replace 1 by true Replace 1 by true when it is stored in a boolean variable. Recommended by coccinelle tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191105010352.222479-3-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2c1facbc437ceb00b022e4484900c831e39a773a Author: Jules Irenge Date: Tue Nov 5 01:03:51 2019 +0000 staging: wfx: replace 0 by NULL Replace 0 by NULL as the return value of a pointer-returning function. Issue detected by sparse tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191105010352.222479-2-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3b525cb00c620269e07663788bfd727c07524bf9 Author: Nachammai Karuppiah Date: Mon Nov 4 23:54:18 2019 -0800 staging: qlge: Avoid NULL comparison Replace NULL comparison with boolean negation. Issue found using checkpatch.pl Signed-off-by: Nachammai Karuppiah Acked-by: Julia Lawall Link: https://lore.kernel.org/r/1572940458-109252-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman commit c389ec67b7f8e028438643c4af4bbff550192187 Author: Chanwoo Choi Date: Tue Nov 5 14:41:19 2019 +0900 MAINTAINERS: Update myself as maintainer for DEVFREQ subsystem support Update myself to the DEVFREQ entry as maintainer from reviewer and the git repository information to manage the devfreq patches. I've been reviewing and tesing the devfreq support for the couple of years as reviewer. >From now, I'll help and reiview the devfreq as maintainer. Suggested-by: MyungJoo Ham Signed-off-by: Chanwoo Choi Acked-by: MyungJoo Ham Signed-off-by: Rafael J. Wysocki commit 3eaf9cc62f447a742b26fa601993e94406aa1ea1 Author: Matthew Bobrowski Date: Tue Nov 5 23:02:23 2019 +1100 ext4: update ext4_sync_file() to not use __generic_file_fsync() When the filesystem is created without a journal, we eventually call into __generic_file_fsync() in order to write out all the modified in-core data to the permanent storage device. This function happens to try and obtain an inode_lock() while synchronizing the files buffer and it's associated metadata. Generally, this is fine, however it becomes a problem when there is higher level code that has already obtained an inode_lock() as this leads to a recursive lock situation. This case is especially true when porting across direct I/O to iomap infrastructure as we obtain an inode_lock() early on in the I/O within ext4_dio_write_iter() and hold it until the I/O has been completed. Consequently, to not run into this specific issue, we move away from calling into __generic_file_fsync() and perform the necessary synchronization tasks within ext4_sync_file(). Signed-off-by: Matthew Bobrowski Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/3495f35ef67f2021b567e28e6f59222e583689b8.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit 0b9f230b94dd7457802264dc4c16921b3527dcf1 Author: Matthew Bobrowski Date: Tue Nov 5 23:02:08 2019 +1100 ext4: move inode extension check out from ext4_iomap_alloc() Lift the inode extension/orphan list handling code out from ext4_iomap_alloc() and apply it within the ext4_dax_write_iter(). Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/fd5c84db25d5d0da87d97ed4c36fd844f57da759.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit 569342dc2485392e95b6a626281708c25014ba37 Author: Matthew Bobrowski Date: Tue Nov 5 23:01:51 2019 +1100 ext4: move inode extension/truncate code out from ->iomap_end() callback In preparation for implementing the iomap direct I/O modifications, the inode extension/truncate code needs to be moved out from the ext4_iomap_end() callback. For direct I/O, if the current code remained, it would behave incorrrectly. Updating the inode size prior to converting unwritten extents would potentially allow a racing direct I/O read to find unwritten extents before being converted correctly. The inode extension/truncate code now resides within a new helper ext4_handle_inode_extension(). This function has been designed so that it can accommodate for both DAX and direct I/O extension/truncate operations. Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/d41ffa26e20b15b12895812c3cad7c91a6a59bc6.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit b1b4705d54abedfd69dcdf42779c521aa1e0fbd3 Author: Matthew Bobrowski Date: Tue Nov 5 23:01:37 2019 +1100 ext4: introduce direct I/O read using iomap infrastructure This patch introduces a new direct I/O read path which makes use of the iomap infrastructure. The new function ext4_do_read_iter() is responsible for calling into the iomap infrastructure via iomap_dio_rw(). If the read operation performed on the inode is not supported, which is checked via ext4_dio_supported(), then we simply fallback and complete the I/O using buffered I/O. Existing direct I/O read code path has been removed, as it is now redundant. Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/f98a6f73fadddbfbad0fc5ed04f712ca0b799f37.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit 09edf4d381957b144440bac18a4769c53063b943 Author: Matthew Bobrowski Date: Tue Nov 5 23:03:31 2019 +1100 ext4: introduce new callback for IOMAP_REPORT As part of the ext4_iomap_begin() cleanups that precede this patch, we also split up the IOMAP_REPORT branch into a completely separate ->iomap_begin() callback named ext4_iomap_begin_report(). Again, the raionale for this change is to reduce the overall clutter within ext4_iomap_begin(). Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/5c97a569e26ddb6696e3d3ac9fbde41317e029a0.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit f063db5ee989aafe2dc9d571b5538f2a1f1cbad2 Author: Matthew Bobrowski Date: Tue Nov 5 23:00:14 2019 +1100 ext4: split IOMAP_WRITE branch in ext4_iomap_begin() into helper In preparation for porting across the ext4 direct I/O path over to the iomap infrastructure, split up the IOMAP_WRITE branch that's currently within ext4_iomap_begin() into a separate helper ext4_alloc_iomap(). This way, when we add in the necessary code for direct I/O, we don't end up with ext4_iomap_begin() becoming a monstrous twisty maze. Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/50eef383add1ea529651640574111076c55aca9f.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit c8fdfe294187455b70e42a15df35a3e1882f332d Author: Matthew Bobrowski Date: Tue Nov 5 22:59:56 2019 +1100 ext4: move set iomap routines into a separate helper ext4_set_iomap() Separate the iomap field population code that is currently within ext4_iomap_begin() into a separate helper ext4_set_iomap(). The intent of this function is self explanatory, however the rationale behind taking this step is to reeduce the overall clutter that we currently have within the ext4_iomap_begin() callback. Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/1ea34da65eecffcddffb2386668ae06134e8deaf.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit 2e9b51d78229d5145725a481bb5464ebc0a3f9b2 Author: Matthew Bobrowski Date: Tue Nov 5 22:59:37 2019 +1100 ext4: iomap that extends beyond EOF should be marked dirty This patch addresses what Dave Chinner had discovered and fixed within commit: 7684e2c4384d. This changes does not have any user visible impact for ext4 as none of the current users of ext4_iomap_begin() that extend files depend on IOMAP_F_DIRTY. When doing a direct IO that spans the current EOF, and there are written blocks beyond EOF that extend beyond the current write, the only metadata update that needs to be done is a file size extension. However, we don't mark such iomaps as IOMAP_F_DIRTY to indicate that there is IO completion metadata updates required, and hence we may fail to correctly sync file size extensions made in IO completion when O_DSYNC writes are being used and the hardware supports FUA. Hence when setting IOMAP_F_DIRTY, we need to also take into account whether the iomap spans the current EOF. If it does, then we need to mark it dirty so that IO completion will call generic_write_sync() to flush the inode size update to stable storage correctly. Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/8b43ee9ee94bee5328da56ba0909b7d2229ef150.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit 548feebec7e93e58b647dba70b3303dcb569c914 Author: Matthew Bobrowski Date: Tue Nov 5 22:59:22 2019 +1100 ext4: update direct I/O read lock pattern for IOCB_NOWAIT This patch updates the lock pattern in ext4_direct_IO_read() to not block on inode lock in cases of IOCB_NOWAIT direct I/O reads. The locking condition implemented here is similar to that of 942491c9e6d6 ("xfs: fix AIM7 regression"). Fixes: 16c54688592c ("ext4: Allow parallel DIO reads") Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/c5d5e759f91747359fbd2c6f9a36240cf75ad79f.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit 53e5cca56795a301bbe8465781dab084f7ae8d54 Author: Matthew Bobrowski Date: Tue Nov 5 22:58:55 2019 +1100 ext4: reorder map.m_flags checks within ext4_iomap_begin() For the direct I/O changes that follow in this patch series, we need to accommodate for the case where the block mapping flags passed through to ext4_map_blocks() result in m_flags having both EXT4_MAP_MAPPED and EXT4_MAP_UNWRITTEN bits set. In order for any allocated unwritten extents to be converted correctly in the ->end_io() handler, the iomap->type must be set to IOMAP_UNWRITTEN for cases where the EXT4_MAP_UNWRITTEN bit has been set within m_flags. Hence the reason why we need to reshuffle this conditional statement around. This change is a no-op for DAX as the block mapping flags passed through to ext4_map_blocks() i.e. EXT4_GET_BLOCKS_CREATE_ZERO never results in both EXT4_MAP_MAPPED and EXT4_MAP_UNWRITTEN being set at once. Signed-off-by: Matthew Bobrowski Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/1309ad80d31a637b2deed55a85283d582a54a26a.1572949325.git.mbobrowski@mbobrowski.org Signed-off-by: Theodore Ts'o commit f21bdbba0a5ac69e0a632ad974f5c0df9b7d411c Merge: 0d0a60c92fed a90100421499 Author: Theodore Ts'o Date: Tue Nov 5 11:31:32 2019 -0500 Merge branch 'iomap-for-next' into mb/dio commit 9842b56cd406828eb1030617e8ef252fec90be4d Author: Darrick J. Wong Date: Sat Nov 2 09:41:19 2019 -0700 xfs: make the assertion message functions take a mount parameter Make the assfail and asswarn functions take a struct xfs_mount so that we can start tying debugging and corruption messages to a particular mount. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 110f09cb705af8c53f2a457baf771d2935ed62d4 Author: Darrick J. Wong Date: Sat Nov 2 09:41:18 2019 -0700 xfs: add missing assert in xfs_fsmap_owner_from_rmap The fsmap handler shouldn't fail silently if the rmap code ever feeds it a special owner number that isn't known to the fsmap handler. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit ee4fb16cbec9aa1ce6e837d143f411ee42df1bb5 Author: Darrick J. Wong Date: Sat Nov 2 09:41:18 2019 -0700 xfs: decrease indenting problems in xfs_dabuf_map Refactor the code that complains when a dir/attr mapping doesn't exist but the caller requires a mapping. This small restructuring helps us to reduce the indenting level. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 50f8300904b1b217328219812ee67c231a5aff8d Author: Ian Kent Date: Mon Nov 4 13:58:48 2019 -0800 xfs: fold xfs_mount-alloc() into xfs_init_fs_context() After switching to use the mount-api the only remaining caller of xfs_mount_alloc() is xfs_init_fs_context(), so fold xfs_mount_alloc() into it. Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8757c38f2cf6e5ac474aabd7deea14729918ff7c Author: Ian Kent Date: Mon Nov 4 13:58:48 2019 -0800 xfs: move xfs_fc_parse_param() above xfs_fc_get_tree() Grouping the options parsing and mount handling functions above the struct fs_context_operations but below the struct super_operations should improve (some) the grouping of the super operations while also improving the grouping of the options parsing and mount handling code. Lastly move xfs_fc_parse_param() and related functions down to above xfs_fc_get_tree() and it's related functions. But leave the options enum, struct fs_parameter_spec and the struct fs_parameter_description declarations at the top since that's the logical place for them. This is a straight code move, there aren't any functional changes. Signed-off-by: Ian Kent Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 2f8d66b3cd796a96532d9d73957f5c1b88d48815 Author: Ian Kent Date: Mon Nov 4 13:58:47 2019 -0800 xfs: move xfs_fc_get_tree() above xfs_fc_reconfigure() Grouping the options parsing and mount handling functions above the struct fs_context_operations but below the struct super_operations should improve (some) the grouping of the super operations while also improving the grouping of the options parsing and mount handling code. Now move xfs_fc_get_tree() and friends, also take the oppertunity to change STATIC to static for the xfs_fs_put_super() function. This is a straight code move, there aren't any functional changes. Signed-off-by: Ian Kent Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 63cd1e9b026e760f0455d6fb959f5c963c90c10e Author: Ian Kent Date: Mon Nov 4 13:58:47 2019 -0800 xfs: move xfs_fc_reconfigure() above xfs_fc_free() Grouping the options parsing and mount handling functions above the struct fs_context_operations but below the struct super_operations should improve (some) the grouping of the super operations while also improving the grouping of the options parsing and mount handling code. Start by moving xfs_fc_reconfigure() and friends. This is a straight code move, there aren't any functional changes. Signed-off-by: Ian Kent Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 73e5fff98b6446de1490a8d7809121b0108d49f4 Author: Ian Kent Date: Mon Nov 4 13:58:46 2019 -0800 xfs: switch to use the new mount-api Define the struct fs_parameter_spec table that's used by the new mount-api for options parsing. Create the various fs context operations methods and define the fs_context_operations struct. Create the fs context initialization method and update the struct file_system_type to utilize it. The initialization function is responsible for working storage initialization, allocation and initialization of file system private information storage and for setting the operations in the fs context. Also set struct file_system_type .parameters to the newly defined struct fs_parameter_spec options parsing table for use by the fs context methods and remove unused code. [darrick: add a comment pointing out the one place where mp->m_super is null] Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7c89fcb2783d758d16f68e579811d5395d907960 Author: Ian Kent Date: Mon Nov 4 13:58:46 2019 -0800 xfs: dont set sb in xfs_mount_alloc() When changing to use the new mount api the super block won't be available when the xfs_mount struct is allocated so move setting the super block in xfs_mount to xfs_fs_fill_super(). Signed-off-by: Ian Kent Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9a861816a02653dcec7a97d4f639f04b0bcf09c3 Author: Ian Kent Date: Mon Nov 4 13:58:45 2019 -0800 xfs: move xfs_parseargs() validation to a helper Move the validation code of xfs_parseargs() into a helper for later use within the mount context methods. Signed-off-by: Ian Kent Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 48a06e1b5773229caf13e6cc35d73cec2d2f6519 Author: Ian Kent Date: Mon Nov 4 13:58:44 2019 -0800 xfs: refactor xfs_parseags() Refactor xfs_parseags(), move the entire token case block to a separate function in an attempt to highlight the code that actually changes in converting to use the new mount api. Also change the break in the switch to a return in the factored out xfs_fc_parse_param() function. Signed-off-by: Ian Kent Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 846410ccd104c7294d18e61c665bf7c0c7e6d7d1 Author: Ian Kent Date: Mon Nov 4 13:58:44 2019 -0800 xfs: avoid redundant checks when options is empty When options passed to xfs_parseargs() is NULL the checks performed after taking the branch are made with the initial values of dsunit, dswidth and iosizelog. But all the checks do nothing in this case so return immediately instead. Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c0a6791667f81d9b12443f7ed1c7b4602be9e3c9 Author: Ian Kent Date: Mon Nov 4 13:58:43 2019 -0800 xfs: refactor suffix_kstrtoint() The mount-api doesn't have a "human unit" parse type yet so the options that have values like "10k" etc. still need to be converted by the fs. But the value comes to the fs as a string (not a substring_t type) so there's a need to change the conversion function to take a character string instead. When xfs is switched to use the new mount-api match_kstrtoint() will no longer be used and will be removed. Signed-off-by: Ian Kent Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2c6eba31775ba1b4b067b95ccf51a6094715a446 Author: Ian Kent Date: Mon Nov 4 13:58:43 2019 -0800 xfs: add xfs_remount_ro() helper Factor the remount read only code into a helper to simplify the subsequent change from the super block method .remount_fs to the mount-api fs_context_operations method .reconfigure. Signed-off-by: Ian Kent Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 82332b6da226bef4c29431d98075af34feafaa8a Author: Ian Kent Date: Mon Nov 4 13:58:42 2019 -0800 xfs: add xfs_remount_rw() helper Factor the remount read write code into a helper to simplify the subsequent change from the super block method .remount_fs to the mount-api fs_context_operations method .reconfigure. Signed-off-by: Ian Kent Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a943f372c22bd4923c4897ff4e7d3f03db0d6716 Author: Ian Kent Date: Mon Nov 4 13:58:42 2019 -0800 xfs: merge freeing of mp names and mp In all cases when struct xfs_mount (mp) fields m_rtname and m_logname are freed mp is also freed, so merge these into a single function xfs_mount_free() Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7b77b46a61372ce38867578cab1a4b9850359c31 Author: Ian Kent Date: Mon Nov 4 13:58:41 2019 -0800 xfs: use kmem functions for struct xfs_mount The remount function uses the kmem functions for allocating and freeing struct xfs_mount, for consistency use the kmem functions everwhere for struct xfs_mount. Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3d9d60d9addf6c085dd37703f6307841111f8168 Author: Ian Kent Date: Mon Nov 4 13:58:41 2019 -0800 xfs: dont use XFS_IS_QUOTA_RUNNING() for option check When CONFIG_XFS_QUOTA is not defined any quota option is invalid. Using the macro XFS_IS_QUOTA_RUNNING() as a check if any quota option has been given is a little misleading so use a simple m_qflags != 0 check to make the intended use more explicit. Also change to use the IS_ENABLED() macro for the kernel config check. Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e1d3d218854659139731a61cf41aa391dcf949b0 Author: Ian Kent Date: Mon Nov 4 13:58:40 2019 -0800 xfs: use super s_id instead of struct xfs_mount m_fsname Eliminate struct xfs_mount field m_fsname by using the super block s_id field directly. Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f676c75086675108bf79ec8d5fadee557adcc99a Author: Ian Kent Date: Mon Nov 4 13:58:40 2019 -0800 xfs: remove unused struct xfs_mount field m_fsname_len The struct xfs_mount field m_fsname_len is not used anywhere, remove it. Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 6ba01df72b4b63a26b4977790f58d8f775d2992c Author: Mike Snitzer Date: Tue Nov 5 10:43:44 2019 -0500 dm table: do not allow request-based DM to stack on partitions Partitioned request-based devices cannot be used as underlying devices for request-based DM because no partition offsets are added to each incoming request. As such, until now, stacking on partitioned devices would _always_ result in data corruption (e.g. wiping the partition table, writing to other partitions, etc). Fix this by disallowing request-based stacking on partitions. While at it, since all .request_fn support has been removed from block core, remove legacy dm-table code that differentiated between blk-mq and .request_fn request-based. Signed-off-by: Mike Snitzer commit 6fbd92a8337786802326f5e7b7aa7d1a6b8f54e3 Merge: 4b024225c4a8 a322b3377f4b Author: Linus Walleij Date: Tue Nov 5 15:40:53 2019 +0100 Merge tag 'samsung-pinctrl-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel Samsung pinctrl drivers changes for v5.5 Fix several device node refcnt leaks (missing of_node_put()) in several drivers. commit 4b024225c4a8245e6ecc66ce1df1eaf2ebeb4acb Author: YueHaibing Date: Mon Nov 4 22:26:54 2019 +0800 pinctrl: use devm_platform_ioremap_resource() to simplify code devm_platform_ioremap_resource() internally have platform_get_resource() and devm_ioremap_resource() in it. So instead of calling them separately use devm_platform_ioremap_resource() directly. Signed-off-by: YueHaibing Acked-by: Thierry Reding Acked-by: Neil Armstrong Acked-by: Manivannan Sadhasivam Acked-by: Jesper Nilsson Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191104142654.39256-1-yuehaibing@huawei.com Signed-off-by: Linus Walleij commit d9dace9438945e7c13d91e62927c5c6c88a37ee5 Author: Chris Wilson Date: Fri Nov 1 17:44:05 2019 +0000 drm/i915/selftests: Add intel_gt_suspend_prepare Call suspend_prepare first so that we don't leave GuC so confused. Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191101174405.7389-1-chris@chris-wilson.co.uk (cherry picked from commit 833e979db36c0202f21e1e0bdd7339a27e50b8e3) Signed-off-by: Joonas Lahtinen commit 3fd850dda83d0e5a4e49e7d093b0b72f75a9391f Author: Chris Wilson Date: Sun Nov 3 09:50:38 2019 +0000 drm/i915/gt: Drop false assertion on user_forcewake The counter is removed from the pm wakeref count, but it remains intact so that we can restore it upon resume. Ergo inside suspend, it may have a value. Signed-off-by: Chris Wilson Acked-by: Andi Shyti Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191104090158.2959-1-chris@chris-wilson.co.uk (cherry picked from commit 83c55ee82f3ac5a1c36dab9f7150554c4da773a8) Signed-off-by: Joonas Lahtinen commit a70a9e998e8e64417c1213572c1dda617e355653 Author: Chris Wilson Date: Fri Nov 1 14:10:09 2019 +0000 drm/i915: Defer rc6 shutdown to suspend_late Currently we shutdown rc6 during i915_gem_resume() but this is called during the preparation phase (i915_drm_prepare) for all suspend paths, but we only want to shutdown rc6 for S3+. Move the actual shutdown to i915_gem_suspend_late(). We then need to differentiate between suspend targets, to distinguish S0 (s2idle) where the device is kept awake but needs to be in a low power mode (the same as runtime suspend) from the device suspend levels where we lose control of HW and so must disable any HW access to dangling memory. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111909 Fixes: c113236718e8 ("drm/i915: Extract GT render sleep (rc6) management") Testcase: igt/gem_exec_suspend/power-S0 Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191101141009.15581-4-chris@chris-wilson.co.uk (cherry picked from commit c601cb2135fda0b5fb9d08153b0125fcb153c7e0) Signed-off-by: Joonas Lahtinen commit d4033a9b03d8df375bca65290e9419c14392ddd0 Author: Chris Wilson Date: Fri Nov 1 14:10:08 2019 +0000 drm/i915/gt: Move user_forcewake application to GT We already track the debugfs user_forcewake on the GT, so it is natural to pull the suspend/resume handling under gt/ as well. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191101141009.15581-3-chris@chris-wilson.co.uk (cherry picked from commit 9ab3fe2d7dc39b088591b0121f041cbfd6bb1ef8) Signed-off-by: Joonas Lahtinen commit 489d1953c12ea4e7b36f20219fb2a6b1896c1f80 Author: Chris Wilson Date: Fri Nov 1 14:10:07 2019 +0000 drm/i915/gem: Leave reloading kernel context on resume to GT As we already do reload the kernel context in intel_gt_resume, repeating that action inside i915_gem_resume() as well is redundant. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191101141009.15581-2-chris@chris-wilson.co.uk (cherry picked from commit c8f6cfc56fc86999725e71a19d91269482bd2c01) Signed-off-by: Joonas Lahtinen commit fd6fe087ca470439d554185a2f6bd4d8749bb385 Author: Chris Wilson Date: Fri Nov 1 14:10:06 2019 +0000 drm/i915/gt: Call intel_gt_sanitize() directly Assume all responsibility for operating on the HW to sanitize the GT state upon load/resume in intel_gt_sanitize() itself. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191101141009.15581-1-chris@chris-wilson.co.uk (cherry picked from commit 797a615357ac0feb79c9ce41f5eaac3eb738a51f) Signed-off-by: Joonas Lahtinen commit b86deba977a91aaa5a4b725d7b42970e6de28d2c Author: Michal Kalderon Date: Wed Oct 30 11:44:10 2019 +0200 RDMA/core: Move core content from ib_uverbs to ib_core Move functionality that is called by the driver, which is related to umap, to a new file that will be linked in ib_core. This is a first step in later enabling ib_uverbs to be optional. vm_ops is now initialized in ib_uverbs_mmap instead of priv_init to avoid having to move all the rdma_umap functions as well. Link: https://lore.kernel.org/r/20191030094417.16866-2-michal.kalderon@marvell.com Suggested-by: Jason Gunthorpe Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 6a8c521c529eb0c806780886c7092d7f7fdcca7b Author: Hans Verkuil Date: Sun Nov 3 08:23:31 2019 -0300 media: am437x: fix smatch warning Fixes this warning: drivers/media/platform/am437x/am437x-vpfe.c:288 vpfe_ccdc_validate_param() warn: unsigned 'ccdcparam->alaw.gamma_wd' is never less than zero. by dropping the gamma_wd < VPFE_CCDC_GAMMA_BITS_15_6 check since VPFE_CCDC_GAMMA_BITS_15_6 is 0. Signed-off-by: Hans Verkuil Reviewed-by: Benoit Parrot Signed-off-by: Mauro Carvalho Chehab commit 8ffd573c25e5fac1daeeffc592e2ed6bc6a3d947 Author: Hans Verkuil Date: Sat Nov 2 14:35:41 2019 -0300 media: vivid: media_device_cleanup was called too early Running the contrib/test/test-media script in v4l-utils with the vivid argument will cause this kernel warning: [ 104.748720] videodev: v4l2_release [ 104.748731] ------------[ cut here ]------------ [ 104.748750] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 104.748790] WARNING: CPU: 6 PID: 1823 at kernel/locking/mutex.c:938 __mutex_lock+0x919/0xc10 [ 104.748800] Modules linked in: rc_cec vivid v4l2_tpg videobuf2_dma_contig cec rc_core v4l2_dv_timings videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc vmw_balloon vmw_vmci button vmwgfx [ 104.748845] CPU: 6 PID: 1823 Comm: sleep Not tainted 5.4.0-rc1-test-no #150 [ 104.748853] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/29/2019 [ 104.748867] RIP: 0010:__mutex_lock+0x919/0xc10 [ 104.748878] Code: 59 83 e8 9a fc 16 ff 44 8b 05 23 61 38 01 45 85 c0 0f 85 ef f7 ff ff 48 c7 c6 a0 1f 87 82 48 c7 c7 a0 1e 87 82 e8 cd bb f7 fe <0f> 0b e9 d5 f7 ff ff f6 c3 04 0f 84 3b fd ff ff 49 89 df 41 83 e7 [ 104.748886] RSP: 0018:ffff88811a357b80 EFLAGS: 00010286 [ 104.748895] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 104.748902] RDX: 0000000000000003 RSI: 0000000000000004 RDI: ffffed102346af62 [ 104.748910] RBP: ffff88811a357cf0 R08: ffffffff81217c91 R09: fffffbfff061c271 [ 104.748917] R10: fffffbfff061c270 R11: ffffffff830e1383 R12: ffff8881a46103c0 [ 104.748924] R13: 0000000000000000 R14: ffff8881a4614f90 R15: ffff8881a46153d0 [ 104.748933] FS: 0000000000000000(0000) GS:ffff8881b6780000(0000) knlGS:0000000000000000 [ 104.748940] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 104.748949] CR2: 00007f163fc9ca20 CR3: 0000000003013004 CR4: 00000000001606e0 [ 104.749036] Call Trace: [ 104.749051] ? _raw_spin_unlock+0x1f/0x30 [ 104.749067] ? llist_add_batch+0x33/0x50 [ 104.749081] ? tick_nohz_tick_stopped+0x19/0x30 [ 104.749130] ? v4l2_release.cold+0x6c/0xd6 [videodev] [ 104.749143] ? mutex_lock_io_nested+0xb80/0xb80 [ 104.749153] ? vprintk_emit+0xf2/0x220 [ 104.749191] ? vivid_req_validate+0x40/0x40 [vivid] [ 104.749201] ? printk+0xad/0xde [ 104.749211] ? kmsg_dump_rewind_nolock+0x54/0x54 [ 104.749226] ? locks_remove_file+0x78/0x2b0 [ 104.749248] ? __fsnotify_update_child_dentry_flags.part.0+0x170/0x170 [ 104.749281] ? vivid_req_validate+0x40/0x40 [vivid] [ 104.749321] ? v4l2_release.cold+0x6c/0xd6 [videodev] [ 104.749361] v4l2_release.cold+0x6c/0xd6 [videodev] [ 104.749378] __fput+0x15a/0x390 [ 104.749393] task_work_run+0xb2/0xe0 [ 104.749407] do_exit+0x4d0/0x1200 [ 104.749422] ? do_user_addr_fault+0x367/0x610 [ 104.749431] ? release_task+0x990/0x990 [ 104.749449] ? rwsem_spin_on_owner+0x170/0x170 [ 104.749463] ? vmacache_find+0xb2/0x100 [ 104.749476] do_group_exit+0x85/0x130 [ 104.749487] __x64_sys_exit_group+0x23/0x30 [ 104.749500] do_syscall_64+0x5e/0x1c0 [ 104.749511] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 104.749520] RIP: 0033:0x7f163fc5c9d6 [ 104.749536] Code: Bad RIP value. [ 104.749543] RSP: 002b:00007ffe6f3bec58 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 104.749553] RAX: ffffffffffffffda RBX: 00007f163fd4d760 RCX: 00007f163fc5c9d6 [ 104.749560] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 104.749567] RBP: 0000000000000000 R08: 00000000000000e7 R09: ffffffffffffff80 [ 104.749574] R10: 00007ffe6f3beb24 R11: 0000000000000246 R12: 00007f163fd4d760 [ 104.749581] R13: 0000000000000002 R14: 00007f163fd56428 R15: 0000000000000000 [ 104.749597] ---[ end trace 66f20f73fc0daf79 ]--- This is caused by media_device_cleanup() which destroys v4l2_dev->mdev->req_queue_mutex. But v4l2_release() tries to lock that mutex after media_device_cleanup() is called. By moving media_device_cleanup() to the v4l2_device's release function it is guaranteed that the mutex is valid whenever v4l2_release is called. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 31172e520b688524acaac61de1f1f9fc89665ee7 Author: Nícolas F. R. A. Prado Date: Wed Oct 30 09:30:40 2019 -0300 media: vimc: Make capture devices and subdevices use different link_validates Instead of validating the links to capture devices and subdevices with the same function, use the default v4l function for links between subdevices and only use a different function for validating between capture device and subdevice. This change should also ease future work to associate multiple mbus codes for the same pixelformat in vimc_pix_map. These changes were tested with v4l2-compliance SHA: 3f806630e2ecbcebe31872b865c5c4b42f111a99, 64 bits and passed all tests: Grand Total for vimc device /dev/media0: 451, Succeeded: 451, Failed: 0, Warnings: 0 Signed-off-by: Nícolas F. R. A. Prado Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3775026a654c15c92c8ac2d53f3fd14fdd1980df Author: Rasmus Villemoes Date: Fri Nov 2 22:17:06 2018 +0100 macintosh: ans-lcd: make anslcd_logo static and __initconst This variable has no reason to have external linkage, and since it is only used in an __init function, it might as well be made __initconst also. Signed-off-by: Rasmus Villemoes Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20181102211707.10229-1-linux@rasmusvillemoes.dk commit e62138403a841e4f5c08fe338cfe9d83eb3e5e0f Author: Shawn Tu Date: Fri Nov 1 07:44:31 2019 -0300 media: hi556: Add support for Hi-556 sensor Add a V4L2 sub-device driver for Hynix Hi-556 image sensor. This is a camera sensor using the I2C bus for control and the CSI-2 bus for data. This driver supports following features: - manual exposure and analog/digital gain control support - vblank/hblank control support - test pattern support - media controller support - runtime PM support - support following resolutions: + 2592x1944 at 30FPS + 1296x972 at 30FPS [sakari.ailus@linux.intel.com: Remove MEDIA_CAMERA_SUPPORT from Kconfig dependencies] Signed-off-by: Shawn Tu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 74ab6d9d7dce554a2b1265b06f2ceb4087406b6c Author: Maxime Ripard Date: Fri Nov 1 12:56:29 2019 +0100 arm64: dts: allwinner: h6: Remove useless reset name The TCON TOP node in the H6 DTSI has a reset name that isn't described in the binding. Remove it. Signed-off-by: Maxime Ripard commit ce22c6f242b6d7b5e0318da2c92b5b00b5bbc698 Author: Fabio Estevam Date: Mon Oct 28 14:13:13 2019 -0300 media: staging/imx: Use a shorter name for driver Currently v4l2-compliance tool returns the following output: Compliance test for imx-media-captu device /dev/video0: Driver Info: Driver name : imx-media-captu Card type : imx-media-capture ... The driver name string is limited to 16 characters, so provide a shorter name so that we can have a better output. While at it, use the same shorter name for driver and card. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b2b9b0a669b5947eff8c6f87c0fb1bdc652bb88f Author: Cristiane Naves Date: Sat Oct 26 20:16:19 2019 -0300 media: staging: media: allegro-dvt: remove bool comparison Bool tests don't need comparisons. Issue found by coccicheck. Signed-off-by: Cristiane Naves Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cb639a6f4a0ca7b8ada51a1ced71583b2f3a4bef Author: Philipp Zabel Date: Thu Oct 24 10:35:44 2019 -0300 media: s5p-jpeg: drop unused components from s5p_jpeg_q_data The number of components are only set, and never used. Signed-off-by: Philipp Zabel Reviewed-by: Jacek Anaszewski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d619a95693acbab64e0cdc76ddee5e214c4363f3 Author: Geert Uytterhoeven Date: Thu Oct 24 10:14:23 2019 -0300 media: dt-bindings: rcar_vin: Document RZ/G1 per-board settings The R-Car Gen2 per-board settings apply to RZ/G1, too. Fixes: 1d14a5eaa156b0b3 ("media: dt-bindings: media: rcar_vin: add device tree support for r8a774[35]") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c05b9d7b9f3ece2831e4e4829f10e904df296df8 Author: Geert Uytterhoeven Date: Thu Oct 24 10:09:16 2019 -0300 media: fdp1: Fix R-Car M3-N naming in debug message The official name is "R-Car M3-N", not "R-Car M3N". Fixes: 4e8c120de9268fc2 ("media: fdp1: Support M3N and E3 platforms") Signed-off-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fa7662aad7dc033a61ff2f705c33cbb301d0552d Author: Andy Shevchenko Date: Thu Oct 24 09:23:04 2019 -0300 media: bt819: Reduce amount of F* words in the world Replace F* word with something less offensive. [hverkuil: dropped 'Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")' tag since nothing was broken] Signed-off-by: Andy Shevchenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b299d9abf159c5e40864f8ece97d914b6a9f4b1 Author: Lucas Stach Date: Thu Oct 24 07:32:49 2019 -0300 media: coda: request to skip kernel mapping for decoded buffers The kernel driver never touches the decoded buffers with the CPU. All accesses are either done by hardware DMA masters or userspace mapping the buffers. This means we don't need a kernel virtual address mapping for those buffers at all. As those buffers are usually quite large, we can save a good deal of kernel vmalloc space by requesting to not have a kernel mapping set up for them. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a3fd80198de6ab98a205cf7fb148d88e9e1c44bb Author: Philipp Zabel Date: Thu Oct 24 07:32:11 2019 -0300 media: coda: fix deadlock between decoder picture run and start command The BIT decoder picture run temporarily locks the bitstream mutex while the coda device mutex is locked, to refill the bitstream ring buffer. Consequently, the decoder start command, which locks both mutexes when flushing the bitstream ring buffer, must lock the coda device mutex first as well, to avoid an ABBA deadlock. Fixes: e7fd95849b3c ("media: coda: flush bitstream ring buffer on decoder restart") Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 545b618cfb5cadacd00c25066b9a36540e5ca9e9 Author: Vandana BN Date: Tue Oct 22 04:51:40 2019 -0300 media: v4l2-core: fix touch support in v4l_g_fmt v4l_s_fmt, for VFL_TYPE_TOUCH, sets unneeded members of the v4l2_pix_format structure to default values.This was missing in v4l_g_fmt, which would lead to failures in v4l2-compliance tests. Signed-off-by: Vandana BN Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3cbd3d99fd85096da2175b9ae0111893b91b7ad0 Author: Janusz Krzysztofik Date: Fri Oct 18 12:31:40 2019 -0300 media: v4l2-subdev: Don't use __u32 internally Commit a8fa55078a77 ("media: v4l2-subdev: Verify arguments in v4l2_subdev_call()") and commit 374d62e7aa50 ("media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument") introduced a few local functions, unfortunately with arguments of type __u32, reserved for use in Linux uAPI. Use u32 instead. Suggested-by: Sakari Ailus Signed-off-by: Janusz Krzysztofik Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 704c6c80fb471d1bb0ef0d61a94617d1d55743cd Author: Seung-Woo Kim Date: Fri Oct 18 07:20:52 2019 -0300 media: exynos4-is: Fix recursive locking in isp_video_release() >From isp_video_release(), &isp->video_lock is held and subsequent vb2_fop_release() tries to lock vdev->lock which is same with the previous one. Replace vb2_fop_release() with _vb2_fop_release() to fix the recursive locking. Fixes: 1380f5754cb0 ("[media] videobuf2: Add missing lock held on vb2_fop_release") Signed-off-by: Seung-Woo Kim Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d39083234c60519724c6ed59509a2129fd2aed41 Author: Kangjie Lu Date: Fri Oct 18 01:47:00 2019 -0300 media: rcar_drif: fix a memory disclosure "f->fmt.sdr.reserved" is uninitialized. As other peer drivers like msi2500 and airspy do, the fix initializes it to avoid memory disclosures. Signed-off-by: Kangjie Lu Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 60afcc06ad4129af6705c1b053a4275c94d97c50 Author: YueHaibing Date: Wed Oct 16 05:56:04 2019 -0300 media: staging: media: cedrus: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5ebc4b2eb4338e3c936bf095d688141bf916daf2 Author: Biju Das Date: Tue Oct 15 07:57:58 2019 -0300 media: rcar-csi2: Enable support for R8A774B1 Add the MIPI CSI-2 driver support for RZ/G2N(R8A774B1) SoC. The CSI-2 module of RZ/G2N is similar to R-Car M3-N. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 42ec336f1f9d54049811b749f729e9e01c152ade Author: Takashi Iwai Date: Tue Nov 5 09:18:06 2019 +0100 ALSA: hda: Disable regmap internal locking Since we apply the own mutex (bus->cmd_mutex) in HDA core side, the internal locking in regmap is superfluous. This patch adds the flag to indicate that. Also, an infamous side-effect by this change is that it disables the regmap debugfs, too, and this is seen rather good; the regmap debugfs isn't quite useful for HD-audio as it provides the very sparse registers and its debugfs access tends to lead to the way too high resource usages or sometimes hang up. So it'd be rather safe to disable it altogether. Link: https://lore.kernel.org/r/2029139028.10333037.1572874551626.JavaMail.zimbra@redhat.com Link: https://lore.kernel.org/r/20191105081806.4896-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3f9402a09f212c321f65eda926555e8448b9c365 Author: Biju Das Date: Tue Oct 15 07:57:57 2019 -0300 media: rcar-vin: Enable support for R8A774B1 Add the SoC specific information for RZ/G2N(R8A774B1) SoC. The VIN module of RZ/G2N is similar to R-Car M3-N. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 81b19e5d3381d5adc2563473ab14e76baa548ff5 Author: Biju Das Date: Tue Oct 15 07:57:56 2019 -0300 media: dt-bindings: rcar-csi2: Add R8A774B1 support Add the compatible string for RZ/G2N (R8A774B1) to the list of supported SoCs. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8681cc38dfa84f5952bca024191eb4ff1646525d Author: Biju Das Date: Tue Oct 15 07:57:55 2019 -0300 media: dt-bindings: rcar-vin: Add R8A774B1 support Document support for the VIN module in the Renesas RZ/G2N (R8A774B1) SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9b744a3ec812fd3ef0364f3cb397ed89302c7957 Author: Niklas Söderlund Date: Sun Oct 13 21:16:15 2019 -0300 media: rcar-vin: Add support for outputting NV12 Most Gen3 boards can output frames in NV12 format, add support for this with a runtime check that the running hardware supports it. Signed-off-by: Niklas Söderlund Reviewed-by: Simon Horman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f8fe466aa727951f226a99e58508fd908b715d98 Author: Niklas Söderlund Date: Sun Oct 13 21:16:14 2019 -0300 media: rcar-vin: Define which hardware supports NV12 Most but not all Gen3 hardware support outputting NV12, add a flag to indicate which SoCs do support it. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f490061747218ae3dd595637bfb6f2905e79fb7 Author: Niklas Söderlund Date: Sun Oct 13 21:07:50 2019 -0300 media: rcar-vin: Do not enumerate unsupported pixel formats If a pixel format is not supported by the hardware NULL is returned by rvin_format_from_pixel() for that fourcc. Verify that the pixel format is supported using this or skip it when enumerating. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1091eb830627625dcf79958d99353c2391f41708 Author: Johan Hovold Date: Thu Oct 10 10:13:32 2019 -0300 media: radio: wl1273: fix interrupt masking on release If a process is interrupted while accessing the radio device and the core lock is contended, release() could return early and fail to update the interrupt mask. Note that the return value of the v4l2 release file operation is ignored. Fixes: 87d1a50ce451 ("[media] V4L2: WL1273 FM Radio: TI WL1273 FM radio driver") Cc: stable # 2.6.38 Cc: Matti Aaltonen Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11609a7e21f8cea42630350aa57662928fa4dc63 Author: Johan Hovold Date: Thu Oct 10 10:13:31 2019 -0300 media: bdisp: fix memleak on release If a process is interrupted while accessing the video device and the device lock is contended, release() could return early and fail to free related resources. Note that the return value of the v4l2 release file operation is ignored. Fixes: 28ffeebbb7bd ("[media] bdisp: 2D blitter driver using v4l2 mem2mem framework") Cc: stable # 4.2 Signed-off-by: Johan Hovold Reviewed-by: Fabien Dessenne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d973933858eea01dcaa150da581b11933802e415 Author: zhong jiang Date: Wed Oct 9 11:55:25 2019 -0300 media: v4l2-dv-timings: Use DIV_ROUND_CLOSEST directly to make it readable The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. Signed-off-by: zhong jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9ecb6718c679a25880acf598b520d6217b2ef30c Author: Colin Ian King Date: Sun Oct 6 12:04:29 2019 -0300 media: vpx3220: make array input_vals static, makes object smaller Don't populate the array input_vals on the stack but instead make it static. Makes the object code smaller by 106 bytes. Before: text data bss dec hex filename 11744 3536 128 15408 3c30 drivers/media/i2c/vpx3220.o After: text data bss dec hex filename 11574 3600 128 15302 3bc6 drivers/media/i2c/vpx3220.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 16d6bc53fb79455a851720f5c3d147b6b43c16f6 Author: Chris Paterson Date: Thu Sep 26 07:17:54 2019 -0300 media: MAINTAINERS: Update MAX2175 & R-Car DRIF driver maintainer email Ramesh is now using a new email address. Update the maintainer entry for the MAX2175 SDR tuner and the Renesas R-Car DRIF drivers. Signed-off-by: Chris Paterson Acked-by: Ramesh Shanmugasundaram Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5c2a99480eb8d0fd8775847e31651740b56ba64b Author: Nishad Kamdar Date: Sat Sep 7 11:21:36 2019 -0300 media: xilinx: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to Video drivers for Xilinx devices. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c2f2093e149d3109f1457deac4909191d9aca323 Author: Miroslav Benes Date: Tue Oct 29 15:39:02 2019 +0100 s390/unwind: drop unnecessary code around calling ftrace_graph_ret_addr() The current code around calling ftrace_graph_ret_addr() is ifdeffed and also tests if ftrace redirection is present on stack. ftrace_graph_ret_addr() however performs the test internally and there is a version for !CONFIG_FUNCTION_GRAPH_TRACER as well. The unnecessary code can thus be dropped. Link: http://lkml.kernel.org/r/20191029143904.24051-2-mbenes@suse.cz Signed-off-by: Miroslav Benes Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c7bc0434081f034beff22c7b2b179799285b00f2 Author: Colin Ian King Date: Fri Sep 6 12:08:23 2019 -0300 media: imx7-mipi-csis: make array 'registers' static const, makes object smaller Don't populate the array 'registers' on the stack but instead make it static const. Makes the object code smaller by 10 bytes. Before: text data bss dec hex filename 20138 5196 128 25462 6376 staging/media/imx/imx7-mipi-csis.o After: text data bss dec hex filename 20032 5292 128 25452 636c staging/media/imx/imx7-mipi-csis.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b05a1e517e1a8cfda4866ec31d28b2bc4fee4c4 Author: Geert Uytterhoeven Date: Mon Oct 21 16:23:09 2019 +0200 powerpc/security: Fix debugfs data leak on 32-bit "powerpc_security_features" is "unsigned long", i.e. 32-bit or 64-bit, depending on the platform (PPC_FSL_BOOK3E or PPC_BOOK3S_64). Hence casting its address to "u64 *", and calling debugfs_create_x64() is wrong, and leaks 32-bit of nearby data to userspace on 32-bit platforms. While all currently defined SEC_FTR_* security feature flags fit in 32-bit, they all have "ULL" suffixes to make them 64-bit constants. Hence fix the leak by changing the type of "powerpc_security_features" (and the parameter types of its accessors) to "u64". This also allows to drop the cast. Fixes: 398af571128fe75f ("powerpc/security: Show powerpc_security_features in debugfs") Signed-off-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191021142309.28105-1-geert+renesas@glider.be commit 1438d3c1c35faf16c86dfa6c2a55030777cd4084 Author: Colin Ian King Date: Tue Sep 3 14:06:39 2019 -0300 media: cx231xx: remove redundant assignment to variable status Variable status is being initialized with a value that is never read and is being re-assigned a later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a9913d7eafa74eb2e34e26aa31fe80449b999f8e Author: Nikitas Angelinas Date: Sun Nov 3 01:44:54 2019 -0800 reiserfs: replace open-coded atomic_dec_and_mutex_lock() Replace the open-coded logic of atomic_dec_and_mutex_lock() in reiserfs_file_release(). Link: https://lore.kernel.org/r/20191103094431.GA18576-nikitas.angelinas@gmail.com Signed-off-by: Nikitas Angelinas Signed-off-by: Jan Kara commit 16f6b67cf03cb43db7104acb2ca877bdc2606c92 Author: Aneesh Kumar K.V Date: Tue Oct 1 14:16:56 2019 +0530 powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning With large memory (8TB and more) hotplug, we can get soft lockup warnings as below. These were caused by a long loop without any explicit cond_resched which is a problem for !PREEMPT kernels. Avoid this using cond_resched() while inserting hash page table entries. We already do similar cond_resched() in __add_pages(), see commit f64ac5e6e306 ("mm, memory_hotplug: add scheduling point to __add_pages"). rcu: 3-....: (24002 ticks this GP) idle=13e/1/0x4000000000000002 softirq=722/722 fqs=12001 (t=24003 jiffies g=4285 q=2002) NMI backtrace for cpu 3 CPU: 3 PID: 3870 Comm: ndctl Not tainted 5.3.0-197.18-default+ #2 Call Trace: dump_stack+0xb0/0xf4 (unreliable) nmi_cpu_backtrace+0x124/0x130 nmi_trigger_cpumask_backtrace+0x1ac/0x1f0 arch_trigger_cpumask_backtrace+0x28/0x3c rcu_dump_cpu_stacks+0xf8/0x154 rcu_sched_clock_irq+0x878/0xb40 update_process_times+0x48/0x90 tick_sched_handle.isra.16+0x4c/0x80 tick_sched_timer+0x68/0xe0 __hrtimer_run_queues+0x180/0x430 hrtimer_interrupt+0x110/0x300 timer_interrupt+0x108/0x2f0 decrementer_common+0x114/0x120 --- interrupt: 901 at arch_add_memory+0xc0/0x130 LR = arch_add_memory+0x74/0x130 memremap_pages+0x494/0x650 devm_memremap_pages+0x3c/0xa0 pmem_attach_disk+0x188/0x750 nvdimm_bus_probe+0xac/0x2c0 really_probe+0x148/0x570 driver_probe_device+0x19c/0x1d0 device_driver_attach+0xcc/0x100 bind_store+0x134/0x1c0 drv_attr_store+0x44/0x60 sysfs_kf_write+0x64/0x90 kernfs_fop_write+0x1a0/0x270 __vfs_write+0x3c/0x70 vfs_write+0xd0/0x260 ksys_write+0xdc/0x130 system_call+0x5c/0x68 Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191001084656.31277-1-aneesh.kumar@linux.ibm.com commit 864edb758c50c30787bb51f2e26c4be2b4937025 Author: Aneesh Kumar K.V Date: Thu Oct 24 13:28:01 2019 +0530 powerpc/mm/book3s64/radix: Flush the full mm even when need_flush_all is set With the previous patch, we should now not be using need_flush_all for powerpc. But then make sure we force a PID tlbie flush with RIC=2 if we ever find need_flush_all set. Also don't reset it after a mmu gather flush. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191024075801.22434-3-aneesh.kumar@linux.ibm.com commit 52162ec784fa05f3a4b1d8e84421279998be3773 Author: Aneesh Kumar K.V Date: Thu Oct 24 13:28:00 2019 +0530 powerpc/mm/book3s64/radix: Use freed_tables instead of need_flush_all With commit 22a61c3c4f13 ("asm-generic/tlb: Track freeing of page-table directories in struct mmu_gather") we now track whether we freed page table in mmu_gather. Use that to decide whether to flush Page Walk Cache. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191024075801.22434-2-aneesh.kumar@linux.ibm.com commit a42d6ba8c5be5aa597d25dbc15e336a2eca40260 Author: Aneesh Kumar K.V Date: Thu Oct 24 13:27:59 2019 +0530 powerpc/mm/book3s64/radix: Remove unused code. mm_tlb_flush_nested change was added in the mmu gather tlb flush to handle the case of parallel pte invalidate happening with mmap_sem held in read mode. This fix was done by commit 02390f66bd23 ("powerpc/64s/radix: Fix MADV_[FREE|DONTNEED] TLB flush miss problem with THP") and the problem is explained in detail in commit 99baac21e458 ("mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem") This was later updated by commit 7a30df49f63a ("mm: mmu_gather: remove __tlb_reset_range() for force flush") to do a full mm flush rather than a range flush. By commit dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap") we are also now allowing a page table free in mmap_sem read mode which means we should do a PWC flush too. Our current full mm flush imply a PWC flush. With all the above change the mm_tlb_flush_nested(mm) branch in radix__tlb_flush will never be taken because for the nested case we would have taken the if (tlb->fullmm) branch. This patch removes the unused code. Also, remove the gflush change in __radix__flush_tlb_range that was added to handle the range tlb flush code. We only check for THP there because hugetlb is flushed via a different code path where page size is explicitly specified. This is a partial revert of commit 02390f66bd23 ("powerpc/64s/radix: Fix MADV_[FREE|DONTNEED] TLB flush miss problem with THP") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191024075801.22434-1-aneesh.kumar@linux.ibm.com commit 17f74b145af3db5823c1a5d6ac9e34f983b789d4 Author: Dan Carpenter Date: Tue Oct 29 15:24:01 2019 -0300 media: smiapp: unlock on error in smiapp_start_streaming() We added two new error paths to smiapp_start_streaming(), but we can't return directly without dropping the "sensor->mutex" lock. Fixes: f8c4352c1bef ("media: smiapp: Move binning configuration to streaming start") Signed-off-by: Dan Carpenter Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dca5ef2aa1e62f99372d22688da089629b496ed5 Author: Bingbu Cao Date: Wed Oct 23 00:01:23 2019 -0300 media: staging/intel-ipu3: remove the unnecessary compiler flags Currently, we can build ipu3 driver code without any warnings with W=1, so the extra compiler flags in Makefile and the item in TODO file can be removed. Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 318335c250962cde36338e341235b313bc35e386 Author: Bingbu Cao Date: Tue Oct 22 23:59:02 2019 -0300 media: doc-rst: ipu3: clarification on data type conversion of IEFD CU The data type conversion of the IEFD CU inputs in ipu3 uapi is ambiguities, add some clarification to help user to understand this conversion. Signed-off-by: Bingbu Cao Suggested-by: Sakari Ailus Cc: Tomasz Figa Cc: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4147dca25d1f2aae2a44ac02647eaf29ef8d028a Author: Bingbu Cao Date: Tue Oct 8 01:21:27 2019 -0300 media: doc-rst: add more info for resolution change blocks in ipu3 This patch add more details for the resolution change blocks It can help the developer to understand the main resolution change blocks in ImgU. [sakari.ailus@linux.intel.com: Add new files to MAINTAINERS] Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c85c5c53ffa2ea01d6d1f117aeb0b598b0abd8cd Author: Maxime Ripard Date: Thu Oct 31 14:49:05 2019 +0100 ARM: dts: sun6i: Remove useless reset-names The HDMI controller definition in the A31 DTSI has a reset-names property, yet the binding for that controller doesn't declare it. Remove it. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit b5d84ff8ae180e443623ede8a16852f671b0bb05 Author: Ondrej Jirman Date: Sun Oct 20 15:42:29 2019 +0200 arm64: dts: allwinner: orange-pi-3: Enable USB 3.0 host support Enable Allwinner's USB 3.0 phy and the host controller. Orange Pi 3 board has GL3510 USB 3.0 4-port hub connected to the SoC's USB 3.0 port. All four ports are exposed via USB3-A connectors. VBUS is always on, since it's powered directly from DCIN (VCC-5V) and not switchable. Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard commit 0b6f7014adc1cc12c7c3ba988594514602919eca Author: Icenowy Zheng Date: Sun Oct 20 15:42:28 2019 +0200 arm64: dts: allwinner: h6: add USB3 device nodes Allwinner H6 SoC features USB3 functionality, with a DWC3 controller and a custom PHY. Add device tree nodes for them. Signed-off-by: Ondrej Jirman Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 1e92dbeae806c6a49ef25d34e279af45632120b3 Author: Torsten Duwe Date: Tue Oct 29 13:16:57 2019 +0100 dt-bindings: Add ANX6345 DP/eDP transmitter binding The anx6345 is an ultra-low power DisplayPort/eDP transmitter designed for portable devices. Add a binding document for it. Signed-off-by: Icenowy Zheng Signed-off-by: Vasily Khoruzhick Reviewed-by: Rob Herring Signed-off-by: Torsten Duwe Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard commit 79bc02f12210d0e77ab17640152e5e56f4f44dc7 Author: Torsten Duwe Date: Tue Oct 29 13:16:57 2019 +0100 arm64: dts: allwinner: a64: enable ANX6345 bridge on Teres-I Teres-I has an anx6345 bridge connected to the RGB666 LCD output, and the I2C controlling signals are connected to I2C0 bus. Enable it in the device tree, and enable the display engine, video mixer and tcon0 as well. Signed-off-by: Icenowy Zheng Signed-off-by: Torsten Duwe Signed-off-by: Maxime Ripard commit 240a6438985cf05417ee840f07ba4ec243945592 Author: Jernej Skrabec Date: Thu Oct 24 00:13:32 2019 +0200 dts: arm: sun8i: h3: Enable deinterlace unit Allwinner H3 SoC contains deinterlace unit, which can be used in combination with VPU unit to decode and process interlaced videos. Add a node for it. Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 66e40b3517f7de1b465d4ccc36587cf2ab70a94e Author: Jernej Skrabec Date: Thu Oct 24 00:13:29 2019 +0200 ARM: dts: sunxi: h3/h5: Add MBUS controller node Both, H3 and H5, contain MBUS, which is the bus used by DMA devices to access system memory. MBUS controller is responsible for arbitration between channels based on set priority and can do some other things as well, like report bandwidth used. It also maps RAM region to different address than CPU. Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit ab883313ef625a48704eec3159b43eabe1e5fa38 Author: Jernej Skrabec Date: Thu Oct 24 00:13:27 2019 +0200 dt-bindings: bus: sunxi: Add H3 MBUS compatible Allwinner H3 SoC also contains MBUS controller. Add compatible for it. Acked-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 4441b57ec27e35a86337b3197c62b3d6be9695b2 Author: Jernej Skrabec Date: Thu Oct 24 00:13:28 2019 +0200 clk: sunxi-ng: h3: Export MBUS clock MBUS clock will be referenced in MBUS controller node. Export it. Acked-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 6e4f3db8dfcf6c4126232086251a31db364503e1 Author: lijiazi Date: Fri Nov 1 19:43:52 2019 +0800 pinctrl: just return if no valid maps If there is a problem with a pinctrl node of a device, for example, config child node do not have prop specified in dt_params, num_maps maybe 0. On this condition, no need remember this map. Signed-off-by: lijiazi Link: https://lore.kernel.org/r/29421e7720443a2454830963186f00583c76ce1e.1572588550.git.lijiazi@xiaomi.com Signed-off-by: Linus Walleij commit ee19835270202a0d018651f7fea93ce55b35fd4e Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:35:07 2019 +0100 dt-bindings: pinctrl: qcom-pmic-mpp: Add support for PM/PMI8950 Document the bindings for PM8950 and PMI8950 PMIC MPPs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20191031103507.30678-5-kholk11@gmail.com Signed-off-by: Linus Walleij commit 90dc30f9bab44d0ddb961cb72a51431502f9a669 Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:35:06 2019 +0100 pinctrl: qcom: spmi-mpp: Add PM/PMI8950 compatible strings PM8950 and PMI8950 have four MPPs and this driver is compatible. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20191031103507.30678-4-kholk11@gmail.com Signed-off-by: Linus Walleij commit 06cbe1f72b40b6e75cfbcff02c27060103929c43 Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:35:05 2019 +0100 dt-bindings: pinctrl: qcom-pmic-gpio: Add support for PM/PMI8950 Document the bindings for PM8950 and PMI8950 PMIC GPIOs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20191031103507.30678-3-kholk11@gmail.com Signed-off-by: Linus Walleij commit ba5b9c857b47f6f7d893fbc6ec850d3951f6239c Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:35:04 2019 +0100 pinctrl: qcom: spmi-gpio: Add PM/PMI8950 compatibility The PM8950 features 8 GPIOs with hole in 3 and PMI8950 has only two; these PMICs are totally compatible with this driver. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20191031103507.30678-2-kholk11@gmail.com Signed-off-by: Linus Walleij commit 504369cd6d2ce34c1225063071ac7e0a5a4d5e30 Author: Linus Walleij Date: Wed Oct 30 13:29:14 2019 +0100 gpiolib: Switch order of valid mask and hw init The GPIO irqchip needs to initialize the valid mask before initializing the IRQ hardware, because sometimes the latter require the former to be executed first. Cc: Andy Shevchenko Cc: Mika Westerberg Reported-by: Hans de Goede Link: https://lore.kernel.org/r/20191030122914.967-1-linus.walleij@linaro.org Acked-by: Hans de Goede Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij commit c196924277ea82200d4c4fd9537c71390b96f247 Merge: 6a41b6c5fc20 a99d8080aaf3 Author: Linus Walleij Date: Tue Nov 5 11:00:40 2019 +0100 Merge tag 'v5.4-rc6' into devel Linux 5.4-rc6 commit e705f4b8aa27a59f8933e8f384e9752f052c469c Author: Chengguang Xu Date: Tue Nov 5 12:51:00 2019 +0800 ext2: check err when partial != NULL Check err when partial == NULL is meaningless because partial == NULL means getting branch successfully without error. CC: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191105045100.7104-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit c23734487fb44ee16c1b007ba72d793c085e4ec4 Author: Ondrej Jirman Date: Fri Nov 1 17:41:51 2019 +0100 cpufreq: sun50i: Fix CPU speed bin detection I have observed failures to boot on Orange Pi 3, because this driver determined that my SoC is from the normal bin, but my SoC only works reliably with the OPP values for the slowest bin. By querying H6 owners, it was found that e-fuse values found in the wild are in the range of 1-3, value of 7 was not reported, yet. From this and from unused defines in BSP code, it can be assumed that meaning of efuse values on H6 actually is: - 1 = slowest bin - 2 = normal bin - 3 = fastest bin Vendor code actually treats 0 and 2 as invalid efuse values, but later treats all invalid values as a normal bin. This looks like a mistake in bin detection code, that was plastered over by a hack in cpufreq code, so let's not repeat it here. It probably only works because there are no SoCs in the wild with efuse value of 0, and fast bin SoCs are made to use normal bin OPP tables, which is also safe. Let's play it safe and interpret 0 as the slowest bin, but fix detection of other bins to match this research. More research will be done before actual OPP tables are merged. Fixes: f328584f7bff ("cpufreq: Add sun50i nvmem based CPU scaling driver") Acked-by: Maxime Ripard Signed-off-by: Ondrej Jirman Signed-off-by: Viresh Kumar commit 8eb4704b124cbd44f189709959137d77063ecfa1 Author: Chris Wilson Date: Sun Nov 3 16:23:05 2019 +0000 drm/i915: Protect request peeking with RCU Since the execlists_active() is no longer protected by the engine->active.lock, we need to protect the request pointer with RCU to prevent it being freed as we evaluate whether or not we need to preempt. Fixes: df403069029d ("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock") Fixes: 13ed13a4dcbf ("drm/i915: Don't set queue_priority_hint if we don't kick the submission") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191104090158.2959-2-chris@chris-wilson.co.uk (cherry picked from commit 7d148635253328dda7cfe55d57e3c828e9564427) Signed-off-by: Joonas Lahtinen commit 26a4175372a59f001e2b49a4da73a8896cf1adba Merge: 9c7db4947506 ddd1bbbae486 Author: Greg Kroah-Hartman Date: Tue Nov 5 08:46:36 2019 +0100 Merge tag 'extcon-next-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for 5.5 Detailed description for this pull request: 1. Clean up the and fix the minor issue of extcon provider driver - extcon-intel-cht-wc don't reset the USB data connection at probe time in order to prevent the removing all devices from bus. - extcon-sm5502 reset the registers at proble time in order to prevent the some stuck state. And remove the redundant variable initializaiton. * tag 'extcon-next-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: sm5502: remove redundant assignment to variable cable_type extcon: sm5502: Reset registers during initialization extcon-intel-cht-wc: Don't reset USB data connection at probe commit 971112e072938517fe80ab2adcbfffc568a8838e Author: Bjorn Andersson Date: Sun Nov 3 21:50:36 2019 -0800 MAINTAINERS: Add myself as co-maintainer for QCOM Add myself as co-maintainer for the Qualcomm SoC. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 8e6b6da91ac9b9ec5a925b6cb13f287a54bd547d Author: Anthony Steinhauser Date: Tue Oct 29 12:07:59 2019 -0700 powerpc/security/book3s64: Report L1TF status in sysfs Some PowerPC CPUs are vulnerable to L1TF to the same extent as to Meltdown. It is also mitigated by flushing the L1D on privilege transition. Currently the sysfs gives a false negative on L1TF on CPUs that I verified to be vulnerable, a Power9 Talos II Boston 004e 1202, PowerNV T2P9D01. Signed-off-by: Anthony Steinhauser Signed-off-by: Michael Ellerman [mpe: Just have cpu_show_l1tf() call cpu_show_meltdown() directly] Link: https://lore.kernel.org/r/20191029190759.84821-1-asteinhauser@google.com commit f361c863b3bfa602da37d7a94d90a5dfee0d08fe Author: John Garry Date: Tue Nov 5 01:22:19 2019 +0800 logic_pio: Build into a library Object file logic_pio.o is always built. Ideally the object file should only be built when required. This is tricky, as that would be for archs which define PCI_IOBASE, but no common config option exists for that. For now, continue to always build but at least ensure the symbols are not included in the vmlinux when not referenced. Suggested-by: Arnd Bergmann Signed-off-by: John Garry Signed-off-by: Wei Xu commit 3e5cd20d4e1f75b03da58c379ca661e2f1e55cfc Author: John Garry Date: Tue Nov 5 01:22:18 2019 +0800 bus: hisi_lpc: Expand build test coverage Currently the driver will only ever be built for ARM64 because it selects CONFIG_INDIRECT_PIO, which itself depends on ARM64. Expand build test coverage for the driver to other architectures by only selecting CONFIG_INDIRECT_PIO for ARM64, when we really want it. We don't include ALPHA, C6X, HEXAGON, and PARISC architectures as they don't define {read, write}sb. Signed-off-by: John Garry Signed-off-by: Wei Xu commit 663accf1872b22c5eff05235d4750f3a253f5158 Author: John Garry Date: Tue Nov 5 01:22:17 2019 +0800 bus: hisi_lpc: Clean some types Sparse complains of these: drivers/bus/hisi_lpc.c:82:38: warning: incorrect type in argument 1 (different address spaces) drivers/bus/hisi_lpc.c:82:38: expected void const volatile [noderef] *addr drivers/bus/hisi_lpc.c:82:38: got unsigned char * drivers/bus/hisi_lpc.c:131:35: warning: incorrect type in argument 1 (different address spaces) drivers/bus/hisi_lpc.c:131:35: expected unsigned char *mbase drivers/bus/hisi_lpc.c:131:35: got void [noderef] *membase drivers/bus/hisi_lpc.c:186:35: warning: incorrect type in argument 1 (different address spaces) drivers/bus/hisi_lpc.c:186:35: expected unsigned char *mbase drivers/bus/hisi_lpc.c:186:35: got void [noderef] *membase drivers/bus/hisi_lpc.c:228:16: warning: cast to restricted __le32 drivers/bus/hisi_lpc.c:251:13: warning: incorrect type in assignment (different base types) drivers/bus/hisi_lpc.c:251:13: expected unsigned int [unsigned] [usertype] val drivers/bus/hisi_lpc.c:251:13: got restricted __le32 [usertype] Clean them up. Signed-off-by: John Garry Signed-off-by: Wei Xu commit b8104fda1fff0882e43b7e98832a76d7e98eb3e9 Author: John Garry Date: Tue Nov 5 01:22:16 2019 +0800 logic_pio: Define PIO_INDIRECT_SIZE for !CONFIG_INDIRECT_PIO With the goal of expanding the test coverage of the HiSi LPC driver to !ARM64, define a dummy PIO_INDIRECT_SIZE for !CONFIG_INDIRECT_PIO, which is required by the named driver. Signed-off-by: John Garry Signed-off-by: Wei Xu commit 0376fa72a45536cc582aeef6566558d3fe318e2e Author: John Garry Date: Tue Nov 5 01:22:15 2019 +0800 lib: logic_pio: Enforce LOGIC_PIO_INDIRECT region ops are set at registration Since the only LOGIC_PIO_INDIRECT host (hisi-lpc) now sets the ops prior to registration, enforce this check for accessors ops at registration instead of in the IO port accessors to simplify and marginally optimise the code. A slight misalignment is also tidied. Also add myself as an author. Suggested-by: Bjorn Helgaas Signed-off-by: John Garry Signed-off-by: Wei Xu commit 80c784282859cc39617b808440a34d0be9502b87 Author: Nathan Lynch Date: Wed Oct 16 13:36:11 2019 -0500 powerpc/pseries: safely roll back failed DLPAR cpu add dlpar_online_cpu() attempts to online all threads of a core that has been added to an LPAR. If onlining a non-primary thread fails (e.g. due to an allocation failure), the core is left with at least one thread online. dlpar_cpu_add() attempts to roll back the whole operation, releasing the core back to the platform. However, since some threads of the core being removed are still online, the BUG_ON(cpu_online(cpu)) in pseries_remove_processor() strikes: LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: CPU: 3 PID: 8587 Comm: drmgr Not tainted 5.3.0-rc2-00190-g9b123d1ea237-dirty #46 NIP: c0000000000eeb2c LR: c0000000000eeac4 CTR: c0000000000ee9e0 REGS: c0000001f745b6c0 TRAP: 0700 Not tainted (5.3.0-rc2-00190-g9b123d1ea237-dirty) MSR: 800000010282b033 CR: 44002448 XER: 00000000 CFAR: c00000000195d718 IRQMASK: 0 GPR00: c0000000000eeac4 c0000001f745b950 c0000000032f6200 0000000000000008 GPR04: 0000000000000008 c000000003349c78 0000000000000040 00000000000001ff GPR08: 0000000000000008 0000000000000000 0000000000000001 0007ffffffffffff GPR12: 0000000084002844 c00000001ecacb80 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000008 GPR24: c000000003349ee0 c00000000334a2e4 c0000000fca4d7a8 c000000001d20048 GPR28: 0000000000000001 ffffffffffffffff ffffffffffffffff c0000000fca4d7c4 NIP [c0000000000eeb2c] pseries_smp_notifier+0x14c/0x2e0 LR [c0000000000eeac4] pseries_smp_notifier+0xe4/0x2e0 Call Trace: [c0000001f745b950] [c0000000000eeac4] pseries_smp_notifier+0xe4/0x2e0 (unreliable) [c0000001f745ba10] [c0000000001ac774] notifier_call_chain+0xb4/0x190 [c0000001f745bab0] [c0000000001ad62c] blocking_notifier_call_chain+0x7c/0xb0 [c0000001f745baf0] [c00000000167bda0] of_detach_node+0xc0/0x110 [c0000001f745bb50] [c0000000000e7ae4] dlpar_detach_node+0x64/0xa0 [c0000001f745bb80] [c0000000000edefc] dlpar_cpu_add+0x31c/0x360 [c0000001f745bc10] [c0000000000ee980] dlpar_cpu_probe+0x50/0xb0 [c0000001f745bc50] [c00000000002cf70] arch_cpu_probe+0x40/0x70 [c0000001f745bc70] [c000000000ccd808] cpu_probe_store+0x48/0x80 [c0000001f745bcb0] [c000000000cbcef8] dev_attr_store+0x38/0x60 [c0000001f745bcd0] [c00000000059c980] sysfs_kf_write+0x70/0xb0 [c0000001f745bd10] [c00000000059afb8] kernfs_fop_write+0xf8/0x280 [c0000001f745bd60] [c0000000004b437c] __vfs_write+0x3c/0x70 [c0000001f745bd80] [c0000000004b8710] vfs_write+0xd0/0x220 [c0000001f745bdd0] [c0000000004b8acc] ksys_write+0x7c/0x140 [c0000001f745be20] [c00000000000bbd8] system_call+0x5c/0x68 Move dlpar_offline_cpu() up in the file so that dlpar_online_cpu() can use it to re-offline any threads that have been onlined when an error is encountered. Signed-off-by: Nathan Lynch Fixes: e666ae0b10aa ("powerpc/pseries: Update CPU hotplug error recovery") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191016183611.10867-3-nathanl@linux.ibm.com commit 3366ebe9e19ba3c672a00a6fb86f0ac8636ee989 Author: Nathan Lynch Date: Wed Oct 16 13:36:10 2019 -0500 powerpc/pseries: address checkpatch warnings in dlpar_offline_cpu Remove some stray blank lines, convert a printk to pr_warn, and address a line length violation. One functional change: use WARN_ON instead of BUG_ON in case H_PROD of a ceded thread yields an unexpected result from the platform. We can expect this code path to get uninterruptibly stuck in __cpu_die() if this happens, but that's more desirable than crashing. Signed-off-by: Nathan Lynch Fixes: b6db63d1a7f0 ("pseries/pseries: Add code to online/offline CPUs of a DLPAR node") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191016183611.10867-2-nathanl@linux.ibm.com commit 505127068d9b705a6cf335143239db91bfe7bbe2 Author: Michael Ellerman Date: Tue Nov 5 10:15:56 2019 +1100 selftests/powerpc: Skip tm-signal-sigreturn-nt if TM not available On systems where TM (Transactional Memory) is disabled the tm-signal-sigreturn-nt test causes a SIGILL: test: tm_signal_sigreturn_nt tags: git_version:7c202575ef63 !! child died by signal 4 failure: tm_signal_sigreturn_nt We should skip the test if TM is not available. Fixes: 34642d70ac7e ("selftests/powerpc: Add checks for transactional sigreturn") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191104233524.24348-1-mpe@ellerman.id.au commit fa53228721876515adabc7bc74368490bd97aa3b Author: Christoph Hellwig Date: Mon Nov 4 10:05:43 2019 -0800 block: avoid blk_bio_segment_split for small I/O operations __blk_queue_split() adds significant overhead for small I/O operations. Add a shortcut to avoid it for cases where we know we never need to split. Based on a patch from Ming Lei. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d843304b22e84b41dd00663a13cb960d2f4d064d Author: Lucas Stach Date: Mon Nov 4 15:59:38 2019 -0800 Input: synaptics-rmi4 - simplify data read in rmi_f54_work The body of the for loop is only ever run once as the second standard_report element is never changed from its initial zero init, so the loop condition is never satisfies after the first run. Equally the start member of the first element is never changed from 0, so the index offset is always a constant 0. Remove this needless obfuscation of the code and write it in a straight forward manner. Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20191104114454.10500-3-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov commit 1665cbd5731fa7c66103ec719c57922bbc457447 Author: Jeffrey Hugo Date: Thu Oct 31 19:45:01 2019 -0700 remoteproc: qcom_q6v5_mss: Add support for MSM8998 MSM8998 sits between MSM8996 and SDM845 in terms of functionality needed to boot the modem subsystem. Booting mss allows for servicing the traditional cellular usecases along with the wireless usecases such as wifi. Signed-off-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson commit ab1b12339edcd7db181cebf891838ca3ebd087b3 Author: Jeffrey Hugo Date: Thu Oct 31 19:44:35 2019 -0700 dt-bindings: remoteproc: qcom: Add Q6v5 Modem PIL binding for MSM8998 Add new compatible string for Qualcomm MSM8998 SoCs. Reviewed-by: Rob Herring Signed-off-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson commit a5155b870d687de1a5f07e774b49b1e8ef0f6f50 Author: Darrick J. Wong Date: Sat Nov 2 09:40:53 2019 -0700 xfs: always log corruption errors Make sure we log something to dmesg whenever we return -EFSCORRUPTED up the call stack. Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig commit d243b89a611e83dc97ce7102419360677a664076 Author: Darrick J. Wong Date: Sat Nov 2 09:40:36 2019 -0700 xfs: constify the buffer pointer arguments to error functions Some of the xfs error message functions take a pointer to a buffer that will be dumped to the system log. The logging functions don't change the contents, so constify all the parameters. This enables the next patch to ensure that we log bad metadata when we encounter it. Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig commit e91ec882af21c0e845bf962b35f3c13482f74b2f Author: Darrick J. Wong Date: Sat Nov 2 09:38:08 2019 -0700 xfs: relax shortform directory size checks Each of the four functions that operate on shortform directories checks that the directory's di_size is at least as large as the shortform directory header. This is now checked by the inode fork verifiers (di_size is used to allocate if_bytes, and if_bytes is checked against the header structure size) so we can turn these checks into ASSERTions. Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig commit dc645daef9af5bcbd9c5c73370dc7f96761ff186 Author: Jesse Brandeburg Date: Mon Oct 28 17:37:07 2019 -0700 i40e: implement VF stats NDO Implement the VF stats gathering via the kernel via ndo_get_vf_stats(). The driver will show per-VF stats in the output of the command: ip -s link show dev Testing Hints: ip -s link show dev eth0 will return non-zero VF stats. ... vf 0 MAC 00:55:aa:00:55:aa, spoof checking on, link-state enable, trust off RX: bytes packets mcast bcast 128000 1000 104 104 TX: bytes packets 128000 1000 Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 3df5b9a6a9ec3c1e4431bf1db3426b54dc92dd91 Author: Alice Michael Date: Wed Oct 23 03:19:57 2019 -0700 i40e: enable X710 support The I40E_DEV_ID_10G_BASE_T_BC device id was added previously, but was not enabled in all the appropriate places. Adding it to enable it's use. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e20c9284c8f212081afc28471daaac9b0d54252f Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:44:02 2019 +0100 drm/msm/adreno: Add support for Adreno 510 GPU The Adreno 510 GPU is a stripped version of the Adreno 5xx, found in low-end SoCs like 8x56 and 8x76, which has 256K of GMEM, with no GPMU nor ZAP. Also, since the Adreno 5xx part of this driver seems to be developed with high-end Adreno GPUs in mind, and since this is a lower end one, add a comment making clear which GPUs which support is not implemented yet is not using the GPMU related hw init code, so that future developers will not go crazy with that. By the way, the lower end Adreno GPUs with no GPMU are: A505/A506/A510 (usually no ZAP firmware) A508/A509/A512 (usually with ZAP firmware) Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Rob Clark commit 3f3c8aff1f8f735b94d9f342be6f14de062b4c66 Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:44:01 2019 +0100 drm/msm/dsi: Add configuration for 8x76 MSM8976, MSM8976 and APQ variants have DSI version 3:10040002 (DSI 6G V1.4.2), featuring two DSIs. They need three clocks (mdp_core, iface, bus), one GDSC and two vregs, VDDA at 1.2V and VDDIO at 1.8V. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Rob Clark commit 332d6084d4f7e34f607c9159e3532a9ca27d8d46 Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:43:59 2019 +0100 drm/msm/dsi: Add configuration for 28nm PLL on family B The 28nm PLL has a different iospace on MSM/APQ family B SoCs: add a new configuration and use it when the DT reports the "qcom,dsi-phy-28nm-hpm-fam-b" compatible. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Rob Clark commit 1860f2a8b8b1c7007a175b207b0805d94a11caea Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:43:58 2019 +0100 drm/msm/mdp5: Add configuration for msm8x76 Add the configuration entries for the MDP5 v1.11, found on MSM8956, MSM8976 and APQ variants. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Rob Clark commit 2ab45a0973a86bfffaf2f0c49f49119ba5a6f4af Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:43:57 2019 +0100 dt-bindings: msm/mdp5: Document optional TBU and TBU_RT clocks These two clocks aren't present in all versions of the MDP5 HW: where present, they are needed to enable the Translation Buffer Unit(s). Signed-off-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Signed-off-by: Rob Clark commit 07066d9dc3d2326fbad8f7b0cb0120cff7b7dedb Author: Manjunath Patil Date: Sat Oct 5 08:20:03 2019 -0700 ixgbe: protect TX timestamping from API misuse HW timestamping can only be requested for a packet if the NIC is first setup via ioctl(SIOCSHWTSTAMP). If this step was skipped, then the ixgbe driver still allowed TX packets to request HW timestamping. In this situation, we see 'clearing Tx Timestamp hang' noise in the log. Fix this by checking that the NIC is configured for HW TX timestamping before accepting a HW TX timestamping request. Similar-to: commit 26bd4e2db06b ("igb: protect TX timestamping from API misuse") commit 0a6f2f05a2f5 ("igb: Fix a test with HWTSTAMP_TX_ON") Signed-off-by: Manjunath Patil Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 739e6b4a837485f21900c97f2ec0e0ddfaa6aea5 Author: Jacob Keller Date: Thu Sep 26 14:29:04 2019 -0700 fm10k: update driver version to match out-of-tree An upcoming out-of-tree release will be occurring which will include the recent functionality to support virtual function statistics. Update the kernel driver version to match this. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 780e354dcdb911351c624e11a86e9b3155d4e7ab Author: Alexander Duyck Date: Fri Sep 20 17:18:50 2019 -0700 ixgbe: Make use of cpumask_local_spread to improve RSS locality This patch is meant to address locality issues present in the ixgbe driver when it is loaded on a system supporting multiple NUMA nodes and more CPUs then the device can map in a 1:1 fashion. Instead of just arbitrarily mapping itself to CPUs 0-62 it would make much more sense to map itself to the local CPUs first, and then map itself to any remaining CPUs that might be used. The first effect of this is that queue 0 should always be allocated on the local CPU/NUMA node. This is important as it is the default destination if a packet doesn't match any existing flow director filter or RSS rule and as such having it local should help to reduce QPI cross-talk in the event of an unrecognized traffic type. In addition this should increase the likelihood of the RSS queues being allocated and used on CPUs local to the device while the ATR/Flow Director queues would be able to route traffic directly to the CPU that is likely to be processing it. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 0e100440e24b365ea3ba81777666ee9030ecfd00 Author: Jacob Keller Date: Tue Aug 20 14:19:21 2019 -0700 fm10k: add support for ndo_get_vf_stats operation Support capturing and reporting statistics for all of the VFs associated with a given PF device via the ndo_get_vf_stats callback. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1df96ca7e001f08cb347a022e0a6a3e45869dd21 Author: Jacob Keller Date: Tue Feb 19 14:26:27 2019 -0800 fm10k: add missing field initializers to TLV attributes) Add the missing field initializers for a couple of the TLV attribute macros. This resolves the last few -Wmissing-field-initializers warnings for the fm10k Linux driver. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 23b44513c3e6f999fb9ddc2874979317d8329e96 Author: Maciej Fijalkowski Date: Thu Oct 24 01:11:25 2019 -0700 ice: allow 3k MTU for XDP At this point ice driver is able to work on order 1 pages that are split onto two 3k buffers. Let's reflect that when user is setting new MTU size and XDP is present on interface. Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 446e693ca30b7c7c2aaeaf09e90ec224c7538fec Author: Cyrill Gorcunov Date: Fri Nov 1 16:01:53 2019 +0300 x86/fpu: Use XFEATURE_FP/SSE enum values instead of hardcoded numbers When setting up sizes and offsets for legacy header entries the code uses hardcoded 0/1 instead of the corresponding enum values XFEATURE_FP and XFEATURE_SSE. Replace the hardcoded numbers which enhances readability of the code and also makes this code the first user of those enum values.. Signed-off-by: Cyrill Gorcunov Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20191101130153.GG1615@uranus.lan commit aaf27254fdf9054c00cf2a9c479a52a16204d768 Author: Maciej Fijalkowski Date: Thu Oct 24 01:11:24 2019 -0700 ice: add build_skb() support Driver is now prepared for building the skb around the existing Rx buffer, so introduce the ice_build_skb responsible for it. Make use of XDP's data_meta as well. I've observed around 30% less CPU consumption with build_skb Rx path, in comparison to legacy Rx. What stands behind such result is the avoidance of flow_dissector (which we were diving into via eth_get_headlen) and no memcpy calls. Signed-off-by: Maciej Fijalkowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 59bb08080557589aaf577a99d329ccea38b55c95 Author: Maciej Fijalkowski Date: Thu Oct 24 01:11:23 2019 -0700 ice: introduce frame padding computation logic Take into account the underlying architecture specific settings and based on that calculate the possible padding that can be supplied. Typically, for x86 and standard MTU size we will end up with 192 bytes of headroom. This is the same behavior as our other drivers have and we can dedicate it for XDP purposes. Furthermore, introduce the Rx ring flag for indicating whether build_skb is used on particular. Based on that invoke the routines for padding calculation. Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7237f5b0dba443756e190bdbecd83f9b1377a912 Author: Maciej Fijalkowski Date: Thu Oct 24 01:11:22 2019 -0700 ice: introduce legacy Rx flag Add an ethtool "legacy-rx" priv flag for toggling the Rx path. This control knob will be mainly used for build_skb usage as well as buffer size/MTU manipulation. In preparation for adding build_skb support in a way that it takes care of how we set the values of max_frame and rx_buf_len fields of struct ice_vsi. Specifically, in this patch mentioned fields are set to values that will allow us to provide headroom and tailroom in-place. This can be mostly broken down onto following: - for legacy-rx "on" ethtool control knob, old behaviour is kept; - for standard 1500 MTU size configure the buffer of size 1536, as network stack is expecting the NET_SKB_PAD to be provided and NET_IP_ALIGN can have a non-zero value (these can be typically equal to 32 and 2, respectively); - for larger MTUs go with max_frame set to 9k and configure the 3k buffer in case when PAGE_SIZE of underlying arch is less than 8k; 3k buffer is implying the need for order 1 page, so that our page recycling scheme can still be applied; With that said, substitute the hardcoded ICE_RXBUF_2048 and PAGE_SIZE values in DMA API that we're making use of with rx_ring->rx_buf_len and ice_rx_pg_size(rx_ring). The latter is an introduced helper for determining the page size based on its order (which was figured out via ice_rx_pg_order). Last but not least, take care of truesize calculation. In the followup patch the headroom/tailroom computation logic will be introduced. This change aligns the buffer and frame configuration with other Intel drivers, most importantly with iavf. Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c08550510ca26bd57eabfe912281635e382193e5 Author: Cyrill Gorcunov Date: Fri Nov 1 15:42:28 2019 +0300 x86/fpu: Shrink space allocated for xstate_comp_offsets commit 8ff925e10f2c ("x86/xsaves: Clean up code in xstate offsets computation in xsave area") introduced an allocation of 64 entries for xstate_comp_offsets while the code only handles up to XFEATURE_MAX entries. For this reason xstate_offsets and xstate_sizes are already defined with the explicit XFEATURE_MAX limit. Do the same for compressed format for consistency sake. As the changelog of that commit is not giving any information it's assumed that the main idea was to cover all possible bits in xfeatures_mask, but this doesn't explain why other variables such as the non-compacted offsets and sizes are explicitely limited to XFEATURE_MAX. For consistency it's better to use the XFEATURE_MAX limit everywhere and extend it on demand when new features get implemented at the hardware level and subsequently supported by the kernel. Signed-off-by: Cyrill Gorcunov Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20191101124228.GF1615@uranus.lan commit 58db103784994e9be5322237df7ef0cf4c0afc39 Author: Cyrill Gorcunov Date: Fri Nov 1 15:38:50 2019 +0300 x86/fpu: Update stale variable name in comment When the fpu code was reworked pcntxt_mask was renamed to xfeatures_mask. Reflect it in the comment as well. Signed-off-by: Cyrill Gorcunov Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20191101123850.GE1615@uranus.lan commit 9c7db4947506eed0e2346d8ada701d50a400fbbd Author: Rikard Falkeborn Date: Mon Nov 4 11:12:51 2019 -0700 coresight: etm4x: Fix BMVAL misuse The second argument should be the lsb and the third argument should be the msb. Signed-off-by: Rikard Falkeborn Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-15-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit edda32dabedb01f98b9d7b9a4492c13357834bbe Author: Yabin Cui Date: Mon Nov 4 11:12:50 2019 -0700 coresight: Serialize enabling/disabling a link device. When tracing etm data of multiple threads on multiple cpus through perf interface, some link devices are shared between paths of different cpus. It creates race conditions when different cpus wants to enable/disable the same link device at the same time. Example 1: Two cpus want to enable different ports of a coresight funnel, thus calling the funnel enable operation at the same time. But the funnel enable operation isn't reentrantable. Example 2: For an enabled coresight dynamic replicator with refcnt=1, one cpu wants to disable it, while another cpu wants to enable it. Ideally we still have an enabled replicator with refcnt=1 at the end. But in reality the result is uncertain. Since coresight devices claim themselves when enabled for self-hosted usage, the race conditions above usually make the link devices not usable after many cycles. To fix the race conditions, this patch uses spinlocks to serialize enabling/disabling link devices. Fixes: a06ae8609b3d ("coresight: add CoreSight core layer framework") Signed-off-by: Yabin Cui Signed-off-by: Mathieu Poirier Cc: stable # 5.3 Link: https://lore.kernel.org/r/20191104181251.26732-14-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit f08d688223b04e16d259fea547ae15ecc6c44293 Author: Mark Brown Date: Mon Nov 4 11:12:49 2019 -0700 coresight: Add explicit architecture dependency Coresight hardware is only likely to appear on Arm systems and currently the core code has Arm-specific barrier operations in it so can't be built anywhere else so add an explicit dependency saying so. This will make no practical difference currently due to the way subsystems are referenced, the subsystem is only pulled in on arm and arm64, so mainly serves as documentation in case someone wants to increase build coverage. Signed-off-by: Mark Brown Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-13-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit ebddaad09e1067408c921c6919a1f6ad7eb3e646 Author: Mike Leach Date: Mon Nov 4 11:12:48 2019 -0700 coresight: etm4x: Add missing single-shot control API to sysfs An API to control single-shot comparator operation was missing from sysfs. This adds the parameters to sysfs to allow programming of this feature. Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-12-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit a578427de5b2bb7ac52f807505a6bea7fff93d4b Author: Mike Leach Date: Mon Nov 4 11:12:47 2019 -0700 coresight: etm4x: Add view comparator settings API to sysfs. Currently it is not possible to view the current settings of a given address comparator without knowing what type it is set to. For example, if a comparator is set as an addr_start comparator, attempting to read addr_stop for the same index will result in an error. addr_cmp_view is added to allow the user to see the current settings of the indexed address comparator without resorting to trial and error when the set type is not known. Signed-off-by: Mike Leach Reviewed-by: Leo Yan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-11-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3e12d3b01324a077a6313327d414a698584ef8c3 Author: Mike Leach Date: Mon Nov 4 11:12:46 2019 -0700 coresight: etm4x: Improve usability of sysfs - CID and VMID masks. Context ID and VM ID masks required 2 value inputs, even when the second value is ignored as insufficient CID / VMID comparators are implemented. Permit a single value to be used if that is sufficient to cover all implemented comparators. Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-10-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit c2431fed288a4a5771dc6470366c07fb42c691ef Author: Mike Leach Date: Mon Nov 4 11:12:45 2019 -0700 coresight: etm4x: Improve usability of sysfs - include/exclude addr. Setting include / exclude on a range had to be done by setting the bit in 'mode' before setting the range. However, setting this bit also had the effect of altering the current range as well. Changed to only set include / exclude setting of a range at the point of setting that range. Either use a 3rd input parameter as the include exclude value, or if not present use the current value of 'mode'. Do not change current range when 'mode' changes. Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-9-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1b6b0e087fc7c63ebaf9f78c69c7fdecb5fa8cd0 Author: Mike Leach Date: Mon Nov 4 11:12:44 2019 -0700 coresight: etm4x: Fix issues with start-stop logic. Fixes the following issues when using the ETMv4 start-stop logic. 1) Setting a start or a stop address should not automatically set the start-stop status to 'on'. The value set by the user in 'mode' must be respected or start instances could be missed. 2) Missing API for controlling TRCVIPCSSCTLR - start stop control by PE comparators. 3) Default ETM configuration sets a trace all range, and correctly sets the start-stop status bit. This was not being correctly reflected in the 'mode' parameter. Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-8-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 75198a7d4c0c3ee75f81ee2dbe908d9082ab4206 Author: Mike Leach Date: Mon Nov 4 11:12:43 2019 -0700 coresight: etm4x: Add missing API to set EL match on address filters TRCACATRn registers have match bits for secure and non-secure exception levels which are not accessible by the sysfs API. This adds a new sysfs parameter to enable this - addr_exlevel_s_ns. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-7-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2fe6899e36aa174abefd017887f9cfe0cb60c43a Author: Mike Leach Date: Mon Nov 4 11:12:42 2019 -0700 coresight: etm4x: Fix input validation for sysfs. A number of issues are fixed relating to sysfs input validation:- 1) bb_ctrl_store() - incorrect compare of bit select field to absolute value. Reworked per ETMv4 specification. 2) seq_event_store() - incorrect mask value - register has two event values. 3) cyc_threshold_store() - must mask with max before checking min otherwise wrapped values can set illegal value below min. 4) res_ctrl_store() - update to mask off all res0 bits. Reviewed-by: Leo Yan Reviewed-by: Mathieu Poirier Signed-off-by: Mike Leach Fixes: a77de2637c9eb ("coresight: etm4x: moving sysFS entries to a dedicated file") Cc: stable # 4.9+ Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 057f2c57b08d0a7e87b022d05b1d4f7173bd4735 Author: Mike Leach Date: Mon Nov 4 11:12:41 2019 -0700 coresight: etm4x: Fixes for ETM v4.4 architecture updates. ETMv4.4 adds in support for tracing secure EL2 (per arch 8.x updates). Patch accounts for this new capability. Signed-off-by: Mike Leach Reviewed-by: Leo Yan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-5-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0373d90639ef45c419d14131c3037436b05c4243 Author: Tanmay Vilas Kumar Jagdale Date: Mon Nov 4 11:12:40 2019 -0700 coresight: etm4x: Add support for ThunderX2 Add ETMv4 periperhal ID for Marvell's ThunderX2 chip. This chip contains ETMv4.1 version. Signed-off-by: Tanmay Vilas Kumar Jagdale Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit b7909065e8ebaffd80375d01f5d151ff59b59ce6 Author: Andrew Murray Date: Mon Nov 4 11:12:39 2019 -0700 dt-bindings: arm: coresight: Add support for coresight-loses-context-with-cpu Some coresight components, because of choices made during hardware integration, require their state to be saved and restored across CPU low power states. The software has no reliable method of detecting when save/restore is required thus let's add a binding to inform the kernel. Signed-off-by: Andrew Murray Reviewed-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Reviewed-by: Rob Herring Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit f188b5e76aae9f713c73708d2ba57b65953ce207 Author: Andrew Murray Date: Mon Nov 4 11:12:38 2019 -0700 coresight: etm4x: Save/restore state across CPU low power states Some hardware will ignore bit TRCPDCR.PU which is used to signal to hardware that power should not be removed from the trace unit. Let's mitigate against this by conditionally saving and restoring the trace unit state when the CPU enters low power states. This patchset introduces a firmware property named 'arm,coresight-loses-context-with-cpu' - when this is present the hardware state will be conditionally saved and restored. A module parameter 'pm_save_enable' is also introduced which can be configured to override the firmware property. This can be set to never allow save/restore or to conditionally allow it (only for self-hosted). The default value is determined by firmware. We avoid saving the hardware state when self-hosted coresight isn't in use to reduce PM latency - we can't determine this by reading the claim tags (TRCCLAIMCLR) as these are 'trace' registers which need power and clocking, something we can't easily provide in the PM context. Therefore we rely on the existing drvdata->mode internal state that is set when self-hosted coresight is used (and powered). Signed-off-by: Andrew Murray Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 74ce3e41274805e4a5598f4d98ee4d5160466d07 Author: Heikki Krogerus Date: Mon Nov 4 17:24:35 2019 +0300 usb: typec: ucsi: Optimise ucsi_unregister() There is no need to reset the PPM when the interface is unregistered. Quietly silencing the notifications and then unregistering everything is enough. This speeds up ucsi_unregister() a lot. Signed-off-by: Heikki Krogerus Tested-by: Ajay Gupta Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-19-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e716bb38edb44b6a7dd9b825f57450118b3066ae Author: Heikki Krogerus Date: Mon Nov 4 17:24:34 2019 +0300 usb: typec: ucsi: New error codes Adding new error codes to the driver that were introduced in UCSI specification v1.1. Signed-off-by: Heikki Krogerus Tested-by: Ajay Gupta Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-18-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3cf657f07918bc2d9295bf896a71bd31e407bb0c Author: Heikki Krogerus Date: Mon Nov 4 17:24:33 2019 +0300 usb: typec: ucsi: Remove all bit-fields We can't use bit fields with data that is received or send to/from the device. Signed-off-by: Heikki Krogerus Tested-by: Ajay Gupta Link: https://lore.kernel.org/r/20191104142435.29960-17-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 470ce43a1a810117f09aa4bcad6ca2be6b29c8d1 Author: Heikki Krogerus Date: Mon Nov 4 17:24:32 2019 +0300 usb: typec: ucsi: Remove struct ucsi_control That data structure was used for constructing the commands before executing them, but it was never really useful. Using the structure just complicated the driver. The commands are 64-bit wide, so it is enough to simply fill a u64 variable. No data structures needed. This simplifies the driver considerable and makes it much easier to for example add support for big endian systems later on. Signed-off-by: Heikki Krogerus Tested-by: Ajay Gupta Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-16-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2ede55468ca8cc236da66579359c2c406d4c1cba Author: Heikki Krogerus Date: Mon Nov 4 17:24:31 2019 +0300 usb: typec: ucsi: Remove the old API The drivers now only use the new API, so removing the old one. Signed-off-by: Heikki Krogerus Tested-by: Ajay Gupta Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-15-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e32fd989ac1c45f993fbe89ad0a89aa9ea6993d2 Author: Heikki Krogerus Date: Mon Nov 4 17:24:30 2019 +0300 usb: typec: ucsi: ccg: Move to the new API Replacing the old "cmd" and "sync" callbacks with an implementation of struct ucsi_operations. The interrupt handler will from now on read the CCI (Command Status and Connector Change Indication) register, and call ucsi_connector_change() function and/or complete pending command completions based on it. Signed-off-by: Heikki Krogerus Tested-by: Ajay Gupta Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-14-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f56de278e8ec963637995944156527162dcf3021 Author: Heikki Krogerus Date: Mon Nov 4 17:24:29 2019 +0300 usb: typec: ucsi: acpi: Move to the new API Replacing the old "cmd" and "sync" callbacks with an implementation of struct ucsi_operations. The ACPI notification (interrupt) handler will from now on read the CCI (Command Status and Connector Change Indication) register, and call ucsi_connector_change() function and/or complete pending command completions based on it. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-13-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d80a4ac20800035c46a3868ad9e11ebda0049c7d Author: Abhishek Goel Date: Thu Oct 17 00:56:39 2019 -0500 cpupower : Handle set and info subcommands correctly Cpupower tool has set and info options which are being used only by x86 machines. This patch removes support for these two subcommands from cpupower utility for POWER. Thus, these two subcommands will now be available only for intel. This removes the ambiguous error message while using set option in case of using non-intel systems. Without this patch on a POWER system: root@ubuntu:~# cpupower info System does not support Intel's performance bias setting root@ubuntu:~# cpupower set -b 10 Error setting perf-bias value on CPU With this patch on a POWER box: root@ubuntu:~# cpupower info Subcommand not supported on POWER Same result for set subcommand. This patch does not affect results on a intel box. Signed-off-by: Abhishek Goel Acked-by: Thomas Renninger Reviewed-by: Shuah Khan Signed-off-by: Shuah Khan commit 2d4238f5569722197612656163d824098208519c Author: Krzysztof Kazimierczak Date: Mon Nov 4 09:38:56 2019 -0800 ice: Add support for AF_XDP Add zero copy AF_XDP support. This patch adds zero copy support for Tx and Rx; code for zero copy is added to ice_xsk.h and ice_xsk.c. For Tx, implement ndo_xsk_wakeup. As with other drivers, reuse existing XDP Tx queues for this task, since XDP_REDIRECT guarantees mutual exclusion between different NAPI contexts based on CPU ID. In turn, a netdev can XDP_REDIRECT to another netdev with a different NAPI context, since the operation is bound to a specific core and each core has its own hardware ring. For Rx, allocate frames as MEM_TYPE_ZERO_COPY on queues that AF_XDP is enabled. Signed-off-by: Krzysztof Kazimierczak Co-developed-by: Maciej Fijalkowski Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen Signed-off-by: Jeff Kirsher commit 205577ab6f7ade6185f764ed78fb6875dca40205 Author: Robin Murphy Date: Fri Oct 25 19:08:36 2019 +0100 iommu/io-pgtable-arm: Rationalise MAIR handling Between VMSAv8-64 and the various 32-bit formats, there is either one 64-bit MAIR or a pair of 32-bit MAIR0/MAIR1 or NMRR/PMRR registers. As such, keeping two 64-bit values in io_pgtable_cfg has always been overkill. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 5fb190b0b52552de880536d4f409c4300c25e3d4 Author: Robin Murphy Date: Fri Oct 25 19:08:35 2019 +0100 iommu/io-pgtable-arm: Simplify level indexing The nature of the LPAE format means that data->pg_shift is always redundant with data->bits_per_level, since they represent the size of a page and the number of PTEs per page respectively, and the size of a PTE is constant. Thus it works out more efficient to only store the latter, and derive the former via a trivial addition where necessary. Signed-off-by: Robin Murphy [will: Reworked granule check in iopte_to_paddr()] Signed-off-by: Will Deacon commit 0891d6d4b1fe1becf1a77353b03449955820084b Author: Krzysztof Kazimierczak Date: Mon Nov 4 09:38:56 2019 -0800 ice: Move common functions to ice_txrx_lib.c In preparation of AF XDP, move functions that will be used both by skb and zero-copy paths to a new file called ice_txrx_lib.c. This allows us to avoid using ifdefs to control the staticness of said functions. Move other functions (ice_rx_csum, ice_rx_hash and ice_ptype_to_htype) called only by the moved ones to the new file as well. Signed-off-by: Krzysztof Kazimierczak Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b6520fce073b619e6f2c0d510bb3481c9386c70b Author: Kristian Evensen Date: Thu Sep 26 12:06:45 2019 +0200 netfilter: ipset: Add wildcard support to net,iface The net,iface equal functions currently compares the full interface names. In several cases, wildcard (or prefix) matching is useful. For example, when converting a large iptables rule-set to make use of ipset, I was able to significantly reduce the number of set elements by making use of wildcard matching. Wildcard matching is enabled by adding "wildcard" when adding an element to a set. Internally, this causes the IPSET_FLAG_IFACE_WILDCARD-flag to be set. When this flag is set, only the initial part of the interface name is used for comparison. Wildcard matching is done per element and not per set, as there are many cases where mixing wildcard and non-wildcard elements are useful. This means that is up to the user to handle (avoid) overlapping interface names. Signed-off-by: Kristian Evensen Signed-off-by: Jozsef Kadlecsik commit 56c1291ee48b4da2a70aa116098c2afc4a54783b Author: Daniel Borkmann Date: Mon Nov 4 15:27:02 2019 +0100 bpf: re-fix skip write only files in debugfs Commit 5bc60de50dfe ("selftests: bpf: Don't try to read files without read permission") got reverted as the fix was not working as expected and real fix came in via 8101e069418d ("selftests: bpf: Skip write only files in debugfs"). When bpf-next got merged into net-next, the test_offload.py had a small conflict. Fix the resolution in ae8a76fb8b5d iby not reintroducing 5bc60de50dfe again. Fixes: ae8a76fb8b5d ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next") Signed-off-by: Daniel Borkmann Cc: Jakub Kicinski Cc: Alexei Starovoitov Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit c79278c185c8848fefc25cf304eecec9c4623a40 Author: Robin Murphy Date: Fri Oct 25 19:08:34 2019 +0100 iommu/io-pgtable-arm: Simplify PGD size handling We use data->pgd_size directly for the one-off allocation and freeing of the top-level table, but otherwise it serves for ARM_LPAE_PGD_IDX() to repeatedly re-calculate the effective number of top-level address bits it represents. Flip this around so we store the form we most commonly need, and derive the lesser-used one instead. This cuts a whole bunch of code out of the map/unmap/iova_to_phys fast-paths. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 594ab90fc46c0842e4f1b60b6642fa4555a999f9 Author: Robin Murphy Date: Fri Oct 25 19:08:33 2019 +0100 iommu/io-pgtable-arm: Simplify start level lookup Beyond a couple of allocation-time calculations, data->levels is only ever used to derive the start level. Storing the start level directly leads to a small reduction in object code, which should help eke out a little more efficiency, and slightly more readable source to boot. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 67f3e53d2a37ab27b00610eb25724103055beafc Author: Robin Murphy Date: Fri Oct 25 19:08:32 2019 +0100 iommu/io-pgtable-arm: Simplify bounds checks We're merely checking that the relevant upper bits of each address are all zero, so there are cheaper ways to achieve that. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit f7b90d2c7422a815c094961751582347935045cd Author: Robin Murphy Date: Fri Oct 25 19:08:31 2019 +0100 iommu/io-pgtable-arm: Rationalise size check It makes little sense to only validate the requested size after we think we've found a matching block size - making the check up-front is simple, and far more logical than waiting to walk off the bottom of the table to infer that we must have been passed a bogus size to start with. We're missing an equivalent check on the unmap path, so add that as well for consistency. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit b5813c164ec82790be892b0f8e79cf080a503706 Author: Robin Murphy Date: Fri Oct 25 19:08:30 2019 +0100 iommu/io-pgtable: Make selftest gubbins consistently __init The selftests run as an initcall, but the annotation of the various callbacks and data seems to be somewhat arbitrary. Add it consistently for everything related to the selftests. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit db22a9de7a785fd3e0e066b02c269d6bdf453aec Merge: 759aaa10c76c 1be08f458d16 Author: Will Deacon Date: Mon Nov 4 19:33:59 2019 +0000 Merge branch 'for-joerg/arm-smmu/fixes' into for-joerg/arm-smmu/updates Merge in ARM SMMU fixes to avoid conflicts in the ARM io-pgtable code. * for-joerg/arm-smmu/fixes: iommu/io-pgtable-arm: Support all Mali configurations iommu/io-pgtable-arm: Correct Mali attributes iommu/arm-smmu: Free context bitmap in the err path of arm_smmu_init_domain_context commit 54e0602d796ceb20b292e9d364046b6b2724f735 Author: Christophe Roullier Date: Mon Nov 4 11:51:00 2019 +0100 net: ethernet: stmmac: drop unused variable in stm32mp1_set_mode() Building with W=1 (cf.scripts/Makefile.extrawarn) outputs: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Drop the unused 'ret' variable. Signed-off-by: Christophe Roullier Signed-off-by: David S. Miller commit 369a782af0f1a9acf81d6fe8de44c8ee02be0f3a Author: Thomas Bogendoerfer Date: Mon Nov 4 11:45:15 2019 +0100 net: sgi: ioc3-eth: ensure tx ring is 16k aligned. IOC3 hardware needs a 16k aligned TX ring. Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 7ca2c4c2ca9e09d6be888baca61a10891ea93bda Author: Christoph Hellwig Date: Mon Nov 4 11:45:14 2019 +0100 net: sgi: ioc3-eth: fix setting NETIF_F_HIGHDMA Set NETIF_F_HIGHDMA together with the NETIF_F_IP_CSUM flag instead of letting the second assignment overwrite it. Probably doesn't matter in practice as none of the systems an IOC3 is usually found in has highmem to start with. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 051a07ec7a3def775c599547e5ce69bd59c43794 Author: Christoph Hellwig Date: Mon Nov 4 11:45:13 2019 +0100 net: sgi: ioc3-eth: simplify setting the DMA mask There is no need to fall back to a lower mask these days, the DMA mask just communicates the hardware supported features. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 59511bcf33f95e2bcf1100e8fde31e2d4a15f3a0 Author: Christoph Hellwig Date: Mon Nov 4 11:45:12 2019 +0100 net: sgi: ioc3-eth: fix usage of GFP_* flags dma_alloc_coherent always zeroes memory, there is no need for __GFP_ZERO. Also doing a GFP_ATOMIC allocation just before a GFP_KERNEL one is clearly bogus. Fixes: ed870f6a7aa2 ("net: sgi: ioc3-eth: use dma-direct for dma allocations") Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 4dd147471dae02e21db317fff02b7cf98694b22f Author: Christoph Hellwig Date: Mon Nov 4 11:45:11 2019 +0100 net: sgi: ioc3-eth: don't abuse dma_direct_* calls dma_direct_ is a low-level API that must never be used by drivers directly. Switch to use the proper DMA API instead. Fixes: ed870f6a7aa2 ("net: sgi: ioc3-eth: use dma-direct for dma allocations") Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit b6b556afd21b48a372be8ed0c0f79428022e1b7c Author: Eric Dumazet Date: Sun Nov 3 18:24:16 2019 -0800 ipv6: use jhash2() in rt6_exception_hash() Faster jhash2() can be used instead of jhash(), since IPv6 addresses have the needed alignment requirement. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 0c65b2b90d13c1deaee6449304dd367c5d4eb8ae Author: Andrew Lunn Date: Mon Nov 4 02:40:33 2019 +0100 net: of_get_phy_mode: Change API to solve int/unit warnings Before this change of_get_phy_mode() returned an enum, phy_interface_t. On error, -ENODEV etc, is returned. If the result of the function is stored in a variable of type phy_interface_t, and the compiler has decided to represent this as an unsigned int, comparision with -ENODEV etc, is a signed vs unsigned comparision. Fix this problem by changing the API. Make the function return an error, or 0 on success, and pass a pointer, of type phy_interface_t, where the phy mode should be stored. v2: Return with *interface set to PHY_INTERFACE_MODE_NA on error. Add error checks to all users of of_get_phy_mode() Fixup a few reverse christmas tree errors Fixup a few slightly malformed reverse christmas trees v3: Fix 0-day reported errors. Reported-by: Dan Carpenter Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 5d1fcaf35d74b4188d238e46f0be37c14a01f169 Author: Nikolay Aleksandrov Date: Mon Nov 4 11:36:51 2019 +0200 net: bridge: fdb: eliminate extra port state tests from fast-path When commit df1c0b8468b3 ("[BRIDGE]: Packets leaking out of disabled/blocked ports.") introduced the port state tests in br_fdb_update() it was to avoid learning/refreshing from STP BPDUs, it was also used to avoid learning/refreshing from user-space with NTF_USE. Those two tests are done for every packet entering the bridge if it's learning, but for the fast-path we already have them checked in br_handle_frame() and is unnecessary to do it again. Thus push the checks to the unlikely cases and drop them from br_fdb_update(), the new nbp_state_should_learn() helper is used to determine if the port state allows br_fdb_update() to be called. The two places which need to do it manually are: - user-space add call with NTF_USE set - link-local packet learning done in __br_handle_local_finish() Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit dece3c2a320b0a6d891da6ff774ab763969b6860 Author: Tiezhu Yang Date: Mon Nov 4 21:33:50 2019 +0800 MIPS: Loongson: Fix return value of loongson_hwmon_init When call function hwmon_device_register failed, use the actual return value instead of always -ENOMEM. Fixes: 64f09aa967e1 ("MIPS: Loongson-3: Add CPU Hwmon platform driver") Signed-off-by: Tiezhu Yang Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit efc2214b6047b6f5b4ca53151eba62521b9452d6 Author: Maciej Fijalkowski Date: Mon Nov 4 09:38:56 2019 -0800 ice: Add support for XDP Add support for XDP. Implement ndo_bpf and ndo_xdp_xmit. Upon load of an XDP program, allocate additional Tx rings for dedicated XDP use. The following actions are supported: XDP_TX, XDP_DROP, XDP_REDIRECT, XDP_PASS, and XDP_ABORTED. Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7705dc8557973d8ad8f10840f61d8ec805695e9e Author: Kees Cook Date: Tue Oct 29 14:13:51 2019 -0700 x86/vmlinux: Use INT3 instead of NOP for linker fill bytes Instead of using 0x90 (NOP) to fill bytes between functions, which makes it easier to sloppily target functions in function pointer overwrite attacks, fill with 0xCC (INT3) to force a trap. Also drop the space between "=" and the value to better match the binutils documentation https://sourceware.org/binutils/docs/ld/Output-Section-Fill.html#Output-Section-Fill Example "objdump -d" before: ... ffffffff810001e0 : ffffffff810001e0: 48 8b 25 e1 b1 51 01 mov 0x151b1e1(%rip),%rsp # ffffffff8251b3c8 ffffffff810001e7: e9 d5 fe ff ff jmpq ffffffff810000c1 ffffffff810001ec: 90 nop ffffffff810001ed: 90 nop ffffffff810001ee: 90 nop ffffffff810001ef: 90 nop ffffffff810001f0 <__startup_64>: ... After: ... ffffffff810001e0 : ffffffff810001e0: 48 8b 25 41 79 53 01 mov 0x1537941(%rip),%rsp # ffffffff82537b28 ffffffff810001e7: e9 d5 fe ff ff jmpq ffffffff810000c1 ffffffff810001ec: cc int3 ffffffff810001ed: cc int3 ffffffff810001ee: cc int3 ffffffff810001ef: cc int3 ffffffff810001f0 <__startup_64>: ... Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Ross Zwisler Cc: Segher Boessenkool Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-30-keescook@chromium.org commit e75d1b2c37319998c9d9756ba4ea50c731f56e12 Author: Maciej Fijalkowski Date: Thu Oct 24 01:11:18 2019 -0700 ice: get rid of per-tc flow in Tx queue configuration routines There's no reason for treating DCB as first class citizen when configuring the Tx queues and going through TCs. Reverse the logic and base the configuration logic on rings, which is the object of interest anyway. Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit eff380aaffedb279b69d160061e2c01f9df5da96 Author: Anirudh Venkataramanan Date: Thu Oct 24 01:11:17 2019 -0700 ice: Introduce ice_base.c Remove a few uses of kernel configuration flags from ice_lib.c by introducing a new source file ice_base.c. Also move corresponding function prototypes from ice_lib.h to ice_base.h and include ice_base.h where required. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit a329975491aafcb1fb6e2fad0de22cae5c16154f Author: Kees Cook Date: Tue Oct 29 14:13:50 2019 -0700 x86/mm: Report actual image regions in /proc/iomem The resource reservations in /proc/iomem made for the kernel image did not reflect the gaps between text, rodata, and data. Add the "rodata" resource and update the start/end calculations to match the respective calls to free_kernel_image_pages(). Before (booted with "nokaslr" for easier comparison): 00100000-bffd9fff : System RAM 01000000-01e011d0 : Kernel code 01e011d1-025619bf : Kernel data 02a95000-035fffff : Kernel bss After: 00100000-bffd9fff : System RAM 01000000-01e011d0 : Kernel code 02000000-023d4fff : Kernel rodata 02400000-025619ff : Kernel data 02a95000-035fffff : Kernel bss Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Dave Young Cc: David Howells Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Juergen Gross Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Robert Richter Cc: Segher Boessenkool Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-29-keescook@chromium.org commit 64fab7290dc3561729bbc1e35895a517eb2e549e Author: Prabhath Sajeepa Date: Mon Oct 28 16:56:48 2019 -0600 nvme: Fix parsing of ANA log page Check validity of offset into ANA log buffer before accessing nvme_ana_group_desc. This check ensures the size of ANA log buffer >= offset + sizeof(nvme_ana_group_desc) Reviewed-by: Sagi Grimberg Signed-off-by: Prabhath Sajeepa Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 716fd9c119a982c34af196fe9205d7a617f38e3e Author: Christoph Hellwig Date: Tue Oct 29 08:12:23 2019 +0100 nvmet: stop using bio_set_op_attrs bio_set_op_attrs has been long deprecated, replace it with a direct assignment of the flags to bio->bi_opf. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 9dea0c81ee4a7b5d8e5bc0d4cfa2ee4f0e7b13f0 Author: Christoph Hellwig Date: Mon Oct 28 11:23:26 2019 -0700 nvmet: add plugging for read/write when ns is bdev With reference to the following issue reported on the mailing list :- http://lists.infradead.org/pipermail/linux-nvme/2019-October/027604.html this patch adds plugging for the bdev-ns under nvmet_bdev_execute_rw(). We can see the following performance improvement in random write workload I/Os with the setup described in the link when device_path configured as /dev/md0. Without this patch :-   write: IOPS=40.8k, BW=159MiB/s (167MB/s)(4777MiB/30002msec)   write: IOPS=41.2k, BW=161MiB/s (169MB/s)(4831MiB/30011msec)     slat (usec): min=8,  max=10823, avg=15.64,  stdev=16.85     slat (usec): min=8,  max=401,   avg=15.40,  stdev= 9.56     clat (usec): min=54, max=2492,  avg=759.07, stdev=172.62     clat (usec): min=56, max=1997,  avg=768.06, stdev=178.72 With this patch :-   write: IOPS=123k, BW=480MiB/s (504MB/s)(14.1GiB/30011msec)   write: IOPS=123k, BW=481MiB/s (504MB/s)(14.1GiB/30002msec)     slat (usec): min=8,  max=9941,  avg=13.31,  stdev= 8.04     slat (usec): min=8,  max=289,   avg=13.31,  stdev= 3.37     clat (usec): min=43, max=17635, avg=245.46, stdev=171.23     clat (usec): min=44, max=17751, avg=245.25, stdev=183.14 Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Chaitanya Kulkarni Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit d84dd8cde6742054a2c802df841fa5aab5b99122 Author: Christoph Hellwig Date: Fri Oct 25 15:38:58 2019 +0200 nvmet: clean up command parsing a bit Move the special cases for fabrics commands and the discovery controller to nvmet_parse_admin_cmd in preparation for adding passthrough support. Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 05d3046ff755474557e885f38f85e9b2a032cec0 Author: Geert Uytterhoeven Date: Thu Oct 24 17:24:00 2019 +0200 nvme-pci: Spelling s/resdicovered/rediscovered/ Fix misspelling of "rediscovered". Signed-off-by: Geert Uytterhoeven Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit d4b3a1741130dfc812b0825db4cb1c61032da183 Author: Sagi Grimberg Date: Thu Oct 24 09:55:58 2019 -0700 nvmet: fill discovery controller sn, fr and mn correctly Discovery controllers need this information as well. Signed-off-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit be3f3114ddd58d12f64b872247bb1bc46df56b36 Author: Christoph Hellwig Date: Wed Oct 23 10:35:45 2019 -0600 nvmet: Open code nvmet_req_execute() Now that nvmet_req_execute does nothing, open code it. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig [split patch, update changelog] Signed-off-by: Logan Gunthorpe Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit e9061c397839eea34207668bfedce0a6c18c5015 Author: Christoph Hellwig Date: Wed Oct 23 10:35:44 2019 -0600 nvmet: Remove the data_len field from the nvmet_req struct Instead of storing the expected length and checking it when it's executed, just check the length inside the command themselves. A new helper, nvmet_check_data_len() is created to help with this check. Signed-off-by: Christoph Hellwig [split patch, udpate changelog] Signed-off-by: Logan Gunthorpe Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 59ef0eaa7741c3543f98220cc132c61bf0230bce Author: Christoph Hellwig Date: Wed Oct 23 10:35:43 2019 -0600 nvmet: Introduce nvmet_dsm_len() helper Similar to the nvmet_rw_len helper. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig [split patch, update changelog] Signed-off-by: Logan Gunthorpe Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 6f86f2c9d94d55c4d3a6f1ffbc2e1115b5cb38a8 Author: Christoph Hellwig Date: Wed Oct 23 10:35:42 2019 -0600 nvmet: Cleanup discovery execute handlers Push the lid and cns check into their respective handlers and, while we're at it, rename the functions to be consistent with other discovery handlers. Signed-off-by: Christoph Hellwig [split patch, update changelog] Signed-off-by: Logan Gunthorpe Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 2cb6963a16e9e114486decf591af7cb2d69cb154 Author: Christoph Hellwig Date: Wed Oct 23 10:35:41 2019 -0600 nvmet: Introduce common execute function for get_log_page and identify Instead of picking the sub-command handler to execute in a nested switch statement introduce a landing functions that calls out to the appropriate sub-command handler. This will allow us to have a common place in the handler to check the transfer length in a future patch. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig [split patch, update change log] Signed-off-by: Logan Gunthorpe Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit c73eebc07a0fc8f4ea0f69c65803595d6471bb47 Author: Logan Gunthorpe Date: Wed Oct 23 10:35:40 2019 -0600 nvmet-tcp: Don't set the request's data_len It's not apprporiate for the transports to set the data_len field of the request which is only used by the core. In this case, just use a variable on the stack to store the length of the sgl for comparison. Reviewed-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit e0bace71779d602e419a2f3b35f3bff2cfc638a3 Author: Logan Gunthorpe Date: Wed Oct 23 10:35:39 2019 -0600 nvmet-tcp: Don't check data_len in nvmet_tcp_map_data() None of the other transports check data_len which is verified in core code. The function should instead check that the sgl length is non-zero. Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit e08f2ae850929d40e66268ee47e443e7ea56eeb7 Author: Damien Le Moal Date: Mon Oct 21 12:40:04 2019 +0900 nvme: Introduce nvme_lba_to_sect() Introduce the new helper function nvme_lba_to_sect() to convert a device logical block number to a 512B sector number. Use this new helper in obvious places, cleaning up the code. Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 314d48dd224897e35ddcaf5a1d7d133b5adddeb7 Author: Damien Le Moal Date: Mon Oct 21 12:40:03 2019 +0900 nvme: Cleanup and rename nvme_block_nr() Rename nvme_block_nr() to nvme_sect_to_lba() and use SECTOR_SHIFT instead of its hard coded value 9. Also add a comment to decribe this helper. Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 48c9e85b23464a7d1e3ebd70b79cc3a2d97d3222 Author: Revanth Rajashekar Date: Mon Oct 14 11:16:07 2019 -0600 nvme: resync include/linux/nvme.h with nvmecli Update enumerations and structures in include/linux/nvme.h to resync with the nvmecli. All the updates are mentioned in the ratified NVMe 1.4 spec https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf Reviewed-by: Christoph Hellwig Signed-off-by: Revanth Rajashekar Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 16686f3a6c3cd6316dbc5cba886242c73f713237 Author: Max Gurtovoy Date: Sun Oct 13 19:57:36 2019 +0300 nvme: move common call to nvme_cleanup_cmd to core layer nvme_cleanup_cmd should be called for each call to nvme_setup_cmd (symmetrical functions). Move the call for nvme_cleanup_cmd to the common core layer and call it during nvme_complete_rq for the good flow. For error flow, each transport will call nvme_cleanup_cmd independently. Also take care of a special case of path failure, where we call nvme_complete_rq without doing nvme_setup_cmd. Signed-off-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 2dc3947b53f573e8a75ea9cbec5588df88ca502e Author: Max Gurtovoy Date: Sun Oct 13 19:57:35 2019 +0300 nvme: introduce "Command Aborted By host" status code Fix the status code of canceled requests initiated by the host according to TP4028 (Status Code 0x371): "Command Aborted By host: The command was aborted as a result of host action (e.g., the host disconnected the Fabric connection)." Also in a multipath environment, unless otherwise specified, errors of this type (path related) should be retried using a different path, if one is available. Signed-off-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 59534b9d606e7f566970a6f8621c6022f7c19ff1 Author: Israel Rukshin Date: Sun Oct 13 19:57:34 2019 +0300 nvmet-rdma: add unlikely check at nvmet_rdma_map_sgl_keyed The calls to nvmet_req_alloc_sgl and rdma_rw_ctx_init should usually succeed, so add this simple optimization to the fast path. Signed-off-by: Israel Rukshin Reviewed-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit e522f446027845e3c8b563d021f37e8f3d30c9d9 Author: Israel Rukshin Date: Sun Oct 13 19:57:33 2019 +0300 nvmet: add unlikely check at nvmet_req_alloc_sgl The call to sgl_alloc shouldn't fail so add this simple optimization to the fast path. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 4d764bb9a92bc63afc3befe36a0bedfddff1398a Author: Israel Rukshin Date: Sun Oct 13 19:57:32 2019 +0300 nvmet: use bio_io_error instead of duplicating it This commit doesn't change any logic. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 58a8df67e057e979e76f8dc881766da3f7137f99 Author: Israel Rukshin Date: Sun Oct 13 19:57:31 2019 +0300 nvme: introduce nvme_is_aen_req function This function improves code readability and reduces code duplication. Signed-off-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit bcde5f0fc7d318c98d4234b52bcc1a87fc2162d9 Author: James Smart Date: Fri Sep 27 14:27:22 2019 -0700 nvme-fc: ensure association_id is cleared regardless of a Disconnect LS Code today only clears the association_id if a Disconnect LS is transmit. Remove ambiguity and unconditionally clear the association_id if the association has been terminated. Signed-off-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 7db394848ece0e0706dfe8e4940b24e949f3b88f Author: James Smart Date: Fri Sep 27 15:27:11 2019 -0700 nvme-fc: clarify error messages Change wording on a couple of messages to clarify what happened. Signed-off-by: Ewan D. Milne Signed-off-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 44fbf3bb1ac3dbebc6bd07eb68abf2d0badfae65 Author: James Smart Date: Fri Sep 27 14:51:36 2019 -0700 nvme-fc: Set new cmd set indicator in nvme-fc cmnd iu Set the new category field in the FC-NVME CMND_IU based on queue number. Signed-off-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 53b2b2f59967c0b7eb4df265136b1cc25b9fb287 Author: James Smart Date: Fri Sep 27 14:51:35 2019 -0700 nvme-fc and nvmet-fc: sync with FC-NVME-2 header changes Sync sources with revised structure and field names to correspond with FC-NVME-2 header sync-up. Tested interoperability with success: - prior initiator with new target - prior target with new initiator - new on new Signed-off-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit f16583614222d015968541f2e50447c67c277f74 Author: James Smart Date: Fri Sep 27 14:51:34 2019 -0700 nvme-fc: Sync nvme-fc header to FC-NVME-2 Sync the header to FC-NVME-2 r1.06 (T11-2019-00210-v001). Includes some minor mods where pre-release field names changed by the time the spec was released. Signed-off-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 5494c3a6a0b965906ffdcb620d94079ea4cb69ea Author: Kees Cook Date: Tue Oct 29 14:13:49 2019 -0700 x86/mm: Report which part of kernel image is freed The memory freeing report wasn't very useful for figuring out which parts of the kernel image were being freed. Add the details for clearer reporting in dmesg. Before: Freeing unused kernel image memory: 1348K Write protecting the kernel read-only data: 20480k Freeing unused kernel image memory: 2040K Freeing unused kernel image memory: 172K After: Freeing unused kernel image (initmem) memory: 1348K Write protecting the kernel read-only data: 20480k Freeing unused kernel image (text/rodata gap) memory: 2040K Freeing unused kernel image (rodata/data gap) memory: 172K Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Thomas Gleixner Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-28-keescook@chromium.org commit 7252f1405df1634d798628847d87592de359fe47 Merge: a99d8080aaf3 6e001f6a4cc7 Author: Thomas Gleixner Date: Mon Nov 4 18:49:13 2019 +0100 Merge tag 'timers-v5.6' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent updates from Daniel Lezcano: - Some cleanups for the timer-of, use %p0F and the unique device name (Geert Uytterhoeven) - Use timer-of for the renesas-ostm and the device name to prevent name collision in case of multiple timers (Geert Uytterhoeven) - Check if there is an error after calling of_clk_get in asm9260 (Chuhong Yuan) commit 759aaa10c76cbaaefc0670410fb2d54cf4ec10cc Author: Vivek Gautam Date: Fri Sep 20 13:34:29 2019 +0530 iommu: arm-smmu-impl: Add sdm845 implementation hook Add reset hook for sdm845 based platforms to turn off the wait-for-safe sequence. Understanding how wait-for-safe logic affects USB and UFS performance on MTP845 and DB845 boards: Qcom's implementation of arm,mmu-500 adds a WAIT-FOR-SAFE logic to address under-performance issues in real-time clients, such as Display, and Camera. On receiving an invalidation requests, the SMMU forwards SAFE request to these clients and waits for SAFE ack signal from real-time clients. The SAFE signal from such clients is used to qualify the start of invalidation. This logic is controlled by chicken bits, one for each - MDP (display), IFE0, and IFE1 (camera), that can be accessed only from secure software on sdm845. This configuration, however, degrades the performance of non-real time clients, such as USB, and UFS etc. This happens because, with wait-for-safe logic enabled the hardware tries to throttle non-real time clients while waiting for SAFE ack signals from real-time clients. On mtp845 and db845 devices, with wait-for-safe logic enabled by the bootloaders we see degraded performance of USB and UFS when kernel enables the smmu stage-1 translations for these clients. Turn off this wait-for-safe logic from the kernel gets us back the perf of USB and UFS devices until we re-visit this when we start seeing perf issues on display/camera on upstream supported SDM845 platforms. The bootloaders on these boards implement secure monitor callbacks to handle a specific command - QCOM_SCM_SVC_SMMU_PROGRAM with which the logic can be toggled. There are other boards such as cheza whose bootloaders don't enable this logic. Such boards don't implement callbacks to handle the specific SCM call so disabling this logic for such boards will be a no-op. This change is inspired by the downstream change from Patrick Daly to address performance issues with display and camera by handling this wait-for-safe within separte io-pagetable ops to do TLB maintenance. So a big thanks to him for the change and for all the offline discussions. Without this change the UFS reads are pretty slow: $ time dd if=/dev/sda of=/dev/zero bs=1048576 count=10 conv=sync 10+0 records in 10+0 records out 10485760 bytes (10.0MB) copied, 22.394903 seconds, 457.2KB/s real 0m 22.39s user 0m 0.00s sys 0m 0.01s With this change they are back to rock! $ time dd if=/dev/sda of=/dev/zero bs=1048576 count=300 conv=sync 300+0 records in 300+0 records out 314572800 bytes (300.0MB) copied, 1.030541 seconds, 291.1MB/s real 0m 1.03s user 0m 0.00s sys 0m 0.54s Signed-off-by: Vivek Gautam Reviewed-by: Robin Murphy Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Sai Prakash Ranjan Signed-off-by: Will Deacon commit 5eb0e0e4f90addc6b79ebf1cb4b06b56b09f09de Author: Vivek Gautam Date: Fri Sep 20 13:34:28 2019 +0530 firmware/qcom_scm: Add scm call to handle smmu errata Qcom's smmu-500 needs to toggle wait-for-safe sequence to handle TLB invalidation sync's. Few firmwares allow doing that through SCM interface. Add API to toggle wait for safe from firmware through a SCM call. Signed-off-by: Vivek Gautam Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Acked-by: Andy Gross Signed-off-by: Sai Prakash Ranjan Signed-off-by: Will Deacon commit 1a5ea3b7a6ac6c133660b9aeda95b2087c8eec47 Author: Vivek Gautam Date: Fri Sep 20 13:34:27 2019 +0530 firmware: qcom_scm-64: Add atomic version of qcom_scm_call There are scnenarios where drivers are required to make a scm call in atomic context, such as in one of the qcom's arm-smmu-500 errata [1]. [1] ("https://source.codeaurora.org/quic/la/kernel/msm-4.9/ tree/drivers/iommu/arm-smmu.c?h=msm-4.9#n4842") Signed-off-by: Vivek Gautam Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Acked-by: Andy Gross Signed-off-by: Sai Prakash Ranjan Signed-off-by: Will Deacon commit ff34f3cce278a0982a7b66b1afaed6295141b1fc Author: Will Deacon Date: Mon Nov 4 15:58:15 2019 +0000 firmware: qcom: scm: Ensure 'a0' status code is treated as signed The 'a0' member of 'struct arm_smccc_res' is declared as 'unsigned long', however the Qualcomm SCM firmware interface driver expects to receive negative error codes via this field, so ensure that it's cast to 'long' before comparing to see if it is less than 0. Cc: Reviewed-by: Bjorn Andersson Signed-off-by: Will Deacon commit 2d0004d19829c84aaf2c7d48b5e2892d548970b6 Author: Kees Cook Date: Tue Oct 29 14:13:48 2019 -0700 x86/mm: Remove redundant address-of operators on addresses The &s on addresses are redundant. Remove them to match all the other similar functions. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Thomas Gleixner Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-27-keescook@chromium.org commit 94174c9b71c62a0e1a4364c2594e1422ba8fffcd Author: Kees Cook Date: Tue Oct 29 14:13:47 2019 -0700 xtensa: Move EXCEPTION_TABLE to RO_DATA segment Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Max Filippov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Chris Zankel Cc: Dave Hansen Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: linux-xtensa@linux-xtensa.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-26-keescook@chromium.org commit 4e9e559a0385930649c1c9cad703d475ee030206 Author: Kees Cook Date: Tue Oct 29 14:13:46 2019 -0700 powerpc: Move EXCEPTION_TABLE to RO_DATA segment Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-25-keescook@chromium.org commit f1d303a1b5dd75d18734a2ca56ca90691639a79d Author: Joakim Zhang Date: Mon Nov 4 07:09:24 2019 +0000 perf/imx_ddr: Dump AXI ID filter info to userspace caps/filter indicates whether HW supports AXI ID filter or not. caps/enhanced_filter indicates whether HW supports enhanced AXI ID filter or not. Users can check filter features from userspace with these attributions. Suggested-by: Will Deacon Signed-off-by: Joakim Zhang [will: reworked cap switch to be less error-prone] Signed-off-by: Will Deacon commit 6e85e23ef2d004def8e1acd36eb155411499b7cc Author: Kees Cook Date: Tue Oct 29 14:13:45 2019 -0700 parisc: Move EXCEPTION_TABLE to RO_DATA segment Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Helge Deller Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Sven Schnelle Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-24-keescook@chromium.org commit 067c650c456e758f933aaf87a202f841d34be269 Author: Pavel Modilaynen Date: Fri Jul 12 13:52:19 2019 +0200 dtc: Use pkg-config to locate libyaml Using Makefile's wildcard with absolute path to detect the presence of libyaml results in false-positive detection when cross-compiling e.g. in yocto environment. The latter results in build error: | scripts/dtc/yamltree.o: In function `yaml_propval_int': | yamltree.c: undefined reference to `yaml_sequence_start_event_initialize' | yamltree.c: undefined reference to `yaml_emitter_emit' | yamltree.c: undefined reference to `yaml_scalar_event_initialize' ... Use pkg-config to locate libyaml to address this scenario. Signed-off-by: Pavel Modilaynen [robh: silence stderr] Signed-off-by: Rob Herring commit 1ee1ffe1f0fb77fd3e86cb23acb0f81976e5dc3c Author: Geert Uytterhoeven Date: Fri Oct 25 11:22:15 2019 +0200 scripts/dtc: dtx_diff - add color output support Add new -c/--color options, to enhance the diff output with color, and improve the user's experience. Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Tested-by: Frank Rowand Signed-off-by: Rob Herring commit 3bda6f37a7949c803b84cf27e11a3995d900a179 Author: Kees Cook Date: Tue Oct 29 14:13:44 2019 -0700 microblaze: Move EXCEPTION_TABLE to RO_DATA segment Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-23-keescook@chromium.org commit 9b30e704dd0d9ef9d99c7f88712318840cc8a338 Author: Kees Cook Date: Tue Oct 29 14:13:43 2019 -0700 ia64: Move EXCEPTION_TABLE to RO_DATA segment Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Fenghua Yu Cc: Heiko Carstens Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Tony Luck Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-22-keescook@chromium.org commit 380e57e2d41e9631132beccac30058228dfd376f Author: Kees Cook Date: Tue Oct 29 14:13:42 2019 -0700 h8300: Move EXCEPTION_TABLE to RO_DATA segment Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: uclinux-h8-devel@lists.sourceforge.jp Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-21-keescook@chromium.org commit 1e51cd538809112a6ac702a48e9719a75152c902 Author: Kees Cook Date: Tue Oct 29 14:13:41 2019 -0700 c6x: Move EXCEPTION_TABLE to RO_DATA segment Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Aurelien Jacquiot Cc: Dave Hansen Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Mark Salter Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-20-keescook@chromium.org commit 19f6bc32c6f4216e099963f416de91eba7ca1430 Author: Kees Cook Date: Tue Oct 29 14:13:40 2019 -0700 arm64: Move EXCEPTION_TABLE to RO_DATA segment Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Also removes the redundant ALIGN, which is already present at the end of the RO_DATA macro. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Will Deacon Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Dave Hansen Cc: Heiko Carstens Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Peter Collingbourne Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-19-keescook@chromium.org commit 172c8b85dccf331826deda9ef6d7e75fa4f2b3e2 Author: Kees Cook Date: Tue Oct 29 14:13:39 2019 -0700 alpha: Move EXCEPTION_TABLE to RO_DATA segment Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Ivan Kokshaysky Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Richard Henderson Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86@kernel.org Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-18-keescook@chromium.org commit f0d7ee17d57c7a8510518a1e60366d053e2f3ff5 Author: Kees Cook Date: Tue Oct 29 14:13:38 2019 -0700 x86/vmlinux: Move EXCEPTION_TABLE to RO_DATA segment The exception table was needlessly marked executable. In preparation for execute-only memory, move the table into the RO_DATA segment via the new macro that can be used by any architectures that want to make a similar consolidation. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Ross Zwisler Cc: Segher Boessenkool Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-17-keescook@chromium.org commit b907693883fdcff5b492cf0cd02a0e264623055e Author: Kees Cook Date: Tue Oct 29 14:13:37 2019 -0700 x86/vmlinux: Actually use _etext for the end of the text segment Various calculations are using the end of the exception table (which does not need to be executable) as the end of the text segment. Instead, in preparation for moving the exception table into RO_DATA, move _etext after the exception table and update the calculations. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Ross Zwisler Cc: Segher Boessenkool Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-16-keescook@chromium.org commit 879516870d7a8e7ec017efa9be49d86dd4e04d3b Author: Greg Kroah-Hartman Date: Mon Nov 4 17:48:16 2019 +0100 Revert "tty:n_gsm.c: destroy port by tty_port_destroy()" This reverts commit 7726fb53e75fa48714181efd00167e0734303afb. Jiri writes: On 24. 09. 19, 11:25, Xiaoming Ni wrote: > According to the comment of tty_port_destroy(): > When a port was initialized using tty_port_init, one has to destroy > the port by tty_port_destroy(); It continues with a part saying: Either indirectly by using tty_port refcounting (tty_port_put) or directly if refcounting is not used. So this should be reverted. Cc: Xiaoming Ni Reported-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 6a7ce07d6cb7345619c89c6aeab9c14ce9d7f354 Author: Chuhong Yuan Date: Fri Nov 1 16:54:33 2019 +0800 tty: serial: uartlite: use clk_disable_unprepare to match clk_prepare_enable The driver uses clk_prepare_enable in ulite_probe but uses clk_unprepare in ulite_remove, which does not match. Replace clk_unprepare with clk_disable_unprepare to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191101085433.10399-1-hslester96@gmail.com Signed-off-by: Greg Kroah-Hartman commit eb9c1a41ea1234907615fe47d6e47db8352d744b Author: Frank Wunderlich Date: Sun Oct 27 07:21:17 2019 +0100 serial: 8250-mtk: Use platform_get_irq_optional() for optional irq As platform_get_irq() now prints an error when the interrupt does not exist, this warnings are printed on bananapi-r2: [ 4.935780] mt6577-uart 11004000.serial: IRQ index 1 not found [ 4.962589] 11002000.serial: ttyS1 at MMIO 0x11002000 (irq = 202, base_baud = 1625000) is a ST16650V2 [ 4.972127] mt6577-uart 11002000.serial: IRQ index 1 not found [ 4.998927] 11003000.serial: ttyS2 at MMIO 0x11003000 (irq = 203, base_baud = 1625000) is a ST16650V2 [ 5.008474] mt6577-uart 11003000.serial: IRQ index 1 not found Fix this by calling platform_get_irq_optional() instead. now it looks like this: [ 4.872751] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Frank Wunderlich Cc: stable Link: https://lore.kernel.org/r/20191027062117.20389-1-frank-w@public-files.de Signed-off-by: Greg Kroah-Hartman commit 05faa64e73924556ba281911db24643e438fe7ba Author: Andy Shevchenko Date: Wed Oct 23 13:35:58 2019 +0300 serial: 8250_dw: Avoid double error messaging when IRQ absent Since the commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") platform_get_irq() started issuing an error message. Thus, there is no need to have the same in the driver Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Andy Shevchenko Cc: stable Link: https://lore.kernel.org/r/20191023103558.51862-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b027ce258369cbfa88401a691c23dad01deb9f9b Author: Jeffrey Hugo Date: Mon Oct 21 08:46:16 2019 -0700 tty: serial: msm_serial: Fix flow control hci_qca interfaces to the wcn3990 via a uart_dm on the msm8998 mtp and Lenovo Miix 630 laptop. As part of initializing the wcn3990, hci_qca disables flow, configures the uart baudrate, and then reenables flow - at which point an event is expected to be received over the uart from the wcn3990. It is observed that this event comes after the baudrate change but before hci_qca re-enables flow. This is unexpected, and is a result of msm_reset() being broken. According to the uart_dm hardware documentation, it is recommended that automatic hardware flow control be enabled by setting RX_RDY_CTL. Auto hw flow control will manage RFR based on the configured watermark. When there is space to receive data, the hw will assert RFR. When the watermark is hit, the hw will de-assert RFR. The hardware documentation indicates that RFR can me manually managed via CR when RX_RDY_CTL is not set. SET_RFR asserts RFR, and RESET_RFR de-asserts RFR. msm_reset() is broken because after resetting the hardware, it unconditionally asserts RFR via SET_RFR. This enables flow regardless of the current configuration, and would undo a previous flow disable operation. It should instead de-assert RFR via RESET_RFR to block flow until the hardware is reconfigured. msm_serial should rely on the client to specify that flow should be enabled, either via mctrl() or the termios structure, and only assert RFR in response to those triggers. Fixes: 04896a77a97b ("msm_serial: serial driver for MSM7K onboard serial peripheral.") Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Cc: stable Reviewed-by: Andy Gross Link: https://lore.kernel.org/r/20191021154616.25457-1-jeffrey.l.hugo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4d2c82b192e4b2037590343620329f2d88cc1135 Author: Sudip Mukherjee Date: Fri Oct 18 17:17:12 2019 +0100 tty: rocket: reduce stack usage The build of xtensa allmodconfig gives warning of: In function 'get_ports.isra.0': warning: the frame size of 1040 bytes is larger than 1024 bytes Signed-off-by: Sudip Mukherjee Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/20191018161712.27807-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5bfb26303663b022a7750fd9d80dc8bb8dc8b604 Author: Geert Uytterhoeven Date: Wed Oct 23 14:30:10 2019 +0200 dt-bindings: serial: sh-sci: Document r8a77961 bindings Document support for the SCIF and HSCIF serial ports in the Renesas R-Car M3-W+ (R8A77961) SoC. Update all references to R-Car M3-W from "r8a7796" to "r8a77960", to avoid confusion between R-Car M3-W (R8A77960) and M3-W+. No driver update is needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191023123010.12501-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 6fc68e93639989a46d3dd344c6f2b9b9bcb92521 Author: Andrey Smirnov Date: Mon Oct 21 21:49:40 2019 -0700 dt-bindings: serial: lpuart: Drop unsupported RS485 bindings LPUART driver does not support 'rs485-rts-delay' or 'rs485-rx-during-tx' properties. Remove them. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Chris Healy Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-imx@nxp.com Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191022044940.15119-1-andrew.smirnov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 67b01837861c203c51f78320dcf49fe7ec2f634d Author: Philippe Schenker Date: Thu Oct 17 14:14:42 2019 +0000 tty: serial: lpuart: Add RS485 support for 32-bit uart flavour This commits adds RS485 support for LPUART hardware that uses 32-bit registers. These are typically found in i.MX8 processors. Signed-off-by: Philippe Schenker Reviewed-by: Fugang Duan Link: https://lore.kernel.org/r/20191017141428.10330-3-philippe.schenker@toradex.com Signed-off-by: Greg Kroah-Hartman commit e3553fee81b5ff4fe7c8a06e29fc5260fe1452b3 Author: Philippe Schenker Date: Thu Oct 17 14:14:40 2019 +0000 tty: serial: lpuart: Use defines that correspond to correct register Use define from the 32-bit register description UARTMODIR_* instead of UARTMODEM_*. The value is the same, so there is no functional change. Signed-off-by: Philippe Schenker Reviewed-by: Stefan Agner Reviewed-by: Fugang Duan Link: https://lore.kernel.org/r/20191017141428.10330-2-philippe.schenker@toradex.com Signed-off-by: Greg Kroah-Hartman commit 2b30efe2e88a398224abf9751a3fe1018375826f Author: Philippe Schenker Date: Thu Oct 17 14:14:38 2019 +0000 tty: serial: lpuart: Remove unnecessary code from set_mctrl Currently flow control is not working due to lpuart32_set_mctrl that is clearing TXCTSE bit in all cases. This bit gets earlier setup by lpuart32_set_termios. As I read in Documentation set_mctrl is also not meant for hardware flow control rather than gpio setting and clearing a RTS signal. Therefore I guess it is safe to remove the whole code in lpuart32_set_mctrl. This was tested with console on a i.MX8QXP SoC. Signed-off-by: Philippe Schenker Reviewed-by: Fugang Duan Link: https://lore.kernel.org/r/20191017141428.10330-1-philippe.schenker@toradex.com Signed-off-by: Greg Kroah-Hartman commit ed0207a33adda11db88c9c3b6066f0c6051119fe Author: Joakim Zhang Date: Mon Nov 4 07:09:20 2019 +0000 docs/perf: Add AXI ID filter capabilities information Add capabilities information for AXI ID filter. Signed-off-by: Joakim Zhang Signed-off-by: Will Deacon commit d3eeece9a8ab87f98fa60664fd1ce817661f39cb Author: Joakim Zhang Date: Fri Nov 1 08:36:20 2019 +0000 perf/imx_ddr: Add driver for DDR PMU in i.MX8MPlus Add driver for DDR PMU in i.MX8MPlus. Signed-off-by: Joakim Zhang Signed-off-by: Will Deacon commit 44f8bd014a94ed679ddb77d0b92350d4ac4f23a5 Author: Joakim Zhang Date: Fri Nov 1 08:36:16 2019 +0000 perf/imx_ddr: Add enhanced AXI ID filter support With DDR_CAP_AXI_ID_FILTER quirk, indicating HW supports AXI ID filter which only can get bursts from DDR transaction, i.e. DDR read/write requests. This patch add DDR_CAP_AXI_ID_ENHANCED_FILTER quirk, indicating HW supports AXI ID filter which can get bursts and bytes from DDR transaction at the same time. We hope PMU always return bytes in the driver due to it is more meaningful for users. Signed-off-by: Joakim Zhang Signed-off-by: Will Deacon commit 1178addaca66292b309b3cbbdc12421cef4894b2 Author: Joakim Zhang Date: Fri Nov 1 08:36:13 2019 +0000 bindings: perf: imx-ddr: Add new compatible string Add new compatible string for i.MX8MPlus DDR PMU core. Signed-off-by: Joakim Zhang Signed-off-by: Will Deacon commit 76d835fcd429615b61fccbe65de4f53360a89ca7 Author: Joakim Zhang Date: Fri Nov 1 08:36:10 2019 +0000 docs/perf: Add explanation for DDR_CAP_AXI_ID_FILTER_ENHANCED quirk Add explanation for DDR_CAP_AXI_ID_FILTER_ENHANCED quirk. Signed-off-by: Joakim Zhang [will: Simplified wording] Signed-off-by: Will Deacon commit 1056ef940380c4e32349ccb6d956858edf70520c Author: Jens Axboe Date: Mon Nov 4 08:50:02 2019 -0700 MAINTAINERS: update io_uring entry We now have a list that's appropriate for both kernel and userspace discussions on io_uring usage and development, add that to the MAINTAINERS entry. Also add the io-wq files. Signed-off-by: Jens Axboe commit e3dcb725a95af2ab71bcd64626b0d071239abffb Author: Maxime Ripard Date: Tue Oct 22 18:08:06 2019 +0200 pinctrl: Convert Allwinner Pin Controller to a schema The Allwinner SoCs have a pin controller supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20191022160806.42971-1-mripard@kernel.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 26f6a7524dd3366eff8cb0e733a856e8d84c6f68 Author: Qianggui Song Date: Fri Oct 25 19:49:24 2019 +0800 pinctrl: add compatible for Amlogic Meson A1 pin controller Add new compatible name for Amlogic's Meson-A1 pin controller add a dt-binding header file which document the detail pin names. Note that A1 doesn't need DS bank reg any more, use gpio reg as base. Reviewed-by: Rob Herring Reviewed-by: Neil Armstrong Signed-off-by: Qianggui Song Link: https://lore.kernel.org/r/1572004167-24150-2-git-send-email-qianggui.song@amlogic.com Signed-off-by: Linus Walleij commit 574dce894bbe97bffb9bffb14973ed3d44e446fc Author: Chris Packham Date: Mon Nov 4 13:18:19 2019 +1300 pinctrl: bcm: nsp: implement get_direction The get_direction api is strongly recommended to be implemented. In fact if it is not implemented gpio-hogs will not get the correct direction. Add an implementation of get_direction for the nsp-gpio driver. Signed-off-by: Chris Packham Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20191104001819.2300-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Linus Walleij commit 8298d18a49a3e9e2c0eceb88f2ed80e794f2fae2 Author: Chris Packham Date: Mon Nov 4 13:18:18 2019 +1300 pinctrl: bcm: nsp: use gpiolib infrastructure for interrupts Use more of the gpiolib infrastructure for handling interrupts. The root interrupt still needs to be handled manually as it is shared with other peripherals on the SoC. This will allow multiple instances of this driver to be supported and will clean up gracefully on failure thanks to the device managed APIs. Signed-off-by: Chris Packham Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20191104001819.2300-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Linus Walleij commit 10ff58aa3c2e2a093b6ad615a7e3d8bb0dc613e5 Author: Ben Dooks (Codethink) Date: Tue Oct 22 16:11:54 2019 +0100 pinctrl: amd: fix __iomem annotation in amd_gpio_irq_handler() The regs pointer in amd_gpio_irq_handler() should have __iomem on it, so add that to fix the following sparse warnings: drivers/pinctrl/pinctrl-amd.c:555:14: warning: incorrect type in assignment (different address spaces) drivers/pinctrl/pinctrl-amd.c:555:14: expected unsigned int [usertype] *regs drivers/pinctrl/pinctrl-amd.c:555:14: got void [noderef] *base drivers/pinctrl/pinctrl-amd.c:563:34: warning: incorrect type in argument 1 (different address spaces) drivers/pinctrl/pinctrl-amd.c:563:34: expected void const volatile [noderef] *addr drivers/pinctrl/pinctrl-amd.c:563:34: got unsigned int [usertype] * drivers/pinctrl/pinctrl-amd.c:580:34: warning: incorrect type in argument 1 (different address spaces) drivers/pinctrl/pinctrl-amd.c:580:34: expected void const volatile [noderef] *addr drivers/pinctrl/pinctrl-amd.c:580:34: got unsigned int [usertype] * drivers/pinctrl/pinctrl-amd.c:587:25: warning: incorrect type in argument 2 (different address spaces) drivers/pinctrl/pinctrl-amd.c:587:25: expected void volatile [noderef] *addr drivers/pinctrl/pinctrl-amd.c:587:25: got unsigned int [usertype] * Signed-off-by: Ben Dooks (Codethink) Link: https://lore.kernel.org/r/20191022151154.5986-1-ben.dooks@codethink.co.uk Signed-off-by: Linus Walleij commit f23c7ce341c2dfd187d4e3712ba6c110969463a0 Merge: 1574cf83c7a0 0b163565b918 Author: Daniel Borkmann Date: Mon Nov 4 16:06:56 2019 +0100 Merge branch 'bpf-libbpf-bitfield-size-relo' Andrii Nakryiko says: ==================== This patch set adds support for reading bitfields in a relocatable manner through a set of relocations emitted by Clang, corresponding libbpf support for those relocations, as well as abstracting details into BPF_CORE_READ_BITFIELD/BPF_CORE_READ_BITFIELD_PROBED macro. We also add support for capturing relocatable field size, so that BPF program code can adjust its logic to actual amount of data it needs to operate on, even if it changes between kernels. New convenience macro is added to bpf_core_read.h (bpf_core_field_size(), in the same family of macro as bpf_core_read() and bpf_core_field_exists()). Corresponding set of selftests are added to excercise this logic and validate correctness in a variety of scenarios. Some of the overly strict logic of matching fields is relaxed to support wider variety of scenarios. See patch #1 for that. Patch #1 removes few overly strict test cases. Patch #2 adds support for bitfield-related relocations. Patch #3 adds some further adjustments to support generic field size relocations and introduces bpf_core_field_size() macro. Patch #4 tests bitfield reading. Patch #5 tests field size relocations. v1 -> v2: - added direct memory read-based macro and tests for bitfield reads. ==================== Signed-off-by: Daniel Borkmann commit 0b163565b918fd5ad1cf8ab7a92cffa06c13b204 Author: Andrii Nakryiko Date: Fri Nov 1 15:28:10 2019 -0700 selftests/bpf: Add field size relocation tests Add test verifying correctness and logic of field size relocation support in libbpf. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191101222810.1246166-6-andriin@fb.com commit 8b1cb1c9601f835c025af5b3cf0e98c8048ad30b Author: Andrii Nakryiko Date: Fri Nov 1 15:28:09 2019 -0700 selftest/bpf: Add relocatable bitfield reading tests Add a bunch of selftests verifying correctness of relocatable bitfield reading support in libbpf. Both bpf_probe_read()-based and direct read-based bitfield macros are tested. core_reloc.c "test_harness" is extended to support raw tracepoint and new typed raw tracepoints as test BPF program types. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191101222810.1246166-5-andriin@fb.com commit 94f060e98495e26fd02e18c14e78c61f0d643fd6 Author: Andrii Nakryiko Date: Fri Nov 1 15:28:08 2019 -0700 libbpf: Add support for field size relocations Add bpf_core_field_size() macro, capturing a relocation against field size. Adjust bits of internal libbpf relocation logic to allow capturing size relocations of various field types: arrays, structs/unions, enums, etc. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191101222810.1246166-4-andriin@fb.com commit ee26dade0e3bcd8a34ae7520e373fb69365fce7a Author: Andrii Nakryiko Date: Fri Nov 1 15:28:07 2019 -0700 libbpf: Add support for relocatable bitfields Add support for the new field relocation kinds, necessary to support relocatable bitfield reads. Provide macro for abstracting necessary code doing full relocatable bitfield extraction into u64 value. Two separate macros are provided: - BPF_CORE_READ_BITFIELD macro for direct memory read-enabled BPF programs (e.g., typed raw tracepoints). It uses direct memory dereference to extract bitfield backing integer value. - BPF_CORE_READ_BITFIELD_PROBED macro for cases where bpf_probe_read() needs to be used to extract same backing integer value. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191101222810.1246166-3-andriin@fb.com commit 42765ede5c54ca915de5bfeab83be97207e46f68 Author: Andrii Nakryiko Date: Fri Nov 1 15:28:06 2019 -0700 selftests/bpf: Remove too strict field offset relo test cases As libbpf is going to gain support for more field relocations, including field size, some restrictions about exact size match are going to be lifted. Remove test cases that explicitly test such failures. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191101222810.1246166-2-andriin@fb.com commit 81898a44f288607cb3b11a42aed6efb646891c19 Author: Rajendra Nayak Date: Mon Oct 21 19:45:07 2019 +0530 pinctrl: qcom: sc7180: Add missing tile info in SDC_QDSD_PINGROUP/UFS_RESET The SDC_QDSD_PINGROUP/UFS_RESET macros are missing the .tile info needed to calculate the right register offsets. Adding them here and also adjusting the offsets accordingly. Fixes: f2ae04c45b1a ("pinctrl: qcom: Add SC7180 pinctrl driver") Reported-by: Veerabhadrarao Badiganti Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/20191021141507.24066-1-rnayak@codeaurora.org Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit bdc62f2bae8fb0e8e99574de5232f0a3c54a27df Author: Heikki Krogerus Date: Mon Nov 4 17:24:28 2019 +0300 usb: typec: ucsi: Simplified registration and I/O API Adding more simplified API for interface registration and read and write operations. The registration is split into separate creation and registration phases. That allows the drivers to properly initialize the interface before registering it if necessary. The read and write operations are supplied in a completely separate struct ucsi_operations that is passed to the ucsi_register() function during registration. The new read and write operations will work more traditionally so that the read callback function reads a requested amount of data from an offset, and the write callback functions write the given data to the offset. The drivers will have to support both non-blocking writing and blocking writing. In blocking writing the driver itself is responsible of waiting for the completion event. The new API makes it possible for the drivers to perform tasks also independently of the core ucsi.c, and that should allow for example quirks to be handled completely in the drivers without the need to touch ucsi.c. The old API is kept until all drivers have been converted to the new API. Signed-off-by: Heikki Krogerus Tested-by: Ajay Gupta Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-12-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 24dab5380512874e323629350dd07defff09f1a7 Author: Heikki Krogerus Date: Mon Nov 4 17:24:27 2019 +0300 usb: typec: hd3ss3220: Give the connector fwnode to the port device The driver already finds the node in order to get reference to the USB role switch. Signed-off-by: Heikki Krogerus Tested-by: Biju Das Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-11-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 61d78ee29a0bf1078ebf5bbb2ccab7e7998d7410 Author: Heikki Krogerus Date: Mon Nov 4 17:24:26 2019 +0300 usb: typec: Remove unused members from struct typec_capability The members for the muxes are not used, so dropping them. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-10-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8c038ea8b65fc803cd35423b8a1ff7057dd52f8b Author: Heikki Krogerus Date: Mon Nov 4 17:24:25 2019 +0300 usb: typec: Remove the callback members from struct typec_capability There are no more users for them. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-9-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 642b1017dc4371bff291964186c1dfbb8f29ee25 Author: Heikki Krogerus Date: Mon Nov 4 17:24:24 2019 +0300 usb: typec: hd3ss3220: Start using struct typec_operations Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. After this there is not need to keep the capabilities stored anywhere in the driver. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-8-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6df475f804e62887f5d2132832ecabe6e596cd1c Author: Heikki Krogerus Date: Mon Nov 4 17:24:23 2019 +0300 usb: typec: ucsi: Start using struct typec_operations Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-7-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1007dda3be1c9f924746f892c094219be250928e Author: Heikki Krogerus Date: Mon Nov 4 17:24:22 2019 +0300 usb: typec: tps6598x: Start using struct typec_operations Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. After this there is not need to keep the capabilities stored anywhere in the driver. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-6-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 00ec21e58dc63dd899a1e1cb3f1d44fa18ca22dd Author: Heikki Krogerus Date: Mon Nov 4 17:24:21 2019 +0300 usb: typec: tcpm: Start using struct typec_operations Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-5-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 46310e4dade2bc3b574d540e421e3aa9f32cfd5f Author: Heikki Krogerus Date: Mon Nov 4 17:24:20 2019 +0300 usb: typec: Separate the operations vector Introducing struct typec_operations which has the same callbacks as struct typec_capability. The old callbacks are kept for now, but after all users have been converted, they will be removed. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8c127a42af89c39560a8c5bd5accadaaa5741f8c Author: Heikki Krogerus Date: Mon Nov 4 17:24:19 2019 +0300 usb: typec: Introduce typec_get_drvdata() Leaving the private driver_data pointer of the port device to the port drivers. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ad772c39b2fbb24ff6104d73d14fc125d8f02711 Author: Heikki Krogerus Date: Mon Nov 4 17:24:18 2019 +0300 usb: typec: Copy everything from struct typec_capability during registration Copying everything from struct typec_capability to struct typec_port during port registration. This will make sure that under no circumstances the driver can change the values in the struct typec_capability that the port uses. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191104142435.29960-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6dabeb891c001c592645df2f477fed9f5d959987 Author: Andrey Konovalov Date: Mon Oct 21 16:20:59 2019 +0200 USB: dummy-hcd: use usb_urb_dir_in instead of usb_pipein Commit fea3409112a9 ("USB: add direction bit to urb->transfer_flags") has added a usb_urb_dir_in() helper function that can be used to determine the direction of the URB. With that patch USB_DIR_IN control requests with wLength == 0 are considered out requests by real USB HCDs. This patch changes dummy-hcd to use the usb_urb_dir_in() helper to match that behavior. Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/4ae9e68ebca02f08a93ac61fe065057c9a01f0a8.1571667489.git.andreyknvl@google.com Signed-off-by: Greg Kroah-Hartman commit 8442b02bf3c6770e0d7e7ea17be36c30e95987b6 Author: Andrey Konovalov Date: Mon Oct 21 16:20:58 2019 +0200 USB: dummy-hcd: increase max number of devices to 32 When fuzzing the USB subsystem with syzkaller, we currently use 8 testing processes within one VM. To isolate testing processes from one another it is desirable to assign a dedicated USB bus to each of those, which means we need at least 8 Dummy UDC/HCD devices. This patch increases the maximum number of Dummy UDC/HCD devices to 32 (more than 8 in case we need more of them in the future). Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/665578f904484069bb6100fb20283b22a046ad9b.1571667489.git.andreyknvl@google.com Signed-off-by: Greg Kroah-Hartman commit b8c2f776164c8f74ac31c5e370ca3f029be0aa19 Author: Kees Cook Date: Tue Oct 29 14:13:36 2019 -0700 vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA Many architectures have an EXCEPTION_TABLE that needs to be only readable. As such, it should live in RO_DATA. Create a macro to identify this case for the architectures that can move EXCEPTION_TABLE into RO_DATA. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Will Deacon Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-15-keescook@chromium.org commit c9174047b48d700a785b633319dd7d27288b86be Author: Kees Cook Date: Tue Oct 29 14:13:35 2019 -0700 vmlinux.lds.h: Replace RW_DATA_SECTION with RW_DATA Rename RW_DATA_SECTION to RW_DATA. (Calling this a "section" is a lie, since it's multiple sections and section flags cannot be applied to the macro.) Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Heiko Carstens # s390 Acked-by: Geert Uytterhoeven # m68k Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-14-keescook@chromium.org commit 93240b327929ff03c1878ea8badc5c6bd86f053f Author: Kees Cook Date: Tue Oct 29 14:13:34 2019 -0700 vmlinux.lds.h: Replace RO_DATA_SECTION with RO_DATA Finish renaming RO_DATA_SECTION to RO_DATA. (Calling this a "section" is a lie, since it's multiple sections and section flags cannot be applied to the macro.) Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Heiko Carstens # s390 Acked-by: Geert Uytterhoeven # m68k Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-13-keescook@chromium.org commit c82318254d15e5f83c75f60aedf2bb9eb408308f Author: Kees Cook Date: Tue Oct 29 14:13:33 2019 -0700 vmlinux.lds.h: Replace RODATA with RO_DATA There's no reason to keep the RODATA macro: replace the callers with the expected RO_DATA macro. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-12-keescook@chromium.org commit a363d50515eb464a4e2aade12312cfdc1b156944 Author: Chuhong Yuan Date: Sat Nov 2 14:22:45 2019 +0800 usb: host: fotg210: add missed clk_put calls The driver forgets to call clk_put when probe fails and remove. Add the calls to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191102062245.4014-1-hslester96@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4ff0eccbb5c4487ef065931f5c566d85a5bfb5c9 Author: Geert Uytterhoeven Date: Thu Oct 24 17:27:47 2019 +0200 usb: Spelling s/disconnet/disconnect/ Fix misspellings of "disconnect". Signed-off-by: Geert Uytterhoeven Acked-by: Peter Chen Link: https://lore.kernel.org/r/20191024152747.30617-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit c1aa81da1c64a090da7cf335595f69fd76f3c0bf Author: Geert Uytterhoeven Date: Thu Oct 24 17:28:33 2019 +0200 usb: Spelling s/enpoint/endpoint/ Fix misspellings of "endpoint". Signed-off-by: Geert Uytterhoeven Acked-by: Li Yang Acked-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20191024152833.30698-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit cd7da3bc6c580e398e30349d88ff664113c9408e Author: Uwe Kleine-König Date: Wed Oct 23 12:52:50 2019 +0200 usb: usb251xb: Add support for USB2422 The USB2422 uses a different package that the USB251x and only comes in a variant with 2 downstream ports. Other than that it is software compatible. Tested-by: Carsten Stelling Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20191023105250.16537-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 6fa54eda64d207fcafe5f680b4ead0a65e320d59 Author: Uwe Kleine-König Date: Wed Oct 23 12:52:49 2019 +0200 usb: usb251xb: Document chip variant usb2422 The next patch introduces support for the USB2422. Add it to the list of devices supported by the binding. Signed-off-by: Uwe Kleine-König Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191023105250.16537-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 2a59aa7711e0013f6ff27ba77e7b56eb7674ca97 Author: Uwe Kleine-König Date: Wed Oct 23 12:52:48 2019 +0200 usb: usb251xb: Drop some unused defines The five removed symbols are unused since they were introduced in commit 3ec72a2a1e5d ("usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver") back in 2017. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20191023105250.16537-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 6f9ac343c0d2bc2f40ec7bed307a322497894e1d Author: Ben Dooks (Codethink) Date: Thu Oct 17 18:19:34 2019 +0100 usb: host: oxu210hp-hcd: fix __iomem annotations There are a number of places in the driver where it fails to maintain __iomem on pointers used to access registers so fixup the warnings by adding these in the appropriate places. Examples of the sparse warnings fixed: drivers/usb/host/oxu210hp-hcd.c:686:9: warning: incorrect type in argument 2 (different address spaces) drivers/usb/host/oxu210hp-hcd.c:686:9: expected void volatile [noderef] *addr drivers/usb/host/oxu210hp-hcd.c:686:9: got void * drivers/usb/host/oxu210hp-hcd.c:686:9: warning: incorrect type in argument 2 (different address spaces) drivers/usb/host/oxu210hp-hcd.c:686:9: expected void volatile [noderef] *addr drivers/usb/host/oxu210hp-hcd.c:686:9: got void * drivers/usb/host/oxu210hp-hcd.c:686:9: warning: incorrect type in argument 2 (different address spaces) drivers/usb/host/oxu210hp-hcd.c:686:9: expected void volatile [noderef] *addr drivers/usb/host/oxu210hp-hcd.c:686:9: got void * drivers/usb/host/oxu210hp-hcd.c:681:16: warning: incorrect type in argument 1 (different address spaces) drivers/usb/host/oxu210hp-hcd.c:681:16: expected void const volatile [noderef] *addr drivers/usb/host/oxu210hp-hcd.c:681:16: got void * Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20191017171934.8771-1-ben.dooks@codethink.co.uk Signed-off-by: Greg Kroah-Hartman commit f3de5d857bb2362b00e2a8d4bc886cd49dcb66db Author: Chuhong Yuan Date: Wed Oct 16 16:35:32 2019 +0800 USB: bcma: Add a check for devm_gpiod_get bcma_hcd_probe misses a check for devm_gpiod_get and may miss the error. Add a check for it and return the error if a failure occurs. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191016083531.5734-1-hslester96@gmail.com Signed-off-by: Greg Kroah-Hartman commit 09e2a8b78cbd628f4f428b76cb3fed64cdfbc657 Author: Ben Dooks Date: Tue Oct 15 15:19:45 2019 +0100 usb: ohci-nxp: fix use of integer as pointer The hcd pointer in ohci_hcd_nxp_probe() is being initialised with a 0, so fix to NULL to avoid the following sparse warning: drivers/usb/host/ohci-nxp.c:153:31: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks Acked-by: Sylvain Lemieux Link: https://lore.kernel.org/r/20191015141945.16067-1-ben.dooks@codethink.co.uk Signed-off-by: Greg Kroah-Hartman commit bb40c3f7d63afaf7665effaf2e75a9f5563e560a Author: Frieder Schrempf Date: Mon Nov 4 11:54:21 2019 +0000 dt-bindings: arm: fsl: Add more Kontron i.MX6UL/ULL compatibles Add the compatibles for Kontron i.MX6UL N6311 SoM and boards and the compatibles for Kontron i.MX6ULL N6411 SoM and boards. Signed-off-by: Frieder Schrempf Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit eaf937075c9a42eb8ba51eb3050773d7205d3595 Author: Kees Cook Date: Tue Oct 29 14:13:32 2019 -0700 vmlinux.lds.h: Move NOTES into RO_DATA The .notes section should be non-executable read-only data. As such, move it to the RO_DATA macro instead of being per-architecture defined. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Heiko Carstens # s390 Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-11-keescook@chromium.org commit fbe6a8e618a2d70621cff277e24f6eb338d3d149 Author: Kees Cook Date: Tue Oct 29 14:13:31 2019 -0700 vmlinux.lds.h: Move Program Header restoration into NOTES macro In preparation for moving NOTES into RO_DATA, make the Program Header assignment restoration be part of the NOTES macro itself. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Heiko Carstens # s390 Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-10-keescook@chromium.org commit 441110a547f86a2fd0c40bf04b274853622c53cc Author: Kees Cook Date: Tue Oct 29 14:13:30 2019 -0700 vmlinux.lds.h: Provide EMIT_PT_NOTE to indicate export of .notes In preparation for moving NOTES into RO_DATA, provide a mechanism for architectures that want to emit a PT_NOTE Program Header to do so. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Heiko Carstens # s390 Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-9-keescook@chromium.org commit 7a42d41d9dc2829bdf589db855ce3f948de2da6b Author: Kees Cook Date: Tue Oct 29 14:13:29 2019 -0700 x86/vmlinux: Restore "text" Program Header with dummy section In a linker script, if one places a section in one or more segments using ":PHDR", then the linker will place all subsequent allocatable sections, which do not specify ":PHDR", into the same segments. In order to have the NOTES section in both PT_LOAD (":text") and PT_NOTE (":note"), both segments are marked, and the only way to undo this to keep subsequent sections out of PT_NOTE is to mark the following section with just the single desired PT_LOAD (":text"). In preparation for having a common NOTES macro, perform the segment assignment using a dummy section (as done by other architectures). Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: Yoshinori Sato Cc: x86-ml Link: https://lkml.kernel.org/r/20191029211351.13243-8-keescook@chromium.org commit 6434efbd9aefa3786b446c8e4745d1f49d2983b4 Author: Kees Cook Date: Tue Oct 29 14:13:28 2019 -0700 s390: Move RO_DATA into "text" PT_LOAD Program Header In preparation for moving NOTES into RO_DATA, move RO_DATA back into the "text" PT_LOAD Program Header, as done with other architectures. The "data" PT_LOAD now starts with the writable data section. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Heiko Carstens Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-7-keescook@chromium.org commit 430c6b2647e215c4129f36646ad28a725996b410 Author: Kees Cook Date: Tue Oct 29 14:13:27 2019 -0700 ia64: Rename PT_LOAD identifier "code" to "text" In preparation for moving NOTES into RO_DATA, rename the linker script internal identifier for the PT_LOAD Program Header from "code" to "text" to match other architectures. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Fenghua Yu Cc: Heiko Carstens Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Tony Luck Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-6-keescook@chromium.org commit 65182e6e36195fbf9340808ac4a00d1c146bc05c Author: Kees Cook Date: Tue Oct 29 14:13:26 2019 -0700 alpha: Rename PT_LOAD identifier "kernel" to "text" In preparation for moving NOTES into RO_DATA, rename the linker script internal identifier for the PT_LOAD Program Header from "kernel" to "text" to match other architectures. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Heiko Carstens Cc: Ivan Kokshaysky Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Simek Cc: Richard Henderson Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-5-keescook@chromium.org commit af0f3e9e205c3d1bad91ad83e06bfd04df9712b2 Author: Kees Cook Date: Tue Oct 29 14:13:25 2019 -0700 powerpc: Rename PT_LOAD identifier "kernel" to "text" In preparation for moving NOTES into RO_DATA, rename the linker script internal identifier for the PT_LOAD Program Header from "kernel" to "text" to match other architectures. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Michael Ellerman Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86@kernel.org Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-4-keescook@chromium.org commit cc55c85d257e5d8435592643f4aeee683a8fa46f Author: Frieder Schrempf Date: Mon Nov 4 11:54:18 2019 +0000 ARM: dts: imx6ul-kontron-n6x1x-s: Remove an obsolete comment and fix indentation The ECSPI1 is not used for a FRAM chip, so remove the comment. While at it, also change some whitespaces to tabs to comply with the indentation style of the rest of the file. Signed-off-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 43584861ce20fd95d31d665b84ac89dc76c4c8bd Author: Frieder Schrempf Date: Mon Nov 4 11:54:16 2019 +0000 ARM: dts: imx6ul-kontron-n6x1x-s: Add vbus-supply and overcurrent polarity to usb nodes To silence the warnings shown by the driver at boot time, we add a fixed regulator for the 5V supply of usbotg2 and specify the polarity of the overcurrent signal for usbotg1. Signed-off-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 36f42bb4d7f90cea20bfb56dd7ab2aa8d0929ca7 Author: Frieder Schrempf Date: Mon Nov 4 11:54:13 2019 +0000 ARM: dts: imx6ul-kontron-n6x1x: Add 'chosen' node with 'stdout-path' The Kontron N6x1x SoMs all use uart4 as a debug serial interface. Therefore we set it in the 'chosen' node. Signed-off-by: Frieder Schrempf Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 2e426b2bdc69721723016f1067a77bb66ab90a27 Author: Frieder Schrempf Date: Mon Nov 4 11:54:10 2019 +0000 ARM: dts: Add support for two more Kontron evalkit boards 'N6311 S' and 'N6411 S' The 'N6311 S' and the 'N6411 S' are similar to the Kontron 'N6310 S' evaluation kit boards. Instead of the N6310 SoM, they feature a N6311 or N6411 SoM. Signed-off-by: Frieder Schrempf Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 3b5212cc2af7160a591bd5d32acbf39ec719023f Author: Frieder Schrempf Date: Mon Nov 4 11:54:07 2019 +0000 ARM: dts: imx6ul-kontron-n6310-s: Move common nodes to a separate file The baseboard for the Kontron N6310 SoM is also used for other SoMs such as N6311 and N6411. In order to share the code, we move the definitions of the baseboard to a separate dtsi file. Signed-off-by: Frieder Schrempf Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 0ccafdf3e81bb40fe415ea13e1f42b19c585f0a0 Author: Frieder Schrempf Date: Mon Nov 4 11:54:04 2019 +0000 ARM: dts: imx6ul-kontron-n6310-s: Disable the snvs-poweroff driver The snvs-poweroff driver can power off the system by pulling the PMIC_ON_REQ signal low, to let the PMIC disable the power. The Kontron SoMs do not have this signal connected, so let's remove the node. This fixes a real issue when the signal is asserted at poweroff, but not actually causing the power to turn off. It was observed, that in this case the system would not shut down properly. Signed-off-by: Frieder Schrempf Fixes: 1ea4b76cdfde ("ARM: dts: imx6ul-kontron-n6310: Add Kontron i.MX6UL N6310 SoM and boards") Signed-off-by: Shawn Guo commit 6dd2ed73f4f6a17cb3c753dd75579942fc644a90 Author: Frieder Schrempf Date: Mon Nov 4 11:54:02 2019 +0000 ARM: dts: Add support for two more Kontron SoMs N6311 and N6411 The N6311 and the N6411 SoM are similar to the Kontron N6310 SoM. They are pin-compatible, but feature a larger RAM and NAND flash (512MiB instead of 256MiB). Further, the N6411 has an i.MX6ULL SoC, instead of an i.MX6UL. Signed-off-by: Frieder Schrempf Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 6fc4000656a10fb679ab6566dcd516ee672f1706 Author: Kees Cook Date: Tue Oct 29 14:13:24 2019 -0700 powerpc: Remove PT_NOTE workaround In preparation for moving NOTES into RO_DATA, remove the PT_NOTE workaround since the kernel requires at least gcc 4.6 now. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Michael Ellerman Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86@kernel.org Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-3-keescook@chromium.org commit ec556271bbb33809b73cdb238f8cb357345908e8 Author: Kees Cook Date: Tue Oct 29 14:13:23 2019 -0700 powerpc: Rename "notes" PT_NOTE to "note" The Program Header identifiers are internal to the linker scripts. In preparation for moving the NOTES segment declaration into RO_DATA, standardize the identifier for the PT_NOTE entry to "note" as used by all other architectures that emit PT_NOTE. Note that there was discussion about changing all architectures to use "notes" instead, but I prefer to avoid that at this time. Changing only powerpc is the smallest change to standardize the entire kernel. And while this standardization does use singular "note" for a section that has more than one note in it, this is just an internal identifier. It matches the ELF "PT_NOTE", and is 4 characters (like "text", and "data") for pretty alignment. The more exposed macro, "NOTES", use the more sensible plural wording. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: Michael Ellerman Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Segher Boessenkool Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-2-keescook@chromium.org commit b419b89b20ccb7b2c7adcbcb9ce42a27ea542c43 Author: Frieder Schrempf Date: Mon Nov 4 11:53:59 2019 +0000 ARM: dts: imx6ul-kontron-n6310: Move common SoM nodes to a separate file The Kontron N6311 and N6411 SoMs are very similar to N6310. In preparation to add support for them, we move the common nodes to a separate file imx6ul-kontron-n6x1x-som-common.dtsi. Signed-off-by: Frieder Schrempf Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 8c666d2ab5762280cb5ef43df4decb2a25450d54 Author: Joe Lawrence Date: Wed Oct 16 13:33:15 2019 +0200 selftests/livepatch: Test interaction with ftrace_enabled Since livepatching depends upon ftrace handlers to implement "patched" code functionality, verify that the ftrace_enabled sysctl value interacts with livepatch registration as expected. At the same time, ensure that ftrace_enabled is set and part of the test environment configuration that is saved and restored when running the selftests. Link: http://lkml.kernel.org/r/20191016113316.13415-4-mbenes@suse.cz Signed-off-by: Joe Lawrence Signed-off-by: Miroslav Benes Signed-off-by: Steven Rostedt (VMware) commit 35c9e74cff4c798d0a07830d0d483e6ebe70352f Author: Joe Lawrence Date: Wed Oct 16 13:33:14 2019 +0200 selftests/livepatch: Make dynamic debug setup and restore generic Livepatch selftests currently save the current dynamic debug config and tweak it for the selftests. The config is restored at the end. Make the infrastructure generic, so that more variables can be saved and restored. Link: http://lkml.kernel.org/r/20191016113316.13415-3-mbenes@suse.cz Signed-off-by: Joe Lawrence Signed-off-by: Miroslav Benes Signed-off-by: Steven Rostedt (VMware) commit 7162431dcf72032835d369c8d7b51311df407938 Author: Miroslav Benes Date: Wed Oct 16 13:33:13 2019 +0200 ftrace: Introduce PERMANENT ftrace_ops flag Livepatch uses ftrace for redirection to new patched functions. It means that if ftrace is disabled, all live patched functions are disabled as well. Toggling global 'ftrace_enabled' sysctl thus affect it directly. It is not a problem per se, because only administrator can set sysctl values, but it still may be surprising. Introduce PERMANENT ftrace_ops flag to amend this. If the FTRACE_OPS_FL_PERMANENT is set on any ftrace ops, the tracing cannot be disabled by disabling ftrace_enabled. Equally, a callback with the flag set cannot be registered if ftrace_enabled is disabled. Link: http://lkml.kernel.org/r/20191016113316.13415-2-mbenes@suse.cz Reviewed-by: Petr Mladek Reviewed-by: Kamalesh Babulal Signed-off-by: Miroslav Benes Signed-off-by: Steven Rostedt (VMware) commit cf94da6f502d8caecabd56b194541c873c8a7a3c Author: Tomas Bortoli Date: Fri Nov 1 21:42:44 2019 +0100 Bluetooth: Fix invalid-free in bcsp_close() Syzbot reported an invalid-free that I introduced fixing a memleak. bcsp_recv() also frees bcsp->rx_skb but never nullifies its value. Nullify bcsp->rx_skb every time it is freed. Signed-off-by: Tomas Bortoli Reported-by: syzbot+a0d209a4676664613e76@syzkaller.appspotmail.com Signed-off-by: Marcel Holtmann commit 41d5b25fed0a010cedbdd25e56fdb92d59c233fa Author: Claire Chang Date: Thu Oct 31 18:46:14 2019 +0800 Bluetooth: hci_qca: add PM support Add PM suspend/resume callbacks for hci_qca driver. BT host will make sure both Rx and Tx go into sleep state in qca_suspend. Without this, Tx may still remain in awake state, which prevents BTSOC from entering deep sleep. For example, BlueZ will send Set Event Mask to device when suspending and this will wake the device Rx up. However, the Tx idle timeout on the host side is 2000 ms. If the host is suspended before its Tx idle times out, it won't send HCI_IBS_SLEEP_IND to the device and the device Rx will remain awake. We implement this by canceling relevant work in workqueue, sending HCI_IBS_SLEEP_IND to the device and then waiting HCI_IBS_SLEEP_IND sent by the device. In order to prevent the device from being awaken again after qca_suspend is called, we introduce QCA_SUSPEND flag. QCA_SUSPEND is set in the beginning of qca_suspend to indicate system is suspending and that we'd like to ignore any further wake events. With QCA_SUSPEND and spinlock, we can avoid race condition, e.g. if qca_enqueue acquires qca->hci_ibs_lock before qca_suspend calls cancel_work_sync and then qca_enqueue adds a new qca->ws_awake_device work after the previous one is cancelled. If BTSOC wants to wake the whole system up after qca_suspend is called, it will keep sending HCI_IBS_WAKE_IND and uart driver will take care of waking the system. For example, uart driver will reconfigure its Rx pin to a normal GPIO pin and enable irq wake on that pin when suspending. Once host detects Rx falling, the system will begin resuming. Then, the BT host clears QCA_SUSPEND flag in qca_resume and begins dealing with normal HCI packets. By doing so, only a few HCI_IBS_WAKE_IND packets are lost and there is no data packet loss. Signed-off-by: Claire Chang Reviewed-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit d2c9be89f8ebe7ebcc97676ac40f8dec1cf9b43a Author: Ming Lei Date: Mon Nov 4 16:26:53 2019 +0800 blk-mq: make sure that line break can be printed 8962842ca5ab ("blk-mq: avoid sysfs buffer overflow with too many CPU cores") avoids sysfs buffer overflow, and reserves one character for line break. However, the last snprintf() doesn't get correct 'size' parameter passed in, so fixed it. Fixes: 8962842ca5ab ("blk-mq: avoid sysfs buffer overflow with too many CPU cores") Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 62c441c6ae054a0f9ff2944908ed09603b035fd3 Author: Revanth Rajashekar Date: Thu Oct 31 10:13:22 2019 -0600 block: sed-opal: Introduce Opal Datastore UID This patch introduces Opal Datastore UID. The generic read/write table ioctl can use this UID to access the Opal Datastore. Reviewed-by: Scott Bauer Reviewed-by: Jon Derrick Signed-off-by: Revanth Rajashekar Signed-off-by: Jens Axboe commit 51f421c85c880dcb37df11e672b384eaa4444328 Author: Revanth Rajashekar Date: Thu Oct 31 10:13:21 2019 -0600 block: sed-opal: Add support to read/write opal tables generically This feature gives the user RW access to any opal table with admin1 authority. The flags described in the new structure determines if the user wants to read/write the data. Flags are checked for valid values in order to allow future features to be added to the ioctl. The user can provide the desired table's UID. Also, the ioctl provides a size and offset field and internally will loop data accesses to return the full data block. Read overrun is prevented by the initiator's sec_send_recv() backend. The ioctl provides a private field with the intention to accommodate any future expansions to the ioctl. Reviewed-by: Scott Bauer Reviewed-by: Jon Derrick Signed-off-by: Revanth Rajashekar Signed-off-by: Jens Axboe commit 3495ea1b5f6083b03af062095eecb37283a2cc8f Author: Revanth Rajashekar Date: Thu Oct 31 10:13:20 2019 -0600 block: sed-opal: Generalizing write data to any opal table This patch refactors the existing "write_shadowmbr" func and creates a new generalized function "generic_table_write_data", to write data to any opal table. Also, a few cleanups are included in this patch. Reviewed-by: Scott Bauer Reviewed-by: Jon Derrick Signed-off-by: Revanth Rajashekar Signed-off-by: Jens Axboe commit 51c3ff62cac635ae9d75f875ce5b7bdafc97abd5 Author: Jens Axboe Date: Sun Nov 3 06:52:50 2019 -0700 io_uring: add completion trace event We currently don't have a completion event trace, add one of those. And to better be able to match up submissions and completions, add user_data to the submission trace as well. Signed-off-by: Jens Axboe commit a69dff995477a57badacfea56438b40e22247cd5 Author: Heikki Krogerus Date: Tue Oct 8 15:26:00 2019 +0300 extcon: axp288: Remove the build-in connection description Getting handle to the USB role switch by first finding its software fwnode. Signed-off-by: Heikki Krogerus Reviewed-by: Hans de Goede Tested-by: Hans de Goede Link: https://lore.kernel.org/r/20191008122600.22340-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c6919d5e0cd168a732034d8dc19fdc3dff683a2b Author: Heikki Krogerus Date: Tue Oct 8 15:25:59 2019 +0300 usb: roles: Add usb_role_switch_find_by_fwnode() Simple wrapper function that searches USB role switches with class_find_device_by_fwnode(). Signed-off-by: Heikki Krogerus Reviewed-by: Hans de Goede Tested-by: Hans de Goede Link: https://lore.kernel.org/r/20191008122600.22340-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a725272bda77e61c1b4de85c7b0c875b2ea639b6 Author: Chuhong Yuan Date: Fri Nov 1 20:17:45 2019 +0800 spi: sifive: disable clk when probe fails and remove The driver forgets to disable and unprepare clk when probe fails and remove. Add the calls to fix the problem. Signed-off-by: Chuhong Yuan Reviewed-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20191101121745.13413-1-hslester96@gmail.com Signed-off-by: Mark Brown commit 8039105987fcd8dda39074df013cfdf0025dd297 Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:45 2019 -0500 ASoC: Intel: boards: sof_rt5682: use dependency on SOF_HDA_LINK The wrong dependency is used and the build can be broken Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 3315e5b40f59d1aab6543773d99b1f19c3ea1848 Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:44 2019 -0500 ASoC: Intel: boards: Geminilake is only supported by SOF Geminilake machine drivers are only tested and recommended with SOF. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c4a09f9a523e674ef9a046e05d99c90f2c9513b1 Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:43 2019 -0500 ASoC: Intel: boards: fix configs for bxt-da7219-max98057a The same driver is reused for 3 different configurations, but the driver will only be build if ApolloLake is selected. Fix and make sure each device can work without dependencies on others (useful for minimal configurations). Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9e7301762f6df44bb4a452b6aecbe0f322b370ee Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:42 2019 -0500 ASoC: Intel: boards: remove select SND_HDA_DSP_LOADER This option is only required with the Skylake platform driver, there is no reason to have this option in machine drivers. This is e.g. useless for SOF-based solutions. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 02701b909c2fab4b49f9c9545ab921c9b2c7a768 Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:41 2019 -0500 ASoC: Intel: Skylake: mark HDAudio codec support as deprecated. This option famously broke audio on Linus' laptop and the problem have not been fixed. Mark as DEPRECATED to avoid any ambiguity with distros. Use SOF if you need HDaudio support w/ the DSP enabled, e.g. for DMIC capture. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b000135e5f272118e576e9720590e5979f0abe49 Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:40 2019 -0500 ASoC: SOF: Intel: use def_tristate, avoid using select So far we used select to use the relevant built-in/module options, but this led to blurring layers between core and Intel Kconfigs. Use def_tristate works just as well and removes Intel stuff from the code. Suggested-by: Arnd Bergmann Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f9ad75468453b019b92c5296e6a04bf7c37f49e4 Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:39 2019 -0500 ASoC: SOF: imx: fix reverse CONFIG_SND_SOC_SOF_OF dependency updated solution to the problem reported with randconfig: CONFIG_SND_SOC_SOF_IMX depends on CONFIG_SND_SOC_SOF, but is in turn referenced by the sof-of-dev driver. This creates a reverse dependency that manifests in a link error when CONFIG_SND_SOC_SOF_OF is built-in but CONFIG_SND_SOC_SOF_IMX=m: sound/soc/sof/sof-of-dev.o:(.data+0x118): undefined reference to `sof_imx8_ops' use def_trisate to propagate the right settings without select. Fixes: f4df4e4042b0 ("ASoC: SOF: imx8: Fix COMPILE_TEST error") Fixes: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support") Suggested-by: Arnd Bergmann Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 70ae4eb540af32ee6a6260143ccae6054ebd433f Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:38 2019 -0500 ASoC: SOF: Kconfig: add EXPERT dependency for developer options, clarify help Some distros select all possible options, despite existing warnings to be careful. This leads to e.g. user reports that the HDaudio codec and DMIC are not handled by SOF. Add an explicit menu item to unlock developer options, and make them dependent on CONFIG_EXPERT. Hopefully with this double-lock these options will only be selected by developers. GitHub issue: https://github.com/thesofproject/sof/issues/1885 Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 280393b712b7e338addc2f7f60b4e4da787ba19b Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:37 2019 -0500 ASoC: Intel: add mutual exclusion between SOF and legacy Baytrail driver This legacy driver is already deprecated, let's make sure there is no conflict with SOF. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a6955fe0e2309feeab5ec71e4b0dcbe498f4f497 Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:36 2019 -0500 ASoC: SOF: Intel: Broadwell: clarify mutual exclusion with legacy driver Some distros select all options blindly, which leads to confusion and bug reports. SOF does not fully support Broadwell due to firmware dependencies, the machine drivers can only support one option, and UCM/topology files are still being propagated to downstream distros, so make SOF on Broadwell an opt-in option that first require distros to opt-out of existing defaults. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204237 Fixes: f35bf70f61d3 ('ASoC: Intel: Make sure BDW based machine drivers build for SOF') Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit df7257e544faf838c3e7ad6b4e89ffe59e87f5e1 Author: Pierre-Louis Bossart Date: Fri Nov 1 12:30:35 2019 -0500 ASoC: SOF: Intel: Baytrail: clarify mutual exclusion with Atom/SST driver Some distros select all options blindly, which leads to confusion and bug reports. Since SOF does not support Baytrail-CR for now, and UCM/topology files are still being propagated to downstream distros, make SOF on Baytrail an opt-in option that first require distros to opt-out of existing defaults. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101173045.27099-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 65c56f5dccc87ca2993a50672e144c7378189f2c Author: Ranjani Sridharan Date: Fri Nov 1 12:09:16 2019 -0500 ASoC: SOF: Intel: hda: Simplify the hda_dsp_wait_d0i3c_done() function Remove the retry argument for the hda_dsp_wait_d0i3c_done() function and use the HDA_DSP_REG_POLL_RETRY_COUNT macro directly. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101170916.26517-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 17fe95d6df9320409015e5114309a3c05e31b736 Author: Naveen Manohar Date: Fri Nov 1 12:18:47 2019 -0500 ASoC: Intel: boards: Add CML m/c using RT1011 and RT5682 Machine driver to enable RT5682 on SSP0, DMIC, HDMI and RT1011 AMP on SSP1 with 2 CH / 24 bit TDM Playback over 4 individual codecs and 4 CH / 24 bit Capture to provide feedback. Signed-off-by: Naveen Manohar Signed-off-by: Sathya Prakash M R Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101171847.26767-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f95ce1355944189c26e4182c813d7f018b434dbd Author: Naveen Manohar Date: Fri Nov 1 12:18:46 2019 -0500 ASoC: Intel: Add acpi match for rt1011 based m/c driver Add match for CML m/c with RT1011 and RT5682 Signed-off-by: Naveen Manohar Signed-off-by: Sathya Prakash M R Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191101171847.26767-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e0859710516c98b189879966b48ea1c77e0cd979 Author: zhong jiang Date: Thu Oct 31 21:34:15 2019 +0800 ASoC: ux500: Remove redundant variable "status" local variable "status" is not used. hence it is safe to remove and just return 0. Signed-off-by: zhong jiang Link: https://lore.kernel.org/r/1572528855-25990-1-git-send-email-zhongjiang@huawei.com Signed-off-by: Mark Brown commit 35714565089e5e8b091c1155517b67e29118f09d Author: Johan Hovold Date: Fri Nov 1 18:24:10 2019 +0100 USB: serial: ch341: reimplement line-speed handling The current ch341 divisor algorithm was known to give inaccurate results for certain higher line speeds. Jonathan Olds investigated this, determined the basic equations used to derive the divisors and confirmed them experimentally [1]. The equations Jonathan used could be generalised further to: baudrate = 48000000 / (2^(12 - 3 * ps - fact) * div), where 0 <= ps <= 3, 0 <= fact <= 1, 2 <= div <= 256 if fact = 0, or 9 <= div <= 256 if fact = 1 which will also give better results for lower rates. Notably the error is reduced for the following standard rates: 1152000 (4.0% instead of 15% error) 921600 (0.16% instead of -7.5% error) 576000 (-0.80% instead of -5.6% error) 200 (0.16% instead of -0.69% error) 134 (-0.05% instead of -0.63% error) 110 (0.03% instead of -0.44% error) but also for many non-standard ones. The current algorithm also suffered from rounding issues (e.g. requesting 2950000 Bd resulted in a rate of 2 MBd instead of 3 MBd and thus a -32% instead of 1.7% error). The new algorithm was inspired by the current vendor driver even if that one only handles two higher rates that require fact=1 by hard coding the corresponding divisors [2]. Michael Dreher also did a similar generalisation of Jonathan's work and has published his results with a very good summary that provides further insights into how this device works [3]. [1] https://lkml.kernel.org/r/000001d51f34$bad6afd0$30840f70$@co.nz [2] http://www.wch.cn/download/CH341SER_LINUX_ZIP.html [3] https://github.com/nospam2000/ch341-baudrate-calculation Reported-by: Jonathan Olds Tested-by: Jonathan Olds Cc: Michael Dreher Signed-off-by: Johan Hovold commit f84fdcbc8ec02ea34bbc641359c2a69d0d1242d4 Author: Zhang Rui Date: Thu Oct 31 21:18:12 2019 +0800 powercap/intel_rapl: add support for Cometlake desktop Add CometLake desktop support in intel_rapl driver Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit cae478114fbe2e6f4cb9194360cf0789a923be13 Author: Zhang Rui Date: Thu Oct 31 21:18:11 2019 +0800 powercap/intel_rapl: add support for CometLake Mobile Add CometLake Mobile support in intel_rapl driver Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 99e18df3a41a044c6ac83e5e8310c228221881c9 Merge: a1bb46c36ce3 db0d32d84031 Author: Rafael J. Wysocki Date: Mon Nov 4 11:48:08 2019 +0100 Merge back earlier cpufreq material for v5.5. commit db0d32d84031188443e25edbd50a71a6e7ac5d1d Author: John Hubbard Date: Wed Oct 30 22:21:59 2019 -0700 cpufreq: powernv: fix stack bloat and hard limit on number of CPUs The following build warning occurred on powerpc 64-bit builds: drivers/cpufreq/powernv-cpufreq.c: In function 'init_chip_info': drivers/cpufreq/powernv-cpufreq.c:1070:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=] This is with a cross-compiler based on gcc 8.1.0, which I got from: https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/ The warning is due to putting 1024 bytes on the stack: unsigned int chip[256]; ...and it's also undesirable to have a hard limit on the number of CPUs here. Fix both problems by dynamically allocating based on num_possible_cpus, as recommended by Michael Ellerman. Fixes: 053819e0bf840 ("cpufreq: powernv: Handle throttling due to Pmax capping at chip level") Signed-off-by: John Hubbard Acked-by: Viresh Kumar Cc: 4.10+ # 4.10+ Signed-off-by: Rafael J. Wysocki commit 737ffb27f2f1a8fe6644cac535486f7f25bbf6cb Author: Viresh Kumar Date: Tue Oct 22 15:47:57 2019 +0530 cpufreq: Clarify the comment in cpufreq_set_policy() One of the responsibility of the ->verify() callback is to make sure that the policy's min frequency is <= max frequency as this isn't guaranteed by the QoS framework which gave us those values. Update the comment in cpufreq_set_policy() to clarify that. Suggested-by: Rafael J. Wysocki Signed-off-by: Viresh Kumar [ rjw: Minor changes of the new comment ] Signed-off-by: Rafael J. Wysocki commit a0828b6ccbdfd46afbbaa9f28df359081c29109b Author: Jan Kara Date: Mon Nov 4 11:18:17 2019 +0100 quota: Handle quotas without quota inodes in dquot_get_state() Make dquot_get_state() gracefully handle a situation when there are no quota files present even though quotas are enabled. Signed-off-by: Jan Kara commit 2ec1f3011f3fdcbafcaad23aafa5acb6861a2646 Author: Jan Kara Date: Mon Nov 4 11:12:44 2019 +0100 quota: Make dquot_disable() work without quota inodes Quota on and quota off are protected by s_umount semaphore held in exclusive mode since commit 7d6cd73d33b6 "quota: Hold s_umount in exclusive mode when enabling / disabling quotas". This makes it impossible for dquot_disable() to race with other enabling or disabling of quotas. Simplify the cleanup done by dquot_disable() based on this fact and also remove some stale comments. As a bonus this cleanup makes dquot_disable() properly handle a case when there are no quota inodes. Signed-off-by: Jan Kara commit 6111fd2370eecae9f11bfdc08ba097e0b51fcfd3 Author: Takashi Iwai Date: Mon Nov 4 11:11:15 2019 +0100 ALSA: pcm: Fix missing check of the new non-cached buffer type The check for the mmap support via hw_support_mmap() function misses the case where the device is with SNDRV_DMA_TYPE_DEV_UC, which should have been treated equally as SNDRV_DMA_TYPE_DEV. Let's fix it. Note that this bug doesn't hit any practical problem, because SNDRV_DMA_TYPE_DEV_UC is used only for x86-specific drivers (snd-hda-intel and snd-intel8x0) for the specific platforms that need the non-cached buffers. And, on such platforms, hw_support_mmap() already returns true in anyway. That's the reason I didn't put Cc-to-stable mark here. This is only for any theoretical future extension. Fixes: 425da159707b ("ALSA: pcm: use dma_can_mmap() to check if a device supports dma_mmap_*") Fixes: 42e748a0b325 ("ALSA: memalloc: Add non-cached buffer type") Link: https://lore.kernel.org/r/20191104101115.27311-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7c202575ef63f1c67832acea2179f07f8a2cf7bc Merge: e44ff9ea8f4c 7d6475051fb3 Author: Michael Ellerman Date: Mon Nov 4 21:01:59 2019 +1100 Merge branch 'fixes' into next Merge our fixes branch, primarily to bring in the powernv CPU hotplug warning fix. commit 032f128dbd29a376ff8f622150191f3aea8b2e9f Author: Geert Uytterhoeven Date: Mon Oct 21 09:04:38 2019 +0200 m68k: defconfig: Enable ICY I2C and LTC2990 on Amiga Enable support for the ICY I2C board for Amiga, which is typically equipped with an LTC2990 hwmon chip, in the Amiga and multi-platform defconfig files. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191021070438.10819-1-geert@linux-m68k.org Acked-by: Max Staudt commit 84ba838990fcbdf84f87d11ce97779ce28ade5c8 Author: Geert Uytterhoeven Date: Tue Oct 1 09:35:39 2019 +0200 m68k: defconfig: Update defconfigs for v5.4-rc1 Actual changes: -# CONFIG_BACKLIGHT_CLASS_DEVICE is not set -CONFIG_CRYPTO_AEGIS128L=m -CONFIG_CRYPTO_AEGIS256=m -CONFIG_CRYPTO_MORUS1280=m -CONFIG_CRYPTO_MORUS640=m +CONFIG_DM_CLONE=m +CONFIG_EROFS_FS=m -# CONFIG_LCD_CLASS_DEVICE is not set Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191001073539.4488-1-geert@linux-m68k.org commit 6e001f6a4cc73cd06fc7b8c633bc4906c33dd8ad Author: Chuhong Yuan Date: Wed Oct 16 20:43:30 2019 +0800 clocksource/drivers/asm9260: Add a check for of_clk_get asm9260_timer_init misses a check for of_clk_get. Add a check for it and print errors like other clocksource drivers. Signed-off-by: Chuhong Yuan Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191016124330.22211-1-hslester96@gmail.com commit b35a5e5961f814799b75a97a16c9b51e0d477c06 Author: Geert Uytterhoeven Date: Wed Oct 16 16:47:47 2019 +0200 clocksource/drivers/renesas-ostm: Use unique device name instead of ostm Currently all OSTM devices are called "ostm", also in kernel messages. As there can be multiple instances in an SoC, this can confuse the user. Hence construct a unique name from the DT node name, like is done for platform devices. On RSK+RZA1, the boot log changes like: -clocksource: ostm: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 57352151442 ns +clocksource: timer@fcfec000: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 57352151442 ns sched_clock: 32 bits at 33MHz, resolution 30ns, wraps every 64440619504ns -ostm: used for clocksource -ostm: used for clock events +/soc/timer@fcfec000: used for clocksource +/soc/timer@fcfec400: used for clock events ... -clocksource: Switched to clocksource ostm +clocksource: Switched to clocksource timer@fcfec000 Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191016144747.29538-5-geert+renesas@glider.be commit 227314239a5e87fb531cbf3bd8953b2d1d2694bd Author: Geert Uytterhoeven Date: Wed Oct 16 16:47:46 2019 +0200 clocksource/drivers/renesas-ostm: Convert to timer_of Convert the Renesas OSTM driver to use the timer_of framework. This reduces the driver object size by 367 bytes (with gcc 7.4.0). Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191016144747.29538-4-geert+renesas@glider.be commit 4411464d6f8b5e5759637235a6f2b2a85c2be0f1 Author: Geert Uytterhoeven Date: Wed Oct 16 16:47:45 2019 +0200 clocksource/drivers/timer-of: Use unique device name instead of timer If a hardware-specific driver does not provide a name, the timer-of core falls back to device_node.name. Due to generic DT node naming policies, that name is almost always "timer", and thus doesn't identify the actual timer used. Fix this by using device_node.full_name instead, which includes the unit addrees. Example impact on /proc/timer_list: -Clock Event Device: timer +Clock Event Device: timer@fcfec400 Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191016144747.29538-3-geert+renesas@glider.be commit ccb80012481fd8d16c7557c00bb54c42103eef9d Author: Geert Uytterhoeven Date: Wed Oct 16 16:47:44 2019 +0200 clocksource/drivers/timer-of: Convert last full_name to %pOF Commit 469869d18a886e04 ("clocksource: Convert to using %pOF instead of full_name") converted all but the one just added before by commit 32f2fea6e77e64cd ("clocksource/drivers/timer-of: Handle of_irq_get_byname() result correctly"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191016144747.29538-2-geert+renesas@glider.be commit 069a9166369773627e51c5249cd7f9169aecd7fa Author: Jan Kara Date: Fri Nov 1 18:57:56 2019 +0100 quota: Drop dquot_enable() Now dquot_enable() has only two internal callers and both of them just need to update quota flags and don't need most of checks. Just drop dquot_enable() and fold necessary functionality into the two calling places. Signed-off-by: Jan Kara commit 7212b95e61516671672380c6c9d6d80f4f306198 Author: Jan Kara Date: Fri Nov 1 18:55:38 2019 +0100 fs: Use dquot_load_quota_inode() from filesystems Use dquot_load_quota_inode from filesystems instead of dquot_enable(). In all three cases we want to load quota inode and never use the function to update quota flags. Signed-off-by: Jan Kara commit dc19432ae1c22d696f91edea11ae06c348b4e88a Author: Jan Kara Date: Fri Nov 1 18:37:44 2019 +0100 quota: Rename vfs_load_quota_inode() to dquot_load_quota_inode() Rename vfs_load_quota_inode() to dquot_load_quota_inode() to be consistent with naming of other functions used for enabling quota accounting from filesystems. Also export the function and add some sanity checks to assure filesystems are calling the function properly. Signed-off-by: Jan Kara commit ae45f07d47cc30e9170488a4e5fe91ba4fe5ed4e Author: Jan Kara Date: Fri Nov 1 17:51:05 2019 +0100 quota: Simplify dquot_resume() We already have quota inode loaded when resuming quotas. Use vfs_load_quota() to avoid some pointless churn with the quota inode. Signed-off-by: Jan Kara commit c7d3d28360fdb3ed3a5aa0bab19315e0fdc994a1 Author: Jan Kara Date: Fri Nov 1 17:45:31 2019 +0100 quota: Factor out setup of quota inode Factor out setting up of quota inode and eventual error cleanup from vfs_load_quota_inode(). This will simplify situation for filesystems that don't have any quota inodes. Signed-off-by: Jan Kara commit 6012b9346d8959194c239fd60a62dfec98d43048 Author: Luiz Augusto von Dentz Date: Sun Nov 3 23:58:15 2019 +0200 Bluetooth: Fix advertising duplicated flags Instances may have flags set as part of its data in which case the code should not attempt to add it again otherwise it can cause duplication: < HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 35 Handle: 0x00 Operation: Complete extended advertising data (0x03) Fragment preference: Minimize fragmentation (0x01) Data length: 0x06 Flags: 0x04 BR/EDR Not Supported Flags: 0x06 LE General Discoverable Mode BR/EDR Not Supported Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Johan Hedberg commit 227125fe728b0d57abb26adb980206462c2e733c Author: Fabio Estevam Date: Thu Oct 31 17:20:28 2019 -0300 arm64: dts: imx8mn-evk: Remove invalid Atheros properties None of these at803x properties are documented anywhere, so just remove them. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 09b0965ee8cced20a4791ff54506f1a6600996fe Author: Greg Kroah-Hartman Date: Mon Nov 4 08:38:07 2019 +0100 IB: mlx5: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Leon Romanovsky Cc: Doug Ledford Cc: Jason Gunthorpe Cc: linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman commit e9c837c6ab07127b02357efcfe1a23d030db1aca Author: John David Anglin Date: Sat Nov 2 12:43:17 2019 -0400 parisc: Avoid spurious inequivalent alias kernel error messages This patch changes flush_dcache_page() to only print inequivalent alias error messages on systems that require coherency. Inequivalent aliases can occur on systems that don't require coherency and this can cause spurious messages. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit c7cb7c96f312f6afb3ed07f596b9b80d8a2c6441 Author: Peng Fan Date: Mon Nov 4 06:19:30 2019 +0000 arm64: defconfig: Change CONFIG_AT803X_PHY from m to y With phy-reset-gpios are enabled for i.MX8MM-EVK board, phy will be reset. Without CONFIG_AT803X_PHY as y, board will stop booting in NFS DHCP, because phy is not ready. So mark CONFIG_AT803X_PHY from m to y to make board boot when using nfs rootfs. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 16c8373ecf7b3c723a8e765d798ea413bc8345a6 Merge: d19f1d44e743 a99d8080aaf3 Author: Greg Kroah-Hartman Date: Mon Nov 4 06:41:09 2019 +0100 Merge 5.4-rc6 into usb-next We need the USB fixes in here to build on top of. Signed-off-by: Greg Kroah-Hartman commit 915603b106164f966ebc027de96e54011885bdf4 Author: Bjorn Andersson Date: Tue Oct 1 21:16:54 2019 -0700 arm64: dts: qcom: db845c: Enable LVS 1 and 2 vreg_lvs1a_1p8 and vreg_lvs2a_1p8 are both feeding pins in the low speed connectors and should as such alway be on, so enable them. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 768e1a8e093677f5e0e7d0a447c1a856c16cbb66 Author: Leonard Crestez Date: Wed Oct 30 01:17:39 2019 +0200 soc: imx8mq: Read SOC revision from TF-A SOC revision on older imx8mq is not available in fuses so on anything other than B1 current code just reports "unknown". TF-A already handles this by parsing the ROM and exposes the value through a SMC call. Call this instead of reimplementing the workaround in the kernel itself. Signed-off-by: Leonard Crestez Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 1574cf83c7a069f5f29295170ed8a568ccebcb7b Merge: a37ac8ae66e2 667f264676c7 Author: David S. Miller Date: Sun Nov 3 19:23:49 2019 -0800 Merge tag 'mlx5-updates-2019-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2019-11-01 Misc updates for mlx5 netdev and core driver 1) Steering Core: Replace CRC32 internal implementation with standard kernel lib. 2) Steering Core: Support IPv4 and IPv6 mixed matcher. 3) Steering Core: Lockless FTE read lookups 4) TC: Bit sized fields rewrite support. 5) FPGA: Standalone FPGA support. 6) SRIOV: Reset VF parameters configurations on SRIOV disable. 7) netdev: Dump WQs wqe descriptors on CQE with error events. 8) MISC Cleanups. ==================== Signed-off-by: David S. Miller commit a37ac8ae66e27369aebd29f17f4e1bd83d213114 Author: YueHaibing Date: Fri Nov 1 21:44:47 2019 +0800 mISDN: remove unused variable 'faxmodulation_s' drivers/isdn/hardware/mISDN/mISDNisar.c:30:17: warning: faxmodulation_s defined but not used [-Wunused-const-variable=] It is never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 43622eab8d0adedbb06380a355b941289d495f57 Author: Trond Myklebust Date: Fri Nov 1 15:33:55 2019 -0400 NFS: Add a tracepoint in nfs_fh_to_dentry() Add a tracepoint in nfs_fh_to_dentry() for debugging issues with bad userspace filehandles. Signed-off-by: Trond Myklebust commit 70d136b2dc184f1c9d026de443dbe635ea8a0839 Author: Trond Myklebust Date: Sat Oct 26 22:37:40 2019 -0400 NFSv4: Don't retry the GETATTR on old stateid in nfs4_delegreturn_done() If the server returns NFS4ERR_OLD_STATEID, then just skip retrying the GETATTR when replaying the delegreturn compound. We know nothing will have changed on the server. Signed-off-by: Trond Myklebust commit 246afc0aa5a7c66b081fbcab4d70ec379df3cb62 Author: Trond Myklebust Date: Thu Oct 24 18:00:35 2019 -0400 NFSv4: Handle NFS4ERR_OLD_STATEID in delegreturn If the server returns NFS4ERR_OLD_STATEID in response to our delegreturn, we want to sync to the most recent seqid for the delegation stateid. However if we are already at the most recent, we have two possibilities: - an OPEN reply is still outstanding and will return a new seqid - an earlier OPEN reply was dropped on the floor due to a timeout. In the latter case, we may end up unable to complete the delegreturn, so we want to bump the seqid to a value greater than the cached value. While this may cause us to lose the delegation in the former case, it should now be safe to assume that the client will replay the OPEN if necessary in order to get a new valid stateid. Signed-off-by: Trond Myklebust commit ee05f456772d4e3a04b539187473f50c394da5fa Author: Trond Myklebust Date: Mon Oct 21 13:56:59 2019 -0400 NFSv4: Fix races between open and delegreturn If the server returns the same delegation in an open that we just used in a delegreturn, we need to ensure we don't apply that stateid if the delegreturn has freed it on the server. To do so, we ensure that we do not free the storage for the delegation until either it is replaced by a new one, or we throw the inode out of cache. Signed-off-by: Trond Myklebust commit 42c304c34e2d2c73d301b222418ac019918a1c59 Author: Trond Myklebust Date: Sat Oct 26 10:16:15 2019 -0400 NFS: nfs_inode_find_state_and_recover() fix stateid matching In nfs_inode_find_state_and_recover() we want to mark for recovery only those stateids that match or are older than the supplied stateid parameter. Signed-off-by: Trond Myklebust commit 3887ce1aac3a02df3d992cf82d0c644d26d64635 Author: Trond Myklebust Date: Sun Oct 27 13:48:18 2019 -0400 NFSv4: Fix nfs4_inode_make_writeable() Fix the checks in nfs4_inode_make_writeable() to ignore the case where we hold no delegations. Currently, in such a case, we automatically flush writes. Signed-off-by: Trond Myklebust commit 40e6aa10aaf233b58db319e77a6a05ed633e107c Author: Trond Myklebust Date: Sun Oct 27 13:38:45 2019 -0400 NFSv4: nfs4_return_incompatible_delegation() should check delegation validity Ensure that we check that the delegation is valid in nfs4_return_incompatible_delegation() before we try to return it. Signed-off-by: Trond Myklebust commit 1deed572351806322c3d9af005c2cf931ff23174 Author: Trond Myklebust Date: Tue Oct 22 08:52:47 2019 -0400 NFSv4: Don't reclaim delegations that have been returned or revoked If the delegation has already been revoked, we want to avoid reclaiming it on reboot. Signed-off-by: Trond Myklebust commit af20b7b850c5786979f773ba25dab70c85914466 Author: Trond Myklebust Date: Tue Oct 22 13:40:47 2019 -0400 NFSv4: Ignore requests to return the delegation if it was revoked If the delegation was revoked, or is already being returned, just clear the NFS_DELEGATION_RETURN and NFS_DELEGATION_RETURN_IF_CLOSED flags and keep going. Signed-off-by: Trond Myklebust commit d51f91d262aae047ea3b1496e333a83ce70bb48a Author: Trond Myklebust Date: Mon Oct 21 14:22:14 2019 -0400 NFSv4: Revoke the delegation on success in nfs4_delegreturn_done() If the delegation was successfully returned, then mark it as revoked. Signed-off-by: Trond Myklebust commit f2d47b5502054749b278cdaf9cb9a60415cf884a Author: Trond Myklebust Date: Mon Oct 21 14:15:32 2019 -0400 NFSv4: Update the stateid seqid in nfs_revoke_delegation() If we revoke a delegation, but the stateid's seqid is newer, then ensure we update the seqid when marking the delegation as revoked. Signed-off-by: Trond Myklebust commit ae084a32ee9230ca78c88d646efa0157b2dbca29 Author: Trond Myklebust Date: Mon Oct 21 14:17:34 2019 -0400 NFSv4: Clear the NFS_DELEGATION_REVOKED flag in nfs_update_inplace_delegation() If the server sent us a new delegation stateid that is more recent than the one that got revoked, then clear the NFS_DELEGATION_REVOKED flag. Signed-off-by: Trond Myklebust commit e0f07896affd27ec378857dd6fccad0a43e52d35 Author: Trond Myklebust Date: Mon Oct 21 14:11:00 2019 -0400 NFSv4: Hold the delegation spinlock when updating the seqid Signed-off-by: Trond Myklebust commit f9e0cc9c97906ede17ca5cd56a7b170830f4369a Author: Trond Myklebust Date: Mon Oct 21 14:12:13 2019 -0400 NFSv4: Don't remove the delegation from the super_list more than once Add a check to ensure that we haven't already removed the delegation from the inode after we take all the relevant locks. Signed-off-by: Trond Myklebust commit b47e0e478c494a5e276f7d9b455b0f26bf33fc9c Author: Trond Myklebust Date: Mon Oct 21 14:04:00 2019 -0400 NFS: Rename nfs_inode_return_delegation_noreclaim() Rename nfs_inode_return_delegation_noreclaim() to nfs_inode_evict_delegation(), which better describes what it does. Signed-off-by: Trond Myklebust commit b57562087b0473374de61a7cc8ea200c4e34d295 Author: Trond Myklebust Date: Tue Oct 22 13:34:06 2019 -0400 NFSv4: fail nfs4_refresh_delegation_stateid() when the delegation was revoked If the delegation was revoked, we don't want to retry the delegreturn. Signed-off-by: Trond Myklebust commit 457a50424bdde44fbd394ee459fdbfb9ffc4e412 Author: Trond Myklebust Date: Tue Oct 22 08:46:06 2019 -0400 NFSv4: Delegation recalls should not find revoked delegations If we're processsing a delegation recall, ignore the delegations that have already been revoked or returned. Signed-off-by: Trond Myklebust commit 5decae1623f5a1e409ed6befdc7c03ce53e8cd09 Author: Trond Myklebust Date: Tue Oct 22 08:35:57 2019 -0400 NFSv4: nfs4_callback_getattr() should ignore revoked delegations If the delegation has been revoked, ignore it. Signed-off-by: Trond Myklebust commit 333ac786a1b4a366da9830f550ba440e398bb5a5 Author: Trond Myklebust Date: Tue Oct 22 12:12:17 2019 -0400 NFSv4: Fix delegation handling in update_open_stateid() If the delegation is marked as being revoked, then don't use it in the open state structure. Signed-off-by: Trond Myklebust commit e6237b6feb37582fbd6bd7a8336d1256a6b4b4f9 Author: Trond Myklebust Date: Thu Oct 17 11:13:54 2019 -0400 NFSv4.1: Don't rebind to the same source port when reconnecting to the server NFSv2, v3 and NFSv4 servers often have duplicate replay caches that look at the source port when deciding whether or not an RPC call is a replay of a previous call. This requires clients to perform strange TCP gymnastics in order to ensure that when they reconnect to the server, they bind to the same source port. NFSv4.1 and NFSv4.2 have sessions that provide proper replay semantics, that do not look at the source port of the connection. This patch therefore ensures they can ignore the rebind requirement. Signed-off-by: Trond Myklebust commit 52f98f1a2ddd2bb561f2c7e3b19a81d816a63118 Author: Trond Myklebust Date: Thu Oct 17 09:49:45 2019 -0400 NFS/pnfs: Separate NFSv3 DS and MDS traffic If a NFSv3 server is being used as both a DS and as a regular NFSv3 server, we may want to keep the IO traffic on a separate TCP connection, since it will typically have very different timeout characteristics. This patch therefore sets up a flag to separate the two modes of operation for the nfs_client. Signed-off-by: Trond Myklebust commit c6eb58435b98bd843d3179664a0195ff25adb2c3 Author: Trond Myklebust Date: Thu Oct 3 14:12:46 2019 -0400 pNFS: nfs3_set_ds_client should set NFS_CS_NOPING Connecting to the DS is a non-interactive, asynchronous task, so there is no reason to fire up an extra RPC null ping in order to ensure that the server is up. Signed-off-by: Trond Myklebust commit 4b1b69cedf9de8c203101ea74510c07d428538f7 Author: Trond Myklebust Date: Thu Oct 3 14:08:43 2019 -0400 NFS: Add a flag to tell nfs_client to set RPC_CLNT_CREATE_NOPING Add a flag to tell the nfs_client it should set RPC_CLNT_CREATE_NOPING when creating the rpc client. Signed-off-by: Trond Myklebust commit d0372b679c319487cbb190a40993b194d4fb343c Author: Trond Myklebust Date: Thu Oct 17 09:37:44 2019 -0400 NFS: Use non-atomic bit ops when initialising struct nfs_client_initdata We don't need atomic bit ops when initialising a local structure on the stack. Signed-off-by: Trond Myklebust commit 6430b323ae09f146dfc26e6d17c432bfc3d11452 Author: Trond Myklebust Date: Fri Oct 4 17:00:02 2019 -0400 NFSv3: Clean up timespec encode Simplify the struct iattr timestamp encoding by skipping the step of an intermediate struct timespec. Signed-off-by: Trond Myklebust commit c9dbfd961b875fb94de0298c39a9ba8d3843fcd7 Author: Trond Myklebust Date: Fri Oct 4 16:57:45 2019 -0400 NFSv2: Clean up timespec encode Simplify the struct iattr timestamp encoding by skipping the step of an intermediate struct timespec. Signed-off-by: Trond Myklebust commit ad97a995d8edff820d4238bd0dfc69f440031ae6 Author: Trond Myklebust Date: Fri Oct 4 17:01:54 2019 -0400 NFSv2: Fix a typo in encode_sattr() Encode the mtime correctly. Fixes: 95582b0083883 ("vfs: change inode times to use struct timespec64") Signed-off-by: Trond Myklebust commit 7d34ff5141650baefc42bdeabea151574e3b69c2 Author: Trond Myklebust Date: Fri Oct 4 16:46:53 2019 -0400 NFSv4: NFSv4 callbacks also support 64-bit timestamps Convert the NFSv4 callbacks to use struct timestamp64, rather than truncating times to 32-bit values. Signed-off-by: Trond Myklebust commit e7d4b05c5ee312c5ed37aa1bdaa572c2fc9e473f Author: Trond Myklebust Date: Fri Oct 4 16:43:09 2019 -0400 NFSv4: Encode 64-bit timestamps NFSv4 supports 64-bit timestamps, so there is no point in converting the struct iattr timestamps to 32-bits before encoding. Signed-off-by: Trond Myklebust commit e86d5a02874c1364c50e1b532481835b54173ed2 Author: Trond Myklebust Date: Fri Oct 4 16:38:56 2019 -0400 NFS: Convert struct nfs_fattr to use struct timespec64 NFSv4 supports 64-bit times, so we should switch to using struct timespec64 when decoding attributes. Signed-off-by: Trond Myklebust commit 22a1ae9a93fb64600d0756e8f8051d65527f6786 Author: Trond Myklebust Date: Wed Aug 21 18:16:28 2019 -0400 NFS: If nfs_mountpoint_expiry_timeout < 0, do not expire submounts If we set nfs_mountpoint_expiry_timeout to a negative value, then allow that to imply that we do not expire NFSv4 submounts. Signed-off-by: Trond Myklebust commit 1bfe610491082f2eeaa74f5fbc4136cb8302831b Author: Anson Huang Date: Thu Oct 31 08:43:42 2019 +0800 ARM: dts: imx7ulp-evk: Use APLL_PFD1 as usdhc's clock source i.MX7ULP does NOT support runtime switching clock source for PCC, APLL_PFD1 by default is usdhc's clock source, so just use it in kernel to avoid below kernel dump during kernel boot up and make sure kernel can boot up with SD root file-system. [ 3.035892] Loading compiled-in X.509 certificates [ 3.136301] sdhci-esdhc-imx 40370000.mmc: Got CD GPIO [ 3.242886] mmc0: Reset 0x1 never completed. [ 3.247190] mmc0: sdhci: ============ SDHCI REGISTER DUMP =========== [ 3.253751] mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00000002 [ 3.260218] mmc0: sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000001 [ 3.266775] mmc0: sdhci: Argument: 0x00009a64 | Trn mode: 0x00000000 [ 3.273333] mmc0: sdhci: Present: 0x00088088 | Host ctl: 0x00000002 [ 3.279794] mmc0: sdhci: Power: 0x00000000 | Blk gap: 0x00000080 [ 3.286350] mmc0: sdhci: Wake-up: 0x00000008 | Clock: 0x0000007f [ 3.292901] mmc0: sdhci: Timeout: 0x0000008c | Int stat: 0x00000000 [ 3.299364] mmc0: sdhci: Int enab: 0x007f010b | Sig enab: 0x00000000 [ 3.305918] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00008402 [ 3.312471] mmc0: sdhci: Caps: 0x07eb0000 | Caps_1: 0x0000b400 [ 3.318934] mmc0: sdhci: Cmd: 0x0000113a | Max curr: 0x00ffffff [ 3.325488] mmc0: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x0039b37f [ 3.332040] mmc0: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x00400e00 [ 3.338501] mmc0: sdhci: Host ctl2: 0x00000000 [ 3.343051] mmc0: sdhci: ============================================ Fixes: 20434dc92c05 ("ARM: dts: imx: add common imx7ulp dtsi support") Signed-off-by: Anson Huang Tested-by: Fabio Estevam Signed-off-by: Shawn Guo commit 7cd156e2f9d3a45342d00f434a54ec499befc974 Author: Andreas Kemnade Date: Sat Oct 26 21:57:48 2019 +0200 ARM: dts: imx: add devicetree for Kobo Clara HD This adds a devicetree for the Kobo Clara HD Ebook reader. It is on based on boards called "e60k02". It is equipped with an imx6sll SoC. Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo commit c100ea86e6abe759b1f6e8a88fc89abdb6aa0446 Author: Andreas Kemnade Date: Sat Oct 26 21:57:47 2019 +0200 ARM: dts: add Netronix E60K02 board common file The Netronix board E60K02 can be found some several Ebook-Readers, at least the Kobo Clara HD and the Tolino Shine 3. The board is equipped with different SoCs requiring different pinmuxes. For now the following peripherals are included: - LED - Power Key - Cover (gpio via hall sensor) - RC5T619 PMIC (the kernel misses support for rtc and charger subdevices). - Backlight via lm3630a - Wifi sdio chip detection (mmc-powerseq and stuff) It is based on vendor kernel but heavily reworked due to many changed bindings. Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo commit aa2f77ceb8ab83ede4507cd58a5c1ee902e1d7cb Author: Andreas Kemnade Date: Sat Oct 26 21:57:46 2019 +0200 dt-bindings: arm: fsl: add compatible string for Kobo Clara HD This adds a compatible string for the Kobo Clara HD eBook reader. Signed-off-by: Andreas Kemnade Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 3a6ba7dc7799355557938fbdc15a558236011429 Author: Vincent Cheng Date: Thu Oct 31 23:20:07 2019 -0400 ptp: Add a ptp clock driver for IDT ClockMatrix. The IDT ClockMatrix (TM) family includes integrated devices that provide eight PLL channels. Each PLL channel can be independently configured as a frequency synthesizer, jitter attenuator, digitally controlled oscillator (DCO), or a digital phase lock loop (DPLL). Typically these devices are used as timing references and clock sources for PTP applications. This patch adds support for the device. Co-developed-by: Richard Cochran Signed-off-by: Richard Cochran Signed-off-by: Vincent Cheng Signed-off-by: David S. Miller commit 5c5e7aac63ae1af56a50fa743983c96a99d7620d Author: Vincent Cheng Date: Thu Oct 31 23:20:06 2019 -0400 dt-bindings: ptp: Add device tree binding for IDT ClockMatrix based PTP clock Add device tree binding doc for the IDT ClockMatrix PTP clock. Signed-off-by: Vincent Cheng Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e315c7b3da0e1bc48ad7aa33c2ebe7801157a2db Merge: 3c8b2e2c41a9 46d2f6d0c99f Author: Olof Johansson Date: Sun Nov 3 17:32:25 2019 -0800 Merge tag 'mvebu-dt64-5.5-1' of git://git.infradead.org/linux-mvebu into arm/dt mvebu dt64 for 5.5 (part 1) - Add new Marvell CN9130 SoC support (CN9130 is made of one AP807 and one internal CP115, similar to the Armada 7K/8K using AP806 and CP110). - Reorganize EspressoBin device tree to add new variant of the boards (Armada 3270 based) - Add firmware node for turris Mox (Armada 3720 based) * tag 'mvebu-dt64-5.5-1' of git://git.infradead.org/linux-mvebu: (23 commits) arm64: dts: armada-3720-turris-mox: add firmware node arm64: dts: marvell: add ESPRESSObin variants arm64: dts: marvell: Add support for Marvell CN9132-DB arm64: dts: marvell: Add support for Marvell CN9131-DB arm64: dts: marvell: Add support for Marvell CN9130-DB arm64: dts: marvell: Add support for Marvell CN9130 SoC support arm64: dts: marvell: Add support for CP115 arm64: dts: marvell: Externalize PCIe macros from CP11x file arm64: dts: marvell: Drop PCIe I/O ranges from CP11x file arm64: dts: marvell: Prepare the introduction of CP115 arm64: dts: marvell: Fix CP110 NAND controller node multi-line comment alignment arm64: dts: marvell: Add AP807-quad cache description arm64: dts: marvell: Add AP806-quad cache description arm64: dts: marvell: Add AP806-dual cache description arm64: dts: marvell: Add support for AP807/AP807-quad dt-bindings: marvell: Declare the CN913x SoC compatibles dt-bindings: marvell: Convert the SoC compatibles description to YAML arm64: dts: marvell: Move clocks to AP806 specific file arm64: dts: marvell: Prepare the introduction of AP807 based SoCs MAINTAINERS: Add new Marvell CN9130-based files to track ... Link: https://lore.kernel.org/r/87zhhc3bo6.fsf@FE-laptop Signed-off-by: Olof Johansson commit 3c8b2e2c41a9cddde8c15da33243fd16de6cb97e Merge: fc711fdf06ce 90b9dc96940c Author: Olof Johansson Date: Sun Nov 3 17:31:40 2019 -0800 Merge tag 'mvebu-dt-5.5-1' of git://git.infradead.org/linux-mvebu into arm/dt mvebu dt for 5.5 (part 1) - Enable L2 cache parity and ECC on a Armada XP SoC family and allow to use in on the Armada 38x SoCs too. - Use correct name for the rs5c372a on synology (Kirkwood based) - Rename "sa-sram" node to "sram" on dove * tag 'mvebu-dt-5.5-1' of git://git.infradead.org/linux-mvebu: ARM: dts: armada-xp: add label to sdram-controller node ARM: dts: mvebu: add sdram controller node to Armada-38x ARM: dts: armada-xp: enable L2 cache parity and ecc on db-xc3-24g4xg ARM: dts: dove: Rename "sa-sram" node to "sram" ARM: dts: kirkwood: synology: Fix rs5c372 RTC entry Link: https://lore.kernel.org/r/8736f44q9l.fsf@FE-laptop Signed-off-by: Olof Johansson commit fc711fdf06cea292e9fc5708a5de7b266ad994ee Merge: 2687aa23f5d5 47b4e129155f Author: Olof Johansson Date: Sun Nov 3 17:31:21 2019 -0800 Merge tag 'tegra-for-5.5-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v5.5-rc1 Adds support for DP and XUSB on various boards, enables SMMU support for more devices and fixes a couple of DTC warnings and inconsistencies that are reported at runtime. These changes along with some of the driver changes in other branches allow suspend/resume support on Tegra210 devices (e.g. Jetson TX1 and Jetson Nano). * tag 'tegra-for-5.5-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (25 commits) arm64: tegra: Add Jetson Nano SC7 timings arm64: tegra: Add Jetson TX1 SC7 timings arm64: tegra: Enable wake from deep sleep on RTC alarm arm64: tegra: Add PMU on Tegra210 arm64: tegra: Add blank lines for better readability arm64: tegra: Enable DisplayPort on Jetson AGX Xavier arm64: tegra: p2888: Rename regulators for consistency arm64: tegra: Enable DP support on Jetson TX2 arm64: tegra: Fix compatible for SOR1 arm64: tegra: Enable DP support on Jetson Nano arm64: tegra: Add SOR0_OUT clock on Tegra210 arm64: tegra: Assume no CLKREQ presence by default arm64: tegra: Enable SMMU for VIC on Tegra186 arm64: tegra: Enable XUSB host controller on Jetson TX2 arm64: tegra: Enable SMMU for XUSB host on Tegra186 arm64: tegra: Enable XUSB pad controller on Jetson TX2 arm64: tegra: Add ethernet alias on Jetson AGX Xavier arm64: tegra: Fix compatible string for EQOS on Tegra194 arm64: tegra: Hook up edp interrupt on Tegra210 SOCTHERM arm64: tegra: Fix base address for SOR1 on Tegra194 ... Link: https://lore.kernel.org/r/20191102144521.3863321-8-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 1903de7777c001aa4eba37d4eace9f538cf511cd Merge: fcdc43722436 480bb31f4286 Author: Olof Johansson Date: Sun Nov 3 17:28:40 2019 -0800 Merge tag 'tegra-for-5.5-arm-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig ARM: tegra: Default configuration changes for v5.5-rc1 Enables the Tegra VDE driver by default. This is currently in staging but can be used with existing userspace to do hardware-accelerated video decoding of H.264 streams. * tag 'tegra-for-5.5-arm-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Enable Tegra VDE driver in tegra_defconfig Link: https://lore.kernel.org/r/20191102144521.3863321-7-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit ba5a5615d54f8adfeb4edd005bbd0dfeb65feb9f Author: Marcel Ziswiler Date: Sat Oct 26 11:04:02 2019 +0200 arm64: dts: freescale: add initial support for colibri imx8x This patch adds the device tree to support Toradex Colibri iMX8X a computer on module which can be used on different carrier boards. The module consists of an NXP i.MX 8X family SoC (either i.MX 8DualX or 8QuadXPlus), a PF8100 PMIC, a FastEthernet PHY, 1 or 2 GB of LPDDR4 RAM, some level shifters, a Micron eMMC, a USB hub, an AD7879 resistive touch controller, an SGTL5000 audio codec and on-module CSI as well as DSI-LVDS FFC receptacles plus an optional Bluetooth/Wi-Fi module. Anything that is not self-contained on the module is disabled by default. The device tree for the Colibri Evaluation Board includes the module's device tree and enables the supported peripherals of the carrier board (the Colibri Evaluation Board supports almost all of them). So far there is no display or USB functionality supported at all but basic console UART, eMMC and Ethernet functionality work fine. Signed-off-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit 2687aa23f5d577ddc40bb575b12b19aab656b405 Merge: c267d9960cc5 4053aa65c517 Author: Olof Johansson Date: Sun Nov 3 17:27:39 2019 -0800 Merge tag 'tegra-for-5.5-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v5.5-rc1 Adds support for CPU frequency scaling on Tegra20 and Tegra30, EMC frequency scaling on Tegra30, SMMU support for VDE on Tegra30, the STMPE ADC found on Toradex T30 modules as well as fixes for eDP support on Venice2. * tag 'tegra-for-5.5-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: cardhu-a04: Add CPU Operating Performance Points ARM: tegra: cardhu-a04: Set up voltage regulators for DVFS ARM: tegra: trimslice: Add CPU Operating Performance Points ARM: tegra: paz00: Add CPU Operating Performance Points ARM: tegra: paz00: Set up voltage regulators for DVFS ARM: tegra: Add CPU Operating Performance Points for Tegra30 ARM: tegra: Add CPU Operating Performance Points for Tegra20 ARM: tegra: Add Tegra30 CPU clock ARM: tegra: Add Tegra20 CPU clock ARM: tegra: Add External Memory Controller node on Tegra30 ARM: tegra: nyan-big: Add timings for RAM codes 4 and 6 ARM: tegra: Connect SMMU with Video Decoder Engine on Tegra30 ARM: tegra: Add eDP power supplies on Venice2 ARM: tegra: Add SOR0_OUT clock on Tegra124 ARM: tegra: Add stmpe-adc DT node to Toradex T30 modules Link: https://lore.kernel.org/r/20191102144521.3863321-6-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit df0935f04d105b4bac78cd8ba363610a70b87cb4 Author: Marcel Ziswiler Date: Sat Oct 26 11:03:59 2019 +0200 ARM: dts: vf-colibri: fix typo in top-level module compatible Fix typo in top-level module compatible. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit fac6fce9bdb59837bb89930c3a92f5e0d1482f0b Author: Francesco Ruggeri Date: Wed Oct 30 17:40:02 2019 -0700 net: icmp6: provide input address for traceroute6 traceroute6 output can be confusing, in that it shows the address that a router would use to reach the sender, rather than the address the packet used to reach the router. Consider this case: ------------------------ N2 | | ------ ------ N3 ---- | R1 | | R2 |------|H2| ------ ------ ---- | | ------------------------ N1 | ---- |H1| ---- where H1's default route is through R1, and R1's default route is through R2 over N2. traceroute6 from H1 to H2 shows R2's address on N1 rather than on N2. The script below can be used to reproduce this scenario. traceroute6 output without this patch: traceroute to 2000:103::4 (2000:103::4), 30 hops max, 80 byte packets 1 2000:101::1 (2000:101::1) 0.036 ms 0.008 ms 0.006 ms 2 2000:101::2 (2000:101::2) 0.011 ms 0.008 ms 0.007 ms 3 2000:103::4 (2000:103::4) 0.013 ms 0.010 ms 0.009 ms traceroute6 output with this patch: traceroute to 2000:103::4 (2000:103::4), 30 hops max, 80 byte packets 1 2000:101::1 (2000:101::1) 0.056 ms 0.019 ms 0.006 ms 2 2000:102::2 (2000:102::2) 0.013 ms 0.008 ms 0.008 ms 3 2000:103::4 (2000:103::4) 0.013 ms 0.009 ms 0.009 ms #!/bin/bash # # ------------------------ N2 # | | # ------ ------ N3 ---- # | R1 | | R2 |------|H2| # ------ ------ ---- # | | # ------------------------ N1 # | # ---- # |H1| # ---- # # N1: 2000:101::/64 # N2: 2000:102::/64 # N3: 2000:103::/64 # # R1's host part of address: 1 # R2's host part of address: 2 # H1's host part of address: 3 # H2's host part of address: 4 # # For example: # the IPv6 address of R1's interface on N2 is 2000:102::1/64 # # Nets are implemented by macvlan interfaces (bridge mode) over # dummy interfaces. # # Create net namespaces ip netns add host1 ip netns add host2 ip netns add rtr1 ip netns add rtr2 # Create nets ip link add net1 type dummy; ip link set net1 up ip link add net2 type dummy; ip link set net2 up ip link add net3 type dummy; ip link set net3 up # Add interfaces to net1, move them to their nemaspaces ip link add link net1 dev host1net1 type macvlan mode bridge ip link set host1net1 netns host1 ip link add link net1 dev rtr1net1 type macvlan mode bridge ip link set rtr1net1 netns rtr1 ip link add link net1 dev rtr2net1 type macvlan mode bridge ip link set rtr2net1 netns rtr2 # Add interfaces to net2, move them to their nemaspaces ip link add link net2 dev rtr1net2 type macvlan mode bridge ip link set rtr1net2 netns rtr1 ip link add link net2 dev rtr2net2 type macvlan mode bridge ip link set rtr2net2 netns rtr2 # Add interfaces to net3, move them to their nemaspaces ip link add link net3 dev rtr2net3 type macvlan mode bridge ip link set rtr2net3 netns rtr2 ip link add link net3 dev host2net3 type macvlan mode bridge ip link set host2net3 netns host2 # Configure interfaces and routes in host1 ip netns exec host1 ip link set lo up ip netns exec host1 ip link set host1net1 up ip netns exec host1 ip -6 addr add 2000:101::3/64 dev host1net1 ip netns exec host1 ip -6 route add default via 2000:101::1 # Configure interfaces and routes in rtr1 ip netns exec rtr1 ip link set lo up ip netns exec rtr1 ip link set rtr1net1 up ip netns exec rtr1 ip -6 addr add 2000:101::1/64 dev rtr1net1 ip netns exec rtr1 ip link set rtr1net2 up ip netns exec rtr1 ip -6 addr add 2000:102::1/64 dev rtr1net2 ip netns exec rtr1 ip -6 route add default via 2000:102::2 ip netns exec rtr1 sysctl net.ipv6.conf.all.forwarding=1 # Configure interfaces and routes in rtr2 ip netns exec rtr2 ip link set lo up ip netns exec rtr2 ip link set rtr2net1 up ip netns exec rtr2 ip -6 addr add 2000:101::2/64 dev rtr2net1 ip netns exec rtr2 ip link set rtr2net2 up ip netns exec rtr2 ip -6 addr add 2000:102::2/64 dev rtr2net2 ip netns exec rtr2 ip link set rtr2net3 up ip netns exec rtr2 ip -6 addr add 2000:103::2/64 dev rtr2net3 ip netns exec rtr2 sysctl net.ipv6.conf.all.forwarding=1 # Configure interfaces and routes in host2 ip netns exec host2 ip link set lo up ip netns exec host2 ip link set host2net3 up ip netns exec host2 ip -6 addr add 2000:103::4/64 dev host2net3 ip netns exec host2 ip -6 route add default via 2000:103::2 # Ping host2 from host1 ip netns exec host1 ping6 -c5 2000:103::4 # Traceroute host2 from host1 ip netns exec host1 traceroute6 2000:103::4 # Delete nets ip link del net3 ip link del net2 ip link del net1 # Delete namespaces ip netns del rtr2 ip netns del rtr1 ip netns del host2 ip netns del host1 Signed-off-by: Francesco Ruggeri Original-patch-by: Honggang Xu Signed-off-by: David S. Miller commit f5ed5010dfaa1ca67408b7821279c362fa98a16d Merge: 3bd00db6f0ea 91d7ff5aa7e3 Author: Olof Johansson Date: Sun Nov 3 17:26:32 2019 -0800 Merge tag 'tegra-for-5.5-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/soc ARM: tegra: Core changes for v5.5-rc1 Contains two fixes for CPU idle and suspend/resume on early Tegra SoCs. * tag 'tegra-for-5.5-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Use WFE for power-gating on Tegra30 ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume() Link: https://lore.kernel.org/r/20191102144521.3863321-5-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 06e7c70c6e8903da57982ab3bdc81e01a8ba941d Author: Tuong Lien Date: Fri Nov 1 09:58:57 2019 +0700 tipc: improve message bundling algorithm As mentioned in commit e95584a889e1 ("tipc: fix unlimited bundling of small messages"), the current message bundling algorithm is inefficient that can generate bundles of only one payload message, that causes unnecessary overheads for both the sender and receiver. This commit re-designs the 'tipc_msg_make_bundle()' function (now named as 'tipc_msg_try_bundle()'), so that when a message comes at the first place, we will just check & keep a reference to it if the message is suitable for bundling. The message buffer will be put into the link backlog queue and processed as normal. Later on, when another one comes we will make a bundle with the first message if possible and so on... This way, a bundle if really needed will always consist of at least two payload messages. Otherwise, we let the first buffer go its way without any need of bundling, so reduce the overheads to zero. Moreover, since now we have both the messages in hand, we can even optimize the 'tipc_msg_bundle()' function, make bundle of a very large (size ~ MSS) and small messages which is not with the current algorithm e.g. [1400-byte message] + [10-byte message] (MTU = 1500). Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit b4067b10502323f4e30a7a61baf7cae055ba32c4 Merge: f76b6a4cbffb 69dfb3d4a89a Author: Olof Johansson Date: Sun Nov 3 17:25:45 2019 -0800 Merge tag 'tegra-for-5.5-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers soc/tegra: Changes for v5.5-rc1 Adds wake event support on Tegra210, implements the NVMEM API for the Tegra FUSE block and adds coupled regulators support for Tegra20 and Tegra30. * tag 'tegra-for-5.5-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Remove unnecessary memory barrier soc/tegra: pmc: Query PCLK clock rate at probe time soc/tegra: regulators: Add regulators coupler for Tegra30 soc/tegra: regulators: Add regulators coupler for Tegra20 soc/tegra: pmc: Configure deep sleep control settings soc/tegra: pmc: Configure core power request polarity soc/tegra: pmc: Add wake event support on Tegra210 soc/tegra: pmc: Support wake events on more Tegra SoCs soc/tegra: fuse: Register cell lookups for compatibility soc/tegra: fuse: Add cell information soc/tegra: fuse: Implement nvmem device soc/tegra: fuse: Restore base on sysfs failure soc/tegra: pmc: Fix crashes for hierarchical interrupts soc/tegra: fuse: Add FUSE clock check in tegra_fuse_readl() Link: https://lore.kernel.org/r/20191102144521.3863321-4-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 2adf81c0f7b04f9f10e55f5634b1eb7e0a783276 Author: Francesco Ruggeri Date: Thu Oct 31 17:44:13 2019 -0700 net: icmp: use input address in traceroute Even with icmp_errors_use_inbound_ifaddr set, traceroute returns the primary address of the interface the packet was received on, even if the path goes through a secondary address. In the example: 1.0.3.1/24 ---- 1.0.1.3/24 1.0.1.1/24 ---- 1.0.2.1/24 1.0.2.4/24 ---- |H1|--------------------------|R1|--------------------------|H2| ---- N1 ---- N2 ---- where 1.0.3.1/24 is R1's primary address on N1, traceroute from H1 to H2 returns: traceroute to 1.0.2.4 (1.0.2.4), 30 hops max, 60 byte packets 1 1.0.3.1 (1.0.3.1) 0.018 ms 0.006 ms 0.006 ms 2 1.0.2.4 (1.0.2.4) 0.021 ms 0.007 ms 0.007 ms After applying this patch, it returns: traceroute to 1.0.2.4 (1.0.2.4), 30 hops max, 60 byte packets 1 1.0.1.1 (1.0.1.1) 0.033 ms 0.007 ms 0.006 ms 2 1.0.2.4 (1.0.2.4) 0.011 ms 0.007 ms 0.007 ms Original-patch-by: Bill Fenner Signed-off-by: Francesco Ruggeri Reviewed-by: David Ahern Signed-off-by: David S. Miller commit a5c959ef99d97a1138633ab7ff671f116fb371a5 Author: Marcel Ziswiler Date: Sat Oct 26 11:04:03 2019 +0200 dt-bindings: arm: fsl: add nxp based toradex colibri-imx8x bindings Document the NXP SoC based Toradex Colibri iMX8X module and carrier board devicetree bindings previously added. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 0bfadbcdc7a4f1bee105d55f3893c8bf67010861 Author: Marcel Ziswiler Date: Sat Oct 26 11:04:00 2019 +0200 dt-bindings: arm: fsl: add nxp based toradex apalis/colibri bindings Document the following NXP SoC based Toradex Apalis and Colibri module and carrier board devicetree bindings already supported: - toradex,apalis_imx6q # Apalis iMX6 Module - toradex,apalis_imx6q-eval # Apalis iMX6 Module on Apalisi Evaluation Board - toradex,apalis_imx6q-ixora # Apalis iMX6 Module on Ixora - toradex,apalis_imx6q-ixora-v1.1 # Apalis iMX6 Module on Ixora V1.1 - toradex,colibri_imx6dl # Colibri iMX6 Module - toradex,colibri_imx6dl-eval-v3 # Colibri iMX6 Module on Colibri Evaluation Board V3 - toradex,colibri-imx6ull-eval # Colibri iMX6ULL Module on Colibri Evaluation Board - toradex,colibri-imx6ull-wifi-eval # Colibri iMX6ULL Wi-Fi / Bluetooth Module on Colibri Evaluation Board - toradex,colibri-imx7s # Colibri iMX7 Solo Module - toradex,colibri-imx7s-eval-v3 # Colibri iMX7 Solo Module on Colibri Evaluation Board V3 - toradex,colibri-imx7d # Colibri iMX7 Dual Module - toradex,colibri-imx7d-emmc # Colibri iMX7 Dual 1GB (eMMC) Module - toradex,colibri-imx7d-emmc-eval-v3 # Colibri iMX7 Dual 1GB (eMMC) Module on Colibri Evaluation Board V3 - toradex,colibri-imx7d-eval-v3 # Colibri iMX7 Dual Module on Colibri Evaluation Board V3 - toradex,vf500-colibri_vf50 # Colibri VF50 Module - toradex,vf500-colibri_vf50-on-eval # Colibri VF50 Module on Colibri Evaluation Board - toradex,vf610-colibri_vf61 # Colibri VF61 Module - toradex,vf610-colibri_vf61-on-eval # Colibri VF61 Module on Colibri Evaluation Board Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit f76b6a4cbffb22bd6eda3e7ad4607116fbf5554d Merge: 064652ad88e8 befc1bab9117 Author: Olof Johansson Date: Sun Nov 3 17:19:49 2019 -0800 Merge tag 'tegra-for-5.5-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers firmware: tegra: Changes for v5.5-rc1 This contains a single fix for suspend/resume on Tegra194. * tag 'tegra-for-5.5-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Move BPMP resume to noirq phase Link: https://lore.kernel.org/r/20191102144521.3863321-2-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit c267d9960cc5f447ddc8863ed13af5b7d12d2f06 Merge: 42a5718b8c29 641262f5e1ed Author: Olof Johansson Date: Sun Nov 3 17:19:26 2019 -0800 Merge tag 'tegra-for-5.5-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v5.5-rc1 This contains various updates to device tree bindings and includes that are related to driver changes in other Tegra branches. * tag 'tegra-for-5.5-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: memory: Add binding for NVIDIA Tegra30 External Memory Controller dt-bindings: memory: Add binding for NVIDIA Tegra30 Memory Controller dt-bindings: memory: tegra30: Convert to Tegra124 YAML dt-bindings: regulator: Document regulators coupling of NVIDIA Tegra20/30 SoCs dt-bindings: clock: tegra: Rename SOR0_LVDS to SOR0_OUT Link: https://lore.kernel.org/r/20191102144521.3863321-1-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit c219a1662276668a7b93afdf00320f543c58bbcb Merge: ae8a76fb8b5d eec62eadd1d7 Author: David S. Miller Date: Sun Nov 3 17:18:04 2019 -0800 Merge branch 'optimize-openvswitch-flow-looking-up' Tonghao Zhang says: ==================== optimize openvswitch flow looking up This series patch optimize openvswitch for performance or simplify codes. Patch 1, 2, 4: Port Pravin B Shelar patches to linux upstream with little changes. Patch 5, 6, 7: Optimize the flow looking up and simplify the flow hash. Patch 8, 9: are bugfix. The performance test is on Intel Xeon E5-2630 v4. The test topology is show as below: +-----------------------------------+ | +---------------------------+ | | | eth0 ovs-switch eth1 | | Host0 | +---------------------------+ | +-----------------------------------+ ^ | | | | | | | | v +-----+----+ +----+-----+ | netperf | Host1 | netserver| Host2 +----------+ +----------+ We use netperf send the 64B packets, and insert 255+ flow-mask: $ ovs-dpctl add-flow ovs-switch "in_port(1),eth(dst=00:01:00:00:00:00/ff:ff:ff:ff:ff:01),eth_type(0x0800),ipv4(frag=no)" 2 ... $ ovs-dpctl add-flow ovs-switch "in_port(1),eth(dst=00:ff:00:00:00:00/ff:ff:ff:ff:ff:ff),eth_type(0x0800),ipv4(frag=no)" 2 $ $ netperf -t UDP_STREAM -H 2.2.2.200 -l 40 -- -m 18 * Without series patch, throughput 8.28Mbps * With series patch, throughput 46.05Mbps v6: some coding style fixes v5: rewrite patch 8, release flow-mask when freeing flow v4: access ma->count with READ_ONCE/WRITE_ONCE API. More information, see patch 5 comments. v3: update ma point when realloc mask_array in patch 5 v2: simplify codes. e.g. use kfree_rcu instead of call_rcu ==================== Signed-off-by: David S. Miller commit eec62eadd1d757b0743ccbde55973814f3ad396e Author: Tonghao Zhang Date: Fri Nov 1 22:23:54 2019 +0800 net: openvswitch: simplify the ovs_dp_cmd_new use the specified functions to init resource. Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 4c76bf696a608ea5cc555fe97ec59a9033236604 Author: Tonghao Zhang Date: Fri Nov 1 22:23:53 2019 +0800 net: openvswitch: don't unlock mutex when changing the user_features fails Unlocking of a not locked mutex is not allowed. Other kernel thread may be in critical section while we unlock it because of setting user_feature fail. Fixes: 95a7233c4 ("net: openvswitch: Set OvS recirc_id from tc chain index") Cc: Paul Blakey Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Acked-by: William Tu Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 50b0e61b32ee890a75b4377d5fbe770a86d6a4c1 Author: Tonghao Zhang Date: Fri Nov 1 22:23:52 2019 +0800 net: openvswitch: fix possible memleak on destroy flow-table When we destroy the flow tables which may contain the flow_mask, so release the flow mask struct. Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 0a3e01371db17d753dd92ec4d0fc6247412d3b01 Author: Tonghao Zhang Date: Fri Nov 1 22:23:51 2019 +0800 net: openvswitch: add likely in flow_lookup The most case *index < ma->max, and flow-mask is not NULL. We add un/likely for performance. Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Acked-by: William Tu Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 515b65a4b99197ae062a795ab4de919e6d04be04 Author: Tonghao Zhang Date: Fri Nov 1 22:23:50 2019 +0800 net: openvswitch: simplify the flow_hash Simplify the code and remove the unnecessary BUILD_BUG_ON. Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Acked-by: William Tu Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 57f7d7b9164426c496300d254fd5167fbbf205ea Author: Tonghao Zhang Date: Fri Nov 1 22:23:49 2019 +0800 net: openvswitch: optimize flow-mask looking up The full looking up on flow table traverses all mask array. If mask-array is too large, the number of invalid flow-mask increase, performance will be drop. One bad case, for example: M means flow-mask is valid and NULL of flow-mask means deleted. +-------------------------------------------+ | M | NULL | ... | NULL | M| +-------------------------------------------+ In that case, without this patch, openvswitch will traverses all mask array, because there will be one flow-mask in the tail. This patch changes the way of flow-mask inserting and deleting, and the mask array will be keep as below: there is not a NULL hole. In the fast path, we can "break" "for" (not "continue") in flow_lookup when we get a NULL flow-mask. "break" v +-------------------------------------------+ | M | M | NULL |... | NULL | NULL| +-------------------------------------------+ This patch don't optimize slow or control path, still using ma->max to traverse. Slow path: * tbl_mask_array_realloc * ovs_flow_tbl_lookup_exact * flow_mask_find Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit a7f35e78e701744368d4ac38bdb61a86bfac2162 Author: Tonghao Zhang Date: Fri Nov 1 22:23:48 2019 +0800 net: openvswitch: optimize flow mask cache hash collision Port the codes to linux upstream and with little changes. Pravin B Shelar, says: | In case hash collision on mask cache, OVS does extra flow | lookup. Following patch avoid it. Link: https://github.com/openvswitch/ovs/commit/0e6efbe2712da03522532dc5e84806a96f6a0dd1 Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Signed-off-by: Pravin B Shelar Signed-off-by: David S. Miller commit 1689754de624a19e37a2f96289f4421466771687 Author: Tonghao Zhang Date: Fri Nov 1 22:23:47 2019 +0800 net: openvswitch: shrink the mask array if necessary When creating and inserting flow-mask, if there is no available flow-mask, we realloc the mask array. When removing flow-mask, if necessary, we shrink mask array. Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Acked-by: William Tu Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 4bc63b1b531df518576a97d17bf5939fdbc33ccb Author: Tonghao Zhang Date: Fri Nov 1 22:23:46 2019 +0800 net: openvswitch: convert mask list in mask array Port the codes to linux upstream and with little changes. Pravin B Shelar, says: | mask caches index of mask in mask_list. On packet recv OVS | need to traverse mask-list to get cached mask. Therefore array | is better for retrieving cached mask. This also allows better | cache replacement algorithm by directly checking mask's existence. Link: https://github.com/openvswitch/ovs/commit/d49fc3ff53c65e4eca9cabd52ac63396746a7ef5 Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Acked-by: William Tu Signed-off-by: Pravin B Shelar Signed-off-by: David S. Miller commit 04b7d136d015f220b1003e6c573834658d507a31 Author: Tonghao Zhang Date: Fri Nov 1 22:23:45 2019 +0800 net: openvswitch: add flow-mask cache for performance The idea of this optimization comes from a patch which is committed in 2014, openvswitch community. The author is Pravin B Shelar. In order to get high performance, I implement it again. Later patches will use it. Pravin B Shelar, says: | On every packet OVS needs to lookup flow-table with every | mask until it finds a match. The packet flow-key is first | masked with mask in the list and then the masked key is | looked up in flow-table. Therefore number of masks can | affect packet processing performance. Link: https://github.com/openvswitch/ovs/commit/5604935e4e1cbc16611d2d97f50b717aa31e8ec5 Signed-off-by: Tonghao Zhang Tested-by: Greg Rose Acked-by: William Tu Signed-off-by: Pravin B Shelar Signed-off-by: David S. Miller commit bceed71ba13116de4b1459c2c6db47d927b48e68 Author: Peng Fan Date: Mon Oct 28 03:08:34 2019 +0000 clk: imx: imx8mq: fix sys3_pll_out_sels It is not correct that sys3_pll_out use sys2_pll1_ref_sel as parent. According to the current imx_clk_sccg_pll design, it uses both bypass1/2, however set bypass2 as 1 is not correct, because it will make sys[x]_pll_out use wrong parent and might access wrong registers. So correct bypass2 to 0 and fix sys3_pll_out_sels. Fixes: e9dda4af685f ("clk: imx: Refactor entire sccg pll clk") Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit fcdc4372243672ab06725102f83c7bb8d288b797 Merge: 5003119e43f0 2fabf6dd7701 Author: Olof Johansson Date: Sun Nov 3 17:08:25 2019 -0800 Merge tag 'sunxi-config64-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig One new patch to the arm64 defconfig to enable the new crypto engine driver. * tag 'sunxi-config64-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: defconfig: add new Allwinner crypto options Link: https://lore.kernel.org/r/539241d6-9b2e-4d5b-bd63-f912cf6ebf96.lettre@localhost Signed-off-by: Olof Johansson commit 5003119e43f0b5683978abeb2d24205a97a3a6be Merge: 4075e0db486f 9567832aba7f Author: Olof Johansson Date: Sun Nov 3 17:08:09 2019 -0800 Merge tag 'sunxi-config-for-5.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig Two new drivers enabled in sunxi_defconfig: one for the PHY found on multiple boards, one for the new crypto driver. * tag 'sunxi-config-for-5.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: configs: sunxi: Enable MICREL_PHY ARM: configs: sunxi: add new Allwinner crypto options Link: https://lore.kernel.org/r/27125172-7ce8-427e-83f9-8e9bd69d50a4.lettre@localhost Signed-off-by: Olof Johansson commit 42a5718b8c2926d35eaf292bad6737fa0c8768f8 Merge: f638b287cca7 d79ccef07b36 Author: Olof Johansson Date: Sun Nov 3 17:07:51 2019 -0800 Merge tag 'sunxi-dt-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Our usual bunch of DT patches, with this time mostly: - Mali GPU support for the H6 - Two new crypto drivers enablement - A few fixes to our DTs, fixed through the validation effort - New boards: NanoPi Duo2 * tag 'sunxi-dt-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (22 commits) dt-bindings: arm: sunxi: add FriendlyARM NanoPi Duo2 ARM: dts: sun8i: add FriendlyARM NanoPi Duo2 arm64: allwinner: h6: Enable GPU node for Tanix TX6 arm64: dts: allwinner: bluetooth for Emlid Neutis N5 ARM: dts: sunxi: h3/h5: add missing uart2 rts/cts pins ARM: dts: sun9i: a80: Add Security System node ARM: dts: sun8i: a83t: Add Security System node arm64: dts: allwinner: sun50i: Add Crypto Engine node on H6 arm64: dts: allwinner: sun50i: Add crypto engine node on H5 arm64: dts: allwinner: sun50i: Add Crypto Engine node on A64 ARM: dts: sun8i: H3: Add Crypto Engine node ARM: dts: sun8i: R40: add crypto engine node dt-bindings: crypto: Add DT bindings documentation for sun8i-ce Crypto Engine arm64: dts: allwinner: Add mali GPU supply for H6 boards arm64: dts: allwinner: Add ARM Mali GPU node for H6 ARM: dts: sun8i: a83t: a711: Add touchscreen node ARM: dts: sun5i: olinuxino micro: Fix AT24 node name ARM: dts: sun9i: Add missing watchdog clocks arm64: dts: sun50i: sopine-baseboard: Expose serial1, serial2 and serial3 arm64: dts: allwinner: orange-pi-3: Enable UART1 / Bluetooth ... Link: https://lore.kernel.org/r/1bf18c83-f41d-4353-9ca2-9585b8693df2.lettre@localhost Signed-off-by: Olof Johansson commit f638b287cca7749f40392c2082870696531b7f24 Author: Geert Uytterhoeven Date: Fri Nov 1 17:03:56 2019 +0100 ARM: dts: atlas7: Fix "debounce-interval" property misspelling "debounce_interval" was never supported. Link: https://lore.kernel.org/r/20191101160356.32034-3-geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Cc: Barry Song Signed-off-by: Olof Johansson commit 09612c933709ab31f118c965a1c9b8cfa2f941fd Author: Geert Uytterhoeven Date: Fri Nov 1 17:03:55 2019 +0100 arm64: dts: lg1313: DT fix s/#interrupts-cells/#interrupt-cells/ The standard DT property is called "#interrupt-cells". Link: https://lore.kernel.org/r/20191101160356.32034-2-geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Acked-by: Chanho Min Signed-off-by: Olof Johansson commit 9e3bd0f664a85331601ce669acd5f5e47b916824 Author: Geert Uytterhoeven Date: Fri Nov 1 17:03:54 2019 +0100 arm64: dts: lg1312: DT fix s/#interrupts-cells/#interrupt-cells/ The standard DT property is called "#interrupt-cells". Link: https://lore.kernel.org/r/20191101160356.32034-1-geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Acked-by: Chanho Min Signed-off-by: Olof Johansson commit b23c30a955f12616ccee274edc6b0ef0d641bd7b Merge: 571d32c283a5 e7f1eb321b1a Author: Olof Johansson Date: Sun Nov 3 17:06:10 2019 -0800 Merge tag 'renesas-dt-bindings-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.5 (take two) - JSON schema conversion, - Core support for the new R-Car M3-W+ (r8a77961) SoC, - Board compatible updates. * tag 'renesas-dt-bindings-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: power: rcar-sysc: Document r8a77961 support dt-bindings: reset: rcar-rst: Document r8a77961 support dt-bindings: arm: renesas: Add Salvator-XS board with R-Car M3-W+ dt-bindings: arm: renesas: Document R-Car M3-W+ SoC DT bindings dt-bindings: arm: renesas: Add R-Car M3-N ULCB with Kingfisher dt-bindings: arm: renesas: Convert 'renesas,prr' to json-schema Link: https://lore.kernel.org/r/20191101155842.31467-7-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 064652ad88e8bb97ae14e49ae87d40952d6e1f3e Merge: e6ce7f5a7d2e bdde3d3ec934 Author: Olof Johansson Date: Sun Nov 3 17:05:45 2019 -0800 Merge tag 'renesas-drivers-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.5 (take two) - Initial support for the R-Car M3-W+ (r8a77961) SoC, - A minor fix. * tag 'renesas-drivers-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: rcar-sysc: Add R8A77961 support soc: renesas: rcar-rst: Add R8A77961 support soc: renesas: Identify R-Car M3-W+ soc: renesas: Add ARCH_R8A77961 for new R-Car M3-W+ soc: renesas: Add ARCH_R8A77960 for existing R-Car M3-W soc: renesas: Rename SYSC_R8A7796 to SYSC_R8A77960 soc: renesas: Add missing check for non-zero product register address dt-bindings: clock: Add r8a77961 CPG Core Clock Definitions dt-bindings: power: Add r8a77961 SYSC power domain definitions Link: https://lore.kernel.org/r/20191101155842.31467-6-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 571d32c283a530a6400ad5f5cf47586e17421760 Merge: 19e489aa9bb4 92980759c169 Author: Olof Johansson Date: Sun Nov 3 17:05:18 2019 -0800 Merge tag 'renesas-arm64-dt-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM64 DT updates for v5.5 (take two) - Video-Input and Serial-ATA support on RZ/G2N, - Color Management Module support on various R-Car Gen3 SoCs, - Initial support for the R-Car M3-W+ (r8a77961) SoC on the Salvator-XS board. * tag 'renesas-arm64-dt-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: Add support for Salvator-XS with R-Car M3-W+ arm64: dts: renesas: Add Renesas R8A77961 SoC support arm64: dts: renesas: Prepare for rename of ARCH_R8A7796 to ARCH_R8A77960 dt-bindings: clock: Add r8a77961 CPG Core Clock Definitions dt-bindings: power: Add r8a77961 SYSC power domain definitions arm64: dts: renesas: r8a774b1: Add SATA controller node arm64: dts: renesas: rcar-gen3: Add CMM units arm64: dts: renesas: r8a774b1: Add VIN and CSI-2 support Link: https://lore.kernel.org/r/20191101155842.31467-5-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 4075e0db486fe95f416de178bcd1c886ee74e65a Merge: 9a67a6ec9f70 b13d0e61629b Author: Olof Johansson Date: Sun Nov 3 17:04:37 2019 -0800 Merge tag 'renesas-arm64-defconfig-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM64 defconfig updates for v5.5 (take two) - Enable support for the new R-Car M3-W+ (r8a77961) SoC. * tag 'renesas-arm64-defconfig-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable R8A77961 SoC Link: https://lore.kernel.org/r/20191101155842.31467-4-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 3bd00db6f0ea637b9d4cfe9eea98a2855e4e462c Merge: a3ee4fea24e8 0a4319b5c87a Author: Olof Johansson Date: Sun Nov 3 17:04:17 2019 -0800 Merge tag 'renesas-arm-soc-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/soc Renesas ARM SoC updates for v5.5 - Drop legacy DT clock support on R-Car Gen2. * tag 'renesas-arm-soc-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: rcar-gen2: Drop legacy DT clock support Link: https://lore.kernel.org/r/20191101155842.31467-3-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 9a67a6ec9f7049e307726ef03bc94c7712fe14e4 Merge: ae314d78b54f 51e0f6a19178 Author: Olof Johansson Date: Sun Nov 3 17:03:54 2019 -0800 Merge tag 'renesas-arm-defconfig-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v5.5 - Refresh shmobile_defconfig for v5.4-rc1. * tag 'renesas-arm-defconfig-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: defconfig: Refresh for v5.4-rc1 Link: https://lore.kernel.org/r/20191101155842.31467-2-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 19e489aa9bb42308c2fb8c47f09bfda9cbb7a557 Merge: 7e6a30317983 a868da75fd8f Author: Olof Johansson Date: Sun Nov 3 17:02:06 2019 -0800 Merge tag 'omap-for-v5.5/prm-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt PRM reset control dts changes for v5.5 merge window This series of changes adds the PRM reset driver nodes for am3/4, omap4/5 and dra7 SoCs. The reset driver changes make it easier to add support for various accelerators for TI SoCs in a more generic way. Note that this branch is based on the PRM reset driver changes branch. * tag 'omap-for-v5.5/prm-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap5: Add PRM data ARM: dts: am43xx: Add PRM data ARM: dts: am33xx: Add PRM data ARM: dts: omap4: add PRM nodes ARM: dts: dra7: add PRM nodes soc: ti: omap-prm: add omap5 PRM data soc: ti: omap-prm: add am4 PRM data soc: ti: omap-prm: add dra7 PRM data soc: ti: omap-prm: add data for am33xx soc: ti: omap-prm: add omap4 PRM data soc: ti: omap-prm: add support for denying idle for reset clockdomain soc: ti: omap-prm: poll for reset complete during de-assert soc: ti: add initial PRM driver with reset control support dt-bindings: omap: add new binding for PRM instances Link: https://lore.kernel.org/r/pull-1572623173-281197@atomide.com Signed-off-by: Olof Johansson commit 7e6a30317983e628b93eb2bffd67ef6dbca303bf Author: Lubomir Rintel Date: Thu Oct 31 17:34:55 2019 +0100 ARM: dts: mmp3-dell-ariel: Add a serial point alias Make sure UART3, where the console is, is called ttyS2. That is consistent with the early console. Link: https://lore.kernel.org/r/20191031163455.1711872-5-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit 75ebe3bce0110c06056415a09945eb5c3ebdcf8a Author: Lubomir Rintel Date: Thu Oct 31 17:34:54 2019 +0100 ARM: dts: mmp3-dell-ariel: Add a name to /memory node Ponted out by DTC: : Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Link: https://lore.kernel.org/r/20191031163455.1711872-4-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit d074a263dd8394dfa29e4028ed4dc87c956af5d2 Author: Lubomir Rintel Date: Thu Oct 31 17:34:53 2019 +0100 ARM: dts: mmp3: Fix /soc/watchdog node name There's a typo there that rightfully upsets DTS: : Warning (simple_bus_reg): /soc/watchdog@2c000620: simple-bus unit address format error, expected "e0000620" Link: https://lore.kernel.org/r/20191031163455.1711872-3-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit 302417ce9823a1b3b3935ec30b087bb50c234293 Author: Lubomir Rintel Date: Thu Oct 31 17:34:52 2019 +0100 ARM: dts: mmp3: Add a name to /clocks node It should have one and DTC is indeed unhappy about its absence: : Warning (unit_address_vs_reg): /soc/clocks: node has a reg or ranges property, but no unit name Link: https://lore.kernel.org/r/20191031163455.1711872-2-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit a3ee4fea24e86e121bdab39a393f7d8180793d00 Author: Tao Ren Date: Wed Oct 30 18:40:40 2019 -0700 ARM: ASPEED: update default ARCH_NR_GPIO for ARCH_ASPEED Increase the max number of GPIOs from default 512 to 1024 for ASPEED platforms, because Facebook Yamp (AST2500) BMC platform has total 594 GPIO pins (232 provided by ASPEED SoC, and 362 by I/O Expanders). Link: https://lore.kernel.org/r/20191031014040.12898-1-rentao.bupt@gmail.com Signed-off-by: Tao Ren Reviewed-by: Linus Walleij Signed-off-by: Olof Johansson commit 9fe2420d068357c74ecedac3ddb58beb795159a5 Author: Manivannan Sadhasivam Date: Wed Oct 30 15:41:54 2019 +0530 ARM: dts: Add RDA8810PL GPIO controllers Add GPIO controllers for RDA8810PL SoC. There are 4 GPIO controllers in this SoC with maximum of 32 gpios. Except GPIOC, all controllers are capable of generating edge/level interrupts from first 8 lines. Link: https://lore.kernel.org/r/20191030101154.6312-2-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Olof Johansson commit ae314d78b54fefe2e85a08a1d4e6e37f161b05e2 Merge: cbf6673d672f 006ece996d22 Author: Olof Johansson Date: Sun Nov 3 16:56:43 2019 -0800 Merge tag 'hisi-arm64-defconfig-for-5.5' of git://github.com/hisilicon/linux-hisi into arm/defconfig ARM64: hisilicon: defconfig updates for 5.5 - enable ARM SMMUv3 PMU and hisi ZIP controller as module for Kunpeng920 SoC * tag 'hisi-arm64-defconfig-for-5.5' of git://github.com/hisilicon/linux-hisi: arm64: defconfig: Enable SMMU v3 PMCG arm64: defconfig: Enable HiSilicon ZIP controller Link: https://lore.kernel.org/r/5DB95B1E.8060607@hisilicon.com Signed-off-by: Olof Johansson commit 32f714d30f206c1b28addbedc3a4a2144d216650 Merge: a1094a7c27b4 37a92df96122 Author: Olof Johansson Date: Sun Nov 3 16:56:23 2019 -0800 Merge tag 'hisi-arm64-dt-for-5.5' of git://github.com/hisilicon/linux-hisi into arm/dt ARM64: DT: Hisilicon SoCs DT updates for 5.5 - add Mali450 MP4 GPU node in the hi6220 SoC * tag 'hisi-arm64-dt-for-5.5' of git://github.com/hisilicon/linux-hisi: arm64: dts: hisilicon: Add Mali-450 MP4 GPU DT entry Link: https://lore.kernel.org/r/5DB95AAB.8060405@hisilicon.com Signed-off-by: Olof Johansson commit a9f4b135d1c6837e420de75a38663e1118e74d3b Merge: 433b1e8a6cd9 88ae095b2855 Author: Olof Johansson Date: Sun Nov 3 16:55:16 2019 -0800 Merge tag 'hisi-armv7-soc-for-5.5' of git://github.com/hisilicon/linux-hisi into arm/soc ARM: mach-hisi: Hisilicon SoC updates for 5.5 - drop the ARCH_MULTI_V7 dependency in the sub-menu of ARCH_HISI since ARCH_HISI depends on ARCH_MULTI_V7 * tag 'hisi-armv7-soc-for-5.5' of git://github.com/hisilicon/linux-hisi: ARM: hisi: drop useless depend on ARCH_MULTI_V7 Link: https://lore.kernel.org/r/5DB9593D.9050904@hisilicon.com Signed-off-by: Olof Johansson commit a1094a7c27b4f8a7aa9dc1e2faca1f8ab8e8fd4a Merge: 4454c069f1e4 02f4597e7ebe Author: Olof Johansson Date: Sun Nov 3 16:54:32 2019 -0800 Merge tag 'realtek-arm64-dt-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek into arm/dt Realtek ARM64 based SoC DT for v5.5 Add RTD1293 and RTD1296 DTs. Add the watchdog for all of RTD129x DTs. Add reset controllers for RTD129x and start using them for UARTs. * tag 'realtek-arm64-dt-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek: arm64: dts: realtek: Add RTD129x UART resets arm64: dts: realtek: Add RTD129x reset controller nodes dt-bindings: reset: Add Realtek RTD1295 arm64: dts: realtek: Add watchdog node for RTD129x arm64: dts: realtek: Add oscillator for RTD129x arm64: dts: realtek: Add RTD1296 and Synology DS418 dt-bindings: arm: realtek: Document RTD1296 and Synology DS418 arm64: dts: realtek: Add RTD1293 and Synology DS418j arm64: dts: realtek: Change dual-license from MIT to BSD dt-bindings: arm: realtek: Document RTD1293 and Synology DS418j dt-bindings: arm: realtek: Tidy up conversion to json-schema Link: https://lore.kernel.org/r/20191030041000.31848-2-afaerber@suse.de Signed-off-by: Olof Johansson commit 433b1e8a6cd9cfa3f003d592c11eb3b2f8e92046 Merge: cd4744645959 e3ca9556f75c Author: Olof Johansson Date: Sun Nov 3 16:54:06 2019 -0800 Merge tag 'realtek-arm64-soc-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek into arm/soc Realtek ARM64 based SoC for v5.5 Enable reset controllers and add a mailing list to MAINTAINERS. * tag 'realtek-arm64-soc-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek: arm64: realtek: Select reset controller MAINTAINERS: Add mailing list for Realtek SoCs Link: https://lore.kernel.org/r/20191030041000.31848-1-afaerber@suse.de Signed-off-by: Olof Johansson commit 4454c069f1e484a89b9e55642e6a19ce9c265af3 Merge: 3760828a8b48 cfc0e76bbbde Author: Olof Johansson Date: Sun Nov 3 16:53:37 2019 -0800 Merge branch 'for_5.5/keystone-dts' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/dt * 'for_5.5/keystone-dts' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: configs: keystone: enable cpts ARM: dts: k2l-netcp: add cpts refclk_mux node ARM: dts: k2hk-netcp: add cpts refclk_mux node ARM: dts: k2e-netcp: add cpts refclk_mux node ARM: dts: k2e-clocks: add input ext. fixed clocks tsipclka/b ARM: dts: keystone-clocks: add input fixed clocks Link: https://lore.kernel.org/r/1572372856-20598-2-git-send-email-santosh.shilimkar@oracle.com Signed-off-by: Olof Johansson commit e6ce7f5a7d2e24f8f25c39abf6aeeed97ff0d59c Merge: b7f7a0b58fbd faee19ece826 Author: Olof Johansson Date: Sun Nov 3 16:53:07 2019 -0800 Merge branch 'for_5.5/driver-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/drivers * 'for_5.5/driver-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: memory: emif: remove set but not used variables 'cs1_used' and 'custom_configs' soc: ti: omap-prm: fix return value check in omap_prm_probe() soc: ti: omap-prm: add omap5 PRM data soc: ti: omap-prm: add am4 PRM data soc: ti: omap-prm: add dra7 PRM data soc: ti: omap-prm: add data for am33xx soc: ti: omap-prm: add omap4 PRM data soc: ti: omap-prm: add support for denying idle for reset clockdomain soc: ti: omap-prm: poll for reset complete during de-assert soc: ti: add initial PRM driver with reset control support dt-bindings: omap: add new binding for PRM instances Link: https://lore.kernel.org/r/1572372856-20598-1-git-send-email-santosh.shilimkar@oracle.com Signed-off-by: Olof Johansson commit 0b680963083ee6e1af6c902771e9d999a90fb97a Author: Fabio Estevam Date: Fri Oct 25 21:01:19 2019 -0300 arm64: dts: ls1028a: Fix tmu unit address The following build warning is seen with W=1: arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi:531.20-581.5: Warning (simple_bus_reg): /soc/tmu@1f00000: simple-bus unit address format error, expected "1f80000" Fix it by adjusting the tmu unit address to match its reg entry. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 68e36a429ef5dfc557d0c2c7388826ea6ce822d2 Author: Fabio Estevam Date: Fri Oct 25 21:01:18 2019 -0300 arm64: dts: ls1028a: Move thermal-zone out of SoC Move thermal-zone node from the soc node to the root node. thermal-zone node does not have any register properties and thus shouldn't be placed on the bus. This fixes the following build warnings with W=1: arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi:583.17-612.5: Warning (simple_bus_reg): /soc/thermal-zones: missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit f7e5bb37c45b6edbfad6482a0155821e7e08b66a Author: Fabio Estevam Date: Fri Oct 25 21:01:17 2019 -0300 arm64: dts: ls1028a-qds: Remove unnecessary #address-cells/#size-cells The following build warning is seen with W=1: arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts:196.10-208.4: Warning (avoid_unnecessary_addr_size): /soc/i2c@2000000/fpga@66: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Fix it by removing the unnecessary #address-cells/#size-cells. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 235e09198338b32f5c45548f5ed16ac9bd8f1e93 Author: Anson Huang Date: Wed Oct 23 14:34:41 2019 +0800 arm64: dts: imx8mn: Remove duplicated machine compatible Machine compatible string normally is located in board DT, remove the duplicated one from SoC dtsi. Signed-off-by: Anson Huang Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit 615138e583eff3468ec0c814ba55a0284f68625e Author: Anson Huang Date: Wed Oct 23 14:34:40 2019 +0800 arm64: dts: imx8mm: Remove duplicated machine compatible Machine compatible string normally is located in board DT, remove the duplicated one from SoC dtsi. Signed-off-by: Anson Huang Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit 431e4628ce0119183094a42820aa280096cc4a3a Author: Rogerio Pimentel da Silva Date: Tue Oct 22 16:20:34 2019 -0300 arm64: dts: imx8mq-evk: Add remote control Add remote control to i.MX8M EVK device tree. The rc protocol must be selected by writing to: /sys/devices/platform/ir-receiver/rc/rc0/protocols On my tests, I used "nec" rc protocol: echo nec > protocols Tested using evetest: evtest /dev/input/event0 Output log for each key pressed: Event: time 1568122608.267845, -------------- SYN_REPORT ------------ Event: time 1568122610.503835, type 4 (EV_MSC), code 4 (MSC_SCAN), value 440 Signed-off-by: Rogerio Pimentel da Silva Signed-off-by: Shawn Guo commit d7eb28d2740f6d4b485a32b0330a8168eaebb636 Author: Stefan Agner Date: Thu Apr 11 01:14:12 2019 +0200 ARM: imx: use generic function to exit coherency The common ARM architecture code provides a generic function to exit coherency called v7_exit_coherency_flush(). Replace the machine specific implementation using the generic function. Tested on a i.MX 6Dual by hotplugging the secondary CPU under load through sysfs several 1000 times. Tested-by: Stefan Agner Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo commit 8a86b00a437ec06b298477463c7a9b8774570507 Merge: 2ef4144d1ea8 5ab5e4e60acc Author: Dave Airlie Date: Mon Nov 4 10:22:53 2019 +1000 Merge tag 'drm-next-5.5-2019-11-01' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.5-2019-11-01: amdgpu: - Add EEPROM support for Arcturus - Enable VCN encode support for Arcturus - Misc PSP fixes - Misc DC fixes - swSMU cleanup amdkfd: - Misc cleanups - Fix typo in cu bitmap parsing Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191101190607.3763-1-alexander.deucher@amd.com commit 2ef4144d1ea8b181d377d0783c43032cb44889f7 Merge: 904ce198dd7b 1883e2999f04 Author: Dave Airlie Date: Mon Nov 4 09:56:25 2019 +1000 Merge tag 'drm-intel-next-2019-11-01-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - Make context persistence optional Allow userspace to tie the context lifetime to FD lifetime, effectively allowing Ctrl-C killing of a process to also clean up the hardware immediately. Compute changes: https://github.com/intel/compute-runtime/pull/228 The compute driver is shipping in Ubuntu. uAPI acked by Mesa folks. - Put future HW and their uAPIs under STAGING & BROKEN Introduces DRM_I915_UNSTABLE Kconfig menu for working on the new uAPI for future HW in upstream. We already disable driver loading by default the platform is deemed ready. This is a second level of protection based on compile time switch (STAGING & BROKEN). - Under DRM_I915_UNSTABLE: Add the fake lmem region on iGFX Fake local memory region on integrated GPU through cmdline: memmap=2G$16G i915.fake_lmem_start=0x400000000 Currently allows testing non-mappable GGTT behavior and running kernel selftest for local memory. Driver Changes: - Fix Bugzilla #112084: VGA external monitor not working (Ville) - Add support for half float framebuffers (Ville) - Add perf support on TGL (Lionel) - Replace hangcheck by heartbeats (Chris) - Allow SPT PCH on all AML devices (James) - Add new CNL PCH for CML platform (Imre) - Allow 100 ms (Kconfig) for workloads to exit before reset (Chris, Jon, Joonas) - Forcibly pre-empt a context after 100 ms (Kconfig) of delay (Chris) - Make timeslice duration Kconfig configurable (Chris) - Whitelist PS_(DEPTH|INVOCATION)_COUNT for Tigerlake (Tapani) - Support creating LMEM objects in kernel (Matt A) - Adjust the location of RING_MI_MODE in the context image for TGL (Chris) - Handle AUX interrupts for TC ports (Matt R) - Add support for devices without mappable GGTT aperture (Daniele) - Rename "inject_load_failure" module parameter to "inject_probe_failure" (Janusz) - Handle fused off HDCP, FBC, DMC and DSC (Jose) - Add support to one DP-MST stream on Tigerlake (Lucas) - Add HuC firmware (and GuC) for TGL (Daniele) - Allow ICL+ DSI on any pipe (Ville) - Check some transcoder timing minimum limits (Ville) - Don't set queue_priority_hint if we don't kick the submission (Chris) - Introduce barrier pulses along engines to flush idle/in-flight requests (Chris) - Drop assertion that ce->pin_mutex guards state updates (Chris) - Cancel banned contexts on schedule-out (Chris) - Cancel contexts when hangchecking is disabled (Chris) - Catch GTT fault errors for gen11+ planes (Matt R) - Print in debugfs if PSR is not enabled because of sink (Jose) - Do not set MOCS control values on dgfx (Lucas) - Setup io-mapping for LMEM (Abdiel) - Support kernel mapping of LMEM objects (Abdiel) - Add LMEM selftests (Matt A) - Initialise PMU spinlock before registering (Chris) - Clear DKL_TX_PMD_LANE_SUS before program TC voltage swing (Jose) - Flip interpretation of ips fmin/fmax to max rps (Chris) - Add VBT compression parameter block definition (Jani) - Limit the blitter sizes to ensure low preemption latency (Chris) - Fixup block_size rounding on BLT (Matt A) - Don't try to place HWS in non-existing mappable region (Michal Wa) - Don't allocate the ring in stolen if we lack aperture (Matt A) - Add AUX B & C to DC_OFF_POWER_DOMAINS for Tigerlake (Matt R) - Avoid HPD poll detect triggering a new detect cycle (Imre) - Document the userspace fail with possible_crtcs (Ville) - Drop lrc header page now unused by GuC (Daniele) - Do not switch aux to TBT mode for non-TC ports (Jose) - Restructure code to avoid depending on i915 but smaller structs (Chris, Tvrtko, Andi) - Remove pm park/unpark notifications (Chris) - Avoid lockdep cross-contamination between object types (Chris) - Restructure DSC code (Jani) - Fix dead locking in early workload shadow (Zhenyu) - Split the legacy submission backend from the common CS ring buffer (Chris) - Move intel_engine_context_in/out into intel_lrc.c (Tvrtko) - Describe perf/wakeref structure members in documentation (Anna) - Update renamed header files names in documentation (Anna) - Add debugs to distingiush a cd2x update from a full cdclk pll update (Ville) - Rework atomic global state locking (Ville) - Allow planes to declare their minimum acceptable cdclk (Ville) - Eliminate skl_check_pipe_max_pixel_rate() and simplify skl_max_scale() (Ville) - Making loglevel of PSR2/SU logs same (Ap) - Capture aux page table error register (Lionel) - Add is_dgfx to device info (Jose) - Split gen11_irq_handler to make it shareable (Lucas) - Encapsulate kconfig constant values inside boolean predicates (Chris) - Split memory_region initialisation into its own file (Chris) - Use _PICK() for CHICKEN_TRANS() and add CHICKEN_TRANS_D (Ville) - Add perf helper macros for comparing with whitelisted registers (Umesh) - Fix i915_inject_load_error() name to read *_probe_* (Janusz) - Drop unused AUX register offsets (Matt R) - Provide more information on DP AUX failures (Matt R) - Add GAM/SFC instdone to error state (Mika) - Always track callers to intel_rps_mark_interactive() (Chris) - Nuke 'mode' argument to intel_get_load_detect_pipe() (Ville) - Simplify LVDS crtc_mask and pipe_mask setup (Ville) - Stop frobbing crtc->base.mode (Ville) - Do s/crtc_mask/pipe_mask/ (Ville) - Split detaching and removing the vma (Chris) - Selftest improvements (Chris, Tvrtko, Mika, Matt A, Lionel) - GuC code improvements (Rob, Andi, Daniele) - Check against i915_selftest only under CONFIG_SELFTEST (Chris) - Refine occupancy test in kill_context() (Chris) - Start kthreads before stopping (Chris) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191101104718.GA14323@jlahtine-desk.ger.corp.intel.com commit 904ce198dd7bcf6eaa1735e9c0b06959351d4126 Merge: 633aa7e53a66 84db889e6d82 Author: Dave Airlie Date: Mon Nov 4 09:47:45 2019 +1000 Merge tag 'drm/tegra/for-5.5-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v5.5-rc1 The bulk of these changes is the addition of DisplayPort support for Tegra210, Tegra186 and Tegra194. I've been running versions of this for about three years now, so I'd consider these changes to be pretty mature. These changes also unify the existing eDP support with the DP support since the programming is very similar, except for a few steps that can be easily parameterized. The rest are a couple of fixes all over the place for minor issues, as well as some work to support the IOMMU-backed DMA API, which in the end turned out to also clean up a number of cases where the DMA API was not being used correctly. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191102140116.3860545-1-thierry.reding@gmail.com commit 633aa7e53a66b39b7205d4d2a221cda7eeb087c9 Merge: 57c2af791b6c fae7d7d5f374 Author: Dave Airlie Date: Mon Nov 4 09:27:41 2019 +1000 Merge tag 'drm-misc-next-2019-10-31' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.5: UAPI Changes: -dma-buf: Introduce and revert dma-buf heap (Andrew/John/Sean) Cross-subsystem Changes: - None Core Changes: -dma-buf: add dynamic mapping to allow exporters to choose dma_resv lock state on mmap/munmap (Christian) -vram: add prepare/cleanup fb helpers to vram helpers (Thomas) -ttm: always keep bo's on the lru + ttm cleanups (Christian) -sched: allow a free_job routine to sleep (Steven) -fb_helper: remove unused drm_fb_helper_defio_init() (Thomas) Driver Changes: -bochs/hibmc/vboxvideo: Use new vram helpers for prepare/cleanup fb (Thomas) -amdgpu: Implement dma-buf import/export without drm helpers (Christian) -panfrost: Simplify devfreq integration in driver (Steven) Cc: Christian König Cc: Thomas Zimmermann Cc: Steven Price Cc: Andrew F. Davis Cc: John Stultz Cc: Sean Paul Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191031193015.GA243509@art_vandelay commit 0b3292852863215825f88905b9dbafc3101e1d7e Author: Codrin Ciubotariu Date: Fri Nov 1 11:20:31 2019 +0200 pinctrl: at91: Enable slewrate by default on SAM9X60 On SAM9X60, slewrate should be enabled on pins with a switching frequency below 50Mhz. Since most of our pins do not exceed this value, we enable slewrate by default. Pins with a switching value that exceeds 50Mhz will have to explicitly disable slewrate. This patch changes the ABI. However, the slewrate macros are only used by SAM9X60 and, at this moment, there are no device-tree files available for this platform. Suggested-by: Ludovic Desroches Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20191101092031.24896-1-codrin.ciubotariu@microchip.com Acked-by: Ludovic Desroches Reviewed-by: Claudiu Beznea Signed-off-by: Linus Walleij commit aa5f2af535f711e78ac26789c34739037ec1c474 Merge: 66ee19736035 884caadad128 Author: Linus Walleij Date: Sun Nov 3 23:16:40 2019 +0100 Merge tag 'sh-pfc-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v5.5 (take two) - Add support for the new R-Car M3-W+ (r8a77961) SoC, - Small fixes and cleanups. commit 891e60368ba1840c1b8bbc72beb1da0dae289430 Author: Johannes Thumshirn Date: Wed Oct 16 12:01:58 2019 +0200 drivers: mcb: use symbol namespaces Now that we have symbol namespaces, use them in MCB to not pollute the default namespace with MCB internals. Signed-off-by: Johannes Thumshirn Reviewed-by: Jessica Yu Reviewed-by: Michael Moese Link: https://lore.kernel.org/r/20191016100158.1400-1-jthumshirn@suse.de Signed-off-by: Greg Kroah-Hartman commit b889b3b07c9d9b7964f88d21b15899b142e10dc0 Author: Drew DeVault Date: Sun Nov 3 13:06:46 2019 -0500 firmware loader: log path to loaded firmwares This is useful for users who are trying to identify the firmwares in use on their system. Signed-off-by: Drew DeVault Link: https://lore.kernel.org/r/20191103180646.34880-1-sir@cmpwn.com Signed-off-by: Greg Kroah-Hartman commit 6647e4e84501e7f935f108729da9a6fd60924d8b Author: Davidlohr Bueso Date: Sun Nov 3 10:09:21 2019 -0800 staging: exfat: Ensure we unlock upon error in ffsReadFile The call was not releasing the mutex upon error. Reported-by: kbuild test robot Reported-by: Julia Lawall Signed-off-by: Davidlohr Bueso Acked-By: Valdis Kletnieks Link: https://lore.kernel.org/r/20191103180921.2844-1-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman commit c34d570d158699c6c812f5df653aaf2e3a83acca Author: Christoph Hellwig Date: Wed Oct 30 12:25:00 2019 -0700 xfs: cleanup use of the XFS_ALLOC_ flags Always set XFS_ALLOC_USERDATA for data fork allocations, and check it in xfs_alloc_is_userdata instead of the current obsfucated check. Also remove the xfs_alloc_is_userdata and xfs_alloc_allow_busy_reuse helpers to make the code a little easier to understand. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit fd638f1de1f3f736ea4debb3582999ea95506e0a Author: Christoph Hellwig Date: Wed Oct 30 12:25:00 2019 -0700 xfs: move extent zeroing to xfs_bmapi_allocate Move the extent zeroing case there for the XFS_BMAPI_ZERO flag outside the low-level allocator and into xfs_bmapi_allocate, where is still is in transaction context, but outside the very lowlevel code where it doesn't belong. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit be6cacbeea8c562a06e9a03c95e3fdee065d1b7b Author: Christoph Hellwig Date: Wed Oct 30 12:24:59 2019 -0700 xfs: refactor xfs_bmapi_allocate Avoid duplicate userdata and data fork checks by restructuring the code so we only have a helper for userdata allocations that combines these checks in a straight foward way. That also helps to obsoletes the comments explaining what the code does as it is now clearly obvious. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e696663a97e89f88d085ff84b8a373989ae613b1 Author: Christoph Hellwig Date: Wed Oct 30 12:24:59 2019 -0700 xfs: simplify the xfs_iomap_write_direct calling Move the EOF alignment and checking for the next allocated extent into the callers to avoid the need to pass the byte based offset and count as well as looking at the incoming imap. The added benefit is that the caller can unlock the incoming ilock and the function doesn't have funny unbalanced locking contexts. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 307cdb54b80e036978b7b717abcbcfdac0b34e38 Author: Christoph Hellwig Date: Wed Oct 30 12:24:58 2019 -0700 xfs: don't log the inode in xfs_fs_map_blocks if it Even if we are asked for a write layout there is no point in logging the inode unless we actually modified it in some way. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 88cdb7147b21b2d8b4bd3f3d95ce0bffd73e1ac3 Author: Christoph Hellwig Date: Wed Oct 30 12:24:58 2019 -0700 xfs: slightly tweak an assert in xfs_fs_map_blocks We should never see delalloc blocks for a pNFS layout, write or not. Adjust the assert to check for that. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 57c49444d7cc93167961842af94df465478b2f55 Author: Christoph Hellwig Date: Wed Oct 30 12:24:58 2019 -0700 xfs: remove the extsize argument to xfs_eof_alignment And move the code dependent on it to the one caller that cares instead. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 49bbf8c76156932d9cec4e95cc4471a2c757d70f Author: Christoph Hellwig Date: Wed Oct 30 12:24:57 2019 -0700 xfs: mark xfs_eof_alignment static Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ae7e403fa5bbb3ab309b3281e3cdcb4dd720e939 Author: Christoph Hellwig Date: Wed Oct 30 12:24:57 2019 -0700 xfs: simplify xfs_iomap_eof_align_last_fsb By open coding xfs_bmap_last_extent instead of calling it through a double indirection we don't need to handle an error return that can't happen given that we are guaranteed to have the extent list in memory already. Also simplify the calling conventions a little and move the extent list assert from the only caller into the function. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 118e11182a8168515a11b27c4c6d80fbb233b7f8 Author: Geert Uytterhoeven Date: Fri Oct 25 11:41:30 2019 +0200 mmc: dw_mmc: Remove superfluous cast in debugfs_create_u32() call "dw_mci.state" is an enum, which is compatible with u32, so there is no need to cast its address, preventing further compiler checks. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Link: https://lore.kernel.org/r/20191025094130.26033-8-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 0c40c1be2512abc99ea27df83f882dd61b5437bc Author: Geert Uytterhoeven Date: Fri Oct 25 11:41:29 2019 +0200 mmc: dw_mmc: Fix debugfs on 64-bit platforms "dw_mci.pending_events" and "dw_mci.completed_events" are "unsigned long", i.e. 32-bit or 64-bit, depending on the platform. Hence casting their addresses to "u32 *", and calling debugfs_create_x32() breaks operation on 64-bit platforms. Fix this by using the new debugfs_create_xul() helper instead. Fixes: f95f3850f7a9e1d4 ("mmc: dw_mmc: Add Synopsys DesignWare mmc host driver.") Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Link: https://lore.kernel.org/r/20191025094130.26033-7-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit f1dfe70b7ff73e1469fd6ea25e89d8a4d2dd1c39 Author: Geert Uytterhoeven Date: Fri Oct 25 11:41:28 2019 +0200 mmc: atmel-mci: Remove superfluous cast in debugfs_create_u32() call "atmel_mci.state" is an enum, which is compatible with u32, so there is no need to cast its address, preventing further compiler checks. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Link: https://lore.kernel.org/r/20191025094130.26033-6-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 785bbb804a70eb5ee752643919c860155b6b56c6 Author: Geert Uytterhoeven Date: Fri Oct 25 11:41:27 2019 +0200 mmc: atmel-mci: Fix debugfs on 64-bit platforms "atmel_mci.pending_events" and "atmel_mci.completed_events" are "unsigned long", i.e. 32-bit or 64-bit, depending on the platform. Hence casting their addresses to "u32 *", and calling debugfs_create_x32() breaks operation on 64-bit platforms. Fix this by using the new debugfs_create_xul() helper instead. Fixes: deec9ae31e607955 ("atmel-mci: debugfs support") Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Link: https://lore.kernel.org/r/20191025094130.26033-5-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 5f820ed52371b4f5d8c43c93f03408d0dbc01e5b Author: Martin Schiller Date: Fri Oct 25 09:01:42 2019 +0200 leds: trigger: netdev: fix handling on interface rename The NETDEV_CHANGENAME code is not "unneeded" like it is stated in commit 4cb6560514fa ("leds: trigger: netdev: fix refcnt leak on interface rename"). The event was accidentally misinterpreted equivalent to NETDEV_UNREGISTER, but should be equivalent to NETDEV_REGISTER. This was the case in the original code from the openwrt project. Otherwise, you are unable to set netdev led triggers for (non-existent) netdevices, which has to be renamed. This is the case, for example, for ppp interfaces in openwrt. Fixes: 06f502f57d0d ("leds: trigger: Introduce a NETDEV trigger") Fixes: 4cb6560514fa ("leds: trigger: netdev: fix refcnt leak on interface rename") Signed-off-by: Martin Schiller Signed-off-by: Pavel Machek commit d3504757f3f049b553ba0eda8bd17cd1f2651285 Author: Geert Uytterhoeven Date: Fri Oct 25 11:41:24 2019 +0200 debugfs: Add debugfs_create_xul() for hexadecimal unsigned long The existing debugfs_create_ulong() function supports objects of type "unsigned long", which are 32-bit or 64-bit depending on the platform, in decimal form. To format objects in hexadecimal, various debugfs_create_x*() functions exist, but all of them take fixed-size types. Add a debugfs helper for "unsigned long" objects in hexadecimal format. This avoids the need for users to open-code the same, or introduce bugs when casting the value pointer to "u32 *" or "u64 *" to call debugfs_create_x{32,64}(). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191025094130.26033-2-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 726ce477285dc77c824ea7273f2be9dd48ef1267 Author: Geert Uytterhoeven Date: Mon Oct 21 17:06:45 2019 +0200 Documentation: debugfs: Document debugfs helper for unsigned long values When debugfs_create_ulong() was added, it was not documented. Fixes: c23fe83138ed7b11 ("debugfs: Add debugfs_create_ulong()") Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20191021150645.32440-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit fc7b5028f2627133c7c18734715a08829eab4d1f Author: Chuhong Yuan Date: Wed Oct 16 20:54:03 2019 +0800 leds: an30259a: add a check for devm_regmap_init_i2c an30259a_probe misses a check for devm_regmap_init_i2c and may cause problems. Add a check and print errors like other leds drivers. Signed-off-by: Chuhong Yuan Signed-off-by: Pavel Machek commit 7c6082b903ac28dc3f383fba57c6f9e7e2594178 Author: Oleh Kravchenko Date: Wed Oct 16 10:24:30 2019 +0300 leds: mlxreg: Fix possible buffer overflow Error was detected by PVS-Studio: V512 A call of the 'sprintf' function will lead to overflow of the buffer 'led_data->led_cdev_name'. Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Signed-off-by: Oleh Kravchenko Signed-off-by: Pavel Machek commit 66c41131daba0985464d8eb88092908c023ecb66 Author: Stephen Boyd Date: Fri Oct 4 14:43:25 2019 -0700 leds: pca953x: Use of_device_get_match_data() This driver can use the of_device_get_match_data() API to simplify the code. Replace calls to of_match_device() with this newer API under the assumption that where it is called will be when we know the device is backed by a DT node. This nicely avoids referencing the match table when it is undefined with configurations where CONFIG_OF=n. Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Riku Voipio Cc: Rob Herring Cc: Frank Rowand Cc: Jacek Anaszewski Cc: Pavel Machek Cc: Dan Murphy Cc: Signed-off-by: Stephen Boyd Signed-off-by: Pavel Machek commit 9cc93be7b0c91a87ef452457c706af62741249d7 Author: Dan Murphy Date: Wed Oct 2 07:40:42 2019 -0500 leds: core: Fix leds.h structure documentation Update the leds.h structure documentation to define the correct arguments. Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit 4b83cf07d7a4ae70eae2e49086515cad0f42c629 Author: Dan Murphy Date: Wed Oct 2 07:40:41 2019 -0500 leds: core: Fix devm_classdev_match to reference correct structure Fix the devm_classdev_match pointer initialization to the correct structure type. Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit ec28a8cfdce6306afcbf528e231a733010c82251 Author: Dan Murphy Date: Wed Oct 2 07:40:40 2019 -0500 leds: core: Remove extern from header extern is implied and is not needed in the header file. Remove the extern keyword and re-align the code. Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit e63a744871a31cebc7860c5b38b3655d70cfc584 Author: Dan Murphy Date: Wed Oct 2 07:40:39 2019 -0500 leds: lm3601x: Convert class registration to device managed Convert LED flash class registration to device managed class registration API. Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit 20cdba9d9c165e475fcc5af97857b6fa7aec96a0 Author: Dan Murphy Date: Wed Oct 2 07:40:38 2019 -0500 leds: flash: Add devm_* functions to the flash class Add the missing device managed API for registration and unregistration for the LED flash class. Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit 57e5c31e53758aad96699e784a752ad944890b25 Author: Dan Murphy Date: Wed Oct 2 07:40:37 2019 -0500 leds: flash: Remove extern from the header file extern is implied and is not needed in the header file. Remove the extern keyword and re-align the code. Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit 4a29f90e60df955f1b6e0dd836955f14a62dc103 Author: Dan Murphy Date: Tue Oct 1 13:04:36 2019 -0500 leds: flash: Convert non extended registration to inline Convert the #define non-extended registration API to an inline function. Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit f884e866537ccb10517299b01a5028598653d8d7 Author: Dan Murphy Date: Tue Oct 1 13:04:35 2019 -0500 leds: Kconfig: Be consistent with the usage of "LED" Update the Kconfig to be consistent in the case of using "LED" in the Kconfig. LED is an acronym and should be capitalized. Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit 11f70002213774ed233950f71ea8803fa3700aa3 Author: Akinobu Mita Date: Sun Sep 29 23:18:49 2019 +0900 leds: remove PAGE_SIZE limit of /sys/class/leds//trigger Reading /sys/class/leds//trigger returns all available LED triggers. However, the size of this file is limited to PAGE_SIZE because of the limitation for sysfs attribute. Enabling LED CPU trigger on systems with thousands of CPUs easily hits PAGE_SIZE limit, and makes it impossible to see all available LED triggers and which trigger is currently activated. We work around it here by converting /sys/class/leds//trigger to binary attribute, which is not limited by length. This is _not_ good design, do not copy it. Signed-off-by: Akinobu Mita Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Dan Murphy A Reviewed-by: Greg Kroah-Hartman Signed-off-by: Pavel Machek commit a2cafdfd8cf5ad8adda6c0ce44a59f46431edf02 Author: Jean-Jacques Hiblot Date: Mon Sep 23 12:02:50 2019 +0200 leds: tlc591xx: update the maximum brightness The TLC chips actually offer 257 levels: - 0: led OFF - 1-255: Led dimmed is using a PWM. The duty cycle range from 0.4% to 99.6% - 256: led fully ON Fixes: e370d010a5fe ("leds: tlc591xx: Driver for the TI 8/16 Channel i2c LED driver") Signed-off-by: Jean-Jacques Hiblot Signed-off-by: Pavel Machek commit da61a66a829d67b854089aa5ec4c5a2031bb0864 Author: Guido Günther Date: Sat Sep 21 14:12:12 2019 -0700 leds: lm3692x: Use flags from LM3692X_BRT_CTRL Use LM3692X_RAMP_EN instead of LM3692X_PWM_HYSTER_4LSB since the later is a flag for the PWM register. The actual register value remains unchanged. Signed-off-by: Guido Günther Reviewed-by: Dan Murphy Acked-by: Pavel Machek Signed-off-by: Pavel Machek commit 846d0d14e7ec7935ab79e6cebf752396d05c2609 Author: Guido Günther Date: Sat Sep 21 14:12:11 2019 -0700 leds: lm3692x: Use flags from LM3692X_BOOST_CTRL The current setup of LM3692X_BOOST_CTRL uses flags from LM3692X_BRT_CTRL. Use flags from LM3692X_BOOST_CTRL but leave the resulting register value unchanged. Signed-off-by: Guido Günther Reviewed-by: Dan Murphy Acked-by: Pavel Machek Signed-off-by: Pavel Machek commit 396128d2ffcba6e1954cfdc9a89293ff79cbfd7c Author: Guido Günther Date: Sat Sep 21 14:12:10 2019 -0700 leds: lm3692x: Handle failure to probe the regulator Instead use devm_regulator_get_optional since the regulator is optional and check for errors. Signed-off-by: Guido Günther Acked-by: Pavel Machek Reviewed-by: Dan Murphy Signed-off-by: Pavel Machek commit d0f9cc49e9c8afae49f0efc7927156dbd555ee93 Author: Guido Günther Date: Sat Sep 21 14:12:09 2019 -0700 leds: lm3692x: Don't overwrite return value in error path The driver currently reports successful initialization on every failure as long as it's able to power off the regulator. Don't check the return value of regulator_disable to avoid that. Signed-off-by: Guido Günther Acked-by: Pavel Machek Reviewed-by: Dan Murphy Signed-off-by: Pavel Machek commit 1051da2cfc7ef37ffc3e7a595dc80fefb41f09ad Author: Guido Günther Date: Sat Sep 21 14:12:08 2019 -0700 leds: lm3692x: Print error value on dev_err This gives a way better idea what is going on. Signed-off-by: Guido Günther Reviewed-by: Dan Murphy Acked-by: Pavel Machek Signed-off-by: Pavel Machek commit 5b4b723c483f5027da77409f34b8b4602ee1e557 Author: Jean-Jacques Hiblot Date: Fri Sep 20 13:58:06 2019 +0200 leds: tlc591xx: use devm_led_classdev_register_ext() Use devm_led_classdev_register_ext() to pass the fwnode to the LED core. The fwnode can then be used by the firmware core to create meaningful names. Signed-off-by: Jean-Jacques Hiblot Signed-off-by: Pavel Machek commit 1ab4531ad13208c7721bd98300e2aa7a3a5500a3 Author: Jean-Jacques Hiblot Date: Fri Sep 20 13:58:05 2019 +0200 leds: tlc591xx: simplify driver by using the managed led API Use the managed API of the LED class (devm_led_classdev_register() instead of led_classdev_register()). This allows us to remove the code used to track-and-destroy the LED devices. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tomi Valkeinen Signed-off-by: Pavel Machek commit 8b4423d6c5e6515bf6ad7c6c51dfb0a4a95ec606 Author: Markus Elfring Date: Fri Sep 20 14:44:06 2019 +0200 leds: bcm6358: Use devm_platform_ioremap_resource() in bcm6358_leds_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Pavel Machek commit be9f18eef60197a0da8bc514f7bb9512dbc04c48 Author: Markus Elfring Date: Fri Sep 20 14:30:31 2019 +0200 leds: bcm6328: Use devm_platform_ioremap_resource() in bcm6328_leds_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Pavel Machek commit b46d2b4d3d8166ab51f491a2801e2cbed2e8a7aa Author: Daniel Mack Date: Fri Sep 13 20:07:49 2019 +0200 drivers: leds: tlc591xx: check error during device init The driver currently ignores errors from register writes at probe time. It will hence register an LED class device no matter whether the pyhsical device is present or not. To fix this, make the device probe fail in case regmap operations return an error. Signed-off-by: Daniel Mack Signed-off-by: Pavel Machek commit fc19967bcb8f1ab49594191ee0d352d763dc170e Author: Oleh Kravchenko Date: Thu Sep 19 15:53:13 2019 +0300 leds: add LED driver for EL15203000 board This patch adds a LED class driver for the LEDs found on the Crane Merchandising System EL15203000 LEDs board (aka RED LEDs board). Signed-off-by: Oleh Kravchenko Reviewed-by: Dan Murphy Signed-off-by: Pavel Machek commit a788f6f2e28d03edbbaf81b69788e57e3e031aeb Author: Oleh Kravchenko Date: Thu Sep 19 15:53:12 2019 +0300 dt-bindings: Add docs for EL15203000 Add documentation and example for dt-bindings EL15203000. LED board (aka RED LED board) from Crane Merchandising Systems. Signed-off-by: Oleh Kravchenko Reviewed-by: Dan Murphy Signed-off-by: Pavel Machek commit cba22d86e0a10b7070d2e6a7379dbea51aa0883c Author: Jan Kara Date: Mon Oct 21 10:38:00 2019 +0200 bdev: Refresh bdev size for disks without partitioning Currently, block device size in not updated on second and further open for block devices where partition scan is disabled. This is particularly annoying for example for DVD drives as that means block device size does not get updated once the media is inserted into a drive if the device is already open when inserting the media. This is actually always the case for example when pktcdvd is in use. Fix the problem by revalidating block device size on every open even for devices with partition scan disabled. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 731dc4868311ee097757b8746eaa1b4f8b2b4f1c Author: Jan Kara Date: Mon Oct 21 10:37:59 2019 +0200 bdev: Factor out bdev revalidation into a common helper Factor out code handling revalidation of bdev on disk change into a common helper. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 9927c6fa3e1d941c9b89f807f5d0480390eb0471 Author: Greg Kroah-Hartman Date: Wed Oct 16 06:03:32 2019 -0700 debugfs: remove return value of debugfs_create_atomic_t() No one checks the return value of debugfs_create_atomic_t(), 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/20191016130332.GA28240@kroah.com Signed-off-by: Greg Kroah-Hartman commit 19c1e145a436ac316f1556ebc229f08f333bc60c Author: Javier F. Arias Date: Sat Nov 2 17:49:28 2019 -0500 staging: rtl8723bs: Remove unnecessary parentheses This patch removes unnecessary parentheses. Issue found by checkpatch Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/b2526b464b8afed3b2c3a3a72ae183fb63df3ae7.1572734925.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1878c5b91430d38a0beefd0dc5cb6035913ebc7f Author: Christophe JAILLET Date: Sat Nov 2 16:59:45 2019 +0100 staging: wfx: Fix a memory leak in 'wfx_upload_beacon' The current code is a no-op, because all it can do is 'dev_kfree_skb(NULL)' Remove the test before 'dev_kfree_skb()' Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20191102155945.20205-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit d3baf1e0b2fefa9433e8d299541cf451e59c5709 Author: Frank A. Cancio Bello Date: Sat Nov 2 04:06:54 2019 +0000 staging: exfat: Fix logical operation continuation Operators inside a multiline logical expression should be at the end of the line not at the beginning. This patch fixes two of those cases and remove an unnecessary parenthesis too, to comply in that way with the preferred coding style for the linux kernel. Suggested-by: Julia Lawall Signed-off-by: Frank A. Cancio Bello Acked-by: Julia Lawall Link: https://lore.kernel.org/r/ace2cbd5e4c03751fb522e7bbd60149e7ed969ae.1572666556.git.frank@generalsoftwareinc.com Signed-off-by: Greg Kroah-Hartman commit 8a4e640eb7f65dd643b77a0297ca244ef29cc1fa Author: Frank A. Cancio Bello Date: Sat Nov 2 04:06:32 2019 +0000 staging: exfat: Fix parameter alignment issues Fix alignment to match open parenthesis to comply in that way with the preferred coding style for the linux kernel. Issue found by checkpatch. Suggested-by: Julia Lawall Signed-off-by: Frank A. Cancio Bello Acked-by: Julia Lawall Link: https://lore.kernel.org/r/fe316e694ea9c4aa370d3a8166a3680feb342682.1572666556.git.frank@generalsoftwareinc.com Signed-off-by: Greg Kroah-Hartman commit 354e27a86b4c6479cbc51a8e9e347665a73e8d12 Author: Quentin Deslandes Date: Fri Nov 1 21:42:59 2019 +0000 staging: axis-fifo: remove unused pointer to memory resource Remove unused resource pointer from the device's internal structure. Signed-off-by: Quentin Deslandes Link: https://lore.kernel.org/r/20191101214232.16960-4-quentin.deslandes@itdev.co.uk Signed-off-by: Greg Kroah-Hartman commit 6a20d283ed68670e9301c4a951ea84fefbb2df53 Author: Quentin Deslandes Date: Fri Nov 1 21:42:54 2019 +0000 staging: axis-fifo: request resources using managed functions Request device's resources (memory, interrupt...) using managed function. Signed-off-by: Quentin Deslandes Link: https://lore.kernel.org/r/20191101214232.16960-3-quentin.deslandes@itdev.co.uk Signed-off-by: Greg Kroah-Hartman commit ed6daf2b2832d9b07582a6ff884039afa9063206 Author: Quentin Deslandes Date: Fri Nov 1 21:42:50 2019 +0000 staging: axis-fifo: avoid parsing ignored device tree properties Some properties were parsed from the device tree and then ignored by the driver. Some would return an error if absent from the device tree, then return an error if they were found because they are unsupported by the driver. Avoid parsing unused properties and clearly explain in the documentation the ignored / unsupported properties. Signed-off-by: Quentin Deslandes Link: https://lore.kernel.org/r/20191101214232.16960-2-quentin.deslandes@itdev.co.uk Signed-off-by: Greg Kroah-Hartman commit 3bce4750c97d25befd3a7be4de14d58ecd79d420 Author: Frank A. Cancio Bello Date: Fri Nov 1 23:25:22 2019 +0000 staging: vt6655: Fix long lines Lines longer than 80 characters should be avoided because they are ugly and harder to read. Fix a few of long lines to comply with the preferred coding style for the linux kernel. Issues found by checkpatch. Suggested-by: Julia Lawall Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/588c73f275b22f55323797706e5ceae44d7aa160.1572649242.git.frank@generalsoftwareinc.com Signed-off-by: Greg Kroah-Hartman commit 31d0c9d9b77df929c127198e43f106cb1cf0d9f4 Author: Frank A. Cancio Bello Date: Fri Nov 1 23:23:49 2019 +0000 staging: vt6655: Fix open ended lines This commit arrange function declaration in one line to avoid lines ending with '(' and comply in that way with the preferred coding style for the linux kernel. Suggested-by: Julia Lawall Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/bdbc1d472a8d90487d691e82ab8154a5733e6a0f.1572649242.git.frank@generalsoftwareinc.com Signed-off-by: Greg Kroah-Hartman commit ebacc1a7654f37b95545daf4ec282518eeabbfe4 Author: Frank A. Cancio Bello Date: Fri Nov 1 23:22:46 2019 +0000 staging: vt6655: Fix the spacing around operators Add space around operators to comply in that way with the preferred coding style for the linux kernel. Issue found by checkpatch. Suggested-by: Julia Lawall Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/0f77b97e88c28c503caf25fafb84729509969ec3.1572649242.git.frank@generalsoftwareinc.com Signed-off-by: Greg Kroah-Hartman commit 8b3f9afcca18787c82ba1b1ffc49c9aaee851c21 Author: Frank A. Cancio Bello Date: Fri Nov 1 23:21:54 2019 +0000 staging: vt6655: Fix parameter alignment issues Fix alignment to match open parenthesis and comply in that way with the preferred coding style for the linux kernel. Issue found by checkpatch. Suggested-by: Julia Lawall Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/df2a5f511870bd96abb9b111de83f3a1f1d82d70.1572649242.git.frank@generalsoftwareinc.com Signed-off-by: Greg Kroah-Hartman commit c49cfc227e7f49e6011d6b955145814ce13424bc Author: Alexandru Ardelean Date: Fri Nov 1 11:35:05 2019 +0200 iio: imu: adis: assign value only if return code zero in read funcs The inline read functions in the ADIS library don't check the return value of the `adis_read_reg()` function and assign the value of `tmp` regardless. Fix this by checking if return value is zero and only then assigning the value of `tmp`. No known case of the callers of this function incorrectly using the value, but best to stop any potential risk here. Not suitable for stable due to no known actual bugs caused by this issue. Fixes: 57a1228a06b7a ("iio:imu:adis: Add support for 32bit registers") Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 38262c01ead40f2b061e8b7e6abe254b538d856c Author: Alexandru Ardelean Date: Fri Nov 1 11:35:04 2019 +0200 iio: imu: adis: assign read val in debugfs hook only if op successful This was also caught by the `-Wmaybe-uninitialized` warning, which (ironically as-is) it makes quite a lot of sense to do for this. The code that actually calls this function will fail to copy on the uninitialized value. Hence, patch does not need to go into stable. Fixes: 78026a6fde8f7 ("iio:imu:adis: Add debugfs register access support") Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 9b742763d9d4195e823ae6ece760c9ed0500c1dc Author: Alexandru Ardelean Date: Fri Nov 1 11:35:03 2019 +0200 iio: imu: adis16480: assign bias value only if operation succeeded This was found only after the whole thing with the inline functions, but the compiler actually found something. The value of the `bias` (in adis16480_get_calibbias()) should only be set if the read operation was successful. No actual known problem occurs as users of this function all ultimately check the return value. Hence probably not stable material. Fixes: 2f3abe6cbb6c9 ("iio:imu: Add support for the ADIS16480 and similar IMUs") Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 52c4c732b2a6fea469790438cb08ed2de2405c3e Author: Alexandru Ardelean Date: Fri Nov 1 11:35:02 2019 +0200 iio: imu: adis16480: prefer `unsigned int` over `unsigned` This is a typical checkpatch warning. The change just renames the type of the `freq` var to `unsigned int`. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit d9bbae304a3ed9bc51bf4c815dd6aa6ed0fdd118 Author: Alexandru Ardelean Date: Fri Nov 1 11:35:01 2019 +0200 iio: imu: adis16480: fix indentation of return statement This is just a minor indentation/alignment fix for the default case of a switch statement. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 6a39ab3b195c125d3fe49d0b0b613c2e1dbbc5a2 Author: Alexandru Ardelean Date: Fri Nov 1 11:35:00 2019 +0200 iio: imu: adis: check ret val for non-zero vs less-than-zero The ADIS library functions return zero on success, and negative values for error. Positive values aren't returned, but we only care about the success value (which is zero). This change is mostly needed so that the compiler won't make any inferences about some about values being potentially un-initialized. This only triggers after making some functions inline, because the compiler can better follow return paths. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 92c7529fc1bf3e607ed90c941e55bc244e04a256 Author: Alexandru Ardelean Date: Fri Nov 1 11:34:59 2019 +0200 iio: imu: adis16480: check ret val for non-zero vs less-than-zero The ADIS library functions return zero on success, and negative values for error. Positive values aren't returned, but we only care about the success value (which is zero). This change is mostly needed so that the compiler won't make any inferences about some about values being potentially un-initialized. This only triggers after making some functions inline, because the compiler can better follow return paths. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit c754a45455bb1ba759304128063c4325205f22fb Author: Alexandru Ardelean Date: Fri Nov 1 11:34:58 2019 +0200 iio: imu: adis16460: check ret val for non-zero vs less-than-zero The ADIS library functions return zero on success, and negative values for error. Positive values aren't returned, but we only care about the success value (which is zero). This change is mostly needed so that the compiler won't make any inferences about some about values being potentially un-initialized. This only triggers after making some functions inline, because the compiler can better follow return paths. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit fe4b7f917e8fa20c1a9dd2b3f417acd3b063c880 Author: Alexandru Ardelean Date: Fri Nov 1 11:34:57 2019 +0200 iio: imu: adis16400: check ret val for non-zero vs less-than-zero The ADIS library functions return zero on success, and negative values for error. Positive values aren't returned, but we only care about the success value (which is zero). This change is mostly needed so that the compiler won't make any inferences about some about values being potentially un-initialized. This only triggers after making some functions inline, because the compiler can better follow return paths. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 26ba6db672698641223eece20beeb59a60032eb9 Author: Alexandru Ardelean Date: Fri Nov 1 11:34:56 2019 +0200 iio: gyro: adis16136: check ret val for non-zero vs less-than-zero The ADIS library functions return zero on success, and negative values for error. Positive values aren't returned, but we only care about the success value (which is zero). This change is mostly needed so that the compiler won't make any inferences about some about values being potentially un-initialized. This only triggers after making some functions inline, because the compiler can better follow return paths. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 5759af0682b3395e64cf615e062d6ecad01428dc Author: Sven Eckelmann Date: Wed Oct 30 08:03:49 2019 +0100 batman-adv: Drop lockdep.h include for soft-interface.c The commit ab92d68fc22f ("net: core: add generic lockdep keys") removed all lockdep functionality from soft-interface.c but didn't remove the include for this functionality. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit a7757d318a8afaf3e1f17926ee1857b0d005db70 Author: Sven Eckelmann Date: Thu Oct 31 17:34:37 2019 +0100 batman-adv: Use 'fallthrough' pseudo keyword The usage of the '/* fall through */' comments in switches are no longer marked as non-deprecated variant of implicit fall throughs for switch statements. The commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use") introduced a replacement keyword which should be used instead. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit baa1e8a0da768d9b9c34b47f2cc6c6db67a265c4 Author: Christophe JAILLET Date: Thu Oct 31 09:52:40 2019 +0100 batman-adv: Axe 'aggr_list_lock' 'aggr_list.lock' can safely be used in place of another explicit spinlock when access to 'aggr_list' has to be guarded. This avoids to take 2 locks, knowing that the 2nd one is always successful. Now that the 'aggr_list.lock' is handled explicitly, the lock-free __sbk_something() variants should be used when dealing with 'aggr_list'. Signed-off-by: Christophe JAILLET Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 9044854e4b8b2cf60fc309a1f2288f7acda6ca6b Author: Christophe JAILLET Date: Thu Oct 31 08:42:55 2019 +0100 batman-adv: Simplify 'batadv_v_ogm_aggr_list_free()' Use 'skb_queue_purge()' instead of re-implementing it. Signed-off-by: Christophe JAILLET Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 79f0a4858fa700c0b77795a2f5795be3f9b27017 Author: Simon Wunderlich Date: Sat Sep 21 20:50:04 2019 +0200 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich commit ae8a76fb8b5d03fa2adc7249dc6131ba6a0c6119 Merge: d31e95585ca6 358fdb456288 Author: David S. Miller Date: Sat Nov 2 15:27:42 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2019-11-02 The following pull-request contains BPF updates for your *net-next* tree. We've added 30 non-merge commits during the last 7 day(s) which contain a total of 41 files changed, 1864 insertions(+), 474 deletions(-). The main changes are: 1) Fix long standing user vs kernel access issue by introducing bpf_probe_read_user() and bpf_probe_read_kernel() helpers, from Daniel. 2) Accelerated xskmap lookup, from Björn and Maciej. 3) Support for automatic map pinning in libbpf, from Toke. 4) Cleanup of BTF-enabled raw tracepoints, from Alexei. 5) Various fixes to libbpf and selftests. ==================== Signed-off-by: David S. Miller commit d31e95585ca697fb31440c6fe30113adc85ecfbd Merge: c23fcbbc6aa4 1204c70d9dcb Author: David S. Miller Date: Sat Nov 2 13:12:51 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net The only slightly tricky merge conflict was the netdevsim because the mutex locking fix overlapped a lot of driver reload reorganization. The rest were (relatively) trivial in nature. Signed-off-by: David S. Miller commit cbf6673d672f9a572f98acc02d82d23d036cdb1f Merge: b05a50bb37dc 1f2719c5c49f Author: Olof Johansson Date: Sat Nov 2 13:35:38 2019 -0700 Merge tag 'arm64_defconfig_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/defconfig arm64 defconfig for v5.5 - Add SPI_CADENCE_QUADSPI to support the Cadence QSPI driver - Add INTEL_STRATIX10_RSU as a module to support the Remote Service Update driver on Stratix10 and Agilex platforms - Add GPIO_ALTERA as a module to support the Altera GPIO driver * tag 'arm64_defconfig_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: defconfig: enable Altera GPIO controller arm64: defconfig: enable rsu driver arm64: defconfig: enable the Cadence QSPI controller Link: https://lore.kernel.org/r/20191029143737.24850-2-dinguyen@kernel.org Signed-off-by: Olof Johansson commit 3760828a8b489e23c6320f017d0e86d38a8d33cc Merge: ab7822067fba aa74337ee73d Author: Olof Johansson Date: Sat Nov 2 13:34:24 2019 -0700 Merge tag 'socfpga_dts_updates_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt SoCFPGA DTS updates for v5.5 - Arria10 - modify QSPI read-delay property - Agilex - Add QSPI support - Enable USB and LEDs - Add service layer, fpga manager support - Stratix10 - Update QSPI reg address * tag 'socfpga_dts_updates_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: agilex: add service layer, fpga manager and fpga region arm64: agilex: enable USB and LEDs on agilex devkit arm64: dts: altera: update QSPI reg addresses for Stratix10 arm64: dts: agilex: add QSPI support for Intel Agilex ARM: dts: arria10: Modify QSPI read_delay for Arria10 Link: https://lore.kernel.org/r/20191029143737.24850-1-dinguyen@kernel.org Signed-off-by: Olof Johansson commit 76f8cf6e0cfdbc5ad88d75c25e7879f0986a7ce0 Author: Geert Uytterhoeven Date: Thu Oct 24 17:18:37 2019 +0200 HID: intel-ish-hid: Spelling s/diconnect/disconnect/ Fix misspelling of "disconnect". Signed-off-by: Geert Uytterhoeven Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 358fdb456288d48874d44a064a82bfb0d9963fa0 Merge: e1cb7d2d60d5 fa553d9b57d4 Author: Alexei Starovoitov Date: Sat Nov 2 12:39:13 2019 -0700 Merge branch 'bpf_probe_read_user' Daniel Borkmann says: ==================== This set adds probe_read_{user,kernel}(), probe_read_str_{user,kernel}() helpers, fixes probe_write_user() helper and selftests. For details please see individual patches. Thanks! v2 -> v3: - noticed two more things that are fixed in here: - bpf uapi helper description used 'int size' for *_str helpers, now u32 - we need TASK_SIZE_MAX + guard page on x86-64 in patch 2 otherwise we'll trigger the 00c42373d397 warn as well, so full range covered now v1 -> v2: - standardize unsafe_ptr terminology in uapi header comment (Andrii) - probe_read_{user,kernel}[_str] naming scheme (Andrii) - use global data in last test case, remove relaxed_maps (Andrii) - add strict non-pagefault kernel read funcs to avoid warning in kernel probe read helpers (Alexei) ==================== Signed-off-by: Alexei Starovoitov commit fa553d9b57d4a98a160d1926b4e263e7a78c0cf3 Author: Daniel Borkmann Date: Sat Nov 2 00:18:03 2019 +0100 bpf, testing: Add selftest to read/write sockaddr from user space Tested on x86-64 and Ilya was also kind enough to give it a spin on s390x, both passing with probe_user:OK there. The test is using the newly added bpf_probe_read_user() to dump sockaddr from connect call into .bss BPF map and overrides the user buffer via bpf_probe_write_user(): # ./test_progs [...] #17 pkt_md_access:OK #18 probe_user:OK #19 prog_run_xattr:OK [...] Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Tested-by: Ilya Leoshkevich Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/90f449d8af25354e05080e82fc6e2d3179da30ea.1572649915.git.daniel@iogearbox.net commit 50f9aa44cac7256551b2e0901831e432a6c52b7f Author: Daniel Borkmann Date: Sat Nov 2 00:18:02 2019 +0100 bpf, testing: Convert prog tests to probe_read_{user, kernel}{, _str} helper Use probe read *_{kernel,user}{,_str}() helpers instead of bpf_probe_read() or bpf_probe_read_user_str() for program tests where appropriate. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/4a61d4b71ce3765587d8ef5cb93afa18515e5b3e.1572649915.git.daniel@iogearbox.net commit 251e2d337a1a4f2572439ea29fd27f8699c5c368 Author: Daniel Borkmann Date: Sat Nov 2 00:18:01 2019 +0100 bpf, samples: Use bpf_probe_read_user where appropriate Use bpf_probe_read_user() helper instead of bpf_probe_read() for samples that attach to kprobes probing on user addresses. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/5b0144b3f8e031ec5e2438bd7de8d7877e63bf2f.1572649915.git.daniel@iogearbox.net commit 6e07a6341277a1dbdf5ed0c41921033c234c1635 Author: Daniel Borkmann Date: Sat Nov 2 00:18:00 2019 +0100 bpf: Switch BPF probe insns to bpf_probe_read_kernel Commit 2a02759ef5f8 ("bpf: Add support for BTF pointers to interpreter") explicitly states that the pointer to BTF object is a pointer to a kernel object or NULL. Therefore we should also switch to using the strict kernel probe helper which is restricted to kernel addresses only when architectures have non-overlapping address spaces. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/d2b90827837685424a4b8008dfe0460558abfada.1572649915.git.daniel@iogearbox.net commit 6ae08ae3dea2cfa03dd3665a3c8475c2d429ef47 Author: Daniel Borkmann Date: Sat Nov 2 00:17:59 2019 +0100 bpf: Add probe_read_{user, kernel} and probe_read_{user, kernel}_str helpers The current bpf_probe_read() and bpf_probe_read_str() helpers are broken in that they assume they can be used for probing memory access for kernel space addresses /as well as/ user space addresses. However, plain use of probe_kernel_read() for both cases will attempt to always access kernel space address space given access is performed under KERNEL_DS and some archs in-fact have overlapping address spaces where a kernel pointer and user pointer would have the /same/ address value and therefore accessing application memory via bpf_probe_read{,_str}() would read garbage values. Lets fix BPF side by making use of recently added 3d7081822f7f ("uaccess: Add non-pagefault user-space read functions"). Unfortunately, the only way to fix this status quo is to add dedicated bpf_probe_read_{user,kernel}() and bpf_probe_read_{user,kernel}_str() helpers. The bpf_probe_read{,_str}() helpers are kept as-is to retain their current behavior. The two *_user() variants attempt the access always under USER_DS set, the two *_kernel() variants will -EFAULT when accessing user memory if the underlying architecture has non-overlapping address ranges, also avoiding throwing the kernel warning via 00c42373d397 ("x86-64: add warning for non-canonical user access address dereferences"). Fixes: a5e8c07059d0 ("bpf: add bpf_probe_read_str helper") Fixes: 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/796ee46e948bc808d54891a1108435f8652c6ca4.1572649915.git.daniel@iogearbox.net commit eb1b66887472eaa7342305b7890ae510dd9d1a79 Author: Daniel Borkmann Date: Sat Nov 2 00:17:58 2019 +0100 bpf: Make use of probe_user_write in probe write helper Convert the bpf_probe_write_user() helper to probe_user_write() such that writes are not attempted under KERNEL_DS anymore which is buggy as kernel and user space pointers can have overlapping addresses. Also, given we have the access_ok() check inside probe_user_write(), the helper doesn't need to do it twice. Fixes: 96ae52279594 ("bpf: Add bpf_probe_write_user BPF helper to be called in tracers") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/841c461781874c07a0ee404a454c3bc0459eed30.1572649915.git.daniel@iogearbox.net commit 75a1a607bb7e6d918be3aca11ec2214a275392f4 Author: Daniel Borkmann Date: Sat Nov 2 00:17:57 2019 +0100 uaccess: Add strict non-pagefault kernel-space read function Add two new probe_kernel_read_strict() and strncpy_from_unsafe_strict() helpers which by default alias to the __probe_kernel_read() and the __strncpy_from_unsafe(), respectively, but can be overridden by archs which have non-overlapping address ranges for kernel space and user space in order to bail out with -EFAULT when attempting to probe user memory including non-canonical user access addresses [0]: 4-level page tables: user-space mem: 0x0000000000000000 - 0x00007fffffffffff non-canonical: 0x0000800000000000 - 0xffff7fffffffffff 5-level page tables: user-space mem: 0x0000000000000000 - 0x00ffffffffffffff non-canonical: 0x0100000000000000 - 0xfeffffffffffffff The idea is that these helpers are complementary to the probe_user_read() and strncpy_from_unsafe_user() which probe user-only memory. Both added helpers here do the same, but for kernel-only addresses. Both set of helpers are going to be used for BPF tracing. They also explicitly avoid throwing the splat for non-canonical user addresses from 00c42373d397 ("x86-64: add warning for non-canonical user access address dereferences"). For compat, the current probe_kernel_read() and strncpy_from_unsafe() are left as-is. [0] Documentation/x86/x86_64/mm.txt Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: x86@kernel.org Link: https://lore.kernel.org/bpf/eefeefd769aa5a013531f491a71f0936779e916b.1572649915.git.daniel@iogearbox.net commit 1d1585ca0f48fe7ed95c3571f3e4a82b2b5045dc Author: Daniel Borkmann Date: Sat Nov 2 00:17:56 2019 +0100 uaccess: Add non-pagefault user-space write function Commit 3d7081822f7f ("uaccess: Add non-pagefault user-space read functions") missed to add probe write function, therefore factor out a probe_write_common() helper with most logic of probe_kernel_write() except setting KERNEL_DS, and add a new probe_user_write() helper so it can be used from BPF side. Again, on some archs, the user address space and kernel address space can co-exist and be overlapping, so in such case, setting KERNEL_DS would mean that the given address is treated as being in kernel address space. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Cc: Masami Hiramatsu Link: https://lore.kernel.org/bpf/9df2542e68141bfa3addde631441ee45503856a8.1572649915.git.daniel@iogearbox.net commit e1cb7d2d60d536baf24d2f0fd58786324ce92331 Merge: 78db77fab1c6 2f4a32cc83a5 Author: Alexei Starovoitov Date: Sat Nov 2 12:35:07 2019 -0700 Merge branch 'map-pinning' Toke Høiland-Jørgensen says: ==================== This series adds support to libbpf for reading 'pinning' settings from BTF-based map definitions. It introduces a new open option which can set the pinning path; if no path is set, /sys/fs/bpf is used as the default. Callers can customise the pinning between open and load by setting the pin path per map, and still get the automatic reuse feature. The semantics of the pinning is similar to the iproute2 "PIN_GLOBAL" setting, and the eventual goal is to move the iproute2 implementation to be based on libbpf and the functions introduced in this series. Changelog: v6: - Fix leak of struct bpf_object in selftest - Make struct bpf_map arg const in bpf_map__is_pinned() and bpf_map__get_pin_path() v5: - Don't pin maps with pinning set, but with a value of LIBBPF_PIN_NONE - Add a few more selftests: - Should not pin map with pinning set, but value LIBBPF_PIN_NONE - Should fail to load a map with an invalid pinning value - Should fail to re-use maps with parameter mismatch - Alphabetise libbpf.map - Whitespace and typo fixes v4: - Don't check key_type_id and value_type_id when checking for map reuse compatibility. - Move building of map->pin_path into init_user_btf_map() - Get rid of 'pinning' attribute in struct bpf_map - Make sure we also create parent directory on auto-pin (new patch 3). - Abort the selftest on error instead of attempting to continue. - Support unpinning all pinned maps with bpf_object__unpin_maps(obj, NULL) - Support pinning at map->pin_path with bpf_object__pin_maps(obj, NULL) - Make re-pinning a map at the same path a noop - Rename the open option to pin_root_path - Add a bunch more self-tests for pin_maps(NULL) and unpin_maps(NULL) - Fix a couple of smaller nits v3: - Drop bpf_object__pin_maps_opts() and just use an open option to customise the pin path; also don't touch bpf_object__{un,}pin_maps() - Integrate pinning and reuse into bpf_object__create_maps() instead of having multiple loops though the map structure - Make errors in map reuse and pinning fatal to the load procedure - Add selftest to exercise pinning feature - Rebase series to latest bpf-next v2: - Drop patch that adds mounting of bpffs - Only support a single value of the pinning attribute - Add patch to fixup error handling in reuse_fd() - Implement the full automatic pinning and map reuse logic on load ==================== Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 2f4a32cc83a584ac3669d44fa2aa1d7f115d44c1 Author: Toke Høiland-Jørgensen Date: Sat Nov 2 12:09:42 2019 +0100 selftests: Add tests for automatic map pinning This adds a new BPF selftest to exercise the new automatic map pinning code. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157269298209.394725.15420085139296213182.stgit@toke.dk commit 57a00f41644f20b11c12a27061d814655f633544 Author: Toke Høiland-Jørgensen Date: Sat Nov 2 12:09:41 2019 +0100 libbpf: Add auto-pinning of maps when loading BPF objects This adds support to libbpf for setting map pinning information as part of the BTF map declaration, to get automatic map pinning (and reuse) on load. The pinning type currently only supports a single PIN_BY_NAME mode, where each map will be pinned by its name in a path that can be overridden, but defaults to /sys/fs/bpf. Since auto-pinning only does something if any maps actually have a 'pinning' BTF attribute set, we default the new option to enabled, on the assumption that seamless pinning is what most callers want. When a map has a pin_path set at load time, libbpf will compare the map pinned at that location (if any), and if the attributes match, will re-use that map instead of creating a new one. If no existing map is found, the newly created map will instead be pinned at the location. Programs wanting to customise the pinning can override the pinning paths using bpf_map__set_pin_path() before calling bpf_object__load() (including setting it to NULL to disable pinning of a particular map). Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157269298092.394725.3966306029218559681.stgit@toke.dk commit 196f8487f51ee6e2a46f51e10ac3f4ca67574ba9 Author: Toke Høiland-Jørgensen Date: Sat Nov 2 12:09:39 2019 +0100 libbpf: Move directory creation into _pin() functions The existing pin_*() functions all try to create the parent directory before pinning. Move this check into the per-object _pin() functions instead. This ensures consistent behaviour when auto-pinning is added (which doesn't go through the top-level pin_maps() function), at the cost of a few more calls to mkdir(). Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157269297985.394725.5882630952992598610.stgit@toke.dk commit 4580b25fcee5347327aaffcec31c615ec28a889a Author: Toke Høiland-Jørgensen Date: Sat Nov 2 12:09:38 2019 +0100 libbpf: Store map pin path and status in struct bpf_map Support storing and setting a pin path in struct bpf_map, which can be used for automatic pinning. Also store the pin status so we can avoid attempts to re-pin a map that has already been pinned (or reused from a previous pinning). The behaviour of bpf_object__{un,}pin_maps() is changed so that if it is called with a NULL path argument (which was previously illegal), it will (un)pin only those maps that have a pin_path set. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157269297876.394725.14782206533681896279.stgit@toke.dk commit d1b4574a4b86565325ef2e545eda8dfc9aa07c60 Author: Toke Høiland-Jørgensen Date: Sat Nov 2 12:09:37 2019 +0100 libbpf: Fix error handling in bpf_map__reuse_fd() bpf_map__reuse_fd() was calling close() in the error path before returning an error value based on errno. However, close can change errno, so that can lead to potentially misleading error messages. Instead, explicitly store errno in the err variable before each goto. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157269297769.394725.12634985106772698611.stgit@toke.dk commit 1c2a9f254c26fa9a3e96a922214873880d5333a3 Author: AngeloGioacchino Del Regno Date: Thu Oct 31 11:43:56 2019 +0100 drm/msm/mdp5: Add optional TBU and TBU_RT clocks Some SoCs, like MSM8956/8976 (and APQ variants), do feature these clocks and we need to enable them in order to get both of the hw (mdp5/rot) Translation Buffer Units (TBUs) to properly work. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Rob Clark commit c7c1168909410e692be6df17d0092363a00f33a9 Author: Greg Kroah-Hartman Date: Fri Oct 11 15:29:28 2019 +0200 debugfs: remove return value of debugfs_create_x8() No one checks the return value of debugfs_create_x8(), 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/20191011132931.1186197-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ff229319f436f8e54345d832996b69db63bfc2d9 Author: Greg Kroah-Hartman Date: Mon Oct 14 12:16:42 2019 +0200 powerpc: pseries: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: "Naveen N. Rao" Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191014101642.GA30179@kroah.com Signed-off-by: Greg Kroah-Hartman commit 15956dad5c1016155c82d094f8c1273a30f79c3d Author: Saravana Kannan Date: Mon Oct 28 15:00:26 2019 -0700 of: property: Skip adding device links to suppliers that aren't devices Some devices need to be initialized really early and can't wait for driver core or drivers to be functional. These devices are typically initialized without creating a struct device for their device nodes. If a supplier ends up being one of these devices, skip trying to add device links to them. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20191028220027.251605-6-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 0ff5cc1ec33b4b7540c4bc09f50123befc6ed947 Author: Saravana Kannan Date: Mon Oct 28 15:00:25 2019 -0700 of: property: Make sure child dependencies don't block probing of parent When creating device links to proxy the sync_state() needs of child dependencies, create SYNC_STATE_ONLY device links so that children dependencies don't block probing of the parent. Also, differentiate between missing suppliers of parent device vs missing suppliers of child devices so that driver core doesn't block parent device probing when only child supplier dependencies are missing. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20191028220027.251605-5-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 03324507e66c7664c754b1ef92c5c3be24c78aa2 Author: Saravana Kannan Date: Mon Oct 28 15:00:24 2019 -0700 driver core: Allow fwnode_operations.add_links to differentiate errors When add_links() still has suppliers that it needs to link to in the future, this patch allows it to differentiate between suppliers that are needed for probing vs suppliers that are needed for sync_state() correctness. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20191028220027.251605-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit bcbbcfd57247f4c2976055995e5760fb576aae1e Author: Saravana Kannan Date: Mon Oct 28 15:00:23 2019 -0700 driver core: Allow a device to wait on optional suppliers Before this change, if a device is waiting on suppliers, it's assumed that all those suppliers are needed for the device to probe successfully. This change allows marking a devices as waiting only on optional suppliers. This allows a device to wait on suppliers (and link to them as soon as they are available) without preventing the device from being probed. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20191028220027.251605-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 05ef983e0d65a31b370a4e1b93c1efd490ae778f Author: Saravana Kannan Date: Mon Oct 28 15:00:22 2019 -0700 driver core: Add device link support for SYNC_STATE_ONLY flag Parent devices might need to create "proxy" device links from themselves to supplier devices to make sure the supplier devices don't get a sync_state() before the child consumer devices get a chance to add device links to the supplier devices. However, the parent device has no real dependency on the supplier device and probing, suspend/resume or runtime PM don't need to be affected by the supplier device. To capture these cases, create a SYNC_STATE_ONLY device link flag that only affects sync_state() behavior and doesn't affect probing, suspend/resume or runtime PM. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20191028220027.251605-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit abdfd18fe07373981c5375a79a76703add0db0f0 Author: Rob Clark Date: Mon Oct 7 13:31:08 2019 -0700 drm/msm: always dump buffer base/size Even if we are not dumping the buffer's contents, it is useful to log their base address and size. This makes it easier to see when different gpu pointers point to a single buffer, for example higher mipmap levels of a single texture. Signed-off-by: Rob Clark commit c4b0222e628f5b56af149d1a926170b2e9a16220 Author: Rob Clark Date: Mon Oct 7 13:31:07 2019 -0700 drm/msm: fix rd dumping for split-IB1 When IB1 is split into multiple cmd buffers, we'd emit multiple RD_CMDSTREAM_ADDR per submit. But after this packet is handled by the cffdump parser, it resets it's known buffers on the next GPUADDR packet, so subsequent RD_CMDSTREAM_ADDR packets from the same submit would not find their buffers. Re-work the loop to snapshot all buffers before RD_CMDSTREAM_ADDR to avoid this problem. Signed-off-by: Rob Clark commit fd6c798b58e0d6adaf336a0ddc91f127ff82a75d Author: Brian Masney Date: Wed Aug 14 20:48:51 2019 -0400 drm/msm/hdmi: silence -EPROBE_DEFER warning Silence a warning message due to an -EPROBE_DEFER error to help cleanup the system boot log. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij Signed-off-by: Rob Clark commit 7208474d1c7af9f86dfb1f20bfa2abbe22ad2017 Author: Nathan Chancellor Date: Tue Oct 22 10:16:48 2019 -0700 dmaengine: fsl-dpaa2-qdma: Remove unnecessary local variables in DPDMAI_CMD_CREATE macro Clang warns: drivers/dma/fsl-dpaa2-qdma/dpdmai.c:148:25: warning: variable 'cfg' is uninitialized when used within its own initialization [-Wuninitialized] DPDMAI_CMD_CREATE(cmd, cfg); ~~~~~~~~~~~~~~~~~~~~~~~^~~~ drivers/dma/fsl-dpaa2-qdma/dpdmai.c:42:24: note: expanded from macro 'DPDMAI_CMD_CREATE' typeof(_cfg) (cfg) = (_cfg); \ ~~~ ^~~~ 1 warning generated. Looking at the preprocessed source, we can see that this is true. int dpdmai_create(struct fsl_mc_io *mc_io, u32 cmd_flags, const struct dpdmai_cfg *cfg, u16 *token) { struct fsl_mc_command cmd = { 0 }; int err; cmd.header = mc_encode_cmd_header((((0x90E) << 4) | 0), cmd_flags, 0); do { typeof(cmd)(cmd) = (cmd); typeof(cfg)(cfg) = (cfg); ((cmd).params[0] |= mc_enc((8), (8), (cfg)->priorities[0])); ((cmd).params[0] |= mc_enc((16), (8), (cfg)->priorities[1])); } while (0); I cannot see a good reason to create another version of cfg when the parameter one will work perfectly fine and cmd can just be used as is. Remove them to fix this warning. Fixes: f2835adf8afb ("dmaengine: fsl-dpaa2-qdma: Add the DPDMAI(Data Path DMA Interface) support") Link: https://github.com/ClangBuiltLinux/linux/issues/746 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20191022171648.37732-1-natechancellor@gmail.com Signed-off-by: Vinod Koul commit 41814c4eadf8a791b6d07114f96e7e120e59555c Author: Krzysztof Kozlowski Date: Fri Oct 4 17:08:26 2019 +0200 dmaengine: fsl-qdma: Handle invalid qdma-queue0 IRQ platform_get_irq_byname() might return -errno which later would be cast to an unsigned int and used in IRQ handling code leading to usage of wrong ID and errors about wrong irq_base. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peng Ma Tested-by: Peng Ma Link: https://lore.kernel.org/r/20191004150826.6656-1-krzk@kernel.org Signed-off-by: Vinod Koul commit d79ccef07b36cf9e0bf57b24a7c580d1e5f4fc39 Author: Karl Palsson Date: Fri Nov 1 20:55:36 2019 +0000 dt-bindings: arm: sunxi: add FriendlyARM NanoPi Duo2 Adds bindings for the newly added NanoPi Duo2 board. Signed-off-by: Karl Palsson Signed-off-by: Maxime Ripard commit 4701fc6e5dd997b5831f7f5df77aac68aa9b59ff Author: Karl Palsson Date: Fri Nov 1 20:55:35 2019 +0000 ARM: dts: sun8i: add FriendlyARM NanoPi Duo2 This is an Allwinner H3 based board, with 512MB ram, a USB OTG port, microsd slot, an onboard AP6212A wifi/bluetooth module, and a CSI connector. Full details and schematic available from vendor: http://wiki.friendlyarm.com/wiki/index.php/NanoPi_Duo2 Signed-off-by: Karl Palsson Signed-off-by: Maxime Ripard commit 3f04e059245ee92cd6b4b5b0013d58ae89edc4bd Author: Clément Péron Date: Sat Nov 2 13:04:27 2019 +0100 arm64: allwinner: h6: Enable GPU node for Tanix TX6 Unlike other H6 boards, Tanix TX6 doesn't have a PMIC so we can enable the GPU without providing a specific power supply. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit 9b58916035a6b05256aafce4c5055805b9043cda Author: Alexandru Ardelean Date: Wed Oct 23 11:27:14 2019 +0300 iio: hdc100x: fix iio_triggered_buffer_{predisable,postenable} positions The iio_triggered_buffer_postenable() hook should be called first to attach the poll function and the iio_triggered_buffer_predisable() hook should be called last in the predisable hook. This change updates the driver to attach/detach the poll func in the correct order. Signed-off-by: Alexandru Ardelean Reviewed-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit a7bddfe2dfce1d8859422124abe1964e0ecd386e Author: Alexandru Ardelean Date: Wed Oct 23 11:26:34 2019 +0300 iio: dln2-adc: fix iio_triggered_buffer_postenable() position The iio_triggered_buffer_postenable() hook should be called first to attach the poll function. The iio_triggered_buffer_predisable() hook is called last (as is it should). This change moves iio_triggered_buffer_postenable() to be called first. It adds iio_triggered_buffer_predisable() on the error paths of the postenable hook. For the predisable hook, some code-paths have been changed to make sure that the iio_triggered_buffer_predisable() hook gets called in case there is an error before it. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 8962842ca5abdcf98e22ab3b2b45a103f0408b95 Author: Ming Lei Date: Sat Nov 2 16:02:15 2019 +0800 blk-mq: avoid sysfs buffer overflow with too many CPU cores It is reported that sysfs buffer overflow can be triggered if the system has too many CPU cores(>841 on 4K PAGE_SIZE) when showing CPUs of hctx via /sys/block/$DEV/mq/$N/cpu_list. Use snprintf to avoid the potential buffer overflow. This version doesn't change the attribute format, and simply stops showing CPU numbers if the buffer is going to overflow. Cc: stable@vger.kernel.org Fixes: 676141e48af7("blk-mq: don't dump CPU -> hw queue map on driver load") Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 364b05fd06e87e53dc03396f73afeac48d8e0998 Author: YueHaibing Date: Sat Nov 2 15:55:01 2019 +0800 io-wq: use kfree_rcu() to simplify the code The callback function of call_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: YueHaibing Signed-off-by: Jens Axboe commit 53fafdbb8b21fa99dfd8376ca056bffde8cafc11 Author: Marcelo Tosatti Date: Mon Oct 28 12:36:22 2019 -0200 KVM: x86: switch KVMCLOCK base to monotonic raw clock Commit 0bc48bea36d1 ("KVM: x86: update master clock before computing kvmclock_offset") switches the order of operations to avoid the conversion TSC (without frequency correction) -> system_timestamp (with frequency correction), which might cause a time jump. However, it leaves any other masterclock update unsafe, which includes, at the moment: * HV_X64_MSR_REFERENCE_TSC MSR write. * TSC writes. * Host suspend/resume. Avoid the time jump issue by using frequency uncorrected CLOCK_MONOTONIC_RAW clock. Its the guests time keeping software responsability to track and correct a reference clock such as UTC. This fixes forward time jump (which can result in failure to bring up a vCPU) during vCPU hotplug: Oct 11 14:48:33 storage kernel: CPU2 has been hot-added Oct 11 14:48:34 storage kernel: CPU3 has been hot-added Oct 11 14:49:22 storage kernel: smpboot: Booting Node 0 Processor 2 APIC 0x2 <-- time jump of almost 1 minute Oct 11 14:49:22 storage kernel: smpboot: do_boot_cpu failed(-1) to wakeup CPU#2 Oct 11 14:49:23 storage kernel: smpboot: Booting Node 0 Processor 3 APIC 0x3 Oct 11 14:49:23 storage kernel: kvm-clock: cpu 3, msr 0:7ff640c1, secondary cpu clock Which happens because: /* * Wait 10s total for a response from AP */ boot_error = -1; timeout = jiffies + 10*HZ; while (time_before(jiffies, timeout)) { ... } Analyzed-by: Igor Mammedov Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini commit 74179976b085398f5ad57b5d8aec8222e08e39dc Author: Davidlohr Bueso Date: Fri Nov 1 11:53:32 2019 -0700 drivers/staging/exfat: Replace more binary semaphores with mutexes At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal than semaphores; it's also a nicer interface for mutual exclusion, which is why they are encouraged over binary semaphores, when possible. There is also lockdep support. For both f_sem and b_sem, their semantics imply traditional lock ownership; that is, the lock owner is the same for both lock/unlock operations and not under irq contexts (ie for trylock/unlock scenarios). Therefore it is safe to convert. Signed-off-by: Davidlohr Bueso Link: https://lore.kernel.org/r/20191101185332.31786-1-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman commit 8823d99080ba59598f00b7e50b281c46ddd39d56 Author: Jamal Shareef Date: Fri Nov 1 17:04:14 2019 -0700 staging: vc04_services: Remove enum typedefs in vchi Remove enum typedefs from header files and files which include them in vchi. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/4afc7d28ef9ad249cac3bf7c3dd453bb64b13657.1572652827.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit dc7603e1fa3dd30ad9aa1489dbd84ee84c554e8f Author: Jamal Shareef Date: Fri Nov 1 17:04:13 2019 -0700 staging: vc04_services: Remove unused structs Removes unused opaque struct typedefs. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/acc1e07a0b2c4e67ae417086087c9ce3d7f932f4.1572652827.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3d63ee5deb466fd66ed6ffb164a87ce36425cf36 Author: Sergei Shtylyov Date: Wed Oct 30 21:53:03 2019 +0300 mtd: spi-nor: fix silent truncation in spi_nor_read_raw() spi_nor_read_raw() assigns the result of 'ssize_t spi_nor_read_data()' to the 'int ret' variable, while 'ssize_t' is a 64-bit type and *int* is a 32-bit type on the 64-bit machines. This silent truncation isn't really valid, so fix up the variable's type. Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables") Signed-off-by: Sergei Shtylyov Signed-off-by: Tudor Ambarus commit a719a75a7761e4139dd099330d9fe3589d844f9b Author: Sergei Shtylyov Date: Wed Oct 30 21:48:59 2019 +0300 mtd: spi-nor: fix silent truncation in spi_nor_read() spi_nor_read() assigns the result of 'ssize_t spi_nor_read_data()' to the 'int ret' variable, while 'ssize_t' is a 64-bit type and *int* is a 32-bit type on the 64-bit machines. This silent truncation isn't really valid, so fix up the variable's type. Fixes: 59451e1233bd ("mtd: spi-nor: change return value of read/write") Signed-off-by: Sergei Shtylyov Signed-off-by: Tudor Ambarus commit 5a0feb6287e37018af4cbd7754786522ae712980 Author: Mika Westerberg Date: Wed Oct 23 17:51:40 2019 +0300 mtd: spi-nor: intel-spi: Add support for Intel Comet Lake-H SPI serial flash Intel Comet Lake-H PCH has the same SPI serial flash controller as Comet Lake-LP. Add Comet Lake-H PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Tudor Ambarus commit 0aa369540d71e68071ed232c71e3c8d5f154ff1a Author: Tudor Ambarus Date: Thu Oct 24 02:28:07 2019 +0300 mtd: spi-nor: Print device info in case of error Print identifying information about struct device. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 354a7a7716edb377953a324421915d7788e0bca9 Author: Mika Westerberg Date: Thu Mar 21 15:31:14 2019 +0200 thunderbolt: Do not start firmware unless asked by the user Since now we can do pretty much the same thing in the software connection manager than the firmware would do, there is no point starting it by default. Instead we can just continue using the software connection manager. Make it possible for user to switch between the two by adding a module pararameter (start_icm) which is by default false. Having this ability to enable the firmware may be useful at least when debugging possible issues with the software connection manager implementation. Signed-off-by: Mika Westerberg commit a11b88add4401d006ab593c525c0dddc8ace7655 Author: Mika Westerberg Date: Tue Mar 26 16:03:48 2019 +0300 thunderbolt: Add bandwidth management for Display Port tunnels Titan Ridge supports Display Port 1.4 which adds HBR3 (High Bit Rate) rates that may be up to 8.1 Gb/s over 4 lanes. This translates to effective data bandwidth of 25.92 Gb/s (as 8/10 encoding is removed by the DP adapters when going over Thunderbolt fabric). If another high rate monitor is connected we may need to reduce the bandwidth it consumes so that it fits into the total 40 Gb/s available on the Thunderbolt fabric. Signed-off-by: Mika Westerberg commit 8afe909b78e16ee4baecf78fd4e404aabf425f8c Author: Mika Westerberg Date: Tue Mar 26 15:52:30 2019 +0300 thunderbolt: Add Display Port adapter pairing and resource management To perform proper Display Port tunneling for Thunderbolt 3 devices we need to allocate DP resources for DP IN port before they can be used. The reason for this is that the user can also connect a monitor directly to the Type-C ports in which case the Thunderbolt controller acts as re-driver for Display Port (no tunneling takes place) taking the DP sinks away from the connection manager. This allocation is done using special sink allocation registers available through the link controller. We can pair DP IN to DP OUT only if * DP IN has sink allocated via link controller * DP OUT port receives hotplug event For DP IN adapters (only for the host router) we first query whether there is DP resource available (it may be the previous instance of the driver for example already allocated it) and if it is we add it to the list. We then update the list when after each plug/unplug event to a DP IN/OUT adapter. Each time the list is updated we try to find additional DP IN <-> DP OUT pairs for tunnel establishment. This strategy also makes it possible to establish another tunnel in case there are 3 monitors connected and one gets unplugged releasing the DP IN adapter for the new tunnel. Signed-off-by: Mika Westerberg commit de718ac7b6aefa594d5d95881882bc68ec3b83b6 Author: Mika Westerberg Date: Fri Feb 15 18:18:47 2019 +0200 thunderbolt: Add Display Port CM handshake for Titan Ridge devices Titan Ridge needs an additional connection manager handshake in order to do proper Display Port tunneling so implement it here. Signed-off-by: Mika Westerberg commit 7bffd97eb7ab8a67de718bdd626e9fad27ee61b9 Author: Mika Westerberg Date: Fri Mar 22 15:16:53 2019 +0200 thunderbolt: Add downstream PCIe port mappings for Alpine and Titan Ridge In order to keep PCIe hierarchies consistent across hotplugs, add hard-coded PCIe downstream port to Thunderbolt port for Alpine Ridge and Titan Ridge as well. Signed-off-by: Mika Westerberg commit 17a8f815a0df1e164979222ba7ab796b294c1748 Author: Mika Westerberg Date: Tue Oct 8 16:42:47 2019 +0300 thunderbolt: Expand controller name in tb_switch_is_xy() For a casual reader tb_switch_is_cr() does not tell much so instead spell out the full controller name in the function name. For example tb_switch_is_cr() becomes tb_switch_is_cactus_ridge() which is easier to understand. Signed-off-by: Mika Westerberg commit 0d46c08d1ed4f7bb283c7315824f2bfe2c5e0fa9 Author: Mika Westerberg Date: Mon Aug 26 18:19:33 2019 +0300 thunderbolt: Add default linking between lane adapters if not provided by DROM We currently read how sibling lane adapter ports relate each other from DROM (Device ROM). If the two lane adapter ports go through the same physical connector these lanes can then be bonded together. However, some cases DROM does not provide this information or it is missing completely (host routers typically do not have DROM). In this case we have hard-coded the relationship. Expand this to work with both legacy devices where lane adapter ports 1 and 2, and 3 and 4 are always linked together, and with USB4 devices where lane adapter 1 is always following lane adapter 0 or is disabled completely (see USB4 section 5.2.1 for more information). Signed-off-by: Mika Westerberg commit 91c0c12080d0f40ee7275485221b06b4e1e289e1 Author: Mika Westerberg Date: Thu Mar 21 19:03:00 2019 +0200 thunderbolt: Add support for lane bonding Lane bonding allows aggregating two 10/20 Gb/s (depending on the generation) lanes into a single 20/40 Gb/s bonded link. This allows sharing the full bandwidth more efficiently. In order to establish lane bonding we need to check that lane bonding is possible through link controller and that both ends of the link actually supports 2x widths. This also means that all the paths should be established through the primary port so update tb_path_alloc() to handle this as well. Lane bonding is supported starting from Falcon Ridge (2nd generation) controllers. We also expose the current speed and number of lanes under each device except the host router following similar attribute naming than USB bus. Expose speed and number of lanes for both directions to allow possibility of asymmetric link in the future. Signed-off-by: Mika Westerberg commit 6c94f380c6c1d0206da55b0342557926052f2b3e Author: Takashi Sakamoto Date: Fri Nov 1 22:13:23 2019 +0900 ALSA: bebob: link the order of establishing connections and Syt-match clock mode Originally BeBeB ASICs and firmware supports clock mode to synchronizing to syt field of received isoc packet. This mode is known as 'SYT Match' slightly described in IEC 61883-6 (but no detail mechanisms). In this mode, drivers can control sampling clock in device. Driver for Windows and macOS uses this feature to perform synchronization for devices on the same bus. In this mode, a plug of Music subunit for synchronization is connected to a plug of isoc unit for incoming packet streaming, then the order to establish connections is INPUT_PLUG first, OUTPUT_PLUG second. This commit implements the above. Actually each device works with its own clock for sampling, therefore the original design is hardly implemented to vendor's products. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191101131323.17300-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit da5e83374f463a4dd91321428d5ea5230b6d87b4 Author: Takashi Sakamoto Date: Fri Nov 1 22:13:22 2019 +0900 ALSA: bebob: expand delay of start for IR context just for version 3 firmware As long as I investigated, there's some cases about the delay for device between establishing OUTPUT_PLUG and transmitting first isoc packet. For devices which support BeBoB protocol version 1 can transmit the packet within several hundred milliseconds, while for devices which support BeBoB protocol version 3 can transmit the packet within 2 seconds. Devices with protocol version 1: * Edirol FA-66 * Yamaha GO46 * Terratec Phase x24 FW * M-Audio FireWire AudioPhile * M-Audio FireWire Solo * M-Audio FireWire 1814 * M-Audio FireWire 410 * Focusrite Saffire Pro 26 I/O Devices with protocol version 3: * M-Audio Profire Lightbridge * Behringer FCA610 * Phonic Firefly 202 At present ALSA bebob driver postpones starting IR context during 1.5 sec for all of supported devices. The delay is too long for devices with protocol version 1, while it's not enough for devices with protocol version 3. This commit improves the delay for these protocols. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191101131323.17300-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit d3eabe939aee3ffd5b133766a932629a9746298c Author: Takashi Sakamoto Date: Fri Nov 1 22:13:21 2019 +0900 ALSA: bebob: expand sleep just after breaking connections for protocol version 1 As long as I investigated, some devices with BeBoB protocol version 1 can be freezed during several hundreds milliseconds after breaking connections. When accessing during the freezed time, any transaction is corrupted. In the worst case, the device is going to reboot. I can see this issue in: * Roland FA-66 * M-Audio FireWire Solo This commit expands sleep just after breaking connections to avoid the freezed time as much as possible. I note that the freeze/reboot behaviour is similar to below models: * Focusrite Saffire Pro 10 I/O * Focusrite Saffire Pro 26 I/O The above models certainly reboot after breaking connections. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191101131323.17300-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit b1335f5b0486f61fb66b123b40f8e7a98e49605d Author: Bart Van Assche Date: Fri Nov 1 14:14:47 2019 -0700 scsi: core: scsi_trace: Use get_unaligned_be*() This patch fixes an unintended sign extension on left shifts. From Colin King: "Shifting a u8 left will cause the value to be promoted to an integer. If the top bit of the u8 is set then the following conversion to an u64 will sign extend the value causing the upper 32 bits to be set in the result." Fix this by using get_unaligned_be*() instead. Fixes: bf8162354233 ("[SCSI] add scsi trace core functions and put trace points") Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Douglas Gilbert Link: https://lore.kernel.org/r/20191101211447.187151-1-bvanassche@acm.org Reported-by: Colin Ian King Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 64dc4f346b5be50a96f41d628e88c0fdb0ee0254 Author: Saurav Girepunje Date: Tue Oct 29 01:12:34 2019 +0530 scsi: csiostor: Return value not required for csio_dfs_destroy Only csio_hw_free() calling csio_dfs_destroy() and it is not checking return value. So remove the return from csio_dfs_destroy(). Link: https://lore.kernel.org/r/20191028194234.GA27848@saurav Signed-off-by: Saurav Girepunje Signed-off-by: Martin K. Petersen commit 75a740e6e81c89e26a1bd2e628b84131ad90c997 Author: Saurav Girepunje Date: Sun Oct 27 01:26:30 2019 +0530 scsi: csiostor: Fix NULL check before debugfs_remove_recursive debugfs_remove_recursive() has taken the null pointer into account. Remove the null check before debugfs_remove_recursive(). Link: https://lore.kernel.org/r/20191026195625.GA22455@saurav Signed-off-by: Saurav Girepunje Reviewed-by: Greg Kroah-Hartman Signed-off-by: Martin K. Petersen commit 62fb8b34be369d668226ce8e993e1355c0cca1de Author: Saurav Girepunje Date: Fri Oct 25 19:20:14 2019 +0530 scsi: pm8001: Fix Use plain integer as NULL pointer Replace assignment of 0 to pointer with NULL assignment. Link: https://lore.kernel.org/r/20191025135010.GA6191@saurav Signed-off-by: Saurav Girepunje Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 6eb045e092efefafc6687409a6fa6d1dabf0fb69 Author: Ming Lei Date: Fri Oct 25 14:58:55 2019 +0800 scsi: core: avoid host-wide host_busy counter for scsi_mq It isn't necessary to check the host depth in scsi_queue_rq() any more since it has been respected by blk-mq before calling scsi_queue_rq() via getting driver tag. Lots of LUNs may attach to same host and per-host IOPS may reach millions, so we should avoid expensive atomic operations on the host-wide counter in the IO path. This patch implements scsi_host_busy() via blk_mq_tagset_busy_iter() with one scsi command state for reading the count of busy IOs for scsi_mq. It is observed that IOPS is increased by 15% in IO test on scsi_debug (32 LUNs, 32 submit queues, 1024 can_queue, libaio/dio) in a dual-socket system. Cc: Jens Axboe Cc: Ewan D. Milne Cc: Omar Sandoval , Cc: "Martin K. Petersen" , Cc: James Bottomley , Cc: Christoph Hellwig , Cc: Kashyap Desai Cc: Hannes Reinecke Cc: Laurence Oberman Cc: Bart Van Assche Link: https://lore.kernel.org/r/20191025065855.6309-1-ming.lei@redhat.com Signed-off-by: Ming Lei Reviewed-by: Jens Axboe Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 78db77fab1c6673215f7021369bd6b3a7f04e6d8 Merge: 75b0bfd2e1a7 d817991cc748 Author: Daniel Borkmann Date: Sat Nov 2 00:38:49 2019 +0100 Merge branch 'bpf-xskmap-perf-improvements' Björn Töpel says: ==================== This set consists of three patches from Maciej and myself which are optimizing the XSKMAP lookups. In the first patch, the sockets are moved to be stored at the tail of the struct xsk_map. The second patch, Maciej implements map_gen_lookup() for XSKMAP. The third patch, introduced in this revision, moves various XSKMAP functions, to permit the compiler to do more aggressive inlining. Based on the XDP program from tools/lib/bpf/xsk.c where bpf_map_lookup_elem() is explicitly called, this work yields a 5% improvement for xdpsock's rxdrop scenario. The last patch yields 2% improvement. Jonathan's Acked-by: for patch 1 and 2 was carried on. Note that the overflow checks are done in the bpf_map_area_alloc() and bpf_map_charge_init() functions, which was fixed in commit ff1c08e1f74b ("bpf: Change size to u64 for bpf_map_{area_alloc, charge_init}()"). [1] https://patchwork.ozlabs.org/patch/1186170/ v1->v2: * Change size/cost to size_t and use {struct, array}_size where appropriate. (Jakub) v2->v3: * Proper commit message for patch 2. v3->v4: * Change size_t to u64 to handle 32-bit overflows. (Jakub) * Introduced patch 3. v4->v5: * Use BPF_SIZEOF size, instead of BPF_DW, for correct pointer-sized loads. (Daniel) ==================== Signed-off-by: Daniel Borkmann commit d817991cc7486ab83f6c7188b0bc80eebee872f6 Author: Björn Töpel Date: Fri Nov 1 12:03:46 2019 +0100 xsk: Restructure/inline XSKMAP lookup/redirect/flush In this commit the XSKMAP entry lookup function used by the XDP redirect code is moved from the xskmap.c file to the xdp_sock.h header, so the lookup can be inlined from, e.g., the bpf_xdp_redirect_map() function. Further the __xsk_map_redirect() and __xsk_map_flush() is moved to the xsk.c, which lets the compiler inline the xsk_rcv() and xsk_flush() functions. Finally, all the XDP socket functions were moved from linux/bpf.h to net/xdp_sock.h, where most of the XDP sockets functions are anyway. This yields a ~2% performance boost for the xdpsock "rx_drop" scenario. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191101110346.15004-4-bjorn.topel@gmail.com commit e65650f291ee72fc578d6346080fc4699204ef2c Author: Maciej Fijalkowski Date: Fri Nov 1 12:03:45 2019 +0100 bpf: Implement map_gen_lookup() callback for XSKMAP Inline the xsk_map_lookup_elem() via implementing the map_gen_lookup() callback. This results in emitting the bpf instructions in place of bpf_map_lookup_elem() helper call and better performance of bpf programs. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Jonathan Lemon Link: https://lore.kernel.org/bpf/20191101110346.15004-3-bjorn.topel@gmail.com commit 64fe8c061de7d7ffdfdc104a57d48d645ae0ac4f Author: Björn Töpel Date: Fri Nov 1 12:03:44 2019 +0100 xsk: Store struct xdp_sock as a flexible array member of the XSKMAP Prior this commit, the array storing XDP socket instances were stored in a separate allocated array of the XSKMAP. Now, we store the sockets as a flexible array member in a similar fashion as the arraymap. Doing so, we do less pointer chasing in the lookup. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Jonathan Lemon Link: https://lore.kernel.org/bpf/20191101110346.15004-2-bjorn.topel@gmail.com commit 7505576d1c1ac0cfe85fdf90999433dd8b673012 Author: Thomas Bogendoerfer Date: Thu Oct 24 12:18:29 2019 +0200 MIPS: add support for SGI Octane (IP30) This changeset adds support for SGI Octane/Octane2 workstations. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit b9e9defb5e603a8c0822c9e1f457fc823fab5a15 Author: Thomas Bogendoerfer Date: Thu Oct 24 12:18:28 2019 +0200 MIPS: PCI: make phys_to_dma/dma_to_phys for pci-xtalk-bridge common All platforms using pci-xtalk-bridge can share common phys_to_dma/ dma_to_phys function. So we move it form ip27 specific file to pci-xtalk-bridge.c Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 667f264676c7f83f57a7695010f889d6fd36dcbf Author: Alex Vesker Date: Sun Oct 27 09:10:17 2019 +0200 net/mlx5: DR, Support IPv4 and IPv6 mixed matcher Until now SW steering supported matchers that are IPv4 and IPv6. The limitation was mixed matchers in which the outer header IP version was different from the inner header IP version. To support the mixed matcher we create all the possible ste_builder combinations, once we create a rule we select the correct one to be used for rule creation. Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 1cdc14e9d134a48d86673fd75a6abcbe0e58a29c Author: Erez Alfasi Date: Mon Sep 16 14:34:55 2019 +0300 net/mlx5: LAG, Use affinity type enumerators Instead of using explicit indexes, simply use affinity type enumerators to make the code more readable. Fixes: 544fe7c2e654 ("net/mlx5e: Activate HW multipath and handle port affinity based on FIB events") Signed-off-by: Erez Alfasi Signed-off-by: Saeed Mahameed commit 84d2dbb0aaaf1098aa2c2ca07003bf3f973732ac Author: Erez Alfasi Date: Mon Sep 16 13:59:58 2019 +0300 net/mlx5: LAG, Use port enumerators Instead of using explicit array indexes, simply use ports enumerators to make the code more readable. Fixes: 7907f23adc18 ("net/mlx5: Implement RoCE LAG feature") Signed-off-by: Erez Alfasi Signed-off-by: Saeed Mahameed commit 5a212e0cac548e5e4fb3f2ba1b5b2f6c8949687d Author: Li RongQing Date: Thu Oct 24 16:23:33 2019 +0800 net/mlx5: rate limit alloc_ent error messages when debug a bug, which triggers TX hang, and kernel log is spammed with the following info message [ 1172.044764] mlx5_core 0000:21:00.0: cmd_work_handler:930:(pid 8): failed to allocate command entry Signed-off-by: Li RongQing Signed-off-by: Saeed Mahameed commit ab9341b54969a2d02dbb7819e2f17c2f0d9cf5b5 Author: Dmytro Linkin Date: Mon Oct 7 10:48:00 2019 +0000 net/mlx5e: Add ToS (DSCP) header rewrite support Add support for rewriting of DSCP part of ToS field. Next commands, for example, can be used to offload rewrite action: OVS: $ ovs-ofctl add-flow ovs-sriov "ip, in_port=REP, \ actions=mod_nw_tos:68, output:NIC" iproute2 (used retain mask, as tc command rewrite whole ToS field): $ tc filter add dev REP ingress protocol ip prio 1 flower skip_sw \ ip_proto icmp action pedit munge ip tos set 68 retain 0xfc pipe \ action mirred egress redirect dev NIC Signed-off-by: Dmytro Linkin Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 88f30bbcbaaa1b124fcc622ff49e3d427da9c96c Author: Dmytro Linkin Date: Wed Oct 2 07:37:08 2019 +0000 net/mlx5e: Bit sized fields rewrite support This patch doesn't change any functionality, but is a pre-step for adding support for rewriting of bit-sized fields, like DSCP and ECN in IPv4 header, similar fields in IPv6, etc. Signed-off-by: Dmytro Linkin Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 769619ee39dfa8297a1fe2bc2865eb1e73a9f824 Author: Tariq Toukan Date: Wed Oct 16 13:29:16 2019 +0300 net/mlx5: WQ, Move short getters into header file Move short Work Queue API getter functions into the WQ header file. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 130c7b46c93d313ca07d85a30d90021e424c7e9b Author: Saeed Mahameed Date: Tue May 7 08:56:38 2019 -0700 net/mlx5e: TX, Dump WQs wqe descriptors on CQE with error events Dump the Work Queue's TX WQE descriptor when a completion with error is received. Example: [5.331832] mlx5_core 0000:00:04.0 enp0s4: Error cqe on cqn 0xa, ci 0x1, TXQ-SQ qpn 0xe, opcode 0xd, syndrome 0x2, vendor syndrome 0x0 [5.333127] 00000000: 55 65 02 75 31 fe c2 d2 6b 6c 62 1e f9 e1 d8 5c [5.333837] 00000010: d3 b2 6c b8 89 e4 84 20 0b f4 3c e0 f3 75 41 ca [5.334568] 00000020: 46 00 00 00 cd 70 a0 92 18 3a 01 de 00 00 00 00 [5.335313] 00000030: 7d bc 05 89 b2 e9 00 02 1e 00 00 0e 00 00 30 d2 [5.335972] WQE DUMP: WQ size 1024 WQ cur size 0, WQE index 0x0, len: 64 [5.336710] 00000000: 00 00 00 1e 00 00 0e 04 00 00 00 08 00 00 00 00 [5.337524] 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 12 33 33 [5.338151] 00000020: 00 00 00 16 52 54 00 00 00 01 86 dd 60 00 00 00 [5.338740] 00000030: 00 00 00 48 00 00 00 00 00 00 00 00 66 ba 58 14 Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 7dee607ed0e04500459db53001d8e02f8831f084 Author: Parav Pandit Date: Wed Sep 18 18:50:32 2019 -0500 net/mlx5: Support lockless FTE read lookups During connection tracking offloads with high number of connections, (40K connections per second), flow table group lock contention is observed. To improve the performance by reducing lock contention, lockless FTE read lookup is performed as described below. Each flow table entry is refcounted. Flow table entry is removed when refcount drops to zero. rhash table allows rcu protected lookup. Each hash table entry insertion and removal is write lock protected. Hence, it is possible to perform lockless lookup in rhash table using following scheme. (a) Guard FTE entry lookup per group using rcu read lock. (b) Before freeing the FTE entry, wait for all readers to finish accessing the FTE. Below example of one reader and write in parallel racing, shows protection in effect with rcu lock. lookup_fte_locked() rcu_read_lock(); search_hash_table() existing_flow_group_write_lock(); tree_put_node(fte) drop_ref_cnt(fte) del_sw_fte(fte) del_hash_table_entry(); call_rcu(); existing_flow_group_write_unlock(); get_ref_cnt(fte) fails rcu_read_unlock(); rcu grace period(); [..] kmem_cache_free(fte); Signed-off-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 84c7af637512be9c3254189bd5910dae0d2a8602 Author: Parav Pandit Date: Thu Sep 19 17:22:19 2019 -0500 net/mlx5: Do not hold group lock while allocating FTE in software FTE memory allocation using alloc_fte() doesn't have any dependency on the flow group. Hence, do not hold flow group lock while performing alloc_fte(). This helps to reduce contention of flow group lock. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit ae2741e2b6ce2bf1b656b1152c4ef147ff35b096 Author: Vlad Buslov Date: Wed Sep 11 21:14:54 2019 +0300 net/mlx5e: Verify that rule has at least one fwd/drop action Currently, mlx5 tc layer doesn't verify that rule has at least one forward or drop action which leads to following firmware syndrome when user tries to offload such action: [ 1824.860501] mlx5_core 0000:81:00.0: mlx5_cmd_check:753:(pid 29458): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x144b7a) Add check at the end of parse_tc_fdb_actions() that verifies that resulting attribute has action fwd or drop flag set. Signed-off-by: Vlad Buslov Reviewed-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 556b9d16d3f53d1e72b988f37501bb7e6d3f358b Author: Aya Levin Date: Tue Sep 3 17:45:47 2019 +0300 net/mlx5: Clear VF's configuration on disabling SRIOV When setting number of VFs to 0 (disable SRIOV), clear VF's configuration. Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit 32680da7103439095ba8c2dbe30c3e4d0e05e4c2 Author: zhong jiang Date: Fri Sep 13 00:59:02 2019 +0800 net/mlx5: Remove unneeded variable in mlx5_unload_one mlx5_unload_one do not need local variable to store different value, Hence just remove it. Signed-off-by: zhong jiang Acked-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit cc4db579e69b4c92a51fdc9f44bc671b40427824 Author: Igor Leshenko Date: Thu Sep 5 18:56:28 2019 +0300 net/mlx5: FPGA, support network cards with standalone FPGA Not all mlx5 cards with FPGA device use it for network processing. mlx5_core driver configures network connection to FPGA device for all mlx5 cards with installed FPGA. If FPGA is not a part of network path, driver crashes in this case Check FPGA name in function mlx5_fpga_device_start() and continue integrate FPGA into packets flow only for dedicated cards. Currently there are Newton and Edison cards. Signed-off-by: Igor Leshenko Reviewed-by: Meir Lichtinger Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit 40416d8ede651d26ce334f496a336aa1d38d1c97 Author: Hamdan Igbaria Date: Sun Sep 8 13:46:25 2019 +0300 net/mlx5: DR, Replace CRC32 implementation to use kernel lib Use kernel function to calculate crc32 Instead of dr implementation since it has the same algorithm "slice by 8". Fixes: 26d688e33f88 ("net/mlx5: DR, Add Steering entry (STE) utilities") Signed-off-by: Hamdan Igbaria Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit c23fcbbc6aa4e0bb615e8a7f23e1f32aec235a1c Author: Roman Mashak Date: Fri Nov 1 15:05:40 2019 -0400 tc-testing: added tests with cookie for conntrack TC action Signed-off-by: Roman Mashak Signed-off-by: David S. Miller commit e53a9d26cf80565cfb7172fc52a0dfac73613a0f Author: Parav Pandit Date: Mon Oct 28 23:35:30 2019 +0000 IB/mlx5: Introduce and use mlx5_core_is_vf() Instead of deciding a given device is virtual function or not based on a device is PF or not, use already defined MLX5_COREDEV_VF by introducing an helper API mlx5_core_is_vf(). This enables to clearly identify PF, VF and non virtual functions. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 238302fae0216cb2e6a087ba403f3ecc3450b18b Author: Parav Pandit Date: Mon Oct 28 23:35:28 2019 +0000 net/mlx5: E-switch, Enable metadata on own vport Currently on ECPF, metadata is enabled on the ECPF vport = 0xfffe (manager vport). Metadata when supported, must be enabled on own vport which is used to pass metadata to vport of NIC Rx Flow Table. Due to this error, traffic tagged by ingress ACL is not processed correctly at NIC rx flow table level which is supposed to work on metadata tag. Hence, instead of working on eswitch manager vport, always working on eswitch own vport regardless of PF or ECPF. Given that mlx5_eswitch_query/modify_esw_vport_context() is used to access other vport in legacy mode and own vport settings in switchdev mode, extend low level API to explicitly specify other_vport. Fixes: c1286050cf47 ("net/mlx5: E-Switch, Pass metadata from FDB to eswitch manager") Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 10652f39943ec19d32a6fa44a8523b0d40abcbcf Author: Parav Pandit Date: Mon Oct 28 23:35:26 2019 +0000 net/mlx5: Refactor ingress acl configuration Drop, untagged, spoof check and untagged spoof check flow groups are limited to legacy mode only. Therefore, following refactoring is done to (a) improve code readability (b) have better code split between legacy and offloads mode 1. Move legacy flow groups under legacy structure 2. Add validity check for group deletion 3. Restrict scope of esw_vport_disable_ingress_acl to legacy mode 4. Rename esw_vport_enable_ingress_acl() to esw_vport_create_ingress_acl_table() and limit its scope to table creation 5. Introduce legacy flow groups creation helper esw_legacy_create_ingress_acl_groups() and keep its scope to legacy mode 6. Reduce offloads ingress groups from 4 to just 1 metadata group per vport 7. Removed redundant IS_ERR_OR_NULL as entries are marked NULL on free. 8. Shortern error message to remove redundant 'E-switch' Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit a962d7a61e2404cda6a89bfa5cc193c62223bb5e Author: Parav Pandit Date: Mon Oct 28 23:35:24 2019 +0000 net/mlx5: Restrict metadata disablement to offloads mode Now that there is clear separation for acl setup/cleanup between legacy and offloads mode, limit metdata disablement to offloads mode. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 748da30b376e034ae54b53e7e38e15cfa2bf4dda Author: Vu Pham Date: Mon Oct 28 23:35:22 2019 +0000 net/mlx5: E-switch, Offloads shift ACL programming during enable/disable vport Currently legacy mode enables ACL while enabling vport, while offloads mode enable ACL when moving to offloads mode. Bring consistency to both modes by enabling/disabling ACL when enabling/disabling a vport. It also eliminates creating ingress ACL table on unused ECPF vport in offloads mode. Signed-off-by: Vu Pham Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 89a0f1fb16adca959ea1485a856fbcfcd1d24208 Author: Parav Pandit Date: Mon Oct 28 23:35:20 2019 +0000 net/mlx5: E-switch, Offloads introduce and use per vport acl tables APIs Introduce and use per vport ACL tables creation and destroy APIs, so that subsequently patch can use them during enabling/disabling a vport. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit b7752f8341c4fecc4720fbd58f868e114a57fdea Author: Parav Pandit Date: Mon Oct 28 23:35:19 2019 +0000 net/mlx5: Move ACL drop counters life cycle close to ACL lifecycle It is better to create/destroy ACL related drop counters where the actual drop rule ACLs are created/destroyed, so that ACL configuration is self contained for ingress and egress. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit f5d0c01d65adba2b898836894d200e85c8a8def3 Author: Parav Pandit Date: Mon Oct 28 23:35:17 2019 +0000 net/mlx5: E-switch, Legacy introduce and use per vport acl tables APIs Introduce and use per vport ACL tables creation and destroy APIs, so that subsequently patch can use them during enabling/disabling a vport in unified way for legacy vs offloads mode. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 925a6acc77a70f8b5bfd0df75e36557aa400b0a0 Author: Parav Pandit Date: Mon Oct 28 23:35:15 2019 +0000 net/mlx5: E-switch, Prepare code to handle vport enable error In subsequent patch, esw_enable_vport() could fail and return error. Prepare code to handle such error. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 77b094305b1ba23e716bb34d3e33c8fe30a5f487 Author: Parav Pandit Date: Mon Oct 28 23:35:13 2019 +0000 net/mlx5: Tide up state_lock and vport enabled flag usage When eswitch is disabled, vport event handler is unregistered. This unregistration already synchronizes with running EQ event handler in below code flow. mlx5_eswitch_disable() mlx5_eswitch_event_handlers_unregister() mlx5_eq_notifier_unregister() atomic_notifier_chain_unregister() synchronize_rcu() notifier_callchain eswitch_vport_event() queue_work() Additionally vport->enabled flag is set under state_lock during esw_enable_vport() but is not read under state_lock in (a) esw_disable_vport() and (b) under atomic context eswitch_vport_event(). It is also necessary to synchronize with already scheduled vport event. This is already achieved using below sequence. mlx5_eswitch_event_handlers_unregister() [..] flush_workqueue() Hence, (a) Remove vport->enabled check in eswitch_vport_event() which doesn't make any sense. (b) Remove redundant flush_workqueue() on every vport disable. (c) Keep esw_disable_vport() symmetric with esw_enable_vport() for state_lock. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 853b53520c9d11db7652e3603665b0ad475741a5 Author: Parav Pandit Date: Mon Oct 28 23:35:11 2019 +0000 net/mlx5: Move legacy drop counter and rule under legacy structure To improve code readability, move legacy drop counters and droup rule under legacy structure. While at it, (a) prefix drop flow counters helper with legacy_. (b) nullify the rule pointers only if they were valid. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit d68316b5a1046b489097c5e5e24139548b79971f Author: Parav Pandit Date: Mon Oct 28 23:35:10 2019 +0000 net/mlx5: Move metdata fields under offloads structure Metadata fields are offload mode specific. To improve code readability, move metadata under offloads structure. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 99ecd64631ef9873619be493c711afb83aff75fc Author: Parav Pandit Date: Mon Oct 28 23:35:07 2019 +0000 net/mlx5: Correct comment for legacy fields fdb_table is used for both legacy and offloads mode. It was incorrect to comment that fdb_table is legacy specific. Hence, fix the comment to reflect that fdb_table is used in legacy and offloads mode. Fixes: 131ce7014043 ("net/mlx5: E-Switch, Remove redundant mc_promisc NULL check") Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit ea2300e02a71207b11111a44cbe7185a94f78a72 Author: Parav Pandit Date: Mon Oct 28 23:35:05 2019 +0000 net/mlx5: Introduce and use mlx5_esw_is_manager_vport() Currently esw_enable_vport() does vport check for zero to enable drop counters regardless of execution on ECPF/PF. While esw_disable_vport() considers such scenario. To keep consistency across code for checking for manager_vport, introduce and use mlx5_esw_is_manager_vport() to check if a specified vport is eswitch manager vport or not. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit fdde49e00b9d2041086568b52670043a8def96ff Author: Parav Pandit Date: Mon Oct 28 23:35:03 2019 +0000 net/mlx5: E-switch, Introduce and use vlan rule config helper Between legacy mode and switchdev mode, only two fields are changed, vlan_tag and flow action. Hence to avoid duplicte code between two modes, introduce and and use helper function to configure allowed VLAN rule. While at it, get rid of duplicate debug message. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit b1a3380aa709082761c1dba89234ac16c19037c6 Author: Vu Pham Date: Mon Oct 28 23:35:00 2019 +0000 net/mlx5: E-Switch, Rename ingress acl config in offloads mode Changing the function name esw_ingress_acl_common_config() to esw_ingress_acl_config() to be consistent with egress config function naming in offloads mode. Signed-off-by: Vu Pham Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 6d94e610e4b6a77007d50952d3c859d3e300c0ab Author: Vu Pham Date: Mon Oct 28 23:34:58 2019 +0000 net/mlx5: E-Switch, Rename egress config to generic name Refactor vport egress config in offloads mode Refactoring vport egress configuration in offloads mode that includes egress prio tag configuration. This makes code symmetric to ingress configuration. Signed-off-by: Vu Pham Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit e019cb536d046ea1c7ba5d370845ea362610b348 Author: Qing Huang Date: Mon Oct 28 23:34:56 2019 +0000 net/mlx5: Fixed a typo in a comment in esw_del_uc_addr() Changed "managerss" to "managers". Fixes: a1b3839ac4a4 ("net/mlx5: E-Switch, Properly refer to the esw manager vport") Signed-off-by: Qing Huang Signed-off-by: Saeed Mahameed commit 02fce139fd14d3b0126f0a72e8c0a83b5b01f9f5 Merge: 8a5a49987130 b42aa3fd5957 Author: Paul Burton Date: Fri Nov 1 14:35:49 2019 -0700 Merge tag 'mips_fixes_5.4_3' into mips-next Pull in mips-fixes primarily to gain build fixes in order to allow better testing of mips-next. A few MIPS fixes: - Fix VDSO time-related function behavior for systems where we need to fall back to syscalls, but were instead returning bogus results. - A fix to TLB exception handlers for Cavium Octeon systems where they would inadvertently clobber the $1/$at register. - A build fix for bcm63xx configurations. - Switch to using my @kernel.org email address. Signed-off-by: Paul Burton commit 8a5a499871308c093ced3c5a383b72502b96e0d2 Author: Tiezhu Yang Date: Wed Oct 16 18:03:00 2019 +0800 MIPS: Loongson: Make default kernel log buffer size as 128KB for Loongson3 When I update kernel with loongson3_defconfig based on the Loongson 3A3000 platform, then using dmesg command to show kernel ring buffer, the initial kernel messages have disappeared due to the log buffer is too small, it is better to change the kernel log buffer size from 16KB to 128KB which is enough to save the boot messages. Since the default LOG_BUF_SHIFT value is 17, the default kernel log buffer size is 128KB, just delete the CONFIG_LOG_BUF_SHIFT line. Signed-off-by: Tiezhu Yang Signed-off-by: Paul Burton Cc: paul.burton@mips.com Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: chenhc@lemote.com Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit c80b48965a3f5908468d0c078a910ca22f5dede3 Author: Thomas Bogendoerfer Date: Wed Oct 30 11:51:44 2019 +0100 MIPS: SGI-IP27: replace MAX_COMPACT_NODE with MAX_NUMNODES MAX_COMPACT_NODE is a leftover from the compact node implementation, which is removed now. Use MAX_NUMNODES instead. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 474435a058309cf1a253dbd77cac2ab89c75d4a6 Author: Paul Menzel Date: Mon Sep 2 11:55:06 2019 +0200 mips/cavium-octeon: Fix typo *must* in comment Fixes: 5b3b16880f ("MIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon.") Signed-off-by: Paul Menzel Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org commit 6fbde6b492dfc761ad60a68fb2cb32b1eb05b786 Author: Jiaxun Yang Date: Sun Oct 20 23:01:36 2019 +0800 MIPS: Loongson64: Move files to the top-level directory Current Loongson-3 code can share among all Loongson64 processors. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhc@lemote.com Cc: paul.burton@mips.com commit 1bdb7b76705a38936e9875950587ea91c9ec0a98 Author: Jiaxun Yang Date: Sun Oct 20 23:01:35 2019 +0800 MIPS: Loongson64: Cleanup unused code Clean up legacy code after stripping out Loongson2ef code. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: paul.burton@mips.com commit 5831fdb099ddeec9849658cd534fdcbb03aa6ff9 Author: Jiaxun Yang Date: Sun Oct 20 22:43:15 2019 +0800 MIPS: Loongson2ef: clean up loongson64 related code Remove unrelevent macros, defines and codes from loongson2ef mach. Also rename some defines to match new naming. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: paul.burton@mips.com commit 71e2f4dd5a65bd8dbca0b77661e75eea471168f8 Author: Jiaxun Yang Date: Sun Oct 20 22:43:14 2019 +0800 MIPS: Fork loongson2ef from loongson64 As later model of GSx64 family processors including 2-series-soc have similar design with initial loongson3a while loongson2e/f seems less identical, we separate loongson2e/f support code out of mach-loongson64 to make our life easier. This patch contains mostly file moving works. Signed-off-by: Jiaxun Yang [paulburton@kernel.org: Squash in the MAINTAINERS updates] Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: paul.burton@mips.com commit f973cce0e4022fa8c969ca5b0c71559125382eb2 Author: Helge Deller Date: Mon Oct 21 22:38:29 2019 +0200 kexec: Fix pointer-to-int-cast warnings Fix two pointer-to-int-cast warnings when compiling for the 32-bit parisc platform: kernel/kexec_file.c: In function ‘crash_prepare_elf64_headers’: kernel/kexec_file.c:1307:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] phdr->p_vaddr = (Elf64_Addr)_text; ^ kernel/kexec_file.c:1324:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] phdr->p_vaddr = (unsigned long long) __va(mstart); ^ Signed-off-by: Helge Deller commit 0d0a60c92fedbd4bf484c4c9b5cd49c16d05fb3f Merge: 7855a57d008b c33fbe8f673c Author: Theodore Ts'o Date: Fri Nov 1 14:49:52 2019 -0400 Merge branch 'rh/dioread-nolock-1k' into dev commit 0069fc6b1cf28de3a3890ed7c87a5b8ab79ca528 Author: Jens Axboe Date: Fri Nov 1 12:44:40 2019 -0600 io_uring: remove io_uring_add_to_prev() trace event This internal logic was killed with the conversion to io-wq, so we no longer have a need for this particular trace. Kill it. Signed-off-by: Jens Axboe commit 0e64e5b38c0106c054bc9b6acc5d0e605ac6ad47 Merge: ac541f250372 46870b2391d5 Author: Jason Gunthorpe Date: Fri Nov 1 15:40:57 2019 -0300 Merge branch 'odp_rework' into hmm.git This branch is shared with the rdma.git for dependencies in following patches: ==================== In order to hoist the interval tree code out of the drivers and into the mmu_notifiers it is necessary for the drivers to not use the interval tree for other things. This series replaces the interval tree with an xarray and along the way re-aligns all the locking to use a sensible SRCU model where the 'update' step is done by modifying an xarray. The result is overall much simpler and with less locking in the critical path. Many functions were reworked for clarity and small details like using 'imr' to refer to the implicit MR make the entire code flow here more readable. This also squashes at least two race bugs on its own, and quite possibily more that haven't been identified. ==================== * branch 'odp_rework': RDMA/odp: Remove broken debugging call to invalidate_range RDMA/mlx5: Do not race with mlx5_ib_invalidate_range during create and destroy RDMA/mlx5: Do not store implicit children in the odp_mkeys xarray RDMA/mlx5: Rework implicit ODP destroy RDMA/mlx5: Avoid double lookups on the pagefault path RDMA/mlx5: Reduce locking in implicit_mr_get_data() RDMA/mlx5: Use an xarray for the children of an implicit ODP RDMA/mlx5: Split implicit handling from pagefault_mr RDMA/mlx5: Set the HW IOVA of the child MRs to their place in the tree RDMA/mlx5: Lift implicit_mr_alloc() into the two routines that call it RDMA/mlx5: Rework implicit_mr_get_data RDMA/mlx5: Delete struct mlx5_priv->mkey_table RDMA/mlx5: Use a dedicated mkey xarray for ODP RDMA/mlx5: Split sig_err MR data into its own xarray RDMA/mlx5: Use SRCU properly in ODP prefetch commit 23c161ee2c220f3791cfd452f38b516f0d3ffaa8 Merge: 52340b82cf1a 58ec1ea637ca Author: David S. Miller Date: Fri Nov 1 10:32:43 2019 -0700 Merge branch 'net-bridge-minor-followup-optimizations' Nikolay Aleksandrov says: ==================== net: bridge: minor followup optimizations After the converted flags to bitops we can take advantage of the flags assignment and remove one test and three atomic bitops from the learning paths (patch 01 and patch 02), patch 03 restores the unlikely() when taking over HW learned entries. v2: a clean export of the latest set version ==================== Signed-off-by: David S. Miller commit 58ec1ea637ca2230c69d6972985ba619366c688b Author: Nikolay Aleksandrov Date: Fri Nov 1 14:46:39 2019 +0200 net: bridge: fdb: restore unlikely() when taking over externally added entries Taking over hw-learned entries is not a likely scenario so restore the unlikely() use for the case of SW taking over externally learned entries. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 31f1155bdc26aabd8de4bdf25e1c9ce9dbb21ff5 Author: Nikolay Aleksandrov Date: Fri Nov 1 14:46:38 2019 +0200 net: bridge: fdb: avoid two atomic bitops in br_fdb_external_learn_add() If we setup the fdb flags prior to calling fdb_create() we can avoid two atomic bitops when learning a new entry. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit be0c5677970d4f21dc701136a178437aad9983b2 Author: Nikolay Aleksandrov Date: Fri Nov 1 14:46:37 2019 +0200 net: bridge: fdb: br_fdb_update can take flags directly If we modify br_fdb_update() to take flags directly we can get rid of one test and one atomic bitop in the learning path. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit ea2dd7c0875ed31955cda7b1b20612c8337192e5 Author: David Gow Date: Thu Oct 24 15:46:31 2019 -0700 lib/list-test: add a test for the 'list' doubly linked list Add a KUnit test for the kernel doubly linked list implementation in include/linux/list.h Each test case (list_test_x) is focused on testing the behaviour of the list function/macro 'x'. None of the tests pass invalid lists to these macros, and so should behave identically with DEBUG_LIST enabled and disabled. Note that, at present, it only tests the list_ types (not the singly-linked hlist_), and does not yet test all of the list_for_each_entry* macros (and some related things like list_prepare_entry). Ignoring checkpatch.pl spurious errors related to its handling of for_each and other list macros. checkpatch.pl expects anything with for_each in its name to be a loop and expects that the open brace is placed on the same line as for a for loop. In this case, test case naming scheme includes name of the macro it is testing, which results in the spurious errors. Commit message updated by Shuah Khan Signed-off-by: David Gow Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit dc6b025de95bcd22ff37c4fabb022ec8a027abf1 Author: Tony Luck Date: Mon Oct 28 09:37:19 2019 -0700 x86/mce: Add Xeon Icelake to list of CPUs that support PPIN New CPU model, same MSRs to control and read the inventory number. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191028163719.19708-1-tony.luck@intel.com commit ee9bdfedd3dc1b3303390663189defa4d6b9e458 Author: Rob Clark Date: Thu Oct 31 14:31:02 2019 -0700 iommu/arm-smmu: Avoid pathological RPM behaviour for unmaps When games, browser, or anything using a lot of GPU buffers exits, there can be many hundreds or thousands of buffers to unmap and free. If the GPU is otherwise suspended, this can cause arm-smmu to resume/suspend for each buffer, resulting 5-10 seconds worth of reprogramming the context bank (arm_smmu_write_context_bank()/arm_smmu_write_s2cr()/etc). To the user it would appear that the system just locked up. A simple solution is to use pm_runtime_put_autosuspend() instead, so we don't immediately suspend the SMMU device. Reviewed-by: Robin Murphy Signed-off-by: Rob Clark Signed-off-by: Will Deacon commit 478016c3839d53bd4c89af1f095195be543fa1a3 Author: Julien Grall Date: Fri Nov 1 15:20:22 2019 +0000 docs/arm64: cpu-feature-registers: Rewrite bitfields that don't follow [e, s] Commit "docs/arm64: cpu-feature-registers: Documents missing visible fields" added bitfields following the convention [s, e]. However, the documentation is following [s, e] and so does the Arm ARM. Rewrite the bitfields to match the format [s, e]. Fixes: a8613e7070e7 ("docs/arm64: cpu-feature-registers: Documents missing visible fields") Signed-off-by: Julien Grall Signed-off-by: Catalin Marinas commit 9ef8567ccf2eb00473b1280d0911caf3f413dc67 Author: Shaokun Zhang Date: Wed Oct 30 11:46:17 2019 +0800 arm64: perf: Simplify the ARMv8 PMUv3 event attributes For each PMU event, there is a ARMV8_EVENT_ATTR(xx, XX) and &armv8_event_attr_xx.attr.attr. Let's redefine the ARMV8_EVENT_ATTR to simplify the armv8_pmuv3_event_attrs. Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Shaokun Zhang [will: Dropped unnecessary array syntax] Signed-off-by: Will Deacon commit e9f691d899188679746eeb96e6cb520459eda9b4 Author: Jiri Slaby Date: Thu Oct 31 10:59:46 2019 +0100 ata: sata_mv, avoid trigerrable BUG_ON There are several reports that the BUG_ON on unsupported command in mv_qc_prep can be triggered under some circumstances: https://bugzilla.suse.com/show_bug.cgi?id=1110252 https://serverfault.com/questions/888897/raid-problems-after-power-outage https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1652185 https://bugs.centos.org/view.php?id=14998 Let sata_mv handle the failure gracefully: warn about that incl. the failed command number and return an AC_ERR_INVALID error. We can do that now thanks to the previous patch. Remove also the long-standing FIXME. [v2] use %.2x as commands are defined as hexa. Signed-off-by: Jiri Slaby Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Cc: Sergei Shtylyov Signed-off-by: Jens Axboe commit 95364f36701e62dd50eee91e1303187fd1a9f567 Author: Jiri Slaby Date: Thu Oct 31 10:59:45 2019 +0100 ata: make qc_prep return ata_completion_errors In case a driver wants to return an error from qc_prep, return enum ata_completion_errors. sata_mv is one of those drivers -- see the next patch. Other drivers return the newly defined AC_ERR_OK. [v2] use enum ata_completion_errors and AC_ERR_OK. Signed-off-by: Jiri Slaby Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Jens Axboe commit 25937580a5065d6fbd92d9c8ebd47145ad80052e Author: Jiri Slaby Date: Thu Oct 31 10:59:44 2019 +0100 ata: define AC_ERR_OK Since we will return enum ata_completion_errors from qc_prep in the next patch, let's define AC_ERR_OK to mark the OK status. Signed-off-by: Jiri Slaby Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Jens Axboe commit 0fb596edaa52133fb877f509c2e5d907ee601d6b Author: Jiri Slaby Date: Thu Oct 31 10:59:43 2019 +0100 ata: Documentation, fix function names ata_qc_prep no longer exists, there are ata_bmdma_qc_prep and ata_bmdma_dumb_qc_prep instead. And most drivers do not use them, so reword the paragraph. ata_qc_issue_prot was renamed to ata_sff_qc_issue. ->tf_load is now ->sff_tf_load. Fix them. And fix spelling supercede -> supersede. Signed-off-by: Jiri Slaby Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Jens Axboe commit efcfec579f6139528c9e6925eca2bc4a36da65c6 Author: Darrick J. Wong Date: Wed Oct 30 20:29:48 2019 -0700 loop: fix no-unmap write-zeroes request behavior Currently, if the loop device receives a WRITE_ZEROES request, it asks the underlying filesystem to punch out the range. This behavior is correct if unmapping is allowed. However, a NOUNMAP request means that the caller doesn't want us to free the storage backing the range, so punching out the range is incorrect behavior. To satisfy a NOUNMAP | WRITE_ZEROES request, loop should ask the underlying filesystem to FALLOC_FL_ZERO_RANGE, which is (according to the fallocate documentation) required to ensure that the entire range is backed by real storage, which suffices for our purposes. Fixes: 19372e2769179dd ("loop: implement REQ_OP_WRITE_ZEROES") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 626fb735a43ddcb7b2c58c27cb03b098acc03339 Author: John Garry Date: Wed Oct 30 00:59:30 2019 +0800 blk-mq: Make blk_mq_run_hw_queue() return void Since commit 97889f9ac24f ("blk-mq: remove synchronize_rcu() from blk_mq_del_queue_tag_set()"), the return value of blk_mq_run_hw_queue() is never checked, so make it return void, which very marginally simplifies the code. Reviewed-by: Bob Liu Signed-off-by: John Garry Signed-off-by: Jens Axboe commit e9ffa5c2b77edf2689f876b640318b16fc3ea2a7 Author: Jackie Liu Date: Tue Oct 29 11:16:42 2019 +0800 io_uring: set -EINTR directly when a signal wakes up in io_cqring_wait We didn't use -ERESTARTSYS to tell the application layer to restart the system call, but instead return -EINTR. we can set -EINTR directly when wakeup by the signal, which can help us save an assignment operation and comparison operation. Reviewed-by: Bob Liu Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe commit 62755e35dfb2b113c52b81cd96d01c20971c8e02 Author: Jens Axboe Date: Mon Oct 28 21:49:21 2019 -0600 io_uring: support for generic async request cancel This adds support for IORING_OP_ASYNC_CANCEL, which will attempt to cancel requests that have been punted to async context and are now in-flight. This works for regular read/write requests to files, as long as they haven't been started yet. For socket based IO (or things like accept4(2)), we can cancel work that is already running as well. To cancel a request, the sqe must have ->addr set to the user_data of the request it wishes to cancel. If the request is cancelled successfully, the original request is completed with -ECANCELED and the cancel request is completed with a result of 0. If the request was already running, the original may or may not complete in error. The cancel request will complete with -EALREADY for that case. And finally, if the request to cancel wasn't found, the cancel request is completed with -ENOENT. Signed-off-by: Jens Axboe commit bdde3d3ec934839b3c11689ead467099f1c36c12 Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:37 2019 +0200 soc: renesas: rcar-sysc: Add R8A77961 support Add support for the power areas in the Renesas R-Car M3-W+ (R8A77961) SoC to the R-Car System Controller driver. R-Car M3-W+ (aka R-Car M3-W ES3.0) is very similar to R-Car M3-W (R8A77960), which allows for both SoCs to share a driver: - R-Car M3-W+ lacks the A2VC power area, so its area must be nullified, - The existing support for the SYSCEXTMASK register added in commit 9bd645af9d2a49ac ("soc: renesas: r8a7796-sysc: Fix power request conflicts") applies to ES3.0 and later only. As R-Car M3-W+ uses a different compatible value, differentiate based on that, instead of on the ES version. Based on a patch in the BSP by Dien Pham . Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-7-geert+renesas@glider.be commit 41684bff3b2f4a2d0b5bd95df6dbd1b832a7e8ae Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:36 2019 +0200 soc: renesas: rcar-rst: Add R8A77961 support Add support for the Reset block in the R-Car M3-W+ (R8A77961) SoC to the Renesas R-Car RST driver. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-6-geert+renesas@glider.be commit 9c9f7891093b02eb64ca4e1c7ab776a4296c058f Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:35 2019 +0200 soc: renesas: Identify R-Car M3-W+ Add support for identifying the R-Car M3-W+ (R8A77961) SoC, which shares the Product ID Number with R-Car M3-W (R8A77960), but differs in CUT Number (Ver. 3.0), and uses a different compatible value. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-5-geert+renesas@glider.be commit cadadde21007cbbd395c4f141af94f3f92345f13 Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:34 2019 +0200 soc: renesas: Add ARCH_R8A77961 for new R-Car M3-W+ Add CONFIG_ARCH_R8A77961 as a configuration symbol for the new Renesas R-Car M3-W+ (R8A77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-4-geert+renesas@glider.be commit 39e57e14d7eaf8182ce09640c49423122909d5b6 Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:33 2019 +0200 soc: renesas: Add ARCH_R8A77960 for existing R-Car M3-W Add CONFIG_ARCH_R8A77960 as a new config symbol for R-Car M3-W (R8A77960), to replace CONFIG_ARCH_R8A7796, and avoid confusion with R-Car M3-W+ (R8A77961), which will use CONFIG_ARCH_R8A77961. Note that for now, CONFIG_ARCH_R8A7796 is retained, and just selects CONFIG_ARCH_R8A77960. This relaxes dependencies of other subsystems on the SoC configuration symbol, and provides a smooth transition path for config files through "make oldconfig". Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-3-geert+renesas@glider.be commit f79edb17b618c3122d11eb0c848855b99c42fa24 Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:32 2019 +0200 soc: renesas: Rename SYSC_R8A7796 to SYSC_R8A77960 Rename CONFIG_SYSC_R8A7796 for R-Car M3-W (R8A77960) to CONFIG_SYSC_R8A77960, to avoid confusion with R-Car M3-W+ (R8A77961), which will use CONFIG_SYSC_R8A77961. Rename r8a7796_sysc_info and r8a7796_sysc_init for consistency. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-2-geert+renesas@glider.be commit 16208387bbdd7f6503d24ee7826fbd850795a52b Merge: 4194b583c104 0b05ad22a279 Author: Geert Uytterhoeven Date: Fri Nov 1 14:25:38 2019 +0100 Merge tag 'renesas-r8a77961-dt-binding-defs-tag' into renesas-drivers-for-v5.5 Renesas R-Car M3-W+ DT Binding Definitions Clock and Power Domain definitions for the Renesas R-Car M3-W+ (R8A77961) SoC, shared by driver and DT source files. commit 4194b583c104922c6141d6610bfbce26847959df Author: Geert Uytterhoeven Date: Wed Oct 16 16:33:06 2019 +0200 soc: renesas: Add missing check for non-zero product register address If the DTB for a device with an RZ/A2 SoC lacks a device node for the BSID register, the ID validation code falls back to using a register at address 0x0, which leads to undefined behavior (e.g. reading back a random value). This could be fixed by letting fam_rza2.reg point to the actual BSID register. However, the hardcoded fallbacks were meant for backwards compatibility with old DTBs only, not for new SoCs. Hence fix this by validating renesas_family.reg before using it. Fixes: 175f435f44b724e3 ("soc: renesas: identify RZ/A2") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191016143306.28995-1-geert+renesas@glider.be commit 51e0f6a1917831373e153eca2fb27902f0f8bc7b Author: Geert Uytterhoeven Date: Fri Oct 25 15:53:25 2019 +0200 ARM: shmobile: defconfig: Refresh for v5.4-rc1 Update the defconfig for Renesas ARM boards: - Drop CONFIG_ARM_ERRATA_754322=y (auto-enabled since commit 2eced4607a1e6f51 ("soc: renesas: Enable ARM_ERRATA_754322 for affected Cortex-A9")), - Drop CONFIG_MTD_M25P80=y (removed in commit b35b9a10362d2034 ("mtd: spi-nor: Move m25p80 code in spi-nor.c")), - Drop CONFIG_LCD_CLASS_DEVICE=n (no longer auto-enabled since commit bcd69da98e36afcc ("video: backlight: Drop default m for {LCD,BACKLIGHT_CLASS_DEVICE}")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191025135325.32242-1-geert+renesas@glider.be commit b13d0e61629b09153ddbc52eb8b57af7805c0851 Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:41 2019 +0200 arm64: defconfig: Enable R8A77961 SoC Enable the Renesas R-Car M3-W+ (R8A77961) SoC in the ARM64 defconfig. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-11-geert+renesas@glider.be commit 92980759c1699a3c10beb00f411270197ac89544 Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:40 2019 +0200 arm64: dts: renesas: Add support for Salvator-XS with R-Car M3-W+ Add initial support for the Renesas Salvator-X 2nd version development board equipped with an R-Car M3-W+ SiP with 8 (2 x 4) GiB of RAM. The memory map is as follows: - Bank0: 4GiB RAM : 0x000048000000 -> 0x000bfffffff 0x000480000000 -> 0x004ffffffff - Bank1: 4GiB RAM : 0x000600000000 -> 0x006ffffffff Based on a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-10-geert+renesas@glider.be commit f51746ad7d1ff6b4f763716c9cf4a40a2ad1d90c Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:39 2019 +0200 arm64: dts: renesas: Add Renesas R8A77961 SoC support Add initial support for the Renesas R-Car M3-W+ (R8A77961) SoC. This includes: - Cortex-A57 and Cortex-A53 CPU cores (incl. L2 caches and power state definitions), - Power Management Unit, - PSCI firmware, - Pin Function Controller, - Clock, Reset, System, and Interrupt Controllers, - SCIF2 serial console, - Product Register, - ARM Architectured Timer, and various placeholders to allow to use salvator-xs.dtsi. Based on r8a7796.dtsi. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-9-geert+renesas@glider.be commit 4c28ca12eae2346db9fff266a92d2fd1d6df081b Author: Geert Uytterhoeven Date: Wed Oct 23 14:33:38 2019 +0200 arm64: dts: renesas: Prepare for rename of ARCH_R8A7796 to ARCH_R8A77960 CONFIG_ARCH_R8A7796 for R-Car M3-W (R8A77960) will be renamed to CONFIG_ARCH_R8A77960, to avoid confusion with R-Car M3-W+ (R8A77961), which will use CONFIG_ARCH_R8A77961. Relax dependencies by handling both symbols. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023123342.13100-8-geert+renesas@glider.be commit 7574ed0e083f535d346565bbdaa15247389ece21 Merge: 1510faee3090 0b05ad22a279 Author: Geert Uytterhoeven Date: Fri Nov 1 14:03:03 2019 +0100 Merge tag 'renesas-r8a77961-dt-binding-defs-tag' into renesas-arm64-dt-for-v5.5 Renesas R-Car M3-W+ DT Binding Definitions Clock and Power Domain definitions for the Renesas R-Car M3-W+ (R8A77961) SoC, shared by driver and DT source files. commit 884caadad128efad8e00c1cdc3177bc8912ee8ec Author: Geert Uytterhoeven Date: Thu Oct 24 15:13:08 2019 +0200 pinctrl: sh-pfc: sh7734: Fix duplicate TCLK1_B The definitions for bit field [19:18] of the Peripheral Function Select Register 3 were accidentally copied from bit field [20], leading to duplicates for the TCLK1_B function, and missing TCLK0, CAN_CLK_B, and ET0_ETXD4 functions. Fix this by adding the missing GPIO_FN_CAN_CLK_B and GPIO_FN_ET0_ETXD4 enum values, and correcting the functions. Reported-by: Ben Dooks Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191024131308.16659-1-geert+renesas@glider.be commit 708c69e9eaccffc944858c6fbb38f600926e1fcf Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:55 2019 +0200 pinctrl: sh-pfc: r8a7796: Add R8A77961 PFC support Add support for the Pin Function Controller in the R-Car M3-W+ (R8A77961) SoC. R-Car M3-W+ is pin compatible with R-Car M3-W (R8A77960), which allows for both SoCs to share a driver. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023122955.12420-4-geert+renesas@glider.be commit d15ca3a321a2ba16e716b23fa552ff27f2f722ec Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:54 2019 +0200 pinctrl: sh-pfc: Rename PINCTRL_PFC_R8A7796 to PINCTRL_PFC_R8A77960 Rename CONFIG_PINCTRL_PFC_R8A7796 for R-Car M3-W (R8A77960) to CONFIG_PINCTRL_PFC_R8A77960, to avoid confusion with R-Car M3-W+ (R8A77961), which will use CONFIG_PINCTRL_PFC_R8A77961. Extend the dependency of CONFIG_PINCTRL_PFC_R8A77960 from CONFIG_ARCH_R8A7796 to CONFIG_ARCH_R8A77960, to relax dependencies for a future rename of the SoC configuration symbol. Rename r8a7796_pinmux_info to r8a77960_pinmux_info, as it contains an r8a77960-based name. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023122955.12420-3-geert+renesas@glider.be commit 5ffce2f44fe9c163f0cb1c60ccb9e5e3f3b117a5 Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:53 2019 +0200 dt-bindings: pinctrl: sh-pfc: Document r8a77961 support Add DT binding documentation for the Pin Function Controller in the Renesas R-Car M3-W+ (R8A77961) SoC. Update all references to R-Car M3-W from "r8a7796" to "r8a77960", to avoid confusion between R-Car M3-W (R8A77960) and M3-W+. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191023122955.12420-2-geert+renesas@glider.be commit ad7fe1a1a35994a201497443b5140bf54b074cca Author: Geert Uytterhoeven Date: Wed Oct 16 16:26:01 2019 +0200 pinctrl: sh-pfc: Do not use platform_get_irq() to count interrupts As platform_get_irq() now prints an error when the interrupt does not exist, counting interrupts by looping until failure causes the printing of scary messages like: sh-pfc e6060000.pin-controller: IRQ index 0 not found Fix this by using the platform_irq_count() helper instead. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Stephen Boyd Reviewed-by: Niklas Söderlund Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191016142601.28255-1-geert+renesas@glider.be commit 2ba738d56db4ddb1c17e418cb501d303a8b481d2 Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:41 2019 +0200 clk: renesas: r8a7796: Add R8A77961 CPG/MSSR support Add support for the R-Car M3-W+ (R8A77961) SoC to the Renesas Clock Pulse Generator / Module Standby and Software Reset driver. R-Car M3-W+ is very similar to R-Car M3-W (R8A77960), which allows for both SoCs to share a driver. R-Car M3-W+ lacks a few modules, so their clocks must be nullified. Based on a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023122941.12342-5-geert+renesas@glider.be commit 92d1ebae9abf1cd9460d8d0b3354262102a13634 Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:40 2019 +0200 clk: renesas: Rename CLK_R8A7796 to CLK_R8A77960 Rename CONFIG_CLK_R8A7796 for R-Car M3-W (R8A77960) to CONFIG_CLK_R8A77960, to avoid confusion with R-Car M3-W+ (R8A77961), which will use CONFIG_CLK_R8A77961. Extend the dependency of CONFIG_CLK_R8A77960 from CONFIG_ARCH_R8A7796 to CONFIG_ARCH_R8A77960, to relax dependencies for a future rename of the SoC configuration symbol. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191023122941.12342-4-geert+renesas@glider.be commit e751a25b4eecef0b1b305872027ae64d3b82569f Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:38 2019 +0200 dt-bindings: clock: renesas: cpg-mssr: Document r8a77961 support Add DT binding documentation for the Clock Pulse Generator / Module Standby and Software Reset block in the Renesas R-Car M3-W+ (R8A77961) SoC. Update all references to R-Car M3-W from "r8a7796" to "r8a77960", to avoid confusion between R-Car M3-W (R8A77960) and M3-W+. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191023122941.12342-2-geert+renesas@glider.be commit b07e816fc416bba0d00a46c9fc93d1387bf847f6 Merge: f00d1b16232f 0b05ad22a279 Author: Geert Uytterhoeven Date: Fri Nov 1 13:36:27 2019 +0100 Merge tag 'renesas-r8a77961-dt-binding-defs-tag' into clk-renesas-for-v5.5 Renesas R-Car M3-W+ DT Binding Definitions Clock and Power Domain definitions for the Renesas R-Car M3-W+ (R8A77961) SoC, shared by driver and DT source files. commit f00d1b16232fbb141048bba7616adba949f46d7b Author: Geert Uytterhoeven Date: Wed Oct 16 17:07:11 2019 +0200 clk: renesas: r8a77965: Remove superfluous semicolon There is no need to terminate a function with a semicolon. Remove it. Reported-by: Biju Das Fixes: 7ce36da900c0a2ff ("clk: renesas: cpg-mssr: Add support for R-Car M3-N") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191016150711.30305-1-geert+renesas@glider.be commit 830dbce7c76ea529decac7d23b808c1e7da3d891 Author: Geert Uytterhoeven Date: Wed Oct 16 16:56:50 2019 +0200 dt-bindings: clock: renesas: rcar-usb2-clock-sel: Fix typo in example The documented compatible value for R-Car H3 is "renesas,r8a7795-rcar-usb2-clock-sel", not "renesas,r8a77950-rcar-usb2-clock-sel". Fixes: 311accb64570db45 ("clk: renesas: rcar-usb2-clock-sel: Add R-Car USB 2.0 clock selector PHY") Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191016145650.30003-1-geert+renesas@glider.be commit c99b23eb5a983c02355f4e3f0234b6f92a69be7b Author: Geert Uytterhoeven Date: Wed Oct 16 16:52:07 2019 +0200 dt-bindings: clock: renesas: Remove R-Car Gen2 legacy DT bindings As of commit 362b334b17943d84 ("ARM: dts: r8a7791: Convert to new CPG/MSSR bindings"), all upstream R-Car Gen2 device tree source files use the unified "Renesas Clock Pulse Generator / Module Standby and Software Reset" DT bindings. Hence remove the old R-Car Gen2 DT bindings describing a hierarchical representation of the various CPG and MSTP clocks. Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191016145207.29779-1-geert+renesas@glider.be commit 75b0bfd2e1a7d0c698b617f5e5ceaf056bdcaef7 Author: Jakub Kicinski Date: Thu Oct 31 17:51:27 2019 -0700 Revert "selftests: bpf: Don't try to read files without read permission" This reverts commit 5bc60de50dfe ("selftests: bpf: Don't try to read files without read permission"). Quoted commit does not work at all, and was never tested. Script requires root permissions (and tests for them) and os.access() will always return true for root. The correct fix is needed in the bpf tree, so let's just revert and save ourselves the merge conflict. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Jiri Pirko Link: https://lore.kernel.org/bpf/20191101005127.1355-1-jakub.kicinski@netronome.com commit ecd25094c5f5d5af12dffd3a4f2f4a42e486cdd8 Author: Petr Mladek Date: Wed Oct 30 16:43:13 2019 +0100 livepatch: Selftests of the API for tracking system state changes Four selftests for the new API. Link: http://lkml.kernel.org/r/20191030154313.13263-6-pmladek@suse.com To: Jiri Kosina Cc: Kamalesh Babulal Cc: Nicolai Stange Cc: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Miroslav Benes Acked-by: Joe Lawrence Acked-by: Josh Poimboeuf Signed-off-by: Petr Mladek commit e553d2a53d47853b3f1780fd65f8259672daabed Author: Petr Mladek Date: Wed Oct 30 16:43:12 2019 +0100 livepatch: Documentation of the new API for tracking system state changes Documentation explaining the motivation, capabilities, and usage of the new API for tracking system state changes. Link: http://lkml.kernel.org/r/20191030154313.13263-5-pmladek@suse.com To: Jiri Kosina Cc: Kamalesh Babulal Cc: Nicolai Stange Cc: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Miroslav Benes Acked-by: Joe Lawrence Acked-by: Josh Poimboeuf Signed-off-by: Petr Mladek commit 92c9abf5e57500ea7dc59a55273aa7850b631bda Author: Petr Mladek Date: Wed Oct 30 16:43:11 2019 +0100 livepatch: Allow to distinguish different version of system state changes The atomic replace runs pre/post (un)install callbacks only from the new livepatch. There are several reasons for this: + Simplicity: clear ordering of operations, no interactions between old and new callbacks. + Reliability: only new livepatch knows what changes can already be made by older livepatches and how to take over the state. + Testing: the atomic replace can be properly tested only when a newer livepatch is available. It might be too late to fix unwanted effect of callbacks from older livepatches. It might happen that an older change is not enough and the same system state has to be modified another way. Different changes need to get distinguished by a version number added to struct klp_state. The version can also be used to prevent loading incompatible livepatches. The check is done when the livepatch is enabled. The rules are: + Any completely new system state modification is allowed. + System state modifications with the same or higher version are allowed for already modified system states. + Cumulative livepatches must handle all system state modifications from already installed livepatches. + Non-cumulative livepatches are allowed to touch already modified system states. Link: http://lkml.kernel.org/r/20191030154313.13263-4-pmladek@suse.com To: Jiri Kosina Cc: Kamalesh Babulal Cc: Nicolai Stange Cc: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Miroslav Benes Acked-by: Joe Lawrence Acked-by: Josh Poimboeuf Signed-off-by: Petr Mladek commit 73727f4dafa2df107e85753c5ab703a1f344e1f1 Author: Petr Mladek Date: Wed Oct 30 16:43:10 2019 +0100 livepatch: Basic API to track system state changes This is another step how to help maintaining more livepatches. One big help was the atomic replace and cumulative livepatches. These livepatches replace the already installed ones. Therefore it should be enough when each cumulative livepatch is consistent. The problems might come with shadow variables and callbacks. They might change the system behavior or state so that it is no longer safe to go back and use an older livepatch or the original kernel code. Also, a new livepatch must be able to detect changes which were made by the already installed livepatches. This is where the livepatch system state tracking gets useful. It allows to: - find whether a system state has already been modified by previous livepatches - store data needed to manipulate and restore the system state The information about the manipulated system states is stored in an array of struct klp_state. It can be searched by two new functions klp_get_state() and klp_get_prev_state(). The dependencies are going to be solved by a version field added later. The only important information is that it will be allowed to modify the same state by more non-cumulative livepatches. It is similar to allowing to modify the same function several times. The livepatch author is responsible for preventing incompatible changes. Link: http://lkml.kernel.org/r/20191030154313.13263-3-pmladek@suse.com To: Jiri Kosina Cc: Kamalesh Babulal Cc: Nicolai Stange Cc: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Miroslav Benes Acked-by: Joe Lawrence Acked-by: Josh Poimboeuf Signed-off-by: Petr Mladek commit 7e35e4eb7e56233dcf445992d7b835a9ba93408e Author: Petr Mladek Date: Wed Oct 30 16:43:09 2019 +0100 livepatch: Keep replaced patches until post_patch callback is called Pre/post (un)patch callbacks might manipulate the system state. Cumulative livepatches might need to take over the changes made by the replaced ones. For this they might need to access some data stored or referenced by the old livepatches. Therefore the replaced livepatches have to stay around until post_patch() callback is called. It is achieved by calling the free functions later. It is the same location where disabled livepatches have already been freed. Link: http://lkml.kernel.org/r/20191030154313.13263-2-pmladek@suse.com To: Jiri Kosina Cc: Kamalesh Babulal Cc: Nicolai Stange Cc: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Miroslav Benes Acked-by: Joe Lawrence Acked-by: Josh Poimboeuf Signed-off-by: Petr Mladek commit 7671be39c4d9c09bf73d7b16fc8d50e8f57f295c Author: Hongwei Zhang Date: Wed Sep 25 15:22:16 2019 -0400 ARM: dts: aspeed-g5: Add SGPIO description Add SGPIO node to the ASPEED AST2500 device tree. Signed-off-by: Hongwei Zhang Signed-off-by: Joel Stanley commit b5db76dba0642ea6f2391374f3b2b479014e5bf0 Author: Mika Westerberg Date: Tue Oct 8 19:03:34 2019 +0300 thunderbolt: Refactor add_switch() into two functions Currently add_switch() takes a huge amount of parameters that makes it hard to maintain. Instead of passing all those parameters we can split the function into two parts (alloc and add) and fill the additional switch fields directly in the functions calling those. While there remove redundant error logging in case kmemdup() fails. No functional changes. Signed-off-by: Mika Westerberg commit b433d0100562233b21beb13c0139feeff350bc68 Author: Mika Westerberg Date: Mon Sep 30 14:07:22 2019 +0300 thunderbolt: Add helper macro to iterate over switch ports There are quite many places in the driver where we iterate over each port in the switch. To make it bit more convenient, add a macro that can be used to iterate over each port and convert existing call sites to use it. This is based on code by Lukas Wunner. No functional changes. Signed-off-by: Mika Westerberg commit 826c6a1773084c737abf09dccc591f9a59b8b812 Author: Mika Westerberg Date: Mon Jul 1 18:41:51 2019 +0300 thunderbolt: Make tb_sw_write() take const parameter The function does not modify the argument in any way so make it const. Signed-off-by: Mika Westerberg commit 98176380cbe5e7747ccd82ed982ce5dfd5cc8b65 Author: Mika Westerberg Date: Fri Sep 6 11:32:15 2019 +0300 thunderbolt: Convert DP adapter register names to follow the USB4 spec Now that USB4 spec has names for these DP adapter registers we can use them instead. This makes it easier to match certain register to the spec. No functional changes. Signed-off-by: Mika Westerberg commit 778bfca3d14aa93d1e3062835061401b08c258f7 Author: Mika Westerberg Date: Fri Sep 6 12:05:24 2019 +0300 thunderbolt: Convert PCIe adapter register names to follow the USB4 spec Now that USB4 spec has names for these PCIe adapter registers we can use them instead. This makes it easier to match certain register to the spec. No functional changes. Signed-off-by: Mika Westerberg commit 8f57d47806664d9b2e618ea8086adcf76752daaf Author: Mika Westerberg Date: Fri Sep 6 11:59:00 2019 +0300 thunderbolt: Convert basic adapter register names to follow the USB4 spec Now that USB4 spec has names for these basic registers we can use them instead. This makes it easier to match certain register to the spec. No functional changes. Signed-off-by: Mika Westerberg commit af99f696b5c57e5e7465750f3a7b3ae5e69d6c7d Author: Mika Westerberg Date: Tue Aug 27 15:18:20 2019 +0300 thunderbolt: Log error if adding switch fails If we fail to add a switch for some reason log an error instead of keeping silent. This is useful for debugging. Signed-off-by: Mika Westerberg commit 68b91293c837c859e841b5bedf2274687bbd53de Author: Mika Westerberg Date: Fri Mar 22 14:28:11 2019 +0200 thunderbolt: Log switch route string on config read/write timeout This helps to point out which switch config read/write triggered the timeout. Signed-off-by: Mika Westerberg commit f07a360813f6c551380dca8817d8eb5e7ab40a21 Author: Mika Westerberg Date: Tue Jun 25 15:10:01 2019 +0300 thunderbolt: Introduce tb_switch_is_icm() We currently differentiate between SW CM (Software Connection Manager, sometimes also called External Connection Manager) and ICM (Firmware based Connection Manager, Internal Connection Manager) by looking directly at the sw->config.enabled field which may be rather hard to understand for the casual reader. For this reason introduce a wrapper function with documentation that should make the intention more clear. Signed-off-by: Mika Westerberg commit 1c9c5bc525b592e4b26cb5182d813e4b84bafa6e Merge: b406357c572b 747125db6dcd Author: Mika Westerberg Date: Fri Nov 1 14:30:53 2019 +0300 Merge branch 'thunderbolt/fixes' into thunderbolt/next commit e7f1eb321b1a8497c5ddd59303c18864a95ab8bd Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:10 2019 +0200 dt-bindings: power: rcar-sysc: Document r8a77961 support Add DT binding documentation for the System Controller in the Renesas R-Car M3-W+ (R8A77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Eugeniu Rosca Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191023122911.12166-5-geert+renesas@glider.be commit 248a887fc1aadd6681f772d5f797895fd9f0f863 Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:09 2019 +0200 dt-bindings: reset: rcar-rst: Document r8a77961 support Add DT binding documentation for the Reset block in the Renesas R-Car M3-W+ (R8A77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Eugeniu Rosca Acked-by: Philipp Zabel Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191023122911.12166-4-geert+renesas@glider.be commit fec526521be4283dc736273e288a1df4412abffc Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:08 2019 +0200 dt-bindings: arm: renesas: Add Salvator-XS board with R-Car M3-W+ Add device tree binding documentation for the Renesas Salvator-XS board equipped with an R-Car M3-W+ (R8A77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Reviewed-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191023122911.12166-3-geert+renesas@glider.be commit 193ffd3656602d857a576df7fd77a1423584da25 Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:07 2019 +0200 dt-bindings: arm: renesas: Document R-Car M3-W+ SoC DT bindings Add device tree binding documentation for the Renesas R-Car M3-W+ (R8A77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Reviewed-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191023122911.12166-2-geert+renesas@glider.be commit 0b05ad22a27998f842cbbc3f285bac05e2c30f4c Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:39 2019 +0200 dt-bindings: clock: Add r8a77961 CPG Core Clock Definitions Add all Clock Pulse Generator Core Clock Outputs for the Renesas R-Car M3-W+ (R8A77961) SoC, as listed in Table 8.2b ("List of Clocks [R-Car M3-W/R-Car M3-W+]") of the R-Car Series, 3rd Generation Hardware User's Manual (Rev. 2.00, Jul. 31, 2019). A gap is added for CSIREF, to preserve compatibility with the definitions for R-Car M3-W (R8A77960). Note that internal CPG clocks (S0, S1, S2, S3, SDSRC, SSPSRC, and POST2) are not included, as they are used as internal clock sources only, and never referenced from DT. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191023122941.12342-3-geert+renesas@glider.be commit 640f9606dce1d482ed87590c2d582004ea23ab09 Author: Geert Uytterhoeven Date: Wed Oct 23 14:29:11 2019 +0200 dt-bindings: power: Add r8a77961 SYSC power domain definitions Add power domain indices for the R-Car M3-W+ (R8A77961) SoC. Based on Rev. 2.00 of the R-Car Series, 3rd Generation, Hardware User’s Manual (Jul. 31, 2019). Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Reviewed-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191023122911.12166-6-geert+renesas@glider.be commit 1883e2999f045e1fd6f76a7f30288a5312085289 Author: Joonas Lahtinen Date: Fri Nov 1 12:41:13 2019 +0200 drm/i915: Update DRIVER_DATE to 20191101 Signed-off-by: Joonas Lahtinen commit 8c014e90bd6f4de070a8b0646d64c2decc201baa Author: Tao Ren Date: Mon Oct 21 12:48:20 2019 -0700 ARM: dts: aspeed: yamp: Use common dtsi Simplify the Yamp device tree by using the common dtsi. In addition this enables the following the second firmware flash and the eMMC device in slot #1. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit 2bd4c3d3f405da26237661f24e24828279e7f6d8 Author: Tao Ren Date: Mon Oct 21 12:48:19 2019 -0700 ARM: dts: aspeed: minipack: Use common dtsi Simplify the Minipack device tree by using the common dtsi. In addition this enables the enabling the second firmware flash, and updates it's size from 32MB to 64MB. It also enables the eMMC device in slot #1. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit 7e4dd1ed48e82a7860fda856979dd153b7f8cad4 Author: Tao Ren Date: Mon Oct 21 12:48:18 2019 -0700 ARM: dts: aspeed: cmm: Use common dtsi Simplify the CMM device tree by using the common dtsi. In addition this enables the second firmware flash and the emmc device in slot #0. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit 2b7ca63ccdec8795e6d308a60469b85b6abde96e Author: Tao Ren Date: Mon Oct 21 12:48:17 2019 -0700 ARM: dts: aspeed: Common dtsi for Facebook AST2500 Network BMCs This common descirption is included by all Facebook AST2500 Network BMC platforms to minimize duplicated device entries across Facebook Network BMC device trees. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit 1dd785ba304d9f72330921acd72133591d362a43 Author: Brandon Wyman Date: Mon Oct 28 16:47:54 2019 -0500 ARM: dts: aspeed: rainier: gpio-keys for PSU presence Add in a gpio-keys section to the Rainier device tree source, add in the power supply presence GPIOs. Signed-off-by: Brandon Wyman Reviewed-by: Eddie James Signed-off-by: Joel Stanley commit 7f4a0ad5f0f2ac9a06a8685d58ce65f2eae3879b Author: Jinu Thomas Date: Wed Oct 30 15:31:51 2019 +0530 ARM: dts: aspeed: rainier: Fix i2c eeprom size Fix the size of the Proc VRM card's eeprom used for vpd storage. The size is changed from 64Kbit to 128Kbit. Signed-off-by: Jinu Joy Thomas Reviewed-by: Santosh Puranik Signed-off-by: Joel Stanley commit 253d39f5a6c51a0c49c493e889670805ea1883fb Author: Andrew Jeffery Date: Tue Oct 22 15:47:36 2019 +1100 ARM: dts: tacoma: Hog LPC pinmux Requesting pinmux configuration is done at driver probe time. The LPC IP is composed of many sub-devices, each with their own driver, and no driver exists for the entire IP block. Avoid having each sub-device request the LPC pinmux by just hogging it in the pinctrl node. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 8fc6327f0f0bb179b189e0301251a69cc27cc976 Author: Brad Bishop Date: Thu Oct 17 14:14:12 2019 -0400 ARM: dts: aspeed: rainier: Enable VUART1 Like most OpenPower machines the VUART is expected to be at /dev/ttyS5 for communication with the host over LPC. Signed-off-by: Brad Bishop Signed-off-by: Joel Stanley commit a3bff4fec5e1a148b599c74a59b2849e5ac2b19c Author: Jinu Thomas Date: Wed Oct 16 11:47:46 2019 +0530 ARM: dts: aspeed: rainier: Add i2c eeproms Added eeproms for the below VPD devices - BMC - TPM - System Planar - DCM 0 VRM - DCM 1 VRM - Base Op panel - Lcd Op panel - DASD (All) - PCIe Cards (All) Signed-off-by: Jinu Joy Thomas Reviewed-by: Santosh Puranik Signed-off-by: Joel Stanley commit 575640201e666251f7ec0ff71f3e8ea9a68bdceb Author: Joel Stanley Date: Thu Oct 17 10:59:54 2019 +1030 ARM: dts: aspeed: tacoma: Use 64MB for firmware memory OpenBMC requires a window the same size as the image being loaded. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit a981c93300ef7d68080081ee525d60936affd7b2 Author: Joel Stanley Date: Thu Oct 17 10:59:53 2019 +1030 ARM: dts: aspeed: tacoma: Add host FSI description This adds the description of the Power9 CPUs that are attached to the BMC. Signed-off-by: Joel Stanley commit a750904577e8fdadcc3dc73acea0f8379063e4b3 Author: Joel Stanley Date: Wed Oct 16 22:29:03 2019 +1030 ARM: dts: ast2600evb: Enable UART workaround The UART has an issue on A0 that can be worked around by using the Synopsis driver. Tested-by: Eddie James Signed-off-by: Joel Stanley commit 77ef1b3991e9fc9b4c48edd3be8962c4ea62b01d Author: Joel Stanley Date: Wed Oct 16 22:29:02 2019 +1030 ARM: dts: aspeed: tacoma: Add UART1 and workaround The UARTs on the AST2600 A0 have a known issue that can be worked around by using the Synopsys driver. Tested-by: Eddie James Signed-off-by: Joel Stanley commit c0d3e181d78223247343a6bd07a15c0585d605aa Author: Joel Stanley Date: Wed Oct 16 22:29:01 2019 +1030 ARM: dts: aspeed-g6: Add remaining UARTs The AST2600 has five UARTs. Add UART 1 to 4. Tested-by: Eddie James Signed-off-by: Joel Stanley commit 8bba55f74321b72a156e0c9b5cefe133b4eb479c Author: Joel Stanley Date: Wed Oct 16 13:18:57 2019 +1030 ARM: dts: aspeed-g6: Fix i2c clock source The upstream clock for the I2C buses is APB2. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 37ece7e341e8c44ee9a7afe7277619a0ee377abe Author: Andrew Jeffery Date: Thu Sep 26 01:04:39 2019 +0930 ARM: dts: aspeed: Add RCLK to MAC clocks for RMII interfaces We need to ungate RCLK on AST2500- and AST2600-based platforms for RMII to function. RMII interfaces are commonly used for NCSI. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 9d40f423d7990a94133ecb82a153a4c3fdb65e85 Merge: 8737481e381c d8d9ad83a497 Author: Joel Stanley Date: Fri Nov 1 20:54:12 2019 +1030 Merge branch 'aspeed-clk-for-v5.5' This contains the dt-bindings headers for the ethernet clocks. Signed-off-by: Joel Stanley commit e5661c6ab0efd0dd0140a0f521b6e9f6a26a5071 Author: Chris Wilson Date: Fri Nov 1 08:49:40 2019 +0000 drm/i915/selftests: Start kthreads before stopping An interesting observation made with our parallel selftests was that on our small/single cpu systems we would call kthread_stop() before the kthreads were spawned. If this happens, the kthread is never run at all; completely bypassing the test. A simple yield() from the parent will ensure that all children have the opportunity to start before we reap them. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191101084940.31838-1-chris@chris-wilson.co.uk commit 292a27b0a807615f4c140b990802f109c72d6c8c Author: Chris Wilson Date: Fri Nov 1 09:51:47 2019 +0000 drm/i915/lmem: Check against i915_selftest only under CONFIG_SELFTEST The i915_selftest module parameters only exist when CONFIG_DRM_I915_SELFTEST is set. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191101095147.9769-1-chris@chris-wilson.co.uk commit f8be8d1ede50a5918faeda82e1f1fb45e9431b54 Author: Gabriela Bittencourt Date: Thu Oct 31 20:02:43 2019 -0300 staging: rts5208: Eliminate the use of Camel Case in file sd.h Cleans up checks of "Avoid CamelCase" in file sd.h Even though the constant "DCM_LOW_FREQUENCY_MODE_SET" is defined and never used, it's useful to keep it because it documents the device. Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191031230243.3462-4-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1a0afbec55b8e3637682f06904ff9373b084823c Author: Gabriela Bittencourt Date: Thu Oct 31 20:02:42 2019 -0300 staging: rts5208: Eliminate the use of Camel Case in files xd.{h, c} Cleans up checks of "Avoid CamelCase" in files xd.{h,c} Acked-by: Julia Lawall Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191031230243.3462-3-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6e653e9cac2d4b53ac2ca5442a9ec7b38f9c62c8 Author: Gabriela Bittencourt Date: Thu Oct 31 20:02:41 2019 -0300 staging: rts5208: Eliminate the use of Camel Case in files ms.{h, c} Cleans up checks of "Avoid CamelCase" in files ms.{h,c} Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191031230243.3462-2-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 129376c6d68617bc00e46bbfc4c21745db17b73d Author: Roi Martin Date: Thu Oct 31 13:31:39 2019 +0100 staging: exfat: replace kmalloc with kmalloc_array Replace expressions of the form: kmalloc(count * size, GFP_KERNEL); With: kmalloc_array(count, size, GFP_KERNEL); Signed-off-by: Roi Martin Link: https://lore.kernel.org/r/20191031123139.32361-1-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3ae82f449cea00de5cd894feb8e9154b2da99b4e Author: Davidlohr Bueso Date: Wed Oct 30 07:49:16 2019 -0700 drivers/staging/exfat: Replace binary semaphores for mutexes At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal than semaphores; it's also a nicer interface for mutual exclusion, which is why they are encouraged over binary semaphores, when possible. For both v_sem and z_sem, their semantics imply traditional lock ownership; that is, the lock owner is the same for both lock/unlock operations. Therefore it is safe to convert. Signed-off-by: Davidlohr Bueso Acked-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191030144916.10802-1-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman commit 84db889e6d827eefc3dde130fec8382d2dcb23ac Author: Thierry Reding Date: Thu Aug 29 17:52:42 2019 +0200 drm/tegra: Unconditionally select IOMMU_IOVA Currently configurations can be generated where IOMMU_SUPPORT is disabled but IOMMU_IOVA is built as a module and DRM_TEGRA as built-in. In such a case, the symbols guarded by IOMMU_IOVA will not be available when linking the Tegra DRM driver and cause a linking failure. Simplify this by unconditionally selecting IOMMU_IOVA, which makes sure that it will be forced to =y if DRM_TEGRA=y. Technically we can now get IOMMU_IOVA code built-in even if we don't use it (Tegra DRM only uses it when IOMMU_SUPPORT is also enabled), but such configuration are of a mostly academic nature. In all practical configurations we want IOMMU support anyway. Signed-off-by: Thierry Reding commit c8a2036474882f478845c70c496c3e49635e34c2 Author: Thierry Reding Date: Thu Aug 29 17:56:53 2019 +0200 gpu: host1x: Unconditionally select IOMMU_IOVA Currently configurations can be generated where IOMMU_SUPPORT is disabled but IOMMU_IOVA is built as a module and HOST1X as built-in. In such a case, the symbols guarded by IOMMU_IOVA will not be available when linking the host1x driver and cause a linking failure. Simplify this by unconditionally selecting IOMMU_IOVA, which makes sure that it will be forced to =y if HOST1X=y. Technically we can now get IOMMU_IOVA code built-in even if we don't use it (host1x only uses it when IOMMU_SUPPORT is also enabled), but such configuration are of a mostly academic nature. In all practical configurations we want IOMMU support anyway. Signed-off-by: Thierry Reding commit 4a3174152147da1159f7135e90e1831fba74da34 Author: Chris Wilson Date: Thu Oct 31 09:01:04 2019 +0000 drm/i915/gem: Refine occupancy test in kill_context() Don't just look at the very last request in a queue when deciding if we need to evict the context from the GPU, as that request may still be in the submission queue while the rest of the context is running! Instead, walk back along the queued requests looking for the active request and checking that. Fixes: 2e0986a58cc4 ("drm/i915/gem: Cancel contexts when hangchecking is disabled") Testcase: igt/gem_ctx_persistence/queued Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191031090104.22245-1-chris@chris-wilson.co.uk commit 8b5369ea580964dbc982781bfb9fb93459fc5e8d Author: Nicolas Saenz Julienne Date: Mon Oct 14 20:31:03 2019 +0200 dma/direct: turn ARCH_ZONE_DMA_BITS into a variable Some architectures, notably ARM, are interested in tweaking this depending on their runtime DMA addressing limitations. Acked-by: Christoph Hellwig Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Catalin Marinas commit 5878524ee09d1d798cc4a870f517ff2ec450632c Author: Georgii Staroselskii Date: Fri Nov 1 12:43:33 2019 +0300 arm64: dts: allwinner: bluetooth for Emlid Neutis N5 The Emlid Neutis N5 board has AP6212 BT+WiFi chip. This patch is in line with 8558c6e21ceb ("ARM: dts: sun8i: h3: bluetooth for Banana Pi M2 Zero board") and other commits that add Bluetooth support for similar boards. Signed-off-by: Georgii Staroselskii Signed-off-by: Maxime Ripard commit ebc8f4f603392e2f130e562808897b26c74b2f77 Merge: d5ca94a4bdcc 5a3436dc3610 Author: Greg Kroah-Hartman Date: Fri Nov 1 10:06:10 2019 +0100 Merge tag 'iio-for-5.5b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Second set of IIO + counter new device support, features etc for the 5.5 cycle. Note two merge commits in here, both for immutable branches based of 5.4-rc1. 1. Ti eqep driver because of some file moves in precursor patches. I suspect no one else will pull this one. 2. ab8500 refactor as changes in power supply, hwmon and mfd trees. This may come via numerous trees as well as IIO. Counter subsystem related * ti eqep - New device support with bindings. - Includes prior file move to reflect more general use of ti-pwmss. * Counter core - simplify count_read and count_write callbacks + document change. - fix a typo in docs. Various subsystems related * AB8500 - ab8500_btemp driver converted to be an IIO consumer driver. - ab8500_charger driver converted to be an IIO consumer driver. - ab8500_fg fuel gauge driver converted to be an IIO consumer driver. - ab8500 hwmon driver converted to be an IIO consumer driver. - mfd bindings augmented with the adc channels to make the above work. - drop original mfd driver. New device support * ab8500 - new ADC driver used by the above other subystems via the IIO consumer interface. * adux1020 photometric sensor - new driver and dt bindings. * fxos877cq - new driver for this simple(ish) IMU with DT bindings. * intel_mrfld_adc - new driver for the ADC found on Intel Merrifield platforms. * ltc2983 - new driver for this multi-sensor type temperature interface. Includes complex DT bindings. * max1027 - support for 12 bit devices, max1227, max1229 and max1231 + add to trivial bindings. * st_lsm6dsx - support for the LSM6DS0 6 axis MEMs sensor. Note different from the LSM6DSO which the driver already supports *sigh* - support for the LSM6DSRX 6 axis MEMs sensor. Features and cleanups * ad7303 - replace use of core mlock with a local lock with cleanly defined scope. * ad9834 - add a check for devm_clk_get failing. * at91-sama5d2 - tidy up a 0 as NULL warning. * bmp280 - endian type tidy ups. - use bulk regulator ops for a small reduction in code. - use devm_add_action... to simplify error path handling. * exynos - drop stray semicolon. - use devm_platform_ioremap_resource to reduce boilerplate. * hx711 - various tricks to improve the frequency of read out possible. * max1027 - debugfs support. - make interrupts optional. - reset at probe to get clean state. - refactors to allow addition of new device support. * maxim thermocouple - drop an unneeded semicolon. * mb1232 - yaml binding conversion. * mcp320x - tidy up an endian types in cast warning. * meson_saradc - use devm_platform_ioremap_resource to reduce boilerplate. * mpu3050 - make a poison value explicity big endian to supress a warning. * pulsedlight v2 - endian type tidy ups. * sgp30 - drop an excess semicolon. * sps30 - make truncation explicit with masking to clean up a warning. * st sensors - drop gpio include as none of these support gpios. * st_lsm6dsx - tidy up some alignment issues. - refactors to allow addition of new device support. * allow varients of irq related reg definitions. * avoid accessing active-low, open-drain regs if not provided. * allow varients of bdu/boot and reset regs. * allow for enabling or disabling wakeup sources through platform data (seems someone still uses this). - enable wake-up events for LSM6DS0 - use the drdy mask to avoid some invalid samples during initial start of sensor. - Add support to trim the timestamp. * stm32_adc - kernel-doc fixes. * stm32_dac - power management support. * stmpe-adc - Fix endian type of local variable. * twl4030 - use false / true instead of 0 / 1 for booleans. * xilinx-xadc - use devm_platform_ioremap_resouce to reduce boilerplate. * zpa2326 - reorganise buffer handling setup to be more consistent. Fixes (mostly recent additions) * cpcap-adc - Fix mising IRQF_ONESHOT that would cause warnings to be printed. * st_lsm6dsx - Sanity check the read_fifo pointer is set. - use locked read and update functions to prevent some races. - avoid accessing enable_reg if not provided. - take a lock to prevent a race in updating the config. - kernel-doc fixes. - document wakeup-source property in dt binding. - fix lsm9ds1 gyro gain definitions. * tag 'iio-for-5.5b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (73 commits) dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsrx device bindings iio: imu: st_lsm6dsx: add support to LSM6DSRX iio: st: Drop GPIO include iio: adc: hx711: optimize performance in read cycle iio: adc: stm32-adc: fix kernel-doc warnings iio: pressure: zpa2326: fix iio_triggered_buffer_postenable position iio: chemical: sgp30: drop excess semicolon iio: adc: twl4030: Use false / true instead of 0 / 1 with booleans dt-bindings: iio: Add ltc2983 documentation iio: temperature: Add support for LTC2983 iio: pressure: bmp280: use devm action and remove labels from probe iio: pressure: bmp280: use bulk regulator ops iio: imu: Add support for the FXOS8700 IMU dt-bindings: iio: imu: add fxos8700 imu binding staging: iio: ad9834: add a check for devm_clk_get iio: adc: xilinx-xadc: use devm_platform_ioremap_resource iio: temp: maxim thermocouple: Drop unneeded semi colon. iio: adc: cpcap-adc: Fix missing IRQF_ONESHOT as only threaded handler. iio: adc: meson_saradc: use devm_platform_ioremap_resource iio: adc: exynos: use devm_platform_ioremap_resource ... commit 6d1aa40e109b6a30ce0ffa2dc56afc6442104986 Author: Karl Palsson Date: Thu Oct 31 23:11:02 2019 +0000 ARM: dts: sunxi: h3/h5: add missing uart2 rts/cts pins uart1 and uart3 had existing pin definitions for the rts/cts pairs. Add definitions for uart2 as well. Signed-off-by: Karl Palsson Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 9567832aba7f48834d28e3174909149c904808c8 Author: Priit Laes Date: Fri Nov 1 09:57:09 2019 +0200 ARM: configs: sunxi: Enable MICREL_PHY Include support for Micrel KSZ9031 PHY driver in sunxi_defconfig, which fixes issues of link not coming up at boot time with certain link partners. Micrel KSZ9031 PHY chip is used on Olimex A20-OLinuXino-LIME2 boards. The errata fix itself has been implemented in commit "3aed3e2a143c96: net: phy: micrel: add Asym Pause workaround" Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard commit 2fabf6dd77014f19d45fc71c01f1b073c03df255 Author: Corentin Labbe Date: Wed Oct 23 22:05:12 2019 +0200 arm64: defconfig: add new Allwinner crypto options This patch adds the new allwinner crypto configs to ARM64 defconfig Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 46b257b1852fccdc4edaf4bbc6fdb59be0b94f0d Author: Corentin Labbe Date: Wed Oct 23 22:05:11 2019 +0200 ARM: configs: sunxi: add new Allwinner crypto options This patch adds the new Allwinner crypto configs to sunxi_defconfig Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit edabfce623fb1aceb8f4a2e0c53f9256b979223d Author: Corentin Labbe Date: Fri Oct 25 20:51:28 2019 +0200 ARM: dts: sun9i: a80: Add Security System node The Security System is a hardware cryptographic accelerator that support AES/MD5/SHA1/DES/3DES/PRNG/RSA algorithms. It could be found on Allwinner SoC A80 and A83T This patch adds it on the Allwinner A80 SoC Device-tree. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit c4cf3f5cdda8d0164eda86977ea4a0a34801f20c Author: Corentin Labbe Date: Fri Oct 25 20:51:27 2019 +0200 ARM: dts: sun8i: a83t: Add Security System node The Security System is a hardware cryptographic accelerator that support AES/MD5/SHA1/DES/3DES/PRNG/RSA algorithms. It could be found on Allwinner SoC A80 and A83T This patch adds it on the Allwinner A83T SoC Device-tree. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 709b86ff01f57224798f68474c7c2080d115acee Author: Corentin Labbe Date: Wed Oct 23 22:05:10 2019 +0200 arm64: dts: allwinner: sun50i: Add Crypto Engine node on H6 The Crypto Engine is a hardware cryptographic accelerator that supports many algorithms. This patch enables the Crypto Engine on the Allwinner H6 SoC Device-tree. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 8002c454d446fcbd4ae24c901546e836ba083141 Author: Corentin Labbe Date: Wed Oct 23 22:05:09 2019 +0200 arm64: dts: allwinner: sun50i: Add crypto engine node on H5 The Crypto Engine is a hardware cryptographic accelerator that supports many algorithms. It could be found on most Allwinner SoCs. This patch enables the Crypto Engine on the Allwinner H5 SoC Device-tree. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 0f5fc158851b63fd145b1b105376b8976eb4934d Author: Corentin Labbe Date: Wed Oct 23 22:05:08 2019 +0200 arm64: dts: allwinner: sun50i: Add Crypto Engine node on A64 The Crypto Engine is a hardware cryptographic accelerator that supports many algorithms. It could be found on most Allwinner SoCs. This patch enables the Crypto Engine on the Allwinner A64 SoC Device-tree. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit e7ef094aea65523121036ccad66b4b34919429ab Author: Corentin Labbe Date: Wed Oct 23 22:05:07 2019 +0200 ARM: dts: sun8i: H3: Add Crypto Engine node The Crypto Engine is a hardware cryptographic accelerator that supports many algorithms. It could be found on most Allwinner SoCs. This patch enables the Crypto Engine on the Allwinner H3 SoC Device-tree. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 96d8dec97b77520ff44f7f710de585cc3a2b5230 Author: Corentin Labbe Date: Wed Oct 23 22:05:06 2019 +0200 ARM: dts: sun8i: R40: add crypto engine node The Crypto Engine is a hardware cryptographic offloader that supports many algorithms. It could be found on most Allwinner SoCs. This patch enables the Crypto Engine on the Allwinner R40 SoC Device-tree. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit a24607032359297c4d7cc629e9c52bb5159730b1 Author: Corentin Labbe Date: Wed Oct 23 22:05:05 2019 +0200 dt-bindings: crypto: Add DT bindings documentation for sun8i-ce Crypto Engine This patch adds documentation for Device-Tree bindings for the Crypto Engine cryptographic accelerator driver. Reviewed-by: Rob Herring Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit cc86f3e705981d9cb07aa8b0f5a2eabec999e341 Author: Tudor Ambarus Date: Sat Oct 26 13:34:00 2019 +0300 mtd: spi-nor: Constify data to write to the Status Register Constify the data to write to the Status Register. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 4b3745361cc558e046c7c80826740af2fff30954 Author: Tudor Ambarus Date: Fri Oct 25 10:36:16 2019 +0300 mtd: spi-nor: Fix retlen handling in sst_write() In case the write of the first byte failed, retlen was incorrectly incremented to *retlen += actual; on the exit path. retlen should be incremented when actual data was written to the flash. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 70d2c6dcf8cc655dabab7700f91b194e8cb8a87c Author: Tudor Ambarus Date: Thu Oct 24 17:23:23 2019 +0300 mtd: spi-nor: Drop redundant error reports in Reg Ops callers Drop the error messages from the callers, since the callees already print an error message in case of failure. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit b662d398ccf114a80c92140287a6507efb3e2dfc Author: Tudor Ambarus Date: Thu Oct 24 16:59:55 2019 +0300 mtd: spi-nor: Pointer parameter for CR in spi_nor_read_cr() Let the callers pass the pointer to the DMA-able buffer where the value of the Configuration Register will be written. This way we avoid the casts between int and u8, which can be confusing. Callers stop compare the return value of spi_nor_read_cr() with negative, spi_nor_read_cr() returns 0 on success and -errno otherwise. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 8663c188beeacf35d4865185a6713d6e8ded4fea Author: Kiran Gunda Date: Fri Nov 1 11:57:04 2019 +0530 backlight: qcom-wled: Add auto string detection logic The auto string detection algorithm checks if the current WLED sink configuration is valid. It tries enabling every sink and checks if the OVP fault is observed. Based on this information it detects and enables the valid sink configuration. Auto calibration will be triggered when the OVP fault interrupts are seen frequently thereby it tries to fix the sink configuration. The auto-detection also kicks in when the connected LED string of the display-backlight malfunctions (because of damage) and requires the damaged string to be turned off to prevent the complete panel and/or board from being damaged. Signed-off-by: Kiran Gunda Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit feeab87b30726ee3fc0522945c8efaa86a06d48b Author: Kiran Gunda Date: Fri Nov 1 11:57:03 2019 +0530 backlight: qcom-wled: Add support for short circuit handling Handle the short circuit interrupt and check if the short circuit interrupt is valid. Re-enable the module to check if it goes away. Disable the module altogether if the short circuit event persists. Signed-off-by: Kiran Gunda Reviewed-by: Bjorn Andersson Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 03b2b5e8698623c0102ab2ec060f97bf606303a2 Author: Kiran Gunda Date: Fri Nov 1 11:57:02 2019 +0530 backlight: qcom-wled: Add support for WLED4 peripheral WLED4 peripheral is present on some PMICs like pmi8998 and pm660l. It has a different register map and configurations are also different. Add support for it. Signed-off-by: Kiran Gunda Reviewed-by: Bjorn Andersson Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 775d2ffb4af658fbd619ca5ede91e9682916c53b Author: Kiran Gunda Date: Fri Nov 1 11:57:01 2019 +0530 backlight: qcom-wled: Restructure the driver for WLED3 Restructure the driver to add the support for new WLED peripherals. Signed-off-by: Kiran Gunda Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit bb800a3715d4e9855db7a0586b57d68660ac623d Author: Kiran Gunda Date: Fri Nov 1 11:57:00 2019 +0530 backlight: qcom-wled: Rename PM8941* to WLED3 Rename the PM8941* references as WLED3 to make the driver generic and have WLED support for other PMICs. Also rename "i_boost_limit" and "i_limit" variables to "boost_i_limit" and "string_i_limit" respectively to resemble the corresponding register names. Signed-off-by: Kiran Gunda Reviewed-by: Daniel Thompson Reviewed-by: Bjorn Andersson Acked-by: Pavel Machek Signed-off-by: Lee Jones commit 059dcfcb4afd0398a06dc4c75994b4f5604ef28a Author: Kiran Gunda Date: Fri Nov 1 11:56:59 2019 +0530 backlight: qcom-wled: Add new properties for PMI8998 Update the bindings with the new properties used for PMI8998. Signed-off-by: Kiran Gunda Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit 488a92e6883438269d5c079f4df4dc88a3dea498 Author: Kiran Gunda Date: Fri Nov 1 11:56:58 2019 +0530 backlight: qcom-wled: Restructure the qcom-wled bindings Restructure the qcom-wled bindings for the better readability. Signed-off-by: Kiran Gunda Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Acked-by: Daniel Thompson Acked-by: Pavel Machek Signed-off-by: Lee Jones commit 51c0ddc7583494ac6ecd1f5d1688f1aced7ea2f9 Author: Kiran Gunda Date: Fri Nov 1 11:56:57 2019 +0530 backlight: qcom-wled: Rename pm8941-wled.c to qcom-wled.c pm8941-wled.c driver is supporting the WLED peripheral on pm8941. Rename it to qcom-wled.c so that it can support WLED on multiple PMICs. Signed-off-by: Kiran Gunda Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Acked-by: Daniel Thompson Acked-by: Pavel Machek Signed-off-by: Lee Jones commit 5ce1b49ccb52fc3dd5679d8c523a3e8b5c812fb0 Author: Tudor Ambarus Date: Thu Oct 24 16:40:13 2019 +0300 mtd: spi-nor: Pointer parameter for FSR in spi_nor_read_fsr() Let the callers pass the pointer to the DMA-able buffer where the value of the Flag Status Register will be written. This way we avoid the casts between int and u8, which can be confusing. Caller stops compare the return value of spi_nor_read_fsr() with negative, spi_nor_read_fsr() returns 0 on success and -errno otherwise. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit cd1718f5c49d53539c99f45a485ca0e0ac7f0a99 Author: Tudor Ambarus Date: Thu Oct 24 15:55:34 2019 +0300 mtd: spi-nor: Pointer parameter for SR in spi_nor_read_sr() Let the callers pass the pointer to the DMA-able buffer where the value of the Status Register will be written. This way we avoid the casts between int and u8, which can be confusing. Callers stop compare the return value of spi_nor_read_sr() with negative, spi_nor_read_sr() returns 0 on success and -errno otherwise. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 2b73b3503b0a1393ff1e4a214a3f815d2c6dbffb Author: Joonas Lahtinen Date: Fri Nov 1 09:04:29 2019 +0200 drm/i915: Update DRIVER_DATE to 20191101 Signed-off-by: Joonas Lahtinen commit 7380f79c111cf90481869f83986c355b403faf59 Author: Tudor Ambarus Date: Tue Oct 29 11:16:59 2019 +0000 mtd: spi-nor: Don't overwrite errno from Reg Ops Do not overwrite the error numbers received the Register Operations methods. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 17ccd0e4872290b5b24302b7520feefde03e5669 Author: Tudor Ambarus Date: Tue Oct 29 11:16:55 2019 +0000 mtd: spi-nor: Drop explicit cast to int to already int value ret is already of type int. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit ebe04bfe26dd816839d3d24fdeb5f6bed430a3df Author: Tudor Ambarus Date: Tue Oct 29 11:16:54 2019 +0000 mtd: spi-nor: Stop compare with negative in Reg Ops methods spi_mem_exec_op() nor->controller_ops->write_reg() nor->controller_ops->read_reg() spi_nor_wait_till_ready() Return 0 on success, -errno otherwise. Stop compare with negative and compare with zero in all the register operations methods. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 502c4b0a14458a129ae4d6797f182958af8e3f89 Author: Tudor Ambarus Date: Tue Oct 29 11:16:52 2019 +0000 mtd: spi-nor: Group all Reg Ops to avoid forward declarations Group all register methods up in the file, to avoid forward declarations. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 40b04958fab57a76aae1df44b029be5187f713ca Author: Tudor Ambarus Date: Tue Oct 29 11:16:50 2019 +0000 mtd: spi-nor: Drop duplicated new line Two new lines, one after another, drop one. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 567c2983efb9a4b3d26a221b477346d927092b8a Author: Tudor Ambarus Date: Tue Oct 29 11:16:49 2019 +0000 mtd: spi-nor: Prepend spi_nor_ to all Reg Ops methods All the core functions should begin with "spi_nor_". Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 298b4c604008025b134bc6fccbc4018449945d60 Author: Christian Lamparter Date: Sun Oct 27 16:47:47 2019 +0100 crypto: amcc - restore CRYPTO_AES dependency This patch restores the CRYPTO_AES dependency. This is necessary since some of the crypto4xx driver provided modes need functioning software fallbacks for AES-CTR/CCM and GCM. Fixes: da3e7a9715ea ("crypto: amcc - switch to AES library for GCM key derivation") Cc: Ard Biesheuvel Signed-off-by: Christian Lamparter Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 700f7d0d29c795c36517dcd3541e4432a76c2efc Author: Zhou Wang Date: Sat Oct 26 11:00:16 2019 +0800 crypto: hisilicon - fix to return sub-optimal device when best device has no qps Currently find_zip_device() finds zip device which has the min NUMA distance with current CPU. This patch modifies find_zip_device to return sub-optimal device when best device has no qps. This patch sorts all devices by NUMA distance, then finds the best zip device which has free qp. Signed-off-by: Zhou Wang Signed-off-by: Shukun Tan Signed-off-by: Herbert Xu commit f0c8b6a1e1454f1645463e8ffb3e027fc597867c Author: Zhou Wang Date: Sat Oct 26 10:57:21 2019 +0800 crypto: hisilicon - use sgl API to get sgl dma addr and len Use sgl API to get sgl dma addr and len, this will help to avoid compile error in some platforms. So NEED_SG_DMA_LENGTH can be removed here, which can only be selected by arch code. Signed-off-by: Zhou Wang Suggested-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b95bba5d01141ba919c99ea6fde206727f3b3eb4 Author: Eric Biggers Date: Fri Oct 25 12:41:13 2019 -0700 crypto: skcipher - rename the crypto_blkcipher module and kconfig option Now that the blkcipher algorithm type has been removed in favor of skcipher, rename the crypto_blkcipher kernel module to crypto_skcipher, and rename the config options accordingly: CONFIG_CRYPTO_BLKCIPHER => CONFIG_CRYPTO_SKCIPHER CONFIG_CRYPTO_BLKCIPHER2 => CONFIG_CRYPTO_SKCIPHER2 Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c65058b7587fd3d001c57a50285477be521f5350 Author: Eric Biggers Date: Fri Oct 25 12:41:12 2019 -0700 crypto: skcipher - remove the "blkcipher" algorithm type Now that all "blkcipher" algorithms have been converted to "skcipher", remove the blkcipher algorithm type. The skcipher (symmetric key cipher) algorithm type was introduced a few years ago to replace both blkcipher and ablkcipher (synchronous and asynchronous block cipher). The advantages of skcipher include: - A much less confusing name, since none of these algorithm types have ever actually been for raw block ciphers, but rather for all length-preserving encryption modes including block cipher modes of operation, stream ciphers, and other length-preserving modes. - It unified blkcipher and ablkcipher into a single algorithm type which supports both synchronous and asynchronous implementations. Note, blkcipher already operated only on scatterlists, so the fact that skcipher does too isn't a regression in functionality. - Better type safety by using struct skcipher_alg, struct crypto_skcipher, etc. instead of crypto_alg, crypto_tfm, etc. - It sometimes simplifies the implementations of algorithms. Also, the blkcipher API was no longer being tested. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 53253064adfab4681f53d09e2717dd155997a3dc Author: Eric Biggers Date: Fri Oct 25 12:41:11 2019 -0700 crypto: skcipher - rename crypto_skcipher_type2 to crypto_skcipher_type Now that the crypto_skcipher_type() function has been removed, there's no reason to call the crypto_type struct for skciphers "crypto_skcipher_type2". Rename it to simply "crypto_skcipher_type". Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit cec0cb8a28f9060367099beeafd0dbdb76fdfae2 Author: Eric Biggers Date: Fri Oct 25 12:41:10 2019 -0700 crypto: skcipher - remove crypto_has_ablkcipher() crypto_has_ablkcipher() has no users, and it does the same thing as crypto_has_skcipher() anyway. So remove it. This also removes the last user of crypto_skcipher_type() and crypto_skcipher_mask(), so remove those too. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d3ca75a8b3d77f2788e6c119ea7c3e3a1ab1e1ca Author: Eric Biggers Date: Fri Oct 25 12:41:09 2019 -0700 crypto: skcipher - unify the crypto_has_skcipher*() functions crypto_has_skcipher() and crypto_has_skcipher2() do the same thing: they check for the availability of an algorithm of type skcipher, blkcipher, or ablkcipher, which also meets any non-type constraints the caller specified. And they have exactly the same prototype. Therefore, eliminate the redundancy by removing crypto_has_skcipher() and renaming crypto_has_skcipher2() to crypto_has_skcipher(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 8d68e7e1ec4d71f2950a5f750785d62bb7b74b6e Author: Corentin Labbe Date: Fri Oct 25 20:51:26 2019 +0200 dt-bindings: crypto: Add DT bindings documentation for sun8i-ss Security System This patch adds documentation for Device-Tree bindings of the Security System cryptographic offloader driver. Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit f08fcced6d0017c39cb6eccb571290867119d049 Author: Corentin Labbe Date: Fri Oct 25 20:51:25 2019 +0200 crypto: allwinner - Add sun8i-ss cryptographic offloader The Security System is an hardware cryptographic offloader present on Allwinner SoCs A80 and A83T. It is different from the previous sun4i-ss. This driver supports AES cipher in CBC and ECB mode. Acked-by: Maxime Ripard Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit a1afe27492a408d45421a1812064235691303fa1 Author: David Sterba Date: Thu Oct 24 18:28:32 2019 +0200 crypto: testmgr - add test vectors for blake2b Test vectors for blake2b with various digest sizes. As the algorithm is the same up to the digest calculation, the key and input data length is distributed in a way that tests all combinanions of the two over the digest sizes. Based on the suggestion from Eric, the following input sizes are tested [0, 1, 7, 15, 64, 247, 256], where blake2b blocksize is 128, so the padded and the non-padded input buffers are tested. blake2b-160 blake2b-256 blake2b-384 blake2b-512 --------------------------------------------------- len=0 | klen=0 klen=1 klen=32 klen=64 len=1 | klen=32 klen=64 klen=0 klen=1 len=7 | klen=64 klen=0 klen=1 klen=32 len=15 | klen=1 klen=32 klen=64 klen=0 len=64 | klen=0 klen=1 klen=32 klen=64 len=247 | klen=32 klen=64 klen=0 klen=1 len=256 | klen=64 klen=0 klen=1 klen=32 Where key: - klen=0: empty key - klen=1: 1 byte value 0x42, 'B' - klen=32: first 32 bytes of the default key, sequence 00..1f - klen=64: default key, sequence 00..3f The unkeyed vectors are ordered before keyed, as this is required by testmgr. CC: Eric Biggers Signed-off-by: David Sterba Signed-off-by: Herbert Xu commit 91d689337fe8b7703608a2ec39aae700b99f3933 Author: David Sterba Date: Thu Oct 24 18:28:31 2019 +0200 crypto: blake2b - add blake2b generic implementation The patch brings support of several BLAKE2 variants (2b with various digest lengths). The keyed digest is supported, using tfm->setkey call. The in-tree user will be btrfs (for checksumming), we're going to use the BLAKE2b-256 variant. The code is reference implementation taken from the official sources and modified in terms of kernel coding style (whitespace, comments, uintXX_t -> uXX types, removed unused prototypes and #ifdefs, removed testing code, changed secure_zero_memory -> memzero_explicit, used own helpers for unaligned reads/writes and rotations). Further changes removed sanity checks of key length or output size, these values are verified in the crypto API callbacks or hardcoded in shash_alg and not exposed to users. Signed-off-by: David Sterba Signed-off-by: Herbert Xu commit 17513547a87a82b4086e802ac93b5c4e5f644ff1 Author: Corentin Labbe Date: Wed Oct 23 22:05:13 2019 +0200 crypto: sun4i-ss - Move to Allwinner directory Since we have a dedicated Allwinner directory for crypto driver, move the sun4i-ss driver in it. Acked-by: Maxime Ripard Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 06f751b613296cc34b86fc83fccaf30d646eb8bc Author: Corentin Labbe Date: Wed Oct 23 22:05:04 2019 +0200 crypto: allwinner - Add sun8i-ce Crypto Engine The Crypto Engine is an hardware cryptographic offloader present on all recent Allwinner SoCs H2+, H3, R40, A64, H5, H6 This driver supports AES cipher in CBC/ECB mode. Acked-by: Maxime Ripard Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 3914b93115af1755880b93a2018cb24aa529ea64 Author: Corentin Labbe Date: Wed Oct 23 22:05:03 2019 +0200 crypto: allwinner - Add allwinner subdirectory Since a second Allwinner crypto driver will be added, it is better to create a dedicated subdirectory. Acked-by: Maxime Ripard Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit a52485165d85b008d8ebb03884350b11039580e1 Author: Colin Ian King Date: Wed Oct 23 12:48:24 2019 +0100 crypto: mediatek - remove redundant bitwise-or Bitwise-or'ing 0xffffffff with the u32 variable ctr is the same result as assigning the value to ctr. Remove the redundant bitwise-or and just use an assignment. Addresses-Coverity: ("Suspicious &= or |= constant expression") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit f398243e9fd6a3a059c1ea7b380c40628dbf0c61 Author: Ard Biesheuvel Date: Wed Oct 23 11:50:44 2019 +0200 crypto: ecdh - fix big endian bug in ECC library The elliptic curve arithmetic library used by the EC-DH KPP implementation assumes big endian byte order, and unconditionally reverses the byte and word order of multi-limb quantities. On big endian systems, the byte reordering is not necessary, while the word ordering needs to be retained. So replace the __swab64() invocation with a call to be64_to_cpu() which should do the right thing for both little and big endian builds. Fixes: 3c4b23901a0c ("crypto: ecdh - Add ECDH software support") Cc: # v4.9+ Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 51d13aaf59779ff4d13f1def2c72ae102a1aad40 Author: Andrey Smirnov Date: Tue Oct 22 08:30:13 2019 -0700 crypto: caam - populate platform devices last Move the call to devm_of_platform_populate() at the end of caam_probe(), so we won't try to add any child devices until all of the initialization is finished successfully. Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Herbert Xu Cc: Iuliana Prodan Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 1a1c4f004444ebb962a02b7fc6d534e0f2ed9acb Author: Andrey Smirnov Date: Tue Oct 22 08:30:12 2019 -0700 crypto: caam - use devres to populate platform devices Use devres to de-initialize the RNG and drop explicit de-initialization code in caam_remove(). Signed-off-by: Andrey Smirnov Reviewed-by: Horia Geantă Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Herbert Xu Cc: Iuliana Prodan Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit f414de2e2fffd89c8a4e5b5e06b0eba5f9d8b1eb Author: Andrey Smirnov Date: Tue Oct 22 08:30:11 2019 -0700 crypto: caam - use devres to de-initialize QI Use devres to de-initialize the QI and drop explicit de-initialization code in caam_remove(). Signed-off-by: Andrey Smirnov Reviewed-by: Horia Geantă Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Herbert Xu Cc: Iuliana Prodan Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit e57acaf0dfe0c8f63411d43cf7c689e43f6810c0 Author: Andrey Smirnov Date: Tue Oct 22 08:30:10 2019 -0700 crypto: caam - use devres to de-initialize the RNG Use devres to de-initialize the RNG and drop explicit de-initialization code in caam_remove(). Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Herbert Xu Cc: Iuliana Prodan Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit eceb5daf9ebaa564a65eb2d9d5a4682a33747300 Author: Andrey Smirnov Date: Tue Oct 22 08:30:09 2019 -0700 crypto: caam - use devres to remove debugfs Use devres to remove debugfs and drop corresponding debugfs_remove_recursive() call. Signed-off-by: Andrey Smirnov Reviewed-by: Horia Geantă Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Herbert Xu Cc: Iuliana Prodan Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit 66e93b28075d3cae568ed97ef78789afa5a6eb36 Author: Andrey Smirnov Date: Tue Oct 22 08:30:08 2019 -0700 crypto: caam - use devres to unmap memory Use devres to unmap memory and drop corresponding iounmap() call. Signed-off-by: Andrey Smirnov Reviewed-by: Horia Geantă Cc: Chris Healy Cc: Lucas Stach Cc: Horia Geantă Cc: Herbert Xu Cc: Iuliana Prodan Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit fbbfb3f83e7866d953a26aa9a8c5e75e9ff11952 Author: Arnd Bergmann Date: Tue Oct 22 16:27:31 2019 +0200 hwrng: omap3-rom - Fix unused function warnings When runtime-pm is disabled, we get a few harmless warnings: drivers/char/hw_random/omap3-rom-rng.c:65:12: error: unused function 'omap_rom_rng_runtime_suspend' [-Werror,-Wunused-function] drivers/char/hw_random/omap3-rom-rng.c:81:12: error: unused function 'omap_rom_rng_runtime_resume' [-Werror,-Wunused-function] Mark these functions as __maybe_unused so gcc can drop them silently. Fixes: 8d9d4bdc495f ("hwrng: omap3-rom - Use runtime PM instead of custom functions") Signed-off-by: Arnd Bergmann Reviewed-by: Sebastian Reichel Signed-off-by: Herbert Xu commit 13a1bb93f7b1c90099c557696951884ea7dcda34 Author: Pascal van Leeuwen Date: Tue Oct 22 11:01:43 2019 +0200 crypto: inside-secure - Fixed warnings on inconsistent byte order handling This fixes a bunch of endianness related sparse warnings reported by the kbuild test robot as well as Ben Dooks. Credits for the fix to safexcel.c go to Ben Dooks. Reported-by: kbuild test robot Reported-by: Ben Dooks Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 9b537997b669c42cec67893538037e8d1c83c91c Author: Yunfeng Ye Date: Tue Oct 22 16:11:18 2019 +0800 crypto: arm64/aes-neonbs - add return value of skcipher_walk_done() in __xts_crypt() A warning is found by the static code analysis tool: "Identical condition 'err', second condition is always false" Fix this by adding return value of skcipher_walk_done(). Fixes: 67cfa5d3b721 ("crypto: arm64/aes-neonbs - implement ciphertext stealing for XTS") Signed-off-by: Yunfeng Ye Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 8737481e381c6e97c1e11081faa0e41dcbccf21e Author: Joel Stanley Date: Thu Sep 26 14:54:29 2019 +0930 ARM: dts: aspeed: tacoma: Enable FMC and SPI devices Tacoma has two SPI flash devices attached to the FMC, and one on the SPI controller. Signed-off-by: Joel Stanley commit 9c44db7096e0b73c16996cda5b601ab7c9a80cdc Author: Brad Bishop Date: Wed Sep 25 08:56:10 2019 -0400 ARM: dts: aspeed: rainier: Add i2c devices Add fan controllers, regulators, temperature sensors, power supplies and regulators. Acked-by: Andrew Jeffery Signed-off-by: Brad Bishop Signed-off-by: Joel Stanley commit 0fe4e304782c810950d823d3373331003a5d7429 Author: Joel Stanley Date: Thu Aug 22 17:13:07 2019 +0930 ARM: dts: aspeed-g6: Describe FSI masters The ast2600 has two FSI masters on the APB. Signed-off-by: Joel Stanley commit 876c5d891c9d7442d2734871317bc6480cd9f80e Author: Cédric Le Goater Date: Fri Jun 22 09:09:36 2018 +0200 ARM: dts: aspeed: Add "spi-max-frequency" property Keep the FMC controller chips at a safe 50 MHz rate and use 100 MHz for the PNOR on the machines using a AST2500 SoC. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit b46aaf8a663da643109597ab073fd6076b4e6eaa Author: Andrew Jeffery Date: Wed Jul 24 17:43:11 2019 +0930 ARM: dts: aspeed: Migrate away from aspeed, g[45].* compatibles Use the SoC-specific compatible strings instead. Signed-off-by: Andrew Jeffery Acked-by: Linus Walleij Signed-off-by: Joel Stanley commit 10afc900f4f8ce4092b5110cb7018885bf12b41a Author: Alexander Filippov Date: Wed Sep 18 15:38:15 2019 +0300 ARM: dts: vesnin: Add power_green led Adds a new power_green led to show the host state. Signed-off-by: Alexander Filippov Signed-off-by: Joel Stanley commit 6dbc7d979516fce26783c454a8fabaaee52d28db Author: Eddie James Date: Thu Oct 3 17:24:14 2019 -0500 ARM: dts: aspeed: tacoma: Add gpio-key definitions Add gpio-keys for various signals on Tacoma. Signed-off-by: Eddie James Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley commit ad5d1027840d60aa555bc9113b0eeacebc76793d Author: Andrew Jeffery Date: Thu Sep 26 23:06:07 2019 +0930 ARM: dts: ast2600-evb: Add pinmux properties for enabled MACs All 2600-evb MACs use RGMII/MDIO. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit d29f8a6e42dbbecf5254e46241fe7fbf07206b4f Author: Andrew Jeffery Date: Thu Sep 26 23:06:06 2019 +0930 ARM: dts: aspeed-g6: Add pinctrl properties to MDIO nodes This way enabling the MDIO controllers automatically requests the right pinmux configuration. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 9f5a341eb96bd858ef7567f6f45a7357d86bbca9 Author: Andrew Jeffery Date: Thu Sep 26 23:06:05 2019 +0930 ARM: dts: aspeed-g6: Fix EMMC function in pinctrl dtsi The binding was updated to better reflect the intended use of the hardware and the existing function/groups for SD3 were dropped. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit a45d88725d18f611ac6ee41c710d9648b728c5b3 Author: Joel Stanley Date: Thu Sep 26 16:35:40 2019 +0930 ARM: dts: aspeed: ast2600evb: Use custom flash layout The AST2600 u-boot and kernel images have outgrown the OpenBMC layout. While BMC machines use 128MB SPI NOR chips, we only have 64MB on the EVB so use a layout that has a smaller region for the ro and rw filesystems. Reviewed-by: Cédric Le Goater Signed-off-by: Joel Stanley commit 6700acf6662c4684fbe88c0a126de6b16d734e6d Author: Cédric Le Goater Date: Wed Sep 25 14:42:30 2019 +0200 ARM: dts: ast2600-evb: Enable FMC and SPI devices Signed-off-by: Cédric Le Goater Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 8db6997f2b58dad565feb19b54984b4b6402af75 Author: Joel Stanley Date: Thu Sep 26 14:54:29 2019 +0930 ARM: dts: aspeed: tacoma: Enable FMC and SPI devices Tacoma has two SPI flash devices attached to the FMC, and one on the SPI controller. Signed-off-by: Joel Stanley commit f97fa21f48808d011aa3507ff64763a6bac06b63 Author: Cédric Le Goater Date: Wed Sep 25 14:42:28 2019 +0200 ARM: dts: aspeed: rainier: Enable FMC and SPI devices Signed-off-by: Cédric Le Goater Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 2efc118ce3c35a66ef8b74fd3118a3981b649e2e Author: Brad Bishop Date: Wed Sep 25 08:56:10 2019 -0400 ARM: dts: aspeed: rainier: Add i2c devices Add fan controllers, regulators, temperature sensors, power supplies and regulators. Acked-by: Andrew Jeffery Signed-off-by: Brad Bishop Signed-off-by: Joel Stanley commit 99e3cfa266a5100c7c5164bc453e2ff239866985 Author: Brad Bishop Date: Wed Sep 25 08:56:09 2019 -0400 ARM: dts: aspeed: rainier: Add mac devices Rainier contains two NCSI network devices. Reviewed-by: Andrew Jeffery Signed-off-by: Brad Bishop Signed-off-by: Joel Stanley commit 961216c135a881b8f81d1eb39215525d4e96783e Author: Brad Bishop Date: Wed Sep 25 08:56:07 2019 -0400 ARM: dts: aspeed: Add Rainier system Rainier is a new IBM server with POWER host processors and an AST2600 BMC. Signed-off-by: Brad Bishop Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 4caa4e302c6a43edadcfe1bc4f0effc1de03c875 Author: Brad Bishop Date: Wed Sep 25 22:32:29 2019 -0400 ARM: dts: Add 128MiB OpenBMC flash layout This is an alternate layout used by OpenBMC systems that require more space on the BMC's flash. In addition to more space for the rootfs, it supports a larger u-boot and Linux kernel FIT image. The division of space is as follows: u-boot + env: 1MB kernel/FIT: 9MB rwfs: 86MB rofs: 32MB Reviewed-by: Cédric Le Goater Signed-off-by: Brad Bishop Signed-off-by: Joel Stanley commit d52ce2beca2a00b0e49a86f3b31d08d94e388fdf Author: Chicago Duan Date: Wed Sep 4 10:16:20 2019 +0800 ARM: dts: aspeed: fp5280g2: Add LED configuration Change BMC init-ok from GPIO to LED, which needs to blink when BMC initialization is complete. Use TAB to align some lines. Signed-off-by: Chicago Duan Signed-off-by: Joel Stanley commit 606bcdde672461ba3d7ee9af54bcf7710aaacb49 Author: Eddie James Date: Fri Sep 13 11:15:53 2019 -0500 ARM: dts: aspeed: tacoma: Enable I2C busses Enable all the I2C busses on Tacoma and add the I2C slave devices that exist on the busses. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit b58135ad1ecf1aef457eeaf04c8941f4c6031d39 Author: Joel Stanley Date: Thu Aug 22 22:15:04 2019 +0930 ARM: dts: aspeed: Add Tacoma machine This is an AST2600 based BMC card for a Power9 system. Signed-off-by: Joel Stanley commit 51d5d1bf73b93479149e4fd873d2261007391925 Author: Cédric Le Goater Date: Wed Sep 25 14:42:27 2019 +0200 ARM: dts: aspeed-g6: Add FMC and SPI devices Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 12ce8bd361c72847eb7990d88df97dc0575c763a Author: Brad Bishop Date: Wed Sep 25 08:56:06 2019 -0400 ARM: dts: aspeed-g6: Add lpc devices Everything is the same as G5, except the devices have their own interrupt now. Acked-by: Andrew Jeffery Signed-off-by: Brad Bishop Signed-off-by: Joel Stanley commit 2aed40eeb446ed92ddc2e47587335459c73ad419 Author: Joel Stanley Date: Wed Oct 2 19:53:25 2019 +0930 ARM: dts: aspeed-g6: Add VUART descriptions The AST2600 has two VUART devices. Reviewed-by: Eddie James Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 9ee6d17b18804fabe8ed879e13843f755d9e59f9 Author: Joel Stanley Date: Sun Sep 15 15:56:47 2019 +0100 ARM: dts: aspeed-g6: Add i2c buses The AST2600 has 16 I2C buses each with their own global IRQ line. Signed-off-by: Joel Stanley commit 8dbcb5b709b9fbc0d6abdccc9e7803641fbff586 Author: Rashmica Gupta Date: Thu Aug 22 17:13:15 2019 +1000 ARM: dts: aspeed-g6: Add gpio devices The AST2600 has 208 normal GPIO pins and 36 1.8V GPIOs. Signed-off-by: Rashmica Gupta Signed-off-by: Joel Stanley commit 311b57f051eac4dc56a4fa6295b14e48bac79487 Author: Andrew Jeffery Date: Tue Aug 27 16:30:55 2019 +0930 ARM: dts: ast2600-evb: eMMC configuration Enable the eMMC controller and limit it to 52MHz to avoid the host controller reporting bus error conditions. Reviewed-by: Joel Stanley Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit d8d9ad83a497f78edd4016df0919a49628dcafbc Author: Andrew Jeffery Date: Thu Oct 10 12:37:24 2019 +1030 dt-bindings: clock: Add AST2600 RMII RCLK gate definitions The AST2600 has an explicit gate for the RMII RCLK for each of the four MACs. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Joel Stanley commit 5b468cc4b88073356f79cf779207d64b65a914f0 Author: Andrew Jeffery Date: Thu Oct 10 12:36:54 2019 +1030 dt-bindings: clock: Add AST2500 RMII RCLK definitions The AST2500 has an explicit gate for the RMII RCLK for each of the two MACs. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Joel Stanley commit a636f93fcdb4a516e7cba6a365645ee8429602b2 Author: Sai Prakash Ranjan Date: Thu Oct 3 12:14:49 2019 +0530 arm64: dts: qcom: msm8998: Disable coresight by default Boot failure has been reported on MSM8998 based laptop when coresight is enabled. This is most likely due to lack of firmware support for coresight on production device when compared to debug device like MTP where this issue is not observed. So disable coresight by default for MSM8998 and enable it only for MSM8998 MTP. Reported-and-tested-by: Jeffrey Hugo Fixes: 783abfa2249a ("arm64: dts: qcom: msm8998: Add Coresight support") Signed-off-by: Sai Prakash Ranjan Signed-off-by: Bjorn Andersson commit b40dd23f9a8987c8336df0a00e33f52b1f3f19ad Author: Jeffrey Hugo Date: Wed Oct 2 12:07:56 2019 -0700 arm64: dts: qcom: msm8998-clamshell: Remove retention idle state The retention idle state does not appear to be supported by the firmware present on the msm8998 laptops since the state is advertised as disabled in ACPI, and attempting to enable the state in DT is observed to result in boot hangs. Therefore, remove the state from use to address the observed issues. Reviewed-by: Amit Kucheria Fixes: 2c6d2d3a580a (arm64: dts: qcom: Add Lenovo Miix 630) Signed-off-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson commit 7f674c38a38e056bb33d1d67700410c3f3124d34 Author: Bart Van Assche Date: Tue Oct 29 16:07:09 2019 -0700 scsi: ufs: Use enum dev_cmd_type where appropriate Declare all variables that hold dev_cmd_type values as an enum instead of as an int. Cc: Yaniv Gardi Cc: Subhash Jadavani Cc: Stanley Chu Cc: Avri Altman Cc: Tomas Winkler Link: https://lore.kernel.org/r/20191029230710.211926-3-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit d0e9760de338635450c4e8ebb07bdbcfb1b56e64 Author: Bart Van Assche Date: Tue Oct 29 16:07:08 2019 -0700 scsi: ufs: Fix kernel-doc warnings Fix the following three kernel-doc warnings: drivers/scsi/ufs/ufs_bsg.c:165: warning: Function parameter or member 'hba' not described in 'ufs_bsg_remove' drivers/scsi/ufs/ufshcd.c:5789: warning: Function parameter or member 'cmd_type' not described in 'ufshcd_issue_devman_upiu_cmd' drivers/scsi/ufs/ufshcd.c:5789: warning: Excess function parameter 'msgcode' description in 'ufshcd_issue_devman_upiu_cmd' Cc: Yaniv Gardi Cc: Subhash Jadavani Cc: Stanley Chu Cc: Avri Altman Cc: Tomas Winkler Link: https://lore.kernel.org/r/20191029230710.211926-2-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit 059efd847a4097c67817782d8ff65397e369e69b Author: Bean Huo Date: Tue Oct 29 14:22:45 2019 +0000 scsi: ufs: delete redundant function ufshcd_def_desc_sizes() There is no need to call ufshcd_def_desc_sizes() in ufshcd_init(), since descriptor lengths will be checked and initialized later in ufshcd_init_desc_sizes(). Fixes: a4b0e8a4e92b1b(scsi: ufs: Factor out ufshcd_read_desc_param) Link: https://lore.kernel.org/r/BN7PR08MB5684A3ACE214C3D4792CE729DB610@BN7PR08MB5684.namprd08.prod.outlook.com Signed-off-by: Bean Huo Acked-by: Avri Altman Reviewed-by: Can Guo Signed-off-by: Martin K. Petersen commit e7011c5d17a74e9aa58f014799e044f342582284 Merge: 19308a412ec5 55d7004299eb Author: Paolo Bonzini Date: Fri Nov 1 00:35:55 2019 +0100 Merge tag 'kvm-ppc-next-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD KVM PPC update for 5.5 * Add capability to tell userspace whether we can single-step the guest. * Improve the allocation of XIVE virtual processor IDs, to reduce the risk of running out of IDs when running many VMs on POWER9. * Rewrite interrupt synthesis code to deliver interrupts in virtual mode when appropriate. * Minor cleanups and improvements. commit 268a2d60013049cfd9a0aada77284aa6ea8ad26a Author: Jiaxun Yang Date: Sun Oct 20 22:43:13 2019 +0800 MIPS: Loongson64: Rename CPU TYPES CPU_LOONGSON2 -> CPU_LOONGSON2EF CPU_LOONGSON3 -> CPU_LOONGSON64 As newer loongson-2 products (2G/2H/2K1000) can share kernel implementation with loongson-3 while 2E/2F are less similar with other LOONGSON64 products. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhc@lemote.com Cc: paul.burton@mips.com commit 52340b82cf1a9c8d466b6e36a0881bc44174b969 Author: Joe Perches Date: Thu Oct 31 11:23:37 2019 -0700 hp100: Move 100BaseVG AnyLAN driver to staging 100BaseVG AnyLAN hasn't been useful since 1996 or so and even then didn't sell many devices. It's unlikely any are still in use. Move the driver to staging with the intent of removing it altogether one day. Signed-off-by: Joe Perches Acked-by: Jaroslav Kysela Signed-off-by: David S. Miller commit 44715423dd018e01ff31b73b130d362e95a6c59c Merge: e43ea83cc786 6a68749dbd77 Author: David S. Miller Date: Thu Oct 31 14:48:31 2019 -0700 Merge branch 'bnxt_en-Updates-for-net-next' Michael Chan says: ==================== bnxt_en: Updates for net-next. This patch series adds TC Flower tunnel decap and rewrite actions in the first 4 patches. The next 3 patches integrates the recently added error recovery with the RDMA driver by calling the proper hooks to stop and start. v2: Fix pointer alignment issue in patch #1. ==================== Signed-off-by: David S. Miller commit 6a68749dbd777b832e1d84265bd6d8b39d1843ac Author: Pavan Chebbi Date: Thu Oct 31 01:07:51 2019 -0400 bnxt_en: Call bnxt_ulp_stop()/bnxt_ulp_start() during suspend/resume. Inform the RDMA driver to stop/start during suspend/resume. The RDMA driver needs to stop and start just like error recovery. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f3a6d206c25ad9490f3a3c6d62baba9504227a75 Author: Vasundhara Volam Date: Thu Oct 31 01:07:50 2019 -0400 bnxt_en: Call bnxt_ulp_stop()/bnxt_ulp_start() during error recovery. Notify the RDMA driver by calling the bnxt_ulp_stop()/bnxt_ulp_start() hooks during error recovery. The current ULP IRQ start/stop sequence in error recovery (which is insufficient) is replaced with the full reset sequence when we call bnxt_ulp_stop()/bnxt_ulp_start(). Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit aa46dffff452f7c6d907c4e6a0062e2c53a87fc0 Author: Vasundhara Volam Date: Thu Oct 31 01:07:49 2019 -0400 bnxt_en: Improve bnxt_ulp_stop()/bnxt_ulp_start() call sequence. We call bnxt_ulp_stop() to notify the RDMA driver that some error or imminent reset is about to happen. After that we always call some variants of bnxt_close(). In the next patch, we will integrate the recently added error recovery with the RDMA driver. In response to ulp_stop, the RDMA driver may free MSIX vectors and that will also trigger bnxt_close(). To avoid bnxt_close() from being called twice, we set a new flag after ulp_stop is called. If the RDMA driver frees MSIX vectors while the new flag is set, we will not call bnxt_close(), knowing that it will happen in due course. With this change, we must make sure that the bnxt_close() call after ulp_stop will reset IRQ. Modify bnxt_reset_task() accordingly if we call ulp_stop. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 627c89d00fb969f9b3b4f3156716149631d2796c Author: Sriharsha Basavapatna Date: Thu Oct 31 01:07:48 2019 -0400 bnxt_en: flow_offload: offload tunnel decap rules via indirect callbacks The decap (VXLAN tunnel) flow rules are not getting offloaded with upstream kernel. This is because TC block callback infrastructure has been updated to use indirect callbacks to get offloaded rules from other higher level devices (such as tunnels), instead of ndo_setup_tc(). Since the decap rules are applied to the tunnel devices (e.g, vxlan_sys), the driver should register for indirect TC callback with tunnel devices to get the rules for offloading. This patch updates the driver to register and process indirect TC block callbacks from VXLAN tunnels. Signed-off-by: Sriharsha Basavapatna Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 9b9eb518e3383d94c8b81ff403d524f2cee5b6b9 Author: Somnath Kotur Date: Thu Oct 31 01:07:47 2019 -0400 bnxt_en: Add support for NAT(L3/L4 rewrite) Provides support for modifying L3/L4 Header parameters to support NAT. Sets the appropriate fields/bits in cfa_flow_alloc cmd. Sample cmd for offloading an IPv4 flow with SNAT: ovs-ofctl add-flow ovsbr0 "ip,nw_src=192.168.201.44 \ actions=mod_nw_src:203.31.220.144,output:p7p1" Replace 'nw_src' with 'nw_dst' in above cmd for DNAT with IPv4 Sample cmd for offloading an IPv4 flow with SNAPT: ovs-ofctl add-flow ovsbr0 "ip,nw_src=192.168.201.44 \ actions=mod_nw_src:203.31.220.144, mod_tp_src:6789,output:p7p1" Similar to DNAT, replace 'tp_src' with 'tp_dst' for offloading flow with DNAPT Sample cmd for offloading an IPv6 flow with SNAT: ovs-ofctl add-flow ovsbr0 "ipv6, ipv6_src=2001:5c0:9168::2/64 \ actions=load:0x1->NXM_NX_IPV6_SRC[0..63], \ load:0x20010db801920000->NXM_NX_IPV6_SRC[64..127],output:p7p1" Replace 'SRC' with DST' above for IPv6 DNAT Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 08f8280e8788202a67a359952cd436707f8789bd Author: Somnath Kotur Date: Thu Oct 31 01:07:46 2019 -0400 bnxt: Avoid logging an unnecessary message when a flow can't be offloaded For every single case where bnxt_tc_can_offload() can fail, we are logging a user friendly descriptive message anyway, but because of the path it would take in case of failure, another redundant error message would get logged. Just freeing the node and returning from the point of failure should suffice. Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 90f906243bf633f07757467506dfab3422b43ca2 Author: Venkat Duvvuru Date: Thu Oct 31 01:07:45 2019 -0400 bnxt_en: Add support for L2 rewrite This patch adds support for packet edit offload of L2 fields (src mac & dst mac, also referred as L2 rewrite). Only when the mask is fully exact match for a field, the command is sent down to the adapter to offload such a flow. Otherwise, an error is returned. v2: Fix pointer alignment issue in bnxt_fill_l2_rewrite_fields() [MChan] Signed-off-by: Venkat Duvvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit e43ea83cc78604b4eb02d5917f50a8b8eb6c0c85 Merge: 5c26c1d6dffa fcee85f19f39 Author: David S. Miller Date: Thu Oct 31 14:26:38 2019 -0700 Merge branch 'net-dsa-replace-routing-tables-with-a-list' Vivien Didelot says: ==================== net: dsa: replace routing tables with a list This branch gets rid of the ds->rtable static arrays in favor of a single dst->rtable list. This allows us to move away from the DSA_MAX_SWITCHES limitation and simplify the switch fabric setup. Changes in v2: - fix the reverse christmas for David ==================== Signed-off-by: David S. Miller commit fcee85f19f39d1b98b2674c2a9e57348fe803252 Author: Vivien Didelot Date: Wed Oct 30 22:09:19 2019 -0400 net: dsa: tag_8021q: clarify index limitation Now that there's no restriction from the DSA core side regarding the switch IDs and port numbers, only tag_8021q which is currently reserving 3 bits for the switch ID and 4 bits for the port number, has limitation for these values. Update their descriptions to reflect that. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller commit 27d4d19d7c82b3fd9d09ac9e2cd73c70ed4ca4b2 Author: Vivien Didelot Date: Wed Oct 30 22:09:18 2019 -0400 net: dsa: remove limitation of switch index value Because there is no static array describing the links between switches anymore, we have no reason to force a limitation of the index value set by the device tree. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller commit 8e5cb84c67e085ad4d8005dcecba3201f2b54504 Author: Vivien Didelot Date: Wed Oct 30 22:09:17 2019 -0400 net: dsa: remove tree functions related to switches The DSA fabric setup code has been simplified a lot so get rid of the dsa_tree_remove_switch, dsa_tree_add_switch and dsa_switch_add helpers, and keep the code simple with only the dsa_switch_probe and dsa_switch_remove functions. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller commit 9c8ad1ab66b577526a4c89e4a222e0fac431a2d6 Author: Vivien Didelot Date: Wed Oct 30 22:09:16 2019 -0400 net: dsa: remove the dst->ds array Now that the DSA ports are listed in the switch fabric, there is no need to store the dsa_switch structures from the drivers in the fabric anymore. So get rid of the dst->ds static array. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller commit 3774ecdb8ca201af770288d57997dbf6445eb3c8 Author: Vivien Didelot Date: Wed Oct 30 22:09:15 2019 -0400 net: dsa: remove switch routing table setup code The dsa_switch structure has no routing table specific data to setup, so the switch fabric can directly walk its ports and initialize its routing table from them. This allows us to remove the dsa_switch_setup_routing_table function. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller commit 96252b8e05326df072cd321159878aa4725c5bd4 Author: Vivien Didelot Date: Wed Oct 30 22:09:14 2019 -0400 net: dsa: remove ds->rtable Drivers do not use the ds->rtable static arrays anymore, get rid of it. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller commit c5f51765a1f60b701840544faf3ca63204b8dc3c Author: Vivien Didelot Date: Wed Oct 30 22:09:13 2019 -0400 net: dsa: list DSA links in the fabric Implement a new list of DSA links in the switch fabric itself, to provide an alterative to the ds->rtable static arrays. At the same time, provide a new dsa_routing_port() helper to abstract the usage of ds->rtable in drivers. If there's no port to reach a given device, return the first invalid port, ds->num_ports. This avoids potential signedness errors or the need to define special values. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller commit 5c26c1d6dffaae126b98ee27feba6e8042cc619d Merge: e3b205b1fdf0 ecc5fe7d2b3d Author: David S. Miller Date: Thu Oct 31 14:19:45 2019 -0700 Merge branch 'dpaa2-eth-add-MAC-PHY-support-through-phylink' Ioana Ciornei says: ==================== dpaa2-eth: add MAC/PHY support through phylink The dpaa2-eth driver now has support for connecting to its associated PHY device found through standard OF bindings. The PHY interraction is handled by PHYLINK and even though, at the moment, only RGMII_* phy modes are supported by the driver, this is just the first step into adding the necessary changes to support the entire spectrum of capabilities. This comes after feedback on the initial DPAA2 MAC RFC submitted here: https://lwn.net/Articles/791182/ The notable change is that now, the DPMAC is not a separate driver, and communication between the DPMAC and DPNI no longer happens through firmware. Rather, the DPMAC is now a set of API functions that other net_device drivers (DPNI, DPSW, etc) can use for PHY management. The change is incremental, because the DPAA2 architecture has many modes of connecting net devices in hardware loopback (for example DPNI to DPNI). Those operating modes do not have a DPMAC and phylink instance. The documentation patch provides a more complete view of the software architecture and the current implementation. Changes in v2: - added patch 1/5 in order to fix module build - use -ENOTCONN as a proper return error of dprc_get_connection() - move the locks to rtnl outside of dpaa2_eth_[dis]connect_mac functions - remove setting supported/advertised from .validate() Changes in v3: - remove an unused variable Changes in v4: - use ERR_PTR instead of plain NULL ==================== Signed-off-by: David S. Miller commit ecc5fe7d2b3db2806f53cc748646d3be22e07d13 Author: Ioana Ciornei Date: Thu Oct 31 01:18:32 2019 +0200 net: documentation: add docs for MAC/PHY support in DPAA2 Add documentation file for the MAC/PHY support in the DPAA2 architecture. This describes the architecture and implementation of the interface between phylink and a DPAA2 network driver. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 71947923089353f23f4f210864903c4dcf2c1696 Author: Ioana Ciornei Date: Thu Oct 31 01:18:31 2019 +0200 dpaa2-eth: add MAC/PHY support through phylink The dpaa2-eth driver now has support for connecting to its associated PHY device found through standard OF bindings. This happens when the DPNI object (that the driver probes on) gets connected to a DPMAC. When that happens, the device tree is looked up by the DPMAC ID, and the associated PHY bindings are found. The old logic of handling the net device's link state by hand still needs to be kept, as the DPNI can be connected to other devices on the bus than a DPMAC: other DPNI, DPSW ports, etc. This logic is only engaged when there is no DPMAC (and therefore no phylink instance) attached. The MC firmware support multiple type of DPMAC links: TYPE_FIXED, TYPE_PHY. The TYPE_FIXED mode does not require any DPMAC management from Linux side, and as such, the driver will not handle such a DPMAC. Although PHYLINK typically handles SFP cages and in-band AN modes, for the moment the driver only supports the RGMII interfaces found on the LX2160A. Support for other modes will come later. Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f5c3fffa4c18783edc3954b7b4c6e0893345c478 Author: Ioana Ciornei Date: Thu Oct 31 01:18:30 2019 +0200 dpaa2-eth: update the TX frame queues on DPNI_IRQ_EVENT_ENDPOINT_CHANGED Currently the function is called at every link up event, although the FQID values will only change when the DPNI is disconnected from the current object and reconnected to a different one. The patch also avoids the forward declaration of update_tx_fqids. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 1ac210d128ef6e92698dd3aa4e2e03e831bc9906 Author: Ioana Ciornei Date: Thu Oct 31 01:18:29 2019 +0200 bus: fsl-mc: add the fsl_mc_get_endpoint function Using the newly added fsl_mc_get_endpoint function a fsl-mc driver can find its associated endpoint (another object at the other link of a MC firmware link). The API will be used in the following patch in order to discover the connected DPMAC object of a DPNI. Also, the fsl_mc_device_lookup function is made available to the entire fsl-mc bus driver and not just for the dprc driver. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 6fff8c010785b0cb46de08eda679739d3cb658fa Author: Ioana Ciornei Date: Thu Oct 31 01:18:28 2019 +0200 bus: fsl-mc: export device types present on the bus Export all device types present on the fsl-mc bus in order to be able to actually use the is_fsl_mc_bus_*() functions from drivers on the bus. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit e3b205b1fdf0daed64e24737bd0dff3379a09ebb Merge: d170eb69d40e cd846bef2d74 Author: David S. Miller Date: Thu Oct 31 14:14:53 2019 -0700 Merge branch 'sfc-Add-XDP-support' Charles McLachlan says: ==================== sfc: Add XDP support Supply the XDP callbacks in netdevice ops that enable lower level processing of XDP frames. Changes in v4: - Handle the failure to send some frames in efx_xdp_tx_buffers() properly. Changes in v3: - Fix a BUG_ON when trying to allocate piobufs to xdp queues. - Add a missed trace_xdp_exception. Changes in v2: - Use of xdp_return_frame_rx_napi() in tx.c - Addition of xdp_rxq_info_valid and xdp_rxq_info_failed to track when xdp_rxq_info failures occur. - Renaming of rc to err and more use of unlikely(). - Cut some duplicated code and fix an array overrun. - Actually increment n_rx_xdp_tx when packets are transmitted. ==================== Signed-off-by: David S. Miller commit cd846bef2d7464b58db01ecd2c6cb20652c5a7a8 Author: Charles McLachlan Date: Thu Oct 31 10:24:23 2019 +0000 sfc: add XDP counters to ethtool stats Count XDP packet drops, error drops, transmissions and redirects and expose these counters via the ethtool stats command. Signed-off-by: Charles McLachlan Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit dfe44c1f52eed6020df74e83d21d617308164a68 Author: Charles McLachlan Date: Thu Oct 31 10:24:12 2019 +0000 sfc: handle XDP_TX outcomes of XDP eBPF programs Provide an ndo_xdp_xmit function that uses the XDP tx queue for this CPU to send the packet. Signed-off-by: Charles McLachlan Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 3990a8fffbdad5765f47ea593f9de66c91762059 Author: Charles McLachlan Date: Thu Oct 31 10:23:49 2019 +0000 sfc: allocate channels for XDP tx queues Each CPU needs access to its own queue to allow uncontested transmission of XDP_TX packets. This means we need to allocate (up front) enough channels ("xdp transmit channels") to provide at least one extra tx queue per CPU. These tx queues should not do TSO. Signed-off-by: Charles McLachlan Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit e45a4fed9d006480a5cc2312d5d4f7988a3a655e Author: Charles McLachlan Date: Thu Oct 31 10:23:37 2019 +0000 sfc: Enable setting of xdp_prog Provide an ndo_bpf function to efx_netdev_ops that allows setting and querying of xdp programs on an interface. Also check that the MTU size isn't too big when setting a program or when the MTU is explicitly set. Signed-off-by: Charles McLachlan Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit eb9a36be7f3ec414700af9a616f035eda1f1e63e Author: Charles McLachlan Date: Thu Oct 31 10:23:23 2019 +0000 sfc: perform XDP processing on received packets Adds a field to hold an attached xdp_prog, but never populates it (see following patch). Also, XDP_TX support is deferred to a later patch in the series. Track failures of xdp_rxq_info_reg() via per-queue xdp_rxq_info_valid flags and a per-nic xdp_rxq_info_failed flag. The per-queue flags are needed to prevent attempts to xdp_rxq_info_unreg() structs that failed to register. Possibly the API could be changed in the future to avoid the need for these flags. Signed-off-by: Charles McLachlan Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 8c42350116fe4ad23a5a813eba367355cfe7cff5 Author: Charles McLachlan Date: Thu Oct 31 10:23:10 2019 +0000 sfc: support encapsulation of xdp_frames in efx_tx_buffer Add a field to efx_tx_buffer so that we can track xdp_frames. Add a flag so that buffers that contain xdp_frames can be identified and passed to xdp_return_frame. Signed-off-by: Charles McLachlan Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit d170eb69d40e9e5fccb8d57edbbacb97427dcf1c Author: Nathan Chancellor Date: Wed Oct 30 09:01:52 2019 -0700 mlxsw: Fix 64-bit division in mlxsw_sp_sb_prs_init When building for 32-bit ARM, there is a link time error because of a 64-bit division: ld.lld: error: undefined symbol: __aeabi_uldivmod >>> referenced by spectrum_buffers.c >>> net/ethernet/mellanox/mlxsw/spectrum_buffers.o:(mlxsw_sp_buffers_init) in archive drivers/built-in.a >>> did you mean: __aeabi_uidivmod >>> defined in: arch/arm/lib/lib.a(lib1funcs.o Avoid this by using div_u64, which is designed to avoid this problem. Fixes: bc9f6e94bcb5 ("mlxsw: spectrum_buffers: Calculate the size of the main pool") Signed-off-by: Nathan Chancellor Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit 1629224324b6cab6f7f96e839c9b57b74cfd8349 Author: Matthew Auld Date: Wed Oct 30 17:33:20 2019 +0000 drm/i915/lmem: add the fake lmem region Intended for upstream testing so that we can still exercise the LMEM plumbing and !i915_ggtt_has_aperture paths. Smoke tested on Skull Canyon device. This works by allocating an intel_memory_region for a reserved portion of system memory, which we treat like LMEM. For the LMEMBAR we steal the aperture and 1:1 it map to the stolen region. To enable simply set the i915 modparam fake_lmem_start= on the kernel cmdline with the start of reserved region(see memmap=). The size of the region we can use is determined by the size of the mappable aperture, so the size of reserved region should be >= mappable_end. For now we only enable for the selftests. Depends on CONFIG_DRM_I915_UNSTABLE being enabled. eg. memmap=2G$16G i915.fake_lmem_start=0x400000000 v2: make fake_lmem_start an i915 modparam Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue Cc: Arkadiusz Hiler Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191030173320.8850-1-matthew.auld@intel.com commit 72919b6b3b3298a0c083cd3bf2748ee4dd31db58 Merge: 4a956bd22b88 8bf70b68847a Author: David S. Miller Date: Thu Oct 31 12:32:59 2019 -0700 Merge branch 's390-next' Julian Wiedmann says: ==================== s390/qeth: updates 2019-10-31 please apply the following series of spooky qeth updates for net-next. The first two patches add support for an enhanced TX doorbell, which enables us to do more xmit_more-based bulking. Note that this requires one patch for the s390/qdio base layer, which has been graciously acked by Heiko to go through your tree. The remaining patches are just the usual minor cleanups/improvements. ==================== Signed-off-by: David S. Miller commit 8bf70b68847a1960e50ee8639580950b43b0e185 Author: Julian Wiedmann Date: Thu Oct 31 13:42:21 2019 +0100 s390/qeth: don't cache MAC addresses for multicast IPs Instead of storing the multicast-mapped MAC address in an IP address object, just calculate the MAC address when actually building a cmd for the IP address. While at it, also clean up some rather verbose copying of IP addresses. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 1b40d4b2fbd626cbb789184d993d7452892fba3f Author: Julian Wiedmann Date: Thu Oct 31 13:42:20 2019 +0100 s390/qeth: use helpers for IP address hashing Replace our custom implementations with the stack's version of IP address hashing. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 04fa55fe07d15587b00ef1269fcbf793a2e45739 Author: Julian Wiedmann Date: Thu Oct 31 13:42:19 2019 +0100 s390/qeth: don't set card state in qeth_qdio_clear_card() Any change to the card state should only be driven by qeth_l?_set_online() and qeth_l?_stop_card(). qeth_qdio_clear_card() currently also gets called from (a) qeth_core_shutdown(), where we haven't walked through the whole teardown sequence. So changing the state to DOWN is not accurate. (b) qeth_core_hardsetup_card(), which is only called while the card is still in DOWN state. No change in behaviour here. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 9897d583b01525c6fb5dcaaa87263e7f395c905c Author: Julian Wiedmann Date: Thu Oct 31 13:42:18 2019 +0100 s390/qeth: consolidate some duplicated HW cmd code When setting a device online, both subdrivers have the same code to program the HW trap and Isolation mode. Move that code into a single place. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit f9ce416ac79dce142fefd24422c9bf41b60fc6cc Author: Julian Wiedmann Date: Thu Oct 31 13:42:17 2019 +0100 s390/qeth: keep IRQ disabled until NAPI is really done When napi_complete_done() returns false, the NAPI instance is still active and we can keep the IRQ disabled a little longer. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit ec2b559d6849096e111056fb79015d7a60f53e33 Author: Julian Wiedmann Date: Thu Oct 31 13:42:16 2019 +0100 s390/qeth: use QDIO_BUFNR() qdio.h recently gained a new helper macro that handles wrap-around on a QDIO queue, consistently use it across all of qeth. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 8b664cd127a1e3777e23c8aaa96ba52ef741bb55 Author: Julian Wiedmann Date: Thu Oct 31 13:42:15 2019 +0100 s390/qeth: use IQD Multi-Write For IQD devices with Multi-Write support, we can defer the queue-flush further and transmit multiple IO buffers with a single TX doorbell. The same-target restriction still applies. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit b7f143d093e10cd39ae4a22d2f57ac853017f49e Author: Julian Wiedmann Date: Thu Oct 31 13:42:14 2019 +0100 s390/qdio: implement IQD Multi-Write This allows IQD drivers to send out multiple SBALs with a single SIGA instruction. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Acked-by: Heiko Carstens Signed-off-by: David S. Miller commit 130f4caf145c3562108b245a576db30b916199d2 Author: John Garry Date: Wed Oct 16 18:19:52 2019 +0800 libata: Ensure ata_port probe has completed before detach With CONFIG_DEBUG_TEST_DRIVER_REMOVE set, we may find the following WARN: [ 23.452574] ------------[ cut here ]------------ [ 23.457190] WARNING: CPU: 59 PID: 1 at drivers/ata/libata-core.c:6676 ata_host_detach+0x15c/0x168 [ 23.466047] Modules linked in: [ 23.469092] CPU: 59 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc1-00010-g5b83fd27752b-dirty #296 [ 23.477776] Hardware name: Huawei D06 /D06, BIOS Hisilicon D06 UEFI RC0 - V1.16.01 03/15/2019 [ 23.486286] pstate: a0c00009 (NzCv daif +PAN +UAO) [ 23.491065] pc : ata_host_detach+0x15c/0x168 [ 23.495322] lr : ata_host_detach+0x88/0x168 [ 23.499491] sp : ffff800011cabb50 [ 23.502792] x29: ffff800011cabb50 x28: 0000000000000007 [ 23.508091] x27: ffff80001137f068 x26: ffff8000112c0c28 [ 23.513390] x25: 0000000000003848 x24: ffff0023ea185300 [ 23.518689] x23: 0000000000000001 x22: 00000000000014c0 [ 23.523987] x21: 0000000000013740 x20: ffff0023bdc20000 [ 23.529286] x19: 0000000000000000 x18: 0000000000000004 [ 23.534584] x17: 0000000000000001 x16: 00000000000000f0 [ 23.539883] x15: ffff0023eac13790 x14: ffff0023eb76c408 [ 23.545181] x13: 0000000000000000 x12: ffff0023eac13790 [ 23.550480] x11: ffff0023eb76c228 x10: 0000000000000000 [ 23.555779] x9 : ffff0023eac13798 x8 : 0000000040000000 [ 23.561077] x7 : 0000000000000002 x6 : 0000000000000001 [ 23.566376] x5 : 0000000000000002 x4 : 0000000000000000 [ 23.571674] x3 : ffff0023bf08a0bc x2 : 0000000000000000 [ 23.576972] x1 : 3099674201f72700 x0 : 0000000000400284 [ 23.582272] Call trace: [ 23.584706] ata_host_detach+0x15c/0x168 [ 23.588616] ata_pci_remove_one+0x10/0x18 [ 23.592615] ahci_remove_one+0x20/0x40 [ 23.596356] pci_device_remove+0x3c/0xe0 [ 23.600267] really_probe+0xdc/0x3e0 [ 23.603830] driver_probe_device+0x58/0x100 [ 23.608000] device_driver_attach+0x6c/0x90 [ 23.612169] __driver_attach+0x84/0xc8 [ 23.615908] bus_for_each_dev+0x74/0xc8 [ 23.619730] driver_attach+0x20/0x28 [ 23.623292] bus_add_driver+0x148/0x1f0 [ 23.627115] driver_register+0x60/0x110 [ 23.630938] __pci_register_driver+0x40/0x48 [ 23.635199] ahci_pci_driver_init+0x20/0x28 [ 23.639372] do_one_initcall+0x5c/0x1b0 [ 23.643199] kernel_init_freeable+0x1a4/0x24c [ 23.647546] kernel_init+0x10/0x108 [ 23.651023] ret_from_fork+0x10/0x18 [ 23.654590] ---[ end trace 634a14b675b71c13 ]--- With KASAN also enabled, we may also get many use-after-free reports. The issue is that when CONFIG_DEBUG_TEST_DRIVER_REMOVE is set, we may attempt to detach the ata_port before it has been probed. This is because the ata_ports are async probed, meaning that there is no guarantee that the ata_port has probed prior to detach. When the ata_port does probe in this scenario, we get all sorts of issues as the detach may have already happened. Fix by ensuring synchronisation with async_synchronize_full(). We could alternatively use the cookie returned from the ata_port probe async_schedule() call, but that means managing the cookie, so more complicated. Signed-off-by: John Garry Signed-off-by: Jens Axboe commit 4a956bd22b88bf4ceffc734d73607575ac72ba60 Merge: 2bd7c3e1ab30 e06eea555b87 Author: David S. Miller Date: Thu Oct 31 12:13:34 2019 -0700 Merge branch 'DPAA-Ethernet-changes' Madalin Bucur says: ==================== DPAA Ethernet changes v2: remove excess braces Here are some more changes for the DPAA 1.x area. In summary, these changes use pages for the receive buffers and for the scatter-gather table fed to the HW on the Tx path, perform a bit of cleanup in some convoluted parts of the code, add some minor fixes related to DMA (un)mapping sequencing for a not so common scenario, add a device link that removes the interfaces when the QMan portal in use by them is removed. ==================== Signed-off-by: David S. Miller commit e06eea555b878f2c95b498aa1c485250ad30c960 Author: Madalin Bucur Date: Thu Oct 31 16:37:59 2019 +0200 dpaa_eth: register a device link for the qman portal used Before this change, unbinding the QMan portals did not trigger a corresponding unbinding of the dpaa_eth making use of it; the first QMan portal related operation issued afterwards crashed the kernel. The device link ensures the dpaa_eth dependency upon the qman portal used is honoured at the QMan portal removal. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit a2d00f3db73dc4f6f6afcc95c1db809ea9019306 Author: Madalin Bucur Date: Thu Oct 31 16:37:58 2019 +0200 soc: fsl: qbman: allow registering a device link for the portal user Introduce the API required to make sure that the devices that use the QMan portal are unbound when the portal is unbound. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit e414696d49521b9ceb7734e037d5aa18ef92d8a3 Author: Madalin Bucur Date: Thu Oct 31 16:37:57 2019 +0200 dpaa_eth: extend delays in ndo_stop Make sure all the frames that are in flight have time to be processed before the interface is completely brought down. Add a missing delay for the Rx path. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 1f722e19a2648c4310d6f3443558549edaca4081 Author: Madalin Bucur Date: Thu Oct 31 16:37:56 2019 +0200 dpaa_eth: remove netdev_err() for user errors User reports that an application making an (incorrect) call to restart AN on a fixed link DPAA interface triggers an error in the kernel log while the returned EINVAL should be enough. Reported-by: Joakim Tjernlund Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 46e93e5443a7adb66d7503f3e32a0cc3bf5b4d3e Author: Madalin Bucur Date: Thu Oct 31 16:37:55 2019 +0200 dpaa_eth: add dropped frames to percpu ethtool stats Prior to this change, the frames dropped on receive or transmit were not displayed in the ethtool statistics, leaving the dropped frames unaccounted for. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 84d06c606ca4726d0c1e8f2eecacfafed8aec3c5 Author: Madalin Bucur Date: Thu Oct 31 16:37:54 2019 +0200 dpaa_eth: use a page to store the SGT Use a page to store the scatter gather table on the transmit path. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 2388ba36e94594406a755aceafc5983c289e68bf Author: Madalin Bucur Date: Thu Oct 31 16:37:53 2019 +0200 dpaa_eth: cleanup skb_to_contig_fd() Remove cast, align variable name, simplify DMA map size computation. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 7689d82c4585cf2047801b36f9a78410c8237a25 Author: Madalin Bucur Date: Thu Oct 31 16:37:52 2019 +0200 dpaa_eth: use fd information in dpaa_cleanup_tx_fd() Instead of reading skb fields, use information from the DPAA frame descriptor. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit ae1512fb745f60d35de4e2140df7b4b2e3497abb Author: Madalin Bucur Date: Thu Oct 31 16:37:51 2019 +0200 dpaa_eth: simplify variables used in dpaa_cleanup_tx_fd() Avoid casts and repeated conversions. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 9a4f4f3a894ff4487f5597b7aabba9432b238292 Author: Madalin Bucur Date: Thu Oct 31 16:37:50 2019 +0200 dpaa_eth: avoid timestamp read on error paths The dpaa_cleanup_tx_fd() function is called by the frame transmit confirmation callback but also on several error paths. This function is reading the transmit timestamp value. Avoid reading an invalid timestamp value on the error paths. Fixes: 4664856e9ca2 ("dpaa_eth: add support for hardware timestamping") Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit c70fd3182caef014e6c628b412f81aa57a3ef9e4 Author: Madalin Bucur Date: Thu Oct 31 16:37:49 2019 +0200 dpaa_eth: perform DMA unmapping before read DMA unmapping is required before accessing the HW provided timestamping information. Fixes: 4664856e9ca2 ("dpaa_eth: add support for hardware timestamping") Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 8151ee88bad568f0c8284d913310473f3b95945d Author: Madalin Bucur Date: Thu Oct 31 16:37:48 2019 +0200 dpaa_eth: use page backed rx buffers Change the buffers used for reception from netdev_frags to pages. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit f07f30042f8e0f7e67c5bf573e764a846ca9e8b5 Author: Madalin Bucur Date: Thu Oct 31 16:37:47 2019 +0200 dpaa_eth: use only one buffer pool per interface Currently the DPAA Ethernet driver is using three buffer pools for each interface, with three different sizes for the buffers provided for the FMan reception path. This patch reduces the number of buffer pools to one per interface. This change is in preparation of another, that will be switching from netdev_frags to page backed buffers for the receive path. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 2bd7c3e1ab308223a44642b54cb79b37ae18c32a Merge: 796977443018 39edaf24f819 Author: David S. Miller Date: Thu Oct 31 12:03:29 2019 -0700 Merge branch 'net-hns3-add-some-optimizations-and-cleanups' Huazhong Tan says: ==================== net: hns3: add some optimizations and cleanups This series adds some code optimizations and cleanups for the HNS3 ethernet driver. [patch 1/9] dumps some debug information when reset fail. [patch 2/9] dumps some struct netdev_queue information when TX timeout. [patch 3/9] cleanups some magic numbers. [patch 4/9] cleanups some coding style issue. [patch 5/9] fixes a compiler warning. [patch 6/9] optimizes some local variable initialization. [patch 7/9] modifies some comments. [patch 8/9] cleanups some print format warnings. [patch 9/9] cleanups byte order issue. ==================== Signed-off-by: David S. Miller commit 39edaf24f8195e94a07b6fc95a7337f12522e8e9 Author: Guojia Liao Date: Thu Oct 31 19:23:24 2019 +0800 net: hns3: cleanup byte order issues when printed Though the hip08 and the IMP(Intelligent Management Processor) have the same byte order right now, it is better to convert __be or __le variable into the CPU's byte order before print. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit adcf738b804b3cfd5a72d9975e92d84053fd394f Author: Guojia Liao Date: Thu Oct 31 19:23:23 2019 +0800 net: hns3: cleanup some print format warning Using '%d' for printing type unsigned int or '%u' for type int would cause static tools to give false warnings, so this patch cleanups this warning by using the suitable format specifier of the type of variable. BTW, modifies the type of some variables and macro to synchronize with their usage. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 9e69045654ec12d11254ffc31860b3ced441ba65 Author: Guangbin Huang Date: Thu Oct 31 19:23:22 2019 +0800 net: hns3: add or modify some comments This patch makes the comment for macro HCLGE_MBX_GET_VF_FLR_STATUS more correct, and adds comments in some place to make the code more readable. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0bfdf2868cd511e2ceff983fe66a508b0d03d8c5 Author: Guangbin Huang Date: Thu Oct 31 19:23:21 2019 +0800 net: hns3: optimize local variable initialization The variable tx_ring is unnecessary to be initialized as it will be set before used, and the variable rst_cnt is better to be initialized when declaration for simplification. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit e4b806edfabd43853d365a9fcaf238cf10c3c4ab Author: Guojia Liao Date: Thu Oct 31 19:23:20 2019 +0800 net: hns3: cleanup a format-truncation warning In hns3_nic_init_irq(), when '*_int_idx' has more than 9 digits and the length of netdev's name is IFNAMSIZ, the total length of final name will be bigger the HNAE3_INT_NAME_LEN - 1, even though '*_int_idx' will never have such large value, but the compiler gives a format-truncation warning for this case. So this patch just enlarges the length to avoid this warning. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit db4d3d554eb53cacb3ce4defe294f19a548a1034 Author: Guangbin Huang Date: Thu Oct 31 19:23:19 2019 +0800 net: hns3: cleanup some coding style issues To unify code style and make code simpler, this patch modifies some code, deletes unnecessary blank lines and {}, changes location of code, and so on. No functional change. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d6ad7c5306251f6e7f82e46118b8c13c08cebf7d Author: Guojia Liao Date: Thu Oct 31 19:23:18 2019 +0800 net: hns3: cleanup some magic numbers To make the code more readable, this patch replaces some magic numbers with macro or sizeof operation. Also uses macro lower_32_bits and upper_32_bits to get bits 0-31 and 32-63 of a number, instead of using type conversion and '>>' operation. No functional change. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 647522a5ef6401dcdb8ec417421e43fb21910167 Author: Yunsheng Lin Date: Thu Oct 31 19:23:17 2019 +0800 net: hns3: add struct netdev_queue debug info for TX timeout When there is a TX timeout, we can tell if the driver or stack has stopped the queue by looking at state field, and when has the last packet transmited by looking at trans_start field. So this patch prints these two field in the hns3_get_tx_timeo_queue_info(). Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 3d77d0cb054cbc8d9171ebc7f6b0c33445b2a94d Author: Huazhong Tan Date: Thu Oct 31 19:23:16 2019 +0800 net: hns3: dump some debug information when reset fail When reset fails, there is some information that will help for finding out why does reset fail. and removes an unused core_rst_cnt field in struct hclge_rst_stats. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 11f552e21755cb6f804572243a1502b6bbd008dd Author: Michael Guralnik Date: Mon Jun 10 15:21:24 2019 +0300 IB/mlx5: Test write combining support Linux can run in all sorts of physical machines and VMs where write combining may or may not be supported. Currently there is no way to reliably tell if the system supports WC, or not. The driver uses WC to optimize posting work to the HCA, and getting this wrong in either direction can cause a significant performance loss. Add a test in mlx5_ib initialization process to test whether write-combining is supported on the machine. The test will run as part of the enable_driver callback to ensure that the test runs after the device is setup and can create and modify the QP needed, but runs before the device is exposed to the users. The test opens UD QP and posts NOP WQEs, the WQE written to the BlueFlame is different from the WQE in memory, requesting CQE only on the BlueFlame WQE. By checking whether we received a completion on one of these WQEs we can know if BlueFlame succeeded and this write-combining must be supported. Change reporting of BlueFlame support to be dependent on write-combining support instead of the FW's guess as to what the machine can do. Link: https://lore.kernel.org/r/20191027062234.10993-1-leon@kernel.org Signed-off-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 546d30099ed204792083f043cd7e016de86016a3 Author: Leon Romanovsky Date: Tue Oct 29 07:57:21 2019 +0200 RDMA/mlx5: Return proper error value Returned value from mlx5_mr_cache_alloc() is checked to be error or real pointer. Return proper error code instead of NULL which is not checked later. Fixes: 81713d3788d2 ("IB/mlx5: Add implicit MR support") Link: https://lore.kernel.org/r/20191029055721.7192-1-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit df4bb5d128e2c44848aeb36b7ceceba3ac85080d Author: Dmitry Monakhov Date: Thu Oct 31 10:39:20 2019 +0000 quota: Check that quota is not dirty before release There is a race window where quota was redirted once we drop dq_list_lock inside dqput(), but before we grab dquot->dq_lock inside dquot_release() TASK1 TASK2 (chowner) ->dqput() we_slept: spin_lock(&dq_list_lock) if (dquot_dirty(dquot)) { spin_unlock(&dq_list_lock); dquot->dq_sb->dq_op->write_dquot(dquot); goto we_slept if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) { spin_unlock(&dq_list_lock); dquot->dq_sb->dq_op->release_dquot(dquot); dqget() mark_dquot_dirty() dqput() goto we_slept; } So dquot dirty quota will be released by TASK1, but on next we_sleept loop we detect this and call ->write_dquot() for it. XFSTEST: https://github.com/dmonakhov/xfstests/commit/440a80d4cbb39e9234df4d7240aee1d551c36107 Link: https://lore.kernel.org/r/20191031103920.3919-2-dmonakhov@openvz.org CC: stable@vger.kernel.org Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara commit 6ff33d99fc5c96797103b48b7b0902c296f09c05 Author: Dmitry Monakhov Date: Thu Oct 31 10:39:19 2019 +0000 quota: fix livelock in dquot_writeback_dquots Write only quotas which are dirty at entry. XFSTEST: https://github.com/dmonakhov/xfstests/commit/b10ad23566a5bf75832a6f500e1236084083cddc Link: https://lore.kernel.org/r/20191031103920.3919-1-dmonakhov@openvz.org CC: stable@vger.kernel.org Signed-off-by: Konstantin Khlebnikov Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara commit 796977443018f81df68abf12f3263b8da85899f3 Merge: 8c933eab2d19 0b0eacf3c83c Author: David S. Miller Date: Thu Oct 31 11:00:45 2019 -0700 Merge branch 'bnxt_en-Add-OP-TEE-based-bnxt-f-w-manager' Sheetal Tigadoli says: ==================== bnxt_en: Add OP-TEE based bnxt f/w manager This patch series adds support for TEE based BNXT firmware management module and the driver changes to invoke OP-TEE APIs to fastboot firmware and to collect crash dump. Changes from v4: - update Kconfig to reflect dependency on TEE driver ==================== Signed-off-by: David S. Miller commit 0b0eacf3c83cb292c6eef55c76d5138c9302dc20 Author: Vasundhara Volam Date: Thu Oct 31 15:38:52 2019 +0530 bnxt_en: Add support to collect crash dump via ethtool Driver supports 2 types of core dumps. 1. Live dump - Firmware dump when system is up and running. 2. Crash dump - Dump which is collected during firmware crash that can be retrieved after recovery. Crash dump is currently supported only on specific 58800 chips which can be retrieved using OP-TEE API only, as firmware cannot access this region directly. User needs to set the dump flag using following command before initiating the dump collection: $ ethtool -W|--set-dump eth0 N Where N is "0" for live dump and "1" for crash dump Command to collect the dump after setting the flag: $ ethtool -w eth0 data Filename v3: Modify set_dump to support even when CONFIG_TEE_BNXT_FW=n. Also change log message to netdev_info(). Cc: Jakub Kicinski Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: Sheetal Tigadoli Signed-off-by: David S. Miller commit e07ab2021eb6b7123ec66ae1dc019afae566a56c Author: Vasundhara Volam Date: Thu Oct 31 15:38:51 2019 +0530 bnxt_en: Add support to invoke OP-TEE API to reset firmware In error recovery process when firmware indicates that it is completely down, initiate a firmware reset by calling OP-TEE API. Cc: Michael Chan Signed-off-by: Vasundhara Volam Signed-off-by: Sheetal Tigadoli Signed-off-by: David S. Miller commit 246880958ac93989c97c73ae1e60b78b4c4c88c5 Author: Vikas Gupta Date: Thu Oct 31 15:38:50 2019 +0530 firmware: broadcom: add OP-TEE based BNXT f/w manager This driver registers on TEE bus to interact with OP-TEE based BNXT firmware management modules Cc: Jakub Kicinski Reported-by: kbuild test robot Signed-off-by: Vikas Gupta Signed-off-by: Sheetal Tigadoli Signed-off-by: David S. Miller commit 8c933eab2d1985c0dc398e2faa4b01624f2a594c Merge: d74361dc5870 973b7fdb5ff1 Author: David S. Miller Date: Thu Oct 31 10:54:47 2019 -0700 Merge branch 'mlxsw-Make-port-split-code-more-generic' Ido Schimmel says: ==================== mlxsw: Make port split code more generic Jiri says: Currently, we assume some limitations and constant values which are not applicable for Spectrum-3 which has 8 lanes ports (instead of previous 4 lanes). This patch does 2 things: 1) Generalizes the code to not use constants so it can work for 4, 8 and possibly 16 lanes. 2) Enforces some assumptions we had in the code but did not check. ==================== Signed-off-by: David S. Miller commit 973b7fdb5ff17e5f19eba9103c3fcb77a01b93df Author: Jiri Pirko Date: Thu Oct 31 11:42:21 2019 +0200 mlxsw: spectrum: Generalize split count check Make the check generic for any possible value, not only 2 and 4. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit fbbeea31026767706f0644f14c3cf13cbc2fa3c8 Author: Jiri Pirko Date: Thu Oct 31 11:42:20 2019 +0200 mlxsw: spectrum: Iterate over all ports in gap during unsplit create During recreation of original unsplit ports, just simply iterate over the whole gap and recreate whatever originally existed. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c3a64b5173e1416cf3d982b02e1c1b918382f701 Author: Jiri Pirko Date: Thu Oct 31 11:42:19 2019 +0200 mlxsw: spectrum: Fix base port get for split count 4 and 8 The current code considers only split by 2 or 4. Make the base port getting generic and allow split by 8 to be handled correctly. Generalize the used port checks as well. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 013da297911830882611c4ae4764117dacf6713f Author: Jiri Pirko Date: Thu Oct 31 11:42:18 2019 +0200 mlxsw: spectrum: Use port_module_max_width to compute base port index Instead of using constant value, use port_module_max_width which is aligned with the cluster size. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 49185277cc451ebae894456384cc8996e8ec4fdc Author: Jiri Pirko Date: Thu Oct 31 11:42:17 2019 +0200 mlxsw: spectrum: Remember split base local port and use it in unsplit Don't compute the original base local port during unsplit, rather remember it in mlxsw_sp_port structure during split port creation. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 038784a9dfc2180dde36d34a92cb4427eb1e928f Author: Jiri Pirko Date: Thu Oct 31 11:42:16 2019 +0200 mlxsw: spectrum: Introduce resource for getting offset of 4 lanes split port In Spectrum-3 the modules have 8 lanes, so split by count 2 results in two split ports each of 4 lanes. Add a resource that can be used to obtain local port offset in that case. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d0846ce9aa9096e53e532a1c36c57efe63509b26 Author: Jiri Pirko Date: Thu Oct 31 11:42:15 2019 +0200 mlxsw: spectrum: Push getting offsets of split ports into a helper Get local port offsets of split port in a separate helper function and use it in both split and unsplit function. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c8fc10dc17c2675212982934d6de7fb19aabe73c Author: Jiri Pirko Date: Thu Oct 31 11:42:14 2019 +0200 mlxsw: spectrum: Add sanity checks into module info get Driver assumes certain values in the PMLP register. Add checks that verify that PMLP register provides fitting values. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 35896d9641db1af0d6054b03ec3e13f6be83c6b8 Author: Jiri Pirko Date: Thu Oct 31 11:42:13 2019 +0200 mlxsw: spectrum: Pass mapping values in port mapping structure Pass the port mapping structure down to create, module_map and other function instead of individual values. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 7b39fa5befbb531a91bbd91ecac516251063afe3 Author: Jiri Pirko Date: Thu Oct 31 11:42:12 2019 +0200 mlxsw: spectrum: Use mapping of port being split for creating split ports Don't use constant max width value and instead of that, use the actual width of the port. Also don't pass module value and use the value stored in the same structure. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4a7f970f1240523b1bbabac88811e429de4697cb Author: Jiri Pirko Date: Thu Oct 31 11:42:11 2019 +0200 mlxsw: spectrum: Replace port_to_module array with array of structs Store the initial PMLP register configuration into array of structures instead of just simple array of module numbers. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 26a6befa5df79dddb1a1c464b5758de9d618ee23 Author: Jiri Pirko Date: Thu Oct 31 11:42:10 2019 +0200 mlxsw: spectrum: Distinguish between unsplittable and split port Currently when user does split, he is not able to distinguish if the port cannot be split because it is already split, or because it cannot be split at all. Add another check for split flag to distinguish this. Also add check forbidding split when maximal width is 1. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2e6a2d7b4508ea01b276d8c7350582a07dca1c23 Author: Jiri Pirko Date: Thu Oct 31 11:42:09 2019 +0200 mlxsw: spectrum: Move max_width check up before count check The fact that the port cannot be split further should be checked before checking the count, so move it. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 25911e1b97971a06b4c053f70c7c1eb0c33a607e Author: Jiri Pirko Date: Thu Oct 31 11:42:08 2019 +0200 mlxsw: spectrum: Use PMTM register to get max module width Currently the max module width is hard-coded according to ASIC type. That is not entirely correct, as the max module width might differ per-board. Use PMTM register to query FW for maximal width of a module. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a513b1a5910bfc15d5a42e969e66a7986fd32819 Author: Jiri Pirko Date: Thu Oct 31 11:42:07 2019 +0200 mlxsw: reg: Add Port Module Type Mapping Register The PMTM allows query or configuration of module types. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 94e768373ae10d72528307256a869c846dc4ba00 Author: Jiri Pirko Date: Thu Oct 31 11:42:06 2019 +0200 mlxsw: reg: Extend PMLP tx/rx lane value size to 4 bits The tx/rx lane fields got extended to 4 bits, update the reg field description accordingly. Signed-off-by: Jiri Pirko Reviewed-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d74361dc58709fa200c2db86fa5cf086dc4acec8 Author: Christophe JAILLET Date: Thu Oct 31 06:53:45 2019 +0100 cxgb4/l2t: Simplify 't4_l2e_free()' and '_t4_l2e_free()' Use '__skb_queue_purge()' instead of re-implementing it. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 49748264826ff4cc7f0ebbdd6b0d1a36b13b1cee Author: José Roberto de Souza Date: Mon Oct 28 18:10:14 2019 -0700 drm/i915/dp: Do not switch aux to TBT mode for non-TC ports Non-TC ports always have tc_mode == TC_PORT_TBT_ALT so it was switching aux to TBT mode for all combo-phy ports, happily this did not caused any issue but is better follow BSpec. Also this is reserved bit before ICL. Cc: Imre Deak Signed-off-by: José Roberto de Souza Fixes: e9b7e1422d40 ("drm/i915: Sanitize the terminology used for TypeC port modes") Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191029011014.286885-1-jose.souza@intel.com commit cb73737ea1d27181f5c4bfb1288e97f3e8a4abc7 Author: Geert Uytterhoeven Date: Fri Oct 25 12:38:43 2019 +0100 ARM: 8928/1: ARM_ERRATA_775420: Spelling s/date/data/ Caching dates is never a good idea ;-) Fixes: 7253b85cc62d6ff8 ("ARM: 7541/1: Add ARM ERRATA 775420 workaround") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Russell King commit 5b1e58c75d4123d9a8c237d147db01b404e56330 Author: Ben Dooks Date: Fri Oct 18 10:54:17 2019 +0100 ARM: 8925/1: tcm: include for missing declarations The arch/arm/kernel/tcm.c should include for declarations of tcm_alloc, tcm_free and other functions. Fixes the following sparse warnings: arch/arm/kernel/tcm.c:74:6: warning: symbol 'tcm_alloc' was not declared. Should it be static? arch/arm/kernel/tcm.c:92:6: warning: symbol 'tcm_free' was not declared. Should it be static? arch/arm/kernel/tcm.c:98:6: warning: symbol 'tcm_dtcm_present' was not declared. Should it be static? arch/arm/kernel/tcm.c:104:6: warning: symbol 'tcm_itcm_present' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit ca045579d2088d04824a952c72b2c9cce1038240 Author: Ben Dooks Date: Fri Oct 18 10:54:10 2019 +0100 ARM: 8924/1: tcm: make dtcm_end and itcm_end static The dtcm_end and itcm_end are not exported or used elsewhere, so make them static to remove the following sparse warnign: arch/arm/kernel/tcm.c:33:5: warning: symbol 'dtcm_end' was not declared. Should it be static? arch/arm/kernel/tcm.c:34:5: warning: symbol 'itcm_end' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit c4e8fd03f211b2003fd6a2fafb9fc90d870018d6 Author: Ben Dooks (Codethink) Date: Fri Oct 11 14:18:43 2019 +0100 ARM: 8923/1: mm: include for vga_base iomap.c needs for the definition vga_base to avoid the following warning: arch/arm/mm/iomap.c:13:15: warning: symbol 'vga_base' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 3b129524080bcb1bdcd9a7f66dbcf5bea899a291 Author: Ben Dooks (Codethink) Date: Fri Oct 11 13:56:58 2019 +0100 ARM: 8922/1: parse_dt_topology() rate is pointer to __be32 The rate pointer in parse_dt_topology is a pointer to a __be32, not a u32. This fixes the following sparse warning: arch/arm/kernel/topology.c:128:43: warning: incorrect type in argument 1 (different base types) arch/arm/kernel/topology.c:128:43: expected restricted __be32 const [usertype] *p arch/arm/kernel/topology.c:128:43: got unsigned int const [usertype] *[assigned] rate Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 83dc1d99429af7d73225294f216a510ba6f58e45 Author: Ben Dooks (Codethink) Date: Fri Oct 11 13:53:32 2019 +0100 ARM: 8920/1: share get_signal_page from signal.c to process.c The get_signal_page() function is defined in signal.c and used in process.c but there is no shared definition. Add one in signal.h to silence the following warning: arch/arm/kernel/signal.c:683:13: warning: symbol 'get_signal_page' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 2af903500b9d1b58cfc76110356a95661777c398 Author: Ben Dooks (Codethink) Date: Fri Oct 11 13:53:20 2019 +0100 ARM: 8919/1: make unexported functions static The psci_cpu_{disable,die,kill} functions are not exported, so make them static to avoid the following warnings: arch/arm/kernel/psci_smp.c:54:5: warning: symbol 'psci_cpu_disable' was not declared. Should it be static? arch/arm/kernel/psci_smp.c:67:6: warning: symbol 'psci_cpu_die' was not declared. Should it be static? arch/arm/kernel/psci_smp.c:79:5: warning: symbol 'psci_cpu_kill' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 034982cff1a12f9030f2f25dfbbedf81c57c08d2 Author: Daniele Ceraolo Spurio Date: Wed Oct 30 18:30:40 2019 -0700 drm/i915/guc: drop guc shared area Recent GuC doesn't require the shared area. We still have one user in i915 (engine reset via guc) because we haven't updated the command to match the current guc submission flow [1]. Since the flow in guc is about to change again, just disable the command for now and add a note that we'll implement it as part of the new flow. [1] https://patchwork.freedesktop.org/patch/295038/ Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Cc: Fernando Pacheco Acked-by: Chris Wilson Reviewed-by: Matthew Brost Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191031013040.25803-2-daniele.ceraolospurio@intel.com commit 9f37940756b1b7f56bcfb53de17b78f55fb18e48 Author: Daniele Ceraolo Spurio Date: Wed Oct 30 18:30:39 2019 -0700 drm/i915: drop lrc header page Recent GuC binaries (including all the ones we're currently using) don't require this shared area anymore, having moved the relevant entries into the stage pool instead. i915 itself doesn't write anything into it either, so we can safely drop it. Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Acked-by: Chris Wilson Reviewed-by: Matthew Brost Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191031013040.25803-1-daniele.ceraolospurio@intel.com commit effb83ccc83a97dbbe5214f4c443522719f05f3a Author: Ilya Leoshkevich Date: Wed Oct 30 14:20:32 2019 +0100 s390: add error handling to perf_callchain_kernel perf_callchain_kernel stops neither when it encounters a garbage address, nor when it runs out of space. Fix both issues using x86 version as an inspiration. Signed-off-by: Ilya Leoshkevich Signed-off-by: Vasily Gorbik commit 265f79dcb5702aeffcd9453c8cbb5fb707652323 Author: Heiko Carstens Date: Wed Oct 30 16:55:56 2019 +0100 s390: always inline current_stack_pointer() This function must be inlined since any caller expects the current stack pointer; which wouldn't be true if the function isn't inlined. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 2416cefc504ba8ae9b17e3e6b40afc72708f96be Author: Gerald Schaefer Date: Tue Oct 22 14:38:08 2019 +0200 s390/mm: add mm_pxd_folded() checks to pxd_free() Unlike pxd_free_tlb(), the pxd_free() functions do not check for folded page tables. This is not an issue so far, as those functions will actually never be called, since no code will reach them when page tables are folded. In order to avoid future issues, and to make the s390 code more similar to other architectures, add mm_pxd_folded() checks, similar to how it is done in pxd_free_tlb(). This was found by testing a patch from from Anshuman Khandual, which is currently discussed on LKML ("mm/debug: Add tests validating architecture page table helpers"). Signed-off-by: Gerald Schaefer Signed-off-by: Vasily Gorbik commit ab874f22d35a8058d8fdee5f13eb69d8867efeae Author: Gerald Schaefer Date: Wed Sep 11 19:42:23 2019 +0200 s390/mm: properly clear _PAGE_NOEXEC bit when it is not supported On older HW or under a hypervisor, w/o the instruction-execution- protection (IEP) facility, and also w/o EDAT-1, a translation-specification exception may be recognized when bit 55 of a pte is one (_PAGE_NOEXEC). The current code tries to prevent setting _PAGE_NOEXEC in such cases, by removing it within set_pte_at(). However, ptep_set_access_flags() will modify a pte directly, w/o using set_pte_at(). There is at least one scenario where this can result in an active pte with _PAGE_NOEXEC set, which would then lead to a panic due to a translation-specification exception (write to swapped out page): do_swap_page pte = mk_pte (with _PAGE_NOEXEC bit) set_pte_at (will remove _PAGE_NOEXEC bit in page table, but keep it in local variable pte) vmf->orig_pte = pte (pte still contains _PAGE_NOEXEC bit) do_wp_page wp_page_reuse entry = vmf->orig_pte (still with _PAGE_NOEXEC bit) ptep_set_access_flags (writes entry with _PAGE_NOEXEC bit) Fix this by clearing _PAGE_NOEXEC already in mk_pte_phys(), where the pgprot value is applied, so that no pte with _PAGE_NOEXEC will ever be visible, if it is not supported. The check in set_pte_at() can then also be removed. Cc: # 4.11+ Fixes: 57d7f939e7bd ("s390: add no-execute support") Signed-off-by: Gerald Schaefer Signed-off-by: Vasily Gorbik commit 2d1fc1eb9b54564cec2dbe8cb1625e233fe49323 Author: Gerald Schaefer Date: Tue Sep 10 19:22:09 2019 +0200 s390/mm: simplify page table helpers for large entries For pmds and puds, there are a couple of page table helper functions that only make sense for large entries, like pxd_(mk)dirty/young/write etc. We currently explicitly check if the entries are large, but in practice those functions must never be used for normal entries, which point to lower level page tables, so the code can be simplified. This also fixes a theoretical bug, where common code could use one of the functions before actually marking a pmd large, like this: pmd = pmd_mkhuge(pmd_mkdirty(pmd)) With the current implementation, the resulting large pmd would not be dirty as requested. This could in theory result in the loss of dirty information, e.g. after collapsing into a transparent hugepage. Common code currently always marks an entry large before using one of the functions, but there is no hard requirement for this. The only requirement would be that it never uses the functions for normal entries pointing to lower level page tables, but they might be called before marking an entry large during its creation. In order to avoid issues with future common code, and to simplify the page table helpers, remove the checks for large entries and rely on common code never using them for normal entries. This was found by testing a patch from from Anshuman Khandual, which is currently discussed on LKML ("mm/debug: Add tests validating architecture page table helpers"). Signed-off-by: Gerald Schaefer Signed-off-by: Vasily Gorbik commit 1c27a4bc817b89c0f97914ab93ab0bd74685d2f3 Author: Gerald Schaefer Date: Fri Sep 6 22:00:50 2019 +0200 s390/mm: make pmd/pud_bad() report large entries as bad The semantics of pmd/pud_bad() expect that large entries are reported as bad, but we also check large entries for sanity. There is currently no issue with this wrong behaviour, but let's conform to the semantics by reporting large pmd/pud entries as bad, in order to prevent future issues. This was found by testing a patch from from Anshuman Khandual, which is currently discussed on LKML ("mm/debug: Add tests validating architecture page table helpers"). Signed-off-by: Gerald Schaefer Signed-off-by: Vasily Gorbik commit 011620688a71f2f1fe9901dbc2479a7c01053196 Author: Heiko Carstens Date: Tue Oct 29 14:09:47 2019 +0100 s390/time: ensure get_clock_monotonic() returns monotonic values The current implementation of get_clock_monotonic() leaves it up to the caller to call the function with preemption disabled. The only core kernel caller (sched_clock) however does not disable preemption. In order to make sure that all callers of this function see monotonic values handle disabling preemption within the function itself. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6756dd9b890fe50c01a6e7546bd498d57ddb98ae Author: Vasily Gorbik Date: Mon Oct 28 15:17:42 2019 +0100 s390/process: avoid custom stack unwinding in get_wchan Currently get_wchan uses custom stack unwinding implementation which relies on back_chain presence. Replace it with more abstract stack unwinding api usage. Suggested-by: Ilya Leoshkevich Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit ea3f6dcfa71afb51753ad3729c29570f90d6abbc Author: Ilya Leoshkevich Date: Wed Oct 2 12:56:27 2019 +0200 s390/unwind: fix get_stack_pointer(NULL, NULL) unwind_for_each_frame(NULL, NULL, 0) does not return any valid frames. The reason is that get_stack_pointer, unlike get_stack_info and show_stack, does not handle NULL argument. Fix by making get_stack_pointer treat NULL as current, like get_stack_info and show_stack do. Reviewed-by: Vasily Gorbik Tested-by: Vasily Gorbik Signed-off-by: Ilya Leoshkevich Signed-off-by: Vasily Gorbik commit d3baaeb5ae0870973bfe0f6aaed887b894d5e560 Author: Vasily Gorbik Date: Tue Oct 22 17:37:51 2019 +0200 s390: avoid double handling of "noexec" option "noexec" option is already parsed during startup and its value is exposed via noexec_disabled variable. Simply reuse that value during machine facilities detection. Suggested-by: Ilya Leoshkevich Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f653e29bc2d94ae6b6f470145c630d1ba0d856d2 Author: Heiko Carstens Date: Mon Oct 28 10:11:41 2019 +0100 s390/time: remove monotonic_clock() Remove unused monotonic_clock() function. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 1917b47dc23f0ace5893971d83642c2cf22f5cb7 Author: Julian Wiedmann Date: Wed Oct 23 10:03:23 2019 +0200 s390/qdio: move SSQD Sniffer mask definition Put the Sniffer bit next to all the other CHSC AC2 bits. Signed-off-by: Julian Wiedmann Reviewed-by: Steffen Maier Signed-off-by: Vasily Gorbik commit 4f84b383511de8dabc9bed2b98d2918830723527 Author: Nick Desaulniers Date: Mon Aug 12 14:50:34 2019 -0700 s390/boot: fix section name escaping GCC unescapes escaped string section names while Clang does not. Because __section uses the `#` stringification operator for the section name, it doesn't need to be escaped. This antipattern was found with: $ grep -e __section\(\" -e __section__\(\" -r Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers Message-Id: <20190812215052.71840-1-ndesaulniers@google.com> Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit cceb018377a123dd77d3239bbdbfbdf50f0d6a71 Author: Heiko Carstens Date: Fri Oct 18 13:23:16 2019 +0200 s390/alternatives: make use of asm_inline This is the s390 version of commit 40576e5e63ea ("x86: alternative.h: use asm_inline for all alternative variants"). See commit eb111869301e ("compiler-types.h: add asm_inline definition") for more details. With this change the compiler will not generate many out-of-line versions for the three instruction sized arch_spin_unlock() function anymore. Due to this gcc seems to change a lot of other inline decisions which results in a net 6k text size growth according to bloat-o-meter (gcc 9.2 with defconfig). But that's still better than having many out-of-line versions of arch_spin_unlock(). Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6a3035dac6506bc6da40e391803fba50bb2dce9d Author: Heiko Carstens Date: Fri Oct 18 13:23:09 2019 +0200 s390/bug: make use of asm_inline This is the s390 version of commit 32ee8230b2b0 ("x86: bug.h: use asm_inline in _BUG_FLAGS definitions"). See commit eb111869301e ("compiler-types.h: add asm_inline definition") for more details. Just like on x86 the .text section size decreases a bit while the .data section size increases about the same amount (gcc 9.2 with defconfig). Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6d76c898d82d94d066d870ba0180ec79bd3ceea5 Author: Julian Wiedmann Date: Fri Oct 4 11:07:13 2019 +0200 s390/qdio: don't attempt IRQ avoidance on Output SBALs Output interrupts are not subject to SLSB-based avoidance, so remove the gratuitous SLSB updates for Output SBALs in ERROR state. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Vasily Gorbik commit 94c43bdaa0073c43a0a1b12e65c51070f02a0642 Author: Julian Wiedmann Date: Tue Jul 23 11:55:27 2019 +0200 s390/qdio: simplify thinint device registration On an interrupt, tiqdio_thinint_handler() walks a list of all objects that might require attention, and checks their DSCI. This list is awkwardly built from Input Queues, even though the IRQs are per-device and the queue is then only used to dereference its qdio_irq parent. To simplify the logic, change the code so that tiq_list contains qdio_irq entries. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Vasily Gorbik commit 4611281021e9835da825b79ba9b62a31670e0791 Author: Julian Wiedmann Date: Mon Sep 30 15:42:35 2019 +0200 s390/qdio: add statistics helper macro qperf_inc() takes a queue as input, but actually updates the statistics in its qdio_irq parent. In some contexts we already have access to the qdio_irq struct, and can avoid the additional dereference. Signed-off-by: Julian Wiedmann Signed-off-by: Vasily Gorbik commit d86f71fd43fd477ee17a5db5d2ae88ad6c6cf983 Author: Julian Wiedmann Date: Tue Jul 23 10:23:32 2019 +0200 s390/qdio: remove a forward declaration Shift the definition of tiqdio_airq around, so that it doesn't require a forward declaration for tiqdio_thinint_handler(). Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Vasily Gorbik commit 4e79a5d41e8b053d1448ed4681a3db0a28f80c99 Author: Julian Wiedmann Date: Mon Aug 19 17:20:05 2019 +0200 s390/qdio: reduce log level for EQBS partial Partial EQBS completion is no significant event, and the WARN ends up spamming the debug logs for no good reason. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Vasily Gorbik commit a320412dbbb312ffa446954838fef5226ae001cc Author: Julian Wiedmann Date: Mon Aug 12 08:06:52 2019 +0200 s390/qdio: use QDIO_BUFNR() qdio.h recently gained a new helper macro that handles wrap-around on a QDIO queue, use it. Signed-off-by: Julian Wiedmann Signed-off-by: Vasily Gorbik commit 249bd9087a5264d2b8a974081870e2e27671b4dc Author: Dave Chinner Date: Tue Oct 29 13:04:32 2019 -0700 xfs: properly serialise fallocate against AIO+DIO AIO+DIO can extend the file size on IO completion, and it holds no inode locks while the IO is in flight. Therefore, a race condition exists in file size updates if we do something like this: aio-thread fallocate-thread lock inode submit IO beyond inode->i_size unlock inode ..... lock inode break layouts if (off + len > inode->i_size) new_size = off + len ..... inode_dio_wait() ..... completes inode->i_size updated inode_dio_done() .... if (new_size) xfs_vn_setattr(inode, new_size) Yup, that attempt to extend the file size in the fallocate code turns into a truncate - it removes the whatever the aio write allocated and put to disk, and reduced the inode size back down to where the fallocate operation ends. Fundamentally, xfs_file_fallocate() not compatible with racing AIO+DIO completions, so we need to move the inode_dio_wait() call up to where the lock the inode and break the layouts. Secondly, storing the inode size and then using it unchecked without holding the ILOCK is not safe; we can only do such a thing if we've locked out and drained all IO and other modification operations, which we don't do initially in xfs_file_fallocate. It should be noted that some of the fallocate operations are compound operations - they are made up of multiple manipulations that may zero data, and so we may need to flush and invalidate the file multiple times during an operation. However, we only need to lock out IO and other space manipulation operations once, as that lockout is maintained until the entire fallocate operation has been completed. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8cefc107ca54c8b06438b7dc9cc08bc0a11d5b98 Author: David Howells Date: Fri Nov 15 13:30:32 2019 +0000 pipe: Use head and tail pointers for the ring, not cursor and length Convert pipes to use head and tail pointers for the buffer ring rather than pointer and length as the latter requires two atomic ops to update (or a combined op) whereas the former only requires one. (1) The head pointer is the point at which production occurs and points to the slot in which the next buffer will be placed. This is equivalent to pipe->curbuf + pipe->nrbufs. The head pointer belongs to the write-side. (2) The tail pointer is the point at which consumption occurs. It points to the next slot to be consumed. This is equivalent to pipe->curbuf. The tail pointer belongs to the read-side. (3) head and tail are allowed to run to UINT_MAX and wrap naturally. They are only masked off when the array is being accessed, e.g.: pipe->bufs[head & mask] This means that it is not necessary to have a dead slot in the ring as head == tail isn't ambiguous. (4) The ring is empty if "head == tail". A helper, pipe_empty(), is provided for this. (5) The occupancy of the ring is "head - tail". A helper, pipe_occupancy(), is provided for this. (6) The number of free slots in the ring is "pipe->ring_size - occupancy". A helper, pipe_space_for_user() is provided to indicate how many slots userspace may use. (7) The ring is full if "head - tail >= pipe->ring_size". A helper, pipe_full(), is provided for this. Signed-off-by: David Howells commit f94df9890e98f2090c6a8d70c795134863b70201 Author: David Howells Date: Tue Sep 24 16:07:45 2019 +0100 Add wake_up_interruptible_sync_poll_locked() Add a wakeup call for a case whereby the caller already has the waitqueue spinlock held. This can be used by pipes to alter the ring buffer indices and issue a wakeup under the same spinlock. Signed-off-by: David Howells Acked-by: Peter Zijlstra (Intel) commit dde01d943559f6b853d97a2744433d9ad1b12ace Author: Chris Wilson Date: Wed Oct 30 19:21:49 2019 +0000 drm/i915: Split detaching and removing the vma In order to keep the assert_bind_count() valid, we need to hold the vma page reference until after we drop the bind count. However, we must also keep the drm_mm_remove_node() as the last action of i915_vma_unbind() so that it serialises with the unlocked check inside i915_vma_destroy(). So we need to split up i915_vma_remove() so that we order the detach, drop pages and remove as required during unbind. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112067 Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191030192159.18404-1-chris@chris-wilson.co.uk commit 164a4128869ffcef33dfed82b641471b14e48b5d Author: Chris Wilson Date: Thu Oct 31 10:11:16 2019 +0000 drm/i915/selftests: Pretty print the i915_active If the idle_pulse fails to flush the i915_active, dump the tree to see if that has any clues. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191031101116.19894-1-chris@chris-wilson.co.uk commit 1db257c55f0c9f54a429eb603ffa30bd8b0e06e6 Author: Chris Wilson Date: Thu Oct 31 09:42:59 2019 +0000 drm/i915/selftests: Assert that the idle_pulse is sent When checking the heartbeat pulse, we expect it to have been sent by the time we have slept. We can verify this by checking the engine serial number to see if that matches the predicted pulse serial. It will always be true if, and only if, the pulse was sent by itself (as designed by the test). Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191031094259.23028-1-chris@chris-wilson.co.uk commit 30ef0e4085070312101be26c015f36277f02e12b Author: Chengguang Xu Date: Sat Oct 26 17:07:21 2019 +0800 ext2: don't set *count in the case of failure in ext2_try_to_allocate() Currently we set *count to num(value 0) in the failure of block allocation in ext2_try_to_allocate(). Without reservation, we reuse *count(value 0) to retry block allocation and wrong *count will cause only allocating maximum 1 block even though having sufficent free blocks in that block group. Finally, it probably cause significant fragmentation. Link: https://lore.kernel.org/r/20191026090721.23794-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit 60e4cf67a582d64f07713eda5fcc8ccdaf7833e6 Author: Jeff Mahoney Date: Thu Oct 24 10:31:27 2019 -0400 reiserfs: fix extended attributes on the root directory Since commit d0a5b995a308 (vfs: Add IOP_XATTR inode operations flag) extended attributes haven't worked on the root directory in reiserfs. This is due to reiserfs conditionally setting the sb->s_xattrs handler array depending on whether it located or create the internal privroot directory. It necessarily does this after the root inode is already read in. The IOP_XATTR flag is set during inode initialization, so it never gets set on the root directory. This commit unconditionally assigns sb->s_xattrs and clears IOP_XATTR on internal inodes. The old return values due to the conditional assignment are handled via open_xa_root, which now returns EOPNOTSUPP as the VFS would have done. Link: https://lore.kernel.org/r/20191024143127.17509-1-jeffm@suse.com CC: stable@vger.kernel.org Fixes: d0a5b995a308 ("vfs: Add IOP_XATTR inode operations flag") Signed-off-by: Jeff Mahoney Signed-off-by: Jan Kara commit 06087114606c416892bd67c5fde9f0d498afb287 Merge: af91acbc6299 12a8654b2e5a Author: Daniel Borkmann Date: Thu Oct 31 15:16:59 2019 +0100 Merge branch 'bpf-cleanup-btf-raw-tp' Alexei Starovoitov says: ==================== v1->v2: addressed Andrii's feedback When BTF-enabled raw_tp were introduced the plan was to follow up with BTF-enabled kprobe and kretprobe reusing PROG_RAW_TRACEPOINT and PROG_KPROBE types. But k[ret]probe expect pt_regs while BTF-enabled program ctx will be the same as raw_tp. kretprobe is indistinguishable from kprobe while BTF-enabled kretprobe will have access to retval while kprobe will not. Hence PROG_KPROBE type is not reusable and reusing PROG_RAW_TRACEPOINT no longer fits well. Hence introduce 'umbrella' prog type BPF_PROG_TYPE_TRACING that will cover different BTF-enabled tracing attach points. The changes make libbpf side cleaner as well. check_attach_btf_id() is cleaner too. ==================== Signed-off-by: Daniel Borkmann commit 12a8654b2e5aab37b22c9608d008f9f0565862c0 Author: Alexei Starovoitov Date: Wed Oct 30 15:32:12 2019 -0700 libbpf: Add support for prog_tracing Cleanup libbpf from expected_attach_type == attach_btf_id hack and introduce BPF_PROG_TYPE_TRACING. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191030223212.953010-3-ast@kernel.org commit f1b9509c2fb0ef4db8d22dac9aef8e856a5d81f6 Author: Alexei Starovoitov Date: Wed Oct 30 15:32:11 2019 -0700 bpf: Replace prog_raw_tp+btf_id with prog_tracing The bpf program type raw_tp together with 'expected_attach_type' was the most appropriate api to indicate BTF-enabled raw_tp programs. But during development it became apparent that 'expected_attach_type' cannot be used and new 'attach_btf_id' field had to be introduced. Which means that the information is duplicated in two fields where one of them is ignored. Clean it up by introducing new program type where both 'expected_attach_type' and 'attach_btf_id' fields have specific meaning. In the future 'expected_attach_type' will be extended with other attach points that have similar semantics to raw_tp. This patch is replacing BTF-enabled BPF_PROG_TYPE_RAW_TRACEPOINT with prog_type = BPF_RPOG_TYPE_TRACING expected_attach_type = BPF_TRACE_RAW_TP attach_btf_id = btf_id of raw tracepoint inside the kernel Future patches will add expected_attach_type = BPF_TRACE_FENTRY or BPF_TRACE_FEXIT where programs have the same input context and the same helpers, but different attach points. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191030223212.953010-2-ast@kernel.org commit 29b27657dbae8d4c4bdc6bfbf6dd8c69f648e075 Author: Ville Syrjälä Date: Wed Oct 2 19:25:05 2019 +0300 drm/i915/mst: Document the userspace fail with possible_crtcs To avoid accidentally breaking things in the future add a comment explaining why we misconfigure the pipe_mask. Also toss in a TODO for investigating a single encoder approach as opposed to the encoder-per-pipe approach. v2: Drop a bogus TODO comment Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191002162505.30716-6-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 34053ee18974102152128df22f5596fb74229a90 Author: Ville Syrjälä Date: Wed Oct 2 19:25:04 2019 +0300 drm/i915: Simplify pipe_mask setup even further Just set pipe_mask=~0 for the non-special cases where any pipe will do. intel_encoder_possible_crtcs() will anyway drop out anything that doesn't exist. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191002162505.30716-5-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 4d19505ed28e68973ee68771e63cf4e4c03c5c05 Author: Ville Syrjälä Date: Wed Oct 2 19:25:03 2019 +0300 drm/i915: Allow ICL+ DSI on any pipe There are no longer any pipe<->DSI port limitations on icl+. Populate the pipe_mask accordingly. Cc: José Roberto de Souza Cc: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191002162505.30716-4-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit 981329ce3c3e13af6b9a11ec4948df45f5f4847e Author: Ville Syrjälä Date: Wed Oct 2 19:25:02 2019 +0300 drm/i915: s/crtc_mask/pipe_mask/ Rename the encoder->crtc_mask to encoder->pipe_mask to better reflect what it actually contains. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191002162505.30716-3-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit 2b0b27418a72f9d61562269a1b3072657ae937d0 Author: Ville Syrjälä Date: Wed Oct 2 19:25:01 2019 +0300 drm/i915: Simplify LVDS crtc_mask setup We don't need to special case PCH vs. gen4 when setting up the LVDS crtc_mask. Just claim pipes A|B|C work and intel_encoder_possible_crtcs() will drop out any crtc that doesn't exist. v2: Put the special case first to match what most other encoders do Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191002162505.30716-2-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit b3d53f5fce5d07b4981f0f4f93e579e389a99b07 Author: Kees Cook Date: Tue Oct 29 14:34:23 2019 -0700 usb: core: Remove redundant vmap checks Now that the vmap area checks are being performed in the DMA infrastructure directly, there is no need to repeat them in USB. Signed-off-by: Kees Cook Acked-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig commit f5869190667951720f8c1ec4638bff4c682a3a4e Author: Tero Kristo Date: Wed Oct 2 15:06:11 2019 +0300 ARM: dts: omap3: fix DPLL4 M4 divider max value The maximum divider value for DPLL4 M4 divider appears wrong. For most OMAP3 family SoCs this is 16, but it is defined as 32, which is maybe only valid for omap36xx. To avoid any overflows in trying to write this register, set the max to 16 for all omap3 family, except omap36xx. For omap36xx the maximum is set to 31, as it appears value 32 is not working properly. Signed-off-by: Tero Kristo Tested-by: Adam Ford Acked-by: Tony Lindgren commit 8ffea6eef4ace7e207fc2fe852d2019d93f51d1a Author: Tero Kristo Date: Wed Oct 2 15:06:10 2019 +0300 clk: ti: divider: convert to use min,max,mask instead of width The existing width field used to check divider validity does not provide enough protection against bad values. For example, if max divider value is 4, the smallest all-1 bitmask that can hold this value is 7, which allows values higher than 4 to be used. This typically causes unpredictable results with hardware. So far this issue hasn't been noticed as most of the dividers actually have maximum values which fit the whole bitfield, but there are certain clocks for which this is a problem, like dpll4_m4 divider on omap3 devices. Thus, convert the whole validity logic to use min,max and mask values for determining if a specific divider is valid or not. This prevents the odd cases where bad value would otherwise be written to a divider config register. Signed-off-by: Tero Kristo Tested-by: Adam Ford commit a229965cfeab8ea8bb79086d6f59ac9a57de66fe Author: Tero Kristo Date: Wed Oct 2 15:06:09 2019 +0300 clk: ti: divider: cleanup ti_clk_parse_divider_data API Cleanup the ti_clk_parse_divider_data to pass the divider data struct directly instead of individual values of it. This makes it easier to modify the implementation later on. Signed-off-by: Tero Kristo Tested-by: Adam Ford commit fbbc18591585bf74031dd6474b2937f87063e959 Author: Tero Kristo Date: Wed Oct 2 15:06:08 2019 +0300 clk: ti: divider: cleanup _register_divider and ti_clk_get_div_table Cleanup couple of TI divider clock internal APIs. These currently pass huge amount of parameters, which makes it difficult to track what is going on. Abstract most of these under struct clk_omap_div which gets passed over the APIs. Signed-off-by: Tero Kristo Tested-by: Adam Ford commit d948e6ca189985495a21cd622c31e30e72b6b688 Author: Luhua Xu Date: Wed Oct 30 17:03:54 2019 +0800 spi: add power control when set_cs As to set_cs takes effect immediately, power spi is needed when setup spi. Cc: Mark Brown Signed-off-by: Luhua Xu Link: https://lore.kernel.org/r/1572426234-30019-1-git-send-email-luhua.xu@mediatek.com Signed-off-by: Mark Brown commit 683b85152e3606f4d3145b99e2df4d6eaeb758d0 Author: Shuming Fan Date: Thu Oct 31 19:54:46 2019 +0800 ASoC: rt1011: some minor changes to improve readability There is no other code use the RT1011_INIT_REG_LEN definition, except rt1011_reg_init(). Hence, we remove it and fix the typo. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191031115446.21108-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 98b6b8df06c7929de65ca3bf28a13b11170943e3 Author: Shuming Fan Date: Thu Oct 31 19:54:36 2019 +0800 ASoC: rt1011: add the range check for temperature_calib from device property The driver will check the range for temperature_calib. It should be from 1 to 255. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191031115436.21055-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 270d1b39b006a408e35278d4b64b2c4e1945adf0 Author: Shuming Fan Date: Thu Oct 31 19:54:25 2019 +0800 ASoC: rt1011: remove unnecessary tabs using spaces instead There are unnecessary tabs inside some statements. It uses sapces instead. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191031115425.21003-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 5cf93491ff98cff0d2f9725e7c44e0bd38325697 Author: Shuming Fan Date: Thu Oct 31 19:54:14 2019 +0800 ASoC: rt1011: improve the rt1011_set_dai_fmt() function If there is a wrong format setting, the driver will goto the end of the function directly. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191031115414.20951-1-shumingf@realtek.com Signed-off-by: Mark Brown commit b9a3eea38b1eb8dd96fce64a8480e8ee38ee1451 Author: Shuming Fan Date: Thu Oct 31 19:54:01 2019 +0800 ASoC: rt1011: remove redundant code in kcontrol The !component->card->instantiated statement should remove in kcontrol. It is no need to check the card->instantiated in kcontrol. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191031115401.20898-1-shumingf@realtek.com Signed-off-by: Mark Brown commit ece3e465b80a05c994783c7161e3d49035064f71 Author: Tero Kristo Date: Mon Oct 7 15:26:04 2019 +0300 clk: ti: am43xx: drop idlest polling from gfx clock Due to the way ti sysc and hardreset line control is now implemented, it is not possible to poll the clock status for gfx clock independent of hardreset line control. Thus, add a flag to prevent handling this status bit from clock driver. Correct sequencing of events is guaranteed by ti-sysc bus driver. Signed-off-by: Tero Kristo commit 194071817898897c65ffb5ae59d6d686ca13452c Author: Tero Kristo Date: Mon Oct 7 15:26:03 2019 +0300 clk: ti: am33xx: drop idlest polling from gfx clock Due to the way ti sysc and hardreset line control is now implemented, it is not possible to poll the clock status for gfx clock independent of hardreset line control. Thus, add a flag to prevent handling this status bit from clock driver. Correct sequencing of events is guaranteed by ti-sysc bus driver. Reported-by: Tony Lindgren Signed-off-by: Tero Kristo commit 4d0030bdb47b703bebe4796d5c16beb776c6950f Author: Tero Kristo Date: Thu Sep 12 16:26:13 2019 +0300 clk: ti: am33xx: drop idlest polling from pruss clkctrl clock The PRUSS module on AM33xx SoCs has a hardreset line and is controlled by a PRCM reset line. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for the PRUSS clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to the PRUSS clkctrl clock so that these module status checks are skipped. Signed-off-by: Tero Kristo commit caf00b53678f172a80217d297e83346f337b427c Author: Tero Kristo Date: Thu Sep 12 16:26:12 2019 +0300 clk: ti: am43xx: drop idlest polling from pruss clkctrl clock The PRUSS modules on AM43xx SoCs have a hardreset line and are controlled by a PRCM reset line. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for the PRUSS clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to the PRUSS clkctrl clock so that these module status checks are skipped. Signed-off-by: Tero Kristo commit 95a62bf2dbfb8c1fa44f92e2d0116628695fa9bd Author: Suman Anna Date: Thu Sep 12 16:26:11 2019 +0300 clk: ti: omap5: Drop idlest polling from IPU & DSP clkctrl clocks The IPU and DSP remote processor cores and their corresponding MMUs on OMAP5 SoCs have hardreset lines associated with them and are controlled by a PRCM reset line each. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for these clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to both the IPU and DSP clkctrl clocks so that these module status checks are skipped. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo commit e1799d451a872cc9b0e0a96d820fc599e2b30a44 Author: Suman Anna Date: Thu Sep 12 16:26:10 2019 +0300 clk: ti: omap4: Drop idlest polling from IPU & DSP clkctrl clocks The IPU and DSP remote processor cores and their corresponding MMUs on OMAP4 SoCs have hardreset lines associated with them and are controlled by a PRCM reset line each. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for these clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to both the IPU and DSP clkctrl clocks so that these module status checks are skipped. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo commit 9063ea469c406fae7c60d2ea4d80f1101dd401eb Author: Tero Kristo Date: Thu Sep 12 16:26:09 2019 +0300 clk: ti: dra7xx: Drop idlest polling from IPU & DSP clkctrl clocks The IPU and DSP remote processor cores and their corresponding MMUs on DRA7 SoCs have hardreset lines associated with them and are controlled by a PRCM reset line each. Any clkctrl enable/disable operations cannot be checked for module enabled/disabled status independent of the reset operation, and this causes some unwanted timeouts in the kernel and unbalanced states for these clocks. These details should be handled by the driver integration code itself. Add the CLKF_NO_IDLEST flag to both the IPU and DSP clkctrl clocks so that these module status checks are skipped. Signed-off-by: Tero Kristo commit 25999e6172a3ec6bb4b1f5a77471532c209937cc Author: Tero Kristo Date: Thu Sep 12 16:26:08 2019 +0300 clk: ti: omap5: add IVA subsystem clkctrl data Add clkctrl data for the IVA subsystem (Image and Video Accelerator.) Signed-off-by: Tero Kristo commit 2d5f60afd2b6fa9c583c4f01989f734e00e090ae Author: Tero Kristo Date: Thu Sep 12 16:26:07 2019 +0300 dt-bindings: clk: add omap5 iva clkctrl definitions OMAP5 device contains an IVA subsystem (Image and Video Accelerator.) IVA subsystem clkctrl definitions are currently missing, so add them. Signed-off-by: Tero Kristo commit 2209b72d41993c13de220b82c830b482925322b9 Author: Tero Kristo Date: Thu Sep 12 16:26:06 2019 +0300 clk: ti: clkctrl: add new exported API for checking standby info Standby status is provided for certain clkctrl clocks to see if the given module has entered standby or not. This is mostly needed by remoteproc code to see if the remoteproc has entered standby and the clock can be turned off safely. Signed-off-by: Tero Kristo commit 22a6564f716b0746b5a05add3f9f37549f89244e Author: Tero Kristo Date: Thu Sep 12 16:26:05 2019 +0300 clk: ti: clkctrl: convert to use bit helper macros instead of bitops This improves the readibility of the code slightly, and makes modifying the flags bit simpler. Signed-off-by: Tero Kristo commit 581eb61a9465e1b9fc1df1a8912100702d7c2f31 Author: Tero Kristo Date: Thu Sep 12 16:26:04 2019 +0300 clk: ti: clkctrl: fix setting up clkctrl clocks Apply the proper register function for clkctrl clocks, so they get registered under the clk_hw_omap list also. This allows checking their type runtime. Signed-off-by: Tero Kristo commit 4569e64ab6a590dec418f2cd98fbe907a08fd452 Author: Heiko Stuebner Date: Tue Sep 17 10:25:32 2019 +0200 phy: phy-rockchip-inno-usb2: add phy description for px30 The px30 soc from Rockchip shares the same register description as the rk3328, so can re-use its definitions. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit 8abc4c4a154f658ac1f928eb5ccd9cb4706b2f3d Author: Clément Péron Date: Wed Oct 30 16:07:42 2019 +0100 arm64: dts: allwinner: Add mali GPU supply for H6 boards Enable and add supply to the Mali GPU node on all the H6 boards. Regarding the datasheet the maximum time for supply to reach its voltage is 32ms. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit 4acc24bca17f5f05692656d865d844985abad18a Author: Clément Péron Date: Wed Oct 30 16:07:41 2019 +0100 arm64: dts: allwinner: Add ARM Mali GPU node for H6 Add the mali gpu node to the H6 device-tree. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit 0c25bfa7fac517958b8dd2fffb8ba4fb042e946a Author: Mylène Josserand Date: Tue Oct 29 01:58:06 2019 +0100 ARM: dts: sun8i: a83t: a711: Add touchscreen node Enable a FocalTech EDT-FT5x06 Polytouch touchscreen. Signed-off-by: Ondrej Jirman Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard commit 64f86b9978449ff05bfa6c64b4c5439e21e9c80b Author: Stephan Gerhold Date: Tue Oct 8 13:52:08 2019 +0200 phy: qcom-usb-hs: Fix extcon double register after power cycle Commit f0b5c2c96370 ("phy: qcom-usb-hs: Replace the extcon API") switched from extcon_register_notifier() to the resource-managed API, i.e. devm_extcon_register_notifier(). This is problematic in this case, because the extcon notifier is dynamically registered/unregistered whenever the PHY is powered on/off. The resource-managed API does not unregister the notifier until the driver is removed, so as soon as the PHY is power cycled, attempting to register the notifier again results in: double register detected WARNING: CPU: 1 PID: 182 at kernel/notifier.c:26 notifier_chain_register+0x74/0xa0 Call trace: ... extcon_register_notifier+0x74/0xb8 devm_extcon_register_notifier+0x54/0xb8 qcom_usb_hs_phy_power_on+0x1fc/0x208 ... ... and USB stops working after plugging the cable out and in another time. The easiest way to fix this is to make a partial revert of commit f0b5c2c96370 ("phy: qcom-usb-hs: Replace the extcon API") and avoid using the resource-managed API in this case. Fixes: f0b5c2c96370 ("phy: qcom-usb-hs: Replace the extcon API") Signed-off-by: Stephan Gerhold Signed-off-by: Kishon Vijay Abraham I commit c9baab38fe0e28762d0d67611cbe2aef0fb3fc72 Author: Biju Das Date: Wed Oct 9 17:12:49 2019 +0100 phy: renesas: phy-rcar-gen2: Fix the array off by one warning Fix the below smatch warning by adding variable check rather than the hardcoded value. warn: array off by one? 'data->select_value[channel_num]' Reported-by: Dan Carpenter Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Ulrich Hecht Reviewed-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I commit 82b5d164415549e74cfa1f9156ffd4463d0a76e2 Author: Wei Yongjun Date: Wed Sep 4 11:40:14 2019 +0000 phy: lantiq: vrx200-pcie: fix error return code in ltq_vrx200_pcie_phy_power_on() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: e52a632195bf ("phy: lantiq: vrx200-pcie: add a driver for the Lantiq VRX200 PCIe PHY") Signed-off-by: Wei Yongjun Reviewed-by: Martin Blumenstingl Signed-off-by: Kishon Vijay Abraham I commit 3817c79611792333a33f6548a2aaf701a70fc593 Author: Heiko Stuebner Date: Thu Oct 24 00:38:50 2019 +0200 dt-bindings: phy: add yaml binding for rockchip,px30-dsi-dphy This adds a yaml binding for the external dsi phy found on Rockchip socs of the px30, rk3128 and rk3368 variants. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit b7535a3bc0bac70e9644fb35cdeffabb59f578ee Author: Wyon Bi Date: Thu Oct 24 00:38:51 2019 +0200 phy/rockchip: Add support for Innosilicon MIPI/LVDS/TTL PHY The Innosilicon Video Combo PHY not only supports MIPI DSI, but also LVDS and TTL functions with small die size and low pin count. Customers can choose according to their own applications. Signed-off-by: Wyon Bi [removed TTL mode for now, as it required a hook back into the dsi host] Signed-off-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I commit 711b2bfba748b5adf8ad837b490b393197279203 Author: Heiko Stuebner Date: Thu Oct 24 00:38:49 2019 +0200 phy: add PHY_MODE_LVDS There are combo phys out there that can be switched between doing dsi and lvds. So add a mode definition for it. Signed-off-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I commit a228890f94586c2f8417831c228ac8ed955ef856 Author: Icenowy Zheng Date: Tue Oct 29 21:17:39 2019 +0100 phy: allwinner: add phy driver for USB3 PHY on Allwinner H6 SoC Allwinner H6 SoC contains a USB3 PHY (with USB2 DP/DM lines also controlled). Add a driver for it. The register operations in this driver is mainly extracted from the BSP USB3 driver. Signed-off-by: Ondrej Jirman Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I commit 6bd03e7113694d5d5cbffe40acdea0db772331e0 Author: Ondrej Jirman Date: Tue Oct 29 21:17:38 2019 +0100 dt-bindings: Add bindings for USB3 phy on Allwinner H6 The new Allwinner H6 SoC contains a USB3 PHY that is wired to the external USB3 pins of the SoC. Add a device tree binding for the PHY. Signed-off-by: Ondrej Jirman Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit bbbbd246ee12f5d41aeac3d1b470f7b5b735574c Author: Ben Dooks (Codethink) Date: Thu Oct 17 11:53:48 2019 +0100 clk: rockchip: make clk_half_divider_ops static The clk_half_divider_ops is not used outside or declared outside of drivers/clk/rockchip/clk-half-divider.c so make it static to avoid the following warning: drivers/clk/rockchip/clk-half-divider.c:142:22: warning: symbol 'clk_half_divider_ops' was not declared. Should it be static? Signed-off-by: Ben Dooks Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191017105348.8061-1-ben.dooks@codethink.co.uk Signed-off-by: Heiko Stuebner commit bbf8f6fef71a02b297de532364b5217d34f01582 Author: Cheng-Yi Chiang Date: Mon Oct 28 15:19:30 2019 +0800 ARM: dts: rockchip: Add HDMI audio support to rk3288-veyron-mickey Add HDMI audio support to veyron-mickey. The sound card should expose one audio device for HDMI. Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20191028071930.145899-7-cychiang@chromium.org Signed-off-by: Heiko Stuebner commit d6707fb710b64154ab928892bfc9046614f95307 Author: Cheng-Yi Chiang Date: Mon Oct 28 15:19:29 2019 +0800 ARM: dts: rockchip: Add HDMI support to rk3288-veyron-analog-audio All boards using rk3288-veyron-analog-audio.dtsi have HDMI audio. Specify the support of HDMI audio on machine driver using rockchip,hdmi-codec property so machine driver creates HDMI audio device. Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20191028071930.145899-6-cychiang@chromium.org Signed-off-by: Heiko Stuebner commit 469191c7fcd069a500c2a26c49c9baef9dabf66d Author: Geert Uytterhoeven Date: Thu Oct 24 17:37:56 2019 +0200 MAINTAINERS: Mark linux-i3c mailing list moderated The linux-i3c mailing list is moderated for non-subscribers. Signed-off-by: Geert Uytterhoeven Signed-off-by: Boris Brezillon commit 708bc6ec65a7a58f63828ded31fd6651bacb01de Author: Geert Uytterhoeven Date: Thu Oct 24 17:19:01 2019 +0200 i3c: Spelling s/dicovered/discovered/ Fix misspellings of "discovered". Signed-off-by: Geert Uytterhoeven Signed-off-by: Boris Brezillon commit 43e0ae7ae0f567a3f8c10ec7a4078bc482660921 Merge: 320000e72ec0 8dcdfb7096a3 Author: Ingo Molnar Date: Thu Oct 31 09:33:19 2019 +0100 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU and LKMM changes from Paul E. McKenney: - Documentation updates. - Miscellaneous fixes. - Dynamic tick (nohz) updates, perhaps most notably changes to force the tick on when needed due to lengthy in-kernel execution on CPUs on which RCU is waiting. - Replace rcu_swap_protected() with rcu_prepace_pointer(). - Torture-test updates. - Linux-kernel memory consistency model updates. Signed-off-by: Ingo Molnar commit 6dea30b4fd548dd68e6a98da01ffeb50e7f99150 Author: Eduardo Abinader Date: Wed Oct 30 09:41:41 2019 +0100 wcn36xx: remove unecessary return Signed-off-by: Eduardo Abinader Signed-off-by: Kalle Valo commit d77ef82c72edbbc3adcd33f0cf14fe1c51d6a27f Author: Saurav Girepunje Date: Tue Oct 29 00:53:10 2019 +0530 ath5k: eeprom: Remove unneeded variable Remove unneeded ret variable from ath5k_eeprom_read_spur_chans() Signed-off-by: Saurav Girepunje Signed-off-by: Kalle Valo commit 85630469d268d3b7b4f79aa28948c1b7a2d6433b Author: Lior David Date: Mon Oct 28 19:24:37 2019 +0200 wil6210: add SPDX license identifiers Change all files to add SPDX license identifiers and remove license text. This is only an administrative change, there is no change in actual license or copyright for any file. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 0dc269314a251816aeee3abe38184071cf96e733 Author: YueHaibing Date: Fri Oct 25 17:10:41 2019 +0800 ath10k: remove unneeded semicolon remove unneeded semicolon. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 086ddf860650cfa3065d6698fae81335b1846cdb Author: zhong jiang Date: Wed Oct 30 16:08:44 2019 +0800 mt7601u: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file operation rather than DEFINE_SIMPLE_ATTRIBUTE. Signed-off-by: zhong jiang Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo commit 4b15f83adaf170ce55c8a572f66fe26342326983 Author: Saurav Girepunje Date: Tue Oct 29 18:46:24 2019 +0530 rtlwifi: rtl8821ae: Drop condition with no effect As the "else if" and "else" branch body are identical the condition has no effect. So drop the "else if" condition. Signed-off-by: Saurav Girepunje Signed-off-by: Kalle Valo commit a9160bb35ad9ada8428a4d48426f7fc128db40cc Author: Saurav Girepunje Date: Tue Oct 29 00:42:59 2019 +0530 b43: dma: Fix use true/false for bool type variable use true/false for bool type variables assignment. Signed-off-by: Saurav Girepunje Signed-off-by: Kalle Valo commit 6db774c1725059f98e4fce97f878688248584be5 Author: Saurav Girepunje Date: Tue Oct 29 00:32:04 2019 +0530 b43: main: Fix use true/false for bool type use true/false on bool type variable assignment. Signed-off-by: Saurav Girepunje Signed-off-by: Kalle Valo commit cbbd7f9a5e76e21a3d2ad8b0df030d1200a02110 Author: Saurav Girepunje Date: Tue Oct 29 00:21:30 2019 +0530 rtlwifi: rtl8192c: Drop condition with no effect As the "else if" and "else" branch body are identical the condition has no effect. So drop the "else if" condition. Signed-off-by: Saurav Girepunje Signed-off-by: Kalle Valo commit baff8da6e1636420ce04cadd6df56e137fa6e005 Author: Colin Ian King Date: Fri Oct 25 12:30:56 2019 +0100 rtw88: remove redundant null pointer check on arrays The checks to see if swing_table->n or swing_table->p are null are redundant since n and p are arrays and can never be null if swing_table is non-null. I believe these are redundant checks and can be safely removed, especially the checks implies that these are not arrays which can lead to confusion. Addresses-Coverity: ("Array compared against 0") Fixes: c97ee3e0bea2 ("rtw88: add power tracking support") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 5195b904264098839144d08d23c600811de2e2da Author: Yan-Hsuan Chuang Date: Fri Oct 25 17:33:45 2019 +0800 rtw88: avoid FW info flood The FW info was printed everytime driver is powered on, such as leaving IDLE state. It will flood the kernel log. Move the FW info printing to callback when FW is loaded, so that will only be printed once when device is probed. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 18a0696e85fde169e0109aa61d0505b2b935b59d Author: Tzu-En Huang Date: Fri Oct 25 17:33:44 2019 +0800 rtw88: fix potential read outside array boundary The level of cckpd is from 0 to 4, and it is the index of array pd_lvl[] and cs_lvl[]. However, the length of both arrays are 4, which is smaller than the possible maximum input index. Enumerate cck level to make sure the max level will not be wrong if new level is added in future. Fixes: 479c4ee931a6 ("rtw88: add dynamic cck pd mechanism") Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit ff0dfe5b0377c075986e8ac1c1516f5fbdb15b15 Author: Yan-Hsuan Chuang Date: Fri Oct 25 17:33:43 2019 +0800 rtw88: rearrange if..else statements for rx rate indexes Driver just memset() rx_status to 0 before assigning rate indexes. And driver could never hit the 'else' because the driver checks if 'pkt_stat->rate >= DESC_RATEMCS0', so the 'else' statement can be removed. Also rearrange the if..else statements because DESC_RATEMCS0 is actually larger than DESC_RATE1M ~ DESC_RATE54M, move the check of 'pkt_stat->rate >= DESC_RATEMCS0' to the last to keep an increasing order. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 0b8db87da54178717d302ca5dc09285ad4922abc Author: Yan-Hsuan Chuang Date: Fri Oct 25 17:33:41 2019 +0800 rtw88: use rtw_phy_pg_cfg_pair struct, not arrays Use proper struct for BB PG tables. TODO: we need to find a way to store the tables that have condition values. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 7436a470b5835d4d06c9453736bc1d2e9b29a07e Author: Yan-Hsuan Chuang Date: Fri Oct 25 17:33:40 2019 +0800 rtw88: 8822b: add RFE type 3 support Some of the modules use RFE type 3, add corresponding tables for them. Tested-by: G.schlmm Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit a969cf42e5fecbbcc04354dd22b851daa6ab5b30 Author: Yan-Hsuan Chuang Date: Fri Oct 25 16:32:00 2019 +0800 rtw88: fix sparse warnings for power tracking sparse warnings: drivers/net/wireless/realtek/rtw88/rtw8822b.c:1440:6: sparse: sparse: symbol 'rtw8822b_pwr_track' was not declared. Should it be static? drivers/net/wireless/realtek/rtw88/rtw8822c.c:1008:6: sparse: sparse: symbol 'rtw8822c_pwrtrack_init' was not declared. Should it be static? Fixes: c97ee3e0bea2 ("rtw88: add power tracking support") Reported-by: kbuild test robot Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 1f592108bbd0c7eecfb0e60fd8f6690e134dc254 Author: Yan-Hsuan Chuang Date: Fri Oct 25 16:31:59 2019 +0800 rtw88: fix sparse warnings for DPK sparse warnings: drivers/net/wireless/realtek/rtw88/rtw8822c.c:2871:6: sparse: sparse: symbol 'rtw8822c_dpk_cal_coef1' was not declared. Should it be static? drivers/net/wireless/realtek/rtw88/rtw8822c.c:3112:6: sparse: sparse: symbol 'rtw8822c_dpk_track' was not declared. Should it be static? Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support") Reported-by: kbuild test robot Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit ddd1bbbae486ff5913c8fc72c853dcea60713236 Author: Colin Ian King Date: Fri Oct 25 14:12:27 2019 +0100 extcon: sm5502: remove redundant assignment to variable cable_type The variable cable_type is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Chanwoo Choi commit d86784fe9b037baf06a154283a4e8cff46b6fe2f Merge: 21d8bd123ac4 9ae6b78708a7 Author: David S. Miller Date: Wed Oct 30 18:07:51 2019 -0700 Merge branch 'Control-action-percpu-counters-allocation-by-netlink-flag' Vlad Buslov says: ==================== Control action percpu counters allocation by netlink flag Currently, significant fraction of CPU time during TC filter allocation is spent in percpu allocator. Moreover, percpu allocator is protected with single global mutex which negates any potential to improve its performance by means of recent developments in TC filter update API that removed rtnl lock for some Qdiscs and classifiers. In order to significantly improve filter update rate and reduce memory usage we would like to allow users to skip percpu counters allocation for specific action if they don't expect high traffic rate hitting the action, which is a reasonable expectation for hardware-offloaded setup. In that case any potential gains to software fast-path performance gained by usage of percpu-allocated counters compared to regular integer counters protected by spinlock are not important, but amount of additional CPU and memory consumed by them is significant. In order to allow configuring action counters allocation type at runtime, implement following changes: - Implement helper functions to update the action counters and use them in affected actions instead of updating counters directly. This steps abstracts actions implementation from counter types that are being used for particular action instance at runtime. - Modify the new helpers to use percpu counters if they were allocated during action initialization and use regular counters otherwise. - Extend action UAPI TCA_ACT space with TCA_ACT_FLAGS field. Add TCA_ACT_FLAGS_NO_PERCPU_STATS action flag and update hardware-offloaded actions to not allocate percpu counters when the flag is set. With this changes users that prefer action update slow-path speed over software fast-path speed can dynamically request actions to skip percpu counters allocation without affecting other users. Now, lets look at actual performance gains provided by this change. Simple test is used to measure insertion rate - iproute2 TC is executed in parallel by xargs in batch mode, its total execution time is measured by shell builtin "time" command. The command runs 20 concurrent tc instances, each with its own batch file with 100k rules: $ time ls add* | xargs -n 1 -P 20 sudo tc -b Two main rule profiles are tested. First is simple L2 flower classifier with single gact drop action. The configuration is chosen as worst case scenario because with single-action rules pressure on percpu allocator is minimized. Example rule: filter add dev ens1f0 protocol ip ingress prio 1 handle 1 flower skip_hw src_mac e4:11:0:0:0:0 dst_mac e4:12:0:0:0:0 action drop Second profile is typical real-world scenario that uses flower classifier with some L2-4 fields and two actions (tunnel_key+mirred). Example rule: filter add dev ens1f0_0 protocol ip ingress prio 1 handle 1 flower skip_hw src_mac e4:11:0:0:0:0 dst_mac e4:12:0:0:0:0 src_ip 192.168.111.1 dst_ip 192.168.111.2 ip_proto udp dst_port 1 src_port 1 action tunnel_key set id 1 src_ip 2.2.2.2 dst_ip 2.2.2.3 dst_port 4789 action mirred egress redirect dev vxlan1 Profile | percpu | no_percpu | X improvement | (k rules/sec) | (k rules/sec) | -------------------+---------------+---------------+--------------- Gact drop | 203 | 259 | 1.28 tunnel_key+mirred | 92 | 204 | 2.22 For simple drop action removing percpu allocation leads to ~25% insertion rate improvement. Perf profiles highlights the bottlenecks. Perf profile of run with percpu allocation (gact drop): + 89.11% 0.48% tc [kernel.vmlinux] [k] entry_SYSCALL_64 + 88.58% 0.04% tc [kernel.vmlinux] [k] do_syscall_64 + 87.50% 0.04% tc libc-2.29.so [.] __libc_sendmsg + 86.96% 0.04% tc [kernel.vmlinux] [k] __sys_sendmsg + 86.85% 0.01% tc [kernel.vmlinux] [k] ___sys_sendmsg + 86.60% 0.05% tc [kernel.vmlinux] [k] sock_sendmsg + 86.55% 0.12% tc [kernel.vmlinux] [k] netlink_sendmsg + 86.04% 0.13% tc [kernel.vmlinux] [k] netlink_unicast + 85.42% 0.03% tc [kernel.vmlinux] [k] netlink_rcv_skb + 84.68% 0.04% tc [kernel.vmlinux] [k] rtnetlink_rcv_msg + 84.56% 0.24% tc [kernel.vmlinux] [k] tc_new_tfilter + 75.73% 0.65% tc [cls_flower] [k] fl_change + 71.30% 0.03% tc [kernel.vmlinux] [k] tcf_exts_validate + 71.27% 0.13% tc [kernel.vmlinux] [k] tcf_action_init + 71.06% 0.01% tc [kernel.vmlinux] [k] tcf_action_init_1 + 70.41% 0.04% tc [act_gact] [k] tcf_gact_init + 53.59% 1.21% tc [kernel.vmlinux] [k] __mutex_lock.isra.0 + 52.34% 0.34% tc [kernel.vmlinux] [k] tcf_idr_create - 51.23% 2.17% tc [kernel.vmlinux] [k] pcpu_alloc - 49.05% pcpu_alloc + 39.35% __mutex_lock.isra.0 4.99% memset_erms + 2.16% pcpu_alloc_area + 2.17% __libc_sendmsg + 45.89% 44.33% tc [kernel.vmlinux] [k] osq_lock + 9.94% 0.04% tc [kernel.vmlinux] [k] tcf_idr_check_alloc + 7.76% 0.00% tc [kernel.vmlinux] [k] tcf_idr_insert + 6.50% 0.03% tc [kernel.vmlinux] [k] tfilter_notify + 6.24% 6.11% tc [kernel.vmlinux] [k] mutex_spin_on_owner + 5.73% 5.32% tc [kernel.vmlinux] [k] memset_erms + 5.31% 0.18% tc [kernel.vmlinux] [k] tcf_fill_node Here bottleneck is clearly in pcpu_alloc() function that takes more than half CPU time, which is mostly wasted busy-waiting for internal percpu allocator global lock. With percpu allocation removed (gact drop): + 87.50% 0.51% tc [kernel.vmlinux] [k] entry_SYSCALL_64 + 86.94% 0.07% tc [kernel.vmlinux] [k] do_syscall_64 + 85.75% 0.04% tc libc-2.29.so [.] __libc_sendmsg + 85.00% 0.07% tc [kernel.vmlinux] [k] __sys_sendmsg + 84.84% 0.07% tc [kernel.vmlinux] [k] ___sys_sendmsg + 84.59% 0.01% tc [kernel.vmlinux] [k] sock_sendmsg + 84.58% 0.14% tc [kernel.vmlinux] [k] netlink_sendmsg + 83.95% 0.12% tc [kernel.vmlinux] [k] netlink_unicast + 83.34% 0.01% tc [kernel.vmlinux] [k] netlink_rcv_skb + 82.39% 0.12% tc [kernel.vmlinux] [k] rtnetlink_rcv_msg + 82.16% 0.25% tc [kernel.vmlinux] [k] tc_new_tfilter + 75.13% 0.84% tc [cls_flower] [k] fl_change + 69.92% 0.05% tc [kernel.vmlinux] [k] tcf_exts_validate + 69.87% 0.11% tc [kernel.vmlinux] [k] tcf_action_init + 69.61% 0.02% tc [kernel.vmlinux] [k] tcf_action_init_1 - 68.80% 0.10% tc [act_gact] [k] tcf_gact_init - 68.70% tcf_gact_init + 36.08% tcf_idr_check_alloc + 31.88% tcf_idr_insert + 63.72% 0.58% tc [kernel.vmlinux] [k] __mutex_lock.isra.0 + 58.80% 56.68% tc [kernel.vmlinux] [k] osq_lock + 36.08% 0.04% tc [kernel.vmlinux] [k] tcf_idr_check_alloc + 31.88% 0.01% tc [kernel.vmlinux] [k] tcf_idr_insert The gact actions (like all other actions types) are inserted in single idr instance protected by global (per namespace) lock that becomes new bottleneck with such simple rule profile and prevents achieving 2x+ performance increase that can be expected by looking at profiling data for insertion action with percpu counter. Perf profile of run with percpu allocation (tunnel_key+mirred): + 91.95% 0.21% tc [kernel.vmlinux] [k] entry_SYSCALL_64 + 91.74% 0.06% tc [kernel.vmlinux] [k] do_syscall_64 + 90.74% 0.01% tc libc-2.29.so [.] __libc_sendmsg + 90.52% 0.01% tc [kernel.vmlinux] [k] __sys_sendmsg + 90.50% 0.04% tc [kernel.vmlinux] [k] ___sys_sendmsg + 90.41% 0.02% tc [kernel.vmlinux] [k] sock_sendmsg + 90.38% 0.04% tc [kernel.vmlinux] [k] netlink_sendmsg + 90.10% 0.06% tc [kernel.vmlinux] [k] netlink_unicast + 89.76% 0.01% tc [kernel.vmlinux] [k] netlink_rcv_skb + 89.28% 0.04% tc [kernel.vmlinux] [k] rtnetlink_rcv_msg + 89.15% 0.03% tc [kernel.vmlinux] [k] tc_new_tfilter + 83.41% 0.33% tc [cls_flower] [k] fl_change + 81.17% 0.04% tc [kernel.vmlinux] [k] tcf_exts_validate + 81.13% 0.06% tc [kernel.vmlinux] [k] tcf_action_init + 81.04% 0.04% tc [kernel.vmlinux] [k] tcf_action_init_1 - 73.59% 2.16% tc [kernel.vmlinux] [k] pcpu_alloc - 71.42% pcpu_alloc + 61.41% __mutex_lock.isra.0 5.02% memset_erms + 2.93% pcpu_alloc_area + 2.16% __libc_sendmsg + 63.58% 0.17% tc [kernel.vmlinux] [k] tcf_idr_create + 63.40% 0.60% tc [kernel.vmlinux] [k] __mutex_lock.isra.0 + 57.85% 56.38% tc [kernel.vmlinux] [k] osq_lock + 46.27% 0.13% tc [act_tunnel_key] [k] tunnel_key_init + 34.26% 0.02% tc [act_mirred] [k] tcf_mirred_init + 10.99% 0.00% tc [kernel.vmlinux] [k] dst_cache_init + 5.32% 5.11% tc [kernel.vmlinux] [k] memset_erms With two times more actions pressure on percpu allocator doubles, so now it takes ~74% of CPU execution time. With percpu allocation removed (tunnel_key+mirred): + 86.02% 0.50% tc [kernel.vmlinux] [k] entry_SYSCALL_64 + 85.51% 0.12% tc [kernel.vmlinux] [k] do_syscall_64 + 84.40% 0.03% tc libc-2.29.so [.] __libc_sendmsg + 83.84% 0.03% tc [kernel.vmlinux] [k] __sys_sendmsg + 83.72% 0.01% tc [kernel.vmlinux] [k] ___sys_sendmsg + 83.56% 0.01% tc [kernel.vmlinux] [k] sock_sendmsg + 83.50% 0.08% tc [kernel.vmlinux] [k] netlink_sendmsg + 83.02% 0.17% tc [kernel.vmlinux] [k] netlink_unicast + 82.48% 0.00% tc [kernel.vmlinux] [k] netlink_rcv_skb + 81.89% 0.11% tc [kernel.vmlinux] [k] rtnetlink_rcv_msg + 81.71% 0.25% tc [kernel.vmlinux] [k] tc_new_tfilter + 73.99% 0.63% tc [cls_flower] [k] fl_change + 69.72% 0.00% tc [kernel.vmlinux] [k] tcf_exts_validate + 69.72% 0.09% tc [kernel.vmlinux] [k] tcf_action_init + 69.53% 0.05% tc [kernel.vmlinux] [k] tcf_action_init_1 + 53.08% 0.91% tc [kernel.vmlinux] [k] __mutex_lock.isra.0 + 45.52% 43.99% tc [kernel.vmlinux] [k] osq_lock - 36.02% 0.21% tc [act_tunnel_key] [k] tunnel_key_init - 35.81% tunnel_key_init + 15.95% tcf_idr_check_alloc + 13.91% tcf_idr_insert - 4.70% dst_cache_init + 4.68% pcpu_alloc + 33.22% 0.04% tc [kernel.vmlinux] [k] tcf_idr_check_alloc + 32.34% 0.05% tc [act_mirred] [k] tcf_mirred_init + 28.24% 0.01% tc [kernel.vmlinux] [k] tcf_idr_insert + 7.79% 0.05% tc [kernel.vmlinux] [k] idr_alloc_u32 + 7.67% 7.35% tc [kernel.vmlinux] [k] idr_get_free + 6.46% 6.22% tc [kernel.vmlinux] [k] mutex_spin_on_owner + 5.11% 0.05% tc [kernel.vmlinux] [k] tfilter_notify With percpu allocation removed insertion rate is increased by ~120%. Such rule profile scales much better than simple single action because both types of actions were competing for single lock in percpu allocator, but not for action idr lock, which is per-action. Note that percpu allocator is still used by dst_cache in tunnel_key actions and consumes 4.68% CPU time. Dst_cache seems like good opportunity for further insertion rate optimization but is not addressed by this change. Another improvement provided by this change is significantly reduced memory usage. The test is implemented by sampling "used memory" value from "vmstat -s" command output. Following table includes memory usage measurements for same two configurations that were used for measuring insertion rate: Profile | Mem per rule | Mem per rule no_percpu | Less memory used | (KB) | (KB) | (KB) -------------------+--------------+------------------------+------------------ Gact drop | 3.91 | 2.51 | 1.4 tunnel_key+mirred | 6.73 | 3.91 | 2.8 Results indicate that memory usage of percpu allocator per action is ~1.4 KB. Note that any measurements of percpu allocator memory usage is inherently tied to particular setup since memory usage is linear to number of cores in system. It is to be expected that on current top of the line servers percpu allocator memory usage will be 2-5x more than on 24 CPUs setup that was used for testing. Setup details: 2x Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 32GB memory Patches applied on top of net-next branch: commit 2203cbf2c8b58a1e3bef98c47531d431d11639a0 (net-next) Author: Russell King Date: Tue Oct 15 11:38:39 2019 +0100 net: sfp: move fwnode parsing into sfp-bus layer Changes V1 -> V2: - Include memory measurements. ==================== Signed-off-by: David S. Miller commit 9ae6b78708a7975c1e6b26134c5090671aafbd92 Author: Vlad Buslov Date: Wed Oct 30 16:09:07 2019 +0200 tc-testing: implement tests for new fast_init action flag Add basic tests to verify action creation with new fast_init flag for all actions that support the flag. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit e38226786022d2d8e5876ab7bc37e82b0eb57e65 Author: Vlad Buslov Date: Wed Oct 30 16:09:06 2019 +0200 net: sched: update action implementations to support flags Extend struct tc_action with new "tcfa_flags" field. Set the field in tcf_idr_create() function and provide new helper tcf_idr_create_from_flags() that derives 'cpustats' boolean from flags value. Update individual hardware-offloaded actions init() to pass their "flags" argument to new helper in order to skip percpu stats allocation when user requested it through flags. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit abbb0d33632ce931ca9c814813ee131351f6b92f Author: Vlad Buslov Date: Wed Oct 30 16:09:05 2019 +0200 net: sched: extend TCA_ACT space with TCA_ACT_FLAGS Extend TCA_ACT space with nla_bitfield32 flags. Add TCA_ACT_FLAGS_NO_PERCPU_STATS as the only allowed flag. Parse the flags in tcf_action_init_1() and pass resulting value as additional argument to a_o->init(). Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 5e174d5e73dfbfb2c4bc4804f58f2f2aa34c9281 Author: Vlad Buslov Date: Wed Oct 30 16:09:04 2019 +0200 net: sched: modify stats helper functions to support regular stats Modify stats update helper functions introduced in previous patches in this series to fallback to regular tc_action->tcfa_{b|q}stats if cpu stats are not allocated for the action argument. If regular non-percpu allocated counters are in use, then obtain action tcfa_lock while modifying them. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit ef816f3c49c1c404ababc50e10d4cbe5109da678 Author: Vlad Buslov Date: Wed Oct 30 16:09:03 2019 +0200 net: sched: don't expose action qstats to skb_tc_reinsert() Previous commit introduced helper function for updating qstats and refactored set of actions to use the helpers, instead of modifying qstats directly. However, one of the affected action exposes its qstats to skb_tc_reinsert(), which then modifies it. Refactor skb_tc_reinsert() to return integer error code and don't increment overlimit qstats in case of error, and use the returned error code in tcf_mirred_act() to manually increment the overlimit counter with new helper function. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 26b537a88ca5b7399c7ab0656e06dbd9da9513c1 Author: Vlad Buslov Date: Wed Oct 30 16:09:02 2019 +0200 net: sched: extract qstats update code into functions Extract common code that increments cpu_qstats counters into standalone act API functions. Change hardware offloaded actions that use percpu counter allocation to use the new functions instead of accessing cpu_qstats directly. This commit doesn't change functionality. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 5e1ad95b630e652d3467d1fd1f0b5e5ea2c441e2 Author: Vlad Buslov Date: Wed Oct 30 16:09:01 2019 +0200 net: sched: extract bstats update code into function Extract common code that increments cpu_bstats counter into standalone act API function. Change hardware offloaded actions that use percpu counter allocation to use the new function instead of incrementing cpu_bstats directly. This commit doesn't change functionality. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit c8ecebd04cbb6badb46d42fe54282e7883ed63cc Author: Vlad Buslov Date: Wed Oct 30 16:09:00 2019 +0200 net: sched: extract common action counters update code into function Currently, all implementations of tc_action_ops->stats_update() callback have almost exactly the same implementation of counters update code (besides gact which also updates drop counter). In order to simplify support for using both percpu-allocated and regular action counters depending on run-time flag in following patches, extract action counters update code into standalone function in act API. This commit doesn't change functionality. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit af91acbc62999d62e2ca1e80f660d20561ca55d3 Author: Alexei Starovoitov Date: Wed Oct 30 16:30:19 2019 -0700 bpf: Fix bpf jit kallsym access Jiri reported crash when JIT is on, but net.core.bpf_jit_kallsyms is off. bpf_prog_kallsyms_find() was skipping addr->bpf_prog resolution logic in oops and stack traces. That's incorrect. It should only skip addr->name resolution for 'cat /proc/kallsyms'. That's what bpf_jit_kallsyms and bpf_jit_harden protect. Fixes: 3dec541b2e63 ("bpf: Add support for BTF pointers to x86 JIT") Reported-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191030233019.1187404-1-ast@kernel.org commit 21d8bd123ac4f2223728901f0f26c90d1cbd42e3 Author: Christophe JAILLET Date: Wed Oct 30 07:36:40 2019 +0100 net: qrtr: Simplify 'qrtr_tun_release()' Use 'skb_queue_purge()' instead of re-implementing it. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit dba7bf0348e47c2adc2994e811473ef3cd216e3b Merge: 84e93d999a67 203bddfdfb6c Author: David S. Miller Date: Wed Oct 30 17:51:25 2019 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2019-10-29 This series contains updates to e1000e, igb, ixgbe and i40e drivers. Sasha adds support for Intel client platforms Comet Lake and Tiger Lake to the e1000e driver. Also adds a fix for a compiler warning that was recently introduced, when CONFIG_PM_SLEEP is not defined, so wrap the code that requires this kernel configuration to be defined. Alex fixes a potential race condition between network configuration and power management for e1000e, which is similar to a past issue in the igb driver. Also provided a bit of code cleanup since the driver no longer checks for __E1000_DOWN. Josh Hunt adds UDP segmentation offload support for igb, ixgbe and i40e. ==================== Signed-off-by: David S. Miller commit 84e93d999a677ee3229e244e9eb29209c3bb6677 Author: zhong jiang Date: Wed Oct 30 10:55:34 2019 +0800 wimax: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file operation rather than DEFINE_SIMPLE_ATTRIBUTE. It is detected with the help of coccinelle. Signed-off-by: zhong jiang Signed-off-by: David S. Miller commit a2a1a13b81e65d20302e0e2ef84cac1f15979011 Author: Heiner Kallweit Date: Tue Oct 29 22:32:48 2019 +0100 net: dsa: add ethtool pause configuration support This patch adds glue logic to make pause settings per port configurable vie ethtool. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 1d7a55267faebe3e16c0748b2beafe53cfab9f70 Author: Guillaume Nault Date: Tue Oct 29 21:57:10 2019 +0100 vxlan: drop "vxlan" parameter in vxlan_fdb_alloc() This parameter has never been used. Signed-off-by: Guillaume Nault Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit a319fb52e4b399927d4beb075d6112641ecedf16 Author: Heiner Kallweit Date: Tue Oct 29 20:25:26 2019 +0100 net: phy: marvell: add downshift support for 88E1145 Add downshift support for 88E1145, it uses the same downshift configuration registers as 88E1111. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 29f52875ba99d6002555f60c9a840072660112c2 Merge: c4917bfc3a6f 58deb77cc52d Author: David S. Miller Date: Wed Oct 30 17:21:35 2019 -0700 Merge branch 'ICMP-flow-improvements' Matteo Croce says: ==================== ICMP flow improvements This series improves the flow inspector handling of ICMP packets: The first two patches just add some comments in the code which would have saved me a few minutes of time, and refactor a piece of code. The third one adds to the flow inspector the capability to extract the Identifier field, if present, so echo requests and replies are classified as part of the same flow. The fourth patch uses the function introduced earlier to the bonding driver, so echo replies can be balanced across bonding slaves. v1 -> v2: - remove unused struct members - add an helper to check for the Id field - use a local flow_dissector_key in the bonding to avoid changing behaviour of the flow dissector ==================== Signed-off-by: David S. Miller commit 58deb77cc52da9360d20676e68dd215742cbe473 Author: Matteo Croce Date: Tue Oct 29 14:50:53 2019 +0100 bonding: balance ICMP echoes in layer3+4 mode The bonding uses the L4 ports to balance flows between slaves. As the ICMP protocol has no ports, those packets are sent all to the same device: # tcpdump -qltnni veth0 ip |sed 's/^/0: /' & # tcpdump -qltnni veth1 ip |sed 's/^/1: /' & # ping -qc1 192.168.0.2 1: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 315, seq 1, length 64 1: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 315, seq 1, length 64 # ping -qc1 192.168.0.2 1: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 316, seq 1, length 64 1: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 316, seq 1, length 64 # ping -qc1 192.168.0.2 1: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 317, seq 1, length 64 1: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 317, seq 1, length 64 But some ICMP packets have an Identifier field which is used to match packets within sessions, let's use this value in the hash function to balance these packets between bond slaves: # ping -qc1 192.168.0.2 0: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 303, seq 1, length 64 0: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 303, seq 1, length 64 # ping -qc1 192.168.0.2 1: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 304, seq 1, length 64 1: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 304, seq 1, length 64 Aso, let's use a flow_dissector_key which defines FLOW_DISSECTOR_KEY_ICMP, so we can balance pings encapsulated in a tunnel when using mode encap3+4: # ping -q 192.168.1.2 -c1 0: IP 192.168.0.1 > 192.168.0.2: GREv0, length 102: IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 585, seq 1, length 64 0: IP 192.168.0.2 > 192.168.0.1: GREv0, length 102: IP 192.168.1.2 > 192.168.1.1: ICMP echo reply, id 585, seq 1, length 64 # ping -q 192.168.1.2 -c1 1: IP 192.168.0.1 > 192.168.0.2: GREv0, length 102: IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 586, seq 1, length 64 1: IP 192.168.0.2 > 192.168.0.1: GREv0, length 102: IP 192.168.1.2 > 192.168.1.1: ICMP echo reply, id 586, seq 1, length 64 Signed-off-by: Matteo Croce Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 5dec597e5cd0f4c3000d120508efa64157d5bd7a Author: Matteo Croce Date: Tue Oct 29 14:50:52 2019 +0100 flow_dissector: extract more ICMP information The ICMP flow dissector currently parses only the Type and Code fields. Some ICMP packets (echo, timestamp) have a 16 bit Identifier field which is used to correlate packets. Add such field in flow_dissector_key_icmp and replace skb_flow_get_be16() with a more complex function which populate this field. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 3b336d6f4ec690b0082bcffe55bac22f234a41ff Author: Matteo Croce Date: Tue Oct 29 14:50:51 2019 +0100 flow_dissector: skip the ICMP dissector for non ICMP packets FLOW_DISSECTOR_KEY_ICMP is checked for every packet, not only ICMP ones. Even if the test overhead is probably negligible, move the ICMP dissector code under the big 'switch(ip_proto)' so it gets called only for ICMP packets. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 98298e6ca6d5908f96e529e70a254a4d5bf754e7 Author: Matteo Croce Date: Tue Oct 29 14:50:50 2019 +0100 flow_dissector: add meaningful comments Documents two piece of code which can't be understood at a glance. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 2d9c19044122b22624839fb5880885cbeb1832b7 Author: Daniele Ceraolo Spurio Date: Fri Oct 25 17:35:06 2019 -0700 drm/i915/uc: define GuC and HuC binaries for TGL GuC 35.2.0 and HuC 7.0.3 are the first production releases for TGL. GuC 35.2 for Gen12 is interface-compatible with 33.0 on older Gens, because the differences are related to additional blocks/commands in the interface to support new Gen12 features. These parts of the interface will be added when the relevant features are enabled. v2: fix typos (Michal) Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Anusha Srivatsa Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20191026003507.21769-1-daniele.ceraolospurio@intel.com commit fae7d7d5f374eadbb0b5dd31b39162e7176e9c3d Author: Sean Paul Date: Wed Oct 30 16:29:54 2019 -0400 Revert "dma-buf: Add dma-buf heaps framework" This reverts commit a69b0e855d3fd278ff6f09a23e1edf929538e304. This patchset doesn't meet the UAPI requirements set out in [1] for the DRM subsystem. Once the userspace component is reviewed and ready for merge we can try again. [1]- https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements Fixes: a69b0e855d3f ("dma-buf: Add dma-buf heaps framework") Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Cc: Brian Starkey Cc: John Stultz Cc: Mauro Carvalho Chehab Cc: "David S. Miller" Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Jonathan Cameron Cc: "Paul E. McKenney" Cc: Sean Paul Cc: "Andrew F. Davis" Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Acked-by: David Airlie Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191030203003.101156-6-sean@poorly.run commit 837324d435542ef7c6d4545b48d52833a3c0c5d3 Author: Sean Paul Date: Wed Oct 30 16:29:53 2019 -0400 Revert "dma-buf: heaps: Add heap helpers" This reverts commit 7b87ea704fd9606eaafa9150116536d72f5c4b1f. This patchset doesn't meet the UAPI requirements set out in [1] for the DRM subsystem. Once the userspace component is reviewed and ready for merge we can try again. [1]- https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements Fixes: 7b87ea704fd9 ("dma-buf: heaps: Add heap helpers") Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Cc: Brian Starkey Cc: John Stultz Cc: "Andrew F. Davis" Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Acked-by: David Airlie Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191030203003.101156-5-sean@poorly.run commit d59c5e025081a4c1f4528010524a37ddc5a986be Author: Sean Paul Date: Wed Oct 30 16:29:52 2019 -0400 Revert "dma-buf: heaps: Add system heap to dmabuf heaps" This reverts commit 47a32f9c12266d450b92089148c6039591bd9909. This patchset doesn't meet the UAPI requirements set out in [1] for the DRM subsystem. Once the userspace component is reviewed and ready for merge we can try again. [1]- https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements Fixes: 47a32f9c1226 ("dma-buf: heaps: Add system heap to dmabuf heaps") Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Cc: Brian Starkey Cc: John Stultz Cc: "Andrew F. Davis" Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Acked-by: David Airlie Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191030203003.101156-4-sean@poorly.run commit 2e7f7cb2b50c6a10339c042a6013c2ad417176e1 Author: Sean Paul Date: Wed Oct 30 16:29:51 2019 -0400 Revert "dma-buf: heaps: Add CMA heap to dmabuf heaps" This reverts commit 43d7238fb9ac897b29912368b3359e72bae469c4. This patchset doesn't meet the UAPI requirements set out in [1] for the DRM subsystem. Once the userspace component is reviewed and ready for merge we can try again. [1]- https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements Fixes: 43d7238fb9ac ("dma-buf: heaps: Add CMA heap to dmabuf heaps") Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Cc: Brian Starkey Cc: John Stultz Cc: "Andrew F. Davis" Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Acked-by: David Airlie Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191030203003.101156-3-sean@poorly.run commit a262ef04364250ac37232349cf9ef33915411b35 Author: Sean Paul Date: Wed Oct 30 16:29:50 2019 -0400 Revert "kselftests: Add dma-heap test" This reverts commit ab87cc9754cdeb373c8ac030ac7aed92f450b767. This patchset doesn't meet the UAPI requirements set out in [1] for the DRM subsystem. Once the userspace component is reviewed and ready for merge we can try again. [1]- https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements Fixes: ab87cc9754cd ("kselftests: Add dma-heap test") Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Cc: Brian Starkey Cc: Laura Abbott Cc: John Stultz Cc: Sean Paul Acked-by: David Airlie Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191030203003.101156-2-sean@poorly.run commit 5866efa8cbfbadf3905072798e96652faf02dbe8 Author: Chuck Lever Date: Thu Oct 24 09:34:16 2019 -0400 SUNRPC: Fix svcauth_gss_proxy_init() gss_read_proxy_verf() assumes things about the XDR buffer containing the RPC Call that are not true for buffers generated by svc_rdma_recv(). RDMA's buffers look more like what the upper layer generates for sending: head is a kmalloc'd buffer; it does not point to a page whose contents are contiguous with the first page in the buffers' page array. The result is that ACCEPT_SEC_CONTEXT via RPC/RDMA has stopped working on Linux NFS servers that use gssproxy. This does not affect clients that use only TCP to send their ACCEPT_SEC_CONTEXT operation (that's all Linux clients). Other clients, like Solaris NFS clients, send ACCEPT_SEC_CONTEXT on the same transport as they send all other NFS operations. Such clients can send ACCEPT_SEC_CONTEXT via RPC/RDMA. I thought I had found every direct reference in the server RPC code to the rqstp->rq_pages field. Bug found at the 2019 Westford NFS bake-a-thon. Fixes: 3316f0631139 ("svcrdma: Persistently allocate and DMA- ... ") Signed-off-by: Chuck Lever Tested-by: Bill Baker Reviewed-by: Simo Sorce Signed-off-by: J. Bruce Fields commit ff27e9f748303e8567bfceb6d7ff264cbcaca2ef Author: Chuck Lever Date: Thu Oct 24 09:34:10 2019 -0400 SUNRPC: Trace gssproxy upcall results Record results of a GSS proxy ACCEPT_SEC_CONTEXT upcall and the svc_authenticate() function to make field debugging of NFS server Kerberos issues easier. Signed-off-by: Chuck Lever Reviewed-by: Bill Baker Signed-off-by: J. Bruce Fields commit c4917bfc3a6f768508e820c10294149de259fa74 Author: Roman Mashak Date: Wed Oct 30 15:08:43 2019 -0400 tc-testing: fixed two failing pedit tests Two pedit tests were failing due to incorrect operation value in matchPattern, should be 'add' not 'val', so fix it. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller commit c0bceb97db9efc72629dd00cd0d9812f24d4ba2d Author: Jon Maloy Date: Wed Oct 30 14:00:41 2019 +0100 tipc: add smart nagle feature We introduce a feature that works like a combination of TCP_NAGLE and TCP_CORK, but without some of the weaknesses of those. In particular, we will not observe long delivery delays because of delayed acks, since the algorithm itself decides if and when acks are to be sent from the receiving peer. - The nagle property as such is determined by manipulating a new 'maxnagle' field in struct tipc_sock. If certain conditions are met, 'maxnagle' will define max size of the messages which can be bundled. If it is set to zero no messages are ever bundled, implying that the nagle property is disabled. - A socket with the nagle property enabled enters nagle mode when more than 4 messages have been sent out without receiving any data message from the peer. - A socket leaves nagle mode whenever it receives a data message from the peer. In nagle mode, messages smaller than 'maxnagle' are accumulated in the socket write queue. The last buffer in the queue is marked with a new 'ack_required' bit, which forces the receiving peer to send a CONN_ACK message back to the sender upon reception. The accumulated contents of the write queue is transmitted when one of the following events or conditions occur. - A CONN_ACK message is received from the peer. - A data message is received from the peer. - A SOCK_WAKEUP pseudo message is received from the link level. - The write queue contains more than 64 1k blocks of data. - The connection is being shut down. - There is no CONN_ACK message to expect. I.e., there is currently no outstanding message where the 'ack_required' bit was set. As a consequence, the first message added after we enter nagle mode is always sent directly with this bit set. This new feature gives a 50-100% improvement of throughput for small (i.e., less than MTU size) messages, while it might add up to one RTT to latency time when the socket is in nagle mode. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 6c814e8c4e78c2b38e667a754edbe9dbaccdb698 Merge: 749234419aee a72afb6879bb Author: David S. Miller Date: Wed Oct 30 12:07:05 2019 -0700 Merge branch 'mlxsw-Update-firmware-version' Ido Schimmel says: ==================== mlxsw: Update firmware version This patch set updates the firmware version for Spectrum-1 and enforces a firmware version for Spectrum-2. The version adds support for querying port module type. It will be used by a followup patch set from Jiri to make port split code more generic. Patch #1 increases the size of an existing register in order to be compatible with the new firmware version. In the future the firmware will assign default values to fields not specified by the driver. Patch #2 temporarily increases the PCI reset timeout for SN3800 systems. Note that in normal cases the driver will need to wait no longer than 5 seconds for the device to become ready following reset command. Patch #3 bumps the firmware version for Spectrum-1. Patch #4 enforces a minimum firmware version for Spectrum-2. v2: * Added patch #2 ==================== Signed-off-by: David S. Miller commit a72afb6879bb427143230bd0d892801c16b528ea Author: Ido Schimmel Date: Wed Oct 30 11:34:51 2019 +0200 mlxsw: Enforce firmware version for Spectrum-2 In a similar fashion to Spectrum-1, enforce a specific firmware version for Spectrum-2 so that the driver and firmware are always in sync with regards to new features. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 5fd2ef46890625f79fe4650a47c2e86473845a5b Author: Ido Schimmel Date: Wed Oct 30 11:34:50 2019 +0200 mlxsw: Bump firmware version to 13.2000.2308 The version adds support for querying port module type. It will be used by a followup patch set from Jiri to make port split code more generic. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit ff298839b6737ccb512d0fe8c6bc241ee5a94c49 Author: Ido Schimmel Date: Wed Oct 30 11:34:49 2019 +0200 mlxsw: pci: Increase PCI reset timeout for SN3800 systems SN3800 Spectrum-2 based systems have gearboxes that need to be initialized by the firmware during its initialization flow. In certain cases, the firmware might need to flash these gearboxes, which is currently a time-consuming process. In newer firmware versions, the firmware will not signal to the driver that it is ready until the gearboxes are flashed. Increase the PCI reset timeout for these situations. In normal cases, the driver will need to wait no longer than 5 seconds. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5075066a77822edf416fa3001df1144ac6b848be Author: Ido Schimmel Date: Wed Oct 30 11:34:48 2019 +0200 mlxsw: reg: Increase size of MPAR register In new firmware versions this register is extended with a sampling rate for Spectrum-2 and future ASICs. Increase the size of the register to ensure the field is initialized to 0 which means every packet is mirrored. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit ca66536845cd55c6a5fccd82694dcc87ed970780 Author: Shyam Saini Date: Sun Oct 20 10:33:22 2019 +0530 kernel: dma-contiguous: mark CMA parameters __initdata/__initconst These parameters are only referenced by __init routine calls during early boot so they should be marked as __initdata and __initconst accordingly. Signed-off-by: Shyam Saini Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig commit 9ff6aa027dbb98755f0265695354f2dd07c0d1ce Author: Eric Dumazet Date: Mon Oct 28 14:56:46 2019 -0700 dma-debug: add a schedule point in debug_dma_dump_mappings() debug_dma_dump_mappings() can take a lot of cpu cycles : lpk43:/# time wc -l /sys/kernel/debug/dma-api/dump 163435 /sys/kernel/debug/dma-api/dump real 0m0.463s user 0m0.003s sys 0m0.459s Let's add a cond_resched() to avoid holding cpu for too long. Signed-off-by: Eric Dumazet Cc: Corentin Labbe Cc: Christoph Hellwig Cc: Marek Szyprowski Signed-off-by: Christoph Hellwig commit 4544b9f25e70eae9f70a243de0cc802aa5c8cb69 Author: Kees Cook Date: Tue Oct 29 14:34:22 2019 -0700 dma-mapping: Add vmap checks to dma_map_single() As we've seen from USB and other areas[1], we need to always do runtime checks for DMA operating on memory regions that might be remapped. This adds vmap checks (similar to those already in USB but missing in other places) into dma_map_single() so all callers benefit from the checking. [1] https://git.kernel.org/linus/3840c5b78803b2b6cc1ff820100a74a092c40cbb Suggested-by: Laura Abbott Signed-off-by: Kees Cook [hch: fixed the printk message] Signed-off-by: Christoph Hellwig commit a445e940ea686fc60475564009821010eb213be3 Author: Vladimir Murzin Date: Wed Oct 30 10:13:13 2019 +0000 dma-mapping: fix handling of dma-ranges for reserved memory (again) Daniele reported that issue previously fixed in c41f9ea998f3 ("drivers: dma-coherent: Account dma_pfn_offset when used with device tree") reappear shortly after 43fc509c3efb ("dma-coherent: introduce interface for default DMA pool") where fix was accidentally dropped. Lets put fix back in place and respect dma-ranges for reserved memory. Fixes: 43fc509c3efb ("dma-coherent: introduce interface for default DMA pool") Reported-by: Daniele Alessandrelli Tested-by: Daniele Alessandrelli Tested-by: Alexandre Torgue Signed-off-by: Vladimir Murzin Signed-off-by: Christoph Hellwig commit 89e551e83869732d5b9fd21d7cfdb1f8d62cf5d0 Author: Dan Carpenter Date: Tue Oct 29 21:27:42 2019 +0300 soc: samsung: exynos-asv: Potential NULL dereference in exynos_asv_update_opps() The dev_pm_opp_get_opp_table() returns error pointers if it's disabled in the config and it returns NULL if there is an error. This code only checks for error pointers so it could lead to an Oops inside the dev_pm_opp_put_opp_table() function. Fixes: 5ea428595cc5 ("soc: samsung: Add Exynos Adaptive Supply Voltage driver") Signed-off-by: Dan Carpenter Signed-off-by: Krzysztof Kozlowski commit 4e380d080be46079cc4a9a578e757ea902d81d08 Author: Ville Syrjälä Date: Tue Oct 29 16:55:26 2019 +0200 drm/i915: Stop frobbing crtc->base.mode The core no longer uses drm_crtc_state::mode with atomic drivers, so let's stop frobbing it in the driver. For the user mode readout we'll just use an on stack mode. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191029145526.10308-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 25f899544fb47490896ec92024d3c9dedc226528 Author: Ville Syrjälä Date: Tue Oct 29 15:23:23 2019 +0200 drm/i915: Nuke 'mode' argument to intel_get_load_detect_pipe() We always pass mode==NULL to intel_get_load_detect_pipe(). Remove the pointless function argument. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191029132323.18113-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8dcdfb7096a304130ab36fbb0f2961deaf863e5a Merge: b1ec18eae0b6 36b5dae64513 dd7dafd1ad50 a60a5746004d 67d64918a163 c58a80170169 Author: Paul E. McKenney Date: Wed Oct 30 08:47:13 2019 -0700 Merge branches 'doc.2019.10.29a', 'fixes.2019.10.30a', 'nohz.2019.10.28a', 'replace.2019.10.30a', 'torture.2019.10.05a' and 'lkmm.2019.10.05a' into HEAD doc.2019.10.29a: RCU documentation updates. fixes.2019.10.30a: RCU miscellaneous fixes. nohz.2019.10.28a: RCU NO_HZ and NO_HZ_FULL updates. replace.2019.10.30a: Replace rcu_swap_protected() with rcu_replace(). torture.2019.10.05a: RCU torture-test updates. lkmm.2019.10.05a: Linux kernel memory model updates. commit a60a5746004d7dbb68cbccd4c16d0529e2b2d1d9 Author: Paul E. McKenney Date: Fri Oct 4 15:07:09 2019 -0700 security/safesetid: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds Reported-by: Reported-by: kbuild test robot [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Cc: Micah Morton Cc: James Morris Cc: "Serge E. Hallyn" Cc: commit 445d3749315f34229dcfc3efd82796f97fc72e92 Author: Paul E. McKenney Date: Mon Sep 23 16:09:18 2019 -0700 net/sched: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Cc: "David S. Miller" Cc: Cc: commit b685b534bf1586a01b32280d1da39febaf270039 Author: Paul E. McKenney Date: Mon Sep 23 15:53:02 2019 -0700 net/netfilter: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Acked-by: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Cc: "David S. Miller" Cc: Cc: Cc: commit e3f0d761fcaec5d445c9280d6e09087dc32828d2 Author: Paul E. McKenney Date: Mon Sep 23 15:42:28 2019 -0700 net/core: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Cc: "David S. Miller" Cc: Jiri Pirko Cc: Eric Dumazet Cc: Ido Schimmel Cc: Petr Machata Cc: Paolo Abeni Cc: commit 6092f7263f7e56dacf72e383ed7ba9cbabec30e5 Author: Paul E. McKenney Date: Mon Sep 23 15:37:04 2019 -0700 bpf/cgroup: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Acked-by: Andrii Nakryiko Acked-by: Song Liu Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Martin KaFai Lau Cc: Yonghong Song Cc: Cc: commit 62860da7082e4f2440c6bc96e4710d9c8bfb916b Author: Paul E. McKenney Date: Mon Sep 23 15:28:28 2019 -0700 fs/afs: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Acked-by: David Howells Cc: Cc: commit c0eaf15cd5d39e79feb81a122975df0bb5a1c106 Author: Paul E. McKenney Date: Mon Sep 23 15:26:28 2019 -0700 drivers/scsi: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Acked-by: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: Cc: commit 1feace5d6a4a1acf44dde2bfb5c36cc0b1cf559c Author: Paul E. McKenney Date: Mon Sep 23 15:22:15 2019 -0700 drm/i915: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Reviewed-by: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Cc: David Airlie Cc: Daniel Vetter Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Cc: commit 12e78e6902134c9e49b2481c2515555e6f7b12dc Author: Paul E. McKenney Date: Mon Sep 23 15:15:35 2019 -0700 x86/kvm/pmu: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Acked-by: Paolo Bonzini Cc: "Radim Krčmář" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Cc: commit a63fc6b75cca984c71f095282e0227a390ba88f3 Author: Paul E. McKenney Date: Mon Sep 23 15:05:11 2019 -0700 rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer() Although the rcu_swap_protected() macro follows the example of swap(), the interactions with RCU make its update of its argument somewhat counter-intuitive. This commit therefore introduces an rcu_replace_pointer() that returns the old value of the RCU pointer instead of doing the argument update. Once all the uses of rcu_swap_protected() are updated to instead use rcu_replace_pointer(), rcu_swap_protected() will be removed. Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Cc: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Shane M Seymour Cc: Martin K. Petersen commit cf204a718357c3c28557cc6bdc77a3adc33d0741 Author: Shmulik Ladkani Date: Fri Oct 25 16:42:23 2019 +0300 bpf, testing: Introduce 'gso_linear_no_head_frag' skb_segment test Following reports of skb_segment() hitting a BUG_ON when working on GROed skbs which have their gso_size mangled (e.g. after a bpf_skb_change_proto call), add a reproducer test that mimics the input skbs that lead to the mentioned BUG_ON as in [1] and validates the fix submitted in [2]. [1] https://lists.openwall.net/netdev/2019/08/26/110 [2] commit 3dcbdb134f32 ("net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list") Signed-off-by: Shmulik Ladkani Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191025134223.2761-3-shmulik.ladkani@gmail.com commit af21c717f4757985771e2cee0b6e0cf21b831477 Author: Shmulik Ladkani Date: Fri Oct 25 16:42:22 2019 +0300 bpf, testing: Refactor test_skb_segment() for testing skb_segment() on different skbs Currently, test_skb_segment() builds a single test skb and runs skb_segment() on it. Extend test_skb_segment() so it processes an array of numerous skb/feature pairs to test. Signed-off-by: Shmulik Ladkani Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191025134223.2761-2-shmulik.ladkani@gmail.com commit 36b5dae64513b7ce3a0e0f6cb469e0f74bacad45 Author: Paul E. McKenney Date: Wed Sep 18 10:10:31 2019 -0700 rcu: Suppress levelspread uninitialized messages New tools bring new warnings, and with v5.3 comes: kernel/rcu/srcutree.c: warning: 'levelspread[]' may be used uninitialized in this function [-Wuninitialized]: => 121:34 This commit suppresses this warning by initializing the full array to INT_MIN, which will result in failures should any out-of-bounds references appear. Reported-by: Michael Ellerman Reported-by: Geert Uytterhoeven Signed-off-by: Paul E. McKenney Reviewed-by: Geert Uytterhoeven commit b8889c9c89a2655a231dfed93cc9bdca0930ea67 Author: Dan Carpenter Date: Mon Sep 23 17:26:34 2019 +0300 rcu: Fix uninitialized variable in nocb_gp_wait() We never set this to false. This probably doesn't affect most people's runtime because GCC will automatically initialize it to false at certain common optimization levels. But that behavior is related to a bug in GCC and obviously should not be relied on. Fixes: 5d6742b37727 ("rcu/nocb: Use rcu_segcblist for no-CBs CPUs") Signed-off-by: Dan Carpenter Signed-off-by: Paul E. McKenney commit 7cc0fffde6e4ff76be20d41a3577012fe584a559 Author: Paul E. McKenney Date: Wed Aug 21 10:34:25 2019 -0700 rcu: Update descriptions for rcu_future_grace_period tracepoint Signed-off-by: Paul E. McKenney commit d01f86206864e429839f6a4aeb90064f0c043ed9 Author: Paul E. McKenney Date: Wed Aug 21 10:29:06 2019 -0700 rcu: Update descriptions for rcu_nocb_wake tracepoint Signed-off-by: Paul E. McKenney commit 7eb54685c63cc9185a48d0d9c1ad25a34d4e1da0 Author: Paul E. McKenney Date: Tue Aug 20 16:55:21 2019 -0700 rcu: Remove obsolete descriptions for rcu_barrier tracepoint Signed-off-by: Paul E. McKenney commit 05ef9e9eb3dade21413680f41eb0170778e8ae2b Author: Joel Fernandes (Google) Date: Thu Aug 15 22:59:14 2019 -0400 rcu: Ensure that ->rcu_urgent_qs is set before resched IPI The RCU-specific resched_cpu() function sends a resched IPI to the specified CPU, which can be used to force the tick on for a given nohz_full CPU. This is needed when this nohz_full CPU is looping in the kernel while blocking the current grace period. However, for the tick to actually be forced on in all cases, that CPU's rcu_data structure's ->rcu_urgent_qs flag must be set beforehand. This commit therefore causes rcu_implicit_dynticks_qs() to set this flag prior to invoking resched_cpu() on a holdout nohz_full CPU. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 5a6446626d7e062b47a5cc1cf27d5060e60bb0d9 Author: Joel Fernandes (Google) Date: Thu Aug 15 10:18:42 2019 -0400 workqueue: Convert for_each_wq to use built-in list check Because list_for_each_entry_rcu() can now check for holding a lock as well as for being in an RCU read-side critical section, this commit replaces the workqueue_sysfs_unregister() function's use of assert_rcu_or_wq_mutex() and list_for_each_entry_rcu() with list_for_each_entry_rcu() augmented with a lockdep_is_held() optional argument. Acked-by: Tejun Heo Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 1d24dd4e01fb6b928cf679e3e415ddff7016fa96 Author: kbuild test robot Date: Thu Aug 8 10:32:58 2019 +0800 rcu: Several rcu_segcblist functions can be static None of rcu_segcblist_set_len(), rcu_segcblist_add_len(), or rcu_segcblist_xchg_len() are used outside of kernel/rcu/rcu_segcblist.c. This commit therefore makes them static. Fixes: eda669a6a2c5 ("rcu/nocb: Atomic ->len field in rcu_segcblist structure") Signed-off-by: kbuild test robot [ paulmck: "Fixes:" updated per Stephen Rothwell feedback. ] Signed-off-by: Paul E. McKenney commit 8e6af017f4b1da9cdd2b55ce83853df8e167b4d3 Author: Ethan Hansen <1ethanhansen@gmail.com> Date: Fri Aug 2 13:37:58 2019 -0700 rcu: Remove unused function hlist_bl_del_init_rcu() The function hlist_bl_del_init_rcu() is declared in rculist_bl.h, but never used. This commit therefore removes it. Signed-off-by: Ethan Hansen <1ethanhansen@gmail.com> Signed-off-by: Paul E. McKenney commit 7e07e7aec56984364c7e16d242a0ec97b91861a8 Author: Ilya Leoshkevich Date: Tue Oct 29 18:29:16 2019 +0100 bpf: Add s390 testing documentation This commits adds a document that explains how to test BPF in an s390 QEMU guest. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191029172916.36528-1-iii@linux.ibm.com commit 8df81af177e111259540bf55519ef76d70204be2 Merge: fedc8844d500 308607e5545f Author: Tony Lindgren Date: Wed Oct 30 08:25:14 2019 -0700 Merge branch 'rng' into omap-for-v5.5/dt commit 9ffccb76062ab882e45bbfb9d370e366c27fa04b Author: Ilya Leoshkevich Date: Tue Oct 29 15:30:27 2019 +0100 selftests/bpf: Test narrow load from bpf_sysctl.write There are tests for full and narrows loads from bpf_sysctl.file_pos, but for bpf_sysctl.write only full load is tested. Add the missing test. Suggested-by: Andrey Ignatov Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Acked-by: Andrey Ignatov Link: https://lore.kernel.org/bpf/20191029143027.28681-1-iii@linux.ibm.com commit 15ab09bdca616538597fe4d2eb4db3c2d28716ba Author: Alexei Starovoitov Date: Mon Oct 28 20:24:26 2019 -0700 bpf: Enforce 'return 0' in BTF-enabled raw_tp programs The return value of raw_tp programs is ignored by __bpf_trace_run() that calls them. The verifier also allows any value to be returned. For BTF-enabled raw_tp lets enforce 'return 0', so that return value can be used for something in the future. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191029032426.1206762-1-ast@kernel.org commit 308607e5545f964ad3917919201ce4d9491f7fdb Author: Tony Lindgren Date: Wed Oct 23 11:39:42 2019 -0700 ARM: dts: Configure omap3 rng Looks like omap3 RNG is similar to the omap2 rng, let's get it working by configring the dts node for it. We must also add rng_ick to core_l4_clkdm as noted by Adam Ford. And please note that the RNG is likely disabled on HS devices. At least n900 does not have it accessible, and instead omap3-rom-rng driver must be used. So let's tag RNG as disabled on n900 as noted by Pali Rohár . On am3517 at least the clocks need to be configured to get it working as noted by Adam Ford, so let's tag it disabled for now. Cc: Aaro Koskinen Cc: Adam Ford Cc: Pali Rohár Cc: Sebastian Reichel Cc: Tero Kristo Tested-by: Adam Ford #logicpd-torpedo-37xx-devkit Signed-off-by: Tony Lindgren commit 5ab5e4e60accd13b0a505a4a34b6feafde2c8fbf Author: Nathan Chancellor Date: Tue Oct 29 23:04:11 2019 -0700 drm/amd/display: Add a conversion function for transmitter and phy_id enums Clang warns: ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2520:42: error: implicit conversion from enumeration type 'enum transmitter' to different enumeration type 'enum physical_phy_id' [-Werror,-Wenum-conversion] psr_context->smuPhyId = link->link_enc->transmitter; ~ ~~~~~~~~~~~~~~~~^~~~~~~~~~~ 1 error generated. As the comment above this assignment states, this is intentional. To match previous warnings of this nature, add a conversion function that explicitly converts between the enums and warns when there is a mismatch. See commit 828cfa29093f ("drm/amdgpu: Fix amdgpu ras to ta enums conversion") and commit d9ec5cfd5a2e ("drm/amd/display: Use switch table for dc_to_smu_clock_type") for previous examples of this. v2: use PHYLD_UNKNOWN for the default case. Fixes: e0d08a40a63b ("drm/amd/display: Add debugfs entry for reading psr state") Link: https://github.com/ClangBuiltLinux/linux/issues/758 Reviewed-by: Nicholas Kazlauskas Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit 5e8f5477f9d2819ea949dec4e9a68a34c7810989 Author: zhong jiang Date: Wed Oct 30 09:57:53 2019 +0800 drm/amd/display: remove redundant null pointer check before kfree kfree has taken null pointer into account. hence it is safe to remove the unnecessary check. Reviewed-by: Harry Wentland Signed-off-by: zhong jiang Signed-off-by: Alex Deucher commit 46203a508f64b4bfa150a9d25eab1dc891e7e650 Author: Alex Deucher Date: Tue Oct 29 17:14:15 2019 -0400 drm/amdgpu/gmc10: properly set BANK_SELECT and FRAGMENT_SIZE These were not aligned for optimal performance for GPUVM. Acked-by: Christian König Reviewed-by: Tianci Yin Signed-off-by: Alex Deucher commit 361d66edc5d25130729c0627d0197b6393a97a27 Author: Le Ma Date: Wed Oct 30 16:46:32 2019 +0800 drm/amdgpu: fix no ACK from LDS read during stress test for Arcturus Set mmSQ_CONFIG.DISABLE_SMEM_SOFT_CLAUSE as W/R. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 897110eed5084bb91731fd4e2bdcf5f536eaadfd Author: HaiJun Chang Date: Tue Oct 29 15:44:08 2019 +0800 drm/amdgpu: fix gfx VF FLR test fail on navi Cp wptr in wb buffer is outdated after VF FLR. The outdated wptr may cause cp to execute unexpected packets. Reset cp wptr in wb buffer. Signed-off-by: HaiJun Chang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit bff77e86a3776fab6859bc168ecda6ccf56bfbd2 Author: Le Ma Date: Fri Oct 25 17:48:52 2019 +0800 drm/amdgpu: bypass some cleanup work after err_event_athub (v2) PSP lost connection when err_event_athub occurs. These cleanup work can be skipped in BACO reset. v2: squash in missing include (Alex) Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8baaadba735565056788559933ec25cf3bc49785 Author: Le Ma Date: Fri Oct 25 16:50:53 2019 +0800 drm/amdgpu: clear UVD VCPU buffer when err_event_athub generated The err_event_athub error will mess up the buffer and cause UVD resume hang. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b4def3744ba811f5abc53750c71c52d71a2032b1 Author: Jiange Zhao Date: Mon Oct 28 18:04:14 2019 +0800 drm/amdgpu/SRIOV: SRIOV VF doesn't support BACO SRIOV VF doesn't support BACO. Only PF with BACO capability can do it. Signed-off-by: Jiange Zhao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 44b582b32a8aa8a7afc268e790868829e41e739a Author: Geert Uytterhoeven Date: Mon Oct 21 16:51:47 2019 +0200 drm/amdgpu: Remove superfluous void * cast in debugfs_create_file() call There is no need to cast a typed pointer to a void pointer when calling a function that accepts the latter. Remove it, as the cast prevents further compiler checks. Signed-off-by: Geert Uytterhoeven Signed-off-by: Alex Deucher commit e4b116a2c0b7d5273ae9b1345f328981dbfa781e Author: YueHaibing Date: Wed Oct 23 15:58:31 2019 +0800 drm/amdgpu: remove set but not used variable 'adev' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1221:24: warning: variable adev set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:488:24: warning: variable adev set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:547:24: warning: variable adev set but not used [-Wunused-but-set-variable] It is never used, so can removed it. Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit ef6691565391d0ce4c995dd9ca58329cce1a78b8 Author: Alex Sierra Date: Thu Oct 24 13:14:31 2019 -0500 drm/amdkfd: bug fix for out of bounds mem on gpu cache filling info The bitmap in cu_info structure is defined as a 4x4 size array. In Acturus, this matrix is initialized as a 4x2. Based on the 8 shaders. In the gpu cache filling initialization, the access to the bitmap matrix was done as an 8x1 instead of 4x2. Causing an out of bounds memory access error. Due to this, the number of GPU cache entries was inconsistent. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 533bfcaea1704450c0627a3dc329df8069036633 Author: Yong Zhao Date: Thu Oct 24 17:05:57 2019 -0400 drm/amdkfd: Delete duplicated queue bit map reservation The KIQ is on the second MEC and its reservation is covered in the latter logic, so no need to reserve its bit twice. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 55695b36c149009cc8fcc40e22c62be4969ffb7b Author: Yong Zhao Date: Fri Oct 25 17:09:35 2019 -0400 drm/amdkfd: Delete unnecessary pr_fmt switch Given amdkfd.ko has been merged into amdgpu.ko, this switch is no longer useful. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 975c99a570967dd48e917dd7853867fee3febabd Author: Jens Axboe Date: Wed Oct 30 08:42:56 2019 -0600 io_uring: io_wq_create() returns an error pointer, not NULL syzbot reported an issue where we crash at setup time if failslab is used. The issue is that io_wq_create() returns an error pointer on failure, not NULL. Hence io_uring thought the io-wq was setup just fine, but in reality it's a garbage error pointer. Use IS_ERR() instead of a NULL check, and assign ret appropriately. Reported-by: syzbot+221cc24572a2fed23b6b@syzkaller.appspotmail.com Fixes: 561fb04a6a22 ("io_uring: replace workqueue usage with io-wq") Signed-off-by: Jens Axboe commit a8ddac7c9f06a12227a4f5febd1cbe0575a33179 Author: Imre Deak Date: Mon Oct 28 20:15:17 2019 +0200 drm/i915: Avoid HPD poll detect triggering a new detect cycle For the HPD interrupt functionality the HW depends on power wells in the display core domain to be on. Accordingly when enabling these power wells the HPD polling logic will force an HPD detection cycle to account for hotplug events that may have happened when such a power well was off. Thus a detect cycle started by polling could start a new detect cycle if a power well in the display core domain gets enabled during detect and stays enabled after detect completes. That in turn can lead to a detection cycle runaway. To prevent re-triggering a poll-detect cycle make sure we drop all power references we acquired during detect synchronously by the end of detect. This will let the poll-detect logic continue with polling (matching the off state of the corresponding power wells) instead of scheduling a new detection cycle. Fixes: 6cfe7ec02e85 ("drm/i915: Remove the unneeded AUX power ref from intel_dp_detect()") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112125 Reported-and-tested-by: Val Kulkov Reported-and-tested-by: wangqr Cc: Val Kulkov Cc: wangqr Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191028181517.22602-1-imre.deak@intel.com commit c618a90dcaf3ffd37ec3b16451297e90a1a8395c Author: Linus Walleij Date: Wed Oct 30 08:36:24 2019 +0100 spi: zynq-qspi: Drop GPIO header This driver does not use any symbols from the legacy GPIO header so drop the include. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191030073624.23974-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 26fa680ba9a13d6b05df201b3dfd946a7d915644 Author: Linus Walleij Date: Wed Oct 30 08:34:18 2019 +0100 spi: dw: Drop GPIO header The DW driver does not use the legacy GPIO header so drop it from the spi-dw.h include. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191030073418.23717-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit c8b348dd86091daa3496a6dc8c0777b78c9683a6 Author: Linus Walleij Date: Wed Oct 30 08:38:32 2019 +0100 spi: txx9: Convert to use GPIO descriptors This converts the TXX9 SPI driver to use GPIO descriptors to control the GPIO chip selects. As the driver was clearly (ab)using the device tree "reg" property to offset into the global GPIO chip we have to add a hack to counter the hack: add a 1-to-1 chip select to GPIO offset mapping for all 16 lines on the TXX9 GPIO chip. The details are described in a largeish comment in the patch. We do not need to set up the GPIO as output any more since the core will take care of this, as well as it will handle the polarity inversion semantics. Cc: Atsushi Nemoto Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191030073832.24038-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 059c67f11c897a10e447d9802ace1a2069ae1b83 Author: Shuming Fan Date: Wed Oct 30 16:55:56 2019 +0800 ASoC: dt-bindings: rt5682: add button delay device property The btndet-delay device property could control the HW debounce time. It is easy to adjust the sensitivity of push button. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191030085556.14351-1-shumingf@realtek.com Signed-off-by: Mark Brown commit e226445802cb2a51c3cb127fac31fba0a4330e87 Author: Shuming Fan Date: Wed Oct 30 16:55:33 2019 +0800 ASoC: rt5682: improve the sensitivity of push button The sensitivity could improve by decreasing the HW debounce time and reduce the delay time of workequeue. This patch added a device property for HW debounce time control. We could change this value to tune the sensitivity of push button. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191030085533.14299-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 67e6b4ef84960704fe3fe33c4b706a2b11a7f539 Author: Jan Kara Date: Wed Oct 30 15:09:23 2019 +0100 fsnotify: Add git tree reference to MAINTAINERS Add reference to git tree with fsnotify changes to MAINTAINERS file. Signed-off-by: Jan Kara commit c9ccf71fc8073b8d3a484751585088ff14c8d762 Author: Andy Shevchenko Date: Mon Oct 21 19:45:28 2019 +0300 pinctrl: intel: Add Intel Tiger Lake pin controller support This driver adds pinctrl/GPIO support for Intel Tiger Lake SoC. The GPIO controller is based on the next generation GPIO hardware but still compatible with the one supported by the Intel core pinctrl/GPIO driver. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 942c5ea49ffbe28b004ffb9b620f1aa4e21ba94a Author: Andy Shevchenko Date: Tue Oct 22 13:00:04 2019 +0300 pinctrl: intel: Use helper to restore register values on ->resume() We can restore only values that had been changed and do not spam kernel log with unnecessary messages. Convert intel_gpio_update_pad_mode() to a helper function that will be used across few callers. Suggested-by: Mika Westerberg Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 764cfe33517f7cda42f01bb5e4077cfce2233230 Author: Andy Shevchenko Date: Tue Oct 22 13:00:03 2019 +0300 pinctrl: intel: Drop level from warning to debug in intel_restore_hostown() Since we didn't get any new reports from users about wrong settings of pad ownership, there is no point to spam kernel log with it. Thus, drop level from warning to debug. Also, modify format to be in align with the rest restore helpers. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 471dd9a9c7c197b143f1aca05a31e385115986b0 Author: Andy Shevchenko Date: Tue Oct 22 13:00:02 2019 +0300 pinctrl: intel: Introduce intel_restore_intmask() helper Refactor restoring GPI_IE registers by using an introduced helper. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 7101e022523bfb269bdedbc874ca5d44508420ca Author: Andy Shevchenko Date: Tue Oct 22 13:00:01 2019 +0300 pinctrl: intel: Introduce intel_restore_hostown() helper Refactor restoring HOSTSW_OWN registers by using an introduced helper. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit f78f152a1a3f09c4f0b2bbe4d80a22e44e541d42 Author: Andy Shevchenko Date: Tue Oct 22 13:00:00 2019 +0300 pinctrl: intel: Introduce intel_restore_padcfg() helper Deduplicate restoring PADCFGx registers by using a common helper. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit e58e177392b9df5699373f7fee1329a7145b0c88 Author: Andy Shevchenko Date: Thu Oct 24 16:34:41 2019 +0300 pinctrl: cherryview: Allocate IRQ chip dynamic Keeping the IRQ chip definition static shares it with multiple instances of the GPIO chip in the system. This is bad and now we get this warning from GPIO library: "detected irqchip that is shared with multiple gpiochips: please fix the driver." Hence, move the IRQ chip definition from being driver static into the struct intel_pinctrl. So a unique IRQ chip is used for each GPIO chip instance. This patch is heavily based on the attachment to the bug by Christoph Marz. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=202543 Fixes: 6e08d6bbebeb ("pinctrl: Add Intel Cherryview/Braswell pin controller support") Depends-on: 83b9dc11312f ("pinctrl: cherryview: Associate IRQ descriptors to irqdomain") Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg commit 17d49c6258e6aa43981c0e3bcf94091af17b607b Author: Andy Shevchenko Date: Wed Oct 23 16:32:03 2019 +0300 pinctrl: cherryview: Fix spelling mistake in the comment One spelling mistake is being fixed: benerate -> generate. It is a complimentary fix to the commit 505485a83c55 ("pinctrl: cherryview fixed typo in comment"). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 3739898576a13a41e319cf7d875cb68b9d9d35cc Author: Hans de Goede Date: Fri Oct 18 11:08:42 2019 +0200 pinctrl: cherryview: Fix irq_valid_mask calculation Commit 03c4749dd6c7 ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation") has made the cherryview gpio numbers sparse, to get a 1:1 mapping between ACPI pin numbers and gpio numbers in Linux. This has greatly simplified things, but the code setting the irq_valid_mask was not updated for this, so the valid mask is still in the old "compressed" numbering with the gaps in the pin numbers skipped, which is wrong as irq_valid_mask needs to be expressed in gpio numbers. This results in the following error on devices using pin 24 (0x0018) on the north GPIO controller as an ACPI event source: [ 0.422452] cherryview-pinctrl INT33FF:01: Failed to translate GPIO to IRQ This has been reported (by email) to be happening on a Caterpillar CAT T20 tablet and I've reproduced this myself on a Medion Akoya e2215t 2-in-1. This commit uses the pin number instead of the compressed index into community->pins to clear the correct bits in irq_valid_mask for GPIOs using GPEs for interrupts, fixing these errors and in case of the Medion Akoya e2215t also fixing the LID switch not working. Cc: stable@vger.kernel.org Fixes: 03c4749dd6c7 ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation") Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 4973ddc8426405ebe71c48bd3d5e20d83877c076 Author: Andy Shevchenko Date: Mon Oct 14 12:51:04 2019 +0300 pinctrl: intel: Avoid potential glitches if pin is in GPIO mode When consumer requests a pin, in order to be on the safest side, we switch it first to GPIO mode followed by immediate transition to the input state. Due to posted writes it's luckily to be a single I/O transaction. However, if firmware or boot loader already configures the pin to the GPIO mode, user expects no glitches for the requested pin. We may check if the pin is pre-configured and leave it as is till the actual consumer toggles its state to avoid glitches. Fixes: 7981c0015af2 ("pinctrl: intel: Add Intel Sunrisepoint pin controller and GPIO support") Depends-on: f5a26acf0162 ("pinctrl: intel: Initialize GPIO properly when used through irqchip") Cc: stable@vger.kernel.org Cc: fei.yang@intel.com Reported-by: Oliver Barta Reported-by: Malin Jonsson Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg commit a06375a9ac98a162ce2f7ef074fc60dee851bb18 Author: Chris Wilson Date: Wed Oct 30 10:38:23 2019 +0000 drm/i915/gt: Always track callers to intel_rps_mark_interactive() During startup, we may find ourselves in an interesting position where we haven't fully enabled RPS before the display starts trying to use it. This may lead to an imbalance in our "interactive" counter: <3>[ 4.813326] intel_rps_mark_interactive:652 GEM_BUG_ON(!rps->power.interactive) <4>[ 4.813396] ------------[ cut here ]------------ <2>[ 4.813398] kernel BUG at drivers/gpu/drm/i915/gt/intel_rps.c:652! <4>[ 4.813430] invalid opcode: 0000 [#1] PREEMPT SMP PTI <4>[ 4.813438] CPU: 1 PID: 18 Comm: kworker/1:0H Not tainted 5.4.0-rc5-CI-CI_DRM_7209+ #1 <4>[ 4.813447] Hardware name: /NUC7i5BNB, BIOS BNKBL357.86A.0054.2017.1025.1822 10/25/2017 <4>[ 4.813525] Workqueue: events_highpri intel_atomic_cleanup_work [i915] <4>[ 4.813589] RIP: 0010:intel_rps_mark_interactive+0xb3/0xc0 [i915] <4>[ 4.813597] Code: bc 3f de e0 48 8b 35 84 2e 24 00 49 c7 c0 f3 d4 4e a0 b9 8c 02 00 00 48 c7 c2 80 9c 48 a0 48 c7 c7 3e 73 34 a0 e8 8d 3b e5 e0 <0f> 0b 90 66 2e 0f 1f 84 00 00 00 00 00 80 bf c0 00 00 00 00 74 32 <4>[ 4.813616] RSP: 0018:ffffc900000efe00 EFLAGS: 00010286 <4>[ 4.813623] RAX: 000000000000000e RBX: ffff8882583cc7f0 RCX: 0000000000000000 <4>[ 4.813631] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff888275969c00 <4>[ 4.813639] RBP: 0000000000000000 R08: 0000000000000008 R09: ffff888275ace000 <4>[ 4.813646] R10: ffffc900000efe00 R11: ffff888275969c00 R12: ffff8882583cc8d8 <4>[ 4.813654] R13: ffff888276abce00 R14: 0000000000000000 R15: ffff88825e878860 <4>[ 4.813662] FS: 0000000000000000(0000) GS:ffff888276a80000(0000) knlGS:0000000000000000 <4>[ 4.813672] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 4.813678] CR2: 00007f051d5ca0a8 CR3: 0000000262f48001 CR4: 00000000003606e0 <4>[ 4.813686] Call Trace: <4>[ 4.813755] intel_cleanup_plane_fb+0x4e/0x60 [i915] <4>[ 4.813764] drm_atomic_helper_cleanup_planes+0x4d/0x70 <4>[ 4.813833] intel_atomic_cleanup_work+0x15/0x80 [i915] <4>[ 4.813842] process_one_work+0x26a/0x620 <4>[ 4.813850] worker_thread+0x37/0x380 <4>[ 4.813857] ? process_one_work+0x620/0x620 <4>[ 4.813864] kthread+0x119/0x130 <4>[ 4.813870] ? kthread_park+0x80/0x80 <4>[ 4.813878] ret_from_fork+0x3a/0x50 <4>[ 4.813887] Modules linked in: i915(+) mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul btusb btrtl btbcm btintel snd_hda_intel snd_intel_nhlt snd_hda_codec bluetooth snd_hwdep snd_hda_core ghash_clmulni_intel snd_pcm e1000e ecdh_generic ecc ptp pps_core mei_me mei prime_numbers <4>[ 4.813934] ---[ end trace c13289af88174ffc ]--- The solution employed is to not worry about RPS state and keep the tally of the interactive counter separate. When we do enable RPS, we will then take the display activity into account. Fixes: 3e7abf814193 ("drm/i915: Extract GT render power state management") Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191030103827.2413-1-chris@chris-wilson.co.uk commit 76f0030f367c61d4d1f4b1393ff3d9dc43d20c6a Author: Jarkko Nikula Date: Wed Oct 30 13:31:37 2019 +0200 spi: dw: Remove runtime PM enable/disable from common part of the driver Committed version of the commit b9fc2d207e54 ("spi: dw: Move runtime PM enable/disable from common to platform driver part") does not include by some reason changes to drivers/spi/spi-dw.c that were part of the original patch sent to the mailing list. Complete the code move by doing those changes now. Fixes: b9fc2d207e54 ("spi: dw: Move runtime PM enable/disable from common to platform driver part") Cc: Phil Edworthy Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20191030113137.15459-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown commit e9904ed5e73af4fd00cf4fcf705420a385af45da Author: Kuninori Morimoto Date: Wed Oct 30 10:26:10 2019 +0900 ASoC: soc-core: remove unneeded snd_soc_tplg_component_remove() snd_soc_tplg_component_remove() is pair of snd_soc_tplg_component_load(), and it is topology related cleanup function. The driver which called _load() needs to call _remove() by its responsibility. Today, skl-pcm and topology are the user, and these are calling both _load() and _remove(). soc-core doesn't need to call it. This patch remove it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8736fbdnwt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d247568bb21b6665cc32dee8b0a9716d44bd11a7 Author: Kuninori Morimoto Date: Wed Oct 30 15:14:58 2019 +0900 ASoC: rt5677-spi: fixup compile warning This patch fixup this warning LINUX/sound/soc/codecs/rt5677-spi.c: In function ‘rt5677_spi_pcm_close’: LINUX/sound/soc/codecs/rt5677-spi.c:114:30: warning: unused variable ‘rtd’ [-Wunused-variable] struct snd_soc_pcm_runtime *rtd = substream->private_data; ^~~ Fixes: a0e0d135427c ("ASoC: rt5677: Add a PCM device for streaming hotword via SPI") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a79idajh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e44ff9ea8f4c8a90c82f7b85bd4f5e497c841960 Author: Michael Ellerman Date: Thu Oct 24 11:47:30 2019 +1100 powerpc/tools: Don't quote $objdump in scripts Some of our scripts are passed $objdump and then call it as "$objdump". This doesn't work if it contains spaces because we're using ccache, for example you get errors such as: ./arch/powerpc/tools/relocs_check.sh: line 48: ccache ppc64le-objdump: No such file or directory ./arch/powerpc/tools/unrel_branch_check.sh: line 26: ccache ppc64le-objdump: No such file or directory Fix it by not quoting the string when we expand it, allowing the shell to do the right thing for us. Fixes: a71aa05e1416 ("powerpc: Convert relocs_check to a shell script using grep") Fixes: 4ea80652dc75 ("powerpc/64s: Tool to flag direct branches from unrelocated interrupt vectors") Signed-off-by: Michael Ellerman Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191024004730.32135-1-mpe@ellerman.id.au commit b9e0805abf2e92fc275ac5fbd8c1c9a92b00413d Author: Michael Ellerman Date: Wed Oct 30 22:12:31 2019 +1100 powerpc: Add build-time check of ptrace PT_xx defines As part of the uapi we export a lot of PT_xx defines for each register in struct pt_regs. These are expressed as an index from gpr[0], in units of unsigned long. Currently there's nothing tying the values of those defines to the actual layout of the struct. But we *don't* want to change the uapi defines to derive the PT_xx values based on the layout of the struct, those values are ABI and must never change. Instead we want to do the reverse, make sure that the layout of the struct never changes vs the PT_xx defines. So add build time checks of that. This probably seems paranoid, but at least once in the past someone has sent a patch that would have broken the ABI if it hadn't been spotted. Although it probably would have been detected via testing, it's preferable to just quash any issues at the source. Signed-off-by: Michael Ellerman Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191030111231.22720-1-mpe@ellerman.id.au commit 5c74f79958682fccd82a6029c53859d1dab3b239 Author: Mathieu Malaterre Date: Sat Dec 8 16:46:23 2018 +0100 powerpc/ptrace: Add prototype for function pt_regs_check `pt_regs_check` is a dummy function, its purpose is to break the build if struct pt_regs and struct user_pt_regs don't match. This function has no functionnal purpose, and will get eliminated at link time or after init depending on CONFIG_LD_DEAD_CODE_DATA_ELIMINATION This commit adds a prototype to fix warning at W=1: arch/powerpc/kernel/ptrace.c:3339:13: error: no previous prototype for ‘pt_regs_check’ [-Werror=missing-prototypes] Suggested-by: Christophe Leroy Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20181208154624.6504-1-malat@debian.org commit 1a48049adb98a20fad05ed86bc00c2f9120a006e Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:02:25 2019 +0100 gfs2: make gfs2_fs_parameters static The gfs2_fs_parameters is not used outside the unit it is declared in, so make it static. Fixes the following sparse warning: fs/gfs2/ops_fstype.c:1331:39: warning: symbol 'gfs2_fs_parameters' was not declared. Should it be static? Signed-off-by: Ben Dooks Reviewed-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit f3b64b57c044fe2d256cd120b25fd6cbf6c927e9 Author: Andreas Gruenbacher Date: Sat Aug 31 21:29:12 2019 +0100 gfs2: Some whitespace cleanups Signed-off-by: Andreas Gruenbacher commit 098b9c1453629be7e637498f3ca8bb3c592eb394 Author: Aliasgar Surti Date: Fri Oct 4 10:55:29 2019 -0500 gfs2: removed unnecessary semicolon There is use of unnecessary semicolon after switch case. Removed the semicolon. Signed-off-by: Aliasgar Surti Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 0929249e3be3bb82ee6cfec0025f4dde952210b3 Author: Takashi Iwai Date: Wed Oct 30 11:09:21 2019 +0100 ALSA: firewire-motu: Correct a typo in the clock proc string Just fix a typo of "S/PDIF" in the clock name string. Fixes: 4638ec6ede08 ("ALSA: firewire-motu: add proc node to show current statuc of clock and packet formats") Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191030100921.3826-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 271e657f92ed94ced8a9fccf265b993650272a6b Author: Takashi Sakamoto Date: Wed Oct 30 17:06:44 2019 +0900 ALSA: firewire-motu: add support for MOTU UltraLite UltraLite was shipped in 2005 by MOTU, and already discontinued. This model consists of below ICs: - Texus Instruments TSB41AB2 for physical layer of IEEE 1394 bus - Xilinx Spartan XC35S200 for link layer of IEEE 1394 bus, protocol layer and signal processing This commit adds support for this model. Like the other MOTU models, ALSA firewire MOTU driver fails to drive the device for stable sampling clock and generate noisy sound. $ python2 crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 04107574 bus_info_length 4, crc_length 16, crc 30068 404 31333934 bus_name "1394" 408 20001000 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 0, max_rec 1 (4) 40c 0001f200 company_id 0001f2 | 410 0007b82d device_id 000007b82d | EUI-64 0001f2000007b82d root directory ----------------------------------------------------------------- 414 0004c65c directory_length 4, crc 50780 418 030001f2 vendor 41c 0c0083c0 node capabilities per IEEE 1394 420 8d000006 --> eui-64 leaf at 438 424 d1000001 --> unit directory at 428 unit directory at 428 ----------------------------------------------------------------- 428 0003d80a directory_length 3, crc 55306 42c 120001f2 specifier id 430 1300000d version 434 17100800 model eui-64 leaf at 438 ----------------------------------------------------------------- 438 00024566 leaf_length 2, crc 17766 43c 0001f200 company_id 0001f2 | 440 0007b82d device_id 000007b82d | EUI-64 0001f2000007b82d Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191030080644.1704-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit bd1073728260e1d2f9589c928b6d8ddb14f5646f Author: Takashi Sakamoto Date: Wed Oct 30 17:06:43 2019 +0900 ALSA: firewire-motu: code refactoring to handle model specific switch for protocol v2 In MOTU FireWire series, devices which support protocol version 2 have several types of hardware design to process audio data frames for isoc packet. Roughly devices are categorized into three groups: - 828mkII - Traveler/896HD - UltraLite/8pre FireWire Some bit flags in register addressed by 0x'ffff'f000'0b14 includes device-specific effects. This commit cleanups implementation of protocol v2 in this point. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191030080644.1704-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 4b2079f80aa065b237955e75d0b627943656b0ab Author: Takashi Sakamoto Date: Wed Oct 30 17:06:42 2019 +0900 ALSA: firewire-motu: minor code refactoring for protocol version 2 This commit adds some helper functions to parse register value for source of sampling clock and nominal sampling transmission frequency. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191030080644.1704-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 3f58f004bff3273d102583e0b2f478526cf9d3c8 Author: Takashi Sakamoto Date: Wed Oct 30 17:06:41 2019 +0900 ALSA: firewire-motu: detect SPH source of sampling clock In MOTU FireWire series, devices have a mode to generate sampling clock from a sequence of source packet header (SPH) included in each data block of received packet. This mode is used for several purposes such as mode for SMPTE time code, sync to the other sound cards and so on. This commit adds support for the SPH mode. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191030080644.1704-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 1ef2ff941424bde4fd1d8dc97e0e600c5dc5472e Author: Takashi Sakamoto Date: Wed Oct 30 17:06:40 2019 +0900 ALSA: firewire-motu: print for unknown source of sampling clock When unknown source is detected for sampling clock, corresponding label was not added for node on procfs. This commit adds it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191030080644.1704-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 2644df63c709e107c1882be95d802adea284dbf5 Author: Takashi Sakamoto Date: Wed Oct 30 17:06:39 2019 +0900 ALSA: firewire-motu: fix wrong spelling for macro Just replace 'SEPARETED' with 'SEPARATED' for macro. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191030080644.1704-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c1c8058dfb9852eb5adf968b7617a9a4771a08ce Author: Cristiane Naves Date: Fri Oct 25 13:13:40 2019 -0300 iommu/virtio: Remove unused variable Remove the variable of return. Issue found by coccicheck(scripts/coccinelle/misc/returnvar.cocci) Signed-off-by: Cristiane Naves Signed-off-by: Joerg Roedel commit d5ca94a4bdcc0e7cf3d02992dc582e284fa3cc99 Author: Roi Martin Date: Wed Oct 30 02:03:27 2019 +0100 staging: exfat: avoid multiple assignments Fix checkpatch.pl warning: CHECK: multiple assignments should be avoided Signed-off-by: Roi Martin Link: https://lore.kernel.org/r/20191030010328.10203-6-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 89f882db113b2c0aa46f6cbb85733bef85c754cc Author: Roi Martin Date: Wed Oct 30 02:03:26 2019 +0100 staging: exfat: replace printk(KERN_INFO ...) with pr_info() Fix checkpatch.pl warning: WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Roi Martin Link: https://lore.kernel.org/r/20191030010328.10203-5-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 487242c3dd31aca9850825a1df5a13d866509485 Author: Roi Martin Date: Wed Oct 30 02:03:25 2019 +0100 staging: exfat: remove unnecessary new line in if condition Fix checkpatch.pl warning: CHECK: Logical continuations should be on the previous line Signed-off-by: Roi Martin Link: https://lore.kernel.org/r/20191030010328.10203-4-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 072429a4d6ab5335f07cfc3f95f5e9f73955be10 Author: Roi Martin Date: Wed Oct 30 02:03:24 2019 +0100 staging: exfat: make alignment match open parenthesis Fix checkpatch.pl warning: CHECK: Alignment should match open parenthesis Signed-off-by: Roi Martin Link: https://lore.kernel.org/r/20191030010328.10203-3-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6853f94ad75135519e52eeda8d1fe54de48d609c Author: Roi Martin Date: Wed Oct 30 02:03:23 2019 +0100 staging: exfat: remove unnecessary parentheses Fix checkpatch.pl warning: CHECK: Unnecessary parentheses around ... Signed-off-by: Roi Martin Link: https://lore.kernel.org/r/20191030010328.10203-2-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman commit be1f84cf772b1598a4ed15b41e78d2967b97fbf5 Author: Chandra Annamaneni Date: Tue Oct 29 02:16:38 2019 -0700 staging: KPC2000: kpc2000_spi.c: Fix style issues (Unnecessary parenthesis) Resolved: CHECK: Unnecessary parentheses around table[i] Signed-off-by: Chandra Annamaneni Link: https://lore.kernel.org/r/20191029091638.16101-4-chandra627@gmail.com Signed-off-by: Greg Kroah-Hartman commit e5f26f8548f943e7c70e6136d0ecd942a912a70e Author: Chandra Annamaneni Date: Tue Oct 29 02:16:37 2019 -0700 staging: KPC2000: kpc2000_spi.c: Fix style issues (alignment) Resolved: "CHECK: Alignment should match open parenthesis" from checkpatch Signed-off-by: Chandra Annamaneni Link: https://lore.kernel.org/r/20191029091638.16101-3-chandra627@gmail.com Signed-off-by: Greg Kroah-Hartman commit c4d362420d75aff10596f876e3e66458bfdb84b5 Author: Chandra Annamaneni Date: Tue Oct 29 02:16:36 2019 -0700 staging: KPC2000: kpc2000_spi.c: Fix style issues (misaligned brace) Resolved: ERROR: else should follow close brace '}' Signed-off-by: Chandra Annamaneni Link: https://lore.kernel.org/r/20191029091638.16101-2-chandra627@gmail.com Signed-off-by: Greg Kroah-Hartman commit 25ec44ebdc1ab930965b266b2717a2e56249d7bb Author: Chandra Annamaneni Date: Tue Oct 29 02:16:35 2019 -0700 staging: KPC2000: kpc2000_spi.c: Fix style issues (missing blank line) Resolved: "CHECK: Please use a blank line after.." from checkpatch.pl Signed-off-by: Chandra Annamaneni Link: https://lore.kernel.org/r/20191029091638.16101-1-chandra627@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6e0afa355a72eef49d3ade9531672e8a65fc9e9c Author: Cristiane Naves Date: Tue Oct 29 18:09:17 2019 -0300 staging: vt6655: Fix lines ending with parentheses Fix lines ending with parentheses. Issue found by checkpatch. Signed-off-by: Cristiane Naves Link: https://lore.kernel.org/r/20191029210917.GA14956@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman commit 600bf7aecebdd3756bdb4f48f5a44b86c6593053 Author: Gabriela Bittencourt Date: Tue Oct 29 20:22:07 2019 -0300 staging: sm750fb: Replace multiple spaces with tabs when it suits Replace multiple spaces before some comments with one tab. Aligning the comment with the function below it. Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191029232207.4113-3-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 94d70f66c2945301fdb045851711cd94fbe4c3c5 Author: Gabriela Bittencourt Date: Tue Oct 29 20:22:06 2019 -0300 staging: sm750fb: Fix typo in comment Fixing typo in word 'and'. Signed-off-by: Gabriela Bittencourt Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20191029232207.4113-2-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 67e7bd248473ede722563ae1a8d24e856a42f644 Author: Javier F. Arias Date: Tue Oct 29 22:04:19 2019 -0500 staging: emxx_udc: Fix invalid reference error This patch fixes an invalid reference error by moving the code that is executed when a queue element is found, into the loop. Also, it removes an unnecessary test that now checks if the element is not present in the queue. Issue found by Coccinelle. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/20191030030419.mmnrzm7hr4encfai@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3c124435e8dd516df4b2fc983f4415386fd6edae Author: Logan Gunthorpe Date: Tue Oct 22 16:01:21 2019 -0600 iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping Non-Transparent Bridge (NTB) devices (among others) may have many DMA aliases seeing the hardware will send requests with different device ids depending on their origin across the bridged hardware. See commit ad281ecf1c7d ("PCI: Add DMA alias quirk for Microsemi Switchtec NTB") for more information on this. The AMD IOMMU IRQ remapping functionality ignores all PCI aliases for IRQs so if devices send an interrupt from one of their aliases they will be blocked on AMD hardware with the IOMMU enabled. To fix this, ensure IRQ remapping is enabled for all aliases with MSI interrupts. This is analogous to the functionality added to the Intel IRQ remapping code in commit 3f0c625c6ae7 ("iommu/vt-d: Allow interrupts from the entire bus for aliased devices") Signed-off-by: Logan Gunthorpe Signed-off-by: Joerg Roedel commit 3332364e4ebc0581d133a334645a20fd13b580f1 Author: Logan Gunthorpe Date: Tue Oct 22 16:01:20 2019 -0600 iommu/amd: Support multiple PCI DMA aliases in device table Non-Transparent Bridge (NTB) devices (among others) may have many DMA aliases seeing the hardware will send requests with different device ids depending on their origin across the bridged hardware. See commit ad281ecf1c7d ("PCI: Add DMA alias quirk for Microsemi Switchtec NTB") for more information on this. The AMD IOMMU ignores all the PCI aliases except the last one so DMA transfers from these aliases will be blocked on AMD hardware with the IOMMU enabled. To fix this, ensure the DTEs are cloned for every PCI alias. This is done by copying the DTE data for each alias as well as the IVRS alias every time it is changed. Signed-off-by: Logan Gunthorpe Signed-off-by: Joerg Roedel commit a5bbbf37c6f8522a1afd46c37b5a0d1ce63232b7 Author: Denys Vlasenko Date: Thu Oct 24 14:54:10 2019 +0200 iommu/amd: Do not re-fetch iommu->cmd_buf_tail The compiler is not smart enough to realize that iommu->cmd_buf_tail can't be modified across memcpy: 41 8b 45 74 mov 0x74(%r13),%eax # iommu->cmd_buf_tail 44 8d 78 10 lea 0x10(%rax),%r15d # += sizeof(*cmd) 41 81 e7 ff 1f 00 00 and $0x1fff,%r15d # %= CMD_BUFFER_SIZE 49 03 45 68 add 0x68(%r13),%rax # target = iommu->cmd_buf + iommu->cmd_buf_tail 45 89 7d 74 mov %r15d,0x74(%r13) # store to iommu->cmd_buf_tail 49 8b 34 24 mov (%r12),%rsi # memcpy 49 8b 7c 24 08 mov 0x8(%r12),%rdi # memcpy 48 89 30 mov %rsi,(%rax) # memcpy 48 89 78 08 mov %rdi,0x8(%rax) # memcpy 49 8b 55 38 mov 0x38(%r13),%rdx # iommu->mmio_base 41 8b 45 74 mov 0x74(%r13),%eax # redundant load of iommu->cmd_buf_tail ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 89 82 08 20 00 00 mov %eax,0x2008(%rdx) # writel CC: Tom Lendacky CC: Joerg Roedel CC: linux-kernel@vger.kernel.org Signed-off-by: Denys Vlasenko Signed-off-by: Joerg Roedel commit 811bb3db25ace1aa6cfa35cfb347c542a32f5a13 Author: Mika Kuoppala Date: Tue Oct 29 18:38:41 2019 +0200 drm/i915/tgl: Add gam instdone This has been asked from us already. Prepare for the next time. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029163841.5224-2-mika.kuoppala@linux.intel.com commit e50dbdbfd9fb2c9b151b0474205f57f2c267f9b6 Author: Mika Kuoppala Date: Tue Oct 29 18:38:40 2019 +0200 drm/i915/tgl: Add SFC instdone to error state On debugging media workload hangs, sfc instdone might prove useful in future. Be prepared. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029163841.5224-1-mika.kuoppala@linux.intel.com commit 777260a5c99226cfa58325b6a7c2f39bb46f5aaf Author: Piotr Sroka Date: Wed Oct 30 07:45:09 2019 +0000 mtd: rawnand: remove unecessary checking if dmac is NULL Remove unecessary checking if dmac is NULL. If Cadence nand controller driver uses DMA engine then cdns_ctrl->dmac cannot be NULL. It is verified during driver initialization. If Cadence nand controller driver does not use DMA engine then CPU IO read/write are executed instead of slave DMA transfer. In that case cdns_ctrl->dmac is not used at all. Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Piotr Sroka Signed-off-by: Miquel Raynal commit b8bfe845a6748a8c4a84433df8984afd930afdb0 Author: Andreas Kemnade Date: Tue Oct 29 19:53:50 2019 +0100 dt-bindings: backlight: lm3630a: Fix missing include Example failed to compile due to undefined GPIO_ACTIVE_HIGH fix that by adding the needed #include to the exammple. Signed-off-by: Andreas Kemnade Signed-off-by: Lee Jones commit 1d4961d9eb1aaa498dfb44779b7e4b95d79112d0 Author: Saurav Girepunje Date: Tue Oct 29 23:22:00 2019 +0530 ALSA: usb-audio: sound: usb: usb true/false for bool return type Use true/false for bool type return in uac_clock_source_is_valid(). Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20191029175200.GA7320@saurav Signed-off-by: Takashi Iwai commit c790c3d2b0ec5979d83451d0688d1cd07e23d8ba Author: Michael Ellerman Date: Mon May 20 20:55:20 2019 +1000 selftests/powerpc: Add a test of spectre_v2 mitigations This test uses the PMU to count branch prediction hits/misses for a known loop, and compare the result to the reported spectre v2 mitigation. This gives us a way of sanity checking that the reported mitigation is actually in effect. Sample output for some cases, eg: Power9: sysfs reports: 'Vulnerable' PM_BR_PRED_CCACHE: result 368 running/enabled 5792777124 PM_BR_MPRED_CCACHE: result 319 running/enabled 5792775546 PM_BR_PRED_PCACHE: result 2147483281 running/enabled 5792773128 PM_BR_MPRED_PCACHE: result 213604201 running/enabled 5792771640 Miss percent 9 % OK - Measured branch prediction rates match reported spectre v2 mitigation. sysfs reports: 'Mitigation: Indirect branch serialisation (kernel only)' PM_BR_PRED_CCACHE: result 895 running/enabled 5780320920 PM_BR_MPRED_CCACHE: result 822 running/enabled 5780312414 PM_BR_PRED_PCACHE: result 2147482754 running/enabled 5780308836 PM_BR_MPRED_PCACHE: result 213639731 running/enabled 5780307912 Miss percent 9 % OK - Measured branch prediction rates match reported spectre v2 mitigation. sysfs reports: 'Mitigation: Indirect branch cache disabled' PM_BR_PRED_CCACHE: result 2147483649 running/enabled 20540186160 PM_BR_MPRED_CCACHE: result 2147483649 running/enabled 20540180056 PM_BR_PRED_PCACHE: result 0 running/enabled 20540176090 PM_BR_MPRED_PCACHE: result 0 running/enabled 20540174182 Miss percent 100 % OK - Measured branch prediction rates match reported spectre v2 mitigation. Power8: sysfs reports: 'Vulnerable' PM_BR_PRED_CCACHE: result 2147483649 running/enabled 3505888142 PM_BR_MPRED_CCACHE: result 9 running/enabled 3505882788 Miss percent 0 % OK - Measured branch prediction rates match reported spectre v2 mitigation. sysfs reports: 'Mitigation: Indirect branch cache disabled' PM_BR_PRED_CCACHE: result 2147483649 running/enabled 16931421988 PM_BR_MPRED_CCACHE: result 2147483649 running/enabled 16931416478 Miss percent 100 % OK - Measured branch prediction rates match reported spectre v2 mitigation. success: spectre_v2 Signed-off-by: Michael Ellerman Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190520105520.22274-1-mpe@ellerman.id.au commit 203bddfdfb6c2c542885b3da1a7d011fd54744db Author: Sasha Neftin Date: Wed Oct 23 18:09:17 2019 +0300 e1000e: Fix compiler warning when CONFIG_PM_SLEEP is not set When CONFIG_PM_SLEEP is not defined compiler complain as follow: CC [M] drivers/net/ethernet/intel/e1000e/netdev.o drivers/net/ethernet/intel/e1000e/netdev.c:6302:12: warning: ‘e1000e_s0ix_entry_flow’ defined but not used [-Wunused-function] static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter) drivers/net/ethernet/intel/e1000e/netdev.c:6411:12: warning: ‘e1000e_s0ix_exit_flow’ defined but not used [-Wunused-function] static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter) LD [M] drivers/net/ethernet/intel/e1000e/e1000e.o Add wrap to fix these warnings. Reported-by: kbuild test robot Signed-off-by: Sasha Neftin Signed-off-by: Jeff Kirsher commit fb776f5d57ee0f54924fec977657795cb82186dd Author: Sasha Neftin Date: Wed Oct 16 11:08:38 2019 +0300 e1000e: Add support for Tiger Lake Add devices ID's for the next LOM generations that will be available on the next Intel Client platform (Tiger Lake) This patch provides the initial support for these devices Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 3fd8ed5639589846baec0dc0ab312cdf709094f0 Author: Josh Hunt Date: Fri Oct 11 12:53:40 2019 -0400 i40e: Add UDP segmentation offload support Based on a series from Alexander Duyck this change adds UDP segmentation offload support to the i40e driver. CC: Alexander Duyck CC: Willem de Bruijn Signed-off-by: Josh Hunt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c74d4bdbae4f00575362c2ba147ffcb31e724f04 Author: Josh Hunt Date: Fri Oct 11 12:53:39 2019 -0400 ixgbe: Add UDP segmentation offload support Repost from a series by Alexander Duyck to add UDP segmentation offload support to the igb driver: https://lore.kernel.org/netdev/20180504003916.4769.66271.stgit@localhost.localdomain/ CC: Alexander Duyck CC: Willem de Bruijn Suggested-by: Alexander Duyck Signed-off-by: Josh Hunt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 4085d06d2f225dc9b4827566f43b919e69f08bcb Author: Josh Hunt Date: Fri Oct 11 12:53:38 2019 -0400 igb: Add UDP segmentation offload support Based on a series from Alexander Duyck this change adds UDP segmentation offload support to the igb driver. CC: Alexander Duyck CC: Willem de Bruijn Signed-off-by: Josh Hunt Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 749234419aeeb275900c2706e1fa078fd7394743 Merge: 9014fc319b4b e4a5dc1849d3 Author: David S. Miller Date: Tue Oct 29 21:05:26 2019 -0700 Merge branch 'nfc-pn533-add-uart-phy-driver' Lars Poeschel says: ==================== nfc: pn533: add uart phy driver The purpose of this patch series is to add a uart phy driver to the pn533 nfc driver. It first changes the dt strings and docs. The dt compatible strings need to change, because I would add "pn532-uart" to the already existing "pn533-i2c" one. These two are now unified into just "pn532". Then the neccessary changes to the pn533 core driver are made. Then the uart phy is added. As the pn532 chip supports a autopoll, I wanted to use this instead of the software poll loop in the pn533 core driver. It is added and activated by the last to patches. The way to add the autopoll later in seperate patches is chosen, to show, that the uart phy driver can also work with the software poll loop, if someone needs that for some reason. In v11 of this patchseries I address a byte ordering issue reported by kbuild test robot in patch 5/7. ==================== Signed-off-by: David S. Miller commit e4a5dc1849d35411c80d01d85361f13f02c26536 Author: Lars Poeschel Date: Tue Oct 29 15:48:02 2019 +0100 nfc: pn532_uart: Make use of pn532 autopoll This switches the pn532 UART phy driver from manually polling to the new autopoll mechanism. Cc: Johan Hovold Signed-off-by: Lars Poeschel Signed-off-by: David S. Miller commit c64b875fe1e1f6b30e3a15cb74d623349c571001 Author: Lars Poeschel Date: Tue Oct 29 15:47:43 2019 +0100 nfc: pn533: Add autopoll capability pn532 devices support an autopoll command, that lets the chip automatically poll for selected nfc technologies instead of manually looping through every single nfc technology the user is interested in. This is faster and less cpu and bus intensive than manually polling. This adds this autopoll capability to the pn533 driver. Cc: Johan Hovold Cc: David Miller Signed-off-by: Lars Poeschel Signed-off-by: David S. Miller commit c656aa4c27b17a8c70da223ed5ab42145800d6b5 Author: Lars Poeschel Date: Tue Oct 29 15:47:14 2019 +0100 nfc: pn533: add UART phy driver This adds the UART phy interface for the pn533 driver. The pn533 driver can be used through UART interface this way. It is implemented as a serdev device. Cc: Johan Hovold Cc: Claudiu Beznea Cc: David Miller Signed-off-by: Lars Poeschel Signed-off-by: David S. Miller commit 843cc92ed323692943c94d7e6ce97a0353b8c2d7 Author: Lars Poeschel Date: Tue Oct 29 15:46:46 2019 +0100 nfc: pn533: Split pn533 init & nfc_register There is a problem in the initialisation and setup of the pn533: It registers with nfc too early. It could happen, that it finished registering with nfc and someone starts using it. But setup of the pn533 is not yet finished. Bad or at least unintended things could happen. So I split out nfc registering (and unregistering) to seperate functions that have to be called late in probe then. i2c requires a bit more love: i2c requests an irq in it's probe function. 'Commit 32ecc75ded72 ("NFC: pn533: change order operations in dev registation")' shows, this can not happen too early. An irq can be served before structs are fully initialized. The way chosen to prevent this is to request the irq after nfc_alloc_device initialized the structs, but before nfc_register_device. So there is now this pn532_i2c_nfc_alloc function. Cc: Johan Hovold Cc: Claudiu Beznea Cc: Jakub Kicinski Signed-off-by: Lars Poeschel Signed-off-by: David S. Miller commit 0bf2840ccc6efcba82d83b224dcde19dea9f1ee3 Author: Lars Poeschel Date: Tue Oct 29 15:46:29 2019 +0100 nfc: pn533: Add dev_up/dev_down hooks to phy_ops This adds hooks for dev_up and dev_down to the phy_ops. They are optional. The idea is to inform the phy driver when the nfc chip is really going to be used. When it is not used, the phy driver can suspend it's interface to the nfc chip to save some power. The nfc chip is considered not in use before dev_up and after dev_down. Cc: Johan Hovold Signed-off-by: Lars Poeschel Signed-off-by: David S. Miller commit 3c57b3954701fbbac954986198edb030d84873e0 Author: Lars Poeschel Date: Tue Oct 29 15:45:58 2019 +0100 nfc: pn532: Add uart phy docs and rename it This adds documentation about the uart phy to the pn532 binding doc. As the filename "pn533-i2c.txt" is not appropriate any more, rename it to the more general "pn532.txt". This also documents the deprecation of the compatible strings ending with "...-i2c". Cc: Johan Hovold Cc: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Lars Poeschel Signed-off-by: David S. Miller commit 3d5f3a67e466f08920b3a2e5964bc03743932552 Author: Lars Poeschel Date: Tue Oct 29 15:43:14 2019 +0100 nfc: pn533: i2c: "pn532" as dt compatible string It is favourable to have one unified compatible string for devices that have multiple interfaces. So this adds simply "pn532" as the devicetree binding compatible string and makes a note that the old ones are deprecated. Cc: Johan Hovold Cc: Simon Horman Signed-off-by: Lars Poeschel Signed-off-by: David S. Miller commit daee5598e491d8d3979bd4ad6c447d89ce57b446 Author: Alexander Duyck Date: Fri Oct 11 08:34:59 2019 -0700 e1000e: Drop unnecessary __E1000_DOWN bit twiddling Since we no longer check for __E1000_DOWN in e1000e_close we can drop the spot where we were restoring the bit. This saves us a bit of unnecessary complexity. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit a7023819404ac9bd2bb311a4fafd38515cfa71ec Author: Alexander Duyck Date: Fri Oct 11 08:34:52 2019 -0700 e1000e: Use rtnl_lock to prevent race conditions between net and pci/pm This patch is meant to address possible race conditions that can exist between network configuration and power management. A similar issue was fixed for igb in commit 9474933caf21 ("igb: close/suspend race in netif_device_detach"). In addition it consolidates the code so that the PCI error handling code will essentially perform the power management freeze on the device prior to attempting a reset, and will thaw the device afterwards if that is what it is planning to do. Otherwise when we call close on the interface it should see it is detached and not attempt to call the logic to down the interface and free the IRQs again. From what I can tell the check that was adding the check for __E1000_DOWN in e1000e_close was added when runtime power management was added. However it should not be relevant for us as we perform a call to pm_runtime_get_sync before we call e1000_down/free_irq so it should always be back up before we call into this anyway. Reported-by: Morumuri Srivalli Signed-off-by: Alexander Duyck Tested-by: David Dai Tested-by: Aaron Brown commit 914ee9c436cbe90c8ca8a46ec8433cb614a2ada5 Author: Sasha Neftin Date: Thu Oct 10 13:15:39 2019 +0300 e1000e: Add support for Comet Lake Add devices ID's for the next LOM generations that will be available on the next Intel Client platform (Comet Lake) This patch provides the initial support for these devices Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 9014fc319b4b5c092e02fedabcf7d4c1266e0c4a Merge: 8466a57dfbb0 3fb01a31afda Author: David S. Miller Date: Tue Oct 29 18:12:49 2019 -0700 Merge branch 'bridge-fdbs-bitops' Nikolay Aleksandrov says: ==================== net: bridge: convert fdbs to use bitops We'd like to have a well-defined behaviour when changing fdb flags. The problem is that we've added new fields which are changed from all contexts without any locking. We are aware of the bit test/change races and these are fine (we can remove them later), but it is considered undefined behaviour to change bitfields from multiple threads and also on some architectures that can result in unexpected results, specifically when all fields between the changed ones are also bitfields. The conversion to bitops shows the intent clearly and makes them use functions with well-defined behaviour in such cases. There is no overhead for the fast-path, the bit changing functions are used only in special cases when learning and in the slow path. In addition this conversion allows us to simplify fdb flag handling and avoid bugs for future bits (e.g. a forgetting to clear the new bit when allocating a new fdb). All bridge selftests passed, also tried all of the converted bits manually in a VM. ==================== Signed-off-by: David S. Miller commit 3fb01a31afdab9f046fc11ce430c69e6e3b7b9a6 Author: Nikolay Aleksandrov Date: Tue Oct 29 13:45:59 2019 +0200 net: bridge: fdb: set flags directly in fdb_create No need to have separate arguments for each flag, just set the flags to whatever was passed to fdb_create() before the fdb is published. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit d38c6e3db0c4314efadf53ddcf98345a4b115f31 Author: Nikolay Aleksandrov Date: Tue Oct 29 13:45:58 2019 +0200 net: bridge: fdb: convert offloaded to use bitops Convert the offloaded field to a flag and use bitops. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit b5cd9f7c42480ede119a390607a9dbe6263f6795 Author: Nikolay Aleksandrov Date: Tue Oct 29 13:45:57 2019 +0200 net: bridge: fdb: convert added_by_external_learn to use bitops Convert the added_by_external_learn field to a flag and use bitops. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit ac3ca6af443aa495c7907e5010ac77fbd2450eaa Author: Nikolay Aleksandrov Date: Tue Oct 29 13:45:56 2019 +0200 net: bridge: fdb: convert added_by_user to bitops Straight-forward convert of the added_by_user field to bitops. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e0458d9a733ba71a2821d0c3fc0745baac697db0 Author: Nikolay Aleksandrov Date: Tue Oct 29 13:45:55 2019 +0200 net: bridge: fdb: convert is_sticky to bitops Straight-forward convert of the is_sticky field to bitops. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 29e63fffd666f1945756882d4b02bc7bec132101 Author: Nikolay Aleksandrov Date: Tue Oct 29 13:45:54 2019 +0200 net: bridge: fdb: convert is_static to bitops Convert the is_static to bitops, make use of the combined test_and_set/clear_bit to simplify expressions in fdb_add_entry. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 6869c3b02b596eba931a754f56875d2e2ac612db Author: Nikolay Aleksandrov Date: Tue Oct 29 13:45:53 2019 +0200 net: bridge: fdb: convert is_local to bitops The patch adds a new fdb flags field in the hole between the two cache lines and uses it to convert is_local to bitops. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 8466a57dfbb0c9bf6db4685ed9c4144b8deec688 Author: Ursula Braun Date: Tue Oct 29 12:43:46 2019 +0100 net/smc: remove unneeded include for smc.h The only smc-related reference in net/sock.h is struct smc_hashinfo. But just its address is refered to. Thus there is no need for the include of net/smc.h. Remove it. Suggested-by: Jakub Kicinski Reviewed by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit f73b12812a3d1d798b7517547ccdcf864844d2cd Author: Hoang Le Date: Tue Oct 29 07:51:21 2019 +0700 tipc: improve throughput between nodes in netns Currently, TIPC transports intra-node user data messages directly socket to socket, hence shortcutting all the lower layers of the communication stack. This gives TIPC very good intra node performance, both regarding throughput and latency. We now introduce a similar mechanism for TIPC data traffic across network namespaces located in the same kernel. On the send path, the call chain is as always accompanied by the sending node's network name space pointer. However, once we have reliably established that the receiving node is represented by a namespace on the same host, we just replace the namespace pointer with the receiving node/namespace's ditto, and follow the regular socket receive patch though the receiving node. This technique gives us a throughput similar to the node internal throughput, several times larger than if we let the traffic go though the full network stacks. As a comparison, max throughput for 64k messages is four times larger than TCP throughput for the same type of traffic. To meet any security concerns, the following should be noted. - All nodes joining a cluster are supposed to have been be certified and authenticated by mechanisms outside TIPC. This is no different for nodes/namespaces on the same host; they have to auto discover each other using the attached interfaces, and establish links which are supervised via the regular link monitoring mechanism. Hence, a kernel local node has no other way to join a cluster than any other node, and have to obey to policies set in the IP or device layers of the stack. - Only when a sender has established with 100% certainty that the peer node is located in a kernel local namespace does it choose to let user data messages, and only those, take the crossover path to the receiving node/namespace. - If the receiving node/namespace is removed, its namespace pointer is invalidated at all peer nodes, and their neighbor link monitoring will eventually note that this node is gone. - To ensure the "100% certainty" criteria, and prevent any possible spoofing, received discovery messages must contain a proof that the sender knows a common secret. We use the hash mix of the sending node/namespace for this purpose, since it can be accessed directly by all other namespaces in the kernel. Upon reception of a discovery message, the receiver checks this proof against all the local namespaces'hash_mix:es. If it finds a match, that, along with a matching node id and cluster id, this is deemed sufficient proof that the peer node in question is in a local namespace, and a wormhole can be opened. - We should also consider that TIPC is intended to be a cluster local IPC mechanism (just like e.g. UNIX sockets) rather than a network protocol, and hence we think it can justified to allow it to shortcut the lower protocol layers. Regarding traceability, we should notice that since commit 6c9081a3915d ("tipc: add loopback device tracking") it is possible to follow the node internal packet flow by just activating tcpdump on the loopback interface. This will be true even for this mechanism; by activating tcpdump on the involved nodes' loopback interfaces their inter-name space messaging can easily be tracked. v2: - update 'net' pointer when node left/rejoined v3: - grab read/write lock when using node ref obj v4: - clone traffics between netns to loopback Suggested-by: Jon Maloy Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 51210ad5a558dcc7511d0c083f5cd796077b4e4d Author: Florian Westphal Date: Tue Oct 29 01:44:04 2019 +0100 inet: do not call sublist_rcv on empty list syzbot triggered struct net NULL deref in NF_HOOK_LIST: RIP: 0010:NF_HOOK_LIST include/linux/netfilter.h:331 [inline] RIP: 0010:ip6_sublist_rcv+0x5c9/0x930 net/ipv6/ip6_input.c:292 ipv6_list_rcv+0x373/0x4b0 net/ipv6/ip6_input.c:328 __netif_receive_skb_list_ptype net/core/dev.c:5274 [inline] Reason: void ipv6_list_rcv(struct list_head *head, struct packet_type *pt, struct net_device *orig_dev) [..] list_for_each_entry_safe(skb, next, head, list) { /* iterates list */ skb = ip6_rcv_core(skb, dev, net); /* ip6_rcv_core drops skb -> NULL is returned */ if (skb == NULL) continue; [..] } /* sublist is empty -> curr_net is NULL */ ip6_sublist_rcv(&sublist, curr_dev, curr_net); Before the recent change NF_HOOK_LIST did a list iteration before struct net deref, i.e. it was a no-op in the empty list case. List iteration now happens after *net deref, causing crash. Follow the same pattern as the ip(v6)_list_rcv loop and add a list_empty test for the final sublist dispatch too. Cc: Edward Cree Reported-by: syzbot+c54f457cad330e57e967@syzkaller.appspotmail.com Fixes: ca58fbe06c54 ("netfilter: add and use nf_hook_slow_list()") Signed-off-by: Florian Westphal Tested-by: Leon Romanovsky Tested-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit acda6180e86ba9e0026287d65f30d1e2b0c8882a Author: Saurav Girepunje Date: Tue Oct 29 01:46:35 2019 +0530 broadcom: bnxt: Fix use true/false for bool Use true/false for bool type in bnxt_timer function. Signed-off-by: Saurav Girepunje Acked-by: Michael Chan Signed-off-by: David S. Miller commit cb5ff33fbfee3438e4944550d55f1d83d2e365f6 Author: Saurav Girepunje Date: Tue Oct 29 01:39:50 2019 +0530 cavium: thunder: Fix use true/false for bool type use true/false on bool type variables for assignment. Signed-off-by: Saurav Girepunje Signed-off-by: David S. Miller commit 5b5168c76a07ecb7277afbf1f25c3ac8b22ba99a Merge: e528afb72a48 262caf47449d Author: David S. Miller Date: Tue Oct 29 17:50:10 2019 -0700 Merge branch 'net-phy-marvell-fix-and-extend-downshift-support' Heiner Kallweit says: ==================== net: phy: marvell: fix and extend downshift support This series includes two fixes and two extensions for downshift support. ==================== Signed-off-by: David S. Miller commit 262caf47449d3ea6bf744397259fc61be3370077 Author: Heiner Kallweit Date: Mon Oct 28 20:54:17 2019 +0100 net: phy: marvell: add PHY tunable support for more PHY versions More PHY versions are compatible with the existing downshift implementation, so let's add downshift support for them. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5c6bc5199b5d142783b9f8ea662b54431b8e5509 Author: Heiner Kallweit Date: Mon Oct 28 20:53:25 2019 +0100 net: phy: marvell: add downshift support for M88E1111 This patch adds downshift support for M88E1111. This PHY version uses another register for downshift configuration, reading downshift status is possible via the same register as for other PHY versions. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 911af5e149bb1116a2aebb5e7ae5f380caa2d7a1 Author: Heiner Kallweit Date: Mon Oct 28 20:52:55 2019 +0100 net: phy: marvell: fix downshift function naming I got access to the M88E1111 datasheet, and this PHY version uses another register for downshift configuration. Therefore change prefix to m88e1011, aligned with constants like MII_M1011_PHY_SCR. Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable") Reported-by: Chris Healy Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f8d975be71143f00fea7a9ac0f57660e6a133dad Author: Heiner Kallweit Date: Mon Oct 28 20:52:22 2019 +0100 net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK Fix typo and use PHY_SCR for PHY-specific Control Register. Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable") Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b3545e086877557b8b933c0fbf64dca065a1f5f6 Author: Lucas De Marchi Date: Mon Oct 28 20:50:49 2019 -0700 drm/i915/tgl: add support to one DP-MST stream This is the minimum change to support 1 (and only 1) DP-MST monitor connected on Tiger Lake. This change was isolated from previous patch from José. In order to support more streams we will need to create a master-slave relation on the transcoders and that is not currently working yet. v2: remove unused macro and use REG_FIELD_PREP() (Ville) Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191029035049.5907-1-lucas.demarchi@intel.com commit e528afb72a481977456bb18345d4e7f6b85fa7b1 Author: Julian Wiedmann Date: Mon Oct 28 17:08:00 2019 +0100 Documentation: net-sysfs: describe missing statistics Sync the ABI description with the interface statistics that are currently available through sysfs. CC: Jarod Wilson CC: Jonathan Corbet CC: linux-doc@vger.kernel.org Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 78713dfade756210a88630d0c3eb7ed04774d499 Author: Dmitry Torokhov Date: Tue Oct 29 17:05:34 2019 -0700 Input: kxtj9 - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts kxtj9 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. note that with regular input devices handling polling, there is no longer a benefit in having separate INPUT_KXTJ9_POLLED_MODE config option. Link: https://lore.kernel.org/r/20191017204217.106453-23-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit e73391180ae937f6947fc252a27c0e203365a9f1 Author: Dmitry Torokhov Date: Tue Oct 29 17:05:27 2019 -0700 Input: kxtj9 - switch to using managed resources Using devm API allows to clean up error handling and drop the remove() method. Link: https://lore.kernel.org/r/20191017204217.106453-22-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit b873f73cf66ffd19c6eba47ade6844ac01e9ccb0 Author: Dmitry Torokhov Date: Tue Oct 29 17:05:13 2019 -0700 Input: bma150 - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts bma150 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-21-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 493a6ebd59dcecb09d8e97293e1b254ad0003a7b Author: Jonathan Bakker Date: Tue Oct 29 17:05:06 2019 -0700 Input: bma150 - use managed resources helpers The driver can be cleaned up by using managed resource helpers. Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel [dtor: do not explicitly set parent of input device since we are using devm] Link: https://lore.kernel.org/r/20191017204217.106453-20-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 867e8820e037c45f57ad39869ecfb3e58a23d908 Author: Dmitry Torokhov Date: Tue Oct 29 17:04:58 2019 -0700 Input: mma8450 - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts mma8450 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-19-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit ff68cf0b166efd626e653d9ca55f1a1ec74f3667 Author: Dmitry Torokhov Date: Tue Oct 29 17:04:51 2019 -0700 Input: gpio_decoder - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts gpio_decoder driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-18-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 36bc3684c212d467ddae0dda3d18d64c5212bae6 Author: Dmitry Torokhov Date: Tue Oct 29 17:04:33 2019 -0700 Input: rb532_button - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts rb532_button driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-17-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 528c7d02c78bc78aab40ed843129418dc2d44250 Author: Dmitry Torokhov Date: Tue Oct 29 17:04:25 2019 -0700 Input: rb532_button - switch to using managed resources Using devm API allows us to clean up error handling paths and drop the remove() method. Link: https://lore.kernel.org/r/20191017204217.106453-16-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit aede7a1e0cc3e5712f8cb2953198c295b487faed Author: Dmitry Torokhov Date: Tue Oct 29 17:04:18 2019 -0700 Input: sgi_btns - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts sgi_btns driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-15-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 9e085dd069d5d868cca7ae92b610c678c170ac92 Author: Dmitry Torokhov Date: Tue Oct 29 17:04:10 2019 -0700 Input: sgi_btns - switch to using managed resources Switching to devm API allows to clean up error handling paths and drop the remove() method. Link: https://lore.kernel.org/r/20191017204217.106453-14-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 5d96738d9a74ec774bc7408288b44a7db6321c47 Author: Dmitry Torokhov Date: Tue Oct 29 17:04:02 2019 -0700 Input: cobalt_btns - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts cobalt_btns driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-13-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 4d69ca90de6ad611d74571ebd18d6bf86a9e1218 Author: Dmitry Torokhov Date: Tue Oct 29 17:03:54 2019 -0700 Input: cobalt_btns - convert to use managed resources This simplifies error handling and allows to remove cobalt_buttons_remove() method. Link: https://lore.kernel.org/r/20191017204217.106453-12-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 4a767ec368bf4b743ce466394096c528eb4abecb Author: Dmitry Torokhov Date: Tue Oct 29 17:03:45 2019 -0700 Input: wistron_btns - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts wistron_btns driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-11-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 071ec845c8c65a992b7760172e84a456382315d7 Author: Dmitry Torokhov Date: Tue Oct 29 17:02:19 2019 -0700 Input: apanel - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts apanel driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. While at it, let's convert the driver to use devm. Link: https://lore.kernel.org/r/20191017204217.106453-10-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 9584bded0ba886b13a41eb25e0ed1431c2191979 Author: Dmitry Torokhov Date: Tue Oct 29 16:55:10 2019 -0700 Input: gpio_keys_polled - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts gpio_keys_polled driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Note that we still keep polled and non-polled gpio-keys drivers separate, as they are different enough and mixing them up would make the code pretty confusing. Acked-by: Andy Shevchenko Acked-by: Marco Felsch Link: https://lore.kernel.org/r/20191017204217.106453-9-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit c028c44f42838c502a8f4cc9f9e783cf4b65950b Author: Dmitry Torokhov Date: Tue Oct 29 16:54:53 2019 -0700 Input: jornada680_kbd - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts jornada680_kbd driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Acked-by: Marco Felsch Link: https://lore.kernel.org/r/20191017204217.106453-8-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit ea6c52ae259a4b6663d299d5e3509f0c21ac9d5a Author: Dmitry Torokhov Date: Tue Oct 29 16:54:37 2019 -0700 Input: clps711x-keypad - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts clps711x-keypad driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Also use managed API when allocating input device, this allows us to remove clps711x_keypad_remove() method. Acked-by: Andy Shevchenko Acked-by: Marco Felsch Link: https://lore.kernel.org/r/20191017204217.106453-7-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit d0fe37b923e1ebe8d62b315a45b49ab321dc6319 Author: Dmitry Torokhov Date: Tue Oct 29 16:54:04 2019 -0700 Input: adc-keys - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts adc-keys driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Acked-by: Marco Felsch Link: https://lore.kernel.org/r/20191017204217.106453-6-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 7cca5a342ecd78ee163eaf352dc3995291b55406 Author: Dmitry Torokhov Date: Tue Oct 29 16:50:47 2019 -0700 Input: tsc6507x-ts - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts tsc6507x-ts driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 9b587815ddd8f092c5a87f764e30b39fe8748c4d Author: Dmitry Torokhov Date: Tue Oct 29 16:50:20 2019 -0700 Input: ts4800-ts - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts ts4800-ts driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 08b936012964dd9261c600e998e47321c92ca83f Author: Dmitry Torokhov Date: Tue Oct 29 16:42:30 2019 -0700 Input: sur40 - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts sur40 driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit bd88ce25335d23a9967e6d3d1efdc320dbd0a3a4 Author: Dmitry Torokhov Date: Tue Oct 29 16:41:57 2019 -0700 Input: raspberrypi-ts - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts raspberrypi-ts driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191017204217.106453-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 055070a7d0d35d0a85697f21788a2c82534ed53b Author: Dmitry Torokhov Date: Mon Oct 28 21:27:49 2019 -0700 Input: psxpad-spi - switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts psxpad-spi driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Link: https://lore.kernel.org/r/20191001220421.GA66693@dtor-ws Signed-off-by: Dmitry Torokhov commit 57c2af791b6c8087b6d8b56046838427d2ec0d73 Merge: 8c84b43f17cb 12a280c72868 Author: Dave Airlie Date: Wed Oct 30 09:01:28 2019 +1000 Merge tag 'topic/mst-suspend-resume-reprobe-2019-10-29-2' of git://anongit.freedesktop.org/drm/drm-misc into drm-next UAPI Changes: Cross-subsystem Changes: Core Changes: * Handle UP requests asynchronously in the DP MST helpers, fixing hotplug notifications and allowing us to implement suspend/resume reprobing * Add basic suspend/resume reprobing to the DP MST helpers * Improve locking for link address reprobing and connection status request handling in the DP MST helpers * Miscellaneous refactoring in the DP MST helpers * Add a Kconfig option to the DP MST helpers to enable tracking of gets/puts for topology references for debugging purposes Driver Changes: * nouveau: Resume hotplug interrupts earlier, so that sideband messages may be transmitted during resume and thus allow suspend/resume reprobing for DP MST to work * nouveau: Avoid grabbing runtime PM references when handling short DP pulses, so that handling sideband messages in resume codepaths with the DP MST helpers doesn't deadlock us * i915, nouveau, amdgpu, radeon: Use detect_ctx for probing MST connectors, so that we can grab the topology manager's atomic lock Note: there's some amdgpu patches that I didn't realize were pushed upstream already when creating this topic branch. When they fail to apply, you can just ignore and skip them. Signed-off-by: Dave Airlie From: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/a74c6446bc960190d195a751cb6d8a00a98f3974.camel@redhat.com commit 199f3ac319554f1ffddcc8e832448843f073d4c7 Author: YueHaibing Date: Mon Oct 28 12:01:21 2019 +0000 ionic: Remove set but not used variable 'sg_desc' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/pensando/ionic/ionic_txrx.c: In function 'ionic_rx_empty': drivers/net/ethernet/pensando/ionic/ionic_txrx.c:405:28: warning: variable 'sg_desc' set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit caabee5b53f5eaa086170e4594f603965bd7d88c Author: Thomas Haemmerle Date: Mon Oct 28 08:08:14 2019 +0000 net: phy: dp83867: support Wake on LAN This adds WoL support on TI DP83867 for magic, magic secure, unicast and broadcast. Signed-off-by: Thomas Haemmerle Signed-off-by: David S. Miller commit 76d7774e203d422edb6b8c6db800478ca029fde5 Author: Gustavo A. R. Silva Date: Mon Oct 28 02:04:47 2019 -0500 net: aquantia: fix error handling in aq_ptp_poll Fix currenty ignored returned error by properly checking *err* after calling aq_nic->aq_hw_ops->hw_ring_hwts_rx_fill(). Addresses-Coverity-ID: 1487357 ("Unused value") Fixes: 04a1839950d9 ("net: aquantia: implement data PTP datapath") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Igor Russkikh Signed-off-by: David S. Miller commit 207136dfeb3b2cde873b48d745100fa688c83f06 Author: YueHaibing Date: Sat Oct 26 02:51:09 2019 +0000 net: aquantia: remove unused including Remove including that don't need it. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit b6989d248a2d13f02895bae1a9321b3bbccc0283 Author: Mao Wenan Date: Sat Oct 26 10:21:39 2019 +0800 net: dsa: LAN9303: select REGMAP when LAN9303 enable When NET_DSA_SMSC_LAN9303=y and NET_DSA_SMSC_LAN9303_MDIO=y, below errors can be seen: drivers/net/dsa/lan9303_mdio.c:87:23: error: REGMAP_ENDIAN_LITTLE undeclared here (not in a function) .reg_format_endian = REGMAP_ENDIAN_LITTLE, drivers/net/dsa/lan9303_mdio.c:93:3: error: const struct regmap_config has no member named reg_read .reg_read = lan9303_mdio_read, It should select REGMAP in config NET_DSA_SMSC_LAN9303. Fixes: dc7005831523 ("net: dsa: LAN9303: add MDIO managed mode support") Signed-off-by: Mao Wenan Signed-off-by: David S. Miller commit 11dbb632a45a120ceb64f9f2a733992f947278c8 Author: Mao Wenan Date: Sat Oct 26 10:07:38 2019 +0800 net: aquantia: make two symbols be static When using ARCH=mips CROSS_COMPILE=mips-linux-gnu- to build drivers/net/ethernet/aquantia/atlantic/aq_ptp.o and drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.o, below errors can be seen: drivers/net/ethernet/aquantia/atlantic/aq_ptp.c:1378:6: warning: symbol 'aq_ptp_poll_sync_work_cb' was not declared. Should it be static? drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c:1155:5: warning: symbol 'hw_atl_b0_ts_to_sys_clock' was not declared. Should it be static? This patch to make aq_ptp_poll_sync_work_cb and hw_atl_b0_ts_to_sys_clock be static to fix these warnings. Fixes: 9c477032f7d0 ("net: aquantia: add support for PIN funcs") Signed-off-by: Mao Wenan Signed-off-by: David S. Miller commit 6d28f1d95c42918d80d922a7ce9ba591752eaeb9 Merge: 352b1dee7440 27d461333459 Author: David S. Miller Date: Tue Oct 29 16:08:54 2019 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2019-10-25 This series contains updates to i40e only. Several are fixes that could go to 'net', but were intended for 'net-next'. Sylwia changes how the driver function to read the NVM module data, so that it is able to read the LLDP agent configuration to allow for persistent LLDP. Jaroslaw resolves an issue where the incorrect FEC settings were being displayed in ethtool, by setting the proper FEC bits. Piotr moves the hardware flags detection into a separate function, so that the specific flags can be set based on the MAC and NVM. Also extends the PHY access function to include a command flag to let the firmware know it should not change the page while accessing a OSFP module. Updates the driver to display the driver and firmware version when in recovery mode. Aleksandr refactored the VF MAC filters accounting since an untrusted VF was able to delete but not add a MAC filter, so refactor the code to have more consistency and improved logging. Nicholas updates the driver to use a default interval of 50 usecs, instead of the current 100 usecs which was causing some regression performance issues. Damian resolved LED blinking issues for X710T*L devices by adding specific flows for these devices in the LED operations. Navid Emamdoost found where allocated memory is not being properly freed upon a failure in setting up MAC VLANs, so added the missing kfree(). v2: Dropped patches 2 & 6 from the original series while we wait for the author to respond to community feedback. ==================== Signed-off-by: David S. Miller commit 842f96124c5617b060cc0f071dcfb6ab24bdd042 Author: Jens Axboe Date: Tue Oct 29 12:34:10 2019 -0600 io_uring: fix race with canceling timeouts If we get -1 from hrtimer_try_to_cancel(), we know that the timer is running. Hence leave all completion to the timeout handler. If we don't, we can corrupt the list and miss a completion. Fixes: 11365043e527 ("io_uring: add support for canceling timeout requests") Reported-by: Hrvoje Zeba Tested-by: Hrvoje Zeba Signed-off-by: Jens Axboe commit a0e047156cdebbccf253768b39d7e1dbf954c449 Author: Chris Wilson Date: Tue Oct 29 20:23:38 2019 +0000 drm/i915/gem: Make context persistence optional Our existing behaviour is to allow contexts and their GPU requests to persist past the point of closure until the requests are complete. This allows clients to operate in a 'fire-and-forget' manner where they can setup a rendering pipeline and hand it over to the display server and immediately exit. As the rendering pipeline is kept alive until completion, the display server (or other consumer) can use the results in the future and present them to the user. The compute model is a little different. They have little to no buffer sharing between processes as their kernels tend to operate on a continuous stream, feeding the results back to the client application. These kernels operate for an indeterminate length of time, with many clients wishing that the kernel was always running for as long as they keep feeding in the data, i.e. acting like a DSP. Not all clients want this persistent "desktop" behaviour and would prefer that the contexts are cleaned up immediately upon closure. This ensures that when clients are run without hangchecking (e.g. for compute kernels of indeterminate runtime), any GPU hang or other unexpected workloads are terminated with the process and does not continue to hog resources. The default behaviour for new contexts is the legacy persistence mode, as some desktop applications are dependent upon the existing behaviour. New clients will have to opt in to immediate cleanup on context closure. If the hangchecking modparam is disabled, so is persistent context support -- all contexts will be terminated on closure. We expect this behaviour change to be welcomed by compute users, who have often been caught between a rock and a hard place. They disable hangchecking to avoid their kernels being "unfairly" declared hung, but have also experienced true hangs that the system was then unable to clean up. Naturally, this leads to bug reports. Testcase: igt/gem_ctx_persistence Link: https://github.com/intel/compute-runtime/pull/228 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Michał Winiarski Cc: Jon Bloomfield Reviewed-by: Jon Bloomfield Reviewed-by: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Acked-by: Jason Ekstrand Link: https://patchwork.freedesktop.org/patch/msgid/20191029202338.8841-1-chris@chris-wilson.co.uk commit 8c84b43f17cb0fa6543c20652aa2c6f0356bc686 Merge: a24e4b09dc75 5a884be54789 Author: Dave Airlie Date: Wed Oct 30 06:35:19 2019 +1000 Merge tag 'exynos-drm-next-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Fix a build warning at mixer driver - it fixes a build warning message, 'static' is not at beginning of declaration [-Wold-style-declaration], by moving static keyword. Signed-off-by: Dave Airlie # gpg: Signature made Mon 28 Oct 2019 10:31:25 PM AEST # gpg: using RSA key 020570887DBBB9A5 # gpg: Can't check signature: public key not found From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20191028123434.30034-1-daeinki@gmail.com commit a24e4b09dc75357492ca19d74b02e1edebc282e8 Merge: 60845e34f0c5 9a42c7c647a9 Author: Dave Airlie Date: Wed Oct 30 06:10:59 2019 +1000 Merge tag 'drm-misc-next-2019-10-24-2' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.5: UAPI Changes: -syncobj: allow querying the last submitted timeline value (David) -fourcc: explicitly defineDRM_FORMAT_BIG_ENDIAN as unsigned (Adam) -omap: revert the OMAP_BO_* flags that were added -- no userspace (Sean) Cross-subsystem Changes: -MAINTAINERS: add Mihail as komeda co-maintainer (Mihail) Core Changes: -edid: a few cleanups, add AVI infoframe bar info (Ville) -todo: remove i915 device_link item and add difficulty levels (Daniel) -dp_helpers: add a few new helpers to parse dpcd (Thierry) Driver Changes: -gma500: fix a few memory disclosure leaks (Kangjie) -qxl: convert to use the new drm_gem_object_funcs.mmap (Gerd) -various: open code dp_link helpers in preparation for helper removal (Thierry) Cc: Chunming Zhou Cc: Adam Jackson Cc: Sean Paul Cc: Ville Syrjälä Cc: Kangjie Lu Cc: Mihail Atanassov Cc: Daniel Vetter Cc: Thierry Reding Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191024155535.GA10294@art_vandelay commit 5451646467436695f90a23274845c8d54d950f19 Author: Matt Roper Date: Tue Oct 29 10:31:02 2019 -0700 drm/i915: Provide more information on DP AUX failures We're seeing some failures where an aux transaction still shows as 'busy' well after the timeout limit that the hardware is supposed to enforce. Improve the error message so that we can see exactly which aux channel this error happened on and what the status bits were during this case that isn't supposed to happen. v2: - Make timeout a const variable so that the timeout & message will match if we decide to change it in the future. (Lucas) - Don't bother testing intel_dp->aux.name for NULL. (Lucas) Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191029173102.9451-1-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi commit 60845e34f0c5c19a9e86af477b429993952f585b Merge: 3275a71e76fa 0e04ad7d1857 Author: Dave Airlie Date: Wed Oct 30 05:46:00 2019 +1000 Merge tag 'drm-next-5.5-2019-10-25' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.5-2019-10-25: amdgpu: - BACO support for CI and VI asics - Quick memory training support for navi - MSI-X support - RAS fixes - Display AVI infoframe fixes - Display ref clock fixes for renoir - Fix number of audio endpoints in renoir - Fix for discovery tables - Powerplay fixes - Documentation fixes - Misc cleanups radeon: - revert a PPC fix which broke x86 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191025221020.203546-1-alexander.deucher@amd.com commit b4941adb24c0676f77ddc25e6d7836b8245c47fc Author: Ran Wang Date: Thu Oct 24 17:26:42 2019 +0800 PM: wakeup: Add routine to help fetch wakeup source object. Some user might want to go through all registered wakeup sources and doing things accordingly. For example, SoC PM driver might need to do HW programming to prevent powering down specific IP which wakeup source depending on. So add this API to help walk through all registered wakeup source objects on that list and return them one by one. Signed-off-by: Ran Wang Tested-by: Leonard Crestez Reviewed-by: Rafael J. Wysocki Signed-off-by: Li Yang commit 47b4e129155fd1e721462fa23d128940c93b5b7b Author: Sowjanya Komatineni Date: Fri Aug 16 12:42:07 2019 -0700 arm64: tegra: Add Jetson Nano SC7 timings Add platform specific SC7 timing configuration to the Jetson Nano device tree. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 106f7a06fbe4f28db183d4c6b57b5fd60f6bdc4f Author: Sowjanya Komatineni Date: Fri Aug 16 12:42:06 2019 -0700 arm64: tegra: Add Jetson TX1 SC7 timings Add platform specific SC7 timing configuration to the Jetson TX1 device tree. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit d13c13f4cd0995e98b67a010ee2eab3685b0244b Author: Sowjanya Komatineni Date: Fri Aug 16 12:42:03 2019 -0700 arm64: tegra: Enable wake from deep sleep on RTC alarm This patch updates device tree for RTC and PMC to allow system wake from deep sleep on RTC alarm. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 264064ab0b5cf30a1faf06696acc174e224e64a9 Author: Thierry Reding Date: Tue Oct 29 12:25:45 2019 +0100 arm64: tegra: Add PMU on Tegra210 The NVIDIA Tegra210 contains an ARM PMU v3 that can be used to gather statistics about the processors and their memory system. Add a device tree node so that this functionality can be exposed. Reported-by: William Cohen Tested-by: William Cohen Signed-off-by: Thierry Reding commit 24fc33633ea327f7887046bc9537a2ce8cddac53 Author: Thierry Reding Date: Tue Oct 29 12:20:00 2019 +0100 arm64: tegra: Add blank lines for better readability Separate the individual thermal zones by a blank line for improved readability. Signed-off-by: Thierry Reding commit 614d063f89b437b4a6db0c785573ca15b696c879 Author: Thierry Reding Date: Thu Jun 27 12:23:45 2019 +0200 arm64: tegra: Enable DisplayPort on Jetson AGX Xavier Enable both USB-C/DP ports on Jetson AGX Xavier and wire up the power supplies for the SORs that drive these outputs. Signed-off-by: Thierry Reding commit c90b8f15df41db52d604c8c2446e90ed90f20525 Author: Thierry Reding Date: Thu Jun 27 12:22:26 2019 +0200 arm64: tegra: p2888: Rename regulators for consistency Some of the PMIC regulators had names that don't match the schematics. Rename them so that it is easier to cross-reference with the hardware documentation. Signed-off-by: Thierry Reding commit 3fdfaf8718fa9b806edb9f282b64d801f9866cf9 Author: Thierry Reding Date: Thu Feb 1 17:19:09 2018 +0100 arm64: tegra: Enable DP support on Jetson TX2 If equipped with an E3320 display module, Jetson TX2 can support DisplayPort. Signed-off-by: Thierry Reding commit d46d1eb30c856798b62d27f86fa2973d707361c8 Author: Thierry Reding Date: Mon Mar 19 10:29:36 2018 +0100 arm64: tegra: Fix compatible for SOR1 It turns out that both SORs on Tegra186 are the same, so there's no need to distinguish between them in the compatible string. Signed-off-by: Thierry Reding commit 35cbf655eb16189b249c53c96378399cccfc3618 Author: Thierry Reding Date: Mon Jun 24 15:57:07 2019 +0200 arm64: tegra: Enable DP support on Jetson Nano Add the AVDD_IO_EDP_1V05 and enable the SOR and DPAUX hardware blocks that are used to drive DisplayPort on Jetson Nano. Signed-off-by: Thierry Reding commit ed93a666bb32cb35a0f4c42bf9f63a047a90d475 Author: Thierry Reding Date: Fri Jun 28 10:59:19 2019 +0200 arm64: tegra: Add SOR0_OUT clock on Tegra210 This clock was not previously used because it is a fixed clock. However, adding it here allows operating systems to deal with SOR0 the same way as SOR1. Signed-off-by: Thierry Reding commit b7450f161f8ab91abeafaadafe05517a6ffbb26c Author: Vidya Sagar Date: Sat Oct 5 22:12:12 2019 +0530 arm64: tegra: Assume no CLKREQ presence by default Although Tegra194 has support for CLKREQ sideband signal and P2972 has routing of the same till the slot, it is the case most of the time that the connected device doesn't have CLKREQ support. Hence, it makes sense to assume that there is no CLKREQ support by default and it can be enabled on need basis when a card with CLKREQ support is connected. Signed-off-by: Vidya Sagar Signed-off-by: Thierry Reding commit 29ef1f4dacb5ded606546a0cc1d448920c6f821a Author: Thierry Reding Date: Thu Jan 24 19:02:54 2019 +0100 arm64: tegra: Enable SMMU for VIC on Tegra186 Enable address translation for VIC via the SMMU on Tegra186. Signed-off-by: Thierry Reding commit 488a04d4bb2f5d6216a982d8a390a218e405790c Author: Nagarjuna Kristam Date: Tue Sep 17 12:26:45 2019 +0530 arm64: tegra: Enable XUSB host controller on Jetson TX2 This enables the use of the USB ports found on the Jetson TX2 for input or external storage, for example. Signed-off-by: Nagarjuna Kristam Signed-off-by: Thierry Reding commit 05705c721591d0f8bdd1ea126f5d16176607c415 Author: Nagarjuna Kristam Date: Tue Sep 17 12:26:44 2019 +0530 arm64: tegra: Enable SMMU for XUSB host on Tegra186 Enabling the SMMU for XUSB host allows buffers to be mapped through the ARM SMMU, which helps protecting the system from rogue memory accesses by the XUSB host. Signed-off-by: Nagarjuna Kristam Signed-off-by: Thierry Reding commit ca2b8ee4572141cbf5ad838dc732e49775f4913a Author: Nagarjuna Kristam Date: Tue Sep 17 12:26:43 2019 +0530 arm64: tegra: Enable XUSB pad controller on Jetson TX2 The XUSB pad controller is a prerequisite for enabling XUSB support. Signed-off-by: Nagarjuna Kristam Signed-off-by: Thierry Reding commit 2b6b3940e8b0968f7016aa5ff6db5b09ecf6ed1f Author: Thierry Reding Date: Tue Oct 1 16:06:12 2019 +0200 arm64: tegra: Add ethernet alias on Jetson AGX Xavier The Tegra194 EQOS controller is used as primary Ethernet interface. Set the ethernet0 alias to reflect that. Generic bootloader code can use this to find the primary Ethernet device and set the MAC address, for example. Signed-off-by: Thierry Reding commit 19dc772a94bc92643210d5cba7d3477644b3032d Author: Thierry Reding Date: Wed Sep 25 13:38:51 2019 +0200 arm64: tegra: Fix compatible string for EQOS on Tegra194 The EQOS Ethernet controller found on Tegra194 is compatible with its predecessor or Tegra186. However, it is an established practice to add a compatible string for the most recent generation of the SoC as well, just in case some incompatibilities or bugs are later discovered. Signed-off-by: Thierry Reding commit 44ff822c58a7af0f458533e587283c05583da706 Author: Thierry Reding Date: Thu Aug 29 12:56:47 2019 +0200 arm64: tegra: Hook up edp interrupt on Tegra210 SOCTHERM For some reason this was never hooked up. Do it now so that over-current interrupts can be logged. Signed-off-by: Thierry Reding commit 939e7430dee4e1c0595124b8ccd1c8b5db162dd8 Author: Thierry Reding Date: Fri Jul 26 12:16:18 2019 +0200 arm64: tegra: Fix base address for SOR1 on Tegra194 The SOR1 hardware block's registers start at physical address 0x15b40000 as correctly specified by the unit-address, but the reg property lists a wrong value, likely because it was copy-and-pasted from SOR0 but not correctly updated. Signed-off-by: Thierry Reding commit 1aaa7698670cb980280e034d76f1bc1ca193af43 Author: Thierry Reding Date: Fri Jul 26 12:16:17 2019 +0200 arm64: tegra: Add unit-address for ACONNECT on Tegra194 The ACONNECT complex starts at physical address 0x2900000, so give it a unit-address to comply with standard naming practices checked for by the device tree compiler. Signed-off-by: Thierry Reding commit eef97c2a77febcccd3a9d70b9a6856ad43c7c069 Author: Thierry Reding Date: Fri Jul 26 12:16:16 2019 +0200 arm64: tegra: Add unit-address for CBB on Tegra194 The control back-bone (CBB) starts at physical address 0, so give it a unit-address to comply with standard naming practices checked for by the device tree compiler. Signed-off-by: Thierry Reding commit b45d322c2cd5716176db22800a94a8139de42b95 Author: Thierry Reding Date: Fri Sep 20 16:56:21 2019 +0200 arm64: tegra: Add CPU and cache topology for Tegra194 Tegra194 has four CPU clusters, each with their own cache hierarchy. This patch creates the CPU map for these clusters and adds the second- and third-level caches and associates them with the CPUs. Signed-off-by: Thierry Reding commit d440538e5f219900a9fc9d96fd10727b4d2b3c48 Author: Jon Hunter Date: Wed Sep 25 15:12:28 2019 +0100 arm64: tegra: Fix 'active-low' warning for Jetson Xavier regulator Commit 4fdbfd60a3a2 ("arm64: tegra: Add PCIe slot supply information in p2972-0000 platform") added regulators for the PCIe slot on the Jetson Xavier platform. One of these regulators has an active-low enable and this commit incorrectly added an active-low specifier for the GPIO which causes the following warning to occur on boot ... WARNING KERN regulator@3 GPIO handle specifies active low - ignored The fixed-regulator binding does not use the active-low flag from the gpio specifier and purely relies of the presence of the 'enable-active-high' property to determine if it is active high or low (if this property is omitted). Fix this warning by setting the GPIO to active-high in the GPIO specifier. Finally, remove the 'enable-active-low' as this is not a valid property. Fixes: 4fdbfd60a3a2 ("arm64: tegra: Add PCIe slot supply information in p2972-0000 platform") Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 1e5e929c009559bd7e898ac8e17a5d01037cb057 Author: Jon Hunter Date: Wed Sep 25 15:12:29 2019 +0100 arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator Commit 34993594181d ("arm64: tegra: Enable HDMI on Jetson TX1") added a regulator for HDMI on the Jetson TX1 platform. This regulator has an active high enable, but the GPIO specifier for enabling the regulator incorrectly defines it as active-low. This causes the following warning to occur on boot ... WARNING KERN regulator@10 GPIO handle specifies active low - ignored The fixed-regulator binding does not use the active-low flag from the gpio specifier and purely relies of the presence of the 'enable-active-high' property to determine if it is active high or low (if this property is omitted). Fix this warning by setting the GPIO to active-high in the GPIO specifier which aligns with the presense of the 'enable-active-high' property. Fixes: 34993594181d ("arm64: tegra: Enable HDMI on Jetson TX1") Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 2645f7ed9a8410920de977a8b1b66cb83eb0f76e Merge: 54ecb8f7028c cdc2d6685c13 Author: Thierry Reding Date: Tue Oct 29 20:29:48 2019 +0100 Merge branch 'for-5.5/dt-bindings' commit 4053aa65c517fba954af05e826bb97b2eaefe92a Author: Dmitry Osipenko Date: Fri Oct 25 01:14:16 2019 +0300 ARM: tegra: cardhu-a04: Add CPU Operating Performance Points Utilize common Tegra30 CPU OPP table. CPU DVFS is available now on Cardhu A04. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c01afebd74efe3e6de28f1a3c836afaccc2c97c9 Author: Dmitry Osipenko Date: Fri Oct 25 01:14:15 2019 +0300 ARM: tegra: cardhu-a04: Set up voltage regulators for DVFS Set minimum and maximum voltages, and couple CPU/CORE regulators. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c19c631a3cb71ccde4a283fea4cb3bf1c56b947f Author: Dmitry Osipenko Date: Fri Oct 25 01:14:14 2019 +0300 ARM: tegra: trimslice: Add CPU Operating Performance Points Utilize common Tegra20 CPU OPP table. CPU voltage scaling is available now on TrimSlice. Tested-by: Nicolas Chauvet Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 5ac1505008691d32734b890130e5f637f5c4bc5c Author: Dmitry Osipenko Date: Fri Oct 25 01:14:13 2019 +0300 ARM: tegra: paz00: Add CPU Operating Performance Points Utilize common Tegra20 CPU OPP table. CPU DVFS is available now on AC100. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit a60e68f98fbd2826ebc468fd3a3ce40be6ad29a6 Author: Dmitry Osipenko Date: Fri Oct 25 01:14:12 2019 +0300 ARM: tegra: paz00: Set up voltage regulators for DVFS Set minimum and maximum voltages, and couple CPU/CORE/RTC regulators. Tested-by: Nicolas Chauvet Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 875cf30a534ef5b42f11db4925b6429e3bf55a2c Author: Dmitry Osipenko Date: Fri Oct 25 01:14:11 2019 +0300 ARM: tegra: Add CPU Operating Performance Points for Tegra30 Operating Point are specified per HW version. The OPP voltages are kept in a separate DTSI file because some boards may not define CPU regulator in their device-tree if voltage scaling isn't necessary for them. Acked-by: Viresh Kumar Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 584eca70602d6b2ce56ae7e0591264918d800460 Author: Dmitry Osipenko Date: Fri Oct 25 01:14:10 2019 +0300 ARM: tegra: Add CPU Operating Performance Points for Tegra20 Operating Point are specified per HW version. The OPP voltages are kept in a separate DTSI file because some boards may not define CPU regulator in their device-tree if voltage scaling isn't necessary, like for example in a case of tegra20-trimslice which is outlet-powered device. Acked-by: Viresh Kumar Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 663bd487273736f5bfefbfb898e493433f650d49 Author: Dmitry Osipenko Date: Fri Oct 25 01:14:09 2019 +0300 ARM: tegra: Add Tegra30 CPU clock All "geared" CPU cores share the same CPU clock. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit dc6fdedf77d151278de56d126759bccc231499b1 Author: Dmitry Osipenko Date: Fri Oct 25 01:14:08 2019 +0300 ARM: tegra: Add Tegra20 CPU clock All CPU cores share the same CPU clock. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 3193a063a2cdffc8fe174c5304c567b48947a791 Author: Dmitry Osipenko Date: Mon Aug 12 00:00:43 2019 +0300 ARM: tegra: Add External Memory Controller node on Tegra30 Add External Memory Controller node to the device-tree. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit e14dc5ea7cdc9659689f89d68f86938e7e066c81 Author: Dmitry Osipenko Date: Tue Jul 23 06:37:44 2019 +0300 ARM: tegra: nyan-big: Add timings for RAM codes 4 and 6 Add timings for RAM codes 4 and 6 and a timing for 528mHz of RAM code 1, which was missed due to the clock driver bug that is fixed now in all of stable kernels. Tested-by: Steev Klimaszewski Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit cdc233fb0383b92a9f5eb1e73b31a773373e31ed Author: Dmitry Osipenko Date: Sun Jun 23 20:07:24 2019 +0300 ARM: tegra: Connect SMMU with Video Decoder Engine on Tegra30 Enable IOMMU support for the video decoder. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit a4563f5bf10b816cc1428a2a8b81412068d02434 Author: Thierry Reding Date: Thu Jul 25 18:22:16 2019 +0200 ARM: tegra: Add eDP power supplies on Venice2 The power supplies needed to drive eDP on Venice2 were never hooked up, so things only worked because those regulators are already enabled by other devices. Signed-off-by: Thierry Reding commit 5d089d42bc36d54f459fdfb5caf0fe9f3b14ae09 Author: Thierry Reding Date: Wed Jul 24 15:47:54 2019 +0200 ARM: tegra: Add SOR0_OUT clock on Tegra124 This clock is needed for eDP to properly function, so add it to the SOR device tree node. Signed-off-by: Thierry Reding commit 05a6a629f0e104aca6371d81dbe6ad56b0cea188 Author: Philippe Schenker Date: Wed Aug 14 10:53:38 2019 +0000 ARM: tegra: Add stmpe-adc DT node to Toradex T30 modules Add the stmpe-adc DT node as found on Toradex T30 modules Signed-off-by: Philippe Schenker Reviewed-by: Oleksandr Suvorov Signed-off-by: Thierry Reding commit f0dbca55adb9daae1bcc7cb84f4d046ef44370c2 Merge: 54ecb8f7028c cdc2d6685c13 Author: Thierry Reding Date: Tue Oct 29 20:28:58 2019 +0100 Merge branch 'for-5.5/dt-bindings' commit 641262f5e1ed5c96799e17595893fa1a703616ac Author: Dmitry Osipenko Date: Mon Aug 12 00:00:39 2019 +0300 dt-bindings: memory: Add binding for NVIDIA Tegra30 External Memory Controller Add device-tree binding for NVIDIA Tegra30 External Memory Controller. The binding is based on the Tegra124 EMC binding since hardware is similar, although there are couple significant differences. Note that the memory timing description is given in a platform-specific form because there is no detailed information on how to convert a typical-common DDR timing into the register values. The timing format is borrowed from downstream kernel, hence there is no hurdle in regards to upstreaming of memory timings for the boards. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 785685b7a106185c63cb927ff5e4f518e47ad08c Author: Dmitry Osipenko Date: Mon Aug 12 00:00:38 2019 +0300 dt-bindings: memory: Add binding for NVIDIA Tegra30 Memory Controller Add binding for the NVIDIA Tegra30 SoC Memory Controller. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 8da65c377b21d1b3607f42f7f7646ca9bd87cb2a Author: Dmitry Osipenko Date: Mon Aug 12 00:00:37 2019 +0300 dt-bindings: memory: tegra30: Convert to Tegra124 YAML The Tegra30 binding will actually differ from the Tegra124 a tad, in particular the EMEM configuration description. Hence rename the binding to Tegra124 during of the conversion to YAML. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit db45f0f05c3ae9f9e9c2784e779fcf5e812db425 Author: Dmitry Osipenko Date: Thu Jul 25 18:18:30 2019 +0300 dt-bindings: regulator: Document regulators coupling of NVIDIA Tegra20/30 SoCs There is voltage coupling between three regulators on Tegra20 boards and between two on Tegra30. The voltage coupling is a SoC-level feature and thus it is mandatory and common for all of the Tegra boards. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit cdc2d6685c13cc736b4c1c70b184638897c5c46f Author: Thierry Reding Date: Tue Oct 29 20:14:44 2019 +0100 dt-bindings: clock: tegra: Rename SOR0_LVDS to SOR0_OUT Tegra186 and later call this clock SOR0_OUT. Rename it on Tegra124 and Tegra210 to make the names consistent. Keep the old name for now to keep device trees buildable until they have all been converted. Signed-off-by: Thierry Reding commit d5b60e26e86a463ca83bb5ec502dda6ea685159e Author: Arnd Bergmann Date: Mon Oct 7 23:18:08 2019 +0200 RDMA/hns: Fix build error again This is not the first attempt to fix building random configurations, unfortunately the attempt in commit a07fc0bb483e ("RDMA/hns: Fix build error") caused a new problem when CONFIG_INFINIBAND_HNS_HIP06=m and CONFIG_INFINIBAND_HNS_HIP08=y: drivers/infiniband/hw/hns/hns_roce_main.o:(.rodata+0xe60): undefined reference to `__this_module' Revert commits a07fc0bb483e ("RDMA/hns: Fix build error") and a3e2d4c7e766 ("RDMA/hns: remove obsolete Kconfig comment") to get back to the previous state, then fix the issues described there differently, by adding more specific dependencies: INFINIBAND_HNS can now only be built-in if at least one of HNS or HNS3 are built-in, and the individual back-ends are only available if that code is reachable from the main driver. Fixes: a07fc0bb483e ("RDMA/hns: Fix build error") Fixes: a3e2d4c7e766 ("RDMA/hns: remove obsolete Kconfig comment") Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") Fixes: 08805fdbeb2d ("RDMA/hns: Split hw v1 driver from hns roce driver") Link: https://lore.kernel.org/r/20191007211826.3361202-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe commit 0f9ed3b2c9ecb727d6cea803def2998e1a6e625e Author: José Roberto de Souza Date: Fri Oct 25 17:13:23 2019 -0700 drm/i915/display/cnl+: Handle fused off DSC DSC could be fused off, so not all GEN10+ platforms will support it. Cc: Manasi Navare Cc: Martin Peres Reviewed-by: Ramalingam C Reviewed-by: Manasi Navare Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191026001323.216052-5-jose.souza@intel.com commit ee595888e1c25fb31bbc10a317a576311356babd Author: José Roberto de Souza Date: Fri Oct 25 17:13:22 2019 -0700 drm/i915/display/icl+: Check if DMC is fused off Check if DMC is fused off and handle it. Cc: Ville Syrjälä Cc: Martin Peres Reviewed-by: Ramalingam C Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191026001323.216052-4-jose.souza@intel.com commit 7a40aac1d77ab05ca375ac34de44e7972cc61dc3 Author: José Roberto de Souza Date: Fri Oct 25 17:13:21 2019 -0700 drm/i915/display: Check if FBC is fused off Check if FBC is fused off and handle it. Cc: Ville Syrjälä Cc: Martin Peres Reviewed-by: Ramalingam C Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191026001323.216052-3-jose.souza@intel.com commit 74393109a8c3965596f953a535c8fe7064201033 Author: José Roberto de Souza Date: Fri Oct 25 17:13:20 2019 -0700 drm/i915/display: Handle fused off HDCP HDCP could be fused off, so not all GEN9+ platforms will support it. Cc: Ville Syrjälä Cc: Martin Peres Reviewed-by: Ramalingam C Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191026001323.216052-2-jose.souza@intel.com commit a20e26d8421a4318b08d7561c817af477d3ba783 Author: José Roberto de Souza Date: Fri Oct 25 17:13:19 2019 -0700 drm/i915: Add two spaces before the SKL_DFSM registers The next patches are going to touch this registers so here already fixing it for older registers and make it consistent with most of the other registers in this file. Cc: Ramalingam C Signed-off-by: José Roberto de Souza Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20191026001323.216052-1-jose.souza@intel.com commit 352b1dee744090a4686bbf27b067f6cf87a40a35 Author: Colin Ian King Date: Fri Oct 25 18:22:55 2019 +0100 net: fec: remove redundant assignment to pointer bdp The pointer bdp is being assigned with a value that is never read, so the assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Fugang Duan Signed-off-by: David S. Miller commit d607525bd912860aad137326a1076d1e9880ddf0 Author: Vivien Didelot Date: Fri Oct 25 14:48:53 2019 -0400 net: dsa: return directly from dsa_to_port Return directly from within the loop as soon as the port is found, otherwise we won't return NULL if the end of the list is reached. Fixes: b96ddf254b09 ("net: dsa: use ports list in dsa_to_port") Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit bf96b515082c4b93ed706aa5edf518772fd7d394 Author: Lionel Landwerlin Date: Tue Oct 29 16:28:26 2019 +0200 drm/i915/perf: ensure selftests select valid format Gen12 only support a single report format : I915_OA_FORMAT_A32u40_A4u32_B8_C8 Signed-off-by: Lionel Landwerlin Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL") Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029142826.20014-1-lionel.g.landwerlin@intel.com commit 65e19f54d29cd8559ce60cfd0d751bef7afbdc5c Author: Jens Axboe Date: Sat Oct 26 07:20:21 2019 -0600 io_uring: support for larger fixed file sets There's been a few requests for supporting more fixed files than 1024. This isn't really tricky to do, we just need to split up the file table into multiple tables and index appropriately. As we do so, reduce the max single file table to 512. This enables us to do single page allocs always for the tables, which is an improvement over the situation prior. This patch adds support for up to 64K files, which should be enough for everyone. Signed-off-by: Jens Axboe commit b7620121dc04e44ce654297050f9eaf39d414a34 Author: Jens Axboe Date: Sat Oct 26 07:22:55 2019 -0600 io_uring: protect fixed file indexing with array_index_nospec() We index the file tables with a user given value. After we check it's within our limits, use array_index_nospec() to prevent any spectre attacks here. Suggested-by: Jann Horn Signed-off-by: Jens Axboe commit 17f2fe35d080d8f64e86a60cdcd3a97edcbc213b Author: Jens Axboe Date: Thu Oct 17 14:42:58 2019 -0600 io_uring: add support for IORING_OP_ACCEPT This allows an application to call accept4() in an async fashion. Like other opcodes, we first try a non-blocking accept, then punt to async context if we have to. Signed-off-by: Jens Axboe commit de2ea4b64b75a79ed9cdf9bf30e0e197901084e4 Author: Jens Axboe Date: Thu Oct 17 14:41:29 2019 -0600 net: add __sys_accept4_file() helper This is identical to __sys_accept4(), except it takes a struct file instead of an fd, and it also allows passing in extra file->f_flags flags. The latter is done to support masking in O_NONBLOCK without manipulating the original file flags. No functional changes in this patch. Cc: netdev@vger.kernel.org Acked-by: David S. Miller Signed-off-by: Jens Axboe commit fcb323cc53e29d9cc696d606bb42736b32dd9825 Author: Jens Axboe Date: Thu Oct 24 12:39:47 2019 -0600 io_uring: io_uring: add support for async work inheriting files This is in preparation for adding opcodes that need to add new files in a process file table, system calls like open(2) or accept4(2). If an opcode needs this, it must set IO_WQ_WORK_NEEDS_FILES in the work item. If work that needs to get punted to async context have this set, the async worker will assume the original task file table before executing the work. Note that opcodes that need access to the current files of an application cannot be done through IORING_SETUP_SQPOLL. Signed-off-by: Jens Axboe commit 561fb04a6a2257716738dac2ed812f377c2634c2 Author: Jens Axboe Date: Thu Oct 24 07:25:42 2019 -0600 io_uring: replace workqueue usage with io-wq Drop various work-arounds we have for workqueues: - We no longer need the async_list for tracking sequential IO. - We don't have to maintain our own mm tracking/setting. - We don't need a separate workqueue for buffered writes. This didn't even work that well to begin with, as it was suboptimal for multiple buffered writers on multiple files. - We can properly cancel pending interruptible work. This fixes deadlocks with particularly socket IO, where we cannot cancel them when the io_uring is closed. Hence the ring will wait forever for these requests to complete, which may never happen. This is different from disk IO where we know requests will complete in a finite amount of time. - Due to being able to cancel work interruptible work that is already running, we can implement file table support for work. We need that for supporting system calls that add to a process file table. - It gets us one step closer to adding async support for any system call. Signed-off-by: Jens Axboe commit 771b53d033e8663abdf59704806aa856b236dcdb Author: Jens Axboe Date: Tue Oct 22 10:25:58 2019 -0600 io-wq: small threadpool implementation for io_uring This adds support for io-wq, a smaller and specialized thread pool implementation. This is meant to replace workqueues for io_uring. Among the reasons for this addition are: - We can assign memory context smarter and more persistently if we manage the life time of threads. - We can drop various work-arounds we have in io_uring, like the async_list. - We can implement hashed work insertion, to manage concurrency of buffered writes without needing a) an extra workqueue, or b) needlessly making the concurrency of said workqueue very low which hurts performance of multiple buffered file writers. - We can implement cancel through signals, for cancelling interruptible work like read/write (or send/recv) to/from sockets. - We need the above cancel for being able to assign and use file tables from a process. - We can implement a more thorough cancel operation in general. - We need it to move towards a syslet/threadlet model for even faster async execution. For that we need to take ownership of the used threads. This list is just off the top of my head. Performance should be the same, or better, at least that's what I've seen in my testing. io-wq supports basic NUMA functionality, setting up a pool per node. io-wq hooks up to the scheduler schedule in/out just like workqueue and uses that to drive the need for more/less workers. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Jens Axboe commit 6efb16b1d5514865d0f7a01910648568ad3225d8 Author: Atish Patra Date: Thu Aug 22 00:51:51 2019 -0700 RISC-V: Issue a tlb page flush if possible If tlbflush request is for page only, there is no need to do a complete local tlb shootdown. Just do a local tlb flush for the given address. Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Paul Walmsley commit 31738ede9b339c90216b8fd10da0b1567a041f06 Author: Atish Patra Date: Thu Aug 22 00:51:50 2019 -0700 RISC-V: Issue a local tlbflush if possible. In RISC-V, tlb flush happens via SBI which is expensive. If the local cpu is the only cpu in cpumask, there is no need to invoke a SBI call. Just do a local flush and return. Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Paul Walmsley commit 6384423f49c804dbca02add1945e0ccf922cb522 Author: Atish Patra Date: Thu Aug 22 00:51:49 2019 -0700 RISC-V: Do not invoke SBI call if cpumask is empty SBI calls are expensive. If cpumask is empty, there is no need to trap via SBI as no remote tlb flushing is required. Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Paul Walmsley commit 5340627e3fe08030988bdda46dd86cd5d5fb7517 Author: David Abdurachmanov Date: Fri Oct 4 17:12:22 2019 -0700 riscv: add support for SECCOMP and SECCOMP_FILTER This patch was extensively tested on Fedora/RISCV (applied by default on top of 5.2-rc7 kernel for <2 months). The patch was also tested with 5.3-rc on QEMU and SiFive Unleashed board. libseccomp (userspace) was rebased: https://github.com/seccomp/libseccomp/pull/134 Fully passes libseccomp regression testing (simulation and live). There is one failing kernel selftest: global.user_notification_signal v1 -> v2: - return immediately if secure_computing(NULL) returns -1 - fixed whitespace issues - add missing seccomp.h - remove patch #2 (solved now) - add riscv to seccomp kernel selftest Signed-off-by: David Abdurachmanov Cc: keescook@chromium.org Cc: me@carlosedp.com Tested-by: Carlos de Paula Reviewed-by: Kees Cook Link: https://lore.kernel.org/linux-riscv/CAEn-LTp=ss0Dfv6J00=rCAy+N78U2AmhqJNjfqjr2FDpPYjxEQ@mail.gmail.com/ Link: https://lore.kernel.org/linux-riscv/CAJr-aD=UnCN9E_mdVJ2H5nt=6juRSWikZnA5HxDLQxXLbsRz-w@mail.gmail.com/ [paul.walmsley@sifive.com: cleaned up Cc: lines; fixed spelling and checkpatch issues; updated to apply] Signed-off-by: Paul Walmsley commit 83b8a6f242ea6b4eafe69afcd0bfa428235f2ee4 Author: Rob Herring Date: Thu Oct 24 14:18:59 2019 -0500 drm/gem: Fix mmap fake offset handling for drm_gem_object_funcs.mmap Commit c40069cb7bd6 ("drm: add mmap() to drm_gem_object_funcs") introduced a GEM object mmap() hook which is expected to subtract the fake offset from vm_pgoff. However, for mmap() on dmabufs, there is not a fake offset. To fix this, let's always call mmap() object callback with an offset of 0, and leave it up to drm_gem_mmap_obj() to remove the fake offset. TTM still needs the fake offset, so we have to add it back until that's fixed. Fixes: c40069cb7bd6 ("drm: add mmap() to drm_gem_object_funcs") Cc: Gerd Hoffmann Cc: Daniel Vetter Signed-off-by: Rob Herring Acked-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191024191859.31700-1-robh@kernel.org commit 9e62b885f71568d166c97b040b4b2e218c2a5584 Author: Steven Price Date: Fri Oct 25 14:41:43 2019 +0100 drm/panfrost: Simplify devfreq utilisation tracking Instead of tracking per-slot utilisation track a single value for the entire GPU. Ultimately it doesn't matter if the GPU is busy with only vertex or a combination of vertex and fragment processing - if it's busy then it's busy and devfreq should be scaling appropriately. This also makes way for being able to submit multiple jobs per slot which requires more values than the original boolean per slot. Reviewed-by: Tomeu Vizoso Reviewed-by: Alyssa Rosenzweig Signed-off-by: Steven Price Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191025134143.14324-3-steven.price@arm.com commit 221bc77914cbcccaac1918ba80dce807452e143d Author: Steven Price Date: Fri Oct 25 14:41:42 2019 +0100 drm/panfrost: Use generic code for devfreq Use dev_pm_opp_set_rate() instead of open coding the devfreq integration, simplifying the code. Reviewed-by: Mark Brown Reviewed-by: Tomeu Vizoso Acked-by: Alyssa Rosenzweig Signed-off-by: Steven Price Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191025134143.14324-2-steven.price@arm.com commit 6a3552527d431ae3281ce0dfa25107e71cc681e2 Author: Matt Roper Date: Fri Oct 25 16:06:23 2019 -0700 drm/i915/tgl: Add AUX B & C to DC_OFF_POWER_DOMAINS Our TGL CI platforms are running into cases where aux transactions have failed to complete or declare a timeout well after the timeout limit that the hardware is supposed to enforce. From the logs it appears that these failures arise when aux transactions happen after we've entered DC6: <7> [622.523650] [drm:skl_enable_dc6 [i915]] Enabling DC6 <7> [622.523685] [drm:gen9_set_dc_state [i915]] Setting DC state from 00 to 02 ... <3> [622.535753] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout! <3> [622.547745] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout! <3> [622.559746] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout! <3> [622.571744] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout! <3> [622.583743] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout! <3> [622.583780] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0xad400bff <7> [622.863725] [drm:drm_dp_dpcd_access] Too many retries, giving up. First error: -110 On TGL AUX B & C are in PG1 (managed by the DMC firmware) rather than PG3 as they were on ICL, so allowing DC6 means the DMC firmware might shut off the power wells behind our backs when we're trying to use them. Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191025230623.27829-6-matthew.d.roper@intel.com Reviewed-by: Imre Deak commit 47c41af7069668eed9bf7e51467557bd6cb3d599 Author: Matt Roper Date: Fri Oct 25 22:12:26 2019 -0700 drm/i915: Drop unused AUX register offsets We reference DP AUX registers via the DP_AUX_CH_CTL() and DP_AUX_CH_DATA() macros that calculate all the register offsets for us automatically; there's no need to explicitly define every offset in i915_reg.h if they're never going to be used by the driver code. v2: Apparently GVT was directly using these raw definitions in a couple places. Switch GVT code over to using our preferred macros. Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191026051226.30807-1-matthew.d.roper@intel.com commit 92d72f1b8bbbd87220daa49cd1253ce72bb7553c Author: Colin Ian King Date: Fri Oct 25 12:58:11 2019 +0100 net: aquantia: fix unintention integer overflow on left shift Shifting the integer value 1 is evaluated using 32-bit arithmetic and then used in an expression that expects a 64-bit value, so there is potentially an integer overflow. Fix this by using the BIT_ULL macro to perform the shift and avoid the overflow. Addresses-Coverity: ("Unintentional integer overflow") Fixes: 04a1839950d9 ("net: aquantia: implement data PTP datapath") Signed-off-by: Colin Ian King Reviewed-by: Igor Russkikh Signed-off-by: David S. Miller commit 69977901867aefbdda5f5f75af067fff08650af2 Author: Colin Ian King Date: Fri Oct 25 12:38:28 2019 +0100 net: aquantia: fix spelling mistake: tx_queus -> tx_queues There is a spelling mistake in a netdev_err error message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Igor Russkikh Signed-off-by: David S. Miller commit 7d2ae58376658a3ca0d8f9a53f6f065df126c432 Author: Kai Vehmanen Date: Tue Oct 29 15:40:17 2019 +0200 ASoC: Intel: bxt_rt298: common hdmi codec support Add support for using snd-hda-codec-hdmi driver for HDMI/DP instead of ASoC hdac-hdmi. This is aligned with how other HDA codecs are already handled. Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191029134017.18901-10-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 59bbd703ea2eae7c2766713135e4742c07fbbad7 Author: Kai Vehmanen Date: Tue Oct 29 15:40:16 2019 +0200 ASoC: intel: sof_rt5682: common hdmi codec support Add support for using snd-hda-codec-hdmi driver for HDMI/DP instead of ASoC hdac-hdmi. This is aligned with how other HDA codecs are already handled. Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191029134017.18901-9-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit dfe87aa86cd92d21603d64f4035fecae19c92e7a Author: Kai Vehmanen Date: Tue Oct 29 15:40:15 2019 +0200 ASoC: Intel: glk_rt5682_max98357a: common hdmi codec support Add support for using snd-hda-codec-hdmi driver for HDMI/DP instead of ASoC hdac-hdmi. This is aligned with how other HDA codecs are already handled. Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191029134017.18901-8-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 57ad18906f24278893b128967551fe7fa0996129 Author: Kai Vehmanen Date: Tue Oct 29 15:40:14 2019 +0200 ASoC: Intel: bxt-da7219-max98357a: common hdmi codec support Add support for using snd-hda-codec-hdmi driver for HDMI/DP instead of ASoC hdac-hdmi. This is aligned with how other HDA codecs are already handled. Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191029134017.18901-7-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 139c7febad1afa221c687f3314560284e482a1f4 Author: Kai Vehmanen Date: Tue Oct 29 15:40:13 2019 +0200 ASoC: SOF: Intel: add support for snd-hda-codec-hdmi Add support to implement HDMI/DP audio by using the common snd-hda-codec-hdmi driver. Change of codec driver affects user-space as the two drivers expose different mixer controls. A new kernel module option "use_common_hdmi" is added to user-space to indicate which interface should be used. The default driver can be selected via a Kconfig option. Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191029134017.18901-6-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 0f163110256ac91aee562da149838fcb8a39d518 Author: Kai Vehmanen Date: Tue Oct 29 15:40:12 2019 +0200 ASoC: Intel: skl-hda-dsp-generic: fix include guard name Match the include guard define to actual filename. The source directory now has an actual hda_dsp_common.h header, so the old include guard may cause confusion. Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191029134017.18901-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 7de9a47c8971bdec07cc9a62e948382003c5908f Author: Kai Vehmanen Date: Tue Oct 29 15:40:11 2019 +0200 ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi Add support for using snd-hda-codec-hdmi driver for HDMI/DP instead of ASoC hdac-hdmi. This is aligned with how other HDA codecs are already handled. When snd-hda-codec-hdmi is used, the PCM device numbers are parsed from card topology and passed to the codec driver. This needs to be done at runtime as topology changes may affect PCM device allocation. Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191029134017.18901-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 608b8c36c37114289e3ea328783161f542fdf71d Author: Kai Vehmanen Date: Tue Oct 29 15:40:10 2019 +0200 ASoC: hdac_hda: add support for HDMI/DP as a HDA codec Handle all HDA codecs using same logic, including HDMI/DP. Call to snd_hda_codec_build_controls() is delayed for HDMI/DP HDA devices. This is needed to discover the PCM device numbers as defined in topology. Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191029134017.18901-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 2a2edfbbfee47947dd05f5860c66c0e80ee5e09d Author: Kai Vehmanen Date: Tue Oct 29 15:40:09 2019 +0200 ALSA: hda/hdmi - implement mst_no_extra_pcms flag To support the DP-MST multiple streams via single connector feature, the HDMI driver was extended with the concept of backup PCMs. See commit 9152085defb6 ("ALSA: hda - add DP MST audio support"). This implementation works fine with snd_hda_intel.c as PCM topology is fully managed within the single driver. When the HDA codec driver is used from ASoC components, the concept of backup PCMs no longer fits. For ASoC topologies, the physical HDMI converters are presented as backend DAIs and these should match with hardware capabilities. The ASoC topology may define arbitrary PCMs (i.e. frontend DAIs) and have processing elements before eventual routing to the HDMI BE DAIs. With backup PCMs, the link between FE and BE DAIs would become dynamic and change when monitors are (un)plugged. This would lead to modifying the topology every time hotplug events happen, which is not currently possible in ASoC and there does not seem to be any obvious benefits from this design. To overcome above problems and enable the HDMI driver to be used from ASoC, this patch adds a new mode (mst_no_extra_pcms flags) to patch_hdmi.c. In this mode, the codec driver does not assume the backup PCMs to be created. Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191029134017.18901-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit ac541f2503722943a9f13e0c92ed07632ba7fd38 Author: Ralph Campbell Date: Wed Oct 23 12:55:14 2019 -0700 mm/hmm: allow snapshot of the special zero page If a device driver like nouveau tries to use hmm_range_fault() to access the special shared zero page in system memory, hmm_range_fault() will return -EFAULT and kill the process. Allow hmm_range_fault() to return success (0) when the CPU pagetable entry points to the special shared zero page. page_to_pfn() and pfn_to_page() are defined on the zero page so just handle it like any other page. Link: https://lore.kernel.org/r/20191023195515.13168-3-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: "Jérôme Glisse" Acked-by: David Hildenbrand Signed-off-by: Jason Gunthorpe commit 692a0dc734c7df778a4532cbf3574a26cb3709dc Author: Maxime Ripard Date: Tue Oct 22 17:47:45 2019 +0200 dt-bindings: can: Convert Allwinner A10 CAN controller to a schema The older Allwinner SoCs have a CAN controller that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit faee19ece8263738c147cb0140e0fbc7b5397ca8 Author: YueHaibing Date: Tue Oct 29 09:57:57 2019 -0700 memory: emif: remove set but not used variables 'cs1_used' and 'custom_configs' drivers/memory/emif.c:1616:9: warning: variable cs1_used set but not used [-Wunused-but-set-variable] drivers/memory/emif.c:1624:36: warning: variable custom_configs set but not used [-Wunused-but-set-variable] They are never used since introduction. Signed-off-by: YueHaibing Signed-off-by: Santosh Shilimkar commit c6b69bf143734a797b45e4728dc5ad80586d206c Author: Wei Yongjun Date: Tue Oct 29 09:57:56 2019 -0700 soc: ti: omap-prm: fix return value check in omap_prm_probe() In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 3e99cb214f03 ("soc: ti: add initial PRM driver with reset control support") Signed-off-by: Wei Yongjun Signed-off-by: Santosh Shilimkar commit a901004214994f12523b47521cddfa4426f284c1 Author: Joseph Qi Date: Tue Oct 29 09:51:24 2019 -0700 fs/iomap: remove redundant check in iomap_dio_rw() We've already check if it is READ iov_iter, no need check again. Signed-off-by: Joseph Qi Reviewed-by: Johannes Thumshirn Reviewed-by: Jens Axboe Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 21f55993eb7aeefebde8a881d1b303ff799cd90f Author: Christoph Hellwig Date: Mon Oct 28 08:41:47 2019 -0700 xfs: merge xfs_showargs into xfs_fs_show_options No need for a trivial wrapper. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1775c506a31e20df552692f234d8dc16396fb15e Author: Christoph Hellwig Date: Mon Oct 28 08:41:47 2019 -0700 xfs: clean up printing inode32/64 in xfs_showargs inode64 is the only value remaining in the unset array. Special case the inode32/64 options with an explicit seq_printf that prints either inode32 or inode64, and remove the unset array. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit aa58d4455a11a00c7a3dd39984c98d8793c793e6 Author: Christoph Hellwig Date: Mon Oct 28 08:41:46 2019 -0700 xfs: clean up printing the allocsize option in Remove superflous cast. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7c6b94b1b526a8b18237b80a1ac3232715eab7a5 Author: Christoph Hellwig Date: Mon Oct 28 08:41:46 2019 -0700 xfs: reverse the polarity of XFS_MOUNT_COMPAT_IOSIZE Replace XFS_MOUNT_COMPAT_IOSIZE with an inverted XFS_MOUNT_LARGEIO flag that makes the usage more clear. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3274d00801007cccab8aec7f2ac50f6bc10d1692 Author: Christoph Hellwig Date: Mon Oct 28 08:41:45 2019 -0700 xfs: rename the XFS_MOUNT_DFLT_IOSIZE option to Make the flag match the mount option and usage. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2fcddee8cd8fcce4cc5589a0344f40a28a6dd26f Author: Christoph Hellwig Date: Mon Oct 28 08:41:45 2019 -0700 xfs: simplify parsing of allocsize mount option Rework xfs_parseargs to fill out the default value and then parse the option directly into the mount structure, similar to what we do for other updates, and open code the now trivial updates based on on the on-disk superblock directly into xfs_mountfs. Note that this change rejects the allocsize=0 mount option that has been documented as invalid for a long time instead of just ignoring it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5da8a07c79e8a1c151737254117df57627ae93fa Author: Christoph Hellwig Date: Mon Oct 28 08:41:44 2019 -0700 xfs: rename the m_writeio_* fields in struct xfs_mount Use the allocsize name to match the mount option and usage instead. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3cd1d18b0d40098d51f12caa7a365f0e31a16e03 Author: Christoph Hellwig Date: Mon Oct 28 08:41:44 2019 -0700 xfs: remove the m_readio_* fields in struct xfs_mount m_readio_blocks is entirely unused, and m_readio_blocks is only used in xfs_stat_blksize in a max statements that is a no-op as it always has the same value as m_writeio_log. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b5ad616c3edfd0b79d13d2748e47158cc11e99cb Author: Christoph Hellwig Date: Mon Oct 28 08:41:43 2019 -0700 xfs: don't use a different allocsice for -o wsync The -o wsync allocsize overwrite overwrite was part of a special hack for NFSv2 servers in IRIX and has no real purpose in modern Linux, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit dd2d535e3fb29d744aa8905c7d55199ce6bbfa49 Author: Christoph Hellwig Date: Mon Oct 28 08:41:43 2019 -0700 xfs: cleanup calculating the stat optimal I/O size Move xfs_preferred_iosize to xfs_iops.c, unobsfucate it and also handle the realtime special case in the helper. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 69e8575dee424eebc4a3f96b5af11b858c5885e0 Author: Christoph Hellwig Date: Mon Oct 28 08:41:43 2019 -0700 xfs: remove the dsunit and dswidth variables in There is no real need for the local variables here - either they are applied to the mount structure, or if the noalign mount option is set the mount will fail entirely if either is set. Removing them helps cleaning up the mount API conversion. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8da57c5c000c73bb91ec03f9bad06f2a39541d3d Author: Ian Kent Date: Mon Oct 28 08:41:42 2019 -0700 xfs: remove the biosize mount option It appears the biosize mount option hasn't been documented as a valid option since 2005, remove it. Signed-off-by: Ian Kent Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 2123ef8510836cf3f4a1ccb188398f98c4f71ec3 Author: Christoph Hellwig Date: Mon Oct 28 08:41:42 2019 -0700 xfs: simplify setting bio flags Stop using the deprecated bio_set_op_attrs helper, and use a single argument to xfs_buf_ioapply_map for the operation and flags. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e992ae8afdedcdfe65ededd96b5a15319f2e6bae Author: Darrick J. Wong Date: Mon Oct 28 16:12:35 2019 -0700 xfs: refactor xfs_iread_extents to use xfs_btree_visit_blocks xfs_iread_extents open-codes everything in xfs_btree_visit_blocks, so refactor the btree helper to be able to iterate only the records on level 0, then port iread_extents to use it. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit fec40e220ffcbecadfdd95a68dc3dec1996b8ff6 Author: Darrick J. Wong Date: Mon Oct 28 16:12:35 2019 -0700 xfs: refactor xfs_bmap_count_blocks using newer btree helpers Currently, this function open-codes walking a bmbt to count the extents and blocks in use by a particular inode fork. Since we now have a function to tally extent records from the incore extent tree and a btree helper to count every block in a btree, replace all that with calls to the helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c2414ad6e66ab96b867309454498f7fb29b7e855 Author: Darrick J. Wong Date: Mon Oct 28 16:12:34 2019 -0700 xfs: replace -EIO with -EFSCORRUPTED for corrupt metadata There are a few places where we return -EIO instead of -EFSCORRUPTED when we find corrupt metadata. Fix those places. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit 04df34ac6494b216a911c5571bf4ee299cd34164 Author: Darrick J. Wong Date: Mon Oct 28 16:12:34 2019 -0700 xfs: namecheck directory entry names before listing them Actually call namecheck on directory entry names before we hand them over to userspace. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit 16c6e92c7e9836ed08db5f9771e75845796bd87f Author: Darrick J. Wong Date: Mon Oct 28 16:12:33 2019 -0700 xfs: namecheck attribute names before listing them Actually call namecheck on attribute names before we hand them over to userspace. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit c84760659dcf237902d4cc997cd5f55cb3b2807f Author: Darrick J. Wong Date: Mon Oct 28 16:12:33 2019 -0700 xfs: check attribute leaf block structure Add missing structure checks in the attribute leaf verifier. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 8d82cee2f8aa8b9bc806907ecd9e1494c6e8526b Author: Ben Dooks (Codethink) Date: Wed Oct 16 13:33:17 2019 +0100 pstore: Make pstore_choose_compression() static The pstore_choose_compression() function is not exported so make it static to avoid the following sparse warning: fs/pstore/platform.c:796:13: warning: symbol 'pstore_choose_compression' was not declared. Should it be static? Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20191016123317.3154-1-ben.dooks@codethink.co.uk Fixes: cb095afd4476 ("pstore: Centralize init/exit routines") Signed-off-by: Kees Cook commit ffe9fc1fb6a4b9606a77754c2f081dc68852eba4 Author: Krzysztof Kozlowski Date: Mon Oct 21 17:18:47 2019 +0200 dt-bindings: display: st,stm32-dsi: Fix white spaces Remove unneeded indentation in blank line and space at end of line. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 95a1b3ff9a3e4ea2f26c4e802067d58831f415db Author: Pavel Begunkov Date: Sun Oct 27 23:15:41 2019 +0300 io_uring: Fix mm_fault with READ/WRITE_FIXED Commit fb5ccc98782f ("io_uring: Fix broken links with offloading") introduced a potential performance regression with unconditionally taking mm even for READ/WRITE_FIXED operations. Return the logic handling it back. mm-faulted requests will go through the generic submission path, so honoring links and drains, but will fail further on req->has_user check. Fixes: fb5ccc98782f ("io_uring: Fix broken links with offloading") Cc: stable@vger.kernel.org # v5.4 Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit fa4562280889ad372dfb1413833a8b8675721b17 Author: Pavel Begunkov Date: Sun Oct 27 18:52:20 2019 +0300 io_uring: remove index from sqe_submit submit->index is used only for inbound check in submission path (i.e. head < ctx->sq_entries). However, it always will be true, as 1. it's already validated by io_get_sqring() 2. ctx->sq_entries can't be changedd in between, because of held ctx->uring_lock and ctx->refs. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c826bd7a743f275e2b68c16d595534063b400deb Author: Dmitrii Dolgov <9erthalion6@gmail.com> Date: Tue Oct 15 19:02:01 2019 +0200 io_uring: add set of tracing events To trace io_uring activity one can get an information from workqueue and io trace events, but looks like some parts could be hard to identify via this approach. Making what happens inside io_uring more transparent is important to be able to reason about many aspects of it, hence introduce the set of tracing events. All such events could be roughly divided into two categories: * those, that are helping to understand correctness (from both kernel and an application point of view). E.g. a ring creation, file registration, or waiting for available CQE. Proposed approach is to get a pointer to an original structure of interest (ring context, or request), and then find relevant events. io_uring_queue_async_work also exposes a pointer to work_struct, to be able to track down corresponding workqueue events. * those, that provide performance related information. Mostly it's about events that change the flow of requests, e.g. whether an async work was queued, or delayed due to some dependencies. Another important case is how io_uring optimizations (e.g. registered files) are utilized. Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com> Signed-off-by: Jens Axboe commit 2ff0b4504fceb81e79f44f68759d5b82918933b3 Author: Neil Armstrong Date: Mon Oct 21 15:39:50 2019 +0200 dt-bindings: soc: amlogic: canvas: convert to yaml Now that we have the DT validation in place, let's convert the device tree bindings for the Amlogic Canvas over to a YAML schemas. Cc: Maxime Jourdan Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl [robh: update title] Signed-off-by: Rob Herring commit b79029b2e859d8cef534643a1254a833459038f1 Author: Chris Wilson Date: Tue Oct 29 09:16:32 2019 +0000 drm/i915/gt: Make timeslice duration configurable Execlists uses a scheduling quantum (a timeslice) to alternate execution between ready-to-run contexts of equal priority. This ensures that all users (though only if they of equal importance) have the opportunity to run and prevents livelocks where contexts may have implicit ordering due to userspace semaphores. However, not all workloads necessarily benefit from timeslicing and in the extreme some sysadmin may want to disable or reduce the timeslicing granularity. The timeslicing mechanism can be compiled out^W^W disabled (but should DCE!) with ./scripts/config --set-val DRM_I915_TIMESLICE_DURATION 0 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191029091632.26281-1-chris@chris-wilson.co.uk commit 11365043e5271fea4c92189a976833da477a3a44 Author: Jens Axboe Date: Wed Oct 16 09:08:32 2019 -0600 io_uring: add support for canceling timeout requests We might have cases where the need for a specific timeout is gone, add support for canceling an existing timeout operation. This works like the POLL_REMOVE command, where the application passes in the user_data of the timeout it wishes to cancel in the sqe->addr field. Signed-off-by: Jens Axboe commit a41525ab2e75987e809926352ebc6f1397da900e Author: Jens Axboe Date: Tue Oct 15 16:48:15 2019 -0600 io_uring: add support for absolute timeouts This is a pretty trivial addition on top of the relative timeouts we have now, but it's handy for ensuring tighter timing for those that are building scheduling primitives on top of io_uring. Signed-off-by: Jens Axboe commit ba5290ccb6b57fc5e274ae46d051fba1f0ece262 Author: Jackie Liu Date: Wed Oct 9 09:19:59 2019 +0800 io_uring: replace s->needs_lock with s->in_async There is no function change, just to clean up the code, use s->in_async to make the code know where it is. Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe commit 33a107f0a1b8df0ad925e39d8afc97bb78e0cec1 Author: Jens Axboe Date: Fri Oct 4 12:10:03 2019 -0600 io_uring: allow application controlled CQ ring size We currently size the CQ ring as twice the SQ ring, to allow some flexibility in not overflowing the CQ ring. This is done because the SQE life time is different than that of the IO request itself, the SQE is consumed as soon as the kernel has seen the entry. Certain application don't need a huge SQ ring size, since they just submit IO in batches. But they may have a lot of requests pending, and hence need a big CQ ring to hold them all. By allowing the application to control the CQ ring size multiplier, we can cater to those applications more efficiently. If an application wants to define its own CQ ring size, it must set IORING_SETUP_CQSIZE in the setup flags, and fill out io_uring_params->cq_entries. The value must be a power of two. Signed-off-by: Jens Axboe commit c3a31e605620c279163c14068a60869ea3fda203 Author: Jens Axboe Date: Thu Oct 3 13:59:56 2019 -0600 io_uring: add support for IORING_REGISTER_FILES_UPDATE Allows the application to remove/replace/add files to/from a file set. Passes in a struct: struct io_uring_files_update { __u32 offset; __s32 *fds; }; that holds an array of fds, size of array passed in through the usual nr_args part of the io_uring_register() system call. The logic is as follows: 1) If ->fds[i] is -1, the existing file at i + ->offset is removed from the set. 2) If ->fds[i] is a valid fd, the existing file at i + ->offset is replaced with ->fds[i]. For case #2, is the existing file is currently empty (fd == -1), the new fd is simply added to the array. Reviewed-by: Jeff Moyer Signed-off-by: Jens Axboe commit 08a451739a9b5783f67de51e84cb6d9559bb9dc4 Author: Jens Axboe Date: Thu Oct 3 08:11:03 2019 -0600 io_uring: allow sparse fixed file sets This is in preparation for allowing updates to fixed file sets without requiring a full unregister+register. Reviewed-by: Jeff Moyer Signed-off-by: Jens Axboe commit ba816ad61fdf31f59f423a773b00bfa2ed38243a Author: Jens Axboe Date: Sat Sep 28 11:36:45 2019 -0600 io_uring: run dependent links inline if possible Currently any dependent link is executed from a new workqueue context, which means that we'll be doing a context switch per link in the chain. If we are running the completion of the current request from our async workqueue and find that the next request is a link, then run it directly from the workqueue context instead of forcing another switch. This improves the performance of linked SQEs, and reduces the CPU overhead. Reviewed-by: Jackie Liu Signed-off-by: Jens Axboe commit a90cc244e89d910c2e662d3685767920c057a9a2 Author: Neil Armstrong Date: Mon Oct 21 14:12:49 2019 +0200 media: dt-bindings: media: add new rc map names Add new entries for linux,rc-map-name: - rc-khadas - rc-odroid - rc-tanix-tx3mini - rc-wetek-hub - rc-wetek-play2 - rc-x96max Signed-off-by: Neil Armstrong Signed-off-by: Rob Herring commit cf4ef3a82f74d81231321c75949c0821d1f28716 Author: Neil Armstrong Date: Mon Oct 21 14:11:31 2019 +0200 dt-bindings: media: meson-ao-cec: convert to yaml Now that we have the DT validation in place, let's convert the device tree bindings for the Amlogic AO-CEC controller over to a YAML schemas. Signed-off-by: Neil Armstrong Signed-off-by: Rob Herring commit e44ec4a35dbdf3f3fe772f176fab3b8be7e02b0f Author: Xiang Zheng Date: Tue Oct 29 20:41:31 2019 +0800 arm64: print additional fault message when executing non-exec memory When attempting to executing non-executable memory, the fault message shows: Unable to handle kernel read from unreadable memory at virtual address ffff802dac469000 This may confuse someone, so add a new fault message for instruction abort. Acked-by: Will Deacon Signed-off-by: Xiang Zheng Signed-off-by: Catalin Marinas commit 4ec37538a6670a4f0291e4a1de9394908e0f0d08 Author: Janusz Krzysztofik Date: Tue Oct 29 11:20:36 2019 +0100 drm/i915: Rename "inject_load_failure" module parameter Commit f2db53f14d3d ("drm/i915: Replace "_load" with "_probe" consequently") deliberately left the name of the module parameter unchanged as that would require a corresponding change on IGT size. Now as the IGT side change has been submitted, complete the switch to the "probe" nomenclature. Suggested-by: Joonas Lahtinen Signed-off-by: Janusz Krzysztofik Cc: Michał Wajdeczko Cc: Michał Winiarski Cc: Piotr Piórkowski Cc: Tomasz Lis Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029102036.6326-3-janusz.krzysztofik@linux.intel.com commit dd6e38dfc1286d307489a1ad890a87e096d9873b Author: Janusz Krzysztofik Date: Tue Oct 29 11:20:35 2019 +0100 drm/i915: Fix i915_inject_load_error() name to read *_probe_* Commit 50d84418f586 ("drm/i915: Add i915 to i915_inject_probe_failure") introduced new functions unfortunately named incompatibly with rules established by commit f2db53f14d3d ("drm/i915: Replace "_load" with "_probe" consequently"). Fix it for consistency. Suggested-by: Michał Wajdeczko Signed-off-by: Janusz Krzysztofik Cc: Michał Wajdeczko Cc: Michał Winiarski Cc: Piotr Piórkowski Cc: Tomasz Lis Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029102036.6326-2-janusz.krzysztofik@linux.intel.com commit 6a41b6c5fc20abced88fa0eed42ae5e5cb70b280 Author: Chris Packham Date: Fri Oct 25 09:27:03 2019 +1300 gpio: Add xgs-iproc driver This driver supports the Chip Common A GPIO controller present on a number of Broadcom switch ASICs with integrated SoCs. The controller is similar to the pinctrl-nsp-gpio and pinctrl-iproc-gpio blocks but different enough that a separate driver is required. This has been ported from Broadcom's XLDK 5.0.3 retaining only the CCA support (pinctrl-iproc-gpio covers CCB). Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20191024202703.8017-3-chris.packham@alliedtelesis.co.nz Acked-by: Scott Branden Signed-off-by: Linus Walleij commit 1dfc462a54386d8467ff427ef900f553e2e470e3 Author: Chris Packham Date: Tue Oct 29 09:05:55 2019 +1300 dt-bindings: gpio: brcm: Add bindings for xgs-iproc This GPIO controller is present on a number of Broadcom switch ASICs with integrated SoCs. It is similar to the nsp-gpio and iproc-gpio blocks but different enough to require a separate driver. Signed-off-by: Chris Packham Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191028200555.27524-1-chris.packham@alliedtelesis.co.nz Acked-by: Scott Branden Signed-off-by: Linus Walleij commit 921d6c32b6f86c48e06667ce2f8c50ca45bfa212 Author: Manivannan Sadhasivam Date: Mon Oct 21 12:14:13 2019 +0530 MAINTAINERS: Add entry for RDA Micro GPIO driver and binding Add MAINTAINERS entry for RDA Micro GPIO driver and devicetree binding. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20191021064413.19840-5-manivannan.sadhasivam@linaro.org Signed-off-by: Linus Walleij commit d57eb825e0dc6f0b5be78251d69cbf1bdd1db622 Author: Manivannan Sadhasivam Date: Mon Oct 21 12:14:12 2019 +0530 gpio: Add RDA Micro GPIO controller support Add support for GPIO controller from RDA Micro. This GPIO controller is an in house IP, developed by RDA Micro (now Unisoc) for the use in RDA88* series of SoCs. There are multiple GPIO ports present in all SoCs, each capable of addressing 32 GPIOs. But only first 8 pins have the interrupt capability. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20191021064413.19840-4-manivannan.sadhasivam@linaro.org Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 69e00e2d8d313a8e3b7d8397384d94aa014be6b1 Author: Manivannan Sadhasivam Date: Mon Oct 21 12:14:10 2019 +0530 dt-bindings: gpio: Add devicetree binding for RDA Micro GPIO controller Add YAML devicetree binding for RDA Micro GPIO controller. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20191021064413.19840-2-manivannan.sadhasivam@linaro.org Signed-off-by: Linus Walleij commit fa6661b7aa0b52073681b0d26742650c8cbd30f3 Author: Thierry Reding Date: Mon Oct 28 13:37:18 2019 +0100 drm/tegra: Optionally attach clients to the IOMMU If a client is already attached to an IOMMU domain that is not the shared domain, don't try to attach it again. This allows using the IOMMU-backed DMA API. Since the IOMMU-backed DMA API is now supported and there's no way to detach from it on 64-bit ARM, don't bother to detach from it on 32-bit ARM either. Signed-off-by: Thierry Reding commit 2e8d8749f6f9bb35b947228271dc9ec31be93335 Author: Thierry Reding Date: Mon Oct 28 13:37:17 2019 +0100 drm/tegra: Support DMA API for display controllers If a display controller is not attached to an explicit IOMMU domain, which usually means that it's connected to an IOMMU domain controlled by the DMA API, make sure to map the framebuffer to the display controller address space. This allows us to transparently handle setups where the display controller is attached to an IOMMU or setups where it isn't. It also allows the driver to work with a DMA API that is backed by an IOMMU. Signed-off-by: Thierry Reding commit d972d6247628054f4a9f05c084a1f52de9df209d Author: Thierry Reding Date: Mon Oct 28 13:37:16 2019 +0100 drm/tegra: falcon: Clarify address usage Rename paddr -> iova and vaddr -> virt to make it clearer how these addresses are used. This is important for a subsequent patch that makes a distinction between the physical address (physical address of the system memory from the CPU's point of view) and the IOVA (physical address of the system memory from the device's point of view). Signed-off-by: Thierry Reding commit 20e7dce255e96a4d58168cf48e20210146dacf23 Author: Thierry Reding Date: Mon Oct 28 13:37:15 2019 +0100 drm/tegra: Remove memory allocation from Falcon library Having to provide allocator hooks to the Falcon library is somewhat cumbersome and it doesn't give the users of the library a lot of flexibility to deal with allocations. Instead, remove the notion of Falcon "operations" and let drivers deal with the memory allocations themselves. Signed-off-by: Thierry Reding commit 06867a362de08ff94fb573d84fd213795fbb3922 Author: Thierry Reding Date: Mon Oct 28 13:37:14 2019 +0100 gpu: host1x: Set DMA mask based on IOMMU setup If the Tegra DRM clients are backed by an IOMMU, push buffers are likely to be allocated beyond the 32-bit boundary if sufficient system memory is available. This is problematic on earlier generations of Tegra where host1x supports a maximum of 32 address bits for the GATHER opcode. More recent versions of Tegra (Tegra186 and later) have a wide variant of the GATHER opcode, which allows addressing up to 64 bits of memory. If host1x itself is behind an IOMMU as well this doesn't matter because the IOMMU's input address space is restricted to 32 bits on generations without support for wide GATHER opcodes. However, if host1x is not behind an IOMMU, it won't be able to process push buffers beyond the 32-bit boundary on Tegra generations that don't support wide GATHER opcodes. Restrict the DMA mask to 32 bits on these generations prevents buffers from being allocated from beyond the 32-bit boundary. Signed-off-by: Thierry Reding commit af1cbfb9bf0fe079ca328231451fd4db8b3eafec Author: Thierry Reding Date: Mon Oct 28 13:37:13 2019 +0100 gpu: host1x: Support DMA mapping of buffers If host1x_bo_pin() returns an SG table, create a DMA mapping for the buffer. For buffers that the host1x client has already mapped itself, host1x_bo_pin() returns NULL and the existing DMA address is used. Signed-off-by: Thierry Reding commit b78e70c04c149299bd210759d7c7af7c86b89ca8 Author: Thierry Reding Date: Mon Oct 28 13:37:12 2019 +0100 gpu: host1x: Allocate gather copy for host1x Currently when the gather buffers are copied, they are copied to a buffer that is allocated for the host1x client that wants to execute the command streams in the buffers. However, the gather buffers will be read by the host1x device, which causes SMMU faults if the DMA API is backed by an IOMMU. Fix this by allocating the gather buffer copy for the host1x device, which makes sure that it will be mapped into the host1x's IOVA space if the DMA API is backed by an IOMMU. Signed-off-by: Thierry Reding commit ab4f81bfc2a8d429130182f8ea3f29a8b1754931 Author: Thierry Reding Date: Mon Oct 28 13:37:11 2019 +0100 gpu: host1x: Add direction flags to relocations Add direction flags to host1x relocations performed during job pinning. These flags indicate the kinds of accesses that hardware is allowed to perform on the relocated buffers. Signed-off-by: Thierry Reding commit 44156eee91ba6f027afbfd6a39016c0e7e31c8e9 Author: Thierry Reding Date: Mon Oct 28 13:37:10 2019 +0100 gpu: host1x: Clean up debugfs on removal The debugfs files created for host1x are never removed, causing these files to be left dangling in debugfs. This results in a crash when any of these files are accessed after the host1x driver has been removed, as well as a failure to create the debugfs entries when they are added again on driver probe. Signed-off-by: Thierry Reding commit 80327ce3d4edaa9abde1c6e1a1785572c7de3750 Author: Thierry Reding Date: Mon Oct 28 13:37:09 2019 +0100 gpu: host1x: Overhaul host1x_bo_{pin,unpin}() API The host1x_bo_pin() and host1x_bo_unpin() APIs are used to pin and unpin buffers during host1x job submission. Pinning currently returns the SG table and the DMA address (an IOVA if an IOMMU is used or a physical address if no IOMMU is used) of the buffer. The DMA address is only used for buffers that are relocated, whereas the host1x driver will map gather buffers into its own IOVA space so that they can be processed by the CDMA engine. This approach has a couple of issues. On one hand it's not very useful to return a DMA address for the buffer if host1x doesn't need it. On the other hand, returning the SG table of the buffer is suboptimal because a single SG table cannot be shared for multiple mappings, because the DMA address is stored within the SG table, and the DMA address may be different for different devices. Subsequent patches will move the host1x driver over to the DMA API which doesn't work with a single shared SG table. Fix this by returning a new SG table each time a buffer is pinned. This allows the buffer to be referenced by multiple jobs for different engines. Change the prototypes of host1x_bo_pin() and host1x_bo_unpin() to take a struct device *, specifying the device for which the buffer should be pinned. This is required in order to be able to properly construct the SG table. While at it, make host1x_bo_pin() return the SG table because that allows us to return an ERR_PTR()-encoded error code if we need to, or return NULL to signal that we don't need the SG table to be remapped and can simply use the DMA address as-is. At the same time, returning the DMA address is made optional because in the example of command buffers, host1x doesn't need to know the DMA address since it will have to create its own mapping anyway. Signed-off-by: Thierry Reding commit 7edd7961e58d531d19758134919de13dac47bcbe Author: Thierry Reding Date: Mon Oct 28 13:37:08 2019 +0100 drm/tegra: Simplify IOMMU group selection All the devices that make up the DRM device are now part of the same IOMMU group. This simplifies the handling of the IOMMU attachment and also avoids exhausting the number of IOMMUs available on early Tegra SoC generations. Signed-off-by: Thierry Reding commit a7303f7735717c95bf5f65c18c901c72e91dc55b Author: Thierry Reding Date: Mon Oct 28 13:16:10 2019 +0100 drm/tegra: Do not use ->load() and ->unload() callbacks The ->load() and ->unload() drivers are midlayers and should be avoided in modern drivers. Fix this by moving the code into the driver ->probe() and ->remove() implementations, respectively. v2: kick out conflicting framebuffers before initializing fbdev v3: rebase onto drm/tegra/for-next Tested-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 45f10dabb56bc5dee52df47dccd3bfab1e58eea1 Author: Marek Szyprowski Date: Fri Oct 25 11:34:35 2019 +0200 clk: samsung: exynos5420: Add SET_RATE_PARENT flag to clocks on G3D path Add CLK_SET_RATE_PARENT flag to all clocks on the path from VPLL to G3D, so the G3D MALI driver can simply adjust the rate of its clock by doing a single clk_set_rate() call, without the need to know the whole clock topology in Exynos542x SoCs. Suggested-by: Marian Mihailescu Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki commit ca185b260951d3b55108c0b95e188682d8a507b7 Author: Zenghui Yu Date: Tue Oct 29 15:19:19 2019 +0800 KVM: arm/arm64: vgic: Don't rely on the wrong pending table It's possible that two LPIs locate in the same "byte_offset" but target two different vcpus, where their pending status are indicated by two different pending tables. In such a scenario, using last_byte_offset optimization will lead KVM relying on the wrong pending table entry. Let us use last_ptr instead, which can be treated as a byte index into a pending table and also, can be vcpu specific. Fixes: 280771252c1b ("KVM: arm64: vgic-v3: KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES") Cc: stable@vger.kernel.org Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Acked-by: Eric Auger Link: https://lore.kernel.org/r/20191029071919.177-4-yuzenghui@huawei.com commit bad36e4e8cdc9048948490293efefdbd85c40ecc Author: Zenghui Yu Date: Tue Oct 29 15:19:18 2019 +0800 KVM: arm/arm64: vgic: Fix some comments typo Fix various comments, including wrong function names, grammar mistakes and specification references. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191029071919.177-3-yuzenghui@huawei.com commit 9ff624cdbff4466a356892500699aea9318d584e Author: Zenghui Yu Date: Tue Oct 29 15:19:17 2019 +0800 KVM: arm/arm64: vgic: Remove the declaration of kvm_send_userspace_msi() The callsite of kvm_send_userspace_msi() is currently arch agnostic. There seems no reason to keep an extra declaration of it in arm_vgic.h (we already have one in include/linux/kvm_host.h). Remove it. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20191029071919.177-2-yuzenghui@huawei.com commit 29d9640bb537bbe0c37ffd672ff56b73e4aa3252 Author: YueHaibing Date: Wed Oct 23 21:57:10 2019 +0800 mtd: rawnand: cadence: Remove dev_err() on platform_get_irq() failure platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Miquel Raynal commit 21777bc90427dd396e17377f2eed46fcc9c9989e Author: YueHaibing Date: Thu Oct 24 10:29:34 2019 +0800 mtd: rawnand: mxic: Remove dev_err() on platform_get_irq() failure platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Miquel Raynal commit 0e04b2ff7123378c7b41a0bf8156a466a49d730a Author: Florian Fainelli Date: Mon Oct 21 09:45:54 2019 -0700 mtd: rawnand: brcmnand: Fix NULL pointer assignment Sparse complained about the following: drivers/mtd/nand/raw/brcmnand/brcmnand.c:921:40: warning: Using plain integer as NULL pointer fix this issue by assigning the pointer to NULL. Fixes: c1ac2dc34b51 ("mtd: rawnand: brcmnand: When oops in progress use pio and interrupt polling") Signed-off-by: Florian Fainelli Signed-off-by: Miquel Raynal commit f34a5072c46510b20017d7703bc424dd695b3429 Author: Masahiro Yamada Date: Mon Oct 21 11:26:54 2019 +0900 mtd: rawnand: denali: remove the old unified controller/chip DT support Commit d8e8fd0ebf8b ("mtd: rawnand: denali: decouple controller and NAND chips") supported the new binding for the separate controller/chip representation, keeping the backward compatibility. All the device trees in upstream migrated to the new binding. Remove the support for the old binding. Signed-off-by: Masahiro Yamada Signed-off-by: Miquel Raynal commit a566e35f1e8b4b3be1e96a804d1cca38b578167c Author: Andrii Nakryiko Date: Mon Oct 28 22:59:53 2019 -0700 libbpf: Don't use kernel-side u32 type in xsk.c u32 is a kernel-side typedef. User-space library is supposed to use __u32. This breaks Github's projection of libbpf. Do u32 -> __u32 fix. Fixes: 94ff9ebb49a5 ("libbpf: Fix compatibility for kernels without need_wakeup") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Björn Töpel Cc: Magnus Karlsson Link: https://lore.kernel.org/bpf/20191029055953.2461336-1-andriin@fb.com commit 69dfb3d4a89afccca1d8f282e49ad1362100cc43 Author: Dmitry Osipenko Date: Thu Sep 26 22:17:55 2019 +0300 soc/tegra: pmc: Remove unnecessary memory barrier The removed barrier isn't needed because writes/reads are strictly ordered and even if PMC had separate ports for writes, it wouldn't matter since the hardware logic takes into effect after triggering CPU's power-gating and at that point all CPU accesses are guaranteed to be completed. That barrier was copied from the old arch/ code during transition to the soc/ PMC driver and even that the code structure was different back then, the barrier didn't have a real useful purpose from the start. Lastly, the tegra_pmc_writel() naturally inserts wmb() because it uses writel(), and thus this change doesn't actually make any difference in terms of interacting with hardware. Hence let's remove the barrier to clean up code a tad. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit e57a243f5d896f02510e4be92df0873b4c1aab7f Author: Dmitry Osipenko Date: Thu Sep 26 22:17:54 2019 +0300 soc/tegra: pmc: Query PCLK clock rate at probe time It is possible to get a lockup if kernel decides to enter LP2 cpuidle from some clk-notifier, in that case CCF's "prepare" mutex is kept locked and thus clk_get_rate(pclk) blocks on the same mutex with interrupts being disabled, hanging machine. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding commit 91d7ff5aa7e3edd9ab99a424099476ed5667b152 Author: Dmitry Osipenko Date: Tue Jul 30 20:23:40 2019 +0300 ARM: tegra: Use WFE for power-gating on Tegra30 Turned out that WFI doesn't work reliably on Tegra30 as a trigger for the power-gating, it causes CPU hang under some circumstances like having memory controller running of PLLP. The TRM doc states that WFI should be used for the Big-Little "Cluster Switch", while WFE for the power-gating. Hence let's use the WFE for CPU0 power-gating, like it is done for the power-gating of a secondary cores. This fixes CPU hang after entering LP2 with memory running off PLLP. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Tested-by: Peter Geis Signed-off-by: Thierry Reding commit d70f7d31a9e2088e8a507194354d41ea10062994 Author: Dmitry Osipenko Date: Tue Jul 30 20:23:39 2019 +0300 ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume() There is an unfortunate typo in the code that results in writing to FLOW_CTLR_HALT instead of FLOW_CTLR_CSR. Cc: Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 267c1d772380cfbced547abb17f1d6827904f909 Author: Miquel Raynal Date: Mon Oct 28 17:02:08 2019 +0100 MAINTAINERS: ubi/ubifs: Update the Git repository UBI/UBIFS development now happens on Richard Weinberger's kernel.org 'ubifs' repository. Signed-off-by: Miquel Raynal Acked-by: Richard Weinberger commit 69c7f4618c16b4678f8a4949b6bb5ace259c0033 Author: Miquel Raynal Date: Tue Oct 22 16:58:59 2019 +0200 mtd: spear_smi: Fix Write Burst mode Any write with either dd or flashcp to a device driven by the spear_smi.c driver will pass through the spear_smi_cpy_toio() function. This function will get called for chunks of up to 256 bytes. If the amount of data is smaller, we may have a problem if the data length is not 4-byte aligned. In this situation, the kernel panics during the memcpy: # dd if=/dev/urandom bs=1001 count=1 of=/dev/mtd6 spear_smi_cpy_toio [620] dest c9070000, src c7be8800, len 256 spear_smi_cpy_toio [620] dest c9070100, src c7be8900, len 256 spear_smi_cpy_toio [620] dest c9070200, src c7be8a00, len 256 spear_smi_cpy_toio [620] dest c9070300, src c7be8b00, len 233 Unhandled fault: external abort on non-linefetch (0x808) at 0xc90703e8 [...] PC is at memcpy+0xcc/0x330 The above error occurs because the implementation of memcpy_toio() tries to optimize the number of I/O by writing 4 bytes at a time as much as possible, until there are less than 4 bytes left and then switches to word or byte writes. Unfortunately, the specification states about the Write Burst mode: "the next AHB Write request should point to the next incremented address and should have the same size (byte, half-word or word)" This means ARM architecture implementation of memcpy_toio() cannot reliably be used blindly here. Workaround this situation by update the write path to stick to byte access when the burst length is not multiple of 4. Fixes: f18dbbb1bfe0 ("mtd: ST SPEAr: Add SMI driver for serial NOR flash") Cc: Russell King Cc: Boris Brezillon Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Reviewed-by: Russell King commit 2aba2f2a704d368583e832555b25d88265e62b6d Author: Linus Walleij Date: Mon Oct 21 01:00:42 2019 +0200 mtd: physmap_of: add a hook for Intel IXP4xx flash probing In order to support device tree probing of IXP4xx NOR flash chips, a certain big-endian or mixed-endian memory access pattern need to be used. I have opted to use the pattern set by previous plug-ins to physmap for Gemini and Versatile, just override some functions and reuse most of the physmap core code as it is to minimize maintenance. Parts of drivers/mtd/ixp4xx.c are copied into this file. After we have IXP4xx converted fully to device tree, the drivers/mtd/ixp4xx.c file will be deleted and this will be the only access pattern to the IXP4xx flash. I did not keep the quirk in the flash write function after probe, where the old code for a while checks for access to odd addresses, fails and assigns a "faster" write function once it has convinced probe to only use 2-byte accesses. As we mandate that this device should be using bank-width = <2> this should not be a problem unless misconfigured. Signed-off-by: Linus Walleij Signed-off-by: Miquel Raynal commit 8b3cc926223be73bb2ab5f9465f157fc27e06eca Author: Linus Walleij Date: Mon Oct 21 01:00:41 2019 +0200 mtd: add DT bindings for the Intel IXP4xx Flash This adds device tree bindings for the Intel IXP4xx flash controller, a simple physmap which however need a specific big-endian or mixed-endian access pattern to the memory. Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Miquel Raynal commit 5c1719a2b978f9a292d4fb3efa6d6525f36b7489 Author: Miquel Raynal Date: Thu Oct 17 16:22:29 2019 +0200 MAINTAINERS: mtd/ubi/ubifs: Remove inactive maintainers Despite their substantial personal investment in the MTD/UBI/UBIFS a few years back, David, Brian, Artem and Adrian are not actively maintaining the subsystem anymore. We warmly salute them for all the work they have achieved and will of course still welcome their participation and reviews. That said, Marek retired himself a few weeks ago quoting Harald [1]: It matters who has which title and when. Should somebody not be an active maintainer, make sure he's not listed as such. For this same reason, let’s trim the maintainers list with the actually active ones over the past two years. [1] http://laforge.gnumonks.org/blog/20180307-mchardy-gpl/ Cc: David Woodhouse Cc: Brian Norris Cc: Artem Bityutskiy Cc: Adrian Hunter Cc: Marek Vasut Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Tudor Ambarus Signed-off-by: Miquel Raynal Acked-by: Adrian Hunter Acked-by: Brian Norris Acked-by: Artem Bityutskiy commit e96303f0c9d4cc51a5e7e1ee86f0408995fa4a5d Author: Fuqian Huang Date: Thu Oct 10 21:58:09 2019 +0800 mtd: maps: l440gx: Avoid printing address to dmesg Avoid printing the address of l440gx_map.virt every time l440gx init. Signed-off-by: Fuqian Huang Signed-off-by: Miquel Raynal commit 480bb31f4286d838fc0eebcfd813dd83236406e7 Author: Dmitry Osipenko Date: Sun Jun 23 20:07:25 2019 +0300 ARM: tegra: Enable Tegra VDE driver in tegra_defconfig The video decoder driver was tested by time and works absolutely fine. The reason why it is in staging is because it doesn't provide common V4L interface yet, this shouldn't stop driver enabling in the defconfig since our userspace (libvdpau-tegra) provides combined acceleration of decoding and displaying without use of V4L. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 783807436f363e5b1ad4d43ba7debbedfcadbb99 Author: Dmitry Osipenko Date: Thu Jul 25 18:18:32 2019 +0300 soc/tegra: regulators: Add regulators coupler for Tegra30 Add regulators coupler for Tegra30 SoCs that performs voltage balancing of a coupled regulators and thus provides voltage scaling functionality. There are 2 coupled regulators on all Tegra30 SoCs: CORE and CPU. The coupled regulator voltages shall be in a range of 300mV from each other and CORE voltage shall be higher than the CPU by N mV, where N depends on the CPU voltage. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding commit 496747e7d907b01bd2507d61bdd6874b987c9629 Author: Dmitry Osipenko Date: Thu Jul 25 18:18:31 2019 +0300 soc/tegra: regulators: Add regulators coupler for Tegra20 Add regulators coupler for Tegra20 SoCs that performs voltage balancing of a coupled regulators and thus provides voltage scaling functionality. There are 3 coupled regulators on all Tegra20 SoCs: CORE, RTC and CPU. The CORE and RTC voltages shall be in range of 170mV from each other and they both shall be higher than the CPU voltage by at least 120mV. This sounds like it could be handle by a generic voltage balancer, but the CORE voltage scaling isn't implemented in any of the upstream drivers yet. It will take quite some time and effort to hook up voltage scaling for all of the drivers, hence we will use a custom coupler that will manage the CPU voltage scaling for the starter. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding commit 7f9d4c08846e6c34f82627fbc108a65664f33964 Author: Ville Syrjälä Date: Mon Oct 28 13:30:31 2019 +0200 drm/i915: Fix i845/i865 cursor width The change from the uapi coordinates to the internal coordinates broke the cursor on i845/i865 due to src and dst getting swapped. Fix it. Cc: Maarten Lankhorst Fixes: 3a612765f423 ("drm/i915: Remove cursor use of properties for coordinates") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191028113036.27553-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit f0cf17ed76cffa365001d263ced1f130ec794917 Author: Jarkko Nikula Date: Tue Oct 29 13:58:02 2019 +0200 spi: pxa2xx: Add support for Intel Comet Lake-H Add Intel Comet Lake-H LPSS SPI PCI IDs. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20191029115802.6779-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown commit f7907e57aea2adcd0b57ebcca410e125412ab680 Author: Peng Fan Date: Tue Oct 29 01:21:31 2019 +0000 regulator: fixed: add off-on-delay Depends on board design, the gpio controlling regulator may connects with a big capacitance. When need off, it takes some time to let the regulator to be truly off. If not add enough delay, the regulator might have always been on, so introduce off-on-delay to handle such case. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1572311875-22880-3-git-send-email-peng.fan@nxp.com Signed-off-by: Mark Brown commit 96da2d9c905b36a30052a5e38ae5d47c3dc988e6 Author: Peng Fan Date: Tue Oct 29 01:21:27 2019 +0000 dt-bindings: regulator: fixed: add off-on-delay-us property When disabling a fixed regulator, it may take some time to let the voltage drop to the expected value, such as zero. If not delay enough time, the regulator might have been always enabled. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1572311875-22880-2-git-send-email-peng.fan@nxp.com Signed-off-by: Mark Brown commit bf2f64ea6594066081b0d30b128fa4947e83e737 Author: Cheng-Yi Chiang Date: Mon Oct 28 15:19:28 2019 +0800 ASoC: rockchip_max98090: Add HDMI jack support In machine driver, create a jack and let hdmi-codec report jack status. Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20191028071930.145899-5-cychiang@chromium.org Signed-off-by: Mark Brown commit 05b754f5f41c1ea5366c37c8f0ee04c4b4899ff9 Author: Cheng-Yi Chiang Date: Mon Oct 28 15:19:27 2019 +0800 ASoC: rockchip_max98090: Optionally support HDMI use case Support three different use cases with rockchip_max98090 driver. The three use cases: - max98090 only: Current usage, where HDMI link is missing. - HDMI only: Needed use case for veyron_mickey board. - max98090 + HDMI: Ideal use case for veyron_jerry, veyron_minnie..etc. The presence of max98090 is determined by the presence of rockchip,audio-codec device property. The presence of HDMI is determined by the presence of rockchip,hdmi-codec device property. Create different sound card based on the configuration. Note that we keep max98090 only usage for backward compatibility. Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20191028071930.145899-4-cychiang@chromium.org Signed-off-by: Mark Brown commit f03412b78a947857bbd20899e1423482fba55761 Author: Cheng-Yi Chiang Date: Mon Oct 28 15:19:26 2019 +0800 ASoC: rockchip-max98090: Support usage with and without HDMI Add one optional property "rockchip,hdmi-codec" to let user specify HDMI device node in DTS so machine driver can find hdmi-codec device node for HDMI codec DAI. Use the presence of rockchip,audio-codec and rockchip,hdmi-codec to specify the use case. Use max98090 only : specify rockchip,audio-codec. Use HDMI only: specify rockchip,hdmi-codec. Use both max98090 and HDMI: specify rockchip,audio-codec and rockchip,hdmi-codec. Move these properties to optional because they are not needed for HDMI-only use case. "rockchip,audio-codec": The phandle of the MAX98090 audio codec "rockchip,headset-codec": The phandle of Ext chip for jack detection Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20191028071930.145899-3-cychiang@chromium.org Signed-off-by: Mark Brown commit a9c82d63ca4819d3d03964dbf4aa427b36c5a67f Author: Cheng-Yi Chiang Date: Mon Oct 28 15:19:25 2019 +0800 drm: bridge: dw-hdmi: Report connector status using callback Allow codec driver register callback function for plug event. The callback registration flow: dw-hdmi <--- hw-hdmi-i2s-audio <--- hdmi-codec dw-hdmi-i2s-audio implements hook_plugged_cb op so codec driver can register the callback. dw-hdmi exports a function dw_hdmi_set_plugged_cb so platform device can register the callback. When connector plug/unplug event happens, report this event using the callback. Make sure that audio and drm are using the single source of truth for connector status. Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20191028071930.145899-2-cychiang@chromium.org Signed-off-by: Mark Brown commit c7ccfccabb0f819eae1a191ccd94269f577e4523 Author: Sowjanya Komatineni Date: Fri Aug 16 12:42:05 2019 -0700 soc/tegra: pmc: Configure deep sleep control settings Tegra210 and prior Tegra chips have deep sleep entry and wakeup related timings which are platform specific that should be configured before entering into deep sleep. Below are the timing specific configurations for deep sleep entry and wakeup. - Core rail power-on stabilization timer - OSC clock stabilization timer after SOC rail power is stabilized. - Core power off time is the minimum wake delay to keep the system in deep sleep state irrespective of any quick wake event. These values depends on the discharge time of regulators and turn OFF time of the PMIC to allow the complete system to finish entering into deep sleep state. These values vary based on the platform design and are specified through the device tree. This patch has implementation to configure these timings which are must to have for proper deep sleep and wakeup operations. Signed-off-by: Sowjanya Komatineni Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c3ad1092e1069f27d0ca110dcaada8a5435ea3e0 Author: Jaroslav Kysela Date: Mon Oct 28 18:33:29 2019 +0100 ASoC: SOF - remove the dead code (skylake/kabylake) Appearently the CONFIG_SND_SOC_SOF_KABYLAKE and CONFIG_SND_SOC_SOF_SKYLAKE options are not present in Kconfig and 'struct snd_sof_dsp_ops sof_skl_ops' is not declared in the code, too. Signed-off-by: Jaroslav Kysela Cc: Pierre-Louis Bossart Cc: Mark Brown Link: https://lore.kernel.org/r/20191028173329.29538-1-perex@perex.cz Signed-off-by: Mark Brown commit 455271d9dc5f4cce3d35c5819f8f01c723bca94c Author: Sowjanya Komatineni Date: Fri Aug 16 12:42:04 2019 -0700 soc/tegra: pmc: Configure core power request polarity This patch configures polarity of the core power request signal in PMC control register based on the device tree property. PMC asserts and de-asserts power request signal based on it polarity when it need to power-up and power-down the core rail during SC7. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit d745cc1ab65945b2d17ec9c5652f38299c054649 Author: Jaroslav Kysela Date: Mon Oct 28 17:46:24 2019 +0100 ASoC: intel - fix the card names Those strings are exposed to the user space as the card name thus used in the GUIs. The common standard is to avoid '_' here. The worst case is 'sof-skl_hda_card' string. Signed-off-by: Jaroslav Kysela Cc: Pierre-Louis Bossart Cc: Mark Brown Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191028164624.14334-1-perex@perex.cz Signed-off-by: Mark Brown commit 7e9ae849eb1ea4617a9c7229a78c622a214283f2 Author: Sowjanya Komatineni Date: Fri Aug 16 12:42:02 2019 -0700 soc/tegra: pmc: Add wake event support on Tegra210 This patch implements PMC wakeup sequence for Tegra210 and defines the commonly used RTC alarm wake event. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit aba19827fced3f32bd17885db59d27538b0bd223 Author: Sowjanya Komatineni Date: Fri Aug 16 12:42:01 2019 -0700 soc/tegra: pmc: Support wake events on more Tegra SoCs This patch allows to create separate irq_set_wake and irq_set_type implementations for different Tegra designs PMC that has different wake models which require difference wake registers and different programming sequence. AOWAKE model support is available for Tegra186 and Tegra194 only and it resides within PMC and supports tiered wake architecture. Tegra210 and prior Tegra designs uses PMC directly to receive wake events and coordinate the wake sequence. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 0fb438eed10ca13d212a5675363beb5a5cd721f2 Author: Sowjanya Komatineni Date: Fri Aug 16 12:41:57 2019 -0700 cpufreq: tegra124: Add suspend and resume support This patch adds suspend and resume pm ops for cpufreq driver. PLLP is the safe clock source for CPU during system suspend and resume as PLLP rate is below the CPU Fmax at Vmin. CPUFreq driver suspend switches the CPU clock source to PLLP and disables the DFLL clock. During system resume, warmboot code powers up the CPU with PLLP clock source. So CPUFreq driver resume enabled DFLL clock and switches CPU back to DFLL clock source. Acked-by: Thierry Reding Acked-by: Viresh Kumar Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 86d35f87ebaa31052e24818131dfacd4bfc1fe1d Author: Hans de Goede Date: Mon Oct 28 14:31:59 2019 +0100 drm/vboxvideo: Use drm_gem_fb_create_with_dirty instead of drm_gem_fb_create Commit 7d79aa8628fe ("drm/vboxvideo: Replace struct vram_framebuffer with generic implemenation") removed the diy framebuffer code from the vboxvideo driver, resulting in a nice cleanup. But since the vboxvideo driver needs the generic dirty tracking code, it's drm_mode_config_funcs.fb_create should be set to drm_gem_fb_create_with_dirty not drm_gem_fb_create. This commit fixes this, fixing the framebuffer not always updating. Cc: Thomas Zimmermann Fixes: 7d79aa8628fe ("drm/vboxvideo: Replace struct vram_framebuffer with generic implemenation") Signed-off-by: Hans de Goede Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20191028133159.236550-1-hdegoede@redhat.com commit 3c379a59b4795d7279d38c623e74b9790345a32b Author: Hewenliang Date: Fri Oct 25 21:35:55 2019 -0400 tools: PCI: Fix fd leakage We should close fd before the return of run_test. Fixes: 3f2ed8134834 ("tools: PCI: Add a userspace tool to test PCI endpoint") Signed-off-by: Hewenliang Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I commit a0855d24fc22d49cdc25664fb224caee16998683 Author: Davidlohr Bueso Date: Thu Oct 24 20:36:34 2019 -0700 locking/mutex: Complain upon mutex API misuse in IRQ contexts Add warning checks if mutex_trylock() or mutex_unlock() are used in IRQ contexts, under CONFIG_DEBUG_MUTEXES=y. While the mutex rules and semantics are explicitly documented, this allows to expose any abusers and robustifies the whole thing. While trylock and unlock are non-blocking, calling from IRQ context is still forbidden (lock must be within the same context as unlock). Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Link: https://lkml.kernel.org/r/20191025033634.3330-1-dave@stgolabs.net Signed-off-by: Ingo Molnar commit 751459043cc87c3f0098034b15ca5252d12539ab Author: Davidlohr Bueso Date: Tue Oct 22 20:34:50 2019 -0700 futex: Drop leftover wake_q_add() comment Since the original comment, we have moved to do the task reference counting explicitly along with wake_q_add_safe(). Drop the now incorrect comment. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dave@stgolabs.net Link: https://lkml.kernel.org/r/20191023033450.6445-1-dave@stgolabs.net Signed-off-by: Ingo Molnar commit 726b4fba94bec7e4c16bc681316e82455652c3a8 Author: Felipe Balbi Date: Tue Oct 29 12:56:11 2019 +0200 usb: dwc3: of-simple: add a shutdown In case we're loading a new kernel via kexec, let's make sure to cleanup the dwc3 address space correctly. This means that we should run the same steps from driver remove, so just extract a reusable function for both cases. Signed-off-by: Felipe Balbi commit 387c359b84f71ca29c1a9fa24293c65a257f6bf5 Author: Roger Quadros Date: Mon Oct 28 11:32:49 2019 +0200 usb: cdns3: Add TI specific wrapper driver The J721e platform comes with 2 Cadence USB3 controller instances. This driver supports the TI specific wrapper on this platform. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori Reviewed-by: Pawel Laszczak Signed-off-by: Felipe Balbi commit 00a7f0d7155c28ab18600bcf3f62d7cade2a870d Author: Lionel Landwerlin Date: Fri Oct 25 12:37:46 2019 -0700 drm/i915/tgl: Add perf support on TGL The design of the OA unit has been split into several units. We now have a global unit (OAG) and a render specific unit (OAR). This leads to some changes on how we program things. Some details : OAR: - has its own set of counter registers, they are per-context saved/restored - counters are not written to the circular OA buffer - a snapshot of the counters can be acquired with MI_RECORD_PERF_COUNT, or a single counter can be read with MI_STORE_REGISTER_MEM. OAG: - has global counters that increment across context switches - counters are written into the circular OA buffer (if requested) v2: Fix checkpatch warnings on code style (Lucas) v3: (Umesh) - Update register from which tail, status and head are read - Update logic to sample context reports - Update whitelist mux and b counter regs v4: Fix a bug when updating context image for new contexts (Umesh) v5: Squash patch enabling save/restore of counters into context image We want this so we can preempt performance queries and keep the system responsive even when long running queries are ongoing. We avoid doing it for all contexts. - use LRI to modify context control (Chris) - use MASKED_FIELD to program just the masked bits (Chris) - disable save/restore of counters on cleanup (Chris) v6: Do not use implicit parameters (Chris) BSpec: 28727, 30021 Signed-off-by: Lionel Landwerlin Signed-off-by: Umesh Nerlige Ramappa Signed-off-by: Lucas De Marchi Acked-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025193746.47155-2-umesh.nerlige.ramappa@intel.com commit fc21523041107a4b2d47b05e1ad2a360659dbc4f Author: Umesh Nerlige Ramappa Date: Fri Oct 25 12:37:45 2019 -0700 drm/i915/perf: Add helper macros for comparing with whitelisted registers Add helper macros for range and equality comparisons and use them to check with whitelisted registers in oa configurations. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191025193746.47155-1-umesh.nerlige.ramappa@intel.com commit ecf8fd6d917dca1065e1021ff7fc6b6c282373f9 Author: Rob Herring Date: Mon Oct 28 11:32:49 2019 -0500 PCI: versatile: Enable COMPILE_TEST Since commit a574795bc383 ("PCI: generic,versatile: Remove unused pci_sys_data structures") the build dependency on ARM is gone, so let's enable COMPILE_TEST for versatile. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Acked-by: Linus Walleij Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 2999dea8e94a8e32dadfe17970aa29eba46985b9 Author: Rob Herring Date: Mon Oct 28 11:32:48 2019 -0500 PCI: versatile: Remove usage of PHYS_OFFSET PHYS_OFFSET is not universally defined on all arches and using it prevents enabling COMPILE_TEST. PAGE_OFFSET and __pa() are always available, so use them to get the physical start of memory address. This should have probably used 'dma-ranges' to get the address, but we don't want to force a DT update to do that. At least in QEMU, the SMAP registers have no effect (or perhaps the only value that is handled is 0). Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Linus Walleij Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas commit f9f4fdaa3509b804410b4742bcad9469151f4ee0 Author: Rob Herring Date: Mon Oct 28 11:32:47 2019 -0500 PCI: versatile: Use pci_parse_request_of_pci_ranges() Convert ARM Versatile host bridge to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list first. Just use bridge->windows directly and remove all the temporary list handling. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Linus Walleij Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 3c65ebff8faedfc3386e6e1ad91adf2bdb8eeaa7 Author: Rob Herring Date: Mon Oct 28 11:32:46 2019 -0500 PCI: xilinx-nwl: Use pci_parse_request_of_pci_ranges() Convert the xilinx-nwl host bridge to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list first. Just use bridge->windows directly and remove all the temporary list handling. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas Cc: Michal Simek commit ee352c272e41c67aac887cbfd8c6aa71e5721997 Author: Rob Herring Date: Mon Oct 28 11:32:45 2019 -0500 PCI: xilinx: Use pci_parse_request_of_pci_ranges() Convert the Xilinx host bridge to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list first. Just use bridge->windows directly and remove all the temporary list handling. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas Cc: Michal Simek commit 83083e241d48aba4d0b92c3f5e274351c1560c97 Author: Rob Herring Date: Mon Oct 28 11:32:44 2019 -0500 PCI: xgene: Use pci_parse_request_of_pci_ranges() Convert the xgene host bridge to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list first. Just use bridge->windows directly and remove all the temporary list handling. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Toan Le Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas commit e0aebfe84a2fb02ca1f195054595af9c3c01f12e Author: Rob Herring Date: Mon Oct 28 11:32:43 2019 -0500 PCI: v3-semi: Use pci_parse_request_of_pci_ranges() Convert V3 host bridge to use the common pci_parse_request_of_pci_ranges(). Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Linus Walleij Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas commit 62240a88004b0205beb0c1faca1c875c392b53f0 Author: Rob Herring Date: Mon Oct 28 11:32:42 2019 -0500 PCI: rockchip: Drop storing driver private outbound resource data The Rockchip host bridge driver doesn't need to store outboard resources in its private struct as they are already stored in struct pci_host_bridge. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Shawn Lin Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org commit 5c1306a0fde67e5a39bef79932a0cb5cec5fd629 Author: Rob Herring Date: Mon Oct 28 11:32:41 2019 -0500 PCI: rockchip: Use pci_parse_request_of_pci_ranges() Convert the Rockchip host bridge to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list first. Just use bridge->windows directly and remove all the temporary list handling. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Shawn Lin Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org commit 6c6a0dff064176a5a0c6b1a9ee32f868ecd5e0f1 Author: Rob Herring Date: Mon Oct 28 11:32:40 2019 -0500 PCI: mobiveil: Use pci_parse_request_of_pci_ranges() Convert the Mobiveil host bridge to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list first. Just use bridge->windows directly and remove all the temporary list handling. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Reviewed-by: Hou Zhiqiang Cc: Karthikeyan Mitran Cc: Hou Zhiqiang Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 8a26f861b815c997dd85cc2f6210020e7a700a62 Author: Rob Herring Date: Mon Oct 28 11:32:39 2019 -0500 PCI: mediatek: Use pci_parse_request_of_pci_ranges() Convert Mediatek host bridge to use the common pci_parse_request_of_pci_ranges(). Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Cc: Ryder Lee Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Matthias Brugger Cc: linux-mediatek@lists.infradead.org commit 7ef1c871da16125ae58db13716fe82795dcbe3e8 Author: Rob Herring Date: Mon Oct 28 11:32:38 2019 -0500 PCI: iproc: Use pci_parse_request_of_pci_ranges() Convert the iProc host bridge to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list, so just use bridge->windows directly. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com commit 783a862563f71e5a3253efa0653eb0ebf9188cf8 Author: Rob Herring Date: Mon Oct 28 11:32:37 2019 -0500 PCI: faraday: Use pci_parse_request_of_pci_ranges() Convert the Faraday host bridge to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list first. Just use bridge->windows directly and remove all the temporary list handling. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 7fe71aa84b438d7830f812692f2e0fa55ecdf413 Author: Rob Herring Date: Mon Oct 28 11:32:36 2019 -0500 PCI: dwc: Use pci_parse_request_of_pci_ranges() Convert the Designware host bridge to use the common pci_parse_request_of_pci_ranges(). Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas commit e634e3e0b790789ee16f4df503ccab13f1169134 Author: Rob Herring Date: Mon Oct 28 11:32:35 2019 -0500 PCI: altera: Use pci_parse_request_of_pci_ranges() Convert altera host bridge to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list first. Just use bridge->windows directly and remove all the temporary list handling. If an I/O range is present, then it will now be mapped. It's expected that h/w which doesn't support I/O range will not define one. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Cc: Ley Foon Tan Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: rfi@lists.rocketboards.org commit 4e5be6f81be72c980580676e31c2b542c0267757 Author: Rob Herring Date: Mon Oct 28 11:32:34 2019 -0500 PCI: aardvark: Use pci_parse_request_of_pci_ranges() Convert aardvark to use the common pci_parse_request_of_pci_ranges(). There's no need to assign the resources to a temporary list first. Just use bridge->windows directly and remove all the temporary list handling. Tested-by: Thomas Petazzoni Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 65991f43769941bea14158e0e731f9362051b618 Author: Rob Herring Date: Mon Oct 28 11:32:33 2019 -0500 PCI: Export pci_parse_request_of_pci_ranges() pci_parse_request_of_pci_ranges() is missing a module export, so add it. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Cc: Bjorn Helgaas commit 494f8b10d832456a96be4ee7317425f6936cabc8 Author: Rob Herring Date: Mon Oct 28 11:32:32 2019 -0500 resource: Add a resource_list_first_type helper A common pattern is looping over a resource_list just to get a matching entry with a specific type. Add resource_list_first_type() helper which implements this. Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi commit 1c16b3d58681b583157a1b74c4c4dd96a08f5931 Author: Chris Packham Date: Fri Oct 25 08:50:16 2019 +1300 docs/core-api: memory-allocation: mention size helpers Mention struct_size(), array_size() and array3_size() in the same place as kmalloc() and friends. Signed-off-by: Chris Packham Acked-by: Mike Rapoport Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Jonathan Corbet commit 094ef1c9fbeac0e4404d66a053ace6d909386507 Author: Chris Packham Date: Fri Oct 25 08:50:15 2019 +1300 docs/core-api: memory-allocation: remove uses of c:func: These are no longer needed as the documentation build will automatically add the cross references. Signed-off-by: Chris Packham Acked-by: Mike Rapoport Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Jonathan Corbet commit ef8330fe02710046d7b6ce271d821926dd2769e8 Author: Chris Packham Date: Fri Oct 25 08:50:14 2019 +1300 docs/core-api: memory-allocation: fix typo "on the safe size" should be "on the safe side". Signed-off-by: Chris Packham Acked-by: Mike Rapoport Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Jonathan Corbet commit 822bbba0cabb50825a0ce22707dc45eb82d02853 Merge: d41abfd7ae33 7d194c2100ad Author: Jonathan Corbet Date: Tue Oct 29 04:43:29 2019 -0600 Merge tag 'v5.4-rc4' into docs-next I need to pick up the independent changes made to Documentation/core-api/memory-allocation.rst to be able to merge further work without creating a total mess. commit 4c48f2367844a013c8c9e443f1d559ddb3429baf Author: Roger Quadros Date: Mon Oct 28 11:32:48 2019 +0200 dt-bindings: usb: Add binding for the TI wrapper for Cadence USB3 controller TI platforms have a wrapper module around the Cadence USB3 controller. Add binding information for that. Signed-off-by: Roger Quadros Cc: Rob Herring Reviewed-by: Rob Herring Signed-off-by: Felipe Balbi commit e60f7bb7ea68c46b006aa8f3d562933e7b1d4c9e Author: Matthew Auld Date: Tue Oct 29 09:58:56 2019 +0000 drm/i915/selftests: check for missing aperture We may be missing support for the mappable aperture on some platforms. Signed-off-by: Matthew Auld Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029095856.25431-7-matthew.auld@intel.com commit 34a6baa2df9db77dc65979e9c334a3097f6b7d9f Author: Matthew Auld Date: Tue Oct 29 09:58:55 2019 +0000 drm/i915: don't allocate the ring in stolen if we lack aperture Since we have no way access it from the CPU. For such cases just fallback to internal objects. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029095856.25431-6-matthew.auld@intel.com commit 4dc0a7cae212a3a9fb292e19b91f06012fc70d65 Author: Michal Wajdeczko Date: Tue Oct 29 09:58:54 2019 +0000 drm/i915: Don't try to place HWS in non-existing mappable region HWS placement restrictions can't just rely on HAS_LLC flag. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Auld Cc: Daniele Ceraolo Spurio Acked-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029095856.25431-5-matthew.auld@intel.com commit 895d8ebeaa92435e4214a026fa22763645564fab Author: Daniele Ceraolo Spurio Date: Tue Oct 29 09:58:53 2019 +0000 drm/i915: error capture with no ggtt slot If the aperture is not available in HW we can't use a ggtt slot and wc copy, so fall back to regular kmap. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029095856.25431-4-matthew.auld@intel.com commit cd20c70bb05e31a57bc5ccd10f8f188bb3508de3 Author: Daniele Ceraolo Spurio Date: Tue Oct 29 09:58:52 2019 +0000 drm/i915: set num_fence_regs to 0 if there is no aperture We can't fence anything without aperture. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Stuart Summers Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029095856.25431-3-matthew.auld@intel.com commit 54b512cd7a6d5a14938e6a28335ce33942fdb2bb Author: Daniele Ceraolo Spurio Date: Tue Oct 29 09:58:51 2019 +0000 drm/i915: do not map aperture if it is not available. Skip both setup and cleanup of the aperture mapping if the HW doesn't have an aperture bar. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029095856.25431-2-matthew.auld@intel.com commit d41abfd7ae33cd3c1d9189438937d61cb75e690a Author: Andre Azevedo Date: Sat Oct 26 12:55:54 2019 -0700 Documentation/scheduler: fix links in sched-stats The rain.com domain recently moved to pdxhosts.com, making the scheduler documentation point to broken links. Fix the links in the scheduler documentation. CC: Rick Lindsley Signed-off-by: Andre Azevedo Signed-off-by: Jonathan Corbet commit 773ed805b5ee3c88a889622fac48ce8e3640bcd9 Author: Daniele Ceraolo Spurio Date: Tue Oct 29 09:58:50 2019 +0000 drm/i915: define i915_ggtt_has_aperture The following patches in the series will use it to avoid certain operations when the mappable aperture is not available in HW. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191029095856.25431-1-matthew.auld@intel.com commit e21be0d1d7bd7f78a77613f6bcb6965e72b22fc1 Author: Marian Mihailescu Date: Tue Oct 29 11:20:25 2019 +1030 clk: samsung: exynos5420: Preserve CPU clocks configuration during suspend/resume Save and restore top PLL related configuration registers for big (APLL) and LITTLE (KPLL) cores during suspend/resume cycle. So far, CPU clocks were reset to default values after suspend/resume cycle and performance after system resume was affected when performance governor has been selected. Fixes: 773424326b51 ("clk: samsung: exynos5420: add more registers to restore list") Signed-off-by: Marian Mihailescu Signed-off-by: Sylwester Nawrocki commit b92981de92cbbb93c80bbe800d6c3b32f0911641 Author: Marian Mihailescu Date: Tue Oct 29 11:17:58 2019 +1030 clk: samsung: exynos5420: Add VPLL rate table Add new table rate for VPLL for Exynos 542x SoC required to support Mali GPU clock frequencies. Signed-off-by: Marian Mihailescu Signed-off-by: Sylwester Nawrocki commit 5e2c27e833bb92487fdf49ff6d358361d00521c9 Author: Ganapatrao Prabhakerrao Kulkarni Date: Wed Oct 16 09:37:00 2019 +0000 drivers/perf: Add CCPI2 PMU support in ThunderX2 UNCORE driver. CCPI2 is a low-latency high-bandwidth serial interface for inter socket connectivity of ThunderX2 processors. CCPI2 PMU supports up to 8 counters per socket. Counters are independently programmable to different events and can be started and stopped individually. The CCPI2 counters are 64-bit and do not overflow in normal operation. Signed-off-by: Ganapatrao Prabhakerrao Kulkarni Signed-off-by: Will Deacon commit 030f6f84e556759ecffbdd560713c3bfac4483e4 Author: Ganapatrao Prabhakerrao Kulkarni Date: Wed Oct 16 09:36:59 2019 +0000 Documentation: perf: Update documentation for ThunderX2 PMU uncore driver Add documentation for Cavium Coherent Processor Interconnect (CCPI2) PMU. Signed-off-by: Ganapatrao Prabhakerrao Kulkarni Signed-off-by: Will Deacon commit a02cbc7ffe529ed58b6bbe54652104fc2c88bd77 Author: Michael Ellerman Date: Mon Oct 14 13:30:43 2019 +1100 selftests/powerpc: Fixup clobbers for TM tests Some of our TM (Transactional Memory) tests, list "r1" (the stack pointer) as a clobbered register. GCC >= 9 doesn't accept this, and the build breaks: ptrace-tm-spd-tar.c: In function 'tm_spd_tar': ptrace-tm-spd-tar.c:31:2: error: listing the stack pointer register 'r1' in a clobber list is deprecated [-Werror=deprecated] 31 | asm __volatile__( | ^~~ ptrace-tm-spd-tar.c:31:2: note: the value of the stack pointer after an 'asm' statement must be the same as it was before the statement We do have some fairly large inline asm blocks in these tests, and some of them do change the value of r1. However they should all return to C with the value in r1 restored, so I think it's legitimate to say r1 is not clobbered. As Segher points out, the r1 clobbers may have been added because of the use of `or 1,1,1`, however that doesn't actually clobber r1. Segher also points out that some of these tests do clobber LR, because they call functions, and that is not listed in the clobbers, so add that where appropriate. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191029095324.14669-1-mpe@ellerman.id.au commit b1ec18eae0b63a19a05a846c084aa84cbd9c87c6 Author: Sebastian Andrzej Siewior Date: Tue Aug 27 09:00:44 2019 -0700 Documentation: Rename rcu_node_context_switch() to rcu_note_context_switch() While Paul was explaining some RCU magic I noticed a typo in rcu_note_context_switch(). As a result, this commit replaces rcu_node_context_switch() with rcu_note_context_switch(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney commit 45271064e1caccd1ab004bf747f3ff6ef4e4ea8f Author: Joel Fernandes (Google) Date: Sun Aug 11 18:11:10 2019 -0400 doc: Update list_for_each_entry_rcu() documentation This commit updates the documentation with information about usage of lockdep with list_for_each_entry_rcu(). Signed-off-by: Joel Fernandes (Google) [ paulmck: Wordsmithing. ] Signed-off-by: Paul E. McKenney commit 71cb46ae46bda16e766a8957bc68396002767352 Author: Joel Fernandes (Google) Date: Thu Aug 1 17:39:22 2019 -0400 Restore docs "rcu: Restore barrier() to rcu_read_lock() and rcu_read_unlock()" This restores docs back in ReST format. Signed-off-by: Joel Fernandes (Google) [ paulmck: Added Joel's SoB per Stephen Rothwell feedback. ] [ paulmck: Joel approved via private email. ] Signed-off-by: Paul E. McKenney commit d7424e283cc4a86e7b1eb7779f60f2327119e8bf Author: Joel Fernandes (Google) Date: Thu Aug 1 17:39:21 2019 -0400 Restore docs "treewide: Rename rcu_dereference_raw_notrace() to _check()" This restores docs back in ReST format. Signed-off-by: Joel Fernandes (Google) [ paulmck: Added Joel's SoB per Stephen Rothwell feedback. ] [ paulmck: Joel approved via private email. ] Signed-off-by: Paul E. McKenney commit 76e771d188060d47f98e5634aee6333ab11673a4 Author: Joel Fernandes (Google) Date: Thu Aug 1 17:39:20 2019 -0400 docs: rcu: Increase toctree to 3 These documents are long and have various sections. Provide a good toc nesting level. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 07335c16a39c213c9ac82213a3cd084f0ade4b50 Author: Joel Fernandes (Google) Date: Thu Aug 1 17:39:19 2019 -0400 docs: rcu: Correct links referring to titles Mauro's auto conversion broken these links, fix them. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit ccc9971e2147225cb2d25e5543d6757988dd0a1d Author: Mauro Carvalho Chehab Date: Thu Aug 1 17:39:18 2019 -0400 docs: rcu: convert some articles from html to ReST There are 4 RCU articles that are written on html format. The way they are, they can't be part of the Linux Kernel documentation body nor share the styles and pdf output. So, convert them to ReST format. This way, make htmldocs and make pdfdocs will produce a documentation output that will be like the original ones, but will be part of the Linux Kernel documentation body. Part of the conversion was done with the help of pandoc, but the result had some broken things that had to be manually fixed. Following are manual changes Mauro made when doing the automatic conversion: Quoting from: https://lore.kernel.org/rcu/20190726154550.5eeae294@coco.lan/ > > At least the pandoc's version I used here has a bug: its conversion > > from html to ReST on those files only start after a tag - or > > when the first quiz table starts. I only discovered that adding a > > at the beginning of the file solve this book at the last > > conversions. > > > > So, for most html->ReST conversions, I manually converted the first > > part of the document, basically stripping html paragraph tags and > > by replacing highlights by the ReST syntax. > > > > Also, all the quiz tables seem to assume some javascript macro or > > css style that would be hiding the answer part until the mouse moves > > to it. Such macro/css was not there at the kernel tree. So, the quiz > > answers have the same color as the background, making them invisible. > > Even if we had such macro/css, this is not portable for pdf/LaTeX output > > (and I'm not sure if this would work with ePub). > > > > So, I ended by manually doing the table conversion. > > > > Finally, I double-checked if the conversions ended ok, addressing any > > issues that might have heppened. > > > > So, after both automatic conversion and manual fixes, I opened both the > > html files produced by Sphinx and the original ones and compared them > > line per line (except for the indexes, as Sphinx produces them > > automatically), in order to see if all information from the original > > files will be there on a format close to what we have on other ReST > > files, fixing any pending issues if any. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit c07e6f36bc321d70e8255c30d327e299b8301146 Author: Joel Fernandes (Google) Date: Thu Aug 1 17:39:17 2019 -0400 Revert docs from "treewide: Rename rcu_dereference_raw_notrace() to _check()" This reverts docs from commit 355e9972da81e803bbb825b76106ae9b358caf8e. Signed-off-by: Joel Fernandes (Google) [ paulmck: Added Joel's SoB per Stephen Rothwell feedback. ] [ paulmck: Joel approved via private email. ] Signed-off-by: Paul E. McKenney commit 97df75cde57f0a24075200e22d9e2cfb1f2e195b Author: Joel Fernandes (Google) Date: Thu Aug 1 17:39:16 2019 -0400 Revert docs from "rcu: Restore barrier() to rcu_read_lock() and rcu_read_unlock()" This reverts docs from commit d6b9cd7dc8e041ee83cb1362fce59a3cdb1f2709. Signed-off-by: Joel Fernandes (Google) [ paulmck: Added Joel's SoB per Stephen Rothwell feedback. ] [ paulmck: Joel approved via private email. ] Signed-off-by: Paul E. McKenney commit e79b3ddad6790aabead5fb775456a5b0599e97ee Author: Frederic Weisbecker Date: Wed Oct 16 04:57:00 2019 +0200 leds: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM Now that we have a vtime safe kcpustat accessor for CPUTIME_SYSTEM, use it to start fixing frozen kcpustat values on nohz_full CPUs. Reported-by: Yauheni Kaliuta Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191016025700.31277-15-frederic@kernel.org Signed-off-by: Ingo Molnar commit 49bb001e246d3a44692f8418c8e38d9ef4aa405f Author: Frederic Weisbecker Date: Wed Oct 16 04:56:59 2019 +0200 cpufreq: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM Now that we have a vtime safe kcpustat accessor for CPUTIME_SYSTEM, use it to start fixing frozen kcpustat values on nohz_full CPUs. Reported-by: Yauheni Kaliuta Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Acked-by: Viresh Kumar Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191016025700.31277-14-frederic@kernel.org Signed-off-by: Ingo Molnar commit ae37fe5c07508e1c3dcdd41c9127e5d50d31013d Author: Frederic Weisbecker Date: Wed Oct 16 04:56:58 2019 +0200 procfs: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM Now that we have a vtime safe kcpustat accessor for CPUTIME_SYSTEM, use it to start fixing frozen kcpustat values on nohz_full CPUs. Reported-by: Yauheni Kaliuta Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Al Viro Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191016025700.31277-13-frederic@kernel.org Signed-off-by: Ingo Molnar commit 64eea63c19a2c386a96638f4e54a1355510709e3 Author: Frederic Weisbecker Date: Fri Oct 25 04:03:03 2019 +0200 sched/kcpustat: Introduce vtime-aware kcpustat accessor for CPUTIME_SYSTEM Kcpustat is not correctly supported on nohz_full CPUs. The tick doesn't fire and the cputime therefore doesn't move forward. The issue has shown up after the vanishing of the remaining 1Hz which has made the stall visible. We are solving that with checking the task running on a CPU through RCU and reading its vtime delta that we add to the raw kcpustat values. We make sure that we fetch a coherent raw-kcpustat/vtime-delta couple sequence while checking that the CPU referred by the target vtime is the correct one, under the locked vtime seqcount. Only CPUTIME_SYSTEM is handled here as a start because it's the trivial case. User and guest time will require more preparation work to correctly handle niceness. Reported-by: Yauheni Kaliuta Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191025020303.19342-1-frederic@kernel.org Signed-off-by: Ingo Molnar commit 023e9deb51c9e1aafacbd421e55beadcb8e87f53 Author: Frederic Weisbecker Date: Wed Oct 16 04:56:56 2019 +0200 context_tracking: Check static key on context_tracking_enabled_*cpu() guest_enter() doesn't call context_tracking_enabled() before calling context_tracking_enabled_this_cpu(). Therefore the guest code doesn't benefit from the static key on the fast path. Just make sure that context_tracking_enabled_*cpu() functions check the static key by themselves to propagate the optimization. Reported-by: Peter Zijlstra Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-11-frederic@kernel.org Signed-off-by: Ingo Molnar commit 9adbb9dd4c4eb45e1129fc73d8de69ca72350f81 Author: Frederic Weisbecker Date: Wed Oct 16 04:56:55 2019 +0200 sched/vtime: Introduce vtime_accounting_enabled_cpu() This allows us to check if a remote CPU runs vtime accounting (ie: is nohz_full). We'll need that to reliably support reading kcpustat on nohz_full CPUs. Also simplify a bit the condition in the local flavoured function while at it. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-10-frederic@kernel.org Signed-off-by: Ingo Molnar commit e44fcb4b7a299602fb300b82a546c0b8a50d9d90 Author: Frederic Weisbecker Date: Wed Oct 16 04:56:54 2019 +0200 sched/vtime: Rename vtime_accounting_cpu_enabled() to vtime_accounting_enabled_this_cpu() Standardize the naming on top of the vtime_accounting_enabled_*() base. Also make it clear we are checking the vtime state of the *current* CPU with this function. We'll need to add an API to check that state on remote CPUs as well, so we must disambiguate the naming. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-9-frederic@kernel.org Signed-off-by: Ingo Molnar commit 097f2541c6e51e0c1cdb1e6d46ef08a624336518 Author: Frederic Weisbecker Date: Wed Oct 16 04:56:53 2019 +0200 context_tracking: Introduce context_tracking_enabled_cpu() This allows us to check if a remote CPU runs context tracking (ie: is nohz_full). We'll need that to reliably support "nice" accounting on kcpustat. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-8-frederic@kernel.org Signed-off-by: Ingo Molnar commit 84e0dacd0c347e9ee2531052013babd84683245f Author: Frederic Weisbecker Date: Wed Oct 16 04:56:52 2019 +0200 context_tracking: Rename context_tracking_is_cpu_enabled() to context_tracking_enabled_this_cpu() Standardize the naming on top of the context_tracking_enabled_*() base. Also make it clear we are checking the context tracking state of the *current* CPU with this function. We'll need to add an API to check that state on remote CPUs as well, so we must disambiguate the naming. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-7-frederic@kernel.org Signed-off-by: Ingo Molnar commit 74c578759f15cb5a0d0107759bdad671d7b52ab9 Author: Frederic Weisbecker Date: Wed Oct 16 04:56:51 2019 +0200 context_tracking: Rename context_tracking_is_enabled() => context_tracking_enabled() Remove the superfluous "is" in the middle of the name. We want to standardize the naming so that it can be expanded through suffixes: context_tracking_enabled() context_tracking_enabled_cpu() context_tracking_enabled_this_cpu() Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-6-frederic@kernel.org Signed-off-by: Ingo Molnar commit 0ca167c056ea3d637b7959e6e94010fa526b9b8c Author: Frederic Weisbecker Date: Wed Oct 16 04:56:50 2019 +0200 context_tracking: Remove context_tracking_active() This function is a leftover from old removal or rename. We can drop it. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-5-frederic@kernel.org Signed-off-by: Ingo Molnar commit e6d5bf3e321ca664d12eb00ceb40bd58987ce8a1 Author: Frederic Weisbecker Date: Wed Oct 16 04:56:49 2019 +0200 sched/cputime: Add vtime guest task state Record guest as a VTIME state instead of guessing it from VTIME_SYS and PF_VCPU. This is going to simplify the cputime read side especially as its state machine is going to further expand in order to fully support kcpustat on nohz_full. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-4-frederic@kernel.org Signed-off-by: Ingo Molnar commit 14faf6fcac4ba33f8fd8d9b2d0278010a9eb1742 Author: Frederic Weisbecker Date: Wed Oct 16 04:56:48 2019 +0200 sched/cputime: Add vtime idle task state Record idle as a VTIME state instead of guessing it from VTIME_SYS and is_idle_task(). This is going to simplify the cputime read side especially as its state machine is going to further expand in order to fully support kcpustat on nohz_full. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-3-frederic@kernel.org Signed-off-by: Ingo Molnar commit 802f4a827f139f2581b3c50c69d20f8bf4c24af1 Author: Frederic Weisbecker Date: Wed Oct 16 04:56:47 2019 +0200 sched/vtime: Record CPU under seqcount for kcpustat needs In order to compute the kcpustat delta on a nohz CPU, we'll need to fetch the task running on that target. Checking that its vtime state snapshot actually refers to the relevant target involves recording that CPU under the seqcount locked on task switch. This is a step toward making kcpustat moving forward on full nohz CPUs. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Jacek Anaszewski Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J . Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191016025700.31277-2-frederic@kernel.org Signed-off-by: Ingo Molnar commit b8c96361402aa3e74ad48ceef18aed99153d8da8 Author: Patrick Bellasi Date: Wed Oct 23 21:56:30 2019 +0100 sched/fair/util_est: Implement faster ramp-up EWMA on utilization increases The estimated utilization for a task: util_est = max(util_avg, est.enqueue, est.ewma) is defined based on: - util_avg: the PELT defined utilization - est.enqueued: the util_avg at the end of the last activation - est.ewma: a exponential moving average on the est.enqueued samples According to this definition, when a task suddenly changes its bandwidth requirements from small to big, the EWMA will need to collect multiple samples before converging up to track the new big utilization. This slow convergence towards bigger utilization values is not aligned to the default scheduler behavior, which is to optimize for performance. Moreover, the est.ewma component fails to compensate for temporarely utilization drops which spans just few est.enqueued samples. To let util_est do a better job in the scenario depicted above, change its definition by making util_est directly follow upward motion and only decay the est.ewma on downward. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Acked-by: Vincent Guittot Cc: Dietmar Eggemann Cc: Douglas Raillard Cc: Juri Lelli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191023205630.14469-1-patrick.bellasi@matbug.net Signed-off-by: Ingo Molnar commit 09ef6fde7d89d08f390e6cf53cf40f9623d61616 Author: Jamal Shareef Date: Mon Oct 28 13:24:04 2019 -0700 staging: kpc2000: kpc_i2c: Remove commented code Remove some commented out code. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/c101a2ff94b3d5dcd467407bfa083679f3bbc612.1572293975.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9535e71e7b80f6bd7e13f7206ef60203dc496b4c Author: Jamal Shareef Date: Mon Oct 28 13:24:03 2019 -0700 staging: kpc2000: kpc_i2c: Fix lines over 80 chars Fix lines over 80 characters warnings. issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/8273ad9efccfb2c37ff1e9a25d5ccb26780567aa.1572293975.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 883afa2de414604906c604c03006732c73cbda1d Author: Frank A. Cancio Bello Date: Mon Oct 28 16:59:06 2019 +0000 staging: emxx_udc: Fix the format of a parameter list The closing parenthesis of a multiline parameter list looks better in the same line as the last parameter. The comma that separates parameters should be at the end of the line. Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/20191028165906.tv5zxjiqwjthygnq@linux-kernel-dev Signed-off-by: Greg Kroah-Hartman commit 4f83b7dd1b078ed935e1f75687b7551e55f386f3 Author: Frank A. Cancio Bello Date: Mon Oct 28 16:14:01 2019 +0000 staging: rts5208: Fix alignment and a line ending with a '(' checkpatch messaages: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/20191028161401.sjhp6qivm6huxpxm@linux-kernel-dev Signed-off-by: Greg Kroah-Hartman commit 6df6f3849bb8f317bf2d52711aacea4292237ede Author: Adham Abozaeid Date: Mon Oct 28 18:40:26 2019 +0000 staging: wilc1000: check if device is initialzied before changing vif When killing hostapd, the interface is closed which deinitializes the device, then change virtual interface is called. This change checks if the device is initialized before sending the interface change command to the device Signed-off-by: Adham Abozaeid Link: https://lore.kernel.org/r/20191028184019.31194-1-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman commit 3df2c830bfc4d7d5d1682d382dfd853e246fc884 Author: Matthew Auld Date: Mon Oct 28 22:03:25 2019 +0000 drm/i915/blt: fixup block_size rounding There is nothing to say that the obj->base.size is actually a multiple of the block_size. v2: Use round_up() as block_size is a power-of-two Reported-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191028220325.9325-1-chris@chris-wilson.co.uk commit 02f4597e7ebe73f43fb4a2800d50e985a8bf8f08 Author: Andreas Färber Date: Sun Aug 6 04:44:59 2017 +0200 arm64: dts: realtek: Add RTD129x UART resets Associate the UART nodes with the corresponding reset controller bits. Signed-off-by: Andreas Färber commit fd5f8d0a99b942fabd7c89fc2d822e91132b76a3 Author: Andreas Färber Date: Sun Aug 6 03:33:39 2017 +0200 arm64: dts: realtek: Add RTD129x reset controller nodes Add nodes for the Realtek RTD1295 reset controllers. Signed-off-by: Andreas Färber commit 4df56a1eb130b8a5ff59ac0a1a025a0f8c3bcf59 Author: Andreas Färber Date: Tue Aug 15 23:50:56 2017 +0200 dt-bindings: reset: Add Realtek RTD1295 Add a header with symbolic reset indices for Realtek RTD1295 SoC. Naming was derived from reset-names in an OEM's Device Tree. Acked-by: Rob Herring [AF: Dropped RTD1295 specific binding definition, updated SPDX] Acked-by: Philipp Zabel Signed-off-by: Andreas Färber commit 7448bfec6bf5e3e4a5abdd21b125a95c29a5952f Author: Mylène Josserand Date: Mon Oct 28 20:56:23 2019 -0700 Input: edt-ft5x06 - add support for regulator Add the support for enabling optional regulator that may be used as VCC source. Signed-off-by: Mylène Josserand Signed-off-by: Ondrej Jirman Reviewed-by: Rob Herring # bindings Link: https://lore.kernel.org/r/20191029005806.3577376-2-megous@megous.com Signed-off-by: Dmitry Torokhov commit a1b92973fba47ceaeb0e337132876aba078fa8b7 Author: Dmitry Torokhov Date: Tue Oct 22 10:31:16 2019 -0700 Input: st1232 - switch to using MT-B protocol Switch the driver to the slotted variant of multitouch protocol (MT-B) with in-kernel tracking of the contacts. Tested-by: Matthias Fend Signed-off-by: Dmitry Torokhov commit 833c2c083856ef3077b51c908ec401fa0a130d57 Author: Dmitry Torokhov Date: Tue Oct 22 09:34:59 2019 -0700 Input: st1232 - note that the receive buffer is DMA-safe The receiving buffer is allocated separately from the main driver data structure, and is naturally DMA-safe, so mark it as such when building I2C transfer message. Tested-by: Matthias Fend Signed-off-by: Dmitry Torokhov commit b67b6f598c5d6efe58f202b1f95cd0503583b728 Author: Dmitry Torokhov Date: Mon Oct 21 20:50:37 2019 -0700 Input: st1232 - do not set parent device explicitly devm_input_allocate_device() already sets parent device for us. Tested-by: Matthias Fend Signed-off-by: Dmitry Torokhov commit ac6b31797925b6f89885987c81d908bad90dea60 Author: Dmitry Torokhov Date: Mon Oct 21 20:49:19 2019 -0700 Input: st1232 - do not allocate fingers data separately The finger structure size is quite small and allocating it together with the main driver structure will not increase likelyhood of allocation failing, but reduces number of objects needing to be tracked by the allocator and devm. Tested-by: Matthias Fend Signed-off-by: Dmitry Torokhov commit efd7bb08a762d4f6322054c6824bd942971ac563 Author: Dmitry Torokhov Date: Mon Oct 21 11:02:33 2019 -0700 Input: st1232 - do not reset the chip too early We should not be putting the chip into reset while interrupts are enabled and ISR may be running. Fix this by installing a custom devm action and powering off the device/resetting GPIO line from there. This ensures proper ordering. Tested-by: Matthias Fend Signed-off-by: Dmitry Torokhov commit 95dc58a9a02f9267cc08199e059329463cfe938c Author: Dmitry Torokhov Date: Mon Oct 21 11:00:21 2019 -0700 Input: st1232 - rely on I2C core to configure wakeup interrupt When I2C client is created with I2C_CLIENT_WAKE flag (which happens either because we have "wakeup-source" device property or the flag was passed in when creating an I2C client manually), I2C core will take care of configuring interrupt as wakeup source on suspend. Tested-by: Matthias Fend Signed-off-by: Dmitry Torokhov commit 16dc7c5c13f1482ac32b8ac7cbc1ad8ab13b0f5d Author: Dmitry Torokhov Date: Mon Oct 21 10:55:56 2019 -0700 Input: st1232 - do not unconditionally configure as wakeup source Do not unconditionally configure the touchscreen as wakeup source but rather rely on I2C core to do that when requested (either via "wakeup-source" device property, or when creating a client with I2C_CLIENT_WAKE flag). Tested-by: Matthias Fend Signed-off-by: Dmitry Torokhov commit 95c9ea96adb3c7be6295d017c7e2f594f0871c16 Author: Dmitry Torokhov Date: Mon Oct 21 10:11:23 2019 -0700 Input: st1232 - simplify parsing of read buffer Avoid complex 2-variable loop when parsing touchscreen data to make the code clearer. Acked-by: Martin Kepplinger Tested-by: Matthias Fend Signed-off-by: Dmitry Torokhov commit dbb595333c951c401d4cca4a5e80a609f3bdc067 Author: Andreas Färber Date: Sun Oct 20 14:41:21 2019 +0200 arm64: dts: realtek: Add watchdog node for RTD129x Add the watchdog node to the RTD129x Device Tree. Acked-by: Rob Herring Acked-by: Guenter Roeck [AF: Moved from RTD1295 to new RTD129x] Signed-off-by: Andreas Färber commit f2356d1afe3902779ef4209addd5fb8ba334df71 Author: Andreas Färber Date: Sun Oct 20 14:41:21 2019 +0200 arm64: dts: realtek: Add oscillator for RTD129x Add 27 MHz oscillator clock node. Signed-off-by: Andreas Färber commit 5133636e41a28c9be7b81c85e3029536650fc997 Author: Andreas Färber Date: Mon Oct 16 03:05:30 2017 +0200 arm64: dts: realtek: Add RTD1296 and Synology DS418 Add Device Trees for RTD1296 SoC and Synology DiskStation DS418. Cc: info@synology.com Signed-off-by: Andreas Färber commit 1f3295994dc572b9928df748361df3bbbf2e68f3 Author: Andreas Färber Date: Mon Oct 16 05:42:42 2017 +0200 dt-bindings: arm: realtek: Document RTD1296 and Synology DS418 Define compatible strings for Realtek RTD1296 SoC and Synology DiskStation DS418 NAS. Cc: info@synology.com Acked-by: Rob Herring [AF: Converted to json-schema] Signed-off-by: Andreas Färber commit cf976f660ee8ceeff53a722de6b0f2eef6610fc6 Author: Andreas Färber Date: Mon Oct 16 02:59:37 2017 +0200 arm64: dts: realtek: Add RTD1293 and Synology DS418j Add Device Trees for RTD1293 SoC and Synology DiskStation DS418j NAS. Cc: info@synology.com Signed-off-by: Andreas Färber commit 39089a192a5095a8ce95bfcd5cb170a4721c7e56 Author: Andreas Färber Date: Sun Oct 20 05:47:08 2019 +0200 arm64: dts: realtek: Change dual-license from MIT to BSD Move the SPDX-License-Identifier to the top line and update to SPDX 2.0. While at it, switch from GPLv2+/MIT to GPLv2+/BSD2c before adding more. Acked-by: Rob Herring Signed-off-by: Andreas Färber commit 6013b8b0005e33cb130a0f2e5c4126e74a34021f Author: Andreas Färber Date: Mon Oct 16 05:24:06 2017 +0200 dt-bindings: arm: realtek: Document RTD1293 and Synology DS418j Define compatible strings for Realtek RTD1293 SoC and Synology DiskStation DS418j NAS. Cc: info@synology.com Acked-by: Rob Herring [AF: Converted to json-schema] Signed-off-by: Andreas Färber commit d3a3aa0c59e83d8c13a758128b10dd459ce0d866 Author: Andrii Nakryiko Date: Mon Oct 28 16:37:27 2019 -0700 libbpf: Fix off-by-one error in ELF sanity check libbpf's bpf_object__elf_collect() does simple sanity check after iterating over all ELF sections, if checks that .strtab index is correct. Unfortunately, due to section indices being 1-based, the check breaks for cases when .strtab ends up being the very last section in ELF. Fixes: 77ba9a5b48a7 ("tools lib bpf: Fetch map names from correct strtab") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191028233727.1286699-1-andriin@fb.com commit 94ff9ebb49a546b7f009ed840bafa235c96d4c4b Author: Magnus Karlsson Date: Fri Oct 25 11:17:15 2019 +0200 libbpf: Fix compatibility for kernels without need_wakeup When the need_wakeup flag was added to AF_XDP, the format of the XDP_MMAP_OFFSETS getsockopt was extended. Code was added to the kernel to take care of compatibility issues arrising from running applications using any of the two formats. However, libbpf was not extended to take care of the case when the application/libbpf uses the new format but the kernel only supports the old format. This patch adds support in libbpf for parsing the old format, before the need_wakeup flag was added, and emulating a set of static need_wakeup flags that will always work for the application. v2 -> v3: * Incorporated code improvements suggested by Jonathan Lemon v1 -> v2: * Rebased to bpf-next * Rewrote the code as the previous version made you blind Fixes: a4500432c2587cb2a ("libbpf: add support for need_wakeup flag in AF_XDP part") Reported-by: Eloy Degen Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Acked-by: Jonathan Lemon Link: https://lore.kernel.org/bpf/1571995035-21889-1-git-send-email-magnus.karlsson@intel.com commit 100843f176109af94600e500da0428e21030ca7f Author: Steffen Maier Date: Fri Oct 25 18:12:53 2019 +0200 scsi: zfcp: trace channel log even for FCP command responses While v2.6.26 commit b75db73159cc ("[SCSI] zfcp: Add qtcb dump to hba debug trace") is right that we don't want to flood the (payload) trace ring buffer, we don't trace successful FCP command responses by default. So we can include the channel log for problem determination with failed responses of any FSF request type. Fixes: b75db73159cc ("[SCSI] zfcp: Add qtcb dump to hba debug trace") Fixes: a54ca0f62f95 ("[SCSI] zfcp: Redesign of the debug tracing for HBA records.") Cc: #2.6.38+ Link: https://lore.kernel.org/r/e37597b5c4ae123aaa85fd86c23a9f71e994e4a9.1572018132.git.bblock@linux.ibm.com Reviewed-by: Benjamin Block Signed-off-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit e76acc51942649398660ca50655af5afecf29c42 Author: Steffen Maier Date: Fri Oct 25 18:12:52 2019 +0200 scsi: zfcp: proper indentation to reduce confusion in zfcp_erp_required_act No functional change. The unary not operator only applies to the sub expression before the logical or. So we return early if (not running) or failed. Link: https://lore.kernel.org/r/df4f897f6e83eaa528465d0858d5a22daac47a2f.1572018132.git.bblock@linux.ibm.com Reviewed-by: Jens Remus Reviewed-by: Benjamin Block Signed-off-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 48910f8c35cfd250d806f3e03150d256f40b6d4c Author: Benjamin Block Date: Fri Oct 25 18:12:51 2019 +0200 scsi: zfcp: move maximum age of diagnostic buffers into a per-adapter variable Replace the static define (ZFCP_DIAG_MAX_AGE) with a per-adapter variable (${adapter}->diagnostics->max_age). This new variable is exported via sysfs, along with other, already existing adapter variables, and can both be read and written. This way users can choose how much time should pass between refreshes of diagnostic buffers. The default value for the age remains to be five seconds. By setting this new variable to 0, the caching of diagnostic buffers for userspace accesses can also be completely removed. All diagnostic buffers of a given adapter are subject to this setting in the same way. Link: https://lore.kernel.org/r/b1d0977cc884b16dd4ca6418e4320c56a4c31d63.1572018132.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 8a72db70b5ca3c3feb3ca25519e8a9516cc60cfe Author: Benjamin Block Date: Fri Oct 25 18:12:50 2019 +0200 scsi: zfcp: implicitly refresh config-data diagnostics when reading sysfs Adds implicit updates of cached diagnostics via Exchange Config Data when reading sysfs attributes interfacing them. Right now this only affects the new B2B-Credit diagnostic attribute. This uses the same mechanism previously also used for cached diagnostics of Exchange Port Data. Link: https://lore.kernel.org/r/60a94f55f2630b74b468fed5f39880208abb2679.1572018132.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 5a2876f0d1ef26b76755749f978d46e4666013dd Author: Benjamin Block Date: Fri Oct 25 18:12:49 2019 +0200 scsi: zfcp: introduce sysfs interface to read the local B2B-Credit In addition to the diagnostic data from the local SFP transceiver this patch adds an interface to read the advertised buffer-to-buffer credit from the local FC_Port. With this patch the userspace-interface will only read data stored in the corresponding "diagnostic buffer" (that was stored during completion of a previous Exchange Config Data command). Implicit updating will follow later in this series. Link: https://lore.kernel.org/r/8a53aef87b53c50cfb1a3425b799bacb6f82b832.1572018132.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 8155eb0785279728b6b2e29aba2ca52d16aa526f Author: Benjamin Block Date: Fri Oct 25 18:12:48 2019 +0200 scsi: zfcp: implicitly refresh port-data diagnostics when reading sysfs This patch adds implicit updates to the sysfs entries that read the diagnostic data stored in the "caching buffer" for Exchange Port Data. An update is triggered once the buffer is older than ZFCP_DIAG_MAX_AGE milliseconds (5s). This entails sending an Exchange Port Data command to the FCP-Channel, and during its ingress path updating the cached data and the timestamp. To prevent multiple concurrent userspace-applications from triggering this update in parallel we synchronize all of them using a wait-queue (waiting threads are interruptible; the updating thread is not). Link: https://lore.kernel.org/r/c145b5cfc99a63b6a018b1184fbd27bb09c955f5.1572018132.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 6028f7c4cd87cac13481255d7e35dd2c9207ecae Author: Benjamin Block Date: Fri Oct 25 18:12:47 2019 +0200 scsi: zfcp: introduce sysfs interface for diagnostics of local SFP transceiver This adds an interface to read the diagnostics of the local SFP transceiver of an FCP-Channel from userspace. This comes in the form of new sysfs entries that are attached to the CCW device representing the FCP device. Each type of data gets its own sysfs entry; the whole collection of entries is pooled into a new child-directory of the CCW device node: "diagnostics". Adds sysfs entries for: * sfp_invalid: boolean value evaluating to whether the following 5 fields are invalid; {0, 1}; 1 - invalid * temperature: transceiver temp.; unit 1/256°C; range [-128°C, +128°C] * vcc: supply voltage; unit 100μV; range [0, 6.55V] * tx_bias: transmitter laser bias current; unit 2μA; range [0, 131mA] * tx_power: coupled TX output power; unit 0.1μW; range [0, 6.5mW] * rx_power: received optical power; unit 0.1μW; range [0, 6.5mW] * optical_port: boolean value evaluating to whether the FCP-Channel has an optical port; {0, 1}; 1 - optical * fec_active: boolean value evaluating to whether 16G FEC is active; {0, 1}; 1 - active * port_tx_type: nibble describing the port type; {0, 1, 2, 3}; 0 - unknown, 1 - short wave, 2 - long wave LC 1310nm, 3 - long wave LL 1550nm * connector_type: two bits describing the connector type; {0, 1}; 0 - unknown, 1 - SFP+ This is only supported if the FCP-Channel in turn supports reporting the SFP Diagnostic Data, otherwise read() on these new entries will return EOPNOTSUPP (this affects only adapters older than FICON Express8S, on Mainframe generations older than z14). Other possible errors for read() include ENOLINK, ENODEV and ENOMEM. With this patch the userspace-interface will only read data stored in the corresponding "diagnostic buffer" (that was stored during completion of an previous Exchange Port Data command). Implicit updating will follow later in this series. Link: https://lore.kernel.org/r/1f9cce7c829c881e7d71a3f10c5b57f3dd84ab32.1572018132.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit a10a61e807b0a226b78e2041843cbf0521bd0c35 Author: Benjamin Block Date: Fri Oct 25 18:12:46 2019 +0200 scsi: zfcp: support retrieval of SFP Data via Exchange Port Data A new FCP channel feature allows us to read the diagnostics from our local SFP transceivers. To make use of that add a flag (FSF_FEATURE_REQUEST_SFP_DATA) to the feature-set we request from the FCP channel. Whether the channel actually implements this can be determined via an other new flag (FSF_FEATURE_REPORT_SFP_DATA), that is set in the adapter_features field of the adapter structure after Exchange Config Data finished. Also add the corresponding definitions in the QTCB Bottom for Exchange Port Data. These new definitions are only valid, if FSF_FEATURE_REPORT_SFP_DATA is set. Link: https://lore.kernel.org/r/ee1eba4de71eb06b4d82207ad4f428429346156f.1572018132.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 088210233e6fc039fd2c0bfe44b06bb94328d09e Author: Benjamin Block Date: Fri Oct 25 18:12:45 2019 +0200 scsi: zfcp: add diagnostics buffer for exchange config data In the same vein as the previous patch, add diagnostic data capture for the Exchange Config Data command. Link: https://lore.kernel.org/r/7d8ac0a6cad403fa8f8b888693476a84e80a277b.1572018131.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 7e418833e68948cb9ed15262889173b7db2960cb Author: Benjamin Block Date: Fri Oct 25 18:12:44 2019 +0200 scsi: zfcp: diagnostics buffer caching and use for exchange port data The FCP channel exposes two central interfaces to receive information about the local FCP-Adapter/-Port: Exchange Port and Exchange Config Data. Using these commands can negatively impact the adapter if we allow them to be sent at a very high rate. The later parts of this patchset will introduce new user-interfaces to receive more diagnostics from the adapter. To prevent any negative impact from using those, this patch adds a simple caching-mechanism that will prevent a malicious/faulty userspace-application from generating an abnormal high amount of Exchange Port/Config Data traffic. Relevant diagnostic data that is received via Exchange Config/Port Data is cached in buffers associated with the corresponding adapter-struct. Each buffer is associated with a timestamp that signals how old the data is, and, added via a following patch in this series, lets userspace-interfaces determine when the data is too old and needs to be updated. Buffer-updates are made during the normal response path of the corresponding command. With this patch only the output of the Exchange Port Data command is captured. Link: https://lore.kernel.org/r/054ca020ce0a53dc0d9176428bea373898944e6a.1572018130.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 92953c6e0aa77d4febcca6dd691e8192910c8a28 Author: Benjamin Block Date: Fri Oct 25 18:12:43 2019 +0200 scsi: zfcp: signal incomplete or error for sync exchange config/port data Adds a new FSF-Request status flag (ZFCP_STATUS_FSFREQ_XDATAINCOMPLETE) that signal that the data received using Exchange Config Data or Exchange Port Data was incomplete. This new flags is set in the respective handlers during the response path. With this patch, only the synchronous FSF-functions for each command got support for the new flag, otherwise it is transparent. Together with this new flag and already existing status flags the synchronous FSF-functions are extended to now detect whether the received data is complete, incomplete or completely invalid (this includes cases where a command ran into a timeout). This is now signaled back to the caller, where previously only failures on the request path would result in a bad return-code. For complete data the return-code remains 0. For incomplete data a new return-code -EAGAIN is added to the function-interface. For completely invalid data the already existing return-code -EIO is reused - formerly this was used to signal failures on the request path. Existing callers of the FSF-functions are adjusted so that they behave as before for return-code 0 and -EAGAIN, to not change the user-interface. As -EIO existed all along, it was already exposed to the user - and needed handling - and will now also be exposed in this new special case. Link: https://lore.kernel.org/r/e14f0702fa2b00a4d1f37c7981a13f2dd1ea2c83.1572018130.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 7b10db555257d1248398643a23e10cf36b50d516 Author: YueHaibing Date: Mon Oct 28 21:25:56 2019 +0800 scsi: lpfc: Make lpfc_debugfs_ras_log_data static Fix sparse warning: drivers/scsi/lpfc/lpfc_debugfs.c:2083:1: warning: symbol 'lpfc_debugfs_ras_log_data' was not declared. Should it be static? Link: https://lore.kernel.org/r/20191028132556.16272-1-yuehaibing@huawei.com Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: James Smart Signed-off-by: Martin K. Petersen commit c3e5aac3e2f501ad4fcb03fed0e32a6f009faea2 Author: Saurav Girepunje Date: Sun Oct 27 01:17:17 2019 +0530 scsi: lpfc: Fix NULL check before mempool_destroy is not needed mempool_destroy has taken null pointer check into account. Remove the redundant check. Link: https://lore.kernel.org/r/20191026194712.GA22249@saurav Signed-off-by: Saurav Girepunje Reviewed-by: James Smart Signed-off-by: Martin K. Petersen commit 5792a0e81678da41f05bb724ebd20f134604fa15 Author: James Smart Date: Fri Oct 25 11:43:42 2019 -0700 scsi: lpfc: fix spelling error in MAGIC_NUMER_xxx convert MAGIC_NUMER_xxx to MAGIC_NUMBER_xxx Link: https://lore.kernel.org/r/20191025184342.6623-1-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 9e2edb41c3d4cab6da0eedcc07ae04758af62ab8 Author: James Smart Date: Fri Oct 25 11:25:30 2019 -0700 scsi: lpfc: fix build error of lpfc_debugfs.c for vfree/vmalloc lpfc_debufs.c was missing include of vmalloc.h when compiled on PPC. Add missing header. Link: https://lore.kernel.org/r/20191025182530.26653-1-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 1ac81f4aa5ec37282257bede2e85c6599a96c6ed Author: Fabio Estevam Date: Thu Oct 24 19:59:11 2019 -0300 ARM: imx_v6_v7_defconfig: Enable CONFIG_TOUCHSCREEN_DA9052 Enable the CONFIG_TOUCHSCREEN_DA9052 option, so that touchscreen can be functional by default on imx53-qsb. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit e115e86af4c822d8ace20db3929a7bbdc60d6941 Author: Mihaela Martinas Date: Wed Oct 16 15:48:27 2019 +0300 arm64: defconfig: Enable configs for S32V234 Enable support for the S32V234 SoC, including the previously added UART driver. Signed-off-by: Mihaela Martinas Signed-off-by: Adrian.Nitu Signed-off-by: Stoica Cosmin-Stefan Signed-off-by: Stefan-Gabriel Mirea Signed-off-by: Shawn Guo commit 51c27f42fccc1918fa792c6f2d5a40554cb14605 Author: Anson Huang Date: Mon Oct 7 09:41:49 2019 +0800 arm64: defconfig: Enable CONFIG_KEYBOARD_IMX_SC_KEY as module Select CONFIG_KEYBOARD_IMX_SC_KEY as module by default to support i.MX8QXP scu key driver. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 589531a027a3dc43f7c59fd8f13e33c9a17b13c9 Author: Bartosz Golaszewski Date: Mon Oct 21 14:44:28 2019 +0200 MAINTAINERS: update the list of maintained files for max77650 The DT bindings for MAX77650 MFD have now been converted to YAML. Update the MAINTAINERS entry for this set of drivers. Signed-off-by: Bartosz Golaszewski Signed-off-by: Rob Herring commit b1184bab3b34841eb1c66d24ebc3cd2b769f9578 Author: Bartosz Golaszewski Date: Mon Oct 21 14:44:27 2019 +0200 dt-bindings: mfd: max77650: convert the binding document to yaml Convert the binding document for MAX77650 core MFD module to YAML. Signed-off-by: Bartosz Golaszewski Signed-off-by: Rob Herring commit 3d585ad8a66e772329081e6b40a8aab0f8fe08c2 Author: Bartosz Golaszewski Date: Mon Oct 21 14:44:26 2019 +0200 dt-bindings: leds: max77650: convert the binding document to yaml Convert the binding document for MAX77650 LED module to YAML. Signed-off-by: Bartosz Golaszewski Signed-off-by: Rob Herring commit dfd4e3dfd2a6f6d1433138b19ecf7951518daff9 Author: Bartosz Golaszewski Date: Mon Oct 21 14:44:25 2019 +0200 dt-bindings: power: max77650: convert the binding document to yaml Convert the binding document for MAX77650 charger module to YAML. Signed-off-by: Bartosz Golaszewski Acked-by: Sebastian Reichel Signed-off-by: Rob Herring commit a62ffedee2ef6c7d39e5ef4fff30a4cb40fbfd69 Author: Bartosz Golaszewski Date: Mon Oct 21 14:44:24 2019 +0200 dt-bindings: regulator: max77650: convert the binding document to yaml Convert the binding document for MAX77650 regulator module to YAML. Signed-off-by: Bartosz Golaszewski Acked-by: Mark Brown Signed-off-by: Rob Herring commit b8fee80207ef87588e90e193cb6f64cb13ce5d5b Author: Bartosz Golaszewski Date: Mon Oct 21 14:44:23 2019 +0200 dt-bindings: input: max77650: convert the binding document to yaml Convert the binding document for MAX77650 onkey module to YAML. Signed-off-by: Bartosz Golaszewski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit b00e14c536574fb3e45aa0cf899e67fc3ac51d06 Author: Fabrizio Castro Date: Wed Oct 23 10:15:06 2019 +0100 dt-bindings: ata: sata_rcar: Add r8a774b1 support Document SATA support for the RZ/G2N, no driver change required. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit 4345dda5a58a9c0803a80e503f2831b31222cb2b Author: Krzysztof Kozlowski Date: Mon Oct 21 18:13:51 2019 +0200 dt-bindings: sram: Merge Socionext SRAM bindings into generic The Socionext SRAM bindings list only compatible so integrate them into generic SRAM bindings schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 517bcde22c214612b86f4795e2c9d7df9b08cd54 Author: Krzysztof Kozlowski Date: Mon Oct 21 18:13:50 2019 +0200 dt-bindings: sram: Merge Allwinner SRAM bindings into generic The Allwinner SRAM bindings list only compatible so integrate them into generic SRAM bindings schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 1a4d47af071453c65e27f2f6e32084a3550c4f16 Author: Krzysztof Kozlowski Date: Mon Oct 21 18:13:49 2019 +0200 dt-bindings: sram: Merge Rockchip SRAM bindings into generic The Rockchip SRAM bindings list only compatible so integrate them into generic SRAM bindings schema. Signed-off-by: Krzysztof Kozlowski Acked-by: Heiko Stuebner Signed-off-by: Rob Herring commit 0759b09eadd0d9a17b76e0e6dcbc4b0f9b559fc0 Author: Krzysztof Kozlowski Date: Mon Oct 21 18:13:48 2019 +0200 dt-bindings: sram: Merge Renesas SRAM bindings into generic The Renesas SRAM bindings list only compatible so integrate them into generic SRAM bindings schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 0f0bbb7986c4ee8d5223650217719c4432789c1f Author: Krzysztof Kozlowski Date: Mon Oct 21 18:13:47 2019 +0200 dt-bindings: sram: Merge Amlogic SRAM bindings into generic The Amlogic SRAM bindings list only compatible so integrate them into generic SRAM bindings schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit e1679513f9ee831fd777f599f19967a1fd61a7aa Author: Krzysztof Kozlowski Date: Mon Oct 21 18:13:46 2019 +0200 dt-bindings: sram: Merge Samsung SRAM bindings into generic The Samsung SRAM bindings list only compatible so integrate them into generic SRAM bindings schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit f69629919942a0dd3bb8c3f2d8493056c18ec9e2 Author: Krzysztof Kozlowski Date: Mon Oct 21 18:13:45 2019 +0200 dt-bindings: sram: Convert SRAM bindings to json-schema Convert generic mmio-sram bindings to DT schema format using json-schema. Require the address/size cells to be 1, not equal to root node. This also fixes the check for clocks property to be in main root node instead of children. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit d5a721c96a4411d3f35545b694fc9794fbbfc98e Author: YueHaibing Date: Fri Oct 25 17:30:30 2019 +0800 atm: remove unneeded semicolon remove unneeded semicolon. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit f95f96a4946ac9a38acf85f8421d8e9c5cbb516f Author: YueHaibing Date: Fri Oct 25 17:18:36 2019 +0800 sock: remove unneeded semicolon remove unneeded semicolon. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 11b3412cef89cb5c1937ddb744e84614a7b1f564 Author: YueHaibing Date: Fri Oct 25 17:13:08 2019 +0800 net: mediatek: remove unneeded semicolon remove unneeded semicolon. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit acf5133b1d27edca6aee2a82cb2ffb2bc7c58468 Author: YueHaibing Date: Fri Oct 25 17:09:48 2019 +0800 mlxsw: spectrum_buffers: remove unneeded semicolon Remove excess semicolon after closing parenthesis. Signed-off-by: YueHaibing Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit eb8b7077101c789c45f51d8889b91ff8034b3219 Merge: ebdcebcb8b64 23e8b470c778 Author: David S. Miller Date: Mon Oct 28 16:21:02 2019 -0700 Merge branch 'mv88e6xxx-Allow-config-of-ATU-hash-algorithm' Andrew Lunn says: ==================== mv88e6xxx: Allow config of ATU hash algorithm v2: Pass a pointer for where the hash should be stored, return a plain errno, or 0. Document the parameter. v3: Document type of parameter, and valid range Add break statements to default clause of switch Directly use ctx->val.vu8 v4: Consistently use devlink, not a mix of devlink and dl. Fix allocation of devlink priv Remove upper case from parameter name Make mask 16 bit wide. v5: Back to using the parameter name ATU_hash v6: Rebase net-next/master ==================== Signed-off-by: David S. Miller commit 23e8b470c7788da972d0be90d6ac20b4a2da2782 Author: Andrew Lunn Date: Fri Oct 25 01:03:52 2019 +0200 net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm. Some of the marvell switches have bits controlling the hash algorithm the ATU uses for MAC addresses. In some industrial settings, where all the devices are from the same manufacture, and hence use the same OUI, the default hashing algorithm is not optimal. Allow the other algorithms to be selected via devlink. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 6b297524234ccf3954b54609ab6bc2e8c4d3f677 Author: Andrew Lunn Date: Fri Oct 25 01:03:51 2019 +0200 net: dsa: Add support for devlink device parameters Add plumbing to allow DSA drivers to register parameters with devlink. To keep with the abstraction, the DSA drivers pass the ds structure to these helpers, and the DSA core then translates that to the devlink structure associated to the device. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit ebdcebcb8b646cbca8b5b6f01f6416394a3c77a9 Author: Heiner Kallweit Date: Fri Oct 25 00:30:38 2019 +0200 r8169: use helper rtl_hw_aspm_clkreq_enable also in rtl_hw_start_8168g_2 One place in the driver was left where the open-coded functionality hasn't been replaced with helper rtl_hw_aspm_clkreq_enable yet. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 360c09c01c5acf2bc44ca97670406d1ab8a8419d Author: Christoph Hellwig Date: Thu Oct 24 22:26:27 2019 -0700 xfs: consolidate preallocation in xfs_file_fallocate Remove xfs_zero_file_space and reorganize xfs_file_fallocate so that a single call to xfs_alloc_file_space covers all modes that preallocate blocks. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7a42c70ea0dd56b3ed747c1fcf9b96cc26c77774 Author: Christoph Hellwig Date: Thu Oct 24 22:26:27 2019 -0700 xfs: disable xfs_ioc_space for always COW inodes If we always have to write out of place preallocating blocks is pointless. We already check for this in the normal falloc path, but the check was missig in the legacy ALLOCSP path. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c7ccf10bb92e68d8eb09f1b9635df7fbce0190d9 Author: Bob Moore Date: Fri Oct 25 14:37:00 2019 -0700 ACPICA: Update version to 20191018 ACPICA commit 3d70fd4894824ed1e685f2d059ca22ccd9ac6163 Version 20191018. Link: https://github.com/acpica/acpica/commit/3d70fd48 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 45abdc9903e9eb75f754dd2faeaa1943b1df4806 Author: Erik Schmauss Date: Fri Oct 25 14:36:59 2019 -0700 ACPICA: debugger: remove leading whitespaces when converting a string to a buffer ACPICA commit 1b7228072f254a5b02625586ff7d561757b7fc2d By removing leading whitespaces, the conversion computes the correct number of elements in a given buffer or field encoding that contains leading whitespaces. Link: https://github.com/acpica/acpica/commit/1b722807 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 02b04f10b83639c41dc338e4d43652cab49748fc Author: Erik Schmauss Date: Fri Oct 25 14:36:58 2019 -0700 ACPICA: acpiexec: initialize all simple types and field units from user input ACPICA commit 367b363edc5fa1f93bbc14e4a1e05f34fef765a2 acpiexec allows a user to provide a file that indicates values to initialize named objects during table load with the -fi option. This can provide more accurate simulation by setting named objects to values found during OS runtime. Previously, this option only supported integer objects. This change adds user initialization support for field units, strings, buffers, and packages. Link: https://github.com/acpica/acpica/commit/367b363e Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 760935064252d7a897707539bc4fb84e31f11829 Author: Erik Schmauss Date: Fri Oct 25 14:36:57 2019 -0700 ACPICA: debugger: add field unit support for acpi_db_get_next_token ACPICA commit d509afa88e9415f13a3283c38ce9ee034634ae24 Since field unit data output from the debugger are now surrounded by braces '{', support has been added to acpi_db_get_next_token to recognize strings beginning with this character as a ACPI_TYPE_FIELD_UNIT. Link: https://github.com/acpica/acpica/commit/d509afa8 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 20d93fce00029d0409fc3afa433284a9445348f7 Author: Erik Schmauss Date: Fri Oct 25 14:36:56 2019 -0700 ACPICA: debugger: surround field unit output with braces '{' ACPICA commit 76ca57291d007d33087982a4b28cd1ee9bcd37a6 This helps differentiate the type of named objects between field units and buffers. In other words, without this symbol, it would be difficult to tell whether a particular named object is a buffer or a field unit. Link: https://github.com/acpica/acpica/commit/76ca5729 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 5fd033288a86676045d9e16243dfc5f988013371 Author: Erik Schmauss Date: Fri Oct 25 14:36:55 2019 -0700 ACPICA: debugger: add command to dump all fields of particular subtype In acpiexec, this can be invoked by typing "fields" followed by a number representing the address space ID of that field. Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit efcf9456c81cd06a9d973ab042bf768a27c5bb43 Author: Erik Schmauss Date: Fri Oct 25 14:36:54 2019 -0700 ACPICA: utilities: add flag to only display data when dumping buffers ACPICA commit fb18935fcf940c5854a055975c6b9ee31f0e1a5a Link: https://github.com/acpica/acpica/commit/fb18935f Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 1770093c5bed404ac69b04dc8b9e62a2c4db944a Author: Nikolaus Voss Date: Fri Oct 25 14:36:53 2019 -0700 ACPICA: make acpi_load_table() return table index ACPICA commit d1716a829d19be23277d9157c575a03b9abb7457 For unloading an ACPI table, it is necessary to provide the index of the table. The method intended for dynamically loading or hotplug addition of tables, acpi_load_table(), should provide this information via an optional pointer to the loaded table index. This patch fixes the table unload function of acpi_configfs. Reported-by: Andy Shevchenko Fixes: d06c47e3dd07f ("ACPI: configfs: Resolve objects on host-directed table loads") Link: https://github.com/acpica/acpica/commit/d1716a82 Signed-off-by: Nikolaus Voss Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Tested-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 42d939fadbfa96d2983c804bb1980699a6c1f221 Author: Bob Moore Date: Fri Oct 25 14:36:52 2019 -0700 ACPICA: Add new external interface, acpi_unload_table() ACPICA commit c69369cd9cf0134e1aac516e97d612947daa8dc2 Unload a table via the table_index. Link: https://github.com/acpica/acpica/commit/c69369cd Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit aaf7566f33d2090128528a77bf92f948de76c817 Author: Bob Moore Date: Fri Oct 25 14:36:51 2019 -0700 ACPICA: More Clang changes ACPICA commit 54b3aefb5de860306951c8c3339b1c37dcdf1b39 V8.0.1: Fixed all "dead assignment" warnings. Link: https://github.com/acpica/acpica/commit/54b3aefb Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 197aba2090e357afe1637cf9b27f44fa06cec00b Author: Bob Moore Date: Fri Oct 25 14:36:50 2019 -0700 ACPICA: Win OSL: Replace get_tick_count with get_tick_count64 ACPICA commit 7bc16c650317001bc82d4bae227b888a49c51f5e Avoid possible overflow from get_tick_count. Also, cast math using ACPI_100NSEC_PER_MSEC to uint64. Link: https://github.com/acpica/acpica/commit/7bc16c65 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit edc5935ec777c23d66df5d47de53b4a2c8f16d0f Author: Bob Moore Date: Fri Oct 25 14:36:49 2019 -0700 ACPICA: Results from Clang ACPICA commit 1f08279b3eb13f17004159c28c391a390cd68feb Changes/fixes From Clang V5.0.1. Mostly "set but never read" warnings. Link: https://github.com/acpica/acpica/commit/1f08279b Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 7dd6c14b52ab959f8f83b4c77818b67f17c28259 Merge: 7a9eff98a55d 29bb5e8337ca Author: David S. Miller Date: Mon Oct 28 13:58:20 2019 -0700 Merge branch 'net-dsa-b53-Add-support-for-MDB' Florian Fainelli says: ==================== net: dsa: b53: Add support for MDB This patch series adds support for programming multicast database entries on b53 and bcm_sf2. This is extracted from a previously submitted series that added managed mode support, but these patches are usable in isolation. The larger series still needs to be reworked. ==================== Signed-off-by: David S. Miller commit 29bb5e8337caf2e3d9802ee6a6804561f125bfcf Author: Florian Fainelli Date: Thu Oct 24 12:45:08 2019 -0700 net: dsa: bcm_sf2: Wire up MDB operations Leverage the recently add b53_mdb_{add,del,prepare} functions since they work as-is for bcm_sf2. Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit 5d65b64a3d97011796b225ce315b3ce0011551e7 Author: Florian Fainelli Date: Thu Oct 24 12:45:07 2019 -0700 net: dsa: b53: Add support for MDB In preparation for supporting IGMP snooping with or without the use of a bridge, add support within b53_common.c to program the ARL entries for multicast operations. The key difference is that a multicast ARL entry is comprised of a bitmask of enabled ports, instead of a port number. Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit 7a9eff98a55d814e46932b67a4f3b14fe287aab9 Merge: faf7b8b22bd1 a0c78337dd3a Author: David S. Miller Date: Mon Oct 28 13:44:26 2019 -0700 Merge branch 'mvpp2-improvements-in-rx-path' Matteo Croce says: ==================== mvpp2 improvements in rx path Refactor some code in the RX path to allow prefetching some data from the packet header. The first patch is only a refactor, the second one reduces the data synced, while the third one adds the prefetch. The packet rate improvement with the second patch is very small (1606 => 1620 kpps), while the prefetch bumps it up by 14%: 1620 => 1853 kpps. ==================== Signed-off-by: David S. Miller commit a0c78337dd3a4900bc8628a511131b5a0b1db42a Author: Matteo Croce Date: Thu Oct 24 19:24:58 2019 +0200 mvpp2: prefetch frame header When receiving traffic, eth_type_trans() is high up on the perf top list, because it's the first function which access the packet data. Move the DMA unmap a bit higher, and put a prefetch just after it, so we have more time to load the data into the cache. The packet rate increase is about 14% with a tc drop test: 1620 => 1853 kpps Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit e1921168bbd4810de4197446e52f652cd0dd9541 Author: Matteo Croce Date: Thu Oct 24 19:24:57 2019 +0200 mvpp2: sync only the received frame In the RX path we always sync against the maximum frame size for that pool. Do the DMA sync and the unmap separately, so we can only sync by the size of the received frame. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 7f7183af448ac55da9cc72bdbef6d140909fee83 Author: Matteo Croce Date: Thu Oct 24 19:24:56 2019 +0200 mvpp2: refactor frame drop routine Move some code down to remove a backward goto. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit faf7b8b22bd110d14b213bba045612f70e929bad Author: Geert Uytterhoeven Date: Thu Oct 24 17:31:55 2019 +0200 isdn: hfcsusb: Spelling and grammar fixes Fix misspellings of "endpoints", "configuration", and "device's". Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit 8ebed8ae49df685b558615a8b026159d3a398463 Author: Geert Uytterhoeven Date: Thu Oct 24 17:30:43 2019 +0200 tipc: Spelling s/enpoint/endpoint/ Fix misspelling of "endpoint". Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit e1b185491f739983b596804953586346e50351c9 Author: Geert Uytterhoeven Date: Thu Oct 24 17:23:23 2019 +0200 net: Fix various misspellings of "connect" Fix misspellings of "disconnect", "disconnecting", "connections", and "disconnected". Signed-off-by: Geert Uytterhoeven Acked-by: Kalle Valo Acked-by: Simon Horman Signed-off-by: David S. Miller commit c199ce4f9dd896c716aece33e6750be34aea1151 Author: Geert Uytterhoeven Date: Thu Oct 24 17:22:01 2019 +0200 net: Fix misspellings of "configure" and "configuration" Fix various misspellings of "configuration" and "configure". Signed-off-by: Geert Uytterhoeven Acked-by: Kalle Valo Signed-off-by: David S. Miller commit 953d57eba5192aab638f2d102e0ee7af0c7b970c Author: Chris Wilson Date: Mon Oct 28 20:30:12 2019 +0000 drm/i915/gem: Limit the blitter sizes to ensure low preemption latency Currently we insert a arbitration point every 128MiB during a blitter copy. At 8GiB/s, this is around 30ms. This is a little on the large side if we need to inject a high priority work, so reduced it down to 8MiB or roughly 1ms. v2: Don't forget both fill/copy. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191028203012.14566-1-chris@chris-wilson.co.uk commit 19c17b763f0598baa72210dd3e5235ca243f0b6c Author: Michal Wajdeczko Date: Mon Oct 28 16:45:20 2019 +0000 drm/i915/execlists: Use vfunc to check engine submission mode While processing CSB there is no need to look at GuC submission settings, just check if engine is configured for execlists mode. While today GuC submission is disabled it's settings are still based on modparam values that might not correctly reflect actual submission status in case of any fallback. Until that is fully fixed, use alternate method to confirm that engine really runs in execlists mode by comparing set_default_submission vfunc. v2: add other immediate use of new helper Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Janusz Krzysztofik Reviewed-by: Janusz Krzysztofik Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191028164520.31772-1-michal.wajdeczko@intel.com commit f0d532c43073c8622f63872e3b8f188fec24ab75 Author: Michal Vokáč Date: Thu Oct 24 15:46:58 2019 +0200 net: dsa: qca8k: Initialize the switch with correct number of ports Since commit 0394a63acfe2 ("net: dsa: enable and disable all ports") the dsa core disables all unused ports of a switch. In this case disabling ports with numbers higher than QCA8K_NUM_PORTS causes that some switch registers are overwritten with incorrect content. To fix this, initialize the dsa_switch->num_ports with correct number of ports. Fixes: 7e99e3470172 ("net: dsa: remove dsa_switch_alloc helper") Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 556f124fb30621df3089d624ac57f13744712753 Author: Colin Ian King Date: Thu Oct 24 11:32:18 2019 +0100 net: dsa: fix dereference on ds->dev before null check error Currently ds->dev is dereferenced on the assignments of pdata and np before ds->dev is null checked, hence there is a potential null pointer dereference on ds->dev. Fix this by assigning pdata and np after the ds->dev null pointer sanity check. Addresses-Coverity: ("Dereference before null check") Fixes: 7e99e3470172 ("net: dsa: remove dsa_switch_alloc helper") Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Reported-by: kbuild test robot Reported-by: Dan Carpenter Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit bb3dba330006fcf820136992afef64c3d2cdcc55 Merge: 036313316d3a 46870b2391d5 Author: Jason Gunthorpe Date: Mon Oct 28 16:44:35 2019 -0300 Merge branch 'odp_rework' into rdma.git for-next Jason Gunthorpe says: ==================== In order to hoist the interval tree code out of the drivers and into the mmu_notifiers it is necessary for the drivers to not use the interval tree for other things. This series replaces the interval tree with an xarray and along the way re-aligns all the locking to use a sensible SRCU model where the 'update' step is done by modifying an xarray. The result is overall much simpler and with less locking in the critical path. Many functions were reworked for clarity and small details like using 'imr' to refer to the implicit MR make the entire code flow here more readable. This also squashes at least two race bugs on its own, and quite possibily more that haven't been identified. ==================== Merge conflicts with the odp statistics patch resolved. * branch 'odp_rework': RDMA/odp: Remove broken debugging call to invalidate_range RDMA/mlx5: Do not race with mlx5_ib_invalidate_range during create and destroy RDMA/mlx5: Do not store implicit children in the odp_mkeys xarray RDMA/mlx5: Rework implicit ODP destroy RDMA/mlx5: Avoid double lookups on the pagefault path RDMA/mlx5: Reduce locking in implicit_mr_get_data() RDMA/mlx5: Use an xarray for the children of an implicit ODP RDMA/mlx5: Split implicit handling from pagefault_mr RDMA/mlx5: Set the HW IOVA of the child MRs to their place in the tree RDMA/mlx5: Lift implicit_mr_alloc() into the two routines that call it RDMA/mlx5: Rework implicit_mr_get_data RDMA/mlx5: Delete struct mlx5_priv->mkey_table RDMA/mlx5: Use a dedicated mkey xarray for ODP RDMA/mlx5: Split sig_err MR data into its own xarray RDMA/mlx5: Use SRCU properly in ODP prefetch Signed-off-by: Jason Gunthorpe commit 46870b2391d5163e84180e051fdabadd502d8b44 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:35 2019 -0300 RDMA/odp: Remove broken debugging call to invalidate_range invalidate_range() also obtains the umem_mutex which is being held at this point, so if this path were was ever called it would deadlock. Thus conclude the debugging never triggers and rework it into a simple WARN_ON and leave things as they are. While here add a note to explain how we could possibly get inconsistent page pointers. Link: https://lore.kernel.org/r/20191009160934.3143-16-jgg@ziepe.ca Signed-off-by: Jason Gunthorpe commit 09689703d29a3b75c510c198c3aca85d7d8b50c7 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:34 2019 -0300 RDMA/mlx5: Do not race with mlx5_ib_invalidate_range during create and destroy For creation, as soon as the umem_odp is created the notifier can be called, however the underlying MR may not have been setup yet. This would cause problems if mlx5_ib_invalidate_range() runs. There is some confusing/ulocked/racy code that might by trying to solve this, but without locks it isn't going to work right. Instead trivially solve the problem by short-circuiting the invalidation if there are not yet any DMA mapped pages. By definition there is nothing to invalidate in this case. The create code will have the umem fully setup before anything is DMA mapped, and npages is fully locked by the umem_mutex. For destroy, invalidate the entire MR at the HW to stop DMA then DMA unmap the pages before destroying the MR. This drives npages to zero and prevents similar racing with invalidate while the MR is undergoing destruction. Arguably it would be better if the umem was created after the MR and destroyed before, but that would require a big rework of the MR code. Fixes: 6aec21f6a832 ("IB/mlx5: Page faults handling infrastructure") Link: https://lore.kernel.org/r/20191009160934.3143-15-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit d561987f34f263dd176ccd8fb782cb153d72f441 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:33 2019 -0300 RDMA/mlx5: Do not store implicit children in the odp_mkeys xarray These mkeys are entirely internal and are never used by the HW for page fault. They should also never be used by userspace for prefetch. Simplify & optimize things by not including them in the xarray. Since the prefetch path can now never see a child mkey there is no need for the second synchronize_srcu() during imr destroy. Link: https://lore.kernel.org/r/20191009160934.3143-14-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 5256edcb98a14b11409a2d323f56a70a8b366363 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:32 2019 -0300 RDMA/mlx5: Rework implicit ODP destroy Use SRCU in a sensible way by removing all MRs in the implicit tree from the two xarrays (the update operation), then a synchronize, followed by a normal single threaded teardown. This is only a little unusual from the normal pattern as there can still be some work pending in the unbound wq that may also require a workqueue flush. This is tracked with a single atomic, consolidating the redundant existing atomics and wait queue. For understand-ability the entire ODP implicit create/destroy flow now largely exists in a single pair of functions within odp.c, with a few support functions for tearing down an unused child. Link: https://lore.kernel.org/r/20191009160934.3143-13-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit b70d785d237c0d3e4235c511f38f8ce64620f945 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:31 2019 -0300 RDMA/mlx5: Avoid double lookups on the pagefault path Now that the locking is simplified combine pagefault_implicit_mr() with implicit_mr_get_data() so that we sweep over the idx range only once, and do the single xlt update at the end, after the child umems are setup. This avoids double iteration/xa_loads plus the sketchy failure path if the xa_load() fails. Link: https://lore.kernel.org/r/20191009160934.3143-12-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 3389baa831b6a09e3c96e2a6283a1b952be2f0cd Author: Jason Gunthorpe Date: Wed Oct 9 13:09:30 2019 -0300 RDMA/mlx5: Reduce locking in implicit_mr_get_data() Now that the child MRs are stored in an xarray we can rely on the SRCU lock to protect the xa_load and use xa_cmpxchg on the slow allocation path to resolve races with concurrent page fault. This reduces the scope of the critical section of umem_mutex for implicit MRs to only cover mlx5_ib_update_xlt, and avoids taking a lock at all if the child MR is already in the xarray. This makes it consistent with the normal ODP MR critical section for umem_lock, and the locking approach used for destroying an unusued implicit child MR. The MLX5_IB_UPD_XLT_ATOMIC is no longer needed in implicit_get_child_mr() since it is no longer called with any locks. Link: https://lore.kernel.org/r/20191009160934.3143-11-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 423f52d65005e8f5067d94bd4f41d8a7d8388135 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:29 2019 -0300 RDMA/mlx5: Use an xarray for the children of an implicit ODP Currently the child leaves are stored in the shared interval tree and every lookup for a child must be done under the interval tree rwsem. This is further complicated by dropping the rwsem during iteration (ie the odp_lookup(), odp_next() pattern), which requires a very tricky an difficult to understand locking scheme with SRCU. Instead reserve the interval tree for the exclusive use of the mmu notifier related code in umem_odp.c and give each implicit MR a xarray containing all the child MRs. Since the size of each child is 1GB of VA, a 1 level xarray will index 64G of VA, and a 2 level will index 2TB, making xarray a much better data structure choice than an interval tree. The locking properties of xarray will be used in the next patches to rework the implicit ODP locking scheme into something simpler. At this point, the xarray is locked by the implicit MR's umem_mutex, and read can also be locked by the odp_srcu. Link: https://lore.kernel.org/r/20191009160934.3143-10-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 54375e7382952daded7002d1618eadaae859cecb Author: Jason Gunthorpe Date: Wed Oct 9 13:09:28 2019 -0300 RDMA/mlx5: Split implicit handling from pagefault_mr The single routine has a very confusing scheme to advance to the next child MR when working on an implicit parent. This scheme can only be used when working with an implicit parent and must not be triggered when working on a normal MR. Re-arrange things by directly putting all the single-MR stuff into one function and calling it in a loop for the implicit case. Simplify some of the error handling in the new pagefault_real_mr() to remove unneeded gotos. Link: https://lore.kernel.org/r/20191009160934.3143-9-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 9162420dde49c9a8f4819f28bf2d5c675fb12552 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:27 2019 -0300 RDMA/mlx5: Set the HW IOVA of the child MRs to their place in the tree Instead of rewriting all the IOVA's to 0 as things progress down the tree make the IOVA of the children equal to placement in the tree. This makes things easier to understand by keeping mmkey.iova == HW configuration. Link: https://lore.kernel.org/r/20191009160934.3143-8-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit c2edcd69351f681594a30b17b7fbc5259a038fb0 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:26 2019 -0300 RDMA/mlx5: Lift implicit_mr_alloc() into the two routines that call it This makes the routines easier to understand, particularly with respect the locking requirements of the entire sequence. The implicit_mr_alloc() had a lot of ifs specializing it to each of the callers, and only a very small amount of code was actually shared. Following patches will cause the flow in the two functions to diverge further. Link: https://lore.kernel.org/r/20191009160934.3143-7-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 3d5f3c54e7bc82a279c80c18087462c0ce00ba44 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:25 2019 -0300 RDMA/mlx5: Rework implicit_mr_get_data This function is intended to loop across each MTT chunk in the implicit parent that intersects the range [io_virt, io_virt+bnct). But it is has a confusing construction, so: - Consistently use imr and odp_imr to refer to the implicit parent to avoid confusion with the normal mr and odp of the child - Directly compute the inclusive start/end indexes by shifting. This is clearer to understand the intent and avoids any errors from unaligned values of addr - Iterate directly over the range of MTT indexes, do not make a loop out of goto - Follow 'success oriented flow', with goto error unwind - Directly calculate the range of idx's that need update_xlt - Ensure that any leaf MR added to the interval tree always results in an update to the XLT Link: https://lore.kernel.org/r/20191009160934.3143-6-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 74bddb3682f60df16ba24be335c94de348ba1b07 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:24 2019 -0300 RDMA/mlx5: Delete struct mlx5_priv->mkey_table No users are left, delete it. Link: https://lore.kernel.org/r/20191009160934.3143-5-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 806b101b2bfa800a9c779336b750bee39c7fb3b4 Author: Jason Gunthorpe Date: Wed Oct 9 13:09:23 2019 -0300 RDMA/mlx5: Use a dedicated mkey xarray for ODP There is a per device xarray storing mkeys that is used to store every mkey in the system. However, this xarray is now only read by ODP for certain ODP designated MRs (ODP, implicit ODP, MW, DEVX_INDIRECT). Create an xarray only for use by ODP, that only contains ODP related MKeys. This xarray is protected by SRCU and all erases are protected by a synchronize. This improves performance: - All MRs in the odp_mkeys xarray are ODP MRs, so some tests for is_odp() can be deleted. The xarray will also consume fewer nodes. - normal MR's are never mixed with ODP MRs in a SRCU data structure so performance sucking synchronize_srcu() on every MR destruction is not needed. - No smp_load_acquire(live) and xa_load() double barrier on read Due to the SRCU locking scheme care must be taken with the placement of the xa_store(). Once it completes the MR is immediately visible to other threads and only through a xa_erase() & synchronize_srcu() cycle could it be destroyed. Link: https://lore.kernel.org/r/20191009160934.3143-4-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 50211ec9443ff2e16db43f691dfcc0ef435cf45d Author: Jason Gunthorpe Date: Wed Oct 9 13:09:22 2019 -0300 RDMA/mlx5: Split sig_err MR data into its own xarray The locking model for signature is completely different than ODP, do not share the same xarray that relies on SRCU locking to support ODP. Simply store the active mlx5_core_sig_ctx's in an xarray when signature MRs are created and rely on trivial xarray locking to serialize everything. The overhead of storing only a handful of SIG related MRs is going to be much less than an xarray full of every mkey. Link: https://lore.kernel.org/r/20191009160934.3143-3-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Reviewed-by: Max Gurtovoy Signed-off-by: Jason Gunthorpe commit fb985e278a30224183fdf3d56e2f69cfdef88d4e Author: Jason Gunthorpe Date: Wed Oct 9 13:09:21 2019 -0300 RDMA/mlx5: Use SRCU properly in ODP prefetch When working with SRCU protected xarrays the xarray itself should be the SRCU 'update' point. Instead prefetch is using live as the SRCU update point and this prevents switching the locking design to use the xarray instead. To solve this the prefetch must only read from the xarray once, and hold on to the actual MR pointer for the duration of the async operation. Incrementing num_pending_prefetch delays destruction of the MR, so it is suitable. Prefetch calls directly to the pagefault_mr using the MR pointer and only does a single xarray lookup. All the testing if a MR is prefetchable or not is now done only in the prefetch code and removed from the pagefault critical path. Link: https://lore.kernel.org/r/20191009160934.3143-2-jgg@ziepe.ca Reviewed-by: Artemy Kovalyov Signed-off-by: Jason Gunthorpe commit 036313316d3a38bfde9ba49b3d00f73b7d8019d2 Merge: a52dc3a10095 d6d5df1db6e9 Author: Jason Gunthorpe Date: Mon Oct 28 16:36:29 2019 -0300 Merge tag 'v5.4-rc5' into rdma.git for-next Linux 5.4-rc5 For dependencies in the next patches Conflict resolved by keeping the delete of the unlock. Signed-off-by: Jason Gunthorpe commit 23b2c96fad21886c53f5e1a4ffedd45ddd2e85ba Author: Christian Brauner Date: Thu Oct 24 23:25:39 2019 +0200 seccomp: rework define for SECCOMP_USER_NOTIF_FLAG_CONTINUE Switch from BIT(0) to (1UL << 0). First, there are already two different forms used in the header, so there's no need to add a third. Second, the BIT() macros is kernel internal and afaict not actually exposed to userspace. Maybe there's some magic there I'm missing but it definitely causes issues when compiling a program that tries to use SECCOMP_USER_NOTIF_FLAG_CONTINUE. It currently fails in the following way: # github.com/lxc/lxd/lxd /usr/bin/ld: $WORK/b001/_x003.o: in function `__do_user_notification_continue': lxd/main_checkfeature.go:240: undefined reference to `BIT' collect2: error: ld returned 1 exit status Switching to (1UL << 0) should prevent that and is more in line what is already done in the rest of the header. Cc: Kees Cook Cc: Andy Lutomirski Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20191024212539.4059-1-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit 2f4ecf68a048de44d72157d637bf9cbbbdb357b0 Author: Vineet Gupta Date: Tue Sep 10 15:38:10 2019 -0700 ARC: mm: tlb flush optim: elide redundant uTLB invalidates for MMUv3 For MMUv3 (and prior) the flush_tlb_{range,mm,page} API use the MMU TLBWrite cmd which already nukes the entire uTLB, so NO need for additional IVUTLB cmd from utlb_invalidate() - hence this patch local_flush_tlb_all() is special since it uses a weaker TLBWriteNI cmd (prec commit) to shoot down JTLB, hence we retain the explicit uTLB flush Signed-off-by: Vineet Gupta commit 1355ea2e603d76af6b1381873e37b1aec22a18a0 Author: Vineet Gupta Date: Sat Oct 17 16:54:14 2015 +0530 ARC: mm: tlb flush optim: elide repeated uTLB invalidate in loop The unconditional full TLB flush (on say ASID rollover) iterates over each entry and uses TLBWrite to zero it out. TLBWrite by design also invalidates the uTLBs thus we end up invalidating it as many times as numbe rof entries (512 or 1k) Optimize this by using a weaker TLBWriteNI cmd in loop, which doesn't tinker with uTLBs and an explicit one time IVUTLB, outside the loop to invalidate them all once. And given the optimiztion, the IVUTLB is now needed on MMUv4 too where the uTLBs and JTLBs are otherwise coherent given the TLBInsertEntry / TLBDeleteEntry commands Signed-off-by: Vineet Gupta commit ad4c40e937f6d6a08a579c4a78206039618426b7 Author: Vineet Gupta Date: Tue Nov 17 10:10:29 2015 +0530 ARC: mm: tlb flush optim: Make TLBWriteNI fallback to TLBWrite if not available TLBWriteNI was introduced in MMUv2 (to not invalidate uTLBs in Fast Path TLB Refill Handler). To avoid #ifdef'ery make it fallback to TLBWrite availabel on all MMUs. This will also help with next change Signed-off-by: Vineet Gupta commit f4e2f7cc6999943e0a649cbc4618428181aad58f Author: Vineet Gupta Date: Thu Oct 29 15:47:57 2015 +0530 ARC: mm: TLB Miss optim: avoid re-reading ECR For setting PTE Dirty bit, reuse the prior test for ST miss. No need to reload ECR and test for ST cause code as the prev condition code is still valid (uncloberred) Signed-off-by: Vineet Gupta commit 0fb1f35ed9cc2115a88cc73a02e56d288bf2aa8f Author: Vineet Gupta Date: Wed Feb 11 18:37:43 2015 +0530 ARCv2: mm: TLB Miss optim: Use double world load/stores LDD/STD Signed-off-by: Vineet Gupta commit cfd9d70a855edf6adb37d0ed88be9e35274dbe49 Author: Vineet Gupta Date: Thu Nov 13 19:27:24 2014 +0530 ARCv2: mm: TLB Miss optim: SMP builds can cache pgd pointer in mmu scratch reg ARC700 exception (and intr handling) didn't have auto stack switching thus had to rely on stashing a reg temporarily (to free it up) at a known place in memory, allowing to code up the low level stack switching. This however was not re-entrant in SMP which thus had to repurpose the per-cpu MMU SCRATCH DATA register otherwise used to "cache" the task pdg pointer (vs. reading it from mm struct) The newer HS cores do have auto-stack switching and thus even SMP builds can use the MMU SCRATCH reg as originally intended. This patch fixes the restriction to ARC700 SMP builds only Signed-off-by: Vineet Gupta commit 7b491c0b62594a21cab357e0118603830a500de3 Author: Eugeniy Paltsev Date: Wed Oct 23 15:44:17 2019 +0300 ARC: nSIM_700: remove unused network options We have snps,arc-emac enabled in nSIM_700. It's obsolete and it's not used anymore so remove its device tree node and disable unused network options in defconfig. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 9c6375f77b09446e6781770dc49347f77d679496 Author: Eugeniy Paltsev Date: Wed Oct 23 15:44:16 2019 +0300 ARC: nSIM_700: switch to DW UART usage Switch nsim_700_defconfig to dwuart for consistent uart settings for all nSIM configurations. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 1681baa713aa138d3f0f77f05c3de1cd6416c7d6 Author: Eugeniy Paltsev Date: Wed Oct 23 15:44:15 2019 +0300 ARC: merge HAPS-HS with nSIM-HS configs Starting from nSIM 2019.06 is possible to use DW UART instead of ARC UART. That allows us to merge "nsim_hs" with "haps_hs" and "nsim_hs_smp" with "haps_hs_smp" with minor changes which were done in previous commits. We eliminate nsim_hs_defconfig and nsim_hs_smp_defconfig and leave haps_hs_defconfig and haps_hs_smp_defconfig which can be used on HAPS / nSIM / ZEBU / QEMU platforms without additional changes in Linux kernel. For nSIM we should now use UART property values "-prop=nsim_mem-dev=uart0,kind=dwuart,base=0xf0000000" instead of previously used "-prop=nsim_mem-dev=uart0,base=0xc0fc1000" "use_connect" and "irq" values of UART property remains untouched. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 8ae5bb05d7f4777955ab4392d5b4e14d214d1696 Author: Eugeniy Paltsev Date: Wed Oct 23 15:44:14 2019 +0300 ARC: HAPS: cleanup defconfigs from unused ETH drivers We have multiple vendors ethernet drivers enabled in haps_hs and haps_hs_smp defconfig. The only one we possibly require is VIRTIO_NET. So disable unused ones via disabling entire CONFIG_ETHERNET which controls all vendor-specific ethernet drivers. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 14fa486f5ae3fda7de0d05608f0f829a6e7298ed Author: Eugeniy Paltsev Date: Wed Oct 23 15:44:13 2019 +0300 ARC: HAPS: add HIGHMEM memory zone to DTS This is required as a preparation of merging nSIM and HASP defonfig and device tree. As we have HIGHMEM disabled in both HAPS and nSIM defconfigs this doesn't lead to any functional change. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 3696fc9774c54e0599fe2d85e84211f26eead8b8 Author: Eugeniy Paltsev Date: Wed Oct 23 15:44:12 2019 +0300 ARC: HAPS: use same UART configuration everywhere For some reason we use ns8250 UART compatible on UP HAPS configuration and ns16550a (which is ns8250 with FIFO support) on SMP HAPS configuration. Given that we have same UART IP with same IP configuration on both HAPS configuration use ns16550a compatible everywhere. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 4c36543e50a19989d12a39115ad7aeb2953027fa Author: Eugeniy Paltsev Date: Wed Oct 23 15:44:11 2019 +0300 ARC: HAPS: cleanup defconfigs from unused IO-related options We don't have any peripherals on HAPS which may require FB or input_devices support. So get rid of them. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit ea25a153ee06bd1d17c7eff9e97d09dd9191f6e4 Author: Eugeniy Paltsev Date: Wed Oct 23 15:44:10 2019 +0300 ARC: regenerate nSIM and HAPS defconfigs No functional change intended. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit a52dc3a100958f4bf5e921067ba626c2caf8e55f Author: Bryan Tan Date: Mon Oct 28 18:14:52 2019 +0000 RDMA/vmw_pvrdma: Use resource ids from physical device if available This change allows the RDMA stack to use physical resource numbers if they are passed up from the device. This is accomplished by separating the concept of the QP number from the QP handle. Previously, the two were the same, as the QP number was exposed to the guest and also used to reference a virtual QP in the device backend. With physical resource numbers exposed, the QP number given to the guest is the number assigned from the physical HCA's QP, while the QP handle is still the internal handle used to reference a virtual QP. Regardless of whether the device is exposing physical ids, the driver will still try to pick up the QP handle from the backend if possible. The MR keys exposed to the guest will also be the MR keys created by the physical HCA, instead of virtual MR keys. The distinction between handle and keys is already present for MRs so there is no need to do anything special here. A new version of the create QP response has been added to the device API to pass up the QP number and handle. The driver will also report these to userspace in the udata response if userspace supports it or not create the queuepair if not. I also had to do a refactor of the destroy qp code to reuse it if we fail to copy to userspace. Link: https://lore.kernel.org/r/20191028181444.19448-1-aditr@vmware.com Reviewed-by: Jorgen Hansen Signed-off-by: Adit Ranadive Signed-off-by: Bryan Tan Signed-off-by: Jason Gunthorpe commit 1edd28b7e85d51996885d1e4700ccddd4270c7bb Author: Atish Patra Date: Wed Oct 9 15:00:57 2019 -0700 RISC-V: Remove unsupported isa string info print /proc/cpuinfo should just print all the isa string as an information instead of determining what is supported or not. ELF hwcap can be used by the userspace to figure out that. Simplify the isa string printing by removing the unsupported isa string print and all related code. The relevant discussion can be found at http://lists.infradead.org/pipermail/linux-riscv/2019-September/006702.html Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Link: http://lists.infradead.org/pipermail/linux-riscv/2019-September/006702.html Signed-off-by: Paul Walmsley commit c9121262d57b8a3be4f08073546436ba0128ca6a Author: Bart Van Assche Date: Fri Oct 25 15:58:30 2019 -0700 RDMA/core: Set DMA parameters correctly The dma_set_max_seg_size() call in setup_dma_device() does not have any effect since device->dev.dma_parms is NULL. Fix this by initializing device->dev.dma_parms first. Link: https://lore.kernel.org/r/20191025225830.257535-5-bvanassche@acm.org Fixes: d10bcf947a3e ("RDMA/umem: Combine contiguous PAGE_SIZE regions in SGEs") Signed-off-by: Bart Van Assche Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit a401fb819cd6586c2c983dc199be4a9b44c30661 Author: Bart Van Assche Date: Fri Oct 25 15:58:29 2019 -0700 RDMA/siw: Increase DMA max_segment_size parameter Increase the DMA max_segment_size parameter from 64 KB to 2 GB. Link: https://lore.kernel.org/r/20191025225830.257535-4-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 97458fd510917f142c417245fa5701a892ce69d7 Author: Bart Van Assche Date: Fri Oct 25 15:58:28 2019 -0700 RDMA/rxe: Increase DMA max_segment_size parameter Increase the DMA max_segment_size parameter from 64 KB to 2 GB. Link: https://lore.kernel.org/r/20191025225830.257535-3-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit ecdfdfdbe4d4c74029f2b416b7ee6d0aeb56364a Author: Bart Van Assche Date: Fri Oct 25 15:58:27 2019 -0700 RDMA/core: Fix ib_dma_max_seg_size() If dev->dma_device->params == NULL then the maximum DMA segment size is 64 KB. See also the dma_get_max_seg_size() implementation. This patch fixes the following kernel warning: DMA-API: infiniband rxe0: mapping sg segment longer than device claims to support [len=126976] [max=65536] WARNING: CPU: 4 PID: 4848 at kernel/dma/debug.c:1220 debug_dma_map_sg+0x3d9/0x450 RIP: 0010:debug_dma_map_sg+0x3d9/0x450 Call Trace: srp_queuecommand+0x626/0x18d0 [ib_srp] scsi_queue_rq+0xd02/0x13e0 [scsi_mod] __blk_mq_try_issue_directly+0x2b3/0x3f0 blk_mq_request_issue_directly+0xac/0xf0 blk_insert_cloned_request+0xdf/0x170 dm_mq_queue_rq+0x43d/0x830 [dm_mod] __blk_mq_try_issue_directly+0x2b3/0x3f0 blk_mq_request_issue_directly+0xac/0xf0 blk_mq_try_issue_list_directly+0xb8/0x170 blk_mq_sched_insert_requests+0x23c/0x3b0 blk_mq_flush_plug_list+0x529/0x730 blk_flush_plug_list+0x21f/0x260 blk_mq_make_request+0x56b/0xf20 generic_make_request+0x196/0x660 submit_bio+0xae/0x290 blkdev_direct_IO+0x822/0x900 generic_file_direct_write+0x110/0x200 __generic_file_write_iter+0x124/0x2a0 blkdev_write_iter+0x168/0x270 aio_write+0x1c4/0x310 io_submit_one+0x971/0x1390 __x64_sys_io_submit+0x12a/0x390 do_syscall_64+0x6f/0x2e0 entry_SYSCALL_64_after_hwframe+0x49/0xbe Link: https://lore.kernel.org/r/20191025225830.257535-2-bvanassche@acm.org Cc: Fixes: 0b5cb3300ae5 ("RDMA/srp: Increase max_segment_size") Signed-off-by: Bart Van Assche Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 0edefddbae396e50eb7887d279d0c4bb4d7a6384 Author: Bernard Metzler Date: Fri Oct 25 16:29:03 2019 +0200 RDMA/siw: Fix post_recv QP state locking Do not release qp state lock if not previously acquired. Fixes: cf049bb31f71 ("RDMA/siw: Fix SQ/RQ drain logic") Link: https://lore.kernel.org/r/20191025142903.20625-1-bmt@zurich.ibm.com Reported-by: Dan Carpenter Signed-off-by: Bernard Metzler Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4134b762eb133787273500101223e10728c154cd Author: Sylwester Nawrocki Date: Mon Oct 28 16:15:34 2019 +0100 ARM: exynos: Enable exynos-asv driver for ARCH_EXYNOS Enable exynos-asv driver for Exynos 32-bit SoCs. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit 5212c3fda2225af66a6a83afd9eb0a6f0c80b99c Author: Potnuri Bharat Teja Date: Fri Oct 25 16:27:02 2019 +0530 RDMA/iw_cxgb4: Report correct port speed/width Query speed/width from corresponding netdev. Link: https://lore.kernel.org/r/1572001022-4533-1-git-send-email-bharat@chelsio.com Signed-off-by: Potnuri Bharat Teja Signed-off-by: Jason Gunthorpe commit 8301ae822d8d502b0ecc4b1c557221ecc6d97815 Merge: 346f6a4636f6 bfe298745afc Author: Catalin Marinas Date: Mon Oct 28 17:02:56 2019 +0000 Merge branch 'for-next/entry-s-to-c' into for-next/core Move the synchronous exception paths from entry.S into a C file to improve the code readability. * for-next/entry-s-to-c: arm64: entry-common: don't touch daif before bp-hardening arm64: Remove asmlinkage from updated functions arm64: entry: convert el0_sync to C arm64: entry: convert el1_sync to C arm64: add local_daif_inherit() arm64: Add prototypes for functions called by entry.S arm64: remove __exception annotations commit 02fb29882d5ccfad352a310cc6fb9ad9d6daad70 Author: Sylwester Nawrocki Date: Mon Oct 28 16:20:48 2019 +0100 soc: samsung: chipid: Drop "syscon" compatible requirement As we dropped the requirement of "syscon" compatible in the chipid nodes rework code acquiring the regmap to use device_node_to_regmap() rather than syscon_node_to_regmap(). Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit 24e412c1e00ebfe73619e6b88cbc26c2c7d41b85 Author: Michal Kalderon Date: Sun Oct 27 22:04:51 2019 +0200 RDMA/qedr: Fix memory leak in user qp and mr User QPs pbl's weren't freed properly. MR pbls weren't freed properly. Fixes: e0290cce6ac0 ("qedr: Add support for memory registeration verbs") Link: https://lore.kernel.org/r/20191027200451.28187-5-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 82af6d19d8d9227c22a53ff00b40fb2a4f9fce69 Author: Michal Kalderon Date: Sun Oct 27 22:04:50 2019 +0200 RDMA/qedr: Fix synchronization methods and memory leaks in qedr Re-design of the iWARP CM related objects reference counting and synchronization methods, to ensure operations are synchronized correctly and that memory allocated for "ep" is properly released. Also makes sure QP memory is not released before ep is finished accessing it. Where as the QP object is created/destroyed by external operations, the ep is created/destroyed by internal operations and represents the tcp connection associated with the QP. QP destruction flow: - needs to wait for ep establishment to complete (either successfully or with error) - needs to wait for ep disconnect to be fully posted to avoid a race condition of disconnect being called after reset. - both the operations above don't always happen, so we use atomic flags to indicate whether the qp destruction flow needs to wait for these completions or not, if the destroy is called before these operations began, the flows will check the flags and not execute them ( connect / disconnect). We use completion structure for waiting for the completions mentioned above. The QP refcnt was modified to kref object. The EP has a kref added to it to handle additional worker thread accessing it. Memory Leaks - https://www.spinics.net/lists/linux-rdma/msg83762.html Concurrency not managed correctly - https://www.spinics.net/lists/linux-rdma/msg67949.html Fixes: de0089e692a9 ("RDMA/qedr: Add iWARP connection management qp related callbacks") Link: https://lore.kernel.org/r/20191027200451.28187-4-michal.kalderon@marvell.com Reported-by: Chuck Lever Reported-by: Jason Gunthorpe Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 5fdff18b4dc64e2d1e912ad2b90495cd487f791b Author: Michal Kalderon Date: Sun Oct 27 22:04:49 2019 +0200 RDMA/qedr: Fix qpids xarray api used The qpids xarray isn't accessed from irq context and therefore there is no need to use the xa_XXX_irq version of the apis. Remove the _irq. Fixes: b6014f9e5f39 ("qedr: Convert qpidr to XArray") Link: https://lore.kernel.org/r/20191027200451.28187-3-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 73ab512f720298aabe23b34110e3f6a8545b0ba5 Author: Michal Kalderon Date: Sun Oct 27 22:04:48 2019 +0200 RDMA/qedr: Fix srqs xarray initialization There was a missing initialization for the srqs xarray. SRQs xarray can also be called from irq context when searching for an element and uses the xa_XXX_irq apis, therefore should be initialized with IRQ flags. Fixes: 9fd15987ed27 ("qedr: Convert srqidr to XArray") Link: https://lore.kernel.org/r/20191027200451.28187-2-michal.kalderon@marvell.com Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 5ea428595cc53677a0a5bacd950307463c40411f Author: Sylwester Nawrocki Date: Mon Oct 28 16:15:33 2019 +0100 soc: samsung: Add Exynos Adaptive Supply Voltage driver The Adaptive Supply Voltage (ASV) driver adjusts CPU cluster operating points depending on exact revision of an SoC retrieved from the CHIPID block or the OTP memory. This allows for some power saving as for some CPU clock frequencies we can lower CPU cluster's supply voltage comparing to safe values common to all the SoC revisions. This patch adds support for Exynos5422/5800 SoC, it is partially based on code from https://github.com/hardkernel/linux repository, branch odroidxu4-4.14.y, files: arch/arm/mach-exynos/exynos5422-asv.[ch]. Tested on Odroid XU3, XU4, XU3 Lite. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit 949b452f9cfef17e78055239f978d95ba729eee1 Author: Jason Gunthorpe Date: Thu Oct 24 13:51:03 2019 +0000 rdma: Remove nes ABI header This was missed when nes was removed. Fixes: 2d3c72ed5041 ("rdma: Remove nes") Link: https://lore.kernel.org/r/20191024135059.GA20084@ziepe.ca Signed-off-by: Jason Gunthorpe commit 603bba8d0e055631c678802c644d3120e6959790 Author: Krzysztof Kozlowski Date: Wed Oct 23 17:38:24 2019 +0200 ARM: s3c: Rename s5p_usb_phy functions The name s5p_usb_phy_init() suggests it is shared with S5Pv210 platform, but it is not. It is specific to S3C64xx, so make it clear in the name. Signed-off-by: Krzysztof Kozlowski commit e966fedeabe1ac3a3ee0a30f6b1afda269bba0a8 Author: Krzysztof Kozlowski Date: Wed Oct 23 17:38:23 2019 +0200 ARM: s3c: Rename s3c64xx_spi_setname() function The name s3c64xx_spi_setname() suggests it is shared with S3C64xx platform, but except of contents it is not. It is called only by S3C24xx code, so make it clear in the name. Signed-off-by: Krzysztof Kozlowski commit 4686da5140c18c84ca01a8ab994571d832c63398 Author: Catalin Marinas Date: Mon Oct 28 16:45:07 2019 +0000 arm64: Make arm64_dma32_phys_limit static This variable is only used in the arch/arm64/mm/init.c file for ZONE_DMA32 initialisation, no need to expose it. Reported-by: Will Deacon Signed-off-by: Catalin Marinas commit 994195e1537074f56df216a9309f6e366cb35b67 Author: Colin Ian King Date: Thu Oct 24 14:10:34 2019 +0100 RDMA/hns: Fix memory leak on 'context' on error return path Currently, the error return path when the call to function dev->dfx->query_cqc_info fails will leak object 'context'. Fix this by making the error return path via 'err' return return codes rather than -EMSGSIZE, set ret appropriately for all error return paths and for the memory leak now return via 'err' rather than just returning without freeing context. Link: https://lore.kernel.org/r/20191024131034.19989-1-colin.king@canonical.com Addresses-Coverity: ("Resource leak") Fixes: e1c9a0dc2939 ("RDMA/hns: Dump detailed driver-specific CQ") Signed-off-by: Colin Ian King Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 887803db866a7a4e1817a3cb8a3eee4e9879fed2 Author: Yangyang Li Date: Thu Oct 24 17:21:57 2019 +0800 RDMA/hns: Bugfix for qpc/cqc timer configuration qpc/cqc timer entry size needs one page, but currently they are fixedly configured to 4096, which is not appropriate in 64K page scenarios. So they should be modified to PAGE_SIZE. Fixes: 0e40dc2f70cd ("RDMA/hns: Add timer allocation support for hip08") Link: https://lore.kernel.org/r/1571908917-16220-3-git-send-email-liweihang@hisilicon.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 5c7e76fb7cb5071be800c938ebf2c475e140d3f0 Author: Lijun Ou Date: Thu Oct 24 17:21:56 2019 +0800 RDMA/hns: Fix to support 64K page for srq SRQ's page size configuration of BA and buffer should depend on current PAGE_SHIFT, or it can't work in scenario of 64K page. Fixes: c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode") Link: https://lore.kernel.org/r/1571908917-16220-2-git-send-email-liweihang@hisilicon.com Signed-off-by: Lijun Ou Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 79d81ef42c9a8feee2f1df5dffa6ac628b71141d Author: Bart Van Assche Date: Wed Oct 23 13:41:06 2019 -0700 RDMA/srpt: Fix TPG creation Unlike the iSCSI target driver, for the SRP target driver it is sufficient if a single TPG can be associated with each RDMA port name. However, users started associating multiple TPGs with RDMA port names. Support this by converting the single TPG in struct srpt_port_id into a list. This patch fixes the following list corruption issue: list_add corruption. prev->next should be next (ffffffffc0a080c0), but was ffffa08a994ce6f0. (prev=ffffa08a994ce6f0). WARNING: CPU: 2 PID: 2597 at lib/list_debug.c:28 __list_add_valid+0x6a/0x70 CPU: 2 PID: 2597 Comm: targetcli Not tainted 5.4.0-rc1.3bfa3c9602a7 #1 RIP: 0010:__list_add_valid+0x6a/0x70 Call Trace: core_tpg_register+0x116/0x200 [target_core_mod] srpt_make_tpg+0x3f/0x60 [ib_srpt] target_fabric_make_tpg+0x41/0x290 [target_core_mod] configfs_mkdir+0x158/0x3e0 vfs_mkdir+0x108/0x1a0 do_mkdirat+0x77/0xe0 do_syscall_64+0x55/0x1d0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Link: https://lore.kernel.org/r/20191023204106.23326-1-bvanassche@acm.org Reported-by: Honggang LI Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1") Signed-off-by: Bart Van Assche Acked-by: Honggang Li Signed-off-by: Jason Gunthorpe commit f9e66db143162a72bb41369fadddcd65fef8664f Author: Leon Romanovsky Date: Wed Oct 23 08:42:39 2019 +0300 RDMA/hns: Delete BITS_PER_BYTE redefinition HNS redefined available in bits.h define and didn't use it, we can safely delete it. Link: https://lore.kernel.org/r/20191023054239.31648-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 346f6a4636f64c19a27722cf6ec93b38bb4251d4 Merge: 6a036afb5511 c2cc62d83186 Author: Catalin Marinas Date: Mon Oct 28 16:22:49 2019 +0000 Merge branch 'kvm-arm64/erratum-1319367' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into for-next/core Similarly to erratum 1165522 that affects Cortex-A76, A57 and A72 respectively suffer from errata 1319537 and 1319367, potentially resulting in TLB corruption if the CPU speculates an AT instruction while switching guests. The fix is slightly more involved since we don't have VHE to help us here, but the idea is the same: when switching a guest in, we must prevent any speculated AT from being able to parse the page tables until S2 is up and running. Only at this stage can we allow AT to take place. For this, we always restore the guest sysregs first, except for its SCTLR and TCR registers, which must be set with SCTLR.M=1 and TCR.EPD{0,1} = {1, 1}, effectively disabling the PTW and TLB allocation. Once S2 is setup, we restore the guest's SCTLR and TCR. Similar things must be done on TLB invalidation... * 'kvm-arm64/erratum-1319367' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms: arm64: Enable and document ARM errata 1319367 and 1319537 arm64: KVM: Prevent speculative S1 PTW when restoring vcpu context arm64: KVM: Disable EL1 PTW when invalidating S2 TLBs arm64: KVM: Reorder system register restoration and stage-2 activation arm64: Add ARM64_WORKAROUND_1319367 for all A57 and A72 versions commit 8e01d9a396e6db153d94a6004e6473d9ff251a6a Author: Marc Zyngier Date: Sun Oct 27 14:41:59 2019 +0000 KVM: arm64: vgic-v4: Move the GICv4 residency flow to be driven by vcpu_load/put When the VHE code was reworked, a lot of the vgic stuff was moved around, but the GICv4 residency code did stay untouched, meaning that we come in and out of residency on each flush/sync, which is obviously suboptimal. To address this, let's move things around a bit: - Residency entry (flush) moves to vcpu_load - Residency exit (sync) moves to vcpu_put - On blocking (entry to WFI), we "put" - On unblocking (exit from WFI), we "load" Because these can nest (load/block/put/load/unblock/put, for example), we now have per-VPE tracking of the residency state. Additionally, vgic_v4_put gains a "need doorbell" parameter, which only gets set to true when blocking because of a WFI. This allows a finer control of the doorbell, which now also gets disabled as soon as it gets signaled. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191027144234.8395-2-maz@kernel.org commit 5c401308017f256ae9de804b4a1c65be1d390571 Author: Christoffer Dall Date: Mon Oct 28 14:05:41 2019 +0100 KVM: arm64: Don't set HCR_EL2.TVM when S2FWB is supported On CPUs that support S2FWB (Armv8.4+), KVM configures the stage 2 page tables to override the memory attributes of memory accesses, regardless of the stage 1 page table configurations, and also when the stage 1 MMU is turned off. This results in all memory accesses to RAM being cacheable, including during early boot of the guest. On CPUs without this feature, memory accesses were non-cacheable during boot until the guest turned on the stage 1 MMU, and we had to detect when the guest turned on the MMU, such that we could invalidate all cache entries and ensure a consistent view of memory with the MMU turned on. When the guest turned on the caches, we would call stage2_flush_vm() from kvm_toggle_cache(). However, stage2_flush_vm() walks all the stage 2 tables, and calls __kvm_flush-dcache_pte, which on a system with S2FWB does ... absolutely nothing. We can avoid that whole song and dance, and simply not set TVM when creating a VM on a system that has S2FWB. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Reviewed-by: Mark Rutland Link: https://lore.kernel.org/r/20191028130541.30536-1-christoffer.dall@arm.com commit 6a036afb5511418995359a9131dbea276758bd10 Merge: ba95e9bd9637 27a22fbdeedd Author: Catalin Marinas Date: Mon Oct 28 16:12:40 2019 +0000 Merge branch 'for-next/neoverse-n1-stale-instr' into for-next/core Neoverse-N1 cores with the 'COHERENT_ICACHE' feature may fetch stale instructions when software depends on prefetch-speculation-protection instead of explicit synchronization. [0] The workaround is to trap I-Cache maintenance and issue an inner-shareable TLBI. The affected cores have a Coherent I-Cache, so the I-Cache maintenance isn't necessary. The core tells user-space it can skip it with CTR_EL0.DIC. We also have to trap this register to hide the bit forcing DIC-aware user-space to perform the maintenance. To avoid trapping all cache-maintenance, this workaround depends on a firmware component that only traps I-cache maintenance from EL0 and performs the workaround. For user-space, the kernel's work is to trap CTR_EL0 to hide DIC, and produce a fake IminLine. EL3 traps the now-necessary I-Cache maintenance and performs the inner-shareable-TLBI that makes everything better. [0] https://developer.arm.com/docs/sden885747/latest/arm-neoverse-n1-mp050-software-developer-errata-notice * for-next/neoverse-n1-stale-instr: arm64: Silence clang warning on mismatched value/register sizes arm64: compat: Workaround Neoverse-N1 #1542419 for compat user-space arm64: Fake the IminLine size on systems affected by Neoverse-N1 #1542419 arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419 commit f9d9fece29b8b5cd4943eccd7bd73b6241d424fa Author: Chris Wilson Date: Mon Oct 28 14:26:52 2019 +0000 drm/i915/display: Mark conn as initialised by iterator smatch complains about drivers/gpu/drm/i915//display/intel_display.c:14403 intel_set_dp_tp_ctl_normal() error: uninitialized symbol 'conn'. because it has no way to determine that the loop must have an entry. Tell the static analysers to ignore the local, it will always be set. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191028142652.1987-2-chris@chris-wilson.co.uk commit e7f536000c4c293f4abae3adc25c7442386c5ab2 Author: Chris Wilson Date: Mon Oct 28 14:26:51 2019 +0000 drm/i915/selftests: Initialise ret Keep smatch quiet, drivers/gpu/drm/i915//gem/selftests/i915_gem_context.c:1268 __igt_ctx_sseu() error: uninitialized symbol 'ret'. drivers/gpu/drm/i915//gem/selftests/i915_gem_context.c:1280 __igt_ctx_sseu() error: uninitialized symbol 'ret'. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191028142652.1987-1-chris@chris-wilson.co.uk commit 370831fcb128f9106e75f13b340bb241fc886242 Author: Chris Wilson Date: Fri Oct 25 14:59:43 2019 +0100 drm/i915/selftests: Initialise err in case there are no engines! drivers/gpu/drm/i915//gt/selftest_engine_heartbeat.c:255 live_heartbeat_fast() error: uninitialized symbol 'err'. drivers/gpu/drm/i915//gt/selftest_engine_heartbeat.c:320 live_heartbeat_off() error: uninitialized symbol 'err'. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191025135943.12524-2-chris@chris-wilson.co.uk commit a7f328fc789817a6a0e5c46411956810d5ee00ca Author: Chris Wilson Date: Mon Oct 28 12:41:25 2019 +0000 drm/i915/execlists: Simply walk back along request timeline on reset The request's timeline will only contain requests from this context, in order of execution. Therefore, we can simply look back along this timeline to find the currently executing request. If we do find that the current context has completed its last request, that does not imply that all requests are completed in the context, so only advance the ring->head up to the end of the known completions! Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191028124125.25176-1-chris@chris-wilson.co.uk commit 13670f4ce9169ddc6793e243635f8400e74bbbf7 Author: Chris Wilson Date: Mon Oct 28 12:18:03 2019 +0000 drm/i915/selftests: Check a few more fixed locations within the context image As we use hard coded offsets for a few locations within the context image, include those in the selftests to assert that they are valid. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191028121803.29408-1-chris@chris-wilson.co.uk commit a39414716ca08c08ce09d9e8409ef525e7a77eaf Author: Christian König Date: Thu Jun 7 10:28:47 2018 +0200 drm/amdgpu: add independent DMA-buf import v9 Instead of relying on the DRM functions just implement our own import functions. This prepares support for taking care of unpinned DMA-buf. v2: enable for all exporters, not just amdgpu, fix invalidation handling, lock reservation object while setting callback v3: change to new dma_buf attach interface v4: split out from unpinned DMA-buf work v5: rebased and cleanup on new DMA-buf interface v6: squash with invalidation callback change, stop using _(map|unmap)_locked v7: drop invalidations when the BO is already in system domain v8: rebase on new DMA-buf patch and drop move notification v9: cleanup comments Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/337948/ commit 6e6db2722c287122bfc4d51e685872fb5031cf18 Author: Christian König Date: Wed May 30 14:42:24 2018 +0200 drm/amdgpu: add independent DMA-buf export v8 Add an DMA-buf export implementation independent of the DRM helpers. This not only avoids the caching of DMA-buf mappings, but also allows us to use the new dynamic locking approach. This is also a prerequisite of unpinned DMA-buf handling. v2: fix unintended recursion, remove debugging leftovers v3: split out from unpinned DMA-buf work v4: rebase on top of new no_sgt_cache flag v5: fix some warnings by including amdgpu_dma_buf.h v6: fix locking for non amdgpu exports v7: rebased on new DMA-buf locking patch v8: drop extra include Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/337949/ commit ab7822067fbadf7cf0844736ec03f5b6604cce12 Merge: 49067a8a6fcf c34cbe24cfd5 Author: Olof Johansson Date: Mon Oct 28 08:53:16 2019 -0700 Merge tag 'stm32-dt-for-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT updates for v5.5, round 1 Highlights: ---------- MPU part: -Add and enable ADC support on stm32mp157a-dk1 -Add DAC support on stm32mp157c-ed1 -Add and enable VREFBUF support on stm32mp157a-dk1 -Add focaltech touchscreen on stm32mp157c-dk2 -Add hdmi support on stm32mp157a-dk1 -Fix issues seen during YAML DT validation -Fix regulators issues for all MPU boards MCU part: -Fix issues seen during YAML DT validation * tag 'stm32-dt-for-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: remove useless dma-ranges property for stm32f469 ARM: dts: stm32: remove useless dma-ranges property for stm32f429 ARM: dts: stm32: disable active-discharge for vbus_otg on stm32mp157a-avenger96 ARM: dts: stm32: Fix active discharge usage on stm32mp157 ARM: dts: stm32: change default minimal buck1 value on stm32mp157 ARM: dts: stm32: add PWR regulators support on stm32mp157 ARM: dts: stm32: remove useless interrupt from dsi node for stm32f469 ARM: dts: stm32: add hdmi audio support to stm32mp157a-dk1 board ARM: dts: stm32: Add DAC support to stm32mp157c-ed1 ARM: dts: stm32: Add DAC pins used on stm32mp157c-ed1 ARM: dts: stm32: fix regulator-sd_switch node on stm32mp157c-ed1 board ARM: dts: stm32: remove usb phy-names entries on stm32mp157c-ev1 ARM: dts: stm32: fix joystick node on stm32f746 and stm32mp157c eval boards ARM: dts: stm32: fix memory nodes to match with DT validation tool ARM: dts: stm32: add focaltech touchscreen on stm32mp157c-dk2 board ARM: dts: stm32: enable ADC support on stm32mp157a-dk1 ARM: dts: stm32: add ADC pins used on stm32mp157a-dk1 ARM: dts: stm32: Enable VREFBUF on stm32mp157a-dk1 ARM: dts: stm32: move ltdc pinctrl on stm32mp157a dk1 board Link: https://lore.kernel.org/r/02c39510-f36d-abbb-c76f-49aff07c0a08@st.com Signed-off-by: Olof Johansson commit 49067a8a6fcf9945d11177a74b08083c8a2d5cc0 Merge: 960a02765a7d 577dd5de0990 Author: Olof Johansson Date: Mon Oct 28 08:52:40 2019 -0700 Merge tag 'juno-update-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/dt ARMv8 Juno update for v5.5 Single patch to add support for Mali GPU on all versions of Juno. Though it's disabled by default, it is very useful to test panfrost drivers. * tag 'juno-update-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: add GPU subsystem Link: https://lore.kernel.org/r/20191028040022.GC20568@e107533-lin.cambridge.arm.com Signed-off-by: Olof Johansson commit b7f7a0b58fbd66085c9cb2cf81d33fcf67eb46c4 Merge: 3c1aa0c0cb5c c2ffa00ad615 Author: Olof Johansson Date: Mon Oct 28 08:51:59 2019 -0700 Merge tag 'reset-for-v5.5' of git://git.pengutronix.de/git/pza/linux into arm/drivers Reset controller updates for v5.5 This tag adds support for Meson SM1 ARB resets, Uniphier Pro5 USB3 resets, the Meson-A1 reset controller, SocFPGA Agilex resets, and Realtek RTD1195/RTD1295 resets. It adds some reset controller API keywords for get_maintainers.pl and makes a few remaining reset_control_ops const. Also included are a conversion of the Qualcomm device tree bindings to yaml and a few small kerneldoc improvements. * tag 'reset-for-v5.5' of git://git.pengutronix.de/git/pza/linux: reset: document (devm_)reset_control_get_optional variants reset: improve of_xlate documentation reset: simple: Add Realtek RTD1195/RTD1295 reset: simple: Keep alphabetical order MAINTAINERS: add reset controller framework keywords reset: zynqmp: Make reset_control_ops const reset: hisilicon: hi3660: Make reset_control_ops const reset: build simple reset controller driver for Agilex reset: add support for the Meson-A1 SoC Reset Controller dt-bindings: reset: add bindings for the Meson-A1 SoC Reset Controller reset: uniphier-glue: Add Pro5 USB3 support dt-bindings: reset: pdc: Convert PDC Global bindings to yaml dt-bindings: reset: aoss: Convert AOSS reset bindings to yaml reset: Remove copy'n'paste redundancy in the comments reset: meson-audio-arb: add sm1 support reset: dt-bindings: meson: update arb bindings for sm1 Link: https://lore.kernel.org/r/ede6874508472d0917dca770ef80b90626b0f205.camel@pengutronix.de Signed-off-by: Olof Johansson commit 21c42244f21231445a25ab70ea11affde0ab5814 Author: Cristiane Naves Date: Mon Oct 28 12:37:16 2019 -0300 staging: rtl8712: Fix Alignment of open parenthesis Fix alignment should match open parenthesis. Issue found by checkpatch. Signed-off-by: Cristiane Naves Link: https://lore.kernel.org/r/2a6e8fbef7b9e72d95b7c4a7cbcce08a9e231d07.1572276208.git.cristianenavescardoso09@gmail.com Signed-off-by: Greg Kroah-Hartman commit 62a6e25ed677c2384f4c8ea5316f561da114721d Author: Frank A. Cancio Bello Date: Mon Oct 28 05:12:37 2019 +0000 staging: mt7621-dma: Remove unnecessary line continuations checkpatch message: "WARNING:LINE_CONTINUATIONS: Avoid unnecessary line continuations" Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/20191028051237.3row7xnbr6pgn4bp@linux-kernel-dev Signed-off-by: Greg Kroah-Hartman commit f3a54e19d466689035276a2eb45032f396570b09 Author: Frank A. Cancio Bello Date: Mon Oct 28 04:21:11 2019 +0000 staging: octeon-usb: Fix line ending with a '(' checkpatch.pl message: "CHECK:OPEN_ENDED_LINE: Lines should not end with a '('" Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/20191028042111.tzfhugs6f4erohir@linux-kernel-dev Signed-off-by: Greg Kroah-Hartman commit 05daff069f8f29436673e8f417b2d0ac805b6f69 Author: Marek Bykowski Date: Mon Oct 7 15:21:15 2019 +0200 Documentation: Add documentation for CCN-512 DTS binding Indicate the arm-ccn perf back-end supports now ccn-512. Acked-by: Rob Herring Signed-off-by: Marek Bykowski Signed-off-by: Will Deacon commit 126b0a1700c5c2688d9319286d84db7f75627810 Author: Marek Bykowski Date: Wed Oct 16 11:57:39 2019 +0200 perf: arm-ccn: Enable stats for CCN-512 interconnect Add compatible string for the ARM CCN-512 interconnect Acked-by: Pawel Moll Signed-off-by: Marek Bykowski Signed-off-by: Boleslaw Malecki Signed-off-by: Will Deacon commit b711acf0d1a60075ceaf67056b2693f76fb36b95 Author: Michael Straube Date: Sun Oct 27 14:06:04 2019 +0100 staging: rtl8188eu: replace tabs with spaces - style Replace tabs with spaces where appropriate to cleanup whitespace. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191027130604.68379-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c534472f8b4dc45d92a5f96a6ed11dbea6b4eef8 Author: Michael Straube Date: Sun Oct 27 14:06:03 2019 +0100 staging: rtl8188eu: remove return variable from rtw_init_bcmc_stainfo Remove variable res, that is used to store the return value, from rtw_init_bcmc_stainfo. Instead return _FAIL or _SUCCESS directly and remove the now unneeded exit label. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191027130604.68379-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6e845ddd8a554f632a561cba77d8c1811a4d86aa Author: Michael Straube Date: Sun Oct 27 14:06:02 2019 +0100 staging: rtl8188eu: reduce indentation level in _rtw_free_sta_priv Reduce indentation level in _rtw_free_sta_priv by returning early if pstapriv is NULL. Also clears a line over 80 characters checkpatch warning. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191027130604.68379-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0c9f72227c76891d6cb1f2a8b70e393601fc8493 Author: Michael Straube Date: Sun Oct 27 14:06:01 2019 +0100 staging: rtl8188eu: remove exit label from rtw_alloc_stainfo Remove exit label from rtw_alloc_stainfo and simply return NULL instead of goto exit. Suggested-by: Joe Perches Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191027130604.68379-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c3a6cf19e695c8b0a9bf8b5933f863e12d878b7c Author: Masahiro Yamada Date: Fri Oct 18 10:31:43 2019 +0100 export: avoid code duplication in include/linux/export.h include/linux/export.h has lots of code duplication between EXPORT_SYMBOL and EXPORT_SYMBOL_NS. To improve the maintainability and readability, unify the implementation. When the symbol has no namespace, pass the empty string "" to the 'ns' parameter. The drawback of this change is, it grows the code size. When the symbol has no namespace, sym->namespace was previously NULL, but it is now an empty string "". So, it increases 1 byte for every no namespace EXPORT_SYMBOL. A typical kernel configuration has 10K exported symbols, so it increases 10KB in rough estimation. I did not come up with a good idea to refactor it without increasing the code size. I am not sure how big a deal it is, but at least include/linux/export.h looks nicer. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Masahiro Yamada [maennich: rebase on top of 3 fixes for the namespace feature] Signed-off-by: Matthias Maennich Signed-off-by: Jessica Yu commit 837a6e7f5cdb5e411c6187729e12962c2705160d Author: Christoph Hellwig Date: Thu Oct 24 22:26:02 2019 -0700 fs: add generic UNRESVSP and ZERO_RANGE ioctl handlers These use the same scheme as the pre-existing mapping of the XFS RESVP ioctls to ->falloc, so just extend it and remove the XFS implementation. Signed-off-by: Christoph Hellwig [darrick: fix compile error on s390] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9afe1d5c14e0fa59b678dcf013c8469cf3f0c132 Author: Christoph Hellwig Date: Thu Oct 24 22:25:39 2019 -0700 xfs: don't implement XFS_IOC_RESVSP / XFS_IOC_RESVSP64 These ioctls are implemented by the VFS and mapped to ->fallocate now, so this code won't ever be reached. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c7d68318c9ae240800cad07cbe641f1bab3070b8 Author: Christoph Hellwig Date: Thu Oct 24 22:25:39 2019 -0700 xfs: use xfs_inode_buftarg in xfs_file_ioctl Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f9acc19c8cbe7fd8401b53e37c035e8c805fce26 Author: Christoph Hellwig Date: Thu Oct 24 22:25:38 2019 -0700 xfs: use xfs_inode_buftarg in xfs_file_dio_aio_write Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 30fa529e3b2e6f1da277ef8525e4ce7979c57c57 Author: Christoph Hellwig Date: Thu Oct 24 22:25:38 2019 -0700 xfs: add a xfs_inode_buftarg helper Add a new xfs_inode_buftarg helper that gets the data I/O buftarg for a given inode. Replace the existing xfs_find_bdev_for_inode and xfs_find_daxdev_for_inode helpers with this new general one and cleanup some of the callers. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 25a409572b5f6e3af6b2264f6a358b71505fb0d6 Author: Christoph Hellwig Date: Thu Oct 24 22:25:37 2019 -0700 xfs: mark xfs_buf_free static Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ba95e9bd963784088709050b72363f57c4861deb Merge: 4f5cafb5cb84 777d062e5bee Author: Catalin Marinas Date: Mon Oct 28 14:57:16 2019 +0000 Merge remote-tracking branch 'arm64/for-next/fixes' into for-next/core This is required to solve the conflicts with subsequent merges of two more errata workaround branches. * arm64/for-next/fixes: arm64: tags: Preserve tags for addresses translated via TTBR1 arm64: mm: fix inverted PAR_EL1.F check arm64: sysreg: fix incorrect definition of SYS_PAR_EL1_F arm64: entry.S: Do not preempt from IRQ before all cpufeatures are enabled arm64: hibernate: check pgd table allocation arm64: cpufeature: Treat ID_AA64ZFR0_EL1 as RAZ when SVE is not enabled arm64: Fix kcore macros after 52-bit virtual addressing fallout arm64: Allow CAVIUM_TX2_ERRATUM_219 to be selected arm64: Avoid Cavium TX2 erratum 219 when switching TTBR arm64: Enable workaround for Cavium TX2 erratum 219 when running SMT arm64: KVM: Trap VM ops when ARM64_WORKAROUND_CAVIUM_TX2_219_TVM is set commit e5df52dcf88cb9e900d6409da035a3c419e242cb Author: Matt Roper Date: Thu Oct 24 10:30:23 2019 -0700 drm/i915/tgl: Handle AUX interrupts for TC ports We're currently only processing AUX interrupts on the combo ports; make sure we handle the TC ports as well. v2: Drop stale comment Fixes: f663769a5eef ("drm/i915/tgl: initialize TC and TBT ports") Cc: José Roberto de Souza Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191024173023.22113-1-matthew.d.roper@intel.com commit d02f5aab06c84ed7d18a4d709c19e400faf361f6 Author: Kyle Mahlkuch Date: Fri Oct 25 15:40:50 2019 -0500 drm/radeon: Fix EEH during kexec During kexec some adapters hit an EEH since they are not properly shut down in the radeon_pci_shutdown() function. Adding radeon_suspend_kms() fixes this issue. Enabled only on PPC because this patch causes issues on some other boards. Signed-off-by: Kyle Mahlkuch Signed-off-by: Alex Deucher commit b64919a2366ada6e96474148f0459ac12d8d813c Author: YueHaibing Date: Mon Oct 28 21:36:21 2019 +0800 drm/amd/powerplay: Make two functions static Fix sparse warnings: drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:2050:5: warning: symbol 'arcturus_i2c_eeprom_control_init' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:2068:6: warning: symbol 'arcturus_i2c_eeprom_control_fini' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit f440ff44b101796beec8ac63252f254de7f2de1c Author: Wambui Karuga Date: Mon Oct 28 12:20:05 2019 +0300 drm/amd: correct "_LENTH" mispelling in constant Correct the "_LENTH" mispelling in the AMDGPU_MAX_TIMEOUT_PARAM_LENGTH constant. Signed-off-by: Wambui Karuga Signed-off-by: Alex Deucher commit 7e0ff20c7a66c9deab6f9c3405bac854bdf61e8f Author: Wambui Karuga Date: Mon Oct 28 12:20:04 2019 +0300 drm/amd: declare amdgpu_exp_hw_support in amdgpu.h Declare `amdgpu_exp_hw_support` as extern in amdgpu.h to address the following sparse warning: drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:118:5: warning: symbol 'amdgpu_exp_hw_support' was not declared. Should it be static? Signed-off-by: Wambui Karuga Suggested-by: Harry Wentland Signed-off-by: Alex Deucher commit 4ef0b9d0a10eab55d36dc2f3ea316163c4addf8c Author: YueHaibing Date: Mon Oct 28 21:34:36 2019 +0800 drm/amd/display: Make calculate_integer_scaling static Fix sparse warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:963:6: warning: symbol 'calculate_integer_scaling' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit 11436b01775fe9f07967756f52d5536bab45bcad Author: Pelle van Gils Date: Thu Oct 24 16:04:31 2019 +0200 drm/amdgpu/powerplay/vega10: allow undervolting in p7 The vega10_odn_update_soc_table() function does not allow the SCLK dependent voltage to be set for power-state 7 to a value below the default in pptable. Change the for-loop condition to allow undervolting in the highest state. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205277 Signed-off-by: Pelle van Gils Signed-off-by: Alex Deucher commit f509be184052e9279940dbcd02b0f8ac15b426ca Author: chen gong Date: Fri Oct 25 18:51:23 2019 +0800 drm/amd/powerplay: Disable gfx CGPG when suspend smu if no disable gfx CGPG when suspend smu, enabling gfx CGPG will fail when resume smu. Platform: Renoir dmesg log information: [ 151.844110 ] amdgpu: [powerplay] SMU is resuming... [ 151.844116 ] amdgpu: [powerplay] dpm has been disabled [ 151.844604 ] amdgpu: [powerplay] Failed to send message 0x2f,response 0xfffffffb param 0x1 [ 151.844605 ] amdgpu: [powerplay] SMU is resumed successfully! Signed-off-by: chen gong Acked-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 847a75fb9e13fe6749bea25315310cdd3431d30c Author: Wambui Karuga Date: Sat Oct 19 10:32:42 2019 +0300 drm/radeon: remove assignment for return value Remove unnecessary assignment for return value and have the function return the required value directly. Issue found by coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Reviewed-by: Harry Wentland Signed-off-by: Wambui Karuga Signed-off-by: Alex Deucher commit 039ffeaae307d61318742e0b2f79742e08ea6b8b Author: zhongshiqi Date: Wed Oct 23 16:32:23 2019 +0800 dc.c:use kzalloc without test dc.c:583:null check is needed after using kzalloc function Reviewed-by: Harry Wentland Signed-off-by: zhongshiqi Signed-off-by: Alex Deucher commit b69cd5dd019a474fb445651d5461a8d5e2301ea9 Author: Chenwandun Date: Sat Oct 19 11:23:51 2019 +0800 drm/amd/display: remove gcc warning Wunused-but-set-variable drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: In function dce_aux_configure_timeout: drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: warning: variable timeout set but not used [-Wunused-but-set-variable] Signed-off-by: Chenwandun Signed-off-by: Alex Deucher commit e93d99180abdaaa362bb02427a84266cd61bfd30 Author: Ilya Leoshkevich Date: Mon Oct 28 11:21:10 2019 +0100 selftests/bpf: Restore $(OUTPUT)/test_stub.o rule `make O=/linux-build kselftest TARGETS=bpf` fails with make[3]: *** No rule to make target '/linux-build/bpf/test_stub.o', needed by '/linux-build/bpf/test_verifier' The same command without the O= part works, presumably thanks to the implicit rule. Fix by restoring the explicit $(OUTPUT)/test_stub.o rule. Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule") Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191028102110.7545-1-iii@linux.ibm.com commit 313e7f6fb1d9a8814424c2c6878848648c9c090f Author: Ilya Leoshkevich Date: Mon Oct 28 11:20:49 2019 +0100 selftest/bpf: Use -m{little, big}-endian for clang When cross-compiling tests from x86 to s390, the resulting BPF objects fail to load due to endianness mismatch. Fix by using BPF-GCC endianness check for clang as well. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191028102049.7489-1-iii@linux.ibm.com commit 91636a82044a2821201b54faac4d1d2425260842 Author: Takashi Iwai Date: Mon Oct 28 14:06:34 2019 +0100 ALSA: hda: Allow non-Intel device probe gracefully The recent addition of snd_intel_dsp_driver_probe() check caused a spurious kernel warning when the driver is loaded for a non-Intel hardware due to snd_BUG_ON(). Moreover, for such a hardware, we should always return SND_INTEL_DSP_DRIVER_ANY, not check the dsp_driver option at all. This patch fixes these issues for non-Intel devices. Fixes: 82d9d54a6c0e ("ALSA: hda: add Intel DSP configuration / probe code") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191028130634.3501-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f1edb498bd9f25936ae3540a8dbd86e6019fdb95 Author: Peter Griffin Date: Tue Oct 1 18:25:46 2019 +0000 clk: hi6220: use CLK_OF_DECLARE_DRIVER As now we also need to probe in the reset driver as well. Cc: Michael Turquette Cc: Stephen Boyd Cc: Allison Randal Cc: Peter Griffin Cc: linux-clk@vger.kernel.org Signed-off-by: Peter Griffin Signed-off-by: John Stultz Link: https://lkml.kernel.org/r/20191001182546.70090-1-john.stultz@linaro.org [sboyd@kernel.org: Add comment about reset driver] Signed-off-by: Stephen Boyd commit 406857f773b082bc88edfd24967facf4ed07ac85 Author: Daniel Drake Date: Mon Oct 14 16:56:02 2019 +0800 ACPI: EC: add support for hardware-reduced systems As defined in the ACPI spec section 12.11, ACPI hardware-reduced platforms define the EC SCI interrupt as a GpioInt in the _CRS object. This replaces the previous way of using a GPE for this interrupt; GPE blocks are not available on reduced hardware platforms. Add support for handling this interrupt as an EC event source, and avoid GPE usage on reduced hardware platforms. This enables the use of several media keys (e.g. screen brightness up/down) on Asus UX434DA. Signed-off-by: Daniel Drake Signed-off-by: Rafael J. Wysocki commit 4446abc9a10954e5d09dd2b894912348a22e7009 Author: Daniel Drake Date: Mon Oct 14 16:56:01 2019 +0800 ACPI: EC: tweak naming in preparation for GpioInt support In preparation for supporting reduced hardware platforms which use a GpioInt instead of a GPE, rename some functions and constants to have more appropriate names. No logical changes. Signed-off-by: Daniel Drake Signed-off-by: Rafael J. Wysocki commit 6d407a39cc9619d0088b44333c6526924be00f8d Author: Keyon Jie Date: Fri Oct 25 17:41:22 2019 -0500 ASoC: SOF: pci: Add prepare/complete PM callbacks Use the new implemented snd_sof_prepare() and snd_sof_complete() as the power management callbacks for pci probing platforms. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-27-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c470fc3f61b25e955f8ba90fc9dc554881e4e72c Author: Keyon Jie Date: Fri Oct 25 17:41:21 2019 -0500 ASoC: SOF: PM: Add support for DSP D0i3 state when entering S0ix When system is entering into S0ix, the PCI device may transition to the D0i3 substate instead of D3. In D0i3, some always-on functionality can be enabled, such as acoustic event detection, voice activity detection or hotwording. When an event is detected, the DSP firmware can wake-up the device for a transition to D0 with an interrupt. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-26-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5655ce660a6d3eec4a3ad37feb99fb228540d1a9 Author: Keyon Jie Date: Fri Oct 25 17:41:20 2019 -0500 ASoC: SOF: return -ENOTSUPP if D0I3 is not supported No set_power_state ops means that the platform doesn't support D0i3, return -ENOTSUPP for the case. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-25-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 66e40876ddc325d892c493a6d83574bbba5770ce Author: Keyon Jie Date: Fri Oct 25 17:41:19 2019 -0500 ASoC: SOF: Intel: hda-dsp: implement suspend/resume for S0ix<->S0 transition Enable system wake up via IPC interrupt from DSP when the system is suspending to the S0ix state, and disable it in the corresponding resuming. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-24-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ac8c046f19f94ec419c60d7a073af75a71386e97 Author: Keyon Jie Date: Fri Oct 25 17:41:18 2019 -0500 ASoC: SOF: ignore suspend/resume for D0ix compatible streams During system suspend, the PM framework will freeze all applications and the ALSA/ASoC core will suspend all RUNNING PCM streams. However, D0ix-compatible PCM streams should keep the related pipelines active in the DSP when the system is entering S0ix. The TRIGGER_SUSPEND event is trapped in such cases to prevent the pipelines from being stopped. Likewise, the TRIGGER_RESUME/START events should not affect the pipeline state. The SOF driver also triggers some DSP Firmware pipelines based on the DAPM widgets power events. In such cases, we also ignore PRE_PMU and POST_PMD events to keep the pipelines active. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-23-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0b50b3b1c3bc2a2c9eeab418b3de3e60e0530cf4 Author: Keyon Jie Date: Fri Oct 25 17:41:17 2019 -0500 ASoC: SOF: PM: implement prepare/complete callbacks Implement the prepare() and complete() callbacks for power management, initialize s0_suspend flag at prepare(), and reset it at complete(). Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4cd933abd4820da7eefe672ff439b32d199a07be Author: Keyon Jie Date: Fri Oct 25 17:41:16 2019 -0500 ASoC: SOF: add a flag suspend_ignored for sof stream Add a suspend_ignored flag to snd_sof_pcm_stream that will be used to decide if the corresponding FW pipeline should be kept active to perform always on tasks when the system is entering the S0ix state. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7367d3096b1443e55a2c730d1966f423b15d5cad Author: Keyon Jie Date: Fri Oct 25 17:41:15 2019 -0500 ASoC: SOF: add a flag to indicate the system suspend target Add flag 's0_suspend' to indicate if the system is entering S0ix or not. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0267de58acfe5059ace739741f1533dd605ed22f Author: Keyon Jie Date: Fri Oct 25 17:41:14 2019 -0500 ASoC: SOF: Intel: CNL: add support for sending compact IPC For compact IPCs, we will send the IPC header/command via the HIPCIDR register and the first 32bit payload via the HIPCIDD register, no mailbox will be used. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 601252869f50af6f5ab377e7f4846d7b09cc66c0 Author: Keyon Jie Date: Fri Oct 25 17:41:13 2019 -0500 ASoC: SOF: PM: add helpers for setting D0 substate for ADSP Add snd_sof_set_d0_substate() helper for setting ADSP to a specific D0 substate, it will call into the platform specific implementation, and update the d0_substate at success. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 534037fddd34b58be86a826d449a5a6635ecdbf5 Author: Keyon Jie Date: Fri Oct 25 17:41:12 2019 -0500 ASoC: SOF: configure D0ix IPC flags in set_power_state The configuration for D0ix in FW is platform specific, let's do this and send IPC in the platform set_power_state() ops. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5056193d4d1a8b73087145add21141c46027d6a2 Author: Keyon Jie Date: Fri Oct 25 17:41:11 2019 -0500 ASoC: SOF: Intel: HDA: add cAVS specific compact IPC header file On cAVS platforms, some IPCs are required to be sent via IPC registers only(e.g. when in D0i3, mailbox is unaccessible), add hda-ipc.h to hold definition of those compact IPCs. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 463fbf6dc03aff41e973602bbad6cb135fa6d48a Author: Keyon Jie Date: Fri Oct 25 17:41:10 2019 -0500 ASoC: SOF: Intel: hda-ipc: Don't read mailbox for PM_GATE reply Memory windows could be powered off before receiving PM_GATE IPC reply from FW, we can't read the mailbox to get reply. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 10992004e1e960c7e256ec70c7ab22895a7003d7 Author: Keyon Jie Date: Fri Oct 25 17:41:09 2019 -0500 ASoC: SOF: ipc: introduce message for DSP power gating Add new ipc messages which will be sent from driver to FW, to ask FW to enter specific power saving state. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7c7eba2402c11137d1fa1d3fb964a2c6fc1ded3e Author: Keyon Jie Date: Fri Oct 25 17:41:08 2019 -0500 ASoC: SOF: PM: rename sof_send_pm_ipc to sof_send_pm_ctx_ipc The helper sof_send_pm_ipc() is only suitable for context save/restore IPCs' sending, so rename it to sof_send_pm_ctx_ipc here. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 92f4beb718d76e93b76343a3ba872df6cb210672 Author: Keyon Jie Date: Fri Oct 25 17:41:07 2019 -0500 ASoC: SOF: Intel: HDA: use macro for register polling retry count Define macro and use it for the register polling retry count. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit aae7c82d01219bf568a7b12f5839d7ca52b17d59 Author: Keyon Jie Date: Fri Oct 25 17:41:06 2019 -0500 ASoC: SOF: Intel: hda-dsp: align the comments for D0I3C update Align the logs for CIP timeout at D0I3C.I3 updating. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c5232c0171428f005a3204e1c264231fb5999b28 Author: Keyon Jie Date: Fri Oct 25 17:41:05 2019 -0500 ASoC: SOF: topology: parse and store d0i3_compatible flag Parses the token from tplg file and store it to snd_sof_pcm_stream d0i3_compatible flag, which can be used later for d0ix transition management. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4a94940988cc44adeb383401dea0beeac4abbe63 Author: Keyon Jie Date: Fri Oct 25 17:41:04 2019 -0500 ASoC: SOF: token: add tokens for PCM compatible with D0i3 substate Add stream token SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3 and SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 to denote if the stream can be opened at low power d0i3 status or not. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e5c97e88084b8dca6850eba5d2937716b88306c1 Author: Keyon Jie Date: Fri Oct 25 17:41:03 2019 -0500 ASoC: SOF: add flag to snd_sof_pcm_stream for D0i3 compatible stream Add flag d0i3_compatible to struct snd_sof_pcm_stream to denote if the stream can tolerate a transition to the D0i3 substate while opened (thus seen as 'active' by pm_runtime). Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 35c930ba6025964ac71f041065ae212a0fcc7cca Author: Keyon Jie Date: Fri Oct 25 17:41:02 2019 -0500 ASoC: SOF: Intel: APL: add set_power_state() ops Using hda_dsp_set_power_state() as set_power_state() ops for apl to do d0ix platform configuration updates. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 73b51957122dc47a40325a5359b44ef337cbf217 Author: Keyon Jie Date: Fri Oct 25 17:41:01 2019 -0500 ASoC: SOF: Intel: CNL: add set_power_state() ops Using hda_dsp_set_power_state() as set_power_state() ops for cnl to do d0ix platform configuration updates. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 62f8f76604623980d41cf73691ca45288871efd9 Author: Keyon Jie Date: Fri Oct 25 17:41:00 2019 -0500 ASoC: SOF: Intel: hda-dsp: Add helper for setting DSP D0ix substate Adding helper to implement setting dsp to d0i3 or d0i0 status, this will be needed for driver D0ix support. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e8f112d8c29f44ded83f97828c104bf0904871ec Author: Keyon Jie Date: Fri Oct 25 17:40:59 2019 -0500 ASoC: SOF: add set_power_state() to dsp_ops for power state update D0i3 is a platform-defined substate of D0, so we need a platform-specific callback in dsp_ops to handle the relevant configurations. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e346d0cf2c0a2dc9e63d5b90824bbe5ac0cc43e2 Author: Hans de Goede Date: Sat Oct 26 22:24:36 2019 +0200 ACPI: button: Remove unused acpi_lid_notifier_[un]register() functions There are no users of the acpi_lid_notifier_[un]register functions, so lets remove them. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 00e250367cc6c4ab80fea6ec605d464e624bd520 Author: Hans de Goede Date: Sat Oct 26 22:24:35 2019 +0200 ACPI: button: Add DMI quirk for Asus T200TA The Asus T200TA lid has some weird behavior where _LID keeps reporting closed after every second openening of the lid. Causing immediate re-suspend after opening every other open. I've looked at the AML code but it involves talking to the EC and we have no idea what the EC is doing. Setting lid_init_state to ACPI_BUTTON_LID_INIT_OPEN fixes the unwanted behavior, so this commit adds a DMI based quirk to use ACPI_BUTTON_LID_INIT_OPEN on the T200TA. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 932e1ba486117de2fcea3df27ad8218ad6c11470 Author: Hans de Goede Date: Sat Oct 26 22:24:34 2019 +0200 ACPI: button: Add DMI quirk for Medion Akoya E2215T The Medion Akoya E2215T's ACPI _LID implementation is quite broken: 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. This commit adds a DMI quirk for this. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit d7cd08231a7fafb0d81786515527651d3242a7f4 Author: Hans de Goede Date: Sat Oct 26 22:24:33 2019 +0200 ACPI: button: Turn lid_blacklst DMI table into a generic quirk table Commit 3540c32a9ae4 ("ACPI / button: Add quirks for initial lid state notification") added 3 different modes to the LID handling code to deal with various buggy implementations. Until now users which need one of the 2 non-default modes to get their HW to work have to pass a kernel commandline option for this. E.g. https://bugzilla.kernel.org/show_bug.cgi?id=106151 was closed with a note that the user has to add "button.lid_init_state=open" to the kernel commandline to get the LID code to not cause undesirable suspends on his Samsung N210 Plus. This commit modifies the existing lid_blacklst DMI table so that it can be used not only to completely disable the LID code on devices where the ACPI tables are broken beyond repair, but also to select one of the 2 non default LID handling modes on devices where this is necessary. This will allow us to add quirks to make the LID work OOTB on broken devices. Getting this working OOTB is esp. important because the typical breakage is false LID closed reporting, causing undesirable suspends which basically make the system unusable. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 593681e2c75f59f23cf6f6cefc4f00cae2a4522b Author: Hans de Goede Date: Sat Oct 26 22:24:32 2019 +0200 ACPI: button: Allow disabling LID support with the lid_init_state module option Add a new "disabled" value for the lid_init_state module option, which can be used to disable LID support on devices where it is completely broken. Sometimes devices seem to spontaneously suspend and the cause for this is not clear. The LID switch is known to be one possible cause for this, this commit allows easily disabling the LID switch for testing if it is the cause. For example some devices which do not even have a lid, still have a LID device in their ACPI tables, pointing to a floating GPIO. This is not really related to the initial LID state, but re-using the existing option keeps things simple and it will make it much easier to add DMI quirks which can either disable the LID completely or set another non-default lid_init_state value, both of which are necessary on some devices. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 065bd4d35b3fb4484c61fc40a51eeffd5abe52e8 Author: Hans de Goede Date: Sat Oct 26 22:24:31 2019 +0200 ACPI: button: Refactor lid_init_state module parsing code Replace the weird strncmp() calls in param_set_lid_init_state(), which look to me like they will also accept things like "opennnn" to use sysfs_match_string instead. Also rewrite param_get_lid_init_state() using the new lid_init_state_str array. Instead of doing a straightforward one line replacement, e.g. : return sprintf(buffer, lid_init_state_str[lid_init_state]); print all possible values, putting [] around the selected value, so that users can easily find out what the possible values are. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 09fe6b528886c0d07ce539b837749edcc46618d0 Author: Keyon Jie Date: Fri Oct 25 17:40:58 2019 -0500 ASoC: SOF: reset default d0_substate at probe() and resume() We initialize/reset d0_substate to default d0i0 value when doing transition D3-->D0, e.g. at success of probing and resuming. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4c19030c511fd6eab029bae838f736256d2f43cd Author: Keyon Jie Date: Fri Oct 25 17:40:57 2019 -0500 ASoC: SOF: add a field to store the current D0 substate of DSP Add field d0_substate to struct snd_sof_dev to store the current DSP D0 sub-state(only meaningful when DSP in D0), which could be D0I0 or D0I3. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191025224122.7718-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5db8617ba7e8fcda1c5dd310c62ac8d31eaf9eae Author: Kuninori Morimoto Date: Mon Oct 28 14:29:55 2019 +0900 ASoC: rsnd: core.c: add WARN_ON() on rsnd_channel_normalization() chan > 8 or chan < 0 shouldn't happen. This patch uses WARN_ON() for such case. Reported-by: Pavel Machek Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y2x530a4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 515f60004ed985d2b2f03659365752e0b6142986 Author: Jason Gunthorpe Date: Sat Jun 8 12:25:14 2019 +0300 RDMA/hns: Prevent undefined behavior in hns_roce_set_user_sq_size() The "ucmd->log_sq_bb_count" variable is a user controlled variable in the 0-255 range. If we shift more than then number of bits in an int then it's undefined behavior (it shift wraps), and potentially the int could become negative. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Link: https://lore.kernel.org/r/20190608092514.GC28890@mwanda Reported-by: Dan Carpenter Signed-off-by: Jason Gunthorpe Reviewed-by: Dan Carpenter commit dd7dafd1ad50aa9ed7958235431f243ea131ee7d Author: Paul E. McKenney Date: Sat Sep 14 03:39:22 2019 -0700 rcu: Make kernel-mode nohz_full CPUs invoke the RCU core processing If a nohz_full CPU is idle or executing in userspace, it makes good sense to keep it out of RCU core processing. After all, the RCU grace-period kthread can see its quiescent states and all of its callbacks are offloaded, so there is nothing for RCU core processing to do. However, if a nohz_full CPU is executing in kernel space, the RCU grace-period kthread cannot do anything for it, so such a CPU must report its own quiescent states. This commit therefore makes nohz_full CPUs skip RCU core processing only if the scheduler-clock interrupt caught them in idle or in userspace. Signed-off-by: Paul E. McKenney commit ed93dfc6bc0084485ccad1ff6bd2ea81ab2c03cd Author: Paul E. McKenney Date: Fri Sep 13 14:09:56 2019 -0700 rcu: Confine ->core_needs_qs accesses to the corresponding CPU Commit 671a63517cf9 ("rcu: Avoid unnecessary softirq when system is idle") fixed a bug that could result in an indefinite number of unnecessary invocations of the RCU_SOFTIRQ handler at the trailing edge of a scheduler-clock interrupt. However, the fix introduced off-CPU stores to ->core_needs_qs. These writes did not conflict with the on-CPU stores because the CPU's leaf rcu_node structure's ->lock was held across all such stores. However, the loads from ->core_needs_qs were not promoted to READ_ONCE() and, worse yet, the code loading from ->core_needs_qs was written assuming that it was only ever updated by the corresponding CPU. So operation has been robust, but only by luck. This situation is therefore an accident waiting to happen. This commit therefore takes a different approach. Instead of clearing ->core_needs_qs from the grace-period kthread's force-quiescent-state processing, it modifies the rcu_pending() function to suppress the rcu_sched_clock_irq() function's call to invoke_rcu_core() if there is no grace period in progress. This avoids the infinite needless RCU_SOFTIRQ handlers while still keeping all accesses to ->core_needs_qs local to the corresponding CPU. Signed-off-by: Paul E. McKenney commit 516e5ae0c94016294d3ef175454215b235d03945 Author: Joel Fernandes (Google) Date: Thu Sep 5 10:26:41 2019 -0700 rcu: Reset CPU hints when reporting a quiescent state In some cases, tracing shows that need_heavy_qs is still set even though urgent_qs was cleared upon reporting of a quiescent state. One such case is when the softirq reports that a CPU has passed quiescent state. Commit 671a63517cf9 ("rcu: Avoid unnecessary softirq when system is idle") fixed a bug where core_needs_qs was not being cleared. In order to avoid running into similar situations with the urgent-grace-period flags, this commit causes rcu_disable_urgency_upon_qs(), previously rcu_disable_tick_upon_qs(), to clear the urgency hints, ->rcu_urgent_qs and ->rcu_need_heavy_qs. Note that it is possible for CPUs to go offline with these urgency hints still set. This is handled because rcu_disable_urgency_upon_qs() is also invoked during the online process. Because these hints can be cleared both by the corresponding CPU and by the grace-period kthread, this commit also adds a number of READ_ONCE() and WRITE_ONCE() calls. Tested overnight with rcutorture running for 60 minutes on all configurations of RCU. Signed-off-by: "Joel Fernandes (Google)" [ paulmck: Clear urgency flags in rcu_disable_urgency_upon_qs(). ] [ paulmck: Remove ->core_needs_qs from the set cleared at quiescent state. ] [ paulmck: Make rcu_disable_urgency_upon_qs static per kbuild test robot. ] Signed-off-by: Paul E. McKenney commit b200a0489517d9e5a52e983183e890f573454ebd Author: Paul E. McKenney Date: Thu Aug 15 13:24:49 2019 -0700 rcu: Force nohz_full tick on upon irq enter instead of exit There is interrupt-exit code that forces on the tick for nohz_full CPUs failing to respond to the current grace period in a timely fashion. However, this code must compare ->dynticks_nmi_nesting to the value 2 in the interrupt-exit fastpath. This commit therefore moves this code to the interrupt-entry fastpath, where a lighter-weight comparison to zero may be used. Reported-by: Joel Fernandes [ paulmck: Apply Joel Fernandes TICK_DEP_MASK_RCU->TICK_DEP_BIT_RCU fix. ] Signed-off-by: Paul E. McKenney commit 66e4c33b51bc515ca803c0948cf1525b53ffd631 Author: Paul E. McKenney Date: Mon Aug 12 16:14:00 2019 -0700 rcu: Force tick on for nohz_full CPUs not reaching quiescent states CPUs running for long time periods in the kernel in nohz_full mode might leave the scheduling-clock interrupt disabled for then full duration of their in-kernel execution. This can (among other things) delay grace periods. This commit therefore forces the tick back on for any nohz_full CPU that is failing to pass through a quiescent state upon return from interrupt, which the resched_cpu() will induce. Reported-by: Joel Fernandes [ paulmck: Clear ->rcu_forced_tick as reported by Joel Fernandes testing. ] [ paulmck: Apply Joel Fernandes TICK_DEP_MASK_RCU->TICK_DEP_BIT_RCU fix. ] Signed-off-by: Paul E. McKenney commit 01d035d796fec0ab23dc3f3a3a9f58bbe034fc5b Author: Christian Borntraeger Date: Sun Oct 27 09:19:50 2019 +0100 KVM: arm/arm64: Show halt poll counters in debugfs ARM/ARM64 has counters halt_successful_poll, halt_attempted_poll, halt_poll_invalid, and halt_wakeup but never exposed those in debugfs. Signed-off-by: Christian Borntraeger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1572164390-5851-1-git-send-email-borntraeger@de.ibm.com commit 72ebb53bbaba7a59c890fdcc5ba55980ed9da1b7 Author: Anson Huang Date: Thu Oct 17 11:13:04 2019 +0800 arm64: dts: imx8mn: Add LPDDR4 EVK board support i.MX8MN LPDDR4 EVK board shares most of the device as DDR4 EVK board, the ONLY difference are the DDR type and PMIC, add support for it and make it default i.MX8MN EVK board as usual. The PMIC driver is NOT ready, so cpu-freq needs to be disabled as it depends on regulator provided by PMIC. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 791b02da0a7077878e236862c9fe94659a70b991 Author: Anson Huang Date: Thu Oct 17 11:13:02 2019 +0800 arm64: dts: imx8mn: Create EVK dtsi file for common use i.MX8MN has different EVK boards to support different DDR types, the ONLY differences are DDR chips and PMIC, so most of the devices can be shared between these EVK boards, create a EVK dtsi file for common use. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 0bd0512d06928869690c3a0c40a6c3e70dd49929 Author: Anson Huang Date: Wed Oct 16 10:14:26 2019 +0800 arm64: dts: imx8mn: Move usdhc clocks assignment to board DT usdhc's clock rate is different according to different devices connected, so clock rate assignment should be placed in board DT according to different devices connected on each usdhc port. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 03750c3796ccf19720ef49561b62b5bfda0cd397 Author: Anson Huang Date: Wed Oct 16 10:14:25 2019 +0800 arm64: dts: imx8mm: Move usdhc clocks assignment to board DT usdhc's clock rate is different according to different devices connected, so clock rate assignment should be placed in board DT according to different devices connected on each usdhc port. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit e045f044e84ef9d500b4477f8e67875e5cb3fc21 Author: Anson Huang Date: Wed Oct 16 10:14:24 2019 +0800 arm64: dts: imx8mq: Move usdhc clocks assignment to board DT usdhc's clock rate is different according to different devices connected, so clock rate assignment should be placed in board DT according to different devices connected on each usdhc port. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 3944b454f7fabea3ec8310e30e023102329fc85f Author: Anson Huang Date: Wed Oct 16 10:14:23 2019 +0800 arm64: dts: imx8qxp: Move usdhc clocks assignment to board DT usdhc's clock rate is different according to different devices connected, so clock rate assignment should be placed in board DT according to different devices connected on each usdhc port. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit bc66392d82581fd9c863cf4e02e9b63baf0723bc Author: Stoica Cosmin-Stefan Date: Wed Oct 16 15:48:26 2019 +0300 arm64: dts: fsl: Add device tree for S32V234-EVB Add initial version of device tree for S32V234-EVB, including nodes for the 4 Cortex-A53 cores, AIPS bus with UART modules, ARM architected timer and Generic Interrupt Controller (GIC). Keep SoC level separate from board level to let future boards with this SoC share common properties, while the dts files will keep board-dependent properties. Signed-off-by: Stoica Cosmin-Stefan Signed-off-by: Mihaela Martinas Signed-off-by: Dan Nica Signed-off-by: Larisa Grigore Signed-off-by: Phu Luu An Signed-off-by: Stefan-Gabriel Mirea Signed-off-by: Shawn Guo commit e8b395b23643ca26e62a3081130d895e198c6154 Author: S.j. Wang Date: Wed Oct 16 10:36:05 2019 +0000 arm64: dts: imx8mm-evk: Assigned clocks for audio plls Assign clocks and clock-rates for audio plls, that audio drivers can utilize them. Add dai-tdm-slot-num and dai-tdm-slot-width for sound-wm8524, that sai driver can generate correct bit clock. Fixes: 13f3b9fdef6c ("arm64: dts: imx8mm-evk: Enable audio codec wm8524") Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit 4c997d12e66936217acdda0bd734da4df58e3a66 Author: Andrey Smirnov Date: Tue Oct 15 08:26:54 2019 -0700 arm64: dts: zii-ultra: Add node for switch watchdog Add I2C node for switch watchdog present on both Zest and RMB3 boards. Signed-off-by: Andrey Smirnov Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org, Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit 2600069fabaf47d63fbe47ebbfb79f1f24d8f428 Author: Andrey Smirnov Date: Tue Oct 15 08:26:53 2019 -0700 arm64: dts: zii-ultra: Add node for accelerometer Add I2C node for accelerometer present on both Zest and RMB3 boards. Signed-off-by: Andrey Smirnov Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org, Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit 032c10aef5c0b1acd6a867456ffa2231cf1f7327 Author: Andrey Smirnov Date: Tue Oct 15 08:26:52 2019 -0700 arm64: dts: zii-ultra: Fix regulator-3p3-main's name It's 3V3_MAIN, not 3V3V_MAIN on schematic. Fix it. Signed-off-by: Andrey Smirnov Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org, Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit 7270a6b67fb48e1a178be544349c527d272b08ca Author: Andrey Smirnov Date: Tue Oct 15 08:26:51 2019 -0700 arm64: dts: zii-ultra: Fix regulator-vsd-3v3's vin-supply Regulator-vsd-3v3 is supplied via GEN_3V3 rail which is an output of an "always on" load switch supplied by 3V3_MAIN. GEN_3V3 is also used as vin-supply by a number of peripherals, so adding it also allows us to follow the schematic more closely. Signed-off-by: Andrey Smirnov Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org, Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit 91035cb05fb2ae62000b085ab2257c5a3e087170 Author: Wen He Date: Mon Oct 14 15:13:27 2019 +0800 arm64: dts: ls1028a: Update #clock-cells of dpclk node Update the property #clock-cells = <1> to #clock-cells = <0> of the dpclk, since the Display output pixel clock driver provides single clock output. Signed-off-by: Wen He Signed-off-by: Shawn Guo commit 5363eaaeb8e58ad0e73f0dbabd58f5fadca86735 Author: Yuantian Tang Date: Thu Oct 10 16:30:22 2019 +0800 arm64: dts: lx2160a: add tmu device node Add the TMU (Thermal Monitoring Unit) device node to enable TMU feature. Signed-off-by: Yuantian Tang Signed-off-by: Shawn Guo commit 7ae399b7d009c7348b9451ac41cd49671b31cf3a Author: Anson Huang Date: Fri Oct 25 14:56:23 2019 +0800 soc: imx-scu: Using existing serial_number instead of UID The soc_device_attribute structure already contains a serial_number attribute to show SoC's unique ID, just use it to show SoC's unique ID instead of creating a new file called soc_uid. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit a0708f559e4fa2239b84e927e661d26e6864e185 Author: Anson Huang Date: Fri Oct 25 14:56:22 2019 +0800 soc: imx8: Using existing serial_number instead of UID The soc_device_attribute structure already contains a serial_number attribute to show SoC's unique ID, just use it to show SoC's unique ID instead of creating a new file called soc_uid. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 8267ff89b71317407f2c6938bd66f3a87070e45f Author: Anson Huang Date: Mon Oct 28 17:16:01 2019 +0800 ARM: imx: Add serial number support for i.MX6/7 SoCs i.MX6/7 SoCs have a 64-bit SoC unique ID stored in OCOTP, it can be used as SoC serial number, add this support for i.MX6Q/6DL/6SL/6SX/6SLL/6UL/6ULL/6ULZ/7D, see below example on i.MX6Q: root@imx6qpdlsolox:~# cat /sys/devices/soc0/serial_number 240F31D4E1FDFCA7 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 693463e8340d55af4baed3b0721f9d8f5350a18a Author: YueHaibing Date: Wed Oct 23 15:06:18 2019 +0800 ieee802154: remove set but not used variable 'status' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ieee802154/cc2520.c:221:5: warning: variable status set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Stefan Schmidt commit d4c9be5142cd672a0e80a831e607c1e55e222f78 Author: Oliver Graute Date: Thu Oct 24 09:22:37 2019 +0000 dt-bindings: arm: fsl: Document Variscite i.MX6q devicetree Document the Variscite i.MX6qdl board devicetree binding already supported: - variscite,dt6customboard Signed-off-by: Oliver Graute Cc: Shawn Guo Cc: Neil Armstrong Signed-off-by: Shawn Guo commit 1d00a67c2da2d8d82e6dcc5b398d9f6db656d9be Author: Lingling Xu Date: Mon Oct 28 18:10:31 2019 +0800 spi: sprd: adi: Set BIT_WDG_NEW bit when rebooting When rebooting system, the PMIC watchdog time loading may not be loaded correctly when another system is feeding the PMIC watchdog, since we did not check the watchdog busy status before loading time values. Thus we should set the BIT_WDG_NEW bit before loading time values, that can support multiple loads without checking busy status to make sure the time values can be loaded successfully to avoid this potential issue. Signed-off-by: Lingling Xu Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/5655318a7252c9ea518c2f7950a61228ab8f42bf.1572257085.git.baolin.wang@linaro.org Signed-off-by: Mark Brown commit 91ea1d70607e374b014b4b9bea771ce661f9f64b Author: Lingling Xu Date: Mon Oct 28 18:10:30 2019 +0800 spi: sprd: adi: Add missing lock protection when rebooting When rebooting the system, we should lock the watchdog after configuration to make sure the watchdog can reboot the system successfully. Signed-off-by: Lingling Xu Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/7b04711127434555e3a1a86bc6be99860cd86668.1572257085.git.baolin.wang@linaro.org Signed-off-by: Mark Brown commit e381bfe45a891a5894465f072c5bbf3ed3e33b8a Author: Dmitry Osipenko Date: Fri Oct 25 03:22:40 2019 +0300 regulator: core: Allow generic coupling only for always-on regulators The generic voltage balancer doesn't work correctly if one of regulator couples turns off. Currently there are no users in kernel for that case, although let's explicitly show that this case is unsupported for those who will try to use that feature. Link: https://lore.kernel.org/linux-samsung-soc/20191008170503.yd6GscYPLxjgrXqDuCO7AJc6i6egNZGJkVWHLlCxvA4@z/ Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20191025002240.25288-2-digetx@gmail.com Signed-off-by: Mark Brown commit 24f52149230454249ae628b922f741036e83b84c Author: Leon Romanovsky Date: Sun Oct 20 10:15:56 2019 +0300 RDMA/cm: Update copyright together with SPDX tag Add Mellanox to lust of copyright holders and replace copyright boilerplate with relevant SPDX tag. Link: https://lore.kernel.org/r/20191020071559.9743-4-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit a916051191a3080b3124e77199126a032c327303 Author: Leon Romanovsky Date: Sun Oct 20 10:15:55 2019 +0300 RDMA/cm: Use specific keyword to check define There is a specific define keyword to check if define exists or not, let's use it instead of open-coded variant. Link: https://lore.kernel.org/r/20191020071559.9743-3-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 8d625101a74087a29b7c7760959e4036b27ea735 Author: Leon Romanovsky Date: Sun Oct 20 10:15:54 2019 +0300 RDMA/cm: Delete unused cm_is_active_peer function Function cm_is_active_peer is not used, delete it. Link: https://lore.kernel.org/r/20191020071559.9743-2-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 26c2c997aa1a6c5522f6619910ba025e53e69763 Author: Dmitry Osipenko Date: Fri Oct 25 03:22:39 2019 +0300 regulator: core: Release coupled_rdevs on regulator_init_coupling() error This patch fixes memory leak which should happen if regulator's coupling fails to initialize. Fixes: d8ca7d184b33 ("regulator: core: Introduce API for regulators coupling customization") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20191025002240.25288-1-digetx@gmail.com Signed-off-by: Mark Brown commit 35dac627471938eda89fa39ee4ead1f7667e0f57 Author: Shengjiu Wang Date: Mon Oct 28 17:11:05 2019 +0800 ASoC: fsl_esai: Add spin lock to protect reset, stop and start xrun may happen at the end of stream, the trigger->fsl_esai_trigger_stop maybe called in the middle of fsl_esai_hw_reset, this may cause esai in wrong state after stop, and there may be endless xrun interrupt. This issue may also happen with trigger->fsl_esai_trigger_start. So Add spin lock to lock those functions. Fixes: 7ccafa2b3879 ("ASoC: fsl_esai: recover the channel swap after xrun") Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/52e92c4221a83e39a84a6cd92fc3d5479b44894c.1572252321.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit b39eb1e250c32c695a780f1814086f2bfa0fb593 Author: Shengjiu Wang Date: Mon Oct 28 17:10:29 2019 +0800 ASoC: fsl_asrc: refine the setting of internal clock divider The output divider should align with the output sample rate, if use ideal sample rate, there will be a lot of overload, which would cause underrun. The maximum divider of asrc clock is 1024, but there is no judgement for this limitation in driver, which may cause the divider setting not correct. For non-ideal ratio mode, the clock rate should divide the sample rate with no remainder, and the quotient should be less than 1024. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/23c634e4bf58afce5b3ae67f5f42e8d1cae2639a.1572252307.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 15747a80207585fe942416025540c0ff34e2aef8 Author: Brent Lu Date: Fri Oct 25 17:11:31 2019 +0800 ASoC: eve: implement set_bias_level function for rt5514 The first DMIC capture always fail (zero sequence data from PCM port) after using DSP hotwording function (i.e. Google assistant). This rt5514 codec requires to control mclk directly in the set_bias_level function. Implement this function in machine driver to control the ssp1_mclk clock explicitly could fix this issue. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/1571994691-20199-1-git-send-email-brent.lu@intel.com Signed-off-by: Mark Brown commit 24d05966b560b88d37d90e64f018af2fed888104 Author: YueHaibing Date: Fri Oct 25 20:08:01 2019 +0800 ASoC: sunxi: sun4i-codec: remove unneeded semicolon remove unneeded semicolon. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191025120801.16236-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit d3de1eb461e5bac0b07f5c785e6e0d959915df96 Author: Michael Ellerman Date: Fri Oct 25 16:13:53 2019 +1100 ASoC: fsl: fsl_dma: fix build failure Commit 4ac85de9977e ("ASoC: fsl: fsl_dma: remove snd_pcm_ops") removed fsl_dma_ops but left a usage, leading to a build error for some configs, eg. mpc85xx_defconfig: sound/soc/fsl/fsl_dma.c: In function ‘fsl_soc_dma_probe’: sound/soc/fsl/fsl_dma.c:905:18: error: ‘fsl_dma_ops’ undeclared (first use in this function) dma->dai.ops = &fsl_dma_ops; ^~~~~~~~~~~ Remove the usage to fix the build. Fixes: 4ac85de9977e ("ASoC: fsl: fsl_dma: remove snd_pcm_ops") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191025051353.2878-1-mpe@ellerman.id.au Signed-off-by: Mark Brown commit 3f2aef10ffad76c31275ae66b1d6e486b22619d6 Author: Joe Perches Date: Thu Oct 24 11:32:12 2019 -0700 mac80211: fix a typo of "function" Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/4d53be6c963542878d370ff1a6dc7c3a89b28d23.camel@perches.com Signed-off-by: Johannes Berg commit ae4a50ee3151d6cb11c56297699ca9025eb18077 Author: Chris Packham Date: Fri Oct 25 10:36:47 2019 +1300 mac80211: typo fixes in kerneldoc comments Correct some trivial typos in kerneldoc comments. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20191024213647.5507-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Johannes Berg commit 5a884be5478990ed013c2b160d90615426848c61 Author: Krzysztof Wilczynski Date: Thu Sep 5 14:32:02 2019 +0200 drm/exynos: Move static keyword to the front of declaration Move the static keyword to the front of declaration of modes, and resolve the following compiler warning that can be seen when building with warnings enabled (W=1): drivers/gpu/drm/exynos/exynos_mixer.c:1074:2: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: Krzysztof Wilczynski Signed-off-by: Inki Dae commit c58ff643763c78bef12874ee39995c9f7f987bc2 Author: Daniel Thompson Date: Fri Oct 25 08:33:28 2019 +0100 kdb: Tweak escape handling for vi users Currently if sequences such as "\ehelp\r" are delivered to the console then the h gets eaten by the escape handling code. Since pressing escape becomes something of a nervous twitch for vi users (and that escape doesn't have much effect at a shell prompt) it is more helpful to emit the 'h' than the '\e'. We don't simply choose to emit the final character for all escape sequences since that will do odd things for unsupported escape sequences (in other words we retain the existing behaviour once we see '\e['). Signed-off-by: Daniel Thompson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20191025073328.643-6-daniel.thompson@linaro.org commit 746078b33492a7429ff2a0d8f0474b27005152d7 Author: Chris Wilson Date: Sun Oct 27 22:58:05 2019 +0000 drm/i915/selftests: Exercise adjusting rpcs over all render-class engines Iterate over all user-accessible render engines when checking whether they can be adjusted for sseu. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191027225808.19437-2-chris@chris-wilson.co.uk commit cdca8d8900dd33ce6b8b526e247d2a6009d05de0 Author: Daniel Thompson Date: Fri Oct 25 08:33:27 2019 +0100 kdb: Improve handling of characters from different input sources Currently if an escape timer is interrupted by a character from a different input source then the new character is discarded and the function returns '\e' (which will be discarded by the level above). It is hard to see why this would ever be the desired behaviour. Fix this to return the new character rather than the '\e'. This is a bigger refactor than might be expected because the new character needs to go through escape sequence detection. Signed-off-by: Daniel Thompson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20191025073328.643-5-daniel.thompson@linaro.org commit 4f27e824bf83dfc2f6dc1a54fae419be7cd335af Author: Daniel Thompson Date: Fri Oct 25 08:33:26 2019 +0100 kdb: Remove special case logic from kdb_read() kdb_read() contains special case logic to force it exit after reading a single character. We can remove all the special case logic by directly calling the function to read a single character instead. This also allows us to tidy up the function prototype which, because it now matches getchar(), we can also rename in order to make its role clearer. This does involve some extra code to handle btaprompt properly but we don't mind the new lines of code here because the old code had some interesting problems (bad newline handling, treating unexpected characters like ). Signed-off-by: Daniel Thompson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20191025073328.643-4-daniel.thompson@linaro.org commit d04213af90935d8b247c1327c9ea142fc037165f Author: Daniel Thompson Date: Fri Oct 25 08:33:25 2019 +0100 kdb: Simplify code to fetch characters from console Currently kdb_read_get_key() contains complex control flow that, on close inspection, turns out to be unnecessary. In particular: 1. It is impossible to enter the branch conditioned on (escape_delay == 1) except when the loop enters with (escape_delay == 2) allowing us to combine the branches. 2. Most of the code conditioned on (escape_delay == 2) simply modifies local data and then breaks out of the loop causing the function to return escape_data[0]. 3. Based on #2 there is not actually any need to ever explicitly set escape_delay to 2 because we it is much simpler to directly return escape_data[0] instead. 4. escape_data[0] is, for all but one exit path, known to be '\e'. Simplify the code based on these observations. There is a subtle (and harmless) change of behaviour resulting from this simplification: instead of letting the escape timeout after ~1998 milliseconds we now timeout after ~2000 milliseconds Signed-off-by: Daniel Thompson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20191025073328.643-3-daniel.thompson@linaro.org commit 53b63136e81220cb2f8b541c03a1df9199896821 Author: Daniel Thompson Date: Fri Oct 25 08:33:24 2019 +0100 kdb: Tidy up code to handle escape sequences kdb_read_get_key() has extremely complex break/continue control flow managed by state variables and is very hard to review or modify. In particular the way the escape sequence handling interacts with the general control flow is hard to follow. Separate out the escape key handling, without changing the control flow. This makes the main body of the code easier to review. Signed-off-by: Daniel Thompson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20191025073328.643-2-daniel.thompson@linaro.org commit 6804da20bb549e3dbe5033b3c7837c23260add5b Author: Chris Wilson Date: Sun Oct 27 22:58:08 2019 +0000 drm/i915/selftests: Select a random engine for testing memory regions Use any blitter engine at random for prefilling the memory region. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191027225808.19437-5-chris@chris-wilson.co.uk commit f324c952902e64e1784f83217d427ba43d801ec4 Author: Fabio Estevam Date: Thu Oct 24 18:57:12 2019 -0300 ARM: dts: imx53-qsb: Use DRM bindings for the Seiko 43WVF1G panel Currently the parallel panel that is supported is the CLAA WVGA panel, which is the one that comes with the i.MX51 Babbage board. The default parallel panel that goes with the imx53-qsb board is the Seiko 43WVF1G LCD, so switch to the Seiko one. While at it convert to DRM bindings. The parallel display still remains disabled as the default display port is the TVE output. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit d44f821b0e13275735e8f3fe4db8703b45f05d52 Author: Liang, Kan Date: Tue Oct 22 11:13:09 2019 +0200 perf/core: Optimize perf_init_event() for TYPE_SOFTWARE Andi reported that he was hitting the linear search in perf_init_event() a lot. Now that all !TYPE_SOFTWARE events should hit the IDR, make sure the TYPE_SOFTWARE events are at the head of the list such that we'll quickly find the right PMU (provided a valid event was given). Signed-off-by: Liang, Kan Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar commit ff84e9deaed387622ffe983540f11d491046f451 Author: Geert Uytterhoeven Date: Thu Oct 24 16:44:43 2019 +0200 ARM: dts: imx53: Spelling s/configration/configuration/ Fix misspelling of "configuration". Signed-off-by: Geert Uytterhoeven Signed-off-by: Shawn Guo commit 66d258c5b048840991de49697264af75f5b09def Author: Peter Zijlstra Date: Thu Oct 17 20:31:03 2019 +0200 perf/core: Optimize perf_init_event() Andi reported that he was hitting the linear search in perf_init_event() a lot. Make more agressive use of the IDR lookup to avoid hitting the linear search. With exception of PERF_TYPE_SOFTWARE (which relies on a hideous hack), we can put everything in the IDR. On top of that, we can alias TYPE_HARDWARE and TYPE_HW_CACHE to TYPE_RAW on the lookup side. This greatly reduces the chances of hitting the linear search. Reported-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kan Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar commit db0503e4f6751f2c719d002ba1becd1811633e6e Author: Peter Zijlstra Date: Mon Oct 21 16:02:39 2019 +0200 perf/core: Optimize perf_install_in_event() Andi reported that when creating a lot of events, a lot of time is spent in IPIs and asked if it would be possible to elide some of that. Now when, as for example the perf-tool always does, events are created disabled, then these events will not need to be scheduled when added to the context (they're still disable) and therefore the IPI is not required -- except for the very first event, that will need to set ctx->is_active. ( It might be possible to set ctx->is_active remotely for cpu_ctx, but we really need the IPI for task_ctx, so lets not make that distinction. ) Also use __perf_effective_state() since group events depend on the state of the leader, if the leader is OFF, the whole group is OFF. So when sibling events are created enabled (XXX check tool) then we only need a single IPI to create and enable the whole group (+ that initial IPI to initialize the context). Suggested-by: Andi Kleen Reported-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Cc: kan.liang@linux.intel.com Signed-off-by: Ingo Molnar commit c2b98a8661514f29a44ebd0925cf4b1503beb48c Author: Alexey Budankov Date: Wed Oct 23 10:13:56 2019 +0300 perf/x86: Synchronize PMU task contexts on optimized context switches Install Intel specific PMU task context synchronization adapter and extend optimized context switch path with PMU specific task context synchronization to fix LBR callstack virtualization on context switches. Signed-off-by: Alexey Budankov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/9c6445a9-bdba-ef03-3859-f1f91198f27a@linux.intel.com Signed-off-by: Ingo Molnar commit 421ca868ea3b7c1ca1a541ed6dff3c101a563b95 Author: Alexey Budankov Date: Wed Oct 23 10:12:54 2019 +0300 perf/x86/intel: Implement LBR callstack context synchronization Implement intel_pmu_lbr_swap_task_ctx() method updating counters of the events that requested LBR callstack data on a sample. The counter can be zero for the case when task context belongs to a thread that has just come from a block on a futex and the context contains saved (lbr_stack_state == LBR_VALID) LBR register values. For the values to be restored at LBR registers on the next thread's switch-in event it swaps the counter value with the one that is expected to be non zero at the previous equivalent task perf event context. Swap operation type ensures the previous task perf event context stays consistent with the amount of events that requested LBR callstack data on a sample. Signed-off-by: Alexey Budankov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/261ac742-9022-c3f4-5885-1eae7415b091@linux.intel.com Signed-off-by: Ingo Molnar commit a44399703b4893de4eadb970867fd5efd4461514 Author: Alexey Budankov Date: Wed Oct 23 10:11:54 2019 +0300 perf/x86: Install platform specific ->swap_task_ctx() adapter Bridge perf core and x86 swap_task_ctx() method calls. Signed-off-by: Alexey Budankov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/b157e97d-32c3-aeaf-13ba-47350c677906@linux.intel.com Signed-off-by: Ingo Molnar commit fc1adfe306b71e094df636012f8c0fed971cad45 Author: Alexey Budankov Date: Wed Oct 23 10:11:04 2019 +0300 perf/core, perf/x86: Introduce swap_task_ctx() method at 'struct pmu' Declare swap_task_ctx() methods at the generic and x86 specific pmu types to bridge calls to platform specific PMU code on optimized context switch path between equivalent task perf event contexts. Signed-off-by: Alexey Budankov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/9a0aa84a-f062-9b64-3133-373658550c4b@linux.intel.com Signed-off-by: Ingo Molnar commit ca58f55108fee41d87c9123f85ad4863e5de7f45 Author: Takashi Iwai Date: Mon Oct 28 11:58:03 2019 +0100 ALSA: hda - Fix pending unsol events at shutdown This is an alternative fix attemp for the issue reported in the commit caa8422d01e9 ("ALSA: hda: Flush interrupts on disabling") that was reverted later due to regressions. Instead of tweaking the hardware disablement order and the enforced irq flushing, do calling cancel_work_sync() of the unsol work early enough, and explicitly ignore the unsol events during the shutdown by checking the bus->shutdown flag. Fixes: caa8422d01e9 ("ALSA: hda: Flush interrupts on disabling") Cc: Chris Wilson Link: https://lore.kernel.org/r/s5h1ruxt9cz.wl-tiwai@suse.de Signed-off-by: Takashi Iwai commit e2e556a9549eebde9797a04729efdfc54f37e5cc Merge: 0a671dc50055 1a7f60b9df61 Author: Takashi Iwai Date: Mon Oct 28 12:43:29 2019 +0100 Merge branch 'for-linus' into for-next Back-merge the development process for catching up the HD-audio fix (and apply a new one on top of that). Signed-off-by: Takashi Iwai commit 5a3e2b82af47ce43b7ea975c86d36b6f1226025f Author: Chris Wilson Date: Sun Oct 27 17:55:05 2019 +0000 drm/i915/gt: Tidy up rps irq handler to use intel_gt Since the rps is tied to its intel_gt, use that backpointer to find the right engine rather than delving into i915. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191027175505.25470-1-chris@chris-wilson.co.uk commit c8c197d42646c2a9ebc0ff114b4e916d12208d09 Author: Chris Wilson Date: Sun Oct 27 22:58:07 2019 +0000 drm/i915/selftests: Use a random engine for GEM coherency tests Select a random user accessible engine for checking coherency results. While we should check all engines, we use a random selection so that over repeated runs we cover all. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191027225808.19437-4-chris@chris-wilson.co.uk commit 65133033ee6ee34724ea3d82d5d1cfc6839ffdae Merge: 27a0a90d6301 652521d460cb Author: Ingo Molnar Date: Mon Oct 28 12:38:26 2019 +0100 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 96815f3d8b50542ab168d94f018461cfae93eae1 Author: Jani Nikula Date: Thu Oct 24 10:56:08 2019 +0300 drm/i915/bios: add compression parameter block definition Add definition for block 56, the compression parameters. v2: add missing slice_height (Vandita) Cc: Vandita Kulkarni Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191024075608.11511-1-jani.nikula@intel.com commit 72b2429d40d878bfdd066b9401c9a5cbb2a755d3 Author: Fancy Fang Date: Mon Oct 28 08:07:59 2019 +0000 clk: imx7ulp: do not export out IMX7ULP_CLK_MIPI_PLL clock The mipi pll clock comes from the MIPI PHY PLL output, so it should not be a fixed clock. MIPI PHY PLL is in the MIPI DSI space, and it is used as the bit clock for transferring the pixel data out and its output clock is configured according to the display mode. So it should be used only for MIPI DSI and not be exported out for other usages. Signed-off-by: Fancy Fang Signed-off-by: Shawn Guo commit 52aac377e782d0e082fba76ede20ad00000a768b Author: Chris Wilson Date: Sun Oct 27 22:58:06 2019 +0000 drm/i915/selftests: Check all blitter engines for client blt Check all user accessible engines that can blit work with our blitter client. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191027225808.19437-3-chris@chris-wilson.co.uk commit 1f9f6353e8b83676bbf23c2bbb07d447563e5e83 Author: Chris Wilson Date: Sun Oct 27 22:58:04 2019 +0000 drm/i915/selftests: Drop global engine lookup for gt selftests As we are inside the gt, we have a local gt->engine[] lookup we should be using in preference over the i915->engine[] copy. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191027225808.19437-1-chris@chris-wilson.co.uk commit 39f9547a339a261c74f845017654ced1de116b5f Author: Chris Wilson Date: Mon Oct 28 11:22:07 2019 +0000 drm/i915/selftests: Measure basic throughput of blit routines We need to verify that our blitter routines perform as expected, so measure it. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191028112207.5464-1-chris@chris-wilson.co.uk commit bfe298745afc9548ad9344a9a3f26c81fd1a76c4 Author: James Morse Date: Fri Oct 25 17:42:16 2019 +0100 arm64: entry-common: don't touch daif before bp-hardening The previous patches mechanically transformed the assembly version of entry.S to entry-common.c for synchronous exceptions. The C version of local_daif_restore() doesn't quite do the same thing as the assembly versions if pseudo-NMI is in use. In particular, | local_daif_restore(DAIF_PROCCTX_NOIRQ) will still allow pNMI to be delivered. This is not the behaviour do_el0_ia_bp_hardening() and do_sp_pc_abort() want as it should not be possible for the PMU handler to run as an NMI until the bp-hardening sequence has run. The bp-hardening calls were placed where they are because this was the first C code to run after the relevant exceptions. As we've now moved that point earlier, move the checks and calls earlier too. This makes it clearer that this stuff runs before any kind of exception, and saves modifying PSTATE twice. Signed-off-by: James Morse Reviewed-by: Mark Rutland Cc: Julien Thierry Signed-off-by: Catalin Marinas commit afa7c0e5b965cdb945ad8a2e2973c6d7e19969f9 Author: James Morse Date: Fri Oct 25 17:42:15 2019 +0100 arm64: Remove asmlinkage from updated functions Now that the callers of these functions have moved into C, they no longer need the asmlinkage annotation. Remove it. Signed-off-by: James Morse Acked-by: Mark Rutland Signed-off-by: Catalin Marinas commit 582f95835a8fc812cd38dce0447fe9386b78913e Author: Mark Rutland Date: Fri Oct 25 17:42:14 2019 +0100 arm64: entry: convert el0_sync to C This is largely a 1-1 conversion of asm to C, with a couple of caveats. The el0_sync{_compat} switches explicitly handle all the EL0 debug cases, so el0_dbg doesn't have to try to bail out for unexpected EL1 debug ESR values. This also means that an unexpected vector catch from AArch32 is routed to el0_inv. We *could* merge the native and compat switches, which would make the diffstat negative, but I've tried to stay as close to the existing assembly as possible for the moment. Signed-off-by: Mark Rutland [split out of a bigger series, added nokprobes. removed irq trace calls as the C helpers do this. renamed el0_dbg's use of FAR] Signed-off-by: James Morse Reviewed-by: Mark Rutland Cc: Julien Thierry Signed-off-by: Catalin Marinas commit ed3768db588291ddb5dc794daed12cc751373566 Author: Mark Rutland Date: Fri Oct 25 17:42:13 2019 +0100 arm64: entry: convert el1_sync to C This patch converts the EL1 sync entry assembly logic to C code. Doing this will allow us to make changes in a slightly more readable way. A case in point is supporting kernel-first RAS. do_sea() should be called on the CPU that took the fault. Largely the assembly code is converted to C in a relatively straightforward manner. Since all sync sites share a common asm entry point, the ASM_BUG() instances are no longer required for effective backtraces back to assembly, and we don't need similar BUG() entries. The ESR_ELx.EC codes for all (supported) debug exceptions are now checked in the el1_sync_handler's switch statement, which renders the check in el1_dbg redundant. This both simplifies the el1_dbg handler, and makes the EL1 exception handling more robust to currently-unallocated ESR_ELx.EC encodings. Signed-off-by: Mark Rutland [split out of a bigger series, added nokprobes, moved prototypes] Signed-off-by: James Morse Reviewed-by: Mark Rutland Cc: Julien Thierry Signed-off-by: Catalin Marinas commit 51077e03b8cef2a24d6582b8c54b718fced6878c Author: Mark Rutland Date: Fri Oct 25 17:42:12 2019 +0100 arm64: add local_daif_inherit() Some synchronous exceptions can be taken from a number of contexts, e.g. where IRQs may or may not be masked. In the entry assembly for these exceptions, we use the inherit_daif assembly macro to ensure that we only mask those exceptions which were masked when the exception was taken. So that we can do the same from C code, this patch adds a new local_daif_inherit() function, following the existing local_daif_*() naming scheme. Signed-off-by: Mark Rutland [moved away from local_daif_restore()] Signed-off-by: James Morse Signed-off-by: Catalin Marinas commit e540e0a7fa1ff889e37ca9af44eb44ec3d2c8a01 Author: James Morse Date: Fri Oct 25 17:42:11 2019 +0100 arm64: Add prototypes for functions called by entry.S Functions that are only called by assembly don't always have a C header file prototype. Add the prototypes before moving the assembly callers to C. Signed-off-by: James Morse Acked-by: Mark Rutland Signed-off-by: Catalin Marinas commit b6e43c0e3129ffe87e65c85f20fcbdf0eb86fba0 Author: James Morse Date: Fri Oct 25 17:42:10 2019 +0100 arm64: remove __exception annotations Since commit 732674980139 ("arm64: unwind: reference pt_regs via embedded stack frame") arm64 has not used the __exception annotation to dump the pt_regs during stack tracing. in_exception_text() has no callers. This annotation is only used to blacklist kprobes, it means the same as __kprobes. Section annotations like this require the functions to be grouped together between the start/end markers, and placed according to the linker script. For kprobes we also have NOKPROBE_SYMBOL() which logs the symbol address in a section that kprobes parses and blacklists at boot. Using NOKPROBE_SYMBOL() instead lets kprobes publish the list of blacklisted symbols, and saves us from having an arm64 specific spelling of __kprobes. do_debug_exception() already has a NOKPROBE_SYMBOL() annotation. Signed-off-by: James Morse Acked-by: Mark Rutland Acked-by: Masami Hiramatsu Signed-off-by: Catalin Marinas commit d78d5dace5398b542fd5a21b50db6e88ce7d392e Author: Aneesh Kumar K.V Date: Thu Oct 24 15:05:42 2019 +0530 powerpc/book3s64/hash: Use secondary hash for bolted mapping if the primary is full With bolted hash page table entry, kernel currently only use primary hash group when inserting the hash page table entry. In the rare case where kernel find all the 8 primary hash slot occupied by bolted entries, this can result in hash page table insert failure for bolted entries. Avoid this by using the secondary hash group. This is different from what kernel does for the non-bolted mapping. With non-bolted entries kernel will try secondary before removing an existing entry from hash page table group. With bolted prefer primary hash group and hence try to insert the page table entry by removing a slot from primary before trying the secondary hash group. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191024093542.29777-3-aneesh.kumar@linux.ibm.com commit 75838a3290cd4ebbd1f567f310ba04b6ef017ce4 Author: Aneesh Kumar K.V Date: Thu Oct 24 15:05:41 2019 +0530 powerpc/pseries: Don't fail hash page table insert for bolted mapping If the hypervisor returned H_PTEG_FULL for H_ENTER hcall, retry a hash page table insert by removing a random entry from the group. After some runtime, it is very well possible to find all the 8 hash page table entry slot in the hpte group used for mapping. Don't fail a bolted entry insert in that case. With Storage class memory a user can find this error easily since a namespace enable/disable is equivalent to memory add/remove. This results in failures as reported below: $ ndctl create-namespace -r region1 -t pmem -m devdax -a 65536 -s 100M libndctl: ndctl_dax_enable: dax1.3: failed to enable Error: namespace1.2: failed to enable failed to create namespace: No such device or address In kernel log we find the details as below: Unable to create mapping for hot added memory 0xc000042006000000..0xc00004200d000000: -1 dax_pmem: probe of dax1.3 failed with error -14 This indicates that we failed to create a bolted hash table entry for direct-map address backing the namespace. We also observe failures such that not all namespaces will be enabled with ndctl enable-namespace all command. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191024093542.29777-2-aneesh.kumar@linux.ibm.com commit 82ce028ad26dd075b06285ef61a854a564d910fb Author: Aneesh Kumar K.V Date: Thu Oct 24 15:05:40 2019 +0530 powerpc/pseries: Don't opencode HPTE_V_BOLTED No functional change in this patch. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191024093542.29777-1-aneesh.kumar@linux.ibm.com commit eb8e20f89093b64f48975c74ccb114e6775cee22 Author: Michael Ellerman Date: Sun Oct 13 21:23:51 2019 +1100 powerpc/pseries: Mark accumulate_stolen_time() as notrace accumulate_stolen_time() is called prior to interrupt state being reconciled, which can trip the warning in arch_local_irq_restore(): WARNING: CPU: 5 PID: 1017 at arch/powerpc/kernel/irq.c:258 .arch_local_irq_restore+0x9c/0x130 ... NIP .arch_local_irq_restore+0x9c/0x130 LR .rb_start_commit+0x38/0x80 Call Trace: .ring_buffer_lock_reserve+0xe4/0x620 .trace_function+0x44/0x210 .function_trace_call+0x148/0x170 .ftrace_ops_no_ops+0x180/0x1d0 ftrace_call+0x4/0x8 .accumulate_stolen_time+0x1c/0xb0 decrementer_common+0x124/0x160 For now just mark it as notrace. We may change the ordering to call it after interrupt state has been reconciled, but that is a larger change. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191024055932.27940-1-mpe@ellerman.id.au commit 58b12eb28e34d3dd8a2d6743c26bf941ca1fbf37 Author: Michael Ellerman Date: Tue May 28 18:16:14 2019 +1000 powerpc/configs: Rename foo_basic_defconfig to foo_base.config We have several "defconfigs" that are not actually full defconfigs they are just a base set of options which are then merged with other fragments to produce a working defconfig. The most obvious example is corenet_basic_defconfig which only contains one symbol CONFIG_CORENET_GENERIC=y. And in fact if you build it as a "defconfig" that one symbol ends up undefined, because its prerequisites are missing. There is also mpc85xx_base_defconfig which doesn't actually enable CONFIG_PPC_85xx. To avoid confusion, rename these config fragments to "foo_base.config" to make it clearer that they are not full defconfigs and are instaed just fragments that are used to generate real defconfigs. Reported-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190528081614.26096-1-mpe@ellerman.id.au commit c1bc6f93f95970f917caaac544a374862e84df52 Author: Andrew Donnellan Date: Thu Aug 1 14:58:55 2019 +1000 powerpc/configs: Add debug config fragment Add a debug config fragment that we can use to put useful debug options into. It can be used like: # make foo_defconfig # make debug.config Currently the only option included is to enable debugfs SCOM access. Suggested-by: Michael Ellerman Signed-off-by: Andrew Donnellan [mpe: Drop the special targets, just use the fragment directly] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190801045855.5822-1-ajd@linux.ibm.com commit 5f5d6e40a01e70b731df843d8b5a61b4b28b19d9 Author: Aneesh Kumar K.V Date: Tue Sep 17 18:08:51 2019 +0530 powerpc/nvdimm: Update vmemmap_populated to check sub-section range With commit: 7cc7867fb061 ("mm/devm_memremap_pages: enable sub-section remap") pmem namespaces are remapped in 2M chunks. On architectures like ppc64 we can map the memmap area using 16MB hugepage size and that can cover a memory range of 16G. While enabling new pmem namespaces, since memory is added in sub-section chunks, before creating a new memmap mapping, kernel should check whether there is an existing memmap mapping covering the new pmem namespace. Currently, this is validated by checking whether the section covering the range is already initialized or not. Considering there can be multiple namespaces in the same section this can result in wrong validation. Update this to check for sub-sections in the range. This is done by checking for all pfns in the range we are mapping. We could optimize this by checking only just one pfn in each sub-section. But since this is not fast-path we keep this simple. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190917123851.22553-1-aneesh.kumar@linux.ibm.com commit 69393cb03ccdf29f3b452d3482ef918469d1c098 Author: Christopher M. Riedl Date: Sat Sep 7 01:11:24 2019 -0500 powerpc/xmon: Restrict when kernel is locked down Xmon should be either fully or partially disabled depending on the kernel lockdown state. Put xmon into read-only mode for lockdown=integrity and prevent user entry into xmon when lockdown=confidentiality. Xmon checks the lockdown state on every attempted entry: (1) during early xmon'ing (2) when triggered via sysrq (3) when toggled via debugfs (4) when triggered via a previously enabled breakpoint The following lockdown state transitions are handled: (1) lockdown=none -> lockdown=integrity set xmon read-only mode (2) lockdown=none -> lockdown=confidentiality clear all breakpoints, set xmon read-only mode, prevent user re-entry into xmon (3) lockdown=integrity -> lockdown=confidentiality clear all breakpoints, set xmon read-only mode, prevent user re-entry into xmon Suggested-by: Andrew Donnellan Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190907061124.1947-3-cmr@informatik.wtf commit 96664dee5cf1815777286227b09884b4f019727f Author: Christopher M. Riedl Date: Sat Sep 7 01:11:23 2019 -0500 powerpc/xmon: Allow listing and clearing breakpoints in read-only mode Read-only mode should not prevent listing and clearing any active breakpoints. Tested-by: Daniel Axtens Reviewed-by: Daniel Axtens Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190907061124.1947-2-cmr@informatik.wtf commit 1d581dc3f50555a36219a192c9ea4d46abc40e70 Author: Ville Syrjälä Date: Thu Oct 24 15:21:37 2019 +0300 drm/i915: Add CHICKEN_TRANS_D Add CHICKEN_TRANS definition for transcoder D. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191024122138.25065-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 12c4d4c18c5dcc971dc4946cbceb7174320bd978 Author: Ville Syrjälä Date: Thu Oct 24 15:21:36 2019 +0300 drm/i915: Use _PICK() for CHICKEN_TRANS() Make CHICKEN_TRANS() a bit less special looking by using _PICK(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191024122138.25065-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 85d0c4b54fbd5383950ce364641883ea4ad45362 Author: Thierry Reding Date: Mon Jun 24 15:15:39 2019 +0200 drm/tegra: sor: Introduce audio enable/disable callbacks In order to support different modes (DP in addition to HDMI), split out the audio setup/teardown into callbacks. Signed-off-by: Thierry Reding commit a9087cf2e1994edb58418b1fd3bb2026a7d85c88 Author: Thierry Reding Date: Mon Jun 24 15:13:16 2019 +0200 drm/tegra: sor: Extract common audio enabling code The code to enable audio support is split into two parts, one being generic for the SOR and another part that is specific whether the SOR is in HDMI mode or in DP mode. Split out the common part in preparation for reusing the code in DP mode. Signed-off-by: Thierry Reding commit 68a2ebb54da4dfa2cc3a2239d2e2dfeec2c5e522 Author: Thierry Reding Date: Thu Jul 25 15:41:36 2019 +0200 drm/tegra: sor: Avoid timeouts on unplug events When the SOR is disabled in DP mode as part of an unplug event, do not attempt to power the DP link down. Powering down the link requires the DPAUX to transmit AUX messages which only works if there's a connected sink. Signed-off-by: Thierry Reding commit d278e4a9714d9c52429e670c5a3cf2e7ad7e67f9 Author: Thierry Reding Date: Thu Jun 27 12:34:57 2019 +0200 drm/tegra: sor: Unify eDP and DP support The SOR0 on Tegra210 does, contrary to what was previously assumed, in fact support DisplayPort. The difference between SOR0 and SOR1 is that the latter supports audio and HDCP over DP, whereas the former doesn't. The code for eDP and DP is now almost identical and the differences can easily be parameterized based on the presence of a panel. There is no need any longer to duplicate the code. Signed-off-by: Thierry Reding commit d23691f647855ff765c67d281ec73c59104d9eb1 Author: Thierry Reding Date: Wed Jul 24 17:10:31 2019 +0200 drm/tegra: sor: Use correct I/O pad for DP The correct I/O pad needs to be powered up before DP can be used. Make sure the correct default is set for Tegra generations where the I/O pad cannot be derived from the SOR instance. Signed-off-by: Thierry Reding commit 61417aaa11402f8363a806a7167c46041f44465e Author: Thierry Reding Date: Wed Jul 24 16:59:04 2019 +0200 drm/tegra: sor: Unify clock setup for eDP, HDMI and DP With the clocks modelled consistently across SoC generations, the clock setup for eDP, HDMI and DP can now be unified. Signed-off-by: Thierry Reding commit bae88815ad10c47d1cee96987733741795ef338d Author: Thierry Reding Date: Thu Jun 27 12:32:16 2019 +0200 drm/tegra: sor: Support DisplayPort on Tegra194 Reuse parameters from earlier generations to support DisplayPort on Tegra194. Signed-off-by: Thierry Reding commit 1c3cc0df8299d95a11421ab596b3e9cdcce1a77d Author: Thierry Reding Date: Thu Jun 27 12:29:56 2019 +0200 drm/tegra: sor: Deduplicate connector type detection code The connector type detection code is duplicated in two places. Keeping both places in sync is an extra maintenance burden that can be avoided by comparing the connector type operations that are set upon the first detection. Signed-off-by: Thierry Reding commit 4bdf4710e00a502347e33dc2454821fa9af2968b Author: Thierry Reding Date: Mon Jun 24 17:06:34 2019 +0200 drm/tegra: sor: Implement pad clock for all SOR instances So far the pad clock was only needed on the second SOR instance. The clock does exist for all SOR instances, though, so make sure it is always implemented. This prepares for further unification of the code in subsequent patches. Signed-off-by: Thierry Reding commit 24e64f86da40e68c5f58af08796110f147b12193 Author: Thierry Reding Date: Wed Jul 24 17:06:17 2019 +0200 drm/tegra: sor: Use correct SOR index on Tegra210 The device tree bindings for the Tegra210 SOR don't require the controller instance to be defined, since the instance can be derived from the compatible string. The index is never used on Tegra210, so we got away with it not getting set. However, subsequent patches will change that, so make sure the proper index is used. Signed-off-by: Thierry Reding commit b9b9e19762ac167312e17cf93965a46a8c8c3197 Author: Thierry Reding Date: Mon Mar 19 10:30:37 2018 +0100 drm/tegra: sor: Remove tegra186-sor1 support It turns out that SOR1 is just another instance of the same block as the SOR0, so there is no need to distinguish them. Signed-off-by: Thierry Reding commit 0472c21b83192c61dbac7ba98abe8decacbd1d59 Author: Thierry Reding Date: Tue Oct 15 14:59:37 2019 +0200 drm/tegra: sor: Add DisplayPort support Add support for regular DisplayPort on Tegra210 and Tegra186. Signed-off-by: Thierry Reding commit c9533131feebc153feef497ad189d22c00462f4c Author: Thierry Reding Date: Thu Feb 1 17:47:07 2018 +0100 drm/tegra: sor: Filter eDP rates The SOR found on Tegra SoCs does not support all the rates potentially advertised by eDP 1.4. Make sure that the rates that are not supported are filtered out. Signed-off-by: Thierry Reding commit 38b445bc135e7eb3aa7b05316020a1d5194554f9 Author: Thierry Reding Date: Mon Aug 3 15:53:08 2015 +0200 drm/tegra: sor: Stabilize eDP Rework eDP code to correspond more closely to what's documented. This also improves the reliability of modesets. Signed-off-by: Thierry Reding commit 6f684de537bcd813bcbdbc917c5b41b1fc5b7d8d Author: Thierry Reding Date: Tue Jul 21 16:59:28 2015 +0200 drm/tegra: sor: Hook up I2C-over-AUX to output This is necessary for the output abstraction to retrieve a list of valid modes from the EDID of a connected panel/monitor. This will be useful in conjunction with DisplayPort support that will be added in a subsequent patch, so that the driver can read EDID via the AUX channel. Signed-off-by: Thierry Reding commit c176393728c9fcd8f7ef842cb3e4cedda3f418a2 Author: Thierry Reding Date: Tue Oct 15 14:57:42 2019 +0200 drm/tegra: sor: Use DP link training helpers Make use of the DP link training helpers to implement full and fast link training. While at it, refactor some of the code and remove various code sequences that are not necessary. Signed-off-by: Thierry Reding commit 078c445733c1e8092e23391b251cad6b12f6156e Author: Thierry Reding Date: Tue Jul 7 21:21:48 2015 +0200 drm/tegra: dp: Add DisplayPort link training helper Add a helper that will perform link training as described in the DisplayPort specification. Signed-off-by: Thierry Reding commit 6a127160c4883abf3a54d97024eda8118849fd5c Author: Thierry Reding Date: Thu Feb 1 17:46:42 2018 +0100 drm/tegra: dp: Add support for eDP link rates Parses additional link rates from DPCD if the sink supports eDP 1.4. Signed-off-by: Thierry Reding commit 01f09f242eb5cb194a88cef669a099fa10fcb3f0 Author: Thierry Reding Date: Tue Jul 21 16:38:11 2015 +0200 drm/tegra: dp: Add drm_dp_link_choose() helper This helper chooses an appropriate configuration, according to the bitrate requirements of the video mode and the capabilities of the DisplayPort sink. Signed-off-by: Thierry Reding commit c4a27288520d35e7e6acc6e36fba4585e1bddde6 Author: Thierry Reding Date: Tue Jul 7 21:14:12 2015 +0200 drm/tegra: dp: Enable alternate scrambler reset when supported If the sink is eDP and supports the alternate scrambler reset, enable it. Signed-off-by: Thierry Reding commit 553769ff8d8c452cc81a5fe5b0a68cc456c31db3 Author: Thierry Reding Date: Wed Jun 10 16:35:44 2015 +0200 drm/tegra: dp: Set channel coding on link configuration Make use of ANSI 8B/10B channel coding if the DisplayPort sink supports it. Signed-off-by: Thierry Reding commit ad7f2dda38911698deb2cc9ea45362f9a127e3f4 Author: Thierry Reding Date: Tue Jul 7 21:01:26 2015 +0200 drm/tegra: dp: Read AUX read interval from DPCD Store the AUX read interval from DPCD, so that it can be used to wait for the durations given in the specification during link training. Signed-off-by: Thierry Reding commit 7aa3cc540d00b0be7d225202fa5c2d0c8e99f3f1 Author: Thierry Reding Date: Tue Jul 7 20:59:22 2015 +0200 drm/tegra: dp: Read eDP version from DPCD If the sink supports eDP, read the eDP revision from it's DPCD. Signed-off-by: Thierry Reding commit 4ff9ba5674d16857372b936a8d08920a9851d1cd Author: Thierry Reding Date: Mon Feb 5 15:16:18 2018 +0100 drm/tegra: dp: Read alternate scrambler reset capability from sink Parse from the sink capabilities whether or not the eDP alternate scrambler reset value of 0xfffe is supported. Signed-off-by: Thierry Reding commit 6c651b13e436030f996bcfb2f76833af94e44531 Author: Thierry Reding Date: Mon Feb 5 14:07:57 2018 +0100 drm/tegra: dp: Read channel coding capability from sink Parse from the sink capabilities whether or not it supports ANSI 8B/10B channel coding as specified in ANSI X3.230-1994, clause 11. Signed-off-by: Thierry Reding commit db199502fa8b62afddde5379d94cac0439202111 Author: Thierry Reding Date: Tue Jul 7 20:52:07 2015 +0200 drm/tegra: dp: Read TPS3 capability from sink The TPS3 capability can be exposed by DP 1.2 and later sinks if they support the alternative training pattern for channel equalization. Signed-off-by: Thierry Reding commit cb072eebfa038361b4f578b65a205ad0abc6fe88 Author: Thierry Reding Date: Thu Dec 3 13:07:43 2015 +0100 drm/tegra: dp: Read fast training capability from link While probing the DisplayPort link, query the fast training capability. If supported, drivers can use the fast link training sequence instead of the more involved full link training sequence. Signed-off-by: Thierry Reding commit 480770440ad1681e5100e9719fc5f9bb8bc46ca8 Author: Thierry Reding Date: Thu Dec 3 13:02:52 2015 +0100 drm/tegra: dp: Probe link using existing parsing helpers Use existing parsing helpers to probe a DisplayPort link. Signed-off-by: Thierry Reding commit 27ba465ce3397c4705f87c1f73e6d67c1b48ef0f Author: Thierry Reding Date: Thu Dec 3 12:45:45 2015 +0100 drm/tegra: dp: Turn link capabilities into booleans Rather than storing capabilities as flags in an integer, use a separate boolean per capability. This simplifies the code that checks for these capabilities. Signed-off-by: Thierry Reding commit c728e2d4a6546905f1179a8237860d8d276aaadc Author: Thierry Reding Date: Tue Jul 21 16:33:48 2015 +0200 drm/tegra: dp: Track link capabilities alongside settings Store capabilities in max_* fields and add separate fields for the currently selected settings. Signed-off-by: Thierry Reding commit 1abd6b3304d47ff055063e0d59fc03bb27e0e196 Author: Thierry Reding Date: Thu Dec 3 11:44:17 2015 +0100 drm/tegra: dp: Add drm_dp_link_reset() implementation Subsequent patches will add non-volatile fields to struct drm_dp_link, so introduce a function to zero out only the volatile fields. Signed-off-by: Thierry Reding commit 0fa5c1bdd2f7dfc3cc5a9b22470fb4ffdbe22272 Author: Thierry Reding Date: Mon Feb 5 14:31:27 2018 +0100 drm/tegra: Add missing kerneldoc for struct drm_dp_link The drm_dp_link structure tracks capabilities on the DP link. Add some kerneldoc to explain what each of its fields means. Signed-off-by: Thierry Reding commit fc4ebe52872665a42028450d720923695e9d4e20 Author: Thierry Reding Date: Thu Jun 27 12:24:41 2019 +0200 drm/tegra: dpaux: Parameterize CMH, DRVZ and DRVI The CMH, DRVZ and DRVI values vary depending on the SoC generation. Move them into SoC specific structures so that DT compatible string matching can be used to select the right parameters and write them to hardware at the right time. Signed-off-by: Thierry Reding commit 6c79f09fce4dd03f6b623b1d49e1b8a968822f60 Author: Thierry Reding Date: Mon Jun 24 13:30:24 2019 +0200 drm/tegra: dpaux: Fix crash if VDD supply is absent In order to properly make the VDD supply optional, all accesses to the regulator need to be ignored, because the regulator core doesn't treat NULL special. Signed-off-by: Thierry Reding commit 245ce70cd466d2e003861788d13726417557eb39 Author: Thierry Reding Date: Thu Mar 3 15:32:13 2016 +0100 drm/tegra: dpaux: Retry on transfer size mismatch When a transfer didn't complete transmission of the requested number of bytes, signal that the transaction should be retried. Signed-off-by: Thierry Reding commit 5e881f6b29fe69726d0aa11f846c438a5cb7ddb0 Author: Thierry Reding Date: Mon Aug 3 14:08:34 2015 +0200 drm/tegra: dpaux: Support monitor hotplugging The dpaux driver has a quirk built-in that will delay initialization of the display driver for a short while, trying to detect an eDP panel. The reason for this quirk is that the panel may not report as connected until after the display driver has initialized, at which point the fbdev emulation will have fallen back to 1024x768 as default resolution, which will likely not be the eDP panel's native resolution. With upcoming DisplayPort support, the code needs to be able to cope with hotpluggable monitors as well. Waiting for a panel to show up is no longer going to work because the monitor may not be attached on boot. If the output runs in DisplayPort mode, skip waiting for the panel to show up. Signed-off-by: Thierry Reding commit acf6b77c4c3dc38de1e435d114c267cd8dedc913 Author: Thierry Reding Date: Fri Jun 8 15:00:05 2018 +0200 drm/tegra: gem: Use sg_alloc_table_from_pages() Instead of manually creating the SG table for a discontiguous buffer, use the existing sg_alloc_table_from_pages(). Note that this is not safe to be used with the ARM DMA/IOMMU integration code because that will not ensure that the whole buffer is mapped contiguously. Depending on the size of the individual entries the mapping may end up containing holes to ensure alignment. However, we only ever use these buffers with explicit IOMMU API usage and know how to avoid these holes. Signed-off-by: Thierry Reding commit 8b5a3c17a2778fba817c38beb545bc48228b8da5 Author: Thierry Reding Date: Fri Jun 8 14:59:13 2018 +0200 drm/tegra: gem: Always map SG tables for DMA-BUFs When an importer wants to map a DMA-BUF, make sure to always actually map it, irrespective of whether the buffer is contiguous or not. Signed-off-by: Thierry Reding commit d81f3431e61771028acb69a23601ef5379e39f2a Author: Thierry Reding Date: Fri Jun 8 14:56:04 2018 +0200 drm/tegra: gem: Use dma_get_sgtable() Rather than manually creating an SG table in an incorrect way, let the standard dma_get_sgtable() function do it. Signed-off-by: Thierry Reding commit 7e3c53a096a9e75b12e69f93ef1fbc7cb1b27297 Author: Thierry Reding Date: Mon Jun 4 17:36:50 2018 +0200 drm/tegra: gem: Rename paddr -> iova The address can refer to either physical memory or IO virtual memory. If referring to IO virtual memory, there will always be an associated physical memory address. Rename this variable to "iova" to clarify in all cases that this is the IO virtual memory, which in the absence of an IOMMU is identical to the physical address. Signed-off-by: Thierry Reding commit aacdf19849734d1be5e407932228ae101ba5b92f Author: Thierry Reding Date: Fri Feb 8 14:35:13 2019 +0100 drm/tegra: Move IOMMU group into host1x client Handling of the IOMMU group attachment is common to all clients, so move the group into the client to simplify code. Signed-off-by: Thierry Reding commit 7baa943e0bb22454887edd1fffb2d00a4b842fe5 Author: Thierry Reding Date: Fri Feb 8 14:15:44 2019 +0100 drm/tegra: vic: Use common IOMMU attach/detach code Reuse common code to attach to or detach from an IOMMU domain. Signed-off-by: Thierry Reding commit d5ad0e3dfe74f465a218bde84efb25c72b3e51c4 Author: Thierry Reding Date: Fri Feb 8 13:10:41 2019 +0100 drm/tegra: vic: Inherit DMA mask from host1x VIC, just like all other host1x clients, has the same addressing range as its parent host1x device. Inherit the DMA mask to reflect that. Signed-off-by: Thierry Reding commit dd631e8ac90f08c37636fe9e6d12fc7bdf7f429a Author: Thierry Reding Date: Fri Feb 8 13:09:49 2019 +0100 drm/tegra: vic: Skip stream ID programming without IOMMU If VIC is not behind an IOMMU, don't touch any of the registers related to stream ID programming. Signed-off-by: Thierry Reding commit 0301196b5719341ba98223eed9a0e6ea4eab615a Author: Thierry Reding Date: Wed Sep 4 13:00:30 2019 +0200 drm/tegra: Use DRM_DEBUG_DRIVER for driver messages The driver-specific messages should use the DRM_UT_DRIVER category so that they can be properly filtered. Signed-off-by: Thierry Reding commit 47b15779b03bf70ca5a315775d2b171c7913ebc3 Author: Thierry Reding Date: Mon Sep 9 14:25:45 2019 +0200 drm/tegra: Inherit device DMA parameters from host1x The display controllers and VIC don't have any limitations on the DMA segment size. Inherit the DMA parameters from the parent device, which also doesn't have any such limitations. Signed-off-by: Thierry Reding commit 33904487f1ab1ec1f8103b1ec5dd3d26f94d9711 Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:04:27 2019 +0100 gpu: host1x: Make host1x_cdma_wait_pushbuffer_space() static The host1x_cdma_wait_pushbuffer_space() function is not declared or directly called from outside the file it is in, so make it static. Fixes the following sparse warning: drivers/gpu/host1x/cdma.c:235:5: warning: symbol 'host1x_cdma_wait_pushbuffer_space' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Thierry Reding commit caccddcfc4b4de75930df2e8f7fd0c66556b13ff Author: Thierry Reding Date: Mon Jun 18 14:01:51 2018 +0200 gpu: host1x: Request channels for clients, not devices A struct device doesn't carry much information that a channel might be interested in, but the client very much does. Request channels for the clients rather than their parent devices and store a pointer to them in order to have that information available when needed. Signed-off-by: Thierry Reding commit 8f45f5071ad2be6ace6f77892e0015e89fd42028 Author: Thierry Reding Date: Thu Sep 5 11:39:05 2019 +0200 gpu: host1x: Explicitly initialize host1x_info structures It's technically not required to explicitly initialize the fields that will be zero by default, but it's easier to read these structures if they are all initialized uniformly. Signed-off-by: Thierry Reding commit b9cd7b954a6dc2329458599222d994837530a350 Author: Thierry Reding Date: Mon Jun 18 14:01:10 2018 +0200 gpu: host1x: Remove gratuitous blank line Signed-off-by: Thierry Reding commit d98914ebc2af4504e2abc266610c29b4131598a3 Author: Thierry Reding Date: Mon Sep 9 14:28:46 2019 +0200 gpu: host1x: Do not limit DMA segment size host1x nor any its clients have any limitations on the DMA segment size, so don't pretend that they do. Signed-off-by: Thierry Reding commit 9a50dcaf0416a43e1fe411dc61a99c8333c90119 Author: Peter Zijlstra Date: Mon Oct 21 15:11:49 2019 +0200 ubsan, x86: Annotate and allow __ubsan_handle_shift_out_of_bounds() in uaccess regions The new check_zeroed_user() function uses variable shifts inside of a user_access_begin()/user_access_end() section and that results in GCC emitting __ubsan_handle_shift_out_of_bounds() calls, even though through value range analysis it would be able to see that the UB in question is impossible. Annotate and whitelist this UBSAN function; continued use of user_access_begin()/user_access_end() will undoubtedly result in further uses of function. Reported-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Acked-by: Randy Dunlap Acked-by: Christian Brauner Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: cyphar@cyphar.com Cc: keescook@chromium.org Cc: linux@rasmusvillemoes.dk Fixes: f5a1a536fa14 ("lib: introduce copy_struct_from_user() helper") Link: https://lkml.kernel.org/r/20191021131149.GA19358@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar commit 27a22fbdeedd6c5c451cf5f830d51782bf50c3a2 Author: Catalin Marinas Date: Mon Oct 28 09:08:34 2019 +0000 arm64: Silence clang warning on mismatched value/register sizes Clang reports a warning on the __tlbi(aside1is, 0) macro expansion since the value size does not match the register size specified in the inline asm. Construct the ASID value using the __TLBI_VADDR() macro. Fixes: 222fc0c8503d ("arm64: compat: Workaround Neoverse-N1 #1542419 for compat user-space") Reported-by: Nathan Chancellor Cc: James Morse Signed-off-by: Catalin Marinas commit 955a72cea507051e366a4b70de86d974565bfe93 Author: Thomas Zimmermann Date: Fri Oct 25 11:27:59 2019 +0200 drm/todo: Clarify situation around fbdev and defio The TODO item is misleading and makes it seem as if fbdev emulation cannot be used with SHMEM. Rephrase the text to describe the current situation more correctly. Signed-off-by: Thomas Zimmermann Acked-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20191025092759.13069-3-tzimmermann@suse.de commit 8e86dee02253306c72752d4cbd588e90672bc50a Author: Thomas Zimmermann Date: Fri Oct 25 11:27:58 2019 +0200 drm/fb-helper: Remove drm_fb_helper_defio_init() and update docs There are no users of drm_fb_helper_defio_init(), so we can remove it. The documentation around defio support is a bit misleading and should mention compatibility issues with SHMEM helpers. Clarify this. Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20191025092759.13069-2-tzimmermann@suse.de commit 2c661547f27fef351cebe99bbcf7df9793832d16 Author: Anson Huang Date: Thu Oct 24 16:48:40 2019 +0800 ARM: dts: imx6ul-14x14-evk: Assign power supplies for magnetometer On i.MX6UL 14x14 EVK board, mag3110's power is controlled by sensor regulator, assign power supplies for mag3110 driver to do power management. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 516ab2eecbfb0481161c2efa8b6128d93d16e879 Author: Anson Huang Date: Thu Oct 24 16:48:39 2019 +0800 ARM: dts: imx6ul-14x14-evk: Fix the magnetometer node name Node name is supposed to be generic, use "magnetometer" instead of "mag3110" for magnetometer node. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 09e2b10489549016390d73a9bc56160228f81dd9 Author: Anson Huang Date: Thu Oct 24 16:48:38 2019 +0800 ARM: dts: imx6ul-14x14-evk: Add sensors' GPIO regulator On i.MX6UL 14x14 EVK board, sensors' power are controlled by GPIO5_IO02, add GPIO regulator for sensors to manage their power. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit c4e88bb7949a4ecd7d7bc4d436e626df1e4a2981 Author: Anson Huang Date: Thu Oct 24 10:59:25 2019 +0800 ARM: dts: imx6ul: Disable gpt2 by default i.MX GPT driver ONLY supports 1 instance, i.MX6UL already has GPT1 enabled by default, so GPT2 should be disabled. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 8f5d481959a04ad81cc928c698ebe6a9dae23971 Author: Peng Fan Date: Thu Oct 24 02:59:42 2019 +0000 clk: imx: imx6ul: use imx_obtain_fixed_clk_hw to simplify code imx_obtain_fixed_clk_hw could be used to simplify code to replace __clk_get_hw(of_clk_get_by_name(node, "name")) Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 8e1de35d4cebeabcd7a8619f0af34cf2444dc34b Author: Peng Fan Date: Thu Oct 24 02:59:37 2019 +0000 clk: imx: imx6sx: use imx_obtain_fixed_clk_hw to simplify code imx_obtain_fixed_clk_hw could be used to simplify code to replace __clk_get_hw(of_clk_get_by_name(node, "name")) Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 184f9eb6c9a09bb4b348a046c5ceedd47a385065 Author: Peng Fan Date: Thu Oct 24 02:59:32 2019 +0000 clk: imx: imx6sll: use imx_obtain_fixed_clk_hw to simplify code imx_obtain_fixed_clk_hw could be used to simplify code to replace __clk_get_hw(of_clk_get_by_name(node, "name")) Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit fc09a36a8798c6eec60fe4f78f6797c3d026a3c5 Author: Peng Fan Date: Thu Oct 24 02:38:22 2019 +0000 clk: imx: imx7d: use imx_obtain_fixed_clk_hw to simplify code imx_obtain_fixed_clk_hw could be used to simplify code to replace __clk_get_hw(of_clk_get_by_name(node, "name")) Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 28e95b7dcc5a7d4f0a06f7d7897dfe688ea4d399 Author: Anson Huang Date: Thu Oct 24 10:34:25 2019 +0800 ARM: dts: imx7d: Add missing cooling device properties for CPUs The cooling device properties "#cooling-cells" should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device. Add such missing properties. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit def76ebc7c2288d3ec9e276de57bf04c83ecc22b Author: Anson Huang Date: Thu Oct 24 10:34:24 2019 +0800 ARM: dts: imx6dl: Add missing cooling device properties for CPUs The cooling device properties "#cooling-cells" should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device. Add such missing properties. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit b53332376063019326f4223df2e54cc1dc474c95 Author: Anson Huang Date: Thu Oct 24 10:34:23 2019 +0800 ARM: dts: imx6q: Add missing cooling device properties for CPUs The cooling device properties "#cooling-cells" should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device. Add such missing properties. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit e4f9eefbb8a976bb86dbdc9d2dd1a2a113801464 Author: Ben Dooks (Codethink) Date: Tue Oct 22 16:40:09 2019 +0100 firmware: imx: add missing include of Include for the declarations of the functions exported from this driver. This fixes the following sparse warnings: drivers/firmware/imx/imx-scu-irq.c:45:5: warning: symbol 'imx_scu_irq_register_notifier' was not declared. Should it be static? drivers/firmware/imx/imx-scu-irq.c:52:5: warning: symbol 'imx_scu_irq_unregister_notifier' was not declared. Should it be static? drivers/firmware/imx/imx-scu-irq.c:97:5: warning: symbol 'imx_scu_irq_group_enable' was not declared. Should it be static? drivers/firmware/imx/imx-scu-irq.c:130:5: warning: symbol 'imx_scu_enable_general_irq_channel' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Signed-off-by: Shawn Guo commit 7b45cc50cce7c28d24d7a97523500b29e9491b14 Author: Sébastien Szymanski Date: Tue Oct 22 15:16:55 2019 +0200 ARM: dts: imx6qdl-apf6dev: use DRM bindings Describe the parallel LCD using simple panel driver. Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit 9ce84cc667ae0efd2b4f48e97d63336b0f94b11d Author: Sébastien Szymanski Date: Tue Oct 22 15:16:54 2019 +0200 ARM: dts: imx6qdl-apf6dev: add backlight support Add PWM backlight support. Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit 3f52c54ecb64351b0dc81c9ebcabcf54896ff463 Author: Sébastien Szymanski Date: Tue Oct 22 15:16:53 2019 +0200 ARM: dts: imx6qdl-apf6dev: rename usb-h1-vbus regulator to 5V This regulator supplies other devices and not only usb host1 so rename it. Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit a18b9142057bc0535da4a6bbd36b37540191b955 Author: Sébastien Szymanski Date: Tue Oct 22 15:16:52 2019 +0200 ARM: dts: imx6qdl-apf6dev: add RTC support Add support of MCP79400 RTC. Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit b22c2ac4c0ed16a3b80e81b00c87345692c19f89 Author: Sébastien Szymanski Date: Tue Oct 22 15:16:51 2019 +0200 ARM: dts: imx6qdl-apf6: fix WiFi These changes make the WiFi on the APF6 board work again. Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit 827f16f7e91adf0a91d7ade365361577dd35dd98 Author: Sébastien Szymanski Date: Tue Oct 22 15:16:50 2019 +0200 ARM: dts: imx6qdl-apf6: add flow control to uart2 RTS/CTS lines are wired to the Bluetooth chip so add uart-has-rtscts property to uart2. Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit c916c944bcf980d531a416780013990be7c1cb16 Author: Sébastien Szymanski Date: Tue Oct 22 15:16:49 2019 +0200 ARM: dts: imx6qdl-apf6: add phy to fec Add the mdio bus and the phy to the fec-node. Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit 0f6482596552cc6632967ecd84700adff169b5e8 Author: Sébastien Szymanski Date: Tue Oct 22 15:16:48 2019 +0200 ARM: dts: imx6qdl-{apf6, apf6dev}: remove container node around pinctrl nodes Remove the function node around the pinctrl nodes that was obsoleted by commit 5fcdf6a7ed95 ("pinctrl: imx: Allow parsing DT without function nodes"). Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit 3307505f8be28ef305521a54c9d3d8deb05fb541 Author: Sébastien Szymanski Date: Tue Oct 22 15:16:47 2019 +0200 ARM: dts: imx6qdl-{apf6, apf6dev}: switch boards to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit 427fca60ee4524d7755cc7a980280e7ac6d92877 Author: Andrey Smirnov Date: Mon Oct 21 21:14:45 2019 -0700 ARM: imx: Drop imx_anatop_usb_chrg_detect_disable() With commit b5bbe2235361 ("usb: phy: mxs: Disable external charger detect in mxs_phy_hw_init()") in tree all of the necessary charger setup is done by the USB PHY driver which covers all of the affected i.MX6 SoCs. NOTE: imx_anatop_usb_chrg_detect_disable() was also called for i.MX7D, but looking at its datasheet it appears to have a different USB PHY IP block, so executing i.MX6 charger disable configuration seems unnecessary. Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Shawn Guo Cc: Fabio Estevam Cc: Peter Chen Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit 61a988183abe19133bfa82a4e8e6161a0ccf5c3e Author: Andrey Smirnov Date: Mon Oct 21 21:05:00 2019 -0700 ARM: dts: imx6qdl-zii-rdu2: Specify supplies for accelerometer Specify 'vdd' and 'vddio' supplies for accelerometer to avoid warnings during boot. Signed-off-by: Andrey Smirnov Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org, Cc: linux-kernel@vger.kernel.org Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo commit f8b83f583d563f0d705c1dc58d98eb263f21921f Author: Andrey Smirnov Date: Mon Oct 21 21:04:59 2019 -0700 ARM: dts: imx6qdl-zii-rdu2: Fix accelerometer interrupt-names According to Documentation/devicetree/bindings/iio/accel/mma8452.txt, the correct interrupt-names are "INT1" and "INT2", so fix them accordingly. While at it, modify the node to only specify "INT2" since providing two interrupts is not necessary or useful (the driver will only use one). Signed-off-by: Fabio Estevam [andrew.smirnov@gmail.com modified the patch to drop INT1] Signed-off-by: Andrey Smirnov Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org, Cc: linux-kernel@vger.kernel.org Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo commit 2e91e788570d56c3eba944a1560318fd8666d651 Author: Anson Huang Date: Thu Oct 17 11:13:03 2019 +0800 dt-bindings: arm: imx: Add the i.MX8MN LPDDR4 EVK board Add board binding for i.MX8MN LPDDR4 EVK board. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 59cf1496672cd34f47f85aa1af280909e7b58762 Author: Anson Huang Date: Wed Oct 16 10:14:27 2019 +0800 ARM: dts: imx7ulp: Move usdhc clocks assignment to board DT usdhc's clock rate is different according to different devices connected, so clock rate assignment should be placed in board DT according to different devices connected on each usdhc port. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit f2c03b89c61dda0ec6d277a6f6701dd4e10c7ae6 Author: Philippe Schenker Date: Wed Oct 16 17:03:42 2019 +0000 ARM: dts: vf-colibri: add recovery mode to i2c This patch enables the recovery mode now available. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 56f0df6b6b58ec1854cb9d10842b39e8b595b040 Author: Philippe Schenker Date: Wed Oct 16 17:03:41 2019 +0000 ARM: dts: imx*(colibri|apalis): add missing recovery modes to i2c This patch adds missing i2c recovery modes and corrects wrongly named ones. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 452831f3153d2ec1e9811b7ad69ce1b4fbd2e704 Author: Michal Vokáč Date: Wed Oct 16 15:49:49 2019 +0200 ARM: dts: imx6dl-yapp4: Enable the I2C3 bus on all board variants imx6dl-yapp4 Draco and Ursa boards use the I2C3 bus to control some external devices through the /dev files. So enable the I2C3 bus on all board variants, not just on Hydra. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit e55274bfb99a814057a8b30e20aae6d29c27e615 Author: Michal Vokáč Date: Wed Oct 16 15:49:22 2019 +0200 ARM: dts: imx6dl-yapp4: Enable UART2 The second UART is needed for 3D or MFD printer control. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit 0e4e8cc30a2940c57448af1376e40d3c0996fb29 Author: Daniel Baluta Date: Mon Oct 14 18:32:28 2019 +0300 firmware: imx: Remove call to devm_of_platform_populate IMX DSP device is created by SOF layer. The current call to devm_of_platform_populate is not needed and it doesn't produce any effects. Fixes: ffbf23d50353915d ("firmware: imx: Add DSP IPC protocol interface) Signed-off-by: Daniel Baluta Signed-off-by: Shawn Guo commit 9480029fe5c24d482efad38dc631bd555fc7afe2 Author: Matti Vaittinen Date: Wed Oct 23 15:35:24 2019 +0300 power: supply: bd70528: Add MODULE_ALIAS to allow module auto loading The bd70528 charger driver is probed by MFD driver. Add MODULE_ALIAS in order to allow udev to load the module when MFD sub-device cell for charger is added. Fixes: f8c7f7ddd8ef0 ("power: supply: Initial support for ROHM BD70528 PMIC charger block") Signed-off-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit f457055a7922154bb786e5d55f75b461fa645e9a Author: Gustavo A. R. Silva Date: Mon Oct 21 12:49:37 2019 -0500 power: supply: ab8500_charger: Fix inconsistent IS_ERR and PTR_ERR Fix inconsistent IS_ERR and PTR_ERR in ab8500_charger_probe(). The proper pointer to be passed as argument is di->adc_main_charger_c This bug was detected with the help of Coccinelle. Fixes: 97ab78bac5d0 ("power: supply: ab8500_charger: Convert to IIO ADC") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Signed-off-by: Wei Yongjun Acked-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 9110f3e78c02026ebc9e65d6208b1e2bb8a851a1 Author: Ben Dooks (Codethink) Date: Fri Oct 11 13:51:43 2019 +0100 ARM: 8917/1: mm: include The definitions of set_kernel_text_rw() and set_kernel_text_ro() are in but this is not included in init.c which defines these. Silence the following warnings by including the header. arch/arm/mm/init.c:669:6: warning: symbol 'set_kernel_text_rw' was not declared. Should it be static? arch/arm/mm/init.c:678:6: warning: symbol 'set_kernel_text_ro' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit ea5379be539e2a83cd582d79b9a12323ea1bae78 Author: Ben Dooks (Codethink) Date: Fri Oct 11 13:51:52 2019 +0100 ARM: 8916/1: mm: make set_section_perms() static The set_section_perms() is not defined outside of the init.c file, so make it static to avoid the following warning: arch/arm/mm/init.c:596:6: warning: symbol 'set_section_perms' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 43fa593eb7eec998534547a30ac040704f10a30a Author: Ben Dooks (Codethink) Date: Fri Oct 11 13:49:01 2019 +0100 ARM: 8915/1: zImage: atags_to_fdt: fix __be32 and __be64 types There are some sparse warnings about type conversion in the atags_to_fdt.c code, due to __be32 and __be64, so fix the following: - Change _be32 and __be64 where appropriate - Change setprop() to take a 'void *' - Change incorrect fdt32_to_cpu() on FDT_MAGIC Fixes the following sparse warnings: arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:66:29: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:141:34: warning: cast to restricted __be32 arch/arm/boot/compressed/atags_to_fdt.c:182:60: warning: incorrect type in assignment (different base types) arch/arm/boot/compressed/atags_to_fdt.c:182:60: expected unsigned long long [usertype] arch/arm/boot/compressed/atags_to_fdt.c:182:60: got restricted __be64 [usertype] arch/arm/boot/compressed/atags_to_fdt.c:184:60: warning: incorrect type in assignment (different base types) arch/arm/boot/compressed/atags_to_fdt.c:184:60: expected unsigned long long [usertype] arch/arm/boot/compressed/atags_to_fdt.c:184:60: got restricted __be64 [usertype] arch/arm/boot/compressed/atags_to_fdt.c:187:62: warning: incorrect type in assignment (different base types) arch/arm/boot/compressed/atags_to_fdt.c:187:62: expected unsigned int arch/arm/boot/compressed/atags_to_fdt.c:187:62: got restricted __be32 [usertype] arch/arm/boot/compressed/atags_to_fdt.c:189:62: warning: incorrect type in assignment (different base types) arch/arm/boot/compressed/atags_to_fdt.c:189:62: expected unsigned int arch/arm/boot/compressed/atags_to_fdt.c:189:62: got restricted __be32 [usertype] Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 05b1fd8b0682ee71fe236e3fcc7ab2ef25b57798 Author: Ben Dooks Date: Mon Oct 7 14:56:40 2019 +0100 ARM: 8913/1: arch_timer: include The arch_timer_arch_init is defined in so include that to fix the following sparse error: arch/arm/kernel/arch_timer.c:31:12: warning: symbol 'arch_timer_arch_init' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit e3c5b36160fd5ac2ca6988e67f3068ae23f4c833 Author: Ben Dooks Date: Mon Oct 7 14:56:09 2019 +0100 ARM: 8911/1: move pcibios_report_status to Move the pcibios_report_status to include to remove the following sparse warning and to remove the extra definition in the footbrdige dc21285.c driver: arch/arm/kernel/bios32.c:59:6: warning: symbol 'pcibios_report_status' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit a959f88735c09e3cea8b229ab86fcb946c41f9e8 Author: Ben Dooks Date: Mon Oct 7 14:55:55 2019 +0100 ARM: 8910/1: fix missing declartion of module_frob_arch_sections The module_frob_arch_sections function is missing the header declaration which is in so include that to fix the following sparse warning: arch/arm/kernel/module-plts.c:188:5: warning: symbol 'module_frob_arch_sections' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 17fe868415b61027ff18f5f94696b0743d13985d Author: Ben Dooks Date: Mon Oct 7 14:54:27 2019 +0100 ARM: 8909/1: make unexported items static Fixup the following sparse warnings by making the functions and structures static. arch/arm/mm/dma-mapping.c:1562:6: warning: symbol '__arm_iommu_free_attrs' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1586:6: warning: symbol 'arm_iommu_free_attrs' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1592:6: warning: symbol 'arm_coherent_iommu_free_attrs' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1716:5: warning: symbol 'arm_coherent_iommu_map_sg' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1734:5: warning: symbol 'arm_iommu_map_sg' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1767:6: warning: symbol 'arm_coherent_iommu_unmap_sg' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1784:6: warning: symbol 'arm_iommu_unmap_sg' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1798:6: warning: symbol 'arm_iommu_sync_sg_for_cpu' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1816:6: warning: symbol 'arm_iommu_sync_sg_for_device' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:2018:26: warning: symbol 'iommu_ops' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:2040:26: warning: symbol 'iommu_coherent_ops' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 032be72806d1b34db7057f2c7982d87ed2274751 Author: Clemens Gruber Date: Sun Sep 22 14:25:51 2019 +0100 ARM: 8907/1: arch: reuse addr variable in pfn_valid Avoid calling __pfn_to_phys twice. Signed-off-by: Clemens Gruber Signed-off-by: Russell King commit dd095afc88d557f11e5c0613848d97568d675fb7 Author: Chris Wilson Date: Sat Oct 26 21:09:17 2019 +0100 drm/i915/rps: Flip interpretation of ips fmin/fmax to max rps ips uses clock delays as opposed to rps frequency bins. To fit the delays into the same rps calculations, we need to invert the ips delays. Fixes: 3e7abf814193 ("drm/i915: Extract GT render power state management") Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191026200917.1780-1-chris@chris-wilson.co.uk commit c2a552197106b45d0d801d5b8a6be47563a700df Merge: 9905f32aefbe d6d5df1db6e9 Author: Greg Kroah-Hartman Date: Sun Oct 27 19:33:13 2019 +0100 Merge 5.4-rc5 into tty-next We want the tty/serial fix in here as well. Signed-off-by: Greg Kroah-Hartman commit d19f1d44e74322ae2a75dc07b7d44fecacd5bcfb Merge: abb0b3d96a1f d6d5df1db6e9 Author: Greg Kroah-Hartman Date: Sun Oct 27 19:22:23 2019 +0100 Merge 5.4-rc5 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 78e45917bf7a066fffbeb3d87f4031109df6da55 Author: Fabio Estevam Date: Sun Oct 27 10:35:41 2019 -0700 Input: wacom_i2c - remove unneeded gpio.h header file There is no gpio functions used in the driver that is exported by the gpio.h header, so remove this unneeded header. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20191026185958.24158-3-festevam@gmail.com Signed-off-by: Dmitry Torokhov commit 2fd61f796875b78469f35101cc2124ffed6343e5 Author: Fabio Estevam Date: Sun Oct 27 10:35:31 2019 -0700 Input: s3c2410_ts - remove unneeded gpio.h header file There is no gpio functions used in the driver that is exported by the gpio.h header, so remove this unneeded header. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20191026185958.24158-2-festevam@gmail.com Signed-off-by: Dmitry Torokhov commit d34a069e1c63ddc20e2c3c8bfdec2510682b15f3 Author: Fabio Estevam Date: Sun Oct 27 10:35:21 2019 -0700 Input: colibri-vf50-ts - remove unneeded gpio.h header file The touchscreen device is a GPIO consumer, not a GPIO controller, so there is no need to include . Remove the unneeded header file. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20191026185958.24158-1-festevam@gmail.com Signed-off-by: Dmitry Torokhov commit 5f92dcee81f4fb7375ec3cedc48dfb042cf492b2 Author: Dmitry Torokhov Date: Fri Sep 13 17:43:34 2019 -0700 Input: gpio_keys_polled - switch to using devm_fwnode_gpiod_get() devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov commit 2a60f598777d8b819383698c3dd4fd35dff21182 Author: Dmitry Torokhov Date: Fri Sep 13 17:43:34 2019 -0700 Input: gpio_keys - switch to using devm_fwnode_gpiod_get() devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov commit cec0e350ca13b489acb829ef4bab5ddcef03dd75 Author: Markus Reichl Date: Sun Oct 27 19:06:19 2019 +0100 arm64: dts: rockchip: Add LED nodes on rk3399-roc-pc rk3399-roc-pc has three gpio LEDs, enable them. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/7d8d85c9-5fde-7943-a6b6-639bca38bdc1@fivetechno.de Signed-off-by: Heiko Stuebner commit e2c5af528a83fc634fc95c10230294d96787b398 Merge: 728d90bdc9e4 13949fa9daa9 Author: Dmitry Torokhov Date: Sun Oct 27 11:02:01 2019 -0700 Merge branch 'ib-fwnode-gpiod-get-index' of https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio into next Pull in fwnode-gpiod-get-index API. commit 728d90bdc9e480dc93913e59a0aa3c896c7aa697 Merge: cb3efd5a3885 d6d5df1db6e9 Author: Dmitry Torokhov Date: Sun Oct 27 11:00:19 2019 -0700 Merge tag 'v5.4-rc5' into next Sync up with mainline. commit cce430450e190e06bac680fe1dbec1f9bf891343 Merge: 21cc07a1c16f d6d5df1db6e9 Author: Greg Kroah-Hartman Date: Sun Oct 27 18:56:09 2019 +0100 Merge 5.4-rc5 into staging-next We want the staging fixes in here for testing and building on. Signed-off-by: Greg Kroah-Hartman commit b92880e4d719b9f63e61be6a3e6f0e1b747de22f Author: Andy Yan Date: Mon Oct 21 16:46:57 2019 +0800 arm64: dts: rockchip: Add basic dts for RK3308 EVB This board use uart4 as debug port and arm core voltage is modulated by pwm, logic voltage is fixed to 1.05V. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20191021084657.28629-1-andy.yan@rock-chips.com Signed-off-by: Heiko Stuebner commit 8f677bc819e7a74cf10e30daf06e8b151d1e6a94 Merge: a3caeb8ffe5d d6d5df1db6e9 Author: Greg Kroah-Hartman Date: Sun Oct 27 18:54:13 2019 +0100 Merge 5.4-rc5 into driver-core-next We want the sysfs fix in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman commit da80d2e516eb858eb5bcca7fa5f5a13ed86930e4 Merge: 6859eba4f6fb d6d5df1db6e9 Author: Greg Kroah-Hartman Date: Sun Oct 27 18:48:33 2019 +0100 Merge 5.4-rc5 into char-misc-next We want the binder fix in here as well for testing and to work on top of. Also handles a merge issue in binder.c to help linux-next out Signed-off-by: Greg Kroah-Hartman commit 1ebed0392519dc69078e7593517c0b970d3c4448 Author: Andy Yan Date: Mon Oct 21 16:46:42 2019 +0800 dt-bindings: Add doc for rk3308-evb Add compatible for RK3308 Evaluation board Signed-off-by: Andy Yan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191021084642.28562-1-andy.yan@rock-chips.com Signed-off-by: Heiko Stuebner commit 6913c45239fd26a2fab9a30e4a9207de914d98d8 Author: Andy Yan Date: Mon Oct 21 16:46:16 2019 +0800 arm64: dts: rockchip: Add core dts for RK3308 SOC RK3308 is a quad Cortex A35 based SOC with rich audio interfaces(I2S/PCM/TDM/PDM/SPDIF/VAD/HDMI ARC), which designed for intelligent voice interaction and audio input/output processing. This patch add basic core dtsi file for it. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20191021084616.28431-1-andy.yan@rock-chips.com Signed-off-by: Heiko Stuebner commit 085d610c501638cc8310086ad33920f7fbf78c51 Author: Andy Yan Date: Mon Oct 21 16:45:55 2019 +0800 dt-bindings: Add doc about rk3308 General Register Files RK3308 GRF is divided into four sections: GRF, SGRF, DETECTGRF, COREGRF. This patch add documentation for it. Signed-off-by: Andy Yan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191021084555.28356-1-andy.yan@rock-chips.com Signed-off-by: Heiko Stuebner commit 5a3436dc3610f63d5cdf5e34af22097a6ed29a9f Author: Lorenzo Bianconi Date: Thu Oct 24 17:42:34 2019 +0200 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsrx device bindings Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit cf9c71b38befbe02d910d0c4e128abaaf69d6e27 Author: Lorenzo Bianconi Date: Thu Oct 24 17:42:33 2019 +0200 iio: imu: st_lsm6dsx: add support to LSM6DSRX Add support to STM LSM6DSRX 6-axis (acc + gyro) Mems sensor https://www.st.com/resource/en/datasheet/lsm6dsrx.pdf Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 12737476e0992bde3e14e2df2fedf43a117abf71 Author: Linus Walleij Date: Wed Oct 23 10:47:02 2019 +0200 iio: st: Drop GPIO include None of the ST sensor drivers use any symbols from , just drop the include from all of them. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit d9d54a530a70eee6f003bd3ade38817cf85b9325 Author: Chris Wilson Date: Sun Oct 27 15:43:14 2019 +0000 drm/i915: Put future HW and their uAPIs under STAGING & BROKEN We would like some freedom to break the user API/ABI for future HW but yet still expose the driver for upstream development on that HW. Currently, we have the i915.force_probe module parameter to avoid binding to HW while the driver is under development, but that is still a little too soft with respect to the stringent no-regression rules if we also plan to be redesigning the uAPI to go along with the new HW. To allow the uAPI to be changed during development, only expose that API and in development HW under STAGING (and BROKEN). Hopefully, making it explicit that such interfaces to that HW are under development and not to be blindly enabled by distributions. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Dave Airlie Acked-by: Dave Airlie Acked-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20191027154314.11139-1-chris@chris-wilson.co.uk commit 44eb5a7e5dc6f23d04c05c15f91bc279e0dc700d Author: Yi Wang Date: Sun Oct 27 08:55:39 2019 +0100 x86/apic, x86/uprobes: Correct parameter names in kernel-doc comments Rename parameter names to the correct ones used in the function. No functional changes. [ bp: Merge two patches into a single one. ] Signed-off-by: Yi Wang Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/1571816442-22494-1-git-send-email-wang.yi59@zte.com.cn commit 21cc07a1c16f84da84ee7743954096a75e1974f1 Author: Cristiane Naves Date: Sat Oct 26 17:31:26 2019 -0300 staging: rtl8712: Remove lines before a close brace Fix Blank lines aren't necessary before a close brace '}'. Issue found by checkpatch. Signed-off-by: Cristiane Naves Link: https://lore.kernel.org/r/8c74dcd9afaa528a80804081f582792045bb7a7a.1572121059.git.cristianenavescardoso09@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2a8f0e9ccb5dacd99bbe83c700bc672807fb1a58 Author: Cristiane Naves Date: Sat Oct 26 20:52:14 2019 -0300 staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper Use devm_platform_ioremap_resource helper which wraps platform_get_resource() and devm_ioremap_resource() together. Issue found by coccicheck. Signed-off-by: Cristiane Naves Link: https://lore.kernel.org/r/20191026235214.GA11702@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman commit 140cf83dbdc0780886ed32b792c6c88cde54dc6c Author: Cristiane Naves Date: Sat Oct 26 20:16:19 2019 -0300 staging: media: allegro-dvt: remove bool comparison Bool tests don't need comparisons. Issue found by coccicheck. Signed-off-by: Cristiane Naves Link: https://lore.kernel.org/r/20191026231619.GA14093@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman commit 6d7e7c31ff9d67d10ea6bd0ea3410027ce065126 Author: Cristiane Naves Date: Sat Oct 26 19:24:53 2019 -0300 staging: octeon: Remove unneeded variable Remove unneeded variable used to store return value. Issue found by coccicheck. Signed-off-by: Cristiane Naves Link: https://lore.kernel.org/r/20191026222453.GA14562@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman commit 351567d29c56ef6343f73a88e8982438481537e8 Author: Cristiane Naves Date: Sat Oct 26 16:11:01 2019 -0300 staging: gasket: Fix lines ending with a '(' Fix lines ending with a '('. Issue found by checkpatch. Signed-off-by: Cristiane Naves Link: https://lore.kernel.org/r/20191026191101.GA8973@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman commit 140647f84dd8d895da2bf3e540dfd038f5076d46 Author: Amit Kucheria Date: Mon Oct 21 16:05:24 2019 +0530 ARM: dts: msm8974: thermal: Add thermal zones for each sensor msm8974 has 11 sensors connected to a single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria Tested-by: Brian Masney Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross commit d6f0ce84739af8a87ad16a294024937565ffd19c Author: Amit Kucheria Date: Mon Oct 21 16:05:31 2019 +0530 ARM: dts: msm8974: thermal: Add interrupt support Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria Tested-by: Brian Masney Signed-off-by: Andy Gross commit 5b7fe93db008ff013db24239136a25f3ac5142ac Merge: b951248518e6 027cbaaf6198 Author: David S. Miller Date: Sat Oct 26 22:57:27 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2019-10-27 The following pull-request contains BPF updates for your *net-next* tree. We've added 52 non-merge commits during the last 11 day(s) which contain a total of 65 files changed, 2604 insertions(+), 1100 deletions(-). The main changes are: 1) Revolutionize BPF tracing by using in-kernel BTF to type check BPF assembly code. The work here teaches BPF verifier to recognize kfree_skb()'s first argument as 'struct sk_buff *' in tracepoints such that verifier allows direct use of bpf_skb_event_output() helper used in tc BPF et al (w/o probing memory access) that dumps skb data into perf ring buffer. Also add direct loads to probe memory in order to speed up/replace bpf_probe_read() calls, from Alexei Starovoitov. 2) Big batch of changes to improve libbpf and BPF kselftests. Besides others: generalization of libbpf's CO-RE relocation support to now also include field existence relocations, revamp the BPF kselftest Makefile to add test runner concept allowing to exercise various ways to build BPF programs, and teach bpf_object__open() and friends to automatically derive BPF program type/expected attach type from section names to ease their use, from Andrii Nakryiko. 3) Fix deadlock in stackmap's build-id lookup on rq_lock(), from Song Liu. 4) Allow to read BTF as raw data from bpftool. Most notable use case is to dump /sys/kernel/btf/vmlinux through this, from Jiri Olsa. 5) Use bpf_redirect_map() helper in libbpf's AF_XDP helper prog which manages to improve "rx_drop" performance by ~4%., from Björn Töpel. 6) Fix to restore the flow dissector after reattach BPF test and also fix error handling in bpf_helper_defs.h generation, from Jakub Sitnicki. 7) Improve verifier's BTF ctx access for use outside of raw_tp, from Martin KaFai Lau. 8) Improve documentation for AF_XDP with new sections and to reflect latest features, from Magnus Karlsson. 9) Add back 'version' section parsing to libbpf for old kernels, from John Fastabend. 10) Fix strncat bounds error in libbpf's libbpf_prog_type_by_name(), from KP Singh. 11) Turn on -mattr=+alu32 in LLVM by default for BPF kselftests in order to improve insn coverage for built BPF progs, from Yonghong Song. 12) Misc minor cleanups and fixes, from various others. ==================== Signed-off-by: David S. Miller commit 43b0a4b482478aa4fe7240230be74a79dee95679 Author: Rob Clark Date: Fri Oct 25 14:21:06 2019 -0700 arm64: dts: qcom: sdm845-cheza: delete zap-shader This is unused on cheza. Delete the node to get ride of the reserved- memory section, and to avoid the driver from attempting to load a zap shader that doesn't exist every time it powers up the GPU. This also avoids a massive amount of dmesg spam about missing zap fw: msm ae00000.mdss: [drm:adreno_request_fw] *ERROR* failed to load qcom/a630_zap.mdt: -2 adreno 5000000.gpu: [drm:adreno_zap_shader_load] *ERROR* Unable to load a630_zap.mdt Signed-off-by: Rob Clark Cc: Douglas Anderson Fixes: 3fdeaee951aa ("arm64: dts: sdm845: Add zap shader region for GPU") Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Andy Gross commit 15424f4fa9d733a6b62da3839cd9e71e056214d7 Author: Amit Kucheria Date: Mon Oct 21 16:05:25 2019 +0530 arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors msm8916 uses sensors 0, 1, 2, 4 and 5. Sensor 3 is NOT used. Fixup the device tree so that the correct sensor ID is used and as a result we can actually check the temperature for the cpu2_3 sensor. Signed-off-by: Amit Kucheria Reviewed-by: Daniel Lezcano Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross commit 4fc5d78fda7a367f19163b725dbae1bb1796e30c Author: Amit Kucheria Date: Mon Oct 21 16:05:27 2019 +0530 arm64: dts: sdm845: thermal: Add interrupt support Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross commit 6eb1c8ade5e8665eb97f8416eee0942c9f90b12b Author: Amit Kucheria Date: Mon Oct 21 16:05:28 2019 +0530 arm64: dts: msm8996: thermal: Add interrupt support Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria Signed-off-by: Andy Gross commit bb54e3fa65d05ddcb2aa9055f6334ae7a1da8896 Author: Amit Kucheria Date: Mon Oct 21 16:05:29 2019 +0530 arm64: dts: msm8998: thermal: Add interrupt support Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria Signed-off-by: Andy Gross commit e51f7ff44686858fa4dc4c4ef2bcede7f4242a15 Author: Amit Kucheria Date: Mon Oct 21 16:05:30 2019 +0530 arm64: dts: qcs404: thermal: Add interrupt support Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria Signed-off-by: Andy Gross commit 3caa6f39e059da80c4dbfd522d597efe2bf93de7 Author: Daniel Gorbea Ainz Date: Wed Oct 23 20:53:23 2019 +0200 Add touchscreen platform data for the Schneider SCT101CTM tablet Add touchscreen platform data for the Schneider SCT101CTM tablet Signed-off-by: Daniel Gorbea Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 4a8d82cdec16fac619f1bc9a664be5d78c514316 Author: Linus Walleij Date: Tue Oct 22 23:01:28 2019 +0200 platform/x86: intel_int0002_vgpio: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. This driver requests the IRQ directly in the driver so it needs to pass a NULL parent handler. We may revisit this code later and pull reqular shared IRQ handler into gpiolib, so leave a FIXME. Cc: Hans de Goede Signed-off-by: Linus Walleij Tested-by: Hans de Goede Signed-off-by: Andy Shevchenko commit fa2a590d0d024eb3a048d817029959bef90bd191 Author: Andy Shevchenko Date: Mon Oct 21 12:25:46 2019 +0300 platform/x86: intel_punit_ipc: Drop useless label There is no need to have a label to return an error code in one case. Moreover the other places in the same function do not utilize that label. Signed-off-by: Andy Shevchenko commit ba367730ffe90706e3aaacd6aa4da763f4599bdc Author: Andy Shevchenko Date: Mon Oct 21 12:24:43 2019 +0300 platform/x86: intel_punit_ipc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. Signed-off-by: Andy Shevchenko commit 3fc794f27fec8f020907090fb866602a1c64a73c Author: Chris Wilson Date: Sat Oct 26 21:20:32 2019 +0100 drm/i915: Split memory_region initialisation into its own file Pull the memory region bookkeeping into its file. Let's start clean and see how long it lasts! Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191026202032.4371-1-chris@chris-wilson.co.uk commit 41e1bf811ace29bdc0df15523e3dfb3233704d1b Author: Samuil Ivanov Date: Wed Oct 23 23:58:55 2019 +0300 Staging: qlge: Rewrite two while loops as simple for loops This is a task from the TODO list of qlge driver: - some "while" loops could be rewritten with simple "for" The change is in functions ql_wait_reg_rdy and ql_wait_cfg in qlge_main.c. The while loops are basically count based (they decrement on each iteration), and it makes more sense to be a for loop construction instead. Signed-off-by: Samuil Ivanov Link: https://lore.kernel.org/r/20191023205855.GA1841@samuil-ThinkCentre-M92P Signed-off-by: Greg Kroah-Hartman commit f29acb9c5d0fe438291be62a68590891ce1cad9a Author: Michael Hennerich Date: Thu Oct 17 20:02:03 2019 +0300 drivers/staging/fbtft/fb_seps525: New driver for SEPS525 (Syncoam) LCD Controllers The SEPS525 is a 160 RGB x 128 Dots, 262K Colors PM-OLED Display Driver and Controller. The controller can be found on the NHD-1.69-160128UGC3 (Newhaven Display International, Inc.). Datasheets: Link: https://www.newhavendisplay.com/appnotes/datasheets/OLEDs/SEPS525.pdf Signed-off-by: Michael Hennerich Co-developed-by: Beniamin Bia Signed-off-by: Beniamin Bia Link: https://lore.kernel.org/r/20191017170203.11999-1-beniamin.bia@analog.com Signed-off-by: Greg Kroah-Hartman commit 5800d1d1565a5fc61349faa9e52bd1ca6be8fe43 Author: Tim Collier Date: Fri Oct 25 09:41:26 2019 +0100 staging: wlan-ng: remove unused field from struct hfa384x_usbctlx The variant field in struct hfa384x_usbctlx is not referenced anywhere in the driver, so remove it. Signed-off-by: Tim Collier Link: https://lore.kernel.org/r/20191025084126.9181-6-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman commit bbf358ec1bd6e57c899e6c28623da1c24ca4b951 Author: Tim Collier Date: Fri Oct 25 09:41:25 2019 +0100 staging: wlan-ng: fix compilation for USB debugging Fix compilation errors (remove references to 2 undefined fields in the URB struct) when DEBUG_USB is defined for the wlan-ng driver. Signed-off-by: Tim Collier Link: https://lore.kernel.org/r/20191025084126.9181-5-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman commit 95d8aa5c56f6e2aa629d7ef347f0b301d094ff5d Author: Tim Collier Date: Fri Oct 25 09:41:24 2019 +0100 staging: wlan-ng: correct parameter alignment in hfa384x.h Realign parameter in function declaration to fix checkpatch.pl warning that parameter needed to be aligned with the opening parenthesis of the declaration. Signed-off-by: Tim Collier Link: https://lore.kernel.org/r/20191025084126.9181-4-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7003e01ad41d6b23c89a5bc155fbfca92d831691 Author: Tim Collier Date: Fri Oct 25 09:41:23 2019 +0100 staging: wlan-ng: shorten lines over 80 characters in hfa384x.h Shorten several lines reported as over 80 characters by checkpatch.pl. Signed-off-by: Tim Collier Link: https://lore.kernel.org/r/20191025084126.9181-3-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman commit eaa4e501cf1d96977bc167fcf43059f9272e78ce Author: Tim Collier Date: Fri Oct 25 09:41:22 2019 +0100 staging: wlan-ng: remove unnecessary casts from prism2usb.c usb_get_intfdata returns a void pointer. It is not necessary to explicitly cast to the desired type and removing the casts is consistent with most use of usb_get_intfdata. Signed-off-by: Tim Collier Link: https://lore.kernel.org/r/20191025084126.9181-2-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman commit 48d357f0beb28e06a52493f73e0606e4b14f6ce9 Author: Michael Straube Date: Sat Oct 26 14:11:35 2019 +0200 staging: rtl8188eu: reduce indentation level in rtw_alloc_stainfo Remove else-arm from if-else statement. Move the else code out of the if-else and skip it by adding goto exit to the if block. The exit label was directly after the else-arm, so there is no change in behaviour. Reduces indentation level and clears a line over 80 characters checkpatch warning. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191026121135.181897-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1cafe435a9a0469613b416b1cd94ed67bccf4ecc Author: Michael Straube Date: Sat Oct 26 14:11:34 2019 +0200 staging: rtl8188eu: cleanup long lines in rtw_sta_mgt.c Cleanup lines over 80 characters in rtw_sta_mgt.c by adding line breaks where appropriate. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191026121135.181897-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit dd85035172d081e7dc98d03331340e911c44a832 Author: Michael Straube Date: Sat Oct 26 14:11:33 2019 +0200 staging: rtl8188eu: remove ternary operator Instead of using ternary operator to set variable res, use the value of variable match (or the negation) directly to simplify the code and improve readability. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191026121135.181897-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4e6f391fde3410fb4141261d45333217c22230d4 Author: Michael Straube Date: Sat Oct 26 14:11:32 2019 +0200 staging: rtl8188eu: convert rtw_access_ctrl to return bool Function rtw_access_ctrl returns boolean values, so change the return type to bool. Also convert the local variables that are used for the return value from u8 to bool. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191026121135.181897-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 62ab5b466690213a190a3ec528123029db4de7c3 Author: Michael Straube Date: Sat Oct 26 14:11:31 2019 +0200 staging: rtl8188eu: rename array bcast_addr Rename array bcast_addr to be more consistent in variable naming. In other places in this file buffers for broadcast addresses are named bc_addr as well. bcast_addr -> bc_addr Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191026121135.181897-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit da3611f2fa4bcc47ed769197d93823d3a788b6e9 Author: Michael Straube Date: Sat Oct 26 14:11:30 2019 +0200 staging: rtl8188eu: convert unsigned char array to u8 Convert array bcast_addr from unsigned char to u8. Clears a line over 80 characters checkpatch warning. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191026121135.181897-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 54c6feca8609304eb268f828c669ecd8e22c40fc Author: Michael Straube Date: Sat Oct 26 14:11:29 2019 +0200 staging: rtl8188eu: cleanup comments in rtw_sta_mgt.c Cleanup comments in rtw_sta_mgt.c to use kernel block comment style and not exceed 80 characters line length. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191026121135.181897-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4b1aa4ba48788bc20412b10744ba7ab36d125974 Author: Jules Irenge Date: Sat Oct 19 15:07:19 2019 +0100 staging: wfx: fix warnings of alignment should match open parenthesis : Fix warnings of alignment should match open parenthesis. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191019140719.2542-6-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5f647dca011c094a3bd0ffb42404b77138ea9158 Author: Jules Irenge Date: Sat Oct 19 15:07:18 2019 +0100 staging: wfx: correct misspelled words Correct misspelled words: retrieved and auxiliary. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191019140719.2542-5-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 640a4db708f5b3eb878c495863cb2fb57693ea04 Author: Jules Irenge Date: Sat Oct 19 15:07:17 2019 +0100 staging: wfx: fix warnings of logical continuation Fix check warnings of logical continuations should be on the previous line. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191019140719.2542-4-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1dc3d53ef39061a8cdf2245324e4f1769c4a360a Author: Jules Irenge Date: Sat Oct 19 15:07:16 2019 +0100 staging: wfx: fix warning of line over 80 characters Fix warning of lines over 80 characters. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191019140719.2542-3-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit bc9496e5b4d603b1069a49422900a6b591f4d504 Author: Jules Irenge Date: Sat Oct 19 15:07:15 2019 +0100 staging: wfx: fix warnings of no space is necessary Fix warnings of no space is necessary after a cast. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191019140719.2542-2-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit c22a3a9c0a87d2064cbe744b1b393569d0621474 Author: Jérôme Pouiller Date: Thu Oct 17 09:40:07 2019 +0000 staging: wfx: fix number of available tx_policies Original API declares 16 tx_policies. But in fact, the 16th is used internally by the firmware. So, only 15 tx_policies are available for driver. Reported-by: Alban Jeantheau Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191017093954.657-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 20ed2d1608ecc389ec3df87fc228a7d487f8b07b Author: Jérôme Pouiller Date: Thu Oct 17 09:40:06 2019 +0000 staging: wfx: fix setting MAC address from DT MAC address read from chip is unconditionally used even if a MAC address is configured in device tree. Reported-by: Marc Dorval Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191017093954.657-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 4e4f5e6fef21a574b4749a0fb5e96070eb03cb19 Author: Jérôme Pouiller Date: Thu Oct 17 09:40:06 2019 +0000 staging: wfx: fix Oops when CONFIG_OF_NET is not set In most case, of_get_mac_address() return NULL in case of error. However, if CONFIG_OF_NET is not set, it return -ENODEV. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191017093954.657-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8008d9e7ddf0b72ff0f879af0a3c48a1086b6250 Author: Jérôme Pouiller Date: Thu Oct 17 09:40:06 2019 +0000 staging: wfx: fix CONFIG_MMC=m with CONFIG_WFX=y If CONFIG_MMC=m and CONFIG_WFX=y, compilation complains with undefined references: drivers/staging/wfx/main.o: In function `wfx_core_init': /linux/drivers/staging/wfx/main.c:488: undefined reference to `sdio_register_driver' drivers/staging/wfx/main.o: In function `wfx_core_exit': /linux/drivers/staging/wfx/main.c:496: undefined reference to `sdio_unregister_driver' drivers/staging/wfx/main.o:(.debug_addr+0x1a8): undefined reference to `sdio_register_driver' drivers/staging/wfx/main.o:(.debug_addr+0x6f0): undefined reference to `sdio_unregister_driver' Indeed, symbols sdio_* are not present in kernel image. This patch disallows CONFIG_WFX=y if CONFIG_MMC=m. This solution impacts users who want to use SPI bus with configuration: CONFIG_WFX=y + CONFIG_SPI=y + CONFIG_MMC=m. However, I think this is a twisted case. So, I think it won't be missed. Reported-by: zhong jiang Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191017093954.657-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a374ba3dc8e81f9e61dc8139899c03c602fbd5df Author: Jérôme Pouiller Date: Thu Oct 17 09:40:05 2019 +0000 staging: wfx: relocate wfx_fill_sl_key() in secure_link.h "Secure link" feature is not available in in-tree driver (because it depends on mbedtls). Thus, secure_link.h only empty functions. Module parameter "slk_key" and associated function wfx_fill_sl_key() had an unjustifiable place in main.c. This patch relocate them to secure_link.h. BTW, content of wfx_fill_sl_key() is now useless. Just keep a warning if user try to use "slk_key" attribute (unsupported by this driver). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191017093954.657-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 27a6fe3b21ec80662096b2c793036b5e8c3401ed Author: Jérôme Pouiller Date: Thu Oct 17 09:40:04 2019 +0000 staging: wfx: drop module version wfx_version.h says that this code is same same than driver 2.3.1 hosted on github: https://github.com/siliconlabs/wfx-linux-driver/tree/2.3.1-public However, it is inaccurate, driver in-tree contains multiple small patches ahead 2.3.1. I prefer to drop this confusing information. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191017093954.657-1-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b951248518e6e4e1e811b114a2a065da1ea325f0 Author: Roman Mashak Date: Sat Oct 26 11:11:09 2019 -0400 tc-testing: list required kernel options for act_ct action Updated config with required kernel options for conntrac TC action, so that tdc can run the tests. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller commit 4b1f5ddaffbddfcd7bd696df675c6482a1d2b457 Merge: 64fe8e97693e 671312e1a05c Author: David S. Miller Date: Sat Oct 26 11:35:43 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for net-next, more specifically: * Updates for ipset: 1) Coding style fix for ipset comment extension, from Jeremy Sowden. 2) De-inline many functions in ipset, from Jeremy Sowden. 3) Move ipset function definition from header to source file. 4) Move ip_set_put_flags() to source, export it as a symbol, remove inline. 5) Move range_to_mask() to the source file where this is used. 6) Move ip_set_get_ip_port() to the source file where this is used. * IPVS selftests and netns improvements: 7) Two patches to speedup ipvs netns dismantle, from Haishuang Yan. 8) Three patches to add selftest script for ipvs, also from Haishuang Yan. * Conntrack updates and new nf_hook_slow_list() function: 9) Document ct ecache extension, from Florian Westphal. 10) Skip ct extensions from ctnetlink dump, from Florian. 11) Free ct extension immediately, from Florian. 12) Skip access to ecache extension from nf_ct_deliver_cached_events() this is not correct as reported by Syzbot. 13) Add and use nf_hook_slow_list(), from Florian. * Flowtable infrastructure updates: 14) Move priority to nf_flowtable definition. 15) Dynamic allocation of per-device hooks in flowtables. 16) Allow to include netdevice only once in flowtable definitions. 17) Rise maximum number of devices per flowtable. * Netfilter hardware offload infrastructure updates: 18) Add nft_flow_block_chain() helper function. 19) Pass callback list to nft_setup_cb_call(). 20) Add nft_flow_cls_offload_setup() helper function. 21) Remove rules for the unregistered device via netdevice event. 22) Support for multiple devices in a basechain definition at the ingress hook. 22) Add nft_chain_offload_cmd() helper function. 23) Add nft_flow_block_offload_init() helper function. 24) Rewind in case of failing to bind multiple devices to hook. 25) Typo in IPv6 tproxy module description, from Norman Rasmussen. ==================== Signed-off-by: David S. Miller commit ec9e2a0ff12c0046aa15673a1084a8d67a14bdb1 Author: Javier F. Arias Date: Wed Oct 16 23:05:05 2019 -0500 staging: rtl8723bs: Change tabs for spaces Change tabs for spaces when they are incorrectly used as separators. Fix suggested by Julia Lawall. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/7b06c103665ab7250dded8c5dadc093228eee7b4.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit e004d7ac7d2e280061b1e7e2446aa6f8b5f1393e Author: Javier F. Arias Date: Wed Oct 16 23:04:28 2019 -0500 staging: rtl8723bs: Fix function call format Fix function call format by following the coding style guidelines for argument wrapping in function calls. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/828984012f4c58f9d10647511f98005e4d1d5184.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit fc4776941f51968fc82a8415734826e8ef96bde1 Author: Javier F. Arias Date: Wed Oct 16 23:03:53 2019 -0500 staging: rtl8723bs: Fix indentation warnings Fix indentation warnings to improve the code formatting. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/166ffc747a4212f81d26b03883dbc04d64deed56.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 22b5cbd1d1d23cc20da2ef1b132e8bd4b1307c74 Author: Javier F. Arias Date: Wed Oct 16 23:03:27 2019 -0500 staging: rtl8723bs: Remove commented code Remove commented code for a cleaner file. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/61f9b94781eb0ca1c94a5b6b8c37a8c2d0caaca6.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit e25af5e3ee11df3a4dba9211b9170c193b4736f0 Author: Javier F. Arias Date: Wed Oct 16 23:02:48 2019 -0500 staging: rtl8723bs: Add spaces between operators Add spaces between operators for a better readability. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/4194f2f5a7ed9deeaf3c2a2f2c91081e1f1189c0.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit e52c13d6dca79608b2aa59c9b91afd6b4728f34e Author: Javier F. Arias Date: Wed Oct 16 23:02:19 2019 -0500 staging: rtl8723bs: Fix lines over 80 characters Fix lines over 80 characters by wrapping arguments in function calls, improving the format for a better code readability. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/6a12577f3b95a77e060a2fb60ff17ce94774c076.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit dcad0824532fbeb25ec552965bb0775a3f87061a Author: Javier F. Arias Date: Wed Oct 16 23:01:53 2019 -0500 staging: rtl8723bs: Replace string with identifier Replace the hardcoded function names with the corresponding predefined identifiers. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/b2ff6a52a7140480c9fdb6486a6ac6b4eb51203b.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9fb94522ddf2d3dca0d723e53db5f3f5ffb5487b Author: Andi Shyti Date: Thu Oct 24 22:16:42 2019 +0100 drm/i915: Extract the GuC interrupt handlers Pull the GuC interrupt handlers out of i915_irq.c. They now use the GT interrupt facilities rather than the central dispatch. Based on a patch by Chris Wilson. Signed-off-by: Andi Shyti Cc: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191024211642.7688-2-chris@chris-wilson.co.uk commit 3e7abf8141935ded77abeb622480bf4a14241ece Author: Andi Shyti Date: Thu Oct 24 22:16:41 2019 +0100 drm/i915: Extract GT render power state management i915_irq.c is large. One reason for this is that has a large chunk of the GT render power management stashed away in it. Extract that logic out of i915_irq.c and intel_pm.c and put it under one roof. Based on a patch by Chris Wilson. Signed-off-by: Andi Shyti Cc: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191024211642.7688-1-chris@chris-wilson.co.uk commit 64fe8e97693e009501c143a30cc8a28babd4d2b0 Merge: 0629d2456ae3 7873ee26b10b Author: David S. Miller Date: Sat Oct 26 11:28:40 2019 -0700 Merge branch 'net-aquantia-ptp-followup-fixes' Igor Russkikh says: ==================== net: aquantia: ptp followup fixes Here are two sparse warnings, third patch is a fix for scaled_ppm_to_ppb missing. Eventually I reworked this to exclude ptp module from build. Please consider it instead of this patch: https://patchwork.ozlabs.org/patch/1184171/ ==================== Signed-off-by: David S. Miller commit 7873ee26b10bcb03553b6a26ec16b9a937a5b916 Author: Igor Russkikh Date: Sat Oct 26 11:05:34 2019 +0000 net: aquantia: disable ptp object build if no config We do disable aq_ptp module build using inline stubs when CONFIG_PTP_1588_CLOCK is not declared. This reduces module size and removes unnecessary code. Reported-by: YueHaibing Signed-off-by: Igor Russkikh Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 5eeb6c3cf26eac522df07bee1a58573804179126 Author: Igor Russkikh Date: Sat Oct 26 11:05:33 2019 +0000 net: aquantia: fix warnings on endianness fixes to remove sparse warnings: sparse: sparse: cast to restricted __be64 Fixes: 04a1839950d9 ("net: aquantia: implement data PTP datapath") Reported-by: kbuild test robot Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit bb1eded18d139c815f39abb77390a7040fb24b04 Author: Igor Russkikh Date: Sat Oct 26 11:05:31 2019 +0000 net: aquantia: fix var initialization warning found by sparse, simply useless local initialization with zero. Fixes: 94ad94558b0f ("net: aquantia: add PTP rings infrastructure") Reported-by: kbuild test robot Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 52d3be711e065a97a57c2f2ffba3098748855bd6 Author: Alain Volmat Date: Tue Oct 15 15:03:09 2019 +0200 i2c: stm32f7: rework slave_id allocation The IP can handle two slave addresses. One address can either be 7 bits or 10 bits while the other can only be 7 bits. In order to ensure that a 10 bits address can always be allocated (assuming there is only one 7 bits address already allocated), pick up the 7-bits only address slot in priority when performing a 7-bits address allocation. Fixes: 60d609f30de2 ("i2c: i2c-stm32f7: Add slave support") Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 0d3ccc1cdeb75269e2a7e849c3c4ce2f73cc1e18 Author: Andreas Färber Date: Sat Oct 19 20:39:39 2019 +0200 dt-bindings: arm: realtek: Tidy up conversion to json-schema Restore the device names for compatible strings as comments. Prepare for adding more SoCs by inserting oneOf. Fixes: 693af5f3eeaa ("dt-bindings: arm: Convert Realtek board/soc bindings to json-schema") Reviewed-by: Rob Herring Signed-off-by: Andreas Färber commit 3d4e0158c1db518a3a0c4ada5b5a2b1539ce5643 Author: Mihaela Martinas Date: Wed Oct 16 15:48:24 2019 +0300 arm64: Introduce config for S32 Add configuration option for the NXP S32 platform family in Kconfig.platforms. For starters, the only SoC supported will be Treerunner (S32V234), with a single execution target: the S32V234-EVB (rev 29288) board. Signed-off-by: Mihaela Martinas Signed-off-by: Stoica Cosmin-Stefan Signed-off-by: Stefan-Gabriel Mirea Signed-off-by: Shawn Guo commit 997c5329a5ab2942be3c9a84fbb0b05fa8f24194 Author: Eddy Petrișor Date: Wed Oct 16 15:48:23 2019 +0300 dt-bindings: arm: fsl: Add the S32V234-EVB board Add entry for the NXP S32V234 Customer Evaluation Board to the board/SoC bindings. Signed-off-by: Eddy Petrișor Signed-off-by: Stefan-Gabriel Mirea Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 568a0a96649fd9bae173a5abb8e05a6fc4577b38 Author: Gilles DOFFE Date: Wed Oct 16 11:22:55 2019 +0200 ARM: dts: imx6qdl-rex: add gpio expander pca9535 The pca9535 gpio expander is present on the Rex baseboard, but missing from the dtsi. The pca9535 is on i2c2 bus which is common to the three SOM variants (Basic/Pro/Ultra), thus it is activated by default. Add also the new gpio controller and the associated interrupt line MX6QDL_PAD_NANDF_CS3__GPIO6_IO16. Signed-off-by: Gilles DOFFE Signed-off-by: Shawn Guo commit b780317d8dabff07d36eeb1a1f01ce191263d5f1 Author: Peter Chen Date: Wed Oct 16 16:31:05 2019 +0800 ARM: dts: imx6ul-14x14-evk.dtsi: configure USBOTG1 ID pinctrl Without configuring this pinctrl, the ID value can't be got correctly, then, the dual-role switch can't work well. Signed-off-by: Peter Chen Reviewed-by: Jun Li Signed-off-by: Shawn Guo commit c4a0457eb858ace4f2ed19c57b9d40a8d78f2ea8 Author: Corentin Labbe Date: Thu Oct 17 05:06:26 2019 +0000 ARM64: dts: amlogic: adds crypto hardware node This patch adds the GXL crypto hardware node for all GXL SoCs. Reviewed-by: Kevin Hilman Signed-off-by: Corentin Labbe Signed-off-by: Kevin Hilman commit 671312e1a05c579714bc08eb2ac3ad5a2c86a10e Author: Pablo Neira Ayuso Date: Thu Oct 24 10:30:19 2019 +0200 netfilter: nf_tables_offload: unbind if multi-device binding fails nft_flow_block_chain() needs to unbind in case of error when performing the multi-device binding. Fixes: d54725cd11a5 ("netfilter: nf_tables: support for multiple devices per netdev hook") Reported-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 75ceaf862d2c7eb38ba41ddc857618aa4b28b0a2 Author: Pablo Neira Ayuso Date: Thu Oct 24 10:00:51 2019 +0200 netfilter: nf_tables_offload: add nft_flow_block_offload_init() This patch adds the nft_flow_block_offload_init() helper function to initialize the flow_block_offload object. Signed-off-by: Pablo Neira Ayuso commit 6df5490fbb9c2d48e9f27a7f128032ac38ae5c59 Author: Pablo Neira Ayuso Date: Thu Oct 24 09:47:08 2019 +0200 netfilter: nf_tables_offload: add nft_chain_offload_cmd() This patch adds the nft_chain_offload_cmd() helper function. Signed-off-by: Pablo Neira Ayuso commit ad88b7a6aa3e6ac94589fc1aaf7c99fe9211cff2 Author: Florian Westphal Date: Tue Oct 22 18:56:42 2019 +0200 netfilter: ecache: don't look for ecache extension on dying/unconfirmed conntracks syzbot reported following splat: BUG: KASAN: use-after-free in __nf_ct_ext_exist include/net/netfilter/nf_conntrack_extend.h:53 [inline] BUG: KASAN: use-after-free in nf_ct_deliver_cached_events+0x5c3/0x6d0 net/netfilter/nf_conntrack_ecache.c:205 nf_conntrack_confirm include/net/netfilter/nf_conntrack_core.h:65 [inline] nf_confirm+0x3d8/0x4d0 net/netfilter/nf_conntrack_proto.c:154 [..] While there is no reproducer yet, the syzbot report contains one interesting bit of information: Freed by task 27585: [..] kfree+0x10a/0x2c0 mm/slab.c:3757 nf_ct_ext_destroy+0x2ab/0x2e0 net/netfilter/nf_conntrack_extend.c:38 nf_conntrack_free+0x8f/0xe0 net/netfilter/nf_conntrack_core.c:1418 destroy_conntrack+0x1a2/0x270 net/netfilter/nf_conntrack_core.c:626 nf_conntrack_put include/linux/netfilter/nf_conntrack_common.h:31 [inline] nf_ct_resolve_clash net/netfilter/nf_conntrack_core.c:915 [inline] ^^^^^^^^^^^^^^^^^^^ __nf_conntrack_confirm+0x21ca/0x2830 net/netfilter/nf_conntrack_core.c:1038 nf_conntrack_confirm include/net/netfilter/nf_conntrack_core.h:63 [inline] nf_confirm+0x3e7/0x4d0 net/netfilter/nf_conntrack_proto.c:154 This is whats happening: 1. a conntrack entry is about to be confirmed (added to hash table). 2. a clash with existing entry is detected. 3. nf_ct_resolve_clash() puts skb->nfct (the "losing" entry). 4. this entry now has a refcount of 0 and is freed to SLAB_TYPESAFE_BY_RCU kmem cache. skb->nfct has been replaced by the one found in the hash. Problem is that nf_conntrack_confirm() uses the old ct: static inline int nf_conntrack_confirm(struct sk_buff *skb) { struct nf_conn *ct = (struct nf_conn *)skb_nfct(skb); int ret = NF_ACCEPT; if (ct) { if (!nf_ct_is_confirmed(ct)) ret = __nf_conntrack_confirm(skb); if (likely(ret == NF_ACCEPT)) nf_ct_deliver_cached_events(ct); /* This ct has refcount 0! */ } return ret; } As of "netfilter: conntrack: free extension area immediately", we can't access conntrack extensions in this case. To fix this, make sure we check the dying bit presence before attempting to get the eache extension. Reported-by: syzbot+c7aabc9fe93e7f3637ba@syzkaller.appspotmail.com Fixes: 2ad9d7747c10d1 ("netfilter: conntrack: free extension area immediately") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c2cc62d831863151fd0cb7da7ac9a0c324aab871 Author: Marc Zyngier Date: Wed Jan 9 14:36:34 2019 +0000 arm64: Enable and document ARM errata 1319367 and 1319537 Now that everything is in place, let's get the ball rolling by allowing the corresponding config option to be selected. Also add the required information to silicon_errata.rst. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier commit bd227553ad5077f21ddb382dcd910ba46181805a Author: Marc Zyngier Date: Tue Jul 30 11:15:31 2019 +0100 arm64: KVM: Prevent speculative S1 PTW when restoring vcpu context When handling erratum 1319367, we must ensure that the page table walker cannot parse the S1 page tables while the guest is in an inconsistent state. This is done as follows: On guest entry: - TCR_EL1.EPD{0,1} are set, ensuring that no PTW can occur - all system registers are restored, except for TCR_EL1 and SCTLR_EL1 - stage-2 is restored - SCTLR_EL1 and TCR_EL1 are restored On guest exit: - SCTLR_EL1.M and TCR_EL1.EPD{0,1} are set, ensuring that no PTW can occur - stage-2 is disabled - All host system registers are restored Reviewed-by: James Morse Signed-off-by: Marc Zyngier commit 37553941c670c3ad160b25843e6cdcbee2b3c6eb Author: Marc Zyngier Date: Tue Jul 30 10:50:38 2019 +0100 arm64: KVM: Disable EL1 PTW when invalidating S2 TLBs When erratum 1319367 is being worked around, special care must be taken not to allow the page table walker to populate TLBs while we have the stage-2 translation enabled (which would otherwise result in a bizare mix of the host S1 and the guest S2). We enforce this by setting TCR_EL1.EPD{0,1} before restoring the S2 configuration, and clear the same bits after having disabled S2. Reviewed-by: James Morse Signed-off-by: Marc Zyngier commit 1d8cd06af548bb1ba29e16eec78c0862e799a731 Author: Marc Zyngier Date: Wed Jan 9 14:46:23 2019 +0000 arm64: KVM: Reorder system register restoration and stage-2 activation In order to prepare for handling erratum 1319367, we need to make sure that all system registers (and most importantly the registers configuring the virtual memory) are set before we enable stage-2 translation. This results in a minor reorganisation of the load sequence, without any functional change. Reviewed-by: James Morse Signed-off-by: Marc Zyngier commit 35865aef057ca3e8da69a91679341a11633def92 Author: Chris Wilson Date: Sat Oct 26 09:22:20 2019 +0100 drm/i915/tgl: Adjust the location of RING_MI_MODE in the context image The location of RING_MI_MODE (used to stop the ring across resets) moved for Tigerlake. Fixup the new location and include a selftest to verify the location in the default context image. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191026082220.32632-1-chris@chris-wilson.co.uk commit babaab2f473817f173a2d08e410c25abf5ed0f6b Author: Chris Wilson Date: Fri Oct 25 14:59:42 2019 +0100 drm/i915: Encapsulate kconfig constant values inside boolean predicates Avoid angering clang and smatch by using a constant value in a '&&' test, by forcing that constant value into a boolean. E.g., drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c:159:13: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] if (!delay && CONFIG_DRM_I915_PREEMPT_TIMEOUT) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: kbuild test robot Signed-off-by: Chris Wilson Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Jani Nikula Reviewed-by: Nathan Chancellor Link: https://patchwork.freedesktop.org/patch/msgid/20191025135943.12524-1-chris@chris-wilson.co.uk commit 2e2b928a04bd74ea410da72bd60e1c5b06398276 Author: Anson Huang Date: Fri Oct 11 17:09:00 2019 +0800 clk: imx7ulp: Correct DDR clock mux options In the latest reference manual Rev.0,06/2019, the DDR clock mux is extended to 2 bits, and the clock options are also changed, correct them accordingly. Fixes: b1260067ac3d ("clk: imx: add imx7ulp clk driver") Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 96ac93a7c4bea4eb4186425795c00937d2dd6085 Author: Anson Huang Date: Mon Oct 14 08:56:05 2019 +0800 clk: imx7ulp: Correct system clock source option #7 In the latest reference manual Rev.0,06/2019, the SCS's option #7 is no longer from upll, it is reserved, update clock driver accordingly. Fixes: b1260067ac3d ("clk: imx: add imx7ulp clk driver") Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 37a92df9612265307bee53d423b2d7e7eb0fa985 Author: Peter Griffin Date: Tue Oct 1 18:35:35 2019 +0000 arm64: dts: hisilicon: Add Mali-450 MP4 GPU DT entry hi6220 has a Mali450 MP4 so lets add it into the DT. Cc: Wei Xu Cc: Rob Herring Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Signed-off-by: Peter Griffin Signed-off-by: John Stultz Signed-off-by: Wei Xu commit 88ae095b2855c5caf18cc476b03f5b0c96b040a2 Author: Kefeng Wang Date: Mon May 27 23:51:28 2019 +0800 ARM: hisi: drop useless depend on ARCH_MULTI_V7 The ARCH_HISI depends on ARCH_MULTI_V7, no need to add this depend to each sub-menu config, and use tabs where possible. Signed-off-by: Kefeng Wang Signed-off-by: Wei Xu commit 006ece996d2206082d281ba271b1ed17f1ee6422 Author: Zhou Wang Date: Thu Oct 10 16:24:50 2019 +0800 arm64: defconfig: Enable SMMU v3 PMCG HiSilicon Kunpeng920 SoC's SMMU has Performance Monitor Counter Groups(PMCG). This patch enables related driver in defconfig. Signed-off-by: Zhou Wang Signed-off-by: Wei Xu commit af24cb20689db0152ccdf7390dbfe13d1d7a048b Author: Zhou Wang Date: Fri Sep 27 10:58:05 2019 +0800 arm64: defconfig: Enable HiSilicon ZIP controller Enable CONFIG_CRYPTO_DEV_HISI_ZIP for HiSilicon ZIP controller in Kunpeng920 SoC. Signed-off-by: Zhou Wang Signed-off-by: Wei Xu commit 492ad783a150cd352abba8723e5942521d938c8d Author: Luiz Augusto von Dentz Date: Thu Oct 24 16:15:43 2019 +0300 Bluetooth: Fix not using LE_ADV_NONCONN_IND for instance 0 Instance 0 is controlled by stack itself and always set the local name in the scan response. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 10bbffa3e88e3aae870c734b234c0718d26f97ab Author: Luiz Augusto von Dentz Date: Thu Oct 24 16:15:42 2019 +0300 Bluetooth: Fix using advertising instance duration as timeout When using LE Set Extended Advertising Enable command the duration refers to the lifetime of instance not the length which is actually controlled by the interval_min and interval_max when setting the parameters. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit de76f73574903f877a417cb6d4ec7ece1f87ae1c Author: Abhishek Pandit-Subedi Date: Fri Oct 25 14:54:27 2019 -0700 dt-bindings: net: broadcom-bluetooth: Add BCM43540 compatible string The BCM43540 is a 802.11 a/b/g/n/ac WiFi + Bluetooth 4.1 chip from Broadcom. This is present in Azurewave AW-CM195NF WiFi+BT module. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit d462af20dbfa1b9b1a831412f32d9d6757b82459 Author: Abhishek Pandit-Subedi Date: Fri Oct 25 14:54:26 2019 -0700 Bluetooth: hci_bcm: Add compatible string for BCM43540 The BCM43540 chip is a 802.11 a/b/g/n/ac + Bluetooth 4.1 combo module. This patch adds a compatible string match to the serdev driver for the Bluetooth part of the chip. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 515d6798fec9632fffb79261c511eb166f773273 Author: YueHaibing Date: Fri Oct 25 17:26:53 2019 +0800 Bluetooth: btrtl: remove unneeded semicolon Remove unneeded semicolon. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Marcel Holtmann commit 0629d2456ae3bfb374fdc686abb30b73294e4f99 Merge: e4b5c7a582a7 63ad1cd68071 Author: David S. Miller Date: Fri Oct 25 20:52:36 2019 -0700 Merge branch 'ionic-updates' Shannon Nelson says: ==================== ionic updates These are a few of the driver updates we've been working on internally. These clean up a few mismatched struct comments, add checking for dead firmware, fix an initialization bug, and change the Rx buffer management. These are based on net-next v5.4-rc3-709-g985fd98ab5cc. v2: clear napi->skb in the error case in ionic_rx_frags() ==================== Signed-off-by: David S. Miller commit 63ad1cd68071d56d9ed99ed35f622513005f71dc Author: Shannon Nelson Date: Wed Oct 23 17:49:00 2019 -0700 ionic: update driver version Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 08f2e4b2b2008ce461dd6958caa616a2e3a30ac8 Author: Shannon Nelson Date: Wed Oct 23 17:48:59 2019 -0700 ionic: implement support for rx sgl Even out Rx performance across MTU sizes by changing from full skb allocations to page-based frag allocations. The device supports a form of scatter-gather in the Rx path, so we can set up a number of pages for each descriptor, all of which are easier to alloc and pass around than the standard kzalloc'd buffer. An skb is wrapped around the pages while processing the received packets, and pages are recycled as needed, or left alone if they weren't used in the Rx. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 089406bc5ad639e4fcc9419f70f4d3d91d7370cb Author: Shannon Nelson Date: Wed Oct 23 17:48:58 2019 -0700 ionic: add a watchdog timer to monitor heartbeat Add a watchdog to periodically monitor the NIC heartbeat. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 97ca486592c0e940a85a06b3ca37dcb6962b2a04 Author: Shannon Nelson Date: Wed Oct 23 17:48:57 2019 -0700 ionic: add heartbeat check Most of our firmware has a heartbeat feature that the driver can watch for to see if the FW is still alive and likely to answer a dev_cmd or AdminQ request. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit ff7ebed94551bcb37bc344bba294ba58ead55db0 Author: Shannon Nelson Date: Wed Oct 23 17:48:56 2019 -0700 ionic: reverse an interrupt coalesce calculation Fix the initial interrupt coalesce usec-to-hw setting to actually be usec-to-hw. Fixes: 780eded34ccc ("ionic: report users coalesce request") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 5c28f213ef7937832e0666605edff09ea214ac65 Author: Shannon Nelson Date: Wed Oct 23 17:48:55 2019 -0700 ionic: fix up struct name comments Fix up struct names in the ionic_if.h comments Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit e4b5c7a582a75f1de54620447854bc5a29011637 Author: Heiner Kallweit Date: Wed Oct 23 21:36:14 2019 +0200 r8169: improve rtl8169_rx_fill We have only one user of the error path, so we can inline it. In addition the call to rtl8169_make_unusable_by_asic() can be removed because rtl8169_alloc_rx_data() didn't call rtl8169_mark_to_asic() yet for the respective index if returning NULL. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 7cb83b21fd3bb9a27b1a00a2a8b436761e969f0b Author: Heiner Kallweit Date: Wed Oct 23 21:09:34 2019 +0200 r8169: align fix_features callback with vendor driver This patch aligns the fix_features callback with the vendor driver and also disables IPv6 HW checksumming and TSO if jumbo packets are used on RTL8101/RTL8168/RTL8125. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8ca12bc36f6b3bbecb929734f2a01991ab957c63 Merge: 480274787d7e 3347a80965b3 Author: David S. Miller Date: Fri Oct 25 20:19:44 2019 -0700 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2019-10-23 Here's the main bluetooth-next pull request for the 5.5 kernel: - Multiple fixes to hci_qca driver - Fix for HCI_USER_CHANNEL initialization - btwlink: drop superseded driver - Add support for Intel FW download error recovery - Various other smaller fixes & improvements Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 480274787d7e3458bc5a7cfbbbe07033984ad711 Author: Jason Baron Date: Wed Oct 23 11:09:26 2019 -0400 tcp: add TCP_INFO status for failed client TFO The TCPI_OPT_SYN_DATA bit as part of tcpi_options currently reports whether or not data-in-SYN was ack'd on both the client and server side. We'd like to gather more information on the client-side in the failure case in order to indicate the reason for the failure. This can be useful for not only debugging TFO, but also for creating TFO socket policies. For example, if a middle box removes the TFO option or drops a data-in-SYN, we can can detect this case, and turn off TFO for these connections saving the extra retransmits. The newly added tcpi_fastopen_client_fail status is 2 bits and has the following 4 states: 1) TFO_STATUS_UNSPEC Catch-all state which includes when TFO is disabled via black hole detection, which is indicated via LINUX_MIB_TCPFASTOPENBLACKHOLE. 2) TFO_COOKIE_UNAVAILABLE If TFO_CLIENT_NO_COOKIE mode is off, this state indicates that no cookie is available in the cache. 3) TFO_DATA_NOT_ACKED Data was sent with SYN, we received a SYN/ACK but it did not cover the data portion. Cookie is not accepted by server because the cookie may be invalid or the server may be overloaded. 4) TFO_SYN_RETRANSMITTED Data was sent with SYN, we received a SYN/ACK which did not cover the data after at least 1 additional SYN was sent (without data). It may be the case that a middle-box is dropping data-in-SYN packets. Thus, it would be more efficient to not use TFO on this connection to avoid extra retransmits during connection establishment. These new fields do not cover all the cases where TFO may fail, but other failures, such as SYN/ACK + data being dropped, will result in the connection not becoming established. And a connection blackhole after session establishment shows up as a stalled connection. Signed-off-by: Jason Baron Cc: Eric Dumazet Cc: Neal Cardwell Cc: Christoph Paasch Cc: Yuchung Cheng Acked-by: Yuchung Cheng Signed-off-by: David S. Miller commit 79f2056b8b35e0d2e21c35eee77c7a4b337d7df6 Merge: 546b85bb0aad ef87f7da6b28 Author: David S. Miller Date: Fri Oct 25 19:24:47 2019 -0700 Merge branch 'phy-dp83867-enable-robust-auto-mdix' Grygorii Strashko says: ==================== net: phy: dp83867: enable robust auto-mdix Patch 1 - improves link detection when dp83867 PHY is configured in manual mode by enabling CFG3[9] Robust Auto-MDIX option. Patch 2 - is minor optimization. ==================== Signed-off-by: David S. Miller commit ef87f7da6b28dfaf7aac435350fe287cc667124a Author: Grygorii Strashko Date: Wed Oct 23 17:48:46 2019 +0300 net: phy: dp83867: move dt parsing to probe Move DT parsing code to probe dp83867_probe() as it's one time operation. Signed-off-by: Grygorii Strashko Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5a7f08c2abb0efc9d17aff2fc75d6d3b85e622e4 Author: Grygorii Strashko Date: Wed Oct 23 17:48:45 2019 +0300 net: phy: dp83867: enable robust auto-mdix The link detection timeouts can be observed (or link might not be detected at all) when dp83867 PHY is configured in manual mode (speed/duplex). CFG3[9] Robust Auto-MDIX option allows to significantly improve link detection in case dp83867 is configured in manual mode and reduce link detection time. As per DM: "If link partners are configured to operational modes that are not supported by normal Auto MDI/MDIX mode (like Auto-Neg versus Force 100Base-TX or Force 100Base-TX versus Force 100Base-TX), this Robust Auto MDI/MDIX mode allows MDI/MDIX resolution and prevents deadlock." Hence, enable this option by default as there are no known reasons not to do so. Signed-off-by: Grygorii Strashko Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 546b85bb0aadb5a928b49b53dc02911996169c0b Author: Vincent Prince Date: Wed Oct 23 15:44:20 2019 +0200 net: sch_generic: Use pfifo_fast as fallback scheduler for CAN hardware There is networking hardware that isn't based on Ethernet for layers 1 and 2. For example CAN. CAN is a multi-master serial bus standard for connecting Electronic Control Units [ECUs] also known as nodes. A frame on the CAN bus carries up to 8 bytes of payload. Frame corruption is detected by a CRC. However frame loss due to corruption is possible, but a quite unusual phenomenon. While fq_codel works great for TCP/IP, it doesn't for CAN. There are a lot of legacy protocols on top of CAN, which are not build with flow control or high CAN frame drop rates in mind. When using fq_codel, as soon as the queue reaches a certain delay based length, skbs from the head of the queue are silently dropped. Silently meaning that the user space using a send() or similar syscall doesn't get an error. However TCP's flow control algorithm will detect dropped packages and adjust the bandwidth accordingly. When using fq_codel and sending raw frames over CAN, which is the common use case, the user space thinks the package has been sent without problems, because send() returned without an error. pfifo_fast will drop skbs, if the queue length exceeds the maximum. But with this scheduler the skbs at the tail are dropped, an error (-ENOBUFS) is propagated to user space. So that the user space can slow down the package generation. On distributions, where fq_codel is made default via CONFIG_DEFAULT_NET_SCH during compile time, or set default during runtime with sysctl net.core.default_qdisc (see [1]), we get a bad user experience. In my test case with pfifo_fast, I can transfer thousands of million CAN frames without a frame drop. On the other hand with fq_codel there is more then one lost CAN frame per thousand frames. As pointed out fq_codel is not suited for CAN hardware, so this patch changes attach_one_default_qdisc() to use pfifo_fast for "ARPHRD_CAN" network devices. During transition of a netdev from down to up state the default queuing discipline is attached by attach_default_qdiscs() with the help of attach_one_default_qdisc(). This patch modifies attach_one_default_qdisc() to attach the pfifo_fast (pfifo_fast_ops) if the network device type is "ARPHRD_CAN". [1] https://github.com/systemd/systemd/issues/9194 Suggested-by: Marc Kleine-Budde Signed-off-by: Marc Kleine-Budde Signed-off-by: Vincent Prince Acked-by: Dave Taht Signed-off-by: David S. Miller commit e3ca9556f75cb7188f82dabad3aff14a5a10e9dc Author: Andreas Färber Date: Sun Oct 20 16:42:41 2019 +0200 arm64: realtek: Select reset controller Select RESET_CONTROLLER for ARCH_REALTEK. Signed-off-by: Andreas Färber commit 8e484ebb1edc8329e1f7c527d556038a395f654e Author: Hayes Wang Date: Wed Oct 23 21:24:44 2019 +0800 r8152: check the pointer rtl_fw->fw before using it Fix the pointer rtl_fw->fw would be used before checking in rtl8152_apply_firmware() that causes the following kernel oops. Unable to handle kernel NULL pointer dereference at virtual address 00000002 pgd = (ptrval) [00000002] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 131 Comm: kworker/0:2 Not tainted 5.4.0-rc1-00539-g9370f2d05a2a #6788 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events_long rtl_hw_phy_work_func_t PC is at rtl8152_apply_firmware+0x14/0x464 LR is at r8153_hw_phy_cfg+0x24/0x17c pc : [] lr : [] psr: a0000013 sp : e75c9e60 ip : 60000013 fp : c11b7614 r10: e883b91c r9 : 00000000 r8 : fffffffe r7 : e883b640 r6 : fffffffe r5 : fffffffe r4 : e883b640 r3 : 736cfe7c r2 : 736cfe7c r1 : 000052f8 r0 : e883b640 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 6640006a DAC: 00000051 Process kworker/0:2 (pid: 131, stack limit = 0x(ptrval)) Stack: (0xe75c9e60 to 0xe75ca000) ... [] (rtl8152_apply_firmware) from [] (r8153_hw_phy_cfg+0x24/0x17c) [] (r8153_hw_phy_cfg) from [] (rtl_hw_phy_work_func_t+0x220/0x3e4) [] (rtl_hw_phy_work_func_t) from [] (process_one_work+0x22c/0x7c8) [] (process_one_work) from [] (worker_thread+0x44/0x520) [] (worker_thread) from [] (kthread+0x130/0x164) [] (kthread) from [] (ret_from_fork+0x14/0x20) Exception stack(0xe75c9fb0 to 0xe75c9ff8) ... Fixes: 9370f2d05a2a ("r8152: support request_firmware for RTL8153") Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 2d69c42e373fa1ae2d4e27f7b11e61978d07c6d3 Author: José Roberto de Souza Date: Mon Oct 21 15:34:08 2019 -0700 drm/i915/tc: Clear DKL_TX_PMD_LANE_SUS before program voltage swing This sequence was recently added to fix internal HW sequences to reset TC ports. HSDES: 1507287614 HSDES: 14010071447 BSpec: 49292 Reviewed-by: Lucas De Marchi Cc: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191021223408.87344-1-jose.souza@intel.com commit c442292a661bec3a32cf2a351c53c5f07da20e21 Author: Chris Wilson Date: Fri Oct 25 17:54:42 2019 +0100 drm/i915/pmu: Initialise the spinlock before registering As the GT may be running in parallel with the module initialisation code, we may enter i915_pmu_gt_parked() as we are executing i915_pmu_register(). We have to init the spinlock before we mark pmu.event_init so that it is available for use by i915_pmu_gt_parked() (which may run as soon as event_init is set). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112127 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191025165442.23356-1-chris@chris-wilson.co.uk commit 0e99f939f08fc36820869e87dee109c5996abff0 Author: Matthew Auld Date: Fri Oct 25 18:25:11 2019 +0100 drm/i915/selftests/blt: add some kthreads into the mix We can be more aggressive in our testing by launching a number of kthreads, where each is submitting its own copy or fill batches on a set of random sized objects. Also since the underlying fill and copy batches can be pre-empted mid-batch(for particularly large objects), throw in a random mixture of ctx priorities per thread to make pre-emption a possibility. Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025172511.25742-1-matthew.auld@intel.com commit dd158d71a08510e9a39fd1fd5e1f8e9d404bcb7f Author: Matthew Auld Date: Fri Oct 25 16:37:28 2019 +0100 drm/i915/selftests: add sanity selftest for huge-GTT-pages Now that for all the relevant backends we do randomised testing, we need to make sure we still sanity check the obvious cases that might blow up, such that introducing a temporary regression is less likely. Also rather than do this for every backend, just limit to our two memory types: system and local. Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025153728.23689-7-chris@chris-wilson.co.uk commit 11d723ceb2979953711e8a6c74e4786018e0b108 Author: Matthew Auld Date: Fri Oct 25 16:37:27 2019 +0100 drm/i915/selftests: prefer random sizes for the huge-GTT-page smoke tests Ditch the dubious static list of sizes to enumerate, in favour of choosing a random size within the limits of each backing store. With repeated CI runs this should give us a wider range of object sizes, and in turn more page-size combinations, while using less machine time. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025153728.23689-6-chris@chris-wilson.co.uk commit 23741bc81de98e4223a77cd970e858f249bc0fae Author: Matthew Auld Date: Fri Oct 25 16:37:26 2019 +0100 drm/i915/selftests: extend coverage to include LMEM huge-pages Add LMEM objects to list of backends we test for huge-GTT-pages. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025153728.23689-5-chris@chris-wilson.co.uk commit 340be48f2c5a3c099ee4a20586f706422d453417 Author: Matthew Auld Date: Fri Oct 25 16:37:25 2019 +0100 drm/i915/selftests: add write-dword test for LMEM Simple test writing to dwords across an object, using various engines in a randomized order, checking that our writes land from the cpu. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025153728.23689-4-chris@chris-wilson.co.uk commit 01377a0d7e6648b050588cf1a6f71a5d8e6ad2b4 Author: Abdiel Janulgue Date: Fri Oct 25 16:37:24 2019 +0100 drm/i915/lmem: support kernel mapping We can create LMEM objects, but we also need to support mapping them into kernel space for internal use. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Signed-off-by: Steve Hampson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025153728.23689-3-chris@chris-wilson.co.uk commit cb6d2467ace7fb50203ff3900c31d01c7670ff6f Author: Abdiel Janulgue Date: Fri Oct 25 16:37:23 2019 +0100 drm/i915: setup io-mapping for LMEM Create an io-mapping to describe the CPU aperture for lmem. Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025153728.23689-2-chris@chris-wilson.co.uk commit b908be543e4441476916f2ae36cebc95cb187436 Author: Matthew Auld Date: Fri Oct 25 16:37:22 2019 +0100 drm/i915: support creating LMEM objects We currently define LMEM, or local memory, as just another memory region, like system memory or stolen, which we can expose to userspace and can be mapped to the CPU via some BAR. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025153728.23689-1-chris@chris-wilson.co.uk commit 027cbaaf61983351622c29f5a2adc7340340cb7f Author: Andrii Nakryiko Date: Thu Oct 24 21:55:03 2019 -0700 selftests/bpf: Fix .gitignore to ignore no_alu32/ When switching to alu32 by default, no_alu32/ subdirectory wasn't added to .gitignore. Fix it. Fixes: e13a2fe642bd ("tools/bpf: Turn on llvm alu32 attribute by default") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191025045503.3043427-1-andriin@fb.com commit a94364603610f341564351a0e130c4bbcaeddfa0 Author: Jiri Olsa Date: Thu Oct 24 15:30:25 2019 +0200 bpftool: Allow to read btf as raw data The bpftool interface stays the same, but now it's possible to run it over BTF raw data, like: $ bpftool btf dump file /sys/kernel/btf/vmlinux [1] INT '(anon)' size=4 bits_offset=0 nr_bits=32 encoding=(none) [2] INT 'long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none) [3] CONST '(anon)' type_id=2 Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/20191024133025.10691-1-jolsa@kernel.org commit 7be8782a502fdb60e1f99c82a8d6b3015a2a6bc4 Author: Lucas De Marchi Date: Thu Oct 24 12:51:22 2019 -0700 drm/i915: split gen11_irq_handler to make it shareable Split gen11_irq_handler() to receive as parameter the function pointers. This allows to share the interrupt handler even if the enable/disable functions are different. Make sure it's always inlined to avoid the extra indirect call on the hot path. Checking with gcc 9 this produce the exact same code as of now: $ size drivers/gpu/drm/i915/i915_irq*.o text data bss dec hex filename 47511 560 0 48071 bbc7 drivers/gpu/drm/i915/i915_irq.o 47511 560 0 48071 bbc7 drivers/gpu/drm/i915/i915_irq_new.o $ gdb -batch -ex 'file drivers/gpu/drm/i915/i915_irq.o' -ex 'disassemble gen11_irq_handler' > /tmp/old.s $ gdb -batch -ex 'file drivers/gpu/drm/i915/i915_irq_new.o' -ex 'disassemble gen11_irq_handler' > /tmp/new.s $ git diff --no-index /tmp/{old,new}.s $ So, no change in behavior, just a simple refactor. Cc: Daniele Ceraolo Spurio Signed-off-by: Lucas De Marchi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191024195122.22877-4-lucas.demarchi@intel.com commit e6e2ac07118b15f25683fcbd59ea1be73ec9465d Author: Lucas De Marchi Date: Thu Oct 24 12:51:21 2019 -0700 drm/i915: do not set MOCS control values on dgfx On dgfx there's no LLC and eDRAM control table. Since now this also means the device has global MOCS, just return early on the initialization function. L3 settings still apply and still need to be tweaked. Bspec: 45101 Cc: Daniele Ceraolo Spurio Signed-off-by: Lucas De Marchi Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20191024195122.22877-3-lucas.demarchi@intel.com commit d8203d398c0dca1b17922d096938b96c711f0367 Author: Stuart Summers Date: Thu Oct 24 12:51:20 2019 -0700 drm/i915: add new gen12 dgfx platform macro Add a new macro for GEN12 platforms to be grouped under dgfx feature set. Signed-off-by: Stuart Summers Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191024195122.22877-2-lucas.demarchi@intel.com commit dc90fe3fd219c7693617ba09a9467e4aadc2e039 Author: José Roberto de Souza Date: Thu Oct 24 12:51:19 2019 -0700 drm/i915: Add is_dgfx to device info This will be helpful to diferentiate a set of GPUs with the same GEN version. Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20191024195122.22877-1-lucas.demarchi@intel.com commit db5e65fcb39352e193bb67b3ba276c1c04918518 Author: Andrey Grodzovsky Date: Thu Oct 24 15:44:10 2019 -0400 drm/amdgpu: If amdgpu_ib_schedule fails return back the error. Use ERR_PTR to return back the error happened during amdgpu_ib_schedule. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e91e5f080e03e0c28742f0aa4051c7cefafd7cdd Author: Andrey Grodzovsky Date: Thu Oct 24 15:39:06 2019 -0400 drm/sched: Set error to s_fence if HW job submission failed. Problem: When run_job fails and HW fence returned is NULL we still signal the s_fence to avoid hangs but the user has no way of knowing if the actual HW job was ran and finished. Fix: Allow .run_job implementations to return ERR_PTR in the fence pointer returned and then set this error for s_fence->finished fence so whoever wait on this fence can inspect the signaled fence for an error. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 42ce4b666da072e778588182e5627943f91a6e09 Author: chen gong Date: Thu Oct 24 16:48:40 2019 +0800 drm/amdgpu/powerplay: modify the parameters of SMU_MSG_PowerUpVcn to 0 The parameters what SMU_MSG_PowerUpVcn need is 0, not 1 Signed-off-by: chen gong Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit dcc0fcff145e3c9bb97b6a03c7cf242ceddb9ed3 Author: Tianci.Yin Date: Thu Oct 24 18:06:06 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings for navi12 update registers: mmCGTT_SPI_CLK_CTRL Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 21c943f35a6721414e539b088d4469c00d8ff66a Author: Tianci.Yin Date: Thu Oct 24 18:04:52 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings for navi14 update registers: mmCGTT_SPI_CLK_CTRL Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit d753dc6ab2eb69e2009caa47bbe28cbb53c319eb Author: Tianci.Yin Date: Thu Oct 24 18:03:17 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings update registers: mmCGTT_SPI_CLK_CTRL Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 59e038d0672dd71735bcf55d1b55c0dfb5f588a8 Author: Evan Quan Date: Thu Oct 24 10:01:19 2019 +0800 drm/amd/powerplay: correct current clock level label for Arcturus For dpm disabled case, it's assumed the only one support clock level is always current clock level. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0525f29713bd9f645c1c0da85e66b799615c4c33 Author: Evan Quan Date: Tue Oct 22 21:20:36 2019 +0800 drm/amd/powerplay: skip unsupported clock limit settings on Arcturus V2 For Arcturus, clock limit settings on uclk/socclk/fclk domains are not supported. V2: simplify the code to support both SGPU and MGPU cases Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 664fe85a2d9283c30044d821c708860999c52f28 Author: Marek Olšák Date: Tue Oct 22 17:22:38 2019 -0400 drm/amdgpu: Allow reading more status registers on si/cik Allow userspace to read the same status registers for every family. Based on commit c7890fea, added any of these registers if defined in the include files of each architecture. Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 121a2bc6ae786f59c7327a2b54c8bed5779e67e6 Author: Andrey Grodzovsky Date: Fri Oct 18 16:15:04 2019 -0400 drm/amdgpu: Move amdgpu_ras_recovery_init to after SMU ready. For Arcturus the I2C traffic is done through SMU tables and so we must postpone RAS recovery init to after they are ready which is in amdgpu_device_ip_hw_init_phase2. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit cf52ecc8b677c665807e900316e6a4f28b70fab8 Author: Andrey Grodzovsky Date: Fri Oct 11 15:28:19 2019 -0400 drm/amdgpu: Use ARCTURUS in RAS EEPROM. Add Arcturus EEPROM/I2C support in generic EEPROM code. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Acked-by: Evan Quan Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit d1a84427ad01d9ee64206de1cca4e4cba59ed619 Author: Andrey Grodzovsky Date: Tue Oct 8 16:27:47 2019 -0400 drm/amd/powerplay: Add EEPROM I2C read/write support to Arcturus. The communication is done through SMU table and hence the code is in powerplay. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 7388ccf968c84e23c06a5e92b176240e4810a8d8 Author: Andrey Grodzovsky Date: Fri Oct 11 13:48:24 2019 -0400 drm/amd/powerplay: Add interface for I2C transactions to SMU. Will be used by Arcturus support for RAS page retirement. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher reviewed-by: Evan Quan Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit eaf56410ccb06f4af9475b7018ec46aa022ee99e Author: Leo Li Date: Mon Oct 21 14:58:47 2019 -0400 drm/amdgpu: Add DC feature mask to disable fractional pwm [Why] Some LED panel drivers might not like fractional PWM. In such cases, backlight flickering may be observed. [How] Add a DC feature mask to disable fractional PWM, and associate it with the preexisting dc_config flag. The flag is only plumbed through the dmcu firmware, so plumb it through the driver path as well. To disable, add the following to the linux cmdline: amdgpu.dcfeaturemask=0x4 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204957 Signed-off-by: Leo Li Reviewed-by: Anthony Koo Tested-by: Lukáš Krejčí Signed-off-by: Alex Deucher commit 9f0256da6ba0fbe05f4e86d5b1153f89b54c5fd4 Author: Nirmoy Das Date: Wed Oct 23 16:33:52 2019 +0200 drm/amdgpu: remove unused parameter in amdgpu_gfx_kiq_free_ring Signed-off-by: Nirmoy Das Acked-by: Christian König Signed-off-by: Alex Deucher commit 8047266443ce86bf0abef2db6be78f7ce550dd7a Author: James Zhu Date: Tue Oct 22 10:40:45 2019 -0400 drm/amdgpu/vcn: Enable VCN2.5 encoding After VCN2.5 firmware (Version ENC: 1.1 Revision: 11), VCN2.5 encoding can work properly. Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3f378758b8572261cec5c6820f9846ad7f51ccd2 Author: Pelloux-prayer, Pierre-eric Date: Tue Oct 22 19:22:11 2019 +0200 drm/amdgpu/sdma5: do not execute 0-sized IBs (v2) This seems to help with https://bugs.freedesktop.org/show_bug.cgi?id=111481. v2: insert a NOP instead of skipping all 0-sized IBs to avoid breaking older hw Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5aed95bbdd210be01c664a768e63dbc773658e9f Author: chen gong Date: Wed Oct 23 13:54:32 2019 +0800 drm/amdgpu: Fix SDMA hang when performing VKexample test VKexample test hang during Occlusion/SDMA/Varia runs. Clear XNACK_WATERMK in reg SDMA0_UTCL1_WATERMK to fix this issue. Signed-off-by: chen gong Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit 52dd95f2b642f58d22ff2564faabee56c8d943b8 Author: Guchun Chen Date: Tue Oct 22 11:39:25 2019 +0800 drm/amdgpu: define macros for retire page reservation Easy for maintainance. Signed-off-by: Guchun Chen Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c688a06bc661749a944a2980f0ff0cee8659ac81 Author: Guchun Chen Date: Mon Oct 21 16:56:00 2019 +0800 drm/amdgpu: refine reboot debugfs operation in ras case (v3) Ras reboot debugfs node allows user one easy control to avoid gpu recovery hang problem and directly reboot system per card basis, after ras uncorrectable error happens. However, it is one common entry, which should get rid of ras_ctrl node and remove ip dependence when inputting by user. So add one new auto_reboot node in ras debugfs dir to achieve this. v2: in commit mssage, add justification why ras reboot debugfs node is needed. v3: use debugfs_create_bool to create debugfs file for boolean value Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2c99a547bcf9bb8532abd2953479949018449f93 Author: Philip Yang Date: Fri Oct 18 10:15:21 2019 -0400 drm/amdkfd: don't use dqm lock during device reset/suspend/resume If device reset/suspend/resume failed for some reason, dqm lock is hold forever and this causes deadlock. Below is a kernel backtrace when application open kfd after suspend/resume failed. Instead of holding dqm lock in pre_reset and releasing dqm lock in post_reset, add dqm->sched_running flag which is modified in dqm->ops.start and dqm->ops.stop. The flag doesn't need lock protection because write/read are all inside dqm lock. For HWS case, map_queues_cpsch and unmap_queues_cpsch checks sched_running flag before sending the updated runlist. v2: For no-HWS case, when device is stopped, don't call load/destroy_mqd for eviction, restore and create queue, and avoid debugfs dump hdqs. Backtrace of dqm lock deadlock: [Thu Oct 17 16:43:37 2019] INFO: task rocminfo:3024 blocked for more than 120 seconds. [Thu Oct 17 16:43:37 2019] Not tainted 5.0.0-rc1-kfd-compute-rocm-dkms-no-npi-1131 #1 [Thu Oct 17 16:43:37 2019] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [Thu Oct 17 16:43:37 2019] rocminfo D 0 3024 2947 0x80000000 [Thu Oct 17 16:43:37 2019] Call Trace: [Thu Oct 17 16:43:37 2019] ? __schedule+0x3d9/0x8a0 [Thu Oct 17 16:43:37 2019] schedule+0x32/0x70 [Thu Oct 17 16:43:37 2019] schedule_preempt_disabled+0xa/0x10 [Thu Oct 17 16:43:37 2019] __mutex_lock.isra.9+0x1e3/0x4e0 [Thu Oct 17 16:43:37 2019] ? __call_srcu+0x264/0x3b0 [Thu Oct 17 16:43:37 2019] ? process_termination_cpsch+0x24/0x2f0 [amdgpu] [Thu Oct 17 16:43:37 2019] process_termination_cpsch+0x24/0x2f0 [amdgpu] [Thu Oct 17 16:43:37 2019] kfd_process_dequeue_from_all_devices+0x42/0x60 [amdgpu] [Thu Oct 17 16:43:37 2019] kfd_process_notifier_release+0x1be/0x220 [amdgpu] [Thu Oct 17 16:43:37 2019] __mmu_notifier_release+0x3e/0xc0 [Thu Oct 17 16:43:37 2019] exit_mmap+0x160/0x1a0 [Thu Oct 17 16:43:37 2019] ? __handle_mm_fault+0xba3/0x1200 [Thu Oct 17 16:43:37 2019] ? exit_robust_list+0x5a/0x110 [Thu Oct 17 16:43:37 2019] mmput+0x4a/0x120 [Thu Oct 17 16:43:37 2019] do_exit+0x284/0xb20 [Thu Oct 17 16:43:37 2019] ? handle_mm_fault+0xfa/0x200 [Thu Oct 17 16:43:37 2019] do_group_exit+0x3a/0xa0 [Thu Oct 17 16:43:37 2019] __x64_sys_exit_group+0x14/0x20 [Thu Oct 17 16:43:37 2019] do_syscall_64+0x4f/0x100 [Thu Oct 17 16:43:37 2019] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Suggested-by: Felix Kuehling Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 80df905da70e20c3e813ac90fed5e98c55c0d680 Author: Zhan liu Date: Tue Oct 22 10:50:21 2019 -0400 drm/amd/display: Change Navi14's DWB flag to 1 [Why] DWB (Display Writeback) flag needs to be enabled as 1, or system will throw out a few warnings when creating dcn20 resource pool. Also, Navi14's dwb setting needs to match Navi10's, which has already been set to 1. [How] Change value of num_dwb from 0 to 1. Signed-off-by: Zhan Liu Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 397a9bc588797907fda9879c2f8cfda1a436e8ce Author: Roman Li Date: Tue Oct 1 09:45:38 2019 -0400 drm/amdgpu/display: add dc feature mask for psr enablement [Why] Adding psr mask to dc features allows selectively disable/enable psr. Current psr implementation may not work with non-pageflipping application. Until resolved it should be disabled by default. [How] Add dcfeaturemask for psr enablement. Disable by default. To enable set amdgpu.dcfeaturemask=0x8 in grub kernel command line. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 6c45e480fe23d779df5cb95ce55cf9d4f4fb51cb Author: Evan Quan Date: Thu Oct 17 19:59:29 2019 +0800 drm/amd/powerplay: clear the swSMU code layer With this cleanup, the APIs from amdgpu_smu.c will map to ASIC specific ones directly. Those can be shared around all SMU V11/V12 ASICs will be put in smu_v11_0.c and smu_v12_0.c respectively. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 18c1d3cee4c5935ebcfa0b434e4a8ef6d78496ad Author: Evan Quan Date: Thu Oct 17 14:15:41 2019 +0800 drm/amd/powerplay: split out those internal used swSMU APIs V2 Those swSMU APIs used internally are moved to smu_internal.h while others are kept in amdgpu_smu.h. V2: give a better name smu_internal.h for the place to hold those internal APIs Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3697b339c64f82af195fd3cc6492ef26b6dfcd47 Author: Evan Quan Date: Wed Oct 16 14:43:07 2019 +0800 drm/amd/powerplay: add lock protection for swSMU APIs V2 This is a quick and low risk fix. Those APIs which are exposed to other IPs or to support sysfs/hwmon interfaces or DAL will have lock protection. Meanwhile no lock protection is enforced for swSMU internal used APIs. Future optimization is needed. V2: strip the lock protection for all swSMU internal APIs Signed-off-by: Evan Quan Acked-by: Andrey Grodzovsky Acked-by: Feifei Xu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 6aec5bb4892a2c4881261532e99eef86e5f1c734 Author: Jane Jian Date: Thu Oct 17 23:30:20 2019 +0800 drm/amdgpu: add VCN0 and VCN1 needed headers Add mmsch part registers Signed-off-by: Jane Jian Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6fcca317cb70c4298b832d04935d6445097f597d Author: Joshua Aberback Date: Fri Oct 11 15:49:07 2019 -0400 drm/amd/display: Apply vactive dram clock change workaround to dcn2 DMLv2 [Why] This workaround was put in dcn2 DMLv1, and now we need it in DMLv2. Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher commit b617b26559f89aa9ba290e1dc8cab14a866a7022 Author: Eric Yang Date: Thu Oct 10 11:25:48 2019 -0400 drm/amd/display: fix hubbub deadline programing [Why] Fix the programming of DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_A. Was not filled in. Signed-off-by: Eric Yang Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit b745ecdb5e2e19db49d89a6793bdeb3a1ee08d82 Author: Dmytro Laktyushkin Date: Tue Oct 8 12:53:19 2019 -0400 drm/amd/display: fix avoid_split for dcn2+ validation We are currently incorrectly processing avoid split at highest voltage level. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Leo Li Signed-off-by: Alex Deucher commit e72f8f62d248eef156928de365203a552917b4e0 Author: Sung Lee Date: Mon Oct 7 12:05:34 2019 -0400 drm/amd/display: Do not call update bounding box on dc create [Why] In Hybrid Graphics, dcn2_1_soc struct stays alive through PnP. This causes an issue on dc init where dcn2_1_soc which has been updated by update_bw_bounding_box gets put into dml->soc. As update_bw_bounding_box is currently incorrect for dcn2.1, this makes dml calculations fail due to incorrect parameters, leading to a crash on PnP. [How] Comment out update_bw_bounding_box call for now. Signed-off-by: Sung Lee Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit 3b733278ca6b51e3271eeb9fb8f46f32e374ab6a Author: Reza Amini Date: Mon Sep 30 10:11:24 2019 -0400 drm/amd/display: Add center mode for integer scaling in DC [why] We want to use maximum space on display to show source [how] For Centered Mode: Replicate source as many times as possible to use maximum of display active space add borders. Signed-off-by: Reza Amini Reviewed-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit d4c2a96fdbfffc4c6a892a63d8fb218eb5fbc5f2 Author: Lewis Huang Date: Thu Oct 3 16:01:25 2019 +0800 drm/amd/display: take signal type from link [Why] Signal is update to EDP when driver disable first encoder. The following encoder using SIGNAL_TYPE_EDP to handle other device. When encoder signal is HDMI, driver will detect it is dp and release phy. It cause hw hang. [How] Take signal type from link->connector_signal. Signed-off-by: Lewis Huang Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit b837d783b6294bf7dc25e4056998f3f058023989 Author: Aric Cyr Date: Sun Oct 6 23:21:07 2019 -0400 drm/amd/display: 3.2.56 Signed-off-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 1ea8751bd28d1ec2b36a56ec6bc1ac28903d09b4 Author: Noah Abradjian Date: Fri Sep 27 16:30:57 2019 -0400 drm/amd/display: Make clk mgr the only dto update point [Why] * Clk Mgr DTO update point did not cover all needed updates, as it included a check for plane_state which does not exist yet when the updater is called on driver startup * This resulted in another update path in the pipe programming sequence, based on a dppclk update flag * However, this alternate path allowed for stray DTO updates, some of which would occur in the wrong order during dppclk lowering and cause underflow [How] * Remove plane_state check and use of plane_res.dpp->inst, getting rid of sequence dependencies (this results in extra dto programming for unused pipes but that doesn't cause issues and is a small cost) * Allow DTOs to be updated even if global clock is equal, to account for edge case exposed by diags tests * Remove update_dpp_dto call in pipe programming sequence (leave update to dppclk_control there, as that update is necessary and shouldn't occur in clk mgr) * Remove call to optimize_bandwidth when committing state, as it is not needed and resulted in sporadic underflows even with other fixes in place Signed-off-by: Noah Abradjian Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher commit 50575eb5b339683ee148189beae5eb53ccb3158b Author: Krunoslav Kovac Date: Fri Oct 4 13:49:03 2019 -0400 drm/amd/display: Only use EETF when maxCL > max display [Why&How] BT.2390 EETF is used for tone mapping/range reduction. Say display is 0.1 - 500 nits. The problematic case is when content is 0-400. We apply EETF because 0<0.1 so we need to reduce the range by 0.1. In the commit, we ignore the bottom range. Most displays map 0 to min and then have a ramp to 0.1, so sending 0.1 is actually >0.1. Furthermode, HW that uses 3D LUT also assumes min=0. Signed-off-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 622a88c8259e2e517e7145595715d661774c859e Author: Eric Yang Date: Tue Sep 24 12:02:38 2019 -0400 drm/amd/display: move wm ranges reporting to end of init hw [Why] SMU does not keep the wm table across S3, S4, need to re-send the table. Also defer sending the cable to after DCN bave initialized [How] Send table at end of init hw Signed-off-by: Eric Yang Reviewed-by: Yongqiang Sun Acked-by: Leo Li Signed-off-by: Alex Deucher commit 0460f9abf275ef3cdab4c531bfa06e2552f5e1c3 Author: Jun Lei Date: Thu Oct 3 15:09:53 2019 -0400 drm/amd/display: do not synchronize "drr" displays [why] A display that supports DRR can never really be considered "synchronized" with any other display because we can dynamically enable DRR (i.e. without modeset). this will cause their relative CRTC positions to drift and lose sync. this will disrupt features such as MCLK switching that assume and depend on their permanent alignment (that can only change with modeset) [how] check for ignore_msa in stream when considered synchronizability this ignore_msa is basically actually implemented as "supports drr" Signed-off-by: Jun Lei Reviewed-by: Yongqiang Sun Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit e9c93e5af395022eb52923ae84e29b9b0b6d7073 Author: Anthony Koo Date: Wed Oct 2 12:22:29 2019 -0400 drm/amd/display: Proper return of result when aux engine acquire fails [Why] When aux engine acquire fails, we missed populating the operation_result that describes the failure reason. [How] Set operation_result to new type: AUX_CHANNEL_OPERATION_FAILED_ENGINE_ACQUIRE in the case aux engine acquire has failed. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 4d25a0d51056755001d9b8803b57f11e37877196 Author: Michael Strauss Date: Tue Oct 1 12:04:16 2019 -0400 drm/amd/display: Disable force_single_disp_pipe_split on DCN2+ [WHY] force_single_disp_pipe_split is a debug flag for use on DCN1 but isn't necessary otherwise as DCN2+ splits by default Signed-off-by: Michael Strauss Reviewed-by: Tony Cheng Acked-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 71fb7b2801a7fcea919c1e1da7fe2bf19b165f04 Author: Michael Strauss Date: Thu Oct 3 11:54:15 2019 -0400 drm/amd/display: Passive DP->HDMI dongle detection fix [WHY] i2c_read is called to differentiate passive DP->HDMI and DP->DVI-D dongles The call is expected to fail in DVI-D case but pass in HDMI case Some HDMI dongles have a chance to fail as well, causing misdetection as DVI-D [HOW] Retry i2c_read to ensure failed result is valid Signed-off-by: Michael Strauss Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit bf7f5ac3167a75f60c2f27f16613a6ab90e55908 Author: Yogesh Mohan Marimuthu Date: Wed Oct 2 12:36:33 2019 +0530 drm/amd/display: map TRANSMITTER_UNIPHY_x to LINK_REGS_x [Why] The enum value for TRANSMITTER_UNIPHY_G is 9. In resource dc_xx_resource file structure link_enc_regs[], the TRANSMITTER_UNIPHY_G registers are initialized at index 6. Due to this mismatch, if monitor is attached to port using TRANSMITTER_UNIPHY_G then the monitor blanks out. [How] add function map_transmitter_id_to_phy_instance() and use the function to map enum transmitter to link regs. Signed-off-by: Yogesh Mohan Marimuthu Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit 22631bb8ca58b14bd5cbd583479e7cdda763cd1d Author: Jun Lei Date: Tue Oct 1 11:31:37 2019 -0400 drm/amd/display: add flag to allow diag to force enumerate edp [why] SLT tests require that diag can drive eDP even if nothing is connected, this is not typical production use case, so we need to add flag [how] add flag, and this flag supercedes "should destroy" logic Signed-off-by: Jun Lei Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit d5ac4ff211a3208b343c2c4d8a8da82f3ce4e948 Author: Dmytro Laktyushkin Date: Tue Oct 1 16:08:31 2019 -0400 drm/amd/display: add embedded flag to dml Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Leo Li Signed-off-by: Alex Deucher commit 5cb4ca07c2d53d492f014ee65995fcfc08f43db9 Author: Dmytro Laktyushkin Date: Tue Oct 1 11:01:00 2019 -0400 drm/amd/display: fix number of dcn21 dpm clock levels These are specific to dcn21 and should not be increased for reuse on other asics. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8c35730993ef5d3f634117e2c840575bc8e26bdc Author: Yongqiang Sun Date: Wed Oct 2 14:09:06 2019 -0400 drm/amd/display: enable vm by default for rn. [Why & How] vm should be enabled by default for rn to get right dml. Signed-off-by: Yongqiang Sun Reviewed-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit c79c138a9a623637fe9f9cdfedb9b2f21949c528 Author: Aidan Yang Date: Wed Oct 2 10:47:31 2019 -0400 drm/amd/display: Allow inverted gamma [why] There's a use case for inverted gamma and it's been confirmed that negative slopes are ok. [how] Remove code for blocking non-monotonically increasing gamma Signed-off-by: Aidan Yang Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Acked-by: Reza Amini Signed-off-by: Alex Deucher commit 6ce2427db71ca6908fe0c6398e369e6336ebe465 Author: Alvin Lee Date: Fri Sep 27 12:24:05 2019 -0400 drm/amd/display: Update min dcfclk [Why] NV12 has lower min dcfclk [How] Add update in update_bounding_box Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher commit f24b0522da181a00003ef138766a366973bf664d Author: Paul Hsieh Date: Tue Oct 1 17:06:04 2019 +0800 drm/amd/display: audio endpoint cannot switch [Why] On some systems, we need to check the dcn version in runtime system, not in compile time. [How] Stub in dcn version parameter to find_first_free_audio Signed-off-by: Paul Hsieh Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit ff86391ee626434180d6059352fbb292780b3efd Author: Michael Strauss Date: Tue Oct 1 11:24:32 2019 -0400 drm/amd/display: Fix MPO & pipe split on 3-pipe dcn2x [WHY] DML is incorrectly initialized with 4 pipes on 3 pipe configs RequiredDPPCLK is halved on unsplit pipe due to an incorrectly handled 3 pipe case, causing underflow with 2 planes & pipe split (MPO, 8K + 2nd display) [HOW] Set correct number of DPP/OTGs for dml init to generate correct DPP topology Double RequiredDPPCLK after clock is halved for pipe split and find_secondary_pipe fails to fix underflow Signed-off-by: Michael Strauss Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit 78ea008bcdd0144290f2ebec5911d3a60071043a Author: Dmytro Laktyushkin Date: Wed Sep 25 18:11:12 2019 -0400 drm/amd/display: remove unnecessary assert Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Leo Li Signed-off-by: Alex Deucher commit 44ce0cd3b5147d12143d2f8bf34b161a72890ebd Author: Dmytro Laktyushkin Date: Wed Sep 25 17:12:10 2019 -0400 drm/amd/display: move dispclk vco freq to clk mgr base This value will be needed by dml and therefore should be externally accessible. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nevenko Stupar Acked-by: Leo Li Signed-off-by: Alex Deucher commit e2e316d5d795f86acc02bf92e153551d263c1b82 Author: Dmytro Laktyushkin Date: Wed Sep 25 08:25:24 2019 -0400 drm/amd/display: correctly initialize dml odm variables One of odm variables was not initialized in dml. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Leo Li Acked-by: Tony Cheng Signed-off-by: Alex Deucher commit b6bfba6cce855c7f8158865462458e448350e490 Author: Dmytro Laktyushkin Date: Mon Sep 23 12:56:20 2019 -0400 drm/amd/display: split dcn20 fast validate into more functions Split a large function into smaller, reusable chunks. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nevenko Stupar Acked-by: Leo Li Signed-off-by: Alex Deucher commit 952f6c4b5d72d40f93f3deb61239290b357d434e Author: Anthony Koo Date: Fri Sep 27 10:52:15 2019 -0400 drm/amd/display: correctly populate dpp refclk in fpga [Why] In diags environment we are not programming the DPP DTO correctly. [How] Populate the dpp refclk in dccg so it can be used to correctly program DPP DTO. Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8c322309e48e9f1bf9d9124806810c14c488bfa1 Author: Roman Li Date: Fri Sep 20 19:03:17 2019 -0400 drm/amd/display: Enable PSR [Why] PSR (Panel Self-Refresh) is a power-saving feature for eDP panels. The feature has support in DMCU (Display MicroController Unit). DMCU/driver communication is implemented in DC. DM can use existing DC PSR interface to use PSR feature. [How] - Read psr caps via dpcd - Send vsc infoframe if panel supports psr - Disable psr before h/w programming (FULL_UPDATE) - Enable psr after h/w programming - Disable psr for fb console Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Leo Li Signed-off-by: Alex Deucher commit e0d08a40a63bd43f373937084f4c3bfab68f6afc Author: Roman Li Date: Fri Aug 30 10:44:48 2019 -0400 drm/amd/display: Add debugfs entry for reading psr state [Why] For upcoming PSR stupport it's useful to have debug entry to verify psr state. [How] - Enable psr dc api for Linux - Add psr_state file to eDP connector debugfs usage e.g.: cat /sys/kernel/debug/dri/0/DP-1/psr_state Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Leo Li Signed-off-by: Alex Deucher commit 37b970d1d793d900c04d444366994636278ebec8 Author: Aric Cyr Date: Sat Sep 28 15:57:53 2019 -0400 drm/amd/display: 3.2.55 Signed-off-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 69fea579c215679212e9a15a79465687e6add3ae Author: Dmytro Laktyushkin Date: Fri Aug 30 16:58:29 2019 -0400 drm/amd/display: remove unused code Commit hints are unnecessary after front end programming redesign. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Leo Li Signed-off-by: Alex Deucher commit 7bceac811c3b257ffb961668cf2069ab0001f7ac Author: Jordan Lazare Date: Fri Sep 27 14:39:01 2019 -0400 drm/amd/display: Remove superfluous assert [Why] For loop below the assert already checks for the number of instances to create. ASSERT is meaningless and causing spam. [How] dd Signed-off-by: Jordan Lazare Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher commit 6ac48490baec36aa58f246145d9671a916011c4e Author: Aidan Yang Date: Wed Sep 25 16:57:37 2019 -0400 drm/amd/display: Don't use optimized gamma22 with eetf [why] Optimized gamma22 assumes fixed point distribution which is not true for eetf true. [how] Use long calculation for eetf. Signed-off-by: Aidan Yang Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Acked-by: Reza Amini Signed-off-by: Alex Deucher commit 6f29c3588b41fab68aa807ff06da79c79b5bcdf7 Author: Yongqiang Sun Date: Thu Sep 26 14:08:41 2019 -0400 drm/amd/display: Add unknown clk state. [Why] System hang during S0i3 if DP only connected due to clk is disabled when doing link training. During S0i3, clk is disabled while the clk state is updated when ini_hw called, and at the moment clk is still disabled which indicating a wrong state for next time trying to enable clk. [How] Add an unknown state and initialize it during int_hw, make sure enable clk command be sent to smu. Signed-off-by: Yongqiang Sun Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit 123c53a97a5500d07bf8a4adb95032dfc70af69e Author: Jun Lei Date: Wed Sep 25 09:46:38 2019 -0400 drm/amd/display: add odm visual confirm [why] Hard to determine if pipe combine is done with MPC or ODM [how] Add new visual confirm type, this will mark each MPCC tree with a different color Signed-off-by: Jun Lei Reviewed-by: Yongqiang Sun Acked-by: Leo Li Signed-off-by: Alex Deucher commit 4294f722196d04fc2b44bca8c590d08137135f19 Author: Jun Lei Date: Thu Sep 19 17:43:45 2019 -0400 drm/amd/display: add 50us buffer as WA for pstate switch in active Signed-off-by: Jun Lei Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit acf83f86b2e1dd39fdc4e5e7072aaf21d0563558 Author: Wayne Lin Date: Mon Oct 21 13:24:36 2019 +0800 drm/amd/display: Avoid sending abnormal VSIF [Why] While setting hdmi_vic, hv_frame.vic is not initialized and might assign a wrong value to hdmi_vic. Cause to send out VSIF with abnormal value. [How] Initialize hv_frame and avi_frame Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 7890fb20a83b31cb737ca9658fc35df111cf6a81 Author: Evan Quan Date: Fri Oct 18 13:36:41 2019 +0800 drm/amd/powerplay: update Arcturus driver smu interface XGMI link part To fit the latest SMU firmware. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit d5e5c1bce1c76ada138aaa72f9521740b11ed043 Author: Colin Ian King Date: Fri Oct 18 09:15:08 2019 +0100 drm/amdgpu/psp: fix spelling mistake "initliaze" -> "initialize" There is a spelling mistake in a DRM_ERROR error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 0e3a7c2ec93b15f43a2653e52e9608484391aeaf Author: Nicholas Kazlauskas Date: Fri Oct 11 12:26:10 2019 -0400 drm/amd/display: Free gamma after calculating legacy transfer function [Why] We're leaking memory by not freeing the gamma used to calculate the transfer function for legacy gamma. [How] Release the gamma after we're done with it. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 73469970a9bb09baff681012905fe956e18d981a Author: Xiaojie Yuan Date: Fri Oct 18 18:47:20 2019 +0800 drm/amdgpu/psp11: fix typo in comment Signed-off-by: Xiaojie Yuan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit d7e7f1ea25d9bda9138d7fcb5eef87a9555f664b Author: Xiaojie Yuan Date: Fri Oct 18 18:46:38 2019 +0800 drm/amdgpu/psp11: wait for sOS ready for ring creation Signed-off-by: Xiaojie Yuan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 967a3b85bac91c55eff740e61bf270c2732f48b2 Author: Zhan liu Date: Thu Oct 17 14:55:56 2019 -0400 drm/amd/display: setting the DIG_MODE to the correct value. [Why] This patch is for fixing Navi14 HDMI display pink screen issue. [How] Call stream->link->link_enc->funcs->setup twice. This is setting the DIG_MODE to the correct value after having been overridden by the call to transmitter control. Signed-off-by: Zhan Liu Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 0e04ad7d1857670944786a8465930a049aaf995f Author: Alex Deucher Date: Thu Oct 17 11:57:45 2019 -0400 drm/amdgpu/powerplay: use local renoir array sizes for clock fetching To avoid walking past the end of the arrays since the PP_SMU defines don't match the renoir defines. Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit ee8bcc2333cc9e24e260e590131fa21c003e41ba Author: Pelloux-prayer, Pierre-eric Date: Wed Oct 23 12:02:45 2019 +0000 drm/amdgpu: call amdgpu_vm_prt_fini before deleting the root PD amdgpu_vm_prt_fini uses "vm->root.base.bo" so it must still be valid when we call it. Fixes: b65709a92156 ("drm/amdgpu: reserve the root PD while freeing PASIDs") Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 27d461333459d282ffa4a2bdb6b215a59d493a8f Author: Navid Emamdoost Date: Wed Sep 25 10:48:30 2019 -0500 i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 621650cabee54886291c4fa59544b9e30b016f92 Author: Aleksandr Loktionov Date: Fri Sep 20 02:17:24 2019 -0700 i40e: Refactoring VF MAC filters counting to make more reliable This patch prepares ground for the next VF MAC address change fix. It lets untrusted VF to delete any VF mac filter, but it still doesn't let untrusted VF to add mac filter not setup by PF. It removes information duplication in num_mac mac filters counter. And improves exact h/w mac filters usage checking in the i40e_check_vf_permission() function by counting mac2add_cnt. It also improves logging because now all mac addresses will be validated first and corresponding messages will be logged. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers commit d80a476f4a12a84feaebfed993f3039fdc9c1249 Author: Damian Milosek Date: Fri Sep 20 02:17:23 2019 -0700 i40e: Fix LED blinking flow for X710T*L devices Add X710T*L device specific operations (in port LED detection and handling of GLGEN_GPIO_CTL.PIN_FUNC field) to enable LED blinking. Signed-off-by: Damian Milosek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit cdb89f15bd4667bfc492b7d5afc6ba2902b54d4e Author: Piotr Kwapulinski Date: Fri Sep 20 02:17:22 2019 -0700 i40e: allow ethtool to report SW and FW versions in recovery mode Let ethtool print driver and firmware versions when NIC is in recovery mode. Assign i40e_get_drvinfo() operation to ethtool recovery mode operations. Previously ethtool did not report driver and firmware versions when NIC was in recovery mode. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 998e5166e604fd37afe94352f7b8c2d816b11049 Author: Nicholas Nunley Date: Fri Sep 20 02:17:21 2019 -0700 i40e: initialize ITRN registers with correct values Since commit 92418fb14750 ("i40e/i40evf: Use usec value instead of reg value for ITR defines") the driver tracks the interrupt throttling intervals in single usec units, although the actual ITRN/ITR0 registers are programmed in 2 usec units. Most register programming flows in the driver correctly handle the conversion, although it is currently not applied when the registers are initialized to their default values. Most of the time this doesn't present a problem since the default values are usually immediately overwritten through the standard adaptive throttling mechanism, or updated manually by the user, but if adaptive throttling is disabled and the interval values are left alone then the incorrect value will persist. Since the intended default interval of 50 usecs (vs. 100 usecs as programmed) performs better for most traffic workloads, this can lead to performance regressions. This patch adds the correct conversion when writing the initial values to the ITRN registers. Signed-off-by: Nicholas Nunley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 0514db37dd78bb8b7a02bb6fc1c000a74014be54 Author: Piotr Azarewicz Date: Fri Sep 20 02:17:19 2019 -0700 i40e: Extend PHY access with page change flag Currently FW use MDIO I/F number corresponded with current PF for PHY access. This code allow to specify used MDIO I/F number. Add new field - command flags with only one flag for now. Added flag tells FW that it shouldn't change page while accessing QSFP module, as it was set manually. Signed-off-by: Piotr Azarewicz Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit a3e09ded6a6d4b4cbdeb8c1ec4c7cf60798b3ce0 Author: Piotr Azarewicz Date: Fri Sep 20 02:17:18 2019 -0700 i40e: Extract detection of HW flags into a function Move code detecting HW flags based on device type and FW API version into a single function. Signed-off-by: Piotr Azarewicz Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e42b7e9cefca9dd008cbafffca97285cf264f72d Author: Jaroslaw Gawin Date: Fri Sep 20 02:17:17 2019 -0700 i40e: Wrong 'Advertised FEC modes' after set FEC to AUTO Fix display of parameters "Configured FEC encodings:" and "Advertised FEC modes:" in ethtool. Implemented by setting proper FEC bits in “advertising” bitmask of link_modes struct and “fec” bitmask in ethtool_fecparam struct. Without this patch wrong FEC settings can be shown. Signed-off-by: Jaroslaw Gawin Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ff9246571a2e79944d6d4d22de4f717081beb5d3 Author: Sylwia Wnuczko Date: Fri Sep 20 02:17:15 2019 -0700 i40e: Fix for persistent lldp support This patch fixes function to read NVM module data and uses it to read current LLDP agent configuration from NVM API version 1.8. Signed-off-by: Sylwia Wnuczko Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit a4414aedf4bc923c1faa24d72d14f14c2b93e48f Author: Geert Uytterhoeven Date: Thu Oct 24 17:16:41 2019 +0200 block: mtip32xx: Spelling s/configration/configuration/ Fix misspelling of "configuration". Signed-off-by: Geert Uytterhoeven Signed-off-by: Jens Axboe commit 9a7f12edf8848a9b355a86fc0183d7be932ef11e Author: Eugene Syromiatnikov Date: Fri Sep 20 17:58:21 2019 +0200 fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint name According to commit message in the original commit c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints"), as well as userspace library[1] and man page update[2], R/W hint constants are intended to have RWH_* prefix. However, RWF_WRITE_LIFE_NOT_SET retained "RWF_*" prefix used in the early versions of the proposed patch set[3]. Rename it and provide the old name as a synonym for the new one for backward compatibility. [1] https://github.com/axboe/fio/commit/bd553af6c849 [2] https://github.com/mkerrisk/man-pages/commit/580082a186fd [3] https://www.mail-archive.com/linux-block@vger.kernel.org/msg09638.html Fixes: c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints") Acked-by: Song Liu Signed-off-by: Eugene Syromiatnikov Signed-off-by: Jens Axboe commit d386732bc142c63b9f676fed098bc06f91ee964a Author: André Almeida Date: Mon Oct 21 21:07:24 2019 -0300 blk-mq: fill header with kernel-doc Insert documentation for structs, enums and functions at header file. Format existing and new comments at struct blk_mq_ops as kernel-doc comments. Reviewed-by: Bart Van Assche Signed-off-by: André Almeida Signed-off-by: Jens Axboe commit 1fead7182f381ab0ebab5eaf1a060a15550da994 Author: André Almeida Date: Fri Oct 25 14:16:51 2019 -0600 blk-mq: remove needless goto from blk_mq_get_driver_tag The only usage of the label "done" is when (rq->tag != -1) at the beginning of the function. Rather than jumping to label, we can just remove this label and execute the code at the "if". Besides that, the code that would be executed after the label "done" is the return of the logical expression (rq->tag != -1) but since we are already inside the if, we now that this is true. Remove the label and replace the goto with the proper result of the label. Signed-off-by: André Almeida Signed-off-by: Jens Axboe commit e964a17d8c6356b86aab4cdc3ea7fdc2abd21352 Author: Bartosz Golaszewski Date: Tue Oct 1 15:23:31 2019 +0200 ahci: tegra: use regulator_bulk_set_supply_names() Use the new regulator helper instead of a for loop. Acked-by: Thierry Reding Signed-off-by: Bartosz Golaszewski Signed-off-by: Jens Axboe commit 7d523bdc303afbdddff48df6770866118fe19309 Author: Hanna Hawa Date: Thu Oct 17 15:46:53 2019 +0100 ahci: Add support for Amazon's Annapurna Labs SATA controller This patch adds basic support for Amazon's Annapurna Labs SATA controller. Signed-off-by: Hanna Hawa Signed-off-by: Jens Axboe commit 4ff17a1df7d550257972a838220a8af4611c8f2c Author: Dan Carpenter Date: Thu Oct 17 12:12:16 2019 +0300 drm/amdgpu/vi: silence an uninitialized variable warning Smatch complains that we need to initialized "*cap" otherwise it can lead to an uninitialized variable bug in the caller. This seems like a reasonable warning and it doesn't hurt to silence it at least. drivers/gpu/drm/amd/amdgpu/vi.c:767 vi_asic_reset_method() error: uninitialized symbol 'baco_reset'. Fixes: 425db2553e43 ("drm/amdgpu: expose BACO interfaces to upper level from PP") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 17523bd00c4723640df56e3b2616934f6ca0ce06 Author: Alex Deucher Date: Thu Oct 17 11:41:13 2019 -0400 drm/amdgpu/vce: make some functions static They are not used outside of the file they are defined in. Reviewed-by: James Zhu Acked-by: Christian König Signed-off-by: Alex Deucher commit 569557e524d8ca4c7564631a6f5328cf0ae817b8 Author: Alex Deucher Date: Thu Oct 17 11:36:47 2019 -0400 drm/amdgpu/vce: fix allocation size in enc ring test We need to allocate a large enough buffer for the feedback buffer, otherwise the IB test can overwrite other memory. Reviewed-by: James Zhu Acked-by: Christian König Signed-off-by: Alex Deucher commit 3a8b7d2761350b97545cde600e37861c1473c5da Author: chen gong Date: Mon Oct 14 18:27:11 2019 +0800 drm/amdgpu/psp: declare PSP TA firmware Add PSP TA firmware declaration for raven raven2 picasso Signed-off-by: chen gong Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 993e4cdebb5a53bc87f21cdd34d1dc42225de43d Author: David Sterba Date: Thu Oct 24 19:31:10 2019 +0200 block: reorder bio::__bi_remaining for better packing Simple reordering of __bi_remaining can reduce bio size by 8 bytes that are now wasted on padding (measured on x86_64): struct bio { struct bio * bi_next; /* 0 8 */ struct gendisk * bi_disk; /* 8 8 */ unsigned int bi_opf; /* 16 4 */ short unsigned int bi_flags; /* 20 2 */ short unsigned int bi_ioprio; /* 22 2 */ short unsigned int bi_write_hint; /* 24 2 */ blk_status_t bi_status; /* 26 1 */ u8 bi_partno; /* 27 1 */ /* XXX 4 bytes hole, try to pack */ struct bvec_iter bi_iter; /* 32 24 */ /* XXX last struct has 4 bytes of padding */ atomic_t __bi_remaining; /* 56 4 */ /* XXX 4 bytes hole, try to pack */ [...] /* size: 104, cachelines: 2, members: 19 */ /* sum members: 96, holes: 2, sum holes: 8 */ /* paddings: 1, sum paddings: 4 */ /* last cacheline: 40 bytes */ }; Now becomes: struct bio { struct bio * bi_next; /* 0 8 */ struct gendisk * bi_disk; /* 8 8 */ unsigned int bi_opf; /* 16 4 */ short unsigned int bi_flags; /* 20 2 */ short unsigned int bi_ioprio; /* 22 2 */ short unsigned int bi_write_hint; /* 24 2 */ blk_status_t bi_status; /* 26 1 */ u8 bi_partno; /* 27 1 */ atomic_t __bi_remaining; /* 28 4 */ struct bvec_iter bi_iter; /* 32 24 */ /* XXX last struct has 4 bytes of padding */ [...] /* size: 96, cachelines: 2, members: 19 */ /* paddings: 1, sum paddings: 4 */ /* last cacheline: 32 bytes */ }; Signed-off-by: David Sterba Signed-off-by: Jens Axboe commit f7e76dbc24df695f1b8e88ed3201be22215ec969 Author: Bart Van Assche Date: Fri Oct 25 09:50:10 2019 -0700 block: Reduce the amount of memory used for tag sets Instead of allocating an array of size nr_cpu_ids for set->tags, allocate an array of size set->nr_hw_queues. This patch improves behavior that was introduced by commit 868f2f0b7206 ("blk-mq: dynamic h/w context count"). Reallocating tag sets from inside __blk_mq_update_nr_hw_queues() is safe because: - All request queues that share the tag sets are frozen before the tag sets are reallocated. - blk_mq_queue_tag_busy_iter() holds q->q_usage_counter while active and hence is serialized against __blk_mq_update_nr_hw_queues(). Cc: Keith Busch Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit ac0d6b926e741f328b23c8af0134312af7c032d9 Author: Bart Van Assche Date: Fri Oct 25 09:50:09 2019 -0700 block: Reduce the amount of memory required per request queue Instead of always allocating at least nr_cpu_ids hardware queues per request queue, reallocate q->queue_hw_ctx if it has to grow. This patch improves behavior that was introduced by commit 868f2f0b7206 ("blk-mq: dynamic h/w context count"). Cc: Keith Busch Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit a9a808084d6ac015ac68b4223ac5f6ef31f8076e Author: Bart Van Assche Date: Fri Oct 25 09:50:08 2019 -0700 block: Remove the synchronize_rcu() call from __blk_mq_update_nr_hw_queues() Since the blk_mq_{,un}freeze_queue() calls in __blk_mq_update_nr_hw_queues() already serialize __blk_mq_update_nr_hw_queues() against blk_mq_queue_tag_busy_iter(), the synchronize_rcu() call in __blk_mq_update_nr_hw_queues() is not necessary. Hence remove it. Note: the synchronize_rcu() call in __blk_mq_update_nr_hw_queues() was introduced by commit f5bbbbe4d635 ("blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter"). Commit 530ca2c9bd69 ("blk-mq: Allow blocking queue tag iter callbacks") removed the rcu_read_{,un}lock() calls that correspond to the synchronize_rcu() call in __blk_mq_update_nr_hw_queues(). Reviewed-by: Ming Lei Cc: Jianchao Wang Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit 35a0b2378c199d4f26e458b2ca38ea56aaf2d9b8 Author: Olof Johansson Date: Wed Oct 23 12:22:05 2019 -0700 PCI/DPC: Add "pcie_ports=dpc-native" to allow DPC without AER control Prior to eed85ff4c0da7 ("PCI/DPC: Enable DPC only if AER is available"), Linux handled DPC events regardless of whether firmware had granted it ownership of AER or DPC, e.g., via _OSC. PCIe r5.0, sec 6.2.10, recommends that the OS link control of DPC to control of AER, so after eed85ff4c0da7, Linux handles DPC events only if it has control of AER. On platforms that do not grant OS control of AER via _OSC, Linux DPC handling worked before eed85ff4c0da7 but not after. To make Linux DPC handling work on those platforms the same way they did before, add a "pcie_ports=dpc-native" kernel parameter that makes Linux handle DPC events regardless of whether it has control of AER. [bhelgaas: commit log, move pcie_ports_dpc_native to drivers/pci/] Link: https://lore.kernel.org/r/20191023192205.97024-1-olof@lixom.net Signed-off-by: Olof Johansson Signed-off-by: Bjorn Helgaas commit 3275a71e76fac5bc276f0d60e027b18c2e8d7a5b Merge: 2e79e22e092a 1cd4d9eead73 Author: Dave Airlie Date: Sat Oct 26 05:56:57 2019 +1000 Merge tag 'drm-next-5.5-2019-10-09' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.5-2019-10-09: amdgpu: - Additional RAS enablement for vega20 - RAS page retirement and bad page storage in EEPROM - No GPU reset with unrecoverable RAS errors - Reserve vram for page tables rather than trying to evict - Fix issues with GPU reset and xgmi hives - DC i2c over aux fixes - Direct submission for clears, PTE/PDE updates - Improvements to help support recoverable GPU page faults - Silence harmless SAD block messages - Clean up code for creating a bo at a fixed location - Initial DC HDCP support - Lots of documentation fixes - GPU reset for renoir - Add IH clockgating support for soc15 asics - Powerplay improvements - DC MST cleanups - Add support for MSI-X - Misc cleanups and bug fixes amdkfd: - Query KFD device info by asic type rather than pci ids - Add navi14 support - Add renoir support - Add navi12 support - gfx10 trap handler improvements - pasid cleanups - Check against device cgroup ttm: - Return -EBUSY with pipelining with no_gpu_wait radeon: - Silence harmless SAD block messages device_cgroup: - Export devcgroup_check_permission Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191010041713.3412-1-alexander.deucher@amd.com commit 5c8b0dfc6f4a5e6c707827d0172fc1572e689094 Author: Al Viro Date: Fri Oct 25 14:08:24 2019 -0400 make __d_alloc() static no users outside of fs/dcache.c Signed-off-by: Al Viro commit 29d968e13007e067b35d41a047e2a4573a017194 Author: Miroslav Benes Date: Fri Oct 25 13:50:41 2019 +0200 selftests/livepatch: Disable the timeout Commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test") introduced a timeout per test. Livepatch tests could run longer than 45 seconds, especially on slower machines. They do not hang and they detect if something goes awry with internal accounting. Better than looking for an arbitrary value, just disable the timeout for livepatch selftests. Signed-off-by: Miroslav Benes Reviewed-by: Joe Lawrence Signed-off-by: Jiri Kosina commit ba1d18e386d991356f59bbb417b0c642abf671fa Author: Lionel Landwerlin Date: Fri Oct 25 15:17:18 2019 +0300 drm/i915: capture aux page table error register TGL introduced a feature in which we map the main surface to the auxiliary surface. If we screw up the page tables, the HW has a register to tell us which engine encounters a fault in the page table walk. Signed-off-by: Lionel Landwerlin Acked-by: Chris Wilson [ickle: Be brave and apply to gen12] Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025121718.18806-1-lionel.g.landwerlin@intel.com commit dd5279c71405533d4ddbb9453effc60f0f5bf211 Author: Ville Syrjälä Date: Tue Oct 22 21:56:43 2019 +0300 drm/i915: Fix PCH reference clock for FDI on HSW/BDW The change to skip the PCH reference initialization during fastboot did end up breaking FDI. To fix that let's try to do the PCH reference init whenever we're disabling a DPLL that was using said reference previously. Cc: stable@vger.kernel.org Tested-by: Andrija Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112084 Fixes: b16c7ed95caf ("drm/i915: Do not touch the PCH SSC reference if a PLL is using it") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191022185643.1483-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 4c3258b9b0fff24623a6e95381e1112cc290abd4 Author: Chao Yu Date: Tue Oct 22 17:26:11 2019 +0800 f2fs: fix wrong description in document As reported in bugzilla, default value of DEF_RAM_THRESHOLD was fixed by commit 29710bcf9426 ("f2fs: fix wrong percentage"), however leaving wrong description in document, fix it. https://bugzilla.kernel.org/show_bug.cgi?id=205203 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0b20fcec8651569935a10afe03fedc0b812d044e Author: Chao Yu Date: Mon Sep 30 18:53:25 2019 +0800 f2fs: cache global IPU bio In commit 8648de2c581e ("f2fs: add bio cache for IPU"), we added f2fs_submit_ipu_bio() in __write_data_page() as below: __write_data_page() if (!S_ISDIR(inode->i_mode) && !IS_NOQUOTA(inode)) { f2fs_submit_ipu_bio(sbi, bio, page); .... } in order to avoid below deadlock: Thread A Thread B - __write_data_page (inode x, page y) - f2fs_do_write_data_page - set_page_writeback ---- set writeback flag in page y - f2fs_inplace_write_data - f2fs_balance_fs - lock gc_mutex - lock gc_mutex - f2fs_gc - do_garbage_collect - gc_data_segment - move_data_page - f2fs_wait_on_page_writeback - wait_on_page_writeback --- wait writeback of page y However, the bio submission breaks the merge of IPU IOs. So in this patch let's add a global bio cache for merged IPU pages, then f2fs_wait_on_page_writeback() is able to submit bio if a writebacked page is cached in global bio cache. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 222fc0c8503d98cec3cb2bac2780cdd21a6e31c0 Author: James Morse Date: Thu Oct 17 18:43:00 2019 +0100 arm64: compat: Workaround Neoverse-N1 #1542419 for compat user-space Compat user-space is unable to perform ICIMVAU instructions from user-space. Instead it uses a compat-syscall. Add the workaround for Neoverse-N1 #1542419 to this code path. Signed-off-by: James Morse Signed-off-by: Catalin Marinas commit ee9d90be9ddace01b7fb126567e4b539fbe1f82f Author: James Morse Date: Thu Oct 17 18:42:59 2019 +0100 arm64: Fake the IminLine size on systems affected by Neoverse-N1 #1542419 Systems affected by Neoverse-N1 #1542419 support DIC so do not need to perform icache maintenance once new instructions are cleaned to the PoU. For the errata workaround, the kernel hides DIC from user-space, so that the unnecessary cache maintenance can be trapped by firmware. To reduce the number of traps, produce a fake IminLine value based on PAGE_SIZE. Signed-off-by: James Morse Reviewed-by: Suzuki K Poulose Signed-off-by: Catalin Marinas commit 05460849c3b51180d5ada3373d0449aea19075e4 Author: James Morse Date: Thu Oct 17 18:42:58 2019 +0100 arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419 Cores affected by Neoverse-N1 #1542419 could execute a stale instruction when a branch is updated to point to freshly generated instructions. To workaround this issue we need user-space to issue unnecessary icache maintenance that we can trap. Start by hiding CTR_EL0.DIC. Reviewed-by: Suzuki K Poulose Signed-off-by: James Morse Signed-off-by: Catalin Marinas commit c34c78dfc1fc68a1f5403f996de8ca62f298d7b2 Author: Yunfeng Ye Date: Wed Oct 23 21:27:34 2019 +0800 audit: remove redundant condition check in kauditd_thread() Warning is found by the code analysis tool: "the condition 'if(ac && rc < 0)' is redundant: ac" The @ac variable has been checked before. It can't be a null pointer here, so remove the redundant condition check. Signed-off-by: Yunfeng Ye Signed-off-by: Paul Moore commit bfcef4ab1d7ee8921bc322109b1692036cc6cbe0 Author: Yunfeng Ye Date: Mon Oct 21 19:31:21 2019 +0800 arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill() In cases like suspend-to-disk and suspend-to-ram, a large number of CPU cores need to be shut down. At present, the CPU hotplug operation is serialised, and the CPU cores can only be shut down one by one. In this process, if PSCI affinity_info() does not return LEVEL_OFF quickly, cpu_psci_cpu_kill() needs to wait for 10ms. If hundreds of CPU cores need to be shut down, it will take a long time. Normally, there is no need to wait 10ms in cpu_psci_cpu_kill(). So change the wait interval from 10 ms to max 1 ms and use usleep_range() instead of msleep() for more accurate timer. In addition, reducing the time interval will increase the messages output, so remove the "Retry ..." message, instead, track time and output to the the sucessful message. Signed-off-by: Yunfeng Ye Reviewed-by: Sudeep Holla Signed-off-by: Catalin Marinas commit a5315819c5e7e50b2b457b60aaf2cc61d76888a2 Author: Mark Brown Date: Thu Oct 24 13:01:43 2019 +0100 arm64: pgtable: Correct typo in comment vmmemmap -> vmemmap Signed-off-by: Mark Brown Signed-off-by: Catalin Marinas commit ade12b8631d91b9c2849facb0a1dc3af317ecbb3 Author: Dave Martin Date: Wed Oct 23 18:52:22 2019 +0100 arm64: docs: cpu-feature-registers: Document ID_AA64PFR1_EL1 Commit d71be2b6c0e1 ("arm64: cpufeature: Detect SSBS and advertise to userspace") exposes ID_AA64PFR1_EL1 to userspace, but didn't update the documentation to match. Add it. Acked-by: Will Deacon Signed-off-by: Dave Martin Signed-off-by: Mark Brown Signed-off-by: Catalin Marinas commit 1f2719c5c49fc8d341a122617b109c41557ceca0 Author: Dinh Nguyen Date: Fri Oct 25 10:20:06 2019 -0500 arm64: defconfig: enable Altera GPIO controller Enable GPIO_ALTERA driver. Signed-off-by: Dinh Nguyen commit 7db3e57e6a95435cef5b33f2a90efcac5ce577da Author: Shaokun Zhang Date: Fri Oct 25 14:32:06 2019 +0800 arm64: cpufeature: Fix typos in comment Fix up one typos: CTR_E0 -> CTR_EL0 Cc: Will Deacon Acked-by: Suzuki K Poulose Signed-off-by: Shaokun Zhang Signed-off-by: Catalin Marinas commit b05a50bb37dc3aada82cacedb76b658e796cfac5 Author: Olivier Moysan Date: Fri Oct 25 14:56:32 2019 +0200 ARM: multi_v7_defconfig: Enable audio support for stm32mp157 This commits enable (as module): - STM32 SAI and I2S configs used on stm32mp157. - Cirrus CS42L51 audio codec for stm32mp157a-dk1 board. - Audio graph card support for stm32mp157a-dk1 board. Link: https://lore.kernel.org/r/20191025125632.11057-1-alexandre.torgue@st.com Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue Signed-off-by: Olof Johansson commit 691505a803a7f223b2af621848d581259c61f77d Author: Mark Salter Date: Mon Oct 21 11:29:49 2019 -0400 crypto: ccp - fix uninitialized list head A NULL-pointer dereference was reported in fedora bz#1762199 while reshaping a raid6 array after adding a fifth drive to an existing array. [ 47.343549] md/raid:md0: raid level 6 active with 3 out of 5 devices, algorithm 2 [ 47.804017] md0: detected capacity change from 0 to 7885289422848 [ 47.822083] Unable to handle kernel read from unreadable memory at virtual address 0000000000000000 ... [ 47.940477] CPU: 1 PID: 14210 Comm: md0_raid6 Tainted: G W 5.2.18-200.fc30.aarch64 #1 [ 47.949594] Hardware name: AMD Overdrive/Supercharger/To be filled by O.E.M., BIOS ROD1002C 04/08/2016 [ 47.958886] pstate: 00400085 (nzcv daIf +PAN -UAO) [ 47.963668] pc : __list_del_entry_valid+0x2c/0xa8 [ 47.968366] lr : ccp_tx_submit+0x84/0x168 [ccp] [ 47.972882] sp : ffff00001369b970 [ 47.976184] x29: ffff00001369b970 x28: ffff00001369bdb8 [ 47.981483] x27: 00000000ffffffff x26: ffff8003b758af70 [ 47.986782] x25: ffff8003b758b2d8 x24: ffff8003e6245818 [ 47.992080] x23: 0000000000000000 x22: ffff8003e62450c0 [ 47.997379] x21: ffff8003dfd6add8 x20: 0000000000000003 [ 48.002678] x19: ffff8003e6245100 x18: 0000000000000000 [ 48.007976] x17: 0000000000000000 x16: 0000000000000000 [ 48.013274] x15: 0000000000000000 x14: 0000000000000000 [ 48.018572] x13: ffff7e000ef83a00 x12: 0000000000000001 [ 48.023870] x11: ffff000010eff998 x10: 00000000000019a0 [ 48.029169] x9 : 0000000000000000 x8 : ffff8003e6245180 [ 48.034467] x7 : 0000000000000000 x6 : 000000000000003f [ 48.039766] x5 : 0000000000000040 x4 : ffff8003e0145080 [ 48.045064] x3 : dead000000000200 x2 : 0000000000000000 [ 48.050362] x1 : 0000000000000000 x0 : ffff8003e62450c0 [ 48.055660] Call trace: [ 48.058095] __list_del_entry_valid+0x2c/0xa8 [ 48.062442] ccp_tx_submit+0x84/0x168 [ccp] [ 48.066615] async_tx_submit+0x224/0x368 [async_tx] [ 48.071480] async_trigger_callback+0x68/0xfc [async_tx] [ 48.076784] ops_run_biofill+0x178/0x1e8 [raid456] [ 48.081566] raid_run_ops+0x248/0x818 [raid456] [ 48.086086] handle_stripe+0x864/0x1208 [raid456] [ 48.090781] handle_active_stripes.isra.0+0xb0/0x278 [raid456] [ 48.096604] raid5d+0x378/0x618 [raid456] [ 48.100602] md_thread+0xa0/0x150 [ 48.103905] kthread+0x104/0x130 [ 48.107122] ret_from_fork+0x10/0x18 [ 48.110686] Code: d2804003 f2fbd5a3 eb03003f 54000320 (f9400021) [ 48.116766] ---[ end trace 23f390a527f7ad77 ]--- ccp_tx_submit is passed a dma_async_tx_descriptor which is contained in a ccp_dma_desc and adds it to a ccp channel's pending list: list_del(&desc->entry); list_add_tail(&desc->entry, &chan->pending); The problem is that desc->entry may be uninitialized in the async_trigger_callback path where the descriptor was gotten from ccp_prep_dma_interrupt which got it from ccp_alloc_dma_desc which doesn't initialize the desc->entry list head. So, just initialize the list head to avoid the problem. Cc: Reported-by: Sahaj Sarup Signed-off-by: Mark Salter Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit fe95938dadbd151cb8b4720f6e0a9e3a3523f8f2 Author: Geert Uytterhoeven Date: Mon Oct 21 16:51:45 2019 +0200 crypto: nx - Improve debugfs_create_u{32,64}() handling for atomics Variables of type atomic{,64}_t can be used fine with debugfs_create_u{32,64}, when passing a pointer to the embedded counter. This allows to get rid of the casts, which prevented compiler checks. Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu commit 03f008c52b76114b83483de2cf15ed36fc34930c Author: Hook, Gary Date: Mon Oct 21 13:44:44 2019 +0000 crypto: ccp - Verify access to device registers before initializing Check early whether device registers can be accessed. Some BIOSes have a broken security policy that prevents access to the device registers, and return values from ioread() can be misinterpreted. If a read of a feature register returns a -1, we may not be able to access any device register, so report the problem and suggestion, and return. For the PSP, the feature register is checked. For the CCP, the queue register is checked. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu commit 0d3c6781d8d80090509ebb0c72587e6c44da4736 Author: Hook, Gary Date: Mon Oct 21 13:44:37 2019 +0000 crypto: ccp - Change a message to reflect status instead of failure If an AMD BIOS makes zero CCP queues available to the driver, the device is unavailable and therefore can't be activated. When this happens, report the status but don't report a (non-existent) failure. The CCP will be unactivated. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu commit 9a8641a7ffbf6f896bcd2bb2c6c0f4b403831c18 Author: Shukun Tan Date: Mon Oct 21 15:41:03 2019 +0800 crypto: hisilicon - fix endianness verification problem of QM This patch fixes following sparse warning: qm.c:345:33: warning: cast removes address space '' of expression qm.c:359:20: warning: incorrect type in assignment (different base types) qm.c:359:20: expected restricted __le16 [usertype] w0 qm.c:359:20: got int qm.c:362:27: warning: incorrect type in assignment (different base types) qm.c:362:27: expected restricted __le16 [usertype] queue_num qm.c:362:27: got unsigned short [usertype] queue qm.c:363:24: warning: incorrect type in assignment (different base types) qm.c:363:24: expected restricted __le32 [usertype] base_l qm.c:363:24: got unsigned int [usertype] qm.c:364:24: warning: incorrect type in assignment (different base types) qm.c:364:24: expected restricted __le32 [usertype] base_h qm.c:364:24: got unsigned int [usertype] qm.c:451:22: warning: restricted __le32 degrades to integer qm.c:471:24: warning: restricted __le16 degrades to integer ...... qm.c:1617:19: warning: incorrect type in assignment (different base types) qm.c:1617:19: expected restricted __le32 [usertype] dw6 qm.c:1617:19: got int qm.c:1891:24: warning: incorrect type in return expression (different base types) qm.c:1891:24: expected int qm.c:1891:24: got restricted pci_ers_result_t qm.c:1894:40: warning: incorrect type in return expression (different base types) qm.c:1894:40: expected int qm.c:1894:40: got restricted pci_ers_result_t Signed-off-by: Shukun Tan Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu commit 719181f39a1045674b04256f54492f7fd97deddb Author: Shukun Tan Date: Mon Oct 21 15:41:02 2019 +0800 crypto: hisilicon - fix param should be static when not external. This patch fixes following sparse warning: zip_main.c:87:1: warning: symbol 'hisi_zip_list' was not declared. Should it be static? zip_main.c:88:1: warning: symbol 'hisi_zip_list_lock' was not declared. Should it be static? zip_main.c:948:68: warning: Using plain integer as NULL pointer Signed-off-by: Shukun Tan Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu commit e10966981f7258dd7283f3028f414dd127bb5bfc Author: Shukun Tan Date: Mon Oct 21 15:41:01 2019 +0800 crypto: hisilicon - Fix using plain integer as NULL pointer This patch fix sparse warning: zip_crypto.c:425:26: warning: Using plain integer as NULL pointer Replaces assignment of 0 to pointer with NULL assignment. Signed-off-by: Shukun Tan Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu commit ee1788c61546b04763df608f8333ebd827119a02 Author: Zhou Wang Date: Mon Oct 21 15:41:00 2019 +0800 crypto: hisilicon - tiny fix about QM/ZIP error callback print Tiny fix to make QM/ZIP error callback print clear and right. If one version hardware does not support error handling, we directly print this. And QM is embedded in ZIP, we can use ZIP print only, so remove unnecessary QM print. Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu commit 798ac398179e832b5c2e392d7d17288421aa85f5 Author: Tian Tao Date: Sat Oct 19 08:41:37 2019 +0800 crypto: ccree - fix comparison of unsigned expression warning This patch fixes the following warnings: drivers/crypto/ccree/cc_aead.c:630:5-12: WARNING: Unsigned expression compared with zero: seq_len > 0 Signed-off-by: Tian Tao v2: change hmac_setkey() return type to unsigned int to fix the warning. Acked-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 1d55fdc85799372ab3b0d2a6928e73439f8149aa Author: Ashish Kalra Date: Thu Oct 17 22:35:11 2019 +0000 crypto: ccp - Retry SEV INIT command in case of integrity check failure. SEV INIT command loads the SEV related persistent data from NVS and initializes the platform context. The firmware validates the persistent state. If validation fails, the firmware will reset the persisent state and return an integrity check failure status. At this point, a subsequent INIT command should succeed, so retry the command. The INIT command retry is only done during driver initialization. Additional enums along with SEV_RET_SECURE_DATA_INVALID are added to sev_ret_code to maintain continuity and relevance of enum values. Signed-off-by: Ashish Kalra Acked-by: David Rientjes Reviewed-by: Brijesh Singh Signed-off-by: Herbert Xu commit 48fe583fe54177bfb80f348e2a5cc34c3f710095 Author: Corentin Labbe Date: Thu Oct 17 05:06:25 2019 +0000 crypto: amlogic - Add crypto accelerator for amlogic GXL This patch adds support for the amlogic GXL cryptographic offloader present on GXL SoCs. This driver supports AES cipher in CBC/ECB mode. Signed-off-by: Corentin Labbe Reviewed-by: Neil Armstrong Signed-off-by: Herbert Xu commit f1fb7ea262e4e604f5e881698a09181471b08dfc Author: Corentin Labbe Date: Thu Oct 17 05:06:24 2019 +0000 MAINTAINERS: Add myself as maintainer of amlogic crypto I will maintain the amlogic crypto driver. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 7f7d115dfb5154549c28685a309dc0266a0b2be0 Author: Corentin Labbe Date: Thu Oct 17 05:06:23 2019 +0000 dt-bindings: crypto: Add DT bindings documentation for amlogic-crypto This patch adds documentation for Device-Tree bindings for the Amlogic GXL cryptographic offloader driver. Reviewed-by: Rob Herring Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 49c4cd80354b948f0901d301b94d4b8dcafc9e04 Author: Ben Dooks (Codethink) Date: Wed Oct 16 13:26:33 2019 +0100 crypto: atmel - fix data types for __be{32,64} The driver uses a couple of buffers that seem to be __be32 or __be64 fields, but declares them as u32. This means there are a number of warnings from sparse due to casting to/from __beXXX. Fix these by changing the types of the buffer and the associated variables. drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1059:28: warning: incorrect type in assignment (different base types) drivers/crypto/atmel-aes.c:1059:28: expected unsigned int drivers/crypto/atmel-aes.c:1059:28: got restricted __be32 [usertype] drivers/crypto/atmel-aes.c:1550:28: warning: incorrect type in assignment (different base types) drivers/crypto/atmel-aes.c:1550:28: expected unsigned int drivers/crypto/atmel-aes.c:1550:28: got restricted __be32 [usertype] drivers/crypto/atmel-aes.c:1561:39: warning: incorrect type in assignment (different base types) drivers/crypto/atmel-aes.c:1561:39: expected unsigned long long [usertype] drivers/crypto/atmel-aes.c:1561:39: got restricted __be64 [usertype] drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32 drivers/crypto/atmel-aes.c:1599:15: warning: incorrect type in assignment (different base types) drivers/crypto/atmel-aes.c:1599:15: expected unsigned int [usertype] drivers/crypto/atmel-aes.c:1599:15: got restricted __be32 [usertype] drivers/crypto/atmel-aes.c:1692:17: warning: incorrect type in assignment (different base types) drivers/crypto/atmel-aes.c:1692:17: expected unsigned long long [usertype] drivers/crypto/atmel-aes.c:1692:17: got restricted __be64 [usertype] drivers/crypto/atmel-aes.c:1693:17: warning: incorrect type in assignment (different base types) drivers/crypto/atmel-aes.c:1693:17: expected unsigned long long [usertype] drivers/crypto/atmel-aes.c:1693:17: got restricted __be64 [usertype] drivers/crypto/atmel-aes.c:1888:63: warning: incorrect type in initializer (different base types) drivers/crypto/atmel-aes.c:1888:63: expected unsigned int drivers/crypto/atmel-aes.c:1888:63: got restricted __le32 [usertype] Signed-off-by: Ben Dooks Signed-off-by: Herbert Xu commit 4c747d4d19494cda740b4f87c869b23675251247 Author: YueHaibing Date: Wed Oct 16 18:46:21 2019 +0800 hwrng: xgene - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit 6cd4e070372b29534af5c0a575e84bcfd32c651f Author: YueHaibing Date: Wed Oct 16 18:46:20 2019 +0800 hwrng: tx4939 - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit bd74b0f5ef80c0b826aa1e6eee40dd27d05c4f34 Author: YueHaibing Date: Wed Oct 16 18:46:19 2019 +0800 hwrng: st - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Reviewed-by: Patrice Chotard Signed-off-by: Herbert Xu commit 64b7bf137c953c20de18c3c4ae6119746f49c625 Author: YueHaibing Date: Wed Oct 16 18:46:18 2019 +0800 hwrng: pic32 - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit 5b18f9ac9573f1c516e86dffb280156a31933fbf Author: YueHaibing Date: Wed Oct 16 18:46:17 2019 +0800 hwrng: pasemi - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit c7c16c58be1aa2d02780e884a48495fae5fdccb1 Author: YueHaibing Date: Wed Oct 16 18:46:16 2019 +0800 hwrng: omap - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit fc963e029dbb65f5f95a06fcd12e813478588014 Author: YueHaibing Date: Wed Oct 16 18:46:15 2019 +0800 hwrng: npcm - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit ba14757678946d507c23759061fbd7b39863d717 Author: YueHaibing Date: Wed Oct 16 18:46:14 2019 +0800 hwrng: meson - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Reviewed-by: Kevin Hilman Signed-off-by: Herbert Xu commit 871d030d59868f4e839616f7cc42d6a9046b69eb Author: YueHaibing Date: Wed Oct 16 18:46:13 2019 +0800 hwrng: ks-sa - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit 10304c762751228fdfc446766d521d44b74dc5c4 Author: YueHaibing Date: Wed Oct 16 18:46:12 2019 +0800 hwrng: hisi - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit 3e3c97c67e9eb69b14192908ee99fd7b2177cc07 Author: YueHaibing Date: Wed Oct 16 18:46:11 2019 +0800 hwrng: exynos - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Acked-by: Łukasz Stelmach Signed-off-by: Herbert Xu commit 3e46bd34970632cdd948669c2fc8c9e8ace0c738 Author: YueHaibing Date: Wed Oct 16 18:46:10 2019 +0800 hwrng: bcm2835 - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Acked-by: Florian Fainelli Signed-off-by: Herbert Xu commit bc49534db6949cb71dd602d82481c0a2fdd44b05 Author: YueHaibing Date: Wed Oct 16 18:46:09 2019 +0800 hwrng: atmel - use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Acked-by: Ludovic Desroches Signed-off-by: Herbert Xu commit d1569349d7ce540606bbe8c1e6a5b16b1fd45e34 Author: Ben Dooks Date: Tue Oct 15 13:36:04 2019 +0100 hwrng: ka-sa - fix __iomem on registers Add __ioemm attribute to reg_rng to fix the following sparse warnings: drivers/char/hw_random/ks-sa-rng.c:102:9: warning: incorrect type in argument 2 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:102:9: expected void volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:102:9: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:104:9: warning: incorrect type in argument 2 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:104:9: expected void volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:104:9: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:113:9: warning: incorrect type in argument 2 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:113:9: expected void volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:113:9: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:116:9: warning: incorrect type in argument 2 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:116:9: expected void volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:116:9: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:119:17: warning: incorrect type in argument 1 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:119:17: expected void const volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:119:17: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:121:9: warning: incorrect type in argument 2 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:121:9: expected void volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:121:9: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:132:9: warning: incorrect type in argument 2 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:132:9: expected void volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:132:9: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:143:19: warning: incorrect type in argument 1 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:143:19: expected void const volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:143:19: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:144:19: warning: incorrect type in argument 1 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:144:19: expected void const volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:144:19: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:146:9: warning: incorrect type in argument 2 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:146:9: expected void volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:146:9: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:160:25: warning: incorrect type in argument 1 (different address spaces) drivers/char/hw_random/ks-sa-rng.c:160:25: expected void const volatile [noderef] *addr drivers/char/hw_random/ks-sa-rng.c:160:25: got unsigned int * drivers/char/hw_random/ks-sa-rng.c:194:28: warning: incorrect type in assignment (different address spaces) drivers/char/hw_random/ks-sa-rng.c:194:28: expected struct trng_regs *reg_rng drivers/char/hw_random/ks-sa-rng.c:194:28: got void [noderef] * Signed-off-by: Ben Dooks Acked-by: Arnd Bergmann Signed-off-by: Herbert Xu commit d0be0720576439da2cefc16e648a61a7aebcf34f Author: Ard Biesheuvel Date: Tue Oct 15 10:14:12 2019 +0200 crypto: powerpc/spe-xts - implement support for ciphertext stealing Add the logic to deal with input sizes that are not a round multiple of the AES block size, as described by the XTS spec. This brings the SPE implementation in line with other kernel drivers that have been updated recently to take this into account. Cc: Eric Biggers Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7f725f41f62750832817047e44892ce92d65e6aa Author: Eric Biggers Date: Mon Oct 14 19:45:17 2019 -0700 crypto: powerpc - convert SPE AES algorithms to skcipher API Convert the glue code for the PowerPC SPE implementations of AES-ECB, AES-CBC, AES-CTR, and AES-XTS from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Tested with: export ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- make mpc85xx_defconfig cat >> .config << EOF # CONFIG_MODULES is not set # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set CONFIG_DEBUG_KERNEL=y CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_XTS=y CONFIG_CRYPTO_AES_PPC_SPE=y EOF make olddefconfig make -j32 qemu-system-ppc -M mpc8544ds -cpu e500 -nographic \ -kernel arch/powerpc/boot/zImage \ -append cryptomgr.fuzz_iterations=1000 Note that xts-ppc-spe still fails the comparison tests due to the lack of ciphertext stealing support. This is not addressed by this patch. This patch also cleans up the code by making ->encrypt() and ->decrypt() call a common function for each of ECB, CBC, and XTS, and by using a clearer way to compute the length to process at each step. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 8255e65df961fd0c9b7d86317e915606751562a4 Author: Eric Biggers Date: Mon Oct 14 19:45:16 2019 -0700 crypto: powerpc - don't set ivsize for AES-ECB Set the ivsize for the "ecb-ppc-spe" algorithm to 0, since ECB mode doesn't take an IV. This fixes a failure in the extra crypto self-tests: alg: skcipher: ivsize for ecb-ppc-spe (16) doesn't match generic impl (0) Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0d6ecb2e43d6b15699cea1fbd7ce0c981694b9b4 Author: Eric Biggers Date: Mon Oct 14 19:45:15 2019 -0700 crypto: powerpc - don't unnecessarily use atomic scatterwalk The PowerPC SPE implementations of AES modes only disable preemption during the actual encryption/decryption, not during the scatterwalk functions. It's therefore unnecessary to request an atomic scatterwalk. So don't do so. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 528282630ca961d6284f68f5f2f0057c86873bb6 Author: Ard Biesheuvel Date: Mon Oct 14 18:16:45 2019 +0200 crypto: aegis128 - duplicate init() and final() hooks in SIMD code In order to speed up aegis128 processing even more, duplicate the init() and final() routines as SIMD versions in their entirety. This results in a 2x speedup on ARM Cortex-A57 for ~1500 byte packets (using AES instructions). Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 2698bce1f05f0a13e2df1db7364df2b50a47e08d Author: Ard Biesheuvel Date: Mon Oct 14 18:16:44 2019 +0200 crypto: aegis128 - avoid function pointers for parameterization Instead of passing around an ops structure with function pointers, which forces indirect calls to be used, refactor the code slightly so we can use ordinary function calls. At the same time, switch to a static key to decide whether or not the SIMD code path may be used. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit be867f987a4e1222114dd07a01838a17c26f3fff Author: Sumit Garg Date: Mon Oct 14 17:32:45 2019 +0530 hwrng: omap - Fix RNG wait loop timeout Existing RNG data read timeout is 200us but it doesn't cover EIP76 RNG data rate which takes approx. 700us to produce 16 bytes of output data as per testing results. So configure the timeout as 1000us to also take account of lack of udelay()'s reliability. Fixes: 383212425c92 ("hwrng: omap - Add device variant for SafeXcel IP-76 found in Armada 8K") Cc: Signed-off-by: Sumit Garg Signed-off-by: Herbert Xu commit b4e8c0b12debdb680ab801762b003eceaee951c1 Merge: 58fbe999ff40 5dba51754b04 Author: Rob Herring Date: Fri Oct 25 09:14:56 2019 -0500 Merge branch 'dt/linus' into dt/next commit 58fbe999ff40de631267ba6352a024a6be8a3f24 Author: Rob Herring Date: Thu Oct 17 11:25:38 2019 -0500 dt-bindings: example-schema: Add some additional examples and commentary Add examples for properties with standard units, child nodes, dependencies, and if/then schema. Also, make some minor updates based on common questions and review issues. Signed-off-by: Rob Herring commit 70145d16b3c12f06638d0f34d43cbe016236aa20 Author: Rob Herring Date: Tue Oct 15 10:47:49 2019 -0500 dt: submitting-patches: Document requirements for DT schema Update the DT submitting-patches.txt with additional requirements for DT binding schemas. New binding documents should generally use the schema format and have an explicit license. Signed-off-by: Rob Herring commit 7054c207b06771046e7c1127c14111f3ec67ab83 Author: Rob Herring Date: Tue Oct 15 10:26:00 2019 -0500 dt: writing-schema: Add a note about tools PATH setup Users without an existing python install may not have their PATH setup for pip installed python programs already. Add a note about having the DT validation programs in the PATH. Reported-by: Robert Jones Signed-off-by: Rob Herring commit 5b6070ce93100b280d3cc3cec59d6a56b7f466f9 Author: Sylwester Nawrocki Date: Thu Oct 17 11:29:39 2019 +0200 dt-bindings: arm: samsung: Update the CHIPID binding for ASV This patch adds documentation of new optional "samsung,asv-bin" property in the chipid device node and documents requirement of "syscon" compatible string. These additions are needed to support Exynos ASV (Adaptive Supply Voltage) feature. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki [robh: drop 'select' which is no longer needed. Fix up example whitespace] Signed-off-by: Rob Herring commit 466503d6b1b33be46ab87c6090f0ade6c6011cbc Author: Yazen Ghannam Date: Tue Oct 22 20:35:14 2019 +0000 EDAC/amd64: Set grain per DIMM The following commit introduced a warning on error reports without a non-zero grain value. 3724ace582d9 ("EDAC/mc: Fix grain_bits calculation") The amd64_edac_mod module does not provide a value, so the warning will be given on the first reported memory error. Set the grain per DIMM to cacheline size (64 bytes). This is the current recommendation. Fixes: 3724ace582d9 ("EDAC/mc: Fix grain_bits calculation") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "linux-edac@vger.kernel.org" Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Tony Luck Link: https://lkml.kernel.org/r/20191022203448.13962-7-Yazen.Ghannam@amd.com commit 5153faac18d293fc7abb19ff7034683fbcd82dc7 Author: Tejun Heo Date: Thu Oct 24 12:03:51 2019 -0700 cgroup: remove cgroup_enable_task_cg_lists() optimization cgroup_enable_task_cg_lists() is used to lazyily initialize task cgroup associations on the first use to reduce fork / exit overheads on systems which don't use cgroup. Unfortunately, locking around it has never been actually correct and its value is dubious given how the vast majority of systems use cgroup right away from boot. This patch removes the optimization. For now, replace the cg_list based branches with WARN_ON_ONCE()'s to be on the safe side. We can simplify the logic further in the future. Signed-off-by: Tejun Heo Reported-by: Oleg Nesterov Signed-off-by: Tejun Heo commit 0a671dc500553cf6f4cc3efbcb0923b5e9adccb5 Author: YueHaibing Date: Fri Oct 25 17:39:05 2019 +0800 ALSA: intel_hdmi: Remove dev_err() on platform_get_irq() failure platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191025093905.14888-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit 2728200f48d315748b4fb2b2525e1ac211e97ecf Author: Chris Wilson Date: Wed Oct 16 23:57:30 2019 +0100 drm/i915/selftests: Force ordering of context switches The parallel switch test has an underlying assumption that its requests are executed in order of submission, which is only true if the backend manages to keep up. Ensure the order of execution matches the submission order by explicit dependencies and so when we wait on the last request, we know we wait on completion of the entire queue. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191016225730.29447-1-chris@chris-wilson.co.uk commit c34cbe24cfd512eff3bbfc09d1334f348ace5067 Author: Benjamin Gaignard Date: Tue Oct 15 14:30:58 2019 +0200 ARM: dts: stm32: remove useless dma-ranges property for stm32f469 Remove dma-ranges from ltdc node since it is already set on bus node. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit ae0300228a9a8742f83ad4a8aba5bb3a0360ee29 Author: Benjamin Gaignard Date: Tue Oct 15 14:30:57 2019 +0200 ARM: dts: stm32: remove useless dma-ranges property for stm32f429 Remove dma-ranges from ltdc node since it is already set on bus node. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 9737a358b56ac82940e133c5f850e58bf4955997 Author: Pascal Paillet Date: Fri Oct 11 16:05:33 2019 +0200 ARM: dts: stm32: disable active-discharge for vbus_otg on stm32mp157a-avenger96 Active discharge is not needed on vbus_otg and generate unneeded current consumption. Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue commit c9b2fe7ea0a7051ad66ebc0387ce7176f72a39c7 Author: Pascal Paillet Date: Fri Oct 11 16:05:32 2019 +0200 ARM: dts: stm32: Fix active discharge usage on stm32mp157 Active discharge is a uint32 not a boolean. Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue commit 791be94e2878e098edd6ff14714284b8230a5b79 Author: Pascal Paillet Date: Fri Oct 11 16:05:31 2019 +0200 ARM: dts: stm32: change default minimal buck1 value on stm32mp157 Minimal value is the value set during boot or before suspend. We must ensure that the value is a functional value to boot. Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue commit 111ef3fdddfefec5f42ab6ee773e9840413e9d14 Author: Pascal Paillet Date: Fri Oct 11 16:05:30 2019 +0200 ARM: dts: stm32: add PWR regulators support on stm32mp157 This patch adds support of STM32 PWR regulators on stm32mp157c. This replace dummy fixed regulators on stm32mp157c-ed1 and stm32mp157c-dk2. Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue commit b81c8c3b8e3847a14bd83dd1de460df3efcb3329 Author: Benjamin Gaignard Date: Fri Oct 11 15:06:58 2019 +0200 ARM: dts: stm32: remove useless interrupt from dsi node for stm32f469 DSI driver doesn't use interrupt, remove it from the node since it breaks yaml check. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 376d5d86cb208c43887feaa1823901aa34ab58c4 Author: Olivier Moysan Date: Thu Oct 10 15:02:47 2019 +0200 ARM: dts: stm32: add hdmi audio support to stm32mp157a-dk1 board Add HDMI audio support through Sil9022 HDMI transceiver on stm32mp157a-dk1 board. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue commit 4951d99551661eef9a74e35e39c0424e3d2494a5 Author: Fabrice Gasnier Date: Wed Oct 9 16:12:52 2019 +0200 ARM: dts: stm32: Add DAC support to stm32mp157c-ed1 stm32mp157c-ed1 board has digital-to-analog converter signals routed to JP11 and JP10 jumpers (e.g. PA4/PA5). It's easier then to configure them both. But keep them disabled by default, so the pins are kept in their initial state to lower power consumption. This way they can also be used as GPIO. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 4a27d15e861ae07716de9546a8e070c8a55a3168 Author: Fabrice Gasnier Date: Wed Oct 9 16:12:51 2019 +0200 ARM: dts: stm32: Add DAC pins used on stm32mp157c-ed1 Define pins that can be used by digital-to-analog converter on stm32mp157c eval daughter board: - PA4 and PA5 pins are available respectively on JP11 and JP10 Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 2e7f46e13b3b29abeb201461535a529d0b8f3abc Author: Alexandre Torgue Date: Mon Oct 7 16:34:02 2019 +0200 ARM: dts: stm32: fix regulator-sd_switch node on stm32mp157c-ed1 board This commit fixes regulator-sd_switch node in order to be compliant to DT validation schema. Signed-off-by: Alexandre Torgue commit 49bb8b69b52439f6ad9931b8d2ecfa5c196c9c44 Author: Alexandre Torgue Date: Mon Oct 7 16:34:01 2019 +0200 ARM: dts: stm32: remove usb phy-names entries on stm32mp157c-ev1 "phy-names" entries are not used. To be compliant with DT validation tool, those entries have to be remove. Signed-off-by: Alexandre Torgue commit da5152f25adec75888328d9d5090b704a7a09af9 Author: Alexandre Torgue Date: Mon Oct 7 16:34:00 2019 +0200 ARM: dts: stm32: fix joystick node on stm32f746 and stm32mp157c eval boards "#size-cells" entry is not needed for "gpio-keys" driver. Indeed "reg" entry is not used. This commit will fix a warnings seen by DT validation tool. Signed-off-by: Alexandre Torgue commit 8fcdbdccce21c5d560ca7aaf208f183abe6a0eb6 Author: Alexandre Torgue Date: Mon Oct 7 16:33:59 2019 +0200 ARM: dts: stm32: fix memory nodes to match with DT validation tool DT validation ("make dtbs_check") has shown that some memory nodes were not correctly written. This commit fixes this kind of issue: "stm32f746-disco.dt.yaml: /: memory: False schema does not allow {'device_type': ['memory'], 'reg': [[3221225472, 8388608]]}" Signed-off-by: Alexandre Torgue commit 7e6c337f689475c5071a5fe49d6074e5b7c690ee Author: Yannick Fertré Date: Fri Oct 4 15:17:02 2019 +0200 ARM: dts: stm32: add focaltech touchscreen on stm32mp157c-dk2 board Enable focaltech ft6236 touchscreen on STM32MP157C-DK2 board. Signed-off-by: Yannick Fertré Signed-off-by: Alexandre Torgue commit f9f5467f05eade2eb84bc6eb68f855198797f9b4 Author: Fabrice Gasnier Date: Fri Sep 13 16:34:40 2019 +0200 ARM: dts: stm32: enable ADC support on stm32mp157a-dk1 Configure ADC support on stm32mp157a-dk1. It can be used for various purpose: - AIN connector has several analog inputs: ANA0, ANA1, ADC2 in6 & in2, ADC1 in13 & in6 - USB Type-C CC1 & CC2 pins wired to in18 & in19 It's easier then to Configure them all. But keep them disabled by default, so the pins are kept in their initial state to lower power consumption. This way they can also be used as GPIO. Add VDD and VDDA supplies to ADC on stm32mp157c-dk1 board. This allows to get full ADC analog performances in case VDDA is below 2.7V (not the case by default). Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit be5cdd1389abc06c0d89bf5c7c81ee3eb64604da Author: Fabrice Gasnier Date: Fri Sep 13 16:34:39 2019 +0200 ARM: dts: stm32: add ADC pins used on stm32mp157a-dk1 Define pins that can be used for ADC on stm32mp157a-dk1 board: - AIN connector has ADC input pins - USB Type-C CC1 & CC2 pins (e.g. in18, in19) Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 439819dd4d471389d050d5ce5c829d8c49fadbc3 Author: Fabrice Gasnier Date: Fri Sep 13 16:34:38 2019 +0200 ARM: dts: stm32: Enable VREFBUF on stm32mp157a-dk1 Enable VREFBUF as ADC/DAC uses it on stm32mp157a-dk1 board. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 29d437022f1efd3122fe7298e9a42274c7cc1773 Author: Yannick Fertré Date: Fri Aug 2 16:08:51 2019 +0200 ARM: dts: stm32: move ltdc pinctrl on stm32mp157a dk1 board The ltdc pinctrl must be in the display controller node and not in the peripheral node (hdmi bridge). Signed-off-by: Yannick Fertré Reviewed-by: Philippe Cornu Signed-off-by: Alexandre Torgue commit a88c85ee2ea30d3c3a8210f793b2b1e1301b76e6 Author: Vinod Koul Date: Thu Oct 24 13:18:02 2019 +0530 phy: qcom-qmp: Add SM8150 QMP UFS PHY support SM8150 UFS PHY is v4 of QMP phy. Add support for V4 QMP phy register defines and support for SM8150 QMP UFS PHY. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Kishon Vijay Abraham I commit 76126f5bd3fbec84d30b2a327287835666751d47 Author: Vinod Koul Date: Thu Oct 24 13:18:01 2019 +0530 dt-bindings: phy-qcom-qmp: Add sm8150 UFS phy compatible string Document "qcom,sdm845-qmp-ufs-phy" compatible string for QMP UFS PHY found on SM8150. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit 316b429459066215abb50060873ec0832efc4044 Author: Grygorii Strashko Date: Wed Oct 23 17:47:44 2019 +0300 phy: ti: gmii-sel: fix mac tx internal delay for rgmii-rxid Now phy-gmii-sel will disable MAC TX internal delay for PHY interface mode "rgmii-rxid" which is incorrect. Hence, fix it by enabling MAC TX internal delay in the case of "rgmii-rxid" mode. Fixes: 92b58b34741f ("phy: ti: introduce phy-gmii-sel driver") Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit 64d5989c1ae52407e63c6387863a75036a03e2f8 Author: Bartosz Golaszewski Date: Tue Oct 1 15:23:32 2019 +0200 phy: tegra: use regulator_bulk_set_supply_names() Use the new regulator helper instead of a for loop. Signed-off-by: Bartosz Golaszewski Signed-off-by: Kishon Vijay Abraham I commit 54fad40d3f01c5d14e2ba123b2753029dd6a4cbd Author: YueHaibing Date: Wed Oct 23 15:45:23 2019 +0800 phy: ti: dm816x: remove set but not used variable 'phy_data' Fixes gcc '-Wunused-but-set-variable' warning: drivers/phy/ti/phy-dm816x-usb.c:192:29: warning: variable phy_data set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing Reviewed-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I commit 5932925ac1f3f820368bcf91eee9cf52794aa827 Author: Tvrtko Ursulin Date: Fri Oct 25 10:09:52 2019 +0100 drm/i915: Move intel_engine_context_in/out into intel_lrc.c Intel_lrc.c is the only caller and so to avoid some header file ordering issues in future patches move these two over there. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191025090952.10135-1-tvrtko.ursulin@linux.intel.com commit 24169f0a453754a7c463cb7d480d6358aaf72c30 Author: Geert Uytterhoeven Date: Wed Oct 16 17:11:09 2019 +0200 dt-bindings: arm: renesas: Add R-Car M3-N ULCB with Kingfisher Document the use of the Kingfisher expansion board with the R-Car Starter Kit Pro equipped with an R-Car M3-N SoC. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191016151109.30747-1-geert+renesas@glider.be commit 09f156d97e530c2ac631620f7b29508ff5cc4e6f Author: Simon Horman Date: Sun Sep 8 13:05:28 2019 +0100 dt-bindings: arm: renesas: Convert 'renesas,prr' to json-schema Convert Renesas Product Register bindings documentation to json-schema. Signed-off-by: Simon Horman Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20190908120528.9392-1-horms+renesas@verge.net.au Signed-off-by: Geert Uytterhoeven commit 0a4319b5c87a29e6b283cabb3a2493af132a4b9a Author: Geert Uytterhoeven Date: Wed Oct 16 17:09:39 2019 +0200 ARM: shmobile: rcar-gen2: Drop legacy DT clock support As of commit 362b334b17943d84 ("ARM: dts: r8a7791: Convert to new CPG/MSSR bindings"), all upstream R-Car Gen2 device tree source files use the unified "Renesas Clock Pulse Generator / Module Standby and Software Reset" DT bindings. Hence remove backward compatibility with old R-Car Gen2 device trees describing a hierarchical representation of the various CPG and MSTP clocks. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191016150939.30620-1-geert+renesas@glider.be commit 19308a412ec52c0de92d296842be237778753d9b Author: Yi Wang Date: Thu Oct 10 14:37:25 2019 +0800 x86/kvm: Fix -Wmissing-prototypes warnings We get two warning when build kernel with W=1: arch/x86/kernel/kvm.c:872:6: warning: no previous prototype for ‘arch_haltpoll_enable’ [-Wmissing-prototypes] arch/x86/kernel/kvm.c:885:6: warning: no previous prototype for ‘arch_haltpoll_disable’ [-Wmissing-prototypes] Including the missing head file can fix this. Signed-off-by: Yi Wang Signed-off-by: Paolo Bonzini commit 1510faee309010194ebb6ad3068cc9c0f7bc761b Author: Fabrizio Castro Date: Tue Oct 22 17:21:19 2019 +0100 arm64: dts: renesas: r8a774b1: Add SATA controller node Add the SATA controller node to the RZ/G2N SoC specific dtsi. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/1571761279-17347-3-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 588b9828f0744ca13555c4a35cd0251ac8ad8ad2 Author: Steven Price Date: Fri Oct 25 11:51:56 2019 +0100 drm: Don't free jobs in wait_event_interruptible() drm_sched_cleanup_jobs() attempts to free finished jobs, however because it is called as the condition of wait_event_interruptible() it must not sleep. Unfortunately some free callbacks (notably for Panfrost) do sleep. Instead let's rename drm_sched_cleanup_jobs() to drm_sched_get_cleanup_job() and simply return a job for processing if there is one. The caller can then call the free_job() callback outside the wait_event_interruptible() where sleeping is possible before re-checking and returning to sleep if necessary. Tested-by: Christian Gmeiner Fixes: 5918045c4ed4 ("drm/scheduler: rework job destruction") Signed-off-by: Steven Price Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/337652/ commit 0f54621701bf164563dc907c2cfe967f32a5fb28 Author: Anna Karas Date: Fri Sep 27 14:15:04 2019 +0300 doc: drm: Update references to previously renamed files Update references to reservation.c and reservation.h since these files have been renamed to dma-resv.c and dma-resv.h respectively. Cc: Christian König Link: https://patchwork.freedesktop.org/patch/323401/?series=65037&rev=1 Signed-off-by: Anna Karas Reviewed-by: Christian König Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190927111504.20136-1-anna.karas@intel.com commit ab87cc9754cdeb373c8ac030ac7aed92f450b767 Author: John Stultz Date: Mon Oct 21 19:03:10 2019 +0000 kselftests: Add dma-heap test Add very trivial allocation and import test for dma-heaps, utilizing the vgem driver as a test importer. A good chunk of this code taken from: tools/testing/selftests/android/ion/ionmap_test.c Originally by Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Reviewed-by: Brian Starkey Acked-by: Laura Abbott Tested-by: Ayan Kumar Halder Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191021190310.85221-6-john.stultz@linaro.org commit 43d7238fb9ac897b29912368b3359e72bae469c4 Author: John Stultz Date: Mon Oct 21 19:03:09 2019 +0000 dma-buf: heaps: Add CMA heap to dmabuf heaps This adds a CMA heap, which allows userspace to allocate a dma-buf of contiguous memory out of a CMA region. This code is an evolution of the Android ION implementation, so thanks to its original author and maintainters: Benjamin Gaignard, Laura Abbott, and others! NOTE: This patch only adds the default CMA heap. We will enable selectively adding other CMA memory regions to the dmabuf heaps interface with a later patch (which requires a dt binding) Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Reviewed-by: Brian Starkey Acked-by: Laura Abbott Tested-by: Ayan Kumar Halder Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191021190310.85221-5-john.stultz@linaro.org commit 47a32f9c12266d450b92089148c6039591bd9909 Author: John Stultz Date: Mon Oct 21 19:03:08 2019 +0000 dma-buf: heaps: Add system heap to dmabuf heaps This patch adds system heap to the dma-buf heaps framework. This allows applications to get a page-allocator backed dma-buf for non-contiguous memory. This code is an evolution of the Android ION implementation, so thanks to its original authors and maintainters: Rebecca Schultz Zavin, Colin Cross, Laura Abbott, and others! Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Reviewed-by: Brian Starkey Acked-by: Laura Abbott Tested-by: Ayan Kumar Halder Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191021190310.85221-4-john.stultz@linaro.org commit 7b87ea704fd9606eaafa9150116536d72f5c4b1f Author: John Stultz Date: Mon Oct 21 19:03:07 2019 +0000 dma-buf: heaps: Add heap helpers Add generic helper dmabuf ops for dma heaps, so we can reduce the amount of duplicative code for the exported dmabufs. This code is an evolution of the Android ION implementation, so thanks to its original authors and maintainters: Rebecca Schultz Zavin, Colin Cross, Laura Abbott, and others! Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Reviewed-by: Brian Starkey Acked-by: Laura Abbott Tested-by: Ayan Kumar Halder Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191021190310.85221-3-john.stultz@linaro.org commit a69b0e855d3fd278ff6f09a23e1edf929538e304 Author: Andrew F. Davis Date: Mon Oct 21 19:03:06 2019 +0000 dma-buf: Add dma-buf heaps framework This framework allows a unified userspace interface for dma-buf exporters, allowing userland to allocate specific types of memory for use in dma-buf sharing. Each heap is given its own device node, which a user can allocate a dma-buf fd from using the DMA_HEAP_IOC_ALLOC. This code is an evoluiton of the Android ION implementation, and a big thanks is due to its authors/maintainers over time for their effort: Rebecca Schultz Zavin, Colin Cross, Benjamin Gaignard, Laura Abbott, and many other contributors! Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Hillf Danton Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Reviewed-by: Brian Starkey Acked-by: Laura Abbott Tested-by: Ayan Kumar Halder Signed-off-by: Andrew F. Davis Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191021190310.85221-2-john.stultz@linaro.org commit d328bd4f905834c7d87a49962ebc96e397aab7b9 Author: Anna Karas Date: Thu Sep 26 15:35:59 2019 +0300 drm/i915/tgl: Fix doc not corresponding to code Replace PLLs names used in documentation to that used in the code. Cc: Vandita Kulkarni Fixes: 68ff39c3f8c0 ("drm/i915/tgl: Add new pll ids") Signed-off-by: Anna Karas Reviewed-by: Vandita Kulkarni Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190926123559.15717-1-anna.karas@intel.com commit 900554dc6bfc996ad07b9e187bbfd3864cd5bed0 Author: Anna Karas Date: Tue Oct 8 12:28:49 2019 +0300 drm/i915: Describe structure member in documentation Add description of wakeref member of intel_shared_dpll structure to documentation. Cc: Lucas De Marchi Cc: Vivek Kasireddy Signed-off-by: Anna Karas Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191008092849.6511-1-anna.karas@intel.com commit 8c6388028d460b4a2997039f995bf826c275d888 Author: Anna Karas Date: Tue Oct 22 13:09:06 2019 +0300 doc: Update header files names Update header files containing i915_perf_stream, i915_perf_stream_ops and i915_oa_ops definitions since they have been moved from i915_drv.h to i915_perf_types.h. Cc: Robert Bragg Cc: Lionel Landwerlin Signed-off-by: Anna Karas Reviewed-by: Lionel Landwerlin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022100906.16597-1-anna.karas@intel.com commit c35eb477c0cfc1ffd704a743f7a7daa52ea16415 Author: Chris Wilson Date: Fri Oct 25 10:27:49 2019 +0100 drm/i915/selftests: Tweak the default subtest runtime BAT is growing a little fat and CI is under pressure and needs to trim off some redundant runtime. An easy option is to reduce the selftest runtimes, so try halving our default subtest timeout. While this reduces the number of iterations used, for the majority of tests that are passing, repeat runs (with different CI_DRM) will make up the difference -- a negative consequence though is that we may reduce the frequency of sporadic failures. Hopefully, we have no tests that were crucially dependent on the previous 1s timeout... Suggested-by: Tomi Sarvela Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191025092749.13468-1-chris@chris-wilson.co.uk commit 15f794bd977a0135328fbdd8a83cc64c1d267b39 Author: Gregory CLEMENT Date: Thu Oct 24 16:13:09 2019 +0200 spi: Fix NULL pointer when setting SPI_CS_HIGH for GPIO CS Even if the flag use_gpio_descriptors is set, it is possible that cs_gpiods was not allocated, which leads to a kernel crash. Reported-by: "kernelci.org bot" Fixes: 3e5ec1db8bfe ("spi: Fix SPI_CS_HIGH setting when using native and GPIO CS") Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191024141309.22434-1-gregory.clement@bootlin.com Signed-off-by: Mark Brown Cc: commit 6fb7427d84f6ed064776434436485cfb0f6711e9 Author: Andy Shevchenko Date: Mon Oct 21 13:36:24 2019 +0300 spi: pxa2xx: Introduce temporary variables to increase readability The current conditional for PCI ID matching is hard to read. Introduce couple of temporary variables to increase readability of the code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191021103625.4250-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 4c02a7bd43e22f4de53ad55b94d24e4388f712f0 Author: Pierre-Louis Bossart Date: Thu Oct 24 16:03:18 2019 -0500 ASoC: SOF: Intel: only support INFO_BATCH for legacy platforms The current position update is not precise enough for PulseAudio to work reliably with the timer-based scheduling on Baytrail, Cherrytrail, Broadwell. Disable the NO_PERIOD_WAKEUP capability and use BATCH to signal that the position is only reliable and updated during period_elapsed events. This will be reverted when the firmware provides a more accurate position for those platforms. Reviewed-by: Jaska Uimonen Reviewed-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191024210318.30068-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 27e322fabd508ba73ced625fc41f0b7ceee26416 Author: Pierre-Louis Bossart Date: Thu Oct 24 16:03:17 2019 -0500 ASoC: SOF: define INFO_ flags in dsp_ops Currently the INFO_ flags such as PAUSE/NO_PERIOD_WAKEUP are defined in the SOF PCM core, which doesn't scale. To account for platform variations, these flags need to be set in DSP ops. This patch only moves the definitions and does not change any functionality. Reviewed-by: Jaska Uimonen Reviewed-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191024210318.30068-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8c05f6af7b7d713e327cd6df5a8889c32fc1c10f Author: Ben Dooks Date: Fri Oct 18 16:48:30 2019 +0100 ASoC: tegra: disable rx_fifo after disable stream We see odd FIFO overruns with this, we assume the best thing to do is to disable the RX I2S frontend first, and then disable the FIFO that is using it. This also fixes an issue where using multi-word frames (TDM) have partial samples stuck in the FIFO which then get read out when the next capture is started. Signed-off-by: Ben Dooks Acked-by: Jon Hunter Link: https://lore.kernel.org/r/20191018154833.7560-5-ben.dooks@codethink.co.uk Signed-off-by: Mark Brown commit 07932563686a6c51b26266c8572901c46fd1cd55 Author: Edward Cragg Date: Fri Oct 18 16:48:27 2019 +0100 ASoC: tegra: add a TDM configuration callback Add a callback to configure TDM settings for the Tegra30 I2S ASoC 'platform' driver. Signed-off-by: Edward Cragg [ben.dooks@codethink.co.uk: merge fix for power management] [ben.dooks@codethink.co.uk: add review change for fsync of 1 clock] Signed-off-by: Ben Dooks Reviewed-by: Jon Hunter Link: https://lore.kernel.org/r/20191018154833.7560-2-ben.dooks@codethink.co.uk Signed-off-by: Mark Brown commit 16c33235321d5ce3463ebefc205d7cf11929d59f Author: Geert Uytterhoeven Date: Thu Oct 24 17:31:30 2019 +0200 ASoC: pxa: poodle: Spelling s/enpoints/endpoints/, s/connetion/connection/ Fix misspelling of "endpoints" and "connection". Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191024153130.31082-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit c19255659b6ed952948ce54a260efb2ad950cc54 Author: Geert Uytterhoeven Date: Thu Oct 24 17:16:03 2019 +0200 ASoC: Spelling s/configr/configur/ Fix misspellings of "configuration" and "configure". Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191024151603.29043-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit 4baabbf932ed4f97df8e18cf546d39b7c2138020 Author: Kuninori Morimoto Date: Fri Oct 25 09:56:10 2019 +0900 ASoC: soc-dpcm: tidyup for_each_dpcm_xx() macro for_each_dpcm_xx() macro is using "dpcm" as parameter (1), but, it is also struct member (2). #define for_each_dpcm_fe(be, stream, dpcm) \ list_for_each_entry(dpcm, &(be)->dpcm[stream]...) ^^^^(1) ^^^^(2) Thus, it will be compile error if user not used "dpcm" as parameter for_each_dpcm_fe(be, stream, dp) ^^ This patch fixup it. Reported-by: Pavel Machek Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tv7x7idx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f3ee99087c8ca0ecfdd549ef5a94f557c42d5428 Author: Edward Cragg Date: Fri Oct 18 16:48:28 2019 +0100 ASoC: tegra: Allow 24bit and 32bit samples The tegra3 audio can support 24 and 32 bit sample sizes so add the option to the tegra30_i2s_hw_params to configure the S24_LE or S32_LE formats when requested. Signed-off-by: Edward Cragg [ben.dooks@codethink.co.uk: fixup merge of 24 and 32bit] [ben.dooks@codethink.co.uk: add pm calls around ytdm config] [ben.dooks@codethink.co.uk: drop debug printing to dev_dbg] Signed-off-by: Ben Dooks Reviewed-by: Jon Hunter Link: https://lore.kernel.org/r/20191018154833.7560-3-ben.dooks@codethink.co.uk Signed-off-by: Mark Brown commit 6442793abf75a8081aa1f5da439529c08af2a5be Author: Curtis Malainey Date: Thu Oct 24 11:40:26 2019 -0700 ASoC: rt5677-spi: fix sparse warnings Fix bugs reported by kbuild test robot Fixes: a0e0d135427c ("ASoC: rt5677: Add a PCM device for streaming hotword via SPI") Reported-by: kbuild test robot Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191024184026.183913-1-cujomalainey@chromium.org Signed-off-by: Mark Brown commit f8a60435703bdde8f8a0ceb1aa8dad59df821583 Author: Colin Ian King Date: Thu Oct 24 13:46:10 2019 +0100 ASoC: rt5677: Add missing null check for failed allocation of rt5677_dsp The allocation of rt5677_dsp can potentially fail and return null, so add a null check and return -ENOMEM on a memory allocation failure. Addresses-Coverity: ("Dereference null return") Fixes: a0e0d135427c ("ASoC: rt5677: Add a PCM device for streaming hotword via SPI") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191024124610.18182-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 6025e2fae3dde3c3d789d08f8ceacbdd9f90d471 Author: Hans de Goede Date: Thu Oct 24 23:57:23 2019 +0200 ACPI: LPSS: Add dmi quirk for skipping _DEP check for some device-links The iGPU / GFX0 device's _PS0 method on the ASUS T200TA depends on the I2C1 controller (which is connected to the embedded controller). But unlike in the T100TA/T100CHI this dependency is not listed in the _DEP of the GFX0 device. This results in the dev_WARN_ONCE(..., "Transfer while suspended\n") call in i2c-designware-master.c triggering and the AML code not working as it should. This commit fixes this by adding a dmi based quirk mechanism for devices which miss a _DEP, and adding a quirk for the LNXVIDEO depending on the I2C1 device on the Asus T200TA. Fixes: 2d71ee0ce72f ("ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller") Tested-by: Pierre-Louis Bossart Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Cc: 4.20+ # 4.20+ Signed-off-by: Rafael J. Wysocki commit b3b3519c04bdff91651d0a6deb79dbd4516b5d7b Author: Hans de Goede Date: Thu Oct 24 23:57:22 2019 +0200 ACPI: LPSS: Add LNXVIDEO -> BYT I2C1 to lpss_device_links Various Asus Bay Trail devices (T100TA, T100CHI, T200TA) have an embedded controller connected to I2C1 and the iGPU (LNXVIDEO) _PS0/_PS3 methods access it, so we need to add a consumer link from LNXVIDEO to I2C1 on these devices to avoid suspend/resume ordering problems. Fixes: 2d71ee0ce72f ("ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller") Tested-by: Pierre-Louis Bossart Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Cc: 4.20+ # 4.20+ Signed-off-by: Rafael J. Wysocki commit cc18735f208565343a9824adeca5305026598550 Author: Hans de Goede Date: Thu Oct 24 23:57:21 2019 +0200 ACPI: LPSS: Add LNXVIDEO -> BYT I2C7 to lpss_device_links So far on Bay Trail (BYT) we only have been adding a device_link adding the iGPU (LNXVIDEO) device as consumer for the I2C controller for the PMIC for I2C5, but the PMIC only uses I2C5 on BYT CR (cost reduced) on regular BYT platforms I2C7 is used and we were not adding the device_link sometimes causing resume ordering issues. This commit adds LNXVIDEO -> BYT I2C7 to the lpss_device_links table, fixing this. Fixes: 2d71ee0ce72f ("ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller") Tested-by: Pierre-Louis Bossart Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Cc: 4.20+ # 4.20+ Signed-off-by: Rafael J. Wysocki commit cefe6aac29ff608a244f8cc9ba6bcfe12ee9c1f3 Author: Hans de Goede Date: Thu Oct 24 23:38:26 2019 +0200 ACPI / PMIC: Add Cherry Trail Crystal Cove PMIC OpRegion driver We have no docs for the CHT Crystal Cove PMIC. The Asus Zenfone-2 kernel code has 2 Crystal Cove regulator drivers, one calls the PMIC a "Crystal Cove Plus" PMIC and talks about Cherry Trail, so presuambly that one could be used to get register info for the regulators if we need to implement regulator support in the future. For now the sole purpose of this driver is to make intel_soc_pmic_exec_mipi_pmic_seq_element work on devices with a CHT Crystal Cove PMIC. Specifically this fixes the following MIPI PMIC sequence related errors on e.g. an Asus T100HA: [ 178.211801] intel_soc_pmic_exec_mipi_pmic_seq_element: No PMIC registered [ 178.211897] [drm:intel_dsi_dcs_init_backlight_funcs [i915]] *ERROR* mipi_exec_pmic failed, error: -6 Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit ed852cde25a12ea3b6fcc3afc746f773154d0bc5 Author: Hans de Goede Date: Thu Oct 24 23:38:25 2019 +0200 ACPI / PMIC: Add byt prefix to Crystal Cove PMIC OpRegion driver Our current Crystal Cove OpRegion driver is only valid for the Crystal Cove PMIC variant found on Bay Trail (BYT) boards, Cherry Trail (CHT) based boards use another variant. At least the regulator registers are different on CHT and these registers are one of the things controlled by the custom PMIC OpRegion. Commit 4d9ed62ab142 ("mfd: intel_soc_pmic: Export separate mfd-cell configs for BYT and CHT") has disabled the intel_pmic_crc.c code for CHT devices by removing the "crystal_cove_pmic" MFD cell on CHT devices. This commit renames the intel_pmic_crc.c driver and the cell to be prefixed with "byt" to indicate that this code is for BYT devices only. This is a preparation patch for adding a separate PMIC OpRegion driver for the CHT variant of the Crystal Cove PMIC (sometimes called Crystal Cove Plus in Android kernel sources). Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit a0fcfed1389ece70c7a2f6044437032b64300504 Author: Hans de Goede Date: Thu Oct 24 23:38:24 2019 +0200 ACPI / PMIC: Do not register handlers for unhandled OpRegions For some model PMIC's used on Intel boards we do not know how to handle the power or thermal opregions because we have no documentation. For example in the intel_pmic_chtwc.c driver thermal_table_count is 0, which means that our PMIC_THERMAL_OPREGION_ID handler will always fail with AE_BAD_PARAMETER, in this case it is better to simply not register the handler at all. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit ea7d8c675ea5b8db9441b50d1b7939228c26e622 Author: Christian König Date: Fri Sep 27 15:21:15 2019 +0200 drm/ttm: stop exporting ttm_mem_io_* functions Those are not supposed to be used by drivers. Signed-off-by: Christian König Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/333290/ commit 51ea742c87f3c6537a0df0f79f5da7bce4d8a40a Author: Christian König Date: Fri Sep 27 15:06:22 2019 +0200 drm/qxl: stop using TTM to call driver internal functions The ttm_mem_io_* functions were intended to be internal to TTM and shouldn't have been used in a driver. They were exported in commit afe6804c045fbd69a1b75c681107b5d6df9190de just for QXL. Instead call the qxl_ttm_io_mem_reserve() function directly and completely drop the free call since that is a dummy on QXL. Signed-off-by: Christian König Reviewed-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/333289/ commit ef38321897cff9466c9dac45d7c1db5f6f19a2cf Author: Christian König Date: Tue Apr 16 20:19:07 2019 +0200 drm/ttm: use the parent resv for ghost objects v3 This way the TTM is destroyed with the correct dma_resv object locked and we can even pipeline imported BO evictions. v2: Limit this to only cases when the parent object uses a separate reservation object as well. This fixes another OOM problem. v3: fix init and try_lock on the wrong object Signed-off-by: Christian König Reviewed-by: Daniel Vetter Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/337499/ commit 97588b5b9a6b330dc2e3fbf3dea987e37d30194e Author: Christian König Date: Wed Sep 25 11:38:50 2019 +0200 drm/ttm: remove pointers to globals As the name says global memory and bo accounting is global. So it doesn't make to much sense having pointers to global structures all around the code. Signed-off-by: Christian König Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/332879/ commit 9165fb879f62a73577867180e890f410f3a239ad Author: Christian König Date: Thu Sep 19 12:56:15 2019 +0200 drm/ttm: always keep BOs on the LRU This allows blocking for BOs to become available in the memory management. Amdgpu is doing this for quite a while now during CS. Now apply the new behavior to all drivers using TTM. Signed-off-by: Christian König Acked-by: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/332878/ commit 7fb03cc3e0794f00b8f154f335ad5b4eb4d78c58 Author: Christian König Date: Tue Oct 1 10:02:58 2019 +0200 drm/ttm, drm/vmwgfx: move cpu_writers handling into vmwgfx This feature is only used by vmwgfx and superfluous for everybody else. Signed-off-by: Christian König Co-developed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom Tested-by: Thomas Hellstrom Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/333650/ commit 1860523df3fa48d9438b73da5f8d907b4c564317 Author: Eugen Hristev Date: Wed Sep 11 10:24:40 2019 +0200 ARM: dts: at91: sama5d4_xplained: add digital filter for i2c Add property for digital filter for i2c0 node sama5d4_xplained Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/1568189911-31641-10-git-send-email-eugen.hristev@microchip.com Signed-off-by: Ludovic Desroches commit 2789034c1b5759980a5a3f3a3e46945a6833ee5b Author: Eugen Hristev Date: Wed Sep 11 10:24:37 2019 +0200 ARM: dts: at91: sama5d2_xplained: add analog and digital filter for i2c Add property for analog and digital filter for i2c1 and i2c2 nodes for sama5d2_xplained Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/1568189911-31641-9-git-send-email-eugen.hristev@microchip.com Signed-off-by: Ludovic Desroches commit 9415743e4c8a029bfa46654e3a0a681a8db473f8 Author: Abhishek Shah Date: Fri Sep 6 09:28:13 2019 +0530 PCI: iproc: Invalidate PAXB address mapping before programming it Invalidate PAXB inbound/outbound address mapping on probe before programming it. Kernel relies on outbound/inbound windows VALID bit in OARR registers to detect if a window was programmed and if it is set it does not overwrite it. This causes issues on soft reboot (eg kexec) since the host controller does not go through a HW reset on softboot so the kernel detects valid outbound/inbound windows configuration and is not able to reprogramme it as expected. Therefore, in order to make sure outbound/inbound windows are reprogrammed on soft reboot (eg kexec), invalidate memory windows on each probe to fix the issue. Signed-off-by: Abhishek Shah Signed-off-by: Lorenzo Pieralisi Reviewed-by: Ray Jui Reviewed-by: Andrew Murray commit 7858d31beffe178b0e775f13af1917ac60273112 Author: Peng Fan Date: Thu Oct 24 01:58:47 2019 +0000 clk: imx: imx8mq: mark sys1/2_pll as fixed clock According Architecture definition guide, SYS1_PLL is fixed at 800MHz, SYS2_PLL is fixed at 1000MHz, so let's use imx_clk_fixed to register the clocks and drop code that could change the rate. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 3f44344868cfcd76b2ca0fe334a76a17a120cdd9 Author: Peng Fan Date: Thu Oct 24 01:58:42 2019 +0000 clk: imx: imx8mn: mark sys_pll1/2 as fixed clock According Architecture definition guide, SYS_PLL1 is fixed at 800MHz, SYS_PLL2 is fixed at 1000MHz, so let's use imx_clk_fixed to register the clocks and drop code that could change the rate. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit c332481f62fa2f29af234bf85846268a5a0b173e Author: Peng Fan Date: Thu Oct 24 01:58:37 2019 +0000 clk: imx: imx8mm: mark sys_pll1/2 as fixed clock According Architecture definition guide, SYS_PLL1 is fixed at 800MHz, SYS_PLL2 is fixed at 1000MHz, so let's use imx_clk_fixed to register the clocks and drop code that could change the rate. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit e8688fe8df7d01f43586b4bb74b2fa92f56c5ee8 Author: Leonard Crestez Date: Wed Oct 16 11:57:40 2019 +0000 clk: imx8mn: Define gates for pll1/2 fixed dividers On imx8mn there are 9 fixed-factor dividers for SYS_PLL1 and SYS_PLL2 each with their own gate. Only one of these gates (the one "dividing" by one) is currently defined and it's incorrectly set as the parent of all the fixed-factor dividers. Add the other 8 gates to the clock tree between sys_pll1/2_bypass and the fixed dividers. Signed-off-by: Leonard Crestez Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 3e4947acad32e6abf1ef3259a42fb4d690e4819a Author: Leonard Crestez Date: Wed Oct 16 11:57:39 2019 +0000 clk: imx8mm: Define gates for pll1/2 fixed dividers On imx8mm there are 9 fixed-factor dividers for SYS_PLL1 and SYS_PLL2 each with their own gate. Only one of these gates (the one "dividing" by one) is currently defined and it's incorrectly set as the parent of all the fixed-factor dividers. Add the other 8 gates to the clock tree between sys_pll1/2_bypass and the fixed dividers. Signed-off-by: Leonard Crestez Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit b04383b6a5588906ffd059a6a9f5344a9c6df58a Author: Leonard Crestez Date: Wed Oct 16 11:57:37 2019 +0000 clk: imx8mq: Define gates for pll1/2 fixed dividers On imx8mq there are 9 fixed-factor dividers for SYS_PLL1 and SYS_PLL2 each with their own gate but these gates are not currently defined in the clock tree. Add them between sys1/2_pll_out and the fixed dividers. Signed-off-by: Leonard Crestez Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 0f42c1ad44d437f75b840b572376fd538fbb9643 Author: Borislav Petkov Date: Mon Oct 21 17:18:23 2019 +0200 x86/ftrace: Get rid of function_hook History lesson courtesy of Steve: "When ftrace first was introduced to the kernel, it used gcc's mcount profiling mechanism. The mcount mechanism would add a call to "mcount" at the start of every function but after the stack frame was set up. Later, in gcc 4.6, gcc introduced -mfentry, that would create a call to "__fentry__" instead of "mcount", before the stack frame was set up. In order to handle both cases, ftrace defined a macro "function_hook" that would be either "mcount" or "__fentry__" depending on which one was being used. The Linux kernel no longer supports the "mcount" method, thus there's no reason to keep the "function_hook" define around. Simply use "__fentry__", as there is no ambiguity to the name anymore." Drop it everywhere. Signed-off-by: Borislav Petkov Acked-by: Jiri Slaby Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Peter Zijlstra Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: x86@kernel.org Link: http://lkml.kernel.org/r/20191018124800.0a7006bb@gandalf.local.home commit 0f3a10687b9a6d26b9808432bb8ad0aa17210ea5 Author: Lukasz Majewski Date: Thu Oct 10 11:08:02 2019 +0200 ARM: dts: Disable DMA support on the BK4 vf610 device's fsl_lpuart This change disables the DMA support (RX/TX) on the NXP's fsl_lpuart driver - the PIO mode is used instead. This change is necessary for better robustness of BK4's device use cases with many potentially interrupted short serial transfers. Without it the driver hangs when some distortion happens on UART lines. Signed-off-by: Lukasz Majewski Suggested-by: Robin Murphy Signed-off-by: Shawn Guo commit fa583f71a99c85e52781ed877c82c8757437b680 Author: Yin Fengwei Date: Thu Oct 24 15:04:20 2019 +0800 ACPI: processor_idle: Skip dummy wait if kernel is in guest In function acpi_idle_do_entry(), an ioport access is used for dummy wait to guarantee hardware behavior. But it could trigger unnecessary VMexit if kernel is running as guest in virtualization environment. If it's in virtualization environment, the deeper C state enter operation (inb()) will trap to hypervisor. It's not needed to do dummy wait after the inb() call. So we could just remove the dummy io port access to avoid unnecessary VMexit. And keep dummy io port access to maintain timing for native environment. Signed-off-by: Yin Fengwei Signed-off-by: Rafael J. Wysocki commit 03029ed42f01bd146062d597fc7f3e738f91be88 Merge: 5c70e9714254 65b9425ce9aa Author: Kalle Valo Date: Fri Oct 25 10:42:15 2019 +0300 Merge tag 'iwlwifi-next-for-kalle-2019-10-18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Patches intended for v5.5 * Revamp the debugging infrastructure; * Some udpdates to FW API commands; * Fix max amsdu value calculation; * Small updates in the debugging infra; * Some new helper functions; * A few clean-ups; * Other small fixes and improvements; commit 5c70e97142542c4d22e8892568c035bc95049258 Author: Yan-Hsuan Chuang Date: Thu Oct 24 17:19:48 2019 +0800 rtw88: fix GENMASK_ULL for u64 This fixes compile warning: In file included from include/linux/bitops.h:5:0, from include/linux/kernel.h:12, from include/asm-generic/bug.h:19, from arch/mips/include/asm/bug.h:42, from include/linux/bug.h:5, from include/net/mac80211.h:16, from drivers/net/wireless/realtek/rtw88/main.h:8, from drivers/net/wireless/realtek/rtw88/main.c:5: drivers/net/wireless/realtek/rtw88/main.c: In function 'rtw_update_rate_mask': include/linux/bits.h:23:11: warning: right shift count is negative [-Wshift-count-negative] (~UL(0) >> (BITS_PER_LONG - 1 - (h)))) ^ drivers/net/wireless/realtek/rtw88/main.c:622:17: note: in expansion of macro 'GENMASK' u64 cfg_mask = GENMASK(63, 0); ^~~~~~~ Reported-by: kbuild test robot Fixes: f39e9bd49a3d ("rtw88: add set_bitrate_mask support") Signed-off-by: Yan-Hsuan Chuang Reported-by: kbuild test robot Signed-off-by: Kalle Valo commit c6a5f8daff1179a443f3bf797c0400d84a8818a0 Author: Bhanusree Date: Fri Oct 25 11:57:38 2019 +0530 drm/gpu: Fix Memory barrier without comment Issue -Issue found using checkpatch.pl -Insert comments for memory barrier usage Signed-off-by: Bhanusree Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1571984858-4644-1-git-send-email-bhanusreemahesh@gmail.com commit e109c6db528c02ee3d81e43d9571b499c75f55f5 Author: Bhanusree Date: Fri Oct 25 11:57:13 2019 +0530 drm/gpu: Fix Missing blank line after declarations -Insert a blank line after the declarations. -Issue found using checkpatch.pl Signed-off-by: Bhanusree Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1571984833-4596-1-git-send-email-bhanusreemahesh@gmail.com commit 65b9425ce9aa107f758ad0a491af5ef635567315 Author: Tova Mussai Date: Thu Aug 1 14:00:24 2019 +0300 iwlwifi: rx: use new api to get band from rx mpdu The FW introduce new API to get the band from the rx mpdu, use this new API. Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho commit e878325a801d2cfd1f0fffdb3380b9aca7f8cc86 Author: Tova Mussai Date: Wed Jul 31 11:19:26 2019 +0300 iwlwifi: nvm: create function to convert channel index to nl80211_band Create function to convert channel index to nl80211_band and use it. Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho commit d558b7f834707b6acdfd3f91c8524598db8456f0 Author: Tova Mussai Date: Sun Jul 28 13:51:07 2019 +0300 iwlwifi: mvm: Invert the condition for OFDM rate OFDM rate used for all bands except to band 2.4 which use CCK rate. Inverting the condition help that in future we won't need to expand the condition for more bands. Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho commit 3717f91a81afde5c2b7143f0d1bafb389cfb6fad Author: Tova Mussai Date: Wed Jul 31 09:06:31 2019 +0300 iwlwifi: mvm: create function to convert nl80211 band to phy band Create the function and use it. Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho commit 6abe1e2e39048ce26cbad276841b9b1b2a7e627a Author: Shahar S Matityahu Date: Sun Aug 4 14:06:45 2019 +0300 iwlwifi: dbg_ini: use vzalloc to allocate dumping memory regions During dump flow, the driver allocates spaces to store the memory regions that will be included in the dump. These regions can be very large so in order to avoid allocation failure, use vzalloc instead. The kmalloc uses GFP_KERNEL and the driver does not make any use of the fact that the memory is contiguous so the same functionality is maintained. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 3b445ed9b72a8d1614a78aa31245f8c5eb9e595d Author: Shahar S Matityahu Date: Sun Aug 4 10:57:16 2019 +0300 iwlwifi: dbg_ini: add user trigger support Allow to fire user trigger in ini mode Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 449a29d0feada2810ffca692b7dee8470073c3d5 Author: Lior Cohen Date: Thu Jul 18 11:37:48 2019 +0300 iwlwifi: mvm: add notification for missed VAP A missed VAP notification will be sent from umac when the station is out of sync with its associated non-transmitted BSSID. The notification will be sent only if the transmitted BSSID is an EMA-AP one. The driver will consider this notification as connection loss. Signed-off-by: Lior Cohen Signed-off-by: Luca Coelho commit 7f2ea52123426b05cd83aec35a4abfb93f66be2b Author: YueHaibing Date: Fri Jul 26 22:18:38 2019 +0800 iwlwifi: mvm: fix old-style declaration There expect the 'static' keyword to come first in a declaration, and we get warnings like this with "make W=1": drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:427:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:434:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit fe959c7b20495fe05de5f65ea0968a7b128afa9e Author: Emmanuel Grumbach Date: Thu Jul 11 21:44:42 2019 +0300 iwlwifi: mvm: use the new session protection command The firmware has now a new session protection command. This new API allows the firmware to manage the protection needed for association. It'll also remove the event when the association is complete. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit c327ae2fe12f613dee91a8513b39fd2dba46a7b4 Author: Johannes Berg Date: Fri Jul 26 13:21:46 2019 +0200 iwlwifi: mvm: remove leftover rs_remove_sta_debugfs() prototype This prototype is no longer used, remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit d3b4dc014c9ccad665a676ffb55ce7980663a6e0 Author: Haim Dreyfuss Date: Tue Jul 23 18:27:45 2019 +0300 iwlwifi: mvm: add support for new version for D0I3_END_CMD During D3 state there are some flows which requires FW reset. Add new API to support it. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho commit ee4cce9b9d6421d037ffc002536b918fd7f4aff3 Author: Mordechay Goodstein Date: Sun Jul 28 20:09:22 2019 +0300 iwlwifi: mvm: consider ieee80211 station max amsdu value debugfs amsdu_len sets only the max_amsdu_len for ieee80211 station so take it into consideration while getting max amsdu Fixes: af2984e9e625 ("iwlwifi: mvm: add a debugfs entry to set a fixed size AMSDU for all TX packets") Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho commit eae7550b9d9c95fc84b430ecaeaef99bc71bbf5c Author: Shahar S Matityahu Date: Thu Jul 25 13:25:07 2019 +0300 iwlwifi: dbg_ini: support FW notification dumping in case of missed beacon Pass the FW notification packet to the dump collection flow to allow the driver to include it in the dump file if requested. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit b87384af8d6701c0fe6ffbe885feb200150b1ee4 Author: Shahar S Matityahu Date: Tue Jul 23 15:27:14 2019 +0300 iwlwifi: dbg_ini: remove old API and some related code Remove unused code of the old debug ini API. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit e8d9e982bf9bf0e6f99099f1f09a37563b2b95b5 Author: Shahar S Matityahu Date: Tue Jul 23 15:24:54 2019 +0300 iwlwifi: dbg_ini: rename external debug configuration file Rename the external configuration file to align to the debug SAS. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 3ed34fbf9d3bfce7c82851242ea86a8c1209f14e Author: Shahar S Matityahu Date: Tue Jul 23 15:22:25 2019 +0300 iwlwifi: dbg_ini: support FW response/notification region type Allow the driver to collect FW response/notification region type during dump and allow triggering dump collection for a given FW response/notification. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 068893b7a28f0728fc6da17906df95f3bb6f9aa3 Author: Shahar S Matityahu Date: Wed Jul 24 18:52:23 2019 +0300 iwlwifi: dbg_ini: support domain changing via debugfs Allow to change or read the debug domain bitmap at runtime via fw_dbg_domain debugfs. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 60e8abd9d3e91916a25783a3e62980083b1acfaf Author: Shahar S Matityahu Date: Tue Jul 23 15:10:59 2019 +0300 iwlwifi: dbg_ini: add periodic trigger new API support Enable periodic trigger. Allows the driver to trigger dump collection in constant intervals. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 14124b25780db542b2bc31aadecc37a2a6534f40 Author: Shahar S Matityahu Date: Tue Jul 23 14:37:45 2019 +0300 iwlwifi: dbg_ini: implement monitor allocation flow Allow allocating fragmented buffers for several allocation IDs. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit cf29c5b66b9f83939367d90679eb68cdfa2f0356 Author: Shahar S Matityahu Date: Tue Jul 23 14:26:49 2019 +0300 iwlwifi: dbg_ini: implement time point handling Calculate active triggers list and implement time points handling. Also allow to override the debug domain via iwl-dbg-cfg.ini by setting FW_DBG_DOMAIN field. Reported-by: kbuild test robot Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit a9248de42464e546b624e3fc6a8b04b991af3591 Author: Shahar S Matityahu Date: Tue Jul 23 13:41:44 2019 +0300 iwlwifi: dbg_ini: add TLV allocation new API support Add new debug TLVs API preprocessing. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 677d25b237b307898a76bc0acd7cf854d39f02f2 Author: Shahar S Matityahu Date: Tue Jul 23 12:50:25 2019 +0300 iwlwifi: dbg_ini: use new API in dump info Make dump info region use new API. debug_info_tlv_list list will be initialize in a future patch once the driver will start using it. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit a77e3d2829e2a73c3d76b2e776214788fc0ebfe8 Author: Shahar S Matityahu Date: Tue Jul 23 12:47:13 2019 +0300 iwlwifi: dbg_ini: add error tables dumping support Allow to collect error table data. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 593fae3e5e9050f70b757bb6849edb8e6ec040c5 Author: Shahar S Matityahu Date: Tue Jul 23 12:34:49 2019 +0300 iwlwifi: dbg_ini: add monitor dumping support Allow collecting monitor data in ini debug mode. Implement both SMEM and DRAM monitor regions dumping. For DRAM monitor, support DBGC1, DBGC2 and DBGC3 and support several DRAM fragments per DBGC. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 69f0e5059b09613ccba74cef831f2560b2a7affe Author: Shahar S Matityahu Date: Mon Jul 22 15:31:13 2019 +0300 iwlwifi: dbg: remove multi buffers infra Legacy DRAM monitor does not support multi buffers. Remove this infra. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 3b589d5624ce9f62b2bdca4223d0b41dcce48be3 Author: Shahar S Matityahu Date: Tue Jul 23 11:38:36 2019 +0300 iwlwifi: dbg_ini: use new trigger TLV in dump flow Make dump flow use the new trigger TLV. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit c9fe75e9f347044fda99a0da9c61983b153b8ed9 Author: Shahar S Matityahu Date: Tue Jul 23 11:00:47 2019 +0300 iwlwifi: dbg_ini: use new region TLV in dump flow Make dump flow use the new region TLV and update the region type enum. Temporarily remove monitor dumping support. Support will be readded in a future patch. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit c03fe6d3b31c75e2d5903a668138adba71ac5241 Author: Shahar S Matityahu Date: Mon Jul 8 10:52:14 2019 +0300 iwlwifi: dbg_ini: load external dbg cfg after internal cfg is loaded In the new API implementation the driver does not keep the internal and external debug configurations in separate structs so the last configuration that is loaded overrides the previous ones (this is true only in some of the TLVs e.g. the buffer allocation TLV). Load the external configuration after the internal is loaded so that user configuration will override the default coming with the FW. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit 66ee1973603572e4258b08b8737490833f8172bc Merge: fa679767adde f846d1e704f2 Author: Linus Walleij Date: Fri Oct 25 08:21:05 2019 +0200 Merge tag 'sh-pfc-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v5.5 - Add support for the new RZ/G2N (r8a774b1) SoC, - Small fixes and cleanups. commit 22648c989cb8305f51b96b5962df8674697bb2ab Author: Siva Durga Prasad Paladugu Date: Thu Feb 8 15:32:45 2018 +0530 microblaze: Increase max dtb size to 64K from 32K This patch increases max dtb size to 64K from 32K. This fixes the issue of kernel hang with larger dtb of size greater than 32KB. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek commit 6bf8be7ff7793213609d60acdda943c258e27bb9 Author: Michal Simek Date: Tue Aug 8 16:06:52 2017 +0200 microblaze: Enable SPARSE_IRQ Enabling SPARSE_IRQ to use dynamically allocated irq descriptors. Signed-off-by: Mubin Sayyed Signed-off-by: Michal Simek commit a323fb63d0a2dc303d029fa928ae77a755250dfb Author: Manjukumar Matha Date: Tue Aug 29 08:03:27 2017 -0700 microblaze: defconfig: Enable devtmps and tmpfs Currently dropbear does not run in background because devtmps and tmpfs is not enabled by default. Enable devtmps and tmpfs to fix this issue. Signed-off-by: Manjukumar Matha Signed-off-by: Michal Simek commit 13645b1a0426a38338d484f3ec7b3021c1359986 Author: Anson Huang Date: Wed Oct 9 15:04:19 2019 +0800 arm64: dts: imx8mq-evk: VDD_ARM power rail is always ON On i.MX8MQ EVK board, VDD_ARM is from a DC-DC converter which is always ON, the GPIO1_IO13 is ONLY to switch VDD_ARM's voltage between 0.9V and 1V for CPU DVFS, so VDD_ARM's GPIO regulator should be always ON to avoid below confusion after kernel boot up: imx8mqevk login: [ 31.776619] vdd_arm: disabling Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 069de7bba5bc50f93efc78b27244a1cff696788b Author: Fabio Estevam Date: Tue Oct 8 13:30:24 2019 -0300 ARM: dts: imx6q-gw54xx: Do not use 'simple-audio-card,dai-link' According to Documentation/devicetree/bindings/sound/simple-card.txt the 'simple-audio-card,dai-link' may be omitted when the card has only one DAI link, which is the case here. Get rid of 'simple-audio-card,dai-link' in order to fix the following build warning with W=1: arch/arm/boot/dts/imx6q-gw54xx.dts:19.32-31.5: Warning (unit_address_vs_reg): /sound-digital/simple-audio-card,dai-link@0: node has a unit name, but no reg property Cc: Tim Harvey Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 37c250fd3844037fb53ad92366f3389e7876ab1d Author: Valdis Kletnieks Date: Wed Oct 23 01:53:53 2019 -0400 staging: exfat: Update MAINTAINERS file Add a L: tag so get_maintainers.pl output includes the linux-fsdevel list Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191023055353.695275-1-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 3a4cffe67f2faefd498f7eea0b1dc3507c927042 Author: Ajay Singh Date: Fri Oct 18 12:45:39 2019 +0000 staging: wilc1000: handle mgmt frames for both interfaces during concurrent mode During concurrent mode(AP/STA + P2P), pass the mgmt frames received from firmware to appropriate interface. Iterate the complete interface list to pass frames on the interface which has registered to receive mgmt frame. Added extra time for 'remain_on_ch' timer to ensure that timeout for uncanceled remain_on_channel is not triggered & 'p2p_listen_state' is not cleared before passing the mgmt frames to p2p interface. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191018124511.22751-1-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit d59dc92f1bccd5acde793aebdbb4f7121cf3f9af Author: Dan Carpenter Date: Thu Oct 17 12:18:32 2019 +0300 staging: wilc1000: potential corruption in wilc_parse_join_bss_param() The "rates_len" value needs to be capped so that the memcpy() doesn't copy beyond the end of the array. Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Dan Carpenter Reviewed-by: Adham Abozaeid Link: https://lore.kernel.org/r/20191017091832.GB31278@mwanda Signed-off-by: Greg Kroah-Hartman commit bfc0a0935aa4d74cd37d0b5e013ec6c4aa827a2d Author: Adham Abozaeid Date: Thu Oct 17 16:51:13 2019 +0000 staging: wilc1000: store bss object and use cfg80211_connect_bss() In a fast disconnect/connect sequence, cfg80211_connect_result() can fail to find the bss object which the driver is connecting to. Detailed sequence of events: * Driver is connected in STA mode * Disconnect request arrives from user space. Driver disconnects and calls cfg80211_disconnected() which adds new event to the cfg80211_wq worker thread * Connect request arrives from user space. cfg80211_connect() stores ssid/ssid_len and calls rdev_connect() * __cfg80211_disconnected() runs in worker thread and zero wdev->ssid_len * Connect succeeds. Driver calls cfg80211_connect_result() which fails to find the bss because wdev->ssid_len is zero To overcome this, upon connect request, store the bss object in the driver and upon connect completion pass it to kernel using cfg80211_connect_bss(). Ref: bcdd49b074d0 ("store bss object and use cfg80211_connect_bss()") Signed-off-by: Adham Abozaeid Link: https://lore.kernel.org/r/20191017165105.27429-1-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman commit 79380bbfc3ff3d541546054e42c7a92670d728d1 Author: Michael Straube Date: Thu Oct 24 17:59:18 2019 +0200 staging: rtl8188eu: remove code valid only for 5 GHz Remove code valid only for 5 GHz, according to the TODO. - 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. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191024155918.13399-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9f750a7ec1b7957053580818451ec1114d0c1132 Author: Jamal Shareef Date: Wed Oct 23 14:51:05 2019 -0700 staging: fbtft: Fix duplicate arguments to bitwise AND Fix duplicated arguments to bitwise & operator. Issue detected by coccinelle. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/20191023215105.18049-1-jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 76fe47940e607a4a1071dbb37073463974b89802 Author: CristianeNaves Date: Thu Oct 24 11:46:23 2019 -0200 staging: gasket: Fix lines ending with a '(' Fix lines ending with a '('. Issue found by checkpatch. Signed-off-by: CristianeNaves Link: https://lore.kernel.org/r/20191024134623.GA4506@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman commit 6454e187244e911b0d215d6187d6167ae08b3f3b Author: Gabriela Bittencourt Date: Thu Oct 24 13:38:22 2019 -0300 staging: sm750fb: align arguments with open parenthesis in file sm750_cursor.h Cleans up checks of "Alignment should match open parenthesis" in file sm750_cursor.h Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191024163822.7157-4-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 548c01d6e37695f2e05c9c79db7611f30d4a0aa2 Author: Gabriela Bittencourt Date: Thu Oct 24 13:38:21 2019 -0300 staging: sm750fb: align arguments with open parenthesis in file sm750_accel.h Cleans up checks of "Alignment should match open parenthesis" in file sm750_accel.h Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191024163822.7157-3-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 836c336ebe502115d5e532a9454db7af2c208c28 Author: Gabriela Bittencourt Date: Thu Oct 24 13:38:20 2019 -0300 staging: sm750fb: align arguments with open parenthesis in ddk750_sii164.c Cleans up checks of "Alignment should match open parenthesis" in file ddk750_sii164.c Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191024163822.7157-2-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 13c2059fee66f1a03ea234a0826610418192e802 Author: Gabriela Bittencourt Date: Wed Oct 23 13:30:14 2019 -0300 staging: sm750fb: format description of parameters in accel.h Formatting comments in file drivers/staging/sm750fb/sm750_accel.h. Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191023163016.30217-3-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3bcfd0e77e93b583fa2752192bcc35e4439c2b22 Author: Gabriela Bittencourt Date: Wed Oct 23 13:30:13 2019 -0300 staging: sm750fb: format description of parameters in accel.c Formatting comments in file drivers/staging/sm750fb/sm750_accel.c. Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191023163016.30217-2-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 25c42086c711719f3d3b520fc837ac422f73aa85 Author: Jules Irenge Date: Thu Oct 17 18:38:37 2019 +0100 staging: vc04_services: fix warnings of Block comments use of * Fix warnings of Block comments use * on subsequent lines. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191017173837.27336-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3e722c805cdf9cb6b43ca3646cc72013cb186af2 Author: Jules Irenge Date: Thu Oct 17 17:31:26 2019 +0100 staging: vc04_services: fix warnings of scpace required between operator Fix warnings of space required between operator and variables. Issue detected by checkpatch tool Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191017163126.23992-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit b7697f054018ea2583a77d11b1547c50c805a841 Author: Jules Irenge Date: Thu Oct 17 16:00:44 2019 +0100 staging: vc04_services: fix check warnings of line over 80 characters Fix warnings of line over 80 characters. Issue detected by checkepatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191017150044.17746-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7fb50738e2f61e040cb3bfa46258e675267638c2 Author: Evan Chime Date: Fri Oct 18 18:57:59 2019 +0100 Staging: Netlogic: Fix spelling mistake Change "standred" on line 3 to "standard" Signed-off-by: Evan Chime Link: https://lore.kernel.org/r/20191018175759.GA8294@ik-ubuntu Signed-off-by: Greg Kroah-Hartman commit f44e565e91557ded98049e72ed9b63088ff88018 Author: Evan Chime Date: Fri Oct 18 18:57:25 2019 +0100 Staging: Netlogic: Fix grammatical error Change "in to" in "Changing comments in to linux standred format" on line 3 to "into" Signed-off-by: Evan Chime Link: https://lore.kernel.org/r/20191018175725.GA8274@ik-ubuntu Signed-off-by: Greg Kroah-Hartman commit 663328205c0d7b246cbf01247d4a81b15460f312 Author: Jules Irenge Date: Tue Oct 22 19:53:28 2019 +0100 staging: uwb: fix coccinelle warnings of comparison to bool Fix warnings of comparision to bool. Issue detected by coccinelle tool. Signed-off-by: Jules Irenge Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20191022185328.9387-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit c671dfdaedefc69000955b3a257538175bcb8aba Author: Jamal Shareef Date: Thu Oct 24 15:39:37 2019 -0700 staging: most: Change bool init to true/false Bool initializations should use true and false. Bool tests don't need comparisons. Based on contributions from Joe Perches, Rusty Russell and Bruce W Allan. The semantic patch that makes this report is available in scripts/coccinelle/misc/boolinit.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/20191024223937.2800-1-jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 77b97aa69bd08a889c78397193d7390cd6a51122 Author: YueHaibing Date: Wed Oct 23 15:52:06 2019 +0800 staging: comedi: remove unused variable 'route_table_size' drivers/staging/comedi/drivers/ni_routes.c:52:21: warning: route_table_size defined but not used [-Wunused-const-variable=] It is never used since introduction. Signed-off-by: YueHaibing Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/20191023075206.33088-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 630d00b8b26de7d0487df6c45a3afbdae66475e6 Author: Valdis Kletnieks Date: Thu Oct 24 11:53:19 2019 -0400 staging: exfat: Clean up return code - FFS_MEMORYERR Convert FFS_MEMORYERR to -ENOMEM Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191024155327.1095907-9-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 03eac8d594738fc6a678a4df2176d17f9ee130f4 Author: Valdis Kletnieks Date: Thu Oct 24 11:53:18 2019 -0400 staging: exfat: Clean up return codes - FFS_INVALIDPATH Convert FFS_INVALIDPATH to -EINVAL Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191024155327.1095907-8-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit e0cb59bdd2b2d7e782a2ca44ce549409ce1961d2 Author: Anson Huang Date: Mon Oct 7 09:41:48 2019 +0800 arm64: dts: imx8qxp-mek: Enable scu key Enable scu key for i.MX8QXP MEK board. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit c76c4ad5470cd907ed9c432f0e8cabd924cc2b54 Author: Valdis Kletnieks Date: Thu Oct 24 11:53:17 2019 -0400 staging: exfat: Clean up return codes - FFS_FILEEXIST Convert FFS_FILEEXIST to -EEXIST Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191024155327.1095907-7-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 49dad0c189af24a0762bc759729bc92a56c7f096 Author: Anson Huang Date: Mon Oct 7 09:41:47 2019 +0800 arm64: dts: imx8qxp: Add scu key node Add scu key node for i.MX8QXP, disabled by default as it depends on board design. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit ab5a321da0082f1877dab619f56b966997dbc4fb Author: Valdis Kletnieks Date: Thu Oct 24 11:53:16 2019 -0400 staging: exfat: Clean up return codes - FFS_NAMETOOLONG Convert FFS_NOTNAMETOOLONG to -ENAMETOOLONG Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191024155327.1095907-6-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 7ca8049f09807004639dc7d44f1476ac6ef7c917 Author: Valdis Kletnieks Date: Thu Oct 24 11:53:15 2019 -0400 staging: exfat: Clean up return codes - FFS_PERMISSIONERR Convert FFS_PERMISSIONERR to -EPERM Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191024155327.1095907-5-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit df7098f84f7eff2cb0a669557f2519f1ee68a74e Author: Valdis Kletnieks Date: Thu Oct 24 11:53:14 2019 -0400 staging: exfat: Clean up return codes - FFS_DIRBUSY Convert FFS_DIRBUSY to -EBUSY Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191024155327.1095907-4-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 67f8224c3b52908c100311bfef9d0fb60ae5b449 Author: Valdis Kletnieks Date: Thu Oct 24 11:53:13 2019 -0400 staging: exfat: Clean up return codes - FFS_NOTFOUND Convert FFS_NOTFOUND to -ENOENT Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191024155327.1095907-3-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 2f2e28866bd7bb1b4d73e338d22100d4edf710ec Author: Valdis Kletnieks Date: Thu Oct 24 11:53:12 2019 -0400 staging: exfat: Clean up return codes - FFS_FULL Start cleaning up the odd scheme of return codes, starting with FFS_FULL Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191024155327.1095907-2-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman commit 764b5b5e704e1d991ad168a5e0c47d1dfc0018b1 Author: Michal Vokáč Date: Thu Oct 3 08:12:56 2019 +0200 ARM: dts: imx6dl-yapp4: Enable the MPR121 touchkey controller on Hydra Add the touch keyboard present on Hydra board. The controller is connected only using I2C lines. The interrupt line is not available hence we use the polling mode. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit f306bde1860d1572993e4a6f48b02944d0a7e918 Author: Sudip Mukherjee Date: Fri Oct 18 11:18:54 2019 +0100 staging: rtl8723bs: reduce stack usage of cfg80211_rtw_scan The build of xtensa allmodconfig gives warning of: In function 'cfg80211_rtw_scan': warning: the frame size of 1040 bytes is larger than 1024 bytes Allocate memory for ssid dynamically to reduce the stack usage, as an added benifit we can remove the memset by using kzalloc while allocating memory. Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20191018101854.31876-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9f665d82039187072263e22294ab6e290312f6bf Author: Sudip Mukherjee Date: Fri Oct 18 11:48:37 2019 +0100 staging: rtl8723bs: reduce stack usage of rtw_cfg80211_unlink_bss The build of xtensa allmodconfig gives warning of: In function 'rtw_cfg80211_unlink_bss': warning: the frame size of 1136 bytes is larger than 1024 bytes Instead of having 'select_network' structure as a variable use it as a pointer. Signed-off-by: Sudip Mukherjee Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20191018104837.23246-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit be88dae8e2a9cda2b900040318c70a3d3c5b21cd Author: Aliasgar Surti Date: Thu Oct 17 19:48:26 2019 +0530 staging: rtl8723bs: removed unwanted if..else condition There is use of if..elseif..else condition which has same logic in all three blocks. Removed if..else block and placed log message instead that. Signed-off-by: Aliasgar Surti Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/1571321906-15074-1-git-send-email-aliasgar.surti500@gmail.com Signed-off-by: Greg Kroah-Hartman commit bb84f28f0d865a4c0b4a7405683d32748b27d03a Author: Alexandru Ardelean Date: Wed Oct 16 09:58:34 2019 +0300 staging: rtl8188eu: make efuse_power_switch() function static The `rtl8188eu` driver is built as a kmod in order to avoid symbol conflicts (at link-time) with other Realtek drivers. Internally, we use this driver as builtin [vs kmod], and we've identified the `efuse_power_switch()` symbol to be conflicting at link-time with the one from the `rtlwifi` driver. An alternative solution would have been to rename the function, but it doesn't look like it's being used outside of this driver, so just make it static. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20191016065834.12186-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 390e4f967299179d5b43a3d265150500d8fe2986 Author: YueHaibing Date: Wed Oct 16 16:58:33 2019 +0800 staging: mt7621-dma: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191016085833.26376-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit f1ca32696aea8e65b0b5122b494b52e128e66630 Author: YueHaibing Date: Wed Oct 16 17:01:36 2019 +0800 staging: netlogic: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191016090136.20620-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 6fc77fc892d87fcaf2d06129d1fadaea09f4e3dd Author: YueHaibing Date: Wed Oct 16 17:03:05 2019 +0800 staging: ralink-gdma: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191016090305.23392-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7e28fc4759e7ede9fa8b8c6708be24d7bbabcd44 Author: Krzysztof Kozlowski Date: Wed Oct 2 18:43:12 2019 +0200 ARM: dts: imx: Rename "iram" node to "sram" The device node name should reflect generic class of a device so rename the "iram" node to "sram". This will be also in sync with upcoming DT schema. No functional change. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 3820729160440158a014add69cc0d371061a96b2 Author: Martin KaFai Lau Date: Thu Oct 24 17:18:11 2019 -0700 bpf: Prepare btf_ctx_access for non raw_tp use case This patch makes a few changes to btf_ctx_access() to prepare it for non raw_tp use case where the attach_btf_id is not necessary a BTF_KIND_TYPEDEF. It moves the "btf_trace_" prefix check and typedef-follow logic to a new function "check_attach_btf_id()" which is called only once during bpf_check(). btf_ctx_access() only operates on a BTF_KIND_FUNC_PROTO type now. That should also be more efficient since it is done only one instead of every-time check_ctx_access() is called. "check_attach_btf_id()" needs to find the func_proto type from the attach_btf_id. It needs to store the result into the newly added prog->aux->attach_func_proto. func_proto btf type has no name, so a proper name should be stored into "attach_func_name" also. v2: - Move the "btf_trace_" check to an earlier verifier phase (Alexei) Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191025001811.1718491-1-kafai@fb.com commit f873b66119f2d6fc7b932a68df8d77a26357bab6 Author: Luo Jiaxing Date: Thu Oct 24 22:08:25 2019 +0800 scsi: hisi_sas: Record the phy down event in debugfs The number of phy down reflects the quality of the link between SAS controller and disk. In order to allow the user to confirm the link quality of the system, we record the number of phy down for each phy. The user can check the current phy down count by reading the debugfs file corresponding to the specific phy, or clear the phy down count by writing 0 to the debugfs file. Link: https://lore.kernel.org/r/1571926105-74636-19-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit cabe7c10c97a0857a9fb14b6c772ab784947995d Author: Luo Jiaxing Date: Thu Oct 24 22:08:24 2019 +0800 scsi: hisi_sas: Delete the debugfs folder of hisi_sas when the probe fails Although if the debugfs initialization fails, we will delete the debugfs folder of hisi_sas, but we did not consider the scenario where debugfs was successfully initialized, but the probe failed for other reasons. We found out that hisi_sas folder is still remain after the probe failed. When probe fail, we should delete debugfs folder to avoid the above issue. Link: https://lore.kernel.org/r/1571926105-74636-18-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 8f6432986e610612688dc77c2683657d7289546f Author: Luo Jiaxing Date: Thu Oct 24 22:08:23 2019 +0800 scsi: hisi_sas: Add ability to have multiple debugfs dumps We use the module parameter debugfs_dump_count to manage the upper limit of the memory block for multiple dumps. Link: https://lore.kernel.org/r/1571926105-74636-17-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 905ab01faf5fc81ba2fc46dddcd21ad5a2dd137b Author: Luo Jiaxing Date: Thu Oct 24 22:08:22 2019 +0800 scsi: hisi_sas: Add module parameter for debugfs dump count We still only use dump index #0 however. Link: https://lore.kernel.org/r/1571926105-74636-16-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit a70e33eae363e6f3e2ad9498daaccd231790f7f5 Author: Luo Jiaxing Date: Thu Oct 24 22:08:21 2019 +0800 scsi: hisi_sas: Allocate memory for multiple dumps of debugfs We add multiple dumps for debugfs, but only allocate memory this time and only dump #0. Link: https://lore.kernel.org/r/1571926105-74636-15-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 357e4fc7a933ed5bfbf1eb2fad9c198afe6a11e1 Author: Luo Jiaxing Date: Thu Oct 24 22:08:20 2019 +0800 scsi: hisi_sas: Add debugfs file structure for ITCT cache Create a file structure which was used to save the memory address for ITCT cache at debugfs. This structure is bound to the corresponding debugfs file, it can help callback function of debugfs file to get what it needs. Link: https://lore.kernel.org/r/1571926105-74636-14-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit b714dd8f36dc609dd4b0078cf5563978134838ed Author: Luo Jiaxing Date: Thu Oct 24 22:08:19 2019 +0800 scsi: hisi_sas: Add debugfs file structure for IOST cache Create a file structure which was used to save the memory address for IOST cache at debugfs. This structure is bound to the corresponding debugfs file, it can help callback function of debugfs file to get what it needs. Link: https://lore.kernel.org/r/1571926105-74636-13-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 0161d55f23a1e020e5e6892177caf92a61e5c161 Author: Luo Jiaxing Date: Thu Oct 24 22:08:18 2019 +0800 scsi: hisi_sas: Add debugfs file structure for ITCT Create a file structure which was used to save the memory address for ITCT at debugfs. This structure is bound to the corresponding debugfs file, it can help callback function of debugfs file to get what it needs. Link: https://lore.kernel.org/r/1571926105-74636-12-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit e15f2e2dff5b809dce923839f21362d6b0d06b1e Author: Luo Jiaxing Date: Thu Oct 24 22:08:17 2019 +0800 scsi: hisi_sas: Add debugfs file structure for IOST Create a file structure which was used to save the memory address for IOST at debugfs. This structure is bound to the corresponding debugfs file, it can help callback function of debugfs file to get what it needs. Link: https://lore.kernel.org/r/1571926105-74636-11-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 1f66e1fd26bddb4c9275b61934dbaaf4b0b0bd79 Author: Luo Jiaxing Date: Thu Oct 24 22:08:16 2019 +0800 scsi: hisi_sas: Add debugfs file structure for port Create a file structure which was used to save the memory address and phy pointer for port at debugfs. This structure is bound to the corresponding debugfs file, it can help callback function of debugfs file to get what it need. Link: https://lore.kernel.org/r/1571926105-74636-10-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit c61163981076476e0bcf2d453dcddf8db605f115 Author: Luo Jiaxing Date: Thu Oct 24 22:08:15 2019 +0800 scsi: hisi_sas: Add debugfs file structure for registers Create a file structure which was used to save the memory address and hisi_hba pointer for REGS at debugfs. This structure is bound to the corresponding debugfs file, it can help callback function of debugfs file to get what it need. Link: https://lore.kernel.org/r/1571926105-74636-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 1b54c4db725d875dcae645a3da74625b9e4b3bdf Author: Luo Jiaxing Date: Thu Oct 24 22:08:14 2019 +0800 scsi: hisi_sas: Add debugfs file structure for DQ Create a file structure which was used to save the memory address and DQ pointer for DQ at debugfs. This structure is bound to the corresponding debugfs file, it can help callback function of debugfs file to get what it need. Link: https://lore.kernel.org/r/1571926105-74636-8-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 35ea630b2bad4fe9f7db34624eaab3663bb2cb42 Author: Luo Jiaxing Date: Thu Oct 24 22:08:13 2019 +0800 scsi: hisi_sas: Add debugfs file structure for CQ Create a file structure which was used to save the memory address and CQ pointer for CQ at debugfs. This structure is bound to the corresponding debugfs file, it can help callback function of debugfs file to get what it need. Link: https://lore.kernel.org/r/1571926105-74636-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 d28ed83b769378deefa82456f962e14a4b0afadf Author: Luo Jiaxing Date: Thu Oct 24 22:08:12 2019 +0800 scsi: hisi_sas: Add timestamp for a debugfs dump It's useful to know when the dump occurred, so add a timestamp file for this. Link: https://lore.kernel.org/r/1571926105-74636-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 550c0d89d52d3bec5c299f69b4ed5d2ee6b8a9a6 Author: Xiang Chen Date: Thu Oct 24 22:08:11 2019 +0800 scsi: hisi_sas: Replace in_softirq() check in hisi_sas_task_exec() For IOs from upper layer, preemption may be disabled as it may be called by function __blk_mq_delay_run_hw_queue which will call get_cpu() (it disables preemption). So if flags HISI_SAS_REJECT_CMD_BIT is set in function hisi_sas_task_exec(), it may disable preempt twice after down() and up() which will cause following call trace: BUG: scheduling while atomic: fio/60373/0x00000002 Call trace: dump_backtrace+0x0/0x150 show_stack+0x24/0x30 dump_stack+0xa0/0xc4 __schedule_bug+0x68/0x88 __schedule+0x4b8/0x548 schedule+0x40/0xd0 schedule_timeout+0x200/0x378 __down+0x78/0xc8 down+0x54/0x70 hisi_sas_task_exec.isra.10+0x598/0x8d8 [hisi_sas_main] hisi_sas_queue_command+0x28/0x38 [hisi_sas_main] sas_queuecommand+0x168/0x1b0 [libsas] scsi_queue_rq+0x2ac/0x980 blk_mq_dispatch_rq_list+0xb0/0x550 blk_mq_do_dispatch_sched+0x6c/0x110 blk_mq_sched_dispatch_requests+0x114/0x1d8 __blk_mq_run_hw_queue+0xb8/0x130 __blk_mq_delay_run_hw_queue+0x1c0/0x220 blk_mq_run_hw_queue+0xb0/0x128 blk_mq_sched_insert_requests+0xdc/0x208 blk_mq_flush_plug_list+0x1b4/0x3a0 blk_flush_plug_list+0xdc/0x110 blk_finish_plug+0x3c/0x50 blkdev_direct_IO+0x404/0x550 generic_file_read_iter+0x9c/0x848 blkdev_read_iter+0x50/0x78 aio_read+0xc8/0x170 io_submit_one+0x1fc/0x8d8 __arm64_sys_io_submit+0xdc/0x280 el0_svc_common.constprop.0+0xe0/0x1e0 el0_svc_handler+0x34/0x90 el0_svc+0x10/0x14 ... To solve the issue, check preemptible() to avoid disabling preempt multiple when flag HISI_SAS_REJECT_CMD_BIT is set. Link: https://lore.kernel.org/r/1571926105-74636-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 8fa9a7bd3099a96194d767ce681c68dbcb8a957e Author: Xiang Chen Date: Thu Oct 24 22:08:10 2019 +0800 scsi: hisi_sas: use wait_for_completion_timeout() when clearing ITCT When injecting 2bit ecc errors, it will cause confusion inside SAS controller which needs host reset to recover it. If a device is gone at the same times inject 2bit ecc errors, we may not receive the ITCT interrupt so it will wait for completion in clear_itct_v3_hw() all the time. And host reset will also not occur because it can't require hisi_hba->sem, so the system will be suspended. To solve the issue, use wait_for_completion_timeout() instead of wait_for_completion(), and also don't mark the gone device as SAS_PHY_UNUSED when device gone. Link: https://lore.kernel.org/r/1571926105-74636-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 65a3b8bd56942dc988b8c05615bd3f510a10012b Author: Xiang Chen Date: Thu Oct 24 22:08:09 2019 +0800 scsi: hisi_sas: Set the BIST init value before enabling BIST If set the BIST init value after enabling BIST, there may be still some few error bits. According to the process, need to set the BIST init value before enabling BIST. Fixes: 97b151e75861 ("scsi: hisi_sas: Add BIST support for phy loopback") Link: https://lore.kernel.org/r/1571926105-74636-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 35160421b63d4753a72e9f72ebcdd9d6f88f84b9 Author: Xiang Chen Date: Thu Oct 24 22:08:08 2019 +0800 scsi: hisi_sas: Don't create debugfs dump folder twice Due to a merge error, we attempt to create 2x debugfs dump folders, which fails: [ 861.101914] debugfs: Directory 'dump' with parent '0000:74:02.0' already present! This breaks the dump function. To fix, remove the superfluous attempt to create the folder. Fixes: 7ec7082c57ec ("scsi: hisi_sas: Add hisi_sas_debugfs_alloc() to centralise allocation") Link: https://lore.kernel.org/r/1571926105-74636-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 1125c70a92383be7fc9f4b4413a6b269288e1b24 Author: Geert Uytterhoeven Date: Thu Oct 24 17:26:33 2019 +0200 scsi: Fix various misspellings of "connect" Fix misspellings of "disonnect", "reconnect", "connection", "connected", and "disconnection". Link: https://lore.kernel.org/r/20191024152633.30404-1-geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Signed-off-by: Martin K. Petersen commit d44c897c391ed55b7cede2f58d40b0a6e0c5763b Author: Geert Uytterhoeven Date: Thu Oct 24 17:25:43 2019 +0200 scsi: isci: Spelling s/configruation/configuration/ Fix misspelling of "configuration". Link: https://lore.kernel.org/r/20191024152543.30310-1-geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Signed-off-by: Martin K. Petersen commit 5bb2f743cdaa6da618e77a6aab5c38b46072365b Author: Tomas Henzl Date: Thu Oct 24 17:28:35 2019 +0200 scsi: mpt3sas: change allocation option From an interrupt handler path memory may be allocated using GFP_KERNEL, replace it with GFP_ATOMIC. _base_interrupt->_scsih_io_done->_scsih_smart_predicted_fault Link: https://lore.kernel.org/r/20191024152835.6177-1-thenzl@redhat.com Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit 906ca6353ac09696c1bf0892513c8edffff5e0a6 Author: Dan Carpenter Date: Tue Oct 22 13:23:24 2019 +0300 scsi: esas2r: unlock on error in esas2r_nvram_read_direct() This error path is missing an unlock. Fixes: 26780d9e12ed ("[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver") Link: https://lore.kernel.org/r/20191022102324.GA27540@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit e07734fdee7800b5ca7f24fa4e3f0b0ea13845ba Author: YueHaibing Date: Mon Oct 21 22:20:42 2019 +0800 scsi: cxgb4i: remove set but not used variable 'ppmax' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:2076:15: warning: variable ppmax set but not used [-Wunused-but-set-variable] drivers/target/iscsi/cxgbit/cxgbit_ddp.c:300:15: warning: variable ppmax set but not used [-Wunused-but-set-variable] It is not used since commit a248384e6420 ("cxgb4/libcxgb/cxgb4i/cxgbit: enable eDRAM page pods for iSCSI") Link: https://lore.kernel.org/r/20191021142042.30964-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit d6c9b31ac3064fbedf8961f120a4c117daa59932 Author: Dan Carpenter Date: Sat Oct 19 11:59:13 2019 +0300 scsi: csiostor: Don't enable IRQs too early These are called with IRQs disabled from csio_mgmt_tmo_handler() so we can't call spin_unlock_irq() or it will enable IRQs prematurely. Fixes: a3667aaed569 ("[SCSI] csiostor: Chelsio FCoE offload driver") Link: https://lore.kernel.org/r/20191019085913.GA14245@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 5314995e370e46ac12d12378544ad4575b6f6672 Author: Saurav Girepunje Date: Thu Oct 24 08:39:01 2019 +0530 scsi: lpfc: lpfc_nvmet: Fix Use plain integer as NULL pointer Replace assignment of 0 to pointer with NULL assignment. Link: https://lore.kernel.org/r/20191024030857.GA12097@saurav Signed-off-by: Saurav Girepunje Acked-by: Dick Kennedy Signed-off-by: Martin K. Petersen commit 2c7fb469024f0da98f4d078fcf570786ec87c384 Author: Saurav Girepunje Date: Thu Oct 24 08:27:29 2019 +0530 scsi: lpfc: lpfc_attr: Fix Use plain integer as NULL pointer Replace assignment of 0 to pointer with NULL assignment. Link: https://lore.kernel.org/r/20191024025726.GA31421@saurav Signed-off-by: Saurav Girepunje Acked-by: Dick Kennedy Signed-off-by: Martin K. Petersen commit 74acec655f560ef721c1e191732af2bcb094b537 Author: James Smart Date: Fri Oct 18 14:18:32 2019 -0700 scsi: lpfc: Update lpfc version to 12.6.0.0 Update lpfc version to 12.6.0.0 Link: https://lore.kernel.org/r/20191018211832.7917-17-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit b4b3417cf6c8051f9f210cd694e6342fb008795c Author: James Smart Date: Fri Oct 18 14:18:31 2019 -0700 scsi: lpfc: Add additional discovery log messages When debugging a recent discovery customer problem it was very hard to tell what was happening with the existing discovery log messages. To fully debug the issue additional log messages were necessary. Add or extend log messages so that sufficient information is present for debugging. Link: https://lore.kernel.org/r/20191018211832.7917-16-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 83c6cb1ae8be6948b5fa43b2450a176dba80688b Author: James Smart Date: Fri Oct 18 14:18:30 2019 -0700 scsi: lpfc: Add FC-AL support to lpe32000 models In the past, the lpe32000 models, based their main support being for 32G, and as FC-AL is not supported in the FC standards past 8G, did not support FC-AL operation. This patch adds private-loop FC-AL support for the LPE32000 adapters when a link is 8G or below. To avoid conditions where link rate may change, which would cause non-connectivity to the AL device, FC-AL mode must become a persistent setting and the link kept at a speed supporting FC-AL. The patch: - Adds a pls attribute indicating whether the adapter properly supports FC-AL. - Adds support for the adapter to indicate that topology should be fixed and the topology types to be configured. - Adds a pt attribute to report the persistent topology if present. Link: https://lore.kernel.org/r/20191018211832.7917-15-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e7d8595272553c27846946601b72e4c581f9712a Author: James Smart Date: Fri Oct 18 14:18:29 2019 -0700 scsi: lpfc: Add FA-WWN Async Event reporting Add decode support for adapter Async Events which report FA-WWN configuration errors. Link: https://lore.kernel.org/r/20191018211832.7917-14-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit b1dfa5411ea440f7a5bd65176259ffb3bfbdecf0 Author: James Smart Date: Fri Oct 18 14:18:28 2019 -0700 scsi: lpfc: Add log macros to allow print by serverity or verbosity setting Add two new macros to aid in message logging: Both macros print a message if the corresponding lpfc verbosity setting is set or the kernel log level is WARNING or more critical. One macro is for use with a phba structure, the other with a vport structure. [mkp: typo] Link: https://lore.kernel.org/r/20191018211832.7917-13-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 95bfc6d8ad86a76c89f62bb466f740b0fc05a667 Author: James Smart Date: Fri Oct 18 14:18:27 2019 -0700 scsi: lpfc: Make FW logging dynamically configurable Currently, the FW logging facility is a load/boot time parameter which requires the driver to be unloaded/reloaded or the system rebooted in order to change its configuration. Convert the logging facility to allow dynamic enablement and configuration. Specifically: - Convert the feature so that it can be enabled dynamically via an attribute. Additionally, the size of the buffer can be configured dynamically. - Add locks around states that now may be changing. - Tie the feature into debugfs so that the logs can be read at any time. Link: https://lore.kernel.org/r/20191018211832.7917-12-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 8156d378c4cbf8ca19df5d8f0c610ce6923b61e2 Author: James Smart Date: Fri Oct 18 14:18:26 2019 -0700 scsi: lpfc: Revise interrupt coalescing for missing scenarios The existing "auto eq delay" mechanism was sometimes skipping over an EQ, not ramping the coalescing down under light load fast enough, and in other cases never kicked in as cpu sharing by multiple vectors didn't quite add up right. Tweak the interrupt mechanism such that: - Add a flag to the EQ to force checking for colaescing values when being serviced in the interrupt handler. The flag will be set by any CQ bound to the EQ whenever the number of CQ elements process in a single scan meets or exceeds the hardware queue notify level. E.g. there's a significant number of completions happening. - In the heartbeat work item that checks coalescing: - Replace the structure that was counting the number of EQs that interrupted on a single cpu with a new structure that looks at the EQ to see whether EQ currently has a coalescing value (thus it should be re-evaluate) or was marked by the new flag indicating heavy completions. - When a cpu, which may be servicing multiple vectors, had at least 1 EQ that should be checked, a new coalescing delay is calculated based on the number of interrupts that occurred on the cpu. - The new coalescing value is then applied to the EQs that had interrupted on the cpu. Link: https://lore.kernel.org/r/20191018211832.7917-11-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ea85a20cd54f3b09880f6c08994b059f0d114a11 Author: James Smart Date: Fri Oct 18 14:18:25 2019 -0700 scsi: lpfc: Remove lock contention target write path Lower IOps performance with write operations. Perf tool shows lock contention in dma_pool_alloc and dma_pool_free related to the txrdy_payload_pool. The allocations are for dma buffers for XFER_RDY's, which actually are not needed for the FCP_TRECEIVE command as the command contents are used by the adapter to generate the IU. Remove the allocations and the associated buffer pool. Rather than leaving NULLs in buffer pointer locations, set command and sgl to indicate skipped SGLE indexes. Link: https://lore.kernel.org/r/20191018211832.7917-10-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 22770cbabf6bb77a397d9f11d41f97667dd0caa2 Author: James Smart Date: Fri Oct 18 14:18:24 2019 -0700 scsi: lpfc: Slight fast-path performance optimizations Slightly rework some error check code paths for better streamlining. Added compiler unlikely hints to allow slightly better optimization of the fast-path. Removed a few pointer checks that were obviously already valid. Link: https://lore.kernel.org/r/20191018211832.7917-9-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit f84f8f93f01feb64fdda8dd6c72d1b7dc24ad11d Author: James Smart Date: Fri Oct 18 14:18:23 2019 -0700 scsi: lpfc: fix coverity error of dereference after null check Log message conditional upon vport being NULL dereferences vport to determine log verbose setting. Changed to use lpfc_print_log which uses phba to determine the active log verbose setting. Fixes: 43bfea1bffb6 ("scsi: lpfc: Fix coverity errors on NULL pointer checks") Link: https://lore.kernel.org/r/20191018211832.7917-8-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 91a52b617cdb8bf6d298892101c061d438b84a19 Author: James Smart Date: Fri Oct 18 14:18:22 2019 -0700 scsi: lpfc: Fix hardlockup in lpfc_abort_handler In lpfc_abort_handler, the lock acquire order is hbalock (irqsave), buf_lock (irq) and ring_lock (irq). The issue is that in two places the locks are released out of order - the buf_lock and the hbalock - resulting in the cpu preemption/lock flags getting restored out of order and deadlocking the cpu. Fix the unlock order by fully releasing the hbalocks as well. CC: Zhangguanghui Link: https://lore.kernel.org/r/20191018211832.7917-7-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 324e1c402069e8d277d2a2b18ce40bde1265b96a Author: James Smart Date: Fri Oct 18 14:18:21 2019 -0700 scsi: lpfc: Fix bad ndlp ptr in xri aborted handling In cases where I/O may be aborted, such as driver unload or link bounces, the system will crash based on a bad ndlp pointer. Example: RIP: 0010:lpfc_sli4_abts_err_handler+0x15/0x140 [lpfc] ... lpfc_sli4_io_xri_aborted+0x20d/0x270 [lpfc] lpfc_sli4_sp_handle_abort_xri_wcqe.isra.54+0x84/0x170 [lpfc] lpfc_sli4_fp_handle_cqe+0xc2/0x480 [lpfc] __lpfc_sli4_process_cq+0xc6/0x230 [lpfc] __lpfc_sli4_hba_process_cq+0x29/0xc0 [lpfc] process_one_work+0x14c/0x390 Crash was caused by a bad ndlp address passed to I/O indicated by the XRI aborted CQE. The address was not NULL so the routine deferenced the ndlp ptr. The bad ndlp also caused the lpfc_sli4_io_xri_aborted to call an erroneous io handler. Root cause for the bad ndlp was an lpfc_ncmd that was aborted, put on the abort_io list, completed, taken off the abort_io list, sent to lpfc_release_nvme_buf where it was put back on the abort_io list because the lpfc_ncmd->flags setting LPFC_SBUF_XBUSY was not cleared on the final completion. Rework the exchange busy handling to ensure the flags are properly set for both scsi and nvme. Fixes: c490850a0947 ("scsi: lpfc: Adapt partitioned XRI lists to efficient sharing") Cc: # v5.1+ Link: https://lore.kernel.org/r/20191018211832.7917-6-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit feff8b3d84d3d9570f893b4d83e5eab6693d6a52 Author: James Smart Date: Fri Oct 18 14:18:20 2019 -0700 scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices When operating in private loop mode, PLOGI exchanges are racing and the driver tries to abort it's PLOGI. But the PLOGI abort ends up terminating the login with the other end causing the other end to abort its PLOGI as well. Discovery never fully completes. Fix by disabling the PLOGI abort when private loop and letting the state machine play out. Link: https://lore.kernel.org/r/20191018211832.7917-5-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 27f3efd637ce4859a44a7ca730c72392b4111c26 Author: James Smart Date: Fri Oct 18 14:18:19 2019 -0700 scsi: lpfc: Fix lockdep errors in sli_ringtx_put Fix lockdep error in __lpfc_sli_ringtx_put(): The hbalock is valid for sli3, but not for sli4. Change lockdep to look at ring lock if sli4. Also update comment in __lpfc_sli_issue_iocb_s4() to reflect proper lock. Note: lockdep check is already correct. Link: https://lore.kernel.org/r/20191018211832.7917-4-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 0a5ce731977da1cc6d8d6d7df01c2e53ebb81796 Author: James Smart Date: Fri Oct 18 14:18:18 2019 -0700 scsi: lpfc: Fix reporting of read-only fw error errors When the adapter FW is administratively set to RO mode, a FW update triggered by the driver's sysfs attribute will fail. Currently, the driver's logging mechanism does not properly parse the adapter return codes and print a meaningful message. This oversight prevents quick diagnosis in the field. Parse the adapter return codes for Write_Object and write an appropriate message to the system console. [mkp: typo] Link: https://lore.kernel.org/r/20191018211832.7917-3-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 97a9ed3b3ae8eae27a231129c0939151879d5f2b Author: James Smart Date: Fri Oct 18 14:18:17 2019 -0700 scsi: lpfc: fix lpfc_nvmet_mrq to be bound by hdw queue count Currently, lpfc_nvmet_mrq is always scaled back to the min(lpfc_nvmet_mrq, lpfc_irq_chann). There's no reason to reduce it to the number of interrupt vectors. Rather, it should be scaled down based on the number of hardware queues for the system (if lower than max of 16). Change scaling to use hardware queue count rather than interrupt vector count. Link: https://lore.kernel.org/r/20191018211832.7917-2-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit b7412c6b2203da6187569de600a3d2e8630f9caf Author: José Roberto de Souza Date: Wed Oct 23 14:49:32 2019 -0700 drm/i915/display/psr: Print in debugfs if PSR is not enabled because of sink Right now if sink reported any PSR error or if it fails to acknowledge the PSR wakeup it sets a flag and do not attempt to enable PSR anymore. That is the safest approach to avoid repetitive glitches and allowed us to have PSR enabled by default. But from time to time even good PSR panels have a PSR error, causing tests to fail. And for now we are not yet to the point were we could try to recover from PSR errors, so lets add this information to the debugfs so IGT can check if PSR is disabled because of sink errors or not and eliminate this noise from CI runs. Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Cc: Matt Roper Cc: Ap Kamal Signed-off-by: José Roberto de Souza Reviewed-by: Ramalingam C Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191023214932.94679-1-jose.souza@intel.com commit d506a65d56fd5287cf9219de7f3af5004b38fc6f Author: Matt Roper Date: Tue Oct 8 14:17:16 2019 -0700 drm/i915: Catch GTT fault errors for gen11+ planes Gen11+ has more hardware planes than gen9 so we need to test additional pipe interrupt register bits to recognize any GTT faults that happen on these extra planes. Bspec: 50335 Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191008211716.8391-1-matthew.d.roper@intel.com commit 26ed19adbab16410460bd8b90ccc7430229a0b4a Author: Masahiro Yamada Date: Tue Jun 18 01:21:23 2019 +0900 libfdt: reduce the number of headers included from libfdt_env.h Currently, libfdt_env.h includes just for INT_MAX. pulls in a lots of broat. Thanks to commit 54d50897d544 ("linux/kernel.h: split *_MAX and *_MIN macros into "), can be replaced with . This saves including dozens of headers. Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring commit 772d1dea1f6cbff55963e04f52341b3cc5e710c9 Author: Tapani Pälli Date: Thu Oct 24 13:38:58 2019 +0300 drm/i915/tgl: whitelist PS_(DEPTH|INVOCATION)_COUNT As with commit 3fe0107e45ab, this change fixes multiple tests that are using the invocation counts. Documentation doesn't list the workaround for TGL but applying it fixes the tests. Signed-off-by: Tapani Pälli Acked-by: Chris Wilson Reviewed-by: Lionel Landwerlin Reviewed-by: Mika Kuoppala Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191024103858.28113-2-mika.kuoppala@linux.intel.com commit 6b441c628e178629bbd38ddd8b97dfeff93c2bb6 Author: Mika Kuoppala Date: Thu Oct 24 14:03:31 2019 +0300 drm/i915: Remove nonpriv flags when srm/lrm On testing the whitelists, using any of the nonpriv flags when trying to access the register offset will lead to failure. Define address mask to get the mmio offset in order to guard against any current and future flag usage. v2: apply also on scrub_whitelisted_registers (Lionel) Cc: Tapani Pälli Cc: Chris Wilson Cc: Lionel Landwerlin Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Reviewed-by: Lionel Landwerlin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191024110331.8935-1-mika.kuoppala@linux.intel.com commit 9c6694bd96af42d69f493ca7ed844bcbcbcc76b1 Merge: dd85b4922de1 6a5cb53aaa4e Author: Jens Axboe Date: Thu Oct 24 16:31:57 2019 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.5/drivers Pull MD changes from Song. * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: no longer compare spare disk superblock events in super_load md: improve handling of bio with REQ_PREFLUSH in md_flush_request() md/bitmap: avoid race window between md_bitmap_resize and bitmap_file_clear_bit md/raid0: Fix an error message in raid0_make_request() commit 6a5cb53aaa4ef515ddeffa04ce18b771121127b4 Author: Yufen Yu Date: Wed Oct 16 16:00:03 2019 +0800 md: no longer compare spare disk superblock events in super_load We have a test case as follow: mdadm -CR /dev/md1 -l 1 -n 4 /dev/sd[a-d] \ --assume-clean --bitmap=internal mdadm -S /dev/md1 mdadm -A /dev/md1 /dev/sd[b-c] --run --force mdadm --zero /dev/sda mdadm /dev/md1 -a /dev/sda echo offline > /sys/block/sdc/device/state echo offline > /sys/block/sdb/device/state sleep 5 mdadm -S /dev/md1 echo running > /sys/block/sdb/device/state echo running > /sys/block/sdc/device/state mdadm -A /dev/md1 /dev/sd[a-c] --run --force When we readd /dev/sda to the array, it started to do recovery. After offline the other two disks in md1, the recovery have been interrupted and superblock update info cannot be written to the offline disks. While the spare disk (/dev/sda) can continue to update superblock info. After stopping the array and assemble it, we found the array run fail, with the follow kernel message: [ 172.986064] md: kicking non-fresh sdb from array! [ 173.004210] md: kicking non-fresh sdc from array! [ 173.022383] md/raid1:md1: active with 0 out of 4 mirrors [ 173.022406] md1: failed to create bitmap (-5) [ 173.023466] md: md1 stopped. Since both sdb and sdc have the value of 'sb->events' smaller than that in sda, they have been kicked from the array. However, the only remained disk sda is in 'spare' state before stop and it cannot be added to conf->mirrors[] array. In the end, raid array assemble and run fail. In fact, we can use the older disk sdb or sdc to assemble the array. That means we should not choose the 'spare' disk as the fresh disk in analyze_sbs(). To fix the problem, we do not compare superblock events when it is a spare disk, as same as validate_super. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 775d78319f1ceb32be8eb3b1202ccdc60e9cb7f1 Author: David Jeffery Date: Mon Sep 16 13:15:14 2019 -0400 md: improve handling of bio with REQ_PREFLUSH in md_flush_request() If pers->make_request fails in md_flush_request(), the bio is lost. To fix this, pass back a bool to indicate if the original make_request call should continue to handle the I/O and instead of assuming the flush logic will push it to completion. Convert md_flush_request to return a bool and no longer calls the raid driver's make_request function. If the return is true, then the md flush logic has or will complete the bio and the md make_request call is done. If false, then the md make_request function needs to keep processing like it is a normal bio. Let the original call to md_handle_request handle any need to retry sending the bio to the raid driver's make_request function should it be needed. Also mark md_flush_request and the make_request function pointer as __must_check to issue warnings should these critical return values be ignored. Fixes: 2bc13b83e629 ("md: batch flush requests.") Cc: stable@vger.kernel.org # # v4.19+ Cc: NeilBrown Signed-off-by: David Jeffery Reviewed-by: Xiao Ni Signed-off-by: Song Liu commit fadcbd2901a0f7c8721f3bdb69eac95c272dc8ed Author: Guoqing Jiang Date: Thu Sep 26 13:53:50 2019 +0200 md/bitmap: avoid race window between md_bitmap_resize and bitmap_file_clear_bit We need to move "spin_lock_irq(&bitmap->counts.lock)" before unmap previous storage, otherwise panic like belows could happen as follows. [ 902.353802] sdl: detected capacity change from 1077936128 to 3221225472 [ 902.616948] general protection fault: 0000 [#1] SMP [snip] [ 902.618588] CPU: 12 PID: 33698 Comm: md0_raid1 Tainted: G O 4.14.144-1-pserver #4.14.144-1.1~deb10 [ 902.618870] Hardware name: Supermicro SBA-7142G-T4/BHQGE, BIOS 3.00 10/24/2012 [ 902.619120] task: ffff9ae1860fc600 task.stack: ffffb52e4c704000 [ 902.619301] RIP: 0010:bitmap_file_clear_bit+0x90/0xd0 [md_mod] [ 902.619464] RSP: 0018:ffffb52e4c707d28 EFLAGS: 00010087 [ 902.619626] RAX: ffe8008b0d061000 RBX: ffff9ad078c87300 RCX: 0000000000000000 [ 902.619792] RDX: ffff9ad986341868 RSI: 0000000000000803 RDI: ffff9ad078c87300 [ 902.619986] RBP: ffff9ad0ed7a8000 R08: 0000000000000000 R09: 0000000000000000 [ 902.620154] R10: ffffb52e4c707ec0 R11: ffff9ad987d1ed44 R12: ffff9ad0ed7a8360 [ 902.620320] R13: 0000000000000003 R14: 0000000000060000 R15: 0000000000000800 [ 902.620487] FS: 0000000000000000(0000) GS:ffff9ad987d00000(0000) knlGS:0000000000000000 [ 902.620738] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 902.620901] CR2: 000055ff12aecec0 CR3: 0000001005207000 CR4: 00000000000406e0 [ 902.621068] Call Trace: [ 902.621256] bitmap_daemon_work+0x2dd/0x360 [md_mod] [ 902.621429] ? find_pers+0x70/0x70 [md_mod] [ 902.621597] md_check_recovery+0x51/0x540 [md_mod] [ 902.621762] raid1d+0x5c/0xeb0 [raid1] [ 902.621939] ? try_to_del_timer_sync+0x4d/0x80 [ 902.622102] ? del_timer_sync+0x35/0x40 [ 902.622265] ? schedule_timeout+0x177/0x360 [ 902.622453] ? call_timer_fn+0x130/0x130 [ 902.622623] ? find_pers+0x70/0x70 [md_mod] [ 902.622794] ? md_thread+0x94/0x150 [md_mod] [ 902.622959] md_thread+0x94/0x150 [md_mod] [ 902.623121] ? wait_woken+0x80/0x80 [ 902.623280] kthread+0x119/0x130 [ 902.623437] ? kthread_create_on_node+0x60/0x60 [ 902.623600] ret_from_fork+0x22/0x40 [ 902.624225] RIP: bitmap_file_clear_bit+0x90/0xd0 [md_mod] RSP: ffffb52e4c707d28 Because mdadm was running on another cpu to do resize, so bitmap_resize was called to replace bitmap as below shows. PID: 38801 TASK: ffff9ad074a90e00 CPU: 0 COMMAND: "mdadm" [exception RIP: queued_spin_lock_slowpath+56] [snip] -- -- #5 [ffffb52e60f17c58] queued_spin_lock_slowpath at ffffffff9c0b27b8 #6 [ffffb52e60f17c58] bitmap_resize at ffffffffc0399877 [md_mod] #7 [ffffb52e60f17d30] raid1_resize at ffffffffc0285bf9 [raid1] #8 [ffffb52e60f17d50] update_size at ffffffffc038a31a [md_mod] #9 [ffffb52e60f17d70] md_ioctl at ffffffffc0395ca4 [md_mod] And the procedure to keep resize bitmap safe is allocate new storage space, then quiesce, copy bits, replace bitmap, and re-start. However the daemon (bitmap_daemon_work) could happen even the array is quiesced, which means when bitmap_file_clear_bit is triggered by raid1d, then it thinks it should be fine to access store->filemap since counts->lock is held, but resize could change the storage without the protection of the lock. Cc: Jack Wang Cc: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit e3fc3f3d0943b126f76b8533960e4168412d9e5a Author: Dan Carpenter Date: Sat Sep 21 09:00:31 2019 +0300 md/raid0: Fix an error message in raid0_make_request() The first argument to WARN() is supposed to be a condition. The original code will just print the mdname() instead of the full warning message. Fixes: c84a1372df92 ("md/raid0: avoid RAID0 data corruption due to layout confusion.") Signed-off-by: Dan Carpenter Signed-off-by: Song Liu commit 503a64635d5ef7351657c78ad77f8b5ff658d5fc Merge: fb8d1d7e3d34 6e6583c91f94 Author: David S. Miller Date: Thu Oct 24 15:21:58 2019 -0700 Merge branch 'DPAA-Ethernet-changes' Madalin Bucur says: ==================== DPAA Ethernet changes v3: add newline at the end of error messages v2: resending with From: field matching signed-off-by Here's a series of changes for the DPAA Ethernet, addressing minor or unapparent issues in the codebase, adding probe ordering based on a recently added DPAA QMan API, removing some redundant code. ==================== Signed-off-by: David S. Miller commit 6e6583c91f947973b77995ffc487f7166c257911 Author: Madalin Bucur Date: Wed Oct 23 12:08:46 2019 +0300 dpaa_eth: add newline in dev_err() msg Newline was missing at the end of the error message. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 2579bce4cf62980f8d4f6bf7d485da85dc677a91 Author: Madalin Bucur Date: Wed Oct 23 12:08:45 2019 +0300 fsl/fman: remove unused struct member Remove unused struct member second_largest_buf_size. Also, an out of bounds access would have occurred in the removed code if there was only one buffer pool in use. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 060ad66f97954fa93ad495542c8a4f1b6c45aa34 Author: Madalin Bucur Date: Wed Oct 23 12:08:44 2019 +0300 dpaa_eth: change DMA device The DPAA Ethernet driver is using the FMan MAC as the device for DMA mapping. This is not actually correct, as the real DMA device is the FMan port (the FMan Rx port for reception and the FMan Tx port for transmission). Changing the device used for DMA mapping to the Fman Rx and Tx port devices. Signed-off-by: Madalin Bucur Signed-off-by: Laurentiu Tudor Signed-off-by: David S. Miller commit 681e38380c79e6ed00232385a613b2216dc23d22 Author: Laurentiu Tudor Date: Wed Oct 23 12:08:43 2019 +0300 fsl/fman: add API to get the device behind a fman port Add an API that retrieves the 'struct device' that the specified FMan port probed against. The new API will be used in a subsequent patch that corrects the DMA devices used by the dpaa_eth driver. Signed-off-by: Laurentiu Tudor Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 1076aaeeeacfa998c71bfad42e5ac65b490fc456 Author: Madalin Bucur Date: Wed Oct 23 12:08:42 2019 +0300 dpaa_eth: remove redundant code Condition was previously checked, removing duplicate code. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 5537b32985767632f0cba17706c2beb6ee76c089 Author: Laurentiu Tudor Date: Wed Oct 23 12:08:41 2019 +0300 dpaa_eth: defer probing after qbman If the DPAA 1 Ethernet driver gets probed before the QBMan driver it will cause a boot crash. Add predictability in the probing order by deferring the Ethernet driver probe after QBMan and portals by using the recently introduced QBMan APIs. Signed-off-by: Laurentiu Tudor Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 9b56beed1e8adc6b7b142bed5cf89531b9cf4a91 Author: Laurentiu Tudor Date: Wed Oct 23 12:08:40 2019 +0300 fsl/fman: don't touch liodn base regs reserved on non-PAMU SoCs The liodn base registers are specific to PAMU based NXP systems and are reserved on SMMU based ones. Don't access them unless PAMU is compiled in. Signed-off-by: Laurentiu Tudor Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit a4260ea49547aa0c84c353f9de5998a0315d89fe Author: Jernej Skrabec Date: Wed Oct 23 19:13:31 2019 -0300 media: sun4i: Add H3 deinterlace driver Allwinner H3 SoC contains deinterlace unit, which has several modes of operation - bypass, weave, bob and mixed (advanced) mode. I don't know how mixed mode works, but according to Allwinner it gives best results, so they use it exclusively. Currently this mode is also hardcoded here. For each interleaved frame queued, this driver produces 2 deinterlaced frames. Deinterlaced frames are based on 2 consequtive output buffers, except for the first 2, where same output buffer is given to peripheral as current and previous. There is no documentation for this core, so register layout and fixed values were taken from BSP driver. I'm not sure if maximum size of the image unit is capable to process is governed by size of "flag" buffers, frequency or it really is some HW limitation. Currently driver can process full HD image in ~15ms (7.5ms for each capture buffer), which allows to process 1920x1080@60i video smoothly in real time. Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec [hverkuil-cisco@xs4all.nl: add static to deinterlace_ioctl_ops] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 713e6a289f4244a6b063ef31689a9edc001ae398 Author: Jernej Skrabec Date: Wed Oct 23 19:13:30 2019 -0300 media: dt-bindings: media: Add Allwinner H3 Deinterlace binding Allwinner H3 Deinterlace core is used for deinterlacing interlaced video content. Core can also be found on some later SoCs, like H5 and R40. Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 76df2e6c7c782775e41153802489904ce3bd55b8 Author: Arthur Moraes do Lago Date: Tue Oct 1 21:46:33 2019 -0300 media: vimc: Implement debayer control for mean window size Add mean window size parameter for debayer filter as a control in vimc-debayer. vimc-debayer was patched to allow changing mean window parameter of the filter without needing to reload the driver. The parameter can now be set using a v4l2-ctl control(mean_window_size). Co-developed-by: Laís Pessine do Carmo Signed-off-by: Laís Pessine do Carmo Signed-off-by: Arthur Moraes do Lago Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b1f8e9316e790bcde517c5312eaaea4f696e0f75 Author: Dafna Hirschfeld Date: Wed Oct 9 12:53:14 2019 -0300 media: vimc: move the dev field of each entity to vimc_ent_dev Since the 'struct device *dev' field exists in each of the entity structs, it can be moved to the common struct vimc_ent_devevice. It is then used to replace 'pr_err' with 'dev_err' in the streamer code. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 23df45d038662da2b1e017cf38165a88dfd7f543 Author: Dafna Hirschfeld Date: Thu Oct 3 09:59:42 2019 -0300 media: vimc: embed the pads of entities in the entities' structs since the pads array is of known small size, there is no reason to allocate it separately. Instead, it is embedded in the entity struct. This also conforms to the media controller doc: 'Most drivers will embed the pads array in a driver-specific structure, avoiding dynamic allocation.' Signed-off-by: Dafna Hirschfeld [hverkuil-cisco@xs4all.nl: remove unused vimc_pads_init()] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ad1cec89db964cc3391fa67b1d1d93482727a439 Author: Dafna Hirschfeld Date: Wed Oct 9 16:09:26 2019 -0300 media: vimc: remove unused struct declaration vimc_platform_data the struct vimc_platform_data is not used anymore and can be removed. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit af2bdbbe2d4314a0dd85c4f7243d3ac7893078c4 Author: Dafna Hirschfeld Date: Tue Oct 22 05:46:08 2019 -0300 media: vimc: common: remove unused function 'vimc_pipeline_s_stream' The function 'vimc_pipeline_s_stream' is not used and can be removed. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b04de4e7a56caf40c6d84994f58a4e5e985a6cd Author: Dafna Hirschfeld Date: Tue Oct 22 05:46:07 2019 -0300 media: vimc: remove EXPORT_SYMBOL_GPL declarations vimc is a single kernel module and does not need to export any symbols therefore there is no need for these declarations. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4aa975cbd8775cd7b0e68531b2ff9a16e215181 Author: Dafna Hirschfeld Date: Mon Oct 7 10:50:03 2019 -0300 media: vimc: remove the helper function vimc_ent_sd_unregister since this function only calls v4l2_device_unregister_subdev, it is pointless. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9fb82aaa85d3d4b7be80a15dd0e740aab45bc491 Author: Dafna Hirschfeld Date: Mon Oct 7 10:50:02 2019 -0300 media: vimc: move media_entity_cleanup to release callbacks according to the docs, this function must be called during the cleanup phase after unregistering the entity. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 291aca4e7bdd87a01e21d90382fd0b231b280272 Author: Dafna Hirschfeld Date: Mon Oct 7 10:50:01 2019 -0300 media: vimc: sen: register subdevice only after initialization vimc_sen_add function first registers the subdevice and then calls tpg_alloc. If tpg_alloc fails it unregisters the subdevice and then frees vsen, this cause double free since the release callback that follows subdevice unregistration also frees vsen. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4996992c4f7410e9a43aa3047e8034756cece21a Author: Dafna Hirschfeld Date: Mon Oct 7 10:50:00 2019 -0300 media: vimc: cleanup code that assigns entity in entities array Since the add callback returns NULL on failure and the array is initialized to NULLs, there is no need for the intermediate assignment to local var. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 817d0b3278f52d4d20b9706e41c808287ee909e4 Author: Dafna Hirschfeld Date: Mon Oct 7 10:49:59 2019 -0300 media: vimc: initialize vim entity pointers to NULL since NULL value for vimc entity pointer indicates that entity creation failed and this is tested, the pointers should be initialized to NULL. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f3f5ba42c58d56d50f539854d8cc188944e96087 Author: Sean Young Date: Wed Oct 16 14:19:15 2019 -0300 media: imon: invalid dereference in imon_touch_event The touch timer is set up in intf1. If the second interface does not exist, the timer and touch input device are not setup and we get the following error, when touch events are reported via intf0. kernel BUG at kernel/time/timer.c:956! invalid opcode: 0000 [#1] SMP KASAN CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.0-rc1+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__mod_timer kernel/time/timer.c:956 [inline] RIP: 0010:__mod_timer kernel/time/timer.c:949 [inline] RIP: 0010:mod_timer+0x5a2/0xb50 kernel/time/timer.c:1100 Code: 45 10 c7 44 24 14 ff ff ff ff 48 89 44 24 08 48 8d 45 20 48 c7 44 24 18 00 00 00 00 48 89 04 24 e9 5a fc ff ff e8 ae ce 0e 00 <0f> 0b e8 a7 ce 0e 00 4c 89 74 24 20 e9 37 fe ff ff e8 98 ce 0e 00 RSP: 0018:ffff8881db209930 EFLAGS: 00010006 RAX: ffffffff86c2b200 RBX: 00000000ffffa688 RCX: ffffffff83efc583 RDX: 0000000000000100 RSI: ffffffff812f4d82 RDI: ffff8881d2356200 RBP: ffff8881d23561e8 R08: ffffffff86c2b200 R09: ffffed103a46abeb R10: ffffed103a46abea R11: ffff8881d2355f53 R12: dffffc0000000000 R13: 1ffff1103b64132d R14: ffff8881d2355f50 R15: 0000000000000006 FS: 0000000000000000(0000) GS:ffff8881db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f75e2799000 CR3: 00000001d3b07000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: imon_touch_event drivers/media/rc/imon.c:1348 [inline] imon_incoming_packet.isra.0+0x2546/0x2f10 drivers/media/rc/imon.c:1603 usb_rx_callback_intf0+0x151/0x1e0 drivers/media/rc/imon.c:1734 __usb_hcd_giveback_urb+0x1f2/0x470 drivers/usb/core/hcd.c:1654 usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1719 dummy_timer+0x120f/0x2fa2 drivers/usb/gadget/udc/dummy_hcd.c:1965 call_timer_fn+0x179/0x650 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x5e3/0x1490 kernel/time/timer.c:1786 __do_softirq+0x221/0x912 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x12f/0x500 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 RIP: 0010:default_idle+0x28/0x2e0 arch/x86/kernel/process.c:581 Code: 90 90 41 56 41 55 65 44 8b 2d 44 3a 8f 7a 41 54 55 53 0f 1f 44 00 00 e8 36 ee d0 fb e9 07 00 00 00 0f 00 2d fa dd 4f 00 fb f4 <65> 44 8b 2d 20 3a 8f 7a 0f 1f 44 00 00 5b 5d 41 5c 41 5d 41 5e c3 RSP: 0018:ffffffff86c07da8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: ffffffff86c2b200 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000006 RDI: ffffffff86c2ba4c RBP: fffffbfff0d85640 R08: ffffffff86c2b200 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x3b6/0x500 kernel/sched/idle.c:263 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:355 start_kernel+0x82a/0x864 init/main.c:784 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241 Modules linked in: Reported-by: syzbot+f49d12d34f2321cf4df2@syzkaller.appspotmail.com Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 33657a0a3eec844ebca3d12929e2dd2f57a7a1dc Author: Nishad Kamdar Date: Sun Sep 15 08:14:58 2019 -0300 media: tuners: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to media Drivers for Analog TV Tuners. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d3bec7fc117922b9cf7a2c5b784efd5357695448 Author: Sakari Ailus Date: Wed Oct 2 07:51:22 2019 -0300 media: smiapp: Rename update_mode as pll_blanking_update Rename the confusingly named smiapp_update_mode() function as smiapp_pll_blanking_update(). The function is used to calculate new PLL and blanking configuration after binning or scaling configuration has been changed. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 90c9e4a4dba9f4de331372e745fb1991c1faa598 Author: Sakari Ailus Date: Fri Oct 11 08:16:02 2019 -0300 media: smiapp: Register sensor after enabling runtime PM on the device Earlier it was possible that the parts of the driver that assumed runtime PM was enabled were being called before runtime PM was enabled in the driver's probe function. So enable runtime PM before registering the sub-device. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 579d1f7d4fb90b7d06be96ac67b4665dc0d1bcb7 Author: Sakari Ailus Date: Tue Oct 1 09:00:32 2019 -0300 media: smiapp: Use non-binned and binned limits correctly Use non-binned limits when binning is disabled and binned when they're enabled. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit da533bb0058b575958291b9296f1de7d1b1b5bc3 Author: Sakari Ailus Date: Tue Oct 1 08:46:51 2019 -0300 media: smiapp: Don't update sensor configuration during power-on init The sensor configuration since it was previously powered off was not changed, so no need to update the PLL configuration etc. What is necessary though is to re-apply the configuration to the sensor's registers. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f8c4352c1bef308578c2e310a37610db10c81332 Author: Sakari Ailus Date: Tue Oct 1 08:34:55 2019 -0300 media: smiapp: Move binning configuration to streaming start Only write the binning configuration at stream start. It has no effect otherwise. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b0388c0727679f9e96f999ca712e6a263ffc00fb Author: Sakari Ailus Date: Tue Oct 1 08:31:38 2019 -0300 media: smiapp: Don't get binning limits dynamically The driver implementation assumed the binning limits could change dynamically based on the binning configuration. This is not actually the case; these limits are static and suitable to be used with all binning configurations but possibly not optimal limit for many of those configurations. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4a9a75923acb7f6333a0f3c4090d20709710067a Author: Sakari Ailus Date: Thu Oct 17 08:17:05 2019 -0300 media: smiapp: Destroy sensor's mutex Destroy the mutex initialised by the driver in probe. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 33e17ea2d4f0519dfd82548cbfe9850fe3e64271 Author: Sakari Ailus Date: Tue Sep 24 07:03:56 2019 -0300 media: dt-bindings: smia: Remove documentation of nokia,nvm-size The nokia,nvm-size property was used to tell the size of the NVM memory accessible through the sensor's register interface. However, while the size isn't directly readable through the sensor's register interface, it can be detected reading the NVM memory until the selected page is no longer available. Thus remove this property. Signed-off-by: Sakari Ailus Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 941e1d36b5b69aa6efcbc8e2bdd0ad349b95d641 Author: Sakari Ailus Date: Tue Sep 24 04:31:05 2019 -0300 media: smiapp: Support probing NVM size The interface supports probing for the NVM size but this was not implemented in the driver. Do that now. This will also make nokia,nvm-size property redundant. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 23fc92fad8ff6829b3139c55d83b659020812016 Author: Sakari Ailus Date: Mon Sep 23 10:18:38 2019 -0300 media: smiapp: Don't poll for NVM ready on devices that don't need it Only some devices require polling for NVM ready. Do the polling only on devices that need it. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d5e550cf9f292ac889d9a686c4cb5fa040eeab7b Author: Sakari Ailus Date: Tue Sep 24 04:58:01 2019 -0300 media: smiapp: Add definitions for data transfer if capability bits The data transfer capability register was defined but its bits were not. Do that now. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e367095df32b5c8db762b17dd68a67ea0d9edfcf Author: Sakari Ailus Date: Mon Sep 23 10:15:11 2019 -0300 media: smiapp: Refactor reading NVM page Split out reading a single NVM page into a separate function. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a5b1d5413534607b05fb34470ff62bf395f5c8d0 Author: Sakari Ailus Date: Mon Sep 23 11:25:42 2019 -0300 media: smiapp: Fix error handling at NVM reading If NVM reading failed, the device was left powered on. Fix that. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 837c07ebb030bc3582c14907dd2b79ca9b0b6984 Author: Sakari Ailus Date: Mon Sep 23 10:05:37 2019 -0300 media: smiapp: Use the BIT macro where appropriate, remove useless definition The BIT macro is a better way to define register bits, for 1 << bit is risky for 32-bit registers. Also remove the definition of SMIAPP_DATA_TRANSFER_IF_1_CTRL_RD_EN which has a value of zero. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a0219deefe9ee5006a28d48522f76b217d198c51 Author: Chuhong Yuan Date: Tue Oct 15 10:59:15 2019 -0300 media: imx7-mipi-csis: Add a check for devm_regulator_get devm_regulator_get may return an error but mipi_csis_phy_init misses a check for it. This may lead to problems when regulator_set_voltage uses the unchecked pointer. This patch adds a check for devm_regulator_get to avoid potential risk. Signed-off-by: Chuhong Yuan Reviewed-by: Rui Miguel Silva Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 61c03b631b74a38ab53753f3ee971a55886d4843 Author: Chuhong Yuan Date: Thu Oct 17 22:46:56 2019 -0300 media: st-mipid02: add a check for devm_gpiod_get_optional mipid02_probe misses a check for devm_gpiod_get_optional and may miss the failure. Add a check to fix the problem. Signed-off-by: Chuhong Yuan Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 828dbc299278065b634e913d2700d254a3224853 Author: Manivannan Sadhasivam Date: Fri Oct 4 13:05:25 2019 -0300 media: i2c: Add IMX290 CMOS image sensor driver Add driver for Sony IMX290 CMOS image sensor driver. The driver only supports I2C interface for programming and MIPI CSI-2 for sensor output. [Sakari Ailus: Rewrapped a few lines over 80 chars a little.] Signed-off-by: Manivannan Sadhasivam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8a97a4676f8b1badcd9cfbed2b081342847bb1b1 Author: Manivannan Sadhasivam Date: Fri Oct 4 13:05:24 2019 -0300 media: dt-bindings: media: i2c: Add IMX290 CMOS sensor binding Add devicetree binding for IMX290 CMOS image sensor. Let's also add MAINTAINERS entry for the binding and driver. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c31e2febdeb2a58cfb1e37c73d411c8c3d75a72b Author: YueHaibing Date: Sun Oct 6 04:38:38 2019 -0300 media: i2c: ov5695: Fix randbuild error If VIDEO_OV5695 is y and V4L2_FWNODE is m, building fails: drivers/media/i2c/ov5695.o: In function `ov5695_probe': ov5695.c:(.text+0xf4c): undefined reference to `v4l2_async_register_subdev_sensor_common' Select V4L2_FWNODE like OV5675 does. Fixes: 623df5d710fe ("media: i2c: ov5695: Modify the function of async register subdev related devices") Signed-off-by: YueHaibing Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b8bf73136bae83ec5fef89a8df87619d61ccd3eb Author: Ricardo Ribalda Delgado Date: Mon Oct 7 10:28:56 2019 -0300 media: ad5820: Add support for ad5821 and ad5823 According to the datasheet, both AD5821 and AD5820 share a compatible register-set: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5821.pdf Some camera modules also refer that AD5823 is a replacement of AD5820: https://download.kamami.com/p564094-OV8865_DS.pdf Suggested-by: Pavel Machek Signed-off-by: Ricardo Ribalda Delgado Acked-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fda689b5b169f677c1665d4e2744cfcda21fad63 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 10:28:55 2019 -0300 media: ad5820: DT new compatible devices Document new compatible devices. Cc: devicetree@vger.kernel.org Signed-off-by: Ricardo Ribalda Delgado Reviewed-by: Rob Herring Acked-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1c7ae4a51298d52a21f63b2214657982036c7498 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 10:28:54 2019 -0300 media: ad5820: Add support for of-autoload Since kernel 4.16, i2c devices with DT compatible tag are modprobed using their DT modalias. Without this patch, if this driver is build as module it would never be autoprobed. There is no need to mask it with CONFIG_OF to allow ACPI loading, this also builds find with CONFIG_OF=n. Signed-off-by: Ricardo Ribalda Delgado Acked-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c01674e75a4193d1e23f509689e676634f067a0b Author: Ricardo Ribalda Delgado Date: Mon Oct 7 10:28:53 2019 -0300 media: ad5820: Add support for enable pin This patch adds support for a programmable enable pin. It can be used in situations where the ANA-vcc is not configurable (dummy-regulator), or just to have a more fine control of the power saving. The use of the enable pin is optional. Signed-off-by: Ricardo Ribalda Delgado Acked-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 219ea61a7acbb6279ce1a880feb8818a26d26bd6 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 10:28:52 2019 -0300 media: ad5820: DT new optional field enable-gpios Document new enable-gpio field. It can be used to disable the part without turning down its regulator. Cc: devicetree@vger.kernel.org Signed-off-by: Ricardo Ribalda Delgado Acked-by: Pavel Machek Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 801ef7c4919efba6b96b5aed1e72844ca69e26d3 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 10:28:51 2019 -0300 media: ad5820: Define entity function Without this patch, media_device_register_entity throws a warning: dev_warn(mdev->dev, "Entity type for entity %s was not initialized!\n", entity->name); Signed-off-by: Ricardo Ribalda Delgado Acked-by: Pavel Machek Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 981e445454531c9d5ac5d3fa8c0f1bd55262d001 Author: Benoit Parrot Date: Wed Oct 9 09:35:10 2019 -0300 media: ov5640: Make 2592x1944 mode only available at 15 fps The sensor data sheet clearly state that 2592x1944 only works at 15 fps make sure we don't try to miss configure the pll out of acceptable range. Signed-off-by: Benoit Parrot Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 92b9096c0fe02764561c8d972315d0e7509441bf Author: Benoit Parrot Date: Wed Oct 9 09:35:09 2019 -0300 media: ov5640: Fix 1920x1080 mode to remove extra enable/disable In the 1920x1080 register array an extra pair of reset ctrl disable re-enable was causing unwanted init delays. Signed-off-by: Benoit Parrot Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cc196e48e517d4810304db936cbe193b8954fa7e Author: Benoit Parrot Date: Wed Oct 9 09:35:08 2019 -0300 media: ov5640: add PIXEL_RATE control Add v4l2 controls to report the pixel rates of each mode. This is needed by some CSI2 receiver in order to perform proper DPHY configuration. Signed-off-by: Benoit Parrot Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ecfaec43e4999cb584135fccc09760be775b735c Author: Colin Ian King Date: Fri Oct 11 14:13:54 2019 -0300 media: lm3646: remove redundant assignment to variable rval The variable rval is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fdd5b6e3eff25b5ca9893dc0895589ae49b71008 Author: Janusz Krzysztofik Date: Sun Oct 13 09:50:50 2019 -0300 media: ov6650: Fix arbitrary selection of master clock rate A hardcoded 12 MHz master clock frequency has been assumed since conversion of the driver from soc_camera sensor to a standalone V4L2 subdevice by commit 23a52386fabe ("media: ov6650: convert to standalone v4l2 subdevice"). Fix it. Define a static table of supported master clock rates (fix misnamed symbol while being at it), then use v4l2_clk_get/set_rate() to obtain a clock rate matching one of those supported. On success, apply respective master clock hardware divisor provided by the matching element of the table. [Sakari Ailus: Initialize xclk to NULL.] Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 74f84922478bc8c932e30ac58936df86a78e0cb1 Author: Janusz Krzysztofik Date: Sun Oct 13 09:50:49 2019 -0300 media: ov6650: Drop unused .pclk_max field This field of the driver private structure is no longer used, drop it. Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 82d4a161df49476209b62e63dd775261ad07b37e Author: Janusz Krzysztofik Date: Sun Oct 13 09:50:48 2019 -0300 media: ov6650: Don't reapply pixel clock divisor on format change As calculation of pixel clock hardware divisor no longer depends on mbus format specific maximum pixel clock, there is no need to reapply the divisor on format change. Drop related code from ov6650_s_fmt() helper. Since a master clock hardware divisor, so far applied only together with the pixel clock divisor in a single operation, will no longer be applied from ov6650_s_fmt(), apply it, still using a hardcoded value for now, from ov6650_prog_dflt() helper so hardware is still initialised correctly on device probe. Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d898692e9ddb223210ab9a6e99d58b1fff9658a0 Author: Janusz Krzysztofik Date: Sun Oct 13 09:50:47 2019 -0300 media: ov6650: Simplify clock divisor calculation As appears from an analysis of to_clkrc() helper code after its pclk_limit argument has been dropped, its result no longer depends on another argument - pclk_max. Moreover, assuming that a constant value of FRAME_RATE_MAX is always used as a denominator of the only significant argument left - a struct v4l2_fract, the result in fact depends only on the numerator value of that argument. As a further consequence, it no longer makes sense to recalculate frame intervals by converting them forth and back with a GET_CLKRC_DIV(to_clkrc(tpf)) construct. Drop use of GET_CLKRC_DIV() on results of to_clkrc() where possible - use the frame interval value directly. Furthermore, replace the to_clkrc() helper function with a simple macro and update its users to always use FRAME_RATE_MAX as frame interval denominator and pass only its numerator as an argument. Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b1c5794382208c455c4e511c3f0b55565b69dd53 Author: Janusz Krzysztofik Date: Sun Oct 13 09:50:46 2019 -0300 media: ov6650: Drop obsolete .pclk_limit attribute That attribute used to be obtained from platform data by a soc_camera host interface and passed to the sensor driver for .s_mbus_fmt() video operation callback, later reused as .set_fmt() pad operation callback, to be able to limit frame rate. The driver stored that value in its private structure for further use from .g/s_parm(), later converted to g/s_frame_interval(). On conversion of the driver from soc_camera sensor to a standalone V4L2 subdevice by commit 23a52386fabe ("media: ov6650: convert to standalone v4l2 subdevice"), that attribute had been replaced by a constant and hardcoded to an arbitrarily chosen pixel clock limit. Drop it. Host interfaces can limit frame rate if needed by calling .s_frame_interval(). Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 57822068dd120386b98891cb151dc20107b63ba7 Author: Janusz Krzysztofik Date: Sun Oct 13 09:50:45 2019 -0300 media: ov6650: Fix stored frame interval not in sync with hardware The driver stores a frame interval value supposed to be in line with hardware state in a device private structure. Since the driver initial submission, the respective field of the structure has never been initialised on device probe. Moreover, if updated from .s_frame_interval(), a new value is stored before it is applied on hardware. If an error occurs during device update, the stored value may no longer reflect hardware state and consecutive calls to .g_frame_interval() may return incorrect information. Assuming a failed update of the device means its actual state hasn't changed, update the frame interval field of the device private structure with a new value only after it is successfully applied on hardware so it always reflects actual hardware state to the extent possible. Also, initialise the field with hardware default frame interval on device probe. Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cfc4652dee4a9435197e9859322ceef60a900e4d Author: Sebastian Andrzej Siewior Date: Tue Oct 15 16:18:17 2019 -0300 media: cec-gpio: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the Kconfig dependency to CONFIG_PREEMPTION. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a55cc9efa55ee5db15474d78bb2666469c6ac0c5 Author: Alexandre Courbot Date: Wed Oct 16 06:52:39 2019 -0300 media: Documentation: v4l: fix section depth The request API documentation introduced a new section which should have been a subsection. Fix this. Signed-off-by: Alexandre Courbot Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11893eb845679b7d3773b768950dbde246d43bfc Author: Fabio Estevam Date: Tue Oct 15 13:00:42 2019 -0300 media: imx.rst: Pass the v4l2-ctl configuration Pass the v4l2-ctl configuration for the imx6q-sabreauto PAL example for completeness and consistency. Suggested-by: Steve Longerbeam Signed-off-by: Fabio Estevam Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bdb5b5911c4e82b1b911c48f722a5a52ac48cf97 Author: Fabio Estevam Date: Tue Oct 15 13:00:41 2019 -0300 media: imx.rst: Provide instructions for the i.MX6DL sabreauto The i.MX6DL sabreauto has different numbering on the I2C bus and I2C muxes compared to the i.MX6Q as shown in the kernel log below: [ 5.159423] imx-media: ipu1_csi0_mux:5 -> ipu1_csi0:0 [ 5.164618] imx-media: ipu1_csi1_mux:5 -> ipu1_csi1:0 [ 5.169953] imx-media: adv7180 4-0021:0 -> ipu1_csi0_mux:4 To avoid confusion, add an entry that shows how to setup the links and configure the pads that are specific to the i.MX6DL sabreauto. Signed-off-by: Fabio Estevam Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f3398f328a5ca8926aee9f5b477d2984ada210a2 Author: Fabio Estevam Date: Tue Oct 15 13:00:40 2019 -0300 media: imx.rst: Provide a real example for the output format In the i.MX6Q sabreauto pipeline example, it is better to provide a real example for the output format, so do it just like in the previous lines for consistency. Signed-off-by: Fabio Estevam Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5ea537161d3ac227b4960ea588ebfb44a296a188 Author: Fabio Estevam Date: Tue Oct 15 13:00:39 2019 -0300 media: imx.rst: Specify the sabreauto variant Improve the documentation by specifying that the instructions are related to the i.MX6Q sabreauto variant. This avoids confusion if someone follows these steps on a i.MX6DL sabreauto, which has different numbering on the I2C bus and I2C muxes. Signed-off-by: Fabio Estevam Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4e383575a1313fbb706b141124053caaf13eb407 Author: Christophe JAILLET Date: Fri Oct 11 17:48:29 2019 -0300 media: i2c: adv7842: make array cri static and const, makes object smaller Don't populate the array 'cri' on the stack but instead make it static and const. Makes the object code smaller by 165 bytes. Turn the 2nd parameter of 'log_infoframe()' const accordingly. Before: text data bss dec hex filename 98533 20024 256 118813 1d01d drivers/media/i2c/adv7842.o After: text data bss dec hex filename 98304 20088 256 118648 1cf78 drivers/media/i2c/adv7842.o Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9b950ce05732ac103023c2a1a3b81778f4c06e2f Author: Colin Ian King Date: Fri Oct 11 15:57:46 2019 -0300 media: gspca: remove redundant assignment to variable ret The variable ret is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 05ff862e0ca5895174c2f28bc10f6dc3495ac0bd Author: Colin Ian King Date: Fri Oct 11 10:29:40 2019 -0300 media: ti-vpe: vpe: use r2y instead of y2r, copy-paste error There appears to be a copy-paste error on the access of csc_coeffs.y2r.r601.full.coeff, I believe csc_coeffs.2yr.r601.full.coeff should be used instead. This is a moot point as the code is never reached, but at least use the correct structure element. Addresses-Coverity: ("Copy-paste error") Fixes: 3ff3a712a9ea ("media: ti-vpe: vpe: don't rely on colorspace member for conversion") Signed-off-by: Colin Ian King Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b19c25f46745cd57715c32d3ace9c79d1426bebd Author: Fabio Estevam Date: Fri Oct 11 07:49:19 2019 -0300 media: adv7180: Only print 'chip found' message on successful probe Currently the "chip found" message is shown even in the case where the I2C address is wrongly passed in the device tree, or also in the case of probe failure, which is misleading. To avoid such problem, move this message after real I2C transactions have been successfully made and we are certain that the adv7180 is really present and probed. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2289adbfa559050d2a38bcd9caac1c18b800e928 Author: Navid Emamdoost Date: Wed Oct 9 12:01:47 2019 -0300 media: usb: fix memory leak in af9005_identify_state In af9005_identify_state when returning -EIO the allocated buffer should be released. Replace the "return -EIO" with assignment into ret and move deb_info() under a check. Fixes: af4e067e1dcf ("V4L/DVB (5625): Add support for the AF9005 demodulator from Afatech") Signed-off-by: Navid Emamdoost Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 69e3235d58260d3d03570271da314829f9486237 Author: Hans Verkuil Date: Wed Oct 9 11:49:19 2019 -0300 media: cec-pin: add 'received' callback Drivers that use the CEC pin framework have no way of processing messages themselves by providing the 'received' callback. This is present in cec_ops, but not in cec_pin_ops. Add support for this callback. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 65d270acb2d662c3346793663ac3a759eb4491b8 Author: Jae Hyun Yoo Date: Thu Sep 26 19:27:43 2019 -0300 media: aspeed: clear garbage interrupts CAPTURE_COMPLETE and FRAME_COMPLETE interrupts come even when these are disabled in the VE_INTERRUPT_CTRL register and eventually this behavior causes disabling irq itself like below: [10055.108784] irq 23: nobody cared (try booting with the "irqpoll" option) [10055.115525] CPU: 0 PID: 331 Comm: swampd Tainted: G W 5.3.0-4fde000-dirty-d683e2e #1 [10055.124565] Hardware name: Generic DT based system [10055.129355] Backtrace: [10055.131854] [<80107d7c>] (dump_backtrace) from [<80107fb0>] (show_stack+0x20/0x24) [10055.139431] r7:00000017 r6:00000001 r5:00000000 r4:9d51dc00 [10055.145120] [<80107f90>] (show_stack) from [<8074bf50>] (dump_stack+0x20/0x28) [10055.152361] [<8074bf30>] (dump_stack) from [<80150ffc>] (__report_bad_irq+0x40/0xc0) [10055.160109] [<80150fbc>] (__report_bad_irq) from [<80150f2c>] (note_interrupt+0x23c/0x294) [10055.168374] r9:015b6e60 r8:00000000 r7:00000017 r6:00000001 r5:00000000 r4:9d51dc00 [10055.176136] [<80150cf0>] (note_interrupt) from [<8014df1c>] (handle_irq_event_percpu+0x88/0x98) [10055.184835] r10:7eff7910 r9:015b6e60 r8:00000000 r7:9d417600 r6:00000001 r5:00000002 [10055.192657] r4:9d51dc00 r3:00000000 [10055.196248] [<8014de94>] (handle_irq_event_percpu) from [<8014df64>] (handle_irq_event+0x38/0x4c) [10055.205113] r5:80b56d50 r4:9d51dc00 [10055.208697] [<8014df2c>] (handle_irq_event) from [<80151f1c>] (handle_level_irq+0xbc/0x12c) [10055.217037] r5:80b56d50 r4:9d51dc00 [10055.220623] [<80151e60>] (handle_level_irq) from [<8014d4b8>] (generic_handle_irq+0x30/0x44) [10055.229052] r5:80b56d50 r4:00000017 [10055.232648] [<8014d488>] (generic_handle_irq) from [<8014d524>] (__handle_domain_irq+0x58/0xb4) [10055.241356] [<8014d4cc>] (__handle_domain_irq) from [<801021e4>] (avic_handle_irq+0x68/0x70) [10055.249797] r9:015b6e60 r8:00c5387d r7:00c5387d r6:ffffffff r5:9dd33fb0 r4:9d402380 [10055.257539] [<8010217c>] (avic_handle_irq) from [<80101e34>] (__irq_usr+0x54/0x80) [10055.265105] Exception stack(0x9dd33fb0 to 0x9dd33ff8) [10055.270152] 3fa0: 015d0530 00000000 00000000 015d0538 [10055.278328] 3fc0: 015d0530 015b6e60 00000000 00000000 0052c5d0 015b6e60 7eff7910 7eff7918 [10055.286496] 3fe0: 76ce5614 7eff7908 0050e2f4 76a3a08c 20000010 ffffffff [10055.293104] r5:20000010 r4:76a3a08c [10055.296673] handlers: [10055.298967] [<79f218a5>] irq_default_primary_handler threaded [<1de88514>] aspeed_video_irq [10055.307344] Disabling IRQ #23 To fix this issue, this commit makes the interrupt handler clear these garbage interrupts. This driver enables and uses only COMP_COMPLETE interrupt instead for frame handling. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5b3f3c41c5c791c1c22cd91655e7ef4b2a1dff7c Author: Jae Hyun Yoo Date: Fri Sep 13 15:11:05 2019 -0300 media: aspeed: set hsync and vsync polarities to normal before starting mode detection Sometimes it detects a weird resolution such as 1024x287 when the actual resolution is 1024x768. To resolve such an issue, this commit adds clearing for hsync and vsync polarity register bits at the beginning of the first mode detection. This is recommended in the datasheet. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0e78795e95c540bc49c2e094103932eb6a06e6c8 Author: Jae Hyun Yoo Date: Fri Sep 13 15:11:04 2019 -0300 media: aspeed: refine hsync/vsync polarity setting logic To prevent inaccurate detections of resolution, this commit enables clearing of hsync/vsync polarity bits based on probed sync state. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 918c1fe9fbbe46fcf56837ff21f0ef96424e8b29 Author: Zhenzhong Duan Date: Wed Oct 23 09:57:14 2019 +0800 cpuidle: Do not unset the driver if it is there already Fix __cpuidle_set_driver() to check if any of the CPUs in the mask has a driver different from drv already and, if so, return -EBUSY before updating any cpuidle_drivers per-CPU pointers. Fixes: 82467a5a885d ("cpuidle: simplify multiple driver support") Cc: 3.11+ # 3.11+ Signed-off-by: Zhenzhong Duan [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki commit 2c2a83d329b89c74063580bad95bcb595dc09535 Merge: 31d851407f90 159e48560f51 Author: Rafael J. Wysocki Date: Thu Oct 24 23:12:55 2019 +0200 Merge back earlier cpuidle material for v5.5. commit 86caab29da78961d73e489554c8b2573fae523d5 Author: Paul Kocialkowski Date: Tue Oct 22 12:26:54 2019 -0300 media: cedrus: Add HEVC/H.265 decoding support This introduces support for HEVC/H.265 to the Cedrus VPU driver, with both uni-directional and bi-directional prediction modes supported. Field-coded (interlaced) pictures, custom quantization matrices and 10-bit output are not supported at this point. Signed-off-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit de06f289283298e2938445019999cec46435375c Author: Paul Kocialkowski Date: Tue Oct 22 12:26:53 2019 -0300 media: pixfmt: Document the HEVC slice pixel format Document the current state of the HEVC slice pixel format. The format will need to evolve in the future, which is why it is not part of the public API. Signed-off-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 256fa3920874b0f1f4cb79ad6766493a22187153 Author: Paul Kocialkowski Date: Tue Oct 22 12:26:52 2019 -0300 media: v4l: Add definitions for HEVC stateless decoding This introduces the required definitions for HEVC decoding support with stateless VPUs. The controls associated to the HEVC slice format provide the required meta-data for decoding slices extracted from the bitstream. They are not exported to the public V4L2 API since reworking this API will likely be needed for covering various use-cases and new hardware. Multi-slice decoding is exposed as a valid decoding mode to match current H.264 support but it is not yet implemented. The interface comes with the following limitations: * No custom quantization matrices (scaling lists); * Support for a single temporal layer only; * No slice entry point offsets support; * No conformance window support; * No VUI parameters support; * No support for SPS extensions: range, multilayer, 3d, scc, 4 bits; * No support for PPS extensions: range, multilayer, 3d, scc, 4 bits. Signed-off-by: Paul Kocialkowski [hverkuil-cisco@xs4all.nl: use 1ULL in flags defines in hevc-ctrls.h] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c3b32900fbf5178473c6b39260e891e19067edc2 Author: Paul Kocialkowski Date: Tue Oct 22 12:26:51 2019 -0300 media: cedrus: Remove unnecessary parenthesis around DIV_ROUND_UP DIV_ROUND_UP's first argument doesn't need to be wrapped in parenthesis since that is already being taken care of in the macro's definition. Signed-off-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 06eff2150d4db991ca236f3d05a9dc0101475aea Author: Paul Kocialkowski Date: Tue Oct 22 12:26:50 2019 -0300 media: cedrus: Fix undefined shift with a SHIFT_AND_MASK_BITS macro We need to shift and mask values at different occasions to fill up cedrus registers. This was done using macros that don't explicitly treat arguments as unsigned, leading to possibly undefined behavior. Introduce the SHIFT_AND_MASK_BITS macro and use it where possible. In cases where it doesn't apply as-is, explicitly cast to unsigned instead. This macro should be moved to include/linux/bits.h eventually. Signed-off-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 960a02765a7d636bf09518c0b1bebcd2aaa0166e Merge: fcf371fd7db5 b08a0c577518 Author: Olof Johansson Date: Thu Oct 24 13:31:27 2019 -0700 Merge tag 'omap-for-v5.5/ti-sysc-drop-pdata-v2-signed-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Drop legacy platform data for omaps for v5.5 This series of changes continues dropping legacy platform data for omaps. With the proper device tree configuration in place in the dts files for ti-sysc interconnect target module driver, we can drop the related platform data and legacy ti,hwmods custom property. Most of the patches in this series drop platform data and custom dts property one device class and one SoC at time. This way we can easily revert one patch at a time in case of unexpected issues if the fix is not trivial. For am335x musb, we need to first update the device tree to probe with ti-sysc interconnect target module driver. And then the following patches drop the legacy platform data. Note that this series depends on earlier ti-sysc related driver changes * tag 'omap-for-v5.5/ti-sysc-drop-pdata-v2-signed-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (40 commits) ARM: OMAP2+: Drop legacy platform data for am335x musb ARM: dts: Drop pointless status changing for am3 musb ARM: dts: Probe am335x musb with ti-sysc ARM: OMAP2+: Drop legacy platform data for musb on omap4 ARM: OMAP2+: Drop legacy platform data for omap4 mcasp ARM: OMAP2+: Drop legacy platform data for am3 and am4 mcasp ARM: OMAP2+: Drop legacy platform data for dra7 rng ARM: OMAP2+: Drop legacy platform data for am3 and am4 rng ARM: OMAP2+: Drop legacy platform data for omap4 hdq1w ARM: OMAP2+: Drop legacy platform data for dra7 hdq1w ARM: OMAP2+: Drop legacy platform data for am4 hdq1w ARM: OMAP2+: Drop legacy platform data for omap5 mcbsp ARM: OMAP2+: Drop legacy platform data for omap4 mcbsp ARM: OMAP2+: Drop legacy platform data for omap5 wdt ARM: OMAP2+: Drop legacy platform data for dra7 wdt ARM: OMAP2+: Drop legacy platform data for am3 and am4 wdt ARM: dts: Drop custom hwmod property for omap5 mmc ARM: dts: Drop custom hwmod property for am4 mmc ARM: dts: Drop custom hwmod property for am3 mmc ARM: dts: Drop custom hwmod property for omap5 i2c ... Link: https://lore.kernel.org/r/pull-1571934890-285615@atomide.com-3 Signed-off-by: Olof Johansson commit fcf371fd7db5085d670aea8a5e4501f29ee74a2b Merge: 71dd33b90119 fedc8844d500 Author: Olof Johansson Date: Thu Oct 24 13:25:30 2019 -0700 Merge tag 'omap-for-v5.5/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Device tree changes for omaps for v5.5 This series of changes adds support for few new boards, moves remaining ti wilink bluetooth users to use the serdev driver, and improves support for existing devices: - Add support for NetCAN Plus devices - Configure wilink bluetooth for logicpd-torpedo and omap3-igep - Switch to using generic LCD panel for logicpd-torpedo and increase camera pixel clock - Configure droid4 for 300mA USB host mode and move to a common file to start adding support for droid bionic - Rename ocmcram node to sram * tag 'omap-for-v5.5/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: add DTS for NetCom Plus 4xx and 8xx device series ARM: dts: add DTS for NetCom Plus 1xx and 2xx device series ARM: dts: add DTS for NetCAN Plus devices ARM: dts: omap: Rename "ocmcram" node to "sram" ARM: dts: logicpd-torpedo-37xx-devkit: Increase camera pixel clock ARM: dts: am: Rename "ocmcram" node to "sram" ARM: dts: logicpd-torpedo: Disable Bluetooth Serial DMA ARM: dts: IGEP: Add WiLink UART node ARM: dts: LogicPD Torpedo: Add WiLink UART node ARM: dts: logicpd-torpedo-37xx-devkit-28: Reference new DRM panel ARM: dts: logicpd-torpedo-baseboard: Reduce video regulator chatter ARM: dts: Add minimal support for Droid Bionic xt875 ARM: dts: omap4-droid4: Allow 300mA current for USB peripherals ARM: dts: Use level interrupt for omap4 & 5 wlcore Link: https://lore.kernel.org/r/pull-1571934890-285615@atomide.com-2 Signed-off-by: Olof Johansson commit cd4744645959ebfc97e4b0c676006d2d76d34f25 Merge: becbe95e434e bc794744cdc5 Author: Olof Johansson Date: Thu Oct 24 13:25:07 2019 -0700 Merge tag 'omap-for-v5.5/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SoC changes for omaps for v5.5 This series of changes contains SoC related clean-up, and some PM improvments: - SoC clean-up to drop unused enable_wakeup and disable_wakeup, simplify clkdm_clock_enable and disable, and few sparse fixes - Drop pdata-quirks for TI bluetooth, this is now handled by a serdev driver - A series of PM changes to re-enable core oswr (open switch retention) for omap4 that got disabled earlier because of various gpio-omap issues that have been fixed earlier this year. We want to do this in small steps for the pwrdm_set_logic_retst() changes so we can identify the domain in case of unexpected issues - A series of PM changes to configure voltage controller for droid4. Eventually the voltage controller configuration should use device tree, but we want to get things working first. These changes bring down down the idle power consumption for droid4 with LCD blanked, WLAN connected, USB disabled, and modem disabled to about 32 to 35mW from about 39 to 45 mW * tag 'omap-for-v5.5/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (24 commits) ARM: OMAP2+: Remove duplicated include from pmic-cpcap.c ARM: OMAP2+: pdata-quirks: drop TI_ST/KIM support ARM: OMAP2+: make omap44xx_sha0_hwmod and omap44xx_l3_main_2__des static ARM: OMAP2+: prm44xx: make prm_{save,restore}_context static ARM: OMAP2+: make dra7xx_sha0_hwmod static ARM: OMAP2+: do not export am43xx_control functions ARM: OMAP2+: Configure voltage controller for cpcap to low-speed ARM: OMAP2+: Configure voltage controller for retention ARM: OMAP2+: Make some functions static ARM: OMAP2+: Simplify code for clkdm_clock_enable and disable ARM: OMAP2+: Drop unused enable_wakeup and disable_wakeup ARM: OMAP2+: Initialize voltage controller for omap4 ARM: OMAP2+: Allow core oswr for omap4 ARM: OMAP2+: Allow per oswr for omap4 ARM: OMAP2+: Configure voltage controller for cpcap ARM: OMAP2+: Update 4430 voltage controller operating points ARM: OMAP2+: Remove bogus warnings for machines without twl PMIC ARM: OMAP2+: Drop bogus wkup domain oswr setting ARM: OMAP2+: Remove unused wakeup_cpu ARM: dts: Use level interrupt for omap4 & 5 wlcore ... Link: https://lore.kernel.org/r/pull-1571934890-285615@atomide.com Signed-off-by: Olof Johansson commit 5063f48bbbd87d3f309ed7c447609307e5b66731 Author: Ap Kamal Date: Wed Oct 23 13:55:28 2019 +0530 drm/i915: Making loglevel of PSR2/SU logs same. 'Link CRC error' will now have same error level as other PSR2 errors like 'RFB storage error' and 'VSC SDP uncorrectable error'. Signed-off-by: Ap Kamal Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/1571819128-3264-1-git-send-email-kamal.ap@intel.com commit 49c4868ab01cbe9bf06e23d5d65c8afea97ecf3f Author: Stephan Gerhold Date: Wed Oct 23 18:56:17 2019 +0200 drm/msm/dsi: Implement qcom, dsi-phy-regulator-ldo-mode for 28nm PHY The DSI PHY regulator supports two regulator modes: LDO and DCDC. This mode can be selected using the "qcom,dsi-phy-regulator-ldo-mode" device tree property. However, at the moment only the 20nm PHY driver actually implements that option. Add a check in the 28nm PHY driver to program the registers correctly for LDO mode. Tested-by: Nikita Travkin # l8150 Signed-off-by: Stephan Gerhold Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191023165617.28738-1-stephan@gerhold.net commit a713af394cf382a30dd28a1015cbe572f1b9ca75 Author: Aleksa Sarai Date: Thu Oct 17 02:50:01 2019 +1100 cgroup: pids: use atomic64_t for pids->limit Because pids->limit can be changed concurrently (but we don't want to take a lock because it would be needlessly expensive), use atomic64_ts instead. Fixes: commit 49b786ea146f ("cgroup: implement the PIDs subsystem") Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Aleksa Sarai Signed-off-by: Tejun Heo commit 12a280c7286857119cf0d88c487f695e3a1c0912 Author: Lyude Paul Date: Thu Jun 20 17:59:25 2019 -0400 drm/dp_mst: Add topology ref history tracking for debugging For very subtle mistakes with topology refs, it can be rather difficult to trace them down with the debugging info that we already have. I had one such issue recently while trying to implement suspend/resume reprobing for MST, and ended up coming up with this. Inspired by Chris Wilson's wakeref tracking for i915, this adds a very similar feature to the DP MST helpers, which allows for partial tracking of topology refs for both ports and branch devices. This is a lot less advanced then wakeref tracking: we merely keep a count of all of the spots where a topology ref has been grabbed or dropped, then dump out that history in chronological order when a port or branch device's topology refcount reaches 0. So far, I've found this incredibly useful for debugging topology refcount errors. Since this has the potential to be somewhat slow and loud, we add an expert kernel config option to enable or disable this feature, CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS. Changes since v1: * Don't forget to destroy topology_ref_history_lock Changes since v4: * Correct order of kref_put()/topology_ref_history_unlock - we can't unlock the history after kref_put() since the memory might have been freed by that point * Don't print message on allocation error failures, the kernel already does this for us Changes since v5: * Get rid of some leftover usages of %px * Remove a leftover empty return; statement Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-15-lyude@redhat.com commit 07f047e3fe33aefa44c34ed797b79f0415244202 Author: Jarkko Nikula Date: Thu Oct 24 13:57:26 2019 +0300 i2c: i801: Add support for Intel Comet Lake PCH-H Add support for another Intel Comet Lake variant. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit e0c61c04791a3500060023b0dfc35d06b0508028 Author: Jarkko Nikula Date: Thu Oct 24 13:57:25 2019 +0300 i2c: i801: Add support for Intel Jasper Lake Add support for SMBus controller on Intel Jasper Lake PCH-N. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 6f85f73821f6af4de4429ab2f2f7958dbd81cb90 Author: Lyude Paul Date: Mon Jun 17 19:57:33 2019 -0400 drm/dp_mst: Add basic topology reprobing when resuming Finally! For a very long time, our MST helpers have had one very annoying issue: They don't know how to reprobe the topology state when coming out of suspend. This means that if a user has a machine connected to an MST topology and decides to suspend their machine, we lose all topology changes that happened during that period. That can be a big problem if the machine was connected to a different topology on the same port before resuming, as we won't bother reprobing any of the ports and likely cause the user's monitors not to come back up as expected. So, we start fixing this by teaching our MST helpers how to reprobe the link addresses of each connected topology when resuming. As it turns out, the behavior that we want here is identical to the behavior we want when initially probing a newly connected MST topology, with a couple of important differences: - We need to be more careful about handling the potential races between events from the MST hub that could change the topology state as we're performing the link address reprobe - We need to be more careful about handling unlikely state changes on ports - such as an input port turning into an output port, something that would be far more likely to happen in situations like the MST hub we're connected to being changed while we're suspend Both of which have been solved by previous commits. That leaves one requirement: - We need to prune any MST ports in our in-memory topology state that were present when suspending, but have not appeared in the post-resume link address response from their parent branch device Which we can now handle in this commit by modifying drm_dp_send_link_address(). We then introduce suspend/resume reprobing by introducing drm_dp_mst_topology_mgr_invalidate_mstb(), which we call in drm_dp_mst_topology_mgr_suspend() to traverse the in-memory topology state to indicate that each mstb needs it's link address resent and PBN resources reprobed. On resume, we start back up &mgr->work and have it reprobe the topology in the same way we would on a hotplug, removing any leftover ports that no longer appear in the topology state. Changes since v4: * Split indenting changes in drm_dp_mst_topology_mgr_resume() into a separate patch * Only fire hotplugs when something has actually changed after a link address probe * Don't try to change port->connector at all on ports, just throw out ports that need their connectors removed to make things easier. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-14-lyude@redhat.com commit d20ebea8f0fabaac0048c7102a6befe37c2bb9c4 Author: Lyude Paul Date: Tue Jul 16 18:22:16 2019 -0400 drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology Since we're going to be reprobing the entire topology state on resume now using sideband transactions, we need to ensure that we actually have short HPD irqs enabled before calling drm_dp_mst_topology_mgr_resume(). So, do that. Changes since v3: * Fix typo in comments Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Acked-by: Alex Deucher Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-13-lyude@redhat.com commit 6857f879f98a276912dbccedfff89e94fbde565c Author: Lyude Paul Date: Fri Jul 12 19:27:02 2019 -0400 drm/amdgpu: Iterate through DRM connectors correctly Currently, every single piece of code in amdgpu that loops through connectors does it incorrectly and doesn't use the proper list iteration helpers, drm_connector_list_iter_begin() and drm_connector_list_iter_end(). Yeesh. So, do that. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Alex Deucher Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-12-lyude@redhat.com commit ac0de16a38a9ec7026ca96132e3883c564497068 Author: Lyude Paul Date: Mon Sep 30 19:03:29 2019 -0400 drm/nouveau: Resume hotplug interrupts earlier Currently, we enable hotplug detection only after we re-enable the display. However, this is too late if we're planning on sending sideband messages during the resume process - which we'll need to do in order to reprobe the topology on resume. So, enable hotplug events before reinitializing the display. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-11-lyude@redhat.com commit 09e530657e1c982d3dbc5e4302bf9207950c3d0a Author: Lyude Paul Date: Wed Jul 3 18:35:37 2019 -0400 drm/nouveau: Don't grab runtime PM refs for HPD IRQs In order for suspend/resume reprobing to work, we need to be able to perform sideband communications during suspend/resume, along with runtime PM suspend/resume. In order to do so, we also need to make sure that nouveau doesn't bother grabbing a runtime PM reference to do so, since otherwise we'll start deadlocking runtime PM again. Note that we weren't able to do this before, because of the DP MST helpers processing UP requests from topologies in the same context as drm_dp_mst_hpd_irq() which would have caused us to open ourselves up to receiving hotplug events and deadlocking with runtime suspend/resume. Now that those requests are handled asynchronously, this change should be completely safe. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Ben Skeggs Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-10-lyude@redhat.com commit 79413ed4a1b7c9c19f9caa375a06d86c9c045ffb Author: Lyude Paul Date: Wed Oct 9 15:14:59 2019 -0400 drm/dp_mst: Lessen indenting in drm_dp_mst_topology_mgr_resume() Does what it says on the tin. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-9-lyude@redhat.com commit dad7d84f883571dddb686c426cfd2533f58e7c27 Author: Lyude Paul Date: Wed Oct 16 17:50:15 2019 -0400 drm/dp_mst: Don't forget to update port->input in drm_dp_mst_handle_conn_stat() This probably hasn't caused any problems up until now since it's probably nearly impossible to encounter this in the wild, however if we were to receive a connection status notification from the MST hub after resume while we're in the middle of reprobing the link addresses for a topology then there's a much larger chance that a port could have changed from being an output port to input port (or vice versa). If we forget to update this bit of information, we'll potentially ignore a valid PDT change on a downstream port because we think it's an input port. So, make sure we read the input_port field in connection status notifications in drm_dp_mst_handle_conn_stat() to prevent this from happening once we've implemented suspend/resume reprobing. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-8-lyude@redhat.com commit 3f9b3f02dda501ea1889d773d547dcff12a3f7bb Author: Lyude Paul Date: Mon Jun 17 17:59:29 2019 -0400 drm/dp_mst: Protect drm_dp_mst_port members with locking This is a complicated one. Essentially, there's currently a problem in the MST core that hasn't really caused any issues that we're aware of (emphasis on "that we're aware of"): locking. When we go through and probe the link addresses and path resources in a topology, we hold no locks when updating ports with said information. The members I'm referring to in particular are: - ldps - ddps - mcs - pdt - dpcd_rev - num_sdp_streams - num_sdp_stream_sinks - available_pbn - input - connector Now that we're handling UP requests asynchronously and will be using some of the struct members mentioned above in atomic modesetting in the future for features such as PBN validation, this is going to become a lot more important. As well, the next few commits that prepare us for and introduce suspend/resume reprobing will also need clear locking in order to prevent from additional racing hilarities that we never could have hit in the past. So, let's solve this issue by using &mgr->base.lock, the modesetting lock which currently only protects &mgr->base.state. This works perfectly because it allows us to avoid blocking connection_mutex unnecessarily, and we can grab this in connector detection paths since it's a ww mutex. We start by having drm_dp_mst_handle_up_req() hold this when updating ports. For drm_dp_mst_handle_link_address_port() things are a bit more complicated. As I've learned the hard way, we can grab &mgr->lock.base for everything except for port->connector. See, our normal driver probing paths end up generating this rather obvious lockdep chain: &drm->mode_config.mutex -> crtc_ww_class_mutex/crtc_ww_class_acquire -> &connector->mutex However, sysfs grabs &drm->mode_config.mutex in order to protect itself from connector state changing under it. Because this entails grabbing kn->count, e.g. the lock that the kernel provides for protecting sysfs contexts, we end up grabbing kn->count followed by &drm->mode_config.mutex. This ends up creating an extremely rude chain: &kn->count -> &drm->mode_config.mutex -> crtc_ww_class_mutex/crtc_ww_class_acquire -> &connector->mutex I mean, look at that thing! It's just evil!!! This gross thing ends up making any calls to drm_connector_register()/drm_connector_unregister() impossible when holding any kind of modesetting lock. This is annoying because ideally, we always want to ensure that drm_dp_mst_port->connector never changes when doing an atomic commit or check that would affect the atomic topology state so that it can reliably and easily be used from future DRM DP MST helpers to assist with tasks such as scanning through the current VCPI allocations and adding connectors which need to have their allocations updated in response to a bandwidth change or the like. Being able to hold &mgr->base.lock throughout the entire link probe process would have been _great_, since we could prevent userspace from ever seeing any states in-between individual port changes and as a result likely end up with a much faster probe and more consistent results from said probes. But without some rework of how we handle connector probing in sysfs it's not at all currently possible. In the future, maybe we can try using the sysfs locks to protect updates to connector probing state and fix this mess. So for now, to protect everything other than port->connector under &mgr->base.lock and ensure that we still have the guarantee that atomic check/commit contexts will never see port->connector change we use a silly trick. See: port->connector only needs to change in order to ensure that input ports (see the MST spec) never have a ghost connector associated with them. But, there's nothing stopping us from simply throwing the entire port out and creating a new one in order to maintain that requirement while still keeping port->connector consistent across the lifetime of the port in atomic check/commit contexts. For all intended purposes this works fine, as we validate ports in any contexts we care about before using them and as such will end up reporting the connector as disconnected until it's port's destruction finalizes. So, we just do that in cases where we detect port->input has transitioned from true->false. We don't need to worry about the other direction, since a port without a connector isn't visible to userspace and as such doesn't need to be protected by &mgr->base.lock until we finish registering a connector for it. For updating members of drm_dp_mst_port other than port->connector, we simply grab &mgr->base.lock in drm_dp_mst_link_probe_work() for already registered ports, update said members and drop the lock before potentially registering a connector and probing the link address of it's children. Finally, we modify drm_dp_mst_detect_port() to take a modesetting lock acquisition context in order to acquire &mgr->base.lock under &connection_mutex and convert all it's users over to using the .detect_ctx probe hooks. With that, we finally have well defined locking. Changes since v4: * Get rid of port->mutex, stop using connection_mutex and just use our own modesetting lock - mgr->base.lock. Also, add a probe_lock that comes before this patch. * Just throw out ports that get changed from an output to an input, and replace them with new ports. This lets us ensure that modesetting contexts never see port->connector go from having a connector to being NULL. * Write an extremely detailed explanation of what problems this is trying to fix, since there's a _lot_ of context here and I honestly forgot some of it myself a couple times. * Don't grab mgr->lock when reading port->mstb in drm_dp_mst_handle_link_address_port(). It's not needed. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-7-lyude@redhat.com commit dda967139955461583377820fef340949effc195 Author: Eugen Hristev Date: Wed Sep 11 08:24:34 2019 +0000 i2c: at91: add support for analog filtering Add support for analog filtering for i2c lines. The sama5d2 and sam9x60 support this feature. Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Reviewed-by: Peter Rosin Signed-off-by: Wolfram Sang commit 2be357af5fdd9fc74d28d929a9e29d2fcee75e4a Author: Eugen Hristev Date: Wed Sep 11 08:24:31 2019 +0000 i2c: at91: add support for advanced digital filtering Add new platform data support for advanced digital filtering for i2c. The sama5d2 and sam9x60 support this feature. This digital filter allows the user to configure the maximum width of the spikes that can be filtered. Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Reviewed-by: Peter Rosin Signed-off-by: Wolfram Sang commit 2989b45923b96981a3f50be7f64afdf9221c3b17 Author: Eugen Hristev Date: Wed Sep 11 08:24:28 2019 +0000 i2c: at91: add support for digital filtering Add new platform data support for digital filtering for i2c. The sama5d4, sama5d2 and sam9x60 support this feature. Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Reviewed-by: Peter Rosin Signed-off-by: Wolfram Sang commit b00277923743e56c3652ea95b88943d21cad9d73 Author: Eugen Hristev Date: Wed Sep 11 08:24:25 2019 +0000 i2c: at91: add new platform support for sam9x60 Add new platform data support for the sam9x60 SoC Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Reviewed-by: Peter Rosin Signed-off-by: Wolfram Sang commit 14692a3637d4f1cd8ccdb8c605222037b3ac3494 Author: Lyude Paul Date: Wed Oct 16 16:02:59 2019 -0400 drm/dp_mst: Add probe_lock Currently, MST lacks locking in a lot of places that really should have some sort of locking. Hotplugging and link address code paths are some of the offenders here, as there is actually nothing preventing us from running a link address probe while at the same time handling a connection status update request - something that's likely always been possible but never seen in the wild because hotplugging has been broken for ages now (with the exception of amdgpu, for reasons I don't think are worth digging into very far). Note: I'm going to start using the term "in-memory topology layout" here to refer to drm_dp_mst_port->mstb and drm_dp_mst_branch->ports. Locking in these places is a little tougher then it looks though. Generally we protect anything having to do with the in-memory topology layout under &mgr->lock. But this becomes nearly impossible to do from the context of link address probes due to the fact that &mgr->lock is usually grabbed under random various modesetting locks, meaning that there's no way we can just invert the &mgr->lock order and keep it locked throughout the whole process of updating the topology. Luckily there are only two workers which can modify the in-memory topology layout: drm_dp_mst_up_req_work() and drm_dp_mst_link_probe_work(), meaning as long as we prevent these two workers from traveling the topology layout in parallel with the intent of updating it we don't need to worry about grabbing &mgr->lock in these workers for reads. We only need to grab &mgr->lock in these workers for writes, so that readers outside these two workers are still protected from the topology layout changing beneath them. So, add the new &mgr->probe_lock and use it in both drm_dp_mst_link_probe_work() and drm_dp_mst_up_req_work(). Additionally, add some more detailed explanations for how this locking is intended to work to drm_dp_mst_port->mstb and drm_dp_mst_branch->ports. Signed-off-by: Lyude Paul Reviewed-by: Sean Paul Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-6-lyude@redhat.com commit 9408cc94eb041d0c2f9f00189a613b94c0449450 Author: Lyude Paul Date: Mon Jun 17 16:37:18 2019 -0400 drm/dp_mst: Handle UP requests asynchronously Once upon a time, hotplugging devices on MST branches actually worked in DRM. Now, it only works in amdgpu (likely because of how it's hotplug handlers are implemented). On both i915 and nouveau, hotplug notifications from MST branches are noticed - but trying to respond to them causes messaging timeouts and causes the whole topology state to go out of sync with reality, usually resulting in the user needing to replug the entire topology in hopes that it actually fixes things. The reason for this is because the way we currently handle UP requests in MST is completely bogus. drm_dp_mst_handle_up_req() is called from drm_dp_mst_hpd_irq(), which is usually called from the driver's hotplug handler. Because we handle sending the hotplug event from this function, we actually cause the driver's hotplug handler (and in turn, all sideband transactions) to block on drm_device->mode_config.connection_mutex. This makes it impossible to send any sideband messages from the driver's connector probing functions, resulting in the aforementioned sideband message timeout. There's even more problems with this beyond breaking hotplugging on MST branch devices. It also makes it almost impossible to protect drm_dp_mst_port struct members under a lock because we then have to worry about dealing with all of the lock dependency issues that ensue. So, let's finally actually fix this issue by handling the processing of up requests asyncronously. This way we can send sideband messages from most contexts without having to deal with getting blocked if we hold connection_mutex. This also fixes MST branch device hotplugging on i915, finally! Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-5-lyude@redhat.com commit c485e2c97dae4e13f239ccad455070e99213dd4b Author: Lyude Paul Date: Wed Mar 13 13:51:41 2019 -0400 drm/dp_mst: Refactor pdt setup/teardown, add more locking Since we're going to be implementing suspend/resume reprobing very soon, we need to make sure we are extra careful to ensure that our locking actually protects the topology state where we expect it to. Turns out this isn't the case with drm_dp_port_setup_pdt() and drm_dp_port_teardown_pdt(), both of which change port->mstb without grabbing &mgr->lock. Additionally, since most callers of these functions are just using it to teardown the port's previous PDT and setup a new one we can simplify things a bit and combine drm_dp_port_setup_pdt() and drm_dp_port_teardown_pdt() into a single function: drm_dp_port_set_pdt(). This function also handles actually ensuring that we grab the correct locks when we need to modify port->mstb. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-4-lyude@redhat.com commit b84dfe1af54053e0aedb14cd26307859aa1df35f Author: Eugen Hristev Date: Wed Oct 23 12:40:14 2019 +0000 i2c: add support for filters optional properties i2c-digital-filter-width-ns: This optional timing property specifies the width of the spikes on the i2c lines (in ns) that can be filtered out by built-in digital filters which are embedded in some i2c controllers. i2c-analog-filter-cutoff-frequency: This optional timing property specifies the cutoff frequency of a low-pass analog filter built-in i2c controllers. This low pass filter is used to filter out high frequency noise on the i2c lines. Specified in Hz. Include these properties in the timings structure and read them as integers. Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Reviewed-by: Peter Rosin Signed-off-by: Wolfram Sang commit d29333cf5cd7594bd9a6bac10cbb4ec7079dc9a3 Author: Lyude Paul Date: Sun Mar 10 18:59:10 2019 -0400 drm/dp_mst: Remove PDT teardown in drm_dp_destroy_port() and refactor This will allow us to add some locking for port->* members, in particular the PDT and ->connector, which can't be done from drm_dp_destroy_port() since we don't know what locks the caller might be holding. Note that we already do this in delayed_destroy_work (renamed from destroy_connector_work in this patch) for ports, we're just making it so mstbs are also destroyed in this worker. Changes since v2: * Clarify commit message Changes since v4: * Clarify commit message more Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-3-lyude@redhat.com commit b644257f0ec210a668f6cb24b675cb010a4ab542 Author: Eugen Hristev Date: Wed Sep 11 08:24:20 2019 +0000 dt-bindings: i2c: add bindings for i2c analog and digital filter Some i2c controllers have a built-in digital or analog filter. This is specifically required depending on the hardware PCB/board. Some controllers also allow specifying the maximum width of the spikes that can be filtered for digital filter. The width length can be specified in nanoseconds. Analog filters can be configured to have a cutoff frequency (low-pass filter). This frequency can be specified in Hz. Added an optional property for such types of analog filters. Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring Acked-by: Ludovic Desroches Reviewed-by: Peter Rosin Signed-off-by: Wolfram Sang commit 2034e3f4c9a5c74a6869de7f378d1a9022777ee8 Author: Eugen Hristev Date: Wed Sep 11 08:24:17 2019 +0000 dt-bindings: i2c: at91: add new compatible Add compatible for new Microchip SoC, sam9x60 Reviewed-by: Rob Herring Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Reviewed-by: Peter Rosin Signed-off-by: Wolfram Sang commit 90a764cda1c809b0fe3f2ffe133839421c60faf7 Author: Ville Syrjälä Date: Tue Oct 15 22:30:32 2019 +0300 drm/i915: Add support for half float framebuffers on snb sprites snb supports fp16 pixel formats on the sprite planes. Expose that capability. Nothing special needs to be done, it just works. v2: Rebase on top of icl fp16 Split snb+ sprite bits into a separate patch Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-11-ville.syrjala@linux.intel.com commit 762dff2e6f434b8f485a29b3731e490c8dfea31b Author: Ville Syrjälä Date: Tue Oct 15 22:30:31 2019 +0300 drm/i915: Add support for half float framebuffers for ivb+ sprites ivb+ supports fp16 pixel formats on the sprite planes planes. Expose that capability. On ivb/hsw fp16 scanout is slightly busted. The output from the plane will have 1/4 the expected value. For the sprite plane we can fix that up with the plane gamma unit. This was fixed on bdw. v2: Rebase on top of icl fp16 Split the ivb+ sprite birs into a separate patch v3: Move ivb_need_sprite_gamma() check one level up so that we don't waste time programming garbage into he gamma registers Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-10-ville.syrjala@linux.intel.com commit 03b0ce9532ec5d2dba52e17970fae5a484bb5531 Author: Ville Syrjälä Date: Tue Oct 15 22:30:30 2019 +0300 drm/i915: Add support for half float framebuffers for gen4+ primary planes gen4+ supports fp16 pixel formats on the primary planes. Add the relevant code. On ivb fp16 scanout is slightly busted. The output from the plane will have 1/4 the expected value. For the primary plane we would have to use the pipe gamma or pipe csc to correct that which would affect all the other planes as well, hence we simply choose not to expose fp16 on the ivb primary plane. On hsw the primary plane got fixed. On gmch platforms I observed that the plane width must be below 2k pixels with fp16 or else we get a corrupted image. This limitation does not seem to be documented in bspec. I verified the exact limit using the chv pipe B primary plane since it has windowing capability. The stride limits are unaffected by fp16. v2: Rebase on top of icl fp16 Split thea gen4+ primary plane bits into a separate patch Deal with HAS_GMCH() Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-9-ville.syrjala@linux.intel.com commit 6e6c155da65be0ea4a682f41021a9f635e16ecfe Author: Ville Syrjälä Date: Tue Oct 15 22:30:29 2019 +0300 drm/i915: Add support for half float framebuffers for skl+ skl+ supports fp16 pixel formats on all universal planes. Add the necessary bits to expose that capability. The main different to icl is that we can't scale fp16, so need to add the relevant checks. v2: Rebase on top of icl fp16 Split skl+ bits into a separate patch Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-8-ville.syrjala@linux.intel.com commit dbe20703e178b005f0793bdddfe7389549a0e6cc Author: Ville Syrjälä Date: Tue Oct 15 22:30:28 2019 +0300 drm/i915: Simplify skl_max_scale() Now that the planes declare their minimum cdclk requirements properly we don't need to check the cdclk in skl_max_scale() anymore. Just check against the maximum downscale ratio, and move the code next to it's only caller. v2: Add a comment explaining the HQ vs. not thing Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-7-ville.syrjala@linux.intel.com commit 99efd1c92b7ae8f46b74552513bfa975f080485b Author: Ville Syrjälä Date: Tue Oct 15 22:30:27 2019 +0300 drm/i915: Eliminate skl_check_pipe_max_pixel_rate() The normal cdclk handling now takes care of making sure the plane's pixel rate doesn't exceed the spec appointed percentage of the cdclk frequency. Thus we can nuke skl_check_pipe_max_pixel_rate(). Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-6-ville.syrjala@linux.intel.com commit bb6ae9e653dc1019312466cde7be3db69681d3b6 Author: Ville Syrjälä Date: Tue Oct 15 22:30:26 2019 +0300 drm/i915: Allow planes to declare their minimum acceptable cdclk Various pixel formats and plane scaling impose additional constraints on the cdclk frequency. Provide a new plane->min_cdclk() hook that will be used to compute the minimum acceptable cdclk frequency for each plane. Annoyingly on some platforms the numer of active planes affects this calculation so we must also toss in more planes into the state when the number of active planes changes. The sequence of state computation must also be changed: 1. check_plane() (updates plane's visibility etc.) 2. figure out if more planes now require update min_cdclk computaion 3. calculate the new min cdclk for each plane in the state 4. if the minimum of any plane now exceeds the current logical cdclk we recompute the cdclk 4. during cdclk computation take the planes' min_cdclk into accoutn 5. follow the normal cdclk programming to change the cdclk frequency. This may now require a modeset (except on bxt/glk in some cases), which either succeeds or fails depending on whether userspace has given us permission to perform a modeset or not. v2: Fix plane id check in intel_crtc_add_planes_to_state() Only print the debug message when cdclk needs bumping Use dev_priv->cdclk... as the old state explicitly Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-5-ville.syrjala@linux.intel.com commit bf5da83e4bd800e7ccd44cf4937a365a859bbf23 Author: Ville Syrjälä Date: Tue Oct 15 22:30:25 2019 +0300 drm/i915: Move check_digital_port_conflicts() earier check_digital_port_conflicts() is done needlessly late. Move it earlier. This will be needed as later on we want to set any_ms=true a bit later for non-modesets too and we can't call this guy without the connection_mutex held. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-4-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 1d5a95b5c943161bcefd487206ca848b81cac4df Author: Ville Syrjälä Date: Tue Oct 15 22:30:24 2019 +0300 drm/i915: Rework global state locking So far we've sort of protected the global state under dev_priv with the connection_mutex. I wan to change that so that we can change the cdclk even for pure plane updates. To that end let's formalize the protection of the global state to follow what I started with the cdclk code already (though not entirely properly) such that any crtc mutex will suffice as a read lock, and all crtcs mutexes act as the write lock. We'll also pimp intel_atomic_state_clear() to clear the entire global state, so that we don't accidentally leak stale information between the locking retries. As a slight optimization we'll only lock the crtc mutexes to protect the global state, however if and when we actually have to poke the hw (eg. if the actual cdclk changes) we must serialize commits across all crtcs so that a parallel nonblocking commit can't get ahead of the cdclk reprogamming. We do that by adding all crtcs to the state. TODO: the old global state examined during commit may still be a problem since it always looks at the _latest_ swapped state in dev_priv. Need to add proper old/new state for that too I think. v2: Remeber to serialize the commits if necessary Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-3-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 6c066f4c99e1c7a481d8cefd0723e8feadbc1fa0 Author: Ville Syrjälä Date: Tue Oct 15 22:30:23 2019 +0300 drm/i915: Add debugs to distingiush a cd2x update from a full cdclk pll update To make the logs a bit less confusing let's toss in some debug prints to indicate whether the cdclk reprogramming is going to happen with a single pipe active or whether we need to turn all pipes off for the duration. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-2-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 7cb12d48314eabdaaf30e4b3275f04811b458ed3 Author: Lyude Paul Date: Tue Feb 19 17:41:02 2019 -0500 drm/dp_mst: Destroy MSTBs asynchronously When reprobing an MST topology during resume, we have to account for the fact that while we were suspended it's possible that mstbs may have been removed from any ports in the topology. Since iterating downwards in the topology requires that we hold &mgr->lock, destroying MSTBs from this context would result in attempting to lock &mgr->lock a second time and deadlocking. So, fix this by first moving destruction of MSTBs into destroy_connector_work, then rename destroy_connector_work and friends to reflect that they now destroy both ports and mstbs. Note that even though this means that MSTBs will still be accessible for a short period of time between their removal from the topology and delayed destruction, we are still protected against referencing a MSTB with a refcount of 0 since we use kref_get_unless_zero() in most places. Changes since v1: * s/destroy_connector_list/destroy_port_list/ s/connector_destroy_lock/delayed_destroy_lock/ s/connector_destroy_work/delayed_destroy_work/ s/drm_dp_finish_destroy_branch_device/drm_dp_delayed_destroy_mstb/ s/drm_dp_finish_destroy_port/drm_dp_delayed_destroy_port/ - danvet * Use two loops in drm_dp_delayed_destroy_work() - danvet * Better explain why we need to do this - danvet * Use cancel_work_sync() instead of flush_work() - flush_work() doesn't account for work requeing Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-2-lyude@redhat.com commit dc2f7edcc01219fbbb517c1245dac46d30edaf93 Author: Leon Romanovsky Date: Sun Oct 20 08:57:24 2019 +0300 RDMA/rxe: Remove useless rxe_init_device_param assignments IB devices are allocated with kzalloc and don't need explicit zero assignments for their parameters. It can be removed safely. Link: https://lore.kernel.org/r/20191020055724.7410-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b275fb6013df5d9c17702491bf4533d559561515 Author: Chris Packham Date: Mon Oct 21 14:43:36 2019 +1300 docs: ioctl: fix typo "pointres" should be "pointers". Signed-off-by: Chris Packham Signed-off-by: Jonathan Corbet commit 98919f4c9a3421695b182f0244b34b62045d08ff Author: Geert Uytterhoeven Date: Mon Oct 21 17:06:45 2019 +0200 Documentation: debugfs: Document debugfs helper for unsigned long values When debugfs_create_ulong() was added, it was not documented. Fixes: c23fe83138ed7b11 ("debugfs: Add debugfs_create_ulong()") Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar Signed-off-by: Jonathan Corbet commit dc5fcc51a5d1ab740e906decc486bfb663e74444 Author: Harald Seiler Date: Tue Oct 22 21:57:48 2019 +0200 docs: driver-api: Remove reference to sgi-ioc4 Commit f7bc6e42bf12 ("drivers: remove the SGI SN2 IOC4 base support") removed support for SGI SN2 IOC4 and the relevant documentation files. Remove a leftover reference in the toctree of the driver-api documentation to fix this sphinx error: Documentation/driver-api/index.rst:14: WARNING: toctree contains reference to nonexisting document 'driver-api/sgi-ioc4' Fixes: f7bc6e42bf12 ("drivers: remove the SGI SN2 IOC4 base support") Signed-off-by: Harald Seiler Signed-off-by: Jonathan Corbet commit fb8d1d7e3d345006dceaf9efecc72681cc53633f Merge: 337d866a8014 4ef511bc410c Author: David S. Miller Date: Thu Oct 24 09:51:23 2019 -0700 Merge branch 'net-aquantia-PTP-support-for-AQC-devices' Igor Russkikh says: ==================== net: aquantia: PTP support for AQC devices This patchset introduces PTP feature support in Aquantia AQC atlantic driver. This implementation is a joined effort of aquantia developers: Egor is the main designer and driver/firmware architect on PTP, Sergey and Dmitry are included as co-developers. Dmitry also helped me in the overall patchset preparations. Feature was verified on AQC hardware with testptp tool, linuxptp, gptp and with Motu hardware unit. version3 updates: - Review comments applied: error handling, various fixes version2 updates: - Fixing issues from Andrew's review: replacing self with ptp var name, making ptp_clk_offset a field in the ptp instance. devm_kzalloc advice is actually non applicable, because ptp object gets created/destroyed on each network device close/open and it should not be linked with dev lifecycle. - Rearranging commit authorship, adding Egor as a ptp module main maintainer - Fixing kbuild 32bit division issues ==================== Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 4ef511bc410cc0ab39cafb829454684e60b94a96 Author: Igor Russkikh Date: Tue Oct 22 09:53:49 2019 +0000 net: aquantia: adding atlantic ptp maintainer PTP implementation is designed and maintained by Egor Pomozov, adding him as this module maintainer. Egor is the author of the core functionality and the architect, and is to be contacted for all Aquantia PTP/AVB functionality. Signed-off-by: Egor Pomozov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 9c477032f7d0beafe592e65238d8fb79341e91dc Author: Dmitry Bezrukov Date: Tue Oct 22 09:53:47 2019 +0000 net: aquantia: add support for PIN funcs Depending on FW configuration we can manage from 0 to 3 PINs for periodic output and from 0 to 1 ext ts PIN for getting TS for external event. Ext TS PIN functionality is implemented via periodic timestamps polling directly from PHY, because right now there is now way to receive the PIN trigger interrupt from phy. The polling interval is 15 milliseconds. Co-developed-by: Egor Pomozov Signed-off-by: Egor Pomozov Co-developed-by: Pavel Belous Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit dbcd6806af4200c830869fb5ccd1f193361c136f Author: Dmitry Bezrukov Date: Tue Oct 22 09:53:45 2019 +0000 net: aquantia: add support for Phy access GPIO PIN control and access is done by direct phy manipulation. Here we add an aq_phy module which is able to access phy registers via MDIO access mailbox. Access is controlled via HW semaphore. Co-developed-by: Nikita Danilov Signed-off-by: Nikita Danilov Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 84989af0465b4a7898eb3a2392ea382cc219cb1d Author: Egor Pomozov Date: Tue Oct 22 09:53:42 2019 +0000 net: aquantia: implement get_ts_info ethtool Ethtool callback with basic information on what PTP features are supported by the device. Signed-off-by: Egor Pomozov Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Co-developed-by: Dmitry Bezrukov Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 7db3d07afd2c1337f784ba9d528c10e225f91aa8 Author: Egor Pomozov Date: Tue Oct 22 09:53:40 2019 +0000 net: aquantia: add support for ptp ioctls Here we add support for PTP specific IOCTLs of HW timestamp get/set. These will use filters to configure flows onto the required queue ids. Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Signed-off-by: Egor Pomozov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 5a1bf9ef51cfd9bbe12a5a03a12a47eeacc0ef64 Author: Dmitry Bezrukov Date: Tue Oct 22 09:53:38 2019 +0000 net: aquantia: rx filters for ptp We implement HW filter reservation for PTP traffic. Special location in filters table is marked as reserved, because incoming ptp traffic should be directed only to PTP designated queue. This way HW will do PTP timestamping and proper processing. Co-developed-by: Egor Pomozov Signed-off-by: Egor Pomozov Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 04a1839950d92ab6519479bc95710e89ae6cbc77 Author: Egor Pomozov Date: Tue Oct 22 09:53:35 2019 +0000 net: aquantia: implement data PTP datapath Here we do alloc/free IRQs for PTP rings. We also implement processing of PTP packets on TX and RX sides. Signed-off-by: Egor Pomozov Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Co-developed-by: Dmitry Bezrukov Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 61cc502ef428d104f4c35baa3ea099ae80318275 Author: Dmitry Bezrukov Date: Tue Oct 22 09:53:32 2019 +0000 net: aquantia: styling fixes on ptp related functions Checkpatch and styling fixes on parts of code touched by ptp Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 94ad94558b0fbf18dd6fb0987540af1693157556 Author: Egor Pomozov Date: Tue Oct 22 09:53:29 2019 +0000 net: aquantia: add PTP rings infrastructure Add implementations of PTP rings alloc/free. PTP desing on this device uses two separate rings on a separate traffic class for traffic rx/tx. Third ring (hwts) is not a traffic ring, but is used only to receive timestamps of the transmitted packets. Signed-off-by: Egor Pomozov Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Co-developed-by: Dmitry Bezrukov Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 910479a9f793f47b21a01564bf9f1672029cbdfe Author: Egor Pomozov Date: Tue Oct 22 09:53:27 2019 +0000 net: aquantia: add basic ptp_clock callbacks Basic HW functions implemented for adjusting frequency, adjusting time, getting and setting time. With these callbacks we now do register ptp clock in the system. Firmware interface parts are defined for PTP requests and interactions. Enable/disable PTP counters in HW on clock register/unregister. Signed-off-by: Egor Pomozov Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Co-developed-by: Dmitry Bezrukov Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 593f7b43bd78c10f636088d3a067683e3ac376b1 Author: Dmitry Bezrukov Date: Tue Oct 22 09:53:25 2019 +0000 net: aquantia: unify styling of bit enums Make some other bit-enums more clear about positioning, this helps on debugging and development Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 1a64f8dc82b1a96baae3dc7eecbbbb6a315f1512 Author: Egor Pomozov Date: Tue Oct 22 09:53:22 2019 +0000 net: aquantia: PTP skeleton declarations and callbacks Here we add basic function for PTP clock register/unregister. We also declare FW/HW capability bits used to control PTP feature on device. PTP device is created if network card has appropriate FW that has PTP enabled in config. HW supports timestamping for PTPv2 802.AS1 and PTPv2 IPv4 UDP packets. It also supports basic PTP callbacks for getting/setting time, adjusting frequency and time as well. Signed-off-by: Egor Pomozov Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Co-developed-by: Dmitry Bezrukov Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 004e822a6faa807f4413ac066fa29ea433550070 Author: Dariusz Marcinkiewicz Date: Wed Aug 14 12:45:05 2019 +0200 drm/tegra: Use cec_notifier_conn_(un)register() Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil Acked-by: Hans Verkuil Signed-off-by: Thierry Reding commit 051172e8c1ceef8749f19faacc1d3bef65d20d8d Author: Thierry Reding Date: Wed Sep 25 13:26:59 2019 +0200 drm/tegra: Fix ordering of cleanup code Commit Fixes: b9f8b09ce256 ("drm/tegra: Setup shared IOMMU domain after initialization") changed the initialization order of the IOMMU related bits but didn't update the cleanup path accordingly. This asymmetry can cause failures during error recovery. Fixes: b9f8b09ce256 ("drm/tegra: Setup shared IOMMU domain after initialization") Signed-off-by: Thierry Reding Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko commit f1f20eb9705566f861330f8da7e2f2a84dae46af Author: Thierry Reding Date: Wed Feb 20 10:03:46 2019 +0100 drm/tegra: sor: Move register programming out of ->init() The hardware is not guaranteed to be enabled during execution of the tegra_sor_init() function, which can lead to a crash on some Tegra SoCs. Fix this by moving all register programming into code that is guaranteed to only be executed when the hardware is enabled. Signed-off-by: Thierry Reding commit 3f4bb9f75090fc82229431a8e4a3c293b6094f2e Author: Geert Uytterhoeven Date: Thu Oct 24 17:17:37 2019 +0200 drm: Spelling s/connet/connect/ Fix misspellings of "connector" and "connection" Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191024151737.29287-1-geert+renesas@glider.be commit 3dd4d40b420846dd35869ccc8f8627feef2cff32 Author: Jan Kara Date: Wed Oct 23 17:00:45 2019 -0700 xfs: Sanity check flags of Q_XQUOTARM call Flags passed to Q_XQUOTARM were not sanity checked for invalid values. Fix that. Fixes: 9da93f9b7cdf ("xfs: fix Q_XQUOTARM ioctl") Reported-by: Yang Xu Signed-off-by: Jan Kara Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 746facd39370cc10038eba695f37269c6a401fda Author: Vandana BN Date: Tue Oct 15 07:40:17 2019 -0300 media: vivid: Add metadata output support Support metadata output in vivid driver. Metadata output is used to set brightness, contrast, saturation and hue. Adds new files for metadata output. Signed-off-by: Vandana BN Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 78892b6ba3ba7a6c20bc21548ee90fc980fdfbf4 Author: Vandana BN Date: Tue Oct 15 07:40:16 2019 -0300 media: v4l2-core: Add new metadata format Add new metadata format to support metadata output in vivid. Signed-off-by: Vandana BN Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a2e31ce91de97e7797fe9c68f3671df2905842aa Author: Vandana BN Date: Thu Oct 17 03:43:08 2019 -0300 media: Documentation:media:v4l2:Add vivid metadata doc Adds new file for describing new metadata format V4L2_META_FMT_VIVID added in vivid driver. Signed-off-by: Vandana BN Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d5797cf685a0a3310457d89ef640be68a1de0743 Author: Vandana BN Date: Tue Oct 15 07:40:15 2019 -0300 media: vivid: Add metadata capture support This patch adds meatadata capture support in vivid driver. Adds new files for metadata capture. Adds vivid controls to generate PTS and SCR for metadata stream. also fixes v4l2-compliance issues seen on metadata device. Signed-off-by: Vandana BN Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8669d8474a58268295414b9f78a41659698bdb87 Author: Hans Verkuil Date: Mon Oct 14 09:01:05 2019 -0300 media: v4l2-dev: disable frequency and tuner ioctls for touch Touch devices have obviously no tuner, so don't attempt to enable those ioctls for such devices. Signed-off-by: Hans Verkuil Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 4fbd54bbd24360c28ceec2ae9ee2c950b743aee1 Author: Hans Verkuil Date: Mon Oct 14 05:40:21 2019 -0300 media: v4l2-dev: fix is_tch checks Touch devices mark too many ioctls as valid. Restrict the list of valid ioctls for touch devices. Signed-off-by: Hans Verkuil Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 8e72244b4e8f1a163d358c271f39c737b5b8106a Author: Hans Verkuil Date: Mon Oct 14 05:40:20 2019 -0300 media: v4l2-dev: simplify the SDR checks In determine_valid_ioctls() we can use SET_VALID_IOCTL to enable ioctls for SDR, simplifying the code. Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 96f49c1ac370c23ae55c63c67a0b40d83928bfbd Author: Vandana BN Date: Mon Oct 14 05:40:19 2019 -0300 media: v4l2-core: correctly validate video and metadata ioctls If the type is VFL_TYPE_GRABBER, then also check device_caps to see if the video device supports video and/or metadata and disable unneeded ioctls. Without this change, format ioctls for both video and metadata devices could be called on both device nodes. This is true for other ioctls as well, even if the device supports only video or metadata. Metadata devices act similar to VBI devices w.r.t. which ioctls should be enabled. This makes sense since VBI *is* metadata. Signed-off-by: Vandana BN Co-developed-by: Hans Verkuil Signed-off-by: Hans Verkuil Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit d07ce4e32a8d68062c58a3e635619313c52d0bf7 Author: Daniel Thompson Date: Mon Oct 21 11:10:56 2019 +0100 kdb: Avoid array subscript warnings on non-SMP builds Recent versions of gcc (reported on gcc-7.4) issue array subscript warnings for builds where SMP is not enabled. kernel/debug/debug_core.c: In function 'kdb_dump_stack_on_cpu': kernel/debug/debug_core.c:452:17: warning: array subscript is outside array +bounds [-Warray-bounds] if (!(kgdb_info[cpu].exception_state & DCPU_IS_SLAVE)) { ~~~~~~~~~^~~~~ kernel/debug/debug_core.c:469:33: warning: array subscript is outside array +bounds [-Warray-bounds] kgdb_info[cpu].exception_state |= DCPU_WANT_BT; kernel/debug/debug_core.c:470:18: warning: array subscript is outside array +bounds [-Warray-bounds] while (kgdb_info[cpu].exception_state & DCPU_WANT_BT) There is no bug here but there is scope to improve the code generation for non-SMP systems (whilst also silencing the warning). Reported-by: kbuild test robot Fixes: 2277b492582d ("kdb: Fix stack crawling on 'running' CPUs that aren't the master") Signed-off-by: Daniel Thompson Link: https://lore.kernel.org/r/20191021101057.23861-1-daniel.thompson@linaro.org Reviewed-by: Douglas Anderson commit a52c23b8b207d676d6cdf531af482a79fa622b9d Author: Chuck Lever Date: Wed Oct 23 10:02:14 2019 -0400 xprtrdma: Replace dprintk in xprt_rdma_set_port Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit f54c870d326aa02b73b68d2e0a503ec81dd3a4e4 Author: Chuck Lever Date: Wed Oct 23 10:02:09 2019 -0400 xprtrdma: Replace dprintk() in rpcrdma_update_connect_private() Clean up: Use a single trace point to record each connection's negotiated inline thresholds and the computed maximum byte size of transport headers. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit d4957f01d29b2a01200117fc04b9faaa52aca4bf Author: Chuck Lever Date: Wed Oct 23 10:02:03 2019 -0400 xprtrdma: Refine trace_xprtrdma_fixup Slightly reduce overhead and display more useful information. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 7b020f17bbd34c219419b634d9efb9e93a3af4c2 Author: Chuck Lever Date: Wed Oct 23 10:01:58 2019 -0400 xprtrdma: Report the computed connect delay For debugging, the op_connect trace point should report the computed connect delay. We can then ensure that the delay is computed at the proper times, for example. As a further clean-up, remove a few low-value "heartbeat" trace points in the connect path. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 6cb28687fd1db3f94b35c2a7b37bf468f945244a Author: Chuck Lever Date: Wed Oct 23 10:01:52 2019 -0400 xprtrdma: Wake tasks after connect worker fails Pending tasks are currently never awoken when the connect worker fails. The reason is that XPRT_CONNECTED is always clear after a failure return of rpcrdma_ep_connect, thus the xprt_test_and_clear_connected() check in xprt_rdma_connect_worker() always fails. - xprt_rdma_close always clears XPRT_CONNECTED. - rpcrdma_ep_connect always clears XPRT_CONNECTED. After reviewing the TCP connect worker, it appears that there's no need for extra test_and_set paranoia in xprt_rdma_connect_worker. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 614f3c96d7e5efd1c4dc699524857130a52c6a7f Author: Chuck Lever Date: Thu Oct 17 14:31:53 2019 -0400 xprtrdma: Pull up sometimes On some platforms, DMA mapping part of a page is more costly than copying bytes. Restore the pull-up code and use that when we think it's going to be faster. The heuristic for now is to pull-up when the size of the RPC message body fits in the buffer underlying the head iovec. Indeed, not involving the I/O MMU can help the RPC/RDMA transport scale better for tiny I/Os across more RDMA devices. This is because interaction with the I/O MMU is eliminated, as is handling a Send completion, for each of these small I/Os. Without the explicit unmapping, the NIC no longer needs to do a costly internal TLB shoot down for buffers that are just a handful of bytes. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit d6764bbd7763fa9d669bba7fc5a50a4bdd8f591b Author: Chuck Lever Date: Thu Oct 17 14:31:44 2019 -0400 xprtrdma: Refactor rpcrdma_prepare_msg_sges() Refactor: Replace spaghetti with code that makes it plain what needs to be done for each rtype. This makes it easier to add features and optimizations. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit dc15c3d5f16808f7c171b55da6a82a5c0f279647 Author: Chuck Lever Date: Thu Oct 17 14:31:35 2019 -0400 xprtrdma: Move the rpcrdma_sendctx::sc_wr field Clean up: This field is not needed in the Send completion handler, so it can be moved to struct rpcrdma_req to reduce the size of struct rpcrdma_sendctx, and to reduce the amount of memory that is sloshed between the sending process and the Send completion process. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit b5cde6aa882dfb40a2b29c1c7371fdc3655c51ce Author: Chuck Lever Date: Thu Oct 17 14:31:27 2019 -0400 xprtrdma: Remove rpcrdma_sendctx::sc_device Micro-optimization: Save eight bytes in a frequently allocated structure. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit f995879ec4aa8b50c3924fda3014b0ab9acad7bd Author: Chuck Lever Date: Thu Oct 17 14:31:18 2019 -0400 xprtrdma: Remove rpcrdma_sendctx::sc_xprt Micro-optimization: Save eight bytes in a frequently allocated structure. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 15d9b015d3d1c997893472cb42d9f225a60a9219 Author: Chuck Lever Date: Thu Oct 17 14:31:09 2019 -0400 xprtrdma: Ensure ri_id is stable during MR recycling ia->ri_id is replaced during a reconnect. The connect_worker runs with the transport send lock held to prevent ri_id from being dereferenced by the send_request path during this process. Currently, however, there is no guarantee that ia->ri_id is stable in the MR recycling worker, which operates in the background and is not serialized with the connect_worker in any way. But now that Local_Inv completions are being done in process context, we can handle the recycling operation there instead of deferring the recycling work to another process. Because the disconnect path drains all work before allowing tear down to proceed, it is guaranteed that Local Invalidations complete only while the ri_id pointer is stable. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 9d2da4ff00f37de17fc25c23e50463b58b9e8fec Author: Chuck Lever Date: Wed Oct 9 13:07:48 2019 -0400 xprtrdma: Manage MRs in context of a single connection MRs are now allocated on demand so we can safely throw them away on disconnect. This way an idle transport can disconnect and it won't pin hardware MR resources. Two additional changes: - Now that all MRs are destroyed on disconnect, there's no need to check during header marshaling if a req has MRs to recycle. Each req is sent only once per connection, and now rl_registered is guaranteed to be empty when rpcrdma_marshal_req is invoked. - Because MRs are now destroyed in a WQ_MEM_RECLAIM context, they also must be allocated in a WQ_MEM_RECLAIM context. This reduces the likelihood that device driver memory allocation will trigger memory reclaim during NFS writeback. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit c3700780a096fc66467c81076ddf7f3f11d639b5 Author: Chuck Lever Date: Wed Oct 9 13:07:43 2019 -0400 xprtrdma: Fix MR list handling Close some holes introduced by commit 6dc6ec9e04c4 ("xprtrdma: Cache free MRs in each rpcrdma_req") that could result in list corruption. In addition, the result that is tabulated in @count is no longer used, so @count is removed. Fixes: 6dc6ec9e04c4 ("xprtrdma: Cache free MRs in each rpcrdma_req") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 2ae50ad68cd79224198b525f7bd645c9da98b6ff Author: Chuck Lever Date: Wed Oct 9 13:07:38 2019 -0400 xprtrdma: Close window between waking RPC senders and posting Receives A recent clean up attempted to separate Receive handling and RPC Reply processing, in the name of clean layering. Unfortunately, we can't do this because the Receive Queue has to be refilled _after_ the most recent credit update from the responder is parsed from the transport header, but _before_ we wake up the next RPC sender. That is right in the middle of rpcrdma_reply_handler(). Usually this isn't a problem because current responder implementations don't vary their credit grant. The one exception is when a connection is established: the grant goes from one to a much larger number on the first Receive. The requester MUST post enough Receives right then so that any outstanding requests can be sent without risking RNR and connection loss. Fixes: 6ceea36890a0 ("xprtrdma: Refactor Receive accounting") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit eea63ca7ffa1f3a4a0b02b902ec51eab2d4e9df4 Author: Chuck Lever Date: Wed Oct 9 13:07:32 2019 -0400 xprtrdma: Initialize rb_credits in one place Clean up/code de-duplication. Nit: RPC_CWNDSHIFT is incorrect as the initial value for xprt->cwnd. This mistake does not appear to have operational consequences, since the cwnd value is replaced with a valid value upon the first Receive completion. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit a31b2f939219dd9bffdf01a45bd91f209f8cc369 Author: Chuck Lever Date: Wed Oct 9 13:07:27 2019 -0400 xprtrdma: Connection becomes unstable after a reconnect This is because xprt_request_get_cong() is allowing more than one RPC Call to be transmitted before the first Receive on the new connection. The first Receive fills the Receive Queue based on the server's credit grant. Before that Receive, there is only a single Receive WR posted because the client doesn't know the server's credit grant. Solution is to clear rq_cong on all outstanding rpc_rqsts when the the cwnd is reset. This is because an RPC/RDMA credit is good for one connection instance only. Fixes: 75891f502f5f ("SUNRPC: Support for congestion control ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 4b93dab36f28e673725e5e6123ebfccf7697f96a Author: Chuck Lever Date: Wed Oct 9 13:07:21 2019 -0400 xprtrdma: Add unique trace points for posting Local Invalidate WRs When adding frwr_unmap_async way back when, I re-used the existing trace_xprtrdma_post_send() trace point to record the return code of ib_post_send. Unfortunately there are some cases where re-using that trace point causes a crash. Instead, construct a trace point specific to posting Local Invalidate WRs that will always be safe to use in that context, and will act as a trace log eye-catcher for Local Invalidation. Fixes: 847568942f93 ("xprtrdma: Remove fr_state") Fixes: d8099feda483 ("xprtrdma: Reduce context switching due ... ") Signed-off-by: Chuck Lever Tested-by: Bill Baker Signed-off-by: Anna Schumaker commit bf7ca707ae60045342e145c88a83bbe00f66775f Author: Chuck Lever Date: Wed Oct 9 12:58:14 2019 -0400 SUNRPC: Add trace points to observe transport congestion control To help debug problems with RPC/RDMA credit management, replace dprintk() call sites in the transport send lock paths with trace events. Similar trace points are defined for the non-congestion paths. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 5cd8b0d4dd96eece89f0b4ad623028057edd3245 Author: Chuck Lever Date: Wed Oct 9 12:58:08 2019 -0400 SUNRPC: Eliminate log noise in call_reserveresult Sep 11 16:35:20 manet kernel: call_reserveresult: unrecognized error -512, exiting Diagnostic error messages such as this likely have no value for NFS client administrators. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 56916cdfa1f1e05ea2a3fdb09abd3c14ca803a96 Author: Thomas Zimmermann Date: Thu Oct 24 10:14:04 2019 +0200 drm/vboxvideo: Replace prepare_fb()/cleanup_fb() with GEM VRAM helpers GEM VRAM provides an implementation for prepare_fb() and cleanup_fb() of struct drm_plane_helper_funcs. Switch over vboxvideo. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191024081404.6978-5-tzimmermann@suse.de commit ecad80f0865d69c8de37c7415dbf66ba372f2ca1 Author: Thomas Zimmermann Date: Thu Oct 24 10:14:03 2019 +0200 drm/hisilicon/hibmc: Use GEM VRAM's prepare_fb() and cleanup_fb() helpers This patch implements prepare_fb() and cleanup_fb() in hibmc with the GEM VRAM helpers. In the current code, pinning the BO is performed by hibmc_plane_atomic_update(), where the operation does not belong. This patch also fixes a bug where the pinned BO was never unpinned. Pinning multiple BOs would have exhaused the available VRAM and further pin operations would have failed, leaving the display in a corrupt state. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191024081404.6978-4-tzimmermann@suse.de commit eddc0acfed094293a0ee5130cc8cd2b97be8ee84 Author: Thomas Zimmermann Date: Thu Oct 24 10:14:02 2019 +0200 drm/bochs: Replace prepare_fb()/cleanup_fb() with GEM VRAM helpers GEM VRAM provides an implementation for prepare_fb() and cleanup_fb() of struct drm_simple_display_pipe_funcs. Switch over bochs. v2: * use helpers for struct drm_simple_display_pipe_funcs Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191024081404.6978-3-tzimmermann@suse.de commit 6542ad8918032a4af12b54d94f2822824777933e Author: Thomas Zimmermann Date: Thu Oct 24 10:14:01 2019 +0200 drm/vram-helpers: Add helpers for prepare_fb() and cleanup_fb() The new helpers pin and unpin a framebuffer's GEM VRAM objects during plane updates. This should be sufficient for most drivers' implementation of prepare_fb() and cleanup_fb(). v2: * provide helpers for struct drm_simple_display_pipe_funcs * rename plane-helper funcs Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191024081404.6978-2-tzimmermann@suse.de commit a4b28f5c67983d92c911ca1404728bc4ea958c0e Merge: da345174ceca c7892db5dd6a Author: Marc Zyngier Date: Thu Oct 24 15:04:09 2019 +0100 Merge remote-tracking branch 'kvmarm/kvm-arm64/stolen-time' into kvmarm-master/next commit 71b1c99081aec38b947d678b78a1ebe75c7260db Author: Anna Karas Date: Tue Oct 22 13:13:38 2019 +0300 drm/i915/perf: Describe structure members in documentation Add missing descriptions of i915_perf_stream structure members to documentation. Cc: Umesh Nerlige Ramappa Cc: Lionel Landwerlin Cc: Robert Bragg Signed-off-by: Anna Karas Reviewed-by: Lionel Landwerlin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022101338.17048-1-anna.karas@intel.com commit c7892db5dd6afe921ead502aff7440a1e450d947 Author: Steven Price Date: Thu Oct 24 14:31:11 2019 +0100 KVM: arm64: Select TASK_DELAY_ACCT+TASKSTATS rather than SCHEDSTATS SCHEDSTATS requires DEBUG_KERNEL (and PROC_FS) and therefore isn't a good choice for enabling the scheduling statistics required for stolen time. Instead match the x86 configuration and select TASK_DELAY_ACCT and TASKSTATS. This adds the dependencies of NET && MULTIUSER for arm64 KVM. Suggested-by: Marc Zyngier Fixes: 8564d6372a7d ("KVM: arm64: Support stolen time reporting via shared structure") Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit 606be04724b6003bd00038c43eb9e1ae5e9c0993 Author: Bhanusree Date: Thu Oct 24 09:58:33 2019 +0530 drm/gpu: Add comment for memory barrier -Add comment for memory barrier -Issue found using checkpatch.pl Signed-off-by: Bhanusree Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1571891313-14341-1-git-send-email-bhanusreemahesh@gmail.com commit 2ec35bd21d3290c8f76020dc60503deacd18e24b Author: Wambui Karuga Date: Wed Oct 23 14:11:07 2019 +0300 drm/mediatek: remove cast to pointers passed to kfree Remove unnecessary casts to pointer types passed to kfree. Issue detected by coccinelle: @@ type t1; expression *e; @@ -kfree((t1 *)e); +kfree(e); Signed-off-by: Wambui Karuga Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191023111107.9972-1-wambui.karugax@gmail.com commit fa679767addededcff5b35fadb95028542e3ff0a Author: YueHaibing Date: Wed Oct 16 22:12:17 2019 +0800 pinctrl: mvebu: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191016141217.21520-1-yuehaibing@huawei.com Signed-off-by: Linus Walleij commit 6571317713c88cfcc647b58475b5dc943c16cc45 Author: YueHaibing Date: Wed Oct 16 22:10:53 2019 +0800 pinctrl: mediatek: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191016141053.23740-1-yuehaibing@huawei.com Signed-off-by: Linus Walleij commit 62db7d1e1ef125be9706541c2606c6259138e898 Author: Daniel Vetter Date: Wed Oct 23 12:12:56 2019 +0200 drm/simple-kms: Standardize arguments for callbacks Passing the wrong type feels icky, everywhere else we use the pipe as the first parameter. Spotted while discussing patches with Thomas Zimmermann. v2: Make xen compile correctly Acked-By: Thomas Zimmermann (v1) Cc: Thomas Zimmermann Cc: Noralf Trønnes Cc: Gerd Hoffmann Cc: Eric Anholt Cc: Emil Velikov Cc: virtualization@lists.linux-foundation.org Cc: Linus Walleij Reviewed-by: Linus Walleij Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191023101256.20509-1-daniel.vetter@ffwll.ch commit 3ccb8551f52edfcf16291cde07a8d49fc3976b7a Author: Pierre-Louis Bossart Date: Tue Oct 22 18:54:48 2019 -0500 soundwire: cadence_master: make clock stop exit configurable on init The use of clock stop is not a requirement, the IP can e.g. be completely power gated and not detect any wakes while in s2idle/deep sleep. For now clock-stop is not supported anyways so the control parameter is always false. This will be revisited when we add clock stop. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022235448.17586-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 9e3d47fb2bdc203c8cb63cbebdff99adcee76f5f Author: Pierre-Louis Bossart Date: Tue Oct 22 18:54:47 2019 -0500 soundwire: intel/cadence: add flag for interrupt enable Prepare for future PM support and fix error handling by disabling interrupts as needed. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022235448.17586-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit dfbe642d1ed9018271962a08602027aeb4f3f525 Author: Pierre-Louis Bossart Date: Tue Oct 22 18:54:46 2019 -0500 soundwire: intel: add helper for initialization Move code to helper for reuse in power management routines Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022235448.17586-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 675d4c9aba86cf3345bc61880e2edfd6762ef4ae Author: Pierre-Louis Bossart Date: Tue Oct 22 18:54:45 2019 -0500 soundwire: cadence_master: add hw_reset capability in debugfs Provide debugfs capability to kick link and devices into hard-reset (as defined by MIPI). This capability is really useful when some devices are no longer responsive and/or to check the software handling of resynchronization. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022235448.17586-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 49ea07d33d9a32c17e18b322e789507280ceb2a3 Author: Pierre-Louis Bossart Date: Tue Oct 22 18:54:44 2019 -0500 soundwire: intel/cadence: fix startup sequence Multiple changes squashed in single patch to avoid tick-tock effect and avoid breaking compilation/bisect 1. Per the hardware documentation, all changes to MCP_CONFIG, MCP_CONTROL, MCP_CMDCTRL and MCP_PHYCTRL need to be validated with a self-clearing write to MCP_CONFIG_UPDATE. Add a helper and do the update when the CONFIG is changed. 2. Move interrupt enable after interrupt handler registration 3. Add a new helper to start the hardware bus reset with maximum duration to make sure the Slave(s) correctly detect the reset pattern and to ensure electrical conflicts can be resolved. 4. flush command FIFOs Better error handling will be provided after interrupt disable is provided in follow-up patches. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022235448.17586-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit e58f7d15e6beb255b3907054a0536db77c979a31 Author: Alvaro Gamez Machado Date: Thu Oct 24 13:07:56 2019 +0200 spi: xilinx: Add DT support for selecting transfer word width This core supports either 8, 16 or 32 bits as word width. This value is only settable on instantiation, and thus we need to support any of them by means of the device tree. Signed-off-by: Alvaro Gamez Machado Link: https://lore.kernel.org/r/20191024110757.25820-3-alvaro.gamez@hazent.com Signed-off-by: Mark Brown commit e3354b17b4ac10ad2c23e244444ab38927a69ee9 Author: Alvaro Gamez Machado Date: Thu Oct 24 13:07:55 2019 +0200 spi: xilinx: add description of new property xlnx,num-transfer-bits This property is used to set the number of bits per transfer (bits_per_word). Xilinx' IP core allows either 8, 16 or 32, and is non changeable on runtime, only when instantiating the core. Signed-off-by: Alvaro Gamez Machado Link: https://lore.kernel.org/r/20191024110757.25820-2-alvaro.gamez@hazent.com Signed-off-by: Mark Brown commit e42599d6bbf5aa48ae8a2942946b0f6194017fdf Author: Akshu Agrawal Date: Wed Oct 23 14:29:47 2019 -0700 ASoC: rt5650: Add Kahlee platform specfic changes Add platform specific data for Kahlee project. Signed-off-by: Akshu Agrawal Signed-off-by: Shirish S Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191023212948.92246-1-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 2871ea85c119e6fb1127b30f0061436b285d3a2c Author: Chris Wilson Date: Thu Oct 24 11:03:44 2019 +0100 drm/i915/gt: Split intel_ring_submission Split the legacy submission backend from the common CS ring buffer handling. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191024100344.5041-1-chris@chris-wilson.co.uk commit 2c9a49150d90147a098ba0b39ced89d155c32820 Author: Tvrtko Ursulin Date: Thu Oct 24 10:34:40 2019 +0100 drm/i915: Convert PAT setup to uncore mmio One more thing which relied on implicit dev_priv can be covnerted to use the new mmio accessors. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191024093440.32280-1-tvrtko.ursulin@linux.intel.com commit 2579a4eefc04d1c23eef8f3f0db3309f955e5792 Author: Thomas Gleixner Date: Thu Oct 17 12:19:02 2019 +0200 x86/ioapic: Rename misnamed functions ioapic_irqd_[un]mask() are misnomers as both functions do way more than masking and unmasking the interrupt line. Both deal with the moving the affinity of the interrupt within interrupt context. The mask/unmask is just a tiny part of the functionality. Rename them to ioapic_prepare/finish_move(), fixup the call sites and rename the related variables in the code to reflect what this is about. No functional change. Signed-off-by: Thomas Gleixner Cc: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sebastian Siewior Link: https://lkml.kernel.org/r/20191017101938.412489856@linutronix.de Signed-off-by: Ingo Molnar commit df4393424af3fbdcd5c404077176082a8ce459c4 Author: Thomas Gleixner Date: Thu Oct 17 12:19:01 2019 +0200 x86/ioapic: Prevent inconsistent state when moving an interrupt There is an issue with threaded interrupts which are marked ONESHOT and using the fasteoi handler: if (IS_ONESHOT()) mask_irq(); .... cond_unmask_eoi_irq() chip->irq_eoi(); if (setaffinity_pending) { mask_ioapic(); ... move_affinity(); unmask_ioapic(); } So if setaffinity is pending the interrupt will be moved and then unconditionally unmasked at the ioapic level, which is wrong in two aspects: 1) It should be kept masked up to the point where the threaded handler finished. 2) The physical chip state and the software masked state are inconsistent Guard both the mask and the unmask with a check for the software masked state. If the line is marked masked then the ioapic line is also masked, so both mask_ioapic() and unmask_ioapic() can be skipped safely. Signed-off-by: Thomas Gleixner Cc: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sebastian Siewior Fixes: 3aa551c9b4c4 ("genirq: add threaded interrupt handler support") Link: https://lkml.kernel.org/r/20191017101938.321393687@linutronix.de Signed-off-by: Ingo Molnar commit 5bbab3cf211b4b70415de05f428fa91fb454aa41 Author: Markus Elfring Date: Sat Sep 21 18:32:46 2019 +0200 EDAC/aspeed: Use devm_platform_ioremap_resource() in aspeed_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Borislav Petkov Acked-by: Joel Stanley Cc: Andrew Jeffery Cc: James Morse Cc: kernel-janitors@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-aspeed@lists.ozlabs.org Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Stefan Schaeckeler Cc: Tony Luck Link: https://lkml.kernel.org/r/baabb9e9-a1b2-3a04-9fb6-aa632de5f722@web.de commit c2ffa00ad6152ad54940f942fc316b9c83d5e6f9 Author: Philipp Zabel Date: Tue Oct 22 16:53:25 2019 +0200 reset: document (devm_)reset_control_get_optional variants Add kerneldoc comments for the optional reset_control_get variants. Signed-off-by: Philipp Zabel commit a48108c0c20f02485b8cc3ca83652a55a0f5e47f Author: Philipp Zabel Date: Tue Oct 22 16:51:37 2019 +0200 reset: improve of_xlate documentation Mention of_reset_simple_xlate as the default if of_xlate is not set. Signed-off-by: Philipp Zabel commit 7f47211e73e93812def71004f0f81d6c3e7a0da6 Author: Chris Wilson Date: Thu Oct 24 00:53:59 2019 +0100 drm/i915/selftests: Flush any i915_active callback work as well Make trebly sure that all possible callbacks and their delayed brethren are complete before asserting that the i915_active should be idle after flushing all barriers. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191023235359.27132-1-chris@chris-wilson.co.uk commit 93100fdeb4de5b13a7f9113ede93cd062ba779f1 Author: Chris Wilson Date: Thu Oct 24 00:24:43 2019 +0100 drm/i915/selftests: Flush interrupts before disabling tasklets When setting up the system to perform the atomic reset, we need to serialise with any ongoing interrupt tasklet or else: <0> [472.951428] i915_sel-4442 0d..1 466527056us : __i915_request_submit: rcs0 fence 11659:2, current 0 <0> [472.951554] i915_sel-4442 0d..1 466527059us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes <0> [472.951681] i915_sel-4442 0d..1 466527061us : trace_ports: rcs0: submit { 11659:2, 0:0 } <0> [472.951805] i915_sel-4442 0.... 466527114us : __igt_atomic_reset_engine: i915_reset_engine(rcs0:active) under hardirq <0> [472.951932] i915_sel-4442 0d... 466527115us : intel_engine_reset: rcs0 flags=11d <0> [472.952056] i915_sel-4442 0d... 466527117us : execlists_reset_prepare: rcs0: depth<-1 <0> [472.952179] i915_sel-4442 0d... 466527119us : intel_engine_stop_cs: rcs0 <0> [472.952305] -0 1..s1 466527119us : process_csb: rcs0 cs-irq head=3, tail=4 <0> [472.952431] i915_sel-4442 0d... 466527122us : __intel_gt_reset: engine_mask=1 <0> [472.952557] -0 1..s1 466527124us : process_csb: rcs0 csb[4]: status=0x00000001:0x00000000 <0> [472.952683] -0 1..s1 466527130us : trace_ports: rcs0: promote { 11659:2*, 0:0 } <0> [472.952808] i915_sel-4442 0d... 466527131us : execlists_reset: rcs0 <0> [472.952933] i915_sel-4442 0d..1 466527133us : process_csb: rcs0 cs-irq head=3, tail=4 <0> [472.953059] i915_sel-4442 0d..1 466527134us : process_csb: rcs0 csb[4]: status=0x00000001:0x00000000 <0> [472.953185] i915_sel-4442 0d..1 466527136us : trace_ports: rcs0: preempted { 11659:2*, 0:0 } <0> [472.953310] i915_sel-4442 0d..1 466527150us : assert_pending_valid: Nothing pending for promotion! <0> [472.953436] i915_sel-4442 0d..1 466527158us : process_csb: process_csb:1930 GEM_BUG_ON(!assert_pending_valid(execlists, "promote")) We have the same CSB events being seen by process_csb() on two different processors. One being issued by the reset in the test, the other by the interrupt; this scenario is supposed to be prevented by flushing the interrupt tasklet with tasklet_disable() before we enter the atomic reset. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112069 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191023232443.17450-1-chris@chris-wilson.co.uk commit 3ab831e50c1c6a56e0400e3bc65a82645b880300 Author: Andreas Färber Date: Wed Oct 23 12:13:10 2019 +0200 reset: simple: Add Realtek RTD1195/RTD1295 Enable RESET_SIMPLE for ARCH_REALTEK. They can reuse the DesignWare bindings to avoid a new compatible. Signed-off-by: Andreas Färber Signed-off-by: Philipp Zabel commit 5ac33eebf1ba77132b52b4c7750eee795f219245 Author: Andreas Färber Date: Wed Oct 23 12:13:09 2019 +0200 reset: simple: Keep alphabetical order Restore alphabetical order for Kconfig dependencies and help text. Compatibles got out of order too, but no functional change done here. Goal is to make it obvious where to add new platforms. Fixes: 64c47b624f64 ("reset: Add reset controller support for BM1880 SoC") Fixes: 1d7592f84f92 ("reset: simple: Enable for ASPEED systems") Fixes: 96a2f50305d1 ("reset: build simple reset controller driver for Agilex") Cc: Philipp Zabel Signed-off-by: Andreas Färber Signed-off-by: Philipp Zabel commit 9d0863baff497880c1427d3ea7b89b303ace9675 Author: Josef Friedl Date: Tue Sep 10 09:04:45 2019 +0200 MAINTAINERS: add Mediatek shutdown drivers add Section in MAINTAINERS file for poweroff driver Signed-off-by: Josef Friedl Signed-off-by: Frank Wunderlich Acked-by: Sebastian Reichel Signed-off-by: Lee Jones commit d28c74c107518c4f9452e6c8f55a65125a8d6588 Author: Josef Friedl Date: Tue Sep 10 09:04:44 2019 +0200 power: reset: add driver for mt6323 poweroff add poweroff driver for mt6323 and make Makefile and Kconfig-Entries Suggested-by: Frank Wunderlich Signed-off-by: Josef Friedl Signed-off-by: Frank Wunderlich Acked-by: Sebastian Reichel Acked-by: Sean Wang Signed-off-by: Lee Jones commit 47e568129ba89c03c24052ce18165395a44bc5eb Author: Josef Friedl Date: Tue Sep 10 09:04:43 2019 +0200 rtc: mt6397: add compatible for mt6323 use mt6397 rtc driver also for mt6323 but with different base/size see "mfd: mt6323: add mt6323 rtc+pwrc" Signed-off-by: Josef Friedl Signed-off-by: Frank Wunderlich Acked-by: Alexandre Belloni Signed-off-by: Lee Jones commit 851b87148aa22ee8571380dfb22373afb7969140 Author: Josef Friedl Date: Tue Sep 10 09:04:42 2019 +0200 rtc: mt6397: improvements of rtc driver - use regmap_read_poll_timeout to drop while-loop - use devm-api to drop remove-callback Suggested-by: Alexandre Belloni Signed-off-by: Josef Friedl Signed-off-by: Frank Wunderlich Acked-by: Alexandre Belloni Signed-off-by: Lee Jones commit c512995ce9dc653111d782b130e600802da52b5f Author: Josef Friedl Date: Tue Sep 10 09:04:41 2019 +0200 rtc: mt6397: move some common definitions into rtc.h move code to separate header-file to reuse definitions later in poweroff-driver (drivers/power/reset/mt6323-poweroff.c) Suggested-by: Frank Wunderlich Signed-off-by: Josef Friedl Signed-off-by: Frank Wunderlich Acked-by: Alexandre Belloni Signed-off-by: Lee Jones commit 82245b6e9106cbc4141e1bbfa81000ea7fe32ac6 Author: Josef Friedl Date: Tue Sep 10 09:04:40 2019 +0200 dt-bindings: rtc: mediatek: add missing mt6397 rtc add missing devicetree-binding document for mt6397 rtc in later patch driver is extended with mt6323 chip Suggested-By: Alexandre Belloni Signed-off-by: Josef Friedl Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit acd1f04679803af84e7ab76f37df30d8598b07b9 Author: Chengguang Xu Date: Wed Oct 23 21:56:43 2019 +0800 ext2: return error when fail to allocating memory in ioctl Currently, we do not check memory allocation result for ei->i_block_alloc_info in ioctl, this patch checks it and returns error in failure case. Link: https://lore.kernel.org/r/20191023135643.28837-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit f45f57cce5841516bc53026b91952984d52e7126 Author: Christian König Date: Fri Oct 18 16:30:19 2019 +0200 dma-buf: stop using the dmabuf->lock so much v2 The attachment list is now protected by the dma_resv object. Stop holding the dma_buf->lock while calling ->attach/->detach, this allows for concurrent attach/detach operations. v2: cleanup commit message and locking in _debug_show() Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/336790 commit 15fd552d186cb0df34b9d36a07dd6677c4da56bc Author: Christian König Date: Tue Jul 3 16:42:26 2018 +0200 dma-buf: change DMA-buf locking convention v3 This patch is a stripped down version of the locking changes necessary to support dynamic DMA-buf handling. It adds a dynamic flag for both importers as well as exporters so that drivers can choose if they want the reservation object locked or unlocked during mapping of attachments. For compatibility between drivers we cache the DMA-buf mapping during attaching an importer as soon as exporter/importer disagree on the dynamic handling. Issues and solutions we considered: - We can't change all existing drivers, and existing improters have strong opinions about which locks they're holding while calling dma_buf_attachment_map/unmap. Exporters also have strong opinions about which locks they can acquire in their ->map/unmap callbacks, levaing no room for change. The solution to avoid this was to move the actual map/unmap out from this call, into the attach/detach callbacks, and cache the mapping. This works because drivers don't call attach/detach from deep within their code callchains (like deep in memory management code called from cs/execbuf ioctl), but directly from the fd2handle implementation. - The caching has some troubles on some soc drivers, which set other modes than DMA_BIDIRECTIONAL. We can't have 2 incompatible mappings, and we can't re-create the mapping at _map time due to the above locking fun. We very carefuly step around that by only caching at attach time if the dynamic mode between importer/expoert mismatches. - There's been quite some discussion on dma-buf mappings which need active cache management, which would all break down when caching, plus we don't have explicit flush operations on the attachment side. The solution to this was to shrug and keep the current discrepancy between what the dma-buf docs claim and what implementations do, with the hope that the begin/end_cpu_access hooks are good enough and that all necessary flushing to keep device mappings consistent will be done there. v2: cleanup set_name merge, improve kerneldoc v3: update commit message, kerneldoc and cleanup _debug_show() Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/336788/ commit 4f5c5b76cc00ccf5be89a2b9883feba3baf6eb2e Author: Michael Ellerman Date: Mon Oct 14 10:26:34 2019 +1100 selftests/powerpc: Reduce sigfuz runtime to ~60s The defaults for the sigfuz test is to run for 4000 iterations, but that can take quite a while and the test harness may kill the test. Reduce the number of iterations to 600, which gives a runtime of roughly 1 minute on a Power8 system. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191013234643.3430-1-mpe@ellerman.id.au commit b298800dd8ee7250bf04b4dbd151e1a971b6df91 Author: Chris Chiu Date: Wed Oct 23 18:54:07 2019 +0800 rtl8xxxu: fix warnings for symbol not declared Fix the following sparse warnings. sparse: symbol 'rtl8723bu_set_coex_with_type' was not declared. Should it be static? sparse: symbol 'rtl8723bu_update_bt_link_info' was not declared. Should it be static? sparse: symbol 'rtl8723bu_handle_bt_inquiry' was not declared. Should it be static? sparse: symbol 'rtl8723bu_handle_bt_info' was not declared. Should it be static? Signed-off-by: Chris Chiu Signed-off-by: Kalle Valo commit 4fcef86091327d92008ca0328d45075343e7edea Author: YueHaibing Date: Wed Oct 23 15:53:42 2019 +0800 rtl8xxxu: remove set but not used variable 'rate_mask' drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4484:6: warning: variable rate_mask set but not used [-Wunused-but-set-variable] It is never used since commit a9bb0b515778 ("rtl8xxxu: Improve TX performance of RTL8723BU on rtl8xxxu driver") Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit d0c160b18ef5a353d8b9e1c7b616d1083c1b010b Author: YueHaibing Date: Wed Oct 23 15:40:19 2019 +0800 atmel: remove set but not used variable 'dev' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/atmel/atmel_cs.c:120:21: warning: variable dev set but not used [-Wunused-but-set-variable] It is never used, so can remove it. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit f64b06bd362a6d9e22a2a23dacd50882c1418eff Author: YueHaibing Date: Wed Oct 23 15:38:42 2019 +0800 adm80211: remove set but not used variables 'mem_addr' and 'io_addr' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/admtek/adm8211.c:1784:16: warning: variable mem_addr set but not used [-Wunused-but-set-variable] drivers/net/wireless/admtek/adm8211.c:1785:15: warning: variable io_addr set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 091c6e9c083f7ebaff00b37ad13562d51464d175 Author: Nathan Chancellor Date: Tue Oct 22 17:47:03 2019 -0700 rtlwifi: Remove unnecessary NULL check in rtl_regd_init When building with Clang + -Wtautological-pointer-compare: drivers/net/wireless/realtek/rtlwifi/regd.c:389:33: warning: comparison of address of 'rtlpriv->regd' equal to a null pointer is always false [-Wtautological-pointer-compare] if (wiphy == NULL || &rtlpriv->regd == NULL) ~~~~~~~~~^~~~ ~~~~ 1 warning generated. The address of an array member is never NULL unless it is the first struct member so remove the unnecessary check. This was addressed in the staging version of the driver in commit f986978b32b3 ("Staging: rtlwifi: remove unnecessary NULL check"). While we are here, fix the following checkpatch warning: CHECK: Comparison to NULL could be written "!wiphy" 35: FILE: drivers/net/wireless/realtek/rtlwifi/regd.c:389: + if (wiphy == NULL) Fixes: 0c8173385e54 ("rtl8192ce: Add new driver") Link:https://github.com/ClangBuiltLinux/linux/issues/750 Signed-off-by: Nathan Chancellor Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit 082a36dc9995d581db42f47055287e4974e3825c Author: Tsang-Shian Lin Date: Tue Oct 22 18:04:20 2019 +0800 rtw88: add phy_info debugfs to show Tx/Rx physical status This commit adds several Tx/Rx physical information to phy_info debugfs for 8822B/8822C. By this debugfs, we can know physical information, such as Tx/Rx rate, RSSI, EVM,SNR, etc. The information is gotten from the packets of Tx/Rx path. It has no impact for the performance of 8822B/8822C. In the fields, we may meet different kinds of problems, but we may have no professional instrument to check them. At this moment, this debugfs is a good tool, and it may provide useful information for debug. Signed-off-by: Tsang-Shian Lin Signed-off-by: Yan-Hsuan Chuang Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit f39e9bd49a3d612a2489b774265107f61ffd82fa Author: Tzu-En Huang Date: Tue Oct 22 18:04:19 2019 +0800 rtw88: add set_bitrate_mask support Support setting bit rate from upper layer. After configuring the original rate control result in the driver, the result is then masked by the bit rate mask received from the ops set_bitrate_mask. Lastly, the masked result will be sent to firmware. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit 0bd9557341b7fb44bf591921d7feb4dcf4f4bb52 Author: Tzu-En Huang Date: Tue Oct 22 18:04:18 2019 +0800 rtw88: Enable 802.11ac beamformee support Enable MU-MIMO transmit beamformee support for chipset 8822b and 8822c. If the driver is in station mode and associated with an AP, and the capabilities of both meet the requirement of beamforming, driver will run as a beamformee and the corresponding chip settings will be set. In addition, module parameter support_bf is added to enable or disable beamforming. Sometimes driver will need to disable for inter-operate issues, and it would be easier for driver to debug. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit c97ee3e0bea29827f4b44276fc792bd32977edb0 Author: Tzu-En Huang Date: Tue Oct 22 18:04:17 2019 +0800 rtw88: add power tracking support The temperature of the chip can affect the output power of the RF components. Hence driver requires to compensate the power by adjusting the power index recorded in the power swing table. And if the difference of current thermal value to the default thermal value exceeds a threshold, the RF IQK should be triggered to re-calibrate the characteristics of the RF components, to keep the output IQ vectors of the RF components orthogonal enough. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit 8575b534b0006dcfc539cbe079bcfbda52576fac Author: Yan-Hsuan Chuang Date: Tue Oct 22 18:04:16 2019 +0800 rtw88: use macro to check the current band Add macros to see which band we are, based on the current channel. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 844e9d7c60a4233ad363a3420b5ee0577dfacf6e Author: Yadav Lamichhane Date: Mon Oct 21 23:35:13 2019 +0530 bcma: fix block comment style Fix a coding style issue. Signed-off-by: Yadav Lamichhane Signed-off-by: Kalle Valo commit 2409839ab6bfa28b8451cf9ef7df5a8b0e0a82af Author: Thomas Bogendoerfer Date: Tue Oct 22 15:09:19 2019 +0200 MIPS: include: remove unsued header file asm/sgi/sgi.h asm/sgi/sgi.h is unused, time to remove it. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 337d866a8014987dd45cf138ddcb9eca1ae44d56 Author: YueHaibing Date: Wed Oct 23 15:36:26 2019 +0800 net: lan78xx: remove set but not used variable 'event' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/usb/lan78xx.c:3995:6: warning: variable event set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 8ef0c0409e6bd42ec63a405f27ed632bb45f905c Merge: 06cd9da58fb2 bc9f6e94bcb5 Author: David S. Miller Date: Wed Oct 23 21:31:31 2019 -0700 Merge branch 'mlxsw-Update-main-pool-computation-and-pool-size-limits' Ido Schimmel says: ==================== mlxsw: Update main pool computation and pool size limits Petr says: In Spectrum ASICs, the shared buffer is an area of memory where packets are kept until they can be transmitted. There are two resources associated with shared buffer size: cap_total_buffer_size and cap_guaranteed_shared_buffer. So far, mlxsw has been using the former as a limit when validating shared buffer pool size configuration. However, the total size also includes headrooms and reserved space, which really cannot be used for shared buffer pools. Patch #1 mends this and has mlxsw use the guaranteed size. To configure default pool sizes, mlxsw has historically hard-coded one or two smallish pools, and one "main" pool that took most of the shared buffer (that would be pool 0 on ingress and pool 4 on egress). During the development of Spectrum-2, it became clear that the shared buffer size keeps shrinking as bugs are identified and worked around. In order to prevent having to tweak the size of pools 0 and 4 to catch up with updates to values reported by the FW, patch #2 changes the way these pools are set. Instead of hard-coding a fixed value, the main pool now takes whatever is left from the guaranteed size after the smaller pool(s) are taken into account. ==================== Signed-off-by: David S. Miller commit bc9f6e94bcb5652860c1b3bc82ca27697c496b4d Author: Petr Machata Date: Wed Oct 23 09:05:00 2019 +0300 mlxsw: spectrum_buffers: Calculate the size of the main pool Instead of hard-coding the size of the largest pool, calculate it from the reported guaranteed shared buffer size and sizes of other pools (currently only the CPU port pool). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 914c4fc1b792dd963f9606b2e8b33e3d6606eb84 Author: Petr Machata Date: Wed Oct 23 09:04:59 2019 +0300 mlxsw: spectrum: Use guaranteed buffer size as pool size limit There are two resources associated with shared buffer size: cap_total_buffer_size, and cap_guaranteed_shared_buffer. So far, mlxsw has been using the former as a limit to determine how large a pool size is allowed to be. However, the total size also includes headrooms and reserved space, which really cannot be used for shared buffer pools. Therefore convert mlxsw to use the latter resource as a limit. Adjust hard-coded pool sizes to be the guaranteed size minus 256000 bytes for CPU port pool. On Spectrum-1 that actually leads to an increase. A follow-up patch will have this size calculated automatically. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e942242784d0fe4bae957357dfa873af364c684e Author: Thomas Bogendoerfer Date: Tue Oct 22 18:13:15 2019 +0200 MIPS: SGI-IP27: reduce ARC usage to a minimum IP27 uses ARC prom only for parsing prom arguments and has a hack for IP27 to make the ARC code behave. By introducing config symbol ARC_CMDLINE_ONLY IP27 only drags in ARC cmdline parsing and does everything else in IP27 specific code. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 7b16831d1eb1d2f2cbca6f01700a20a73aad57c0 Author: Thomas Bogendoerfer Date: Tue Oct 22 18:13:14 2019 +0200 MIPS: arc: use function argument for passing argc/argv to prom_init_cmdline prom_argc and prom_argv are only used by prom_init_cmdline(), so we could pass them directly as function argument. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit cbd09241dd9db02caceb958b9ceb9e91762a0572 Author: Thomas Bogendoerfer Date: Tue Oct 22 18:13:13 2019 +0200 MIPS: arc: remove unused stuff remove unused _prom_envp and prom_argc macro. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit c823f416097879515a02f3d97aecc1204ffc0773 Author: Thomas Bogendoerfer Date: Tue Oct 22 18:13:12 2019 +0200 MIPS: SGI-IP27: move registering of smp ops into IP27 specific code Calling register_smp_ops() in plat_mem_setup() is still early enough. So by doing this we could remove the ugly #ifdef CONFIG_SGI_IP27 in fw/arc/init.c. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 249be5633cdb31d8daf01326b3bf02733d7d7e9a Author: Thomas Bogendoerfer Date: Tue Oct 22 18:13:11 2019 +0200 MIPS: SGI-IP27: collect externs in new header file IP27 code has a few externs distributed over .c files. Collect them together into one commcon header file. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit e02d026f08f1fedb8c94d6f659ccc7c6ce1043f3 Author: Rikard Falkeborn Date: Tue Oct 22 21:25:47 2019 +0200 MIPS: Loongson: Fix GENMASK misuse Arguments are supposed to be ordered high then low. Fixes: 6a6f9b7dafd50efc1b2 ("MIPS: Loongson: Add CFUCFG&CSR support") Signed-off-by: Rikard Falkeborn Reviewed-by: Huacai Chen Signed-off-by: Paul Burton Cc: chenhuacai@gmail.com Cc: jhogan@kernel.org Cc: jiaxun.yang@flygoat.com Cc: linux-mips@linux-mips.org Cc: linux-mips@vger.kernel.org Cc: paul.burton@mips.com Cc: ralf@linux-mips.org Cc: wuzhangjin@gmail.com Cc: zhangfx@lemote.com commit 06cd9da58fb25526bd1a4b0f36e25e1a8824ea1f Author: Heiner Kallweit Date: Tue Oct 22 21:30:57 2019 +0200 r8169: never set PCI_EXP_DEVCTL_NOSNOOP_EN Setting PCI_EXP_DEVCTL_NOSNOOP_EN for certain chip versions had been added to the vendor driver more than 10 years ago, and copied from there to r8169. It has been removed from the vendor driver meanwhile and I think we can safely remove this too. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 2ebc499a0f4f7984b50b27044a337409df9292b3 Merge: 406715df933a b9bcb95315fe Author: David S. Miller Date: Wed Oct 23 20:42:53 2019 -0700 Merge branch 'net-phy-support-1000Base-X-auto-negotiation-for-BCM54616S' Tao Ren says: ==================== net: phy: support 1000Base-X auto-negotiation for BCM54616S This patch series aims at supporting auto negotiation when BCM54616S is running in 1000Base-X mode: without the patch series, BCM54616S PHY driver would report incorrect link speed in 1000Base-X mode. Patch #1 (of 3) modifies assignment to OR when dealing with dev_flags in phy_attach_direct function, so that dev_flags updated in BCM54616S PHY's probe callback won't be lost. Patch #2 (of 3) adds several genphy_c37_* functions to support clause 37 1000Base-X auto-negotiation, and these functions are called in BCM54616S PHY driver. Patch #3 (of 3) detects BCM54616S PHY's operation mode and calls according genphy_c37_* functions to configure auto-negotiation and parse link attributes (speed, duplex, and etc.) in 1000Base-X mode. ==================== Signed-off-by: David S. Miller commit b9bcb95315febd09419ab870ddc7cb98a393f9d0 Author: Tao Ren Date: Tue Oct 22 11:31:08 2019 -0700 net: phy: broadcom: add 1000Base-X support for BCM54616S The BCM54616S PHY cannot work properly in RGMII->1000Base-X mode, mainly because genphy functions are designed for copper links, and 1000Base-X (clause 37) auto negotiation needs to be handled differently. This patch enables 1000Base-X support for BCM54616S by customizing 3 driver callbacks, and it's verified to be working on Facebook CMM BMC platform (RGMII->1000Base-KX): - probe: probe callback detects PHY's operation mode based on INTERF_SEL[1:0] pins and 1000X/100FX selection bit in SerDES 100-FX Control register. - config_aneg: calls genphy_c37_config_aneg when the PHY is running in 1000Base-X mode; otherwise, genphy_config_aneg will be called. - read_status: calls genphy_c37_read_status when the PHY is running in 1000Base-X mode; otherwise, genphy_read_status will be called. Note: BCM54616S PHY can also be configured in RGMII->100Base-FX mode, and 100Base-FX support is not available as of now. Signed-off-by: Tao Ren Acked-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit fa6e98cee558622565c97924e922b97340aeabd8 Author: Heiner Kallweit Date: Tue Oct 22 11:31:07 2019 -0700 net: phy: add support for clause 37 auto-negotiation This patch adds support for clause 37 1000Base-X auto-negotiation. Signed-off-by: Heiner Kallweit Signed-off-by: Tao Ren Tested-by: René van Dorst Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e7312efbd5dec50d791dd98bd92ec9ae4f05a832 Author: Tao Ren Date: Tue Oct 22 11:31:06 2019 -0700 net: phy: modify assignment to OR for dev_flags in phy_attach_direct Modify the assignment to OR when dealing with phydev->dev_flags in phy_attach_direct function, and this is to make sure dev_flags set in driver's probe callback won't be lost. Suggested-by: Andrew Lunn CC: Heiner Kallweit CC: Vladimir Oltean Signed-off-by: Tao Ren Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e32beb064105e13d4db0b03b4da7142065db1b34 Author: Sudeep Holla Date: Wed Oct 23 13:18:51 2019 +0100 cpufreq: vexpress-spc: find and skip duplicates when merging frequencies Currently the cpufreq core aborts the validation and return error immediately when it encounter duplicate frequency table entries. This change was introduced long back since commit da0c6dc00c69 ("cpufreq: Handle sorted frequency tables more efficiently"). However, this missed the testing with modified firmware for long time. Inorder to make it work with default settings, we need to ensure the merged table for bL switcher contains no duplicates. Find the duplicates and skip them when merging the frequenct tables of A15 and A7 clusters. Cc: Viresh Kumar Cc: "Rafael J. Wysocki" Signed-off-by: Sudeep Holla Signed-off-by: Viresh Kumar commit 4a6e135238798144ca8a2eab65018521c66240da Author: Sudeep Holla Date: Wed Oct 23 12:08:10 2019 +0100 cpufreq: vexpress-spc: use macros instead of hardcoded values for cluster ids A15 and A7 cluster identifiers are fixed to 0 and 1 respectively. There are macros for the same and used in most of the places except this instance. Lets use macros instead of hardcoded values for cluster ids even here. Cc: Viresh Kumar Cc: "Rafael J. Wysocki" Signed-off-by: Sudeep Holla Signed-off-by: Viresh Kumar commit becbe95e434ea72d10929ef8c6572bfd08fd8557 Merge: a4e86630a12b 72c630020b24 Author: Olof Johansson Date: Wed Oct 23 20:04:36 2019 -0700 Merge tag 'arm-soc/for-5.5/soc' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom ARM-based SoCs machine/Kconfig updates for 5.5, please pull the following: - Stefan adds a machine descriptor for BCM2711 (Raspberry Pi 4) which sets up the appropriate DMA aperture for the Pi peripherals to work (1GB window at 3GB offset) - Ben fixes a number of sparse warnings for the Kona SMC code and the BCM2836 SMP code * tag 'arm-soc/for-5.5/soc' of https://github.com/Broadcom/stblinux: ARM: bcm: fix missing __iomem in bcm_kona_smc.c ARM: bcm: include local platsmp.h for bcm2836_smp_ops ARM: bcm: Add support for BCM2711 SoC Link: https://lore.kernel.org/r/20191023212814.30622-4-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 3c1aa0c0cb5cc7bffb1298525d1628a8129b185e Merge: a2c5b19890a0 b61d3e87b6ab Author: Olof Johansson Date: Wed Oct 23 20:00:48 2019 -0700 Merge tag 'arm-soc/for-5.5/drivers' of https://github.com/Broadcom/stblinux into arm/drivers This pull request contains Broadcom ARM/ARM64/MIPS based SoCs drivers updates for 5.5, please pull the following: - Markus updates the DPFE driver so as to support deferring the firmware loading process until the first sysfs attribute is accessed, in the process he does a bunch of cleanups and minor fixes - Florian adds support for the DPFE on 7211 which uses a "new style" API v2 and makes necessary changes along the way * tag 'arm-soc/for-5.5/drivers' of https://github.com/Broadcom/stblinux: memory: brcmstb: dpfe: Fixup API version/commands for 7211 memory: brcmstb: dpfe: Compute checksum at __send_command() time memory: brcmstb: dpfe: support for deferred firmware download memory: brcmstb: dpfe: pass *priv as argument to brcmstb_dpfe_download_firmware() memory: brcmstb: dpfe: move init_data into brcmstb_dpfe_download_firmware() memory: brcmstb: dpfe: add locking around DCPU enable/disable memory: brcmstb: dpfe: initialize priv->dev memory: brcmstb: dpfe: rename struct private_data Link: https://lore.kernel.org/r/20191023212814.30622-2-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 71dd33b90119ff4b1e611ee8b9166cf4d2efbe7d Merge: 044393a7b331 4c365e231bd1 Author: Olof Johansson Date: Wed Oct 23 19:59:54 2019 -0700 Merge tag 'arm-soc/for-5.5/devicetree' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoCs Device Tree updates for 5.5, please pull the following: - Stefan paves the way for supporting the Raspberry Pi 4 and gets rid of a bunch of dtc checker warnings by removing incorrect nodes/properties, moving BCM2835/6/7 specific nodes into the appropriate DTS, converts Raspberry Pi boards to JSON schema, and finally adds minimal Raspberry Pi 4 model B support - Dan adds support for the Luxul XWC-2000 router based on the BCM47094 SoC - Chris adds a proper label to the Hurricane 2 watchdog controller node * tag 'arm-soc/for-5.5/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: bcm: HR2: add label to sp805 watchdog ARM: dts: BCM5301X: Add DT for Luxul XWC-2000 arm64: dts: broadcom: Add reference to RPi 4 B ARM: dts: Add minimal Raspberry Pi 4 support dt-bindings: arm: bcm2835: Add Raspberry Pi 4 to DT schema dt-bindings: arm: Convert BCM2835 board/soc bindings to json-schema ARM: dts: bcm283x: Move BCM2835/6/7 specific to bcm2835-common.dtsi ARM: dts: bcm283x: Remove brcm,bcm2835-pl011 compatible ARM: dts: bcm283x: Remove simple-bus from fixed clocks Link: https://lore.kernel.org/r/20191023212814.30622-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 1aa6300638e74c15bca3e1f94e04c64eafe81f27 Author: Ben Dooks (Codethink) Date: Tue Oct 22 09:53:50 2019 -0700 xfs: add mising include of xfs_pnfs.h for missing declarations The xfs_pnfs.c file is missing an include of xfs_pnfs.h to add the prototypes of the functions it exports. Include this file to fix the following sparse warnings: fs/xfs/xfs_pnfs.c:27:1: warning: symbol 'xfs_break_leased_layouts' was not declared. Should it be static? fs/xfs/xfs_pnfs.c:52:1: warning: symbol 'xfs_fs_get_uuid' was not declared. Should it be static? fs/xfs/xfs_pnfs.c:77:1: warning: symbol 'xfs_fs_map_blocks' was not declared. Should it be static? fs/xfs/xfs_pnfs.c:226:1: warning: symbol 'xfs_fs_commit_blocks' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit da781e64b28c1d72f84bab6a884359c9c8d522aa Author: Brian Foster Date: Mon Oct 21 09:26:48 2019 -0700 xfs: don't set bmapi total block req where minleft is xfs_bmapi_write() takes a total block requirement parameter that is passed down to the block allocation code and is used to specify the total block requirement of the associated transaction. This is used to try and select an AG that can not only satisfy the requested extent allocation, but can also accommodate subsequent allocations that might be required to complete the transaction. For example, additional bmbt block allocations may be required on insertion of the resulting extent to an inode data fork. While it's important for callers to calculate and reserve such extra blocks in the transaction, it is not necessary to pass the total value to xfs_bmapi_write() in all cases. The latter automatically sets minleft to ensure that sufficient free blocks remain after the allocation attempt to expand the format of the associated inode (i.e., such as extent to btree conversion, btree splits, etc). Therefore, any callers that pass a total block requirement of the bmap mapping length plus worst case bmbt expansion essentially specify the additional reservation requirement twice. These callers can pass a total of zero to rely on the bmapi minleft policy. Beyond being superfluous, the primary motivation for this change is that the total reservation logic in the bmbt code is dubious in scenarios where minlen < maxlen and a maxlen extent cannot be allocated (which is more common for data extent allocations where contiguity is not required). The total value is based on maxlen in the xfs_bmapi_write() caller. If the bmbt code falls back to an allocation between minlen and maxlen, that allocation will not succeed until total is reset to minlen, which essentially throws away any additional reservation included in total by the caller. In addition, the total value is not reset until after alignment is dropped, which means that such callers drop alignment far too aggressively than necessary. Update all callers of xfs_bmapi_write() that pass a total block value of the mapping length plus bmbt reservation to instead pass zero and rely on xfs_bmapi_minleft() to enforce the bmbt reservation requirement. This trades off slightly less conservative AG selection for the ability to preserve alignment in more scenarios. xfs_bmapi_write() callers that incorporate unrelated or additional reservations in total beyond what is already included in minleft must continue to use the former. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1c743574de8b5a47c323c0dc3089985b38f83390 Author: Dave Chinner Date: Mon Oct 21 09:26:34 2019 -0700 xfs: cap longest free extent to maximum allocatable Cap longest extent to the largest we can allocate based on limits calculated at mount time. Dynamic state (such as finobt blocks) can result in the longest free extent exceeding the size we can allocate, and that results in failure to align full AG allocations when the AG is empty. Result: xfs_io-4413 [003] 426.412459: xfs_alloc_vextent_loopfailed: dev 8:96 agno 0 agbno 32 minlen 243968 maxlen 244000 mod 0 prod 1 minleft 1 total 262148 alignment 32 minalignslop 0 len 0 type NEAR_BNO otype START_BNO wasdel 0 wasfromfl 0 resv 0 datatype 0x5 firstblock 0xffffffffffffffff minlen and maxlen are now separated by the alignment size, and allocation fails because args.total > free space in the AG. [bfoster: Added xfs_bmap_btalloc() changes.] Signed-off-by: Dave Chinner Signed-off-by: Carlos Maiolino Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit cb3efd5a38855eabd26c2b631dd027169678d60f Author: Lars-Peter Clausen Date: Wed Oct 23 13:52:23 2019 -0700 Input: adp5589 - make keypad support optional On some platforms the adp5589 is used in GPIO only mode. On these platforms we do not want to register a input device, so make that optional and only create the input device if a keymap is supplied. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20191023070541.13940-1-alexandru.ardelean@analog.com [dtor: dropped unnecessary changes related to passing pdata to various functions] Signed-off-by: Dmitry Torokhov commit ee1b4b2e7c92f892855175e564e091130a59d707 Author: Arnd Bergmann Date: Wed Oct 23 13:37:21 2019 -0700 Input: hp_sdc_rtc - remove dead chardev code The driver contains half of the implementation of /dev/rtc, but this was never completed, and it is now incompatible with the drivers/rtc framework. Remove the chardev completely. If anyone wants to add the functionality later, that shoudl be done through rtc_register_device(). The remaining portions of the driver basically implement a single procfs file that may or may not be used anywhere. Not sure why this is in drivers/input/ though. Signed-off-by: Arnd Bergmann Acked-by: Alexandre Belloni Acked-by: Helge Deller Link: https://lore.kernel.org/r/20191023142521.3643152-1-arnd@arndb.de Signed-off-by: Dmitry Torokhov commit 8eb8e322ec07392e8c8008437216c38c310ff6c7 Author: Zhenyu Wang Date: Wed Oct 23 17:43:27 2019 +0800 drm/i915/gvt: fix dead locking in early workload shadow As early workload scan and shadow happens in execlist mmio handler, which has already taken vgpu_lock. So remove extra lock taking here. Fixes: 952f89f098c7 ("drm/i915/gvt: Wean off struct_mutex") Cc: Chris Wilson Signed-off-by: Zhenyu Wang Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson commit 8a99358a1d8e4987f9b2b9cbb5e31a44f9c4c674 Author: Linus Walleij Date: Fri Jan 4 23:27:02 2019 +0100 ata: ahci-imx: Covert to use GPIO descriptor This converts the i.MX AHCI driver to use a GPIO descriptor instead of parsing the device tree by itself. This driver is quite obviously device tree only, and the GPIO line is treated as optional, so let's keep it as optional. None of the device trees in the kernel use this GPIO facility today, so it is hard to test. Cc: Egor Starkov Cc: Richard Zhu Signed-off-by: Linus Walleij commit 058179e72e0956a2dfe4927db6cbe5fbfb2406aa Author: Chris Wilson Date: Wed Oct 23 14:31:08 2019 +0100 drm/i915/gt: Replace hangcheck by heartbeats Replace sampling the engine state every so often with a periodic heartbeat request to measure the health of an engine. This is coupled with the forced-preemption to allow long running requests to survive so long as they do not block other users. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Jon Bloomfield Reviewed-by: Jon Bloomfield Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191023133108.21401-5-chris@chris-wilson.co.uk commit 2e0986a58cc4f2e7f9e7ede19ec32b9c116d0068 Author: Chris Wilson Date: Wed Oct 23 14:31:07 2019 +0100 drm/i915/gem: Cancel contexts when hangchecking is disabled Normally, we rely on our hangcheck to prevent persistent batches from hogging the GPU. However, if the user disables hangcheck, this mechanism breaks down. Despite our insistence that this is unsafe, the users are equally insistent that they want to use endless batches and will disable the hangcheck mechanism. We are looking at replacing hangcheck, in the next patch, with a softer mechanism, that sends a pulse down the engine to check if it is well. We can use the same preemptive pulse to flush an active context off the GPU upon context close, preventing resources being lost and unkillable requests remaining on the GPU after process termination. Testcase: igt/gem_ctx_exec/basic-nohangcheck Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Michał Winiarski Cc: Jon Bloomfield Reviewed-by: Jon Bloomfield Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191023133108.21401-4-chris@chris-wilson.co.uk commit d12acee84ffb07c2eb11bbb676908b3827b42598 Author: Chris Wilson Date: Wed Oct 23 14:31:06 2019 +0100 drm/i915/execlists: Cancel banned contexts on schedule-out On schedule-out (CS completion) of a banned context, scrub the context image so that we do not replay the active payload. The intent is that we skip banned payloads on request submission so that the timeline advancement continues on in the background. However, if we are returning to a preempted request, i915_request_skip() is ineffective and instead we need to patch up the context image so that it continues from the start of the next request. v2: Fixup cancellation so that we only scrub the payload of the active request and do not short-circuit the breadcrumbs (which might cause other contexts to execute out of order). v3: Grammar pass Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191023133108.21401-3-chris@chris-wilson.co.uk commit 3a7a92aba8fb77162e1e9963360fd81fc15c39a5 Author: Chris Wilson Date: Wed Oct 23 14:31:05 2019 +0100 drm/i915/execlists: Force preemption If the preempted context takes too long to relinquish control, e.g. it is stuck inside a shader with arbitration disabled, evict that context with an engine reset. This ensures that preemptions are reasonably responsive, providing a tighter QoS for the more important context at the cost of flagging unresponsive contexts more frequently (i.e. instead of using an ~10s hangcheck, we now evict at ~100ms). The challenge of lies in picking a timeout that can be reasonably serviced by HW for typical workloads, balancing the existing clients against the needs for responsiveness. Note that coupled with timeslicing, this will lead to rapid GPU "hang" detection with multiple active contexts vying for GPU time. The forced preemption mechanism can be compiled out with ./scripts/config --set-val DRM_I915_PREEMPT_TIMEOUT 0 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191023133108.21401-2-chris@chris-wilson.co.uk commit a8c51ed22b0ef20205180baa8ed30e05ea6f8505 Author: Chris Wilson Date: Wed Oct 23 14:31:04 2019 +0100 drm/i915/gt: Try to more gracefully quiesce the system before resets If we are doing a normal GPU reset triggered after detecting a long period of stalled work, we can take our time and allow the engines to quiesce. Since we've stopped submission to the engine, and if we wait long enough an innocent context should complete, leaving the engine idle. So by waiting a short amount of time, we should prevent clobbering other users when resetting a stuck context. Suggested-by: Joonas Lahtinen Suggested-by: Jon Bloomfield Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191023133108.21401-1-chris@chris-wilson.co.uk commit a1ceb93a824aaaa8323c90ada987099ce44768c0 Author: Robert M. Fosha Date: Tue Oct 22 09:37:53 2019 -0700 drm/i915/guc: Update H2G enable logging action definition GuC enable logging H2G action definition changed some time ago from 0xE000 to 0x40. All current GuC FW blobs use this definition, so fix the action definition in driver to match. Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Signed-off-by: Robert M. Fosha Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20191022163754.23870-2-robert.m.fosha@intel.com commit 853ddb699396c9831d793b28e49d40248da472d5 Author: Robert M. Fosha Date: Tue Oct 22 09:37:52 2019 -0700 drm/i915/guc: Enable guc logging on guc log relay write Creating and opening the GuC log relay file enables and starts the relay potentially before the caller is ready to consume logs. Change the behavior so that relay starts only on an explicit call to the write function (with a value of '1'). Other values flush the log relay as before. v2: Style changes and fix typos. Add guc_log_relay_stop() function. (Daniele) Cc: Matthew Brost Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Signed-off-by: Robert M. Fosha Reviewed-by: Matthew Brost Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20191022163754.23870-1-robert.m.fosha@intel.com commit 2cdc74310ee6c627512932beaa2d26c7ecb2f4fb Merge: b446bbfd3a89 ec2b31267263 Author: Olof Johansson Date: Wed Oct 23 13:22:09 2019 -0700 Merge tag 'omap-for-v5.5/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/defconfig Defconfig changes for omap2plus_defconfig for v5.5 A series of changes from Adam Ford to update for removed and moved items, and then enable crypto devices and MT9P031 video as loadable modules. Looks like I missed unifying the subject line for one commit, but I did not want to mess with the commit after pushing it out. * tag 'omap-for-v5.5/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: configs: omap2plus: Enable VIDEO_MT9P031 module ARM: omap2plus_defconfig: Enable HW Crypto engine modules ARM: omap2plus_defconfig: Update for moved item ARM: omap2plus_defconfig: Update for removed items Link: https://lore.kernel.org/r/pull-1571853258-16998@atomide.com Signed-off-by: Olof Johansson commit b446bbfd3a89c7118d9213f8234f3302126514ec Merge: 94aade94585f 17a9e5bbbfe5 Author: Olof Johansson Date: Mon Oct 21 12:06:46 2019 -0700 Merge tag 'omap-for-v5.4/fixes-rc3-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fixes for omaps for v5.4-rc cycle More fixes for omap variants: - Update more panel options in omap2plus_defconfig that got changed as we moved to use generic LCD panels - Remove unused twl_keypad for logicpd-torpedo-som to avoid boot time warnings. This is only a cosmetic fix, but at least dmesg output is now getting more readable after all the fixes to remove pointless warnings - Fix gpu_cm node name as we still have a non-standard node name dependency for clocks. This should eventually get fixed by use of domain specific compatible property - Fix use of i2c-mux-idle-disconnect for m3874-iceboard - Use level interrupt for omap4 & 5 wlcore to avoid lost edge interrupts * tag 'omap-for-v5.4/fixes-rc3-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Use level interrupt for omap4 & 5 wlcore ARM: dts: am3874-iceboard: Fix 'i2c-mux-idle-disconnect' usage ARM: dts: omap5: fix gpu_cm clock provider name ARM: dts: logicpd-torpedo-som: Remove twl_keypad ARM: omap2plus_defconfig: Fix selected panels after generic panel changes Link: https://lore.kernel.org/r/pull-1571242890-118432@atomide.com Signed-off-by: Olof Johansson commit a2c5b19890a07ed08f662e6e50589ef640088e8e Merge: a362687404ed 1819ef2e2d12 Author: Olof Johansson Date: Wed Oct 23 13:18:23 2019 -0700 Merge tag 'omap-for-v5.5/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/drivers Changes for ti-sysc interconnect target module driver for v5.5 A series of changes from Tero Kristo for rpm reset control driver to deal with the ordering requirements between clocks and resets, and two changes to deal with quirks for musb otg device. * tag 'omap-for-v5.5/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Use swsup quirks also for am335x musb bus: ti-sysc: Handle mstandby quirk and use it for musb bus: ti-sysc: Fix watchdog quirk handling bus: ti-sysc: avoid toggling power state of module during probe bus: ti-sysc: drop the extra hardreset during init bus: ti-sysc: re-order reset and main clock controls Link: https://lore.kernel.org/r/pull-1571853258-16998@atomide.com-2 Signed-off-by: Olof Johansson commit 04cb1d4711ba8d6eb82bcb053a173e16f6f85a70 Author: Krzysztof Kozlowski Date: Fri Oct 4 17:14:13 2019 +0200 dt-bindings: gpu: samsung-rotator: Fix indentation Array elements under 'items' should be indented. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 2ca98a46435c45f6b749b6ed4d9177f230e3cd12 Author: Fabrizio Castro Date: Fri Oct 4 09:35:29 2019 +0100 dt-bindings: PCI: rcar: Add device tree support for r8a774b1 Add PCIe support for the RZ/G2N (a.k.a. R8A774B1). Signed-off-by: Fabrizio Castro Reviewed-by: Andrew Murray Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit 758622581489b159286eeb9b9cc8d24382a610ec Author: Fabrizio Castro Date: Fri Oct 4 09:35:27 2019 +0100 dt-bindings: watchdog: renesas-wdt: Document r8a774b1 support RZ/G2N (a.k.a. R8A774B1) watchdog implementation is compatible with R-Car Gen3, therefore add the relevant documentation. Signed-off-by: Fabrizio Castro Reviewed-by: Guenter Roeck Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit b5c8c6ded32e6dbad29422c0c83bebfac8810d61 Author: Rob Herring Date: Mon Sep 2 15:30:59 2019 +0100 dt-bindings: iommu: Convert Arm SMMUv3 to DT schema Convert the Arm SMMv3 binding to the DT schema format. Cc: Joerg Roedel Cc: Mark Rutland Cc: Will Deacon Cc: iommu@lists.linux-foundation.org Reviewed-by: Robin Murphy Signed-off-by: Rob Herring commit ac71ffcfb457a98f0386d682de107ef746bcb60e Author: Leon Romanovsky Date: Thu Oct 10 10:11:05 2019 +0300 RDMA/core: Check that process is still alive before sending it to the users The PID information can disappear asynchronously because the task can be killed and moved to zombie state. In this case, PID will be zero in similar way to the kernel tasks. Recognize such situation where we are asking to return orphaned object and simply skip filling PID attribute. As part of this change, document the same scenario in counter.c code. Link: https://lore.kernel.org/r/20191010071105.25538-3-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit cf7e93c12fbc0f18cbea0571406e302d6904a7ac Author: Leon Romanovsky Date: Thu Oct 10 10:11:04 2019 +0300 RDMA/restrack: Remove PID namespace support IB resources are bounded to IB device and file descriptors, both entities are unaware to PID namespaces and to task lifetime. The difference in model caused to unpredictable behavior for the following scenario: 1. Create FD and context 2. Share it with ephemeral child 3. Create any object and exit that child The end result of this flow, that those newly created objects will be tracked by restrack, but won't be visible for users because task_struct associated with them already exited. The right thing is to rely on net namespace only for any filtering purposes and drop PID namespace. Link: https://lore.kernel.org/r/20191010071105.25538-2-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit bc794744cdc56f53b495debbe054946d1b620441 Merge: 1994ebd1f746 0a4818c19221 Author: Tony Lindgren Date: Wed Oct 23 10:42:39 2019 -0700 Merge branch 'omap-for-v5.5/pm' into omap-for-v5.5/soc commit 4c365e231bd1d3bbe2bdbc2a0c4e413ffb365b20 Author: Chris Packham Date: Wed Oct 23 11:19:56 2019 +1300 ARM: dts: bcm: HR2: add label to sp805 watchdog This allows boards the option of adding properties or disabling the watchdog entirely. Signed-off-by: Chris Packham Signed-off-by: Florian Fainelli commit 37c92dc303dd0977134d1c8501f057de407473ec Author: Imre Deak Date: Tue Oct 22 12:51:55 2019 +0300 drm/i915: Add new CNL PCH ID seen on a CML platform Atm we don't detect a PCH with PCI ID 0xA3C1 which showed up now on a CML platform. We don't have the official assignment of the PCH PCI IDs, but this looks like a CNP which was already used on CML platforms. Let's add the new ID->PCH type mapping accordingly. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112051 Reported-and-tested-by: Cyrus Cc: Cyrus Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191022095155.30991-1-imre.deak@intel.com commit fedc8844d5004ffa69d3e320081bfd59979e1937 Merge: 830834c450bb 61978617e905 Author: Tony Lindgren Date: Wed Oct 23 10:34:28 2019 -0700 Merge branch 'omap-for-v5.5/droid4' into omap-for-v5.5/dt commit 58eeb2289ab9bd8acad41a589431bbdbf7622595 Author: KP Singh Date: Wed Oct 23 17:40:38 2019 +0200 libbpf: Fix strncat bounds error in libbpf_prog_type_by_name On compiling samples with this change, one gets an error: error: ‘strncat’ specified bound 118 equals destination size [-Werror=stringop-truncation] strncat(dst, name + section_names[i].len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sizeof(raw_tp_btf_name) - (dst - raw_tp_btf_name)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ strncat requires the destination to have enough space for the terminating null byte. Fixes: f75a697e09137 ("libbpf: Auto-detect btf_id of BTF-based raw_tracepoint") Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191023154038.24075-1-kpsingh@chromium.org commit e0e4f8e938c48b7c5377661fa3e4738901e6a19b Author: Magnus Karlsson Date: Mon Oct 21 10:57:04 2019 +0200 xsk: Improve documentation for AF_XDP Added sections on all the bind flags, libbpf, all the setsockopts and all the getsockopts. Also updated the document to reflect the latest features and to correct some spelling errors. v1 -> v2: * Updated XDP program with latest BTF map format * Added one more FAQ entry * Some minor edits and corrections v2 -> v3: * Simplified XDP_SHARED_UMEM example XDP program Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1571648224-16889-1-git-send-email-magnus.karlsson@intel.com commit 45e587b5e8e5f24dd2393f96546b604a38612249 Author: Andrii Nakryiko Date: Wed Oct 23 08:31:28 2019 -0700 selftests/bpf: Fix LDLIBS order Order of $(LDLIBS) matters to linker, so put it after all the .o and .a files. Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule") Reported-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191023153128.3486140-1-andriin@fb.com commit 9bc6384b364407381cc24c2150d13dd29f5bfdd2 Author: Andrii Nakryiko Date: Tue Oct 22 23:09:13 2019 -0700 selftests/bpf: Move test_section_names into test_progs and fix it Make test_section_names into test_progs test. Also fix ESRCH expected results. Add uprobe/uretprobe and tp/raw_tp test cases. Fixes: dd4436bb8383 ("libbpf: Teach bpf_object__open to guess program types") Reported-by: kernel test robot Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191023060913.1713817-1-andriin@fb.com commit ad5086108b9f0361929aa9a79cf959ab5681d249 Author: Yunsheng Lin Date: Sat Oct 19 14:45:43 2019 +0800 PCI: Warn if no host bridge NUMA node info In pci_call_probe(), we try to run driver probe functions on the node where the device is attached. If we don't know which node the device is attached to, the driver will likely run on the wrong node. This will still work, but performance will not be as good as it could be. On NUMA systems, warn if we don't know which node a PCI host bridge is attached to. This is likely an indication that ACPI didn't supply a _PXM method or the DT didn't supply a "numa-node-id" property. [bhelgaas: commit log, check bus node] Link: https://lore.kernel.org/r/1571467543-26125-1-git-send-email-linyunsheng@huawei.com Signed-off-by: Yunsheng Lin Signed-off-by: Bjorn Helgaas commit d7d962a095474fcd94861d5f4cccada2e4215aae Author: Björn Töpel Date: Tue Oct 22 09:22:06 2019 +0200 libbpf: Use implicit XSKMAP lookup from AF_XDP XDP program In commit 43e74c0267a3 ("bpf_xdp_redirect_map: Perform map lookup in eBPF helper") the bpf_redirect_map() helper learned to do map lookup, which means that the explicit lookup in the XDP program for AF_XDP is not needed for post-5.3 kernels. This commit adds the implicit map lookup with default action, which improves the performance for the "rx_drop" [1] scenario with ~4%. For pre-5.3 kernels, the bpf_redirect_map() returns XDP_ABORTED, and a fallback path for backward compatibility is entered, where explicit lookup is still performed. This means a slight regression for older kernels (an additional bpf_redirect_map() call), but I consider that a fair punishment for users not upgrading their kernels. ;-) v1->v2: Backward compatibility (Toke) [2] v2->v3: Avoid masking/zero-extension by using JMP32 [3] [1] # xdpsock -i eth0 -z -r [2] https://lore.kernel.org/bpf/87pnirb3dc.fsf@toke.dk/ [3] https://lore.kernel.org/bpf/87v9sip0i8.fsf@toke.dk/ Suggested-by: Toke Høiland-Jørgensen Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191022072206.6318-1-bjorn.topel@gmail.com commit 0a4818c19221569b1877ededb3ed991aba35c1e8 Author: YueHaibing Date: Wed Oct 23 06:29:00 2019 +0000 ARM: OMAP2+: Remove duplicated include from pmic-cpcap.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Tony Lindgren commit 77c544d243f3b0d1ae3487ebb170c07c79734fe7 Author: Andy Shevchenko Date: Mon Oct 21 13:36:25 2019 +0300 spi: pxa2xx: Drop extra check of platform_get_resource() returned value The devm_ioremap_resource() has already a check for resource pointer being NULL. No need to double check this. Drop extra check of platform_get_resource() returned value. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191021103625.4250-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit be73e323aee4e10eccef2b0f862c0196f392f012 Author: Andy Shevchenko Date: Wed Oct 23 15:16:43 2019 +0300 spi: Fix spelling in the comments Two spelling mistakes are being fixed. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191023121643.25237-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit a3470c1829c0c856a19c10af58f8e7792ae27d7a Author: Alexandru Ardelean Date: Wed Oct 23 10:00:46 2019 +0300 spi: document CS setup, hold & inactive times in header This change documents the CS setup, host & inactive times. They were omitted when the fields were added, and were caught by one of the build bots. Fixes: 25093bdeb6bc ("spi: implement SW control for CS times") Reported-by: kbuild test robot Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20191023070046.12478-1-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 55d5f62c3fa005a6a8010363d7d1855909ceefbc Author: Matti Vaittinen Date: Wed Oct 23 15:14:52 2019 +0300 regulator: bd70528: Add MODULE_ALIAS to allow module auto loading The bd70528 regulator driver is probed by MFD driver. Add MODULE_ALIAS in order to allow udev to load the module when MFD sub-device cell for regulators is added. Fixes: 99ea37bd1e7d7 ("regulator: bd70528: Support ROHM BD70528 regulator block") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/20191023121452.GA1812@localhost.localdomain Signed-off-by: Mark Brown commit 175fc928198236037174e5c5c066fe3c4691903e Author: Russell King Date: Wed Oct 23 16:46:59 2019 +0100 ASoC: kirkwood: fix IRQ error handling Propagate the error code from request_irq(), rather than returning -EBUSY. Signed-off-by: Russell King Link: https://lore.kernel.org/r/E1iNIqh-0000tW-EZ@rmk-PC.armlinux.org.uk Signed-off-by: Mark Brown commit 6fd9903527bf103167004022a0199b8fac1b8b29 Author: Pan Xiuli Date: Tue Oct 22 14:47:05 2019 -0500 ASoC: SOF: Intel: initial support to JasperLake. Add Kconfig, PCI ID and chip info for JSL platform. The DSP only has 2 cores for this platform. Signed-off-by: Pan Xiuli Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022194705.23347-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4f0637eae56f02ef648de5ed839d572259d396e9 Author: Pan Xiuli Date: Tue Oct 22 14:47:04 2019 -0500 ASoC: Intel: common: add ACPI matching tables for JSL There are no upstream machine drivers just yet so just add dummy table for compilation in nocodec-mode. Signed-off-by: Pan Xiuli Link: https://lore.kernel.org/r/20191022194705.23347-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6a414489e0f3309a221f26b3d11c19d1a96a3635 Author: Pierre-Louis Bossart Date: Tue Oct 22 14:28:44 2019 -0500 ASoC: SOF: Intel: hda: add dev_err() traces for snd_sof_dsp_read_poll_timeout() Such traces should be extremely rare but extremely useful for debug. Report errors for all calls to sdn_sof_dsp_read_poll_timeout(), but only on negative values for consistency. Add traces that enable each timeout to be uniquely identified. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022192844.21022-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 76dc6a2b312d15c91ff4b4d171e98cdc73ba3745 Author: Pierre-Louis Bossart Date: Tue Oct 22 14:28:43 2019 -0500 ASoC: SOF: Intel: hda-loader: improve error handling If a ROM timeout is detected, we still stop the DMA but will return the initial error should the DMA stop also fail. Likewise the cleanup is handled regardless of the status, but we return the initial error. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022192844.21022-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ef5dee551e3e6568fb203ea57fa24f55cb64d451 Author: Mao Wenan Date: Wed Oct 23 14:31:03 2019 +0800 ASoC: mediatek: Check SND_SOC_CROS_EC_CODEC dependency If SND_SOC_MT8183_MT6358_TS3A227E_MAX98357A=y, below errors can be seen: sound/soc/codecs/cros_ec_codec.o: In function `send_ec_host_command': cros_ec_codec.c:(.text+0x534): undefined reference to `cros_ec_cmd_xfer_status' cros_ec_codec.c:(.text+0x101c): undefined reference to `cros_ec_get_host_event' This is because it will select SND_SOC_CROS_EC_CODEC after commit 2cc3cd5fdc8b ("ASoC: mediatek: mt8183: support WoV"), but SND_SOC_CROS_EC_CODEC depends on CROS_EC. Fixes: 2cc3cd5fdc8b ("ASoC: mediatek: mt8183: support WoV") Signed-off-by: Mao Wenan Link: https://lore.kernel.org/r/20191023063103.44941-1-maowenan@huawei.com Signed-off-by: Mark Brown commit ef2c695151df54817f92128f96a920ff888c6920 Author: Kuninori Morimoto Date: Wed Oct 23 11:10:43 2019 +0900 ASoC: rsnd: add missing of_node_put() This patch adds missing of_node_put() for rsnd_parse_tdm_split_mode() rsnd_parse_connect_graph() Reported-by: Pavel Machek Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8736fkyzx8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d4d9360bf702890b5d3b1b62d8619a2690dd3278 Author: Jiada Wang Date: Tue Oct 22 20:55:18 2019 +0200 ASoC: rsnd: dma: set bus width to data width for monaural data According to R-Car3 HW manual 40.3.3 (Data Format on Audio Local Bus), in case of monaural data writing or reading through Audio-DMAC, it's always in Left Justified format, so both src and dst DMA Bus width should be equal to physical data width. Therefore set src and dst's DMA bus width to: - [monaural case] data width - [non-monaural case] 32bits (as prior applying the patch) Cc: Andrew Gabbasov Cc: Timo Wischer Signed-off-by: Jiada Wang Signed-off-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191022185518.12838-1-erosca@de.adit-jv.com Signed-off-by: Mark Brown commit 2b544dd7b43b19fb55ea4fbb3e30b60eb20b7828 Author: Kuninori Morimoto Date: Tue Oct 15 12:59:31 2019 +0900 ASoC: soc-core: add for_each_rtd_components() and replace ALSA SoC has for_each_rtdcom() which is link list for rtd-component which is called as rtdcom. The relationship image is like below rtdcom rtdcom rtdcom component component component rtd->component_list -> list -> list -> list ... Here, the pointer get via normal link list is rtdcom, Thus, current for_each loop is like below, and need to get component via rtdcom->component for_each_rtdcom(rtd, rtdcom) { component = rtdcom->component; ... } but usually, user want to get pointer from for_each_xxx is component directly, like below. for_each_rtd_component(rtd, rtdcom, component) { ... } This patch expands list_for_each_entry manually, and enable to get component directly from for_each macro. Because of it, the macro becoming difficult to read, but macro itself becoming useful. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878spm64m4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 830834c450bb7ddccc956c102297ca368833cfe6 Author: Yegor Yefremov Date: Tue Oct 22 09:21:30 2019 +0200 ARM: dts: add DTS for NetCom Plus 4xx and 8xx device series This DTS file covers all four and eight port NetCom Plus devices. Signed-off-by: Yegor Yefremov Signed-off-by: Tony Lindgren commit 9e4dee95d7eed9163e7177bdd3ca31acfa83be70 Author: Yegor Yefremov Date: Tue Oct 22 09:21:29 2019 +0200 ARM: dts: add DTS for NetCom Plus 1xx and 2xx device series This DTS file covers all one and two port NetCom Plus devices. Signed-off-by: Yegor Yefremov Signed-off-by: Tony Lindgren commit 87e6c8d7e9350b90b5a0a575e4364257cc49b199 Author: Yegor Yefremov Date: Tue Oct 22 09:21:28 2019 +0200 ARM: dts: add DTS for NetCAN Plus devices This DTS file covers both NetCAN Plus 110 and 120 WLAN models. Signed-off-by: Yegor Yefremov Signed-off-by: Tony Lindgren commit 1cbeab1b242d16fdb22dc3dab6a7d6afe746ae6d Author: Iurii Zaikin Date: Thu Oct 17 15:12:33 2019 -0700 ext4: add kunit test for decoding extended timestamps KUnit tests for decoding extended 64 bit timestamps that verify the seconds part of [a/c/m] timestamps in ext4 inode structs are decoded correctly. Test data is derived from the table in the Inode Timestamps section of Documentation/filesystems/ext4/inodes.rst. KUnit tests run during boot and output the results to the debug log in TAP format (http://testanything.org/). Only useful for kernel devs running KUnit test harness and are not for inclusion into a production build. Signed-off-by: Iurii Zaikin Reviewed-by: Theodore Ts'o Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Reviewed-by: Shuah Khan Signed-off-by: Shuah Khan commit 9a42c7c647a9ad0f7ebb147a52eda3dcb7c84292 Author: Thierry Reding Date: Mon Oct 21 16:34:37 2019 +0200 drm/tegra: Move drm_dp_link helpers to Tegra DRM During the discussion of patches that enhance the drm_dp_link helpers it was concluded that these helpers aren't very useful to begin with. After all other drivers have been converted not to use these helpers anymore, move these helpers into the last remaining user: Tegra DRM. If at some point these helpers are deemed more widely useful, they can be moved out into the DRM DP helpers again. Signed-off-by: Thierry Reding Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-14-thierry.reding@gmail.com commit 2589c4025f1301ccf7421d9c2f0001a4f87380ea Author: Thierry Reding Date: Mon Oct 21 16:34:36 2019 +0200 drm/rockchip: Avoid drm_dp_link helpers During the discussion of patches that enhance the drm_dp_link helpers it was concluded that these helpers aren't very useful to begin with. Start pushing the equivalent code into individual drivers to ultimately remove them. Signed-off-by: Thierry Reding Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-13-thierry.reding@gmail.com commit 8ef8261491815477c6a134d6f2d8f55b2f02b19c Author: Thierry Reding Date: Mon Oct 21 16:34:35 2019 +0200 drm/msm: edp: Avoid drm_dp_link helpers During the discussion of patches that enhance the drm_dp_link helpers it was concluded that these helpers aren't very useful to begin with. Start pushing the equivalent code into individual drivers to ultimately remove them. Signed-off-by: Thierry Reding Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-12-thierry.reding@gmail.com commit 98bca69b711759dcfbcff274bb8d051277490ef7 Author: Thierry Reding Date: Mon Oct 21 16:34:34 2019 +0200 drm/bridge: tc358767: Use DP nomenclature The DP specification uses the term "default framing" instead of "non- enhanced framing". Reviewed-by: Andrzej Hajda Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-11-thierry.reding@gmail.com commit e7dc8d40eea400dbe673ed4b78680c058f111ae9 Author: Thierry Reding Date: Mon Oct 21 16:34:33 2019 +0200 drm/bridge: tc358767: Avoid drm_dp_link helpers During the discussion of patches that enhance the drm_dp_link helpers it was concluded that these helpers aren't very useful to begin with. Start pushing the equivalent code into individual drivers to ultimately remove them. v3: make link rate unsigned int to avoid overflow Signed-off-by: Thierry Reding Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-10-thierry.reding@gmail.com commit ff1e8fb68ea06027ede23ea1e6f23f1b280aafa9 Author: Thierry Reding Date: Tue Oct 22 16:52:11 2019 +0200 drm/bridge: analogix-anx78xx: Avoid drm_dp_link helpers During the discussion of patches that enhance the drm_dp_link helpers it was concluded that these helpers aren't very useful to begin with. Start pushing the equivalent code into individual drivers to ultimately remove them. v4: use bulk DPCD writes if possible (Daniel Vetter) Signed-off-by: Thierry Reding Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191022145211.2258525-1-thierry.reding@gmail.com commit 79465e0ffeb9e4866939ea562bc55367be91e595 Author: Thierry Reding Date: Mon Oct 21 16:34:31 2019 +0200 drm/dp: Add helper to get post-cursor adjustments If the transmitter supports pre-emphasis post cursor2 the sink will request adjustments in a similar way to how it requests adjustments to the voltage swing and pre-emphasis settings. Add a helper to extract these adjustments on a per-lane basis from the DPCD link status. Reviewed-by: Philipp Zabel Reviewed-by: Lyude Paul Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-8-thierry.reding@gmail.com commit fc6b42045e51a8e2793751e03daa39dc99c25983 Author: Thierry Reding Date: Mon Oct 21 16:34:30 2019 +0200 drm/dp: Do not busy-loop during link training Use microsecond sleeps for the clock recovery and channel equalization delays during link training. The duration of these delays can be from 100 us up to 16 ms. It is rude to busy-loop for that amount of time. While at it, also convert to standard coding style by putting the opening braces in a function definition on a new line. Also switch to using an unsigned int for the AUX read interval to match the data type of the parameters to usleep_range(). v2: use correct multiplier for training delays (Philipp Zabel) v3: clarify data type change in commit message Signed-off-by: Thierry Reding Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-7-thierry.reding@gmail.com commit 7624629d06b01d115e9a83c372f26ffd181c6aa5 Author: Thierry Reding Date: Mon Oct 21 16:34:29 2019 +0200 drm/dp: Add drm_dp_alternate_scrambler_reset_cap() helper Add a helper to check if the sink supports the eDP alternate scrambler reset value of 0xfffe. Reviewed-by: Lyude Paul Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-6-thierry.reding@gmail.com commit 99c830b8b7bef939dfcd385553b39a5d5b278a03 Author: Thierry Reding Date: Mon Oct 21 16:34:28 2019 +0200 drm/dp: Add drm_dp_channel_coding_supported() helper Add a helper to check whether the sink supports ANSI 8B/10B channel coding capability as specified in ANSI X3.230-1994, clause 11. Reviewed-by: Lyude Paul Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-5-thierry.reding@gmail.com commit 8cda78b1281d59ffa3032a3885e6ffc8eb79062c Author: Thierry Reding Date: Mon Oct 21 16:34:27 2019 +0200 drm/dp: Add drm_dp_fast_training_cap() helper Add a helper that checks for the fast training capability given the DPCD receiver capabilities blob. Reviewed-by: Lyude Paul Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-4-thierry.reding@gmail.com commit 2980426a779f227ffcac342240b0c3ca3d386da8 Author: Thierry Reding Date: Mon Oct 21 16:34:26 2019 +0200 drm/dp: Remove a gratuituous blank line It's idiomatic to check the return value of a function call immediately after the function call, without any blank lines in between, to make it more obvious that the two lines belong together. Reviewed-by: Lyude Paul Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-3-thierry.reding@gmail.com commit 80664f759b5cff339197cca33ef4e991beef5819 Author: Thierry Reding Date: Mon Oct 21 16:34:25 2019 +0200 drm/dp: Sort includes alphabetically Keeping the list sorted alphabetically makes it much easier to determine where to add new includes. Reviewed-by: Lyude Paul Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191021143437.1477719-2-thierry.reding@gmail.com commit ce4dd4429b3c7e4506870796f3b8b06d707d2928 Author: David Howells Date: Wed Oct 16 15:13:41 2019 +0100 Remove the nr_exclusive argument from __wake_up_sync_key() Remove the nr_exclusive argument from __wake_up_sync_key() and derived functions as everything seems to set it to 1. Note also that if it wasn't set to 1, it would clear WF_SYNC anyway. Signed-off-by: David Howells Acked-by: Peter Zijlstra (Intel) commit d055b4fb4d165b06d912e7f846610d120c3bb9fb Author: David Howells Date: Wed Sep 25 15:23:01 2019 +0100 pipe: Reduce #inclusion of pipe_fs_i.h Remove some #inclusions of linux/pipe_fs_i.h that don't seem to be necessary any more. Signed-off-by: David Howells commit d7b8a217521ca21e2c6391da88d4928c6ce1f539 Author: Nicholas Johnson Date: Wed Oct 23 12:12:29 2019 +0000 PCI: Add "pci=hpmmiosize" and "pci=hpmmioprefsize" parameters The existing "pci=hpmemsize=nn[KMG]" kernel parameter overrides the default size of both the non-prefetchable and the prefetchable MMIO windows for hotplug bridges. Add "pci=hpmmiosize=nn[KMG]" to override the default size of only the non-prefetchable MMIO window. Add "pci=hpmmioprefsize=nn[KMG]" to override the default size of only the prefetchable MMIO window. Link: https://lore.kernel.org/r/SL2P216MB0187E4D0055791957B7E2660806B0@SL2P216MB0187.KORP216.PROD.OUTLOOK.COM Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 142b2ac82e31c174936c5719fa12ae28f51a55b7 Author: Arnd Bergmann Date: Fri Mar 15 13:46:11 2019 +0100 scsi: sd: enable compat ioctls for sed-opal The sed_ioctl() function is written to be compatible between 32-bit and 64-bit processes, however compat mode is only wired up for nvme, not for sd. Add the missing call to sed_ioctl() in sd_compat_ioctl(). Fixes: d80210f25ff0 ("sd: add support for TCG OPAL self encrypting disks") Cc: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Arnd Bergmann commit 1b114b0817cc1d4110a885ea7026e223df66ed71 Author: Arnd Bergmann Date: Fri Mar 15 17:16:36 2019 +0100 pktcdvd: add compat_ioctl handler pkt_ioctl() implements the generic SCSI_IOCTL_SEND_COMMAND and some cdrom ioctls by forwarding to the underlying block device. For compat_ioctl handling, this always takes a roundtrip through fs/compat_ioctl.c that we should try to avoid, at least for the compatible commands. CDROM_SEND_PACKET is an exception here, it requires special translation in compat_blkdev_driver_ioctl(). CDROM_LAST_WRITTEN has no compat handling at the moment. Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Arnd Bergmann commit fd6c3d5accea8e7ed267b8a47ffecf4d4869ae0c Author: Arnd Bergmann Date: Fri Aug 24 14:53:13 2018 +0200 compat_ioctl: move SG_GET_REQUEST_TABLE handling SG_GET_REQUEST_TABLE is now the last ioctl command that needs a conversion handler. This is only used in a single file, so the implementation should be there. I'm trying to simplify it in the process, to get rid of the compat_alloc_user_space() and extra copy, by adding a put_compat_request_table() function instead, which copies the data in the right format to user space. Cc: linux-scsi@vger.kernel.org Cc: Doug Gilbert Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Arnd Bergmann commit 8f5d9f2ce3020be1a7924b4cc4a1f51164f2c0b7 Author: Arnd Bergmann Date: Fri Jul 26 15:21:39 2019 +0200 compat_ioctl: ppp: move simple commands into ppp_generic.c All ppp commands that are not already handled in ppp_compat_ioctl() are compatible, so they can now handled by calling the native ppp_ioctl() directly. Without CONFIG_BLOCK, the generic compat_ioctl table is now empty, so add a check to avoid a build failure in the looking function for that configuration. Cc: netdev@vger.kernel.org Cc: linux-ppp@vger.kernel.org Cc: Paul Mackerras Cc: "David S. Miller" Signed-off-by: Arnd Bergmann commit 17c7e7f407085f510a815c0c99b3fd25d5b13110 Author: Arnd Bergmann Date: Tue Apr 16 22:19:44 2019 +0200 compat_ioctl: handle PPPIOCGIDLE for 64-bit time_t The ppp_idle structure is defined in terms of __kernel_time_t, which is defined as 'long' on all architectures, and this usage is not affected by the y2038 problem since it transports a time interval rather than an absolute time. However, the ppp user space defines the same structure as time_t, which may be 64-bit wide on new libc versions even on 32-bit architectures. It's easy enough to just handle both possible structure layouts on all architectures, to deal with the possibility that a user space ppp implementation comes with its own ppp_idle structure definition, as well as to document the fact that the driver is y2038-safe. Doing this also avoids the need for a special compat mode translation, since 32-bit and 64-bit kernels now support the same interfaces. The old 32-bit structure is also available on native 64-bit architectures now, but this is harmless. Cc: netdev@vger.kernel.org Cc: linux-ppp@vger.kernel.org Cc: Paul Mackerras Cc: "David S. Miller" Signed-off-by: Arnd Bergmann commit 5b6c02df50fb28d23c733a24df5a06d0a3f28b93 Author: Al Viro Date: Thu Apr 18 00:31:54 2019 -0400 compat_ioctl: move PPPIOCSCOMPRESS to ppp_generic Rather than using a compat_alloc_user_space() buffer, moving this next to the native handler allows sharing most of the code, leaving only the user copy portion distinct. Signed-off-by: Al Viro Cc: netdev@vger.kernel.org Cc: linux-ppp@vger.kernel.org Cc: Paul Mackerras Cc: "David S. Miller" Signed-off-by: Arnd Bergmann commit 3e859adf3643c2da9765cd5088170738d7918567 Author: Al Viro Date: Wed Apr 17 23:48:01 2019 -0400 compat_ioctl: unify copy-in of ppp filters Now that isdn4linux is gone, the is only one implementation of PPPIOCSPASS and PPPIOCSACTIVE in ppp_generic.c, so this is where the compat_ioctl support should be implemented. The two commands are implemented in very similar ways, so introduce new helpers to allow sharing between the two and between native and compat mode. Signed-off-by: Al Viro [arnd: rebased, and added changelog text] Cc: netdev@vger.kernel.org Cc: linux-ppp@vger.kernel.org Cc: Paul Mackerras Cc: "David S. Miller" Signed-off-by: Arnd Bergmann commit b7aff093e94daff1e6076393ed43b7c9651b2b43 Author: Arnd Bergmann Date: Thu Jun 6 10:07:36 2019 +0200 tty: handle compat PPP ioctls Multiple tty devices are have tty devices that handle the PPPIOCGUNIT and PPPIOCGCHAN ioctls. To avoid adding a compat_ioctl handler to each of those, add it directly in tty_compat_ioctl so we can remove the calls from fs/compat_ioctl.c. Reviewed-by: Greg Kroah-Hartman Cc: Paul Mackerras Signed-off-by: Arnd Bergmann commit c7dc504e2ff78a0bed3c36a44dff73f523ce0132 Author: Arnd Bergmann Date: Mon Jun 3 23:07:12 2019 +0200 compat_ioctl: move SIOCOUTQ out of compat_ioctl.c All users of this call are in socket or tty code, so handling it there means we can avoid the table entry in fs/compat_ioctl.c. Reviewed-by: Greg Kroah-Hartman Cc: Eric Dumazet Cc: netdev@vger.kernel.org Cc: "David S. Miller" Signed-off-by: Arnd Bergmann commit 9d7bf41fafa5b5ddd4c13eb39446b0045f0a8167 Author: Arnd Bergmann Date: Mon Jun 3 23:06:00 2019 +0200 compat_ioctl: handle SIOCOUTQNSD Unlike the normal SIOCOUTQ, SIOCOUTQNSD was never handled in compat mode. Add it to the common socket compat handler along with similar ones. Fixes: 2f4e1b397097 ("tcp: ioctl type SIOCOUTQNSD returns amount of data not sent") Cc: Eric Dumazet Cc: netdev@vger.kernel.org Cc: "David S. Miller" Signed-off-by: Arnd Bergmann commit 5f6beb9e0f633f3cc845cdd67973c506372931b4 Author: Arnd Bergmann Date: Mon Jun 3 22:03:44 2019 +0200 af_unix: add compat_ioctl support The af_unix protocol family has a custom ioctl command (inexplicibly based on SIOCPROTOPRIVATE), but never had a compat_ioctl handler for 32-bit applications. Since all commands are compatible here, add a trivial wrapper that performs the compat_ptr() conversion for SIOCOUTQ/SIOCINQ. SIOCUNIXFILE does not use the argument, but it doesn't hurt to also use compat_ptr() here. Fixes: ba94f3088b79 ("unix: add ioctl to open a unix socket file with O_PATH") Cc: netdev@vger.kernel.org Cc: "David S. Miller" Cc: Eric Dumazet Signed-off-by: Arnd Bergmann commit 98aaaec4a150c39219a8aaa68c3adc6eed443ea8 Author: Arnd Bergmann Date: Thu Mar 14 17:45:18 2019 +0100 compat_ioctl: reimplement SG_IO handling There are two code locations that implement the SG_IO ioctl: the old sg.c driver, and the generic scsi_ioctl helper that is in turn used by multiple drivers. To eradicate the old compat_ioctl conversion handler for the SG_IO command, I implement a readable pair of put_sg_io_hdr() /get_sg_io_hdr() helper functions that can be used for both compat and native mode, and then I call this from both drivers. For the iovec handling, there is already a compat_import_iovec() function that can simply be called in place of import_iovec(). To avoid having to pass the compat/native state through multiple indirections, I mark the SG_IO command itself as compatible in fs/compat_ioctl.c and use in_compat_syscall() to figure out where we are called from. As a side-effect of this, the sg.c driver now also accepts the 32-bit sg_io_hdr format in compat mode using the read/write interface, not just ioctl. This should improve compatiblity with old 32-bit binaries, but it would break if any application intentionally passes the 64-bit data structure in compat mode here. Steffen Maier helped debug an issue in an earlier version of this patch. Cc: Steffen Maier Cc: linux-scsi@vger.kernel.org Cc: Doug Gilbert Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Arnd Bergmann commit b6dfb2477fb0bf48e31999d306d2552144891f6e Author: Arnd Bergmann Date: Mon Jun 3 14:23:09 2019 +0200 compat_ioctl: move WDIOC handling into wdt drivers All watchdog drivers implement the same set of ioctl commands, and fortunately all of them are compatible between 32-bit and 64-bit architectures. Modern drivers always go through drivers/watchdog/wdt.c as an abstraction layer, but older ones implement their own file_operations on a character device for this. Move the handling from fs/compat_ioctl.c into the individual drivers. Note that most of the legacy drivers will never be used on 64-bit hardware, because they are for an old 32-bit SoC implementation, but doing them all at once is safer than trying to guess which ones do or do not need the compat_ioctl handling. Reviewed-by: Guenter Roeck Signed-off-by: Arnd Bergmann commit 314999dcbca75c3ca8aaba102875d51ab409cf87 Author: Arnd Bergmann Date: Mon Jun 3 13:51:58 2019 +0200 fs: compat_ioctl: move FITRIM emulation into file systems Remove the special case for FITRIM, and make file systems handle that like all other ioctl commands with their own handlers. Cc: linux-ext4@vger.kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net Cc: Mikulas Patocka Cc: linux-nilfs@vger.kernel.org Cc: ocfs2-devel@oss.oracle.com Signed-off-by: Arnd Bergmann commit 8d0980704842e8a68df2c3164c1c165e5c7ebc08 Author: Arnd Bergmann Date: Mon Jun 3 13:40:01 2019 +0200 gfs2: add compat_ioctl support Out of the four ioctl commands supported on gfs2, only FITRIM works in compat mode. Add a proper handler based on the ext4 implementation. Fixes: 6ddc5c3ddf25 ("gfs2: getlabel support") Reviewed-by: Bob Peterson Cc: Andreas Gruenbacher Signed-off-by: Arnd Bergmann commit 0581f1864a635b4e93c99ab8a613dc35f8c15da1 Author: Arnd Bergmann Date: Thu Mar 14 11:22:38 2019 +0100 compat_ioctl: remove unused convert_in_user macro The last users are all gone, so let's remove the macro as well. Signed-off-by: Arnd Bergmann commit caca7d10f815c9e70b5d34ca4807ee5c01e19a86 Author: Arnd Bergmann Date: Fri Sep 7 11:35:56 2018 +0200 compat_ioctl: remove last RAID handling code Commit aa98aa31987a ("md: move compat_ioctl handling into md.c") already removed the COMPATIBLE_IOCTL() table entries and added a complete implementation, but a few lines got left behind and should also be removed here. Cc: linux-raid@vger.kernel.org Cc: Song Liu Signed-off-by: Arnd Bergmann commit 50a2e74bc2d1cf983f15dc5a8b2d3b8ade6c82f5 Author: Arnd Bergmann Date: Fri Sep 7 11:18:38 2018 +0200 compat_ioctl: remove /dev/raw ioctl translation The /dev/rawX implementation already handles these just fine, so the entries in the table are not needed any more. Signed-off-by: Arnd Bergmann commit a92d4f107a5285f514811fcdbae6ea4906013b9a Author: Arnd Bergmann Date: Fri Sep 7 11:18:38 2018 +0200 compat_ioctl: remove PCI ioctl translation The /proc/pci/ implementation already handles these just fine, so the entries in the table are not needed any more. Cc: linux-pci@vger.kernel.org Cc: Bjorn Helgaas Signed-off-by: Arnd Bergmann commit aca942263ae3a6e2d2f5d6119a83fd48684bef91 Author: Arnd Bergmann Date: Fri Sep 7 11:18:38 2018 +0200 compat_ioctl: remove joystick ioctl translation The joystick driver already handles these just fine, so the entries in the table are not needed any more. Cc: linux-input@vger.kernel.org Cc: Dmitry Torokhov Signed-off-by: Arnd Bergmann commit 507e4e2b430b6a27b66f4745564ecaee7967737f Author: Arnd Bergmann Date: Fri Sep 7 11:10:23 2018 +0200 compat_ioctl: remove /dev/random commands These are all handled by the random driver, so instead of listing each ioctl, we can use the generic compat_ptr_ioctl() helper. Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann commit eede0b859ee62629c94e23612febf4907db3db67 Author: Arnd Bergmann Date: Fri Sep 7 11:05:54 2018 +0200 compat_ioctl: remove IGNORE_IOCTL() Since commit 07d106d0a33d ("vfs: fix up ENOIOCTLCMD error handling"), we don't warn about unhandled compat-ioctl command code any more, but just return the same error that a native file descriptor returns when there is no handler. This means the IGNORE_IOCTL() annotations are completely useless and can all be removed. TIOCSTART/TIOCSTOP and KDGHWCLK/KDSHWCLK fall into the same category, but for some reason were listed as COMPATIBLE_IOCTL(). Signed-off-by: Arnd Bergmann commit 2022ca0a940a1625904bfff6879dc8732171d089 Author: Arnd Bergmann Date: Thu Sep 6 22:54:38 2018 +0200 compat_ioctl: remove translation for sound ioctls The SNDCTL_* and SOUND_* commands are the old OSS user interface. I checked all the sound ioctl commands listed in fs/compat_ioctl.c to see if we still need the translation handlers. Here is what I found: - sound/oss/ is (almost) gone from the kernel, this is what actually needed all the translations - The ALSA emulation for OSS correctly handles all compat_ioctl commands already. - sound/oss/dmasound/ is the last holdout of the original OSS code, this is only used on arch/m68k, which has no 64-bit mode and hence needs no compat handlers - arch/um/drivers/hostaudio_kern.c may run in 64-bit mode with 32-bit x86 user space underneath it. This rare corner case is the only one that still needs the compat handlers. By adding a simple redirect of .compat_ioctl to .unlocked_ioctl in the UML driver, we can remove all the COMPATIBLE_IOCTL() annotations without a change in functionality. For completeness, I'm adding the same thing to the dmasound file, knowing that it makes no difference. The compat_ioctl list contains one comment about SNDCTL_DSP_MAPINBUF and SNDCTL_DSP_MAPOUTBUF, which actually would need a translation handler if implemented. However, the native implementation just returns -EINVAL, so we don't care. Reviewed-by: Takashi Iwai Signed-off-by: Arnd Bergmann commit 54b5b60a149055d4fd4b0279bc72c539a0ff1696 Author: Arnd Bergmann Date: Thu Sep 6 11:37:09 2018 +0200 compat_ioctl: remove HIDIO translation The two drivers implementing these both gained proper compat_ioctl() handlers a long time ago with commits bb6c8d8fa9b5 ("HID: hiddev: Add 32bit ioctl compatibilty") and ae5e49c79c05 ("HID: hidraw: add compatibility ioctl() for 32-bit applications."), so the lists in fs/compat_ioctl.c are no longer used. It appears that the lists were also incomplete, so the translation didn't actually work correctly when it was still in use. Remove them as cleanup. Cc: linux-bluetooth@vger.kernel.org Cc: Marcel Holtmann Cc: Johan Hedberg Signed-off-by: Arnd Bergmann commit 61798109bec281475c0e7dcee1f24df066529033 Author: Arnd Bergmann Date: Thu Mar 14 11:23:09 2019 +0100 compat_ioctl: remove HCIUART handling As of commit f0193d3ea73b ("change semantics of ldisc ->compat_ioctl()"), all hciuart ioctl commands are handled correctly in the driver, and we never need to go through the table here. Cc: linux-bluetooth@vger.kernel.org Cc: Marcel Holtmann Cc: Johan Hedberg Signed-off-by: Arnd Bergmann commit 7a6038b30017c45e1110388083849689356a23ae Author: Arnd Bergmann Date: Thu Mar 14 14:10:33 2019 +0100 compat_ioctl: move hci_sock handlers into driver All these ioctl commands are compatible, so we can handle them with a trivial wrapper in hci_sock.c and remove the listing in fs/compat_ioctl.c. A few of the commands pass integer arguments instead of pointers, so for correctness skip the compat_ptr() conversion here. Acked-by: Marcel Holtmann Signed-off-by: Arnd Bergmann commit 7d60a7a6cd04c34014e763b5d7ed35d6366e42aa Author: Arnd Bergmann Date: Thu Mar 14 13:44:52 2019 +0100 compat_ioctl: move rfcomm handlers into driver All these ioctl commands are compatible, so we can handle them with a trivial wrapper in rfcomm/sock.c and remove the listing in fs/compat_ioctl.c. Acked-by: Marcel Holtmann Signed-off-by: Arnd Bergmann commit 5565a3cac5038561155e57451604fce2b5eb4dd7 Author: Arnd Bergmann Date: Thu Sep 6 23:17:20 2018 +0200 compat_ioctl: move isdn/capi ioctl translation into driver Neither the old isdn4linux interface nor the newer mISDN stack ever had working 32-bit compat mode as far as I can tell. However, the CAPI stack has some ioctl commands that are correctly listed in fs/compat_ioctl.c. We can trivially move all of those into the corresponding file that implement the native handlers by adding a compat_ioctl redirect to that. I did notice that treating CAPI_MANUFACTURER_CMD() as compatible is broken, so I'm also adding a handler for that, realizing that in all likelyhood, nobody is ever going to call it. Cc: Karsten Keil Cc: netdev@vger.kernel.org Cc: isdn4linux@listserv.isdn4linux.de Signed-off-by: Arnd Bergmann commit 0ba9841adb8659856cebb3b54a555e45a5f7fce5 Author: Arnd Bergmann Date: Thu Mar 14 12:14:17 2019 +0100 compat_ioctl: move ATYFB_CLK handling to atyfb driver These are two obscure ioctl commands, in a driver that only has compatible commands, so just let the driver handle this itself. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Arnd Bergmann commit 1207045da5a7c94344e0ea9a9e7495985eef499a Author: Arnd Bergmann Date: Fri Sep 7 16:49:43 2018 +0200 compat_ioctl: move tape handling into drivers MTIOCPOS and MTIOCGET are incompatible between 32-bit and 64-bit user space, and traditionally have been translated in fs/compat_ioctl.c. To get rid of that translation handler, move a corresponding implementation into each of the four drivers implementing those commands. The interesting part of that is now in a new linux/mtio.h header that wraps the existing uapi/linux/mtio.h header and provides an abstraction to let drivers handle both cases easily. Using an in_compat_syscall() check, the caller does not have to keep track of whether this was called through .unlocked_ioctl() or .compat_ioctl(). Acked-by: Heiko Carstens Cc: "Kai Mäkisara" Cc: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "David S. Miller" Signed-off-by: Arnd Bergmann commit 01b8bca81e181ccca475e1fdb92ebb00d9d9b547 Author: Arnd Bergmann Date: Tue Sep 11 17:28:08 2018 +0200 compat_ioctl: use correct compat_ptr() translation in drivers A handful of drivers all have a trivial wrapper around their ioctl handler, but don't call the compat_ptr() conversion function at the moment. In practice this does not matter, since none of them are used on the s390 architecture and for all other architectures, compat_ptr() does not do anything, but using the new compat_ptr_ioctl() helper makes it more correct in theory, and simplifies the code. I checked that all ioctl handlers in these files are compatible and take either pointer arguments or no argument. Acked-by: Al Viro Acked-by: Greg Kroah-Hartman Acked-by: Andrew Donnellan Acked-by: Felipe Balbi Signed-off-by: Arnd Bergmann commit 1832f2d8ff69138aa70d3cb3b4ea3c2058e73aea Author: Arnd Bergmann Date: Tue Sep 11 21:59:08 2018 +0200 compat_ioctl: move more drivers to compat_ptr_ioctl The .ioctl and .compat_ioctl file operations have the same prototype so they can both point to the same function, which works great almost all the time when all the commands are compatible. One exception is the s390 architecture, where a compat pointer is only 31 bit wide, and converting it into a 64-bit pointer requires calling compat_ptr(). Most drivers here will never run in s390, but since we now have a generic helper for it, it's easy enough to use it consistently. I double-checked all these drivers to ensure that all ioctl arguments are used as pointers or are ignored, but are not interpreted as integer values. Acked-by: Jason Gunthorpe Acked-by: Daniel Vetter Acked-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Acked-by: David Sterba Acked-by: Darren Hart (VMware) Acked-by: Jonathan Cameron Acked-by: Bjorn Andersson Acked-by: Dan Williams Signed-off-by: Arnd Bergmann commit 407e9ef72476e64937ebec44cc835e03a25fb408 Author: Arnd Bergmann Date: Tue Sep 11 17:23:00 2018 +0200 compat_ioctl: move drivers to compat_ptr_ioctl Each of these drivers has a copy of the same trivial helper function to convert the pointer argument and then call the native ioctl handler. We now have a generic implementation of that, so use it. Acked-by: Greg Kroah-Hartman Acked-by: Michael S. Tsirkin Acked-by: David S. Miller Acked-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe Reviewed-by: Jiri Kosina Reviewed-by: Stefan Hajnoczi Reviewed-by: Cornelia Huck Signed-off-by: Arnd Bergmann commit 076ff658628678f73d2349a699c3431877c1a075 Author: Arnd Bergmann Date: Fri Aug 24 00:11:19 2018 +0200 compat_ioctl: move rtc handling into drivers/rtc/dev.c We no longer need the rtc compat handling to be in common code, now that all drivers are either moved to the rtc-class framework, or (rarely) exist in drivers/char for architectures without compat mode (m68k, alpha and ia64, respectively). I checked the list of ioctl commands in drivers, and the ones that are not already handled are all compatible, again with the one exception of m68k driver, which implements RTC_PLL_GET and RTC_PLL_SET, but has no compat mode. Unlike earlier versions of this patch, I'm now adding a separate compat_ioctl handler that takes care of RTC_IRQP_READ32/RTC_IRQP_SET32 and treats all other commands as compatible, leaving the native behavior unchanged. The old conversion handler also deals with RTC_EPOCH_READ and RTC_EPOCH_SET, which are not handled in rtc-dev.c but only in a single device driver (rtc-vr41xx), so I'm adding the compat version in the same place. I don't expect other drivers to need those commands in the future. Acked-by: Alexandre Belloni Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann --- v4: handle RTC_EPOCH_SET32 in rtc_dev_compat_ioctl v3: handle RTC_IRQP_READ32/RTC_IRQP_SET32 in rtc_dev_compat_ioctl v2: merge compat handler into ioctl function to avoid the compat_alloc_user_space() roundtrip, based on feedback from Al Viro. commit 18bd6caaef4021803dd0d031dc37c2d001d18a5b Author: Arnd Bergmann Date: Tue Sep 11 20:47:23 2018 +0200 ceph: fix compat_ioctl for ceph_dir_operations The ceph_ioctl function is used both for files and directories, but only the files support doing that in 32-bit compat mode. On the s390 architecture, there is also a problem with invalid 31-bit pointers that need to be passed through compat_ptr(). Use the new compat_ptr_ioctl() to address both issues. Note: When backporting this patch to stable kernels, "compat_ioctl: add compat_ptr_ioctl()" is needed as well. Reviewed-by: "Yan, Zheng" Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann commit 37ecf8b20abd05cdcb6391e842802e3b4ca97876 Author: Al Viro Date: Sun Apr 21 20:43:10 2019 -0400 compat_sys_ioctl(): make parallel to do_vfs_ioctl() Handle ioctls that might be handled without reaching ->ioctl() in native case on the top level there. The counterpart of vfs_ioctl() (i.e. calling ->unlock_ioctl(), etc.) left as-is; eventually that would turn simply into the call of ->compat_ioctl(), but that'll take more work. Once that is done, we can move the remains of compat_sys_ioctl() into fs/ioctl.c and finally bury fs/compat_ioctl.c. Signed-off-by: Al Viro Signed-off-by: Arnd Bergmann commit 011da44bc5b6520d00b42c584a4fefc85f7b332b Author: Al Viro Date: Sun Apr 21 19:24:03 2019 -0400 compat: move FS_IOC_RESVSP_32 handling to fs/ioctl.c ... and lose the ridiculous games with compat_alloc_user_space() there. Signed-off-by: Al Viro Signed-off-by: Arnd Bergmann commit 34d3d0e65e3a84bc76e75431528e41f9f94bd6cf Author: Al Viro Date: Sun Apr 21 18:45:28 2019 -0400 do_vfs_ioctl(): use saner types casting to pointer to int, only to pass that to function that takes pointer to void and uses it as pointer to structure is really asking for trouble. "Some pointer, I'm not sure what to" is spelled "void *", not "int *"; use that. And declare the functions we are passing that pointer to as taking the pointer to what they really want to access. Signed-off-by: Al Viro Signed-off-by: Arnd Bergmann commit bf0a199b065c63ee21c1729d208e408404315f26 Author: Al Viro Date: Sun Apr 21 19:10:09 2019 -0400 compat: itanic doesn't have one ... and hadn't for a long time. Signed-off-by: Al Viro Signed-off-by: Arnd Bergmann commit ee26025f585cc158f257248b6454d10cdaf830a7 Author: Al Viro Date: Sun Apr 21 19:03:29 2019 -0400 FIGETBSZ: fix compat it takes a pointer argument, regular file or no regular file Signed-off-by: Al Viro Signed-off-by: Arnd Bergmann commit 6b2daec19094a90435abe67d16fb43b1a5527254 Author: Al Viro Date: Sun Apr 21 18:53:50 2019 -0400 fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP Unlike FICLONE, all of those take a pointer argument; they do need compat_ptr() applied to arg. Fixes: d79bdd52d8be ("vfs: wire up compat ioctl for CLONE/CLONE_RANGE") Fixes: 54dbc1517237 ("vfs: hoist the btrfs deduplication ioctl to the vfs") Fixes: ceac204e1da9 ("fs: make fiemap work from compat_ioctl") Signed-off-by: Al Viro Signed-off-by: Arnd Bergmann commit 2952db0fd51b0890f728df94ac563c21407f4f43 Author: Arnd Bergmann Date: Tue Sep 11 16:55:03 2018 +0200 compat_ioctl: add compat_ptr_ioctl() Many drivers have ioctl() handlers that are completely compatible between 32-bit and 64-bit architectures, except for the argument that is passed down from user space and may have to be passed through compat_ptr() in order to become a valid 64-bit pointer. Using ".compat_ptr = compat_ptr_ioctl" in file operations should let us simplify a lot of those drivers to avoid #ifdef checks, and convert additional drivers that don't have proper compat handling yet. On most architectures, the compat_ptr_ioctl() just passes all arguments to the corresponding ->ioctl handler. The exception is arch/s390, where compat_ptr() clears the top bit of a 32-bit pointer value, so user space pointers to the second 2GB alias the first 2GB, as is the case for native 32-bit s390 user space. The compat_ptr_ioctl() function must therefore be used only with ioctl functions that either ignore the argument or pass a pointer to a compatible data type. If any ioctl command handled by fops->unlocked_ioctl passes a plain integer instead of a pointer, or any of the passed data types is incompatible between 32-bit and 64-bit architectures, a proper handler is required instead of compat_ptr_ioctl. Signed-off-by: Arnd Bergmann --- v3: add a better description v2: use compat_ptr_ioctl instead of generic_compat_ioctl_ptrarg, as suggested by Al Viro commit 44bf67f32a6803339ac1ba721b158c3e2272cabe Merge: a96bf3cbd7b8 2e79e22e092a Author: Sean Paul Date: Wed Oct 23 11:14:11 2019 -0400 Merge drm/drm-next into drm-misc-next Parroting Daniel's backmerge justification from 2e79e22e092acd55da0b2db066e4826d7d152c41: Thierry needs fd70c7755bf0 ("drm/bridge: tc358767: fix max_tu_symbol value") to be able to merge his dp_link patch series. Signed-off-by: Sean Paul commit b08a0c577518a02ea08673f68881223a3ed35cc6 Author: Tony Lindgren Date: Mon Oct 21 14:16:42 2019 -0700 ARM: OMAP2+: Drop legacy platform data for am335x musb 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. Cc: Bin Liu Cc: Keerthy Signed-off-by: Tony Lindgren commit 12afc0cf81210969756daecd7eb48b307f08faed Author: Tony Lindgren Date: Mon Oct 21 14:16:42 2019 -0700 ARM: dts: Drop pointless status changing for am3 musb The default is enabled, and there should be no need to reconfigure the status for SoC internal devices in the board specific files. Only the USB PHY used needs to be configured in the board specific files. Cc: Bin Liu Cc: Keerthy Signed-off-by: Tony Lindgren commit 0782e8572ce43f521ed6ff15e4a7ab9aa5acdc85 Author: Tony Lindgren Date: Mon Oct 21 14:16:41 2019 -0700 ARM: dts: Probe am335x musb with ti-sysc We can now probe musb with ti-sysc interconnect driver and dts data with the following changes: 1. Swap the old ti,am33xx-usb compatible wrapper to generic ti-sysc driver. This means later on we can also remove the old wrapper driver drivers/usb/musb/musb_am335x.c 2. Update the child nodes to use the ranges provided by ti-sysc 3. Drop unneeded status = "enabled" tinkering for SoC internal devices. This allows us to remove some useless board specific boilerplate code in the following patches Cc: Bin Liu Cc: Keerthy Signed-off-by: Tony Lindgren commit 93f34e4edfecedce979b4d91d8b07ce31bc71f39 Author: Tony Lindgren Date: Mon Oct 21 14:16:41 2019 -0700 ARM: OMAP2+: Drop legacy platform data for musb on omap4 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. Signed-off-by: Tony Lindgren commit 9ac545f974017ac976ef84ec0db678c23a696ff1 Author: Tony Lindgren Date: Mon Oct 21 14:16:41 2019 -0700 ARM: OMAP2+: Drop legacy platform data for omap4 mcasp 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. Signed-off-by: Tony Lindgren commit 491a35282413257dd160ae776e6b5387eacdbc49 Author: Tony Lindgren Date: Mon Oct 21 14:16:40 2019 -0700 ARM: OMAP2+: Drop legacy platform data for am3 and am4 mcasp 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. Signed-off-by: Tony Lindgren commit a96bf3cbd7b8557f5c5c7938e5f8926ea39d55e9 Author: Sean Paul Date: Tue Oct 22 16:47:29 2019 -0400 Revert "drm/omap: add OMAP_BO flags to affect buffer allocation" This reverts commit 23b482252836ab3c5e6b3b20ed3038449cbc7679. This patch does not have an acceptable open source userspace implementation, and as such it does not meet the requirements for adding new UAPI. Discussion is in the Link. Link: https://lists.freedesktop.org/archives/dri-devel/2019-October/240586.html Fixes: 23b482252836 ("drm/omap: add OMAP_BO flags to affect buffer allocation") Cc: Tomi Valkeinen Cc: Jean-Jacques Hiblot Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Acked-by: Tomi Valkeinen Acked-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191022204733.235801-1-sean@poorly.run commit 2996547c0203c99aa7596f711a84adfea9d0bfcd Author: Richard Gong Date: Thu Oct 17 15:15:51 2019 -0500 arm64: defconfig: enable rsu driver Enable Intel Stratix10 Remote System Update (RSU) driver The Intel Remote System Update (RSU) driver provides a way for customers to update the boot configuration of a Intel Stratix 10 SoC device with significantly reduced risk of corrupting the bitstream storage and bricking the system. Signed-off-by: Richard Gong Signed-off-by: Dinh Nguyen commit aaed4dd6968668cc7ce9efafd865122bc08e0bc9 Author: Jani Nikula Date: Tue Oct 22 16:34:14 2019 +0300 drm/i915/dsc: move crtc state dp_dsc_cfg member under dsc as config DSC isn't DP specific, so remove the dp_ prefix from the crtc state member name. Also moving the member under the dsc sub-struct gives us enough context to allow shortening the name to just config. No functional changes. Cc: Manasi Navare Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191022133414.8293-2-jani.nikula@intel.com commit 010663a61c40377adebb716d3fed341042b5651f Author: Jani Nikula Date: Tue Oct 22 16:34:13 2019 +0300 drm/i915/dsc: rename crtc state dsc_params member to dsc Reduce verbosity in code by renaming dsc_params member of crtc state to simply dsc. There is enough context for this to be clear. No functional changes. Cc: Manasi Navare Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191022133414.8293-1-jani.nikula@intel.com commit b7178639516c74015361083c5c1641029f2642df Author: Nava kishore Manne Date: Fri Oct 18 18:07:34 2019 +0200 arm64: zynqmp: Add support for zynqmp nvmem firmware driver Add support for zynqmp nvmem firmware driver. Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek [m.tretter@pengutronix.de: move to subnode of firmware] Signed-off-by: Michael Tretter commit c40d1cceb30b508ccac85b34eb10d62fb9f32002 Author: Nava kishore Manne Date: Fri Oct 18 18:07:33 2019 +0200 arm64: zynqmp: Label whole PL part as fpga_full region This will simplify dt overlay structure for the whole PL. Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Signed-off-by: Michael Tretter commit 9c36339215359c7d2a04e9d4caa925a2766e5864 Author: Nava kishore Manne Date: Fri Oct 18 18:07:32 2019 +0200 arm64: zynqmp: Add support for zynqmp fpga manager Add support for zynqmp fpga manager. Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek [m.tretter@pengutronix.de: moved to subnode of firmware] Signed-off-by: Michael Tretter commit ef0d933efa8256b6ad462f60c8cdd4255ed5dc28 Author: Rajan Vaja Date: Fri Oct 18 18:07:31 2019 +0200 arm64: zynqmp: Add firmware DT node Add firmware DT node in ZynqMP device tree. This node uses bindings as per new firmware interface driver. Signed-off-by: Rajan Vaja Signed-off-by: Michal Simek Signed-off-by: Michael Tretter commit fe12e94375da34d62f7d5556161ce7629212ff80 Merge: 698b8eeaed72 228fc0104070 Author: Linus Walleij Date: Wed Oct 23 13:31:36 2019 +0200 Merge tag 'gpio-v5.5-updates-for-linus-part-1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio updates for v5.5 - only get the second IRQ when there is more than one IRQ in mxc - move the code around in lineevent_create() for some shrinkage - fix formatting for GPIO docs - add DT binding for r8a774b1 - convert drivers that prevously used nocache ioremap() to using regular devm_platform_ioremap_resource() - remove some redundant error messages - shrink object code in 104-idi-48e - drop an unneeded warning from gpiolib-of commit d54725cd11a57c30f650260cfb0a92c268bdc3e0 Author: Pablo Neira Ayuso Date: Wed Oct 16 14:30:05 2019 +0200 netfilter: nf_tables: support for multiple devices per netdev hook This patch allows you to register one netdev basechain to multiple devices. This adds a new NFTA_HOOK_DEVS netlink attribute to specify the list of netdevices. Basechains store a list of hooks. Signed-off-by: Pablo Neira Ayuso commit bbaef955af6efa6a9090b86430e452086d8fce02 Author: Pablo Neira Ayuso Date: Wed Oct 16 14:30:02 2019 +0200 netfilter: nf_tables_offload: remove rules on unregistered device only After unbinding the list of flow_block callbacks, iterate over it to remove the existing rules in the netdevice that has just been unregistered. Signed-off-by: Pablo Neira Ayuso commit c5d275276ff4becb53c01a716c1f4325c2fb1197 Author: Pablo Neira Ayuso Date: Wed Oct 16 14:29:59 2019 +0200 netfilter: nf_tables_offload: add nft_flow_cls_offload_setup() Add helper function to set up the flow_cls_offload object. Signed-off-by: Pablo Neira Ayuso commit b58288804a3ba0b06e2b34c92cdbfdece8413cff Author: Pablo Neira Ayuso Date: Wed Oct 16 14:29:56 2019 +0200 netfilter: nf_tables_offload: Pass callback list to nft_setup_cb_call() This allows to reuse nft_setup_cb_call() from the callback unbind path. Signed-off-by: Pablo Neira Ayuso commit ead3952ea743c9ac52661aed363b1475bca66c06 Author: Pablo Neira Ayuso Date: Wed Oct 16 14:29:52 2019 +0200 netfilter: nf_tables_offload: add nft_flow_block_chain() Add nft_flow_block_chain() helper function to reuse this function from netdev event handler. Signed-off-by: Pablo Neira Ayuso commit cb662ac6711f7135618526221498ebfae155531a Author: Pablo Neira Ayuso Date: Wed Oct 16 14:29:47 2019 +0200 netfilter: nf_tables: increase maximum devices number per flowtable Rise the maximum limit of devices per flowtable up to 256. Rename NFT_FLOWTABLE_DEVICE_MAX to NFT_NETDEVICE_MAX in preparation to reuse the netdev hook parser for ingress basechain. Signed-off-by: Pablo Neira Ayuso commit b75a3e8371bce7985d3d149ad3442bf2a036065c Author: Pablo Neira Ayuso Date: Wed Oct 16 14:25:05 2019 +0200 netfilter: nf_tables: allow netdevice to be used only once per flowtable Allow netdevice only once per flowtable, otherwise hit EEXIST. Signed-off-by: Pablo Neira Ayuso commit 3f0465a9ef02624e0a36db9e7c9bedcafcd6f6fe Author: Pablo Neira Ayuso Date: Wed Oct 16 14:24:01 2019 +0200 netfilter: nf_tables: dynamically allocate hooks per net_device in flowtables Use a list of hooks per device instead an array. Signed-off-by: Pablo Neira Ayuso commit 71a8a63b9dbdeba8205a37979b81d4fba499d079 Author: Pablo Neira Ayuso Date: Wed Oct 16 14:23:55 2019 +0200 netfilter: nf_flow_table: move priority to struct nf_flowtable Hardware offload needs access to the priority field, store this field in the nf_flowtable object. Signed-off-by: Pablo Neira Ayuso commit 2e79e22e092acd55da0b2db066e4826d7d152c41 Merge: f1b4a9217efd 7d194c2100ad Author: Daniel Vetter Date: Wed Oct 23 12:02:47 2019 +0200 Merge v5.4-rc4 into drm-next Thierry needs fd70c7755bf0 ("drm/bridge: tc358767: fix max_tu_symbol value") to be able to merge his dp_link patch series. Some adjacent changes conflicts, plus some clashes in i915 due to cherry-picking and git trying to be helpful and leaving both versions in. Signed-off-by: Daniel Vetter commit e16302cb673c13193c582ebcd17965e189bbe72b Author: Chris Wilson Date: Tue Oct 22 23:33:16 2019 +0100 drm/i915/selftests: Release ctx->engine_mutex after iteration A lock once taken must be released again. Fixes: c31c9e82ee8a ("drm/i915/selftests: Teach switch_to_context() to use the context") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191022223316.12662-1-chris@chris-wilson.co.uk commit a5e5cf98387280cad04b690669ae8b3f8f58f357 Author: Daniel Vetter Date: Tue Oct 22 17:25:30 2019 +0200 drm/todo: Add levels Should help new people pick suitable tasks. Cc: Rodrigo Siqueira Cc: Manasi Navare Cc: Sean Paul Reviewed-by: Sean Paul Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191022152530.22038-2-daniel.vetter@ffwll.ch commit ac18a29a1a1dcdeb023888992d68e95cee527b26 Author: Daniel Vetter Date: Tue Oct 22 17:25:29 2019 +0200 drm/todo: Remove i915 device_link task Done with commit aef9f33b7658a7489f71df5d6e6ecb47f2521e8a Author: Imre Deak Date: Tue Oct 23 17:43:10 2018 +0300 drm/i915: Ensure proper HDA suspend/resume ordering with a device link Cc: Imre Deak Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191022152530.22038-1-daniel.vetter@ffwll.ch commit b60e711a43f2425a975beacdd72fe283e0286e55 Author: Daniel Vetter Date: Tue Oct 22 18:37:17 2019 +0200 drm/doc: Drop misleading comment on drm_mode_config_cleanup This is not something we'll fix, because failing to clean up stuff (or doing it in the wrong order) is a driver bug. The offending FIXME goes all the way back to the original modeset merge. We've added a WARN_ON in commit 2b677e8c08eed11e4ebe66a7c334f03e389a19a3 Author: Daniel Vetter Date: Mon Dec 10 21:16:05 2012 +0100 drm: reference framebuffers which are on the idr including a comment blaming drivers on this. Right thing to do is most likely drm_atomic_helper_shutdown plus making sure that drm_mode_config_cleanup is not called too early (i.e. not in driver unload, but only in the final drm_device release callback). Cc: Mihail Atanassov Reported-by: Mihail Atanassov Reviewed-by: Mihail Atanassov Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191022163717.1064-1-daniel.vetter@ffwll.ch commit ebd09f1cd417fce9c85de3abcabf51eadf907a2a Author: Charles Yeh Date: Tue Sep 24 20:14:00 2019 +0800 USB: serial: pl2303: add support for PL2303HXN Prolific has developed a new USB to UART chip: PL2303HXN PL2303HXN : PL2303GC/PL2303GS/PL2303GT/PL2303GL/PL2303GE/PL2303GB The Vendor request used by the PL2303HXN (TYPE_HXN) is different from the existing PL2303 series (TYPE_HX & TYPE_01). Therefore, different Vendor requests are used to issue related commands. 1. Added a new TYPE_HXN type in pl2303_type_data, and then executes new Vendor request,new flow control and other related instructions if TYPE_HXN is recognized. 2. Because the new PL2303HXN only accept the new Vendor request, the old Vendor request cannot be accepted (the error message will be returned) So first determine the TYPE_HX or TYPE_HXN through PL2303_READ_TYPE_HX_STATUS in pl2303_startup. 2.1 If the return message is "1", then the PL2303 is the existing TYPE_HX/ TYPE_01 series. The other settings in pl2303_startup are to continue execution. 2.2 If the return message is "not 1", then the PL2303 is the new TYPE_HXN series. The other settings in pl2303_startup are ignored. (PL2303HXN will directly use the default value in the hardware, no need to add additional settings through the software) 3. In pl2303_open: Because TYPE_HXN is different from the instruction of reset down/up stream used by TYPE_HX. Therefore, we will also execute different instructions here. 4. In pl2303_set_termios: The UART flow control instructions used by TYPE_HXN/TYPE_HX/TYPE_01 are different. Therefore, we will also execute different instructions here. 5. In pl2303_vendor_read & pl2303_vendor_write, since TYPE_HXN is different from the vendor request instruction used by TYPE_HX/TYPE_01, it will also execute different instructions here. 6. In pl2303_update_reg: TYPE_HXN used different register for flow control. Therefore, we will also execute different instructions here. Signed-off-by: Charles Yeh Signed-off-by: Johan Hovold commit e9fc36719b529b89614e0238cf32d32732593551 Author: Pascal van Leeuwen Date: Thu Oct 17 17:49:09 2019 +0200 crypto: inside-secure - Made locally used safexcel_pci_remove() static safexcel_pci_remove() is only used locally in the module and not exported, so added a static function specifier. This fixes a sparse issue reported by Ben Dooks. Fixes: 625f269a5a7a ("crypto: inside-secure - add support for...") Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 756497cb7be2fee4e71b77ae140c1537e963e794 Author: Pascal van Leeuwen Date: Thu Oct 17 17:36:28 2019 +0200 crypto: inside-secure - Fix build error with CONFIG_CRYPTO_SM3=m Always take the zero length hash value for SM3 from the local constant to avoid a reported build error when SM3 is configured to be a module. Fixes: 0f2bc13181ce ("crypto: inside-secure - Added support for...") Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 5b243b6c4aa2114ab84bb8a4b604c892a6ffd391 Author: Rikard Falkeborn Date: Tue Oct 15 22:13:30 2019 +0200 crypto: hisilicon: Fix misuse of GENMASK macro Arguments are supposed to be ordered high then low. Fixes: c8b4b477079d ("crypto: hisilicon - add HiSilicon HPRE accelerator") Signed-off-by: Rikard Falkeborn Signed-off-by: Herbert Xu commit 28443671a468489fb147b31687b2157b6ba59c4a Author: Laurent Vivier Date: Mon Oct 14 13:46:32 2019 +0200 hwrng: core - Fix use-after-free warning in hwrng_register() Commit daae28debcb0 has moved add_early_randomness() out of the rng_mutex and tries to protect the reference of the new rng device by incrementing the reference counter. But in hwrng_register(), the function can be called with a new device that is not set as the current_rng device and the reference has not been initialized. This patch fixes the problem by not using the reference counter when the device is not the current one: the reference counter is only meaningful in the case of the current rng device and a device is not used if it is not the current one (except in hwrng_register()) The problem has been reported by Marek Szyprowski on ARM 32bit Exynos5420-based Chromebook Peach-Pit board: WARNING: CPU: 3 PID: 1 at lib/refcount.c:156 hwrng_register+0x13c/0x1b4 refcount_t: increment on 0; use-after-free. Modules linked in: CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc1-00061-gdaae28debcb0 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xa8/0xd4) [] (dump_stack) from [] (__warn+0xf4/0x10c) [] (__warn) from [] (warn_slowpath_fmt+0x74/0xb8) [] (warn_slowpath_fmt) from [] (hwrng_register+0x13c/0x1b4) [] (hwrng_register) from [] (tpm_chip_register+0xc4/0x274) ... Reported-by: Marek Szyprowski Fixes: daae28debcb0 ("hwrng: core - move add_early_randomness() out of rng_mutex") Tested-by: Marek Szyprowski Signed-off-by: Laurent Vivier Signed-off-by: Herbert Xu commit 4ba802980cadb2c6a30e277f4d0a1a64df7fdb1c Author: Eric Biggers Date: Sat Oct 12 21:39:18 2019 -0700 crypto: nx - convert AES-CTR to skcipher API Convert the PowerPC Nest (NX) implementation of AES-CTR from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit c1e9c386c95414384d1ad24065d4d4e4d74f8bbc Author: Eric Biggers Date: Sat Oct 12 21:39:17 2019 -0700 crypto: nx - convert AES-CBC to skcipher API Convert the PowerPC Nest (NX) implementation of AES-CBC from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit bfd9efddf990d152dc9912fdca520c5e1e19e1e2 Author: Eric Biggers Date: Sat Oct 12 21:39:16 2019 -0700 crypto: nx - convert AES-ECB to skcipher API Convert the PowerPC Nest (NX) implementation of AES-ECB from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7740bd51efd697fe3750c7317229ec83571f5d98 Author: Eric Biggers Date: Sat Oct 12 21:39:15 2019 -0700 crypto: nx - don't abuse blkcipher_desc to pass iv around The NX crypto driver is using 'struct blkcipher_desc' to pass the IV around, even for AEADs (for which it creates the struct on the stack). This is not appropriate since this structure is part of the "blkcipher" API, which is deprecated and will be removed. Just pass around the IV directly instead. Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 713b2e7203354a52ec65a913e89c957bfc8d9220 Author: Eric Biggers Date: Sat Oct 12 21:17:41 2019 -0700 crypto: padlock-aes - convert to skcipher API Convert the VIA PadLock implementations of AES-ECB and AES-CBC from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit fabdf25388df74b7922a69687f52730ead682a0d Author: Eric Biggers Date: Sat Oct 12 13:18:09 2019 -0700 crypto: s390/des - convert to skcipher API Convert the glue code for the S390 CPACF implementations of DES-ECB, DES-CBC, DES-CTR, 3DES-ECB, 3DES-CBC, and 3DES-CTR from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Note: I made CTR use the same function for encryption and decryption, since CTR encryption and decryption are identical. Signed-off-by: Eric Biggers reviewed-by: Harald Freudenberger Signed-off-by: Herbert Xu commit d00c0639815483d5ae0d93bef4e67759352c7fe4 Author: Eric Biggers Date: Sat Oct 12 13:18:08 2019 -0700 crypto: s390/paes - convert to skcipher API Convert the glue code for the S390 CPACF protected key implementations of AES-ECB, AES-CBC, AES-XTS, and AES-CTR from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Note: I made CTR use the same function for encryption and decryption, since CTR encryption and decryption are identical. Signed-off-by: Eric Biggers reviewed-by: Harald Freudenberger Signed-off-by: Herbert Xu commit 7988fb2c03c8cf9936f851ab19a6d21b3c3411c0 Author: Eric Biggers Date: Sat Oct 12 13:18:07 2019 -0700 crypto: s390/aes - convert to skcipher API Convert the glue code for the S390 CPACF implementations of AES-ECB, AES-CBC, AES-XTS, and AES-CTR from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Note: I made CTR use the same function for encryption and decryption, since CTR encryption and decryption are identical. Signed-off-by: Eric Biggers Reviewed-by: Harald Freudenberger Signed-off-by: Herbert Xu commit cd5d2f8457468df573085f91dd7b37ab8350a9af Author: Eric Biggers Date: Fri Oct 11 21:38:50 2019 -0700 crypto: sparc/des - convert to skcipher API Convert the glue code for the SPARC64 DES opcodes implementations of DES-ECB, DES-CBC, 3DES-ECB, and 3DES-CBC from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c72a26ef6b259ccdbaa3f866b404d6ce1312ec30 Author: Eric Biggers Date: Fri Oct 11 21:38:49 2019 -0700 crypto: sparc/camellia - convert to skcipher API Convert the glue code for the SPARC64 Camellia opcodes implementations of Camellia-ECB and Camellia-CBC from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 64db5e7439fb582e394ea413822bd1a43a47bc55 Author: Eric Biggers Date: Fri Oct 11 21:38:48 2019 -0700 crypto: sparc/aes - convert to skcipher API Convert the glue code for the SPARC64 AES opcodes implementations of AES-ECB, AES-CBC, and AES-CTR from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit fcf801cc551a05a439f819d91b5f853a49c8d243 Author: Yunfeng Ye Date: Fri Oct 11 20:44:53 2019 +0800 crypto: chtls - remove the redundant check in chtls_recvmsg() A warning message reported by a static analysis tool: " Either the condition 'if(skb)' is redundant or there is possible null pointer dereference: skb. " Remove the unused redundant check. Signed-off-by: Yunfeng Ye Signed-off-by: Herbert Xu commit b981744ef04f7e8cb6931edab50021fff3c8077e Author: Zhou Wang Date: Fri Oct 11 19:18:10 2019 +0800 crypto: hisilicon - select NEED_SG_DMA_LENGTH in qm Kconfig To avoid compile error in some platforms, select NEED_SG_DMA_LENGTH in qm Kconfig. Fixes: dfed0098ab91 ("crypto: hisilicon - add hardware SGL support") Signed-off-by: Zhou Wang Reported-by: kbuild test robot Signed-off-by: Herbert Xu commit 14304da06cb398dfc843703b550590e9269f1720 Author: zhengbin Date: Fri Oct 11 18:08:02 2019 +0800 crypto: ux500 - Remove set but not used variable 'cookie' Fixes gcc '-Wunused-but-set-variable' warning: drivers/crypto/ux500/hash/hash_core.c: In function hash_set_dma_transfer: drivers/crypto/ux500/hash/hash_core.c:143:15: warning: variable cookie set but not used [-Wunused-but-set-variable] It is not used since commit 8a63b1994c50 ("crypto: ux500 - Add driver for HASH hardware") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Herbert Xu commit b4d0c0aad57ac3bd1b5141bac5ab1ab1d5e442b3 Author: Ard Biesheuvel Date: Fri Oct 11 11:08:00 2019 +0200 crypto: arm - use Kconfig based compiler checks for crypto opcodes Instead of allowing the Crypto Extensions algorithms to be selected when using a toolchain that does not support them, and complain about it at build time, use the information we have about the compiler to prevent them from being selected in the first place. Users that are stuck with a GCC version <4.8 are unlikely to care about these routines anyway, and it cleans up the Makefile considerably. While at it, add explicit 'armv8-a' CPU specifiers to the code that uses the 'crypto-neon-fp-armv8' FPU specifier so we don't regress Clang, which will complain about this in version 10 and later. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 4549f7e5aa27ffc2cba63b5db8842a3b486f5688 Author: Eric Biggers Date: Thu Oct 10 21:51:32 2019 -0700 crypto: geode-aes - convert to skcipher API and make thread-safe The geode AES driver is heavily broken because it stores per-request state in the transform context. So it will crash or produce the wrong result if used by any of the many places in the kernel that issue concurrent requests for the same transform object. This driver is also implemented using the deprecated blkcipher API, which makes it difficult to fix, and puts it among the drivers preventing that API from being removed. Convert this driver to use the skcipher API, and change it to not store per-request state in the transform context. Fixes: 9fe757b0cfce ("[PATCH] crypto: Add support for the Geode LX AES hardware") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit e53619c840ba449f3f671d6b8ddc2341bdfa1a56 Author: Łukasz Stelmach Date: Wed Oct 9 16:17:32 2019 +0200 dt-bindings: hwrng: Add Samsung Exynos 5250+ True RNG bindings Add binding documentation for the True Random Number Generator found on Samsung Exynos 5250+ SoCs. Acked-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Łukasz Stelmach Signed-off-by: Herbert Xu commit 4bd5ead82d4b877ebe41daf95f28cda53205b039 Author: Yoshihiro Shimoda Date: Mon Oct 7 16:55:10 2019 +0900 phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role" Since the role_store() uses strncmp(), it's possible to refer out-of-memory if the sysfs data size is smaller than strlen("host"). This patch fixes it by using sysfs_streq() instead of strncmp(). Reported-by: Pavel Machek Fixes: 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap") Cc: # v4.10+ Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Acked-by: Pavel Machek Signed-off-by: Kishon Vijay Abraham I commit a8a24429dd1d799f1c6737779af88c1d39290a77 Author: Nagarjuna Kristam Date: Fri Oct 18 15:08:09 2019 +0530 phy: tegra: xusb: Add vbus override support on Tegra186 Tegra XUSB device control driver needs to control vbus override during its operations, add API for the support. Signed-off-by: Nagarjuna Kristam Signed-off-by: Kishon Vijay Abraham I commit 90767cdfea89c3ac7012035d66633b9ba839091a Author: Nagarjuna Kristam Date: Fri Oct 18 15:08:08 2019 +0530 phy: tegra: xusb: Add vbus override support on Tegra210 Tegra XUSB device control driver needs to control vbus override during its operations, add API for the support. Signed-off-by: Nagarjuna Kristam Acked-by: Thierry Reding Signed-off-by: Kishon Vijay Abraham I commit a5be28c3656af71f1c9d75381f7b86d5056da9f3 Author: Nagarjuna Kristam Date: Fri Oct 18 15:08:07 2019 +0530 phy: tegra: xusb: Add usb3 port fake support on Tegra210 On Tegra210, usb2 only otg/peripheral ports dont work in device mode. They need an assosciated usb3 port to work in device mode. Identify an unused usb3 port and assign it as a fake USB3 port to USB2 only port whose mode is otg/peripheral. Based on work by BH Hsieh . Signed-off-by: Nagarjuna Kristam Acked-by: Thierry Reding Signed-off-by: Kishon Vijay Abraham I commit ac25b6e9f8d26b90694c1150b2e677aeac46ec71 Author: Nagarjuna Kristam Date: Fri Oct 18 15:08:06 2019 +0530 phy: tegra: xusb: Add XUSB dual mode support on Tegra210 Configure the port capabilities based on usb_dr_mode settings. Based on work by JC Kuo . Signed-off-by: Nagarjuna Kristam Reviewed-by: JC Kuo Acked-by: Thierry Reding Signed-off-by: Kishon Vijay Abraham I commit 3f6d43a66e3e7cc3f0026153d54a2197f62276e4 Author: Fabrizio Castro Date: Tue Oct 8 11:38:46 2019 +0100 dt-bindings: rcar-gen3-phy-usb3: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I commit 700d3802427d0550a2e0947254491edb284347b5 Author: Fabrizio Castro Date: Tue Oct 8 11:38:43 2019 +0100 dt-bindings: rcar-gen3-phy-usb2: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I commit 1025cb924bd517f3c458f36973582d4c2adedd6a Author: Ben Dooks Date: Tue Oct 15 17:03:32 2019 +0100 phy: phy-brcm-usb-init: fix use of integer as pointer The xhci_ec_base variable is a pointer, so don't compare it with an integer. Signed-off-by: Ben Dooks Reviewed-by: Andrew Murray Signed-off-by: Kishon Vijay Abraham I commit e4b957d3a7c74749e2ccfb3dedb63b81e84b292c Author: Ben Dooks Date: Tue Oct 15 17:03:31 2019 +0100 phy: phy-brcm-usb-init: fix __iomem annotations The register address should have __iomem attributes so fix this to remove the following sparse warnings: drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:461:30: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:461:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:461:30: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:461:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:465:30: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:465:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:465:30: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:465:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:469:30: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:469:30: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:469:30: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:469:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:478:30: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:478:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:478:30: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:478:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:480:30: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:480:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:480:30: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:480:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:485:30: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:485:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:485:30: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:485:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:494:9: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:494:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:494:9: expected void [noderef] *reg drivers/phy/broadcom/phy-brcm-usb-init.c:494:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:495:9: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:495:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:495:9: expected void [noderef] *reg drivers/phy/broadcom/phy-brcm-usb-init.c:495:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:498:9: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:498:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:498:9: expected void [noderef] *reg drivers/phy/broadcom/phy-brcm-usb-init.c:498:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:501:9: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:501:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:501:9: expected void [noderef] *reg drivers/phy/broadcom/phy-brcm-usb-init.c:501:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:613:9: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:613:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:613:9: expected void [noderef] *reg drivers/phy/broadcom/phy-brcm-usb-init.c:613:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:640:9: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:640:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:640:9: expected void [noderef] *reg drivers/phy/broadcom/phy-brcm-usb-init.c:640:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:710:64: warning: Using plain integer as NULL pointer drivers/phy/broadcom/phy-brcm-usb-init.c:712:32: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:712:32: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:712:32: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:712:32: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:713:29: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:713:29: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:713:29: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:713:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:717:29: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:717:29: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:717:29: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:717:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:720:9: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:720:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:720:9: expected void [noderef] *reg drivers/phy/broadcom/phy-brcm-usb-init.c:720:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:721:9: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:721:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:721:9: expected void [noderef] *reg drivers/phy/broadcom/phy-brcm-usb-init.c:721:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:794:29: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:794:29: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:794:29: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:794:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:813:29: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:813:29: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:813:29: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:813:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:829:37: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:829:37: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:829:37: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:829:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:843:37: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:843:37: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:843:37: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:843:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:847:37: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:847:37: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:847:37: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:847:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:878:9: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:878:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:878:9: expected void [noderef] *reg drivers/phy/broadcom/phy-brcm-usb-init.c:878:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:880:29: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:880:29: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:880:29: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:880:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:896:29: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:896:29: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:896:29: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:896:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:901:37: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:901:37: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:901:37: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:901:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:905:37: warning: cast removes address space '' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:905:37: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:905:37: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:905:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: too many warnings Signed-off-by: Ben Dooks Signed-off-by: Kishon Vijay Abraham I commit fa093440142d3d25d619580373bb40e9653a203a Author: YueHaibing Date: Wed Oct 16 21:57:35 2019 +0800 phy: hisilicon: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Kishon Vijay Abraham I commit c9dfadeee89d4c5d335969356c4e63e9b279d038 Author: Geert Uytterhoeven Date: Wed Oct 16 16:27:33 2019 +0200 phy: renesas: rcar-gen3-usb2: Use platform_get_irq_optional() for optional irq As platform_get_irq() now prints an error when the interrupt does not exist, a scary warning may be printed for an optional interrupt: phy_rcar_gen3_usb2 ee0a0200.usb-phy: IRQ index 0 not found Fix this by calling platform_get_irq_optional() instead. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Stephen Boyd Tested-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I commit 265938bb1bc8f45141f59a62ac295c53946c4da0 Author: Markus Elfring Date: Thu Sep 26 18:15:23 2019 +0200 phy-mvebu-a3700-utmi: Use devm_platform_ioremap_resource() in mvebu_a3700_utmi_phy_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Kishon Vijay Abraham I commit f466de0208e3ef6e9d28ad0b2d6a30cdd9d5052f Author: Chunfeng Yun Date: Wed Oct 9 15:23:09 2019 +0800 phy: tegra: xusb: remove unused variable The local variable @priv is set but not used, can be removed Signed-off-by: Chunfeng Yun Acked-by: Thierry Reding Signed-off-by: Kishon Vijay Abraham I commit fbf6a7a4c976668ce5fd5de29e48772b146eabd1 Author: Colin Ian King Date: Fri Sep 6 13:49:44 2019 +0100 phy: xgene: make array serdes_reg static const, makes object smaller Don't populate the array serdes_reg on the stack but instead make it static const. Makes the object code smaller by 228 bytes. Before: text data bss dec hex filename 23875 6232 64 30171 75db drivers/phy/phy-xgene.o After: text data bss dec hex filename 23551 6328 64 29943 74f7 drivers/phy/phy-xgene.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Kishon Vijay Abraham I commit a5c6603038caf86ee08efa871d4b10806cee3dfd Author: Tudor Ambarus Date: Tue Sep 24 07:45:58 2019 +0000 mtd: spi-nor: cadence-quadspi: Fix cqspi_command_read() definition n_tx was never used, drop it. Replace 'const u8 *txbuf' with 'u8 opcode', to comply with the SPI NOR int (*read_reg)() method. The 'const' qualifier has no meaning for parameters passed by value, drop it. Going furher, the opcode was passed to cqspi_calc_rdreg() and never used, drop it. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 45397787536434648495f7b02a7e669ab8ae12f3 Author: Tudor Ambarus Date: Tue Sep 24 07:45:53 2019 +0000 mtd: spi-nor: Introduce 'struct spi_nor_controller_ops' Move all SPI NOR controller driver specific ops in a dedicated structure. 'struct spi_nor' becomes lighter. Use size_t for lengths in 'int (*write_reg)()' and 'int (*read_reg)()'. Rename wite/read_buf to buf, the name of the functions are suggestive enough. Constify buf in int (*write_reg). Comply with these changes in the SPI NOR controller drivers. Suggested-by: Boris Brezillon Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 1a21bdfeac051c667352e8e16ee51b90e9a837c5 Author: Tudor Ambarus Date: Tue Sep 24 07:45:50 2019 +0000 mtd: spi-nor: hisi-sfc: Drop nor->erase NULL assignment The pointer to 'struct spi_nor' is kzalloc'ed above in the code. Signed-off-by: Tudor Ambarus Reviewed-by: Boris Brezillon commit 172b33212d76a4bc4b18ba952e8a431b4a2d6c15 Author: DENG Qingfang Date: Wed Oct 23 00:59:39 2019 +0800 mtd: spi-nor: add support for en25qh16 Tested on HiWiFi C526A Datasheet is available at: http://www.xinyahong.com/upLoad/product/month_1411/201411201256018276.pdf Signed-off-by: DENG Qingfang Signed-off-by: Tudor Ambarus commit 4b97ba73dcdc24fd968cbeb970ae57212e2c1c73 Author: Jethro Beekman Date: Wed Sep 4 01:15:24 2019 +0000 mtd: spi-nor: intel-spi: add support for Intel Cannon Lake SPI flash Now that SPI flash controllers without a software sequencer are supported, it's trivial to add support for CNL and its PCI ID. Values from https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/300-series-chipset-pch-datasheet-vol-2.pdf Signed-off-by: Jethro Beekman Reviewed-by: Mika Westerberg Signed-off-by: Tudor Ambarus commit 3912970809cfbc005bf0b404b9d286a95def694e Author: Jethro Beekman Date: Wed Sep 4 01:15:14 2019 +0000 mtd: spi-nor: intel-spi: support chips without software sequencer Some flash controllers don't have a software sequencer. Avoid configuring the register addresses for it, and double check everywhere that its not accidentally trying to be used. Every use of `sregs` is now guarded by a check of `sregs` or `swseq_reg`. The check might be done in the calling function. Signed-off-by: Jethro Beekman Signed-off-by: Tudor Ambarus commit f3088e6a12fe516d89cd431877123041235fcd74 Author: Chunfeng Yun Date: Wed Oct 9 17:05:00 2019 +0800 usb: mtu3: fix race condition about delayed_status usb_composite_setup_continue() may be called before composite_setup() return USB_GADGET_DELAYED_STATUS, then the controller driver will delay status stage after composite_setup() finish, but the class driver don't ask the controller to continue delayed status anymore, this will cause control transfer timeout. happens when use mass storage (also enabled other class driver): cpu1: cpu2 handle_setup(SET_CONFIG) //gadget driver unlock (g->lock) gadget_driver->setup() composite_setup() lock(cdev->lock) set_config() fsg_set_alt() // maybe some times due to many class are enabled raise FSG_STATE_CONFIG_CHANGE return USB_GADGET_DELAYED_STATUS handle_exception() usb_composite_setup_continue() unlock(cdev->lock) lock(cdev->lock) ep0_queue() lock (g->lock) //no delayed status, nothing todo unlock (g->lock) unlock(cdev->lock) return USB_GADGET_DELAYED_STATUS // composite_setup lock (g->lock) get USB_GADGET_DELAYED_STATUS //handle_setup [1] Try to fix the race condition as following: After the driver gets USB_GADGET_DELAYED_STATUS at [1], if we find there is a usb_request in ep0 request list, it means composite already asked us to continue delayed status by usb_composite_setup_continue(), so we skip request about delayed_status by composite_setup() and still do status stage. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi commit 49db427232fe2c357d23a2d62e2db1d431f95051 Author: Nagarjuna Kristam Date: Fri Oct 18 15:08:15 2019 +0530 usb: gadget: Add UDC driver for tegra XUSB device mode controller This patch adds UDC driver for tegra XUSB 3.0 device mode controller. XUSB device mode controller supports SS, HS and FS modes Based on work by: Mark Kuo Hui Fu Andrew Bresticker Signed-off-by: Nagarjuna Kristam Acked-by: Thierry Reding Signed-off-by: Felipe Balbi commit 038761ce68c2354106fca276c8273351d5fe19a1 Author: Thinh Nguyen Date: Tue Oct 22 12:10:16 2019 -0700 usb: dwc3: debug: Remove newline printout The newline from the unknown link state tracepoint doesn't follow the other tracepoints, and it looks unsightly. Let's remove it. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 53596dfa59807d6e4a30e9f157f73cfc14d7da89 Author: Peng Ma Date: Wed Oct 23 12:56:17 2019 +0800 dmaengine: fsl-dpaa2-qdma: export the symbols The symbols were not exported leading to error: WARNING: modpost: missing MODULE_LICENSE() in drivers/dma/fsl-dpaa2-qdma/dpdmai.o see include/linux/module.h for more information GZIP arch/arm64/boot/Image.gz ERROR: "dpdmai_enable" [drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.ko] undefined! ERROR: "dpdmai_set_rx_queue" [drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.ko] undefined! ERROR: "dpdmai_get_tx_queue" [drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.ko] undefined! ERROR: "dpdmai_get_rx_queue" [drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.ko] undefined! ERROR: "dpdmai_get_attributes" [drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.ko] undefined! ERROR: "dpdmai_open" [drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.ko] undefined! ERROR: "dpdmai_close" [drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.ko] undefined! ERROR: "dpdmai_disable" [drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.ko] undefined! ERROR: "dpdmai_reset" [drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.ko] undefined! WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL make[2]: *** [__modpost] Error 1 make[1]: *** [modules] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [sub-make] Error 2 So export it. Signed-off-by: Peng Ma Reported-by: Anders Roxell Link: https://lore.kernel.org/r/20191023045617.22764-1-peng.ma@nxp.com Signed-off-by: Vinod Koul commit cc8f81c7e625168a60843b2b39e3a327cf5170fe Author: Pierre-Louis Bossart Date: Tue Oct 22 19:43:13 2019 +0200 ALSA: hda: fix intel DSP config Reshuffle list of devices by historical order and add correct information as needed. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20191022174313.29087-2-perex@perex.cz Signed-off-by: Takashi Iwai commit 82d9d54a6c0ee8b12211fa4e59fd940a2da4e063 Author: Jaroslav Kysela Date: Tue Oct 22 19:43:12 2019 +0200 ALSA: hda: add Intel DSP configuration / probe code For distributions, we need one place where we can decide which driver will be activated for the auto-configation of the Intel's HDA hardware with DSP. Actually, we cover three drivers: * Legacy HDA * Intel SST * Intel Sound Open Firmware (SOF) All those drivers registers similar PCI IDs, so the first driver probed from the PCI stack can win. But... it is not guaranteed that the correct driver wins. This commit changes Intel's NHLT ACPI module to a common DSP probe module for the Intel's hardware. All above sound drivers calls this code. The user can force another behaviour using the module parameter 'dsp_driver' located in the 'snd-intel-dspcfg' module. This change allows to add specific dmi checks for the specific systems. The examples are taken from the pull request: https://github.com/thesofproject/linux/pull/927 Tested on Lenovo Carbon X1 7th gen. Signed-off-by: Jaroslav Kysela Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022174313.29087-1-perex@perex.cz Signed-off-by: Takashi Iwai commit e458eb97df7aa0865066efc9fb70bbdfab319b59 Author: Nathan Chancellor Date: Tue Oct 22 17:09:06 2019 -0700 cpufreq: s3c64xx: Remove pointless NULL check in s3c64xx_cpufreq_driver_init When building with Clang + -Wtautological-pointer-compare: drivers/cpufreq/s3c64xx-cpufreq.c:152:6: warning: comparison of array 's3c64xx_freq_table' equal to a null pointer is always false [-Wtautological-pointer-compare] if (s3c64xx_freq_table == NULL) { ^~~~~~~~~~~~~~~~~~ ~~~~ 1 warning generated. The definition of s3c64xx_freq_table is surrounded by an ifdef directive for CONFIG_CPU_S3C6410, which is always true for this driver because it depends on it in drivers/cpufreq/Kconfig.arm (and if it weren't, there would be a build error because s3c64xx_freq_table would not be a defined symbol). Resolve this warning by removing the unnecessary NULL check because it is always false as Clang notes. While we are at it, remove the unnecessary ifdef conditional because it is always true. Fixes: b3748ddd8056 ("[ARM] S3C64XX: Initial support for DVFS") Link: https://github.com/ClangBuiltLinux/linux/issues/748 Signed-off-by: Nathan Chancellor Signed-off-by: Viresh Kumar commit e519a34c29597110e92908294be8464e91cabf9c Author: YueHaibing Date: Mon Oct 21 22:19:57 2019 +0800 scsi: cxlflash: remove set but not used variable 'ioarcb' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/cxlflash/main.c:47:22: warning: variable ioarcb set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Link: https://lore.kernel.org/r/20191021141957.18828-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen commit d30f53dd014d739a9ab36c8867d7cd33d0892c8d Author: David Disseldorp Date: Thu Sep 12 11:55:47 2019 +0200 scsi: target: remove unused extension parameters Reviewed-by: Mike Christie Signed-off-by: David Disseldorp Link: https://lore.kernel.org/r/20190912095547.22427-4-ddiss@suse.de Signed-off-by: Martin K. Petersen commit 95f8f6a974cc99c10530accc785267859c2b6c14 Author: David Disseldorp Date: Thu Sep 12 11:55:46 2019 +0200 scsi: target: fix SendTargets=All string compares strncmp is currently used for "SendTargets" key and "All" value matching without checking for trailing garbage. This means that Text request PDUs with garbage such as "SendTargetsPlease=All" and "SendTargets=Alle" are processed successfully as if they were "SendTargets=All" requests. Reviewed-by: Mike Christie Signed-off-by: David Disseldorp Link: https://lore.kernel.org/r/20190912095547.22427-3-ddiss@suse.de Signed-off-by: Martin K. Petersen commit 9cef2a7955f2754257a7cddedec16edae7b587d0 Author: David Disseldorp Date: Thu Sep 12 11:55:45 2019 +0200 scsi: target: compare full CHAP_A Algorithm strings RFC 2307 states: For CHAP [RFC1994], in the first step, the initiator MUST send: CHAP_A= Where A1,A2... are proposed algorithms, in order of preference. ... For the Algorithm, as stated in [RFC1994], one value is required to be implemented: 5 (CHAP with MD5) LIO currently checks for this value by only comparing a single byte in the tokenized Algorithm string, which means that any value starting with a '5' (e.g. "55") is interpreted as "CHAP with MD5". Fix this by comparing the entire tokenized string. Reviewed-by: Lee Duncan Reviewed-by: Mike Christie Signed-off-by: David Disseldorp Link: https://lore.kernel.org/r/20190912095547.22427-2-ddiss@suse.de Signed-off-by: Martin K. Petersen commit 406715df933ad6a1b8b0545e7689aa5f4ac27922 Author: Eric Dumazet Date: Tue Oct 22 09:39:36 2019 -0700 fq_codel: do not include Since commit 342db221829f ("sched: Call skb_get_hash_perturb in sch_fq_codel") we no longer need anything from this file. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit f79520bb333792fb23a32352f83d8d59a525cec9 Author: Chris Wilson Date: Tue Oct 22 12:21:11 2019 +0100 drm/i915/selftests: Synchronize checking active status with retirement If retirement is running on another thread, we may inspect the status of the i915_active before its retirement callback is complete. As we expect it to be running synchronously, we can wait for any callback to complete by acquiring the i915_active.mutex. Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191022112111.9317-1-chris@chris-wilson.co.uk commit c4c8aff5a9ddb061a6246fb34eabdb9244b4d8f6 Author: Parav Pandit Date: Sun Oct 20 09:54:27 2019 +0300 IB/core: Do not notify GID change event of an unregistered device When IB device is undergoing unregistration, the GID cache is always cleaned up after all clients are unregistered with the below flow. __ib_unregister_device() disable_device() ib_cache_cleanup_one() gid_table_cleanup_one() cleanup_gid_table_port() There is no use in generating a GID change event at this stage, where there is no active client of the device and device is nearly unregistered. Link: https://lore.kernel.org/r/20191020065427.8772-4-leon@kernel.org Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Reviewed-by: Leon Romanovsky Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 905da43c6a02b57232c1f087b94bc606f6376632 Author: Chris Wilson Date: Tue Oct 22 14:10:16 2019 +0100 drm/i915/selftests: Move uncore fw selftests to operate on intel_gt Forcewake is the speciality of the GT, so it is natural to run the intel_uncore_forcewake tests over the GT. So pass intel_gt as the parameter to our selftests. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20191022131016.9065-1-chris@chris-wilson.co.uk commit c31c9e82ee8ae032b0ed495ae8b8207a6734452b Author: Chris Wilson Date: Tue Oct 22 14:02:21 2019 +0100 drm/i915/selftests: Teach switch_to_context() to use the context The context details which engines to use, so use the ctx->engines[] to generate the requests to cause the context switch. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191022130221.20644-2-chris@chris-wilson.co.uk commit ae2e28b02630072134392e75b1062eef69aeeff8 Author: Chris Wilson Date: Tue Oct 22 15:19:35 2019 +0100 drm/i915: Teach record_defaults to operate on the intel_gt Again we wish to operate on the engines, which are owned by the intel_gt. As such it is easier, and much more consistent, to pass the intel_gt parameter. v2: Unexport i915_gem_load_power_context() Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191022141935.15733-1-chris@chris-wilson.co.uk commit 4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab Author: Navid Emamdoost Date: Mon Oct 21 15:06:48 2019 -0500 ipmi: Fix memory leak in __ipmi_bmc_register In the impelementation of __ipmi_bmc_register() the allocated memory for bmc should be released in case ida_simple_get() fails. Fixes: 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name") Signed-off-by: Navid Emamdoost Message-Id: <20191021200649.1511-1-navid.emamdoost@gmail.com> Signed-off-by: Corey Minyard commit 2a21d858f96bdfd3de28abc1341935d06fb47373 Author: YueHaibing Date: Wed Oct 16 17:21:31 2019 +0800 ipmi: bt-bmc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Message-Id: <20191016092131.23096-1-yuehaibing@huawei.com> Reviewed-by: Cédric Le Goater Signed-off-by: Corey Minyard commit 8ee7b485bbfbd182aa2c1a0a45812e151c1000bd Author: Andy Shevchenko Date: Fri Oct 11 18:50:36 2019 +0300 ipmi: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. The change is safe since the specifier can handle up to 64 bytes and taking into account the buffer size of 100 bytes on stack the function has never been used to dump more than 32 bytes. Note, this also avoids potential buffer overflow if the length of the input buffer is bigger. This completely eliminates ipmi_debug_msg() in favour of Dynamic Debug. Signed-off-by: Andy Shevchenko Signed-off-by: Andy Shevchenko Message-Id: <20191011155036.36748-1-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit cbb79863fc3175ed5ac506465948b02a893a8235 Author: Corey Minyard Date: Mon Oct 14 10:35:56 2019 -0500 ipmi: Don't allow device module unload when in use If something has the IPMI driver open, don't allow the device module to be unloaded. Before it would unload and the user would get errors on use. This change is made on user request, and it makes it consistent with the I2C driver, which has the same behavior. It does change things a little bit with respect to kernel users. If the ACPI or IPMI watchdog (or any other kernel user) has created a user, then the device module cannot be unloaded. Before it could be unloaded, This does not affect hot-plug. If the device goes away (it's on something removable that is removed or is hot-removed via sysfs) then it still behaves as it did before. Reported-by: tony camuso Signed-off-by: Corey Minyard Tested-by: tony camuso commit 5e5b03d163e15a40b0fa57c70b4e8edd549b0b98 Author: Ben Dooks (Codethink) Date: Tue Oct 22 13:59:25 2019 +0100 xdp: Fix type of string pointer in __XDP_ACT_SYM_TAB The table entry in __XDP_ACT_SYM_TAB for the last item is set to { -1, 0 } where it should be { -1, NULL } as the second item is a pointer to a string. Fixes the following sparse warnings: ./include/trace/events/xdp.h:28:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:53:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:82:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:140:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:155:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:190:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:225:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:260:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:318:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:356:1: warning: Using plain integer as NULL pointer ./include/trace/events/xdp.h:390:1: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks (Codethink) Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191022125925.10508-1-ben.dooks@codethink.co.uk commit 3f89b01f4bbab2dcd1a6e7e31e64faacb448e3be Author: Michael Guralnik Date: Sun Oct 20 09:43:59 2019 +0300 IB/mlx5: Align usage of QP1 create flags with rest of mlx5 defines There is little value in keeping separate function for one flag, provide it directly like any other mlx5 define. Link: https://lore.kernel.org/r/20191020064400.8344-2-leon@kernel.org Signed-off-by: Michael Guralnik Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 685df9c39f70964482a1a5d1742b8cecb2606bb7 Merge: 88652bf8ce4b 7e99e3470172 Author: Jakub Kicinski Date: Tue Oct 22 12:39:25 2019 -0700 Merge branch 'net-dsa-turn-arrays-of-ports-into-a-list' Vivien Didelot says: ==================== The dsa_switch structure represents the physical switch device itself, and is allocated by the driver. The dsa_switch_tree and dsa_port structures represent the logical switch fabric (eventually composed of multiple switch devices) and its ports, and are allocated by the DSA core. This branch lists the logical ports directly in the fabric which simplifies the iteration over all ports when assigning the default CPU port or configuring the D in DSA in drivers like mv88e6xxx. This also removes the unique dst->cpu_dp pointer and is a first step towards supporting multiple CPU ports and dropping the DSA_MAX_PORTS limitation. Because the dsa_port structures are not tied to the dsa_switch structure anymore, we do not need to provide an helper for the drivers to allocate a switch structure. Like in many other subsystems, drivers can now embed their dsa_switch structure as they wish into their private structure. This will be particularly interesting for the Broadcom drivers which were currently limited by the dynamically allocated array of DSA ports. The series implements the list of dsa_port structures, makes use of it, then drops dst->cpu_dp and the dsa_switch_alloc helper. ==================== Signed-off-by: Jakub Kicinski commit 68abaa765e410dc1583de1fa285ec7b0c58c6252 Author: Ran Rozenstein Date: Sun Oct 20 09:44:54 2019 +0300 IB/mlx5: Remove dead code mlx5_ib_dc_atomic_is_supported function is not used anywhere. Remove the dead code. Fixes: a60109dc9a95 ("IB/mlx5: Add support for extended atomic operations") Link: https://lore.kernel.org/r/20191020064454.8551-1-leon@kernel.org Signed-off-by: Ran Rozenstein Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 7e99e34701728d54ccd0466eccf377a42b9db215 Author: Vivien Didelot Date: Mon Oct 21 16:51:30 2019 -0400 net: dsa: remove dsa_switch_alloc helper Now that ports are dynamically listed in the fabric, there is no need to provide a special helper to allocate the dsa_switch structure. This will give more flexibility to drivers to embed this structure as they wish in their private structure. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 05f294a852358a46d9236cc777901f49a4f0ae85 Author: Vivien Didelot Date: Mon Oct 21 16:51:29 2019 -0400 net: dsa: allocate ports on touch Allocate the struct dsa_port the first time it is accessed with dsa_port_touch, and remove the static dsa_port array from the dsa_switch structure. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit d5a619bf60ecf910175606921b4610a2842c635e Author: Vivien Didelot Date: Mon Oct 21 16:51:28 2019 -0400 net: dsa: sja1105: register switch before assigning port private data Like the dsa_switch_tree structures, the dsa_port structures will be allocated on switch registration. The SJA1105 driver is the only one accessing the dsa_port structure after the switch allocation and before the switch registration. For that reason, move switch registration prior to assigning the priv member of the dsa_port structures. Signed-off-by: Vivien Didelot Signed-off-by: Jakub Kicinski commit ef2025ec0acc92fa15ad3df386cb18fefe880643 Author: Vivien Didelot Date: Mon Oct 21 16:51:27 2019 -0400 net: dsa: mv88e6xxx: use ports list to map bridge Instead of digging into the other dsa_switch structures of the fabric and relying too much on the dsa_to_port helper, use the new list of switch fabric ports to remap the Port VLAN Map of local bridge group members or remap the Port VLAN Table entry of external bridge group members. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 9dc8b13e230a802f2510de5e37bfceaa59c9e281 Author: Vivien Didelot Date: Mon Oct 21 16:51:26 2019 -0400 net: dsa: mv88e6xxx: use ports list to map port VLAN Instead of digging into the other dsa_switch structures of the fabric and relying too much on the dsa_to_port helper, use the new list of switch fabric ports to define the mask of the local ports allowed to receive frames from another port of the fabric. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit d14939be8bfc4b7493007c365cce5d707d4fbfa1 Author: Vivien Didelot Date: Mon Oct 21 16:51:25 2019 -0400 net: dsa: mv88e6xxx: silently skip PVT ops Since mv88e6xxx_pvt_map is a static helper, no need to return -EOPNOTSUPP if the chip has no PVT, simply silently skip the operation. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit da4561cda2ea6240fc61442eeb2acc47e2e0cae3 Author: Vivien Didelot Date: Mon Oct 21 16:51:24 2019 -0400 net: dsa: use ports list to setup default CPU port Use the new ports list instead of iterating over switches and their ports when setting up the default CPU port. Unassign it on teardown. Now that we can iterate over multiple CPU ports, remove dst->cpu_dp. At the same time, provide a better error message for CPU-less tree. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit c0b736282ccf6d9450f3bed55a134f2123a7a565 Author: Vivien Didelot Date: Mon Oct 21 16:51:23 2019 -0400 net: dsa: use ports list to find first CPU port Use the new ports list instead of iterating over switches and their ports when looking up the first CPU port in the tree. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 0cfec588ec210e82e6572d1fb10db195fcc41a87 Author: Vivien Didelot Date: Mon Oct 21 16:51:22 2019 -0400 net: dsa: use ports list to setup multiple master devices Now that we have a potential list of CPU ports, make use of it instead of only configuring the master device of an unique CPU port. Signed-off-by: Vivien Didelot Signed-off-by: Jakub Kicinski commit 764b7e624284c3f41bdd15bd4e077d8ec5b8c686 Author: Vivien Didelot Date: Mon Oct 21 16:51:21 2019 -0400 net: dsa: use ports list to find a port by node Use the new ports list instead of iterating over switches and their ports to find a port from a given node. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 86bfb2c1f4337d3306d235f615d35ba8bbbe4650 Author: Vivien Didelot Date: Mon Oct 21 16:51:20 2019 -0400 net: dsa: use ports list for routing table setup Use the new ports list instead of accessing the dsa_switch array of ports when iterating over DSA ports of a switch to set up the routing table. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit fb35c60cbacc67a6075fb8e3d98fa348665662fe Author: Vivien Didelot Date: Mon Oct 21 16:51:19 2019 -0400 net: dsa: use ports list to setup switches Use the new ports list instead of iterating over switches and their ports when setting up the switches and their ports. At the same time, provide setup states and messages for ports and switches as it is done for the trees. Signed-off-by: Vivien Didelot Signed-off-by: Jakub Kicinski commit 7b9a2f4bac68e1dcc77baebd8c1e32d43710bafa Author: Vivien Didelot Date: Mon Oct 21 16:51:18 2019 -0400 net: dsa: use ports list to find slave Use the new ports list instead of iterating over switches and their ports when looking for a slave device from a given master interface. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit b96ddf254b09447c6b79632cdc02dae3f2454a82 Author: Vivien Didelot Date: Mon Oct 21 16:51:17 2019 -0400 net: dsa: use ports list in dsa_to_port Use the new ports list instead of accessing the dsa_switch array of ports in the dsa_to_port helper. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit ab8ccae122a41530a89bc899ace0e46defb156a8 Author: Vivien Didelot Date: Mon Oct 21 16:51:16 2019 -0400 net: dsa: add ports list in the switch fabric Add a list of switch ports within the switch fabric. This will help the lookup of a port inside the whole fabric, and it is the first step towards supporting multiple CPU ports, before deprecating the usage of the unique dst->cpu_dp pointer. In preparation for a future allocation of the dsa_port structures, return -ENOMEM in case no structure is returned, even though this error cannot be reached yet. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 68bb8ea8ad0d497c28ed47423246b1ab20f26976 Author: Vivien Didelot Date: Mon Oct 21 16:51:15 2019 -0400 net: dsa: use dsa_to_port helper everywhere Do not let the drivers access the ds->ports static array directly while there is a dsa_to_port helper for this purpose. At the same time, un-const this helper since the SJA1105 driver assigns the priv member of the returned dsa_port structure. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit e00aca65e646da08f8dce31c9b89f11dab76198c Author: Andrii Nakryiko Date: Tue Oct 22 10:21:00 2019 -0700 libbpf: Make DECLARE_LIBBPF_OPTS macro strictly a variable declaration LIBBPF_OPTS is implemented as a mix of field declaration and memset + assignment. This makes it neither variable declaration nor purely statements, which is a problem, because you can't mix it with either other variable declarations nor other function statements, because C90 compiler mode emits warning on mixing all that together. This patch changes LIBBPF_OPTS into a strictly declaration of variable and solves this problem, as can be seen in case of bpftool, which previously would emit compiler warning, if done this way (LIBBPF_OPTS as part of function variables declaration block). This patch also renames LIBBPF_OPTS into DECLARE_LIBBPF_OPTS to follow kernel convention for similar macros more closely. v1->v2: - rename LIBBPF_OPTS into DECLARE_LIBBPF_OPTS (Jakub Sitnicki). Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191022172100.3281465-1-andriin@fb.com commit c33fbe8f673c55c178bfe69d0d9f06f1a68bf6cf Author: Ritesh Harjani Date: Wed Oct 16 13:07:11 2019 +0530 ext4: Enable blocksize < pagesize for dioread_nolock All support is now added for blocksize < pagesize for dioread_nolock. This patch removes those checks which disables dioread_nolock feature for blocksize != pagesize. Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20191016073711.4141-6-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit c8cc88163f40df39e50cda63ac361631864b453e Author: Ritesh Harjani Date: Wed Oct 16 13:07:10 2019 +0530 ext4: Add support for blocksize < pagesize in dioread_nolock This patch adds the support for blocksize < pagesize for dioread_nolock feature. Since in case of blocksize < pagesize, we can have multiple small buffers of page as unwritten extents, we need to maintain a vector of these unwritten extents which needs the conversion after the IO is complete. Thus, we maintain a list of tuple pair (io_end_vec) for this & traverse this list to do the unwritten to written conversion. Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20191016073711.4141-5-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit 2943fdbc688e7a1b4d9e3bc76a8e5ba624550213 Author: Ritesh Harjani Date: Wed Oct 16 13:07:09 2019 +0530 ext4: Refactor mpage_map_and_submit_buffers function This patch refactors mpage_map_and_submit_buffers to take out the page buffers processing, as a separate function. This will be required to add support for blocksize < pagesize for dioread_nolock feature. No functionality change in this patch. Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20191016073711.4141-4-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit a00713ea982b7f2f9880a336b03bbf70f2202cbf Author: Ritesh Harjani Date: Wed Oct 16 13:07:08 2019 +0530 ext4: Add API to bring in support for unwritten io_end_vec conversion This patch just brings in the API for conversion of unwritten io_end_vec extents which will be required for blocksize < pagesize support for dioread_nolock feature. No functional changes in this patch. Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20191016073711.4141-3-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit 821ff38d192a42a95fe33b5928ce5ed15cbe8564 Author: Ritesh Harjani Date: Wed Oct 16 13:07:07 2019 +0530 ext4: keep uniform naming convention for io & io_end variables Let's keep uniform naming convention for ext4_submit_io (io) & ext4_end_io_t (io_end) structures, to avoid any confusion. No functionality change in this patch. Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20191016073711.4141-2-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit 044393a7b3318c786698188857b037abc7a770ef Author: Lubomir Rintel Date: Tue Oct 22 17:28:37 2019 +0200 ARM: dts: mmp3: add Dell Wyse 3020 machine This is a Dell Wyse thin client, variously referred to as "Ariel", "3020" or "Tx0D" where "x" stands for the software it was shipped with. I somewhat arbitrarily chose "ariel". There are bits missing, because the drivers are not in and bindings are not settled yet: * Things missing from mmp3.dtsi: HSIC controller and its PHY (only the internal Ethernet is connected here, the hub with external USB2 ports is connected to the U2O controller that works well), Vivante GC2000 GPU * &twsi1/regulator@19 Marvell 88pm867 power regulator * &twsi3/vga-dvi-encoder@76 Chrontel CH7033B-BF VGA & DVI encoder * &twsi3/sound-codec@30 Sound chip, probably a Marvell 88ce156 * &twsi4/embedded-controller@58 ENE KB3930QF Embedded Controller, also seems to be connected to &ssp4. Might not need a driver -- about the only useful thing it can do is to reboot the machine when tickled via some GPIO lines. Also there seems to be something at &twsi1 address 0x50. Link: https://lore.kernel.org/r/20191022152837.3553524-1-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit a9d21d151763a7b0c7175dcdcd6b3117023872e8 Merge: bae92f330aec 7d578b7d0936 Author: Olof Johansson Date: Tue Oct 22 12:28:26 2019 -0700 Merge tag 'actions-arm64-dt-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions into arm/dt Actions Semi ARM64 changes for v5.5: Most of the basic infrastructure is completed for the ARM64 S900 SoC. It can now boot a distro from eMMC/uSD with mainline kernel. Below are the changes for this cycle (only S900): - Added MMC controller support for S900 SoC. There are 4 controllers in this SoC, each capable of accessing MMC cards as well as SDIO. - Added onboard eMMC and uSD support for 96Boards Bubblegum96 board based on S900. Since the MMC driver is not capable of supporting SDIO currently, it is not enabled for now. And with the absence of PMIC support, fixed regulators are used to model the power supply. * tag 'actions-arm64-dt-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions: arm64: dts: actions: Add uSD and eMMC support for Bubblegum96 arm64: dts: actions: Add MMC controller support for S900 Link: https://lore.kernel.org/r/20191022145012.GB3601@Mani-XPS-13-9360 Signed-off-by: Olof Johansson commit e13a2fe642bd4a42c2b468cdb25ad3aab933d572 Author: Yonghong Song Date: Mon Oct 21 21:31:19 2019 -0700 tools/bpf: Turn on llvm alu32 attribute by default LLVM alu32 was introduced in LLVM7: https://reviews.llvm.org/rL325987 https://reviews.llvm.org/rL325989 Experiments showed that in general performance is better with alu32 enabled: https://lwn.net/Articles/775316/ This patch turns on alu32 with no-flavor test_progs which is tested most often. The flavor test at no_alu32/test_progs can be used to test without alu32 enabled. The Makefile check for whether LLVM supports '-mattr=+alu32 -mcpu=v3' is removed as LLVM7 should be available for recent distributions and also latest LLVM is preferred to run BPF selftests. Note that jmp32 is checked by -mcpu=probe and will be enabled if the host kernel supports it. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191022043119.2625263-1-yhs@fb.com commit a29e1012c1bf52c5364cad5ffbf5b4be8fe9c91b Author: Chuhong Yuan Date: Fri Oct 18 16:15:34 2019 +0800 RDMA/uverbs: Add a check for uverbs_attr_get to uverbs_copy_to_struct_or_zero All current callers for uverbs_copy_to_struct_or_zero() already check that the attribute exists, but it make sense to verify the result like the other functions do. Link: https://lore.kernel.org/r/20191018081533.8544-1-hslester96@gmail.com Signed-off-by: Chuhong Yuan Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit d3bd93967015d974bb95d47cc14edd5adbea814f Author: Parav Pandit Date: Tue Oct 15 10:20:58 2019 +0300 IB/cma: Honor traffic class from lower netdevice for RoCE When a macvlan netdevice is used for RoCE, consider the tos->prio->tc mapping as SL using its lower netdevice. 1. If the lower netdevice is a VLAN netdevice, consider the VLAN netdevice and it's parent netdevice for mapping 2. If the lower netdevice is not a VLAN netdevice, consider tc mapping directly from the lower netdevice Link: https://lore.kernel.org/r/20191015072058.17347-1-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 477f842f14aadbad098fe7e6cff87c5565dbe71b Merge: e386b228cad2 771fdcf8d3d0 Author: Krzysztof Kozlowski Date: Tue Oct 22 20:37:20 2019 +0200 Merge tag 'opp-5.4-support-adjust-voltages' of https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into next/drivers commit 4061ff7aa379fa770a82da0ed7ec4f9163034518 Author: Erez Alfasi Date: Wed Oct 16 09:23:08 2019 +0300 RDMA/nldev: Provide MR statistics Add RDMA nldev netlink interface for dumping MR statistics information. Output example: $ ./ibv_rc_pingpong -o -P -s 500000000 local address: LID 0x0001, QPN 0x00008a, PSN 0xf81096, GID :: $ rdma stat show mr dev mlx5_0 mrn 2 page_faults 122071 page_invalidations 0 Link: https://lore.kernel.org/r/20191016062308.11886-5-leon@kernel.org Signed-off-by: Erez Alfasi Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 88652bf8ce4b91c49769a2a49c17dc44b85b4fa2 Merge: bd71a3573943 94b5ff749e56 Author: Jakub Kicinski Date: Tue Oct 22 11:27:42 2019 -0700 Merge branch 'r8169-remove-fiddling-with-the-pcie-max-read-request-size' Heiner Kallweit says: ==================== The attempt to improve performance by changing the PCIe max read request size was added in the vendor driver more than 10 years back and copied to r8169 driver. In the vendor driver this has been removed long ago. Obviously it had no effect, also in my tests I didn't see any difference. Typically the max payload size is less than 512 bytes anyway, and the PCI core takes care that the maximum supported value is set. So let's remove fiddling with PCIe max read request size from r8169 too. This change allows to simplify the driver in the subsequent three patches of this series. ==================== Signed-off-by: Jakub Kicinski commit 94b5ff749e56084aab93c32d4561dd9bea329aa6 Author: Heiner Kallweit Date: Mon Oct 21 21:24:15 2019 +0200 r8169: remove rtl_hw_start_8168bef We can remove rtl_hw_start_8168bef() and use rtl_hw_start_8168b() instead because setting register Config4 is done in rtl_jumbo_config(), being called from rtl_hw_start(). Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 0a413e6b577c8ccf70b3c40bb5f5e3087f7e2f4c Author: Heiner Kallweit Date: Mon Oct 21 21:23:21 2019 +0200 r8169: remove rtl_hw_start_8168dp We can remove rtl_hw_start_8168dp() because it's the same as rtl_hw_start_8168dp() now. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit e0bbe7cbb3c5ff72d680993edf89db2391e80d5d Author: Heiner Kallweit Date: Mon Oct 21 21:22:42 2019 +0200 r8169: simplify setting PCI_EXP_DEVCTL_NOSNOOP_EN r8168b_0_hw_jumbo_enable() and r8168b_0_hw_jumbo_disable() both do the same and just set PCI_EXP_DEVCTL_NOSNOOP_EN. We can simplify the code by moving this setting for RTL8168B to rtl_hw_start_8168(). Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 2df49d36549808a7357ad9f78b7a8e39516e7809 Author: Heiner Kallweit Date: Mon Oct 21 21:22:07 2019 +0200 r8169: remove fiddling with the PCIe max read request size The attempt to improve performance by changing the PCIe max read request size was added in the vendor driver more than 10 years back and copied to r8169 driver. In the vendor driver this has been removed long ago. Obviously it had no effect, also in my tests I didn't see any difference. Typically the max payload size is less than 512 bytes anyway, and the PCI core takes care that the maximum supported value is set. So let's remove fiddling with PCIe max read request size from r8169 too. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit bd71a35739430ed6606e14f72692f60b3a419501 Merge: fe28afe23e91 81cf4f4707af Author: Jakub Kicinski Date: Tue Oct 22 11:23:49 2019 -0700 Merge branch 'net-smc-improve-termination-handling' Karsten Graul says: ==================== More patches to address abnormal termination processing of sockets and link groups. ==================== Signed-off-by: Jakub Kicinski commit 81cf4f4707af9704ac1c3dd177c8bd1fcc01da6c Author: Ursula Braun Date: Mon Oct 21 16:13:15 2019 +0200 net/smc: remove close abort worker With the introduction of the link group termination worker there is no longer a need to postpone smc_close_active_abort() to a worker. To protect socket destruction due to normal and abnormal socket closing, the socket refcount is increased. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit f528ba24a8ad61b8a5e55d34cb1da127ce67cf6e Author: Ursula Braun Date: Mon Oct 21 16:13:14 2019 +0200 net/smc: introduce link group termination worker Use a worker for link group termination to guarantee process context. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 2a0674fffb6bc1a7c0f46bb2e0b1bcf1d49c2232 Author: Ursula Braun Date: Mon Oct 21 16:13:13 2019 +0200 net/smc: improve abnormal termination of link groups If a link group and its connections must be terminated, * wake up socket waiters * do not enable buffer reuse A linkgroup might be terminated while normal connection closing is running. Avoid buffer reuse and its related LLC DELETE RKEY call, if linkgroup termination has started. And use the earliest indication of linkgroup termination possible, namely the removal from the linkgroup list. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 8317976096635110603c3e143bcaf8773f4a3e65 Author: Ursula Braun Date: Mon Oct 21 16:13:12 2019 +0200 net/smc: tell peers about abnormal link group termination There are lots of link group termination scenarios. Most of them still allow to inform the peer of the terminating sockets about aborting. This patch tries to call smc_close_abort() for terminating sockets. And the internal TCP socket is reset with tcp_abort(). Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 8e316b9e7260cbc61974c2558733dab5de949399 Author: Ursula Braun Date: Mon Oct 21 16:13:11 2019 +0200 net/smc: improve link group freeing Usually link groups are freed delayed to enable quick connection creation for a follow-on SMC socket. Terminated link groups are freed faster. This patch makes sure, fast schedule of link group freeing is not rescheduled by a delayed schedule. And it makes sure link group freeing is not rescheduled, if the real freeing is already running. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 69318b5215f2dc32c345a3d65b98b4b1bf29c007 Author: Ursula Braun Date: Mon Oct 21 16:13:10 2019 +0200 net/smc: improve abnormal termination locking Locking hierarchy requires that the link group conns_lock can be taken if the socket lock is held, but not vice versa. Nevertheless socket termination during abnormal link group termination should be protected by the socket lock. This patch reduces the time segments the link group conns_lock is held to enable usage of lock_sock in smc_lgr_terminate(). Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 8caa654451bda40379bff786a63833b2965536e4 Author: Ursula Braun Date: Mon Oct 21 16:13:09 2019 +0200 net/smc: terminate link group without holding lgr lock When a link group is to be terminated, it is sufficient to hold the lgr lock when unlinking the link group from its list. Move the lock-protected link group unlinking into smc_lgr_terminate(). Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit b290098092e4aeaa1712d3326bf5b64d2751c740 Author: Ursula Braun Date: Mon Oct 21 16:13:08 2019 +0200 net/smc: cancel send and receive for terminated socket The resources for a terminated socket are being cleaned up. This patch makes sure * no more data is received for an actively terminated socket * no more data is sent for an actively or passively terminated socket Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit e1b95ae0b0ea4987afca73d1dc71dfc0b8ad4e49 Author: Erez Alfasi Date: Wed Oct 16 09:23:07 2019 +0300 RDMA/mlx5: Return ODP type per MR Provide an ODP explicit/implicit type as part of 'rdma -dd resource show mr' dump. For example: $ rdma -dd resource show mr dev mlx5_0 mrn 1 rkey 0xa99a lkey 0xa99a mrlen 50000000 pdn 9 pid 7372 comm ibv_rc_pingpong drv_odp explicit For non-ODP MRs, we won't print "drv_odp ..." at all. Link: https://lore.kernel.org/r/20191016062308.11886-4-leon@kernel.org Signed-off-by: Erez Alfasi Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit fb91069088faf30c6e8aeeed900326c040623e2d Author: Erez Alfasi Date: Wed Oct 16 09:23:06 2019 +0300 RDMA/nldev: Allow different fill function per resource So far res_get_common_{dumpit, doit} was using the default resource fill function which was defined as part of the nldev_fill_res_entry fill_entries. Add a fill function pointer as an argument allows us to use different fill function in case we want to dump different values then 'rdma resource' flow do, but still use the same existing general resources dumping flow. Link: https://lore.kernel.org/r/20191016062308.11886-3-leon@kernel.org Signed-off-by: Erez Alfasi Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit a3de94e3d61ec6e6c57ee066ec4d28ebc260dafa Author: Erez Alfasi Date: Wed Oct 16 09:23:05 2019 +0300 IB/mlx5: Introduce ODP diagnostic counters Introduce ODP diagnostic counters and count the following per MR within IB/mlx5 driver: 1) Page faults: Total number of faulted pages. 2) Page invalidations: Total number of pages invalidated by the OS during all invalidation events. The translations can be no longer valid due to either non-present pages or mapping changes. Link: https://lore.kernel.org/r/20191016062308.11886-2-leon@kernel.org Signed-off-by: Erez Alfasi Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit fe28afe23e91b162df31171a376d519cdd95f881 Merge: 2ac061ce97f4 a45bfb5a5070 Author: Jakub Kicinski Date: Tue Oct 22 10:31:54 2019 -0700 Merge branch 'mlxsw-core-extend-qsfp-eeprom-size' Ido Schimmel says: ==================== Vadim says: This patch set extends the size of QSFP EEPROM for the cable types SSF-8436 and SFF-8636 from 256 bytes to 640 bytes. This allows ethtool to show correct information for these cable types (more details below). Patch #1 adds a macro that computes the EEPROM page number from the provided offset specified in the request. Patch #2 teaches the driver to access the information stored in the upper pages of the QSFP memory map. Details and examples: SFF-8436 specification defines pages 0, 1, 2 and 3. Page 0 contains lower memory page offsets (from 0x00 to 0x7f) and upper page offsets (from 0x80 to 0xfe). Upper pages 1, 2 and 3 are optional and can be empty. Page 1 is provided if upper page 0 byte 0xc3 bit 6 is set. Page 2 is provided if upper page 0 byte 0xc3 bit 7 is set. Page 3 is provided if lower page 0 byte 0x02 bit 2 is cleared. Offset 0xc3 for the upper page is provided as 0x43 = 0xc3 - 0x80. As a result of exposing 256 bytes only, ethtool shows wrong information for pages 1, 2 and 3. In the below hex dump from ethtool for a cable compliant to SFF-8636 specification, it can be seen that EEPROM of this device contains optical diagnostic page (lower page 0 byte 0x02 bit 2 is cleared), but it is not exposed, as the length defined for this type is 256 bytes. $ ethtool -m sfp42 hex on Offset Values ------ ------ 0x0000: 11 07 00 ff 00 ff 00 00 00 55 55 00 00 00 00 00 0x0010: 00 00 00 00 00 00 2a 90 00 00 82 ae 00 00 00 00 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 0x0060: 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0080: 11 8c 0c 80 00 00 00 00 00 00 00 05 ff 00 00 23 0x0090: 00 00 32 00 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 0x00a0: 20 20 20 20 00 00 02 c9 4d 4d 41 31 42 30 30 2d 0x00b0: 53 53 31 20 20 20 20 20 41 32 42 68 0b b8 46 05 0x00c0: 02 07 f5 9e 4d 54 31 38 33 34 46 54 30 33 38 34 0x00d0: 36 20 20 20 31 38 30 37 30 33 00 00 0c 10 67 c2 0x00e0: 38 32 36 46 4d 41 32 32 36 49 30 31 31 35 20 20 0x00f0: 00 00 00 00 00 00 00 00 00 00 01 00 0e 00 00 00 After changing the length returned by get_module_info() callback from 256 bytes to 640 bytes, the upper pages 1, 2 and 3 are exposed by ethtool. In the below hex dump from the same cable it can be seen that the optical diagnostic page (page 3, from offset 0x0200) has non-zero data. $ ethtool -m sfp42 hex on Offset Values ------ ------ 0x0000: 11 07 00 ff 00 ff 00 00 00 55 55 00 00 00 00 00 0x0010: 00 00 00 00 00 00 27 79 00 00 82 c5 00 00 00 00 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 0x0060: 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0080: 11 8c 0c 80 00 00 00 00 00 00 00 05 ff 00 00 23 0x0090: 00 00 32 00 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 0x00a0: 20 20 20 20 00 00 02 c9 4d 4d 41 31 42 30 30 2d 0x00b0: 53 53 31 20 20 20 20 20 41 32 42 68 0b b8 46 05 0x00c0: 02 07 f5 9e 4d 54 31 38 33 34 46 54 30 33 38 34 0x00d0: 36 20 20 20 31 38 30 37 30 33 00 00 0c 10 67 c2 0x00e0: 38 32 36 46 4d 41 32 32 36 49 30 31 31 35 20 20 0x00f0: 00 00 00 00 00 00 00 00 00 00 01 00 0e 00 00 00 0x0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x01c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0200: 50 00 f6 00 46 00 00 00 00 00 00 00 00 00 00 00 0x0210: 88 b8 79 18 87 5a 7a 76 00 00 00 00 00 00 00 00 0x0220: 00 00 00 00 00 00 00 00 00 00 18 30 0e 61 60 b7 0x0230: 87 71 01 d3 43 e2 03 a5 10 9a 0a ba 0f a0 0b b8 0x0240: 87 71 02 d4 43 e2 05 a5 00 00 00 00 00 00 00 00 0x0250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0260: a7 03 00 00 00 00 00 00 00 00 44 44 22 22 11 11 0x0270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 And 'ethtool -m sfp42' shows the real values for the below fields, while before it exposed zeros for these fields: Laser bias current high alarm threshold : 8.500 mA Laser bias current low alarm threshold : 5.492 mA Laser bias current high warning threshold : 8.000 mA Laser bias current low warning threshold : 6.000 mA Laser output power high alarm threshold : 3.4673 mW / 5.40 dBm Laser output power low alarm threshold : 0.0724 mW / -11.40 dBm Laser output power high warning threshold : 1.7378 mW / 2.40 dBm Laser output power low warning threshold : 0.1445 mW / -8.40 dBm Module temperature high alarm threshold : 80.00 degrees C / 176.00 F Module temperature low alarm threshold : -10.00 degrees C / 14.00 F Module temperature high warning threshold : 70.00 degrees C / 158.00 F Module temperature low warning threshold : 0.00 degrees C / 32.00 F Module voltage high alarm threshold : 3.5000 V Module voltage low alarm threshold : 3.1000 V ==================== Signed-off-by: Jakub Kicinski commit 5a4c9f054ceeaa90caef033f5a52eca2d7975364 Author: Kuninori Morimoto Date: Tue Oct 15 12:59:51 2019 +0900 ASoC: soc-core: snd_soc_unbind_card() cleanup soc_remove_link_components() will be called from soc_cleanup_card_resources(). This patch removes duplicate call. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877e5664lz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 33536a14879515949b065721cdb7fedb276d8e8a Author: Kuninori Morimoto Date: Tue Oct 15 12:59:44 2019 +0900 ASoC: soc-core: remove for_each_rtdcom_safe() There is no user of for_each_rtdcom(). Let's remove it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a7a264m9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bed646dc3f7bcec91178c278deaf969cce0700a8 Author: Kuninori Morimoto Date: Tue Oct 15 12:59:38 2019 +0900 ASoC: soc-pcm: fixup dpcm_prune_paths() loop continue dpcm_prune_paths() is checking widget at 2 parts. (A) is for CPU, (B) is for Codec. If we focus to (A) part, continue at (a) is for (1) loop. But, if we focus to (B) part, continue at (b) is for (2) loop, not for (1). This is bug. This patch fixup this issue. static int dpcm_prune_paths(...) { ... (1) for_each_dpcm_be(fe, stream, dpcm) { ... ^ widget = dai_get_widget(...); | (A) if (widget && widget_in_list(...)) | (a) continue; v ^ (2) for_each_rtd_codec_dai(...) { | widget = dai_get_widget(...); (B) | if (widget && widget_in_list(...)) v (b) continue; } ... Fixes: 2e5894d73789 ("ASoC: pcm: Add support for DAI multicodec") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blui64mf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 75e70add889039b9683b3d9989d4163c226b98a7 Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:51 2019 -0700 infiniband: add a Documentation driver-api chapter for Infiniband Add a driver-api chapter for InfiniBand interfaces. Link: https://lore.kernel.org/r/20191010035240.310347906@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 7c21072dde16ea95c60faff7be2bd64b1638c2f5 Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:50 2019 -0700 infiniband: fix sw/rdmavt/ kernel-doc notation Add kernel-doc for missing function parameters. Remove excess kernel-doc descriptions. Fix expected kernel-doc formatting (use ':' instead of '-' after @funcarg). ../drivers/infiniband/sw/rdmavt/ah.c:138: warning: Excess function parameter 'udata' description in 'rvt_destroy_ah' ../drivers/infiniband/sw/rdmavt/vt.c:698: warning: Function parameter or member 'pkey_table' not described in 'rvt_init_port' ../drivers/infiniband/sw/rdmavt/cq.c:561: warning: Excess function parameter 'rdi' description in 'rvt_driver_cq_init' ../drivers/infiniband/sw/rdmavt/cq.c:575: warning: Excess function parameter 'rdi' description in 'rvt_cq_exit' ../drivers/infiniband/sw/rdmavt/qp.c:2573: warning: Function parameter or member 'qp' not described in 'rvt_add_rnr_timer' ../drivers/infiniband/sw/rdmavt/qp.c:2573: warning: Function parameter or member 'aeth' not described in 'rvt_add_rnr_timer' ../drivers/infiniband/sw/rdmavt/qp.c:2591: warning: Function parameter or member 'qp' not described in 'rvt_stop_rc_timers' ../drivers/infiniband/sw/rdmavt/qp.c:2624: warning: Function parameter or member 'qp' not described in 'rvt_del_timers_sync' ../drivers/infiniband/sw/rdmavt/qp.c:2697: warning: Function parameter or member 'cb' not described in 'rvt_qp_iter_init' ../drivers/infiniband/sw/rdmavt/qp.c:2728: warning: Function parameter or member 'iter' not described in 'rvt_qp_iter_next' ../drivers/infiniband/sw/rdmavt/qp.c:2796: warning: Function parameter or member 'rdi' not described in 'rvt_qp_iter' ../drivers/infiniband/sw/rdmavt/qp.c:2796: warning: Function parameter or member 'v' not described in 'rvt_qp_iter' ../drivers/infiniband/sw/rdmavt/qp.c:2796: warning: Function parameter or member 'cb' not described in 'rvt_qp_iter' Link: https://lore.kernel.org/r/20191010035240.251184229@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit d6537c1a9c970962b6dc4423e813019b69f920fc Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:49 2019 -0700 infiniband: fix core/ kernel-doc notation Correct function parameter names (typos or renames). Add kernel-doc notation for missing function parameters. ../drivers/infiniband/core/sa_query.c:1263: warning: Function parameter or member 'gid_attr' not described in 'ib_init_ah_attr_from_path' ../drivers/infiniband/core/sa_query.c:1263: warning: Excess function parameter 'sgid_attr' description in 'ib_init_ah_attr_from_path' ../drivers/infiniband/core/device.c:145: warning: Function parameter or member 'dev' not described in 'rdma_dev_access_netns' ../drivers/infiniband/core/device.c:145: warning: Excess function parameter 'device' description in 'rdma_dev_access_netns' ../drivers/infiniband/core/device.c:1333: warning: Function parameter or member 'name' not described in 'ib_register_device' ../drivers/infiniband/core/device.c:1461: warning: Function parameter or member 'ib_dev' not described in 'ib_unregister_device' ../drivers/infiniband/core/device.c:1461: warning: Excess function parameter 'device' description in 'ib_unregister_device' ../drivers/infiniband/core/device.c:1483: warning: Function parameter or member 'ib_dev' not described in 'ib_unregister_device_and_put' ../drivers/infiniband/core/device.c:1550: warning: Function parameter or member 'ib_dev' not described in 'ib_unregister_device_queued' Link: https://lore.kernel.org/r/20191010035240.191542461@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit b24da1a0d43d959b0dafe2dd95a04ee4f9bb7204 Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:48 2019 -0700 infiniband: fix ulp/iser/iser_initiator.c kernel-doc warnings Add kernel-doc notation for missing function parameters: ../drivers/infiniband/ulp/iser/iser_initiator.c:365: warning: Function parameter or member 'conn' not described in 'iser_send_command' ../drivers/infiniband/ulp/iser/iser_initiator.c:365: warning: Function parameter or member 'task' not described in 'iser_send_command' ../drivers/infiniband/ulp/iser/iser_initiator.c:437: warning: Function parameter or member 'conn' not described in 'iser_send_data_out' ../drivers/infiniband/ulp/iser/iser_initiator.c:437: warning: Function parameter or member 'task' not described in 'iser_send_data_out' ../drivers/infiniband/ulp/iser/iser_initiator.c:437: warning: Function parameter or member 'hdr' not described in 'iser_send_data_out' Link: https://lore.kernel.org/r/20191010035240.132033937@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 134a42a66b3aa474cbe3cea6a96956ed9817962d Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:47 2019 -0700 infiniband: fix ulp/iser/iser_verbs.c kernel-doc notation Various kernel-doc fixes: - fix typos - don't use /** for internal structs or functions - fix Return: kernel-doc formatting - add kernel-doc notation for missing function parameters ../drivers/infiniband/ulp/iser/iser_verbs.c:159: warning: Function parameter or member 'ib_conn' not described in 'iser_alloc_fmr_pool' ../drivers/infiniband/ulp/iser/iser_verbs.c:159: warning: Function parameter or member 'cmds_max' not described in 'iser_alloc_fmr_pool' ../drivers/infiniband/ulp/iser/iser_verbs.c:159: warning: Function parameter or member 'size' not described in 'iser_alloc_fmr_pool' ../drivers/infiniband/ulp/iser/iser_verbs.c:221: warning: Function parameter or member 'ib_conn' not described in 'iser_free_fmr_pool' ../drivers/infiniband/ulp/iser/iser_verbs.c:304: warning: Function parameter or member 'ib_conn' not described in 'iser_alloc_fastreg_pool' ../drivers/infiniband/ulp/iser/iser_verbs.c:304: warning: Function parameter or member 'cmds_max' not described in 'iser_alloc_fastreg_pool' ../drivers/infiniband/ulp/iser/iser_verbs.c:304: warning: Function parameter or member 'size' not described in 'iser_alloc_fastreg_pool' ../drivers/infiniband/ulp/iser/iser_verbs.c:338: warning: Function parameter or member 'ib_conn' not described in 'iser_free_fastreg_pool' ../drivers/infiniband/ulp/iser/iser_verbs.c:568: warning: Function parameter or member 'iser_conn' not described in 'iser_conn_release' ../drivers/infiniband/ulp/iser/iser_verbs.c:603: warning: Function parameter or member 'iser_conn' not described in 'iser_conn_terminate' ../drivers/infiniband/ulp/iser/iser_verbs.c:1040: warning: Function parameter or member 'signal' not described in 'iser_post_send' ../drivers/infiniband/ulp/iser/iser_verbs.c:1040: warning: Function parameter or member 'ib_conn' not described in 'iser_post_send' ../drivers/infiniband/ulp/iser/iser_verbs.c:1040: warning: Function parameter or member 'tx_desc' not described in 'iser_post_send' Link: https://lore.kernel.org/r/20191010035240.070520193@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 094c88f3c5e8aa5e03a9a2772886a174485b431b Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:46 2019 -0700 infiniband: fix core/verbs.c kernel-doc notation Add missing function parameter descriptions: ../drivers/infiniband/core/verbs.c:257: warning: Function parameter or member 'flags' not described in '__ib_alloc_pd' ../drivers/infiniband/core/verbs.c:257: warning: Function parameter or member 'caller' not described in '__ib_alloc_pd' Link: https://lore.kernel.org/r/20191010035240.011497492@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 96f4b0b68da4fb234b99717b5d186133e0d49cc6 Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:45 2019 -0700 infiniband: fix ulp/srpt/ib_srpt.h kernel-doc notation Fix kernel-doc warnings (typos or renames) in ib_srpt.h: ../drivers/infiniband/ulp/srpt/ib_srpt.h:419: warning: Function parameter or member 'port_guid_id' not described in 'srpt_port' ../drivers/infiniband/ulp/srpt/ib_srpt.h:419: warning: Function parameter or member 'port_gid_id' not described in 'srpt_port' Link: https://lore.kernel.org/r/20191010035239.950150496@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit dfa4344da392252edaf7371d6dd21c5415cc6602 Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:43 2019 -0700 infiniband: fix ulp/opa_vnic/opa_vnic_internal.h kernel-doc notation Remove kernel-doc notation on 4 structs since they are internal and none of the struct fields/members are described. This removes 45 kernel-doc warnings. Link: https://lore.kernel.org/r/20191010035239.818405496@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 28f2a6aeed8db42b7069ef0315ec71af2ba9961e Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:42 2019 -0700 infiniband: fix ulp/iser/iscsi_iser.h kernel-doc warnings Fix kernel-doc warnings and typos/spellos. ../drivers/infiniband/ulp/iser/iscsi_iser.h:254: warning: Function parameter or member 'dma_addr' not described in 'iser_tx_desc' ../drivers/infiniband/ulp/iser/iscsi_iser.h:254: warning: Function parameter or member 'cqe' not described in 'iser_tx_desc' ../drivers/infiniband/ulp/iser/iscsi_iser.h:254: warning: Function parameter or member 'reg_wr' not described in 'iser_tx_desc' ../drivers/infiniband/ulp/iser/iscsi_iser.h:254: warning: Function parameter or member 'send_wr' not described in 'iser_tx_desc' ../drivers/infiniband/ulp/iser/iscsi_iser.h:254: warning: Function parameter or member 'inv_wr' not described in 'iser_tx_desc' ../drivers/infiniband/ulp/iser/iscsi_iser.h:277: warning: Function parameter or member 'cqe' not described in 'iser_rx_desc' ../drivers/infiniband/ulp/iser/iscsi_iser.h:296: warning: Function parameter or member 'rsp' not described in 'iser_login_desc' ../drivers/infiniband/ulp/iser/iscsi_iser.h:339: warning: Function parameter or member 'reg_mem' not described in 'iser_reg_ops' ../drivers/infiniband/ulp/iser/iscsi_iser.h:399: warning: Function parameter or member 'all_list' not described in 'iser_fr_desc' ../drivers/infiniband/ulp/iser/iscsi_iser.h:413: warning: Function parameter or member 'all_list' not described in 'iser_fr_pool' ../drivers/infiniband/ulp/iser/iscsi_iser.h:439: warning: Function parameter or member 'reg_cqe' not described in 'ib_conn' ../drivers/infiniband/ulp/iser/iscsi_iser.h:491: warning: Function parameter or member 'snd_w_inv' not described in 'iser_conn' This leaves 2 "member not described" warnings that I don't know how to fix: ../drivers/infiniband/ulp/iser/iscsi_iser.h:401: warning: Function parameter or member 'all_list' not described in 'iser_fr_desc' ../drivers/infiniband/ulp/iser/iscsi_iser.h:415: warning: Function parameter or member 'all_list' not described in 'iser_fr_pool' Link: https://lore.kernel.org/r/20191010035239.756365352@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 526f2c50637a9eac4107ca4db1ae70e329825aab Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:41 2019 -0700 infiniband: fix core/ipwm_util.h kernel-doc warnings Fix kernel-doc warnings and expected formatting. ../drivers/infiniband/core/iwpm_util.h:219: warning: Function parameter or member 'a_sockaddr' not described in 'iwpm_compare_sockaddr' ../drivers/infiniband/core/iwpm_util.h:219: warning: Function parameter or member 'b_sockaddr' not described in 'iwpm_compare_sockaddr' ../drivers/infiniband/core/iwpm_util.h:280: warning: Function parameter or member 'iwpm_pid' not described in 'iwpm_send_hello' Link: https://lore.kernel.org/r/20191010035239.695604406@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit df130f878ebddebd17c8616c306d037550be05a7 Author: rd.dunlab@gmail.com Date: Wed Oct 9 20:52:40 2019 -0700 infiniband: fix ulp/iser/iscsi_iser.[hc] kernel-doc notation Fix struct name in kernel-doc notation to match the struct name below it. Fix one typo (spello). Fix formatting as expected for kernel-doc notation. Fix parameter name to match the function's parameter name to eliminate a kernel-doc warning. ../drivers/infiniband/ulp/iser/iscsi_iser.c:815: warning: Function parameter or member 'non_blocking' not described in 'iscsi_iser_ep_connect' Link: https://lore.kernel.org/r/20191010035239.623888112@gmail.com Signed-off-by: Randy Dunlap Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 688078e7f36c293dae25b338ddc9e0a2790f6e06 Author: Randall Huang Date: Fri Oct 18 14:56:22 2019 +0800 f2fs: fix to avoid memory leakage in f2fs_listxattr In f2fs_listxattr, there is no boundary check before memcpy e_name to buffer. If the e_name_len is corrupted, unexpected memory contents may be returned to the buffer. Signed-off-by: Randall Huang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9f701f6c772b15461843b92f9b41a0705e190a86 Author: Qiuyang Sun Date: Mon Sep 23 12:22:35 2019 +0800 f2fs: check total_segments from devices in raw_super For multi-device F2FS, we should check if the sum of total_segments from all devices matches segment_count. Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 46d9ce195a2b1b8aceeafae1d8f407383a117b0e Author: Qiuyang Sun Date: Mon Sep 23 12:21:39 2019 +0800 f2fs: update multi-dev metadata in resize_fs Multi-device metadata should be updated in resize_fs as well. Also, we check that the new FS size still reaches the last device. Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ed3520427f57327f581de0cc28c1c30df08f0103 Author: Chengguang Xu via Linux-f2fs-devel Date: Fri Sep 27 09:35:48 2019 +0800 f2fs: mark recovery flag correctly in read_raw_super_block() On the combination of first fail and second success, we will miss to mark recovery flag because currently we reuse err variable in the loop. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a45bfb5a50701cec6799cf24386c2be56770328d Author: Vadim Pasternak Date: Mon Oct 21 13:30:31 2019 +0300 mlxsw: core: Extend QSFP EEPROM size for ethtool Extend the size of QSFP EEPROM for the cable types SSF8436 and SFF8636 from 256 to 640 bytes in order to expose all the EEPROM pages by ethtool. For SFF-8636 and SFF-8436 specifications, the driver exposes 256 bytes of data for ethtool's get_module_eeprom() callback. This is because the driver uses the below defines to specify SFF module length in ethtool's get_module_info() callback: 'ETH_MODULE_SFF_8636_LEN' and 'ETH_MODULE_SFF_8436_LEN' (both are 256). As a result of exposing 256 bytes only, ethtool shows wrong "zero" info for pages 1, 2, 3. The patch changes the length returned by callback for get_module_info() to the values from the next defines: 'ETH_MODULE_SFF_8636_MAX_LEN' and 'ETH_MODULE_SFF_8436_MAX_LEN' (both are 640) to allow exposing of upper page 1, 2 and 3. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit f366cd2a2e510b155e18b21a2d149332aa08eb61 Author: Vadim Pasternak Date: Mon Oct 21 13:30:30 2019 +0300 mlxsw: reg: Add macro for getting QSFP module EEPROM page number Provide a macro for getting QSFP module EEPROM page number from the optional upper page number row offset, specified in request. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit a2aca4d7f0f8ab98ba1e0db484576fc827568689 Merge: cf049bb31f71 366090564b81 Author: Jason Gunthorpe Date: Tue Oct 22 14:27:25 2019 -0300 Merge branch 'mlx5-rd-sgl' into rdma.git for-next From Yamin Friedman: ==================== This series from Yamin implements long standing "TODO" existed in rw.c. It allows the driver to specify a cut-over point where it is faster to build a lkey MR rather than do a large SGL for RDMA READ operations. mlx5 HW gets a notable performane boost by switching to MRs. ==================== Based on the mlx5-next branch from git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux for dependencies * branch 'mlx5-rd-sgl': (3 commits) RDMA/mlx5: Add capability for max sge to get optimized performance RDMA/rw: Support threshold for registration vs scattering to local pages net/mlx5: Expose optimal performance scatter entries capability commit 366090564b812453f531051129b82b63dad8f38b Author: Yamin Friedman Date: Mon Oct 7 16:59:33 2019 +0300 RDMA/mlx5: Add capability for max sge to get optimized performance Allows the IB device to provide a value of maximum scatter gather entries per RDMA READ. In certain cases it may be preferable for a device to perform UMR memory registration rather than have many scatter entries in a single RDMA READ. This provides a significant performance increase in devices capable of using different memory registration schemes based on the number of scatter gather entries. This general capability allows each device vendor to fine tune when it is better to use memory registration. Link: https://lore.kernel.org/r/20191007135933.12483-4-leon@kernel.org Signed-off-by: Yamin Friedman Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 00bd1439f464cfac3c60f6eabfe209b8a52e8194 Author: Yamin Friedman Date: Mon Oct 7 16:59:32 2019 +0300 RDMA/rw: Support threshold for registration vs scattering to local pages If there are more scatter entries than the recommended limit provided by the ib device, UMR registration is used. This will provide optimal performance when performing large RDMA READs over devices that advertise the threshold capability. With ConnectX-5 running NVMeoF RDMA with FIO single QP 128KB writes: Without use of cap: 70Gb/sec With use of cap: 84Gb/sec Link: https://lore.kernel.org/r/20191007135933.12483-3-leon@kernel.org Signed-off-by: Yamin Friedman Reviewed-by: Or Gerlitz Signed-off-by: Leon Romanovsky Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit c97905cae914ad955b79212a454016a68c7a1a21 Author: Jarkko Nikula Date: Fri Oct 18 16:21:31 2019 +0300 spi: dw-pci: Fix Chip Select amount on Intel Elkhart Lake PSE SPI Intel(R) Programmable Services Engine (Intel(R) PSE) SPI controllers in Intel Elkhart Lake have two Chip Select signals instead of one. Reported-by: Raymond Tan Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20191018132131.31608-3-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown commit c8169580e924a1d2821e0a2e228c674e0eaa091f Author: Raymond Tan Date: Fri Oct 18 16:21:30 2019 +0300 spi: dw-pci: Add runtime power management support Implement pm_runtime hooks at pci driver. Signed-off-by: Raymond Tan [jarkko.nikula@linux.intel.com: Forward ported on top of commit 1e6959832510 ("spi: dw: Add basic runtime PM support")] Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20191018132131.31608-2-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown commit b9fc2d207e547664271030c1f99fc08c92fcf3f8 Author: Jarkko Nikula Date: Fri Oct 18 16:21:29 2019 +0300 spi: dw: Move runtime PM enable/disable from common to platform driver part After commit 1e6959832510 ("spi: dw: Add basic runtime PM support") there is following warning from PCI enumerated DesignWare SPI controller during probe: dw_spi_pci 0000:00:13.0: Unbalanced pm_runtime_enable! Runtime PM is already enabled for PCI devices by the PCI core and doing it again in common DW SPI code leads to unbalanced enable calls. Fix this by moving the runtime PM enable/disable calls to the platform driver part of the driver. Cc: Phil Edworthy Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191018132131.31608-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown commit a0e0d135427cf699fe2dee77da0924e0b47f3170 Author: Ben Zhang Date: Fri Oct 18 13:04:38 2019 -0700 ASoC: rt5677: Add a PCM device for streaming hotword via SPI This patch implements a PCM interface for streaming hotword phrases over SPI. Userspace can open the PCM device at anytime. The stream is blocked when no hotword is detected. The mic audio buffer on the DSP is a ~128KByte ring buffer that holds ~4sec of audio samples recorded from the DMIC (S16_LE, mono, 16KHz). After a hotword is detected, previous 2 seconds of audio (containing the detected hotword) is streamed first, then live capture continues until userspace closes the PCM stream. When transferring, copy one period at a time then call snd_pcm_period_elapsed(). This reduces the latency of transferring the initial ~2sec of audio after hotword detect since audio samples are available for userspace earlier. Signed-off-by: Ben Zhang Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20191018200449.141123-2-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 2ac061ce97f413bfbbdd768f7d2e0fda2e8170df Author: Juergen Gross Date: Mon Oct 21 07:30:52 2019 +0200 xen/netback: cleanup init and deinit code Do some cleanup of the netback init and deinit code: - add an omnipotent queue deinit function usable from xenvif_disconnect_data() and the error path of xenvif_connect_data() - only install the irq handlers after initializing all relevant items (especially the kthreads related to the queue) - there is no need to use get_task_struct() after creating a kthread and using put_task_struct() again after having stopped it. - use kthread_run() instead of kthread_create() to spare the call of wake_up_process(). Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Signed-off-by: Jakub Kicinski commit 88238d2d225b2830706a941adbb5326b581eb6eb Merge: 39438490c971 af14288f945b Author: Jakub Kicinski Date: Tue Oct 22 09:46:05 2019 -0700 Merge branch 'r8152-phy-firmware' Hayes Wang says: ==================== Support loading the firmware of the PHY with the type of RTL_FW_PHY_NC. ==================== Signed-off-by: Jakub Kicinski commit af14288f945b4f2967acef8cec168f9c1a56eeb0 Author: Hayes Wang Date: Mon Oct 21 11:41:13 2019 +0800 r8152: support firmware of PHY NC for RTL8153A Support the firmware of PHY NC which is used to fix the issue found for PHY. Currently, only RTL_VER_04, RTL_VER_05, and RTL_VER_06 need it. The order of loading PHY firmware would be RTL_FW_PHY_START RTL_FW_PHY_NC RTL_FW_PHY_STOP The RTL_FW_PHY_START/RTL_FW_PHY_STOP are used to lock/unlock the PHY, and set/clear the patch key from the firmware file. Signed-off-by: Hayes Wang Signed-off-by: Jakub Kicinski commit 470e39194a46c8e447fcf2801c9f3e683af8a475 Author: Hayes Wang Date: Mon Oct 21 11:41:12 2019 +0800 r8152: move r8153_patch_request forward Move r8153_patch_request() forward for later patch. Signed-off-by: Hayes Wang Signed-off-by: Jakub Kicinski commit 5a16a3d9f9b9714508d6c9ab69897576a3709566 Author: Hayes Wang Date: Mon Oct 21 11:41:11 2019 +0800 r8152: add checking fw_offset field of struct fw_mac Make sure @fw_offset field of struct fw_mac is more than the size of struct fw_mac. Signed-off-by: Hayes Wang Signed-off-by: Jakub Kicinski commit a66edaafae08c37f9ea31fdfbc64d2a9be8d588f Author: Hayes Wang Date: Mon Oct 21 11:41:10 2019 +0800 r8152: rename fw_type_1 with fw_mac The struct fw_type_1 is used by MAC only, so rename it to a meaningful one. Besides, adjust two messages. Replace "load xxx fail" with "check xxx fail" Signed-off-by: Hayes Wang Signed-off-by: Jakub Kicinski commit cf049bb31f7101d9672eaf97ade4fdd5171ddf26 Author: Bernard Metzler Date: Fri Oct 4 14:53:56 2019 +0200 RDMA/siw: Fix SQ/RQ drain logic Storage ULPs (e.g. iSER & NVMeOF) use ib_drain_qp() to drain QP/CQ. Current SIW's own drain routines do not properly wait until all SQ/RQ elements are completed and reaped from the CQ. This may cause touch after free issues. New logic relies on generic __ib_drain_sq()/__ib_drain_rq() posting a final work request, which SIW immediately flushes to CQ. Fixes: 303ae1cdfdf7 ("rdma/siw: application interface") Link: https://lore.kernel.org/r/20191004125356.20673-1-bmt@zurich.ibm.com Signed-off-by: Krishnamraju Eraparaju Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit ce8739df91e21542ba7eae8056d6833493044cf2 Author: Krzysztof Kozlowski Date: Wed Oct 2 18:43:16 2019 +0200 ARM: dts: omap: Rename "ocmcram" node to "sram" The device node name should reflect generic class of a device so rename the "ocmcram" node to "sram". This will be also in sync with upcoming DT schema. No functional change. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren commit 6bad4f2ddbcf1e6a9ec4f8d6772eee2870ab0c1b Author: Adam Ford Date: Mon Oct 21 16:05:32 2019 -0500 ARM: dts: logicpd-torpedo-37xx-devkit: Increase camera pixel clock The default settings used on the baseboard are good for the OMAP3530 and are compatible with the DM3730. However, the DM3730 has a faster L3 clock which means the camera pixel clock can also be pushed faster as well. This patch increase the Pixel clock to 90MHz which is the maximum the current ISP driver permits for an L3 clock of 200MHz. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 6ba6ed6c7b5c0b739c2b732aa5507ea986e07b77 Author: Krzysztof Kozlowski Date: Mon Oct 21 18:17:52 2019 +0200 ARM: dts: am: Rename "ocmcram" node to "sram" The device node name should reflect generic class of a device so rename the "ocmcram" node and its children to "sram". This will be also in sync with upcoming DT schema. No functional change. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren commit 1b359d32f2b652032e056b79b20a7e1af7cf8ed2 Author: Adam Ford Date: Wed Oct 9 14:20:53 2019 -0500 ARM: dts: logicpd-torpedo: Disable Bluetooth Serial DMA The default serial driver for omap2plus is the 8250_omap driver. Unfortunately, this driver does not yet appear to have fully functional DMA on OMAP3630/DM3730 which causes some timeouts and frame errors. This patch removes the DMA entry from the device tree which allow the UART to operate without Bluetooth frame errors. If/when DMA is working on OMAP3630, this should be reverted. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit cb87637249650e50e654fb3185ec6b3fc1b0d64c Author: Ville Syrjälä Date: Tue Oct 8 19:48:14 2019 +0300 drm/vc4: Use drm_hdmi_avi_infoframe_bars() Use the new drm_hdmi_avi_infoframe_bars() helper instead of hand rolling it. Cc: Eric Anholt Cc: Boris Brezillon Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191008164814.5894-2-ville.syrjala@linux.intel.com Reviewed-by: Boris Brezillon commit 37859277374d2fed0b632d2e4c3137646a99d32f Author: Philipp Zabel Date: Mon Sep 23 13:57:42 2019 +0200 MAINTAINERS: add reset controller framework keywords Add a regex that matches users of the reset controller API. Signed-off-by: Philipp Zabel commit 076d9a5d67e5cc22fc16c6066a5af898d402f9f1 Author: Ville Syrjälä Date: Tue Oct 8 19:48:13 2019 +0300 drm/edid: Add drm_hdmi_avi_infoframe_bars() Add a function to fill the AVI infoframe bar information from the standard tv margin properties. Cc: Eric Anholt Cc: Boris Brezillon Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191008164814.5894-1-ville.syrjala@linux.intel.com Reviewed-by: Boris Brezillon commit ec2b31267263cd7d5a7567d315f839796c2a8c87 Author: Adam Ford Date: Mon Oct 7 14:49:13 2019 -0500 configs: omap2plus: Enable VIDEO_MT9P031 module The Logic PD Torpedo Development Kit supports a Leopard Imaging camera based on the Aptina MT9P031 sensor. This patch enables this to be built as a module. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit ed2b6b129c2b80318437b878a0e84ab0c3de2baf Author: Jonathan Neuschäfer Date: Wed Oct 2 16:53:00 2019 +0200 ARM: OMAP1: ams-delta FIQ: Fix a typo ("Initiaize") Fix a typo ("Initiaize"). Signed-off-by: Jonathan Neuschäfer Message-Id: <20191002145301.11332-1-j.neuschaefer@gmx.net> Signed-off-by: Tony Lindgren commit 93a212ebfb083cba977d4c3b9d214068a97689cc Author: Adam Ford Date: Mon Sep 23 08:59:06 2019 -0500 MAINTAINERS: Add logicpd-som-lv and logicpd-torpedo to OMAP TREE The OMAP DEVICE TREE SUPPORT lists a bunch of device tree files with wildcard names using am3*, am4*, am5*, dra7*, and *omap*. Unfortunately, the LogicPD boards do not follow this convention so changes to these boards don't get automatically flagged to route to the omap mailing list. After consulting with Tony Lindgren, he agreed it made sense to add these boards to the list. This patch adds the omap based boards to the omap device tree maintainer list. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 1994ebd1f746fcfaee316875ef13118e9df0d2a3 Author: Sebastian Reichel Date: Thu Oct 3 15:41:46 2019 +0200 ARM: OMAP2+: pdata-quirks: drop TI_ST/KIM support All TI_ST users have been migrated to the new serdev based HCILL bluetooth driver. That driver is initialized from DT and does not need any platform quirks. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren commit 4dd8f92fa125934f8a1af9da949189599a1b7e16 Author: Sebastian Reichel Date: Thu Oct 3 15:41:45 2019 +0200 ARM: dts: IGEP: Add WiLink UART node Add a node for the UART part of WiLink chip. Tested-by: Enric Balletbo i Serra Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren commit 3522a0cbf72023e6f797f42be26b66e377b770e4 Author: Sebastian Reichel Date: Thu Oct 3 15:41:44 2019 +0200 ARM: dts: LogicPD Torpedo: Add WiLink UART node Add a node for the UART part of WiLink chip. This is compile tested only! Cc: Adam Ford Acked-by: Adam Ford Tested-by: Adam Ford Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren commit 7867d709959927e5df04a34f98880e5e394b411d Author: Chris Wilson Date: Tue Oct 22 15:45:01 2019 +0100 drm/i915/gem: Distinguish each object type Separate each object class into a separate lock type to avoid lockdep cross-contamination between paths (i.e. userptr!). Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191022144501.26486-1-chris@chris-wilson.co.uk commit a201b00e5248bb6882ff7ed9e488c999019e729a Author: James Ausmus Date: Thu Oct 17 12:42:03 2019 -0700 drm/i915/aml: Allow SPT PCH for all AML devices Even the AML devices that behave like CFLs can be paired with an SPT PCH. Allow this to happen without blowing up dmesg. BSpec: 33665 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112013 Cc: Quanxian Wang Cc: Rodrigo Vivi Signed-off-by: James Ausmus Reviewed-by: Lyude Paul Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191017194203.9645-1-james.ausmus@intel.com commit 7d578b7d0936ec5cb8cdfd7de7b6ae0dea1b5f53 Author: Manivannan Sadhasivam Date: Sun Jun 9 00:46:54 2019 +0530 arm64: dts: actions: Add uSD and eMMC support for Bubblegum96 Add uSD and eMMC support for Bubblegum96 board based on Actions Semi S900 SoC. SD0 is connected to uSD slot and SD2 is connected to eMMC. Since there is no PMIC support added yet, fixed regulator has been used as a regulator node. Signed-off-by: Manivannan Sadhasivam commit 3dc4b6fb175e2ca8a55572959ecac526acb21554 Author: Manivannan Sadhasivam Date: Sun Jun 9 00:44:54 2019 +0530 arm64: dts: actions: Add MMC controller support for S900 Add MMC controller support for Actions Semi S900 SoC. There are 4 MMC controllers in this SoC which can be used for accessing SD/MMC/SDIO cards. Signed-off-by: Manivannan Sadhasivam commit 3bf864e2507aae0bb24c1a360f409b4a746abd2b Merge: e543b3f5bb1d 7d194c2100ad Author: Linus Walleij Date: Tue Oct 22 16:05:13 2019 +0200 Merge tag 'v5.4-rc4' into devel Linux 5.4-rc4 commit a1d0c02d7afbea6b15e9fa95781b7cfdf69a2006 Author: Mihail Atanassov Date: Mon Oct 21 15:01:56 2019 +0000 MAINTAINERS: Add Mihail to Komeda DRM driver I'll be the main point of contact. Cc: James Qian Wang (Arm Technology China) Cc: Liviu Dudau Acked-by: Sean Paul Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Mihail Atanassov Link: https://patchwork.freedesktop.org/patch/msgid/20191021150123.19570-1-mihail.atanassov@arm.com commit 149487bdacde32f5a9a344a49533ae0772fb9db7 Author: Sean Christopherson Date: Mon Oct 21 15:58:42 2019 -0700 KVM: Add separate helper for putting borrowed reference to kvm Add a new helper, kvm_put_kvm_no_destroy(), to handle putting a borrowed reference[*] to the VM when installing a new file descriptor fails. KVM expects the refcount to remain valid in this case, as the in-progress ioctl() has an explicit reference to the VM. The primary motiviation for the helper is to document that the 'kvm' pointer is still valid after putting the borrowed reference, e.g. to document that doing mutex(&kvm->lock) immediately after putting a ref to kvm isn't broken. [*] When exposing a new object to userspace via a file descriptor, e.g. a new vcpu, KVM grabs a reference to itself (the VM) prior to making the object visible to userspace to avoid prematurely freeing the VM in the scenario where userspace immediately closes file descriptor. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit c90992bfb0804907402ab175b25b8a37cc3c31f2 Author: Aaron Lewis Date: Mon Oct 21 16:30:28 2019 -0700 kvm: tests: Add test to verify MSR_IA32_XSS Ensure that IA32_XSS appears in KVM_GET_MSR_INDEX_LIST if it can be set to a non-zero value. Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: Ia2d644f69e2d6d8c27d7e0a7a45c2bf9c42bf5ff Signed-off-by: Paolo Bonzini commit 52297436199dde85be557ee6bc779f5b96082f74 Author: Aaron Lewis Date: Mon Oct 21 16:30:27 2019 -0700 kvm: svm: Update svm_xsaves_supported AMD CPUs now support XSAVES in a limited fashion (they require IA32_XSS to be zero). AMD has no equivalent of Intel's "Enable XSAVES/XRSTORS" VM-execution control. Instead, XSAVES is always available to the guest when supported on the host. Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: I40dc2c682eb0d38c2208d95d5eb7bbb6c47f6317 Signed-off-by: Paolo Bonzini commit 864e2ab2b46db1ac266c46a7c9cefe6cc893029d Author: Aaron Lewis Date: Mon Oct 21 16:30:26 2019 -0700 kvm: x86: Move IA32_XSS to kvm_{get,set}_msr_common Hoist support for RDMSR/WRMSR of IA32_XSS from vmx into common code so that it can be used for svm as well. Right now, kvm only allows the guest IA32_XSS to be zero, so the guest's usage of XSAVES will be exactly the same as XSAVEC. Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: Ie4b0f777d71e428fbee6e82071ac2d7618e9bb40 Signed-off-by: Paolo Bonzini commit 139a12cfe1a040fd881338a7cc042bd37159ea9a Author: Aaron Lewis Date: Mon Oct 21 16:30:25 2019 -0700 KVM: x86: Move IA32_XSS-swapping on VM-entry/VM-exit to common x86 code Hoist the vendor-specific code related to loading the hardware IA32_XSS MSR with guest/host values on VM-entry/VM-exit to common x86 code. Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: Ic6e3430833955b98eb9b79ae6715cf2a3fdd6d82 Signed-off-by: Paolo Bonzini commit 9753d68865c5662eee94eb8808b5ad5eb766f5ea Author: Aaron Lewis Date: Mon Oct 21 16:30:24 2019 -0700 KVM: VMX: Use wrmsr for switching between guest and host IA32_XSS on Intel When the guest can execute the XSAVES/XRSTORS instructions, use wrmsr to set the hardware IA32_XSS MSR to guest/host values on VM-entry/VM-exit, rather than the MSR-load areas. By using the same approach as AMD, we will be able to use a common implementation for both (in the next patch). Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: I9447d104b2615c04e39e4af0c911e1e7309bf464 Signed-off-by: Paolo Bonzini commit 312a1c87798e6b43ff533393167b3cba33645ead Author: Aaron Lewis Date: Mon Oct 21 16:30:23 2019 -0700 KVM: SVM: Use wrmsr for switching between guest and host IA32_XSS on AMD When the guest can execute the XSAVES/XRSTORS instructions, set the hardware IA32_XSS MSR to guest/host values on VM-entry/VM-exit. Note that vcpu->arch.ia32_xss is currently guaranteed to be 0 on AMD, since there is no way to change it. Suggested-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: Id51a782462086e6d7a3ab621838e200f1c005afd Signed-off-by: Paolo Bonzini commit 78958563d8023db0c6d03a2fe2a64d79b47b4349 Author: Aaron Lewis Date: Mon Oct 21 16:30:22 2019 -0700 KVM: x86: Remove unneeded kvm_vcpu variable, guest_xcr0_loaded The kvm_vcpu variable, guest_xcr0_loaded, is a waste of an 'int' and a conditional branch. VMX and SVM are the only users, and both unconditionally pair kvm_load_guest_xcr0() with kvm_put_guest_xcr0() making this check unnecessary. Without this variable, the predicates in kvm_load_guest_xcr0 and kvm_put_guest_xcr0 should match. Suggested-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: I7b1eb9b62969d7bbb2850f27e42f863421641b23 Signed-off-by: Paolo Bonzini commit c034f2aa8622e1e436563eb34c0f78ba8aa32329 Author: Aaron Lewis Date: Mon Oct 21 16:30:21 2019 -0700 KVM: VMX: Fix conditions for guest IA32_XSS support Volume 4 of the SDM says that IA32_XSS is supported if CPUID(EAX=0DH,ECX=1):EAX.XSS[bit 3] is set, so only the X86_FEATURE_XSAVES check is necessary (X86_FEATURE_XSAVES is the Linux name for CPUID(EAX=0DH,ECX=1):EAX.XSS[bit 3]). Fixes: 4d763b168e9c5 ("KVM: VMX: check CPUID before allowing read/write of IA32_XSS") Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: I9059b9f2e3595e4b09a4cdcf14b933b22ebad419 Signed-off-by: Paolo Bonzini commit 7204160eb7809345d10c983d9d1dfbd98060a56d Author: Aaron Lewis Date: Mon Oct 21 16:30:20 2019 -0700 KVM: x86: Introduce vcpu->arch.xsaves_enabled Cache whether XSAVES is enabled in the guest by adding xsaves_enabled to vcpu->arch. Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: If4638e0901c28a4494dad2e103e2c075e8ab5d68 Signed-off-by: Paolo Bonzini commit dc6015cb1c834ce39c0d3ff09b3f1818b70ba9ad Author: Andy Shevchenko Date: Thu Oct 17 14:49:12 2019 +0300 drm/mipi_dbi: Use simple right shift instead of double negation GCC complains about dubious bitwise OR operand: drivers/gpu/drm/drm_mipi_dbi.c:1024:49: warning: dubious: x | !y CC [M] drivers/gpu/drm/drm_mipi_dbi.o As long as buffer is consist of byte (u8) values, we may use simple right shift and satisfy compiler. It also reduces amount of operations needed. Signed-off-by: Andy Shevchenko Reviewed-by: Noralf Trønnes Tested-by: Noralf Trønnes Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20191017114912.61522-1-andriy.shevchenko@linux.intel.com commit c1b065b4f20900ae7075f4d0dbf4c9b089cc1fbe Author: Philipp Zabel Date: Mon Oct 21 16:08:13 2019 +0200 reset: zynqmp: Make reset_control_ops const The zynqmp_reset_ops structure is never modified. Make it const. Acked-by: Michal Simek Signed-off-by: Philipp Zabel commit 0587152bf9a0d7ebfd7fcb401068a742027adb2a Author: Chris Wilson Date: Tue Oct 22 13:28:45 2019 +0100 drm/i915: Drop assertion that ce->pin_mutex guards state updates The actual conditions are that we know the GPU is not accessing the context, and we hold a pin on the context image to allow CPU access. We used a fake lock on ce->pin_mutex so that we could try and use lockdep to assert that access is serialised, but the various different hardirq/softirq contexts where we need to *fake* holding the pin_mutex are causing more trouble. Still it would be nice if we did have a way to reassure ourselves that the direct update to the context image is serialised with GPU execution. In the meantime, stop lockdep complaining about false irq inversions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111923 Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191022122845.25038-1-chris@chris-wilson.co.uk commit e095cb7a0f57e1e2dcab93c4213808b1cd57e206 Author: Lianbo Jiang Date: Thu Oct 17 17:43:46 2019 +0800 x86/kdump: Remove the unused crash_copy_backup_region() The crash_copy_backup_region() function is unused so remove it. Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: bhe@redhat.com Cc: dhowells@redhat.com Cc: dyoung@redhat.com Cc: ebiederm@xmission.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jürgen Gross Cc: kexec@lists.infradead.org Cc: Thomas Gleixner Cc: Tom Lendacky Cc: vgoyal@redhat.com Cc: x86-ml Cc: Yi Wang Link: https://lkml.kernel.org/r/20191017094347.20327-3-lijiang@redhat.com commit 68d8ab3cf1a98e9d296221afdb6433715fd57535 Author: Andreas Klinger Date: Mon Sep 9 14:37:48 2019 +0200 iio: adc: hx711: optimize performance in read cycle Set gain in hx711_reset() to its default value after a reset cycle. This omits one precautionary read cycle, because the read is performed in hx711_set_gain_for_channel() anyway if gain has changed. Check for DOUT low and if its high wait some time if it goes down instead of doing a blind reset cycle when DOUT is not down. This is a performance optimization which allows to query the sensor with a higher frequency. Signed-off-by: Andreas Klinger Signed-off-by: Jonathan Cameron commit b1418bc852607c6aba4cec4644ba25e004758dfe Author: Philipp Zabel Date: Fri May 12 14:24:50 2017 +0200 reset: hisilicon: hi3660: Make reset_control_ops const The hi3660_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel commit 1cd92d42dbfff03bdd209fd6ccd5aec395faa915 Author: Fabrice Gasnier Date: Fri Sep 20 13:50:06 2019 +0200 iio: adc: stm32-adc: fix kernel-doc warnings Fix the following warnings when documentation is built: drivers/iio/adc/stm32-adc-core.c:62: warning: cannot understand function prototype: 'struct stm32_adc_common_regs ' drivers/iio/adc/stm32-adc-core.c:78: warning: cannot understand function prototype: 'struct stm32_adc_priv_cfg ' drivers/iio/adc/stm32-adc-core.c:123: warning: Function parameter or member 'pdev' not described in 'stm32f4_adc_clk_sel' drivers/iio/adc/stm32-adc.c:219: warning: cannot understand function prototype: 'struct stm32_adc_regs ' drivers/iio/adc/stm32-adc.c:237: warning: cannot understand function prototype: 'struct stm32_adc_regspec ' drivers/iio/adc/stm32-adc.c:264: warning: cannot understand function prototype: 'struct stm32_adc_cfg ' drivers/iio/adc/stm32-adc.c:323: warning: Function parameter or member 'difsel' not described in 'N' drivers/iio/adc/stm32-adc.c:323: warning: Function parameter or member 'pcsel' not described in 'stm32_adc' drivers/iio/adc/stm32-adc.c:371: warning: cannot understand function prototype: 'const struct stm32_adc_regs stm32f4_sq[STM32_ADC_MAX_SQ + 1] drivers/iio/adc/stm32-adc.c:417: warning: cannot understand function prototype: 'const struct stm32_adc_regs stm32f4_smp_bits[] = ' drivers/iio/adc/stm32-adc.c:508: warning: cannot understand function prototype: 'const struct stm32_adc_regs stm32h7_smp_bits[] = ' drivers/iio/adc/stm32-adc.c:1112: warning: Function parameter or member 'indio_dev' not described in 'stm32_adc_get_trig_extsel' drivers/iio/adc/stm32-adc.c:1420: warning: Function parameter or member 'indio_dev' not described in 'stm32_adc_debugfs_reg_access' drivers/iio/adc/stm32-adc.c:1420: warning: Function parameter or member 'reg' not described in 'stm32_adc_debugfs_reg_access' drivers/iio/adc/stm32-adc.c:1420: warning: Function parameter or member 'writeval' not described in 'stm32_adc_debugfs_reg_access' drivers/iio/adc/stm32-adc.c:1420: warning: Function parameter or member 'readval' not described in 'stm32_adc_debugfs_reg_access' Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit fe2392c67db9730d46f11fc4fadfa7bffa8843fa Author: Alexandru Ardelean Date: Fri Sep 20 11:03:48 2019 +0300 iio: pressure: zpa2326: fix iio_triggered_buffer_postenable position The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. The iio_triggered_buffer_postenable() should be called before (to attach the poll func) and then the The iio_triggered_buffer_predisable() function is hooked directly without anything, which is probably fine, as the postenable() version seems to also do some reset/wake-up of the device. This will mean it will be easier when removing it; i.e. it just gets removed. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 1b84292bea00c042afc2f950c61b2c027bd36ff7 Author: Xiaoyao Li Date: Sun Oct 20 17:11:01 2019 +0800 KVM: VMX: Rename {vmx,nested_vmx}_vcpu_setup() Rename {vmx,nested_vmx}_vcpu_setup() to match what they really do. Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit 4be5341026246870818e28b53202b001426a5aec Author: Xiaoyao Li Date: Sun Oct 20 17:11:00 2019 +0800 KVM: VMX: Initialize vmx->guest_msrs[] right after allocation Move the initialization of vmx->guest_msrs[] from vmx_vcpu_setup() to vmx_create_vcpu(), and put it right after its allocation. This also is the preperation for next patch. Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit 3c0f4be1f33b25bd28be1672ecb53627577c0899 Author: Xiaoyao Li Date: Sun Oct 20 17:10:59 2019 +0800 KVM: VMX: Remove vmx->hv_deadline_tsc initialization from vmx_vcpu_setup() ... It can be removed here because the same code is called later in vmx_vcpu_reset() as the flow: kvm_arch_vcpu_setup() -> kvm_vcpu_reset() -> vmx_vcpu_reset() Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit 97d62c345af8f3b2c99dd5c5a7d9a354969adc96 Author: Jonathan Cameron Date: Sun Oct 13 17:54:12 2019 +0100 iio: chemical: sgp30: drop excess semicolon Suggested by coccinelle / coccicheck. CHECK drivers/iio/chemical/sgp30.c drivers/iio/chemical/sgp30.c:486:2-3: Unneeded semicolon Signed-off-by: Jonathan Cameron Signed-off-by: Andreas Brauchli commit 35fbe0d4ef9abb05a8c591481d0196edcb056bcc Author: Xiaoyao Li Date: Sun Oct 20 17:10:58 2019 +0800 KVM: VMX: Write VPID to vmcs when creating vcpu Move the code that writes vmx->vpid to vmcs from vmx_vcpu_reset() to vmx_vcpu_setup(), because vmx->vpid is allocated when creating vcpu and never changed. So we don't need to update the vmcs.vpid when resetting vcpu. Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit 4be946728f65c10c9bb1a1580ec47a316f5ee6ac Author: Like Xu Date: Mon Oct 21 18:55:04 2019 +0800 KVM: x86/vPMU: Declare kvm_pmu->reprogram_pmi field using DECLARE_BITMAP Replace the explicit declaration of "u64 reprogram_pmi" with the generic macro DECLARE_BITMAP for all possible appropriate number of bits. Suggested-by: Paolo Bonzini Signed-off-by: Like Xu Signed-off-by: Paolo Bonzini commit 30ce89acdfe91eb7a88cc5805d2774f11e1eccb4 Author: Miaohe Lin Date: Mon Oct 21 10:52:56 2019 +0800 KVM: remove redundant code in kvm_arch_vm_ioctl If we reach here with r = 0, we will reassign r = 0 unnecesarry, then do the label set_irqchip_out work. If we reach here with r != 0, then we will do the label work directly. So this if statement and r = 0 assignment is redundant. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 2cf9af0b566823de418eb2ff357a2f8233c718e9 Author: Suthikulpanit, Suravee Date: Fri Sep 13 19:00:49 2019 +0000 kvm: x86: Modify kvm_x86_ops.get_enable_apicv() to use struct kvm parameter Generally, APICv for all vcpus in the VM are enable/disable in the same manner. So, get_enable_apicv() should represent APICv status of the VM instead of each VCPU. Modify kvm_x86_ops.get_enable_apicv() to take struct kvm as parameter instead of struct kvm_vcpu. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit 34059c2570102870df8d8a31bd42f8d9c19cce87 Author: Sean Christopherson Date: Fri Sep 27 14:45:23 2019 -0700 KVM: x86: Fold decache_cr3() into cache_reg() Handle caching CR3 (from VMX's VMCS) into struct kvm_vcpu via the common cache_reg() callback and drop the dedicated decache_cr3(). The name decache_cr3() is somewhat confusing as the caching behavior of CR3 follows that of GPRs, RFLAGS and PDPTRs, (handled via cache_reg()), and has nothing in common with the caching behavior of CR0/CR4 (whose decache_cr{0,4}_guest_bits() likely provided the 'decache' verbiage). This would effectivel adds a BUG() if KVM attempts to cache CR3 on SVM. Change it to a WARN_ON_ONCE() -- if the cache never requires filling, the value is already in the right place -- and opportunistically add one in VMX to provide an equivalent check. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit cb3c1e2f3e8d0a77824c05c7c38f03d2cbdeaf9e Author: Sean Christopherson Date: Fri Sep 27 14:45:22 2019 -0700 KVM: x86: Add helpers to test/mark reg availability and dirtiness Add helpers to prettify code that tests and/or marks whether or not a register is available and/or dirty. Suggested-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit f8845541e93c5b41618405de6735edd6f0cc8984 Author: Sean Christopherson Date: Fri Sep 27 14:45:21 2019 -0700 KVM: x86: Fold 'enum kvm_ex_reg' definitions into 'enum kvm_reg' Now that indexing into arch.regs is either protected by WARN_ON_ONCE or done with hardcoded enums, combine all definitions for registers that are tracked by regs_avail and regs_dirty into 'enum kvm_reg'. Having a single enum type will simplify additional cleanup related to regs_avail and regs_dirty. Signed-off-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 489cbcf01d1c9e1bf09b7e371d0f312b3a1f3ef2 Author: Sean Christopherson Date: Fri Sep 27 14:45:20 2019 -0700 KVM: x86: Add WARNs to detect out-of-bounds register indices Add WARN_ON_ONCE() checks in kvm_register_{read,write}() to detect reg values that would cause KVM to overflow vcpu->arch.regs. Change the reg param to an 'int' to make it clear that the reg index is unverified. Regarding the overhead of WARN_ON_ONCE(), now that all fixed GPR reads and writes use dedicated accessors, e.g. kvm_rax_read(), the overhead is limited to flows where the reg index is generated at runtime. And there is at least one historical bug where KVM has generated an out-of- bounds access to arch.regs (see commit b68f3cc7d9789, "KVM: x86: Always use 32-bit SMRAM save state for 32-bit kernels"). Adding the WARN_ON_ONCE() protection paves the way for additional cleanup related to kvm_reg and kvm_reg_ex. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 491c1ad1ac8d891aa440eb0216d023af6c038346 Author: Sean Christopherson Date: Fri Sep 27 14:45:19 2019 -0700 KVM: VMX: Optimize vmx_set_rflags() for unrestricted guest Rework vmx_set_rflags() to avoid the extra code need to handle emulation of real mode and invalid state when unrestricted guest is disabled. The primary reason for doing so is to avoid the call to vmx_get_rflags(), which will incur a VMREAD when RFLAGS is not already available. When running nested VMs, the majority of calls to vmx_set_rflags() will occur without an associated vmx_get_rflags(), i.e. when stuffing GUEST_RFLAGS during transitions between vmcs01 and vmcs02. Note, vmx_get_rflags() guarantees RFLAGS is marked available. Signed-off-by: Sean Christopherson [Replace "else" with early "return" in the unrestricted guest branch. - Paolo] Signed-off-by: Paolo Bonzini commit e7bddc52582d5961dfb782b40a94f54c9e6673a0 Author: Sean Christopherson Date: Fri Sep 27 14:45:18 2019 -0700 KVM: VMX: Consolidate to_vmx() usage in RFLAGS accessors Capture struct vcpu_vmx in a local variable to improve the readability of vmx_{g,s}et_rflags(). No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit b17b7436f2f0c4984f98a0b317b8362fd365700d Author: Sean Christopherson Date: Fri Sep 27 14:45:17 2019 -0700 KVM: VMX: Skip GUEST_CR3 VMREAD+VMWRITE if the VMCS is up-to-date Skip the VMWRITE to update GUEST_CR3 if CR3 is not available, i.e. has not been read from the VMCS since the last VM-Enter. If vcpu->arch.cr3 is stale, kvm_read_cr3(vcpu) will refresh vcpu->arch.cr3 from the VMCS, meaning KVM will do a VMREAD and then VMWRITE the value it just pulled from the VMCS. Note, this is a purely theoretical change, no instances of skipping the VMREAD+VMWRITE have been observed with this change. Tested-by: Reto Buerki Tested-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 33af3a7ef9e6fb6fa5f0168c3c67f51776dafc54 Author: Tom Lendacky Date: Thu Oct 3 21:17:48 2019 +0000 KVM: SVM: Reduce WBINVD/DF_FLUSH invocations Performing a WBINVD and DF_FLUSH are expensive operations. Currently, a WBINVD/DF_FLUSH is performed every time an SEV guest terminates. However, the WBINVD/DF_FLUSH is only required when an ASID is being re-allocated to a new SEV guest. Also, a single WBINVD/DF_FLUSH can enable all ASIDs that have been disassociated from guests through DEACTIVATE. To reduce the number of WBINVD/DF_FLUSH invocations, introduce a new ASID bitmap to track ASIDs that need to be reclaimed. When an SEV guest is terminated, add its ASID to the reclaim bitmap instead of clearing the bitmap in the existing SEV ASID bitmap. This delays the need to perform a WBINVD/DF_FLUSH invocation when an SEV guest terminates until all of the available SEV ASIDs have been used. At that point, the WBINVD/DF_FLUSH invocation can be performed and all ASIDs in the reclaim bitmap moved to the available ASIDs bitmap. The semaphore around DEACTIVATE can be changed to a read semaphore with the semaphore taken in write mode before performing the WBINVD/DF_FLUSH. Tested-by: David Rientjes Signed-off-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit 0fc5deae03a2724a4b18373b2e6a3b585019de1e Author: Tom Lendacky Date: Thu Oct 3 21:17:46 2019 +0000 KVM: SVM: Remove unneeded WBINVD and DF_FLUSH when starting SEV guests Performing a WBINVD and DF_FLUSH are expensive operations. The SEV support currently performs this WBINVD/DF_FLUSH combination when an SEV guest is terminated, so there is no need for it to be done before LAUNCH. However, when the SEV firmware transitions the platform from UNINIT state to INIT state, all ASIDs will be marked invalid across all threads. Therefore, as part of transitioning the platform to INIT state, perform a WBINVD/DF_FLUSH after a successful INIT in the PSP/SEV device driver. Since the PSP/SEV device driver is x86 only, it can reference and use the WBINVD related functions directly. Cc: Gary Hook Cc: Herbert Xu Cc: "David S. Miller" Tested-by: David Rientjes Signed-off-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit 04f11ef45810da5ae2542dd78cc353f3761bd2cb Author: Sean Christopherson Date: Fri Sep 27 14:45:16 2019 -0700 KVM: nVMX: Always write vmcs02.GUEST_CR3 during nested VM-Enter Write the desired L2 CR3 into vmcs02.GUEST_CR3 during nested VM-Enter instead of deferring the VMWRITE until vmx_set_cr3(). If the VMWRITE is deferred, then KVM can consume a stale vmcs02.GUEST_CR3 when it refreshes vmcs12->guest_cr3 during nested_vmx_vmexit() if the emulated VM-Exit occurs without actually entering L2, e.g. if the nested run is squashed because nested VM-Enter (from L1) is putting L2 into HLT. Note, the above scenario can occur regardless of whether L1 is intercepting HLT, e.g. L1 can intercept HLT and then re-enter L2 with vmcs.GUEST_ACTIVITY_STATE=HALTED. But practically speaking, a VMM will likely put a guest into HALTED if and only if it's not intercepting HLT. In an ideal world where EPT *requires* unrestricted guest (and vice versa), VMX could handle CR3 similar to how it handles RSP and RIP, e.g. mark CR3 dirty and conditionally load it at vmx_vcpu_run(). But the unrestricted guest silliness complicates the dirty tracking logic to the point that explicitly handling vmcs02.GUEST_CR3 during nested VM-Enter is a simpler overall implementation. Cc: stable@vger.kernel.org Reported-and-tested-by: Reto Buerki Tested-by: Vitaly Kuznetsov Reviewed-by: Liran Alon Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 83af5e65a89547633bab7278564219ca8e68b968 Author: Tom Lendacky Date: Thu Oct 3 21:17:45 2019 +0000 KVM: SVM: Guard against DEACTIVATE when performing WBINVD/DF_FLUSH The SEV firmware DEACTIVATE command disassociates an SEV guest from an ASID, clears the WBINVD indicator on all threads and indicates that the SEV firmware DF_FLUSH command must be issued before the ASID can be re-used. The SEV firmware DF_FLUSH command will return an error if a WBINVD has not been performed on every thread before it has been invoked. A window exists between the WBINVD and the invocation of the DF_FLUSH command where an SEV firmware DEACTIVATE command could be invoked on another thread, clearing the WBINVD indicator. This will cause the subsequent SEV firmware DF_FLUSH command to fail which, in turn, results in the SEV firmware ACTIVATE command failing for the reclaimed ASID. This results in the SEV guest failing to start. Use a mutex to close the WBINVD/DF_FLUSH window by obtaining the mutex before the DEACTIVATE and releasing it after the DF_FLUSH. This ensures that any DEACTIVATE cannot run before a DF_FLUSH has completed. Fixes: 59414c989220 ("KVM: SVM: Add support for KVM_SEV_LAUNCH_START command") Tested-by: David Rientjes Signed-off-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit e3b9a9e147dbe1a8fb9d8398a2faa47d8a6f50de Author: Tom Lendacky Date: Thu Oct 3 21:17:43 2019 +0000 KVM: SVM: Serialize access to the SEV ASID bitmap The SEV ASID bitmap currently is not protected against parallel SEV guest startups. This can result in an SEV guest failing to start because another SEV guest could have been assigned the same ASID value. Use a mutex to serialize access to the SEV ASID bitmap. Fixes: 1654efcbc431 ("KVM: SVM: Add KVM_SEV_INIT command") Tested-by: David Rientjes Signed-off-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit e948761f5b024284dc423172e9aca0672f3dec5b Author: Chris Wilson Date: Tue Oct 22 11:17:04 2019 +0100 drm/i915/selftests: Make the mman object busy everywhere Loop over all engines, issuing a request for the object on each in order to make sure we leave no stone unturned when creating an active ref. The purpose is to make sure that we can reap a zombie object (one that is only alive due to an active reference on the GPU) no matter where that active reference emanates from. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191022101704.5618-1-chris@chris-wilson.co.uk commit 51757cf4d7e6e1e35c25128b085fd1dabebdf4e8 Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:26 2019 +0100 drm/i915/selftests: Use for_each_uabi_engine in contex selftests Contexts are not testing physical engines so it makes sense to use the uabi iterator. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-13-tvrtko.ursulin@linux.intel.com commit d1a03ee7e9d024e0aa140b7959e2a5232cab392a Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:24 2019 +0100 drm/i915/selftests: Use GT engines in igt_live_test Frees up two call sites from passing i915 to for_each_engine. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-11-tvrtko.ursulin@linux.intel.com commit 6457099ac59e7aa43d0a3fc8f9d5cff508981295 Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:23 2019 +0100 drm/i915/selftests: Use GT engines in mock_gem_device Just freeing up two more call sites from passing in i915 to for_each_engine. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-10-tvrtko.ursulin@linux.intel.com commit 2271a223e06b59182cfb0a840395903d87288d66 Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:22 2019 +0100 drm/i915/selftests: Convert eviction selftests to gt/ggtt Convert the test code to work directly on what it needs rather than going through the top-level i915. This enables another natural usage for for_each_engine(.., gt, ..). Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-9-tvrtko.ursulin@linux.intel.com commit 8726a2a4df4db2bc7e5ac3f9b5c582bbd384ce6b Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:21 2019 +0100 drm/i915: Split drop caches into GT and i915 parts Just compartmentalizes code a bit more. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-8-tvrtko.ursulin@linux.intel.com commit 7f63aa23526a8a0e17dd98205e52af78e3a660c3 Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:20 2019 +0100 drm/i915: Pass intel_gt to intel_engines_verify_workarounds Engines belong to the GT so make it indicative in the API. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-7-tvrtko.ursulin@linux.intel.com commit 7841fcbdfb4340819c889b67662f6dd8d5685c8d Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:19 2019 +0100 drm/i915: Pass intel_gt to intel_engines_init Engines belong to the GT so make it indicative in the API. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-6-tvrtko.ursulin@linux.intel.com commit 78f606033b6e48dbe382272ae0a18e2045a856b7 Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:18 2019 +0100 drm/i915: Pass intel_gt to intel_engines_setup Engines belong to the GT so make it indicative in the API. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-5-tvrtko.ursulin@linux.intel.com commit b0258bf24252a487a03dfc94aeea72940ad3fe52 Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:17 2019 +0100 drm/i915: Pass intel_gt to intel_engines_cleanup Engines belong to the GT so make it indicative in the API. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-4-tvrtko.ursulin@linux.intel.com commit 3ea951c693a288445ddb720b52fad59b06fe1042 Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:16 2019 +0100 drm/i915: Pass intel_gt to intel_setup_engine_capabilities Engines belong to the GT so make it indicative in the API. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-3-tvrtko.ursulin@linux.intel.com commit adcb52649498d1727da1f9137d3c611dedb0214c Author: Tvrtko Ursulin Date: Tue Oct 22 10:47:15 2019 +0100 drm/i915: Pass intel_gt to intel_engines_init_mmio Engines belong to the GT so make it indicative in the API. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-2-tvrtko.ursulin@linux.intel.com commit aa9eb0caaa0352820607076fc9b755f84fe71f22 Author: Chris Wilson Date: Tue Oct 22 10:58:51 2019 +0100 drm/i915/selftests: Set vm->gt backpointer for mock_ppgtt Add the backpointer to ppgtt and i915->gt so that we can traverse across the device hierarchy. Reported-by: Matthew Auld Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191022095851.23442-1-chris@chris-wilson.co.uk commit 54f965db2e8708213cd05a0d0d2bea9c860f69fc Author: Jonathan Cameron Date: Sun Oct 13 17:37:54 2019 +0100 iio: adc: twl4030: Use false / true instead of 0 / 1 with booleans Suggestion from coccinelle / coccicheck CHECK drivers/iio/adc/twl4030-madc.c drivers/iio/adc/twl4030-madc.c:524:6-15: WARNING: Comparison of 0/1 to bool variable drivers/iio/adc/twl4030-madc.c:655:1-43: WARNING: Assignment of 0/1 to bool variable drivers/iio/adc/twl4030-madc.c:659:2-44: WARNING: Assignment of 0/1 to bool variable drivers/iio/adc/twl4030-madc.c:664:1-43: WARNING: Assignment of 0/1 to bool variable drivers/iio/adc/twl4030-madc.c:498:2-34: WARNING: Assignment of 0/1 to bool variable drivers/iio/adc/twl4030-madc.c:510:2-19: WARNING: Assignment of 0/1 to bool variable drivers/iio/adc/twl4030-madc.c:511:2-11: WARNING: Assignment of 0/1 to bool variable drivers/iio/adc/twl4030-madc.c:531:2-19: WARNING: Assignment of 0/1 to bool variable drivers/iio/adc/twl4030-madc.c:532:2-11: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jonathan Cameron Reviewed-by: Sebastian Reichel commit 3986a14870cba64b8823734cf83f614757910bae Author: Nuno Sá Date: Fri Oct 11 10:40:38 2019 +0200 dt-bindings: iio: Add ltc2983 documentation Document the LTC2983 temperature sensor devicetree bindings. Tweaked by Jonathan to take into account the lack of signed output being maintained by dtc yaml output. For now a comment added that the unsigned array should actually be signed. Signed-off-by: Nuno Sá Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit f110f3188e5639c81c457b2b831d40dfe3891bdb Author: Nuno Sá Date: Fri Oct 11 10:40:37 2019 +0200 iio: temperature: Add support for LTC2983 The LTC2983 is a Multi-Sensor High Accuracy Digital Temperature Measurement System. It measures a wide variety of temperature sensors and digitally outputs the result, in °C or °F, with 0.1°C accuracy and 0.001°C resolution. It can measure the temperature of all standard thermocouples (type B,E,J,K,N,S,R,T), standard 2-,3-,4-wire RTDs, thermistors and diodes. Signed-off-by: Nuno Sá Signed-off-by: Jonathan Cameron commit 2f4292a821711ec9f2c7781d1ee1a9570940bd02 Author: Bartosz Golaszewski Date: Mon Oct 7 04:41:31 2019 +0200 iio: pressure: bmp280: use devm action and remove labels from probe We can drop some duplicate code if we use devm_action for disabling regulators and pm and the managed variant of iio_device_register(). This allows us to completely remove all remove() callbacks from both i2c and spi code. Signed-off-by: Bartosz Golaszewski Signed-off-by: Jonathan Cameron commit 1372d1a1979931a2a073b2cb683974f9fbe1230e Author: Bartosz Golaszewski Date: Wed Oct 2 10:57:56 2019 +0200 iio: pressure: bmp280: use bulk regulator ops The vddd and vdda supplies are always operated on together. We can shrink the code a bit by using the bulk regulator helpers. Signed-off-by: Bartosz Golaszewski Signed-off-by: Jonathan Cameron commit 64f1cc99ef96cc944c69828c67c33a97d26b48e0 Author: Gerd Hoffmann Date: Fri Oct 18 14:23:52 2019 +0200 drm/virtio: move byteorder handling into virtio_gpu_cmd_transfer_to_host_2d function Be consistent with the rest of the code base. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191018122352.17019-1-kraxel@redhat.com commit 9e370dfec4fee8fe22b39a296aca019605393bae Author: Gerd Hoffmann Date: Fri Oct 18 13:38:32 2019 +0200 drm/virtio: print a single line with device features Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191018113832.5460-1-kraxel@redhat.com commit 8ee2f956c918e2de0ee85f01b94d1e0ff31b19b8 Author: Gerd Hoffmann Date: Thu Oct 17 15:26:38 2019 +0200 drm/qxl: allocate small objects top-down qxl uses small buffer objects for qxl commands. Allocate them top-down to reduce fragmentation. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191017132638.9693-6-kraxel@redhat.com commit db262087833f5b750d38b1423ab61e08c1a16947 Author: Gerd Hoffmann Date: Thu Oct 17 15:26:37 2019 +0200 drm/qxl: use DEFINE_DRM_GEM_FOPS() We have no qxl-specific fops any more. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191017132638.9693-5-kraxel@redhat.com commit de7f7c472429a8ff3b042dfff78dd8a7de808680 Author: Gerd Hoffmann Date: Thu Oct 17 15:26:36 2019 +0200 drm/qxl: drop verify_access Not needed any more. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191017132638.9693-4-kraxel@redhat.com commit 60f57220cd3c2f35866904a7eea6b03c8ee5a743 Author: Gerd Hoffmann Date: Thu Oct 17 15:26:35 2019 +0200 drm/qxl: switch qxl to &drm_gem_object_funcs.mmap Wire up the new drm_gem_ttm_mmap() helper function. Use generic drm_gem_mmap() and remove qxl_mmap(). Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191017132638.9693-3-kraxel@redhat.com commit 80ed59b285cc7ca50aeb635eb3a2cb8d3d54b406 Author: Gerd Hoffmann Date: Thu Oct 17 15:26:34 2019 +0200 drm/qxl: drop qxl_ttm_fault Not sure what this hook is supposed to do. vmf->vma->vm_private_data should never be NULL, so the extra check in qxl_ttm_fault should have no effect. Drop it. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191017132638.9693-2-kraxel@redhat.com commit 84e5ddd5c46ea3bf0cad670da32028994cad5936 Author: Robert Jones Date: Mon Oct 14 11:49:21 2019 -0700 iio: imu: Add support for the FXOS8700 IMU FXOS8700CQ is a small, low-power, 3-axis linear accelerometer and 3-axis magnetometer combined into a single package. The device features a selectable I2C or point-to-point SPI serial interface with 14-bit accelerometer and 16-bit magnetometer ADC resolution along with smart-embedded functions. FXOS8700CQ has dynamically selectable accelerationfull-scale ranges of ±2 g/±4 g/±8 g and a fixed magnetic measurement range of ±1200 μT. Output data rates (ODR) from 1.563 Hz to 800 Hz are selectable by the user for each sensor. Interleaved magnetic and acceleration data is available at ODR rates of up to 400 Hz. FXOS8700CQ is available in a plastic QFN package and it is guaranteed to operate over the extended temperature range of –40 °C to +85 °C. TODO: Trigger and IRQ configuration support Datasheet: http://cache.freescale.com/files/sensors/doc/data_sheet/FXOS8700CQ.pdf Signed-off-by: Robert Jones Signed-off-by: Jonathan Cameron commit ba1af2e47446ac353395b4c274408944284ceeaa Author: Chengguang Xu Date: Tue Oct 22 17:17:38 2019 +0800 ext2: add missing brelse in ext2_new_blocks() Fix missing brelse of bitmap_bh in the case of retry. Link: https://lore.kernel.org/r/20191022091738.9160-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit ddd9b54deebba64c37d04598c98035b5da037d38 Author: Wambui Karuga Date: Sat Oct 19 10:18:40 2019 +0300 drm: remove unnecessary return variable Remove unnecessary variable `ret` in drm_dp_atomic_find_vcpi_slots() only used to hold the function return value and have the function return the value directly. Issue found by coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Wambui Karuga Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191019071840.16877-1-wambui@karuga.xyz commit 96a2f50305d11099d33d70014697da564e9ba6d0 Author: Dinh Nguyen Date: Mon Oct 14 10:18:27 2019 -0500 reset: build simple reset controller driver for Agilex The Intel SoCFPGA Agilex platform shares the same reset controller that is on the Stratix10. Signed-off-by: Dinh Nguyen Signed-off-by: Philipp Zabel commit 4d6f93964dec1f19e6a361f3c0a40740bfdf1726 Author: Robert Jones Date: Mon Oct 14 11:49:20 2019 -0700 dt-bindings: iio: imu: add fxos8700 imu binding This adds documentation for the Freescale FXOS8700 Inertial Measurement Unit device-tree bindings. Signed-off-by: Robert Jones Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit ec3b7b6eb8c90b52f61adff11b6db7a8db34de19 Author: Kangjie Lu Date: Thu Oct 17 23:41:50 2019 -0500 drm/gma500: fix memory disclosures due to uninitialized bytes "clock" may be copied to "best_clock". Initializing best_clock is not sufficient. The fix initializes clock as well to avoid memory disclosures and informaiton leaks. Signed-off-by: Kangjie Lu Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191018044150.1899-1-kjlu@umn.edu commit 57a25a5f754ce27da2cfa6f413cfd366f878db76 Author: Kangjie Lu Date: Thu Oct 17 23:29:53 2019 -0500 gma/gma500: fix a memory disclosure bug due to uninitialized bytes `best_clock` is an object that may be sent out. Object `clock` contains uninitialized bytes that are copied to `best_clock`, which leads to memory disclosure and information leak. Signed-off-by: Kangjie Lu Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191018042953.31099-1-kjlu@umn.edu commit af44d180e3de4cb411ce327b147ea3513f0bbbcb Author: Anson Huang Date: Tue Oct 22 16:33:19 2019 +0800 cpufreq: imx-cpufreq-dt: Correct i.MX8MN's default speed grade value i.MX8MN has different speed grade definition compared to i.MX8MQ/i.MX8MM, when fuses are NOT written, the default speed_grade should be set to minimum available OPP defined in DT which is 1.2GHz, the corresponding speed_grade value should be 0xb. Fixes: 5b8010ba70d5 ("cpufreq: imx-cpufreq-dt: Add i.MX8MN support") Signed-off-by: Anson Huang Signed-off-by: Viresh Kumar commit bfd6e6e6c5d2ee43a3d9902b36e01fc7527ebb27 Author: Hui Peng Date: Sat Oct 19 14:42:23 2019 +0300 ath10k: Fix a NULL-ptr-deref bug in ath10k_usb_alloc_urb_from_pipe The `ar_usb` field of `ath10k_usb_pipe_usb_pipe` objects are initialized to point to the containing `ath10k_usb` object according to endpoint descriptors read from the device side, as shown below in `ath10k_usb_setup_pipe_resources`: for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { endpoint = &iface_desc->endpoint[i].desc; // get the address from endpoint descriptor pipe_num = ath10k_usb_get_logical_pipe_num(ar_usb, endpoint->bEndpointAddress, &urbcount); ...... // select the pipe object pipe = &ar_usb->pipes[pipe_num]; // initialize the ar_usb field pipe->ar_usb = ar_usb; } The driver assumes that the addresses reported in endpoint descriptors from device side to be complete. If a device is malicious and does not report complete addresses, it may trigger NULL-ptr-deref `ath10k_usb_alloc_urb_from_pipe` and `ath10k_usb_free_urb_to_pipe`. This patch fixes the bug by preventing potential NULL-ptr-deref. Signed-off-by: Hui Peng Reported-by: Hui Peng Reported-by: Mathias Payer Reviewed-by: Greg Kroah-Hartman [groeck: Add driver tag to subject, fix build warning] Signed-off-by: Guenter Roeck Signed-off-by: Kalle Valo commit 0eeb91ade90ce06d2fa1e2fcb55e3316b64c203c Author: Chris Chiu Date: Wed Oct 16 09:54:08 2019 +0800 rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot The RTL8723BU has problems connecting to AP after each warm reboot. Sometimes it returns no scan result, and in most cases, it fails the authentication for unknown reason. However, it works totally fine after cold reboot. Compare the value of register SYS_CR and SYS_CLK_MAC_CLK_ENABLE for cold reboot and warm reboot, the registers imply that the MAC is already powered and thus some procedures are skipped during driver initialization. Double checked the vendor driver, it reads the SYS_CR and SYS_CLK_MAC_CLK_ENABLE also but doesn't skip any during initialization based on them. This commit only tells the RTL8723BU to do full initialization without checking MAC status. Signed-off-by: Chris Chiu Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo commit 6689f0f4bb14e50917ba42eb9b41c25e0184970c Author: Mathias Kresin Date: Sun Jul 7 16:22:01 2019 +0200 usb: dwc2: use a longer core rest timeout in dwc2_core_reset() Testing on different generations of Lantiq MIPS SoC based boards, showed that it takes up to 1500 us until the core reset bit is cleared. The driver from the vendor SDK (ifxhcd) uses a 1 second timeout. Use the same timeout to fix wrong hang detections and make the driver work for Lantiq MIPS SoCs. At least till kernel 4.14 the hanging reset only caused a warning but the driver was probed successful. With kernel 4.19 errors out with EBUSY. Cc: linux-stable # 4.19+ Signed-off-by: Mathias Kresin Signed-off-by: Felipe Balbi commit a9a367d0ade8ed3b8690a5c4b136454c541784ba Author: Markus Elfring Date: Thu Sep 19 15:47:24 2019 +0200 usb: gadget: udc: lpc32xx: Use devm_platform_ioremap_resource() in lpc32xx_udc_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Felipe Balbi commit 5a15007747518a6f26481c4b001c4c143d75c8a5 Author: Colin Ian King Date: Fri Sep 27 09:50:31 2019 +0100 USB: gadget: udc: clean up an indentation issue There is a statement that is indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi commit 1cbfb8c4f62d667f6b8b3948949737edb92992cc Author: Joel Stanley Date: Mon Sep 30 22:44:34 2019 +0930 usb: gadget: Quieten gadget config message On a system that often re-configures a USB gadget device the kernel log is filled with: configfs-gadget gadget: high-speed config #1: c Reduce the verbosity of this print to debug. Signed-off-by: Joel Stanley Signed-off-by: Felipe Balbi commit b049e03ca57f238e74a79e44ffc85904db465e72 Author: Geert Uytterhoeven Date: Tue Oct 1 20:11:09 2019 +0200 phy: renesas: rcar-gen3-usb2: Use platform_get_irq_optional() for optional irq As platform_get_irq() now prints an error when the interrupt does not exist, a scary warning may be printed for an optional interrupt: phy_rcar_gen3_usb2 ee0a0200.usb-phy: IRQ index 0 not found Fix this by calling platform_get_irq_optional() instead. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Reviewed-by: Stephen Boyd Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven Signed-off-by: Felipe Balbi commit e804cd46b2a214ae5e02e20daf591934a23a66c6 Author: zhengbin Date: Wed Oct 9 16:40:34 2019 +0800 usb: gadget: Remove set but not used variable 'opts' in msg_do_config Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/gadget/legacy/mass_storage.c: In function msg_do_config: drivers/usb/gadget/legacy/mass_storage.c:108:19: warning: variable opts set but not used [-Wunused-but-set-variable] It is not used since commit f78bbcae86e6 ("usb: f_mass_storage: test whether thread is running before starting another") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Felipe Balbi commit 6973dbdd1c1f34cebf2b93ad0c9a1aba84c9c04a Author: zhengbin Date: Wed Oct 9 16:40:33 2019 +0800 usb: gadget: Remove set but not used variable 'opts' in acm_ms_do_config Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/gadget/legacy/acm_ms.c: In function acm_ms_do_config: drivers/usb/gadget/legacy/acm_ms.c:108:19: warning: variable opts set but not used [-Wunused-but-set-variable] It is not used since commit f78bbcae86e6 ("usb: f_mass_storage: test whether thread is running before starting another") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Felipe Balbi commit e6fda6e69db26670f9f09b1742525329e477304a Author: Chunfeng Yun Date: Wed Oct 9 17:04:59 2019 +0800 usb: mtu3: add a new function to do status stage Exact a new static function to do status stage Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi commit 3654aaa922f30dd380569d60996c92f32c2d2347 Author: Peter Chen Date: Mon Oct 14 14:39:51 2019 +0800 usb: gadget: configfs: fix concurrent issue between composite APIs We meet several NULL pointer issues if configfs_composite_unbind and composite_setup (or composite_disconnect) are running together. These issues occur when do the function switch stress test, the configfs_compsoite_unbind is called from user mode by echo "" to /sys/../UDC entry, and meanwhile, the setup interrupt or disconnect interrupt occurs by hardware. The composite_setup will get the cdev from get_gadget_data, but configfs_composite_unbind will set gadget data as NULL, so the NULL pointer issue occurs. This concurrent is hard to reproduce by native kernel, but can be reproduced by android kernel. In this commit, we introduce one spinlock belongs to structure gadget_info since we can't use the same spinlock in usb_composite_dev due to exclusive running together between composite_setup and configfs_composite_unbind. And one bit flag 'unbind' to indicate the code is at unbind routine, this bit is needed due to we release the lock at during configfs_composite_unbind sometimes, and composite_setup may be run at that time. Several oops: oops 1: android_work: sent uevent USB_STATE=CONNECTED configfs-gadget gadget: super-speed config #1: b android_work: sent uevent USB_STATE=CONFIGURED init: Received control message 'start' for 'adbd' from pid: 3515 (system_server) Unable to handle kernel NULL pointer dereference at virtual address 0000002a init: Received control message 'stop' for 'adbd' from pid: 3375 (/vendor/bin/hw/android.hardware.usb@1.1-servic) Mem abort info: Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgd = ffff8008f1b7f000 [000000000000002a] *pgd=0000000000000000 Internal error: Oops: 96000004 [#1] PREEMPT SMP Modules linked in: CPU: 4 PID: 2457 Comm: irq/125-5b11000 Not tainted 4.14.98-07846-g0b40a9b-dirty #16 Hardware name: Freescale i.MX8QM MEK (DT) task: ffff8008f2a98000 task.stack: ffff00000b7b8000 PC is at composite_setup+0x44/0x1508 LR is at android_setup+0xb8/0x13c pc : [] lr : [] pstate: 800001c5 sp : ffff00000b7bbb80 x29: ffff00000b7bbb80 x28: ffff8008f2a3c010 x27: 0000000000000001 x26: 0000000000000000 [1232/1897] audit: audit_lost=25791 audit_rate_limit=5 audit_backlog_limit=64 x25: 00000000ffffffa1 x24: ffff8008f2a3c010 audit: rate limit exceeded x23: 0000000000000409 x22: ffff000009c8e000 x21: ffff8008f7a8b428 x20: ffff00000afae000 x19: ffff0000089ff000 x18: 0000000000000000 x17: 0000000000000000 x16: ffff0000082b7c9c x15: 0000000000000000 x14: f1866f5b952aca46 x13: e35502e30d44349c x12: 0000000000000008 x11: 0000000000000008 x10: 0000000000000a30 x9 : ffff00000b7bbd00 x8 : ffff8008f2a98a90 x7 : ffff8008f27a9c90 x6 : 0000000000000001 x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000006 x1 : ffff0000089ff8d0 x0 : 732a010310b9ed00 X7: 0xffff8008f27a9c10: 9c10 00000002 00000000 00000001 00000000 13110000 ffff0000 00000002 00208040 9c30 00000000 00000000 00000000 00000000 00000000 00000005 00000029 00000000 9c50 00051778 00000001 f27a8e00 ffff8008 00000005 00000000 00000078 00000078 9c70 00000078 00000000 09031d48 ffff0000 00100000 00000000 00400000 00000000 9c90 00000001 00000000 00000000 00000000 00000000 00000000 ffefb1a0 ffff8008 9cb0 f27a9ca8 ffff8008 00000000 00000000 b9d88037 00000173 1618a3eb 00000001 9cd0 870a792a 0000002e 16188fe6 00000001 0000242b 00000000 00000000 00000000 using random self ethernet address 9cf0 019a4646 00000000 000547f3 00000000 ecfd6c33 00000002 00000000 using random host ethernet address 00000000 X8: 0xffff8008f2a98a10: 8a10 00000000 00000000 f7788d00 ffff8008 00000001 00000000 00000000 00000000 8a30 eb218000 ffff8008 f2a98000 ffff8008 f2a98000 ffff8008 09885000 ffff0000 8a50 f34df480 ffff8008 00000000 00000000 f2a98648 ffff8008 09c8e000 ffff0000 8a70 fff2c800 ffff8008 09031d48 ffff0000 0b7bbd00 ffff0000 0b7bbd00 ffff0000 8a90 080861bc ffff0000 00000000 00000000 00000000 00000000 00000000 00000000 8ab0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 8ad0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 8af0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 X21: 0xffff8008f7a8b3a8: b3a8 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 b3c8 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 b3e8 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 b408 00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000000 b428 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 b448 0053004d 00540046 00300031 00010030 eb07b520 ffff8008 20011201 00000003 b468 e418d109 0104404e 00010302 00000000 eb07b558 ffff8008 eb07b558 ffff8008 b488 f7a8b488 ffff8008 f7a8b488 ffff8008 f7a8b300 ffff8008 00000000 00000000 X24: 0xffff8008f2a3bf90: bf90 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 bfb0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 bfd0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 bff0 00000000 00000000 00000000 00000000 f76c8010 ffff8008 f76c8010 ffff8008 c010 00000000 00000000 f2a3c018 ffff8008 f2a3c018 ffff8008 08a067dc ffff0000 c030 f2a5a000 ffff8008 091c3650 ffff0000 f716fd18 ffff8008 f716fe30 ffff8008 c050 f2ce4a30 ffff8008 00000000 00000005 00000000 00000000 095d1568 ffff0000 c070 f76c8010 ffff8008 f2ce4b00 ffff8008 095cac68 ffff0000 f2a5a028 ffff8008 X28: 0xffff8008f2a3bf90: bf90 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 bfb0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 bfd0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 bff0 00000000 00000000 00000000 00000000 f76c8010 ffff8008 f76c8010 ffff8008 c010 00000000 00000000 f2a3c018 ffff8008 f2a3c018 ffff8008 08a067dc ffff0000 c030 f2a5a000 ffff8008 091c3650 ffff0000 f716fd18 ffff8008 f716fe30 ffff8008 c050 f2ce4a30 ffff8008 00000000 00000005 00000000 00000000 095d1568 ffff0000 c070 f76c8010 ffff8008 f2ce4b00 ffff8008 095cac68 ffff0000 f2a5a028 ffff8008 Process irq/125-5b11000 (pid: 2457, stack limit = 0xffff00000b7b8000) Call trace: Exception stack(0xffff00000b7bba40 to 0xffff00000b7bbb80) ba40: 732a010310b9ed00 ffff0000089ff8d0 0000000000000006 0000000000000000 ba60: 0000000000000001 0000000000000000 0000000000000001 ffff8008f27a9c90 ba80: ffff8008f2a98a90 ffff00000b7bbd00 0000000000000a30 0000000000000008 baa0: 0000000000000008 e35502e30d44349c f1866f5b952aca46 0000000000000000 bac0: ffff0000082b7c9c 0000000000000000 0000000000000000 ffff0000089ff000 bae0: ffff00000afae000 ffff8008f7a8b428 ffff000009c8e000 0000000000000409 bb00: ffff8008f2a3c010 00000000ffffffa1 0000000000000000 0000000000000001 bb20: ffff8008f2a3c010 ffff00000b7bbb80 ffff000008a032fc ffff00000b7bbb80 bb40: ffff0000089ffb3c 00000000800001c5 ffff00000b7bbb80 732a010310b9ed00 bb60: ffffffffffffffff ffff0000080f777c ffff00000b7bbb80 ffff0000089ffb3c [] composite_setup+0x44/0x1508 [] android_setup+0xb8/0x13c [] cdns3_ep0_delegate_req+0x44/0x70 [] cdns3_check_ep0_interrupt_proceed+0x33c/0x654 [] cdns3_device_thread_irq_handler+0x4b0/0x4bc [] cdns3_thread_irq+0x48/0x68 [] irq_thread_fn+0x28/0x88 [] irq_thread+0x13c/0x228 [] kthread+0x104/0x130 [] ret_from_fork+0x10/0x18 oops2: composite_disconnect: Calling disconnect on a Gadget that is not connected android_work: did not send uevent (0 0 (null)) init: Received control message 'stop' for 'adbd' from pid: 3359 (/vendor/bin/hw/android.hardware.usb@1.1-service.imx) init: Sending signal 9 to service 'adbd' (pid 22343) process group... ------------[ cut here ]------------ audit: audit_lost=180038 audit_rate_limit=5 audit_backlog_limit=64 audit: rate limit exceeded WARNING: CPU: 0 PID: 3468 at kernel_imx/drivers/usb/gadget/composite.c:2009 composite_disconnect+0x80/0x88 Modules linked in: CPU: 0 PID: 3468 Comm: HWC-UEvent-Thre Not tainted 4.14.98-07846-g0b40a9b-dirty #16 Hardware name: Freescale i.MX8QM MEK (DT) task: ffff8008f2349c00 task.stack: ffff00000b0a8000 PC is at composite_disconnect+0x80/0x88 LR is at composite_disconnect+0x80/0x88 pc : [] lr : [] pstate: 600001c5 sp : ffff000008003dd0 x29: ffff000008003dd0 x28: ffff8008f2349c00 x27: ffff000009885018 x26: ffff000008004000 Timeout for IPC response! x25: ffff000009885018 x24: ffff000009c8e280 x23: ffff8008f2d98010 x22: 00000000000001c0 x21: ffff8008f2d98394 x20: ffff8008f2d98010 x19: 0000000000000000 x18: 0000e3956f4f075a fxos8700 4-001e: i2c block read acc failed x17: 0000e395735727e8 x16: ffff00000829f4d4 x15: ffffffffffffffff x14: 7463656e6e6f6320 x13: 746f6e2009090920 x12: 7369207461687420 x11: 7465676461472061 x10: 206e6f207463656e x9 : 6e6f637369642067 x8 : ffff000009c8e280 x7 : ffff0000086ca6cc x6 : ffff000009f15e78 x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffffffffffffffff x2 : c3f28b86000c3900 x1 : c3f28b86000c3900 x0 : 000000000000004e X20: 0xffff8008f2d97f90: 7f90 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7fb0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 libprocessgroup: Failed to kill process cgroup uid 0 pid 22343 in 215ms, 1 processes remain 7fd0 Timeout for IPC response! 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 using random self ethernet address 7ff0 00000000 00000000 00000000 00000000 f76c8010 ffff8008 f76c8010 ffff8008 8010 00000100 00000000 f2d98018 ffff8008 f2d98018 ffff8008 08a067dc using random host ethernet address ffff0000 8030 f206d800 ffff8008 091c3650 ffff0000 f7957b18 ffff8008 f7957730 ffff8008 8050 f716a630 ffff8008 00000000 00000005 00000000 00000000 095d1568 ffff0000 8070 f76c8010 ffff8008 f716a800 ffff8008 095cac68 ffff0000 f206d828 ffff8008 X21: 0xffff8008f2d98314: 8314 ffff8008 00000000 00000000 00000000 00000000 00000000 00000000 00000000 8334 00000000 00000000 00000000 00000000 00000000 08a04cf4 ffff0000 00000000 8354 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 8374 00000000 00000000 00000000 00001001 00000000 00000000 00000000 00000000 8394 e4bbe4bb 0f230000 ffff0000 0afae000 ffff0000 ae001000 00000000 f206d400 Timeout for IPC response! 83b4 ffff8008 00000000 00000000 f7957b18 ffff8008 f7957718 ffff8008 f7957018 83d4 ffff8008 f7957118 ffff8008 f7957618 ffff8008 f7957818 ffff8008 f7957918 83f4 ffff8008 f7957d18 ffff8008 00000000 00000000 00000000 00000000 00000000 X23: 0xffff8008f2d97f90: 7f90 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7fb0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7fd0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7ff0 00000000 00000000 00000000 00000000 f76c8010 ffff8008 f76c8010 ffff8008 8010 00000100 00000000 f2d98018 ffff8008 f2d98018 ffff8008 08a067dc ffff0000 8030 f206d800 ffff8008 091c3650 ffff0000 f7957b18 ffff8008 f7957730 ffff8008 8050 f716a630 ffff8008 00000000 00000005 00000000 00000000 095d1568 ffff0000 8070 f76c8010 ffff8008 f716a800 ffff8008 095cac68 ffff0000 f206d828 ffff8008 X28: 0xffff8008f2349b80: 9b80 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9ba0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9bc0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9be0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9c00 00000022 00000000 ffffffff ffffffff 00010001 00000000 00000000 00000000 9c20 0b0a8000 ffff0000 00000002 00404040 00000000 00000000 00000000 00000000 9c40 00000001 00000000 00000001 00000000 001ebd44 00000001 f390b800 ffff8008 9c60 00000000 00000001 00000070 00000070 00000070 00000000 09031d48 ffff0000 Call trace: Exception stack(0xffff000008003c90 to 0xffff000008003dd0) 3c80: 000000000000004e c3f28b86000c3900 3ca0: c3f28b86000c3900 ffffffffffffffff 0000000000000000 0000000000000000 3cc0: ffff000009f15e78 ffff0000086ca6cc ffff000009c8e280 6e6f637369642067 3ce0: 206e6f207463656e 7465676461472061 7369207461687420 746f6e2009090920 3d00: 7463656e6e6f6320 ffffffffffffffff ffff00000829f4d4 0000e395735727e8 3d20: 0000e3956f4f075a 0000000000000000 ffff8008f2d98010 ffff8008f2d98394 3d40: 00000000000001c0 ffff8008f2d98010 ffff000009c8e280 ffff000009885018 3d60: ffff000008004000 ffff000009885018 ffff8008f2349c00 ffff000008003dd0 3d80: ffff0000089ff9b0 ffff000008003dd0 ffff0000089ff9b0 00000000600001c5 3da0: ffff8008f33f2cd8 0000000000000000 0000ffffffffffff 0000000000000000 init: Received control message 'start' for 'adbd' from pid: 3359 (/vendor/bin/hw/android.hardware.usb@1.1-service.imx) 3dc0: ffff000008003dd0 ffff0000089ff9b0 [] composite_disconnect+0x80/0x88 [] android_disconnect+0x3c/0x68 [] cdns3_device_irq_handler+0xfc/0x2c8 [] cdns3_irq+0x44/0x94 [] __handle_irq_event_percpu+0x60/0x24c [] handle_irq_event+0x58/0xc0 [] handle_fasteoi_irq+0x98/0x180 [] generic_handle_irq+0x24/0x38 [] __handle_domain_irq+0x60/0xac [] gic_handle_irq+0xd4/0x17c Cc: Andrzej Pietrasiewicz Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 0b8b1a1fede01eb727646e70a1b4872cdbd327aa Author: Jayshri Pawar Date: Mon Oct 21 07:35:00 2019 +0100 usb: gadget: f_tcm: Provide support to get alternate setting in tcm function Providing tcm_get_alt in tcm function to support Bulk only protocol and USB Attached SCSI protocol Signed-off-by: Jayshri Pawar Signed-off-by: Felipe Balbi commit 75eaa498c99eebf9f9237656f69469e50197cc0b Author: Nikhil Badola Date: Mon Oct 21 18:21:53 2019 +0800 usb: gadget: Correct NULL pointer checking in fsl gadget Correct NULL pointer checking for endpoint descriptor before it gets dereferenced Signed-off-by: Nikhil Badola Signed-off-by: Ran Wang Reviewed-by: Peter Chen Signed-off-by: Felipe Balbi commit eb23c8b4fd9805ceba7725e7069d20d60e20e377 Author: Nikhil Badola Date: Mon Oct 21 18:21:52 2019 +0800 usb: fsl: Remove unused variable Remove unused variable td_complete Signed-off-by: Nikhil Badola Reviewed-by: Ran Wang Reviewed-by: Peter Chen Signed-off-by: Felipe Balbi commit 15ac1d99b84578e6fac804bffcb5bec8d0424d77 Author: Andrey Konovalov Date: Mon Oct 21 16:20:59 2019 +0200 USB: dummy-hcd: use usb_urb_dir_in instead of usb_pipein Commit fea3409112a9 ("USB: add direction bit to urb->transfer_flags") has added a usb_urb_dir_in() helper function that can be used to determine the direction of the URB. With that patch USB_DIR_IN control requests with wLength == 0 are considered out requests by real USB HCDs. This patch changes dummy-hcd to use the usb_urb_dir_in() helper to match that behavior. Signed-off-by: Andrey Konovalov Signed-off-by: Felipe Balbi commit 1bff4a4e66b91ef55ef0265944d01d13be0eae43 Author: Andrey Konovalov Date: Mon Oct 21 16:20:58 2019 +0200 USB: dummy-hcd: increase max number of devices to 32 When fuzzing the USB subsystem with syzkaller, we currently use 8 testing processes within one VM. To isolate testing processes from one another it is desirable to assign a dedicated USB bus to each of those, which means we need at least 8 Dummy UDC/HCD devices. This patch increases the maximum number of Dummy UDC/HCD devices to 32 (more than 8 in case we need more of them in the future). Signed-off-by: Andrey Konovalov Signed-off-by: Felipe Balbi commit f2b06c953911276eaa25259f9b77e717d78392b2 Author: Veeraiyan Chidambaram Date: Mon Sep 9 12:54:41 2019 +0200 usb: renesas_usbhs: add suspend event support in gadget mode When R-Car Gen3 USB 2.0 is in Gadget mode, if host is detached an interrupt will be generated and Suspended state bit is set in interrupt status register. Interrupt handler will call driver->suspend(composite_suspend) if suspended state bit is set. composite_suspend will call ffs_func_suspend which will post FUNCTIONFS_SUSPEND and will be consumed by user space application via /dev/ep0. To be able to detect host detach, extend the DVSQ_MASK to cover the Suspended bit of the DVSQ[2:0] bitfield from the Interrupt Status Register 0 (INTSTS0) register and perform appropriate action in the DVST interrupt handler (usbhsg_irq_dev_state). Without this commit, disconnection of the phone from R-Car H3 ES2.0 Salvator-X CN9 port is not recognized and reverse role switch does not not happen. If phone is connected again it does not enumerate. With this commit, disconnection will be recognized and reverse role switch will happen by a user space application. If phone is connected again it will enumerate properly and will become visible in the output of 'lsusb'. Signed-off-by: Veeraiyan Chidambaram Signed-off-by: Eugeniu Rosca Signed-off-by: Felipe Balbi commit d2802865f7e5230778567e339510cae05eec1706 Author: Eugeniu Rosca Date: Mon Sep 9 12:54:40 2019 +0200 usb: renesas_usbhs: simplify usbhs_status_get_device_state() Similar to usbhs_status_get_ctrl_stage(), *_get_device_state() is not supposed to return any error code since its return value is the DVSQ bitfield of the INTSTS0 register. According to SoC HW manual rev1.00, every single value of DVSQ[2:0] is valid and none is an error: ----8<---- Device State 000: Powered state 001: Default state 010: Address state 011: Configuration state 1xx: Suspended state ----8<---- Hence, simplify the function body. The motivation behind dropping the switch/case construct is being able to implement reading the suspended state. The latter (based on the above DVSQ[2:0] description) doesn't have a unique value, but is rather a list of states (which makes switch/case less suitable for reading/validating it): 100: (Suspended) Powered state 101: (Suspended) Default state 110: (Suspended) Address state 111: (Suspended) Configuration state Signed-off-by: Eugeniu Rosca Signed-off-by: Veeraiyan Chidambaram Signed-off-by: Felipe Balbi commit 8b20d00f0f089b72f0a1e08d602a29f874bb0a35 Author: Eugeniu Rosca Date: Mon Sep 9 12:54:39 2019 +0200 usb: renesas_usbhs: enable DVSE interrupt Commit [1] enabled the possibility of checking the DVST (Device State Transition) bit of INTSTS0 (Interrupt Status Register 0) and calling the irq_dev_state() handler if the DVST bit is set. But neither commit [1] nor commit [2] actually enabled the DVSE (Device State Transition Interrupt Enable) bit in the INTENB0 (Interrupt Enable Register 0). As a consequence, irq_dev_state() handler is getting called as a side effect of other (non-DVSE) interrupts being fired, which definitely can't be relied upon, if DVST notifications are of any value. Why this doesn't hurt is because usbhsg_irq_dev_state() currently doesn't do much except of a dev_dbg(). Once more work is added to the handler (e.g. detecting device "Suspended" state and notifying other USB gadget components about it), enabling DVSE becomes a hard requirement. Do it in a standalone commit for better visibility and clear explanation. [1] f1407d5 ("usb: renesas_usbhs: Add Renesas USBHS common code") [2] 2f98382 ("usb: renesas_usbhs: Add Renesas USBHS Gadget") Signed-off-by: Eugeniu Rosca Signed-off-by: Veeraiyan Chidambaram Signed-off-by: Felipe Balbi commit e961c47e66f1f03ebfacde4360f240757bdea7ac Author: Veeraiyan Chidambaram Date: Thu Sep 5 11:17:54 2019 +0200 usb: gadget: udc: renesas_usb3: add suspend event support In R-Car Gen3 USB 3.0 Function, if host is detached an interrupt will be generated and Suspended state bit is set in interrupt status register. Interrupt handler will call driver->suspend(composite_suspend) if suspended state bit is set. composite_suspend will call ffs_func_suspend which will post FUNCTIONFS_SUSPEND and will be consumed by user space application via /dev/ep0. To be able to detect the host detach, USB_INT_1_B2_SPND to cover the Suspended bit of the B2_SPND_OUT[9] from the USB Status Register (USB_STA) register and perform appropriate action in the usb3_irq_epc_int_1 function. Without this commit, disconnection of the phone from R-Car H3 ES2.0 Salvator-X CN11 port is not recognized and reverse role switch does not happen. If phone is connected again it does not enumerate. With this commit, disconnection will be recognized and reverse role switch will happen by a user space application. If phone is connected again it will enumerate properly and will become visible in the output of 'lsusb'. Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Veeraiyan Chidambaram Signed-off-by: Felipe Balbi commit 6a3893bfbe0266c5703ed8d1e0487ac841c50c18 Author: YueHaibing Date: Wed Sep 4 17:50:22 2019 +0800 usb: gadget: s3c-hsudc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit e17d87668ecddfd6f7ebbc784b4008e74d4e017c Author: YueHaibing Date: Wed Sep 4 17:48:36 2019 +0800 usb: gadget: renesas_usb3: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit 195ad9c36d82527aed95ffaba35b8ce95ee5ff61 Author: YueHaibing Date: Wed Sep 4 17:47:38 2019 +0800 usb: gadget: r8a66597-udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit e7705d269b28f718ff57a730ec5bc505fe8ee6f0 Author: YueHaibing Date: Wed Sep 4 17:45:57 2019 +0800 usb: gadget: pxa27x_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit 623128070e78f616ed57f55702a9cfc726b88925 Author: YueHaibing Date: Wed Sep 4 17:42:22 2019 +0800 usb: gadget: pxa25x_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit 60b6465be786441a24d824d9ab4cad63fcf8a37e Author: YueHaibing Date: Wed Sep 4 17:40:33 2019 +0800 usb: gadget: gr_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit 586a5fd60c3ca6a6d0056966651a4e063f4d556e Author: YueHaibing Date: Wed Sep 4 17:33:35 2019 +0800 usb: bdc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit 4496bf250539a1dbe8b2c3662cc77cf74bc8cb5a Author: YueHaibing Date: Wed Sep 4 17:32:27 2019 +0800 usb: gadget: bcm63xx_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit 2e78dd5147061709385b01579c0a6a1bfb9791d6 Author: YueHaibing Date: Wed Sep 4 17:02:39 2019 +0800 usb: gadget: at91_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit 836283dd7bffdde80734d7a2f45dd35c40d0065f Author: YueHaibing Date: Wed Sep 4 16:50:45 2019 +0800 usb: renesas_usbhs: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit 53490989ff91f5826bbb12190dffbb1a32aa1ea0 Author: YueHaibing Date: Wed Sep 4 16:48:27 2019 +0800 usb: phy: mxs: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit b45ca31a6a4c9b342d7d2ced493aae9cd31d6308 Author: YueHaibing Date: Wed Sep 4 16:45:58 2019 +0800 usb: phy: keystone: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit c6561082b833afde1469346c7e65e0e6b04fc322 Author: Michał Mirosław Date: Sat Aug 10 10:42:53 2019 +0200 usb: gadget: u_serial: use mutex for serialising open()s Remove home-made waiting mechanism from gs_open() and rely on portmaster's mutex to do the job. Note: This releases thread waiting on close() when another thread open()s simultaneously. Signed-off-by: Michał Mirosław Signed-off-by: Felipe Balbi commit ef9b457d0dd2438b492d773c9e98c3d1bd9ec037 Author: Michał Mirosław Date: Sat Aug 10 10:42:52 2019 +0200 usb: gadget: u_serial: diagnose missed console messages Insert markers in console stream marking places where data is missing. This makes the hole in the data stand out clearly instead of glueing together unrelated messages. Example output as seen from USB host side: [ 0.064078] pinctrl core: registered pin 16 (UART3_RTS_N PC0) on 70000868.pinmux [ 0.064130] pinctrl [missed 114987 bytes] [ 4.302299] udevd[134]: starting version 3.2.5 [ 4.306845] random: udevd: uninitialized urandom read (16 bytes read) Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroah-Hartman Signed-off-by: Felipe Balbi commit bd25a14edb75038f6a177ac566ba2e6d7a2439be Author: Michał Mirosław Date: Sat Aug 10 10:42:52 2019 +0200 usb: gadget: legacy/serial: allow dynamic removal Legacy serial USB gadget is still useful as an early console, before userspace is up. Later it could be replaced with proper configfs-configured composite gadget - that use case is enabled by this patch. Signed-off-by: Michał Mirosław Signed-off-by: Felipe Balbi commit d7cb8fb7aa7dc47d1b751c17c15672068667053c Author: Michał Mirosław Date: Sat Aug 10 10:42:51 2019 +0200 usb: gadget: u_serial: allow more console gadget ports Allow configuring more than one console using USB serial or ACM gadget. By default, only first (ttyGS0) is a console, but this may be changed using function's new "console" attribute. Signed-off-by: Michał Mirosław Signed-off-by: Felipe Balbi commit b417343c6a0f50487d59aef975da0a6c7b69d348 Author: Michał Mirosław Date: Sat Aug 10 10:42:50 2019 +0200 usb: gadget: u_serial: make OBEX port not a console Prevent OBEX serial port from ever becoming a console. Console messages will definitely break the protocol, and since you have to instantiate the port making it explicitly for OBEX, there is no point in allowing console to break it by mistake. Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroah-Hartman Signed-off-by: Felipe Balbi commit fe1ea63ad8064d8518b5e3fd1a6869b4463b5c73 Author: Michał Mirosław Date: Sat Aug 10 10:42:49 2019 +0200 usb: gadget: u_serial: reimplement console support Rewrite console support to fix a few shortcomings of the old code preventing its use with multiple ports. This removes some duplicated code and replaces a custom kthread with simpler workqueue item. Only port ttyGS0 gets to be a console for now. Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroah-Hartman Tested-by: Ladislav Michl Signed-off-by: Felipe Balbi commit daf82bd24e308c5a83758047aff1bd81edda4f11 Author: Michał Mirosław Date: Sat Aug 10 10:42:48 2019 +0200 usb: gadget: u_serial: add missing port entry locking gserial_alloc_line() misses locking (for a release barrier) while resetting port entry on TTY allocation failure. Fix this. Cc: stable@vger.kernel.org Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroah-Hartman Tested-by: Ladislav Michl Signed-off-by: Felipe Balbi commit 9ba3aca8fe82318805709036bd50bee64570088b Author: Thinh Nguyen Date: Fri Aug 9 12:15:52 2019 -0700 usb: dwc3: Disable phy suspend after power-on reset For DRD controllers, the programming guide recommended that GUSB3PIPECTL.SUSPENDABLE and GUSB2PHYCFG.SUSPHY to be cleared after power-on reset and only set after the controller initialization is completed. This can be done after device soft-reset in dwc3_core_init(). This patch makes sure to clear GUSB3PIPECTL.SUSPENDABLE and GUSB2PHYCFG.SUSPHY before core initialization and only set them after the device soft-reset is completed. Reference: DWC_usb3 3.30a and DWC_usb31 1.90a programming guide section 1.2.49 and 1.2.45 Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 55d7004299eb917767761f01a208d50afad4f535 Author: Nicholas Piggin Date: Wed Oct 2 16:00:25 2019 +1000 KVM: PPC: Book3S HV: Reject mflags=2 (LPCR[AIL]=2) ADDR_TRANS_MODE mode AIL=2 mode has no known users, so is not well tested or supported. Disallow guests from selecting this mode because it may become deprecated in future versions of the architecture. This policy decision is not left to QEMU because KVM support is required for AIL=2 (when injecting interrupts). Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras commit 6a13cb0c376abb436d060b989018257963656d0c Author: Nicholas Piggin Date: Wed Oct 2 16:00:24 2019 +1000 KVM: PPC: Book3S HV: Implement LPCR[AIL]=3 mode for injected interrupts kvmppc_inject_interrupt does not implement LPCR[AIL]!=0 modes, which can result in the guest receiving interrupts as if LPCR[AIL]=0 contrary to the ISA. In practice, Linux guests cope with this deviation, but it should be fixed. Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras commit 268f4ef9954cec198cd6772caadf453bcaed3e5a Author: Nicholas Piggin Date: Wed Oct 2 16:00:23 2019 +1000 KVM: PPC: Book3S HV: Reuse kvmppc_inject_interrupt for async guest delivery This consolidates the HV interrupt delivery logic into one place. Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras commit 87a45e07a5abfec4d6b0e8356718f8919d0a3c20 Author: Nicholas Piggin Date: Wed Oct 2 16:00:22 2019 +1000 KVM: PPC: Book3S: Replace reset_msr mmu op with inject_interrupt arch op reset_msr sets the MSR for interrupt injection, but it's cleaner and more flexible to provide a single op to set both MSR and PC for the interrupt. Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras commit 9ee6471eb9d43114ba4f0de3e0f483bf6fb2a906 Author: Nicholas Piggin Date: Wed Oct 2 16:00:21 2019 +1000 KVM: PPC: Book3S: Define and use SRR1_MSR_BITS Acked-by: Paul Mackerras Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras commit efe5ddcae496b7c7307805d31815df23ba69bf7c Author: Greg Kurz Date: Fri Sep 27 13:54:07 2019 +0200 KVM: PPC: Book3S HV: XIVE: Allow userspace to set the # of VPs Add a new attribute to both XIVE and XICS-on-XIVE KVM devices so that userspace can tell how many interrupt servers it needs. If a VM needs less than the current default of KVM_MAX_VCPUS (2048), we can allocate less VPs in OPAL. Combined with a core stride (VSMT) that matches the number of guest threads per core, this may substantially increases the number of VMs that can run concurrently with an in-kernel XIVE device. Since the legacy XIVE KVM device is exposed to userspace through the XICS KVM API, a new attribute group is added to it for this purpose. While here, fix the syntax of the existing KVM_DEV_XICS_GRP_SOURCES in the XICS documentation. Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Signed-off-by: Paul Mackerras commit 062cfab7069fcb55d77ad5552f29e24178728fa2 Author: Greg Kurz Date: Fri Sep 27 13:54:01 2019 +0200 KVM: PPC: Book3S HV: XIVE: Make VP block size configurable The XIVE VP is an internal structure which allow the XIVE interrupt controller to maintain the interrupt context state of vCPUs non dispatched on HW threads. When a guest is started, the XIVE KVM device allocates a block of XIVE VPs in OPAL, enough to accommodate the highest possible vCPU id KVM_MAX_VCPU_ID (16384) packed down to KVM_MAX_VCPUS (2048). With a guest's core stride of 8 and a threading mode of 1 (QEMU's default), a VM must run at least 256 vCPUs to actually need such a range of VPs. A POWER9 system has a limited XIVE VP space : 512k and KVM is currently wasting this HW resource with large VP allocations, especially since a typical VM likely runs with a lot less vCPUs. Make the size of the VP block configurable. Add an nr_servers field to the XIVE structure and a function to set it for this purpose. Split VP allocation out of the device create function. Since the VP block isn't used before the first vCPU connects to the XIVE KVM device, allocation is now performed by kvmppc_xive_connect_vcpu(). This gives the opportunity to set nr_servers in between: kvmppc_xive_create() / kvmppc_xive_native_create() . . kvmppc_xive_set_nr_servers() . . kvmppc_xive_connect_vcpu() / kvmppc_xive_native_connect_vcpu() The connect_vcpu() functions check that the vCPU id is below nr_servers and if it is the first vCPU they allocate the VP block. This is protected against a concurrent update of nr_servers by kvmppc_xive_set_nr_servers() with the xive->lock mutex. Also, the block is allocated once for the device lifetime: nr_servers should stay constant otherwise connect_vcpu() could generate a boggus VP id and likely crash OPAL. It is thus forbidden to update nr_servers once the block is allocated. If the VP allocation fail, return ENOSPC which seems more appropriate to report the depletion of system wide HW resource than ENOMEM or ENXIO. A VM using a stride of 8 and 1 thread per core with 32 vCPUs would hence only need 256 VPs instead of 2048. If the stride is set to match the number of threads per core, this goes further down to 32. This will be exposed to userspace by a subsequent patch. Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Signed-off-by: Paul Mackerras commit 8db29ea2391cc6f5b73cc9c04b2dee4409b9fc05 Author: Greg Kurz Date: Fri Sep 27 13:53:55 2019 +0200 KVM: PPC: Book3S HV: XIVE: Compute the VP id in a common helper Reduce code duplication by consolidating the checking of vCPU ids and VP ids to a common helper used by both legacy and native XIVE KVM devices. And explain the magic with a comment. Signed-off-by: Greg Kurz Signed-off-by: Paul Mackerras commit 8a4e7597ba1e41030189b73cd7261f4383588d1d Author: Greg Kurz Date: Fri Sep 27 13:53:49 2019 +0200 KVM: PPC: Book3S HV: XIVE: Show VP id in debugfs Print out the VP id of each connected vCPU, this allow to see: - the VP block base in which OPAL encodes information that may be useful when debugging - the packed vCPU id which may differ from the raw vCPU id if the latter is >= KVM_MAX_VCPUS (2048) Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Signed-off-by: Paul Mackerras commit e7d71c943040c23f2fd042033d319f56e84f845b Author: Greg Kurz Date: Fri Sep 27 13:53:38 2019 +0200 KVM: PPC: Book3S HV: XIVE: Set kvm->arch.xive when VPs are allocated If we cannot allocate the XIVE VPs in OPAL, the creation of a XIVE or XICS-on-XIVE device is aborted as expected, but we leave kvm->arch.xive set forever since the release method isn't called in this case. Any subsequent tentative to create a XIVE or XICS-on-XIVE for this VM will thus always fail (DoS). This is a problem for QEMU since it destroys and re-creates these devices when the VM is reset: the VM would be restricted to using the much slower emulated XIVE or XICS forever. As an alternative to adding rollback, do not assign kvm->arch.xive before making sure the XIVE VPs are allocated in OPAL. Cc: stable@vger.kernel.org # v5.2 Fixes: 5422e95103cf ("KVM: PPC: Book3S HV: XIVE: Replace the 'destroy' method by a 'release' method") Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Signed-off-by: Paul Mackerras commit f41c4989c8de1fa70aafe950abaf80c56a8b8712 Author: Leonardo Bras Date: Mon Sep 23 18:24:08 2019 -0300 KVM: PPC: E500: Replace current->mm by kvm->mm Given that in kvm_create_vm() there is: kvm->mm = current->mm; And that on every kvm_*_ioctl we have: if (kvm->mm != current->mm) return -EIO; I see no reason to keep using current->mm instead of kvm->mm. By doing so, we would reduce the use of 'global' variables on code, relying more in the contents of kvm struct. Signed-off-by: Leonardo Bras Signed-off-by: Paul Mackerras commit 258ed7d02843052d127df2264c8b342276ced18a Author: Leonardo Bras Date: Mon Sep 23 18:30:23 2019 -0300 KVM: PPC: Reduce calls to get current->mm by storing the value locally Reduces the number of calls to get_current() in order to get the value of current->mm by doing it once and storing the value, since it is not supposed to change inside the same process). Signed-off-by: Leonardo Bras Signed-off-by: Paul Mackerras commit f1b4a9217efd61d0b84c6dc404596c8519ff6f59 Merge: 400e91347e1d f3a36d469621 Author: Dave Airlie Date: Tue Oct 22 15:04:00 2019 +1000 Merge tag 'du-next-20191016' of git://linuxtv.org/pinchartl/media into drm-next - R-Car DU support for R8A774B1 SoC - R-Car DU fixes for H2 ES2.0 and later revisions Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20191015215116.GF19403@pendragon.ideasonboard.com commit 400e91347e1d05dd632a85f51c080fc00cf599c7 Merge: 89910e62009a 631005b255aa Author: Dave Airlie Date: Tue Oct 22 15:03:06 2019 +1000 Merge tag 'mediatek-drm-next-5.5' of https://github.com/ckhu-mediatek/linux.git-tags into drm-next Mediatek DRM next for Linux 5.5 This include mipi_tx, dsi, and partial crtc for MT8183 SoC. Signed-off-by: Dave Airlie From: CK Hu Link: https://patchwork.freedesktop.org/patch/msgid/1571103548.4416.6.camel@mtksdaap41 commit 3fc40449a06bc4510fd4eee4590af87917c47184 Author: Vinod Koul Date: Tue Oct 22 10:03:08 2019 +0530 soundwire: intel: use correct header for io calls Commit df72b7192119 ("soundwire: intel: add missing headers for cross-compilation") tried to fix cross compilation but erroneously used wrong header in one of the file. Fix it by using correct io.h header. Reported-by: kbuild test robot Fixes: df72b7192119 ("soundwire: intel: add missing headers for cross-compilation") Signed-off-by: Vinod Koul commit 89910e62009a9359e6302f7e036a0a4564869cca Merge: 7ed093602e0e ce53908bba6f Author: Dave Airlie Date: Tue Oct 22 13:51:04 2019 +1000 Merge tag 'drm-intel-next-2019-10-21' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - Introduce a versioning of the i915-perf uapi (Lionel) - Add support for perf configuration queries (Lionel) Allow listing perf configurations with IOCTL in addition to sysfs. This is useful in container usecases. - Allow dynamic reconfiguration of the OA stream (Chris) Allows the OA stream to be reconfigured between batch buffers, giving greater flexibility in sampling. - Allow holding preemption on filtered perf ctx Allow CAP_ADMIN to block pre-emption of a context to query performance counters without disturbances. Mesa changes: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/932 Cross-subsystem Changes: - drm-next backmerge for HDR DP changes https://lists.freedesktop.org/archives/dri-devel/2019-September/236453.html Driver Changes: - Add DC3CO sleep state for Tigerlake (Anshuman) - Tigerlake BCS engine support engine relative MMIO (Daniele) - Simplify the Tigerlake LRC register list for !RCS (Daniele) - Read SAGV block time from PCODE on Tigerlake (James) - Add 12 missing Tigerlake workarounds (Mika) - Enable DDI/Port G for Tigerlake (Khaled) - Avoid hang in tsg,vfe units by keeping l3 clocks ICL+(Mika) - Fix Bugzilla #111966: Favor last VBT child device (Ville) - Fix blue/black screen on boot due to broken gamma (Swati) - Add support of BT.2020 Colorimetry to DP MSA (Gwan-gyeong) - Attach colorspace property to DP connector (Gwan-gyeong) - Attach HDR metadata property to DP connector (Gwan-gyeong) - Base intel_memory_region support prep for local memory (Matt A) - Introduce Jasper Lake PCH (Matt R) - Support multiple GPUs in PMU (Tvrtko) - Fix MST oops due to MSA changes (Ville) - Refuse modes with hdisplay==4096 on pre-HSW DP (Ville) - Correct the PCH type in irq postinstall for JSP (Vivek) - Save Master transcoder in slave's crtc_state for Transcoder Port Sync (Manasi) - Enable TRANSCODER PORT SYNC for tiled displays across separate ports (Manasi) - HW state readout for transcoder port sync config (Manasi) - Enable master-slaves in trans port sync (Manasi) - In port sync mode disable slaves first then master (Manasi) - Fix port checks for MST support on gen >= 11 (Lucas) - Flush submission tasklet before waiting/retiring (Chris) - Flush tasklet submission before sleeping on i915_request_wait (Chris) - Object pin reference counting fixes (Chris, Matt A) - Clear semaphore immediately upon ELSP promotion (Chris) - Child device size remains unchanged through VBT 229 (Matt R) - Restore dropped 'interruptible' flag on retiring requests (Chris) - Treat a busy timeline as 'active' while waiting (Chris) - Clean up struct_mutex from perf (Chris) - Update locking around execlists->active (Chris) - Mark up expected execlist state during reset (Chris) - Remove cursor use of properties for coordinates (Maarten) - Only mark incomplete requests as -EIO on cancelling (Chris) - Add an rcu_barrier option to i915_drop_caches (Chris) - Replace perf global wakeref tracking with engine-pm (Chris) - Prevent merging requests with conflicting flags (Chris) - Allow for CS OA configs to be created lazily (Lionel) - Implement active wait for noa configurations (Lionel) - Execute OA configuration from command stream (Lionel) - Prefer using the pinned_ctx for emitting delays on config (Chris) - Port C's hotplug interrupt is associated with TC1 bits (Vivek, Matt R) - Extend program of VSC Header and DB for Colorimetry Format (Gwan-gyeong) - Fine-tune timeslicing of contexts (Chris) - Do initial mocs configuration directly (Chris) - Fix uninitialized variable on PMU error path (Tvrtko) - Don't disable interrupts independently of the locking (Sebastian) - Eliminate struct_mutext from GVT (Chris) - Move perf types to their own header (Lionel) - Drop list of perf streams (always size 1) (Lionel) - Store the perf associated engine of a stream (Lionel) - Make array hw_engine_mask static (Colin) - Prefer shortest path to RPM/perf/GT instead of dev_priv (Chris, Tvrtko) - Virtual request submission fixes (Chris) - Selftest/CI improvements (Chris) - Fix Kconfig indentation (Krzysztof) - Give engine->kernel_context distinct timeline lock classes (Chris) - Fix null pointer deref on selftest error path (Colin) - Select DPLL's via mask (Matt R) - Introduce and use intel_atomic_crtc_state_for_each_plane_state (Maarten) - Use intel_plane_state in prepare and cleanup plane_fb (Maarten) - Remove begin/finish_crtc_commit (Maarten) - Move SAGV block time to dev_priv (James) - Avoid polluting the i915_oa_config with error pointers (Chris) - Squelch display kerneldoc warnings (Chris) - Assert tasklet is locked for process_csb() (Chris) - Switch to using DP_MSA_MISC_* defines (Ville) - Stop using drm_atomic_helper_check_planes() (Ville) - Make .modeset_calc_cdclk() mandatory (Ville) - Use drm_rect_translate_to()/drm_rect_init() (Ville) - Refactor timestamping constants update (Ville) - Switch intel_legacy_cursor_update() to intel_ types (Ville) - Prepare the connector/encoder mask readout for hw vs. uapi state split (Ville) - Prepare the mode readout for hw vs. uapi state split (Ville) - Move swizzle_bit under i915_ggtt (Chris) - Improve microcontrollers documentation (Daniele) - Move the cursor rotation handling into intel_cursor_check_surface() (Ville) - Cleanups to pipe code (Ville) - Shrink eDRAM ways/sets arrays for code size (Ville) - Cleanups to HDCP2 timeout code (Ville) - Restore full symmetry in i915_driver_modeset_probe/remove (Janusz) - Simplify setting of ddi_io_power_domain (Lucas) - Add pipe id/name to pipe mismatch logs (Lucas) - Prettify MST debug message (Lucas) - Extract GT ring management to separate files (Andi) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191021180337.GA24338@jlahtine-desk.ger.corp.intel.com commit aa74337ee73df5de3cb6c920100d01c3d95346cc Author: Richard Gong Date: Thu Oct 17 14:34:40 2019 -0500 arm64: dts: agilex: add service layer, fpga manager and fpga region Add service layer, fpga manager and fpga region to the device tree on Intel Agilex platform. Signed-off-by: Richard Gong Signed-off-by: Dinh Nguyen commit 05c9c5a99d6111f4842eacdbcad86285ebe05ced Author: Dinh Nguyen Date: Fri Oct 18 10:20:26 2019 -0500 arm64: agilex: enable USB and LEDs on agilex devkit Enable USB on the Agilex devkit. Also the Agilex devkit will use the same daughter card that is used on Stratix10, thus it map the same LEDs and GPIOs. pushbutton PB_SW0 = gpio1.io4 pushbutton PB_SW1 = gpio1.io5 LED HPS_LED0 = gpio1.io20 LED HPS_LED1 = gpio1.io19 LED HPS_LED2 = gpio1.io21 Signed-off-by: Dinh Nguyen commit 0c33a70b33364b19d0e2c8ce3bcdd6a95629cbf2 Author: Ooi, Joyce Date: Tue Oct 8 01:48:59 2019 -0700 arm64: dts: altera: update QSPI reg addresses for Stratix10 This patch updates the reg addresses for QSPI boot and QSPI rootfs in the device tree for Stratix10 Signed-off-by: Ooi, Joyce Signed-off-by: Dinh Nguyen commit c4c8757b2d8956ae48d4d3b4acd400835c98921e Author: Ooi, Joyce Date: Tue Oct 8 01:46:39 2019 -0700 arm64: dts: agilex: add QSPI support for Intel Agilex This patch adds QSPI flash interface in device tree for Intel Agilex Signed-off-by: Ooi, Joyce Signed-off-by: Dinh Nguyen commit 39438490c9714378148f3b603f635362c8780b51 Merge: 985fd98ab5cc 70332577e4d9 Author: Jakub Kicinski Date: Mon Oct 21 20:16:12 2019 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2019-10-21 This series contains updates to e1000e and igc only. Sasha adds stream control transmission protocol (SCTP) CRC checksum support for igc. Also added S0ix support to the e1000e driver. Then added multicast support by adding the address list to the MTA table and providing the option for IPv6 address for igc. In addition, added receive checksum support to igc as well. Lastly, cleaned up some code that was not fully implemented yet for the VLAN filter table array. v2: Dropped patch 1 & 2 from the original series. Patch 1 is being sent to 'net' tree as a fix and patch 2 implementation needs to be re-worked. Updated the patch to add support for S0ix to fix the reverse Xmas tree issues and made the entry/exit functions void since they constantly returned success. All based on community feedback. v3: Cleaned up patch 4 of the series based on feedback from the community. Cleaned up a stray comma in a code comment and removed the 'inline' of a function that would be inlined by the compiler anyways. ==================== Signed-off-by: Jakub Kicinski commit 771fdcf8d3d04e77ae0f0dc1018144206a61d216 Author: Stephen Boyd Date: Wed Oct 16 16:57:53 2019 +0200 PM / OPP: Support adjusting OPP voltages at runtime On some SoCs the Adaptive Voltage Scaling (AVS) technique is employed to optimize the operating voltage of a device. At a given frequency, the hardware monitors dynamic factors and either makes a suggestion for how much to adjust a voltage for the current frequency, or it automatically adjusts the voltage without software intervention. Add an API to the OPP library for the former case, so that AVS type devices can update the voltages for an OPP when the hardware determines the voltage should change. The assumption is that drivers like CPUfreq or devfreq will register for the OPP notifiers and adjust the voltage according to suggestions that AVS makes. This patch is derived from [1] submitted by Stephen. [1] https://lore.kernel.org/patchwork/patch/599279/ Signed-off-by: Stephen Boyd Signed-off-by: Roger Lu [s.nawrocki@samsung.com: added handling of OPP min/max voltage] Signed-off-by: Sylwester Nawrocki Signed-off-by: Viresh Kumar commit a362687404edc5d73a4fc281af3b2b1542ef194e Author: Olof Johansson Date: Mon Oct 21 18:52:24 2019 -0700 soc: mmp: guard include of asm/cputype.h with CONFIG_ARM{,64} Since this driver is enabled for COMPILE_TEST, it avoids build error on x86 allmodconfig: In file included from /build/drivers/phy/marvell/phy-mmp3-usb.c:12: /build/include/linux/soc/mmp/cputype.h:5:10: fatal error: asm/cputype.h: No such file or directory Link: https://lore.kernel.org/r/20191022015658.14624-1-olof@lixom.net Signed-off-by: Olof Johansson commit 27a0a90d6301dd883a748538e4db692a5fb923e1 Merge: aa7a7b72974a 27198a893ba0 Author: Ingo Molnar Date: Tue Oct 22 01:15:45 2019 +0200 Merge tag 'perf-core-for-mingo-5.5-20191021' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf trace: - Add syscall failure stats to -s/--summary and -S/--with-summary, works in combination with specifying just a set of syscalls, see below first with -s/--summary, then with -S/--with-summary just for the syscalls we saw failing with -s: # perf trace -s sleep 1 Summary of events: sleep (16218), 80 events, 93.0% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) ----------- ----- ------ -------- -------- -------- -------- ------ nanosleep 1 0 1000.091 1000.091 1000.091 1000.091 0.00% mmap 8 0 0.045 0.005 0.006 0.008 7.09% mprotect 4 0 0.028 0.005 0.007 0.009 11.38% openat 3 0 0.021 0.005 0.007 0.009 14.07% munmap 1 0 0.017 0.017 0.017 0.017 0.00% brk 4 0 0.010 0.001 0.002 0.004 23.15% read 4 0 0.009 0.002 0.002 0.003 8.13% close 5 0 0.008 0.001 0.002 0.002 10.83% fstat 3 0 0.006 0.002 0.002 0.002 6.97% access 1 1 0.006 0.006 0.006 0.006 0.00% lseek 3 0 0.005 0.001 0.002 0.002 7.37% arch_prctl 2 1 0.004 0.001 0.002 0.002 17.64% execve 1 0 0.000 0.000 0.000 0.000 0.00% # perf trace -e access,arch_prctl -S sleep 1 0.000 ( 0.006 ms): sleep/19503 arch_prctl(option: 0x3001, arg2: 0x7fff165996b0) = -1 EINVAL (Invalid argument) 0.024 ( 0.006 ms): sleep/19503 access(filename: 0x2177e510, mode: R) = -1 ENOENT (No such file or directory) 0.136 ( 0.002 ms): sleep/19503 arch_prctl(option: SET_FS, arg2: 0x7f9421737580) = 0 Summary of events: sleep (19503), 6 events, 50.0% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) ---------- ----- ------ ------ ------ ------ ------ ------ arch_prctl 2 1 0.008 0.002 0.004 0.006 57.22% access 1 1 0.006 0.006 0.006 0.006 0.00% # - Introduce --errno-summary, to drill down a bit more in the errno stats: # perf trace --errno-summary -e access,arch_prctl -S sleep 1 0.000 ( 0.006 ms): sleep/5587 arch_prctl(option: 0x3001, arg2: 0x7ffd6ba6aa00) = -1 EINVAL (Invalid argument) 0.028 ( 0.007 ms): sleep/5587 access(filename: 0xb83d9510, mode: R) = -1 ENOENT (No such file or directory) 0.172 ( 0.003 ms): sleep/5587 arch_prctl(option: SET_FS, arg2: 0x7f45b8392580) = 0 Summary of events: sleep (5587), 6 events, 50.0% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) ---------- ----- ------ ------ ------ ------ ------ ------ arch_prctl 2 1 0.009 0.003 0.005 0.006 38.90% EINVAL: 1 access 1 1 0.007 0.007 0.007 0.007 0.00% ENOENT: 1 # - Filter own pid to avoid a feedback look in 'perf trace record -a' - Add the glue for the auto generated x86 IRQ vector array. - Show error message when not finding a field used in a filter expression # perf trace --max-events=4 -e syscalls:sys_enter_write --filter="cnt>32767" Failed to set filter "(cnt>32767) && (common_pid != 19938 && common_pid != 8922)" on event syscalls:sys_enter_write with 22 (Invalid argument) # # perf trace --max-events=4 -e syscalls:sys_enter_write --filter="count>32767" 0.000 python3.5/17535 syscalls:sys_enter_write(fd: 3, buf: 0x564b0dc53600, count: 172086) 12.641 python3.5.post/17535 syscalls:sys_enter_write(fd: 3, buf: 0x564b0db63660, count: 75994) 27.738 python3.5.post/17535 syscalls:sys_enter_write(fd: 3, buf: 0x564b0db4b1e0, count: 41635) 136.070 python3.5.post/17535 syscalls:sys_enter_write(fd: 3, buf: 0x564b0dbab510, count: 62232) # - Add a generator for x86's IRQ vectors -> strings - Introduce stroul() (string -> number) methods for the strarray and strarrays classes, also strtoul_flags, allowing to go from both strings and or-ed strings to numbers, allowing things like: # perf trace -e syscalls:sys_enter_mmap --filter="flags==DENYWRITE|PRIVATE|FIXED" sleep 1 0.000 sleep/22588 syscalls:sys_enter_mmap(addr: 0x7f42d2aa5000, len: 1363968, prot: READ|EXEC, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x22000) 0.011 sleep/22588 syscalls:sys_enter_mmap(addr: 0x7f42d2bf2000, len: 311296, prot: READ, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x16f000) 0.015 sleep/22588 syscalls:sys_enter_mmap(addr: 0x7f42d2c3f000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x1bb000) # Allowing to narrow down from the complete set of mmap calls for that workload: # perf trace -e syscalls:sys_enter_mmap sleep 1 0.000 sleep/22695 syscalls:sys_enter_mmap(len: 134773, prot: READ, flags: PRIVATE, fd: 3) 0.041 sleep/22695 syscalls:sys_enter_mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) 0.053 sleep/22695 syscalls:sys_enter_mmap(len: 1857472, prot: READ, flags: PRIVATE|DENYWRITE, fd: 3) 0.069 sleep/22695 syscalls:sys_enter_mmap(addr: 0x7fd23ffb6000, len: 1363968, prot: READ|EXEC, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x22000) 0.077 sleep/22695 syscalls:sys_enter_mmap(addr: 0x7fd240103000, len: 311296, prot: READ, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x16f000) 0.083 sleep/22695 syscalls:sys_enter_mmap(addr: 0x7fd240150000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x1bb000) 0.095 sleep/22695 syscalls:sys_enter_mmap(addr: 0x7fd240156000, len: 14272, prot: READ|WRITE, flags: PRIVATE|FIXED|ANONYMOUS) 0.339 sleep/22695 syscalls:sys_enter_mmap(len: 217750512, prot: READ, flags: PRIVATE, fd: 3) # Works with all targets, so, for system wide, looking at who calls mmap with flags set to just "PRIVATE": # perf trace --max-events=5 -e syscalls:sys_enter_mmap --filter="flags==PRIVATE" 0.000 pool/2242 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 14) 0.050 pool/2242 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 14) 0.062 pool/2242 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 14) 0.145 goa-identity-s/2240 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 18) 0.183 goa-identity-s/2240 syscalls:sys_enter_mmap(len: 756, prot: READ, flags: PRIVATE, fd: 18) # # perf trace --max-events=2 -e syscalls:sys_enter_lseek --filter="whence==SET && offset != 0" 0.000 Cache2 I/O/12047 syscalls:sys_enter_lseek(fd: 277, offset: 43, whence: SET) 1142.070 mozStorage #5/12302 syscalls:sys_enter_lseek(fd: 44, offset: 393536, whence: SET) # perf annotate: - Fix objdump --no-show-raw-insn flag to work with goth gcc and clang. - Streamline objdump execution, preserving the right error codes for better reporting to user. perf report: - Add warning when libunwind not compiled in. perf stat: Jin Yao: - Support --all-kernel/--all-user, to match options available in 'perf record', asking that all the events specified work just with kernel or user events. perf list: Jin Yao: - Hide deprecated events by default, allow showing them with --deprecated. libbperf: Jiri Olsa: - Allow to build with -ltcmalloc. - Finish mmap interface, getting more stuff from tools/perf while adding abstractions to avoid pulling too much stuff, to get libperf to grow as tools needs things like auxtrace, etc. perf scripting engines: Steven Rostedt (VMware): - Iterate on tep event arrays directly, fixing script generation with '-g python' when having multiple tracepoints in a perf.data file. core: - Allow to build with -ltcmalloc. perf test: Leo Yan: - Report failure for mmap events. - Avoid infinite loop for task exit case. - Remove needless headers for bp_account test. - Add dedicated checking helper is_supported(). - Disable bp_signal testing for arm64. Vendor events: arm64: John Garry: - Fix Hisi hip08 DDRC PMU eventname. - Add some missing events for Hisi hip08 DDRC, L3C and HHA PMUs. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit aa7a7b72974a4612a85bb395a4b23b973ffc7d2b Merge: ae79d5588a04 5e6c3c7b1ec2 Author: Ingo Molnar Date: Tue Oct 22 01:15:32 2019 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 94aade94585f64cd2d665a700c4df7ddabf8feb4 Author: Lubomir Rintel Date: Thu Oct 17 16:57:05 2019 +0200 ARM: multi_v7_defconfig: enable MMP platforms Marvell MMP/PXA/MMP2 platforms seem to be excluded from the defconfig for no good reasons. Enable the DT-based boards along with modules for their peripherals. Link: https://lore.kernel.org/r/20191017145705.2867950-1-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit d0862daf0f546a66acd8958469c639399532483c Merge: 2051818b346f 13bec6d6822c Author: Olof Johansson Date: Mon Oct 21 15:31:06 2019 -0700 Merge tag 'mmp-drivers-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp into arm/drivers ARM: Marvell MMP driver patches for v5.5 This tag includes the MMP3 USB2 PHY driver. The branch is based on mmp-soc-for-v5.5-2 because the driver depends on changes in MMP SoC support. * tag 'mmp-drivers-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp: MAINTAINERS: phy: add entry for USB PHY drivers on MMP SoCs phy: Add USB2 PHY driver for Marvell MMP3 SoC MAINTAINERS: mmp: add Git repository ARM: mmp: remove MMP3 USB PHY registers from regs-usb.h ARM: mmp: move cputype.h to include/linux/soc/ ARM: mmp: add SMP support ARM: mmp: add support for MMP3 SoC ARM: mmp: define MMP_CHIPID by the means of CIU_REG() ARM: mmp: DT: convert timer driver to use TIMER_OF_DECLARE ARM: mmp: map the PGU as well ARM: mmp: don't select CACHE_TAUROS2 on all ARCH_MMP ARM: l2c: add definition for FWA in PL310 aux register Link: https://lore.kernel.org/r/7cee3ddbb553ba7fe6e1420e0dbc5adb4922b317.camel@v3.sk Signed-off-by: Olof Johansson commit a4e86630a12b4dcbe08492f58cbce6d73a561dac Merge: da0c9ea146cb 759c2837f7e4 Author: Olof Johansson Date: Mon Oct 21 15:28:38 2019 -0700 Merge tag 'mmp-soc-for-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp into arm/soc ARM: Marvell MMP SoC patches for v5.5 This tag includes initial support for the Marvell MMP3 processor. MMP3 is used in OLPC XO-4 laptops, Panasonic Toughpad FZ-A1 tablet and Dell Wyse 3020/Tx0D thin clients. * tag 'mmp-soc-for-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp: MAINTAINERS: mmp: add Git repository ARM: mmp: remove MMP3 USB PHY registers from regs-usb.h ARM: mmp: move cputype.h to include/linux/soc/ ARM: mmp: add SMP support ARM: mmp: add support for MMP3 SoC ARM: mmp: define MMP_CHIPID by the means of CIU_REG() ARM: mmp: DT: convert timer driver to use TIMER_OF_DECLARE ARM: mmp: map the PGU as well ARM: mmp: don't select CACHE_TAUROS2 on all ARCH_MMP ARM: l2c: add definition for FWA in PL310 aux register Link: https://lore.kernel.org/r/3a035bed90f9d8acc49b2d11d20089b546062aea.camel@v3.sk Signed-off-by: Olof Johansson commit bae92f330aecba59bb5738e75ee25719f73a5c58 Merge: 5d8b20c131dd 5c272bee843e Author: Olof Johansson Date: Mon Oct 21 15:27:31 2019 -0700 Merge tag 'mmp-dt-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp into arm/dt ARM: Marvell MMP Device Tree patches for v5.5 This tag includes binding documentation for various hardware found on Marvell MMP3 SoC along a DTS file for said hardware. * tag 'mmp-dt-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp: ARM: dts: mmp3: Add MMP3 SoC dts file dt-bindings: phy-mmp3-usb: Add bindings dt-bindings: mrvl,intc: Add a MMP3 interrupt controller dt-bindings: arm: mrvl: Document MMP3 compatible string dt-bindings: arm: Convert Marvell MMP board/soc bindings to json-schema dt-bindings: arm: cpu: Add Marvell MMP3 SMP enable method Link: https://lore.kernel.org/r/d4897c4a92319527c46147244282803cd9f5a1ff.camel@v3.sk Signed-off-by: Olof Johansson commit 2051818b346f0a3edc14520b9ebec3893700cb75 Merge: 4cc45d3892ef bbf918863e18 Author: Olof Johansson Date: Mon Oct 21 14:50:43 2019 -0700 Merge tag 'samsung-drivers-dmc-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers Samsung DMC driver for v5.5 Add Samsung Dynamic Memory Controller for Exynos5422 which provides scaling of frequency and voltage of memory controller and DRAM. The driver allows to reduce energy usage without performance impact. * tag 'samsung-drivers-dmc-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: memory: samsung: exynos5422-dmc: Add support for interrupt from performance counters memory: samsung: exynos5422-dmc: Fix kfree() of devm-allocated memory and missing static memory: samsung: exynos5422-dmc: Fix spelling mistake "counld" -> "could" memory: Add DMC driver for Exynos5422 memory: Extend of_memory with LPDDR3 support Link: https://lore.kernel.org/r/20191021180453.29455-3-krzk@kernel.org Signed-off-by: Olof Johansson commit 4cc45d3892ef69f9eb34d517a42ea0e7decf8513 Merge: da0c9ea146cb 6655c568ced0 Author: Olof Johansson Date: Mon Oct 21 14:50:31 2019 -0700 Merge tag 'renesas-drivers-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.5 - Add support for the new RZ/G2N (r8a774b1) SoC, - Fix System Controller power request conflicts on recent R-Car Gen3 and RZ/G2N SoC variants and revisions, - Minor cleanups. * tag 'renesas-drivers-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: rcar-sysc: Add r8a774b1 support soc: renesas: rcar-sysc: Remove unneeded inclusion of soc: renesas: r8a774c0-sysc: Fix power request conflicts soc: renesas: rcar-rst: Add support for RZ/G2N soc: renesas: Identify RZ/G2N soc: renesas: Add Renesas R8A774B1 config option soc: renesas: r8a77990-sysc: Fix power request conflicts soc: renesas: r8a77980-sysc: Fix power request conflicts soc: renesas: r8a77970-sysc: Fix power request conflicts soc: renesas: r8a77965-sysc: Fix power request conflicts soc: renesas: r8a7796-sysc: Fix power request conflicts soc: renesas: r8a7795-sysc: Fix power request conflicts soc: renesas: rcar-sysc: Prepare for fixing power request conflicts dt-bindings: clk: Add r8a774b1 CPG Core Clock Definitions dt-bindings: power: Add r8a774b1 SYSC power domain definitions Link: https://lore.kernel.org/r/20191018101136.26350-5-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 683554e563fd5eadcbfb086e8756510251cea4cd Merge: 74a9144c3ab1 54e48a69c117 Author: Olof Johansson Date: Mon Oct 21 14:48:51 2019 -0700 Merge tag 'samsung-defconfig-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/defconfig Samsung defconfig changes for v5.5 1. Enable Dynamic Memory Controller driver for Exynos5422, 2. Enable Arndale (Exynos5250) audio driver, 3. Sync multi_v7 defconfig with exynos by enabling useful and necessary drivers (NFC, watchdog, S2MPA01 regulator, IOMMU, Maxim extcon drivers, PHY for SATA and devfreq). * tag 'samsung-defconfig-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: multi_v7_defconfig: Enable Exynos bus and memory frequency scaling (devfreq) ARM: multi_v7_defconfig: Enable options for boards with Exynos SoC ARM: exynos_defconfig: Enable Arndale audio driver ARM: exynos_defconfig: Enable DMC driver Link: https://lore.kernel.org/r/20191021180453.29455-2-krzk@kernel.org Signed-off-by: Olof Johansson commit 74a9144c3ab14911ced07d4e19ef18f2440e5c8b Merge: de09e521cd16 d8b178741e5b Author: Olof Johansson Date: Mon Oct 21 14:43:33 2019 -0700 Merge tag 'renesas-arm64-defconfig-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM64 defconfig updates for v5.5 - Enable support for the new RZ/G2N (r8a774b1) SoC. * tag 'renesas-arm64-defconfig-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable R8A774B1 SoC Link: https://lore.kernel.org/r/20191018101136.26350-3-geert+renesas@glider.be Signed-off-by: Olof Johansson commit de09e521cd1614577522beff00e946e5fb54b41d Author: Manivannan Sadhasivam Date: Tue Oct 15 20:52:04 2019 +0530 arm64: configs: Enable Actions Semi platform in defconfig Since there are enough consumers (drivers) for Actions Semi platform in mainline, let's enable it in ARM64 defconfig. As of now, this platform can boot a distro from eMMC/uSD. Link: https://lore.kernel.org/r/20191015152204.5610-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Olof Johansson commit 5d8b20c131dd51e3635f0afe419397a9789cc058 Merge: 16adb5ce3b2b 41f277be1d02 Author: Olof Johansson Date: Mon Oct 21 14:38:03 2019 -0700 Merge tag 'samsung-dt-dmc-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS changes for DMC driver for v5.5 Add bindings and update device tree sources of Exynos5422 platforms with new Dynamic Memory Controller nodes and properties. * tag 'samsung-dt-dmc-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: memory-controllers: exynos5422-dmc: Correct example syntax and memory region ARM: dts: exynos: Add interrupts to DMC controller in Exynos5422 ARM: dts: exynos: Extend mapped region for DMC on Exynos5422 dt-bindings: memory-controllers: exynos5422-dmc: Add interrupt mode dt-bindings: ddr: Add bindings for Samsung LPDDR3 memories ARM: dts: exynos: Add DMC device to Exynos5422 and Odroid XU3-family boards ARM: dts: exynos: Add syscon compatible to clock controller on Exynos542x dt-bindings: memory-controllers: Add Exynos5422 DMC device description dt-bindings: ddr: Add bindings for LPDDR3 memories dt-bindings: ddr: Rename lpddr2 directory Link: https://lore.kernel.org/r/20191021180453.29455-6-krzk@kernel.org Signed-off-by: Olof Johansson commit 16adb5ce3b2bfdbd039eb4f08ae06382543da616 Merge: 60107c77a2fa 9f17f839fe9c Author: Olof Johansson Date: Mon Oct 21 14:37:33 2019 -0700 Merge tag 'samsung-dt64-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v5.5 1. Fix boot of Exynos7 due to wrong address/size of memory node, 2. Move GPU under /soc node, 3. Minor of DT bindings. * tag 'samsung-dt64-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Rename Multi Core Timer node to "timer" on Exynos5433 arm64: dts: exynos: Split phandle in dmas property on Exynos5433 arm64: dts: exynos: Swap clock order of sysmmu on Exynos5433 arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc node" arm64: dts: exynos: Move GPU under /soc node for Exynos7 arm64: dts: exynos: Move GPU under /soc node for Exynos5433 Link: https://lore.kernel.org/r/20191021180453.29455-5-krzk@kernel.org Signed-off-by: Olof Johansson commit 60107c77a2fa9bf03d736dc4aaca8298ac478db1 Merge: ee1d28a449bf d60d0cff4ab0 Author: Olof Johansson Date: Mon Oct 21 14:37:07 2019 -0700 Merge tag 'samsung-dt-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.5 1. Add ARM architected timers on Exynos5 for KVM-based virtualization, 2. Extend chip identification needed for future Adaptive Supply Voltage, 3. Add audio support to Arndale board, 4. Fix init order of clock providers on s3c64xx, 5. A lot of cleanups and adjustments of DTS with DT schema. * tag 'samsung-dt-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: s3c64xx: Fix init order of clock providers ARM: dts: exynos: Rename SysRAM node to "sram" ARM: dts: exynos: Rename power domain nodes to "power-domain" in Exynos4 ARM: dts: exynos: Add audio support (WM1811 CODEC boards) to Arndale board ARM: dts: exynos: Use defines for MCT interrupt GIC SPI/PPI specifier ARM: dts: exynos: Remove MCT subnode for interrupt map on Exynos54xx ARM: dts: exynos: Remove MCT subnode for interrupt map on Exynos5250 ARM: dts: exynos: Remove MCT subnode for interrupt map on Exynos4412 ARM: dts: exynos: Remove MCT subnode for interrupt map on Exynos4210 ARM: dts: exynos: Rename Multi Core Timer node to "timer" ARM: dts: exynos: Split phandle in dmas property ARM: dts: exynos: Remove obsolete IRQ lines on Exynos3250 ARM: dts: exynos: Add samsung,asv-bin property to Odroid XU3 Lite ARM: dts: exynos: Add "syscon" compatible string to chipid node on Exynos5 ARM: dts: exynos: Add support ARM architected timers on Exynos5 Link: https://lore.kernel.org/r/20191021180453.29455-4-krzk@kernel.org Signed-off-by: Olof Johansson commit ee1d28a449bfe2ad7b8756eae23a8da76aa57240 Merge: 832e1173c024 d083ce427947 Author: Olof Johansson Date: Mon Oct 21 14:36:45 2019 -0700 Merge tag 'v5.5-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt A lot of improvements for the (till now) somewhat dormant px30 soc, power-tree improvements ofr the roc-rk3399-pc, after a long wait also support for the CR50 TPM device found on some RK3399-Gru devices, some audio and gmac improvements for NanoPi4 and Rockpro64 as well as marking the redundant RK_FUNC_x -> x mapping as deprecated and fixing a missing #msi-cells on rk3399. * tag 'v5.5-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: include: dt-bindings: rockchip: mark RK_FUNC defines as deprecated arm64: dts: rockchip: restyle rockchip,pins on rk3399-rock-pi-4 arm64: dts: rockchip: Update nanopi4 phy reset properties arm64: dts: rockchip: Enable nanopi4 HDMI audio arm64: dts: rockchip: add cr50 tpm to rk3399-gru scarlet and bob arm64: dts: rockchip: add analog audio nodes on rk3399-rockpro64 arm64: dts: rockchip: add missing #msi-cells to rk3399 arm64: dts: rockchip: Fix roc-rk3399-pc regulator input rails arm64: dts: rockchip: Rename vcc12v_sys into dc_12v for roc-rk3399-pc dt-bindings: document PX30 usb2phy General Register Files arm64: dts: rockchip: add px30-evb i2c1 devices arm64: dts: rockchip: document explicit px30 cru dependencies arm64: dts: rockchip: remove unused pin settings from px30 arm64: dts: rockchip: move px30-evb console output to uart 5 arm64: dts: rockchip: add emmc-powersequence to px30-evb arm64: dts: rockchip: fix the px30-evb power tree arm64: dts: rockchip: add default px30 emmc pinctrl arm64: dts: rockchip: remove px30 emmc_pwren pinctrl arm64: dts: rockchip: remove static xin32k from px30 arm64: dts: rockchip: fix iface clock-name on px30 iommus Link: https://lore.kernel.org/r/1650793.YZj09CGBNl@phil Signed-off-by: Olof Johansson commit 832e1173c024275e8e71e18eee1f482157d53559 Merge: 9bfa8cf0d8d0 a562a8acccb3 Author: Olof Johansson Date: Mon Oct 21 14:36:32 2019 -0700 Merge tag 'v5.5-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt New rk3288 features are Gamma support for the VOPs as well as declaring the cpuid found in the efuses. Veyron display got a cleanup to use the interpolated backlight values instead of declaring huge tables and finally a cleanup fixing some tabs/spaces issues in the dts files. * tag 'v5.5-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: remove some tabs and spaces from dtsi files ARM: dts: rockchip: Add RK3288 VOP gamma LUT address ARM: dts: rockchip: Use interpolated brightness tables for veyron ARM: dts: rockchip: Add cpu id to rk3288 efuse node Link: https://lore.kernel.org/r/1770986.Em1ahGqaF7@phil Signed-off-by: Olof Johansson commit 9bfa8cf0d8d0ff8f8055bbd1e4f7823b720ea6fe Merge: 662be40034ca 4d3cae425447 Author: Olof Johansson Date: Mon Oct 21 14:36:12 2019 -0700 Merge tag 'renesas-dt-bindings-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.5 - RZ/G2M update for the Renesas Timer Unit bindings, - Support for the new RZ/G2N (r8a774b1) SoC and the HiHope RZ/G2N board. * tag 'renesas-dt-bindings-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: reset: rcar-rst: Document r8a774b1 reset module dt-bindings: power: rcar-sysc: Document r8a774b1 sysc dt-bindings: arm: renesas: Add HopeRun RZ/G2N boards dt-bindings: arm: renesas: Document RZ/G2N SoC DT bindings dt-bindings: timer: renesas: tmu: Document r8a774a1 bindings Link: https://lore.kernel.org/r/20191018101136.26350-6-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 662be40034ca896dc79227fce427435c62781aa4 Merge: aca95ea77c38 3fa08cbb0662 Author: Olof Johansson Date: Mon Oct 21 14:35:51 2019 -0700 Merge tag 'renesas-arm64-dt-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM64 DT updates for v5.5 - Support for the RZ/G2N (r8a774b1) SoC and the HiHope RZ/G2N board, - CPU idle support for R-Car H3 and M3-W, - LVDS and backlight support on the HiHope RZ/G2M and RZ/G2N boards, with Advantech idk-1110wr LVDS panel, - Minor fixes and improvements. * tag 'renesas-arm64-dt-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (50 commits) arm64: dts: renesas: r8a774b1: Add CAN and CAN FD support arm64: dts: renesas: Add iommus to R-Car Gen3 SDHI/MMC nodes arm64: dts: renesas: r8a774b1: Add INTC-EX device node arm64: dts: renesas: r8a774b1: Add USB3.0 device nodes arm64: dts: renesas: r8a774b1: Add USB-DMAC and HSUSB device nodes arm64: dts: renesas: r8a774b1: Add USB2.0 phy and host (EHCI/OHCI) device nodes arm64: dts: renesas: r8a774b1: Add Sound and Audio DMAC device nodes arm64: dts: renesas: hihope-rzg2-ex: Let the board specific DT decide about pciec1 arm64: dts: renesas: r8a774b1: Add PCIe device nodes arm64: dts: renesas: r8a774b1: Add all MSIOF nodes arm64: dts: renesas: r8a774b1: Add RWDT node arm64: dts: renesas: Add support for Advantech idk-1110wr LVDS panel arm64: dts: renesas: hihope-rzg2-ex: Add LVDS support arm64: dts: renesas: hihope-rzg2-ex: Enable backlight arm64: dts: renesas: r8a774b1: Add PWM device nodes arm64: dts: renesas: r8a774b1: Add FDP1 device nodes arm64: dts: renesas: r8a774b1-hihope-rzg2n: Add display clock properties arm64: dts: renesas: r8a774b1: Add HDMI encoder instance arm64: dts: renesas: r8a774b1: Add DU device to DT arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi ... Link: https://lore.kernel.org/r/20191018101136.26350-4-geert+renesas@glider.be Signed-off-by: Olof Johansson commit aca95ea77c38fd5ea3587746d137174fa93eb477 Merge: da0c9ea146cb 84cd9d3442b7 Author: Olof Johansson Date: Mon Oct 21 14:35:32 2019 -0700 Merge tag 'renesas-arm-dt-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.5 - Whitespace cleanups. * tag 'renesas-arm-dt-for-v5.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: emev2: Add whitespace for GPIO nodes ARM: dts: lager: Replace spaces by TABs ARM: dts: gose: Replace spaces by TABs Link: https://lore.kernel.org/r/20191018101136.26350-2-geert+renesas@glider.be Signed-off-by: Olof Johansson commit f7ac11ebad5a30702cbc85b342de6de563870b7c Author: Tony Lindgren Date: Mon Oct 21 14:16:40 2019 -0700 ARM: OMAP2+: Drop legacy platform data for dra7 rng 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. Signed-off-by: Tony Lindgren commit bb51a2a84ff2ffd96f8ac1d2fcf202450b60a2fb Author: Tony Lindgren Date: Mon Oct 21 14:16:39 2019 -0700 ARM: OMAP2+: Drop legacy platform data for am3 and am4 rng 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. Signed-off-by: Tony Lindgren commit aa3657053d82f30d10dd20367cd27f414d6034bc Author: Tony Lindgren Date: Mon Oct 21 14:16:39 2019 -0700 ARM: OMAP2+: Drop legacy platform data for omap4 hdq1w 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. Signed-off-by: Tony Lindgren commit cca5e19af216a9955c9041f5576761dd2fe4147f Author: Tony Lindgren Date: Mon Oct 21 14:16:39 2019 -0700 ARM: OMAP2+: Drop legacy platform data for dra7 hdq1w 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. Signed-off-by: Tony Lindgren commit b4e2b347d8b6a80e56156337fc225b3172fc05b6 Author: Tony Lindgren Date: Mon Oct 21 14:16:38 2019 -0700 ARM: OMAP2+: Drop legacy platform data for am4 hdq1w 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. Signed-off-by: Tony Lindgren commit b1da0fa21bd117db856327188e64551e30c5dbba Author: Tony Lindgren Date: Mon Oct 21 14:16:38 2019 -0700 ARM: OMAP2+: Drop legacy platform data for omap5 mcbsp 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. Signed-off-by: Tony Lindgren commit 349355ce3a05d95b25865fd5a9f09afa77085caf Author: Tony Lindgren Date: Mon Oct 21 14:16:38 2019 -0700 ARM: OMAP2+: Drop legacy platform data for omap4 mcbsp 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. Signed-off-by: Tony Lindgren commit af8637f0ee7e2cca052ce9240ef8d7907fb44dc1 Author: Tony Lindgren Date: Mon Oct 21 14:16:37 2019 -0700 ARM: OMAP2+: Drop legacy platform data for omap5 wdt 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. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 8109ceb4a276de9575136e342071d3172cfe57e4 Author: Tony Lindgren Date: Mon Oct 21 14:16:37 2019 -0700 ARM: OMAP2+: Drop legacy platform data for dra7 wdt 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 Tested-by: Keerthy Signed-off-by: Tony Lindgren commit a130133fee5fb91b60520faa76483a5c19d0cd26 Author: Tony Lindgren Date: Mon Oct 21 14:16:36 2019 -0700 ARM: OMAP2+: Drop legacy platform data for am3 and am4 wdt 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 Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 96a427a108b3a1f00507f9ff019ca1e1919807c3 Author: Tony Lindgren Date: Mon Oct 21 14:16:36 2019 -0700 ARM: dts: Drop custom hwmod property for omap5 mmc We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 83aba97d7076246f5638b77c4b84985a609e4d9c Author: Tony Lindgren Date: Mon Oct 21 14:16:36 2019 -0700 ARM: dts: Drop custom hwmod property for am4 mmc We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit e9279e0712f7a996274262f1f77a37a93d52507c Author: Tony Lindgren Date: Mon Oct 21 14:16:35 2019 -0700 ARM: dts: Drop custom hwmod property for am3 mmc We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit bfa299ddd3417230e92d282c251b5b33edfe1823 Author: Tony Lindgren Date: Mon Oct 21 14:16:35 2019 -0700 ARM: dts: Drop custom hwmod property for omap5 i2c We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 0bd28b9e73dee6c8219514548742942ed5ebf1fd Author: Tony Lindgren Date: Mon Oct 21 14:16:35 2019 -0700 ARM: dts: Drop custom hwmod property for am4 i2c We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 1cb5f37edd8c78b128b63c6394397f87109c3082 Author: Tony Lindgren Date: Mon Oct 21 14:16:34 2019 -0700 ARM: dts: Drop custom hwmod property for am3 i2c We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 26c99bf1d5d3fec3b59a351de59d62b4266cadcc Author: Tony Lindgren Date: Mon Oct 21 14:16:34 2019 -0700 ARM: dts: Drop custom hwmod property for omap5 uart We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit e65baa90abd3ef9d55fab74fa7e0867208c4f888 Author: Tony Lindgren Date: Mon Oct 21 14:16:33 2019 -0700 ARM: dts: Drop custom hwmod property for am4 uart We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 93b5824960b03859c82b9e8959d372937b77a2d4 Author: Tony Lindgren Date: Mon Oct 21 14:16:33 2019 -0700 ARM: dts: Drop custom hwmod property for am33xx uart We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit ba2489ffe85c144a16b90ed5aaa0572c76e1fabb Author: Tony Lindgren Date: Mon Oct 21 14:16:33 2019 -0700 ARM: OMAP2+: Drop legacy platform data for omap5 mcspi 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. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit d1fe649bbd8241bedb3027ac88e5c2cb8bd51c02 Author: Tony Lindgren Date: Mon Oct 21 14:16:32 2019 -0700 ARM: dts: Drop custom hwmod property for omap5 mcspi We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit c8ea89dfb2cb48e9c10a43136868260e2d6c9779 Author: Tony Lindgren Date: Mon Oct 21 14:16:32 2019 -0700 ARM: OMAP2+: Drop legacy platform data for omap5 mailbox 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: Suman Anna Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 1891ffcb53c7c38c86e947efa94ed9f33cd04275 Author: Tony Lindgren Date: Mon Oct 21 14:16:32 2019 -0700 ARM: OMAP2+: Drop legacy platform data for omap4 mailbox 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: Suman Anna Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 38d380d51aed705c9133f641e1357a8b3e0a02f1 Author: Tony Lindgren Date: Mon Oct 21 14:16:31 2019 -0700 ARM: OMAP2+: Drop legacy platform data for am3 and am4 mailbox 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 Cc: Suman Anna Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 35bd04521517541dcf46a4b8c53bd66363bc74b4 Author: Tony Lindgren Date: Mon Oct 21 14:16:31 2019 -0700 ARM: OMAP2+: Drop legacy platform data for dra7 mailbox 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: Suman Anna Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 928be37dc6b7b807b272d66aca974d7c2569486d Author: Tony Lindgren Date: Mon Oct 21 14:16:30 2019 -0700 ARM: dts: Drop custom hwmod property for omap5 gpio We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 7dd721a33e5b310e825942aa7e1c2d2400b692f8 Author: Tony Lindgren Date: Mon Oct 21 14:16:30 2019 -0700 ARM: dts: Drop custom hwmod property for omap4 gpio We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the custom ti,hwmods dts property. We have already dropped the platform data earlier, but have been still allocating it dynamically, which is no longer needed. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 97492a4608d98483fcbc3fc3c16ea0458e99a67d Author: Tony Lindgren Date: Mon Oct 21 14:16:30 2019 -0700 ARM: OMAP2+: Drop legacy platform data for am3 and am4 gpio 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: Ankur Tyagi Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 1819ef2e2d12d5b1a6ee54ac1c2afe35cffc677c Author: Tony Lindgren Date: Mon Oct 21 14:15:55 2019 -0700 bus: ti-sysc: Use swsup quirks also for am335x musb Also on am335x we need the swsup quirks for musb. Signed-off-by: Tony Lindgren commit 5a0d523781075529e9c2ff3ba7312ddf4e32609a Author: Donald Dutile Date: Wed Oct 9 12:49:37 2019 -0400 ib/srp: Add missing new line after displaying fast_io_fail_tmo param Long-time missing new-line in sysfs output. Simply add it. Signed-off-by: Donald Dutile Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20191009164937.21989-1-ddutile@redhat.com Signed-off-by: Doug Ledford commit 03856e928b0e1a1c274eece1dfe4330a362c37f3 Author: Tony Lindgren Date: Mon Oct 21 13:36:09 2019 -0700 bus: ti-sysc: Handle mstandby quirk and use it for musb We need swsup quirks for sidle and mstandby for musb to work properly. Signed-off-by: Tony Lindgren commit 065ab4c4701ff6e28785eb8172925fc3068cc15e Author: Eric Biggers Date: Wed Oct 9 16:34:18 2019 -0700 docs: ioctl-number: document fscrypt ioctl numbers The 'f' ioctls with numbers 19-26 decimal are currently used for fscrypt (a.k.a. ext4/f2fs/ubifs encryption), and up to 39 decimal is reserved for future fscrypt use, as per the comment in fs/ext4/ext4.h. So the reserved range is 13-27 hex. Document this in ioctl-number.rst. Signed-off-by: Eric Biggers commit 6f99756dab5ba23e5dc74cd4ad24edd53af39beb Author: Eric Biggers Date: Wed Oct 9 16:34:17 2019 -0700 fscrypt: zeroize fscrypt_info before freeing memset the struct fscrypt_info to zero before freeing. This isn't really needed currently, since there's no secret key directly in the fscrypt_info. But there's a decent chance that someone will add such a field in the future, e.g. in order to use an API that takes a raw key such as siphash(). So it's good to do this as a hardening measure. Signed-off-by: Eric Biggers commit 1565bdad59e97f31cfc7b065bc0fc77e9549e62d Author: Eric Biggers Date: Wed Oct 9 16:34:17 2019 -0700 fscrypt: remove struct fscrypt_ctx Now that ext4 and f2fs implement their own post-read workflow that supports both fscrypt and fsverity, the fscrypt-only workflow based around struct fscrypt_ctx is no longer used. So remove the unused code. This is based on a patch from Chandan Rajendra's "Consolidate FS read I/O callbacks code" patchset, but rebased onto the latest kernel, folded __fscrypt_decrypt_bio() into fscrypt_decrypt_bio(), cleaned up fscrypt_initialize(), and updated the commit message. Originally-from: Chandan Rajendra Signed-off-by: Eric Biggers commit 4006d799d93b159fd834c50999265b5c534a71d5 Author: Eric Biggers Date: Wed Oct 9 16:34:16 2019 -0700 fscrypt: invoke crypto API for ESSIV handling Instead of open-coding the calculations for ESSIV handling, use an ESSIV skcipher which does all of this under the hood. ESSIV was added to the crypto API in v5.4. This is based on a patch from Ard Biesheuvel, but reworked to apply after all the fscrypt changes that went into v5.4. Tested with 'kvm-xfstests -c ext4,f2fs -g encrypt', including the ciphertext verification tests for v1 and v2 encryption policies. Originally-from: Ard Biesheuvel Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers commit 18f3b2727fc324db1a1787704d97b8f20a5fb1cb Author: Chris Wilson Date: Mon Oct 21 19:32:36 2019 +0100 drm/i915: Remove pm park/unpark notifications With the last user, i915_vma_parked(), retired, there are no more users of the per-gt pm notifications and we can remove the unused infrastructure. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191021183236.21790-2-chris@chris-wilson.co.uk commit 71e51ca8dcc1155c914f285e4a71a5586f31a597 Author: Chris Wilson Date: Mon Oct 21 19:32:35 2019 +0100 drm/i915: Lift i915_vma_parked() onto the gt Currently even though i915_vma_parked() operates on a per-gt struct, it is called from a global pm notify. This oddity was only because the long term plan is to decouple the vma cache from the pm notification, but right now the oddity stands out like a sore thumb! Suggested-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191021183236.21790-1-chris@chris-wilson.co.uk commit b5e8e954eb672e7128e50589c43817b0ffce6f75 Author: Chris Wilson Date: Mon Oct 21 18:43:39 2019 +0100 drm/i915/gt: Introduce barrier pulses along engines To flush idle barriers, and even inflight requests, we want to send a preemptive 'pulse' along an engine. We use a no-op request along the pinned kernel_context at high priority so that it should run or else kick off the stuck requests. We can use this to ensure idle barriers are immediately flushed, as part of a context cancellation mechanism, or as part of a heartbeat mechanism to detect and reset a stuck GPU. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191021174339.5389-1-chris@chris-wilson.co.uk commit 928da10c0ca2aee50099d63f20feeec71344ae67 Author: Chris Wilson Date: Mon Oct 21 17:21:46 2019 +0100 drm/i915/selftests: Use all physical engines for i915_active i915_active must track over any engine, so expand the selftest to iterate over all uabi engines. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191021162146.1686-1-chris@chris-wilson.co.uk commit de5287235631cc561716d85f984614ef9598a5cc Author: Christian Brauner Date: Mon Oct 14 12:45:38 2019 +0200 tests: test CLONE_CLEAR_SIGHAND Test that CLONE_CLEAR_SIGHAND resets signal handlers to SIG_DFL for the child process and that CLONE_CLEAR_SIGHAND and CLONE_SIGHAND are mutually exclusive. Cc: Florian Weimer Cc: libc-alpha@sourceware.org Cc: linux-api@vger.kernel.org Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20191014104538.3096-2-christian.brauner@ubuntu.com commit b612e5df4587c934bd056bf05f4a1deca4de4f75 Author: Christian Brauner Date: Mon Oct 14 12:45:37 2019 +0200 clone3: add CLONE_CLEAR_SIGHAND Reset all signal handlers of the child not set to SIG_IGN to SIG_DFL. Mutually exclusive with CLONE_SIGHAND to not disturb other thread's signal handler. In the spirit of closer cooperation between glibc developers and kernel developers (cf. [2]) this patchset came out of a discussion on the glibc mailing list for improving posix_spawn() (cf. [1], [3], [4]). Kernel support for this feature has been explicitly requested by glibc and I see no reason not to help them with this. The child helper process on Linux posix_spawn must ensure that no signal handlers are enabled, so the signal disposition must be either SIG_DFL or SIG_IGN. However, it requires a sigprocmask to obtain the current signal mask and at least _NSIG sigaction calls to reset the signal handlers for each posix_spawn call or complex state tracking that might lead to data corruption in glibc. Adding this flags lets glibc avoid these problems. [1]: https://www.sourceware.org/ml/libc-alpha/2019-10/msg00149.html [3]: https://www.sourceware.org/ml/libc-alpha/2019-10/msg00158.html [4]: https://www.sourceware.org/ml/libc-alpha/2019-10/msg00160.html [2]: https://lwn.net/Articles/799331/ '[...] by asking for better cooperation with the C-library projects in general. They should be copied on patches containing ABI changes, for example. I noted that there are often times where C-library developers wish the kernel community had done things differently; how could those be avoided in the future? Members of the audience suggested that more glibc developers should perhaps join the linux-api list. The other suggestion was to "copy Florian on everything".' Cc: Florian Weimer Cc: libc-alpha@sourceware.org Cc: linux-api@vger.kernel.org Signed-off-by: Christian Brauner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20191014104538.3096-1-christian.brauner@ubuntu.com commit d302c6e3a6895608a5856bc708c47bda1770b24d Author: Yangyang Li Date: Wed Oct 9 09:21:50 2019 +0800 RDMA/hns: Release qp resources when failed to destroy qp Even if no response from hardware, we should make sure that qp related resources are released to avoid memory leaks. Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Link: https://lore.kernel.org/r/1570584110-3659-1-git-send-email-liweihang@hisilicon.com Signed-off-by: Doug Ledford commit 3dcad1f8421f5684c64ef3079c32dfb884a3b910 Author: Yixing Liu Date: Wed Sep 4 11:14:45 2019 +0800 RDMA/hns: Fix a spelling mistake in a macro HNS_ROCE_ALOGN_UP should be HNS_ROCE_ALIGN_UP, this patch fix it. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Link: https://lore.kernel.org/r/1567566885-23088-6-git-send-email-liweihang@hisilicon.com Signed-off-by: Doug Ledford commit cfd82da4e741c16d71a12123bf0cb585af2b8796 Author: Lang Cheng Date: Wed Sep 4 11:14:44 2019 +0800 RDMA/hns: Modify return value of restrack functions The restrack function return EINVAL instead of EMSGSIZE when the driver operation fails. Fixes: 4b42d05d0b2c ("RDMA/hns: Remove unnecessary kzalloc") Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Link: https://lore.kernel.org/r/1567566885-23088-5-git-send-email-liweihang@hisilicon.com Signed-off-by: Doug Ledford commit 32883228b980ed0a3ea1d13230f90622f0047908 Author: Weihang Li Date: Wed Sep 4 11:14:43 2019 +0800 RDMA/hns: Modify variable/field name from vlan to vlan_id The name of vlan and vlan_tag is not clear enough, it's actually means vlan id. Signed-off-by: Weihang Li Link: https://lore.kernel.org/r/1567566885-23088-4-git-send-email-liweihang@hisilicon.com Signed-off-by: Doug Ledford commit e8a07de57ea4ca7c2d604871c52826e66899fc70 Author: Weihang Li Date: Wed Sep 4 11:14:42 2019 +0800 RDMA/hns: Fix wrong parameters when initial mtt of srq->idx_que The parameters npages used to initial mtt of srq->idx_que shouldn't be same with srq's. And page_shift should be calculated from idx_buf_pg_sz. This patch fixes above issues and use field named npage and page_shift in hns_roce_buf instead of two temporary variables to let us use them anywhere. Fixes: 18df508c7970 ("RDMA/hns: Remove if-else judgment statements for creating srq") Signed-off-by: Weihang Li Link: https://lore.kernel.org/r/1567566885-23088-3-git-send-email-liweihang@hisilicon.com Signed-off-by: Doug Ledford commit 9f7d7064009c37cb26eee4a83302cf077fe180d6 Author: Weihang Li Date: Wed Sep 4 11:14:41 2019 +0800 RDMA/hns: remove a redundant le16_to_cpu Type of ah->av.vlan is u16, there will be a problem using le16_to_cpu on it. Fixes: 82e620d9c3a0 ("RDMA/hns: Modify the data structure of hns_roce_av") Signed-off-by: Weihang Li Link: https://lore.kernel.org/r/1567566885-23088-2-git-send-email-liweihang@hisilicon.com Signed-off-by: Doug Ledford commit 985fd98ab5cc04994a38f928942048c8743a1f04 Author: Davide Caratti Date: Sat Oct 19 18:49:32 2019 +0200 net/sched: act_police: re-use tcf_tm_dump() Use tcf_tm_dump(), instead of an open coded variant (no functional change in this patch). Signed-off-by: Davide Caratti Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit e0685fa228fdaf386f82ac0d64b2d6f3e0ddd588 Author: Steven Price Date: Mon Oct 21 16:28:23 2019 +0100 arm64: Retrieve stolen time as paravirtualized guest Enable paravirtualization features when running under a hypervisor supporting the PV_TIME_ST hypercall. For each (v)CPU, we ask the hypervisor for the location of a shared page which the hypervisor will use to report stolen time to us. We set pv_time_ops to the stolen time function which simply reads the stolen value from the shared page for a VCPU. We guarantee single-copy atomicity using READ_ONCE which means we can also read the stolen time for another VCPU than the currently running one while it is potentially being updated by the hypervisor. Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit ce4d5ca2b9dd5d85944eb93c1bbf9eb11b7a907d Author: Steven Price Date: Mon Oct 21 16:28:22 2019 +0100 arm/arm64: Make use of the SMCCC 1.1 wrapper Rather than directly choosing which function to use based on psci_ops.conduit, use the new arm_smccc_1_1 wrapper instead. In some cases we still need to do some operations based on the conduit, but the code duplication is removed. No functional change. Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit 541625ac47ce9d0835efaee0fcbaa251b0000a37 Author: Steven Price Date: Mon Oct 21 16:28:21 2019 +0100 arm/arm64: Provide a wrapper for SMCCC 1.1 calls SMCCC 1.1 calls may use either HVC or SMC depending on the PSCI conduit. Rather than coding this in every call site, provide a macro which uses the correct instruction. The macro also handles the case where no conduit is configured/available returning a not supported error in res, along with returning the conduit used for the call. This allow us to remove some duplicated code and will be useful later when adding paravirtualized time hypervisor calls. Signed-off-by: Steven Price Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 58772e9a3db72d032eeb12bc011bc5184a3925f4 Author: Steven Price Date: Mon Oct 21 16:28:20 2019 +0100 KVM: arm64: Provide VCPU attributes for stolen time Allow user space to inform the KVM host where in the physical memory map the paravirtualized time structures should be located. User space can set an attribute on the VCPU providing the IPA base address of the stolen time structure for that VCPU. This must be repeated for every VCPU in the VM. The address is given in terms of the physical address visible to the guest and must be 64 byte aligned. The guest will discover the address via a hypercall. Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit 8538cb22bbce5a988671b68baf0b0f9e86ca1e87 Author: Steven Price Date: Mon Oct 21 16:28:19 2019 +0100 KVM: Allow kvm_device_ops to be const Currently a kvm_device_ops structure cannot be const without triggering compiler warnings. However the structure doesn't need to be written to and, by marking it const, it can be read-only in memory. Add some more const keywords to allow this. Reviewed-by: Andrew Jones Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit 8564d6372a7d8a6d440441b8ed8020f97f744450 Author: Steven Price Date: Mon Oct 21 16:28:18 2019 +0100 KVM: arm64: Support stolen time reporting via shared structure Implement the service call for configuring a shared structure between a VCPU and the hypervisor in which the hypervisor can write the time stolen from the VCPU's execution time by other tasks on the host. User space allocates memory which is placed at an IPA also chosen by user space. The hypervisor then updates the shared structure using kvm_put_guest() to ensure single copy atomicity of the 64-bit value reporting the stolen time in nanoseconds. Whenever stolen time is enabled by the guest, the stolen time counter is reset. The stolen time itself is retrieved from the sched_info structure maintained by the Linux scheduler code. We enable SCHEDSTATS when selecting KVM Kconfig to ensure this value is meaningful. Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit cac0f1b7285eaaf9a186c618c3a7304d82ed5493 Author: Steven Price Date: Mon Oct 21 16:28:17 2019 +0100 KVM: Implement kvm_put_guest() kvm_put_guest() is analogous to put_user() - it writes a single value to the guest physical address. The implementation is built upon put_user() and so it has the same single copy atomic properties. Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit b48c1a45a190898103cec28771efc399fd65a05a Author: Steven Price Date: Mon Oct 21 16:28:16 2019 +0100 KVM: arm64: Implement PV_TIME_FEATURES call This provides a mechanism for querying which paravirtualized time features are available in this hypervisor. Also add the header file which defines the ABI for the paravirtualized time features we're about to add. Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit 55009c6ed2d24fc0f5521ab2482f145d269389ea Author: Christoffer Dall Date: Mon Oct 21 16:28:15 2019 +0100 KVM: arm/arm64: Factor out hypercall handling from PSCI code We currently intertwine the KVM PSCI implementation with the general dispatch of hypercall handling, which makes perfect sense because PSCI is the only category of hypercalls we support. However, as we are about to support additional hypercalls, factor out this functionality into a separate hypercall handler file. Signed-off-by: Christoffer Dall [steven.price@arm.com: rebased] Reviewed-by: Andrew Jones Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit 6a7458485b390f48e481fcd4a0b20e6c5c843d2e Author: Steven Price Date: Mon Oct 21 16:28:14 2019 +0100 KVM: arm64: Document PV-time interface Introduce a paravirtualization interface for KVM/arm64 based on the "Arm Paravirtualized Time for Arm-Base Systems" specification DEN 0057A. This only adds the details about "Stolen Time" as the details of "Live Physical Time" have not been fully agreed. User space can specify a reserved area of memory for the guest and inform KVM to populate the memory with information on time that the host kernel has stolen from the guest. A hypercall interface is provided for the guest to interrogate the hypervisor's support for this interface and the location of the shared memory structures. Signed-off-by: Steven Price Signed-off-by: Marc Zyngier commit 8f4b1068e7fc3df1a77ac8151767e56b208cc87f Author: Ville Syrjälä Date: Thu Jul 18 17:43:40 2019 +0300 drm/i915: Check some transcoder timing minimum limits On ILK+ the documented min hdisplay is 64, min hblank is 32, and min vblank is 5. On earlier platforms min hblank is also 32, and min vblank is 3. Make sure the mode satisfies those limits. There are further limits for HDMI and pfit use cases, but we'll check for those in a more specific location. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718144340.1114-2-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit dcac930e9901d765234bc15004db4f7d4416db71 Merge: 4f5cafb5cb84 e6ea46511b1a Author: Marc Zyngier Date: Mon Oct 21 19:09:04 2019 +0100 Merge remote-tracking branch 'arm64/for-next/smccc-conduit-cleanup' into kvm-arm64/stolen-time commit da345174ceca052469e4775e4ae263b5f27a9355 Author: Christoffer Dall Date: Fri Oct 11 13:07:06 2019 +0200 KVM: arm/arm64: Allow user injection of external data aborts In some scenarios, such as buggy guest or incorrect configuration of the VMM and firmware description data, userspace will detect a memory access to a portion of the IPA, which is not mapped to any MMIO region. For this purpose, the appropriate action is to inject an external abort to the guest. The kernel already has functionality to inject an external abort, but we need to wire up a signal from user space that lets user space tell the kernel to do this. It turns out, we already have the set event functionality which we can perfectly reuse for this. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit c726200dd106d4c58a281eea7159b8ba28a4ab34 Author: Christoffer Dall Date: Fri Oct 11 13:07:05 2019 +0200 KVM: arm/arm64: Allow reporting non-ISV data aborts to userspace For a long time, if a guest accessed memory outside of a memslot using any of the load/store instructions in the architecture which doesn't supply decoding information in the ESR_EL2 (the ISV bit is not set), the kernel would print the following message and terminate the VM as a result of returning -ENOSYS to userspace: load/store instruction decoding not implemented The reason behind this message is that KVM assumes that all accesses outside a memslot is an MMIO access which should be handled by userspace, and we originally expected to eventually implement some sort of decoding of load/store instructions where the ISV bit was not set. However, it turns out that many of the instructions which don't provide decoding information on abort are not safe to use for MMIO accesses, and the remaining few that would potentially make sense to use on MMIO accesses, such as those with register writeback, are not used in practice. It also turns out that fetching an instruction from guest memory can be a pretty horrible affair, involving stopping all CPUs on SMP systems, handling multiple corner cases of address translation in software, and more. It doesn't appear likely that we'll ever implement this in the kernel. What is much more common is that a user has misconfigured his/her guest and is actually not accessing an MMIO region, but just hitting some random hole in the IPA space. In this scenario, the error message above is almost misleading and has led to a great deal of confusion over the years. It is, nevertheless, ABI to userspace, and we therefore need to introduce a new capability that userspace explicitly enables to change behavior. This patch introduces KVM_CAP_ARM_NISV_TO_USER (NISV meaning Non-ISV) which does exactly that, and introduces a new exit reason to report the event to userspace. User space can then emulate an exception to the guest, restart the guest, suspend the guest, or take any other appropriate action as per the policy of the running system. Reported-by: Heinrich Schuchardt Signed-off-by: Christoffer Dall Reviewed-by: Alexander Graf Signed-off-by: Marc Zyngier commit 3e78815f753ee131477ff50df82cbb2e87afda63 Merge: a8fad5459d9b e2d861cc0ff3 Author: David S. Miller Date: Mon Oct 21 10:45:03 2019 -0700 Merge branch 'phy-marvell-support-downshift-as-PHY-tunable' Heiner Kallweit says: ==================== net: phy: marvell: support downshift as PHY tunable So far downshift is implemented for one small use case only and can't be controlled from userspace. So let's implement this feature properly as a PHY tunable so that it can be controlled via ethtool. ==================== Signed-off-by: David S. Miller commit e2d861cc0ff3c9d512177655756a93d4489f9456 Author: Heiner Kallweit Date: Sat Oct 19 15:58:19 2019 +0200 net: phy: marvell: remove superseded function marvell_set_downshift Instead of superseded function marvell_set_downshift() we can use new function m88e1111_set_downshift() in m88e1116r_config_init(). For this m88e1116r_config_init() has to be moved in the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a3bdfce7bf9cfc621888974670ac1a96d379201a Author: Heiner Kallweit Date: Sat Oct 19 15:57:33 2019 +0200 net: phy: marvell: support downshift as PHY tunable So far downshift is implemented for one small use case only and can't be controlled from userspace. So let's implement this feature properly as a PHY tunable so that it can be controlled via ethtool. More Marvell PHY's may support downshift, but I restricted it for now to the ones where I have the datasheet. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a8fad5459d9bee55fb7dd47714859cde4ac04c52 Author: Roman Mashak Date: Sat Oct 19 09:45:53 2019 -0400 tc-testing: updated pedit TDC tests Added test cases for IP header operations: - set tos/precedence - add value to tos/precedence - clear tos/precedence - invert tos/precedence Signed-off-by: Roman Mashak Signed-off-by: David S. Miller commit 06bd77f965ae5209ec6024cb4e48c05a83141784 Author: Ben Dooks Date: Wed Oct 9 09:56:46 2019 +0100 ARM: OMAP2+: make omap44xx_sha0_hwmod and omap44xx_l3_main_2__des static The omap44xx_sha0_hwmod and omap44xx_l3_main_2__des objects are not exported so make them static to avoid the following warnings: arch/arm/mach-omap2/omap_hwmod_44xx_data.c:793:19: warning: symbol 'omap44xx_sha0_hwmod' was not declared. Should it be static? arch/arm/mach-omap2/omap_hwmod_44xx_data.c:977:26: warning: symbol 'omap44xx_l3_main_2__des' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Tony Lindgren commit 89ffcdba95bdc250d926a1784c61848dab4568eb Author: Ben Dooks Date: Tue Oct 8 13:33:37 2019 +0100 ARM: OMAP2+: prm44xx: make prm_{save,restore}_context static The prm_{save,restore}_context functions are not exported so make them static to avoid the following warnings: arch/arm/mach-omap2/prm44xx.c:748:6: warning: symbol 'prm_save_context' was not declared. Should it be static? arch/arm/mach-omap2/prm44xx.c:759:6: warning: symbol 'prm_restore_context' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Tony Lindgren commit 7170debecd30c85c16dfd6e817c2909af275731c Merge: 13faf7718522 b0a43db9087a Author: David S. Miller Date: Mon Oct 21 10:36:08 2019 -0700 Merge branch 'mvneta-xdp' Lorenzo Bianconi says: ==================== add XDP support to mvneta driver Add XDP support to mvneta driver for devices that rely on software buffer management. Supported verdicts are: - XDP_DROP - XDP_PASS - XDP_REDIRECT - XDP_TX Moreover set ndo_xdp_xmit net_device_ops function pointer in order to support redirecting from other device (e.g. virtio-net). Convert mvneta driver to page_pool API. This series is based on previous work done by Jesper and Ilias. We will send follow-up patches to reduce DMA-sync operations. Changes since v4: - reset page_pool pointer to NULL in mvneta_rxq_drop_pkts and in mvneta_create_page_pool error path - move dma sync in mvneta_rx_refill() in patch 2/7 - verify bpf prog pointer in mvneta_xdp_setup to double-check if stop/start is really necessary - coding style fixes Changes since v3: - rename MVNETA_XDP_CONSUMED in MVNETA_XDP_DROPPED - squash patch 4/8 and patch 3/8 - fix dma sync for XDP_TX verdict - fix queue_index in xdp_rxq_info_reg - cosmetics Changes since v2: - rely on page_pool_recycle_direct instead of xdp_return_buff for XDP_DROP - define xdp buffer in mvneta_rx_swbm and avoid default initializations - use dma_sync_single_for_cpu instead of dma_sync_single_range_for_cpu - run page_pool_release_page in mvneta_swbm_add_rx_fragment even if the buffer contains just ETH_FCS Changes since v1: - sync dma buffers before refilling hw queues - fix stats accounting Changes since RFC: - implement XDP_TX - make tx pending buffer list agnostic - code refactoring - check if device is running in mvneta_xdp_setup ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit b0a43db9087a21d96e1a0b716b8d9963064b2d58 Author: Lorenzo Bianconi Date: Sat Oct 19 10:13:27 2019 +0200 net: mvneta: add XDP_TX support Implement XDP_TX verdict and ndo_xdp_xmit net_device_ops function pointer Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 9e58c8b410650b5a6eb5b8fad8474bd8425a4023 Author: Lorenzo Bianconi Date: Sat Oct 19 10:13:26 2019 +0200 net: mvneta: make tx buffer array agnostic Allow tx buffer array to contain both skb and xdp buffers in order to enable xdp frame recycling adding XDP_TX verdict support Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit fa383f6b77a2ed788266fa8fbfb659aa284d2f58 Author: Lorenzo Bianconi Date: Sat Oct 19 10:13:25 2019 +0200 net: mvneta: move header prefetch in mvneta_swbm_rx_frame Move data buffer prefetch in mvneta_swbm_rx_frame after dma_sync_single_range_for_cpu Signed-off-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 0db51da7a8e99f0803ec3a8e25c1a66234a219cb Author: Lorenzo Bianconi Date: Sat Oct 19 10:13:24 2019 +0200 net: mvneta: add basic XDP support Add basic XDP support to mvneta driver for devices that rely on software buffer management. Currently supported verdicts are: - XDP_DROP - XDP_PASS - XDP_REDIRECT - XDP_ABORTED - iptables drop: $iptables -t raw -I PREROUTING -p udp --dport 9 -j DROP $nstat -n && sleep 1 && nstat IpInReceives 151169 0.0 IpExtInOctets 6953544 0.0 IpExtInNoECTPkts 151165 0.0 - XDP_DROP via xdp1 $./samples/bpf/xdp1 3 proto 0: 421419 pkt/s proto 0: 421444 pkt/s proto 0: 421393 pkt/s proto 0: 421440 pkt/s proto 0: 421184 pkt/s Tested-by: Matteo Croce Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 8dc9a0888f4c8e27b25e48ff1b4bc2b3a845cc2d Author: Lorenzo Bianconi Date: Sat Oct 19 10:13:23 2019 +0200 net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine Refactor mvneta_rx_swbm code introducing mvneta_swbm_rx_frame and mvneta_swbm_add_rx_fragment routines. Rely on build_skb in oreder to allocate skb since the previous patch introduced buffer recycling using the page_pool API. This patch fixes even an issue in the original driver where dma buffers are accessed before dma sync. mvneta driver can run on not cache coherent devices so it is necessary to sync DMA buffers before sending them to the device in order to avoid memory corruptions. Running perf analysis we can see a performance cost associated with this DMA-sync (anyway it is already there in the original driver code). In follow up patches we will add more logic to reduce DMA-sync as much as possible. Signed-off-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 568a3fa24a95476d40afe3f8616bafb543bc4182 Author: Lorenzo Bianconi Date: Sat Oct 19 10:13:22 2019 +0200 net: mvneta: introduce page pool API for sw buffer manager Use the page_pool api for allocations and DMA handling instead of __dev_alloc_page()/dma_map_page() and free_page()/dma_unmap_page(). Pages are unmapped using page_pool_release_page before packets go into the network stack. The page_pool API offers buffer recycling capabilities for XDP but allocates one page per packet, unless the driver splits and manages the allocated page. This is a preliminary patch to add XDP support to mvneta driver Signed-off-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit ff519e2acd463bff6c5bb4e8d7ed350c9bae885b Author: Lorenzo Bianconi Date: Sat Oct 19 10:13:21 2019 +0200 net: mvneta: introduce mvneta_update_stats routine Introduce mvneta_update_stats routine to collect {rx/tx} statistics (packets and bytes). This is a preliminary patch to add XDP support to mvneta driver Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 607295af887066cbf4e39587b144a65cc2b96ea2 Author: Ben Dooks Date: Wed Oct 9 09:56:45 2019 +0100 ARM: OMAP2+: make dra7xx_sha0_hwmod static The dra7xx_sha0_hwmod object is not exported outside of omap_hwmod_7xx_data. so make it static to avoid the following warning: arch/arm/mach-omap2/omap_hwmod_7xx_data.c:686:19: warning: symbol 'dra7xx_sha0_hwmod' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Tony Lindgren commit 87c59ca22b484a08cb3764a3f7f7315297bafc9b Author: Ben Dooks Date: Tue Oct 8 13:33:36 2019 +0100 ARM: OMAP2+: do not export am43xx_control functions Do not export am43xx_control_{save,restore}_context to avoid the foloowing warnings: arch/arm/mach-omap2/control.c:687:6: warning: symbol 'am43xx_control_save_context' was not declared. Should it be static? arch/arm/mach-omap2/control.c:701:6: warning: symbol 'am43xx_control_restore_context' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Tony Lindgren commit 70332577e4d9ee343a7d57a7721c858172e5925c Author: Sasha Neftin Date: Thu Oct 3 14:47:01 2019 +0300 igc: Clean up unused shadow_vfta pointer VLAN filter table array not implemented yet and shadow_vfta pointer not used. Clean up the code and remove the unused shadow_vfta pointer. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 3bdd7086f77757314256e8d0a273b8935106d649 Author: Sasha Neftin Date: Thu Oct 3 13:43:05 2019 +0300 igc: Add Rx checksum support Extend the socket buffer field process and add Rx checksum functionality Minor: fix indentation with tab instead of spaces. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 7f839684c5c42f1d36ee0eb21ba751c7b51fa928 Author: Sasha Neftin Date: Wed Sep 25 11:58:53 2019 +0300 igc: Add set_rx_mode support Add multicast addresses list to the MTA table. Implement basic Rx mode support. Add option for IPv6 address settings. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit f15bb6dde738cc8fa00c24fb89b5456ea3342879 Author: Sasha Neftin Date: Mon Sep 16 09:52:40 2019 +0300 e1000e: Add support for S0ix Implement flow for S0ix support. Modern SoCs support S0ix low power states during idle periods, which are sub-states of ACPI S0 that increase power saving while supporting an instant-on experience for providing lower latency that ACPI S0. The S0ix states shut off parts of the SoC when they are not in use, while still maintaning optimal performance. This patch add support for S0ix started from an Ice Lake platform. Suggested-by: "Rafael J. Wysocki" Signed-off-by: Vitaly Lifshits Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 0ac960a8e135c902cb526903ff2ec457dfabf1b4 Author: Sasha Neftin Date: Wed Sep 11 11:17:58 2019 +0300 igc: Add SCTP CRC checksumming functionality Add stream control transmission protocol CRC checksum. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit a177057a95f6a3f1e0e52a17eea2178c15073648 Author: Adam Ford Date: Wed Oct 16 08:51:47 2019 -0500 ARM: dts: logicpd-torpedo-37xx-devkit-28: Reference new DRM panel With the removal of the panel-dpi from the omap drivers, the LCD no longer works. This patch points the device tree to a newly created panel named "logicpd,type28" Fixes: 8bf4b1621178 ("drm/omap: Remove panel-dpi driver") Signed-off-by: Adam Ford Acked-by: Sam Ravnborg Signed-off-by: Tony Lindgren commit 2658ce095df583cdf9ede475ec4da0b3cc7f7b05 Author: Ben Dooks Date: Tue Oct 15 11:35:02 2019 +0100 fs/namespace: add __user to open_tree and move_mount syscalls Thw open_tree and move_mount syscalls take names from the user, so add the __user to these to ensure the following warnings from sparse are fixed: fs/namespace.c:2392:35: warning: incorrect type in argument 2 (different address spaces) fs/namespace.c:2392:35: expected char const [noderef] *name fs/namespace.c:2392:35: got char const *filename fs/namespace.c:3541:38: warning: incorrect type in argument 2 (different address spaces) fs/namespace.c:3541:38: expected char const [noderef] *name fs/namespace.c:3541:38: got char const *from_pathname fs/namespace.c:3550:36: warning: incorrect type in argument 2 (different address spaces) fs/namespace.c:3550:36: expected char const [noderef] *name fs/namespace.c:3550:36: got char const *to_pathname Signed-off-by: Ben Dooks Signed-off-by: Al Viro commit ce8bfba7764b89e86c0fc30bdb8e973b488ad074 Author: Adam Ford Date: Tue Sep 17 10:49:23 2019 -0500 ARM: dts: logicpd-torpedo-baseboard: Reduce video regulator chatter The dss driver wants two regulators or it dump some splat while initializing. This patch adds a reference to the second regulator which to avoid the warnings that the regulator is missing. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit e200327708e691e53b99e4da38e53c0457fba6c1 Author: Ben Dooks Date: Tue Oct 15 11:50:49 2019 +0100 fs/fnctl: fix missing __user in fcntl_rw_hint() The fcntl_rw_hint() has a missing __user annotation in the code when assinging argp. Add this to fix the following sparse warnings: fs/fcntl.c:280:22: warning: incorrect type in initializer (different address spaces) fs/fcntl.c:280:22: expected unsigned long long [usertype] *argp fs/fcntl.c:280:22: got unsigned long long [noderef] [usertype] * fs/fcntl.c:287:34: warning: incorrect type in argument 1 (different address spaces) fs/fcntl.c:287:34: expected void [noderef] *to fs/fcntl.c:287:34: got unsigned long long [usertype] *argp fs/fcntl.c:291:40: warning: incorrect type in argument 2 (different address spaces) fs/fcntl.c:291:40: expected void const [noderef] *from fs/fcntl.c:291:40: got unsigned long long [usertype] *argp fs/fcntl.c:303:34: warning: incorrect type in argument 1 (different address spaces) fs/fcntl.c:303:34: expected void [noderef] *to fs/fcntl.c:303:34: got unsigned long long [usertype] *argp fs/fcntl.c:307:40: warning: incorrect type in argument 2 (different address spaces) fs/fcntl.c:307:40: expected void const [noderef] *from fs/fcntl.c:307:40: got unsigned long long [usertype] *argp Signed-off-by: Ben Dooks Signed-off-by: Al Viro commit 6859eba4f6fbc515ea05f53b77ec55f49a6dcf0f Author: Tomas Winkler Date: Thu Oct 10 16:27:10 2019 +0300 samples: mei: use hostprogs kbuild constructs Use hostprogs kbuild constructs to compile mei sample program mei-amt-version Add CONFIG_SAMPLE_INTEL_MEI option to enable/disable the feature. Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191010132710.4075-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 834c7360f92ad88155c5628eb10d60419ebaa0df Author: Jann Horn Date: Fri Oct 18 17:39:46 2019 +0200 binder: Remove incorrect comment about vm_insert_page() behavior vm_insert_page() does increment the page refcount, and just to be sure, I've confirmed it by printing page_count(page[0].page_ptr) before and after vm_insert_page(). It's 1 before, 2 afterwards, as expected. Fixes: a145dd411eb2 ("VM: add "vm_insert_page()" function") Signed-off-by: Jann Horn Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20191018153946.128584-1-jannh@google.com Signed-off-by: Greg Kroah-Hartman commit 13faf77185225a1383f6f5a072383771ccfe456b Merge: 2f184393e0c2 4fdd0bca6152 Author: David S. Miller Date: Mon Oct 21 09:22:10 2019 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: add some cleanups & optimizations This patchset includes some cleanups and optimizations for the HNS3 ethernet driver. [patch 1/8] removes unused and unnecessary structures. [patch 2/8] uses a ETH_ALEN u8 array to replace two mac_addr_* field in struct hclge_mac_mgr_tbl_entry_cmd. [patch 3/8] optimizes the barrier used in the IO path. [patch 4/8] introduces macro ring_to_netdev() to get netdevive from struct hns3_enet_ring variable. [patch 5/8] makes struct hns3_enet_ring to be cacheline aligned [patch 6/8] adds a minor cleanup for hns3_handle_rx_bd(). [patch 7/8] removes linear data allocating for fraglist SKB. [patch 8/8] clears hardware error when resetting. ==================== Signed-off-by: David S. Miller commit 4fdd0bca6152aa201898454e63cbb255a18ae6e9 Author: Jian Shen Date: Sat Oct 19 16:03:56 2019 +0800 net: hns3: log and clear hardware error after reset complete When device is resetting, the CMDQ service may be stopped until reset completed. If a new RAS error occurs at this moment, it will no be able to clear the RAS source. This patch fixes it by clear the RAS source after reset complete. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 7fda3a930d15a993389018e31532f3a1e34974ab Author: Yunsheng Lin Date: Sat Oct 19 16:03:55 2019 +0800 net: hns3: do not allocate linear data for fraglist skb Currently, napi_alloc_skb() is used to allocate skb for fraglist when the head skb is not enough to hold the remaining data, and the remaining data is added to the frags part of the fraglist skb, leaving the linear part unused. So this patch passes length of 0 to allocate fraglist skb with zero size of linear data. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d35bced88f7043bee42df795cb7a0d5a8e99248c Author: Yunsheng Lin Date: Sat Oct 19 16:03:54 2019 +0800 net: hns3: minor cleanup for hns3_handle_rx_bd() Since commit e55970950556 ("net: hns3: Add handling of GRO Pkts not fully RX'ed in NAPI poll"), ring->skb is used to record the current SKB when processing the RX BD in hns3_handle_rx_bd(), so the parameter out_skb is unnecessary. This patch also adjusts the err checking to reduce duplication in hns3_handle_rx_bd(), and "err == -ENXIO" is rare case, so put it in the unlikely annotation. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 76643555a145b06ec6dcc0d1cc0691575dceffc9 Author: Yunsheng Lin Date: Sat Oct 19 16:03:53 2019 +0800 net: hns3: make struct hns3_enet_ring cacheline aligned Since struct hns3_enet_ring is a frequently used in critical data path, so make it cacheline aligned as struct hns3_enet_tqp_vector. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit c871195601793118ab081d82f7ddd987aa6c7da1 Author: Yunsheng Lin Date: Sat Oct 19 16:03:52 2019 +0800 net: hns3: introduce ring_to_netdev() in enet module There are a few places that need to access the netdev of a ring through ring->tqp->handle->kinfo.netdev, and ring->tqp is a struct which both in enet and hclge modules, it is better to use the struct that is only used in enet module. This patch adds the ring_to_netdev() to access the netdev of ring through ring->tqp_vector->napi.dev. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 88b7c58c199dd231fd87703f4a6209eec60ab138 Author: Yunsheng Lin Date: Sat Oct 19 16:03:51 2019 +0800 net: hns3: minor optimization for barrier in IO path Currently, the TX and RX ring in a queue is bounded to the same IRQ, there may be unnecessary barrier op when only one of the ring need to be processed. This patch adjusts the location of rmb() in hns3_clean_tx_ring() and adds a checking in hns3_clean_rx_ring() to avoid unnecessary barrier op when there is nothing to do for the ring. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0e02a53d64b470b96739189c015f6d9225c11587 Author: Guojia Liao Date: Sat Oct 19 16:03:50 2019 +0800 net: hns3: optimized MAC address in management table. mac_addr_hi32 and mac_addr_lo16 are used to store the MAC address for management table. But using array of mac_addr[ETH_ALEN] would be more general and not need to care about the big-endian mode of the CPU. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5f06b903cb0b85194e66675267b565d40a22026c Author: Yunsheng Lin Date: Sat Oct 19 16:03:49 2019 +0800 net: hns3: remove struct hns3_nic_ring_data in hns3_enet module Only the queue_index field in struct hns3_nic_ring_data is used, other field is unused and unnecessary for hns3 driver, so this patch removes it and move the queue_index field to hns3_enet_ring. This patch also removes an unused struct hns_queue declaration. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 2aa8d8d04ca29c3269154e1d48855e498be8882f Author: Christian Brauner Date: Mon Oct 21 11:10:55 2019 +0200 seccomp: fix SECCOMP_USER_NOTIF_FLAG_CONTINUE test The ifndef for SECCOMP_USER_NOTIF_FLAG_CONTINUE was placed under the ifndef for the SECCOMP_FILTER_FLAG_NEW_LISTENER feature. This will not work on systems that do support SECCOMP_FILTER_FLAG_NEW_LISTENER but do not support SECCOMP_USER_NOTIF_FLAG_CONTINUE. So move the latter ifndef out of the former ifndef's scope. 2019-10-20 11:14:01 make run_tests -C seccomp make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.6-0eebfed2954f152259cae0ad57b91d3ea92968e8/tools/testing/selftests/seccomp' gcc -Wl,-no-as-needed -Wall seccomp_bpf.c -lpthread -o seccomp_bpf seccomp_bpf.c: In function ‘user_notification_continue’: seccomp_bpf.c:3562:15: error: ‘SECCOMP_USER_NOTIF_FLAG_CONTINUE’ undeclared (first use in this function) resp.flags = SECCOMP_USER_NOTIF_FLAG_CONTINUE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ seccomp_bpf.c:3562:15: note: each undeclared identifier is reported only once for each function it appears in Makefile:12: recipe for target 'seccomp_bpf' failed make: *** [seccomp_bpf] Error 1 make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.6-0eebfed2954f152259cae0ad57b91d3ea92968e8/tools/testing/selftests/seccomp' Reported-by: kernel test robot Fixes: 0eebfed2954f ("seccomp: test SECCOMP_USER_NOTIF_FLAG_CONTINUE") Cc: linux-kselftest@vger.kernel.org Signed-off-by: Christian Brauner Reviewed-by: Tycho Andersen Link: https://lore.kernel.org/r/20191021091055.4644-1-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit 3fb21fc8cc04e9a75a426510dfe597f0d0b19134 Author: kaixuxia Date: Mon Oct 21 08:55:33 2019 -0700 xfs: remove the duplicated inode log fieldmask set The xfs_bumplink() call has set the inode log fieldmask XFS_ILOG_CORE, so the next xfs_trans_log_inode() call is not necessary. Signed-off-by: kaixuxia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1e190f8e8098b95d9f48f91db8b618a2d371c13a Author: Christoph Hellwig Date: Sat Oct 19 09:09:47 2019 -0700 xfs: improve the IOMAP_NOWAIT check for COW inodes Only bail out once we know that a COW allocation is actually required, similar to how we handle normal data fork allocations. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5c5b6f7585d272a2fccf4ccf9b85251f6fbeb124 Author: Christoph Hellwig Date: Sat Oct 19 09:09:47 2019 -0700 xfs: cleanup xfs_direct_write_iomap_begin Move more checks into the helpers that determine if we need a COW operation or allocation and split the return path for when an existing data for allocation has been found versus a new allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 12dfb58af61da826839f50cf8cd089150c478880 Author: Christoph Hellwig Date: Sat Oct 19 09:09:47 2019 -0700 xfs: rename the whichfork variable in xfs_buffered_write_iomap_begin Renaming whichfork to allocfork in xfs_buffered_write_iomap_begin makes the usage of this variable a little more clear. Signed-off-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f150b4234397448c6abab8785e58a222bfd9ec00 Author: Christoph Hellwig Date: Sat Oct 19 09:09:46 2019 -0700 xfs: split the iomap ops for buffered vs direct writes Instead of lots of magic conditionals in the main write_begin handler this make the intent very clear. Thing will become even better once we support delayed allocations for extent size hints and realtime allocations. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a526c85c22363a145be4feb6deb895eeee484ca1 Author: Christoph Hellwig Date: Sat Oct 19 09:09:46 2019 -0700 xfs: move xfs_file_iomap_begin_delay around Move xfs_file_iomap_begin_delay near the end of the file next to the other iomap functions to prepare for additional refactoring. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 690c2a38878e88d7182cf30d87864b565391d531 Author: Christoph Hellwig Date: Sat Oct 19 09:09:45 2019 -0700 xfs: split out a new set of read-only iomap ops Start untangling xfs_file_iomap_begin by splitting out the read-only case into its own set of iomap_ops with a very simply iomap_begin helper. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 43568226a4a3da1b63a34578d33725291f2c5918 Author: Christoph Hellwig Date: Sat Oct 19 09:09:44 2019 -0700 xfs: factor out a helper to calculate the end_fsb We have lots of places that want to calculate the final fsb for a offset + count in bytes and check that the result fits into s_maxbytes. Factor out a helper for that. Signed-off-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 36adcbace24e99ed89ac5310a0e1c3890e551665 Author: Christoph Hellwig Date: Sat Oct 19 09:09:44 2019 -0700 xfs: fill out the srcmap in iomap_begin Replace our local hacks to report the source block in the main iomap with the proper scrmap reporting. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ae36b53c6c606a6a7fc1b1d5a08df3221655a619 Author: Christoph Hellwig Date: Sat Oct 19 09:09:43 2019 -0700 xfs: refactor xfs_file_iomap_begin_delay Rejuggle the return path to prepare for filling out a source iomap. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ffb375a8cf208a5dab818f65b633cdf368f7953c Author: Christoph Hellwig Date: Sat Oct 19 09:09:43 2019 -0700 xfs: pass two imaps to xfs_reflink_allocate_cow xfs_reflink_allocate_cow consumes the source data fork imap, and potentially returns the COW fork imap. Split the arguments in two to clear up the calling conventions and to prepare for returning a source iomap from ->iomap_begin. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit dd26b84640cc92a0dc30ea5feee2a7b30852ac06 Author: Christoph Hellwig Date: Sat Oct 19 09:09:43 2019 -0700 xfs: remove xfs_reflink_dirty_extents Now that xfs_file_unshare is not completely dumb we can just call it directly without iterating the extent and reflink btrees ourselves. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0d45e3a2082225ad8e8b211b7f00ee9bb99ea748 Author: Christoph Hellwig Date: Sat Oct 19 09:09:42 2019 -0700 xfs: also call xfs_file_iomap_end_delalloc for zeroing operations There is no reason not to punch out stale delalloc blocks for zeroing operations, as they otherwise behave exactly like normal writes. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3f8a4f1d876d3e3e49e50b0396eaffcc4ba71b08 Author: Dave Chinner Date: Thu Oct 17 13:40:33 2019 -0700 xfs: fix inode fork extent count overflow [commit message is verbose for discussion purposes - will trim it down later. Some questions about implementation details at the end.] Zorro Lang recently ran a new test to stress single inode extent counts now that they are no longer limited by memory allocation. The test was simply: # xfs_io -f -c "falloc 0 40t" /mnt/scratch/big-file # ~/src/xfstests-dev/punch-alternating /mnt/scratch/big-file This test uncovered a problem where the hole punching operation appeared to finish with no error, but apparently only created 268M extents instead of the 10 billion it was supposed to. Further, trying to punch out extents that should have been present resulted in success, but no change in the extent count. It looked like a silent failure. While running the test and observing the behaviour in real time, I observed the extent coutn growing at ~2M extents/minute, and saw this after about an hour: # xfs_io -f -c "stat" /mnt/scratch/big-file |grep next ; \ > sleep 60 ; \ > xfs_io -f -c "stat" /mnt/scratch/big-file |grep next fsxattr.nextents = 127657993 fsxattr.nextents = 129683339 # And a few minutes later this: # xfs_io -f -c "stat" /mnt/scratch/big-file |grep next fsxattr.nextents = 4177861124 # Ah, what? Where did that 4 billion extra extents suddenly come from? Stop the workload, unmount, mount: # xfs_io -f -c "stat" /mnt/scratch/big-file |grep next fsxattr.nextents = 166044375 # And it's back at the expected number. i.e. the extent count is correct on disk, but it's screwed up in memory. I loaded up the extent list, and immediately: # xfs_io -f -c "stat" /mnt/scratch/big-file |grep next fsxattr.nextents = 4192576215 # It's bad again. So, where does that number come from? xfs_fill_fsxattr(): if (ip->i_df.if_flags & XFS_IFEXTENTS) fa->fsx_nextents = xfs_iext_count(&ip->i_df); else fa->fsx_nextents = ip->i_d.di_nextents; And that's the behaviour I just saw in a nutshell. The on disk count is correct, but once the tree is loaded into memory, it goes whacky. Clearly there's something wrong with xfs_iext_count(): inline xfs_extnum_t xfs_iext_count(struct xfs_ifork *ifp) { return ifp->if_bytes / sizeof(struct xfs_iext_rec); } Simple enough, but 134M extents is 2**27, and that's right about where things went wrong. A struct xfs_iext_rec is 16 bytes in size, which means 2**27 * 2**4 = 2**31 and we're right on target for an integer overflow. And, sure enough: struct xfs_ifork { int if_bytes; /* bytes in if_u1 */ .... Once we get 2**27 extents in a file, we overflow if_bytes and the in-core extent count goes wrong. And when we reach 2**28 extents, if_bytes wraps back to zero and things really start to go wrong there. This is where the silent failure comes from - only the first 2**28 extents can be looked up directly due to the overflow, all the extents above this index wrap back to somewhere in the first 2**28 extents. Hence with a regular pattern, trying to punch a hole in the range that didn't have holes mapped to a hole in the first 2**28 extents and so "succeeded" without changing anything. Hence "silent failure"... Fix this by converting if_bytes to a int64_t and converting all the index variables and size calculations to use int64_t types to avoid overflows in future. Signed integers are still used to enable easy detection of extent count underflows. This enables scalability of extent counts to the limits of the on-disk format - MAXEXTNUM (2**31) extents. Current testing is at over 500M extents and still going: fsxattr.nextents = 517310478 Reported-by: Zorro Lang Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4b29ab04ab0d1856b4efb2d28096352d12e807b3 Author: Christoph Hellwig Date: Mon Oct 14 10:36:43 2019 -0700 xfs: remove the XLOG_STATE_DO_CALLBACK state XLOG_STATE_DO_CALLBACK is only entered through XLOG_STATE_DONE_SYNC and just used in a single debug check. Remove the flag and thus simplify the calling conventions for xlog_state_do_callback and xlog_state_iodone_process_iclog. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 1858bb0bec612df1bff11e982c5114ac398b0741 Author: Christoph Hellwig Date: Mon Oct 14 10:36:43 2019 -0700 xfs: turn ic_state into an enum ic_state really is a set of different states, even if the values are encoded as non-conflicting bits and we sometimes use logical and operations to check for them. Switch all comparisms to check for exact values (and use switch statements in a few places to make it more clear) and turn the values into an implicitly enumerated enum type. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit fe9c0e77acc5e750f8a66ff61fafb50cfda91070 Author: Christoph Hellwig Date: Mon Oct 14 10:36:42 2019 -0700 xfs: remove the unused XLOG_STATE_ALL and XLOG_STATE_UNUSED flags Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 032cc34ed5171e380ed4761aab679274587658b7 Author: Christoph Hellwig Date: Mon Oct 14 10:36:42 2019 -0700 xfs: remove dead ifdef XFSERRORDEBUG code XFSERRORDEBUG is never set and the code isn't all that useful, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit df732b29c807640cada8092d76c87e1ed5ce9bba Author: Christoph Hellwig Date: Mon Oct 14 10:36:41 2019 -0700 xfs: call xlog_state_release_iclog with l_icloglock held All but one caller of xlog_state_release_iclog hold l_icloglock and need to drop and reacquire it to call xlog_state_release_iclog. Switch the xlog_state_release_iclog calling conventions to expect the lock to be held, and open code the logic (using a shared helper) in the only remaining caller that does not have the lock (and where not holding it is a nice performance optimization). Also move the refactored code to require the least amount of forward declarations. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: minor whitespace cleanup] Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 390aab0a164052b7bf299dec8af52a80f7c0dcc4 Author: Christoph Hellwig Date: Mon Oct 14 10:36:41 2019 -0700 xfs: move the locking from xlog_state_finish_copy to the callers This will allow optimizing various locking cycles in the following patches. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 2c68a1dfbd8e3ec3ffa274d63312a7bb43b32f47 Author: Christoph Hellwig Date: Mon Oct 14 10:36:40 2019 -0700 xfs: remove the unused ic_io_size field from xlog_in_core ic_io_size is only used inside xlog_write_iclog, where we can just use the count parameter intead. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit cd95cb962b7d3e6591193fb554ff722d1dc35eba Author: Christoph Hellwig Date: Mon Oct 14 10:36:40 2019 -0700 xfs: pass the correct flag to xlog_write_iclog xlog_write_iclog expects a bool for the second argument. While any non-0 value happens to work fine this makes all calls consistent. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit dc8e69bd721840bc22ffe5aa8598fd92b44f0334 Author: Brian Foster Date: Sun Oct 13 17:10:36 2019 -0700 xfs: optimize near mode bnobt scans with concurrent cntbt lookups The near mode fallback algorithm consists of a left/right scan of the bnobt. This algorithm has very poor breakdown characteristics under worst case free space fragmentation conditions. If a suitable extent is far enough from the locality hint, each allocation may scan most or all of the bnobt before it completes. This causes pathological behavior and extremely high allocation latencies. While locality is important to near mode allocations, it is not so important as to incur pathological allocation latency to provide the asolute best available locality for every allocation. If the allocation is large enough or far enough away, there is a point of diminishing returns. As such, we can bound the overall operation by including an iterative cntbt lookup in the broader search. The cntbt lookup is optimized to immediately find the extent with best locality for the given size on each iteration. Since the cntbt is indexed by extent size, the lookup repeats with a variably aggressive increasing search key size until it runs off the edge of the tree. This approach provides a natural balance between the two algorithms for various situations. For example, the bnobt scan is able to satisfy smaller allocations such as for inode chunks or btree blocks more quickly where the cntbt search may have to search through a large set of extent sizes when the search key starts off small relative to the largest extent in the tree. On the other hand, the cntbt search more deterministically covers the set of suitable extents for larger data extent allocation requests that the bnobt scan may have to search the entire tree to locate. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d29688257fd425f7c64c3525fea29658b50fc390 Author: Brian Foster Date: Sun Oct 13 17:10:35 2019 -0700 xfs: factor out tree fixup logic into helper Lift the btree fixup path into a helper function. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0e26d5ca4a40211a4e2acd15a5cb229184c1f867 Author: Brian Foster Date: Sun Oct 13 17:10:35 2019 -0700 xfs: refactor near mode alloc bnobt scan into separate function In preparation to enhance the near mode allocation bnobt scan algorithm, lift it into a separate function. No functional changes. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 78d7aabdeea38368dc5e0aff2d3d1c353a7ab344 Author: Brian Foster Date: Sun Oct 13 17:10:34 2019 -0700 xfs: refactor and reuse best extent scanning logic The bnobt "find best" helper implements a simple btree walker function. This general pattern, or a subset thereof, is reused in various parts of a near mode allocation operation. For example, the bnobt left/right scans are each iterative btree walks along with the cntbt lastblock scan. Rework this function into a generic btree walker, add a couple parameters to control termination behavior from various contexts and reuse it where applicable. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4a65b7c2c72c3940a4472c49743fdb65a03a9935 Author: Brian Foster Date: Sun Oct 13 17:10:34 2019 -0700 xfs: refactor allocation tree fixup code Both algorithms duplicate the same btree allocation code. Eliminate the duplication and reuse the fallback algorithm codepath. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit fec0afdaf498a9a923c3688cc9f9c91a73f5bcd8 Author: Brian Foster Date: Sun Oct 13 17:10:33 2019 -0700 xfs: reuse best extent tracking logic for bnobt scan The near mode bnobt scan searches left and right in the bnobt looking for the closest free extent to the allocation hint that satisfies minlen. Once such an extent is found, the left/right search terminates, we search one more time in the opposite direction and finish the allocation with the best overall extent. The left/right and find best searches are currently controlled via a combination of cursor state and local variables. Clean up this code and prepare for further improvements to the near mode fallback algorithm by reusing the allocation cursor best extent tracking mechanism. Update the tracking logic to deactivate bnobt cursors when out of allocation range and replace open-coded extent checks to calls to the common helper. In doing so, rename some misnamed local variables in the top-level near mode allocation function. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 396bbf3c657e540162b7297e426e5939c2909854 Author: Brian Foster Date: Sun Oct 13 17:10:33 2019 -0700 xfs: refactor cntbt lastblock scan best extent logic into helper The cntbt lastblock scan checks the size, alignment, locality, etc. of each free extent in the block and compares it with the current best candidate. This logic will be reused by the upcoming optimized cntbt algorithm, so refactor it into a separate helper. Note that acur->diff is now initialized to -1 (unsigned) instead of 0 to support the more granular comparison logic in the new helper. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c62321a2a0ea3c53ab7a41cf4d4071ee37bcc2c0 Author: Brian Foster Date: Sun Oct 13 17:10:32 2019 -0700 xfs: track best extent from cntbt lastblock scan in alloc cursor If the size lookup lands in the last block of the by-size btree, the near mode algorithm scans the entire block for the extent with best available locality. In preparation for similar best available extent tracking across both btrees, extend the allocation cursor with best extent data and lift the associated state from the cntbt last block scan code. No functional changes. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d6d3aff20377fcb38913152d53c54e0010462ccb Author: Brian Foster Date: Sun Oct 13 17:10:32 2019 -0700 xfs: track allocation busy state in allocation cursor Extend the allocation cursor to track extent busy state for an allocation attempt. No functional changes. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f5e7dbea1e3ecc27f05e8cc83614c206903cc97a Author: Brian Foster Date: Sun Oct 13 17:10:31 2019 -0700 xfs: introduce allocation cursor data structure Introduce a new allocation cursor data structure to encapsulate the various states and structures used to perform an extent allocation. This structure will eventually be used to track overall allocation state across different search algorithms on both free space btrees. To start, include the three btree cursors (one for the cntbt and two for the bnobt left/right search) used by the near mode allocation algorithm and refactor the cursor setup and teardown code into helpers. This slightly changes cursor memory allocation patterns, but otherwise makes no functional changes to the allocation algorithm. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong [darrick: fix sparse complaints] Signed-off-by: Darrick J. Wong commit f6b428a46d60186a38105c71fa435f31240721f9 Author: Brian Foster Date: Sun Oct 13 17:10:31 2019 -0700 xfs: track active state of allocation btree cursors The upcoming allocation algorithm update searches multiple allocation btree cursors concurrently. As such, it requires an active state to track when a particular cursor should continue searching. While active state will be modified based on higher level logic, we can define base functionality based on the result of allocation btree lookups. Define an active flag in the private area of the btree cursor. Update it based on the result of lookups in the existing allocation btree helpers. Finally, provide a new helper to query the current state. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit bdb2ed2dbdc227a97e8f37ecf0effc3537bcf789 Author: Christoph Hellwig Date: Mon Oct 14 10:07:21 2019 -0700 xfs: ignore extent size hints for always COW inodes There is no point in applying extent size hints for always COW inodes, as we would just have to COW any extra allocation beyond the data actually written. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e5e634041bc184fe8975e0a32f96985a04ace09f Author: yu kuai Date: Mon Oct 14 10:34:32 2019 -0700 xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS In commit d03a2f1b9fa8 ("xfs: include WARN, REPAIR build options in XFS_BUILD_OPTIONS"), Eric pointed out that the XFS_BUILD_OPTIONS string, shown at module init time and in modinfo output, does not currently include all available build options. So, he added in CONFIG_XFS_WARN and CONFIG_XFS_REPAIR. However, this is not enough, add in CONFIG_XFS_QUOTA and CONFIG_XFS_ASSERT_FATAL. Signed-off-by: yu kuai Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c039b99792726346ad46ff17c5a5bcb77a5edac4 Author: Goldwyn Rodrigues Date: Fri Oct 18 16:44:10 2019 -0700 iomap: use a srcmap for a read-modify-write I/O The srcmap is used to identify where the read is to be performed from. It is passed to ->iomap_begin, which can fill it in if we need to read data for partially written blocks from a different location than the write target. The srcmap is only supported for buffered writes so far. Signed-off-by: Goldwyn Rodrigues [hch: merged two patches, removed the IOMAP_F_COW flag, use iomap as srcmap if not set, adjust length down to srcmap end as well] Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Goldwyn Rodrigues commit eb81cf9d0e18d438e27339e0d1a49d3ac8644674 Author: Christoph Hellwig Date: Fri Oct 18 16:43:08 2019 -0700 iomap: renumber IOMAP_HOLE to 0 Instead of keeping a separate unnamed state for uninitialized iomaps, renumber IOMAP_HOLE to zero so that an uninitialized iomap is treated as a hole. Suggested-by: Darrick J. Wong Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 32a38a4991043976fc2d8840a55ce5dde41fdbd0 Author: Christoph Hellwig Date: Fri Oct 18 16:42:50 2019 -0700 iomap: use write_begin to read pages to unshare Use the existing iomap write_begin code to read the pages unshared by iomap_file_unshare. That avoids the extra ->readpage call and extent tree lookup currently done by read_mapping_page. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d3b404396977fde1daca3fb4fd4d3b01a3749093 Author: Christoph Hellwig Date: Fri Oct 18 16:42:24 2019 -0700 iomap: move the zeroing case out of iomap_read_page_sync That keeps the function a little easier to understand, and easier to modify for pending enhancements. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3590c4d8979bcc364e2ded95ab3966b4e436b7bf Author: Christoph Hellwig Date: Fri Oct 18 16:41:34 2019 -0700 iomap: ignore non-shared or non-data blocks in xfs_file_dirty xfs_file_dirty is used to unshare reflink blocks. Rename the function to xfs_file_unshare to better document that purpose, and skip iomaps that are not shared and don't need zeroing. This will allow to simplify the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit dcd6158d15c7a57d448103e1d51dac5e1a19a406 Author: Christoph Hellwig Date: Fri Oct 18 16:41:12 2019 -0700 iomap: always use AOP_FLAG_NOFS in iomap_write_begin All callers pass AOP_FLAG_NOFS, so lift that flag to iomap_write_begin to allow reusing the flags arguments for an internal flags namespace soon. Also remove the local index variable that is only used once. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c12d6fa88d09044df8bc91efa0e1a6fd2c5c0e1c Author: Christoph Hellwig Date: Fri Oct 18 16:40:57 2019 -0700 iomap: remove the unused iomap argument to __iomap_write_end Signed-off-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 65a60e8687c1c8f69aae3e77eafbf4a54b9f99e7 Author: Christoph Hellwig Date: Fri Oct 18 16:40:17 2019 -0700 iomap: better document the IOMAP_F_* flags The documentation for IOMAP_F_* is a bit disorganized, and doesn't mention the fact that most flags are set by the file system and consumed by the iomap core, while IOMAP_F_SIZE_CHANGED is set by the core and consumed by the file system. Signed-off-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9cd0ed63ca51411af2c8323cbbeaa33d16c62688 Author: Darrick J. Wong Date: Thu Oct 17 14:02:07 2019 -0700 iomap: enhance writeback error message If we encounter an IO error during writeback, log the inode, offset, and sector number of the failure, instead of forcing the user to do some sort of reverse mapping to figure out which file is affected. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 48d64cd18b33791d4efb2b9dd10104f84dde7d3c Author: Christoph Hellwig Date: Thu Oct 17 13:12:22 2019 -0700 iomap: pass a struct page to iomap_finish_page_writeback No need to pass the full bio_vec. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b3d423ec898ae27007a9c49915ac06a2f50b404f Author: Christoph Hellwig Date: Thu Oct 17 13:12:20 2019 -0700 iomap: cleanup iomap_ioend_compare Move the initialization of ia and ib to the declaration line and remove a superflous else. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ab08b01ec0a205d9c98e712eb504c850a51e6fdb Author: Christoph Hellwig Date: Thu Oct 17 13:12:19 2019 -0700 iomap: move struct iomap_page out of iomap.h Now that all the writepage code is in the iomap code there is no need to keep this structure public. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3e19e6f3eeea26490a84cdd18c7220e640f4837e Author: Christoph Hellwig Date: Thu Oct 17 13:12:17 2019 -0700 iomap: warn on inline maps in iomap_writepage_map And inline mapping should never mark the page dirty and thus never end up in writepages. Add a check for that condition and warn if it happens. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 598ecfbaa742aca0dcdbbea25681406f95cc0b63 Author: Christoph Hellwig Date: Thu Oct 17 13:12:15 2019 -0700 iomap: lift the xfs writeback code to iomap Take the xfs writeback code and move it to fs/iomap. A new structure with three methods is added as the abstraction from the generic writeback code to the file system. These methods are used to map blocks, submit an ioend, and cancel a page that encountered an error before it was added to an ioend. Signed-off-by: Christoph Hellwig [darrick: rename ->submit_ioend to ->prepare_ioend to clarify what it does] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 9e91c5728cab3d0aa3197d009c3d63e147914e77 Author: Christoph Hellwig Date: Thu Oct 17 13:12:13 2019 -0700 iomap: lift common tracing code from xfs to iomap Lift the xfs code for tracing address space operations to the iomap layer. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 009d8d849d3ff59b1a23d2df2c55f2130b2ec7f2 Author: Christoph Hellwig Date: Thu Oct 17 13:12:12 2019 -0700 iomap: zero newly allocated mapped blocks File systems like gfs2 don't support delayed allocations or unwritten extents and thus allocate normal mapped blocks to fill holes. To cover the case of such file systems allocating new blocks to fill holes also zero out mapped blocks with the new flag. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 760fea8bfb7f6095df3c4d37987b86b818f78c88 Author: Christoph Hellwig Date: Thu Oct 17 13:12:10 2019 -0700 xfs: remove the fork fields in the writepage_ctx and ioend In preparation for moving the writeback code to iomap.c, replace the XFS-specific COW fork concept with the iomap IOMAP_F_SHARED flag. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5653017bc44e54baa299f3523f160c23ac0628fd Author: Christoph Hellwig Date: Thu Oct 17 13:12:09 2019 -0700 xfs: turn io_append_trans into an io_private void pointer In preparation for moving the ioend structure to common code we need to get rid of the xfs-specific xfs_trans type. Just make it a file system private void pointer instead. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 433dad94ec5d6b90385b56a8bc8718dd9542b289 Author: Christoph Hellwig Date: Thu Oct 17 13:12:07 2019 -0700 xfs: refactor the ioend merging code Introduce two nicely abstracted helper, which can be moved to the iomap code later. Also use list_first_entry_or_null to simplify the code a bit. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4e087a3b313cc664057279b1e40372fc97e3e212 Author: Christoph Hellwig Date: Thu Oct 17 13:12:06 2019 -0700 xfs: use a struct iomap in xfs_writepage_ctx In preparation for moving the XFS writeback code to fs/iomap.c, switch it to use struct iomap instead of the XFS-specific struct xfs_bmbt_irec. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 05b30949f1aa8d797eb5c1cf7a24b9c4f8e82320 Author: Christoph Hellwig Date: Thu Oct 17 13:12:04 2019 -0700 xfs: set IOMAP_F_NEW more carefully Don't set IOMAP_F_NEW if we COW over an existing allocated range, as these aren't strictly new allocations. This is required to be able to use IOMAP_F_NEW to zero newly allocated blocks, which is required for the iomap code to fully support file systems that don't do delayed allocations or use unwritten extents. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2492a606b3d24ed901203bd4db19f46d112811c7 Author: Christoph Hellwig Date: Thu Oct 17 13:12:02 2019 -0700 xfs: initialize iomap->flags in xfs_bmbt_to_iomap Currently we don't overwrite the flags field in the iomap in xfs_bmbt_to_iomap. This works fine with 0-initialized iomaps on stack, but is harmful once we want to be able to reuse an iomap in the writeback code. Replace the shared parameter with a set of initial flags an thus ensures the flags field is always reinitialized. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3347a80965b38f096b1d6f995c00c9c9e53d4b8b Author: Stefan Wahren Date: Sun Oct 6 17:28:19 2019 +0200 Bluetooth: hci_bcm: Fix RTS handling during startup The RPi 4 uses the hardware handshake lines for CYW43455, but the chip doesn't react to HCI requests during DT probe. The reason is the inproper handling of the RTS line during startup. According to the startup signaling sequence in the CYW43455 datasheet, the hosts RTS line must be driven after BT_REG_ON and BT_HOST_WAKE. Signed-off-by: Stefan Wahren Signed-off-by: Marcel Holtmann commit bba79fee7a54ff5351fa36cb324d16b108a7ca06 Author: Jeffrey Hugo Date: Mon Oct 21 07:18:27 2019 -0700 Revert "Bluetooth: hci_qca: Add delay for wcn3990 stability" This reverts commit cde9dde6e11a5ab54b6462cd46d82878926783bc. The frame reassembly errors were root caused to a transient gpio issue. The missing response was root caused to an issue with properly managing RFR in the uart driver. Addressing those root causes occurs outside of hci_qca and eliminates the need for the 50ms delay, so remove it. Signed-off-by: Jeffrey Hugo Signed-off-by: Marcel Holtmann commit b2d6ee75312649d55b41386d1d80cdbca48e3cf0 Author: Nuno Sá Date: Mon Oct 21 16:08:16 2019 +0200 ASOC: adau7118: Change regulators id Change the regulators id in accordance with b670e44fc3bd. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20191021140816.262401-3-nuno.sa@analog.com Signed-off-by: Mark Brown commit b5c2e97e08070fa523bd2ddae8020bd42e0a362e Author: Nuno Sá Date: Mon Oct 21 16:08:15 2019 +0200 dt-bindings: asoc: adau7118: Cleanup This changes are in accordance with the review done to this bindings. This is a follow-up patch to 969d49b2cdc8. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20191021140816.262401-2-nuno.sa@analog.com Signed-off-by: Mark Brown commit 9e1b4999a1693d67cc87a887057d8012c28fb12b Author: Thierry Reding Date: Wed Oct 16 09:30:33 2019 +0200 pwm: stm32: Pass breakinput instead of its values Instead of passing the individual values of the breakpoint, pass a pointer to the breakpoint. Signed-off-by: Thierry Reding commit 8e53622594f5530b5a86094464937dda47fc6e3b Author: Thierry Reding Date: Wed Oct 16 12:42:40 2019 +0200 pwm: stm32: Remove clutter from ternary operator Remove usage of the ternary operator to assign values for register fields. Instead, parameterize the register and field offset macros and pass the index to them. This removes clutter and improves readability. Signed-off-by: Thierry Reding commit 8dfa620e3d70d3eceff59943b29257949505dd33 Author: Thierry Reding Date: Wed Oct 16 12:06:31 2019 +0200 pwm: stm32: Validate breakinput data from DT Both index and level can only be either 0 or 1 and the filter value is limited to values between (and including) 0 and 15. Validate that the device tree node contains values that are within these ranges. Signed-off-by: Thierry Reding commit 27938fd8ba78b4c7f9a2385b7b52cca19ab891b8 Author: Rasmus Villemoes Date: Fri Oct 4 15:32:07 2019 +0200 pwm: Update comment on struct pwm_ops::apply Commit 71523d1812ac (pwm: Ensure pwm_apply_state() doesn't modify the state argument) updated the kernel-doc for pwm_apply_state(), but not for the ->apply callback in the pwm_ops struct. Signed-off-by: Rasmus Villemoes Reviewed-by: Uwe Kleine-König Reviewed-by: Bjorn Andersson Signed-off-by: Thierry Reding commit 50cc7e3e4f26e3bf5ed74a8d061195c4d2161b8b Author: Ondrej Jirman Date: Mon Oct 14 15:53:03 2019 +0200 pwm: sun4i: Fix incorrect calculation of duty_cycle/period Since 5.4-rc1, pwm_apply_state calls ->get_state after ->apply if available, and this revealed an issue with integer precision when calculating duty_cycle and period for the currently set state in ->get_state callback. This issue manifested in broken backlight on several Allwinner based devices. Previously this worked, because ->apply updated the passed state directly. Fixes: deb9c462f4e53 ("pwm: sun4i: Don't update the state for the caller of pwm_apply_state") Signed-off-by: Ondrej Jirman Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 2d3aa06b5de097747d848a9d714987a4aa2303aa Author: Fabrice Gasnier Date: Fri Oct 4 14:53:53 2019 +0200 pwm: stm32: Add power management support Add suspend/resume PM sleep ops. When going to low power, enforce the PWM channel isn't active. Let the PWM consumers disable it during their own suspend sequence, see [1]. So, perform a check here, and handle the pinctrl states. Also restore the break inputs upon resume, as registers content may be lost when going to low power mode. [1] https://lkml.org/lkml/2019/2/5/770 Signed-off-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit 0f9d2ecba883d0788a34414a608055479be81ccd Author: Fabrice Gasnier Date: Fri Oct 4 14:53:52 2019 +0200 pwm: stm32: Split breakinput apply routine to ease PM support Split breakinput routine that configures STM32 timers 'break' safety feature upon probe, into two routines: - stm32_pwm_apply_breakinputs() sets all the break inputs into registers. - stm32_pwm_probe_breakinputs() probes the device tree break input settings before calling stm32_pwm_apply_breakinputs() This is a precursor patch to ease PM support. Registers content may get lost during low power. So, break input settings applied upon probe need to be restored upon resume (e.g. by calling stm32_pwm_apply_breakinputs()). Signed-off-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit 4205e356285ef0e8127d531fcff845eb01108b20 Author: Fabrice Gasnier Date: Fri Oct 4 14:53:51 2019 +0200 dt-bindings: pwm-stm32: Document pinctrl sleep state Add documentation for pinctrl sleep state that can be used by STM32 timers PWM. Signed-off-by: Fabrice Gasnier Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 1b98ad3b3be98f2c99f4d63679511eb97a26b8bb Author: Colin Ian King Date: Wed Oct 2 11:08:44 2019 +0100 pwm: sun4i: Drop redundant assignment to variable pval Variable pval is being assigned a value that is never read. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Thierry Reding commit 3b2fb67ada60cdde30dca01e0c06b45f7391f8b2 Author: Thierry Reding Date: Mon Sep 30 11:33:31 2019 +0200 dt-bindings: pwm: mediatek: Remove gratuitous compatible string for MT7629 The MT7629 is, in fact, not compatible with the MT7622 because the former has a single PWM channel while the former has 6. Remove the gratuitous compatible string for MT7629. Reported-by: Sam Shih Signed-off-by: Thierry Reding commit 577dd5de09906e37a407a4326d17e58f6051fa2d Author: Robin Murphy Date: Mon Sep 30 16:24:58 2019 +0100 arm64: dts: juno: add GPU subsystem Since we now have bindings for Mali Midgard GPUs, let's use them to describe Juno's GPU subsystem, if only because we can. Juno sports a Mali-T624 integrated behind an MMU-400 (as a gesture towards virtualisation), in their own dedicated power domain with DVFS controlled by the SCP. CC: Liviu Dudau CC: Sudeep Holla CC: Lorenzo Pieralisi Signed-off-by: Robin Murphy Acked-by: Liviu Dudau Reviewed-by: Rob Herring Signed-off-by: Sudeep Holla commit 46b4bff6572b0552b1ee062043621e4b252638d8 Author: Takashi Iwai Date: Mon Oct 21 16:25:20 2019 +0200 PCI: Fix missing inline for pci_pr3_present() The inline prefix was missing in the dummy function pci_pr3_present() definition. Fix it. Reported-by: kbuild test robot Fixes: 52525b7a3cf8 ("PCI: Add a helper to check Power Resource Requirements _PR3 existence") Link: https://lore.kernel.org/r/201910212111.qHm6OcWx%lkp@intel.com Signed-off-by: Takashi Iwai commit 7855a57d008b2354dd52078974529e08b889f98a Author: Thomas Gleixner Date: Fri Aug 9 14:42:33 2019 +0200 jbd2: Free journal head outside of locked region On PREEMPT_RT bit-spinlocks have the same semantics as on PREEMPT_RT=n, i.e. they disable preemption. That means functions which are not safe to be called in preempt disabled context on RT trigger a might_sleep() assert. The journal head bit spinlock is mostly held for short code sequences with trivial RT safe functionality, except for one place: jbd2_journal_put_journal_head() invokes __journal_remove_journal_head() with the journal head bit spinlock held. __journal_remove_journal_head() invokes kmem_cache_free() which must not be called with preemption disabled on RT. Jan suggested to rework the removal function so the actual free happens outside the bit-spinlocked region. Split it into two parts: - Do the sanity checks and the buffer head detach under the lock - Do the actual free after dropping the lock There is error case handling in the free part which needs to dereference the b_size field of the now detached buffer head. Due to paranoia (caused by ignorance) the size is retrieved in the detach function and handed into the free function. Might be over-engineered, but better safe than sorry. This makes the journal head bit-spinlock usage RT compliant and also avoids nested locking which is not covered by lockdep. Suggested-by: Jan Kara Signed-off-by: Thomas Gleixner Cc: linux-ext4@vger.kernel.org Cc: "Theodore Ts'o" Cc: Jan Kara Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20190809124233.13277-8-jack@suse.cz Signed-off-by: Theodore Ts'o commit 464170647b5648bb81f3615567485fcb9a685bed Author: Thomas Gleixner Date: Fri Aug 9 14:42:32 2019 +0200 jbd2: Make state lock a spinlock Bit-spinlocks are problematic on PREEMPT_RT if functions which might sleep on RT, e.g. spin_lock(), alloc/free(), are invoked inside the lock held region because bit spinlocks disable preemption even on RT. A first attempt was to replace state lock with a spinlock placed in struct buffer_head and make the locking conditional on PREEMPT_RT and DEBUG_BIT_SPINLOCKS. Jan pointed out that there is a 4 byte hole in struct journal_head where a regular spinlock fits in and he would not object to convert the state lock to a spinlock unconditionally. Aside of solving the RT problem, this also gains lockdep coverage for the journal head state lock (bit-spinlocks are not covered by lockdep as it's hard to fit a lockdep map into a single bit). The trivial change would have been to convert the jbd_*lock_bh_state() inlines, but that comes with the downside that these functions take a buffer head pointer which needs to be converted to a journal head pointer which adds another level of indirection. As almost all functions which use this lock have a journal head pointer readily available, it makes more sense to remove the lock helper inlines and write out spin_*lock() at all call sites. Fixup all locking comments as well. Suggested-by: Jan Kara Signed-off-by: Thomas Gleixner Signed-off-by: Jan Kara Cc: "Theodore Ts'o" Cc: Mark Fasheh Cc: Joseph Qi Cc: Joel Becker Cc: Jan Kara Cc: linux-ext4@vger.kernel.org Link: https://lore.kernel.org/r/20190809124233.13277-7-jack@suse.cz Signed-off-by: Theodore Ts'o commit 2e710ff03fc4599059eeda68c8de2383e65af825 Author: Jan Kara Date: Fri Aug 9 14:42:31 2019 +0200 jbd2: Don't call __bforget() unnecessarily jbd2_journal_forget() jumps to 'not_jbd' branch which calls __bforget() in cases where the buffer is clean which is pointless. In case of failed assertion, it can be even argued that it is safer not to touch buffer's dirty bits. Also logically it makes more sense to just jump to 'drop' and that will make logic also simpler when we switch bh_state_lock to a spinlock. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20190809124233.13277-6-jack@suse.cz Signed-off-by: Theodore Ts'o commit 6d69843e5d3f0c394e1e3004cc2b36efbe402b71 Author: Jan Kara Date: Fri Aug 9 14:42:30 2019 +0200 jbd2: Drop unnecessary branch from jbd2_journal_forget() We have cleared both dirty & jbddirty bits from the bh. So there's no difference between bforget() and brelse(). Thus there's no point jumping to no_jbd branch. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20190809124233.13277-5-jack@suse.cz Signed-off-by: Theodore Ts'o commit 93108ebb848df8d4948d51db14714a14c4e81111 Author: Jan Kara Date: Fri Aug 9 14:42:29 2019 +0200 jbd2: Move dropping of jh reference out of un/re-filing functions __jbd2_journal_unfile_buffer() and __jbd2_journal_refile_buffer() drop transaction's jh reference when they remove jh from a transaction. This will be however inconvenient once we move state lock into journal_head itself as we still need to unlock it and we'd need to grab jh reference just for that. Move dropping of jh reference out of these functions into the few callers. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20190809124233.13277-4-jack@suse.cz Signed-off-by: Theodore Ts'o commit d8ede917f5cd472e344be636d62b8e1f10bdae5e Author: Thomas Gleixner Date: Fri Aug 9 14:42:28 2019 +0200 jbd2: Remove jbd_trylock_bh_state() No users. Signed-off-by: Thomas Gleixner Reviewed-by: Jan Kara Cc: linux-ext4@vger.kernel.org Cc: "Theodore Ts'o" Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20190809124233.13277-3-jack@suse.cz Signed-off-by: Theodore Ts'o commit d84560f74d852ea0cf663edeaee3a470917c2f36 Author: Thomas Gleixner Date: Fri Aug 9 14:42:27 2019 +0200 jbd2: Simplify journal_unmap_buffer() journal_unmap_buffer() checks first whether the buffer head is a journal. If so it takes locks and then invokes jbd2_journal_grab_journal_head() followed by another check whether this is journal head buffer. The double checking is pointless. Replace the initial check with jbd2_journal_grab_journal_head() which alredy checks whether the buffer head is actually a journal. Allows also early access to the journal head pointer for the upcoming conversion of state lock to a regular spinlock. Signed-off-by: Thomas Gleixner Reviewed-by: Jan Kara Cc: linux-ext4@vger.kernel.org Cc: "Theodore Ts'o" Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20190809124233.13277-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit bacd861452d2be86a4df341b12e32db7dac8021e Author: Kai-Heng Feng Date: Fri Oct 18 15:38:48 2019 +0800 ALSA: hda: Allow HDA to be runtime suspended when dGPU is not bound to a driver Nvidia proprietary driver doesn't support runtime power management, so when a user only wants to use the integrated GPU, it's a common practice to let dGPU not to bind any driver, and let its upstream port to be runtime suspended. At the end of runtime suspension the port uses platform power management to disable power through _OFF method of power resource, which is listed by _PR3. After commit b516ea586d71 ("PCI: Enable NVIDIA HDA controllers"), when the dGPU comes with an HDA function, the HDA won't be suspended if the dGPU is unbound, so the power resource can't be turned off by its upstream port driver. Commit 37a3a98ef601 ("ALSA: hda - Enable runtime PM only for discrete GPU") only allows HDA to be runtime suspended once GPU is bound, to keep APU's HDA working. However, HDA on dGPU isn't that useful if dGPU is not bound to any driver. So let's relax the runtime suspend requirement for dGPU's HDA function, to disable the power source to save lots of power. BugLink: https://bugs.launchpad.net/bugs/1840835 Fixes: b516ea586d71 ("PCI: Enable NVIDIA HDA controllers") Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20191018073848.14590-2-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 52525b7a3cf82adec5c6cf0ecbd23ff228badc94 Author: Kai-Heng Feng Date: Fri Oct 18 15:38:47 2019 +0800 PCI: Add a helper to check Power Resource Requirements _PR3 existence A driver may want to know the existence of _PR3, to choose different runtime suspend behavior. A user will be add in next patch. This is mostly the same as nouveau_pr3_present(). Signed-off-by: Kai-Heng Feng Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20191018073848.14590-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 2b6f5883edcc47ef6146832112a0125810d28f78 Author: Mihail Atanassov Date: Tue Oct 15 11:00:01 2019 +0000 drm/komeda: Dump SC_ENH_* registers from scaler block Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Mihail Atanassov Link: https://patchwork.freedesktop.org/patch/msgid/20191015105936.50039-1-mihail.atanassov@arm.com commit 2cc3cd5fdc8ba07ba590204a3a6f6d16289d25e5 Author: Tzung-Bi Shih Date: Sat Oct 19 15:02:54 2019 +0800 ASoC: mediatek: mt8183: support WoV Add DAI link and pin muxing for wake on voice. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191019143504.4.Ibf012d0cd8679d846213606dc5f426aea1ff590a@changeid Signed-off-by: Mark Brown commit 0cce736d389cbeae6a7d0a72bafb4408d21eb44a Author: Tzung-Bi Shih Date: Sat Oct 19 15:02:53 2019 +0800 ASoC: dt-bindings: mt8183: add ec-codec Add an optional property "ec-codec". If specified, mt8183 could use the "wake on voice" feature offered by EC codec. Acked-by: Rob Herring Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191019143504.3.Iec97a3f137148cdf316056612590b3e0b302f5f3@changeid Signed-off-by: Mark Brown commit 8e8c533b132ad0ce9c99a50ff4c910a8dd7efb8e Author: Tzung-Bi Shih Date: Sat Oct 19 15:02:52 2019 +0800 ASoC: mediatek: mt6358: support WoV Switch mono DMIC on to support wake-on-voice. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191019143504.2.I57266d36564f393e9d701c9db648cc2efb0346fc@changeid Signed-off-by: Mark Brown commit b6bc07d4360dbf766e551f18e43c67fff6784955 Author: Tzung-Bi Shih Date: Sat Oct 19 15:02:51 2019 +0800 ASoC: cros_ec_codec: support WoV 1. Get EC codec's capabilities. 2. Get and set SHM address if any. 3. Transmit language model to EC codec if needed. 4. Start to read audio data from EC codec if receives host event. Signed-off-by: Tzung-Bi Shih Acked-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20191019143504.1.I5388b69a7a9c551078fed216a77440cee6dedf49@changeid Signed-off-by: Mark Brown commit 7d2f70f248ab0e4251591cf7b36cc43281941f56 Author: Stephan Gerhold Date: Sun Oct 20 17:30:07 2019 +0200 ASoC: msm8916-wcd-analog: Add earpiece PM8916 supports an earpiece as another (small) speaker. The earpiece is routed through RX MIX1 similarly to the headphones, except that RDAC2 MUX is set to RX1. Signed-off-by: Stephan Gerhold Acked-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191020153007.206070-2-stephan@gerhold.net Signed-off-by: Mark Brown commit 6cc23ed2ceab880e96ad287d9c85b53659050510 Author: Maciej Falkowski Date: Thu Sep 26 13:02:19 2019 +0200 ASoC: samsung: i2s: Document clocks macros Document clocks macros with their description from 'Documentation/devicetree/bindings/sound/samsung-i2s.txt' Signed-off-by: Maciej Falkowski Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20190926110219.6144-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit 46a4a97063a0e9a1725ba33ae5ac5603a979ad06 Merge: be18010ea2d8 1678e33c21b7 Author: Daniel Borkmann Date: Mon Oct 21 14:49:12 2019 +0200 Merge branch 'bpf-libbpf-cleanups' Andrii Nakryiko says: ==================== This patch set's main goal is to teach bpf_object__open() (and its variants) to automatically derive BPF program type/expected attach type from section names, similarly to how bpf_prog_load() was doing it. This significantly improves user experience by eliminating yet another obvious-only-in-the-hindsight surprise, when using libbpf APIs. There are a bunch of auxiliary clean-ups and improvements. E.g., bpf_program__get_type() and bpf_program__get_expected_attach_type() are added for completeness and symmetry with corresponding setter APIs. Some clean up and fixes in selftests/bpf are done as well. ==================== Signed-off-by: Daniel Borkmann commit 1678e33c21b705e9e5d26385aa1611aabe5482dc Author: Andrii Nakryiko Date: Sun Oct 20 20:39:02 2019 -0700 selftest/bpf: Get rid of a bunch of explicit BPF program type setting Now that libbpf can correctly guess BPF program types from section names, remove a bunch of explicit bpf_program__set_type() calls throughout tests. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191021033902.3856966-8-andriin@fb.com commit 8af1c8b8d6223c31fada6148fd870257407952d1 Author: Andrii Nakryiko Date: Sun Oct 20 20:39:01 2019 -0700 selftests/bpf: Make reference_tracking test use subtests reference_tracking is actually a set of 9 sub-tests. Make it explicitly so. Also, add explicit "classifier/" prefix to BPF program section names to let libbpf correctly guess program type. Thus, also remove explicit bpf_prog__set_type() call. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191021033902.3856966-7-andriin@fb.com commit f90415e9600c5227131531c0ed11514a2d3bbe62 Author: Andrii Nakryiko Date: Sun Oct 20 20:39:00 2019 -0700 selftests/bpf: Make a copy of subtest name test_progs never created a copy of subtest name, rather just stored pointer to whatever string test provided. This is bad as that string might be freed or modified by the end of subtest. Fix this by creating a copy of given subtest name when subtest starts. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191021033902.3856966-6-andriin@fb.com commit dd4436bb838338cfda253d7f012610a73e4078fd Author: Andrii Nakryiko Date: Sun Oct 20 20:38:59 2019 -0700 libbpf: Teach bpf_object__open to guess program types Teach bpf_object__open how to guess program type and expected attach type from section names, similar to what bpf_prog_load() does. This seems like a really useful features and an oversight to not have this done during bpf_object_open(). To preserver backwards compatible behavior of bpf_prog_load(), its attr->prog_type is treated as an override of bpf_object__open() decisions, if attr->prog_type is not UNSPECIFIED. There is a slight difference in behavior for bpf_prog_load(). Previously, if bpf_prog_load() was loading BPF object with more than one program, first program's guessed program type and expected attach type would determine corresponding attributes of all the subsequent program types, even if their sections names suggest otherwise. That seems like a rather dubious behavior and with this change it will behave more sanely: each program's type is determined individually, unless they are forced to uniformity through attr->prog_type. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191021033902.3856966-5-andriin@fb.com commit 32dff6db29acc1d2b9fe0423ab033f15c717d776 Author: Andrii Nakryiko Date: Sun Oct 20 20:38:58 2019 -0700 libbpf: Add uprobe/uretprobe and tp/raw_tp section suffixes Map uprobe/uretprobe into KPROBE program type. tp/raw_tp are just an alias for more verbose tracepoint/raw_tracepoint, respectively. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191021033902.3856966-4-andriin@fb.com commit f1eead9e3ceef67b98be4b55ed1bfcfa4497b7db Author: Andrii Nakryiko Date: Sun Oct 20 20:38:57 2019 -0700 libbpf: Add bpf_program__get_{type, expected_attach_type) APIs There are bpf_program__set_type() and bpf_program__set_expected_attach_type(), but no corresponding getters, which seems rather incomplete. Fix this. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191021033902.3856966-3-andriin@fb.com commit bc3f2956f2b2241aac339d0a1ab7e3a0b8fcc886 Author: Andrii Nakryiko Date: Sun Oct 20 20:38:56 2019 -0700 tools: Sync if_link.h Sync if_link.h into tools/ and get rid of annoying libbpf Makefile warning. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191021033902.3856966-2-andriin@fb.com commit be18010ea2d83c184cc32afdc895410a1cf2cbd5 Author: Kefeng Wang Date: Mon Oct 21 13:55:32 2019 +0800 tools, bpf: Rename pr_warning to pr_warn to align with kernel logging For kernel logging macros, pr_warning() is completely removed and replaced by pr_warn(). By using pr_warn() in tools/lib/bpf/ for symmetry to kernel logging macros, we could eventually drop the use of pr_warning() in the whole kernel tree. Signed-off-by: Kefeng Wang Signed-off-by: Daniel Borkmann Reviewed-by: Sergey Senozhatsky Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191021055532.185245-1-wangkefeng.wang@huawei.com commit ece485d550dce216866965ab7ebb1854f1c91bf8 Author: Dariusz Marcinkiewicz Date: Thu Oct 17 09:28:41 2019 +0200 drm: tda998x: use cec_notifier_conn_(un)register Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20191017072842.16793-2-hverkuil-cisco@xs4all.nl commit e2c913e4fd9e1cc5a523164ac87d100e34f19e9e Author: Eddie James Date: Fri Sep 13 11:35:09 2019 -0500 i2c: Aspeed: Add AST2600 compatible The driver default behavior works with the AST2600. We need a new compatible though to make sure the driver doesn't enable AST2400 or AST2500 behavior. Signed-off-by: Eddie James Reviewed-by: Brendan Higgins Signed-off-by: Wolfram Sang commit c1e83e32885d373077ad1df7cfd82c38e40e2701 Author: Eddie James Date: Fri Sep 13 11:35:10 2019 -0500 dt-bindings: i2c: Aspeed: Add AST2600 compatible Document the AST2600 I2C bus compatible string. Signed-off-by: Eddie James Reviewed-by: Brendan Higgins Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit 2a0cfc2f83e857e26ceb2021a0feb0dde0be1239 Author: Biju Das Date: Fri Oct 4 09:07:26 2019 +0100 dt-bindings: i2c: sh_mobile: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit b803376824c6a3544638bc1dc24e33737dfd9b6b Author: Biju Das Date: Fri Oct 4 08:59:58 2019 +0100 dt-bindings: i2c: rcar: Add r8a774b1 support Document RZ/G2N (R8A774B1) I2C compatibility with the relevant driver dt-bindings. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit a0365c09b582410f15fa2b669ebe1e8c5c3a721a Author: Maxime Ripard Date: Wed Oct 16 12:48:20 2019 +0200 ARM: dts: sun5i: olinuxino micro: Fix AT24 node name The node name in a device tree is supposed to be the class of the device, not its model (even if it's a pretty generic one). This was reported by the DT validation tools. Signed-off-by: Maxime Ripard commit 27b705fbf699841f67eaa39154a1d0a5580d3c2b Author: Maxime Ripard Date: Wed Oct 16 12:48:05 2019 +0200 ARM: dts: sun9i: Add missing watchdog clocks The watchdog has a clock, but it wasn't always listed. Add it to the devicetree where it's missing. Signed-off-by: Maxime Ripard commit 13de0f0a4919ac878d597e9702a2942a1a3b62e8 Author: Alistair Francis Date: Sat Oct 12 13:05:24 2019 -0700 arm64: dts: sun50i: sopine-baseboard: Expose serial1, serial2 and serial3 Follow what the sun50i-a64-pine64.dts does and expose all 5 serial connections. Signed-off-by: Alistair Francis Signed-off-by: Maxime Ripard commit e318d2c8f32d409f304ece12e50a759b2ed78d1b Author: Sudeep Holla Date: Fri Oct 18 11:37:49 2019 +0100 cpufreq: vexpress-spc: fix some coding style issues Fix the following checkpatch checks/warnings: CHECK: Unnecessary parentheses around the code CHECK: Alignment should match open parenthesis CHECK: Prefer kernel type 'u32' over 'uint32_t' WARNING: Missing a blank line after declarations Acked-by: Nicolas Pitre Signed-off-by: Sudeep Holla Signed-off-by: Viresh Kumar commit 09402d5725bf8c521cbe162e1037f19b30e2afaa Author: Sudeep Holla Date: Fri Oct 18 11:37:48 2019 +0100 cpufreq: vexpress-spc: remove lots of debug messages This driver have been used and tested for year now and the extensive debug/log messages in the driver are not really required anymore. Get rid of those unnecessary log messages. Acked-by: Nicolas Pitre Signed-off-by: Sudeep Holla Signed-off-by: Viresh Kumar commit 1f1b4650e0be8178fa303a78889ceda6b4385223 Author: Sudeep Holla Date: Fri Oct 18 11:37:47 2019 +0100 cpufreq: vexpress-spc: drop unnessary cpufreq_arm_bL_ops abstraction cpufreq_arm_bL_ops is no longer needed after merging the generic arm_big_little and vexpress-spc driver. Remove it along with the unused bL_cpufreq_{,un}register routines and rename some bL_* functions to ve_spc_*. Acked-by: Nicolas Pitre Signed-off-by: Sudeep Holla Signed-off-by: Viresh Kumar commit a0f950d3a0addc9552233aa2ffbdc086aa02106a Author: Sudeep Holla Date: Mon Oct 21 11:20:34 2019 +0100 cpufreq: merge arm_big_little and vexpress-spc arm_big_little cpufreq driver was designed as a generic big little driver that could be used by any platform and make use of bL switcher. Over years alternate solutions have been designed and merged to deal with bL/HMP systems like EAS. Also since no other driver made use of generic arm_big_little cpufreq driver except Vexpress SPC, we can merge them together as vexpress-spc driver used only on Vexpress TC2(CA15_CA7) platform. Acked-by: Nicolas Pitre Signed-off-by: Sudeep Holla Signed-off-by: Viresh Kumar commit 1b82a4b5d331ba3814a53f2fc289c2d2716bd3fd Author: Sudeep Holla Date: Fri Oct 18 11:37:45 2019 +0100 cpufreq: scpi: remove stale/outdated comment about the driver Commit 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency") removed the arm_big_little dependency from scpi driver and doesn't provide any ops to arm_big_little cpufreq driver. Lets remove that stale comment. Acked-by: Nicolas Pitre Signed-off-by: Sudeep Holla Signed-off-by: Viresh Kumar commit 6ce1d376d33eb775331b36a38afa28f9f08945e3 Author: Alexandre Courbot Date: Thu Aug 15 11:44:55 2019 -0300 media: docs-rst: Document m2m stateless video decoder interface Documents the protocol that user-space should follow when communicating with stateless video decoders. The stateless video decoding API makes use of the new request and tags APIs. While it has been implemented with the Cedrus driver so far, it should probably still be considered staging for a short while. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eabf10e5e3009e0c7e9a9b98a7f8299e690bcc55 Author: Jernej Skrabec Date: Fri Oct 11 06:32:45 2019 -0300 media: cedrus: h264: Support multiple slices per frame With recent changes, support for decoding multi-slice frames can be easily added now. Signal VPU if current slice is first in frame or not and add information about first macroblock coordinates. When frame contains multiple slices and driver works in slice mode, it's more efficient to hold capture buffer in queue until all slices of a same frame are decoded. Add support for that to Cedrus driver by exposing and implementing V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF capability. Signed-off-by: Jernej Skrabec [hverkuil-cisco@xs4all.nl: rewritten to use v4l2_m2m_buf_done_and_job_finish] [hverkuil-cisco@xs4all.nl: removed unnecessary (u32) cast] [hverkuil-cisco@xs4all.nl: use new_frame v4l2_m2m_ctx bool] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f07602ac388723233e9e3c5a05b54baf34e0a3e9 Author: Hans Verkuil Date: Fri Oct 11 06:32:44 2019 -0300 media: v4l2-mem2mem: add new_frame detection Drivers that support VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF typically want to know if a new frame is started (i.e. the first slice is about to be processed). Add a new_frame bool to v4l2_m2m_ctx and set it accordingly. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bef41d93aac64b54c3008ca6170bec54f85784f5 Author: Jernej Skrabec Date: Fri Oct 11 06:32:43 2019 -0300 media: v4l2-mem2mem: add stateless_(try_)decoder_cmd ioctl helpers These helpers are used by stateless codecs when they support multiple slices per frame and hold capture buffer flag is set. It's expected that all such codecs will use this code. Signed-off-by: Jernej Skrabec Co-developed-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bac06ec36ea2012ff0daa9767d0f77bf9c6064ec Author: Hans Verkuil Date: Fri Oct 11 06:32:42 2019 -0300 media: videodev2.h: add V4L2_DEC_CMD_FLUSH Add this new V4L2_DEC_CMD_FLUSH decoder command and document it. Reviewed-by: Boris Brezillon Reviewed-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Jernej Skrabec Signed-off-by: Mauro Carvalho Chehab commit f8cca8c97a63d77f48334cde81d15014f43530ef Author: Hans Verkuil Date: Fri Oct 11 06:32:41 2019 -0300 media: v4l2-mem2mem: support held capture buffers Check for held buffers that are ready to be returned to vb2 in __v4l2_m2m_try_queue(). This avoids drivers having to handle this case. Add v4l2_m2m_buf_done_and_job_finish() to correctly return source and destination buffers and mark the job as finished while taking a held destination buffer into account (i.e. that buffer won't be returned). This has to be done while job_spinlock is held to avoid race conditions. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 137272cdf7cc5be835f44216e6003769d1638480 Author: Hans Verkuil Date: Fri Oct 11 06:32:40 2019 -0300 media: vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF This patch adds support for the V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF flag. It also adds a new V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF capability. Drivers should set vb2_queue->subsystem_flags to VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF to indicate support for this flag. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 13ed13a4dcbf0b664acbf9e6f98ec7851cc59862 Author: Chris Wilson Date: Mon Oct 21 09:02:11 2019 +0100 drm/i915: Don't set queue_priority_hint if we don't kick the submission If we change the priority of the active context, then it has no impact on the decision of whether to preempt the active context -- we don't preempt the context with itself. In this situation, we elide the tasklet rescheduling and should *not* be marking up the queue_priority_hint as that may mask a later submission where we decide we don't have to kick the tasklet as a higher priority submission is pending (spoiler alert, it was not). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191021080226.537-1-chris@chris-wilson.co.uk commit ce53908bba6fa6e905d8fe81da4591d3e7a65878 Author: Joonas Lahtinen Date: Mon Oct 21 12:56:07 2019 +0300 drm/i915: Update DRIVER_DATE to 20191021 Signed-off-by: Joonas Lahtinen commit 948c59ddf42f1500842d75970fd88d7b12142b52 Author: Jacopo Mondi Date: Wed Oct 16 10:55:47 2019 +0200 arm64: dts: renesas: rcar-gen3: Add CMM units Add CMM units to Renesas R-Car Gen3 SoC that support it, and reference them from the Display Unit they are connected to. Sort the 'vsps', 'renesas,cmm' and 'status' properties in the DU unit consistently in all the involved DTS. Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Jacopo Mondi Link: https://lore.kernel.org/r/20191016085548.105703-8-jacopo+renesas@jmondi.org Signed-off-by: Geert Uytterhoeven commit bf216639036607dd35d8a5724b9deaee478ee684 Author: Biju Das Date: Tue Oct 15 12:01:11 2019 +0100 arm64: dts: renesas: r8a774b1: Add VIN and CSI-2 support Add VIN and CSI-2 support to the RZ/G2N SoC specific dtsi. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1571137271-33973-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 16c6c057175cbdcdc6c1251bbce90264a5380240 Author: Ayman Bagabas Date: Sun Oct 20 13:00:09 2019 -0400 platform/x86: huawei-wmi: Remove unnecessary battery mutex battery_lock mutex is never used and not needed. Fixes: 355a070b09ab ("platform/x86: huawei-wmi: Add battery charging thresholds") Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko commit 39c0a6295e3a270e17022db71c71aa637c3d4695 Author: Ayman Bagabas Date: Sun Oct 20 13:00:08 2019 -0400 platform/x86: huawei-wmi: No need to check for battery name No need to check for battery name, we already check if the WMI function is available in huawei_wmi_battery_setup. Fixes: 355a070b09ab ("platform/x86: huawei-wmi: Add battery charging thresholds") Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko commit 7c675486b97afea710f4c11ca71cb228c1e671be Author: Ayman Bagabas Date: Sun Oct 20 13:00:07 2019 -0400 platform/x86: huawei-wmi: Stricter battery thresholds set Check if battery thresholds are within 0 and 100. Fixes: 355a070b09ab ("platform/x86: huawei-wmi: Add battery charging thresholds") Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko commit d3f5b7366a4af088bc73be67835d2a394e2ce2e0 Author: Peter Kaestle Date: Sat Oct 19 00:59:36 2019 +0200 treewide: Rename Peter Feuerer to Peter Kaestle Rename Peter Feuerer to Peter Kaestle. Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Eduardo Valentin Cc: Greg Kroah-Hartman Signed-off-by: Peter Kaestle Signed-off-by: Andy Shevchenko commit 26e5656ed3bfaa6d9833c4e10e1c163d69075ed7 Author: Peter Feuerer Date: Sat Oct 19 00:59:35 2019 +0200 platform/x86: acerhdf: Add support for Acer Aspire 7551 Add support for Acer Aspire 7551. Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Peter Feuerer Signed-off-by: Andy Shevchenko commit 158be76c01172f4ffa3f10e2b4b433b3e496c75d Author: Chengguang Xu Date: Mon Oct 21 07:23:26 2019 +0800 ext2: adjust block num when retry allocation Set block num to original *count in a case of retrying allocation in case num < *count Link: https://lore.kernel.org/r/20191020232326.84881-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit e3da2ce04e120b4b035793f6eb87b459a505e88b Author: kbuild test robot Date: Mon Oct 21 06:20:52 2019 +0800 power: supply: cpcap-charger: cpcap_charger_voltage_to_regval() can be static Add 'static' keyword to internal function as reported by sparse using the following configuration: make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' Fixes: d4ee021c410f ("power: supply: cpcap-charger: Limit voltage to 4.2V for battery") Signed-off-by: kbuild test robot Signed-off-by: Sebastian Reichel commit 62409933b8d5afc9f09878608f3a38cf1b5467c2 Author: Martin Hundebøll Date: Mon Oct 21 10:08:38 2019 +0200 rtc: pcf2127: handle boot-enabled watchdog feature Linux should handle when the pcf2127 watchdog feature is enabled by the bootloader. This is done by checking the watchdog timer value during init, and set the WDOG_HW_RUNNING flag if the value differs from zero. Signed-off-by: Martin Hundebøll Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20191021080838.2789-1-martin@geanix.com Signed-off-by: Alexandre Belloni commit 952f89f098c75ae4147fc440aaa3b9a209240cea Author: Chris Wilson Date: Wed Oct 16 19:39:01 2019 +0100 drm/i915/gvt: Wean off struct_mutex Use the local vgpu_lock while preparing workloads to avoid taking the obsolete i915->drm.struct_mutex Signed-off-by: Chris Wilson Reviewed-by: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20191016183902.13614-1-chris@chris-wilson.co.uk commit 362c79f75c9ff129935d30279812a0d9c63eb76b Author: Geert Uytterhoeven Date: Fri Aug 30 15:45:15 2019 +0200 clk: renesas: rcar-gen3: Switch SD clocks to .determine_rate() As the .round_rate() callback returns a long clock rate, it cannot return clock rates that do not fit in signed long, but do fit in unsigned long. Hence switch the SD clocks on R-Car Gen3 from the old .round_rate() callback to the newer .determine_rate() callback, which does not suffer from this limitation. This includes implementing range checking. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20190830134515.11925-9-geert+renesas@glider.be commit df98719f033cf5903febf036ffdeb5b0f77a0fda Author: Geert Uytterhoeven Date: Fri Aug 30 15:45:14 2019 +0200 clk: renesas: rcar-gen3: Switch Z clocks to .determine_rate() As the .round_rate() callback returns a long clock rate, it cannot return clock rates that do not fit in signed long, but do fit in unsigned long. Hence switch the Z clocks on R-Car Gen3 from the old .round_rate() callback to the newer .determine_rate() callback, which does not suffer from this limitation. This includes implementing range checking. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20190830134515.11925-8-geert+renesas@glider.be commit 7aee839ed27d813a3adcf9da3a19b60b6581f867 Author: Geert Uytterhoeven Date: Fri Aug 30 15:45:13 2019 +0200 clk: renesas: rcar-gen2: Switch Z clock to .determine_rate() As the .round_rate() callback returns a long clock rate, it cannot return clock rates that do not fit in signed long, but do fit in unsigned long. Hence switch the Z clock on R-Car Gen2 from the old .round_rate() callback to the newer .determine_rate() callback, which does not suffer from this limitation. This includes implementing range checking. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20190830134515.11925-7-geert+renesas@glider.be commit 57abff067a084889b6e06137e61a3dc3458acd56 Author: Vincent Guittot Date: Fri Oct 18 15:26:38 2019 +0200 sched/fair: Rework find_idlest_group() The slow wake up path computes per sched_group statisics to select the idlest group, which is quite similar to what load_balance() is doing for selecting busiest group. Rework find_idlest_group() to classify the sched_group and select the idlest one following the same steps as load_balance(). Signed-off-by: Vincent Guittot Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: riel@surriel.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Link: https://lkml.kernel.org/r/1571405198-27570-12-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit fc1273f4cefe6670d528715581c848abf64f391c Author: Vincent Guittot Date: Fri Oct 18 15:26:37 2019 +0200 sched/fair: Optimize find_idlest_group() find_idlest_group() now reads CPU's load_avg in two different ways. Consolidate the function to read and use load_avg only once and simplify the algorithm to only look for the group with lowest load_avg. Signed-off-by: Vincent Guittot Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: riel@surriel.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Link: https://lkml.kernel.org/r/1571405198-27570-11-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 11f10e5420f6cecac7d4823638bff040c257aba9 Author: Vincent Guittot Date: Fri Oct 18 15:26:36 2019 +0200 sched/fair: Use load instead of runnable load in wakeup path Runnable load was originally introduced to take into account the case where blocked load biases the wake up path which may end to select an overloaded CPU with a large number of runnable tasks instead of an underutilized CPU with a huge blocked load. Tha wake up path now starts looking for idle CPUs before comparing runnable load and it's worth aligning the wake up path with the load_balance() logic. Signed-off-by: Vincent Guittot Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: riel@surriel.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Link: https://lkml.kernel.org/r/1571405198-27570-10-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit c63be7be59de65d12ff7b4329acea99cf734d6de Author: Vincent Guittot Date: Fri Oct 18 15:26:35 2019 +0200 sched/fair: Use utilization to select misfit task Utilization is used to detect a misfit task but the load is then used to select the task on the CPU which can lead to select a small task with high weight instead of the task that triggered the misfit migration. Check that task can't fit the CPU's capacity when selecting the misfit task instead of using the load. Signed-off-by: Vincent Guittot Acked-by: Valentin Schneider Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: riel@surriel.com Cc: srikar@linux.vnet.ibm.com Link: https://lkml.kernel.org/r/1571405198-27570-9-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 2ab4092fc82d6001fdd9d51dbba27d04dec967e0 Author: Vincent Guittot Date: Fri Oct 18 15:26:34 2019 +0200 sched/fair: Spread out tasks evenly when not overloaded When there is only one CPU per group, using the idle CPUs to evenly spread tasks doesn't make sense and nr_running is a better metrics. Signed-off-by: Vincent Guittot Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: riel@surriel.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Link: https://lkml.kernel.org/r/1571405198-27570-8-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit b0fb1eb4f04ae4768231b9731efb1134e22053a4 Author: Vincent Guittot Date: Fri Oct 18 15:26:33 2019 +0200 sched/fair: Use load instead of runnable load in load_balance() 'runnable load' was originally introduced to take into account the case where blocked load biases the load balance decision which was selecting underutilized groups with huge blocked load whereas other groups were overloaded. The load is now only used when groups are overloaded. In this case, it's worth being conservative and taking into account the sleeping tasks that might wake up on the CPU. Signed-off-by: Vincent Guittot Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: riel@surriel.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Link: https://lkml.kernel.org/r/1571405198-27570-7-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 5e23e474431529b7d1480f649ce33d0e9c1b2e48 Author: Vincent Guittot Date: Fri Oct 18 15:26:32 2019 +0200 sched/fair: Use rq->nr_running when balancing load CFS load_balance() only takes care of CFS tasks whereas CPUs can be used by other scheduling classes. Typically, a CFS task preempted by an RT or deadline task will not get a chance to be pulled by another CPU because load_balance() doesn't take into account tasks from other classes. Add sum of nr_running in the statistics and use it to detect such situations. Signed-off-by: Vincent Guittot Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: riel@surriel.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Link: https://lkml.kernel.org/r/1571405198-27570-6-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 0b0695f2b34a4afa3f6e9aa1ff0e5336d8dad912 Author: Vincent Guittot Date: Fri Oct 18 15:26:31 2019 +0200 sched/fair: Rework load_balance() The load_balance() algorithm contains some heuristics which have become meaningless since the rework of the scheduler's metrics like the introduction of PELT. Furthermore, load is an ill-suited metric for solving certain task placement imbalance scenarios. For instance, in the presence of idle CPUs, we should simply try to get at least one task per CPU, whereas the current load-based algorithm can actually leave idle CPUs alone simply because the load is somewhat balanced. The current algorithm ends up creating virtual and meaningless values like the avg_load_per_task or tweaks the state of a group to make it overloaded whereas it's not, in order to try to migrate tasks. load_balance() should better qualify the imbalance of the group and clearly define what has to be moved to fix this imbalance. The type of sched_group has been extended to better reflect the type of imbalance. We now have: group_has_spare group_fully_busy group_misfit_task group_asym_packing group_imbalanced group_overloaded Based on the type of sched_group, load_balance now sets what it wants to move in order to fix the imbalance. It can be some load as before but also some utilization, a number of task or a type of task: migrate_task migrate_util migrate_load migrate_misfit This new load_balance() algorithm fixes several pending wrong tasks placement: - the 1 task per CPU case with asymmetric system - the case of cfs task preempted by other class - the case of tasks not evenly spread on groups with spare capacity Also the load balance decisions have been consolidated in the 3 functions below after removing the few bypasses and hacks of the current code: - update_sd_pick_busiest() select the busiest sched_group. - find_busiest_group() checks if there is an imbalance between local and busiest group. - calculate_imbalance() decides what have to be moved. Finally, the now unused field total_running of struct sd_lb_stats has been removed. Signed-off-by: Vincent Guittot Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: riel@surriel.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Link: https://lkml.kernel.org/r/1571405198-27570-5-git-send-email-vincent.guittot@linaro.org [ Small readability and spelling updates. ] Signed-off-by: Ingo Molnar commit fcf0553db6f4c79387864f6e4ab4a891601f395e Author: Vincent Guittot Date: Fri Oct 18 15:26:30 2019 +0200 sched/fair: Remove meaningless imbalance calculation Clean up load_balance() and remove meaningless calculation and fields before adding a new algorithm. Signed-off-by: Vincent Guittot Acked-by: Rik van Riel Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Link: https://lkml.kernel.org/r/1571405198-27570-4-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit a34983470301018324f0110791da452fee1318c2 Author: Vincent Guittot Date: Fri Oct 18 15:26:29 2019 +0200 sched/fair: Rename sg_lb_stats::sum_nr_running to sum_h_nr_running Rename sum_nr_running to sum_h_nr_running because it effectively tracks cfs->h_nr_running so we can use sum_nr_running to track rq->nr_running when needed. There are no functional changes. Signed-off-by: Vincent Guittot Reviewed-by: Valentin Schneider Acked-by: Rik van Riel Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: srikar@linux.vnet.ibm.com Link: https://lkml.kernel.org/r/1571405198-27570-3-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 490ba971d8b498ba3a47999ab94c6a0d1830ad41 Author: Vincent Guittot Date: Fri Oct 18 15:26:28 2019 +0200 sched/fair: Clean up asym packing Clean up asym packing to follow the default load balance behavior: - classify the group by creating a group_asym_packing field. - calculate the imbalance in calculate_imbalance() instead of bypassing it. We don't need to test twice same conditions anymore to detect asym packing and we consolidate the calculation of imbalance in calculate_imbalance(). There is no functional changes. Signed-off-by: Vincent Guittot Acked-by: Rik van Riel Cc: Ben Segall Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Mike Galbraith Cc: Morten.Rasmussen@arm.com Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: hdanton@sina.com Cc: parth@linux.ibm.com Cc: pauld@redhat.com Cc: quentin.perret@arm.com Cc: srikar@linux.vnet.ibm.com Cc: valentin.schneider@arm.com Link: https://lkml.kernel.org/r/1571405198-27570-2-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 7cf78b6b12fd5550545e4b73b35dca18bd46b44c Author: Fuqian Huang Date: Fri Sep 27 20:15:44 2019 +0800 m68k: q40: Fix info-leak in rtc_ioctl When the option is RTC_PLL_GET, pll will be copied to userland via copy_to_user. pll is initialized using mach_get_rtc_pll indirect call and mach_get_rtc_pll is only assigned with function q40_get_rtc_pll in arch/m68k/q40/config.c. In function q40_get_rtc_pll, the field pll_ctrl is not initialized. This will leak uninitialized stack content to userland. Fix this by zeroing the uninitialized field. Signed-off-by: Fuqian Huang Link: https://lore.kernel.org/r/20190927121544.7650-1-huangfq.daxian@gmail.com Signed-off-by: Geert Uytterhoeven commit 51b67a6e6592db3b2aa06e870c6546bac095b22b Author: Himanshu Jha Date: Sun Aug 27 13:02:28 2017 +0530 nubus: Remove cast to void pointer Casting void pointers to other pointer types is unnecessary. Signed-off-by: Himanshu Jha Link: https://lore.kernel.org/r/1503819148-11676-1-git-send-email-himanshujha199640@gmail.com Signed-off-by: Geert Uytterhoeven commit 76743c0e0915af6ae1d960c14e8c1dcb3e238f23 Author: Max Filippov Date: Tue Oct 1 00:25:30 2019 -0700 xtensa: move kernel memory layout to platform options Currently kernel memory layout settings are split between "Processor type and features" and "Platform options" menus. Consolidate them under "Platform options". Signed-off-by: Max Filippov commit 123b8db839b3695c8296121b9962d1a195417843 Author: Max Filippov Date: Fri Sep 27 17:30:05 2019 -0700 xtensa: use correct symbol for the end of .rodata Use correct symbol for the end of .rodata section when dumping virtual memory layout. This fixes odd rodata size with XIP kernel. Signed-off-by: Max Filippov commit 9fab17ca9afe3e21c2268a742103f477316af6ec Author: Max Filippov Date: Fri Sep 27 17:21:25 2019 -0700 xtensa: fix section name for start_info .data.init.refok has been removed from the kernel long ago, replaced with __REFDATA. Fix start_info definition. Signed-off-by: Max Filippov commit 6af4ab570db3dc71e877271a17e5e2b337e0bdc0 Author: Max Filippov Date: Sun Sep 29 19:55:09 2019 -0700 xtensa: move MPU constants from .data to .ref.rodata MPU attribute mapping table is R/O, move it from .data to __REFCONST (as the rest of the _startup code where initialize_cacheattr is used is in the __REF section). This allows executing initialize_cacheattr before the data section of the XIP kernel is relocated to its place. Signed-off-by: Max Filippov commit 6591685d50043f615a1ad7ddd5bb263ef54808fc Author: Max Filippov Date: Fri Sep 27 21:28:47 2019 -0700 xtensa: move XCHAL_KIO_* definitions to kmem_layout.h These address and size definitions define xtensa kernel memory layout, move them from vectors.h to the kmem_layout.h Signed-off-by: Max Filippov commit c3e0a444383acf2e4aa2f0393ae036442a888c49 Author: Max Filippov Date: Fri Sep 27 14:12:57 2019 -0700 xtensa: clean up empty include files Remove empty hw_irq.h and user.h from arch/xtensa/include/asm and use generic versions instead. Signed-off-by: Max Filippov commit 532a3bbc7de890b05d85c7ebd70b18fd35ca415c Author: Max Filippov Date: Fri Sep 27 13:59:52 2019 -0700 xtensa: update arch features xtensa now supports tracehook, queued spinlocks and rwlocks. Update corresponding Documentation/features entries. Signed-off-by: Max Filippov commit 1a9167a214f560a23c5050ce6dfebae489528f0d Author: Fabiano Rosas Date: Wed Jun 19 13:01:27 2019 -0300 KVM: PPC: Report single stepping capability When calling the KVM_SET_GUEST_DEBUG ioctl, userspace might request the next instruction to be single stepped via the KVM_GUESTDBG_SINGLESTEP control bit of the kvm_guest_debug structure. This patch adds the KVM_CAP_PPC_GUEST_DEBUG_SSTEP capability in order to inform userspace about the state of single stepping support. We currently don't have support for guest single stepping implemented in Book3S HV so the capability is only present for Book3S PR and BookE. Signed-off-by: Fabiano Rosas Signed-off-by: Paul Mackerras commit 1b53385e7938d5a093e92044f9c89e4e76106f1b Author: Bard Liao Date: Mon Sep 16 14:23:48 2019 -0500 soundwire: cadence_master: improve PDI allocation PDI number should match dai->id, there is no need to track if a PDI is allocated or not. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190916192348.467-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 807c15bc77871c695e254423f5e3839b2175db03 Author: Pierre-Louis Bossart Date: Mon Sep 16 14:23:47 2019 -0500 soundwire: intel: don't filter out PDI0/1 PDI0/1 are reserved for Bulk and filtered out in the existing code. That leads to endless confusions on whether the index is the raw or corrected one. In addition we will need support for Bulk at some point so it's just simpler to expose those PDIs and not use it for now than try to be smart unless we have to remove the smarts. This patch requires a topology change to use PDIs starting at offset 2 explicitly. Note that there is a known discrepancy between hardware documentation and what ALH stream works in practice, future fixes are likely. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190916192348.467-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 57a34790cd2cab02c3336fe96cfa33b9b65ed2ee Author: Pierre-Louis Bossart Date: Mon Sep 16 14:23:46 2019 -0500 soundwire: cadence/intel: simplify PDI/port mapping The existing Linux code uses a 1:1 mapping between ports and PDIs, but still has an independent allocation of ports and PDIs. Let's simplify the code and remove the port layer by only using PDIs. This patch does not change any functionality, just removes unnecessary code. This will also allow for further simplifications where the PDIs are not dynamically allocated but instead described in a topology file. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190916192348.467-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 80464533e148b80f8fb7e08a044588ee44a4e5ea Author: Bard Liao Date: Mon Sep 16 14:23:45 2019 -0500 soundwire: intel: remove playback/capture stream_name We will create dai widget in SOF. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190916192348.467-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 535bbe6a1f94dfc3e23cf1c9687459de7f3d2271 Author: Pierre-Louis Bossart Date: Mon Sep 16 14:23:44 2019 -0500 soundwire: remove DAI_ID_RANGE definitions There is no reason to reserve a range of DAI IDs for SoundWire. This is not scalable and it's better to let the ASoC core allocate the dai->id when registering a component. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190916192348.467-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 4c61ec0f2dc0ab9e8bfa541c05c929570c1cde5a Author: Sai Prakash Ranjan Date: Sat Oct 19 17:07:13 2019 +0530 dt-bindings: msm: Add LLCC for SC7180 Add LLCC compatible for SC7180 SoC. Reviewed-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Signed-off-by: Bjorn Andersson commit d49f341e15af95a2a19850ee74d245270fa0cf38 Author: Sai Prakash Ranjan Date: Sat Oct 19 17:07:12 2019 +0530 dt-bindings: msm: Convert LLCC bindings to YAML Convert LLCC bindings to DT schema format using json-schema. Reviewed-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Signed-off-by: Bjorn Andersson commit 669f78802b015f4f038a33f653f4fd1474539764 Author: Vivek Gautam Date: Sat Oct 19 17:07:11 2019 +0530 soc: qcom: llcc: Add configuration data for SC7180 Add LLCC configuration data for SC7180 SoC which controls LLCC behaviour. Reviewed-by: Stephen Boyd Signed-off-by: Vivek Gautam Signed-off-by: Sai Prakash Ranjan Signed-off-by: Bjorn Andersson commit ef8576789e869b7584684ae81126a465eb1deeb6 Author: Bjorn Andersson Date: Wed Oct 2 21:13:45 2019 -0700 arm64: dts: qcom: sdm845: Add APSS watchdog node Add a node describing the watchdog found in the application subsystem. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson commit ab81e203bc0d4a4542bca2498535f8761a3cfd92 Author: Jakub Sitnicki Date: Sun Oct 20 13:23:44 2019 +0200 scripts/bpf: Print an error when known types list needs updating Don't generate a broken bpf_helper_defs.h header if the helper script needs updating because it doesn't recognize a newly added type. Instead print an error that explains why the build is failing, clean up the partially generated header and stop. v1->v2: - Switched from temporary file to .DELETE_ON_ERROR. Fixes: 456a513bb5d4 ("scripts/bpf: Emit an #error directive known types list needs updating") Suggested-by: Andrii Nakryiko Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191020112344.19395-1-jakub@cloudflare.com commit da6043fe85eb5ec621e34a92540735dcebbea134 Author: Andy Whitcroft Date: Wed Sep 25 15:39:12 2019 +0100 PM / hibernate: memory_bm_find_bit(): Tighten node optimisation When looking for a bit by number we make use of the cached result from the preceding lookup to speed up operation. Firstly we check if the requested pfn is within the cached zone and if not lookup the new zone. We then check if the offset for that pfn falls within the existing cached node. This happens regardless of whether the node is within the zone we are now scanning. With certain memory layouts it is possible for this to false trigger creating a temporary alias for the pfn to a different bit. This leads the hibernation code to free memory which it was never allocated with the expected fallout. Ensure the zone we are scanning matches the cached zone before considering the cached node. Deep thanks go to Andrea for many, many, many hours of hacking and testing that went into cornering this bug. Reported-by: Andrea Righi Tested-by: Andrea Righi Signed-off-by: Andy Whitcroft Signed-off-by: Rafael J. Wysocki commit 0dc3c562aa95e029f40779c5c9709c7c1bdeb415 Author: Andi Shyti Date: Sun Oct 20 19:41:39 2019 +0100 drm/i915: Extract GT ring management Although the ring management is much smaller compared to the other GT power management functions, continue the theme of extracting it out of the huge intel_pm.c for maintenance. Based on a patch by Chris Wilson. Signed-off-by: Andi Shyti Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191020184139.9145-1-chris@chris-wilson.co.uk commit 0cb90f071f736b51b36ca0f761cf1152ebe46600 Author: Tony Lindgren Date: Wed Oct 9 14:06:21 2019 -0700 power: supply: cpcap-battery: Add basic coulomb counter calibrate support This patch adds support for the coulomb counter calibration on init. We do this by polling for now, and only add partial calibration done interrupt support. Then later on when we know for sure we have the calibration done interrupt available in the device tree, we can switch to using the calibration done interrupt. Cc: Merlijn Wajer Signed-off-by: Tony Lindgren Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel commit b28ac41950c84d6a9787255a15dcaf2369735464 Author: Tony Lindgren Date: Wed Oct 9 14:06:20 2019 -0700 power: supply: cpcap-battery: Read and save integrator register CCI We can simplify code in the later patches by reading and saving the integrator register CCI. Let's also fix a comment typo for register range naming while at it. Cc: Merlijn Wajer Signed-off-by: Tony Lindgren Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel commit ac437c1c8438027d08f115445e5963397c04ce5b Author: Tony Lindgren Date: Wed Oct 9 14:06:19 2019 -0700 power: supply: cpcap-battery: Simplify short term power average calculation We can use sign_extend32() here to simplify things. And let's fix the comment for CCM register, that contains the calibration offset. Cc: Merlijn Wajer Signed-off-by: Tony Lindgren Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel commit c59b3bad6fd83a42c73ec6ef6609af4882dfbcb3 Author: Tony Lindgren Date: Wed Oct 9 14:06:18 2019 -0700 power: supply: cpcap-battery: Simplify coulomb counter calculation with div_s64 We can simplify cpcap_battery_cc_raw_div() with div_s64. Cc: Merlijn Wajer Signed-off-by: Tony Lindgren Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel commit 458f5c8cda45fa599c8d984b41ea12c7169bdcd4 Author: Tony Lindgren Date: Wed Oct 9 14:06:17 2019 -0700 power: supply: cpcap-battery: Move coulomb counter units per lsb to ddata We can simplify cpcap_battery_cc_raw_div() a bit by moving the units per lsb to ddata. Cc: Merlijn Wajer Signed-off-by: Tony Lindgren Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel commit 5688ea0492337517f9e9e1249e4f5e371726bc21 Author: Tony Lindgren Date: Wed Oct 16 15:41:22 2019 -0700 power: supply: cpcap-charger: Allow changing constant charge voltage Let's allow reconfiguring the cpcap-charger max charge voltage and default to 4.2V that should be safe for the known users. This allows the users to use 4.35V for the extra capacity if really needed at a cost of probably shorter battery life. We check the constant charge voltage limit set by the battery. Some pieces of the property setting code is based on an earlier patch from Pavel Machek but limited to configuring the charge voltage for now. Cc: Merlijn Wajer Cc: Pavel Machek Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel commit 8b0134cc14b9d4dba4477489c11f7c634c382e3e Author: Tony Lindgren Date: Wed Oct 16 15:41:21 2019 -0700 power: supply: cpcap-battery: Fix handling of lowered charger voltage With cpcap-charger now using 4.2V instead of 4.35V, we never reach POWER_SUPPLY_CAPACITY_LEVEL_FULL unless we handle the lowered charge voltage. Let's do this by implementing POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE, and assume anything at that level or higher is a full battery. Let's also make it configurable for users who may still want to reconfigure it, and notify the charger if supported by the charger. Cc: Merlijn Wajer Cc: Pavel Machek Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel commit 50fc99f83f102c60a9429f451594019a6a978103 Author: Tony Lindgren Date: Wed Oct 16 15:30:05 2019 -0700 power: supply: cpcap-charger: Improve battery detection We are currently using a wrong ADC range for the battery detection. The ADC returns the battery temperature if connected. Cc: Merlijn Wajer Cc: Pavel Machek Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel commit 639c1524da3b273d20c42ff2387d08eb4b12e903 Author: Tony Lindgren Date: Wed Oct 16 15:30:04 2019 -0700 power: supply: cpcap-battery: Check voltage before orderly_poweroff We can get the low voltage interrupt trigger sometimes way too early, maybe because of CPU load spikes. This causes orderly_poweroff() be called too easily. Let's check the voltage before orderly_poweroff in case it was not yet a permanent condition. We will be getting more interrupts anyways if the condition persists. Let's also show the measured voltages for low battery and battery empty warnings since we have them. Cc: Merlijn Wajer Cc: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel commit 8bc8fc088bcd9da7ff565620a2778def59902404 Merge: b10e97003d28 d4ee021c410f Author: Sebastian Reichel Date: Sun Oct 20 20:24:59 2019 +0200 Merge tag 'psy-cpcap-charge-volt-limit-signed' into psy-next Immutable branch between arm and power-supply for cpcap-charger This immutable branch contains CPCAP charger changes, which touch ARM and power-supply subsystem. Signed-off-by: Sebastian Reichel commit 2f184393e0c2d409c62262f57f2a57efdf9370b8 Merge: ebcd670d05d5 531e93d11470 Author: David S. Miller Date: Sat Oct 19 22:51:25 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Several cases of overlapping changes which were for the most part trivially resolvable. Signed-off-by: David S. Miller commit d4ee021c410f72bf2aacc61069ad6305120d2127 Author: Tony Lindgren Date: Wed Oct 16 15:18:17 2019 -0700 power: supply: cpcap-charger: Limit voltage to 4.2V for battery There have been some cases of droid4 battery bulging that seem to be related to being left connected to the charger for several weeks. It is suspected that the 4.35V charge voltage configured for the battery is too much in the long run, so lets limit the charge voltage to 4.2V. It could also be that the batteries are just getting old. We don't really want to just change the charge voltage to 4.2V as Android may have charged the battery to 4.35V as pointed out by Pavel Machek. To add checks for battery voltage, the driver needs to understand the voltage it's charging at, and also needs to better understand it's charger state. Right now it only understands connect and disconnect, while now we need to know also a connected state but not charging. So let's add better charger state handling with help of chrgcurr2 interrupt for detecting charge full and retry, and add a check for battery voltage before we start charging. And then we finally can lower the charge voltage to 4.2V. Note that we've been using the same register values as the Android distros on droid4, so it is suspected that the same problem also exists in Android. Cc: Pavel Machek Cc: Rob Herring Reported-by: Merlijn Wajer Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel commit 8a631a5a0f7d4a4a24dba8587d5d9152be0871cc Author: Nicholas Graumann Date: Tue Oct 15 20:18:24 2019 +0530 dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset Whenever we reset the channel, we need to clear desc_pendingcount along with desc_submitcount. Otherwise when a new transaction is submitted, the irq coalesce level could be programmed to an incorrect value in the axidma case. This behavior can be observed when terminating pending transactions with xilinx_dma_terminate_all() and then submitting new transactions without releasing and requesting the channel. Signed-off-by: Nicholas Graumann Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571150904-3988-8-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 722b9e6d7e49b1dc429f9b65680b325c1ce9a763 Author: Nicholas Graumann Date: Tue Oct 15 20:18:23 2019 +0530 dmaengine: xilinx_dma: Print debug message when no free tx segments The driver should not run out of tx segments in normal operation. But, if the user attempts to prepare a transaction with a large sg list, the driver may not have enough free segments to accommodate the request. Log a message at the debug level to inform the user in case they are experiencing issues. Signed-off-by: Nicholas Graumann Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571150904-3988-7-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit d8bae21a48dbe132788291257638f323f4ee5c94 Author: Nicholas Graumann Date: Tue Oct 15 20:18:22 2019 +0530 dmaengine: xilinx_dma: Add callback_result support Take advantage of dmaengine_desc_get_callback_invoke which allows either a callback or callback_result to be specified. This can be useful when using the AXI DMA transfer unknown quantities of data where the residue contained in the result can be used to calculate the number of bytes transferred. Signed-off-by: Nicholas Graumann Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571150904-3988-6-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit a575d0b4e663d818803f75de0cf4bc3c4b35b203 Author: Nicholas Graumann Date: Tue Oct 15 20:18:21 2019 +0530 dmaengine: xilinx_dma: Introduce xilinx_dma_get_residue Introduce a function that can calculate residues for IPs that support it: AXI DMA and CDMA. Signed-off-by: Nicholas Graumann Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571150904-3988-5-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 95f68c62628085abff83a5add8db057fbf532f7f Author: Radhey Shyam Pandey Date: Tue Oct 15 20:18:20 2019 +0530 dmaengine: xilinx_dma: Remove residue from channel data There is no use of storing channel data residue field. So clean it up. In tx_status simply pass calculated residue to dma_set_residue. Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571150904-3988-4-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 0f45e75e336f85aeee0392042e022814bf033aa2 Author: Nicholas Graumann Date: Tue Oct 15 20:18:19 2019 +0530 dmaengine: xilinx_dma: Merge get_callback and _invoke The dma api provides a single interface to get the appropriate callback and invoke it directly. Prefer using it. Signed-off-by: Nicholas Graumann Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571150904-3988-3-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 005a017926ffe648b38b6462748a74c850a31e62 Author: Radhey Shyam Pandey Date: Tue Oct 15 20:18:18 2019 +0530 dmaengine: xilinx_dma: Remove desc_callback_valid check In descriptor cleanup the call to desc_callback_valid can be safely removed as both callback pointers i.e callback_result and callback are anyway checked in invoke(). There is no much benefit in having redundant checks. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Nicholas Graumann Reviewed-by: Appana Durga Kedareswara rao Link: https://lore.kernel.org/r/1571150904-3988-2-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit b10e97003d28f6c83edd79e17dfec91acfbb7377 Author: Krzysztof Kozlowski Date: Fri Oct 4 17:07:38 2019 +0200 power: supply: ab8500: Handle invalid IRQ from platform_get_irq_byname() platform_get_irq_byname() might return -errno which later would be cast to an unsigned int and used in request_irq(). Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 24108993278d67174a61f9ead38d4d9d1c001a14 Author: Krzysztof Kozlowski Date: Fri Oct 4 17:07:37 2019 +0200 power: supply: ab8500_fg: Do not free non-requested IRQs in probe's error path When requesting interrupt fails, free only interrupts already requested, not all of them. Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Sebastian Reichel commit ccc023a58175565b91f6d1996cde4dfe93b04808 Author: Krzysztof Kozlowski Date: Fri Oct 4 17:07:36 2019 +0200 power: supply: ab8500: Cleanup probe in reverse order It is logical to cleanup in probe's error path in reverse order to previous actions. It also makes easier to add additional goto labels within this error path. Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 1a18f7e26a87ed72c95aeec5492d70bd555acfc3 Merge: c04500642081 a77fc1115689 Author: Sebastian Reichel Date: Sun Oct 20 15:14:14 2019 +0200 Merge remote-tracking branch 'ib-ab8500-5.4-rc1' into for-next Merge immutable branch from IIO subsystem for driver changes in ab8500_btemp, ab8500_charger and ab8500_fg. Signed-off-by: Sebastian Reichel commit c045006420813ed43c794ccf334c7b6116a16366 Author: Ben Dooks (Codethink) Date: Tue Oct 15 16:54:14 2019 +0100 power: reset: at91: fix __le32 cast in reset code The writel() takes standard integers, not __le32 so fix the following sparse warnings by removing the cpu_to_le32() calls. drivers/power/reset/at91-reset.c:134:9: warning: cast from restricted __le32 drivers/power/reset/at91-reset.c:143:9: warning: cast from restricted __le32 This has made no code changes, the md5sums pre and post applying this patch are the same. The at91 should be natively little endian anyway. Signed-off-by: Ben Dooks Signed-off-by: Sebastian Reichel commit bffc687cc6c2b2833a2ef6927db4468437b2ba37 Author: Madhuparna Bhowmik Date: Tue Oct 15 21:43:41 2019 +0530 power: supply: abx500_chargalg: Fix code indentation Fixed Code indentation error caused due to using spaces instead of tabs. The error reported by checkpatch.pl is: ERROR: code indent should use tabs where possible The warning reported by checkpatch.pl is: WARNING: please, no spaces at the start of a line Signed-off-by: Madhuparna Bhowmik Signed-off-by: Sebastian Reichel commit 8814c6d01f7e82e6be70ac04d8bca0fc90757418 Author: Lionel Landwerlin Date: Sun Oct 20 00:46:47 2019 +0300 drm/i915/perf: fix oa config reconfiguration The current logic just reapplies the same configuration already stored into stream->oa_config instead of the newly selected one. Signed-off-by: Lionel Landwerlin Fixes: 7831e9a965ea ("drm/i915/perf: Allow dynamic reconfiguration of the OA stream") Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191019214647.27866-1-lionel.g.landwerlin@intel.com commit f583c341a515fcb5305520053d2ae51f89f67f59 Author: Parthiban Nallathambi Date: Fri Oct 18 12:04:25 2019 +0200 rtc: rv3028: add clkout support rv3028 provides clkout (enabled by default). Add clkout to clock framework source and control from device tree for variable frequency with enable and disable functionality. Signed-off-by: Parthiban Nallathambi Link: https://lore.kernel.org/r/20191018100425.1687979-1-pn@denx.de Signed-off-by: Alexandre Belloni commit 05df557285394ed54b771184bc7646328f47da21 Author: Alexandre Belloni Date: Sat Oct 19 22:49:41 2019 +0200 rtc: ds1343: cleanup .remove It is not necessary to call device_init_wakeup(dev, false) in .remove as device_del will take care of that. It is also not necessary to devm_free_irq. Finally, dev_pm_clear_wake_irq can be called unconditionally. Link: https://lore.kernel.org/r/20191019204941.6203-9-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 0680a6cdabf0629ab276d4d78b61c4761d15cb28 Author: Alexandre Belloni Date: Sat Oct 19 22:49:40 2019 +0200 rtc: ds1343: rework interrupt handling Rework the interrupt handling to avoid caching the values as the core is already doing that. The core also always ensures the rtc_time passed for the alarm is fully populated. The only trick is in read_alarm where status needs to be read before the alarm registers to ensure the potential irq is not cleared. Link: https://lore.kernel.org/r/20191019204941.6203-8-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit a986429095df39e7a5b85a53b1e71ee8d07d3390 Author: Alexandre Belloni Date: Sat Oct 19 22:49:39 2019 +0200 rtc: ds1343: remove unnecessary mutex Use rtc_lock and rtc_unlock to lock the rtc from the interrupt handler. This removes the need for a driver specific lock. Link: https://lore.kernel.org/r/20191019204941.6203-7-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit ce0fd9db653b18ed15aea08ee80056cc9ec094e9 Author: Alexandre Belloni Date: Sat Oct 19 22:49:38 2019 +0200 rtc: ds1343: check regmap_read return value Check whether regmap_read fails before continuing in the sysfs .show callbacks. Link: https://lore.kernel.org/r/20191019204941.6203-6-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit ac08888b2590f690bed1f1afe7a39bdda76eb41f Author: Alexandre Belloni Date: Sat Oct 19 22:49:37 2019 +0200 rtc: ds1343: use regmap_update_bits for glitch filter Use regmap_update_bits to update DS1343_CONTROL_REG in a race free manner when setting the glitch filter. Link: https://lore.kernel.org/r/20191019204941.6203-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 580daaf43afc7024d10d23021093e9e76181e338 Author: Alexandre Belloni Date: Sat Oct 19 22:49:36 2019 +0200 rtc: ds1343: use rtc_add_group Use rtc_add_group to add the sysfs group in a race free manner. This has the side effect of moving the files to their proper location. Link: https://lore.kernel.org/r/20191019204941.6203-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit f308b682028a34874a376da649f99e7531dea15c Author: Alexandre Belloni Date: Sat Oct 19 22:49:35 2019 +0200 rtc: ds1343: use burst write to set time To avoid possible race condition, use regmap_bulk_write to write all the date/time registers at once instead of sequentially. Link: https://lore.kernel.org/r/20191019204941.6203-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 8c9a88fae2ce50f1aef5a72273a5d46e4fa89603 Author: Alexandre Belloni Date: Sat Oct 19 22:49:34 2019 +0200 rtc: ds1343: remove dead code RTC_SET_CHARGE doesn't exist, the ioctl code is never used. Link: https://lore.kernel.org/r/20191019204941.6203-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 21783322fe4abad282cb80ae8d59ca9ef6c0e7fd Author: Alexandre Belloni Date: Sat Oct 19 22:49:33 2019 +0200 rtc: ds1343: set range This is a standard BCD rtc with a useless century bit (no leap year correction after 2099). Link: https://lore.kernel.org/r/20191019204941.6203-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit ae4866884338259318be94fa8f88015cced07000 Author: Alexandre Belloni Date: Sat Oct 19 22:50:34 2019 +0200 rtc: introduce lock helpers Introduce rtc_lock and rtc_unlock to shorten the code when locking and unlocking ops_lock from drivers. Link: https://lore.kernel.org/r/20191019205034.6382-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 1a064850b5fed41c851adb895a4e959815aa33a2 Author: Alexandre Belloni Date: Wed Oct 16 22:16:26 2019 +0200 rtc: vt8500: let the core handle rtc range Let the rtc core check the date/time against the RTC range. Link: https://lore.kernel.org/r/20191016201626.31309-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit d8bced4b72a2a2aee8567e7d13ac2b52dad93c22 Author: Alexandre Belloni Date: Wed Oct 16 22:16:25 2019 +0200 rtc: vt8500: convert to devm_rtc_allocate_device This allows further improvement of the driver. Link: https://lore.kernel.org/r/20191016201626.31309-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 3e7d639720d0c2c8fe3708ffeae0f60ee300b62e Author: Alexandre Belloni Date: Wed Oct 16 22:16:24 2019 +0200 rtc: vt8500: remove superfluous error message The RTC core now has error messages in case of registration failure, there is no need to have other messages in the drivers. Link: https://lore.kernel.org/r/20191016201626.31309-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit e979d0490acce0bf83d4db78b46a0b11b59d4dee Author: Alexandre Belloni Date: Wed Oct 16 22:16:23 2019 +0200 rtc: vt8500: remove useless label err_return doesn't do anything special, simply return instead of goto. Link: https://lore.kernel.org/r/20191016201626.31309-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 8d6ac1cec7251a74c2d2f21e72b842c000206811 Author: Alexandre Belloni Date: Wed Oct 16 22:16:22 2019 +0200 rtc: add timestamp for end of 2199 Some RTCs handle date up to 2199. Link: https://lore.kernel.org/r/20191016201626.31309-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 9e8a968fe3608b3b00aa3002207f48f0de50823b Author: Alexandre Belloni Date: Wed Oct 16 22:08:48 2019 +0200 rtc: s35390a: set range This is a standard BCD RTC that will fail in 2100. Link: https://lore.kernel.org/r/20191016200848.30246-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit ed6c6dfdbe475271f769603ae22246b3e2c8c7b3 Author: Alexandre Belloni Date: Wed Oct 16 22:08:47 2019 +0200 rtc: s35390a: convert to devm_rtc_allocate_device This allows further improvement of the driver and removes the need to forward declare s35390a_driver. Link: https://lore.kernel.org/r/20191016200848.30246-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 3cd82e95daa7c0385a9e6f80454117ae4ef54671 Author: Bjorn Andersson Date: Thu Oct 17 22:57:06 2019 -0700 arm64: dts: qcom: c630: Enable adsp, cdsp and mpss Specify the firmware-name for the adsp, cdsp and mpss and enable the nodes. Reviewed-by: Jeffrey Hugo Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson commit 27198a893ba074407e7a87e346252b3e6fab454f Author: Arnaldo Carvalho de Melo Date: Sat Oct 19 15:30:15 2019 -0300 perf trace: Use STUL_STRARRAY_FLAGS with mmap The 'mmap' syscall has special needs so it doesn't use SCA_STRARRAY_FLAGS, see its implementation in syscall_arg__scnprintf_mmap_flags(), related to special handling of MAP_ANONYMOUS, so set ->parm to the strarray__mmap_flags and hook up with strarray__strtoul_flags manually, now we can filter by those or-ed string expressions: # perf trace -e syscalls:sys_enter_mmap sleep 1 0.000 syscalls:sys_enter_mmap(addr: NULL, len: 134346, prot: READ, flags: PRIVATE, fd: 3, off: 0) 0.026 syscalls:sys_enter_mmap(addr: NULL, len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) 0.036 syscalls:sys_enter_mmap(addr: NULL, len: 1857472, prot: READ, flags: PRIVATE|DENYWRITE, fd: 3, off: 0) 0.046 syscalls:sys_enter_mmap(addr: 0x7fae003d9000, len: 1363968, prot: READ|EXEC, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x22000) 0.052 syscalls:sys_enter_mmap(addr: 0x7fae00526000, len: 311296, prot: READ, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x16f000) 0.055 syscalls:sys_enter_mmap(addr: 0x7fae00573000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x1bb000) 0.062 syscalls:sys_enter_mmap(addr: 0x7fae00579000, len: 14272, prot: READ|WRITE, flags: PRIVATE|FIXED|ANONYMOUS) 0.253 syscalls:sys_enter_mmap(addr: NULL, len: 217750512, prot: READ, flags: PRIVATE, fd: 3, off: 0) # # perf trace -e syscalls:sys_enter_mmap --filter="flags==PRIVATE|FIXED|DENYWRITE" sleep 1 0.000 syscalls:sys_enter_mmap(addr: 0x7f6ab3dcb000, len: 1363968, prot: READ|EXEC, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x22000) 0.010 syscalls:sys_enter_mmap(addr: 0x7f6ab3f18000, len: 311296, prot: READ, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x16f000) 0.014 syscalls:sys_enter_mmap(addr: 0x7f6ab3f65000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x1bb000) # perf trace -e syscalls:sys_enter_mmap --filter="flags==PRIVATE|ANONYMOUS" sleep 1 0.000 syscalls:sys_enter_mmap(addr: NULL, len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) # # perf trace -v -e syscalls:sys_enter_mmap --filter="flags==PRIVATE|ANONYMOUS" sleep 1 |& grep "New filter" New filter for syscalls:sys_enter_mmap: flags==0x22 # Cc: Adrian Hunter Cc: Andi Kleen Cc: Brendan Gregg Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-czw754b7m9rp9ibq2f6be2o1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e0712baa00322881ee74e28031f12a1cc032f0d4 Author: Arnaldo Carvalho de Melo Date: Sat Oct 19 15:26:50 2019 -0300 perf trace: Wire up strarray__strtoul_flags() Now anything that uses STRARRAY_FLAGS, like the 'fsmount' syscall will support mapping or-ed strings back to a value that can be used in a filter. In some cases, where STRARRAY_FLAGS isn't used but instead the scnprintf is a special one because of specific needs, like for mmap, then one has to set the ->pars to the strarray. See the next cset. Cc: Adrian Hunter Cc: Andi Kleen Cc: Brendan Gregg Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-r2lpqo7dfsrhi4ll0npsb3u7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 154c978d484c610468727c361576b7cfe9c3fec7 Author: Arnaldo Carvalho de Melo Date: Sat Oct 19 15:17:30 2019 -0300 libbeauty: Introduce strarray__strtoul_flags() Counterpart of strarray__scnprintf_flags(), i.e. from a expression like: # perf trace -e syscalls:sys_enter_mmap --filter="flags==PRIVATE|FIXED|DENYWRITE" I.e. that "flags==PRIVATE|FIXED|DENYWRITE", turn that into # perf trace -e syscalls:sys_enter_mmap --filter=0x812 Cc: Adrian Hunter Cc: Andi Kleen Cc: Brendan Gregg Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-8xst3zrqqogax7fmfzwymvbl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f77526be82fcc31cb0d54796dd8f8476472b05d0 Author: Arnaldo Carvalho de Melo Date: Sat Oct 19 15:13:21 2019 -0300 libbeauty: Make the mmap_flags strarray visible outside of its beautifier So that we can later use it with the strarray__strtoul_flags() routine that will be soon introduced. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-vldj3ch8su6i20to5eq31e8x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 82c38338e0850a01057960efc94c6130f1a0fdde Author: Arnaldo Carvalho de Melo Date: Fri Oct 18 15:44:42 2019 -0300 perf trace: Use strtoul for the fcntl 'cmd' argument Since its values are in two ranges of values we ended up codifying it using a 'struct strarrays', so now hook it up with STUL_STRARRAYS so that we can do: # perf trace -e syscalls:*enter_fcntl --filter=cmd==SETLK||cmd==SETLKW 0.000 sssd_kcm/19021 syscalls:sys_enter_fcntl(fd: 13, cmd: SETLK, arg: 0x7ffcf0a4dee0) 1.523 sssd_kcm/19021 syscalls:sys_enter_fcntl(fd: 13, cmd: SETLK, arg: 0x7ffcf0a4de90) 1.629 sssd_kcm/19021 syscalls:sys_enter_fcntl(fd: 13, cmd: SETLK, arg: 0x7ffcf0a4de90) 2.711 sssd_kcm/19021 syscalls:sys_enter_fcntl(fd: 13, cmd: SETLK, arg: 0x7ffcf0a4de70) ^C# Cc: Adrian Hunter Cc: Andi Kleen Cc: Brendan Gregg Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-mob96wyzri4r3rvyigqfjv0a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1a8a90b823f5e7279f84b39bbcd6c59e266e7dc2 Author: Arnaldo Carvalho de Melo Date: Fri Oct 18 15:41:07 2019 -0300 libbeauty: Introduce syscall_arg__strtoul_strarrays() To allow going from string to integer for 'struct strarrays'. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-b1ia3xzcy72hv0u4m168fcd0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit dcc6854215f115efcbd79368bc07099c41de0b6c Author: Jiri Olsa Date: Thu Oct 17 12:59:18 2019 +0200 libperf: Add pr_err() macro And missing include for "perf/core.h" header, which provides LIBPERF_* debug levels and add missing pr_err() support. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c27feefea10aed40e82cd5c6b06a154e141dc038 Author: Jiri Olsa Date: Thu Oct 17 12:59:17 2019 +0200 libperf: Do not export perf_evsel__init()/perf_evlist__init() There's no point in exporting perf_evsel__init()/perf_evlist__init(), it's called from perf_evsel__new()/perf_evlist__new() respectively. It's used only from perf where perf_evsel()/perf_evlist() is embedded perf's evsel/evlist. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 301a89f8cf628316eea6c768787a836b63a83439 Author: Jiri Olsa Date: Thu Oct 17 12:59:16 2019 +0200 libperf: Keep count of failed tests Keep the count of failed tests, so we get better output with failures, like: # make tests ... running static: - running test-cpumap.c...OK - running test-threadmap.c...OK - running test-evlist.c...FAILED test-evlist.c:53 failed to create evsel2 FAILED test-evlist.c:163 failed to create evsel2 FAILED test-evlist.c:287 failed count FAILED (3) - running test-evsel.c...OK running dynamic: - running test-cpumap.c...OK - running test-threadmap.c...OK - running test-evlist.c...FAILED test-evlist.c:53 failed to create evsel2 FAILED test-evlist.c:163 failed to create evsel2 FAILED test-evlist.c:287 failed count FAILED (3) - running test-evsel.c...OK ... Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 37ac1bbdc31a2007f398b7caf0cbe522f1af9c6c Author: Jiri Olsa Date: Thu Oct 17 12:59:15 2019 +0200 libperf: Add tests_mmap_cpus test Add mmaping tests that generates prctl call on every cpu validates it gets all the related events in ring buffer. Committer testing: # make -C tools/perf/lib tests make: Entering directory '/home/acme/git/perf/tools/perf/lib' LINK test-cpumap-a LINK test-threadmap-a LINK test-evlist-a LINK test-evsel-a LINK test-cpumap-so LINK test-threadmap-so LINK test-evlist-so LINK test-evsel-so running static: - running test-cpumap.c...OK - running test-threadmap.c...OK - running test-evlist.c...OK - running test-evsel.c...OK running dynamic: - running test-cpumap.c...OK - running test-threadmap.c...OK - running test-evlist.c...OK - running test-evsel.c...OK make: Leaving directory '/home/acme/git/perf/tools/perf/lib' # Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-8-jolsa@kernel.org [ Added _GNU_SOURCE define for sched.h to get sched_[gs]et_affinity Signed-off-by: Arnaldo Carvalho de Melo commit bd6b7736c1ed109f4d86f725e96a48fb81ce71f6 Author: Jiri Olsa Date: Thu Oct 17 12:59:14 2019 +0200 libperf: Add tests_mmap_thread test Add mmaping tests that generates 100 prctl calls in monitored child process and validates it gets 100 events in ring buffer. Committer tests: # make -C tools/perf/lib tests make: Entering directory '/home/acme/git/perf/tools/perf/lib' LINK test-cpumap-a LINK test-threadmap-a LINK test-evlist-a LINK test-evsel-a LINK test-cpumap-so LINK test-threadmap-so LINK test-evlist-so LINK test-evsel-so running static: - running test-cpumap.c...OK - running test-threadmap.c...OK - running test-evlist.c...OK - running test-evsel.c...OK running dynamic: - running test-cpumap.c...OK - running test-threadmap.c...OK - running test-evlist.c...OK - running test-evsel.c...OK make: Leaving directory '/home/acme/git/perf/tools/perf/lib' # Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 395e62cde10df64122d708c68baee64b1d1622fc Author: Jiri Olsa Date: Thu Oct 17 12:59:12 2019 +0200 libperf: Link static tests with libapi.a Both static and dynamic tests needs to link with libapi.a, because it's using its functions. Also include path for libapi includes. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b6cd35e4e09c12f9478ed98cb015d4352fa98056 Author: Jiri Olsa Date: Thu Oct 17 12:59:11 2019 +0200 libperf: Move mask setup to perf_evlist__mmap_ops() Move the mask setup to perf_evlist__mmap_ops(), because it's the same on both perf and libperf path. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3805e4f303314c2b53fb217dd8549a5b9eb06b11 Author: Jiri Olsa Date: Thu Oct 17 12:59:10 2019 +0200 libperf: Move mmap allocation to perf_evlist__mmap_ops::get Move allocation of the mmap array into perf_evlist__mmap_ops::get, to centralize the mmap allocation. Also move nr_mmap setup to perf_evlist__mmap_ops so it's centralized and shared by both perf and libperf mmap code. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6eb65f7a5cc553f5dffb5cea3a874f1087524d99 Author: Jiri Olsa Date: Thu Oct 17 12:59:09 2019 +0200 libperf: Introduce perf_evlist__for_each_mmap() Add the perf_evlist__for_each_mmap() function and export it in the perf/evlist.h header, so that the user can iterate through 'struct perf_mmap' objects. Add a internal perf_mmap__link() function to do the actual linking. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6a5f3d94cb69a185b921cb92c39888dc31009acb Author: Leo Yan Date: Fri Oct 18 16:55:31 2019 +0800 perf tests: Disable bp_signal testing for arm64 As there are several discussions for enabling perf breakpoint signal testing on arm64 platform: arm64 needs to rely on single-step to execute the breakpointed instruction and then reinstall the breakpoint exception handler. But if we hook the breakpoint with a signal, the signal handler will do the stepping rather than the breakpointed instruction, this causes infinite loops as below: Kernel space | Userspace ---------------------------------|-------------------------------- | __test_function() -> hit | breakpoint breakpoint_handler() | `-> user_enable_single_step() | do_signal() | | sig_handler() -> Step one | instruction and | trap to kernel single_step_handler() | `-> reinstall_suspended_bps() | | __test_function() -> hit | breakpoint again and | repeat up flow infinitely As Will Deacon mentioned [1]: "that we require the overflow handler to do the stepping on arm/arm64, which is relied upon by GDB/ptrace. The hw_breakpoint code is a complete disaster so my preference would be to rip out the perf part and just implement something directly in ptrace, but it's a pretty horrible job". Though Will commented this on arm architecture, but the comment also can apply on arm64 architecture. For complete information, I searched online and found a few years back, Wang Nan sent one patch 'arm64: Store breakpoint single step state into pstate' [2]; the patch tried to resolve this issue by avoiding single stepping in signal handler and defer to enable the signal stepping when return to __test_function(). The fixing was not merged due to the concern for missing to handle different usage cases. Based on the info, the most feasible way is to skip Perf breakpoint signal testing for arm64 and this could avoid the duplicate investigation efforts when people see the failure. This patch skips this case on arm64 platform, which is same with arm architecture. [1] https://lkml.org/lkml/2018/11/15/205 [2] https://lkml.org/lkml/2015/12/23/477 Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Brajeswar Ghosh Cc: Florian Fainelli Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Souptick Joarder Cc: Will Deacon Link: http://lore.kernel.org/lkml/20191018085531.6348-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e533eadf6596451880f518949cbb964dbd6189ae Author: Leo Yan Date: Fri Oct 18 16:55:30 2019 +0800 perf tests bp_account: Add dedicated checking helper is_supported() The arm architecture supports breakpoint accounting but it doesn't support breakpoint overflow signal handling. The current code uses the same checking helper, thus it disables both testings (bp_account and bp_signal) for arm platform. For handling two testings separately, this patch adds a dedicated checking helper is_supported() for breakpoint accounting testing, thus it allows supporting breakpoint accounting testing on arm platform; the old helper test__bp_signal_is_supported() is only used to checking for breakpoint overflow signal testing. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Brajeswar Ghosh Cc: Florian Fainelli Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Souptick Joarder Cc: Will Deacon Link: http://lore.kernel.org/lkml/20191018085531.6348-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 12d795637ba169650ea10ad6babcc5425255944a Author: Leo Yan Date: Fri Oct 18 16:55:29 2019 +0800 perf tests: Remove needless headers for bp_account A few headers are not needed and were introduced by copying from other test file. This patch removes the needless headers for the breakpoint accounting testing. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Brajeswar Ghosh Cc: Florian Fainelli Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Souptick Joarder Cc: Will Deacon Link: http://lore.kernel.org/lkml/20191018085531.6348-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit a7f6c8c81afdd6d24eb12558f2fb66901207d349 Author: Jin Yao Date: Tue Oct 15 10:53:57 2019 +0800 perf list: Hide deprecated events by default There are some deprecated events listed by perf list. But we can't remove them from perf list with ease because some old scripts may use them. Deprecated events are old names of renamed events. When an event gets renamed the old name is kept around for some time and marked with Deprecated. The newer Intel event lists in the tree already have these headers. So we need to keep them in the event list, but provide a new option to show them. The new option is "--deprecated". With this patch, the deprecated events are hidden by default but they can be displayed when option "--deprecated" is enabled. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191015025357.8708-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9afec87ec1f832b8a521da42a72b73a44a59949d Author: Arnaldo Carvalho de Melo Date: Fri Oct 18 11:15:55 2019 -0300 perf trace: Pass a syscall_arg to syscall_arg_fmt->strtoul() With just what we need for the STUL_STRARRAY, i.e. the 'struct strarray' pointer to be used, just like with syscall_arg_fmt->scnprintf() for the other direction (number -> string). With this all the strarrays that are associated with syscalls can be used with '-e syscalls:sys_enter_SYSCALLNAME --filter', and soon will be possible as well to use with the strace-like shorter form, with just the syscall names, i.e. something like: -e lseek/whence==END/ For now we have to use the longer form: # perf trace -e syscalls:sys_enter_lseek 0.000 pool/2242 syscalls:sys_enter_lseek(fd: 14, offset: 0, whence: CUR) 0.031 pool/2242 syscalls:sys_enter_lseek(fd: 15, offset: 0, whence: CUR) 0.046 pool/2242 syscalls:sys_enter_lseek(fd: 16, offset: 0, whence: CUR) 5003.528 pool/2242 syscalls:sys_enter_lseek(fd: 14, offset: 0, whence: CUR) 5003.575 pool/2242 syscalls:sys_enter_lseek(fd: 15, offset: 0, whence: CUR) 5003.593 pool/2242 syscalls:sys_enter_lseek(fd: 16, offset: 0, whence: CUR) 10002.017 pool/2242 syscalls:sys_enter_lseek(fd: 14, offset: 0, whence: CUR) 10002.051 pool/2242 syscalls:sys_enter_lseek(fd: 15, offset: 0, whence: CUR) 10002.068 pool/2242 syscalls:sys_enter_lseek(fd: 16, offset: 0, whence: CUR) ^C# perf trace -e syscalls:sys_enter_lseek --filter="whence!=CUR" 0.000 sshd/24476 syscalls:sys_enter_lseek(fd: 3, offset: 9032, whence: SET) 0.060 sshd/24476 syscalls:sys_enter_lseek(fd: 3, offset: 9032, whence: SET) 0.187 sshd/24476 syscalls:sys_enter_lseek(fd: 3, offset: 118632, whence: SET) 0.203 sshd/24476 syscalls:sys_enter_lseek(fd: 3, offset: 118632, whence: SET) 0.349 sshd/24476 syscalls:sys_enter_lseek(fd: 3, offset: 61936, whence: SET) ^C# And for those curious about what are those lseek(DSO, offset, SET), well, its the loader: # perf trace -e syscalls:sys_enter_lseek/max-stack=16/ --filter="whence!=CUR" 0.000 sshd/24495 syscalls:sys_enter_lseek(fd: 3, offset: 9032, whence: SET) __libc_lseek64 (/usr/lib64/ld-2.29.so) _dl_map_object (/usr/lib64/ld-2.29.so) 0.067 sshd/24495 syscalls:sys_enter_lseek(fd: 3, offset: 9032, whence: SET) __libc_lseek64 (/usr/lib64/ld-2.29.so) _dl_map_object_from_fd (/usr/lib64/ld-2.29.so) _dl_map_object (/usr/lib64/ld-2.29.so) 0.198 sshd/24495 syscalls:sys_enter_lseek(fd: 3, offset: 118632, whence: SET) __libc_lseek64 (/usr/lib64/ld-2.29.so) _dl_map_object (/usr/lib64/ld-2.29.so) 0.219 sshd/24495 syscalls:sys_enter_lseek(fd: 3, offset: 118632, whence: SET) __libc_lseek64 (/usr/lib64/ld-2.29.so) _dl_map_object_from_fd (/usr/lib64/ld-2.29.so) _dl_map_object (/usr/lib64/ld-2.29.so) ^C# :-) With this we can use strings in strarrays in filters, which allows us to reuse all these that are in place for syscalls: $ find tools/perf/trace/beauty/ -name "*.c" | xargs grep -w DEFINE_STRARRAY tools/perf/trace/beauty/fcntl.c: static DEFINE_STRARRAY(fcntl_setlease, "F_"); tools/perf/trace/beauty/mmap.c: static DEFINE_STRARRAY(mmap_flags, "MAP_"); tools/perf/trace/beauty/mmap.c: static DEFINE_STRARRAY(madvise_advices, "MADV_"); tools/perf/trace/beauty/sync_file_range.c: static DEFINE_STRARRAY(sync_file_range_flags, "SYNC_FILE_RANGE_"); tools/perf/trace/beauty/socket.c: static DEFINE_STRARRAY(socket_ipproto, "IPPROTO_"); tools/perf/trace/beauty/mount_flags.c: static DEFINE_STRARRAY(mount_flags, "MS_"); tools/perf/trace/beauty/pkey_alloc.c: static DEFINE_STRARRAY(pkey_alloc_access_rights, "PKEY_"); tools/perf/trace/beauty/sockaddr.c:DEFINE_STRARRAY(socket_families, "PF_"); tools/perf/trace/beauty/tracepoints/x86_irq_vectors.c:static DEFINE_STRARRAY(x86_irq_vectors, "_VECTOR"); tools/perf/trace/beauty/tracepoints/x86_msr.c:static DEFINE_STRARRAY(x86_MSRs, "MSR_"); tools/perf/trace/beauty/prctl.c: static DEFINE_STRARRAY(prctl_options, "PR_"); tools/perf/trace/beauty/prctl.c: static DEFINE_STRARRAY(prctl_set_mm_options, "PR_SET_MM_"); tools/perf/trace/beauty/fspick.c: static DEFINE_STRARRAY(fspick_flags, "FSPICK_"); tools/perf/trace/beauty/ioctl.c: static DEFINE_STRARRAY(ioctl_tty_cmd, ""); tools/perf/trace/beauty/ioctl.c: static DEFINE_STRARRAY(drm_ioctl_cmds, ""); tools/perf/trace/beauty/ioctl.c: static DEFINE_STRARRAY(sndrv_pcm_ioctl_cmds, ""); tools/perf/trace/beauty/ioctl.c: static DEFINE_STRARRAY(sndrv_ctl_ioctl_cmds, ""); tools/perf/trace/beauty/ioctl.c: static DEFINE_STRARRAY(kvm_ioctl_cmds, ""); tools/perf/trace/beauty/ioctl.c: static DEFINE_STRARRAY(vhost_virtio_ioctl_cmds, ""); tools/perf/trace/beauty/ioctl.c: static DEFINE_STRARRAY(vhost_virtio_ioctl_read_cmds, ""); tools/perf/trace/beauty/ioctl.c: static DEFINE_STRARRAY(perf_ioctl_cmds, ""); tools/perf/trace/beauty/ioctl.c: static DEFINE_STRARRAY(usbdevfs_ioctl_cmds, ""); tools/perf/trace/beauty/fsmount.c: static DEFINE_STRARRAY(fsmount_attr_flags, "MOUNT_ATTR_"); tools/perf/trace/beauty/renameat.c: static DEFINE_STRARRAY(rename_flags, "RENAME_"); tools/perf/trace/beauty/kcmp.c: static DEFINE_STRARRAY(kcmp_types, "KCMP_"); tools/perf/trace/beauty/move_mount.c: static DEFINE_STRARRAY(move_mount_flags, "MOVE_MOUNT_"); $ Well, some, as the mmap flags are like: $ tools/perf/trace/beauty/mmap_flags.sh static const char *mmap_flags[] = { [ilog2(0x40) + 1] = "32BIT", [ilog2(0x01) + 1] = "SHARED", [ilog2(0x02) + 1] = "PRIVATE", [ilog2(0x10) + 1] = "FIXED", [ilog2(0x20) + 1] = "ANONYMOUS", [ilog2(0x008000) + 1] = "POPULATE", [ilog2(0x010000) + 1] = "NONBLOCK", [ilog2(0x020000) + 1] = "STACK", [ilog2(0x040000) + 1] = "HUGETLB", [ilog2(0x080000) + 1] = "SYNC", [ilog2(0x100000) + 1] = "FIXED_NOREPLACE", [ilog2(0x0100) + 1] = "GROWSDOWN", [ilog2(0x0800) + 1] = "DENYWRITE", [ilog2(0x1000) + 1] = "EXECUTABLE", [ilog2(0x2000) + 1] = "LOCKED", [ilog2(0x4000) + 1] = "NORESERVE", }; $ So we'll need a strarray__strtoul_flags() that will break donw the flags into tokens separated by '|' before doing the lookup and then go on reconstructing the value from, say: # perf trace -e syscalls:sys_enter_mmap --filter="flags==PRIVATE|FIXED|DENYWRITE" into: # perf trace -e syscalls:sys_enter_mmap --filter="flags==0x2|0x10|0x0800" and finally into: # perf trace -e syscalls:sys_enter_mmap --filter="flags==0x812" That is what we see if we don't use the augmented view obtained from: # perf trace -e mmap 211792.885 procmail/15393 mmap(addr: 0x7fcd11645000, len: 8192, prot: READ, flags: PRIVATE|FIXED|DENYWRITE, fd: 8, off: 0xa000) = 0x7fcd11645000 But plain use tracefs: procmail-15559 [000] .... 54557.178262: sys_mmap(addr: 7f5c9bf7a000, len: 9b000, prot: 1, flags: 812, fd: 3, off: a9000) Cc: Adrian Hunter Cc: Andi Kleen Cc: Brendan Gregg Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-c6mgkjt8ujnc263eld5tb7q3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3a828f5eda306af55ac4abd581cbf0753db8f731 Author: Andreas Färber Date: Sat Oct 19 15:45:46 2019 +0200 MAINTAINERS: Add mailing list for Realtek SoCs Document linux-realtek-soc mailing list to be CC'ed on patches. Signed-off-by: Andreas Färber commit fae7548f25a41443f1f074fcc6d3fed220a42a34 Author: Nathan Chancellor Date: Fri Oct 18 15:29:24 2019 -0700 Bluetooth: btusb: Remove return statement in btintel_reset_to_bootloader When building with Clang and CONFIG_BT_INTEL unset, the following error occurs: In file included from drivers/bluetooth/hci_ldisc.c:34: drivers/bluetooth/btintel.h:188:2: error: void function 'btintel_reset_to_bootloader' should not return a value [-Wreturn-type] return -EOPNOTSUPP; ^ ~~~~~~~~~~~ 1 error generated. Remove the unneeded return statement to fix this. Fixes: b9a2562f4918 ("Bluetooth: btusb: Trigger Intel FW download error recovery") Link: https://github.com/ClangBuiltLinux/linux/issues/743 Reported-by: Reported-by: Stephen Rothwell Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Marcel Holtmann commit acfedcbe1ce4c69e1da914f39c02d945c80198d4 Author: Takashi Sakamoto Date: Fri Oct 18 15:19:11 2019 +0900 ALSA: firewire-lib: postpone to start IR context Some devices have a quirk to postpone transmission of isoc packet for several dozen or hundred isoc cycles since configured to transmit. Furthermore, some devices have a quirk to transmit isoc packet with discontinued data of its header. In 1394 OHCI specification, software allows to start isoc context with certain isoc cycle. Linux firewire subsystem has kernel API to use it as well. This commit uses the functionality of 1394 OHCI controller to handle the quirks. At present, this feature is convenient to ALSA bebob and fireface driver. As a result, some devices can be safely handled, as long as I know: - MAudio FireWire solo - MAudio ProFire Lightbridge - MAudio FireWire 410 - Roland FA-66 Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191018061911.24909-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 60dd49298ec5803ca423836d5a724c3fe402cc3f Author: Takashi Sakamoto Date: Fri Oct 18 15:19:10 2019 +0900 ALSA: firewire-lib: handle several AMDTP streams in callback handler of IRQ target This commit changes AMDTP domain to run on an IT context of 1394 OHCI as IRQ target. No hardware interrupt is scheduled for the other isoc contexts. All of the isoc context are processed in a callback for an isoc context of IRQ target. The IRQ target is automatically selected from a list of AMDTP streams, thus users of AMDTP domain should add an AMDTP stream for IT context at least. The reason to select IT context as IRQ target is that the IT context runs on local 1394 OHCI controller and it can be used as reliable, constant IRQ generator. On the other hand, IR context can include skip cycle according to isoc packet transferred by device. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191018061911.24909-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 813dfbd6845e5366f2dbef190a695f8b06c1d83d Author: Takashi Sakamoto Date: Fri Oct 18 15:19:09 2019 +0900 ALSA: firewire-lib: cancel flushing isoc context in the laste step to process context callback The aim of AMDTP domain is to process several isoc context in the same time. However, current implementation is against this idea because it flushes each isoc context in the end of processing context callback. This commit cancels it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191018061911.24909-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit e6dcc92fcea07f23c13996b7bb6a2a32ed4c6ed5 Author: Takashi Sakamoto Date: Fri Oct 18 15:19:08 2019 +0900 ALSA: firewire-lib: replace ack callback to flush isoc contexts in AMDTP domain An isoc context for AMDTP stream is flushed to queue packet by a call of pcm.ack. This commit extends this for AMDTP domain. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191018061911.24909-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit f890f9a04b361b2209c38e3317e6290a98e6ff6e Author: Takashi Sakamoto Date: Fri Oct 18 15:19:07 2019 +0900 ALSA: firewire-lib: replace pointer callback to flush isoc contexts in AMDTP domain An isoc context for AMDTP stream is flushed to queue packet by a call of pcm.pointer. This commit extends this for AMDTP domain. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191018061911.24909-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 03b4816dcb6ee348edf248f7ba9f04f1e90c2fc7 Author: Takashi Sakamoto Date: Fri Oct 18 15:19:06 2019 +0900 ALSA: firewire-lib: add irq_target member into amdtp_domain struct This commit is a preparation to handle several IR/IT contexts in the same domain by tasklet context for one of the IT context. Such IT context is stored to AMDTP domain structure as 'irq_target'. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191018061911.24909-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ae79d5588a04aec9dc4b0c6df700d131447306e0 Author: Ingo Molnar Date: Sat Oct 19 09:15:27 2019 +0200 perf/core: Fix !CONFIG_PERF_EVENTS build warnings and failures sparc64 runs into this warning: include/linux/security.h:1913:52: warning: 'struct perf_event' declared inside parameter list will not be visible outside of this definition or declaration which is escalated to a build error in some of the .c files due to -Werror. Fix it via a forward declaration, like we do for perf_event_attr, the stub inlines don't actually need to know the structure of this struct. Fixes: da97e18458fb: ("perf_event: Add support for LSM and SELinux checks") Cc: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Signed-off-by: Ingo Molnar commit 7acf6c9495d075a2f05e90915d03027227b0a1d5 Author: Lucas De Marchi Date: Thu Oct 10 18:09:06 2019 -0700 drm/i915: prettify MST debug message s/?/:/ so it gets correctly colored by dmesg. Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191011010907.103309-7-lucas.demarchi@intel.com commit 73cefd903de77ac084b278e152248d6923d400e5 Author: Lucas De Marchi Date: Thu Oct 10 18:09:05 2019 -0700 drm/i915: add pipe id/name to pipe mismatch logs This way it's easier to figure out what didn't match when we have multiple pipes enabled. v2: pass drm_crtc and use the more common [CRTC:%d:%s] format (Ville) v3: use struct intel_crtc type to pass crtc around (Ville) Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015164029.18431-5-lucas.demarchi@intel.com commit cbd9b9f2e7b1f2e34478e0b1d944d521063e430d Author: Lucas De Marchi Date: Thu Oct 10 18:09:04 2019 -0700 drm/i915: remove extra new line on pipe_config mismatch The new line is already added by pipe_config_mismatch(), so the callers shouldn't add it. Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191011010907.103309-5-lucas.demarchi@intel.com commit 10d987fd1b7baceaafa78d805e71427ab735b4e4 Author: Lucas De Marchi Date: Thu Oct 10 18:09:03 2019 -0700 drm/i915: fix port checks for MST support on gen >= 11 Both Ice Lake and Elkhart Lake (gen 11) support MST on all external connections except DDI A. Tiger Lake (gen 12) supports on all external connections. Move the check to happen inside intel_dp_mst_encoder_init() and add specific platform checks. v2: Replace != with == checks for ports on gen < 11 (Ville) Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015164029.18431-3-lucas.demarchi@intel.com commit 327f8d8c336d2f7a037e26cdbd7f372d993a138f Author: Lucas De Marchi Date: Thu Oct 10 18:09:01 2019 -0700 drm/i915: simplify setting of ddi_io_power_domain Instead of the ever growing switch, just compute the ddi io power domain based on the port number. Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191011010907.103309-2-lucas.demarchi@intel.com commit c695793b52216ad6a11ce952fc8d29f3a9d0c7cd Author: Balsundar P Date: Tue Oct 15 11:52:04 2019 +0530 scsi: aacraid: bump version Bump version to 50877. Link: https://lore.kernel.org/r/1571120524-6037-8-git-send-email-balsundar.p@microsemi.com Signed-off-by: Balsundar P Signed-off-by: Martin K. Petersen commit 26c54d0ec25c186329d845ad1beb9d3dde586af9 Author: Balsundar P Date: Tue Oct 15 11:52:03 2019 +0530 scsi: aacraid: send AIF request post IOP RESET After IOP reset completion, AIF request command is not issued to the controller. Driver schedules a worker thread to issue a AIF request command after IOP reset completion. [mkp: fix zeroday warning] Link: https://lore.kernel.org/r/1571120524-6037-7-git-send-email-balsundar.p@microsemi.com Acked-by: Balsundar P < Balsundar.P@microchip.com> Signed-off-by: Balsundar P Signed-off-by: Martin K. Petersen commit 572ee53a9badf62f3973d66f6475f9ce69720a25 Author: Balsundar P Date: Tue Oct 15 11:52:02 2019 +0530 scsi: aacraid: check adapter health Currently driver waits for the command IOCTL from the firmware and if the firmware enters nonresponsive state, the driver doesn't respond till the firmware is responsive again. Check that firmware is alive, otherwise return -EBUSY. [mkp: clarified commit desc] Link: https://lore.kernel.org/r/1571120524-6037-6-git-send-email-balsundar.p@microsemi.com Signed-off-by: Balsundar P Signed-off-by: Martin K. Petersen commit e2fd90dd2ed87bdcfdfb640f06da48fd23efa080 Author: Balsundar P Date: Tue Oct 15 11:52:01 2019 +0530 scsi: aacraid: setting different timeout for src and thor Set 180 second timeout for thor and 60 seconds for src controllers. Link: https://lore.kernel.org/r/1571120524-6037-5-git-send-email-balsundar.p@microsemi.com Signed-off-by: Balsundar P Signed-off-by: Martin K. Petersen commit c02a3342bad32baa9be201da39d3809b74f92239 Author: Balsundar P Date: Tue Oct 15 11:52:00 2019 +0530 scsi: aacraid: fixed firmware assert issue Before issuing IOP reset, INTX mode is selected. This is triggering MSGU lockup and ended in basecode assert. Use DROP_IO command when IOP reset is sent in preparation for interrupt mode switch. Link: https://lore.kernel.org/r/1571120524-6037-4-git-send-email-balsundar.p@microsemi.com Signed-off-by: Balsundar P Signed-off-by: Martin K. Petersen commit f2244c1b35e5302070af4c729db0b0e9eb8350c9 Author: Balsundar P Date: Tue Oct 15 11:51:59 2019 +0530 scsi: aacraid: fixed IO reporting error The problem is the driver detects FastResponse bit set and saves it to Fib's flags to not check IO response status, but it never clears it for next IO. Hence the next IO will pick up FastResponse bit to not check the IO response status and fail to report any type IO error to kernel Link: https://lore.kernel.org/r/1571120524-6037-3-git-send-email-balsundar.p@microsemi.com Signed-off-by: Balsundar P Signed-off-by: Martin K. Petersen commit c86fbe484c10b2cd1e770770db2d6b2c88801c1d Author: Balsundar P Date: Tue Oct 15 11:51:58 2019 +0530 scsi: aacraid: fix illegal IO beyond last LBA The driver fails to handle data when read or written beyond device reported LBA, which triggers kernel panic Link: https://lore.kernel.org/r/1571120524-6037-2-git-send-email-balsundar.p@microsemi.com Signed-off-by: Balsundar P Signed-off-by: Martin K. Petersen commit a6c948f98239cbec1f5f0dc741b5841008c264ff Author: Manasi Navare Date: Fri Oct 18 10:27:25 2019 -0700 drm/i915/display/icl: In port sync mode disable slaves first then master In the transcoder port sync mode, the slave transcoders mask their vblanks until master transcoder's vblank so while disabling them, make sure slaves are disabled first and then the masters. v5: * Dont pass dev priv to get_slave_crtc (Ville) v4: * Obtain slave state from master (Maarten) v3: * Rebase v2: * Use the intel_old_crtc_state_disables() helper Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Matt Roper Cc: Jani Nikula Signed-off-by: Manasi Navare Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191018172725.1338-6-manasi.d.navare@intel.com commit 51528afe7c5ed6fcd6ed4cfb046b74659d21738f Author: Manasi Navare Date: Fri Oct 18 10:27:24 2019 -0700 drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence This clears the transcoder port sync bits of the TRANS_DDI_FUNC_CTL2 register during crtc_disable(). v3: * Rebase on maarten's patches v2: * Directly write the trans_port_sync reg value (Maarten) Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Matt Roper Cc: Jani Nikula Signed-off-by: Manasi Navare Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191018172725.1338-5-manasi.d.navare@intel.com commit eadf6f9170d5e72ce571ce914638316863d512e7 Author: Manasi Navare Date: Fri Oct 18 10:27:23 2019 -0700 drm/i915/display/icl: Enable master-slaves in trans port sync As per the display enable sequence, we need to follow the enable sequence for slaves first with DP_TP_CTL set to Idle and configure the transcoder port sync register to select the corersponding master, then follow the enable sequence for master leaving DP_TP_CTL to idle. At this point the transcoder port sync mode is configured and enabled and the Vblanks of both ports are synchronized so then set DP_TP_CTL for the slave and master to Normal and do post crtc enable updates. v11: * Rebase (Manasi) v10: * in trans sync mode, dont stop link train for tgl (Manasi) v9: Remove update_scanline_offset to rebase on Maarten's patch (Manasi) v8: * Rebase on Maarten's patches (Manasi) v7: * Use ffs(slaves) to get slave crtc (Ville) v6: * Modeset implies active_changed, remove one condition (Maarten) v5: * Fix checkpatch warning (Manasi) v4: * Reuse skl_commit_modeset_enables() hook (Maarten) * Obtain slave crtc and states from master (Maarten) v3: * Rebase on drm-tip (Manasi) v2: * Create a icl_update_crtcs hook (Maarten, Danvet) * This sequence only for CRTCs in trans port sync mode (Maarten) Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Matt Roper Signed-off-by: Manasi Navare Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191018172725.1338-4-manasi.d.navare@intel.com commit ba5f1ae95d28cf3d5358fa7375578a1ad3b424e1 Author: Manasi Navare Date: Fri Oct 18 10:27:22 2019 -0700 drm/i915/display/icl: HW state readout for transcoder port sync config After the state is committed, we readout the HW registers and compare the HW state with the SW state that we just committed. For Transcdoer port sync, we add master_transcoder and the salves bitmask to the crtc_state, hence we need to read those during the HW state readout to avoid pipe state mismatch. v11: * Move master trans init to get pipe_Config hooks (Ville) v10: * Initialize master_tarnscoder readout for all platforms (Ville) v9: * Initialize master_transcoder = INVALID at get config (Ville) v8: * Use master_select -1, address TRANS_EDP case (Ville) * Rename master_transcoder to _readout (Lucas) v7: * NDont read HW state for DSI v6: * Go through both parts of HW readout (Maarten) * Add a WARN if the same trans configured as master and slave (Ville, Maarten) v5: * Add return INVALID in defaut case (Maarten) v4: * Get power domains in master loop for get_config (Ville) v3: * Add TRANSCODER_D (Maarten) * v3 Reviewed-by: Maarten Lankhorst v2: * Add Transcoder_D and MISSING_CASE (Maarten) Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Matt Roper Cc: Jani Nikula Signed-off-by: Manasi Navare Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191018172725.1338-3-manasi.d.navare@intel.com commit 705135bd734c949495f6c347dbfcca14cd2389b9 Author: Manasi Navare Date: Fri Oct 18 10:27:21 2019 -0700 drm/i915/display/icl: Enable TRANSCODER PORT SYNC for tiled displays across separate ports In case of tiled displays where different tiles are displayed across different ports, we need to synchronize the transcoders involved. This patch implements the transcoder port sync feature for synchronizing one master transcoder with one or more slave transcoders. This is only enbaled in slave transcoder and the master transcoder is unaware that it is operating in this mode. This has been tested with tiled display connected to ICL. v7: * Rebase on Maarten's patches v6: * Use master_trans +1 and address missing trans_edp case (Ville) v5: * Add TRANSCODER_D case and MISSING_CASE (Maarten) v4: Rebase v3: * Check of DP_MST moved to atomic_check (Maarten) v2: * Do not use RMW, just write to the register in commit (Jani N) Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Matt Roper Cc: Jani Nikula Signed-off-by: Manasi Navare Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191018172725.1338-2-manasi.d.navare@intel.com commit bfb926e3238580a5b4c13509c6aa73d84643d75d Author: Manasi Navare Date: Fri Oct 18 10:27:20 2019 -0700 drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync In case of tiled displays when the two tiles are sent across two CRTCs over two separate DP SST connectors, we need a mechanism to synchronize the two CRTCs and their corresponding transcoders. So use the master-slave mode where there is one master corresponding to last horizontal and vertical tile that needs to be genlocked with all other slave tiles. This patch identifies saves the master transcoder in all the slave CRTC states. This is needed to select the master CRTC/transcoder while configuring transcoder port sync for the corresponding slaves. v6: Rebase (manasi) v5: * Address Ville's comments * Just pass crtc_state, no need to check GEN (Ville) v4: * Rebase v3: * Use master_tramscoder instead of master_crtc for valid HW state readouts (Ville) v2: * Move this to intel_mode_set_pipe_config(Jani N, Ville) * Use slave_bitmask to save associated slaves in master crtc state (Ville) Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Matt Roper Signed-off-by: Manasi Navare Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191018172725.1338-1-manasi.d.navare@intel.com commit e80634a75aba90e7485cd1fdb463fcac5d45f14d Author: Tony Luck Date: Thu Aug 15 14:53:28 2019 -0700 EDAC, skx: Retrieve and print retry_rd_err_log registers Skylake logs some additional useful information in per-channel registers in addition the the architectural status/addr/misc logged in the machine check bank. Pick up this information and add it to the EDAC log: retry_rd_err_[five 32-bit register values] Sorry, no definitions for these registers. OEMs and DIMM vendors will be able to use them to isolate which cells in the DIMM are causing problems. correrrcnt[per rank corrected error counts] Note that if additional errors are logged while these registers are being read, you may see a jumble of values some from earlier errors, others from later errors (since the registers report the most recent logged error). The correrrcnt registers provide error counts per possible rank. If these counts only change by one since the previous error logged for this channel, then it is safe to assume that the registers logged provide a coherent view of one error. With this change EDAC logs look like this: EDAC MC4: 1 CE memory read error on CPU_SrcID#2_MC#0_Chan#1_DIMM#0 (channel:1 slot:0 page:0x8f26018 offset:0x0 grain:32 syndrome:0x0 - err_code:0x0101:0x0091 socket:2 imc:0 rank:0 bg:0 ba:0 row:0x1f880 col:0x200 retry_rd_err_log[0001a209 00000000 00000001 04800001 0001f880] correrrcnt[0001 0000 0000 0000 0000 0000 0000 0000]) Acked-by: Aristeu Rozanski Signed-off-by: Tony Luck commit 29b8e84fbc23cb2b70317b745641ea0569426872 Author: Tony Luck Date: Thu Aug 15 14:18:59 2019 -0700 EDAC, skx_common: Refactor so that we initialize "dev" in result of adxl decode. Simplifies the code a little. Acked-by: Aristeu Rozanski Signed-off-by: Tony Luck commit c145649bf262a0614fbe5955bdffdfaba9023fce Author: Tony Lindgren Date: Thu Oct 17 06:34:34 2019 -0700 ARM: OMAP2+: Configure voltage controller for cpcap to low-speed Looks like the i2c timings in high-speed mode do not work properly to allow us to clear I2C_DISABLE bits for PRM_VOLTCTRL register and the device reboots if I2C_DISABLE bits are cleared. Let's configure the voltage controller i2c for low-speed mode as done in the Motorola Mapphone Android Linux kernel. This saves us about 7mW of power during retention compared to the high-speed values. Let's also change the low-speed warning to pr_info about relying on the bootloader configured low-speed values like we currently do. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit 161eea1b25268a1f7fa8d220a3f0c350b4cc491c Author: Andy Shevchenko Date: Tue Aug 27 18:18:23 2019 +0300 PCI/AER: Fix kernel-doc warnings Kernel-doc validator complains: aer.c:207: warning: Function parameter or member 'str' not described in 'pcie_ecrc_get_policy' aer.c:1209: warning: Function parameter or member 'irq' not described in 'aer_isr' aer.c:1209: warning: Function parameter or member 'context' not described in 'aer_isr' aer.c:1209: warning: Excess function parameter 'work' description in 'aer_isr' Fix the above accordingly. Link: https://lore.kernel.org/r/20190827151823.75312-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan commit 6a8c97345a15f9c60ff6c6ac1629a3e9ec140320 Author: Andy Shevchenko Date: Tue Aug 27 18:18:22 2019 +0300 PCI/AER: Use for_each_set_bit() to simplify code Simplify error counting code by using for_each_set_bit() library function. Link: https://lore.kernel.org/r/20190827151823.75312-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan commit 6458b438ebc12bec732290bf80c53c4eeeaed1c0 Author: Rajat Jain Date: Tue Aug 27 15:21:44 2019 -0700 PCI/AER: Add PoisonTLPBlocked to Uncorrectable error counters The elements in the aer_uncorrectable_error_string[] refer to the bit names in Uncorrectable Error Status Register. Add PoisonTLPBlocked, which was added in PCIe r3.1, sec 7.10.2. Link: https://lore.kernel.org/r/20190827222145.32642-1-rajatja@google.com Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas commit af65d1ad416bc6e069ccb9e649faeda224248f96 Author: Patel, Mayurkumar Date: Fri Oct 18 16:52:21 2019 +0000 PCI/AER: Save AER Capability for suspend/resume Previously we did not save and restore the AER configuration on suspend/resume, so the configuration may be lost after resume. Save the AER configuration during suspend and restore it during resume. [bhelgaas: commit log] Link: https://lore.kernel.org/r/92EBB4272BF81E4089A7126EC1E7B28492C3B007@IRSMSX101.ger.corp.intel.com Signed-off-by: Mayurkumar Patel Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko commit 789fa8746daf8561e8cd0870a66ba7a5bb05fbf7 Author: Janusz Krzysztofik Date: Fri Oct 18 12:07:10 2019 +0200 drm/i915: Restore full symmetry in i915_driver_modeset_probe/remove Commit 2d6f6f359fd8 ("drm/i915: add i915_driver_modeset_remove()") claimed removal of asymmetry in probe() and remove() calls, however, it didn't take care of calling intel_irq_uninstall() on driver remove. That doesn't hurt as long as we still call it from intel_modeset_driver_remove() but in order to have full symmetry we should call it again from i915_driver_modeset_remove(). Note that it's safe to call intel_irq_uninstall() twice thanks to commit b318b82455bd ("drm/i915: Nuke drm_driver irq vfuncs"). We may only want to mention the case we are adding in a related FIXME comment provided by that commit. While being at it, update the name of function mentioned as calling it out of sequence as that name has been changed meanwhile by commit 78dae1ac35dd ("drm/i915: Propagate "_remove" function name suffix down"). Suggested-by: Michal Wajdeczko Signed-off-by: Janusz Krzysztofik Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/6250061.7lZMOAyebC@jkrzyszt-desk.ger.corp.intel.com commit ebcd670d05d54ff8d17a1a51bba1ec1e4069d949 Merge: 3858a6451efa 3503bf024b3e Author: David S. Miller Date: Fri Oct 18 13:12:35 2019 -0700 Merge branch 'lpc_eth-parse-phy-nodes-from-device-tree' Alexandre Belloni says: ==================== net: lpc_eth: parse phy nodes from device tree Allow describing connected phys using device tree. This solves issues finding the phy on the mdio bus and allows decribing the interrupt line the phy is possibly connected to. Changes in v3: - rebased on net-next - collected Reviewed-by Changes in v2: - move the phy decription in the mdio subnode. ==================== Signed-off-by: David S. Miller commit 3503bf024b3ec6d36ba1fe7a19ad083f058bb95d Author: Alexandre Belloni Date: Fri Oct 18 00:22:31 2019 +0200 net: lpc_eth: parse phy nodes from device tree When connected to a micrel phy, phy_find_first doesn't work properly because the first phy found is on address 0, the broadcast address but, the first thing the phy driver is doing is disabling this broadcast address. The phy is then available only on address 1 but the mdio driver doesn't know about it. Instead, register the mdio bus using of_mdiobus_register and try to find the phy description in device tree before falling back to phy_find_first. This ultimately also allows to describe the interrupt the phy is connected to. Signed-off-by: Alexandre Belloni Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2c69dae840c8d1ab93dc7226225807518df84140 Author: Alexandre Belloni Date: Fri Oct 18 00:22:30 2019 +0200 dt-bindings: net: lpc-eth: document optional properties The Ethernet controller is also an mdio controller, to be able to parse children (phys for example), and mdio node must be present. Signed-off-by: Alexandre Belloni Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit b61d3e87b6ab6f5da1ab1f825d1c75abbbebc578 Author: Florian Fainelli Date: Tue Oct 15 15:45:13 2019 -0700 memory: brcmstb: dpfe: Fixup API version/commands for 7211 7211 uses a newer version of API v2 which is half way between what was defined as API v3 and what used to be called API v2 but was used with DPFE firmwares with major versions 1.x.x.x. Starting with **the new** API v2, we are no longer getting loadable firmware images, so the capability to load it is removed (like v3). To avoid spreading more confusion, map 7268/7271/7278 to the old DPFE API version 2, 7211 to the new API v2 and introduce the specific commands for that, and leave newer versions to map to API v3. Signed-off-by: Florian Fainelli Signed-off-by: Markus Mayer commit 5d06f53d950928ecc02dd1a05e58f719eb28589b Author: Florian Fainelli Date: Tue Oct 15 15:45:12 2019 -0700 memory: brcmstb: dpfe: Compute checksum at __send_command() time Instead of pre-computing the checksum, do it at the time we send the command, this reduces the possibility of introducing errors as well as limits the amount of code necessary while adding new commands and/or new API versions. The MSG_CHKSUM enumeration value is no longer necessary and is removed. Signed-off-by: Florian Fainelli Signed-off-by: Markus Mayer commit a96de139301385e5992768c0f60240ddfbb33325 Author: Chuhong Yuan Date: Wed Oct 16 22:25:40 2019 +0800 staging: iio: ad9834: add a check for devm_clk_get ad9834_probe misses a check for devm_clk_get and may cause problems. Add a check like what ad9832 does to fix it. Signed-off-by: Chuhong Yuan Reviewed-by: Dan Carpenter Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit d26c9abeedafb699b5fc612065db03880826711f Author: Jonathan Cameron Date: Sun Oct 13 17:48:48 2019 +0100 iio: adc: xilinx-xadc: use devm_platform_ioremap_resource Reduces local boilerplate. Suggested by coccinelle. CHECK drivers/iio/adc/xilinx-xadc-core.c drivers/iio/adc/xilinx-xadc-core.c:1184:1-11: WARNING: Use devm_platform_ioremap_resource for xadc -> base Signed-off-by: Jonathan Cameron Cc: Manish Narani Reviewed-by: Sven Van Asbroeck commit 49d3faba7e36115d269691bf701dd394ade4f8b8 Author: Jonathan Cameron Date: Sun Oct 13 19:10:13 2019 +0100 iio: temp: maxim thermocouple: Drop unneeded semi colon. Identified by coccinelle CHECK drivers/iio/temperature/maxim_thermocouple.c drivers/iio/temperature/maxim_thermocouple.c:197:3-4: Unneeded semicolon Signed-off-by: Jonathan Cameron Acked-by: Matt Ranostay commit 0e643753829341d8df1b6df64fb2d54491f97223 Author: Jonathan Cameron Date: Sun Oct 13 17:21:33 2019 +0100 iio: adc: cpcap-adc: Fix missing IRQF_ONESHOT as only threaded handler. Coccinelle noticed: CHECK drivers/iio/adc/cpcap-adc.c drivers/iio/adc/cpcap-adc.c:1009:9-34: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT As far as I can see this is a simple case of it should be specified but isn't. Signed-off-by: Jonathan Cameron Acked-by: Tony Lindgren commit 5f401ef09291e574b2cc5b6453369130e39d136b Author: Jonathan Cameron Date: Sun Oct 13 16:37:59 2019 +0100 iio: adc: meson_saradc: use devm_platform_ioremap_resource Avoid local boilerplate. Suggested by coccinelle via coccicheck. CHECK drivers/iio/adc/meson_saradc.c drivers/iio/adc/meson_saradc.c:1218:1-5: WARNING: Use devm_platform_ioremap_resource for base Signed-off-by: Jonathan Cameron Reviewed-by: Martin Blumenstingl Cc: Neil Armstrong Signed-off-by: Jonathan Cameron commit 528e39b86fed3a52cdfa8c889da11cf093118b5a Author: Jonathan Cameron Date: Sun Oct 13 13:35:24 2019 +0100 iio: adc: exynos: use devm_platform_ioremap_resource Reduce local boilerplate. Identified by coccinelle drivers/iio/adc/exynos_adc.c:792:1-11: WARNING: Use devm_platform_ioremap_resource for info -> regs Signed-off-by: Jonathan Cameron Reviewed-by: Chanwoo Choi commit 54b8625cd940b6baace0bd9b1cf26b2de68ba307 Author: John Fastabend Date: Fri Oct 18 07:41:26 2019 -0700 bpf, libbpf: Add kernel version section parsing back With commit "libbpf: stop enforcing kern_version,..." we removed the kernel version section parsing in favor of querying for the kernel using uname() and populating the version using the result of the query. After this any version sections were simply ignored. Unfortunately, the world of kernels is not so friendly. I've found some customized kernels where uname() does not match the in kernel version. To fix this so programs can load in this environment this patch adds back parsing the section and if it exists uses the user specified kernel version to override the uname() result. However, keep most the kernel uname() discovery bits so users are not required to insert the version except in these odd cases. Fixes: 5e61f27070292 ("libbpf: stop enforcing kern_version, populate it for users") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157140968634.9073.6407090804163937103.stgit@john-XPS-13-9370 commit 88e4787f0c42b1c2a197a48a7e2da88f72a7990a Author: Jonathan Cameron Date: Sun Oct 13 13:35:23 2019 +0100 iio: adc: exynos: Drop a stray semicolon Identified by coccinelle drivers/iio/adc/exynos_adc.c:654:2-3: Unneeded semicolon Signed-off-by: Jonathan Cameron Reviewed-by: Chanwoo Choi commit d2080a87a376d5f3f1e0efbc94a8c3c7b24d0a31 Author: Jonathan Cameron Date: Sun Oct 13 11:26:00 2019 +0100 iio: proximity: pulsedlight v2: Tidy up an endian issue Sparse identified the following CHECK drivers/iio/proximity/pulsedlight-lidar-lite-v2.c drivers/iio/proximity/pulsedlight-lidar-lite-v2.c:144:24: warning: cast to restricted __be16 drivers/iio/proximity/pulsedlight-lidar-lite-v2.c:144:24: warning: cast to restricted __be16 drivers/iio/proximity/pulsedlight-lidar-lite-v2.c:144:24: warning: cast to restricted __be16 drivers/iio/proximity/pulsedlight-lidar-lite-v2.c:144:24: warning: cast to restricted __be16 This cleans up by adding a local variable to hold the value whilst it is __be16 before applying endian converstion into eventual destination. Signed-off-by: Jonathan Cameron Acked-by: Matt Ranostay commit 1f5343c0ae9673543055e9794362766e1f0ed163 Author: YueHaibing Date: Fri Oct 18 17:03:44 2019 +0800 bpf: Fix build error without CONFIG_NET If CONFIG_NET is n, building fails: kernel/trace/bpf_trace.o: In function `raw_tp_prog_func_proto': bpf_trace.c:(.text+0x1a34): undefined reference to `bpf_skb_output_proto' Wrap it into a #ifdef to fix this. Fixes: a7658e1a4164 ("bpf: Check types of arguments passed into helpers") Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191018090344.26936-1-yuehaibing@huawei.com commit 6b943a6f23d0b76610320eee599f14f83f8d4c2b Author: Jonathan Cameron Date: Sun Oct 13 11:17:42 2019 +0100 iio: pressure: bmp280 endian tidy ups There is a somewhat interesting mixture of be16 and le16 going on in this one function. Changes here formalize that a little more. CHECK drivers/iio/pressure/bmp280-core.c drivers/iio/pressure/bmp280-core.c:215:35: warning: cast to restricted __le16 drivers/iio/pressure/bmp280-core.c:229:37: warning: cast to restricted __be16 drivers/iio/pressure/bmp280-core.c:229:37: warning: cast to restricted __be16 drivers/iio/pressure/bmp280-core.c:229:37: warning: cast to restricted __be16 drivers/iio/pressure/bmp280-core.c:229:37: warning: cast to restricted __be16 drivers/iio/pressure/bmp280-core.c:230:36: warning: cast to restricted __be16 drivers/iio/pressure/bmp280-core.c:230:36: warning: cast to restricted __be16 drivers/iio/pressure/bmp280-core.c:230:36: warning: cast to restricted __be16 drivers/iio/pressure/bmp280-core.c:230:36: warning: cast to restricted __be16 drivers/iio/pressure/bmp280-core.c:237:37: warning: cast to restricted __le16 Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij commit c108e3c1bdbd0783d7c19ee80abb0591f79029e8 Author: Alexei Starovoitov Date: Thu Oct 17 23:09:33 2019 -0700 bpf: Fix bpf_attr.attach_btf_id check Only raw_tracepoint program type can have bpf_attr.attach_btf_id >= 0. Make sure to reject other program types that accidentally set it to non-zero. Fixes: ccfe29eb29c2 ("bpf: Add attach_btf_id attribute to program load") Reported-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191018060933.2950231-1-ast@kernel.org commit 1123c084d75116bb6d4a0ff3801facde786093a5 Author: Jonathan Cameron Date: Sun Oct 13 11:02:55 2019 +0100 iio: gyro: mpu3050: Explicity make a 'poison' value big endian This clearly has no actual affect but it does show sparse and similar static analysers that we are doing this intentionally. CHECK drivers/iio/gyro/mpu3050-core.c drivers/iio/gyro/mpu3050-core.c:546:48: warning: incorrect type in assignment (different base types) drivers/iio/gyro/mpu3050-core.c:546:48: expected restricted __be16 drivers/iio/gyro/mpu3050-core.c:546:48: got int Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij commit 78b75ab3f8c9dfac563b81105a1b838ec37a940e Author: Jonathan Cameron Date: Sun Oct 13 10:55:15 2019 +0100 iio: chemical: sps30: Explicity truncate constant by masking When breaking up a constant to write to two 8 bit registers it isn't obvious to sparse that it was intentional. CHECK drivers/iio/chemical/sps30.c drivers/iio/chemical/sps30.c:120:30: warning: cast truncates bits from constant value (8004 becomes 4) So in the interests of minimising noisy warnings, let us add a mask. Signed-off-by: Jonathan Cameron Acked-by: Tomasz Duszynski commit 47f3b26e708b59dcb10eae2db79bf3aeecfdd9e5 Author: Jonathan Cameron Date: Sun Oct 13 10:15:41 2019 +0100 iio: adc: stmpe-adc: Cleanup endian type of local variable Nothing stops data being of type __be16, which fixes the warning: CHECK drivers/iio/adc/stmpe-adc.c drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 drivers/iio/adc/stmpe-adc.c:202:29: warning: cast to restricted __be16 Signed-off-by: Jonathan Cameron Reviewed-by: commit 9299b503db31e86d24a67e3074d525c7496e5857 Author: Jonathan Cameron Date: Sun Oct 13 10:05:42 2019 +0100 iio: adc: mcp320x: Tidy up endian types in type cast. Fixes the sparse warning: drivers/iio/adc/mcp320x.c:167:41: warning: incorrect type in argument 1 (different base types) drivers/iio/adc/mcp320x.c:167:41: expected restricted __be32 const [usertype] *p drivers/iio/adc/mcp320x.c:167:41: got unsigned int [usertype] * Signed-off-by: Jonathan Cameron Reviewed-by: Lukas Wunner commit 5617f22b236d62e3d5beefa2fea3334ccb8656d3 Author: Jonathan Cameron Date: Sun Oct 13 09:57:23 2019 +0100 iio: adc: at91-sama5d2: Replace 0 with NULL when clearing some pointers. Cleans up the sparse warning: CHECK drivers/iio/adc/at91-sama5d2_adc.c drivers/iio/adc/at91-sama5d2_adc.c:1486:31: warning: Using plain integer as NULL pointer drivers/iio/adc/at91-sama5d2_adc.c:1509:31: warning: Using plain integer as NULL pointer Signed-off-by: Jonathan Cameron Reviewed-by: Eugen Hristev commit c5d550fb6e126a73247d4a98d6314a84f4805b98 Author: William Breathitt Gray Date: Sun Oct 6 16:03:11 2019 -0400 counter: Fix typo in action_get description The action_get callback returns a Synapse's action mode. Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron commit e58cbfd20a24997660798023f68ccb4900f05424 Author: William Breathitt Gray Date: Sun Oct 6 16:03:10 2019 -0400 docs: driver-api: generic-counter: Update Count and Signal data types Count data is now always represented as an unsigned integer, while Signal data is either SIGNAL_LOW or SIGNAL_HIGH. In addition, clarification changes and additions are made to better explain the theory of the Generic Counter interface and its use. Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron commit d49e6ee2d6c2b654c5eeb9aa1c4986cd1bec2582 Author: William Breathitt Gray Date: Sun Oct 6 16:03:09 2019 -0400 counter: Simplify the count_read and count_write callbacks The count_read and count_write callbacks are simplified to pass val as unsigned long rather than as an opaque data structure. The opaque counter_count_read_value and counter_count_write_value structures, counter_count_value_type enum, and relevant counter_count_read_value_set and counter_count_write_value_get functions, are removed as they are no longer used. Cc: Patrick Havelange Acked-by: Fabrice Gasnier Acked-by: David Lechner Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron commit 16922ffee1217ec031162ca12ec9fe8710b11106 Merge: 686191a7ea13 a77fc1115689 Author: Jonathan Cameron Date: Fri Oct 18 19:46:10 2019 +0100 Merge branch 'ib-ab8500-5.4-rc1' into HEAD Immutable branch as considerable overlap with mfd, power and hwmon. commit 949561eb85bcee10248e7da51d44a0325d5e0d1b Author: Ville Syrjälä Date: Fri Oct 4 17:19:13 2019 +0300 drm/edid: Fix HDMI VIC handling Extract drm_mode_hdmi_vic() to correctly calculate the final HDMI VIC for us. Currently this is being done a bit differently between the AVI and HDMI infoframes. Let's get both to agree on this. We need to allow the case where a mode is both 3D and has a HDMI VIC. Currently we'll just refuse to generate the HDMI infoframe when we really should be setting HDMI VIC to 0 and instead enabling 3D stereo signalling. If the sink doesn't even support the HDMI infoframe we should not be picking the HDMI VIC in favor of the CEA VIC, because then we'll end up not sending either VIC in the end. Cc: Wayne Lin Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191004141914.20600-3-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit cfd6f8c3a94a96c003a8929b66d6d54181b9420d Author: Ville Syrjälä Date: Fri Oct 4 17:19:12 2019 +0300 drm/edid: Extract drm_mode_cea_vic() Extract the logic to compute the final CEA VIC to a small helper. We'll reorder it a bit to make future modifications more straightforward. No function changes. Cc: Wayne Lin Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191004141914.20600-2-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit a77fc11156893bd0332a1fb6e314e6268abf720b Author: Linus Walleij Date: Fri Oct 11 09:18:05 2019 +0200 mfd: Switch the AB8500 GPADC to IIO The AB8500 GPADC driver is indeed a "general purpose ADC" driver, and while the IIO subsystem did not exist when the driver was first merged, it is never too late to clean things up and move it to the right place. Nowadays IIO provides the right abstractions and interfaces to do generic ADC work in the kernel. We have to cut a bunch of debugfs luggage to make this transition swift, but all these files to is read out the raw values of the ADC and the IIO subsystem already has a standard sysfs ABI for doing exactly this: no debugfs is needed. Acked-by: Lee Jones Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 07063bbfa98e60916bf4805e490736d96d137e9d Author: Linus Walleij Date: Fri Oct 11 09:18:04 2019 +0200 iio: adc: New driver for the AB8500 GPADC This is a new driver for the ST-Ericsson AB8500 GPADC, which replaces the old driver in drivers/mfd/ab8500-gpadc.c and thus gets rid of another necessarily different custom driver from the times before IIO existed. The AB8500 GPADC can convert 10 different channels and these are used for monitoring voltages in the U8500 chipset, some are used for battery charging, some for temperature monitoring. As this is very core functionality that a lot of drivers depend on and was formerly compiled in with the AB8500 core driver, we deafault it to 'y' in Kconfig: it can be compiled out but it is really not advisible: the platform can for example overheat if we do. Reviewed-by: Jonathan Cameron Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit a133f5bc82dd3657f8f529ad95534d8e471ddd7c Author: Linus Walleij Date: Fri Oct 11 09:18:03 2019 +0200 mfd: ab8500: Augment DT bindings As we migrate the AB8500 GPADC driver to use IIO, we need to augment the bindings to account for defining the ADC channels in the device tree. Cc: devicetree@vger.kernel.org Acked-by: Lee Jones Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit d17e86cb16e088336501bed1fdec45f705d85c5f Author: Linus Walleij Date: Fri Oct 11 09:18:02 2019 +0200 hwmon: ab8500: Convert to IIO ADC This switches the AB8500 hardware monitor driver to using the standard IIO ADC channel lookup and conversion routines. Acked-by: Guenter Roeck Acked-by: Jonathan Cameron Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 1e82623c3ca6f58a40c8ffbbbc4cfd3f102a04cc Author: Linus Walleij Date: Fri Oct 11 09:18:01 2019 +0200 power: supply: ab8500_fg: Convert to IIO ADC This switches the AB8500 fuel gauge driver to using the standard IIO ADC channel lookup and conversion routines. Acked-by: Sebastian Reichel Acked-by: Jonathan Cameron Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 97ab78bac5d0d2d5eec68278d4c1810056388189 Author: Linus Walleij Date: Fri Oct 11 09:18:00 2019 +0200 power: supply: ab8500_charger: Convert to IIO ADC This switches the AB8500 battery charger driver to using the standard IIO ADC channel lookup and conversion routines. Acked-by: Jonathan Cameron Acked-by: Sebastian Reichel Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 0a8686e3090c4a2d21049fccc9466c9d3d312ba6 Author: Linus Walleij Date: Fri Oct 11 09:17:59 2019 +0200 power: supply: ab8500_btemp: Convert to IIO ADC This switches the AB8500 battery temperature driver to using the standard IIO ADC channel lookup and conversion routines. Acked-by: Sebastian Reichel Acked-by: Jonathan Cameron Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 28c03a4447b627c44ddb6b51788cc63791aabd78 Author: Ville Syrjälä Date: Fri Oct 4 17:19:11 2019 +0300 drm/edid: Make drm_get_cea_aspect_ratio() static drm_get_cea_aspect_ratio() is not used outside drm_edid.c. Make it static. Cc: Wayne Lin Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191004141914.20600-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 2f77d82e7ee416b51771cf022f23921b44aaaec3 Author: Adam Jackson Date: Fri Oct 18 13:50:41 2019 -0400 drm/fourcc: Fix undefined left shift in DRM_FORMAT_BIG_ENDIAN macros 1<<31 is undefined because it's a signed int and C is terrible. Reviewed-by: Eric Engestrom Signed-off-by: Adam Jackson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191018175041.613780-1-ajax@redhat.com commit fed8d8c7a6dc2a76d7764842853d81c770b0788e Author: Mans Rullgard Date: Fri Oct 18 17:35:04 2019 +0200 spi: atmel: fix handling of cs_change set on non-last xfer The driver does the wrong thing when cs_change is set on a non-last xfer in a message. When cs_change is set, the driver deactivates the CS and leaves it off until a later xfer again has cs_change set whereas it should be briefly toggling CS off and on again. This patch brings the behaviour of the driver back in line with the documentation and common sense. The delay of 10 us is the same as is used by the default spi_transfer_one_message() function in spi.c. [gregory: rebased on for-5.5 from spi tree] Fixes: 8090d6d1a415 ("spi: atmel: Refactor spi-atmel to use SPI framework queue") Signed-off-by: Mans Rullgard Acked-by: Nicolas Ferre Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191018153504.4249-1-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit 9c86f12a36479dec06df3e4a4f31cecf8eba0222 Author: Gregory CLEMENT Date: Thu Oct 17 16:18:46 2019 +0200 spi: atmel: Improve CS0 case support on AT91RM9200 Thanks to the recent change in this driver, it is now possible to prevent using the CS0 with GPIO during setup. It then allows to remove the special handling of this case in the cs_activate() and cs_deactivate() functions. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191017141846.7523-8-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit 57e3137710443a3227a54c425b9c606425678c8f Author: Gregory CLEMENT Date: Thu Oct 17 16:18:45 2019 +0200 spi: atmel: Improve and fix GPIO CS usage In the previous implementation of this driver, the index of the GPIO used as CS was linked to the offset of the CS register used to configure the transfer. With this new implementation the first CS register not used by internal CS is associated to all the GPIO CS. It allows to not be anymore limited to have only 4 CS managed, now it is possible to have in the same time until 3 internal CS and no more limit for the CS GPIO. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191017141846.7523-7-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit 1cb84b02bf130f34ee81f99bc7dee5bca2943ed7 Author: Gregory CLEMENT Date: Thu Oct 17 16:18:44 2019 +0200 spi: atmel: Remove platform data support This driver is now only used through the device tree. Simplify code by explicitly depend on device tree. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191017141846.7523-6-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit 60086e23e64f7b3b60d957471cfd10948e25648e Author: Gregory CLEMENT Date: Thu Oct 17 16:18:43 2019 +0200 spi: atmel: Remove useless private field Since the conversion to GPIO descriptor, the GPIO used as chip select, can be directly access from the spi_device struct. So there is no need to keep the field npcs_pin. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191017141846.7523-5-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit 2de860b4a7a0bd5a4b5bd3bff0e6a615495df4ba Author: Geert Uytterhoeven Date: Wed Oct 16 16:31:01 2019 +0200 spi: rspi: Use platform_get_irq_byname_optional() for optional irqs As platform_get_irq_byname() now prints an error when the interrupt does not exist, scary warnings may be printed for optional interrupts: renesas_spi e6b10000.spi: IRQ rx not found renesas_spi e6b10000.spi: IRQ mux not found Fix this by calling platform_get_irq_byname_optional() instead. Remove the no longer needed printing of platform_get_irq errors, as the remaining calls to platform_get_irq() and platform_get_irq_byname() take care of that. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191016143101.28738-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit 112d6212c80a1c560757520bd822a41c0ad15c2c Merge: 3e5ec1db8bfe 4f5cafb5cb84 Author: Mark Brown Date: Fri Oct 18 18:30:49 2019 +0100 Merge tag 'v5.4-rc3' into spi-5.4 Linux 5.4-rc3 commit 585d18f7ebd1dba7400dcc7189a5f7223b821374 Author: Gregory CLEMENT Date: Thu Oct 17 16:18:42 2019 +0200 spi: atmel: Configure GPIO per CS instead of by controller Instead of setting up the GPIO configuration for the whole controller, do it at CS level. It will allow to mix internal CS and GPIO CS, which is not possible with the current implementation. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191017141846.7523-4-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit 7cbb16b2122c09f2ae393a1542fed628505b9da6 Author: Gregory CLEMENT Date: Thu Oct 17 16:18:41 2019 +0200 spi: atmel: Fix CS high support Until a few years ago, this driver was only used with CS GPIO. The only exception is CS0 on AT91RM9200 which has to use internal CS. A limitation of the internal CS is that they don't support CS High. So by using the CS GPIO the CS high configuration was available except for the particular case CS0 on RM9200. When the support for the internal chip-select was added, the check of the CS high support was not updated. Due to this the driver accepts this configuration for all the SPI controller v2 (used by all SoCs excepting the AT91RM9200) whereas the hardware doesn't support it for infernal CS. This patch fixes the test to match the hardware capabilities. Fixes: 4820303480a1 ("spi: atmel: add support for the internal chip-select of the spi controller") Cc: Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191017141846.7523-3-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit 4d8672d17450b457c0dbbcfe9868438036b4647c Author: Gregory CLEMENT Date: Thu Oct 17 16:18:40 2019 +0200 spi: atmel: Remove and fix erroneous comments Since CSAAT functionality support has been added. Some comments become wrong. Fix them to match the current driver behavior. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191017141846.7523-2-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit ae8fbf1d2403bc187a5d8fe82fbf2205d89cdb60 Author: Andy Shevchenko Date: Fri Oct 18 13:54:29 2019 +0300 spi: pxa2xx: Replace of_device.h with mod_devicetable.h and of.h There is nothing in use from of_device.h. The definitions and macros are available thru mod_devicetable.h and of.h. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191018105429.82782-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit f2faa3ec79ac11db8c26b10f8c978d4d0f7392dd Author: Andy Shevchenko Date: Fri Oct 18 13:54:28 2019 +0300 spi: pxa2xx: Convert to use device_get_match_data() Convert to use device_get_match_data() instead of open coded variant. While here, switch of_property_read_bool() to device_property_read_bool(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191018105429.82782-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 365e856e18b88e360388f9de4f5da0d5b332114b Author: Andy Shevchenko Date: Fri Oct 18 13:54:27 2019 +0300 spi: pxa2xx: Convert pxa2xx_spi_get_port_id() to take struct device This is preparatory patch before converting to use device_get_match_data() API. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191018105429.82782-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 5ce2570513bc012020e1faaa20333a6955845f06 Author: Andy Shevchenko Date: Fri Oct 18 13:54:26 2019 +0300 spi: pxa2xx: Sort headers Sort the headers in alphabetic order in order to ease the maintenance for this part. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191018105429.82782-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 4f3d957718e7f0ac2b033dbf48c7cddecd0a8dd3 Author: Andy Shevchenko Date: Fri Oct 18 13:54:25 2019 +0300 spi: pxa2xx: No need to keep pointer to platform device There is no need to keep a pointer to the platform device. Currently there are no users of it directly, and if there will be in the future we may restore it from pointer to the struct device. Convert all users at the same time. Cc: Russell King Cc: Jaroslav Kysela Cc: Takashi Iwai Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191018105429.82782-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 3e5ec1db8bfee845d9f8560d1c64aeaccd586398 Author: Gregory CLEMENT Date: Fri Oct 18 17:29:29 2019 +0200 spi: Fix SPI_CS_HIGH setting when using native and GPIO CS When improving the CS GPIO support at core level, the SPI_CS_HIGH has been enabled for all the CS lines used for a given SPI controller. However, the SPI framework allows to have on the same controller native CS and GPIO CS. The native CS may not support the SPI_CS_HIGH, so they should not be setup automatically. With this patch the setting is done only for the CS that will use a GPIO as CS Fixes: f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") Cc: Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20191018152929.3287-1-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit b2662a164f9dc48da8822e56600686d639056282 Author: Daniel Vetter Date: Thu Oct 17 08:44:26 2019 +0200 spi: pxa2xx: Set controller->max_transfer_size in dma mode In DMA mode we have a maximum transfer size, past that the driver falls back to PIO (see the check at the top of pxa2xx_spi_transfer_one). Falling back to PIO for big transfers defeats the point of a dma engine, hence set the max transfer size to inform spi clients that they need to do something smarter. This was uncovered by the drm_mipi_dbi spi panel code, which does large spi transfers, but stopped splitting them after: commit e143364b4c1774f68e923a5a0bb0fca28ac25888 Author: Noralf Trønnes Date: Fri Jul 19 17:59:10 2019 +0200 drm/tinydrm: Remove tinydrm_spi_max_transfer_size() After this commit the code relied on the spi core to split transfers into max dma-able blocks, which also papered over the PIO fallback issue. Fix this by setting the overall max transfer size to the DMA limit, but only when the controller runs in DMA mode. Fixes: e143364b4c17 ("drm/tinydrm: Remove tinydrm_spi_max_transfer_size()") Cc: Sam Ravnborg Cc: Noralf Trønnes Cc: Andy Shevchenko Reported-and-tested-by: Andy Shevchenko Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Mark Brown Cc: linux-arm-kernel@lists.infradead.org Cc: linux-spi@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://lore.kernel.org/r/20191017064426.30814-1-daniel.vetter@ffwll.ch Signed-off-by: Mark Brown commit 3fe5a963c63119f2d762327fba8e8b3fdd731fb4 Author: Tzung-Bi Shih Date: Thu Oct 17 22:00:11 2019 +0800 ASoC: dt-bindings: cros_ec_codec: add SHM bindings - Add "reg" for binding to shared memory exposed by EC. - Add "memory-region" for binding to memory region shared by AP. Acked-by: Rob Herring Acked-by: Benson Leung Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191017213539.06.I0df85fe54162426e31f60a589d9b461c65df2faa@changeid Signed-off-by: Mark Brown commit f3e82ad43ca538a7e0db0f310e26c5e75db6ba18 Author: Tzung-Bi Shih Date: Thu Oct 17 22:00:10 2019 +0800 ASoC: cros_ec_codec: read max DMIC gain from EC codec Read max DMIC gain from EC codec instead of DTS. Also removes the dt-binding of max-dmic-gain. Acked-by: Rob Herring Acked-by: Benson Leung Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191017213539.05.Id4657c864d544634f2b5c1c9b34fa8232ecba44d@changeid Signed-off-by: Mark Brown commit 104c6f8f7ff859ddd53b69c4af11e83f2971f0c4 Author: Tzung-Bi Shih Date: Thu Oct 17 22:00:09 2019 +0800 platform/chrome: cros_ec: add common commands for EC codec Add the following common commands: - GET_CAPABILITIES - GET_SHM_ADDR - SET_SHM_ADDR Acked-by: Benson Leung Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191017213539.04.Idc3c6e1cd94b70bf010249928d4a93c6c90495b7@changeid Signed-off-by: Mark Brown commit 2d39a1fc19ea2d33fd68f5d02e6136ddaae2ac11 Author: Maciej Falkowski Date: Fri Oct 4 14:59:14 2019 +0200 dt-bindings: sound: Convert Samsung I2S controller to dt-schema Convert Samsung I2S controller to newer dt-schema format. Signed-off-by: Maciej Falkowski [mszyprow: integrated fix for minor spelling issues] Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191004125914.1033-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit 9ac47908f35ba885eb3b4736c83185f63eef2ed2 Author: Maciej Falkowski Date: Thu Oct 17 12:05:29 2019 +0200 dt-bindings: sound: Convert Samsung Exynos Odroid XU3/XU4 audio complex to dt-schema Convert Samsung Exynos Odroid XU3/XU4 audio complex with MAX98090 codec to newer dt-schema format. 'clocks' property is unneeded in the bindings and is left undefined in 'properties'. 'samsung,audio-widgets' and 'samsung,audio-routing' are optional from driver perspective and they are set as unrequired. Signed-off-by: Maciej Falkowski [mszyprow: reordered non-standard properties] Signed-off-by: Marek Szyprowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191017100529.4183-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit 1092b09708882e3c216f0b9c02e606b3c0942c5b Author: Chuhong Yuan Date: Fri Oct 18 16:14:49 2019 +0800 ASoC: tlv320aic32x4: add a check for devm_clk_get aic32x4_set_dai_sysclk misses a check for devm_clk_get and may miss the failure. Add a check to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191018081448.8486-1-hslester96@gmail.com Signed-off-by: Mark Brown commit 349959a9c767cee04b7362fda230cc2433246fd9 Author: Colin Ian King Date: Fri Oct 18 09:23:17 2019 +0100 ASoC: rt1011: fix spelling mistake "temperture" -> "temperature" There is a spelling mistake in a dev_dbg message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191018082317.11971-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 2ad450593b7dbfcfcfd4e0502ccfcd6af627d430 Author: Maxime Ripard Date: Wed Oct 16 12:43:55 2019 +0200 ASoC: dt-bindings: Convert Allwinner A10 codec to a schema The Allwinner SoCs have an embedded audio codec that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191016104355.65169-1-mripard@kernel.org Signed-off-by: Mark Brown commit 8f731d4c92c2ef9434d4d7f84882c6429754164b Author: Tzung-Bi Shih Date: Mon Oct 14 18:20:15 2019 +0800 ASoC: cros_ec_codec: extract DMIC EC command from I2S RX Extract DMIC EC command from I2S RX. Setting and getting microphone gains is common features. Signed-off-by: Tzung-Bi Shih Acked-By: Benson Leung Link: https://lore.kernel.org/r/20191014180059.03.I93d9c65964f3c30f85a36d228e31150ff1917706@changeid Signed-off-by: Mark Brown commit 727f1c71c780789aeb8f3da2596c65ae008d5d6c Author: Tzung-Bi Shih Date: Mon Oct 14 18:20:14 2019 +0800 ASoC: cros_ec_codec: refactor I2S RX Refactor by the following items: - reformat copyright declaration - use more specific name "i2s rx" - use verbose symbol names to separate namespaces - make some short functions inline - remove unused TDM-related code Signed-off-by: Tzung-Bi Shih Acked-By: Benson Leung Link: https://lore.kernel.org/r/20191014180059.02.I43373b9a66dbb70196b3f216b3aa86111c410836@changeid Signed-off-by: Mark Brown commit 036beb0e85f8772acb635c30df573876103b0c21 Author: Tzung-Bi Shih Date: Mon Oct 14 18:20:13 2019 +0800 platform/chrome: cros_ec: remove unused EC feature Remove unused EC_FEATURE_AUDIO_CODEC. Signed-off-by: Tzung-Bi Shih Acked-By: Benson Leung Link: https://lore.kernel.org/r/20191014180059.01.I374c311eaca0d47944a37b07acbe48fdb74f734d@changeid Signed-off-by: Mark Brown commit 0e4b8717578e05ec6aa6d51939e6dc746f3198e9 Author: Rikard Falkeborn Date: Tue Oct 15 22:09:00 2019 +0200 ASoC: tas2562: Fix misuse of GENMASK macro Arguments are supposed to be ordered high then low. Fixes: c173dba44c2d ("ASoC: tas2562: Introduce the TAS2562 amplifier") Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20191015200900.25798-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 242fb2f1d995184f996466167d41a2d49353229b Author: Markus Mayer Date: Tue Oct 15 15:45:11 2019 -0700 memory: brcmstb: dpfe: support for deferred firmware download We add support for deferred downloading of the DPFE firmware. It may be necessary to do this if the root file system containing the firmware image is not yet available at the time the driver's probe function is being called. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli commit ac2ea9cfce605e76b068893b606b1e87df7245a7 Author: Markus Mayer Date: Tue Oct 15 15:45:10 2019 -0700 memory: brcmstb: dpfe: pass *priv as argument to brcmstb_dpfe_download_firmware() Rather than passing a (struct platform_device *) to brcmstb_dpfe_download_firmware(), we pass a (struct private_data *). This is the more sensible thing to do. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli commit 6ef972b1924011bc5fb9c3f93c5276b90eb3972a Author: Markus Mayer Date: Tue Oct 15 15:45:09 2019 -0700 memory: brcmstb: dpfe: move init_data into brcmstb_dpfe_download_firmware() Rather than declaring our init_data in several places and passing it as parameter into brcmstb_dpfe_download_firmware(), we declare it inside brcmstb_dpfe_download_firmware() instead. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli commit 75d316e7633abda6b066d432f92fdb7012988daa Author: Markus Mayer Date: Tue Oct 15 15:45:08 2019 -0700 memory: brcmstb: dpfe: add locking around DCPU enable/disable To ensure consistency, we add locking primitives inside the DCPU enable and disable routines. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli commit 56ece3fabf2e5dcc2d8ffd51c955a83ffda62723 Author: Markus Mayer Date: Tue Oct 15 15:45:07 2019 -0700 memory: brcmstb: dpfe: initialize priv->dev Add missing initialization of priv->dev. It is only used in an emergency error message that is very unlikely to ever occur, which is how this has remained unnoticed. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli commit abf94566bb512ba3a6e8ed4b6b03359ce67d98d7 Author: Markus Mayer Date: Tue Oct 15 15:45:06 2019 -0700 memory: brcmstb: dpfe: rename struct private_data To avoid potential (future) conflicts with other data structures we rename "struct private_data" to "struct brcmstb_dpfe_priv". Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli commit 3858a6451efa795c5a97c33c2735974ac9ec9d6a Merge: f86854a2e762 fa57dd728b68 Author: David S. Miller Date: Fri Oct 18 10:05:37 2019 -0700 Merge branch 'selftests-mlxsw-Add-scale-tests-for-Spectrum-2' Ido Schimmel says: ==================== selftests: mlxsw: Add scale tests for Spectrum-2 This series from Danielle adds two scale tests for the Spectrum-2 ASIC. The first scale test (patches #1-#4) validates the number of mirroring sessions (using tc-mirred) that can be supported by the device. As a preparatory step, patch #1 exposes the maximum number and current usage of mirroring agents via devlink-resource. This allows us to avoid hard-coding the limits later in the test. The second scale test (patch #5) validates the number of tc-flower filters that can be supported by the device. ==================== Signed-off-by: David S. Miller commit fa57dd728b687bb707efa104529fd6c73e5f98ae Author: Danielle Ratson Date: Thu Oct 17 09:55:18 2019 +0300 selftests: mlxsw: Add Spectrum-2 target scale for tc flower scale test Return the maximum number of tc flower filters that can be offloaded. Currently, this value corresponds to the number of counters supported by the driver. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 317ff0bba6b0dbe10cca96e925cd6fa7e0cc3f2d Author: Danielle Ratson Date: Thu Oct 17 09:55:17 2019 +0300 selftests: mlxsw: Add a resource scale test for Spectrum-2 Add resource_scale test suitable for Spectrum-2. Invoke the mirror_gre test and check that the advertised scale numbers are indeed supported. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit cb7d2c719c288dee9ef0e97c66f404600795c7f9 Author: Danielle Ratson Date: Thu Oct 17 09:55:16 2019 +0300 selftests: mlxsw: Add Spectrum-2 mirror-to-gretap target scale test Like in Spectrum, use the number of analyzers taken from the devlink command. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 49c65e4ff19772847e030e04121bece0517eb32c Author: Danielle Ratson Date: Thu Oct 17 09:55:15 2019 +0300 selftests: mlxsw: Generalize the parameters of mirror_gre test Use the number of analyzers taken from the devlink command, instead of hard-coded value, in order to make the test more generic. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 868678c574ecbd09d14331cf3b5418b5b28f7288 Author: Danielle Ratson Date: Thu Oct 17 09:55:14 2019 +0300 mlxsw: spectrum: Register switched port analyzers (SPAN) as resource The switch supports an enhanced switched port analyzer that enables selecting network traffic for analysis by a network analyzer. SPAN agents are configured and consumed whenever a tc filter is added with a mirror action to a new destination. The destination can either be a physical port (e.g., swp1), a VLAN device or a gretap. Expose the maximum number of SPAN agents and their current usage to the user. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 22e916e7ac046a7f3c21af65381b2ce31f3ef316 Author: Jeffrey Hugo Date: Thu Oct 17 15:18:43 2019 -0700 arm64: dts: qcom: msm8998-clamshell: Enable bluetooth Bluetooth is provided by a wcn3990, which is connected to the main SoC via blsp1_uart3. Signed-off-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson commit 4cffb9f2c70066c8f3129c9e59f515cc4186aa6c Author: Jeffrey Hugo Date: Thu Oct 17 15:18:42 2019 -0700 arm64: dts: qcom: msm8998-mtp: Enable bluetooth Bluetooth is provided by a wcn3990, which is connected to the main SoC via blsp1_uart3. Signed-off-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson commit 73d4d2ef58189b5d3d64577c54585b3413111e59 Author: Jeffrey Hugo Date: Thu Oct 17 15:18:41 2019 -0700 arm64: dts: qcom: msm8998: Add blsp1_uart3 The blsp1_uart3 peripheral appears to be commonly used for interfacing with other SoCs on a platform, such as a wcn3990 to provide bluetooth. Signed-off-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson commit f1c1d4fef30e170a22bb417d2d12b64eb99a2138 Author: Jeffrey Hugo Date: Thu Oct 17 15:18:40 2019 -0700 arm64: dts: qcom: msm8998: Add blsp1 BAM The BAM in the blsp1 block can be used as a DMA engine to offload work when managing any of the peripherals in the blsp. Signed-off-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson commit f86854a2e76256ee82025f981a5385480eec17b7 Author: Heiner Kallweit Date: Wed Oct 16 21:53:31 2019 +0200 net: phy: avoid NPE if read_page/write_page callbacks are not available Currently there's a bug in the module subsystem [0] preventing load of the PHY driver module on certain systems (as one symptom). This results in a NPE on such systems for the following reason: Instead of the correct PHY driver the genphy driver is loaded that doesn't implement the read_page/write_page callbacks. Every call to phy_read_paged() et al will result in a NPE therefore. In parallel to fixing the root cause we should make sure that this one and maybe similar issues in other subsystems don't result in a NPE in phylib. So let's check for the callbacks before using them and warn once if they are not available. [0] https://marc.info/?t=157072642100001&r=1&w=2 Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 2fb079a28ae856145e8977d08b77403a3a5d6a70 Author: Vladimir Oltean Date: Wed Oct 16 21:41:02 2019 +0300 net: dsa: sja1105: Switch to hardware operations for PTP Adjusting the hardware clock (PTPCLKVAL, PTPCLKADD, PTPCLKRATE) is a requirement for the auxiliary PTP functionality of the switch (TTEthernet, PPS input, PPS output). Therefore we need to switch to using these registers to keep a synchronized time in hardware, instead of the timecounter/cyclecounter implementation, which is reliant on the free-running PTPTSCLK. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e83c467358c1d99f235af8374c0eca0b0c91b329 Author: Vivek Kasireddy Date: Wed Oct 16 11:35:14 2019 -0700 drm/i915: Correct the PCH type in irq postinstall JasperLake PCH (JSP) has DDI HPD pin mappings similar to TGP and not MCC. Also add the correct HPD pin mappings for the MCC PCH. Cc: Matt Roper Signed-off-by: Vivek Kasireddy Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191016183514.11128-1-vivek.kasireddy@intel.com commit 85c2a0edcd5f4a029e6bad37e69b923d457e6214 Author: Jonathan Corbet Date: Fri Oct 4 10:21:55 2019 -0600 docs: remove :c:func: from genericirq.rst As of 5.3, the automarkup extension will do the right thing with function() notation, so we don't need to clutter the text with :c:func: invocations. So remove them. Signed-off-by: Jonathan Corbet commit 96b4597f0e3158f59eab4e851b2e1219ff06f6b9 Merge: cdc56c112932 c7d8669f46ba Author: Tony Lindgren Date: Fri Oct 18 08:53:28 2019 -0700 Merge branch 'watchdog-fix' into omap-for-v5.5/ti-sysc commit d94cdae138d3199569e11593bf33cf8cdbb0bf84 Author: Albert Vaca Cintora Date: Wed Oct 16 22:13:37 2019 +0200 Updated iostats docs Previous docs mentioned 11 unsigned long fields, when the reality is that we have 15 fields with a mix of unsigned long and unsigned int. Signed-off-by: Albert Vaca Cintora Signed-off-by: Jonathan Corbet commit d8fb03e1ea64e78b9d2af677e6614c2d88e842d2 Author: Jonathan Neuschäfer Date: Sat Oct 5 22:01:23 2019 +0200 docs: w1: Fix SPDX-License-Identifier syntax ReST directives are introduced with two dots. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jonathan Corbet commit cd15ed23d71719a86f1295af2995b10c64b99f35 Author: Jonathan Neuschäfer Date: Sat Oct 5 22:01:22 2019 +0200 docs: i2c: Fix SPDX-License-Identifier syntax ReST directives are introduced with two dots. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jonathan Corbet commit 7867dbb4ea064a27b7d129d31c86a434f851b9df Author: Jonathan Neuschäfer Date: Fri Oct 4 19:01:19 2019 +0200 docs: driver-api: pti_intel_mid: Enable syntax highlighting for C code block This makes the code snippet more readable. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jonathan Corbet commit db25bf98a3861225bc0b2138cf665097141c72ee Author: Arnaldo Carvalho de Melo Date: Fri Oct 18 11:48:57 2019 -0300 perf trace: Honour --max-events in processing syscalls:sys_enter_* We were doing this only at the sys_exit syscall tracepoint, as for strace-like we count the pair of sys_enter and sys_exit as one event, but when asking specifically for a the syscalls:sys_enter_NAME tracepoint we need to count each of those as an event. I.e. things like: # perf trace --max-events=4 -e syscalls:sys_enter_lseek 0.000 pool/2242 syscalls:sys_enter_lseek(fd: 14, offset: 0, whence: CUR) 0.034 pool/2242 syscalls:sys_enter_lseek(fd: 15, offset: 0, whence: CUR) 0.051 pool/2242 syscalls:sys_enter_lseek(fd: 16, offset: 0, whence: CUR) 2307.900 sshd/30800 syscalls:sys_enter_lseek(fd: 3, offset: 9032, whence: SET) # Were going on forever, since we only had sys_enter events. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-0ob1dky1a9ijlfrfhxyl40wr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d066da978f89ef035c823367a97650f0c4cfa464 Author: Arnaldo Carvalho de Melo Date: Thu Oct 17 18:33:00 2019 -0300 libbeauty: Introduce syscall_arg__strtoul_strarray() To go from strarrays strings to its indexes. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-wta0qvo207z27huib2c4ijxq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9bdff5b6436655d42dd30253c521e86ce07b9961 Author: Steven Rostedt (VMware) Date: Thu Oct 17 17:05:23 2019 -0400 perf tools: Remove unused trace_find_next_event() trace_find_next_event() was buggy and pretty much a useless helper. As there are no more users, just remove it. Signed-off-by: Steven Rostedt (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20191017210636.224045576@goodmis.org Signed-off-by: Arnaldo Carvalho de Melo commit a5e05abc6b8d81148b35cd8632a4a6252383d968 Author: Steven Rostedt (VMware) Date: Thu Oct 17 17:05:22 2019 -0400 perf scripting engines: Iterate on tep event arrays directly Instead of calling a useless (and broken) helper function to get the next event of a tep event array, just get the array directly and iterate over it. Note, the broken part was from trace_find_next_event() which after this will no longer be used, and can be removed. Committer notes: This fixes a segfault when generating python scripts from perf.data files with multiple tracepoint events, i.e. the following use case is fixed by this patch: # perf record -e sched:* sleep 1 [ perf record: Woken up 31 times to write data ] [ perf record: Captured and wrote 0.031 MB perf.data (9 samples) ] # perf script -g python Segmentation fault (core dumped) # Reported-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) Tested-by: Arnaldo Carvalho de Melo Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: Tzvetomir Stoyanov Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20191017153733.630cd5eb@gandalf.local.home Link: http://lore.kernel.org/lkml/20191017210636.061448713@goodmis.org Signed-off-by: Arnaldo Carvalho de Melo commit 362222f877f1369c0a8017c58b075abf30b16ab7 Author: Arnaldo Carvalho de Melo Date: Thu Oct 17 17:33:08 2019 -0300 perf trace: Initialize evsel_trace->fmt for syscalls:sys_enter_* tracepoints From the syscall_fmts->arg entries for formatting strace-like syscalls. This is when resolving the string "whence" on a filter expression for the syscalls:sys_enter_lseek: Breakpoint 3, perf_evsel__syscall_arg_fmt (evsel=0xc91ed0, arg=0x7fffffff7cd0 "whence") at builtin-trace.c:3626 3626 { (gdb) n 3628 struct syscall_arg_fmt *fmt = __evsel__syscall_arg_fmt(evsel); (gdb) n 3630 if (evsel->tp_format == NULL || fmt == NULL) (gdb) n 3633 for (field = evsel->tp_format->format.fields; field; field = field->next, ++fmt) (gdb) n 3634 if (strcmp(field->name, arg) == 0) (gdb) p field->name $3 = 0xc945e0 "__syscall_nr" (gdb) n 3633 for (field = evsel->tp_format->format.fields; field; field = field->next, ++fmt) (gdb) p *fmt $4 = {scnprintf = 0x0, strtoul = 0x0, mask_val = 0x0, parm = 0x0, name = 0x0, nr_entries = 0, show_zero = false} (gdb) n 3634 if (strcmp(field->name, arg) == 0) (gdb) p field->name $5 = 0xc94690 "fd" (gdb) n 3633 for (field = evsel->tp_format->format.fields; field; field = field->next, ++fmt) (gdb) n 3634 if (strcmp(field->name, arg) == 0) (gdb) n 3633 for (field = evsel->tp_format->format.fields; field; field = field->next, ++fmt) (gdb) n 3634 if (strcmp(field->name, arg) == 0) (gdb) p *fmt $9 = {scnprintf = 0x489be2 , strtoul = 0x0, mask_val = 0x0, parm = 0xa2da80 , name = 0x0, nr_entries = 0, show_zero = false} (gdb) p field->name $10 = 0xc947b0 "whence" (gdb) p fmt->parm $11 = (void *) 0xa2da80 (gdb) p *(struct strarray *)fmt->parm $12 = {offset = 0, nr_entries = 5, prefix = 0x724d37 "SEEK_", entries = 0xa2da40 } (gdb) p (struct strarray *)fmt->parm)->entries Junk after end of expression. (gdb) p ((struct strarray *)fmt->parm)->entries $13 = (const char **) 0xa2da40 (gdb) p ((struct strarray *)fmt->parm)->entries[0] $14 = 0x724d21 "SET" (gdb) p ((struct strarray *)fmt->parm)->entries[1] $15 = 0x724d25 "CUR" (gdb) p ((struct strarray *)fmt->parm)->entries[2] $16 = 0x724d29 "END" (gdb) p ((struct strarray *)fmt->parm)->entries[2] $17 = 0x724d29 "END" (gdb) p ((struct strarray *)fmt->parm)->entries[3] $18 = 0x724d2d "DATA" (gdb) p ((struct strarray *)fmt->parm)->entries[4] $19 = 0x724d32 "HOLE" (gdb) Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-lc8h9jgvbnboe0g7ic8tra1y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 71065d3fe82dbb2a827a081ceeca272ab7fa0905 Author: Tony Lindgren Date: Fri Oct 18 15:09:53 2019 -0700 ARM: OMAP2+: Configure voltage controller for retention Similar to existing omap3_vc_set_pmic_signaling(), let's add omap4 specific omap4_vc_set_pmic_signaling(). This allows the configured devices to enable voltage controller for retention later on during init. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit 821093e1fd3c5e0b40601ffbd27f2d7692a7a1e6 Author: YueHaibing Date: Fri Oct 18 20:07:01 2019 +0800 ARM: OMAP2+: Make some functions static Fix sparse warnings: arch/arm/mach-omap2/pmic-cpcap.c:29:15: warning: symbol 'omap_cpcap_vsel_to_uv' was not declared. Should it be static? arch/arm/mach-omap2/pmic-cpcap.c:43:15: warning: symbol 'omap_cpcap_uv_to_vsel' was not declared. Should it be static? arch/arm/mach-omap2/pmic-cpcap.c:93:15: warning: symbol 'omap_max8952_vsel_to_uv' was not declared. Should it be static? arch/arm/mach-omap2/pmic-cpcap.c:107:15: warning: symbol 'omap_max8952_uv_to_vsel' was not declared. Should it be static? arch/arm/mach-omap2/pmic-cpcap.c:140:15: warning: symbol 'omap_fan535503_vsel_to_uv' was not declared. Should it be static? arch/arm/mach-omap2/pmic-cpcap.c:155:15: warning: symbol 'omap_fan535508_vsel_to_uv' was not declared. Should it be static? arch/arm/mach-omap2/pmic-cpcap.c:173:15: warning: symbol 'omap_fan535503_uv_to_vsel' was not declared. Should it be static? arch/arm/mach-omap2/pmic-cpcap.c:192:15: warning: symbol 'omap_fan535508_uv_to_vsel' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Tony Lindgren commit 026948f01eac4dda130aa623b7414375633fe7c1 Author: Ben Luo Date: Thu Oct 3 11:49:42 2019 +0800 vfio/type1: remove hugepage checks in is_invalid_reserved_pfn() Currently, no hugepage split code can transfer the reserved bit from head to tail during the split, so checking the head can't make a difference in a racing condition with hugepage spliting. The buddy wouldn't allow a driver to allocate an hugepage if any subpage is reserved in the e820 map at boot, if any driver sets the reserved bit of head page before mapping the hugepage in userland, it needs to set the reserved bit in all subpages to be safe. Signed-off-by: Ben Luo Reviewed-by: Andrea Arcangeli Signed-off-by: Alex Williamson commit fd612402152fcbc54c482971d97475e38bc1ccd7 Merge: 57f5677e535b c405c37bd902 Author: Petr Mladek Date: Fri Oct 18 16:40:52 2019 +0200 Merge branch 'for-5.5-pr-warn' into for-5.5 commit 0b7b6966403d75472eb2dc6082a3d483c219b173 Author: Ville Syrjälä Date: Thu Oct 10 17:51:27 2019 +0300 drm/i915: Make hdcp2_msg_timeout.timeout u16 All the timeout values fit in u16, so let's shrink the structure a bit. This ends up actually increasing the .text size a bit due to some changes in instructions (constant imul+small jmps replaced with mov+bigger jmpqs). Seems pretty arbitrary to me so I'll just pretend I didn't see it. text data bss dec hex filename - 34521 360 0 34881 8841 intel_hdmi.o + 34537 360 0 34897 8851 intel_hdmi.o Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191010145127.7487-5-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit eac03efdc85f062b16c72dae848b56aba261d566 Author: Ville Syrjälä Date: Thu Oct 10 17:51:26 2019 +0300 drm/i915: Remove hdcp2_hdmi_msg_timeout.timeout2 The only reason for the timeout2 value in the array is the HDCP_2_2_AKE_SEND_HPRIME message. But that one still needs special casing inside the loop, and so just ends up making the code harder to read. Let's just remove this leaky timeout2 abstraction and special case that one command in a way that is easy to understand. We can then remove the timeout2 member from struct entirely. text data bss dec hex filename - 34633 360 0 34993 88b1 intel_hdmi.o + 34521 360 0 34881 8841 intel_hdmi.o Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191010145127.7487-4-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 770ce5a07190e26b18f46037f357c1870ce29b30 Author: Ville Syrjälä Date: Thu Oct 10 17:51:25 2019 +0300 drm/i915: Remove dead weight from hdcp2_msg_timeout[] The .read_2_2() hooks is never called for any of the message types with a zero timeout. So it's all just dead weight which we can chuck. text data bss dec hex filename - 34701 360 0 35061 88f5 intel_hdmi.o + 34633 360 0 34993 88b1 intel_hdmi.o Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191010145127.7487-3-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 67fdd8ea53195ee265cf4b8bf5498a549cebcd71 Author: Ville Syrjälä Date: Thu Oct 10 17:51:24 2019 +0300 drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/ The array is there only for timeout, "data" doesn't mean anything so let's rename the thing to be more descriptive. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191010145127.7487-2-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 2edb3de9e599e79db4028335df2a64f3ad014b2a Author: Ville Syrjälä Date: Thu Oct 10 17:51:23 2019 +0300 drm/i915: Shrink eDRAM ways/sets arrays Make the ways/sets arrays static cosnt u8 to shrink things a bit. text data bss dec hex filename - 23935 629 128 24692 6074 i915_drv.o + 23818 629 128 24575 5fff i915_drv.o Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191010145127.7487-1-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 36b53a291b6a9213b7c053c7d72931bb89587440 Author: Ville Syrjälä Date: Fri Oct 11 23:09:44 2019 +0300 drm/i915: Make dirty_pipes refer to pipes Despite the its name dirty_pipes refers to crtc indexes. Let's change its behaviout to match the name. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191011200949.7839-4-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 49e0ed3848d0e3ef22c3a458ded8847cbf08330e Author: Ville Syrjälä Date: Fri Oct 11 23:09:43 2019 +0300 drm/i915: Nuke 'realloc_pipes' The 'realloc_pipes' bitmask is pointless. It is either: a) the set of pipes which are already part of the state, in which case adding them again is entirely redundant b) the set of all pipes which we then add to the state Also the fact that 'realloc_pipes' uses the crtc indexes is going to bite is at some point so best get rid of it quick. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191011200949.7839-3-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit d7a145849b680075ce94d8b341905104e2ee58d0 Author: Ville Syrjälä Date: Fri Oct 11 23:09:42 2019 +0300 drm/i915: Nuke the useless changed param from skl_ddb_add_affected_pipes() changed==true just means we have some crtcs in the state. All the stuff following this only operates on crtcs in the state anyway so there is no point in having this bool. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191011200949.7839-2-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 98c93394ba907e6b741c67dc6affea78c2a940a0 Author: Ville Syrjälä Date: Thu Jul 18 17:43:39 2019 +0300 drm/i915: Refuse modes with hdisplay==4096 on pre-HSW DP The DP port/pipe goes wonky if we try to use timings with hdisplay==4096 on pre-HSW platforms. The link fails to train and the pipe may not signal vblank interrupts. On HDMI such at mode works just fine (tested on ELK/SNB/CHV). So let's refuse such modes on DP on older platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718144340.1114-1-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit c08f995a284dc202a934530ee73cc7136665af38 Author: Ville Syrjälä Date: Wed Oct 2 19:25:00 2019 +0300 drm/i915: Polish possible_clones setup Replace the hand rolled stuff with drm_encoder_mask() when populating possible_clones, and rename the function to intel_encoder_possible_clones() to make it clear what it's used for. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191002162505.30716-1-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 30a027dcccc27051b3145ff9bb756d79038ad320 Author: Ville Syrjälä Date: Tue Oct 15 18:27:57 2019 +0300 drm/i915: Move the cursor rotation handling into intel_cursor_check_surface() Unlike other planes the cursor currently handles 180 degree rotation adjustment during the hardware programming phase. Let's move that stuff into intel_cursor_check_surface() to match how we do things with other plane types. And while at we'll plop in the final src x/y coordinates (which will actually always be zero) into the src rect and color_plane[0].x/y, just for some extra consistency. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015152757.12231-1-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit c6e07ada8eaa3ff66868a8bd6b1b9cdfa6d9fe21 Author: Chris Wilson Date: Fri Oct 18 12:53:31 2019 +0100 drm/i915/gt: Convert the leftover for_each_engine(gt) Use the local gt for iterating over the available set of engines. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191018115331.8980-1-chris@chris-wilson.co.uk commit bcce7d90d120cddc726d5c98aa46188daef141f3 Author: Chris Wilson Date: Fri Oct 18 14:07:03 2019 +0100 drm/i915/selftests: Add the mock engine to the gt->engine[] Remember to include the newly created mock engine in the list of available engines inside the gt. Fixes: a50134b1983b ("drm/i915: Make for_each_engine_masked work on intel_gt") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191018130703.31125-1-chris@chris-wilson.co.uk commit c405c37bd9022ece118099fa39040bee8c5adbff Author: Kefeng Wang Date: Fri Oct 18 11:18:47 2019 +0800 tools lib api: Renaming pr_warning to pr_warn For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools lib api for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code. Changing __pr_warning to __pr_warn to be consistent. Link: http://lkml.kernel.org/r/20191018031850.48498-30-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Arnaldo Carvalho de Melo Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 2304d447f9b00a5a88fc52491701d461c2725e0a Author: Kefeng Wang Date: Fri Oct 18 11:18:45 2019 +0800 ASoC: samsung: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-28-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Cc: Sangbeom Kim Cc: Sylwester Nawrocki Cc: Jaroslav Kysela Cc: Takashi Iwai Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Reviewed-by: Sylwester Nawrocki Signed-off-by: Petr Mladek commit 256339d602337f5fa4b5e11b81641a5fe96e585d Author: Kefeng Wang Date: Fri Oct 18 11:18:44 2019 +0800 lib: cpu_rmap: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-27-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Andrew Morton Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 3da2e1fd46a726531a1e6d621bda62821a5e559a Author: Kefeng Wang Date: Fri Oct 18 11:18:43 2019 +0800 trace: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-26-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Ingo Molnar Signed-off-by: Kefeng Wang Acked-by: Steven Rostedt (VMware) Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit fc65104c7c89635ecacbff6cf5724ac24232d381 Author: Kefeng Wang Date: Fri Oct 18 11:18:42 2019 +0800 dma-debug: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-25-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 3e3d38bd0da72cf93d533ca587886e075e414238 Author: Kefeng Wang Date: Fri Oct 18 11:18:41 2019 +0800 vgacon: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-24-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit a4e530ae7ea47d2c4ce17617f4711d8e5a771a5c Author: Kefeng Wang Date: Fri Oct 18 11:18:40 2019 +0800 fs: afs: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-23-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: David Howells Cc: linux-afs@lists.infradead.org Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 947dd3cc7eaed3e22b19cd49684739d1b2c234ad Author: Kefeng Wang Date: Fri Oct 18 11:18:39 2019 +0800 sh/intc: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-22-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit a2cc701b09d90371e76b3c2d621b559468a08d81 Author: Kefeng Wang Date: Fri Oct 18 11:18:38 2019 +0800 scsi: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-21-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit c67641210217089747c166fce41472121b578bd9 Author: Kefeng Wang Date: Fri Oct 18 11:18:37 2019 +0800 platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-20-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Corentin Chary Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Acked-by: Andy Shevchenko Signed-off-by: Petr Mladek commit ab5561095c8f5f28b91629ab2c30839208afa612 Author: Kefeng Wang Date: Fri Oct 18 11:18:36 2019 +0800 platform/x86: asus-laptop: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-19-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Corentin Chary Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Acked-by: Andy Shevchenko Signed-off-by: Petr Mladek commit 86295c70b928f6880416ddfd1c9bd3ee87fd9c72 Author: Kefeng Wang Date: Fri Oct 18 11:18:35 2019 +0800 platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-18-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Corentin Chary Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Acked-by: Andy Shevchenko Signed-off-by: Petr Mladek commit 19e2b4b370e503fb4e80c68ec855d22222a8c8ce Author: Kefeng Wang Date: Fri Oct 18 11:18:34 2019 +0800 oprofile: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-17-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Signed-off-by: Kefeng Wang Acked-by: Robert Richter Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit e2f04da75c0f96f7198cbda73ec53c9fae818c0e Author: Kefeng Wang Date: Fri Oct 18 11:18:33 2019 +0800 of: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-16-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Rob Herring Cc: Frank Rowand Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 2ee9a0db924ed3d586d2ae754a154bd7748b6a99 Author: Kefeng Wang Date: Fri Oct 18 11:18:32 2019 +0800 macintosh: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-15-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 257daba4eb7f2b78c5b3d77443985c6c53560c73 Author: Kefeng Wang Date: Fri Oct 18 11:18:31 2019 +0800 idsn: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-14-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Karsten Keil Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit a7f4a27f2f8858ecb676fa257f190bf488447018 Author: Kefeng Wang Date: Fri Oct 18 11:18:30 2019 +0800 ide: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-13-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: "David S. Miller" Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit cacc594b3f18325e17810a2e14c70f50a612def3 Author: Kefeng Wang Date: Fri Oct 18 11:18:29 2019 +0800 crypto: n2: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-12-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Herbert Xu Cc: "David S. Miller" Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 43fc6b252a1d10be7acbc3d49b97a28765c17ebd Author: Kefeng Wang Date: Fri Oct 18 11:18:28 2019 +0800 clocksource: samsung_pwm_timer: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-11-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Signed-off-by: Kefeng Wang Acked-by: Daniel Lezcano Reviewed-by: Sergey Senozhatsky [pmladek@suse.com: Fixed indentation] Signed-off-by: Petr Mladek commit f8b489980d9427244555dadd9186a76944c1b7d6 Author: Kefeng Wang Date: Fri Oct 18 11:18:27 2019 +0800 gdrom: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-10-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Jens Axboe Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit afa69539ffc0a9e6e632b5042ddffcfaf580b4f3 Author: Kefeng Wang Date: Fri Oct 18 11:18:26 2019 +0800 drbd: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-9-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 933ca4e323de7775a436ae3f4a6b5a1414a4e98c Author: Kefeng Wang Date: Fri Oct 18 11:18:25 2019 +0800 acpi: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-8-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: James Morse Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky [pmladek@suse.com: two more indentation fixes] Signed-off-by: Petr Mladek commit 8d3bcc441e6cddbb5fe49b59f7766f01f1e2493b Author: Kefeng Wang Date: Fri Oct 18 11:18:24 2019 +0800 x86: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-7-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Robert Richter Cc: Darren Hart Cc: Andy Shevchenko Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit eb1414ec89d31873c912f4073bd22d8b5505797a Author: Kefeng Wang Date: Fri Oct 18 11:18:23 2019 +0800 sparc: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-6-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Andrew Morton Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Acked-by: David S. Miller Signed-off-by: Petr Mladek commit 228fc01040704f55fd884ab41daf3eafd2644b54 Author: Lucas Stach Date: Fri Oct 18 12:05:38 2019 +0200 gpio: of: don't warn if ignored GPIO flag matches the behavior Some devicetrees specify the ACTIVE_LOW flag in the fixed regulator GPIO handle. While this has always been ignored, it's consistent with the behavior of the regulator binding in the absence of the "enable-active-high" DT property. It doesn't make much sense to print a user visible warning for a configuration which is consistent, so only print the warning if the GPIO flag contradicts the behavior dictated by by the enable-active-high property. Signed-off-by: Lucas Stach [Bartosz: coding style tweak] Signed-off-by: Bartosz Golaszewski commit 6d80f20c5328ad24dde0fddb980f60734a17b911 Author: Kefeng Wang Date: Fri Oct 18 11:18:22 2019 +0800 sh: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-5-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Stephen Rothwell Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 72405c3d7850c85dccbe4629720004ae933c2add Author: Matthew Auld Date: Fri Oct 18 10:07:51 2019 +0100 drm/i915: treat stolen as a region Convert stolen memory over to a region object. Still leaves open the question with what to do with pre-allocated objects... Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191018090751.28295-3-matthew.auld@intel.com commit da1184cd41d4c6b316a937ac1da5825807e8f6fb Author: Matthew Auld Date: Fri Oct 18 10:07:50 2019 +0100 drm/i915: treat shmem as a region Convert shmem to an intel_memory_region. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191018090751.28295-2-matthew.auld@intel.com commit 3aae9d08532c8e542ad2787b3f1c6b4ee14db32b Author: Abdiel Janulgue Date: Fri Oct 18 10:07:49 2019 +0100 drm/i915: enumerate and init each supported region Nothing to enumerate yet... Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191018090751.28295-1-matthew.auld@intel.com commit f75e2294a4415621b223150065c8d1e823896da5 Author: Marc Zyngier Date: Fri Nov 23 17:25:52 2018 +0000 arm64: Add ARM64_WORKAROUND_1319367 for all A57 and A72 versions Rework the EL2 vector hardening that is only selected for A57 and A72 so that the table can also be used for ARM64_WORKAROUND_1319367. Acked-by: Catalin Marinas Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 337c4a888ba21aaff421426b26166593572eed31 Author: Faiz Abbas Date: Thu Oct 3 17:12:51 2019 +0530 arm64: dts: ti: k3-am654-base-board: Add disable-wp for mmc0 MMC0_SDWP is not connected to the card. Indicate this by adding a disable-wp flag. Signed-off-by: Faiz Abbas Signed-off-by: Tero Kristo commit 67d95d25ca4606f3668789131ffedb58d470d5ff Author: Faiz Abbas Date: Thu Sep 19 21:02:42 2019 +0530 arm64: dts: ti: j721e-common-proc-board: Add Support for eMMC and SD card sdhci0 is connected to an eMMC and sdhci1 is connected to an SD card slot. Add support for these nodes. Signed-off-by: Faiz Abbas Signed-off-by: Tero Kristo commit e6dc10f200dae6ca9965fafa3733aff44bde9e9f Author: Faiz Abbas Date: Thu Sep 19 21:02:41 2019 +0530 arm64: dts: ti: j721e-main: Add SDHCI nodes Add nodes for the 3 SDHCI instances present on TI's J721E device. instance 0 supports HS400 (8 bit bus widht, DDR, 400 MBps) while instances 1 and 2 support SDR104 (4 bit width, SDR, 100 MBps) as their highest speed modes. Currently, only High speed (50 MHz clock) has been enabled. Signed-off-by: Faiz Abbas Signed-off-by: Tero Kristo commit 2093dea3def9d5bf3000697ae3b0ec36c43354e0 Author: Chunming Zhou Date: Tue Jul 30 21:02:08 2019 +0800 drm/syncobj: extend syncobj query ability v3 user space needs a flexiable query ability. So that umd can get last signaled or submitted point. v2: add sanitizer checking. v3: rebase Change-Id: I6512b430524ebabe715e602a2bf5abb0a7e780ea Signed-off-by: Chunming Zhou Cc: Lionel Landwerlin Cc: Christian König Reviewed-by: Lionel Landwerlin Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/series/64044/ commit 253a774bb08b549488047c3fb4afc0faf6f194ae Author: Chris Wilson Date: Fri Oct 18 08:20:27 2019 +0100 drm/i915/execlists: Don't merely skip submission if maybe timeslicing Normally, we try and skip submission if ELSP[1] is filled. However, we may desire to enable timeslicing due to the queue priority, even if ELSP[1] itself does not require timeslicing. That is the queue is equal priority to ELSP[0] and higher priority then ELSP[1]. Previously, we would wait until the context switch to preempt the current ELSP[1], but with timeslicing, we want to preempt ELSP[0] and replace it with the queue. In writing the test case, it become quickly apparent that we were also suppressing the tasklet during promotion and so failing to notice when the queue started requiring timeslicing. Fixes: 2229adc81380 ("drm/i915/execlist: Trim immediate timeslice expiry") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191018072027.31948-1-chris@chris-wilson.co.uk commit fb26eee0600dbd6b2eb20356b7d425cb71413ea2 Author: Tvrtko Ursulin Date: Fri Oct 18 10:05:14 2019 +0100 drm/i915/pmu: Fix uninitialized variable on error path If name allocation failed the log message will contain an uninitialized error code which can be confusing. Fixes: 05488673a4d4 ("drm/i915/pmu: Support multiple GPUs") Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191018090514.1818-1-tvrtko.ursulin@linux.intel.com [tursulin: Commit message spelling fix.] commit 13fbe784ef6e58d0267a6e183f90ce7826d7d885 Author: Jiri Slaby Date: Fri Oct 11 13:51:08 2019 +0200 x86/asm: Replace WEAK uses by SYM_INNER_LABEL_ALIGN Use the new SYM_INNER_LABEL_ALIGN for WEAK entries in the middle of x86 assembly functions. And make sure WEAK is not defined for x86 anymore as these were the last users. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Andrey Ryabinin Cc: Boris Ostrovsky Cc: Herbert Xu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: linux-arch@vger.kernel.org Cc: Mark Rutland Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-29-jslaby@suse.cz commit 83d116c53058d505ddef051e90ab27f57015b025 Author: Jia He Date: Fri Oct 11 22:09:39 2019 +0800 mm: fix double page fault on arm64 if PTE_AF is cleared When we tested pmdk unit test [1] vmmalloc_fork TEST3 on arm64 guest, there will be a double page fault in __copy_from_user_inatomic of cow_user_page. To reproduce the bug, the cmd is as follows after you deployed everything: make -C src/test/vmmalloc_fork/ TEST_TIME=60m check Below call trace is from arm64 do_page_fault for debugging purpose: [ 110.016195] Call trace: [ 110.016826] do_page_fault+0x5a4/0x690 [ 110.017812] do_mem_abort+0x50/0xb0 [ 110.018726] el1_da+0x20/0xc4 [ 110.019492] __arch_copy_from_user+0x180/0x280 [ 110.020646] do_wp_page+0xb0/0x860 [ 110.021517] __handle_mm_fault+0x994/0x1338 [ 110.022606] handle_mm_fault+0xe8/0x180 [ 110.023584] do_page_fault+0x240/0x690 [ 110.024535] do_mem_abort+0x50/0xb0 [ 110.025423] el0_da+0x20/0x24 The pte info before __copy_from_user_inatomic is (PTE_AF is cleared): [ffff9b007000] pgd=000000023d4f8003, pud=000000023da9b003, pmd=000000023d4b3003, pte=360000298607bd3 As told by Catalin: "On arm64 without hardware Access Flag, copying from user will fail because the pte is old and cannot be marked young. So we always end up with zeroed page after fork() + CoW for pfn mappings. we don't always have a hardware-managed access flag on arm64." This patch fixes it by calling pte_mkyoung. Also, the parameter is changed because vmf should be passed to cow_user_page() Add a WARN_ON_ONCE when __copy_from_user_inatomic() returns error in case there can be some obscure use-case (by Kirill). [1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork Signed-off-by: Jia He Reported-by: Yibo Cai Reviewed-by: Catalin Marinas Acked-by: Kirill A. Shutemov Signed-off-by: Catalin Marinas commit f2c4e5970cece75a895fcc45f0cd66b5a5ec0819 Author: Jia He Date: Fri Oct 11 22:09:38 2019 +0800 x86/mm: implement arch_faults_on_old_pte() stub on x86 arch_faults_on_old_pte is a helper to indicate that it might cause page fault when accessing old pte. But on x86, there is feature to setting pte access flag by hardware. Hence implement an overriding stub which always returns false. Signed-off-by: Jia He Suggested-by: Will Deacon Signed-off-by: Catalin Marinas commit 6af31226d0394691f5562eca0134262bb935fa9c Author: Jia He Date: Fri Oct 11 22:09:37 2019 +0800 arm64: mm: implement arch_faults_on_old_pte() on arm64 On arm64 without hardware Access Flag, copying from user will fail because the pte is old and cannot be marked young. So we always end up with zeroed page after fork() + CoW for pfn mappings. We don't always have a hardware-managed Access Flag on arm64. Hence implement arch_faults_on_old_pte on arm64 to indicate that it might cause page fault when accessing old pte. Signed-off-by: Jia He Reviewed-by: Catalin Marinas Signed-off-by: Catalin Marinas commit 47d7b15b88f96a90694cfc607d0717d62dff6c45 Author: Jia He Date: Fri Oct 11 22:09:36 2019 +0800 arm64: cpufeature: introduce helper cpu_has_hw_af() We unconditionally set the HW_AFDBM capability and only enable it on CPUs which really have the feature. But sometimes we need to know whether this cpu has the capability of HW AF. So decouple AF from DBM by a new helper cpu_has_hw_af(). If later we noticed a potential performance issue on this path, we can turn it into a static label as with other CPU features. Signed-off-by: Jia He Suggested-by: Suzuki Poulose Reviewed-by: Catalin Marinas Signed-off-by: Catalin Marinas commit 6d685e5318e51b843ca50adeca50dc6300bf2cbb Author: Jiri Slaby Date: Fri Oct 11 13:51:07 2019 +0200 x86/asm/32: Change all ENTRY+ENDPROC to SYM_FUNC_* These are all functions which are invoked from elsewhere, so annotate them as global using the new SYM_FUNC_START and their ENDPROC's by SYM_FUNC_END. Now, ENTRY/ENDPROC can be forced to be undefined on X86, so do so. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Allison Randal Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Ard Biesheuvel Cc: Bill Metzenthen Cc: Boris Ostrovsky Cc: Darren Hart Cc: "David S. Miller" Cc: Greg Kroah-Hartman Cc: Herbert Xu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: linux-crypto@vger.kernel.org Cc: linux-efi Cc: linux-efi@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: Mark Rutland Cc: Matt Fleming Cc: Pavel Machek Cc: platform-driver-x86@vger.kernel.org Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Will Deacon Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-28-jslaby@suse.cz commit 5e63306f1629527799e34a9814dd8035df6ca854 Author: Jiri Slaby Date: Fri Oct 11 13:51:06 2019 +0200 x86/asm/32: Change all ENTRY+END to SYM_CODE_* Change all assembly code which is marked using END (and not ENDPROC) to appropriate new markings SYM_CODE_START and SYM_CODE_END. And since the last user of END on X86 is gone now, make sure that END is not defined there. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Herbert Xu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: linux-arch@vger.kernel.org Cc: Mark Rutland Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-27-jslaby@suse.cz commit 78762b0e79bc1dd01347be061abdf505202152c9 Author: Jiri Slaby Date: Fri Oct 11 13:51:05 2019 +0200 x86/asm/32: Add ENDs to some functions and relabel with SYM_CODE_* All these are functions which are invoked from elsewhere but they are not typical C functions. So annotate them using the new SYM_CODE_START. All these were not balanced with any END, so mark their ends by SYM_CODE_END, appropriately. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Reviewed-by: Boris Ostrovsky [xen bits] Reviewed-by: Rafael J. Wysocki [hibernate] Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Len Brown Cc: linux-arch@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: Pavel Machek Cc: Peter Zijlstra Cc: Pingfan Liu Cc: Stefano Stabellini Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191011115108.12392-26-jslaby@suse.cz commit 6dcc5627f6aec4cb1d1494d06a48d8061db06a04 Author: Jiri Slaby Date: Fri Oct 11 13:51:04 2019 +0200 x86/asm: Change all ENTRY+ENDPROC to SYM_FUNC_* These are all functions which are invoked from elsewhere, so annotate them as global using the new SYM_FUNC_START and their ENDPROC's by SYM_FUNC_END. Make sure ENTRY/ENDPROC is not defined on X86_64, given these were the last users. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Reviewed-by: Rafael J. Wysocki [hibernate] Reviewed-by: Boris Ostrovsky [xen bits] Acked-by: Herbert Xu [crypto] Cc: Allison Randal Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Ard Biesheuvel Cc: Armijn Hemel Cc: Cao jin Cc: Darren Hart Cc: Dave Hansen Cc: "David S. Miller" Cc: Enrico Weigelt Cc: Greg Kroah-Hartman Cc: Herbert Xu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jim Mattson Cc: Joerg Roedel Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: kvm ML Cc: Len Brown Cc: linux-arch@vger.kernel.org Cc: linux-crypto@vger.kernel.org Cc: linux-efi Cc: linux-efi@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: Mark Rutland Cc: Matt Fleming Cc: Paolo Bonzini Cc: Pavel Machek Cc: Peter Zijlstra Cc: platform-driver-x86@vger.kernel.org Cc: "Radim Krčmář" Cc: Sean Christopherson Cc: Stefano Stabellini Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Wei Huang Cc: x86-ml Cc: xen-devel@lists.xenproject.org Cc: Xiaoyao Li Link: https://lkml.kernel.org/r/20191011115108.12392-25-jslaby@suse.cz commit bc7b11c04ee9c9b0451ebf85bf64e0de69fdbb17 Author: Jiri Slaby Date: Fri Oct 11 13:51:03 2019 +0200 x86/asm/64: Change all ENTRY+END to SYM_CODE_* Change all assembly code which is marked using END (and not ENDPROC). Switch all these to the appropriate new annotation SYM_CODE_START and SYM_CODE_END. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Reviewed-by: Boris Ostrovsky [xen bits] Cc: Andy Lutomirski Cc: Cao jin Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: Juergen Gross Cc: linux-arch@vger.kernel.org Cc: Maran Wilson Cc: Peter Zijlstra Cc: Stefano Stabellini Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191011115108.12392-24-jslaby@suse.cz commit 4aec216b93dd8e3597124f41369ec835ff18dbd0 Author: Jiri Slaby Date: Fri Oct 11 13:51:02 2019 +0200 x86/asm/64: Add ENDs to some functions and relabel with SYM_CODE_* All these are functions which are invoked from elsewhere but they are not typical C functions. So annotate them using the new SYM_CODE_START. All these were not balanced with any END, so mark their ends by SYM_CODE_END appropriately too. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Reviewed-by: Boris Ostrovsky [xen bits] Acked-by: Rafael J. Wysocki [power mgmt] Cc: Andy Shevchenko Cc: Cao jin Cc: Darren Hart Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Juergen Gross Cc: "Kirill A. Shutemov" Cc: linux-arch@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: Pavel Machek Cc: Pingfan Liu Cc: platform-driver-x86@vger.kernel.org Cc: "Rafael J. Wysocki" Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Wei Huang Cc: x86-ml Cc: xen-devel@lists.xenproject.org Cc: Xiaoyao Li Link: https://lkml.kernel.org/r/20191011115108.12392-23-jslaby@suse.cz commit be428f2451809b0d6132893bc33a2b1f29fd3adf Author: Ben Dooks (Codethink) Date: Thu Oct 17 12:17:55 2019 +0100 drm/arm: make undeclared items static Make the following items static to avoid clashes with other parts of the kernel (dev_attr_core_id) or just silence the following sparse warning: drivers/gpu/drm/arm/malidp_drv.c:371:24: warning: symbol 'malidp_fb_create' was not declared. Should it be static? drivers/gpu/drm/arm/malidp_drv.c:494:6: warning: symbol 'malidp_error_stats_dump' was not declared. Should it be static? drivers/gpu/drm/arm/malidp_drv.c:668:1: warning: symbol 'dev_attr_core_id' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20191017111756.12861-1-ben.dooks@codethink.co.uk commit 96d3ab802e4930a29a33934373157d6dff1b2c7e Author: Thierry Reding Date: Wed Oct 16 13:50:26 2019 +0200 iommu/tegra-smmu: Fix page tables in > 4 GiB memory Page tables that reside in physical memory beyond the 4 GiB boundary are currently not working properly. The reason is that when the physical address for page directory entries is read, it gets truncated at 32 bits and can cause crashes when passing that address to the DMA API. Fix this by first casting the PDE value to a dma_addr_t and then using the page frame number mask for the SMMU instance to mask out the invalid bits, which are typically used for mapping attributes, etc. Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel commit e31e5929547edf396ea2c0873244c734c6bceafa Author: Navneet Kumar Date: Wed Oct 16 13:50:25 2019 +0200 iommu/tegra-smmu: Fix client enablement order Enable clients' translation only after setting up the swgroups. Signed-off-by: Navneet Kumar Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel commit 446152d5b6537bae576c321e4cc24ff690a69403 Author: Navneet Kumar Date: Wed Oct 16 13:50:24 2019 +0200 iommu/tegra-smmu: Use non-secure register for flushing Use PTB_ASID instead of SMMU_CONFIG to flush smmu. PTB_ASID can be accessed from non-secure mode, SMMU_CONFIG cannot be. Using SMMU_CONFIG could pose a problem when kernel doesn't have secure mode access enabled from boot. Signed-off-by: Navneet Kumar Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel commit 3057fb9377eb5e73386dd0d8804bf72bdd23e391 Author: Joerg Roedel Date: Fri Oct 18 11:00:33 2019 +0200 iommu/amd: Pass gfp flags to iommu_map_page() in amd_iommu_map() A recent commit added a gfp parameter to amd_iommu_map() to make it callable from atomic context, but forgot to pass it down to iommu_map_page() and left GFP_KERNEL there. This caused sleep-while-atomic warnings and needs to be fixed. Reported-by: Qian Cai Reported-by: Dan Carpenter Fixes: 781ca2de89ba ("iommu: Add gfp parameter to iommu_ops::map") Reviewed-by: Jerry Snitselaar Signed-off-by: Joerg Roedel commit f13ad88a984e8090226a8f62d75e87b770eefdf4 Author: Jiri Slaby Date: Fri Oct 11 13:51:01 2019 +0200 x86/asm/ftrace: Mark function_hook as function Relabel function_hook to be marked really as a function. It is called from C and has the same expectations towards the stack etc. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: linux-arch@vger.kernel.org Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-22-jslaby@suse.cz commit ef1e03152cb027d5925646d4d1772ced7595292f Author: Jiri Slaby Date: Fri Oct 11 13:51:00 2019 +0200 x86/asm: Make some functions local There are a couple of assembly functions which are invoked only locally in the file they are defined. In C, they are marked "static". In assembly, annotate them using SYM_{FUNC,CODE}_START_LOCAL (and switch their ENDPROC to SYM_{FUNC,CODE}_END too). Whether FUNC or CODE is used, depends on whether ENDPROC or END was used for a particular function before. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Andy Shevchenko Cc: Ard Biesheuvel Cc: Boris Ostrovsky Cc: Darren Hart Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Juergen Gross Cc: linux-arch@vger.kernel.org Cc: linux-efi Cc: linux-efi@vger.kernel.org Cc: Matt Fleming Cc: Peter Zijlstra Cc: platform-driver-x86@vger.kernel.org Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191011115108.12392-21-jslaby@suse.cz commit b4edca150106a68d05eaf823d665a355ff19e28b Author: Jiri Slaby Date: Fri Oct 11 13:50:59 2019 +0200 x86/asm: Remove the last GLOBAL user and remove the macro Convert the remaining 32bit users and remove the GLOBAL macro finally. In particular, this means to use SYM_ENTRY for the singlestepping hack region. Exclude the global definition of GLOBAL from x86 too. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: Mark Rutland Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Will Deacon Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-20-jslaby@suse.cz commit 78f44330d80e2632856b840cf82aa554f34415a1 Author: Jiri Slaby Date: Fri Oct 11 13:50:58 2019 +0200 x86/asm/realmode: Use SYM_DATA_* instead of GLOBAL GLOBAL had several meanings and is going away. Convert all the data marked using GLOBAL to use SYM_DATA_START or SYM_DATA instead. Note that SYM_DATA_END_LABEL is used to generate tr_gdt_end too. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: Pingfan Liu Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-19-jslaby@suse.cz commit 26ba4e5738a544aa17c462bfbe580e74071c810b Author: Jiri Slaby Date: Fri Oct 11 13:50:57 2019 +0200 x86/asm: Use SYM_INNER_LABEL instead of GLOBAL The GLOBAL macro had several meanings and is going away. Convert all the inner function labels marked with GLOBAL to use SYM_INNER_LABEL instead. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: linux-arch@vger.kernel.org Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-18-jslaby@suse.cz commit 37818afd15fe720571955e2f51555a9ffc84363a Author: Jiri Slaby Date: Fri Oct 11 13:50:56 2019 +0200 x86/asm: Do not annotate functions with GLOBAL GLOBAL is an x86's custom macro and is going to die very soon. It was meant for global symbols, but here, it was used for functions. Instead, use the new macros SYM_FUNC_START* and SYM_CODE_START* (depending on the type of the function) which are dedicated to global functions. And since they both require a closing by SYM_*_END, do that here too. startup_64, which does not use GLOBAL but uses .globl explicitly, is converted too. "No alignments" are preserved. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Allison Randal Cc: Andy Lutomirski Cc: Cao jin Cc: Enrico Weigelt Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Juergen Gross Cc: Kate Stewart Cc: linux-arch@vger.kernel.org Cc: Maran Wilson Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-17-jslaby@suse.cz commit eb9f9173d01f8983d16b3cf4f0798f6381812779 Author: Suman Anna Date: Wed Jul 24 19:10:20 2019 -0500 arm64: dts: ti: k3-j721e-common-proc-board: Add IPC sub-mailbox nodes Add the sub-mailbox nodes that are used to communicate between MPU and various remote processors present in the J721E SoCs to the J721E common processor board. These include the R5F remote processors in the dual-R5F cluster (MCU_R5FSS0) in the MCU domain and the two dual-R5F clusters (MAIN_R5FSS0 & MAIN_R5FSS1) in the MAIN domain; the two C66x DSP remote processors and the single C71x DSP remote processor in the MAIN domain. These sub-mailbox nodes utilize the System Mailbox clusters 0 through 4. All the remaining mailbox clusters are currently not used on A72 core, and so are disabled. The sub-mailbox nodes added match the hard-coded mailbox configuration used within the TI RTOS IPC software packages. The R5F processor sub-systems are assumed to be running in Split mode, so a sub-mailbox node is used by each of the R5F cores. Only the sub-mailbox node for the first R5F core in each cluster is used in case of a Lockstep mode for that R5F cluster. NOTE: The GIC_SPI interrupts to be used are dynamically allocated and managed by the System Firmware through the ti-sci-intr irqchip driver. So, only valid interrupts (each cluster's User 0 IRQ output) that are used by the sub-mailbox devices are enabled. This is done to minimize the number of NavSS Interrupt Router outputs utilized. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo commit 56f185826db242dcd2831e5432045821a114366a Author: Suman Anna Date: Wed Jul 24 19:10:19 2019 -0500 arm64: dts: ti: k3-j721e-main: Add mailbox cluster nodes The J721E Main NavSS block contains a Mailbox IP instance with multiple clusters. Each cluster is equivalent to an Mailbox IP instance on OMAP platforms. Add all the Mailbox clusters as their own nodes under the MAIN NavSS cbass_main_navss interconnect node instead of creating an almost empty parent node for the new K3 mailbox IP and the clusters as its child nodes. All these nodes are enabled by default in the base dtsi file, but any cluster that does not define any child sub-mailbox nodes should be disabled in the corresponding board dts files. NOTE: The NavSS only has a limited number of interrupts, so none of the interrupts generated by a Mailbox IP are added by default. Only the needed interrupts that are targeted towards the A72 GIC will have to be added later on in the board dts files alongside the corresponding sub-mailbox child nodes. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo commit 43570f78a25ca18d09a1455a764ca198e9af9060 Author: Suman Anna Date: Wed Jul 24 19:10:18 2019 -0500 arm64: dts: ti: k3-am65-base-board: Add IPC sub-mailbox nodes for R5Fs Add the sub-mailbox nodes that are used to communicate between MPU and the two R5F remote processors present in the MCU domain to the AM654 EVM base board. These sub-mailbox nodes utilize the System Mailbox clusters 0 and 1. The interrupts associated with the Mailbox Cluster User interrupt used by the sub-mailbox nodes are also added. The GIC_SPI interrupt to be used is dynamically allocated and managed by the System Firmware through the ti-sci-intr irqchip driver. All the remaining mailbox clusters are currently not used on A53 core, and so are disabled. The sub-mailbox nodes added match the hard-coded mailbox configuration used within the TI RTOS IPC software packages. The Cortex R5F processor sub-system is assumed to be running in Split mode, so a sub-mailbox node is used by each of the R5F cores. Only the sub-mailbox node from cluster 0 is used in case of Lockstep mode. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo commit 500f1ff97af9c23bce87dcc7c0e882ee074d33a1 Author: Suman Anna Date: Wed Jul 24 19:10:17 2019 -0500 arm64: dts: ti: k3-am65-main: Add mailbox cluster nodes The AM65x Main NavSS block contains a Mailbox IP instance with multiple clusters. Each cluster is equivalent to an Mailbox IP instance on OMAP platforms. Add all the Mailbox clusters as their own nodes under the MAIN NavSS cbass_main_navss interconnect node instead of creating an almost empty parent node for the new K3 mailbox IP and the clusters as its child nodes. All these nodes are enabled by default in the base dtsi file, but any cluster that does not define any child sub-mailbox nodes should be disabled in the corresponding board dts files. NOTE: The NavSS only has a limited number of interrupts, so none of the interrupts generated by a Mailbox IP are added by default. Only the needed interrupts that are targeted towards the A53 GIC will have to be added later on in the board dts files alongside the corresponding sub-mailbox child nodes. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo commit ff5c2bb9c6f5ee461293e337754360836b05b7f4 Author: Vidya Sagar Date: Sat Oct 5 22:12:11 2019 +0530 PCI: tegra: Fix CLKREQ dependency programming Corrects the programming to provide REFCLK to the downstream device when there is no CLKREQ sideband signal routing present from root port to the endpont. Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding commit b16fed65a7938248c8b37d5d0a8020defa6fd926 Author: Jiri Slaby Date: Fri Oct 11 13:50:55 2019 +0200 x86/asm/purgatory: Start using annotations Purgatory used no annotations at all. So include linux/linkage.h and annotate everything: * code by SYM_CODE_* * data by SYM_DATA_* [ bp: Fixup comment in gdt: ] Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Alexios Zavras Cc: Allison Randal Cc: Enrico Weigelt Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-16-jslaby@suse.cz commit 04ce8d3f40cd2dfe48d04d94b79e0c0be60b1339 Author: Kefeng Wang Date: Fri Oct 18 11:18:21 2019 +0800 riscv: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-4-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Signed-off-by: Kefeng Wang Acked-by: Palmer Dabbelt Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 94348b81dd441da398dd10bafce3439b600a16ce Author: Kefeng Wang Date: Fri Oct 18 11:18:20 2019 +0800 ia64: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-3-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Tony Luck Cc: Fenghua Yu Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 1de5bdce0c3f8294d0aabc48fb5497814589422f Author: Jiri Slaby Date: Fri Oct 11 13:50:54 2019 +0200 xen/pvh: Annotate data appropriately Use the new SYM_DATA_START_LOCAL, and SYM_DATA_END* macros to get: 0000 8 OBJECT LOCAL DEFAULT 6 gdt 0008 32 OBJECT LOCAL DEFAULT 6 gdt_start 0028 0 OBJECT LOCAL DEFAULT 6 gdt_end 0028 256 OBJECT LOCAL DEFAULT 6 early_stack 0128 0 OBJECT LOCAL DEFAULT 6 early_stack Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Reviewed-by: Boris Ostrovsky Cc: Andy Shevchenko Cc: Darren Hart Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Juergen Gross Cc: linux-arch@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191011115108.12392-15-jslaby@suse.cz commit 773a37b182259f5e0cdb928112431b119a6e4500 Author: Jiri Slaby Date: Fri Oct 11 13:50:53 2019 +0200 x86/um: Annotate data appropriately Use the new SYM_DATA_START and SYM_DATA_END_LABEL macros for vdso_start. Result is: 0000 2376 OBJECT GLOBAL DEFAULT 4 vdso_start 0948 0 OBJECT GLOBAL DEFAULT 4 vdso_end Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Acked-by: Richard Weinberger Cc: Anton Ivanov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jeff Dike Cc: linux-arch@vger.kernel.org Cc: linux-um@lists.infradead.org Cc: Thomas Gleixner Cc: user-mode-linux-devel@lists.sourceforge.net Cc: user-mode-linux-user@lists.sourceforge.net Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-14-jslaby@suse.cz commit b8c3f9b554e8bd0edb434a54d0dc48e3d9eb6edd Author: Jiri Slaby Date: Fri Oct 11 13:50:52 2019 +0200 x86/boot: Annotate data appropriately Use the new SYM_DATA, SYM_DATA_START, and SYM_DATA_END* macros for data, so that the data in the object file look sane: Value Size Type Bind Vis Ndx Name 0000 10 OBJECT GLOBAL DEFAULT 3 efi32_boot_gdt 000a 10 OBJECT LOCAL DEFAULT 3 save_gdt 0014 8 OBJECT LOCAL DEFAULT 3 func_rt_ptr 001c 48 OBJECT GLOBAL DEFAULT 3 efi_gdt64 004c 0 OBJECT LOCAL DEFAULT 3 efi_gdt64_end 0000 48 OBJECT LOCAL DEFAULT 3 gdt 0030 0 OBJECT LOCAL DEFAULT 3 gdt_end 0030 8 OBJECT LOCAL DEFAULT 3 efi_config 0038 49 OBJECT GLOBAL DEFAULT 3 efi32_config 0069 49 OBJECT GLOBAL DEFAULT 3 efi64_config All have correct size and type now. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Allison Randal Cc: Cao jin Cc: Enrico Weigelt Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: linux-arch@vger.kernel.org Cc: Thomas Gleixner Cc: Wei Huang Cc: x86-ml Cc: Xiaoyao Li Link: https://lkml.kernel.org/r/20191011115108.12392-13-jslaby@suse.cz commit b1bd27b9ad45d77a2924e2168c6982c8ff1d8083 Author: Jiri Slaby Date: Fri Oct 11 13:50:51 2019 +0200 x86/asm/head: Annotate data appropriately Use the new SYM_DATA, SYM_DATA_START, and SYM_DATA_END in both 32 and 64 bit head_*.S. In the 64-bit version, define also SYM_DATA_START_PAGE_ALIGNED locally using the new SYM_START. It is used in the code instead of NEXT_PAGE() which was defined in this file and had been using the obsolete macro GLOBAL(). Now, the data in the 64-bit object file look sane: Value Size Type Bind Vis Ndx Name 0000 4096 OBJECT GLOBAL DEFAULT 15 init_level4_pgt 1000 4096 OBJECT GLOBAL DEFAULT 15 level3_kernel_pgt 2000 2048 OBJECT GLOBAL DEFAULT 15 level2_kernel_pgt 3000 4096 OBJECT GLOBAL DEFAULT 15 level2_fixmap_pgt 4000 4096 OBJECT GLOBAL DEFAULT 15 level1_fixmap_pgt 5000 2 OBJECT GLOBAL DEFAULT 15 early_gdt_descr 5002 8 OBJECT LOCAL DEFAULT 15 early_gdt_descr_base 500a 8 OBJECT GLOBAL DEFAULT 15 phys_base 0000 8 OBJECT GLOBAL DEFAULT 17 initial_code 0008 8 OBJECT GLOBAL DEFAULT 17 initial_gs 0010 8 OBJECT GLOBAL DEFAULT 17 initial_stack 0000 4 OBJECT GLOBAL DEFAULT 19 early_recursion_flag 1000 4096 OBJECT GLOBAL DEFAULT 19 early_level4_pgt 2000 0x40000 OBJECT GLOBAL DEFAULT 19 early_dynamic_pgts 0000 4096 OBJECT GLOBAL DEFAULT 22 empty_zero_page All have correct size and type now. Note that this also removes implicit 16B alignment previously inserted by ENTRY: * initial_code, setup_once_ref, initial_page_table, initial_stack, boot_gdt are still aligned * early_gdt_descr is now properly aligned as was intended before ENTRY was added there long time ago * phys_base's alignment is kept by an explicitly added new alignment Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Cao jin Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Juergen Gross Cc: linux-arch@vger.kernel.org Cc: Maran Wilson Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-12-jslaby@suse.cz commit cc66936e504a5b91dda52fda90203e174a7a71aa Author: Jiri Slaby Date: Fri Oct 11 13:50:50 2019 +0200 x86/asm/entry: Annotate interrupt symbols properly * annotate functions properly by SYM_CODE_START, SYM_CODE_START_LOCAL* and SYM_CODE_END -- these are not C-like functions, so they have to be annotated using CODE. * use SYM_INNER_LABEL* for labels being in the middle of other functions This prevents nested labels annotations. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-11-jslaby@suse.cz commit e9b9d020c4873d5e90d9986cfd137afbafbc5bfa Author: Jiri Slaby Date: Fri Oct 11 13:50:49 2019 +0200 x86/asm: Annotate aliases _key_expansion_128 is an alias to _key_expansion_256a, __memcpy to memcpy, xen_syscall32_target to xen_sysenter_target, and so on. Annotate them all using the new SYM_FUNC_START_ALIAS, SYM_FUNC_START_LOCAL_ALIAS, and SYM_FUNC_END_ALIAS. This will make the tools generating the debuginfo happy as it avoids nesting and double symbols. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Reviewed-by: Juergen Gross [xen parts] Cc: Boris Ostrovsky Cc: "David S. Miller" Cc: Greg Kroah-Hartman Cc: Herbert Xu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: linux-crypto@vger.kernel.org Cc: Peter Zijlstra Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191011115108.12392-10-jslaby@suse.cz commit fa97220196fda2613a6226cc30b573bd8976e15b Author: Jiri Slaby Date: Fri Oct 11 13:50:48 2019 +0200 x86/uaccess: Annotate local function .Lcopy_user_handle_tail is a self-standing local function, annotate it as such using SYM_CODE_START_LOCAL. Again, no functional change, just documentation. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: linux-arch@vger.kernel.org Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-9-jslaby@suse.cz commit deff8a24e1021fb39dddf5f6bc5832e0e3a632ea Author: Jiri Slaby Date: Fri Oct 11 13:50:47 2019 +0200 x86/boot: Annotate local functions .Lrelocated, .Lpaging_enabled, .Lno_longmode, and .Lin_pm32 are self-standing local functions, annotate them as such and preserve "no alignment". The annotations do not generate anything yet. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Cao jin Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: linux-arch@vger.kernel.org Cc: Thomas Gleixner Cc: Wei Huang Cc: x86-ml Cc: Xiaoyao Li Link: https://lkml.kernel.org/r/20191011115108.12392-8-jslaby@suse.cz commit a74ec64af20a2fc043609339b7a0c8aa2a961c8c Author: Kefeng Wang Date: Fri Oct 18 11:18:19 2019 +0800 arm64: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-2-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Mark Rutland Cc: Catalin Marinas Signed-off-by: Kefeng Wang Acked-by: Will Deacon Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit a7590d68e9ab56c595317457c81e59e74f6671c1 Author: Kefeng Wang Date: Fri Oct 18 11:18:18 2019 +0800 alpha: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-1-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra Cc: Ingo Molnar Signed-off-by: Kefeng Wang Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 74d8b90a889022e306b543ff2147a6941c99b354 Author: Jiri Slaby Date: Fri Oct 11 13:50:46 2019 +0200 x86/asm/crypto: Annotate local functions Use the newly added SYM_FUNC_START_LOCAL to annotate beginnings of all functions which do not have ".globl" annotation, but their endings are annotated by ENDPROC. This is needed to balance ENDPROC for tools that generate debuginfo. These function names are not prepended with ".L" as they might appear in call traces and they wouldn't be visible after such change. To be symmetric, the functions' ENDPROCs are converted to the new SYM_FUNC_END. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: "David S. Miller" Cc: Herbert Xu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: linux-crypto@vger.kernel.org Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-7-jslaby@suse.cz commit ef77e6880be8fa3033544109e29417c8710fd3f2 Author: Jiri Slaby Date: Fri Oct 11 13:50:45 2019 +0200 x86/asm: Annotate local pseudo-functions Use the newly added SYM_CODE_START_LOCAL* to annotate beginnings of all pseudo-functions (those ending with END until now) which do not have ".globl" annotation. This is needed to balance END for tools that generate debuginfo. Note that ENDs are switched to SYM_CODE_END too so that everybody can see the pairing. C-like functions (which handle frame ptr etc.) are not annotated here, hence SYM_CODE_* macros are used here, not SYM_FUNC_*. Note that the 32bit version of early_idt_handler_common already had ENDPROC -- switch that to SYM_CODE_END for the same reason as above (and to be the same as 64bit). While early_idt_handler_common is LOCAL, it's name is not prepended with ".L" as it happens to appear in call traces. bad_get_user*, and bad_put_user are now aligned, as they are separate functions. They do not mind to be aligned -- no need to be compact there. early_idt_handler_common is aligned now too, as it is after early_idt_handler_array, so as well no need to be compact there. verify_cpu is self-standing and included in other .S files, so align it too. The others have alignment preserved to what it used to be (using the _NOALIGN variant of macros). Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Alexios Zavras Cc: Allison Randal Cc: Andy Lutomirski Cc: Cao jin Cc: Enrico Weigelt Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Juergen Gross Cc: linux-arch@vger.kernel.org Cc: Maran Wilson Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-6-jslaby@suse.cz commit a6e9be055d47fecdb090c2fb6cd2fdeaf820353c Author: Jassi Brar Date: Mon Oct 14 22:32:19 2019 -0500 dmaengine: milbeaut-xdmac: Add XDMAC driver for Milbeaut platforms Driver for Socionext Milbeaut XDMAC controller. The controller only supports Mem-To-Mem transfers over upto 8 configurable channels. Signed-off-by: Jassi Brar Link: https://lore.kernel.org/r/20191015033219.14713-1-jassisinghbrar@gmail.com Signed-off-by: Vinod Koul commit 3708f89b33cc2aef5e121221704c1f833ca712c4 Author: Jassi Brar Date: Mon Oct 14 22:31:57 2019 -0500 dt-bindings: milbeaut-m10v-xdmac: Add Socionext Milbeaut XDMAC bindings Document the devicetree bindings for Socionext Milbeaut XDMAC controller. Controller only supports Mem->Mem transfers. Number of physical channels are determined by the number of irqs registered. Reviewed-by: Rob Herring Signed-off-by: Jassi Brar Link: https://lore.kernel.org/r/20191015033157.14656-1-jassisinghbrar@gmail.com Signed-off-by: Vinod Koul commit 6c3214e698e49da9b694cdda86332527260cf119 Author: Jassi Brar Date: Mon Oct 14 22:33:59 2019 -0500 dmaengine: milbeaut-hdmac: Add HDMAC driver for Milbeaut platforms Driver for Socionext Milbeaut HDMAC controller. The controller has upto 8 floating channels, that need a predefined slave-id to work from a set of slaves. Signed-off-by: Jassi Brar Link: https://lore.kernel.org/r/20191015033359.14925-1-jassisinghbrar@gmail.com Signed-off-by: Vinod Koul commit df781c0ceebae321fb7f7e96773ea451805e14b9 Author: Jassi Brar Date: Mon Oct 14 22:33:50 2019 -0500 dt-bindings: milbeaut-m10v-hdmac: Add Socionext Milbeaut HDMAC bindings Document the devicetree bindings for Socionext Milbeaut HDMAC controller. Controller has upto 8 floating channels, that need a predefined slave-id to work from a set of slaves. Reviewed-by: Rob Herring Signed-off-by: Jassi Brar Link: https://lore.kernel.org/r/20191015033350.14866-1-jassisinghbrar@gmail.com Signed-off-by: Vinod Koul commit 76dc6d600166de2c0482db95318534e6dc284212 Author: Jiri Slaby Date: Fri Oct 11 13:50:44 2019 +0200 x86/asm/entry: Annotate THUNKs Place SYM_*_START_NOALIGN and SYM_*_END around the THUNK macro body. Preserve @function by FUNC (64bit) and CODE (32bit). Given it was not marked as aligned, use NOALIGN. The result: Value Size Type Bind Vis Ndx Name 0000 28 FUNC GLOBAL DEFAULT 1 trace_hardirqs_on_thunk 001c 28 FUNC GLOBAL DEFAULT 1 trace_hardirqs_off_thunk 0038 24 FUNC GLOBAL DEFAULT 1 lockdep_sys_exit_thunk 0050 24 FUNC GLOBAL DEFAULT 1 ___preempt_schedule 0068 24 FUNC GLOBAL DEFAULT 1 ___preempt_schedule_notra The annotation of .L_restore does not generate anything (at the moment). Here, it just serves documentation purposes (as opening and closing brackets of functions). Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-5-jslaby@suse.cz commit 6ec2a968247e51535e08dbbbfc8f53c95a48cde0 Author: Jiri Slaby Date: Fri Oct 11 13:50:43 2019 +0200 x86/asm: Annotate relocate_kernel_{32,64}.c There are functions in relocate_kernel_{32,64}.c which are not annotated. This makes automatic annotations on them rather hard. So annotate all the functions now. Note that these are not C-like functions, so FUNC is not used. Instead CODE markers are used. Also the functions are not aligned, so the NOALIGN versions are used: - SYM_CODE_START_NOALIGN - SYM_CODE_START_LOCAL_NOALIGN - SYM_CODE_END The result is: 0000 108 NOTYPE GLOBAL DEFAULT 1 relocate_kernel 006c 165 NOTYPE LOCAL DEFAULT 1 identity_mapped 0146 127 NOTYPE LOCAL DEFAULT 1 swap_pages 0111 53 NOTYPE LOCAL DEFAULT 1 virtual_mapped Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Alexios Zavras Cc: Allison Randal Cc: Enrico Weigelt Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-arch@vger.kernel.org Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-4-jslaby@suse.cz commit 37503f734e9de314c4e9a1eba33e9e7d8ec80839 Author: Jiri Slaby Date: Fri Oct 11 13:50:42 2019 +0200 x86/asm/suspend: Use SYM_DATA for data Some global data in the suspend code were marked as `ENTRY'. ENTRY was intended for functions and shall be paired with ENDPROC. ENTRY also aligns symbols to 16 bytes which creates unnecessary holes. Note that: * saved_magic (long) in wakeup_32 is still prepended by section's ALIGN * saved_magic (quad) in wakeup_64 follows a bunch of quads which are aligned (but need not be aligned to 16) Since historical markings are being dropped, make proper use of newly added SYM_DATA in this code. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Acked-by: Rafael J. Wysocki Acked-by: Pavel Machek Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Len Brown Cc: linux-arch@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191011115108.12392-3-jslaby@suse.cz commit 27018ab14bea5ae44df4de119feefbcb37ae4f85 Author: YueHaibing Date: Wed Oct 9 12:06:21 2019 +0000 crypto: inside-secure - Use PTR_ERR_OR_ZERO in safexcel_xcbcmac_cra_init() Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing Acked-by: Antoine Tenart Acked-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 965d7286d871b622dcaaafd2e2346b11631584ff Author: Ben Dooks Date: Wed Oct 9 10:12:56 2019 +0100 crypto: jitter - add header to fix buildwarnings Fix the following build warnings by adding a header for the definitions shared between jitterentropy.c and jitterentropy-kcapi.c. Fixes the following: crypto/jitterentropy.c:445:5: warning: symbol 'jent_read_entropy' was not declared. Should it be static? crypto/jitterentropy.c:475:18: warning: symbol 'jent_entropy_collector_alloc' was not declared. Should it be static? crypto/jitterentropy.c:509:6: warning: symbol 'jent_entropy_collector_free' was not declared. Should it be static? crypto/jitterentropy.c:516:5: warning: symbol 'jent_entropy_init' was not declared. Should it be static? crypto/jitterentropy-kcapi.c:59:6: warning: symbol 'jent_zalloc' was not declared. Should it be static? crypto/jitterentropy-kcapi.c:64:6: warning: symbol 'jent_zfree' was not declared. Should it be static? crypto/jitterentropy-kcapi.c:69:5: warning: symbol 'jent_fips_enabled' was not declared. Should it be static? crypto/jitterentropy-kcapi.c:74:6: warning: symbol 'jent_panic' was not declared. Should it be static? crypto/jitterentropy-kcapi.c:79:6: warning: symbol 'jent_memcpy' was not declared. Should it be static? crypto/jitterentropy-kcapi.c:93:6: warning: symbol 'jent_get_nstime' was not declared. Should it be static? Signed-off-by: Ben Dooks Reviewed-by: Stephan Mueller commit 1a61af281e6532bb9a40864d705a2eba2f3a40a3 Author: Colin Ian King Date: Tue Oct 8 09:24:28 2019 +0100 crypto: inside-secure - fix spelling mistake "algorithmn" -> "algorithm" There is a spelling mistake in a dev_err message. Fix it. Add in missing newline. Signed-off-by: Colin Ian King Acked-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit ffedeeb780dc554eff3d3b16e6a462a26a41d7ec Author: Jiri Slaby Date: Fri Oct 11 13:50:41 2019 +0200 linkage: Introduce new macros for assembler symbols Introduce new C macros for annotations of functions and data in assembly. There is a long-standing mess in macros like ENTRY, END, ENDPROC and similar. They are used in different manners and sometimes incorrectly. So introduce macros with clear use to annotate assembly as follows: a) Support macros for the ones below SYM_T_FUNC -- type used by assembler to mark functions SYM_T_OBJECT -- type used by assembler to mark data SYM_T_NONE -- type used by assembler to mark entries of unknown type They are defined as STT_FUNC, STT_OBJECT, and STT_NOTYPE respectively. According to the gas manual, this is the most portable way. I am not sure about other assemblers, so this can be switched back to %function and %object if this turns into a problem. Architectures can also override them by something like ", @function" if they need. SYM_A_ALIGN, SYM_A_NONE -- align the symbol? SYM_L_GLOBAL, SYM_L_WEAK, SYM_L_LOCAL -- linkage of symbols b) Mostly internal annotations, used by the ones below SYM_ENTRY -- use only if you have to (for non-paired symbols) SYM_START -- use only if you have to (for paired symbols) SYM_END -- use only if you have to (for paired symbols) c) Annotations for code SYM_INNER_LABEL_ALIGN -- only for labels in the middle of code SYM_INNER_LABEL -- only for labels in the middle of code SYM_FUNC_START_LOCAL_ALIAS -- use where there are two local names for one function SYM_FUNC_START_ALIAS -- use where there are two global names for one function SYM_FUNC_END_ALIAS -- the end of LOCAL_ALIASed or ALIASed function SYM_FUNC_START -- use for global functions SYM_FUNC_START_NOALIGN -- use for global functions, w/o alignment SYM_FUNC_START_LOCAL -- use for local functions SYM_FUNC_START_LOCAL_NOALIGN -- use for local functions, w/o alignment SYM_FUNC_START_WEAK -- use for weak functions SYM_FUNC_START_WEAK_NOALIGN -- use for weak functions, w/o alignment SYM_FUNC_END -- the end of SYM_FUNC_START_LOCAL, SYM_FUNC_START, SYM_FUNC_START_WEAK, ... For functions with special (non-C) calling conventions: SYM_CODE_START -- use for non-C (special) functions SYM_CODE_START_NOALIGN -- use for non-C (special) functions, w/o alignment SYM_CODE_START_LOCAL -- use for local non-C (special) functions SYM_CODE_START_LOCAL_NOALIGN -- use for local non-C (special) functions, w/o alignment SYM_CODE_END -- the end of SYM_CODE_START_LOCAL or SYM_CODE_START d) For data SYM_DATA_START -- global data symbol SYM_DATA_START_LOCAL -- local data symbol SYM_DATA_END -- the end of the SYM_DATA_START symbol SYM_DATA_END_LABEL -- the labeled end of SYM_DATA_START symbol SYM_DATA -- start+end wrapper around simple global data SYM_DATA_LOCAL -- start+end wrapper around simple local data ========== The macros allow to pair starts and ends of functions and mark functions correctly in the output ELF objects. All users of the old macros in x86 are converted to use these in further patches. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Acked-by: Rafael J. Wysocki Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Boris Ostrovsky Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Len Brown Cc: Linus Torvalds Cc: linux-arch@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: Mark Rutland Cc: Pavel Machek Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20191011115108.12392-2-jslaby@suse.cz commit 53e4929150610149aac3453e2030c59b871984bb Author: Thomas Gleixner Date: Tue Oct 15 21:18:16 2019 +0200 backlight: Kconfig: jornada720: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the Kconfig dependency to CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner [Sebastian: +LCD_HP700] Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit f706df4f42b1b9f5acb6641eb6818d85b6856476 Author: Takashi Sakamoto Date: Fri Oct 18 00:54:24 2019 +0900 ALSA: firewire-lib: tune the minimum available size of PCM period In IEC 61883-1/6, one isoc packet can transfer events up to the value of syt interval. This comes from the interval of isoc cycle. As 1394 OHCI controller can generate hardware IRQ per isoc packet, the interval is calculated as 125 usec. In IEC 61883-1/6, two ways of transmission is described; blocking and non-blocking methods. In blocking method, the sequence of packet includes 'empty' or 'NODATA' packets which include no events. In non-blocking method, the number of events per packet is variable up to the syt interval. This commit uses double of the value of syt interval as minimum available size of PCM period due to the above protocol design. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-13-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 99921ec67dcdaeb5a5cc503f23ea2b5b6ff380ae Author: Takashi Sakamoto Date: Fri Oct 18 00:54:23 2019 +0900 ALSA: firewire-lib: tune the maximum available size of PCM period Linux driver for 1394 OHCI controller voluntarily flushes isoc context when total size of accumulated context header reached PAGE_SIZE. This kicks tasklet for the isoc context. This is inconvenient to process runtime of PCM substream. This commit adds a restriction of the maximum size of PCM period to avoid this behaviour. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-12-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit e229853d505d7ab77e9b68b0ac91d19f48fe6d80 Author: Takashi Sakamoto Date: Fri Oct 18 00:54:22 2019 +0900 ALSA: firewire-lib: schedule hardware IRQ according to the size of PCM period ALSA IEC 61883-1/6 packet streaming engine controls 1394 OHCI controller to generate hardware IRQ for fixed number of isochronous packets (=16) since its first commit. This commit allow the engine to generate it for variable period according to the number of event to handle. For outgoing stream, internal calculator is used to check the accumulated events. For incoming stream, the number of data block in the packet of stream is used to check the accumulated events. When it's unavailable, fixed number of packet roughly calculated in advance is used instead of event counting. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-11-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 4de3eb062e2daf04646d23417a39b8843df4508b Author: Takashi Sakamoto Date: Fri Oct 18 00:54:21 2019 +0900 ALSA: fireface: share PCM buffer size for both direction This commit allows ALSA fireface driver to share PCM buffer size for both capture and playback PCM substream. When AMDTP domain starts for one of the PCM substream, buffer size of the PCM substream is stores to AMDTP domain structure. Some AMDTP streams have already run with the buffer size when another PCM substream starts, therefore the PCM substream has a constraint to its buffer size. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-10-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 0f5482e7875bc2d507e6d92fcc8de22ff75fbdda Author: Takashi Sakamoto Date: Fri Oct 18 00:54:20 2019 +0900 ALSA: firewire-motu: share PCM buffer size for both direction This commit allows ALSA firewire-motu driver to share PCM buffer size for both capture and playback PCM substream. When AMDTP domain starts for one of the PCM substream, buffer size of the PCM substream is stores to AMDTP domain structure. Some AMDTP streams have already run with the buffer size when another PCM substream starts, therefore the PCM substream has a constraint to its buffer size. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 128307d5f947d43a89e68dd8357879a0f111821d Author: Takashi Sakamoto Date: Fri Oct 18 00:54:19 2019 +0900 ALSA: firewire-tascam: share PCM buffer size for both direction This commit allows ALSA firewire-tascam driver to share PCM buffer size for both capture and playback PCM substream. When AMDTP domain starts for one of the PCM substream, buffer size of the PCM substream is stores to AMDTP domain structure. Some AMDTP streams have already run with the buffer size when another PCM substream starts, therefore the PCM substream has a constraint to its buffer size. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 76c4ecbe4b07c0d1b1aba31bf2a7f20cccbdbb4e Author: Takashi Sakamoto Date: Fri Oct 18 00:54:18 2019 +0900 ALSA: firewire-digi00x: share PCM buffer size for both direction This commit allows ALSA firewire-digi00x driver to share PCM buffer size for both capture and playback PCM substream. When AMDTP domain starts for one of the PCM substream, buffer size of the PCM substream is stores to AMDTP domain structure. Some AMDTP streams have already run with the buffer size when another PCM substream starts, therefore the PCM substream has a constraint to its buffer size. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ecb40fd2c8afdb66da7e309b43c6dc90e419c2dc Author: Takashi Sakamoto Date: Fri Oct 18 00:54:17 2019 +0900 ALSA: dice: share PCM buffer size for both direction This commit allows ALSA dice driver to share PCM buffer size for both capture and playback PCM substream. When AMDTP domain starts for one of the PCM substream, buffer size of the PCM substream is stores to AMDTP domain structure. Some AMDTP streams have already run with the buffer size when another PCM substream starts, therefore the PCM substream has a constraint to its buffer size. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 3299d2a0f74c0774da0672d0bc54741da4bbda6e Author: Takashi Sakamoto Date: Fri Oct 18 00:54:16 2019 +0900 ALSA: oxfw: share PCM buffer size for both direction This commit allows ALSA oxfw driver to share PCM buffer size for both capture and playback PCM substream. When AMDTP domain starts for one of the PCM substream, buffer size of the PCM substream is stores to AMDTP domain structure. Some AMDTP streams have already run with the buffer size when another PCM substream starts, therefore the PCM substream has a constraint to its buffer size. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 659c6af569a2bd08b3b3c1f5e445a58510de02c8 Author: Takashi Sakamoto Date: Fri Oct 18 00:54:15 2019 +0900 ALSA: fireworks: share PCM buffer size for both direction This commit allows ALSA fireworks driver to share PCM buffer size for both capture and playback PCM substream. When AMDTP domain starts for one of the PCM substream, buffer size of the PCM substream is stores to AMDTP domain structure. Some AMDTP streams have already run with the buffer size when another PCM substream starts, therefore the PCM substream has a constraint to its buffer size. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 1fde7a447a7f423b893ac3fcac0ba65893924189 Author: Takashi Sakamoto Date: Fri Oct 18 00:54:14 2019 +0900 ALSA: bebob: share PCM buffer size for both direction This commit allows ALSA bebob driver to share PCM buffer size for both capture and playback PCM substream. When AMDTP domain starts for one of the PCM substream, buffer size of the PCM substream is stores to AMDTP domain structure. Some AMDTP streams have already run with the buffer size when another PCM substream starts, therefore the PCM substream has a constraint to its buffer size. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a0e023317e2d55c6b2fbf342c12d8a59797e1cff Author: Takashi Sakamoto Date: Fri Oct 18 00:54:13 2019 +0900 ALSA: firewire-lib: use variable size of queue for isoc packets instead of fixed size The number of packets in packet buffer has been fixed number (=48) since first commit of ALSA IEC 61883-1/6 packet streaming engine. This commit allows the engine to use variable number of packets in the buffer. The size is calculated by a parameter in AMDTP domain structure surely to store the number of events in the packets of buffer. Although the value of parameter is expected to come from 'period size' parameter of PCM substream, at present 48 is still used. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191017155424.885-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit dd85b4922de1b70f0729d2a7856db619e210a8ec Author: Ajay Joshi Date: Thu Oct 17 14:19:43 2019 -0700 null_blk: return fixed zoned reads > write pointer A zoned block device maintains a write pointer within a zone, and reads beyond the write pointer are undefined. Fill data buffer returned above the write pointer with 0xFF. Signed-off-by: Ajay Joshi Reviewed-by: Damien Le Moal Reviewed-by: Matias Bjørling Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe commit 5d904e3c5d40c3939d53659e9c473500c3c24039 Author: Tvrtko Ursulin Date: Thu Oct 17 10:45:00 2019 +0100 drm/i915: Pass in intel_gt at some for_each_engine sites Where the function, or code segment, operates on intel_gt, we need to start passing it instead of i915 to for_each_engine(_masked). This is another partial step in migration of i915->engines[] to gt->engines[]. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191017094500.21831-2-tvrtko.ursulin@linux.intel.com commit a50134b1983b8860e0e74e41579cbb19a7304ca7 Author: Tvrtko Ursulin Date: Thu Oct 17 17:18:52 2019 +0100 drm/i915: Make for_each_engine_masked work on intel_gt Medium term goal is to eliminate the i915->engine[] array and to get there we have recently introduced equivalent array in intel_gt. Now we need to migrate the code further towards this state. This next step is to eliminate usage of i915->engines[] from the for_each_engine_masked iterator. For this to work we also need to use engine->id as index when populating the gt->engine[] array and adjust the default engine set indexing to use engine->legacy_idx instead of assuming gt->engines[] indexing. v2: * Populate gt->engine[] earlier. * Check that we don't duplicate engine->legacy_idx v3: * Work around the initialization order issue between default_engines() and intel_engines_driver_register() which sets engine->legacy_idx for now. It will be fixed properly later. v4: * Merge with forgotten v2.5. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191017161852.8836-1-tvrtko.ursulin@linux.intel.com commit 8e7b71f8a9750be1ca15f0285142a6aa000755a0 Author: Govind Singh Date: Fri Oct 11 18:59:27 2019 +0530 dt-bindings: clock: qcom: Add QCOM Q6SSTOP clock controller bindings Add devicetree binding for the Q6SSTOP clock controller found in QCS404. Signed-off-by: Govind Singh Link: https://lkml.kernel.org/r/20191011132928.9388-2-govinds@codeaurora.org Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit cb0701acfa7e3fe9e919cf2aa2aa939b7fd603c2 Author: Andy Shevchenko Date: Fri Aug 30 17:34:32 2019 +0300 ACPI: platform: Unregister stale platform devices When commit 68bdb6773289 ("ACPI: add support for ACPI reconfiguration notifiers") introduced reconfiguration notifiers, it missed the point that the ACPI table, which might be loaded and then unloaded via ConfigFS, could contain devices that were not enumerated by their parents. In such cases, the stale platform device is dangling in the system while the rest of the devices from the same table are already gone. Introduce acpi_platform_device_remove_notify() notifier that, in similar way to I²C or SPI buses, unregisters the platform devices on table removal event. Fixes: 68bdb6773289 ("ACPI: add support for ACPI reconfiguration notifiers") Depends-on: 00500147cbd3 ("drivers: Introduce device lookup variants by ACPI_COMPANION device") Signed-off-by: Andy Shevchenko [ rjw: Changelog & function rename ] Signed-off-by: Rafael J. Wysocki commit 686191a7ea136b3c06caf57a2ac450bbadc4cc7c Merge: a7118662734a f213729f6796 Author: Jonathan Cameron Date: Thu Oct 17 22:08:43 2019 +0100 Merge branch 'ib-ti-eqep-5.4-rc1' into togreg Immutable branch being merged in. Created as this also involves moving some dependencies around, outside of the counter subsystem. It's possible it will want to be pulled into other trees. commit f213729f679619e70669c2b440886929595d26e5 Author: David Lechner Date: Sun Sep 1 17:58:24 2019 -0500 counter: new TI eQEP driver This adds a new counter driver for the Texas Instruments Enhanced Quadrature Encoder Pulse (eQEP) module. Only very basic functionality is currently implemented - only enough to be able to read the position. The actual device has many more features which can be added to the driver on an as-needed basis. It is not possible to read the QEPA/B signal values in hardware, so that feature is omitted. The TI_PWMSS kernel option is selected in Kconfig to enable the parent bus, which is needed for power management. Signed-off-by: David Lechner Signed-off-by: Jonathan Cameron commit 1517d90cfafe0f95fd7863d04e1596f7beb7dfa8 Author: David Lechner Date: Sun Sep 1 17:58:23 2019 -0500 dt-bindings: counter: new bindings for TI eQEP This documents device tree binding for the Texas Instruments Enhanced Quadrature Encoder Pulse (eQEP) Module found in various TI SoCs. Signed-off-by: David Lechner Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 1dfffa0051eae890ce36924651ecff60df5d779e Author: Sebastian Andrzej Siewior Date: Thu Oct 17 18:13:52 2019 +0200 drm/i915: Don't disable interrupts independently of the lock The locks (active.lock and rq->lock) need to be taken with disabled interrupts. This is done in i915_request_retire() by disabling the interrupts independently of the locks itself. While local_irq_disable()+spin_lock() equals spin_lock_irq() on vanilla it does not on PREEMPT_RT. Chris Wilson confirmed that local_irq_disable() was just introduced as an optimisation to avoid enabling/disabling interrupts during lock/unlock combo. Enable/disable interrupts as part of the locking instruction. Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191017161352.e5z3ugse7gxl5ari@linutronix.de commit 2c2fdb8bca290c439e383cfb6857b0c65e528964 Author: Kevin Wang Date: Wed Oct 16 10:51:32 2019 +0800 drm/amdgpu: fix amdgpu trace event print string format error the trace event print string format error. (use integer type to handle string) before: amdgpu_test_kev-1556 [002] 138.508781: amdgpu_cs_ioctl: sched_job=8, timeline=gfx_0.0.0, context=177, seqno=1, ring_name=ffff94d01c207bf0, num_ibs=2 after: amdgpu_test_kev-1506 [004] 370.703783: amdgpu_cs_ioctl: sched_job=12, timeline=gfx_0.0.0, context=234, seqno=2, ring_name=gfx_0.0.0, num_ibs=1 change trace event list: 1.amdgpu_cs_ioctl 2.amdgpu_sched_run_job 3.amdgpu_ib_pipe_sync Signed-off-by: Kevin Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 367039bfb6428407197629722815db43c914d89e Author: Tianci.Yin Date: Mon Sep 30 14:29:33 2019 +0800 drm/amdgpu/psp: add psp memory training implementation(v3) add memory training implementation code to save resume time. Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 778e8c428f90d7e52da136e80fbfafecf4e6d6cd Author: Tianci.Yin Date: Mon Sep 30 14:28:17 2019 +0800 drm/amdgpu: reserve vram for memory training(v4) memory training using specific fixed vram segment, reserve these segments before anyone may allocate it. Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 0586a0596a69b08eac1d2f8edb15cc9e955f36ab Author: Tianci.Yin Date: Mon Sep 30 14:07:00 2019 +0800 drm/amdgpu: add psp memory training callbacks and macro add interface for memory training. Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit efe4f00077800d767e9899d12b02f1e1a1eb556b Author: Tianci.Yin Date: Mon Sep 30 13:43:31 2019 +0800 drm/amdgpu/atomfirmware: add memory training related helper functions(v3) parse firmware to get memory training capability and fb location. Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 66e111292b9044066472cb8d653126294e01ec43 Author: Tianci.Yin Date: Tue Oct 8 13:57:28 2019 +0800 drm/amdgpu: update atomfirmware header with memory training related members(v3) add new vram_reserve_block structure and atomfirmware_internal_constants enumeration Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit a7d4c920f892cca5f5efb2bf9c76419dc4938058 Author: Tianci.Yin Date: Mon Sep 30 14:16:42 2019 +0800 drm/amdgpu: introduce psp_v11_0_is_sos_alive interface(v2) introduce psp_v11_0_is_sos_alive func for common use. Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit e35e2b117f4dba2761d96e378c28734f6807f227 Author: Tianci.Yin Date: Mon Sep 30 13:33:50 2019 +0800 drm/amdgpu: add a generic fb accessing helper function(v3) add a generic helper function for accessing framebuffer via MMIO Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 45cf454e4c0fa34d33980063408095179369c5f0 Author: Tianci.Yin Date: Mon Sep 30 13:10:03 2019 +0800 drm/amdgpu: update amdgpu_discovery to handle revision update amdgpu_discovery to get IP revision. Reviewed-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit ad7ce43c5e7ba9f81e1c4b26089a4e3108754015 Author: Prike Liang Date: Wed Oct 16 14:28:33 2019 +0800 drm/amdgpu/powerplay: implement interface pp_power_profile_mode implement get_power_profile_mode for getting power profile mode status. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 8c32d0438f9897692524b92036048091209a911e Author: Alex Deucher Date: Tue Oct 15 18:09:41 2019 -0400 drm/amdgpu/vcn: fix allocation size in enc ring test We need to allocate a large enough buffer for the session info, otherwise the IB test can overwrite other memory. - Session info is 128K according to mesa - Use the same session info for create and destroy Bug: https://bugzilla.kernel.org/show_bug.cgi?id=204241 Acked-by: Christian König Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher commit b24c459f9f2c531ae04ebbd906365b182262a53b Author: Alex Deucher Date: Tue Oct 15 18:08:59 2019 -0400 drm/amdgpu/uvd7: fix allocation size in enc ring test (v2) We need to allocate a large enough buffer for the session info, otherwise the IB test can overwrite other memory. v2: - session info is 128K according to mesa - use the same session info for create and destroy Bug: https://bugzilla.kernel.org/show_bug.cgi?id=204241 Acked-by: Christian König Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher commit 481bf82c97a49409ed79689edd3c3eaddc799866 Author: Alex Deucher Date: Tue Oct 15 18:07:19 2019 -0400 drm/amdgpu/uvd6: fix allocation size in enc ring test (v2) We need to allocate a large enough buffer for the session info, otherwise the IB test can overwrite other memory. v2: - session info is 128K according to mesa - use the same session info for create and destroy Bug: https://bugzilla.kernel.org/show_bug.cgi?id=204241 Acked-by: Christian König Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher commit 6cbeaa8231edbba4b3d8702af976deb44419b082 Author: Alex Deucher Date: Wed Oct 16 12:12:24 2019 -0400 drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DSC_SUPPORT=n Add proper config check. Reviewed-by: Mikita Lipski Signed-off-by: Alex Deucher commit dd80ad9ba5fbfc672f45aea71c26b04c7b658e7a Author: YueHaibing Date: Wed Oct 16 19:15:41 2019 +0800 drm/amd/display: Make dc_link_detect_helper static Fix sparse warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:746:6: warning: symbol 'dc_link_detect_helper' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit a825a2124dd67f294a5a703921d6e0c4527d3fa8 Author: Bhawanpreet Lakha Date: Fri Oct 11 14:58:02 2019 -0400 drm/amd/display: null check pp_smu clock table before using it Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit c7e06b0d02e2a32280ae9f4d20f4283fe756dc79 Author: Bhawanpreet Lakha Date: Fri Oct 11 10:37:49 2019 -0400 drm/amd/display: handle dp is usb-c This patch adds handling of dp is usb-c, it is not tested but is needed to support dp over usb-c Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit e78a312f81c8bc5aba0cd1ff8bd580c1f1b7f1e2 Author: Bhawanpreet Lakha Date: Thu Oct 3 15:39:14 2019 -0400 drm/amd/display: use requested_dispclk_khz instead of clk Use requested_dispclk_khz / 1000 directly Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit edcc9a6b80922d66e947bbfe96b19c6448062267 Author: Lewis Huang Date: Fri Jul 26 14:02:03 2019 -0400 drm/amd/display: enable smu set dcfclk [Why] SMU fixed this issue after version 0x370c00 [How] enable smu send message to set dcfclk after smu version 0x370c00 Signed-off-by: Lewis Huang Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit cd83fa1ea9b9431cf1d57ac4179a11bc4393a5b6 Author: joseph gravenor Date: Mon Jul 8 13:41:01 2019 -0400 drm/amd/display: fix header for RN clk mgr [why] Should always MP0_BASE for any register definition from MP per-IP header files. I belive the reason the linux version of MP1_BASE works is The 0th element of the 0th table of that is identical to the corrisponding value of MP0_BASE in the renoir offset header file. The reason we should only use MP0_BASE is There is only one set of per-IP headers MP that includes all register definitions related to SMU IP block. This IP includes MP0, MP1, MP2 and an ecryption engine that can be used only by MP0. As a result all register definitions from MP file should be based only on MP0_BASE data. [How] Change MP1_BASE to MP0_BASE Signed-off-by: joseph gravenor Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 2ffb174b1d9f40a702c1ca455b16a844549429cb Author: Eric Yang Date: Thu Oct 3 15:06:01 2019 -0400 drm/amd/display: add sanity check for clk table from smu [Why] Handle the case where we don't get a valid table. Also fixes compiler warning for variable potentially used before assignment. [How] If the entire table has no valid fclk, reject the table and use our own hard code. Signed-off-by: Eric Yang Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit bfbacdae0ab47db7f61d3dc17dee8f4a3de53f5e Author: Michael Strauss Date: Wed Aug 7 16:52:20 2019 -0400 drm/amd/display: Fix rn audio playback and video playback speed [WHY] dprefclk is improperly read due to incorrect units used. Causes an audio clock to be improperly set, making audio non-functional and videos play back too fast [HOW] Scale dprefclk value from MHz to KHz (multiply by 1000) to ensure that dprefclk_khz is in correct units Signed-off-by: Michael Strauss Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 1952a21cf3622f5b896eb807e4164acfff104e0f Author: Bhawanpreet Lakha Date: Thu Oct 3 14:48:10 2019 -0400 drm/amd/display: handle "18" case in TruncToValidBPP Handle 18 DecimalBPP like other cases Signed-off-by: Bhawanpreet Lakha Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit dd8d1b49c04bee2099c9548843c50fa2041cec69 Author: Dmytro Laktyushkin Date: Fri Aug 30 16:32:13 2019 -0400 drm/amd/display: update odm mode validation to be in line with policy Previously 8k30 worked with dsc and odm combine due to a workaround that ran the formula a second time with dsc support enable should dsc validation fail. This worked when clocks were low enough for formula to enable odm to lower voltage, however now broke due to increased clocks. This change updates the ODM combine policy within the formula to properly reflect our current policy within DC, only enabling ODM when we have to, as well as adding a check for viewport width when dsc is enabled. As a side effect the redundant call to dml when odm is required is now unnecessary. Signed-off-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 3794943cb1026006db9363a3641973b62387e51a Author: Sung Lee Date: Fri Aug 30 13:36:40 2019 -0400 drm/amd/display: add dummy functions to smu for Renoir Silicon Diags [Why] Previously only dummy functions were added in Diags for FPGA. On silicon, this would lead to a segmentation fault on silicon diags. [How] Check if diags silicon and if so, add dummy functions. Signed-off-by: Sung Lee Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 92a5dc22051b3b1054bc696f45142a77c779abeb Author: Bhawanpreet Lakha Date: Thu Oct 3 13:49:30 2019 -0400 drm/amd/display: change PP_SM defs to 8 DPM level is 8 these were incorrect before. Fix them Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 652651ffee49f11654d94c220babb1866dde2efb Author: Bhawanpreet Lakha Date: Thu Oct 3 13:42:24 2019 -0400 drm/amd/display: update renoir bounding box and res_caps The values for bounding box and res_caps were incorrect. So Fix them Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit f6586223b16c64ff9a208a6c224529b3331551b5 Author: Bhawanpreet Lakha Date: Thu Oct 3 13:38:57 2019 -0400 drm/amd/display: update dcn21 hubbub registers use dcn20 common regs define to share some regs with dcn20 Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit df1fba075dcf560746122a27abaf47dcdd21f7a5 Author: Bhawanpreet Lakha Date: Thu Oct 3 13:35:36 2019 -0400 drm/amd/display: add detile buffer size for renoir Detile buffer size affects dcc caps, it was already added for dcn2. Now add it for dcn21 Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 234fa04ea202a455e864226600aec8152ba162da Author: Dmytro Laktyushkin Date: Wed Oct 2 15:59:23 2019 -0400 drm/amd/display: correct dcn21 NUM_VMID to 16 1 vmid limitation only exists for HOSTVM which is a custom use case anyway. Signed-off-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 02981b28cde7d0e71978c9bd530067855841ffc8 Author: Eric Yang Date: Wed Oct 2 15:57:13 2019 -0400 drm/amd/display: use dcn10 version of program tiling on Renoir [Why] Renoir is gfx9, same as dcn10, not dcn20. Signed-off-by: Eric Yang Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 6ba3712d2426e39281199048c08ef60c2ad0a6f3 Author: Dmytro Laktyushkin Date: Wed Oct 2 15:55:48 2019 -0400 drm/amd/display: initialize RN gpuvm context programming function Renoir can use vm contexes as long as HOSTVM is off so this should be initialized. Signed-off-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit f93e29f083ff263b1507675d2aaa98917e9351c8 Author: Lewis Huang Date: Sat Jul 6 16:02:25 2019 -0500 drm/amd/display: Temporary workaround to toggle watermark setting [Why] Watermarks not propagated to DCHUBP after it is powered on [How] Add temoprary function apply_DEDCN21_147_wa to apply wm settings for Renoir Signed-off-by: Lewis Huang Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit d4516d3ec5ea1cc23175b5eea08861276278a99b Author: Bhawanpreet Lakha Date: Wed Oct 2 15:31:03 2019 -0400 drm/amd/display: fix incorrect page table address for renoir Incorrect page table address and programming sys aperture for stutter gather, so fix it. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 48d92e8eda3d9b61978377e7539bfc5958e850cf Author: Dmytro Laktyushkin Date: Wed Oct 2 15:19:41 2019 -0400 drm/amd/display: enable hostvm based on roimmu active for dcn2.1 Enabling hostvm when ROIMMU is not active seems to break GPUVM. This fixes the issue by not enabling hostvm if ROIMMU is not activated. Signed-off-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 15fdbcc51f12771bd3abd9fdeb854bf364b203b4 Author: Lewis Huang Date: Wed Oct 2 14:09:52 2019 -0400 drm/amd/display: move the bounding box patch before calculate wm [why] driver updateis the dcn2_1_soc into dml before call update_bw_bounding_box [How] Move the patch function before calculate wm. Signed-off-by: Lewis Huang Signed-off-by: joseph graveno Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 4de094ee8a18ae48b91c7b9f3f0f086f7c3e3f01 Author: Bhawanpreet Lakha Date: Wed Oct 2 14:04:54 2019 -0400 drm/amd/display: add REFCYC_PER_TRIP_TO_MEMORY programming it allows us to do urgent latency programming Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 2b00bb627f62ed1c6180f49f7883789bc5e1b33f Author: Arnaldo Carvalho de Melo Date: Thu Oct 17 16:37:18 2019 -0300 perf trace: Introduce 'struct evsel__trace' for evsel->priv needs For syscalls we need to cache the 'syscall_id' and 'ret' field offsets but as well have a pointer to the syscall_fmt_arg array for the fields, so that we can expand strings in filter expressions, so introduce a 'struct evsel_trace' to have in evsel->priv that allows for that. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-hx8ukasuws5sz6rsar73cocv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 91c665bdc1d54f19506bd106578ad7cb945c55e2 Author: Bhawanpreet Lakha Date: Wed Oct 2 11:55:12 2019 -0400 drm/amd/display: create dcn21_link_encoder files [Why] DCN20 and DCN21 have different phy programming sequences. [How] Create a separate dcn21_link_encoder for Renoir Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit c0fb59a4c3f5d42776e9823579bd94f6ddec0359 Author: Bhawanpreet Lakha Date: Wed Oct 2 11:54:56 2019 -0400 drm/amd/display: Add renoir hw_seq This change adds renoir hw_seq, needed to do renoir specific hw programing Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 5f687972ff8b7d2f3fe305069839eaeb095c73f7 Author: Bhawanpreet Lakha Date: Wed Oct 2 11:51:20 2019 -0400 drm/amd/display: Add DCN_BASE regs Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit ce6095267d86fc907c523cc2e2549ec51f3615c2 Author: Bhawanpreet Lakha Date: Wed Oct 2 11:50:15 2019 -0400 drm/amd/display: Add DP_DPHY_INTERNAL_CTR regs Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 8b913df50f56a26b9e336becdd0af9d5ce3831cd Author: Arnaldo Carvalho de Melo Date: Thu Oct 17 10:39:46 2019 -0300 perf trace: Hide evsel->access further, simplify code Next step will be to have a 'struct evsel_trace' to allow for handling the syscalls tracepoints via the strace-like code while reusing parts of that code with the other tracepoints, where we don't have things like the 'syscall_nr' or 'ret' ((raw_)?syscalls:sys_{enter,exit}(_SYSCALL)?) args that we want to cache offsets and have been using evsel->priv for that, while for the other tracepoints we'll have just an array of 'struct syscall_arg_fmt' (i.e. ->scnprint() for number->string and ->strtoul() string->number conversions and other state those functions need). Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-fre21jbyoqxmmquxcho7oa0x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fecd990720306f93151747771f16bca71bb29c33 Author: Arnaldo Carvalho de Melo Date: Thu Oct 17 08:15:11 2019 -0300 perf trace: Introduce accessors to trace specific evsel->priv We're using evsel->priv in syscalls:sys_{enter,exit}_SYSCALL and in raw_syscalls:sys_{enter,exit} to cache the offset of the common fields, the multiplexor id/syscall_id in the sys_enter case and syscall_id + ret for sys_exit. And for the rest of the tracepoints we use it to have a syscall_arg_fmt array to have scnprintf/strtoul for tracepoint args. So we better clearly mark them with accessors so that we can move to having a 'struct evsel_trace' struct for all 'perf trace' specific evsel->priv usage. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-dcoyxfslg7atz821tz9aupjh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3cdc8db91e0e73f94fa6ce3bf966b0152ccf0107 Author: Arnaldo Carvalho de Melo Date: Thu Oct 17 16:41:34 2019 -0300 perf trace: Show error message when not finding a field used in a filter expression It was there, but as pr_debug(), make it pr_err() so that we can see it without -v: # trace -e syscalls:*lseek --filter="whenc==SET" sleep 1 "whenc" not found in "syscalls:sys_enter_lseek", can't set filter "whenc==SET" # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ly4rgm1bto8uwc2itpaixjob@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9c1a91f6f5db1482b989303c87e7b49f9bf844a7 Author: Roman Li Date: Tue Oct 8 17:35:48 2019 -0400 drm/amd/display: disable ext aux support for vega [Why] Earlier changes to support configurable aux timeout caused dc init failure on vega due to missing reg defs. Needs to be disabled until implemented for vega. [How] Set extended aux timeout cap for vega to false. Signed-off-by: Roman Li Reviewed-By: abdoulaye berthe Signed-off-by: Alex Deucher commit f6040a439f9b6d9f90b7d4ef56762f412dfd1f9d Author: abdoulaye berthe Date: Thu Jul 18 15:58:25 2019 -0400 drm/amd/display: configurable aux timeout support [Description] 1-add configurable timeout support to aux engine. 2-add timeout support field to dc_caps 3-add reg_key to override extended timeout support Signed-off-by: abdoulaye berthe Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 8276dd871fd4240037cffb3904eda2dfe028fd85 Author: abdoulaye berthe Date: Tue Aug 13 09:24:10 2019 -0400 drm/amd/display: update register field access mechanism 1-add timeout length and multiplier fields to aux_control1 register 2-update access mechanism from macro constructed name to uint32_t defined addresses. 3-define registers and field per asic family Signed-off-by: abdoulaye berthe Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 64c5cc93677c115fdb4c3860a54466c836a1591b Author: chen gong Date: Wed Oct 16 18:04:02 2019 +0800 drm/amdgpu: No need to check gfxoff status after enable gfxoff feature smu_send_smc_msg(smu, SMU_MSG_AllowGfxOff) Just turn on a switch. As to when GPU get into "GFXoff" will be up to drawing load. So we can not sure which state GPU should be in after enable gfxoff feature. Signed-off-by: chen gong Acked-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 5441dd0e2caadc6038a8c1ccd16cf3c9cdb62db1 Author: Kenneth Feng Date: Wed Oct 16 16:20:38 2019 +0800 drm/amd/powerplay: bug fix for memory clock request from display In some cases, display fixes memory clock frequency to a high value rather than the natural memory clock switching. When we comes back from s3 resume, the request from display is not reset, this causes the bug which makes the memory clock goes into a low value. Then due to the insuffcient memory clock, the screen flicks. Signed-off-by: Kenneth Feng Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher commit f839110157aed1396506dfab715f523344ab9724 Author: Prike Liang Date: Tue Oct 15 17:11:49 2019 +0800 drm/amdgpu: fix S3 failed as RLC safe mode entry stucked in polloing gfx acq Fix gfx cgpg setting sequence for RLC deadlock at safe mode entry in polling gfx response. The patch can fix VCN IB test failed and DAL get dispaly count failed issue. Signed-off-by: Prike Liang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit c8486eef2c095f2f986e4968b27b7a2043afc0e3 Author: Prike Liang Date: Tue Oct 15 17:24:25 2019 +0800 drm/amdgpu: add GFX_PIPELINE capacity check for updating gfx cgpg Before disable gfx pipeline power gating need check the flag AMD_PG_SUPPORT_GFX_PIPELINE. Signed-off-by: Prike Liang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 9d8b738bb9f8008848b62f58671de3537a6d0734 Author: Bjorn Helgaas Date: Thu Oct 3 16:28:26 2019 -0500 PCI: Remove useless comments and tidy others Remove useless comments and tidy others for better readability. Whitespace changes only. Signed-off-by: Bjorn Helgaas commit eceb86028d23f19d88202153de13201b92300b27 Author: Bjorn Helgaas Date: Tue Oct 1 17:51:59 2019 -0500 PCI: Remove unnecessary includes Remove unnecessary includes. Signed-off-by: Bjorn Helgaas commit 7cabf9251a2f38db1ad1e49be2738955ab61d381 Author: David Lechner Date: Sun Sep 1 17:58:22 2019 -0500 bus/ti-pwmss: move TI PWMSS driver from PWM to bus subsystem The TI PWMSS driver is a simple bus driver for providing power power management for the PWM peripherals on TI AM33xx SoCs, namely eCAP, eHRPWM and eQEP. The eQEP is a counter rather than a PWM, so it does not make sense to have the bus driver in the PWM subsystem since the PWMSS is not exclusive to PWM devices. Signed-off-by: David Lechner Signed-off-by: Jonathan Cameron commit e9768bfe875f1c54d70d5a512e734993996513a5 Author: Chris Wilson Date: Wed Oct 16 13:52:36 2019 +0100 drm/i915/selftests: Teach requests to use all available engines The request selftests straddle the boundary between checking the driver and the hardware. They are subject to the quirks of the underlying HW, but operate on top of the backend abstractions. The tests focus on the scheduler elements and so should check for interactions of the scheduler across all exposed engines. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191016125236.17960-1-chris@chris-wilson.co.uk commit 7684e2c4384d5d1f884b01ab8bff2369e4db0bff Author: Dave Chinner Date: Thu Oct 17 13:12:01 2019 -0700 iomap: iomap that extends beyond EOF should be marked dirty When doing a direct IO that spans the current EOF, and there are written blocks beyond EOF that extend beyond the current write, the only metadata update that needs to be done is a file size extension. However, we don't mark such iomaps as IOMAP_F_DIRTY to indicate that there is IO completion metadata updates required, and hence we may fail to correctly sync file size extensions made in IO completion when O_DSYNC writes are being used and the hardware supports FUA. Hence when setting IOMAP_F_DIRTY, we need to also take into account whether the iomap spans the current EOF. If it does, then we need to mark it dirty so that IO completion will call generic_write_sync() to flush the inode size update to stable storage correctly. Fixes: 3460cac1ca76 ("iomap: Use FUA for pure data O_DSYNC DIO writes") Signed-off-by: Dave Chinner Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: removed the ext4 part; they'll handle it separately] Signed-off-by: Darrick J. Wong commit 45b268543a8d720e929c71dff7302eed5f7dfed4 Author: Yishai Hadas Date: Tue Oct 15 10:54:18 2019 +0300 RDMA/uapi: Fix and re-organize the usage of rdma_driver_id Fix 'enum rdma_driver_id' to preserve other driver values before that RDMA_DRIVER_CXGB3 was deleted. As this value is UAPI we can't affect other values as of a deletion of one driver id. Fixes: 30e0f6cf5acb ("RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel") Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20191015075419.18185-2-leon@kernel.org Signed-off-by: Doug Ledford commit d9496f3ecfe4823c1e12aecbcc29220147fa012c Author: Ilias Apalodimas Date: Wed Oct 16 14:40:32 2019 +0300 net: netsec: Correct dma sync for XDP_TX frames bpf_xdp_adjust_head() can change the frame boundaries. Account for the potential shift properly by calculating the new offset before syncing the buffer to the device for XDP_TX Fixes: ba2b232108d3 ("net: netsec: add XDP support") Signed-off-by: Ilias Apalodimas Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4eab421bc339e719af1b4b9560dd0cb97ce29b73 Author: Marc Kleine-Budde Date: Wed Oct 16 10:28:33 2019 +0200 net: sched: Avoid using yield() in a busy waiting loop With threaded interrupts enabled, the interrupt thread runs as SCHED_RR with priority 50. If a user application with a higher priority preempts the interrupt thread and tries to shutdown the network interface then it will loop forever. The kernel will spin in the loop waiting for the device to become idle and the scheduler will never consider the interrupt thread because its priority is lower. Avoid the problem by sleeping for a jiffy giving other tasks, including the interrupt thread, a chance to run and make progress. In the original thread it has been suggested to use wait_event() and properly waiting for the state to occur. DaveM explained that this would require to add expensive checks in the fast paths of packet processing. Link: https://lkml.kernel.org/r/1393976987-23555-1-git-send-email-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde [bigeasy: Rewrite commit message, add comment, use schedule_timeout_uninterruptible()] Signed-off-by: Sebastian Andrzej Siewior Acked-by: Cong Wang Signed-off-by: David S. Miller commit 004e8dce9c5595697951f7cd0e9f66b35c92265e Author: Masami Hiramatsu Date: Fri Sep 6 22:14:20 2019 +0900 x86: kprobes: Prohibit probing on instruction which has emulate prefix Prohibit probing on instruction which has XEN_EMULATE_PREFIX or KVM's emulate prefix. Since that prefix is a marker for Xen and KVM, if we modify the marker by kprobe's int3, that doesn't work as expected. Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: x86@kernel.org Cc: Boris Ostrovsky Cc: Ingo Molnar Cc: Stefano Stabellini Cc: Andrew Cooper Cc: Borislav Petkov Cc: xen-devel@lists.xenproject.org Cc: Randy Dunlap Cc: Josh Poimboeuf Link: https://lkml.kernel.org/r/156777566048.25081.6296162369492175325.stgit@devnote2 commit 4d65adfcd1196818659d3bd9b42dccab291e1751 Author: Masami Hiramatsu Date: Fri Sep 6 22:14:10 2019 +0900 x86: xen: insn: Decode Xen and KVM emulate-prefix signature Decode Xen and KVM's emulate-prefix signature by x86 insn decoder. It is called "prefix" but actually not x86 instruction prefix, so this adds insn.emulate_prefix_size field instead of reusing insn.prefixes. If x86 decoder finds a special sequence of instructions of XEN_EMULATE_PREFIX and 'ud2a; .ascii "kvm"', it just counts the length, set insn.emulate_prefix_size and fold it with the next instruction. In other words, the signature and the next instruction is treated as a single instruction. Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Cc: Juergen Gross Cc: x86@kernel.org Cc: Boris Ostrovsky Cc: Ingo Molnar Cc: Stefano Stabellini Cc: Andrew Cooper Cc: Borislav Petkov Cc: xen-devel@lists.xenproject.org Cc: Randy Dunlap Link: https://lkml.kernel.org/r/156777564986.25081.4964537658500952557.stgit@devnote2 commit b3dc0695fa40c3b280230fb6fb7fb7a94ce28bf4 Author: Masami Hiramatsu Date: Fri Sep 6 22:13:59 2019 +0900 x86: xen: kvm: Gather the definition of emulate prefixes Gather the emulate prefixes, which forcibly make the following instruction emulated on virtualization, in one place. Suggested-by: Peter Zijlstra Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: x86@kernel.org Cc: Ingo Molnar Cc: Boris Ostrovsky Cc: Andrew Cooper Cc: Stefano Stabellini Cc: Borislav Petkov Cc: xen-devel@lists.xenproject.org Cc: Randy Dunlap Cc: Josh Poimboeuf Link: https://lkml.kernel.org/r/156777563917.25081.7286628561790289995.stgit@devnote2 commit f7919fd943abf0c77aed4441ea9897a323d132f5 Author: Masami Hiramatsu Date: Fri Sep 6 22:13:48 2019 +0900 x86/asm: Allow to pass macros to __ASM_FORM() Use __stringify() at __ASM_FORM() so that user can pass code including macros to __ASM_FORM(). Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Cc: Juergen Gross Cc: x86@kernel.org Cc: Boris Ostrovsky Cc: Ingo Molnar Cc: Stefano Stabellini Cc: Andrew Cooper Cc: Borislav Petkov Cc: xen-devel@lists.xenproject.org Cc: Randy Dunlap Cc: Josh Poimboeuf Link: https://lkml.kernel.org/r/156777562873.25081.2288083344657460959.stgit@devnote2 commit d7e78706e43107fa269fe34b1a69e653f5ec9f2c Author: Yunfeng Ye Date: Mon Oct 14 16:15:57 2019 +0800 perf/ring_buffer: Matching the memory allocate and free, in rb_alloc() Currently perf_mmap_alloc_page() is used to allocate memory in rb_alloc(), but using free_page() to free memory in the failure path. It's better to use perf_mmap_free_page() instead. Signed-off-by: Yunfeng Ye Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Cc: Cc: Cc: Cc: Link: https://lkml.kernel.org/r/575c7e8c-90c7-4e3a-b41d-f894d8cdbd7f@huawei.com commit 8a9f91c51ea72b126864e0db616b1bac12261200 Author: Yunfeng Ye Date: Mon Oct 14 16:14:59 2019 +0800 perf/ring_buffer: Modify the parameter type of perf_mmap_free_page() In perf_mmap_free_page(), the unsigned long type is converted to the pointer type, but where the call is made, the pointer type is converted to the unsigned long type. There is no need to do these operations. Modify the parameter type of perf_mmap_free_page() to pointer type. Signed-off-by: Yunfeng Ye Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Cc: Cc: Cc: Cc: Link: https://lkml.kernel.org/r/e6ae3f0c-d04c-50f9-544a-aee3b30330cd@huawei.com commit da97e18458fb42d7c00fac5fd1c56a3896ec666e Author: Joel Fernandes (Google) Date: Mon Oct 14 13:03:08 2019 -0400 perf_event: Add support for LSM and SELinux checks In current mainline, the degree of access to perf_event_open(2) system call depends on the perf_event_paranoid sysctl. This has a number of limitations: 1. The sysctl is only a single value. Many types of accesses are controlled based on the single value thus making the control very limited and coarse grained. 2. The sysctl is global, so if the sysctl is changed, then that means all processes get access to perf_event_open(2) opening the door to security issues. This patch adds LSM and SELinux access checking which will be used in Android to access perf_event_open(2) for the purposes of attaching BPF programs to tracepoints, perf profiling and other operations from userspace. These operations are intended for production systems. 5 new LSM hooks are added: 1. perf_event_open: This controls access during the perf_event_open(2) syscall itself. The hook is called from all the places that the perf_event_paranoid sysctl is checked to keep it consistent with the systctl. The hook gets passed a 'type' argument which controls CPU, kernel and tracepoint accesses (in this context, CPU, kernel and tracepoint have the same semantics as the perf_event_paranoid sysctl). Additionally, I added an 'open' type which is similar to perf_event_paranoid sysctl == 3 patch carried in Android and several other distros but was rejected in mainline [1] in 2016. 2. perf_event_alloc: This allocates a new security object for the event which stores the current SID within the event. It will be useful when the perf event's FD is passed through IPC to another process which may try to read the FD. Appropriate security checks will limit access. 3. perf_event_free: Called when the event is closed. 4. perf_event_read: Called from the read(2) and mmap(2) syscalls for the event. 5. perf_event_write: Called from the ioctl(2) syscalls for the event. [1] https://lwn.net/Articles/696240/ Since Peter had suggest LSM hooks in 2016 [1], I am adding his Suggested-by tag below. To use this patch, we set the perf_event_paranoid sysctl to -1 and then apply selinux checking as appropriate (default deny everything, and then add policy rules to give access to domains that need it). In the future we can remove the perf_event_paranoid sysctl altogether. Suggested-by: Peter Zijlstra Co-developed-by: Peter Zijlstra Signed-off-by: Joel Fernandes (Google) Signed-off-by: Peter Zijlstra (Intel) Acked-by: James Morris Cc: Arnaldo Carvalho de Melo Cc: rostedt@goodmis.org Cc: Yonghong Song Cc: Kees Cook Cc: Ingo Molnar Cc: Alexei Starovoitov Cc: jeffv@google.com Cc: Jiri Olsa Cc: Daniel Borkmann Cc: primiano@google.com Cc: Song Liu Cc: rsavitski@google.com Cc: Namhyung Kim Cc: Matthew Garrett Link: https://lkml.kernel.org/r/20191014170308.70668-1-joel@joelfernandes.org commit 9ae7ab20b4835dbea0e5fc6a5c70171dc354a72e Author: Valentin Schneider Date: Mon Oct 14 17:44:08 2019 +0100 sched/topology: Don't set SD_BALANCE_WAKE on cpuset domain relax As pointed out in commit 182a85f8a119 ("sched: Disable wakeup balancing") SD_BALANCE_WAKE is a tad too aggressive, and is usually left unset. However, it turns out cpuset domain relaxation will unconditionally set it on domains below the relaxation level. This made sense back when SD_BALANCE_WAKE was set unconditionally, but it no longer is the case. We can improve things slightly by noticing that set_domain_attribute() is always called after sd_init(), so rather than setting flags we can rely on whatever sd_init() is doing and only clear certain flags when above the relaxation level. While at it, slightly clean up the function and flip the relax level check to be more human readable. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Cc: mingo@kernel.org Cc: vincent.guittot@linaro.org Cc: juri.lelli@redhat.com Cc: seto.hidetoshi@jp.fujitsu.com Cc: qperret@google.com Cc: Dietmar.Eggemann@arm.com Cc: morten.rasmussen@arm.com Link: https://lkml.kernel.org/r/20191014164408.32596-1-valentin.schneider@arm.com commit ce753e66dcc37e19572a87f70585ec6537dede81 Author: YueHaibing Date: Tue Oct 15 19:47:36 2019 +0800 net/rds: Remove unnecessary null check Null check before dma_pool_destroy is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 47a92ae074c3d166fa6476d1dfe581bc0356352e Merge: 8d285a3b2e83 cb79a4e1b80b Author: Alexei Starovoitov Date: Thu Oct 17 12:15:09 2019 -0700 Merge branch 'cleanup-selftests-bpf-makefile' Andrii Nakryiko says: ==================== This patch set extensively revamps selftests/bpf's Makefile to generalize test runner concept and apply it uniformly to test_maps and test_progs test runners, along with test_progs' few build "flavors", exercising various ways to build BPF programs. As we do that, we fix dependencies between various phases of test runners, and simplify some one-off rules and dependencies currently present in Makefile. test_progs' flavors are now built into root $(OUTPUT) directory and can be run without any extra steps right from there. E.g., test_progs-alu32 is built and is supposed to be run from $(OUTPUT). It will cd into alu32/ subdirectory to load correct set of BPF object files (which are different from the ones built for test_progs). Outline: - patch #1 teaches test_progs about flavor sub-directories; - patch #2 fixes one of CO-RE tests to not depend strictly on process name; - patch #3 changes test_maps's usage of map_tests/tests.h to be the same as test_progs' one; - patch #4 adds convenient short `make test_progs`-like targets to build only individual tests, if necessary; - patch #5 is a main patch in the series; it uses a bunch of make magic (mainly $(call) and $(eval)) to define test runner "skeleton" and apply it to 4 different test runners, lots more details in corresponding commit description; - patch #6 does a bit of post-clean up for test_queue_map and test_stack_map BPF programs; - patch #7 cleans up test_libbpf.sh/test_libbpf_open superseded by test_progs. v3->v4: - remove accidentally checked in binaries; v2->v3: - drop test_xdp.o mixed compilation mode, remove test_libbpf.sh (Alexei); v1->v2: - drop test_progs-native causing compilation failures due to __builtin_preserve_field_access, add back test_xdp.o override, which will now emit rule re-definition warning. ==================== Signed-off-by: Alexei Starovoitov commit cb79a4e1b80b191779c68b9f04f7e43c226ce076 Author: Andrii Nakryiko Date: Tue Oct 15 23:00:51 2019 -0700 selftest/bpf: Remove test_libbpf.sh and test_libbpf_open test_progs is much more sophisticated superset of tests compared to test_libbpf.sh and test_libbpf_open. Remove test_libbpf.sh and test_libbpf_open. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191016060051.2024182-8-andriin@fb.com commit 5ac93074b581984d67926d48b2c601b12b35a0f9 Author: Andrii Nakryiko Date: Tue Oct 15 23:00:50 2019 -0700 selftests/bpf: Move test_queue_stack_map.h into progs/ where it belongs test_queue_stack_map.h is used only from BPF programs. Thus it should be part of progs/ subdir. An added benefit of moving it there is that new TEST_RUNNER_DEFINE_RULES macro-rule will properly capture dependency on this header for all BPF objects and trigger re-build, if it changes. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191016060051.2024182-7-andriin@fb.com commit 74b5a5968fe8742205a86234bb99d493bcd5ecee Author: Andrii Nakryiko Date: Tue Oct 15 23:00:49 2019 -0700 selftests/bpf: Replace test_progs and test_maps w/ general rule Define test runner generation meta-rule that codifies dependencies between test runner, its tests, and its dependent BPF programs. Use that for defining test_progs and test_maps test-runners. Also additionally define 2 flavors of test_progs: - alu32, which builds BPF programs with 32-bit registers codegen; - bpf_gcc, which build BPF programs using GCC, if it supports BPF target. Overall, this is accomplished through $(eval)'ing a set of generic rules, which defines Makefile targets dynamically at runtime. See comments explaining the need for 2 $(evals), though. For each test runner we have (test_maps and test_progs, currently), and, optionally, their flavors, the logic of build process is modeled as follows (using test_progs as an example): - all BPF objects are in progs/: - BPF object's .o file is built into output directory from corresponding progs/.c file; - all BPF objects in progs/*.c depend on all progs/*.h headers; - all BPF objects depend on bpf_*.h helpers from libbpf (but not libbpf archive). There is an extra rule to trigger bpf_helper_defs.h (re-)build, if it's not present/outdated); - build recipe for BPF object can be re-defined per test runner/flavor; - test files are built from prog_tests/*.c: - all such test file objects are built on individual file basis; - currently, every single test file depends on all BPF object files; this might be improved in follow up patches to do 1-to-1 dependency, but allowing to customize this per each individual test; - each test runner definition can specify a list of extra .c and .h files to be built along test files and test runner binary; all such headers are becoming automatic dependency of each test .c file; - due to test files sometimes embedding (using .incbin assembly directive) contents of some BPF objects at compilation time, which are expected to be in CWD of compiler, compilation for test file object does cd into test runner's output directory; to support this mode all the include paths are turned into absolute paths using $(abspath) make function; - prog_tests/test.h is automatically (re-)generated with an entry for each .c file in prog_tests/; - final test runner binary is linked together from test object files and extra object files, linking together libbpf's archive as well; - it's possible to specify extra "resource" files/targets, which will be copied into test runner output directory, if it differes from Makefile-wide $(OUTPUT). This is used to ensure btf_dump test cases and urandom_read binary is put into a test runner's CWD for tests to find them in runtime. For flavored test runners, their output directory is a subdirectory of common Makefile-wide $(OUTPUT) directory with flavor name used as subdirectory name. BPF objects targets might be reused between different test runners, so extra checks are employed to not double-define them. Similarly, we have redefinition guards for output directories and test headers. test_verifier follows slightly different patterns and is simple enough to not justify generalizing TEST_RUNNER_DEFINE/TEST_RUNNER_DEFINE_RULES further to accomodate these differences. Instead, rules for test_verifier are minimized and simplified, while preserving correctness of dependencies. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191016060051.2024182-6-andriin@fb.com commit 03dcb78460c294a907eeeec1b756cfcd161d2075 Author: Andrii Nakryiko Date: Tue Oct 15 23:00:48 2019 -0700 selftests/bpf: Add simple per-test targets to Makefile Currently it's impossible to do `make test_progs` and have only test_progs be built, because all the binary targets are defined in terms of $(OUTPUT)/, and $(OUTPUT) is absolute path to current directory (or whatever gets overridden to by user). This patch adds simple re-directing targets for all test targets making it possible to do simple and nice `make test_progs` (and any other target). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191016060051.2024182-5-andriin@fb.com commit ee6c52e92dd0dc72f08d2546eca037ee9606ddb3 Author: Andrii Nakryiko Date: Tue Oct 15 23:00:47 2019 -0700 selftests/bpf: Switch test_maps to test_progs' test.h format Make test_maps use tests.h header format consistent with the one used by test_progs, to facilitate unification. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191016060051.2024182-4-andriin@fb.com commit d25c5e23552d54ebb9eea0de0d8cf9b7a7c5535c Author: Andrii Nakryiko Date: Tue Oct 15 23:00:46 2019 -0700 selftests/bpf: Make CO-RE reloc test impartial to test_progs flavor test_core_reloc_kernel test captures its own process name and validates it as part of the test. Given extra "flavors" of test_progs, this break for anything by default test_progs binary. Fix the test to cut out flavor part of the process name. Fixes: ee2eb063d330 ("selftests/bpf: Add BPF_CORE_READ and BPF_CORE_READ_STR_INTO macro tests") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191016060051.2024182-3-andriin@fb.com commit 0b6e71c398a947a335622ad52807e500e1b5fefa Author: Andrii Nakryiko Date: Tue Oct 15 23:00:45 2019 -0700 selftests/bpf: Teach test_progs to cd into subdir We are building a bunch of "flavors" of test_progs, e.g., w/ alu32 flag for Clang when building BPF object. test_progs setup is relying on having all the BPF object files and extra resources to be available in current working directory, though. But we actually build all these files into a separate sub-directory. Next set of patches establishes convention of naming "flavored" test_progs (and test runner binaries in general) as test_progs-flavor (e.g., test_progs-alu32), for each such extra flavor. This patch teaches test_progs binary to automatically detect its own extra flavor based on its argv[0], and if present, to change current directory to a flavor-specific subdirectory. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191016060051.2024182-2-andriin@fb.com commit 8d285a3b2e83796d33ec3674b25fe0bfcc647e92 Author: Jakub Sitnicki Date: Thu Oct 17 10:37:52 2019 +0200 selftests/bpf: Restore the netns after flow dissector reattach test flow_dissector_reattach test changes the netns we run in but does not restore it to the one we started in when finished. This interferes with tests that run after it. Fix it by restoring the netns when done. Fixes: f97eea1756f3 ("selftests/bpf: Check that flow dissector can be re-attached") Reported-by: Alexei Starovoitov Reported-by: Andrii Nakryiko Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191017083752.30999-1-jakub@cloudflare.com commit c2877b59c1c45bee97f1fc70df0f1527921288e3 Author: Dinh Nguyen Date: Thu Oct 17 14:08:06 2019 -0500 arm64: defconfig: enable the Cadence QSPI controller Enable the Cadence QSPI controller driver that is on the Stratix10 and Agilex platforms. Signed-off-by: Dinh Nguyen commit 0c5378f9d5003334775ea0e5e9934976aa4a1b66 Author: Lorenzo Bianconi Date: Thu Oct 17 14:28:32 2019 +0200 net: socionext: netsec: fix xdp stats accounting Increment netdev rx counters even for XDP_DROP verdict. Report even tx bytes for xdp buffers (TYPE_NETSEC_XDP_TX or TYPE_NETSEC_XDP_NDO). Moreover account pending buffer length in netsec_xdp_queue_one as it is done for skb counterpart Tested-by: Ilias Apalodimas Signed-off-by: Lorenzo Bianconi Reviewed-by: Ilias Apalodimas Signed-off-by: David S. Miller commit a8c41a68076e88d24fd7c0ac39de93654a298594 Author: Yunsheng Lin Date: Thu Oct 17 18:34:13 2019 +0800 pktgen: remove unnecessary assignment in pktgen_xmit() variable ret is not used after jumping to "unlock" label, so the assignment is redundant. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 825dbc6ff7a3a063ea91be7d94af940080b0c991 Author: Ben Dooks Date: Tue Oct 15 11:26:15 2019 +0100 percpu: add __percpu to SHIFT_PERCPU_PTR The SHIFT_PERCPU_PTR() returns a pointer used by a number of functions that expect the pointer to be __percpu annotated (sparse address space 3). Adding __percpu to this makes the following sparse warnings go away. Note, this then creates the problem the __percup is marked as noderef, which may need removing for some of the internal functions, or to remove other warnings. mm/vmstat.c:385:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:385:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:385:13: got signed char * mm/vmstat.c:385:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:385:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:385:13: got signed char * mm/vmstat.c:385:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:385:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:385:13: got signed char * mm/vmstat.c:385:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:385:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:385:13: got signed char * mm/vmstat.c:401:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:401:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:401:13: got signed char * mm/vmstat.c:401:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:401:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:401:13: got signed char * mm/vmstat.c:401:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:401:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:401:13: got signed char * mm/vmstat.c:401:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:401:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:401:13: got signed char * mm/vmstat.c:429:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:429:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:429:13: got signed char * mm/vmstat.c:429:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:429:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:429:13: got signed char * mm/vmstat.c:429:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:429:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:429:13: got signed char * mm/vmstat.c:429:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:429:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:429:13: got signed char * mm/vmstat.c:445:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:445:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:445:13: got signed char * mm/vmstat.c:445:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:445:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:445:13: got signed char * mm/vmstat.c:445:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:445:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:445:13: got signed char * mm/vmstat.c:445:13: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:445:13: expected signed char [noderef] [usertype] *__p mm/vmstat.c:445:13: got signed char * mm/vmstat.c:763:29: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:763:29: expected signed char [noderef] *__p mm/vmstat.c:763:29: got signed char * mm/vmstat.c:763:29: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:763:29: expected signed char [noderef] *__p mm/vmstat.c:763:29: got signed char * mm/vmstat.c:763:29: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:763:29: expected signed char [noderef] *__p mm/vmstat.c:763:29: got signed char * mm/vmstat.c:763:29: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:763:29: expected signed char [noderef] *__p mm/vmstat.c:763:29: got signed char * mm/vmstat.c:825:29: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:825:29: expected signed char [noderef] *__p mm/vmstat.c:825:29: got signed char * mm/vmstat.c:825:29: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:825:29: expected signed char [noderef] *__p mm/vmstat.c:825:29: got signed char * mm/vmstat.c:825:29: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:825:29: expected signed char [noderef] *__p mm/vmstat.c:825:29: got signed char * mm/vmstat.c:825:29: warning: incorrect type in initializer (different address spaces) mm/vmstat.c:825:29: expected signed char [noderef] *__p mm/vmstat.c:825:29: got signed char * Signed-off-by: Ben Dooks Signed-off-by: Dennis Zhou commit 0b23e2a6ed5cb1196dae7d34c5910193d86244a9 Author: Daniele Ceraolo Spurio Date: Mon Oct 14 11:36:02 2019 -0700 drm/i915/huc: improve documentation Better explain the usage of the microcontroller and what i915 is responsible of. While at it, fix the documentation for the auth function, which doesn't do any pinning anymore. v2: add a comment on HuC being optional and descrive how HuC accesses memory (Martin) v3: add extra newline for better text organization (Martin) Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Martin Peres Acked-by: Anna Karas Reviewed-by: Martin Peres Link: https://patchwork.freedesktop.org/patch/msgid/20191014183602.3643-3-daniele.ceraolospurio@intel.com commit 218151e997449717cbb70f304b7b8f9918ba6af4 Author: Daniele Ceraolo Spurio Date: Mon Oct 14 11:36:01 2019 -0700 drm/i915/guc: improve documentation Add a short description of what we expect from GuC and some minor improvements to existing documentation. Also remove a comment about a difference between GuC and HuC that is not true anymore. v2: add that the GuC is not mandatory (Martin) v3: add extra newline for better text organization (Martin) Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Matthew Brost Cc: Martin Peres Acked-by: Anna Karas Reviewed-by: Martin Peres Link: https://patchwork.freedesktop.org/patch/msgid/20191014183602.3643-2-daniele.ceraolospurio@intel.com commit 493065e24eb13cf1e974ef9fc0185d6266d16067 Author: Daniele Ceraolo Spurio Date: Mon Oct 14 11:36:00 2019 -0700 drm/i915: Add microcontrollers documentation section To better organize the information, add a microcontrollers section and move/link the GuC, HuC and DMC documentation under it. Also add a small intro. Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Acked-by: Anna Karas Reviewed-by: Martin Peres Link: https://patchwork.freedesktop.org/patch/msgid/20191014183602.3643-1-daniele.ceraolospurio@intel.com commit bec117ceede09f8ed0127a61c17fd2c9c000b1e8 Author: Christian Hewitt Date: Wed Oct 16 21:07:37 2019 +0400 arm64: dts: meson-gxbb-vega-s95: set rc-vega-s9x ir keymap Add the rc-vega-s9x keymap to the existing IR node in the device tree. Signed-off-by: Christian Hewitt Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 49284e673dae17f7defd1dd25070ec6e31253225 Author: Christian Hewitt Date: Wed Oct 16 21:07:36 2019 +0400 arm64: dts: meson-gxm-vega-s96: set rc-vega-s9x ir keymap Add an IR node to the Vega S96 dts to include the rc-vega-s9x keymap. Signed-off-by: Christian Hewitt Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 195f140318a9510f27078847796461498384c862 Author: Guillaume La Roque Date: Fri Oct 4 11:01:13 2019 +0200 arm64: dts: meson: g12b: add cooling properties Add missing #colling-cells field for G12B SoC Add cooling-map for passive and hot trip point Tested-by: Christian Hewitt Tested-by: Kevin Hilman Reviewed-by: Neil Armstrong Reviewed-by: Amit Kucheria Signed-off-by: Guillaume La Roque Signed-off-by: Kevin Hilman commit 8eef8bca1242d18616929c4ae037bdee8a58c238 Author: Guillaume La Roque Date: Fri Oct 4 11:01:12 2019 +0200 arm64: dts: meson: g12a: add cooling properties Add missing #colling-cells field for G12A SoC Add cooling-map for passive and hot trip point Tested-by: Christian Hewitt Tested-by: Kevin Hilman Reviewed-by: Neil Armstrong Reviewed-by: Amit Kucheria Signed-off-by: Guillaume La Roque Signed-off-by: Kevin Hilman commit e7251ed74ef79b80fc5e77636832be7baf1f40a6 Author: Guillaume La Roque Date: Fri Oct 4 11:01:11 2019 +0200 arm64: dts: meson: g12: Add minimal thermal zone Add minimal thermal zone for two temperature sensor One is located close to the DDR and the other one is located close to the PLLs (between the CPU and GPU) Acked-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Reviewed-by: Amit Kucheria Tested-by: Christian Hewitt Tested-by: Kevin Hilman Signed-off-by: Guillaume La Roque Signed-off-by: Kevin Hilman commit 8656783f07613ad2a4e511e417c88c544e220113 Author: Guillaume La Roque Date: Fri Oct 4 11:01:10 2019 +0200 arm64: dts: meson: g12: add temperature sensor Add cpu and ddr temperature sensors for G12 Socs Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Reviewed-by: Amit Kucheria Tested-by: Christian Hewitt Tested-by: Kevin Hilman Signed-off-by: Guillaume La Roque Signed-off-by: Kevin Hilman commit af92a9e01de424e63c42b188c2022804becb2dad Author: Jerome Brunet Date: Wed Oct 9 10:27:08 2019 +0200 arm64: dts: meson: sei610: enable audio Add and enable the audio devices on the sei610. The new FRDDR/TODDR D of the SM1 have been left out on purpose. The plaftorm has 2 possible playback interfaces and 3 possible capture interfaces. 3 pcm interfaces for each direction is enough. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit b3b81691dc68ceaa5268c998dd521d0d361df77b Author: Jerome Brunet Date: Wed Oct 9 10:27:07 2019 +0200 arm64: dts: meson: sm1: add audio devices Add the audio devices found on the SM1 SoC family. Only the spdif output and input are missing. These are not supported yet since no platform is available to them. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 1edae1ae62589f28d00da186465a003e2a7f9c6c Author: Scott Wood Date: Sat Oct 12 02:00:54 2019 -0500 x86/Kconfig: Enforce limit of 512 CPUs with MAXSMP and no CPUMASK_OFFSTACK The help text of NR_CPUS says that the maximum number of CPUs supported without CPUMASK_OFFSTACK is 512. However, NR_CPUS_RANGE_END allows this limit to be bypassed by MAXSMP even if CPUMASK_OFFSTACK is not set. This scenario can currently only happen in the RT tree, since it has "select CPUMASK_OFFSTACK if !PREEMPT_RT_FULL" in MAXSMP. However, even if we ignore the RT tree, checking for MAXSMP in addition to CPUMASK_OFFSTACK is redundant. Signed-off-by: Scott Wood Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mike Travis Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191012070054.28657-1-swood@redhat.com commit e30b38b71294849c018322d85e90ec056438fe43 Author: Qiang Yu Date: Thu Oct 10 22:01:52 2019 +0800 drm/lima: add __GFP_NOWARN flag to all dma_alloc_wc This prevent CMA printing dumy "PFNs busy" info which is caused by alloc fail re-try case. Reviewed-by: Vasily Khoruzhick Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20191010140152.17747-4-yuq825@gmail.com commit e305b8b6d1ff227779804e4695b8c5cb6864a620 Author: Qiang Yu Date: Thu Oct 10 22:01:51 2019 +0800 drm/lima: use drm_gem_(un)lock_reservations Simplify the driver code with DRM GEM helper function. v2: improve commit comment. Reviewed-by: Vasily Khoruzhick Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20191010140152.17747-3-yuq825@gmail.com commit d61dd248ddadf85b3222b3f63c3d268fcc24beb4 Author: Qiang Yu Date: Thu Oct 10 22:01:50 2019 +0800 drm/lima: use drm_gem_shmem_helpers Do not need to maintain our own shmem memory management code as drm_gem_shmem_helpers provides it. And we can also benifit from the work of others with shared code. This is also a preparation for implementing buffer madv. Reviewed-by: Vasily Khoruzhick Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20191010140152.17747-2-yuq825@gmail.com commit 0142fdc8186ea15e0bff03422ddc7d23b2e71dfc Merge: eac9153f2b58 580d656d80cf Author: Daniel Borkmann Date: Thu Oct 17 16:44:36 2019 +0200 Merge branch 'bpf-btf-trace' Alexei Starovoitov says: ==================== v2->v3: - while trying to adopt btf-based tracing in production service realized that disabling bpf_probe_read() was premature. The real tracing program needs to see much more than this type safe tracking can provide. With these patches the verifier will be able to see that skb->data is a pointer to 'u8 *', but it cannot possibly know how many bytes of it is readable. Hence bpf_probe_read() is necessary to do basic packet reading from tracing program. Some helper can be introduced to solve this particular problem, but there are other similar structures. Another issue is bitfield reading. The support for bitfields is coming to llvm. libbpf will be supporting it eventually as well, but there will be corner cases where bpf_probe_read() is necessary. The long term goal is still the same: get rid of probe_read eventually. - fixed build issue with clang reported by Nathan Chancellor. - addressed a ton of comments from Andrii. bitfields and arrays are explicitly unsupported in btf-based tracking. This will be improved in the future. Right now the verifier is more strict than necessary. In some cases it can fall back to 'scalar' instead of rejecting the program, but rejection today allows to make better decisions in the future. - adjusted testcase to demo bitfield and skb->data reading. v1->v2: - addressed feedback from Andrii and Eric. Thanks a lot for review! - added missing check at raw_tp attach time. - Andrii noticed that expected_attach_type cannot be reused. Had to introduce new field to bpf_attr. - cleaned up logging nicely by introducing bpf_log() helper. - rebased. Revolutionize bpf tracing and bpf C programming. C language allows any pointer to be typecasted to any other pointer or convert integer to a pointer. Though bpf verifier is operating at assembly level it has strict type checking for fixed number of types. Known types are defined in 'enum bpf_reg_type'. For example: PTR_TO_FLOW_KEYS is a pointer to 'struct bpf_flow_keys' PTR_TO_SOCKET is a pointer to 'struct bpf_sock', and so on. When it comes to bpf tracing there are no types to track. bpf+kprobe receives 'struct pt_regs' as input. bpf+raw_tracepoint receives raw kernel arguments as an array of u64 values. It was up to bpf program to interpret these integers. Typical tracing program looks like: int bpf_prog(struct pt_regs *ctx) { struct net_device *dev; struct sk_buff *skb; int ifindex; skb = (struct sk_buff *) ctx->di; bpf_probe_read(&dev, sizeof(dev), &skb->dev); bpf_probe_read(&ifindex, sizeof(ifindex), &dev->ifindex); } Addressing mistakes will not be caught by C compiler or by the verifier. The program above could have typecasted ctx->si to skb and page faulted on every bpf_probe_read(). bpf_probe_read() allows reading any address and suppresses page faults. Typical program has hundreds of bpf_probe_read() calls to walk kernel data structures. Not only tracing program would be slow, but there was always a risk that bpf_probe_read() would read mmio region of memory and cause unpredictable hw behavior. With introduction of Compile Once Run Everywhere technology in libbpf and in LLVM and BPF Type Format (BTF) the verifier is finally ready for the next step in program verification. Now it can use in-kernel BTF to type check bpf assembly code. Equivalent program will look like: struct trace_kfree_skb { struct sk_buff *skb; void *location; }; SEC("raw_tracepoint/kfree_skb") int trace_kfree_skb(struct trace_kfree_skb* ctx) { struct sk_buff *skb = ctx->skb; struct net_device *dev; int ifindex; __builtin_preserve_access_index(({ dev = skb->dev; ifindex = dev->ifindex; })); } These patches teach bpf verifier to recognize kfree_skb's first argument as 'struct sk_buff *' because this is what kernel C code is doing. The bpf program cannot 'cheat' and say that the first argument to kfree_skb raw_tracepoint is some other type. The verifier will catch such type mismatch between bpf program assumption of kernel code and the actual type in the kernel. Furthermore skb->dev access is type tracked as well. The verifier can see which field of skb is being read in bpf assembly. It will match offset to type. If bpf program has code: struct net_device *dev = (void *)skb->len; C compiler will not complain and generate bpf assembly code, but the verifier will recognize that integer 'len' field is being accessed at offsetof(struct sk_buff, len) and will reject further dereference of 'dev' variable because it contains integer value instead of a pointer. Such sophisticated type tracking allows calling networking bpf helpers from tracing programs. This patchset allows calling bpf_skb_event_output() that dumps skb data into perf ring buffer. It greatly improves observability. Now users can not only see packet lenth of the skb about to be freed in kfree_skb() kernel function, but can dump it to user space via perf ring buffer using bpf helper that was previously available only to TC and socket filters. See patch 10 for full example. The end result is safer and faster bpf tracing. Safer - because type safe direct load can be used most of the time instead of bpf_probe_read(). Faster - because direct loads are used to walk kernel data structures instead of bpf_probe_read() calls. Note that such loads can page fault and are supported by hidden bpf_probe_read() in interpreter and via exception table if program is JITed. ==================== Signed-off-by: Daniel Borkmann commit 580d656d80cfe616432fddd1ec35297a1454e05a Author: Alexei Starovoitov Date: Tue Oct 15 20:25:05 2019 -0700 selftests/bpf: Add kfree_skb raw_tp test Load basic cls_bpf program. Load raw_tracepoint program and attach to kfree_skb raw tracepoint. Trigger cls_bpf via prog_test_run. At the end of test_run kernel will call kfree_skb which will trigger trace_kfree_skb tracepoint. Which will call our raw_tracepoint program. Which will take that skb and will dump it into perf ring buffer. Check that user space received correct packet. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-12-ast@kernel.org commit a7658e1a4164ce2b9eb4a11aadbba38586e93bd6 Author: Alexei Starovoitov Date: Tue Oct 15 20:25:04 2019 -0700 bpf: Check types of arguments passed into helpers Introduce new helper that reuses existing skb perf_event output implementation, but can be called from raw_tracepoint programs that receive 'struct sk_buff *' as tracepoint argument or can walk other kernel data structures to skb pointer. In order to do that teach verifier to resolve true C types of bpf helpers into in-kernel BTF ids. The type of kernel pointer passed by raw tracepoint into bpf program will be tracked by the verifier all the way until it's passed into helper function. For example: kfree_skb() kernel function calls trace_kfree_skb(skb, loc); bpf programs receives that skb pointer and may eventually pass it into bpf_skb_output() bpf helper which in-kernel is implemented via bpf_skb_event_output() kernel function. Its first argument in the kernel is 'struct sk_buff *'. The verifier makes sure that types match all the way. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-11-ast@kernel.org commit 3dec541b2e632d630fe7142ed44f0b3702ef1f8c Author: Alexei Starovoitov Date: Tue Oct 15 20:25:03 2019 -0700 bpf: Add support for BTF pointers to x86 JIT Pointer to BTF object is a pointer to kernel object or NULL. Such pointers can only be used by BPF_LDX instructions. The verifier changed their opcode from LDX|MEM|size to LDX|PROBE_MEM|size to make JITing easier. The number of entries in extable is the number of BPF_LDX insns that access kernel memory via "pointer to BTF type". Only these load instructions can fault. Since x86 extable is relative it has to be allocated in the same memory region as JITed code. Allocate it prior to last pass of JITing and let the last pass populate it. Pointer to extable in bpf_prog_aux is necessary to make page fault handling fast. Page fault handling is done in two steps: 1. bpf_prog_kallsyms_find() finds BPF program that page faulted. It's done by walking rb tree. 2. then extable for given bpf program is binary searched. This process is similar to how page faulting is done for kernel modules. The exception handler skips over faulting x86 instruction and initializes destination register with zero. This mimics exact behavior of bpf_probe_read (when probe_kernel_read faults dest is zeroed). JITs for other architectures can add support in similar way. Until then they will reject unknown opcode and fallback to interpreter. Since extable should be aligned and placed near JITed code make bpf_jit_binary_alloc() return 4 byte aligned image offset, so that extable aligning formula in bpf_int_jit_compile() doesn't need to rely on internal implementation of bpf_jit_binary_alloc(). On x86 gcc defaults to 16-byte alignment for regular kernel functions due to better performance. JITed code may be aligned to 16 in the future, but it will use 4 in the meantime. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-10-ast@kernel.org commit 2a02759ef5f8a34792df22b41d5e10658fd7bbd3 Author: Alexei Starovoitov Date: Tue Oct 15 20:25:02 2019 -0700 bpf: Add support for BTF pointers to interpreter Pointer to BTF object is a pointer to kernel object or NULL. The memory access in the interpreter has to be done via probe_kernel_read to avoid page faults. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-9-ast@kernel.org commit ac4414b5ca47d16c8de3134cc1b868056c4a68ea Author: Alexei Starovoitov Date: Tue Oct 15 20:25:01 2019 -0700 bpf: Attach raw_tp program with BTF via type name BTF type id specified at program load time has all necessary information to attach that program to raw tracepoint. Use kernel type name to find raw tracepoint. Add missing CHECK_ATTR() condition. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-8-ast@kernel.org commit 9e15db66136a14cde3f35691f1d839d950118826 Author: Alexei Starovoitov Date: Tue Oct 15 20:25:00 2019 -0700 bpf: Implement accurate raw_tp context access via BTF libbpf analyzes bpf C program, searches in-kernel BTF for given type name and stores it into expected_attach_type. The kernel verifier expects this btf_id to point to something like: typedef void (*btf_trace_kfree_skb)(void *, struct sk_buff *skb, void *loc); which represents signature of raw_tracepoint "kfree_skb". Then btf_ctx_access() matches ctx+0 access in bpf program with 'skb' and 'ctx+8' access with 'loc' arguments of "kfree_skb" tracepoint. In first case it passes btf_id of 'struct sk_buff *' back to the verifier core and 'void *' in second case. Then the verifier tracks PTR_TO_BTF_ID as any other pointer type. Like PTR_TO_SOCKET points to 'struct bpf_sock', PTR_TO_TCP_SOCK points to 'struct bpf_tcp_sock', and so on. PTR_TO_BTF_ID points to in-kernel structs. If 1234 is btf_id of 'struct sk_buff' in vmlinux's BTF then PTR_TO_BTF_ID#1234 points to one of in kernel skbs. When PTR_TO_BTF_ID#1234 is dereferenced (like r2 = *(u64 *)r1 + 32) the btf_struct_access() checks which field of 'struct sk_buff' is at offset 32. Checks that size of access matches type definition of the field and continues to track the dereferenced type. If that field was a pointer to 'struct net_device' the r2's type will be PTR_TO_BTF_ID#456. Where 456 is btf_id of 'struct net_device' in vmlinux's BTF. Such verifier analysis prevents "cheating" in BPF C program. The program cannot cast arbitrary pointer to 'struct sk_buff *' and access it. C compiler would allow type cast, of course, but the verifier will notice type mismatch based on BPF assembly and in-kernel BTF. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-7-ast@kernel.org commit f75a697e091375c96c35f733a664e3557171f28b Author: Alexei Starovoitov Date: Tue Oct 15 20:24:59 2019 -0700 libbpf: Auto-detect btf_id of BTF-based raw_tracepoints It's a responsiblity of bpf program author to annotate the program with SEC("tp_btf/name") where "name" is a valid raw tracepoint. The libbpf will try to find "name" in vmlinux BTF and error out in case vmlinux BTF is not available or "name" is not found. If "name" is indeed a valid raw tracepoint then in-kernel BTF will have "btf_trace_##name" typedef that points to function prototype of that raw tracepoint. BTF description captures exact argument the kernel C code is passing into raw tracepoint. The kernel verifier will check the types while loading bpf program. libbpf keeps BTF type id in expected_attach_type, but since kernel ignores this attribute for tracing programs copy it into attach_btf_id attribute before loading. Later the kernel will use prog->attach_btf_id to select raw tracepoint during bpf_raw_tracepoint_open syscall command. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-6-ast@kernel.org commit ccfe29eb29c2edcea6552072ef00ff4117f53e83 Author: Alexei Starovoitov Date: Tue Oct 15 20:24:58 2019 -0700 bpf: Add attach_btf_id attribute to program load Add attach_btf_id attribute to prog_load command. It's similar to existing expected_attach_type attribute which is used in several cgroup based program types. Unfortunately expected_attach_type is ignored for tracing programs and cannot be reused for new purpose. Hence introduce attach_btf_id to verify bpf programs against given in-kernel BTF type id at load time. It is strictly checked to be valid for raw_tp programs only. In a later patches it will become: btf_id == 0 semantics of existing raw_tp progs. btd_id > 0 raw_tp with BTF and additional type safety. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-5-ast@kernel.org commit 8580ac9404f6240668a026785d7d8856f0530409 Author: Alexei Starovoitov Date: Tue Oct 15 20:24:57 2019 -0700 bpf: Process in-kernel BTF If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux' for further use by the verifier. In-kernel BTF is trusted just like kallsyms and other build artifacts embedded into vmlinux. Yet run this BTF image through BTF verifier to make sure that it is valid and it wasn't mangled during the build. If in-kernel BTF is incorrect it means either gcc or pahole or kernel are buggy. In such case disallow loading BPF programs. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-4-ast@kernel.org commit 7c6a469e3416fa23568c2395a3faa7dd6e376dcb Author: Alexei Starovoitov Date: Tue Oct 15 20:24:56 2019 -0700 bpf: Add typecast to bpf helpers to help BTF generation When pahole converts dwarf to btf it emits only used types. Wrap existing bpf helper functions into typedef and use it in typecast to make gcc emits this type into dwarf. Then pahole will convert it to btf. The "btf_#name_of_helper" types will be used to figure out types of arguments of bpf helpers. The generated code before and after is the same. Only dwarf and btf sections are different. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: John Fastabend Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-3-ast@kernel.org commit e8c423fb31fa8b1ef6d7cd14a168de33e7c0d702 Author: Alexei Starovoitov Date: Tue Oct 15 20:24:55 2019 -0700 bpf: Add typecast to raw_tracepoints to help BTF generation When pahole converts dwarf to btf it emits only used types. Wrap existing __bpf_trace_##template() function into btf_trace_##template typedef and use it in type cast to make gcc emits this type into dwarf. Then pahole will convert it to btf. The "btf_trace_" prefix will be used to identify BTF enabled raw tracepoints. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: John Fastabend Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191016032505.2089704-2-ast@kernel.org commit 13bec6d6822ca0349dbba14e2e8e2f80e1aacbd7 Author: Lubomir Rintel Date: Fri Oct 11 15:32:47 2019 +0200 MAINTAINERS: phy: add entry for USB PHY drivers on MMP SoCs This includes the drivers for USB2 PHYs for Marvell MMP2 and MMP3. Signed-off-by: Lubomir Rintel commit 08f13e7c3430889621dcefd1b1e52490f654a285 Author: Lubomir Rintel Date: Tue Jun 18 13:29:38 2019 +0200 phy: Add USB2 PHY driver for Marvell MMP3 SoC Add PHY driver for the USB2 PHY found on Marvell MMP3 SoC. Signed-off-by: Lubomir Rintel Acked-by: Kishon Vijay Abraham I commit 759c2837f7e4676c1cbf3ea8f3c824d0ec327255 Author: Lubomir Rintel Date: Thu Sep 26 10:28:24 2019 +0200 MAINTAINERS: mmp: add Git repository Add a tree that was set up for to stage the patches for Marvell MMP SoC support. Signed-off-by: Lubomir Rintel commit dde465457fc92901a9b042c2b81898de5bbdd946 Author: Lubomir Rintel Date: Thu Aug 8 16:41:53 2019 +0200 ARM: mmp: remove MMP3 USB PHY registers from regs-usb.h Nothing in mach-mmp/ uses them and they belong to the PHY driver. Signed-off-by: Lubomir Rintel commit 32adcaa010fa85e09296a6a606ad07348ef349ed Author: Lubomir Rintel Date: Thu Aug 8 15:47:24 2019 +0200 ARM: mmp: move cputype.h to include/linux/soc/ Let's move cputype.h away from mach-mmp/ so that the drivers outside that directory are able to tell the precise silicon revision. The MMP3 USB OTG PHY driver needs this. Signed-off-by: Lubomir Rintel commit d093bc0378f5e3542bfbbae0c0533ae68e260013 Author: Lubomir Rintel Date: Wed Jun 26 23:42:19 2019 +0200 ARM: mmp: add SMP support Used to bring up the second core on MMP3. Signed-off-by: Lubomir Rintel commit a9372a5fb20597a070d89f9402241d9012c0590f Author: Lubomir Rintel Date: Thu May 16 08:19:37 2019 +0200 ARM: mmp: add support for MMP3 SoC Similar to MMP2, which this patch is based on. Known differencies from MMP2 are: * Two PJ4B cores instead of one PJ4 * Tauros 3 L2 cache controller instead of Tauros 2 * A GIC interrupt controller optionally used instead of the MMP one * A TWD local timer * Different USB2 PHY * A USB3 SS controller * More interrupt muxes Hard to tell what else is different, because documentation is not available. Signed-off-by: Lubomir Rintel commit 199c936e37f9ed1944a74b5beb96ea3e87025fbe Author: Lubomir Rintel Date: Thu Jun 27 01:14:21 2019 +0200 ARM: mmp: define MMP_CHIPID by the means of CIU_REG() A rather trivial cosmetic improvement. Signed-off-by: Lubomir Rintel commit 1732050f48a384fbe101b8586ed42caf874816eb Author: Lubomir Rintel Date: Wed Jul 10 23:13:51 2019 +0200 ARM: mmp: DT: convert timer driver to use TIMER_OF_DECLARE This makes things just a tiny bit simpler. Signed-off-by: Lubomir Rintel commit e69fd5090dbd640a12b61feef78eb07a17cec209 Author: Lubomir Rintel Date: Thu Jun 27 00:10:25 2019 +0200 ARM: mmp: map the PGU as well The MMP2 and later includes a system control unit in this area. We'll need that to initialize the secondary core on MMP3. Signed-off-by: Lubomir Rintel commit df8bf2d8a02082aba00dfbe6b93573fb008939d0 Author: Lubomir Rintel Date: Fri Jun 7 23:28:20 2019 +0200 ARM: mmp: don't select CACHE_TAUROS2 on all ARCH_MMP MMP3 has a PJ4B with a Tauros 3 cache controller that uses CACHE_L2X0 instead, while CACHE_TAUROS2 is present on PJ4 and PJ1 (Mohawk) based platforms only. Signed-off-by: Lubomir Rintel commit b513d3ff267d5d8d518cdf4e434d77608aa6b11d Author: Lubomir Rintel Date: Thu Aug 8 22:24:57 2019 +0200 ARM: l2c: add definition for FWA in PL310 aux register The PL310 also has a "Force write allocate" bits in the Auxiliary Control Register. Signed-off-by: Lubomir Rintel commit 57f5677e535ba24b8926a7125be2ef8d7f09323c Author: Rasmus Villemoes Date: Tue Oct 15 21:07:05 2019 +0200 printf: add support for printing symbolic error names It has been suggested several times to extend vsnprintf() to be able to convert the numeric value of ENOSPC to print "ENOSPC". This implements that as a %p extension: With %pe, one can do if (IS_ERR(foo)) { pr_err("Sorry, can't do that: %pe\n", foo); return PTR_ERR(foo); } instead of what is seen in quite a few places in the kernel: if (IS_ERR(foo)) { pr_err("Sorry, can't do that: %ld\n", PTR_ERR(foo)); return PTR_ERR(foo); } If the value passed to %pe is an ERR_PTR, but the library function errname() added here doesn't know about the value, the value is simply printed in decimal. If the value passed to %pe is not an ERR_PTR, we treat it as an ordinary %p and thus print the hashed value (passing non-ERR_PTR values to %pe indicates a bug in the caller, but we can't do much about that). With my embedded hat on, and because it's not very invasive to do, I've made it possible to remove this. The errname() function and associated lookup tables take up about 3K. For most, that's probably quite acceptable and a price worth paying for more readable dmesg (once this starts getting used), while for those that disable printk() it's of very little use - I don't see a procfs/sysfs/seq_printf() file reasonably making use of this - and they clearly want to squeeze vmlinux as much as possible. Hence the default y if PRINTK. The symbols to include have been found by massaging the output of find arch include -iname 'errno*.h' | xargs grep -E 'define\s*E' In the cases where some common aliasing exists (e.g. EAGAIN=EWOULDBLOCK on all platforms, EDEADLOCK=EDEADLK on most), I've moved the more popular one (in terms of 'git grep -w Efoo | wc) to the bottom so that one takes precedence. Link: http://lkml.kernel.org/r/20191015190706.15989-1-linux@rasmusvillemoes.dk To: "Jonathan Corbet" To: linux-kernel@vger.kernel.org Cc: "Andy Shevchenko" Cc: "Andrew Morton" Cc: "Joe Perches" Cc: linux-doc@vger.kernel.org Signed-off-by: Rasmus Villemoes Acked-by: Uwe Kleine-König Reviewed-by: Petr Mladek [andy.shevchenko@gmail.com: use abs()] Acked-by: Andy Shevchenko Signed-off-by: Petr Mladek commit 5c272bee843e12e4a3a2cc38881fdf31874806e0 Author: Lubomir Rintel Date: Fri Jun 7 22:27:35 2019 +0200 ARM: dts: mmp3: Add MMP3 SoC dts file Describes most of the hardware found on Marvell MMP3, aka PXA2128, aka Armada 620. Missing bits are the LCD controller, HSIC controllers, Audio and GPU. Will be completed once bindings and drivers settle. Signed-off-by: Lubomir Rintel commit e50a0c6247be96de1ad5c1454bc929eb6eea69ff Author: Lubomir Rintel Date: Fri Jun 21 14:31:06 2019 +0200 dt-bindings: phy-mmp3-usb: Add bindings This is the PHY chip for USB OTG on MMP3 platform. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring commit f79a13fe5cb0395b5b7dd2caed463d9563fac0d0 Author: Lubomir Rintel Date: Fri Jul 12 11:45:40 2019 +0200 dt-bindings: mrvl,intc: Add a MMP3 interrupt controller Similar to MMP2 one, but has an extra range for the other core. The muxes stay the same. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring commit 95aecb71b84e01704a36cae8016e12e486374784 Author: Lubomir Rintel Date: Fri Jun 21 14:20:59 2019 +0200 dt-bindings: arm: mrvl: Document MMP3 compatible string Marvel MMP3 is a successor to MMP2, containing similar peripherals with two PJ4B cores. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring commit c3294ea3417056c85d0eaaab1b76ed8a98e29171 Author: Lubomir Rintel Date: Thu Aug 22 10:34:23 2019 +0200 dt-bindings: arm: Convert Marvell MMP board/soc bindings to json-schema Convert Marvell MMP SoC bindings to DT schema format using json-schema. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring commit 6780153607e21c497ec2a2db590492b71f211844 Author: Lubomir Rintel Date: Fri Jul 12 11:52:30 2019 +0200 dt-bindings: arm: cpu: Add Marvell MMP3 SMP enable method Add the enable method for the second PJ4B core of the Marvell MMP3 SoC. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring commit ce6eb0253cbacdf250cf894e34ca405d8c9e79da Author: Wen He Date: Tue Sep 10 15:59:12 2019 +0800 dt/bindings: display: Add optional property node define for Mali DP500 Add optional property node 'arm,malidp-arqos-value' for the Mali DP500. This property describe the ARQoS levels of DP500's QoS signaling. Signed-off-by: Wen He Reviewed-by: Rob Herring Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190910075913.17650-1-wen.he_1@nxp.com commit 1e1d0f0b1a3e3533ea4cd4021eb251e53827c70b Author: Christian Brauner Date: Thu Oct 17 12:18:32 2019 +0200 pid: use pid_has_task() in pidfd_open() Use the new pid_has_task() helper in pidfd_open(). This simplifies the code and avoids taking rcu_read_{lock,unlock}() and leads to overall nicer code. Signed-off-by: Christian Brauner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20191017101832.5985-5-christian.brauner@ubuntu.com commit 1722c14a2097634a7ba37000c0ec7d9409918b64 Author: Christian Brauner Date: Thu Oct 17 12:18:31 2019 +0200 exit: use pid_has_task() in do_wait() Replace hlist_empty() with the new pid_has_task() helper which is more idiomatic, easier to grep for, and unifies how callers perform this check. Signed-off-by: Christian Brauner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20191017101832.5985-4-christian.brauner@ubuntu.com commit 1d416a113f0c0da7a3608ffe4d44bd8e9c4859fa Author: Christian Brauner Date: Thu Oct 17 12:18:30 2019 +0200 pid: use pid_has_task() in __change_pid() Replace hlist_empty() with the new pid_has_task() helper which is more idiomatic, easier to grep for, and unifies how callers perform this check. Signed-off-by: Christian Brauner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20191017101832.5985-3-christian.brauner@ubuntu.com commit 67fc700016b75d6306b65d68edd2e5d76b2b1160 Author: Christian Brauner Date: Thu Oct 17 12:18:29 2019 +0200 test: verify fdinfo for pidfd of reaped process Test that the fdinfo field of a pidfd referring to a dead process correctly shows Pid: -1 and NSpid: -1. Cc: Christian Kellner Cc: linux-kselftest@vger.kernel.org Reviewed-by: Christian Kellner Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20191017101832.5985-2-christian.brauner@ubuntu.com commit 3d6d8da48d0b214d65ea0227d47228abc75d7c88 Author: Christian Brauner Date: Thu Oct 17 12:18:28 2019 +0200 pidfd: check pid has attached task in fdinfo Currently, when a task is dead we still print the pid it used to use in the fdinfo files of its pidfds. This doesn't make much sense since the pid may have already been reused. So verify that the task is still alive by introducing the pid_has_task() helper which will be used by other callers in follow-up patches. If the task is not alive anymore, we will print -1. This allows us to differentiate between a task not being present in a given pid namespace - in which case we already print 0 - and a task having been reaped. Note that this uses PIDTYPE_PID for the check. Technically, we could've checked PIDTYPE_TGID since pidfds currently only refer to thread-group leaders but if they won't anymore in the future then this check becomes problematic without it being immediately obvious to non-experts imho. If a thread is created via clone(CLONE_THREAD) than struct pid has a single non-empty list pid->tasks[PIDTYPE_PID] and this pid can't be used as a PIDTYPE_TGID meaning pid->tasks[PIDTYPE_TGID] will return NULL even though the thread-group leader might still be very much alive. So checking PIDTYPE_PID is fine and is easier to maintain should we ever allow pidfds to refer to threads. Cc: Jann Horn Cc: Christian Kellner Cc: linux-api@vger.kernel.org Signed-off-by: Christian Brauner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20191017101832.5985-1-christian.brauner@ubuntu.com commit 278bcb7300f61785dba63840bd2a8cf79f14554c Author: Bjorn Andersson Date: Fri Oct 4 15:27:02 2019 -0700 rpmsg: glink: Free pending deferred work on remove By just cancelling the deferred rx worker during GLINK instance teardown any pending deferred commands are leaked, so free them. Fixes: b4f8e52b89f6 ("rpmsg: Introduce Qualcomm RPM glink driver") Cc: stable@vger.kernel.org Acked-by: Chris Lew Tested-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson commit c3dadc19b7564c732598b30d637c6f275c3b77b6 Author: Bjorn Andersson Date: Fri Oct 4 15:27:01 2019 -0700 rpmsg: glink: Don't send pending rx_done during remove Attempting to transmit rx_done messages after the GLINK instance is being torn down will cause use after free and memory leaks. So cancel the intent_work and free up the pending intents. With this there are no concurrent accessors of the channel left during qcom_glink_native_remove() and there is therefor no need to hold the spinlock during this operation - which would prohibit the use of cancel_work_sync() in the release function. So remove this. Fixes: 1d2ea36eead9 ("rpmsg: glink: Add rx done command") Cc: stable@vger.kernel.org Acked-by: Chris Lew Tested-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson commit 990be747648576184a65af0b20032126cb83a046 Author: Jann Horn Date: Wed Oct 16 17:01:19 2019 +0200 binder: Use common definition of SZ_1K SZ_1K has been defined in include/linux/sizes.h since v3.6. Get rid of the duplicate definition. Signed-off-by: Jann Horn Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20191016150119.154756-2-jannh@google.com Signed-off-by: Greg Kroah-Hartman commit a3caeb8ffe5d2bbe01da66081f0ef28c26302d99 Author: Saravana Kannan Date: Fri Oct 11 12:15:21 2019 -0700 docs: driver-model: Add documentation for sync_state The sync_state() driver callback was added recently, but the documentation was missing. Adding it now. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20191011191521.179614-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 92df01e3601fe29eb3727a82705eafa6209053f5 Author: Saravana Kannan Date: Fri Oct 11 12:15:20 2019 -0700 driver: core: Improve documentation for fwnode_operations.add_links() The add_links() ops shouldn't return on the first failed device link add. It needs to continue trying to add device links to other suppliers that are available. The documentation didn't explain WHY this behavior is necessary. So, update the documentation with an example that explains why this is necessary. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20191011191521.179614-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit af1b967af5ffb94aaed5b9b3259349cc2d398fa7 Author: Saravana Kannan Date: Fri Oct 11 12:15:19 2019 -0700 of: property: Minor code formatting/style clean ups Better variable and function names. Remove "," after the sentinel in an array initialization list. Signed-off-by: Saravana Kannan Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191011191521.179614-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 35a82a3795105eb2ccdb206659343d82fefbf51f Author: Simon Horman Date: Wed Oct 16 14:02:49 2019 +0200 MAINTAINERS: Add Marek and Shimoda-san as R-Car PCIE co-maintainers At the end of the v5.3 upstream development cycle I stepped down from my role at Renesas. Pass maintainership of the R-Car PCIE to Marek and Shimoda-san. Signed-off-by: Simon Horman Signed-off-by: Lorenzo Pieralisi Acked-by: Yoshihiro Shimoda Acked-by: Marek Vasut commit ff1ae8f51c6f084dc11dcd6fba08705c2fe0bc67 Author: YueHaibing Date: Tue Oct 8 10:40:54 2019 +0800 drm/qxl: Fix randbuild error If DEM_QXL is y and DRM_TTM_HELPER is m, building fails: drivers/gpu/drm/qxl/qxl_object.o: undefined reference to `drm_gem_ttm_print_info' Select DRM_TTM_HELPER to fix this. Fixes: 78d54f1f6a33 ("drm/qxl: use drm_gem_ttm_print_info") Signed-off-by: YueHaibing Link: http://patchwork.freedesktop.org/patch/msgid/20191008024054.32368-1-yuehaibing@huawei.com Signed-off-by: Gerd Hoffmann commit 472f0aee207aa36846f13b3c9d94f068d621fde6 Author: Thomas Zimmermann Date: Thu Oct 17 13:34:27 2019 +0200 drm/cirrus: Remove obsolete header file The cirrus driver's header file is left over from a recent rewrite. Remove it. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20191017113427.2167-1-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit 02f64b2d86051d54e2a119d0b0b63158d7b14ee4 Author: Gerd Hoffmann Date: Wed Oct 16 13:52:03 2019 +0200 drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS Not needed any more because we don't have vram specific fops any more. DEFINE_DRM_GEM_FOPS() can be used instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-12-kraxel@redhat.com commit b4b1c6692767d39ea35febab3ff764af043a3d10 Author: Gerd Hoffmann Date: Wed Oct 16 13:52:02 2019 +0200 drm/vram: drop verify_access Not needed any more. Signed-off-by: Gerd Hoffmann Reviewed-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-11-kraxel@redhat.com commit 5a8b7cf93c92bb7925ee03ddb31675af6a6a805e Author: Gerd Hoffmann Date: Wed Oct 16 13:52:01 2019 +0200 drm/vram: switch vram helper to &drm_gem_object_funcs.mmap() Wire up the new drm_gem_ttm_mmap() helper function, use generic drm_gem_mmap for &fops.mmap and delete dead drm_vram_mm_file_operations_mmap(). Signed-off-by: Gerd Hoffmann Reviewed-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-10-kraxel@redhat.com commit 231927d939f073ffee24a5e7acb5b5621ba8b7c8 Author: Gerd Hoffmann Date: Wed Oct 16 13:52:00 2019 +0200 drm/ttm: add drm_gem_ttm_mmap() Add helper function to mmap ttm bo's using &drm_gem_object_funcs.mmap(). Note that with this code path access verification is done by drm_gem_mmap() (which calls drm_vma_node_is_allowed(()). The &ttm_bo_driver.verify_access() callback is is not used. v3: use ttm_bo_mmap_obj instead of ttm_bo_mmap_vma_setup Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-9-kraxel@redhat.com commit 12067e0e89aa296ce994299aef26eddd612cf3c4 Author: Gerd Hoffmann Date: Wed Oct 16 13:51:59 2019 +0200 drm/ttm: rename ttm_fbdev_mmap Rename ttm_fbdev_mmap to ttm_bo_mmap_obj. Move the vm_pgoff sanity check to amdgpu_bo_fbdev_mmap (only ttm_fbdev_mmap user in tree). The ttm_bo_mmap_obj function can now be used to map any buffer object. This allows to implement &drm_gem_object_funcs.mmap in gem ttm helpers. v3: patch added to series Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Reviewed-by: Christian König Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-8-kraxel@redhat.com commit 24e25ea6d760b2492f2ab16a9bbb098fc3379819 Author: Gerd Hoffmann Date: Wed Oct 16 13:51:58 2019 +0200 drm/ttm: factor out ttm_bo_mmap_vma_setup Factor out ttm vma setup to a new function. Reduces code duplication a bit. v2: don't change vm_flags (moved to separate patch). v4: make ttm_bo_mmap_vma_setup static. Signed-off-by: Gerd Hoffmann Reviewed-by: Christian König Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-7-kraxel@redhat.com commit eee9a2e0ad7c4c1fe5fa286dddf822116370f0c7 Author: Gerd Hoffmann Date: Wed Oct 16 13:51:57 2019 +0200 drm/shmem: drop DEFINE_DRM_GEM_SHMEM_FOPS DEFINE_DRM_GEM_SHMEM_FOPS is identical to DEFINE_DRM_GEM_FOPS now, drop it. Signed-off-by: Gerd Hoffmann Acked-by: Rob Herring Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-6-kraxel@redhat.com commit 1bf01e1e357894e69b39853ead11d12c9aa40759 Author: Gerd Hoffmann Date: Wed Oct 16 13:51:56 2019 +0200 drm/shmem: drop VM_IO VM_IO is wrong here, shmem uses normal ram not io memory. Signed-off-by: Gerd Hoffmann Reviewed-by: Steven Price Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-5-kraxel@redhat.com commit 5da932604dcb20f2e513ac57878dffd8399f6793 Author: Gerd Hoffmann Date: Wed Oct 16 13:51:55 2019 +0200 drm/shmem: drop VM_DONTDUMP Not obvious why this is needed. According to Deniel Vetter this is most likely a historic artefact dating back to the days where drm drivers exposed hardware registers as mmap'able gem objects, to avoid dumping touching those registers. shmem gem objects surely don't need that ... Signed-off-by: Gerd Hoffmann Reviewed-by: Steven Price Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-4-kraxel@redhat.com commit 0be895893607fb3447478d6e33dfb60644195a09 Author: Gerd Hoffmann Date: Wed Oct 16 13:51:54 2019 +0200 drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap Switch gem shmem helper to the new mmap() workflow, from &gem_driver.fops.mmap to &drm_gem_object_funcs.mmap. v2: Fix vm_flags and vm_page_prot handling. Signed-off-by: Gerd Hoffmann Reviewed-by: Steven Price Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-3-kraxel@redhat.com commit c40069cb7bd64903e0c0a3845ea8d3298ca57ea3 Author: Gerd Hoffmann Date: Wed Oct 16 13:51:53 2019 +0200 drm: add mmap() to drm_gem_object_funcs drm_gem_object_funcs->vm_ops alone can't handle everything which needs to be done for mmap(), tweaking vm_flags for example. So add a new mmap() callback to drm_gem_object_funcs where this code can go to. Note that the vm_ops field is not used in case the mmap callback is present, it is expected that the callback sets vma->vm_ops instead. Also setting vm_flags and vm_page_prot is the job of the new callback. so drivers have more control over these flags. drm_gem_mmap_obj() will use the new callback for object specific mmap setup. With this in place the need for driver-speific fops->mmap callbacks goes away, drm_gem_mmap can be hooked instead. drm_gem_prime_mmap() will use the new callback too to just mmap gem objects directly instead of jumping though loops to make drm_gem_object_lookup() and fops->mmap work. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-2-kraxel@redhat.com commit 3a5e7ec9031f1c6a5eccd24151fda8c4a07a318e Merge: 9816b4af4351 1e72e673b9d1 Author: Borislav Petkov Date: Thu Oct 17 13:47:12 2019 +0200 Merge branch 'edac-urgent' into edac-for-next Pick up urgent change into next queue. Signed-off-by: Borislav Petkov commit e0d9d30b73548fbfe5c024ed630169bdc9a08aee Author: Grzegorz Jaszczyk Date: Tue Jul 16 14:13:46 2019 +0200 PCI: pci-bridge-emul: Fix big-endian support Perform conversion to little-endian before every write to configuration space and convert it back to CPU endianness on reads. Additionally, initialise every multiple byte field of config space with the cpu_to_le* macro, which is required since the structure describing config space of emulated bridge assumes little-endian convention. Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Lorenzo Pieralisi commit e078723f9cccd509482fd7f30a4afb1125ca7a2a Author: Grzegorz Jaszczyk Date: Tue Jul 16 14:12:07 2019 +0200 PCI: aardvark: Fix big endian support Initialise every multiple-byte field of emulated PCI bridge config space with proper cpu_to_le* macro. This is required since the structure describing config space of emulated bridge assumes little-endian convention. Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Lorenzo Pieralisi commit d4a415dcda35d298b0048eb9c1a9bc04a5007fe0 Author: Ville Syrjälä Date: Tue Oct 15 22:05:38 2019 +0300 drm/i915: Fix MST oops due to MSA changes The MSA MISC computation now depends on the connector state, and we do it from the DDI .pre_enable() hook. All that is fine for DP SST but with MST we don't actually pass the connector state to the dig port's .pre_enable() hook which leads to an oops. Need to think more how to solve this in a cleaner fashion, but for now let's just add a NULL check to stop the oopsing. Cc: Gwan-gyeong Mun Cc: Uma Shankar Fixes: 0c06fa156006 ("drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191015190538.27539-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar Reviewed-by: Gwan-gyeong Mun commit 3c2ed9ceddf7c036c7cc6bab06fb7a555f8b137b Author: Thomas Zimmermann Date: Thu Oct 17 09:47:05 2019 +0200 drm: Add TODO item for fbdev driver conversion The DRM TODO list now contains an entry for converting fbdev drivers over to DRM. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191017074705.9140-2-tzimmermann@suse.de commit 0a9b338500730ab1c40c9303cc8df00b82e0292c Author: Norman Rasmussen Date: Sat Oct 12 17:13:12 2019 -0700 netfilter: nft_tproxy: Fix typo in IPv6 module description. Signed-off-by: Norman Rasmussen Signed-off-by: Pablo Neira Ayuso commit ca58fbe06c54795f00db79e447f94c2028d30124 Author: Florian Westphal Date: Fri Oct 11 00:30:37 2019 +0200 netfilter: add and use nf_hook_slow_list() At this time, NF_HOOK_LIST() macro will iterate the list and then calls nf_hook() for each individual skb. This makes it so the entire list is passed into the netfilter core. The advantage is that we only need to fetch the rule blob once per list instead of per-skb. NF_HOOK_LIST now only works for ipv4 and ipv6, as those are the only callers. v2: use skb_list_del_init() instead of list_del (Edward Cree) Signed-off-by: Florian Westphal Acked-by: Edward Cree Signed-off-by: Pablo Neira Ayuso commit 3aac32634172819ede79426c85e0a43ee7fcc3b3 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:32 2019 +0900 ALSA: fireface: use the same size of period for PCM substreams in AMDTP streams In current implementation, when opening a PCM substream, it's needed to check whether the opposite PCM substream runs. This is to assign effectual constraints (e.g. sampling rate) to opened PCM substream. The number of PCM substreams on AMDTP streams in domain is recorded in own structure. Usage of this count is an alternative of the above check. This is better because the count is incremented in pcm.hw_params earlier than pcm.trigger. This commit replaces the check with the substream count and the value for the size of PCM period. Unlike the other drivers in ALSA firewire stack, no MIDI substream is multiplexed into AMDTP stream. I note that Fireface AMDTP protocol has a quirk that tx stream includes blank isochronous cycle. The packet for blank cycle is equivalent to empty or NODATA packet in IEC 61883-6, thus the protocol is similar to blocking transmission method of IEC 61883-6. On the other hand, rx stream adopts non-blocking transmission method. Although the difference of transmission method between tx/rx streams precisely brings different timing for a certain amount of events due to their different calculation for data blocks per packet, it's possible to approximate enough amount of events mostly has the same timing. Actually current ALSA IEC 61883-1/6 engine uses large amount of data blocks for each hardware IRQ (=16 packets). Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-18-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 80aed7dc6d36748a8b125c12ca4abba1f2b17664 Author: Ben Dooks (Codethink) Date: Tue Oct 15 17:11:48 2019 +0100 PCI: mvebu: mvebu_pcie_map_registers __iomem fix Fix the return type of mvebu_pcie_map_registers in the error path to have __iomem on it. Fixes the following sparse warning: drivers/pci/controller/pci-mvebu.c:716:31: warning: incorrect type in return expression (different address spaces) drivers/pci/controller/pci-mvebu.c:716:31: expected void [noderef] * drivers/pci/controller/pci-mvebu.c:716:31: got void * Signed-off-by: Ben Dooks Signed-off-by: Lorenzo Pieralisi Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org commit 3fd80b2003882b6a328caff9e6b3a14bed61f27c Author: Takashi Sakamoto Date: Mon Oct 7 20:05:31 2019 +0900 ALSA: firewire-motu: use the same size of period for PCM substream in AMDTP streams In current implementation, when opening a PCM substream, it's needed to check whether the opposite PCM substream runs. This is to assign effectual constraints (e.g. sampling rate) to opened PCM substream. The number of PCM substreams and MIDI substreams on AMDTP streams in domain is recorded in own structure. Usage of this count is an alternative of the above check. This is better because the count is incremented in pcm.hw_params earlier than pcm.trigger. This idea has one issue because it's incremented for MIDI substreams as well. In current implementation, for a case that any MIDI substream run and a PCM substream is going to start, PCM application to start the PCM substream can decide hardware parameters by restart packet streaming. Just checking the substream count can brings regression. Now AMDTP domain structure has a member for the size of PCM period in PCM substream which starts AMDTP streams in domain. When the value has zero and the substream count is greater than 1, it means that any MIDI substream starts AMDTP streams in domain. Usage of the value can resolve the above issue. This commit replaces the check with the substream count and the value for the size of PCM period. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-17-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 6669a11d35bfa37f319da639594cdcbb164085f4 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:30 2019 +0900 ALSA: firewire-tascam: use the same size of period for PCM substream in AMDTP streams In current implementation, when opening a PCM substream, it's needed to check whether the opposite PCM substream runs. This is to assign effectual constraints (e.g. sampling rate) to opened PCM substream. The number of PCM substreams on AMDTP streams in domain is recorded in own structure. Usage of this count is an alternative of the above check. This is better because the count is incremented in pcm.hw_params earlier than pcm.trigger. This commit replaces the check with the substream count and the value for the size of PCM period. Unlike the other drivers in ALSA firewire stack, no MIDI substream is multiplexed into AMDTP stream. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-16-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c36f8fcc584ce8b54916e4ebdab476288b245e90 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:29 2019 +0900 ALSA: firewire-digi00x: use the same size of period for PCM substream in AMDTP streams In current implementation, when opening a PCM substream, it's needed to check whether the opposite PCM substream runs. This is to assign effectual constraints (e.g. sampling rate) to opened PCM substream. The number of PCM substreams and MIDI substreams on AMDTP streams in domain is recorded in own structure. Usage of this count is an alternative of the above check. This is better because the count is incremented in pcm.hw_params earlier than pcm.trigger. This idea has one issue because it's incremented for MIDI substreams as well. In current implementation, for a case that any MIDI substream run and a PCM substream is going to start, PCM application to start the PCM substream can decide hardware parameters by restart packet streaming. Just checking the substream count can brings regression. Now AMDTP domain structure has a member for the size of PCM period in PCM substream which starts AMDTP streams in domain. When the value has zero and the substream count is greater than 1, it means that any MIDI substream starts AMDTP streams in domain. Usage of the value can resolve the above issue. This commit replaces the check with the substream count and the value for the size of PCM period. I note that DOT AMDTP protocol has a quirk to use different transmission method of IEC 61883-6 for tx/rx streams; non-blocking in tx stream and blocking in rx stream. Although the difference of transmission method between tx/rx streams precisely brings different timing for a certain amount of events due to their different calculation for data blocks per packet, it's possible to approximate enough amount of events mostly has the same timing. Actually current ALSA IEC 61883-1/6 engine uses large amount of data blocks for each hardware IRQ (=16 packets). Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-15-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a8fb2248028d49b250e8ad686bc7362b1ee4297f Author: Takashi Sakamoto Date: Mon Oct 7 20:05:28 2019 +0900 ALSA: dice: use the same size of period for PCM substream in AMDTP streams In current implementation, when opening a PCM substream, it's needed to check whether the opposite PCM substream runs. This is to assign effectual constraints (e.g. sampling rate) to opened PCM substream. The number of PCM substreams and MIDI substreams on AMDTP streams in domain is recorded in own structure. Usage of this count is an alternative of the above check. This is better because the count is incremented in pcm.hw_params earlier than pcm.trigger. This idea has one issue because it's incremented for MIDI substreams as well. In current implementation, for a case that any MIDI substream run and a PCM substream is going to start, PCM application to start the PCM substream can decide hardware parameters by restart packet streaming. Just checking the substream count can brings regression. Now AMDTP domain structure has a member for the size of PCM period in PCM substream which starts AMDTP streams in domain. When the value has zero and the substream count is greater than 1, it means that any MIDI substream starts AMDTP streams in domain. Usage of the value can resolve the above issue. This commit replaces the check with the substream count and the value for the size of PCM period. Dice hardware has a quirk called as 'Dual Wire'. For a case of higher sampling transmission frequency, this commit performs calculations between the number of PCM frames and the number of events in AMDTP stream. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-14-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c0ede398b52654edb8b2a90be69dec2fb966f483 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:27 2019 +0900 ALSA: oxfw: use the same size of period for PCM substream in AMDTP streams In current implementation, when opening a PCM substream, it's needed to check whether the opposite PCM substream runs. This is to assign effectual constraints (e.g. sampling rate) to opened PCM substream. The number of PCM substreams and MIDI substreams on AMDTP streams in domain is recorded in own structure. Usage of this count is an alternative of the above check. This is better because the count is incremented in pcm.hw_params earlier than pcm.trigger. This idea has one issue because it's incremented for MIDI substreams as well. In current implementation, for a case that any MIDI substream run and a PCM substream is going to start, PCM application to start the PCM substream can decide hardware parameters by restart packet streaming. Just checking the substream count can brings regression. Now AMDTP domain structure has a member for the size of PCM period in PCM substream which starts AMDTP streams in domain. When the value has zero and the substream count is greater than 1, it means that any MIDI substream starts AMDTP streams in domain. Usage of the value can resolve the above issue. This commit replaces the check with the substream count and the value for the size of PCM period. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-13-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 56faf928db4f68a76274d1675c11279357576226 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:26 2019 +0900 ALSA: fireworks: use the same size of period for PCM substream in AMDTP streams In current implementation, when opening a PCM substream, it's needed to check whether the opposite PCM substream runs. This is to assign effectual constraints (e.g. sampling rate) to opened PCM substream. The number of PCM substreams and MIDI substreams on AMDTP streams in domain is recorded in own structure. Usage of this count is an alternative of the above check. This is better because the count is incremented in pcm.hw_params earlier than pcm.trigger. This idea has one issue because it's incremented for MIDI substreams as well. In current implementation, for a case that any MIDI substream run and a PCM substream is going to start, PCM application to start the PCM substream can decide hardware parameters by restart packet streaming. Just checking the substream count can brings regression. Now AMDTP domain structure has a member for the size of PCM period in PCM substream which starts AMDTP streams in domain. When the value has zero and the substream count is greater than 1, it means that any MIDI substream starts AMDTP streams in domain. Usage of the value can resolve the above issue. This commit replaces the check with the substream count and the value for the size of PCM period. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-12-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a80b29a41df097fbad6ab7106c0e6c972f1454b9 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:25 2019 +0900 ALSA: bebob: use the same size of period for PCM substream in AMDTP streams In current implementation, when opening a PCM substream, it's needed to check whether the opposite PCM substream runs. This is to assign effectual constraints (e.g. sampling rate) to opened PCM substream. The number of PCM substreams and MIDI substreams on AMDTP streams in domain is recorded in own structure. Usage of this count is an alternative of the above check. This is better because the count is incremented in pcm.hw_params earlier than pcm.trigger. This idea has one issue because it's incremented for MIDI substreams as well. In current implementation, for a case that any MIDI substream run and a PCM substream is going to start, PCM application to start the PCM substream can decide hardware parameters by restart packet streaming. Just checking the substream count can brings regression. Now AMDTP domain structure has a member for the size of PCM period in PCM substream which starts AMDTP streams in domain. When the value has zero and the substream count is greater than 1, it means that any MIDI substream starts AMDTP streams in domain. Usage of the value can resolve the above issue. This commit replaces the check with the substream count and the value for the size of PCM period. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-11-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 9d9ff58c2f45f2bf926f7ee7c70bcc01bad4c0e8 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:24 2019 +0900 ALSA: fireface: register the size of PCM period to AMDTP domain This commit is a preparation to share the size of PCM period between PCM substreams on AMDTP streams in the same domain. At this time, the size of PCM period in PCM substream which starts AMDTP streams in the same domain is recorded. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-10-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 0d39cd0e449925a6221da48835ef962cd72f330f Author: Takashi Sakamoto Date: Mon Oct 7 20:05:23 2019 +0900 ALSA: firewire-motu: register the size of PCM period to AMDTP domain This commit is a preparation to share the size of PCM period between PCM substreams on AMDTP streams in the same domain. At this time, the size of PCM period in PCM substream which starts AMDTP streams in the same domain is recorded. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 262542ed93921c2632abb8a900daecff2b28057c Author: Takashi Sakamoto Date: Mon Oct 7 20:05:22 2019 +0900 ALSA: firewire-tascam: register the size of PCM period to AMDTP domain This commit is a preparation to share the size of PCM period between PCM substreams on AMDTP streams in the same domain. At this time, the size of PCM period in PCM substream which starts AMDTP streams in the same domain is recorded. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 18b7f18ff694983c69523e8136f9a256596edd59 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:21 2019 +0900 ALSA: firewire-digi00x: register the size of PCM period to AMDTP domain This commit is a preparation to share the size of PCM period between PCM substreams on AMDTP streams in the same domain. At this time, the size of PCM period in PCM substream which starts AMDTP streams in the same domain is recorded. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 94c8101a2717a96457b474580e47142a0ef933c9 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:20 2019 +0900 ALSA: dice: register the size of PCM period to AMDTP domain This commit is a preparation to share the size of PCM period between PCM substreams on AMDTP streams in the same domain. At this time, the size of PCM period in PCM substream which starts AMDTP streams in the same domain is recorded. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 1d6a722c4a0146ac20fd0daa541a177279adcbb2 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:19 2019 +0900 ALSA: oxfw: register the size of PCM period to AMDTP domain This commit is a preparation to share the size of PCM period between PCM substreams on AMDTP streams in the same domain. At this time, the size of PCM period in PCM substream which starts AMDTP streams in the same domain is recorded. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit dd20e68a305630d7f808268d46709545c358a9b2 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:18 2019 +0900 ALSA: fireworks: register the size of PCM period to AMDTP domain This commit is a preparation to share the size of PCM period between PCM substreams on AMDTP streams in the same domain. At this time, the size of PCM period in PCM substream which starts AMDTP streams in the same domain is recorded. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 8737209fe4a251a7d1de8f77c126ce7b69d926e7 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:17 2019 +0900 ALSA: bebob: register the size of PCM period to AMDTP domain This commit is a preparation to share the size of PCM period between PCM substreams on AMDTP streams in the same domain. At this time, the size of PCM period in PCM substream which starts AMDTP streams in the same domain is recorded. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit d68c3123ba88dcd6692c90e698473d57856578e1 Author: Takashi Sakamoto Date: Mon Oct 7 20:05:16 2019 +0900 ALSA: firewire-lib: add a member into AMDTP domain for events per period In IEC 61883-6, it's called as 'event' what has presentation time represented by timestamp in CIP header. Although the ratio of the number of event against the number of data block is different depending on event data type represented by the specific field in CIP header, it's just one in the most cases supported by ALSA IEC 61883-1/6 engine. In 1394 OHCI specification, applications can schedule hardware IRQ by configuring descriptor with IRQ flag for packet against each isochronous cycle. For future commit, I use the hardware IRQ for isoc IT context to acknowledge the elapse of PCM period for both playback/capture directions on AMDTP streams in the same domain. This commit is a preparation for the above idea. This commit adds a member into AMDTP domain structure to record the number of PCM frames. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191007110532.30270-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 8990e381d1888f82ca65a31469f2327cf1f56d52 Author: Ben Dooks (Codethink) Date: Tue Oct 15 17:09:30 2019 +0100 PCI: mvebu: Make mvebu_pci_bridge_emul_ops static The mvebu_pci_bridge_emul_ops is not exported outside of the driver, so make it static to avoid the following sparse warning: drivers/pci/controller/pci-mvebu.c:557:28: warning: symbol 'mvebu_pci_bridge_emul_ops' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Lorenzo Pieralisi Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org commit a243bf39d8be133f9d6d8c8b2565830c6d3d247b Author: Ben Dooks (Codethink) Date: Tue Oct 15 17:07:02 2019 +0100 PCI: iproc-msi: Fix __iomem annotation in decode_msi_hwirq() Fix __iomem attribute on msg variable passed to readl() in the decode_msi_hwirq() function. Fixes the following sparse warning: drivers/pci/controller/pcie-iproc-msi.c:301:17: warning: incorrect type in argument 1 (different address spaces) drivers/pci/controller/pcie-iproc-msi.c:301:17: expected void const volatile [noderef] *addr drivers/pci/controller/pcie-iproc-msi.c:301:17: got unsigned int [usertype] *[assigned] msg Signed-off-by: Ben Dooks Signed-off-by: Lorenzo Pieralisi Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Bjorn Helgaas Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org commit 05488673a4d41383f9dd537f298e525e6b00fb93 Author: Tvrtko Ursulin Date: Wed Oct 16 10:38:02 2019 +0100 drm/i915/pmu: Support multiple GPUs With discrete graphics system can have both integrated and discrete GPU handled by i915. Currently we use a fixed name ("i915") when registering as the uncore PMU provider which stops working in this case. To fix this we add the PCI device name string to non-integrated devices handled by us. Integrated devices keep the legacy name preserving backward compatibility. v2: * Detect IGP and keep legacy name. (Michal) * Use PCI device name as suffix. (Michal, Chris) v3: * Constify the name. (Chris) * Use pci_domain_nr. (Chris) v4: * Fix kfree_const usage. (Chris) v5: * kfree_const does not work for modules. (Chris) * Changed is_igp helper to take i915. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: Michal Wajdeczko Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191016093802.12483-1-tvrtko.ursulin@linux.intel.com commit 2ad9d7747c10d17cc06447944fefd4c29ae11eb1 Author: Florian Westphal Date: Tue Oct 15 15:19:15 2019 +0200 netfilter: conntrack: free extension area immediately Instead of waiting for rcu grace period just free it directly. This is safe because conntrack lookup doesn't consider extensions. Other accesses happen while ct->ext can't be free'd, either because a ct refcount was taken or because the conntrack hash bucket lock or the dying list spinlock have been taken. This allows to remove __krealloc in a followup patch, netfilter was the only user. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 49ca022bccc577d323526215092040fe3b13d68b Author: Florian Westphal Date: Tue Oct 15 15:19:14 2019 +0200 netfilter: ctnetlink: don't dump ct extensions of unconfirmed conntracks When dumping the unconfirmed lists, the cpu that is processing the ct entry can reallocate ct->ext at any time. Right now accessing the extensions from another CPU is ok provided we're holding rcu read lock: extension reallocation does use rcu. Once RCU isn't used anymore this becomes unsafe, so skip extensions for the unconfirmed list. Dumping the extension area for confirmed or dying conntracks is fine: no reallocations are allowed and list iteration holds appropriate locks that prevent ct (and this ct->ext) from getting free'd. v2: fix compiler warnings due to misue of 'const' and missing return statement (kbuild robot). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8529888070f15e7c784b1c93bad358bf1d08045f Author: Eric Farman Date: Wed Oct 16 16:20:40 2019 +0200 vfio-ccw: Rework the io_fctl trace Using __field_struct for the schib is convenient, but it doesn't appear to let us filter based on any of the schib elements. Specifying the full schid or any element within it results in various errors by the parser. So, expand that out to its component elements, so we can limit the trace to a single device. While we are at it, rename this trace to the function name, so we remember what is being traced instead of an abstract reference to the function control bit of the SCSW. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20191016142040.14132-5-farman@linux.ibm.com> Acked-by: Halil Pasic Signed-off-by: Cornelia Huck commit d5950b02b79eed046dd52ec40f3485221e95146b Author: Eric Farman Date: Wed Oct 16 16:20:39 2019 +0200 vfio-ccw: Add a trace for asynchronous requests Since the asynchronous requests are typically associated with error recovery, let's add a simple trace when one of those is issued to a device. Signed-off-by: Eric Farman Message-Id: <20191016142040.14132-4-farman@linux.ibm.com> Acked-by: Halil Pasic Reviewed-by: Cornelia Huck Signed-off-by: Cornelia Huck commit 970ebeb84880906b396e53539b95fdbbf3e786a2 Author: Eric Farman Date: Wed Oct 16 16:20:38 2019 +0200 vfio-ccw: Trace the FSM jumptable It would be nice if we could track the sequence of events within vfio-ccw, based on the state of the device/FSM and our calling sequence within it. So let's add a simple trace here so we can watch the states change as things go, and allow it to be folded into the rest of the other cio traces. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20191016142040.14132-3-farman@linux.ibm.com> Acked-by: Halil Pasic Signed-off-by: Cornelia Huck commit 7af52cca6f1c4d785b652682a8f7687df1061318 Author: Eric Farman Date: Wed Oct 16 16:20:37 2019 +0200 vfio-ccw: Refactor how the traces are built Commit 3cd90214b70f ("vfio: ccw: add tracepoints for interesting error paths") added a quick trace point to determine where a channel program failed while being processed. It's a great addition, but adding more traces to vfio-ccw is more cumbersome than it needs to be. Let's refactor how this is done, so that additional traces are easier to add and can exist outside of the FSM if we ever desire. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20191016142040.14132-2-farman@linux.ibm.com> Acked-by: Halil Pasic Signed-off-by: Cornelia Huck commit 5ccbf891f073e9f4b74f30bdfa1976bbdb666214 Merge: 63f55acf7b47 176a52043ab8 Author: Pablo Neira Ayuso Date: Thu Oct 17 11:28:29 2019 +0200 Merge tag 'ipvs-next-for-v5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next Pablo Neira Ayuso says: ==================== IPVS updates for v5.5 1) Two patches to speedup ipvs netns dismantle, from Haishuang Yan. 2) Three patches to add selftest script for ipvs, also from Haishuang Yan. 3) Simplify __ip_vs_get_out_rt() from zhang kai. ==================== Signed-off-by: Pablo Neira Ayuso commit 63f55acf7b479250b7b0293333c3d94e05cb3f6f Author: Florian Westphal Date: Sun Oct 13 20:19:45 2019 +0200 netfilter: ecache: document extension area access rules Once ct->ext gets free'd via kfree() rather than kfree_rcu we can't access the extension area anymore without owning the conntrack. This is a special case: The worker is walking the pcpu dying list while holding dying list lock: Neither ct nor ct->ext can be free'd until after the walk has completed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a9314e76da966da8101eb0f9f6a8ee10675e3aee Author: Bjorn Andersson Date: Thu Oct 17 22:24:04 2019 -0700 Bluetooth: hci_qca: Split qca_power_setup() Split and rename qca_power_setup() in order to simplify each code path and to clarify that it is unrelated to qca_power_off() and qca_power_setup(). Signed-off-by: Bjorn Andersson Signed-off-by: Marcel Holtmann commit 163d42fa83c6090071698533d33babd7bbf97147 Author: Bjorn Andersson Date: Thu Oct 17 22:24:03 2019 -0700 Bluetooth: hci_qca: Use regulator bulk enable/disable With the regulator_set_load() and regulator_set_voltage() out of the enable/disable code paths the code can now use the standard regulator bulk enable/disable API. By cloning num_vregs into struct qca_power there's no need to lug around a reference to the struct qca_vreg_data, which further simplifies qca_power_setup(). Signed-off-by: Bjorn Andersson Signed-off-by: Marcel Holtmann commit f2edd66e515b9944a7e516510a54959e5004181b Author: Bjorn Andersson Date: Thu Oct 17 22:24:02 2019 -0700 Bluetooth: hci_qca: Don't vote for specific voltage Devices with specific voltage requirements should not request voltage from the driver, but instead rely on the system configuration to define appropriate voltages for each rail. This ensures that PMIC and board variations are accounted for, something that the 0.1V range in the hci_qca driver currently tries to address. But on the Lenovo Yoga C630 (with wcn3990) vddch0 is 3.1V, which means the driver will fail to set the voltage. Signed-off-by: Bjorn Andersson Signed-off-by: Marcel Holtmann commit c29ff107e0bdf2911813dbae3e5808c5912cdff6 Author: Bjorn Andersson Date: Thu Oct 17 22:24:01 2019 -0700 Bluetooth: hci_qca: Update regulator_set_load() usage Since the introduction of '5451781dadf8 ("regulator: core: Only count load for enabled consumers")' in v5.0, the requested load of a regulator consumer is only accounted for when said consumer is voted enabled. So there's no need to vote for load ever time the regulator is enabled or disabled. Signed-off-by: Bjorn Andersson Signed-off-by: Marcel Holtmann commit cde9dde6e11a5ab54b6462cd46d82878926783bc Author: Jeffrey Hugo Date: Thu Oct 17 14:29:55 2019 -0700 Bluetooth: hci_qca: Add delay for wcn3990 stability On the msm8998 mtp, the response to the baudrate change command is never received. On the Lenovo Miix 630, the response to the baudrate change command is corrupted - "Frame reassembly failed (-84)". Adding a 50ms delay before re-enabling flow to receive the baudrate change command response from the wcn3990 addesses both issues, and allows bluetooth to become functional. Signed-off-by: Jeffrey Hugo Signed-off-by: Marcel Holtmann commit ddd06c36bdb3ceed09c5fee3c8cf5ef7d1d9f6c9 Author: Ben Dooks (Codethink) Date: Wed Oct 16 10:59:55 2019 +0100 fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument The call to exportfs_encode_inode_fh() takes an pointer as the 4th argument, so replace the integer 0 with the NULL pointer. This fixes the following sparse warning: fs/notify/fdinfo.c:53:87: warning: Using plain integer as NULL pointer Link: https://lore.kernel.org/r/20191016095955.3347-1-ben.dooks@codethink.co.uk Signed-off-by: Ben Dooks Signed-off-by: Jan Kara commit 4a0b20be60bf387a1e4f989ff9953c0d1e0858aa Author: Ben Dooks Date: Tue Oct 15 14:25:18 2019 +0100 fsnotify: move declaration of fsnotify_mark_connector_cachep to fsnotify.h Move fsnotify_mark_connector_cachep to fsnotify.h to properly share it with the user in mark.c and avoid the following warning from sparse: fs/notify/mark.c:82:19: warning: symbol 'fsnotify_mark_connector_cachep' was not declared. Should it be static? Link: https://lore.kernel.org/r/20191015132518.21819-1-ben.dooks@codethink.co.uk Signed-off-by: Ben Dooks Signed-off-by: Jan Kara commit d02601c398522de953a44c11b282e89b01782959 Author: Chengguang Xu Date: Thu Oct 10 21:09:24 2019 +0800 quota: minor code cleanup for v1_format_ops It's not a functinal change, it's just for keeping consistent coding style. Link: https://lore.kernel.org/r/20191010130924.17697-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit b9a2562f4918c557f664fbba215122aca3cbb2fe Author: Amit K Bag Date: Thu Oct 17 13:52:29 2019 +0530 Bluetooth: btusb: Trigger Intel FW download error recovery Sometimes during FW data download stage, in case of an error is encountered the controller device could not be recovered. To recover from such failures send Intel hard Reset to re-trigger FW download in following error scenarios: 1. Intel Read version command error 2. Firmware download timeout 3. Failure in Intel Soft Reset for switching to operational FW 4. Boot timeout for switching to operaional FW Signed-off-by: Raghuram Hegde Signed-off-by: Chethan T N Signed-off-by: Amit K Bag Signed-off-by: Marcel Holtmann commit 9c3bafaa1fd88e4dd2dba3735a1f1abb0f2c7bb7 Author: Benjamin Berg Date: Wed Oct 9 17:54:24 2019 +0200 x86/mce: Lower throttling MCE messages' priority to warning On modern CPUs it is quite normal that the temperature limits are reached and the CPU is throttled. In fact, often the thermal design is not sufficient to cool the CPU at full load and limits can quickly be reached when a burst in load happens. This will even happen with technologies like RAPL limitting the long term power consumption of the package. Also, these limits are "softer", as Srinivas explains: "CPU temperature doesn't have to hit max(TjMax) to get these warnings. OEMs ha[ve] an ability to program a threshold where a thermal interrupt can be generated. In some systems the offset is 20C+ (Read only value). In recent systems, there is another offset on top of it which can be programmed by OS, once some agent can adjust power limits dynamically. By default this is set to low by the firmware, which I guess the prime motivation of Benjamin to submit the patch." So these messages do not usually indicate a hardware issue (e.g. insufficient cooling). Log them as warnings to avoid confusion about their severity. [ bp: Massage commit mesage. ] Signed-off-by: Benjamin Berg Signed-off-by: Borislav Petkov Reviewed-by: Hans de Goede Tested-by: Christian Kellner Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/20191009155424.249277-1-bberg@redhat.com commit eb8c101e28496888a0dcfe16ab86a1bee369e820 Author: Mattijs Korpershoek Date: Wed Oct 16 20:20:39 2019 -0700 Bluetooth: hci_core: fix init for HCI_USER_CHANNEL During the setup() stage, HCI device drivers expect the chip to acknowledge its setup() completion via vendor specific frames. If userspace opens() such HCI device in HCI_USER_CHANNEL [1] mode, the vendor specific frames are never tranmitted to the driver, as they are filtered in hci_rx_work(). Allow HCI devices which operate in HCI_USER_CHANNEL mode to receive frames if the HCI device is is HCI_INIT state. [1] https://www.spinics.net/lists/linux-bluetooth/msg37345.html Fixes: 23500189d7e0 ("Bluetooth: Introduce new HCI socket channel for user operation") Signed-off-by: Mattijs Korpershoek Signed-off-by: Marcel Holtmann commit 7fdf9b05c73b79c4d9a85b5a9905efa10ee482a6 Author: Peng Ma Date: Mon Sep 30 02:04:40 2019 +0000 dmaengine: fsl-dpaa2-qdma: Add NXP dpaa2 qDMA controller driver for Layerscape SoCs DPPA2(Data Path Acceleration Architecture 2) qDMA supports virtualized channel by allowing DMA jobs to be enqueued into different work queues. Core can initiate a DMA transaction by preparing a frame descriptor(FD) for each DMA job and enqueuing this job through a hardware portal. DPAA2 components can also prepare a FD and enqueue a DMA job through a hardware portal. The qDMA prefetches DMA jobs through DPAA2 hardware portal. It then schedules and dispatches to internal DMA hardware engines, which generate read and write requests. Both qDMA source data and destination data can be either contiguous or non-contiguous using one or more scatter/gather tables. The qDMA supports global bandwidth flow control where all DMA transactions are stalled if the bandwidth threshold has been reached. Also supported are transaction based read throttling. Add NXP dppa2 qDMA to support some of Layerscape SoCs. such as: LS1088A, LS208xA, LX2, etc. Signed-off-by: Peng Ma Link: https://lore.kernel.org/r/20190930020440.7754-2-peng.ma@nxp.com Signed-off-by: Vinod Koul commit f2835adf8afb2cea248dd10d6eb0444c34b3b51b Author: Peng Ma Date: Mon Sep 30 02:04:39 2019 +0000 dmaengine: fsl-dpaa2-qdma: Add the DPDMAI(Data Path DMA Interface) support The MC(Management Complex) exports the DPDMAI(Data Path DMA Interface) object as an interface to operate the DPAA2(Data Path Acceleration Architecture 2) qDMA Engine. The DPDMAI enables sending frame-based requests to qDMA and receiving back confirmation response on transaction completion, utilizing the DPAA2 QBMan(Queue Manager and Buffer Manager hardware) infrastructure. DPDMAI object provides up to two priorities for processing qDMA requests. The following list summarizes the DPDMAI main features and capabilities: 1. Supports up to two scheduling priorities for processing service requests. - Each DPDMAI transmit queue is mapped to one of two service priorities, allowing further prioritization in hardware between requests from different DPDMAI objects. 2. Supports up to two receive queues for incoming transaction completion confirmations. - Each DPDMAI receive queue is mapped to one of two receive priorities, allowing further prioritization between other interfaces when associating the DPDMAI receive queues to DPIO or DPCON(Data Path Concentrator) objects. 3. Supports different scheduling options for processing received packets: - Queues can be configured either in 'parked' mode (default), or attached to a DPIO object, or attached to DPCON object. 4. Allows interaction with one or more DPIO objects for dequeueing/enqueueing frame descriptors(FD) and for acquiring/releasing buffers. 5. Supports enable, disable, and reset operations. Add dpdmai to support some platforms with dpaa2 qdma engine. Signed-off-by: Peng Ma Link: https://lore.kernel.org/r/20190930020440.7754-1-peng.ma@nxp.com Signed-off-by: Vinod Koul commit fddc9fcbe69a502d84adf0bad5e2c6c80823838c Author: Wu Hao Date: Mon Oct 14 13:42:03 2019 +0800 fpga: dfl: fme: add power management support This patch adds support for power management private feature under FPGA Management Engine (FME). This private feature driver registers a hwmon for power (power1_input), thresholds information, e.g. (power1_max / crit / max_alarm / crit_alarm) and also read-only sysfs interfaces for other power management information. For configuration, user could write threshold values via above power1_max / crit sysfs interface under hwmon too. Signed-off-by: Luwei Kang Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Acked-by: Guenter Roeck Reviewed-by: Moritz Fischer Signed-off-by: Moritz Fischer commit 4284c65a9fda9d31f45209062f1b7f9bb438fc04 Author: Wu Hao Date: Mon Oct 14 13:42:02 2019 +0800 fpga: dfl: fme: add thermal management support This patch adds support to thermal management private feature for DFL FPGA Management Engine (FME). This private feature driver registers a hwmon for thermal/temperature monitoring (hwmon temp1_input). If hardware automatic throttling is supported by this hardware, then driver also exposes sysfs interfaces under hwmon for thresholds (temp1_max/ crit/ emergency), threshold alarms (temp1_max_alarm/ temp1_crit_alarm) and throttling policy (temp1_max_policy). Signed-off-by: Luwei Kang Signed-off-by: Russ Weight Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Acked-by: Guenter Roeck Reviewed-by: Moritz Fischer Signed-off-by: Moritz Fischer commit 214be7470e5fb0f3b1e228df376397c3da17638c Author: Xu Yilun Date: Mon Oct 14 13:42:01 2019 +0800 Documentation: fpga: dfl: add descriptions for thermal/power management interfaces This patch add introductions to thermal/power interfaces. They are implemented as hwmon sysfs interfaces by thermal/power private feature drivers. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Acked-by: Guenter Roeck Signed-off-by: Moritz Fischer commit eb8de23c955bd4dae47bfdac61179010d3e451d8 Author: Khaled Almahallawy Date: Tue Oct 8 15:09:05 2019 -0700 drm/i915/tgl: Enable DDI/Port G In TGL there we are missing the initialization of port G. Do the same as for other ports. Signed-off-by: Khaled Almahallawy Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191008220905.18278-1-khaled.almahallawy@intel.com commit 793ee798cc47abb41e9215d97cc38cb9e050e969 Author: Baolin Wang Date: Tue Oct 8 15:41:39 2019 +0800 clk: sprd: Change to use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Signed-off-by: Baolin Wang Link: https://lkml.kernel.org/r/841d26a2adb4bf3b4423f82a41dd3f1346413db6.1570520268.git.baolin.wang@linaro.org Signed-off-by: Stephen Boyd commit 56a57321395e13172f315036234c28cf95f943d3 Author: YueHaibing Date: Tue Oct 15 22:24:24 2019 +0800 clk: s3c2410: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191015142424.25944-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 21ec8679c2cbb874885b11f7bc1c7e4d6e673c1b Author: YueHaibing Date: Tue Oct 15 22:22:59 2019 +0800 clk: axs10x: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191015142259.17216-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 0b17159de2c3be6a6b48b40f9c2c370dbdef456f Author: YueHaibing Date: Tue Oct 15 20:47:28 2019 +0800 clk: mediatek: mt6797: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191015124728.25072-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit aa136002ae227468d75dd2f82f1a4baa3558a7d4 Author: YueHaibing Date: Tue Oct 15 20:42:26 2019 +0800 clk: mediatek: mt7629: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191015124226.25792-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit ed4e1bbb44111466fd2cdbe2ed25ce030aa4288b Author: YueHaibing Date: Tue Oct 15 20:17:35 2019 +0800 clk: mediatek: mt7622: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191015121735.26228-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 067de0a647a0018030dbe503666a793e37d9fd7f Author: YueHaibing Date: Tue Oct 15 20:14:21 2019 +0800 clk: mediatek: mt8183: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191015121421.26144-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 71ae814181749381436d6c8ca2cccba3ca899ac1 Author: YueHaibing Date: Tue Oct 15 20:10:35 2019 +0800 clk: mediatek: mt6779: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191015121035.24736-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 73c3bf70b37b429d9bc8b428128235b6e5932b24 Author: YueHaibing Date: Tue Oct 15 19:26:44 2019 +0800 clk: mediatek: mt2712: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191015112644.19816-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 1f8f3c6b35b235fea7fa72846a6b2c8af7596607 Author: YueHaibing Date: Mon Oct 14 22:44:07 2019 +0800 clk: davinci: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191014144407.23264-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 75cc0a123c90c8e3bfd8d279395d0bd558670424 Author: YueHaibing Date: Mon Oct 14 22:40:14 2019 +0800 clk: hisilicon: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191014144014.20644-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 4d3a369510dda6336534c4364910312f432c54a5 Author: YueHaibing Date: Mon Oct 14 22:36:42 2019 +0800 clk: bcm2835: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191014143642.24552-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 72c630020b243e2971d5e9ccdcb1ca492a537930 Merge: b47879aa85ed 781fa0a95424 Author: Florian Fainelli Date: Wed Oct 16 15:15:00 2019 -0700 Merge tag 'tags/bcm2835-soc-next-2019-10-15' into soc/next This pull request introduces the machine board code for the BCM2711, which is placed on the Raspberry Pi 4. Signed-off-by: Florian Fainelli commit c0c7d81e0a93101202cc74e16c9b01a64aa1eeaf Merge: 984829e2d39b 46fdee06aeef Author: Florian Fainelli Date: Wed Oct 16 15:14:25 2019 -0700 Merge tag 'tags/bcm2835-dt-next-2019-10-15' into devicetree/next This pull request introduce initial Raspberry Pi 4 support. But all the fancy stuff like GENET, PCIe, xHCI, 40 bit DMA and V3D is missing. Signed-off-by: Florian Fainelli commit b47879aa85ed8969ab5c9a03b99d5414ee3b4148 Author: Ben Dooks Date: Tue Oct 8 13:34:44 2019 +0100 ARM: bcm: fix missing __iomem in bcm_kona_smc.c Fix the following sparse warnings from a missing __iomem in __bcm_kona_smc() function by adding __iomem attriubte. arch/arm/mach-bcm/bcm_kona_smc.c:143:21: warning: incorrect type in initializer (different address spaces) arch/arm/mach-bcm/bcm_kona_smc.c:143:21: expected unsigned int [usertype] *args arch/arm/mach-bcm/bcm_kona_smc.c:143:21: got void [noderef] *static [toplevel] [assigned] bcm_smc _buffer arch/arm/mach-bcm/bcm_kona_smc.c:149:9: warning: incorrect type in argument 2 (different address spaces) arch/arm/mach-bcm/bcm_kona_smc.c:149:9: expected void volatile [noderef] *addr arch/arm/mach-bcm/bcm_kona_smc.c:149:9: got unsigned int [usertype] * arch/arm/mach-bcm/bcm_kona_smc.c:150:9: warning: incorrect type in argument 2 (different address spaces) arch/arm/mach-bcm/bcm_kona_smc.c:150:9: expected void volatile [noderef] *addr arch/arm/mach-bcm/bcm_kona_smc.c:150:9: got unsigned int [usertype] * arch/arm/mach-bcm/bcm_kona_smc.c:151:9: warning: incorrect type in argument 2 (different address spaces) arch/arm/mach-bcm/bcm_kona_smc.c:151:9: expected void volatile [noderef] *addr arch/arm/mach-bcm/bcm_kona_smc.c:151:9: got unsigned int [usertype] * arch/arm/mach-bcm/bcm_kona_smc.c:152:9: warning: incorrect type in argument 2 (different address spaces) arch/arm/mach-bcm/bcm_kona_smc.c:152:9: expected void volatile [noderef] *addr arch/arm/mach-bcm/bcm_kona_smc.c:152:9: got unsigned int [usertype] *[assigned] args Signed-off-by: Ben Dooks Acked-by: Scott Branden Signed-off-by: Florian Fainelli commit d67fa6caae51f3a5d159234272903788e3446878 Author: Ben Dooks Date: Tue Oct 8 13:34:43 2019 +0100 ARM: bcm: include local platsmp.h for bcm2836_smp_ops Include platsmp.h for the definition of bcm2836_smp_ops to fix the following warning: arch/arm/mach-bcm/platsmp.c:334:29: warning: symbol 'bcm2836_smp_ops' was not declared. Should it be static? Signed-off-by: Ben Dooks Acked-by: Scott Branden Signed-off-by: Florian Fainelli commit 727e12cde9f6d888205db027fc8bf90ece61c6b2 Author: Peng Fan Date: Tue Oct 15 07:05:53 2019 +0000 clk: imx: imx8mn: drop unused pll enum The PLL enum definition is not used, so drop it. Signed-off-by: Peng Fan Link: https://lkml.kernel.org/r/1571122989-29361-1-git-send-email-peng.fan@nxp.com Signed-off-by: Stephen Boyd commit b8cb1ef95b6e2b67f06f5254d01d5411cf2c79ae Author: YueHaibing Date: Tue Oct 15 19:51:17 2019 +0800 clk: ast2600: remove unused variable 'eclk_parent_names' drivers/clk/clk-ast2600.c:119:27: warning: eclk_parent_names defined but not used [-Wunused-const-variable=] It is never used, so can be removed. Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191015115117.23504-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit f86cf71944bc3f86d70da177354fbf13570094b1 Author: Sebastian Andrzej Siewior Date: Tue Oct 15 21:18:15 2019 +0200 drm/i810: Refer to `PREEMPTION' in comment The dependency has been changed from `PREEMPT' to `PREEMPTION'. Reflect this change in the comment. Use `PREEMPTION' in the comment. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191015191821.11479-29-bigeasy@linutronix.de commit 303e6218ecec475d5bc3e5922dec770ee5baf107 Author: Shuah Khan Date: Mon Oct 14 19:45:05 2019 -0600 selftests: Fix O= and KBUILD_OUTPUT handling for relative paths Fix O= and KBUILD_OUTPUT handling for relative paths. export KBUILD_OUTPUT=../kselftest_size make TARGETS=size kselftest-all or make O=../kselftest_size TARGETS=size kselftest-all In both of these cases, targets get built in ../kselftest_size which is a one level up from the size test directory. make[1]: Entering directory '/mnt/data/lkml/kselftest_size' make --no-builtin-rules INSTALL_HDR_PATH=$BUILD/usr \ ARCH=x86 -C ../../.. headers_install INSTALL ../kselftest_size/usr/include gcc -static -ffreestanding -nostartfiles -s get_size.c -o ../kselftest_size/size/get_size /usr/bin/ld: cannot open output file ../kselftest_size/size/get_size: No such file or directory collect2: error: ld returned 1 exit status make[3]: *** [../lib.mk:138: ../kselftest_size/size/get_size] Error 1 make[2]: *** [Makefile:143: all] Error 2 make[1]: *** [/mnt/data/lkml/linux_5.4/Makefile:1221: kselftest-all] Error 2 make[1]: Leaving directory '/mnt/data/lkml/kselftest_size' make: *** [Makefile:179: sub-make] Error 2 Use abs_objtree exported by the main Makefile. Reported-by: Tim Bird Signed-off-by: Shuah Khan Tested-by: Tim Bird Acked-by: Tim Bird Signed-off-by: Shuah Khan commit d083ce427947bbf10358e4c12bf20f288ee6b3df Author: Johan Jonker Date: Tue Oct 15 22:58:52 2019 +0200 include: dt-bindings: rockchip: mark RK_FUNC defines as deprecated The defines RK_FUNC_1, RK_FUNC_2, RK_FUNC_3 and RK_FUNC_4 are no longer used. Mark them as "deprecated" to prevent that someone start using them again. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20191015205852.4200-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 4ff75253719cfae945ffb7d0f91293b236d7c717 Author: Johan Jonker Date: Tue Oct 15 22:58:51 2019 +0200 arm64: dts: rockchip: restyle rockchip,pins on rk3399-rock-pi-4 The define RK_FUNC_1 is no longer used, so restyle the rockchip,pins definitions. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20191015205852.4200-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 4b1d7c2760d26363c497b959a81f8d055ba767c1 Author: Hariprasad Kelam Date: Tue Oct 8 03:55:51 2019 -0300 media: staging: media: Make use of devm_platform_ioremap_resource Fix below issue reported by coccicheck drivers/staging//media/omap4iss/iss.c:915:1-15: WARNING: Use devm_platform_ioremap_resource for iss -> regs [ res ] Signed-off-by: Hariprasad Kelam Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 50df3be70aa0cb0e69279b926fe1171d99f623f1 Author: Nachammai Karuppiah Date: Wed Oct 2 08:02:35 2019 -0300 media: staging: media: omap4iss: Replace NULL comparison. This patch modifies NULL comparison to fix checkpatch.pl warning. Signed-off-by: Nachammai Karuppiah Acked-by: Julia Lawall Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit ac7dabf140495a6157270354812a643486096ce5 Author: Christophe JAILLET Date: Wed Jul 24 01:56:12 2019 -0300 media: uvcvideo: Fix a typo in UVC_METATADA_BUF_SIZE It is likely that it should be UVC_METADATA_BUF_SIZE instead. Fix it and use it. Signed-off-by: Christophe JAILLET Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 8c279e9394cade640ed86ec6c6645a0e7df5e0b6 Author: Laurent Pinchart Date: Mon Jul 29 23:14:55 2019 -0300 media: uvcvideo: Fix error path in control parsing failure When parsing the UVC control descriptors fails, the error path tries to cleanup a media device that hasn't been initialised, potentially resulting in a crash. Fix this by initialising the media device before the error handling path can be reached. Fixes: 5a254d751e52 ("[media] uvcvideo: Register a v4l2_device") Reported-by: syzbot+c86454eb3af9e8a4da20@syzkaller.appspotmail.com Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit a562a8acccb3070155aad3db5ac97a80aed2a24b Author: Johan Jonker Date: Mon Oct 14 23:06:19 2019 +0200 ARM: dts: rockchip: remove some tabs and spaces from dtsi files Cleanup the Rockchip dtsi files a little bit by removing some tabs and spaces. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20191014210619.12778-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 4c371bb95cf06ded80df0e6139fdd77cee1d9a94 Author: Szymon Janc Date: Wed Oct 2 14:22:43 2019 +0200 Bluetooth: Workaround directed advertising bug in Broadcom controllers It appears that some Broadcom controllers (eg BCM20702A0) reject LE Set Advertising Parameters command if advertising intervals provided are not within range for undirected and low duty directed advertising. Workaround this bug by populating min and max intervals with 'valid' values. < HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15 Min advertising interval: 0.000 msec (0x0000) Max advertising interval: 0.000 msec (0x0000) Type: Connectable directed - ADV_DIRECT_IND (high duty cycle) (0x01) Own address type: Public (0x00) Direct address type: Random (0x01) Direct address: E2:F0:7B:9F:DC:F4 (Static) Channel map: 37, 38, 39 (0x07) Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00) > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertising Parameters (0x08|0x0006) ncmd 1 Status: Invalid HCI Command Parameters (0x12) Signed-off-by: Szymon Janc Tested-by: Sören Beye Signed-off-by: Marcel Holtmann commit 54976bc700ce8bf945b4d9bb587fd9a2aa607b93 Author: Sebastian Reichel Date: Thu Oct 3 15:41:47 2019 +0200 Bluetooth: btwilink: drop superseded driver All users of this driver have been converted to the serdev based hci_ll driver. The unused driver can be safely dropped now. Signed-off-by: Sebastian Reichel Signed-off-by: Marcel Holtmann commit 972c646f1cfed31ec9661ee7abc161b3ccf21fdd Author: Chris Wilson Date: Wed Oct 16 15:32:34 2019 +0100 drm/i915: Move swizzle_bit under i915_ggtt The HW performs swizzling as part of its fence tiling inside the Global GTT. We already do the probing of the HW settings from the GGTT setup, complete the picture by storing the information as part of the GGTT. The primary benefit is the consistency of our probe routines do not break the i915_ggtt encapsulation. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191016143234.4075-2-chris@chris-wilson.co.uk commit e9d4c9245f54cd50b9bdbdf216a9c0d6404ced7b Author: Chris Wilson Date: Wed Oct 16 15:32:33 2019 +0100 drm/i915: Store i915_ggtt as the backpointer on fence registers Now that i915_ggtt knows everything about its own paths to perform mmio, we can use that as our primary backpointer for individual fence registers. This reduces the amount of pointer dancing we have to perform on the common paths, but more importantly finishes our fence register encapsulation. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191016143234.4075-1-chris@chris-wilson.co.uk commit 727ea61a5028f8ac96f75ab34cb1b56e63fd9227 Author: Ben Dooks (Codethink) Date: Wed Oct 16 12:39:43 2019 +0100 Bluetooth: missed cpu_to_le16 conversion in hci_init4_req It looks like in hci_init4_req() the request is being initialised from cpu-endian data but the packet is specified to be little-endian. This causes an warning from sparse due to __le16 to u16 conversion. Fix this by using cpu_to_le16() on the two fields in the packet. net/bluetooth/hci_core.c:845:27: warning: incorrect type in assignment (different base types) net/bluetooth/hci_core.c:845:27: expected restricted __le16 [usertype] tx_len net/bluetooth/hci_core.c:845:27: got unsigned short [usertype] le_max_tx_len net/bluetooth/hci_core.c:846:28: warning: incorrect type in assignment (different base types) net/bluetooth/hci_core.c:846:28: expected restricted __le16 [usertype] tx_time net/bluetooth/hci_core.c:846:28: got unsigned short [usertype] le_max_tx_time Signed-off-by: Ben Dooks Signed-off-by: Marcel Holtmann commit eca0b72089695d5b19c8c2b287ac3f6fbe79197e Author: Chris Wilson Date: Wed Oct 16 10:07:49 2019 +0100 drm/i915: Do initial mocs configuration directly Now that we record the default "goldenstate" context, we do not need to emit the mocs registers at the start of each context and can simply do mmio before the first context and capture the registers as part of its default image. As a consequence, this means that we repeat the mmio after each engine reset, fixing up any platform and registers that were zapped by the reset (for those platforms with global not context-saved settings). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111723 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111645 Signed-off-by: Chris Wilson Cc: Prathap Kumar Valsan Reviewed-by: Prathap Kumar Valsan Link: https://patchwork.freedesktop.org/patch/msgid/20191016090749.7092-1-chris@chris-wilson.co.uk commit cef456cd354ef485f12d57000c455e83e416a2b6 Author: Adam Ford Date: Wed Oct 2 06:46:26 2019 -0500 Revert "Bluetooth: hci_ll: set operational frequency earlier" As nice as it would be to update firmware faster, that patch broke at least two different boards, an OMAP4+WL1285 based Motorola Droid 4, as reported by Sebasian Reichel and the Logic PD i.MX6Q + WL1837MOD. This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047. Signed-off-by: Adam Ford Acked-by: Sebastian Reichel Cc: stable@vger.kernel.org Signed-off-by: Marcel Holtmann commit 2203cbf2c8b58a1e3bef98c47531d431d11639a0 Author: Russell King Date: Tue Oct 15 11:38:39 2019 +0100 net: sfp: move fwnode parsing into sfp-bus layer Rather than parsing the sfp firmware node in phylink, parse it in the sfp-bus code, so we can re-use this code for PHYs without having to duplicate the parsing. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 9370f2d05a2a150b0aa719a3070b26d478180df3 Author: Hayes Wang Date: Wed Oct 16 11:02:42 2019 +0800 r8152: support request_firmware for RTL8153 This patch supports loading additional firmware file through request_firmware(). A firmware file may include a header followed by several blocks which have different types of firmware. Currently, the supported types are RTL_FW_END, RTL_FW_PLA, and RTL_FW_USB. The firmware is used to fix some compatible or hardware issues. For example, the device couldn't be found after rebooting several times. The supported chips are RTL_VER_04 (rtl8153a-2.fw) RTL_VER_05 (rtl8153a-3.fw) RTL_VER_06 (rtl8153a-4.fw) RTL_VER_09 (rtl8153b-2.fw) Signed-off-by: Hayes Wang Reviewed-by: Prashant Malani Signed-off-by: David S. Miller commit eac9153f2b584c702cea02c1f1a57d85aa9aea42 Author: Song Liu Date: Mon Oct 14 10:12:23 2019 -0700 bpf/stackmap: Fix deadlock with rq_lock in bpf_get_stack() bpf stackmap with build-id lookup (BPF_F_STACK_BUILD_ID) can trigger A-A deadlock on rq_lock(): rcu: INFO: rcu_sched detected stalls on CPUs/tasks: [...] Call Trace: try_to_wake_up+0x1ad/0x590 wake_up_q+0x54/0x80 rwsem_wake+0x8a/0xb0 bpf_get_stack+0x13c/0x150 bpf_prog_fbdaf42eded9fe46_on_event+0x5e3/0x1000 bpf_overflow_handler+0x60/0x100 __perf_event_overflow+0x4f/0xf0 perf_swevent_overflow+0x99/0xc0 ___perf_sw_event+0xe7/0x120 __schedule+0x47d/0x620 schedule+0x29/0x90 futex_wait_queue_me+0xb9/0x110 futex_wait+0x139/0x230 do_futex+0x2ac/0xa50 __x64_sys_futex+0x13c/0x180 do_syscall_64+0x42/0x100 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This can be reproduced by: 1. Start a multi-thread program that does parallel mmap() and malloc(); 2. taskset the program to 2 CPUs; 3. Attach bpf program to trace_sched_switch and gather stackmap with build-id, e.g. with trace.py from bcc tools: trace.py -U -p -s t:sched:sched_switch A sample reproducer is attached at the end. This could also trigger deadlock with other locks that are nested with rq_lock. Fix this by checking whether irqs are disabled. Since rq_lock and all other nested locks are irq safe, it is safe to do up_read() when irqs are not disable. If the irqs are disabled, postpone up_read() in irq_work. Fixes: 615755a77b24 ("bpf: extend stackmap to save binary_build_id+offset instead of address") Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Cc: Peter Zijlstra Cc: Alexei Starovoitov Cc: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191014171223.357174-1-songliubraving@fb.com Reproducer: ============================ 8< ============================ char *filename; void *worker(void *p) { void *ptr; int fd; char *pptr; fd = open(filename, O_RDONLY); if (fd < 0) return NULL; while (1) { struct timespec ts = {0, 1000 + rand() % 2000}; ptr = mmap(NULL, 4096 * 64, PROT_READ, MAP_PRIVATE, fd, 0); usleep(1); if (ptr == MAP_FAILED) { printf("failed to mmap\n"); break; } munmap(ptr, 4096 * 64); usleep(1); pptr = malloc(1); usleep(1); pptr[0] = 1; usleep(1); free(pptr); usleep(1); nanosleep(&ts, NULL); } close(fd); return NULL; } int main(int argc, char *argv[]) { void *ptr; int i; pthread_t threads[THREAD_COUNT]; if (argc < 2) return 0; filename = argv[1]; for (i = 0; i < THREAD_COUNT; i++) { if (pthread_create(threads + i, NULL, worker, NULL)) { fprintf(stderr, "Error creating thread\n"); return 0; } } for (i = 0; i < THREAD_COUNT; i++) pthread_join(threads[i], NULL); return 0; } ============================ 8< ============================ commit c0a21a5294a5a220e7f9d6d1256f83d2fbfc4500 Author: Marcel Holtmann Date: Fri Sep 27 08:48:58 2019 +0200 Bluetooth: btusb: Use IS_ENABLED instead of #ifdef For the different hardware support options, it is better to use IS_ENABLED check. Let the compiler do the needed optimizations. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 42d22098127d6384f789107f59caae87d7520fc4 Author: Arnd Bergmann Date: Wed Sep 18 21:59:02 2019 +0200 Bluetooth: btusb: avoid unused function warning The btusb_rtl_cmd_timeout() function is used inside of an ifdef, leading to a warning when this part is hidden from the compiler: drivers/bluetooth/btusb.c:530:13: error: unused function 'btusb_rtl_cmd_timeout' [-Werror,-Wunused-function] Use an IS_ENABLED() check instead so the compiler can see the code and then discard it silently. Fixes: d7ef0d1e3968 ("Bluetooth: btusb: Use cmd_timeout to reset Realtek device") Signed-off-by: Arnd Bergmann Signed-off-by: Marcel Holtmann commit 74ffdf22b3acf8961b6904dda350135e9aaeb445 Author: Amit K Bag Date: Fri Sep 27 08:21:54 2019 +0530 Bluetooth: btusb: print FW version after FW download After FW download there is no print to confirm the current FW version. Add print to check FW version incase of FW download. Signed-off-by: Amit K Bag Signed-off-by: Yoni Shavit Signed-off-by: Chethan Tumkur Narayan Signed-off-by: Marcel Holtmann commit d171dfb621240ee6c77cb354c0767b6dd41f83fe Author: Max Chou Date: Wed Sep 18 16:56:41 2019 +0800 Bluetooth: btrtl: Fix an issue for the incorrect error return code. It does not need the '-' for PTR_ERR(skb) because PTR_ERR(skb) will return the negative value during errors. Signed-off-by: Max Chou Signed-off-by: Marcel Holtmann commit 088fc633f2d99fee8cbe82047e01068e1c5ffab6 Author: Christophe JAILLET Date: Thu Sep 19 21:52:08 2019 +0200 Bluetooth: hci_nokia: Save a few cycles in 'nokia_enqueue()' 'skb_pad()' a few lines above already initializes the "padded" byte to 0. So there is no need to do it twice. All what is needed is to increase the len of the skb. So 'skb_put(..., 1)' is enough here. Signed-off-by: Christophe JAILLET Signed-off-by: Marcel Holtmann commit 75f7293ac88800abbae6c20c78d0046546630629 Author: YueHaibing Date: Mon Sep 23 14:05:16 2019 +0000 Bluetooth: remove set but not used variable 'smp' Fixes gcc '-Wunused-but-set-variable' warning: net/bluetooth/smp.c: In function 'smp_irk_matches': net/bluetooth/smp.c:505:18: warning: variable 'smp' set but not used [-Wunused-but-set-variable] net/bluetooth/smp.c: In function 'smp_generate_rpa': net/bluetooth/smp.c:526:18: warning: variable 'smp' set but not used [-Wunused-but-set-variable] It is not used since commit 28a220aac596 ("bluetooth: switch to AES library") Signed-off-by: YueHaibing Signed-off-by: Marcel Holtmann commit 5f65d5a6e4bddd8212a101fd566e1554cfd5e355 Author: Chris Wilson Date: Wed Oct 16 12:38:40 2019 +0100 drm/i915/selftests: Teach timelines to take intel_gt as its argument The timelines selftests are [mostly] hardware centric and so want to use the gt as its target. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191016113840.1106-1-chris@chris-wilson.co.uk commit bb3d4c9d636b3304da95facd172323f9e86e1262 Author: Chris Wilson Date: Wed Oct 16 12:49:02 2019 +0100 drm/i915/selftests: Teach workarounds to take intel_gt as its argument The workarounds selftests are hardware centric and so want to use the gt as its target. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191016114902.24388-1-chris@chris-wilson.co.uk commit 3b05c4f832fa9beeb8da4bafb3c2d115b77a8d5b Author: Chris Wilson Date: Wed Oct 16 12:53:11 2019 +0100 drm/i915/selftests: Teach guc to take intel_gt as its argument The guc selftests are hardware^W firmare centric and so want to use the gt as its target. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191016115311.12894-1-chris@chris-wilson.co.uk commit 1357fa8136ea0309890b0a8e5f7311e4f01f2b6a Author: Chris Wilson Date: Wed Oct 16 13:02:49 2019 +0100 drm/i915/selftests: Teach execlists to take intel_gt as its argument The execlists selftests are hardware centric and so want to use the gt as its target. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191016120249.22714-1-chris@chris-wilson.co.uk commit f21ab7906daf30ab27e485d459b481d6ad3af86f Merge: 016a4d6b1bfd aa03ea9bce8c Author: Kevin Hilman Date: Wed Oct 16 10:02:25 2019 -0700 Merge tag 'clk-meson-dt-v5.5-1' of git://github.com/BayLibre/clk-meson into v5.5/dt64-redo First round of amlogic DT binding clock update target for v5.5 Add the audio clock and reset bindings for the sm1 SoC family * tag 'clk-meson-dt-v5.5-1' of git://github.com/BayLibre/clk-meson: dt-bindings: clock: meson: add sm1 resets to the axg-audio controller dt-bindings: clk: axg-audio: add sm1 bindings commit 016a4d6b1bfde534cb8ccd3b8f3aa485126de444 Merge: 15767cfd81eb c2016cc612db Author: Kevin Hilman Date: Wed Oct 16 10:02:05 2019 -0700 Merge branch 'reset/meson-sm1-bindings' of git://git.pengutronix.de/git/pza/linux into v5.5/dt64-redo * 'reset/meson-sm1-bindings' of git://git.pengutronix.de/git/pza/linux: reset: dt-bindings: meson: update arb bindings for sm1 commit f7e714988edaffe6ac578318e99501149b067ba0 Author: Chris Lew Date: Fri Oct 4 15:27:00 2019 -0700 rpmsg: glink: Fix rpmsg_register_device err handling The device release function is set before registering with rpmsg. If rpmsg registration fails, the framework will call device_put(), which invokes the release function. The channel create logic does not need to free rpdev if rpmsg_register_device() fails and release is called. Fixes: b4f8e52b89f6 ("rpmsg: Introduce Qualcomm RPM glink driver") Cc: stable@vger.kernel.org Tested-by: Srinivas Kandagatla Signed-off-by: Chris Lew Signed-off-by: Bjorn Andersson commit b646293e272816dd0719529dcebbd659de0722f7 Author: Chris Lew Date: Fri Oct 4 15:26:59 2019 -0700 rpmsg: glink: Put an extra reference during cleanup In a remote processor crash scenario, there is no guarantee the remote processor sent close requests before it went into a bad state. Remove the reference that is normally handled by the close command in the so channel resources can be released. Fixes: b4f8e52b89f6 ("rpmsg: Introduce Qualcomm RPM glink driver") Cc: stable@vger.kernel.org Tested-by: Srinivas Kandagatla Signed-off-by: Chris Lew Reported-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson commit ac74ea01860170699fb3b6ea80c0476774c8e94f Author: Arun Kumar Neelakantam Date: Fri Oct 4 15:26:58 2019 -0700 rpmsg: glink: Fix use after free in open_ack TIMEOUT case Extra channel reference put when remote sending OPEN_ACK after timeout causes use-after-free while handling next remote CLOSE command. Remove extra reference put in timeout case to avoid use-after-free. Fixes: b4f8e52b89f6 ("rpmsg: Introduce Qualcomm RPM glink driver") Cc: stable@vger.kernel.org Tested-by: Srinivas Kandagatla Signed-off-by: Arun Kumar Neelakantam Signed-off-by: Bjorn Andersson commit b85f6b601407347f5425c4c058d1b7871f5bf4f0 Author: Arun Kumar Neelakantam Date: Fri Oct 4 15:26:57 2019 -0700 rpmsg: glink: Fix reuse intents memory leak issue Memory allocated for re-usable intents are not freed during channel cleanup which causes memory leak in system. Check and free all re-usable memory to avoid memory leak. Fixes: 933b45da5d1d ("rpmsg: glink: Add support for TX intents") Cc: stable@vger.kernel.org Acked-By: Chris Lew Tested-by: Srinivas Kandagatla Signed-off-by: Arun Kumar Neelakantam Reported-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson commit d27bd6b9e27feee8dff96ef272c94e0ec5b87e6e Author: Rob Herring Date: Fri Sep 20 08:48:28 2019 -0500 dt-bindings: iommu: Convert Arm SMMU to DT schema Convert the Arm SMMU binding to DT schema. The existing binding doc doesn't cover the number of variations of compatible properties found in .dts files. "qcom,msm8998-smmu-v2" was also missing, so add it. SoCFPGA Stratix10 has a single clock defined which doesn't match the binding. This issue remains. Cc: Joerg Roedel Cc: Mark Rutland Cc: Will Deacon Cc: Robin Murphy Cc: iommu@lists.linux-foundation.org Signed-off-by: Rob Herring commit d9aeaa6d4ca44df5fae745fd47aede8b3f6137f1 Author: Mauro Carvalho Chehab Date: Sun Oct 6 09:48:23 2019 -0300 media: cxd2841er: avoid too many status inquires I2C ops are expensive, as the I2C bus typical speed is 100kbps. Also, stats reading take some time, as it requires to retrieve a certain number of packets to complete. While we don't know the minimal for CXD2841er, trying to do it too quickly is still a very bad idea. So, add some sanity logic there, preventing to retrieve stats faster than one second. This shouldn't cause any issues with well behavior apps, as they usually take stats on a polling rate slower than 1 second. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sean Young commit 75564e3a5016651f1c7f8eec63b557e24d6d1e17 Author: Mauro Carvalho Chehab Date: Fri Oct 4 08:42:47 2019 -0300 media: mb86a20s: make the bit rate estimation function more generic While 99% of the implementation of the bitrate estimation routine for ISDB-T is generic, the current approach mangles it with some mb86a20s-specific thing. Split the calculus from the specific stuff, in order to make easier to use the same approach on other drivers requiring a similar formula. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sean Young commit 21a18129edd773c7c75725af344f51faf00040e6 Author: Tony Lindgren Date: Wed Oct 16 08:04:54 2019 -0700 ARM: OMAP2+: Simplify code for clkdm_clock_enable and disable We can make clkdm_clk_enable() usable for clkdm_hwmod_enable() by dropping the unused clock check, and drop _clkdm_clk_hwmod_enable(). And we can make clkdm_hwmod_disable() call clkdm_hwmod_disable() and drop the duplicate code in clkdm_hwmod_disable(). Cc: Tero Kristo Signed-off-by: Tony Lindgren commit 4399d430700d3974ed6c5a1b1380bc6527f17e99 Author: Nathan Chancellor Date: Wed Oct 16 07:47:14 2019 -0700 arm64: mm: Fix unused variable warning in zone_sizes_init When building arm64 allnoconfig, CONFIG_ZONE_DMA and CONFIG_ZONE_DMA32 get disabled so there is a warning about max_dma being unused. ../arch/arm64/mm/init.c:215:16: warning: unused variable 'max_dma' [-Wunused-variable] unsigned long max_dma = min; ^ 1 warning generated. Add __maybe_unused to make this clear to the compiler. Fixes: 1a8e1cef7603 ("arm64: use both ZONE_DMA and ZONE_DMA32") Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Nathan Chancellor Signed-off-by: Catalin Marinas commit 645ad6f3ca450ecd30e79d168563d79448317674 Author: Tony Lindgren Date: Wed Oct 16 08:21:50 2019 -0700 ARM: OMAP2+: Drop unused enable_wakeup and disable_wakeup We're only using static _enable_wakeup(), the others have no callers. Signed-off-by: Tony Lindgren commit 943682e3bd19385511171d730499120ab7245566 Author: Matt Roper Date: Tue Oct 15 09:28:54 2019 -0700 drm/i915: Introduce Jasper Lake PCH The Jasper Lake PCH follows ICP/TGP's south display behavior and is identical to MCC graphics-wise except that it does not use the unusual (port C -> TC1) pin mapping that MCC does. Also, it turns out the extra PCH ID that we had previously thought was a form of MCC is actually a second ID for JSP (i.e., port C uses the port C pins instead of the TC1 pins). v2: - Also update the port masks (not just the pin table) in mcc_hpd_irq_setup. (Vivek) v3: - Break jsp_hpd_irq_setup out into its own function for clarity. (Vivek) Cc: José Roberto de Souza Cc: James Ausmus Cc: Vivek Kasireddy Signed-off-by: Matt Roper Reviewed-by: Vivek Kasireddy Link: https://patchwork.freedesktop.org/patch/msgid/20191015162854.30546-1-matthew.d.roper@intel.com commit 4873843718f903de74b496e39367dc7aaf267c37 Author: Tony Lindgren Date: Wed Oct 16 07:37:07 2019 -0700 ARM: OMAP2+: Initialize voltage controller for omap4 We're missing initializing the PRM_VOLTCTRL register for voltage controller. Let's add omap4_vc_init_pmic_signaling() similar to what we have for omap3 and enable voltage control for retention. This brings down droid4 power consumption with mainline kernel to somewhere between 40 and 50mW from about 70 to 80 mW for the whole device when running idle with LCD and backlight off, WLAN connected, and USB and modem modules unloaded. Mostly just rmmod of omap2430, ohci-platform and phy-mapphone-mdm6600 are needed to idle USB and shut down the modem. And after that measuring idle power consumption can be done with reading sysfs entry periodically for /sys/class/power_supply/battery/power_avg. Then rmmod of phy-cpcap-usb will save few more mW, but will disable the debug UART. Note that sometimes CM_L4PER_UART1_CLKCTRL at 0x4a009540 does not idle properly after unloading of phy-mapphone-mdm6600. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit caf8c87d7ff2037b502e76ce450565e9bd32a819 Author: Tony Lindgren Date: Wed Oct 16 07:37:06 2019 -0700 ARM: OMAP2+: Allow core oswr for omap4 Commit f74297dd9354 ("ARM: OMAP2+: Make sure LOGICRETSTATE bits are not cleared") disabled oswr (open switch retention) for per and core domains as various GPIO related issues were noticed if the bootloader had configured the bits for LOGICRETSTATE for per and core domains. With the recent gpio-omap fixes, mostly related to commit e6818d29ea15 ("gpio: gpio-omap: configure edge detection for level IRQs for idle wakeup"), things now behave for enabling core oswr for omap4. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit 623429d5b9011cc56538bc70fced765d7c42e622 Author: Tony Lindgren Date: Wed Oct 16 07:37:06 2019 -0700 ARM: OMAP2+: Allow per oswr for omap4 Commit f74297dd9354 ("ARM: OMAP2+: Make sure LOGICRETSTATE bits are not cleared") disabled oswr (open switch retention) for per and core domains as various GPIO related issues were noticed if the bootloader had configured the bits for LOGICRETSTATE for per and core domains. With the recent gpio-omap fixes, mostly related to commit e6818d29ea15 ("gpio: gpio-omap: configure edge detection for level IRQs for idle wakeup"), things now behave for enabling per oswr for omap4. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit d44fa156dcb29dd0215c1fe63e7a7031a106557e Author: Tony Lindgren Date: Wed Oct 16 07:37:06 2019 -0700 ARM: OMAP2+: Configure voltage controller for cpcap We can configure voltage controller for cpcap with the data available in Motorola Mapphone Android Linux kernel. Let's add it so we can have droid4 behave the same way for voltage controller as other omap4 devices and save some power when idle. Note that we're now using high-speed i2c mode, looks like the Motorola kernel had a typo using 0x200 instead of 200 for the timings which may caused it to not work properly. Also note that in the long run, this should just become dts data for a voltage controller device driver. But let's get things working first to make it possible to test further changes easily. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren commit 32236a84906f9df6aeccf6cc735c8e911ef26da6 Author: Tony Lindgren Date: Wed Oct 16 07:37:05 2019 -0700 ARM: OMAP2+: Update 4430 voltage controller operating points The current operating points in the mainline kernel are out of date for at least omap4430. Let's use the values from Motorola Mapphone Linux Android kernel as presumably those have been verified. Note that these are only used by voltage controller, they do not enable any new operating points for cpufreq. Looking at the recent omap3 cpufreq related patches posted, that's a totally separate series of patches. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren commit ccd369455a2369779ee38cbb709719cce8409974 Author: Tony Lindgren Date: Wed Oct 16 07:37:05 2019 -0700 ARM: OMAP2+: Remove bogus warnings for machines without twl PMIC In general we want to see a quiet dmesg output with no errors or warnings unless something is really wrong and needs attention. We currently see these bogus warnings on boot: twl: not initialized twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660 ... Let's avoid these by checking if a device tree node for cpcap PMIC exists. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren commit dfc065aa896330ce1c13db7ab223b34e94de2f1d Author: Tony Lindgren Date: Wed Oct 16 07:37:04 2019 -0700 ARM: OMAP2+: Drop bogus wkup domain oswr setting The wkup domain is always on and does not have logic off setting. This got accidentally added by commit f74297dd9354 ("ARM: OMAP2+: Make sure LOGICRETSTATE bits are not cleared") but is harmless. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit 5395b5557acbb9901c7ffb963aa7589e4960e7d7 Author: Tony Lindgren Date: Wed Oct 16 07:37:04 2019 -0700 ARM: OMAP2+: Remove unused wakeup_cpu After commit 32d174ed1bd7 ("ARM: OMAP4: MPUSS PM: remove unnecessary shim functions for powerdomain control") this is no longer used. The code continues execution after context restore on the same CPU, so we can just use pm_info->pwrdm. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren commit ca8f245f284eeffa56f3b7a5eb6fc503159ee028 Author: Vito Caputo Date: Sun Oct 13 23:08:45 2019 -0300 media: cxusb: detect cxusb_ctrl_msg error in query Don't use uninitialized ircode[] in cxusb_rc_query() when cxusb_ctrl_msg() fails to populate its contents. syzbot reported: dvb-usb: bulk message failed: -22 (1/-30591) ===================================================== BUG: KMSAN: uninit-value in ir_lookup_by_scancode drivers/media/rc/rc-main.c:494 [inline] BUG: KMSAN: uninit-value in rc_g_keycode_from_table drivers/media/rc/rc-main.c:582 [inline] BUG: KMSAN: uninit-value in rc_keydown+0x1a6/0x6f0 drivers/media/rc/rc-main.c:816 CPU: 1 PID: 11436 Comm: kworker/1:2 Not tainted 5.3.0-rc7+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events dvb_usb_read_remote_control Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x191/0x1f0 lib/dump_stack.c:113 kmsan_report+0x13a/0x2b0 mm/kmsan/kmsan_report.c:108 __msan_warning+0x73/0xe0 mm/kmsan/kmsan_instr.c:250 bsearch+0x1dd/0x250 lib/bsearch.c:41 ir_lookup_by_scancode drivers/media/rc/rc-main.c:494 [inline] rc_g_keycode_from_table drivers/media/rc/rc-main.c:582 [inline] rc_keydown+0x1a6/0x6f0 drivers/media/rc/rc-main.c:816 cxusb_rc_query+0x2e1/0x360 drivers/media/usb/dvb-usb/cxusb.c:548 dvb_usb_read_remote_control+0xf9/0x290 drivers/media/usb/dvb-usb/dvb-usb-remote.c:261 process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415 kthread+0x4b5/0x4f0 kernel/kthread.c:256 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:150 [inline] kmsan_internal_chain_origin+0xd2/0x170 mm/kmsan/kmsan.c:314 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:184 rc_g_keycode_from_table drivers/media/rc/rc-main.c:583 [inline] rc_keydown+0x2c4/0x6f0 drivers/media/rc/rc-main.c:816 cxusb_rc_query+0x2e1/0x360 drivers/media/usb/dvb-usb/cxusb.c:548 dvb_usb_read_remote_control+0xf9/0x290 drivers/media/usb/dvb-usb/dvb-usb-remote.c:261 process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415 kthread+0x4b5/0x4f0 kernel/kthread.c:256 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355 Local variable description: ----ircode@cxusb_rc_query Variable was created at: cxusb_rc_query+0x4d/0x360 drivers/media/usb/dvb-usb/cxusb.c:543 dvb_usb_read_remote_control+0xf9/0x290 drivers/media/usb/dvb-usb/dvb-usb-remote.c:261 Signed-off-by: Vito Caputo Reported-by: syzbot Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d2f383d6b8cd85cbb0e8ebece4ef9408237eef68 Author: Jisheng Zhang Date: Fri Oct 11 05:25:20 2019 -0300 media: rc-map: Sort rc map name MACROs Some MACROS such as RC_MAP_SU3000 and RC_MAP_HAUPPAUGE are not alphabetically sorted. Sort names alphabetically. Signed-off-by: Jisheng Zhang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 22cb099d0c1ba53269bc4b0cfb5039117af4f6fe Author: Christian Hewitt Date: Fri Oct 11 16:43:42 2019 -0300 media: rc: add keymap for Tronsmart Vega S95/S96 remote Add a keymap for the Tronsmart Vega S95 and S96 Android (Amlogic S905/S912) STB devices. Both use the same IR remote. Signed-off-by: Christian Hewitt Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0f123f820a8affe41cdf80e1998675dda4679574 Author: zhong jiang Date: Wed Oct 9 11:55:23 2019 -0300 media: tuners/qm1d1c0042: Use DIV_ROUND_CLOSEST directly to make it readable The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. Signed-off-by: Zhong Jiang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 727fe909af7545fc317cd1ead4678724ec87df0a Author: zhong jiang Date: Wed Oct 9 11:55:22 2019 -0300 media: dvb-frontends: Use DIV_ROUND_CLOSEST directly to make it readable The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. Signed-off-by: zhong jiang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d587cdb2a5f57053ef182f64894ed3ba9e1559dc Author: Sean Young Date: Mon Oct 7 07:36:45 2019 -0300 media: imon_raw: simplify loop The code for pulse and space is the same so remove duplication. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 14494583336880640654300c76d0f5df3360d85f Author: Thomas Voegtle Date: Wed Oct 2 14:26:03 2019 -0300 media: dvbsky: add support for eyeTV Geniatech T2 lite Adds USB ID for the eyeTV Geniatech T2 lite to the dvbsky driver. This is a Geniatech T230C based stick without IR and a different USB ID. Signed-off-by: Thomas Voegtle Tested-by: Jan Pieter van Woerkom Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit fcb9bba47fb5ff39912f8f3b7b6d32992e461368 Author: Matt Roper Date: Tue Oct 15 09:11:31 2019 -0700 drm/i915/ehl: Don't forget to set TC long detect function Since EHL's MCC PCH reuses one of the TC pins we need to supply a TC long detect function when handling the interrupts. Fixes: 53448aed7b80 ("drm/i915/ehl: Port C's hotplug interrupt is associated with TC1 bits") Reported-by: kbuild test robot Reported-by: Dan Carpenter Cc: Vivek Kasireddy Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191015161131.21239-1-matthew.d.roper@intel.com Reviewed-by: Vivek Kasireddy commit 3abe897787c2445fb1aa955ac229bdfe2ac786c2 Author: Ville Syrjälä Date: Fri Sep 27 16:14:30 2019 +0300 drm/i915: Prepare the mode readout for hw vs. uapi state split Prepare the mode readout for the uapi vs. hw state split. We'll want to do all readout into the hw state. Signed-off-by: Ville Syrjälä Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190927131432.15978-4-ville.syrjala@linux.intel.com commit de3b67afc0602f81fc6309544f97d4425c2e2cf6 Author: Ville Syrjälä Date: Fri Sep 27 16:14:28 2019 +0300 drm/i915: Prepare the connector/encoder mask readout for hw vs. uapi state split Prepare the connector/encoder mask readout for the uapi vs. hw state split. We'll want to do all readout into the hw state. Signed-off-by: Ville Syrjälä Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190927131432.15978-2-ville.syrjala@linux.intel.com commit 4078c983feb930bc2a3e3f8ffa6fa65fdf466c8f Author: Ville Syrjälä Date: Fri Sep 27 16:14:27 2019 +0300 drm/i915: Switch intel_legacy_cursor_update() to intel_ types Prefer the intel_ types in intel_legacy_cursor_update() over the drm_ types. Should make it easier to adapt this to the uapi vs. hw state split. Signed-off-by: Ville Syrjälä Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190927131432.15978-1-ville.syrjala@linux.intel.com commit e543b3f5bb1d7dc39c2628e2932c625670913436 Author: Bruce Chen Date: Wed Oct 16 20:23:39 2019 +0800 pinctrl: sprd: Add CM4 sleep mode support For the new Spreadtrum pin controller, it expands 6bits to describe the pin sleep mode with adding one CM4_SLEEP mode, which means the pin sleep related configuration will be loaded automatically by hardware when the CM4 system goes into deep sleep mode. Signed-off-by: Bruce Chen Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/8ae52263b0625c416461821c457e6789b67170b6.1571228451.git.baolin.wang@linaro.org Signed-off-by: Linus Walleij commit 993254292b9e0be97555cd3475bcdb946c558381 Author: Ville Syrjälä Date: Mon Oct 7 14:49:43 2019 +0300 drm/i915: Refactor timestamping constants update Once we do the hw vs. uapi split we can no longer use drm_atomic_helper_calc_timestamping_constants() as it'll consult the uapi state instead of the hw state. So let's just update the vblank timestamping constants whenever we update the scanline offset. We use both to convert the hw scanline count to something which matches the software timing values. First I thought to put these into intel_crtc_vblank_on() but we may want to get the scanline counter value before that (eg. from some early tracepoints), so let's stick to updating them a bit earlier than intel_crtc_vblank_on(). Signed-off-by: Ville Syrjälä Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191007114943.29307-3-ville.syrjala@linux.intel.com commit 45892b4c6cb86808dc6ea09209b3a33748b105cd Author: AngeloGioacchino Del Regno Date: Sat Oct 5 12:59:36 2019 +0200 dt-bindings: pinctrl: Add MSM8976 driver bindings and documentation Add the documentation for this new driver for pin configuration with the pinctrl framework on MSM8976/56 and its APQ variants. Link: https://lore.kernel.org/r/20191005105936.31216-3-kholk11@gmail.com Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 22406b3efc0698f88919167702532c3dd95406c8 Author: Linus Walleij Date: Mon Oct 14 13:11:54 2019 +0200 pinctrl: nomadik: Simplify interrupt handler The inner interrupt handler was for the latent IRQ handling, and that will never be used, inline the unnecessary function. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191014111154.9731-3-linus.walleij@linaro.org commit 2da7852e54edc917ef27077fb8ade85f6a5e6394 Author: Linus Walleij Date: Mon Oct 14 13:11:53 2019 +0200 pinctrl: nomadik: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Thierry Reding Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191014111154.9731-2-linus.walleij@linaro.org commit b95e0bd23e3603a0360bac0c28de8e836f1148ca Author: Linus Walleij Date: Mon Oct 14 13:11:52 2019 +0200 pinctrl: nomadik: Drop support for latent IRQ The latent IRQs are IRQs that have occurred when the system was down in deep sleep and the GPIO block was powered off. The PRCMU (power reset and control unit) knows which GPIO line offset fired an IRQ to wake the system up (if so desired) and this second IRQ was used to replay the action when the system came back online after suspend(). This is now known to be the wrong approach to solve this problem: in a patch series Lina Iyer has suggested to instead make it possible to model the IRQs as hierarchical with double parents. Also the current device trees do not contain the right information to make this code work, the latent IRQ is not specified nowadays giving noise like this in the console: [ 0.612168] gpio 8012e000.gpio: IRQ index 1 not found [ 0.622523] gpio 8012e080.gpio: IRQ index 1 not found Let's delete the latent IRQ code and reimplement it properly when we need it. Cc: Ulf Hansson Cc: Lina Iyer Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191014111154.9731-1-linus.walleij@linaro.org commit 7825aeb7b20854740586a9f7484c1fdfc516eca5 Author: Jianqun Xu Date: Tue Oct 15 17:17:08 2019 +0800 pinctrl: rockchip: add rk3308 SoC support This patch do support pinctrl for RK3308 SoCs. Reviewed-by: Heiko Stuebner Signed-off-by: Jianqun Xu Link: https://lore.kernel.org/r/20191015091708.7934-3-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit e54349ed6c254c6c9f69dcc77f2bb73957a42c25 Author: Jianqun Xu Date: Tue Oct 15 17:17:07 2019 +0800 dt-bindings: pinctrl: rockchip: add rk3308 SoC support Add rk3308 SoC support to rockchip pinctrl. Acked-by: Rob Herring Reviewed-by: Heiko Stuebner Signed-off-by: Jianqun Xu Link: https://lore.kernel.org/r/20191015091708.7934-2-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit f8b05fe41b72adc8bc3ce164d6a2c7ac55f44724 Author: Baolin Wang Date: Wed Oct 9 12:52:45 2019 +0800 pinctrl: sprd: Add PIN_CONFIG_BIAS_DISABLE configuration support Add PIN_CONFIG_BIAS_DISABLE configuration support for Spreadtrum pin controller. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/66d373ddee61e8be2fcef49aac5e80bd58f14915.1570596606.git.baolin.wang@linaro.org Signed-off-by: Linus Walleij commit f086d1fe06cf3c5be928a6c2f8d1c54003f91d46 Author: Amelie Delaunay Date: Wed Oct 9 11:16:06 2019 +0200 pinctrl: stmfx: add irq_request/release_resources callbacks When an STMFX IO is used as interrupt through the interrupt-controller binding, the STMFX driver should configure this IO as input. Default value of STMFX IO direction is input, but if the IO is used as output before the interrupt use, it will not work without these callbacks. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20191009091606.17283-1-amelie.delaunay@st.com Signed-off-by: Linus Walleij commit bcd11493f0abb98624cfa8b0949eb5fa2629864b Author: AngeloGioacchino Del Regno Date: Sat Oct 5 12:59:35 2019 +0200 pinctrl: qcom: Add a pinctrl driver for MSM8976 and 8956 Add the pinctrl driver to support pin configuration with the pinctrl framework on MSM8976, MSM8956, APQ8056, APQ8076. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20191005105936.31216-2-kholk11@gmail.com Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 142b876750a97b883f1c29e1ceae08adfe38c97c Author: Linus Walleij Date: Tue Oct 1 15:32:09 2019 +0200 pinctrl: ingenic: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Thierry Reding Acked-by: Zhou Yanjie Acked-by: Paul Cercueil Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191001133209.17164-1-linus.walleij@linaro.org commit b587c30a5f29ad24f0175089af374dedfcadc495 Author: Kiran Gunda Date: Fri Oct 4 16:50:39 2019 +0530 dt-bindings: pinctrl: qcom-pmic-gpio: Add support for pm6150/pm6150l Add support for the PM6150 and PM6150L GPIO support to the Qualcomm PMIC GPIO binding. Signed-off-by: Kiran Gunda Link: https://lore.kernel.org/r/1570188039-22122-1-git-send-email-kgunda@codeaurora.org Acked-by: Bjorn Andersson Reviewed-by: Vinod Koul Signed-off-by: Linus Walleij commit 9905f32aefbe3d9cb2d24c3bd9c882397eaf3842 Author: Stefan-Gabriel Mirea Date: Wed Oct 16 15:48:25 2019 +0300 serial: fsl_linflexuart: Be consistent with the name For consistency reasons, spell the controller name as "LINFlexD" in comments and documentation. Signed-off-by: Stefan-Gabriel Mirea Link: https://lore.kernel.org/r/1571230107-8493-4-git-send-email-stefan-gabriel.mirea@nxp.com Signed-off-by: Greg Kroah-Hartman commit 0864c408fb1e5b02d817cc8cd5b794d4cb491d50 Author: Greg Kroah-Hartman Date: Fri Oct 11 15:29:31 2019 +0200 debugfs: remove return value of debugfs_create_x64() No one checks the return value of debugfs_create_x64(), 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/20191011132931.1186197-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f5cb0a7e64f41b6f1c5cacc64a476962f5e97f91 Author: Greg Kroah-Hartman Date: Fri Oct 11 15:29:30 2019 +0200 debugfs: remove return value of debugfs_create_x32() No one checks the return value of debugfs_create_x32(), 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/20191011132931.1186197-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e40d38f28c10e3010b2828f2c737b50fb81bda8f Author: Greg Kroah-Hartman Date: Fri Oct 11 15:29:29 2019 +0200 debugfs: remove return value of debugfs_create_x16() No one checks the return value of debugfs_create_x16(), 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/20191011132931.1186197-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit be5767341ce56a6a7adf9df3fd07cf8a0611a5d0 Author: Greg Kroah-Hartman Date: Fri Oct 11 15:19:19 2019 +0200 ntb: ntb_pingpong: no need to check the return value of debugfs calls There is no need to check the return value of debugfs_create_atomic_t as nothing happens with the error. Also, the code will never return NULL, so this check has never caught anything :) Fix this by removing the check entirely. Cc: Jon Mason Cc: Dave Jiang Cc: Allen Hubbe Cc: linux-ntb@googlegroups.com Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191011131919.GA1174815@kroah.com Signed-off-by: Greg Kroah-Hartman commit 2229adc81380c46908d46a91f05a6c1650456769 Author: Chris Wilson Date: Wed Oct 16 11:08:51 2019 +0100 drm/i915/execlist: Trim immediate timeslice expiry We perform timeslicing immediately upon receipt of a request that may be put into the second ELSP slot. The idea behind this was that since we didn't install the timer if the second ELSP slot was empty, we would not have any idea of how long ELSP[0] had been running and so giving the newcomer a chance on the GPU was fair. However, this causes us extra busy work that we may be able to avoid if we wait a jiffie for the first timeslice as normal. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191016100851.4979-1-chris@chris-wilson.co.uk commit b475764dda424ac83ad6120cbc75ffde89d8ff2c Author: Linus Walleij Date: Tue Oct 1 23:45:36 2019 +0200 pinctrl: pistachio: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Andrew Bresticker Cc: Thierry Reding Signed-off-by: Linus Walleij Acked-by: James Hartley Link: https://lore.kernel.org/r/20191001214536.18477-1-linus.walleij@linaro.org commit 2851ef521ddd4d2bc78f6cadce1d6efb54036bee Author: Linus Walleij Date: Wed Oct 2 14:15:50 2019 +0200 pinctrl: armada-37xx: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Miquel Raynal Cc: Gregory CLEMENT Cc: Marek Behún Cc: Thierry Reding Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191002121550.16104-1-linus.walleij@linaro.org commit d874beca9f4e8c93cfe9b18570f65ee3c50275f3 Author: Linus Walleij Date: Wed Oct 2 13:44:54 2019 +0200 pinctrl: ocelot: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Thierry Reding Signed-off-by: Linus Walleij Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20191002114454.9684-1-linus.walleij@linaro.org commit 8de6e755069fbfaefae67d3abff2b2e3d83db986 Author: Shuming Fan Date: Wed Oct 16 16:58:45 2019 +0800 ASoC: rt1011: Read and apply r0 and temperature device property Typically, the r0 (calibration data) and temperature were measured in the factory. This information is written into the non-volatile area where keeps data whether factory reset or OS update. In Chromium OS case, the coreboot will read the info from VPD and create the device property for each rt1011. Signed-off-by: Shuming Fan Tested-By: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20191016085845.11672-1-shumingf@realtek.com Signed-off-by: Mark Brown commit cf775f68a0939f0e5aad5855f63338c4b5e51c59 Author: Shuming Fan Date: Wed Oct 16 19:56:17 2019 +0800 ASoC: dt-bindings: rt1011: add r0 and temperature device property Typically, the r0 (calibration data) and temperature were measured in the factory. This information is written into the non-volatile area where keeps data whether factory reset or OS update. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191016115617.23213-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 6ec939f8b809cb06ba7802e17ef7024d1bc0ee84 Author: Anshuman Khandual Date: Fri Oct 4 09:53:58 2019 +0530 arm64/mm: Poison initmem while freeing with free_reserved_area() Platform implementation for free_initmem() should poison the memory while freeing it up. Hence pass across POISON_FREE_INITMEM while calling into free_reserved_area(). The same is being followed in the generic fallback for free_initmem() and some other platforms overriding it. Cc: Mark Rutland Cc: linux-kernel@vger.kernel.org Reviewed-by: Steven Price Acked-by: Will Deacon Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas commit 3ad00f6a5f76d4030a3c712fabe0cf69920925fc Author: Ben Dooks (Codethink) Date: Wed Oct 16 13:01:49 2019 +0100 ASoC: wm8958: use to simplify code Simplify the memcpy/be32_to_cpu() code by simply using get_unaligned_be32() throughout and makes the code nicer to look at. This fixes the following warnings from sparse: sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64 sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32 sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32 Signed-off-by: Ben Dooks Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20191016120149.5860-1-ben.dooks@codethink.co.uk Signed-off-by: Mark Brown commit 81bd644f69858c233245588f18b88bdcd62efd1e Author: Shuming Fan Date: Wed Oct 16 16:57:54 2019 +0800 ASoC: rt1011: set tx/rx slots from tx/rx_mask in TDM case The TX/RX slot configuration use tx/rx_mask which requested by the machine driver. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20191016085754.11614-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 899ee4afe5eb262236717188ccdaa0192c00dc5a Author: Mike Rapoport Date: Sat Sep 28 11:02:26 2019 +0300 arm64: use generic free_initrd_mem() arm64 calls memblock_free() for the initrd area in its implementation of free_initrd_mem(), but this call has no actual effect that late in the boot process. By the time initrd is freed, all the reserved memory is managed by the page allocator and the memblock.reserved is unused, so the only purpose of the memblock_free() call is to keep track of initrd memory for debugging and accounting. Without the memblock_free() call the only difference between arm64 and the generic versions of free_initrd_mem() is the memory poisoning. Move memblock_free() call to the generic code, enable it there for the architectures that define ARCH_KEEP_MEMBLOCK and use the generic implementation of free_initrd_mem() on arm64. Tested-by: Anshuman Khandual #arm64 Reviewed-by: Anshuman Khandual Acked-by: Will Deacon Signed-off-by: Mike Rapoport Signed-off-by: Catalin Marinas commit 9f94fadd75d34acec19c164ffb1b60c66d72f898 Author: Thierry Reding Date: Tue Aug 20 16:01:04 2019 +0200 soc/tegra: fuse: Register cell lookups for compatibility Typically nvmem cells would be stored in device tree. However, for compatibility with device trees that don't contain nvmem cell definitions, register lookups for cells currently used by consumers. This allows the consumers to use the same API to query cells from the device tree or using the legacy mechanism. Signed-off-by: Thierry Reding commit f4619c7f68ba02f8357a9d42340a6dc8a229268d Author: Thierry Reding Date: Tue Aug 20 15:59:49 2019 +0200 soc/tegra: fuse: Add cell information Create nvmem cells for all the fuses currently used by consumers. Signed-off-by: Thierry Reding commit 96ee12b2a203167ffda7ac4a444418ca53df056d Author: Thierry Reding Date: Tue Aug 20 15:57:16 2019 +0200 soc/tegra: fuse: Implement nvmem device The nvmem framework provides a generic infrastructure and API to access the type of information stored in fuses such as the Tegra FUSE block. Implement an nvmem device that can be used to access the information in a more generic way to decouple consumers from the custom Tegra API and to add a more formal way of creating the dependency between the FUSE device and the consumers. Signed-off-by: Thierry Reding commit 9f1022b8bd14ce937ca56174a97a1ce475c07693 Author: Thierry Reding Date: Tue Aug 20 15:53:44 2019 +0200 soc/tegra: fuse: Restore base on sysfs failure Make sure to also restore the register base address on sysfs registration failure. Signed-off-by: Thierry Reding commit 456a513bb5d494f169271b16334049d50c7e630b Author: Jakub Sitnicki Date: Wed Oct 16 10:58:11 2019 +0200 scripts/bpf: Emit an #error directive known types list needs updating Make the compiler report a clear error when bpf_helpers_doc.py needs updating rather than rely on the fact that Clang fails to compile English: ../../../lib/bpf/bpf_helper_defs.h:2707:1: error: unknown type name 'Unrecognized' Unrecognized type 'struct bpf_inet_lookup', please add it to known types! Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191016085811.11700-1-jakub@cloudflare.com commit 698b8eeaed7287970fc2b6d322618850fd1b1e6c Author: Song Hui Date: Fri Oct 11 08:56:43 2019 +0800 gpio/mpc8xxx: change irq handler from chained to normal More than one gpio controllers can share one interrupt, change the driver to request shared irq. While this will work, it will mess up userspace accounting of the number of interrupts per second in tools such as vmstat. The reason is that for every GPIO interrupt, /proc/interrupts records the count against GIC interrupt 68 or 69, as well as the GPIO itself. So, for every GPIO interrupt, the total number of interrupts that the system has seen increments by two. Signed-off-by: Laurentiu Tudor Signed-off-by: Alex Marginean Signed-off-by: Song Hui Link: https://lore.kernel.org/r/20191011005643.41007-1-hui.song_1@nxp.com Signed-off-by: Linus Walleij commit 3aec5006c20d2927a0f7962103f7647d3e4a3381 Author: Linus Walleij Date: Wed Oct 2 13:38:19 2019 +0200 pinctrl: oxnas: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Neil Armstrong Cc: Thierry Reding Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191002113819.4927-1-linus.walleij@linaro.org commit c77a4de2bbf36d26560c430a6578fdbdd04f6f9c Author: Linus Walleij Date: Tue Oct 1 15:51:47 2019 +0200 pinctrl: st: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion: the ST pin controller errors out of adding a irqchip if the interrupt is invalid or missing or if the irqmux is not present: the irqchip should not be added if either of these errors happen, so rewrite the code to deal with that. Keep the exit path where the gpio_chip is added no matter what the status of the irq is. Cc: Benjamin Gaignard Cc: Amelie Delaunay Cc: Patrice Chotard Cc: Thierry Reding Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191001135147.29416-1-linus.walleij@linaro.org commit 35dea5d746b2ba5f56fe3562d6cc1843a632d471 Author: Linus Walleij Date: Tue Oct 1 15:06:45 2019 +0200 pinctrl: at91: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion: at91 is a little bit special since it registers up to 3 gpio_chips with the same parent handler, but just passing girq->parent_handler and the parent on the first of them should cut it. Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Thierry Reding Signed-off-by: Linus Walleij Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20191001130645.8350-1-linus.walleij@linaro.org commit dd8b7a1db5d0dad985923f2bda418d619e8b0c5c Author: Michal Simek Date: Wed Oct 16 12:36:41 2019 +0200 Revert "serial: core: Use cons->index for preferred console registration" This reverts commit 91daae03188e0dd1da3c1b599df4ce7539d5a69f. The origin patch is causing an issue on r8a7791/koelsch and r8a7795/salvator-xs platforms where cons->index is not initialized to expected value. It is safer to revert this patch for now till it is clear why this is happening. Reported-by: Geert Uytterhoeven Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/59f51af6bb03fce823663764d17ad0291aa01ab2.1571222199.git.michal.simek@xilinx.com Signed-off-by: Greg Kroah-Hartman commit af3f1afac38d34083faad852172d0ec82749c046 Author: Jolly Shah Date: Mon Oct 7 11:52:23 2019 -0700 firmware: xilinx: Add support for versal soc Versal is xilinx's next generation soc. This patch adds driver support required to be compatible with versal device. Signed-off-by: Jolly Shah Signed-off-by: Michal Simek commit 856c78c6281a3b96ea9dedac06e620b41f237b13 Author: Jolly Shah Date: Mon Oct 7 11:52:22 2019 -0700 dt-bindings: firmware: Add bindings for Versal firmware ZynqMP firmware driver can be used for versal also. Add versal compatible string to zynqmp firmware driver doc. Signed-off-by: Jolly Shah Reviewed-by: Rob Herring Signed-off-by: Michal Simek commit e502ff8606b32df4f9f2435ab00278312db125b3 Author: Tejas Patel Date: Mon Aug 26 13:30:44 2019 -0700 soc: xilinx: Set CAP_UNUSABLE requirement for versal while powering down domain For "0" requirement which is used to inform firmware that device is not required currently by master, Versal PLM (Platform Loader and Manager) which runs on Platform Management Controller and is responsible platform management of devices that disables clock, power it down and reset the device. genpd_power_off() is being called during runtime suspend also. So, if any device goes to runtime suspend state during resumes it needs to be re-initialized again. It is possible that drivers do not reinitialize device upon resume from runtime suspend every time ans so dont want it to be powered down or get reset during runtime suspend. In Versal PLM new PM_CAP_UNUSABLE capability is added, which disables clock only and avoids power down and reset during runtime suspend. Power and reset will be gated with core suspend.So, this patch sets CAPABILITY_UNUSABLE requirement during gpd_power_off() if platform is other than zynqmp. Signed-off-by: Tejas Patel Signed-off-by: Jolly Shah Signed-off-by: Michal Simek commit f61714cd5bd3610794c1eb76fc96a7041b76a3a4 Author: Lowry Li (Arm Technology China) Date: Tue Oct 15 09:10:36 2019 +0000 drm/komeda: Adds output-color format support Sets output color format according to the connector formats and display supported formats. Default value is RGB444 and only force YUV format which must be YUV. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20191015091019.26021-1-lowry.li@arm.com commit 8574685547bdc4f11cc528f386e5396212409f9c Author: Chris Wilson Date: Tue Oct 15 09:59:11 2019 +0100 drm/i915/selftests: Drop stale struct_mutex A lately added test was missed when applying the struct_mutex removal patches. Do so now. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191015085911.10317-1-chris@chris-wilson.co.uk commit cb0b97d68252df9bc2e50bdb971b589b85589c2c Author: Alexandre Belloni Date: Mon Oct 14 17:58:40 2019 +0200 rtc: meson-vrtc: move config option to proper location The correct location for this option is under platform driver, not i2c drivers. Link: https://lore.kernel.org/r/20191014155840.22554-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 299b610117a4145dfe15963f0ea037ab319ce531 Author: Thomas Bogendoerfer Date: Mon Oct 14 23:46:21 2019 +0200 rtc: ds1685: add indirect access method and remove plat_read/plat_write SGI Octane (IP30) doesn't have RTC register directly mapped into CPU address space, but accesses RTC registers with an address and data register. This is now supported by additional access functions, which are selected by a new field in platform data. Removed plat_read/plat_write since there is no user and their usage could introduce lifetime issue, when functions are placed in different modules. Signed-off-by: Thomas Bogendoerfer Acked-by: Joshua Kinard Reviewed-by: Joshua Kinard Link: https://lore.kernel.org/r/20191014214621.25257-1-tbogendoerfer@suse.de Signed-off-by: Alexandre Belloni commit f9204ad9cd8ed83e2d10ab3294df62e03ddad1f3 Author: Lowry Li (Arm Technology China) Date: Sat Oct 12 06:50:46 2019 +0000 drm/komeda: Set output color depth for output Set color_depth according to connector->bpc. Changes since v1: - Fixed min_bpc is effectively set but not used in komeda_crtc_get_color_config(). Changes since v2: - Align the code. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: Mihail Atanassov Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20191012065030.12691-1-lowry.li@arm.com commit 82822c6859b14bb32eabde04c9cebc657d912fd1 Author: Kamel Bouhara Date: Fri Oct 11 14:50:22 2019 +0200 ARM: dts: at91: add Overkiz KIZBOX3 board Add a common DT include file for the Kizbox3 boards. Add the devicetree for the Kizbox3 HS board. Signed-off-by: Kévin RAYMOND Signed-off-by: Mickael GARDET Signed-off-by: Kamel Bouhara Link: https://lore.kernel.org/r/20191011125022.16329-4-kamel.bouhara@bootlin.com Signed-off-by: Alexandre Belloni commit caa1e65783c919f316e4f93410c6f59e5661c359 Author: Kamel Bouhara Date: Fri Oct 11 14:50:21 2019 +0200 dt-bindings: arm: at91: Document Kizbox3 HS board binding Document devicetree binding of SAMA5D27 Kizbox3 HS board from Overkiz SAS. Signed-off-by: Kamel Bouhara Link: https://lore.kernel.org/r/20191011125022.16329-3-kamel.bouhara@bootlin.com Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni commit d9bd62baf0db5f67c428f19f210183be4b21ced7 Author: Kamel Bouhara Date: Fri Oct 11 14:50:20 2019 +0200 dt-bindings: Add vendor prefix for Overkiz SAS Overkiz is a smarthome solutions provider, more information on: https://www.overkiz.com Signed-off-by: Kamel Bouhara Link: https://lore.kernel.org/r/20191011125022.16329-2-kamel.bouhara@bootlin.com Acked-by: Rob Herring Signed-off-by: Alexandre Belloni commit f15886fa7d29977efd27e653f1653f3d80910fd9 Author: Lowry Li (Arm Technology China) Date: Tue Sep 24 08:00:49 2019 +0000 drm/komeda: Adds layer horizontal input size limitation check for D71 Adds maximum line size check according to the AFBC decoder limitation and special Line size limitation(2046) for format: YUV420_10BIT and X0L2. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: Liviu Dudau Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20190924080022.19250-3-lowry.li@arm.com commit 2b2510da431aecf2dfee217cfb9b5b54a6813098 Author: Lowry Li (Arm Technology China) Date: Tue Sep 24 08:00:44 2019 +0000 drm/komeda: Add line size support On D71, we are using the global line size. From D32, every component have a line size register to indicate the fifo size. So this patch is to set line size support and do the line size check. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: Liviu Dudau Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20190924080022.19250-2-lowry.li@arm.com commit 7d79aa8628fe5045ad9379ccd5b992b04237ea52 Author: Thomas Zimmermann Date: Fri Oct 11 15:48:08 2019 +0200 drm/vboxvideo: Replace struct vram_framebuffer with generic implemenation The vboxvideo driver's struct vram_framebuffer stores a DRM framebuffer with an assiciated GEM object. This functionality is also provided by generic code. Switch vboxvideo over. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191011134808.3955-4-tzimmermann@suse.de commit 1a74ccfac5d76c7ef0263e0cf06ef71b766def4a Author: Thomas Zimmermann Date: Fri Oct 11 15:48:07 2019 +0200 drm/vboxvideo: Switch to drm_atomic_helper_dirty_fb() The vboxvideo driver provides struct drm_framebuffer_funcs.dirty_fb from its own implementation. Switch over to drm_atomic_helper_dirty_fb() and handle screen updates in the primary plane's atomic_update function. With dirty_fb out of the way, we can further replace struct vbox_frammebuffer with generic code. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191011134808.3955-3-tzimmermann@suse.de commit 2695eae1f6d3a5b513735a1d7f4e187414381bee Author: Thomas Zimmermann Date: Fri Oct 11 15:48:06 2019 +0200 drm/vboxvideo: Switch to generic fbdev emulation There's nothing special about vboxvideo's fbdev emulation that is not provided by the generic implementation. Switch over and remove the driver's code. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191011134808.3955-2-tzimmermann@suse.de commit 42bb97b80f2e3bf592e3e99d109b67309aa1b30e Author: Ezequiel Garcia Date: Wed Oct 2 14:29:23 2019 -0300 iommu: rockchip: Free domain on .domain_free IOMMU domain resource life is well-defined, managed by .domain_alloc and .domain_free. Therefore, domain-specific resources shouldn't be tied to the device life, but instead to its domain. Signed-off-by: Ezequiel Garcia Reviewed-by: Robin Murphy Acked-by: Heiko Stuebner Signed-off-by: Joerg Roedel commit 89dca86d29b46f2a5f38ea6476cfd441bd205d25 Author: Brian Norris Date: Mon Oct 14 14:26:48 2019 -0700 rtw88: mark rtw_fw_hdr __packed The use of u8 and __le16 in this struct assumes that it's going to be packed to byte alignment. C doesn't guarantee that, so we should mark this __packed. Fixes: cc20a7139836 ("rtw88: use struct rtw_fw_hdr to access firmware header") Cc: Ping-Ke Shih Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 2948d192169356b9361331a62e09bae5219a37f4 Author: Pierre-Louis Bossart Date: Mon Sep 16 13:57:39 2019 -0500 soundwire: intel: remove X86 dependency This is not needed and may generate unmet dependencies when COMPILE_TEST is used for SOF. ACPI is required, and should be tested when selecting this option. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190916185739.32184-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit df72b71921195015e3a8ce772a9ad79442bf0de3 Author: Pierre-Louis Bossart Date: Mon Sep 16 13:57:38 2019 -0500 soundwire: intel: add missing headers for cross-compilation readl/writel and ioread32 are used without the relevant headers, fix. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190916185739.32184-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit d9f45ab9e671166004b75427f10389e1f70cfc30 Author: Florian Fainelli Date: Tue Oct 15 10:36:24 2019 -0700 net: bcmgenet: Add a shutdown callback Make sure that we completely quiesce the network device, including its DMA to avoid having it continue to receive packets while there is no software alive to service those. Signed-off-by: Florian Fainelli Acked-by: Doug Berger Signed-off-by: David S. Miller commit 554032cdfbf4491f38241a3f6b27459408d90df3 Author: Russell King Date: Tue Oct 15 11:28:46 2019 +0100 net: phylink: use more linkmode_* Use more linkmode_* helpers rather than open-coding the bitmap operations. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4980b2c4fe55b9244990ae257d1fb659c6eb5cd7 Author: Roman Mashak Date: Mon Oct 14 18:18:29 2019 -0400 tc-testing: updated pedit test cases Added TDC test cases for Ethernet LAYERED_OP operations: - set single source Ethernet MAC - set single destination Ethernet MAC - set single invalid destination Ethernet MAC - set Ethernet type - invert source/destination/type fields - add operation on Ethernet type field Signed-off-by: Roman Mashak Signed-off-by: David S. Miller commit d033716331bb05277814b7f7725db19188f2277c Author: Florian Fainelli Date: Mon Oct 14 14:20:00 2019 -0700 net: bcmgenet: Generate a random MAC if none is valid Instead of having a hard failure and stopping the driver's probe routine, generate a random Ethernet MAC address to keep going. Signed-off-by: Florian Fainelli Acked-by: Doug Berger Signed-off-by: David S. Miller commit e9c43add67538d3efec62ffc789e1fccdb77f6f8 Author: Eric Dumazet Date: Mon Oct 14 10:40:32 2019 -0700 net_sched: sch_fq: remove one obsolete check in fq_dequeue() After commit eeb84aa0d0aff ("net_sched: sch_fq: do not assume EDT packets are ordered"), all skbs get a non zero time_to_send in flow_queue_add() This means @time_next_packet variable in fq_dequeue() can no longer be zero. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 6570bc79c0dfff0f228b7afd2de720fb4e84d61d Author: Alexander Lobakin Date: Mon Oct 14 11:00:33 2019 +0300 net: core: use listified Rx for GRO_NORMAL in napi_gro_receive() Commit 323ebb61e32b4 ("net: use listified RX for handling GRO_NORMAL skbs") made use of listified skb processing for the users of napi_gro_frags(). The same technique can be used in a way more common napi_gro_receive() to speed up non-merged (GRO_NORMAL) skbs for a wide range of drivers including gro_cells and mac80211 users. This slightly changes the return value in cases where skb is being dropped by the core stack, but it seems to have no impact on related drivers' functionality. gro_normal_batch is left untouched as it's very individual for every single system configuration and might be tuned in manual order to achieve an optimal performance. Signed-off-by: Alexander Lobakin Acked-by: Edward Cree Signed-off-by: David S. Miller commit 688f1dfb69b4efd111121d0b185c7eec1b184a00 Author: Anson Huang Date: Tue Oct 15 17:27:21 2019 -0700 Input: keyboard - imx_sc: Add i.MX system controller key support i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller inside, the system controller is in charge of controlling power, clock and scu key etc.. Adds i.MX system controller key driver support, Linux kernel has to communicate with system controller via MU (message unit) IPC to get scu key's status. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1570412509-7893-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Dmitry Torokhov commit ee358cb45984f4569098d3a97edfd0067576ad2f Author: Michal Vokáč Date: Tue Oct 15 17:17:29 2019 -0700 Input: mpr121 - add polling mode In case the interrupt line is not available, polling can be used to read out the state of the keys. Period of the polling needs to be configured by the poll-interval DT property. Signed-off-by: Michal Vokáč Reviewed-by: Rob Herring Signed-off-by: Dmitry Torokhov commit def10ec7992f037140f3bd9542d1242cfd2027d4 Author: Michal Vokáč Date: Tue Oct 15 17:16:52 2019 -0700 dt-bindings: input: Convert mpr121 binding to json-schema Convert the mpr121 binding to DT schema format using json-schema. Signed-off-by: Michal Vokáč Reviewed-by: Rob Herring Signed-off-by: Dmitry Torokhov commit 7cef1079e3ad0403bf9a2bb67228044efdded6c8 Author: Michal Vokáč Date: Tue Oct 15 17:16:38 2019 -0700 dt-bindings: input: Add common input binding in json-schema Create schema for the common input properties and merge all properties from the Documentation/devicetree/bindings/input/keys.txt binding into this common schema. Signed-off-by: Michal Vokáč Reviewed-by: Rob Herring Signed-off-by: Dmitry Torokhov commit 77ffe33363c02c51c70303d6b79bab70451ba83e Author: Himadri Pandya Date: Sun Oct 13 00:30:21 2019 +0000 hv_sock: use HV_HYP_PAGE_SIZE for Hyper-V communication Current code assumes PAGE_SIZE (the guest page size) is equal to the page size used to communicate with Hyper-V (which is always 4K). While this assumption is true on x86, it may not be true for Hyper-V on other architectures. For example, Linux on ARM64 may have PAGE_SIZE of 16K or 64K. A new symbol, HV_HYP_PAGE_SIZE, has been previously introduced to use when the Hyper-V page size is intended instead of the guest page size. Make this code work on non-x86 architectures by using the new HV_HYP_PAGE_SIZE symbol instead of PAGE_SIZE, where appropriate. Also replace the now redundant PAGE_SIZE_4K with HV_HYP_PAGE_SIZE. The change has no effect on x86, but lays the groundwork to run on ARM64 and others. Signed-off-by: Himadri Pandya Reviewed-by: Michael Kelley Signed-off-by: David S. Miller commit 5bc60de50dfea235634fdf38cbc992fb968d113b Author: Jiri Pirko Date: Tue Oct 15 12:00:56 2019 +0200 selftests: bpf: Don't try to read files without read permission Recently couple of files that are write only were added to netdevsim debugfs. Don't read these files and avoid error. Reported-by: kernel test robot Signed-off-by: Jiri Pirko Signed-off-by: Alexei Starovoitov Acked-by: Jakub Kicinski commit 95fbda1e37384b9c270218b52718c83ddf4bb34e Author: Stanislav Fomichev Date: Tue Oct 15 11:31:25 2019 -0700 selftests: bpf: Add selftest for __sk_buff tstamp Make sure BPF_PROG_TEST_RUN accepts tstamp and exports any modifications that BPF program does. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191015183125.124413-2-sdf@google.com commit ba94094818a811758570990648160a6ba2ca05cb Author: Stanislav Fomichev Date: Tue Oct 15 11:31:24 2019 -0700 bpf: Allow __sk_buff tstamp in BPF_PROG_TEST_RUN It's useful for implementing EDT related tests (set tstamp, run the test, see how the tstamp is changed or observe some other parameter). Note that bpf_ktime_get_ns() helper is using monotonic clock, so for the BPF programs that compare tstamp against it, tstamp should be derived from clock_gettime(CLOCK_MONOTONIC, ...). Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191015183125.124413-1-sdf@google.com commit 984829e2d39b5ba9f817198d701c85511ef40528 Author: Dan Haab Date: Wed Oct 2 09:57:26 2019 -0600 ARM: dts: BCM5301X: Add DT for Luxul XWC-2000 It's a simple network device based on BCM47094 with just a single Ethernet port. Signed-off-by: Dan Haab Signed-off-by: Florian Fainelli commit da927466a152a9497c05926a95c6aebba6d3ad5b Merge: 14f2cf607ccd c7566a69695c Author: Alexei Starovoitov Date: Tue Oct 15 16:06:05 2019 -0700 Merge branch 'libbpf-field-existence' Andrii Nakryiko says: ==================== This patch set generalizes libbpf's CO-RE relocation support. In addition to existing field's byte offset relocation, libbpf now supports field existence relocations, which are emitted by Clang when using __builtin_preserve_field_info(, BPF_FIELD_EXISTS). A convenience bpf_core_field_exists() macro is added to bpf_core_read.h BPF-side header, along the bpf_field_info_kind enum containing currently supported types of field information libbpf supports. This list will grow as libbpf gains support for other relo kinds. This patch set upgrades the format of .BTF.ext's relocation record to match latest Clang's format (12 -> 16 bytes). This is not a breaking change, as the previous format hasn't been released yet as part of official Clang version release. v1->v2: - unify bpf_field_info_kind enum and naming changes (Alexei); - added bpf_core_field_exists() to bpf_core_read.h. ==================== Signed-off-by: Alexei Starovoitov commit c7566a69695cd3d8fe876c0da38a03a7472d3f56 Author: Andrii Nakryiko Date: Tue Oct 15 11:28:49 2019 -0700 selftests/bpf: Add field existence CO-RE relocs tests Add a bunch of tests validating CO-RE is handling field existence relocation. Relaxed CO-RE relocation mode is activated for these new tests to prevent libbpf from rejecting BPF object for no-match relocation, even though test BPF program is not going to use that relocation, if field is missing. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191015182849.3922287-6-andriin@fb.com commit 01340e31915bc73bf33a8f912ff1b74d514b8d79 Author: Andrii Nakryiko Date: Tue Oct 15 11:28:48 2019 -0700 libbpf: Add BPF-side definitions of supported field relocation kinds Add enum definition for Clang's __builtin_preserve_field_info() second argument (info_kind). Currently only byte offset and existence are supported. Corresponding Clang changes introducing this built-in can be found at [0] [0] https://reviews.llvm.org/D67980 Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191015182849.3922287-5-andriin@fb.com commit 62561eb442bd095f06534ce637b116b278e5e912 Author: Andrii Nakryiko Date: Tue Oct 15 11:28:47 2019 -0700 libbpf: Add support for field existance CO-RE relocation Add support for BPF_FRK_EXISTS relocation kind to detect existence of captured field in a destination BTF, allowing conditional logic to handle incompatible differences between kernels. Also introduce opt-in relaxed CO-RE relocation handling option, which makes libbpf emit warning for failed relocations, but proceed with other relocations. Instruction, for which relocation failed, is patched with (u32)-1 value. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191015182849.3922287-4-andriin@fb.com commit 291ee02b5e407eb1eb99c9eeaa968ef8a0c16949 Author: Andrii Nakryiko Date: Tue Oct 15 11:28:46 2019 -0700 libbpf: Refactor bpf_object__open APIs to use common opts Refactor all the various bpf_object__open variations to ultimately specify common bpf_object_open_opts struct. This makes it easy to keep extending this common struct w/ extra parameters without having to update all the legacy APIs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191015182849.3922287-3-andriin@fb.com commit 511bb0085c6fe48353c35cd3d25f4f8720579a6d Author: Andrii Nakryiko Date: Tue Oct 15 11:28:45 2019 -0700 libbpf: Update BTF reloc support to latest Clang format BTF offset reloc was generalized in recent Clang into field relocation, capturing extra u32 field, specifying what aspect of captured field needs to be relocated. This changes .BTF.ext's record size for this relocation from 12 bytes to 16 bytes. Given these format changes happened in Clang before official released version, it's ok to not support outdated 12-byte record size w/o breaking ABI. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191015182849.3922287-2-andriin@fb.com commit e17b932290bf4cabe7fd4dd7cbd789dcd49c7df5 Merge: 14f2cf607ccd 5bd29b9b3575 Author: David S. Miller Date: Tue Oct 15 15:02:30 2019 -0700 Merge branch 'mlxsw-Add-support-for-400Gbps-50Gbps-per-lane-link-modes' Jiri Pirko says: ==================== mlxsw: Add support for 400Gbps (50Gbps per lane) link modes Add 400Gbps bits to ethtool and introduce support in mlxsw. These modes are supported by the Spectrum-2 switch ASIC. ==================== Signed-off-by: David S. Miller commit 5bd29b9b357569d2be6de29eaa79a7dfc215b0e8 Author: Jiri Pirko Date: Sat Oct 12 18:27:58 2019 +0200 mlxsw: spectrum: Add support for 400Gbps (50Gbps per lane) link modes Extend speed support with 400Gbps Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 14af7fd1d4279c8db7fbbb3ca0df3b13179eb502 Author: Jiri Pirko Date: Sat Oct 12 18:27:57 2019 +0200 ethtool: Add support for 400Gbps (50Gbps per lane) link modes Add support for 400Gbps speed, link modes of 50Gbps per lane Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 35ff867b76576e32f34c698ccd11343f7d616204 Author: Pierre Crégut Date: Wed Sep 11 09:27:36 2019 +0200 PCI/IOV: Serialize sysfs sriov_numvfs reads vs writes When sriov_numvfs is being updated, we call the driver->sriov_configure() function, which may enable VFs and call probe functions, which may make new devices visible. This all happens before before sriov_numvfs_store() updates sriov->num_VFs, so previously, concurrent sysfs reads of sriov_numvfs returned stale values. Serialize the sysfs read vs the write so the read returns the correct num_VFs value. [bhelgaas: hold device_lock instead of checking mutex_is_locked()] Link: https://bugzilla.kernel.org/show_bug.cgi?id=202991 Link: https://lore.kernel.org/r/20190911072736.32091-1-pierre.cregut@orange.com Signed-off-by: Pierre Crégut Signed-off-by: Bjorn Helgaas commit 56b4cd4b7da9ee95778eb5c8abea49f641ebfd91 Author: Slawomir Pawlowski Date: Tue Sep 17 09:20:48 2019 +0000 PCI: Add DMA alias quirk for Intel VCA NTB Intel Visual Compute Accelerator (VCA) is a family of PCIe add-in devices exposing computational units via Non Transparent Bridges (NTB, PEX 87xx). Similarly to MIC x200, we need to add DMA aliases to allow buffer access when IOMMU is enabled. Add aliases to allow computational unit access to host memory. These aliases mark the whole VCA device as one IOMMU group. All possible slot numbers (0x20) are used, since we are unable to tell what slot is used on other side. This quirk is intended for both host and computational unit sides. The VCA devices have up to five functions: four for DMA channels and one additional. Link: https://lore.kernel.org/r/5683A335CC8BE1438C3C30C49DCC38DF637CED8E@IRSMSX102.ger.corp.intel.com Signed-off-by: Slawomir Pawlowski Signed-off-by: Przemek Kitszel Signed-off-by: Bjorn Helgaas commit d8558ac8c93d429d65d7490b512a3a67e559d0d4 Author: Steffen Liebergeld Date: Wed Sep 18 15:16:52 2019 +0200 PCI: Fix Intel ACS quirk UPDCR register address According to documentation [0] the correct offset for the Upstream Peer Decode Configuration Register (UPDCR) is 0x1014. It was previously defined as 0x1114. d99321b63b1f ("PCI: Enable quirks for PCIe ACS on Intel PCH root ports") intended to enforce isolation between PCI devices allowing them to be put into separate IOMMU groups. Due to the wrong register offset the intended isolation was not fully enforced. This is fixed with this patch. Please note that I did not test this patch because I have no hardware that implements this register. [0] https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/4th-gen-core-family-mobile-i-o-datasheet.pdf (page 325) Fixes: d99321b63b1f ("PCI: Enable quirks for PCIe ACS on Intel PCH root ports") Link: https://lore.kernel.org/r/7a3505df-79ba-8a28-464c-88b83eefffa6@kernkonzept.com Signed-off-by: Steffen Liebergeld Signed-off-by: Bjorn Helgaas Reviewed-by: Andrew Murray Acked-by: Ashok Raj Cc: stable@vger.kernel.org # v3.15+ commit fef2dd8b3966517172514ea5a89104ba7745678b Author: Bjorn Helgaas Date: Wed Oct 9 16:47:15 2019 -0500 PCI/ATS: Make pci_restore_pri_state(), pci_restore_pasid_state() private These interfaces: void pci_restore_pri_state(struct pci_dev *pdev); void pci_restore_pasid_state(struct pci_dev *pdev); are only used in drivers/pci and do not need to be seen by the rest of the kernel. Most them to drivers/pci/pci.h so they're private to the PCI subsystem. Signed-off-by: Bjorn Helgaas Reviewed-by: Joerg Roedel commit d355bb2097834a977a6f47cec003b7d7748adbd6 Author: Bjorn Helgaas Date: Wed Oct 9 16:41:04 2019 -0500 PCI/ATS: Remove unnecessary EXPORT_SYMBOL_GPL() The following functions are only used by the PCI core or by IOMMU drivers that cannot be modular, so there's no need to export them at all: pci_enable_ats() pci_disable_ats() pci_restore_ats_state() pci_ats_queue_depth() pci_ats_page_aligned() pci_enable_pri() pci_restore_pri_state() pci_reset_pri() pci_prg_resp_pasid_required() pci_enable_pasid() pci_disable_pasid() pci_restore_pasid_state() pci_pasid_features() pci_max_pasids() Remove the unnecessary EXPORT_SYMBOL_GPL()s. Signed-off-by: Bjorn Helgaas Reviewed-by: Joerg Roedel commit c6e9aefbf9db818d60818aa5540d78c1da289aae Author: Bjorn Helgaas Date: Wed Oct 9 16:27:30 2019 -0500 PCI/ATS: Remove unused PRI and PASID stubs The following functions are only used by amd_iommu.c and intel-iommu.c (when CONFIG_INTEL_IOMMU_SVM is enabled). CONFIG_PCI_PRI and CONFIG_PCI_PASID are always defined in those cases, so there's no need for the stubs. pci_enable_pri() pci_disable_pri() pci_reset_pri() pci_prg_resp_pasid_required() pci_enable_pasid() pci_disable_pasid() Remove the unused stubs. Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Joerg Roedel commit b24d5c2098596a41cf187af41287777a2e0dd753 Author: Krzysztof Wilczynski Date: Sat Sep 14 23:30:32 2019 +0200 PCI/ATS: Consolidate ATS declarations in linux/pci-ats.h Move ATS function prototypes from include/linux/pci.h to include/linux/pci-ats.h as the ATS, PRI, and PASID interfaces are related and are used only by the IOMMU drivers. This effectively reverts ff9bee895c4d ("PCI: Move ATS declarations to linux/pci.h so they're all together"). Also, remove surplus forward declaration of struct pci_ats from include/linux/pci.h, as it is no longer needed, since struct pci_ats was embedded directly into struct pci_dev by d544d75ac96a ("PCI: Embed ATS info directly into struct pci_dev"). No functional changes intended. Link: https://lore.kernel.org/r/20190914213032.22314-1-kw@linux.com Signed-off-by: Krzysztof Wilczynski Signed-off-by: Bjorn Helgaas commit e5adf79a1d8086aefa56f48eeb08f8fe4e054a3d Author: Bjorn Helgaas Date: Wed Oct 9 16:07:51 2019 -0500 PCI/ATS: Cache PRI PRG Response PASID Required bit The PRG Response PASID Required bit in the PRI Capability is read-only. Read it once when we enumerate the device and cache the value so we don't need to read it again. Based-on-patch-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas commit 751035b8dc061ae434c3311bac9cd6d0e5e00f94 Author: Kuppuswamy Sathyanarayanan Date: Thu Sep 5 14:31:46 2019 -0500 PCI/ATS: Cache PASID Capability offset Previously each PASID interface searched for the PASID Capability. Cache the capability offset the first time we use it instead of searching each time. [bhelgaas: commit log, reorder patch to later, call pci_pasid_init() from pci_init_capabilities()] Link: https://lore.kernel.org/r/4957778959fa34eab3e8b3065d1951989c61cb0f.1567029860.git.sathyanarayanan.kuppuswamy@linux.intel.com Link: https://lore.kernel.org/r/20190905193146.90250-6-helgaas@kernel.org Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas commit c065190bbcd4fb54ce9c5fd34fcad71acf2a0ea4 Author: Kuppuswamy Sathyanarayanan Date: Thu Sep 5 14:31:45 2019 -0500 PCI/ATS: Cache PRI Capability offset Previously each PRI interface searched for the PRI Capability. Cache the capability offset the first time we use it instead of searching each time. [bhelgaas: commit log, reorder patch to later, call pci_pri_init() from pci_init_capabilities()] Link: https://lore.kernel.org/r/0c5495d376faf6dbb8eb2165204c474438aaae65.156 7029860.git.sathyanarayanan.kuppuswamy@linux.intel.com Link: https://lore.kernel.org/r/20190905193146.90250-5-helgaas@kernel.org Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas commit 3ad62192097443e8c3a8e244475bacaecb894d4e Author: Kuppuswamy Sathyanarayanan Date: Thu Sep 5 14:31:44 2019 -0500 PCI/ATS: Disable PF/VF ATS service independently Previously we didn't disable the PF ATS until all associated VFs had disabled it. But per PCIe spec r5.0, sec 9.3.7.8, the ATS Capability in VFs and associated PFs may be enabled independently. Leaving ATS enabled in the PF unnecessarily may have power and performance impacts. Remove this dependency logic in the ATS enable/disable code. [bhelgaas: commit log] Suggested-by: Ashok Raj Link: https://lore.kernel.org/r/8163ab8fa66afd2cba514ae95d29ab12104781aa.1567029860.git.sathyanarayanan.kuppuswamy@linux.intel.com Link: https://lore.kernel.org/r/20190905193146.90250-4-helgaas@kernel.org Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas Cc: Ashok Raj Cc: Keith Busch commit 2b0ae7cc3bfc3fae124c25870f41291c670b4549 Author: Kuppuswamy Sathyanarayanan Date: Thu Sep 5 14:31:43 2019 -0500 PCI/ATS: Handle sharing of PF PASID Capability with all VFs Per PCIe r5.0, sec 9.3.7.14, if a PF implements the PASID Capability, the PF PASID configuration is shared by its VFs. VFs must not implement their own PASID Capability. Since VFs don't have a PASID Capability, pci_enable_pasid() always failed, which caused IOMMU setup to fail. Update the PASID interfaces so for VFs they reflect the state of the PF PASID. [bhelgaas: rebase without pasid_cap caching, commit log] Suggested-by: Ashok Raj Link: https://lore.kernel.org/r/8ba1ac192e4ac737508b6ac15002158e176bab91.1567029860.git.sathyanarayanan.kuppuswamy@linux.intel.com Link: https://lore.kernel.org/r/20190905193146.90250-3-helgaas@kernel.org Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas Cc: Ashok Raj Cc: Keith Busch commit 9bf49e36d7183a170a9906d19acc5254818fc574 Author: Kuppuswamy Sathyanarayanan Date: Thu Sep 5 14:31:42 2019 -0500 PCI/ATS: Handle sharing of PF PRI Capability with all VFs Per PCIe r5.0, sec 9.3.7.11, VFs must not implement the PRI Capability. If the PF implements PRI, it is shared by the VFs. Since VFs don't have a PRI Capability, pci_enable_pri() always failed, which caused IOMMU setup to fail. Update the PRI interfaces so for VFs they reflect the state of the PF PRI. [bhelgaas: rebase without pri_cap caching, commit log] Suggested-by: Ashok Raj Link: https://lore.kernel.org/r/b971e31f8695980da8e4a7f93e3b6a3edba3edaa.1567029860.git.sathyanarayanan.kuppuswamy@linux.intel.com Link: https://lore.kernel.org/r/20190905193146.90250-2-helgaas@kernel.org Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas Cc: Ashok Raj Cc: Keith Busch commit 8cbb8a9374a271099bacdc890fb16d374261332b Author: Bjorn Helgaas Date: Wed Oct 9 14:54:01 2019 -0500 PCI/ATS: Move pci_prg_resp_pasid_required() to CONFIG_PCI_PRI pci_prg_resp_pasid_required() returns the value of the "PRG Response PASID Required" bit from the PRI capability, but the interface was previously defined under #ifdef CONFIG_PCI_PASID. Move it from CONFIG_PCI_PASID to CONFIG_PCI_PRI so it's with the other PRI-related things. Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Joerg Roedel commit fd872843ecd52820654dcacf85e680d8101a9fde Author: Bjorn Helgaas Date: Wed Oct 9 15:14:05 2019 -0500 iommu/vt-d: Select PCI_PRI for INTEL_IOMMU_SVM Previously intel-iommu.c depended on CONFIG_AMD_IOMMU in an undesirable way. When CONFIG_INTEL_IOMMU_SVM=y, iommu_enable_dev_iotlb() calls PRI interfaces (pci_reset_pri() and pci_enable_pri()), but those are only implemented when CONFIG_PCI_PRI is enabled. The INTEL_IOMMU_SVM Kconfig did nothing with PCI_PRI, but AMD_IOMMU selects PCI_PRI. So if AMD_IOMMU was enabled, intel-iommu.c got the full PRI interfaces, but if AMD_IOMMU was not enabled, it got the PRI stubs. Make the iommu_enable_dev_iotlb() behavior independent of AMD_IOMMU by having INTEL_IOMMU_SVM select PCI_PRI so iommu_enable_dev_iotlb() always uses the full implementations of PRI interfaces. Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Jerry Snitselaar Reviewed-by: Joerg Roedel Acked-by: Joerg Roedel commit f3a36d469621e52a04392820fa96bc4f2a9d29e7 Author: Biju Das Date: Mon Sep 30 10:28:51 2019 +0100 dt-bindings: display: renesas: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit cfbcf6eb67e1cebe46978b1dd76116948bdeb7db Author: Biju Das Date: Mon Sep 30 10:15:05 2019 +0100 drm: rcar-du: lvds: Add r8a774b1 support The LVDS encoders on RZ/G2N SoC is similar to R-Car M3-N. Add support for RZ/G2N (R8A774B1) SoC to the LVDS encoder driver. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 86db9f28224e8f6089b80e1391bdda0eabdf473b Author: Biju Das Date: Mon Sep 30 10:15:04 2019 +0100 dt-bindings: display: renesas: lvds: Document r8a774b1 bindings Document the RZ/G2N (R8A774B1) LVDS bindings. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Acked-by: Rob Herring commit 47968ea96af335b56a0db6c305146e720363558c Author: Biju Das Date: Mon Sep 30 10:15:03 2019 +0100 drm: rcar-du: Add R8A774B1 support Add support for the R8A774B1 DU (which is very similar to the R8A77965 DU except that it lacks TCON and CMM); it has one RGB output, one LVDS output and one HDMI output. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 2d4794f19a86fbfa5e74537b6cc1171414877724 Author: Biju Das Date: Mon Sep 30 10:15:02 2019 +0100 dt-bindings: display: renesas: du: Document the r8a774b1 bindings Document the RZ/G2N (R8A774B1) SoC in the R-Car DU bindings. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Acked-by: Rob Herring commit 3986457110a054466bf02f9c4a85aa2bba96177b Author: Geert Uytterhoeven Date: Tue Sep 17 08:23:53 2019 +0200 drm: rcar_lvds: Fix color mismatches on R-Car H2 ES2.0 and later Commit 5cca30ebe089be23 ("drm/rcar-du: Add LVDS_LANES quirk") states that LVDS lanes 1 and 3 are inverted on R-Car H2 ES1 only, and that the problem has been fixed in newer revisions. However, the code didn't take into account the actual hardware revision, thus applying the quirk also on newer hardware revisions, causing green color reversals. Fix this by applying the quirk when running on R-Car H2 ES1.x only. Reported-by: Yoshihiro Shimoda Fixes: 5cca30ebe089be23 ("drm/rcar-du: Add LVDS_LANES quirk") Signed-off-by: Geert Uytterhoeven Tested-by: Yoshihiro Shimoda Reviewed-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 0a370db816f8632bc71d7d0c6f59a82d2934f0df Author: Jacopo Mondi Date: Fri Sep 6 15:50:12 2019 +0200 drm: rcar-du: kms: Expand comment in vsps parsing routine Expand comment in the 'vsps' parsing routine to specify the LIF channel index defaults to 0 in case the second cell of the property is not specified to remain compatible with older DT bindings. Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart commit 687aaf386aeb551130f31705ce40d1341047a936 Author: Heiner Kallweit Date: Sat Oct 5 14:07:18 2019 +0200 PCI/ASPM: Add pcie_aspm_get_link() Factor out getting the link associated with a pci_dev and use this helper where appropriate. In addition this helper will be used in a subsequent patch of this series. Link: https://lore.kernel.org/r/19d33770-29de-a9af-4d85-f2b30269d383@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit a7118662734a3f97622d8274708cb61fd53d693a Author: Vincent Pelletier Date: Tue Mar 26 16:51:38 2019 +0200 iio: adc: intel_mrfld_adc: Add Basin Cove ADC driver Exposes the ADC device present on, at least, Intel Merrifield platform. Based on work done by: Yang Bin Huiquan Zhong Sumeet Pawnikar Pavan Kumar S Though it has been heavily rewritten for upstream. Signed-off-by: Vincent Pelletier Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit eb1850c562cb0fcba6fee3c57e7dafa184e18556 Author: Lorenzo Bianconi Date: Mon Oct 7 11:43:38 2019 +0200 dt-bindings: iio: imu: st_lsm6dsx: add lsm6ds0 device bindings Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit fa060a3d9cebfefc87158ceab1f550355f5e4e0b Author: Lorenzo Bianconi Date: Mon Oct 7 11:43:37 2019 +0200 iio: imu: st_lsm6dsx: add support to LSM6DS0 Add support to STM LSM6DS0 6-axis (acc + gyro) Mems sensor Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 1b3751017e09f0857bc38f9b1be08dce38f3d92c Author: Lorenzo Bianconi Date: Mon Oct 7 11:12:13 2019 +0200 iio: imu: st_lsm6dsx: fix gyro gain definitions for LSM9DS1 Fix typos in gyro gain definitions for LSM9DS1 sensor Fixes: 52f4b1f19679 ("iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit c991bf9b650f39481cf3c1137092d4754a2c75de Author: Alexandru Ardelean Date: Mon Oct 7 11:26:42 2019 +0300 iio: dac: ad7303: replace mlock with own lock This change replaces indio_dev's mlock with the driver's own lock. The lock is mostly needed to protect state when changing the `dac_cache` info. The lock has been extended to `ad7303_read_raw()`, to make sure that the cache is updated if an SPI-write is already in progress. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit af8dc7bf4ea2bbef4b4b87f3f29c139fe4561d6e Author: Andreas Klinger Date: Mon Oct 7 19:02:20 2019 +0200 dt-bindings: iio: maxbotix,mb1232.yaml: transform to yaml transform existing documentation of maxbotix,mb1232 ultrasonic ranger from text documentation format into yaml. Changes in v3: - add a i2c node around device node to set up #address-cells and #size-cells for omitting error during make dt_binding_check Changes in v2: - removed description of reg property - added a line: additionalProperties: false Signed-off-by: Andreas Klinger Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit cb3b6b8e1bc0456d15a40a4bc3f95ad214340fed Author: Mario Tesi Date: Mon Oct 7 15:56:26 2019 +0200 iio: imu: st_lsm6dsx: add odr calibration feature On LSM6DSO/LSM6DSR/LSM6DSOX/ASM330LHH and ISH330DHCX devices it is possible to trim the hardware timestamp resolution through the FREQ_FINE[7:0] bits of the INTERNAL_FREQ_FINE register, which contains the difference in percentage of the effective ODR (and timestamp rate) with respect to the typical value. The formula for calculating the effective ODR reported in the application notes has been linearized to the first order to simplify the calculation (pls. see note on source code). This change may be useful in the outcome of CTS tests regarding the SingleSensorTests and the SensorTest#testSensorTimeStamps for high ODRs Signed-off-by: Mario Tesi Acked-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 960506ed2c69a87a2004556624c8f702391b2e43 Author: Lorenzo Bianconi Date: Tue Oct 8 14:05:02 2019 +0200 iio: imu: st_lsm6dsx: enable drdy-mask if available Enable drdy mask if available in order to mark invalid samples during sensor bootstrap phase Tested-by: Mario Tesi Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 9d8e91d9169c53301afe861cdd15e3b98155e82f Author: Fabrice Gasnier Date: Wed Oct 9 15:48:38 2019 +0200 iio: dac: stm32: add power management support Add support for runtime PM & sleep. Provide pclk to regmap as registers access doesn't need full power (e.g. regulator). Always restore HFSEL when resuming. It may get lost depending on low power level that has been achieved. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit 3ea39d61eea6af614fe166814c9e5cb8cff0e8c3 Author: Lorenzo Bianconi Date: Sun Oct 6 15:22:07 2019 +0200 iio: imu: st_lsm6dsx: enable wake-up event for LSM6DSO Add missing wake-up register info for LSM6DSO/LSM6DSOX sensor Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 21119a5dbf721748f03e35b50a2a2b1d5392d297 Author: Lorenzo Bianconi Date: Sun Oct 6 15:22:06 2019 +0200 dt-bindings: iio: imu: st_lsm6dsx: document missing wakeup-source property Signed-off-by: Lorenzo Bianconi Reviewed-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit 3473b923b3a2ba961f2713c18cdb4e85d0998d81 Author: Lorenzo Bianconi Date: Sun Oct 6 15:22:05 2019 +0200 iio: imu: st_lsm6dsx: add missing kernel documenation Add missing kernel doc for st_lsm6dsx_hw data structure Signed-off-by: Lorenzo Bianconi Reviewed-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit b7a73b33bb39575848df66c4bff09cd281652882 Author: Lorenzo Bianconi Date: Sun Oct 6 15:22:04 2019 +0200 iio: imu: st_lsm6dsx: add wakeup_source in st_sensors_platform_data Add the possibility to enable/disable wakeup source through st_sensors_platform_data and not only through device tree Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit b307f495468b455d3f85f8715e5b7cd83937a76a Author: Lorenzo Bianconi Date: Sun Oct 6 15:22:03 2019 +0200 iio: imu: st_lsm6dsx: fix checkpatch warning Fix following checkpatch warnings: CHECK: Alignment should match open parenthesis +static int st_lsm6dsx_read_event(struct iio_dev *iio_dev, + const struct iio_chan_spec *chan, CHECK: Alignment should match open parenthesis +static int st_lsm6dsx_write_event(struct iio_dev *iio_dev, + const struct iio_chan_spec *chan, CHECK: Alignment should match open parenthesis +static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev, + const struct iio_chan_spec *chan, CHECK: Alignment should match open parenthesis +static int st_lsm6dsx_write_event_config(struct iio_dev *iio_dev, + const struct iio_chan_spec *chan, WARNING: line over 80 characters + if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source")) Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit d278d4479402d9cd653bfa5714399410f4196445 Author: Lorenzo Bianconi Date: Sun Oct 6 15:22:02 2019 +0200 iio: imu: st_lsm6dsx: grab conf mutex in st_lsm6dsx_write_event_config Always grub conf mutex in st_lsm6dsx_write_event_config since it can run concurrently with FIFO configuration Fixes: b5969abfa8b8 ("iio: imu: st_lsm6dsx: add motion events") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 04ca37d5ade99aaf49b662da8142926c981d154f Author: Lorenzo Bianconi Date: Sun Oct 6 15:22:01 2019 +0200 iio: imu: st_lsm6dsx: rely on st_lsm6dsx_update_bits_locked configuring events Rely on st_lsm6dsx_update_bits_locked in st_lsm6dsx_write_event and st_lsm6dsx_event_setup routines since they can run concurrently with sensor hub configuration Fixes: b5969abfa8b8 ("iio: imu: st_lsm6dsx: add motion events") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 84b2e7c319b8e9707c9c62eeeaf9cf937ef36cbd Author: Lorenzo Bianconi Date: Sun Oct 6 15:22:00 2019 +0200 iio: imu: st_lsm6dsx: always check enable_reg in st_lsm6dsx_event_setup Check if enable_reg of event_settings data structure is defined before writing on it Fixes: b5969abfa8b8 ("iio: imu: st_lsm6dsx: add motion events") Signed-off-by: Lorenzo Bianconi Tested-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit 66b662a1760e4c21af6f3aaf8dd575363c174473 Author: Lorenzo Bianconi Date: Sun Oct 6 15:21:59 2019 +0200 iio: imu: st_lsm6dsx: move bdu/boot and reset register info in hw_settings Move bdu, boot and reset register definitions in hw_settings register map since not all supported sensors (e.g lsm9ds1) rely on the same definitions Fixes: 52f4b1f19679 ("iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 31fe8d4e0fd559880bcb54c02d939e228ba18080 Author: Lorenzo Bianconi Date: Sun Oct 6 15:21:58 2019 +0200 iio: imu: st_lsm6dsx: do not access active-low/open-drain regs if not supported Move active low and open drain register definitions in hw_settings register map since not all supported sensors (e.g lsm9ds1) rely on the same definitions Fixes: 52f4b1f19679 ("iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 7e9061030dd60562fc4346efd84d2186ee65111b Author: Lorenzo Bianconi Date: Sun Oct 6 15:21:57 2019 +0200 iio: imu: st_lsm6dsx: move irq related definitions in irq_config Group irq related definition in irq_config structure in st_lsm6dsx_settings. This is a preliminary patch to move OpenDrain/Active low registers in st_lsm6dsx_settings. Signed-off-by: Lorenzo Bianconi Tested-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit a912ee4c91542e3746742611a656de1129f919b6 Author: Lorenzo Bianconi Date: Sun Oct 6 15:21:56 2019 +0200 iio: imu: st_lsm6dsx: add sanity check for read_fifo pointer Check read_fifo pointer before using it since we can't assume it is always set adding new sensors. This patch fixes the following crash: irq 277: nobody cared (try booting with the "irqpoll" option) CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.3.0-rc5-00322-g792b824-dirty #7 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xd8/0x10c) [] (dump_stack) from [] (__report_bad_irq+0x24/0xc0) [] (__report_bad_irq) from [] (note_interrupt+0x27c/0x2dc) [] (note_interrupt) from [] (handle_irq_event_percpu+0x54/0x7c) [] (handle_irq_event_percpu) from [] (handle_irq_event+0x38/0x5c) [] (handle_irq_event) from [] (handle_level_irq+0xc8/0x154) [] (handle_level_irq) from [] (generic_handle_irq+0x20/0x34) [] (generic_handle_irq) from [] (mxc_gpio_irq_handler+0xc4/0xf8) [] (mxc_gpio_irq_handler) from [] (mx3_gpio_irq_handler+0x64/0xb8) [] (mx3_gpio_irq_handler) from [] (generic_handle_irq+0x20/0x34) [] (generic_handle_irq) from [] (__handle_domain_irq+0x64/0xe0) [] (__handle_domain_irq) from [] (gic_handle_irq+0x4c/0xa0) [] (gic_handle_irq) from [] (__irq_svc+0x70/0x98) Exception stack(0xc1301f10 to 0xc1301f58 1f00: 00000001 00000006 00000000 c130c340 1f20: c1300000 c1308928 00000001 c1308960 00000000 c12b9db0 c1308908 00000000 1f40: 00000000 c1301f60 c0182010 c0109508 20000013 ffffffff [] (__irq_svc) from [] (arch_cpu_idle+0x20/0x3c) [] (arch_cpu_idle) from [] (do_idle+0x1bc/0x2bc) [] (do_idle) from [] (cpu_startup_entry+0x18/0x1c) [] (cpu_startup_entry) from [] (start_kernel+0x440/0x504) [] (start_kernel) from [<00000000>] (0x0) handlers: [<62052c0d>] st_lsm6dsx_handler_irq threaded [] st_lsm6dsx_handler_thread Fixes: 52f4b1f19679 ("iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1") Tested-by: Bobby Jones Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 615bd3785b5abf17e50c7940d4f0ce418b65176a Author: Lorenzo Bianconi Date: Sun Oct 6 15:21:55 2019 +0200 iio: imu: st_lsm6dsx: use st_lsm6dsx_read_locked in st_lsm6dsx_report_motion_event Rely on st_lsm6dsx_read_locked in st_lsm6dsx_report_motion_event since it can run concurrently with sensor hub configuration. Move event related code in st_lsm6dsx_report_motion_event Fixes: 1aabad1fb5e9 ("iio: imu: st_lsm6dsx: add motion report function and call from interrupt") Signed-off-by: Lorenzo Bianconi Tested-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit dbcc1fbe5d94796031ba91c417184e89de4cd4ec Author: Miquel Raynal Date: Fri Oct 11 16:43:47 2019 +0200 dt-bindings: Add max12xx SPI ADC series as trivial devices Update the compatible list with three Maxim ADCs compatibles. Signed-off-by: Miquel Raynal Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit 1a910d3aebed3290c9964dc1ab3fd5bca4b37ccc Author: Miquel Raynal Date: Fri Oct 11 16:43:46 2019 +0200 dt-bindings: Add 1027/1029/1031 SPI ADCs as trivial devices In the same time, remove the dedicated bindings file which is now useless. Signed-off-by: Miquel Raynal Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit 1689387487afaa68e5a91c454d78508b2d665b57 Author: Miquel Raynal Date: Fri Oct 11 16:43:45 2019 +0200 dt-bindings: iio: adc: max1027: Mark interrupts as optional The chips have a 'start conversion' and a 'end of conversion' pair of pins. They can be used but this is absolutely not mandatory as regular polling is supported by the chip depending on its internal clocking setup. There is no physical reason to force the use of interrupts so turn them optional. Also, once the interrupt turned optional, these devices fit perfectly the "trivial devices" described in the generic (yaml) bindings file, so instead of converting this text file to json schema, we can just add the relevant compatibles in: Documentation/devicetree/bindings/trivial-devices.yaml. Signed-off-by: Miquel Raynal Signed-off-by: Jonathan Cameron commit ae47d009b5088a61f13c9b87a5d1eb37ecb38e85 Author: Miquel Raynal Date: Fri Oct 11 16:43:44 2019 +0200 iio: adc: max1027: Introduce 12-bit devices support Maxim's max12xx series is very similar to the max10xx series, with the difference of the measurements depth which is upgraded from 10 to 12 bits per channel. Everything else looks the same. Signed-off-by: Miquel Raynal Signed-off-by: Jonathan Cameron commit 7af5257d84275c9ef696e7757b54f210b7955d46 Author: Miquel Raynal Date: Fri Oct 11 16:43:43 2019 +0200 iio: adc: max1027: Prepare the introduction of different resolutions Maxim's max1027/29/31 series returns the measured voltages with a resolution of 10 bits. There is a very similar series, max1227/29/31 which works identically but uses a resolution of 12 bits. Prepare the support for these chips by turning the 'depth' into a macro parameter instead of hardcoding it everywhere. Also reorganize just a bit the macros at the top to avoid repeating tens of lines when adding support for a new chip. Signed-off-by: Miquel Raynal Signed-off-by: Jonathan Cameron commit db033831b4f5589f9fcbadb837614a7c4eac0308 Author: Miquel Raynal Date: Fri Oct 11 16:43:42 2019 +0200 iio: adc: max1027: Reset the device at probe time All the registers are configured by the driver, let's reset the chip at probe time, avoiding any conflict with a possible earlier configuration. Signed-off-by: Miquel Raynal Signed-off-by: Jonathan Cameron commit ffae106764758e5e11b54c3bc137936725f1990a Author: Miquel Raynal Date: Fri Oct 11 16:43:41 2019 +0200 iio: adc: max1027: Make it optional to use interrupts The chip has a 'start conversion' and a 'end of conversion' pair of pins. They can be used but this is absolutely not mandatory as regular polling of the value is totally fine with the current internal clocking setup. Turn the interrupts optional and do not error out if they are not inquired in the device tree. This has the effect to prevent triggered buffers use though. Signed-off-by: Miquel Raynal Signed-off-by: Jonathan Cameron commit 038696f8bd2f2ed188827fbcfec3a38f8a2aea4f Author: Miquel Raynal Date: Fri Oct 11 16:43:40 2019 +0200 iio: adc: max1027: Add debugfs register read support Until now, only write operations were supported. Force two bytes read operation when reading, which should fit most of the development purposes. Of course, extended operations like buffered reads on multiple channels or even temperature + voltage reads will not be read entirely. Usually, just starting a new operation will work but in any case a software reset (done through the debufs interface too) will return the device in a usable state. Signed-off-by: Miquel Raynal Signed-off-by: Jonathan Cameron commit 3565435455762160f19ca20769d767d9df7d8717 Author: Manivannan Sadhasivam Date: Sat Oct 12 00:18:52 2019 +0530 iio: light: Add support for ADUX1020 sensor Add initial support for Analog Devices ADUX1020 Photometric sensor. Only proximity mode has been enabled for now. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Jonathan Cameron commit 35efea32b26f9aacc99bf07e0d2cdfba2028b099 Author: Heiner Kallweit Date: Sat Oct 5 14:03:57 2019 +0200 PCI/ASPM: Allow re-enabling Clock PM Previously Clock PM could not be re-enabled after being disabled by pci_disable_link_state() because clkpm_capable was reset. Change this by adding a clkpm_disable field similar to aspm_disable. Link: https://lore.kernel.org/r/4e8a66db-7d53-4a66-c26c-f0037ffaa705@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit ed4766022f88dfba871d9cc2975e834a32a16bb4 Author: Ahzo Date: Fri Oct 11 19:55:03 2019 +0200 drm/amd/display: add NULL checks for clock manager pointer This fixes kernel NULL pointer dereferences on shutdown: RIP: 0010:build_audio_output.isra.0+0x97/0x110 [amdgpu] RIP: 0010:enable_link_dp+0x186/0x300 [amdgpu] Reviewed-by: Harry Wentland Signed-off-by: Ahzo Signed-off-by: Alex Deucher commit 97c002be4113e50ddca424c7ebbfd4840402605f Author: Alex Deucher Date: Mon Mar 11 18:05:12 2019 -0500 drm/amdgpu: enable BACO reset for SMU7 based dGPUs (v2) Use BACO to reset the GPU if supported on SMU7 based dGPUs. v2: don't use baco on CI parts Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 2a113c74ec7c50aef18fcd9442ea70f09ff26b16 Author: Alex Deucher Date: Fri Feb 15 18:17:24 2019 -0500 drm/amdgpu/powerplay: wire up BACO to powerplay API for smu7 Wire up the powerplay callbacks for for BACO for smu7 devices. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 912a0bf57436d77592faea50cc989267a4e84d8d Author: Alex Deucher Date: Fri Feb 15 17:39:33 2019 -0500 drm/amdgpu/powerplay: split out common smu7 BACO code Several of the BACO functions are common across smu7-based asics. Split the common code out. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 56f68f18e09c397776e3d485f69e87b801362b8f Author: Alex Deucher Date: Fri Feb 15 17:38:44 2019 -0500 drm/amdgpu/powerplay: add support for BACO on CI This adds BACO support for CI asics. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit da28d1c026e4a148c8740b3f8c2642a12fa86ccf Author: Alex Deucher Date: Fri Feb 15 17:37:46 2019 -0500 drm/amdgpu/powerplay: add support for BACO on Fiji This adds BACO support for Fiji asics. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 28e82af499eb4ce2547ded15855dfc376497b66e Author: Alex Deucher Date: Thu Feb 14 16:53:42 2019 -0500 drm/amdgpu/powerplay: add support for BACO on VegaM This adds BACO support for VegaM asics. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 1b0575bdc448741a4dd5a95bc8f91e405e7cdabc Author: Alex Deucher Date: Fri Feb 15 17:36:40 2019 -0500 drm/amdgpu/powerplay: add support for BACO on polaris This adds BACO support for Polaris asics. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit f07fb0244f738b4774310271bbbe8239ef4e72d7 Author: Alex Deucher Date: Fri Feb 15 11:56:56 2019 -0500 drm/amdgpu/powerplay: add support for BACO on Iceland This adds BACO support for Iceland asics. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit cefada559b8a9f3c70fa03202ff9f74cff522bce Author: Alex Deucher Date: Fri Feb 15 17:35:50 2019 -0500 drm/amdgpu/powerplay: add support for BACO on tonga This adds BACO support for Tonga. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 42e547efe2f450c844796e878aab9c354c83cce2 Author: Alex Deucher Date: Sun Feb 10 21:57:55 2019 -0500 drm/amdgpu/powerplay: add core support for pre-SOC15 baco This adds core support for BACO on pre-vega asics. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 5d934ac0d04c94d960f9310a6e20ced07a964bc9 Author: Alex Deucher Date: Fri Oct 4 15:18:52 2019 -0500 drm/amdgpu: add new SMU 7.1.3 registers for BACO Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 9fc00ea774693a4a13ec88c4bff7e199f987bfa1 Author: Alex Deucher Date: Fri Oct 4 15:16:43 2019 -0500 drm/amdgpu: add new SMU 7.1.2 registers for BACO Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit c74c524e7c41e508c186173ec62ec8fc0a93165f Author: Alex Deucher Date: Fri Oct 4 15:14:18 2019 -0500 drm/amdgpu: add new SMU 7.0.1 registers for BACO Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit c06a91c0f826ff5a812247ef71c9d432a9cd96b1 Author: Alex Deucher Date: Mon Feb 11 12:28:45 2019 -0500 drm/amdgpu: add new BIF 5.0 register for BACO Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 8763eb7ae9ff06793f10135a93651c79272a6099 Author: Alex Deucher Date: Fri Feb 15 14:40:26 2019 -0500 drm/amdgpu: add new BIF 4.1 register for BACO Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit 5337aae9b5dbf1a166b27ddc874f724a77a36fe8 Author: Alex Deucher Date: Tue Oct 15 14:27:01 2019 -0400 drm/amdgpu/soc15: add support for baco reset with swSMU Add support for vega20 when the swSMU path is used. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 31fa2991f4cd808f038f7bd4a23033e99ac0a7fe Author: Alex Deucher Date: Fri Oct 4 11:01:11 2019 -0500 drm/amdgpu: remove in_baco_reset hack It was a vega20 specific hack. Check if we are in reset and what reset method we are using. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit f5fda6d89afe6e9cedaa1c3303903c905262f6e8 Author: Alex Deucher Date: Wed Oct 9 14:39:37 2019 -0500 drm/amdgpu: simplify ATPX detection Use the base class rather than the specific class and drop the second loop. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 897483d8a0e0896b214bda374e67373ee01166a6 Author: Alex Deucher Date: Fri Oct 4 14:57:21 2019 -0500 drm/amdgpu: move gpu reset out of amdgpu_device_suspend Move it into the caller. There are cases were we don't want it. We need it for hibernation, but we don't need it for runtime pm, so drop it for runtime pm. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 803cc26d5cb6a3c93eab9124c1e218dc93066a6c Author: Alex Deucher Date: Fri Oct 4 14:33:39 2019 -0500 drm/amdgpu: move pci_save_state into suspend path for amdgpu_device_suspend. This follows the logic in the resume path. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 1489d17940012ceb39b0b7bed71bda18e9eae804 Author: Alex Deucher Date: Wed Oct 9 13:12:37 2019 -0500 Revert "drm/radeon: Fix EEH during kexec" This reverts commit 6f7fe9a93e6c09bf988c5059403f5f88e17e21e6. This breaks some boards. Maybe just enable this on PPC for now? Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205147 Signed-off-by: Alex Deucher commit e70bd049d00729b6c632c8ddd921bc3c5afaf19b Author: Hersen Wu Date: Tue Oct 15 12:47:31 2019 -0400 drm/amdgpu/display: fix build error casused by CONFIG_DRM_AMD_DC_DCN2_1 when CONFIG_DRM_AMD_DC_DCN2_1 is not enable in .config, there is build error. struct dpm_clocks shoud not be guarded. Signed-off-by: Hersen Wu Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 71a0df4be65bfa5b0ccfe10d9c99fc2d516d8083 Author: Hersen Wu Date: Tue Oct 15 10:34:54 2019 -0400 drm/amdgpu/display: hook renoir dc to pplib funcs enable dc get dmp clock table and set dcn watermarks via pplib. Signed-off-by: Hersen Wu Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit ed606f8a346b9040008794a261b43902818efd7b Author: Andrey Grodzovsky Date: Fri Oct 11 10:32:59 2019 -0400 dmr/amdgpu: Fix crash on SRIOV for ERREVENT_ATHUB_INTERRUPT interrupt. Ignre the ERREVENT_ATHUB_INTERRUPT for systems without RAS. Signed-off-by: Andrey Grodzovsky Reviewed-and-tested-by: Jack Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 06f7f57e87d09900a7c3109a357b73521ab40771 Author: Philip Yang Date: Thu Oct 3 14:18:25 2019 -0400 drm/amdgpu: user pages array memory leak fix user_pages array should always be freed after validation regardless if user pages are changed after bo is created because with HMM change parse bo always allocate user pages array to get user pages for userptr bo. v2: remove unused local variable and amend commit v3: add back get user pages in gem_userptr_ioctl, to detect application bug where an userptr VMA is not ananymous memory and reject it. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1844962 Signed-off-by: Philip Yang Tested-by: Joe Barnett Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7bbdbe405965dc4998996bdea571a5b9a1dd3d16 Author: Hersen Wu Date: Wed Sep 18 09:53:30 2019 -0400 drm/amdgpu/powerplay: add renoir funcs to support dc there are two paths for renoir dc access smu. one dc access smu directly using bios smc interface: set disply, dprefclk, etc. another goes through pplib for get dpm clock table and set watermmark. Signed-off-by: Hersen Wu Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 5bcc92407cf0d6e8d4c1b333b0accb6eec1b3f73 Author: Evan Quan Date: Thu Oct 10 16:42:31 2019 +0800 drm/amd/powerplay: enable Arcturus runtime VCN dpm on/off Enable runtime VCN DPM on/off on Arcturus. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 372120f0a5922655eb2579a50d6aafad474fd14c Author: Kenneth Feng Date: Fri Oct 11 17:51:34 2019 +0800 drm/amd/powerplay: bug fix for pcie parameters override Bug fix for pcie paramerers override on swsmu. Below is a scenario to have this problem. pptable definition on pcie dpm: 0 -> pcie gen speed:1, pcie lanes: *16 1 -> pcie gen speed:4, pcie lanes: *16 Then if we have a system only have the capbility: pcie gen speed: 3, pcie lanes: *8, we will override dpm 1 to pcie gen speed 3, pcie lanes *8. But the code skips the dpm 0 configuration. So the real pcie dpm parameters are: 0 -> pcie gen speed:1, pcie lanes: *16 1 -> pcie gen speed:3, pcie lanes: *8 Then the wrong pcie lanes will be toggled. Signed-off-by: Kenneth Feng Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit bcccee89f48c1e96b2aea067507e89f3581693bb Author: Emily Deng Date: Tue Oct 15 10:08:22 2019 +0800 drm/amdgpu: Fix tdr3 could hang with slow compute issue When index is 1, need to set compute ring timeout for sriov and passthrough. Signed-off-by: Emily Deng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b2c18f0a9c8bd0fa5c1239830b787d5f8288f7b5 Author: Christian König Date: Thu Sep 19 10:38:57 2019 +0200 drm/amdgpu: fix potential VM faults When we allocate new page tables under memory pressure we should not evict old ones. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit df604bfda6f550f088e1cffcd098bfec0eee9cdf Author: Arnaldo Carvalho de Melo Date: Tue Oct 15 16:50:13 2019 -0300 perf trace: Hook the 'vec' tracepoint argument with the x86 IRQ vectors scnprintf/strtoul Ended up only being useful when filtering multiple irq_vectors tracepoints, as we end up having a tracepoint for each of the entries, i.e.: This will always come with the "RESCHEDULE_VECTOR" in the 'vector' arg: # perf trace --max-events 8 -e irq_vectors:reschedule* 0.000 cc1/29067 irq_vectors:reschedule_entry(vector: RESCHEDULE) 0.004 cc1/29067 irq_vectors:reschedule_exit(vector: RESCHEDULE) 0.553 cc1/29067 irq_vectors:reschedule_entry(vector: RESCHEDULE) 0.556 cc1/29067 irq_vectors:reschedule_exit(vector: RESCHEDULE) 1.182 cc1/29067 irq_vectors:reschedule_entry(vector: RESCHEDULE) 1.185 cc1/29067 irq_vectors:reschedule_exit(vector: RESCHEDULE) 1.203 :29052/29052 irq_vectors:reschedule_entry(vector: RESCHEDULE) 1.206 :29052/29052 irq_vectors:reschedule_exit(vector: RESCHEDULE) # While filtering that value will produce nothing: # perf trace --max-events 8 -e irq_vectors:reschedule* --filter="vector != RESCHEDULE" ^C# Maybe it'll be useful for those other tracepoints: # perf list irq_vectors:vector_* List of pre-defined events (to be used in -e): irq_vectors:vector_activate [Tracepoint event] irq_vectors:vector_alloc [Tracepoint event] irq_vectors:vector_alloc_managed [Tracepoint event] irq_vectors:vector_clear [Tracepoint event] irq_vectors:vector_config [Tracepoint event] irq_vectors:vector_deactivate [Tracepoint event] irq_vectors:vector_free_moved [Tracepoint event] irq_vectors:vector_reserve [Tracepoint event] irq_vectors:vector_reserve_managed [Tracepoint event] irq_vectors:vector_setup [Tracepoint event] irq_vectors:vector_teardown [Tracepoint event] irq_vectors:vector_update [Tracepoint event] # But since we have it done, keep it. This at least served to teach me that all those irq vectors have a entry and an exit tracepoint that I can then use just like with raw_syscalls:sys_{enter,exit}, i.e. pair them, use just a trace__irq_vectors_entry() + trace__irq_vectors_exit() and use the 'vector' arg as I use the 'syscall id' one for syscalls. Then the default for 'perf trace' will include irq_vectors in addition to syscalls. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-wer4cwbbqub3o7sa8h1j3uzb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b14657001046d79439bd75f320a486d64c2f4845 Author: Christian König Date: Wed Sep 18 19:42:14 2019 +0200 drm/amdgpu: fix error handling in amdgpu_bo_list_create We need to drop normal and userptr BOs separately. Signed-off-by: Christian König Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 820924745b760d8c1bb72f9b5dea20673beafe2a Author: Dennis Li Date: Sun Sep 29 16:04:10 2019 +0800 drm/amdgpu: add RAS support for VML2 and ATCL2 v1: Add codes to query the EDC count of VML2 & ATCL2 v2: Rename VML2/ATCL2 registers and drop their mask define v3: Add back the ECC mask for VML2 registers Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 87d92e1f909ce366bd0a3426d5c5fb7bf92014c6 Author: Dennis Li Date: Fri Aug 9 14:30:29 2019 +0800 drm/amd/include: add register define for VML2 and ATCL2 Add VML2 and ATCL2 ECC registers to support VEGA20 RAS Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 13ba03442a2621952916de9036eb29f07c5ec891 Author: Dennis Li Date: Sat Oct 12 13:00:22 2019 +0800 drm/amdgpu: change to query the actual EDC counter For the potential request in the future, change to query the actual EDC counter. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit c0cff9e43edc68e7efe531bce94a772a7103226c Author: Le Ma Date: Fri Oct 11 19:00:00 2019 +0800 drm/amd/powerplay: add BACO platformCaps for VEGA20 BACO reset is needed for RAS recovery. Signed-off-by: Le Ma Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 16562d32c768d9481a9f2dec86252200510e4253 Author: Le Ma Date: Fri Oct 11 18:50:44 2019 +0800 drm/amd/powerplay: send EnterBaco msg with argument as RAS recovery flag 1 indicates RAS recovery flag in SMU FW. Signed-off-by: Le Ma Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit df9331e561dab0a451cbd6a679ee88a95f306fd6 Author: Le Ma Date: Fri Oct 11 18:37:49 2019 +0800 drm/amd/powerplay: avoid disabling ECC if RAS is enabled for VEGA20 Program THM_BACO_CNTL.SOC_DOMAIN_IDLE=1 will tell VBIOS to disable ECC when BACO exit. This can save BACO exit time by PSP on none-ECC SKU. Drop the setting for ECC supported SKU. Signed-off-by: Le Ma Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 956f670509df28e94147e2fc1ee756c491af4d8a Author: Le Ma Date: Fri Oct 11 18:21:16 2019 +0800 drm/amdgpu/soc15: disable doorbell interrupt as part of BACO entry sequence Workaround to make RAS recovery work in BACO reset. Signed-off-by: Le Ma Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 402c60d7b076548511a95330fefdcca9523901c7 Author: Hans de Goede Date: Thu Oct 10 18:28:17 2019 +0200 drm/amdgpu: Bail earlier when amdgpu.cik_/si_support is not set to 1 Bail from the pci_driver probe function instead of from the drm_driver load function. This avoid /dev/dri/card0 temporarily getting registered and then unregistered again, sending unwanted add / remove udev events to userspace. Specifically this avoids triggering the (userspace) bug fixed by this plymouth merge-request: https://gitlab.freedesktop.org/plymouth/plymouth/merge_requests/59 Note that despite that being a userspace bug, not sending unnecessary udev events is a good idea in general. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1490490 Reviewed-by: Daniel Vetter Signed-off-by: Hans de Goede Signed-off-by: Alex Deucher commit 44e149bb1ea2abfd09540d3f57f15495b42b5ce4 Author: Alex Deucher Date: Thu Oct 10 10:07:40 2019 -0500 drm/amdgpu/display: clean up dcn2*_pp_smu functions Use the dcn21 functions in dcn21_resource.c and make the dcn20 functions static since they are only used in dcn20_resource now. Cc: bhawanpreet.lakha@amd.com Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit bb3d7d322dff0d367cbb802a5efb4060edd7e10e Author: Xiaojie Yuan Date: Wed Oct 9 18:52:51 2019 +0800 drm/amd/powerplay: re-enable FW_DSTATE feature bit SMU firmware has fix the bug, so remove this workaround. Signed-off-by: Xiaojie Yuan Acked-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 5f6a556f98de425fcb7928456839a06f02156633 Author: Xiaojie Yuan Date: Thu Oct 10 20:44:20 2019 +0800 drm/amdgpu/discovery: reserve discovery data at the top of VRAM IP Discovery data is TMR fenced by the latest PSP BL, so we need to reserve this region. Tested on navi10/12/14 with VBIOS integrated with latest PSP BL. v2: use DISCOVERY_TMR_SIZE macro as bo size use amdgpu_bo_create_kernel_at() to allocate bo Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4e71e0859292f96d4124805c4e02ef34366451b9 Author: Kevin Wang Date: Fri Oct 11 08:45:41 2019 +0800 drm/amdgpu/swSMU: custom UMD pstate peak clock for navi14 add navi14 umd pstate peak clock support. NAVI14_UMD_PSTATE_PEAK_XT_GFXCLK 1670 MHz NAVI14_UMD_PSTATE_PEAK_XTM_GFXCLK 1448 MHz NAVI14_UMD_PSTATE_PEAK_XLM_GFXCLK 1181 MHz NAVI14_UMD_PSTATE_PEAK_XTX_GFXCLK 1717 MHz NAVI14_UMD_PSTATE_PEAK_XL_GFXCLK 1448 MHz Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 7e899409fd5e9abccee8435d9401b8ca12cebcae Author: Evan Quan Date: Thu Oct 10 11:40:37 2019 +0800 drm/amd/powerplay: enable df cstate control on swSMU routine Currently this is only supported on Vega20 with 40.50 and later SMC firmware. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 06615f9a0c0d68566fc069729aade64a7dbadd58 Author: Evan Quan Date: Thu Oct 10 11:34:51 2019 +0800 drm/amd/powerplay: enable df cstate control on powerplay routine Currently this is only supported on Vega20 with 40.50 and later SMC firmware. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit aff5d0552da4055da3faa27ee4252e48bb1f5821 Author: Heiner Kallweit Date: Sat Oct 5 14:04:36 2019 +0200 PCI/ASPM: Add L1 PM substate support to pci_disable_link_state() Add support for disabling states L1.1 and L1.2 to pci_disable_link_state(). Allow separate control of ASPM and PCI PM L1 substates. Link: https://lore.kernel.org/r/d81f8036-c236-6463-48e7-ebcdcda85bba@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit 5e0c21c75e8c08375a69710527e4a921b897cb7e Author: Bjorn Helgaas Date: Wed Oct 9 08:00:12 2019 -0500 PCI/ASPM: Remove pcie_aspm_enabled() unnecessary locking The lifetime of the link_state structure (bridge->link_state) is not the same as the lifetime of "bridge" itself. The link_state is allocated by pcie_aspm_init_link_state() after children of the bridge have been enumerated, and it is deallocated by pcie_aspm_exit_link_state() after all children of the bridge (but not the bridge itself) have been removed. Previously pcie_aspm_enabled() acquired aspm_lock to ensure that link_state was not deallocated while we're looking at it. But the fact that the caller of pcie_aspm_enabled() holds a reference to @pdev means there's always at least one child of the bridge, which means link_state can't be deallocated. Remove the unnecessary locking in pcie_aspm_enabled(). Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki commit 573ed8985d290214440e6d9866e5330b5ef064ca Author: Arnaldo Carvalho de Melo Date: Tue Oct 15 16:03:25 2019 -0300 perf trace beauty: Add the glue for the autogenerated x86 IRQ vector array We need to wrap this autogenerated string array with the strarray__scnprintf() formatter and the strarray__strotul() lookup method, do it. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-bx2cjcyv6aerhyy3gvu3uwcy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e7bd89c0e0104d645a1ecdd992f3ebac84bf412d Author: Manivannan Sadhasivam Date: Sat Oct 12 00:18:51 2019 +0530 dt-bindings: iio: light: Add binding for ADUX1020 Add devicetree binding for Analog Devices ADUX1020 Photometric sensor. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 1ccd5417dbfa77afb476b95c85fe2e43ada2bc0a Author: Rodrigo Siqueira Date: Tue Oct 15 13:40:12 2019 +0000 drm: Add LT-tunable PHY repeater mode operations LT-tunable PHY Repeaters can operate in two different modes: transparent (default) and non-transparent. The value 0x55 specifies the transparent mode, and 0xaa represents the non-transparent; this commit adds these two values as definitions. Cc: Abdoulaye Berthe Cc: Harry Wentland Cc: Leo Li Cc: Jani Nikula Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Abdoulaye Berthe Signed-off-by: Rodrigo Siqueira Reviewed-by: Ville Syrjälä Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20191015134010.26zwopwnrbsmz5az@outlook.office365.com commit 6e73113784acf25b0b2d3eb316ab1c765a8858e4 Author: Andy Shevchenko Date: Fri Oct 11 14:56:10 2019 +0300 serial: 8250_exar: Move Exar pieces to custom ->startup() There is a one more step to consolidate Exar bits under 8250_exar umbrella. This time we introduce a custom ->startup() callback where the Exar specific settings are applied. Cc: Robert Middleton Cc: Sudip Mukherjee Cc: Aaron Sierra Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191011115610.81507-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 97c2a7806f691f4124914623baa54223416a8cef Author: Arnaldo Carvalho de Melo Date: Tue Oct 15 16:01:42 2019 -0300 libbeauty: Add a strarray__scnprintf_suffix() method In some cases, like with x86 IRQ vectors, the common part in names is at the end, so a suffix, add a scnprintf function for that. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-agxbj6es2ke3rehwt4gkdw23@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f19a85c68cb4d5bb90c587d9390e1ce2716d6160 Author: Arnaldo Carvalho de Melo Date: Tue Oct 15 15:48:50 2019 -0300 libbeauty: Hook up the x86 irq_vectors table generator I.e. after running: $ make -C tools/perf O=/tmp/build/perf We end up with: $ cat /tmp/build/perf/trace/beauty/generated/x86_arch_irq_vectors_array.c static const char *x86_irq_vectors[] = { [0x02] = "NMI", [0x12] = "MCE", [0x20] = "IRQ_MOVE_CLEANUP", [0x80] = "IA32_SYSCALL", [0xec] = "LOCAL_TIMER", [0xed] = "HYPERV_STIMER0", [0xee] = "HYPERV_REENLIGHTENMENT", [0xef] = "MANAGED_IRQ_SHUTDOWN", [0xf0] = "POSTED_INTR_NESTED", [0xf1] = "POSTED_INTR_WAKEUP", [0xf2] = "POSTED_INTR", [0xf3] = "HYPERVISOR_CALLBACK", [0xf4] = "DEFERRED_ERROR", [0xf6] = "IRQ_WORK", [0xf7] = "X86_PLATFORM_IPI", [0xf8] = "REBOOT", [0xf9] = "THRESHOLD_APIC", [0xfa] = "THERMAL_APIC", [0xfb] = "CALL_FUNCTION_SINGLE", [0xfc] = "CALL_FUNCTION", [0xfd] = "RESCHEDULE", [0xfe] = "ERROR_APIC", [0xff] = "SPURIOUS_APIC", }; $ Now its just a matter of using it, associating it to tracepoint arguments named 'vector', all of which can be correctly used with this table, for int args. At some point we should move tools/perf/trace/beauty to tools/beauty/, so that it can be used more generally and even made available externally like libbpf, libperf, libtraceevent, etc. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-0p2df4kq1afrxbck4e4ct34r@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5fa022aeba8420d4803e6198642d0a0cbbac99f3 Author: Arnaldo Carvalho de Melo Date: Tue Oct 15 15:33:24 2019 -0300 libbeauty: Add a generator for x86's IRQ vectors -> strings We'll wire this up with the 'vector' arg in irq_vectors:*, etc: Just run it straight away and check what it produces: $ tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh static const char *x86_irq_vectors[] = { [0x02] = "NMI", [0x12] = "MCE", [0x20] = "IRQ_MOVE_CLEANUP", [0x80] = "IA32_SYSCALL", [0xec] = "LOCAL_TIMER", [0xed] = "HYPERV_STIMER0", [0xee] = "HYPERV_REENLIGHTENMENT", [0xef] = "MANAGED_IRQ_SHUTDOWN", [0xf0] = "POSTED_INTR_NESTED", [0xf1] = "POSTED_INTR_WAKEUP", [0xf2] = "POSTED_INTR", [0xf3] = "HYPERVISOR_CALLBACK", [0xf4] = "DEFERRED_ERROR", [0xf6] = "IRQ_WORK", [0xf7] = "X86_PLATFORM_IPI", [0xf8] = "REBOOT", [0xf9] = "THRESHOLD_APIC", [0xfa] = "THERMAL_APIC", [0xfb] = "CALL_FUNCTION_SINGLE", [0xfc] = "CALL_FUNCTION", [0xfd] = "RESCHEDULE", [0xfe] = "ERROR_APIC", [0xff] = "SPURIOUS_APIC", }; $ Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-cpl1pa7kkwn0llufi5qw4li8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d2b72b7280370aaddcbe93d00939bc7ec21dda48 Author: Arnaldo Carvalho de Melo Date: Tue Oct 15 15:40:23 2019 -0300 tools arch x86: Grab a copy of the file containing the IRQ vector defines We'll use it to generate a table and then convert the irq_vectors:* tracepoint 'vector' arg in things like perf trace, script, etc. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-z7gi058lzhnrm32slevg3xod@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a016e092940f6607fb11ae07f4c90d7f9c6ad87a Author: Jonathan Neuschäfer Date: Sat Oct 12 19:11:12 2019 +0200 docs: admin-guide: dell_rbu: Improve formatting and spelling This improves readability a bit. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jonathan Corbet commit 80c730b564b49e994aed09f16f121168ed4deacd Author: Jonathan Neuschäfer Date: Sat Oct 12 19:11:11 2019 +0200 docs: admin-guide: dell_rbu: Rework the title - Mention the driver name, which is also used in sysfs (dell_rbu) - Rewrite the title to be more concise Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jonathan Corbet commit d4300c4e4fd4395418aa9a8e2311702992dd18b2 Author: Jonathan Neuschäfer Date: Sat Oct 12 19:11:10 2019 +0200 docs: admin-guide: Move Dell RBU document from driver-api This document describes how an admin can use the dell_rbu driver, rather than any in-kernel API details. Signed-off-by: Jonathan Neuschäfer Acked-by: Andy Shevchenko Signed-off-by: Jonathan Corbet commit 2c1d7ffdf4fe34b79a373ea93584e71ae6ce62e2 Author: Jonathan Neuschäfer Date: Sat Oct 12 19:11:09 2019 +0200 docs: admin-guide: Sort the "unordered guides" to avoid merge conflicts Since the "unordered guides" linked in admin-guide/index.rst are not supposed to be in any particular order, let's sort them alphabetically to avoid the risk of merge conflicts by spreading newly added lines more evenly. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jonathan Corbet commit abb0b3d96a1f9407dd66831ae33985a386d4200d Author: Ingo Rohloff Date: Fri Oct 11 13:55:18 2019 +0200 usb: usbfs: Suppress problematic bind and unbind uevents. commit 1455cf8dbfd0 ("driver core: emit uevents when device is bound to a driver") added bind and unbind uevents when a driver is bound or unbound to a physical device. For USB devices which are handled via the generic usbfs layer (via libusb for example), this is problematic: Each time a user space program calls ioctl(usb_fd, USBDEVFS_CLAIMINTERFACE, &usb_intf_nr); and then later ioctl(usb_fd, USBDEVFS_RELEASEINTERFACE, &usb_intf_nr); The kernel will now produce a bind or unbind event, which does not really contain any useful information. This allows a user space program to run a DoS attack against programs which listen to uevents (in particular systemd/eudev/upowerd): A malicious user space program just has to call in a tight loop ioctl(usb_fd, USBDEVFS_CLAIMINTERFACE, &usb_intf_nr); ioctl(usb_fd, USBDEVFS_RELEASEINTERFACE, &usb_intf_nr); With this loop the malicious user space program floods the kernel and all programs listening to uevents with tons of bind and unbind events. This patch suppresses uevents for ioctls USBDEVFS_CLAIMINTERFACE and USBDEVFS_RELEASEINTERFACE. Signed-off-by: Ingo Rohloff Link: https://lore.kernel.org/r/20191011115518.2801-1-ingo.rohloff@lauterbach.com Signed-off-by: Greg Kroah-Hartman commit be731286685af4de728851991b98cb8f579f58f6 Author: Nathan Chancellor Date: Fri Oct 11 11:59:50 2019 -0700 USB: host: ohci-at91: Remove unused variable regs in at91_stop_hc drivers/usb/host/ohci-at91.c:118:28: warning: unused variable 'regs' [-Wunused-variable] struct ohci_regs __iomem *regs = hcd->regs; ^ 1 warning generated. Fixes: 9c4567fa0a44 ("USB: host: ohci-at91: completely shutdown the controller in at91_stop_hc()") Signed-off-by: Nathan Chancellor Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20191011185950.1470-1-natechancellor@gmail.com Signed-off-by: Greg Kroah-Hartman commit c8dd192be821039d7023e0a5869d2cdf3acdef7e Author: Dan Carpenter Date: Fri Oct 11 21:50:55 2019 +0300 usb: typec: fix an IS_ERR() vs NULL bug in hd3ss3220_probe() The device_get_named_child_node() function doesn't return error pointers, it returns NULL on error. Fixes: 1c48c759ef4b ("usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller") Signed-off-by: Dan Carpenter Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191011185055.GA20972@mwanda Signed-off-by: Greg Kroah-Hartman commit 67f195806afcb17e46a4578130526602d3465781 Author: Ben Dooks (Codethink) Date: Tue Oct 15 16:30:17 2019 +0100 usb: renesas_usbhs: fix type of buf Fix the type of buf in __usbhsg_recip_send_status to be __le16 to avoid the following sparse warning: drivers/usb/renesas_usbhs/mod_gadget.c:335:14: warning: incorrect type in assignment (different base types) drivers/usb/renesas_usbhs/mod_gadget.c:335:14: expected unsigned short drivers/usb/renesas_usbhs/mod_gadget.c:335:14: got restricted __le16 [usertype] Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20191015153017.10858-1-ben.dooks@codethink.co.uk Signed-off-by: Greg Kroah-Hartman commit 46f62f887b2cb008b91d5bb39a14178fd5c56fbc Author: Ben Dooks (Codethink) Date: Tue Oct 15 16:50:44 2019 +0100 usb: renesas_usbhs: fix __le16 warnings Fix the warnings generated by casting to/from __le16 without using the correct functions. Fixes the following sparse warnings: drivers/usb/renesas_usbhs/common.c:165:25: warning: incorrect type in assignment (different base types) drivers/usb/renesas_usbhs/common.c:165:25: expected restricted __le16 [usertype] wValue drivers/usb/renesas_usbhs/common.c:165:25: got unsigned short drivers/usb/renesas_usbhs/common.c:166:25: warning: incorrect type in assignment (different base types) drivers/usb/renesas_usbhs/common.c:166:25: expected restricted __le16 [usertype] wIndex drivers/usb/renesas_usbhs/common.c:166:25: got unsigned short drivers/usb/renesas_usbhs/common.c:167:25: warning: incorrect type in assignment (different base types) drivers/usb/renesas_usbhs/common.c:167:25: expected restricted __le16 [usertype] wLength drivers/usb/renesas_usbhs/common.c:167:25: got unsigned short drivers/usb/renesas_usbhs/common.c:173:39: warning: incorrect type in argument 3 (different base types) drivers/usb/renesas_usbhs/common.c:173:39: expected unsigned short [usertype] data drivers/usb/renesas_usbhs/common.c:173:39: got restricted __le16 [usertype] wValue drivers/usb/renesas_usbhs/common.c:174:39: warning: incorrect type in argument 3 (different base types) drivers/usb/renesas_usbhs/common.c:174:39: expected unsigned short [usertype] data drivers/usb/renesas_usbhs/common.c:174:39: got restricted __le16 [usertype] wIndex drivers/usb/renesas_usbhs/common.c:175:39: warning: incorrect type in argument 3 (different base types) drivers/usb/renesas_usbhs/common.c:175:39: expected unsigned short [usertype] data Note. I belive this to be correct, and should be a no-op on arm. Signed-off-by: Ben Dooks Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191015155044.11858-1-ben.dooks@codethink.co.uk Signed-off-by: Greg Kroah-Hartman commit 14f2cf607ccd1fa05e767f0191fd5d07b35534c2 Author: David Ahern Date: Fri Oct 11 20:43:03 2019 -0600 net: Update address for vrf and l3mdev in MAINTAINERS Use my kernel.org address for all entries in MAINTAINERS. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit d4999f1cc7471bd64c02a98cc8ef774ac901d28c Author: Jeffrey Hugo Date: Thu Oct 10 14:06:54 2019 -0700 dt-bindings: display: Convert sharp, ld-d5116z01b panel to DT schema Convert the sharp,ld-d5116z01b panel binding to DT schema. Signed-off-by: Jeffrey Hugo Signed-off-by: Rob Herring commit 02ceb12c20f51e45d3ebb64cf3f62faacee881fb Author: Alexandre Torgue Date: Mon Oct 7 15:44:10 2019 +0200 dt-bindings: usb: generic-ehci: Add "companion" entry "companion" entry is present in "generic.txt" usb binding file. This commit adds it also in generic-ehci yaml binding. Signed-off-by: Alexandre Torgue [robh: restrict type to phandle instead of phandle-array] Signed-off-by: Rob Herring commit 4b6fffe7a45a147bf0889c570a6ad3f55f9f244a Author: Alexandre Torgue Date: Mon Oct 7 15:44:09 2019 +0200 dt-bindings: pinctrl: stm32: Fix 'st, syscfg' description field As there is only one item "st,syscfg" this commit moves phandle description fields under "description" tag. It'll fix a validation issue seen during stm32 DT check. Signed-off-by: Alexandre Torgue Signed-off-by: Rob Herring commit e407626d2a2df50acc0ab566409843aa204f0d99 Author: Alexandre Torgue Date: Mon Oct 7 15:44:08 2019 +0200 dt-bindings: arm: stm32: Add missing STM32 boards This commit documents missing STM32 boards: -STM32MCU: F429 disco/eval, F469-disco, F746 disco/eval, F769 disco, H743 disco/eval. -STM32MPU: MP157 dk1/dk2/ed1/ev1. Signed-off-by: Alexandre Torgue Signed-off-by: Rob Herring commit 906c6b3300e13f95b0f23a6c911bed3976a0c157 Author: Biju Das Date: Fri Oct 4 08:16:03 2019 +0100 dt-bindings: irqchip: renesas-irqc: Document r8a774b1 bindings Document SoC specific bindings for RZ/G2N (r8a774b1) SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit 97bb24a6e7cc205c63d5aa6ad89d61a274963ed6 Author: Biju Das Date: Tue Oct 1 13:02:40 2019 +0100 dt-bindings: pwm: rcar: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit 6eda6f6d8dcdfed6c102d755d632122c612257d9 Author: Krzysztof Kozlowski Date: Wed Oct 2 18:07:44 2019 +0200 dt-bindings: iio: adc: exynos: Use defines instead of clock numbers Make the examples in Exynos ADC bindings more readable and bring them closer to real DTS by using defines for clocks. Signed-off-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Signed-off-by: Rob Herring commit ca9ccc0d8dc8a73e0b186f9c164c4982c5c42539 Author: Krzysztof Kozlowski Date: Wed Oct 2 18:07:43 2019 +0200 dt-bindings: rtc: s3c: Include generic dt-schema bindings Include the generic rtc.yaml bindings in Samsung S3C RTC bindings. This brings the requirement of proper node names and adds parsing of additional properties. Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Signed-off-by: Rob Herring commit bec576a20f0f4f933048a7739029004e03359f76 Author: Krzysztof Kozlowski Date: Wed Oct 2 18:07:42 2019 +0200 dt-bindings: rtc: s3c: Use defines instead of clock numbers Make the examples in S3C RTC bindings more readable and bring them closer to real DTS by using defines for clocks. Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Signed-off-by: Rob Herring commit c2b474b02df2265741806d35ec733760f6eb2785 Author: Krzysztof Kozlowski Date: Wed Oct 2 18:07:41 2019 +0200 dt-bindings: samsung: Indent examples with four spaces Change the indentation of examples used in json-schema bindings from two to four spaces as this makes the code easier to read and seems to be preferred in other files. Signed-off-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron # for iio Acked-by: Alexandre Belloni Acked-by: Sebastian Reichel # for power/reset Signed-off-by: Rob Herring commit d9b11fccb2334b717c4e04b40131c28499353626 Author: Maxime Ripard Date: Wed Oct 2 14:06:45 2019 +0200 dt-bindings: serio: Convert Allwinner PS2 controller to a schema The older Allwinner SoCs have a PS2 controller that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Rob Herring commit 3130c26a26fae6dad22c5627dd7299389c1b5ce4 Author: Benjamin Gaignard Date: Tue Oct 15 14:31:51 2019 +0200 dt-bindings: display: Convert stm32 display bindings to json-schema Convert the STM32 display binding to DT schema format using json-schema. Split the original bindings in two yaml files: - one for display controller (ltdc) - one for DSI controller Signed-off-by: Benjamin Gaignard [robh: drop maxItems from phy-dsi-supply] Signed-off-by: Rob Herring commit 08fff7aeddc9dd72161b4c8fc27fbab12b4b9352 Author: Mika Kuoppala Date: Tue Oct 15 18:44:49 2019 +0300 drm/i915/tgl: Wa_1607138340 Avoid possible cs hang with semaphores by disabling lite restore. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-11-mika.kuoppala@linux.intel.com commit 99db8c59e056e1e1a97845dbd38a3a6f47be6b7d Author: Mika Kuoppala Date: Tue Oct 15 18:44:48 2019 +0300 drm/i915/tgl: Wa_1607030317, Wa_1607186500, Wa_1607297627 Disable semaphore idle messages and wait for event power downs. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-10-mika.kuoppala@linux.intel.com commit 79bfa607e60f12daa3db8b1b3834219818a153e2 Author: Mika Kuoppala Date: Tue Oct 15 18:44:47 2019 +0300 drm/i915/tgl: Wa_1607138336 Avoid possible deadlock on context switch. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-9-mika.kuoppala@linux.intel.com commit 2e19af943822710cf00621eb32cc82394441bb60 Author: Mika Kuoppala Date: Tue Oct 15 18:44:46 2019 +0300 drm/i915/tgl: Wa_1409600907 To avoid possible hang, we need to add depth stall if we flush the depth cache. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-8-mika.kuoppala@linux.intel.com commit 2cbe2d8c562eab58347b39342e37c7a2adbe7fef Author: Mika Kuoppala Date: Tue Oct 15 18:44:45 2019 +0300 drm/i915/tgl: Wa_1409170338 Avoid possible hang in tsg,vfe units by keeping l3 clocks runnings. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-7-mika.kuoppala@linux.intel.com commit 65df78bda385a905d086a787fd186506aea87df4 Author: Mika Kuoppala Date: Tue Oct 15 18:44:44 2019 +0300 drm/i915/tgl: Wa_1409420604 Avoid possible hang in CPSS unit. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-6-mika.kuoppala@linux.intel.com commit 99739f9431f9fa8b4706dfa4c99389b400b8af23 Author: Mika Kuoppala Date: Tue Oct 15 18:44:43 2019 +0300 drm/i915/tgl: Keep FF dop clock enabled for A0 To ensure correct state data for compute workloads, we need to keep the ff dop clock enabled. References: HSDES#1606700617 Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-5-mika.kuoppala@linux.intel.com commit 1c9dc2b529923265d149d38a02c75a125d7f9fb3 Merge: f58a887ebc99 08839c06e96f Author: David S. Miller Date: Tue Oct 15 13:16:57 2019 -0400 Merge branch 'Scatter-gather-SPI-for-SJA1105-DSA' Vladimir Oltean says: ==================== Scatter/gather SPI for SJA1105 DSA This is a small series that reduces the stack memory usage for the sja1105 driver. ==================== Signed-off-by: David S. Miller commit 08839c06e96f1a88e7c30011708727430fd78c3d Author: Vladimir Oltean Date: Sat Oct 12 01:31:15 2019 +0300 net: dsa: sja1105: Switch to scatter/gather API for SPI This reworks the SPI transfer implementation to make use of more of the SPI core features. The main benefit is to avoid the memcpy in sja1105_xfer_buf(). The memcpy was only needed because the function was transferring a single buffer at a time. So it needed to copy the caller-provided buffer at buf + 4, to store the SPI message header in the "headroom" area. But the SPI core supports scatter-gather messages, comprised of multiple transfers. We can actually use those to break apart every SPI message into 2 transfers: one for the header and one for the actual payload. To keep the behavior the same regarding the chip select signal, it is necessary to tell the SPI core to de-assert the chip select after each chunk. This was not needed before, because each spi_message contained only 1 single transfer. The meaning of the per-transfer cs_change=1 is: - If the transfer is the last one of the message, keep CS asserted - Otherwise, deassert CS We need to deassert CS in the "otherwise" case, which was implicit before. Avoiding the memcpy creates yet another opportunity. The device can't process more than 256 bytes of SPI payload at a time, so the sja1105_xfer_long_buf() function used to exist, to split the larger caller buffer into chunks. But these chunks couldn't be used as scatter/gather buffers for spi_message until now, because of that memcpy (we would have needed more memory for each chunk). So we can now remove the sja1105_xfer_long_buf() function and have a single implementation for long and short buffers. Another benefit is lower usage of stack memory. Previously we had to store 2 SPI buffers for each chunk. Due to the elimination of the memcpy, we can now send pointers to the actual chunks from the caller-supplied buffer to the SPI core. Since the patch merges two functions into a rewritten implementation, the function prototype was also changed, mainly for cosmetic consistency with the structures used within it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8a559400da42abd9e1a5f6232b0f57d6dd374f64 Author: Vladimir Oltean Date: Sat Oct 12 01:31:14 2019 +0300 net: dsa: sja1105: Move sja1105_spi_transfer into sja1105_xfer This is a cosmetic patch that reduces some boilerplate in the SPI interaction of the driver. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 36a6b5d964d995b536b1925ec42052ee40ba92c4 Author: Mika Kuoppala Date: Tue Oct 15 18:44:42 2019 +0300 drm/i915/tgl: Add extra hdc flush workaround In order to ensure constant caches are invalidated properly with a0, we need extra hdc flush after invalidation. v2: use IS_TGL_REVID (Chris) References: HSDES#1604544889 Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-4-mika.kuoppala@linux.intel.com commit 4aa0b5d457f5d29522b5db4aeb4587fc4dc24054 Author: Mika Kuoppala Date: Tue Oct 15 18:44:41 2019 +0300 drm/i915/tgl: Add HDC Pipeline Flush Add hdc pipeline flush to ensure memory state is coherent in L3 when we are done. v2: Flush also in breadcrumbs (Chris) Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-3-mika.kuoppala@linux.intel.com commit 62037ffff229b7d94f1db5ef8d2e2ec819832ef3 Author: Mika Kuoppala Date: Tue Oct 15 18:44:40 2019 +0300 drm/i915/tgl: Include ro parts of l3 to invalidate Aim for completeness and invalidate also the ro parts in l3 cache. This might allow to get rid of the preparser disable/enable workaround on invalidation path. Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-2-mika.kuoppala@linux.intel.com commit 613716bbe721236a09167b64124c13c85ee69962 Author: Mika Kuoppala Date: Tue Oct 15 18:44:39 2019 +0300 drm/i915/tgl: Add IS_TGL_REVID We are going to need this macro on limiting the workaround scope. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154449.10338-1-mika.kuoppala@linux.intel.com commit da5d2ca8adde6adadcc42e3dd87bcc01e7e4f3f9 Author: Mika Kuoppala Date: Tue Oct 15 18:44:11 2019 +0300 drm/i915/icl: Wa_1607087056 Avoid possible hang in tsg,vfe units by keeping l3 clocks runnings. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191015154411.9984-1-mika.kuoppala@linux.intel.com commit f58a887ebc990b4d01a5a53330be06c384e089c4 Author: Colin Ian King Date: Fri Oct 11 18:22:32 2019 +0100 net: b44: remove redundant assignment to variable reg The variable reg is being assigned a value that is never read and is being re-assigned in the following for-loop. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 8193e6ad6916030845c5b2c0492ea19315a40a4d Author: Jamal Shareef Date: Mon Oct 14 20:12:12 2019 -0700 staging: sm750fb: Fix lines over 80 characters Fix lines over 80 character warnings. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/1f635b0469f93d8460d513f5fabd877dc5054a33.1571108943.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5ffa18ec0b7459823bfd52bfa7d5033fafafa08c Author: Michael Straube Date: Tue Oct 15 17:45:35 2019 +0200 staging: rtl8188eu: remove blank lines Remove blank lines to reduce whitespace and improve readability. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191015154535.27979-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit ec26697cd92d5c2f66bba58a15b88d254a87d62e Author: Michael Straube Date: Tue Oct 15 17:45:34 2019 +0200 staging: rtl8188eu: convert variables from unsigned char to u8 Convert the local variables max_ampdu_len and min_mpdu_spacing from unsigned char to u8 and remove unnecessary castings to u8 pointer. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191015154535.27979-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0906aa3f7ecf29992bca52a29f6d1116bfde319 Author: Michael Straube Date: Tue Oct 15 17:45:33 2019 +0200 staging: rtl8188eu: rename variables to avoid mixed case Rename local variables to avoid mixed case. max_AMPDU_len -> max_ampdu_len min_MPDU_spacing -> min_mpdu_spacing Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191015154535.27979-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit d9cceb24b407d57229d45853f9c399623e768d39 Author: Wambui Karuga Date: Tue Oct 15 11:47:31 2019 +0300 staging: octeon: fix restricted __be16 degrades to integer Add cast to fix the following sparse warning: warning: restricted __be16 degrades to integer Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/20191015084731.8514-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit f57ff0a9b806ebce507e699e4a4ee2c6f06178fc Author: Wambui Karuga Date: Tue Oct 15 14:26:37 2019 +0300 staging: rtl8723bs: remove casts to pointers in kfree Remove unnecessary casts in pointer types passed to kfree. Signed-off-by: Wambui Karuga Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20191015112637.20824-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit bbecf7de097690af75d9a292a6ac1316092a7389 Author: YueHaibing Date: Tue Oct 15 19:55:11 2019 +0800 staging: rtl8723bs: remove unnecessary null check Null check before kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191015115511.26560-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit bda17a4577da729d17b8f87bf3279b9db201d8ca Author: Gao Xiang Date: Tue Oct 8 20:56:13 2019 +0800 erofs: remove dead code since managed cache is now built-in After commit 4279f3f9889f ("staging: erofs: turn cache strategies into mount options"), cache strategies are changed into mount options rather than old build configs. Let's kill useless code for obsoleted build options. Link: https://lore.kernel.org/r/20191008125616.183715-2-gaoxiang25@huawei.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 9e579fc123a0c95f4fce695f86e5aeb1cf3464ee Author: Gao Xiang Date: Tue Oct 8 20:56:12 2019 +0800 erofs: clean up collection handling routines - change return value to int since collection is already returned within the collector. - better function naming. Link: https://lore.kernel.org/r/20191008125616.183715-1-gaoxiang25@huawei.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 2b7847158120136c4b23684c768a82d571ee59bf Author: John Garry Date: Wed Sep 4 23:54:44 2019 +0800 perf vendor events arm64: Add some missing events for Hisi hip08 HHA PMU Add some more missing events. A trivial typo is also fixed. Signed-off-by: John Garry Reviewed-by: Shaokun Zhang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1567612484-195727-5-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit e3ae569541802a6c9e89ab1f0f3ff613a5a1237b Author: John Garry Date: Wed Sep 4 23:54:43 2019 +0800 perf vendor events arm64: Add some missing events for Hisi hip08 L3C PMU Add some more missing events. Signed-off-by: John Garry Reviewed-by: Shaokun Zhang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1567612484-195727-4-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 1410732a1b642ba82730a95bdf7f4dafbac1891a Author: John Garry Date: Wed Sep 4 23:54:42 2019 +0800 perf vendor events arm64: Add some missing events for Hisi hip08 DDRC PMU Add some more missing events. Signed-off-by: John Garry Reviewed-by: Shaokun Zhang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1567612484-195727-3-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 84b0975f4853ba32d2d9b3c19ffa2b947f023fb3 Author: John Garry Date: Wed Sep 4 23:54:41 2019 +0800 perf vendor events arm64: Fix Hisi hip08 DDRC PMU eventname The "EventName" for the DDRC precharge command event is incorrect, so fix it. Fixes: 57cc732479ba ("perf jevents: Add support for Hisi hip08 DDRC PMU aliasing") Signed-off-by: John Garry Reviewed-by: Shaokun Zhang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1567612484-195727-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit c5e006cdbd278a8a5185a3a56acdba161cf159ea Author: Arnaldo Carvalho de Melo Date: Tue Oct 15 08:26:47 2019 -0300 perf trace: Support tracepoint dynamic char arrays Things like: # grep __data_loc /sys/kernel/debug/tracing/events/sched/sched_process_exec/format field:__data_loc char[] filename; offset:8; size:4; signed:1; # That, at that offset (8) and with that size(8) have an integer that contains the real length and offset for the contents of that array. Now this works: # perf trace --max-events 1 -e sched:*exec -a 0.000 sed/19441 sched:sched_process_exec(filename: "/usr/bin/sync", pid: 19441 (sync), old_pid: 19441 (sync)) # As when using the libtraceevent based beautifier: # perf trace --libtraceevent --max-events 1 -e sched:*exec -a 0.000 sync/19463 sched:sched_process_exec(filename=/usr/bin/sync pid=19463 old_pid=19463) # I.e. that 'filename' is implemented as a dynamic char array. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-950p0m842fe6n7sxsdwqj5i2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7fbfe22cf4cfe01a88704dd76ca65d108039d297 Author: Arnaldo Carvalho de Melo Date: Mon Oct 14 20:13:51 2019 -0300 perf trace: Filter own pid to avoid a feedback look in 'perf trace record -a' When doing a system wide 'perf trace record' we need, just like in 'perf trace' live mode, to filter out perf trace's own pid, so set up a tracepoint filter for the raw_syscalls tracepoints right after adding them to the argv array that is set up to then call cmd_record(). Reported-by: Andi Kleen Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-uysx5w8f2y5ndoln5cq370tv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit da949f507a73df5b5ad5031cb23b82a4d81846eb Author: Arnaldo Carvalho de Melo Date: Mon Oct 14 20:10:50 2019 -0300 perf string: Export asprintf__tp_filter_pids() Will be used directly in 'perf trace' for setting up the command line argv array to pass to cmd_record, as this was how 'perf trace record' was implemented, following the model used in 'perf kvm record', 'perf sched record', etc. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-w3cuwjs63lxf5zpryy3145uv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b88b14db21dbcd04a5d262b96613bfdd005341a7 Author: Arnaldo Carvalho de Melo Date: Mon Oct 14 15:32:40 2019 -0300 perf trace: Introduce --errno-summary To be used with -S or -s, using just this new option implies -s, examples: # perf trace --errno-summary sleep 1 Summary of events: sleep (10793), 80 events, 93.0% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ nanosleep 1 0 1000.427 1000.427 1000.427 1000.427 0.00% mmap 8 0 0.026 0.002 0.003 0.005 9.18% close 5 0 0.018 0.001 0.004 0.009 48.97% mprotect 4 0 0.017 0.003 0.004 0.006 16.49% openat 3 0 0.012 0.003 0.004 0.005 9.41% munmap 1 0 0.010 0.010 0.010 0.010 0.00% brk 4 0 0.005 0.001 0.001 0.002 22.77% read 4 0 0.005 0.001 0.001 0.002 22.33% access 1 1 0.004 0.004 0.004 0.004 0.00% ENOENT: 1 fstat 3 0 0.004 0.001 0.001 0.002 17.18% lseek 3 0 0.003 0.001 0.001 0.001 11.62% arch_prctl 2 1 0.002 0.001 0.001 0.001 3.32% EINVAL: 1 execve 1 0 0.000 0.000 0.000 0.000 0.00% # Works as well together with --failure and -S, i.e. collect the stats and show just the syscalls that failed: # perf trace --failure -S --errno-summary sleep 1 0.032 arch_prctl(option: 0x3001, arg2: 0x7fffdb11b580) = -1 EINVAL (Invalid argument) 0.045 access(filename: "/etc/ld.so.preload", mode: R) = -1 ENOENT (No such file or directory) Summary of events: sleep (10806), 80 events, 93.0% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ nanosleep 1 0 1000.094 1000.094 1000.094 1000.094 0.00% mmap 8 0 0.026 0.002 0.003 0.005 9.06% close 5 0 0.018 0.001 0.004 0.010 49.58% mprotect 4 0 0.017 0.003 0.004 0.006 17.56% openat 3 0 0.014 0.004 0.005 0.006 12.29% munmap 1 0 0.010 0.010 0.010 0.010 0.00% brk 4 0 0.005 0.001 0.001 0.002 22.75% read 4 0 0.005 0.001 0.001 0.002 17.19% access 1 1 0.005 0.005 0.005 0.005 0.00% ENOENT: 1 fstat 3 0 0.004 0.001 0.001 0.002 21.66% lseek 3 0 0.003 0.001 0.001 0.001 11.71% arch_prctl 2 1 0.002 0.001 0.001 0.001 2.66% EINVAL: 1 execve 1 0 0.000 0.000 0.000 0.000 0.00% # Suggested-by: Andi Kleen Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-l0mjwczkpouov7lss5zn8d9h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3253d9d093376d62b4a56e609f15d2ec5085ac73 Author: Darrick J. Wong Date: Tue Oct 15 08:44:32 2019 -0700 splice: only read in as much information as there is pipe buffer space Andreas Grünbacher reports that on the two filesystems that support iomap directio, it's possible for splice() to return -EAGAIN (instead of a short splice) if the pipe being written to has less space available in its pipe buffers than the length supplied by the calling process. Months ago we fixed splice_direct_to_actor to clamp the length of the read request to the size of the splice pipe. Do the same to do_splice. Fixes: 17614445576b6 ("splice: don't read more than available pipe space") Reported-by: syzbot+3c01db6025f26530cf8d@syzkaller.appspotmail.com Reported-by: Andreas Grünbacher Reviewed-by: Andreas Grünbacher Signed-off-by: Darrick J. Wong commit 906753befc4d2610194cd4d3d2ed15dff1ed1ca0 Author: Jan Kara Date: Tue Oct 15 08:43:43 2019 -0700 xfs: Use iomap_dio_rw to wait for unaligned direct IO Use iomap_dio_rw() to wait for unaligned direct IO instead of opencoding the wait. Signed-off-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 13ef954445df4fd1d7c003a500ec5ce49573e14b Author: Jan Kara Date: Tue Oct 15 08:43:42 2019 -0700 iomap: Allow forcing of waiting for running DIO in iomap_dio_rw() Filesystems do not support doing IO as asynchronous in some cases. For example in case of unaligned writes or in case file size needs to be extended (e.g. for ext4). Instead of forcing filesystem to wait for AIO in such cases, add argument to iomap_dio_rw() which makes the function wait for IO completion. This also results in executing iomap_dio_complete() inline in iomap_dio_rw() providing its return value to the caller as for ordinary sync IO. Signed-off-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 193065024072c0d6f2972142d5df5a00b33324c6 Author: Chris Wilson Date: Tue Oct 15 14:26:06 2019 +0100 drm/i915: Flush tasklet submission before sleeping on i915_request_wait If the system is being slow and userspace is racing ahead of the GPU and finds itself waiting for the GPU to catch up, before the process sleeps give the tasklet a kick, bypassing ksoftirqd. If the system is overloaded, then ksoftirqd may be delayed incurring additional latency to our user. This should not be a frequent problem, but in the past we have observed several hundred millisecond delays before ksoftirqd services an interrupt, so burn a few cycles to lend a helping hand. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191015132606.14349-1-chris@chris-wilson.co.uk commit 1137e61dcb99f7f8b54e77ed83f68b5b485a3e34 Author: Niklas Cassel Date: Wed Sep 4 18:03:38 2019 +0200 PCI: dwc: Fix find_next_bit() usage find_next_bit() takes a parameter of size long, and performs arithmetic that assumes that the argument is of size long. Therefore we cannot pass a u32, since this will cause find_next_bit() to read outside the stack buffer and will produce the following print: BUG: KASAN: stack-out-of-bounds in find_next_bit+0x38/0xb0 Fixes: 1b497e6493c4 ("PCI: dwc: Fix uninitialized variable in dw_handle_msi_irq()") Tested-by: Bjorn Andersson Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Acked-by: Gustavo Pimentel commit 4906c05b87d44c19b225935e24d62e4480ca556d Author: Kefeng Wang Date: Fri Oct 4 12:19:25 2019 +0800 PCI: mobiveil: Fix csr_read()/write() build issue RISCV has csr_read()/write() macros in arch/riscv/include/asm/csr.h. The same function naming is used in the PCI mobiveil driver thus causing build error. Rename csr_[read,write][l,] to mobiveil_csr_read()/write() to fix it. drivers/pci/controller/pcie-mobiveil.c:238:69: error: macro "csr_read" passed 3 arguments, but takes just 1 static u32 csr_read(struct mobiveil_pcie *pcie, u32 off, size_t size) drivers/pci/controller/pcie-mobiveil.c:253:80: error: macro "csr_write" passed 4 arguments, but takes just 2 static void csr_write(struct mobiveil_pcie *pcie, u32 val, u32 off, size_t size) Fixes: bcbe0d9a8d93 ("PCI: mobiveil: Unify register accessors") Signed-off-by: Kefeng Wang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Cc: Hou Zhiqiang Cc: Lorenzo Pieralisi Cc: Minghuan Lian Cc: Subrahmanya Lingappa Cc: Andrew Murray commit daee4f4e42c792997f4fee47dcdfa65dd720ec02 Author: Alan Mikhak Date: Wed Oct 9 10:06:56 2019 -0700 PCI: endpoint: Cast the page number to phys_addr_t Modify pci_epc_mem_alloc_addr() to cast the variable 'pageno' from type 'int' to 'phys_addr_t' before shifting left. This cast is needed to avoid treating bit 31 of 'pageno' as the sign bit which would otherwise get sign-extended to produce a negative value. When added to the base address of PCI memory space, the negative value would produce an invalid physical address which falls before the start of the PCI memory space. Signed-off-by: Alan Mikhak Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I commit fc1a0fb53875724c3498e1402ac339de3fee20d8 Author: Ville Syrjälä Date: Mon Sep 30 16:42:14 2019 +0300 drm/i915: Use drm_rect_init() Use the new drm_rect_init() helper where appropriate. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190930134214.24702-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit dcdef1abbc50c57c982be3964cf2250660ba906e Author: Ville Syrjälä Date: Mon Sep 30 16:42:13 2019 +0300 drm/i915: Use drm_rect_translate_to() Use the newly introduced drm_rect_translate_to() instead of hand rolling it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190930134214.24702-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit ba1f8af7f772139607d46da3fc151a403f966f46 Author: Neil Armstrong Date: Mon Sep 16 14:50:22 2019 +0200 arm64: dts: khadas-vim3: add commented support for PCIe The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between an USB3.0 Type A connector and a M.2 Key M slot. The PHY driving these differential lines is shared between the USB3.0 controller and the PCIe Controller, thus only a single controller can use it. The needed DT configuration when the MCU is configured to mux the PCIe/USB3.0 differential lines to the M.2 Key M slot is added commented and may be uncommented to disable USB3.0 from the USB Complex and enable the PCIe controller. The End User is not expected to uncomment the following except for testing purposes, but instead rely on the firmware/bootloader to update these nodes accordingly if PCIe mode is selected by the MCU. Signed-off-by: Neil Armstrong Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit 934de3415e5e63561530d1c571dc47e116a9c63a Author: Neil Armstrong Date: Mon Sep 16 14:50:21 2019 +0200 arm64: dts: meson-g12a: Add PCIe node This adds the Amlogic G12A PCI Express controller node, also using the USB3+PCIe Combo PHY. The PHY mode selection is static, thus the USB3+PCIe Combo PHY phandle would need to be removed from the USB control node if the shared differential lines are used for PCIe instead of USB3. Signed-off-by: Neil Armstrong Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit 631627253de29eef733cadd9385064a9fbc39823 Author: Neil Armstrong Date: Mon Sep 16 14:50:20 2019 +0200 phy: meson-g12a-usb3-pcie: Add support for PCIe mode This adds extended PCIe PHY functions for the Amlogic G12A USB3+PCIE Combo PHY to support reset, power_on and power_off for PCIe exclusively. With these callbacks, we can handle all the needed operations of the Amlogic PCIe controller driver. Signed-off-by: Neil Armstrong Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit 4ff9f68f8378baa8027426bb8a8853ae3f99ad6c Author: Neil Armstrong Date: Mon Sep 16 14:50:19 2019 +0200 PCI: amlogic: meson: Add support for G12A Add support for the Amlogic G12A SoC using a separate shared PHY. This adds support for fetching a PHY phandle and call the PHY init, reset and power on/off calls instead of writing in the PHY register or toggling the PHY reset line. The MIPI clock and the PHY memory resource are only required for the Amlogic AXG SoC PCIe PHY setup, thus these elements are ignored for the Amlogic G12A having a separate shared PHY. Signed-off-by: Neil Armstrong Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit eacaf7dcf08eb062a1059c6c115fa3fced3374ae Author: Neil Armstrong Date: Mon Sep 16 14:50:18 2019 +0200 PCI: amlogic: Fix probed clock names Fix the clock names used in the probe function according to the bindings. Fixes: 9c0ef6d34fdb ("PCI: amlogic: Add the Amlogic Meson PCIe controller driver") Signed-off-by: Neil Armstrong Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit 0978e95253c64bda17e1c2da5c30744980ca73d3 Author: Neil Armstrong Date: Mon Sep 16 14:50:17 2019 +0200 dt-bindings: pci: amlogic, meson-pcie: Add G12A bindings Add PCIE bindings for the Amlogic G12A SoC, the support is the same but the PHY is shared with USB3 to control the differential lines. Thus this adds a phy phandle to control the PHY, and only requires the MIPI clock for the Amlogic AXG SoC Family. Signed-off-by: Neil Armstrong Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Andrew Murray commit 4d3186a525b3f6af7d5f468e94b79b9e92cf3853 Author: Remi Pommarel Date: Sun Sep 1 15:39:15 2019 +0200 PCI: amlogic: Fix reset assertion via gpio descriptor Normally asserting reset signal on gpio would be achieved with: gpiod_set_value_cansleep(reset_gpio, 1); Meson PCI driver set reset value to '0' instead of '1' as it takes into account the PERST# signal polarity. The polarity should be taken care in the device tree instead. This fixes the reset assertion meaning and moves out the polarity configuration in DT (please note that there is no DT currently using this driver). Signed-off-by: Remi Pommarel Signed-off-by: Lorenzo Pieralisi Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong commit 3e30d70805d577e458592dcf59dcf8a2391d08a5 Author: Ville Syrjälä Date: Mon Jul 8 15:53:16 2019 +0300 drm/i915: Make .modeset_calc_cdclk() mandatory While not all platforms allow us to change the cdclk frequency we should still verify that the fixed cdclk frequency isn't too low. To that end let's cook up a .modeset_calc_cdclk() implementation that only does the min_cdclk vs. actual cdclk frequency check for such platforms. Also we mustn't forget about double wide pipe on gen2/3 when doing this. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190708125325.16576-11-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 131d3b1af10599b13c7bcd9bb137b5419cd12798 Author: Ville Syrjälä Date: Mon Jul 8 15:53:14 2019 +0300 drm/i915: Stop using drm_atomic_helper_check_planes() We need to insert stuff between the plane and crtc .atomic_check() drm_atomic_helper_check_planes() doesn't allow us to do that so stop using it and hand roll the loops instead. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190708125325.16576-9-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy Reviewed-by: Maarten Lankhorst Reviewed-by: Juha-Pekka Heikkila commit 3e706dff0891f56844166597aa4d37c43700e2f5 Author: Ville Syrjälä Date: Thu Jul 18 17:50:47 2019 +0300 drm/i915: Switch to using DP_MSA_MISC_* defines Now that we have standard defines for the MSA MISC bits lets use them on HSW+ where we program these directly into the TRANS_MSA_MISC register. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-7-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit 0299dfa7ad54f95ae9502fc425184f865d326d3b Author: Gwan-gyeong Mun Date: Thu Sep 19 22:53:11 2019 +0300 drm/i915/dp: Attach HDR metadata property to DP connector It attaches HDR metadata property to DP connector on GLK+. It enables HDR metadata infoframe sdp on GLK+ to be used to send HDR metadata to DP sink. v2: Minor style fix Signed-off-by: Gwan-gyeong Mun Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-9-gwan-gyeong.mun@intel.com commit b246cf215e4c62a0baa4dfc35510198f228dc951 Author: Gwan-gyeong Mun Date: Thu Sep 19 22:53:10 2019 +0300 drm/i915/dp: Program an Infoframe SDP Header and DB for HDR Static Metadata Function intel_dp_setup_hdr_metadata_infoframe_sdp handles Infoframe SDP header and data block setup for HDR Static Metadata. It enables writing of HDR metadata infoframe SDP to panel. Support for HDR video was introduced in DisplayPort 1.4. It implements the CTA-861-G standard for transport of static HDR metadata. The HDR Metadata will be provided by userspace compositors, based on blending policies and passed to the driver through a blob property. Because each of GEN11 and prior GEN11 have different register size for HDR Metadata Infoframe SDP packet, it adds and uses different register size. Setup Infoframe SDP header and data block in function intel_dp_setup_hdr_metadata_infoframe_sdp for HDR Static Metadata as per dp 1.4 spec and CTA-861-F spec. As per DP 1.4 spec, 2.2.2.5 SDP Formats. It enables Dynamic Range and Mastering Infoframe for HDR content, which is defined in CTA-861-F spec. According to DP 1.4 spec and CEA-861-F spec Table 5, in order to transmit static HDR metadata, we have to use Non-audio INFOFRAME SDP v1.3. +--------------------------------+-------------------------------+ | [ Packet Type Value ] | [ Packet Type ] | +--------------------------------+-------------------------------+ | 80h + Non-audio INFOFRAME Type | CEA-861-F Non-audio INFOFRAME | +--------------------------------+-------------------------------+ | [Transmission Timing] | +----------------------------------------------------------------+ | As per CEA-861-F for INFOFRAME, including CEA-861.3 within | | which Dynamic Range and Mastering INFOFRAME are defined | +----------------------------------------------------------------+ v2: Add a missed blank line after function declaration. v3: Remove not handled return values from intel_dp_setup_hdr_metadata_infoframe_sdp(). [Uma] v9: Addressed review comments from Ville. - Add BUILD_BUG_ON to check a changing of struct dp_sdp size. - Change a passed size toward write_infoframe() for DP infoframe sdp packet for HDR static metadata. Signed-off-by: Gwan-gyeong Mun Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-8-gwan-gyeong.mun@intel.com commit 922430dd4022eb7afef29c0f98972265a0053b8d Author: Gwan-gyeong Mun Date: Thu Sep 19 22:53:09 2019 +0300 drm/i915: Add new GMP register size for GEN11 According to Bspec, GEN11 and prior GEN11 have different register size for HDR Metadata Infoframe SDP packet. It adds new VIDEO_DIP_GMP_DATA_SIZE for GEN11. And it makes handle different register size for HDMI_PACKET_TYPE_GAMUT_METADATA on hsw_dip_data_size() for each GEN platforms. It addresses Uma's review comments. v9: Add WARN_ON() when buffer size if larger than register size. [Ville] Signed-off-by: Gwan-gyeong Mun Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-7-gwan-gyeong.mun@intel.com commit 9d1bb6f0222c425235ddb592e54c778c7b67b2fc Author: Gwan-gyeong Mun Date: Thu Sep 19 22:53:08 2019 +0300 drm/i915/dp: Attach colorspace property It attaches the colorspace connector property to a DisplayPort connector. Based on colorspace change, modeset will be triggered to switch to a new colorspace. And in order to distinguish colorspace bwtween DP and HDMI connector, it adds a handling of drm_mode_create_dp_colorspace_property() to intel_attach_colorspace_property(). Based on colorspace property value create a VSC SDP packet with appropriate colorspace. This would help to enable wider color gamut like BT2020 on a sink device. v9: Addressed review comments from Ville - Add a handling of drm_mode_create_dp_colorspace_property() to intel_attach_colorspace_property(). This hunk moved from the previous commit. Signed-off-by: Gwan-gyeong Mun Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-6-gwan-gyeong.mun@intel.com commit 0c06fa156006c746bbde36961119143596dd1425 Author: Gwan-gyeong Mun Date: Thu Sep 19 22:53:05 2019 +0300 drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA When BT.2020 Colorimetry output is used for DP, we should program BT.2020 Colorimetry to MSA and VSC SDP. In order to handle colorspace of drm_connector_state, it moves a calling of intel_ddi_set_pipe_settings() function into intel_ddi_pre_enable_dp(). And it also rename intel_ddi_set_pipe_settings() to intel_ddi_set_dp_msa(). As per DP 1.4a spec section 2.2.4 [MSA Data Transport] The MSA data that the DP Source device transports for reproducing the main video stream. Attribute data is sent once per frame during the main video stream’s vertical blanking period. In order to distinguish needed colorimetry for VSC SDP, it adds intel_dp_needs_vsc_sdp function. If the output colorspace requires vsc sdp or output format is YCbCr 4:2:0, it uses MSA with VSC SDP. As per DP 1.4a spec section 2.2.4.3 [MSA Field for Indication of Color Encoding Format and Content Color Gamut] while sending BT.2020 Colorimetry signals we should program MSA MISC1 fields which indicate VSC SDP for the Pixel Encoding/Colorimetry Format. v2: Remove useless parentheses v3: Addressed review comments from Ville - In order to checking output format and output colorspace on intel_dp_needs_vsc_sdp(), it passes entire intel_crtc_state struct value. - Remove a pointless variable. v9: Addressed review comments from Ville - Remove a duplicated output color space from intel_crtc_state. - In order to handle colorspace of drm_connector_state, it moves a calling of intel_ddi_set_pipe_settings() function into intel_ddi_pre_enable_dp(). Signed-off-by: Gwan-gyeong Mun Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-3-gwan-gyeong.mun@intel.com Signed-off-by: Ville Syrjälä commit bb71fb0072f14611f6c5bb5a1a5bf8ac942fa1c3 Author: Gwan-gyeong Mun Date: Thu Sep 19 22:53:04 2019 +0300 drm/i915/dp: Extend program of VSC Header and DB for Colorimetry Format It refactors and renames a function which handled vsc sdp header and data block setup for supporting colorimetry format. Function intel_dp_setup_vsc_sdp handles vsc sdp header and data block setup for pixel encoding / colorimetry format. In order to use colorspace information of a connector, it adds an argument of drm_connector_state type. Setup VSC header and data block in function intel_dp_setup_vsc_sdp for pixel encoding / colorimetry format as per dp 1.4a spec, section 2.2.5.7.1, table 2-119: VSC SDP Header Bytes, section 2.2.5.7.5, table 2-120: VSC SDP Payload for DB16 through DB18. Signed-off-by: Gwan-gyeong Mun Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-2-gwan-gyeong.mun@intel.com commit fb03082a54acd66c61535edfefe96b2ff88ce7e2 Author: Yong Wu Date: Wed Oct 9 19:59:33 2019 +0800 memory: mtk-smi: Add PM suspend and resume ops In the commit 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback to enable clocks"), we use pm_runtime callback to enable/disable the smi larb clocks. It will cause the larb's clock may not be disabled when suspend. That is because device_prepare will call pm_runtime_get_noresume which will keep the larb's PM runtime status still is active when suspend, then it won't enter our pm_runtime suspend callback to disable the corresponding clocks. This patch adds suspend pm_ops to force disable the clocks, Use "LATE" to make sure it disable the larb's clocks after the multimedia devices. Fixes: 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback to enable clocks") Signed-off-by: Anan Sun Signed-off-by: Yong Wu Signed-off-by: Joerg Roedel commit 470eb3b31134ada545dcb41e94a0c97b42c95803 Author: Suthikulpanit, Suravee Date: Mon Oct 14 20:06:19 2019 +0000 iommu/amd: Simpify decoding logic for INVALID_PPR_REQUEST event Reuse existing macro to simplify the code and improve readability. Cc: Joerg Roedel Cc: Gary R Hook Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel commit 8eded45fcd3420e0f08b1e7869781f0e12927637 Author: Arnaldo Carvalho de Melo Date: Mon Oct 14 14:46:40 2019 -0300 perf trace: Add syscall failure stats to -s/--summary and -S/--with-summary Just like strace has: # trace -s sleep 1 Summary of events: sleep (32370), 80 events, 93.0% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ nanosleep 1 0 1000.402 1000.402 1000.402 1000.402 0.00% mmap 8 0 0.023 0.002 0.003 0.004 8.49% close 5 0 0.015 0.001 0.003 0.009 51.39% mprotect 4 0 0.014 0.002 0.003 0.005 16.95% openat 3 0 0.013 0.003 0.004 0.005 14.29% munmap 1 0 0.010 0.010 0.010 0.010 0.00% read 4 0 0.005 0.001 0.001 0.002 16.83% brk 4 0 0.004 0.001 0.001 0.002 20.82% access 1 1 0.004 0.004 0.004 0.004 0.00% fstat 3 0 0.003 0.001 0.001 0.001 12.17% lseek 3 0 0.003 0.001 0.001 0.001 11.45% arch_prctl 2 1 0.002 0.001 0.001 0.001 2.30% execve 1 0 0.000 0.000 0.000 0.000 0.00% # # perf trace -S sleep 1 ? ... [continued]: execve()) = 0 0.028 brk(brk: NULL) = 0x559f5bd96000 0.033 arch_prctl(option: 0x3001, arg2: 0x7ffda8b715a0) = -1 EINVAL (Invalid argument) 0.046 access(filename: "/etc/ld.so.preload", mode: R) = -1 ENOENT (No such file or directory) 0.055 openat(dfd: CWD, filename: "/etc/ld.so.cache", flags: RDONLY|CLOEXEC) = 3 0.060 fstat(fd: 3, statbuf: 0x7ffda8b707a0) = 0 0.062 mmap(addr: NULL, len: 134346, prot: READ, flags: PRIVATE, fd: 3, off: 0) = 0x7f3aedfc4000 0.066 close(fd: 3) = 0 0.079 openat(dfd: CWD, filename: "/lib64/libc.so.6", flags: RDONLY|CLOEXEC) = 3 0.085 read(fd: 3, buf: 0x7ffda8b70948, count: 832) = 832 0.088 lseek(fd: 3, offset: 792, whence: SET) = 792 0.090 read(fd: 3, buf: 0x7ffda8b70810, count: 68) = 68 0.093 fstat(fd: 3, statbuf: 0x7ffda8b707f0) = 0 0.095 mmap(addr: NULL, len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) = 0x7f3aedfc2000 0.101 lseek(fd: 3, offset: 792, whence: SET) = 792 0.103 read(fd: 3, buf: 0x7ffda8b70450, count: 68) = 68 0.105 lseek(fd: 3, offset: 864, whence: SET) = 864 0.107 read(fd: 3, buf: 0x7ffda8b70470, count: 32) = 32 0.110 mmap(addr: NULL, len: 1857472, prot: READ, flags: PRIVATE|DENYWRITE, fd: 3, off: 0) = 0x7f3aeddfc000 0.114 mprotect(start: 0x7f3aede1e000, len: 1679360, prot: NONE) = 0 0.121 mmap(addr: 0x7f3aede1e000, len: 1363968, prot: READ|EXEC, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x22000) = 0x7f3aede1e000 0.127 mmap(addr: 0x7f3aedf6b000, len: 311296, prot: READ, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x16f000) = 0x7f3aedf6b000 0.131 mmap(addr: 0x7f3aedfb8000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x1bb000) = 0x7f3aedfb8000 0.138 mmap(addr: 0x7f3aedfbe000, len: 14272, prot: READ|WRITE, flags: PRIVATE|FIXED|ANONYMOUS) = 0x7f3aedfbe000 0.147 close(fd: 3) = 0 0.158 arch_prctl(option: SET_FS, arg2: 0x7f3aedfc3580) = 0 0.210 mprotect(start: 0x7f3aedfb8000, len: 16384, prot: READ) = 0 0.230 mprotect(start: 0x559f5b27d000, len: 4096, prot: READ) = 0 0.236 mprotect(start: 0x7f3aee00f000, len: 4096, prot: READ) = 0 0.240 munmap(addr: 0x7f3aedfc4000, len: 134346) = 0 0.300 brk(brk: NULL) = 0x559f5bd96000 0.302 brk(brk: 0x559f5bdb7000) = 0x559f5bdb7000 0.305 brk(brk: NULL) = 0x559f5bdb7000 0.310 openat(dfd: CWD, filename: "/usr/lib/locale/locale-archive", flags: RDONLY|CLOEXEC) = 3 0.315 fstat(fd: 3, statbuf: 0x7f3aedfbdac0) = 0 0.318 mmap(addr: NULL, len: 217750512, prot: READ, flags: PRIVATE, fd: 3, off: 0) = 0x7f3ae0e52000 0.325 close(fd: 3) = 0 0.358 nanosleep(rqtp: 0x7ffda8b714b0, rmtp: NULL) = 0 1000.622 close(fd: 1) = 0 1000.641 close(fd: 2) = 0 1000.664 exit_group(error_code: 0) = ? Summary of events: sleep (722), 80 events, 93.0% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ nanosleep 1 0 1000.194 1000.194 1000.194 1000.194 0.00% mmap 8 0 0.025 0.002 0.003 0.005 10.17% close 5 0 0.018 0.001 0.004 0.010 50.18% mprotect 4 0 0.016 0.003 0.004 0.006 16.81% openat 3 0 0.011 0.003 0.004 0.004 6.57% munmap 1 0 0.010 0.010 0.010 0.010 0.00% brk 4 0 0.005 0.001 0.001 0.002 20.72% read 4 0 0.005 0.001 0.001 0.002 16.71% access 1 1 0.005 0.005 0.005 0.005 0.00% fstat 3 0 0.004 0.001 0.001 0.002 14.82% lseek 3 0 0.003 0.001 0.001 0.001 11.66% arch_prctl 2 1 0.002 0.001 0.001 0.001 3.59% execve 1 0 0.000 0.000 0.000 0.000 0.00% # Works for system wide, e.g. for 1ms: # perf trace -s -a sleep 0.001 Summary of events: sleep (768), 94 events, 37.9% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ nanosleep 1 0 1.133 1.133 1.133 1.133 0.00% execve 7 6 0.351 0.003 0.050 0.316 88.53% mmap 8 0 0.024 0.002 0.003 0.004 8.86% mprotect 4 0 0.017 0.003 0.004 0.006 16.02% openat 3 0 0.013 0.004 0.004 0.005 8.34% munmap 1 0 0.010 0.010 0.010 0.010 0.00% brk 4 0 0.007 0.001 0.002 0.002 10.99% close 5 0 0.005 0.001 0.001 0.002 11.69% read 5 0 0.005 0.000 0.001 0.002 30.53% access 1 1 0.004 0.004 0.004 0.004 0.00% fstat 3 0 0.004 0.001 0.001 0.002 10.74% lseek 3 0 0.003 0.001 0.001 0.001 10.20% arch_prctl 2 1 0.002 0.001 0.001 0.001 3.34% Web Content (21258), 46 events, 18.5% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ recvmsg 12 12 0.015 0.001 0.001 0.002 8.50% futex 2 0 0.008 0.003 0.004 0.005 27.08% poll 6 0 0.006 0.000 0.001 0.002 22.14% read 2 0 0.006 0.002 0.003 0.003 26.08% write 1 0 0.002 0.002 0.002 0.002 0.00% Web Content (4365), 36 events, 14.5% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ recvmsg 10 10 0.015 0.001 0.002 0.003 11.83% poll 5 0 0.006 0.000 0.001 0.002 28.44% futex 2 0 0.005 0.001 0.003 0.004 48.29% read 1 0 0.003 0.003 0.003 0.003 0.00% Timer (21275), 14 events, 5.6% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ futex 6 1 0.240 0.000 0.040 0.149 64.58% write 1 0 0.008 0.008 0.008 0.008 0.00% Timer (4383), 14 events, 5.6% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ futex 6 2 0.186 0.000 0.031 0.181 96.45% write 1 0 0.010 0.010 0.010 0.010 0.00% Web Content (20354), 28 events, 11.3% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ recvmsg 8 8 0.010 0.001 0.001 0.002 15.24% poll 4 0 0.004 0.000 0.001 0.002 35.68% futex 1 0 0.003 0.003 0.003 0.003 0.00% read 1 0 0.003 0.003 0.003 0.003 0.00% Timer (20371), 10 events, 4.0% syscall calls errors total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- ------ -------- --------- --------- --------- ------ futex 4 1 0.077 0.000 0.019 0.075 95.46% write 1 0 0.005 0.005 0.005 0.005 0.00% [root@quaco ~]# Cc: Adrian Hunter Cc: Andi Kleen Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-k7kh2muo5oeg56yx446hnw9v@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit dd071024bf52156eed31deaf511c6e7a82a6f57b Author: Jin Yao Date: Fri Oct 11 13:05:45 2019 +0800 perf stat: Support --all-kernel/--all-user 'perf record' has supported --all-kernel / --all-user to configure all used events to run in kernel space or run in user space. But 'perf stat' doesn't support these options. It would be useful to support these options in 'perf stat' too to keep the same semantics available in both tools. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191011050545.3899-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5fb470bc29d8e2ff0e1cab4fbb580a06da11ab28 Author: Thomas Richter Date: Tue Oct 8 11:38:41 2019 +0200 perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy() The build of file libperf-jvmti.so succeeds but the resulting object fails to load: # ~/linux/tools/perf/perf record -k mono -- java \ -XX:+PreserveFramePointer \ -agentpath:/root/linux/tools/perf/libperf-jvmti.so \ hog 100000 123450 Error occurred during initialization of VM Could not find agent library /root/linux/tools/perf/libperf-jvmti.so in absolute path, with error: /root/linux/tools/perf/libperf-jvmti.so: undefined symbol: _ctype Add the missing _ctype symbol into the build script. Fixes: 79743bc927f6 ("perf jvmti: Link against tools/lib/string.o to have weak strlcpy()") Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Vasily Gorbik Link: http://lore.kernel.org/lkml/20191008093841.59387-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit c5baf9089246c1356705c9ba36d767ee8ce43dd2 Author: Ian Rogers Date: Thu Oct 10 11:36:49 2019 -0700 perf annotate: Fix objdump --no-show-raw-insn flag Remove redirection of objdump's stderr to /dev/null to help diagnose failures. Fix the '--no-show-raw' flag to be '--no-show-raw-insn' which binutils is permissive and allows, but fails with LLVM objdump. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20191010183649.23768-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b34b45eef16d814a93a52f2e76db803bb38939a0 Author: Ian Rogers Date: Thu Oct 10 11:36:48 2019 -0700 perf annotate: Don't pipe objdump output through 'expand' command Avoiding a pipe allows objdump command failures to surface. Move to the caller of symbol__parse_objdump_line the call to strim that removes leading and trailing tabs. Add a new expand_tabs function that if a tab is present allocate a new line in which tabs are expanded. In symbol__parse_objdump_line the line had no leading spaces, so simplify the line_ip processing. Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20191010183649.23768-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7a675de428364a16038a8e6ed557daf0a009ce9c Author: Ian Rogers Date: Thu Oct 10 11:36:47 2019 -0700 perf annotate: Don't pipe objdump output through 'grep' command Simplify the objdump command by not piping the output of objdump through grep. Instead, drop lines that match the grep pattern during the reading loop. Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20191010183649.23768-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4235949944d1bb244c85fd184cdc2f78e9df848b Author: Ian Rogers Date: Thu Oct 10 11:36:46 2019 -0700 perf annotate: Use libsubcmd's run-command.h to fork objdump Reduce duplicated logic by using the subcmd library. Ensure when errors occur they are reported to the caller. Before this patch, if no lines are read the error status is 0. Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20191010183649.23768-3-irogers@google.com Link: http://lore.kernel.org/lkml/20191015003418.62563-1-irogers@google.com [ merged follow up fix for NULL termination as in the 2nd link above ] Signed-off-by: Arnaldo Carvalho de Melo commit 353dcaa2f979a04f9397306ae3165ccf9fc731df Author: Ian Rogers Date: Thu Oct 10 11:36:45 2019 -0700 perf annotate: Avoid reallocation in objdump parsing Objdump output is parsed using getline which allocates memory for the read. Getline will realloc if the memory is too small, but currently the line is always freed after the call. Simplify parse_objdump_line by performing the reading in symbol__disassemble. Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20191010183649.23768-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 800d3f561659b5436f8c57e7c26dd1f6928b5615 Author: Jin Yao Date: Fri Oct 11 10:21:22 2019 +0800 perf report: Add warning when libunwind not compiled in We received a user report that call-graph DWARF mode was enabled in 'perf record' but 'perf report' didn't unwind the callstack correctly. The reason was, libunwind was not compiled in. We can use 'perf -vv' to check the compiled libraries but it would be valuable to report a warning to user directly (especially valuable for a perf newbie). The warning is: Warning: Please install libunwind development packages during the perf build. Both TUI and stdio are supported. Signed-off-by: Jin Yao Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191011022122.26369-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 791ce9c48c79210d2ffcdbe69421e7783b32921f Author: Leo Yan Date: Fri Oct 11 17:19:42 2019 +0800 perf test: Avoid infinite loop for task exit case When executing the task exit testing case, perf gets stuck in an endless loop this case and doesn't return back on Arm64 Juno board. After digging into this issue, since Juno board has Arm's big.LITTLE CPUs, thus the PMUs are not compatible between the big CPUs and little CPUs. This leads to a PMU event that cannot be enabled properly when the traced task is migrated from one variant's CPU to another variant. Finally, the test case runs into infinite loop for cannot read out any event data after return from polling. Eventually, we need to work out formal solution to allow PMU events can be freely migrated from one CPU variant to another, but this is a difficult task and a different topic. This patch tries to fix the Perf test case to avoid infinite loop, when the testing detects 1000 times retrying for reading empty events, it will directly bail out and return failure. This allows the Perf tool can continue its other test cases. Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191011091942.29841-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 6add129c5d9210ada25217abc130df0b7096ee02 Author: Leo Yan Date: Fri Oct 11 17:19:41 2019 +0800 perf test: Report failure for mmap events When fail to mmap events in task exit case, it misses to set 'err' to -1; thus the testing will not report failure for it. This patch sets 'err' to -1 when fails to mmap events, thus Perf tool can report correct result. Fixes: d723a55096b8 ("perf test: Add test case for checking number of EXIT events") Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191011091942.29841-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 5a40e1994815ab09c59614c6a13d94eef55d1a7f Author: Andi Kleen Date: Fri Oct 11 11:21:40 2019 -0700 perf evlist: Fix fix for freed id arrays In the earlier fix for the memory overrun of id arrays I managed to typo the wrong event in the fix. Of course we need to close the current event in the loop, not the original failing event. The same test case as in the original patch still passes. Fixes: 7834fa948beb ("perf evlist: Fix access of freed id arrays") Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191011182140.8353-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit b3509b6ed7a79ec49f6b64e4f3b780f259a2a468 Author: Andi Kleen Date: Fri Oct 11 11:21:39 2019 -0700 perf script: Fix --reltime with --time My earlier patch to just enable --reltime with --time was a little too optimistic. The --time parsing would accept absolute time, which is very confusing to the user. Support relative time in --time parsing too. This only works with recent perf record that records the first sample time. Otherwise we error out. Fixes: 3714437d3fcc ("perf script: Allow --time with --reltime") Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20191011182140.8353-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit bb91a073ed124d3f6224d8ac37ecb536c01970c1 Author: Jiri Olsa Date: Sun Oct 13 17:14:25 2019 +0200 perf tools: Allow to build with -ltcmalloc By using "make TCMALLOC=1" you can enable perf to be build for usage with libtcmalloc.so (gperftools). Get heap profile (tools/perf directory): $ $ make TCMALLOC=1 DEBUG=1 $ HEAPPROFILE=/tmp/heapprof ./perf ... $ pprof ./perf /tmp/heapprof.000* (pprof) top Total: 2335.5 MB 1735.1 74.3% 74.3% 1735.1 74.3% memdup 402.0 17.2% 91.5% 402.0 17.2% zalloc 140.2 6.0% 97.5% 145.8 6.2% map__new 33.6 1.4% 98.9% 33.6 1.4% symbol__new 12.4 0.5% 99.5% 12.4 0.5% alloc_event 6.2 0.3% 99.7% 6.2 0.3% nsinfo__new 5.5 0.2% 100.0% 5.5 0.2% nsinfo__copy 0.3 0.0% 100.0% 0.3 0.0% dso__new 0.1 0.0% 100.0% 0.1 0.0% do_read_string 0.0 0.0% 100.0% 0.0 0.0% __GI__IO_file_doallocate See callstack: $ pprof --pdf ./perf /tmp/heapprof.00* > callstack.pdf $ pprof --web ./perf /tmp/heapprof.00* Committer testing: Install gperftools, on fedora: # dnf install gperftools-devel Then build: $ make TCMALLOC=1 DEBUG=1 -C tools/perf O=/tmp/build/perf install-bin Verify that it linked against the right library: $ ldd ~/bin/perf | grep tcma libtcmalloc.so.4 => /lib64/libtcmalloc.so.4 (0x00007fb2953a7000) $ Run 'perf trace' system wide for 1 minute: # HEAPPROFILE=/tmp/heapprof perf trace -a sleep 1m 59985.524 ( 0.006 ms): Web Content/20354 recvmsg(fd: 9, msg: 0x7ffee5fdafb0) = -1 EAGAIN (Resource temporarily unavailable) 59985.536 ( 0.005 ms): Web Content/20354 recvmsg(fd: 9, msg: 0x7ffee5fdafc0) = -1 EAGAIN (Resource temporarily unavailable) 59981.956 (10.143 ms): SCTP timer/21716 ... [continued]: select()) = 0 (Timeout) 59985.549 ( ): Web Content/20354 poll(ufds: 0x7f1df38af180, nfds: 3, timeout_msecs: 4294967295) ... 0.926 (59999.481 ms): sleep/29764 ... [continued]: nanosleep()) = 0 59992.133 ( ): SCTP timer/21716 select(tvp: 0x7ff5bf7fee80) ... 60000.477 ( 0.009 ms): sleep/29764 close(fd: 1) = 0 60000.493 ( 0.005 ms): sleep/29764 close(fd: 2) = 0 60000.514 ( ): sleep/29764 exit_group() = ? Dumping heap profile to /tmp/heapprof.0001.heap (Exiting, 3 MB in use) [root@quaco ~]# Install pprof: # dnf install pprof And run it: # pprof ~/bin/perf /tmp/heapprof.0001.heap Using local file /root/bin/perf. Using local file /tmp/heapprof.0001.heap. Welcome to pprof! For help, type 'help'. (pprof) top Total: 4.0 MB 1.7 42.0% 42.0% 2.2 54.1% map__new 0.9 23.3% 65.3% 0.9 23.3% zalloc 0.5 11.4% 76.7% 0.5 11.4% dso__new 0.2 5.6% 82.3% 0.3 8.5% trace__sys_enter 0.2 4.9% 87.2% 0.2 4.9% __GI___strdup 0.2 3.8% 91.0% 0.2 3.8% new_term 0.1 2.2% 93.2% 0.4 10.1% __perf_pmu__new_alias 0.0 1.0% 94.3% 0.0 1.2% event_read_fields 0.0 0.8% 95.1% 0.0 0.8% nsinfo__new 0.0 0.7% 95.8% 0.1 3.2% trace__read_syscall_info (pprof) Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191013151427.11941-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 808be0aae53a3675337fad9cde616e086bdc8287 Author: Jacob Pan Date: Wed Oct 2 12:42:43 2019 -0700 iommu: Introduce guest PASID bind function Guest shared virtual address (SVA) may require host to shadow guest PASID tables. Guest PASID can also be allocated from the host via enlightened interfaces. In this case, guest needs to bind the guest mm, i.e. cr3 in guest physical address to the actual PASID table in the host IOMMU. Nesting will be turned on such that guest virtual address can go through a two level translation: - 1st level translates GVA to GPA - 2nd level translates GPA to HPA This patch introduces APIs to bind guest PASID data to the assigned device entry in the physical IOMMU. See the diagram below for usage explanation. .-------------. .---------------------------. | vIOMMU | | Guest process mm, FL only | | | '---------------------------' .----------------/ | PASID Entry |--- PASID cache flush - '-------------' | | | V | | GP '-------------' Guest ------| Shadow |----------------------- GP->HP* --------- v v | Host v .-------------. .----------------------. | pIOMMU | | Bind FL for GVA-GPA | | | '----------------------' .----------------/ | | PASID Entry | V (Nested xlate) '----------------\.---------------------. | | |Set SL to GPA-HPA | | | '---------------------' '-------------' Where: - FL = First level/stage one page tables - SL = Second level/stage two page tables - GP = Guest PASID - HP = Host PASID * Conversion needed if non-identity GP-HP mapping option is chosen. Signed-off-by: Jacob Pan Signed-off-by: Liu Yi L Reviewed-by: Jean-Philippe Brucker Reviewed-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Signed-off-by: Joerg Roedel commit e5c0bd7f2206cd288029edb6afbfde93c73b4048 Author: Jacob Pan Date: Wed Oct 2 12:42:42 2019 -0700 iommu/ioasid: Add custom allocators IOASID allocation may rely on platform specific methods. One use case is that when running in the guest, in order to obtain system wide global IOASIDs, emulated allocation interface is needed to communicate with the host. Here we call these platform specific allocators custom allocators. Custom IOASID allocators can be registered at runtime and take precedence over the default XArray allocator. They have these attributes: - provides platform specific alloc()/free() functions with private data. - allocation results lookup are not provided by the allocator, lookup request must be done by the IOASID framework by its own XArray. - allocators can be unregistered at runtime, either fallback to the next custom allocator or to the default allocator. - custom allocators can share the same set of alloc()/free() helpers, in this case they also share the same IOASID space, thus the same XArray. - switching between allocators requires all outstanding IOASIDs to be freed unless the two allocators share the same alloc()/free() helpers. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Jacob Pan Link: https://lkml.org/lkml/2019/4/26/462 Reviewed-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Signed-off-by: Joerg Roedel commit fa83433c92e340822a056a610a4fa2063a3db304 Author: Jean-Philippe Brucker Date: Wed Oct 2 12:42:41 2019 -0700 iommu: Add I/O ASID allocator Some devices might support multiple DMA address spaces, in particular those that have the PCI PASID feature. PASID (Process Address Space ID) allows to share process address spaces with devices (SVA), partition a device into VM-assignable entities (VFIO mdev) or simply provide multiple DMA address space to kernel drivers. Add a global PASID allocator usable by different drivers at the same time. Name it I/O ASID to avoid confusion with ASIDs allocated by arch code, which are usually a separate ID space. The IOASID space is global. Each device can have its own PASID space, but by convention the IOMMU ended up having a global PASID space, so that with SVA, each mm_struct is associated to a single PASID. The allocator is primarily used by IOMMU subsystem but in rare occasions drivers would like to allocate PASIDs for devices that aren't managed by an IOMMU, using the same ID space as IOMMU. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Jacob Pan Reviewed-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Signed-off-by: Joerg Roedel commit 4c7c171f85b261f91270d405b7c7390aa6ddfb60 Author: Yi L Liu Date: Wed Oct 2 12:42:40 2019 -0700 iommu: Introduce cache_invalidate API In any virtualization use case, when the first translation stage is "owned" by the guest OS, the host IOMMU driver has no knowledge of caching structure updates unless the guest invalidation activities are trapped by the virtualizer and passed down to the host. Since the invalidation data can be obtained from user space and will be written into physical IOMMU, we must allow security check at various layers. Therefore, generic invalidation data format are proposed here, model specific IOMMU drivers need to convert them into their own format. Signed-off-by: Yi L Liu Signed-off-by: Jacob Pan Signed-off-by: Ashok Raj Signed-off-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Reviewed-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Signed-off-by: Joerg Roedel commit 7e3a57fa6ca831fa232a7cd4659eaed674236810 Author: Marc Zyngier Date: Wed Oct 2 10:06:13 2019 +0100 arm64: Document ICC_CTLR_EL3.PMHE setting requirements It goes without saying, but better saying it: the kernel expects ICC_CTLR_EL3.PMHE to have the same value across all CPUs, and for that setting not to change during the lifetime of the kernel. Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit f226650494c6aa87526d12135b7de8b8c074f3de Author: Marc Zyngier Date: Wed Oct 2 10:06:12 2019 +0100 arm64: Relax ICC_PMR_EL1 accesses when ICC_CTLR_EL1.PMHE is clear The GICv3 architecture specification is incredibly misleading when it comes to PMR and the requirement for a DSB. It turns out that this DSB is only required if the CPU interface sends an Upstream Control message to the redistributor in order to update the RD's view of PMR. This message is only sent when ICC_CTLR_EL1.PMHE is set, which isn't the case in Linux. It can still be set from EL3, so some special care is required. But the upshot is that in the (hopefuly large) majority of the cases, we can drop the DSB altogether. This relies on a new static key being set if the boot CPU has PMHE set. The drawback is that this static key has to be exported to modules. Cc: Will Deacon Cc: James Morse Cc: Julien Thierry Cc: Suzuki K Poulose Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 7fbcb5da811be7d47468417c7795405058abb3da Author: Remi Pommarel Date: Fri Sep 27 10:55:02 2019 +0200 PCI: aardvark: Don't rely on jiffies while holding spinlock advk_pcie_wait_pio() can be called while holding a spinlock (from pci_bus_read_config_dword()), then depends on jiffies in order to timeout while polling on PIO state registers. In the case the PIO transaction failed, the timeout will never happen and will also cause the cpu to stall. This decrements a variable and wait instead of using jiffies. Signed-off-by: Remi Pommarel Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Acked-by: Thomas Petazzoni commit 757f26a3a9ec2c072fdd1b14ec93daf1e4cfed8c Author: Biju Das Date: Fri Sep 27 11:53:21 2019 +0100 iommu/ipmmu-vmsa: Hook up r8a774b1 DT matching code Support RZ/G2N (R8A774B1) IPMMU. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Joerg Roedel commit d0635ebf85aa2cbc17a5b83eaa65f20fa71bf388 Author: Biju Das Date: Tue Sep 24 08:40:54 2019 +0100 dt-bindings: iommu: ipmmu-vmsa: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Joerg Roedel commit e74dc5c763448004ec8add422e9db53ee246acce Author: Alexandru Ardelean Date: Thu Sep 26 13:51:37 2019 +0300 spi: use new `spi_transfer_delay_exec` helper where straightforward For many places in the spi drivers, using the new `spi_transfer_delay` helper is straightforward. It's just replacing: ``` if (t->delay_usecs) udelay(t->delay_usecs); ``` with `spi_transfer_delay(t)` which handles both `delay_usecs` and the new `delay` field. This change replaces in all places (in the spi drivers) where this change is simple. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-10-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 8b390c15818ccf34a4e44e18ed590cb06bbbcb88 Author: Chris Wilson Date: Tue Oct 15 10:32:04 2019 +0100 drm/i915/execlists: Clear semaphore immediately upon ELSP promotion There is no significance to our delay before clearing the semaphore the engine is waiting on, so release it as soon as we acknowledge the CS update following our preemption request. This should allow the GPU to resume work earlier, if it was stuck on the semaphore at the end of a request. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191015093204.25693-1-chris@chris-wilson.co.uk commit acc7720de3cb9721ac07f68309dd6d7aae8e9a7a Author: Alexandru Ardelean Date: Thu Sep 26 13:51:47 2019 +0300 spi: spi-axi: extend support for the `delay` field The AXI SPI engine driver uses the `delay_usecs` field from `spi_transfer` to configure delays, which the controller will execute. This change extends the logic to also include the `delay` value, in case it is used (instead if `delay_usecs`). Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-20-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit c5751ba0f71e3afe62000a9505915093efa31bd6 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:46 2019 +0300 spi: bcm63xx: extend error condition to `delay` as well The driver errors out if `delay_usecs` is non-zero. This error condition should be extended to the new `delay` field, to account for when it will be used. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-19-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 3e2405f01f4a1e744f2bea28aa105d7f2257c893 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:45 2019 +0300 spi: spi-falcon: extend warning to `delay` as well The WARN_ON macro prints a warning in syslog if `delay_usecs` is non-zero. However, with the new intermediate `delay`, the warning should also be printed. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-18-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 454a325a9768aa9202843f2a4aea7bef94495d94 Author: Chris Wilson Date: Tue Oct 15 11:01:55 2019 +0100 drm/i915: Remove leftover vma->obj->pages_pin_count on insert/remove We now do the page pin count upfront in vma_get_pages/vma_put_pages, so that we do the allocations before we enter the vm->mutex. Our vma page references we are tracked in vma->pages_count and the extra obj->pages_pin_count being performed later in i915_vma_insert and i915_vma_remove is redundant, and worse throws off the shrinker's logic on when it can free an object by unbinding it. Reported-by: Daniele Ceraolo Spurio Reported-by: Matthew Auld Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191015100155.10376-1-chris@chris-wilson.co.uk commit 56184a20a80037c39fccc78b683cf593a2db4c5f Author: Chris Wilson Date: Tue Oct 15 10:39:15 2019 +0100 drm/i915: Drop obj.page_pin_count after a failed vma->set_pages() Before we attempt to set_pages on the vma, we claim a obj.pages_pin_count for it. If we subsequently fail to set the pages on the vma, we need to drop our pinning before returning the error. Reported-by: Matthew Auld Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191015093915.3995-1-chris@chris-wilson.co.uk commit 3984d39b0e41ac4de8b4530ae3911ccf52ed4bbf Author: Alexandru Ardelean Date: Thu Sep 26 13:51:44 2019 +0300 spi: spi-fsl-espi: convert transfer delay to `spi_delay` format The way the max delay is computed for this controller, it looks like it is searching for the max delay from an SPI message a using that. No idea if this is valid. But this change should support both `delay_usecs` and the new `delay` data which is of `spi_delay` type. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-17-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 25093bdeb6bcae728e12e3795261dbd3677060a9 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:43 2019 +0300 spi: implement SW control for CS times This change implements CS control for setup, hold & inactive delays. The `cs_setup` delay is completely new, and can help with cases where asserting the CS, also brings the device out of power-sleep, where there needs to be a longer (than usual), before transferring data. The `cs_hold` time can overlap with the `delay` (or `delay_usecs`) from an SPI transfer. The main difference is that `cs_hold` implies that CS will be de-asserted. The `cs_inactive` delay does not have a clear use-case yet. It has been implemented mostly because the `spi_set_cs_timing()` function implements it. To some degree, this could overlap or replace `cs_change_delay`, but this will require more consideration/investigation in the future. All these delays have been added to the `spi_controller` struct, as they would typically be configured by calling `spi_set_cs_timing()` after an `spi_setup()` call. Software-mode for CS control, implies that the `set_cs_timing()` hook has not been provided for the `spi_controller` object. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-16-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 8105936684681195d9073880b06a123b2e316811 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:42 2019 +0300 spi: tegra114: change format for `spi_set_cs_timing()` function The initial version of `spi_set_cs_timing()` was implemented with consideration only for clock-cycles as delay. For cases like `CS setup` time, it's sometimes needed that micro-seconds (or nano-seconds) are required, or sometimes even longer delays, for cases where the device needs a little longer to start transferring that after CS is asserted. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-15-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 8e319dd5f1ebbc1fffa9e550b2a643cbce7515b1 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:41 2019 +0300 spi: spidev: use new `delay` field for spi transfers The `delay` field has type `struct spi_delay`. This allows users to specify nano-second or clock-cycle delays (if needed). Converting to use `delay` is straightforward: it's just assigning the value to `delay.value` and hard-coding the `delay.unit` to `SPI_DELAY_UNIT_USECS`. This keeps the uapi for spidev un-changed. Changing it can be part of another changeset and discussion. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-14-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 867bd8868bbd16e17bbd26c5959abc3118902218 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:40 2019 +0300 spi: spi-loopback-test: use new `delay` field This change replaces the use of the `delay_usecs` field with the new `delay` field. The code/test still uses micro-seconds, but they are now configured and used via the `struct spi_delay` format of the `delay` field. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-13-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit b883d5eda6c49a807e925b257bf9687d5c351004 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:39 2019 +0300 spi: tegra20-sflash: use to new `spi_transfer_delay_exec` This conversion to the spi_transfer_delay_exec() helper is not straightforward, as it seems that when a delay is present, the controller issues a command, and then a delay is followed. This change adds support for the new `delay` field which is of type `spi_delay` and keeps backwards compatibility with the old `delay_usecs` field. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-12-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit cd13152bce34cd71f560a7c4a8f66096f2445984 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:38 2019 +0300 spi: tegra114: use `spi_transfer_delay_exec` helper The tegra114 driver has a weird/separate `tegra_spi_transfer_delay()` function that does 2 delays: one mdelay() and one udelay(). This was introduced via commit f4fade12d506e14867a2b0a5e2f7aaf227297d8b ("spi/tegra114: Correct support for cs_change"). There doesn't seem to be a mention in that commit message to suggest a specific need/use-case for having the 2 delay calls. For the most part, udelay() should be sufficient. This change replaces it with the new `spi_transfer_delay_exec()`, which should do the same thing. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-11-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit bebcfd272df648542c458d28fbd6a8f9428b5310 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:36 2019 +0300 spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec() The change introduces the `delay` field to the `spi_transfer` struct as an `struct spi_delay` type. This intends to eventually replace `delay_usecs`. But, since there are many users of `delay_usecs`, this needs some intermediate work. A helper called `spi_transfer_delay_exec()` is also added, which maintains backwards compatibility with `delay_usecs`, by assigning the value to `delay` if non-zero. This should maintain backwards compatibility with current users of `udelay_usecs`. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-9-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 6c613f68aabf33385c01e949204ac5ed30887161 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:35 2019 +0300 spi: core,atmel: convert `word_delay_usecs` -> `word_delay` for spi_device This change does a conversion from the `word_delay_usecs` -> `word_delay` for the `spi_device` struct. This allows users to specify inter-word delays in other unit types (nano-seconds or clock cycles), depending on how users want. The Atmel SPI driver is the only current user of the `word_delay_usecs` field (from the `spi_device` struct). So, it needed a slight conversion to use the `word_delay` as an `spi_delay` struct. In SPI core, the only required mechanism is to update the `word_delay` information per `spi_transfer`. This requires a bit more logic than before, because it needs that both delays be converted to a common unit (nano-seconds) for comparison. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-8-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit ec3fa72fa8404128771a095d5a56b738752ba9ff Author: Alexandru Ardelean Date: Thu Sep 26 13:51:34 2019 +0300 spi: spidev: use new `word_delay` field for spi transfers The `word_delay` field had it's type changed to `struct spi_delay`. This allows users to specify nano-second or clock-cycle delays (if needed). Converting to use `word_delay` is straightforward: it's just assigning the value to `word_delay.value` and hard-coding the `word_delay.unit` to `SPI_DELAY_UNIT_USECS` This keeps the uapi for spidev un-changed. Changing it can be part of another changeset and discussion. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-7-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 21e26062052c60d31640e614b792473fca787f9f Author: Alexandru Ardelean Date: Thu Sep 26 13:51:33 2019 +0300 spi: orion: use new `word_delay` field for SPI transfers The `word_delay` field had it's type changed to `struct spi_delay`. This allows users to specify nano-second or clock-cycle delays (if needed). Converting to use `word_delay` is straightforward: it just uses the new `spi_delay_exec()` routine, that handles the `unit` part. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-6-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 84593a131c3af21d686d05c4b4432290a415d399 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:32 2019 +0300 spi: sprd: convert transfer word delay to spi_delay struct The Spreadtrum SPI driver is the only user of the `word_delay` field in the `spi_transfer` struct. This change converts the field to use the `spi_delay` struct. This also enforces the users to specify the delay unit to be `SPI_DELAY_UNIT_SCK`. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-5-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 329f0dac4cad9fa4b1439a88180d91bcb5c4eaf8 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:31 2019 +0300 spi: make `cs_change_delay` the first user of the `spi_delay` logic Since the logic for `spi_delay` struct + `spi_delay_exec()` has been copied from the `cs_change_delay` logic, it's natural to make this delay, the first user. The `cs_change_delay` logic requires that the default remain 10 uS, in case it is unspecified/unconfigured. So, there is some special handling needed to do that. The ADIS library is one of the few users of the new `cs_change_delay` parameter for an spi_transfer. The introduction of the `spi_delay` struct, requires that the users of of `cs_change_delay` get an update. This change also updates the ADIS library. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-4-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit b2c98153f45fc17b9fcb241000f2d131ddea6030 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:30 2019 +0300 spi: introduce spi_delay struct as "value + unit" & spi_delay_exec() There are plenty of delays that have been introduced in SPI core. Most of them are in micro-seconds, some need to be in nano-seconds, and some in clock-cycles. For some of these delays (related to transfers & CS timing) it may make sense to have a `spi_delay` struct that abstracts these a bit. The important element of these delays [for unification] seems to be the `unit` of the delay. It looks like micro-seconds is good enough for most people, but every-once in a while, some delays seem to require other units of measurement. This change adds the `spi_delay` struct & a `spi_delay_exec()` function that processes a `spi_delay` object/struct to execute the delay. It's a copy of the `cs_change_delay` mechanism, but without the default for 10 uS. The clock-cycle delay unit is a bit special, as it needs to be bound to an `spi_transfer` object to execute. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-3-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 6b3f236a998550dba91a46a22feb1cc02f39fb06 Author: Alexandru Ardelean Date: Thu Sep 26 13:51:29 2019 +0300 spi: move `cs_change_delay` backwards compat logic outside switch The `cs_change_delay` backwards compatibility value could be moved outside of the switch statement. The only reason to do it, is to make the next patches easier to diff. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926105147.7839-2-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 9d2bbbc21772f133fd693bf10f38982e17f6549f Author: Biju Das Date: Fri Sep 27 11:37:09 2019 +0100 dt-bindings: dmaengine: rcar-dmac: Document R8A774B1 bindings Renesas RZ/G2N (R8A774B1) SoC also has the R-Car gen2/3 compatible DMA controllers, therefore document RZ/G2N specific bindings. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/1569580629-55677-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Vinod Koul commit 2def297ec7fbf68cedc48f69e1f600fef13f2e96 Author: Christian Kellner Date: Mon Oct 14 18:20:33 2019 +0200 pidfd: add tests for NSpid info in fdinfo Add a test that checks that if pid namespaces are configured the fdinfo file of a pidfd contains an NSpid: entry containing the process id in the current and additionally all nested namespaces. In the case that a pidfd is from a pid namespace not in the same namespace hierarchy as the process accessing the fdinfo file, ensure the 'NSpid' shows 0 for that pidfd, analogous to the 'Pid' entry. Signed-off-by: Christian Kellner Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20191014162034.2185-2-ckellner@redhat.com Signed-off-by: Christian Brauner commit 15d42eb26bdee47c0278fbdab4198577bc6a97b5 Author: Christian Kellner Date: Mon Oct 14 18:20:32 2019 +0200 pidfd: add NSpid entries to fdinfo Currently, the fdinfo file contains the Pid field which shows the pid a given pidfd refers to in the pid namespace of the procfs instance. If pid namespaces are configured, also show an NSpid field for easy retrieval of the pid in all descendant pid namespaces. If the pid namespace of the process is not a descendant of the pid namespace of the procfs instance 0 will be shown as its first NSpid entry and no other entries will be shown. Add a block comment to pidfd_show_fdinfo with a detailed explanation of Pid and NSpid fields. Co-developed-by: Christian Brauner Signed-off-by: Christian Brauner Signed-off-by: Christian Kellner Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20191014162034.2185-1-ckellner@redhat.com Signed-off-by: Christian Brauner commit f228a4a24492b9b147ce4efdd384e064d659e38a Author: Baolin Wang Date: Fri Sep 27 11:29:43 2019 +0800 dmaengine: sprd: Change to use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/1af3efdac3b217203cace090c8947386854c0144.1569554639.git.baolin.wang@linaro.org Signed-off-by: Vinod Koul commit 944879ba4c852ca68b555d84559f228c3430e443 Author: Radhey Shyam Pandey Date: Thu Sep 26 16:21:00 2019 +0530 dmaengine: xilinx_dma: Remove clk_get error message for probe defer In dma probe, the driver checks for devm_clk_get return and print error message in the failing case. However for -EPROBE_DEFER this message is confusing so avoid it. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/1569495060-18117-5-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit a8bd47542863947e2433db35558477caf0d89995 Author: Radhey Shyam Pandey Date: Thu Sep 26 16:20:59 2019 +0530 dmaengine: xilinx_dma: use devm_platform_ioremap_resource() Replace the chain of platform_get_resource() and devm_ioremap_resource() with devm_platform_ioremap_resource(). It simplifies the flow and there is no functional change. Fixes below cocinelle warning- WARNING: Use devm_platform_ioremap_resource for xdev -> regs Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1569495060-18117-4-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit ae5e6c6439c3d0ac8e9c71523790ba1ff6887894 Author: Andy Shevchenko Date: Tue Oct 1 17:27:25 2019 +0300 iommu/amd: Switch to use acpi_dev_hid_uid_match() Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Reviewed-by: Jerry Snitselaar Signed-off-by: Rafael J. Wysocki commit 4f3cde3a24ce874973ee21269da16024c77a159c Author: Andy Shevchenko Date: Tue Oct 1 17:27:24 2019 +0300 mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match() Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Acked-by: Adrian Hunter Signed-off-by: Rafael J. Wysocki commit 7e70c8acf2bfea90f8bcf46bb6fc51e26723e480 Author: Andy Shevchenko Date: Tue Oct 1 17:27:23 2019 +0300 ACPI / LPSS: Switch to use acpi_dev_hid_uid_match() Since we have a generic helper, drop custom implementation in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit 35009c807488ccd5a01cbf102033695e52794b68 Author: Andy Shevchenko Date: Tue Oct 1 17:27:22 2019 +0300 ACPI / utils: Introduce acpi_dev_hid_uid_match() helper There are users outside of ACPI realm which reimplementing the comparator function to check if the given device matches to given HID and UID. For better utilization, introduce a helper for everyone to use. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit a814dcc269830c9dbb8a83731cfc6fc5dd787f8d Author: Andy Shevchenko Date: Tue Oct 1 17:27:21 2019 +0300 ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI We have a stub defined for the acpi_dev_get_first_match_dev() in acpi.h for the case when CONFIG_ACPI=n. Moreover, acpi_dev_put(), counterpart function, is already placed under CONFIG_ACPI. Thus, move acpi_dev_get_first_match_dev() under CONFIG_ACPI as well. Fixes: 817b4d64da03 ("ACPI / utils: Introduce acpi_dev_get_first_match_dev() helper") Reported-by: kbuild test robot Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Cc: 5.2+ # 5.2+ Signed-off-by: Rafael J. Wysocki commit 8373f8c6a447d53b25d505905be06bdafcbd6f7b Author: Andy Shevchenko Date: Tue Oct 1 17:27:20 2019 +0300 ACPI / utils: Describe function parameters in kernel-doc Kernel documentation script complains that some of the function parameters are not described: drivers/acpi/utils.c:462: warning: Function parameter or member 'handle' not described in 'acpi_handle_path' drivers/acpi/utils.c:484: warning: Function parameter or member 'level' not described in 'acpi_handle_printk' drivers/acpi/utils.c:484: warning: Function parameter or member 'handle' not described in 'acpi_handle_printk' drivers/acpi/utils.c:484: warning: Function parameter or member 'fmt' not described in 'acpi_handle_printk' drivers/acpi/utils.c:513: warning: Function parameter or member 'descriptor' not described in '__acpi_handle_debug' drivers/acpi/utils.c:513: warning: Function parameter or member 'handle' not described in '__acpi_handle_debug' drivers/acpi/utils.c:513: warning: Function parameter or member 'fmt' not described in '__acpi_handle_debug' Describe function parameters where it's appropriate. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit c0f05a6ab52535c1bf5f43272eede3e11c5701a5 Author: Remi Pommarel Date: Fri Jun 14 12:10:59 2019 +0200 PCI: aardvark: Fix PCI_EXP_RTCTL register configuration PCI_EXP_RTCTL is used to activate PME interrupt only, so writing into it should not modify other interrupts' mask. The ISR mask polarity was also inverted, when PCI_EXP_RTCTL_PMEIE is set PCIE_MSG_PM_PME_MASK mask bit should actually be cleared. Fixes: 8a3ebd8de328 ("PCI: aardvark: Implement emulated root PCI bridge config space") Signed-off-by: Remi Pommarel Signed-off-by: Lorenzo Pieralisi Acked-by: Thomas Petazzoni commit 1ee0186b9a128a872887e16e2d1520ea37a95dc4 Author: Lu Baolu Date: Sat Sep 21 15:06:44 2019 +0800 iommu/vt-d: Refactor find_domain() helper Current find_domain() helper checks and does the deferred domain attachment and return the domain in use. This isn't always the use case for the callers. Some callers only want to retrieve the current domain in use. This refactors find_domain() into two helpers: 1) find_domain() only returns the domain in use; 2) deferred_attach_domain() does the deferred domain attachment if required and return the domain in use. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit da6b05dce2a9c69880c3b9838938d5714703e80d Author: Christophe JAILLET Date: Mon Sep 16 22:29:36 2019 +0200 iommu/qcom: Simplify a test in 'qcom_iommu_add_device()' 'iommu_group_get_for_dev()' never returns NULL, so this test can be simplified a bit. This way, the test is consistent with all other calls to 'iommu_group_get_for_dev()'. Signed-off-by: Christophe JAILLET Reviewed-by: Dan Carpenter Signed-off-by: Joerg Roedel commit f4c7d053d7f77cd5c1a1ba7c7ce085ddba13d1d7 Author: Remi Pommarel Date: Wed May 22 23:33:50 2019 +0200 PCI: aardvark: Wait for endpoint to be ready before training link When configuring pcie reset pin from gpio (e.g. initially set by u-boot) to pcie function this pin goes low for a brief moment asserting the PERST# signal. Thus connected device enters fundamental reset process and link configuration can only begin after a minimal 100ms delay (see [1]). Because the pin configuration comes from the "default" pinctrl it is implicitly configured before the probe callback is called: driver_probe_device() really_probe() ... pinctrl_bind_pins() /* Here pin goes from gpio to PCIE reset function and PERST# is asserted */ ... drv->probe() [1] "PCI Express Base Specification", REV. 4.0 PCI Express, February 19 2014, 6.6.1 Conventional Reset Signed-off-by: Remi Pommarel Signed-off-by: Lorenzo Pieralisi Acked-by: Thomas Petazzoni commit be62dbf554c5b50718a54a359372c148cd9975c7 Author: Tom Murphy Date: Sun Sep 8 09:56:41 2019 -0700 iommu/amd: Convert AMD iommu driver to the dma-iommu api Convert the AMD iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the AMD iommu driver. Signed-off-by: Tom Murphy Signed-off-by: Joerg Roedel commit 6e2350207f40e24884da262976f7fd4fba387e8a Author: Tom Murphy Date: Sun Sep 8 09:56:40 2019 -0700 iommu/dma-iommu: Use the dev->coherent_dma_mask Use the dev->coherent_dma_mask when allocating in the dma-iommu ops api. Signed-off-by: Tom Murphy Reviewed-by: Robin Murphy Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel commit 795bbbb9b6f80306be3d45c79527324036a68509 Author: Tom Murphy Date: Sun Sep 8 09:56:39 2019 -0700 iommu/dma-iommu: Handle deferred devices Handle devices which defer their attach to the iommu in the dma-iommu api Signed-off-by: Tom Murphy Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit 781ca2de89bae1b1d2c96df9ef33e9a324415995 Author: Tom Murphy Date: Sun Sep 8 09:56:38 2019 -0700 iommu: Add gfp parameter to iommu_ops::map Add a gfp_t parameter to the iommu_ops::map function. Remove the needless locking in the AMD iommu driver. The iommu_ops::map function (or the iommu_map function which calls it) was always supposed to be sleepable (according to Joerg's comment in this thread: https://lore.kernel.org/patchwork/patch/977520/ ) and so should probably have had a "might_sleep()" since it was written. However currently the dma-iommu api can call iommu_map in an atomic context, which it shouldn't do. This doesn't cause any problems because any iommu driver which uses the dma-iommu api uses gfp_atomic in it's iommu_ops::map function. But doing this wastes the memory allocators atomic pools. Signed-off-by: Tom Murphy Reviewed-by: Robin Murphy Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel commit 37ec8eb851c1876580a963f283fe7496592b9f72 Author: Tom Murphy Date: Sun Sep 8 09:56:37 2019 -0700 iommu/amd: Remove unnecessary locking from AMD iommu driver With or without locking it doesn't make sense for two writers to be writing to the same IOVA range at the same time. Even with locking we still have a race condition, whoever gets the lock first, so we still can't be sure what the result will be. With locking the result will be more sane, it will be correct for the last writer, but still useless because we can't be sure which writer will get the lock last. It's a fundamentally broken design to have two writers writing to the same IOVA range at the same time. So we can remove the locking and work on the assumption that no two writers will be writing to the same IOVA range at the same time. The only exception is when we have to allocate a middle page in the page tables, the middle page can cover more than just the IOVA range a writer has been allocated. However this isn't an issue in the AMD driver because it can atomically allocate middle pages using "cmpxchg64()". Signed-off-by: Tom Murphy Signed-off-by: Joerg Roedel commit a35716a95655d8fc15042c9d574374eceb9daf3d Author: Peter Ujfalusi Date: Tue Oct 15 12:00:37 2019 +0300 ASoC: pcm3168a: Fix serial mode dependent format support fmt 0 is perfectly valid (PCM3168A_FMT_I2S). Remove the return in case fmt == 0. Fixes: ("ASoC: pcm3168a: Use fixup instead of constraint for channels and formats") Reported-by: Kuninori Morimoto Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191015090037.23271-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 97f41c68b83ea5216dbf3ac51fd86b0fbd399a97 Author: Fabrizio Castro Date: Fri Oct 4 09:35:28 2019 +0100 dt-bindings: spi: sh-msiof: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1570178133-21532-3-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Mark Brown commit 9c3c41761f45216880c6a274da661797c06ebf76 Author: Simon Horman Date: Thu Sep 26 12:25:33 2019 +0200 dt-bindings: spi: sh-msiof: Convert bindings to json-schema Convert Renesas HSPI bindings documentation to json-schema. Also name bindings documentation file according to the compat string being documented. Signed-off-by: Simon Horman Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20190926102533.17829-1-horms+renesas@verge.net.au Signed-off-by: Mark Brown commit 9764beeae7cc477c13ffc451a5edd1ab8891e3ea Author: Kuninori Morimoto Date: Tue Oct 15 11:52:52 2019 +0900 ASoC: audio-graph: fixup graph_dai_link_of_dpcm() comment The comment is wrong. This patch fixup it. Signed-off-by: Kuninori Morimoto Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/87eeze67p7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 03048217624a9472c1c7a205c8ea9bf8d4026e59 Author: Kuninori Morimoto Date: Tue Oct 15 14:44:09 2019 +0900 ASoC: sof: include types.h at header.h Content-Transfer-Encoding: 8bit Without we will get these error linux/include/sound/sof/header.h:125:2: error: unknown type name ‘uint32_t’uint32_t size; linux/include/sound/sof/header.h:136:2: error: unknown type name ‘uint32_t’uint32_t size; linux/include/sound/sof/header.h:137:2: error: unknown type name ‘uint32_t’uint32_t cmd; ... linux/include/sound/sof/dai-imx.h:18:2: error: unknown type name ‘uint16_t’uint16_t reserved1; linux/include/sound/sof/dai-imx.h:30:2: error: unknown type name ‘uint16_t’uint16_t tdm_slot_width; linux/include/sound/sof/dai-imx.h:31:2: error: unknown type name ‘uint16_t’uint16_t reserved2; Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a7a24l7r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 848704f39ff61f3f618975a76d6379f2848359a8 Author: Kuninori Morimoto Date: Tue Oct 15 11:52:41 2019 +0900 ASoC: simple-card: fixup simple_dai_link_of_dpcm() comment The comment is wrong. This patch fixup it. Signed-off-by: Kuninori Morimoto Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/87ftju67pi.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 47cbea21628187c32efad562867aa2b6760d83cc Author: Naveen M Date: Tue Oct 15 00:28:00 2019 +0800 ASoC: Intel: eve: Enable mclk and ssp sclk early rt5663 and rt5514 needs mclk/sclk early to synchronize its internal clocks. Signed-off-by: Naveen M Signed-off-by: Harsha Priya Signed-off-by: Subhransu S. Prusty Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/1571070480-25666-1-git-send-email-brent.lu@intel.com Signed-off-by: Mark Brown commit fa41d6ee904266fa8739cafa6ec038c3a8e435b7 Merge: 9cd20ef7803c 7ed093602e0e Author: Joonas Lahtinen Date: Tue Oct 15 11:18:26 2019 +0300 Merge drm/drm-next into drm-intel-next-queued Backmerging to pull in HDR DP code: https://lists.freedesktop.org/archives/dri-devel/2019-September/236453.html Signed-off-by: Joonas Lahtinen commit 1aa7177cdcb38d114e0a80dc27482e645d8068f2 Author: Prarit Bhargava Date: Thu Oct 10 13:29:45 2019 -0700 tools/power/x86/intel-speed-select: Implement base-freq commands on CascadeLake-N Add functionality for base-freq info|enable|disable info on CascadeLake-N. Sample output: Intel(R) Speed Select Technology Executing on CPU model:85[0x55] package-0 die-0 cpu-0 speed-select-base-freq high-priority-base-frequency(MHz):2700000 high-priority-cpu-mask:00000000,0000e8c0 high-priority-cpu-list:6,7,11,13,14,15 low-priority-base-frequency(MHz):2100000 package-1 die-0 cpu-20 speed-select-base-freq high-priority-base-frequency(MHz):2700000 high-priority-cpu-mask:0000000e,8c000000 high-priority-cpu-list:26,27,31,33,34,35 low-priority-base-frequency(MHz):2100000 The enable command always returns success, and the disable command always returns failed because SST-BF cannot be enabled or disabled from the OS on CascadeLake-N. Enable command also have support for --auto|-a option, which sets cpufreq scaling_min to max, so that the high priority base frequency can be the required minimum for high priority cores. Disable command with -a/--auto option reset the setting back to the min frequency. Signed-off-by: Prarit Bhargava Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 062e4aac92e8acbab2fd135e90b580b903c3724b Author: Prarit Bhargava Date: Thu Oct 10 13:29:44 2019 -0700 tools/power/x86/intel-speed-select: Implement 'perf-profile info' on CascadeLake-N Add functionality for "perf-profile info" on CascadeLake-N. Sample output: intel-speed-select perf-profile info Intel(R) Speed Select Technology Executing on CPU model:85[0x55] package-0 die-0 cpu-0 perf-profile-level-0 cpu-count:20 enable-cpu-mask:00000000,000fffff enable-cpu-list:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 thermal-design-power-ratio:23 base-frequency(MHz):2300 speed-select-turbo-freq:unsupported speed-select-base-freq:enabled speed-select-base-freq high-priority-base-frequency(MHz):2700000 high-priority-cpu-mask:00000000,0000e8c0 high-priority-cpu-list:6,7,11,13,14,15 low-priority-base-frequency(MHz):2100000 package-1 die-0 cpu-20 perf-profile-level-0 cpu-count:20 enable-cpu-mask:000000ff,fff00000 enable-cpu-list:20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 thermal-design-power-ratio:23 base-frequency(MHz):2300 speed-select-turbo-freq:unsupported speed-select-base-freq:enabled speed-select-base-freq high-priority-base-frequency(MHz):2700000 high-priority-cpu-mask:0000000e,8c000000 high-priority-cpu-list:26,27,31,33,34,35 low-priority-base-frequency(MHz):2100000 Signed-off-by: Prarit Bhargava Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit c829f0ef7bfc4b294e67506779853547e8b52c68 Author: Prarit Bhargava Date: Thu Oct 10 13:29:43 2019 -0700 tools/power/x86/intel-speed-select: Implement CascadeLake-N help and command functions structures CascadeLake-N only supports SST-BF and needs some of the perf-profile commands, and the base-freq commands. Add help functions, and create an empty command structures (the functions will be implemented later in this patchset). Call these functions when running on CascadeLake-N. Signed-off-by: Prarit Bhargava Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 1c1d935c8418a63d110b2b31c57ba3d75f94f49d Author: Prarit Bhargava Date: Thu Oct 10 13:29:42 2019 -0700 tools/power/x86/intel-speed-select: Add check for CascadeLake-N models Three CascadeLake-N models (6252N, 6230N, and 5218N) have SST-PBF support. Return an error if the CascadeLake processor is not one of these specific models. Signed-off-by: Prarit Bhargava Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 210369dc73b23fab1b9727fba35c2f83d00b6277 Author: Prarit Bhargava Date: Thu Oct 10 13:29:41 2019 -0700 tools/power/x86/intel-speed-select: Make process_command generic Make the process_command take any help command and command list. This will make it easier to help commands and a command list for CascadeLake-N. Signed-off-by: Prarit Bhargava Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit ce1326a2f9f7bf8920bc7f07e7b13ce8737b4681 Author: Prarit Bhargava Date: Thu Oct 10 13:29:40 2019 -0700 tools/power/x86/intel-speed-select: Add int argument to command functions The current code structure has similar but separate command functions for the enable and disable operations. This can be improved by adding an int argument to the command function structure, and interpreting 1 as enable and 0 as disable. This change results in the removal of the disable command functions. Add int argument to the command function structure. Signed-off-by: Prarit Bhargava Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 4e26fabfe15ca67125f1b6984671c2e9048d64a5 Author: Srinivas Pandruvada Date: Thu Oct 10 13:29:39 2019 -0700 tools/power/x86/intel-speed-select: Refuse to disable core-power when getting used The turbo-freq feature is dependent on the core-power feature. If the core-power feature is disabled while the turbo-freq feature is enabled, this will break the turbo-freq feature. This is a firmware limitation, where they can't return error under this scenario. So when trying to disable core-power, make sure that the turbo-freq feature is not enabled. If it enabled, return error if user is trying to disable the core-power feature. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit a6a82f9bcd2ad3fab5f20fc406727dc62775db92 Author: Srinivas Pandruvada Date: Thu Oct 10 13:29:38 2019 -0700 tools/power/x86/intel-speed-select: Turbo-freq feature auto mode Introduce --auto|-a option to turbo-freq enable feature, so that it does in one step for users who are OK by setting all passed target cores as high priority and set in CLOS 0 and remaining in CLOS 3. In this way, users don't have to take multiple steps to enable turbo-freq feature. For users who want more fine grain control, they can always use core-power feature to set custom CLOS configuration and assignment. While here also print the error to output when clos configuration fails. For example intel-speed-select -c 0-4 turbo-freq enable --auto The above command will enable turbo-freq and core-power feature. Also mark CPU 0 to CPU 4 as high priority. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 354bd06f40c4ba7b2f12d9f0f119dff62a2f922f Author: Srinivas Pandruvada Date: Thu Oct 10 13:29:37 2019 -0700 tools/power/x86/intel-speed-select: Base-freq feature auto mode Introduce --auto|-a option to base-freq enable feature, so that it does in one step for users who are OK by setting all cores with higher base frequency to be set in CLOS 0 and remaining in CLOS 3. This option also sets corresponding clos.min to CLOS 0 and CLOS3. In this way, users don't have to take multiple steps to enable base-freq feature. For users who want more fine grain control, they can always use core-power feature to set custom CLOS configuration and assignment. Also adjust cpufreq/scaling_min_freq for higher and lower priority cores. For example user can use: intel-speed-select base-freq enable --auto Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit abd120e3bdf3dd72ba1ed9ac077a861e0e3dc43a Author: Srinivas Pandruvada Date: Thu Oct 10 13:29:36 2019 -0700 tools/power/x86/intel-speed-select: Remove warning for unused result Fix warning for: isst-config.c: In function ‘set_cpu_online_offline’: isst-config.c:221:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(fd, "1\n", 2); Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit fd13c8622a5ad4f7317b64de4f6aa2de1962220e Author: Jeremy Soller Date: Wed Oct 9 19:59:30 2019 -0600 platform/x86: Add System76 ACPI driver Add System76 ACPI driver, which adds support for Fn-Fx key combinations, keyboard backlight, and airplane mode LEDs on System76 laptops running open source firmware. Signed-off-by: Jeremy Soller Cc: platform-driver-x86@vger.kernel.org Cc: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 2a43c9fc878a1d3985207a74f73a1f5aa1342655 Author: Dan Carpenter Date: Mon Oct 14 13:58:01 2019 +0300 platform/x86: huawei-wmi: Fix a precision vs width printf bug This was supposed to be precision "%.*s" instead of width "%*s". It's possible that this results in printing beyond the end of the string. Fixes: a970b95345ab ("platform/x86: huawei-wmi: Add debugfs support") Signed-off-by: Dan Carpenter Signed-off-by: Andy Shevchenko commit 3c27f179d502940059ca4f9ed85359a02eaf71e7 Author: Andy Shevchenko Date: Thu Oct 10 15:16:57 2019 +0300 platform/x86: huawei-wmi: Avoid use of global variable when possible There is no need to access global variable directly when we may derive it through other means. Signed-off-by: Andy Shevchenko commit c7a949766fd24546b15af1d6f4bb57fddeec5558 Author: Andy Shevchenko Date: Thu Oct 10 13:41:36 2019 +0300 platform/x86: huawei-wmi: No need to keep pointer to platform device There is no need to keep a pointer to the platform device. Currently there are no users of it directly, and if there will be in the future we may restore it from pointer to the struct device. Signed-off-by: Andy Shevchenko commit 8c7d9ec8a470c39254dd0f64293545dcc86189d5 Author: Andy Shevchenko Date: Thu Oct 10 13:30:53 2019 +0300 platform/x86: huawei-wmi: Don't leak memory on the exit We have to clean memory resources allocated during init. Fixes: 7532afb35012 ("platform/x86: huawei-wmi: Move to platform driver") Cc: Ayman Bagabas Signed-off-by: Andy Shevchenko commit 9bfc14cb6a6a2d05bd746dccef5c41096b4f392c Author: kbuild test robot Date: Wed Oct 9 22:28:55 2019 +0800 platform/x86: huawei-wmi: huawei_wmi can be static Fixes: 7532afb35012 ("platform/x86: huawei-wmi: Move to platform driver") Signed-off-by: kbuild test robot Signed-off-by: Andy Shevchenko commit d17f1bbb3aa9631429fa0fe325ad12661d6b226b Author: Andy Shevchenko Date: Fri Oct 11 13:22:58 2019 +0300 platform/x86: i2c-multi-instantiate: Fail the probe if no IRQ provided For APIC case of interrupt we don't fail a ->probe() of the driver, which makes kernel to print a lot of warnings from the children. We have two options here: - switch to platform_get_irq_optional(), though it won't stop children to be probed and failed - fail the ->probe() of i2c-multi-instantiate Since the in reality we never had devices in the wild where IRQ resource is optional, the latter solution suits the best. Fixes: 799d3379a672 ("platform/x86: i2c-multi-instantiate: Introduce IOAPIC IRQ support") Reported-by: Ammy Yi Cc: Heikki Krogerus Cc: Hans de Goede Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus commit da5fb83fb8dc5f95d4ab3a9f4641821fab34ce58 Author: Andy Shevchenko Date: Thu Oct 10 11:15:20 2019 +0300 platform/x86: intel_punit_ipc: Avoid error message when retrieving IRQ Since the commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") the platform_get_irq() started issuing an error message which is not what we want here. Switch to platform_get_irq_optional() to have only warning message provided by the driver. Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Andy Shevchenko commit 79e29cb8fbc5c568358989327a164257b05cc608 Author: Liming Sun Date: Mon Oct 7 11:48:46 2019 -0400 platform/mellanox: Add bootctl driver for Mellanox BlueField Soc This commit adds the bootctl platform driver for Mellanox BlueField Soc, which queries secure state and controls the eMMC boot partition swapping by sending SMC calls to ATF running at EL3. Below are the sequences of typical use case. 1. User requests boot partition swapping, which could be on-demand or during boot-image upgrade via UEFI capsule; 2. This bootctl driver handles the request and sends SMC call to ATF. ATF programs register BREADCRUMB0 which has value preserved during warm reset. It also programs eMMC to swap the boot partition; 3. After software reset (rebooting), ATF BL1 (BootRom) checks register BREADCRUMB0 and enable watchdog if configured; 4. If booting fails, the watchdog timer will trigger rebooting. In such case, ATF Boot ROM will switch the boot partition back to the previous one. This is a robust feature and used to prevent failure during boot partition upgrade. Reviewed-by: Vadim Pasternak Signed-off-by: Liming Sun Signed-off-by: Andy Shevchenko commit e3008bf46ce0baf617cfd1b68d35e433dc603e43 Author: yu kuai Date: Sun Sep 29 21:42:49 2019 +0800 platform/x86: classmate-laptop: remove unused variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/platform/x86/classmate-laptop.c: In function cmpc_accel_remove_v4: drivers/platform/x86/classmate-laptop.c:424:21: warning: variable accel set but not used [-Wunused-but-set-variable] drivers/platform/x86/classmate-laptop.c: In function cmpc_accel_remove: drivers/platform/x86/classmate-laptop.c:660:21: warning: variable accel set but not used [-Wunused-but-set-variable] In function cmpc_accel_remove_v4 and cmpc_accel_remove, variable accel is set but not used, so it can be removed. In that case, variable inputdev is set but not used and can be removed. Fixes: 7125587df4e8 ("classmate-laptop: Add support for Classmate V4 accelerometer.") Reported-by: Hulk Robot Signed-off-by: yu kuai Signed-off-by: Andy Shevchenko commit d740795d9273dafb02ed809f3b68d62388bc08d9 Author: Yauhen Kharuzhy Date: Sat Oct 5 23:42:55 2019 +0300 platform/x86: intel_cht_int33fe: Split code to Micro-B and Type-C Existing intel_cht_int33fe ACPI pseudo-device driver assumes that hardware has Type-C connector and register related devices described as I2C connections in the _CRS resource. There is at least one hardware (Lenovo Yoga Book YB1-91L/F) with Micro-B USB connector exists. It has INT33FE device in the DSDT table but there are only two I2C connection described: PMIC and BQ27452 battery fuel gauge. Splitting existing INT33FE driver allow to maintain code for USB Micro-B (or AB) connector variant separately and make it simpler. Split driver to intel_cht_int33fe_common.c and intel_cht_int33fe_{microb,typec}.c. Compile all this sources to one .ko module to make user experience easier. Signed-off-by: Yauhen Kharuzhy Signed-off-by: Andy Shevchenko commit c656829f073b244ae84f6c41a213ec619434f8fe Author: Dmitry Torokhov Date: Wed Oct 2 10:40:52 2019 -0700 platform/x86: toshiba_acpi: do not select INPUT_POLLDEV The driver does not use polling mode of input devices, and this config option is going away, so let's not reference it. Signed-off-by: Dmitry Torokhov Signed-off-by: Andy Shevchenko commit 60d15095336cfb56dce5c7767ed3b8c6c1cf79a3 Author: Dmitry Torokhov Date: Tue Oct 1 11:58:22 2019 -0700 platform/x86: peaq-wmi: switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts peaq-wmi driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Because the new polling coded does not allow peeking inside the poller structure to get the poll interval, we change the "debounce" process to operate on the time basis, instead of counting events. We also fix error handling during initialization, as previously we leaked input device structure when we failed to register it. Signed-off-by: Dmitry Torokhov Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 83dbbe5ae47f163df05f13cbb619841ab2cca05e Author: Dmitry Torokhov Date: Tue Oct 1 11:59:37 2019 -0700 platform/x86: hdaps: switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts hdaps driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Signed-off-by: Dmitry Torokhov Signed-off-by: Andy Shevchenko commit 2011176d8adbe21320158322df4a4c957474030d Author: Dmitry Torokhov Date: Tue Oct 1 11:57:00 2019 -0700 platform/x86: asus-laptop: switch to using polled mode of input devices We have added polled mode to the normal input devices with the intent of retiring input_polled_dev. This converts Asus laptop driver to use the polling mode of standard input devices and removes dependency on INPUT_POLLDEV. Also removed no longed needed set_bit(EV_ABS, ...) as input_set_abs_oarams() does it for us. Signed-off-by: Dmitry Torokhov Signed-off-by: Andy Shevchenko commit 10b65e2915b2fcc606d173e98a972850101fb4c4 Author: Pacien TRAN-GIRARD Date: Fri Sep 27 23:19:03 2019 +0200 platform/x86: dell-laptop: disable kbd backlight on Inspiron 10xx This patch adds a quirk disabling keyboard backlight support for the Dell Inspiron 1012 and 1018. Those models wrongly report supporting keyboard backlight control features (through SMBIOS tokens) even though they're not equipped with a backlit keyboard. This led to broken controls being exposed through sysfs by this driver which froze the system when used. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107651 Signed-off-by: Pacien TRAN-GIRARD Reviewed-by: Mario Limonciello Reviewed-by: Pali Rohár Signed-off-by: Andy Shevchenko commit 94930d0133299f1206100ca17f12608d6dfb9990 Author: Ayman Bagabas Date: Mon Sep 23 22:48:11 2019 -0400 platform/x86: huawei-wmi: Add debugfs support Add a debugfs interface that can be used to call the WMI management interface function if available. Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko commit 32e59d119d718cc5eb3ede488638e079c626d6da Author: Ayman Bagabas Date: Mon Sep 23 22:48:10 2019 -0400 platform/x86: huawei-wmi: Add fn-lock support Huawei Matebook laptops uses Fn key and toggle to access F1-F12 keys. Along with that, there is this feature called fn-lock that inverts the behavior of this Fn key and the F1-F12 row. Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko commit 355a070b09ab1f29f36447c91cde3e6fd07775e0 Author: Ayman Bagabas Date: Mon Sep 23 22:48:09 2019 -0400 platform/x86: huawei-wmi: Add battery charging thresholds Control battery charge thresholds through the battery API and driver's attributes. Setting battery charging thresholds can introduce a race condition with MACH-WX9 where two or more threads are trying to read/write values from/to EC memory. Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko commit 090ddd770b8d2e0c4ee7e5d6fdc72d0080cb8dde Author: Ayman Bagabas Date: Mon Sep 23 22:48:08 2019 -0400 platform/x86: huawei-wmi: Implement huawei wmi management Huawei Matebook laptops come with a WMI management interface that can control various aspects of the device. This interface is also found on the old Matebook X released in 2017. Use that to control the mic mute LED. Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko commit 8a480c108fe8818a2e18ddf6bfc0a200317e7a4b Author: Ayman Bagabas Date: Mon Sep 23 22:48:07 2019 -0400 platform/x86: huawei-wmi: Add quirks and module parameters Introduce quirks and module parameters. 3 quirks are added: 1. Fixes reporting brightness keys twice since it's already handled by acpi-video. 2. Some models need a short delay when setting battery thresholds to prevent a race condition when two processes read/write. (will be used later) 3. Matebook X (2017) handles micmute led through the "legacy" interface which is not currently implemented. Use ACPI EC method to control this led. (will be used later) 2 module parameters are added to enable this short delay and/or report brightness keys through this driver. Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko commit 1ac9abeb2e5bf92780f77326ab59a0e211fa79b8 Author: Ayman Bagabas Date: Mon Sep 23 22:48:06 2019 -0400 platform/x86: huawei-wmi: Move to platform driver Move from WMI driver to platform driver. This move is necessary since the driver is no longer a hotkeys driver only. Platform driver makes it easier for users to access sysfs attributes under (i.e. /sys/devices/platform/huawei-wmi) compared to wmi driver. Use WMI device UID, AMW0 has a UID of HWMI. WMI0 is the device name and doesn't have a UID so keep it as it is. Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko commit fadfee3f9d8f114435a8a3e9f83a227600d89de7 Author: Daniel Kurtz Date: Tue Oct 8 18:21:45 2019 +0800 drm/bridge: dw-hdmi: Restore audio when setting a mode When setting a new display mode, dw_hdmi_setup() calls dw_hdmi_enable_video_path(), which disables all hdmi clocks, including the audio clock. We should only (re-)enable the audio clock if audio was already enabled when setting the new mode. Without this patch, on RK3288, there will be HDMI audio on some monitors if i2s was played to headphone when the monitor was plugged. ACER H277HU and ASUS PB278 are two of the monitors showing this issue. Signed-off-by: Cheng-Yi Chiang Signed-off-by: Daniel Kurtz Signed-off-by: Yakir Yang Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191008102145.55134-1-cychiang@chromium.org commit 3ba8bbc41f5d1169c6a27de44df0d88d3a44f239 Author: Nikita Travkin Date: Sat Oct 12 19:58:21 2019 +0500 arm64: dts: msm8916-longcheer-l8150: Add Volume buttons Add nodes for Volume UP button connected to GPIO and Volume DOWN button, which is handled by the pm8916 as is common with msm8916 devices. Reviewed-by: Stephan Gerhold Signed-off-by: Nikita Travkin Signed-off-by: Bjorn Andersson commit b0e1600dd46d305d6eac894bc3dd414321657e70 Author: Nikita Travkin Date: Sat Oct 12 19:58:20 2019 +0500 arm64: dts: msm8916-longcheer-l8150: Enable WCNSS for WiFi and BT WCNSS is used on L8150 for WiFi and BT. Its firmware isn't relocatable and must be loaded at specific address. Reviewed-by: Stephan Gerhold Signed-off-by: Nikita Travkin Signed-off-by: Bjorn Andersson commit 868ad21496020ef83d41fdeed3b0a63de2a3caa5 Author: Markus Elfring Date: Thu Aug 22 10:20:10 2019 +0200 net/wireless: Delete unnecessary checks before the macro call “dev_kfree_skb” The dev_kfree_skb() function performs also input parameter validation. Thus the test around the shown calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Kalle Valo commit 52d4261862ec140cda09ec9cf4d6dc388fd83f59 Author: Fuqian Huang Date: Mon Jul 15 11:19:41 2019 +0800 wireless: Remove call to memset after dma_alloc_coherent In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: Kalle Valo commit 39b656ee9f2ce41eb969c86525f9a2a63fefac5b Merge: 4f5cafb5cb84 cebf7d51a6c3 Author: Ingo Molnar Date: Tue Oct 15 07:19:55 2019 +0200 Merge tag 'perf-core-for-mingo-5.5-20191011' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf trace: Arnaldo Carvalho de Melo: - Reuse the strace-like syscall_arg_fmt->scnprintf() beautification routines (convert integer arguments into strings, like open flags, etc) in tracepoint arguments. For now the type based scnprintf routines (pid_t, umode_t, etc) and the ones based in well known arg name based ("fd", etc) gets associated with tracepoint args of that type. A tracepoint only arg, "msr", for the msr:{write,read}_msr gets added as an initial step. - Introduce syscall_arg_fmt->strtoul() methods to be the reverse operation of ->scnprintf(), i.e. to go from a string to an integer. - Implement --filter, just like in 'perf record', that affects the tracepoint events specied thus far in the command line, use the ->strtoul() methods to allow strings in tables associated with beautifiers to the integers the in-kernel tracepoint (eBPF later) filters expect, e.g.: # perf trace --max-events 1 -e sched:*ipi --filter="cpu==1 || cpu==2" 0.000 as/24630 sched:sched_wake_idle_without_ipi(cpu: 1) # # perf trace --max-events 1 --max-stack=32 -e msr:* --filter="msr==IA32_TSC_DEADLINE" 207.000 cc1/19963 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 5442316760822) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) lapic_next_deadline ([kernel.kallsyms]) clockevents_program_event ([kernel.kallsyms]) hrtimer_interrupt ([kernel.kallsyms]) smp_apic_timer_interrupt ([kernel.kallsyms]) apic_timer_interrupt ([kernel.kallsyms]) [0x6ff66c] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) [0x7047c3] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) [0x707708] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) execute_one_pass (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) [0x4f3d37] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) [0x4f3d49] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) execute_pass_list (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) cgraph_node::expand (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) [0x2625b4] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) symbol_table::finalize_compilation_unit (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) [0x5ae8b9] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) toplev::main (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) main (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1) [0x26b6a] (/usr/lib/x86_64-linux-gnu/libc-2.29.so) # # perf trace --max-events 8 -e msr:* --filter="msr==IA32_SPEC_CTRL" 0.000 :13281/13281 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) 0.063 migration/3/25 msr:write_msr(msr: IA32_SPEC_CTRL) 0.217 kworker/u16:1-/4826 msr:write_msr(msr: IA32_SPEC_CTRL) 0.687 rcu_sched/11 msr:write_msr(msr: IA32_SPEC_CTRL) 0.696 :13280/13280 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) 0.305 :13281/13281 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) 0.355 :13274/13274 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) 2.743 kworker/u16:0-/6711 msr:write_msr(msr: IA32_SPEC_CTRL) # # perf trace --max-events 8 --cpu 1 -e msr:* --filter="msr!=IA32_SPEC_CTRL && msr!=IA32_TSC_DEADLINE && msr != FS_BASE" 0.000 mtr-packet/30819 msr:write_msr(msr: 0x830, val: 68719479037) 0.096 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 238.925 mtr-packet/30819 msr:write_msr(msr: 0x830, val: 8589936893) 511.010 :0/0 msr:write_msr(msr: 0x830, val: 68719479037) 1005.052 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 1235.131 CPU 0/KVM/3750 msr:write_msr(msr: 0x830, val: 4294969595) 1235.195 CPU 0/KVM/3750 msr:read_msr(msr: IA32_SYSENTER_ESP, val: -2199023037952) 1235.201 CPU 0/KVM/3750 msr:read_msr(msr: IA32_APICBASE, val: 4276096000) # - Default to not using libtraceevent and its plugins for beautifying tracepoint arguments, since now we're reusing the strace-like beatufiers. Use --libtraceevent_print (using just --libtrace is unambiguous and can be used as a short hand) to go back to those beautifiers. This will help in the transition, as can be seen in some of the sched tracepoints that still need some work in the libbeauty based mode: # trace --no-inherit -e msr:*,*sleep,sched:* sleep 1 0.000 ( ): sched:sched_waking(comm: "trace", pid: 3319 (trace), prio: 120, success: 1) 0.006 ( ): sched:sched_wakeup(comm: "trace", pid: 3319 (trace), prio: 120, success: 1) 0.348 ( ): sched:sched_process_exec(filename: 140212596720100, pid: 3319 (sleep), old_pid: 3319 (sleep)) 0.490 ( ): msr:write_msr(msr: FS_BASE, val: 139631189321088) 0.670 ( ): nanosleep(rqtp: 0x7ffc52c23bc0) ... 0.674 ( ): sched:sched_stat_runtime(comm: "sleep", pid: 3319 (sleep), runtime: 659259, vruntime: 78942418342) 0.675 ( ): sched:sched_switch(prev_comm: "sleep", prev_pid: 3319 (sleep), prev_prio: 120, prev_state: 1, next_comm: "swapper/0", next_prio: 120) 1001.059 ( ): sched:sched_waking(comm: "sleep", pid: 3319 (sleep), prio: 120, success: 1) 1001.098 ( ): sched:sched_wakeup(comm: "sleep", pid: 3319 (sleep), prio: 120, success: 1) 0.670 (1000.504 ms): ... [continued]: nanosleep()) = 0 1001.456 ( ): sched:sched_process_exit(comm: "sleep", pid: 3319 (sleep), prio: 120) # trace --libtrace --no-inherit -e msr:*,*sleep,sched:* sleep 1 # trace --libtrace --no-inherit -e msr:*,*sleep,sched:* sleep 1 0.000 ( ): sched:sched_waking(comm=trace pid=3323 prio=120 target_cpu=000) 0.007 ( ): sched:sched_wakeup(comm=trace pid=3323 prio=120 target_cpu=000) 0.382 ( ): sched:sched_process_exec(filename=/usr/bin/sleep pid=3323 old_pid=3323) 0.525 ( ): msr:write_msr(c0000100, value 7f5d508a0580) 0.713 ( ): nanosleep(rqtp: 0x7fff487fb4a0) ... 0.717 ( ): sched:sched_stat_runtime(comm=sleep pid=3323 runtime=617722 [ns] vruntime=78957731636 [ns]) 0.719 ( ): sched:sched_switch(prev_comm=sleep prev_pid=3323 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120) 1001.117 ( ): sched:sched_waking(comm=sleep pid=3323 prio=120 target_cpu=000) 1001.157 ( ): sched:sched_wakeup(comm=sleep pid=3323 prio=120 target_cpu=000) 0.713 (1000.522 ms): ... [continued]: nanosleep()) = 0 1001.538 ( ): sched:sched_process_exit(comm=sleep pid=3323 prio=120) # - Make -v (verbose) mode be honoured for .perfconfig based trace.add_events, to help in diagnosing problems with building eBPF events (-e source.c). - When using eBPF syscall payload augmentation do not show strace-like syscalls when all the user specified was some tracepoint event, bringing the behaviour in line with that of when not using eBPF augmentation. Intel PT: exported-sql-viewer GUI: Adrian Hunter: - Add LookupModel, HBoxLayout, VBoxLayout, global time range calculations so as to add a time chart by CPU. perf script: Andi Kleen: - Allow --time (to specify a time span of interest) with --reltime perf diff: Jin Yao: - Report noise for cycles diff, i.e. a histogram + stddev. (timestamps relative to start). perf annotate: Arnaldo Carvalho de Melo: - Initialize env->cpuid when running in live mode (perf top), as it is used in some of the per arch annotation init routines. samples bpf: Björn Töpel: - Fixup fallout of using tools/perf/perf-sys. from outside tools/perf. Core: Ian Rogers: - Avoid 'sample_reg_masks' being const + weak, as this breaks with some compilers that constant-propagate from the weak symbol. libperf: - First part of moving the perf_mmap class from tools/perf to libperf. - Propagate CFLAGS to libperf from the tools/perf Makefile. Vendor events: John Garry: - Add entry in MAINTAINERS with reviewers for the for perf tool arm64 pmu-events files. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit c55b5c663076e49d066481b05b39ae037ab8002f Author: Thara Gopinath Date: Thu Sep 19 12:18:22 2019 -0400 soc: qcom: Invert the cooling states for the aoss warming devices Thermal framework takes 0 as the lowest/default state for a cooling/warming device. The current code has the order inverted with 1 corresponding to lowest state in hardware and 0 the highest state. Invert this for a better fit with the thermal framework. Signed-off-by: Thara Gopinath Signed-off-by: Bjorn Andersson commit 85a83a8fca7f347b1dc0b637a0d6487fd76aff5c Merge: a98d62c3ee90 664277781c4c Author: David S. Miller Date: Mon Oct 14 16:45:41 2019 -0700 Merge branch 'PTP-driver-refactoring-for-SJA1105-DSA' Vladimir Oltean says: ==================== PTP driver refactoring for SJA1105 DSA This series creates a better separation between the driver core and the PTP portion. Therefore, users who are not interested in PTP can get a simpler and smaller driver by compiling it out. This is in preparation for further patches: SPI transfer timestamping, synchronizing the hardware clock (as opposed to keeping it free-running), PPS input/output, etc. ==================== Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 664277781c4cb312971c5a2e2df3290bd990ac14 Author: Vladimir Oltean Date: Sat Oct 12 02:18:16 2019 +0300 net: dsa: sja1105: Change the PTP command access pattern The PTP command register contains enable bits for: - Putting the 64-bit PTPCLKVAL register in add/subtract or write mode - Taking timestamps off of the corrected vs free-running clock - Starting/stopping the TTEthernet scheduling - Starting/stopping PPS output - Resetting the switch When a command needs to be issued (e.g. "change the PTPCLKVAL from write mode to add/subtract mode"), one cannot simply write to the command register setting the PTPCLKADD bit to 1, because that would zeroize the other settings. One also cannot do a read-modify-write (that would be too easy for this hardware) because not all bits of the command register are readable over SPI. So this leaves us with the only option of keeping the value of the PTP command register in the driver, and operating on that. Actually there are 2 types of PTP operations now: - Operations that modify the cached PTP command. These operate on ptp_data->cmd as a pointer. - Operations that apply all previously cached PTP settings, but don't otherwise cache what they did themselves. The sja1105_ptp_reset function is such an example. It copies the ptp_data->cmd on stack before modifying and writing it to SPI. This practically means that struct sja1105_ptp_cmd is no longer an implementation detail, since it needs to be stored in full into struct sja1105_ptp_data, and hence in struct sja1105_private. So the (*ptp_cmd) function prototype can change and take struct sja1105_ptp_cmd as second argument now. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a9d6ed7a8bd0f3091b9fe6d0b9facc9392c1ec21 Author: Vladimir Oltean Date: Sat Oct 12 02:18:15 2019 +0300 net: dsa: sja1105: Move PTP data to its own private structure This is a non-functional change with 2 goals (both for the case when CONFIG_NET_DSA_SJA1105_PTP is not enabled): - Reduce the size of the sja1105_private structure. - Make the PTP code more self-contained. Leaving priv->ptp_data.lock to be initialized in sja1105_main.c is not a leftover: it will be used in a future patch "net: dsa: sja1105: Restore PTP time after switch reset". Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 61c77126278eb950010d2ed944c3bc09d10e0eb4 Author: Vladimir Oltean Date: Sat Oct 12 02:18:14 2019 +0300 net: dsa: sja1105: Make all public PTP functions take dsa_switch as argument The new rule (as already started for sja1105_tas.h) is for functions of optional driver components (ones which may be disabled via Kconfig - PTP and TAS) to take struct dsa_switch *ds instead of struct sja1105_private *priv as first argument. This is so that forward-declarations of struct sja1105_private can be avoided. So make sja1105_ptp.h the second user of this rule. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5b3ae43ab18acb8979541ce914b339db3af92364 Author: Vladimir Oltean Date: Sat Oct 12 02:18:13 2019 +0300 net: dsa: sja1105: Get rid of global declaration of struct ptp_clock_info We need priv->ptp_caps to hold a structure and not just a pointer, because we use container_of in the various PTP callbacks. Therefore, the sja1105_ptp_caps structure declared in the global memory of the driver serves no further purpose after copying it into priv->ptp_caps. So just populate priv->ptp_caps with the needed operations and remove sja1105_ptp_caps. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9cd20ef7803cc53a00c6eb7198b3d870ac7b3766 Author: Lionel Landwerlin Date: Mon Oct 14 21:14:04 2019 +0100 drm/i915/perf: allow holding preemption on filtered ctx We would like to make use of perf in Vulkan. The Vulkan API is much lower level than OpenGL, with applications directly exposed to the concept of command buffers (pretty much equivalent to our batch buffers). In Vulkan, queries are always limited in scope to a command buffer. In OpenGL, the lack of command buffer concept meant that queries' duration could span multiple command buffers. With that restriction gone in Vulkan, we would like to simplify measuring performance just by measuring the deltas between the counter snapshots written by 2 MI_RECORD_PERF_COUNT commands, rather than the more complex scheme we currently have in the GL driver, using 2 MI_RECORD_PERF_COUNT commands and doing some post processing on the stream of OA reports, coming from the global OA buffer, to remove any unrelated deltas in between the 2 MI_RECORD_PERF_COUNT. Disabling preemption only apply to a single context with which want to query performance counters for and is considered a privileged operation, by default protected by CAP_SYS_ADMIN. It is possible to enable it for a normal user by disabling the paranoid stream setting. v2: Store preemption setting in intel_context (Chris) v3: Use priorities to avoid preemption rather than the HW mechanism v4: Just modify the port priority reporting function v5: Add nopreempt flag on gem context and always flag requests appropriately, regarless of OA reconfiguration. Link: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/932 Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191014201404.22468-4-chris@chris-wilson.co.uk commit 7831e9a965ea2ca91855995d62197bc8078bb762 Author: Chris Wilson Date: Mon Oct 14 21:14:03 2019 +0100 drm/i915/perf: Allow dynamic reconfiguration of the OA stream Introduce a new perf_ioctl command to change the OA configuration of the active stream. This allows the OA stream to be reconfigured between batch buffers, giving greater flexibility in sampling. We inject a request into the OA context to reconfigure the stream asynchronously on the GPU in between and ordered with execbuffer calls. Original patch for dynamic reconfiguration by Lionel Landwerlin. Link: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/932 Signed-off-by: Chris Wilson Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191014201404.22468-3-chris@chris-wilson.co.uk commit 4f6ccc74a85cbb4cdd373c374dc76398dc7603a1 Author: Lionel Landwerlin Date: Mon Oct 14 21:14:02 2019 +0100 drm/i915: add support for perf configuration queries Listing configurations at the moment is supported only through sysfs. This might cause issues for applications wanting to list configurations from a container where sysfs isn't available. This change adds a way to query the number of configurations and their content through the i915 query uAPI. v2: Fix sparse warnings (Lionel) Add support to query configuration using uuid (Lionel) v3: Fix some inconsistency in uapi header (Lionel) Fix unlocking when not locked issue (Lionel) Add debug messages (Lionel) v4: Fix missing unlock (Dan) v5: Drop lock when copying config content to userspace (Chris) v6: Drop lock when copying config list to userspace (Chris) Fix deadlock when calling i915_perf_get_oa_config() under perf.metrics_lock (Lionel) Add i915_oa_config_get() (Chris) Link: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/932 Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191014201404.22468-2-chris@chris-wilson.co.uk commit b8d49f28aa03e4678e450e588b10c0faf96e4118 Author: Lionel Landwerlin Date: Mon Oct 14 21:14:01 2019 +0100 drm/i915/perf: introduce a versioning of the i915-perf uapi Reporting this version will help application figure out what level of the support the running kernel provides. v2: Add i915_perf_ioctl_version() (Chris) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191014201404.22468-1-chris@chris-wilson.co.uk commit b1d066930606cf2cbfb1c32b53cc2d7577754eff Author: Guido Günther Date: Thu Aug 29 14:30:03 2019 +0300 drm/mxsfb: Read bus flags from bridge if present The bridge might have special requirmentes on the input bus. This is e.g. used by the imx-nwl bridge. Signed-off-by: Guido Günther Reviewed-by: Stefan Agner Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/1567078215-31601-3-git-send-email-robert.chiras@nxp.com commit d02340436695cbf6920ae1aaaed8afdc8635468d Author: Robert Chiras Date: Thu Aug 29 14:30:02 2019 +0300 drm/mxsfb: Update mxsfb to support a bridge Currently, the MXSFB DRM driver only supports a panel. But, its output display signal can also be redirected to another encoder, like a DSI controller. In this case, that DSI controller may act like a drm_bridge. In order support this use-case too, this patch adds support for drm_bridge in mxsfb. Signed-off-by: Robert Chiras Tested-by: Guido Günther Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/1567078215-31601-2-git-send-email-robert.chiras@nxp.com commit 3c00660db18371c632adae4836ed2b2d3d78ecb6 Author: Chris Wilson Date: Mon Oct 14 13:13:36 2019 +0100 drm/i915/execlists: Assert tasklet is locked for process_csb() We rely on only the tasklet being allowed to call into process_csb(), so assert that is locked when we do. As the tasklet uses a simple bitlock, there is no strong lockdep checking so we must make do with a plain assertion that the tasklet is running and assume that we are the tasklet! v2: Fixup intel_gt_sanitize() to prepare each engine for the reset so that the locks are marked as held during the reset v3: Check for existent function pointers for very early sanitisation. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191014121336.30137-1-chris@chris-wilson.co.uk commit 52b2d91752a82d9350981eb3b3ffc4b325c84ba9 Author: Helge Deller Date: Sun Sep 29 21:00:42 2019 +0200 parisc: Do not hardcode registers in checksum functions Do not hardcode processor registers r19 to r22 as scratch registers. Instead let the compiler decide, which may give better optimization results when the functions get inlined. Signed-off-by: Helge Deller commit a98d62c3ee902851500ff35525f4936bffc51466 Merge: 7e0d15ee0d8b b8fc345d6b5d Author: David S. Miller Date: Mon Oct 14 12:17:21 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2019-10-14 The following pull-request contains BPF updates for your *net-next* tree. 12 days of development and 85 files changed, 1889 insertions(+), 1020 deletions(-) The main changes are: 1) auto-generation of bpf_helper_defs.h, from Andrii. 2) split of bpf_helpers.h into bpf_{helpers, helper_defs, endian, tracing}.h and move into libbpf, from Andrii. 3) Track contents of read-only maps as scalars in the verifier, from Andrii. 4) small x86 JIT optimization, from Daniel. 5) cross compilation support, from Ivan. 6) bpf flow_dissector enhancements, from Jakub and Stanislav. ==================== Signed-off-by: David S. Miller commit 67c698fc5eb0f7471f28e10cd6960e5cf6426de1 Author: Lucas De Marchi Date: Thu Oct 10 18:09:07 2019 -0700 drm/dp-mst: fix warning on unused var Fixes: 83fa9842afe7 ("drm/dp-mst: Drop connection_mutex check") Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191011010907.103309-8-lucas.demarchi@intel.com commit bfbcbf88f9dbfec0690849aa2d3c429ccafc2aa7 Author: Benjamin Gaignard Date: Mon Oct 14 11:23:16 2019 +0200 dt-bindings: timer: Convert stm32 timer bindings to json-schema Convert the STM32 timer binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit bf5c3ae18e4d73376ab892db4515ce6d55efb458 Author: Benjamin Gaignard Date: Mon Oct 14 11:22:00 2019 +0200 dt-bindings: thermal: Convert stm32 thermal bindings to json-schema Convert the STM32 thermal binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 97721c5e66c79c3d2c89fe7caf9a53cc754069e1 Author: Benjamin Gaignard Date: Mon Oct 14 11:20:21 2019 +0200 dt-bindings: media: Convert stm32 dcmi bindings to json-schema Convert the STM32 dcmi binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 1c86b23db0f0940d37eb391196c34cf228590e7f Author: Benjamin Gaignard Date: Mon Oct 14 11:20:20 2019 +0200 dt-bindings: media: Convert stm32 cec bindings to json-schema Convert the STM32 cec binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit b1b7ce97fa1e084b2ea41b906b74371e82d61d3a Author: Benjamin Gaignard Date: Mon Oct 14 11:17:56 2019 +0200 dt-bindings: hwlock: Convert stm32 hwspinlock bindings to json-schema Convert the STM32 hwspinlock binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 53448aed7b805cf36ecc59ed5fe8e53815ce4fe8 Author: Vivek Kasireddy Date: Thu Oct 10 17:26:18 2019 -0700 drm/i915/ehl: Port C's hotplug interrupt is associated with TC1 bits On platforms that have the MCC PCH, Port C's hotplug interrupt bits are mapped to TC1 bits. Suggested-by: Matt Roper Signed-off-by: Vivek Kasireddy Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191011002618.3087-1-vivek.kasireddy@intel.com commit 9899a7a869935c4c93247b290ac7a70e0deab202 Author: YueHaibing Date: Mon Oct 14 17:13:08 2019 +0800 ASoC: SOF: Fix randbuild error When LEDS_TRIGGER_AUDIO is m and SND_SOC_SOF is y, sound/soc/sof/control.o: In function `snd_sof_switch_put': control.c:(.text+0x587): undefined reference to `ledtrig_audio_set' control.c:(.text+0x593): undefined reference to `ledtrig_audio_set' Reported-by: Hulk Robot Fixes: 5d43001ae436 ("ASoC: SOF: acpi led support for switch controls") Signed-off-by: YueHaibing Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191014091308.23688-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 364b3f1ff8f096d45f042a9c85daf7a1fc78413e Author: Remi Pommarel Date: Wed May 22 23:33:51 2019 +0200 PCI: aardvark: Use LTSSM state to build link training flag Aardvark's PCI_EXP_LNKSTA_LT flag in its link status register is not implemented and does not reflect the actual link training state (the flag is always set to 0). In order to support link re-training feature this flag has to be emulated. The Link Training and Status State Machine (LTSSM) flag in Aardvark LMI config register could be used as a link training indicator. Indeed if the LTSSM is in L0 or upper state then link training has completed (see [1]). Unfortunately because after asking a link retraining it takes a while for the LTSSM state to become less than 0x10 (due to L0s to recovery state transition delays), LTSSM can still be in L0 while link training has not finished yet. So this waits for link to be in recovery or lesser state before returning after asking for a link retrain. [1] "PCI Express Base Specification", REV. 4.0 PCI Express, February 19 2014, Table 4-14 Fixes: 8a3ebd8de328 ("PCI: aardvark: Implement emulated root PCI bridge config space") Tested-by: Marc Zyngier Signed-off-by: Remi Pommarel Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Acked-by: Thomas Petazzoni commit af818031f4637b0e8d106fcc9023f1c22c44e13a Author: Thomas Bogendoerfer Date: Fri Oct 11 17:05:44 2019 +0200 rtc: ds1685: use devm_platform_ioremap_resource helper Simplify ioremapping of registers by using devm_platform_ioremap_resource. Signed-off-by: Thomas Bogendoerfer Acked-by: Joshua Kinard Link: https://lore.kernel.org/r/20191011150546.9186-2-tbogendoerfer@suse.de Signed-off-by: Alexandre Belloni commit 9e420d7f125f51ab1eda37497b08c4fad9efe4a8 Author: Thomas Bogendoerfer Date: Fri Oct 11 17:05:43 2019 +0200 rts: ds1685: remove not needed fields from private struct A few of the fields in struct ds1685_priv aren't needed at all, so we can remove it. Signed-off-by: Thomas Bogendoerfer Acked-by: Joshua Kinard Link: https://lore.kernel.org/r/20191011150546.9186-1-tbogendoerfer@suse.de Signed-off-by: Alexandre Belloni commit d53bf24db3776842876f83a29a7cd8db2aa3c5ab Author: Srinivas Goud Date: Tue Oct 8 16:25:41 2019 +0200 rtc: xilinx: Fix calibval variable type This patch fixes the warnings reported by static code analysis. Updated calibval variable type to unsigned type from signed. Signed-off-by: Srinivas Goud Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/20765c4c27aa92c75426b82fd2815ebef6471492.1570544738.git.michal.simek@xilinx.com Signed-off-by: Alexandre Belloni commit 9aa0d0be3856749c3be08089fe12a1f4494a030b Author: Nick Crews Date: Fri Oct 4 08:26:08 2019 -0600 rtc: wilco-ec: Handle reading invalid times If the RTC HW returns an invalid time, the rtc_year_days() call would crash. This patch adds error logging in this situation, and removes the tm_yday and tm_wday calculations. These fields should not be relied upon by userspace according to man rtc, and thus we don't need to calculate them. Signed-off-by: Nick Crews Reviewed-by: Daniel Campello Link: https://lore.kernel.org/r/20191004142608.170159-1-ncrews@chromium.org Signed-off-by: Alexandre Belloni commit e683c4b078d824ba1620477efee6be6f4ed647f9 Author: Dinh Nguyen Date: Mon Sep 23 20:30:43 2019 -0500 ARM: dts: arria10: Modify QSPI read_delay for Arria10 The default read delay for Arria10 QSPI module should be 3 on the Arria10 devkit. Signed-off-by: Dinh Nguyen commit c9c13ba428ef90a9b408a6cdf874e14ab5754516 Author: Denis Efremov Date: Sat Sep 28 02:43:08 2019 +0300 PCI: Add PCI_STD_NUM_BARS for the number of standard BARs Code that iterates over all standard PCI BARs typically uses PCI_STD_RESOURCE_END. However, that requires the unusual test "i <= PCI_STD_RESOURCE_END" rather than something the typical "i < PCI_STD_NUM_BARS". Add a definition for PCI_STD_NUM_BARS and change loops to use the more idiomatic C style to help avoid fencepost errors. Link: https://lore.kernel.org/r/20190927234026.23342-1-efremov@linux.com Link: https://lore.kernel.org/r/20190927234308.23935-1-efremov@linux.com Link: https://lore.kernel.org/r/20190916204158.6889-3-efremov@linux.com Signed-off-by: Denis Efremov Signed-off-by: Bjorn Helgaas Acked-by: Sebastian Ott # arch/s390/ Acked-by: Bartlomiej Zolnierkiewicz # video/fbdev/ Acked-by: Gustavo Pimentel # pci/controller/dwc/ Acked-by: Jack Wang # scsi/pm8001/ Acked-by: Martin K. Petersen # scsi/pm8001/ Acked-by: Ulf Hansson # memstick/ commit 7608158df3ed87a5c938c4a0b91f5b11101a9be1 Author: Rob Herring Date: Mon Oct 7 20:23:25 2019 -0500 PCI: Fix missing bridge dma_ranges resource list cleanup Commit e80a91ad302b ("PCI: Add dma_ranges window list") added a dma_ranges resource list, but failed to correctly free the list when devm_pci_alloc_host_bridge() is used. Only the iproc host bridge driver is using the dma_ranges list. Fixes: e80a91ad302b ("PCI: Add dma_ranges window list") Link: https://lore.kernel.org/r/20191008012325.25700-1-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Cc: Srinath Mannam commit 50bf025b75902d326fdb8078be3d278e1b693576 Author: YueHaibing Date: Mon Oct 14 22:43:16 2019 +0800 clk: meson: axg-audio: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Jerome Brunet commit 0fc21fdf4e1023d0e5f8d42a42cdd372177699e2 Author: Alexandre Belloni Date: Wed Oct 9 21:48:14 2019 +0200 ARM: configs: at91: unselect PIT The PIT is not required anymore to successfully boot and may actually harm in case preempt-rt is used because the PIT interrupt is shared. Disable it so the TCB clocksource is used. Link: https://lore.kernel.org/r/20191009194814.15034-1-alexandre.belloni@bootlin.com Acked-by: Nicolas Ferre Acked-by: Alexander Dahl Signed-off-by: Alexandre Belloni commit f3dde260bb0ed197dd85809f8281eb5a552e8594 Author: Rob Herring Date: Fri Oct 11 13:44:13 2019 -0500 dt-bindings: Clean-up regulator '-supply' schemas Regulator '*-supply' properties are always a single phandle, so 'maxItems: 1' or a $ref is not necessary. All that's needed is either 'true' or an optional 'description'. Following this clean-up, the meta-schema will enforce this pattern. There's one case in tree with 'innolux,n156bge-l21' having 2 phandles. This appears to be a mistake or abuse of simple-panel as it's 2 different voltage rails connected to 'power-supply'. Cc: Neil Armstrong Cc: Kevin Hilman Cc: Jonathan Cameron Cc: Krzysztof Kozlowski Cc: Kishon Vijay Abraham I Cc: Liam Girdwood Cc: Mark Brown Cc: linux-iio@vger.kernel.org Acked-by: Jonathan Cameron # for iio Signed-off-by: Rob Herring commit 41e35ffb380bde1379e4030bb5b2ac824d5139cf Author: Ville Syrjälä Date: Fri Oct 11 23:20:30 2019 +0300 drm/i915: Favor last VBT child device with conflicting AUX ch/DDC pin The first come first served apporoach to handling the VBT child device AUX ch conflicts has backfired. We have machines in the wild where the VBT specifies both port A eDP and port E DP (in that order) with port E being the real one. So let's try to flip the preference around and let the last child device win once again. Cc: stable@vger.kernel.org Cc: Jani Nikula Tested-by: Masami Ichikawa Tested-by: Torsten Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111966 Fixes: 36a0f92020dc ("drm/i915/bios: make child device order the priority order") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191011202030.8829-1-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 88d0facf186c6c652c2203536fecd77089b43a4e Author: Jérôme Pouiller Date: Fri Oct 11 16:47:51 2019 +0000 staging: wfx: fix potential vulnerability to spectre array_index_nospec() should be applied after a bound check. Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191011164746.2518-1-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 44288f1101feba11beef9536b176dadae420d874 Author: Jérôme Pouiller Date: Fri Oct 11 10:16:41 2019 +0000 staging: wfx: fix error handling in wfx_tx_get_raw_link_id() Since wfx_tx_get_raw_link_id() return an unsigned, it makes no sense to return a negative value. "15" is a better value since it is used by firmware for stations that have not yet associated link-ids. Note that this should never happens since driver set max_ap_assoc_sta to 14. Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191011101639.31025-1-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 807411911d99fe13ade4c02db4606f2df672f589 Author: Wambui Karuga Date: Sun Oct 13 22:10:27 2019 +0300 staging: rtl8723bs: use DIV_ROUND_UP helper macro Use the DIV_ROUND_UP macro to replace open-coded divisor calculation to improve readability. Issue found using coccinelle: @@ expression n,d; @@ ( - ((n + d - 1) / d) + DIV_ROUND_UP(n,d) | - ((n + (d - 1)) / d) + DIV_ROUND_UP(n,d) ) Signed-off-by: Wambui Karuga Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20191013191027.6470-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 388fa43d5979c400be9a73649058b33a2701cea0 Author: Wambui Karuga Date: Sun Oct 13 21:47:50 2019 +0300 staging: vc04_services: use DIV_ROUND_UP helper macro Replace open-coded division calculation with the DIV_ROUND_UP helper macro for better readability. Issue found using coccinelle: @@ expression n,d; @@ ( - ((n + d - 1) / d) + DIV_ROUND_UP(n,d) | - ((n + (d - 1)) / d) + DIV_ROUND_UP(n,d) ) Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/20191013184750.32766-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 51a50b26c6dd296413350744722e4e5964c0991a Author: Michael Straube Date: Sun Oct 13 15:12:49 2019 +0200 staging: rtl8188eu: remove unnecessary conversion to bool Comparsions evaluate to bool, explicit conversion with ternary operator is overly verbose and unnecessary, so remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191013131249.34422-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 29c03456f157e6c1a29fa546e30ca4eb73e6e79a Author: Michael Straube Date: Sun Oct 13 15:12:48 2019 +0200 staging: rtl8188eu: remove braces from single statement if block Remove braces from single statement if block to comply with kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191013131249.34422-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 02d7aa2f3bfa3969f9805a47dd620609f31bb626 Author: Wambui Karuga Date: Sun Oct 13 01:19:16 2019 +0300 staging: rtl8712: clean up function headers Remove unnecessary line-breaks in function headers to improve readability of function headers. Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/c14b9e60b1e9bab635bc9527cbd2a2a07436ba44.1570918228.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit f89c7d575d7c8b92c53e5472d90d542bbdeb47f6 Author: Wambui Karuga Date: Sun Oct 13 01:19:15 2019 +0300 staging: rtl8712: remove unnecessary return variables Remove variables that are only used to hold and return constants and have the functions directly return the constants. Issue found by coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/f61a0f036af24228c682c6b12c3a8e6cf6736185.1570918228.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 180245d2d01686f61b3d1909bdf349a6d153008b Author: Wambui Karuga Date: Sat Oct 12 21:04:35 2019 +0300 staging: octeon: remove typedef declaration for cvmx_fau_op_size Remove addition of new typedef for enum cvmx_fau_op_size. Issue found by checkpatch.pl Signed-off-by: Wambui Karuga Acked-by: Julia Lawall Link: https://lore.kernel.org/r/0130bbbffd4c3c9e0e2ab0fc02cb7fa704ee410c.1570821661.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6cc5e1c700316c11b61975af3be8ebcab1e2f8b9 Author: Wambui Karuga Date: Sat Oct 12 21:04:34 2019 +0300 staging: octeon: remove typedef declartion for cvmx_pko_command_word0 Removes addition of new typedef declaration for cvmx_pko_command_word0. Also replace previous instances with new union declaration. Signed-off-by: Wambui Karuga Acked-by: Julia Lawall Link: https://lore.kernel.org/r/40bb26b250d7ba5b0d5199072e773be2fb0fed90.1570821661.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1691741fe31d9d2767e7534a83daf3b31390454b Author: Wambui Karuga Date: Sat Oct 12 21:04:33 2019 +0300 staging: octeon: remove typedef declaration for cvmx_fau_reg_32 Remove typedef declaration for enum cvmx_fau_reg_32. Also replace its previous uses with new declaration format. Issue found by checkpatch.pl Signed-off-by: Wambui Karuga Acked-by: Julia Lawall Link: https://lore.kernel.org/r/b7216f423d8e06b2ed7ac2df643a9215cd95be32.1570821661.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 73aef0c9d2c6f746e8c84775b73ef374b7a2a4dc Author: Wambui Karuga Date: Sat Oct 12 21:04:32 2019 +0300 staging: octeon: remove typedef declaration for cvmx_helper_link_info Remove declaration of union cvmx_helper_link_info as typedef. Also replace its previous uses with new union declaration. Issue found by checkpatch.pl Signed-off-by: Wambui Karuga Acked-by: Julia Lawall Link: https://lore.kernel.org/r/fb373aed8fd2b04d01198f5a5769fd2476714e88.1570821661.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit ef1fe6b7369a822d86a2fb8a688c721ae7f4eed3 Author: Wambui Karuga Date: Sat Oct 12 21:04:31 2019 +0300 staging: octeon: remove typedef declaration for cvmx_wqe Remove typedef declaration from struct cvmx_wqe. Also replace its previous uses with new struct declaration. Issue found by checkpatch.pl Signed-off-by: Wambui Karuga Acked-by: Julia Lawall Link: https://lore.kernel.org/r/fa82104ea8d7ff54dc66bfbfedb6cca541701991.1570821661.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit caa2ac29726e75c80fdf1951d7835965a1bf404b Author: Anson Huang Date: Wed Oct 9 10:34:39 2019 +0800 arm64: dts: imx8mn-ddr4-evk: Move iomuxc node to end of file All nodes are better to follow alphabetical sort except iomuxc which has huge pinctrl data, better to put it at the end of file. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 0169002f7151d8c4a2b1a310ac7f9e28a9828505 Author: Anson Huang Date: Wed Oct 9 10:34:38 2019 +0800 arm64: dts: imx8mq-evk: Adjust nodes following alphabetical sort Adjust some nodes to make them follow alphabetical sort except iomuxc node which is put at the end of file because of its huge pinctrl data. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 8f2d3c1759d19232edf1e9ef43d40a44e31493d6 Author: YueHaibing Date: Tue Oct 8 15:19:08 2019 +0800 clk: imx: clk-pll14xx: Make two variables static Fix sparse warnings: drivers/clk/imx/clk-pll14xx.c:44:37: warning: symbol 'imx_pll1416x_tbl' was not declared. Should it be static? drivers/clk/imx/clk-pll14xx.c:57:37: warning: symbol 'imx_pll1443x_tbl' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Anson Huang Signed-off-by: Shawn Guo commit 4bfc53038e1607a661607bd13a2a2ee7c43507fa Author: Yinbo Zhu Date: Tue Oct 8 10:56:42 2019 +0800 arm64: dts: enable otg mode for dwc3 usb ip on layerscape layerscape otg function should be supported HNP SRP and ADP protocol accroing to rm doc, but dwc3 code not realize it and use id pin to detect who is host or device(0 is host 1 is device) this patch is to enable OTG mode on ls1028ardb ls1088ardb and ls1046ardb in dts Signed-off-by: Yinbo Zhu Signed-off-by: Shawn Guo commit c871335217e7c2cf30776ec5a4734ed84582d600 Author: Anson Huang Date: Tue Oct 8 09:25:55 2019 +0800 arm64: dts: imx8mm-evk: Enable pca6416 on i2c3 bus Enable pca6416 on i.MX8MM EVK board's i2c3 bus. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 4a79aed983dc121ffddeff2d154902c61a5d38e2 Author: Anson Huang Date: Tue Oct 8 09:25:54 2019 +0800 arm64: dts: imx8mm-evk: Add i2c3 support Enable i2c3 for i.MX8MM EVK board. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit d11ece801891c71d34fbb4500956bdf797355db9 Author: Anson Huang Date: Tue Oct 8 09:25:53 2019 +0800 arm64: dts: imx8mm-evk: Adjust i2c nodes following alphabetical sort The iomuxc node is being put at end of file because of its huge pinctrl data. I2C devices should be placed in alphabetical sort. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 3d237d0d908ba0498f3ad029a924cb5055c85e6f Author: Leonard Crestez Date: Mon Oct 7 18:09:44 2019 +0300 ARM: imx_v6_v7_defconfig: Build USB_CONFIGFS into kernel Some imx chips (6sll, 6ulz, 7ulp) don't have ethernet support and only a limited number of USB controllers. For such cases NXP suggests configuring the USB controller as an ethernet gadget for network boot testing. Set USB_CONFIGFS to be built into the kernel so that we can configure the ethernet gadget without needing modules. Signed-off-by: Leonard Crestez Reviewed-by: Peter Chen Signed-off-by: Shawn Guo commit 51f5afabc07a13e3d030076c772a1c36e1687b99 Author: Anson Huang Date: Mon Oct 7 09:15:59 2019 +0800 firmware: imx: Skip return value check for some special SCU firmware APIs The SCU firmware does NOT always have return value stored in message header's function element even the API has response data, those special APIs are defined as void function in SCU firmware, so they should be treated as return success always. Signed-off-by: Anson Huang Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 8a3ab38c36926ddbda3d2a3086c0a741fa175cff Author: Pierre-Louis Bossart Date: Fri Oct 11 11:43:12 2019 -0500 ASoC: SOF: topology: check errors when parsing LED tokens sof_parse_tokens() returns a value that is checked on every call except for LED tokens, fix with explicit test. Detected with cppcheck warning: sound/soc/sof/topology.c:973:6: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] ret = sof_parse_tokens(scomp, &scontrol->led_ctl, led_tokens, ^ Fixes: 5d43001ae4360 ("ASoC: SOF: acpi led support for switch controls") Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191011164312.7988-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 494e8f65da24d550a5e7c6a85b9433ffb181705c Author: Pierre-Louis Bossart Date: Fri Oct 11 11:43:11 2019 -0500 ASoC: SOF: topology: remove always-true redundant test Address cppcheck warning: sound/soc/sof/topology.c:2322:6: style: Condition 'pcm' is always true [knownConditionTrueFalse] if (pcm) { ^ sound/soc/sof/topology.c:2311:6: note: Assuming that condition '!pcm' is not redundant if (!pcm) ^ sound/soc/sof/topology.c:2322:6: note: Condition 'pcm' is always true if (pcm) { ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191011164312.7988-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7ad03a2c848f6fb0a8dea656c9c161929696878e Author: Pierre-Louis Bossart Date: Fri Oct 11 11:43:10 2019 -0500 ASoC: SOF: Intel: bdw: fix operator precedence warnings Address cppcheck warnings sound/soc/sof/intel/bdw.c:265:26: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] panic & SHIM_IPCX_BUSY ? "yes" : "no", ^ sound/soc/sof/intel/bdw.c:266:26: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] panic & SHIM_IPCX_DONE ? "yes" : "no", panic); ^ sound/soc/sof/intel/bdw.c:269:25: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] imrx & SHIM_IMRX_BUSY ? "yes" : "no", ^ sound/soc/sof/intel/bdw.c:270:25: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] imrx & SHIM_IMRX_DONE ? "yes" : "no", imrx); ^ sound/soc/sof/intel/bdw.c:273:27: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] status & SHIM_IPCD_BUSY ? "yes" : "no", ^ sound/soc/sof/intel/bdw.c:274:27: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] status & SHIM_IPCD_DONE ? "yes" : "no", status); ^ sound/soc/sof/intel/bdw.c:277:25: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] imrd & SHIM_IMRD_BUSY ? "yes" : "no", ^ sound/soc/sof/intel/bdw.c:278:25: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] imrd & SHIM_IMRD_DONE ? "yes" : "no", imrd); ^ Fixes: 3a9e204d4e369 ("ASoC: SOF: Intel: Add context data to any IPC timeout.") Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191011164312.7988-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f9f618e7128e834db3f54d290a926c4a71104e02 Author: Pierre-Louis Bossart Date: Fri Oct 11 11:43:09 2019 -0500 ASoC: SOF: Intel: byt: fix operator precedence warnings Address cppcheck warnings sound/soc/sof/intel/byt.c:163:26: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] panic & SHIM_IPCX_BUSY ? "yes" : "no", ^ sound/soc/sof/intel/byt.c:164:26: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] panic & SHIM_IPCX_DONE ? "yes" : "no", panic); ^ sound/soc/sof/intel/byt.c:167:25: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] imrx & SHIM_IMRX_BUSY ? "yes" : "no", ^ sound/soc/sof/intel/byt.c:168:25: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] imrx & SHIM_IMRX_DONE ? "yes" : "no", imrx); ^ sound/soc/sof/intel/byt.c:171:27: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] status & SHIM_IPCD_BUSY ? "yes" : "no", ^ sound/soc/sof/intel/byt.c:172:27: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] status & SHIM_IPCD_DONE ? "yes" : "no", status); ^ sound/soc/sof/intel/byt.c:175:25: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] imrd & SHIM_IMRD_BUSY ? "yes" : "no", ^ sound/soc/sof/intel/byt.c:176:25: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] imrd & SHIM_IMRD_DONE ? "yes" : "no", imrd); ^ Fixes: 3a9e204d4e369 ("ASoC: SOF: Intel: Add context data to any IPC timeout.") Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191011164312.7988-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit dd79841ca66ff509660880237dc286d7f116a766 Author: YueHaibing Date: Fri Oct 11 22:35:38 2019 +0800 ASoC: fsl_mqs: Move static keyword to the front of declarations gcc warn about this: sound/soc/fsl/fsl_mqs.c:146:1: warning: static is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: YueHaibing Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20191011143538.15300-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit de729862cc0f0b46dd3a3c11079240ea4e13b97d Author: YueHaibing Date: Fri Oct 11 23:00:42 2019 +0800 ASoC: adau7118: Fix Kconfig warning without CONFIG_I2C When building a kernel without CONFIG_I2C, Kconfig warns: WARNING: unmet direct dependencies detected for REGMAP_I2C Depends on [n]: I2C [=n] Selected by [y]: - SND_SOC_ADAU7118_I2C [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] Add missing I2C dependency to SND_SOC_ADAU7118_I2C to fix this. Reported-by: Hulk Robot Fixes: ca514c0f12b0 ("ASOC: Add ADAU7118 8 Channel PDM-to-I2S/TDM Converter driver") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191011150042.20096-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 0c93c291321f2ba8dc4cd3d4df74801caaa297db Author: Olivier Moysan Date: Fri Oct 11 10:48:16 2019 +0200 ASoC: stm32: spdifrx: retry synchronization in sync state When STM32 SPDIFRX is in sync state, allow multiple synchro attempts, instead of exiting on first unsuccessful trial. This is useful when spdif signal is not immediately available on input. This also allows Pulseaudio to check iec capture device availability when no signal is present. Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20191011084816.14279-1-olivier.moysan@st.com Signed-off-by: Mark Brown commit 89b6d1831d21554a5737a201b78a6ad6c5517b46 Author: Chris Wilson Date: Sun Oct 13 21:30:12 2019 +0100 drm/i915/execlists: Tweak virtual unsubmission Since commit e2144503bf3b ("drm/i915: Prevent bonded requests from overtaking each other on preemption") we have restricted requests to run on their chosen engine across preemption events. We can take this restriction into account to know that we will want to resubmit those requests onto the same physical engine, and so can shortcircuit the virtual engine selection process and keep the request on the same engine during unwind. References: e2144503bf3b ("drm/i915: Prevent bonded requests from overtaking each other on preemption") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Ramlingam C Link: https://patchwork.freedesktop.org/patch/msgid/20191013203012.25208-1-chris@chris-wilson.co.uk commit fd15e2dd38be05701f2f284849f48c1fea90a144 Author: Fabio Estevam Date: Sat Oct 5 12:42:40 2019 -0300 ARM: dts: vf610-zii-scu4-aib: Remove internal debug network interfaces "internal_j8" and "internal_j9" are network interfaces that are not exposed outside the board and were only ever used for debugging purposes. Get rid of them as they are not needed. Signed-off-by: Fabio Estevam Reviewed-by: Chris Healy Signed-off-by: Shawn Guo commit f0b1d7f2e7c2348ae4c856dffb6172c80a023483 Author: Laurentiu Palcu Date: Wed Oct 2 17:04:53 2019 +0300 clk: imx8mq: Add VIDEO2_PLL clock This clock is needed by DCSS when high resolutions are used. Signed-off-by: Laurentiu Palcu CC: Abel Vesa Signed-off-by: Shawn Guo commit ad7adde58c3a326b6709f55c5f46f393f11195bc Author: zhengbin Date: Tue Oct 8 15:15:49 2019 +0800 drm/omap: Remove set but not used variable 'err' in hdmi4_audio_config Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/omapdrm/dss/hdmi4_core.c: In function hdmi4_audio_config: drivers/gpu/drm/omapdrm/dss/hdmi4_core.c:689:6: warning: variable err set but not used [-Wunused-but-set-variable] It is not used since commit f5bab2229190 ("OMAPDSS: HDMI: Add OMAP5 HDMI support") Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/1570518949-47574-5-git-send-email-zhengbin13@huawei.com commit c30a19433e483acbad1aaa43ebc40d66bf4fef98 Author: zhengbin Date: Tue Oct 8 15:15:48 2019 +0800 drm/omap: Remove set but not used variable 'err' in hdmi5_audio_config Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/omapdrm/dss/hdmi5_core.c: In function hdmi5_audio_config: drivers/gpu/drm/omapdrm/dss/hdmi5_core.c:812:6: warning: variable err set but not used [-Wunused-but-set-variable] It is not used since commit f5bab2229190 ("OMAPDSS: HDMI: Add OMAP5 HDMI support") Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/1570518949-47574-4-git-send-email-zhengbin13@huawei.com commit 83e3b8a9c0603ff7445a66145d5dc042982f7d0d Author: zhengbin Date: Tue Oct 8 15:15:47 2019 +0800 drm/omap: Remove set but not used variable 'tclk_trail' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/omapdrm/dss/dsi.c: In function dsi_proto_timings: drivers/gpu/drm/omapdrm/dss/dsi.c:3562:46: warning: variable tclk_trail set but not used [-Wunused-but-set-variable] It is not used since commit 9960aa7cb58c ("drm/omap: move omapdss & displays under omapdrm") Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/1570518949-47574-3-git-send-email-zhengbin13@huawei.com commit 57d55bb5dc8690c8072f029796605498aeac0441 Author: zhengbin Date: Tue Oct 8 15:15:46 2019 +0800 drm/omap: Remove set but not used variable 'plane' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/omapdrm/omap_fb.c: In function omap_framebuffer_update_scanout: drivers/gpu/drm/omapdrm/omap_fb.c:130:16: warning: variable plane set but not used [-Wunused-but-set-variable] It is not used since commit 2ecceeb53b19 ("drm/omap: Move buffer pitch/offset to drm_framebuffer") Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/1570518949-47574-2-git-send-email-zhengbin13@huawei.com commit 8e5802635f0f9f7329ec8ffdec15479946c99fb1 Author: Greg Kroah-Hartman Date: Fri Oct 11 15:29:27 2019 +0200 debugfs: remove return value of debugfs_create_size_t() No one checks the return value of debugfs_create_size_t(), as it's not needed, so make the return value void, so that no one tries to do so in the future. Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191011132931.1186197-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ad26221fb9e64e69e32a2caf58dba067ca4e815e Author: Greg Kroah-Hartman Date: Fri Oct 11 15:29:26 2019 +0200 debugfs: remove return value of debugfs_create_u64() No one checks the return value of debugfs_create_u64(), as it's not needed, so make the return value void, so that no one tries to do so in the future. Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191011132931.1186197-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 313f5dbba41d905d59c820bb2d91ee6c661aff99 Author: Greg Kroah-Hartman Date: Fri Oct 11 15:29:25 2019 +0200 debugfs: remove return value of debugfs_create_u16() No one checks the return value of debugfs_create_u16(), as it's not needed, so make the return value void, so that no one tries to do so in the future. Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191011132931.1186197-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 9655ac4aca20d654769b8f0d6a5be34b7ce7bad1 Author: Greg Kroah-Hartman Date: Fri Oct 11 15:29:24 2019 +0200 debugfs: remove return value of debugfs_create_u8() No one checks the return value of debugfs_create_u8(), as it's not needed, so make the return value void, so that no one tries to do so in the future. Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191011132931.1186197-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f846d1e704f2d07a7f359f65eac2c8cac565db35 Author: Keiya Nobuta Date: Tue Oct 8 15:06:19 2019 +0900 pinctrl: sh-pfc: pfc-r8a77965: Fix typo in pinmux macro for SCL3 SCL3 is assigned to GPSR2 bit7 referred by IP1_23_20 macro. Signed-off-by: Keiya Nobuta Link: https://lore.kernel.org/r/20191008060619.30237-4-nobuta.keiya@fujitsu.com Signed-off-by: Geert Uytterhoeven commit 971029d1e08416e8228cb6e5fe79d29b2a3a1e6d Author: Keiya Nobuta Date: Tue Oct 8 15:06:18 2019 +0900 pinctrl: sh-pfc: pfc-r8a7796: Fix typo in pinmux macro for SCL3 SCL3 is assigned to GPSR2 bit7 referred by IP1_23_20 macro. Signed-off-by: Keiya Nobuta Link: https://lore.kernel.org/r/20191008060619.30237-3-nobuta.keiya@fujitsu.com Signed-off-by: Geert Uytterhoeven commit dcfdaa92a417706c880daa4f94396a1cd53278d0 Author: Keiya Nobuta Date: Tue Oct 8 15:06:17 2019 +0900 pinctrl: sh-pfc: pfc-r8a7795-es1: Fix typo in pinmux macro for SCL3 SCL3 is assigned to GPSR2 bit7 referred by IP1_23_20 macro. Signed-off-by: Keiya Nobuta Link: https://lore.kernel.org/r/20191008060619.30237-2-nobuta.keiya@fujitsu.com Signed-off-by: Geert Uytterhoeven commit 772f9daf336d047ef018bf41e218cb04df4146e5 Author: Keiya Nobuta Date: Tue Oct 8 15:06:16 2019 +0900 pinctrl: sh-pfc: pfc-r8a7795: Fix typo in pinmux macro for SCL3 SCL3 is assigned to GPSR2 bit7 referred by IP1_23_20 macro. Signed-off-by: Keiya Nobuta Link: https://lore.kernel.org/r/20191008060619.30237-1-nobuta.keiya@fujitsu.com Signed-off-by: Geert Uytterhoeven commit d30710b8cce3a581c170d69002e311cc18ed47d3 Author: Keiya Nobuta Date: Tue Oct 8 15:01:12 2019 +0900 pinctrl: sh-pfc: Fix PINMUX_IPSR_PHYS() to set GPSR This patch allows PINMUX_IPSR_PHYS() to set bits in GPSR. When assigning function to pin, GPSR should be set to peripheral function. For example when using SCL3, GPSR2 bit7 (PWM1_A pin) should be set to peripheral function. Signed-off-by: Keiya Nobuta Link: https://lore.kernel.org/r/20191008060112.29819-1-nobuta.keiya@fujitsu.com Fixes: 50d1ba1764b3e00a ("pinctrl: sh-pfc: Add physical pin multiplexing helper macros") Signed-off-by: Geert Uytterhoeven commit 126c9cb9997dc8bd27f48303c10220feb9aec9ba Author: Colin Ian King Date: Mon Oct 7 15:05:59 2019 +0100 pinctrl: rzn1: Make array reg_drive static, makes object smaller Don't populate the array reg_drive on the stack but instead make it static. Makes the object code smaller by 32 bytes. Before: text data bss dec hex filename 31991 15696 0 47687 ba47 drivers/pinctrl/pinctrl-rzn1.o After: text data bss dec hex filename 31863 15792 0 47655 ba27 drivers/pinctrl/pinctrl-rzn1.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191007140559.11840-1-colin.king@canonical.com Signed-off-by: Geert Uytterhoeven commit 9506c23dfaf5980ab1eb33e26968bcf9b2269bb5 Author: Chris Wilson Date: Mon Oct 14 10:07:49 2019 +0100 drm/i915/selftests: Check that GPR are cleared for new contexts We want the general purpose registers to be clear in all new contexts so that we can be confident that no information is leaked from one to the next. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191014090757.32111-7-chris@chris-wilson.co.uk commit 9c27462c896d4852ece6086338e52777a3cb110e Author: Chris Wilson Date: Mon Oct 14 10:07:48 2019 +0100 drm/i915/selftests: Check known register values within the context Check the logical ring context by asserting that the registers hold expected start during execution. (It's a bit chicken-and-egg for how could we manage to execute our request if the registers were not being updated. Still, it's nice to verify that the HW is working as expected.) Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191014090757.32111-6-chris@chris-wilson.co.uk commit 3fa08cbb0662acc6cbd1a481956570a52dba8875 Author: Fabrizio Castro Date: Thu Oct 10 15:26:00 2019 +0100 arm64: dts: renesas: r8a774b1: Add CAN and CAN FD support Add CAN and CAN FD support to the RZ/G2N SoC specific dtsi. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/1570717560-7431-4-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8292f5eb3874844d41d87d1c8e415592d27e8e20 Author: Yoshihiro Shimoda Date: Mon Oct 7 17:40:05 2019 +0900 arm64: dts: renesas: Add iommus to R-Car Gen3 SDHI/MMC nodes This patch adds iommus properties to the R-Car Gen3 SoCs' SDHI/MMC nodes. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1570437605-15804-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 734f9246e791d8da278957b2c326d7709b2a97c0 Author: Nicolas Saenz Julienne Date: Wed Sep 11 20:25:46 2019 +0200 mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type' These zones usage has evolved with time and the comments were outdated. This joins both ZONE_DMA and ZONE_DMA32 explanation and gives up to date examples on how they are used on different architectures. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Christoph Hellwig Reviewed-by: Catalin Marinas Signed-off-by: Catalin Marinas commit 1a8e1cef7603e218339ac63cb3178b25554524e5 Author: Nicolas Saenz Julienne Date: Wed Sep 11 20:25:45 2019 +0200 arm64: use both ZONE_DMA and ZONE_DMA32 So far all arm64 devices have supported 32 bit DMA masks for their peripherals. This is not true anymore for the Raspberry Pi 4 as most of it's peripherals can only address the first GB of memory on a total of up to 4 GB. This goes against ZONE_DMA32's intent, as it's expected for ZONE_DMA32 to be addressable with a 32 bit mask. So it was decided to re-introduce ZONE_DMA in arm64. ZONE_DMA will contain the lower 1G of memory, which is currently the memory area addressable by any peripheral on an arm64 device. ZONE_DMA32 will contain the rest of the 32 bit addressable memory. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Catalin Marinas Signed-off-by: Catalin Marinas commit a573cdd7973dedd87e62196c400332896bb236c8 Author: Nicolas Saenz Julienne Date: Wed Sep 11 20:25:44 2019 +0200 arm64: rename variables used to calculate ZONE_DMA32's size Let the name indicate that they are used to calculate ZONE_DMA32's size as opposed to ZONE_DMA. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Catalin Marinas Signed-off-by: Catalin Marinas commit ae970dc096b2d39f65f2e18d142e3978dc9ee1c7 Author: Nicolas Saenz Julienne Date: Wed Sep 11 20:25:43 2019 +0200 arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys() By the time we call zones_sizes_init() arm64_dma_phys_limit already contains the result of max_zone_dma_phys(). We use the variable instead of calling the function directly to save some precious cpu time. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Catalin Marinas Signed-off-by: Catalin Marinas commit e6ea46511b1ae8c4491904c79411fcd29139af14 Author: Mark Rutland Date: Fri Aug 9 14:22:44 2019 +0100 firmware: arm_sdei: use common SMCCC_CONDUIT_* Now that we have common definitions for SMCCC conduits, move the SDEI code over to them, and remove the SDEI-specific definitions. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Lorenzo Pieralisi Acked-by: James Morse Acked-by: Will Deacon Signed-off-by: Catalin Marinas commit a5520eac4d2dafb7a48c1b0f1c486afcebd6fe0d Author: Mark Rutland Date: Fri Aug 9 14:22:43 2019 +0100 firmware/psci: use common SMCCC_CONDUIT_* Now that we have common SMCCC_CONDUIT_* definitions, migrate the PSCI code over to them, and kill off the old PSCI_CONDUIT_* definitions. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Lorenzo Pieralisi Acked-by: Will Deacon Signed-off-by: Catalin Marinas commit 6848253ddeae9fa44680bab6212599283f9d4ef2 Author: Mark Rutland Date: Fri Aug 9 14:22:42 2019 +0100 arm: spectre-v2: use arm_smccc_1_1_get_conduit() Now that we have arm_smccc_1_1_get_conduit(), we can hide the PSCI implementation details from the arm spectre-v2 code, so let's do so. As arm_smccc_1_1_get_conduit() implicitly checks that the SMCCC version is at least SMCCC_VERSION_1_1, we no longer need to check this explicitly where switch statements have a default case. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Russell King Signed-off-by: Catalin Marinas commit c98bd29917281a5023f71a3148f538ad2709c0f0 Author: Mark Rutland Date: Fri Aug 9 14:22:41 2019 +0100 arm64: errata: use arm_smccc_1_1_get_conduit() Now that we have arm_smccc_1_1_get_conduit(), we can hide the PSCI implementation details from the arm64 cpu errata code, so let's do so. As arm_smccc_1_1_get_conduit() implicitly checks that the SMCCC version is at least SMCCC_VERSION_1_1, we no longer need to check this explicitly where switch statements have a default case, e.g. in has_ssbd_mitigation(). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Lorenzo Pieralisi Cc: Will Deacon Cc: Marc Zyngier Cc: Suzuki K Poulose Signed-off-by: Catalin Marinas commit 6b7fe77c334ae59fed9500140e08f4f896b36871 Author: Mark Rutland Date: Fri Aug 9 14:22:40 2019 +0100 arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit() SMCCC callers are currently amassing a collection of enums for the SMCCC conduit, and are having to dig into the PSCI driver's internals in order to figure out what to do. Let's clean this up, with common SMCCC_CONDUIT_* definitions, and an arm_smccc_1_1_get_conduit() helper that abstracts the PSCI driver's internal state. We can kill off the PSCI_CONDUIT_* definitions once we've migrated users over to the new interface. Signed-off-by: Mark Rutland Acked-by: Lorenzo Pieralisi Acked-by: Will Deacon Signed-off-by: Catalin Marinas commit ce87de45b3243d7023e8a4a76ba004002a7ec087 Author: Mark Rutland Date: Fri Sep 13 13:55:50 2019 +0100 arm64: simplify syscall wrapper ifdeffery Back in commit: 4378a7d4be30ec69 ("arm64: implement syscall wrappers") ... I implemented the arm64 syscall wrapper glue following the approach taken on x86. While doing so, I also copied across some ifdeffery that isn't necessary on arm64. On arm64 we don't share any of the native wrappers with compat tasks, and unlike x86 we don't have alternative implementations of SYSCALL_DEFINE0(), COND_SYSCALL(), or SYS_NI() defined when AArch32 compat support is enabled. Thus we don't need to prevent multiple definitions of these macros, and can remove the #ifndef ... #endif guards protecting them. If any of these had been previously defined elsewhere, syscalls are unlikely to work correctly, and we'd want the compiler to warn about the multiple definitions. Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas commit a8613e7070e771cea90d93eb1e8397246883065a Author: Julien Grall Date: Thu Oct 3 12:12:11 2019 +0100 docs/arm64: cpu-feature-registers: Documents missing visible fields A couple of fields visible to userspace are not described in the documentation. So update it. Acked-by: Will Deacon Signed-off-by: Julien Grall Signed-off-by: Catalin Marinas commit 0f6e4c40164d4283b8bbe4ed80bf54424b756bc7 Author: Julien Grall Date: Thu Oct 3 12:12:10 2019 +0100 docs/arm64: elf_hwcaps: Document HWCAP_SB All the hardware capabilities but HWCAP_SB is not documented in elf_hwcaps.rst. So document it. Acked-by: Will Deacon Signed-off-by: Julien Grall Signed-off-by: Catalin Marinas commit 3a25e46c99e9c8b294b89df7a13a4638bf722af8 Author: Julien Grall Date: Thu Oct 3 12:12:09 2019 +0100 docs/arm64: elf_hwcaps: sort the HWCAP{, 2} documentation by ascending value Part of the hardware capabilities documented in elf_hwcap.rst are ordered following the definition in the header arch/arm64/include/uapi/asm/hwcap.h but others seems to be documented in random order. To make easier to match against the definition in the header, they are now sorted in the same order as they are defined in header. I.e., HWCAP first by ascending value, and then HWCAP2 in the similar fashion. Acked-by: Will Deacon Signed-off-by: Julien Grall Signed-off-by: Catalin Marinas commit 1fd37669bc873cee180f1505a20b16e557b7b472 Author: Chris Wilson Date: Sat Oct 12 09:02:08 2019 +0100 drm/i915/display: Squelch kerneldoc warnings Just a parameter rename, drivers/gpu/drm/i915/display/intel_display.c:14425: warning: Function parameter or member '_new_plane_state' not described in 'intel_prepare_plane_fb' drivers/gpu/drm/i915/display/intel_display.c:14425: warning: Excess function parameter 'new_state' description in 'intel_prepare_plane_fb' drivers/gpu/drm/i915/display/intel_display.c:14534: warning: Function parameter or member '_old_plane_state' not described in 'intel_cleanup_plane_fb' drivers/gpu/drm/i915/display/intel_display.c:14534: warning: Excess function parameter 'old_state' description in 'intel_cleanup_plane_fb' Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Matt Roper Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191012080208.18774-1-chris@chris-wilson.co.uk commit c3226d93f85c27170abac78dbe233c0a0ad12d35 Author: Brian Norris Date: Fri Oct 11 18:44:21 2019 -0700 rtw88: include interrupt.h for tasklet_struct Depending on implicit header includes, we might see this compilation error: .../main.h:1391:24: error: field has incomplete type 'struct tasklet_struct' struct tasklet_struct tx_tasklet; ^ Fixes: 3745d3e550d1 ("rtw88: add driver TX queue support") Signed-off-by: Brian Norris Acked-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 4ee2f342669991b733cceec53300407da555924d Author: Brian Norris Date: Fri Oct 11 18:27:20 2019 -0700 rtw88: use a for loop in rtw_power_mode_change(), not goto No change in logic. Signed-off-by: Brian Norris Acked-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 12078aae453556a88fb46777b7cc5fc97f867b7c Author: Ping-Ke Shih Date: Tue Oct 8 16:21:00 2019 +0800 rtw88: coex: Set 4 slot mode for A2DP With shallow buffer size, certain BT devices have active A2DP flow control to fill buffer frequently. If the slot is not at BT side, data can't be sent successfully to BT devices, and will cause audio glitch. To resolve this issue, this commit splits TUs into 4-slots instead of 2-slot for all of the A2DP related coexistence strategies. That makes BT have higher opportunity to fill the A2DP buffer in time, and the audio quality could be more stable and smooth. Signed-off-by: Ping-Ke Shih Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 474264d5a6b7db4d6c1a1ba1464812addbb7f974 Author: Yan-Hsuan Chuang Date: Tue Oct 8 16:20:59 2019 +0800 rtw88: pci: config phy after chip info is setup Chip info such as cut_version is required to configure PCI phy. Move rtw_pci_phy_config after rtw_chip_info_setup. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit a4835410995e0a15b40cd4ab13d19e680f5a2602 Author: Yan-Hsuan Chuang Date: Tue Oct 8 16:20:58 2019 +0800 rtw88: Use rtw_write8_set to set SYS_FUNC rtw_write8 could modify the values that we do not want to change, use rtw_write8_set instead to only enable the bits of sys_func_en Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 5dc32b8ace3754fab7f1c504e6e5dac6d0f7686d Author: Tzu-En Huang Date: Tue Oct 8 16:20:57 2019 +0800 rtw88: add NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 support Add support for NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 feature. According to the "Hardware crypto acceleration" documentation section, when set_key() is called with %DISABLE_KEY command, for outgoing frames, we flush out frames in the queues with the old key; for incoming frames, no frames will be passed to mac80211 decrypted with the old key due to rtw_sec_clear_cam(). Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 27c65bfc434fb18db001c3ade07dbdb189eda7ec Author: Tzu-En Huang Date: Tue Oct 8 16:20:54 2019 +0800 rtw88: config 8822c multicast address in MAC init flow Multicast address should be congiured in the initialization flow. The value is created by a hashed calculation that is also implemented by the hardware for multicast address filtering. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 2e127203d1165851bcbec4863c63a3e3cc72021c Author: James Pack Date: Sat Oct 12 23:07:23 2019 -0400 ACPI: Documentation: Minor spelling fix in namespace.rst Very minor spelling fix in ACPI documentation (typo in namespace.rst). Signed-off-by: James Pack Signed-off-by: Rafael J. Wysocki commit ac36d37e943635fc072e9d4f47e40a48fbcdb3f0 Author: Arjan van de Ven Date: Wed Oct 9 15:04:33 2019 +0200 ACPI: Always build evged in Although the Generic Event Device is a Hardware-reduced platfom device in principle, it should not be restricted to ACPI_REDUCED_HARDWARE_ONLY. Kernels supporting both fixed and hardware-reduced ACPI platforms should be able to probe the GED when dynamically detecting that a platform is hardware-reduced. For that, the driver must be unconditionally built in. Signed-off-by: Arjan van de Ven Signed-off-by: Samuel Ortiz Signed-off-by: Rafael J. Wysocki commit d43810b2c1808ac865aa1a2a2c291644bf95345c Author: Bjorn Andersson Date: Fri Oct 11 11:28:17 2019 -0700 ath10k: Correct error handling of dma_map_single() The return value of dma_map_single() should be checked for errors using dma_mapping_error() and the skb has been dequeued so it needs to be freed. This was found when enabling CONFIG_DMA_API_DEBUG and it warned about the missing dma_mapping_error() call. Fixes: 1807da49733e ("ath10k: wmi: add management tx by reference support over wmi") Reported-by: Niklas Cassel Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo commit 159e48560f51d9c2aa02d762a18cd24f7868ab27 Author: Rafael J. Wysocki Date: Thu Oct 10 23:37:39 2019 +0200 cpuidle: teo: Fix "early hits" handling for disabled idle states The TEO governor uses idle duration "bins" defined in accordance with the CPU idle states table provided by the driver, so that each "bin" covers the idle duration range between the target residency of the idle state corresponding to it and the target residency of the closest deeper idle state. The governor collects statistics for each bin regardless of whether or not the idle state corresponding to it is currently enabled. In particular, the "early hits" metric measures the likelihood of a situation in which the idle duration measured after wakeup falls into to given bin, but the time till the next timer (sleep length) falls into a bin corresponding to one of the deeper idle states. It is used when the "hits" and "misses" metrics indicate that the state "matching" the sleep length should not be selected, so that the state with the maximum "early hits" value is selected instead of it. If the idle state corresponding to the given bin is disabled, it cannot be selected and if it turns out to be the one that should be selected, a shallower idle state needs to be used instead of it. Nevertheless, the metrics collected for the bin corresponding to it are still valid and need to be taken into account as though that state had not been disabled. As far as the "early hits" metric is concerned, teo_select() tries to take disabled states into account, but the state index corresponding to the maximum "early hits" value computed by it may be incorrect. Namely, it always uses the index of the previous maximum "early hits" state then, but there may be enabled idle states closer to the disabled one in question. In particular, if the current candidate state (whose index is the idx value) is closer to the disabled one and the "early hits" value of the disabled state is greater than the current maximum, the index of the current candidate state (idx) should replace the "maximum early hits state" index. Modify the code to handle that case correctly. Fixes: b26bf6ab716f ("cpuidle: New timer events oriented governor for tickless systems") Reported-by: Doug Smythies Signed-off-by: Rafael J. Wysocki Cc: 5.1+ # 5.1+ commit e43dcf20215f0287ea113102617ca04daa76b70e Author: Rafael J. Wysocki Date: Thu Oct 10 23:36:15 2019 +0200 cpuidle: teo: Consider hits and misses metrics of disabled states The TEO governor uses idle duration "bins" defined in accordance with the CPU idle states table provided by the driver, so that each "bin" covers the idle duration range between the target residency of the idle state corresponding to it and the target residency of the closest deeper idle state. The governor collects statistics for each bin regardless of whether or not the idle state corresponding to it is currently enabled. In particular, the "hits" and "misses" metrics measure the likelihood of a situation in which both the time till the next timer (sleep length) and the idle duration measured after wakeup fall into the given bin. Namely, if the "hits" value is greater than the "misses" one, that situation is more likely than the one in which the sleep length falls into the given bin, but the idle duration measured after wakeup falls into a bin corresponding to one of the shallower idle states. If the idle state corresponding to the given bin is disabled, it cannot be selected and if it turns out to be the one that should be selected, a shallower idle state needs to be used instead of it. Nevertheless, the metrics collected for the bin corresponding to it are still valid and need to be taken into account as though that state had not been disabled. For this reason, make teo_select() always use the "hits" and "misses" values of the idle duration range that the sleep length falls into even if the specific idle state corresponding to it is disabled and if the "hits" values is greater than the "misses" one, select the closest enabled shallower idle state in that case. Fixes: b26bf6ab716f ("cpuidle: New timer events oriented governor for tickless systems") Signed-off-by: Rafael J. Wysocki Cc: 5.1+ # 5.1+ commit 4f690bb8ce4cc5d3fabe3a8e9c2401de1554cdc1 Author: Rafael J. Wysocki Date: Thu Oct 10 23:32:59 2019 +0200 cpuidle: teo: Rename local variable in teo_select() Rename a local variable in teo_select() in preparation for subsequent code modifications, no intentional impact. Signed-off-by: Rafael J. Wysocki Cc: 5.1+ # 5.1+ commit 069ce2ef1a6dd84cbd4d897b333e30f825e021f0 Author: Rafael J. Wysocki Date: Thu Oct 10 23:32:17 2019 +0200 cpuidle: teo: Ignore disabled idle states that are too deep Prevent disabled CPU idle state with target residencies beyond the anticipated idle duration from being taken into account by the TEO governor. Fixes: b26bf6ab716f ("cpuidle: New timer events oriented governor for tickless systems") Signed-off-by: Rafael J. Wysocki Cc: 5.1+ # 5.1+ commit f433abfc2f76b7ebf9a7211351bd2ee021daed17 Author: Tomislav Požega Date: Thu Oct 10 22:53:15 2019 +0200 ath: rename regulatory rules Regulatory rule defines in regd.c are used not only by ath9k but also ath10k driver (haven't test other drivers) and thus should be renamed from ATH9K* to ATH*. Signed-off-by: Tomislav Požega Signed-off-by: Kalle Valo commit 486a8849843455298d49e694cca9968336ce2327 Author: Miaoqing Pan Date: Wed Oct 9 16:18:09 2019 +0800 ath10k: fix memory leak for tpc_stats_final The memory of ar->debug.tpc_stats_final is reallocated every debugfs reading, it should be freed in ath10k_debug_destroy() for the last allocation. Tested HW: QCA9984 Tested FW: 10.4-3.9.0.2-00035 Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo commit c5329b2d5b8b4e41be14d31ee8505b4f5607bf9b Author: Miaoqing Pan Date: Wed Oct 9 16:18:08 2019 +0800 ath10k: fix array out-of-bounds access If firmware reports rate_max > WMI_TPC_RATE_MAX(WMI_TPC_FINAL_RATE_MAX) or num_tx_chain > WMI_TPC_TX_N_CHAIN, it will cause array out-of-bounds access, so print a warning and reset to avoid memory corruption. Tested HW: QCA9984 Tested FW: 10.4-3.9.0.2-00035 Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo commit bc3ecbe09ab19f766699c056f3e7175bf7e96c64 Author: Colin Ian King Date: Thu Sep 5 17:37:26 2019 +0100 dmaengine: iop-adma: make array 'handler' static const, makes object smaller Don't populate the array 'handler' on the stack but instead make it static const. Makes the object code smaller by 80 bytes. Before: text data bss dec hex filename 38225 9084 64 47373 b90d drivers/dma/iop-adma.o After: text data bss dec hex filename 38081 9148 64 47293 b8bd drivers/dma/iop-adma.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190905163726.19690-1-colin.king@canonical.com Signed-off-by: Vinod Koul commit 280bc0cecb77240bf6be7f86a9da90e3451829b9 Author: Chris Wilson Date: Sun Oct 13 12:45:09 2019 +0100 drm/i915/selftests: Fixup naked 64b divide drivers/gpu/drm/i915/intel_memory_region.o: in function `igt_mock_contiguous': drivers/gpu/drm/i915/selftests/intel_memory_region.c:166: undefined reference to `__umoddi3' v2: promote target to u64 for consistency across all builds Reported-by: kbuild test robot Fixes: 2f0b97ca0211 ("drm/i915/region: support contiguous allocations") Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191013114509.3405-1-chris@chris-wilson.co.uk commit f27c22736d133baff0ab3fdc7b015d998267d817 Author: Andy Shevchenko Date: Tue Sep 24 11:51:16 2019 +0300 dmaengine: dw: platform: Mark 'hclk' clock optional On some platforms the clock can be fixed rate, always running one and there is no need to do anything with it. In order to support those platforms, switch to use optional clock. Fixes: f8d9ddbc2851 ("dmaengine: dw: platform: Enable iDMA 32-bit on Intel Elkhart Lake") Depends-on: 60b8f0ddf1a9 ("clk: Add (devm_)clk_get_optional() functions") Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20190924085116.83683-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit ca58b37034453e690e5278f95f32ea050951cf9f Author: Rasmus Villemoes Date: Tue Oct 8 14:03:27 2019 +0200 backlight: pwm_bl: Switch to power-of-2 base for fixed-point math Using a power-of-2 instead of power-of-10 base makes the computations much cheaper. 2^16 is safe; retval never becomes more than 2^48 + 2^32/2. On a 32 bit platform, the very expensive 64/32 division at the end of cie1931() instead becomes essentially free (a shift by 32 is just a register rename). Signed-off-by: Rasmus Villemoes Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 407feae1cacaa5d00ebe686532a73ad6de747409 Author: Rasmus Villemoes Date: Tue Oct 8 14:03:26 2019 +0200 backlight: pwm_bl: Drop use of int_pow() For a fixed small exponent of 3, it is more efficient to simply use two explicit multiplications rather than calling the int_pow() library function: Aside from the function call overhead, its implementation using repeated squaring means it ends up doing four 64x64 multiplications. Signed-off-by: Rasmus Villemoes Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit e802cbafcbd250a88cbd4ea7f9afb9c0d4267c7a Author: Rasmus Villemoes Date: Tue Oct 8 14:03:25 2019 +0200 backlight: pwm_bl: Eliminate a 64/32 division lightness*1000 is nowhere near overflowing 32 bits, so we can just use an ordinary 32/32 division, which is much cheaper than the 64/32 done via do_div(). Signed-off-by: Rasmus Villemoes Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit efdf690e159ab340486dd6d42f387bbb8f03a579 Author: Rasmus Villemoes Date: Tue Oct 8 14:03:24 2019 +0200 backlight: pwm_bl: Fix cie1913 comments and constant The "break-even" point for the two formulas is L==8, which is also what the code actually implements. [Incidentally, at that point one has Y=0.008856, not 0.08856]. Moreover, all the sources I can find say the linear factor is 903.3 rather than 902.3, which makes sense since then the formulas agree at L==8, both yielding the 0.008856 figure to four significant digits. Signed-off-by: Rasmus Villemoes Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 349ee1228729df5c2a0cb33506cad2661e40e750 Author: Matthias Kaehlcke Date: Thu Oct 3 14:35:02 2019 -0700 backlight: pwm_bl: Add missing curly branches in else branch Add curly braces to an 'else' branch in pwm_backlight_update_status() to match the corresponding 'if' branch. Signed-off-by: Matthias Kaehlcke Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit de6f2a7fa2c9563266e2a3239e16b117daf22b47 Author: Matthias Kaehlcke Date: Wed Oct 2 09:56:01 2019 -0700 backlight: pwm_bl: Don't assign levels table repeatedly pwm_backlight_probe() re-assigns pb->levels for every brightness level. This is not needed and was likely not intended, since neither side of the assignment changes during the loop. Assign the field only once. Signed-off-by: Matthias Kaehlcke Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 833b48242686606670edaa72a465c0faa44d2916 Author: Markus Elfring Date: Sun Sep 22 14:32:12 2019 +0200 dmaengine: zx: Use devm_platform_ioremap_resource() in zx_dma_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Shawn Guo Link: https://lore.kernel.org/r/85de79fa-1ca5-a1e5-0296-9e8a2066f134@web.de Signed-off-by: Vinod Koul commit ecb4d34fafec4fea6fe218f25cc390775a609efd Author: Markus Elfring Date: Sun Sep 22 13:23:54 2019 +0200 dmaengine: owl: Use devm_platform_ioremap_resource() in owl_dma_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/d36b6a6c-2e3d-8d68-6ddc-969a377ca3b2@web.de Signed-off-by: Vinod Koul commit a7dc0e6c1ec9f2f244f3cea3172bfe1521dabcfd Author: Markus Elfring Date: Sun Sep 22 13:07:41 2019 +0200 dmaengine: mediatek: Use devm_platform_ioremap_resource() in mtk_uart_apdma_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/366e776c-8760-eeb7-c248-7380c9f4fd34@web.de Signed-off-by: Vinod Koul commit 9d68427d0f4f6c008a26a0a021ee37994549cbc1 Author: Markus Elfring Date: Sun Sep 22 12:52:25 2019 +0200 dmaengine: mediatek: Use devm_platform_ioremap_resource() in mtk_cqdma_probe() Simplify this function implementation a bit by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/c7e3bbae-44fa-9019-18ee-c6cdfd7c2a14@web.de Signed-off-by: Vinod Koul commit 3d4d6c27f65cbcfc8293cc08eae257e1d90aef48 Author: Markus Elfring Date: Sun Sep 22 11:36:18 2019 +0200 dmaengine: k3dma: Use devm_platform_ioremap_resource() in k3_dma_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/aaed7862-49bb-e368-3e7b-5cc2c3d915b1@web.de Signed-off-by: Vinod Koul commit 1148ac673f7463313e57ac7a407ddd89e798ea91 Author: Markus Elfring Date: Sun Sep 22 11:18:27 2019 +0200 dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe() Simplify this function implementation a bit by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/5dd19f28-349a-4957-ea3a-6aebbd7c97e2@web.de Signed-off-by: Vinod Koul commit fbd1d637f6d1a5b0d2b487299111b06fb0b3c3fd Author: Markus Elfring Date: Sun Sep 22 10:37:31 2019 +0200 dmaengine: at_xdmac: Use devm_platform_ioremap_resource() in at_xdmac_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/377247f3-b53a-a9d9-66c7-4b8515de3809@web.de Signed-off-by: Vinod Koul commit fcf8adb787073ba6c673c1bb9900a059c7f6676f Author: Yoshihiro Shimoda Date: Mon Sep 9 15:34:52 2019 +0900 dmaengine: rcar-dmac: Add dma-channel-mask property support This patch adds dma-channel-mask property support not to reserve some DMA channels for some reasons. (for example: a heterogeneous CPU uses it.) Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1568010892-17606-5-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul commit d832c481bff39a28eb7e9b28485b749cab6b29b3 Author: Yoshihiro Shimoda Date: Mon Sep 9 15:34:51 2019 +0900 dmaengine: rcar-dmac: Use devm_platform_ioremap_resource() This patch uses devm_platform_ioremap_resource() instead of using platform_get_resource() and devm_ioremap_resource() together to simplify. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/1568010892-17606-4-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul commit 2df4a02a9cebaac054c1acd9b6841dd99526500d Author: Yoshihiro Shimoda Date: Mon Sep 9 15:34:50 2019 +0900 dmaengine: rcar-dmac: Use of_data values instead of a macro Since we will have changed memory mapping of the DMAC in the future, this patch uses of_data values instead of a macro to calculate each channel's base offset. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/1568010892-17606-3-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul commit 1378259773db247cd2bf754b305d463784ee707b Author: Wen He Date: Fri Sep 20 16:34:18 2019 +0800 arm64: dts: ls1028a: Update the clock providers for the Mali DP500 In order to maximise performance of the LCD Controller's 64-bit AXI bus, for any give speed bin of the device, the AXI master interface clock(ACLK) clock can be up to CPU_frequency/2, which is already capable of optimal performance. In general, ACLK is always expected to be equal to CPU_frequency/2. APB slave interface clock(PCLK) and Main processing clock(PCLK) both are tied to the same clock as ACLK. This change followed the LS1028A Architecture Specification Manual. Signed-off-by: Wen He Acked-by: Li Yang Signed-off-by: Shawn Guo commit 97856e59384de326174360a780038113fea19f42 Merge: 40688bd58df7 4f5cafb5cb84 Author: Greg Kroah-Hartman Date: Mon Oct 14 07:36:49 2019 +0200 Merge 5.4-rc3 into char-misc-next We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 7ca932e441325f4fb1444c568446b4338ff28ae7 Merge: d1a1af2cdf19 4f5cafb5cb84 Author: Greg Kroah-Hartman Date: Mon Oct 14 07:32:24 2019 +0200 Merge 5.4-rc3 into tty-next We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit bf7c1d95af67254957d1820ac112397001e1a9a9 Merge: 1141a7522e39 4f5cafb5cb84 Author: Greg Kroah-Hartman Date: Mon Oct 14 07:09:59 2019 +0200 Merge 5.4-rc3 into usb-next we want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 27d6e47f8e133167af51a3e39548cd3e9bed07da Merge: 9dc86c234e84 4f5cafb5cb84 Author: Greg Kroah-Hartman Date: Mon Oct 14 07:07:36 2019 +0200 Merge 5.4-rc3 into staging-next We want the staging driver fixes in here as well to build on and test with. Signed-off-by: Greg Kroah-Hartman commit f2e5c49d221bd46c72d363ae595e47268bd1f420 Author: Icenowy Zheng Date: Wed Oct 2 19:25:44 2019 +0800 power: supply: axp20x_usb_power: enable USB BC detection on AXP813 The AXP813 PMIC has support for detection of USB Battery Charging specification, and it will limit the current to 500mA by default when the detection is not enabled or the detection result is SDP. Enable the BC detection to allow correctly selection of the current. Signed-off-by: Icenowy Zheng Signed-off-by: Sebastian Reichel commit 1f6c62ca8f8d7b2b4c9f9a13dc1be1be37555688 Author: Nickey Yang Date: Thu Oct 10 11:44:52 2019 +0800 drm/rockchip: vop: add the definition of dclk_pol Some VOP's (such as px30) dclk_pol bit is at the last. So it is necessary to distinguish dclk_pol and pin_pol. Signed-off-by: Nickey Yang Reviewed-by: Sandy Huang Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191010034452.20260-2-nickey.yang@rock-chips.com commit c7337670ef2a681c40711de6e90511e6b926ab3d Author: Ben Dooks Date: Wed Oct 9 13:10:22 2019 +0100 drm/rockchip: make rockchip_gem_alloc_object static The rockchip_gem_alloc_object function is not exported so make it static to avoid the following sparse warning: drivers/gpu/drm/rockchip/rockchip_drm_gem.c:297:28: warning: symbol 'rockchip_gem_alloc_object' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191009121022.17478-1-ben.dooks@codethink.co.uk commit b02516b6cde7aae89df58e33e091f5ce90a1b118 Author: Ben Dooks Date: Wed Oct 9 14:21:34 2019 +0100 drm/rockchip: include rockchip_drm_drv.h Include rockchip_drm_drv.h for definition of vop_platform_driver to avoid the following sparse warning: drivers/gpu/drm/rockchip/rockchip_vop_reg.c:982:24: warning: symbol 'vop_platform_driver' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191009132134.18384-1-ben.dooks@codethink.co.uk commit 9abdcff7205899d38213e69287fb63e6c87e2fc8 Author: Markus Elfring Date: Sat Sep 21 20:32:25 2019 +0200 drm/rockchip: rk3066_hdmi: Use devm_platform_ioremap_resource() in rk3066_hdmi_bind() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/0666bc0b-6624-21a0-47c4-b78e2a3b3ad5@web.de commit 463c5ac0300ad4a85982cfc0b40585b07df01fc7 Author: Ezequiel Garcia Date: Thu Oct 10 16:43:51 2019 -0300 ARM: dts: rockchip: Add RK3288 VOP gamma LUT address RK3288 SoC VOPs have optional support Gamma LUT setting, which requires specifying the Gamma LUT address in the devicetree. Signed-off-by: Ezequiel Garcia Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20191010194351.17940-4-ezequiel@collabora.com Signed-off-by: Heiko Stuebner commit 7e0d15ee0d8ba28a41ed02c8d2c1c17124b13234 Merge: cb0ce18aaf4c 7dfd8ac32730 Author: David S. Miller Date: Sun Oct 13 11:29:07 2019 -0700 Merge tag 'mac80211-next-for-net-next-2019-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== A few more small things, nothing really stands out: * minstrel improvements from Felix * a TX aggregation simplification * some additional capabilities for hwsim * minor cleanups & docs updates ==================== Signed-off-by: David S. Miller commit cb0ce18aaf4c08f1c5c60d8a09fcba34f63f6f51 Author: Michal Kubecek Date: Fri Oct 11 09:40:09 2019 +0200 genetlink: do not parse attributes for families with zero maxattr Commit c10e6cf85e7d ("net: genetlink: push attrbuf allocation and parsing to a separate function") moved attribute buffer allocation and attribute parsing from genl_family_rcv_msg_doit() into a separate function genl_family_rcv_msg_attrs_parse() which, unlike the previous code, calls __nlmsg_parse() even if family->maxattr is 0 (i.e. the family does its own parsing). The parser error is ignored and does not propagate out of genl_family_rcv_msg_attrs_parse() but an error message ("Unknown attribute type") is set in extack and if further processing generates no error or warning, it stays there and is interpreted as a warning by userspace. Dumpit requests are not affected as genl_family_rcv_msg_dumpit() bypasses the call of genl_family_rcv_msg_attrs_parse() if family->maxattr is zero. Move this logic inside genl_family_rcv_msg_attrs_parse() so that we don't have to handle it in each caller. v3: put the check inside genl_family_rcv_msg_attrs_parse() v2: adjust also argument of genl_family_rcv_msg_attrs_free() Fixes: c10e6cf85e7d ("net: genetlink: push attrbuf allocation and parsing to a separate function") Signed-off-by: Michal Kubecek Acked-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit c208bdb93788cfd7982c35480f98e75d658719a7 Author: Soheil Hassas Yeganeh Date: Thu Oct 10 23:27:02 2019 -0400 tcp: improve recv_skip_hint for tcp_zerocopy_receive tcp_zerocopy_receive() rounds down the zc->length a multiple of PAGE_SIZE. This results in two issues: - tcp_zerocopy_receive sets recv_skip_hint to the length of the receive queue if the zc->length input is smaller than the PAGE_SIZE, even though the data in receive queue could be zerocopied. - tcp_zerocopy_receive would set recv_skip_hint of 0, in cases where we have a little bit of data after the perfectly-sized packets. To fix these issues, do not store the rounded down value in zc->length. Round down the length passed to zap_page_range(), and return min(inq, zc->length) when the zap_range is 0. Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit c2fba936d3047fc5ea1458549daa19844ef243a4 Author: Chris Wilson Date: Sun Oct 13 10:52:11 2019 +0100 drm/i915/perf: Avoid polluting the i915_oa_config with error pointers Use a local variable to track the allocation errors to avoid polluting the struct and keep the free simple. Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191013095211.2922-1-chris@chris-wilson.co.uk commit bbc6089cebfc46c79a510924c0b080529231a015 Merge: a9336ddf448b 2272905a4580 Author: Michael Ellerman Date: Sun Oct 13 21:21:06 2019 +1100 Merge branch 'fixes' into next Merge our fixes branch, to bring in the fixes for the KVM PCR bug and the spufs crash. commit 9dc86c234e845a5f60c5af013e647795c784df87 Merge: c86673e88419 a521d52d1eb2 Author: Greg Kroah-Hartman Date: Sun Oct 13 10:59:05 2019 +0200 Merge tag 'iio-for-5.5a-take3' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of IIO new device support, cleanups and features for the 5.5 cycle Third version with the adis rework set dropped as better to just have a fresh version of that at some future date. The usual mixed backs of new device support being added to drivers, long term reworks continuing and little per driver cleanups and features. Also a few trivial counter subsystem tidy ups on behalf of William. Core new feature * Device label support. A long requested feature no one got around to implementing before. Allows DT based provision of a 'label' that identifies a device uniquely within a system. This differs from existing 'name' which is meant to be the part number. New device support * ingenic-adc - Support for the JZ4770 SoC ADC including bindings. * inv_mpu6050 - Add support for magnetometer in MPU925x parts. Fiddly to do as this is actually a separate device sitting inside the package, but with the master device being able to schedule reads etc. Will only run if the auxiliary bus is not in use for any other devices. Features * ad7192 - Userspace calibration controls to do zero and full scale. * st_lsm6dsx - Enable latched interrupts by default for sensors events with related clear. - Motion events and related wakeup source. This needed quite a bit of refactoring as well. Cleanups and minor features * ad7192 - sysfs ABI docs * ad7949 - Remove code to readback configuration word as driver never actually enabled it. - Fix incorrect xfer length. Not actually known to cause problems other than wasted bus usage. * adis16080 - Replace core mlock usage with local lock with more appropriate scope. * adis16130 - Remove pointless mlock usage. * adis16240 - Remove include of gpio.h as no gpio usage. * atlas-ph-sensor - Improve logical ordering of buffer predisable / postenable functions. This is part of a longer term rework Alexandru is driving towards. * bh1750 - Fix up a static compiler warning and make the code more readable. - yaml conversion of binding + MAINTAINERS entry. * bmp280 - Drop a stray newline. * cm36651 - Drop a redundant assignment * itg3200 - Alignment cleanup. * max31856 - Add missing of_node and parent references, useful to identify the device. * sc27xx_adc - Use devm_hwspin_lock_request_specific rather than local rolled version. * stm32-lptimer counter - kernel-doc warning. * stm32-timer counter - kernel-doc warning. - Alignment cleanup. * sx9500 - Improve logical ordering of buffer predisable / postenable functions. This is part of a longer term rework Alexandru is driving towards. * tcs3414 - Improve logical ordering of buffer predisable / postenable functions. This is part of a longer term rework Alexandru is driving towards. * tag 'iio-for-5.5a-take3' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (41 commits) iio: pressure: bmp280: remove stray newline iio: adc: sc27xx: Use devm_hwspin_lock_request_specific() to simplify code iio: chemical: atlas-ph-sensor: fix iio_triggered_buffer_predisable() position iio: gyro: clean up indentation issue counter: stm32: clean up indentation issue iio: proximity: sx9500: fix iio_triggered_buffer_{predisable,postenable} positions iio: core: Add optional symbolic label to device attributes dt-binding: iio: Add optional label property iio: gyro: adis16080: replace mlock with own lock counter: stm32-lptimer-cnt: fix a kernel-doc warning counter: stm32-timer-cnt: fix a kernel-doc warning iio: gyro: adis16130: remove mlock usage MAINTAINERS: add entry for ROHM BH1750 driver dt-bindings: iio: light: bh1750: convert bindings to yaml iio: imu: st_lsm6dsx: add motion report function and call from interrupt iio: imu: st_lsm6dsx: always enter interrupt thread iio: imu: st_lsm6dsx: add wakeup-source option iio: imu: st_lsm6dsx: add motion events iio: imu: st_lsm6dsx: move interrupt thread to core iio: imu: inv_mpu6050: add fifo support for magnetometer data ... commit c86673e884199206c46d356551288d91a53e7b1a Author: Wambui Karuga Date: Thu Oct 10 16:20:58 2019 +0300 staging: rtl8723bs: Remove comparison to NULL Remove comparison to NULL in drivers/staging/rtl8723bs/core/rtw_ap.c:1449. Issue found by checkpatch.pl Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/20191010132058.20887-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 91d6f911b348dcb8e22d87913f4a0f52e646e990 Author: Michael Hennerich Date: Fri Oct 11 14:24:41 2019 +0300 staging: fbtft: fbtft-core: Fix last line displayed on fbcon For the special case when fbtft_mkdirty() is called with with -1 for the y coordinate, the height is truncated by 1. This isn't required, and causes the last line to not update. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20191011112441.31003-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit f152f52c308dbaf41f3874805f9a2811f96730da Author: Jules Irenge Date: Sat Oct 12 16:18:05 2019 +0100 staging: vc04_services: place the AND operator at the end of the previous line Place the AND logical operator at the end of the previous line; to fix warning of "Logical continuations should be on the previous line". Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191012151805.17988-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit a521d52d1eb20265e830d155ff684453ea229c86 Author: Bartosz Golaszewski Date: Wed Oct 2 10:57:58 2019 +0200 iio: pressure: bmp280: remove stray newline Remove a stray newline from the probe callback. Signed-off-by: Bartosz Golaszewski Signed-off-by: Jonathan Cameron commit 420119fcc5543bce406d8322ddcecf7081f3f249 Author: Baolin Wang Date: Fri Sep 27 10:41:19 2019 +0800 iio: adc: sc27xx: Use devm_hwspin_lock_request_specific() to simplify code Change to use devm_hwspin_lock_request_specific() to help to simplify the cleanup code for drivers requesting one hwlock. Signed-off-by: Baolin Wang Signed-off-by: Jonathan Cameron commit 0c8a6e72f3c04bfe92a64e5e0791bfe006aabe08 Author: Alexandru Ardelean Date: Fri Sep 20 10:31:22 2019 +0300 iio: chemical: atlas-ph-sensor: fix iio_triggered_buffer_predisable() position The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. The iio_triggered_buffer_predisable() should be called last, to detach the poll func after the devices has been suspended. The position of iio_triggered_buffer_postenable() is correct. Note this is not stable material. It's a fix in the logical model rather fixing an actual bug. These are being tidied up throughout the subsystem to allow more substantial rework that was blocked by variations in how things were done. Signed-off-by: Alexandru Ardelean Acked-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit b8fc345d6b5d661e1125bd6a0e30b6fabf1a076e Merge: c2383d398ed9 598dc04fa0f1 Author: Alexei Starovoitov Date: Sat Oct 12 16:15:10 2019 -0700 Merge branch 'selftests-bpf-Makefile-cleanup' Andrii Nakryiko says: ==================== Patch #1 enforces libbpf build to have bpf_helper_defs.h ready before test BPF programs are built. Patch #2 drops obsolete BTF/pahole detection logic from Makefile. v1->v2: - drop CPU and PROBE (Martin). ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 598dc04fa0f131371cb120f2bf4e594f42f00057 Author: Andrii Nakryiko Date: Fri Oct 11 15:01:46 2019 -0700 selftests/bpf: Remove obsolete pahole/BTF support detection Given lots of selftests won't work without recent enough Clang/LLVM that fully supports BTF, there is no point in maintaining outdated BTF support detection and fall-back to pahole logic. Just assume we have everything we need. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191011220146.3798961-3-andriin@fb.com commit 3fbe31ae7ec4ec284a908cef7218f19e951ee55b Author: Andrii Nakryiko Date: Fri Oct 11 15:01:45 2019 -0700 selftests/bpf: Enforce libbpf build before BPF programs are built Given BPF programs rely on libbpf's bpf_helper_defs.h, which is auto-generated during libbpf build, libbpf build has to happen before we attempt progs/*.c build. Enforce it as order-only dependency. Fixes: 24f25763d6de ("libbpf: auto-generate list of BPF helper definitions") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191011220146.3798961-2-andriin@fb.com commit c2383d398ed97390cdcc3042cfe724ea39188c99 Merge: e78dcbf41454 1600c9c26f6b Author: Alexei Starovoitov Date: Sat Oct 12 16:09:00 2019 -0700 Merge branch 'samples-cross-compile' Ivan Khoronzhuk says: ==================== This series contains mainly fixes/improvements for cross-compilation but not only, tested for arm, arm64, and intended for any arch. Also verified on native build (not cross compilation) for x86_64 and arm, arm64. Initial RFC link: https://lkml.org/lkml/2019/8/29/1665 Prev. version: https://lkml.org/lkml/2019/10/9/1045 Besides the patches given here, the RFC also contains couple patches related to llvm clang arm: include: asm: swab: mask rev16 instruction for clang arm: include: asm: unified: mask .syntax unified for clang They are necessarily to verify arm 32 build. Also, couple more fixes were added but are not merged in bpf-next yet, they can be needed for verification/configuration steps, if not in your tree the fixes can be taken here: https://www.spinics.net/lists/netdev/msg601716.html https://www.spinics.net/lists/netdev/msg601714.html https://www.spinics.net/lists/linux-kbuild/msg23468.html Now, to build samples, SAMPLE_BPF should be enabled in config. The change touches not only cross-compilation and can have impact on other archs and build environments, so might be good idea to verify it in order to add appropriate changes, some warn options could be tuned also. All is tested on x86-64 with clang installed (has to be built containing targets for arm, arm64..., see llc --version, usually it's present already) Instructions to test native on x86_64 ================================================= Native build on x86_64 is done in usual way and shouldn't have difference except HOSTCC is now printed as CC wile building the samples. Instructions to test cross compilation on arm64 ================================================= gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) I've used sdk for TI am65x got here: http://downloads.ti.com/processor-sdk-linux/esd/AM65X/latest/exports/\ ti-processor-sdk-linux-am65xx-evm-06.00.00.07-Linux-x86-Install.bin make ARCH=arm64 -C tools/ clean make ARCH=arm64 -C samples/bpf clean make ARCH=arm64 clean make ARCH=arm64 defconfig make ARCH=arm64 headers_install make ARCH=arm64 INSTALL_HDR_PATH=/../sdk/\ ti-processor-sdk-linux-am65xx-evm-06.00.00.07/linux-devkit/sysroots/\ aarch64-linux/usr headers_install make samples/bpf/ ARCH=arm64 CROSS_COMPILE="aarch64-linux-gnu-"\ SYSROOT="/../sdk/ti-processor-sdk-linux-am65xx-evm-06.00.00.07/\ linux-devkit/sysroots/aarch64-linux" Instructions to test cross compilation on arm ================================================= arm-linux-gnueabihf-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011 or arm-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 \ (arm-rel-8.36)) 8.3.0 http://downloads.ti.com/processor-sdk-linux/esd/AM57X/05_03_00_07/exports/\ ti-processor-sdk-linux-am57xx-evm-05.03.00.07-Linux-x86-Install.bin make ARCH=arm -C tools/ clean make ARCH=arm -C samples/bpf clean make ARCH=arm clean make ARCH=arm omap2plus_defconfig make ARCH=arm headers_install make ARCH=arm INSTALL_HDR_PATH=/../sdk/\ ti-processor-sdk-linux-am57xx-evm-05.03.00.07/linux-devkit/sysroots/\ armv7ahf-neon-linux-gnueabi/usr headers_install make samples/bpf/ ARCH=arm CROSS_COMPILE="arm-linux-gnueabihf-"\ SYSROOT="/../sdk/ti-processor-sdk-linux-am57xx-evm-05.03\ .00.07/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi" Based on bpf-next/master v5..v4: - any changes, only missed SOBs are added v4..v3: - renamed CLANG_EXTRA_CFLAGS on BPF_EXTRA_CFLAGS - used filter for ARCH_ARM_SELECTOR - omit "-fomit-frame-pointer" and use same flags for native and "cross" - used sample/bpf prefixes - use C instead of C++ compiler for test_libbpf target v3..v2: - renamed makefile.progs to makeifle.target, as more appropriate - left only __LINUX_ARM_ARCH__ for D options for arm - for host build - left options from KBUILD_HOST for compatibility reasons - split patch adding c/cxx/ld flags to libbpf by modules - moved readme change to separate patch - added patch setting options for cross-compile - fixed issue with option error for syscall_nrs.S, avoiding overlap for ccflags-y. v2..v1: - restructured patches order - split "samples: bpf: Makefile: base progs build on Makefile.progs" to make change more readable. It added couple nice extra patches. - removed redundant patch: "samples: bpf: Makefile: remove target for native build" - added fix: "samples: bpf: makefile: fix cookie_uid_helper_example obj build" - limited -D option filter only for arm - improved comments - added couple instructions to verify cross compilation for arm and arm64 arches based on TI am57xx and am65xx sdks. - corrected include a little order ==================== Tested-by: Ilias Apalodimas Signed-off-by: Alexei Starovoitov commit 1600c9c26f6bbdd29fb1b44f13fb751846d2ebe8 Author: Ivan Khoronzhuk Date: Fri Oct 11 03:28:08 2019 +0300 samples/bpf: Add preparation steps and sysroot info to readme Add couple preparation steps: clean and configuration. Also add newly added sysroot support info to cross-compile section. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191011002808.28206-16-ivan.khoronzhuk@linaro.org commit b2327c107d6255e4ea591042120514bedcdc616a Author: Ivan Khoronzhuk Date: Fri Oct 11 03:28:07 2019 +0300 samples/bpf: Add sysroot support Basically it only enables that was added by previous couple fixes. Sysroot contains correct libs installed and its headers. Useful when working with NFC or virtual machine. Usage example: clean (on demand) make ARCH=arm -C samples/bpf clean make ARCH=arm -C tools clean make ARCH=arm clean configure and install headers: make ARCH=arm defconfig make ARCH=arm headers_install build samples/bpf: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- samples/bpf/ \ SYSROOT="path/to/sysroot" Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191011002808.28206-15-ivan.khoronzhuk@linaro.org commit d8ceae91e9f031232d225a7159cca36e9eefdf85 Author: Ivan Khoronzhuk Date: Fri Oct 11 03:28:06 2019 +0300 samples/bpf: Provide C/LDFLAGS to libbpf In order to build lib using C/LD flags of target arch, provide them to libbpf make. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191011002808.28206-14-ivan.khoronzhuk@linaro.org commit 793a349cd8192ad67c784d231011591a57eac001 Author: Ivan Khoronzhuk Date: Fri Oct 11 03:28:05 2019 +0300 libbpf: Add C/LDFLAGS to libbpf.so and test_libpf targets In case of C/LDFLAGS there is no way to pass them correctly to build command, for instance when --sysroot is used or external libraries are used, like -lelf, wich can be absent in toolchain. This can be used for samples/bpf cross-compiling allowing to get elf lib from sysroot. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191011002808.28206-13-ivan.khoronzhuk@linaro.org commit 5c26f9a783581058c5de93627ae64139c4b32ceb Author: Ivan Khoronzhuk Date: Fri Oct 11 03:28:04 2019 +0300 libbpf: Don't use cxx to test_libpf target No need to use C++ for test_libbpf target when libbpf is on C and it can be tested with C, after this change the CXXFLAGS in makefiles can be avoided, at least in bpf samples, when sysroot is used, passing same C/LDFLAGS as for lib. Add "return 0" in test_libbpf to avoid warn, but also remove spaces at start of the lines to keep same style and avoid warns while apply. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191011002808.28206-12-ivan.khoronzhuk@linaro.org commit a833effa15903d07946645fc5e76b3b18a591409 Author: Ivan Khoronzhuk Date: Fri Oct 11 03:28:03 2019 +0300 samples/bpf: Use target CC environment for HDR_PROBE No need in hacking HOSTCC to be cross-compiler any more, so drop this trick and use target CC for HDR_PROBE. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191011002808.28206-11-ivan.khoronzhuk@linaro.org commit 10cb3d8706dbaa0521e761b96b3be5b7a497ae3f Author: Ivan Khoronzhuk Date: Fri Oct 11 03:28:02 2019 +0300 samples/bpf: Use own flags but not HOSTCFLAGS While compiling natively, the host's cflags and ldflags are equal to ones used from HOSTCFLAGS and HOSTLDFLAGS. When cross compiling it should have own, used for target arch. While verification, for arm, arm64 and x86_64 the following flags were used always: -Wall -O2 -fomit-frame-pointer -Wmissing-prototypes -Wstrict-prototypes So, add them as they were verified and used before adding Makefile.target and lets omit "-fomit-frame-pointer" as were proposed while review, as no sense in such optimization for samples. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191011002808.28206-10-ivan.khoronzhuk@linaro.org commit 1d97c6c2511f10e19f683a4431e8ee887c1daab6 Author: Ivan Khoronzhuk Date: Fri Oct 11 03:28:01 2019 +0300 samples/bpf: Base target programs rules on Makefile.target The main reason for that - HOSTCC and CC have different aims. HOSTCC is used to build programs running on host, that can cross-comple target programs with CC. It was tested for arm and arm64 cross compilation, based on linaro toolchain, but should work for others. So, in order to split cross compilation (CC) with host build (HOSTCC), lets base samples on Makefile.target. It allows to cross-compile samples/bpf programs with CC while auxialry tools running on host built with HOSTCC. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191011002808.28206-9-ivan.khoronzhuk@linaro.org commit 752677e89fca11fd6e239df2fb9877b9e6b83ab2 Author: Ivan Khoronzhuk Date: Fri Oct 11 03:28:00 2019 +0300 samples/bpf: Add makefile.target for separate CC target build The Makefile.target is added only and will be used in sample/bpf/Makefile later in order to switch cross-compiling to CC from HOSTCC environment. The HOSTCC is supposed to build binaries and tools running on the host afterwards, in order to simplify build or so, like "fixdep" or else. In case of cross compiling "fixdep" is executed on host when the rest samples should run on target arch. In order to build binaries for target arch with CC and tools running on host with HOSTCC, lets add Makefile.target for simplicity, having definition and routines similar to ones, used in script/Makefile.host. This allows later add cross-compilation to samples/bpf with minimum changes. The tprog stands for target programs built with CC. Makefile.target contains only stuff needed for samples/bpf, potentially can be reused later and now needed only for unblocking tricky samples/bpf cross compilation. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191011002808.28206-8-ivan.khoronzhuk@linaro.org commit 54b7fbd4484bdf8a13045abdf57a66185390f07f Author: Ivan Khoronzhuk Date: Fri Oct 11 03:27:59 2019 +0300 samples/bpf: Drop unnecessarily inclusion for bpf_load Drop inclusion for bpf_load -I$(objtree)/usr/include as it is included for all objects anyway, with above line: KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191011002808.28206-7-ivan.khoronzhuk@linaro.org commit 0e865aedad571b93b2d8bb780f17befd5ee4b308 Author: Ivan Khoronzhuk Date: Fri Oct 11 03:27:58 2019 +0300 samples/bpf: Use __LINUX_ARM_ARCH__ selector for arm For arm, -D__LINUX_ARM_ARCH__=X is min version used as instruction set selector and is absolutely required while parsing some parts of headers. It's present in KBUILD_CFLAGS but not in autoconf.h, so let's retrieve it from and add to programs cflags. In another case errors like "SMP is not supported" for armv7 and bunch of other errors are issued resulting to incorrect final object. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191011002808.28206-6-ivan.khoronzhuk@linaro.org commit 2a560df7c147abcced2ff8c3b5572e0b1b36ac3f Author: Ivan Khoronzhuk Date: Fri Oct 11 03:27:57 2019 +0300 samples/bpf: Use own EXTRA_CFLAGS for clang commands It can overlap with CFLAGS used for libraries built with gcc if not now then in next patches. Correct it here for simplicity. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191011002808.28206-5-ivan.khoronzhuk@linaro.org commit 518c13401e16eae1d83d6e459daf6e776a97eba9 Author: Ivan Khoronzhuk Date: Fri Oct 11 03:27:56 2019 +0300 samples/bpf: Use --target from cross-compile For cross compiling the target triple can be inherited from cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile. So copy-paste this decision from kernel Makefile. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191011002808.28206-4-ivan.khoronzhuk@linaro.org commit 39e0c3649f2ef5fc1beac4f6cc5f5f9ddb1885a9 Author: Ivan Khoronzhuk Date: Fri Oct 11 03:27:55 2019 +0300 samples/bpf: Fix cookie_uid_helper_example obj build Don't list userspace "cookie_uid_helper_example" object in list for bpf objects. 'always' target is used for listing bpf programs, but 'cookie_uid_helper_example.o' is a user space ELF file, and covered by rule `per_socket_stats_example`, so shouldn't be in 'always'. Let us remove `always += cookie_uid_helper_example.o`, which avoids breaking cross compilation due to mismatched includes. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191011002808.28206-3-ivan.khoronzhuk@linaro.org commit cdd5b2d1fc86f8dda383d4f0b4ac9b533539e76a Author: Ivan Khoronzhuk Date: Fri Oct 11 03:27:54 2019 +0300 samples/bpf: Fix HDR_PROBE "echo" echo should be replaced with echo -e to handle '\n' correctly, but instead, replace it with printf as some systems can't handle echo -e. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191011002808.28206-2-ivan.khoronzhuk@linaro.org commit 9dd422f69777b928f8a12e5392d4aeeb00a55c2b Author: Paul Burton Date: Sat Oct 12 20:43:38 2019 +0000 MIPS: Make builtin_cmdline const & variable length We have no need for the builtin_cmdline array to be fixed at the length of COMMAND_LINE_SIZE - we'll only copy out the string it contains up to its NULL terminator anyway, and cap the size at COMMAND_LINE_SIZE when copying into or concatenating with boot_command_line. The string value is also constant, so we can declare it as such to place it in the .init.rodata section. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org commit 972727766ee4d9e8b455c09e8dcb1e7dc14c4967 Author: Paul Burton Date: Sat Oct 12 20:43:37 2019 +0000 MIPS: Fix CONFIG_OF_EARLY_FLATTREE=n builds Configurations with CONFIG_OF_EARLY_FLATTREE=n fail to build since commit 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line initialization") because of_scan_flat_dt() & of_scan_flat_dt() are not defined in these configurations. Fix this by #ifdef'ing the affected code... Signed-off-by: Paul Burton Fixes: 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line initialization") Reported-by: kbuild test robot Cc: linux-mips@vger.kernel.org commit b7340422cc16c5deff100812f38114bb5ec81203 Author: Paul Burton Date: Sat Oct 12 20:43:36 2019 +0000 MIPS: Always define builtin_cmdline Commit 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line initialization") made use of builtin_cmdline conditional upon plain C if statements rather than preprocessor #ifdef's. This caused build failures for configurations with CONFIG_CMDLINE_BOOL=n where builtin_cmdline wasn't defined, for example: arch/mips/kernel/setup.c: In function 'bootcmdline_init': >> arch/mips/kernel/setup.c:582:30: error: 'builtin_cmdline' undeclared (first use in this function); did you mean 'builtin_driver'? strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); ^~~~~~~~~~~~~~~ builtin_driver arch/mips/kernel/setup.c:582:30: note: each undeclared identifier is reported only once for each function it appears in Fix this by defining builtin_cmdline as an empty string in the affected configurations. All of the paths that use it should be optimized out anyway so the data itself gets optimized away too. Signed-off-by: Paul Burton Fixes: 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line initialization") Reported-by: kbuild test robot Reported-by: Nathan Chancellor Cc: linux-mips@vger.kernel.org commit 5f5c382ecfdd06e17316d1c9f1362522c20cdfef Author: Chris Wilson Date: Sat Oct 12 10:10:56 2019 +0100 drm/i915/perf: Prefer using the pinned_ctx for emitting delays on config When we are watching a particular context, we want the OA config to be applied inline with that context such that it takes effect before the next submission. Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191012091056.28686-1-chris@chris-wilson.co.uk commit 15d0ace1f876e01b9745cb22ee32e3770fe3a6d5 Author: Lionel Landwerlin Date: Sat Oct 12 08:23:08 2019 +0100 drm/i915/perf: execute OA configuration from command stream We haven't run into issues with programming the global OA/NOA registers configuration from CPU so far, but HW engineers actually recommend doing this from the command streamer. On TGL in particular one of the clock domain in which some of that programming goes might not be powered when we poke things from the CPU. Since we have a command buffer prepared for the execbuffer side of things, we can reuse that approach here too. This also allows us to significantly reduce the amount of time we hold the main lock. v2: Drop the global lock as much as possible v3: Take global lock to pin global v4: Create i915 request in emit_oa_config() to avoid deadlocks (Lionel) v5: Move locking to the stream (Lionel) v6: Move active reconfiguration request into i915_perf_stream (Lionel) v7: Pin VMA outside request creation (Chris) Lock VMA before move to active (Chris) v8: Fix double free on stream->initial_oa_config_bo (Lionel) Don't allow interruption when waiting on active config request (Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191012072308.30312-3-chris@chris-wilson.co.uk commit daed3e44396d178cf2098b754bb8ef5ca4e918bc Author: Lionel Landwerlin Date: Sat Oct 12 08:23:07 2019 +0100 drm/i915/perf: implement active wait for noa configurations NOA configuration take some amount of time to apply. That amount of time depends on the size of the GT. There is no documented time for this. For example, past experimentations with powergating configuration changes seem to indicate a 60~70us delay. We go with 500us as default for now which should be over the required amount of time (according to HW architects). v2: Don't forget to save/restore registers used for the wait (Chris) v3: Name used CS_GPR registers (Chris) Fix compile issue due to rebase (Lionel) v4: Fix save/restore helpers (Umesh) v5: Move noa_wait from drm_i915_private to i915_perf_stream (Lionel) v6: Add missing struct declarations in i915_perf.h Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191012072308.30312-2-chris@chris-wilson.co.uk commit 6a45008ab7bb5e13b543de0c141b94aaa71d8397 Author: Lionel Landwerlin Date: Sat Oct 12 08:23:06 2019 +0100 drm/i915/perf: allow for CS OA configs to be created lazily Here we introduce a mechanism by which the execbuf part of the i915 driver will be able to request that a batch buffer containing the programming for a particular OA config be created. We'll execute these OA configuration buffers right before executing a set of userspace commands so that a particular user batchbuffer be executed with a given OA configuration. This mechanism essentially allows the userspace driver to go through several OA configuration without having to open/close the i915/perf stream. v2: No need for locking on object OA config object creation (Chris) Flush cpu mapping of OA config (Chris) v3: Properly deal with the perf_metric lock (Chris/Lionel) v4: Fix oa config unref/put when not found (Lionel) v5: Allocate BOs for configurations on the stream instead of globally (Lionel) v6: Fix 64bit division (Chris) v7: Store allocated config BOs into the stream (Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191012072308.30312-1-chris@chris-wilson.co.uk commit c3eb54aad982d05493ab374a6f0d0a6831dd2c6e Author: Chris Wilson Date: Sat Oct 12 08:01:36 2019 +0100 drm/i915: Mark up "sentinel" requests Sometimes we want to emit a terminator request, a request that flushes the pipeline and allows no request to come after it. This can be used for a "preempt-to-idle" to ensure that upon processing the context-switch to that request, all other active contexts have been flushed. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191012070136.32058-1-chris@chris-wilson.co.uk commit d8ad5f52617b8a74cb3a511d06e24115360761c6 Author: Chris Wilson Date: Fri Oct 11 20:03:25 2019 +0100 drm/i915/execlists: Prevent merging requests with conflicting flags We set out-of-bound parameters inside the i915_requests.flags field, such as disabling preemption or marking the end-of-context. We should not coalesce consecutive requests if they have differing instructions as we only inspect the last active request in a context. Thus if we allow a later request to be merged into the same execution context, it will mask any of the earlier flags. References: 2a98f4e65bba ("drm/i915: add infrastructure to hold off preemption on a request") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191011190325.10979-9-chris@chris-wilson.co.uk commit a5efcde69b112d276416f8e6e5e9fd8ede13bfc5 Author: Chris Wilson Date: Fri Oct 11 20:03:17 2019 +0100 drm/i915/perf: Replace global wakeref tracking with engine-pm As we now have a specific engine to use OA on, exchange the top-level runtime-pm wakeref with the engine-pm. This still results in the same top-level runtime-pm, but with more nuances to keep the engine and its gt awake. Signed-off-by: Chris Wilson Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191011190325.10979-1-chris@chris-wilson.co.uk commit 524900a212f419ed4a73c909b2c957912d38f7c1 Merge: 1635520aefc1 9b88fc54965e Author: David S. Miller Date: Fri Oct 11 21:04:39 2019 -0700 Merge branch 'netdevsim-add-devlink-health-reporters-support' Jiri Pirko says: ==================== netdevsim: add devlink health reporters support This patchset adds support for devlink health reporter interface testing. First 2 patches are small dependencies of the last 2. ==================== Signed-off-by: David S. Miller commit 9b88fc54965e84666923999920ca1567f933c491 Author: Jiri Pirko Date: Thu Oct 10 15:18:51 2019 +0200 selftests: add netdevsim devlink health tests Add basic tests to verify functionality of netdevsim reporters. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 82c93a87bf8bc0cdb5ec2ab99da7d87715ff889f Author: Jiri Pirko Date: Thu Oct 10 15:18:50 2019 +0200 netdevsim: implement couple of testing devlink health reporters Implement "empty" and "dummy" reporters. The first one is really simple and does nothing. The other one has debugfs files to trigger breakage and it is able to do recovery. The ops also implement dummy fmsg content. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit e7a981050a7fb9a14b652365c00d9c5a025704ce Author: Jiri Pirko Date: Thu Oct 10 15:18:49 2019 +0200 devlink: propagate extack down to health reporter ops During health reporter operations, driver might want to fill-up the extack message, so propagate extack down to the health reporter ops. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 402818205c9ecdfd922fdfa58fb113f60fdda523 Author: Jiri Pirko Date: Thu Oct 10 15:18:48 2019 +0200 devlink: don't do reporter recovery if the state is healthy If reporter state is healthy, don't call into a driver for recover and don't increase recovery count. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 1635520aefc1056604ad60d042a64f43898c7108 Author: Peter Fink Date: Thu Oct 10 15:00:22 2019 +0200 net: usb: ax88179_178a: write mac to hardware in get_mac_addr When the MAC address is supplied via device tree or a random MAC is generated it has to be written to the asix chip in order to receive any data. Previously in 9fb137aef34e ("net: usb: ax88179_178a: allow optionally getting mac address from device tree") this line was omitted because it seemed to work perfectly fine without it. But it was simply not detected because the chip keeps the mac stored even beyond a reset and it was tested on a hardware with an integrated UPS where the asix chip was permanently powered on even throughout power cycles. Fixes: 9fb137aef34e ("net: usb: ax88179_178a: allow optionally getting mac address from device tree") Signed-off-by: Peter Fink Signed-off-by: David S. Miller commit 28e72b26ddeeef474ee9a8dd15df61b35ff557d8 Author: Vito Caputo Date: Wed Oct 9 21:08:24 2019 -0700 sock_get_timeout: drop unnecessary return variable Remove pointless use of size return variable by directly returning sizes. Signed-off-by: Vito Caputo Signed-off-by: David S. Miller commit 262ce0af81616b4be520ea7050ec1e31b80b5ab1 Author: Vito Caputo Date: Wed Oct 9 20:43:47 2019 -0700 af_unix: __unix_find_socket_byname() cleanup Remove pointless return variable dance. Appears vestigial from when the function did locking as seen in unix_find_socket_byinode(), but locking is handled in unix_find_socket_byname() for __unix_find_socket_byname(). Signed-off-by: Vito Caputo Signed-off-by: David S. Miller commit e001d28eeeff9d9906f2b2961cb3351227ad231a Merge: 41441d85b671 9bce4b27f3ec Author: David S. Miller Date: Fri Oct 11 20:37:38 2019 -0700 Merge branch 'net-ftgmac100-Ungate-RCLK-for-RMII-on-ASPEED-MACs' Andrew Jeffery says: ==================== net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs This series slightly extends the devicetree binding and driver for the FTGMAC100 to describe an optional RMII RCLK gate in the clocks property. Currently it's necessary for the kernel to ungate RCLK on the AST2600 in NCSI configurations as u-boot does not yet support NCSI (which uses the R(educed)MII). v2: * Clear up Reduced vs Reversed MII in the cover letter * Mitigate anxiety in the commit message for 1/3 * Clarify that AST2500 is also affected in the clocks property description in 2/3 * Rework the error paths and update some comments in 3/3 v1 can be found here: https://lore.kernel.org/netdev/20191008115143.14149-1-andrew@aj.id.au/ ==================== Signed-off-by: David S. Miller commit 9bce4b27f3ecd4b81648cb02ce8fd6d319676eb7 Author: Andrew Jeffery Date: Thu Oct 10 12:37:56 2019 +1030 net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs The 50MHz RCLK has to be enabled before the RMII interface will function. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: David S. Miller commit 042b86753a94cba2f2f702ccfd8f2c33092bfc22 Author: Andrew Jeffery Date: Thu Oct 10 12:37:55 2019 +1030 dt-bindings: net: ftgmac100: Describe clock properties Critically, the AST2600 requires ungating the RMII RCLK if e.g. NCSI is in use. Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: David S. Miller commit 6a3c52fe2906765e0161bba5f2460e23a42e1513 Author: Andrew Jeffery Date: Thu Oct 10 12:37:54 2019 +1030 dt-bindings: net: ftgmac100: Document AST2600 compatible The AST2600 contains an FTGMAC100-compatible MAC, although the MDIO controller previously embedded in the MAC has been moved out to a dedicated MDIO block. Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: David S. Miller commit cd9ba7b6e479ee5f71070f0c095f185e7cdc2eac Author: Chris Wilson Date: Fri Oct 11 20:36:20 2019 +0100 drm/i915/selftests: Serialise write to scratch with its vma binding Add the missing serialisation on the request for a write into a vma to wait until that vma is bound before being executed by the GPU. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191011193620.14026-1-chris@chris-wilson.co.uk commit e78dcbf414545b53218dab0fb5af5d6b61513eaf Author: Andrii Nakryiko Date: Thu Oct 10 20:29:01 2019 -0700 libbpf: Handle invalid typedef emitted by old GCC Old GCC versions are producing invalid typedef for __gnuc_va_list pointing to void. Special-case this and emit valid: typedef __builtin_va_list __gnuc_va_list; Reported-by: John Fastabend Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20191011032901.452042-1-andriin@fb.com commit 409017847d2014db8ab1da49dd48182af88344b7 Author: Andrii Nakryiko Date: Thu Oct 10 19:38:47 2019 -0700 libbpf: Generate more efficient BPF_CORE_READ code Existing BPF_CORE_READ() macro generates slightly suboptimal code. If there are intermediate pointers to be read, initial source pointer is going to be assigned into a temporary variable and then temporary variable is going to be uniformly used as a "source" pointer for all intermediate pointer reads. Schematically (ignoring all the type casts), BPF_CORE_READ(s, a, b, c) is expanded into: ({ const void *__t = src; bpf_probe_read(&__t, sizeof(*__t), &__t->a); bpf_probe_read(&__t, sizeof(*__t), &__t->b); typeof(s->a->b->c) __r; bpf_probe_read(&__r, sizeof(*__r), &__t->c); }) This initial `__t = src` makes calls more uniform, but causes slightly less optimal register usage sometimes when compiled with Clang. This can cascase into, e.g., more register spills. This patch fixes this issue by generating more optimal sequence: ({ const void *__t; bpf_probe_read(&__t, sizeof(*__t), &src->a); /* <-- src here */ bpf_probe_read(&__t, sizeof(*__t), &__t->b); typeof(s->a->b->c) __r; bpf_probe_read(&__r, sizeof(*__r), &__t->c); }) Fixes: 7db3822ab991 ("libbpf: Add BPF_CORE_READ/BPF_CORE_READ_INTO helpers") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191011023847.275936-1-andriin@fb.com commit baead859edbb3cd53b8e388c1f33641ce01d4c01 Author: Anton Ivanov Date: Fri Oct 11 09:43:03 2019 +0100 xdp: Trivial, fix spelling in function description Fix typo 'boolian' into 'boolean'. Signed-off-by: Anton Ivanov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191011084303.28418-1-anton.ivanov@cambridgegreys.com commit 2dedd7d2165565bafa89718eaadfc5d1a7865f66 Author: Andrii Nakryiko Date: Fri Oct 11 10:20:53 2019 -0700 bpf: Fix cast to pointer from integer of different size warning Fix "warning: cast to pointer from integer of different size" when casting u64 addr to void *. Fixes: a23740ec43ba ("bpf: Track contents of read-only maps as scalars") Reported-by: kbuild test robot Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191011172053.2980619-1-andriin@fb.com commit f97eea1756f383fefc147f4c76c54942944a3d95 Author: Jakub Sitnicki Date: Fri Oct 11 10:29:46 2019 +0200 selftests/bpf: Check that flow dissector can be re-attached Make sure a new flow dissector program can be attached to replace the old one with a single syscall. Also check that attaching the same program twice is prohibited. Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Reviewed-by: Stanislav Fomichev Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191011082946.22695-3-jakub@cloudflare.com commit 719b78a5674f15fef2e4a56484614657fd759978 Author: Jakub Sitnicki Date: Fri Oct 11 10:29:45 2019 +0200 flow_dissector: Allow updating the flow dissector program atomically It is currently not possible to detach the flow dissector program and attach a new one in an atomic fashion, that is with a single syscall. Attempts to do so will be met with EEXIST error. This makes updates to flow dissector program hard. Traffic steering that relies on BPF-powered flow dissection gets disrupted while old program has been already detached but the new one has not been attached yet. There is also a window of opportunity to attach a flow dissector to a non-root namespace while updating the root flow dissector, thus blocking the update. Lastly, the behavior is inconsistent with cgroup BPF programs, which can be replaced with a single bpf(BPF_PROG_ATTACH, ...) syscall without any restrictions. Allow attaching a new flow dissector program when another one is already present with a restriction that it can't be the same program. Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Reviewed-by: Stanislav Fomichev Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191011082946.22695-2-jakub@cloudflare.com commit 84a081f60db63aaae3665118203506aa09a7f94f Author: Eric Dumazet Date: Fri Oct 11 11:11:40 2019 -0700 bpf: Align struct bpf_prog_stats Do not risk spanning these small structures on two cache lines. Signed-off-by: Eric Dumazet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191011181140.2898-1-edumazet@google.com commit e400edb141d74aa2f04d0071aadb47fdb8f7ae55 Author: Rob Herring Date: Thu Sep 12 15:18:20 2019 +0100 checkpatch: Warn if DT bindings are not in schema format DT bindings are moving to using a json-schema based schema format instead of freeform text. Add a checkpatch.pl check to encourage using the schema for new bindings. It's not yet a requirement, but is progressively being required by some maintainers. Cc: Andy Whitcroft Cc: Joe Perches Signed-off-by: Rob Herring commit 4623e8bf1de0b86e23a56cdb39a72f054e89c3bd Author: Chris Lew Date: Wed Jun 27 18:19:57 2018 -0700 rpmsg: glink: Set tail pointer to 0 at end of FIFO When wrapping around the FIFO, the remote expects the tail pointer to be reset to 0 on the edge case where the tail equals the FIFO length. Fixes: caf989c350e8 ("rpmsg: glink: Introduce glink smem based transport") Cc: stable@vger.kernel.org Signed-off-by: Chris Lew Signed-off-by: Bjorn Andersson commit 54895010a893cdbf0aaf34fbd7719d750b557eb2 Author: Chris Wilson Date: Fri Oct 11 18:38:23 2019 +0100 drm/i915: Add an rcu_barrier option to i915_drop_caches Sometimes a test has to wait for RCU to complete a grace period and perform its callbacks, for example waiting for a close(fd) to actually perform the fput(filp) and so trigger all the callbacks such as closing GEM contexts. There is no trivial means of triggering an RCU barrier from userspace, so add one for our convenience in debugfs/i915_drop_caches Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191011173823.20432-1-chris@chris-wilson.co.uk commit a4dc1ca607e47e3ab342fb1a78b98bdc15088e7f Author: Rob Herring Date: Tue Sep 24 14:37:56 2019 -0500 dt-bindings: riscv: Fix CPU schema errors Fix the errors in the RiscV CPU DT schema: Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@1: 'timebase-frequency' is a required property Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible:0: 'riscv' is not one of ['sifive,rocket0', 'sifive,e5', 'sifive,e51', 'sifive,u54-mc', 'sifive,u54', 'sifive,u5'] Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: compatible: ['riscv'] is too short Documentation/devicetree/bindings/riscv/cpus.example.dt.yaml: cpu@0: 'timebase-frequency' is a required property The DT spec allows for 'timebase-frequency' to be in 'cpu' or 'cpus' node and RiscV requires it in /cpus node, so make it disallowed in cpu nodes. Fixes: 4fd669a8c487 ("dt-bindings: riscv: convert cpu binding to json-schema") Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Acked-by: Paul Walmsley Signed-off-by: Rob Herring commit 5fcaf6982d1167f1cd9b264704f6d1ef4c505d54 Author: Pavel Tikhomirov Date: Tue Oct 1 11:03:59 2019 +0300 sunrpc: fix crash when cache_head become valid before update I was investigating a crash in our Virtuozzo7 kernel which happened in in svcauth_unix_set_client. I found out that we access m_client field in ip_map structure, which was received from sunrpc_cache_lookup (we have a bit older kernel, now the code is in sunrpc_cache_add_entry), and these field looks uninitialized (m_client == 0x74 don't look like a pointer) but in the cache_head in flags we see 0x1 which is CACHE_VALID. It looks like the problem appeared from our previous fix to sunrpc (1): commit 4ecd55ea0742 ("sunrpc: fix cache_head leak due to queued request") And we've also found a patch already fixing our patch (2): commit d58431eacb22 ("sunrpc: don't mark uninitialised items as VALID.") Though the crash is eliminated, I think the core of the problem is not completely fixed: Neil in the patch (2) makes cache_head CACHE_NEGATIVE, before cache_fresh_locked which was added in (1) to fix crash. These way cache_is_valid won't say the cache is valid anymore and in svcauth_unix_set_client the function cache_check will return error instead of 0, and we don't count entry as initialized. But it looks like we need to remove cache_fresh_locked completely in sunrpc_cache_lookup: In (1) we've only wanted to make cache_fresh_unlocked->cache_dequeue so that cache_requests with no readers also release corresponding cache_head, to fix their leak. We with Vasily were not sure if cache_fresh_locked and cache_fresh_unlocked should be used in pair or not, so we've guessed to use them in pair. Now we see that we don't want the CACHE_VALID bit set here by cache_fresh_locked, as "valid" means "initialized" and there is no initialization in sunrpc_cache_add_entry. Both expiry_time and last_refresh are not used in cache_fresh_unlocked code-path and also not required for the initial fix. So to conclude cache_fresh_locked was called by mistake, and we can just safely remove it instead of crutching it with CACHE_NEGATIVE. It looks ideologically better for me. Hope I don't miss something here. Here is our crash backtrace: [13108726.326291] BUG: unable to handle kernel NULL pointer dereference at 0000000000000074 [13108726.326365] IP: [] svcauth_unix_set_client+0x2ab/0x520 [sunrpc] [13108726.326448] PGD 0 [13108726.326468] Oops: 0002 [#1] SMP [13108726.326497] Modules linked in: nbd isofs xfs loop kpatch_cumulative_81_0_r1(O) xt_physdev nfnetlink_queue bluetooth rfkill ip6table_nat nf_nat_ipv6 ip_vs_wrr ip_vs_wlc ip_vs_sh nf_conntrack_netlink ip_vs_sed ip_vs_pe_sip nf_conntrack_sip ip_vs_nq ip_vs_lc ip_vs_lblcr ip_vs_lblc ip_vs_ftp ip_vs_dh nf_nat_ftp nf_conntrack_ftp iptable_raw xt_recent nf_log_ipv6 xt_hl ip6t_rt nf_log_ipv4 nf_log_common xt_LOG xt_limit xt_TCPMSS xt_tcpmss vxlan ip6_udp_tunnel udp_tunnel xt_statistic xt_NFLOG nfnetlink_log dummy xt_mark xt_REDIRECT nf_nat_redirect raw_diag udp_diag tcp_diag inet_diag netlink_diag af_packet_diag unix_diag rpcsec_gss_krb5 xt_addrtype ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 ebtable_nat ebtable_broute nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_mangle ip6table_raw nfsv4 [13108726.327173] dns_resolver cls_u32 binfmt_misc arptable_filter arp_tables ip6table_filter ip6_tables devlink fuse_kio_pcs ipt_MASQUERADE nf_nat_masquerade_ipv4 xt_nat iptable_nat nf_nat_ipv4 xt_comment nf_conntrack_ipv4 nf_defrag_ipv4 xt_wdog_tmo xt_multiport bonding xt_set xt_conntrack iptable_filter iptable_mangle kpatch(O) ebtable_filter ebt_among ebtables ip_set_hash_ip ip_set nfnetlink vfat fat skx_edac intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass fuse pcspkr ses enclosure joydev sg mei_me hpwdt hpilo lpc_ich mei ipmi_si shpchp ipmi_devintf ipmi_msghandler xt_ipvs acpi_power_meter ip_vs_rr nfsv3 nfsd auth_rpcgss nfs_acl nfs lockd grace fscache nf_nat cls_fw sch_htb sch_cbq sch_sfq ip_vs em_u32 nf_conntrack tun br_netfilter veth overlay ip6_vzprivnet ip6_vznetstat ip_vznetstat [13108726.327817] ip_vzprivnet vziolimit vzevent vzlist vzstat vznetstat vznetdev vzmon vzdev bridge pio_kaio pio_nfs pio_direct pfmt_raw pfmt_ploop1 ploop ip_tables ext4 mbcache jbd2 sd_mod crc_t10dif crct10dif_generic mgag200 i2c_algo_bit drm_kms_helper scsi_transport_iscsi 8021q syscopyarea sysfillrect garp sysimgblt fb_sys_fops mrp stp ttm llc bnx2x crct10dif_pclmul crct10dif_common crc32_pclmul crc32c_intel drm dm_multipath ghash_clmulni_intel uas aesni_intel lrw gf128mul glue_helper ablk_helper cryptd tg3 smartpqi scsi_transport_sas mdio libcrc32c i2c_core usb_storage ptp pps_core wmi sunrpc dm_mirror dm_region_hash dm_log dm_mod [last unloaded: kpatch_cumulative_82_0_r1] [13108726.328403] CPU: 35 PID: 63742 Comm: nfsd ve: 51332 Kdump: loaded Tainted: G W O ------------ 3.10.0-862.20.2.vz7.73.29 #1 73.29 [13108726.328491] Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 10/02/2018 [13108726.328554] task: ffffa0a6a41b1160 ti: ffffa0c2a74bc000 task.ti: ffffa0c2a74bc000 [13108726.328610] RIP: 0010:[] [] svcauth_unix_set_client+0x2ab/0x520 [sunrpc] [13108726.328706] RSP: 0018:ffffa0c2a74bfd80 EFLAGS: 00010246 [13108726.328750] RAX: 0000000000000001 RBX: ffffa0a6183ae000 RCX: 0000000000000000 [13108726.328811] RDX: 0000000000000074 RSI: 0000000000000286 RDI: ffffa0c2a74bfcf0 [13108726.328864] RBP: ffffa0c2a74bfe00 R08: ffffa0bab8c22960 R09: 0000000000000001 [13108726.328916] R10: 0000000000000001 R11: 0000000000000001 R12: ffffa0a32aa7f000 [13108726.328969] R13: ffffa0a6183afac0 R14: ffffa0c233d88d00 R15: ffffa0c2a74bfdb4 [13108726.329022] FS: 0000000000000000(0000) GS:ffffa0e17f9c0000(0000) knlGS:0000000000000000 [13108726.329081] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [13108726.332311] CR2: 0000000000000074 CR3: 00000026a1b28000 CR4: 00000000007607e0 [13108726.334606] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [13108726.336754] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [13108726.338908] PKRU: 00000000 [13108726.341047] Call Trace: [13108726.343074] [] ? groups_alloc+0x34/0x110 [13108726.344837] [] svc_set_client+0x24/0x30 [sunrpc] [13108726.346631] [] svc_process_common+0x241/0x710 [sunrpc] [13108726.348332] [] svc_process+0x103/0x190 [sunrpc] [13108726.350016] [] nfsd+0xdf/0x150 [nfsd] [13108726.351735] [] ? nfsd_destroy+0x80/0x80 [nfsd] [13108726.353459] [] kthread+0xd1/0xe0 [13108726.355195] [] ? create_kthread+0x60/0x60 [13108726.356896] [] ret_from_fork_nospec_begin+0x7/0x21 [13108726.358577] [] ? create_kthread+0x60/0x60 [13108726.360240] Code: 4c 8b 45 98 0f 8e 2e 01 00 00 83 f8 fe 0f 84 76 fe ff ff 85 c0 0f 85 2b 01 00 00 49 8b 50 40 b8 01 00 00 00 48 89 93 d0 1a 00 00 0f c1 02 83 c0 01 83 f8 01 0f 8e 53 02 00 00 49 8b 44 24 38 [13108726.363769] RIP [] svcauth_unix_set_client+0x2ab/0x520 [sunrpc] [13108726.365530] RSP [13108726.367179] CR2: 0000000000000074 Fixes: d58431eacb22 ("sunrpc: don't mark uninitialised items as VALID.") Signed-off-by: Pavel Tikhomirov Acked-by: NeilBrown Signed-off-by: J. Bruce Fields commit 12b4157b7d3b666b1296b5cd4f1b675f102e2126 Author: Andy Shevchenko Date: Fri Oct 11 19:02:58 2019 +0300 nfsd: remove private bin2hex implementation Calling sprintf in a loop is not very efficient, and in any case, we already have an implementation of bin-to-hex conversion in lib/ which we might as well use. Note that original code used to nul-terminate the destination while bin2hex doesn't. That's why replace kmalloc() with kzalloc(). Signed-off-by: Andy Shevchenko Signed-off-by: J. Bruce Fields commit e38161bd325ea541ef2f258d8e28281077dde524 Author: Loic Poulain Date: Wed Dec 12 18:13:26 2018 +0100 arm64: dts: apq8096-db820c: Increase load on l21 for SDCARD In the same way as for msm8974-hammerhead, l21 load, used for SDCARD VMMC, needs to be increased in order to prevent any voltage drop issues (due to limited current) happening with some SDCARDS or during specific operations (e.g. write). Reviewed-by: Bjorn Andersson Fixes: 660a9763c6a9 (arm64: dts: qcom: db820c: Add pm8994 regulator node) Signed-off-by: Loic Poulain Signed-off-by: Bjorn Andersson commit 0a04480d96338c9ba6ce47da101a945f1658cb21 Author: Derek Kiernan Date: Wed Oct 2 10:03:55 2019 -0700 docs: misc: xilinx_sdfec: Actually add documentation Add SD-FEC driver documentation. Signed-off-by: Derek Kiernan Signed-off-by: Dragan Cvetic Link: https://lore.kernel.org/r/1560274185-264438-11-git-send-email-dragan.cvetic@xilinx.com [kees: extracted from v7 as it was missing in the commit for v8] Signed-off-by: Kees Cook Signed-off-by: Jonathan Corbet commit 0e3901891ab66dce0a51579035594c9b685650dd Author: Christian Kujau Date: Thu Oct 10 20:36:16 2019 -0700 docs: SafeSetID.rst: Remove spurious '???' characters It appears that some smart quotes were changed to "???" by even smarter software; change them to the dumb but legible variety. Signed-off-by: Christian Kujau Signed-off-by: Jonathan Corbet commit ce0c94e158e92f04df3e76f8e6435269858ca519 Author: Martin Kaiser Date: Sat Oct 5 15:09:21 2019 +0200 dt-bindings: display: clps711x-fb: fix native-mode setting Move the native-mode setting inside the display-timing node. Outside of display-timing, it is ignored. Signed-off-by: Martin Kaiser Signed-off-by: Rob Herring commit 5cb2ef85eefb66deca6516329b2a7d84fdafee23 Author: Martin Kaiser Date: Sat Oct 5 15:09:20 2019 +0200 dt-bindings: display: imx: fix native-mode setting Move the native-mode setting inside the display-timing node. Outside of display-timing, it is ignored. Signed-off-by: Martin Kaiser Signed-off-by: Rob Herring commit 695379b3734266a49c13e6b7cbf1062902dc6367 Author: Ville Syrjälä Date: Thu Oct 10 16:11:59 2019 +0300 drm/atmel-hlcdc: Use swap() where appropriate @swap@ identifier TEMP; expression A,B; @@ - TEMP = A; - A = B; - B = TEMP; + swap(A, B); @@ type T; identifier swap.TEMP; @@ ( - T TEMP; | - T TEMP = {...}; ) ... when != TEMP Cc: Sam Ravnborg Cc: Boris Brezillon Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191010131159.17346-3-ville.syrjala@linux.intel.com Reviewed-by: Boris Brezillon commit 23b482252836ab3c5e6b3b20ed3038449cbc7679 Author: Tomi Valkeinen Date: Thu Oct 10 14:00:00 2019 +0200 drm/omap: add OMAP_BO flags to affect buffer allocation On SoCs with DMM/TILER, we have two ways to allocate buffers: normal dma_alloc or via DMM (which basically functions as an IOMMU). DMM can map 128MB at a time, and we only map the DMM buffers when they are used (i.e. not at alloc time). If DMM is present, omapdrm always uses DMM. There are use cases that require lots of big buffers that are being used at the same time by different IPs. At the moment the userspace has a hard maximum of 128MB. This patch adds three new flags that can be used by the userspace to solve the situation: OMAP_BO_MEM_CONTIG: The driver will use dma_alloc to get the memory. This can be used to avoid DMM if the userspace knows it needs more than 128M of memory at the same time. OMAP_BO_MEM_DMM: The driver will use DMM to get the memory. There's not much use for this flag at the moment, as on platforms with DMM it is used by default, but it's here for completeness. OMAP_BO_MEM_PIN: The driver will pin the memory at alloc time, and keep it pinned. This can be used to 1) get an error at alloc time if DMM space is full, and 2) get rid of the constant pin/unpin operations which may have some effect on performance. If none of the flags are given, the behavior is the same as currently. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot Link: https://patchwork.freedesktop.org/patch/msgid/20191010120000.1421-9-jjhiblot@ti.com commit 4ecc5fbcc4d43e702a473f21fee045f55fc3beb5 Author: Tomi Valkeinen Date: Thu Oct 10 13:59:59 2019 +0200 drm/omap: add omap_gem_validate_flags() Add a helper function omap_gem_validate_flags() which validates the omap_bo flags passed from the userspace. Also drop the dev_err() message, as the userspace can cause that at will. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot Link: https://patchwork.freedesktop.org/patch/msgid/20191010120000.1421-8-jjhiblot@ti.com commit 18d7f5ab543eeaddc3609f56b52f51da72aa99ba Author: Tomi Valkeinen Date: Thu Oct 10 13:59:58 2019 +0200 drm/omap: cleanup OMAP_BO_SCANOUT use omap_gem_new() has a comment about OMAP_BO_SCANOUT which does not make sense. Also, for the TILER case, we drop OMAP_BO_SCANOUT flag for some reason. It's not clear what the original purpose of OMAP_BO_SCANOUT is, but presuming it means "scanout buffer, something that can be consumed by DSS", this patch cleans up the above issues. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot Link: https://patchwork.freedesktop.org/patch/msgid/20191010120000.1421-7-jjhiblot@ti.com commit 48b34ac041756c2fd3a898d6e96be97416858b45 Author: Tomi Valkeinen Date: Thu Oct 10 13:59:57 2019 +0200 drm/omap: remove OMAP_BO_TILED define OMAP_BO_TILED does not make sense, as OMAP_BO_TILED_* values are not bitmasks but normal values. As we already have OMAP_BO_TILED_MASK for the mask, we can remove OMAP_BO_TILED and use OMAP_BO_TILED_MASK instead. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot Link: https://patchwork.freedesktop.org/patch/msgid/20191010120000.1421-6-jjhiblot@ti.com commit 9b7117e245bcf37b6e9f87f61461168e09f25316 Author: Tomi Valkeinen Date: Thu Oct 10 13:59:56 2019 +0200 drm/omap: cleanup OMAP_BO flags Reorder OMAP_BO flags and improve the comments. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot Link: https://patchwork.freedesktop.org/patch/msgid/20191010120000.1421-5-jjhiblot@ti.com commit d6e52e28e4ca5ae5d066048f5ae2eac68dacb453 Author: Tomi Valkeinen Date: Thu Oct 10 13:59:55 2019 +0200 drm/omap: accept NULL for dma_addr in omap_gem_pin Allow NULL to be passed in 'dma_addr' for omap_gem_pin(), in case the caller does not need the dma_addr. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot Link: https://patchwork.freedesktop.org/patch/msgid/20191010120000.1421-4-jjhiblot@ti.com commit d3e4c46df688fa0bfacffd5f040b5ae89562ab0c Author: Tomi Valkeinen Date: Thu Oct 10 13:59:54 2019 +0200 drm/omap: add omap_gem_unpin_locked() Add omap_gem_unpin_locked() which is a version of omap_gem_unpin() that expects the caller to hold the omap_obj lock. Signed-off-by: Tomi Valkeinen Reviewed-by: Jean-Jacques Hiblot Link: https://patchwork.freedesktop.org/patch/msgid/20191010120000.1421-3-jjhiblot@ti.com commit cec4fa7511ef7a73eb635834e9d85b25a5b47a98 Author: Jean-Jacques Hiblot Date: Thu Oct 10 13:59:53 2019 +0200 drm/omap: use refcount API to track the number of users of dma_addr This would give us a WARN_ON() if the pin/unpin calls are unbalanced. Proposed-by: Laurent Pinchart Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20191010120000.1421-2-jjhiblot@ti.com commit cebf7d51a6c3babc4d0589da7aec0de1af0a5691 Author: Jin Yao Date: Wed Sep 25 09:14:46 2019 +0800 perf diff: Report noisy for cycles diff This patch prints the stddev and hist for the cycles diff of program block. It can help us to understand if the cycles is noisy or not. This patch is inspired by Andi Kleen's patch: https://lwn.net/Articles/600471/ We create new option '--cycles-hist'. Example: perf record -b ./div perf record -b ./div perf diff -c cycles # Baseline [Program Block Range] Cycles Diff Shared Object Symbol # ........ .......................................................... .... ................. ............................ # 46.72% [div.c:40 -> div.c:40] 0 div [.] main 46.72% [div.c:42 -> div.c:44] 0 div [.] main 46.72% [div.c:42 -> div.c:39] 0 div [.] main 20.54% [random_r.c:357 -> random_r.c:394] 1 libc-2.27.so [.] __random_r 20.54% [random_r.c:357 -> random_r.c:380] 0 libc-2.27.so [.] __random_r 20.54% [random_r.c:388 -> random_r.c:388] 0 libc-2.27.so [.] __random_r 20.54% [random_r.c:388 -> random_r.c:391] 0 libc-2.27.so [.] __random_r 17.04% [random.c:288 -> random.c:291] 0 libc-2.27.so [.] __random 17.04% [random.c:291 -> random.c:291] 0 libc-2.27.so [.] __random 17.04% [random.c:293 -> random.c:293] 0 libc-2.27.so [.] __random 17.04% [random.c:295 -> random.c:295] 0 libc-2.27.so [.] __random 17.04% [random.c:295 -> random.c:295] 0 libc-2.27.so [.] __random 17.04% [random.c:298 -> random.c:298] 0 libc-2.27.so [.] __random 8.40% [div.c:22 -> div.c:25] 0 div [.] compute_flag 8.40% [div.c:27 -> div.c:28] 0 div [.] compute_flag 5.14% [rand.c:26 -> rand.c:27] 0 libc-2.27.so [.] rand 5.14% [rand.c:28 -> rand.c:28] 0 libc-2.27.so [.] rand 2.15% [rand@plt+0 -> rand@plt+0] 0 div [.] rand@plt 0.00% [kernel.kallsyms] [k] __x86_indirect_thunk_rax 0.00% [do_mmap+714 -> do_mmap+732] -10 [kernel.kallsyms] [k] do_mmap 0.00% [do_mmap+737 -> do_mmap+765] 1 [kernel.kallsyms] [k] do_mmap 0.00% [do_mmap+262 -> do_mmap+299] 0 [kernel.kallsyms] [k] do_mmap 0.00% [__x86_indirect_thunk_r15+0 -> __x86_indirect_thunk_r15+0] 7 [kernel.kallsyms] [k] __x86_indirect_thunk_r15 0.00% [native_sched_clock+0 -> native_sched_clock+119] -1 [kernel.kallsyms] [k] native_sched_clock 0.00% [native_write_msr+0 -> native_write_msr+16] -13 [kernel.kallsyms] [k] native_write_msr When we enable the option '--cycles-hist', the output is perf diff -c cycles --cycles-hist # Baseline [Program Block Range] Cycles Diff stddev/Hist Shared Object Symbol # ........ .......................................................... .... ................. ................. ............................ # 46.72% [div.c:40 -> div.c:40] 0 ± 37.8% ▁█▁▁██▁█ div [.] main 46.72% [div.c:42 -> div.c:44] 0 ± 49.4% ▁▁▂█▂▂▂▂ div [.] main 46.72% [div.c:42 -> div.c:39] 0 ± 24.1% ▃█▂▄▁▃▂▁ div [.] main 20.54% [random_r.c:357 -> random_r.c:394] 1 ± 33.5% ▅▂▁█▃▁▂▁ libc-2.27.so [.] __random_r 20.54% [random_r.c:357 -> random_r.c:380] 0 ± 39.4% ▁▁█▁██▅▁ libc-2.27.so [.] __random_r 20.54% [random_r.c:388 -> random_r.c:388] 0 libc-2.27.so [.] __random_r 20.54% [random_r.c:388 -> random_r.c:391] 0 ± 41.2% ▁▃▁▂█▄▃▁ libc-2.27.so [.] __random_r 17.04% [random.c:288 -> random.c:291] 0 ± 48.8% ▁▁▁▁███▁ libc-2.27.so [.] __random 17.04% [random.c:291 -> random.c:291] 0 ±100.0% ▁█▁▁▁▁▁▁ libc-2.27.so [.] __random 17.04% [random.c:293 -> random.c:293] 0 ±100.0% ▁█▁▁▁▁▁▁ libc-2.27.so [.] __random 17.04% [random.c:295 -> random.c:295] 0 ±100.0% ▁█▁▁▁▁▁▁ libc-2.27.so [.] __random 17.04% [random.c:295 -> random.c:295] 0 libc-2.27.so [.] __random 17.04% [random.c:298 -> random.c:298] 0 ± 75.6% ▃█▁▁▁▁▁▁ libc-2.27.so [.] __random 8.40% [div.c:22 -> div.c:25] 0 ± 42.1% ▁▃▁▁███▁ div [.] compute_flag 8.40% [div.c:27 -> div.c:28] 0 ± 41.8% ██▁▁▄▁▁▄ div [.] compute_flag 5.14% [rand.c:26 -> rand.c:27] 0 ± 37.8% ▁▁▁████▁ libc-2.27.so [.] rand 5.14% [rand.c:28 -> rand.c:28] 0 libc-2.27.so [.] rand 2.15% [rand@plt+0 -> rand@plt+0] 0 div [.] rand@plt 0.00% [kernel.kallsyms] [k] __x86_indirect_thunk_rax 0.00% [do_mmap+714 -> do_mmap+732] -10 [kernel.kallsyms] [k] do_mmap 0.00% [do_mmap+737 -> do_mmap+765] 1 [kernel.kallsyms] [k] do_mmap 0.00% [do_mmap+262 -> do_mmap+299] 0 [kernel.kallsyms] [k] do_mmap 0.00% [__x86_indirect_thunk_r15+0 -> __x86_indirect_thunk_r15+0] 7 [kernel.kallsyms] [k] __x86_indirect_thunk_r15 0.00% [native_sched_clock+0 -> native_sched_clock+119] -1 ± 38.5% ▄█▁ [kernel.kallsyms] [k] native_sched_clock 0.00% [native_write_msr+0 -> native_write_msr+16] -13 ± 47.1% ▁█▇▃▁▁ [kernel.kallsyms] [k] native_write_msr v8: --- Rebase to perf/core branch v7: --- 1. v6 got Jiri's ACK. 2. Rebase to latest perf/core branch. v6: --- 1. Jiri provides better code for using data__hpp_register() in ui_init(). Use this code in v6. v5: --- 1. Refine the use of data__hpp_register() in ui_init() according to Jiri's suggestion. v4: --- 1. Rename the new option from '--noisy' to '--cycles-hist' 2. Remove the option '-n'. 3. Only update the spark value and stats when '--cycles-hist' is enabled. 4. Remove the code of printing '..'. v3: --- 1. Move the histogram to a separate column 2. Move the svals[] out of struct stats v2: --- Jiri got a compile error, CC builtin-diff.o builtin-diff.c: In function ‘compute_cycles_diff’: builtin-diff.c:712:10: error: taking the absolute value of unsigned type ‘u64’ {aka ‘long unsigned int’} has no effect [-Werror=absolute-value] 712 | labs(pair->block_info->cycles_spark[i] - | ^~~~ Because the result of u64 - u64 is still u64. Now we change the type of cycles_spark[] to s64. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20190925011446.30678-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 30a2441cae7b149ff484a697bf9eb8de53240a4f Author: Jiri Slaby Date: Fri Oct 11 11:22:13 2019 +0200 x86/asm: Make more symbols local During the assembly cleanup patchset review, I found more symbols which are used only locally. So make them really local by prepending ".L" to them. Namely: - wakeup_idt is used only in realmode/rm/wakeup_asm.S. - in_pm32 is used only in boot/pmjump.S. - retint_user is used only in entry/entry_64.S, perhaps since commit 2ec67971facc ("x86/entry/64/compat: Remove most of the fast system call machinery"), where entry_64_compat's caller was removed. Drop GLOBAL from all of them too. I do not see more candidates in the series. Signed-off-by: Jiri Slaby Acked-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20191011092213.31470-1-jslaby@suse.cz Signed-off-by: Ingo Molnar commit 55542113c690a567e728e40d4181d7d037fc21b0 Author: Jiri Olsa Date: Fri Oct 11 14:21:55 2019 +0200 perf tools: Propagate CFLAGS to libperf Andi reported that 'make DEBUG=1' does not propagate to the libbperf code. It's true also for the other flags. Changing the code to propagate the global build flags to libperf compilation. Reported-by: Andi Kleen Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191011122155.15738-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b23ab6ac6d768f9d5b03b5a67bf48a6be6e1dcce Author: Ezequiel Garcia Date: Thu Oct 10 16:43:50 2019 -0300 drm/rockchip: Add optional support for CRTC gamma LUT Add an optional CRTC gamma LUT support, and enable it on RK3288. This is currently enabled via a separate address resource, which needs to be specified in the devicetree. The address resource is required because on some SoCs, such as RK3288, the LUT address is after the MMU address, and the latter is supported by a different driver. This prevents the DRM driver from requesting an entire register space. The current implementation works for RGB 10-bit tables, as that is what seems to work on RK3288. Tested-by: Heiko Stuebner Signed-off-by: Ezequiel Garcia Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191010194351.17940-3-ezequiel@collabora.com commit 2804b799c35272031088abc6b0f74238e61f8afd Author: Ezequiel Garcia Date: Thu Oct 10 16:43:49 2019 -0300 dt-bindings: display: rockchip: document VOP gamma LUT address Add the register specifier description for an optional gamma LUT address. Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Tested-by: Heiko Stuebner Signed-off-by: Ezequiel Garcia Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191010194351.17940-2-ezequiel@collabora.com commit cbbf2787782ca5d17b479deb962a07f0421a7932 Author: Chris Wilson Date: Fri Oct 11 11:33:45 2019 +0100 drm/i915/execlists: Only mark incomplete requests as -EIO on cancelling Only the requests that have not completed do we want to change the status of to signal the -EIO when cancelling the inflight set of requests upon wedging. Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191011103345.26013-1-chris@chris-wilson.co.uk commit f53e2cd0b8ab7d9e390414470bdbd830f660133f Author: Sami Tolvanen Date: Fri Sep 13 14:14:02 2019 -0700 x86/mm: Use the correct function type for native_set_fixmap() We call native_set_fixmap indirectly through the function pointer struct pv_mmu_ops::set_fixmap, which expects the first parameter to be 'unsigned' instead of 'enum fixed_addresses'. This patch changes the function type for native_set_fixmap to match the pointer, which fixes indirect call mismatches with Control-Flow Integrity (CFI) checking. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H . Peter Anvin Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190913211402.193018-1-samitolvanen@google.com Signed-off-by: Ingo Molnar commit 6e4847640c6aebcaa2d9b3686cecc91b41f09269 Author: Sami Tolvanen Date: Tue Oct 8 15:40:49 2019 -0700 syscalls/x86: Fix function types in COND_SYSCALL Define a weak function in COND_SYSCALL instead of a weak alias to sys_ni_syscall(), which has an incompatible type. This fixes indirect call mismatches with Control-Flow Integrity (CFI) checking. Signed-off-by: Sami Tolvanen Acked-by: Andy Lutomirski Cc: Borislav Petkov Cc: H . Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191008224049.115427-6-samitolvanen@google.com Signed-off-by: Ingo Molnar commit f48f01a92cca09e86d46c91d8edf9d5a71c61727 Author: Sami Tolvanen Date: Tue Oct 8 15:40:48 2019 -0700 syscalls/x86: Use the correct function type for sys_ni_syscall Use the correct function type for sys_ni_syscall() in system call tables to fix indirect call mismatches with Control-Flow Integrity (CFI) checking. Signed-off-by: Sami Tolvanen Acked-by: Andy Lutomirski Cc: Borislav Petkov Cc: H . Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191008224049.115427-5-samitolvanen@google.com Signed-off-by: Ingo Molnar commit 00198a6eaf66609de5e4de9163bb42c7ca9dd7b7 Author: Sami Tolvanen Date: Tue Oct 8 15:40:47 2019 -0700 syscalls/x86: Use COMPAT_SYSCALL_DEFINE0 for IA32 (rt_)sigreturn Use COMPAT_SYSCALL_DEFINE0 to define (rt_)sigreturn() syscalls to replace sys32_sigreturn() and sys32_rt_sigreturn(). This fixes indirect call mismatches with Control-Flow Integrity (CFI) checking. Signed-off-by: Sami Tolvanen Acked-by: Andy Lutomirski Cc: Borislav Petkov Cc: H . Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191008224049.115427-4-samitolvanen@google.com Signed-off-by: Ingo Molnar commit cf3b83e19d7c928e05a5d193c375463182c6029a Author: Andy Lutomirski Date: Tue Oct 8 15:40:46 2019 -0700 syscalls/x86: Wire up COMPAT_SYSCALL_DEFINE0 x86 has special handling for COMPAT_SYSCALL_DEFINEx, but there was no override for COMPAT_SYSCALL_DEFINE0. Wire it up so that we can use it for rt_sigreturn. Signed-off-by: Andy Lutomirski Signed-off-by: Sami Tolvanen Cc: Borislav Petkov Cc: H . Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191008224049.115427-3-samitolvanen@google.com Signed-off-by: Ingo Molnar commit 8661d769ab77c675b5eb6c3351a372b9fbc1bf40 Author: Sami Tolvanen Date: Tue Oct 8 15:40:45 2019 -0700 syscalls/x86: Use the correct function type in SYSCALL_DEFINE0 Although a syscall defined using SYSCALL_DEFINE0 doesn't accept parameters, use the correct function type to avoid type mismatches with Control-Flow Integrity (CFI) checking. Signed-off-by: Sami Tolvanen Acked-by: Andy Lutomirski Cc: Borislav Petkov Cc: H . Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191008224049.115427-2-samitolvanen@google.com Signed-off-by: Ingo Molnar commit 6735ab500b8915182127a9030f04683b8f8b1431 Author: YueHaibing Date: Thu Sep 5 14:02:49 2019 +0800 dmaengine: ti: edma: remove unused code drivers/dma/ti/edma.c: In function edma_probe: drivers/dma/ti/edma.c:2252:11: warning: variable off set but not used [-Wunused-but-set-variable] 'off' is not used now, so remove it. Signed-off-by: YueHaibing Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20190905060249.23928-1-yuehaibing@huawei.com Signed-off-by: Vinod Koul commit 5b3e3606ab06fc8a8158d01bee07b8aa1c6068e9 Author: Masahiro Yamada Date: Thu Sep 5 12:41:33 2019 +0900 dmaengine: uniphier-mdmac: use devm_platform_ioremap_resource() Replace the chain of platform_get_resource() and devm_ioremap_resource() with devm_platform_ioremap_resource(). This allows to remove the local variable for (struct resource *), and have one function call less. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20190905034133.29514-1-yamada.masahiro@socionext.com Signed-off-by: Vinod Koul commit fdf0fe2df3e32103dc87d4cd4d3be3653c0fd30d Author: Daniel Campello Date: Tue Oct 8 16:18:30 2019 -0600 platform/chrome: wilco_ec: Add Dell's USB PowerShare Policy control USB PowerShare is a policy which affects charging via the special USB PowerShare port (marked with a small lightning bolt or battery icon) when in low power states: - In S0, the port will always provide power. - In S0ix, if usb_charge is enabled, then power will be supplied to the port when on AC or if battery is > 50%. Else no power is supplied. - In S5, if usb_charge is enabled, then power will be supplied to the port when on AC. Else no power is supplied. Signed-off-by: Daniel Campello Signed-off-by: Nick Crews Signed-off-by: Enric Balletbo i Serra commit b5b42b24d7830fa18537691860bd4c217f513969 Author: Kacper Piwiński Date: Mon Oct 7 17:48:18 2019 +0200 ACPI: video: update doc for acpi_video_bus_DOS() Commit efaa14c: "Starting from win8, MS backlight control driver will set bit 2 of the parameter of control method _DOS, to inform firmware it should not perform any automatic brightness changes. This mostly affects hotkey notification deliver - if we do not set this bit, on hotkey press, firmware may choose to adjust brightness level instead of sending out notification and doing nothing." win7: https://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/BrightnessCtrl.docx "To avoid problems that might occur if both the system firmware and the monitor driver control the brightness of the display, the display miniport driver should set bit 2 of the argument to the _DOS method. Setting this bit notifies the system firmware that it should not perform any automatic display brightness changes. The WDDM driver must set this particular bit because it controls the _DOS method. The other bits in the _DOS method control the behavior of the firmware in response to the display switch hot keys." win8: http://read.pudn.com/downloads193/doc/907411/Brightness.doc Signed-off-by: Kacper Piwiński Signed-off-by: Rafael J. Wysocki commit 8ed61d36050c57d9eba09511f53d683fd63b04d1 Author: Heikki Krogerus Date: Tue Oct 8 16:26:06 2019 +0300 device property: Fix the description of struct fwnode_operations Adding description for the device_is_available member which was missing, and fixing the description of the member property_read_int_array. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit f1ce39df508de4a4abd83daa3e589ccea46b1480 Author: Sakari Ailus Date: Thu Oct 3 15:32:19 2019 +0300 lib/test_printf: Add tests for %pfw printk modifier Add a test for the %pfw printk modifier using software nodes. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Petr Mladek Signed-off-by: Rafael J. Wysocki commit 3bd32d6a2ee62db3c5b06caf7b163b6a4d459ea1 Author: Sakari Ailus Date: Thu Oct 3 15:32:18 2019 +0300 lib/vsprintf: Add %pfw conversion specifier for printing fwnode names Add support for %pfw conversion specifier (with "f" and "P" modifiers) to support printing full path of the node, including its name ("f") and only the node's name ("P") in the printk family of functions. The two flags have equivalent functionality to existing %pOF with the same two modifiers ("f" and "P") on OF based systems. The ability to do the same on ACPI based systems is added by this patch. On ACPI based systems the resulting strings look like \_SB.PCI0.CIO2.port@1.endpoint@0 where the nodes are separated by a dot (".") and the first three are ACPI device nodes and the latter two ACPI data nodes. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Petr Mladek Signed-off-by: Rafael J. Wysocki commit 83abc5a77f3b028b8c845c39ce4053119e1de35b Author: Sakari Ailus Date: Thu Oct 3 15:32:17 2019 +0300 lib/vsprintf: OF nodes are first and foremost, struct device_nodes Factor out static kobject_string() function that simply calls device_node_string(), and thus remove references to kobjects (as these are struct device_node). Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Petr Mladek Signed-off-by: Rafael J. Wysocki commit a92eb7621b9fb2c28a588ce333d226f56fab6a85 Author: Sakari Ailus Date: Thu Oct 3 15:32:16 2019 +0300 lib/vsprintf: Make use of fwnode API to obtain node names and separators Instead of implementing our own means of discovering parent nodes, node names or counting how many parents a node has, use the newly added functions in the fwnode API to obtain that information. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Petr Mladek Signed-off-by: Rafael J. Wysocki commit 1586c5ae2f9310235b5e70abe712c73fc32eb98f Author: Sakari Ailus Date: Thu Oct 3 15:32:15 2019 +0300 lib/vsprintf: Add a note on re-using %pf or %pF Add a note warning of re-use of obsolete %pf or %pF extensions. Signed-off-by: Sakari Ailus Suggested-by: Steven Rostedt (VMware) Reviewed-by: Petr Mladek Signed-off-by: Rafael J. Wysocki commit 9af7706492f985867d070861fe39fee0fe41326f Author: Sakari Ailus Date: Thu Oct 3 15:32:14 2019 +0300 lib/vsprintf: Remove support for %pF and %pf in favour of %pS and %ps %pS and %ps are now the preferred conversion specifiers to print function names. The functionality is equivalent; remove the old, deprecated %pF and %pf support. Depends-on: commit 2d44d165e939 ("scsi: lpfc: Convert existing %pf users to %ps") Depends-on: commit b295c3e39c13 ("tools lib traceevent: Convert remaining %p[fF] users to %p[sS]") Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Petr Mladek Signed-off-by: Rafael J. Wysocki commit e7e242bccb209b5f73455b33928b8680cc6e3319 Author: Sakari Ailus Date: Thu Oct 3 15:32:13 2019 +0300 device property: Add a function to obtain a node's prefix The prefix is used for printing purpose before a node, and it also works as a separator between two nodes. Signed-off-by: Sakari Ailus Acked-by: Rob Herring (for OF) Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit bc0500c1e43d95cca5352d2345fb0769f314ba22 Author: Sakari Ailus Date: Thu Oct 3 15:32:12 2019 +0300 device property: Add fwnode_get_name for returning the name of a node The fwnode framework did not have means to obtain the name of a node. Add that now, in form of the fwnode_get_name() function and a corresponding get_name fwnode op. OF and ACPI support is included. Signed-off-by: Sakari Ailus Acked-by: Rob Herring (for OF) Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 87e5e95db31a27d117fbb4a5d464f44adb4c2ee2 Author: Sakari Ailus Date: Thu Oct 3 15:32:11 2019 +0300 device property: Add functions for accessing node's parents Add two convenience functions for accessing node's parents: fwnode_count_parents() returns the number of parent nodes a given node has. fwnode_get_nth_parent() returns node's parent at a given distance from the node itself. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit a57b7fb783eb352d91b0bf8391682b30bacae667 Author: Sakari Ailus Date: Thu Oct 3 15:32:10 2019 +0300 device property: Move fwnode_get_parent() up Move fwnode_get_parent() above fwnode_get_next_parent(), making the order the same as in the header file. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 56c9aa07942434490890ac35bba99026e66cb949 Author: Sakari Ailus Date: Thu Oct 3 15:32:09 2019 +0300 software node: Make argument to to_software_node const to_software_node() does not need to modify the fwnode_handle it operates on; therefore make it const. This allows passing a const fwnode_handle to to_software_node(). Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki commit 51c100a651a471fcb8ead1ecc1224471eb0d61b9 Author: Sakari Ailus Date: Thu Oct 3 15:32:08 2019 +0300 software node: Get reference to parent swnode in get_parent op The software_node_get_parent() returned a pointer to the parent swnode, but did not take a reference to it, leading the caller to put a reference that was not taken. Take that reference now. Fixes: 59abd83672f7 ("drivers: base: Introducing software nodes to the firmware node framework") Signed-off-by: Sakari Ailus Reviewed-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 850d80a2d8682999b5aafa361ae239838c8636c2 Author: Wambui Karuga Date: Fri Oct 11 10:20:44 2019 +0300 staging: isdn: remove assignment in if conditionals Remove variable assignment in if statements in drivers/staging/isdn/avm/b1.c. Issues reported by checkpatch.pl as: ERROR: do not use assignment in if condition Also refactor code around some if statements to remove comparisons to NULL and unnecessary braces in single statement blocks. Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/20191011072044.7022-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit db4b23d5a898cda286e83fcb3650f0951a235d12 Author: Jules Irenge Date: Thu Oct 10 22:40:06 2019 +0100 staging: qlge: fix comparison to NULL warning Fix comparison to NULL by replacing with !ptr instead. Issue detected by checkpatch. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191010214006.23677-4-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit e311f25e186560b0315e66707177ee152e718228 Author: Jules Irenge Date: Thu Oct 10 22:40:05 2019 +0100 staging: qlge: add space to fix check warning Add space to fix warning of preferred space near the division operator issue detected by checkpatch. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191010214006.23677-3-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit b883582d734074bc0f0c4176998becec4a394a04 Author: Jules Irenge Date: Thu Oct 10 22:40:04 2019 +0100 staging: qlge: Fix multiple assignments warning by replacing integer variables to bool Fix multiple assignments warning " check issue detected by checkpatch tool: "CHECK: multiple assignments should be avoided". Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191010214006.23677-2-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit a8bfbd7cf3fd507e83e296d61b8b59755864413b Author: Jules Irenge Date: Thu Oct 10 22:40:03 2019 +0100 staging: qlge: fix "alignment should match open parenthesis" checks Fix "alignment should mactch open parenthesis" checks issued by checkpatch.pl tool: "CHECK: Alignment should match open parenthesis". Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191010214006.23677-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 52c4326a56ec69920062593086451f082ce66f33 Author: Jules Irenge Date: Thu Oct 10 18:21:14 2019 +0100 staging: qlge: correct a misspelled word Fix a misspelling of "several" detected by checkpatch Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191010172114.12345-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0fa79a78b1d7e671f889b41a981c229075cbfb36 Author: YueHaibing Date: Thu Oct 10 23:33:25 2019 +0800 staging: rtl8723bs: Remove unnecessary null check Null check before kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191010153325.16836-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2e821be2206ca03168e35dd9fd1f77fbb9faf0f1 Author: Wambui Karuga Date: Thu Oct 10 16:15:32 2019 +0300 staging: rtl8723bs: Remove unnecessary blank lines Remove multiple blank lines in drivers/staging/rtl8723bs/core/rtw_mlme.c. Issues reported by checkpatch.pl as: CHECK: Please don't use multiple blank lines Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/50abec172689dfa413437589745032d678b82d04.1570712632.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit e7e12d6650ec16f4fa88674c523f000d5a1fa8ea Author: Wambui Karuga Date: Thu Oct 10 16:15:31 2019 +0300 staging: rtl8723bs: Remove comparisons to booleans in conditionals. Remove comparisons to true and false in multiple if statements in drivers/staging/rtl8723bs/core/rtw_mlme.c Issues reported by checkpatch.pl as: CHECK: Using comparison to false is error prone CHECK: Using comparison to true is error prone Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/d97eaa803566c15a2658df10cf2ca77acddea7fb.1570712632.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 92f87db5a964d4450264e97480addf1552c9e9bf Author: Wambui Karuga Date: Thu Oct 10 16:15:30 2019 +0300 staging: rtl8723bs: Remove unnecessary braces for single statements Clean up multiple unnecessary braces around single statement blocks in drivers/staging/rtl8723bs/core/rtw_mlme.c Issues reported by checkpatch.pl as: WARNING: braces {} are not necessary for single statement blocks or WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/c459741e8dc51dc2283fc69f07ed947e2994d0e9.1570712632.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 409e8332037898dbc5713f9a5285e3c539ab931b Author: Wambui Karuga Date: Thu Oct 10 16:15:29 2019 +0300 staging: rtl8723bs: Remove comparisons to NULL in conditionals Remove most comparisons to NULL in conditionals in drivers/staging/rtl8723bs/core/rtw_mlme.c Issues reported by checkpatch.pl as: CHECK: Comparison to NULL could be written Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/f4752d3a49e02193ed7b47a353e18e56d94b5a68.1570712632.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1dce7eb37333a5e1b155a381d8b517c5e2d2bc39 Author: Larry Finger Date: Wed Oct 9 12:37:11 2019 -0500 rtlwifi: rtl8192se: Convert inline routines to little-endian words In this step, the read/write routines for the descriptors are converted to use __le32 quantities, thus a lot of casts can be removed. Callback routines still use the 8-bit arrays, but these are changed within the specified routine. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 06aae1b02285fd144ff1f1c50a7824f09dc8d778 Author: Larry Finger Date: Wed Oct 9 12:37:10 2019 -0500 rtlwifi: rtl8192se: Convert macros that set descriptor As a first step in the conversion, the macros that set the RX and TX descriptors are converted to static inline routines, and the names are changed from upper to lower case. To minimize the changes in a given step, the input descriptor information is left as as a byte array (u8 *), even though it should be a little-endian word array (__le32 *). That will be changed in the next patch. Several places where checkpatch.pl complains about a space after a cast and other warnings are fixed. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit c3f997f0c3b2c46776304a482571cdee5f182de2 Author: Larry Finger Date: Wed Oct 9 12:37:09 2019 -0500 rtlwifi: rtl8192se: Replace local bit manipulation macros This driver uses a set of local macros to manipulate the RX and TX descriptors, which are all little-endian quantities. These macros are replaced by the bitfield macros le32p_replace_bits() and le32_get_bits(). In several places, the macros operated on an entire 32-bit word. In these cases, a direct read or replacement is used. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit c2fca7d083f78aad632fb99fd24acb082c58a495 Author: Larry Finger Date: Wed Oct 9 12:37:08 2019 -0500 rtlwifi: rtl8192se: Remove unused GET_XXX and SET_XXX As the first step in converting from macros that get/set information in the RX and TX descriptors, unused macros are being removed. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 4633d30b61ac1415817b954c3d4d241ca7439a7c Author: Tony Lindgren Date: Wed Oct 9 09:50:06 2019 -0700 wlcore: clean-up clearing of WL1271_FLAG_IRQ_RUNNING We set WL1271_FLAG_IRQ_RUNNING in the beginning of wlcore_irq(), but clear it before interrupt handling is done in wlcore_irq_locked(). Let's move the clearing to the end of wlcore_irq() where it gets set, and remove the old comments about hardirq. That's no longer the case as we're using request_threaded_irq(). Note that the WL1271_FLAG_IRQ_RUNNING should never race between the interrupt handler and wlcore_runtime_resume() as because of autosuspend timeout we cannot enter idle between wlcore_irq_locked() and the end of wlcore_irq(). Cc: Anders Roxell Cc: Eyal Reizer Cc: Guy Mishol Cc: John Stultz Cc: Ulf Hansson Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo commit 59f4567d228f7f5686e0f91d30e6aeaca999e2fd Author: zhengbin Date: Wed Oct 9 17:08:27 2019 +0800 rtlwifi: rtl8192ee: Remove set but not used variable 'err' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c: In function rtl92ee_download_fw: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c:111:6: warning: variable err set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: zhengbin Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit a69d3bdd4d40c8f780c94b5e1983adb1cd389b59 Author: Colin Ian King Date: Fri Oct 4 17:02:27 2019 +0100 ath10k: fix null dereference on pointer crash_data Currently when pointer crash_data is null the present null check will also check that crash_data->ramdump_buf is null and will cause a null pointer dereference on crash_data. Fix this by using the || operator instead of &&. Fixes: 3f14b73c3843 ("ath10k: Enable MSA region dump support for WCN3990") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit c97fb526ca0666e515e94f96e922dfc50467fd01 Author: Chris Wilson Date: Thu Oct 10 08:14:26 2019 +0100 drm/i915/execlists: Leave tell-tales as to why pending[] is bad Before we BUG out with bad pending state, leave a telltale as to which test failed. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191010071434.31195-2-chris@chris-wilson.co.uk commit a9336ddf448b1cba3080195cec2287af3907236c Author: Deb McLemore Date: Sun May 20 21:04:38 2018 -0500 powerpc/powernv: Add queue mechanism for early messages When issuing a BMC soft poweroff during IPL, the poweroff can be lost so the machine would not poweroff. This is because opal messages can be received before the opal-power code registered its notifiers. Fix it by buffering messages. If we receive a message and do not yet have a handler for that type, store the message and replay when a handler for that type is registered. Signed-off-by: Deb McLemore [mpe: Single unlock path in opal_message_notifier_register(), tweak comments/formatting and change log.] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1526868278-4204-1-git-send-email-debmc@linux.vnet.ibm.com commit 9c4a14f8cceeffa01334e3229888746aa7dd95fe Author: Chris Wilson Date: Thu Oct 10 08:14:25 2019 +0100 drm/i915: Note the addition of timeslicing to the pretend scheduler Since writing the comment that the scheduler is entirely passive, we've added minimal timeslicing which adds the most primitive of active elements (a timeout and reschedule). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Ramalingam C Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191010071434.31195-1-chris@chris-wilson.co.uk commit 29674a1c71be710f8418468aa6a8addd6d1aba1c Author: Qian Cai Date: Tue Sep 17 11:22:30 2019 -0400 powerpc/pkeys: remove unused pkey_allows_readwrite pkey_allows_readwrite() was first introduced in the commit 5586cf61e108 ("powerpc: introduce execute-only pkey"), but the usage was removed entirely in the commit a4fcc877d4e1 ("powerpc/pkeys: Preallocate execute-only key"). Found by the "-Wunused-function" compiler warning flag. Fixes: a4fcc877d4e1 ("powerpc/pkeys: Preallocate execute-only key") Signed-off-by: Qian Cai Acked-by: Ram Pai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1568733750-14580-1-git-send-email-cai@lca.pw commit 7dfd8ac327301f302b03072066c66eb32578e940 Author: Ramon Fontes Date: Thu Oct 10 15:13:07 2019 -0300 mac80211_hwsim: add support for OCB OCB (Outside the Context of a BSS) interfaces are the implementation of 802.11p, support that. Signed-off-by: Ramon Fontes Link: https://lore.kernel.org/r/20191010181307.11821-2-ramonreisfontes@gmail.com Signed-off-by: Johannes Berg commit 3b9176e9a874a848afa7eb2f6943639eb18b7a17 Author: Qian Cai Date: Mon Jul 15 14:32:32 2019 -0400 powerpc/setup_64: fix -Wempty-body warnings At the beginning of setup_64.c, it has, #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) #else #define DBG(fmt...) #endif where DBG() could be compiled away, and generate warnings, arch/powerpc/kernel/setup_64.c: In function 'initialize_cache_info': arch/powerpc/kernel/setup_64.c:579:49: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] DBG("Argh, can't find dcache properties !\n"); ^ arch/powerpc/kernel/setup_64.c:582:49: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] DBG("Argh, can't find icache properties !\n"); Fix it by using the suggestions from Michael: "Neither of those sites should use DBG(), that's not really early boot code, they should just use pr_warn(). And the other uses of DBG() in initialize_cache_info() should just be removed. In smp_release_cpus() the entry/exit DBG's should just be removed, and the spinning_secondaries line should just be pr_debug(). That would just leave the two calls in early_setup(). If we taught udbg_printf() to return early when udbg_putc is NULL, then we could just call udbg_printf() unconditionally and get rid of the DBG macro entirely." Suggested-by: Michael Ellerman Signed-off-by: Qian Cai [mpe: Split udbg change out into previous patch] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1563215552-8166-1-git-send-email-cai@lca.pw commit f7a678a8fa548fdd9e89e006f35b0fd60b6f3acc Author: Michael Ellerman Date: Fri Oct 11 19:30:39 2019 +1100 powerpc/udbg: Make it safe to call udbg_printf() always Make udbg_printf() check if udbg_putc is set, and if not just return. This makes it safe to call udbg_printf() anytime, even when a udbg backend has not been registered, which means we can avoid some ifdefs at call sites. Signed-off-by: Qian Cai [mpe: Split out of larger patch, write change log] Signed-off-by: Michael Ellerman commit b5764696ac409523414f70421c13b7e7a9309454 Author: Ramon Fontes Date: Thu Oct 10 15:13:06 2019 -0300 mac80211_hwsim: add more 5GHz channels, 5/10 MHz support These new 5GHz channels and 5/10 MHz support should be available for OCB usage (802.11p). Signed-off-by: Ramon Fontes Link: https://lore.kernel.org/r/20191010181307.11821-1-ramonreisfontes@gmail.com Signed-off-by: Johannes Berg commit cc78dc3b790619aa05f22a86a9152986bd73698c Author: Abhishek Ambure Date: Thu Oct 3 16:45:22 2019 +0300 ath10k: enable transmit data ack RSSI for QCA9884 For all data packets transmitted, host gets htt tx completion event. Some QCA9984 firmware releases support WMI_SERVICE_TX_DATA_ACK_RSSI, which gives data ack rssi values to host through htt event of data tx completion. Data ack rssi values are valid if A0 bit is set in HTT rx message. So enable the feature also for QCA9884. Tested HW: QCA9984 Tested FW: 10.4-3.9.0.2-00044 Signed-off-by: Abhishek Ambure Signed-off-by: Balaji Pothunoori [kvalo@codeaurora.org: improve commit log] Signed-off-by: Kalle Valo commit 5f63afe0288d9553a9560725d7abbf3fc899a5da Author: Felix Fietkau Date: Tue Oct 8 19:11:39 2019 +0200 mac80211: minstrel_ht: rename prob_ewma to prob_avg, use it for the new average Reduces per-rate data structure size Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20191008171139.96476-3-nbd@nbd.name Signed-off-by: Johannes Berg commit b1103d256704869f94c1399d189618c43724ded6 Author: Felix Fietkau Date: Tue Oct 8 19:11:38 2019 +0200 mac80211: minstrel_ht: replace rate stats ewma with a better moving average Rate success probability usually fluctuates a lot under normal conditions. With a simple EWMA, noise and fluctuation can be reduced by increasing the window length, but that comes at the cost of introducing lag on sudden changes. This change replaces the EWMA implementation with a moving average that's designed to significantly reduce lag while keeping a bigger window size by being better at filtering out noise. It is only slightly more expensive than the simple EWMA and still avoids divisions in its calculation. The algorithm is adapted from an implementation intended for a completely different field (stock market trading), where the tradeoff of lag vs noise filtering is equally important. It is based on the "smoothing filter" from http://www.stockspotter.com/files/PredictiveIndicators.pdf. I have adapted it to fixed-point math with some constants so that it uses only addition, bit shifts and multiplication To better make use of the filtering and bigger window size, the update interval time is cut in half. For testing, the algorithm can be reverted to the older one via debugfs Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20191008171139.96476-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 8f2f495ca93e01b383dc0944689e7595027ca6ec Author: Felix Fietkau Date: Tue Oct 8 19:11:37 2019 +0200 mac80211: minstrel: remove divisions in tx status path Use a slightly different threshold for downgrading spatial streams to make it easier to calculate without divisions. Slightly reduces CPU overhead. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20191008171139.96476-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 2fd351a8772d6eae4800925b17228c9f2d276193 Author: Denis Kenzior Date: Tue Oct 8 11:43:50 2019 -0500 nl80211: trivial: Remove redundant loop cfg80211_assign_cookie already checks & prevents a 0 from being returned, so the explicit loop is unnecessary. Signed-off-by: Denis Kenzior Link: https://lore.kernel.org/r/20191008164350.2836-1-denkenz@gmail.com Signed-off-by: Johannes Berg commit 176a52043ab853f1db7581ed02e1096aba78b4d1 Author: Haishuang Yan Date: Thu Oct 10 22:50:55 2019 +0800 selftests: netfilter: add ipvs tunnel test case Test virtual server via ipip tunnel. Tested: # selftests: netfilter: ipvs.sh # Testing DR mode... # Testing NAT mode... # Testing Tunnel mode... # ipvs.sh: PASS ok 6 selftests: netfilter: ipvs.sh Signed-off-by: Haishuang Yan Signed-off-by: Simon Horman commit 0ed15462069082f12bf89d0d2d2edfe0374b6059 Author: Haishuang Yan Date: Thu Oct 10 22:50:54 2019 +0800 selftests: netfilter: add ipvs nat test case Test virtual server via NAT. Tested: # selftests: netfilter: ipvs.sh # Testing DR mode... # Testing NAT mode... # ipvs.sh: PASS Signed-off-by: Haishuang Yan Signed-off-by: Simon Horman commit 867d2190799ab088479dfeb19d9fa92568be0a19 Author: Haishuang Yan Date: Thu Oct 10 22:50:53 2019 +0800 selftests: netfilter: add ipvs test script Test virutal server via directing routing for IPv4. Tested: # selftests: netfilter: ipvs.sh # Testing DR mode... # ipvs.sh: PASS ok 6 selftests: netfilter: ipvs.sh Signed-off-by: Haishuang Yan Signed-off-by: Simon Horman commit cd1d55f16d48d97d681d9534170ce712ac1d09e7 Author: Hari Bathini Date: Wed Oct 9 20:57:20 2019 +0530 powerpc: make syntax for FADump config options in kernel/Makefile readable arch/powerpc/kernel/fadump.c file needs to be compiled in if 'config FA_DUMP' or 'config PRESERVE_FA_DUMP' is set. The current syntax achieves that but looks a bit odd. Fix it for better readability. Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/157063484064.11906.3586824898111397624.stgit@hbathini.in.ibm.com commit aaa351504449c4babb80753c72920e4b25fbd8a9 Author: Hari Bathini Date: Wed Oct 9 19:34:29 2019 +0530 powerpc/configs: add FADump awareness to skiroot_defconfig FADump is supported on PowerNV platform. To fulfill this support, the petitboot kernel must be FADump aware. Enable config PRESERVE_FA_DUMP to make the petitboot kernel FADump aware. Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/157062986936.23016.10146169203560084401.stgit@hbathini.in.ibm.com commit 0c580d83325ea9a126ce6ae2996c4ff97acd2e40 Author: Arkadiusz Drabczyk Date: Thu Sep 12 22:56:06 2019 +0200 firmware: Update pointer to documentation Documentation was revamped in 113ccc but link in firmware_loader/main.c hasn't been updated. Signed-off-by: Arkadiusz Drabczyk Link: https://lore.kernel.org/r/20190912205606.31095-1-arkadiusz@drabczyk.org Signed-off-by: Greg Kroah-Hartman commit d1a1af2cdf19770d69947769f5d5a16c39de93e6 Author: Michal Simek Date: Tue Oct 8 16:12:06 2019 +0200 hvc: dcc: Add earlycon support Add DCC earlycon support for early printks. The patch is useful for SoC bringup where HW serial console is broken. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/41e2920a6348e65b2e986b0e65b66531e87cd756.1570543923.git.michal.simek@xilinx.com Signed-off-by: Greg Kroah-Hartman commit ec4e29068839e00ff99ae94ccbb46123f0a0ba9d Author: Uwe Kleine-König Date: Wed Oct 9 11:37:46 2019 +0200 driver core: simplify definitions of platform_get_irq* platform_get_irq_optional is just a wrapper for __platform_get_irq. So rename __platform_get_irq to platform_get_irq_optional and drop platform_get_irq_optional's previous implementation. This way there is one function and one indirection less without loss of functionality. Signed-off-by: Uwe Kleine-König Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20191009093746.12095-1-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman commit 6942635032cfd3e003e980d2dfa4e6323a3ce145 Author: Stephan Gerhold Date: Thu Oct 10 17:47:20 2019 +0200 extcon: sm5502: Reset registers during initialization On some devices (e.g. Samsung Galaxy A5 (2015)), the bootloader seems to keep interrupts enabled for SM5502 when booting Linux. Changing the cable state (i.e. plugging in a cable) - until the driver is loaded - will therefore produce an interrupt that is never read. In this situation, the cable state will be stuck forever on the initial state because SM5502 stops sending interrupts. This can be avoided by clearing those pending interrupts after the driver has been loaded. One way to do this is to reset all registers to default state by writing to SM5502_REG_RESET. This ensures that we start from a clean state, with all interrupts disabled. Suggested-by: Chanwoo Choi Signed-off-by: Stephan Gerhold Signed-off-by: Chanwoo Choi commit 41441d85b671ee8d096e8a316dc8e072c210a62f Author: Mahesh Bandewar Date: Wed Oct 9 16:20:11 2019 -0700 ipvlan: consolidate TSO flags using NETIF_F_ALL_TSO This will ensure that any new TSO related flags added (which would be part of ALL_TSO mask and IPvlan driver doesn't need to update every time new flag gets added. Signed-off-by: Mahesh Bandewar Suggested-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit bc7ef86566bb233ff190dd7f4972b537d11558e4 Author: Alex Deucher Date: Wed Oct 9 08:14:03 2019 -0500 drm/amdgpu/swSMU/navi: add feature toggles for more things Add toggles for more power features. Helpful in debugging. Reviewed-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit ff06184a49fde886bcb6150168905e334e22650c Author: Ville Syrjälä Date: Thu Oct 10 16:11:58 2019 +0300 drm/amdgpu/powerplay: Use swap() where appropriate @swap@ identifier TEMP; expression A,B; @@ - TEMP = A; - A = B; - B = TEMP; + swap(A, B); @@ type T; identifier swap.TEMP; @@ ( - T TEMP; | - T TEMP = {...}; ) ... when != TEMP Cc: Rex Zhu Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Alex Deucher Signed-off-by: Ville Syrjälä Signed-off-by: Alex Deucher commit 34b86b75dfc90ab3d996c224314ce51772a3b351 Author: Ville Syrjälä Date: Thu Oct 10 16:11:57 2019 +0300 drm/amd/display: Use swap() where appropriate Mostly a cocci-job, but it flat out refused to remove the declaration in drivers/gpu/drm/amd/display/dc/core/dc.c so had to do that part manually. @swap@ identifier TEMP; expression A,B; @@ - TEMP = A; - A = B; - B = TEMP; + swap(A, B); @@ type T; identifier swap.TEMP; @@ ( - T TEMP; | - T TEMP = {...}; ) ... when != TEMP Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Nicholas Kazlauskas Signed-off-by: Ville Syrjälä Signed-off-by: Alex Deucher commit 6696b8adb8f81b1526b3bb88aa9a4603599157d0 Author: chen gong Date: Sun Sep 29 10:58:43 2019 +0800 drm/amdgpu: Do not implement power-on for SDMA after do mode2 reset on Renoir Find that ring sdma0 test failed if turn on SDMA powergating after do mode2 reset. Perhaps the mode2 reset does not reset the SDMA PG state, SDMA is already powered up so there is no need to ask the SMU to power it up again. So I skip this function for a moment. Signed-off-by: chen gong Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c1972a56ebe113ccc6e59b826b4ccebb72397369 Author: Xiaojie Yuan Date: Wed Oct 9 16:40:59 2019 +0800 drm/amd/powerplay: add more feature bits Additional features that can be enabled in the SMU. Signed-off-by: Xiaojie Yuan Acked-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit e8939b4a0d5e7b559d05f6ab8bbc22492c8505fe Author: Xiaojie Yuan Date: Thu Oct 10 01:01:23 2019 +0800 drm/amdgpu/sdma5: fix mask value of POLL_REGMEM packet for pipe sync sdma will hang once sequence number to be polled reaches 0x1000_0000 Signed-off-by: Xiaojie Yuan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 02fc146748a2c73279298513a629214d3947022e Author: Alex Deucher Date: Wed Oct 2 16:10:24 2019 -0500 drm/amdgpu/powerplay: fix typo in mvdd table setup Polaris and vegam use count for the value rather than level. This looks like a copy paste typo from when the code was adapted from previous asics. I'm not sure that the SMU actually uses this value, so I don't know that it actually is a bug per se. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108609 Reported-by: Robert Strube Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit b9ed69e6fd664d88cf6d8f9623eb3a0d08387b7c Author: Nirmoy Das Date: Fri Oct 4 11:53:37 2019 +0200 drm/amdgpu: fix memory leak cleanup error handling code and make sure temporary info array with the handles are freed by amdgpu_bo_list_put() on idr_replace()'s failure. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 6e4be98767b249923e97b5a3c509e722d22e462d Author: Tao Zhou Date: Mon Sep 30 14:48:19 2019 +0800 drm/amdgpu: avoid ras error injection for retired page check whether a page is bad page before umc error injection, bad page should not be accessed again Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 4e930d96c906b8512c73038209038d48a70398a9 Author: Luben Tuikov Date: Wed Oct 2 00:02:18 2019 -0400 drm/amdgpu: Use the ALIGN() macro Use the ALIGN() macro to set "num_dw" to a multiple of 8, i.e. lower 3 bits cleared. Signed-off-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 54e9ab2edb2576b58d905d2385a0cbfc0750c7e4 Author: Alex Deucher Date: Tue Oct 8 13:08:30 2019 -0500 drm/amdgpu/ras: document the reboot ras option We recently added it, but never documented it. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit a20bfd0fd41fd0570d0b395d1d86e5578adac4d4 Author: Alex Deucher Date: Tue Oct 8 13:04:33 2019 -0500 drm/amdgpu/ras: fix typos in documentation Fix a couple of spelling typos. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 976035dd4f68d07b6c075fbed501814bfa6fb986 Author: Dmytro Laktyushkin Date: Fri Sep 13 11:33:27 2019 -0400 drm/amd/display: add renoir specific watermark range and clk helper Doing this allows us to split it for diffrent asics. This design will be helpful for future Asciis. Signed-off-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher commit a51894f015aff62472b1ccad287d3db6d669f879 Author: Eric Yang Date: Thu Aug 22 11:54:41 2019 -0400 drm/amd/display: hook up notify watermark ranges and get clock table [Why] Previously SMU was giving us 0s for the clock table. Now they have valid clock table. We should use theirs. Also, need to send SMU watermark ranges for selecting optimal watermarks. Signed-off-by: Eric Yang Signed-off-by: Alex Deucher commit a0dd575b7b9ad356a615e141068bdca6dee0bced Author: Sung Lee Date: Tue Sep 24 13:20:33 2019 -0400 drm/amd/display: Skip DIG Check if Link is Virtual for Display Count [WHY] Without a check for virtual links, every link's DIG was getting checked for enabled or disabled. If link was virtual, since it did not have a DIG, this would cause issues. [HOW] Skip DIG Enable check if link is virtual and add virtual link to to display count. Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4a36fcbaec4e9beebf3023c95b2f4a76dbf7fd73 Author: Wayne Lin Date: Thu Sep 19 17:41:02 2019 +0800 drm/amd/display: correct stream LTE_340MCSC_SCRAMBLE value [Why] HDMI 2.0 requires scrambling under specific conditions. We refer to stream property LTE_340MCSC_SCRAMBLE to determine whether en/dis scrambling. While creating stream for sink, we setup LTE_340MCSC_SCRAMBLE by referring to edid_caps. However, dm_helpers_parse_edid_caps() doesn't construct HDMI Forum block data for edid_caps. Moreover, fill_stream_properties_from_drm_display_mode() aslo unconsciously clear the LTE_340MCSC_SCRAMBLE flag. [How] Drm already provides drm_display_info to refer HDMI Forum vsdb info. Set stream LTE_340MCSC_SCRAMBLE by drm_display_info and remove memset in fill_stream_properties_from_drm_display_mode() Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit dd998291dbe92106d8c4a7581c409b356928d711 Author: David Galiffi Date: Fri Sep 20 20:20:23 2019 -0400 drm/amd/display: Fix dongle_caps containing stale information. [WHY] During detection: function: get_active_converter_info populates link->dpcd_caps.dongle_caps only when dpcd_rev >= DPCD_REV_11 and DWN_STRM_PORTX_TYPE is DOWN_STREAM_DETAILED_HDMI or DOWN_STREAM_DETAILED_DP_PLUS_PLUS. Otherwise, it is not cleared, and stale information remains. During mode validation: function: dp_active_dongle_validate_timing reads link->dpcd_caps.dongle_caps->dongle_type to determine the maximum pixel clock to support. This information is now stale and no longer valid. [HOW] dp_active_dongle_validate_timing should be using link->dpcd_caps->dongle_type instead. Signed-off-by: David Galiffi Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 8396745da8f059048f6b01222c933e8ca4ea0597 Author: Jaehyun Chung Date: Mon Sep 23 10:00:57 2019 -0400 drm/amd/display: Add capability check for static ramp calc [Why] Static ramp to max refresh rate does not have capability check on calculated v_total. Programming a lower v_total_min and max than the total causes continuous spurious HPDs. [How] Add a capability check after v_total calculation similar to calculate v_total helper functions. Signed-off-by: Jaehyun Chung Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit fc067805ac50f134c2be182dec8d6df12fd4218a Author: Aric Cyr Date: Mon Sep 23 08:16:36 2019 -0400 drm/amd/display: 3.2.54 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 33fd29007d74ed1bd86b9b9af73624bab01bc9a7 Author: Xiaodong Yan Date: Fri Aug 30 17:07:01 2019 +0800 drm/amd/display: make aux defer delay and aux sw start delay seperate [why] 1. defer delay and sw start delay has been mixed up, defer delay was programmed to AUX_SW_CONTROL:AUX_SW_START_DELAY. 2. There's no delay for defer [how] 1. Set aux sw start to 0 2. Add delay for defer scenario Signed-off-by: Xiaodong Yan Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit ce10a0f39b1949e9262f9dabbede65bf598516ec Author: Charlene Liu Date: Tue Sep 17 20:28:40 2019 -0400 drm/amd/display: use vbios message to call smu for dpm level [Description] use vbios message to call smu for dpm level also only program dmdata in vsyncflip as HW requirement. Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 52883b36f70ad39e58c57e7ddacad251ad02ee7f Author: Leo Li Date: Fri Sep 20 09:43:36 2019 -0400 drm/amd/display: Fix maybe-uninitialized warning [Why] Compiling with GCC 9.1.0 gives the following warning (I have warnings-as-errors enabled): drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/core/dc.c: In function 'dc_validate_seamless_boot_timing': drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/core/dc.c:1180:8: error: 'se' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1180 | if (!se->funcs->dp_get_pixel_format( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1181 | se, | ~~~ 1182 | &hw_crtc_timing.pixel_encoding, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1183 | &hw_crtc_timing.display_color_depth)) [How] Initialize se to NULL. Signed-off-by: Leo Li Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 93c2340bdc24b6067a7621e71d4aacac1f85b5f2 Author: Martin Leung Date: Tue Sep 17 14:50:22 2019 -0400 drm/amd/display: add more checks to validate seamless boot timing [why] we found using an active DP to HDMI panel that we weren't validating dp_pixel_format and hardware timing v_front_porch, causing screen to blank and/or corrupt while attempting a seamless boot. [how] added checks during dc_validate_seamless_boot_timing for these values Signed-off-by: Martin Leung Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 566b4252fe9da9582dde008c5e9c3eb7c136e348 Author: Vitaly Prosyak Date: Mon Sep 16 17:04:33 2019 -0500 drm/amd/display: add new active dongle to existent w/a [Why & How] Dongle 0x00E04C power down all internal circuits including AUX communication preventing reading DPCD table. Encoder will skip DP RX power down on disable output to keep receiver powered all the time. Signed-off-by: Vitaly Prosyak Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Acked-by: Vitaly Prosyak Signed-off-by: Alex Deucher commit b356843ee584a97fa38046b28d833988d42c0256 Author: Michael Strauss Date: Tue Sep 17 09:02:01 2019 -0400 drm/amd/display: Update number of dcn21 audio endpoints [WHY] Number of audio endpoints wasn't updated from dcn20's 6 when created [HOW] Changed num_audio to 4 to match the correct sbios value Signed-off-by: Michael Strauss Reviewed-by: Yongqiang Sun Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit ac81c2a75bcc9dce5ea80282b7d181e78b37c166 Author: Joseph Gravenor Date: Mon Sep 16 15:13:33 2019 -0400 drm/amd/display: add guard for SMU ver, for 48mhz clk [why] dp_48m_refclk_driver_pwdn is persistent through S3 and S5. This was worked arround in SMU FW 55.21.0. Earlier FW don't have this fix so we will hang on reboot [how] add a guard for smu versions before SMU FW 55.21.0 Signed-off-by: Joseph Gravenor Signed-off-by: Alex Deucher commit 57133a28bcaf6e692b161e35c6778ee54b47f9e6 Author: Eric Yang Date: Thu Jul 18 13:56:59 2019 -0400 drm/amd/display: fix code to control 48mhz refclk [Why] The SMU message to enable this feature looks at argument. Previous code didn't send right argument. This change will allow the feature to be be enabled. [How] Fixed one issue where SMU message to enable the feature was sent without setting the parameter. Signed-off-by: Eric Yang Signed-off-by: Alex Deucher commit ab4a4072f260162284c15789329522a6773023ed Author: Eric Yang Date: Fri Sep 6 18:26:23 2019 -0400 drm/amd/display: exit PSR during detection [Why] If 48mhz refclk is turned off during PSR, we will have issue doing link training during detection. [How] Get out of PSR before detection Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit edb922b022c0c94805c4ffad202b3edff83d76f0 Author: Julian Parkin Date: Thu Aug 29 17:06:05 2019 -0400 drm/amd/display: Program DWB watermarks from correct state [Why] When diags adds a DWB via a stream update, we calculate MMHUBBUB paramaters, but dc->current_state has not yet been updated when the DWB programming happens. This leads to overflow on high bandwidth tests since the incorrect MMHUBBUB arbitration parameters are programmed. [How] Pass the updated context down to the (enable|update)_writeback functions so that they can use the correct watermarks when programming MMHUBBUB. Signed-off-by: Julian Parkin Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 1503676caf09b3d60cc8d9de279dc1d743f49237 Author: Aric Cyr Date: Sat Sep 14 11:19:18 2019 -0400 drm/amd/display: 3.2.53 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit f432f0060f059085f9d520693befb1b803b842e8 Author: Wesley Chalmers Date: Fri Sep 13 13:43:36 2019 -0400 drm/amd/display: Use dcn1 Optimal Taps Get [WHY] dpp2_get_optimal_number_of_taps is incorrect, and dcn2 should be using dpp1_get_optimal_number_of_taps instead Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 82db2e3c39dbe9dcbfbd78aa6341647554faaaf9 Author: Sivapiriyan Kumarasamy Date: Thu Sep 12 15:55:44 2019 -0400 drm/amd/display: fix bug with check for HPD Low in verify link cap [Why] There is a bug when determining if link training should be retried when HPD is low in dp_verify_link_cap_with_retries. [How] Correctly, fail dp_verify_link_cap_with_retries without retry when HPD is low. Signed-off-by: Sivapiriyan Kumarasamy Reviewed-by: Wenjing Liu Acked-by: Abdoulaye Berthe Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 15caeabc5787c15babad7ee444afe9c26df1c8b3 Author: Josip Pavic Date: Thu Sep 12 15:40:08 2019 -0400 drm/amd/display: wait for set pipe mcp command completion [Why] When the driver sends a pipe set command to the DMCU FW, it does not wait for the command to complete. This can lead to unpredictable behavior if, for example, the driver were to request a pipe disable to the FW via MCP, then power down some hardware before the firmware has completed processing the command. [How] Wait for the DMCU FW to finish processing set pipe commands Signed-off-by: Josip Pavic Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 486cc0ee550e619660926e162f68e96a64702216 Author: Nikola Cornij Date: Thu Sep 12 17:15:16 2019 -0400 drm/amd/display: Add output bitrate to DML calculations [why] Output bitrate was mistakenly left out, causing corruption on some DSC low resolution (such as 800x600) modes. Signed-off-by: Nikola Cornij Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit c59802313e84bede954235b3a5dd0dd5325f49c5 Author: Aric Cyr Date: Wed Sep 11 16:17:08 2019 -0400 drm/amd/display: Properly round nominal frequency for SPD [Why] Some displays rely on the SPD verticle frequency maximum value. Must round the calculated refresh rate to the nearest integer. [How] Round the nominal calculated refresh rate to the nearest whole integer. Signed-off-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 62f3abd1533900751b953d562d72c7d73978a85f Author: Joshua Aberback Date: Thu Sep 12 13:14:52 2019 -0400 drm/amd/display: Restore should_update_pstate_support after bad revert [Why] This function was mistakenly reverted as part of a legitimate revert. The old version that was reverted to has bad logic, and is causing situations where p-state change support is being toggled when it shouldn't be, resulting in hangs. Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit f537d474df15393ad25721f5203ce16ed3596d66 Author: Lewis Huang Date: Thu Sep 5 15:33:58 2019 +0800 drm/amd/display: check phy dpalt lane count config [Why] Type-c PHY config is not align with dpcd lane count. When those values didn't match, it cause driver do link training with 4 lane but phy only can output 2 lane. The link trainig always fail. [How] 1. Modify get_max_link_cap function. According DPALT_DP4 to update max lane count. 2. Add dp_mst_verify_link_cap to handle MST case because we didn't call dp_mst_verify_link_cap for MST case. Signed-off-by: Lewis Huang Reviewed-by: Wenjing Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d832fc3b182045185e3dd92e20ac31c84be68da7 Author: Wayne Lin Date: Wed Sep 4 05:31:16 2019 +0800 drm/amd/display: build up VSIF infopacket [Why] Didn't send VSIF infopacket when it's 4k mode defined in HDMI 1.4b. For HDMI 1.4b, While displaying 4k modes, it should send VSP. [How] Call mod_build_hf_vsif_infopacket() function to build info frame and send it. Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit f4ce271b6ae99869620c3f716985f200833f1f28 Author: Anthony Koo Date: Mon Sep 9 10:27:31 2019 -0400 drm/amd/display: 3.2.52 Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d56eaa7cfb098598abcee1fb1fe23ad2f08e1e30 Author: Joshua Aberback Date: Fri Sep 6 17:34:19 2019 -0400 drm/amd/display: Add missing shifts and masks for dpp registers on dcn2 [Why] The register CM_TEST_DEBUG_DATA is used in dpp1_program_input_csc, which is called from dpp2_cnv_setup, but the shifts and masks for the fields of that register are not initialized for dcn2. This causes all reads of that register to return 0. Signed-off-by: Joshua Aberback Reviewed-by: Jaehyun Chung Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit deb79818e1b420ee593443230eafb932094f0674 Author: Jun Lei Date: Mon Sep 9 11:05:33 2019 -0400 drm/amd/display: add explicit comparator as default optimization check [why] memcmp is vulnerable to regression due to dc_clocks structures not being organized properly (not "current" clock related structures being at the beginning of the structure) and causes unnecessary setting of the optimize bit [how] add a dcn sepcific comparator, implement for dcn2 Signed-off-by: Jun Lei Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 3c2381b92cba739b19be9beecdcb49d4730a42f2 Author: Wayne Lin Date: Wed Sep 4 05:18:31 2019 +0800 drm/amd/display: add support for VSIP info packet [Why] The vendor specific infoframe is needed for HDMI while displaying specific modes. DC supports sending it, but we aren't currently building it [How] Add mod_build_hf_vsif_infopacket() to build the vendor specific info packet. Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 9ae1b27f31d0e8fb09720b35bb873fe8b8d4630e Author: Joseph Gravenor Date: Wed Sep 4 12:43:05 2019 -0400 drm/amd/display: fix hotplug during display off [why] HPD is not suppressed when we lower clocks on renoir. B/c of this we do link training when the 48mhz refclk is off, which will cause ASIC hang. [how] Exit optimized power state for detection purpose. Signed-off-by: Joseph Gravenor Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 8b8eda01441050e60c73172e144bab3c7cdef5e9 Author: Dmytro Laktyushkin Date: Fri Sep 6 11:12:14 2019 -0400 drm/amd/display: fix pipe re-assignment when odm present Currently pipe split may steal an existing ODM pipe depending on stream sequence. This change prevents that from happening as easily. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Gary Kattan Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 377c9d047379140bcb31bb3bd800898bd143829a Author: Julian Parkin Date: Thu Aug 22 16:32:05 2019 -0400 drm/amd/display: Reprogram FMT on pipe change [Why] When planes are added or removed from a stream, the change in pipe usage from dynamic MPC combine can cause a second stream using ODM combine to pick a different pipe to combine with. In this scenario, a different OPP is connected to the ODM without programming its FMT. [How] Reprogram the FMT in dcn20_program_pipe whenever a pipe is newly enabled, or when its opp changes. Signed-off-by: Julian Parkin Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 1caba4e83b9d8a322375de04d2cfe23d7ccc1b89 Author: Aric Cyr Date: Fri Sep 6 16:24:54 2019 -0400 drm/amd/display: Update V_UPDATE whenever VSTARTUP changes [Why] If VSTARTUP changes due to bandwidth requirements, we must recalculate and update VLINE2 as well for proper flip reporting. [How] After all calls to program_global_sync which reconfigures VSTARTUP, also make sure to update V_UPDATE (i.e. VLINE2 on DCNx). Signed-off-by: Aric Cyr Reviewed-by: Sivapiriyan Kumarasamy Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit cbc697b2e3bfcb0dacced1d3e88ba99481831c42 Author: Wyatt Wood Date: Tue Sep 3 10:29:00 2019 -0400 drm/amd/display: Add Logging for Gamma Related information [Why] A recent bug showed that logging would be useful in debugging various gamma issues. [How] Fix formatting for easier graphing. Prevent performance hit when doing diag. Signed-off-by: Wyatt Wood Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit ef5a7d266e828e45b88cbbc36f69b2d12464375c Author: Wenjing Liu Date: Tue Sep 3 17:15:48 2019 -0400 drm/amd/display: skip enable stream on disconnected display [why] Virtual signal means there is no display attached. In this case we will assign a virtual signal type to the stream. We should only enable the front end of the stream but not the back end. [how] When stream is enabling with virtual signal type, skip backend programming. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 1cb1d47741bf02d7fd570aab11103041cd512a5d Author: Wayne Lin Date: Wed Sep 4 06:12:22 2019 +0800 drm/amd/display: Correct values in AVI infoframe [Why] While displaying 4k modes defined in HDMI1.4b, should set VIC to 0 and use VSP HDMI_VIC to indicate the mode. [How] Use functions defined in drm to set up the VIC correspondingly. Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 90d268741f74f7852ebc295c96212c6e992b2078 Author: Robin Singh Date: Thu Aug 22 14:42:49 2019 -0400 drm/amd/display: Added pixel dynamic expansion control. [Why] To compare the crc of the framebuffer data at input of display pipeline with the crc of the otg, we need to disable pixel formatter's dynamic expansion feature during crc capture and keep it enable in the normal operation. [HOW] Expose a new interface in DM and dc for pixel formatter (fmt dynamic bitdepth expansion control). Interface control the FMT_DYNAMIC_EXP_EN bit, during crc capture keep it disabled. Signed-off-by: Robin Singh Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit f81b86a043270eb5f7e3a80354bea88d0b43ff6f Author: Oak Zeng Date: Mon Oct 7 15:32:23 2019 -0500 drm/amdgpu: Enable gfx cache probing on HDP write for arcturus This allows gfx cache to be probed and invalidated (for none-dirty cache lines) on a HDP write (from either another GPU or CPU). This should work only for the memory mapped as RW memory type newly added for arcturus, to achieve some cache coherence b/t multiple memory clients. Signed-off-by: Oak Zeng Acked-by: Christian Konig Signed-off-by: Alex Deucher commit cb1545f7101adfd3c0e1a0efb1310b62a8f22451 Author: Oak Zeng Date: Mon Oct 7 15:21:03 2019 -0500 drm/amdgpu: Clean up gmc_v9_0_gart_enable Many logic in this function are HDP set up, not gart set up. Moved those logic to gmc_v9_0_hw_init. No functional change. Signed-off-by: Oak Zeng Acked-by: Christian konig Signed-off-by: Alex Deucher commit 6f3bf46a7e8470ef1a76d53885a7876c1025027c Author: Marek Olšák Date: Wed Sep 25 15:50:17 2019 -0400 drm/amdgpu: simplify gds_compute_max_wave_id computation Use asic constants. Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 48d9b0d43105e0da2b7c135eedd24e51234fb5e4 Author: Logan Gunthorpe Date: Thu Oct 10 17:36:26 2019 -0600 block: account statistics for passthrough requests Presently, passthrough requests are not accounted for because blk_do_io_stat() expressly rejects them. Based on some digging in the history, this doesn't seem like a concious decision but one that evolved from the change from blk_fs_request() to blk_rq_is_passthrough(). To support this, call blk_account_io_start() in blk_execute_rq_nowait() and remove the passthrough check in blk_do_io_stat(). Link: https://lore.kernel.org/linux-block/20191010100526.GA27209@lst.de/ Signed-off-by: Logan Gunthorpe Cc: Jens Axboe Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 63098555cfe09a633b74a3c9963769c6d4df8432 Merge: e0b68fb186b2 666b2c10ee9d Author: Daniel Borkmann Date: Fri Oct 11 01:49:16 2019 +0200 Merge branch 'bpf-romap-known-scalars' Andrii Nakryiko says: ==================== With BPF maps supporting direct map access (currently, array_map w/ single element, used for global data) that are read-only both from system call and BPF side, it's possible for BPF verifier to track its contents as known constants. Now it's possible for user-space control app to pre-initialize read-only map (e.g., for .rodata section) with user-provided flags and parameters and rely on BPF verifier to detect and eliminate dead code resulting from specific combination of input parameters. v1->v2: - BPF_F_RDONLY means nothing, stick to just map->frozen (Daniel); - stick to passing just offset into map_direct_value_addr (Martin). ==================== Signed-off-by: Daniel Borkmann commit 666b2c10ee9d51f14d04c416a14b1cb6fd0846e4 Author: Andrii Nakryiko Date: Wed Oct 9 13:14:58 2019 -0700 selftests/bpf: Add read-only map values propagation tests Add tests checking that verifier does proper constant propagation for read-only maps. If constant propagation didn't work, skipp_loop and part_loop BPF programs would be rejected due to BPF verifier otherwise not being able to prove they ever complete. With constant propagation, though, they are succesfully validated as properly terminating loops. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191009201458.2679171-3-andriin@fb.com commit a23740ec43ba022dbfd139d0fe3eff193216272b Author: Andrii Nakryiko Date: Wed Oct 9 13:14:57 2019 -0700 bpf: Track contents of read-only maps as scalars Maps that are read-only both from BPF program side and user space side have their contents constant, so verifier can track referenced values precisely and use that knowledge for dead code elimination, branch pruning, etc. This patch teaches BPF verifier how to do this. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191009201458.2679171-2-andriin@fb.com commit 71229c84aa037cc5ad6fdec498469a28357744f8 Author: Roman Mashak Date: Wed Oct 9 16:53:51 2019 -0400 tc-testing: updated pedit test cases Added test case for layered IP operation for a single source IP4/IP6 address and a single destination IP4/IP6 address. Signed-off-by: Roman Mashak Signed-off-by: Jakub Kicinski commit 7ed093602e0e1b60a0fc074a9692687e7d2b723d Merge: 97ea56540ffc 354c2d310082 Author: Dave Airlie Date: Fri Oct 11 09:30:52 2019 +1000 Merge tag 'drm-misc-next-2019-10-09-2' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.5: UAPI Changes: -Colorspace: Expose different prop values for DP vs. HDMI (Gwan-gyeong Mun) -fourcc: Add DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED (Raymond) -not_actually: s/ENOTSUPP/EOPNOTSUPP/ in drm_edid and drm_mipi_dbi. This should not reach userspace, but adding here to specifically call that out (Daniel) -i810: Prevent underflow in dispatch ioctls (Dan) -komeda: Add ACLK sysfs attribute (Mihail) -v3d: Allow userspace to clean up after render jobs (Iago) Cross-subsystem Changes: -MAINTAINERS: -Add Alyssa & Steven as panfrost reviewers (Rob) -Add Jernej as DE2 reviewer (Maxime) -Add Chen-Yu as Allwinner maintainer (Maxime) -staging: Make some stack arrays static const (Colin) Core Changes: -ttm: Allow drivers to specify their vma manager (to use gem mgr) (Gerd) -docs: Various fixes in connector/encoder/bridge docs (Daniel, Lyude, Laurent) -connector: Allow more than 3 possible encoders for a connector (José) -dp_cec: Allow a connector to be associated with a cec device (Dariusz) -various: Fix some compile/sparse warnings (Ville) -mm: Ensure mm node removals are properly serialised (Chris) -panel: Specify the type of panel for drm_panels for later use (Laurent) -panel: Use drm_panel_init to init device and funcs (Laurent) -mst: Refactors and cleanups in anticipation of suspend/resume support (Lyude) -vram: -Add lazy unmapping for gem bo's (Thomas) -Unify and rationalize vram mm and gem vram (Thomas) -Expose vmap and vunmap for gem vram objects (Thomas) -Allow objects to be pinned at the top of vram to avoid fragmentation (Thomas) Driver Changes: -various: Include drm_bridge.h instead of relying on drm_crtc.h (Boris) -ast/mgag200: Refactor show_cursor(), move cursor to top of video mem (Thomas) -komeda: -Add error event printing (behind CONFIG) and reg dump support (Lowry) -Add suspend/resume support (Lowry) -Workaround D71 shadow registers not flushing on disable (Lowry) -meson: Add suspend/resume support (Neil) -omap: Miscellaneous refactors and improvements (Tomi/Jyri) -panfrost/shmem: Silence lockdep by using mutex_trylock (Rob) -panfrost: Miscellaneous small fixes (Rob/Steven) -sti: Fix warnings (Benjamin/Linus) -sun4i: -Add vcc-dsi regulator to sun6i_mipi_dsi (Jagan) -A few patches to figure out the DRQ/start delay calc on dsi (Jagan/Icenowy) -virtio: -Add module param to switch resource reuse workaround on/off (Gerd) -Avoid calling vmexit while holding spinlock (Gerd) -Use gem shmem helpers instead of ttm (Gerd) -Accommodate command buffer allocations too big for cma (David) Cc: Rob Herring Cc: Maxime Ripard Cc: Gwan-gyeong Mun Cc: Gerd Hoffmann Cc: Laurent Pinchart Cc: Lyude Paul Cc: José Roberto de Souza Cc: Dariusz Marcinkiewicz Cc: Ville Syrjälä Cc: Raymond Smith Cc: Chris Wilson Cc: Colin Ian King Cc: Thomas Zimmermann Cc: Dan Carpenter Cc: Mihail Atanassov Cc: Lowry Li Cc: Neil Armstrong Cc: Jyri Sarha Cc: Tomi Valkeinen Cc: Alyssa Rosenzweig Cc: Steven Price Cc: Benjamin Gaignard Cc: Linus Walleij Cc: Jagan Teki Cc: Icenowy Zheng Cc: Iago Toral Quiroga Cc: David Riley Signed-off-by: Dave Airlie # gpg: Signature made Thu 10 Oct 2019 01:00:47 AM AEST # gpg: using RSA key 732C002572DCAF79 # gpg: Can't check signature: public key not found # Conflicts: # drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c # drivers/gpu/drm/i915/i915_drv.c # drivers/gpu/drm/i915/i915_gem.c # drivers/gpu/drm/i915/i915_gem_gtt.c # drivers/gpu/drm/i915/i915_vma.c From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191009150825.GA227673@art_vandelay commit f063d58b423d818a9b63007322ac0be667a897e4 Author: YueHaibing Date: Wed Oct 9 23:03:25 2019 +0800 ptp: ptp_dte: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Jakub Kicinski commit fefad9ef58ffc228f7b78b667c2aea8267503350 Author: Christian Brauner Date: Tue Sep 24 08:44:20 2019 +0200 seccomp: simplify secure_computing() Afaict, the struct seccomp_data argument to secure_computing() is unused by all current callers. So let's remove it. The argument was added in [1]. It was added because having the arch supply the syscall arguments used to be faster than having it done by secure_computing() (cf. Andy's comment in [2]). This is not true anymore though. /* References */ [1]: 2f275de5d1ed ("seccomp: Add a seccomp_data parameter secure_computing()") [2]: https://lore.kernel.org/r/CALCETrU_fs_At-hTpr231kpaAd0z7xJN4ku-DvzhRU6cvcJA_w@mail.gmail.com Signed-off-by: Christian Brauner Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Will Drewry Cc: Oleg Nesterov Cc: linux-arm-kernel@lists.infradead.org Cc: linux-parisc@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linux-um@lists.infradead.org Cc: x86@kernel.org Acked-by: Borislav Petkov Acked-by: Andy Lutomirski Link: https://lore.kernel.org/r/20190924064420.6353-1-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit 1f1a65d495df99925a497b2c602200c7532723e5 Author: Maciej Falkowski Date: Thu Sep 26 13:02:19 2019 +0200 ASoC: samsung: i2s: Document clocks macros Document clocks macros with their description from 'Documentation/devicetree/bindings/sound/samsung-i2s.txt' Signed-off-by: Maciej Falkowski Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 0eebfed2954f152259cae0ad57b91d3ea92968e8 Author: Christian Brauner Date: Fri Sep 20 10:30:07 2019 +0200 seccomp: test SECCOMP_USER_NOTIF_FLAG_CONTINUE Test whether a syscall can be performed after having been intercepted by the seccomp notifier. The test uses dup() and kcmp() since it allows us to nicely test whether the dup() syscall actually succeeded by comparing whether the fds refer to the same underlying struct file. Signed-off-by: Christian Brauner Cc: Andy Lutomirski Cc: Will Drewry Cc: Shuah Khan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: Tycho Andersen CC: Tyler Hicks Cc: stable@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: netdev@vger.kernel.org Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20190920083007.11475-4-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit fb3c5386b382d4097476ce9647260fc89b34afdb Author: Christian Brauner Date: Fri Sep 20 10:30:05 2019 +0200 seccomp: add SECCOMP_USER_NOTIF_FLAG_CONTINUE This allows the seccomp notifier to continue a syscall. A positive discussion about this feature was triggered by a post to the ksummit-discuss mailing list (cf. [3]) and took place during KSummit (cf. [1]) and again at the containers/checkpoint-restore micro-conference at Linux Plumbers. Recently we landed seccomp support for SECCOMP_RET_USER_NOTIF (cf. [4]) which enables a process (watchee) to retrieve an fd for its seccomp filter. This fd can then be handed to another (usually more privileged) process (watcher). The watcher will then be able to receive seccomp messages about the syscalls having been performed by the watchee. This feature is heavily used in some userspace workloads. For example, it is currently used to intercept mknod() syscalls in user namespaces aka in containers. The mknod() syscall can be easily filtered based on dev_t. This allows us to only intercept a very specific subset of mknod() syscalls. Furthermore, mknod() is not possible in user namespaces toto coelo and so intercepting and denying syscalls that are not in the whitelist on accident is not a big deal. The watchee won't notice a difference. In contrast to mknod(), a lot of other syscall we intercept (e.g. setxattr()) cannot be easily filtered like mknod() because they have pointer arguments. Additionally, some of them might actually succeed in user namespaces (e.g. setxattr() for all "user.*" xattrs). Since we currently cannot tell seccomp to continue from a user notifier we are stuck with performing all of the syscalls in lieu of the container. This is a huge security liability since it is extremely difficult to correctly assume all of the necessary privileges of the calling task such that the syscall can be successfully emulated without escaping other additional security restrictions (think missing CAP_MKNOD for mknod(), or MS_NODEV on a filesystem etc.). This can be solved by telling seccomp to resume the syscall. One thing that came up in the discussion was the problem that another thread could change the memory after userspace has decided to let the syscall continue which is a well known TOCTOU with seccomp which is present in other ways already. The discussion showed that this feature is already very useful for any syscall without pointer arguments. For any accidentally intercepted non-pointer syscall it is safe to continue. For syscalls with pointer arguments there is a race but for any cautious userspace and the main usec cases the race doesn't matter. The notifier is intended to be used in a scenario where a more privileged watcher supervises the syscalls of lesser privileged watchee to allow it to get around kernel-enforced limitations by performing the syscall for it whenever deemed save by the watcher. Hence, if a user tricks the watcher into allowing a syscall they will either get a deny based on kernel-enforced restrictions later or they will have changed the arguments in such a way that they manage to perform a syscall with arguments that they would've been allowed to do anyway. In general, it is good to point out again, that the notifier fd was not intended to allow userspace to implement a security policy but rather to work around kernel security mechanisms in cases where the watcher knows that a given action is safe to perform. /* References */ [1]: https://linuxplumbersconf.org/event/4/contributions/560 [2]: https://linuxplumbersconf.org/event/4/contributions/477 [3]: https://lore.kernel.org/r/20190719093538.dhyopljyr5ns33qx@brauner.io [4]: commit 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Co-developed-by: Kees Cook Signed-off-by: Christian Brauner Reviewed-by: Tycho Andersen Cc: Andy Lutomirski Cc: Will Drewry CC: Tyler Hicks Link: https://lore.kernel.org/r/20190920083007.11475-2-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit 7ae8b2f5dfb357f0627aa5952c7d36cadafc408c Author: Simon Horman Date: Mon Sep 23 14:14:04 2019 +0200 dt-bindings: rtc: rtc-sh: convert bindings to json-schema Convert Real Time Clock for Renesas SH and ARM SoCs bindings documentation to json-schema. Also name bindings documentation file according to the compat string being documented. Also correct syntax error in interrupts field in example. Signed-off-by: Simon Horman Reviewed-by: Ulrich Hecht Acked-by: Alexandre Belloni Signed-off-by: Rob Herring commit 223e660bc7638d126a0e4fbace4f33f2895788c4 Author: Christian Brauner Date: Fri Sep 20 10:30:06 2019 +0200 seccomp: avoid overflow in implicit constant conversion USER_NOTIF_MAGIC is assigned to int variables in this test so set it to INT_MAX to avoid warnings: seccomp_bpf.c: In function ‘user_notification_continue’: seccomp_bpf.c:3088:26: warning: overflow in implicit constant conversion [-Woverflow] #define USER_NOTIF_MAGIC 116983961184613L ^ seccomp_bpf.c:3572:15: note: in expansion of macro ‘USER_NOTIF_MAGIC’ resp.error = USER_NOTIF_MAGIC; ^~~~~~~~~~~~~~~~ Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Signed-off-by: Christian Brauner Reviewed-by: Tyler Hicks Cc: Andy Lutomirski Cc: Will Drewry Cc: Shuah Khan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: Tycho Andersen Cc: stable@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: netdev@vger.kernel.org Cc: bpf@vger.kernel.org Reviewed-by: Tycho Andersen Link: https://lore.kernel.org/r/20190920083007.11475-3-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit bc43cee88aa128c32239a87c523af7c531589f6d Author: Robin Murphy Date: Mon Oct 7 12:33:26 2019 +0100 arm64: dts: rockchip: Update nanopi4 phy reset properties Use the now-preferred generic phy reset properties instead of the dwmac-specific ones. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/4d16c24ae3651a2119cf5bb1213f46a9fce4b39a.1570444773.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit f94ffd95cb7699ec424e856d42f03b12d67f71a4 Author: Robin Murphy Date: Mon Oct 7 12:33:25 2019 +0100 arm64: dts: rockchip: Enable nanopi4 HDMI audio All the nanopi4 boards have HDMI, so let them make noise on it. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/7fe6e94e4b9f5986f19f2637b7b716f0cb54de1b.1570444701.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit 99e0b62152fafb37952ea88fcb2198efb1b6476b Author: Krzysztof Kozlowski Date: Fri Sep 20 18:36:35 2019 +0200 dt-bindings: crypto: samsung: Convert SSS and SlimSSS bindings to json-schema Convert Samsung Exynos Security SubSystem (SSS) and SlimSSS hardware crypto accelerator bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit a2c02a4304eb6588b72522308db1208438880d0e Author: Krzysztof Kozlowski Date: Wed Sep 18 19:31:37 2019 +0200 dt-bindings: memory-controllers: Convert Samsung Exynos SROM bindings to json-schema Convert Samsung Exynos SROM controller bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 6233269bce47bd450196a671ab28eb1ec5eb88d9 Author: Matthias Kaehlcke Date: Thu Oct 3 09:41:52 2019 -0700 ARM: dts: rockchip: Use interpolated brightness tables for veyron Use interpolated brightness tables (added by commit 573fe6d1c25 ("backlight: pwm_bl: Linear interpolation between brightness-levels") for veyron, instead of specifying every single step. Some devices/panels have intervals that are smaller than the specified 'num-interpolated-steps', the driver interprets these intervals as a single step. Another option would be to switch to a perceptual brightness curve (CIE 1931), with the caveat that it would change the behavior of the backlight. Also the concept of a minimum brightness level is currently not supported for CIE 1931 curves. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20191003094137.v2.1.Ic9fd698810ea569c465350154da40b85d24f805b@changeid Signed-off-by: Heiko Stuebner commit 87d8ae980e1944331f93e0488e16bd3bec4554c7 Author: Heiko Stuebner Date: Wed Aug 22 14:09:25 2018 +0200 arm64: dts: rockchip: add cr50 tpm to rk3399-gru scarlet and bob Scarlet and Bob use the Google-developed cr50 chip to do things like TPM and closed-case-debugging. Add the nodes describing the cr50 and its spi-connection. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20180822120925.12388-1-heiko@sntech.de commit df3da04880b45b059b8b064c2dd67289a793109e Author: Nathan Chancellor Date: Thu Oct 10 13:31:59 2019 -0700 mips: Fix unroll macro when building with Clang Building with Clang errors after commit 6baaeadae911 ("MIPS: Provide unroll() macro, use it for cache ops") since the GCC_VERSION macro is defined in include/linux/compiler-gcc.h, which is only included in compiler.h when using GCC: In file included from arch/mips/kernel/mips-mt.c:20: ./arch/mips/include/asm/r4kcache.h:254:1: error: use of undeclared identifier 'GCC_VERSION'; did you mean 'S_VERSION'? __BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32, ) ^ ./arch/mips/include/asm/r4kcache.h:219:4: note: expanded from macro '__BUILD_BLAST_CACHE' cache_unroll(32, kernel_cache, indexop, ^ ./arch/mips/include/asm/r4kcache.h:203:2: note: expanded from macro 'cache_unroll' unroll(times, _cache_op, insn, op, (addr) + (i++ * (lsize))); ^ ./arch/mips/include/asm/unroll.h:28:15: note: expanded from macro 'unroll' BUILD_BUG_ON(GCC_VERSION >= 40700 && \ ^ Use CONFIG_GCC_VERSION, which will always be set by Kconfig. Additionally, Clang 8 had improvements around __builtin_constant_p so use that as a lower limit for this check with Clang (although MIPS wasn't buildable until Clang 9); building a kernel with Clang 9.0.0 has no issues after this change. Fixes: 6baaeadae911 ("MIPS: Provide unroll() macro, use it for cache ops") Link: https://github.com/ClangBuiltLinux/linux/issues/736 Signed-off-by: Nathan Chancellor Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: clang-built-linux@googlegroups.com Cc: Nick Desaulniers commit 20c55f250618d4d110b27410a8ffd2c02a0e6911 Author: Nicolas Boichat Date: Thu Oct 3 11:18:00 2019 +0800 HID: google: Detect base folded usage instead of hard-coding whiskers Some other hammer-like device will emit a similar code, let's look for the folded event in HID usage table, instead of hard-coding whiskers in many places. Signed-off-by: Nicolas Boichat Signed-off-by: Jiri Kosina commit 8856c5064834a2600fbe99d4b6de041e6a40621a Author: Ben Dooks Date: Wed Oct 9 13:05:22 2019 +0100 drm/msm/mdp5: make config variables static A number of the config structs are not exported so make them static to avoid the following sparse warnings: drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:17:26: warning: symbol 'msm8x74v1_config' was not declared. Should it be static? drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:101:26: warning: symbol 'msm8x74v2_config' was not declared. Should it be static? drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:183:26: warning: symbol 'apq8084_config' was not declared. Should it be static? drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:278:26: warning: symbol 'msm8x16_config' was not declared. Should it be static? drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:345:26: warning: symbol 'msm8x94_config' was not declared. Should it be static? drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:440:26: warning: symbol 'msm8x96_config' was not declared. Should it be static? drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:548:26: warning: symbol 'msm8917_config' was not declared. Should it be static? drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:633:26: warning: symbol 'msm8998_config' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191009120522.17019-1-ben.dooks@codethink.co.uk Link: https://patchwork.freedesktop.org/patch/msgid/20190918195722.2149227-1-arnd@arndb.de commit 7784cac697351f0cc0a4bb619594c0c99348c5aa Author: Paul Burton Date: Wed Oct 9 23:09:45 2019 +0000 MIPS: cmdline: Clean up boot_command_line initialization Our current code to initialize boot_command_line is a mess. Some of this is due to the addition of too many options over the years, and some of this is due to workarounds for early_init_dt_scan_chosen() performing actions specific to options from other architectures that probably shouldn't be in generic code. Clean this up by introducing a new bootcmdline_init() function that simplifies the initialization somewhat. The major changes are: - Because bootcmdline_init() is a function it can return early in the CONFIG_CMDLINE_OVERRIDE case. - We clear boot_command_line rather than inheriting whatever early_init_dt_scan_chosen() may have left us. This means we no longer need to set boot_command_line to a space character in an attempt to prevent early_init_dt_scan_chosen() from copying CONFIG_CMDLINE into boot_command_line without us knowing about it. - Indirection via USE_PROM_CMDLINE, USE_DTB_CMDLINE, EXTEND_WITH_PROM & BUILTIN_EXTEND_WITH_PROM macros is removed; they seemingly served only to obfuscate the code. - The logic is cleaner, clearer & commented. Two minor drawbacks of this approach are: 1) We call of_scan_flat_dt(), which means we scan through the DT again. The overhead is fairly minimal & shouldn't be noticeable. 2) cmdline_scan_chosen() duplicates a small amount of the logic from early_init_dt_scan_chosen(). Alternatives might be to allow the generic FDT code to keep & expose a copy of the arguments taken from the /chosen node's bootargs property, or to introduce a function like early_init_dt_scan_chosen() that retrieves them without modification to handle CONFIG_CMDLINE. Neither of these sounds particularly cleaner though, and this way we at least keep the extra work in arch/mips. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org commit fcb5c172409da337f81a84fb5dc8c6baa4e8dc67 Author: Ben Dooks Date: Wed Oct 9 12:46:07 2019 +0100 drm/msm: make a5xx_show and a5xx_gpu_state_put static The a5xx_show and a5xx_gpu_state_put objects are not exported outside of the file, so make them static to avoid the following warnings from sparse: drivers/gpu/drm/msm/adreno/a5xx_gpu.c:1292:5: warning: symbol 'a5xx_gpu_state_put' was not declared. Should it be static? drivers/gpu/drm/msm/adreno/a5xx_gpu.c:1302:6: warning: symbol 'a5xx_show' was not declared. Should it be static? Reviewed-by: Jordan Crouse Signed-off-by: Ben Dooks Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191009114607.701-1-ben.dooks@codethink.co.uk commit df4954e30d0e6786b95c228f931a52261ce6b8d5 Author: zhengbin Date: Wed Oct 9 22:13:23 2019 +0800 drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in modeset_init Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c: In function modeset_init: drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:458:28: warning: variable hw_cfg set but not used [-Wunused-but-set-variable] It is not used since commit 36d1364abbed ("drm/msm/mdp5: Clean up interface assignment") Reported-by: Hulk Robot Reviewed-by: Bjorn Andersson Signed-off-by: zhengbin Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1570630403-92371-1-git-send-email-zhengbin13@huawei.com commit 2e3cc607af53cde972e04bae3ff9cbb0d82b1dc7 Author: zhengbin Date: Thu Oct 10 14:55:06 2019 +0800 drm/msm/dsi: Remove set but not used variable 'lp' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/dsi/dsi_host.c: In function dsi_cmd_dma_rx: drivers/gpu/drm/msm/dsi/dsi_host.c:1302:7: warning: variable lp set but not used [-Wunused-but-set-variable] It is not used since commit a689554ba6ed ("drm/msm: Initial add DSI connector support") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1570690506-83287-5-git-send-email-zhengbin13@huawei.com commit 7264af3ed8d409eadc1dc878879594b0b3b5e79b Author: zhengbin Date: Thu Oct 10 14:55:05 2019 +0800 drm/msm/dsi: Remove set but not used variable 'lpx' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/dsi/phy/dsi_phy.c: In function msm_dsi_dphy_timing_calc_v2: drivers/gpu/drm/msm/dsi/phy/dsi_phy.c:156:17: warning: variable lpx set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/dsi/phy/dsi_phy.c: In function msm_dsi_dphy_timing_calc_v3: drivers/gpu/drm/msm/dsi/phy/dsi_phy.c:273:17: warning: variable lpx set but not used [-Wunused-but-set-variable] 'lpx' in msm_dsi_dphy_timing_calc_v2 is not used since commit a4df68fa232e ("drm/msm/dsi: Add new method to calculate 14nm PHY timings") 'lpx' in msm_dsi_dphy_timing_calc_v3 is not used since commit f1fa7ff44056 ("drm/msm/dsi: implement auto PHY timing calculator for 10nm PHY") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1570690506-83287-4-git-send-email-zhengbin13@huawei.com commit c16c52a35e729cfc1f2b619fc208a6b3c23b9561 Author: zhengbin Date: Thu Oct 10 14:55:04 2019 +0800 drm/msm/mdp5: Remove set but not used variable 'hw_cfg' in blend_setup Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c: In function blend_setup: drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:225:28: warning: variable hw_cfg set but not used [-Wunused-but-set-variable] It is not used since commit 14be3200cd5f ("drm/msm: rename mdp->disp") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1570690506-83287-3-git-send-email-zhengbin13@huawei.com commit 722525023b10910a753b6e212c7129ea9b5a9810 Author: zhengbin Date: Thu Oct 10 14:55:03 2019 +0800 drm/msm/mdp5: Remove set but not used variable 'fmt' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c: In function mdp5_smp_calculate: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:134:6: warning: variable fmt set but not used [-Wunused-but-set-variable] It is not used since commit 24c478ead0bf ("drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1570690506-83287-2-git-send-email-zhengbin13@huawei.com commit 73b2608a28afe58b5387697429f29d5c5499f7c4 Author: Krzysztof Kozlowski Date: Wed Oct 2 18:13:40 2019 +0200 dt-bindings: rng: exynos4-rng: Convert Exynos PRNG bindings to json-schema Convert Samsung Exynos Pseudo Random Number Generator bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit ab198a7aab65d6fcdbde082ff59a790dbf7e08f4 Author: Sean Paul Date: Thu Oct 10 14:17:44 2019 -0400 drm/msm: Sanitize the modeset_is_locked checks in dpu As Daniel mentions in his email [1], non-blocking commits don't hold the modeset locks, so we can safely access state as long as these functions are in the commit path. So remove the WARN_ON in dpu_kms_encoder_enable. In dpu_crtc_get_intf_mode, things are a bit more complicated. So keep the WARN_ON, but add a comment explaining the situation and hope someone comes along and fixes the issue. [1]- https://lists.freedesktop.org/archives/dri-devel/2019-October/239441.html Link to v1: https://patchwork.freedesktop.org/patch/msgid/20191010151351.126735-1-sean@poorly.run Changes in v2: - Restored the WARN_ON in get_intf_mode and added a clarifying comment (Daniel) Fixes: 1dfdb0e107db ("drm/msm: dpu: Add modeset lock checks where applicable") Cc: Jeykumar Sankaran Cc: Rob Clark Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191010181801.186069-1-sean@poorly.run commit da80f04792fc0dddcc44201cb4ee96cb011755b6 Author: James Ausmus Date: Wed Oct 9 10:23:15 2019 -0700 drm/i915/tgl: Read SAGV block time from PCODE Starting from TGL, we now need to read the SAGV block time via a PCODE mailbox, rather than having a static value. BSpec: 49326 v2: Fix up pcode val data type (Ville), tighten variable scope (Ville) Cc: Ville Syrjälä Cc: Stanislav Lisovskiy Cc: Lucas De Marchi Signed-off-by: James Ausmus Reviewed-by: Ville Syrjälä Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191004221449.1317-2-james.ausmus@intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20191009172315.11004-2-lucas.demarchi@intel.com commit b068a86071ca743de28a607a0b22b41b1a3f5fb3 Author: James Ausmus Date: Wed Oct 9 10:23:14 2019 -0700 drm/i915: Move SAGV block time to dev_priv In prep for newer platforms having more complicated ways to determine the SAGV block time, move the variable to dev_priv, and extract the setting to an initial setup function. While we're at it, update the if ladder to follow the new gen -> old gen order preference, and warn on any non-specified gen. v2: Shorten the function name (Ville), return directly (Ville), move sagv_block_time_us value to dev_priv (Ville) v3: Change sagv_block_time_us to u32 (Lucas), Change fallback value to -1 (Lucas), use intel_has_sagv for setup check rather than hand-rolling (Lucas) Cc: Ville Syrjälä Cc: Stanislav Lisovskiy Cc: Lucas De Marchi Signed-off-by: James Ausmus Reviewed-by: Ville Syrjälä Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191004221449.1317-1-james.ausmus@intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20191009172315.11004-1-lucas.demarchi@intel.com commit 52111c4628a29973d8be266f45b464318912b199 Author: Chris Wilson Date: Thu Oct 10 16:05:20 2019 +0100 drm/i915/perf: Store shortcut to intel_uncore Now that we have the engine stored in i915_perf, we have a means of accessing intel_gt should we require it. However, we are currently only using the intel_gt to find the right intel_uncore, so replace our i915_perf.gt pointer with the more useful i915_perf.uncore. Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191010150520.26488-2-chris@chris-wilson.co.uk commit 9a61363a6310dda769b8c7601fc9de8ed81e6bc8 Author: Lionel Landwerlin Date: Thu Oct 10 16:05:19 2019 +0100 drm/i915/perf: store the associated engine of a stream We'll use this information later to verify that a client trying to reconfigure the stream does so on the right engine. For now, we want to pull the knowledge of which engine we use into a central property. Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191010150520.26488-1-chris@chris-wilson.co.uk commit 0a6f33dba4ee91f4e00f46510d94277bdd4260da Author: Bryan Gurney Date: Mon Oct 7 13:24:49 2019 -0400 dm dust: convert documentation to ReST Convert the dm-dust documentation to ReST formatting, using literal blocks for all of the shell command, shell output, and log output examples. Add dm-dust to index.rst. Additionally, fix an annotation in the "querying for specific bad blocks" section, on the "queryblock ... not found in badblocklist" example, to properly state that the message appears when a given block is not found. Signed-off-by: Bryan Gurney Signed-off-by: Jonathan Corbet commit ca30ad857d903a2462b85bf83357becb668f0ad7 Author: Oleksandr Natalenko Date: Wed Oct 2 13:46:10 2019 +0200 docs: admin-guide: fix printk_ratelimit explanation The printk_ratelimit value accepts seconds, not jiffies (though it is converted into jiffies internally). Update documentation to reflect this. Also, remove the statement about allowing 1 message in 5 seconds since bursts up to 10 messages are allowed by default. Finally, while we are here, mention default value for printk_ratelimit_burst too. Signed-off-by: Oleksandr Natalenko Signed-off-by: Jonathan Corbet commit ea882f75766c1831720078151c9ca2fdff557e89 Author: Jonathan Neuschäfer Date: Thu Oct 3 22:43:22 2019 +0200 docs: networking: phy: Improve phrasing It's not about times (multiple occurences of an event) but about the duration of a time interval. Signed-off-by: Jonathan Neuschäfer Acked-by: David S. Miller Signed-off-by: Jonathan Corbet commit d6ce98fe11a052af081612029dc351d20fd8e6f8 Author: Jonathan Neuschäfer Date: Thu Oct 3 21:05:36 2019 +0200 docs: networking: devlink-trap: Fix reference to other document This fixes the following Sphinx warning: Documentation/networking/devlink-trap.rst:175: WARNING: unknown document: /devlink-trap-netdevsim Fixes: 9e0874570488 ("Documentation: Add description of netdevsim traps") Signed-off-by: Jonathan Neuschäfer Acked-by: David S. Miller Signed-off-by: Jonathan Corbet commit 81834b918e92c60c1ec4b30ccb68094b2fde1669 Author: Mauro Carvalho Chehab Date: Tue Sep 24 10:01:30 2019 -0300 bindings: MAINTAINERS: fix references to Allwinner LRADC The file got converted to yaml, but the reference at MAINTAINERS was not updated. Fixes: 5bf2845ece35 ("dt-bindings: input: Convert Allwinner LRADC to a schema") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet commit 868adb544a3995328fc68c31748437433c1ff8de Author: Mauro Carvalho Chehab Date: Tue Sep 24 10:01:29 2019 -0300 bindings: rename links to mason USB2/USB3 DT files Those files got renamed, but another DT file still points to the older places. Fixes: 87a55485f2fc ("dt-bindings: phy: meson-g12a-usb3-pcie-phy: convert to yaml") Fixes: da86d286cce8 ("dt-bindings: phy: meson-g12a-usb2-phy: convert to yaml") Signed-off-by: Mauro Carvalho Chehab Acked-by: Rob Herring Signed-off-by: Jonathan Corbet commit 0ac624f47dd3474441bb56d64f97192f139b593f Author: Mauro Carvalho Chehab Date: Tue Sep 24 10:01:28 2019 -0300 docs: fix some broken references There are a number of documentation files that got moved or renamed. update their references. Signed-off-by: Mauro Carvalho Chehab Acked-by: Shannon Nelson Acked-by: Guenter Roeck Acked-by: Rob Herring Acked-by: Paul Walmsley # RISC-V Acked-by: Bartosz Golaszewski Signed-off-by: Jonathan Corbet commit 7f70ae564b807f81263326d641514c6dca88e5ef Author: Paul Walmsley Date: Wed Oct 9 12:53:50 2019 -0700 Documentation: admin-guide: add earlycon documentation for RISC-V Kernels booting on RISC-V can specify "earlycon" with no options on the Linux command line, and the generic DT earlycon support will query the "chosen/stdout-path" property (if present) to determine which early console device to use. Document this appropriately in the admin-guide. Signed-off-by: Paul Walmsley Reviewed-by: Geert Uytterhoeven Cc: Christoph Hellwig Cc: Andreas Schwab Signed-off-by: Jonathan Corbet commit f11b46f314209c053b7756b46a50a36e36cfb85a Author: Jonathan Corbet Date: Fri Oct 4 10:14:21 2019 -0600 docs: remove :c:func: from genalloc.rst As of 5.3, the automarkup extension will do the right thing with function() notation, so we don't need to clutter the text with :c:func: invocations. So remove them. Signed-off-by: Jonathan Corbet commit 049500715e7aed436c3dfac7071d7f17c18b463b Author: Jonathan Corbet Date: Thu Oct 3 13:02:19 2019 -0600 docs: Move the user-space ioctl() docs to userspace-api This is strictly user-space material at this point, so put it with the other user-space API documentation. Signed-off-by: Jonathan Corbet commit 5ecd0a06e6bb992c903f5d8a588b78852b9e80a5 Author: Jonathan Corbet Date: Thu Oct 3 12:58:42 2019 -0600 docs: move botching-up-ioctls.rst to the process guide This is overall information for kernel developers, and not part of the user-space API. Cc: Daniel Vetter Signed-off-by: Jonathan Corbet commit 781fa0a954240c8487683ddf837fb2c4ede8e7ca Author: Stefan Wahren Date: Mon Sep 30 20:29:12 2019 +0200 ARM: bcm: Add support for BCM2711 SoC Add the BCM2711 to ARCH_BCM2835, but use new machine board code because of the differences. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Acked-by: Florian Fanelli commit 61d221b735e80819814dbff3f014b27a457d297b Author: Jonathan Corbet Date: Mon Oct 7 09:38:58 2019 -0600 docs: Fix "make help" suggestion for SPHINXDIR Commit 9fc3a18a942f ("docs: remove extra conf.py files") broke the setting of _SPHINXDIRS in Documentation/Makefile. Let's just have it look for an index.rst file instead. Fixes: 9fc3a18a942f ("docs: remove extra conf.py files") Reported-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Jonathan Corbet commit 46fdee06aeefedfc62a4c33b2c4a7a74682ac755 Author: Stefan Wahren Date: Sun Jul 21 21:53:43 2019 +0200 arm64: dts: broadcom: Add reference to RPi 4 B This adds a reference to the dts of the Raspberry Pi 4 B, so we don't need to maintain the content in arm64. Signed-off-by: Stefan Wahren commit 7dbe8c62ceeb8898d2c12d95c0714306d1cfba25 Author: Stefan Wahren Date: Sun Oct 6 15:41:25 2019 +0200 ARM: dts: Add minimal Raspberry Pi 4 support This adds minimal support for the new Raspberry Pi 4 without the fancy stuff like GENET, PCIe, xHCI, 40 bit DMA and V3D. The RPi 4 is available in 3 different variants (1, 2 and 4 GB RAM), so leave the memory size to zero and let the bootloader take care of it. The DWC2 is still usable as peripheral via the USB-C port. Other differences to the Raspberry Pi 3: - additional GIC 400 Interrupt controller - new thermal IP and HWRNG - additional MMC interface (emmc2) - additional UART, I2C, SPI and PWM interfaces - clock stretching bug in I2C IP has been fixed Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Acked-by: Florian Fanelli commit 091d3aecc5154bfd9056094b813ef5384294ef4b Author: Stefan Wahren Date: Fri Aug 16 22:09:20 2019 +0200 dt-bindings: arm: bcm2835: Add Raspberry Pi 4 to DT schema Add new Raspberry Pi 4 to DT schema. Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Reviewed-by: Rob Herring commit ab06837dd269b600396b298e9f4678d02b11b71d Author: Stefan Wahren Date: Fri Aug 16 21:01:08 2019 +0200 dt-bindings: arm: Convert BCM2835 board/soc bindings to json-schema Convert the BCM2835/6/7 SoC bindings to DT schema format using json-schema. All the other Broadcom boards are maintained by Florian Fainelli. Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Reviewed-by: Rob Herring commit 3ce82be9ae3d6d6da9984050147da4736b5090d9 Author: Stefan Wahren Date: Sat Aug 17 18:08:09 2019 +0200 ARM: dts: bcm283x: Move BCM2835/6/7 specific to bcm2835-common.dtsi As preparation we want all common BCM2711 + BCM2835/6/7 functions in bcm283x.dtsi and all BCM2835/6/7 specific in the new bcm2835-common.dtsi. Since i2c2 is BCM2835 specific, we also need to move it to bcm2835-common.dtsi. Signed-off-by: Stefan Wahren Acked-by: Eric Anholt commit ba61479e1ee94622491a662a1e056d177c1969f8 Author: Stefan Wahren Date: Fri Aug 16 22:44:36 2019 +0200 ARM: dts: bcm283x: Remove brcm,bcm2835-pl011 compatible The downstream compatible brcm,bcm2835-pl011 hasn't been upstreamed yet. So remove it. Signed-off-by: Stefan Wahren commit 4b2d24662126b1e2a6b95c9dfe9e9044e105e5bd Author: Stefan Wahren Date: Fri Aug 16 22:32:02 2019 +0200 ARM: dts: bcm283x: Remove simple-bus from fixed clocks The fixed clocks doesn't form some kind of bus. So let's remove it. This fixes the follow DT schema warnings: clocks: clock@3:reg:0: [3] is too short clocks: clock@4:reg:0: [4] is too short clocks: $nodename:0: 'clocks' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' clocks: #size-cells:0:0: 0 is not one of [1, 2] clocks: 'ranges' is a required property clock@3: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' clock@4: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Stefan Wahren commit 3ff3a712a9eabb3d7bf52c263dd1ece054345df4 Author: Benoit Parrot Date: Mon Oct 7 12:10:09 2019 -0300 media: ti-vpe: vpe: don't rely on colorspace member for conversion Up to now VPE was relying on the colorspace value of struct v4l2_format as an indication to perform color space conversion from YUV to RGB or not. Instead we should used the source/destination fourcc codes as a more reliable indication to perform color space conversion or not. To do so, we rework the csc module to use "struct v4l2_format *" as parameters, and reorganize the coefficients tables in a more logical way. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b373f84d77e1c409aacb4ff5bb5726c45fc8b166 Author: Benoit Parrot Date: Mon Oct 7 12:10:08 2019 -0300 media: v4l2-common: add RGB565 and RGB55 to v4l2_format_info Add RGB565 and RGB555 to the v4l2_format_info table. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d5a897c8428b38053df4b427a4277b1a0722bfa0 Author: Benoit Parrot Date: Mon Oct 7 12:10:07 2019 -0300 media: v4l2-common: add pixel encoding support It is often useful to figure out if a pixel_format is either YUV or RGB especially for driver who can perform the pixel encoding conversion. Instead of having each driver implement its own "is_this_yuv/rgb" function based on a restricted set of pixel value, it is better to do this in centralized manner. We therefore add a pixel_enc member to the v4l2_format_info structure to quickly identify the related pixel encoding. And add helper functions to check pixel encoding. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9152dc9ec940136ca915d3caeab13a7b97bd15e0 Author: Benoit Parrot Date: Mon Oct 7 12:10:06 2019 -0300 media: ti-vpe: csc: rgb-to-yuv HD full range coeff are wrong The RGB to YUV HD full range coefficients did not match the TRM values and appeared to be a cut-n-paste from the YUV to RGB section. Replace the entries with the values from the TRM. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 98ca241d239a51cdd67321f3a73711f42e80eea5 Author: Benoit Parrot Date: Mon Oct 7 12:10:05 2019 -0300 media: ti-vpe: vpe: fix v4l2_compliance issue related to xfer_func All 4 of the "colorspace" components were not originally handled. Causing issue related to xfer_func not being initialized properly. This was found with v4l2-compliance test. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 34efd808dbf4c824b5a354a58418e0d8e98df08f Author: Benoit Parrot Date: Mon Oct 7 12:10:04 2019 -0300 media: ti-vpe: vpe: use standard struct instead of duplicating fields For each queue we need to maintain resolutions, pixel format, bytesperline, sizeimage, colorspace, etc. Instead of manually adding more entries in the vpe_q_data struct, it is better to just add a "struct v4l2_format" member and use that to store all needed information. Signed-off-by: Benoit Parrot [hverkuil@xs4all.nl: fix checkpatch warning] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f3320447a22a37bc9b9d2769d14aa39860fd5698 Author: Benoit Parrot Date: Mon Oct 7 12:10:03 2019 -0300 media: ti-vpe: Set the DMA mask and coherent mask VPE uses VPDMA (built-in dma engine) to transfer data to and from the IP and memory. VPDMA expect 32 bits addresses. To make sure that is always the case set the DMA mask and coherent mask for the device. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 63728b1cab288da65234e9c9fac4e294cc95cdd9 Author: Benoit Parrot Date: Mon Oct 7 12:10:02 2019 -0300 media: ti-vpe: vpdma: Use fixed type for address in descriptor Using dma_addr_t as the type to hold address inside of a fix sized descriptor used by the vpdma firmware is prone to fail when the expected width is 32 bits and suddenly when CONFIG_LPAE is enabled the data size is now 64 bits shifted the remaining members of the descriptor in memory which confuses the firmware. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf6acb73b050e98b5cc435fae0e8ae0157520410 Author: Benoit Parrot Date: Mon Oct 7 12:10:01 2019 -0300 media: ti-vpe: vpe: ensure buffers are cleaned up properly in abort cases v4l2-compliance fails with this message: fail: v4l2-test-buffers.cpp(691): ret == 0 fail: v4l2-test-buffers.cpp(974): captureBufs(node, q, m2m_q, frame_count, true) test MMAP: FAIL This caused the following Kernel Warning: WARNING: CPU: 0 PID: 961 at drivers/media/v4l2-core/videobuf2-core.c:1658 __vb2_queue_cancel+0x174/0x1d8 ... CPU: 0 PID: 961 Comm: v4l2-compliance Not tainted 4.14.62-01720-g20ecd717e87a #6 Hardware name: Generic DRA72X (Flattened Device Tree) Backtrace: [] (dump_backtrace) from [] (show_stack+0x18/0x1c) r7:00000009 r6:60070013 r5:00000000 r4:c1053824 [] (show_stack) from [] (dump_stack+0x90/0xa4) [] (dump_stack) from [] (__warn+0xec/0x104) r7:00000009 r6:c0c0ad50 r5:00000000 r4:00000000 [] (__warn) from [] (warn_slowpath_null+0x28/0x30) r9:00000008 r8:00000000 r7:eced4808 r6:edbc9bac r5:eced4844 r4:eced4808 [] (warn_slowpath_null) from [] (__vb2_queue_cancel+0x174/0x1d8) [] (__vb2_queue_cancel) from [] (vb2_core_queue_release+0x20/0x40) r10:ecc7bd70 r9:00000008 r8:00000000 r7:edb73010 r6:edbc9bac r5:eced4844 r4:eced4808 r3:00000004 [] (vb2_core_queue_release) from [] (vb2_queue_release+0x10/0x14) r5:edbc9810 r4:eced4800 [] (vb2_queue_release) from [] (v4l2_m2m_ctx_release+0x1c/0x30) [] (v4l2_m2m_ctx_release) from [] (vpe_release+0x74/0xb0 [ti_vpe]) r5:edbc9810 r4:ed67a400 [] (vpe_release [ti_vpe]) from [] (v4l2_release+0x3c/0x80) r7:edb73010 r6:ed176aa0 r5:edbc9868 r4:ed5119c0 [] (v4l2_release) from [] (__fput+0x8c/0x1dc) r5:ecc7bd70 r4:ed5119c0 [] (__fput) from [] (____fput+0x10/0x14) r10:00000000 r9:ed5119c0 r8:ece392d0 r7:c1059544 r6:ece38d80 r5:ece392b4 r4:00000000 [] (____fput) from [] (task_work_run+0x98/0xb8) [] (task_work_run) from [] (do_exit+0x170/0xa80) r9:ece351fc r8:00000000 r7:ecde3f58 r6:ffffe000 r5:ece351c0 r4:ece38d80 [] (do_exit) from [] (do_group_exit+0x48/0xc4) r7:000000f8 [] (do_group_exit) from [] (__wake_up_parent+0x0/0x28) r7:000000f8 r6:b6c6a798 r5:00000001 r4:00000001 [] (SyS_exit_group) from [] (ret_fast_syscall+0x0/0x4c) These warnings are caused by buffers which not properly cleaned up/release during an abort use case. In the abort cases the VPDMA desc buffers would still be mapped and the in-flight VB2 buffers would not be released properly causing a kernel warning from being generated by the videobuf2-core level. Signed-off-by: Benoit Parrot Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2444846c0dbfa4ead21b621e4300ec32c90fbf38 Author: Benoit Parrot Date: Mon Oct 7 12:10:00 2019 -0300 media: ti-vpe: vpe: fix a v4l2-compliance failure about frame sequence number v4l2-compliance fails with this message: fail: v4l2-test-buffers.cpp(294): \ (int)g_sequence() < seq.last_seq + 1 fail: v4l2-test-buffers.cpp(740): \ buf.check(m2m_q, last_m2m_seq) fail: v4l2-test-buffers.cpp(974): \ captureBufs(node, q, m2m_q, frame_count, true) test MMAP: FAIL The driver is failing to update the source frame sequence number in the vb2 buffer object. Only the destination frame sequence was being updated. This is only a reporting issue if the user space app actually cares about the frame sequence number. But it is fixed nonetheless. Signed-off-by: Benoit Parrot Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0bac73adea4df8d34048b38f6ff24dc3e73e90b6 Author: Benoit Parrot Date: Mon Oct 7 12:09:59 2019 -0300 media: ti-vpe: vpe: fix a v4l2-compliance failure about invalid sizeimage v4l2-compliance fails with this message: fail: v4l2-test-formats.cpp(463): !pfmt.sizeimage fail: v4l2-test-formats.cpp(736): \ Video Capture Multiplanar is valid, \ but TRY_FMT failed to return a format test VIDIOC_TRY_FMT: FAIL This failure is causd by the driver failing to handle out range 'bytesperline' values from user space applications. VPDMA hardware is limited to 64k line stride (16 bytes aligned, so 65520 bytes). So make sure the provided or calculated 'bytesperline' is smaller than the maximum value. Signed-off-by: Benoit Parrot Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e20b248051ca0f90d84b4d9378e4780bc31f16c6 Author: Benoit Parrot Date: Mon Oct 7 12:09:58 2019 -0300 media: ti-vpe: vpe: Make sure YUYV is set as default format v4l2-compliance fails with this message: fail: v4l2-test-formats.cpp(672): \ Video Capture Multiplanar: TRY_FMT(G_FMT) != G_FMT fail: v4l2-test-formats.cpp(672): \ Video Output Multiplanar: TRY_FMT(G_FMT) != G_FMT ... test VIDIOC_TRY_FMT: FAIL The default pixel format was setup as pointing to a specific offset in the vpe_formats table assuming it was pointing to the V4L2_PIX_FMT_YUYV entry. This became false after the addition on the NV21 format (see above commid-id) So instead of hard-coding an offset which might change over time we need to use a lookup helper instead so we know the default will always be what we intended. Signed-off-by: Benoit Parrot Fixes: 40cc823f7005 ("media: ti-vpe: Add support for NV21 format") Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 06bec72b250b2cb3ba96fa45c2b8e0fb83745517 Author: Benoit Parrot Date: Mon Oct 7 12:09:57 2019 -0300 media: ti-vpe: vpe: fix a v4l2-compliance warning about invalid pixel format v4l2-compliance warns with this message: warn: v4l2-test-formats.cpp(717): \ TRY_FMT cannot handle an invalid pixelformat. warn: v4l2-test-formats.cpp(718): \ This may or may not be a problem. For more information see: warn: v4l2-test-formats.cpp(719): \ http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html ... test VIDIOC_TRY_FMT: FAIL We need to make sure that the returns a valid pixel format in all instance. Based on the v4l2 framework convention drivers must return a valid pixel format when the requested pixel format is either invalid or not supported. Signed-off-by: Benoit Parrot Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a37980ac5be29b83da67bf7d571c6bd9f90f8e45 Author: Benoit Parrot Date: Mon Oct 7 12:09:56 2019 -0300 media: ti-vpe: vpe: fix a v4l2-compliance failure causing a kernel panic v4l2-compliance fails with this message: warn: v4l2-test-formats.cpp(717): \ TRY_FMT cannot handle an invalid pixelformat. test VIDIOC_TRY_FMT: FAIL This causes the following kernel panic: Unable to handle kernel paging request at virtual address 56595561 pgd = ecd80e00 *pgd=00000000 Internal error: Oops: 205 [#1] PREEMPT SMP ARM ... CPU: 0 PID: 930 Comm: v4l2-compliance Not tainted \ 4.14.62-01715-gc8cd67f49a19 #1 Hardware name: Generic DRA72X (Flattened Device Tree) task: ece44d80 task.stack: ecc6e000 PC is at __vpe_try_fmt+0x18c/0x2a8 [ti_vpe] LR is at 0x8 Because the driver fails to properly check the 'num_planes' values for proper ranges it ends up accessing out of bound data causing the kernel panic. Since this driver only handle single or dual plane pixel format, make sure the provided value does not exceed 2 planes. Signed-off-by: Benoit Parrot Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 661eaa3c4bca4b8d3233b60ca75fb5c5340cb970 Author: Ram Prasad Date: Mon Oct 7 12:09:55 2019 -0300 media: ti-vpe: Set MAX height supported to 2048 pixels VPE's max height supported MAX_H is set to 1184 which is the padded height from VC1 decoder output. In case of 90, 270 degree rotated video processing, input to VPE will be 1080x1920, 720x1280 etc and MAX_H needs to be set correct value. Setting MAX_H to 2048 as worst case height. Signed-off-by: Ram Prasad Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b2bb3d822f2c9e27236ea32bc5ef18a9f22c8a80 Author: Nikhil Devshatwar Date: Mon Oct 7 12:09:54 2019 -0300 media: ti-vpe: Add support for NV21 format In NV21 format, the chroma plane is written to memory such that the U and V components are swapped for NV12. Create a new entry in the VPDMA formats to describe the correct data types used in the data descriptors. Update all checks for NV12 and add NV21 there as well. Add support for V4L2_PIX_FMT_NV21 format for both capture and output streams. Signed-off-by: Nikhil Devshatwar Signed-off-by: Benoit Parrot Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 95959793d20d0c12e1a81309dbd1a652f3ee197b Author: Nikhil Devshatwar Date: Mon Oct 7 12:09:53 2019 -0300 media: ti-vpe: Add support for SEQ_BT SEQ_BT indicates the buffer for bottom field needs to be processed before the top field. Simplify the field selection logic to support SEQ_BT as well. Modify the interlace flags to include any of alternate, SEQ_TB, SEQ_BT. Update other format error checking to consider SEQ_BT. Replace SEQ_TB with SEQ_XX wherever applicable. Signed-off-by: Nikhil Devshatwar Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 55c686ff93f1287c4f7278c78926c11611cf7e00 Author: Benoit Parrot Date: Mon Oct 7 12:09:52 2019 -0300 media: ti-vpe: vpe: Remove unnecessary use of container_of Instead of saving a pointer to the 'fh' member of struct vpe_ctx to later have to use container_of to retrieve the actual pointer to the context structure, which seems to confuse static code analysis tool anyways, just save the pointer to the actual structure and then retrieve it directly. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b0ac8596edc8b37de90a5ec095a25abbbc24f169 Author: Claudiu Beznea Date: Thu Sep 26 13:25:37 2019 +0300 power: reset: at91-poweroff: lookup for proper PMC DT node Driver has been enabled also for SAM9X60. At the moment the patch which did this has been sent to mainline the PMC for SAM9X60 wasn't integrated. SAM9X60 has a new PMC compatible (see commit 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver")). Do to this we have to look for proper PMC compatible here, in SHDWC driver. Signed-off-by: Claudiu Beznea Signed-off-by: Sebastian Reichel commit 4d59c7d455853edca990848b1cb7c482b4628f32 Author: Benoit Parrot Date: Mon Oct 7 12:09:51 2019 -0300 media: ti-vpe: vpe: Add missing null pointer checks A few NULL pointer checks were missing. Add check with appropriate return code. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 102af9b9922f658f705a4b0deaccabac409131bf Author: Benoit Parrot Date: Mon Oct 7 12:09:50 2019 -0300 media: ti-vpe: vpe: Fix Motion Vector vpdma stride commit 3dc2046ca78b ("[media] media: ti-vpe: vpe: allow use of user specified stride") and commit da4414eaed15 ("[media] media: ti-vpe: vpdma: add support for user specified stride") resulted in the Motion Vector stride to be the same as the image stride. This caused memory corruption in the output image as mentioned in commit 00db969964c8 ("[media] media: ti-vpe: vpe: Fix line stride for output motion vector"). Fixes: 3dc2046ca78b ("[media] media: ti-vpe: vpe: allow use of user specified stride") Fixes: da4414eaed15 ("[media] media: ti-vpe: vpdma: add support for user specified stride") Signed-off-by: Benoit Parrot Acked-by: Nikhil Devshatwar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 69318b399569e3b03f7e6dcaac41c0ed348913a2 Author: lecopzer@gmail.com Date: Fri Sep 13 02:26:00 2019 +0800 test_power: Add CURRENT properties CURRENT is really general in other battery drivers, Android also has an interface to monitor CURRENT, so let's add it into test framework. The default value (1.6A) is just a random but reasonable value. Signed-off-by: Lecopzer Chen Signed-off-by: Sebastian Reichel commit 4b082ac6b7687d564065cdb65393b8d1ed5e1a03 Author: lecopzer@gmail.com Date: Fri Sep 13 02:25:59 2019 +0800 test_power: Add CHARGE_COUNTER properties CHARGE_COUNTER is really general in other power supply drivers and Android also has an interface to monitor CHARGE_COUNTER, so let's add it into test framework. Set default as -1000 is because the default status is POWER_SUPPLY_STATUS_DISCHARGING, which means the counter should be negative, and 1000 means not zero but small enough. Signed-off-by: Lecopzer Chen Signed-off-by: Sebastian Reichel commit 84227cb11ff4d9815b9b1daf0c1a2bd7e9274c58 Author: Jiri Olsa Date: Mon Oct 7 14:53:34 2019 +0200 libperf: Adopt perf_evlist__filter_pollfd() from tools/perf Introduce the perf_evlist__filter_pollfd function and export it in the perf/evlist.h header, so that libperf users can check if the descriptor is still alive. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-27-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 696f27c994ed056fd176ce9dc51c7988e148e4b0 Author: Jiri Olsa Date: Mon Oct 7 14:53:33 2019 +0200 libperf: Introduce perf_evlist__purge() Add a static perf_evlist__purge() function to purge evsels from a evlist. Add also perf_evlist__for_each_entry_safe() which is used by perf_evlist__purge(). Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-26-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 93dd6e2831ff399f7685aa2157b997b6392efac8 Author: Jiri Olsa Date: Mon Oct 7 14:53:32 2019 +0200 libperf: Introduce perf_evlist__exit() Add the perf_evlist__exit() function, so far it's not exported and added only for internal use for perf and libperf. USe it to release cpus/threads and pollfd array. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-25-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 230662e15ed6cc63ecf72ed1bffa3cadef486850 Author: Jiri Olsa Date: Mon Oct 7 14:53:31 2019 +0200 libperf: Move the pollfd allocation from tools/perf to libperf It's needed in libperf only, so move it to the perf_evlist__mmap_ops() function. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-24-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 285aaeac8c5d537b56b70169e21ac29ae5caa8e1 Author: Jiri Olsa Date: Mon Oct 7 14:53:30 2019 +0200 libperf: Centralize map refcnt setting Currently when a new map is mmapped we set its refcnt to 2 in the perf_evlist_mmap_ops::mmap callback. Every mmap gets its refcnt set to 2 when it's first mmaped: - 1 for the current user, which will be taken out by a call to perf_evlist__munmap_filtered(), where we find out there's no more data comming from kernel to this mmap. - 1 for the drain code where in perf_mmap__consume() the mmap is released if it is empty. Move this common setup into libperf's generic code before the mmap callback is called. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-23-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 923d0f1868cb331d660fb569ecd00c39889905f6 Author: Jiri Olsa Date: Mon Oct 7 14:53:29 2019 +0200 perf evlist: Switch to libperf's mmap interface Switch to the libperf mmap interface by calling directly perf_evlist__mmap_ops() and removing perf's evlist__mmap_per_* functions. By switching to libperf perf_evlist__mmap() we need to operate over 'struct perf_mmap' in evlist__add_pollfd, so make the related changes there. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-22-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b80132b12a78ec71de2b3320cc49d4a0b2cd7c46 Author: Jiri Olsa Date: Mon Oct 7 14:53:28 2019 +0200 perf evlist: Introduce perf_evlist__mmap_cb_mmap() Add the perf_evlist__mmap_cb_mmap() function to call perf specific mmap__mmap() function during perf_evlist__mmap_ops() call. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-21-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bb1b1885e2f22afb8bc7981cd865fe4b0e3d975b Author: Jiri Olsa Date: Mon Oct 7 14:53:27 2019 +0200 perf evlist: Introduce perf_evlist__mmap_cb_get() Add the perf_evlist__mmap_cb_get() function to return 'struct perf_mmap' object during perf_evlist__mmap_ops() call. The array of 'struct mmap' is allocated via evlist__alloc_mmap(), in this callback we simply returns pointer to the base object. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-20-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2277b492582d5525244519f60da6f9daea5ef41a Author: Douglas Anderson Date: Wed Sep 25 13:02:20 2019 -0700 kdb: Fix stack crawling on 'running' CPUs that aren't the master In kdb when you do 'btc' (back trace on CPU) it doesn't necessarily give you the right info. Specifically on many architectures (including arm64, where I tested) you can't dump the stack of a "running" process that isn't the process running on the current CPU. This can be seen by this: echo SOFTLOCKUP > /sys/kernel/debug/provoke-crash/DIRECT # wait 2 seconds g Here's what I see now on rk3399-gru-kevin. I see the stack crawl for the CPU that handled the sysrq but everything else just shows me stuck in __switch_to() which is bogus: ====== [0]kdb> btc btc: cpu status: Currently on cpu 0 Available cpus: 0, 1-3(I), 4, 5(I) Stack traceback for pid 0 0xffffff801101a9c0 0 0 1 0 R 0xffffff801101b3b0 *swapper/0 Call trace: dump_backtrace+0x0/0x138 ... kgdb_compiled_brk_fn+0x34/0x44 ... sysrq_handle_dbg+0x34/0x5c Stack traceback for pid 0 0xffffffc0f175a040 0 0 1 1 I 0xffffffc0f175aa30 swapper/1 Call trace: __switch_to+0x1e4/0x240 0xffffffc0f65616c0 Stack traceback for pid 0 0xffffffc0f175d040 0 0 1 2 I 0xffffffc0f175da30 swapper/2 Call trace: __switch_to+0x1e4/0x240 0xffffffc0f65806c0 Stack traceback for pid 0 0xffffffc0f175b040 0 0 1 3 I 0xffffffc0f175ba30 swapper/3 Call trace: __switch_to+0x1e4/0x240 0xffffffc0f659f6c0 Stack traceback for pid 1474 0xffffffc0dde8b040 1474 727 1 4 R 0xffffffc0dde8ba30 bash Call trace: __switch_to+0x1e4/0x240 __schedule+0x464/0x618 0xffffffc0dde8b040 Stack traceback for pid 0 0xffffffc0f17b0040 0 0 1 5 I 0xffffffc0f17b0a30 swapper/5 Call trace: __switch_to+0x1e4/0x240 0xffffffc0f65dd6c0 === The problem is that 'btc' eventually boils down to show_stack(task_struct, NULL); ...and show_stack() doesn't work for "running" CPUs because their registers haven't been stashed. On x86 things might work better (I haven't tested) because kdb has a special case for x86 in kdb_show_stack() where it passes the stack pointer to show_stack(). This wouldn't work on arm64 where the stack crawling function seems needs the "fp" and "pc", not the "sp" which is presumably why arm64's show_stack() function totally ignores the "sp" parameter. NOTE: we _can_ get a good stack dump for all the cpus if we manually switch each one to the kdb master and do a back trace. AKA: cpu 4 bt ...will give the expected trace. That's because now arm64's dump_backtrace will now see that "tsk == current" and go through a different path. In this patch I fix the problems by catching a request to stack crawl a task that's running on a CPU and then I ask that CPU to do the stack crawl. NOTE: this will (presumably) change what stack crawls are printed for x86 machines. Now kdb functions will show up in the stack crawl. Presumably this is OK but if it's not we can go back and add a special case for x86 again. Signed-off-by: Douglas Anderson Acked-by: Will Deacon Signed-off-by: Daniel Thompson commit 55a7e23f461fc2c321d7efcdeca1750085e9323f Author: Douglas Anderson Date: Wed Sep 25 13:02:19 2019 -0700 kdb: Fix "btc " crash if the CPU didn't round up I noticed that when I did "btc " and the CPU I passed in hadn't rounded up that I'd crash. I was going to copy the same fix from commit 162bc7f5afd7 ("kdb: Don't back trace on a cpu that didn't round up") into the "not all the CPUs" case, but decided it'd be better to clean things up a little bit. This consolidates the two code paths. It is _slightly_ wasteful in in that the checks for "cpu" being too small or being offline isn't really needed when we're iterating over all online CPUs, but that really shouldn't hurt. Better to have the same code path. While at it, eliminate at least one slightly ugly (and totally needless) recursive use of kdb_parse(). Signed-off-by: Douglas Anderson Acked-by: Will Deacon Signed-off-by: Daniel Thompson commit 54af3e39eed7d77f0923511f3c7f446e7d477635 Author: Douglas Anderson Date: Wed Sep 25 13:02:18 2019 -0700 kdb: Remove unused "argcount" param from kdb_bt1(); make btaprompt bool The kdb_bt1() had a mysterious "argcount" parameter passed in (always the number 5, by the way) and never used. Presumably this is just old cruft. Remove it. While at it, upgrade the btaprompt parameter to a full fledged bool instead of an int. Signed-off-by: Douglas Anderson Acked-by: Will Deacon Signed-off-by: Daniel Thompson commit 0f8b5b6d56b5fa4085c06945ea3e1ee5941ecfeb Author: Douglas Anderson Date: Wed Sep 25 13:02:17 2019 -0700 kgdb: Remove unused DCPU_SSTEP definition From doing a 'git log --patch kernel/debug', it looks as if DCPU_SSTEP has never been used. Presumably it used to be used back when kgdb was out of tree and nobody thought to delete the definition when the usage went away. Delete. Signed-off-by: Douglas Anderson Acked-by: Jason Wessel Acked-by: Will Deacon Signed-off-by: Daniel Thompson commit 9abd2ab2377613425e1c362694f85b110f5bace2 Author: Jiri Olsa Date: Mon Oct 7 14:53:26 2019 +0200 perf tools: Introduce perf_evlist__mmap_cb_idx() Add perf_evlist__mmap_cb_idx function to call auxtrace_mmap_params__set_idx() on each new index during perf_evlist__mmap_ops call. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-19-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b5911e7ac28cb34f21b7380915ce98518078f114 Author: Jiri Olsa Date: Mon Oct 7 14:53:25 2019 +0200 libperf: Introduce perf_evlist_mmap_ops::mmap callback Add the perf_evlist_mmap_ops::mmap callback to be called in mmap_per_evsel() to actually mmap the map. Add libperf's perf_evlist__mmap_cb_mmap() function as libperf's mmap callback. New mmaped map gets refcount set to 2 in mmap__mmap(), we follow that in mmap callback. We will move this to common place after we switch to perf_evlist__mmap(). Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-18-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3a8bb58121987a8405d6f96cd8815025e564605d Author: Jiri Olsa Date: Mon Oct 7 14:53:24 2019 +0200 libperf: Add perf_evlist_mmap_ops::get callback Add the perf_evlist_mmap_ops::get callback to be called in mmap_per_evsel() to get/allocate the 'struct perf_mmap' object. Add the libperf's perf_evlist__mmap_cb_get() function as libperf's get callback. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-17-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1fcbb75cc574072ab457dbbaa74fc7064b691e86 Author: Jiri Olsa Date: Mon Oct 7 14:53:23 2019 +0200 libperf: Introduce perf_evlist_mmap_ops::idx callback Add the perf_evlist_mmap_ops::idx callback to be called in mmap_per_cpu() and mmap_per_thread() with current cpu and thread indexes. It's used by current aux code, so perf will use this callback to set the aux index. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-16-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0b5ea10d4c312f5b17af9d09187efb9418517bec Author: Jiri Olsa Date: Mon Oct 7 14:53:22 2019 +0200 libperf: Introduce perf_evlist__mmap_ops() To be able to pass specific callbacks to evlist's mmap. There will be a specific call to this function from perf's evlist__mmap() and libperf's perf_evlist__mmap() functions in following changes. Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-15-jolsa@kernel.org Signed-off-by: Jiri Olsa commit d1a177595b3a824c72dacb0f9d1a4e5906eaef0e Author: Jiri Olsa Date: Mon Oct 7 14:53:21 2019 +0200 libperf: Adopt perf_evlist__mmap()/munmap() from tools/perf Add libperf's version of perf_evlist__mmap()/munmap() functions and exporting them in the perf/evlist.h header. It's the backbone of what we have in perf code. The following changes will add needed callbacks and then we'll finally switch the perf code to use libperf's version. Add mmap/mmap_ovw 'struct perf_mmap' object arrays to hold maps for libperf's evlist. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-14-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 151ed5d70da87720022e4171227733a008b3c719 Author: Jiri Olsa Date: Mon Oct 7 14:53:20 2019 +0200 libperf: Adopt perf_mmap__read_event() from tools/perf Move perf_mmap__read_event() from tools/perf to libperf and export it in the perf/mmap.h header. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-13-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 32fdc2ca7e2ae8ae5d0ff660ca7783acd8ee6396 Author: Jiri Olsa Date: Mon Oct 7 14:53:19 2019 +0200 libperf: Adopt perf_mmap__read_done() from tools/perf Move perf_mmap__read_init() from tools/perf to libperf and export it in the perf/mmap.h header. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-12-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7c4d41824f9afc659ba425a41018546531cffd72 Author: Jiri Olsa Date: Mon Oct 7 14:53:18 2019 +0200 libperf: Adopt perf_mmap__read_init() from tools/perf Move perf_mmap__read_init() from tools/perf to libperf and export it in perf/mmap.h header. And add pr_debug2()/pr_debug3() macros support, because the code is using them. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7728fa0cfaeb7d25b12c8865c733359cc8e5fb13 Author: Jiri Olsa Date: Mon Oct 7 14:53:17 2019 +0200 libperf: Adopt perf_mmap__consume() function from tools/perf Move perf_mmap__consume() vrom tools/perf to libperf and export it in the perf/mmap.h header. Move also the needed helpers perf_mmap__write_tail(), perf_mmap__read_head() and perf_mmap__empty(). Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5139de5d5e60aeb38146a8bf5bfaa09c54a8eeb7 Author: Benoit Parrot Date: Mon Oct 7 12:09:49 2019 -0300 media: ti-vpe: Fix a parallel build issue When TI CAL was introduce as another driver under platform/ti-vpe adding a second entry into the ti-vpe directory in the platform Makefile caused issues during parallel build. Signed-off-by: Benoit Parrot Signed-off-by: Jyri Sarha Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d30f4e3d4fbdaa1ccc650965fe4f97b37a31c334 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 12:06:36 2019 -0300 media: imx214: Add new control with V4L2_CID_UNIT_CELL_SIZE According to the product brief, the unit cell size is 1120 nanometers^2. https://www.sony-semicon.co.jp/products_en/IS/sensor1/img/products/ProductBrief_IMX214_20150428.pdf Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2e8db63e1f64b6085cc84a03484213af565c81fb Author: Ricardo Ribalda Delgado Date: Mon Oct 7 12:06:35 2019 -0300 media: v4l2-ctrl: Add new helper v4l2_ctrl_ptr_create This helper function simplifies the code by not needing a union v4l2_ctrl_ptr and an assignment every time we need to use a ctrl_ptr. Suggested-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3f0a700624d0a4014998b2ed5c1f964aa1b784a6 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 12:06:34 2019 -0300 media: Documentation: media: Describe V4L2_CID_UNIT_CELL_SIZE New control to pass to userspace the width/height of a pixel. Which is needed for calibration and lens selection. Reviewed-by: Philipp Zabel Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 61fd036d01111679b01e4b92e6bd0cdd33809aea Author: Ricardo Ribalda Delgado Date: Mon Oct 7 12:06:33 2019 -0300 media: add V4L2_CID_UNIT_CELL_SIZE control This control returns the unit cell size in nanometres. The struct provides the width and the height in separated fields to take into consideration asymmetric pixels and/or hardware binning. This control is required for automatic calibration of sensors/cameras. Reviewed-by: Philipp Zabel Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8ae3a0862993c09a8ef0f9abb379553370c517e3 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 12:06:32 2019 -0300 media: Documentation: media: Document V4L2_CTRL_TYPE_AREA A struct v4l2_area containing the width and the height of a rectangular area. Reviewed-by: Jacopo Mondi Reviewed-by: Philipp Zabel Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d1dc49370f8371b00e682ac409aa1987ce641e93 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 12:06:31 2019 -0300 media: add V4L2_CTRL_TYPE_AREA control type This type contains the width and the height of a rectangular area. Reviewed-by: Jacopo Mondi Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f7fe9f9528b97429b25c7277fe604919455092e4 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 12:06:30 2019 -0300 media: Documentation: v4l2_ctrl_new_std_compound Function for initializing compound controls with a default value. Suggested-by: Hans Verkuil Reviewed-by: Jacopo Mondi Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b35d6c02aa3ca88f80c8da099ebabfe426fab759 Author: Ricardo Ribalda Delgado Date: Mon Oct 7 12:06:29 2019 -0300 media: v4l2-core: Implement v4l2_ctrl_new_std_compound Currently compound controls do not have a simple way of initializing its values. This results in ofuscated code with type_ops init. This patch introduces a new field on the control with the default value for the compound control that can be set with the brand new v4l2_ctrl_new_std_compound function Suggested-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado [hverkuil@xs4all.nl: fix checkpatch warning] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a868da75fd8f925caaf7f5381b2dccff2a244986 Author: Tero Kristo Date: Thu Oct 10 11:21:08 2019 +0300 ARM: dts: omap5: Add PRM data Add PRM data for OMAP54xx SoC. Initially this is used to provide reset support, but will be expanded later to support also powerdomain control. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit f7186dae1dff67e8434040981bd8bfdcc6adb960 Author: Tero Kristo Date: Thu Oct 10 11:21:07 2019 +0300 ARM: dts: am43xx: Add PRM data Add PRM data for AM43xx SoC. Initially this is used to provide reset support, but will be expanded later to support also powerdomain control. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 73e64a93014f64d506ee8f863924142cdfd7a41c Author: Tero Kristo Date: Thu Oct 10 11:21:06 2019 +0300 ARM: dts: am33xx: Add PRM data Add PRM data for AM33xx SoC. Initially this is used to provide reset support, but will be expanded later to support also powerdomain control. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 222fe59f3e4b03e265216c4a15f75f61874916a7 Author: Tero Kristo Date: Thu Oct 10 11:21:05 2019 +0300 ARM: dts: omap4: add PRM nodes Add PRM nodes for omap4 series of SoCs. These are initially used to support reset control for some of the nodes, but will be extended later to add powerdomain control and support for PRCM irqs among other things. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit db7725d3a6bf11607425a04f58efb15f1ed9ed31 Author: Tero Kristo Date: Thu Oct 10 11:21:04 2019 +0300 ARM: dts: dra7: add PRM nodes Add PRM nodes for dra7 series of SoCs. These are initially used to support reset control for some of the nodes, but will be extended later to add powerdomain control and support for PRCM irqs among other things. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 04360e4112c3e0e35c08b7fd8d0b2f6e68be4935 Author: Fabrizio Castro Date: Tue Oct 8 11:38:52 2019 +0100 arm64: dts: renesas: r8a774b1: Add INTC-EX device node Add support for the Interrupt Controller for External Devices (INTC-EX) on RZ/G2N. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/1570531132-21856-11-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4ec25b30a477884d013b7f044bd3c4cfe00d6ef0 Author: Fabrizio Castro Date: Tue Oct 8 11:38:51 2019 +0100 arm64: dts: renesas: r8a774b1: Add USB3.0 device nodes Add usb3.0 phy, host and function device nodes on RZ/G2N SoC dtsi. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/1570531132-21856-10-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 34560ef33934f277f96e7feab32b2ca8f17c0d9d Author: Fabrizio Castro Date: Tue Oct 8 11:38:50 2019 +0100 arm64: dts: renesas: r8a774b1: Add USB-DMAC and HSUSB device nodes Add usb dmac and hsusb device nodes to the RZ/G2N SoC dtsi. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/1570531132-21856-9-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 561668aa461490c219f211a58b3e19edd4c62fc4 Author: Fabrizio Castro Date: Tue Oct 8 11:38:49 2019 +0100 arm64: dts: renesas: r8a774b1: Add USB2.0 phy and host (EHCI/OHCI) device nodes Add USB2.0 phy and host (EHCI/OHCI) device nodes on RZ/G2N SoC dtsi. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/1570531132-21856-8-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 067eca6dc61ad3d05ba919cd5a10affc0647e19c Author: Biju Das Date: Fri Oct 4 15:52:41 2019 +0100 arm64: dts: renesas: r8a774b1: Add Sound and Audio DMAC device nodes Based on a similar patch of the R8A7796 device tree by Kuninori Morimoto . Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1570200761-884-2-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 133e6c78c4937ea7449cf8542b14f7b37bf470ac Author: Fabrizio Castro Date: Fri Oct 4 09:35:33 2019 +0100 arm64: dts: renesas: hihope-rzg2-ex: Let the board specific DT decide about pciec1 The plan for the HiHope RZ/G2N board is to enable pciec0 by default, and use pciec1 physical interface for SATA (as SATA and PCIE1 share the same physical interface), therefore move pciec1 enabling away from hihope-rzg2-ex. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/1570178133-21532-8-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b3ddadfa28315c6417866eac35a3aee67fc06aa3 Author: Fabrizio Castro Date: Fri Oct 4 09:35:32 2019 +0100 arm64: dts: renesas: r8a774b1: Add PCIe device nodes This patch adds PCIe{0,1} device nodes for R8A774B1 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Andrew Murray Link: https://lore.kernel.org/r/1570178133-21532-7-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c88657c4a1ead900cf59d87511d7deee41ed92a5 Author: Fabrizio Castro Date: Fri Oct 4 09:35:31 2019 +0100 arm64: dts: renesas: r8a774b1: Add all MSIOF nodes Add the device nodes for all MSIOF SPI controllers on the RZ/G2N SoC (a.k.a. r8a774b1). Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/1570178133-21532-6-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7213aea4afad4a0642157fce76eb88736bb9b29f Author: Fabrizio Castro Date: Fri Oct 4 09:35:30 2019 +0100 arm64: dts: renesas: r8a774b1: Add RWDT node Populate the device tree node for the Watchdog Timer (RWDT) controller on the Renesas RZ/G2N (r8a774b1) SoC. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/1570178133-21532-5-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b6bb8a108d0b4f4097ef63020a51b1a9dd3dd41d Author: Biju Das Date: Wed Oct 2 16:20:19 2019 +0100 arm64: dts: renesas: Add support for Advantech idk-1110wr LVDS panel This patch adds support for Advantech idk-1110wr LVDS panel. The HiHope RZ/G2[MN] is advertised as compatible with panel idk-1110wr from Advantech, however the panel isn't sold alongside the board. Signed-off-by: Biju Das Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1570029619-43238-10-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 642a33259bdfd5aebca24a4b7b05681239873157 Author: Biju Das Date: Wed Oct 2 16:20:18 2019 +0100 arm64: dts: renesas: hihope-rzg2-ex: Add LVDS support This patch adds LVDS support for RZ/G2[MN] boards. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1570029619-43238-9-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 31222abb669c45afe472a6fb9c605d31b2309066 Author: Biju Das Date: Wed Oct 2 16:20:17 2019 +0100 arm64: dts: renesas: hihope-rzg2-ex: Enable backlight This patch enables backlight support. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1570029619-43238-8-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 68f627511fed928b4ddf26419733edc01525173d Author: Biju Das Date: Wed Oct 2 16:20:16 2019 +0100 arm64: dts: renesas: r8a774b1: Add PWM device nodes This patch adds PWM device nodes to r8a774b1 SoC DT. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1570029619-43238-7-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ab46816a38a49a2bbebe73251268c7792596dc94 Author: Biju Das Date: Wed Oct 2 16:20:15 2019 +0100 arm64: dts: renesas: r8a774b1: Add FDP1 device nodes The r8a774b1 has a single FDP1 instance. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1570029619-43238-6-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fdf130155fa05fdce7f975c68c9e8882c05ca45c Author: Biju Das Date: Wed Oct 2 16:20:14 2019 +0100 arm64: dts: renesas: r8a774b1-hihope-rzg2n: Add display clock properties Add display clock properties for the HiHope RZ/G2N board. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1570029619-43238-5-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 3a02555a4d06519aae74c8732287ed5378a9848f Author: Biju Das Date: Wed Oct 2 16:20:13 2019 +0100 arm64: dts: renesas: r8a774b1: Add HDMI encoder instance Add the HDMI encoder to the R8A774B1 DT in disabled state. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1570029619-43238-4-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 04e4bad30adb4e49d2f9997e7697a734ba9fc66a Author: Biju Das Date: Wed Oct 2 16:20:12 2019 +0100 arm64: dts: renesas: r8a774b1: Add DU device to DT Add the DU device to r8a774b1 SoC DT. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1570029619-43238-3-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fbdcdb9c86218a917174892aa7e9aac7cc498ca1 Author: Biju Das Date: Wed Oct 2 16:20:11 2019 +0100 arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi RZ/G2N board is pin compatible with RZ/G2M board. However on the SoC side RZ/G2N uses DU3 where as RZ/G2M uses DU2 for the DPAD. In order to reuse the common dtsi for both the boards, it is required to move du clock properties from common dtsi to board specific dts. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1570029619-43238-2-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 79718f9d5471783c3ea8468587e85729c85c11b3 Author: Biju Das Date: Tue Sep 24 09:22:55 2019 +0100 arm64: dts: renesas: r8a774b1: Connect Ethernet-AVB to IPMMU-DS0 Add IPMMU-DS0 to the Ethernet-AVB device node. Based on work by Magnus Damm for the r8a7795. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569313375-53428-8-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c65588936f4957bfca291093958bd33882c33d07 Author: Biju Das Date: Tue Sep 24 09:22:54 2019 +0100 arm64: dts: renesas: r8a774b1: Tie SYS-DMAC to IPMMU-DS0/1 Hook up r8a774b1 DMAC nodes to the IPMMUs. In particular SYS-DMAC0 gets tied to IPMMU-DS0, and SYS-DMAC1 and SYS-DMAC2 get tied to IPMMU-DS1. Based on work for the r8a7796 by Magnus Damm. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569313375-53428-7-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 966607b847142dc9866a59af9e657f09b5fdef0f Author: Biju Das Date: Tue Sep 24 09:22:53 2019 +0100 arm64: dts: renesas: r8a774b1: Add VSP instances The r8a774b1 has 4 VSP instances. Based on the work done for r8a77965 SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569313375-53428-6-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 955ceb563c7998ee82eca70b4aeffc98aaf4f703 Author: Biju Das Date: Tue Sep 24 09:22:52 2019 +0100 arm64: dts: renesas: r8a774b1: Add FCPF and FCPV instances Add FCPF and FCPV instances to the r8a774b1 dtsi. Based on the work done for r8a77965 SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569313375-53428-5-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 63093a8e58be0723f62fa11dd85cd751e062f99c Author: Biju Das Date: Tue Sep 24 09:22:51 2019 +0100 arm64: dts: renesas: r8a774b1: Add IPMMU device nodes Add RZ/G2N (R8A774B1) IPMMU nodes. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569313375-53428-4-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 070302d4673a6229506226b03acb555cc8bd0eec Author: Biju Das Date: Tue Sep 24 09:22:50 2019 +0100 arm64: dts: renesas: r8a774b1: Add I2C and IIC-DVFS support Add the I2C[0-6] and IIC Bus Interface for DVFS (IIC for DVFS) devices nodes to the r8a774b1 device tree. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569313375-53428-3-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 6317736729acbdb5bd58cb5ee0ba5f354bd51830 Author: Biju Das Date: Tue Sep 24 09:22:49 2019 +0100 arm64: dts: renesas: r8a774b1: Add SDHI support Add SDHI support for the r8a774b1 SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569313375-53428-2-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 928249b781eb5ca598bd32f3e72b90bc3adcf3f6 Author: Biju Das Date: Mon Sep 23 15:57:28 2019 +0100 arm64: dts: renesas: r8a774b1: Add TMU device nodes This patch adds TMU[01234] device tree nodes to the r8a774b1 SoC specific DT. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569250648-33857-5-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 39040e87b71aa126f285ab8939d63056f9983543 Author: Biju Das Date: Mon Sep 23 15:57:27 2019 +0100 arm64: dts: renesas: r8a774b1: Add CMT device nodes This patch adds the CMT[0123] device tree nodes to the r8a774b1 SoC specific DT. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569250648-33857-4-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 95b3547f27a60eb63c0c658072b8cdb09979218c Author: Biju Das Date: Mon Sep 23 15:57:26 2019 +0100 arm64: dts: renesas: r8a774b1: Add RZ/G2N thermal support Add thermal support for R8A774B1 (RZ/G2N) SoC. Based on the work done for r8a77965 SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569250648-33857-3-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ce21f29032ae49a0bb2a260ab5ebf4c516c9f6e9 Author: Biju Das Date: Mon Sep 23 15:57:25 2019 +0100 arm64: dts: renesas: r8a774b1: Add OPPs table for cpu devices This patch adds OPPs table for CA57{0,1} cpu devices. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569250648-33857-2-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 65005e6a5bb4781a6df3edd42c2e1e7a9f85a445 Author: Biju Das Date: Mon Sep 30 09:18:47 2019 +0100 arm64: dts: renesas: Add HiHope RZ/G2N sub board support The HiHope RZ/G2N sub board sits below the HiHope RZ/G2N main board. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569831527-1250-6-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c722d9001ab5586bb5f29d7f79e857a2c892f817 Author: Biju Das Date: Mon Sep 30 09:18:46 2019 +0100 arm64: dts: renesas: r8a774b1: Add Ethernet AVB node This patch adds the SoC specific part of the Ethernet AVB device tree node. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569831527-1250-5-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit bbbb919f3286f3bddfe9b23feaf184860d11d0ac Author: Biju Das Date: Mon Sep 30 09:18:45 2019 +0100 arm64: dts: renesas: r8a774b1: Add GPIO device nodes Add GPIO device nodes to the DT of the r8a774b1 SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569831527-1250-4-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 83e7620a0417cd2716bda35bb89549ffb8692ea0 Author: Biju Das Date: Mon Sep 30 09:18:44 2019 +0100 arm64: dts: renesas: r8a774b1: Add SCIF and HSCIF nodes Add the device nodes for RZ/G2N SCIF and HSCIF serial ports, including clocks, power domains and DMAs. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569831527-1250-3-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fd863e5880623c858e00f8924f8ee63be290d9d6 Author: Biju Das Date: Mon Sep 30 09:18:43 2019 +0100 arm64: dts: renesas: r8a774b1: Add SYS-DMAC device nodes Add sys-dmac[0-2] device nodes for RZ/G2N (R8A774B1) SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569831527-1250-2-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 048b39fae795c713c465b6e1d55089334535d862 Author: Biju Das Date: Mon Sep 30 11:02:58 2019 +0100 arm64: dts: renesas: r8a774b1-hihope-rzg2n: Enable HS400 mode This patch enables HS400 mode on HiHope RZ/G2N board. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569837778-55874-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a381325812691f57aece60aaee76938ac8fc6619 Author: Biju Das Date: Fri Oct 4 15:52:40 2019 +0100 arm64: dts: renesas: r8a774a1: Remove audio port node This patch removes audio port node from SoC device tree and fixes the below dtb warning Warning (unit_address_vs_reg): /soc/sound@ec500000/ports/port@0: node has a unit name, but no reg property Fixes: e2f04248fcd4 ("arm64: dts: renesas: r8a774a1: Add audio support") Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1570200761-884-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c173dba44c2d2ec2adaa4e607e9729b74236bd57 Author: Dan Murphy Date: Tue Oct 8 13:15:17 2019 -0500 ASoC: tas2562: Introduce the TAS2562 amplifier Introduce the Texas Instruments TAS2562 amplifier driver with I/V sense for loud speaker applications. http://www.ti.com/lit/gpn/tas2562 Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20191008181517.5332-2-dmurphy@ti.com Signed-off-by: Mark Brown commit a4eff5f86c9c5e7d07d880bd86ce8faad19d7063 Author: Daniel Baluta Date: Tue Oct 8 11:44:40 2019 -0500 ASoC: SOF: imx: Read ESAI parameters and send them to DSP ESAI parameters are read for topology file, packed into sof_ipc_dai_esai_parms struct and then sent to DSP. Signed-off-by: Daniel Baluta Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191008164443.1358-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5d43001ae43606dc525f55c482c545afba01bb55 Author: Jaska Uimonen Date: Tue Oct 8 11:44:43 2019 -0500 ASoC: SOF: acpi led support for switch controls Currently sof doesn't support acpi leds with mute switches. So implement acpi leds following quite shamelessly existing HDA implementation by Takashi Iwai. Mute leds can be enabled in topology by adding led and direction token in switch control private data. Signed-off-by: Jaska Uimonen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191008164443.1358-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b4be427683cf6debda331a5d6a4af34885851d19 Author: Daniel Baluta Date: Tue Oct 8 11:44:39 2019 -0500 ASoC: SOF: imx: Describe ESAI parameters to be sent to DSP Introduce sof_ipc_dai_esai_params to keep information that we get from topology and we send to DSP FW. Also bump the ABI minor to reflect the changes on DSP FW. Signed-off-by: Daniel Baluta Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191008164443.1358-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8b160dc2a92c83a566b0596c79febb5933f9a6b5 Author: Pierre-Louis Bossart Date: Tue Oct 8 11:44:38 2019 -0500 ASoC: SOF: pci: add debug module param Add debug parameter for snd-sof-pci. One of the usages for this debug parameter to disable pm_runtime, which can be useful for platform bringup, or keep the parent device active while enabling pm_runtime for child devices (e.g. with SoundWire or MFD). This can also be useful to measure suspend-resume latencies or child devices. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191008164443.1358-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 70b0c75ae1e3d35f829b5fe7ae5692efae63ca71 Author: Pierre-Louis Bossart Date: Tue Oct 8 11:44:37 2019 -0500 ASoC: SOF: acpi: add debug module param Add debug parameter for snd-sof-acpi. One of the usages for this debug parameter to disable pm_runtime, which can be useful for platform bringup, or keep the parent device active while enabling pm_runtime for child devices (e.g. with SoundWire or MFD). This can also be useful to measure suspend-resume latencies or child devices. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191008164443.1358-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 902fd492d5ea2c02666ddadc1da977ca94e6b52c Author: Kai Vehmanen Date: Tue Oct 8 11:44:36 2019 -0500 Revert "ASoC: SOF: Force polling mode on CFL and CNL" This reverts commit 64ca9d9fcb3e3c86b1417e3d17a90b43dd660f81. The workaround is no longer needed after configuring HDAC bus with sync_write=1. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191008164443.1358-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit acf1b71cb693263c7c9373296e872a8fa61a5cf3 Author: Jaska Uimonen Date: Tue Oct 8 11:44:42 2019 -0500 AsoC: SOF: refactor control load code Move code around to enable token parsing in control load. Signed-off-by: Jaska Uimonen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191008164443.1358-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a68c6b6cc77b841dc37c17a5d9a7074e26801af5 Author: Jaska Uimonen Date: Tue Oct 8 11:44:41 2019 -0500 ASoC: SOF: enable dual control for pga Currently sof pga element supports only 1 kcontrol and you can't create for example a mixer element with combined volume slider and mute switch. So enable sof pga to have more than 1 kcontrol associated with it. Also check for possible NULL tlv pointer as switch element might not have it. Signed-off-by: Jaska Uimonen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191008164443.1358-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2636a5172da2eadee8190fad8d82d25d9a276525 Author: Ben Dooks Date: Wed Oct 9 13:14:47 2019 +0100 drm/scheduler: make unexported items static The drm_sched_fence_ops_{scheduled,finished} are not exported from the file so make them static to avoid the following warnings from sparse: drivers/gpu/drm/scheduler/sched_fence.c:131:28: warning: symbol 'drm_sched_fence_ops_scheduled' was not declared. Should it be static? drivers/gpu/drm/scheduler/sched_fence.c:137:28: warning: symbol 'drm_sched_fence_ops_finished' was not declared. Should it be static? Reviewed-by: Alex Deucher Signed-off-by: Ben Dooks Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191009121447.31017-1-ben.dooks@codethink.co.uk commit f3416e7144f5d4ba0fc5dcef6ebfff891266c46a Author: Kai Vehmanen Date: Tue Oct 8 11:44:35 2019 -0500 ASoC: SOF: enable sync_write in hdac_bus Align SOF HDA implementation with snd-hda-intel driver and enable sync_write flag for all supported Intel platforms in SOF. When set, a sync is issued after each verb write. Sync after write has helped to overcome intermittent delays in system resume flow on Intel Coffee Lake systems, and most recently probe errors related to the HDMI codec on Ice Lake systems. Matches the snd-hda-intel driver change done in commit 2756d9143aa5 ("ALSA: hda - Fix intermittent CORB/RIRB stall on Intel chips"). Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191008164443.1358-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 969d49b2cdc88c07b351df59013a172b55056297 Author: Nuno Sá Date: Thu Oct 10 09:42:34 2019 +0200 dt-bindings: asoc: Add ADAU7118 documentation Document the ADAU7118 8 channel PDM to I2S/TDM converter devicetree bindings. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20191010074234.7344-2-nuno.sa@analog.com Signed-off-by: Mark Brown commit ca514c0f12b02a4df32f45ebff056130ee76b202 Author: Nuno Sá Date: Thu Oct 10 09:42:33 2019 +0200 ASOC: Add ADAU7118 8 Channel PDM-to-I2S/TDM Converter driver This patch adds support for the 8 channel PDM-to-I2S/TDM converter. The ADAU7118 converts four stereo pulse density modulation (PDM) bitstreams into one pulse code modulation (PCM) output stream. The source for the PDM data can be eight microphones or other PDM sources. The PCM audio data is output on a serial audio interface port in either inter-IC serial (I2S) or time domain multiplexed (TDM) format. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20191010074234.7344-1-nuno.sa@analog.com Signed-off-by: Mark Brown commit 3a612765f4233993bf5cff302844bd3b6b5a7429 Author: Maarten Lankhorst Date: Fri Oct 4 13:34:54 2019 +0200 drm/i915: Remove cursor use of properties for coordinates We have a src and dect rectangle, use it instead of relying on the core drm properties. Because the core by default clips the src/dst properties, after the drm_atomic_helper_check_plane_state() we manually set the unclipped src/dst rectangles. We still need the call for visibility checks, but this way we are able to use the src/dst rects in the check/commit code. This removes the special case in the watermark code for cursor w/h. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191004113514.17064-5-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä [mlankhorst: Clarify commit message to state we use unclipped src/dst commit d8bd3e157a17b03d2b0f380e143bf8204f75df94 Author: Maarten Lankhorst Date: Fri Oct 4 13:34:56 2019 +0200 drm/i915: Remove begin/finish_crtc_commit, v4. This can all be done from the intel_update_crtc function. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function. Changes since v1: - Inline intel_update_pipe_config() Changes since v2: - Add comments suggested by matt. - Reorder commit_pipe_config() to remove all nesting. (Ville, Matt) - Use intel_set_pipe_src_size((). (Matt) Changes since v3: - Move atomic_update_watermarks closer to the plane calls. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191004113514.17064-7-maarten.lankhorst@linux.intel.com Reviewed-by: Matt Roper [mlankhorst: Replace 8 spaces with tabs in comment] commit 04c8b0bf4abc203df94f63f268a56a7a0efbb0f4 Author: Maarten Lankhorst Date: Fri Oct 4 13:34:55 2019 +0200 drm/i915: Use intel_plane_state in prepare and cleanup plane_fb We need to look at the hw fb in the plane split, so replace all the places that use drm_plane_state with intel_plane_state. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191004113514.17064-6-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä [mlankhorst: Fix line wraps (Matt Roper)] Reviewed-by: Matt Roper commit af9fbfa657c86dd0c5ee0e24da3e2da79353c0fb Author: Maarten Lankhorst Date: Fri Oct 4 13:34:53 2019 +0200 drm/i915: Introduce and use intel_atomic_crtc_state_for_each_plane_state. Instead of looking at drm_plane_state, look at intel_plane_state directly. This will allow us to make the watermarks bigjoiner aware, when we make it work for bigjoiner slave pipes as well. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191004113514.17064-4-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä Reviewed-by: Matt Roper commit 9a3a41dfe2239abe65944cfa1f8cd3aff5a03944 Author: Maarten Lankhorst Date: Fri Oct 4 13:34:52 2019 +0200 drm/i915: Fix for_each_intel_plane_mask definition Using for_each_intel_plane_mask() fails because of an extra bracket, remove the bracket so we can use it in the next commit. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20191004113514.17064-3-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä Reviewed-by: Matt Roper commit fec748740c9ca362dff7a5831105b0edc333bf91 Author: Maarten Lankhorst Date: Thu Oct 10 13:19:13 2019 +0200 drm/plane: Clarify our expectations for src/dst rectangles The rectangles are usually clipped, but it can be useful to have them unclipped, for example for cursor planes. Signed-off-by: Maarten Lankhorst [mlankhorst: Change cursor plane to hardware performing clipping. (Ville) Fix dst description that went missing.] Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191010112918.15724-1-maarten.lankhorst@linux.intel.com commit 76d6d3df524150fb8d5b5c1a3b877c2af42f67e5 Author: YueHaibing Date: Thu Oct 10 11:52:13 2019 +0000 drm/vkms: Remove duplicated include from vkms_drv.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191010115213.115706-1-yuehaibing@huawei.com commit 7a56b81c474619fa84c60d07eaa287c8fc33ac3c Author: Ralf Ramsauer Date: Thu Oct 10 12:21:02 2019 +0200 x86/jailhouse: Only enable platform UARTs if available ACPI tables aren't available if Linux runs as guest of the hypervisor Jailhouse. This makes the 8250 driver probe for all platform UARTs as it assumes that all UARTs are present in case of !ACPI. Jailhouse will stop execution of Linux guest due to port access violation. So far, these access violations were solved by tuning the 8250.nr_uarts cmdline parameter, but this has limitations: Only consecutive platform UARTs can be mapped to Linux, and only in the sequence 0x3f8, 0x2f8, 0x3e8, 0x2e8. Beginning from setup_data version 2, Jailhouse will place information of available platform UARTs in setup_data. This allows for selective activation of platform UARTs. Query setup_data version and only activate available UARTS. This patch comes with backward compatibility, and will still support older setup_data versions. In case of older setup_data versions, Linux falls back to the old behaviour. Signed-off-by: Ralf Ramsauer Signed-off-by: Borislav Petkov Reviewed-by: Jan Kiszka Cc: Baoquan He Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: jailhouse-dev@googlegroups.com Cc: Juergen Gross Cc: "Kirill A. Shutemov" Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191010102102.421035-3-ralf.ramsauer@oth-regensburg.de commit 83fa9842afe7d15b53267978f347676f9b5632d1 Author: Daniel Vetter Date: Thu Oct 10 00:41:13 2019 +0200 drm/dp-mst: Drop connection_mutex check Private atomic objects have grown their own locking with commit b962a12050a387e4bbf3a48745afe1d29d396b0d Author: Rob Clark Date: Mon Oct 22 14:31:22 2018 +0200 drm/atomic: integrate modeset lock with private objects which means we're no longer relying on connection_mutex for mst state locking needs. Cc: Lyude Paul Cc: Sean Paul Reviewed-by: Lyude Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191009224113.5432-1-daniel.vetter@ffwll.ch commit 0935e5f7527ccd46163b42e1540409c98e29fe17 Author: Ralf Ramsauer Date: Thu Oct 10 12:21:01 2019 +0200 x86/jailhouse: Improve setup data version comparison Soon, setup_data will contain information on passed-through platform UARTs. This requires some preparational work for the sanity check of the header and the check of the version. Use the following strategy: 1. Ensure that the header declares at least enough space for the version and the compatible_version as it must hold that fields for any version. The location and semantics of header+version fields will never change. 2. Copy over data -- as much as as possible. The length is either limited by the header length or the length of setup_data. 3. Things are now in place -- sanity check if the header length complies the actual version. For future versions of the setup_data, only step 3 requires alignment. Signed-off-by: Ralf Ramsauer Signed-off-by: Borislav Petkov Reviewed-by: Jan Kiszka Cc: Baoquan He Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: jailhouse-dev@googlegroups.com Cc: Juergen Gross Cc: "Kirill A. Shutemov" Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191010102102.421035-2-ralf.ramsauer@oth-regensburg.de commit 40688bd58df71269d146996e10e84ca3888fd330 Author: Nishad Kamdar Date: Fri Sep 20 21:29:34 2019 +0530 misc: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files for Miscellaneous device drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Link: https://lore.kernel.org/r/20190920155931.GA6251@nishad Signed-off-by: Greg Kroah-Hartman commit 7ed42113ce0379197c44232429e309bcc72424b0 Author: Nishad Kamdar Date: Fri Sep 20 21:48:30 2019 +0530 ocxl: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files for Open Coherent Accelerator (OCXL) compatible device drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Acked-by: Andrew Donnellan Link: https://lore.kernel.org/r/20190920161826.GA6894@nishad Signed-off-by: Greg Kroah-Hartman commit efcd2390f56ba979e0d1022c46f48d7beec0bdd6 Author: Jorge Ramirez-Ortiz Date: Wed Oct 9 15:41:23 2019 +0100 misc: fastrpc: revert max init file size back to 2MB With the integration of the mmap/unmap functionality, it is no longer necessary to allow large memory allocations upfront since they can be handled during runtime. Tested on QCS404 with CDSP Neural Processing test suite. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191009144123.24583-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 387f625585d1a59e5dc7fbd6bd4002360cad78b0 Author: Jorge Ramirez-Ortiz Date: Wed Oct 9 15:41:22 2019 +0100 misc: fastrpc: handle interrupted contexts Buffers owned by a context that has been interrupted either by a signal or a timeout might still be being accessed by the DSP. delegate returning the associated memory to a later time when the device is released. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191009144123.24583-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 55bcda35584c995d2544902e77c2ad5bee6e729b Author: Jorge Ramirez-Ortiz Date: Wed Oct 9 15:41:21 2019 +0100 misc: fastrpc: do not interrupt kernel calls the DSP firmware requires some calls to be held until processing has completed: this is to guarantee that memory continues to be accessible. Nevertheless, the fastrpc driver chooses not support the case were requests need to be held for unbounded amounts of time. If such a use-case becomes necessary, this timeout will need to be revisited. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191009144123.24583-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2d10d2d170723e9278282458a6704552dcb77eac Author: Srinivas Kandagatla Date: Wed Oct 9 15:41:20 2019 +0100 misc: fastrpc: fix memory leak from miscdev->name Fix a memory leak in miscdev->name by using devm_variant Orignally reported by kmemleak: [] kmemleak_alloc+0x50/0x84 [] __kmalloc_track_caller+0xe8/0x168 [] kvasprintf+0x78/0x100 [] kasprintf+0x50/0x74 [] fastrpc_rpmsg_probe+0xd8/0x20c [] rpmsg_dev_probe+0xa8/0x148 [] really_probe+0x208/0x248 [] driver_probe_device+0x98/0xc0 [] __device_attach_driver+0x9c/0xac [] bus_for_each_drv+0x60/0x8c [] __device_attach+0x8c/0x100 [] device_initial_probe+0x20/0x28 [] bus_probe_device+0x34/0x7c [] device_add+0x420/0x498 [] device_register+0x24/0x2c Signed-off-by: Srinivas Kandagatla Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191009144123.24583-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2419e55e532de14fdf336e09e453aa2831c73a25 Author: Jorge Ramirez-Ortiz Date: Wed Oct 9 15:41:19 2019 +0100 misc: fastrpc: add mmap/unmap support Support the allocation/deallocation of buffers mapped to the DSP. When the memory mapped to the DSP at process creation is not enough, the fastrpc library can extend it at runtime. This avoids having to do large preallocations by default. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191009144123.24583-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 689e3557a2d1245475bb6ecfccf4ca5ab03e3a74 Author: Randy Dunlap Date: Tue Sep 17 17:58:56 2019 -0700 misc: MIC: drop all 'comment' lines from its Kconfig The "comment" Kconfig lines for the Intel MIC drivers are redundant, and nowhere else do we use this kind of Kconfig style, so remove them. Signed-off-by: Randy Dunlap Cc: Sudeep Dutt Cc: Ashutosh Dixit Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/3aa90a0f-1576-d38b-8382-6ed623ed5466@infradead.org Signed-off-by: Greg Kroah-Hartman commit 9964f8c899fc66539f1fb57b9dc6c401b77b5cdc Author: zhong jiang Date: Fri Sep 13 01:04:01 2019 +0800 misc: rtsx: Remove unneeded variable in rts5260_card_power_on rts5260_card_power_on do not need local variable to store different value, Hence just remove it. Signed-off-by: zhong jiang Link: https://lore.kernel.org/r/1568307841-44065-1-git-send-email-zhongjiang@huawei.com Signed-off-by: Greg Kroah-Hartman commit d52accce0aadd577ab12b59a71a450b3765f5db1 Author: Anup Patel Date: Wed Sep 25 06:37:56 2019 +0000 platform: goldfish: Allow goldfish drivers for archs with IOMEM and DMA We don't need explicit dependency of Goldfish kconfig option on various architectures. Instead, the Goldfish kconfig option should only depend on HAS_IOMEM and HAS_DMA which is sufficient for all Goldfish devices. Signed-off-by: Anup Patel Link: https://lore.kernel.org/r/20190925063706.56175-2-anup.patel@wdc.com Signed-off-by: Greg Kroah-Hartman commit 32a738704d7fc20fcece0e14e4e44ec68689746f Author: Denis Efremov Date: Thu Sep 26 00:36:56 2019 +0300 greybus: remove excessive check in gb_connection_hd_cport_quiesce() Function pointer "hd->driver->cport_quiesce" is already checked at the beginning of gb_connection_hd_cport_quiesce(). Thus, the second check can be removed. Signed-off-by: Denis Efremov Acked-by: Johan Hovold Link: https://lore.kernel.org/r/20190925213656.8950-1-efremov@linux.com Signed-off-by: Greg Kroah-Hartman commit bb4d6e0ee83c91b34585d1ce2aceed1ae2d3729f Author: Dmitry Torokhov Date: Wed Oct 2 14:56:58 2019 -0700 lis3lv02d: switch to using input device polling mode Now that instances of input_dev support polling mode natively, we no longer need to create input_polled_dev instance. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20191002215658.GA134561@dtor-ws Signed-off-by: Greg Kroah-Hartman commit fa6f90f349ac3c79bf085b2b4f5212ea102724d5 Author: Joe Perches Date: Mon Oct 7 11:30:46 2019 -0700 sgi-gru: simplify procfs code some more Use seq_puts and simple string output and not seq_printf with formats and individual strings to reduce overall object size. $ size drivers/misc/sgi-gru/gruprocfs.o* (x86-64 defconfig with gru) text data bss dec hex filename 7006 8 0 7014 1b66 drivers/misc/sgi-gru/gruprocfs.o.new 7472 8 0 7480 1d38 drivers/misc/sgi-gru/gruprocfs.o.old Signed-off-by: Joe Perches Acked-by: Dimitri Sivanich Link: https://lore.kernel.org/r/cce61906a5f7f42f5b2b8b947fc61357bcb56e71.camel@perches.com Signed-off-by: Greg Kroah-Hartman commit ad90ff6964d733ee59d1679f692c23fb1dab7f30 Author: YueHaibing Date: Wed Oct 9 22:37:52 2019 +0800 misc: atmel_tclib: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191009143752.11236-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 71200fcbb91c1a6b6da7fe1c806c6dd27b42e14c Author: YueHaibing Date: Wed Oct 9 22:44:35 2019 +0800 w1: sgi_w1: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191009144435.12656-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 1d40ae4e1784bfa1646fd153ca022db21511284f Author: Jiri Olsa Date: Mon Oct 7 14:53:16 2019 +0200 perf tools: Use perf_mmap way to detect aux mmap We will move this code to libperf shortly, so we need to free it of 'struct auxtrace_mmap' usage, because it won't be available in libperf (for now). The perf_event_mmap_page::aux_size is set when the aux mmap is mapped, so the check is equivalent. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 80e53d1148231d7d4fdc4cd89e5393616b33bf82 Author: Jiri Olsa Date: Mon Oct 7 14:53:15 2019 +0200 libperf: Adopt perf_mmap__put() function from tools/perf Move perf_mmap__put() from tools/perf to libperf. Once perf_mmap__put() is moved, we need a way to call application related unmap code (AIO and aux related code for eprf), when the map goes away. Add the perf_mmap::unmap callback to do that. The unmap path from perf is: perf_mmap__put (libperf) perf_mmap__munmap (libperf) map->unmap_cb -> perf_mmap__unmap_cb (perf) mmap__munmap (perf) Committer notes: Add missing linux/kernel.h to tools/perf/lib/mmap.c to get the BUG_ON definition. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 59d7ea620b58fa7d107834a81528e3098f1c27b0 Author: Jiri Olsa Date: Mon Oct 7 14:53:14 2019 +0200 libperf: Adopt perf_mmap__unmap() function from tools/perf Move perf_mmap__unmap() from tools/perf to libperf, to internal header internal/mmap.h. It will be used in the following patches. And rename the existing perf's function to mmap__munmap(). Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 86027e312c36dfe6b614e32f7550d5fe20a6d9e0 Author: Chris Wilson Date: Thu Oct 10 12:02:52 2019 +0100 drm/i915/selftests: Check that registers are preserved between virtual engines Make sure that we copy across the registers from one engine to the next, as we hop around a virtual engine. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191010110252.17289-1-chris@chris-wilson.co.uk commit e75710f063e29ae7715c57b45eb27c2d504b32ca Author: Jiri Olsa Date: Mon Oct 7 14:53:13 2019 +0200 libperf: Adopt perf_mmap__get() function from tools/perf Move perf_mmap__get() from tools/perf to libperf in the internal header internal/mmap.h. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bd9bec5b6a09a3a7656f096e3ff0ca6709f89770 Author: Chris Wilson Date: Thu Oct 10 09:32:42 2019 +0100 drm/i915/execlists: Mark up expected state during reset Move the BUG_ON around slightly and add some explanations for each to try and capture the expected state more carefully. We want to compare the expected active state of our bookkeeping as compared to the tracked HW state. References: https://bugs.freedesktop.org/show_bug.cgi?id=111937 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191010083242.1387-1-chris@chris-wilson.co.uk commit 32c261c070c222858148c2171698d2954242ddd9 Author: Jiri Olsa Date: Mon Oct 7 14:53:12 2019 +0200 libperf: Adopt perf_mmap__mmap() function from tools/perf Move perf_mmap__mmap() from tools/perf to libperf, it will be used in the following patches. And rename the existing perf's function to mmap__mmap(). Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 504582e8e40b90b8f8c58783e2d1e4f6a2b71a3a Author: Ard Biesheuvel Date: Sat Oct 5 11:11:10 2019 +0200 crypto: geode-aes - switch to skcipher for cbc(aes) fallback Commit 79c65d179a40e145 ("crypto: cbc - Convert to skcipher") updated the generic CBC template wrapper from a blkcipher to a skcipher algo, to get away from the deprecated blkcipher interface. However, as a side effect, drivers that instantiate CBC transforms using the blkcipher as a fallback no longer work, since skciphers can wrap blkciphers but not the other way around. This broke the geode-aes driver. So let's fix it by moving to the sync skcipher interface when allocating the fallback. At the same time, align with the generic API for ECB and CBC by rejecting inputs that are not a multiple of the AES block size. Fixes: 79c65d179a40e145 ("crypto: cbc - Convert to skcipher") Cc: # v4.20+ ONLY Signed-off-by: Ard Biesheuvel Signed-off-by: Florian Bezdeka Signed-off-by: Herbert Xu commit c03b04dcdba1da39903e23cc4d072abf8f68f2dd Author: Navid Emamdoost Date: Fri Oct 4 14:34:54 2019 -0500 crypto: user - fix memory leak in crypto_reportstat In crypto_reportstat, a new skb is created by nlmsg_new(). This skb is leaked if crypto_reportstat_alg() fails. Required release for skb is added. Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto statistics") Cc: Signed-off-by: Navid Emamdoost Signed-off-by: Herbert Xu commit ffdde5932042600c6807d46c1550b28b0db6a3bc Author: Navid Emamdoost Date: Fri Oct 4 14:29:16 2019 -0500 crypto: user - fix memory leak in crypto_report In crypto_report, a new skb is created via nlmsg_new(). This skb should be released if crypto_report_alg() fails. Fixes: a38f7907b926 ("crypto: Add userspace configuration API") Cc: Signed-off-by: Navid Emamdoost Signed-off-by: Herbert Xu commit 64e7f852c47ce99f6c324c46d6a299a5a7ebead9 Author: Ayush Sawal Date: Fri Oct 4 10:50:58 2019 -0700 crypto: af_alg - cast ki_complete ternary op to int when libkcapi test is executed using HW accelerator, cipher operation return -74.Since af_alg_async_cb->ki_complete treat err as unsigned int, libkcapi receive 429467222 even though it expect -ve value. Hence its required to cast resultlen to int so that proper error is returned to libkcapi. AEAD one shot non-aligned test 2(libkcapi test) ./../bin/kcapi -x 10 -c "gcm(aes)" -i 7815d4b06ae50c9c56e87bd7 -k ea38ac0c9b9998c80e28fb496a2b88d9 -a "853f98a750098bec1aa7497e979e78098155c877879556bb51ddeb6374cbaefc" -t "c4ce58985b7203094be1d134c1b8ab0b" -q "b03692f86d1b8b39baf2abb255197c98" Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management") Cc: Signed-off-by: Ayush Sawal Signed-off-by: Atul Gupta Signed-off-by: Herbert Xu Signed-off-by: Ayush Sawal Signed-off-by: Herbert Xu commit 86ef1dfcb561473fbf5e199d58d18c55554d78be Author: Tudor Ambarus Date: Fri Oct 4 08:55:37 2019 +0000 crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize commit 394a9e044702 ("crypto: cfb - add missing 'chunksize' property") adds a test vector where the input length is smaller than the IV length (the second test vector). This revealed a NULL pointer dereference in the atmel-aes driver, that is caused by passing an incorrect offset in scatterwalk_map_and_copy() when atmel_aes_complete() is called. Do not save the IV in req->info of ablkcipher_request (or equivalently req->iv of skcipher_request) when req->nbytes < ivsize, because the IV will not be further used. While touching the code, modify the type of ivsize from int to unsigned int, to comply with the return type of crypto_ablkcipher_ivsize(). Fixes: 91308019ecb4 ("crypto: atmel-aes - properly set IV after {en,de}crypt") Cc: Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 830536770f968ab33ece123b317e252c269098db Author: Ard Biesheuvel Date: Wed Oct 2 09:54:48 2019 +0200 crypto: aegis128/simd - build 32-bit ARM for v8 architecture explicitly Now that the Clang compiler has taken it upon itself to police the compiler command line, and reject combinations for arguments it views as incompatible, the AEGIS128 no longer builds correctly, and errors out like this: clang-10: warning: ignoring extension 'crypto' because the 'armv7-a' architecture does not support it [-Winvalid-command-line-argument] So let's switch to armv8-a instead, which matches the crypto-neon-fp-armv8 FPU profile we specify. Since neither were actually supported by GCC versions before 4.8, let's tighten the Kconfig dependencies as well so we won't run into errors when building with an ancient compiler. Signed-off-by: Ard Biesheuvel Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Reported-by: Signed-off-by: Herbert Xu commit bf59b3053e63783520c2810fc3f676553bc7eedd Author: Jiri Olsa Date: Mon Oct 7 14:53:11 2019 +0200 libperf: Adopt perf_mmap__mmap_len() function from tools/perf Move perf_mmap__mmap_len() from tools/perf wto libperf, it will be used in the following patches. And rename the existing perf's function to mmap__mmap_len(). Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e440979faf6ac8048e1792af383df6af78dd1cb0 Author: Jiri Olsa Date: Mon Oct 7 14:53:10 2019 +0200 libperf: Add 'struct perf_mmap_param' Add libperf's version of mmap params 'struct perf_mmap_param' object with the basics: 'prot' and 'mask'. Encapsulate it in the current 'struct mmap_params' object. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 977da0738f3ba3569b883ed6209c300bfcb695d4 Author: Arnd Bergmann Date: Mon Sep 30 14:14:35 2019 +0200 crypto: inside-secure - Remove #ifdef checks When both PCI and OF are disabled, no drivers are registered, and we get some unused-function warnings: drivers/crypto/inside-secure/safexcel.c:1221:13: error: unused function 'safexcel_unregister_algorithms' [-Werror,-Wunused-function] static void safexcel_unregister_algorithms(struct safexcel_crypto_priv *priv) drivers/crypto/inside-secure/safexcel.c:1307:12: error: unused function 'safexcel_probe_generic' [-Werror,-Wunused-function] static int safexcel_probe_generic(void *pdev, drivers/crypto/inside-secure/safexcel.c:1531:13: error: unused function 'safexcel_hw_reset_rings' [-Werror,-Wunused-function] static void safexcel_hw_reset_rings(struct safexcel_crypto_priv *priv) It's better to make the compiler see what is going on and remove such ifdef checks completely. In case of PCI, this is trivial since pci_register_driver() is defined to an empty function that makes the compiler subsequently drop all unused code silently. The global pcireg_rc/ofreg_rc variables are not actually needed here since the driver registration does not fail in ways that would make it helpful. For CONFIG_OF, an IS_ENABLED() check is still required, since platform drivers can exist both with and without it. A little change to linux/pci.h is needed to ensure that pcim_enable_device() is visible to the driver. Moving the declaration outside of ifdef would be sufficient here, but for consistency with the rest of the file, adding an inline helper is probably best. Fixes: 212ef6f29e5b ("crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n") Signed-off-by: Arnd Bergmann Acked-by: Bjorn Helgaas # pci.h Signed-off-by: Herbert Xu commit 353120b48d4f61288e4745b0c8a191784b11c0f4 Author: Jiri Olsa Date: Mon Oct 7 14:53:09 2019 +0200 libperf: Add perf_mmap__init() function Add perf_mmap__init() function to initialize 'struct perf_mmap' objects. Add it to a new mmap.c source file, that will carry all the mmap related functions. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 74e6bd472b6d9e80ec9972989d8991736fe46c51 Author: Arnd Bergmann Date: Mon Sep 30 14:14:33 2019 +0200 crypto: inside-secure - Fix a maybe-uninitialized warning A previous fixup avoided an unused variable warning but replaced it with a slightly scarier warning: drivers/crypto/inside-secure/safexcel.c:1100:6: error: variable 'irq' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] This is harmless as it is impossible to get into this case, but the compiler has no way of knowing that. Add an explicit error handling case to make it obvious to both compilers and humans reading the source. Fixes: 212ef6f29e5b ("crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n") Signed-off-by: Arnd Bergmann Acked-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 75451f871cf5ed735c96118894fb9de418cd8a79 Author: Zaibo Xu Date: Mon Sep 30 17:20:09 2019 +0800 MAINTAINERS: Add maintainer for HiSilicon HPRE driver Here adds maintainer information for high performance RSA engine (HPRE) driver. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 8489741516182d8ac57a69e9f4ca963450607351 Author: Zaibo Xu Date: Mon Sep 30 17:20:08 2019 +0800 crypto: hisilicon - Add debugfs for HPRE HiSilicon HPRE engine driver uses debugfs to provide debug information, the usage can be found in /Documentation/ABI/testing/debugfs-hisi-hpre. Signed-off-by: Zaibo Xu Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit b492f82fcee1d1c6cdb54ce6e8134438e651b3cf Author: Zaibo Xu Date: Mon Sep 30 17:20:07 2019 +0800 Documentation: Add debugfs doc for hisi_hpre Add debugfs descriptions for HiSilicon HPRE driver. Signed-off-by: Zaibo Xu Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 5ec302a364bfd95be29a9784b2fabd8e2ddf0476 Author: Zaibo Xu Date: Mon Sep 30 17:20:06 2019 +0800 crypto: hisilicon - add SRIOV support for HPRE HiSilicon HPRE engine supports PCI SRIOV. This patch enable this feature. User can enable VFs and pass through them to VM, same HPRE driver can work in VM to provide RSA and DH algorithms by crypto akcipher and kpp interfaces. Signed-off-by: Zaibo Xu Signed-off-by: Hui tang Signed-off-by: Herbert Xu commit c8b4b477079d1995cc0a1c10d5cdfd02be938cdf Author: Zaibo Xu Date: Mon Sep 30 17:20:05 2019 +0800 crypto: hisilicon - add HiSilicon HPRE accelerator The HiSilicon HPRE accelerator implements RSA and DH algorithms. It uses Hisilicon QM as interface to CPU. This patch provides PCIe driver to the accelerator and registers its algorithms to crypto akcipher and kpp interfaces. Signed-off-by: Zaibo Xu Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit a92a00f809503c6db9dac518951e060ab3d6f6ee Author: Zhou Wang Date: Mon Sep 30 15:08:55 2019 +0800 crypto: hisilicon - misc fix about sgl This patch fixes some misc problems in sgl codes, e.g. missing static, sparse error and input parameter check. Signed-off-by: Zhou Wang Signed-off-by: Shukun Tan Signed-off-by: Herbert Xu commit d8ac7b85236b04d14fa80328726cd4d098b4a2a7 Author: Zhou Wang Date: Mon Sep 30 15:08:54 2019 +0800 crypto: hisilicon - fix large sgl memory allocation problem when disable smmu When disabling SMMU, it may fail to allocate large continuous memory. This patch fixes this by allocating memory as blocks. Signed-off-by: Zhou Wang Signed-off-by: Shukun Tan Signed-off-by: Herbert Xu commit f081fda293ffba54216a7dab66faba7275475006 Author: Shukun Tan Date: Mon Sep 30 15:08:53 2019 +0800 crypto: hisilicon - add sgl_sge_nr module param for zip Add a module parameter for zip driver to set the number of SGE in one SGL. Signed-off-by: Shukun Tan Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu commit 48c1cd40fae31aa39e33930e7d28a0d96f01ea17 Author: Zhou Wang Date: Mon Sep 30 15:08:52 2019 +0800 crypto: hisilicon - merge sgl support to hisi_qm module As HW SGL can be seen as a data format of QM's sqe, we merge sgl code into qm module and rename it as hisi_qm, which reduces the number of module and make the name less generic. This patch also modify the interface of SGL: - Create/free hisi_acc_sgl_pool inside. - Let user to pass the SGE number in one SGL when creating sgl pool, which is better than a unified module parameter for sgl module before. - Modify zip driver according to sgl interface change. Signed-off-by: Zhou Wang Signed-off-by: Shukun Tan Signed-off-by: Herbert Xu commit daae28debcb03eee837fadfd20788107b325c5a2 Author: Laurent Vivier Date: Thu Sep 12 15:30:22 2019 +0200 hwrng: core - move add_early_randomness() out of rng_mutex add_early_randomness() is called every time a new rng backend is added and every time it is set as the current rng provider. add_early_randomness() is called from functions locking rng_mutex, and if it hangs all the hw_random framework hangs: we can't read sysfs, add or remove a backend. This patch move add_early_randomness() out of the rng_mutex zone. It only needs the reading_mutex. Signed-off-by: Laurent Vivier Signed-off-by: Herbert Xu commit c31e73121f4c1ec45a3e523ac6ce3ce6dafdcec1 Author: Murali Nalajala Date: Mon Oct 7 13:37:42 2019 -0700 base: soc: Handle custom soc information sysfs entries Soc framework exposed sysfs entries are not sufficient for some of the h/w platforms. Currently there is no interface where soc drivers can expose further information about their SoCs via soc framework. This change address this limitation where clients can pass their custom entries as attribute group and soc framework would expose them as sysfs properties. Signed-off-by: Murali Nalajala Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1570480662-25252-1-git-send-email-mnalajal@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 26d5310ee28ad9395bd676f750d2ee3ddff3dcfd Author: John Garry Date: Wed Oct 9 16:54:33 2019 +0800 MAINTAINERS: Add entry for perf tool arm64 pmu-events files Will and I have an interest in reviewing the pmu-events changes related to arm64, so add a specific entry for this. Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Florian Fainelli Cc: Jiri Olsa Cc: linuxarm@huawei.com Cc: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Link: http://lore.kernel.org/lkml/1570611273-108281-1-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 33364d63c75d6182fa369cea80315cf1bb0ee38e Author: Maximilian Luz Date: Tue Sep 24 18:22:26 2019 +0200 serdev: Add ACPI devices by ResourceSource field When registering a serdev controller, ACPI needs to be checked for devices attached to it. Currently, all immediate children of the ACPI node of the controller are assumed to be UART client devices for this controller. Furthermore, these devices are not searched elsewhere. This is incorrect: Similar to SPI and I2C devices, the UART client device definition (via UARTSerialBusV2) can reside anywhere in the ACPI namespace as resource definition inside the _CRS method and points to the controller via its ResourceSource field. This field may either contain a fully qualified or relative path, indicating the controller device. To address this, we need to walk over the whole ACPI namespace, looking at each resource definition, and match the client device to the controller via this field. This patch is based on the existing acpi serial bus implementations in drivers/i2c/i2c-core-acpi.c and drivers/spi/spi.c, specifically commit 4c3c59544f33e97cf8557f27e05a9904ead16363 ("spi/acpi: enumerate all SPI slaves in the namespace"). Signed-off-by: Maximilian Luz Reviewed-by: Hans de Goede Tested-by: Hans de Goede Link: https://lore.kernel.org/r/20190924162226.1493407-1-luzmaximilian@gmail.com Signed-off-by: Greg Kroah-Hartman commit 619cbcaedc8eeb923cf344f72f27ebd431b5a44f Author: Ben Dooks Date: Wed Oct 9 14:53:56 2019 +0100 serial: sirf: make register info static The sirfsoc_usp and sirfsoc_uart objects are not used outside of the drivers/tty/serial/sirfsoc_uart.o so make them static. Fixes following sparse warnings: drivers/tty/serial/sirfsoc_uart.h:123:30: warning: symbol 'sirfsoc_usp' was not declared. Should it be static? drivers/tty/serial/sirfsoc_uart.h:189:30: warning: symbol 'sirfsoc_uart' was not declared. Should it be static? Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20191009135356.11180-1-ben.dooks@codethink.co.uk Signed-off-by: Greg Kroah-Hartman commit 8b7103f31950443fd5727d7d80d3c65416b5a390 Author: Akash Asthana Date: Thu Oct 10 15:16:43 2019 +0530 tty: serial: qcom_geni_serial: Wakeup over UART RX Add system wakeup capability over UART RX line for wakeup capable UART. When system is suspended, RX line act as an interrupt to wakeup system for any communication requests from peer. Signed-off-by: Akash Asthana Link: https://lore.kernel.org/r/1570700803-17566-1-git-send-email-akashast@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 3e4aaea7a0391d47f6ffff1f10594c658a67c881 Author: Akash Asthana Date: Thu Oct 10 15:16:03 2019 +0530 tty: serial: qcom_geni_serial: IRQ cleanup Move ISR registration from startup to probe function to avoid registering it everytime when the port open is called for driver. Signed-off-by: Akash Asthana Link: https://lore.kernel.org/r/1570700763-17319-1-git-send-email-akashast@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 42466b9f29b415c254dc4c2f4618e2a96951a406 Author: Ian Rogers Date: Mon Sep 30 17:36:23 2019 -0700 perf tools: Avoid 'sample_reg_masks' being const + weak Being const + weak breaks with some compilers that constant-propagate from the weak symbol. This behavior is outside of the specification, but in LLVM is chosen to match GCC's behavior. LLVM's implementation was set in this patch: https://github.com/llvm/llvm-project/commit/f49573d1eedcf1e44893d5a062ac1b72c8419646 A const + weak symbol is set to be weak_odr: https://llvm.org/docs/LangRef.html ODR is one definition rule, and given there is one constant definition constant-propagation is possible. It is possible to get this code to miscompile with LLVM when applying link time optimization. As compilers become more aggressive, this is likely to break in more instances. Move the definition of sample_reg_masks to the conditional part of perf_regs.h and guard usage with HAVE_PERF_REGS_SUPPORT. This avoids the weak symbol. Fix an issue when HAVE_PERF_REGS_SUPPORT isn't defined from patch v1. In v3, add perf_regs.c for architectures that HAVE_PERF_REGS_SUPPORT but don't declare sample_regs_masks. Further notes: Jiri asked: "Is this just a precaution or you actualy saw some breakage?" Ian answered: "We saw a breakage with clang with thinlto enabled for linking. Our compiler team had recently seen, and were surprised by, a similar issue and were able to dig out the weak ODR issue." Signed-off-by: Ian Rogers Reviewed-by: Nick Desaulniers Acked-by: Jiri Olsa Cc: Albert Ou Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: clang-built-linux@googlegroups.com Cc: Guo Ren Cc: Kan Liang Cc: linux-riscv@lists.infradead.org Cc: Mao Han Cc: Mark Rutland Cc: Namhyung Kim Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191001003623.255186-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c7b7de63124645089ccf9900b9e5ea08059ccae0 Author: Christian Borntraeger Date: Fri Feb 15 13:47:20 2019 +0100 KVM: s390: Do not yield when target is already running If the target is already running we do not need to yield. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck commit 8474e5cac07e7f21dd8c0b3620640db30115db56 Author: Christian Borntraeger Date: Fri Feb 15 13:47:20 2019 +0100 KVM: s390: count invalid yields To analyze some performance issues with lock contention and scheduling it is nice to know when diag9c did not result in any action or when no action was tried. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck commit efec8d219fb1bc2d7ab4f1c582e7beed44e309f4 Author: Christian Borntraeger Date: Thu Oct 10 09:37:29 2019 +0200 selftests: kvm: make syncregs more reliable on s390 similar to commit 2c57da356800 ("selftests: kvm: fix sync_regs_test with newer gccs") and commit 204c91eff798a ("KVM: selftests: do not blindly clobber registers in guest asm") we better do not rely on gcc leaving r11 untouched. We can write the simple ucall inline and have the guest code completely as small assembler function. Signed-off-by: Christian Borntraeger Suggested-by: Paolo Bonzini Reviewed-by: Thomas Huth commit c8ff64053757a71c9d963c091da0ef4cd517c9f9 Author: Jonas Karlman Date: Mon Oct 7 19:21:51 2019 +0000 drm/sun4i: Enable DRM InfoFrame support on H6 This patch enables Dynamic Range and Mastering InfoFrame on H6. Cc: Maxime Ripard Cc: Jernej Skrabec Signed-off-by: Jonas Karlman Reviewed-by: Andrzej Hajda Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/HE1PR06MB40119DBC0DAE7BA251DF7074AC9B0@HE1PR06MB4011.eurprd06.prod.outlook.com commit e2229fb73e2120e7d107debd1aa4d153b255a2e2 Author: Jonas Karlman Date: Mon Oct 7 19:21:50 2019 +0000 drm/meson: Enable DRM InfoFrame support on GXL, GXM and G12A This patch enables Dynamic Range and Mastering InfoFrame on GXL, GXM and G12A. Cc: Neil Armstrong Signed-off-by: Jonas Karlman Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/HE1PR06MB4011BB614A49253FD074BCCBAC9B0@HE1PR06MB4011.eurprd06.prod.outlook.com commit 1bf95915a878b7041aa915558d76c579f61e2a0f Author: Jonas Karlman Date: Mon Oct 7 19:21:49 2019 +0000 drm/rockchip: Enable DRM InfoFrame support on RK3328 and RK3399 This patch enables Dynamic Range and Mastering InfoFrame on RK3328 and RK3399. Cc: Sandy Huang Cc: Heiko Stuebner Signed-off-by: Jonas Karlman Reviewed-by: Heiko Stuebner Reviewed-by: Andrzej Hajda Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/HE1PR06MB4011C9579CA6BBCD96C87810AC9B0@HE1PR06MB4011.eurprd06.prod.outlook.com commit 7cea855922cb6a84d56ee8f12783f5b5e14c6129 Author: Jonas Karlman Date: Mon Oct 7 19:21:48 2019 +0000 drm/bridge: dw-hdmi: Add Dynamic Range and Mastering InfoFrame support Add support for configuring Dynamic Range and Mastering InfoFrame from the hdr_output_metadata connector property. This patch adds a use_drm_infoframe flag to dw_hdmi_plat_data that platform drivers use to signal when Dynamic Range and Mastering infoframes is supported. This flag is needed because Amlogic GXBB and GXL report same DW-HDMI version, and only GXL support DRM InfoFrame. These changes were based on work done by Zheng Yang to support DRM InfoFrame on the Rockchip 4.4 BSP kernel at [1] and [2] [1] https://github.com/rockchip-linux/kernel/tree/develop-4.4 [2] https://github.com/rockchip-linux/kernel/commit/d1943fde81ff41d7cca87f4a42f03992e90bddd5 Cc: Zheng Yang Signed-off-by: Jonas Karlman Reviewed-by: Neil Armstrong Reviewed-by: Andrzej Hajda Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/HE1PR06MB4011D7B916CBF8B740ACC45FAC9B0@HE1PR06MB4011.eurprd06.prod.outlook.com commit d13cf9eae44414120e67d83229d981408c5ddafa Author: Colin Ian King Date: Thu Oct 10 10:57:48 2019 +0100 staging: wfx: fix spelling mistake "non existant" -> "non-existent" There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191010095748.17047-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 09865094536c759d84aa0b9ce9a27ffed1f2bd9e Author: Adam Ford Date: Wed Sep 11 19:47:14 2019 +0200 ARM: dts: Add OPP-V2 table for AM3517 The AM3517 only lists 600MHz @ 1.2V, but the register values for 0x4830A204 = 1b86 802f, it seems like am3517 might be a derivative of the omap36 which OPPs would be OPP50 (300 MHz) and OPP100 (600 MHz). This patch sets up the OPP50 and OPP100 tables at 300MHz and 600MHz for the AM3517 with each having an operating voltage at 1.2V. Signed-off-by: Adam Ford Acked-by: Tony Lindgren Tested-by: Adam Ford Signed-off-by: H. Nikolaus Schaller Signed-off-by: Viresh Kumar commit 3fbeef397212046cc514fe9fcd07e67e6ca32163 Author: Adam Ford Date: Wed Sep 11 19:47:13 2019 +0200 cpufreq: ti-cpufreq: Add support for AM3517 The AM3517 only lists 600MHz @ 1.2V, but the register values for 0x4830A204 = 1b86 802f, it seems like am3517 might be a derivative of the omap36 which OPPs would be OPP50 (300 MHz) and OPP100 (600 MHz). This patch simply adds the am3517 to the compatible table similar to a mix of the omap3430 and omap3430 structure. Signed-off-by: Adam Ford Acked-by: Tony Lindgren Tested-by: Adam Ford Signed-off-by: H. Nikolaus Schaller Signed-off-by: Viresh Kumar commit 341afbc9ea3983a2261c9e495e0b66b36b5dda20 Author: H. Nikolaus Schaller Date: Wed Sep 11 19:47:12 2019 +0200 ARM: dts: omap36xx: using OPP1G needs to control the abb_ldo See DM3730,DM275 data sheet (SPRS685B) footnote (6) in Table 4-19 which says that ABB must be switched to FBB mode when using the OPP1G. The LOD definition abb_mpu_iva already exists so that we need to add plumbing for vbb-supply = <&abb_mpu_iva> and define two voltage vectors for each OPP so that the abb LDO is also updated by the ti-cpufreq driver. We also must switch the ti_cpufreq_soc_data to multi_regulator. Note: reading out the abb reglator voltage to verify that it does do transitions can be done by cat /sys/devices/platform/68000000.ocp/483072f0.regulator-abb-mpu/regulator/regulator.*/microvolts Likewise, read the twl4030 provided VDD voltage by cat /sys/devices/platform/68000000.ocp/48070000.i2c/i2c-0/0-0048/48070000.i2c:twl@48:regulator-vdd1/regulator/regulator.*/microvolts Note: to check if the ABB FBB is enabled/disabled, check registers PRM_LDO_ABB_CTRL 0x483072F4 bit 3:0 1=bypass 5=FBB PRM_LDO_ABB_SETUP 0x483072F0 0x00=bypass 0x11=FBB e.g. /dev/mem opened. Memory mapped at address 0xb6fe4000. Value at address 0x483072F4 (0xb6fe42f4): 0x3205 /dev/mem opened. Memory mapped at address 0xb6f89000. Value at address 0x483072F4 (0xb6f892f4): 0x3201 Note: omap34xx and am3517 have/need no comparable LDO or mechanism. Suggested-by: Adam Ford Signed-off-by: H. Nikolaus Schaller Acked-by: Tony Lindgren Tested-by: Adam Ford Signed-off-by: Viresh Kumar commit 42e52616f382a455d64629b156685d5adc21ce85 Author: H. Nikolaus Schaller Date: Wed Sep 11 19:47:11 2019 +0200 cpufreq: ti-cpufreq: omap36xx use "cpu0","vbb" if run in multi_regulator mode In preparation for using the multi_regulator capability of this driver for handling the ABB LDO for OPP1G of the omap36xx we have to take care that the (legacy) vdd-supply name is cpu0-supply = <&vcc>; To do this we add another field to the SoC description table which optionally can specify a list of regulator names. For omap36xx we define "cpu0-supply" and "vbb-supply". The default remains "vdd-supply" and "vbb-supply". Signed-off-by: H. Nikolaus Schaller Acked-by: Tony Lindgren Acked-by: Rob Herring Tested-by: Adam Ford Signed-off-by: Viresh Kumar commit 6ddf6c91e6f884e55d3bb3dcf84ead5bfed273ce Author: H. Nikolaus Schaller Date: Wed Sep 11 19:47:10 2019 +0200 ARM: dts: omap3: bulk convert compatible to be explicitly ti,omap3430 or ti,omap3630 or ti,am3517 For the ti-cpufreq driver we need a clear separation between omap34 and omap36 families since they have different silicon revisions and efuses. So far ti,omap3630/ti,omap36xx is just an additional flag to ti,omap3 while omap34 has no required entry. Therefore we can not match omap34 boards properly. This needs to add ti,omap3430 and ti,omap3630 where it is missing. We also clean up some instances of missing ti,am3517 so that we can rely on seeing either one of: ti,am3517 ti,omap3430 ti,omap3630 in addition to ti,omap3. We leave ti,omap34xx and ti,omap36xx untouched for compatibility. The script to do the conversion is: manually fix am3517_mt_ventoux.dts find arch/arm/boot/dts -name '*.dts*' -exec fgrep -q '"ti,omap34xx"' {} \; ! -exec fgrep -q '"ti,omap3430"' {} \; -exec sed -i '' 's/"ti,omap34xx"/"ti,omap3430", "ti,omap34xx"/' {} \; find arch/arm/boot/dts -name '*.dts*' -exec fgrep -q '"ti,omap36xx"' {} \; ! -exec fgrep -q '"ti,omap3630"' {} \; -exec sed -i '' 's/"ti,omap36xx"/"ti,omap3630", "ti,omap36xx"/' {} \; find arch/arm/boot/dts \( -name 'omap*.dts*' -o -name 'logic*.dts*' \) -exec fgrep -q '"ti,omap3"' {} \; ! -exec fgrep -q '"ti,omap3630"' {} \; ! -exec fgrep -q '"ti,omap36xx"' {} \; ! -exec fgrep -q '"ti,am3517"' {} \; ! -exec fgrep -q '"ti,omap34xx"' {} \; ! -exec fgrep -q '"ti,omap3430"' {} \; -exec sed -i '' 's/"ti,omap3"/"ti,omap3430", "ti,omap3"/' {} \; So if your out-of-tree omap3 board does not show any OPPs, please check the compatibility entry and update if needed. Signed-off-by: H. Nikolaus Schaller Acked-by: Tony Lindgren Tested-by: Adam Ford Signed-off-by: Viresh Kumar commit b552904a73a3bb9a22b8b1db652a6f9285d535f3 Author: H. Nikolaus Schaller Date: Wed Sep 11 19:47:09 2019 +0200 DTS: bindings: omap: update bindings documentation * clarify that we now need either "ti,omap3430" or "ti,omap3630" or "ti,am3517" for omap3 chips * clarify that "ti,omap3" has no default * clarify that AM33x is not an "ti,omap3" * clarify that the list of boards is incomplete * remove some "ti,am33xx", "ti,omap3" * add some missing "ti,omap4" Signed-off-by: H. Nikolaus Schaller Acked-by: Tony Lindgren Tested-by: Adam Ford Signed-off-by: Viresh Kumar commit b7dbe349e1eb5a1c07b58da83d8ee60030682a3a Author: H. Nikolaus Schaller Date: Wed Sep 11 19:47:08 2019 +0200 ARM: dts: omap34xx & omap36xx: replace opp-v1 tables by opp-v2 for With the driver installed, we can change the opp-v1 table format to opp-v2. In addition, move omap3 from whitelist to blacklist in cpufreq-dt-platdev in the same patch, because doing either first breaks operation and may make trouble in bisect. We also can remove opp-v1 table for omap3-n950-n9 since its 1GHz capability is now automatically detected. We also fix a wrong OPP4 voltage for omap3430 which must be 0.6V + 54*12.5mV = 1275mV. Otherwise the twl4030 driver will reject this OPP. Note: the high speed OPPs that were not available in the opp-v1 tables are tagged "turbo-mode;" which means they are not automatically activated by the govenors or cpu-freq. To enable you have to write echo 1 >/sys/devices/system/cpu/cpufreq/boost Note: to hard disable an OPP in a board.dts file use e.g. &cpu0_opp_table: { /delete-node/ opp1g-1000000000; /* do not use */ }; or alternatively: &cpu0_opp_table: { opp1g-1000000000 { status = "disabled"; /* do not use */ }; }; Signed-off-by: H. Nikolaus Schaller Acked-by: Tony Lindgren Tested-by: Adam Ford Signed-off-by: Viresh Kumar commit b4bc9f9e27edd8de76d44675c8f0c6c2ccb6b22c Author: H. Nikolaus Schaller Date: Wed Sep 11 19:47:07 2019 +0200 cpufreq: ti-cpufreq: add support for omap34xx and omap36xx This adds code and tables to read the silicon revision and eFuse (speed binned / 720 MHz grade) bits for selecting opp-v2 table entries. Since these bits are not always part of the syscon register range (like for am33xx, am43, dra7), we add code to directly read the register values using ioremap() if syscon access fails. The format of the opp-supported-hw entries is that it has two 32 bit bitfields. E.g.: opp-supported-hw = <0xffffffff 3> The first value is matched against the bit position of the silicon revision which is (see TRM) omap34xx: BIT(0) ES1.0 BIT(1) ES2.0 BIT(2) ES2.1 BIT(3) ES3.0 BIT(4) ES3.1 BIT(7) ES3.1.2 omap36xx: BIT(0) ES1.0 BIT(1) ES1.1 BIT(2) ES1.2 The second value is matched against the speed grade eFuse: BIT(0) no high speed OPP BIT(1) high speed OPP This means for the example above that it is always enabled while e.g. opp-supported-hw = <0x1 2> enables the OPP only for ES1.0 BIT(0) and if the high speed eFuse is set BIT(1). Signed-off-by: H. Nikolaus Schaller Reviewed-by: Tony Lindgren Tested-by: Adam Ford Signed-off-by: Viresh Kumar commit 1141a7522e3961e8d4b20db7495d4dfb1e07d7ae Author: YueHaibing Date: Wed Oct 9 12:04:49 2019 +0000 usb: typec: remove duplicated include from hd3ss3220.c Remove duplicated include. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191009120449.44899-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 07562314c2d3563daafb6f5fde8ca22e11308e0d Author: Fabrizio Castro Date: Tue Oct 8 11:38:44 2019 +0100 dt-bindings: dmaengine: usb-dmac: Add binding for r8a774b1 This patch adds the binding for r8a774b1 SoC (RZ/G2N). Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1570531132-21856-3-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit a17e369540c52267f9e50329756e91e2adcb2f8b Author: Fabrizio Castro Date: Tue Oct 8 11:38:43 2019 +0100 dt-bindings: rcar-gen3-phy-usb2: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1570531132-21856-2-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 808566e6a78faf5d6b8234bd8f9a8130510e8c0d Author: Fabrizio Castro Date: Tue Oct 8 11:38:45 2019 +0100 dt-bindings: usb: renesas_usbhs: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1570531132-21856-4-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit f48c0a4228af75b7e6027d9b6b9b6e7e6ae47dc3 Author: Fabrizio Castro Date: Tue Oct 8 11:38:46 2019 +0100 dt-bindings: rcar-gen3-phy-usb3: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1570531132-21856-5-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 7236c197b4ed5de4771a92945888526b1316bd46 Author: Fabrizio Castro Date: Tue Oct 8 11:38:48 2019 +0100 dt-bindings: usb: renesas_usb3: Document r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1570531132-21856-7-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 49b8956b3d9b633dbbe0be443dc98f7d87db13c2 Author: Fabrizio Castro Date: Tue Oct 8 11:38:47 2019 +0100 dt-bindings: usb-xhci: Add r8a774b1 support Document RZ/G2N (R8A774B1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1570531132-21856-6-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 71464db9c2492478f2b396d3954e71b38d28e8c3 Author: Saurav Girepunje Date: Mon Oct 7 23:56:53 2019 +0530 usb: core: devio.c: Fix assignment of 0/1 to bool variables Use true/false for is_in bool type in function proc_do_submiturb. Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20191007182649.GA7068@saurav Signed-off-by: Greg Kroah-Hartman commit dd2057e544dc92addd581a450742b8179e44e949 Author: Johan Hovold Date: Tue Oct 8 11:02:40 2019 +0200 USB: core: drop OOM message Drop redundant OOM message on allocation failures which would already have been logged by the allocator. This also allows us to clean up the error paths somewhat. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20191008090240.30376-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5a9a8a4c505851cfb1fe5772851fb528476575bb Author: Biju Das Date: Mon Oct 7 16:38:49 2019 +0100 usb: typec: hd3ss3220: hd3ss3220_probe() warn: passing zero to 'PTR_ERR' This patch fixes the warning passing zero to 'PTR_ERR' by changing the check from 'IS_ERR_OR_NULL' to 'IS_ERR'. Also improved the error handling on probe function. Fixes: 1c48c759ef4b ("usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Biju Das Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/1570462729-25722-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit a4f55d8b8c146f9d99fe004bc9d1403d4c149ae3 Author: David Heinzelmann Date: Wed Oct 9 06:46:47 2019 +0200 usb: hub: Check device descriptor before resusciation If a device connected to an xHCI host controller disconnects from the USB bus and then reconnects, e.g. triggered by a firmware update, then the host controller automatically activates the connection and the port is enabled. The implementation of hub_port_connect_change() assumes that if the port is enabled then nothing has changed. There is no check if the USB descriptors have changed. As a result, the kernel's internal copy of the descriptors ends up being incorrect and the device doesn't work properly anymore. The solution to the problem is for hub_port_connect_change() always to check whether the device's descriptors have changed before resuscitating an enabled port. Signed-off-by: David Heinzelmann Acked-by: Alan Stern Link: https://lore.kernel.org/r/20191009044647.24536-1-heinzelmann.david@gmail.com Signed-off-by: Greg Kroah-Hartman commit db0386312f294abccc472b90ee2bf940da12dd0d Author: zhengbin Date: Wed Oct 9 16:40:34 2019 +0800 usb: gadget: Remove set but not used variable 'opts' in msg_do_config Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/gadget/legacy/mass_storage.c: In function msg_do_config: drivers/usb/gadget/legacy/mass_storage.c:108:19: warning: variable opts set but not used [-Wunused-but-set-variable] It is not used since commit f78bbcae86e6 ("usb: f_mass_storage: test whether thread is running before starting another") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570610434-68293-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 29234e3bb557fbddc14a815bec6da5c9ceab37cc Author: zhengbin Date: Wed Oct 9 16:40:33 2019 +0800 usb: gadget: Remove set but not used variable 'opts' in acm_ms_do_config Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/gadget/legacy/acm_ms.c: In function acm_ms_do_config: drivers/usb/gadget/legacy/acm_ms.c:108:19: warning: variable opts set but not used [-Wunused-but-set-variable] It is not used since commit f78bbcae86e6 ("usb: f_mass_storage: test whether thread is running before starting another") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570610434-68293-2-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit b1a71c9047639e0a05683b55d37ff1a5c9bbcd07 Author: Chunfeng Yun Date: Wed Oct 9 17:05:00 2019 +0800 usb: mtu3: fix race condition about delayed_status usb_composite_setup_continue() may be called before composite_setup() return USB_GADGET_DELAYED_STATUS, then the controller driver will delay status stage after composite_setup() finish, but the class driver don't ask the controller to continue delayed status anymore, this will cause control transfer timeout. happens when use mass storage (also enabled other class driver): cpu1: cpu2 handle_setup(SET_CONFIG) //gadget driver unlock (g->lock) gadget_driver->setup() composite_setup() lock(cdev->lock) set_config() fsg_set_alt() // maybe some times due to many class are enabled raise FSG_STATE_CONFIG_CHANGE return USB_GADGET_DELAYED_STATUS handle_exception() usb_composite_setup_continue() unlock(cdev->lock) lock(cdev->lock) ep0_queue() lock (g->lock) //no delayed status, nothing todo unlock (g->lock) unlock(cdev->lock) return USB_GADGET_DELAYED_STATUS // composite_setup lock (g->lock) get USB_GADGET_DELAYED_STATUS //handle_setup [1] Try to fix the race condition as following: After the driver gets USB_GADGET_DELAYED_STATUS at [1], if we find there is a usb_request in ep0 request list, it means composite already asked us to continue delayed status by usb_composite_setup_continue(), so we skip request about delayed_status by composite_setup() and still do status stage. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1570611900-7112-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 71460342d48b69038037aac62b34aaa65adcc184 Author: Chunfeng Yun Date: Wed Oct 9 17:04:59 2019 +0800 usb: mtu3: add a new function to do status stage Exact a new static function to do status stage Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1570611900-7112-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit da4b5d18dd949abdda7c8ea76c9483b5edd49616 Author: Mao Wenan Date: Wed Oct 9 09:47:07 2019 +0800 usb: typec: add dependency for TYPEC_HD3SS3220 If CONFIG_TYPEC_HD3SS3220=y, CONFIG_USB_ROLE_SWITCH=m, below errors can be found: drivers/usb/typec/hd3ss3220.o: In function `hd3ss3220_remove': hd3ss3220.c:(.text+0x64): undefined reference to `usb_role_switch_put' drivers/usb/typec/hd3ss3220.o: In function `hd3ss3220_dr_set': hd3ss3220.c:(.text+0x154): undefined reference to `usb_role_switch_set_role' drivers/usb/typec/hd3ss3220.o: In function `hd3ss3220_set_role': hd3ss3220.c:(.text+0x294): undefined reference to `usb_role_switch_set_role' hd3ss3220.c:(.text+0x2f4): undefined reference to `usb_role_switch_set_role' hd3ss3220.c:(.text+0x348): undefined reference to `usb_role_switch_set_role' hd3ss3220.c:(.text+0x390): undefined reference to `usb_role_switch_set_role' drivers/usb/typec/hd3ss3220.o: In function `hd3ss3220_probe': hd3ss3220.c:(.text+0x5e8): undefined reference to `fwnode_usb_role_switch_get' hd3ss3220.c:(.text+0x8a4): undefined reference to `usb_role_switch_put' make: *** [vmlinux] Error 1 This patch add dependency USB_ROLE_SWITCH for TYPEC_HD3SS3220. Fixes: 1c48c759ef4b ("usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller") Reported-by: Hulk Robot Signed-off-by: Mao Wenan Reviewed-by: Heikki Krogerus Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20191009014707.38716-1-maowenan@huawei.com Signed-off-by: Greg Kroah-Hartman commit d8b1ad7ce76513efaa463c25d261dab67f7f1f67 Author: Markus Elfring Date: Wed Sep 18 06:20:48 2019 -0300 media: platform: Use devm_platform_ioremap_resource() in two functions Simplify these function implementations by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Geert Uytterhoeven Tested-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5c9de1fa03e9bb67c8d82240fcb8f550036090b7 Author: Niklas Söderlund Date: Thu Sep 5 18:25:17 2019 -0300 media: rcar-vin: Use bytes per line instead of width for UV offset The image size is doubled for NV16 and is calculated as bytesperline * height * 2 to accommodate the split of UV data. When writing the offset to hardware, the width is used instead of bytesperline, fix this. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2a4558c6adc455bdee6fe85db43cbc83338c0230 Author: Steve Longerbeam Date: Sat Aug 24 13:33:37 2019 -0300 media: imx: Move pads init to probe If a subdevice is unregistered and then registered again without the driver being removed and re-probed (which will happen when the media device is removed and re-probed without also removing/re-probing the subdevice), media_device_register_entity() is called with a non-zero entity->num_pads, and then the subdevice's .registered callback calls media_entity_pads_init(). Thus the subdevice's pad objects are added to the media device pad list twice, causing list corruption. One way to fix this would be to create media_entity_pads_destroy(), and call it in the subdevice's .unregistered callback. But calling media_entity_pads_init() in the .registered callbacks was done for legacy reasons and is no longer necessary, so move the call to media_entity_pads_init() into the subdevice's probe functions. This fixes the duplicate pad obejcts in the media device pad list. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1f4642464655e16b70c4998a92cddc94555e2a5a Author: Steve Longerbeam Date: Sat Aug 24 13:33:36 2019 -0300 media: imx: Move capture device init to registered If the CSI is unregistered and then registered again without the driver being removed and re-probed (which will happen when the media device is removed and re-probed without also removing/re-probing the CSI), the result is the kobject error and backtrace "tried to init an initialized object". This is because the video device is left in an initialized state after being unregistered, thus the video device's underlying kobject is also left in an initialized state when the device is registered again. Fix this by moving imx_media_capture_device_init() and _remove() into csi_registered() and csi_unregistered(). This will create a new un-initialized video device when the CSI is re-registered. Do this for all the subdevices that register a capture device. Reported-by: Russell King Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dbb8d05a9d11651c47035653b5b813f2fa55ba80 Author: Niklas Söderlund Date: Tue Oct 8 20:22:01 2019 -0300 media: rcar-vin: Create compose rectangle where it is used The rectangle used to correct the compose settings when changing the format was created inside a helper function and not where it was used. This is confusing and makes the code harder to read, fix this. This cleanup is made possible due to refactoring elsewhere and there is no functional change. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aacbd4ff3a8b2fb10576497571a51ff85d24bbb0 Author: Niklas Söderlund Date: Tue Oct 8 20:22:00 2019 -0300 media: rcar-vin: Rename wrongly named rectangle After recent refactoring the rectangle named crop no longer reflects it usage, to contain the source rectangle. Fix this by renaming it. There is no functional change. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1edfa9b1687ed8aac39a0423345f8a76a1cff58c Author: Wei Yongjun Date: Tue Oct 8 06:01:33 2019 -0300 media: vimc: Fix error return code in vimc_register_devices() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f13d5f361959 ("media: vimc: Collapse component structure into a single monolithic driver") Signed-off-by: Wei Yongjun Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9e08117c9d4efc1e1bc6fce83dab856d9fd284b6 Author: Alan Stern Date: Mon Oct 7 12:09:53 2019 -0300 media: usbvision: Fix races among open, close, and disconnect Visual inspection of the usbvision driver shows that it suffers from three races between its open, close, and disconnect handlers. In particular, the driver is careful to update its usbvision->user and usbvision->remove_pending flags while holding the private mutex, but: usbvision_v4l2_close() and usbvision_radio_close() don't hold the mutex while they check the value of usbvision->remove_pending; usbvision_disconnect() doesn't hold the mutex while checking the value of usbvision->user; and also, usbvision_v4l2_open() and usbvision_radio_open() don't check whether the device has been unplugged before allowing the user to open the device files. Each of these can potentially lead to usbvision_release() being called twice and use-after-free errors. This patch fixes the races by reading the flags while the mutex is still held and checking for pending removes before allowing an open to succeed. Signed-off-by: Alan Stern CC: Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c7a191464078262bf799136317c95824e26a222b Author: Alan Stern Date: Mon Oct 7 12:09:04 2019 -0300 media: usbvision: Fix invalid accesses after device disconnect The syzbot fuzzer found two invalid-access bugs in the usbvision driver. These bugs occur when userspace keeps the device file open after the device has been disconnected and usbvision_disconnect() has set usbvision->dev to NULL: When the device file is closed, usbvision_radio_close() tries to issue a usb_set_interface() call, passing the NULL pointer as its first argument. If userspace performs a querycap ioctl call, vidioc_querycap() calls usb_make_path() with the same NULL pointer. This patch fixes the problems by making the appropriate tests beforehand. Note that vidioc_querycap() is protected by usbvision->v4l2_lock, acquired in a higher layer of the V4L2 subsystem. Reported-and-tested-by: syzbot+7fa38a608b1075dfd634@syzkaller.appspotmail.com Signed-off-by: Alan Stern CC: Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 59251a8be3c258c6ce59dcce703ce440a4e03b82 Author: Colin Ian King Date: Mon Oct 7 07:18:48 2019 -0300 media: gspca: make array st6422_bridge_init static, makes object smaller Don't populate the array st6422_bridge_init on the stack but instead make it static. Makes the object code smaller by 231 bytes. Before: text data bss dec hex filename 3419 752 64 4235 108b gspca/stv06xx/stv06xx_st6422.o After: text data bss dec hex filename 3124 816 64 4004 fa4 gspca/stv06xx/stv06xx_st6422.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 27dbc2e63b9aff694a22c69bba18375750cb6643 Author: Colin Ian King Date: Mon Oct 7 06:52:40 2019 -0300 media: cx18: make array mapping static, makes object smaller Don't populate the array mapping on the stack but instead make it static. Makes the object code smaller by 79 bytes. Before: text data bss dec hex filename 27572 2096 0 29668 73e4 drivers/media/pci/cx18/cx18-ioctl.o After: text data bss dec hex filename 27429 2160 0 29589 7395 drivers/media/pci/cx18/cx18-ioctl.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 69bb7eb88346ec19d024276205ddabc72d21dc83 Author: YueHaibing Date: Sun Oct 6 04:43:24 2019 -0300 media: cx231xx: remove duplicated include from cx231xx-417.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 80a501a46f0887ad2a17e1bdfdd753a4e75bbe7c Author: Jeeeun Evans Date: Thu Sep 26 12:55:39 2019 -0300 media: staging: media: imx: Use devm_platform_ioremap_resource(). This patch fixes a warning by coccicheck: drivers/staging/media/imx/imx7-mipi-csis.c:973:1-12: WARNING: Use devm_platform_ioremap_resource for state -> regs Use devm_platform_ioremap_resource helper which wraps platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Jeeeun Evans Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e1444e9b0424c70def6352580762d660af50e03f Author: Christophe JAILLET Date: Sun Sep 22 04:41:23 2019 -0300 media: cx88: Fix some error handling path in 'cx8800_initdev()' A call to 'pci_disable_device()' is missing in the error handling path. In some cases, a call to 'free_irq()' may also be missing. Reorder the error handling path, add some new labels and fix the 2 issues mentionned above. This way, the error handling path in more in line with 'cx8800_finidev()' (i.e. the remove function) Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 542a5c66e0ff6cf257600df1d7362735f8ebde35 Author: Chris Wilson Date: Wed Oct 2 17:00:34 2019 +0100 drm/i915/gt: Warn CI about an unrecoverable wedge If we have a wedged GPU that we need to recover, but fail, add a taint for CI to pickup and schedule a reboot. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Petri Latvala Reviewed-by: Janusz Krzysztofik Link: https://patchwork.freedesktop.org/patch/msgid/20191002160034.5121-1-chris@chris-wilson.co.uk commit 2eca8e4c1df4864b937752c3aa2f7925114f4806 Author: Christophe JAILLET Date: Fri Sep 13 16:06:47 2019 -0300 media: v4l: cadence: Fix how unsued lanes are handled in 'csi2rx_start()' The 2nd parameter of 'find_first_zero_bit()' is a number of bits, not of bytes. So use 'csi2rx->max_lanes' instead of 'sizeof(lanes_used)'. Fixes: 1fc3b37f34f6 ("media: v4l: cadence: Add Cadence MIPI-CSI2 RX driver") Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8dbdee8e8acc4f56febb8f5bf226f1ebfdd36219 Author: Navid Emamdoost Date: Wed Sep 11 17:26:00 2019 -0300 media: usb: null check create_singlethread_workqueue In sd_start return value of create_singlethread_workqueue needs null check. Signed-off-by: Navid Emamdoost Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 68085f314d6429ddfb09756623e2bfeec2966909 Author: Navid Emamdoost Date: Wed Sep 11 17:20:12 2019 -0300 media: gspca: null check create_singlethread_workqueue In sd_start the return value of create_singlethread_workqueue needs null check. Signed-off-by: Navid Emamdoost Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6f45ea2e7211850d2301a726d195a61fde0ccda Author: Daniel Gonzalez Cabanelas Date: Wed Sep 11 14:57:06 2019 -0300 media: cx88: Add support for NotOnlyTV LV3H card Add support for the PCI hybrid card NotOnlyTV LV3H. This card consists of: - A/V Controller: Conexant CX-23883 - Tuner: Xceive XC3028L - DVB-T Decoder: Zarlink ZL10353 This patch adds support for DVB-T, Analog TV, FM radio, composite and S-video inputs. The IR input isn't supported. Since the PCI subsystem ID (14f1:8852) is the same as the Geniatech X8000-MT, but they are different boards, the card is only supported via insmod option: options cx88xx card=91 For the record this is the eeprom dump, useful if someone wanted to implement the card auto detection: 07 ff ff ff f1 14 52 88 04 04 32 55 f8 00 a2 02 a1 00 40 63 06 11 44 30 03 df 40 80 00 20 00 73 3c 10 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff a0 00 Signed-off-by: Daniel Gonzalez Cabanelas Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1d96e53fe8b562f24365c7617d363e92e9a7b760 Author: Amol Grover Date: Wed Sep 11 13:56:55 2019 -0300 media: staging: media: imx: Fix alignment to match open parenthesis CHECK: Alignment should match open parenthesis Signed-off-by: Amol Grover Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 672c29b91670ab34de288bb7015e9a12c63d007e Author: Geert Uytterhoeven Date: Fri Aug 30 10:48:27 2019 -0300 media: i2c: Use div64_ul() for u64-by-unsigned-long divide div_u64() does a 64-by-32 division, while the divisor max2175.xtal_freq is unsigned long, thus 64-bit on 64-bit platforms. Hence the proper function to call is div64_ul(). Note that this change does not have any functional impact, as the crystal frequency must be much lower than the 32-bit limit anyway. On 32-bit platforms, the generated code is the same. But at least on arm64, this saves an AND-instruction to truncate xtal_freq to 32-bit. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 31218df77e7f1b9b0a136990a500a7f980e6a573 Author: Yizhuo Date: Thu Aug 29 21:43:59 2019 -0300 media: media/pci/ivtv: Variable vbi.type could be uninitialized if macro v4l2_subdev_call set __result an error code Inside function compress_sliced_buf(), variable vbi.type is uninitialized if macro v4l2_subdev_call set __result an error code. However, vbi.type is used in the if statement without any check, which is potentially unsafe. Signed-off-by: Yizhuo Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6bf05f759932b813afa289203c8dc63050a0da82 Author: Gon Solo Date: Thu Oct 10 06:51:03 2019 -0300 media: af9035: add support for Logilink VG0022A. This includes a hack for the device as it returns only 0xff after a new firmware is loaded. To quote Mauro: "When the [...] firmware that came with the device is replaced by a new one, any I2C data received from the tuner will be replaced by 0xff. Probably, the vendor firmware has some patch specifically designed for this device. So, we can't replace by the generic firmware. The right solution would be to extract the [...] firmware from the original driver and ask the driver to load the specifically designed firmware, but, while we don't have that, the next best solution is to just keep the original firmware at the device." Signed-off-by: Gon Solo Signed-off-by: Mauro Carvalho Chehab commit 57df53738a8134955beee6ab1b3b006669c0e82e Author: Gon Solo Date: Thu Oct 10 06:51:01 2019 -0300 media: si2157: Add option for not downloading firmware. While at it, convert to kernel-doc format and use bits instead of bools. Signed-off-by: Gon Solo Signed-off-by: Mauro Carvalho Chehab commit d7f9e85082f6ed47731fc5fb591eb65fed9547c6 Author: Mauro Carvalho Chehab Date: Fri Oct 4 10:08:28 2019 -0300 media: af9035: add the formula used for the I2C speed A very old patch sent to the media ML used to contain the I2C speed formula: https://lore.kernel.org/linux-media/1312539895.2763.33.camel@Jason-Linux/ When the ite9135 code was merged with af9035, the formula was lost. As we might need to slow down the speed for some devices, add the formula again. No functional changes. Signed-off-by: Mauro Carvalho Chehab commit 1c9b943cdcbd7646c71b51d830234c4b6529b0e7 Author: Mauro Carvalho Chehab Date: Fri Oct 4 09:15:36 2019 -0300 media: si2168: use bits instead of bool for flags Using bool on struct is not recommended, as it wastes lots of space. So, instead, let's use bits. While here, convert the comments to kernel-doc format. Signed-off-by: Mauro Carvalho Chehab commit 025910db8057f60d2d2aa11002f7751e3eb66588 Author: Brian Masney Date: Sun Sep 22 13:59:40 2019 -0400 drm/bridge: analogix-anx78xx: add support for 7808 addresses According to the downstream Android sources, the anx7808 variants use address 0x78 for TX_P0 and the anx781x variants use address 0x70. Since the datasheets aren't available for these devices, and we only have the downstream kernel sources to look at, let's assume that these addresses are fixed based on the model, and pass the i2c addresses to the driver via the data pointer in the driver's of_match_table. Signed-off-by: Brian Masney Reviewed-by: Laurent Pinchart Reviewed-by: Enric Balletbo i Serra Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190922175940.5311-1-masneyb@onstation.org commit 612ee81b9461475b5a5612c2e8d71559dd3c7920 Author: Vaibhav Jain Date: Fri Sep 27 11:50:02 2019 +0530 powerpc/papr_scm: Fix an off-by-one check in papr_scm_meta_{get, set} A validation check to prevent out of bounds read/write inside functions papr_scm_meta_{get,set}() is off-by-one that prevent reads and writes to the last byte of the label area. This bug manifests as a failure to probe a dimm when libnvdimm is unable to read the entire config-area as advertised by ND_CMD_GET_CONFIG_SIZE. This usually happens when there are large number of namespaces created in the region backed by the dimm and the label-index spans max possible config-area. An error of the form below usually reported in the kernel logs: [ 255.293912] nvdimm: probe of nmem0 failed with error -22 The patch fixes these validation checks there by letting libnvdimm access the entire config-area. Fixes: 53e80bd042773('powerpc/nvdimm: Add support for multibyte read/write for metadata') Signed-off-by: Vaibhav Jain Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190927062002.3169-1-vaibhav@linux.ibm.com commit 9d41318c4e43da6b4c95a21cf366bf18179291fd Author: Daniele Ceraolo Spurio Date: Wed Oct 9 16:04:24 2019 -0700 drm/i915/tgl: simplify the lrc register list for !RCS There are small differences between the blitter and the video engines in the xcs context image (e.g. registers 0x200 and 0x204 only exist on the blitter). Since we never explicitly set a value for those register and given that we don't need to update the offsets in the lrc image when we change engine within the class for virtual engine because the HW can handle that, instead of having a separate define for the BCS we can just restrict the programming to the part we're interested in, which is common across the engines. Bspec: 45584 Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Mika Kuoppala Cc: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191009230424.6507-2-daniele.ceraolospurio@intel.com commit fef4ac873369fcfe98f255ad905cfd055e755f22 Author: Todd Brandt Date: Thu Sep 19 12:09:12 2019 -0700 pm-graph info added to MAINTAINERS Signed-off-by: Todd Brandt Reviewed-by: Len Brown Signed-off-by: Rafael J. Wysocki commit ba2c74da52eba388d959a1000a9dd08fa4857659 Author: Daniele Ceraolo Spurio Date: Wed Oct 9 16:04:23 2019 -0700 drm/i915/tgl: the BCS engine supports relative MMIO The specs don't mention any specific HW limitation on the blitter and manual inspection shows that the HW does set the relative MMIO bit in the LRI of the blitter context image, so we can remove our limitations. Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: John Harrison Cc: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191009230424.6507-1-daniele.ceraolospurio@intel.com commit 161ca4c0feeb983245e40355d9eb1101529326a8 Author: Nachammai Karuppiah Date: Tue Oct 8 19:44:15 2019 -0700 staging: vc04_services: Avoid NULL comparison Remove NULL comparison. Issue found using checkpatch.pl Signed-off-by: Nachammai Karuppiah Link: https://lore.kernel.org/r/1570589056-14386-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman commit 039f8b21d153aea4b413636d66619d53b725fc86 Author: YueHaibing Date: Wed Oct 9 23:05:35 2019 +0800 staging: emxx_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191009150535.6412-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit f595f03bfdfc3ce4526a653174024250d7287a8d Author: YueHaibing Date: Wed Oct 9 23:04:27 2019 +0800 staging: clocking-wizard: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191009150427.10852-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit fbf12784d3434ebd35a9712e649b52fd14d2fbb2 Author: Wambui Karuga Date: Thu Oct 10 07:38:15 2019 +0300 staging: octeon: Fix incorrect type in assignment Fix the following warning generated by sparse in drivers/staging/octeon/ethernet-tx.c: drivers/staging/octeon/ethernet-tx.c:563:50: warning: incorrect type in assignment (different base types) drivers/staging/octeon/ethernet-tx.c:563:50: expected unsigned short [usertype] hw_chksum drivers/staging/octeon/ethernet-tx.c:563:50: got restricted __wsum [usertype] csum Warning generated by running: make C=2 CF="-D__CHECK_ENDIAN__" drivers/staging/octeon/ Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/20191010043815.14027-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit 06f9c65a8dd46f375de62868e89eb645a76eb0fc Author: Wambui Karuga Date: Tue Oct 8 22:53:50 2019 +0300 staging: rtl8712: Align function arguments with opening paranthesis Fixes checkpatch.pl "CHECK Alignment should match open parenthesis" on drivers/staging/rtl8712/rtl8712_recv.c:122 Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/20191008195350.20544-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit ac478ce77304e81c706588eebcb2a54bc459b863 Author: Javier F. Arias Date: Wed Oct 9 21:16:49 2019 -0500 staging: rtl8723bs: Fix style in definitions Fix the style in definitions where commented code was previously removed for an improved code readability. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/fc488562c0ddf3fa8a59e86be9b33506496ccd0c.1570672544.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 042e9a6857b8b767f8507eaee537a987acc5eabf Author: Javier F. Arias Date: Wed Oct 9 21:16:29 2019 -0500 staging: rtl8723bs: Remove space before tabs Remove space before tabs to fix checkpatch warning. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/120800f884986092ca757235781d9ddc740ec832.1570672544.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5bb48864d34c287e4285d7fcf1f352557f53656f Author: Javier F. Arias Date: Wed Oct 9 21:16:07 2019 -0500 staging: rtl8723bs: Remove duplicate blank lines Remove duplicate blank lines. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/cdc1899acadc436c2f0247ded9ec2a8b3423350e.1570672544.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 26752254faebb268bc26ab43e29c118144149f11 Author: Javier F. Arias Date: Wed Oct 9 21:14:47 2019 -0500 staging: rtl8723bs: Remove commented code Remove commented code for a cleaner file. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/132126f0d04d5ca1129e9d682dfe9a535ec7bb39.1570672544.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c9ca79b3a5b0e20eccc5fdcf1c08e56ebbe3d526 Author: Javier F. Arias Date: Wed Oct 9 18:19:56 2019 -0500 staging: rtl8723bs: Fix incorrect type in declaration Fix incorrect type in declaration to solve the warnings 'incorrect type in argument 2' in the rtw_get_wpa_ie and rtw_get_wpa_ie function calls, as both expect the same variable in argument 2 with the type int *. Issue found by Sparse. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/20191009231953.GA8774@gmail.com Signed-off-by: Greg Kroah-Hartman commit c44b23f51f4c31688a035933ef4e0a193bee52ad Author: Javier F. Arias Date: Tue Oct 8 19:25:45 2019 -0500 staging: rtl8723bs: Add space between elements Concatenated strings should use spaces between elements. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/a2387d4c10c2ed0cbca9d5c7ded424892452178f.1570577926.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit af2f2c5e20bff6137684d7100d84da2aaea37aed Author: Javier F. Arias Date: Tue Oct 8 19:25:05 2019 -0500 staging: rtl8723bs: Fix function call wrapping style Fix the wrapping style used for the function call. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/f43f9295d7412d610e278be608fba6f2cc14cac9.1570577926.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit a9ce2354f7cbecf114a6bc6cd0734e7a9cc04e13 Author: Javier F. Arias Date: Tue Oct 8 19:24:36 2019 -0500 staging: rtl8723bs: Fix line over 80 characters Break last two function call arguments into two separate lines. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/9a8f7b026780b3a7387c29f1d67a7c23d4b159eb.1570577926.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 38c077d7070c5a9808f55227bafde0999a91fe02 Author: Hans de Goede Date: Wed Oct 9 14:32:23 2019 +0200 staging: rtl8723bs: Remove File operation APIs rtl8723bs had 2 private file operation helpers: rtw_is_file_readable() rtw_retrive_from_file() These were only used by the removed phy_Config*WithParaFile() functions, so they can be removed now. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20191009123223.163241-5-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 44bcfb27d29ecc71e24f98bf8fecb41e9556b270 Author: Hans de Goede Date: Wed Oct 9 14:32:22 2019 +0200 staging: rtl8723bs: Remove rtw_merge_string() function The phy_Config*WithParaFile() functions were the only user of this function. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20191009123223.163241-4-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 9d411eee434258a769db4dda4ac2a952b2868aaa Author: Hans de Goede Date: Wed Oct 9 14:32:21 2019 +0200 staging: rtl8723bs: Remove phy_Config*WithParaFile() configuration leftovers Now that the phy_Config*WithParaFile() functions have been removed nothing is using these module-parameters and defines anymore. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20191009123223.163241-3-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit efe0b0a07238b958bf8339018b583064d1bac8b5 Author: Hans de Goede Date: Wed Oct 9 14:32:20 2019 +0200 staging: rtl8723bs: Remove phy_Config*WithParaFile() functions These are no longer used, so remove them and also remove various struct definitions only used by these functions. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20191009123223.163241-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 8c0c8b661bc7f498a6521d13760d66a45d87d4b7 Author: Hans de Goede Date: Wed Oct 9 14:32:19 2019 +0200 staging: rtl8723bs: Remove phy_Config*With*ParaFile() calls The rtl8723bs driver tries to load various parameters from disk, circumventing the standard firmware loader mechanism and using DIY code for this. No devices which run the mainline kernel ship with these files and even if these files were present then they still would not be loaded without additional module parameters. To be precise the following 3 conditions must all 3 be true for on disk parameters to be used: 1) The rtw_load_phy_file modparam must contain the mask for the type, this defaults to(LOAD_BB_PG_PARA_FILE | LOAD_RF_TXPWR_LMT_PARA_FILE) so with the default settings this condition is only true for: phy_ConfigBBWithPgParaFile() PHY_ConfigRFWithPowerLimitTableParaFile(); and 2) rtw_phy_file_path modparam must be set to say "/lib/firmware/"; and 3) Store a /lib/firmware/rtl8723b/XXX file in the expected format. In practice all 3 being true never happens, so the phy_Config*With*ParaFile() calls are nops, remove them. The actual code implementing them will be removed in a separate patch. Note the ODM_ConfigRFWithHeaderFile() and ODM_ConfigBBWithHeaderFile() functions always return HAL_STATUS_SUCCESS, this patch makes use of this to simplify the new code without the phy_Config*With*ParaFile() calls. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20191009123223.163241-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 348c59749ffe1aa1dd9ecd1349a74fc3fae9283d Author: zhengbin Date: Wed Oct 9 07:55:05 2019 +0800 staging: rtl8723bs: Remove set but not used variable 'i' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/core/rtw_xmit.c: In function update_attrib: drivers/staging/rtl8723bs/core/rtw_xmit.c:680:7: warning: variable i set but not used [-Wunused-but-set-variable] It is not used since commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570578905-95675-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit a883d97fc538b6b92ecf5c45338997b97f6d5fb7 Author: Javier F. Arias Date: Tue Oct 8 16:16:00 2019 -0500 staging: rtl8723bs: Remove space before tab Fix warning by removing space before tab. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/20191008211557.iv3hdpbklgaddlt3@gmail.com Signed-off-by: Greg Kroah-Hartman commit cf490d84dbef9599b67ad4250c4c65db73453947 Author: Javier F. Arias Date: Tue Oct 8 16:48:53 2019 -0500 staging: rtl8723bs: Replace string with identifier Replace the hardcoded function name with its predefined identifier. Signed-off-by: Javier F. Arias Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20191008214851.p4w7cbpuldnwkne4@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2dac96b334aad29ab5a29a9150b3f5c04e2e0d63 Author: Nachammai Karuppiah Date: Tue Oct 8 13:17:38 2019 -0700 staging: rtl8723bs: core: Remove typecast in call to kfree Remove typecast in the call to kfree as it is not needed. Issue found using the below coccinelle script with options -I and --recursive-includes, @@ type t1; expression *e; @@ -kfree((t1 *)e); +kfree(e); Signed-off-by: Nachammai Karuppiah Acked-by: Julia Lawall Link: https://lore.kernel.org/r/1570565858-91737-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman commit 89d0180a60fcc5368eb2d92faeb1e012f8a591b3 Author: Heiko Carstens Date: Sun Oct 6 17:02:07 2019 +0200 s390/Kconfig: add z13s and z14 ZR1 to TUNE descriptions The names for the z13s and z14 ZR1 machines are missing for the TUNE_Z13 and TUNE_Z14 descriptions. Just add them. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 5474080a3a0a477fd99f587b9e9ef814bcdfc083 Author: Heiko Carstens Date: Sun Oct 6 16:55:53 2019 +0200 s390/Kconfig: make use of 'depends on cc-option' Make use of 'depends on cc-option' to only display those Kconfig options for which compiler support is available. Add this for the MARCH and TUNE options which are the only options which may result in compile errors if the selected architecture is not supported by the compiler. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 8fd1fe824f20692a09279fabe952cf65bedffeee Author: zhengbin Date: Wed Oct 9 21:50:30 2019 +0800 staging: wfx: Make some functions static in sta.c Fix sparse warnings: drivers/staging/wfx/sta.c:269:6: warning: symbol 'wfx_update_filtering_work' was not declared. Should it be static? drivers/staging/wfx/sta.c:475:6: warning: symbol 'wfx_event_handler_work' was not declared. Should it be static? drivers/staging/wfx/sta.c:521:6: warning: symbol 'wfx_bss_loss_work' was not declared. Should it be static? drivers/staging/wfx/sta.c:528:6: warning: symbol 'wfx_bss_params_work' was not declared. Should it be static? drivers/staging/wfx/sta.c:539:6: warning: symbol 'wfx_set_beacon_wakeup_period_work' was not declared. Should it be static? drivers/staging/wfx/sta.c:732:6: warning: symbol 'wfx_unjoin_work' was not declared. Should it be static? drivers/staging/wfx/sta.c:794:6: warning: symbol 'wfx_set_cts_work' was not declared. Should it be static? drivers/staging/wfx/sta.c:1234:6: warning: symbol 'wfx_set_tim_work' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Jérôme Pouiller Link: https://lore.kernel.org/r/1570629030-29888-4-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit dc3d13fba4695f53d55d4eebe0d714c8b1da62bd Author: zhengbin Date: Wed Oct 9 21:50:29 2019 +0800 staging: wfx: Make function 'wfx_tx_queue_get' static Fix sparse warnings: drivers/staging/wfx/queue.c:218:16: warning: symbol 'wfx_tx_queue_get' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Jérôme Pouiller Link: https://lore.kernel.org/r/1570629030-29888-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7638621da743388629b3754a867a27184722c83c Author: zhengbin Date: Wed Oct 9 21:50:28 2019 +0800 staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static Fix sparse warnings: drivers/staging/wfx/fwio.c:83:5: warning: symbol 'sram_write_dma_safe' was not declared. Should it be static? drivers/staging/wfx/fwio.c:229:5: warning: symbol 'load_firmware_secure' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Jérôme Pouiller Link: https://lore.kernel.org/r/1570629030-29888-2-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 0bb0dff0cc16ac58e3f0123bda3035547da30d55 Author: Colin Ian King Date: Wed Oct 9 10:46:02 2019 +0100 staging: wfx: fix swapped arguments in memset call The memset appears to have the 2nd and 3rd arguments in the wrong order, fix this by swapping these around into the correct order. Addresses-Coverity: ("Memset fill truncated") Fixes: 4f8b7fabb15d ("staging: wfx: allow to send commands to chip") Signed-off-by: Colin Ian King Reviewed-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191009094602.19663-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit c0981afd8cd6e7176b4b9fe2186087695463ebde Author: Wambui Karuga Date: Wed Oct 9 20:07:03 2019 +0300 staging: kpc2000: Remove unnecessary return variable Remove unnecessary variable `val` in kp_spi_read_reg() that only holds the return value from readq(). Issue found by coccinelle using the script: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Wambui Karuga Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20191009170703.GA2869@wambui Signed-off-by: Greg Kroah-Hartman commit 710abfe8ead2477a3769c0c297c1df2833725bb6 Author: Ronald Tschalär Date: Fri Apr 19 01:19:25 2019 -0700 drm/bridge: sil_sii8620: make remote control optional. commit d6abe6df706c ("drm/bridge: sil_sii8620: do not have a dependency of RC_CORE") changed the driver to select both RC_CORE and INPUT. However, this causes problems with other drivers, in particular an input driver that depends on MFD_INTEL_LPSS_PCI (to be added in a separate commit): drivers/clk/Kconfig:9:error: recursive dependency detected! drivers/clk/Kconfig:9: symbol COMMON_CLK is selected by MFD_INTEL_LPSS drivers/mfd/Kconfig:566: symbol MFD_INTEL_LPSS is selected by MFD_INTEL_LPSS_PCI drivers/mfd/Kconfig:580: symbol MFD_INTEL_LPSS_PCI is implied by KEYBOARD_APPLESPI drivers/input/keyboard/Kconfig:73: symbol KEYBOARD_APPLESPI depends on INPUT drivers/input/Kconfig:8: symbol INPUT is selected by DRM_SIL_SII8620 drivers/gpu/drm/bridge/Kconfig:83: symbol DRM_SIL_SII8620 depends on DRM_BRIDGE drivers/gpu/drm/bridge/Kconfig:1: symbol DRM_BRIDGE is selected by DRM_PL111 drivers/gpu/drm/pl111/Kconfig:1: symbol DRM_PL111 depends on COMMON_CLK According to the docs and general consensus, select should only be used for non user-visible symbols, but both RC_CORE and INPUT are user-visible. Furthermore almost all other references to INPUT throughout the kernel config are depends, not selects. For this reason the first part of this change reverts the commit. In order to address the original reason for the commit, namely that not all boards use the remote controller functionality and hence should not need have to deal with RC_CORE, the second part of this change now makes the remote control support in the driver optional and contingent on RC_CORE being defined. And with this the hard dependency on INPUT also goes away as that is only needed if RC_CORE is defined (which in turn already depends on INPUT). CC: Inki Dae CC: Andrzej Hajda CC: Laurent Pinchart CC: Dmitry Torokhov Signed-off-by: Ronald Tschalär Reviewed-by: Andrzej Hajda [a.hajda: applied fixup provided by Arnd Bergmann] Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190419081926.13567-2-ronald@innovation.ch commit 6b564ad7f883e18e1cb2433d034041251f9c41d3 Author: Wolfram Sang Date: Tue Oct 8 22:33:22 2019 +0200 gpu: drm: bridge: sii9234: convert to devm_i2c_new_dummy_device Move from the deprecated i2c_new_dummy() to devm_i2c_new_dummy_device(). We now get an ERRPTR which we use in error handling and we can skip removal of the created devices. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20191008203322.3238-1-wsa+renesas@sang-engineering.com commit e0b68fb186b251374adbd870f99b1ecea236e770 Author: Andrii Nakryiko Date: Wed Oct 9 21:25:34 2019 -0700 scripts/bpf: Fix xdp_md forward declaration typo Fix typo in struct xpd_md, generated from bpf_helpers_doc.py, which is causing compilation warnings for programs using bpf_helpers.h Fixes: 7a387bed47f7 ("scripts/bpf: teach bpf_helpers_doc.py to dump BPF helper definitions") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191010042534.290562-1-andriin@fb.com commit c17e26ddc79596230834345be80fcad6c619e9ec Author: Hangbin Liu Date: Wed Oct 9 20:18:28 2019 +0800 team: call RCU read lock when walking the port_list Before reading the team port list, we need to acquire the RCU read lock. Also change list_for_each_entry() to list_for_each_entry_rcu(). v2: repost the patch to net-next and remove fixes flag as this is a cosmetic change. Suggested-by: Paolo Abeni Signed-off-by: Hangbin Liu Acked-by: Paolo Abeni Acked-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 5e96cd3302bd62b8cbfc1a7f8f8f1396d6f5e0b0 Author: Tiezhu Yang Date: Wed Oct 9 22:29:00 2019 +0800 net: stmmac: Remove break after a return Since break is not useful after a return, remove it. Signed-off-by: Tiezhu Yang Signed-off-by: Jakub Kicinski commit 7573822883bdbec33a9f79dd90edbf0c3fa22c1a Author: Ben Dooks Date: Wed Oct 9 14:26:27 2019 +0100 net/ethernet: xgmac don't set .driver twice Cleanup the .driver setup to just do it once, to avoid the following sparse warning: drivers/net/ethernet/calxeda/xgmac.c:1914:10: warning: Initializer entry defined twice drivers/net/ethernet/calxeda/xgmac.c:1920:10: also defined here Signed-off-by: Ben Dooks Signed-off-by: Jakub Kicinski commit b1b8d080f72808f88bdb3dd3c9b69b115b052f5b Author: Michael Srba Date: Mon Oct 7 08:45:28 2019 +0200 arm64: dts: msm8916-samsung-a2015: add tactile buttons and hall sensor Add nodes for basic GPIO connected hardware to the Samsung A3/A5 common dtsi. This includes the Volume UP button, the Home button, and the hall sensor used to sense "smart cover" open state. Related to that, add a node for the Volume DOWN button, which is handled by the pm8916 as is common with msm8916 devices. Tested-by: Stephan Gerhold # a5u Reviewed-by: Stephan Gerhold Signed-off-by: Michael Srba Signed-off-by: Bjorn Andersson commit acbf73bfa02881ba9e0532ba1a5f5beec573af9f Author: Stephen Boyd Date: Tue Oct 8 16:45:05 2019 -0700 soc: qcom: llcc: Move regmap config to local variable This is now a global variable that we're modifying to fix the name. That isn't terribly thread safe and it's not necessary to be a global so let's just move this to a local variable instead. This saves space in the symtab and actually reduces kernel image size because the regmap config is large and we can replace the initialization of that structure with a memset and a few member assignments. Cc: Venkata Narendra Kumar Gutta Reviewed-by: Evan Green Signed-off-by: Stephen Boyd Signed-off-by: Bjorn Andersson commit 8cfb8e40d686a756428c627dccfaff28ca70dd8b Author: zhengbin Date: Wed Oct 9 15:23:44 2019 +0800 scsi: megaraid_sas: remove unused variables 'debugBlk','fusion' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/megaraid/megaraid_sas_fp.c: In function MR_GetSpanBlock: drivers/scsi/megaraid/megaraid_sas_fp.c:400:16: warning: variable debugBlk set but not used [-Wunused-but-set-variable] drivers/scsi/megaraid/megaraid_sas_fp.c: In function mr_spanset_get_phy_params: drivers/scsi/megaraid/megaraid_sas_fp.c:713:25: warning: variable fusion set but not used [-Wunused-but-set-variable] drivers/scsi/megaraid/megaraid_sas_fp.c: In function MR_GetPhyParams: drivers/scsi/megaraid/megaraid_sas_fp.c:815:25: warning: variable fusion set but not used [-Wunused-but-set-variable] 'debugBlk' is introduced by commit 9c915a8c99bc ("[SCSI] megaraid_sas: Add 9565/9285 specific code"), but never used, so remove it 'fusion' is not used since commit c365178f3147 ("scsi: megaraid_sas: use adapter_type for all gen controllers") Link: https://lore.kernel.org/r/1570605824-89133-1-git-send-email-zhengbin13@huawei.com Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Martin K. Petersen commit ff7ca7fd03ce7dc225b3fc653d6877d2485c5716 Author: Chandrakanth Patil Date: Mon Oct 7 10:48:28 2019 +0530 scsi: megaraid_sas: Unique names for MSI-X vectors Currently, MSI-X vectors name appears in /proc/interrupts is "megasas" which is same for all the vectors. This patch provides a unique name for all megaraid_sas controllers and their associated MSI-X interrupts. Link: https://lore.kernel.org/r/20191007051828.12294-1-chandrakanth.patil@broadcom.com Suggested-by: Konstantin Shalygin Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen commit 390e28087823e38331990636ff5159ce622a0380 Author: Don Brace Date: Mon Oct 7 17:32:15 2019 -0500 scsi: smartpqi: bump version Link: https://lore.kernel.org/r/157048753592.11757.3634142461093493860.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Gerry Morong Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 694c5d5b4625fe4617990beb02eedb176e8309c9 Author: Kevin Barnett Date: Mon Oct 7 17:32:10 2019 -0500 scsi: smartpqi: Align driver syntax with oob Formatting changes, no functional changes. Link: https://lore.kernel.org/r/157048753005.11757.2228541207280057256.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 0fa31a88bfd23e97a261956ae3c822f5be4e31a9 Author: Kevin Barnett Date: Mon Oct 7 17:32:04 2019 -0500 scsi: smartpqi: remove unused manifest constants Removed some unused manifest constants. Link: https://lore.kernel.org/r/157048752420.11757.3464951542864727227.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 5b083b305b49f65269b888885455b8c0cf1a52e4 Author: Kevin Barnett Date: Mon Oct 7 17:31:58 2019 -0500 scsi: smartpqi: fix problem with unique ID for physical device Obtain the unique IDs from the RLL and RPL instead of VPD page 83h. Link: https://lore.kernel.org/r/157048751833.11757.11996314786914610803.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit e655d469c32d54b7a439677f3f5d4b4cd0af985a Author: Kevin Barnett Date: Mon Oct 7 17:31:52 2019 -0500 scsi: smartpqi: correct syntax issue Link: https://lore.kernel.org/r/157048751247.11757.1727592925624138646.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit bb9af08cfc41e3e5d6f5e7e350eb2063e023e782 Author: Kevin Barnett Date: Mon Oct 7 17:31:46 2019 -0500 scsi: smartpqi: change TMF timeout from 60 to 30 seconds Link: https://lore.kernel.org/r/157048750649.11757.7811056360633694725.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit c2922f174fa0fbb699c3bd0ad40c73d067a90197 Author: Murthy Bhat Date: Mon Oct 7 17:31:40 2019 -0500 scsi: smartpqi: fix LUN reset when fw bkgnd thread is hung Add support for a timeout on LUN resets. Link: https://lore.kernel.org/r/157048750055.11757.9689400788261610618.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Murthy Bhat Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 21432010d5282a9aa4d0946816468849bd2fe1b5 Author: koshyaji Date: Mon Oct 7 17:31:34 2019 -0500 scsi: smartpqi: add inquiry timeouts Add timeout field in RAID IU. Link: https://lore.kernel.org/r/157048749461.11757.10013040278241807855.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: koshyaji Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit b969261134c1b990b96ea98fe5e0fcf8ec937c04 Author: Murthy Bhat Date: Mon Oct 7 17:31:28 2019 -0500 scsi: smartpqi: fix call trace in device discovery Use sas_phy_delete rather than sas_phy_free which, according to comments, should not be called for PHYs that have been set up successfully. Link: https://lore.kernel.org/r/157048748876.11757.17773443136670011786.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Murthy Bhat Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 0530736e40a0695b1ee2762e2684d00549699da4 Author: Kevin Barnett Date: Mon Oct 7 17:31:23 2019 -0500 scsi: smartpqi: fix controller lockup observed during force reboot Link: https://lore.kernel.org/r/157048748297.11757.3872221216800537383.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 654490a3e4bc2e936b206d47ddb7bb4caf8f7719 Merge: 0ea1671f2620 d18963cf0365 Author: Jakub Kicinski Date: Wed Oct 9 19:51:59 2019 -0700 Merge branch 'net-smc-improve-termination-handling' Karsten Graul says: ==================== net/smc: improve termination handling First set of patches to improve termination handling. ==================== Signed-off-by: Jakub Kicinski commit d18963cf036566690c8bfd8b1d97d69f9a7d130f Author: Ursula Braun Date: Wed Oct 9 10:07:47 2019 +0200 net/smc: improve close of terminated socket Make sure a terminated SMC socket reaches the CLOSED state. Even if sending of close flags fails, change the socket state to the intended state to avoid dangling sockets not reaching the CLOSED state. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit c3d9494e68c4a5d23227ede822fda9bd68bef8e3 Author: Ursula Braun Date: Wed Oct 9 10:07:46 2019 +0200 net/smc: no new connections on disappearing devices Add a "going_away" indication to ISM devices and IB ports and avoid creation of new connections on such disappearing devices. And do not handle ISM events if ISM device is disappearing. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit b3cb53c05f20c5b4026a36a7bbd3010d1f3e0a55 Author: Ursula Braun Date: Wed Oct 9 10:07:45 2019 +0200 net/smc: increase device refcount for added link group SMCD link groups belong to certain ISM-devices and SMCR link group links belong to certain IB-devices. Increase the refcount for these devices, as long as corresponding link groups exist. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit a0a62ee15a829ebf8aeec55a4f1688230439b3e0 Author: Ursula Braun Date: Wed Oct 9 10:07:44 2019 +0200 net/smc: separate locks for SMCD and SMCR link group lists This patch introduces separate locks for the split SMCD and SMCR link group lists. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit a2351c5d86d7acf8eef17fba4ac1fc5b305a37c0 Author: Ursula Braun Date: Wed Oct 9 10:07:43 2019 +0200 net/smc: separate SMCD and SMCR link group lists Currently SMCD and SMCR link groups are maintained in one list. To facilitate abnormal termination handling they are split into a separate list for SMCR link groups and separate lists for SMCD link groups per SMCD device. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 0ea1671f26204ee8ef138651707dace886fb9df4 Author: Biao Huang Date: Wed Oct 9 15:33:48 2019 +0800 net: stmmac: dwmac-mediatek: fix wrong delay value issue when resume back mac_delay value will be divided by 550/170 in mt2712_delay_ps2stage(), which is invoked at the beginning of mt2712_set_delay(), and the value should be restored at the end of mt2712_set_delay(). Or, mac_delay will be divided again when invoking mt2712_set_delay() when resume back. So, add mt2712_delay_stage2ps() to mt2712_set_delay() to recovery the original mac_delay value. Signed-off-by: Biao Huang Signed-off-by: Jakub Kicinski commit 3524a38e594dd5f090cbc3226e5f47cb4067fac7 Author: Dan Carpenter Date: Fri Oct 4 13:06:15 2019 +0300 scsi: mpt3sas: Clean up some indenting This line is indented too far so it's a bit confusing. Link: https://lore.kernel.org/r/20191004100615.GA823@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 690a6ca7df3de7b90546bc10a620d1ac8ccaa1a1 Author: Randy Dunlap Date: Tue Oct 8 21:03:14 2019 -0700 DIM: fix dim.h kernel-doc and headers Lots of fixes to kernel-doc in structs, enums, and functions. Also add header files that are being used but not yet #included. Signed-off-by: Randy Dunlap Cc: Yamin Friedman Cc: Tal Gilboa Cc: Saeed Mahameed Cc: Doug Ledford Cc: Jason Gunthorpe Cc: linux-rdma@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit f7cb0d0945ebc9879aff72cf7b3342fd1040ffaa Author: zhengbin Date: Fri Oct 4 18:04:37 2019 +0800 scsi: lpfc: Make function lpfc_defer_pt2pt_acc static Fix sparse warnings: drivers/scsi/lpfc/lpfc_nportdisc.c:290:1: warning: symbol 'lpfc_defer_pt2pt_acc' was not declared. Should it be static? Link: https://lore.kernel.org/r/1570183477-137273-1-git-send-email-zhengbin13@huawei.com Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Dick Kennedy Reviewed-by: James Smart Signed-off-by: Martin K. Petersen commit c51c4841f1571673d9075b8cf5efa6995ea91d0e Author: Masahiro Yamada Date: Mon Jul 29 01:46:43 2019 +0900 scsi: ch: add include guard to chio.h Add a header include guard just in case. Link: https://lore.kernel.org/r/20190728164643.16335-1-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Martin K. Petersen commit 8ae15a460b1471622f85bad6caebe56fd91f4f83 Author: Himanshu Madhani Date: Thu Sep 12 11:09:18 2019 -0700 scsi: qla2xxx: Update driver version to 10.01.00.20-k Link: https://lore.kernel.org/r/20190912180918.6436-15-hmadhani@marvell.com Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 45c96e442f52c4890f7fceeda9496a5900909aa5 Author: Himanshu Madhani Date: Thu Sep 12 11:09:17 2019 -0700 scsi: qla2xxx: Improve logging for scan thread Move messages to verbose logging for scan thread. Link: https://lore.kernel.org/r/20190912180918.6436-14-hmadhani@marvell.com Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit d52cd7747d905f5b2a6ec07d5f6abe8720969dc5 Author: Quinn Tran Date: Thu Sep 12 11:09:16 2019 -0700 scsi: qla2xxx: Capture FW dump on MPI heartbeat stop event For MPI heartbeat stop Async Event, this patch would capture MPI FW dump and chip reset. FW will tell which function to capture FW dump for. Link: https://lore.kernel.org/r/20190912180918.6436-13-hmadhani@marvell.com Reviewed-by: Laurence Oberman Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit c55474197a2e29fd0858fb9678db1628f4a39861 Author: Quinn Tran Date: Thu Sep 12 11:09:15 2019 -0700 scsi: qla2xxx: Check for MB timeout while capturing ISP27/28xx FW dump Add mailbox timeout checkout for ISP 27xx/28xx during FW dump procedure. Without the timeout check, hardware lock can be held for long period. This patch would shorten the dump procedure if a timeout condition is encountered. Link: https://lore.kernel.org/r/20190912180918.6436-12-hmadhani@marvell.com Reviewed-by: Laurence Oberman Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 6997db98d00a659d05cda23bd33c34aff546635b Author: Quinn Tran Date: Thu Sep 12 11:09:14 2019 -0700 scsi: qla2xxx: Set remove flag for all VP During driver unload, the remove flag will be set for all scsi_qla_host/NPIV. This allows each NPIV to see the flag instead of reaching for base_vha to search for it. Link: https://lore.kernel.org/r/20190912180918.6436-11-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit c76ae845ea836d6128982dcbd41ac35c81e2de63 Author: Quinn Tran Date: Thu Sep 12 11:09:13 2019 -0700 scsi: qla2xxx: Add error handling for PLOGI ELS passthrough Add error handling logic to ELS Passthrough relating to NVME devices. Current code does not parse error code to take proper recovery action, instead it re-logins with the same login parameters that encountered the error. Ex: nport handle collision. Link: https://lore.kernel.org/r/20190912180918.6436-10-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 84ed362ac40ca44dbbbebf767301463aa72bc797 Author: Michael Hernandez Date: Thu Sep 12 11:09:12 2019 -0700 scsi: qla2xxx: Dual FCP-NVMe target port support Some storage arrays advertise FCP LUNs and NVMe namespaces behind the same WWN. The driver now offers a user option by way of NVRAM parameter to allow users to choose, on a per port basis, the kind of FC-4 type they would like to prioritize for login. Link: https://lore.kernel.org/r/20190912180918.6436-9-hmadhani@marvell.com Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit a3a8d13f625d9f20664515d61d4c9a9452119d21 Merge: 27f722ccbe15 b23f330d5145 Author: Martin K. Petersen Date: Wed Oct 9 21:54:04 2019 -0400 Merge branch '5.4/scsi-fixes' into 5.5/scsi-queue The qla2xxx driver updates for 5.5 depend on the fixes queued for 5.4. Signed-off-by: Martin K. Petersen commit b2d8c273edfd214a5a022119841861095055a13e Merge: 757926247836 b6e6b5f1da7e Author: Jakub Kicinski Date: Wed Oct 9 17:10:44 2019 -0700 Merge branch 'sctp-add-some-missing-events-from-rfc5061' Xin Long says: ==================== There are 4 events defined in rfc5061 missed in linux sctp: SCTP_ADDR_ADDED, SCTP_ADDR_REMOVED, SCTP_ADDR_MADE_PRIM and SCTP_SEND_FAILED_EVENT. This patchset is to add them up. ==================== Signed-off-by: Jakub Kicinski commit b6e6b5f1da7e8d092f86a4351802c27c0170c5a5 Author: Xin Long Date: Tue Oct 8 19:27:36 2019 +0800 sctp: add SCTP_SEND_FAILED_EVENT event This patch is to add a new event SCTP_SEND_FAILED_EVENT described in rfc6458#section-6.1.11. It's a update of SCTP_SEND_FAILED event: struct sctp_sndrcvinfo ssf_info is replaced with struct sctp_sndinfo ssfe_info in struct sctp_send_failed_event. SCTP_SEND_FAILED is being deprecated, but we don't remove it in this patch. Both are being processed in sctp_datamsg_destroy() when the corresp event flag is set. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: Jakub Kicinski commit 5cd0b91733145be7260cf5988e25831d35e5e8fd Author: Xin Long Date: Tue Oct 8 19:27:35 2019 +0800 sctp: add SCTP_ADDR_MADE_PRIM event sctp_ulpevent_nofity_peer_addr_change() would be called in sctp_assoc_set_primary() to send SCTP_ADDR_MADE_PRIM event when this transport is set to the primary path of the asoc. This event is described in rfc6458#section-6.1.2: SCTP_ADDR_MADE_PRIM: This address has now been made the primary destination address. This notification is provided whenever an address is made primary. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: Jakub Kicinski commit c446f50ce5f7ad116aedbdbf65e26876437f6b5a Author: Xin Long Date: Tue Oct 8 19:27:34 2019 +0800 sctp: add SCTP_ADDR_REMOVED event sctp_ulpevent_nofity_peer_addr_change() is called in sctp_assoc_rm_peer() to send SCTP_ADDR_REMOVED event when this transport is removed from the asoc. This event is described in rfc6458#section-6.1.2: SCTP_ADDR_REMOVED: The address is no longer part of the association. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: Jakub Kicinski commit 4b7740324ed86aa4b02cef134da4b79078294d72 Author: Xin Long Date: Tue Oct 8 19:27:33 2019 +0800 sctp: add SCTP_ADDR_ADDED event A helper sctp_ulpevent_nofity_peer_addr_change() will be extracted to make peer_addr_change event and enqueue it, and the helper will be called in sctp_assoc_add_peer() to send SCTP_ADDR_ADDED event. This event is described in rfc6458#section-6.1.2: SCTP_ADDR_ADDED: The address is now part of the association. Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: Jakub Kicinski commit 61a48006ffbb83ecd6078e75be99105b4aa781c6 Author: Bartosz Golaszewski Date: Wed Oct 2 09:20:47 2019 +0200 dt-bindings: at24: add new compatible arch/arm/boot/dts/at91-dvk_som60.dt.yaml uses the compatible string 'giantec,gt24c32a' for an at24 EEPROM with a fallback to 'atmel,24c32'. Add this model as a special case to the binding document. Reported-by: Rob Herring Signed-off-by: Bartosz Golaszewski Signed-off-by: Rob Herring commit 7f3bf4203774013bdb1648d7e2ce949e94564b07 Author: Bartosz Golaszewski Date: Wed Oct 2 09:20:46 2019 +0200 dt-bindings: at24: convert the binding document to yaml Convert the binding document for at24 EEPROMs from txt to yaml. The compatible property uses a regex pattern to address all the possible combinations of "vendor,model" strings. Signed-off-by: Bartosz Golaszewski [robh: rework compatible schema, fix missing allOf for $ref, fix errors in example] Signed-off-by: Rob Herring [Bartosz: added comments explaining the compatible property] Signed-off-by: Bartosz Golaszewski Signed-off-by: Rob Herring commit c85ac57ce24112a93054d8a9eec8fc4e6b844c43 Author: Paul Burton Date: Mon Oct 7 22:20:02 2019 +0000 MIPS: cmdline: Remove redundant Kconfig defaults CMDLINE, CMDLINE_BOOL & CMDLINE_FORCE all explicitly specify default values that are the same as the default value for their respective types anyway (ie. n for booleans, and the empty string for strings). Remove the redundant defaults. Signed-off-by: Paul Burton Reviewed-by: Philippe Mathieu-Daudé Cc: linux-mips@vger.kernel.org commit 25bfef430e960e695403b5d9c8dcc11b9f5d62be Author: Ilya Maximets Date: Wed Oct 9 18:49:29 2019 +0200 libbpf: Fix passing uninitialized bytes to setsockopt 'struct xdp_umem_reg' has 4 bytes of padding at the end that makes valgrind complain about passing uninitialized stack memory to the syscall: Syscall param socketcall.setsockopt() points to uninitialised byte(s) at 0x4E7AB7E: setsockopt (in /usr/lib64/libc-2.29.so) by 0x4BDE035: xsk_umem__create@@LIBBPF_0.0.4 (xsk.c:172) Uninitialised value was created by a stack allocation at 0x4BDDEBA: xsk_umem__create@@LIBBPF_0.0.4 (xsk.c:140) Padding bytes appeared after introducing of a new 'flags' field. memset() is required to clear them. Fixes: 10d30e301732 ("libbpf: add flags to umem config") Signed-off-by: Ilya Maximets Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191009164929.17242-1-i.maximets@ovn.org commit f1177102454e1832b9814051f2b071a8285581ea Merge: f05c2001ecc9 76790c7c66cc Author: Alexei Starovoitov Date: Wed Oct 9 15:38:37 2019 -0700 Merge branch 'btf2c-padding' Andrii Nakryiko says: ==================== Fix BTF-to-C logic of handling padding at the end of a struct. Fix existing test that should have captured this. Also move test_btf_dump into a test_progs test to leverage common infrastructure. ==================== Signed-off-by: Alexei Starovoitov commit 76790c7c66ccc8695afc75e73f54c0ca86267ed2 Author: Andrii Nakryiko Date: Tue Oct 8 16:10:08 2019 -0700 selftests/bpf: Fix btf_dump padding test case Existing padding test case for btf_dump has a good test that was supposed to test padding generation at the end of a struct, but its expected output was specified incorrectly. Fix this. Fixes: 2d2a3ad872f8 ("selftests/bpf: add btf_dump BTF-to-C conversion tests") Reported-by: John Fastabend Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191008231009.2991130-4-andriin@fb.com commit 6e05abc9abd5dc4dc9e6b98e01564f4a2659f0fe Author: Andrii Nakryiko Date: Tue Oct 8 16:10:07 2019 -0700 selftests/bpf: Convert test_btf_dump into test_progs test Convert test_btf_dump into a part of test_progs, instead of a stand-alone test binary. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191008231009.2991130-3-andriin@fb.com commit b4099769f3321a8d258a47a8b4b9d278dad28a73 Author: Andrii Nakryiko Date: Tue Oct 8 16:10:06 2019 -0700 libbpf: Fix struct end padding in btf_dump Fix a case where explicit padding at the end of a struct is necessary due to non-standart alignment requirements of fields (which BTF doesn't capture explicitly). Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion") Reported-by: John Fastabend Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Tested-by: John Fastabend Link: https://lore.kernel.org/bpf/20191008231009.2991130-2-andriin@fb.com commit 61978617e905f3571d9a8d3740a5aa4369476f94 Author: Tony Lindgren Date: Wed Oct 9 15:07:54 2019 -0700 ARM: dts: Add minimal support for Droid Bionic xt875 We already have folks booting Droid Bionic with Droid 4 dts, but it is a different hardware with no keyboard. Let's start adding device specific support for Droid bionic by making current omap4-droid4-xt894 a common file and including it. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren commit 75792624783659b6712b8cacb01fc0f04150eebb Author: Antonio Borneo Date: Mon Oct 7 17:43:06 2019 +0200 net: stmmac: add flexible PPS to dwmac 4.10a All the registers and the functionalities used in the callback dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and 5.00a [2]. Reuse the same callback for dwmac 4.10a too. Tested on STM32MP15x, based on dwmac 4.10a. [1] DWC Ethernet QoS Databook 4.10a October 2014 [2] DWC Ethernet QoS Databook 5.00a September 2017 Signed-off-by: Antonio Borneo Signed-off-by: Jakub Kicinski commit be57274e0dd7f74b5c377aaaa952ce4519e9f46a Author: Tony Lindgren Date: Thu Oct 3 09:59:03 2019 -0700 ARM: dts: omap4-droid4: Allow 300mA current for USB peripherals Looks like we can use some USB Ethernet dongles for example if we increase the allowed power limit. A similar PMIC MC13783 documents maximum current limit as 300 mA in in "Table 10-4. VBUS Regulator Main Characteristics". Since we have no other documentation, let's use that value as the limit. Cc: Jacopo Mondi Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Scott Cc: NeKit Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit 31d7c17e3f1b21989f554886e09dd77886bbcc36 Merge: bacb7e185596 79591b7db21d Author: Jakub Kicinski Date: Wed Oct 9 15:06:44 2019 -0700 Merge tag 'spi-ptp-api' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull in a dependency for Vladimir's work on more precise packet time stamping. Mark Brown says: ==================== spi: Add a PTP API For detailed timestamping of operations. ==================== Signed-off-by: Jakub Kicinski commit 792e154c4814abb1ec2b18c418b44a303cf6ead9 Author: Dmitry Torokhov Date: Tue Oct 8 11:38:04 2019 -0700 Input: pixcir_i2c_ts - remove platform data Previous change moved platform data definition into the driver, making it unusable for users. Given that we want to move away from custom platform data structures, and always use device properties (DT, ACPI or static) to configure devices, let's complete the removal. Tested-by: Fabio Estevam Tested-by: Michal Vokáč Reviewed-by: Roger Quadros Signed-off-by: Dmitry Torokhov commit 71a8f3455cbf50f96d521c5a4c972c4709affd80 Author: Fabio Estevam Date: Tue Oct 8 10:15:12 2019 -0700 Input: pixcir_i2c_ts - do not print error on defer probe In the case of defer probe we should not print an error message. This also aligns with how defer probe is handled in the other GPIOs used by this driver. Signed-off-by: Fabio Estevam Reviewed-by: Roger Quadros Tested-by: Michal Vokáč Signed-off-by: Dmitry Torokhov commit 13fb9cf593c35073d707c1dabbef9f0cff772695 Author: Fabio Estevam Date: Tue Oct 8 10:15:01 2019 -0700 Input: pixcir_i2c_ts - print register address in decimal The pixcir datasheet lists the registers addresses in decimal and so are PIXCIR_REG_POWER_MODE and PIXCIR_REG_INT_MODE defined in decimal. Change the error messages to print the register addresses in decimal instead of hexadecimal for better readability. Signed-off-by: Fabio Estevam Reviewed-by: Roger Quadros Tested-by: Michal Vokáč Signed-off-by: Dmitry Torokhov commit 12e7425a69fd97785f6d6835c2de0e72a9a48918 Author: Fabio Estevam Date: Tue Oct 8 10:14:41 2019 -0700 Input: pixcir_i2c_ts - keep header files sorted Keep the header files in alphabetical order to keep it more organized. Signed-off-by: Fabio Estevam Reviewed-by: Roger Quadros Tested-by: Michal Vokáč Signed-off-by: Dmitry Torokhov commit 0d3c8501e32e19c9bdfc65e5d4e17e7772729332 Author: Fabio Estevam Date: Tue Oct 8 10:13:55 2019 -0700 Input: pixcir_i2c_ts - move definitions into a single file All the defined symbols from linux/platform_data/pixcir_i2c_ts.h are only used by the pixcir_i2c_ts driver, so move all the definitions locally and get rid of the pixcir_i2c_ts.h file. Signed-off-by: Fabio Estevam Reviewed-by: Roger Quadros Tested-by: Michal Vokáč Signed-off-by: Dmitry Torokhov commit bdafbb15d13b8819d75e026c0b4b61a701583a91 Author: Fabio Estevam Date: Tue Oct 8 10:13:38 2019 -0700 Input: pixcir_i2c_ts - remove unneeded gpio.h header file The touchscreen device is a GPIO consumer, not a GPIO controller, so there is no need to include . Remove the unneeded header file. Signed-off-by: Fabio Estevam Reviewed-by: Roger Quadros Tested-by: Michal Vokáč Signed-off-by: Dmitry Torokhov commit c0de00b286ed1c14064ff94ca70abdfd4e4d11e8 Author: Thomas Bogendoerfer Date: Wed Oct 9 15:27:17 2019 +0200 MIPS: SGI-IP22/28: Use PROM for memory detection EARLY_PRINTK uses ArcWrite (via prom_putchar) on IP22/28, which needs to not mess up PROMs data structures. ARC PROM gives out a list of memory chunks, which are used and which are free. This fixes the problem of not working early printk. By using XKPHYS spaces more than 256MB memory on Indigo2 R4k machines is working now, too. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 931e1bfea4031811b75f7af688a3e17fc2b121fb Author: Thomas Bogendoerfer Date: Wed Oct 9 15:27:16 2019 +0200 MIPS: SGI-IP22: set PHYS_OFFSET to memory start IP22 started at physical 0x08000000. To avoid wasting memory for page structs set PHYS_OFFSET. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 351889d356290554bf5d20d684244813a654afbe Author: Thomas Bogendoerfer Date: Wed Oct 9 15:27:15 2019 +0200 MIPS: fw: arc: workaround 64bit kernel/32bit ARC problems Pointer arguments for 32bit ARC PROMs must reside in CKSEG0/1. While the initial stack resides in CKSEG0 the first kernel thread stack is already placed at a XKPHYS address, which ARC32 can't handle. The workaround here is to use static variables, which are placed into BSS and linked to a CKSEG0 address. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 39b2d7565a4736a30c6eeb550901433b44aebf57 Author: Thomas Bogendoerfer Date: Wed Oct 9 15:27:14 2019 +0200 MIPS: Kconfig: always select ARC_MEMORY and ARC_PROMLIB for platform Instead of having a default y option with depends simply select options for the platforms where they are needed. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit ce6c0a593b3cbeb35269c701fc90fc491dc3a348 Author: Thomas Bogendoerfer Date: Wed Oct 9 15:27:13 2019 +0200 MIPS: fw: arc: use call_o32 to call ARC prom from 64bit kernel When using a 64bit kernel with generic spaces setup stack is also placed in XKPYHS, which the 32bit PROM can't handle. By using call_o32 for ARC_CALLs a stack placed in KSEG0 is used when calling PROM. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit d11646b5ce930c4d5e933c4d97db5a06a67a211b Author: Thomas Bogendoerfer Date: Wed Oct 9 15:27:12 2019 +0200 MIPS: fw: arc: remove unused ARC code Current kernel uses only a few ARC calls. Drop all unused ARC functions. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 6e73e92b155c868ff7fce9d108839668caf1d9be Author: Scott Mayhew Date: Wed Oct 9 15:11:37 2019 -0400 nfsd4: fix up replay_matches_cache() When running an nfs stress test, I see quite a few cached replies that don't match up with the actual request. The first comment in replay_matches_cache() makes sense, but the code doesn't seem to match... fix it. This isn't exactly a bugfix, as the server isn't required to catch every case of a false retry. So, we may as well do this, but if this is fixing a problem then that suggests there's a client bug. Fixes: 53da6a53e1d4 ("nfsd4: catch some false session retries") Signed-off-by: Scott Mayhew Signed-off-by: J. Bruce Fields commit 3c0be5849259b729580c23549330973a2dd513a2 Author: Paul Burton Date: Tue Oct 8 19:46:01 2019 +0000 MIPS: Drop 32-bit asm string functions We have assembly implementations of strcpy(), strncpy(), strcmp() & strncmp() which: - Are simple byte-at-a-time loops with no particular optimizations. As a comment in the code describes, they're "rather naive". - Offer no clear performance advantage over the generic C implementations - in microbenchmarks performed by Alexander Lobakin the asm functions sometimes win & sometimes lose, but generally not by large margins in either direction. - Don't support 64-bit kernels, where we already make use of the generic C implementations. - Tend to bloat kernel code size due to inlining. - Don't support CONFIG_FORTIFY_SOURCE. - Won't support nanoMIPS without rework. For all of these reasons, delete the asm implementations & make use of the generic C implementations for 32-bit kernels just like we already do for 64-bit kernels. Signed-off-by: Paul Burton URL: https://lore.kernel.org/linux-mips/a2a35f1cf58d6db19eb4af9b4ae21e35@dlink.ru/ Cc: Alexander Lobakin Reviewed-by: Philippe Mathieu-Daudé Cc: linux-mips@vger.kernel.org commit 6baaeadae911ba9cedfead881f3bf305a18fd011 Author: Paul Burton Date: Tue Oct 8 18:22:00 2019 +0000 MIPS: Provide unroll() macro, use it for cache ops Currently we have a lot of duplication in asm/r4kcache.h to handle manually unrolling loops of cache ops for various line sizes, and we have to explicitly handle the difference in cache op immediate width between MIPSr6 & earlier ISA revisions with further duplication. Introduce an unroll() macro in asm/unroll.h which expands to a switch statement which is used to call a function or expand a preprocessor macro a compile-time constant number of times in a row - effectively explicitly unrolling a loop. We make use of this here to remove the cache op duplication & will use it further in later patches. A nice side effect of this is that calculating the cache op offset immediate is now the compiler's responsibility, so we're no longer sensitive to the width change of that immediate in MIPSr6 & will be similarly agnostic to immediate width in any future supported ISA. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org commit 728db198868c7b46db5e65717d4518aeb6523ccc Author: Arnaldo Carvalho de Melo Date: Wed Oct 9 16:25:02 2019 -0300 perf beauty: Introduce strtoul() for x86 MSRs Continuing from the previous cset comment, now that filter expression works: # perf trace -e msr:* --filter="msr!=FS_BASE && msr != IA32_TSC_DEADLINE && msr != 0x830 && msr != 0x83f && msr !=IA32_SPEC_CTRL" --filter-pids 3750 0.000 Timer/5033 msr:write_msr(msr: SYSCALL_MASK, val: 292608) 0.009 Timer/5033 msr:write_msr(msr: LSTAR, val: -1398800368) 0.010 Timer/5033 msr:write_msr(msr: TSC_AUX, val: 4) 0.050 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 45.661 gnome-terminal/12595 msr:write_msr(msr: SYSCALL_MASK, val: 292608) 45.672 gnome-terminal/12595 msr:write_msr(msr: LSTAR, val: -1398800368) 45.675 gnome-terminal/12595 msr:write_msr(msr: TSC_AUX, val: 3) 54.852 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 130.508 Timer/4050 msr:write_msr(msr: SYSCALL_MASK, val: 292608) 130.527 Timer/4050 msr:write_msr(msr: LSTAR, val: -1398800368) 130.531 Timer/4050 msr:write_msr(msr: TSC_AUX, val: 3) 140.924 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 164.738 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 603.578 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 620.809 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 690.115 JS Watchdog/4259 msr:write_msr(msr: SYSCALL_MASK, val: 292608) 690.136 JS Watchdog/4259 msr:write_msr(msr: LSTAR, val: -1398800368) 690.141 JS Watchdog/4259 msr:write_msr(msr: TSC_AUX, val: 3) 690.186 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 759.016 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) ^C[root@quaco ~]# Or look at the first 3 write_msr events for that IA32_TSC_DEADLINE to learn why it happens so often: # perf trace --max-events=3 --max-stack=8 -e msr:* --filter="msr==IA32_TSC_DEADLINE" --filter-pids 3750 0.000 :0/0 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 19296732550862) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) lapic_next_deadline ([kernel.kallsyms]) clockevents_program_event ([kernel.kallsyms]) hrtimer_interrupt ([kernel.kallsyms]) smp_apic_timer_interrupt ([kernel.kallsyms]) apic_timer_interrupt ([kernel.kallsyms]) cpuidle_enter_state ([kernel.kallsyms]) 32.646 :0/0 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 19296800134158) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) lapic_next_deadline ([kernel.kallsyms]) clockevents_program_event ([kernel.kallsyms]) hrtimer_start_range_ns ([kernel.kallsyms]) tick_nohz_restart_sched_tick ([kernel.kallsyms]) tick_nohz_idle_exit ([kernel.kallsyms]) do_idle ([kernel.kallsyms]) 32.802 :0/0 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 19297507436922) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) lapic_next_deadline ([kernel.kallsyms]) clockevents_program_event ([kernel.kallsyms]) hrtimer_try_to_cancel ([kernel.kallsyms]) hrtimer_cancel ([kernel.kallsyms]) tick_nohz_restart_sched_tick ([kernel.kallsyms]) tick_nohz_idle_exit ([kernel.kallsyms]) # And if some of the strings can't be found: # trace -e msr:* --filter="msr!=SPECULATIVE_EXECUTION_PROBLEMS_SOLUTION && msr != IA32_TSC_DEADLINE && msr != 0x830 && msr != 0x83f && msr !=IA32_SPEC_CTRL" --filter-pids 3750 "SPECULATIVE_EXECUTION_PROBLEMS_SOLUTION" not found for "msr" in "msr:read_msr", can't set filter "(msr!=SPECULATIVE_EXECUTION_PROBLEMS_SOLUTION && msr != IA32_TSC_DEADLINE && msr != 0x830 && msr != 0x83f && msr !=IA32_SPEC_CTRL) && (common_pid != 28131 && common_pid != 3750)" # Next step is to automatically wire up the pre-existing strarrays, which there are quite a few. The strtoul() methods will be further enhanced to allow for looking at other arguments in a syscall/tracepoint, just like going from integer to string (scnprintf methods), so that those "val" lines for the msr tracepoints can be properly formatted or even resolved into some string. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-4qaai5iqjgefd11k4ddm7qg8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 90df0249c2eae21f329760ee857575260926188a Author: Arnaldo Carvalho de Melo Date: Wed Oct 9 16:22:16 2019 -0300 perf trace: Expand strings in filters to integers So that one can try things like: # perf trace -e msr:* --filter="msr!=FS_BASE && msr != IA32_TSC_DEADLINE && msr != 0x830 && msr != 0x83f && msr !=IA32_SPEC_CTRL" --filter-pids 3750 That, at this point in the patchset, without any strtoul in place for tracepoint arguments, will result in: No resolver (strtoul) for "msr" in "msr:read_msr", can't set filter "(msr!=FS_BASE && msr != IA32_TSC_DEADLINE && msr != 0x830 && msr != 0x83f && msr !=IA32_SPEC_CTRL) && (common_pid != 25407 && common_pid != 3750)" # See you in the next cset! Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-dx5j70fv2rgkeezd1cb3hv2p@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 64292b3336e415dbeccfeb16bf764d5be50d8512 Author: Sean Paul Date: Mon Oct 7 11:19:01 2019 -0400 Documentation: Fix warning in drm-kms-helpers.rst Fixes the following warning: ../include/drm/drm_atomic_state_helper.h:1: warning: no structured comments found Fixes: 9ef8a9dc4b21 ("drm: Extract drm_atomic_state_helper.[hc]") Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191007151921.27099-1-sean@poorly.run commit 287422a95fe28e05c1952de0472e0dfdffa6caae Author: Douglas Anderson Date: Thu Oct 3 11:47:30 2019 -0700 drm/rockchip: Round up _before_ giving to the clock framework I'm embarassed to say that even though I've touched vop_crtc_mode_fixup() twice and I swear I tested it, there's still a stupid glaring bug in it. Specifically, on veyron_minnie (with all the latest display timings) we want to be setting our pixel clock to 66,666,666.67 Hz and we tell userspace that's what we set, but we're actually choosing 66,000,000 Hz. This is confirmed by looking at the clock tree. The problem is that in drm_display_mode_from_videomode() we convert from Hz to kHz with: dmode->clock = vm->pixelclock / 1000; ...and drm_display_mode_from_videomode() is called from panel-simple when we have an "override_mode" like we do on veyron_minnie. See commit 123643e5c40a ("ARM: dts: rockchip: Specify rk3288-veyron-minnie's display timings"). ...so when the device tree specifies a clock of 66666667 for the panel then DRM translates that to 66666000. The clock framework will always pick a clock that is _lower_ than the one requested, so it will refuse to pick 66666667 and we'll end up at 66000000. While we could try to fix drm_display_mode_from_videomode() to round to the nearest kHz and it would fix our problem, it wouldn't help if the clock we actually needed was 60,000,001 Hz. We could alternatively have DRM always round up, but maybe this would break someone else who already baked in the assumption that DRM rounds down. Specifically note that clock drivers are not consistent about whether they round up or round down when you call clk_set_rate(). We know how Rockchip's clock driver works, but (for instance) you can see that on most Qualcomm clocks the default is clk_rcg2_ops which rounds up. Let's solve this by just adding 999 Hz before calling clk_round_rate(). This should be safe and work everywhere. As discussed in more detail in comments in the commit, Rockchip's PLLs are configured in a way that there shouldn't be another PLL setting that is only a few kHz off so we won't get mixed up. NOTE: if this is picked to stable, it's probably easiest to first pick commit 527e4ca3b6d1 ("drm/rockchip: Base adjustments of the mode based on prev adjustments") which shouldn't hurt in stable. Fixes: b59b8de31497 ("drm/rockchip: return a true clock rate to adjusted_mode") Signed-off-by: Douglas Anderson Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191003114726.v2.1.Ib233b3e706cf6317858384264d5b0ed35657456e@changeid commit d0a3a1041005d9273d18669819e2a6dfed922a4d Author: Arnaldo Carvalho de Melo Date: Wed Oct 9 16:11:36 2019 -0300 perf trace: Introduce a strtoul() method for 'struct strarrays' And also for 'struct strarray', since its needed to implement strarrays__strtoul(). This just traverses the entries and when finding a match, returns (offset + index), i.e. the value associated with the searched string. E.g. "EFER" (MSR_EFER) returns: # grep -w EFER -B2 /tmp/build/perf/trace/beauty/generated/x86_arch_MSRs_array.c #define x86_64_specific_MSRs_offset 0xc0000080 static const char *x86_64_specific_MSRs[] = { [0xc0000080 - x86_64_specific_MSRs_offset] = "EFER", # 0xc0000080 This will be auto-attached to 'struct syscall_arg_fmt' entries associated with strarrays as soon as we add a ->strarray and ->strarrays to 'struct syscall_arg_fmt'. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-r2hpaahf8lishyb1owko9vs1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3f41b77843b338e836f52cc2d486be689d6cb9c1 Author: Arnaldo Carvalho de Melo Date: Wed Oct 9 16:06:43 2019 -0300 perf trace: Add a strtoul() method to 'struct syscall_arg_fmt' This will go from a string to a number, so that filter expressions can be constructed with strings and then, before applying the tracepoint filters (or eBPF, in the future) we can map those strings to numbers. The first one will be for 'msr' tracepoint arguments, but real quickly we will be able to reuse all strarrays for that. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-wgqq48agcgr95b8dmn6fygtr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c36eebd9ba5d70b84e1e7408ccc7632566f285c4 Author: Chris Wilson Date: Wed Oct 9 17:09:06 2019 +0100 drm/i915/gt: execlists->active is serialised by the tasklet The active/pending execlists is no longer protected by the engine->active.lock, but is serialised by the tasklet instead. Update the locking around the debug and stats to follow suit. v2: local_bh_disable() to prevent recursing into the tasklet in case we trigger a softirq (Tvrtko) Fixes: df403069029d ("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191009160906.16195-1-chris@chris-wilson.co.uk commit c949ae431467764277cdd88d7c26ff963a9db40a Author: Chris Wilson Date: Wed Oct 9 11:09:54 2019 +0100 drm/i915/execlists: Protect peeking at execlists->active Now that we dropped the engine->active.lock serialisation from around process_csb(), direct submission can run concurrently to the interrupt handler. As such execlists->active may be advanced as we dequeue, dropping the reference to the request. We need to employ our RCU request protection to ensure that the request is not freed too early. Fixes: df403069029d ("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191009100955.21477-1-chris@chris-wilson.co.uk commit cfbb2e38dfc60b04f0b226f5f926ce31f353fc26 Author: Steven Price Date: Wed Oct 9 10:44:56 2019 +0100 drm/panfrost: Remove commented out call to panfrost_core_dump panfrost_core_dump() has never existed in mainline, so remove it and add a TODO entry that core dump support is currently lacking. Signed-off-by: Steven Price Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191009094456.9704-2-steven.price@arm.com commit de89212ddb3dc87152dd6f2b88a20d5176156777 Author: Steven Price Date: Wed Oct 9 10:44:55 2019 +0100 drm/panfrost: Handle resetting on timeout better Panfrost uses multiple schedulers (one for each slot, so 2 in reality), and on a timeout has to stop all the schedulers to safely perform a reset. However more than one scheduler can trigger a timeout at the same time. This race condition results in jobs being freed while they are still in use. When stopping other slots use cancel_delayed_work_sync() to ensure that any timeout started for that slot has completed. Also use mutex_trylock() to obtain reset_lock. This means that only one thread attempts the reset, the other threads will simply complete without doing anything (the first thread will wait for this in the call to cancel_delayed_work_sync()). While we're here and since the function is already dependent on sched_job not being NULL, let's remove the unnecessary checks. Fixes: aa20236784ab ("drm/panfrost: Prevent concurrent resets") Tested-by: Neil Armstrong Signed-off-by: Steven Price Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191009094456.9704-1-steven.price@arm.com commit 603e398a3db258bd99020e9fbabe6c624f08b942 Author: Steven Price Date: Fri Oct 4 15:44:13 2019 +0100 drm/panfrost: Remove NULL check for regulator devm_regulator_get() is used to populate pfdev->regulator which ensures that this cannot be NULL (a dummy regulator will be returned if necessary). So remove the check in panfrost_devfreq_target(). Signed-off-by: Steven Price Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191004144413.42586-1-steven.price@arm.com commit 8f6ea27b2fefdff58b3a038b5f1b4ed34aed3fd3 Author: Simon Ser Date: Wed Oct 9 15:10:49 2019 +0000 drm: two planes with the same zpos have undefined ordering Currently the property docs don't specify whether it's okay for two planes to have the same zpos value and what user-space should expect in this case. The unspoken, legacy rule used in the past was to make user-space figure out the zpos from object IDs. However some drivers break this rule, that's why the ordering is documented as unspecified in case the zpos property is missing. User-space should rely on the zpos property only. There are some cases in which user-space might read identical zpos values for different planes. For instance, in case the property is mutable, user-space might set two planes' zpos to the same value. This is necessary to support user-space using the legacy DRM API where atomic commits are not possible: user-space needs to update the planes' zpos one by one. Because of this, user-space should handle multiple planes with the same zpos. While at it, remove the assumption that zpos is only for overlay planes. Additionally, update the drm_plane_state.zpos docs to clarify that zpos disambiguation via plane object IDs is a recommendation for drivers, not something user-space can rely on. In other words, when user-space sets the same zpos on two planes, drivers should rely on the plane object ID. v2: clarify drm_plane_state.zpos docs (Daniel) v3: zpos is for all planes (Marius, Daniel) v4: completely reword the drm_plane_state.zpos docs to make it clear the recommendation to use plane IDs is for drivers in case user-space uses duplicate zpos values (Pekka) v5: reword commit message (Pekka, James) v6: remove mention of Arm GPUs having planes which can't overlap, because this isn't uAPI yet (Daniel) Signed-off-by: Simon Ser Reviewed-by: Pekka Paalanen Cc: Marius Vlad Cc: Daniel Vetter Cc: James Qian Wang Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/T5nHrvXH0GKOp6ONaFHk-j2cwEb4_4C_sBz9rNw8mmPACuut-DQqC74HMAFKZH3_Q15E8a3YnmKCxap-djKA71VVZv_T-tFxaB0he13O7yA=@emersion.fr commit 2bfd3e7651addcaf48f12d4f11ea9d8fca6c3aa8 Author: Stephen Boyd Date: Tue Oct 8 16:45:04 2019 -0700 soc: qcom: llcc: Name regmaps to avoid collisions We'll end up with debugfs collisions if we don't give names to the regmaps created by this driver. Change the name of the config before registering it so we don't collide in debugfs. Fixes: 7f9c136216c7 ("soc: qcom: Add broadcast base for Last Level Cache Controller (LLCC)") Cc: Venkata Narendra Kumar Gutta Reviewed-by: Evan Green Signed-off-by: Stephen Boyd Signed-off-by: Bjorn Andersson commit 951d48855d86e72e0d6de73440fe09d363168064 Author: Robin Murphy Date: Wed Jul 3 18:42:20 2019 +0100 of: Make of_dma_get_range() work on bus nodes Since the "dma-ranges" property is only valid for a node representing a bus, of_dma_get_range() currently assumes the node passed in is a leaf representing a device, and starts the walk from its parent. In cases like PCI host controllers on typical FDT systems, however, where the PCI endpoints are probed dynamically the initial leaf node represents the 'bus' itself, and this logic means we fail to consider any "dma-ranges" describing the host bridge itself. Rework the logic such that of_dma_get_range() also works correctly starting from a bus node containing "dma-ranges". While this does mean "dma-ranges" could incorrectly be in a device leaf node, there isn't really any way in this function to ensure that a leaf node is or isn't a bus node. Signed-off-by: Robin Murphy [robh: Allow for the bus child node to still be passed in] Signed-off-by: Rob Herring Reviewed-by: Robin Murphy Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne commit c46652ee6cacc42513e4f555f0050db2d537dab6 Author: zhengbin Date: Wed Oct 9 08:37:17 2019 +0800 spi: npcm: Remove set but not used variable 'val' Fixes gcc '-Wunused-but-set-variable' warning: drivers/spi/spi-npcm-pspi.c: In function npcm_pspi_handler: drivers/spi/spi-npcm-pspi.c:296:6: warning: variable val set but not used [-Wunused-but-set-variable] It is not used since commit 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570581437-104549-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Mark Brown commit 944be39bd47cf0d45e50eb45b487031dde8569e5 Author: zhengbin Date: Wed Oct 9 08:37:16 2019 +0800 spi: omap-100k: Remove set but not used variable 'dataH' Fixes gcc '-Wunused-but-set-variable' warning: drivers/spi/spi-omap-100k.c: In function spi100k_read_data: drivers/spi/spi-omap-100k.c:140:6: warning: variable dataH set but not used [-Wunused-but-set-variable] It is not used since commit 35c9049b2704 ("Add OMAP spi100k driver") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570581437-104549-2-git-send-email-zhengbin13@huawei.com Signed-off-by: Mark Brown commit 907becb2638df95b78581381bed225c4f3e35799 Author: YueHaibing Date: Wed Oct 9 23:02:03 2019 +0800 regulator: uniphier: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191009150203.8052-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 73511a90b74c9cfb6509dae63ec4db2d96b7b203 Author: YueHaibing Date: Wed Oct 9 23:01:38 2019 +0800 regulator: stm32-vrefbuf: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191009150138.11640-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 4bbee14d8e5487e3d2662138e3767cf4678cdf57 Author: Daniel Baluta Date: Wed Oct 9 18:36:14 2019 +0300 ASoC: simple_card_utils.h: Add missing include When debug is enabled compiler cannot find the definition of clk_get_rate resulting in the following error: ./include/sound/simple_card_utils.h:168:40: note: previous implicit declaration of ‘clk_get_rate’ was here dev_dbg(dev, "%s clk %luHz\n", name, clk_get_rate(dai->clk)); ./include/sound/simple_card_utils.h:168:3: note: in expansion of macro ‘dev_dbg’ dev_dbg(dev, "%s clk %luHz\n", name, clk_get_rate(dai->clk)); Fix this by including the appropriate header. Fixes: 0580dde59438686d ("ASoC: simple-card-utils: add asoc_simple_debug_info()") Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20191009153615.32105-2-daniel.baluta@nxp.com Signed-off-by: Mark Brown commit ac84b8b21b8e305b82d2b204999ee3140990d1b5 Author: Dan Murphy Date: Tue Oct 8 13:15:16 2019 -0500 ASoc: Add Texas Instruments TAS2562 amplifier binding Add the DT binding for the TAS2562 amplifier. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20191008181517.5332-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 1cd4d9eead73c004d08a58536dc726bd172eaaec Author: Stephen Rothwell Date: Wed Oct 9 11:35:57 2019 +1100 drm/amdkfd: update for drmP.h removal Signed-off-by: Stephen Rothwell Signed-off-by: Alex Deucher commit 54e48a69c117648b18684fe0198f40be1bf21acc Author: Krzysztof Kozlowski Date: Tue Oct 8 18:02:34 2019 +0200 ARM: multi_v7_defconfig: Enable Exynos bus and memory frequency scaling (devfreq) Enable devfreq events along with drivers for scaling frequency and voltages of Exynos buses and Dynamic Memory Controller (DMC). This usually brings energy saving benefits. So far devfreq was disabled because it was causing hangs during system reboot (voltage not matching reset frequency). This was already fixed. Occasionally, devfreq might negatively impact performance of certain SoC blocks, e.g. when a bus is scaled down but some block (like Mixer with two Full HD windows) wants to perform high-throughput DMA operations. Signed-off-by: Krzysztof Kozlowski commit 00265bee100299f01563717927548d9c99a9dd44 Author: Krzysztof Kozlowski Date: Tue Oct 8 18:03:56 2019 +0200 ARM: multi_v7_defconfig: Enable options for boards with Exynos SoC Sync with exynos_defconfig and enable following options for Samsung Exynos SoC based boards: 1. NFC_S3FWRN5_I2C (with NFC stack): Samsung S3FWRN5 NCI NFC Controller, used for example on Exynos5433 (if booted in 32-bit mode), 2. S3C2410_WATCHDOG: watchdog driver used on S3C, S5P and Exynos SoCs, 3. REGULATOR_S2MPA01: Samsung S2MPA01 regulators driver present on Exynos5260 RexNos REX-RED board, 4. SND_SOC_ARNDALE: sound support on Arndale boards, 5. EXYNOS_IOMMU: IOMMU driver used on all Exynos SocS,, 6. EXTCON_MAX14577, EXTCON_MAX77693 and EXTCON_MAX8997: extcon drivers for handling micro USB on mobile Samsung boards (Trats, Trats2, Rinato), 7. PHY_EXYNOS5250_SATA: SATA phy for Exynos5250 present on Arndale and SMDK5250 boards. Signed-off-by: Krzysztof Kozlowski commit ac4062aa6c811db89ee3bbfd3101af931a50c1ba Author: Colin Ian King Date: Sun Oct 6 15:42:56 2019 +0100 gpio: 104-idi-48e: make array register_offset static, makes object smaller Don't populate the array register_offset on the stack but instead make it static. Makes the object code smaller by 63 bytes. Also add the int type specifier to clean up a checkpatch warning. Before: text data bss dec hex filename 9212 5712 1408 16332 3fcc drivers/gpio/gpio-104-idi-48.o After: text data bss dec hex filename 9085 5776 1408 16269 3f8d drivers/gpio/gpio-104-idi-48.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Acked-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit a02712e1ebcdcbc71ec30f5ed241eae5696dda50 Author: Bartosz Golaszewski Date: Wed Oct 2 18:56:14 2019 +0200 gpio: htc-egpio: remove redundant error message There's no need to emit an error message on probe failure unless we're printing some meaningful info. Otherwise the core driver code will inform us about a probe error. Also: the driver currently drops info about errors propagated from called functions by default to returning -EINVAL. This fixes it as well. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit 1135ee4af74078a92b343e0fea08814c077d512c Author: Bartosz Golaszewski Date: Wed Oct 2 18:53:57 2019 +0200 gpio: htc-egpio: use devm_platform_ioremap_resource() There's no need to use the nocache variant of ioremap(). Switch to using devm_platform_ioremap_resource(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit 71b4da2b370bb2b0f3391d24049417e9be0281a0 Author: Bartosz Golaszewski Date: Wed Oct 2 18:41:10 2019 +0200 gpio: ath79: use devm_platform_ioremap_resource() There's no need to use the nocache variant of ioremap(). Switch to using devm_platform_ioremap_resource(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit 94bfcbf0368b61403c33477e404eb16299b7423d Author: Bartosz Golaszewski Date: Wed Oct 2 18:33:48 2019 +0200 gpio: em: use devm_platform_ioremap_resource() There's no need to use the nocache variant of ioremap(). Switch to using devm_platform_ioremap_resource(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Geert Uytterhoeven commit f63516f4d6445ec23d0b7c286c5ff0064bdbe46b Author: Bartosz Golaszewski Date: Wed Oct 2 18:31:10 2019 +0200 gpio: xgene: use devm_platform_ioremap_resource() There's no need to use the nocache variant of ioremap(). Switch to using devm_platform_ioremap_resource(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit cf62b4e44c49a0bdf363464168e3c9c6e1d8efe5 Author: Bartosz Golaszewski Date: Wed Oct 2 18:28:52 2019 +0200 gpio: xgene: remove redundant error message There's no need to emit an error message on probe failure unless we're printing some meaningful info. Otherwise the core driver code will inform us about a probe error. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit 8dff1df551dffc29fa78771c8dda2f0b094003aa Author: Olga Kornievskaia Date: Tue Jul 2 15:11:48 2019 -0400 NFS: replace cross device check in copy_file_range Add a check to disallow cross file systems copy offload, both files are expected to be of NFS4.2+ type. Reviewed-by: Jeff Layton Reviewed-by: Matthew Wilcox Signed-off-by: Olga Kornievskaia commit 1275101026b48f43e194de074b11ab04fee8b89b Author: Olga Kornievskaia Date: Wed Jul 3 10:38:02 2019 -0400 NFS based on file size issue sync copy or fallback to generic copy offload For small file sizes, it make sense to issue a synchronous copy (and save an RPC callback operation). Also, for the inter copy offload, copy len must be larger than the cost of doing a mount between the destination and source server (14RPCs are sent during 4.x mount). Signed-off-by: Olga Kornievskaia commit 0e65a32c8a569db363048e17a708b1a0913adbef Author: Olga Kornievskaia Date: Fri Jun 14 14:38:40 2019 -0400 NFS: handle source server reboot When the source server reboots after a server-to-server copy was issued, we need to retry the copy from COPY_NOTIFY. We need to detect that the source server rebooted and there is a copy waiting on a destination server and wake it up. Signed-off-by: Olga Kornievskaia commit fefa1a812a9ae7ff5647896919dd02b92351c044 Author: Olga Kornievskaia Date: Fri Jun 14 14:22:12 2019 -0400 NFS handle NFS4ERR_PARTNER_NO_AUTH error When a destination server sends a READ to the source server it can get a NFS4ERR_PARTNER_NO_AUTH, which means a copy needs to be restarted. Signed-off-by: Olga Kornievskaia commit 124060255d59b45fb0d19149d61530ad89d8fd1c Author: Olga Kornievskaia Date: Tue Jul 2 14:57:25 2019 -0400 NFS: also send OFFLOAD_CANCEL to source server In case of copy is cancelled, also send OFFLOAD_CANCEL to the source server. Signed-off-by: Olga Kornievskaia commit 6b61c969d501ad5ae035d27b75fa6c7f2eb6a54a Author: Olga Kornievskaia Date: Tue Sep 26 13:51:39 2017 -0400 NFS: COPY handle ERR_OFFLOAD_DENIED If server sends ERR_OFFLOAD_DENIED error, the client must fall back on doing copy the normal way. Return ENOTSUPP to the vfs and fallback to regular copy. Signed-off-by: Olga Kornievskaia commit 7e350197a1c10ad137ec51689f317e3e94e4cc41 Author: Olga Kornievskaia Date: Mon Sep 25 15:59:44 2017 -0400 NFS: for "inter" copy treat ESTALE as ENOTSUPP If the client sends an "inter" copy to the destination server but it only supports "intra" copy, it can return ESTALE (since it doesn't know anything about the file handle from the other server and does not recognize the special case of "inter" copy). Translate this error as ENOTSUPP and also send OFFLOAD_CANCEL to the source server so that it can clean up state. Signed-off-by: Olga Kornievskaia commit 0b9018b9cab9b6a30fd6758ff0745ff74efcf374 Author: Olga Kornievskaia Date: Tue Oct 8 16:34:36 2019 -0400 NFS: skip recovery of copy open on dest server Mark the open created for the source file on the destination server. Then if this open is going thru a recovery, then fail the recovery as we don't need to be recoving a "fake" open. We need to fail the ongoing READs and vfs_copy_file_range(). Signed-off-by: Olga Kornievskaia commit ec4b0925089826af45e99cdf78a8ac84c1d005f1 Author: Olga Kornievskaia Date: Tue Oct 8 16:33:53 2019 -0400 NFS: inter ssc open NFSv4.2 inter server to server copy requires the destination server to READ the data from the source server using the provided stateid and file handle. Given an NFSv4 stateid and filehandle from the COPY operaion, provide the destination server with an NFS client function to create a struct file suitable for the destiniation server to READ the data to be copied. Signed-off-by: Olga Kornievskaia Signed-off-by: Andy Adamson commit 1d38f3f0d70008671f4dc055697ff3c3bb44a284 Author: Olga Kornievskaia Date: Tue Jun 4 11:54:18 2019 -0400 NFS: add ca_source_server<> to COPY Support only one source server address: the same address that the client and source server use. Signed-off-by: Andy Adamson Signed-off-by: Olga Kornievskaia commit 0491567b51efeca807da1125a1a0d5193875e286 Author: Olga Kornievskaia Date: Tue Jun 4 16:14:30 2019 -0400 NFS: add COPY_NOTIFY operation Try using the delegation stateid, then the open stateid. Only NL4_NETATTR, No support for NL4_NAME and NL4_URL. Allow only one source server address to be returned for now. To distinguish between same server copy offload ("intra") and a copy between different server ("inter"), do a check of server owner identity and also make sure server is capable of doing a copy offload. Signed-off-by: Andy Adamson Signed-off-by: Olga Kornievskaia commit f9bdad8ca8a40270576dd8751ac225febaa87f93 Author: Olga Kornievskaia Date: Mon Oct 29 13:23:40 2018 -0400 NFS NFSD: defining nl4_servers structure needed by both These structures are needed by COPY_NOTIFY on the client and needed by the nfsd as well Reviewed-by: Jeff Layton Signed-off-by: Olga Kornievskaia commit 5478f912d225a1745a4b3d5f564daa0004d35a42 Author: Tero Kristo Date: Wed Oct 9 08:55:40 2019 -0700 soc: ti: omap-prm: add omap5 PRM data Add PRM instance data for omap5 family of SoCs. Initially this is just used to provide reset support. Reviewed-by: Tony Lindgren Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar commit 01f5069efa628845afa2aad4b4aec752215f2179 Author: Tero Kristo Date: Wed Oct 9 08:55:40 2019 -0700 soc: ti: omap-prm: add am4 PRM data Add PRM instance data for am4 family of SoCs. Initially this is just used to provide reset support. Reviewed-by: Tony Lindgren Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar commit 59de827750f2ac001cb150101e600df3324e7656 Author: Tero Kristo Date: Wed Oct 9 08:55:39 2019 -0700 soc: ti: omap-prm: add dra7 PRM data Add PRM instance data for dra7 family of SoCs. Initially this is just used to provide reset support. Reviewed-by: Tony Lindgren Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar commit 8aa35504a0b9f71cec84434369273a3678982b4b Author: Tero Kristo Date: Wed Oct 9 08:55:39 2019 -0700 soc: ti: omap-prm: add data for am33xx Add PRM instance data for AM33xx SoC. Includes some basic register definitions and reset data for now. Reviewed-by: Tony Lindgren Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar commit 0f0faaf4d7ff373def6c5218172c45f55a5113f6 Author: Tero Kristo Date: Wed Oct 9 08:55:38 2019 -0700 soc: ti: omap-prm: add omap4 PRM data Add PRM data for omap4 family of SoCs. Initially this is just used to provide reset support. Reviewed-by: Tony Lindgren Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar commit d30cd83f68535ca21412b1abe8684438690c1c2b Author: Tero Kristo Date: Wed Oct 9 08:55:38 2019 -0700 soc: ti: omap-prm: add support for denying idle for reset clockdomain TI SoCs hardware reset signals require the parent clockdomain to be in force wakeup mode while de-asserting the reset, otherwise it may never complete. To support this, add pdata hooks to control the clockdomain directly. Signed-off-by: Tero Kristo Reviewed-by: Tony Lindgren Signed-off-by: Santosh Shilimkar commit c5117a78dd88e5b673897baec0a6eed9ee599e02 Author: Tero Kristo Date: Wed Oct 9 08:55:37 2019 -0700 soc: ti: omap-prm: poll for reset complete during de-assert Poll for reset completion status during de-assertion of reset, otherwise the IP in question might be accessed before it has left reset properly. Signed-off-by: Tero Kristo Reviewed-by: Philipp Zabel Reviewed-by: Tony Lindgren Signed-off-by: Santosh Shilimkar commit 3e99cb214f03b8206aad80644809aea947910372 Author: Tero Kristo Date: Wed Oct 9 08:55:36 2019 -0700 soc: ti: add initial PRM driver with reset control support Add initial PRM (Power and Reset Management) driver for TI OMAP class SoCs. Initially this driver only supports reset control, but can be extended to support rest of the functionality, like powerdomain control, PRCM irq support etc. Signed-off-by: Tero Kristo Reviewed-by: Philipp Zabel Reviewed-by: Tony Lindgren Signed-off-by: Santosh Shilimkar commit 95ec5442715a16e3df91aa17d527f8f07588f5d2 Author: Tero Kristo Date: Wed Oct 9 08:55:36 2019 -0700 dt-bindings: omap: add new binding for PRM instances Add new binding for OMAP PRM (Power and Reset Manager) instances. Each of these will act as a power domain controller and potentially as a reset provider. Signed-off-by: Tero Kristo Reviewed-by: Rob Herring Reviewed-by: Tony Lindgren Signed-off-by: Santosh Shilimkar commit 2a86972f60fcfaa0daa02b9fe461935ea2063791 Author: Matt Roper Date: Tue Oct 8 10:29:20 2019 -0700 drm/i915: Select DPLL's via mask This slightly simplifies the EHL DPLL4 handling and also gives us more flexibility in the future in case we need to skip the use of specific PLL's (e.g., due to hardware workarounds and such). v2: - Replace GENMASK() with or'd BIT()'s to make the specific DPLLs more explicit. (Ville) - s/unsigned/unsigned long/. (Lucas) Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191008172920.11362-1-matthew.d.roper@intel.com commit f2a4a13ab2ca3605010d72c774b6aab3ba1a09f4 Author: zhong jiang Date: Mon Sep 23 09:24:43 2019 +0800 drm/vkms: Fix an undefined reference error in vkms_composer_worker I hit the following error when compile the kernel. drivers/gpu/drm/vkms/vkms_composer.o: In function `vkms_composer_worker': vkms_composer.c:(.text+0x5e4): undefined reference to `crc32_le' make: *** [vmlinux] Error 1 Signed-off-by: zhong jiang Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1569201883-18779-1-git-send-email-zhongjiang@huawei.com commit d4097f1937f2242d0aa0a7c654d2159a6895e5c8 Author: Arnaldo Carvalho de Melo Date: Tue Oct 8 07:33:08 2019 -0300 perf trace: Introduce --filter for tracepoint events Similar to what is in 'perf record', works just like there: # perf trace -e msr:* 328.297 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888) 328.302 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888) 328.306 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888) 328.317 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888) 328.322 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888) 328.327 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888) 328.331 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888) 328.336 :0/0 msr:write_msr(msr: FS_BASE, val: 140240388381888) 328.340 :0/0 ^Cmsr:write_msr(msr: FS_BASE, val: 140240388381888) # So, for a system wide trace session looking at the write_msr tracepoint we see a flood of MSR_FS_BASE, we need to get the number for that: # grep FS_BASE /tmp/build/perf/trace/beauty/generated/x86_arch_MSRs_array.c [0xc0000100 - x86_64_specific_MSRs_offset] = "FS_BASE", # And then use it in a filter: # perf trace -e msr:* --filter="msr!=0xc0000100" 942.177 :0/0 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 3056931068232) 942.199 :0/0 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 3057135655252) 942.203 :0/0 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 3056931068222) 942.231 :0/0 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 3056998373022) 942.241 :0/0 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 3056931068236) # Ok, lets filter that too, too noisy: # grep TSC_DEADLINE /tmp/build/perf/trace/beauty/generated/x86_arch_MSRs_array.c [0x000006E0] = "IA32_TSC_DEADLINE", # # perf trace -e msr:* --filter="msr!=0xc0000100 && msr!=0x6e0" -a sleep 0.1 0.000 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 0.066 CPU 0/KVM/4895 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) 0.070 CPU 0/KVM/4895 msr:write_msr(msr: 0x830, val: 34359740667) 0.099 CPU 0/KVM/4895 msr:read_msr(msr: IA32_SYSENTER_ESP, val: -2199021993472) 0.100 CPU 0/KVM/4895 msr:read_msr(msr: IA32_APICBASE, val: 4276096000) 0.101 CPU 0/KVM/4895 msr:read_msr(msr: IA32_DEBUGCTLMSR) 0.109 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL) 1.000 :0/0 msr:write_msr(msr: 0x830, val: 17179871485) 18.893 :0/0 msr:write_msr(msr: 0x83f, val: 246) 28.810 :0/0 msr:write_msr(msr: 0x830, val: 68719479037) 40.117 CPU 0/KVM/4895 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) 40.127 CPU 0/KVM/4895 msr:read_msr(msr: IA32_DEBUGCTLMSR) 40.139 CPU 0/KVM/4895 msr:write_msr(msr: LSTAR, val: -2130661312) 40.141 CPU 0/KVM/4895 msr:write_msr(msr: SYSCALL_MASK, val: 14080) 40.142 CPU 0/KVM/4895 msr:write_msr(msr: TSC_AUX) 40.144 CPU 0/KVM/4895 msr:write_msr(msr: KERNEL_GS_BASE) 40.147 CPU 0/KVM/4895 msr:write_msr(msr: IA32_SPEC_CTRL) 40.148 CPU 0/KVM/4895 msr:write_msr(msr: IA32_FLUSH_CMD, val: 1) 40.151 CPU 0/KVM/4895 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) ^C # One can combine that with filtering pids as well: # perf trace -e msr:* --filter="msr!=0xc0000100 && msr!=0x6e0" --filter-pids 4895 -a sleep 0.09 0.000 :0/0 msr:write_msr(msr: 0x830, val: 4294969597) 0.291 gnome-terminal/2790 msr:write_msr(msr: SYSCALL_MASK, val: 292608) 0.294 gnome-terminal/2790 msr:write_msr(msr: LSTAR, val: -1935671280) 0.295 gnome-terminal/2790 msr:write_msr(msr: TSC_AUX, val: 6) 10.940 gnome-terminal/2790 msr:write_msr(msr: 0x830, val: 4294969597) 15.943 gnome-shell/2096 msr:write_msr(msr: 0x830, val: 4294969597) 16.975 :0/0 msr:write_msr(msr: 0x830, val: 4294969597) 19.560 :0/0 msr:write_msr(msr: 0x83f, val: 246) 25.162 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST) 25.807 JS Watchdog/3635 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) 25.820 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL) 25.941 gnome-terminal/2790 msr:write_msr(msr: 0x830, val: 4294969597) 26.941 gnome-terminal/2790 msr:write_msr(msr: 0x830, val: 4294969597) 29.942 gnome-terminal/2790 msr:write_msr(msr: 0x830, val: 4294969597) 45.313 :0/0 msr:write_msr(msr: 0x83f, val: 246) 56.945 gnome-terminal/2790 msr:write_msr(msr: 0x830, val: 4294969597) 60.946 gnome-terminal/2790 msr:write_msr(msr: 0x830, val: 4294969597) 74.096 JS Watchdog/8971 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) 74.130 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL) 79.673 :0/0 msr:write_msr(msr: 0x83f, val: 246) 79.947 gnome-terminal/2790 msr:write_msr(msr: 0x830, val: 17179871485) # Or for just a pid, with callchains: # grep SYSCALL_MAS /tmp/build/perf/trace/beauty/generated/x86_arch_MSRs_array.c [0xc0000084 - x86_64_specific_MSRs_offset] = "SYSCALL_MASK", # perf trace -e msr:* --filter="msr==0xc0000084" --pid 2790 --call-graph=dwarf 0.000 gnome-terminal/2790 msr:write_msr(msr: SYSCALL_MASK, val: 292608) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) kvm_on_user_return ([kvm]) fire_user_return_notifiers ([kernel.kallsyms]) exit_to_usermode_loop ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64 ([kernel.kallsyms]) __GI___poll (inlined) 9299.073 gnome-terminal/2790 msr:write_msr(msr: SYSCALL_MASK, val: 292608) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) kvm_on_user_return ([kvm]) fire_user_return_notifiers ([kernel.kallsyms]) exit_to_usermode_loop ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64 ([kernel.kallsyms]) __GI___poll (inlined) 9348.374 gnome-terminal/2790 msr:write_msr(msr: SYSCALL_MASK, val: 292608) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) kvm_on_user_return ([kvm]) fire_user_return_notifiers ([kernel.kallsyms]) exit_to_usermode_loop ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64 ([kernel.kallsyms]) __GI___poll (inlined) # Ok, just another form of KVM to emit MSRs :-) Next step: elliminate those greps by getting the filter expression, looking for arg names, then for the arrays associated with it to do a reverse lookup. Also allow those filters to be associated with strace-like syscall names. After that: augment the 'val' arg for 'msr:write_msr' based on the first arg, 'msr'. Then, do that with eBPF too, not just with tracepoint filters. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Marcelo Tosatti Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-95bfe5d4tzy5f66bx49d05rj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1827ab5ba8e1d0354cc36b3692444306ced01471 Author: Arnaldo Carvalho de Melo Date: Mon Oct 7 17:00:34 2019 -0300 perf evlist: Introduce append_tp_filter_pid() and append_tp_filter_pids() We'll need this to support 'perf trace e tracepoint --filter=expr', as the command line tracepoint filter is attache to the preceding evsel, just like in 'perf record' and when we go to set pid filters, which we do at the minimum to filter 'perf trace' own syscalls, we need to append, not set the tp filter. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-daynpknni44ywuzi8iua57nn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 53c92f73389d049d72b2e1d1cbc81c007241d422 Author: Arnaldo Carvalho de Melo Date: Mon Oct 7 16:52:17 2019 -0300 perf evlist: Introduce append_tp_filter() method Will be used by 'perf trace' to support 'perf trace --filter', we need to append to any pre-existing filter. When parse_filter() gets invoked to process --filter, it'll set the filter to that specified on the command line, later on, when we filter out 'perf trace' own pid to avoid an event feedback loop, we need to preserve the command line filter put in place by parse_filter(). Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-h9rot08qmxlnfmte0holt68x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 05cea4492c9dd28439cc73de1047ab3b26033736 Author: Arnaldo Carvalho de Melo Date: Mon Oct 7 16:43:03 2019 -0300 perf evlist: Factor out asprintf routine to build a tracepoint pid filter Will be used to append such lists to existing filters. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-798vlyqfqw938ehoe8etivx1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c330ef2847eeedfa9d06f03836dfd4fc6727e855 Author: Arnaldo Carvalho de Melo Date: Mon Oct 7 15:54:51 2019 -0300 perf trace: Associate the "msr" tracepoint arg name with x86_MSR__scnprintf() So that we can go from: # perf trace -e msr:write_msr --max-stack=16 sleep 1 0.000 sleep/6740 msr:write_msr(msr: 3221225728, val: 139636317451648) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) do_arch_prctl_64 ([kernel.kallsyms]) __x64_sys_arch_prctl ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64 ([kernel.kallsyms]) init_tls (/usr/lib64/ld-2.29.so) dl_main (/usr/lib64/ld-2.29.so) _dl_sysdep_start (/usr/lib64/ld-2.29.so) _dl_start (/usr/lib64/ld-2.29.so) # To: # perf trace -e msr:write_msr --max-stack=16 sleep 1 0.000 sleep/8519 msr:write_msr(msr: FS_BASE, val: 139878031705472) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) do_arch_prctl_64 ([kernel.kallsyms]) __x64_sys_arch_prctl ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64 ([kernel.kallsyms]) init_tls (/usr/lib64/ld-2.29.so) dl_main (/usr/lib64/ld-2.29.so) _dl_sysdep_start (/usr/lib64/ld-2.29.so) _dl_start (/usr/lib64/ld-2.29.so) # This, in reverse, will allow for symbolic system call/tracepoint filtering. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-q1q4unmqja5ex7dy0kb5cjaa@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 646b3e2cfbf2d9207b4dbfaade7a28351aa7edeb Author: Arnaldo Carvalho de Melo Date: Mon Oct 7 15:52:19 2019 -0300 perf trace beauty: Add the glue for the autogenerated MSR arrays We need to wrap those autogenerated string arrays with the strarrays__scnprintf() formatter, do it. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-wqjz4kwi4a0ot6lsis3kc65j@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5d88099bc00dccddf5da18e25e1223f01644f7a2 Author: Arnaldo Carvalho de Melo Date: Mon Oct 7 15:50:15 2019 -0300 perf trace: Allow associating scnprintf routines with well known arg names For instance 'msr' appears in several tracepoints, so we can associate it with a single scnprintf() routine auto-generated from kernel headers, as will be done in followup patches. Start with an empty array of associations. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-89ptht6s5fez82lykuwq1eyb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fd21834704a678a583cf294aea47c7ed3fd9d8d2 Author: Arnaldo Carvalho de Melo Date: Thu Sep 26 15:47:16 2019 -0300 perf beauty: Hook up the x86 MSR table generator This way we generate the source with the table for later use by plugins, etc. I.e. after running: $ make -C tools/perf O=/tmp/build/perf We end up with: $ head /tmp/build/perf/trace/beauty/generated/x86_arch_MSRs_array.c static const char *x86_MSRs[] = { [0x00000000] = "IA32_P5_MC_ADDR", [0x00000001] = "IA32_P5_MC_TYPE", [0x00000010] = "IA32_TSC", [0x00000017] = "IA32_PLATFORM_ID", [0x0000001b] = "IA32_APICBASE", [0x00000020] = "KNC_PERFCTR0", [0x00000021] = "KNC_PERFCTR1", [0x00000028] = "KNC_EVNTSEL0", [0x00000029] = "KNC_EVNTSEL1", $ Now its just a matter of using it, first in a libtracevent plugin. At some point we should move tools/perf/trace/beauty to tools/beauty/, so that it can be used more generally and even made available externally like libbpf, libperf, libtraevent, etc. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-b3rmutg4igcohx6kpo67qh4j@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 693d345818e106318710ac150ae252b73765d0fa Author: Arnaldo Carvalho de Melo Date: Thu Sep 26 15:28:02 2019 -0300 perf trace beauty: Add a x86 MSR cmd id->str table generator Without parameters it'll parse tools/arch/x86/include/asm/msr-index.h and output a table usable by tools, that will be wired up later to a libtraceevent plugin registered from perf's glue code: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh static const char *x86_MSRs[] = { [0x00000034] = "SMI_COUNT", [0x0000003a] = "IA32_FEATURE_CONTROL", [0x0000003b] = "IA32_TSC_ADJUST", [0x00000040] = "LBR_CORE_FROM", [0x00000048] = "IA32_SPEC_CTRL", [0x00000049] = "IA32_PRED_CMD", [0x0000010b] = "IA32_FLUSH_CMD", [0x0000010F] = "TSX_FORCE_ABORT", [0x00000198] = "IA32_PERF_STATUS", [0x00000199] = "IA32_PERF_CTL", [0x00000da0] = "IA32_XSS", [0x00000dc0] = "LBR_INFO_0", [0x00000ffc] = "IA32_BNDCFGS_RSVD", }; #define x86_64_specific_MSRs_offset 0xc0000080 static const char *x86_64_specific_MSRs[] = { [0xc0000080 - x86_64_specific_MSRs_offset] = "EFER", [0xc0000081 - x86_64_specific_MSRs_offset] = "STAR", [0xc0000082 - x86_64_specific_MSRs_offset] = "LSTAR", [0xc0000083 - x86_64_specific_MSRs_offset] = "CSTAR", [0xc0000084 - x86_64_specific_MSRs_offset] = "SYSCALL_MASK", [0xc0000103 - x86_64_specific_MSRs_offset] = "TSC_AUX", [0xc0000104 - x86_64_specific_MSRs_offset] = "AMD64_TSC_RATIO", }; #define x86_AMD_V_KVM_MSRs_offset 0xc0010000 static const char *x86_AMD_V_KVM_MSRs[] = { [0xc0010000 - x86_AMD_V_KVM_MSRs_offset] = "K7_EVNTSEL0", [0xc0010114 - x86_AMD_V_KVM_MSRs_offset] = "VM_CR", [0xc0010115 - x86_AMD_V_KVM_MSRs_offset] = "VM_IGNNE", [0xc0010117 - x86_AMD_V_KVM_MSRs_offset] = "VM_HSAVE_PA", [0xc0010240 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTL", [0xc0010241 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTR", [0xc0010280 - x86_AMD_V_KVM_MSRs_offset] = "F15H_PTSC", }; Then these will in turn be hooked up in a follow up patch to be used by strarrays__scnprintf(). Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ja080xawx08kedez855usnon@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8d6505bae391e640aaefd182907e7c1d673af17e Author: Arnaldo Carvalho de Melo Date: Wed Oct 9 11:22:43 2019 -0300 perf beauty: Make strarray's offset be u64 We need it for things like MSRs that are sparse and go over MAXINT. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-g8t2d0jr0mg3yimg2qrjkvlt@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d50341274d013e80d80d33e03f4573a34f4d7277 Author: Swati Sharma Date: Wed Oct 9 12:25:40 2019 +0530 drm/i915/color: move check of gamma_enable to specific func/platform Moved common code to check gamma_enable to specific funcs per platform in bit_precision func. icl doesn't support that and chv has separate enable knob for CGM LUT. v2: -Simplified chv_gamma_precision() [Ville] Signed-off-by: Swati Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191009065542.27415-3-swati2.sharma@intel.com commit 9b000b47cc18fa3b078ce080cbcf84f1a8a497ad Author: Swati Sharma Date: Wed Oct 9 12:25:39 2019 +0530 drm/i915/color: fix broken gamma state-checker during boot Premature gamma lut prepration and loading which was getting reflected in first modeset causing different colors on screen during boot. Issue: In BIOS, gamma is disabled by default. However, legacy read_luts() was setting crtc_state->base.gamma_lut and gamma_lut was programmed with junk values which led to visual artifacts (different colored screens instead of usual black during boot). Fix: Calling read_luts() only when gamma is enabled which will happen after first modeset. This fix is independent from the revert 1b8588741fdc ("Revert "drm/i915/color: Extract icl_read_luts()"") and should fix different colors on screen in legacy platforms too. v2: -Added gamma_enable checks inside read_luts() [Ville/Jani N] -Corrected gamma enable check for CHV [Ville] v3: -Added check in ilk_read_luts() [Ville] -Simplified gamma enable check for CHV [Ville] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111809 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111885 Tested-by: Jani Saarinen Signed-off-by: Swati Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191009065542.27415-2-swati2.sharma@intel.com commit bfef04adb31261a98d8c3010079a46cbe829f531 Author: Lee Shawn C Date: Mon Oct 7 21:51:27 2019 +0800 drm/edid: Select DMT timing if EDID's display feature not support GTF Refer to EDID 1.3 spec, display FEATURE (byte 18h) bit #0 said "If this bit is set to 1, the display supports timings based on the GTF standard using default GTF parameter values". And EDID 1.4 spec shows "If bit 0 is set to 0, then the display is noncontinuous frequency (multi-mode) and is only specified to accept the video timing formats that are listed in BASE EDID and certain EXTENSION Blocks. When display feature did not support CVT or GFT2 and monitor's EDID version greater than or equal to "1.2". DRM driver would select GTF as default for standard timing calculation. It may generated some video timing that can't display properly by external monitor. For example. When driver retrieved "0xD1 0xFC" (FHD, 120Hz) and "0xD1 0xE8" (FHD, 100Hz) from "Standard Timings". GTF formula would generate video timing like below. It already over monitor's spec to cause black screen issue. "1920x1080" 120 368881 1920 2072 2288 2656 1080 1081 1084 1157 0x0 0x6 "1920x1080" 100 301992 1920 2072 2280 2640 1080 1081 1084 1144 0x0 0x6 v2: Just confirm GTF flag and omit the revision check. Cc: Jani Nikula Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Adam Jackson Cc: Cooper Chiou Signed-off-by: Lee Shawn C Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191007135127.9538-1-shawn.c.lee@intel.com commit 9816b4af4351bf9d33c2e635b6f14327823a9c2a Author: Hanna Hawa Date: Mon Sep 23 20:17:40 2019 +0100 EDAC/device: Rework error logging API Make the main workhorse the "count" functions which can log a @count of errors. Have the current APIs edac_device_handle_{ce,ue}() call the _count() variants and this way keep the exported symbols number unchanged. [ bp: Rewrite. ] Signed-off-by: Hanna Hawa Signed-off-by: Borislav Petkov Cc: benh@amazon.com Cc: dwmw@amazon.co.uk Cc: hanochu@amazon.com Cc: James Morse Cc: jonnyc@amazon.com Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: ronenk@amazon.com Cc: talel@amazon.com Cc: Tony Luck Link: https://lkml.kernel.org/r/20190923191741.29322-2-hhhawa@amazon.com commit 5facae4f3549b5cf7c0e10ec312a65ffd43b5726 Author: Qian Cai Date: Thu Sep 19 12:09:40 2019 -0400 locking/lockdep: Remove unused @nested argument from lock_release() Since the following commit: b4adfe8e05f1 ("locking/lockdep: Remove unused argument in __lock_release") @nested is no longer used in lock_release(), so remove it from all lock_release() calls and friends. Signed-off-by: Qian Cai Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Acked-by: Daniel Vetter Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: airlied@linux.ie Cc: akpm@linux-foundation.org Cc: alexander.levin@microsoft.com Cc: daniel@iogearbox.net Cc: davem@davemloft.net Cc: dri-devel@lists.freedesktop.org Cc: duyuyang@gmail.com Cc: gregkh@linuxfoundation.org Cc: hannes@cmpxchg.org Cc: intel-gfx@lists.freedesktop.org Cc: jack@suse.com Cc: jlbec@evilplan.or Cc: joonas.lahtinen@linux.intel.com Cc: joseph.qi@linux.alibaba.com Cc: jslaby@suse.com Cc: juri.lelli@redhat.com Cc: maarten.lankhorst@linux.intel.com Cc: mark@fasheh.com Cc: mhocko@kernel.org Cc: mripard@kernel.org Cc: ocfs2-devel@oss.oracle.com Cc: rodrigo.vivi@intel.com Cc: sean@poorly.run Cc: st@kernel.org Cc: tj@kernel.org Cc: tytso@mit.edu Cc: vdavydov.dev@gmail.com Cc: vincent.guittot@linaro.org Cc: viro@zeniv.linux.org.uk Link: https://lkml.kernel.org/r/1568909380-32199-1-git-send-email-cai@lca.pw Signed-off-by: Ingo Molnar commit e950cca3f3c40902a052a78a36b3fac1f8a62d19 Author: Waiman Long Date: Thu Oct 3 16:36:08 2019 -0400 lib/smp_processor_id: Don't use cpumask_equal() The check_preemption_disabled() function uses cpumask_equal() to see if the task is bounded to the current CPU only. cpumask_equal() calls memcmp() to do the comparison. As x86 doesn't have __HAVE_ARCH_MEMCMP, the slow memcmp() function in lib/string.c is used. On a RT kernel that call check_preemption_disabled() very frequently, below is the perf-record output of a certain microbenchmark: 42.75% 2.45% testpmd [kernel.kallsyms] [k] check_preemption_disabled 40.01% 39.97% testpmd [kernel.kallsyms] [k] memcmp We should avoid calling memcmp() in performance critical path. So the cpumask_equal() call is now replaced with an equivalent simpler check. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Juri Lelli Acked-by: Sebastian Andrzej Siewior Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191003203608.21881-1-longman@redhat.com Signed-off-by: Ingo Molnar commit 8d495477d62e4397207f22a432fcaa86d9f2bc2d Author: Frederic Weisbecker Date: Thu Oct 3 18:17:45 2019 +0200 sched/cputime: Spare a seqcount lock/unlock cycle on context switch On context switch we are locking the vtime seqcount of the scheduling-out task twice: * On vtime_task_switch_common(), when we flush the pending vtime through vtime_account_system() * On arch_vtime_task_switch() to reset the vtime state. This is pointless as these actions can be performed without the need to unlock/lock in the middle. The reason these steps are separated is to consolidate a very small amount of common code between CONFIG_VIRT_CPU_ACCOUNTING_GEN and CONFIG_VIRT_CPU_ACCOUNTING_NATIVE. Performance in this fast path is definitely a priority over artificial code factorization so split the task switch code between GEN and NATIVE and mutualize the parts than can run under a single seqcount locked block. As a side effect, vtime_account_idle() becomes included in the seqcount protection. This happens to be a welcome preparation in order to properly support kcpustat under vtime in the future and fetch CPUTIME_IDLE without race. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191003161745.28464-3-frederic@kernel.org Signed-off-by: Ingo Molnar commit f83eeb1a01689b2691f6f56629ac9f66de8d41c2 Author: Frederic Weisbecker Date: Thu Oct 3 18:17:44 2019 +0200 sched/cputime: Rename vtime_account_system() to vtime_account_kernel() vtime_account_system() decides if we need to account the time to the system (__vtime_account_system()) or to the guest (vtime_account_guest()). So this function is a misnomer as we are on a higher level than "system". All we know when we call that function is that we are accounting kernel cputime. Whether it belongs to guest or system time is a lower level detail. Rename this function to vtime_account_kernel(). This will clarify things and avoid too many underscored vtime_account_system() versions. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Yauheni Kaliuta Link: https://lkml.kernel.org/r/20191003161745.28464-2-frederic@kernel.org Signed-off-by: Ingo Molnar commit d46e137c44974938bc08700000a4b1231491ca8a Author: Colin Ian King Date: Wed Oct 9 11:00:24 2019 +0100 drm/i915/selftests: fix null pointer dereference on pointer data In the case where data fails to be allocated the error exit path is via label 'out' where data is dereferenced in a for-loop. Fix this by exiting via the label 'out_file' instead to avoid the null pointer dereference. Addresses-Coverity: ("Dereference after null check") Fixes: 50d16d44cce4 ("drm/i915/selftests: Exercise context switching in parallel") Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191009100024.23077-1-colin.king@canonical.com commit b406357c572b29cdcf05f717c69ae0018fa6a146 Author: Christian Kellner Date: Thu Oct 3 19:32:40 2019 +0200 thunderbolt: Add 'generation' attribute for devices The Thunderbolt standard went through several major iterations, here called generation. USB4, which will be based on Thunderbolt, will be generation 4. Let userspace know the generation of the controller in the devices in order to distinguish between Thunderbolt and USB4, so it can be shown in various user interfaces. Signed-off-by: Christian Kellner Signed-off-by: Mika Westerberg commit ad4abed36433a4fc18d21c0f0eaede84006f219f Author: Stephen Boyd Date: Tue Oct 8 16:52:12 2019 -0700 ASoC: jz4740: Remove unused match variable After commit 67ad656bdd70 ("ASoC: jz4740: Use of_device_get_match_data()"), the match local variable is unused and the compiler rightly warns. sound/soc/jz4740/jz4740-i2s.c: In function 'jz4740_i2s_dev_probe': sound/soc/jz4740/jz4740-i2s.c:500:29: warning: unused variable 'match' [-Wunused-variable] 500 | const struct of_device_id *match; Drop it. Reported-by: Stephen Rothwell Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Paul Cercueil Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Rob Herring Cc: Frank Rowand Cc: Fixes: 67ad656bdd70 ("ASoC: jz4740: Use of_device_get_match_data()") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20191008235212.228856-1-swboyd@chromium.org Signed-off-by: Mark Brown commit 95873fba06ae39e4042647dec9c1138c0109ce7b Author: Jonathan Neuschäfer Date: Fri Oct 4 18:40:56 2019 +0200 docs: driver-api: bt8xxgpio: Revive dead link www.bu3sch.de has been unusable for several years, but the same information is available on bues.ch. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20191004164059.10397-2-j.neuschaefer@gmx.net Acked-by: Michael Büsch Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Linus Walleij commit 5f07224e0fae2a7d475eb21a79ee5a08251d9c44 Author: Jonathan Neuschäfer Date: Fri Oct 4 18:40:55 2019 +0200 docs: driver-api: Move bt8xxgpio to the gpio directory Let's declutter Documentation/driver-api a bit. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20191004164059.10397-1-j.neuschaefer@gmx.net Signed-off-by: Linus Walleij commit 631005b255aab5f846f7ca03606613f898d70207 Author: CK Hu Date: Wed Oct 9 16:37:47 2019 +0800 drm/mediatek: add no_clk into ddp private data Mutex has no clock in some SoC, so add no_clk in private data and get clock according to no_clk. Signed-off-by: CK Hu commit 1037edf20cb6c75b3d283866048632467f6790e5 Author: Yongqiang Niu Date: Thu Aug 29 22:50:32 2019 +0800 drm/mediatek: add mutex sof register offset into ddp private data mutex sof register offset will be private data of ddp Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit 1c7da0c76238b23739fca3a751f131de71e7213f Author: Yongqiang Niu Date: Thu Aug 29 22:50:31 2019 +0800 drm/mediatek: add mutex sof into ddp private data mutex sof will be ddp private data Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit d730af989e99610b1d79b9dae21758343ab7233d Author: Yongqiang Niu Date: Thu Aug 29 22:50:30 2019 +0800 drm/mediatek: add mutex mod register offset into ddp private data mutex mod register offset will be private data of ddp. Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit 0d3a120286f48662d73533cc246199a40395823b Author: Yongqiang Niu Date: Thu Aug 29 22:50:29 2019 +0800 drm/mediatek: add mutex mod into ddp private data except mutex mod, mutex mod reg,mutex sof reg, and mutex sof id will be ddp private data Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit 412b1e463ec3200970218d7c23bd4310da55b894 Author: Yongqiang Niu Date: Thu Aug 29 22:50:44 2019 +0800 drm/mediatek: add ovl0/ovl_2l0 usecase This patch add ovl0/ovl_2l0 usecase in ovl->ovl_2l0 direct link usecase: 1. the crtc support layer number will 4+2 2. ovl_2l0 background color input select ovl0 when crtc init and disable it when crtc finish 3. config ovl_2l0 layer, if crtc config layer number is bigger than ovl0 support layers(max is 4) Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit 57148baac8b78461e394953cfd5317bde8f795ab Author: Yongqiang Niu Date: Thu Aug 29 22:50:45 2019 +0800 drm/mediatek: distinguish ovl and ovl_2l by layer_nr distinguish ovl and ovl_2l by layer_nr when get comp id Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit 318462d1a568634ba09263cc730cb0fb1d56c2b3 Author: Yongqiang Niu Date: Thu Aug 29 22:50:43 2019 +0800 drm/mediatek: add background color input select function for ovl/ovl_2l This patch add background color input select function for ovl/ovl_2l ovl include 4 DRAM layer and 1 background color layer ovl_2l include 4 DRAM layer and 1 background color layer DRAM layer frame buffer data from render hardware, GPU for example. backgournd color layer is embed in ovl/ovl_2l, we can only set it color, but not support DRAM frame buffer. for ovl0->ovl0_2l direct link usecase, we need set ovl0_2l background color intput select from ovl0 if render send DRAM buffer layer number <=4, all these layer read by ovl. layer0 is at the bottom of all layers. layer3 is at the top of all layers. if render send DRAM buffer layer numbfer >=4 && <=6 ovl0 read layer0~3 ovl0_2l read layer4~5 layer5 is at the top ot all these layers. the decision of how to setting ovl0/ovl0_2l read these layer data is controlled in mtk crtc, which will be another patch Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit 132c6e250ed745443973cada8db17cdbaebdf551 Author: Yongqiang Niu Date: Thu Aug 29 22:50:42 2019 +0800 drm/mediatek: add function to background color input select for ovl/ovl_2l direct link This patch add function to background color input select for ovl/ovl_2l direct link for ovl/ovl_2l direct link usecase, we need set background color input select for these hardware. This is preparation patch for ovl/ovl_2l usecase. Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit 0a5ccda42033517c463749737bc9b81c52239e16 Author: Yongqiang Niu Date: Thu Aug 29 22:50:41 2019 +0800 drm/medaitek: add layer_nr for ovl private data This patch add layer_nr for ovl private data ovl_2l almost same with with ovl hardware, except the layer number for ovl_2l is 2 and ovl is 4. this patch is a preparation for ovl-2l and ovl share the same driver. Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit d5abb5f2144a8f54e599eaf57dfac7864e130dcc Author: Yongqiang Niu Date: Thu Aug 29 22:50:40 2019 +0800 drm/mediatek: add gmc_bits for ovl private data This patch add gmc_bits for ovl private data GMC register was set RDMA ultra and pre-ultra threshold. 10bit GMC register define is different with other SOC, gmc_thrshd_l not used. Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit dd8feb2262d988ee870224c27264ef2163579f9c Author: Yongqiang Niu Date: Thu Aug 29 22:50:38 2019 +0800 drm/mediatek: add component OVL_2L1 This patch add component OVL_2L1 Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit b17bdd0d7a733caf0b794af7db9fd07a57d450fd Author: Yongqiang Niu Date: Thu Aug 29 22:50:37 2019 +0800 drm/mediatek: add component OVL_2L0 This patch add component OVL_2L0 Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit ac8efe4f4a84c6bf59237f77a5db65410bf20241 Author: zhengbin Date: Tue Oct 8 10:01:40 2019 +0800 rtlwifi: rtl8192ee: Remove set but not used variable 'cur_tx_wp' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c: In function rtl92ee_is_tx_desc_closed: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c:1005:18: warning: variable cur_tx_wp set but not used [-Wunused-but-set-variable] It is not used since commit cf54622c8076 ("rtlwifi: cleanup the code that check whether TX ring is available") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 314bf64d1266abe7aaccffb24f876ff7de261bf5 Author: Colin Ian King Date: Mon Oct 7 14:53:13 2019 +0100 rtl8xxxu: make arrays static, makes object smaller Don't populate const arrays on the stack but instead make them static. Makes the object code smaller by 60 bytes. Before: text data bss dec hex filename 15133 8768 0 23901 5d5d realtek/rtl8xxxu/rtl8xxxu_8192e.o 15209 6392 0 21601 5461 realtek/rtl8xxxu/rtl8xxxu_8723b.o 103254 31202 576 135032 20f78 realtek/rtl8xxxu/rtl8xxxu_core.o After: text data bss dec hex filename 14861 9024 0 23885 5d4d realtek/rtl8xxxu/rtl8xxxu_8192e.o 14953 6616 0 21569 5441 realtek/rtl8xxxu/rtl8xxxu_8723b.o 102986 31458 576 135020 20f6c realtek/rtl8xxxu/rtl8xxxu_core.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit 55047fb783e0f5b13fc79653f09a06782c3ffe18 Author: Colin Ian King Date: Mon Oct 7 14:41:13 2019 +0100 iwlegacy: make array interval static, makes object smaller Don't populate the array interval on the stack but instead make it static. Makes the object code smaller by 121 bytes. Before: text data bss dec hex filename 167797 29676 448 197921 30521 wireless/intel/iwlegacy/common.o After: text data bss dec hex filename 167580 29772 448 197800 304a8 wireless/intel/iwlegacy/common.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit be10b09b278fcd64e79e232c88d9152c6f5c2923 Author: Dan Carpenter Date: Mon Oct 7 11:48:05 2019 +0300 rtw88: Fix an error message The WARN_ON() macro doesn't take an error message, the argument is a condition so this won't display the warning message. Fixes: 27e117e4b01b ("rtw88: add deep power save support") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit e542e66b7c2ee2adeefdbb7f259f2f60cadf2819 Author: Chris Chiu Date: Sat Oct 5 17:48:26 2019 +0800 rtl8xxxu: add bluetooth co-existence support for single antenna The RTL8723BU suffers the wifi disconnection problem while bluetooth device connected. While wifi is doing tx/rx, the bluetooth will scan without results. This is due to the wifi and bluetooth share the same single antenna for RF communication and they need to have a mechanism to collaborate. BT information is provided via the packet sent from co-processor to host (C2H). It contains the status of BT but the rtl8723bu_handle_c2h dose not really handle it. And there's no bluetooth coexistence mechanism to deal with it. This commit adds a workqueue to set the tdma configurations and coefficient table per the parsed bluetooth link status and given wifi connection state. The tdma/coef table comes from the vendor driver code of the RTL8192EU and RTL8723BU. However, this commit is only for single antenna scenario which RTL8192EU is default dual antenna. The rtl8xxxu_parse_rxdesc24 which invokes the handle_c2h is only for 8723b and 8192e so the mechanism is expected to work on both chips with single antenna. Note RTL8192EU dual antenna is not supported. Signed-off-by: Chris Chiu Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo commit d10dcb615c8e29d403a24d35f8310a7a53e3050c Author: Navid Emamdoost Date: Fri Oct 4 15:16:48 2019 -0500 mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release for skb and card->evtbd_ring_vbase is added. Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines") Signed-off-by: Navid Emamdoost Acked-by: Ganapathi Bhat Signed-off-by: Kalle Valo commit db8fd2cde93227e566a412cf53173ffa227998bc Author: Navid Emamdoost Date: Fri Oct 4 15:08:52 2019 -0500 mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf In mwifiex_pcie_alloc_cmdrsp_buf, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release is added. Fixes: fc3314609047 ("mwifiex: use pci_alloc/free_consistent APIs for PCIe") Signed-off-by: Navid Emamdoost Acked-by: Ganapathi Bhat Signed-off-by: Kalle Valo commit 39e50f5ce26c0aa413cf2a680a401a35ec6508bf Author: Johan Hovold Date: Fri Oct 4 16:44:22 2019 +0200 rsi: drop bogus device-id checks from probe USB core will never call a USB-driver probe function with a NULL device-id pointer. Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit c5dcf8f0e850a504235a0af51f73d51b6ddc0933 Author: Johan Hovold Date: Fri Oct 4 16:44:21 2019 +0200 Revert "rsi: fix potential null dereference in rsi_probe()" This reverts commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0. USB core will never call a USB-driver probe function with a NULL device-id pointer. Reverting before removing the existing checks in order to document this and prevent the offending commit from being "autoselected" for stable. Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit 4614239cba34b28cb2d95d60c6f4498f39e533dd Author: zhengbin Date: Fri Oct 4 16:43:55 2019 +0800 rtlwifi: rtl8723: Remove set but not used variable 'own' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c: In function rtl8723_cmd_send_packet: drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c:226:5: warning: variable own set but not used [-Wunused-but-set-variable] It is not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit aab7541a5a8b85ee2f46dc4d5d4ace6174bb9c5d Author: zhengbin Date: Fri Oct 4 16:43:54 2019 +0800 rtlwifi: btcoex: Remove set but not used variables 'wifi_busy','bt_info_ext' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c: In function btc8723b1ant_tdma_dur_adj_for_acl: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1428:7: warning: variable wifi_busy set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c: In function btc8723b1ant_tdma_dur_adj_for_acl: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1427:22: warning: variable bt_info_ext set but not used [-Wunused-but-set-variable] 'wifi_busy' is not used since commit 158707f9584c ("rtlwifi: btcoex: Restore 23b 1ant routine for tdma adjustment") 'bt_info_ext' is not used since commit 2622d7d86a57 ("rtlwifi: btcoex: 23b 1ant: TDMA duration for ACL busy") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit e25076070201b826fbbcdb0e3fe554e905601d8f Author: zhengbin Date: Fri Oct 4 16:43:53 2019 +0800 rtlwifi: btcoex: Remove set but not used variable 'result' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c: In function btc8192e2ant_tdma_duration_adjust: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c:1584:6: warning: variable result set but not used [-Wunused-but-set-variable] It is not used since commit 27a31a60a4de ("rtlwifi: btcoex: remove unused functions") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 073f8138f598433e7bf8b79a312b2f0d71c16141 Author: zhengbin Date: Fri Oct 4 16:43:52 2019 +0800 rtlwifi: rtl8188ee: Remove set but not used variable 'h2c_parameter' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c: In function rtl88e_dm_pwdb_monitor: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c:763:6: warning: variable h2c_parameter set but not used [-Wunused-but-set-variable] It is not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 925942b5da0959c7e3a56e6651f2e38999fa3293 Author: zhengbin Date: Fri Oct 4 16:43:51 2019 +0800 rtlwifi: rtl8188ee: Remove set but not used variables 'v3','rtstatus','reg_ecc','reg_ec4','reg_eac','b_pathb_ok' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c: In function phy_config_bb_with_pghdr: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:652:22: warning: variable v3 set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c: In function rtl88e_phy_config_rf_with_headerfile: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:772:7: warning: variable rtstatus set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c: In function rtl88e_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:1945:6: warning: variable reg_ecc set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c: In function rtl88e_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:1944:61: warning: variable reg_ec4 set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c: In function rtl88e_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:1944:34: warning: variable reg_eac set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c: In function rtl88e_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:1943:19: warning: variable b_pathb_ok set but not used [-Wunused-but-set-variable] They are not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit a003aec306c8175b31ecc06d5c7d9decd4a82797 Author: zhengbin Date: Fri Oct 4 16:43:50 2019 +0800 rtlwifi: rtl8192c: Remove set but not used variables 'reg_ecc','reg_eac' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c: In function rtl92c_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c:1373:6: warning: variable reg_ecc set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c: In function rtl92c_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c:1372:34: warning: variable reg_eac set but not used [-Wunused-but-set-variable] They are not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit a3e017fd8932ee4e01a01fea3cda63b451bc0558 Author: zhengbin Date: Fri Oct 4 16:43:49 2019 +0800 rtlwifi: rtl8723ae: Remove set but not used variables 'reg_ecc','reg_ec4','reg_eac','b_pathb_ok' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c: In function rtl8723e_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:1346:6: warning: variable reg_ecc set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c: In function rtl8723e_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:1345:61: warning: variable reg_ec4 set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c: In function rtl8723e_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:1345:34: warning: variable reg_eac set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c: In function rtl8723e_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:1344:19: warning: variable b_pathb_ok set but not used [-Wunused-but-set-variable] They are not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 0fc44cd4c480bf10c8c530ee043849346999225d Author: zhengbin Date: Fri Oct 4 16:43:48 2019 +0800 rtlwifi: rtl8821ae: Remove set but not used variables 'rtstatus','bd' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c: In function rtl8812ae_phy_config_rf_with_headerfile: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:2079:7: warning: variable rtstatus set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c: In function rtl8821ae_phy_config_rf_with_headerfile: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:2114:7: warning: variable rtstatus set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c: In function _rtl8812ae_phy_get_txpower_limit: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:2354:6: warning: variable bd set but not used [-Wunused-but-set-variable] They are not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit a9bb0b51577835d26054d080c59935be8b7e44f4 Author: Chris Chiu Date: Wed Oct 2 20:18:07 2019 +0800 rtl8xxxu: Improve TX performance of RTL8723BU on rtl8xxxu driver We have 3 laptops which connect the wifi by the same RTL8723BU. The PCI VID/PID of the wifi chip is 10EC:B720 which is supported. They have the same problem with the in-kernel rtl8xxxu driver, the iperf (as a client to an ethernet-connected server) gets ~1Mbps. Nevertheless, the signal strength is reported as around -40dBm, which is quite good. From the wireshark capture, the tx rate for each data and qos data packet is only 1Mbps. Compare to the Realtek driver at https://github.com/lwfinger/rtl8723bu, the same iperf test gets ~12Mbps or better. The signal strength is reported similarly around -40dBm. That's why we want to improve. After reading the source code of the rtl8xxxu driver and Realtek's, the major difference is that Realtek's driver has a watchdog which will keep monitoring the signal quality and updating the rate mask just like the rtl8xxxu_gen2_update_rate_mask() does if signal quality changes. And this kind of watchdog also exists in rtlwifi driver of some specific chips, ex rtl8192ee, rtl8188ee, rtl8723ae, rtl8821ae...etc. They have the same member function named dm_watchdog and will invoke the corresponding dm_refresh_rate_adaptive_mask to adjust the tx rate mask. With this commit, the tx rate of each data and qos data packet will be 39Mbps (MCS4) with the 0xF00000 as the tx rate mask. The 20th bit to 23th bit means MCS4 to MCS7. It means that the firmware still picks the lowest rate from the rate mask and explains why the tx rate of data and qos data is always lowest 1Mbps because the default rate mask passed is always 0xFFFFFFF ranges from the basic CCK rate, OFDM rate, and MCS rate. However, with Realtek's driver, the tx rate observed from wireshark under the same condition is almost 65Mbps or 72Mbps, which indicating that rtl8xxxu could still be further improved. Signed-off-by: Chris Chiu Reviewed-by: Daniel Drake Acked-by: Jes Sorensen Signed-off-by: Kalle Valo commit 450aa87c7353d1e4c84fef77f57ca173c84cc172 Author: Yongqiang Niu Date: Thu Aug 29 22:50:39 2019 +0800 drm/mediatek: add component DITHER This patch add component DITHER Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit ce1ad03656bc35ae833e5344aca44e4069bd2de7 Author: Colin Ian King Date: Fri Oct 4 17:21:56 2019 +0100 drm/komeda: remove redundant assignment to pointer disable_done The pointer disable_done is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20191004162156.325-1-colin.king@canonical.com commit 14e8c535ff684876d1be9dae475fe666b97c04a9 Author: Randy Dunlap Date: Tue Oct 8 13:40:21 2019 -0700 gpio: fix kernel-doc for of_gpio_need_valid_mask() Fix kernel-doc for of_gpio_need_valid_mask(). Fixes this warning and uses correct Return: format. ../drivers/gpio/gpiolib-of.c:92: warning: Excess function parameter 'dev' description in 'of_gpio_need_valid_mask' Fixes: f626d6dfb709 ("gpio: of: Break out OF-only code") Signed-off-by: Randy Dunlap Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Link: https://lore.kernel.org/r/6c5d22c8-6e27-3314-9c46-701d932b11a6@infradead.org Signed-off-by: Linus Walleij commit cefb6abfcc1cb49e21966117c5d881887a5cd4b8 Author: Yongqiang Niu Date: Thu Aug 29 22:50:36 2019 +0800 drm/mediatek: add ddp component CCORR This patch add ddp component CCORR Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit 41f0bc49f7f2014feab8b278fea2adaea6ccaf4e Author: Chris Wilson Date: Wed Oct 9 07:17:59 2019 +0100 drm/i915/selftests: Hold request reference over waits Take a reference on the request before submitting it to the HW and then waiting on it for selftest_workarounds. Once submitted, the request may be freed by a background worker, unless we take an extra reference for ourselves. References: https://bugs.freedesktop.org/show_bug.cgi?id=111926 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191009061759.3189-1-chris@chris-wilson.co.uk commit 46d2f6d0c99f7f95600e633c7dc727745faaf95e Author: Marek Behún Date: Wed Sep 4 19:07:39 2019 +0200 arm64: dts: armada-3720-turris-mox: add firmware node Add the node representing the firmware running on the secure processor. Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT commit 447b8789359f9a5e6567c4044d18abaa7de68930 Author: Tomasz Maciej Nowak Date: Mon Jun 3 17:53:54 2019 +0200 arm64: dts: marvell: add ESPRESSObin variants This commit adds dts for different variants of ESPRESSObin board: ESPRESSObin with soldered eMMC, ESPRESSObin V7, compared to prior versions some passive elements changed and ethernet ports labels positions have been reversed, ESPRESSObin V7 with soldered eMMC. Since most of elements are the same, one common dtsi is created and referenced in each dts of particular variant. Signed-off-by: Tomasz Maciej Nowak Signed-off-by: Gregory CLEMENT commit e1bd6ca9f8be4ec14149d01baf27583bbb5c740b Author: Grzegorz Jaszczyk Date: Fri Oct 4 16:27:38 2019 +0200 arm64: dts: marvell: Add support for Marvell CN9132-DB Extend the support of the CN9131 with yet another additional CP115. The last number indicates how many external CP115 are used. New available interfaces: * CP2 CRYPTO-0 (disabled) * CP2 ETH-0 (SFI, problem with the SFP cage, disabled) * CP2 GPIO-1 * CP2 GPIO-2 * CP2 I2C-0 * CP2 PCIe-0 x2 * CP2 PCIe-2 x1 (disabled) * CP2 SDHCI-0 * CP2 USB3-1 (High-speed) Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit fe5e610f16a3e210e4f9e56b370dcbb8cb547e76 Author: Grzegorz Jaszczyk Date: Fri Oct 4 16:27:37 2019 +0200 arm64: dts: marvell: Add support for Marvell CN9131-DB Extend the support of the CN9130 by adding an external CP115. The last number indicates how many external CP115 are used. New available interfaces: * CP1 CRYPTO-0 (disabled) * CP1 ETH-0 (SFI, problem with the SFP cage, disabled) * CP1 GPIO-1 * CP1 GPIO-2 * CP1 I2C-0 * CP1 PCIe-0 x2 * CP1 SPI-1 * CP1 SATA-0-1 * CP1 USB3-1 Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 8aeca97bd4c6745191a5fe2e42ca178d697fae1e Author: Grzegorz Jaszczyk Date: Fri Oct 4 16:27:36 2019 +0200 arm64: dts: marvell: Add support for Marvell CN9130-DB Add basic support for the Marvell CN9130 modular development board. It is based on a CN9130 SoC (one AP807 and one internal CP115), extended via 2xMoCi interface to possibly add up to two more external CP115 (one located on the main board and the other on the board extension). Available interfaces: * AP UART * AP eMMC * AP SDHCI (disabled) * CPO GPIO-0 * CPO GPIO-1 * CP0 CRYPTO-0 (disabled) * CP0 I2C-0 * CP0 I2C-1 * CP0 SDHCI-0 * CP0 NAND-0 * CP0 SPI-1 * CP0 ETH-0 (SFI with SFP cage not working yet, disabled) * CP0 ETH-1 (RGMII) * CP0 ETH-2 (RGMII) * CP0 SATA-0-1 * CP0 USB3-0 (High-speed only) * CP0 USB3-1 (High-speed only) * CP0 PCIe-0 x4 Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 6b8970bd8d7a17a648e31f3996d9b21336b4a2cf Author: Miquel Raynal Date: Fri Oct 4 16:27:35 2019 +0200 arm64: dts: marvell: Add support for Marvell CN9130 SoC support A CN9130 SoC has one AP807 and one internal CP115. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 96bb4b31aa660e39fca2bb464b9a9f399bd5b71c Author: Miquel Raynal Date: Fri Oct 4 16:27:32 2019 +0200 arm64: dts: marvell: Add support for CP115 Create a DTSI file based on the CP11x one. Differences will be described in the near future. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 5f07b26e85dc86f017833ea745ff4e5b420280cd Author: Miquel Raynal Date: Fri Oct 4 16:27:31 2019 +0200 arm64: dts: marvell: Externalize PCIe macros from CP11x file PCIe macros are specific to CP110 and will not fit CP115 constraints. To keep the same way the files are organized, just move some macros out of the CP11x generic file and define them directly in SoC DTSI, instead of defining single addresses in the SoC DTSI and reusing them in macros. In the end: * CP11X_PCIE_MEM_BASE SoC define is dropped * CP11X_PCIEx_MEM_BASE is moved out of the generic DT to be put in the SoC files as it replaces the above definition. * As the CP11X_PCIEx_MEM_SIZE macro is also subject to change with newer SoCs, we put it in the SoC files as well. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 1399672e48b573f6526b9ac78cfd50314f0b01a6 Author: Miquel Raynal Date: Fri Oct 4 16:27:30 2019 +0200 arm64: dts: marvell: Drop PCIe I/O ranges from CP11x file As an example, Armada 70x0 and 80x0 SoC 0xf9000000 region points to RUNIT/SPICS0 while it is referenced in the DT as PCIe I/O memory range. This shows that I/O memory has never been used/working on the old SoCs despite the region being advertised. As PCIe I/O ranges will not be supported in newer SoCs using CP11x co-processors, let's simply drop them. It is not harmful in any case as PCIe device drivers can do it all with the regular mapped memory anyway. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 47cf40af64c35a69ef6a193c47768ad1bda29db2 Author: Miquel Raynal Date: Fri Oct 4 16:27:29 2019 +0200 arm64: dts: marvell: Prepare the introduction of CP115 CP110 and CP115 are almost the same in terms of features and have a very limited set of differences. Let's create an armada-cp11x.dtsi file which will be used to instantiate both CP110 and CP115 nodes. The only changes between the two armada-cp11{0,x}.dtsi files are the following naming in macros: s/CP110/CP11X/. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 2bc26088ba37d4f2a4b8bd813ee757992522d082 Author: Miquel Raynal Date: Fri Oct 4 16:27:28 2019 +0200 arm64: dts: marvell: Fix CP110 NAND controller node multi-line comment alignment Fix this tiny typo before renaming/changing this file. Fixes: 72a3713fadfd ("arm64: dts: marvell: de-duplicate CP110 description") Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 30d53abdc60a6515f02f181e7c39b7b23d5fb3aa Author: Grzegorz Jaszczyk Date: Fri Oct 4 16:27:27 2019 +0200 arm64: dts: marvell: Add AP807-quad cache description Adding appropriate entries to device-tree allows the cache description to show up in sysfs under: /sys/devices/system/cpu/cpuX/cache/. Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 760cabcd6ad23956542f953e5a617a8e0a81a792 Author: Grzegorz Jaszczyk Date: Fri Oct 4 16:27:26 2019 +0200 arm64: dts: marvell: Add AP806-quad cache description Adding appropriate entries to device-tree allows the cache description to show up in sysfs under: /sys/devices/system/cpu/cpuX/cache/. Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit ddda843324f7d9a730fefcbefae3a575eb1a1bdf Author: Grzegorz Jaszczyk Date: Fri Oct 4 16:27:25 2019 +0200 arm64: dts: marvell: Add AP806-dual cache description Adding appropriate entries to device-tree allows the cache description to show up in sysfs under: /sys/devices/system/cpu/cpuX/cache/. Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit cbafcad0641e99831ff7c57ac8f79aed502f33e5 Author: Miquel Raynal Date: Fri Oct 4 16:27:24 2019 +0200 arm64: dts: marvell: Add support for AP807/AP807-quad Describe AP807 and AP807-quad support. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 6a380172f171d81259e90ddc99d25fec20e56e1e Author: Grzegorz Jaszczyk Date: Fri Oct 4 16:27:34 2019 +0200 dt-bindings: marvell: Declare the CN913x SoC compatibles Describe the compatible properties for the new Marvell SoCs: * CN9130: 1x AP807-quad + 1x CP115 (1x embedded) * CN9131: 1x AP807-quad + 2x CP115 (1x embedded + 1x modular) * CN9132: 1x AP807-quad + 3x CP115 (1x embedded + 2x modular) CP115 are similar to CP110 in terms of features. There are three development boards based on these SoCs: * CN9130-DB: comes as a single mother board (with the CP115 bundled) * CN9131-DB: same as CN9130-DB with one additional modular CP115 * CN9132-DB: same as CN9130-DB with two additional modular CP115 Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Gregory CLEMENT commit e1e42ae4ca2a3f16b0f9da4149e3e2f5fe169e6d Author: Miquel Raynal Date: Fri Oct 4 16:27:33 2019 +0200 dt-bindings: marvell: Convert the SoC compatibles description to YAML Convert the file detailing Marvell EBU compatibles to json-schema. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Gregory CLEMENT commit 4f267f2a806b556678b84c4d80c2f4bff8d000d9 Author: Miquel Raynal Date: Fri Oct 4 16:27:23 2019 +0200 arm64: dts: marvell: Move clocks to AP806 specific file Regular clocks and CPU clocks are specific to AP806, move them out of the generic AP80x file so that AP807 can use its own clocks. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 7409b155562cc19b929b57692b334c5758ffc75d Author: Konstantin Porotchkin Date: Fri Oct 4 16:27:22 2019 +0200 arm64: dts: marvell: Prepare the introduction of AP807 based SoCs Prepare the support for Marvell AP807 die. This die is very similar to AP806 but uses different DDR PHY. AP807 is a major component of CN9130 SoC series. Signed-off-by: Konstantin Porotchkin Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit ad7fd0e8038c9339499a52472595157000e818c7 Author: Miquel Raynal Date: Fri Oct 4 16:27:21 2019 +0200 MAINTAINERS: Add new Marvell CN9130-based files to track Marvell has a new branch of products called CN9130 based on AP807 and CP115 which are derivatives of the currently supported AP806 and CP110. Update the MAINTAINERS entry to reflect this change in the naming. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 2537831bbc19bbc797366d72a5a71c4383d64c8b Author: Ben Peled Date: Fri Oct 4 16:27:20 2019 +0200 dt-bindings: ap80x: replace AP806 with AP80x Rename the text file and update "AP806" into "AP806/AP807" where relevant. Signed-off-by: Ben Peled Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Gregory CLEMENT commit e231c6d47cca4b5df51bcf72dec1af767e63feaf Author: Miquel Raynal Date: Fri Oct 4 16:27:19 2019 +0200 arm64: dts: marvell: Add AP806-dual missing CPU clocks CPU clocks have been added to AP806-quad but not to the -dual variant. Fixes: c00bc38354cf ("arm64: dts: marvell: Add cpu clock node on Armada 7K/8K") Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit fd1ac07f3f17fbbc2f08e3b43951bed937d86a7b Author: Alexey Dobriyan Date: Fri Oct 4 00:21:57 2019 +0300 xfrm: ifdef setsockopt(UDP_ENCAP_ESPINUDP/UDP_ENCAP_ESPINUDP_NON_IKE) If IPsec is not configured, there is no reason to delay the inevitable. Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert commit bacb7e1855969bba78b32302453d2cc8ba0bc403 Author: Eric Dumazet Date: Tue Oct 8 14:20:34 2019 -0700 Revert "tun: call dev_get_valid_name() before register_netdevice()" This reverts commit 0ad646c81b2182f7fa67ec0c8c825e0ee165696d. As noticed by Jakub, this is no longer needed after commit 11fc7d5a0a2d ("tun: fix memory leak in error path") This no longer exports dev_get_valid_name() for the exclusive use of tun driver. Suggested-by: Jakub Kicinski Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 6ea67769ff33018195e3ec2a610b8ecc03efe504 Author: Jiri Pirko Date: Tue Oct 8 13:01:51 2019 +0200 net: tipc: prepare attrs in __tipc_nl_compat_dumpit() __tipc_nl_compat_dumpit() calls tipc_nl_publ_dump() which expects the attrs to be available by genl_dumpit_info(cb)->attrs. Add info struct and attr parsing in compat dumpit function. Reported-by: syzbot+8d37c50ffb0f52941a5e@syzkaller.appspotmail.com Fixes: 057af7071344 ("net: tipc: have genetlink code to parse the attrs during dumpit") Signed-off-by: Jiri Pirko Acked-by: Jon Maloy Signed-off-by: Jakub Kicinski commit ab5b526da0485ac4af3d395e5ce1c04b1bfbb89c Author: Jiri Pirko Date: Tue Oct 8 12:31:43 2019 +0200 net: genetlink: always allocate separate attrs for dumpit ops Individual dumpit ops (start, dumpit, done) are locked by genl_lock if !family->parallel_ops. However, multiple genl_family_rcv_msg_dumpit() calls may in in flight in parallel. Each has a separate struct genl_dumpit_info allocated but they share the same family->attrbuf. Fix this by allocating separate memory for attrs for dumpit ops, for non-parallel_ops (for parallel_ops it is done already). Reported-by: syzbot+495688b736534bb6c6ad@syzkaller.appspotmail.com Reported-by: syzbot+ff59dc711f2cff879a05@syzkaller.appspotmail.com Reported-by: syzbot+dbe02e13bcce52bcf182@syzkaller.appspotmail.com Reported-by: syzbot+9cb7edb2906ea1e83006@syzkaller.appspotmail.com Fixes: bf813b0afeae ("net: genetlink: parse attrs and store in contect info struct during dumpit") Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 89da2ba947b1080199f4a6413686569a75fc2e7d Author: YueHaibing Date: Tue Oct 8 15:16:14 2019 +0800 soc: qcom: Fix llcc-qcom definitions to include commit 99356b03b431 ("soc: qcom: Make llcc-qcom a generic driver") move these out of llcc-qcom.h, make the building fails: drivers/edac/qcom_edac.c:86:40: error: array type has incomplete element type struct llcc_edac_reg_data static const struct llcc_edac_reg_data edac_reg_data[] = { ^~~~~~~~~~~~~ drivers/edac/qcom_edac.c:87:3: error: array index in non-array initializer [LLCC_DRAM_CE] = { ^~~~~~~~~~~~ drivers/edac/qcom_edac.c:87:3: note: (near initialization for edac_reg_data) drivers/edac/qcom_edac.c:88:3: error: field name not in record or union initializer .name = "DRAM Single-bit", ... drivers/edac/qcom_edac.c:169:51: warning: struct llcc_drv_data declared inside parameter list will not be visible outside of this definition or declaration qcom_llcc_clear_error_status(int err_type, struct llcc_drv_data *drv) ^~~~~~~~~~~~~ This patch move the needed definitions back to include. Reported-by: Hulk Robot Fixes: 99356b03b431 ("soc: qcom: Make llcc-qcom a generic driver") Signed-off-by: YueHaibing Signed-off-by: Bjorn Andersson commit 48423dd7e683dadcfacc2bfb3bc0e57e7c8b9cb2 Merge: 11fc7d5a0a2d 8ae10cfb5089 Author: Jakub Kicinski Date: Tue Oct 8 17:26:41 2019 -0700 Merge branch 'hns3-next' into net-next Huazhong Tan says: ==================== This patch-set includes some new features for the HNS3 ethernet controller driver. [patch 01/06] adds support for configuring VF link status on the host. [patch 02/06] adds support for configuring VF spoof check. [patch 03/06] adds support for configuring VF trust. [patch 04/06] adds support for configuring VF bandwidth on the host. [patch 05/06] adds support for configuring VF MAC on the host. [patch 06/06] adds support for tx-scatter-gather-fraglist. ==================== Signed-off-by: Jakub Kicinski commit 8ae10cfb508977c186c9d6e1ac873c4280b10fa3 Author: Yunsheng Lin Date: Tue Oct 8 09:20:09 2019 +0800 net: hns3: support tx-scatter-gather-fraglist feature The hardware supports up to 8 TX BD for non-tso skb and up to 63 TX BD for TSO skb. Currently, the hns3 driver supports RX skb with fraglist when HW GRO is enabled, when the stack forwards a RX skb with fraglist, the stack need to linearize the skb before sending to other interface without TX fraglist support. This patch adds support for TX fraglist. The performance increases from 1 GByte to 1.5 GByte for one iperf TCP stream during forwarding test after this patch. BTW, the minimum BD number of ring should be updated to 72 for supporting TX fraglist. This patch also changes the error handling of some function that called by hns3_fill_desc, which returns BD num when there is no error, change some macro to more meaningful name. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 8e6de441b8e663e33d457494f88860f269933317 Author: Huazhong Tan Date: Tue Oct 8 09:20:08 2019 +0800 net: hns3: add support for configuring VF MAC from the host This patch adds support of configuring VF MAC from the host for the HNS3 driver. BTW, the parameter init in the hns3_init_mac_addr is unnecessary now, since the MAC address will not read from NCL_CONFIG when doing reset, so it should be removed, otherwise it will affect VF's MAC address initialization. Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit ee9e44248f52b6f1425cd50b5941f491b4629456 Author: Yonglong Liu Date: Tue Oct 8 09:20:07 2019 +0800 net: hns3: add support for configuring bandwidth of VF on the host This patch adds support for configuring bandwidth of VF on the host for HNS3 drivers. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit e196ec75958e16f5a6d418a1296244f825109d8a Author: Jian Shen Date: Tue Oct 8 09:20:06 2019 +0800 net: hns3: add support for setting VF trust This patch adds supports for setting VF trust by host. If specified VF is trusted, then it can enable promisc(include allmulti mode). If a trusted VF enabled promisc, and being untrusted, host will disable promisc mode for this VF. For VF will update its promisc mode from set_rx_mode now, so it's unnecessary to set broadcst promisc mode when initialization or reset. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 22044f95faa05cb8ceb96101bfe18a42613914dc Author: Jian Shen Date: Tue Oct 8 09:20:05 2019 +0800 net: hns3: add support for spoof check setting This patch adds support for spoof check configuration for VFs. When it is enabled, "spoof checking" is done for both mac address and VLAN. For each VF, the HW ensures that the source MAC address (or VLAN) of every outgoing packet exists in the MAC-list (or VLAN-list) configured for RX filtering for that VF. If not, the packet is dropped. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 6430f744a45adb722dc51982a7df7ac1367dc90d Author: Yufeng Mo Date: Tue Oct 8 09:20:04 2019 +0800 net: hns3: add support for setting VF link status on the host This patch adds support to configure VF link properties. The options are auto, enable, and disable. Even if the PF is down, the communication between VFs will be normal if the VFs are set to enable. The commands are as follows: 'ip link set vf state ' change the VF status 'ip link show' show the setting status Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 94e2ec3f7fef86506293a448273b2b4ee21e6195 Author: Oleg Vasilev Date: Mon Sep 30 18:59:24 2019 +0300 drm/vkms: prime import support Bring dmabuf sharing through implementing prime_import_sg_table callback. This will help to validate userspace conformance in prime configurations without using any actual hardware (e.g. in the cloud). This enables kms_prime IGT testcase on vkms. V3: - Rodrigo: remove redundant vkms_gem_create_private V2: - Rodrigo: styleguide + return code check Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Daniel Vetter Cc: Simon Ser Tested-by: Rodrigo Siqueira Reviewed-by: Rodrigo Siqueira Signed-off-by: Oleg Vasilev Signed-off-by: Oleg Vasilev Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20190930155924.21845-1-oleg.vasilev@intel.com commit aed6105b28b10613f16c0bfe97525fe5a23338df Author: Rodrigo Siqueira Date: Wed Oct 2 11:05:16 2019 -0300 drm/drm_vblank: Change EINVAL by the correct errno For historical reasons, the function drm_wait_vblank_ioctl always return -EINVAL if something gets wrong. This scenario limits the flexibility for the userspace to make detailed verification of any problem and take some action. In particular, the validation of “if (!dev->irq_enabled)” in the drm_wait_vblank_ioctl is responsible for checking if the driver support vblank or not. If the driver does not support VBlank, the function drm_wait_vblank_ioctl returns EINVAL, which does not represent the real issue; this patch changes this behavior by return EOPNOTSUPP. Additionally, drm_crtc_get_sequence_ioctl and drm_crtc_queue_sequence_ioctl, also returns EINVAL if vblank is not supported; this patch also changes the return value to EOPNOTSUPP in these functions. Lastly, these functions are invoked by libdrm, which is used by many compositors; because of this, it is important to check if this change breaks any compositor. In this sense, the following projects were examined: * Drm-hwcomposer * Kwin * Sway * Wlroots * Wayland * Weston * Mutter * Xorg (67 different drivers) For each repository the verification happened in three steps: * Update the main branch * Look for any occurrence of "drmCrtcQueueSequence", "drmCrtcGetSequence", and "drmWaitVBlank" with the command git grep -n "STRING". * Look in the git history of the project with the command git log -S None of the above projects validate the use of EINVAL when using drmWaitVBlank(), which make safe, at least for these projects, to change the return values. On the other hand, mesa and xserver project uses drmCrtcQueueSequence() and drmCrtcGetSequence(); this change is harmless for both projects. Change since V5 (Pekka Paalanen): - Check if the change also affects Mutter Change since V4 (Daniel): - Also return EOPNOTSUPP in drm_crtc_[get|queue]_sequence_ioctl Change since V3: - Return EINVAL for _DRM_VBLANK_SIGNAL (Daniel) Change since V2: Daniel Vetter and Chris Wilson - Replace ENOTTY by EOPNOTSUPP - Return EINVAL if the parameters are wrong Cc: Keith Packard Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Chris Wilson Cc: Daniel Vetter Cc: Pekka Paalanen Signed-off-by: Rodrigo Siqueira Reviewed-by: Daniel Vetter Acked-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/msgid/20191002140516.adeyj3htylimmlmg@smtp.gmail.com commit 55fd0e206eaf5056885a9055b207143ab7c8fcd1 Author: Rodrigo Siqueira Date: Mon Sep 9 21:21:47 2019 +0000 drm: Add link training repeaters addresses DP 1.3 specification introduces the Link Training-tunable PHY Repeater, and DP 1.4* supplemented it with new features. In the 1.4a spec, it was introduced some innovations to make handy to add support for systems with Thunderbolt or other repeater devices. It is important to highlight that DP specification had some updates from 1.3 through 1.4a. In particular, DP 1.4 defines Repeater_FEC_CAPABILITY at the address 0xf0004, and DP 1.4a redefined the address 0xf0004 to DP_MAX_LANE_COUNT_PHY_REPEATER. Changes since V4: - Update commit message - Fix misleading comments related to the spec version Changes since V3: - Replace spaces by tabs Changes since V2: - Drop the kernel-doc comment - Reorder LTTPR according to register offset Changes since V1: - Adjusts registers names to be aligned with spec and the rest of the file - Update spec comment from 1.4 to 1.4a Cc: Abdoulaye Berthe Cc: Harry Wentland Cc: Leo Li Cc: Jani Nikula Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Rodrigo Siqueira Signed-off-by: Abdoulaye Berthe Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20190909212144.deeomlsqihwg4l3y@outlook.office365.com commit 6ad145fe0246abe31a312ce19321bb5b11635802 Author: Chris Wilson Date: Tue Oct 8 19:59:41 2019 +0100 drm/i915/gt: Give engine->kernel_context distinct timeline lock classes Assign a separate lockclass to the perma-pinned timelines of the kernel_context, such that we can use them from within the user timelines should we ever need to inject GPU operations to fixup faults during request construction. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191008185941.15228-1-chris@chris-wilson.co.uk commit f05c2001ecc98629cecd47728e4db11e5a17e58d Merge: 8fdf5b780a14 ee2eb063d330 Author: Daniel Borkmann Date: Tue Oct 8 23:16:04 2019 +0200 Merge branch 'bpf-libbpf-helpers' Andrii Nakryiko says: ==================== This patch set makes bpf_helpers.h and bpf_endian.h a part of libbpf itself for consumption by user BPF programs, not just selftests. It also splits off tracing helpers into bpf_tracing.h, which also becomes part of libbpf. Some of the legacy stuff (BPF_ANNOTATE_KV_PAIR, load_{byte,half,word}, bpf_map_def with unsupported fields, etc, is extracted into selftests-only bpf_legacy.h. All the selftests and samples are switched to use libbpf's headers and selftests' ones are removed. As part of this patch set we also add BPF_CORE_READ variadic macros, that are simplifying BPF CO-RE reads, especially the ones that have to follow few pointers. E.g., what in non-BPF world (and when using BCC) would be: int x = s->a->b.c->d; /* s, a, and b.c are pointers */ Today would have to be written using explicit bpf_probe_read() calls as: void *t; int x; bpf_probe_read(&t, sizeof(t), s->a); bpf_probe_read(&t, sizeof(t), ((struct b *)t)->b.c); bpf_probe_read(&x, sizeof(x), ((struct c *)t)->d); This is super inconvenient and distracts from program logic a lot. Now, with added BPF_CORE_READ() macros, you can write the above as: int x = BPF_CORE_READ(s, a, b.c, d); Up to 9 levels of pointer chasing are supported, which should be enough for any practical purpose, hopefully, without adding too much boilerplate macro definitions (though there is admittedly some, given how variadic and recursive C macro have to be implemented). There is also BPF_CORE_READ_INTO() variant, which relies on caller to allocate space for result: int x; BPF_CORE_READ_INTO(&x, s, a, b.c, d); Result of last bpf_probe_read() call in the chain of calls is the result of BPF_CORE_READ_INTO(). If any intermediate bpf_probe_read() aall fails, then all the subsequent ones will fail too, so this is sufficient to know whether overall "operation" succeeded or not. No short-circuiting of bpf_probe_read()s is done, though. BPF_CORE_READ_STR_INTO() is added as well, which differs from BPF_CORE_READ_INTO() only in that last bpf_probe_read() call (to read final field after chasing pointers) is replaced with bpf_probe_read_str(). Result of bpf_probe_read_str() is returned as a result of BPF_CORE_READ_STR_INTO() macro itself, so that applications can track return code and/or length of read string. Patch set outline: - patch #1 undoes previously added GCC-specific bpf-helpers.h include; - patch #2 splits off legacy stuff we don't want to carry over; - patch #3 adjusts CO-RE reloc tests to avoid subsequent naming conflict with BPF_CORE_READ; - patch #4 splits off bpf_tracing.h; - patch #5 moves bpf_{helpers,endian,tracing}.h and bpf_helper_defs.h generation into libbpf and adjusts Makefiles to include libbpf for header search; - patch #6 adds variadic BPF_CORE_READ() macro family, as described above; - patch #7 adds tests to verify all possible levels of pointer nestedness for BPF_CORE_READ(), as well as correctness test for BPF_CORE_READ_STR_INTO(). v4->v5: - move BPF_CORE_READ() stuff into bpf_core_read.h header (Alexei); v3->v4: - rebase on latest bpf-next master; - bpf_helper_defs.h generation is moved into libbpf's Makefile; v2->v3: - small formatting fixes and macro () fixes (Song); v1->v2: - fix CO-RE reloc tests before bpf_helpers.h move (Song); - split off legacy stuff we don't want to carry over (Daniel, Toke); - split off bpf_tracing.h (Daniel); - fix samples/bpf build (assuming other fixes are applied); - switch remaining maps either to bpf_map_def_legacy or BTF-defined maps; ==================== Signed-off-by: Daniel Borkmann commit ee2eb063d330dc8dbe71041a1dae3cea889fdcb5 Author: Andrii Nakryiko Date: Tue Oct 8 10:59:42 2019 -0700 selftests/bpf: Add BPF_CORE_READ and BPF_CORE_READ_STR_INTO macro tests Validate BPF_CORE_READ correctness and handling of up to 9 levels of nestedness using cyclic task->(group_leader->)*->tgid chains. Also add a test of maximum-dpeth BPF_CORE_READ_STR_INTO() macro. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191008175942.1769476-8-andriin@fb.com commit 7db3822ab99157e16c41caa5e7d788834d5a3c7c Author: Andrii Nakryiko Date: Tue Oct 8 10:59:41 2019 -0700 libbpf: Add BPF_CORE_READ/BPF_CORE_READ_INTO helpers Add few macros simplifying BCC-like multi-level probe reads, while also emitting CO-RE relocations for each read. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191008175942.1769476-7-andriin@fb.com commit e01a75c159691714607b8a22daa2ba7be275dd01 Author: Andrii Nakryiko Date: Tue Oct 8 10:59:40 2019 -0700 libbpf: Move bpf_{helpers, helper_defs, endian, tracing}.h into libbpf Move bpf_helpers.h, bpf_tracing.h, and bpf_endian.h into libbpf. Move bpf_helper_defs.h generation into libbpf's Makefile. Ensure all those headers are installed along the other libbpf headers. Also, adjust selftests and samples include path to include libbpf now. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191008175942.1769476-6-andriin@fb.com commit 3ac4dbe3dd8943450e0366f8174fbfc286ea8f19 Author: Andrii Nakryiko Date: Tue Oct 8 10:59:39 2019 -0700 selftests/bpf: Split off tracing-only helpers into bpf_tracing.h Split-off PT_REGS-related helpers into bpf_tracing.h header. Adjust selftests and samples to include it where necessary. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191008175942.1769476-5-andriin@fb.com commit 694731e8ea7f6bbcf0c57763ed4f24faa14bf056 Author: Andrii Nakryiko Date: Tue Oct 8 10:59:38 2019 -0700 selftests/bpf: Adjust CO-RE reloc tests for new bpf_core_read() macro To allow adding a variadic BPF_CORE_READ macro with slightly different syntax and semantics, define CORE_READ in CO-RE reloc tests, which is a thin wrapper around low-level bpf_core_read() macro, which in turn is just a wrapper around bpf_probe_read(). Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191008175942.1769476-4-andriin@fb.com commit 36b5d471135c3ef5f4922aa23f6566b6a07227f7 Author: Andrii Nakryiko Date: Tue Oct 8 10:59:37 2019 -0700 selftests/bpf: samples/bpf: Split off legacy stuff from bpf_helpers.h Split off few legacy things from bpf_helpers.h into separate bpf_legacy.h file: - load_{byte|half|word}; - remove extra inner_idx and numa_node fields from bpf_map_def and introduce bpf_map_def_legacy for use in samples; - move BPF_ANNOTATE_KV_PAIR into bpf_legacy.h. Adjust samples and selftests accordingly by either including bpf_legacy.h and using bpf_map_def_legacy, or switching to BTF-defined maps altogether. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191008175942.1769476-3-andriin@fb.com commit cf0e9718da214415195a28e5909bd297fb178583 Author: Andrii Nakryiko Date: Tue Oct 8 10:59:36 2019 -0700 selftests/bpf: Undo GCC-specific bpf_helpers.h changes Having GCC provide its own bpf-helper.h is not the right approach and is going to be changed. Undo bpf_helpers.h change before moving bpf_helpers.h into libbpf. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Ilya Leoshkevich Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20191008175942.1769476-2-andriin@fb.com commit d60d0cff4ab01255b25375425745c3cff69558ad Author: Lihua Yao Date: Tue Sep 10 13:22:28 2019 +0000 ARM: dts: s3c64xx: Fix init order of clock providers fin_pll is the parent of clock-controller@7e00f000, specify the dependency to ensure proper initialization order of clock providers. without this patch: [ 0.000000] S3C6410 clocks: apll = 0, mpll = 0 [ 0.000000] epll = 0, arm_clk = 0 with this patch: [ 0.000000] S3C6410 clocks: apll = 532000000, mpll = 532000000 [ 0.000000] epll = 24000000, arm_clk = 532000000 Cc: Fixes: 3f6d439f2022 ("clk: reverse default clk provider initialization order in of_clk_init()") Signed-off-by: Lihua Yao Reviewed-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit 11fc7d5a0a2d458cae8ce5d5ee3ebfdabe2cb35a Author: Eric Dumazet Date: Mon Oct 7 12:21:05 2019 -0700 tun: fix memory leak in error path syzbot reported a warning [1] that triggered after recent Jiri patch. This exposes a bug that we hit already in the past (see commit ff244c6b29b1 ("tun: handle register_netdevice() failures properly") for details) tun uses priv->destructor without an ndo_init() method. register_netdevice() can return an error, but will not call priv->destructor() in some cases. Jiri recent patch added one more. A long term fix would be to transfer the initialization of what we destroy in ->destructor() in the ndo_init() This looks a bit risky given the complexity of tun driver. A simpler fix is to detect after the failed register_netdevice() if the tun_free_netdev() function was called already. [1] ODEBUG: free active (active state 0) object type: timer_list hint: tun_flow_cleanup+0x0/0x280 drivers/net/tun.c:457 WARNING: CPU: 0 PID: 8653 at lib/debugobjects.c:481 debug_print_object+0x168/0x250 lib/debugobjects.c:481 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 8653 Comm: syz-executor976 Not tainted 5.4.0-rc1-next-20191004 #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+0x172/0x1f0 lib/dump_stack.c:113 panic+0x2dc/0x755 kernel/panic.c:220 __warn.cold+0x2f/0x3c kernel/panic.c:581 report_bug+0x289/0x300 lib/bug.c:195 fixup_bug arch/x86/kernel/traps.c:174 [inline] fixup_bug arch/x86/kernel/traps.c:169 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:267 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:286 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1028 RIP: 0010:debug_print_object+0x168/0x250 lib/debugobjects.c:481 Code: dd 80 b9 e6 87 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 b5 00 00 00 48 8b 14 dd 80 b9 e6 87 48 c7 c7 e0 ae e6 87 e8 80 84 ff fd <0f> 0b 83 05 e3 ee 80 06 01 48 83 c4 20 5b 41 5c 41 5d 41 5e 5d c3 RSP: 0018:ffff888095997a28 EFLAGS: 00010082 RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff815cb526 RDI: ffffed1012b32f37 RBP: ffff888095997a68 R08: ffff8880a92ac580 R09: ffffed1015d04101 R10: ffffed1015d04100 R11: ffff8880ae820807 R12: 0000000000000001 R13: ffffffff88fb5340 R14: ffffffff81627110 R15: ffff8880aa41eab8 __debug_check_no_obj_freed lib/debugobjects.c:963 [inline] debug_check_no_obj_freed+0x2d4/0x43f lib/debugobjects.c:994 kfree+0xf8/0x2c0 mm/slab.c:3755 kvfree+0x61/0x70 mm/util.c:593 netdev_freemem net/core/dev.c:9384 [inline] free_netdev+0x39d/0x450 net/core/dev.c:9533 tun_set_iff drivers/net/tun.c:2871 [inline] __tun_chr_ioctl+0x317b/0x3f30 drivers/net/tun.c:3075 tun_chr_ioctl+0x2b/0x40 drivers/net/tun.c:3355 vfs_ioctl fs/ioctl.c:47 [inline] file_ioctl fs/ioctl.c:539 [inline] do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:726 ksys_ioctl+0xab/0xd0 fs/ioctl.c:743 __do_sys_ioctl fs/ioctl.c:750 [inline] __se_sys_ioctl fs/ioctl.c:748 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:748 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x441439 Code: e8 9c ae 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 3b 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fff61c37438 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000441439 RDX: 0000000020000400 RSI: 00000000400454ca RDI: 0000000000000004 RBP: 00007fff61c37470 R08: 0000000000000001 R09: 0000000100000000 R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff R13: 0000000000000005 R14: 0000000000000000 R15: 0000000000000000 Kernel Offset: disabled Rebooting in 86400 seconds.. Fixes: ff92741270bf ("net: introduce name_node struct to be used in hashlist") Signed-off-by: Eric Dumazet Cc: Jiri Pirko Reported-by: syzbot Signed-off-by: Jakub Kicinski commit 832b2cb955437dcfe9b8f08e5f37303c9097fc87 Author: Chuck Lever Date: Fri Oct 4 09:58:20 2019 -0400 svcrdma: Improve DMA mapping trace points Capture the total size of Sends, the size of DMA map and the matching DMA unmap to ensure operation is correct. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit c4b77edb3f7f58a3241d318f946ed68708776f8b Author: J. Bruce Fields Date: Thu Oct 3 12:33:08 2019 -0400 nfsd: "\%s" should be "%s" Randy says: > sparse complains about these, as does gcc when used with --pedantic. > sparse says: > > ../fs/nfsd/nfs4state.c:2385:23: warning: unknown escape sequence: '\%' > ../fs/nfsd/nfs4state.c:2385:23: warning: unknown escape sequence: '\%' > ../fs/nfsd/nfs4state.c:2388:23: warning: unknown escape sequence: '\%' > ../fs/nfsd/nfs4state.c:2388:23: warning: unknown escape sequence: '\%' I'm not sure how this crept in. Fix it. Reported-by: Randy Dunlap Signed-off-by: J. Bruce Fields commit 19a1aad8886fd5b704b02870020cb6694f686991 Author: YueHaibing Date: Sat Sep 28 12:21:56 2019 +0800 nfsd: remove set but not used variable 'len' Fixes gcc '-Wunused-but-set-variable' warning: fs/nfsd/nfs4xdr.c: In function nfsd4_encode_splice_read: fs/nfsd/nfs4xdr.c:3464:7: warning: variable len set but not used [-Wunused-but-set-variable] It is not used since commit 83a63072c815 ("nfsd: fix nfs read eof detection") Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: J. Bruce Fields commit 7c98501acb94318819f5ea764fc3aae09f69aff6 Author: Matthew Auld Date: Tue Oct 8 17:01:16 2019 +0100 drm/i915/region: support volatile objects Volatile objects are marked as DONTNEED while pinned, therefore once unpinned the backing store can be discarded. This is limited to kernel internal objects. Signed-off-by: Matthew Auld Signed-off-by: CQ Tang Cc: Joonas Lahtinen Cc: Abdiel Janulgue Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191008160116.18379-4-matthew.auld@intel.com commit 2f0b97ca02118630132dddf258fbdb5d5f5ec32a Author: Matthew Auld Date: Tue Oct 8 17:01:15 2019 +0100 drm/i915/region: support contiguous allocations Some kernel internal objects may need to be allocated as a contiguous block, also thinking ahead the various kernel io_mapping interfaces seem to expect it, although this is purely a limitation in the kernel API...so perhaps something to be improved. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue Cc: Michael J Ruhl Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191008160116.18379-3-matthew.auld@intel.com commit 232a6ebae419193f5b8da4fa869ae5089ab105c2 Author: Matthew Auld Date: Tue Oct 8 17:01:14 2019 +0100 drm/i915: introduce intel_memory_region Support memory regions, as defined by a given (start, end), and allow creating GEM objects which are backed by said region. The immediate goal here is to have something to represent our device memory, but later on we also want to represent every memory domain with a region, so stolen, shmem, and of course device. At some point we are probably going to want use a common struct here, such that we are better aligned with say TTM. Signed-off-by: Matthew Auld Signed-off-by: Abdiel Janulgue Signed-off-by: Niranjana Vishwanathapura Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191008160116.18379-2-matthew.auld@intel.com commit 03232cc43cff18ae44a30ceb455a036586ee8244 Author: Parav Pandit Date: Sun Oct 6 18:54:43 2019 +0300 IB/mlx5: Introduce and use mkey context setting helper routine Introduce and use set_mkc_access_pd_addr_fields() which sets mkey context's access rights, PD, address fields. Thereby avoid the code duplication. Link: https://lore.kernel.org/r/20191006155443.31068-1-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3466c060ef6adffefc8aaa45d1fe01b64cd6007d Author: Max Gurtovoy Date: Sun Oct 6 15:56:20 2019 +0300 RDMA/iser: Use iser_err instead of pr_err for logging Make sure all the debug prints in ib_iser module use the common driver logger. Link: https://lore.kernel.org/r/1570366580-24097-1-git-send-email-maxg@mellanox.com Signed-off-by: Max Gurtovoy Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 39c48c514601d76f8750d1739928c9577b1785d9 Author: Devesh Sharma Date: Thu Oct 3 01:48:35 2019 -0400 RDMA/bnxt_re: Enable SRIOV VF support on Broadcom's 57500 adapter series Broadcom's 575xx adapter series has support for SRIOV VFs. Making changes to enable SRIOV VF support. There are two major area where changes are done: - Added new DB location for control-path and data-path DB ring - New devices do not need to issue the sriov-config slow-path command thus, skipping to call that firmware command. For now enabling support for 64 RoCE VFs. Link: https://lore.kernel.org/r/1570081715-14301-1-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 645c138636de3d6d6ed7d92edec39298fd6873d7 Author: Rob Herring Date: Thu Sep 5 10:47:26 2019 +0100 of/address: Fix of_pci_range_parser_one translation of DMA addresses of_pci_range_parser_one() has a bug when parsing dma-ranges. When it translates the parent address (aka cpu address in the code), 'ranges' is always being used. This happens to work because most users are just 1:1 translation. Cc: Robin Murphy Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Rob Herring commit 81db12ee15cb83926e290a8a3654a2dfebc80935 Author: Rob Herring Date: Wed Sep 4 11:43:30 2019 +0100 of/address: Translate 'dma-ranges' for parent nodes missing 'dma-ranges' 'dma-ranges' frequently exists without parent nodes having 'dma-ranges'. While this is an error for 'ranges', this is fine because DMA capable devices always have a translatable DMA address. Also, with no 'dma-ranges' at all, the assumption is that DMA addresses are 1:1 with no restrictions unless perhaps the device itself has implicit restrictions. Cc: Robin Murphy Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Rob Herring commit 04db93a95aef392a98f9ffa8745da2e7c58ba75b Author: Rob Herring Date: Fri Sep 20 13:28:53 2019 -0500 of/unittest: Add dma-ranges address translation tests The functions for parsing 'dma-ranges' ranges are buggy and fail to handle several conditions. Add new tests for of_dma_get_range() and for_each_of_pci_range(). With this test, we get 5 new failures which are fixed in subsequent commits: OF: translation of DMA address(0) to CPU address failed node(/testcase-data/address-tests/device@70000000) FAIL of_unittest_dma_ranges_one():798 of_dma_get_range failed on node /testcase-data/address-tests/device@70000000 rc=-22 OF: translation of DMA address(10000000) to CPU address failed node(/testcase-data/address-tests/bus@80000000/device@1000) FAIL of_unittest_dma_ranges_one():798 of_dma_get_range failed on node /testcase-data/address-tests/bus@80000000/device@1000 rc=-22 OF: translation of DMA address(0) to CPU address failed node(/testcase-data/address-tests/pci@90000000) FAIL of_unittest_dma_ranges_one():798 of_dma_get_range failed on node /testcase-data/address-tests/pci@90000000 rc=-22 FAIL of_unittest_pci_dma_ranges():851 for_each_of_pci_range wrong CPU addr (d0000000) on node /testcase-data/address-tests/pci@90000000 FAIL of_unittest_pci_dma_ranges():861 for_each_of_pci_range wrong CPU addr (ffffffffffffffff) on node /testcase-data/address-tests/pci@90000000 Cc: Robin Murphy Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Rob Herring commit b68ac8dc22ebbf003e26e44bf4dd3030c076df5a Author: Robin Murphy Date: Tue Jul 2 18:42:39 2019 +0100 of: Factor out #{addr,size}-cells parsing In some cases such as PCI host controllers, we may have a "parent bus" which is an OF leaf node, but still need to correctly parse ranges from the point of view of that bus. For that, factor out variants of the "#addr-cells" and "#size-cells" parsers which do not assume they have a device node and thus immediately traverse upwards before reading the relevant property. Signed-off-by: Robin Murphy [robh: don't make of_bus_n_{addr,size}_cells() public] Reviewed-by: Geert Uytterhoeven Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Rob Herring commit c60bf3eb888a362100aa1bdbea351dab681e262a Author: Robin Murphy Date: Wed Jul 3 14:47:31 2019 +0100 of: address: Follow DMA parent for "dma-coherent" Much like for address translation, when checking for DMA coherence we should be sure to walk up the DMA hierarchy, rather than the MMIO one, now that we can accommodate them being different. Signed-off-by: Robin Murphy Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Rob Herring commit 862ab5578f754117742c8b8c8e5ddf98bdb190ba Author: Robin Murphy Date: Wed Jul 3 18:23:01 2019 +0100 of/address: Introduce of_get_next_dma_parent() helper Add of_get_next_dma_parent() helper which is similar to __of_get_dma_parent(), but can be used in iterators and decrements the ref count on the prior parent. Signed-off-by: Robin Murphy Reviewed-by: Geert Uytterhoeven Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Rob Herring commit 76dd7068e32cec3389474d6f69ffd4d0536172da Author: Robin Murphy Date: Thu Jul 4 14:54:12 2019 +0100 of: address: Report of_dma_get_range() errors meaningfully If we failed to translate a DMA address, at least show the offending address rather than the uninitialised contents of the destination argument. Signed-off-by: Robin Murphy Reviewed-by: Geert Uytterhoeven Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Christoph Hellwig Signed-off-by: Rob Herring commit 6e6faf63744333373db8bc64aea52dab86cbf0bc Author: Rob Herring Date: Thu Sep 5 11:53:27 2019 +0100 of: Make of_dma_get_range() private of_dma_get_range() is only used within the DT core code, so remove the export and move the header declaration to the private header. Cc: Robin Murphy Reviewed-by: Geert Uytterhoeven Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Christoph Hellwig Signed-off-by: Rob Herring commit 3a9ac959ba2825a3a6235bc909d369cc30386e9e Author: Rob Herring Date: Thu Sep 5 11:44:24 2019 +0100 of: Remove unused of_find_matching_node_by_address() of_find_matching_node_by_address() is unused, so remove it. Cc: Robin Murphy Reviewed-by: Geert Uytterhoeven Reviewed-by: Christoph Hellwig Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Rob Herring commit f9867b51d268d6fabcc4477d877f04aaad9299ae Author: Colin Ian King Date: Tue Oct 8 09:17:47 2019 +0100 netdevsim: fix spelling mistake "forbidded" -> "forbid" There is a spelling mistake in a NL_SET_ERR_MSG_MOD message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Jakub Kicinski commit c4256794dfdc429d61494a0d1fe1e8212e00803f Author: Colin Ian King Date: Mon Oct 7 13:03:08 2019 +0100 net: phy: mscc: make arrays static, makes object smaller Don't populate const arrays on the stack but instead make them static. Makes the object code smaller by 1058 bytes. Before: text data bss dec hex filename 29879 6144 0 36023 8cb7 drivers/net/phy/mscc.o After: text data bss dec hex filename 28437 6528 0 34965 8895 drivers/net/phy/mscc.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Jakub Kicinski commit 155283c3ac5e272f0178efba08ac62366ffdb86b Author: Colin Ian King Date: Mon Oct 7 12:52:39 2019 +0100 nfp: bpf: make array exp_mask static, makes object smaller Don't populate the array exp_mask on the stack but instead make it static. Makes the object code smaller by 224 bytes. Before: text data bss dec hex filename 77832 2290 0 80122 138fa ethernet/netronome/nfp/bpf/jit.o After: text data bss dec hex filename 77544 2354 0 79898 1381a ethernet/netronome/nfp/bpf/jit.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Acked-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit b2e872f451992e5ac3d6b79a62b66f1721e29521 Author: Honggang Li Date: Sat Sep 28 01:43:52 2019 +0800 RDMA/srp: Calculate max_it_iu_size if remote max_it_iu length available The default maximum immediate size is too big for old srp clients, which do not support immediate data. According to the SRP and SRP-2 specifications, the IOControllerProfile attributes for SRP target ports contains the maximum initiator to target iu length. The maximum initiator to target iu length can be obtained by sending MAD packets to query subnet manager port and SRP target ports. We should calculate the max_it_iu_size instead of the default value, when remote maximum initiator to target iu length available. Link: https://lore.kernel.org/r/20190927174352.7800-2-honli@redhat.com Reviewed-by: Bart Van Assche Signed-off-by: Honggang Li Signed-off-by: Jason Gunthorpe commit 547ed331bbe89575ff91939e1ac9a023fe526b74 Author: Honggang Li Date: Sat Sep 28 01:43:51 2019 +0800 RDMA/srp: Add parse function for maximum initiator to target IU size According to SRP specifications 'srp-r16a' and 'srp2r06', IOControllerProfile attributes for SRP target port include the maximum initiator to target IU size. SRP connection daemons, such as srp_daemon, can get the value from the subnet manager. The SRP connection daemon can pass this value to kernel. This patch adds a parse function for it. Upstream commit [1] enables the kernel parameter, 'use_imm_data', by default. [1] also use (8 * 1024) as the default value for kernel parameter 'max_imm_data'. With those default values, the maximum initiator to target IU size will be 8260. In case the SRPT modules, which include the in-tree 'ib_srpt.ko' module, do not support SRP-2 'immediate data' feature, the default maximum initiator to target IU size is significantly smaller than 8260. For 'ib_srpt.ko' module, which built from source before [2], the default maximum initiator to target IU is 2116. [1] introduces a regression issue for old srp targets with default kernel parameters, as the connection will be rejected because of a too large maximum initiator to target IU size. [1] commit 882981f4a411 ("RDMA/srp: Add support for immediate data") [2] commit 5dabcd0456d7 ("RDMA/srpt: Add support for immediate data") Link: https://lore.kernel.org/r/20190927174352.7800-1-honli@redhat.com Reviewed-by: Bart Van Assche Signed-off-by: Honggang Li Signed-off-by: Jason Gunthorpe commit 2b60d727cb2e059e0569b937e742e93423ae1541 Merge: d6b71dfaeeba f6910679e17a Author: Mark Brown Date: Tue Oct 8 19:12:28 2019 +0100 Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.5 commit a14bf1dc494aa5126e4f23ebd9fa04991133814e Author: Tiezhu Yang Date: Wed Oct 9 00:15:09 2019 +0800 MIPS: generic: Use __initconst for const init data Fix the following checkpatch errors: $ ./scripts/checkpatch.pl --no-tree -f arch/mips/generic/init.c ERROR: Use of const init definition must use __initconst #23: FILE: arch/mips/generic/init.c:23: +static __initdata const void *fdt; ERROR: Use of const init definition must use __initconst #24: FILE: arch/mips/generic/init.c:24: +static __initdata const struct mips_machine *mach; ERROR: Use of const init definition must use __initconst #25: FILE: arch/mips/generic/init.c:25: +static __initdata const void *mach_match_data; Fixes: eed0eabd12ef ("MIPS: generic: Introduce generic DT-based board support") Signed-off-by: Tiezhu Yang Signed-off-by: Paul Burton Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit b34c095ca6091836c4da3856ed30c8690a2d1d3a Author: Bartosz Golaszewski Date: Tue Oct 1 12:05:10 2019 +0200 mtd: st_spi_fsm: remove unused field from struct stfsm The 'region' field in struct stfsm is unused and can be removed. Signed-off-by: Bartosz Golaszewski Signed-off-by: Miquel Raynal commit 717bc8a6b4399f3ef907e92a01914fbae0465fd6 Author: Miquel Raynal Date: Thu Sep 19 21:06:21 2019 +0200 mtd: Initialize all parameters of mtd_oob_ops Most of the time the ooboffs parameter of the mtd_oob_ops structure was initialized only when needed. Since the introduction of the SPI-NAND subsystem, this parameter is transferred into nand_page_io_req structure automatically and may be used by any SPI-NAND user. Before this happens, initialize all the structure parameters when they are created in mtdchar.c. Signed-off-by: Miquel Raynal commit 2e7c3a4cd56c8583c9e3029dfd3c6071fc8360e1 Author: Marek Vasut Date: Tue Sep 17 18:04:32 2019 +0200 mtd: Remove myself from MAINTAINERS I was not active for a very long time, remove myself from the maintainers file. Signed-off-by: Marek Vasut Cc: David Woodhouse Cc: Brian Norris Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra To: linux-mtd@lists.infradead.org Signed-off-by: Miquel Raynal commit afa173746905f497ab01a658df96a525dfc0e8e4 Author: zhengbin Date: Tue Sep 3 10:52:29 2019 +0800 mtd: spear_smi: remove set but not used variable 'flash_info' Fixes gcc '-Wunused-but-set-variable' warning: drivers/mtd/devices/spear_smi.c: In function spear_smi_probe_config_dt: drivers/mtd/devices/spear_smi.c:780:32: warning: variable flash_info set but not used [-Wunused-but-set-variable] It is not used since commit 6551ab5d30d6 ("mtd: add device-tree support to spear_smi") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Miquel Raynal commit aab478ca0f7ada511088039c6e2c8fdcb09139db Author: Stephen Boyd Date: Tue Jul 30 11:15:30 2019 -0700 mtd: Remove dev_err() usage after platform_get_irq() We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // While we're here, remove braces on if statements that only have one statement (manually). Cc: David Woodhouse Cc: Brian Norris Cc: Marek Vasut Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Miquel Raynal commit 219031a6e7dff52a066e8b074adc0697f501e3d3 Author: Mauro Carvalho Chehab Date: Mon Oct 7 10:35:05 2019 -0300 media: venus: fix build on 32bit environments As reported by jenkins@linuxtv.org, the build with i386 fails with: ld: drivers/media/platform/qcom/venus/helpers.o: in function `venus_helper_load_scale_clocks': (.text+0x1d77): undefined reference to `__udivdi3' ld: (.text+0x1dce): undefined reference to `__udivdi3' make: *** [Makefile:1094: vmlinux] Error 1 That's because it divides an u32 bit integer by a u64 one. Reviewed-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 79591b7db21d255db158afaa48c557dcab631a1c Author: Vladimir Oltean Date: Thu Sep 5 04:01:12 2019 +0300 spi: Add a PTP system timestamp to the transfer structure SPI is one of the interfaces used to access devices which have a POSIX clock driver (real time clocks, 1588 timers etc). The fact that the SPI bus is slow is not what the main problem is, but rather the fact that drivers don't take a constant amount of time in transferring data over SPI. When there is a high delay in the readout of time, there will be uncertainty in the value that has been read out of the peripheral. When that delay is constant, the uncertainty can at least be approximated with a certain accuracy which is fine more often than not. Timing jitter occurs all over in the kernel code, and is mainly caused by having to let go of the CPU for various reasons such as preemption, servicing interrupts, going to sleep, etc. Another major reason is CPU dynamic frequency scaling. It turns out that the problem of retrieving time from a SPI peripheral with high accuracy can be solved by the use of "PTP system timestamping" - a mechanism to correlate the time when the device has snapshotted its internal time counter with the Linux system time at that same moment. This is sufficient for having a precise time measurement - it is not necessary for the whole SPI transfer to be transmitted "as fast as possible", or "as low-jitter as possible". The system has to be low-jitter for a very short amount of time to be effective. This patch introduces a PTP system timestamping mechanism in struct spi_transfer. This is to be used by SPI device drivers when they need to know the exact time at which the underlying device's time was snapshotted. More often than not, SPI peripherals have a very exact timing for when their SPI-to-interconnect bridge issues a transaction for snapshotting and reading the time register, and that will be dependent on when the SPI-to-interconnect bridge figures out that this is what it should do, aka as soon as it sees byte N of the SPI transfer. Since spi_device drivers are the ones who'd know best how the peripheral behaves in this regard, expose a mechanism in spi_transfer which allows them to specify which word (or word range) from the transfer should be timestamped. Add a default implementation of the PTP system timestamping in the SPI core. This is not going to be satisfactory performance-wise, but should at least increase the likelihood that SPI device drivers will use PTP system timestamping in the future. There are 3 entry points from the core towards the SPI controller drivers: - transfer_one: The driver is passed individual spi_transfers to execute. This is the easiest to timestamp. - transfer_one_message: The core passes the driver an entire spi_message (a potential batch of spi_transfers). The core puts the same pre and post timestamp to all transfers within a message. This is not ideal, but nothing better can be done by default anyway, since the core has no insight into how the driver batches the transfers. - transfer: Like transfer_one_message, but for unqueued drivers (i.e. the driver implements its own queue scheduling). Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20190905010114.26718-3-olteanv@gmail.com Signed-off-by: Mark Brown commit f6910679e17ad4915f008bd2c614d38052426f7c Author: Frieder Schrempf Date: Mon Oct 7 07:23:02 2019 +0000 spi: spi-fsl-qspi: Clear TDH bits in FLSHCR register Later versions of the QSPI controller (e.g. in i.MX6UL/ULL and i.MX7) seem to have an additional TDH setting in the FLSHCR register, that needs to be set in accordance with the access mode that is used (DDR or SDR). Previous bootstages such as BootROM or bootloader might have used the DDR mode to access the flash. As we currently only use SDR mode, we need to make sure the TDH bits are cleared upon initialization. Fixes: 84d043185dbe ("spi: Add a driver for the Freescale/NXP QuadSPI controller") Cc: Signed-off-by: Frieder Schrempf Acked-by: Han Xu Link: https://lore.kernel.org/r/20191007071933.26786-1-frieder.schrempf@kontron.de Signed-off-by: Mark Brown commit 4e98f871bcffa322850c73d22c66bbd7af2a0374 Author: Sam Ravnborg Date: Mon Oct 7 19:12:24 2019 +0200 drm: delete drmP.h + drm_os_linux.h There is finally no more users left in the kernel of drmP.h and drm_os_linux.h (drmP.h was the only user left). Delete the header files and delete the corresponding todo entry. When we started this quest there was more than 700 users of drmP.h. And drmP.h was a huge cover-it-all header file. Daniel Vetter is the one that followed the work from start to the end and in between many people have contributed to the removal process - thanks to everyone! Signed-off-by: Sam Ravnborg Reviewed-by: Sean Paul Reviewed-by: Lyude Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191007171224.1581-3-sam@ravnborg.org commit 0aa32f8e572e3efa61107e099fd93c9c5191682b Author: Sam Ravnborg Date: Mon Oct 7 19:12:23 2019 +0200 drm_dp_cec: drop use of drmP.h drmP.h is deprecated and will be deleted. Replace use with proper header. Divide header includes in blocks while touching these. Build tested with various archtectures and configs. Signed-off-by: Sam Ravnborg Fixes: ae85b0df124f6928 ("drm_dp_cec: add connector info support.") Reviewed-by: Lyude Paul Reviewed-by: Sean Paul Acked-by: Hans Verkuil Cc: Dariusz Marcinkiewicz Cc: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20191007171224.1581-2-sam@ravnborg.org commit be446f183ae35a8c76687ea8203fdd86f3f9678e Author: Axel Lin Date: Mon Oct 7 19:50:09 2019 +0800 regulator: da9062: Simplify da9062_buck_set_mode for BUCK_MODE_MANUAL case The sleep flag bit decides the mode for BUCK_MODE_MANUAL case, simplify the logic as the result is the same. Signed-off-by: Axel Lin Reviewed-by: Adam Thomson Link: https://lore.kernel.org/r/20191007115009.25672-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 5bf2a9e7d39819cd24e68e79f1d450b292e1a6b3 Merge: 9306a733f8ea 77fd66c9ff3e Author: Mark Brown Date: Tue Oct 8 17:26:17 2019 +0100 Merge branch 'regulator-5.4' into regulator-5.5 commit 0990fc56612b1303d4c1da7da91a93af3fd78717 Author: Boris Brezillon Date: Wed Jan 30 09:58:45 2019 +0100 MAINTAINERS: Add the IRC channel to the MTD entry The #mtd channel (on OFTC servers) is being used to discuss MTD related topics. Add it to the MTD entry. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit a6810312b835ed927edaef0e96217c02084c7f4f Author: Chengguang Xu Date: Tue Oct 8 22:50:59 2019 +0800 quota: check quota type in early stage Check quota type in early stage so we can avoid many unncessary operations when the type is wrong. Link: https://lore.kernel.org/r/20191008145059.21402-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit d99f7b079c2a49b2278fe80192fbca083db87d18 Author: Chris Wilson Date: Tue Oct 8 11:56:55 2019 +0100 drm/i915/gt: Flush submission tasklet before waiting/retiring A common bane of ours is arbitrary delays in ksoftirqd processing our submission tasklet. Give the submission tasklet a kick before we wait to avoid those delays eating into a tight timeout. Signed-off-by: Chris Wilson Reviewed-by: Stuart Summers Link: https://patchwork.freedesktop.org/patch/msgid/20191008105655.13256-1-chris@chris-wilson.co.uk commit 23b9e41a3dbdad16266b16d0c16ac629f0b6d732 Author: Lionel Landwerlin Date: Tue Oct 8 15:01:11 2019 +0100 drm/i915/perf: drop list of streams At some point in time there was the idea that we could have multiple stream from the same piece of HW but that never materialized and given the hard time we already have making everything work with the submission side, there is no real point having this list of 1 element around. Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191008140111.5437-1-chris@chris-wilson.co.uk commit d14a701b00706395de33c61866daa3d424d758fc Author: Chris Wilson Date: Tue Oct 8 15:50:45 2019 +0100 drm/i915/selftests: Assign the intel_runtime_pm pointer for mock_uncore Couple up our mock_uncore to know about the fake global device and its runtime powermanagement. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191008145045.23157-1-chris@chris-wilson.co.uk commit d49d1c76b96ebf39539e93d5ab7943a01ef70e4f Author: zhengbin Date: Tue Oct 8 15:41:55 2019 +0800 staging: comedi: Remove set but not used variable 'aref' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/comedi/drivers/dt3000.c: In function dt3k_ai_insn_read: drivers/staging/comedi/drivers/dt3000.c:511:27: warning: variable aref set but not used [-Wunused-but-set-variable] It is not used since commit 2e310235ca8f ("staging: comedi: dt3000: rename dt3k_ai_insn()") Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Dan Carpenter Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/1570520515-2186-7-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 82d20bc5083d259b5dd799aa699abee270c4a358 Author: Matteo Croce Date: Tue Oct 8 14:33:46 2019 +0200 staging: vchiq: don't print pointless kernel address Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), an obfuscated kernel pointer is printed at boot: vchiq: vchiq_init_state: slot_zero = (____ptrval____) Remove the the print completely, as it's useless without the address. Signed-off-by: Matteo Croce Link: https://lore.kernel.org/r/20191008123346.3931-1-mcroce@redhat.com Signed-off-by: Greg Kroah-Hartman commit d298e6a27a81362af4b755db2e89469c2a609cd8 Author: Wen He Date: Tue Sep 10 15:59:13 2019 +0800 drm/arm/mali-dp: Add display QoS interface configuration for Mali DP500 Configure the display Quality of service (QoS) levels priority if the optional property node "arm,malidp-aqros-value" is defined in DTS file. QoS signaling using AQROS and AWQOS AXI interface signals, the AQROS is driven from the "RQOS" register, so needed to program the RQOS register to avoid the high resolutions flicker issue on the LS1028A platform. Signed-off-by: Wen He Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190910075913.17650-2-wen.he_1@nxp.com commit cdc56c112932a058f86e6ed9e2cd696ffafac8c2 Author: Tero Kristo Date: Mon Oct 7 15:29:31 2019 +0300 bus: ti-sysc: avoid toggling power state of module during probe Current implementation for ti-sysc powers down the module once module init is complete. However, right after power is disabled, it is enabled via runtime PM. This is unnecessary so avoid it by re-ordering the events a bit; move powering down of the module post runtime PM enable which makes sure the use counts are maintained properly and there is no extra power down/up sequence for the module. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit df4f3459c7e2d2c573e38757c2d2e7b57cb49717 Author: Tero Kristo Date: Mon Oct 7 15:29:30 2019 +0300 bus: ti-sysc: drop the extra hardreset during init There seems to be unnecessary extra hardreset line toggling applied during module init. This is unnecessary, as the reset lines are already asserted during boot, and it can cause certain modules to hang (iommus, remoteprocs.) Remove the extra hardreset toggle, and remove the now redundant function to handle this also. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit bf59ebbeac1fdd7d398d5f808f2cf239c8e61947 Author: Tero Kristo Date: Mon Oct 7 15:29:29 2019 +0300 bus: ti-sysc: re-order reset and main clock controls The main clocks and reset controls have a hardware level dependency, where one can't transition state without the other one transitioning. Because we don't have the dependency implemented in software, we must ensure the ordering of these two is done properly; they way this is handled is that clocks transition on software level without delay, and the status is only polled on reset side. Because of this, we must re-order the main clock and reset handling on the ti-sysc driver. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 354c2d310082d1c384213ba76c3757dd3cd8755d Author: Sean Paul Date: Wed Sep 4 16:29:13 2019 -0400 drm: damage_helper: Fix race checking plane->state->fb Since the dirtyfb ioctl doesn't give us any hints as to which plane is scanning out the fb it's marking as damaged, we need to loop through planes to find it. Currently we just reach into plane state and check, but that can race with another commit changing the fb out from under us. This patch locks the plane before checking the fb and will release the lock if the plane is not displaying the dirty fb. Fixes: b9fc5e01d1ce ("drm: Add helper to implement legacy dirtyfb") Cc: Rob Clark Cc: Deepak Rawat Cc: Daniel Vetter Cc: Thomas Hellstrom Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: # v5.0+ Reported-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190904202938.110207-1-sean@poorly.run commit bdb369e1e98ad948d282e78e4ec64d951c2f6f05 Author: Xingyu Chen Date: Sun Sep 29 14:24:15 2019 +0800 reset: add support for the Meson-A1 SoC Reset Controller The number of RESET registers and offset of RESET_LEVEL register for Meson-A1 are different from previous SoCs, In order to describe these differences, we introduce the struct meson_reset_param. Reviewed-by: Kevin Hilman Reviewed-by: Neil Armstrong Signed-off-by: Xingyu Chen Signed-off-by: Philipp Zabel commit 5d9730b9eb05a349c278a9f6f058ebefa9063def Author: Xingyu Chen Date: Sun Sep 29 14:24:14 2019 +0800 dt-bindings: reset: add bindings for the Meson-A1 SoC Reset Controller Add DT bindings for the Meson-A1 SoC Reset Controller include file, and also slightly update documentation. Signed-off-by: Xingyu Chen Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit 3740b6351509d19d44ba39e47f6a76aa68799586 Author: zhengbin Date: Tue Oct 8 15:41:52 2019 +0800 staging: sm750fb: Remove set but not used variable 'actual_mx_clk' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/sm750fb/ddk750_chip.c: In function set_chip_clock: drivers/staging/sm750fb/ddk750_chip.c:59:15: warning: variable actual_mx_clk set but not used [-Wunused-but-set-variable] It is not used since commit f0977109a577 ("staging: sm750fb: lower case to fix camelcase checkpatch warning") Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/1570520515-2186-4-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 66bc9cde241ef69031e90a9971e91c634521e94e Author: zhengbin Date: Tue Oct 8 15:41:51 2019 +0800 staging: sm750fb: Remove set but not used variable 'uiActualPixelClk' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/sm750fb/ddk750_mode.c: In function ddk750_setModeTiming: drivers/staging/sm750fb/ddk750_mode.c:212:15: warning: variable uiActualPixelClk set but not used [-Wunused-but-set-variable] It is not used since commit 81dee67e215b ("staging: sm750fb: add sm750 to staging") Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/1570520515-2186-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5193dbdaf0b07a46b6659c7a38c80c947f7ab732 Author: zhengbin Date: Tue Oct 8 15:41:50 2019 +0800 staging: bcm2835-audio: Need to judge the return value of vchi_msg_dequeue in audio_vchi_callback If vchi_msg_dequeue return -1, variable m is not assigined, need to return. Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/1570520515-2186-2-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit e9067bb502787869dabe385727baff233024097b Author: Kuninori Morimoto Date: Wed Oct 2 14:35:13 2019 +0900 ASoC: soc-component: remove snd_pcm_ops from component driver No driver is using snd_pcm_ops on component driver. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8736gb90by.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a49e460f847f54600fb1fdae63765eb54ae659cc Author: Kuninori Morimoto Date: Wed Oct 2 14:35:05 2019 +0900 ASoC: soc-utils: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874l0r90c6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ece23171ea95c4fe9395c1c861af0c1bd50ad9e5 Author: Kuninori Morimoto Date: Wed Oct 2 14:35:00 2019 +0900 ASoC: soc-generic-dmaengine-pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875zl790cb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a21192a7daf45f14120d6976b64efc3234499de7 Author: Kuninori Morimoto Date: Wed Oct 2 14:34:48 2019 +0900 ASoC: fsl: fsl_dma: don't use snd_soc_rtdcom_lookup() snd_soc_rtdcom_lookup() will be removed. It is used at fsl_dma_isr(), but it is just for dev_err(dev..). rtd->dev is very enough for it. This patch replace component->dev to rtd->dev Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877e5n90cn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 17a29fea086ba18b000d28439bd5cb4f2b0a527b Author: Paul Burton Date: Mon Oct 7 23:18:06 2019 +0000 staging/octeon: Use stubs for MIPS && !CAVIUM_OCTEON_SOC When building for a non-Cavium MIPS system with COMPILE_TEST=y, the Octeon ethernet driver hits a number of issues due to use of macros provided only for CONFIG_CAVIUM_OCTEON_SOC=y configurations. For example: drivers/staging/octeon/ethernet-rx.c:190:6: error: 'CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE' undeclared (first use in this function) drivers/staging/octeon/ethernet-rx.c:472:25: error: 'OCTEON_IRQ_WORKQ0' undeclared (first use in this function) These come from various asm/ headers that a non-Octeon build will be using a non-Octeon version of. Fix this by using the octeon-stubs.h header for non-Cavium MIPS builds, and only using the real asm/octeon/ headers when building a Cavium Octeon kernel configuration. This requires that octeon-stubs.h doesn't redefine XKPHYS_TO_PHYS, which is defined for MIPS by asm/addrspace.h which is pulled in by many other common asm/ headers. Signed-off-by: Paul Burton Reported-by: Geert Uytterhoeven URL: https://lore.kernel.org/linux-mips/CAMuHMdXvu+BppwzsU9imNWVKea_hoLcRt9N+a29Q-QsjW=ip2g@mail.gmail.com/ Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") Cc: Matthew Wilcox (Oracle) Cc: David S. Miller Link: https://lore.kernel.org/r/20191007231741.2012860-1-paul.burton@mips.com Signed-off-by: Greg Kroah-Hartman commit 8903ed25e9fdf6cfd02a3a16db69e500803e16b9 Author: Kuninori Morimoto Date: Wed Oct 2 14:34:43 2019 +0900 ASoC: fsl: fsl_asrc_dma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878sq390cs.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6d1048bc115259bb2664b8ef363351428a4aef30 Author: Kuninori Morimoto Date: Wed Oct 2 14:34:38 2019 +0900 ASoC: fsl: mpc5200_dma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a7aj90cx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4ac85de9977e7361ef10be23a33313f3cf56e073 Author: Kuninori Morimoto Date: Wed Oct 2 14:34:34 2019 +0900 ASoC: fsl: fsl_dma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bluz90d1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2adc3fcc4a1f50e614cff67d8de5dcbb4a3b553d Author: Kuninori Morimoto Date: Wed Oct 2 14:34:29 2019 +0900 ASoC: fsl: imx-pcm-fiq: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d0ff90d6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit dc06bd0fc480417784bae62537f287f2d0d70089 Author: Kuninori Morimoto Date: Wed Oct 2 14:34:24 2019 +0900 ASoC: bcm: cygnus-pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eezv90db.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 85efbc911ed5ae1d458fe3fc05c4d9cfe13836d6 Author: Kuninori Morimoto Date: Wed Oct 2 14:34:20 2019 +0900 ASoC: rt5514-spi: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ftkb90df.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a30b30f00462b5bc685a39f46a7a9623ea45bdab Author: Nachammai Karuppiah Date: Mon Oct 7 22:09:13 2019 -0700 staging: rtl8723bs: os_dep: Remove typecast in kfree Remove typecast in the call to kfree as it is not needed. Issue found using the below coccinelle script, @@ type t1; expression e; @@ -kfree((t1 *)e); +kfree(e); Signed-off-by: Nachammai Karuppiah Acked-by: Julia Lawall Link: https://lore.kernel.org/r/1570511353-64646-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman commit c67855589ca0bfb86924dc0c1a2592a38c95798b Author: Javier F. Arias Date: Mon Oct 7 21:52:23 2019 -0500 staging: rtl8723bs: Remove commented code Remove commented code for a cleaner file. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/20191008025221.q4j4igctqjowur2s@gmail.com Signed-off-by: Greg Kroah-Hartman commit f806c4d55721742087073147feaa665b45088852 Author: Antonio Borneo Date: Mon Oct 7 17:43:03 2019 +0200 staging: rtl8723bs: fix typo of "mechanism" in comment Fix typo s/mechansim/mechanism/ Signed-off-by: Antonio Borneo Link: https://lore.kernel.org/r/20191007154306.95827-2-antonio.borneo@st.com Signed-off-by: Greg Kroah-Hartman commit d53c90c5d474434cdeb1518b815659fc622907ff Author: Wambui Karuga Date: Tue Oct 8 07:09:43 2019 +0300 staging: octeon: Remove typedef declaration Fixes checkpatch.pl warning: do not add new typedefs in drivers/staging/octeon/octeon-stubs.h:41 Signed-off-by: Wambui Karuga Link: https://lore.kernel.org/r/20191008040943.9283-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman commit dfd00af5e801d42ee5cdbd0e2f486da0e733b1e3 Author: Kuninori Morimoto Date: Wed Oct 2 14:34:15 2019 +0900 ASoC: dwc: dwc-pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h84r90dk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 851f5abfc83d75b9d021887bd7e89c8dd27a9bd4 Author: Kuninori Morimoto Date: Wed Oct 2 14:34:10 2019 +0900 ASoC: kirkwood: kirkwood-dma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87imp790dp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1fddf424b3c49a475ca7c23662f515b53f884172 Author: Kuninori Morimoto Date: Wed Oct 2 14:34:05 2019 +0900 ASoC: mediatek: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k19n90du.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9a0b72b71da0d50fe6e4fee2abaced10e61c48cc Author: Kuninori Morimoto Date: Wed Oct 2 14:34:00 2019 +0900 ASoC: mediatek: mtk-btcvsd: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfu390dz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bb4ba744b1701caf6148ff3b4e8656bf4f6b4758 Author: Kuninori Morimoto Date: Wed Oct 2 14:33:55 2019 +0900 ASoC: meson: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87muej90e4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f8772e17def20470f94bd1d6e1cf24badb2611de Author: Kuninori Morimoto Date: Wed Oct 2 14:33:50 2019 +0900 ASoC: pxa: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8yz90e9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 540e59c68bbcd450d711aaddddc9332507a5a504 Author: Kuninori Morimoto Date: Wed Oct 2 14:33:44 2019 +0900 ASoC: pxa: mmp-pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pnjf90ef.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2324c8f4cd35280272419df0f45b37429d3256d4 Author: Kuninori Morimoto Date: Wed Oct 2 14:33:39 2019 +0900 ASoC: qcom: q6asm-dai: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r23v90ek.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e198048bdc63b8a5f258c990b4d9ad8a08b7932a Author: Kuninori Morimoto Date: Wed Oct 2 14:33:34 2019 +0900 ASoC: qcom: q6routing: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sgob90ep.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8b83c90dbac79ae873d3099d03d9a98c0bf9ed15 Author: Kuninori Morimoto Date: Wed Oct 2 14:33:29 2019 +0900 ASoC: qcom: lpass-platform: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tv8r90eu.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 81aa377559f74f39b87423e64e475714484f2c44 Author: Colin Ian King Date: Tue Oct 8 09:22:05 2019 +0100 staging: wfx: fix spelling mistake "hexdecimal" -> "hexadecimal" There is a spelling mistake in the documentation and a module parameter description. Fix these. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191008082205.19740-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit ba40ab6275173ef9b35b466324a25921a3f49b42 Author: Kuninori Morimoto Date: Wed Oct 2 14:33:21 2019 +0900 ASoC: samsung: idma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v9t790f2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 932eaf7c790458bea89830f6801c10dda569c805 Author: Kuninori Morimoto Date: Wed Oct 2 14:33:16 2019 +0900 ASoC: sh: siu_pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wodn90f7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit db5b4ee95238d2c5e9a97f53257f6b7ea7e1caa0 Author: Kuninori Morimoto Date: Wed Oct 2 14:33:11 2019 +0900 ASoC: sh: dma-sh7760: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y2y390fc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit be513045d6fe8284e0e6f9060415d0c5189e179a Author: Kuninori Morimoto Date: Wed Oct 2 14:33:06 2019 +0900 ASoC: sh: fsi: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zhij90fh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9dcefa7232d3fd5a7141454849d46ed24c7af867 Author: Kuninori Morimoto Date: Wed Oct 2 14:33:01 2019 +0900 ASoC: sh: rsnd: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871rvvaf02.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1c91d77e1775e0d497382cc3494f42e08582f065 Author: Kuninori Morimoto Date: Wed Oct 2 14:32:56 2019 +0900 ASoC: sof: pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8736gbaf07.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit fcd6c0f9a12369ae6d500d747e668ed98ef5edd6 Author: Jérôme Pouiller Date: Tue Oct 8 09:43:01 2019 +0000 staging: wfx: avoid namespace contamination tx_policy_init() was already defined in driver cw1200. So, compilation failed when wfx and cw1200 were both built-in. In order to keep a coherent naming scheme, this patch prefixes all "tx_policy_*" functions with "wfx_". Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191008094232.10014-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b5be2aa3b3ac153f056f93406c520dc74a1cebbe Author: Jérôme Pouiller Date: Tue Oct 8 09:43:01 2019 +0000 staging: wfx: drop calls to BUG_ON() Most of calls to BUG_ON() could replaced by WARN(). By the way, this patch also try to favor WARN() (that include a comment about the problem) instead of WARN_ON(). Reported-by: Andrew Lunn Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191008094232.10014-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 51f589c82f6d4b3c9e417b39141836fb3db86093 Author: Jérôme Pouiller Date: Tue Oct 8 09:43:00 2019 +0000 staging: wfx: fix copy_{to,from}_user() usage On error, copy_to_user() returns number of bytes remaining. Driver should return -EFAULT. Fixes: 4f8b7fabb15d ("staging: wfx: allow to send commands to chip") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191008094232.10014-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 53707c85d2c1ffe844266368cb7c7db137161881 Author: Jérôme Pouiller Date: Tue Oct 8 09:43:00 2019 +0000 staging: wfx: correctly cast data on big-endian targets When built for a big-endian target, original code caused error: include/uapi/linux/swab.h:242:29: note: expected '__u32 * {aka unsigned int *}' but argument is of type 'struct hif_mib_protected_mgmt_policy *' Fixes: f95a29d40782 ("staging: wfx: add HIF commands helpers") Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191008094232.10014-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 6702eed85b40a3106aa532880fc8f0bfa8103c52 Author: Kuninori Morimoto Date: Wed Oct 2 14:32:51 2019 +0900 ASoC: sprd: sprd-pcm-dma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874l0raf0c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 21499089765f1e8f69998c0506f69158db821c14 Author: Kuninori Morimoto Date: Wed Oct 2 14:32:46 2019 +0900 ASoC: stm: stm32_adfsdm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875zl7af0h.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a857e073ffc67f95ddd6f3f427d0a62edd633d7d Author: Kuninori Morimoto Date: Wed Oct 2 14:32:41 2019 +0900 ASoC: txx9: txx9aclc: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877e5naf0m.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c645ea1179a4c22ddf58f32be7f69284eae98566 Author: Kuninori Morimoto Date: Wed Oct 2 14:32:36 2019 +0900 ASoC: uniphier: aio-dma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878sq3af0r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2bcba42492bf9579c5804692828c56d55b95c1ad Author: Kuninori Morimoto Date: Wed Oct 2 14:32:29 2019 +0900 ASoC: xilinx: xlnx_formatter_pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bluzaf0y.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 17d48a3186bd7433c3cccabd767c7d7a19b76362 Author: Kuninori Morimoto Date: Wed Oct 2 14:32:23 2019 +0900 ASoC: xtensa: xtfpga-i2s: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d0ffaf14.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 297bdfd4f59ce9797d600589760554eb30f6a5f7 Author: Kuninori Morimoto Date: Wed Oct 2 14:32:13 2019 +0900 ASoC: au1x: dma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eezvaf1f.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 58c2dbe110df85c8c07a3ce4033bcda265d39f07 Author: Kuninori Morimoto Date: Wed Oct 2 14:32:07 2019 +0900 ASoC: au1x: dbdma2: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ftkbaf1k.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a94e3f2dd25c8d5496dbde0e61a73f31adfaddfe Author: Kuninori Morimoto Date: Wed Oct 2 14:32:03 2019 +0900 ASoC: atmel: atmel-pcm-pdc: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h84raf1o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8c028a4038ec4d4580971ff0aad86124b684994d Author: Kuninori Morimoto Date: Wed Oct 2 14:31:58 2019 +0900 ASoC: amd: acp-pcm-dma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87imp7af1t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f52368f36443b4f77758999e34e7a6b54c4b3471 Author: Kuninori Morimoto Date: Wed Oct 2 14:31:53 2019 +0900 ASoC: amd: acp3x-pcm-dma: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k19naf1y.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bb3613515e96d02f665190091e7a0209d7985f8b Author: Kuninori Morimoto Date: Wed Oct 2 14:31:47 2019 +0900 ASoC: intel: sst-baytrail-pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfu3af24.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9b9974d3d5d732a3897c9fa08f43aff65f917738 Author: Kuninori Morimoto Date: Wed Oct 2 14:31:41 2019 +0900 ASoC: intel: sst-mfld-platform-pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87muejaf2a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3507bb5fe46d12f517b68ea612159376c7ccce09 Author: Kuninori Morimoto Date: Wed Oct 2 14:31:36 2019 +0900 ASoC: intel: skl-pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. *Note* Only Intel skl-pcm has .get_time_info implementation, but ALSA SoC framework doesn't call it so far. To keep its implementation, this patch keeps .get_time_info, but it is still not called. Intel guy need to support it in the future. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8yzaf2f.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6d68ac8b5b5c27013a8223766cd8d397229c7802 Author: Jérôme Pouiller Date: Tue Oct 8 09:42:59 2019 +0000 staging: wfx: le16_to_cpus() takes a reference as parameter Original code caused an (100% reproducible) invalid memory access on big-endian targets. Fixes: b0998f0c040d "staging: wfx: add IRQ handling" Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191008094232.10014-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 86c05f3446ec4d8772e9d34b428d2e70c7f68e7a Author: Kuninori Morimoto Date: Wed Oct 2 14:31:21 2019 +0900 ASoC: intel: sst-haswell-pcm: remove snd_pcm_ops snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pnjfaf2u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 488d349061fa0ae61d5a50118e7d9cf2d28f03b5 Author: Jérôme Pouiller Date: Tue Oct 8 09:42:59 2019 +0000 staging: wfx: remove misused call to cpu_to_le16() Indeed, hif_msg->id is a uint8_t, so use of cpu_to_le16() is a madness. Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191008094232.10014-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c54f9f0e8c81192b17e2ae2eb7af6a037fd250a5 Author: Jérôme Pouiller Date: Tue Oct 8 09:42:58 2019 +0000 staging: wfx: simplify memory allocation in wfx_update_filtering() Original code did not handle case where kmalloc failed. By the way, it is more convenient to allocate and build HIF message in hif_set_beacon_filter_table() instead of to ask to caller function to build it. Fixes: 40115bbc40e2 ("staging: wfx: implement the rest of mac80211 API") Reported-by: kbuild test robot Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191008094232.10014-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8ec241c495dde3d19a0459304298c2468c60182b Author: Kuninori Morimoto Date: Wed Oct 2 14:31:06 2019 +0900 ASoC: soc-core: add snd_soc_pcm_lib_ioctl() add snd_soc_pcm_lib_ioctl() to bypass to snd_pcm_lib_ioctl() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r23vaf39.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c64bfc9066007962fca1b9b2d426b1efc171cac9 Author: Kuninori Morimoto Date: Wed Oct 2 14:30:59 2019 +0900 ASoC: soc-core: add new pcm_construct/pcm_destruct Current snd_soc_component_driver has pcm_new/pcm_free, but, it doesn't have "component" at parameter. Thus, each callback can't know it is called for which component. Each callback currently is getting "component" by using snd_soc_rtdcom_lookup() with driver name. It works today, but, will not work in the future if we support multi CPU/Codec/Platform, because 1 rtd might have multiple same driver name component. To solve this issue, each callback need to be called with component. This patch adds new pcm_construct/pcm_destruct with "component" parameter. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sgobaf3g.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e2cb4a14541dba3587bb78e0f62da27a0e1ad399 Author: Kuninori Morimoto Date: Wed Oct 2 14:30:48 2019 +0900 ASoC: soc-core: merge snd_pcm_ops member to component driver Current snd_soc_component_driver has snd_pcm_ops, and each driver can have callback via it (1). But, it is mainly created for ALSA, thus, it doesn't have "component" as parameter for ALSA SoC (1)(2). Thus, each callback can't know it is called for which component. Thus, each callback currently is getting "component" by using snd_soc_rtdcom_lookup() with driver name (3). --- ALSA SoC --- ... if (component->driver->ops && component->driver->ops->open) (1) return component->driver->ops->open(substream); ... --- driver --- (2) static int xxx_open(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; (3) struct snd_soc_component *component = snd_soc_rtdcom_lookup(..); ... } It works today, but, will not work in the future if we support multi CPU/Codec/Platform, because 1 rtd might have multiple components which have same driver name. To solve this issue, each callback needs to be called with component. We already have many component driver callback. This patch copies each snd_pcm_ops member under component driver, and having "component" as parameter. --- ALSA SoC --- ... if (component->driver->open) => return component->driver->open(component, substream); ... --- driver --- => static int xxx_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { ... } *Note* Only Intel skl-pcm has .get_time_info implementation, but ALSA SoC framework doesn't call it so far. To keep its implementation, this patch keeps .get_time_info, but it is still not called. Intel guy need to support it in the future. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tv8raf3r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9e985503ee4b23d576c303a17dfe52cfc8f32727 Author: Jiaxin Yu Date: Fri Sep 27 18:31:57 2019 +0800 ASoC: mt8183: fix audio playback slowly after playback during bootup Before regmap_reinit_cache we must reset audio regs as default values. So we use reset controller unit(toprgu) to reset audio hw. Signed-off-by: Jiaxin Yu Reviewed-by: Yingjoe Chen Link: https://lore.kernel.org/r/1569580317-21181-5-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 8d6aa1367a7df44bb5939c4bb2727b8d8f7d01b3 Author: Jiaxin Yu Date: Fri Sep 27 18:31:56 2019 +0800 dt-bindings: medaitek: mt8183: add property "resets" && "reset-names" This patch add property "resets" && "reset-names" in examples so that we can use reset controller to reset audio domain regs. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1569580317-21181-4-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit cfc28ac124c456ffbff5b34d4108d8a201cd7fbb Author: Peter Ujfalusi Date: Tue Oct 8 14:57:20 2019 +0300 ASoC: pcm3168a: Use fixup instead of constraint for channels and formats The snd_pcm_hw_constraint_minmax() works fine when a single codec is connected to a single CPU DAI, but in multicodec or DPCM setup the constraints placed by the driver will apply to the whole PCM stream (FE included) and thus prevents more than 8 playback channels for example. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191008115720.7135-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 5d2af8bcd4939d0f3d5061cc3b7783fd26311828 Author: Vladimir Oltean Date: Thu Sep 5 04:01:14 2019 +0300 spi: spi-fsl-dspi: Always use the TCFQ devices in poll mode With this patch, the "interrupts" property from the device tree bindings is ignored, even if present, if the driver runs in TCFQ mode. Switching to using the DSPI in poll mode has several distinct benefits: - With interrupts, the DSPI driver in TCFQ mode raises an IRQ after each transmitted word. There is more time wasted for the "waitq" event than for actual I/O. And the DSPI IRQ count can easily get the largest in /proc/interrupts on Freescale boards with attached SPI devices. - The SPI I/O time is both lower, and more consistently so. Attached to some Freescale devices are either PTP switches, or SPI RTCs. For reading time off of a SPI slave device, it is important that all SPI transfers take a deterministic time to complete. - In poll mode there is much less time spent by the CPU in hardirq context, which helps with the response latency of the system, and at the same time there is more control over when interrupts must be disabled (to get a precise timestamp measurement): win-win. On the LS1021A-TSN board, where the SPI device is a SJA1105 PTP switch (with a bits_per_word=8 driver), I created a "benchmark" where I read its PTP time once per second, for 120 seconds. Each "read PTP time" is a 12-byte SPI transfer. I then recorded the time before putting the first byte in the TX FIFO, and the time after reading the last byte from the RX FIFO. That is the transfer delay in nanoseconds. Interrupt mode: delay: min 125120 max 168320 mean 150286 std dev 17675.3 Poll mode: delay: min 69440 max 119040 mean 70312.9 std dev 8065.34 Both the mean latency and the standard deviation are more than 50% lower in poll mode than in interrupt mode. This is with an 'ondemand' governor on an otherwise idle system - therefore running mostly at 600 MHz out of a max of 1200 MHz. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20190905010114.26718-5-olteanv@gmail.com Signed-off-by: Mark Brown commit 9306a733f8eac86400b9149db6d047dc371e46a2 Author: Axel Lin Date: Tue Oct 8 09:06:28 2019 +0800 regulator: rk808: Remove rk817_set_suspend_voltage function The implement is exactly the same as rk808_set_suspend_voltage, so just use rk808_set_suspend_voltage instead. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20191008010628.8513-3-axel.lin@ingics.com Signed-off-by: Mark Brown commit cc37038fe344e6000d30879c27521ee47c534fc8 Author: Axel Lin Date: Tue Oct 8 09:06:27 2019 +0800 regulator: rk808: Fix warning message in rk817_set_ramp_delay The default in rk817_set_ramp_delay is 25MV rather than 10MV. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20191008010628.8513-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 2e67f32296e3f1841793e36ce796f1497614c687 Author: Axel Lin Date: Tue Oct 8 09:06:26 2019 +0800 regulator: rk808: Constify rk817 regulator_ops These regulator_ops variables never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20191008010628.8513-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 2d6ebaa98be1dd265aa6d99a00c150f1f9f2ea66 Author: Miquel Raynal Date: Fri Oct 4 16:27:18 2019 +0200 arm64: dts: marvell: Enumerate the first AP806 syscon There are two system controllers in the AP80x, like for ap_syscon1, enumerate the first one by renaming it s/ap_syscon/ap_syscon0/. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 90b9dc96940cb8a23f2aac307a7cb3e036d79c47 Author: Chris Packham Date: Fri Sep 27 11:28:20 2019 +1200 ARM: dts: armada-xp: add label to sdram-controller node Add the label "sdramc" to the sdram-controller nodes for the Armada-XP and 98dx3236 SoCs. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT commit 042fa3dcd5e9884119afdba4d2691c3842e86558 Author: Chris Packham Date: Fri Sep 27 11:28:19 2019 +1200 ARM: dts: mvebu: add sdram controller node to Armada-38x The Armada-38x uses an SDRAM controller that is compatible with the Armada-XP. The key difference is the width of the bus (XP is 64/32, 38x is 32/16). The SDRAM controller registers are the same between the two SoCs. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT commit da29334c751187b0bb89bdfa6c0302697848fa1a Author: Chris Packham Date: Fri Sep 27 11:28:18 2019 +1200 ARM: dts: armada-xp: enable L2 cache parity and ecc on db-xc3-24g4xg Enable L2 cache parity and ECC on the db-xc3-24g4xg board so that cache operations are protected and errors can be flagged to the EDAC subsystem. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT commit 3e53032406dfbc17e3866ea660f193433e009cf2 Author: Krzysztof Kozlowski Date: Wed Oct 2 18:43:11 2019 +0200 ARM: dts: dove: Rename "sa-sram" node to "sram" The device node name should reflect generic class of a device so rename the "sa-sram" node to "sram". This will be also in sync with upcoming DT schema. No functional change. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit 15382b7ea298de5ec79be7c26e5f5c03b27829a1 Author: Walter Schweizer Date: Sat Sep 28 12:53:44 2019 +0200 ARM: dts: kirkwood: synology: Fix rs5c372 RTC entry In the rtc-rs5c372.c driver the compatible entry has been renamed from rs5c372 to rs5c372a. Most dts files have been adapted. This patch completes the change. Signed-off-by: Walter Schweizer Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit ac524481d7f72d46805bcaa6595f233236c92132 Author: Haishuang Yan Date: Fri Sep 27 12:54:51 2019 +0800 ipvs: batch __ip_vs_dev_cleanup It's better to batch __ip_vs_cleanup to speedup ipvs devices dismantle. Signed-off-by: Haishuang Yan Acked-by: Julian Anastasov Signed-off-by: Simon Horman commit 5d5a0815f854a5b0e21d97e16cfadad69ce5fb04 Author: Haishuang Yan Date: Fri Sep 27 12:54:50 2019 +0800 ipvs: batch __ip_vs_cleanup It's better to batch __ip_vs_cleanup to speedup ipvs connections dismantle. Signed-off-by: Haishuang Yan Acked-by: Julian Anastasov Signed-off-by: Simon Horman commit c09b8970fb47b22c6cf1e03e494265540327f59d Author: zhang kai Date: Mon Sep 30 13:14:55 2019 +0800 ipvs: no need to update skb route entry for local destination packets. In the end of function __ip_vs_get_out_rt/__ip_vs_get_out_rt_v6,the 'local' variable is always zero. Signed-off-by: zhang kai Acked-by: Julian Anastasov Signed-off-by: Simon Horman commit 3de1627851321fc5589b2a49bf52755a60c8276f Author: Chris Wilson Date: Tue Oct 8 08:11:21 2019 +0100 drm/i915/selftests: Assign the mock_engine->uncore shortcut Set up the engine->uncore shortcut on mock_engine creation. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191008071121.25088-1-chris@chris-wilson.co.uk commit 20af04f3dd567970508d5ad756e1777ba1286815 Author: Chris Wilson Date: Tue Oct 8 08:03:42 2019 +0100 drm/i915/execlists: Assign virtual_engine->uncore from first sibling Copy across the engine->uncore shortcut to the virtual_engine from its first physical engine, similar to the handling of the engine->gt backpointer. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191008070342.4045-1-chris@chris-wilson.co.uk commit 39014c45467f0a655ae77f98be549a0a4ba5cfe1 Author: Valentin Schneider Date: Mon Sep 23 15:36:16 2019 +0100 microblaze: entry: Remove unneeded need_resched() loop Since the enabling and disabling of IRQs within preempt_schedule_irq() is contained in a need_resched() loop, we don't need the outer arch code loop. Signed-off-by: Valentin Schneider Cc: Michal Simek Signed-off-by: Michal Simek commit 41286861b4c9abdb4e0b32c6caa0967780e6f803 Author: Anshuman Gupta Date: Thu Oct 3 13:47:38 2019 +0530 drm/i915/tgl: Add DC3CO counter in i915_dmc_info Adding DC3CO counter in i915_dmc_info debugfs will be useful for DC3CO validation. DMC firmware uses DMC_DEBUG3 register as DC3CO counter register on TGL, as per B.Specs DMC_DEBUG3 is general purpose register. v1: comment modification for DMC_DBUG3. using GEN >= 12 check instead of IS_TIGERLAKE() to print DMC_DEBUG3 counter value. Cc: Jani Nikula Cc: Imre Deak Cc: Animesh Manna Reviewed-by: Imre Deak Signed-off-by: Anshuman Gupta Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191003081738.22101-7-anshuman.gupta@intel.com commit 1c4d821db919366034dc9ff4c01b4b0da0b8e30f Author: Anshuman Gupta Date: Thu Oct 3 13:47:37 2019 +0530 drm/i915/tgl: Switch between dc3co and dc5 based on display idleness DC3CO is useful power state, when DMC detects PSR2 idle frame while an active video playback, playing 30fps video on 60hz panel is the classic example of this use case. B.Specs:49196 has a restriction to enable DC3CO only for Video Playback. It will be worthy to enable DC3CO after completion of each pageflip and switch back to DC5 when display is idle because driver doesn't differentiate between video playback and a normal pageflip. We will use Frontbuffer flush call tgl_dc3co_flush() to enable DC3CO state only for ORIGIN_FLIP flush call, because DC3CO state has primarily targeted for VPB use case. We are not interested here for frontbuffer invalidates calls because that triggers PSR2 exit, which will explicitly disable DC3CO. DC5 and DC6 saves more power, but can't be entered during video playback because there are not enough idle frames in a row to meet most PSR2 panel deep sleep entry requirement typically 4 frames. As PSR2 existing implementation is using minimum 6 idle frames for deep sleep, it is safer to enable DC5/6 after 6 idle frames (By scheduling a delayed work of 6 idle frames, once DC3CO has been enabled after a pageflip). After manually waiting for 6 idle frames DC5/6 will be enabled and PSR2 deep sleep idle frames will be restored to 6 idle frames, at this point DMC will triggers DC5/6 once PSR2 enters to deep sleep after 6 idle frames. In future when we will enable S/W PSR2 tracking, we can change the PSR2 required deep sleep idle frames to 1 so DMC can trigger the DC5/6 immediately after S/W manual waiting of 6 idle frames get complete. v2: calculated s/w state to switch over dc3co when there is an update. [Imre] Used cancel_delayed_work_sync() in order to avoid any race with already scheduled delayed work. [Imre] v3: Cancel_delayed_work_sync() may blocked the commit work. hence dropping it, dc5_idle_thread() checks the valid wakeref before putting the reference count, which avoids any chances of dropping a zero wakeref. [Imre (IRC)] v4: Used frontbuffer flush mechanism. [Imre] v5: Used psr.pipe to extract frontbuffer busy bits. [Imre] Used cancel_delayed_work_sync() in encoder disable path. [Imre] Used mod_delayed_work() instead of cancelling and scheduling a delayed work. [Imre] Used psr.lock in tgl_dc5_idle_thread() to enable psr2 deep sleep. [Imre] Removed DC5_REQ_IDLE_FRAMES macro. [Imre] v6: Used dc3co_exitline check instead of TGL and dc3co allowed_dc_mask checks, used delayed_work_pending with the psr lock and removed the psr2_deep_slp_disabled flag. [Imre] v7: Code refactoring, moved most of functional code to inte_psr.c [Imre] Using frontbuffer_bits on psr.pipe check instead of busy_frontbuffer_bits. [Imre] Calculating dc3co_exit_delay in intel_psr_enable_locked. [Imre] Cc: Jani Nikula Cc: Imre Deak Cc: Animesh Manna Reviewed-by: Imre Deak Signed-off-by: Anshuman Gupta Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191003081738.22101-6-anshuman.gupta@intel.com commit bdacf0871f8771c2763b53efb9f9aa9bdea7b570 Author: Anshuman Gupta Date: Thu Oct 3 13:47:36 2019 +0530 drm/i915/tgl: Do modeset to enable and configure DC3CO exitline DC3CO enabling B.Specs sequence requires to enable end configure exit scanlines to TRANS_EXITLINE register, programming this register has to be part of modeset sequence as this can't be change when transcoder or port is enabled. When system boots with only eDP panel there may not be real modeset as BIOS has already programmed the necessary registers, therefore it needs to force a modeset to enable and configure DC3CO exitline. v1: Computing dc3co_exitline crtc state from a DP encoder compute config. [Imre] Enabling and disabling DC3CO PSR2 transcoder exitline from encoder pre_enable and post_disable hooks. [Imre] Computing dc3co_exitline instead of has_dc3co_exitline bool. [Imre] v2: Code refactoring for symmetry and to avoid exported function. [Imre] Removing IS_TIGERLAKE check from compute_config, adding PIPE_A restriction and clearing dc3co_exitline state if crtc is not active or it is not PSR2 capable in dc3co exitline compute_config. [Imre] Using GEN >= 12 check in dc3co exitline get_config. [Imre] Cc: Jani Nikula Cc: Imre Deak Cc: Animesh Manna Reviewed-by: Imre Deak Signed-off-by: Anshuman Gupta Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191003081738.22101-5-anshuman.gupta@intel.com commit 4645e906f2d40ff4000c78373bb932f713259611 Author: Anshuman Gupta Date: Thu Oct 3 13:47:35 2019 +0530 drm/i915/tgl: Enable DC3CO state in "DC Off" power well Add target_dc_state and used by set_target_dc_state API in order to enable DC3CO state with existing DC states. target_dc_state will enable/disable the desired DC state in DC_STATE_EN reg when "DC Off" power well gets disable/enable. v2: commit log improvement. v3: Used intel_wait_for_register to wait for DC3CO exit. [Imre] Used gen9_set_dc_state() to allow/disallow DC3CO. [Imre] Moved transcoder psr2 exit line enablement from tgl_allow_dc3co() to a appropriate place haswell_crtc_enable(). [Imre] Changed the DC3CO power well enabled call back logic as recommended in review comments. [Imre] v4: Used wait_for_us() instead of intel_wait_for_reg(). [Imre (IRC)] v5: using udelay() instead of waiting for DC3CO exit status. v6: Fixed minor unwanted change. v7: Removed DC3CO powerwell and POWER_DOMAIN_VIDEO. v8: Uniform checks by using only target_dc_state instead of allowed_dc_mask in "DC off" power well callback. [Imre] Adding "DC off" power well id to older platforms. [Imre] Removed psr2_deep_sleep flag from tgl_set_target_dc_state. [Imre] v9: Used switch case for target DC state in gen9_dc_off_power_well_disable(), checking DC3CO state against allowed DC mask, using WARN_ON() in tgl_set_target_dc_state(). [Imre] v10: Code refactoring and using sanitize_target_dc_state(). [Imre] Cc: Jani Nikula Cc: Imre Deak Cc: Animesh Manna Reviewed-by: Imre Deak Signed-off-by: Anshuman Gupta Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191003081738.22101-4-anshuman.gupta@intel.com commit 19c79ff82b4ad95c6ce1a101dc238a643cea3835 Author: Anshuman Gupta Date: Thu Oct 3 13:47:34 2019 +0530 drm/i915/tgl: Add DC3CO mask to allowed_dc_mask and gen9_dc_mask Enable dc3co state in enable_dc module param and add dc3co enable mask to allowed_dc_mask and gen9_dc_mask. v1: Adding enable_dc=3,4 options to enable DC3CO with DC5 and DC6 independently. [Animesh] v2: Using a switch statement for cleaner code. [Animesh] Cc: Jani Nikula Cc: Imre Deak Cc: Animesh Manna Reviewed-by: Animesh Manna Reviewed-by: Imre Deak Signed-off-by: Anshuman Gupta Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191003081738.22101-3-anshuman.gupta@intel.com commit e45e0003f60d3e9d62d9bb42d72efbbada7132bc Author: Anshuman Gupta Date: Mon Oct 7 15:16:07 2019 +0530 drm/i915/tgl: Add DC3CO required register and bits Adding following definition to i915_reg.h 1. DC_STATE_EN register DC3CO bit fields and masks. DC3CO enable bit will be used by driver to make DC3CO ready for DMC f/w and status bit will be used as DC3CO entry status. 2. Transcoder EXITLINE register and its bit fields and mask. Transcoder EXITLINE enable bit represents PSR2 idle frame reset should be applied at exit line and exitlines mask represent required number of scanlines at which DC3CO exit happens. B.Specs:49196 v1: Use of REG_BIT and using extra space for EXITLINE_ macro definition. [Animesh] v2: Grouping EXITLINE reg bits with EXITLINE(trans) define, no functional change. [Ville] Cc: Jani Nikula Cc: Imre Deak Cc: Animesh Manna Reviewed-by: Animesh Manna Reviewed-by: Imre Deak Signed-off-by: Anshuman Gupta Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191007094607.2111-1-anshuman.gupta@intel.com commit 3e917975b7cdef6cfe92931e04677d8cf1d3df98 Author: Alexander Usyskin Date: Tue Oct 8 03:57:35 2019 +0300 mei: me: fix me_intr_clear function name in KDoc Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191008005735.12707-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 73668309215285366c433489de70d31362987be9 Author: Alexander Usyskin Date: Tue Oct 8 03:57:34 2019 +0300 mei: fix modalias documentation mei client bus added the client protocol version to the device alias, but ABI documentation was not updated. Fixes: b26864cad1c9 (mei: bus: add client protocol version to the device alias) Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191008005735.12707-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 7d47433cf74f942a414171867d89c08640cfef45 Author: Yamin Friedman Date: Mon Oct 7 16:59:31 2019 +0300 net/mlx5: Expose optimal performance scatter entries capability Expose maximum scatter entries per RDMA READ for optimal performance. Signed-off-by: Yamin Friedman Reviewed-by: Or Gerlitz Reviewed-by: Christoph Hellwig Signed-off-by: Leon Romanovsky commit be4fe445a6d5a6b15676912cff3dd0437d55f1e2 Author: Jerome Brunet Date: Wed Oct 2 11:15:29 2019 +0200 clk: meson: axg_audio: add sm1 support Add sm1 support the axg audio clock controllers. This new version is indeed derived from the previous generation, as always, adding a few new clocks to the mix. The number of gates now exceeds 32 and do not fit in a single register. Unfortunately, designers chose to introduce the new gate register immediately after the original one, at the beginning of the register space, shifting all the master clock register offsets. The sm1 also introduce a few mux and divider on the top clock path, possibly to lower the peripheral clocks of the audio blocks if necessary. Reviewed-by: Neil Armstrong Signed-off-by: Jerome Brunet commit cf52db456fd02dc7a145a4f181c8490a1dfa26d9 Author: Jerome Brunet Date: Wed Oct 2 11:15:28 2019 +0200 clk: meson: axg-audio: provide clk top signal name The peripheral clock on the sm1 goes through some muxes and dividers before reaching the audio gates. To model that, without repeating our self too much, the "top" clock signal is introduced and will serve as a the parent of the gates. On the axg and g12a, the top clock is just a pass-through to the audio peripheral clock provided by the main controller. Reviewed-by: Neil Armstrong Signed-off-by: Jerome Brunet commit 8ff93f2832492c5f290f7dd8d43ee66c7f8d997f Author: Jerome Brunet Date: Wed Oct 2 11:15:27 2019 +0200 clk: meson: axg-audio: prepare sm1 addition Rearrange the macro definition of the clocks of the axg-audio controller. Also, the sm1 variant will feature tiny modification of different blocks in this controller. Because of that, we need to fallback to the old way of defining parent for some of the clocks, using signal name. Reviewed-by: Neil Armstrong Signed-off-by: Jerome Brunet commit 255cab9d27d78703f7450d720859ee146d0ee6e1 Author: Jerome Brunet Date: Wed Oct 2 11:15:26 2019 +0200 clk: meson: axg-audio: fix regmap last register Since the addition of the g12a, the last register is AUDIO_CLK_SPDIFOUT_B_CTRL. Fixes: 075001385c66 ("clk: meson: axg-audio: add g12a support") Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet commit 38340cb2ac4a814e74f36d80752a343b4747afc5 Author: Jerome Brunet Date: Wed Oct 2 11:15:25 2019 +0200 clk: meson: axg-audio: remove useless defines Defining the number of each input type is no longer necessary since we are not using the clk-input hack anymore Fixes: 282420eed23f ("clk: meson: axg-audio: migrate to the new parent description method") Acked-by: Neil Armstrong Signed-off-by: Jerome Brunet commit 44ef8697416f4ea91eabe1223c5069911f1b9da6 Merge: 90b171f60356 aa03ea9bce8c Author: Jerome Brunet Date: Tue Oct 8 09:28:52 2019 +0200 Merge branch 'v5.5/dt' into v5.5/drivers commit 9d40b85bb46a99bc95dad3a07787da93b0a018e9 Author: Babu Moger Date: Mon Oct 7 15:48:39 2019 -0500 x86/cpufeatures: Add feature bit RDPRU on AMD AMD Zen 2 introduces a new RDPRU instruction which is used to give access to some processor registers that are typically only accessible when the privilege level is zero. ECX is used as the implicit register to specify which register to read. RDPRU places the specified register’s value into EDX:EAX. For example, the RDPRU instruction can be used to read MPERF and APERF at CPL > 0. Add the feature bit so it is visible in /proc/cpuinfo. Details are available in the AMD64 Architecture Programmer’s Manual: https://www.amd.com/system/files/TechDocs/24594.pdf Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Aaron Lewis Cc: ak@linux.intel.com Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: "Peter Zijlstra (Intel)" Cc: robert.hu@linux.intel.com Cc: Thomas Gleixner Cc: Thomas Hellstrom Cc: x86-ml Link: https://lkml.kernel.org/r/20191007204839.5727.10803.stgit@localhost.localdomain commit aa03ea9bce8c4e45749077254f376b236026f6a0 Author: Jerome Brunet Date: Wed Oct 2 11:15:24 2019 +0200 dt-bindings: clock: meson: add sm1 resets to the axg-audio controller Add the reset id of the sm1 audio clock controller Reviewed-by: Neil Armstrong Signed-off-by: Jerome Brunet commit 0ea0a188fdc5ace5afd0e25c87575c5fc1ae7e89 Author: Jerome Brunet Date: Wed Oct 2 11:15:23 2019 +0200 dt-bindings: clk: axg-audio: add sm1 bindings Add the compatible and clock ids of the sm1 audio clock controller Reviewed-by: Neil Armstrong Signed-off-by: Jerome Brunet commit a4c969d107a66369e6b8bf6b2fa28ca01723133b Author: Chris Wilson Date: Mon Oct 7 22:09:42 2019 +0100 drm/i915/perf: Set the exclusive stream under perf->lock The BKL struct_mutex is no more, the only serialisation we required for setting the exclusive stream is already managed by ce->pin_mutex in gen8_configure_all_contexts(). As such, we can manipulate i915_perf.exclusive_stream underneath our own (already held) perf->lock. Signed-off-by: Chris Wilson Cc: Umesh Nerlige Ramappa Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191007140812.10963-2-chris@chris-wilson.co.uk Link: https://patchwork.freedesktop.org/patch/msgid/20191007210942.18145-2-chris@chris-wilson.co.uk commit 8f8b1171e1a514c2fdfd388b662a7e5b34e839a8 Author: Chris Wilson Date: Mon Oct 7 22:09:41 2019 +0100 drm/i915/perf: Wean ourselves off dev_priv Use the local uncore accessors for the GT rather than using the [not-so] magic global dev_priv mmio routines. In the process, we also teach the perf stream to use backpointers to the i915_perf rather than digging it out of dev_priv. v2: Rebase onto i915_perf_types.h Signed-off-by: Chris Wilson Cc: Umesh Nerlige Ramappa Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191007140812.10963-1-chris@chris-wilson.co.uk Link: https://patchwork.freedesktop.org/patch/msgid/20191007210942.18145-1-chris@chris-wilson.co.uk commit d30213e533fa73929b6af48a5b0e5761879d7db2 Author: Krzysztof Kozlowski Date: Mon Oct 7 19:33:46 2019 +0200 drm/i915: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191007173346.9379-1-krzk@kernel.org commit 351170463471d2037aa034625d05f185e6d85f80 Author: Ondrej Jirman Date: Mon Oct 7 22:31:52 2019 +0200 arm64: dts: allwinner: orange-pi-3: Enable UART1 / Bluetooth The board contains AP6256 WiFi/BT module that has its bluetooth part connected to SoC's UART1 port. Enable this port, and add node for the bluetooth device. Bluetooth part is named bcm4345c5. You'll need a BCM4345C5.hcd firmware file that can be found in the Xulongs's repository for H6: https://github.com/orangepi-xunlong/OrangePiH6_external/tree/master/ap6256 The driver expects the firmware at the following path relative to the firmware directory: brcm/BCM4345C5.hcd Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard commit cd380e0d00b2b21506f9319a626b6205e9d64aae Author: Ondrej Jirman Date: Mon Oct 7 22:31:51 2019 +0200 arm64: dts: allwinner: h6: Add pin configs for uart1 Orange Pi 3 uses UART1 for bluetooth. Add pinconfigs so that we can use them. Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard commit 9a197c862f0d0863a61715a056c16b07d18aa5d8 Author: Jagan Teki Date: Mon Oct 7 00:03:00 2019 +0800 drm/sun4i: dsi: Fix video start delay computation The LCD timing definitions between Linux DRM vs Allwinner are different, below diagram shows this clear differences. Active Front Sync Back Region Porch Porch <-----------------------><----------------><--------------><--------------> //////////////////////| ////////////////////// | ////////////////////// |.................. ................ ________________ <----- [hv]display -----> <------------- [hv]sync_start ------------> <--------------------- [hv]sync_end ----------------------> <-------------------------------- [hv]total ------------------------------> <----- lcd_[xy] --------> <- lcd_[hv]spw -> <---------- lcd_[hv]bp ---------> <-------------------------------- lcd_[hv]t ------------------------------> The DSI driver misinterpreted the vbp term from the BSP code to refer only to the backporch, when in fact it was backporch + sync. Thus the driver incorrectly used the vertical front porch plus sync in its calculation of the DRQ set bit value, when it should not have included the sync timing. Including additional sync timings leads to flip_done timed out as: WARNING: CPU: 0 PID: 31 at drivers/gpu/drm/drm_atomic_helper.c:1429 drm_atomic_helper_wait_for_vblanks.part.1+0x298/0x2a0 [CRTC:46:crtc-0] vblank wait timed out Modules linked in: CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 5.1.0-next-20190514-00029-g09e5b0ed0a58 #18 Hardware name: Allwinner sun8i Family Workqueue: events deferred_probe_work_func [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x84/0x98) [] (dump_stack) from [] (__warn+0xfc/0x114) [] (__warn) from [] (warn_slowpath_fmt+0x44/0x68) [] (warn_slowpath_fmt) from [] (drm_atomic_helper_wait_for_vblanks.part.1+0x298/0x2a0) [] (drm_atomic_helper_wait_for_vblanks.part.1) from [] (drm_atomic_helper_commit_tail_rpm+0x5c/0x6c) [] (drm_atomic_helper_commit_tail_rpm) from [] (commit_tail+0x40/0x6c) [] (commit_tail) from [] (drm_atomic_helper_commit+0xbc/0x128) [] (drm_atomic_helper_commit) from [] (restore_fbdev_mode_atomic+0x1cc/0x1dc) [] (restore_fbdev_mode_atomic) from [] (drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xa0) [] (drm_fb_helper_restore_fbdev_mode_unlocked) from [] (drm_fb_helper_set_par+0x30/0x54) [] (drm_fb_helper_set_par) from [] (fbcon_init+0x560/0x5ac) [] (fbcon_init) from [] (visual_init+0xbc/0x104) [] (visual_init) from [] (do_bind_con_driver+0x1b0/0x390) [] (do_bind_con_driver) from [] (do_take_over_console+0x13c/0x1c4) [] (do_take_over_console) from [] (do_fbcon_takeover+0x74/0xcc) [] (do_fbcon_takeover) from [] (notifier_call_chain+0x44/0x84) [] (notifier_call_chain) from [] (__blocking_notifier_call_chain+0x48/0x60) [] (__blocking_notifier_call_chain) from [] (blocking_notifier_call_chain+0x18/0x20) [] (blocking_notifier_call_chain) from [] (register_framebuffer+0x1e0/0x2f8) [] (register_framebuffer) from [] (__drm_fb_helper_initial_config_and_unlock+0x2fc/0x50c) [] (__drm_fb_helper_initial_config_and_unlock) from [] (drm_fbdev_client_hotplug+0xe8/0x1b8) [] (drm_fbdev_client_hotplug) from [] (drm_fbdev_generic_setup+0x88/0x118) [] (drm_fbdev_generic_setup) from [] (sun4i_drv_bind+0x128/0x160) [] (sun4i_drv_bind) from [] (try_to_bring_up_master+0x164/0x1a0) [] (try_to_bring_up_master) from [] (__component_add+0x94/0x140) [] (__component_add) from [] (sun6i_dsi_probe+0x144/0x234) [] (sun6i_dsi_probe) from [] (platform_drv_probe+0x48/0x9c) [] (platform_drv_probe) from [] (really_probe+0x1dc/0x2c8) [] (really_probe) from [] (driver_probe_device+0x60/0x160) [] (driver_probe_device) from [] (bus_for_each_drv+0x74/0xb8) [] (bus_for_each_drv) from [] (__device_attach+0xd0/0x13c) [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [] (bus_probe_device) from [] (deferred_probe_work_func+0x64/0x90) [] (deferred_probe_work_func) from [] (process_one_work+0x204/0x420) [] (process_one_work) from [] (worker_thread+0x274/0x5a0) [] (worker_thread) from [] (kthread+0x11c/0x14c) [] (kthread) from [] (ret_from_fork+0x14/0x2c) Exception stack(0xde539fb0 to 0xde539ff8) 9fa0: 00000000 00000000 00000000 00000000 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ---[ end trace 495200a78b24980e ]--- random: fast init done [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:46:crtc-0] flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:48:DSI-1] flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:30:plane-0] flip_done timed out With the terms(as described in above diagram) fixed, the panel displays correctly without any timeouts. Tested-by: Merlijn Wajer Signed-off-by: Jagan Teki Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191006160303.24413-2-icenowy@aosc.io commit 8fdf5b780a148c4a7490c211acad3c01b4dde6ac Author: Daniel T. Lee Date: Tue Oct 8 02:21:17 2019 +0900 samples: bpf: Add max_pckt_size option at xdp_adjust_tail Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited to 600. To make this size flexible, static global variable 'max_pcktsz' is added. By updating new packet size from the user space, xdp_adjust_tail_kern.o will use this value as a new max packet size. This static global variable can be accesible from .data section with bpf_object__find_map* from user space, since it is considered as internal map (accessible with .bss/.data/.rodata suffix). If no '-P ' option is used, the size of maximum packet will be 600 as a default. For clarity, change the helper to fetch map from 'bpf_map__next' to 'bpf_object__find_map_fd_by_name'. Also, changed the way to test prog_fd, map_fd from '!= 0' to '< 0', since fd could be 0 when stdin is closed. Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191007172117.3916-1-danieltimlee@gmail.com commit 8148f0b5647a831c5d94b59da240c8e76dbacae9 Author: Pavel Begunkov Date: Tue Oct 8 00:16:51 2019 +0300 blk-stat: Optimise blk_stat_add() blk_stat_add() calls {get,put}_cpu_ptr() in a loop, which entails overhead of disabling/enabling preemption. The loop is under RCU (i.e.short) anyway, so do get_cpu() in advance. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 72ccd9200f218a7eb2933a93e69a79a1ac984d83 Merge: 4564a8bb57e4 1d9626dc08bf Author: Alexei Starovoitov Date: Mon Oct 7 20:16:34 2019 -0700 Merge branch 'enforce-global-flow-dissector' Stanislav Fomichev says: ==================== While having a per-net-ns flow dissector programs is convenient for testing, security-wise it's better to have only one vetted global flow dissector implementation. Let's have a convention that when BPF flow dissector is installed in the root namespace, child namespaces can't override it. The intended use-case is to attach global BPF flow dissector early from the init scripts/systemd. Attaching global dissector is prohibited if some non-root namespace already has flow dissector attached. Also, attaching to non-root namespace is prohibited when there is flow dissector attached to the root namespace. v3: * drop extra check and empty line (Andrii Nakryiko) v2: * EPERM -> EEXIST (Song Liu) * Make sure we don't have dissector attached to non-root namespaces when attaching the global one (Andrii Nakryiko) ==================== Signed-off-by: Alexei Starovoitov commit 1d9626dc08bf0f5c6932b98e0f4dc5d6b305786f Author: Stanislav Fomichev Date: Mon Oct 7 09:21:03 2019 -0700 selftests/bpf: add test for BPF flow dissector in the root namespace Make sure non-root namespaces get an error if root flow dissector is attached. Cc: Petar Penkov Acked-by: Song Liu Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit a11c397c43d5b27491aa2f36276713cf151a4735 Author: Stanislav Fomichev Date: Mon Oct 7 09:21:02 2019 -0700 bpf/flow_dissector: add mode to enforce global BPF flow dissector Always use init_net flow dissector BPF program if it's attached and fall back to the per-net namespace one. Also, deny installing new programs if there is already one attached to the root namespace. Users can still detach their BPF programs, but can't attach any new ones (-EEXIST). Cc: Petar Penkov Acked-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit 4564a8bb57e4240c08ce2db5194bfa2e71f57730 Author: Anton Ivanov Date: Mon Oct 7 09:26:36 2019 +0100 samples/bpf: Trivial - fix spelling mistake in usage Fix spelling mistake. Signed-off-by: Anton Ivanov Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191007082636.14686-1-anton.ivanov@cambridgegreys.com commit 97ea56540ffc59dac275ccb64b8a5e457348a250 Merge: da0c9ea146cb 9445ad17109b Author: Dave Airlie Date: Tue Oct 8 12:54:38 2019 +1000 Merge tag 'drm-intel-next-2019-10-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - Never allow userptr into the mappable GGTT (Chris) No existing users. Avoid anyone from even trying to spare a deadlock scenario. Cross-subsystem Changes: Core Changes: Driver Changes: - Eliminate struct_mutex use as BKL! (Chris) Only used for execbuf serialisation. - Initialize DDI TC and TBT ports (D-I) on Tigerlake (Lucas) - Fix DKL link training for 2.7GHz and 1.62GHz (Jose) - Add Tigerlake DKL PHY programming sequences (Clinton) - Add Tigerlake Thunderbolt PLL divider values (Imre) - drm/i915: Use helpers for drm_mm_node booleans (Chris) - Restrict L3 remapping sysfs interface to dwords (Chris) - Fix audio power up sequence for gen10+ display (Kai) - Skip redundant execlist resubmission (Chris) - Only unwedge if we can reset GPU first (Chris) - Initialise breadcrumb lists on the virtual engine (Chris) - Don't rely on kernel context existing during early errors (Matt A) - Update Icelake+ MG_DP_MODE programming table (Clinton) - Update DMC firmware for Icelake (Anusha) - Downgrade DP MST error after unplugging TypeC cable (Srinivasan) - Limit MST modes based on plane size too (Ville) - Polish intel_tv_mode_valid() (Ville) - Fix g4x sprite scaling stride check with GTT remapping (Ville) - Don't advertize non-exisiting crtcs (Ville) - Clean up encoder->crtc_mask setup (Ville) - Use tc_port instead of port parameter to MG registers (Jose) - Remove static variable for aux last status (Jani) - Implement a better i945gm vblank irq vs. C-states workaround (Ville) - Make the object creation interface consistent (CQ) - Rename intel_vga_msr_write() to intel_vga_reset_io_mem() (Jani, Ville) - Eliminate previous drm_dbg/drm_err usage (Jani) - Move gmbus setup down to intel_modeset_init() (Jani) - Abstract all vgaarb access to intel_vga.[ch] (Jani) - Split out i915_switcheroo.[ch] from i915_drv.c (Jani) - Use intel_gt in has_reset* (Chris) - Eliminate return value for i915_gem_init_early (Matt A) - Selftest improvements (Chris) - Update HuC firmware header version number format (Daniele) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191007134801.GA24313@jlahtine-desk.ger.corp.intel.com commit 32e3e58e4c5910bb0d6024d151c2f559bb7e973c Author: Andrii Nakryiko Date: Mon Oct 7 15:56:04 2019 -0700 bpftool: Fix bpftool build by switching to bpf_object__open_file() As part of libbpf in 5e61f2707029 ("libbpf: stop enforcing kern_version, populate it for users") non-LIBBPF_API __bpf_object__open_xattr() API was removed from libbpf.h header. This broke bpftool, which relied on that function. This patch fixes the build by switching to newly added bpf_object__open_file() which provides the same capabilities, but is official and future-proof API. v1->v2: - fix prog_type shadowing (Stanislav). Fixes: 5e61f2707029 ("libbpf: stop enforcing kern_version, populate it for users") Reported-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20191007225604.2006146-1-andriin@fb.com commit d460623c5fa126dc51bb2571dd7714ca75b0116c Author: SeongJae Park Date: Sun Sep 8 06:01:31 2019 +0900 Documentation: kunit: Fix verification command kunit wrapper script ('kunit.py') receives a sub-command (only 'run' for now) as its argument. If no sub-command is given, it prints help message and just quit. However, an example command in the kunit documentation for a verification of kunit is missing the sub-command. This commit fixes the example. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 42345b68c2e3e2b6549fc34b937ff44240dfc3b6 Author: Joshua Brindle Date: Wed Sep 4 14:03:23 2019 -0700 selinux: default_range glblub implementation A policy developer can now specify glblub as a default_range default and the computed transition will be the intersection of the mls range of the two contexts. The glb (greatest lower bound) lub (lowest upper bound) of a range is calculated as the greater of the low sensitivities and the lower of the high sensitivities and the and of each category bitmap. This can be used by MLS solution developers to compute a context that satisfies, for example, the range of a network interface and the range of a user logging in. Some examples are: User Permitted Range | Network Device Label | Computed Label ---------------------|----------------------|---------------- s0-s1:c0.c12 | s0 | s0 s0-s1:c0.c12 | s0-s1:c0.c1023 | s0-s1:c0.c12 s0-s4:c0.c512 | s1-s1:c0.c1023 | s1-s1:c0.c512 s0-s15:c0,c2 | s4-s6:c0.c128 | s4-s6:c0,c2 s0-s4 | s2-s6 | s2-s4 s0-s4 | s5-s8 | INVALID s5-s8 | s0-s4 | INVALID Signed-off-by: Joshua Brindle [PM: subject lines and checkpatch.pl fixes] Signed-off-by: Paul Moore commit 6ec1b81d35453c055c134bb0e9f488ddd436a5aa Author: SeongJae Park Date: Sat Sep 7 01:11:54 2019 +0900 kunit: Fix '--build_dir' option Running kunit with '--build_dir' option gives following error message: ``` $ ./tools/testing/kunit/kunit.py run --build_dir ../linux.out.kunit/ [00:57:24] Building KUnit Kernel ... [00:57:29] Starting KUnit Kernel ... Traceback (most recent call last): File "./tools/testing/kunit/kunit.py", line 136, in main(sys.argv[1:]) File "./tools/testing/kunit/kunit.py", line 129, in main result = run_tests(linux, request) File "./tools/testing/kunit/kunit.py", line 68, in run_tests test_result = kunit_parser.parse_run_tests(kunit_output) File "/home/sjpark/linux/tools/testing/kunit/kunit_parser.py", line 283, in parse_run_tests test_result = parse_test_result(list(isolate_kunit_output(kernel_output))) File "/home/sjpark/linux/tools/testing/kunit/kunit_parser.py", line 54, in isolate_kunit_output for line in kernel_output: File "/home/sjpark/linux/tools/testing/kunit/kunit_kernel.py", line 145, in run_kernel process = self._ops.linux_bin(args, timeout, build_dir) File "/home/sjpark/linux/tools/testing/kunit/kunit_kernel.py", line 69, in linux_bin stderr=subprocess.PIPE) File "/usr/lib/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: './linux' ``` This error occurs because the '--build_dir' option value is not passed to the 'run_kernel()' function. Consequently, the function assumes the kernel image that built for the tests, which is under the '--build_dir' directory, is in kernel source directory and finally raises the 'FileNotFoundError'. This commit fixes the problem by properly passing the '--build_dir' option value to the 'run_kernel()'. Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit f8615bf8a3dabd84bf844c6f888929495039d389 Author: Jeremy Sowden Date: Thu Oct 3 20:56:07 2019 +0100 netfilter: ipset: move ip_set_get_ip_port() to ip_set_bitmap_port.c. ip_set_get_ip_port() is only used in ip_set_bitmap_port.c. Move it there and make it static. Signed-off-by: Jeremy Sowden Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 3fbd6c4513b5c27465a1dcf2e4286e6c3183bb1f Author: Jeremy Sowden Date: Thu Oct 3 20:56:06 2019 +0100 netfilter: ipset: move function to ip_set_bitmap_ip.c. One inline function in ip_set_bitmap.h is only called in ip_set_bitmap_ip.c: move it and remove inline function specifier. Signed-off-by: Jeremy Sowden Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 856391854ce73015fbe2b235f5886205aab166b0 Author: Jeremy Sowden Date: Thu Oct 3 20:56:05 2019 +0100 netfilter: ipset: make ip_set_put_flags extern. ip_set_put_flags is rather large for a static inline function in a header-file. Move it to ip_set_core.c and export it. Signed-off-by: Jeremy Sowden Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 2398a97688f1aaca09d0a5a809f361e2abf5ff3c Author: Jeremy Sowden Date: Thu Oct 3 20:56:04 2019 +0100 netfilter: ipset: move functions to ip_set_core.c. Several inline functions in ip_set.h are only called in ip_set_core.c: move them and remove inline function specifier. Signed-off-by: Jeremy Sowden Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 94177f6e11c74b6ca3bcf7f65d3d74f00bbd6a8c Author: Jeremy Sowden Date: Thu Oct 3 20:56:03 2019 +0100 netfilter: ipset: move ip_set_comment functions from ip_set.h to ip_set_core.c. Most of the functions are only called from within ip_set_core.c. The exception is ip_set_init_comment. However, this is too complex to be a good candidate for a static inline function. Move it to ip_set_core.c, change its linkage to extern and export it, leaving a declaration in ip_set.h. ip_set_comment_free is only used as an extension destructor, so change its prototype to match and drop cast. Signed-off-by: Jeremy Sowden Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 8dea982a88dce157825d054fdbeb7fcf378908ba Author: Jeremy Sowden Date: Thu Oct 3 20:56:02 2019 +0100 netfilter: ipset: remove inline from static functions in .c files. The inline function-specifier should not be used for static functions defined in .c files since it bloats the kernel. Instead leave the compiler to decide which functions to inline. While a couple of the files affected (ip_set_*_gen.h) are technically headers, they contain templates for generating the common parts of particular set-types and so we treat them like .c files. Signed-off-by: Jeremy Sowden Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 017f77c050a3bc1f1ff877d1f265beeee26d7dea Author: Jeremy Sowden Date: Thu Oct 3 20:56:01 2019 +0100 netfilter: ipset: add a coding-style fix to ip_set_ext_destroy. Use a local variable to hold comment in order to align the arguments of ip_set_comment_free properly. Signed-off-by: Jeremy Sowden Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit dcb5f40054b1c64ed608a7eecdcf67044e189e30 Author: Andrii Nakryiko Date: Mon Oct 7 13:41:49 2019 -0700 selftests/bpf: Fix dependency ordering for attach_probe test Current Makefile dependency chain is not strict enough and allows test_attach_probe.o to be built before test_progs's prog_test/attach_probe.o is built, which leads to assembler complaining about missing included binary. This patch is a minimal fix to fix this issue by enforcing that test_attach_probe.o (BPF object file) is built before prog_tests/attach_probe.c is attempted to be compiled. Fixes: 928ca75e59d7 ("selftests/bpf: switch tests to new bpf_object__open_{file, mem}() APIs") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191007204149.1575990-1-andriin@fb.com commit a1b58ee3cb34c433167b7b7d3465ab3ca0e3daf1 Author: Chris Wilson Date: Sun Oct 6 17:49:54 2019 +0100 drm/i915/gt: Treat a busy timeline as 'active' while waiting If we cannot claim the timeline->mutex while preparing for a wait on it, we have to skip the timeline. In doing so, treat it as active so that under a intel_gt_wait_for_idle() loop, we repeat the wait after scheduling away. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191006165002.30312-4-chris@chris-wilson.co.uk commit 1664f35aa718815527368e57b0d4ed5bc80e889c Author: Chris Wilson Date: Fri Oct 4 21:31:21 2019 +0100 drm/i915/selftests: Appease lockdep Disable irqs around updating the context image to keep lockdep happy: <4>[ 673.483340] WARNING: possible irq lock inversion dependency detected <4>[ 673.483342] 5.4.0-rc1-CI-Trybot_5118+ #1 Tainted: G U <4>[ 673.483342] -------------------------------------------------------- <4>[ 673.483343] swapper/2/0 just changed the state of lock: <4>[ 673.483344] ffff88845db885a0 (&i915_request_get(rq)->submit/1){-...}, at: __i915_sw_fence_complete+0x1b2/0x250 [i915] <4>[ 673.483387] but this lock took another, HARDIRQ-unsafe lock in the past: <4>[ 673.483388] (&ce->pin_mutex/2){+...} <4>[ 673.483389] and interrupts could create inverse lock ordering between them. <4>[ 673.483390] other info that might help us debug this: <4>[ 673.483390] Chain exists of: &i915_request_get(rq)->submit/1 --> &engine->active.lock --> &ce->pin_mutex/2 <4>[ 673.483392] Possible interrupt unsafe locking scenario: <4>[ 673.483392] CPU0 CPU1 <4>[ 673.483393] ---- ---- <4>[ 673.483393] lock(&ce->pin_mutex/2); <4>[ 673.483394] local_irq_disable(); <4>[ 673.483395] lock(&i915_request_get(rq)->submit/1); <4>[ 673.483396] lock(&engine->active.lock); <4>[ 673.483396] <4>[ 673.483397] lock(&i915_request_get(rq)->submit/1); <4>[ 673.483398] *** DEADLOCK *** <4>[ 673.483398] 2 locks held by swapper/2/0: <4>[ 673.483399] #0: ffff8883f61ac9b0 (&(>->irq_lock)->rlock){-.-.}, at: gen11_gt_irq_handler+0x42/0x280 [i915] <4>[ 673.483433] #1: ffff88845db8c418 (&(&rq->lock)->rlock){-.-.}, at: intel_engine_breadcrumbs_irq+0x34a/0x5a0 [i915] <4>[ 673.483463] the shortest dependencies between 2nd lock and 1st lock: <4>[ 673.483466] -> (&ce->pin_mutex/2){+...} ops: 614520 { <4>[ 673.483468] HARDIRQ-ON-W at: <4>[ 673.483471] lock_acquire+0xa7/0x1c0 <4>[ 673.483501] live_unlite_restore+0x1d8/0x6c0 [i915] <4>[ 673.483543] __i915_subtests+0xb8/0x210 [i915] <4>[ 673.483581] __run_selftests+0x112/0x170 [i915] <4>[ 673.483615] i915_live_selftests+0x2c/0x60 [i915] <4>[ 673.483644] i915_pci_probe+0x93/0x1b0 [i915] <4>[ 673.483646] pci_device_probe+0x9e/0x120 <4>[ 673.483648] really_probe+0xea/0x420 <4>[ 673.483649] driver_probe_device+0x10b/0x120 <4>[ 673.483651] device_driver_attach+0x4a/0x50 <4>[ 673.483652] __driver_attach+0x97/0x130 <4>[ 673.483653] bus_for_each_dev+0x74/0xc0 <4>[ 673.483654] bus_add_driver+0x142/0x220 <4>[ 673.483655] driver_register+0x56/0xf0 <4>[ 673.483657] do_one_initcall+0x58/0x2ff <4>[ 673.483659] do_init_module+0x56/0x1f8 <4>[ 673.483660] load_module+0x243e/0x29f0 <4>[ 673.483661] __do_sys_finit_module+0xe9/0x110 <4>[ 673.483662] do_syscall_64+0x4f/0x210 <4>[ 673.483665] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 673.483665] INITIAL USE at: <4>[ 673.483667] lock_acquire+0xa7/0x1c0 <4>[ 673.483698] live_unlite_restore+0x1d8/0x6c0 [i915] <4>[ 673.483733] __i915_subtests+0xb8/0x210 [i915] <4>[ 673.483764] __run_selftests+0x112/0x170 [i915] <4>[ 673.483793] i915_live_selftests+0x2c/0x60 [i915] <4>[ 673.483821] i915_pci_probe+0x93/0x1b0 [i915] <4>[ 673.483822] pci_device_probe+0x9e/0x120 <4>[ 673.483824] really_probe+0xea/0x420 <4>[ 673.483825] driver_probe_device+0x10b/0x120 <4>[ 673.483826] device_driver_attach+0x4a/0x50 <4>[ 673.483827] __driver_attach+0x97/0x130 <4>[ 673.483828] bus_for_each_dev+0x74/0xc0 <4>[ 673.483829] bus_add_driver+0x142/0x220 <4>[ 673.483830] driver_register+0x56/0xf0 <4>[ 673.483831] do_one_initcall+0x58/0x2ff <4>[ 673.483833] do_init_module+0x56/0x1f8 <4>[ 673.483834] load_module+0x243e/0x29f0 <4>[ 673.483835] __do_sys_finit_module+0xe9/0x110 <4>[ 673.483836] do_syscall_64+0x4f/0x210 <4>[ 673.483837] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 673.483838] } <4>[ 673.483868] ... key at: [] __key.70113+0x2/0xffffffffffef2ed0 [i915] <4>[ 673.483869] ... acquired at: <4>[ 673.483935] __execlists_reset+0xfb/0xc20 [i915] <4>[ 673.483965] execlists_reset+0x3d/0x50 [i915] <4>[ 673.483995] intel_engine_reset+0xdf/0x230 [i915] <4>[ 673.484022] live_preempt_hang+0x1d7/0x2e0 [i915] <4>[ 673.484064] __i915_subtests+0xb8/0x210 [i915] <4>[ 673.484130] __run_selftests+0x112/0x170 [i915] <4>[ 673.484163] i915_live_selftests+0x2c/0x60 [i915] <4>[ 673.484193] i915_pci_probe+0x93/0x1b0 [i915] <4>[ 673.484194] pci_device_probe+0x9e/0x120 <4>[ 673.484195] really_probe+0xea/0x420 <4>[ 673.484196] driver_probe_device+0x10b/0x120 <4>[ 673.484197] device_driver_attach+0x4a/0x50 <4>[ 673.484198] __driver_attach+0x97/0x130 <4>[ 673.484199] bus_for_each_dev+0x74/0xc0 <4>[ 673.484200] bus_add_driver+0x142/0x220 <4>[ 673.484202] driver_register+0x56/0xf0 <4>[ 673.484203] do_one_initcall+0x58/0x2ff <4>[ 673.484204] do_init_module+0x56/0x1f8 <4>[ 673.484205] load_module+0x243e/0x29f0 <4>[ 673.484206] __do_sys_finit_module+0xe9/0x110 <4>[ 673.484207] do_syscall_64+0x4f/0x210 <4>[ 673.484208] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 673.484209] -> (&engine->active.lock){..-.} ops: 972791 { <4>[ 673.484211] IN-SOFTIRQ-W at: <4>[ 673.484213] lock_acquire+0xa7/0x1c0 <4>[ 673.484214] _raw_spin_lock_irqsave+0x33/0x50 <4>[ 673.484244] execlists_submission_tasklet+0xaf/0x100 [i915] <4>[ 673.484246] tasklet_action_common.isra.18+0x6c/0x1c0 <4>[ 673.484247] __do_softirq+0xdf/0x47f <4>[ 673.484248] irq_exit+0xba/0xc0 <4>[ 673.484249] do_IRQ+0x83/0x160 <4>[ 673.484250] ret_from_intr+0x0/0x1d <4>[ 673.484252] cpuidle_enter_state+0xb2/0x450 <4>[ 673.484253] cpuidle_enter+0x24/0x40 <4>[ 673.484254] do_idle+0x1e7/0x250 <4>[ 673.484256] cpu_startup_entry+0x14/0x20 <4>[ 673.484257] start_secondary+0x15f/0x1b0 <4>[ 673.484258] secondary_startup_64+0xa4/0xb0 <4>[ 673.484259] INITIAL USE at: <4>[ 673.484261] lock_acquire+0xa7/0x1c0 <4>[ 673.484290] intel_engine_init_active+0x7e/0xb0 [i915] <4>[ 673.484305] intel_engines_setup+0x1cd/0x3b0 [i915] <4>[ 673.484305] i915_gem_init+0x12d/0x900 [i915] <4>[ 673.484305] i915_driver_probe+0xb70/0x15d0 [i915] <4>[ 673.484305] i915_pci_probe+0x43/0x1b0 [i915] <4>[ 673.484305] pci_device_probe+0x9e/0x120 <4>[ 673.484305] really_probe+0xea/0x420 <4>[ 673.484305] driver_probe_device+0x10b/0x120 <4>[ 673.484305] device_driver_attach+0x4a/0x50 <4>[ 673.484305] __driver_attach+0x97/0x130 <4>[ 673.484305] bus_for_each_dev+0x74/0xc0 <4>[ 673.484305] bus_add_driver+0x142/0x220 <4>[ 673.484305] driver_register+0x56/0xf0 <4>[ 673.484305] do_one_initcall+0x58/0x2ff <4>[ 673.484305] do_init_module+0x56/0x1f8 <4>[ 673.484305] load_module+0x243e/0x29f0 <4>[ 673.484305] __do_sys_finit_module+0xe9/0x110 <4>[ 673.484305] do_syscall_64+0x4f/0x210 <4>[ 673.484305] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 673.484305] } <4>[ 673.484305] ... key at: [] __key.70307+0x0/0xffffffffffef2ea0 [i915] <4>[ 673.484305] ... acquired at: <4>[ 673.484305] _raw_spin_lock_irqsave+0x33/0x50 <4>[ 673.484305] execlists_submit_request+0x2b/0x1e0 [i915] <4>[ 673.484305] submit_notify+0xa8/0x13c [i915] <4>[ 673.484305] __i915_sw_fence_complete+0x81/0x250 [i915] <4>[ 673.484305] i915_sw_fence_wake+0x51/0x70 [i915] <4>[ 673.484305] __i915_sw_fence_complete+0x1ee/0x250 [i915] <4>[ 673.484305] dma_i915_sw_fence_wake+0x1b/0x30 [i915] <4>[ 673.484305] dma_fence_signal_locked+0x9e/0x1b0 <4>[ 673.484305] dma_fence_signal+0x1f/0x40 <4>[ 673.484305] fence_work+0x28/0x80 [i915] <4>[ 673.484305] process_one_work+0x26a/0x620 <4>[ 673.484305] worker_thread+0x37/0x380 <4>[ 673.484305] kthread+0x119/0x130 <4>[ 673.484305] ret_from_fork+0x24/0x50 <4>[ 673.484305] -> (&i915_request_get(rq)->submit/1){-...} ops: 857694 { <4>[ 673.484305] IN-HARDIRQ-W at: <4>[ 673.484305] lock_acquire+0xa7/0x1c0 <4>[ 673.484305] _raw_spin_lock_irqsave_nested+0x39/0x50 <4>[ 673.484305] __i915_sw_fence_complete+0x1b2/0x250 [i915] <4>[ 673.484305] intel_engine_breadcrumbs_irq+0x3d0/0x5a0 [i915] <4>[ 673.484305] cs_irq_handler+0x39/0x50 [i915] <4>[ 673.484305] gen11_gt_irq_handler+0x17b/0x280 [i915] <4>[ 673.484305] gen11_irq_handler+0x54/0xf0 [i915] <4>[ 673.484305] __handle_irq_event_percpu+0x41/0x2c0 <4>[ 673.484305] handle_irq_event_percpu+0x2b/0x70 <4>[ 673.484305] handle_irq_event+0x2f/0x50 <4>[ 673.484305] handle_edge_irq+0x99/0x1b0 <4>[ 673.484305] do_IRQ+0x7e/0x160 <4>[ 673.484305] ret_from_intr+0x0/0x1d <4>[ 673.484305] cpuidle_enter_state+0xb2/0x450 <4>[ 673.484305] cpuidle_enter+0x24/0x40 <4>[ 673.484305] do_idle+0x1e7/0x250 <4>[ 673.484305] cpu_startup_entry+0x14/0x20 <4>[ 673.484305] start_secondary+0x15f/0x1b0 <4>[ 673.484305] secondary_startup_64+0xa4/0xb0 <4>[ 673.484305] INITIAL USE at: <4>[ 673.484305] lock_acquire+0xa7/0x1c0 <4>[ 673.484305] _raw_spin_lock_irqsave_nested+0x39/0x50 <4>[ 673.484305] __i915_sw_fence_complete+0x1b2/0x250 [i915] <4>[ 673.484305] __engine_park+0x233/0x420 [i915] <4>[ 673.484305] ____intel_wakeref_put_last+0x1c/0x70 [i915] <4>[ 673.484305] intel_gt_resume+0x202/0x2c0 [i915] <4>[ 673.484305] i915_gem_init+0x36e/0x900 [i915] <4>[ 673.484305] i915_driver_probe+0xb70/0x15d0 [i915] <4>[ 673.484305] i915_pci_probe+0x43/0x1b0 [i915] <4>[ 673.484305] pci_device_probe+0x9e/0x120 <4>[ 673.484305] really_probe+0xea/0x420 <4>[ 673.484305] driver_probe_device+0x10b/0x120 <4>[ 673.484305] device_driver_attach+0x4a/0x50 <4>[ 673.484305] __driver_attach+0x97/0x130 <4>[ 673.484305] bus_for_each_dev+0x74/0xc0 <4>[ 673.484305] bus_add_driver+0x142/0x220 <4>[ 673.484305] driver_register+0x56/0xf0 <4>[ 673.484305] do_one_initcall+0x58/0x2ff <4>[ 673.484305] do_init_module+0x56/0x1f8 <4>[ 673.484305] load_module+0x243e/0x29f0 <4>[ 673.484305] __do_sys_finit_module+0xe9/0x110 <4>[ 673.484305] do_syscall_64+0x4f/0x210 <4>[ 673.484305] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 673.484305] } <4>[ 673.484305] ... key at: [] __key.80173+0x1/0xffffffffffef2960 [i915] <4>[ 673.484305] ... acquired at: <4>[ 673.484305] mark_lock+0x382/0x500 <4>[ 673.484305] __lock_acquire+0x7e1/0x15d0 <4>[ 673.484305] lock_acquire+0xa7/0x1c0 <4>[ 673.484305] _raw_spin_lock_irqsave_nested+0x39/0x50 <4>[ 673.484305] __i915_sw_fence_complete+0x1b2/0x250 [i915] <4>[ 673.484305] intel_engine_breadcrumbs_irq+0x3d0/0x5a0 [i915] <4>[ 673.484305] cs_irq_handler+0x39/0x50 [i915] <4>[ 673.484305] gen11_gt_irq_handler+0x17b/0x280 [i915] <4>[ 673.484305] gen11_irq_handler+0x54/0xf0 [i915] <4>[ 673.484305] __handle_irq_event_percpu+0x41/0x2c0 <4>[ 673.484305] handle_irq_event_percpu+0x2b/0x70 <4>[ 673.484305] handle_irq_event+0x2f/0x50 <4>[ 673.484305] handle_edge_irq+0x99/0x1b0 <4>[ 673.484305] do_IRQ+0x7e/0x160 <4>[ 673.484305] ret_from_intr+0x0/0x1d <4>[ 673.484305] cpuidle_enter_state+0xb2/0x450 <4>[ 673.484305] cpuidle_enter+0x24/0x40 <4>[ 673.484305] do_idle+0x1e7/0x250 <4>[ 673.484305] cpu_startup_entry+0x14/0x20 <4>[ 673.484305] start_secondary+0x15f/0x1b0 <4>[ 673.484305] secondary_startup_64+0xa4/0xb0 <4>[ 673.484305] stack backtrace: <4>[ 673.484305] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G U 5.4.0-rc1-CI-Trybot_5118+ #1 <4>[ 673.484305] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3183.A00.1905020411 05/02/2019 <4>[ 673.484305] Call Trace: <4>[ 673.484305] <4>[ 673.484305] dump_stack+0x67/0x9b <4>[ 673.484305] check_usage_forwards+0x13c/0x150 <4>[ 673.484305] ? mark_lock+0x382/0x500 <4>[ 673.484305] mark_lock+0x382/0x500 <4>[ 673.484305] ? check_usage_backwards+0x140/0x140 <4>[ 673.484305] __lock_acquire+0x7e1/0x15d0 <4>[ 673.484305] ? debug_object_deactivate+0x17e/0x190 <4>[ 673.484305] lock_acquire+0xa7/0x1c0 <4>[ 673.484305] ? __i915_sw_fence_complete+0x1b2/0x250 [i915] <4>[ 673.484305] _raw_spin_lock_irqsave_nested+0x39/0x50 <4>[ 673.484305] ? __i915_sw_fence_complete+0x1b2/0x250 [i915] <4>[ 673.484305] __i915_sw_fence_complete+0x1b2/0x250 [i915] <4>[ 673.484305] intel_engine_breadcrumbs_irq+0x3d0/0x5a0 [i915] <4>[ 673.484305] cs_irq_handler+0x39/0x50 [i915] <4>[ 673.484305] gen11_gt_irq_handler+0x17b/0x280 [i915] <4>[ 673.484305] gen11_irq_handler+0x54/0xf0 [i915] <4>[ 673.484305] __handle_irq_event_percpu+0x41/0x2c0 <4>[ 673.484305] handle_irq_event_percpu+0x2b/0x70 <4>[ 673.484305] handle_irq_event+0x2f/0x50 <4>[ 673.484305] handle_edge_irq+0x99/0x1b0 <4>[ 673.484305] do_IRQ+0x7e/0x160 <4>[ 673.484305] common_interrupt+0xf/0xf <4>[ 673.484305] Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004203121.31138-1-chris@chris-wilson.co.uk commit 08ad9a3846fc72b047b110b36d162ffbcf298fa2 Author: Chris Wilson Date: Fri Oct 4 20:47:58 2019 +0100 drm/i915/execlists: Fix annotation for decoupling virtual request As we may signal a request and take the engine->active.lock within the signaler, the engine submission paths have to use a nested annotation on their requests -- but we guarantee that we can never submit on the same engine as the signaling fence. <4>[ 723.763281] WARNING: possible circular locking dependency detected <4>[ 723.763285] 5.3.0-g80fa0e042cdb-drmtip_379+ #1 Tainted: G U <4>[ 723.763288] ------------------------------------------------------ <4>[ 723.763291] gem_exec_await/1388 is trying to acquire lock: <4>[ 723.763294] ffff93a7b53221d8 (&engine->active.lock){..-.}, at: execlists_submit_request+0x2b/0x1e0 [i915] <4>[ 723.763378] but task is already holding lock: <4>[ 723.763381] ffff93a7c25f6d20 (&i915_request_get(rq)->submit/1){-.-.}, at: __i915_sw_fence_complete+0x1b2/0x250 [i915] <4>[ 723.763420] which lock already depends on the new lock. <4>[ 723.763423] the existing dependency chain (in reverse order) is: <4>[ 723.763427] -> #2 (&i915_request_get(rq)->submit/1){-.-.}: <4>[ 723.763434] _raw_spin_lock_irqsave_nested+0x39/0x50 <4>[ 723.763478] __i915_sw_fence_complete+0x1b2/0x250 [i915] <4>[ 723.763513] intel_engine_breadcrumbs_irq+0x3aa/0x5e0 [i915] <4>[ 723.763600] cs_irq_handler+0x49/0x50 [i915] <4>[ 723.763659] gen11_gt_irq_handler+0x17b/0x280 [i915] <4>[ 723.763690] gen11_irq_handler+0x54/0xf0 [i915] <4>[ 723.763695] __handle_irq_event_percpu+0x41/0x2d0 <4>[ 723.763699] handle_irq_event_percpu+0x2b/0x70 <4>[ 723.763702] handle_irq_event+0x2f/0x50 <4>[ 723.763706] handle_edge_irq+0xee/0x1a0 <4>[ 723.763709] do_IRQ+0x7e/0x160 <4>[ 723.763712] ret_from_intr+0x0/0x1d <4>[ 723.763717] __slab_alloc.isra.28.constprop.33+0x4f/0x70 <4>[ 723.763720] kmem_cache_alloc+0x28d/0x2f0 <4>[ 723.763724] vm_area_dup+0x15/0x40 <4>[ 723.763727] dup_mm+0x2dd/0x550 <4>[ 723.763730] copy_process+0xf21/0x1ef0 <4>[ 723.763734] _do_fork+0x71/0x670 <4>[ 723.763737] __se_sys_clone+0x6e/0xa0 <4>[ 723.763741] do_syscall_64+0x4f/0x210 <4>[ 723.763744] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 723.763747] -> #1 (&(&rq->lock)->rlock#2){-.-.}: <4>[ 723.763752] _raw_spin_lock+0x2a/0x40 <4>[ 723.763789] __unwind_incomplete_requests+0x3eb/0x450 [i915] <4>[ 723.763825] __execlists_submission_tasklet+0x9ec/0x1d60 [i915] <4>[ 723.763864] execlists_submission_tasklet+0x34/0x50 [i915] <4>[ 723.763874] tasklet_action_common.isra.5+0x47/0xb0 <4>[ 723.763878] __do_softirq+0xd8/0x4ae <4>[ 723.763881] irq_exit+0xa9/0xc0 <4>[ 723.763883] smp_apic_timer_interrupt+0xb7/0x280 <4>[ 723.763887] apic_timer_interrupt+0xf/0x20 <4>[ 723.763892] cpuidle_enter_state+0xae/0x450 <4>[ 723.763895] cpuidle_enter+0x24/0x40 <4>[ 723.763899] do_idle+0x1e7/0x250 <4>[ 723.763902] cpu_startup_entry+0x14/0x20 <4>[ 723.763905] start_secondary+0x15f/0x1b0 <4>[ 723.763908] secondary_startup_64+0xa4/0xb0 <4>[ 723.763911] -> #0 (&engine->active.lock){..-.}: <4>[ 723.763916] __lock_acquire+0x15d8/0x1ea0 <4>[ 723.763919] lock_acquire+0xa6/0x1c0 <4>[ 723.763922] _raw_spin_lock_irqsave+0x33/0x50 <4>[ 723.763956] execlists_submit_request+0x2b/0x1e0 [i915] <4>[ 723.764002] submit_notify+0xa8/0x13c [i915] <4>[ 723.764035] __i915_sw_fence_complete+0x81/0x250 [i915] <4>[ 723.764054] i915_sw_fence_wake+0x51/0x64 [i915] <4>[ 723.764054] __i915_sw_fence_complete+0x1ee/0x250 [i915] <4>[ 723.764054] dma_i915_sw_fence_wake_timer+0x14/0x20 [i915] <4>[ 723.764054] dma_fence_signal_locked+0x9e/0x1c0 <4>[ 723.764054] dma_fence_signal+0x1f/0x40 <4>[ 723.764054] vgem_fence_signal_ioctl+0x67/0xc0 [vgem] <4>[ 723.764054] drm_ioctl_kernel+0x83/0xf0 <4>[ 723.764054] drm_ioctl+0x2f3/0x3b0 <4>[ 723.764054] do_vfs_ioctl+0xa0/0x6f0 <4>[ 723.764054] ksys_ioctl+0x35/0x60 <4>[ 723.764054] __x64_sys_ioctl+0x11/0x20 <4>[ 723.764054] do_syscall_64+0x4f/0x210 <4>[ 723.764054] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 723.764054] other info that might help us debug this: <4>[ 723.764054] Chain exists of: &engine->active.lock --> &(&rq->lock)->rlock#2 --> &i915_request_get(rq)->submit/1 <4>[ 723.764054] Possible unsafe locking scenario: <4>[ 723.764054] CPU0 CPU1 <4>[ 723.764054] ---- ---- <4>[ 723.764054] lock(&i915_request_get(rq)->submit/1); <4>[ 723.764054] lock(&(&rq->lock)->rlock#2); <4>[ 723.764054] lock(&i915_request_get(rq)->submit/1); <4>[ 723.764054] lock(&engine->active.lock); <4>[ 723.764054] *** DEADLOCK *** Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111862 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004194758.19679-1-chris@chris-wilson.co.uk commit cd6a851385be878f086204aa0e7cd3bec9ea909f Author: Chris Wilson Date: Mon Oct 7 16:45:31 2019 +0100 drm/i915/gt: Prefer local path to runtime powermanagement Avoid going to the base i915 device when we already have a path from gt to the runtime powermanagement interface. The benefit is that it looks a bit more self-consistent to always be acquiring the gt->uncore->rpm for use with the gt->uncore. Signed-off-by: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191007154531.1750-1-chris@chris-wilson.co.uk commit b9dcb97b6c8076af3469c62feb1174ef525b81f7 Author: Colin Ian King Date: Mon Oct 7 16:41:51 2019 +0100 drm/i915: make array hw_engine_mask static, makes object smaller Don't populate the array hw_engine_mask on the stack but instead make it static. Makes the object code smaller by 316 bytes. Before: text data bss dec hex filename 34004 4388 320 38712 9738 gpu/drm/i915/gt/intel_reset.o After: text data bss dec hex filename 33528 4548 320 38396 95fc gpu/drm/i915/gt/intel_reset.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191007154151.23245-1-colin.king@canonical.com commit 4dbc54c55923ff0934a2d6e7facdbed21ed423c0 Author: Colin Ian King Date: Wed Sep 25 13:32:53 2019 +0100 iio: gyro: clean up indentation issue There is a return statement that is indented incorrectly, add in the missing tab. Signed-off-by: Colin Ian King Signed-off-by: Jonathan Cameron commit 76510ec692c88ee865ebb32bb77b1ee294fee89e Author: Colin Ian King Date: Wed Sep 25 10:51:26 2019 +0100 counter: stm32: clean up indentation issue There is an if statement that is indented one level too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King Acked-by: William Breathitt Gray Signed-off-by: Jonathan Cameron commit 3cfd6464fe23deb45bb688df66184b3f32fefc16 Author: Alexandru Ardelean Date: Fri Sep 20 11:35:13 2019 +0300 iio: proximity: sx9500: fix iio_triggered_buffer_{predisable,postenable} positions The iio_triggered_buffer_predisable() should be called last, to detach the poll func after the devices has been suspended. This change re-organizes things a bit so that the postenable & predisable are symmetrical. It also converts the preenable() to a postenable(). Not stable material as there is no known problem with the current code, it's just not consistent with the form we would like all the IIO drivers to adopt so as to allow subsystem wide changes. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 2c3d0c9ffd24d9b4c62c5dfb2104695a614be28c Author: Phil Reid Date: Thu Sep 19 22:36:08 2019 +0800 iio: core: Add optional symbolic label to device attributes If a label is defined in the device tree for this device add that to the device specific attributes. This is useful for userspace to be able to identify an individual device when multiple identical chips are present in the system. Tested-by: Michal Simek Signed-off-by: Phil Reid Signed-off-by: Jonathan Cameron commit 6b855f7b83d2fb0237263f143437aedf8caed152 Author: Harish Kasiviswanathan Date: Mon Aug 20 12:14:50 2018 -0400 drm/amdkfd: Check against device cgroup Participate in device cgroup. All kfd devices are exposed via /dev/kfd. So use /dev/dri/renderN node. Before exposing the device to a task check if it has permission to access it. If the task (based on its cgroup) can access /dev/dri/renderN then expose the device via kfd node. If the task cannot access /dev/dri/renderN then process device data (pdd) is not created. This will ensure that task cannot use the device. In sysfs topology, all device nodes are visible irrespective of the task cgroup. The sysfs node directories are created at driver load time and cannot be changed dynamically. However, access to information inside nodes is controlled based on the task's cgroup permissions. Signed-off-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4b7d4d453fc46769394e31d1cb19088f49897b59 Author: Harish Kasiviswanathan Date: Thu May 16 11:37:16 2019 -0400 device_cgroup: Export devcgroup_check_permission For AMD compute (amdkfd) driver. All AMD compute devices are exported via single device node /dev/kfd. As a result devices cannot be controlled individually using device cgroup. AMD compute devices will rely on its graphics counterpart that exposes /dev/dri/renderN node for each device. For each task (based on its cgroup), KFD driver will check if /dev/dri/renderN node is accessible before exposing it. Signed-off-by: Harish Kasiviswanathan Acked-by: Tejun Heo Acked-by: Felix Kuehling Reviewed-by: Roman Gushchin Signed-off-by: Alex Deucher commit a3e520a25ce85f84a7f589af2b6ec38af96caa12 Author: Alex Deucher Date: Fri Oct 4 09:14:35 2019 -0500 drm/amdkfd: fix the build when CIK support is disabled Add proper ifdefs around CIK code in kfd setup. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 23c61b4599c46cddd7c36e1e3f7a9a340cf98ce8 Author: Krzysztof Kozlowski Date: Mon Oct 7 19:33:22 2019 +0200 drm/amd: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alex Deucher commit ad02e08e05781c3dabe7853f39cffb69169e96b2 Author: Ori Messinger Date: Wed Oct 2 10:02:07 2019 -0400 drm/amdgpu: Report vram vendor with sysfs (v3) The vram vendor can be found as a separate sysfs file at: /sys/class/drm/card[X]/device/mem_info_vram_vendor The vram vendor is displayed as a string value. v2: Use correct bit masking, and cache vram_vendor in gmc v3: Drop unused functions for vram width, type, and vendor Signed-off-by: Ori Messinger Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit aa5e899de1dd8d91f4881d0bf533e2302f925973 Author: Dan Carpenter Date: Mon Oct 7 11:52:10 2019 +0300 drm/amdkfd: Fix a && vs || typo In the current code if "device_info" is ever NULL then the kernel will Oops so probably || was intended instead of &&. Fixes: e392c887df97 ("drm/amdkfd: Use array to probe kfd2kgd_calls") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit ea6d8811f18521a2188d1959f5fa2447e6bf5349 Author: Dan Carpenter Date: Mon Oct 7 12:02:06 2019 +0300 drm/amd/powerplay: Fix error handling in smu_init_fb_allocations() The error handling is off by one. We should not free the first "tables[i].bo" without decrementing "i" because that might result in a double free. The second problem is that when an error occurs, then the zeroth element "tables[0].bo" isn't freed. I had make "i" signed int for the error handling to work, so I just updated "ret" as well as a clean up. Fixes: f96357a991b9 ("drm/amd/powerplay: implement smu_init(fini)_fb_allocations function") Reviewed-by: Kevin Wang Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit fa073f13a218627f1cfd5bca223d5938ee6cd985 Author: Dan Carpenter Date: Mon Oct 7 12:04:54 2019 +0300 drm/amd/powerplay: unlock on error in smu_resume() This function needs to drop the mutex before returning. Fixes: f7e3a5776fa6 ("drm/amd/powerplay: check SMU engine readiness before proceeding on S3 resume") Reviewed-by: Kevin Wang Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 6a1112da65f985fb407f82caee158091717c72c7 Author: zhengbin Date: Sat Oct 5 10:44:36 2019 +0800 drm/amd/display: Remove set but not used variables 'pp_smu', 'old_pipe' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: In function dce110_enable_audio_stream: drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:949:23: warning: variable pp_smu set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: In function dce110_disable_audio_stream: drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:983:23: warning: variable pp_smu set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: In function dce110_program_front_end_for_pipe: drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:2429:19: warning: variable old_pipe set but not used [-Wunused-but-set-variable] 'pp_smu' is not used since commit 170a2398d2d8 ("drm/amd/display: make clk_mgr call enable_pme_wa") 'old_pipe' is not used since commit 65d38262b3e8 ("drm/amd/display: fbc state could not reach while enable fbc") Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit adda1367a862e70be1d5ac6b845bd1d8c09af9a4 Author: zhengbin Date: Sat Oct 5 10:44:35 2019 +0800 drm/amd/display: Remove set but not used variable 'pixel_width' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c: In function dpp2_get_optimal_number_of_taps: drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c:359:11: warning: variable pixel_width set but not used [-Wunused-but-set-variable] It is not used since commit f7de96ee8b5f ("drm/amd/display: Add DCN2 DPP") Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 2b0619c159e99c67a14cbf1851a19b915a74d7e8 Author: zhengbin Date: Sat Oct 5 10:44:34 2019 +0800 drm/amd/display: Remove set but not used variables 'h_ratio_chroma', 'v_ratio_chroma' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c: In function dwb_program_horz_scalar: drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c:725:11: warning: variable h_ratio_chroma set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c: In function dwb_program_vert_scalar: drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c:806:11: warning: variable v_ratio_chroma set but not used [-Wunused-but-set-variable] They are not used since commit 345429a67c48 ("drm/amd/display: Add DCN2 DWB") Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit a1fc51477cd08f2380f98d98b34490205f4b8c6b Author: zhengbin Date: Sat Oct 5 10:44:33 2019 +0800 drm/amd/display: Remove set but not used variable 'source_bpp' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c: In function calc_rc_params: drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c:180:6: warning: variable source_bpp set but not used [-Wunused-but-set-variable] It is not used since commit 97bda0322b8a ("drm/amd/display: Add DSC support for Navi (v2)") Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit b77095d5e1b5df2e38d15cd7ed180176b3284ba5 Author: zhengbin Date: Sat Oct 5 10:44:32 2019 +0800 drm/amd/display: Make function wait_for_alt_mode static Fix sparse warnings: drivers/gpu/drm/amd/display/dc/core/dc_link.c:687:6: warning: symbol 'wait_for_alt_mode' was not declared. Should it be static? Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 63617d8b125ed9f674133dd000b6df58d6b2965a Author: Colin Ian King Date: Sat Oct 5 18:58:08 2019 +0100 drm/amdkfd: add missing void argument to function kgd2kfd_init Function kgd2kfd_init is missing a void argument, add it to clean up the non-ANSI function declaration. Acked-by: Randy Dunlap Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 8f49c8220bb12e637f19fc9c4142f4c2e4d6f5cc Author: YueHaibing Date: Sun Oct 6 07:44:04 2019 +0000 drm/amdgpu: remove duplicated include from mmhub_v1_0.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit 71f98027f2c399805ad513f6675b88c92eea3302 Author: Alex Deucher Date: Fri Oct 4 13:36:09 2019 -0500 drm/amdgpu: move amdgpu_device_get_job_timeout_settings It's only used in amdgpu_device.c and the naming also reflects that. Move it there. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 72caac6b62c291a095948a80995b9c40c3956796 Author: YueHaibing Date: Sun Oct 6 18:57:35 2019 +0800 drm/amd/display: remove set but not used variable 'core_freesync' Fixes gcc '-Wunused-but-set-variable' warning: rivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.c: In function mod_freesync_get_settings: drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.c:984:24: warning: variable core_freesync set but not used [-Wunused-but-set-variable] It is not used since commit 98e6436d3af5 ("drm/amd/display: Refactor FreeSync module") Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit 28d687eafeb655c3b0a58fd06437da1420892007 Author: Christophe JAILLET Date: Sat Oct 5 13:32:05 2019 +0200 drm/amd/display: Fix typo in some comments p and g are switched in 'amdpgu_dm' Reviewed-by: Harry Wentland Signed-off-by: Christophe JAILLET Signed-off-by: Alex Deucher commit c4bb16e0f81751b1b2811ebf2136371d8b8307e9 Author: Oak Zeng Date: Fri Oct 4 09:34:29 2019 -0500 drm/amdkfd: Print more sdma engine hqds in debug fs Previously only PCIe-optimized SDMA engine hqds were exposed in debug fs. Print all SDMA engine hqds. Reported-by: Jonathan Kim Signed-off-by: Jonathan Kim Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 40a9592a26608e16f7545a068ea4165e1869f629 Author: Oak Zeng Date: Fri Oct 4 09:28:21 2019 -0500 drm/amdkfd: Fix MQD size calculation On device initialization, a chunk of GTT memory is pre-allocated for HIQ and all SDMA queues mqd. The size of this allocation was wrong. The correct sdma engine number should be PCIe-optimized SDMA engine number plus xgmi SDMA engine number. Reported-by: Jonathan Kim Signed-off-by: Jonathan Kim Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1995b3a35fecbf8a8078a5c3ff4b4a88eddaa5fe Author: Felix Kuehling Date: Thu Oct 3 17:54:57 2019 -0400 drm/amdgpu: Fix error handling in amdgpu_ras_recovery_init Don't set a struct pointer to NULL before freeing its members. It's hard to see what's happening due to a local pointer-to-pointer data aliasing con->eh_data. Signed-off-by: Felix Kuehling Tested-by: Philip Cox Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit fd7710cb491f900eb63d2ce5aac0e682003e84e9 Author: Paul Burton Date: Mon Oct 7 12:58:44 2019 -0700 MIPS: futex: Restore \n after sync instructions Commit 3c1d3f097972 ("MIPS: futex: Emit Loongson3 sync workarounds within asm") inadvertently removed the newlines following __WEAK_LLSC_MB, which causes build failures for configurations in which __WEAK_LLSC_MB expands to a sync instruction: {standard input}: Assembler messages: {standard input}:9346: Error: symbol `sync3' is already defined {standard input}:9380: Error: symbol `sync3' is already defined ... Fix this by restoring the newlines to separate the sync instruction from anything following it (such as the 3: label), preventing inadvertent concatenation. Signed-off-by: Paul Burton Fixes: 3c1d3f097972 ("MIPS: futex: Emit Loongson3 sync workarounds within asm") commit d6b71dfaeeba115dd61a7f367cf04c2d0ca77ebb Author: Vladimir Oltean Date: Thu Sep 5 04:01:13 2019 +0300 spi: spi-fsl-dspi: Implement the PTP system timestamping for TCFQ mode In this mode, the DSPI controller uses PIO to transfer word by word. In comparison, in EOQ mode the 4-word deep FIFO is being used, hence the current logic will need some adaptation for which I do not have the hardware (Coldfire) to test. It is not clear what is the timing of DMA transfers and whether timestamping in the driver brings any overall performance increase compared to regular timestamping done in the core. Short phc2sys summary after 58 minutes of running on LS1021A-TSN with interrupts disabled during the critical section: offset: min -26251 max 16416 mean -21.8672 std dev 863.416 delay: min 4720 max 57280 mean 5182.49 std dev 1607.19 lost servo lock 3 times Summary of the same phc2sys service running for 120 minutes with interrupts disabled: offset: min -378 max 381 mean -0.0083089 std dev 101.495 delay: min 4720 max 5920 mean 5129.38 std dev 154.899 lost servo lock 0 times The minimum delay (pre to post time) in nanoseconds is the same, but the maximum delay is quite a bit higher, due to interrupts getting sometimes executed and interfering with the measurement. Hence set disable_irqs whenever possible (aka when the driver runs in poll mode - otherwise it would be a contradiction in terms). Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20190905010114.26718-4-olteanv@gmail.com Signed-off-by: Mark Brown commit b42faeee718ce13ef6eb99c24880b58deb54c8fa Author: Vladimir Oltean Date: Thu Sep 5 04:01:12 2019 +0300 spi: Add a PTP system timestamp to the transfer structure SPI is one of the interfaces used to access devices which have a POSIX clock driver (real time clocks, 1588 timers etc). The fact that the SPI bus is slow is not what the main problem is, but rather the fact that drivers don't take a constant amount of time in transferring data over SPI. When there is a high delay in the readout of time, there will be uncertainty in the value that has been read out of the peripheral. When that delay is constant, the uncertainty can at least be approximated with a certain accuracy which is fine more often than not. Timing jitter occurs all over in the kernel code, and is mainly caused by having to let go of the CPU for various reasons such as preemption, servicing interrupts, going to sleep, etc. Another major reason is CPU dynamic frequency scaling. It turns out that the problem of retrieving time from a SPI peripheral with high accuracy can be solved by the use of "PTP system timestamping" - a mechanism to correlate the time when the device has snapshotted its internal time counter with the Linux system time at that same moment. This is sufficient for having a precise time measurement - it is not necessary for the whole SPI transfer to be transmitted "as fast as possible", or "as low-jitter as possible". The system has to be low-jitter for a very short amount of time to be effective. This patch introduces a PTP system timestamping mechanism in struct spi_transfer. This is to be used by SPI device drivers when they need to know the exact time at which the underlying device's time was snapshotted. More often than not, SPI peripherals have a very exact timing for when their SPI-to-interconnect bridge issues a transaction for snapshotting and reading the time register, and that will be dependent on when the SPI-to-interconnect bridge figures out that this is what it should do, aka as soon as it sees byte N of the SPI transfer. Since spi_device drivers are the ones who'd know best how the peripheral behaves in this regard, expose a mechanism in spi_transfer which allows them to specify which word (or word range) from the transfer should be timestamped. Add a default implementation of the PTP system timestamping in the SPI core. This is not going to be satisfactory performance-wise, but should at least increase the likelihood that SPI device drivers will use PTP system timestamping in the future. There are 3 entry points from the core towards the SPI controller drivers: - transfer_one: The driver is passed individual spi_transfers to execute. This is the easiest to timestamp. - transfer_one_message: The core passes the driver an entire spi_message (a potential batch of spi_transfers). The core puts the same pre and post timestamp to all transfers within a message. This is not ideal, but nothing better can be done by default anyway, since the core has no insight into how the driver batches the transfers. - transfer: Like transfer_one_message, but for unqueued drivers (i.e. the driver implements its own queue scheduling). Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20190905010114.26718-3-olteanv@gmail.com Signed-off-by: Mark Brown commit 1466327e8eb3e59ae8e65e5c728055102fe0a60e Author: Pierre-Louis Bossart Date: Mon Sep 16 16:42:41 2019 -0500 ASoC: SOF: support alternate list of machines For cases where an interface can be pin-muxed, we need to assess at probe time which configuration should be used. In cases such as SoundWire, we need to maintain an alternate list of machines and walk through them when the primary detection based on ACPI _HID fails. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190916214251.13130-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit af78cec45f2d01be9d14c177e403c8021ebfd40e Author: Pierre-Louis Bossart Date: Mon Sep 16 16:42:40 2019 -0500 ASoC: soc-acpi: add link_mask field When interfaces can be pin-muxed, static information from ACPI might not be enough. Add information on which links needs to be enabled by hardware/firmware for a specific machine driver to be selected. When walking through the list of possible machines, links will be checked, which implies that configurations where multiple links are required need to be checked first. Additional criteria will be needed later, such as which SoundWire Slave devices are actually enabled, but for now this helps detect between basic configurations. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190916214251.13130-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fba3baa8d2be7b37748e0ed8345d2d3d6f17f9fd Author: Nishka Dasgupta Date: Tue Aug 13 14:35:03 2019 +0530 drm/tilcdc: plane: Make structure tilcdc_plane_funcs constant The static structure tilcdc_plane_funcs, of type drm_plane_funcs, is used only when passed the fourth argument to drm_plane_init(); however, this fourth parameter is declared as const in the function definition. Hence make tilcdc_plane_funcs constant as well. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20190813090503.9063-1-nishkadg.linux@gmail.com commit 15767cfd81eb9ff2fb783d0c6f458b90efa7d4d3 Author: Neil Armstrong Date: Thu Oct 3 15:08:41 2019 +0200 arm64: dts: meson-g12: add support for simplefb SimpleFB allows transferring a framebuffer from the firmware/bootloader to the kernel, while making sure the related clocks and power supplies stay enabled. Add nodes for CVBS and HDMI Simple Framebuffers, based on the GXBB/GXL/GXM support at [1]. [1] 03b370357907 ("arm64: dts: meson-gx: add support for simplef") Cc: Maxime Jourdan Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit c725fb00dfe3409720be24fad54b9acde26c5f11 Author: Jerome Brunet Date: Wed Sep 25 11:33:58 2019 +0200 arm64: dts: meson: g12a: add audio devices resets Provide the reset lines coming from the audio clock controller to the audio devices of the g12 family Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 0ac0be655dbbedb50dd216a631213daab6e98d88 Author: Anand Moon Date: Tue Oct 1 07:39:01 2019 +0000 arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI supply As per schematics HDMI_P5V0 is supplied by P5V0 so add missing link. Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Anand Moon Signed-off-by: Kevin Hilman commit df39b5239d696e1fc9a88103f69c2d3696bdb0bc Author: Anand Moon Date: Tue Oct 1 07:39:00 2019 +0000 arm64: dts: meson: odroid-c2: Add missing regulator linked to VDDIO_AO3V3 regulator As per schematics TFLASH_VDD, TF_IO, VCC3V3 fixed regulator output which is supplied by VDDIO_AO3V3. While here, move the comment name with the signal name in the schematics above the gpio property to make it consistent with other regulators. Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Anand Moon Signed-off-by: Kevin Hilman commit 60c5abf6a8f54dee2ccb94a7ec58f73883e6c56d Author: Anand Moon Date: Tue Oct 1 07:38:59 2019 +0000 arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0 regulator As per schematics VDDIO_AO18, VDDIO_AO3V3/VDD3V3 DDR3_1V5/DDR_VDDC: fixed regulator output which is supplied by P5V0. Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Anand Moon Signed-off-by: Kevin Hilman commit 0751c59f4a0a98cd478ffbef76028acffcfe2a5d Author: Christian Hewitt Date: Mon Sep 9 19:01:27 2019 +0400 arm64: dts: meson: libretech-cc: update model and compatible Shorten the model description to improve readability in some app GUIs that show the string. Update compatible to be more descriptive, using the format of the LaFrite board in meson-gxl-s805x-libretech-ac.dts. Signed-off-by: Christian Hewitt Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 39f137f55cc26992da897dac0450fb53076d8d5b Author: Christian Hewitt Date: Mon Sep 9 19:01:26 2019 +0400 dt-bindings: arm: amlogic: update libretech-cc compatible Update the compatible for the Libre Computer aml-s905x-cc to be more descriptive using the format introduced with the aml-s805x-ac board. Signed-off-by: Christian Hewitt Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit b1ae8ca54e3c746b2c80300ad2ed72ef4181b3a9 Author: Christian Hewitt Date: Mon Sep 9 19:01:25 2019 +0400 arm64: dts: meson: libretech-ac: update model description Shorten the model description to improve readability in some app GUIs that show the string. Signed-off-by: Christian Hewitt Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 388a2772979b625042524d8b91280616ab4ff5ee Author: Christian Hewitt Date: Mon Sep 9 19:01:24 2019 +0400 arm64: dts: meson-gxm-khadas-vim2: fix uart_A bluetooth node Fixes: 33344e2111a3 ("arm64: dts: meson-gxm-khadas-vim2: fix Bluetooth support") Signed-off-by: Christian Hewitt Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 1c6d575574ec87dbccf7af20ef9dc0df02614069 Author: Christian Hewitt Date: Mon Sep 9 19:01:23 2019 +0400 arm64: dts: meson-gxl-s905x-khadas-vim: fix uart_A bluetooth node Fixes: dd5297cc8b8b ("arm64: dts: meson-gxl-s905x-khadas-vim enable Bluetooth") Signed-off-by: Christian Hewitt Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit d5f6fa904ecbadbb8e9fa6302b0fc165bec0559a Author: Christian Hewitt Date: Mon Sep 9 19:01:22 2019 +0400 arm64: dts: meson-gxl-s905x-khadas-vim: fix gpio-keys-polled node Fix DTC warnings: arch/arm/dts/meson-gxl-s905x-khadas-vim.dtb: Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Fixes: e15d2774b8c0 ("ARM64: dts: meson-gxl: add support for the Khadas VIM board") Signed-off-by: Christian Hewitt Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 72c9b5f6f75fbc6c47e0a2d02bc3838a2a47c90a Author: Anand Moon Date: Mon Sep 2 05:49:35 2019 +0000 arm64: dts: meson: odroid-c2: Disable usb_otg bus to avoid power failed warning usb_otg bus needs to get initialize from the u-boot to be configured to used as power source to SBC or usb otg port will get configured as host device. Right now this support is missing in the u-boot and phy driver so to avoid power failed warning, we would disable this feature until proper fix is found. [ 2.716048] phy phy-c0000000.phy.0: USB ID detect failed! [ 2.720186] phy phy-c0000000.phy.0: phy poweron failed --> -22 [ 2.726001] ------------[ cut here ]------------ [ 2.730583] WARNING: CPU: 0 PID: 12 at drivers/regulator/core.c:2039 _regulator_put+0x3c/0xe8 [ 2.738983] Modules linked in: [ 2.742005] CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.2.9-1-ARCH #1 [ 2.748643] Hardware name: Hardkernel ODROID-C2 (DT) [ 2.753566] Workqueue: events deferred_probe_work_func [ 2.758649] pstate: 60000005 (nZCv daif -PAN -UAO) [ 2.763394] pc : _regulator_put+0x3c/0xe8 [ 2.767361] lr : _regulator_put+0x3c/0xe8 [ 2.771326] sp : ffff000011aa3a50 [ 2.774604] x29: ffff000011aa3a50 x28: ffff80007ed1b600 [ 2.779865] x27: ffff80007f7036a8 x26: ffff80007f7036a8 [ 2.785126] x25: 0000000000000000 x24: ffff000011a44458 [ 2.790387] x23: ffff000011344218 x22: 0000000000000009 [ 2.795649] x21: ffff000011aa3b68 x20: ffff80007ed1b500 [ 2.800910] x19: ffff80007ed1b500 x18: 0000000000000010 [ 2.806171] x17: 000000005be5943c x16: 00000000f1c73b29 [ 2.811432] x15: ffffffffffffffff x14: ffff0000117396c8 [ 2.816694] x13: ffff000091aa37a7 x12: ffff000011aa37af [ 2.821955] x11: ffff000011763000 x10: ffff000011aa3730 [ 2.827216] x9 : 00000000ffffffd0 x8 : ffff000010871760 [ 2.832477] x7 : 00000000000000d0 x6 : ffff0000119d151b [ 2.837739] x5 : 000000000000000f x4 : 0000000000000000 [ 2.843000] x3 : 0000000000000000 x2 : 38104b2678c20100 [ 2.848261] x1 : 0000000000000000 x0 : 0000000000000024 [ 2.853523] Call trace: [ 2.855940] _regulator_put+0x3c/0xe8 [ 2.859562] regulator_put+0x34/0x48 [ 2.863098] regulator_bulk_free+0x40/0x58 [ 2.867153] devm_regulator_bulk_release+0x24/0x30 [ 2.871896] release_nodes+0x1f0/0x2e0 [ 2.875604] devres_release_all+0x64/0xa4 [ 2.879571] really_probe+0x1c8/0x3e0 [ 2.883194] driver_probe_device+0xe4/0x138 [ 2.887334] __device_attach_driver+0x90/0x110 [ 2.891733] bus_for_each_drv+0x8c/0xd8 [ 2.895527] __device_attach+0xdc/0x160 [ 2.899322] device_initial_probe+0x24/0x30 [ 2.903463] bus_probe_device+0x9c/0xa8 [ 2.907258] deferred_probe_work_func+0xa0/0xf0 [ 2.911745] process_one_work+0x1b4/0x408 [ 2.915711] worker_thread+0x54/0x4b8 [ 2.919334] kthread+0x12c/0x130 [ 2.922526] ret_from_fork+0x10/0x1c [ 2.926060] ---[ end trace 51a68f4c0035d6c0 ]--- [ 2.930691] ------------[ cut here ]------------ [ 2.935242] WARNING: CPU: 0 PID: 12 at drivers/regulator/core.c:2039 _regulator_put+0x3c/0xe8 [ 2.943653] Modules linked in: [ 2.946675] CPU: 0 PID: 12 Comm: kworker/0:1 Tainted: G W 5.2.9-1-ARCH #1 [ 2.954694] Hardware name: Hardkernel ODROID-C2 (DT) [ 2.959613] Workqueue: events deferred_probe_work_func [ 2.964700] pstate: 60000005 (nZCv daif -PAN -UAO) [ 2.969445] pc : _regulator_put+0x3c/0xe8 [ 2.973412] lr : _regulator_put+0x3c/0xe8 [ 2.977377] sp : ffff000011aa3a50 [ 2.980655] x29: ffff000011aa3a50 x28: ffff80007ed1b600 [ 2.985916] x27: ffff80007f7036a8 x26: ffff80007f7036a8 [ 2.991177] x25: 0000000000000000 x24: ffff000011a44458 [ 2.996439] x23: ffff000011344218 x22: 0000000000000009 [ 3.001700] x21: ffff000011aa3b68 x20: ffff80007ed1bd00 [ 3.006961] x19: ffff80007ed1bd00 x18: 0000000000000010 [ 3.012222] x17: 000000005be5943c x16: 00000000f1c73b29 [ 3.017484] x15: ffffffffffffffff x14: ffff0000117396c8 [ 3.022745] x13: ffff000091aa37a7 x12: ffff000011aa37af [ 3.028006] x11: ffff000011763000 x10: ffff000011aa3730 [ 3.033267] x9 : 00000000ffffffd0 x8 : ffff000010871760 [ 3.038528] x7 : 00000000000000fd x6 : ffff0000119d151b [ 3.043790] x5 : 000000000000000f x4 : 0000000000000000 [ 3.049051] x3 : 0000000000000000 x2 : 38104b2678c20100 [ 3.054312] x1 : 0000000000000000 x0 : 0000000000000024 [ 3.059574] Call trace: [ 3.061991] _regulator_put+0x3c/0xe8 [ 3.065613] regulator_put+0x34/0x48 [ 3.069149] regulator_bulk_free+0x40/0x58 [ 3.073203] devm_regulator_bulk_release+0x24/0x30 [ 3.077947] release_nodes+0x1f0/0x2e0 [ 3.081655] devres_release_all+0x64/0xa4 [ 3.085622] really_probe+0x1c8/0x3e0 [ 3.089245] driver_probe_device+0xe4/0x138 [ 3.093385] __device_attach_driver+0x90/0x110 [ 3.097784] bus_for_each_drv+0x8c/0xd8 [ 3.101578] __device_attach+0xdc/0x160 [ 3.105373] device_initial_probe+0x24/0x30 [ 3.109514] bus_probe_device+0x9c/0xa8 [ 3.113309] deferred_probe_work_func+0xa0/0xf0 [ 3.117796] process_one_work+0x1b4/0x408 [ 3.121762] worker_thread+0x54/0x4b8 [ 3.125384] kthread+0x12c/0x130 [ 3.128575] ret_from_fork+0x10/0x1c [ 3.132110] ---[ end trace 51a68f4c0035d6c1 ]--- [ 3.136753] dwc2: probe of c9000000.usb failed with error -22 Fixes: 5a0803bd5ae2 ("ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes") Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Anand Moon Signed-off-by: Kevin Hilman commit 47a8bddb6df98cc4062661fe68ad5d4382337d0e Author: Anand Moon Date: Mon Sep 2 05:49:34 2019 +0000 arm64: dts: meson: odroid-c2: Add missing linking regulator to usb bus Add missing linking regulator node to usb bus for power usb devices. Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Anand Moon [ khilman: minor typo fixup ] Signed-off-by: Kevin Hilman commit fcf19f29d79dfe4edce0376dd027ea7a5456ea32 Author: Anand Moon Date: Mon Sep 2 05:49:33 2019 +0000 arm64: dts: meson: odroid-c2: p5v0 is the main 5V power input As per the schematic Monolithic Power Systems MP2161GJ-C499 supply a fixed output voltage of 5.0V. This supplies linked to VDD_EE, HDMI_P5V0, USB_POWER, VCCK, VDDIO_AO1V8, VDDIO_AO3V3, VDD3V3, DDR3_1V5 according to the schematics. Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Anand Moon Signed-off-by: Kevin Hilman commit 2cd2310fca4cd3b42ef07f7424b7a5aa7ba86b68 Author: Christian Hewitt Date: Mon Sep 23 18:13:56 2019 +0400 arm64: dts: meson-g12b-ugoos-am6: add initial device-tree The Ugoos AM6 is based on the Amlogic W400 (G12B) reference design using the S922X chipset. Hardware specifications: - 2GB LPDDR4 RAM - 16GB eMMC storage - 10/100/1000 Base-T Ethernet using External RGMII PHY - 802.11 a/b/g/b/ac + BT 5.0 sdio wireless (Ampak 6398S) - HDMI 2.0 (4k@60p) video - Composite video + 2-channel audio output on 3.5mm jack - S/PDIF audio output - Aux input - 1x USB 3.0 - 3x USB 2.0 - 1x micro SD card slot The device-tree is largely based on meson-g12b-odroid-n2 but with audio and USB config copied from meson-g12a-x96-max. Tested-by: Oleg Ivanov Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman commit 150778111f8bac18034a54511aaec05ee6424c72 Author: Christian Hewitt Date: Mon Sep 23 18:13:55 2019 +0400 dt-bindings: arm: amlogic: Add support for the Ugoos AM6 The Ugoos AM6 is based on the Amlogic W400 (G12B) reference design using the S922X chipset. Acked-by: Rob Herring Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman commit 46f4fa76fc7d0d8ec9dbd83044bb7e10f4d7b9a0 Author: Christian Hewitt Date: Mon Sep 23 18:13:54 2019 +0400 dt-bindings: Add vendor prefix for Ugoos Ugoos Industrial Co., Ltd. are a manufacturer of ARM based TV Boxes/Dongles, Digital Signage and Advertisement Solutions [0]. [0] (https://ugoos.com) Acked-by: Rob Herring Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman commit 6eeaf4d2452ec8b1ece58776812140734fc2e088 Author: Frank Hartung Date: Sat Sep 14 06:49:40 2019 +0400 arm64: dts: meson: Add capacity-dmips-mhz attributes to G12B Meson G12B SoCs (S922X and A311D) are a big-little design where not all CPUs are equal; the A53s cores are weaker than the A72s. Include capacity-dmips-mhz properties to tell the OS there is a difference in processing capacity. The dmips values are based on similar submissions for other A53/A72 SoCs: HiSilicon 3660 [1] and Rockchip RK3399 [2]. This change is particularly beneficial for use-cases like retro gaming where emulators often run on a single core. The OS now chooses an A72 core instead of an A53 core. [1] https://lore.kernel.org/patchwork/patch/862742/ [2] https://patchwork.kernel.org/patch/10836577/ Signed-off-by: Frank Hartung Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit b255e1268b0b3dcc5a347d203e8f38ab52bc9a1d Author: Jianxin Pan Date: Thu Sep 12 04:19:30 2019 -0400 arm64: dts: add support for A1 based Amlogic AD401 Add basic support for the Amlogic A1 based Amlogic AD401 board: which describe components as follows: Reserve Memory, CPU, GIC, IRQ, Timer, UART. It's capable of booting up into the serial console. Signed-off-by: Jianxin Pan Reviewed-by: Jerome Brunet Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 46e723133fdc5ef903e5d11121a44fdbd2ca306c Author: Jianxin Pan Date: Thu Sep 12 04:19:29 2019 -0400 dt-bindings: arm: amlogic: add Amlogic AD401 bindings Add the compatible for the Amlogic A1 Based AD401 board. Signed-off-by: Jianxin Pan Reviewed-by: Rob Herring Reviewed-by: Martin Blumenstingl Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit b7dda5cae714db40c9c161e0cab10d00b2d1f8a1 Author: Jianxin Pan Date: Thu Sep 12 04:19:28 2019 -0400 dt-bindings: arm: amlogic: add A1 bindings Add bindings for the new Amlogic A1 SoC family. A1 is an application processor designed for smart audio and IoT applications, with dual core Cortex-A35. Signed-off-by: Jianxin Pan Reviewed-by: Rob Herring Reviewed-by: Martin Blumenstingl Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 1d7c541b8a5b80a3252ca96a0ed22e894bcafb5d Author: Christian Hewitt Date: Mon Oct 7 09:23:59 2019 +0400 soc: amlogic: meson-gx-socinfo: Add S905X3 ID for VIM3L VIM3L appears to use a different ID: [ 0.086470] soc soc0: Amlogic Meson SM1 (S905X3) Revision 2b:c (b0:2) Detected Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman commit 240051cb833b5d9006ff0852ac54b2d7a657404b Author: Jianxin Pan Date: Thu Sep 12 04:19:27 2019 -0400 soc: amlogic: meson-gx-socinfo: Add A1 and A113L IDs Add the SoC IDs for the A113L Amlogic A1 SoC. Signed-off-by: Jianxin Pan Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit edd6d5393206ec9bfc74776f6f20a57f11327e1b Author: Dan Murphy Date: Mon Oct 7 12:11:55 2019 -0500 ASoC: tas2770: Fix snd_soc_update_bits error handling According the documentation for snd_soc_update_bits the API will return a 1 if the update was successful with a value change, a 0 if the update was successful with no value change or a negative if the command just failed. So the value of return in the driver needs to be checked for being less then 0 or the caller may indicate failure when the value actually changed. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20191007171157.17813-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 40f90ef0a77bab65c8f959ba1d264bb674f7234b Author: Dan Murphy Date: Mon Oct 7 12:11:57 2019 -0500 ASoc: tas2770: Remove unused defines and variables Remove unused defines and structure variables that are not referenced by the code. If these are needed for future enhancements then they should be added at that time. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20191007171157.17813-3-dmurphy@ti.com Signed-off-by: Mark Brown commit 5911e6729e0886a3fb00b897b73892134d37158a Author: Dan Murphy Date: Mon Oct 7 12:11:56 2019 -0500 ASoC: tas2770: Remove unneeded read of the TDM_CFG3 register Remove the unneeded and incorrect read of the TDM_CFG3 register. The read is done but the value is never used. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20191007171157.17813-2-dmurphy@ti.com Signed-off-by: Mark Brown commit cfc0e76bbbde6875e026c18ea72f181e5d00d93f Author: Grygorii Strashko Date: Mon Oct 7 10:59:10 2019 -0700 ARM: configs: keystone: enable cpts Enable CPTS support which is present in Network Coprocessor Gigabit Ethernet (GbE) Switch Subsystem. Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit ee372eee0a3184139b40db56f627bc76b78f5103 Author: Grygorii Strashko Date: Mon Oct 7 10:59:10 2019 -0700 ARM: dts: k2l-netcp: add cpts refclk_mux node KeyStone 66AK2L 1G Ethernet Switch Subsystems, can control an external multiplexer that selects one of up to 32 clocks for time sync reference (RFTCLK) clock. This feature can be configured through CPTS_RFTCLK_SEL register (offset: x08) in CPTS module and modelled as multiplexer clock. Hence, add cpts-refclk-mux clock node which allows to mux one of SYSCLK2, SYSCLK3, TIMI0, TIMI1, TSREFCLK clocks as CPTS reference clock [1] and group all CPTS properties under "cpts" subnode. [1] http://www.ti.com/lit/gpn/66ak2l06 Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit 8cb7888d648eede1dd8d8a17db25f4062b4d00eb Author: Grygorii Strashko Date: Mon Oct 7 10:59:09 2019 -0700 ARM: dts: k2hk-netcp: add cpts refclk_mux node KeyStone 66AK2H/K 1G Ethernet Switch Subsystems, can control an external multiplexer that selects one of up to 32 clocks for time sync reference (RFTCLK) clock. This feature can be configured through CPTS_RFTCLK_SEL register (offset: x08) in CPTS module and modelled as multiplexer clock. Hence, add cpts-refclk-mux clock node which allows to mux one of SYSCLK2, SYSCLK3, TIMI0, TIMI1, TSREFCLK clocks as CPTS reference clock [1] and group all CPTS properties under "cpts" subnode. [1] http://www.ti.com/lit/gpn/66ak2h14 Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit debc91ab8fd275d003152244424ed6c224bcdf6a Author: Grygorii Strashko Date: Mon Oct 7 10:59:09 2019 -0700 ARM: dts: k2e-netcp: add cpts refclk_mux node KeyStone 66AK2E 1G Ethernet Switch Subsystems, can control an external multiplexer that selects one of up to 32 clocks for time sync reference (RFTCLK) clock. This feature can be configured through CPTS_RFTCLK_SEL register (offset: x08) in CPTS module and modelled as multiplexer clock. Hence, add cpts-refclk-mux clock node which allows to mux one of SYSCLK2, SYSCLK3, TIMI0, TIMI1, TSIPCLKA, TSREFCLK, TSIPCLKB clocks as CPTS reference clock [1] and group all CPTS properties under "cpts" subnode. [1] http://www.ti.com/lit/gpn/66ak2e05 Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit e86ddd181e6df0c5864ff333899f2370d89b6f5e Author: Grygorii Strashko Date: Mon Oct 7 10:59:08 2019 -0700 ARM: dts: k2e-clocks: add input ext. fixed clocks tsipclka/b Add set of fixed, external input clocks definitions for TSIPCLKA, TSIPCLKB clocks. Such clocks can be used as reference clocks for some HW modules (as cpts, for example) by configuring corresponding clock muxes. For these clocks real frequencies have to be defined in board files. Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit c5aecb49e41df82c2793d5ba783f87c4abc62f90 Author: Grygorii Strashko Date: Mon Oct 7 10:59:08 2019 -0700 ARM: dts: keystone-clocks: add input fixed clocks Add set of fixed, external input clocks definitions for TIMI0, TIMI1, TSREFCLK clocks. Such clocks can be used as reference clocks for some HW modules (as cpts, for example) by configuring corresponding clock muxes. For these clocks real frequencies have to be defined in board files. Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit 9662dd752c149a6d50f7b731263c09254c403b21 Author: Aurabindo Jayamohanan Date: Fri Sep 13 12:02:17 2019 +0000 mips: check for dsp presence only once before save/restore {save,restore}_dsp() internally checks if the cpu has dsp support. Therefore, explicit check is not required before calling them in {save,restore}_processor_state() Signed-off-by: Aurabindo Jayamohanan Signed-off-by: Paul Burton Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: alexios.zavras@intel.com Cc: gregkh@linuxfoundation.org Cc: armijn@tjaldur.nl Cc: allison@lohutok.net Cc: tglx@linutronix.de Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 3aec2c6a4886276bcbc9ace9416ffae41643702c Author: Matt Roper Date: Wed Oct 2 12:22:58 2019 -0700 drm/i915/vbt: Child device size remains unchanged through VBT 229 The latest documented version of the VBT is 229, but no further data has been added to the child device definition in block 2. Update the child device version test to eliminate the "Expected child device config size for VBT version XXX not known; assuming 39" debug messages from the logs. Bspec: 20124 Bspec: 20157 Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191002192258.1013-1-matthew.d.roper@intel.com Reviewed-by: Jani Nikula commit 5dc76a96e95ae041c1d8e52714bd77576b35919b Author: Thomas Bogendoerfer Date: Thu Oct 3 11:52:30 2019 +0200 MIPS: PCI: use information from 1-wire PROM for IOC3 detection IOC3 chips in SGI system are conntected to a bridge ASIC, which has a 1-wire prom attached with part number information. This changeset uses this information to create PCI subsystem information, which the MFD driver uses for further platform device setup. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Jonathan Corbet Cc: Ralf Baechle Cc: James Hogan Cc: Lee Jones Cc: David S. Miller Cc: Srinivas Kandagatla Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-rtc@vger.kernel.org Cc: linux-serial@vger.kernel.org commit 8c2a2b8c2ff680b1d0f715cf1f320722b762f9dd Author: Thomas Bogendoerfer Date: Thu Oct 3 11:52:29 2019 +0200 nvmem: core: add nvmem_device_find nvmem_device_find provides a way to search for nvmem devices with the help of a match function simlair to bus_find_device. Reviewed-by: Srinivas Kandagatla Acked-by: Srinivas Kandagatla Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Jonathan Corbet Cc: Ralf Baechle Cc: James Hogan Cc: Lee Jones Cc: David S. Miller Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-rtc@vger.kernel.org Cc: linux-serial@vger.kernel.org commit 24b0cb4f883adc92689a336800495838fdfa4763 Author: Alexandre GRIVEAUX Date: Tue Oct 1 21:09:30 2019 +0200 MIPS: CI20: DTS: Add Leds Adding leds and related triggers. Signed-off-by: Alexandre GRIVEAUX Signed-off-by: Paul Burton Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org commit 948f2708f945f9354462a1974dd4e351cd329981 Author: Alexandre GRIVEAUX Date: Tue Oct 1 21:09:14 2019 +0200 MIPS: CI20: DTS: Add IW8103 Wifi + bluetooth Add IW8103 Wifi + bluetooth module to device tree and related power domain. Signed-off-by: Alexandre GRIVEAUX Signed-off-by: Paul Burton Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org commit 73f2b940474d1d493eb13267995b0b6dbfe62f99 Author: Alexandre GRIVEAUX Date: Tue Oct 1 21:09:00 2019 +0200 MIPS: CI20: DTS: Add I2C nodes Adding missing I2C nodes and some peripheral: - PMU - RTC Signed-off-by: Alexandre GRIVEAUX Signed-off-by: Paul Burton Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org commit f56a040c9faf04b4ca043f8c7bd8170c4e0fedcd Author: Alexandre GRIVEAUX Date: Tue Oct 1 21:08:40 2019 +0200 MIPS: JZ4780: DTS: Add I2C nodes Add the devicetree nodes for the I2C core of the JZ4780 SoC, disabled by default. Signed-off-by: Alexandre GRIVEAUX Signed-off-by: Paul Burton Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org commit a2ecb233e3e759730269b31b7d8add823cf196ba Author: Dmitry Korotin Date: Thu Sep 12 22:53:45 2019 +0000 mips: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE FORTIFY_SOURCE detects various overflows at compile and run time. (6974f0c4555e ("include/linux/string.h: add the option of fortified string.h functions) ARCH_HAS_FORTIFY_SOURCE means that the architecture can be built and run with CONFIG_FORTIFY_SOURCE. Since mips can be built and run with that flag, select ARCH_HAS_FORTIFY_SOURCE as default. Signed-off-by: Dmitry Korotin Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org commit ffe59ee36aaa8395b10eb94937f038e532432a6b Author: Huacai Chen Date: Sat Sep 21 21:50:28 2019 +0800 MIPS: Loongson-3: Add CSR IPI support CSR IPI and legacy MMIO use the same infrastructure, but CSR IPI is faster than legacy MMIO IPI. This patch enable CSR IPI if possible (except for MailBox, because CSR IPI is too complicated for MailBox). Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-mips@vger.kernel.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit 7507445b1993087d2a6ef3e30e3eaeb2da40dbc8 Author: Huacai Chen Date: Sat Sep 21 21:50:27 2019 +0800 MIPS: Loongson: Add Loongson-3A R4 basic support All Loongson-3 CPU family: Code-name Brand-name PRId Loongson-3A R1 Loongson-3A1000 0x6305 Loongson-3A R2 Loongson-3A2000 0x6308 Loongson-3A R2.1 Loongson-3A2000 0x630c Loongson-3A R3 Loongson-3A3000 0x6309 Loongson-3A R3.1 Loongson-3A3000 0x630d Loongson-3A R4 Loongson-3A4000 0xc000 Loongson-3B R1 Loongson-3B1000 0x6306 Loongson-3B R2 Loongson-3B1500 0x6307 Features of R4 revision of Loongson-3A: - All R2/R3 features, including SFB, V-Cache, FTLB, RIXI, DSP, etc. - Support variable ASID bits. - Support MSA and VZ extensions. - Support CPUCFG (CPU config) and CSR (Control and Status Register) extensions. - 64 entries of VTLB (classic TLB), 2048 entries of FTLB (8-way set-associative). Now 64-bit Loongson processors has three types of PRID.IMP: 0x6300 is the classic one so we call it PRID_IMP_LOONGSON_64C (e.g., Loongson-2E/ 2F/3A1000/3B1000/3B1500/3A2000/3A3000), 0x6100 is for some processors which has reduced capabilities so we call it PRID_IMP_LOONGSON_64R (e.g., Loongson-2K), 0xc000 is supposed to cover all new processors in general (e.g., Loongson-3A4000+) so we call it PRID_IMP_LOONGSON_64G. Signed-off-by: Huacai Chen Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-mips@vger.kernel.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit 6a6f9b7dafd50efc1b243fb25c3766ebc78adc7b Author: Huacai Chen Date: Sat Sep 21 21:50:26 2019 +0800 MIPS: Loongson: Add CFUCFG&CSR support Loongson-3A R4+ (Loongson-3A4000 and newer) has CPUCFG (CPU config) and CSR (Control and Status Register) extensions. This patch add read/write functionalities for them. Signed-off-by: Huacai Chen Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-mips@vger.kernel.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen commit 397dc00e249ec64e106374565575dd0eb7e25998 Author: Mike Rapoport Date: Mon Sep 16 14:13:10 2019 +0300 mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM The memory initialization of SGI-IP27 is already half-way to support SPARSEMEM. It only had free_bootmem_with_active_regions() left-overs interfering with sparse_memory_present_with_active_regions(). Replace these calls with simpler memblocks_present() call in prom_meminit() and adjust arch/mips/Kconfig to enable SPARSEMEM and SPARSEMEM_EXTREME for SGI-IP27. Co-developed-by: Thomas Bogendoerfer Signed-off-by: Thomas Bogendoerfer Signed-off-by: Mike Rapoport Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit e4acfbc18fc9e0d75ad15a652864b3971892e423 Author: Paul Burton Date: Tue Oct 1 21:53:44 2019 +0000 MIPS: Check Loongson3 LL/SC errata workaround correctness When Loongson3 LL/SC errata workarounds are enabled (ie. CONFIG_CPU_LOONGSON3_WORKAROUNDS=y) run a tool to scan through the compiled kernel & ensure that the workaround is applied correctly. That is, ensure that: - Every LL or LLD instruction is preceded by a sync instruction. - Any branches from within an LL/SC loop to outside of that loop target a sync instruction. Reasoning for these conditions can be found by reading the comment above the definition of __SYNC_loongson3_war in arch/mips/include/asm/sync.h. This tool will help ensure that we don't inadvertently introduce code paths that miss the required workarounds. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 4dee90d7b5796692e8da78c7b64cf42d5e4c1b09 Author: Paul Burton Date: Tue Oct 1 21:53:43 2019 +0000 MIPS: genex: Don't reload address unnecessarily In ejtag_debug_handler() we must reload the address of ejtag_debug_buffer_spinlock if an sc fails, since the address in k0 will have been clobbered by the result of the sc instruction. In the case where we simply load a non-zero value (ie. there's contention for the lock) the address will not be clobbered & we can simply branch back to repeat the load from memory without reloading the address into k0. The primary motivation for this change is that it moves the target of the bnez instruction to an instruction within the LL/SC loop (the LL itself), which we know contains no other memory accesses & therefore isn't affected by Loongson3 LL/SC errata. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 12dbb04f2ac1fcbef0d6463abb3071ce8d8fe45f Author: Paul Burton Date: Tue Oct 1 21:53:42 2019 +0000 MIPS: genex: Add Loongson3 LL/SC workaround to ejtag_debug_handler In ejtag_debug_handler we use LL & SC instructions to acquire & release an open-coded spinlock. For Loongson3 systems affected by LL/SC errata this requires that we insert a sync instruction prior to the LL in order to ensure correct behavior of the LL/SC loop. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit ae4cd0b1a4756344cb99c0004d156b585cf9e907 Author: Paul Burton Date: Tue Oct 1 21:53:41 2019 +0000 MIPS: barrier: Make __smp_mb__before_atomic() a no-op for Loongson3 Loongson3 systems with CONFIG_CPU_LOONGSON3_WORKAROUNDS enabled already emit a full completion barrier as part of the inline assembly containing LL/SC loops for atomic operations. As such the barrier emitted by __smp_mb__before_atomic() is redundant, and we can remove it. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 7f56b123548142fd48b2c6891977e8fda695a838 Author: Paul Burton Date: Tue Oct 1 21:53:40 2019 +0000 MIPS: barrier: Remove loongson_llsc_mb() The loongson_llsc_mb() macro is no longer used - instead barriers are emitted as part of inline asm using the __SYNC() macro. Remove the now-defunct loongson_llsc_mb() macro. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit e84957e6ae043bb83ad6ae7e949a1ce97b6bbfef Author: Paul Burton Date: Tue Oct 1 21:53:39 2019 +0000 MIPS: syscall: Emit Loongson3 sync workarounds within asm Generate the sync instructions required to workaround Loongson3 LL/SC errata within inline asm blocks, which feels a little safer than doing it from C where strictly speaking the compiler would be well within its rights to insert a memory access between the separate asm statements we previously had, containing sync & ll instructions respectively. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 3c1d3f0979721a39dd2980c97466127ce65aa130 Author: Paul Burton Date: Tue Oct 1 21:53:38 2019 +0000 MIPS: futex: Emit Loongson3 sync workarounds within asm Generate the sync instructions required to workaround Loongson3 LL/SC errata within inline asm blocks, which feels a little safer than doing it from C where strictly speaking the compiler would be well within its rights to insert a memory access between the separate asm statements we previously had, containing sync & ll instructions respectively. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit a91f2a1dba44c29cd0d75edd8787f4469092ae8f Author: Paul Burton Date: Tue Oct 1 21:53:38 2019 +0000 MIPS: cmpxchg: Omit redundant barriers for Loongson3 When building a kernel configured to support Loongson3 LL/SC workarounds (ie. CONFIG_CPU_LOONGSON3_WORKAROUNDS=y) the inline assembly in __xchg_asm() & __cmpxchg_asm() already emits completion barriers, and as such we don't need to emit extra barriers from the xchg() or cmpxchg() macros. Add compile-time constant checks causing us to omit the redundant memory barriers. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 6a57d2d1e7c3ac7f47d8c51bddd9082fe2fb485b Author: Paul Burton Date: Tue Oct 1 21:53:37 2019 +0000 MIPS: cmpxchg: Emit Loongson3 sync workarounds within asm Generate the sync instructions required to workaround Loongson3 LL/SC errata within inline asm blocks, which feels a little safer than doing it from C where strictly speaking the compiler would be well within its rights to insert a memory access between the separate asm statements we previously had, containing sync & ll instructions respectively. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 9026737703aeee35702a0f990811e9202469c7b4 Author: Paul Burton Date: Tue Oct 1 21:53:36 2019 +0000 MIPS: bitops: Use smp_mb__before_atomic in test_* ops Use smp_mb__before_atomic() rather than smp_mb__before_llsc() in test_and_set_bit(), test_and_clear_bit() & test_and_change_bit(). The _atomic() versions make semantic sense in these cases, and will allow a later patch to omit redundant barriers for Loongson3 systems that already include a barrier within __test_bit_op(). Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 5bb29275df7a7aab8b6c29686109cc5cb1015850 Author: Paul Burton Date: Tue Oct 1 21:53:35 2019 +0000 MIPS: bitops: Emit Loongson3 sync workarounds within asm Generate the sync instructions required to workaround Loongson3 LL/SC errata within inline asm blocks, which feels a little safer than doing it from C where strictly speaking the compiler would be well within its rights to insert a memory access between the separate asm statements we previously had, containing sync & ll instructions respectively. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit c042be02d730534ee93cb446f194a558b5a84adf Author: Paul Burton Date: Tue Oct 1 21:53:34 2019 +0000 MIPS: bitops: Use BIT_WORD() & BITS_PER_LONG Rather than using custom SZLONG_LOG & SZLONG_MASK macros to shift & mask a bit index to form word & bit offsets respectively, make use of the standard BIT_WORD() & BITS_PER_LONG macros for the same purpose. volatile is added to the definition of pointers to the long-sized word we'll operate on, in order to prevent the compiler complaining that we cast away the volatile qualifier of the addr argument. This should have no effect on generated code, which in the LL/SC case is inline asm anyway & in the non-LLSC case access is constrained by compiler barriers provided by raw_local_irq_{save,restore}(). Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit cc99987c375e499a95572504d69c215591222072 Author: Paul Burton Date: Tue Oct 1 21:53:33 2019 +0000 MIPS: bitops: Abstract LL/SC loops Introduce __bit_op() & __test_bit_op() macros which abstract away the implementation of LL/SC loops. This cuts down on a lot of duplicate boilerplate code, and also allows R10000_LLSC_WAR to be handled outside of the individual bitop functions. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit aad028cadb17867d257e8b90078f6a19614775ff Author: Paul Burton Date: Tue Oct 1 21:53:32 2019 +0000 MIPS: bitops: Avoid redundant zero-comparison for non-LLSC The IRQ-disabling non-LLSC fallbacks for bitops on UP systems already return a zero or one, so there's no need to perform another comparison against zero. Move these comparisons into the LLSC paths to avoid the redundant work. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit d6103510e7ccdc992e4eca7031eae366117ae6d4 Author: Paul Burton Date: Tue Oct 1 21:53:31 2019 +0000 MIPS: bitops: Use the BIT() macro Use the BIT() macro in asm/bitops.h rather than open-coding its equivalent. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit a2e66b862cc7b8db1a0eb63b71e61943d48c3c8a Author: Paul Burton Date: Tue Oct 1 21:53:31 2019 +0000 MIPS: bitops: Allow immediates in test_and_{set,clear,change}_bit The logical operations or & xor used in the test_and_set_bit_lock(), test_and_clear_bit() & test_and_change_bit() functions currently force the value 1< Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 6bbe043bd3f4766b089b7b51a80e75745868c038 Author: Paul Burton Date: Tue Oct 1 21:53:30 2019 +0000 MIPS: bitops: Implement test_and_set_bit() in terms of _lock variant The only difference between test_and_set_bit() & test_and_set_bit_lock() is memory ordering barrier semantics - the former provides a full barrier whilst the latter only provides acquire semantics. We can therefore implement test_and_set_bit() in terms of test_and_set_bit_lock() with the addition of the extra memory barrier. Do this in order to avoid duplicating logic. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 27aab27259aec1f200cf1f84f02b8192d27abe64 Author: Paul Burton Date: Tue Oct 1 21:53:29 2019 +0000 MIPS: bitops: ins start position is always an immediate The start position for an ins instruction is always encoded as an immediate, so allowing registers to be used by the inline asm makes no sense. It should never happen anyway since a bit index should always be small enough to be treated as an immediate, but remove the nonsensical "r" for sanity. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 59361e9975fd567a642f4ee32fd0ea662ffa7040 Author: Paul Burton Date: Tue Oct 1 21:53:27 2019 +0000 MIPS: bitops: Use MIPS_ISA_REV, not #ifdefs Rather than #ifdef on CONFIG_CPU_* to determine whether the ins instruction is supported we can simply check MIPS_ISA_REV to discover whether we're targeting MIPSr2 or higher. Do so in order to clean up the code. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 3d2920cf4fd41a27730083ef395a0c49d4750474 Author: Paul Burton Date: Tue Oct 1 21:53:26 2019 +0000 MIPS: bitops: Only use ins for bit 16 or higher set_bit() can set bits 0-15 using an ori instruction, rather than loading the value -1 into a register & then using an ins instruction. That is, rather than the following: li t0, -1 ll t1, 0(t2) ins t1, t0, 4, 1 sc t1, 0(t2) We can have the simpler: ll t1, 0(t2) ori t1, t1, 0x10 sc t1, 0(t2) The or path already allows immediates to be used, so simply restricting the ins path to bits that don't fit in immediates is sufficient to take advantage of this. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit fe7cd97e68fac186492847f8eda0eff8bcfb0cbc Author: Paul Burton Date: Tue Oct 1 21:53:25 2019 +0000 MIPS: bitops: Handle !kernel_uses_llsc first Reorder conditions in our various bitops functions that check kernel_uses_llsc such that they handle the !kernel_uses_llsc case first. This allows us to avoid the need to duplicate the kernel_uses_llsc check in all the other cases. For functions that don't involve barriers common to the various implementations, we switch to returning from within each if block making each case easier to read in isolation. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 1da7bce8591d58bf2a442b0324659af7390401c2 Author: Paul Burton Date: Tue Oct 1 21:53:24 2019 +0000 MIPS: atomic: Deduplicate 32b & 64b read, set, xchg, cmpxchg Remove the remaining duplication between 32b & 64b in asm/atomic.h by making use of an ATOMIC_OPS() macro to generate: - atomic_read()/atomic64_read() - atomic_set()/atomic64_set() - atomic_cmpxchg()/atomic64_cmpxchg() - atomic_xchg()/atomic64_xchg() This is consistent with the way all other functions in asm/atomic.h are generated, and ensures consistency between the 32b & 64b functions. Of note is that this results in the above now being static inline functions rather than macros. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 40e784b4d4bc31dee5f1db6a20287777d3aaa4dc Author: Paul Burton Date: Tue Oct 1 21:53:23 2019 +0000 MIPS: atomic: Unify 32b & 64b sub_if_positive Unify the definitions of atomic_sub_if_positive() & atomic64_sub_if_positive() using a macro like we do for most other atomic functions. This allows us to share the implementation ensuring consistency between the two. Notably this provides the appropriate loongson3_war barriers in the atomic64_sub_if_positive() case which were previously missing. The code is rearranged a little to handle the !kernel_uses_llsc case first in order to de-indent the LL/SC case & allow us not to go over 80 characters per line. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 77d281b7966e476927a45c5fb272d720aa75bb95 Author: Paul Burton Date: Tue Oct 1 21:53:21 2019 +0000 MIPS: atomic: Use _atomic barriers in atomic_sub_if_positive() Use smp_mb__before_atomic() & smp_mb__after_atomic() in atomic_sub_if_positive() rather than the equivalent smp_mb__before_llsc() & smp_llsc_mb(). The former are more standard & this preps us for avoiding redundant duplicate barriers on Loongson3 in a later patch. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 4d1dbfe6cbec34c6398a480c0572bba794e89e11 Author: Paul Burton Date: Tue Oct 1 21:53:20 2019 +0000 MIPS: atomic: Emit Loongson3 sync workarounds within asm Generate the sync instructions required to workaround Loongson3 LL/SC errata within inline asm blocks, which feels a little safer than doing it from C where strictly speaking the compiler would be well within its rights to insert a memory access between the separate asm statements we previously had, containing sync & ll instructions respectively. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit a38ee6bb14a41b6849576bcf6cbd33cbbe5c3a7d Author: Paul Burton Date: Tue Oct 1 21:53:18 2019 +0000 MIPS: atomic: Use one macro to generate 32b & 64b functions Cut down on duplication by generalizing the ATOMIC_OP(), ATOMIC_OP_RETURN() & ATOMIC_FETCH_OP() macros to work for both 32b & 64b atomics, and removing the ATOMIC64_ variants. This ensures consistency between our atomic_* & atomic64_* functions. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 9537db24c65aeb71718916272687b0d00d3e0821 Author: Paul Burton Date: Tue Oct 1 21:53:16 2019 +0000 MIPS: atomic: Handle !kernel_uses_llsc first Handle the !kernel_uses_llsc path first in our ATOMIC_OP(), ATOMIC_OP_RETURN() & ATOMIC_FETCH_OP() macros & return from within the block. This allows us to de-indent the kernel_uses_llsc path by one level which will be useful when making further changes. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 36d3295c5a0d9169bae1d40f8db92459977c2936 Author: Paul Burton Date: Tue Oct 1 21:53:15 2019 +0000 MIPS: atomic: Fix whitespace in ATOMIC_OP macros We define macros in asm/atomic.h which end each line with space characters before a backslash to continue on the next line. Remove the space characters leaving tabs as the whitespace used for conformity with coding convention. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 185d7d7a58194e3784e8dc2898756065f974090a Author: Paul Burton Date: Tue Oct 1 21:53:14 2019 +0000 MIPS: barrier: Clean up sync_ginv() Use the new __SYNC() infrastructure to implement sync_ginv(), for consistency with much of the rest of the asm/barrier.h. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit fe0065e56227a2f6a6ad717c6d8d871263e482a8 Author: Paul Burton Date: Tue Oct 1 21:53:13 2019 +0000 MIPS: barrier: Clean up __sync() definition Implement __sync() using the new __SYNC() infrastructure, which will take care of not emitting an instruction for old R3k CPUs that don't support it. The only behavioral difference is that __sync() will now provide a compiler barrier on these old CPUs, but that seems like reasonable behavior anyway. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 5c12a6eff6ae3ed32f1c4d6458e58e6c4e9b2352 Author: Paul Burton Date: Tue Oct 1 21:53:11 2019 +0000 MIPS: barrier: Remove fast_mb() Octeon #ifdef'ery The definition of fast_mb() is the same in both the Octeon & non-Octeon cases, so remove the duplication & define it only once. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 05e6da742b5b708057e84487576655e4d7238dd1 Author: Paul Burton Date: Tue Oct 1 21:53:10 2019 +0000 MIPS: barrier: Clean up __smp_mb() definition We #ifdef on Cavium Octeon CPUs, but emit the same sync instruction in both cases. Remove the #ifdef & simply expand to the __sync() macro. Whilst here indent the strong ordering case definitions to match the indentation of the weak ordering ones, helping readability. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 21e3134b3ec09e722cbcda69788f206adc8db1f4 Author: Paul Burton Date: Tue Oct 1 21:53:08 2019 +0000 MIPS: barrier: Clean up rmb() & wmb() definitions Simplify our definitions of rmb() & wmb() using the new __SYNC() infrastructure. The fast_rmb() & fast_wmb() macros are removed, since they only provided a level of indirection that made the code less readable & weren't directly used anywhere in the kernel tree. The Octeon #ifdef'ery is removed, since the "syncw" instruction previously used is merely an alias for "sync 4" which __SYNC() will emit for the wmb sync type when the kernel is configured for an Octeon CPU. Similarly __SYNC() will emit nothing for the rmb sync type in Octeon configurations. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit bf92927251b3642c10f8562d4f884a785cdd1855 Author: Paul Burton Date: Tue Oct 1 21:53:07 2019 +0000 MIPS: barrier: Add __SYNC() infrastructure Introduce an asm/sync.h header which provides infrastructure that can be used to generate sync instructions of various types, and for various reasons. For example if we need a sync instruction that provides a full completion barrier but only on systems which have weak memory ordering, we can generate the appropriate assembly code using: __SYNC(full, weak_ordering) When the kernel is configured to run on systems with weak memory ordering (ie. CONFIG_WEAK_ORDERING is selected) we'll emit a sync instruction. When the kernel is configured to run on systems with strong memory ordering (ie. CONFIG_WEAK_ORDERING is not selected) we'll emit nothing. The caller doesn't need to know which happened - it simply says what it needs & when, with no concern for checking the kernel configuration. There are some scenarios in which we may want to emit code only when we *didn't* emit a sync instruction. For example, some Loongson3 CPUs suffer from a bug that requires us to emit a sync instruction prior to each ll instruction (enabled by CONFIG_CPU_LOONGSON3_WORKAROUNDS). In cases where this bug workaround is enabled, it's wasteful to then have more generic code emit another sync instruction to provide barriers we need in general. A __SYNC_ELSE() macro allows for this, providing an extra argument that contains code to be assembled only in cases where the sync instruction was not emitted. For example if we have a scenario in which we generally want to emit a release barrier but for affected Loongson3 configurations upgrade that to a full completion barrier, we can do that like so: __SYNC_ELSE(full, loongson3_war, __SYNC(rl, always)) The assembly generated by these macros can be used either as inline assembly or in assembly source files. Differing types of sync as provided by MIPSr6 are defined, but currently they all generate a full completion barrier except in kernels configured for Cavium Octeon systems. There the wmb sync-type is used, and rmb syncs are omitted, as has been the case since commit 6b07d38aaa52 ("MIPS: Octeon: Use optimized memory barrier primitives."). Using __SYNC() with the wmb or rmb types will abstract away the Octeon specific behavior and allow us to later clean up asm/barrier.h code that currently includes a plethora of #ifdef's. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit ef85d057a605c36063a15345be87a45e0affba88 Author: Paul Burton Date: Tue Oct 1 21:53:06 2019 +0000 MIPS: Use compact branch for LL/SC loops on MIPSr6+ When targeting MIPSr6 or higher make use of a compact branch in LL/SC loops, preventing the insertion of a delay slot nop that only serves to waste space. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 878f75c7a2530471844a93b01e887f09d24ed57f Author: Paul Burton Date: Tue Oct 1 21:53:05 2019 +0000 MIPS: Unify sc beqz definition We currently duplicate the definition of __scbeqz in asm/atomic.h & asm/cmpxchg.h. Move it to asm/llsc.h & rename it to __SC_BEQZ to fit better with the existing __SC macro provided there. We include a tab in the string in order to avoid the need for users to indent code any further to include whitespace of their own after the instruction mnemonic. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-kernel@vger.kernel.org commit 376357aca715c27f716844e9825417e12e3b02e7 Author: Stefan Roese Date: Mon Aug 12 12:36:55 2019 +0200 MIPS: ralink: Add GARDENA smart Gateway MT7688 board This patch adds support for the GARDENA smart Gateway, which is based on the MediaTek MT7688 SoC. It is equipped with 128 MiB of DDR and 8 MiB of flash (SPI NOR) and additional 128MiB SPI NAND storage. Signed-off-by: Stefan Roese Signed-off-by: Paul Burton Cc: Harvey Hunt Cc: John Crispin Cc: linux-mips@vger.kernel.org commit 4ce8a03c4176eac1c8fce44f4c117f1e6c106986 Author: Stefan Roese Date: Mon Aug 12 12:36:54 2019 +0200 dt-bindings: mips: Add gardena vendor prefix and board description This patch adds the vendor prefix for gardena and a short description including the compatible string for the "GARDENA smart Gateway" based on the MT7688 SoC. Signed-off-by: Stefan Roese Reviewed-by: Rob Herring Signed-off-by: Paul Burton Cc: devicetree@vger.kernel.org Cc: linux-mips@vger.kernel.org commit cf892abfab776399281c85efad42d1df4c4a4123 Author: Stefan Roese Date: Mon Aug 12 12:36:53 2019 +0200 dt-bindings: mips: Add missing mt7688a-soc compatible This patch adds the "ralink,mt7688a-soc" compatible to the ralink DT bindings documentation. This compatible is already used by some MIPS boards (e.g. omega2p.dts) but not yet documented. It will also be used by the upcoming "GARDENA smart Gateway" support. Signed-off-by: Stefan Roese Reviewed-by: Rob Herring Signed-off-by: Paul Burton Cc: devicetree@vger.kernel.org Cc: linux-mips@vger.kernel.org commit cd5f9e4fd8792afeadfec17290ee87943b00421b Author: Stefan Roese Date: Mon Aug 12 12:36:52 2019 +0200 MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node This patch adds the I2C controller description to the MT7628A dtsi file. Signed-off-by: Stefan Roese Signed-off-by: Paul Burton Cc: Harvey Hunt Cc: John Crispin Cc: linux-mips@vger.kernel.org commit 5045d06b37361c6fbe05357c765f6b9a6fcaea87 Author: Paul Burton Date: Tue Oct 1 23:04:32 2019 +0000 MIPS: r4k-bugs64: Drop CONFIG_CPU_MIPSR6 checks The r4k-bugs64 code will no longer be built for MIPSr6 kernel configurations, so there's no need to perform checks for MIPSr6 within the code. Drop those redundant checks. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org commit 071d2f0b5419d3cf80cc8ba73ec8fe2cedc4cc0c Author: Paul Burton Date: Tue Oct 1 23:04:32 2019 +0000 MIPS: r4k-bugs64: Limit R4k bug checks to affected systems Only build the checks for R4k errata workarounds if we expect that the kernel might actually run on a system with an R4k CPU - ie. CONFIG_SYS_HAS_CPU_R4X00=y & we're targeting a pre-MIPSr1 ISA revision. Rename cpu-bugs64.c to r4k-bugs64.c to indicate the fact that the code is specific to R4k CPUs. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org commit 4bf841ebf17aaa0f7712623896c699b44fa92f44 Author: Thomas Bogendoerfer Date: Thu Oct 3 14:27:24 2019 +0200 MIPS: SGI-IP27: get rid of compact node ids Node ids don't need to be contiguous in Linux, so the concept to use compact node ids to make them contiguous isn't needed at all. This patchset therefore removes it. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 46a73e9e6ccc77619838885439873af41a5ad1c1 Author: Thomas Bogendoerfer Date: Thu Oct 3 14:27:23 2019 +0200 MIPS: SGI-IP27: remove not used stuff inherited from IRIX Most of the SN/SN0 header files are inherited from IRIX header files, but not all of that stuff is useful for Linux. Remove not used parts. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 8fbd534b7248f5d0311d9dbfd7b4749317e4395a Author: zhengbin Date: Sat Oct 5 12:33:49 2019 +0800 drm/msm/dpu: Remove set but not used variables 'mode', 'dpu_kms', 'priv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function dpu_encoder_virt_disable: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1199:27: warning: variable mode set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function _dpu_encoder_init_debugfs: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1963:18: warning: variable dpu_kms set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function dpu_encoder_frame_done_timeout: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:2183:26: warning: variable priv set but not used [-Wunused-but-set-variable] They are not used since commit 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Rob Clark commit 60b42f2ae69f5491eace2f8a3a6040be2deea34f Author: zhengbin Date: Sat Oct 5 12:33:48 2019 +0800 drm/msm/dpu: Remove set but not used variables 'cmd_enc', 'priv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function dpu_encoder_phys_cmd_ctl_start_irq: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:136:31: warning: variable cmd_enc set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function dpu_encoder_phys_cmd_irq_control: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:328:31: warning: variable cmd_enc set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function dpu_encoder_phys_cmd_tearcheck_config: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:367:26: warning: variable priv set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function dpu_encoder_phys_cmd_wait_for_tx_complete: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:662:31: warning: variable cmd_enc set but not used [-Wunused-but-set-variable] They are not used since commit 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Rob Clark commit f09662c1a6b44639fb25b8250249229dfaf207f7 Author: zhengbin Date: Sat Oct 5 12:33:47 2019 +0800 drm/msm/dpu: Remove set but not used variables 'dpu_cstate', 'priv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c: In function dpu_core_perf_crtc_release_bw: drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:248:25: warning: variable dpu_cstate set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c: In function dpu_core_perf_crtc_update: drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:337:26: warning: variable priv set but not used [-Wunused-but-set-variable] They are not used since commit 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Rob Clark commit d4f1bec36c5db7ead9d098f23c0d22c52969d0fb Author: zhengbin Date: Sat Oct 5 12:33:46 2019 +0800 drm/msm/dpu: Remove set but not used variable 'priv' in dpu_core_irq.c Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c: In function dpu_core_irq_preinstall: drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c:354:26: warning: variable priv set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c: In function dpu_core_irq_uninstall: drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c:390:26: warning: variable priv set but not used [-Wunused-but-set-variable] It is not used since commit 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Rob Clark commit 3fa19069cd11ce9d86268164d8055fdd3ce1239b Author: zhengbin Date: Sat Oct 5 12:33:45 2019 +0800 drm/msm/dpu: Remove set but not used variable 'priv' in dpu_encoder_phys_vid.c Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c: In function dpu_encoder_phys_vid_disable: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c:566:26: warning: variable priv set but not used [-Wunused-but-set-variable] It is not used since commit 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Rob Clark commit a663a2b1350b68b62fc3162297bea18fb3ea2ab8 Author: zhengbin Date: Sat Oct 5 12:33:44 2019 +0800 drm/msm/dpu: Remove set but not used variable 'priv' in dpu_kms.c Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function _dpu_danger_signal_status: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:80:26: warning: variable priv set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function dpu_kms_prepare_commit: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:271:26: warning: variable priv set but not used [-Wunused-but-set-variable] It is not used since commit 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Rob Clark commit 70082a52f96a45650dfc3d8cdcd2c42bdac9f6f0 Author: Arnd Bergmann Date: Wed Sep 18 21:57:07 2019 +0200 drm/msm: include linux/sched/task.h Without this header file, compile-testing may run into a missing declaration: drivers/gpu/drm/msm/msm_gpu.c:444:4: error: implicit declaration of function 'put_task_struct' [-Werror,-Wimplicit-function-declaration] Fixes: 482f96324a4e ("drm/msm: Fix task dump in gpu recovery") Signed-off-by: Arnd Bergmann Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit b2181be1cfb81da3fad0f8b6994b2e714ae66876 Author: Brian Masney Date: Fri Aug 23 05:16:37 2019 -0700 ARM: qcom_defconfig: add ocmem support Add ocmem driver that's needed for some a3xx and a4xx based systems. Signed-off-by: Brian Masney Signed-off-by: Bjorn Andersson commit 5dce8d78207e929ff8f0e9dbe7180b23fed3651e Author: Krzysztof Wilczynski Date: Wed Sep 4 23:15:51 2019 +0200 drm/msm/dsi: Move static keyword to the front of declarations Move the static keyword to the front of declarations of msm_dsi_v2_host_ops, msm_dsi_6g_host_ops and msm_dsi_6g_v2_host_ops, and resolve the following compiler warnings that can be seen when building with warnings enabled (W=1): drivers/gpu/drm/msm/dsi/dsi_cfg.c:150:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] drivers/gpu/drm/msm/dsi/dsi_cfg.c:161:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] drivers/gpu/drm/msm/dsi/dsi_cfg.c:172:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: Krzysztof Wilczynski Reviewed-by: Jeffrey Hugo Signed-off-by: Rob Clark commit 53bf7f7a437a4120ec632183a21516609e18f4a5 Author: Drew Davenport Date: Mon Sep 16 14:11:54 2019 -0600 drm/msm: Remove unused function arguments The arguments related to IOMMU port name have been unused since commit 944fc36c31ed ("drm/msm: use upstream iommu") and can be removed. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit fa8278b89dfb2d7df1cb7898c5842d90ce52c7bd Author: Drew Davenport Date: Fri Sep 6 13:23:44 2019 -0600 drm/msm/dpu: Remove unnecessary NULL checks dpu_kms.dev will never be NULL, so don't bother checking. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit 966301400402103ce6fc16cbb70a8545d3dceb76 Author: Drew Davenport Date: Fri Sep 6 13:23:43 2019 -0600 drm/msm/dpu: Remove unnecessary NULL checks msm_drm_private.kms will only be NULL in the dummy headless case, so there is no need to check it in the dpu display driver. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit c3739878a9e511d272358d5821d073795ead7c61 Author: Drew Davenport Date: Fri Sep 6 13:23:42 2019 -0600 drm/msm/dpu: Remove unnecessary NULL checks drm_crtc.dev will never be NULL, so no need to check it. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit 422ed75581176ca8be2c87ea1c3720608dc46212 Author: Drew Davenport Date: Fri Sep 6 13:23:41 2019 -0600 drm/msm/dpu: Remove unnecessary NULL checks drm_device.dev_private is set to a non-NULL msm_drm_private struct in msm_drm_init. Successful initialization of msm means that dev_private is non-NULL so there is no need to check it everywhere. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit c3b80b28c1744d233cf2763f87a7b321af7338d0 Author: Drew Davenport Date: Fri Sep 6 13:23:40 2019 -0600 drm/msm/dpu: Remove unused macro Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit e5c8d1b2c1831bd69619eb52cb3bbd0eb4f92956 Author: Drew Davenport Date: Fri Sep 6 13:23:39 2019 -0600 drm/msm/dpu: Remove unused variables Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit 444e2ff34df8f631cd83ae73bb56ef13cfb84b34 Author: Arnaldo Carvalho de Melo Date: Thu Sep 26 15:26:39 2019 -0300 tools arch x86: Grab a copy of the file containing the MSR numbers We'll use it to generate a table and then convert the msr:{read,write}_msr 'msr' option in things like perf trace, script, etc. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-y1f4s0y1s43d4drh7pd2huzn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f11b2803bb88655d90b88c787710b53100913bff Author: Arnaldo Carvalho de Melo Date: Fri Oct 4 15:28:13 2019 -0300 perf trace: Allow choosing how to augment the tracepoint arguments So far we used the libtraceevent printing routines when showing tracepoint arguments, but since 'perf trace' has a lot of beautifiers for syscall arguments, and since some of those can be used to augment tracepoint arguments, add a routine to make use of those beautifiers and allow the user to choose which one to use. The default now is to use the same beautifiers used for the strace-like sys_enter+sys_exit lines, but the user can choose the libtraceevent ones by either using the: perf trace --libtraceevent_print command line option, or by setting: # cat ~/.perfconfig [trace] tracepoint_beautifiers = libtraceevent For instance, here are some examples: # perf trace -e sched:*switch,*sleep,sched:*wakeup,exit*,sched:*exit sleep 1 0.000 sched:sched_wakeup(comm: "perf", pid: 5273 (perf), prio: 120, success: 1, target_cpu: 6) 0.621 nanosleep(rqtp: 0x7ffdd06d1140, rmtp: NULL) ... 0.628 sched:sched_switch(prev_comm: "sleep", prev_pid: 5273 (sleep), prev_prio: 120, prev_state: 1, next_comm: "swapper/6", next_pid: 0, next_prio: 120) 1000.879 sched:sched_wakeup(comm: "sleep", pid: 5273 (sleep), prio: 120, success: 1, target_cpu: 6) 0.621 ... [continued]: nanosleep()) = 0 1001.026 exit_group(error_code: 0) = ? 1001.216 sched:sched_process_exit(comm: "sleep", pid: 5273 (sleep), prio: 120) # And then using libtraceevent, as before: # perf trace --libtraceevent_print -e sched:*switch,*sleep,sched:*wakeup,exit*,sched:*exit sleep 1 0.000 sched:sched_wakeup(comm=perf pid=5288 prio=120 target_cpu=001) 0.739 nanosleep(rqtp: 0x7ffeba6c2f40, rmtp: NULL) ... 0.747 sched:sched_switch(prev_comm=sleep prev_pid=5288 prev_prio=120 prev_state=S ==> next_comm=swapper/1 next_pid=0 next_prio=120) 1000.902 sched:sched_wakeup(comm=sleep pid=5288 prio=120 target_cpu=001) 0.739 ... [continued]: nanosleep()) = 0 1001.012 exit_group(error_code: 0) = ? # The new default allocates an array of 'struct syscall_arg_fmt' for the tracepoint arguments and, just like with syscall arguments, tries to find suitable syscall_arg__scnprintf_NAME() routines to augment those tracepoint arguments based on their type (as in the tracefs "format" file), or even in their name + type, for instance arguntents with names ending in "fd" with type "int" get the fd scnprintf beautifier attached, etc. Soon this will take advantage of the kernel BTF information to augment enumerations based on the tracefs "format" type info. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-o8qdluotkcb3b1x2gjqrejcl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 311baaf93c4b9e6a339722006d1a7c33e4283c0c Author: Arnaldo Carvalho de Melo Date: Fri Oct 4 15:01:30 2019 -0300 perf trace: Enclose all events argument lists with () So that they look a bit like normal strace-like syscall enter+exit lines. They will look even more when we switch from using libtraceevent's tep_print_event() routine in favour of using all the perf beautifiers used by the strace-like syscall enter+exit lines. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-y4fcej6v6u1m644nbxd2r4pg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9597945d7fb42460e9f2559d1273302ebde85bbf Author: Arnaldo Carvalho de Melo Date: Fri Oct 4 14:56:40 2019 -0300 perf trace: Add array of chars scnprintf beautifier Needed for sched's traceoints prev/next comm, where, unlike with syscalls, we are not dealing with an integer or pointer, but an array straight out from the ring buffer. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-rlll7tmcqe1g4odtaifil5re@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 888ca854e275fcfbb13206d32bb01c0576fc5546 Author: Arnaldo Carvalho de Melo Date: Fri Oct 4 14:52:30 2019 -0300 perf trace: Add the syscall_arg_fmt pointer to syscall_arg So that the scnprintf beautifiers can access it, as will be the case with the char array one in the following csets, that needs to know the number of elements in an array. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-01qmjqv6cb1nj1qy4khdexce@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3e0c9b2cfaed25599a0a5cbd40e37871bdb10523 Author: Arnaldo Carvalho de Melo Date: Fri Oct 4 11:30:41 2019 -0300 perf trace: Move some scnprintf methods from syscall to syscall_arg_fmt Since all they operate on is on a syscall_arg_fmt instance, so move them to allow use it from the upcoming tracepoint fprintf routine. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ynttrs1l75f0x9tk67spd7jd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 947b843cf52a53f6b35aa1406e11884291f41597 Author: Arnaldo Carvalho de Melo Date: Thu Oct 3 16:18:22 2019 -0300 perf trace: Allocate an array of beautifiers for tracepoint args This will work similar to the syscall args, we'll allocate an array of 'struct syscall_arg_fmt' for the tracepoint args and then init them using the same algorithm used for the defaults for syscall args, i.e. using its types and sometimes names as hints to find the right scnprintf routine to beautify them from numbers into strings. Next step is to stop using libtracevent to printf tracepoints, as we'll have more beautifiers than int provides, modulo perhaps some plugins. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-dcl135relxvf6ljisjg13aqg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8d1d4ff5e239d9ef385444bc0d855127d7b32754 Author: Arnaldo Carvalho de Melo Date: Thu Oct 3 15:57:42 2019 -0300 perf trace: Factor out the initialization of syscal_arg_fmt->scnprintf We set the default scnprint routines for the syscall args based on its type or on heuristics based on its names, now we'll use this for tracepoints as well, so move it out of syscall__set_arg_fmts() and into a routine that receive just an array of syscall_arg_fmt entries + the tracepoint format fields list. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-xs3x0zzyes06c7scdsjn01ty@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3714437d3fcc7956cabcb0077f2a506b61160a56 Author: Andi Kleen Date: Wed Oct 2 09:46:42 2019 -0700 perf script: Allow --time with --reltime The original --reltime patch forbid --time with --reltime. But it turns out --time doesn't really care about --reltime, because the relative time is only used at final output, while the time filtering always works earlier on absolute time. So just remove the check and allow combining the two options. Fixes: 90b10f47c0ee ("perf script: Support relative time") Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20191002164642.1719-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit fce9501aec6bdda45ef3a5e365a5e0de7de7fe2d Author: Björn Töpel Date: Tue Oct 1 13:33:07 2019 +0200 samples/bpf: fix build by setting HAVE_ATTR_TEST to zero To remove that test_attr__{enabled/open} are used by perf-sys.h, we set HAVE_ATTR_TEST to zero. Signed-off-by: Björn Töpel Tested-by: KP Singh Acked-by: Song Liu Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Namhyung Kim Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191001113307.27796-3-bjorn.topel@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 06f84d1989b7e58d56fa2e448664585749d41221 Author: Björn Töpel Date: Tue Oct 1 13:33:06 2019 +0200 perf tools: Make usage of test_attr__* optional for perf-sys.h For users of perf-sys.h outside perf, e.g. samples/bpf/bpf_load.c, it's convenient not to depend on test_attr__*. After commit 91854f9a077e ("perf tools: Move everything related to sys_perf_event_open() to perf-sys.h"), all users of perf-sys.h will depend on test_attr__enabled and test_attr__open. This commit enables a user to define HAVE_ATTR_TEST to zero in order to omit the test dependency. Fixes: 91854f9a077e ("perf tools: Move everything related to sys_perf_event_open() to perf-sys.h") Signed-off-by: Björn Töpel Acked-by: Song Liu Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Namhyung Kim Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191001113307.27796-2-bjorn.topel@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit b3700f21c2ede55aeab3aba728bce434051ec631 Author: Adrian Hunter Date: Wed Aug 21 11:32:16 2019 +0300 perf scripts python: exported-sql-viewer.py: Add Time chart by CPU Add a time chart based on context switch information. Context switch information was added to the database export fairly recently, so the chart menu option will only appear if context switch information is in the database. Refer to the Exported SQL Viewer Help option for more information about the chart. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20190821083216.1340-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit e69d5df75d74da14cbc8c96bbc1d9e86cc91ad0b Author: Adrian Hunter Date: Wed Aug 21 11:32:15 2019 +0300 perf scripts python: exported-sql-viewer.py: Add ability for Call tree to open at a specified task and time Add ability for Call tree to open at a specified task and time. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20190821083216.1340-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit da4264f5cf8a6b798bf5494e08a5dae85a61c4c3 Author: Adrian Hunter Date: Wed Aug 21 11:32:14 2019 +0300 perf scripts python: exported-sql-viewer.py: Tidy up Call tree call_time Record call_time on tree nodes and re-name the misnamed "count" parameter. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20190821083216.1340-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9a9dae36556e8f7689f68f05d169ac6c132c5f15 Author: Adrian Hunter Date: Wed Aug 21 11:32:13 2019 +0300 perf scripts python: exported-sql-viewer.py: Add global time range calculations Add calculations to determine a time range that encompasses all data. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20190821083216.1340-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 42c303ff9a25c4b95a75f8f10d08661183497d41 Author: Adrian Hunter Date: Wed Aug 21 11:32:12 2019 +0300 perf scripts python: exported-sql-viewer.py: Add HBoxLayout and VBoxLayout Add layout classes HBoxLayout and VBoxLayout. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20190821083216.1340-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 181ea40a24af9a60c2ee75d4f271980f6453f585 Author: Adrian Hunter Date: Wed Aug 21 11:32:11 2019 +0300 perf scripts python: exported-sql-viewer.py: Add LookupModel() Add LookupModel() to find a model in the model cache without creating it. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20190821083216.1340-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8bd436b006d4493964c310606f2eb8e56680126c Author: Arnaldo Carvalho de Melo Date: Wed Oct 2 12:54:07 2019 -0300 perf trace augmented_syscalls: Do not show syscalls when none was asked for When not using augmented syscalls, i.e. not passing thru the command line a eBPF source or object file event that provides the __augmented_syscalls__ BPF_MAP_TYPE_PERF_EVENT_ARRAY, etc, as with: perf trace -e tools/perf/examples/bpf/augmented_raw_syscalls.c or passing that augmented eBPF source/object via the trace.add_events in .perfconfig file, we were assuming that syscalls were asked for, differing from when not using augmented syscalls at all. This is confusing when using .perfconfig to hide the fact we're using the augmenter, i.e. using: # perf trace -e sched:* sleep 1 Will show both the scheduler tracepoints and the syscalls, where what we want is to show just the scheduler tracepoints. To see the scheduler tracepoints and some specific syscall strace-like formatting, one has to use: # perf trace -e sched:*,nanosleep sleep 1 Or, if wanting all the syscalls: # perf trace -e sched:* --syscalls sleep 1 This way 'perf trace' can be used to trace just a set of tracepoints while allowing for mixing with strace-like when desired, by simply adding to the mix the name of the syscalls to show in addition to the tracepoints. Fix it so that the behaviour using the eBPF based syscall augmenter is the same as when not using one. Testing: Before this patch, with this ~/.perfconfig: # egrep -B1 ^[[:space:]]+add_events ~/.perfconfig [trace] add_events = /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o # That points to this pre-compiled eBPF syscall augmenter: # file /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o: ELF 64-bit LSB relocatable, eBPF, version 1 (SYSV), with debug_info, not stripped And when asking for _only_ sched:sched_switch and sched:sched_wakeup we were unconditionally getting all the syscalls formatted strace-like: # perf trace -e sched:*switch,sched:*wakeup sleep 1 |& tail 0.633 fstat(3, 0x7fe11d030ac0) = 0 0.635 mmap(NULL, 217750512, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe10fec5000 0.643 close(3) = 0 0.668 nanosleep(0x7fff649a3a90, NULL) ... 0.672 sched:sched_switch:prev_comm=sleep prev_pid=4417 prev_prio=120 prev_state=S ==> next_comm=swapper/6 next_pid=0 next_prio=120 1000.822 sched:sched_wakeup:comm=sleep pid=4417 prio=120 target_cpu=006 0.668 ... [continued]: nanosleep()) = 0 1000.923 close(1) = 0 1000.941 close(2) = 0 1000.974 exit_group(0) = ? # After the patch: # perf trace -e sched:*switch,sched:*wakeup sleep 1 0.000 sched:sched_wakeup:comm=perf pid=5529 prio=120 target_cpu=005 1.186 sched:sched_switch:prev_comm=sleep prev_pid=5529 prev_prio=120 prev_state=S ==> next_comm=swapper/5 next_pid=0 next_prio=120 1001.573 sched:sched_wakeup:comm=sleep pid=5529 prio=120 target_cpu=005 # If we add the "open*" syscalls to the mix then the eBPF augmented _will_ be used and these syscalls will be traced together with the specified sched tracepoints: # cd /sys/kernel/debug/tracing/events/syscalls/ # ls -1d sys_enter_open* sys_enter_open sys_enter_openat sys_enter_open_by_handle_at sys_enter_open_tree # # perf trace -e open*,sched:*switch,sched:*wakeup sleep 1 0.000 sched:sched_wakeup:comm=perf pid=5580 prio=120 target_cpu=005 0.590 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 0.616 openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 0.846 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 0.891 sched:sched_switch:prev_comm=sleep prev_pid=5580 prev_prio=120 prev_state=S ==> next_comm=swapper/5 next_pid=0 next_prio=120 1001.005 sched:sched_wakeup:comm=sleep pid=5580 prio=120 target_cpu=005 # And as we can see, the pathnames were collected via the eBPF augmenters. If we don't specify anything it'll trace all syscalls: # perf trace sleep 1 |& tail 0.299 brk(0x5597543a3000) = 0x5597543a3000 0.302 brk(NULL) = 0x5597543a3000 0.307 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 0.313 fstat(3, 0x7feece50cac0) = 0 0.315 mmap(NULL, 217750512, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7feec13a1000 0.323 close(3) = 0 0.354 nanosleep(0x7ffe338856e0, NULL) = 0 1000.641 close(1) = 0 1000.655 close(2) = 0 1000.673 exit_group(0) = ? # Ditto if we don't use .perfconfig's trace.add_events but instead pass just the augmenter as a command line event: # vim ~/.perfconfig # egrep -B1 ^[[:space:]]+add_events ~/.perfconfig # perf trace -e /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o sleep 1 |& tail 0.294 brk(0x55ae08ec3000) = 0x55ae08ec3000 0.297 brk(NULL) = 0x55ae08ec3000 0.302 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 0.309 fstat(3, 0x7f726488fac0) = 0 0.311 mmap(NULL, 217750512, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7257724000 0.319 close(3) = 0 0.347 nanosleep(0x7ffe23643a70, NULL) = 0 1000.560 close(1) = 0 1000.575 close(2) = 0 1000.593 exit_group(0) = ? # As well as that + some syscall names for strace-like formatting: # perf trace -e socket,connect,/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o ssh localhost 0.000 socket(PF_LOCAL, SOCK_STREAM|CLOEXEC|NONBLOCK, 0) = 3 0.021 connect(3, { .family: PF_LOCAL, path: /var/run/nscd/socket }, 110) = -1 ENOENT (No such file or directory) 0.034 socket(PF_LOCAL, SOCK_STREAM|CLOEXEC|NONBLOCK, 0) = 3 0.041 connect(3, { .family: PF_LOCAL, path: /var/run/nscd/socket }, 110) = -1 ENOENT (No such file or directory) 0.163 socket(PF_LOCAL, SOCK_STREAM, 0) = 4 0.185 connect(4, { .family: PF_LOCAL, path: /var/lib/sss/pipes/nss }, 110) = 0 0.670 socket(PF_LOCAL, SOCK_STREAM|CLOEXEC|NONBLOCK, 0) = 7 0.684 connect(7, { .family: PF_LOCAL, path: /var/run/nscd/socket }, 110) = -1 ENOENT (No such file or directory) 0.694 socket(PF_LOCAL, SOCK_STREAM|CLOEXEC|NONBLOCK, 0) = 7 0.701 connect(7, { .family: PF_LOCAL, path: /var/run/nscd/socket }, 110) = -1 ENOENT (No such file or directory) 0.994 socket(PF_LOCAL, SOCK_STREAM|CLOEXEC|NONBLOCK, 0) = 5 1.006 connect(5, { .family: PF_LOCAL, path: /var/run/nscd/socket }, 110) = -1 ENOENT (No such file or directory) 1.014 socket(PF_LOCAL, SOCK_STREAM|CLOEXEC|NONBLOCK, 0) = 5 1.022 connect(5, { .family: PF_LOCAL, path: /var/run/nscd/socket }, 110) = -1 ENOENT (No such file or directory) 1.068 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 5 1.087 connect(5, { .family: PF_INET, port: 22, addr: 127.0.0.1 }, 16) = 0 24.299 socket(PF_LOCAL, SOCK_STREAM, 0) = 6 24.337 connect(6, { .family: PF_LOCAL, path: /var/run/.heim_org.h5l.kcm-socket }, 110) = 0 28.441 socket(PF_LOCAL, SOCK_STREAM, 0) = 6 28.516 connect(6, { .family: PF_LOCAL, path: /var/run/.heim_org.h5l.kcm-socket }, 110) = 0 root@localhost's password:^C # Everything works without augmenters: # egrep -B1 ^[[:space:]]+add_events ~/.perfconfig # perf trace sleep 1 |& tail 0.261 brk(0x5635068ac000) = 0x5635068ac000 0.264 brk(NULL) = 0x5635068ac000 0.268 openat(AT_FDCWD, 0xdce642a0, O_RDONLY|O_CLOEXEC) = 3 0.275 fstat(3, 0x7f3fdce97ac0) = 0 0.277 mmap(NULL, 217750512, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3fcfd2c000 0.284 close(3) = 0 0.310 nanosleep(0x7ffdaea6ecd0, NULL) = 0 1000.552 close(1) = 0 1000.565 close(2) = 0 1000.580 exit_group(0) = ? # # perf trace -e connect ssh localhost 0.000 connect(3, 0x58266930, 110) = -1 ENOENT (No such file or directory) 0.022 connect(3, 0x58266af0, 110) = -1 ENOENT (No such file or directory) 0.150 connect(4, 0x58266b00, 110) = 0 0.490 connect(7, 0x58264150, 110) = -1 ENOENT (No such file or directory) 0.505 connect(7, 0x58264300, 110) = -1 ENOENT (No such file or directory) 0.832 connect(5, 0x58266220, 110) = -1 ENOENT (No such file or directory) 0.847 connect(5, 0x582663e0, 110) = -1 ENOENT (No such file or directory) 0.899 connect(5, 0x95ba0630, 16) = 0 25.619 connect(6, 0x58266360, 110) = 0 40.564 connect(6, 0x58266330, 110) = 0 root@localhost's password: ^C # Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-624f6jxic04031tnt40va4dd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7e035929f3fec70d411fb660c434f4a7f8ca386d Author: Arnaldo Carvalho de Melo Date: Tue Oct 1 15:44:44 2019 -0300 perf trace: Postpone parsing .perfconfig trace.add_events to after --verbose is processed When we add events via the '[trace]' section in perfconfig the command line options are not yet processed, so when something goes wrong with parsing those events and using --verbose is advised, we end up not getting any more verbosity by doing so. So just copy the trace.add_events string for later processing, after we processed --verbose and the other command line options. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-d6wbnz85ftqljdll6ynjyjd8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bcddbfc5c8c952175e9a5f1a4186685fa0338a14 Author: Arnaldo Carvalho de Melo Date: Tue Oct 1 15:27:55 2019 -0300 perf trace: Generalize the syscall_fmt find routines To allow them to be used with other stuff, such as tracepoints. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-od3gzg77ppqgnnrxqv40fvgx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9b2036cd329924082acfa5dec58deec12fa1f5e8 Author: Arnaldo Carvalho de Melo Date: Tue Oct 1 15:16:33 2019 -0300 perf trace: Separate 'struct syscall_fmt' definition from syscall_fmts variable As this has all the things needed to format tracepoints events, not just syscalls, that, after all, are just tracepoints with a set in stone ABI, i.e. order and number of parameters. For tracepoints we'll create a static struct syscall_fmt tracepoint_fmts[] array and will fill the ->arg[] entries with the beautifier for each positional argument and record the name, then, when we need it, we'll just check that the position has the same name, maybe even type, so that we can do some check that the tracepoint hasn't changed, if it has, we can even reorder things. Keep calling it syscall_fmt but use it as well for tracepoints, do it this way to minimize changes and reuse what is in place for syscalls, we'll see. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-2x1jgiev13zt4njaanlnne0d@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 206d635aa594a5246cd181b3be39d1e3b2126f68 Author: Arnaldo Carvalho de Melo Date: Tue Oct 1 11:31:59 2019 -0300 perf trace: Make evlist__set_evsel_handler() affect just entries without a handler Renaming it to evlist__set_default_evsel_handler(), to better reflect what we want to do, which is to set a default handler for events we still haven't set a custom handler, like the ones for "msr:write_msr", etc that are coming soon. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-e1bit7upnpmtsayh8039kfuw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c0e53476ab5087353547cbcd37f001d98941326c Author: Arnaldo Carvalho de Melo Date: Tue Oct 1 11:14:26 2019 -0300 perf evlist: Adopt __set_tracepoint_handlers method from perf_session It all operates on the evsels in the session's evlist, so move it to the evlist layer to make it useful to tools not using perf_session, just evlists, like 'perf trace' in live mode. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-9oc53gnfi53vg82fvolkm85g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 608127f73779bfc199158b61efdbdb690720e542 Author: Arnaldo Carvalho de Melo Date: Mon Sep 30 11:53:00 2019 -0300 perf top: Initialize perf_env->cpuid, needed by the per arch annotation init routine Just read it so that later on the per arch init routine can use it, e.g. x86__annotate_init(). When using a perf.data file this is obtained from a header that was put there by 'perf record', and then it may be for another machine, another arch. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-4t4n3o8l8s0tc2b1pq53hyr4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f1cedfb82858c8a7ec21e45d0ce7b6e2ce9edea0 Author: Arnaldo Carvalho de Melo Date: Mon Sep 30 11:50:15 2019 -0300 perf env: Add routine to read the env->cpuid from the running machine In 'perf top' we use that cpuid when initializing the per arch annotation init routines (e.g. x86__annotate_init()) and in that case (live mode, 'perf top') we need to obtain it from the running machine, not from a perf.data file header. Provide a means to do that. Will be used by 'perf top' in a followup patch. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-h2wb3sx7u7znx6lqfezrh7ca@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bfcb7e1555ecc157cea23e35057002e3055e90a6 Author: Brian Masney Date: Sun Sep 1 17:30:37 2019 -0400 soc: qcom: ocmem: add missing includes The kbuild bot reported the following compiler errors when compiling on MIPS with CONFIG_QCOM_OCMEM disabled: In file included from :0:0: >> include/soc/qcom/ocmem.h:43:49: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration static inline struct ocmem *of_get_ocmem(struct device *dev) ^~~~~~ include/soc/qcom/ocmem.h: In function 'of_get_ocmem': >> include/soc/qcom/ocmem.h:45:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration] return ERR_PTR(-ENODEV); ^~~~~~~ >> include/soc/qcom/ocmem.h:45:18: error: 'ENODEV' undeclared (first use in this function) return ERR_PTR(-ENODEV); Add the proper includes to fix the compiler errors. Signed-off-by: Brian Masney Reported-by: kbuild test robot Tested-by: Gabriel Francisco Signed-off-by: Rob Clark commit 26c0b26dcd005d9d6de9246737177e7af821859a Author: Brian Masney Date: Fri Aug 23 05:16:36 2019 -0700 drm/msm/gpu: add ocmem init/cleanup functions The files a3xx_gpu.c and a4xx_gpu.c have ifdefs for the OCMEM support that was missing upstream. Add two new functions (adreno_gpu_ocmem_init and adreno_gpu_ocmem_cleanup) that removes some duplicated code. Signed-off-by: Brian Masney Reviewed-by: Jordan Crouse Tested-by: Gabriel Francisco Signed-off-by: Rob Clark commit 88c1e9404f1deee02e52d13aae3d9ee2cabd66f5 Author: Brian Masney Date: Fri Aug 23 05:16:35 2019 -0700 soc: qcom: add OCMEM driver The OCMEM driver handles allocation and configuration of the On Chip MEMory that is present on some Snapdragon SoCs. Devices which have OCMEM do not have GMEM inside the GPU core, so the GPU must instead use OCMEM to be functional. Since the GPU is currently the only OCMEM user with an upstream driver, this is just a minimal implementation sufficient for statically allocating to the GPU it's chunk of OCMEM. This driver currently does not read the gmu-sram node that is described in the device tree bindings. The starting memory address of the GPU's reserved memory region is hardcoded to zero to match what the hardware expects. The driver can be updated to read the reserved memory regions from device tree once other users of OCMEM are added upstream. Signed-off-by: Brian Masney Co-developed-by: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Tested-by: Gabriel Francisco Signed-off-by: Rob Clark commit 0434a4061471a9afc2b2061add496e58ba4bb92d Author: Rob Clark Date: Fri Aug 23 05:16:34 2019 -0700 firmware: qcom: scm: add support to restore secure config to qcm_scm-32 Add support to restore the secure configuration for qcm_scm-32.c. This is needed by the On Chip MEMory (OCMEM) that is present on some Snapdragon devices. Signed-off-by: Rob Clark [masneyb@onstation.org: ported to latest kernel; set ctx_bank_num to spare parameter.] Signed-off-by: Brian Masney Reviewed-by: Bjorn Andersson Tested-by: Gabriel Francisco Signed-off-by: Rob Clark commit b0a1614fb1f58520938968ebe1f4f11bcf34839e Author: Rob Clark Date: Fri Aug 23 05:16:33 2019 -0700 firmware: qcom: scm: add OCMEM lock/unlock interface Add support for the OCMEM lock/unlock interface that is needed by the On Chip MEMory (OCMEM) that is present on some Snapdragon devices. Signed-off-by: Rob Clark [masneyb@onstation.org: ported to latest kernel; minor reformatting.] Signed-off-by: Brian Masney Reviewed-by: Bjorn Andersson Tested-by: Gabriel Francisco Signed-off-by: Rob Clark commit f704985b1e7ea0f9fde1cfb1354d57593ba62fcb Author: Jonathan Corbet Date: Tue Oct 1 11:42:07 2019 -0600 docs/driver-api: Catch up with dma_buf file-name changes drivers/dma_buf/reservation.c was renamed to dma-resv.c (and include/linux/reservation.h to dma-resv.h), but the documentation was not updated to match, leading to these build errors: Error: Cannot open file ./drivers/dma-buf/reservation.c Error: Cannot open file ./drivers/dma-buf/reservation.c Error: Cannot open file ./drivers/dma-buf/reservation.c Error: Cannot open file ./include/linux/reservation.h Error: Cannot open file ./include/linux/reservation.h Update the documentation and make the world happy again. Fixes: 52791eeec1d9 ("dma-buf: rename reservation_object to dma_resv') Signed-off-by: Jonathan Corbet commit ea83df73aaa3bded80e441d05ca2873c37f84e0a Author: Jonathan Corbet Date: Thu Oct 3 12:40:30 2019 -0600 genalloc: Fix a set of docs build warnings Commit 795ee30648c7 ("lib/genalloc: introduce chunk owners") made a number of changes to the genalloc API and implementation but did not update the documentation to match, leading to these docs build warnings: ./lib/genalloc.c:1: warning: 'gen_pool_add_virt' not found ./lib/genalloc.c:1: warning: 'gen_pool_alloc' not found ./lib/genalloc.c:1: warning: 'gen_pool_free' not found ./lib/genalloc.c:1: warning: 'gen_pool_alloc_algo' not found Fix these by updating the docs to match new function locations and names, and by completing the update of one kerneldoc comment. Fixes: 795ee30648c7 ("lib/genalloc: introduce chunk owners") Acked-by: Dan Williams Signed-off-by: Jonathan Corbet commit 198a72c8f9ee8eef24bacde6a3b3feb3b026ee04 Author: Brian Masney Date: Fri Aug 23 05:16:32 2019 -0700 dt-bindings: display: msm: gmu: add optional ocmem property Some A3xx and A4xx Adreno GPUs do not have GMEM inside the GPU core and must use the On Chip MEMory (OCMEM) in order to be functional. Add the optional ocmem property to the Adreno Graphics Management Unit bindings. Signed-off-by: Brian Masney Reviewed-by: Rob Herring Signed-off-by: Rob Clark commit 957fd69d396b2cc9b74c3b31a70fe7f266aa8c16 Author: Brian Masney Date: Fri Aug 23 05:16:31 2019 -0700 dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings Add device tree bindings for the On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs. Signed-off-by: Brian Masney Reviewed-by: Rob Herring Signed-off-by: Rob Clark commit cc84ac35d9fa3131179ed0805ddbd28bc5f262d6 Author: Jonathan Corbet Date: Tue Oct 1 08:47:47 2019 -0600 docs: Catch up with the new location of get_user_pages_fast() Commit 050a9adc6438 ("mm: consolidate the get_user_pages* implementations") moved get_user_pages_fast() from mm/util.c to mm/gup.c, but didn't update the documentation, leading to this build warning: ./mm/util.c:1: warning: 'get_user_pages_fast' not found Update the docs to match the new reality. Fixes: 050a9adc6438 ("mm: consolidate the get_user_pages* implementations") Reviewed-by: Christoph Hellwig Signed-off-by: Jonathan Corbet commit 81584a6a771b971e1497d33f98019e6c0192e621 Author: Jonathan Corbet Date: Fri Oct 4 10:47:46 2019 -0600 docs: remove :c:func: from refcount-vs-atomic.rst As of 5.3, the automarkup extension will do the right thing with function() notation, so we don't need to clutter the text with :c:func: invocations. So remove them. Looking at the generated output reveals that we lack kerneldoc coverage for much of this API, but that's a separate problem. Acked-by: Paul E. McKenney Signed-off-by: Jonathan Corbet commit a36a383dc30103cd2b0472ae635848cc1e25c4ab Merge: 7971f4be9f49 f437ade3296b Author: Rob Herring Date: Mon Oct 7 10:04:11 2019 -0500 Merge branch 'dt/linus' into dt/next commit 45919fbfe1c487c17ea1d198534339a5e8abeae3 Author: Bart Van Assche Date: Mon Sep 30 16:00:47 2019 -0700 null_blk: Enable modifying 'submit_queues' after an instance has been configured This patch makes it possible to test blk_mq_update_nr_hw_queues() from inside a VM. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit e29158b4fff7b582643dc020343d52773aaef0c1 Author: Bart Van Assche Date: Mon Sep 30 16:00:46 2019 -0700 null_blk: Improve nullb_device_##NAME##_store() readability Introduce a local variable to make the code easier to read. This patch does not change any functionality but makes the next patch in this series easier to read. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit a2e80f6f044526e00a788aa8e1ed72b1911f4534 Author: Pavel Begunkov Date: Mon Sep 30 21:55:34 2019 +0300 blk-mq: Embed counters into struct mq_inflight Store inflight counters immediately in struct mq_inflight. That's type-safer and removes extra indirection. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit bb4e6b149103c285aeeba43a8141ea3b7009c0fa Author: Pavel Begunkov Date: Mon Sep 30 21:55:33 2019 +0300 blk-mq: Reuse callback in blk_mq_in_flight*() Reuse a more generic callback in both blk_mq_in_flight() and blk_mq_in_flight_rw(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 27a46989a82c71028f2ba15a3f2c8f30451fda33 Author: Pavel Begunkov Date: Mon Sep 30 11:25:49 2019 +0300 blk-mq: Inline status checkers blk_mq_request_completed() and blk_mq_request_started() are short, inline it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7a18312c739aeace7c8ea448d39a0313d5ad5d5d Author: Bart Van Assche Date: Mon Sep 30 16:00:45 2019 -0700 block: Document all members of blk_mq_tag_set and bkl_mq_queue_map The meaning of several member variables of these two data structures is nontrivial. Hence document all member variables using the kernel-doc syntax. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit 73f1c77e65117e8f44074402e7cf5f4934505bfb Author: Bart Van Assche Date: Mon Sep 30 16:00:44 2019 -0700 block: Reduce sysfs_lock locking inside blk_cleanup_queue() Since blk_cleanup_queue() is called after blk_unregister_queue() and since that last function removes all sysfs attributes, serializing any code in blk_cleanup_queue() against sysfs callback methods nor against I/O scheduler changes is necessary. Hence remove the syfs_lock locking calls from the start of blk_cleanup_queue(). Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit bae85c156f619939ef6261f1bd4fabbe24361b50 Author: Bart Van Assche Date: Mon Sep 30 16:00:43 2019 -0700 block: Remove "dying" checks from sysfs callbacks Block drivers must call del_gendisk() before blk_cleanup_queue(). del_gendisk() calls kobject_del() and kobject_del() waits until any ongoing sysfs callback functions have finished. In other words, the sysfs callback functions won't be called for a queue in the dying state. Hence remove the "dying" checks from the sysfs callback functions. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit 9566256518de0520c964bdf23140eac324b136af Author: Bart Van Assche Date: Mon Sep 30 16:00:42 2019 -0700 block: Remove request_queue.nr_queues Commit 897bb0c7f1ea ("blk-mq: Use proper cpumask iterator"; v4.6) removed the last use of request_queue.nr_queues from outside blk_mq_init_allocate_queue(). Remove this member variable to make struct request_queue smaller. This patch does not change any functionality. Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit 1d200e9d6f635ae894993a7d0f1b9e0b6e522e3b Author: Bart Van Assche Date: Mon Sep 30 16:00:41 2019 -0700 block: Fix writeback throttling W=1 compiler warnings Fix the following compiler warnings: In file included from ./include/linux/bitmap.h:9, from ./include/linux/cpumask.h:12, from ./arch/x86/include/asm/cpumask.h:5, from ./arch/x86/include/asm/msr.h:11, from ./arch/x86/include/asm/processor.h:21, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, 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/mmzone.h:8, from ./include/linux/gfp.h:6, from ./include/linux/mm.h:10, from ./include/linux/bvec.h:13, from ./include/linux/blk_types.h:10, from block/blk-wbt.c:23: In function 'strncpy', inlined from 'perf_trace_wbt_stat' at ./include/trace/events/wbt.h:15:1: ./include/linux/string.h:260:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'strncpy', inlined from 'perf_trace_wbt_lat' at ./include/trace/events/wbt.h:58:1: ./include/linux/string.h:260:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'strncpy', inlined from 'perf_trace_wbt_step' at ./include/trace/events/wbt.h:87:1: ./include/linux/string.h:260:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'strncpy', inlined from 'perf_trace_wbt_timer' at ./include/trace/events/wbt.h:126:1: ./include/linux/string.h:260:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'strncpy', inlined from 'trace_event_raw_event_wbt_stat' at ./include/trace/events/wbt.h:15:1: ./include/linux/string.h:260:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'strncpy', inlined from 'trace_event_raw_event_wbt_lat' at ./include/trace/events/wbt.h:58:1: ./include/linux/string.h:260:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'strncpy', inlined from 'trace_event_raw_event_wbt_timer' at ./include/trace/events/wbt.h:126:1: ./include/linux/string.h:260:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'strncpy', inlined from 'trace_event_raw_event_wbt_step' at ./include/trace/events/wbt.h:87:1: ./include/linux/string.h:260:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] return __builtin_strncpy(p, q, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Fixes: e34cbd307477 ("blk-wbt: add general throttling mechanism"; v4.10). Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit 98e5440271172ca5c654784a31e46453464a3ca9 Author: Bart Van Assche Date: Mon Sep 30 16:00:40 2019 -0700 block: Fix three kernel-doc warnings Fix the following kernel-doc warnings: block/t10-pi.c:242: warning: Function parameter or member 'rq' not described in 't10_pi_type3_prepare' block/t10-pi.c:249: warning: Function parameter or member 'rq' not described in 't10_pi_type3_complete' block/t10-pi.c:249: warning: Function parameter or member 'nr_bytes' not described in 't10_pi_type3_complete' Cc: Max Gurtovoy Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Fixes: 54d4e6ab91eb ("block: centralize PI remapping logic to the block layer") Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe commit 1a99fcc035fb666f5d0909aef0a753284cb5d04c Author: Michal Koutný Date: Fri Oct 4 12:57:43 2019 +0200 selftests: cgroup: Run test_core under interfering stress test_core tests various cgroup creation/removal and task migration paths. Run the tests repeatedly with interfering noise (for lockdep checks). Currently, forking noise and subsystem enabled/disabled switching are the implemented noises. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 11318989c381d2b08b4e361a03df09d54434b26c Author: Michal Koutný Date: Fri Oct 4 12:57:42 2019 +0200 selftests: cgroup: Add task migration tests Add two new tests that verify that thread and threadgroup migrations work as expected. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 58c9f75b86f76895b9dd44f21dc1e37d0f477cc7 Author: Michal Koutný Date: Fri Oct 4 12:57:41 2019 +0200 selftests: cgroup: Simplify task self migration Simplify task migration by being oblivious about its PID during migration. This allows to easily migrate individual threads as well. This change brings no functional change and prepares grounds for thread granularity migrating tests. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 9a3284fad42f66bb43629c6716709ff791aaa457 Author: Michal Koutný Date: Fri Oct 4 12:57:40 2019 +0200 cgroup: Optimize single thread migration There are reports of users who use thread migrations between cgroups and they report performance drop after d59cfc09c32a ("sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem"). The effect is pronounced on machines with more CPUs. The migration is affected by forking noise happening in the background, after the mentioned commit a migrating thread must wait for all (forking) processes on the system, not only of its threadgroup. There are several places that need to synchronize with migration: a) do_exit, b) de_thread, c) copy_process, d) cgroup_update_dfl_csses, e) parallel migration (cgroup_{proc,thread}s_write). In the case of self-migrating thread, we relax the synchronization on cgroup_threadgroup_rwsem to avoid the cost of waiting. d) and e) are excluded with cgroup_mutex, c) does not matter in case of single thread migration and the executing thread cannot exec(2) or exit(2) while it is writing into cgroup.threads. In case of do_exit because of signal delivery, we either exit before the migration or finish the migration (of not yet PF_EXITING thread) and die afterwards. This patch handles only the case of self-migration by writing "0" into cgroup.threads. For simplicity, we always take cgroup_threadgroup_rwsem with numeric PIDs. This change improves migration dependent workload performance similar to per-signal_struct state. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit e7c7b1d85dc1646c874096dac3cf01537c1fd6f1 Author: Michal Koutný Date: Fri Oct 4 12:57:39 2019 +0200 cgroup: Update comments about task exit path We no longer take cgroup_mutex in cgroup_exit and the exiting tasks are not moved to init_css_set, reflect that in several comments to prevent confusion. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 940f138215281b8bec14b60ffea53154a89645ec Merge: 3ea7af9e2caa ef17bd7cc0c8 Author: David S. Miller Date: Mon Oct 7 10:08:09 2019 -0400 Merge branch 'dpaa2-eth-misc-cleanup' Ioana Ciornei says: ==================== dpaa2-eth: misc cleanup This patch set consists of some cleanup patches ranging from removing dead code to fixing a minor issue in ethtool stats. Also, unbounded while loops are removed from the driver by adding a maximum number of retries for DPIO portal commands. Changes in v2: - return -ETIMEDOUT where possible if the number of retries is hit ==================== Signed-off-by: David S. Miller commit ef17bd7cc0c8bb14ea532fb66a708b02c5a4297e Author: Ioana Radulescu Date: Mon Oct 7 14:38:28 2019 +0300 dpaa2-eth: Avoid unbounded while loops Throughout the driver there are several places where we wait indefinitely for DPIO portal commands to be executed, while the portal returns a busy response code. Even though in theory we are guaranteed the portals become available eventually, in practice the QBMan hardware module may become unresponsive in various corner cases. Make sure we can never get stuck in an infinite while loop by adding a retry counter for all portal commands. Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 4b177f065e7ec37399b18e18412a8c7b75f8f299 Author: Ioana Radulescu Date: Mon Oct 7 14:38:27 2019 +0300 dpaa2-eth: Fix minor bug in ethtool stats reporting Don't print error message for a successful return value. Fixes: d84c3a4ded96 ("dpaa2-eth: Add new DPNI statistics counters") Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 219684a58d7226cd66438f9a72c35679d4cabadd Author: Ioana Radulescu Date: Mon Oct 7 14:38:26 2019 +0300 dpaa2-eth: Cleanup dead code Remove one function call whose result was not used anywhere. Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 61e867fde21ea94f2166899f24f16cad85cc7b24 Author: Miaohe Lin Date: Sun Sep 29 16:06:58 2019 +0800 cgroup: short-circuit current_cgns_cgroup_from_root() on the default hierarchy Like commit 13d82fb77abb ("cgroup: short-circuit cset_cgroup_from_root() on the default hierarchy"), short-circuit current_cgns_cgroup_from_root() on the default hierarchy. Signed-off-by: Miaohe Lin Signed-off-by: Tejun Heo commit 3ea7af9e2caaec13a455974b04bfa357faf18baf Author: Colin Ian King Date: Mon Oct 7 12:09:35 2019 +0100 net: hns3: make array tick_array static, makes object smaller Don't populate the array tick_array on the stack but instead make it static. Makes the object code smaller by 29 bytes. Before: text data bss dec hex filename 19191 432 0 19623 4ca7 hisilicon/hns3/hns3pf/hclge_tm.o After: text data bss dec hex filename 19098 496 0 19594 4c8a hisilicon/hns3/hns3pf/hclge_tm.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 99d895729f5d438518c8223d7ce81615cb9a88e9 Author: Colin Ian King Date: Mon Oct 7 11:55:10 2019 +0100 net: hns: make arrays static, makes object smaller Don't populate the arrays port_map and sl_map on the stack but instead make them static. Makes the object code smaller by 64 bytes. Before: text data bss dec hex filename 49575 6872 64 56511 dcbf hisilicon/hns/hns_dsaf_main.o After: text data bss dec hex filename 49350 7032 64 56446 dc7e hisilicon/hns/hns_dsaf_main.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 578de2f361de06ad81ba6fe0cde92ebf6ec85df7 Merge: 8211fbfaf2fe bc76e5bb1229 Author: David S. Miller Date: Mon Oct 7 09:58:28 2019 -0400 Merge branch 'net-tls-minor-micro-optimizations' Jakub Kicinski says: ==================== net/tls: minor micro optimizations This set brings a number of minor code changes from my tree which don't have a noticeable impact on performance but seem reasonable nonetheless. First sk_msg_sg copy array is converted to a bitmap, zeroing that structure takes a lot of time, hence we should try to keep it small. Next two conditions are marked as unlikely, GCC seemed to had little trouble correctly reasoning about those. Patch 4 adds parameters to tls_device_decrypted() to avoid walking structures, as all callers already have the relevant pointers. Lastly two boolean members of TLS context structures are converted to a bitfield. ==================== Signed-off-by: David S. Miller commit bc76e5bb1229ede1f26317b813099b0e983e4009 Author: Jakub Kicinski Date: Sun Oct 6 21:09:32 2019 -0700 net/tls: store decrypted on a single bit Use a single bit instead of boolean to remember if packet was already decrypted. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5c5458ec9d631fbca29f53a944168265e18aa77a Author: Jakub Kicinski Date: Sun Oct 6 21:09:31 2019 -0700 net/tls: store async_capable on a single bit Store async_capable on a single bit instead of a full integer to save space. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4de30a8d58c90e18140342cdcb74903d2e4fbb62 Author: Jakub Kicinski Date: Sun Oct 6 21:09:30 2019 -0700 net/tls: pass context to tls_device_decrypted() Avoid unnecessary pointer chasing and calculations, callers already have most of the state tls_device_decrypted() needs. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 34ef1ed198cd647bb1cffff79f63814dfaae7c93 Author: Jakub Kicinski Date: Sun Oct 6 21:09:29 2019 -0700 net/tls: make allocation failure unlikely Make sure GCC realizes it's unlikely that allocations will fail. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 93277b258f47554f3057db49b191ea5096ce8dbd Author: Jakub Kicinski Date: Sun Oct 6 21:09:28 2019 -0700 net/tls: mark sk->err being set as unlikely Tell GCC sk->err is not likely to be set. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 163ab96b52ae2bb2d8f188cd29f0b570610f9007 Author: Jakub Kicinski Date: Sun Oct 6 21:09:27 2019 -0700 net: sockmap: use bitmap for copy info Don't use bool array in struct sk_msg_sg, save 12 bytes. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 1d0f2ebf392ef11465cefb29d545ed9e3222b29e Author: Lionel Landwerlin Date: Mon Sep 9 12:31:09 2019 +0300 drm/i915/perf: move perf types to their own header Following a pattern used throughout the driver. Signed-off-by: Lionel Landwerlin Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20190909093116.7747-7-lionel.g.landwerlin@intel.com commit 147dae76dbb9b20ba48385911c6fc04bf038a64a Author: Alexandre Belloni Date: Mon Oct 7 15:47:24 2019 +0200 rtc: ds1347: handle century register The DS1347 can handle years from 0 to 9999, add century register support. Link: https://lore.kernel.org/r/20191007134724.15505-10-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 860c45b56d9367f220f6ff786588ccd2d6c44065 Author: Alexandre Belloni Date: Mon Oct 7 15:47:23 2019 +0200 rtc: ds1347: use regmap_update_bits Use regmap_update_bits instead of open coding. Also add proper error handling. Link: https://lore.kernel.org/r/20191007134724.15505-9-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit d9dcfa5f7084a0c648d9f0946994f4320a411a40 Author: Alexandre Belloni Date: Mon Oct 7 15:47:22 2019 +0200 rtc: ds1347: properly handle oscillator failures The comment in the probe function stating that it disables oscillator stop detection and glitch filtering is incorrect as it sets bits 3 and 4 while it should be setting 5 and 6 to achieve that. Then, it is safe to assume that the oscillator failure detection is actually enabled. Properly handle oscillator failures by returning -EINVAL when the time and date are know to be incorrect and reset the flag when the time is set. Link: https://lore.kernel.org/r/20191007134724.15505-8-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 3ce20a23e2199bd98eb85fbaa524104931cd14dd Author: Alexandre Belloni Date: Mon Oct 7 15:47:21 2019 +0200 rtc: ds1347: set range The DS1347 handle dates from year 0000 to 9999. Leap years are claimed to be handled correctly in the datasheet. Link: https://lore.kernel.org/r/20191007134724.15505-7-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 554692d56d74cd2e1de369570c242eb22c203c6d Author: Alexandre Belloni Date: Mon Oct 7 15:47:20 2019 +0200 rtc: ds1347: convert to devm_rtc_allocate_device This allows further improvement of the driver. Link: https://lore.kernel.org/r/20191007134724.15505-6-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 088443c79c7720470e353fa46eb1acf642b05822 Author: Alexandre Belloni Date: Mon Oct 7 15:47:19 2019 +0200 rtc: ds1347: mask ALM OUT when reading time Bit 7 of the minutes registers is ALM OUT. It indicates an alarm fired. Mask it out when reading the time. Link: https://lore.kernel.org/r/20191007134724.15505-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit ff7f9e0533ffb47a18090b8cfd6fe69ef757d7e7 Author: Alexandre Belloni Date: Mon Oct 7 15:47:18 2019 +0200 rtc: ds1347: simplify getting .driver_data Get 'driver_data' from 'struct device' directly. Going via spi_device is an unnecessary step. Link: https://lore.kernel.org/r/20191007134724.15505-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 1d84eca6d5b320b9c0a2f7c107aac40bb8989785 Author: Alexandre Belloni Date: Mon Oct 7 15:47:17 2019 +0200 rtc: ds1347: remove useless read DS1347_SECONDS_REG is read at probe time but the value is simply discarded. Remove that useless read. Link: https://lore.kernel.org/r/20191007134724.15505-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 590062f479312aecc0eb88900cdc4983a7cc56f5 Author: Alexandre Belloni Date: Mon Oct 7 15:47:16 2019 +0200 rtc: ds1347: remove verbose messages Printing debugging (and opaque) information is not useful and only clutters the boot log. Remove those messages. Link: https://lore.kernel.org/r/20191007134724.15505-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit f00eaa38eb0c7185ffff51c5288d00af9032e354 Author: Alexandre Belloni Date: Mon Oct 7 15:47:15 2019 +0200 rtc: add a timestamp for year 0 A few RTCs handle dates from year 0 to year 9999. Add a timestamp even if years before 1970 will probably never be used. Link: https://lore.kernel.org/r/20191007134724.15505-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit cd7629b27bf9a32f2f4020f9028216ebbd88725e Author: Stephen Boyd Date: Fri Oct 4 14:43:27 2019 -0700 rtc: armada38x: Use of_device_get_match_data() Use the more modern API to get the match data out of the of match table. This saves some code, lines, and nicely avoids referencing the match table when it is undefined with configurations where CONFIG_OF=n. Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Rob Herring Cc: Frank Rowand Cc: Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20191004214334.149976-4-swboyd@chromium.org Signed-off-by: Alexandre Belloni commit 7da83f1bba0e4b70af2d292e099bec6092b37217 Author: Krzysztof Kozlowski Date: Fri Oct 4 17:05:10 2019 +0200 rtc: da9063: Handle invalid IRQ from platform_get_irq_byname() platform_get_irq_byname() might return -errno which later would be cast to an unsigned int and used in request_irq(). Signed-off-by: Krzysztof Kozlowski Tested-by: Adam Thomson Link: https://lore.kernel.org/r/20191004150510.6278-1-krzk@kernel.org Signed-off-by: Alexandre Belloni commit cf79e7c3c9e9ea820d8795329fb888ec4e3ae4d0 Author: Alexandre Belloni Date: Thu Oct 3 23:35:44 2019 +0200 rtc: m41t80: set range This is a standard BCD RTC that will fail in 2100. The century bits don't help because 2100 will be considered a leap year while it is not. Link: https://lore.kernel.org/r/20191003213544.5359-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 8211fbfaf2fe66ac4ca28bb52b4e7f61dcac0378 Author: Heiner Kallweit Date: Sun Oct 6 18:52:43 2019 +0200 net: core: use helper skb_ensure_writable in more places Use helper skb_ensure_writable in two more places to simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 328908621081c3c7455c39549c5334e74b7c525a Author: David S. Miller Date: Mon Oct 7 09:37:27 2019 -0400 ipv6: Make ipv6_mc_may_pull() return bool. Consistent with how pskb_may_pull() also now does so. Signed-off-by: David S. Miller commit b9df4fd7e99cb8bfd80c4143f3045d63b1754ad0 Author: Heiner Kallweit Date: Sun Oct 6 18:19:54 2019 +0200 net: core: change return type of pskb_may_pull to bool This function de-facto returns a bool, so let's change the return type accordingly. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 6c157f6ed90ffceba73d43c115ccf94a435a4c3c Merge: 9b75803e6ed7 2413ea97157d Author: David S. Miller Date: Mon Oct 7 09:30:03 2019 -0400 Merge branch 'ena-set_channels' Sameeh Jubran says: ==================== ena: Support ethtool set_channels Difference from v2: * ethtool's set/get channels: Switched to using combined instead of separate rx/tx * Fixed error handling in set_channels * Fixed indentation and cosmetic issues as requested by Jakub Kicinski Difference from v1: * Dropped the print from patch 0002 - "net: ena: multiple queue creation related cleanups" as requested by David Miller ==================== Signed-off-by: David S. Miller commit 2413ea97157d6116b3abf432e36c2228f6428f02 Author: Sameeh Jubran Date: Sun Oct 6 15:33:28 2019 +0300 net: ena: ethtool: support set_channels callback Set channels callback enables the user to change the count of queues used by the driver using ethtool. We decided to currently support only equal number of rx and tx queues, this might change in the future. Also rename dev_up to dev_was_up in ena_update_queue_count() to make it clearer. Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 9f648f7b712461f0aafbbc896a4e5df68dacafa9 Author: Sameeh Jubran Date: Sun Oct 6 15:33:27 2019 +0300 net: ena: remove redundant print of number of queues The number of queues can be derived using ethtool, no need to print it in ena_probe() Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 736ce3f414ccc005e86bdd920e35bf4ddaa65d68 Author: Sameeh Jubran Date: Sun Oct 6 15:33:26 2019 +0300 net: ena: make ethtool -l show correct max number of queues - Update ena_ethtool:ena_get_channels() to return adapter->max_io_queues so that ethtool -l returns the correct maximum queue number. - Change the name of ena_calc_io_queue_num() to ena_calc_max_io_queue_num() as it returns the maximum number of io queues and actual number of queues can be smaller if changed by ethtool -L which is implemented in a later commit. - Change variable name from io_queue_num to max_num_io_queues in ena_calc_max_io_queue_num() and ena_probe(). - Make all types of variables that convey the number and sizeof queues to be u32, for consistency with the API between the driver and the device. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 9a037b06137b46bea6ed2fade2537cb820c1fd7c Author: Sameeh Jubran Date: Sun Oct 6 15:33:25 2019 +0300 net: ena: ethtool: get_channels: use combined only Since we use the same IRQ and NAPI to service RX and TX then we need to use a combined channel instead of rx and tx channels. Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 4d19266022ec4814add8d5f02f49cb493294c674 Author: Sameeh Jubran Date: Sun Oct 6 15:33:24 2019 +0300 net: ena: multiple queue creation related cleanups - Rename ena_calc_queue_size() to ena_calc_io_queue_size() for clarity and consistency - Remove redundant number of io queues parameter in functions ena_enable_msix() and ena_enable_msix_and_set_admin_interrupts(), which already get adapter parameter, so use adapter->num_io_queues in the function instead. - Use the local variable ena_dev instead of ctx->ena_dev in ena_calc_io_queue_size - Fix multi row comment alignments Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit faa615f9da5d79937756363ff0628d04b61015a1 Author: Sameeh Jubran Date: Sun Oct 6 15:33:23 2019 +0300 net: ena: change num_queues to num_io_queues for clarity and consistency Most places in the code refer to the IO queues as io_queues and not simply queues. Examples - max_io_queues_per_vf, ENA_MAX_NUM_IO_QUEUES, ena_destroy_all_io_queues() etc.. We are also adding the new max_num_io_queues field to struct ena_adapter in the following commit. The changes included in this commit are: struct ena_adapter->num_queues => struct ena_adapter->num_io_queues Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 9b75803e6ed763c60166d8f433e52b8164390c25 Merge: db7fe42d687c 40f843ee5e17 Author: David S. Miller Date: Mon Oct 7 09:26:32 2019 -0400 Merge branch 'samples-pktgen-allow-to-specify-destination-IP-range' Daniel T. Lee says: ==================== samples: pktgen: allow to specify destination IP range Currently, pktgen script supports specify destination port range. To further extend the capabilities, this commit allows to specify destination IP range with CIDR when running pktgen script. Specifying destination IP range will be useful on various situation such as testing RSS/RPS with randomizing n-tuple. This patchset fixes the problem with checking the command result on proc_cmd, and add feature to allow destination IP range. ==================== Signed-off-by: David S. Miller commit 40f843ee5e17673780c0969c8248b31a8d926b17 Author: Daniel T. Lee Date: Sat Oct 5 17:25:09 2019 +0900 samples: pktgen: allow to specify destination IP range (CIDR) Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max") But on samples, each pktgen script doesn't have any option to achieve this. This commit adds the feature to specify the destination address range with CIDR. -d : ($DEST_IP) destination IP. CIDR (e.g. 198.18.0.0/15) is also allowed # ./pktgen_sample01_simple.sh -6 -d fe80::20/126 -p 3000 -n 4 # tcpdump ip6 and udp 05:14:18.082285 IP6 fe80::99.71 > fe80::23.3000: UDP, length 16 05:14:18.082564 IP6 fe80::99.43 > fe80::23.3000: UDP, length 16 05:14:18.083366 IP6 fe80::99.107 > fe80::22.3000: UDP, length 16 05:14:18.083585 IP6 fe80::99.97 > fe80::21.3000: UDP, length 16 Signed-off-by: Daniel T. Lee Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit f0681d95e7dcddb53b27610d7ac36d2aac31983b Author: Daniel T. Lee Date: Sat Oct 5 17:25:08 2019 +0900 samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) Validating the address should be preceded prior to the parsing. Helpers will be used in prior to set target address in samples/pktgen. Signed-off-by: Daniel T. Lee Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 3cad8f911575191fb3b81d8ed0e061e30f922223 Author: Daniel T. Lee Date: Sat Oct 5 17:25:07 2019 +0900 samples: pktgen: fix proc_cmd command result check logic Currently, proc_cmd is used to dispatch command to 'pg_ctrl', 'pg_thread', 'pg_set'. proc_cmd is designed to check command result with grep the "Result:", but this might fail since this string is only shown in 'pg_thread' and 'pg_set'. This commit fixes this logic by grep-ing the "Result:" string only when the command is not for 'pg_ctrl'. For clarity of an execution flow, 'errexit' flag has been set. To cleanup pktgen on exit, trap has been added for EXIT signal. Signed-off-by: Daniel T. Lee Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 723d2904a2a47339cae7cb1c2a6a7582c130ee66 Author: Daniel T. Lee Date: Sat Oct 5 17:25:06 2019 +0900 samples: pktgen: make variable consistent with option This commit changes variable names that can cause confusion. For example, variable DST_MIN is quite confusing since the keyword 'udp_dst_min' and keyword 'dst_min' is used with pg_ctrl. On the following commit, 'dst_min' will be used to set destination IP, and the existing variable name DST_MIN should be changed. Variable names are matched to the exact keyword used with pg_ctrl. Signed-off-by: Daniel T. Lee Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit db7fe42d687c8df861487f5343f1113a0dc80a85 Merge: 82a843de41d4 62ede55fe68c Author: David S. Miller Date: Mon Oct 7 09:11:07 2019 -0400 Merge branch 'netdevsim-implement-devlink-dev_info-op' Jiri Pirko says: ==================== netdevsim: implement devlink dev_info op Initial implementation of devlink dev_info op - just driver name is filled up and sent to user. Bundled with selftest. ==================== Signed-off-by: David S. Miller commit 62ede55fe68c91c92ac7fdd65828c9413155faf6 Author: Jiri Pirko Date: Mon Oct 7 10:27:09 2019 +0200 selftests: add netdevsim devlink dev info test Add test to verify netdevsim driver name returned by devlink dev info. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 8e23cc0319b185de49e35ed4fec174552bdf2f9a Author: Jiri Pirko Date: Mon Oct 7 10:27:08 2019 +0200 netdevsim: implement devlink dev_info op Do simple dev_info devlink operation implementation which only fills up the driver name. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 82a843de41d42681c1bbf9194b28736d06050b08 Author: Jiri Pirko Date: Mon Oct 7 09:28:31 2019 +0200 net: devlink: fix reporter dump dumpit In order for attrs to be prepared for reporter dump dumpit callback, set GENL_DONT_VALIDATE_DUMP_STRICT instead of GENL_DONT_VALIDATE_DUMP. Fixes: ee85da535fe3 ("devlink: have genetlink code to parse the attrs during dumpit" Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 0b2ba815fb5cbfab253f175d0b0d0d93d7ab9b5d Author: Dmitry Torokhov Date: Fri Oct 4 16:10:17 2019 -0700 regulator: max77686: switch to using fwnode_gpiod_get_index gpiod_get_from_of_node() is being retired in favor of fwnode_gpiod_get_index(), that behaves similar to gpiod_get_index(), but can work with arbitrary firmware node. It will also be able to support secondary software nodes. Let's switch this driver over. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20191004231017.130290-8-dmitry.torokhov@gmail.com Reviewed-by: Linus Walleij Signed-off-by: Mark Brown commit 22803ca3c56b02e5bb8a4eb14104114009fd1c65 Author: Dmitry Torokhov Date: Fri Oct 4 16:10:16 2019 -0700 regulator: tps65132: switch to using devm_fwnode_gpiod_get() devm_fwnode_get_index_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Note that we no longer need to check for NULL as devm_fwnode_gpiod_get() will return -ENOENT if GPIO is missing. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20191004231017.130290-7-dmitry.torokhov@gmail.com Reviewed-by: Linus Walleij Signed-off-by: Mark Brown commit 61d2fc3cf8f557193c8c362ea75f06fa5a0abcfe Author: Dmitry Torokhov Date: Fri Oct 4 16:10:15 2019 -0700 regulator: da9211: switch to using devm_fwnode_gpiod_get devm_gpiod_get_from_of_node() is being retired in favor of devm_fwnode_gpiod_get_index(), that behaves similar to devm_gpiod_get_index(), but can work with arbitrary firmware node. It will also be able to support secondary software nodes. Let's switch this driver over. Signed-off-by: Dmitry Torokhov Acked-by: Adam Thomson Link: https://lore.kernel.org/r/20191004231017.130290-6-dmitry.torokhov@gmail.com Reviewed-by: Linus Walleij Signed-off-by: Mark Brown commit de2792b507675641885075bc99e283de861b1ce6 Author: Dmitry Torokhov Date: Fri Oct 4 16:10:14 2019 -0700 regulator: s2mps11: switch to using devm_fwnode_gpiod_get devm_gpiod_get_from_of_node() is being retired in favor of devm_fwnode_gpiod_get_index(), that behaves similar to devm_gpiod_get_index(), but can work with arbitrary firmware node. It will also be able to support secondary software nodes. Let's switch this driver over. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20191004231017.130290-5-dmitry.torokhov@gmail.com Reviewed-by: Linus Walleij Signed-off-by: Mark Brown commit 51d98ff8616a3c46233bdd1b714b8f19537bc9a8 Author: Dmitry Torokhov Date: Fri Oct 4 16:10:13 2019 -0700 regulator: tps65090: switch to using devm_fwnode_gpiod_get devm_gpiod_get_from_of_node() is being retired in favor of devm_fwnode_gpiod_get_index(), that behaves similar to devm_gpiod_get_index(), but can work with arbitrary firmware node. It will also be able to support secondary software nodes. Let's switch this driver over. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20191004231017.130290-4-dmitry.torokhov@gmail.com Reviewed-by: Linus Walleij Signed-off-by: Mark Brown commit de2cd1a552673f370f8ea39a0241f764fbcf39e5 Author: Dmitry Torokhov Date: Fri Oct 4 16:10:12 2019 -0700 regulator: slg51000: switch to using fwnode_gpiod_get_index devm_gpiod_get_from_of_node() is being retired in favor of [devm_]fwnode_gpiod_get_index(), that behaves similar to devm_gpiod_get_index(), but can work with arbitrary firmware node. It will also be able to support secondary software nodes. Let's switch this driver over. Note that now that we have a good non-devm API for getting GPIO from arbitrary firmware node, there is no reason to use devm API here as regulator core takes care of managing lifetime of "enable" GPIO and we were immediately detaching requested GPIO from devm anyway. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20191004231017.130290-3-dmitry.torokhov@gmail.com Reviewed-by: Linus Walleij Signed-off-by: Mark Brown commit 5be0e549e18f8ad7efa81b3e054ca094b7782f55 Author: Dmitry Torokhov Date: Fri Oct 4 16:10:11 2019 -0700 regulator: s5m8767: switch to using devm_fwnode_gpiod_get devm_gpiod_get_from_of_node() is being retired in favor of devm_fwnode_gpiod_get_index(), that behaves similar to devm_gpiod_get_index(), but can work with arbitrary firmware node. It will also be able to support secondary software nodes. Let's switch this driver over. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20191004231017.130290-2-dmitry.torokhov@gmail.com Reviewed-by: Linus Walleij Signed-off-by: Mark Brown commit 03c3cf006432bc0c61e9c1560205d4e953550de6 Merge: df8c542ee853 13949fa9daa9 Author: Mark Brown Date: Mon Oct 7 13:56:37 2019 +0100 Merge branch 'ib-fwnode-gpiod-get-index' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio into regulator-5.5 commit 62217f8b084a05dd2d84781a8ca065098df21ec7 Author: Stephen Boyd Date: Fri Oct 4 14:43:32 2019 -0700 spi: gpio: Look for a device node instead of match This driver doesn't do anything with the match for the device node. The logic is the same as looking to see if a device node exists or not because this driver wouldn't probe unless there is a device node match when the device is created from DT. Just test for the presence of the device node to simplify and avoid referencing a potentially undefined match table when CONFIG_OF=n. Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Mark Brown Cc: Rob Herring Cc: Frank Rowand Cc: Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20191004214334.149976-9-swboyd@chromium.org Signed-off-by: Mark Brown commit df8c542ee853f22dc0e5584ba0a70de397a3d73e Author: Axel Lin Date: Mon Oct 7 19:43:20 2019 +0800 regulator: pbias: Get rid of struct pbias_regulator_data Only the desc field is really used, so use struct regulator_desc instead. Then struct pbias_regulator_data can be removed. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20191007114320.20977-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 151b03791e4acb09bb9a9af2a87bca1240937d6c Author: Axel Lin Date: Mon Oct 7 19:50:08 2019 +0800 regulator: da9062: Simplify the code iterating all regulators It's more straightforward to use for statement here. Signed-off-by: Axel Lin Acked-by: Steve Twiss Link: https://lore.kernel.org/r/20191007115009.25672-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit a9d273671440c439c4f236123c59dd839c1a0eb7 Author: Dan Carpenter Date: Fri Oct 4 13:22:09 2019 +0300 ASoC: fsl_mqs: Fix error handling in probe There are several problems in the error handling in fsl_mqs_probe(). 1) "ret" isn't initialized on some paths. GCC has a feature which warns about uninitialized variables but the code initializes "ret" to zero at the start of the function so the checking is turned off. 2) "gpr_np" is a pointer so initializing it to zero is confusing and generates a Sparse warning. 3) of_parse_phandle() doesn't return error pointers on error, it returns NULL. 4) If devm_snd_soc_register_component() fails then the function should free the "gpr_np". Fixes: 9e28f6532c61 ("ASoC: fsl_mqs: Add MQS component driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20191004102208.GB823@mwanda Signed-off-by: Mark Brown commit e9e8fc9ed63e7e0fb30f8612f628924fbd868467 Author: YueHaibing Date: Sun Oct 6 18:55:22 2019 +0800 ASoC: fsl_mqs: remove set but not used variable 'bclk' Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/fsl/fsl_mqs.c: In function fsl_mqs_hw_params: sound/soc/fsl/fsl_mqs.c:54:6: warning: variable bclk set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191006105522.58560-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 03fe492e8346d3da59b6eb7ea306d46ebf22e9d5 Author: YueHaibing Date: Sun Oct 6 18:46:31 2019 +0800 ASoc: tas2770: Fix build error without GPIOLIB If GPIOLIB is not set, building fails: sound/soc/codecs/tas2770.c: In function tas2770_reset: sound/soc/codecs/tas2770.c:38:3: error: implicit declaration of function gpiod_set_value_cansleep; did you mean gpio_set_value_cansleep? [-Werror=implicit-function-declaration] gpiod_set_value_cansleep(tas2770->reset_gpio, 0); ^~~~~~~~~~~~~~~~~~~~~~~~ gpio_set_value_cansleep sound/soc/codecs/tas2770.c: In function tas2770_i2c_probe: sound/soc/codecs/tas2770.c:749:24: error: implicit declaration of function devm_gpiod_get_optional; did you mean devm_regulator_get_optional? [-Werror=implicit-function-declaration] tas2770->reset_gpio = devm_gpiod_get_optional(tas2770->dev, ^~~~~~~~~~~~~~~~~~~~~~~ devm_regulator_get_optional sound/soc/codecs/tas2770.c:751:13: error: GPIOD_OUT_HIGH undeclared (first use in this function); did you mean GPIOF_INIT_HIGH? GPIOD_OUT_HIGH); ^~~~~~~~~~~~~~ GPIOF_INIT_HIGH Reported-by: Hulk Robot Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver") Suggested-by: Ladislav Michl Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191006104631.60608-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 67ad656bdd703157154d0db5bf1b35a5a86073b9 Author: Stephen Boyd Date: Fri Oct 4 14:43:31 2019 -0700 ASoC: jz4740: Use of_device_get_match_data() This probe function is only called if the device is backed by a DT node, so switch this call to of_device_get_match_data() to reduce code size and simplify a bit. This also avoids needing to reference a potentially undefined variable because of_device_get_match_data() doesn't need to know anything beyond the struct device to find the match table. Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Paul Cercueil Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Rob Herring Cc: Frank Rowand Cc: Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20191004214334.149976-8-swboyd@chromium.org Signed-off-by: Mark Brown commit abc47ff61d3fae19d967d09876f1ced193dfcad2 Author: Chris Wilson Date: Sun Oct 6 17:49:53 2019 +0100 drm/i915/gt: Restore dropped 'interruptible' flag Lost in the rebasing was Tvrtko's reminder that we need to keep an uninterruptible wait around for the Ironlake VT-d w/a Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191006165002.30312-3-chris@chris-wilson.co.uk commit 62b4359c307fad13fba681732937ac4a33207ea6 Author: Russell King Date: Sun Sep 22 11:27:03 2019 +0100 arm64: dts: mark lx2160a esdhc controllers dma coherent The LX2160A esdhc controllers are setup by the driver to be DMA coherent, but without marking them as such in DT, Linux thinks they are not. This can lead to random sporadic DMA errors, even to the extent of preventing boot, such as: mmc0: ADMA error mmc0: sdhci: ============ SDHCI REGISTER DUMP =========== mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00002202 mmc0: sdhci: Blk size: 0x00000008 | Blk cnt: 0x00000001 mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013 mmc0: sdhci: Present: 0x01f50008 | Host ctl: 0x00000038 mmc0: sdhci: Power: 0x00000003 | Blk gap: 0x00000000 mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x000040d8 mmc0: sdhci: Timeout: 0x00000003 | Int stat: 0x00000001 mmc0: sdhci: Int enab: 0x037f108f | Sig enab: 0x037f108b mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00002202 mmc0: sdhci: Caps: 0x35fa0000 | Caps_1: 0x0000af00 mmc0: sdhci: Cmd: 0x0000333a | Max curr: 0x00000000 mmc0: sdhci: Resp[0]: 0x00000920 | Resp[1]: 0x001d8a33 mmc0: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x3f400e00 mmc0: sdhci: Host ctl2: 0x00000000 mmc0: sdhci: ADMA Err: 0x00000009 | ADMA Ptr: 0x000000236d43820c mmc0: sdhci: ============================================ mmc0: error -5 whilst initialising SD card These are caused by the device's descriptor fetch hitting speculatively loaded CPU cache lines that the CPU does not see through the normal, non-cacheable DMA coherent mapping that it uses for non-coherent devices. DT and the device must agree wrt whether the device is DMA coherent or not. Signed-off-by: Russell King Acked-by: Li Yang Signed-off-by: Shawn Guo commit 77591e42458d87aafd6baa10cb7aec536ad40669 Author: Anatolij Gustschin Date: Sat Sep 21 14:07:36 2019 +0200 ARM: dts: imx6qdl-wandboard: add ethernet PHY description Wandboard devicetrees lack the ethernet PHY description, add it. Signed-off-by: Anatolij Gustschin Signed-off-by: Shawn Guo commit 930d3a4907ae6cdb476db23fc7caa86e9de1e557 Author: Chris Brandt Date: Mon Sep 30 09:58:04 2019 -0500 pinctrl: rza2: Fix gpio name typos Fix apparent copy/paste errors that were overlooked in the original driver. "P0_4" -> "PF_4" "P0_3" -> "PG_3" Fixes: b59d0e782706 ("pinctrl: Add RZ/A2 pin and gpio controller") Cc: Signed-off-by: Chris Brandt Link: https://lore.kernel.org/r/20190930145804.30497-1-chris.brandt@renesas.com Signed-off-by: Geert Uytterhoeven commit 56278c8fcb71874d591907d654272d511ce3597c Author: Biju Das Date: Mon Sep 23 15:41:28 2019 +0100 clk: renesas: r8a774b1: Add TMU clock This patch adds the TMU clocks to the R8A774B1 SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569249688-15821-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit bee447e224b2645911c5d06e35dc90d8433fcef6 Author: Matthias Kaehlcke Date: Wed Oct 2 12:44:06 2019 -0700 drm/bridge: dw-hdmi: Refuse DDC/CI transfers on the internal I2C controller The DDC/CI protocol involves sending a multi-byte request to the display via I2C, which is typically followed by a multi-byte response. The internal I2C controller only allows single byte reads/writes or reads of 8 sequential bytes, hence DDC/CI is not supported when the internal I2C controller is used. The I2C transfers complete without errors, however the data in the response is garbage. Abort transfers to/from slave address 0x37 (DDC) with -EOPNOTSUPP, to make it evident that the communication is failing. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reviewed-by: Sean Paul Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191002124354.v2.1.I709dfec496f5f0b44a7b61dcd4937924da8d8382@changeid commit 9445ad17109b6fe7864acc33f0c62bd9d866b722 Author: Joonas Lahtinen Date: Mon Oct 7 15:24:47 2019 +0300 drm/i915: Update DRIVER_DATE to 20191007 Signed-off-by: Joonas Lahtinen commit 4340ec45e895c4bd25e9bcdb3b88cd192fd9512c Author: Icenowy Zheng Date: Mon Oct 7 00:03:02 2019 +0800 drm/sun4i: sun6i_mipi_dsi: fix DCS long write packet length The packet length of DCS long write packet should not be added with 1 when constructing long write packet. Fix this. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191006160303.24413-4-icenowy@aosc.io commit 81fafb9488a1d1347b39ad456d85e29649383749 Author: Icenowy Zheng Date: Mon Oct 7 00:03:01 2019 +0800 drm/sun4i: dsi: fix the overhead of the horizontal front porch The formula in the BSP kernel indicates that a 16-byte overhead is used when sending the HFP. However, this value is currently set to 6 in the sun6i_mipi_dsi driver, which makes some panels flashing. Fix this overhead value. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191006160303.24413-3-icenowy@aosc.io commit b0a506fb806d7bedfb979a42ae65fd9859906dc9 Author: Marek Vasut Date: Tue Sep 17 17:35:12 2019 +0200 ARM: dts: imx6q-dhcom: Enable CAN in board DTS Move the CAN enablement from SoM DTSi to board DTS, as each board might need different CAN configuration. Moreover, disable CAN2 on the PDK2 as it is not available on any connector. This also fixes on-SoM SD slot operation, as it shares pins with the CAN2. Signed-off-by: Marek Vasut Reviewed-by: Fabio Estevam Cc: Fabio Estevam Cc: Ludwig Zenz Cc: Shawn Guo Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo commit 201e91091b1d47047f55580b5474e1239f4d17aa Author: Bartosz Golaszewski Date: Thu Oct 3 11:29:13 2019 +0200 sh: add the sh_ prefix to early platform symbols Old early platform device support is now sh-specific. Before moving on to implementing new early platform framework based on real platform devices, prefix all early platform symbols with 'sh_'. Signed-off-by: Bartosz Golaszewski Cc: Rich Felker Link: https://lore.kernel.org/r/20191003092913.10731-3-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 507fd01d5333338753a1cc26322dfc9f856c109f Author: Bartosz Golaszewski Date: Thu Oct 3 11:29:12 2019 +0200 drivers: move the early platform device support to arch/sh SuperH is the only user of the current implementation of early platform device support. We want to introduce a more robust approach to early probing. As the first step - move all the current early platform code to arch/sh. In order not to export internal drivers/base functions to arch code for this temporary solution - copy the two needed routines for driver matching from drivers/base/platform.c to arch/sh/drivers/platform_early.c. Also: call early_platform_cleanup() from subsys_initcall() so that it's called after all early devices are probed. Signed-off-by: Bartosz Golaszewski Cc: Rich Felker Link: https://lore.kernel.org/r/20191003092913.10731-2-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 4fb7d08707565d27ec84a364d011043ade8c38b4 Author: Mike Travis Date: Tue Sep 10 09:58:47 2019 -0500 x86/platform/uv: Account for UV Hubless in is_uvX_hub Ops The references in the is_uvX_hub() function uses the hub_info pointer which will be NULL when the system is hubless. This change avoids that NULL dereference. It is also an optimization in performance. Signed-off-by: Mike Travis Reviewed-by: Steve Wahl Reviewed-by: Dimitri Sivanich Cc: Andrew Morton Cc: Borislav Petkov Cc: Christoph Hellwig Cc: H. Peter Anvin Cc: Hedi Berriche Cc: Justin Ernst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190910145840.294981941@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Ingo Molnar commit df55029f7ea65d8c653a79dd728918dfe25b1356 Author: Mike Travis Date: Tue Sep 10 09:58:46 2019 -0500 x86/platform/uv: Check EFI Boot to set reboot type Change to checking for EFI Boot type from previous check on if this is a KDUMP kernel. This allows for KDUMP kernels that can handle EFI reboots. Signed-off-by: Mike Travis Reviewed-by: Steve Wahl Reviewed-by: Dimitri Sivanich Cc: Andrew Morton Cc: Borislav Petkov Cc: Christoph Hellwig Cc: H. Peter Anvin Cc: Hedi Berriche Cc: Justin Ernst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190910145840.215091717@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Ingo Molnar commit f5a8f0ecb436a15f50215f27ab70a2e8626a6135 Author: Mike Travis Date: Tue Sep 10 09:58:45 2019 -0500 x86/platform/uv: Decode UVsystab Info Decode the hubless UVsystab passed from BIOS to the kernel saving pertinent info in a similar manner that hubbed UVsystabs are decoded. Signed-off-by: Mike Travis Reviewed-by: Steve Wahl Reviewed-by: Dimitri Sivanich Cc: Andrew Morton Cc: Borislav Petkov Cc: Christoph Hellwig Cc: H. Peter Anvin Cc: Hedi Berriche Cc: Justin Ernst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190910145840.135325066@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Ingo Molnar commit 8785968bce1cc7368ea95c3e1e5b9210f56f6667 Author: Mike Travis Date: Tue Sep 10 09:58:44 2019 -0500 x86/platform/uv: Add UV Hubbed/Hubless Proc FS Files Indicate to UV user utilities that UV hubless support is available on this system via the existing /proc infterface. The current interface is maintained with the addition of new /proc leaves ("hubbed", "hubless", and "oemid") that contain the specific type of UV arch this one is. Signed-off-by: Mike Travis Reviewed-by: Steve Wahl Reviewed-by: Dimitri Sivanich Cc: Andrew Morton Cc: Borislav Petkov Cc: Christoph Hellwig Cc: H. Peter Anvin Cc: Hedi Berriche Cc: Justin Ernst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190910145840.055590900@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Ingo Molnar commit 2bcf26528787d92333ed0dfd6abc9835b8e97eab Author: Mike Travis Date: Tue Sep 10 09:58:43 2019 -0500 x86/platform/uv: Setup UV functions for Hubless UV Systems Add more support for UV systems that do not contain a UV Hub (AKA "hubless"). This update adds support for additional functions required: Use PCH NMI handler instead of a UV Hub NMI handler. Initialize the UV BIOS callback interface used to support specific UV functions. Signed-off-by: Mike Travis Reviewed-by: Steve Wahl Reviewed-by: Dimitri Sivanich Cc: Andrew Morton Cc: Borislav Petkov Cc: Christoph Hellwig Cc: H. Peter Anvin Cc: Hedi Berriche Cc: Justin Ernst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190910145839.975787119@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Ingo Molnar commit 9743cb68f736d986481edba4d00de454d2faa0ec Author: Mike Travis Date: Tue Sep 10 09:58:42 2019 -0500 x86/platform/uv: Add return code to UV BIOS Init function Add a return code to the UV BIOS init function that indicates the successful initialization of the kernel/BIOS callback interface. Signed-off-by: Mike Travis Reviewed-by: Steve Wahl Reviewed-by: Dimitri Sivanich Cc: Andrew Morton Cc: Borislav Petkov Cc: Christoph Hellwig Cc: H. Peter Anvin Cc: Hedi Berriche Cc: Justin Ernst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190910145839.895739629@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Ingo Molnar commit 0959f8256ada0431c1470d89e5a2811ff2305c88 Author: Mike Travis Date: Tue Sep 10 09:58:41 2019 -0500 x86/platform/uv: Return UV Hubless System Type Return the type of UV hubless system for UV specific code that depends on that. Add a function to convert UV system type to bit pattern needed for is_uv_hubless(). Signed-off-by: Mike Travis Reviewed-by: Steve Wahl Reviewed-by: Dimitri Sivanich Cc: Andrew Morton Cc: Borislav Petkov Cc: Christoph Hellwig Cc: H. Peter Anvin Cc: Hedi Berriche Cc: Justin Ernst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190910145839.814880843@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Ingo Molnar commit 61e5ddca9c2a312f933bf5b12bc08484189fefe6 Author: Mike Travis Date: Tue Sep 10 09:58:40 2019 -0500 x86/platform/uv: Save OEM_ID from ACPI MADT probe Save the OEM_ID and OEM_TABLE_ID passed to the apic driver probe function for later use. Also, convert the char list arg passed from the kernel to a true null-terminated string. Signed-off-by: Mike Travis Reviewed-by: Steve Wahl Reviewed-by: Dimitri Sivanich Cc: Andrew Morton Cc: Borislav Petkov Cc: Christoph Hellwig Cc: H. Peter Anvin Cc: Hedi Berriche Cc: Justin Ernst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190910145839.732237241@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Ingo Molnar commit 2538f0ee8a2920d58812687e84c854b4a9882013 Author: JC Kuo Date: Sat Oct 5 00:29:01 2019 +0800 usb: host: xhci-tegra: Add Tegra194 XHCI support This commit adds Tegra194 XUSB host mode controller support. This is very similar to the existing Tegra124/Tegra210/Tegra186 XHCI, except 1. the number of ports and PHYs differs 2. the IPFS wrapper being removed 3. mailbox registers address changes Signed-off-by: JC Kuo Link: https://lore.kernel.org/r/20191004162906.4818-3-jckuo@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 8a02a23f33be50a52cfdbf3aa825b5e0c649e67e Author: JC Kuo Date: Sat Oct 5 00:29:00 2019 +0800 xhci: tegra: Parameterize mailbox register addresses Tegra194 XUSB host controller has rearranged mailbox registers. This commit makes mailbox registers address a part of "soc" data so that xhci-tegra driver can be used for Tegra194. Signed-off-by: JC Kuo Link: https://lore.kernel.org/r/20191004162906.4818-2-jckuo@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 233450310b6884c5fe4174e6229800b94f8a52c0 Author: Saurav Girepunje Date: Sat Oct 5 11:07:36 2019 +0530 usb: isp1760: isp1760-hcd.c: Drop condition with no effect As the "else if" and "else" branch body are identical the condition has no effect. So drop the else if condition. Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20191005053733.GA10727@saurav Signed-off-by: Greg Kroah-Hartman commit a570ec79641a697db12a28960d6a5318ca4f37f2 Author: Saurav Girepunje Date: Sat Oct 5 11:19:35 2019 +0530 usb: image: microtek.c: Remove unused variable Remove unused variable "err" from mts_scsi_queuecommand_lck(). Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20191005054931.GA11565@saurav Signed-off-by: Greg Kroah-Hartman commit d7ca5afdced3d167058328f9fa7332350a910b05 Author: Hans Verkuil Date: Wed Oct 2 05:04:14 2019 -0300 media: cec-funcs.h: use new CEC_OP_UI_CMD defines When the new CEC_OP_UI_CMD defines were added I forgot to update this header to use these new defines. This is now fixed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9b211f9c5a0b67afc435b86f75d78273b97db1c5 Author: Hans Verkuil Date: Tue Oct 1 04:56:38 2019 -0300 media: cec-funcs.h: add status_req checks The CEC_MSG_GIVE_DECK_STATUS and CEC_MSG_GIVE_TUNER_DEVICE_STATUS commands both have a status_req argument: ON, OFF, ONCE. If ON or ONCE, then the follower will reply with a STATUS message. Either once or whenever the status changes (status_req == ON). If status_req == OFF, then it will stop sending continuous status updates, but the follower will *not* send a STATUS message in that case. This means that if status_req == OFF, then msg->reply should be 0 as well since no reply is expected in that case. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 649cd16c438f51d4cd777e71ca1f47f6e0c5e65d Author: Yang Yingliang Date: Tue Sep 24 06:49:04 2019 -0300 media: flexcop-usb: fix NULL-ptr deref in flexcop_usb_transfer_init() If usb_set_interface() failed, iface->cur_altsetting will not be assigned and it will be used in flexcop_usb_transfer_init() It may lead a NULL pointer dereference. Check usb_set_interface() return value in flexcop_usb_init() and return failed to avoid using this NULL pointer. Signed-off-by: Yang Yingliang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 43be77fa6ce6907d285269bf98e654ad21a36880 Author: Akihiro Tsukada Date: Thu Aug 29 05:38:22 2019 -0300 media: dvb-usb-gl861: support I2C read from tuner via demod Support Friio devices to read from tuner via demod tc90522, by enabling the config option. Signed-off-by: Akihiro Tsukada Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit ecf20d28ff7730d8d446c989eb1cf641ec6e28ce Author: Akihiro Tsukada Date: Thu Aug 29 05:38:21 2019 -0300 media: dvb-frontends/tc90522: extend i2c algo to support some devices This demod implements an i2c adapter for attached tuner and relays i2c messages from users (dvb adapters / bridge chips). Some of them, such as Friio dvb card using gl861, require each pair of i2c messages for one read to be issued as two separate transactions. This patch adds a configuration option to enable this split. Signed-off-by: Akihiro Tsukada Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 25877478c444f0f97ef78af0e7399333bb36b496 Author: Akihiro Tsukada Date: Thu Aug 29 05:38:20 2019 -0300 media: dvb-usb-v2/gl861: remove an un-used header file The header contained just internal definitions and they are not used anymore. Signed-off-by: Akihiro Tsukada Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 8139bb3e1d45275f87dc3bfe296c38e59575528d Author: Akihiro Tsukada Date: Thu Aug 29 05:38:19 2019 -0300 media: dvb-usb-v2/gl861: remove device-specific i2c algo For Friio dvb cards, a distinct I2C algo was provided to support some "long" I2C messages used in relaying tuner I2C via demod. Since the other (generic) i2c algo in this module has been patched to support those messages in a more generic way, this patch replaces and integrates the device-specific i2c algo with the generic one and simplifies the code. Signed-off-by: Akihiro Tsukada Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 1ea76d16569b7fc242b860c7e19549be028b13d1 Author: Antti Palosaari Date: Fri Aug 23 20:53:37 2019 -0300 media: gl861: re-implement I2C adapter logic Device I2C adapter is capable of writing and reading large messages. For I2C writes there is 2 methods: simple for max 2 byte messages and usb_control_msg() with payload data for larger I2C messages. Add I2C adapter logic which selects suitable method according to message size. Add also support for plain I2C read. Cc: Akihiro TSUKADA Signed-off-by: Antti Palosaari Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 10d8f308ba3e4d2c8753dd7a143af6f4a96cc29b Author: Hans Verkuil Date: Fri Oct 4 13:04:24 2019 +0200 cec: add cec_adapter to cec_notifier_cec_adap_unregister() It is possible for one HDMI connector to have multiple CEC adapters. The typical real-world scenario is that where one adapter is used when the device is in standby, and one that's better/smarter when the device is powered up. The cec-notifier changes were made with that in mind, but I missed that in order to support this you need to tell cec_notifier_cec_adap_unregister() which adapter you are unregistering from the notifier. Add this additional argument. It is currently unused, but once all drivers use this, the CEC core will be adapted for these use-cases. Signed-off-by: Hans Verkuil Reviewed-by: Ville Syrjälä Acked-by: Mauro Carvalho Chehab Link: https://patchwork.freedesktop.org/patch/msgid/e9fc8740-6be6-43a7-beee-ce2d7b54936e@xs4all.nl commit cecf0bbbcb6f035a5ca2197f3e11ec2b7fb3da83 Author: Andrei Koshkosh Date: Sun Sep 29 05:04:05 2019 -0300 media: dvbsky: use a single mutex and state buffers for all R/W ops Re-use usb_mutex from dvb_usb_device for this. Tested-by: Jan Pieter van Woerkom Signed-off-by: Andrei Koshkosh Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 767f22ac54b696b2b40f87cad08f877fe3ec2264 Author: Colin Ian King Date: Thu Aug 1 13:09:58 2019 -0300 media: drxj: remove redundant assignment to variable rc The variable rc is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 94ddd60d9c39bf06e63a808e784bc4eaafc852d7 Author: Nishad Kamdar Date: Mon Sep 16 12:09:00 2019 -0300 media: usb: tm6000: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files for TV Master Media USB Adapter drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 1983c43509d7ab4c147305c1c668f4e23a47ef7f Author: Markus Elfring Date: Wed Sep 18 07:30:18 2019 -0300 media: rc: Use devm_platform_ioremap_resource() in tango_ir_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Mans Rullgard Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6d7cc95311f70fa726966c9f834563f8ce05a5c7 Author: Nishad Kamdar Date: Sun Sep 15 08:00:46 2019 -0300 media: rc: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to Remote Controller Driver for Linux. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit a7b2df76b42bdd026e3106cf2ba97db41345a177 Author: Navid Emamdoost Date: Wed Sep 25 12:02:41 2019 -0300 media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 3eab054614cd50ab4254785e7346a82190d78b82 Author: Dominik Danelski Date: Sun Sep 1 18:27:46 2019 -0300 media: em28xx: Add support for Magix Wideowandler 2 Add support for Magix Wideowandler 2 - analog USB capture card Signed-off-by: Dominik Danelski Co-author: Cornelius Porosanu Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit ed4e15697b5fda94e65af1ecb272cd1388192bd6 Author: Colin Ian King Date: Thu Sep 5 14:57:26 2019 -0300 media: cxd2820r: make arrays tab static const, makes object smaller Don't populate the array tab on the stack but instead make it static const. Makes the object size smaller by 170 bytes in total. Before: text data bss dec hex filename 7045 1736 0 8781 224d media/dvb-frontends/cxd2820r_c.o 8800 2216 0 11016 2b08 media/dvb-frontends/cxd2820r_t.o 8981 2120 0 11101 2b5d media/dvb-frontends/cxd2820r_t2.o After: text data bss dec hex filename 6896 1832 0 8728 2218 media/dvb-frontends/cxd2820r_c.o 8651 2312 0 10963 2ad3 media/dvb-frontends/cxd2820r_t.o 8853 2184 0 11037 2b1d media/dvb-frontends/cxd2820r_t2.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6f5129e251aeec71f8928ae0668d508454fa8aff Author: Sean Young Date: Sat Aug 31 05:37:39 2019 -0300 media: rtl28xxu: fix idle handling Currently the IR receiver is put into idle mode after each interrupt. However longer IR like NEC can be distributed over multiple interrupts, so putting the IR into idle in the middle of such a message will break decoding. Every IR message has a trailing space of 0xbf (one less than IR_IDE_LEN{0,1} which is programmed to 0xc0). So, set the timeout to that value and rc-core will put the IR receiver into idle mode automatically. Thanks to Jan Pieter van Woerkom for providing the hardware. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 64659c81dfccc4f8733289d59904b7c536c00683 Author: Sean Young Date: Sat Aug 31 05:37:38 2019 -0300 media: rtl28xxu: set keymap for Astrometa DVB-T2 Thanks to Jan Pieter van Woerkom for providing the hardware. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit cf330691668a3bee37b8ac8212709b3ccdd87997 Author: Flavius Georgescu Date: Fri Sep 20 13:11:39 2019 -0300 media: rc: Add support for another iMON 0xffdc device The device it's an iMON UltraBay (0x98 in config byte) with LCD, IR and dual-knobs front panel. To work properly the device also require its own key table, and repeat suppression for all buttons. Signed-off-by: Flavius Georgescu Co-developed-by: Chris Vandomelen Signed-off-by: Chris Vandomelen Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit e43148645d18efc3072b1ba45afaa3f385299e55 Author: A Sun Date: Fri Sep 6 09:17:20 2019 -0300 media: mceusb: fix out of bounds read in MCE receiver buffer Fix multiple cases of out of bounds (OOB) read associated with MCE device receive/input data handling. In reference for the OOB cases below, the incoming/read (byte) data format when the MCE device responds to a command is: { cmd_prefix, subcmd, data0, data1, ... } where cmd_prefix are: MCE_CMD_PORT_SYS MCE_CMD_PORT_IR and subcmd examples are: MCE_RSP_GETPORTSTATUS MCE_RSP_EQIRNUMPORTS ... Response size dynamically depends on cmd_prefix and subcmd. So data0, data1, ... may or may not be present on input. Multiple responses may return in a single receiver buffer. The trigger condition for OOB read is typically random or corrupt input data that fills the mceusb receiver buffer. Case 1: mceusb_handle_command() reads data0 (var hi) and data1 (var lo) regardless of whether the response includes such data. If { cmd_prefix, subcmd } is at the end of the receiver buffer, read past end of buffer occurs. This case was reported by KASAN: slab-out-of-bounds Read in mceusb_dev_recv https://syzkaller.appspot.com/bug?extid=c7fdb6cb36e65f2fe8c9 Fix: In mceusb_handle_command(), change variable hi and lo to pointers, and dereference only when required. Case 2: If response with data is truncated at end of buffer after { cmd_prefix, subcmd }, mceusb_handle_command() reads past end of buffer for data0, data1, ... Fix: In mceusb_process_ir_data(), check response size with remaining buffer size before invoking mceusb_handle_command(). + if (i + ir->rem < buf_len) mceusb_handle_command(ir, &ir->buf_in[i - 1]); Case 3: mceusb_handle_command() handles invalid/bad response such as { 0x??, MCE_RSP_GETPORTSTATUS } of length 2 as a response { MCE_CMD_PORT_SYS, MCE_RSP_GETPORTSTATUS, data0, ... } of length 7. Read OOB occurs for non-existent data0, data1, ... Cause is mceusb_handle_command() does not check cmd_prefix value. Fix: mceusb_handle_command() must test both cmd_prefix and subcmd. Case 4: mceusb_process_ir_data() receiver parser state SUBCMD is possible at start (i=0) of receiver buffer resulting in buffer offset=-1 passed to mceusb_dev_printdata(). Bad offset results in OOB read before start of buffer. [1214218.580308] mceusb 1-1.3:1.0: rx data[0]: 00 80 (length=2) [1214218.580323] mceusb 1-1.3:1.0: Unknown command 0x00 0x80 ... [1214218.580406] mceusb 1-1.3:1.0: rx data[14]: 7f 7f (length=2) [1214218.679311] mceusb 1-1.3:1.0: rx data[-1]: 80 90 (length=2) [1214218.679325] mceusb 1-1.3:1.0: End of raw IR data [1214218.679340] mceusb 1-1.3:1.0: rx data[1]: 7f 7f (length=2) Fix: If parser_state is SUBCMD after processing receiver buffer, reset parser_state to CMD_HEADER. In effect, discard cmd_prefix at end of receiver buffer. In mceusb_dev_printdata(), abort if buffer offset is out of bounds. Case 5: If response with data is truncated at end of buffer after { cmd_prefix, subcmd }, mceusb_dev_printdata() reads past end of buffer for data0, data1, ... while decoding the response to print out. Fix: In mceusb_dev_printdata(), remove unneeded buffer offset adjustments (var start and var skip) associated with MCE gen1 header. Test for truncated MCE cmd response (compare offset+len with buf_len) and skip decoding of incomplete response. Move IR data tracing to execute before the truncation test. Signed-off-by: A Sun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit e772cd8c9c9cd3d08715800aabaf50b771b395d9 Author: Thomas Meyer Date: Sun Oct 6 16:07:45 2019 +0200 staging: wlan-ng: p80211wep.c: use lib/crc32 Use lib/crc32 instead of another implementation. Signed-off-by: Thomas Meyer Link: https://lore.kernel.org/r/20191006140745.9952-1-thomas@m3y3r.de Signed-off-by: Greg Kroah-Hartman commit d4fbce956db1207a1ad625db1f4e922c7b73808b Author: Hariprasad Kelam Date: Sun Oct 6 14:46:21 2019 +0530 staging: vc04_services: make use of devm_platform_ioremap_resource fix below issue reported by coccicheck drivers/staging//vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:139 WARNING: Use devm_platform_ioremap_resource for g_regs Signed-off-by: Hariprasad Kelam Link: https://lore.kernel.org/r/1570353394-9991-1-git-send-email-hariprasad.kelam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81bab3fa6ca857b4d3af729f931e57e6bdc60186 Author: Sean Young Date: Fri Aug 23 08:28:02 2019 -0300 media: rc: increase rc-mm tolerance and add debug message Decoding often fails on e.g. redrat3 devices. The dev_dbg() helps with debugging when decoding does fail. Cc: Patrick Lerda Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit ce819649b03d932dc19b0cb6be513779bf64fad3 Author: Sean Young Date: Sat Sep 28 17:46:14 2019 -0300 media: rc: mark input device as pointing stick libinput refuses pointer movement from rc-core, since it believes it's not a pointer-type device: libinput error: event17 - Media Center Ed. eHome Infrared Remote Transceiver (1784:0008): libinput bug: REL_X/Y from a non-pointer device Fixes: 158bc148a31e ("media: rc: mce_kbd: input events via rc-core's input device") Fixes: 0ac5a603a732 ("media: rc: imon: report mouse events using rc-core's input device") Cc: stable@vger.kernel.org # 4.20+ Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6bf33ca2a9adfddc53c2146b40cfbed8145d6f54 Author: Sean Young Date: Wed Sep 25 11:59:51 2019 -0300 media: delete unused proc_fs.h include procfs is no longer used anywhere in media. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit f342e258085bde61696bd64505f7551829647934 Author: zhengbin Date: Sun Oct 6 17:09:59 2019 +0800 staging: rtl8723bs: Remove set but not used variable 'adapter' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/core/rtw_mlme.c: In function rtw_select_roaming_candidate: drivers/staging/rtl8723bs/core/rtw_mlme.c:2007:18: warning: variable adapter set but not used [-Wunused-but-set-variable] It is not used since commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570352999-45790-6-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 0fd1dc1ea477942fe1354fc49578dc3906dbd354 Author: zhengbin Date: Sun Oct 6 17:09:58 2019 +0800 staging: rtl8723bs: Remove set but not used variables 'ppp', 'type', 'data' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/core/rtw_recv.c: In function validate_80211w_mgmt: drivers/staging/rtl8723bs/core/rtw_recv.c:1415:8: warning: variable ppp set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/core/rtw_recv.c: In function validate_80211w_mgmt: drivers/staging/rtl8723bs/core/rtw_recv.c:1403:5: warning: variable type set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/core/rtw_recv.c: In function recvframe_defrag: drivers/staging/rtl8723bs/core/rtw_recv.c:1713:6: warning: variable data set but not used [-Wunused-but-set-variable] They are not used since commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570352999-45790-5-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit d34befc134d14c2ca8f69f62be1e6225f8fae738 Author: zhengbin Date: Sun Oct 6 17:09:57 2019 +0800 staging: rtl8723bs: Remove set but not used variable 'prwskeylen' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/core/rtw_security.c: In function rtw_tkip_encrypt: drivers/staging/rtl8723bs/core/rtw_security.c:660:6: warning: variable prwskeylen set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/core/rtw_security.c: In function rtw_tkip_decrypt: drivers/staging/rtl8723bs/core/rtw_security.c:768:6: warning: variable prwskeylen set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/core/rtw_security.c: In function rtw_aes_encrypt: drivers/staging/rtl8723bs/core/rtw_security.c:1528:6: warning: variable prwskeylen set but not used [-Wunused-but-set-variable] It is not used since commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570352999-45790-4-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 4ccb5b0bc3e8fb36db931c42a47cf29d20ada427 Author: zhengbin Date: Sun Oct 6 17:09:56 2019 +0800 staging: rtl8723bs: Remove set but not used variable 'tmp_aid' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/core/rtw_sta_mgt.c: In function rtw_alloc_stainfo: drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:190:7: warning: variable tmp_aid set but not used [-Wunused-but-set-variable] It is not used since commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570352999-45790-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit ae5f973759e122e7c98dc06d00d71401fa0d1580 Author: Sean Young Date: Wed Sep 25 10:53:30 2019 -0300 media: saa7164: use debugfs rather than procfs for debugging file This moves /proc/saa7164 to /sys/kernel/debug/saa7164. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 402bd53e964f60ef9ef87eb3c210e161dd039f80 Author: Gabriela Bittencourt Date: Sun Oct 6 21:39:02 2019 -0300 staging: rtl8712: align arguments with open parenthesis in file rtl8712_led.c Cleans up checks of "Alignment should match open parenthesis" Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191007003902.21911-1-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3dbcdf183b3292c04db7c2e0401e090950acd575 Author: Javier F. Arias Date: Sun Oct 6 22:32:05 2019 -0500 staging: rtl8723bs: Switch constant place in test Switch constant place as it should be on the right side of the test. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/20191007033202.45czxuochtylkddf@gmail.com Signed-off-by: Greg Kroah-Hartman commit 164eec46ea9967a968e6a5950041ac9a48f2200b Author: Gabriela Bittencourt Date: Sun Oct 6 16:40:30 2019 -0300 staging: vt6656: reorganize characters so the lines are under 80 ch Cleans up warnings of "line over 80 characters" Signed-off-by: Gabriela Bittencourt Link: https://lore.kernel.org/r/20191006194030.8854-1-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6d9a930cd9aaf054d50119955a62cb234e2a3e23 Author: Javier F. Arias Date: Sun Oct 6 18:03:30 2019 -0500 staging: rtl8723bs: Remove unnecessary braces Remove braces that are not necessary for any arm of this statement. Issue found by checkpatch. Signed-off-by: Javier F. Arias Link: https://lore.kernel.org/r/20191006230327.GA4168@gmail.com Signed-off-by: Greg Kroah-Hartman commit f3c3f2d43484b387e2d54bfcb6283755d0f581d9 Author: Gabriela Bittencourt Date: Sun Oct 6 16:58:54 2019 -0300 staging: vt6656: remove duplicated blank line Cleans up checks of "don't use multiple blank line" Signed-off-by: Gabriela Bittencourt Reviewed-by: Quentin Deslandes Link: https://lore.kernel.org/r/20191006195854.9843-1-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman commit b483b4e4d3f6bfd5089b9e6dc9ba259879c6ce6f Author: Sergio Paracuellos Date: Sun Oct 6 20:10:32 2019 +0200 staging: mt7621-pci: add quirks for 'E2' revision using 'soc_device_attribute' Depending on revision of the chip, reset lines are inverted. Make code more readable making use of 'soc_device_match' in driver probe function. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20191006181032.19112-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit d8a363ef0046ddef23c0b3350af7fdb85b296749 Author: Sumera Priyadarsini Date: Sun Oct 6 16:23:00 2019 +0530 staging: rtl8192u: Fix indentation for cleaner code Fixes indentation for if condition in the file r8190_rtl8256.c for better readability as suggested by Dan Carpenter. Reported-by: Dan Carpenter Signed-off-by: Sumera Priyadarsini Link: https://lore.kernel.org/r/20191006105300.10181-1-sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman commit a5a5ec2538ab76fda4ec66f86adf0b80ef7c40bc Author: zhengbin Date: Sun Oct 6 17:33:02 2019 +0800 staging: rtl8723bs: Remove set but not used variable 'oldcnt' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/sdio_ops.c: In function sdio_read_port: drivers/staging/rtl8723bs/hal/sdio_ops.c:430:6: warning: variable oldcnt set but not used [-Wunused-but-set-variable] It is not used since commit dedf215bd1c7 ("staging: rtl8723bs: remove unused code") Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1570354382-86879-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit ea60b4eb4420ba59172a3283bf26192d609a114d Author: Michael Straube Date: Sat Oct 5 16:18:52 2019 +0200 staging: rtl8188eu: remove unnecessary asignment and initialization Variable badworden is asigned in two subsequent lines. So the first asignment is useless and not needed. Also the initialization to zero is not needed. Remove the first asignment and the initialization. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191005141852.88712-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit ef0abd6f24d3e935491f303f64d402dab5270c37 Author: Adham Abozaeid Date: Fri Oct 4 21:40:22 2019 +0000 staging: wilc1000: don't use wdev while setting tx power WILC doesn't support per-vif tx power, and hence, wdev will always be null in calls to set_tx_power. Instead, wiphy should be used to execute the operation Signed-off-by: Adham Abozaeid Link: https://lore.kernel.org/r/20191004214011.7623-1-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman commit bf653da8623178e84e185f8412d75ae644ce533b Author: Javier F. Arias Date: Sun Oct 6 08:30:19 2019 -0500 staging: rtl8723bs: Remove unnecessary braces Remove unnecessary braces for single statement block. Issue found by checkpatch. Signed-off-by: Javier F. Arias Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20191006133016.GA22297@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6db1aaf4d9735e04f6f310db6410d1dcf340a749 Author: Jernej Skrabec Date: Fri Oct 4 00:21:30 2019 +0200 arm64: dts: allwinner: a64: orangepi-win: Enable audio codec This patch enables internal audio codec on OrangePi Win board by enabling all relevant nodes and adding appropriate routing. Board has on-board microphone (MIC1) and 3.5 mm jack with stereo audio and microphone (MIC2). Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 3e84a18a259e1df35e5b549ab92ec3baf82ff010 Author: Neil Armstrong Date: Fri Oct 4 11:47:19 2019 -0300 media: meson/ao-cec: move cec_notifier_cec_adap_register after hw setup When probed after the HDMI notifier, calling cec_notifier_cec_adap_register() calls the enable() adapter callback, but the HW is not yet set up. Moving cec_notifier_cec_adap_register() right before cec_register_adapter() fixes the following crash: Ignoring spurious kernel translation fault at virtual address 0000000000000008 [...] Hardware name: Khadas VIM (DT) [...] pc : __do_kernel_fault+0xdc/0x120 lr : __do_kernel_fault+0xdc/0x120 [...] Call trace: __do_kernel_fault+0xdc/0x120 do_page_fault+0x180/0x458 do_translation_fault+0x64/0x70 do_mem_abort+0x3c/0x98 el1_da+0x20/0x94 meson_ao_cec_adap_enable+0x30/0x218 [ao_cec] __cec_s_phys_addr+0x184/0x270 cec_s_phys_addr+0x44/0x60 cec_notifier_cec_adap_register+0x68/0x90 meson_ao_cec_probe+0xb0/0x288 [ao_cec] [...] el0_svc_compat+0x8/0x10 Reported-by: Christian Hewitt Suggested-by: Hans Verkuil Fixes: 20958f9d5c48 ("media: meson/ao-cec: use cec_notifier_cec_adap_(un)register") Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b1d522443b4b000974e48f27d4ee77dbfc67962d Author: AngeloGioacchino Del Regno Date: Sat Oct 5 13:07:58 2019 +0200 soc: qcom: rpmpd: Add rpm power domains for msm8976 The MSM8956/76 SoCs have two main voltage-level power domains, VDD_CX and VDD_MX, which also have their own voltage-floor-level (VFL) corner. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Bjorn Andersson commit ac242e2cfd14f5be99fc2e6888702d02099d2f91 Author: Brian Masney Date: Sun Oct 6 21:45:07 2019 -0400 ARM: dts: qcom: pm8941: add 5vs2 regulator node pm8941 is missing the 5vs2 regulator node so let's add it since its needed to get the external display working. This regulator was already configured in the interrupts property on the parent node. Note that this regulator is referred to as mvs2 in the downstream MSM kernel sources. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij Signed-off-by: Bjorn Andersson commit 05949f63055fcf53947886ddb8e23c8a5d41bd80 Merge: a9eb048d5615 24f25763d6de Author: Alexei Starovoitov Date: Sun Oct 6 22:29:37 2019 -0700 Merge branch 'autogen-bpf-helpers' Andrii Nakryiko says: ==================== This patch set adds ability to auto-generate list of BPF helper definitions. It relies on existing scripts/bpf_helpers_doc.py and include/uapi/linux/bpf.h having a well-defined set of comments. bpf_helper_defs.h contains all BPF helper signatures which stay in sync with latest bpf.h UAPI. This auto-generated header is included from bpf_helpers.h, while all previously hand-written BPF helper definitions are simultaneously removed in patch #3. The end result is less manually maintained and redundant boilerplate code, while also more consistent and well-documented set of BPF helpers. Generated helper definitions are completely independent from a specific bpf.h on a target system, because it doesn't use BPF_FUNC_xxx enums. v3->v4: - instead of libbpf's Makefile, integrate with selftest/bpf's Makefile (Alexei); v2->v3: - delete bpf_helper_defs.h properly (Alexei); v1->v2: - add bpf_helper_defs.h to .gitignore and `make clean` (Alexei). ==================== Signed-off-by: Alexei Starovoitov commit 24f25763d6de229e8ada7616db76fd9ba83775e9 Author: Andrii Nakryiko Date: Sun Oct 6 20:07:38 2019 -0700 libbpf: auto-generate list of BPF helper definitions Get rid of list of BPF helpers in bpf_helpers.h (irony...) and auto-generate it into bpf_helpers_defs.h, which is now included from bpf_helpers.h. Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 7a387bed47f7e80e257d966cd64a3e92a63e26a1 Author: Andrii Nakryiko Date: Sun Oct 6 20:07:37 2019 -0700 scripts/bpf: teach bpf_helpers_doc.py to dump BPF helper definitions Enhance scripts/bpf_helpers_doc.py to emit C header with BPF helper definitions (to be included from libbpf's bpf_helpers.h). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 5f0e5412781b01708f622d00c0b3f77b9dca7367 Author: Andrii Nakryiko Date: Sun Oct 6 20:07:36 2019 -0700 uapi/bpf: fix helper docs Various small fixes to BPF helper documentation comments, enabling automatic header generation with a list of BPF helpers. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 41ee3b815a35afec8f03a3c7f3e5cf462725db62 Author: Yongqiang Niu Date: Thu Aug 29 22:50:27 2019 +0800 dt-bindings: mediatek: add mutex description for mt8183 display This patch add mutex description for mt8183 display Signed-off-by: Yongqiang Niu Acked-by: Rob Herring Signed-off-by: CK Hu commit 4df74719066788fb9ae9cf5385df02893b46bbbe Author: Yongqiang Niu Date: Thu Aug 29 22:50:26 2019 +0800 dt-bindings: mediatek: add dither description for mt8183 display Update device tree binding documention for the display subsystem for Mediatek MT8183 SOCs Signed-off-by: Yongqiang Niu Reviewed-by: Rob Herring Signed-off-by: CK Hu commit 6e031636d1f13905e225aa1be3b58d426ede2d90 Author: Yongqiang Niu Date: Thu Aug 29 22:50:25 2019 +0800 dt-bindings: mediatek: add ccorr description for mt8183 display Update device tree binding documention for the display subsystem for Mediatek MT8183 SOCs Signed-off-by: Yongqiang Niu Reviewed-by: Rob Herring Signed-off-by: CK Hu commit ccfcaa5234e5cdadc0c6db8da6e9c486bb248a26 Author: Yongqiang Niu Date: Thu Aug 29 22:50:24 2019 +0800 dt-bindings: mediatek: add ovl_2l description for mt8183 display Update device tree binding documention for the display subsystem for Mediatek MT8183 SOCs Signed-off-by: Yongqiang Niu Reviewed-by: Rob Herring Signed-off-by: CK Hu commit 75374fc2c152ef42c45c6bf716743d5f5bb6d24d Author: Jitao Shi Date: Thu Sep 19 14:58:06 2019 +0800 drm/mediatek: add dphy reset after setting lanes number Add dphy reset after setting lanes number to avoid dphy fifo effor. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit 2f501cc0b020b9d991128a70e26c84552121a31d Author: Jitao Shi Date: Sun Aug 11 18:40:08 2019 +0800 drm/mediatek: adjust dsi and mipi_tx probe sequence mtk_mipi_tx is the phy of mtk_dsi. mtk_dsi get the phy(mtk_mipi_tx) in probe(). So, mtk_mipi_tx init should be ahead of mtk_dsi. Or mtk_dsi will defer to wait mtk_mipi_tx probe done. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit 7a5bc4e22ecfd74dc3662342beaa909770a3b786 Author: Jitao Shi Date: Thu Sep 19 14:58:04 2019 +0800 drm/mediatek: change the dsi phytiming calculate method Change the method of frame rate calc which can get more accurate frame rate. data rate = pixel_clock * bit_per_pixel / lanes Adjust hfp_wc to adapt the additional phy_data if MIPI_DSI_MODE_VIDEO_BURST hfp_wc = hfp * bpp - data_phy_cycles * lanes - 12 - 6; else hfp_wc = hfp * bpp - data_phy_cycles * lanes - 12; Note: //(2: 1 for sync, 1 for phy idle) data_phy_cycles = T_hs_exit + T_lpx + T_hs_prepare + T_hs_zero + 2; bpp: bit per pixel Signed-off-by: Jitao Shi Tested-by: Ryan Case Signed-off-by: CK Hu commit e249e3e86b33386738e1ce4a37374aaea019a7e0 Author: Jitao Shi Date: Sun Aug 11 18:40:06 2019 +0800 drm/mediatek: add mt8183 dsi driver support Add mt8183 dsi driver data. Enable size control and reg commit control. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit 7bf54afec961504d9618074539ec9ae2b8de8554 Author: Jitao Shi Date: Sun Aug 11 18:40:05 2019 +0800 drm/mediatek: add frame size control Our new DSI chip has frame size control. So add the driver data to control for different chips. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit 3c6bd94d32c45d47a0fce49e9cd64d72ff612bb5 Author: Jitao Shi Date: Sun Aug 11 18:40:04 2019 +0800 drm/mediatek: add dsi reg commit disable control New DSI IP has shadow register and working reg. The register values are writen to shadow register. And then trigger with commit reg, the register values will be moved working register. This function is default on. But this driver doesn't use this function. So add the disable control. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit 89d0e3f8825822ca20f3af2d61e5e1e6df4c2476 Author: Jitao Shi Date: Thu Sep 19 14:58:00 2019 +0800 drm/mediatek: replace writeb() with mtk_dsi_mask() The writeb() is unavailable in mt8173. Because the mt8173 dsi module doesn't support 8bit mode access. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit bb6bc2982a28d5d8e83c3bf0887949be1cc6bb5d Author: Jitao Shi Date: Thu Sep 19 14:57:59 2019 +0800 drm/mediatek: fixes CMDQ reg address of mt8173 is different with mt2701 Config the different CMDQ reg address in driver data. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit b3218e74367aacefeb4975bd0b69c8cb897bcb6a Author: Jitao Shi Date: Sun Aug 11 18:40:02 2019 +0800 drm/mediatek: move mipi_dsi_host_register to probe DSI panel driver need attach function which is include in mipi_dsi_host_ops. If mipi_dsi_host_register is not in probe, dsi panel will probe more delay. So move the mipi_dsi_host_register to probe from bind. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit efda51a58b4ae8a0584dc785e0ef24a71677503c Author: Jitao Shi Date: Wed Aug 7 16:46:45 2019 +0800 drm/mediatek: add mipi_tx driver for mt8183 This patch add mt8183 mipi_tx driver. And also support other chips that use the same binding and driver. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit 78e01a8d0f4662a9de4ef21bff254bf4f833d05a Author: Jitao Shi Date: Wed Aug 7 16:46:44 2019 +0800 drm/mediatek: separate mipi_tx to different file Different IC has different mipi_tx setting of dsi. This patch separates the mipi_tx hardware relate part for mt8173. Signed-off-by: Jitao Shi Signed-off-by: CK Hu commit f92013259d32c903d360039ff26a659f8f1552f5 Author: Jitao Shi Date: Wed Aug 7 16:46:43 2019 +0800 dt-bindings: display: mediatek: update dsi supported chips Update device tree binding documentation for the dsi for Mediatek MT8183 SoCs. Signed-off-by: Jitao Shi Acked-by: Rob Herring Signed-off-by: CK Hu commit 82e8d723e9e6698572098bf2976223d5069b34b5 Author: Krzysztof Kozlowski Date: Fri Oct 4 16:49:31 2019 +0200 sound: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Brown Link: https://lore.kernel.org/r/20191004144931.3851-1-krzk@kernel.org Signed-off-by: Takashi Iwai commit 09ef18bcd5ac6c2213cedd20f4f8cad08bbe3d74 Author: YueHaibing Date: Sun Oct 6 18:29:20 2019 +0800 rtc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191006102953.57536-2-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-3-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-4-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-5-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-6-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-7-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-8-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-9-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-10-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-11-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-12-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-13-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-14-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-15-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-16-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-17-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-18-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-19-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-20-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-21-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-22-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-23-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-24-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-25-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-26-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-27-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-28-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-29-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-30-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-31-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-32-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-33-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-34-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20191006102953.57536-35-yuehaibing@huawei.com Signed-off-by: Alexandre Belloni commit 89576bebbc175711af20107d5484a487ef969cf0 Author: Markus Elfring Date: Sat Sep 21 11:49:01 2019 +0200 rtc: Use devm_platform_ioremap_resource() Simplify probe by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/4552ef52-f218-93b1-6dfa-668d137676f8@web.de Link: https://lore.kernel.org/r/5ecfcf43-d6b2-1a38-dee8-b8806f30bc83@web.de Link: https://lore.kernel.org/r/25448e11-c43f-9ae0-4c43-6f789accc026@web.de Reviewed-by: Akinobu Mita Link: https://lore.kernel.org/r/8c17a59c-82ff-aa6b-5653-a38d786d3e83@web.de Signed-off-by: Alexandre Belloni commit 056ddc38e94105a7ee982ca06cc19448fc927f6f Merge: 04c1b4c70de9 dc07f5fdef9b Author: David S. Miller Date: Sun Oct 6 18:46:31 2019 +0200 Merge branch 'stmmac-next' Jose Abreu says: ==================== net: stmmac: Improvements for -next Improvements for -next. More info in commit logs. ==================== Signed-off-by: David S. Miller commit dc07f5fdef9bbd6981800904551d86c8ffc3c993 Author: Jose Abreu Date: Sun Oct 6 13:17:14 2019 +0200 net: stmmac: Implement L3/L4 Filters in GMAC4+ GMAC4+ cores support Layer 3 and Layer 4 filtering. Add the corresponding callbacks in these cores. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 1b2250a04c1f85253bd593bf28ddb48d396da7c6 Author: Jose Abreu Date: Sun Oct 6 13:17:13 2019 +0200 net: stmmac: selftests: Add tests for VLAN Perfect Filtering Add two new tests for VLAN Perfect Filtering. While at it, increase a little bit the tests strings lenght so that we can have more descriptive test names. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit c7ab0b8088d7f023f543013963f23aecc7e47efb Author: Jose Abreu Date: Sun Oct 6 13:17:12 2019 +0200 net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available If VLAN Hash Filtering is not available we can fallback to perfect filtering instead. Let's implement this in XGMAC and GMAC cores and let the user use this filter. VLAN VID=0 always passes filter so we check if more than 2 VLANs are created and return proper error code if so because perfect filtering only supports 1 VID at a time. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 04c1b4c70de958c229fc3d63298b807909a6f31a Author: YueHaibing Date: Sun Oct 6 18:53:52 2019 +0800 nfc: s3fwrn5: fix platform_no_drv_owner.cocci warning Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit b4d5191371a9db53e527749c6cf3bd7f000aa6a2 Author: YueHaibing Date: Sun Oct 6 18:52:17 2019 +0800 nfc: nfcmrvl: fix platform_no_drv_owner.cocci warning Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 59d55789def92c504784295be7980d5e63c90896 Author: YueHaibing Date: Sun Oct 6 18:50:07 2019 +0800 net: dsa: ksz9477: fix platform_no_drv_owner.cocci warning Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit d131c5bb60123f29ed15dd2f829b6644c2deec87 Author: YueHaibing Date: Sun Oct 6 15:08:32 2019 +0800 net/rds: Add missing include file Fix build error: net/rds/ib_cm.c: In function rds_dma_hdrs_alloc: net/rds/ib_cm.c:475:13: error: implicit declaration of function dma_pool_zalloc; did you mean mempool_alloc? [-Werror=implicit-function-declaration] hdrs[i] = dma_pool_zalloc(pool, GFP_KERNEL, &hdr_daddrs[i]); ^~~~~~~~~~~~~~~ mempool_alloc net/rds/ib.c: In function rds_ib_dev_free: net/rds/ib.c:111:3: error: implicit declaration of function dma_pool_destroy; did you mean mempool_destroy? [-Werror=implicit-function-declaration] dma_pool_destroy(rds_ibdev->rid_hdrs_pool); ^~~~~~~~~~~~~~~~ mempool_destroy Reported-by: Hulk Robot Fixes: 9b17f5884be4 ("net/rds: Use DMA memory pool allocation for rds_header") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 54e02957f4d5ee204de5d8dde5fdc05a23cc30fe Merge: 0eb8516b8e9a 6935af8073a0 Author: David S. Miller Date: Sun Oct 6 18:31:40 2019 +0200 Merge branch 'mlxsw-Query-number-of-modules-from-firmware' Ido Schimmel says: ==================== mlxsw: Query number of modules from firmware Vadim says: The patchset adds support for a new field "num_of_modules" of Management General Peripheral Information Register (MGPIR), providing the maximum number of QSFP modules, which can be supported by the system. It allows to obtain the number of QSFP modules directly from this field, as a static data, instead of old method of getting this info through "network port to QSFP module" mapping. With the old method, in case of port dynamic re-configuration some modules can logically "disappear" as a result of port split operations, which can cause some modules to appear missing. Such scenario can happen on a system equipped with a BMC card, while PCI chip driver at host CPU side can perform some ports "split" or "unsplit" operations, while BMC side I2C chip driver reads the "port-to-module" mapping. Add common API for FW "minor" and "subminor" versions validation and share it between PCI and I2C based drivers. Add FW version validation for "minimal" driver, because use of new field "num_of_modules" in MGPIR register is not backward compatible. ==================== Signed-off-by: David S. Miller commit 6935af8073a02ffd11a7e495dc318c0a51e18012 Author: Vadim Pasternak Date: Sun Oct 6 09:34:52 2019 +0300 mlxsw: minimal: Add validation for FW version Add validation for FW version in order to prevent driver initialization in case FW version is older than expected. FW version validation is necessary, because use of a new field 'num_of_modules' in MGPIR register is not backward compatible. FW 'minor' and 'subminor' versions are expected to be greater than or equal to 2000 and 1886, respectively. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 762effaad63edca1d927bd6c98f21b870ee3f2a5 Author: Vadim Pasternak Date: Sun Oct 6 09:34:51 2019 +0300 mlxsw: core: Push minor/subminor fw version check into helper Add new API for FW "minor" and "subminor" version validation for sharing it between "spectrum" and "minimal" drivers. Use it in "spectrum" driver. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c5cb92d59b30229e22c286651640f55621586e84 Author: Vadim Pasternak Date: Sun Oct 6 09:34:50 2019 +0300 mlxsw: thermal: Provide optimization for QSFP modules number detection Use new field "num_of_modules" of MGPIR register for "thermal" interface in order to get the number of modules supported by system directly from the system configuration, instead of getting it from port to module mapping info. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ea30a92a4674eab955aee7bb8a017791f0e7d002 Author: Vadim Pasternak Date: Sun Oct 6 09:34:49 2019 +0300 mlxsw: hwmon: Provide optimization for QSFP modules number detection Use new field "num_of_modules" of MGPIR register for "hwmon" interface in order to get the number of modules supported by system directly from the system configuration, instead of getting it from port to module mapping info. Reading this info through MGPIR register is faster and does not depend on possible dynamic re-configuration of ports. In case of port dynamic re-configuration some modules can logically "disappear" as a result of port split and un-spilt operations, which can cause missing of some modules, in case this info is taken from port to module mapping info. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5cfa030a1c2cf70e2fb0815a74fab1b459bc2a2b Author: Vadim Pasternak Date: Sun Oct 6 09:34:48 2019 +0300 mlxsw: reg: Extend MGPIR register with new field exposing the number of QSFP modules Extend MGPIR - Management General Peripheral Information Register with new field "num_of_modules" exposing the number of modules supported by specific system. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0eb8516b8e9ad1ff11655750e993e0bb3b254a4a Merge: d44dc7413279 9278bc9f627d Author: David S. Miller Date: Sun Oct 6 18:28:42 2019 +0200 Merge branch 'netdevsim-allow-to-test-reload-failures' Jiri Pirko says: ==================== netdevsim: allow to test reload failures Allow user to test devlink reload failures: Fail to reload and fail during reload. ==================== Signed-off-by: David S. Miller commit 9278bc9f627dbc640825b00a166d6b9bf85107f3 Author: Jiri Pirko Date: Sun Oct 6 08:30:02 2019 +0200 selftests: test netdevsim reload forbid and fail Extend netdevsim reload test by simulation of failures. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 155ddfc5e54a68f0e8d20f31f2b4b6b25e1071b5 Author: Jiri Pirko Date: Sun Oct 6 08:30:01 2019 +0200 netdevsim: add couple of debugfs bools to debug devlink reload Add flag to disallow reload and another one that causes reload to always fail. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 41f277be1d028e64fb8d5e91a7ce74df600bde54 Author: Krzysztof Kozlowski Date: Wed Oct 2 19:44:01 2019 +0200 dt-bindings: memory-controllers: exynos5422-dmc: Correct example syntax and memory region After adding the interrupt properties to Exynos5422 DMC bindings example, the mapped memory region must be big enough to access performance counters registers. Fix also syntax errors (semicolons) and adjust indentation. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Lukasz Luba commit 56c126e87e2980d5e2ca5d77b28899f8521af9d7 Author: Krzysztof Kozlowski Date: Wed Oct 2 18:43:09 2019 +0200 ARM: dts: exynos: Rename SysRAM node to "sram" The device node name should reflect generic class of a device so rename the SysRAM node from "sysram" to "sram". The child nodes stay as before as "smp-sysram" to match their real purpose. This will be also in sync with upcoming DT schema. No functional change. Signed-off-by: Krzysztof Kozlowski commit e39fc20f1ec1335ce4fdf6c65aad0f15a9a5d31f Author: Krzysztof Kozlowski Date: Wed Oct 2 18:06:32 2019 +0200 ARM: dts: exynos: Rename power domain nodes to "power-domain" in Exynos4 The device node name should reflect generic class of a device so rename power domain nodes to "power-domain". No functional change. Signed-off-by: Krzysztof Kozlowski commit e386b228cad2e3dbba532a891dc084af8e7e702c Author: Sylwester Nawrocki Date: Wed Sep 4 10:49:51 2019 +0200 soc: samsung: chipid: Make exynos_chipid_early_init() static Add missing static qualifier to the chipid initcall function. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit d44dc741327906b6eaf9f69c626cfc48d13f7250 Merge: 248d45f1e193 ee85da535fe3 Author: David S. Miller Date: Sun Oct 6 15:44:47 2019 +0200 Merge branch 'net-genetlink-parse-attrs-for-dumpit-callback' Jiri Pirko says: ==================== net: genetlink: parse attrs for dumpit() callback In generic netlink, parsing attributes for doit() callback is already implemented. They are available in info->attrs. For dumpit() however, each user which is interested in attributes have to parse it manually. Even though the attributes may be (depending on flag) already validated (by parse function). Make usage of attributes in dumpit() more convenient and prepare info->attrs too. Patchset also make the existing users of genl_family_attrbuf() converted to use info->attrs and removes the helper. ==================== Signed-off-by: David S. Miller commit ee85da535fe30e02908d30ec6b8960c4a991cb2d Author: Jiri Pirko Date: Sat Oct 5 20:04:42 2019 +0200 devlink: have genetlink code to parse the attrs during dumpit Benefit from the fact that the generic netlink code can parse the attrs for dumpit op and avoid need to parse it in the op callback. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 265ecd4fa3f0ca43909f8b2cc0e519966f21b167 Author: Jiri Pirko Date: Sat Oct 5 20:04:41 2019 +0200 net: genetlink: remove unused genl_family_attrbuf() genl_family_attrbuf() function is no longer used by anyone, so remove it. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit c6c08614eb32d250612c9d2940e48951fb4ba325 Author: Jiri Pirko Date: Sat Oct 5 20:04:40 2019 +0200 net: tipc: allocate attrs locally instead of using genl_family_attrbuf in compat_dumpit() As this is the last user of genl_family_attrbuf, convert to allocate attrs locally and do it in a similar way this is done in compat_doit(). Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 057af70713445fad2459aa348c9c2c4ecf7db938 Author: Jiri Pirko Date: Sat Oct 5 20:04:39 2019 +0200 net: tipc: have genetlink code to parse the attrs during dumpit Benefit from the fact that the generic netlink code can parse the attrs for dumpit op and avoid need to parse it in the op callback. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 4495af31947bcc8886fe43737500f12729f7bdd9 Author: Jiri Pirko Date: Sat Oct 5 20:04:38 2019 +0200 net: nfc: have genetlink code to parse the attrs during dumpit Benefit from the fact that the generic netlink code can parse the attrs for dumpit op and avoid need to parse it in the op callback. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 75cdbdd089003cd53560ff87b690ae911fa7df8e Author: Jiri Pirko Date: Sat Oct 5 20:04:37 2019 +0200 net: ieee802154: have genetlink code to parse the attrs during dumpit Benefit from the fact that the generic netlink code can parse the attrs for dumpit op and avoid need to parse it in the op callback. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit bf813b0afeae2f012f0e527a526c1b78ca21ad82 Author: Jiri Pirko Date: Sat Oct 5 20:04:36 2019 +0200 net: genetlink: parse attrs and store in contect info struct during dumpit Extend the dumpit info struct for attrs. Instead of existing attribute validation do parse them and save in the info struct. Caller can benefit from this and does not have to do parse itself. In order to properly free attrs, genl_family pointer needs to be added to dumpit info struct as well. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit c10e6cf85e7d984a156052daeedaf20a1f38824f Author: Jiri Pirko Date: Sat Oct 5 20:04:35 2019 +0200 net: genetlink: push attrbuf allocation and parsing to a separate function To be re-usable by dumpit as well, push the code that is taking care of attrbuf allocation and parting from doit into separate function. Introduce a helper to free the buffer too. Check family->maxattr too before calling kfree() to be symmetrical with the allocation check. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 1927f41a22a05e3bc178fa47f7ce7be271fbc541 Author: Jiri Pirko Date: Sat Oct 5 20:04:34 2019 +0200 net: genetlink: introduce dump info struct to be available during dumpit op Currently the cb->data is taken by ops during non-parallel dumping. Introduce a new structure genl_dumpit_info and store the ops there. Distribute the info to both non-parallel and parallel dumping. Also add a helper genl_dumpit_info() to easily get the info structure in the dumpit callback from cb. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit be064defabeff1b9e7ab96d8b4245c12a86775a5 Author: Jiri Pirko Date: Sat Oct 5 20:04:33 2019 +0200 net: genetlink: push doit/dumpit code from genl_family_rcv_msg Currently the function genl_family_rcv_msg() is quite big. Since it is quite convenient, push code that is related to doit and dumpit ops into separate functions. Do small changes on the way, like rc/err unification, NULL check etc. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 248d45f1e1934f7849fbdc35ef1e57151cf063eb Author: Yi-Hung Wei Date: Fri Oct 4 09:26:44 2019 -0700 openvswitch: Allow attaching helper in later commit This patch allows to attach conntrack helper to a confirmed conntrack entry. Currently, we can only attach alg helper to a conntrack entry when it is in the unconfirmed state. This patch enables an use case that we can firstly commit a conntrack entry after it passed some initial conditions. After that the processing pipeline will further check a couple of packets to determine if the connection belongs to a particular application, and attach alg helper to the connection in a later stage. Signed-off-by: Yi-Hung Wei Signed-off-by: David S. Miller commit dd3fd317e2beb899cbffcf364de049b9f9a02db5 Author: kbuild test robot Date: Sun Oct 6 05:57:27 2019 +0800 usb: typec: hd3ss3220_irq() can be static Fixes: 1c48c759ef4b ("usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller") Signed-off-by: kbuild test robot Link: https://lore.kernel.org/r/20191005215727.qfypxoswkiyu45ak@332d0cec05f4 Signed-off-by: Greg Kroah-Hartman commit 2d8e0747e5ad10139b26e9f40c050089147f2f98 Author: Joakim Zhang Date: Mon Sep 16 08:29:56 2019 +0000 arm64: dts: imx8mn: add ddr pmu node Add ddr pmu node for i.MX8MN EVK board. Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 9bfcf1941302c471e8c8138b6b01f7b84d4f5ba4 Author: Jani Nikula Date: Fri Oct 4 15:20:19 2019 +0300 drm/i915: move gmbus setup down to intel_modeset_init() Pair the gmbus setup and teardown in the same layer. This also fixes the double gmbus teardown on the i915_driver_modeset_probe() error path. Move the gmbus setup a bit later in the sequence to make the follow-up refactoring easier, and to pinpoint any unexpected consequences of this change right here, instead of the later refactoring. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191004122019.12009-3-jani.nikula@intel.com commit 63bf8301aac492d4c5fdf7b0ec42b142c05080e3 Author: Jani Nikula Date: Fri Oct 4 15:20:18 2019 +0300 drm/i915: split out i915_switcheroo.[ch] from i915_drv.c Split out code related to vga switcheroo register/unregister and state handling from i915_drv.c into new i915_switcheroo.[ch] files. It's a bit difficult to draw the line how much to move to the new file from i915_drv.c, but it seemed to me keeping i915_suspend_switcheroo() and i915_resume_switcheroo() in place was the cleanest. No functional changes. Cc: Ville Syrjälä Cc: Chris Wilson Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191004122019.12009-2-jani.nikula@intel.com commit 7fd296024c3cd06773a1df712b2c50932aeea60b Author: Jani Nikula Date: Fri Oct 4 15:20:17 2019 +0300 drm/i915/vga: rename intel_vga_msr_write() to intel_vga_reset_io_mem() Rename the function per Ville's suggestion. No functional changes. Cc: Ville Syrjälä Suggested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191004122019.12009-1-jani.nikula@intel.com commit 06ed392d6cadc1eb90976721c4aa15219aac14bf Author: Anson Huang Date: Thu Sep 12 10:56:32 2019 +0800 ARM: dts: imx7d: Add opp-suspend property Add "opp-suspend" property for i.MX7D to make sure system suspend with max available opp. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo commit f7429d5c27b665de83bd555d6e6e102a51fdc7a5 Author: Anson Huang Date: Thu Sep 12 10:56:31 2019 +0800 ARM: dts: imx7d: Correct speed grading fuse settings The 800MHz opp speed grading fuse mask should be 0xd instead of 0xf according to fuse map definition: SPEED_GRADING[1:0] MHz 00 800 01 500 10 1000 11 1200 Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo commit 9404f2eadacbf97fac02fb62d0da0688c0eebc08 Author: Guido Günther Date: Wed Sep 11 19:40:35 2019 -0700 arm64: dts: imx8mq: Enable gpu passive throttling Temperature and hysteresis were picked after the CPU. Signed-off-by: Guido Günther Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo commit e52928e8d5c1c4837a0c6ec2068beea99defde8b Author: Fabio Estevam Date: Wed Sep 11 15:34:21 2019 -0300 ARM: dts: imx6qdl-gw551x: Do not use 'simple-audio-card,dai-link' According to Documentation/devicetree/bindings/sound/simple-card.txt the 'simple-audio-card,dai-link' may be omitted when the card has only one DAI link, which is the case here. Get rid of 'simple-audio-card,dai-link' in order to fix the following build warning with W=1: arch/arm/boot/dts/imx6qdl-gw551x.dtsi:109.32-121.5: Warning (unit_address_vs_reg): /sound-digital/simple-audio-card,dai-link@0: node has a unit name, but no reg property Cc: Tim Harvey Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 1105c8b5406c9f1abd6b36072ec7be59ee708e99 Author: Fabio Estevam Date: Wed Sep 11 15:34:20 2019 -0300 ARM: dts: imx6ul-phytec-phycore-som: Add missing unit name Pass the memory unit name in order to fix the following build warning with W=1: arch/arm/boot/dts/imx6ul-phytec-phycore-som.dtsi:23.9-26.4: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Cc: Stefan Riedmueller Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 16d46c5da66efbee3406b254de8de843dde4cbc0 Author: Fabio Estevam Date: Wed Sep 11 15:34:19 2019 -0300 ARM: dts: imx: Replace "simple-bus" with "simple-mfd" for anatop Replace "simple-bus" with "simple-mfd" for anatop node in order to fix the following build warnings with W=1: arch/arm/boot/dts/imx6sx.dtsi:603.31-616.7: Warning (simple_bus_reg): /soc/aips-bus@2000000/anatop@20c8000/regulator-1p1: missing or empty reg/ranges property arch/arm/boot/dts/imx6sx.dtsi:618.31-631.7: Warning (simple_bus_reg): /soc/aips-bus@2000000/anatop@20c8000/regulator-3p0: missing or empty reg/ranges property arch/arm/boot/dts/imx6sx.dtsi:633.31-646.7: Warning (simple_bus_reg): /soc/aips-bus@2000000/anatop@20c8000/regulator-2p5: missing or empty reg/ranges property arch/arm/boot/dts/imx6sx.dtsi:648.32-663.7: Warning (simple_bus_reg): /soc/aips-bus@2000000/anatop@20c8000/regulator-vddcore: missing or empty reg/ranges property arch/arm/boot/dts/imx6sx.dtsi:665.33-679.7: Warning (simple_bus_reg): /soc/aips-bus@2000000/anatop@20c8000/regulator-vddpcie: missing or empty reg/ranges property arch/arm/boot/dts/imx6sx.dtsi:681.31-696.7: Warning (simple_bus_reg): /soc/aips-bus@2000000/anatop@20c8000/regulator-vddsoc: missing or empty reg/ranges property Based on a patch from Marco Felsch for the imx6qdl.dtsi. Cc: Marco Felsch Signed-off-by: Fabio Estevam Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 2bad8c48859ce6daecab629c937cf62cda6e7c5c Author: Anson Huang Date: Wed Sep 11 10:24:47 2019 -0400 arm64: dts: imx8mn: Use "fsl,imx8mm-ocotp" as ocotp's fallback compatible Use "fsl,imx8mm-ocotp" as i.MX8MN ocotp's fallback compatible instead of "fsl,imx7d-ocotp" to support SoC UID read, as i.MX8MN reuses i.MX8MM's SoC ID driver. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit b09802a03f0390fc115bf4ce4683645dc9b090bd Author: Anson Huang Date: Wed Sep 11 10:24:46 2019 -0400 arm64: dts: imx8mm: Remove incorrect fallback compatible for ocotp Compared to i.MX7D, i.MX8MM has different ocotp layout, so it should NOT use "fsl,imx7d-ocotp" as ocotp's fallback compatible, remove it. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit df844a9a9448f9612ed53cc84962ce3cad48da0e Author: Anson Huang Date: Tue Sep 10 11:25:18 2019 -0400 arm64: dts: imx8mn: Enable cpu-idle driver Enable i.MX8MN cpu-idle using generic ARM cpu-idle driver, 2 states are supported, details as below: root@imx8mnevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/name WFI root@imx8mnevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/usage 3098 root@imx8mnevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state1/name cpu-pd-wait root@imx8mnevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state1/usage 3078 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit c4a212695ca44c1c0315bbce6b444153fda2623c Author: Anson Huang Date: Tue Sep 10 11:25:17 2019 -0400 arm64: dts: imx8mn: Add system counter node Add i.MX8MN system counter node to enable timer-imx-sysctr broadcast timer driver. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 23b80c2063f11aa5fb849ffc3c035fec228e5ba5 Author: Anson Huang Date: Tue Sep 10 10:39:19 2019 -0400 arm64: dts: imx8mn: Add "fsl,imx8mq-src" as src's fallback compatible i.MX8MN can reuse i.MX8MQ's src driver, add "fsl,imx8mq-src" as src's fallback compatible to enable it. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 4c2435a6572bf3c59dd86be31c223bf09a7e1e61 Author: Anson Huang Date: Tue Sep 3 09:27:57 2019 -0400 arm64: dts: imx8mn-ddr4-evk: Enable GPIO LED i.MX8MN DDR4 EVK board has a GPIO LED to indicate status, add support for it. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 0ae4fbc63c31fd318a7feb8590f0a05b250aa79e Author: Anson Huang Date: Fri Sep 6 09:34:06 2019 -0400 clk: imx8mn: Use common 1443X/1416X PLL clock structure Use common 1413X/1416X PLL clock structure to save a lot of duplicated code on i.MX8MN clock driver. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo commit 43cdaa1567ad3931fbde438853947d45238cc040 Author: Anson Huang Date: Fri Sep 6 09:34:05 2019 -0400 clk: imx8mm: Move 1443X/1416X PLL clock structure to common place Many i.MX8M SoCs use same 1443X/1416X PLL, such as i.MX8MM, i.MX8MN and later i.MX8M SoCs, moving these PLL definitions to pll14xx driver can save a lot of duplicated code on each platform. Meanwhile, no need to define PLL clock structure for every module which uses same type of PLL, e.g., audio/video/dram use 1443X PLL, arm/gpu/vpu/sys use 1416X PLL, define 2 PLL clock structure for each group is enough. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo commit a9eb048d5615152dc4b8aedb7e704a4e59bc2205 Author: Toke Høiland-Jørgensen Date: Fri Oct 4 17:34:44 2019 +0200 libbpf: Add cscope and tags targets to Makefile Using cscope and/or TAGS files for navigating the source code is useful. Add simple targets to the Makefile to generate the index files for both tools. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191004153444.1711278-1-toke@redhat.com commit b84fbfe2ceed14a3623739ba72a2c1f4db003f1e Merge: a53ba15d8199 928ca75e59d7 Author: Alexei Starovoitov Date: Sat Oct 5 18:09:48 2019 -0700 Merge branch 'libbpf-api' Andrii Nakryiko says: ==================== Add bpf_object__open_file() and bpf_object__open_mem() APIs that use a new approach to providing future-proof non-ABI-breaking API changes. It relies on APIs accepting optional self-describing "opts" struct, containing its own size, filled out and provided by potentially outdated (as well as newer-than-libbpf) user application. A set of internal helper macros (OPTS_VALID, OPTS_HAS, and OPTS_GET) streamline and simplify a graceful handling forward and backward compatibility for user applications dynamically linked against different versions of libbpf shared library. Users of libbpf are provided with convenience macro LIBBPF_OPTS that takes care of populating correct structure size and zero-initializes options struct, which helps avoid obscure issues of unitialized padding. Uninitialized padding in a struct might turn into garbage-populated new fields understood by future versions of libbpf. Patch #1 removes enforcement of kern_version in libbpf and always populates correct one on behalf of users. Patch #2 defines necessary infrastructure for options and two new open APIs relying on it. Patch #3 fixes bug in bpf_object__name(). Patch #4 switches two of test_progs' tests to use new APIs as a validation that they work as expected. v2->v3: - fix LIBBPF_OPTS() to ensure zero-initialization of padded bytes; - pass through name override and relaxed maps flag for open_file() (Toke); - fix bpf_object__name() to actually return object name; - don't bother parsing and verifying version section (John); v1->v2: - use better approach for tracking last field in opts struct; - convert few tests to new APIs for validation; - fix bug with using offsetof(last_field) instead of offsetofend(last_field). ==================== Signed-off-by: Alexei Starovoitov commit 928ca75e59d7cf10ad2c4b446c7b5d046e244027 Author: Andrii Nakryiko Date: Fri Oct 4 15:40:37 2019 -0700 selftests/bpf: switch tests to new bpf_object__open_{file, mem}() APIs Verify new bpf_object__open_mem() and bpf_object__open_file() APIs work as expected by switching test_attach_probe test to use embedded BPF object and bpf_object__open_mem() and test_reference_tracking to bpf_object__open_file(). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit c9e4c3010c8c98aa867fce386ee459a32c00a487 Author: Andrii Nakryiko Date: Fri Oct 4 15:40:36 2019 -0700 libbpf: fix bpf_object__name() to actually return object name bpf_object__name() was returning file path, not name. Fix this. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 2ce8450ef5a381e5ffeb4682c0093a3ab5d07008 Author: Andrii Nakryiko Date: Fri Oct 4 15:40:35 2019 -0700 libbpf: add bpf_object__open_{file, mem} w/ extensible opts Add new set of bpf_object__open APIs using new approach to optional parameters extensibility allowing simpler ABI compatibility approach. This patch demonstrates an approach to implementing libbpf APIs that makes it easy to extend existing APIs with extra optional parameters in such a way, that ABI compatibility is preserved without having to do symbol versioning and generating lots of boilerplate code to handle it. To facilitate succinct code for working with options, add OPTS_VALID, OPTS_HAS, and OPTS_GET macros that hide all the NULL, size, and zero checks. Additionally, newly added libbpf APIs are encouraged to follow similar pattern of having all mandatory parameters as formal function parameters and always have optional (NULL-able) xxx_opts struct, which should always have real struct size as a first field and the rest would be optional parameters added over time, which tune the behavior of existing API, if specified by user. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 5e61f27070292d4ad3af51dc68eebab6c1df69d3 Author: Andrii Nakryiko Date: Fri Oct 4 15:40:34 2019 -0700 libbpf: stop enforcing kern_version, populate it for users Kernel version enforcement for kprobes/kretprobes was removed from 5.0 kernel in 6c4fc209fcf9 ("bpf: remove useless version check for prog load"). Since then, BPF programs were specifying SEC("version") just to please libbpf. We should stop enforcing this in libbpf, if even kernel doesn't care. Furthermore, libbpf now will pre-populate current kernel version of the host system, in case we are still running on old kernel. This patch also removes __bpf_object__open_xattr from libbpf.h, as nothing in libbpf is relying on having it in that header. That function was never exported as LIBBPF_API and even name suggests its internal version. So this should be safe to remove, as it doesn't break ABI. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 094234fcf46146339caaac8282aa15d225a5911a Author: Leonard Crestez Date: Wed Sep 4 12:49:18 2019 +0300 clk: imx: pll14xx: Fix quick switch of S/K parameter The PLL14xx on imx8m can change the S and K parameter without requiring a reset and relock of the whole PLL. Fix clk_pll144xx_mp_change register reading and use it for pll1443 as well since no reset+relock is required on K changes either. Signed-off-by: Leonard Crestez Fixes: 8646d4dcc7fb ("clk: imx: Add PLLs driver for imx8mm soc") Signed-off-by: Shawn Guo commit a53ba15d81995868651dd28a85d8045aef3d4e20 Author: Andrii Nakryiko Date: Thu Oct 3 21:02:11 2019 -0700 libbpf: Fix BTF-defined map's __type macro handling of arrays Due to a quirky C syntax of declaring pointers to array or function prototype, existing __type() macro doesn't work with map key/value types that are array or function prototype. One has to create a typedef first and use it to specify key/value type for a BPF map. By using typeof(), pointer to type is now handled uniformly for all kinds of types. Convert one of self-tests as a demonstration. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191004040211.2434033-1-andriin@fb.com commit cf0fd404455ce13850cc15423a3c2958933de384 Author: Leonard Crestez Date: Wed Sep 4 10:54:58 2019 +0300 firmware: imx: warn on unexpected RX The imx_scu_call_rpc function returns the result inside the same "msg" struct containing the transmitted message. This is implemented by holding a pointer to msg (which is usually on the stack) in sc_imx_rpc and writing to it from imx_scu_rx_callback. This means that if the have_resp parameter is incorrect or SCU sends an unexpected response for any reason the most likely result is kernel stack corruption. Fix this by only setting sc_imx_rpc.msg for the duration of the imx_scu_call_rpc call and warning in imx_scu_rx_callback if unset. Print the unexpected response data to help debugging. Signed-off-by: Leonard Crestez Acked-by: Anson Huang Signed-off-by: Shawn Guo commit fbe3d0c77c83722d7f1c00924e0ed39df2d1d041 Merge: 128d23c3a831 c04d71b5b287 Author: David S. Miller Date: Sat Oct 5 16:34:15 2019 -0700 Merge branch 'create-netdevsim-instances-in-namespace' Jiri Pirko says: ==================== create netdevsim instances in namespace Allow user to create netdevsim devlink and netdevice instances in a network namespace according to the namespace where the user resides in. Add a selftest to test this. ==================== Signed-off-by: David S. Miller commit c04d71b5b287aa7cc5ff707d23f5fb66307c11c7 Author: Jiri Pirko Date: Sat Oct 5 08:10:33 2019 +0200 selftests: test creating netdevsim inside network namespace Add a test that creates netdevsim instance inside network namespace and verifies that the related devlink instance and port netdevices reside in the namespace. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 7b60027bbc6738b067bb9ed732a8c56b0ac430b2 Author: Jiri Pirko Date: Sat Oct 5 08:10:32 2019 +0200 netdevsim: create devlink and netdev instances in namespace When user does create new netdevsim instance using sysfs bus file, create the devlink instance and related netdev instance in the namespace of the caller. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 8273fd845447820c26b38821c8ac297f40a65260 Author: Jiri Pirko Date: Sat Oct 5 08:10:31 2019 +0200 net: devlink: export devlink net setter For newly allocated devlink instance allow drivers to set net struct Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 128d23c3a8317fc91bb8481f51faf16f5bd155f5 Merge: 6f4c930e0235 a4d26fdbc2a5 Author: David S. Miller Date: Sat Oct 5 16:29:01 2019 -0700 Merge branch 'net-tls-add-ctrl-path-tracing-and-statistics' Jakub Kicinski says: ==================== net/tls: add ctrl path tracing and statistics This set adds trace events related to TLS offload and basic MIB stats for TLS. First patch contains the TLS offload related trace points. Those are helpful in troubleshooting offload issues, especially around the resync paths. Second patch adds a tracepoint to the fastpath of device offload, it's separated out in case there will be objections to adding fast path tracepoints. Again, it's quite useful for debugging offload issues. Next four patches add MIB statistics. The statistics are implemented as per-cpu per-netns counters. Since there are currently no fast path statistics we could move to atomic variables. Per-CPU seem more common. Most basic statistics are number of created and live sessions, broken out to offloaded and non-offloaded. Users seem to like those a lot. Next there is a statistic for decryption errors. These are primarily useful for device offload debug, in normal deployments decryption errors should not be common. Last but not least a counter for device RX resync. ==================== Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit a4d26fdbc2a5414bb1b67198656cc7e24a4a3c3a Author: Jakub Kicinski Date: Fri Oct 4 16:19:27 2019 -0700 net/tls: add TlsDeviceRxResync statistic Add a statistic for number of RX resyncs sent down to the NIC. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5c5ec66858062a857cf51f57cbe52b36330f7ae6 Author: Jakub Kicinski Date: Fri Oct 4 16:19:26 2019 -0700 net/tls: add TlsDecryptError stat Add a statistic for TLS record decryption errors. Since devices are supposed to pass records as-is when they encounter errors this statistic will count bad records in both pure software and inline crypto configurations. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit b32fd3cc31d723bf2ab859667be3612c0086ec72 Author: Jakub Kicinski Date: Fri Oct 4 16:19:25 2019 -0700 net/tls: add statistics for installed sessions Add SNMP stats for number of sockets with successfully installed sessions. Break them down to software and hardware ones. Note that if hardware offload fails stack uses software implementation, and counts the session appropriately. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit d26b698dd3cd52f5a3277446a87e5e0198c99cd0 Author: Jakub Kicinski Date: Fri Oct 4 16:19:24 2019 -0700 net/tls: add skeleton of MIB statistics Add a skeleton structure for adding TLS statistics. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9ec1c6ac27640f6a65378f11e433baa4ece12a28 Author: Jakub Kicinski Date: Fri Oct 4 16:19:23 2019 -0700 net/tls: add device decrypted trace point Add a tracepoint to the TLS offload's fast path. This tracepoint can be used to track the decrypted and encrypted status of received records. Records decrypted by the device should have decrypted set to 1, records which have neither decrypted nor decrypted set are partially decrypted, require re-encryption and therefore are most expensive to deal with. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8538d29cea9530f114159e06bfa31b2358161493 Author: Jakub Kicinski Date: Fri Oct 4 16:19:22 2019 -0700 net/tls: add tracing for device/offload events Add tracing of device-related interaction to aid performance analysis, especially around resync: tls:tls_device_offload_set tls:tls_device_rx_resync_send tls:tls_device_rx_resync_nh_schedule tls:tls_device_rx_resync_nh_delay tls:tls_device_tx_resync_req tls:tls_device_tx_resync_send Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6f4c930e02355664d89c976eccea5d999a90de16 Merge: 26e010555086 2d00aee21a5d Author: David S. Miller Date: Sat Oct 5 13:37:23 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net commit c58a80170169305f7a088e8ebb61231e3095b5cd Author: Alan Stern Date: Tue Oct 1 13:40:19 2019 -0400 tools/memory-model/Documentation: Add plain accesses and data races to explanation.txt This patch updates the Linux Kernel Memory Model's explanation.txt file by adding a section devoted to the model's handling of plain accesses and data-race detection. Signed-off-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit ddc82999f02580f93f9be2b8fb3b10f6139fb281 Author: Alan Stern Date: Tue Oct 1 13:40:11 2019 -0400 tools/memory-model/Documentation: Put redefinition of rcu-fence into explanation.txt This patch updates the Linux Kernel Memory Model's explanation.txt file to incorporate the introduction of the rcu-order relation and the redefinition of rcu-fence made by commit 15aa25cbf0cc ("tools/memory-model: Change definition of rcu-fence"). Signed-off-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit 3321ea12907abd477ff7e9bf5f365524b8f1f2fc Author: Alan Stern Date: Tue Oct 1 13:39:47 2019 -0400 tools/memory-model/Documentation: Fix typos in explanation.txt This patch fixes a few minor typos and improves word usage in a few places in the Linux Kernel Memory Model's explanation.txt file. Signed-off-by: Alan Stern Reviewed-by: Joel Fernandes (Google) Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit daebf24a8e8c6064cba3a330db9fe9376a137d2c Author: Alan Stern Date: Fri Sep 6 16:57:22 2019 -0400 tools/memory-model: Fix data race detection for unordered store and load Currently the Linux Kernel Memory Model gives an incorrect response for the following litmus test: C plain-WWC {} P0(int *x) { WRITE_ONCE(*x, 2); } P1(int *x, int *y) { int r1; int r2; int r3; r1 = READ_ONCE(*x); if (r1 == 2) { smp_rmb(); r2 = *x; } smp_rmb(); r3 = READ_ONCE(*x); WRITE_ONCE(*y, r3 - 1); } P2(int *x, int *y) { int r4; r4 = READ_ONCE(*y); if (r4 > 0) WRITE_ONCE(*x, 1); } exists (x=2 /\ 1:r2=2 /\ 2:r4=1) The memory model says that the plain read of *x in P1 races with the WRITE_ONCE(*x) in P2. The problem is that we have a write W and a read R related by neither fre or rfe, but rather W ->coe W' ->rfe R, where W' is an intermediate write (the WRITE_ONCE() in P0). In this situation there is no particular ordering between W and R, so either a wr-vis link from W to R or an rw-xbstar link from R to W would prove that the accesses aren't concurrent. But the LKMM only looks for a wr-vis link, which is equivalent to assuming that W must execute before R. This is not necessarily true on non-multicopy-atomic systems, as the WWC pattern demonstrates. This patch changes the LKMM to accept either a wr-vis or a reverse rw-xbstar link as a proof of non-concurrency. Signed-off-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit 67d64918a163fd62cf3b668d69133b723c48ed96 Author: Wolfgang M. Reimer Date: Mon Sep 16 16:54:04 2019 +0200 locking: locktorture: Do not include rwlock.h directly Including rwlock.h directly will cause kernel builds to fail if CONFIG_PREEMPT_RT is defined. The correct header file (rwlock_rt.h OR rwlock.h) will be included by spinlock.h which is included by locktorture.c anyway. Remove the include of linux/rwlock.h. Signed-off-by: Wolfgang M. Reimer Signed-off-by: Sebastian Andrzej Siewior Acked-by: Davidlohr Bueso Signed-off-by: Paul E. McKenney commit fbbd5e358cecb5fa490550ace66463517a7577e8 Author: Paul E. McKenney Date: Thu Aug 15 11:43:53 2019 -0700 rcutorture: Make in-kernel-loop testing more brutal The rcu_torture_fwd_prog_nr() tests the ability of RCU to tolerate in-kernel busy loops. It invokes rcu_torture_fwd_prog_cond_resched() within its delay loop, which, in PREEMPT && NO_HZ_FULL kernels results in the occasional direct call to schedule(). Now, this direct call to schedule() is appropriate for call_rcu() flood testing, in which either the kernel should restrain itself or userspace transitions will supply the needed restraint. But in pure in-kernel loops, the occasional cond_resched() should do the job. This commit therefore makes rcu_torture_fwd_prog_nr() use cond_resched() instead of rcu_torture_fwd_prog_cond_resched() in order to increase the brutality of this aspect of rcutorture testing. Signed-off-by: Paul E. McKenney commit 8b5ddf8b99dc42241d1d413c6685bce18275c40e Author: Paul E. McKenney Date: Wed Aug 14 12:02:40 2019 -0700 rcutorture: Separate warnings for each failure type Currently, each of six different types of failure triggers a single WARN_ON_ONCE(), and it is then necessary to stare at the rcu_torture_stats(), Reader Pipe, and Reader Batch lines looking for inappropriately non-zero values. This can be annoying and error-prone, so this commit provides a separate WARN_ON_ONCE() for each of the six error conditions and adds short comments to each to ease error identification. Signed-off-by: Paul E. McKenney commit b3ffb206ddd7f07d83bafd10e1b403df57055af4 Author: Ethan Hansen <1ethanhansen@gmail.com> Date: Wed Aug 7 17:27:32 2019 -0700 rcu: Remove unused variable rcu_perf_writer_state The variable rcu_perf_writer_state is declared and initialized, but is never actually referenced. Remove it to clean code. Signed-off-by: Ethan Hansen <1ethanhansen@gmail.com> [ paulmck: Also removed unused macros assigned to that variable. ] Signed-off-by: Paul E. McKenney commit 9f8ba55d49cef46da63f7863ec544e2b2b7eda66 Author: Paul E. McKenney Date: Fri Aug 2 20:18:25 2019 -0700 rcutorture: Remove CONFIG_HOTPLUG_CPU=n from scenarios A number of mainstream CPU families are no longer capable of building kernels having CONFIG_SMP=y and CONFIG_HOTPLUG_CPU=n, so this commit removes this combination from the rcutorture scenarios having it. People wishing to try out this combination may still do so using the "--kconfig CONFIG_HOTPLUG_CPU=n CONFIG_SUSPEND=n CONFIG_HIBERNATION=n" argument to the tools/testing/selftests/rcutorture/bin/kvm.sh script that is used to run rcutorture. Signed-off-by: Paul E. McKenney commit c5d3c8ca22d487ad9a18da9a7722a76e9bdbf4fd Author: Chuhong Yuan Date: Fri Aug 2 09:46:56 2019 +0800 locktorture: Replace strncmp() with str_has_prefix() The strncmp() function is error-prone because it is easy to get the length wrong, especially if the string is subject to change, especially given the need to account for the terminating nul byte. This commit therefore substitutes the newly introduced str_has_prefix(), which does not require a separately specified length. Signed-off-by: Chuhong Yuan Signed-off-by: Paul E. McKenney commit ac5f636130c2014eb535f30951460b75db6cbe04 Author: Ethan Hansen <1ethanhansen@gmail.com> Date: Thu Aug 1 14:00:40 2019 -0700 rcu: Remove unused function rcutorture_record_progress() The function rcutorture_record_progress() is declared in rcu.h, but is never used. This commit therefore removes rcutorture_record_progress() to clean code. Signed-off-by: Ethan Hansen <1ethanhansen@gmail.com> Signed-off-by: Paul E. McKenney commit 839313509182c3043a073a78bd41e4296af0a7a2 Author: Jonathan Neuschäfer Date: Wed Oct 2 17:38:26 2019 +0200 drm/mcde: Fix reference to DOC comment The :doc: reference did not match the DOC comment's name. Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE") Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20191002153827.23026-1-j.neuschaefer@gmx.net commit 79ba7ff5a9925f5c170f51ed7a96d1475eb6c27f Author: Paul E. McKenney Date: Sun Aug 4 13:17:35 2019 -0700 rcutorture: Emulate dyntick aspect of userspace nohz_full sojourn During an actual call_rcu() flood, there would be frequent trips to userspace (in-kernel call_rcu() floods must be otherwise housebroken). Userspace execution on nohz_full CPUs implies an RCU dyntick idle/not-idle transition pair, so this commit adds emulation of that pair. Signed-off-by: Paul E. McKenney commit 96926686deab853bcacf887501f4ed958e38666b Author: Paul E. McKenney Date: Fri Aug 2 15:12:47 2019 -0700 rcu: Make CPU-hotplug removal operations enable tick CPU-hotplug removal operations run the multi_cpu_stop() function, which relies on the scheduler to gain control from whatever is running on the various online CPUs, including any nohz_full CPUs running long loops in kernel-mode code. Lack of the scheduler-clock interrupt on such CPUs can delay multi_cpu_stop() for several minutes and can also result in RCU CPU stall warnings. This commit therefore causes CPU-hotplug removal operations to enable the scheduler-clock interrupt on all online CPUs. [ paulmck: Apply Joel Fernandes TICK_DEP_MASK_RCU->TICK_DEP_BIT_RCU fix. ] [ paulmck: Apply simplifications suggested by Frederic Weisbecker. ] Signed-off-by: Paul E. McKenney commit 366237e7b0833faa2d8da7a8d7d7da8c3ca802e5 Author: Paul E. McKenney Date: Wed Jul 10 08:01:01 2019 -0700 stop_machine: Provide RCU quiescent state in multi_cpu_stop() When multi_cpu_stop() loops waiting for other tasks, it can trigger an RCU CPU stall warning. This can be misleading because what is instead needed is information on whatever task is blocking multi_cpu_stop(). This commit therefore inserts an RCU quiescent state into the multi_cpu_stop() function's waitloop. Signed-off-by: Paul E. McKenney commit d38e6dc6ed0dfef8d323354031a1ee1a7cfdedc1 Author: Paul E. McKenney Date: Sun Jul 28 12:00:48 2019 -0700 rcutorture: Force on tick for readers and callback flooders Readers and callback flooders in the rcutorture stress-test suite run for extended time periods by design. They do take pains to relinquish the CPU from time to time, but in some cases this relies on the scheduler being active, which in turn relies on the scheduler-clock interrupt firing from time to time. This commit therefore forces scheduling-clock interrupts within these loops. While in the area, this commit also prevents rcu_torture_reader()'s occasional timed sleeps from delaying shutdown. [ paulmck: Apply Joel Fernandes TICK_DEP_MASK_RCU->TICK_DEP_BIT_RCU fix. ] Signed-off-by: Paul E. McKenney commit 6a949b7af82db7eb1e52caaed122eab1cf63acee Author: Paul E. McKenney Date: Sun Jul 28 11:50:56 2019 -0700 rcu: Force on tick when invoking lots of callbacks Callback invocation can run for a significant time period, and within CONFIG_NO_HZ_FULL=y kernels, this period will be devoid of scheduler-clock interrupts. In-kernel execution without such interrupts can cause all manner of malfunction, with RCU CPU stall warnings being but one result. This commit therefore forces scheduling-clock interrupts on whenever more than a few RCU callbacks are invoked. Because offloaded callback invocation can be preempted, this forcing is withdrawn on each context switch. This in turn requires that the loop invoking RCU callbacks reiterate the forcing periodically. [ paulmck: Apply Joel Fernandes TICK_DEP_MASK_RCU->TICK_DEP_BIT_RCU fix. ] [ paulmck: Remove NO_HZ_FULL check per Frederic Weisbecker feedback. ] Signed-off-by: Paul E. McKenney commit ae9e557b5be2e285f48ee945d9c8faf75d4f6a66 Author: Paul E. McKenney Date: Fri Aug 9 16:29:42 2019 -0700 time: Export tick start/stop functions for rcutorture It turns out that rcutorture needs to ensure that the scheduling-clock interrupt is enabled in CONFIG_NO_HZ_FULL kernels before starting on CPU-bound in-kernel processing. This commit therefore exports tick_nohz_dep_set_task(), tick_nohz_dep_clear_task(), and tick_nohz_full_setup() to GPL kernel modules. Reported-by: kbuild test robot Signed-off-by: Paul E. McKenney commit 01b4c39901e087ceebae2733857248de81476bd8 Author: Frederic Weisbecker Date: Wed Jul 24 15:22:59 2019 +0200 nohz: Add TICK_DEP_BIT_RCU If a nohz_full CPU is looping in the kernel, the scheduling-clock tick might nevertheless remain disabled. In !PREEMPT kernels, this can prevent RCU's attempts to enlist the aid of that CPU's executions of cond_resched(), which can in turn result in an arbitrarily delayed grace period and thus an OOM. RCU therefore needs a way to enable a holdout nohz_full CPU's scheduler-clock interrupt. This commit therefore provides a new TICK_DEP_BIT_RCU value which RCU can pass to tick_dep_set_cpu() and friends to force on the scheduler-clock interrupt for a specified CPU or task. In some cases, rcutorture needs to turn on the scheduler-clock tick, so this commit also exports the relevant symbols to GPL-licensed modules. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 8c550e94b8835170593169a45b5ba30d3fc72a70 Author: Drew Fustini Date: Sat Sep 21 12:25:23 2019 +0200 gpio: expose pull-up/pull-down line flags to userspace Add pull-up/pull-down flags to the gpio line get and set ioctl() calls. Use cases include a push button that does not have an external resistor. Addition use cases described by Limor Fried (ladyada) of Adafruit in this PR for Adafruit_Blinka Python lib: https://github.com/adafruit/Adafruit_Blinka/pull/59 Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20190921102522.8970-1-drew@pdp7.com Signed-off-by: Linus Walleij commit 74033d99b6d7b9df27d169144958603504e6e6fc Author: Chris Packham Date: Thu Oct 3 13:03:10 2019 +1300 pinctrl: iproc: use unique name for irq chip Use the dev_name(dev) for the irqc->name so that we get unique names when we have multiple instances of this driver. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20191003000310.17099-3-chris.packham@alliedtelesis.co.nz Acked-by: Scott Branden Signed-off-by: Linus Walleij commit dc7fe512d9667bce878797cd2fd39acec08232bb Author: Phil Reid Date: Thu Sep 19 22:36:07 2019 +0800 dt-binding: iio: Add optional label property This optional property defines a symbolic name for the device. This helps to distinguish between more than one iio device of the same type. Suggested-by: Michal Simek Signed-off-by: Phil Reid Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 9318a9e547438078104b0e8557f76f0cb524c12e Author: Alexandru Ardelean Date: Thu Sep 19 16:23:03 2019 +0300 iio: gyro: adis16080: replace mlock with own lock The lock is used to protect the buffer during reads. Though the spi routines have their own locks, it may be the case that the buffer needs to be protected before it's stored and passed to the IIO read hooks. indio_dev's mlock was used before. This change replaces it with the driver's own lock. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 81ba7e85d7f3af053b06e8538f7c847587d53935 Author: Fabrice Gasnier Date: Wed Sep 18 14:22:41 2019 +0200 counter: stm32-lptimer-cnt: fix a kernel-doc warning Fix the following warnings when documentation is built: drivers/counter/stm32-lptimer-cnt.c:354: warning: cannot understand function prototype: 'enum stm32_lptim_cnt_function' Signed-off-by: Fabrice Gasnier Fixes: 597f55e3f36c ("counter: stm32-lptimer: add counter device") Signed-off-by: Jonathan Cameron commit 0f536e91099bea115b091377a3923ef233fab3e4 Author: Fabrice Gasnier Date: Wed Sep 18 14:22:03 2019 +0200 counter: stm32-timer-cnt: fix a kernel-doc warning Fix the following warning when documentation is built: drivers/counter/stm32-timer-cnt.c:37: warning: cannot understand function prototype: 'enum stm32_count_function' Signed-off-by: Fabrice Gasnier Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder") Signed-off-by: Jonathan Cameron commit ea14163d29130649e43bfcad12ef6ef9a956fbe3 Author: Alexandru Ardelean Date: Tue Sep 17 19:10:23 2019 +0300 iio: gyro: adis16130: remove mlock usage The use of indio_dev's mlock is discouraged. The driver already defines it's own `bus_lock` in `adis16130_spi_read()`, so using the mlock is redundant. The parts supported by this chip are obsoleted anyway, so for now we just remove mlock as part of a general cleanup, until the driver gets removed. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 8033997a8dafbad1aae437bd25f0d7307fb084be Author: Tomasz Duszynski Date: Mon Sep 16 21:00:24 2019 +0200 MAINTAINERS: add entry for ROHM BH1750 driver Add myself as a ROHM BH1750 ambient light sensor driver maintainer. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron commit 2231f0f0d1e999b68b8bb6df0407b306ebbcb542 Author: Tomasz Duszynski Date: Mon Sep 16 21:00:23 2019 +0200 dt-bindings: iio: light: bh1750: convert bindings to yaml Convert existing device tree bindings to yaml. Signed-off-by: Tomasz Duszynski Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 1aabad1fb5e98aa5a7449e0d288b4886aca3ebda Author: Sean Nyekjaer Date: Mon Sep 16 15:56:30 2019 +0200 iio: imu: st_lsm6dsx: add motion report function and call from interrupt Report iio motion events to iio subsystem and filter motion events. Wakeup will still be on all channels as it's not possible to do the filtering in hw. Signed-off-by: Sean Nyekjaer Reviewed-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit a3aa17d4badf17c9cbe785f3c842c1b62f5b527d Author: Sean Nyekjaer Date: Mon Sep 16 15:56:29 2019 +0200 iio: imu: st_lsm6dsx: always enter interrupt thread The interrupt source can come from multiple sources, fifo and wake interrupts. Enter interrupt thread to check which interrupt that has fired. Signed-off-by: Sean Nyekjaer Reviewed-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 4c997dfa692d8bdc9f2906057d17f1c61d5dcda2 Author: Sean Nyekjaer Date: Mon Sep 16 15:56:28 2019 +0200 iio: imu: st_lsm6dsx: add wakeup-source option This add ways for the SoC to wake from accelerometer wake events. In the suspend function we skip disabling the sensor if wakeup-source and events are activated. Signed-off-by: Sean Nyekjaer Reviewed-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit b5969abfa8b8ed43ebd93479d394f664bd4a5a87 Author: Sean Nyekjaer Date: Mon Sep 16 15:56:27 2019 +0200 iio: imu: st_lsm6dsx: add motion events Add event channels that controls the creation of motion events. Tested on ISM330DLC Signed-off-by: Sean Nyekjaer Reviewed-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 6ee6a368ac0ad48dd5c5eca0e02739ac932a5b21 Author: Sean Nyekjaer Date: Mon Sep 16 15:56:26 2019 +0200 iio: imu: st_lsm6dsx: move interrupt thread to core This prepares the interrupt to be used for other stuff than fifo reading + event readings. Signed-off-by: Sean Nyekjaer Acked-by: Lorenzo Bianconi Reviewed-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit e764fb4e20f9387d6a852cabf227f853f8e51bbe Author: Jean-Baptiste Maneyrol Date: Mon Sep 16 09:42:09 2019 +0000 iio: imu: inv_mpu6050: add fifo support for magnetometer data Put read magnetometer data by mpu inside the fifo. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit b1392de061840b49478f7b8ad29d81973d3ce171 Author: Jean-Baptiste Maneyrol Date: Mon Sep 16 09:42:07 2019 +0000 iio: imu: inv_mpu6050: add MPU925x magnetometer support Add support of driving MPU9250 magnetometer connected on i2c auxiliary bus using the MPU i2c master. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 16ef4337694898c4514b1c967d26d6eb35eb12d5 Author: Jean-Baptiste Maneyrol Date: Mon Sep 16 09:42:05 2019 +0000 iio: imu: inv_mpu6050: helpers for using i2c master on auxiliary bus Add helper functions to use the i2c auxiliary bus with the MPU i2c master block. Support only register based chip, reading and 1 byte writing. These will be useful for initializing magnetometers inside MPU9x50 chips. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 9d8261dbc496da7cdc1f060894ab8052fd511895 Author: Jean-Baptiste Maneyrol Date: Mon Sep 16 09:42:04 2019 +0000 iio: imu: inv_mpu6050: fix objects syntax in Makefile Use the correct syntax *-y for declaring object files. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 68fd019b89e0efd3d2b1bdd2021ef0acb38b425b Author: Jean-Baptiste Maneyrol Date: Mon Sep 16 09:42:02 2019 +0000 iio: imu: inv_mpu6050: add defines for supporting 9-axis chips Add registers defines required for driving chip i2c master ip. Add MPU9xxx magnetometer scan elements and update data bytes size. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 5ffd0248384c6ee5847de8b453d9f1138cf6d2d2 Author: Jean-Baptiste Maneyrol Date: Mon Sep 16 09:42:00 2019 +0000 iio: imu: inv_mpu6050: add header include protection macro Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 5aa5cbd2e95e0079b2cc6b4b66f0d0de5e0fbbfd Author: Jiri Slaby Date: Thu Oct 3 11:52:38 2019 +0200 x86/asm: Make boot_gdt_descr local As far as I can see, it was never used outside of head_32.S. Not even when added in 2004. So make it local. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191003095238.29831-2-jslaby@suse.cz commit 1a8770b746bd05ef68217989cd723b2c24d2208d Author: Jiri Slaby Date: Thu Oct 3 11:52:37 2019 +0200 x86/asm: Reorder early variables Moving early_recursion_flag (4 bytes) after early_level4_pgt (4k) and early_dynamic_pgts (256k) saves 4k which are used for alignment of early_level4_pgt after early_recursion_flag. The real improvement is merely on the source code side. Previously it was: * __INITDATA + .balign * early_recursion_flag variable * a ton of CPP MACROS * __INITDATA (again) * early_top_pgt and early_recursion_flag variables * .data Now, it is a bit simpler: * a ton of CPP MACROS * __INITDATA + .balign * early_top_pgt and early_recursion_flag variables * early_recursion_flag variable * .data On the binary level the change looks like this: Before: (sections) 12 .init.data 00042000 0000000000000000 0000000000000000 00008000 2**12 (symbols) 000000 4 OBJECT GLOBAL DEFAULT 22 early_recursion_flag 001000 4096 OBJECT GLOBAL DEFAULT 22 early_top_pgt 002000 0x40000 OBJECT GLOBAL DEFAULT 22 early_dynamic_pgts After: (sections) 12 .init.data 00041004 0000000000000000 0000000000000000 00008000 2**12 (symbols) 000000 4096 OBJECT GLOBAL DEFAULT 22 early_top_pgt 001000 0x40000 OBJECT GLOBAL DEFAULT 22 early_dynamic_pgts 041000 4 OBJECT GLOBAL DEFAULT 22 early_recursion_flag So the resulting vmlinux is smaller by 4k with my toolchain as many other variables can be placed after early_recursion_flag to fill the rest of the page. Note that this is only .init data, so it is freed right after being booted anyway. Savings on-disk are none -- compression of zeros is easy, so the size of bzImage is the same pre and post the change. Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191003095238.29831-1-jslaby@suse.cz commit ca4a649694bb159b221eb0cfecec46838473b536 Author: Jean-Baptiste Maneyrol Date: Mon Sep 16 09:41:58 2019 +0000 iio: imu: inv_mpu6050: disable i2c mux for MPU925x Disable i2c mux for supported 9xxx chips. This is a pre-requesite for controling 9xxx magnetometer using the i2c master of the chip. Check in device-tree that there is no i2c-gate device declared for ensuring backward compatibility with existing setups. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 30abc59b4842511a34d7051a1ac01dc007fa1169 Author: Peter Griffin Date: Tue Oct 1 18:29:27 2019 +0000 drm/lima: Add support for multiple reset lines Some SoCs like HiKey have 2 reset lines, so update to use the devm_reset_control_array_* variant of the API so that multiple resets can be specified in DT. Cc: Qiang Yu Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: lima@lists.freedesktop.org Signed-off-by: Peter Griffin Signed-off-by: John Stultz Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20191001182927.70448-1-john.stultz@linaro.org commit b5273951ba00a4fa53109aec0d6d57e6495806cd Author: Luca Weiss Date: Sat Jul 13 17:48:06 2019 +0200 ARM: dts: msm8974-FP2: add reboot-mode node This enables userspace to signal the bootloader to go into the bootloader or recovery mode. The magic values can be found in both the downstream kernel and the LK kernel (bootloader). Reviewed-by: Brian Masney Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson commit 27fe0fc05f354183581236090fccf70b258f5939 Author: Luca Weiss Date: Thu Sep 26 20:44:35 2019 +0200 ARM: dts: msm8974-FP2: Increase load on l20 for sdhci Before this change, trying to boot from the internal storage would result in a lot of errors like: [ 11.224046] mmc0: cache flush error -110 [ 11.224180] blk_update_request: I/O error, dev mmcblk0, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0 or: [ 137.544673] mmc0: tuning execution failed: -5 [ 137.569832] mmcblk0: error -110 requesting status [ 137.593558] mmcblk0: recovery failed! With this patch, there are no more sdhci errors and booting works fine. Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson commit 0dabbda179938de10aa6e443bce90c3b07af1bd2 Author: Luca Weiss Date: Thu Sep 26 20:44:34 2019 +0200 ARM: dts: msm8974-FP2: Drop unused card-detect pin The gpio is not used for SD card detection on the FP2. Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson commit 4bc6aadbcc0e2a852e584bf5410fe90ea5a5f86a Author: Angelo G. Del Regno Date: Sat Sep 21 12:12:06 2019 +0200 dt-bindings: power: Add missing rpmpd smd performance level The RPM_SMD_LEVEL_TURBO_HIGH is used by MSM8956/8976 and APQ variants: add the definition. Signed-off-by: Angelo G. Del Regno Signed-off-by: Bjorn Andersson commit 83a81c1b8690310b98f0804aef134c4318234866 Author: Angelo G. Del Regno Date: Sat Sep 21 12:12:05 2019 +0200 soc: qcom: smd-rpm: Add MSM8976 compatible Add a compatible for the RPM on the Qualcomm MSM8976 platform: this is also valid for MSM8956 and their APQ variants. Signed-off-by: Angelo G. Del Regno Signed-off-by: Bjorn Andersson commit bbe692e349e2a1edf3fe0a29a0e05899c9c94d51 Author: Navid Emamdoost Date: Mon Sep 16 22:31:23 2019 -0500 rpmsg: char: release allocated memory In rpmsg_eptdev_write_iter, if copy_from_iter_full fails the allocated buffer needs to be released. Signed-off-by: Navid Emamdoost Signed-off-by: Bjorn Andersson commit 0ad82e3a2234dfa38ec835d1772e8c9af176d458 Author: Ding Xiang Date: Tue Sep 24 10:58:54 2019 +0800 remoteproc: debug: Remove unneeded NULL check debugfs_remove_recursive will do NULL check, so remove the redundant null check Signed-off-by: Ding Xiang Signed-off-by: Bjorn Andersson commit b674a30bf8b0edf3b966e32dfcb2e00dfca5a823 Author: Baolin Wang Date: Fri Sep 27 15:10:47 2019 +0800 hwspinlock: sprd: Use devm_hwspin_lock_register() to register hwlock controller Use devm_hwspin_lock_register() to register the hwlock controller instead of unregistering the hwlock controller explicitly when removing the device. Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit b4d64193d41e52a5d35923bc5a0772d9de250092 Author: Baolin Wang Date: Fri Sep 27 15:10:46 2019 +0800 hwspinlock: sprd: Use devm_add_action_or_reset() for calls to clk_disable_unprepare() Use devm_add_action_or_reset() for calls to clk_disable_unprepare(), which can simplify the error handling. Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit 3070c41643609c66d33de3577fc9d8ca15932513 Author: Baolin Wang Date: Fri Sep 27 15:10:45 2019 +0800 hwspinlock: sprd: Check the return value of clk_prepare_enable() We must check the return value of clk_prepare_enable() to make sure the hardware spinlock controller can be enabled successfully, otherwise we should return error. Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit 74cfa956cbead238cf6c5307be461a087c569c97 Author: Baolin Wang Date: Fri Sep 27 15:10:44 2019 +0800 hwspinlock: sprd: Change to use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit 006d72da28db06a0762b1f536458ac1a9a4ba8d1 Author: Clement Leger Date: Fri Oct 4 19:44:24 2019 +0200 remoteproc: remove useless typedef rproc_handle_resources_t is not used anymore, remove it. Signed-off-by: Clement Leger Signed-off-by: Bjorn Andersson commit acc98c1f2a1b4503588d3b1eb35db9cb76abdd89 Author: Baolin Wang Date: Fri Sep 27 16:27:43 2019 +0800 hwspinlock: u8500_hsem: Use devm_hwspin_lock_register() to register hwlock controller Use devm_hwspin_lock_register() to register the hwlock controller instead of unregistering the hwlock controller explicitly when removing the device. Reviewed-by: Linus Walleij Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit 637bcd19beeb9e40b8b64b41e8a8bdf03e918edd Author: Baolin Wang Date: Fri Sep 27 16:27:42 2019 +0800 hwspinlock: u8500_hsem: Use devm_kzalloc() to allocate memory Use devm_kzalloc() to allocate memory. Reviewed-by: Linus Walleij Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit 5ee45e0c894636243361fdbaa17828fa00dc7f3a Author: Baolin Wang Date: Fri Sep 27 16:27:41 2019 +0800 hwspinlock: u8500_hsem: Change to use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Reviewed-by: Linus Walleij Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson commit eecff9a8427a391911accfd077368baeda45c540 Author: Bjorn Andersson Date: Mon Aug 26 23:16:44 2019 -0700 MAINTAINERS: hwspinlock: update git tree location Update the maintainers file to reflect the move of the hwspinlock tree to kernel.org Signed-off-by: Bjorn Andersson commit d20c0da8b2020acaa107b42041c8da2bafed1910 Author: Stephen Boyd Date: Tue Jul 30 11:15:14 2019 -0700 fpga: Remove dev_err() usage after platform_get_irq() We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // While we're here, remove braces on if statements that only have one statement (manually). Cc: Moritz Fischer Cc: linux-fpga@vger.kernel.org Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Moritz Fischer commit 26e0105550862a137eba701e2f4e3eeb343759e9 Author: zhengbin Date: Fri Oct 4 17:57:30 2019 +0800 net: dsa: sja1105: Make function sja1105_xfer_long_buf static Fix sparse warnings: drivers/net/dsa/sja1105/sja1105_spi.c:159:5: warning: symbol 'sja1105_xfer_long_buf' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: David S. Miller commit c62c2cfb801b6c890641ed6c91ec9e5c7ad8e2f3 Author: Jiri Pirko Date: Fri Oct 4 11:50:12 2019 +0200 net: devlink: don't ignore errors during dumpit Currently, some dumpit function may end-up with error which is not -EMSGSIZE and this error is silently ignored. Use does not have clue that something wrong happened. Instead of silent ignore, propagate the error to user. Suggested-by: Andrew Lunn Signed-off-by: Jiri Pirko Reviewed-by: Andrew Lunn Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 2a36550567307b881ce570a81189682ae1c9d08d Author: Thierry Reding Date: Wed Oct 2 16:45:02 2019 +0200 gpio: tegra186: Implement wake event support The GPIO controller doesn't have any controls to enable the system to wake up from low power states based on activity on GPIO pins. An extra hardware block that is part of the power management controller (PMC) contains these controls. In order for the GPIO controller to be able to cooperate with the PMC, obtain a reference to the PMC's IRQ domain and make it a parent to the GPIO controller's IRQ domain. This way the PMC gets an opportunity to program the additional registers required to enable wakeup sources on suspend. Based on additional work by Bitan Biswas . Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191002144502.156393-2-thierry.reding@gmail.com Signed-off-by: Linus Walleij commit ab3dd9cc24d4d49739cec0c7763e473ddd22f9c1 Author: Timo Alho Date: Wed Oct 2 14:28:25 2019 +0200 gpio: max77620: Fix interrupt handling The interrupt-related register fields on the MAX77620 GPIO controller share registers with GPIO related fields. If the IRQ chip is implemented with regmap-irq, this causes the IRQ controller code to overwrite fields previously configured by the GPIO controller code. Two examples where this causes problems are the NVIDIA Jetson TX1 and Jetson TX2 boards, where some of the GPIOs are used to enable vital power regulators. The MAX77620 GPIO controller also provides the USB OTG ID pin. If configured as an interrupt, this causes some of the regulators to be powered off. Signed-off-by: Timo Alho Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191002122825.3948322-3-thierry.reding@gmail.com Signed-off-by: Linus Walleij commit 704355db127e4bcc96c40fa3eeff5450f1a14d13 Author: Thierry Reding Date: Wed Oct 2 14:28:24 2019 +0200 gpio: max77620: Do not allocate IRQs upfront regmap_add_irq_chip() will try to allocate all of the IRQ descriptors upfront if passed a non-zero irq_base parameter. However, the intention is to allocate IRQ descriptors on an as-needed basis if possible. Pass 0 instead of -1 to fix that use-case. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191002122825.3948322-2-thierry.reding@gmail.com Signed-off-by: Linus Walleij commit 511e6ca047457bcf200d9b6ad75e310b0e77af19 Author: Vladimir Oltean Date: Fri Oct 4 03:33:47 2019 +0300 net: dsa: sja1105: Add support for port mirroring Amazingly, of all features, this does not require a switch reset. Tested with: tc qdisc add dev swp2 clsact tc filter add dev swp2 ingress matchall skip_sw \ action mirred egress mirror dev swp3 tc filter show dev swp2 ingress tc filter del dev swp2 ingress pref 49152 Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5a43f697cc105544fb85f3a0bbc8223ec50b28d0 Author: Alexey Dobriyan Date: Fri Oct 4 00:26:52 2019 +0300 igmp: uninline ip_mc_validate_checksum() This function is only used via function pointer. "inline" doesn't hurt given that taking address of an inline function forces out-of-line version but it doesn't help either. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit 037699139ecb223c2eb7206f21cfb06f2812fd8c Author: Rasmus Villemoes Date: Mon Sep 23 16:20:05 2019 +0200 pinctrl: devicetree.c: remove orphan pinctrl_dt_has_hogs() The helper pinctrl_dt_has_hogs() was introduced in 99e4f67508e1 (pinctrl: core: Use delayed work for hogs), but the sole use then got removed shortly after in 950b0d91dc10 (pinctrl: core: Fix regression caused by delayed work for hogs). Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20190923142005.5632-1-linux@rasmusvillemoes.dk Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit 193d357d087309f2d5ab8e8caab1af5e3bc29fa0 Author: Alexey Dobriyan Date: Thu Oct 3 23:56:37 2019 +0300 net: spread "enum sock_flags" Some ints are "enum sock_flags" in fact. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit d6547f2a2cfc8b145b59291d3e4b072891f34882 Author: Alexey Dobriyan Date: Thu Oct 3 23:29:24 2019 +0300 net, uapi: fix -Wpointer-arith warnings Add casts to fix these warnings: ./usr/include/linux/netfilter_arp/arp_tables.h:200:19: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] ./usr/include/linux/netfilter_bridge/ebtables.h:197:19: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] ./usr/include/linux/netfilter_ipv4/ip_tables.h:223:19: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] ./usr/include/linux/netfilter_ipv6/ip6_tables.h:263:19: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] ./usr/include/linux/tipc_config.h:310:28: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] ./usr/include/linux/tipc_config.h:410:24: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] ./usr/include/linux/virtio_ring.h:170:16: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] Those are theoretical probably but kernel doesn't control compiler flags in userspace. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit 9978339ae4e08fd6b7c8200db0fff9dbe6e034d2 Author: Thierry Reding Date: Mon Sep 23 11:54:00 2019 +0200 pinctrl: tegra: xusb: Add note about legacy status Add a comment about why the call to of_match_node() cannot be replaced by of_device_get_match_data(). This will hopefully prevent people from attempting to clean this up in the future. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20190923095400.GA11084@ulmo Signed-off-by: Linus Walleij commit de417d137d9d8ff631e8af3ff380365919fb7c07 Merge: 6d4e4ddc75eb bea5d1438801 Author: David S. Miller Date: Fri Oct 4 14:12:48 2019 -0700 Merge branch 'net-phy-broadcom-RGMII-delays-fixes' Florian Fainelli says: ==================== net: phy: broadcom: RGMII delays fixes This patch series fixes the BCM54210E RGMII delay configuration which could only have worked in a PHY_INTERFACE_MODE_RGMII configuration. There is a forward declaration added such that the first patch can be picked up for -stable and apply fine all the way back to when the bug was introduced. The second patch eliminates duplicated code that used a different kind of logic and did not use existing constants defined. ==================== Signed-off-by: David S. Miller commit bea5d143880128daa4036f7799bae32a70b56b05 Author: Florian Fainelli Date: Thu Oct 3 11:43:52 2019 -0700 net: phy: broadcom: Use bcm54xx_config_clock_delay() for BCM54612E bcm54612e_config_init() duplicates what bcm54xx_config_clock_delay() does with respect to configuring RGMII TX/RX delays appropriately. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit fea7fda7f50a6059220f83251e70709e45cc8040 Author: Florian Fainelli Date: Thu Oct 3 11:43:51 2019 -0700 net: phy: broadcom: Fix RGMII delays configuration for BCM54210E Commit 0fc9ae107669 ("net: phy: broadcom: add support for BCM54210E") added support for BCM54210E but also unconditionally cleared the RXC to RXD skew and the TXD to TXC skew, thus only making PHY_INTERFACE_MODE_RGMII a possible configuration. Use bcm54xx_config_clock_delay() which correctly sets the registers depending on the 4 possible PHY interface values that exist for RGMII. Fixes: 0fc9ae107669 ("net: phy: broadcom: add support for BCM54210E") Reported-by: Manasa Mudireddy Reported-by: Ray Jui Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 5ff8aca906f3a7a7db79fad92f2a4401107ef50d Author: Colin Ian King Date: Fri Sep 20 14:20:30 2019 +0200 pinctl: ti: iodelay: fix error checking on pinctrl_count_index_with_args call The call to pinctrl_count_index_with_args checks for a -EINVAL return however this function calls pinctrl_get_list_and_count and this can return -ENOENT. Rather than check for a specific error, fix this by checking for any error return to catch the -ENOENT case. Addresses-Coverity: ("Improper use of negative") Fixes: 003910ebc83b ("pinctrl: Introduce TI IOdelay configuration driver") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190920122030.14340-1-colin.king@canonical.com Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit 6d4e4ddc75ebd2849c57beeec6c6b07c2c0fbd18 Merge: 033b2c7f0f26 53b4414a7003 Author: David S. Miller Date: Fri Oct 4 14:07:07 2019 -0700 Merge branch 'net-tls-separate-the-TLS-TOE-code-out' Jakub Kicinski says: ==================== net/tls: separate the TLS TOE code out We have 3 modes of operation of TLS - software, crypto offload (Mellanox, Netronome) and TCP Offload Engine-based (Chelsio). The last one takes over the socket, like any TOE would, and is not really compatible with how we want to do things in the networking stack. Confusingly the name of the crypto-only offload mode is TLS_HW, while TOE-offload related functions use tls_hw_ as their prefix. Engineers looking to implement offload are also be faced with TOE artefacts like struct tls_device (while, again, CONFIG_TLS_DEVICE actually gates the non-TOE offload). To improve the clarity of the offload code move the TOE code into new files, and rename the functions and structures appropriately. Because TOE-offload takes over the socket, and makes no use of the TLS infrastructure in the kernel, the rest of the code (anything beyond the ULP setup handlers) do not have to worry about the mode == TLS_HW_RECORD case. The increase in code size is due to duplication of the full license boilerplate. Unfortunately original author (Dave Watson) seems unreachable :( ==================== Signed-off-by: David S. Miller commit 53b4414a7003099f41ab61ef9a452804c025e2c1 Author: Jakub Kicinski Date: Thu Oct 3 11:18:59 2019 -0700 net/tls: allow compiling TLS TOE out TLS "record layer offload" requires TOE, and bypasses most of the normal networking stack. It is also significantly less maintained. Allow users to compile it out to avoid issues. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 0eb8745e03c9ed2a7412c7a844ebc4f0e4f80de4 Author: Jakub Kicinski Date: Thu Oct 3 11:18:58 2019 -0700 net/tls: rename tls_hw_* functions tls_toe_* The tls_hw_* functions are quite confusingly named, since they are related to the TOE-offload, not TLS_HW offload which doesn't require TOE. Rename them. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 08700dab816847d5e600ef263155fb04ea4b312d Author: Jakub Kicinski Date: Thu Oct 3 11:18:57 2019 -0700 net/tls: move TOE-related code to a separate file Move tls_hw_* functions to a new, separate source file to avoid confusion with normal, non-TOE offload. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 16bed0e6ac07b1a0b3e9c33ec5e892bc7074a627 Author: Jakub Kicinski Date: Thu Oct 3 11:18:56 2019 -0700 net/tls: move tls_build_proto() on init path Move tls_build_proto() so that TOE offload doesn't have to call it mid way through its bypass enable path. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit f21912edd1570818cbcb16bd1da7d7a2b122d66b Author: Jakub Kicinski Date: Thu Oct 3 11:18:55 2019 -0700 net/tls: rename tls_device to tls_toe_device Rename struct tls_device to struct tls_toe_device to avoid confusion with normal, non-TOE offload. No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 25a3cd8189c8832c04225e6f1d41228fd6cc64cc Author: Jakub Kicinski Date: Thu Oct 3 11:18:54 2019 -0700 net/tls: move TOE-related structures to a separate header Move tls_device structure and register/unregister functions to a new header to avoid confusion with normal, non-TOE offload. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 033b2c7f0f26d236f5e87888aca3d5ecb6a64cb7 Author: David Howells Date: Thu Oct 3 17:45:57 2019 +0100 rxrpc: Add missing "new peer" trace There was supposed to be a trace indicating that a new peer had been created. Add it. Signed-off-by: David Howells Signed-off-by: David S. Miller commit 157c1062fcd86ade3c674503705033051fd3d401 Author: Lukas Wunner Date: Fri Aug 9 12:28:43 2019 +0200 PCI: pciehp: Avoid returning prematurely from sysfs requests A sysfs request to enable or disable a PCIe hotplug slot should not return before it has been carried out. That is sought to be achieved by waiting until the controller's "pending_events" have been cleared. However the IRQ thread pciehp_ist() clears the "pending_events" before it acts on them. If pciehp_sysfs_enable_slot() / _disable_slot() happen to check the "pending_events" after they have been cleared but while pciehp_ist() is still running, the functions may return prematurely with an incorrect return value. Fix by introducing an "ist_running" flag which must be false before a sysfs request is allowed to return. Fixes: 32a8cef274fe ("PCI: pciehp: Enable/disable exclusively from IRQ thread") Link: https://lore.kernel.org/linux-pci/1562226638-54134-1-git-send-email-wangxiongfeng2@huawei.com Link: https://lore.kernel.org/r/4174210466e27eb7e2243dd1d801d5f75baaffd8.1565345211.git.lukas@wunner.de Reported-and-tested-by: Xiongfeng Wang Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v4.19+ commit fe1897eaa6646f5a64a4cee0e6473ed9887d324b Author: Chao Yu Date: Fri Sep 27 18:01:35 2019 +0800 f2fs: fix to update time in lazytime mode generic/018 reports an inconsistent status of atime, the testcase is as below: - open file with O_SYNC - write file to construct fraged space - calc md5 of file - record {a,c,m}time - defrag file --- do nothing - umount & mount - check {a,c,m}time The root cause is, as f2fs enables lazytime by default, atime update will dirty vfs inode, rather than dirtying f2fs inode (by set with FI_DIRTY_INODE), so later f2fs_write_inode() called from VFS will fail to update inode page due to our skip: f2fs_write_inode() if (is_inode_flag_set(inode, FI_DIRTY_INODE)) return 0; So eventually, after evict(), we lose last atime for ever. To fix this issue, we need to check whether {a,c,m,cr}time is consistent in between inode cache and inode page, and only skip f2fs_update_inode() if f2fs inode is not dirty and time is consistent as well. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6860769ea771cf7fdb77c0f1333096c9700be141 Author: Katsuhiro Suzuki Date: Sun Sep 8 02:48:33 2019 +0900 arm64: dts: rockchip: add analog audio nodes on rk3399-rockpro64 This patch adds audio codec (Everest ES8316) and I2S audio nodes for RK3399 RockPro64. Signed-off-by: Katsuhiro Suzuki Link: https://lore.kernel.org/r/20190907174833.19957-1-katsuhiro@katsuster.net Signed-off-by: Heiko Stuebner commit 85dd7638505823f38d491ab6b4e52b3ab9349149 Author: Heiko Stuebner Date: Tue Sep 17 10:36:25 2019 +0200 arm64: dts: rockchip: add missing #msi-cells to rk3399 The rk3399 gic-its was missing the #msi-cells property as found by dt-schema checks, so add it. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917083625.25818-1-heiko@sntech.de commit 3df955f870c214368d73236733b8a9e5a994b2c3 Author: Dmitry Torokhov Date: Tue Sep 17 08:56:50 2019 -0700 Input: gpio_mouse - switch to using input device polling mode Now that instances of input_dev support polling mode natively, we no longer need to create input_polled_dev instance. Acked-by: Hans-Christian Noren Egtvedt Signed-off-by: Dmitry Torokhov commit 894616f79200f74af6a0426fa20d986b1f45cd9b Author: Dmitry Torokhov Date: Wed Oct 2 10:20:19 2019 -0700 Input: add input_get_poll_interval() Some drivers need to be able to know the current polling interval for devices working in polling mode, let's allow them fetching it. Acked-By: Benjamin Tissoires Tested-by: Michal Vokáč Signed-off-by: Dmitry Torokhov commit 4bbbf164f1a5e970543dcdb7a396fc1cf477725b Author: Daniel Borkmann Date: Thu Oct 3 01:45:12 2019 +0200 bpf: Add loop test case with 32 bit reg comparison against 0 Add a loop test with 32 bit register against 0 immediate: # ./test_verifier 631 #631/p taken loop with back jump to 1st insn, 2 OK Disassembly: [...] 1b: test %edi,%edi 1d: jne 0x0000000000000014 [...] Pretty much similar to prior "taken loop with back jump to 1st insn" test case just as jmp32 variant. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Song Liu commit 38f51c07054ff4796e473dba3bff2e648378002c Author: Daniel Borkmann Date: Thu Oct 3 01:45:11 2019 +0200 bpf, x86: Small optimization in comparing against imm0 Replace 'cmp reg, 0' with 'test reg, reg' for comparisons against zero. Saves 1 byte of instruction encoding per occurrence. The flag results of test 'reg, reg' are identical to 'cmp reg, 0' in all cases except for AF which we don't use/care about. In terms of macro-fusibility in combination with a subsequent conditional jump instruction, both have the same properties for the jumps used in the JIT translation. For example, same JITed Cilium program can shrink a bit from e.g. 12,455 to 12,317 bytes as tests with 0 are used quite frequently. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: John Fastabend commit 909624d8db5bbd369690749eb4c4392766f39f94 Author: Parav Pandit Date: Wed Oct 2 15:25:17 2019 +0300 IB/cm: Use container_of() instead of typecast Use container_of() macro to get to timewait info structure instead of typecasting. Link: https://lore.kernel.org/r/20191002122517.17721-5-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 6f26b2ac699cc53f7da9598be6151818461af2a1 Author: Erez Alfasi Date: Wed Oct 2 15:25:16 2019 +0300 IB/mlx5: Remove unnecessary else statement 'else' is not generally useful after a break or return. Remove this unnecessary statement. Link: https://lore.kernel.org/r/20191002122517.17721-4-leon@kernel.org Signed-off-by: Erez Alfasi Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 2d67c0798821c453d2f165e986567de50f33cbed Author: Erez Alfasi Date: Wed Oct 2 15:25:15 2019 +0300 IB/mlx5: Remove unnecessary return statement There is no reason to call return at the end of function which returns void. Remove this unnecessary statement. Link: https://lore.kernel.org/r/20191002122517.17721-3-leon@kernel.org Signed-off-by: Erez Alfasi Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 4b2a67362e7814641730fa4c561a9ef609fc7a03 Author: Leon Romanovsky Date: Wed Oct 2 15:25:14 2019 +0300 RDMA/mlx5: Group boolean parameters to take less space Clean the code to store all boolean parameters inside one variable. Link: https://lore.kernel.org/r/20191002122517.17721-2-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 9b64f7d0bb0a8b5987f265756a563384765c7378 Author: Bart Van Assche Date: Mon Sep 30 16:17:07 2019 -0700 RDMA/srpt: Postpone HCA removal until after configfs directory removal A shortcoming of the SCSI target core is that it does not have an API for removing tpg or wwn objects. Wait until these directories have been removed before allowing HCA removal to finish. See also Bart Van Assche, "Re: Why using configfs as the only interface is wrong for a storage target", 2011-02-07 (https://www.spinics.net/lists/linux-scsi/msg50248.html). This patch fixes the following kernel crash: ================================================================== BUG: KASAN: use-after-free in __configfs_open_file.isra.4+0x1a8/0x400 Read of size 8 at addr ffff88811880b690 by task restart-lio-srp/1215 CPU: 1 PID: 1215 Comm: restart-lio-srp Not tainted 5.3.0-dbg+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack+0x86/0xca print_address_description+0x74/0x32d __kasan_report.cold.6+0x1b/0x36 kasan_report+0x12/0x17 __asan_load8+0x54/0x90 __configfs_open_file.isra.4+0x1a8/0x400 configfs_open_file+0x13/0x20 do_dentry_open+0x2b1/0x770 vfs_open+0x58/0x60 path_openat+0x5fa/0x14b0 do_filp_open+0x115/0x180 do_sys_open+0x1d4/0x2a0 __x64_sys_openat+0x59/0x70 do_syscall_64+0x6b/0x2d0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f2f2bd3fcce Code: 25 00 00 41 00 3d 00 00 41 00 74 48 48 8d 05 19 d7 0d 00 8b 00 85 c0 75 69 89 f2 b8 01 01 00 00 48 89 fe bf 9c ff ff ff 0f 05 <48> 3d 00 f0 ff ff 0f 87 a6 00 00 00 48 8b 4c 24 28 64 48 33 0c 25 RSP: 002b:00007ffd155f7850 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000564609ba88e0 RCX: 00007f2f2bd3fcce RDX: 0000000000000241 RSI: 0000564609ba8cf0 RDI: 00000000ffffff9c RBP: 00007ffd155f7950 R08: 0000000000000000 R09: 0000000000000020 R10: 00000000000001b6 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000003 R14: 0000000000000001 R15: 0000564609ba8cf0 Allocated by task 995: save_stack+0x21/0x90 __kasan_kmalloc.constprop.9+0xc7/0xd0 kasan_kmalloc+0x9/0x10 __kmalloc+0x153/0x370 srpt_add_one+0x4f/0x561 [ib_srpt] add_client_context+0x251/0x290 [ib_core] ib_register_client+0x1da/0x220 [ib_core] iblock_get_alignment_offset_lbas+0x6b/0x100 [target_core_iblock] do_one_initcall+0xcd/0x43a do_init_module+0x103/0x380 load_module+0x3b77/0x3eb0 __do_sys_finit_module+0x12d/0x1b0 __x64_sys_finit_module+0x43/0x50 do_syscall_64+0x6b/0x2d0 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 1221: save_stack+0x21/0x90 __kasan_slab_free+0x139/0x190 kasan_slab_free+0xe/0x10 slab_free_freelist_hook+0x67/0x1e0 kfree+0xcb/0x2a0 srpt_remove_one+0x596/0x670 [ib_srpt] remove_client_context+0x9a/0xe0 [ib_core] disable_device+0x106/0x1b0 [ib_core] __ib_unregister_device+0x5f/0xf0 [ib_core] ib_unregister_driver+0x11a/0x170 [ib_core] 0xffffffffa087f666 __x64_sys_delete_module+0x1f8/0x2c0 do_syscall_64+0x6b/0x2d0 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88811880b300 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 912 bytes inside of 4096-byte region [ffff88811880b300, ffff88811880c300) The buggy address belongs to the page: page:ffffea0004620200 refcount:1 mapcount:0 mapping:ffff88811ac0de00 index:0x0 compound_mapcount: 0 flags: 0x2fff000000010200(slab|head) raw: 2fff000000010200 dead000000000100 dead000000000122 ffff88811ac0de00 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88811880b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811880b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88811880b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811880b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811880b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Link: https://lore.kernel.org/r/20190930231707.48259-16-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 3236fd61ee92487322982726f63cbe8355f6636e Author: Bart Van Assche Date: Mon Sep 30 16:17:06 2019 -0700 RDMA/srpt: Make the code for handling port identities more systematic Introduce a new data structure for the information about an RDMA port name. This patch does not change any functionality. Link: https://lore.kernel.org/r/20190930231707.48259-15-bvanassche@acm.org Cc: Honggang LI Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit be408e65f55ea751ca6e8d08094951c50ce9d3a3 Author: Bart Van Assche Date: Mon Sep 30 16:17:05 2019 -0700 RDMA/srpt: Rework the code that waits until an RDMA port is no longer in use The current implementation does not wait until srpt_release_channel() has finished and hence can trigger a use-after-free. Rework srpt_release_sport() such that it waits until srpt_release_channel() has finished. This patch fixes the following KASAN complaint: ================================================================== BUG: KASAN: use-after-free in srpt_free_ioctx.part.23+0x42/0x100 [ib_srpt] Read of size 8 at addr ffff888115c71100 by task kworker/4:3/807 CPU: 4 PID: 807 Comm: kworker/4:3 Not tainted 5.3.0-dbg+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Workqueue: events srpt_release_channel_work [ib_srpt] Call Trace: dump_stack+0x86/0xca print_address_description+0x74/0x32d __kasan_report.cold.6+0x1b/0x36 kasan_report+0x12/0x17 __asan_load8+0x54/0x90 srpt_free_ioctx.part.23+0x42/0x100 [ib_srpt] srpt_free_ioctx_ring.part.24+0x50/0x80 [ib_srpt] srpt_release_channel_work+0x2ad/0x390 [ib_srpt] process_one_work+0x51a/0xa60 worker_thread+0x67/0x5b0 kthread+0x1dc/0x200 ret_from_fork+0x24/0x30 Allocated by task 984: save_stack+0x21/0x90 __kasan_kmalloc.constprop.9+0xc7/0xd0 kasan_kmalloc+0x9/0x10 __kmalloc+0x153/0x370 srpt_add_one+0x4f/0x570 [ib_srpt] add_client_context+0x251/0x290 [ib_core] ib_register_client+0x1da/0x220 [ib_core] iblock_get_alignment_offset_lbas+0x6b/0x100 [target_core_iblock] do_one_initcall+0xcd/0x43a do_init_module+0x103/0x380 load_module+0x3b77/0x3eb0 __do_sys_finit_module+0x12d/0x1b0 __x64_sys_finit_module+0x43/0x50 do_syscall_64+0x6b/0x2d0 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 1128: save_stack+0x21/0x90 __kasan_slab_free+0x139/0x190 kasan_slab_free+0xe/0x10 slab_free_freelist_hook+0x67/0x1e0 kfree+0xcb/0x2a0 srpt_remove_one+0x569/0x5b0 [ib_srpt] remove_client_context+0x9a/0xe0 [ib_core] disable_device+0x106/0x1b0 [ib_core] __ib_unregister_device+0x5f/0xf0 [ib_core] ib_unregister_device_and_put+0x48/0x60 [ib_core] nldev_dellink+0x120/0x180 [ib_core] rdma_nl_rcv+0x287/0x480 [ib_core] netlink_unicast+0x2cc/0x370 netlink_sendmsg+0x3b1/0x630 __sys_sendto+0x1db/0x290 __x64_sys_sendto+0x80/0xa0 do_syscall_64+0x6b/0x2d0 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888115c71100 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 0 bytes inside of 4096-byte region [ffff888115c71100, ffff888115c72100) The buggy address belongs to the page: page:ffffea0004571c00 refcount:1 mapcount:0 mapping:ffff88811ac0de00 index:0xffff888115c70000 compound_mapcount: 0 flags: 0x2fff000000010200(slab|head) raw: 2fff000000010200 ffffea00045ac408 ffffea0004593208 ffff88811ac0de00 raw: ffff888115c70000 0000000000070002 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888115c71000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888115c71080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888115c71100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888115c71180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888115c71200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Link: https://lore.kernel.org/r/20190930231707.48259-14-bvanassche@acm.org Cc: Honggang LI Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 6eaed91c673ad5baa0af8a05dc756f3a457468f3 Author: Bart Van Assche Date: Mon Sep 30 16:17:04 2019 -0700 RDMA/srpt: Rework the approach for closing an RDMA channel Instead of relying on a waitqueue, report when the identity of an RDMA channel can be reused through a completion. Link: https://lore.kernel.org/r/20190930231707.48259-13-bvanassche@acm.org Cc: Honggang LI Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit b5948cfddecd3af0faeddba9c77f22015959df89 Author: Bart Van Assche Date: Mon Sep 30 16:17:03 2019 -0700 RDMA/srpt: Improve a debug message The ib_srpt driver uses two different identifiers while registering a session with the LIO core. Report both identifiers if the modified pr_debug() statement is enabled. Link: https://lore.kernel.org/r/20190930231707.48259-12-bvanassche@acm.org Cc: Honggang LI Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit cbca2442a096f7fd8b68e6350d35c3a70182ca20 Author: Bart Van Assche Date: Mon Sep 30 16:17:02 2019 -0700 RDMA/srpt: Fix handling of iWARP logins The path_rec pointer is NULL set for IB and RoCE logins but not for iWARP logins. Hence check the path_rec pointer before dereferencing it. Link: https://lore.kernel.org/r/20190930231707.48259-11-bvanassche@acm.org Cc: Honggang LI Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 09f8a1486dcaf69753961a6df6cffdaafc5ccbcb Author: Bart Van Assche Date: Mon Sep 30 16:17:01 2019 -0700 RDMA/srpt: Fix handling of SR-IOV and iWARP ports Management datagrams (MADs) are not supported by SR-IOV VFs nor by iWARP ports. Support SR-IOV VFs and iWARP ports by only logging an error message if MAD handler registration fails. Link: https://lore.kernel.org/r/20190930231707.48259-10-bvanassche@acm.org Cc: Honggang LI Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit fdbcf5c026d17f5babe85d57ac6e053f0605d4b8 Author: Bart Van Assche Date: Mon Sep 30 16:17:00 2019 -0700 RDMA/srp: Make route resolving error messages more informative The IPv6 scope ID is essential when setting up an iWARP connection between IPv6 link-local addresses. Report the scope ID in error messages. Link: https://lore.kernel.org/r/20190930231707.48259-9-bvanassche@acm.org Cc: Honggang LI Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit bf583470617e31c836afc4fa2039dabc43350533 Author: Bart Van Assche Date: Mon Sep 30 16:16:59 2019 -0700 RDMA/srp: Honor the max_send_sge device attribute Instead of assuming that max_send_sge >= 3, restrict the number of scatter gather elements to what is supported by the RDMA adapter. Link: https://lore.kernel.org/r/20190930231707.48259-8-bvanassche@acm.org Cc: Honggang LI Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 14673778d06ee551a55695947548b52d503e7273 Author: Bart Van Assche Date: Mon Sep 30 16:16:58 2019 -0700 RDMA/srp: Remove two casts This patch does not change any functionality. Link: https://lore.kernel.org/r/20190930231707.48259-7-bvanassche@acm.org Cc: Honggang LI Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 934f05b05d73d6c9ad68da66e2fd68abf72d1770 Author: Bart Van Assche Date: Mon Sep 30 16:16:57 2019 -0700 RDMA/siw: Make node GUIDs valid EUI-64 identifiers >From the IBTA: "GUID (Global Unique Identifier): A globally unique EUI-64 compliant identifier." Make sure that siw GUIDs are valid EUI-64 identifiers. Link: https://lore.kernel.org/r/20190930231707.48259-6-bvanassche@acm.org Cc: Bernard Metzler Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 0e5493cab5ef90fb91f89a2dc84259c7a7d7fd50 Author: CQ Tang Date: Fri Oct 4 18:04:32 2019 +0100 drm/i915/stolen: make the object creation interface consistent Our other backends return an actual error value upon failure. Do the same for stolen objects, which currently just return NULL on failure. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191004170452.15410-2-matthew.auld@intel.com commit 97bfe0e05ceb8ff91a331765bff384876ebd5f5e Merge: 9077f052abd5 b74c37fd35a2 Author: David S. Miller Date: Fri Oct 4 11:10:57 2019 -0700 Merge branch 'devlink-allow-devlink-instances-to-change-network-namespace' Jiri Pirko says: ==================== devlink: allow devlink instances to change network namespace Devlink from the beginning counts with network namespaces, but the instances has been fixed to init_net. Implement change of network namespace as part of "devlink reload" procedure like this: $ ip netns add testns1 $ devlink/devlink dev reload netdevsim/netdevsim10 netns testns1 This command reloads device "netdevsim10" into network namespace "testns1". Note that "devlink reload" reinstantiates driver objects, effectively it reloads the driver instance, including possible hw reset etc. Newly created netdevices respect the network namespace of the parent devlink instance and according to that, they are created in target network namespace. Driver is able to refuse to be reloaded into different namespace. That is the case of mlx4 right now. FIB entries and rules are replayed during FIB notifier registration which is triggered during reload (driver instance init). FIB notifier is also registered to the target network namespace, that allows user to use netdevsim devlink resources to setup per-namespace limits of FIB entries and FIB rules. In fact, with multiple netdevsim instances in each network namespace, user might setup different limits. This maintains and extends current netdevsim resources behaviour. Patch 1 prepares netdevsim code for the follow-up changes in the patchset. It does not change the behaviour, only moves pet-init_netns accounting to netdevsim instance, which is also in init_netns. Patches 2-5 prepare the FIB notifier making it per-netns and to behave correctly upon error conditions. Patch 6 just exports a devlink_net helper so it can be used in drivers. Patches 7-9 do preparations in mlxsw driver. Patches 10-13 do preparations in netdevsim driver, namely patch 12 implements proper devlink reload where the driver instance objects are actually re-created as they should be. Patch 14 actually implements the possibility to reload into a different network namespace. Patch 15 adds needed selftests for devlink reload into namespace for netdevsim driver. ==================== Signed-off-by: David S. Miller commit b74c37fd35a28ddcfcdfbf559e16e380e7ba25aa Author: Jiri Pirko Date: Thu Oct 3 11:49:40 2019 +0200 selftests: netdevsim: add tests for devlink reload with resources Add couple of tests for devlink reload testing and also resource limitations testing, along with devlink reload. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 070c63f20f6c739a3c534555f56c7327536bfcc2 Author: Jiri Pirko Date: Thu Oct 3 11:49:39 2019 +0200 net: devlink: allow to change namespaces during reload All devlink instances are created in init_net and stay there for a lifetime. Allow user to be able to move devlink instances into namespaces during devlink reload operation. That ensures proper re-instantiation of driver objects, including netdevices. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4f174bbcc96c80720722e25f198580a184803c3a Author: Jiri Pirko Date: Thu Oct 3 11:49:38 2019 +0200 netdevsim: take devlink net instead of init_net Follow-up patch is going to allow to reload devlink instance into different network namespace, so use devlink_net() helper instead of init_net. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 90d299138dd42579084715d6d25f9c27b63211af Author: Jiri Pirko Date: Thu Oct 3 11:49:37 2019 +0200 netdevsim: register port netdevices into net of device Register newly created port netdevice into net namespace that the parent device belongs to. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 75ba029f3c07f4755b88ee3a9c441e9ffb468e6a Author: Jiri Pirko Date: Thu Oct 3 11:49:36 2019 +0200 netdevsim: implement proper devlink reload During devlink reload, all driver objects should be reinstantiated with the exception of devlink instance and devlink resources and params. Move existing devlink_resource_size_get() calls into fib_create() just before fib notifier is registered. Also, make sure that extack is propagated down to fib_notifier_register() call. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7f36a77ade6eefc243c64c64b8f8252fa43ea55e Author: Jiri Pirko Date: Thu Oct 3 11:49:35 2019 +0200 netdevsim: add all ports in nsim_dev_create() and del them in destroy() Currently the probe/remove function does this separately. Put the addition an deletion of ports into nsim_dev_create() and nsim_dev_destroy(). Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5bcfb6a45a614253a65ad45904fba4d93bde372d Author: Jiri Pirko Date: Thu Oct 3 11:49:34 2019 +0200 mlxsw: Propagate extack down to register_fib_notifier() During the devlink reaload the extack is present, so propagate it all the way down to register_fib_notifier() call in spectrum_router.c. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 6b2a880f9dd1c8632f1afc5e3f77759ce3ff815f Author: Jiri Pirko Date: Thu Oct 3 11:49:33 2019 +0200 mlxsw: Register port netdevices into net of core When creating netdevices for ports, put them under network namespace that the core/parent devlink belongs to. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 053e92aa3c20d37ab40692a851d63b4a40d1ff79 Author: Jiri Pirko Date: Thu Oct 3 11:49:32 2019 +0200 mlxsw: spectrum: Take devlink net instead of init_net Follow-up patch is going to allow to reload devlink instance into different network namespace, so use devlink_net() helper instead of init_net. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 471f894f106573b0b086d1003ee6172253c67b59 Author: Jiri Pirko Date: Thu Oct 3 11:49:31 2019 +0200 net: devlink: export devlink net getter Allow drivers to get net struct for devlink instance. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit b7a595577ef3dc9add2b3e6d00869d017306bfbe Author: Jiri Pirko Date: Thu Oct 3 11:49:30 2019 +0200 net: fib_notifier: propagate extack down to the notifier block callback Since errors are propagated all the way up to the caller, propagate possible extack of the caller all the way down to the notifier block callback. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 3f9e5c119a47d0fce01f8524ff0aba3acca71bb9 Author: Jiri Pirko Date: Thu Oct 3 11:49:29 2019 +0200 mlxsw: spectrum_router: Don't rely on missing extack to symbolize dump Currently if info->extack is NULL, mlxsw assumes that the event came down from dump. Originally, the dump did not propagate the return value back to the original caller (fib_notifier_register()). However, that is now happening. So benefit from this and push the error up if it happened. Remove rule cases in work handlers that are now dead code. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 55c894f762a1a99fca80ee55d593083d78e7e4fb Author: Jiri Pirko Date: Thu Oct 3 11:49:28 2019 +0200 net: fib_notifier: propagate possible error during fib notifier registration Unlike events for registered notifier, during the registration, the errors that happened for the block being registered are not propagated up to the caller. Make sure the error is propagated for FIB rules and entries. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 7c550daffe22a97282effa75fe7c1f6b83563ecb Author: Jiri Pirko Date: Thu Oct 3 11:49:27 2019 +0200 net: fib_notifier: make FIB notifier per-netns Currently all users of FIB notifier only cares about events in init_net. Later in this patchset, users get interested in other namespaces too. However, for every registered block user is interested only about one namespace. Make the FIB notifier registration per-netns and avoid unnecessary calls of notifier block for other namespaces. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit a5facc4cac4dc504397428c936ef1492ce4edd19 Author: Jiri Pirko Date: Thu Oct 3 11:49:26 2019 +0200 netdevsim: change fib accounting and limitations to be per-device Currently, the accounting is done per-namespace. However, devlink instance is always in init_net namespace for now, so only the accounting related to init_net is used. Limitations set using devlink resources are only considered for init_net. nsim_devlink_net() always returns init_net always. Make the accounting per-device. This brings no functional change. Per-device accounting has the same values as per-net. For a single netdevsim instance, the behaviour is exactly the same as before. When multiple netdevsim instances are created, each can have different limits. This is in prepare to implement proper devlink netns support. After that, the devlink instance which would exist in particular netns would account and limit that netns. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 30e0f6cf5acb39cd04316d1eecbf4c6087c7ee02 Author: Potnuri Bharat Teja Date: Mon Sep 30 13:12:52 2019 +0530 RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel Remove iw_cxgb3 module from kernel as the corresponding HW Chelsio T3 has reached EOL. Link: https://lore.kernel.org/r/20190930074252.20133-1-bharat@chelsio.com Signed-off-by: Potnuri Bharat Teja Signed-off-by: Jason Gunthorpe commit 3c0af1dd2fe78adc02fe21f6cfe7d6cb8602573e Author: Patrice Chotard Date: Fri Oct 4 14:36:06 2019 +0200 spi: stm32-qspi: Fix kernel oops when unbinding driver spi_master_put() must only be called in .probe() in case of error. As devm_spi_register_master() is used during probe, spi_master_put() mustn't be called in .remove() callback. It fixes the following kernel WARNING/Oops when executing echo "58003000.spi" > /sys/bus/platform/drivers/stm32-qspi/unbind : ------------[ cut here ]------------ WARNING: CPU: 1 PID: 496 at fs/kernfs/dir.c:1504 kernfs_remove_by_name_ns+0x9c/0xa4 kernfs: can not remove 'uevent', no directory Modules linked in: CPU: 1 PID: 496 Comm: sh Not tainted 5.3.0-rc1-00219-ga0e07bb51a37 #62 Hardware name: STM32 (Device Tree Support) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xb4/0xc8) [] (dump_stack) from [] (__warn.part.3+0xbc/0xd8) [] (__warn.part.3) from [] (warn_slowpath_fmt+0x68/0x8c) [] (warn_slowpath_fmt) from [] (kernfs_remove_by_name_ns+0x9c/0xa4) [] (kernfs_remove_by_name_ns) from [] (device_del+0x128/0x358) [] (device_del) from [] (device_unregister+0x24/0x64) [] (device_unregister) from [] (spi_unregister_controller+0x88/0xe8) [] (spi_unregister_controller) from [] (release_nodes+0x1bc/0x200) [] (release_nodes) from [] (device_release_driver_internal+0xec/0x1ac) [] (device_release_driver_internal) from [] (unbind_store+0x60/0xd4) [] (unbind_store) from [] (kernfs_fop_write+0xe8/0x1c4) [] (kernfs_fop_write) from [] (__vfs_write+0x2c/0x1c0) [] (__vfs_write) from [] (vfs_write+0xa4/0x184) [] (vfs_write) from [] (ksys_write+0x58/0xd0) [] (ksys_write) from [] (ret_fast_syscall+0x0/0x54) Exception stack(0xdd289fa8 to 0xdd289ff0) 9fa0: 0000006c 000e20e8 00000001 000e20e8 0000000d 00000000 9fc0: 0000006c 000e20e8 b6f87da0 00000004 0000000d 0000000d 00000000 00000000 9fe0: 00000004 bee639b0 b6f2286b b6eaf6c6 ---[ end trace 1b15df8a02d76aef ]--- ------------[ cut here ]------------ WARNING: CPU: 1 PID: 496 at fs/kernfs/dir.c:1504 kernfs_remove_by_name_ns+0x9c/0xa4 kernfs: can not remove 'online', no directory Modules linked in: CPU: 1 PID: 496 Comm: sh Tainted: G W 5.3.0-rc1-00219-ga0e07bb51a37 #62 Hardware name: STM32 (Device Tree Support) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xb4/0xc8) [] (dump_stack) from [] (__warn.part.3+0xbc/0xd8) [] (__warn.part.3) from [] (warn_slowpath_fmt+0x68/0x8c) [] (warn_slowpath_fmt) from [] (kernfs_remove_by_name_ns+0x9c/0xa4) [] (kernfs_remove_by_name_ns) from [] (device_remove_attrs+0x20/0x5c) [] (device_remove_attrs) from [] (device_del+0x134/0x358) [] (device_del) from [] (device_unregister+0x24/0x64) [] (device_unregister) from [] (spi_unregister_controller+0x88/0xe8) [] (spi_unregister_controller) from [] (release_nodes+0x1bc/0x200) [] (release_nodes) from [] (device_release_driver_internal+0xec/0x1ac) [] (device_release_driver_internal) from [] (unbind_store+0x60/0xd4) [] (unbind_store) from [] (kernfs_fop_write+0xe8/0x1c4) [] (kernfs_fop_write) from [] (__vfs_write+0x2c/0x1c0) [] (__vfs_write) from [] (vfs_write+0xa4/0x184) [] (vfs_write) from [] (ksys_write+0x58/0xd0) [] (ksys_write) from [] (ret_fast_syscall+0x0/0x54) Exception stack(0xdd289fa8 to 0xdd289ff0) 9fa0: 0000006c 000e20e8 00000001 000e20e8 0000000d 00000000 9fc0: 0000006c 000e20e8 b6f87da0 00000004 0000000d 0000000d 00000000 00000000 9fe0: 00000004 bee639b0 b6f2286b b6eaf6c6 ---[ end trace 1b15df8a02d76af0 ]--- 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 00000050 pgd = e612f14d [00000050] *pgd=ff1f5835 Internal error: Oops: 17 [#1] SMP ARM Modules linked in: CPU: 1 PID: 496 Comm: sh Tainted: G W 5.3.0-rc1-00219-ga0e07bb51a37 #62 Hardware name: STM32 (Device Tree Support) PC is at kernfs_find_ns+0x8/0xfc LR is at kernfs_find_and_get_ns+0x30/0x48 pc : [] lr : [] psr: 40010013 sp : dd289dac ip : 00000000 fp : 00000000 r10: 00000000 r9 : def6ec58 r8 : dd289e54 r7 : 00000000 r6 : c0abb234 r5 : 00000000 r4 : c0d26a30 r3 : ddab5080 r2 : 00000000 r1 : c0abb234 r0 : 00000000 Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: dd11c06a DAC: 00000051 Process sh (pid: 496, stack limit = 0xe13a592d) Stack: (0xdd289dac to 0xdd28a000) 9da0: c0d26a30 00000000 c0abb234 00000000 c02e4ac8 9dc0: 00000000 c0976b44 def6ec00 dea53810 dd289e54 c02e864c c0a61a48 c0a4a5ec 9de0: c0d630a8 def6ec00 c0d04c48 c02e86e0 def6ec00 de909338 c0d04c48 c05833b0 9e00: 00000000 c0638144 dd289e54 def59900 00000000 475b3ee5 def6ec00 00000000 9e20: def6ec00 def59b80 dd289e54 def59900 00000000 c05835f8 def6ec00 c0638dac 9e40: 0000000a dea53810 c0d04c48 c058c580 dea53810 def59500 def59b80 475b3ee5 9e60: ddc63e00 dea53810 dea3fe10 c0d63a0c dea53810 ddc63e00 dd289f78 dd240d10 9e80: 00000000 c0588a44 c0d59a20 0000000d c0d63a0c c0586840 0000000d dd240d00 9ea0: 00000000 00000000 ddc63e00 c02e64e8 00000000 00000000 c0d04c48 dd9bbcc0 9ec0: c02e6400 dd289f78 00000000 000e20e8 0000000d c0266b44 00000055 00000cc0 9ee0: 000000e3 000e3000 dd11c000 dd11c000 00000000 00000000 00000000 00000000 9f00: ffeee38c dff99688 00000000 475b3ee5 00000001 dd289fb0 ddab5080 ddaa5800 9f20: 00000817 000e30ec dd9e7720 475b3ee5 ddaa583c 0000000d dd9bbcc0 000e20e8 9f40: dd289f78 00000000 000e20e8 0000000d 00000000 c02694c0 00000000 00000000 9f60: c0d04c48 dd9bbcc0 00000000 00000000 dd9bbcc0 c0269710 00000000 00000000 9f80: 000a91f4 475b3ee5 0000006c 000e20e8 b6f87da0 00000004 c0101204 dd288000 9fa0: 00000004 c0101000 0000006c 000e20e8 00000001 000e20e8 0000000d 00000000 9fc0: 0000006c 000e20e8 b6f87da0 00000004 0000000d 0000000d 00000000 00000000 9fe0: 00000004 bee639b0 b6f2286b b6eaf6c6 600e0030 00000001 00000000 00000000 [] (kernfs_find_ns) from [] (0xdef6ec00) Code: ebf8eeab c0dc50b8 e92d40f0 e292c000 (e1d035b0) ---[ end trace 1b15df8a02d76af1 ]--- Fixes: a88eceb17ac7 ("spi: stm32-qspi: add spi_master_put in release function") Cc: Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20191004123606.17241-1-patrice.chotard@st.com Signed-off-by: Mark Brown commit 75bb518e9bbf666a851cd43a9aba8e085b5008d8 Author: Kiran Gunda Date: Fri Oct 4 15:38:54 2019 +0530 regulator: qcom-rpmh: add PM6150/PM6150L regulator support Add support for PM6150/PM6150L regulators. This ensures that consumers are able to modify the physical state of PMIC regulators. Signed-off-by: Kiran Gunda Link: https://lore.kernel.org/r/1570183734-30706-3-git-send-email-kgunda@codeaurora.org Signed-off-by: Mark Brown commit 0c06b311c053ab12a9690e17a98ff4e4a90ab3e5 Author: Kiran Gunda Date: Fri Oct 4 15:38:53 2019 +0530 regulator: dt-bindings: Add PM6150x compatibles Add PM6150 and PM6150L compatibles for Qualcomm SC7180 platfrom. Signed-off-by: Kiran Gunda Link: https://lore.kernel.org/r/1570183734-30706-2-git-send-email-kgunda@codeaurora.org Signed-off-by: Mark Brown commit 472b39c3d1bba0616eb0e9a8fa3ad0f56927c7d7 Author: Yizhuo Date: Thu Oct 3 10:58:13 2019 -0700 regulator: max8907: Fix the usage of uninitialized variable in max8907_regulator_probe() Inside function max8907_regulator_probe(), variable val could be uninitialized if regmap_read() fails. However, val is used later in the if statement to decide the content written to "pmic", which is potentially unsafe. Signed-off-by: Yizhuo Link: https://lore.kernel.org/r/20191003175813.16415-1-yzhai003@ucr.edu Signed-off-by: Mark Brown commit 01400bfb2ea76a399448486e2d26f2f1b5a77787 Author: Biju Das Date: Fri Oct 4 07:52:20 2019 +0100 ASoC: rsnd: Document r8a774b1 bindings Document SoC specific bindings for RZ/G2N (r8a774b1) SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1570171940-42937-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Mark Brown commit e66b39af00f426b3356b96433d620cb3367ba1ff Author: Tejun Heo Date: Wed Sep 25 06:59:15 2019 -0700 workqueue: Fix pwq ref leak in rescuer_thread() 008847f66c3 ("workqueue: allow rescuer thread to do more work.") made the rescuer worker requeue the pwq immediately if there may be more work items which need rescuing instead of waiting for the next mayday timer expiration. Unfortunately, it doesn't check whether the pwq is already on the mayday list and unconditionally gets the ref and moves it onto the list. This doesn't corrupt the list but creates an additional reference to the pwq. It got queued twice but will only be removed once. This leak later can trigger pwq refcnt warning on workqueue destruction and prevent freeing of the workqueue. Signed-off-by: Tejun Heo Cc: "Williams, Gerald S" Cc: NeilBrown Cc: stable@vger.kernel.org # v3.19+ commit c29eb85386880750130a01aabf288408a6614d65 Author: Tejun Heo Date: Mon Sep 23 11:08:58 2019 -0700 workqueue: more destroy_workqueue() fixes destroy_workqueue() warnings still, at a lower frequency, trigger spuriously. The problem seems to be in-flight operations which haven't reached put_pwq() yet. * Make sanity check grab all the related locks so that it's synchronized against operations which puts pwq at the end. * Always print out the offending pwq. Signed-off-by: Tejun Heo Cc: "Williams, Gerald S" commit 7971f4be9f49cdf10b4998ba499243c10d7a801a Author: Krzysztof Kozlowski Date: Fri Sep 20 18:21:24 2019 +0200 dt-bindings: watchdog: meson-gxbb-wdt: Include generic watchdog bindings Include generic watchdog DT schema bindings in Amlogic GXBB Watchdog bindings. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Rob Herring commit 6fd64049cfe1eb07570726c423afec8aa1cb082b Author: Krzysztof Kozlowski Date: Fri Sep 20 18:21:23 2019 +0200 dt-bindings: watchdog: Add missing clocks requirement in Samsung SoC watchdog The Samsung SoC watchdog driver always required providing a clock (either through platform data or from DT). However when bindings were added in commit 9487a9cc7140 ("watchdog: s3c2410: Add support for device tree based probe"), they missed the requirement of clock. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 79df4a9b547ffa7de73d8fc29a7b2c2e372cccb7 Author: Krzysztof Kozlowski Date: Fri Sep 20 18:21:22 2019 +0200 dt-bindings: watchdog: Convert Samsung SoC watchdog bindings to json-schema Convert Samsung S3C/S5P/Exynos watchdog bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit faf66c22e6470f5aa65e8c5643112a9db4c0f7c2 Author: Yoshihiro Kaneko Date: Sat Sep 21 04:36:29 2019 +0900 dt-bindings: pwm: renesas: tpu: convert bindings to json-schema Convert Renesas R-Car Timer Pulse Unit PWM Controller bindings documentation to json-schema. Signed-off-by: Yoshihiro Kaneko Reviewed-by: Simon Horman Signed-off-by: Rob Herring commit 2a197ce6720a5431f3ffaa571ce108a5553a9bb3 Author: Yoshihiro Kaneko Date: Sat Sep 21 04:35:27 2019 +0900 dt-bindings: pwm: renesas: pwm-rcar: convert bindings to json-schema Convert Renesas R-Car PWM Timer Controller bindings documentation to json-schema. Signed-off-by: Yoshihiro Kaneko Reviewed-by: Simon Horman Signed-off-by: Rob Herring commit 4f69851fbaa26b155330be35ce8ac393e93e7442 Author: Dan Carpenter Date: Fri Oct 4 13:22:51 2019 +0300 drm/i810: Prevent underflow in ioctl The "used" variables here come from the user in the ioctl and it can be negative. It could result in an out of bounds write. Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191004102251.GC823@mwanda Cc: stable@vger.kernel.org commit 5121b4219972c16e9ac92545a6743af2e99d4abc Author: Piotr Sroka Date: Thu Sep 26 09:13:21 2019 +0100 dt-bindings: mtd: Add Cadence NAND controller driver Document the bindings used by Cadence NAND controller driver Signed-off-by: Piotr Sroka Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal commit ec4ba01e894d3165e4d1ccbef782ef5593b708b4 Author: Piotr Sroka Date: Thu Sep 26 09:11:36 2019 +0100 mtd: rawnand: Add new Cadence NAND driver to MTD subsystem Add new Cadence NAND driver to MTD subsystem Signed-off-by: Piotr Sroka Reported-by: kbuild test robot Reported-by: Julia Lawall Signed-off-by: Miquel Raynal commit a3c4c2339f8948b0f578e938970303a7372e60c0 Author: Piotr Sroka Date: Tue Sep 24 06:54:31 2019 +0100 mtd: rawnand: Change calculating of position page containing BBM Change calculating of position page containing BBM If none of BBM flags are set then function nand_bbm_get_next_page reports EINVAL. It causes that BBM is not read at all during scanning factory bad blocks. The result is that the BBT table is build without checking factory BBM at all. For Micron flash memories none of these flags are set if page size is different than 2048 bytes. Address this regression by: - adding NAND_BBM_FIRSTPAGE chip flag without any condition. It solves issue only for Micron devices. - changing the nand_bbm_get_next_page_function. It will return 0 if no of BBM flag is set and page parameter is 0. After that modification way of discovering factory bad blocks will work similar as in kernel version 5.1. Cc: stable@vger.kernel.org Fixes: f90da7818b14 (mtd: rawnand: Support bad block markers in first, second or last page) Signed-off-by: Piotr Sroka Reviewed-by: Frieder Schrempf Signed-off-by: Miquel Raynal commit 83156c1c6c283e32397498f839347c510ef1107d Author: Kamal Dasu Date: Fri Sep 6 15:47:15 2019 -0400 mtd: nand: brcmnand: Add support for flash-dma v0 This change adds support for flash dma v0.0. Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal commit 3079b54aa9a0f0432b88a52e205cfa3486898330 Author: Jean Delvare Date: Wed Oct 2 10:48:44 2019 +0200 eeprom: Warn that the driver is deprecated Deprecating the driver in Kconfig is one thing, but we also need to let the users themselves know. Log a warning each time a device is bound to the deprecated eeprom driver. Signed-off-by: Jean Delvare Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191002104844.1dc4d8f3@endymion Signed-off-by: Greg Kroah-Hartman commit 780ee709bdb49c0d3562890855d7ff7919e64075 Author: Tomas Winkler Date: Fri Oct 4 21:26:59 2019 +0300 mei: buf: drop 'running hook' debug messages. Drop 'running hook' debug messages, as this info can be already retrieved via ftrace. Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191004182659.2933-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 7d423af9bfb172c3802cc1ca6591ac608c26a311 Author: Ville Syrjälä Date: Thu Oct 3 17:02:31 2019 +0300 drm/i915: Implement a better i945gm vblank irq vs. C-states workaround The current "disable C3+" workaround for the delayed vblank irqs on i945gm no longer works. I'm not sure what changed, but now I need to also disable C2. I also got my hands on a i915gm machine that suffers from the same issue. After some furious poking of registers I managed to find a better workaround: The "Do not Turn off Core Render Clock in C states" bit. With that I no longer have to disable any C-states, and as a nice bonus the power cost is only ~1/4 of the "disable C3+" method (which mind you doesn't even work anymore, and so would have an even higher power cost if we made it work by also disabling C2). So let's throw out all the cpuidle/qos crap and just toggle the magic bit as needed. And we extend the workaround to cover i915gm as well. Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191003140231.24408-1-ville.syrjala@linux.intel.com Acked-by: Chris Wilson commit d4387cd117414ba80230f27a514be5ca4a09cfcc Author: Saravana Kannan Date: Wed Sep 4 14:11:25 2019 -0700 of: property: Create device links for all child-supplier depencencies A parent device can have child devices that it adds when it probes. But this probing of the parent device can happen way after kernel init is done -- for example, when the parent device's driver is loaded as a module. In such cases, if the child devices depend on a supplier in the system, we need to make sure the supplier gets the sync_state() callback only after these child devices are added and probed. To achieve this, when creating device links for a device by looking at its DT node, don't just look at DT references at the top node level. Look at DT references in all the descendant nodes too and create device links from the ancestor device to all these supplier devices. This way, when the parent device probes and adds child devices, the child devices can then create their own device links to the suppliers and further delay the supplier's sync_state() callback to after the child devices are probed. Example: In this illustration, -> denotes DT references and indentation represents child status. Device node A Device node B -> D Device node C -> B, D Device node D Assume all these devices have their drivers loaded as modules. Without this patch, this is the sequence of events: 1. D is added. 2. A is added. 3. Device D probes. 4. Device D gets its sync_state() callback. 5. Device B and C might malfunction because their resources got altered/turned off before they can make active requests for them. With this patch, this is the sequence of events: 1. D is added. 2. A is added and creates device links to D. 3. Device link from A to B is not added because A is a parent of B. 4. Device D probes. 5. Device D does not get it's sync_state() callback because consumer A hasn't probed yet. 5. Device A probes. 5. a. Devices B and C are added. 5. b. Device links from B and C to D are added. 5. c. Device A's probe completes. 6. Device D does not get it's sync_state() callback because consumer A has probed but consumers B and C haven't probed yet. 7. Device B and C probe. 8. Device D gets it's sync_state() callback because all its consumers have probed. 9. None of the devices malfunction. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20190904211126.47518-7-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 5e6669387e2287f25f09fd0abd279dae104cfa7e Author: Saravana Kannan Date: Wed Sep 4 14:11:24 2019 -0700 of/platform: Pause/resume sync state during init and of_platform_populate() When all the top level devices are populated from DT during kernel init, the supplier devices could be added and probed before the consumer devices are added and linked to the suppliers. To avoid the sync_state() callback from being called prematurely, pause the sync_state() callbacks before populating the devices and resume them at late_initcall_sync(). Similarly, when children devices are populated from a module using of_platform_populate(), there could be supplier-consumer dependencies between the children devices that are populated. To avoid the same problem with sync_state() being called prematurely, pause and resume sync_state() callbacks across of_platform_populate(). Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20190904211126.47518-6-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit fc5a251d0fd7ca9038bab78a8c97932c8c6ca23b Author: Saravana Kannan Date: Wed Sep 4 14:11:23 2019 -0700 driver core: Add sync_state driver/bus callback This sync_state driver/bus callback is called once all the consumers of a supplier have probed successfully. This allows the supplier device's driver/bus to sync the supplier device's state to the software state with the guarantee that all the consumers are actively managing the resources provided by the supplier device. To maintain backwards compatibility and ease transition from existing frameworks and resource cleanup schemes, late_initcall_sync is the earliest when the sync_state callback might be called. There is no upper bound on the time by which the sync_state callback has to be called. This is because if a consumer device never probes, the supplier has to maintain its resources in the state left by the bootloader. For example, if the bootloader leaves the display backlight at a fixed voltage and the backlight driver is never probed, you don't want the backlight to ever be turned off after boot up. Also, when multiple devices are added after kernel init, some suppliers could be added before their consumer devices get added. In these instances, the supplier devices could get their sync_state callback called right after they probe because the consumers devices haven't had a chance to create device links to the suppliers. To handle this correctly, this change also provides APIs to pause/resume sync state callbacks so that when multiple devices are added, their sync_state callback evaluation can be postponed to happen after all of them are added. kbuild test robot reported missing documentation for device.state_synced Reported-by: kbuild test robot Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20190904211126.47518-5-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit a3e1d1a7f5fcccaf1d252278425fea9a4a553100 Author: Saravana Kannan Date: Wed Sep 4 14:11:22 2019 -0700 of: property: Add functional dependency link from DT bindings Add device links after the devices are created (but before they are probed) by looking at common DT bindings like clocks and interconnects. Automatically adding device links for functional dependencies at the framework level provides the following benefits: - Optimizes device probe order and avoids the useless work of attempting probes of devices that will not probe successfully (because their suppliers aren't present or haven't probed yet). For example, in a commonly available mobile SoC, registering just one consumer device's driver at an initcall level earlier than the supplier device's driver causes 11 failed probe attempts before the consumer device probes successfully. This was with a kernel with all the drivers statically compiled in. This problem gets a lot worse if all the drivers are loaded as modules without direct symbol dependencies. - Supplier devices like clock providers, interconnect providers, etc need to keep the resources they provide active and at a particular state(s) during boot up even if their current set of consumers don't request the resource to be active. This is because the rest of the consumers might not have probed yet and turning off the resource before all the consumers have probed could lead to a hang or undesired user experience. Some frameworks (Eg: regulator) handle this today by turning off "unused" resources at late_initcall_sync and hoping all the devices have probed by then. This is not a valid assumption for systems with loadable modules. Other frameworks (Eg: clock) just don't handle this due to the lack of a clear signal for when they can turn off resources. This leads to downstream hacks to handle cases like this that can easily be solved in the upstream kernel. By linking devices before they are probed, we give suppliers a clear count of the number of dependent consumers. Once all of the consumers are active, the suppliers can turn off the unused resources without making assumptions about the number of consumers. By default we just add device-links to track "driver presence" (probe succeeded) of the supplier device. If any other functionality provided by device-links are needed, it is left to the consumer/supplier devices to change the link when they probe. kbuild test robot reported clang error about missing const Reported-by: kbuild test robot Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20190904211126.47518-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit e2ae9bcc4aaacda04edb75c4eea93384719efaa5 Author: Saravana Kannan Date: Wed Sep 4 14:11:21 2019 -0700 driver core: Add support for linking devices during device addition The firmware corresponding to a device (dev.fwnode) might be able to provide functional dependency information between a device and its supplier and consumer devices. Tracking this functional dependency allows optimizing device probe order and informing a supplier when all its consumers have probed (and thereby actively managing their resources). The existing device links feature allows tracking and using supplier-consumer relationships. So, this patch adds the add_links() fwnode callback to allow firmware to create device links for each device as the device is added. However, when consumer devices are added, they might not have a supplier device to link to despite needing mandatory resources/functionality from one or more suppliers. A waiting_for_suppliers list is created to track such consumers and retry linking them when new devices get added. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20190904211126.47518-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 372a67c0c5ef63f55bd1eb480d9555328d8ec0f2 Author: Saravana Kannan Date: Wed Sep 4 14:11:20 2019 -0700 driver core: Add fwnode_to_dev() to look up device from fwnode It's often useful to look up a device that corresponds to a fwnode. So add an API to do that irrespective of the bus on which the device has been added to. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20190904211126.47518-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit b91fec1ecf6f0a93d909f8cb98ad8aea7109e81b Author: Benjamin Poirier Date: Fri Sep 27 19:12:11 2019 +0900 staging: qlge: Refill empty buffer queues from wq When operating at mtu 9000, qlge does order-1 allocations for rx buffers in atomic context. This is especially unreliable when free memory is low or fragmented. Add an approach similar to commit 3161e453e496 ("virtio: net refill on out-of-memory") to qlge so that the device doesn't lock up if there are allocation failures. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-18-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit 6e9c52b920974b90c4ca994c5d8c5bc56742017f Author: Benjamin Poirier Date: Fri Sep 27 19:12:10 2019 +0900 staging: qlge: Refill rx buffers up to multiple of 16 Reading the {s,l}bq_prod_idx registers on a running device, it appears that the adapter will only use buffers up to prod_idx & 0xfff0. The driver currently uses fixed-size guard zones (16 for sbq, 32 for lbq - don't know why this difference). After the previous patch, this approach no longer guarantees prod_idx values aligned on multiples of 16. While it appears that we can write unaligned values to prod_idx without ill effects on device operation, it makes more sense to change qlge_refill_bq() to refill up to a limit that corresponds with the device's behavior. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-17-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit aec626d2092f2b203f4acec5b57ed7c1e3095802 Author: Benjamin Poirier Date: Fri Sep 27 19:12:09 2019 +0900 staging: qlge: Update buffer queue prod index despite oom Currently, if we repeatedly fail to allocate all of the buffers from the desired batching budget, we will never update the prod_idx register. Restructure code to always update prod_idx if new buffers could be allocated. This eliminates the current two stage process (clean_idx -> prod_idx) and some associated bookkeeping variables. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-16-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit c8c1ff5c19021a241afa78d1272c23ef7e7297aa Author: Benjamin Poirier Date: Fri Sep 27 19:12:08 2019 +0900 staging: qlge: Replace memset with assignment Instead of clearing the structure wholesale, it is sufficient to initialize the skb member which is used to manage sbq instances. lbq instances are managed according to curr_idx and clean_idx. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-15-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit 7be4c3f92077e4c5e1423edc5056c890f8bddfc7 Author: Benjamin Poirier Date: Fri Sep 27 19:12:07 2019 +0900 staging: qlge: Remove useless memset This just repeats what the other memset a few lines above did. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-14-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit ec705b983b46b8e2d3cafd40c188458bf4241f11 Author: Benjamin Poirier Date: Fri Sep 27 19:12:06 2019 +0900 staging: qlge: Remove qlge_bq.len & size Given the way the driver currently works, these values are always known at compile time. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-13-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit dc4eec33bf15eb936d1888872f4039d53565d26c Author: Benjamin Poirier Date: Fri Sep 27 19:12:05 2019 +0900 staging: qlge: Factor out duplicated expression Given that (u16) 65536 == 0, that expression can be replaced by a simple cast. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-12-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit e4c911a73c8948a679981c2001c0aed9d0054ab1 Author: Benjamin Poirier Date: Fri Sep 27 19:12:04 2019 +0900 staging: qlge: Remove rx_ring.type This field is redundant, the type can be determined from the index, cq_id. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-11-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit 6f5740b1d35ea9d25b895c0eb836aaa7b1ee427b Author: Benjamin Poirier Date: Fri Sep 27 19:12:03 2019 +0900 staging: qlge: Fix dma_sync_single calls Using the unmap addr elsewhere than unmap calls is a misuse of the dma api. In prevision of this fix, qlge kept two copies of the dma address around ;) Fixes: c4e84bde1d59 ("qlge: New Qlogic 10Gb Ethernet Driver.") Fixes: 7c734359d350 ("qlge: Size RX buffers based on MTU.") Fixes: 2c9a266afefe ("qlge: Fix receive packets drop.") Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-10-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit 03a0e14bd8bc8df2ea478b336ee65f429375acbb Author: Benjamin Poirier Date: Fri Sep 27 19:12:02 2019 +0900 staging: qlge: Deduplicate rx buffer queue management The qlge driver (and device) uses two kinds of buffers for reception, so-called "small buffers" and "large buffers". The two are arranged in rings, the sbq and lbq. These two share similar data structures and code. Factor out data structures into a common struct qlge_bq, make required adjustments to code and dedup the most obvious cases of copy/paste. This patch should not introduce any functional change other than to some of the printk format strings. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-9-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit cf1c2987bfd890a9c4ef3f174ed6148ec9b2b622 Author: Benjamin Poirier Date: Fri Sep 27 19:12:01 2019 +0900 staging: qlge: Remove useless dma synchronization calls This is unneeded for two reasons: 1) the cpu does not write data for the device in the mapping 2) calls like ..._sync_..._for_device(..., ..._FROMDEVICE) are nonsensical, see commit 3f0fb4e85b38 ("Documentation/DMA-API-HOWTO.txt: fix misleading example") Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-8-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit 16714d98bf631909864f7eacd591ab5f7cf1588c Author: Benjamin Poirier Date: Fri Sep 27 19:12:00 2019 +0900 staging: qlge: Remove rx_ring.sbq_buf_size Tx completion rings have sbq_buf_size = 0 but there's no case where the code actually tests on that value. We can remove sbq_buf_size and use a constant instead. Signed-off-by: Benjamin Poirier Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20190927101210.23856-7-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit a68a5b2fd3a2490b74cbdda53fb2de5302e973bb Author: Benjamin Poirier Date: Fri Sep 27 19:11:59 2019 +0900 staging: qlge: Remove bq_desc.maplen The size of the mapping is known statically in all cases, there's no need to save it at runtime. Remove this member. Signed-off-by: Benjamin Poirier Acked-by: Manish Chopra Link: https://lore.kernel.org/r/20190927101210.23856-6-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit 2b27fc39da55ee45ad30bcf2f7b4deb017cb89b8 Author: Benjamin Poirier Date: Fri Sep 27 19:11:58 2019 +0900 staging: qlge: Deduplicate lbq_buf_size lbq_buf_size is duplicated to every rx_ring structure whereas lbq_buf_order is present once in the ql_adapter structure. All rings use the same buf size, keep only one copy of it. Also factor out the calculation of lbq_buf_size instead of having two copies. Signed-off-by: Benjamin Poirier Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20190927101210.23856-5-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit f70e8459fdea1905ca9bfbf987daf9f1a1c545e8 Author: Benjamin Poirier Date: Fri Sep 27 19:11:57 2019 +0900 staging: qlge: Remove page_chunk.last_flag As already done in ql_get_curr_lchunk(), this member can be replaced by a simple test. Signed-off-by: Benjamin Poirier Acked-by: Manish Chopra Link: https://lore.kernel.org/r/20190927101210.23856-4-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit e759b5cf70894a1a4a6a5e60a3bd63b7dc788b01 Author: Benjamin Poirier Date: Fri Sep 27 19:11:56 2019 +0900 staging: qlge: Remove irq_cnt qlge uses an irq enable/disable refcounting scheme that is: * poorly implemented Uses a spin_lock to protect accesses to the irq_cnt atomic variable. * buggy Breaks when there is not a 1:1 sequence of irq - napi_poll, such as when using SO_BUSY_POLL. * unnecessary The purpose or irq_cnt is to reduce irq control writes when multiple work items result from one irq: the irq is re-enabled after all work is done. Analysis of the irq handler shows that there is only one case where there might be two workers scheduled at once, and those have separate irq masking bits. Therefore, remove irq_cnt. Additionally, we get a performance improvement: perf stat -e cycles -a -r5 super_netperf 100 -H 192.168.33.1 -t TCP_RR Before: 628560 628056 622103 622744 627202 [...] 268,803,947,669 cycles ( +- 0.09% ) After: 636300 634106 634984 638555 634188 [...] 259,237,291,449 cycles ( +- 0.19% ) Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-3-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit d7618e38461e6a3f190d88fb941befd51b7c29b0 Author: Benjamin Poirier Date: Fri Sep 27 19:11:55 2019 +0900 staging: qlge: Fix irq masking in INTx mode Tracing the driver operation reveals that the INTR_EN_EN bit (per-queue interrupt control) does not immediately prevent rx completion interrupts when the device is operating in INTx mode. This leads to interrupts being raised while napi is scheduled/running. Those interrupts are ignored by qlge_isr() and falsely reported as IRQ_NONE thanks to the irq_cnt scheme. This in turn can cause frames to loiter in the receive queue until a later frame leads to another rx interrupt that will schedule napi. Use the INTR_EN_EI bit (master interrupt control) instead. Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20190927101210.23856-2-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman commit eff9771d51529acf7f6f58a60b2923b98da28f0e Author: Iuliana Prodan Date: Thu Sep 26 15:26:29 2019 +0300 crypto: caam - use mapped_{src,dst}_nents for descriptor The mapped_{src,dst}_nents _returned_ from the dma_map_sg call (which could be less than src/dst_nents) have to be used to generate the job descriptors. Signed-off-by: Iuliana Prodan Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 554c42b4efd486c322a46420f9cf0f6c767ac02c Author: Corentin Labbe Date: Tue Sep 24 10:08:32 2019 +0200 crypto: sun4i-ss - enable pm_runtime This patch enables power management on the Security System. sun4i-ss now depends on PM because it simplify code and prevent some ifdef. But this is not a problem since arch maintainer want ARCH_SUNXI to depend on PM in the future. Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard Signed-off-by: Herbert Xu commit 70dd444ad0a023d853b5d84e68226a792bb17a82 Author: Corentin Labbe Date: Tue Sep 24 10:08:31 2019 +0200 crypto: sun4i-ss - simplify enable/disable of the device This patch regroups resource enabling/disabling in dedicated function. This simplify error handling and will permit to support power management. Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard Signed-off-by: Herbert Xu commit 6a97a99db848748d582d79447f7c9c330ce1688e Author: Phani Kiran Hemadri Date: Fri Sep 20 06:35:19 2019 +0000 crypto: cavium/nitrox - fix firmware assignment to AE cores This patch fixes assigning UCD block number of Asymmetric crypto firmware to AE cores of CNN55XX device. Fixes: a7268c4d4205 ("crypto: cavium/nitrox - Add support for loading asymmetric crypto firmware") Signed-off-by: Phani Kiran Hemadri Reviewed-by: Srikanth Jampala Signed-off-by: Herbert Xu commit f65eae617e5d0d43575b767b02d9bd04f8349fd2 Author: Eneas U de Queiroz Date: Thu Sep 19 18:33:02 2019 -0300 crypto: qce - add CRYPTO_ALG_KERN_DRIVER_ONLY flag Set the CRYPTO_ALG_KERN_DRIVER_ONLY flag to all algorithms exposed by the qce driver, since they are all hardware accelerated, accessible through a kernel driver only, and not available directly to userspace. Signed-off-by: Eneas U de Queiroz Signed-off-by: Herbert Xu commit 3dc8b01ebcdd3a43d6c766618b92c2becbcf96b8 Author: Christophe JAILLET Date: Thu Sep 19 22:04:28 2019 +0200 crypto: chtls - simplify a bit 'create_flowc_wr_skb()' Use '__skb_put_data()' instead of rewritting it. This improves readability. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit 128c66429247add5128c03dc1e144ca56f05a4e2 Author: Navid Emamdoost Date: Thu Sep 19 11:04:48 2019 -0500 crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit a7174f978563e112fcd8601c9f8b4a9ddef3388d Author: Arnd Bergmann Date: Thu Sep 19 16:09:06 2019 +0200 crypto: hisilicon - allow compile-testing on x86 To avoid missing arm64 specific warnings that get introduced in this driver, allow compile-testing on all 64-bit architectures. The only actual arm64 specific code in this driver is an open- coded 128 bit MMIO write. On non-arm64 the same can be done using memcpy_toio. What I also noticed is that the mmio store (either one) is not endian-safe, this will only work on little- endian configurations, so I also add a Kconfig dependency on that, regardless of the architecture. Finally, a depenndecy on CONFIG_64BIT is needed because of the writeq(). Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu commit 5fd39c4d96c9bcbda46960772a01d90f5f72037f Author: Pascal van Leeuwen Date: Wed Sep 18 12:41:26 2019 +0200 crypto: inside-secure - Add support for the EIP196 This patch adds support for the EIP196, which is an EIP197 derivative that has no classification hardware and a simplified record cache. The patch has been tested with the eip196b-ie and eip197c-iewxkbc configurations on the Xilinx VCU118 development board as well as on the Macchiatobin board (Marvell A8K - EIP197b-ieswx), including the crypto extra tests. Note that this patchset applies on top of the earlier submitted "Add support for eip197f_iewc" series. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 9e5de3e06e54d4d913a5b4801be86d01aeb9918a Author: Nagadheeraj Rottela Date: Wed Sep 18 09:39:34 2019 +0000 crypto: cavium/nitrox - Add mailbox message to get mcode info in VF Add support to get microcode information in VF from PF via mailbox message. Signed-off-by: Nagadheeraj Rottela Reviewed-by: Srikanth Jampala Signed-off-by: Herbert Xu commit 0600e9c07103c4694e0c0b0eff8cf6cf8a17ac42 Author: Markus Elfring Date: Wed Sep 18 09:34:11 2019 +0200 hwrng: mediatek - Use devm_platform_ioremap_resource() in mtk_rng_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu commit e1f653cbe7dd615edc8e3ffe396be03068feed81 Author: Alexander E. Patrakov Date: Wed Sep 18 12:28:49 2019 +0500 crypto: jitter - fix comments One should not say "ec can be NULL" and then dereference it. One cannot talk about the return value if the function returns void. Signed-off-by: Alexander E. Patrakov Signed-off-by: Herbert Xu commit a68b931932c5574aa5bd459529c766ba577c72b3 Author: Markus Elfring Date: Wed Sep 18 09:09:22 2019 +0200 hwrng: iproc-rng200 - Use devm_platform_ioremap_resource() in iproc_rng200_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Ray Jui Reviewed-by: Florian Fainelli Signed-off-by: Herbert Xu commit 946a4a2a49195e2d45c71fcb0d887fc1b3fad567 Author: Pascal van Leeuwen Date: Wed Sep 18 08:42:40 2019 +0200 crypto: inside-secure - Add support for HW with less ring AIC's than rings The current driver assumes one dedicated ring interrupt controller per ring. However, some existing EIP(1)97 HW has less ring AIC's than rings. This patch allows the driver to work with such HW by detecting how many ring AIC's are present and restricting the number of rings it *uses* by the number of ring AIC's present. This allows it to at least function. (optimization for the future: add ring dispatch functionality in the interrupt service routine such that multiple rings can be supported from one ring AIC, allowing all rings to be used) Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 84ca4e54ab792b550b802950639ab31c57ebe989 Author: Pascal van Leeuwen Date: Wed Sep 18 08:42:39 2019 +0200 crypto: inside-secure - Add support for 256 bit wide internal bus This patch adds support for large EIP197's with a 256 bit wide internal bus, which affects the format of the result descriptor due to internal alignment requirements. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit a9a89624f086d82483b5e26bb98e8a04a6d9ab0a Author: Pascal van Leeuwen Date: Tue Sep 17 12:08:01 2019 +0200 crypto: inside-secure - Added support for the rfc4309(ccm(aes)) AEAD This patch adds support for rfc4309(ccm(aes)) for use with IPsec ESP Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 92c60cefa465035e8ce4949c62a3c38269f3d1eb Author: Pascal van Leeuwen Date: Tue Sep 17 12:08:00 2019 +0200 crypto: inside-secure - Added support for the rfc4543(gcm(aes)) "AEAD" This patch adds support for rfc4543(gcm(aes)) - i.e. AES-GMAC - for use with IPsec ESP Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit a19052d4228783052c0ebcb83f74ccac3986acdf Author: Pascal van Leeuwen Date: Tue Sep 17 12:07:59 2019 +0200 crypto: inside-secure - Added support for the rfc4106(gcm(aes)) AEAD This patch adds support for rfc4106(gcm(aes)) for use with IPsec ESP Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit d96cf190e5dc1838b8529bad271f2261d07870e8 Author: Pascal van Leeuwen Date: Tue Sep 17 11:55:19 2019 +0200 crypto: inside-secure - Fixed corner case TRC admin RAM probing issue This patch fixed a corner case admin RAM probing issue witnessed on the Xilinx VCU118 FPGA development board with an EIP197 configuration with 4096 words of admin RAM, of which only 2050 were recognised. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit b8c5d882c8334d05754b69dcdf1cfd6bc48a9e12 Author: Pascal van Leeuwen Date: Tue Sep 17 11:55:18 2019 +0200 crypto: inside-secure - Fix stability issue with Macchiatobin This patch corrects an error in the Transform Record Cache initialization code that was causing intermittent stability problems on the Macchiatobin board. Unfortunately, due to HW platform specifics, the problem could not happen on the main development platform, being the VCU118 Xilinx development board. And since it was a problem with hash table access, it was very dependent on the actual physical context record DMA buffers being used, i.e. with some (bad) luck it could seemingly work quit stable for a while. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit ced0a170fd6ba70bd32082f1b876e215a6460e8c Author: Nagadheeraj Rottela Date: Tue Sep 17 06:36:50 2019 +0000 crypto: cavium/nitrox - Fix cbc ciphers self test failures Self test failures are due to wrong output IV. This patch fixes this issue by copying back output IV into skcipher request. Signed-off-by: Nagadheeraj Rottela Reviewed-by: Srikanth Jampala Signed-off-by: Herbert Xu commit 3fed9baad5fdaa4a1d174326f71f1952c7b66c04 Author: Nagadheeraj Rottela Date: Mon Sep 16 06:42:06 2019 +0000 crypto: cavium/nitrox - check assoclen and authsize for gcm(aes) cipher Check if device supports assoclen to solve hung task timeout error when extra tests are enabled. Return -EINVAL if assoclen is not supported. Check authsize to return -EINVAL if authentication tag size is invalid. Change blocksize to 1 to match with generic implementation. Signed-off-by: Nagadheeraj Rottela Reported-by: Mallesham Jatharakonda Suggested-by: Mallesham Jatharakonda Reviewed-by: Srikanth Jampala Signed-off-by: Herbert Xu commit bac5c49ec29a0dd1a298211c392154c9db3050b2 Author: Tony Lindgren Date: Sat Sep 14 14:03:00 2019 -0700 hwrng: omap3-rom - Use devm hwrng and runtime PM This allows us to simplify things more for probe and exit. Cc: Aaro Koskinen Cc: Adam Ford Cc: Pali Rohár Cc: Sebastian Reichel Cc: Tero Kristo Suggested-by: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Herbert Xu commit 8d9d4bdc495f5e57877f9ec59af323fcbf3485fe Author: Tony Lindgren Date: Sat Sep 14 14:02:59 2019 -0700 hwrng: omap3-rom - Use runtime PM instead of custom functions Nowadays we have runtime PM, and we can use it with autosuspend_timeout to idle things automatically. This allows us to get rid of the custom PM implementation. We enable clocks and init RNG in runtime_resume, and reset RNG and disable clocks in runtime_suspend. And then omap3_rom_rng_read() becomes very simple and we don't need the old functions for omap3_rom_rng_idle() and omap3_rom_rng_get_random(). We can now also get rid of pr_fmt as we're using dev_err instead. Cc: Aaro Koskinen Cc: Adam Ford Cc: Pali Rohár Cc: Sebastian Reichel Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Herbert Xu commit b8d665aed401b51297d8f2e9fbf2774e94d278bf Author: Tony Lindgren Date: Sat Sep 14 14:02:58 2019 -0700 hwrng: omap3-rom - Update to use standard driver data Let's update omap3-rom-rng to use standard driver data to make it easier to add runtime PM support in the following patch. Just use it for the rng ops and clock for now. Let's still keep also old rng_clk still around, we will remove delayed work and rng_clk with runtime PM in the next patch. Cc: Aaro Koskinen Cc: Adam Ford Cc: Pali Rohár Cc: Sebastian Reichel Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Herbert Xu commit a0f19a894c46e5ceb7334d4d66453e566152ed1e Author: Tony Lindgren Date: Sat Sep 14 14:02:57 2019 -0700 hwrng: omap3-rom - Initialize default quality to get data Similar to commit 62f95ae805fa ("hwrng: omap - Set default quality") we need to initialize the default quality for the RNG to be used. The symptoms of this problem is that doing hd /dev/random does not produce much data at all. Cc: Aaro Koskinen Cc: Adam Ford Cc: Pali Rohár Cc: Sebastian Reichel Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Herbert Xu commit eaecce12f5f0d2c35d278e41e1bc4522393861ab Author: Tony Lindgren Date: Sat Sep 14 14:02:56 2019 -0700 hwrng: omap3-rom - Call clk_disable_unprepare() on exit only if not idled When unloading omap3-rom-rng, we'll get the following: WARNING: CPU: 0 PID: 100 at drivers/clk/clk.c:948 clk_core_disable This is because the clock may be already disabled by omap3_rom_rng_idle(). Let's fix the issue by checking for rng_idle on exit. Cc: Aaro Koskinen Cc: Adam Ford Cc: Pali Rohár Cc: Sebastian Reichel Cc: Tero Kristo Fixes: 1c6b7c2108bd ("hwrng: OMAP3 ROM Random Number Generator support") Signed-off-by: Tony Lindgren Signed-off-by: Herbert Xu commit 0c0ef9ea6f3f0d5979dc7b094b0a184c1a94716b Author: Tony Lindgren Date: Sat Sep 14 14:02:55 2019 -0700 hwrng: omap3-rom - Fix missing clock by probing with device tree Commit 0ed266d7ae5e ("clk: ti: omap3: cleanup unnecessary clock aliases") removed old omap3 clock framework aliases but caused omap3-rom-rng to stop working with clock not found error. Based on discussions on the mailing list it was requested by Tero Kristo that it would be best to fix this issue by probing omap3-rom-rng using device tree to provide a proper clk property. The other option would be to add back the missing clock alias, but that does not help moving things forward with removing old legacy platform_data. Let's also add a proper device tree binding and keep it together with the fix. Cc: devicetree@vger.kernel.org Cc: Aaro Koskinen Cc: Adam Ford Cc: Pali Rohár Cc: Rob Herring Cc: Sebastian Reichel Cc: Tero Kristo Fixes: 0ed266d7ae5e ("clk: ti: omap3: cleanup unnecessary clock aliases") Reported-by: Aaro Koskinen Signed-off-by: Tony Lindgren Acked-by: Rob Herring Signed-off-by: Herbert Xu commit 7fb61afb7b5b4389e0f6e78c3a822d5991d4edef Author: Tony Lindgren Date: Sat Sep 14 14:02:54 2019 -0700 ARM: OMAP2+: Check omap3-rom-rng for GP device instead of HS device In general we should check for GP device instead of HS device unless the other options such as EMU are also checked. Otherwise omap3-rom-rng won't probe on few of the old n900 macro boards still in service in automated build and boot test systems. Cc: Aaro Koskinen Cc: Adam Ford Cc: Pali Rohár Cc: Sebastian Reichel Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Herbert Xu commit 457a6fdf4caaac5d5006bfd609f33b8b2a383750 Author: Pascal van Leeuwen Date: Fri Sep 13 22:04:46 2019 +0200 crypto: inside-secure - Added support for authenc HMAC-SHA2/DES-CBC This patch adds support for the authenc(hmac(sha224),cbc(des)), authenc(hmac(sha256),cbc(des)), authenc(hmac(sha384),cbc(des)) and authenc(hmac(sha512),cbc(des)) aead's changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit f0a8bdf0b113b51d023c94468628ec90d4375acc Author: Pascal van Leeuwen Date: Fri Sep 13 22:04:45 2019 +0200 crypto: inside-secure - Added support for authenc HMAC-SHA2/3DES-CBC This patch adds support for the authenc(hmac(sha224),cbc(des3_ede)), authenc(hmac(sha256),cbc(des3_ede)), authenc(hmac(sha384),cbc(des3_ede)) and authenc(hmac(sha512),cbc(des3_ede)) aead's changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit bb7679b840cc7cf23868e05c5ef7a044e7fafd97 Author: Pascal van Leeuwen Date: Fri Sep 13 22:04:44 2019 +0200 crypto: inside-secure - Added support for authenc HMAC-SHA1/DES-CBC This patch adds support for the authenc(hmac(sha1),cbc(des)) aead changes since v1: - rebased on top of DES changes made to cryptodev/master Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 1d448f27c20cc8db361f0ac0ec5df5cd0970af78 Author: Pascal van Leeuwen Date: Fri Sep 13 20:56:49 2019 +0200 crypto: inside-secure - Add CRYPTO_SHA3 to CRYPTO_DEV_SAFEXCEL Due to the addition of SHA3 and HMAC-SHA3 support to the inside-secure driver, it now depends on CRYPTO_SHA3. Added reference. changes since v1: - added missing dependency to crypto/Kconfig Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 6c1c09b3dd0c217eeab3f123e24e58cf6ba30713 Author: Pascal van Leeuwen Date: Fri Sep 13 20:56:48 2019 +0200 crypto: inside-secure - Add HMAC-SHA3 family of authentication algorithms This patch adds support for hmac(sha3-224), hmac(sha3-256), hmac(sha3-384) and hmac(sha3-512) authentication algorithms. The patch has been tested with the eip197c_iewxkbc configuration on the Xilinx VCU118 development board, including the testmgr extra tests. changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit aaf5a3839a3fcba06ca978e85cb6f66117ad44dd Author: Pascal van Leeuwen Date: Fri Sep 13 20:56:47 2019 +0200 crypto: inside-secure - Add SHA3 family of basic hash algorithms This patch adds support for sha3-224, sha3-256, sha3-384 and sha3-512 basic hashes. The patch has been tested with the eip197c_iewxkbc configuration on the Xilinx VCU118 development board, including the testmgr extra tests. changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 1769f704e55b11e97ff4e52226e6fbddaa1e654e Author: Pascal van Leeuwen Date: Fri Sep 13 20:44:50 2019 +0200 crypto: inside-secure - Add SM4 based authenc AEAD ciphersuites This patch adds support for the authenc(hmac(sha1),cbc(sm4)), authenc(hmac(sm3),cbc(sm4)), authenc(hmac(sha1),rfc3686(ctr(sm4))), and authenc(hmac(sm3),rfc3686(ctr(sm4))) aead ciphersuites. These are necessary to support IPsec according to the Chinese standard GM/T 022-1014 - IPsec VPN specification. Note that there are no testvectors present in testmgr for these ciphersuites. However, considering all building blocks have already been verified elsewhere, it is fair to assume the generic implementation to be correct-by-construction. The hardware implementation has been fuzzed against this generic implementation by means of a locally modified testmgr. The intention is to upstream these testmgr changes but this is pending other testmgr changes being made by Eric Biggers. The patch has been tested with the eip197c_iewxkbc configuration on the Xilinx VCU118 development board, using the abovementioned modified testmgr This patch applies on top of "Add support for SM4 ciphers" and needs to be applied before "Add (HMAC) SHA3 support". Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 2eb2d198bd6cd0083a5363ce66272fb34a19928f Author: Ard Biesheuvel Date: Fri Sep 13 19:36:18 2019 +0100 crypto: aegis128-neon - use Clang compatible cflags for ARM The next version of Clang will start policing compiler command line options, and will reject combinations of -march and -mfpu that it thinks are incompatible. This results in errors like clang-10: warning: ignoring extension 'crypto' because the 'armv7-a' architecture does not support it [-Winvalid-command-line-argument] /tmp/aegis128-neon-inner-5ee428.s: Assembler messages: /tmp/aegis128-neon-inner-5ee428.s:73: Error: selected processor does not support `aese.8 q2,q14' in ARM mode when buiding the SIMD aegis128 code for 32-bit ARM, given that the 'armv7-a' -march argument is considered to be compatible with the ARM crypto extensions. Instead, we should use armv8-a, which does allow the crypto extensions to be enabled. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit e48862147f22d48ca8b6c05d4d354b9a7f4ba3ff Author: Pascal van Leeuwen Date: Fri Sep 13 11:10:42 2019 +0200 crypto: testmgr - Added testvectors for the rfc3686(ctr(sm4)) skcipher Added testvectors for the rfc3686(ctr(sm4)) skcipher algorithm changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit f77e5dc08ad4eaf2b3428276cfd18ce55dd6b251 Author: Pascal van Leeuwen Date: Fri Sep 13 11:10:41 2019 +0200 crypto: inside-secure - Add support for the rfc3685(ctr(sm4)) skcipher This patch adds support for SM4 in (32 bit) CTR mode, i.e. skcipher rfc3686(ctr(sm4)). changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 7468ab22d7ab968b99c75552c879cb5d96e50523 Author: Pascal van Leeuwen Date: Fri Sep 13 11:10:40 2019 +0200 crypto: inside-secure - Add support for the cfb(sm4) skcipher This patch adds support for SM4 in CFB mode, i.e. skcipher cfb(sm4). changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit a06b15b2b499ff0c950ad2da07895ae287e5c4e5 Author: Pascal van Leeuwen Date: Fri Sep 13 11:10:39 2019 +0200 crypto: testmgr - Added testvectors for the ofb(sm4) & cfb(sm4) skciphers Added testvectors for the ofb(sm4) and cfb(sm4) skcipher algorithms changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 03a6cfb97f8f28373a6fed68deefccb5e98e1072 Author: Pascal van Leeuwen Date: Fri Sep 13 11:10:38 2019 +0200 crypto: inside-secure - Add support for the ofb(sm4) skcipher This patch adds support for SM4 in OFB mode, i.e. skcipher ofb(sm4). changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 6f2d14288ec1d659503c37e965de825131462a1a Author: Pascal van Leeuwen Date: Fri Sep 13 11:10:37 2019 +0200 crypto: inside-secure - Add support for the cbc(sm4) skcipher This patch adds support for SM4 in CBC mode, i.e. skcipher cbc(sm4). changes since v1: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit fcca797d2adb83be198db8530f1fd4f6c60e81fe Author: Pascal van Leeuwen Date: Fri Sep 13 11:10:36 2019 +0200 crypto: inside-secure - Add support for the ecb(sm4) skcipher This patch adds support for SM4 in ECB mode, i.e. skcipher ecb(sm4). changes since v1: - make SAFEXCEL_SM4 case entry explit, using the proper SM4_BLOCK_SIZE instead of "borrowing" the AES code which "coincidentally" works Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 8194fd1d715243daf9b15b52270eeba6c1a8db74 Author: Pascal van Leeuwen Date: Fri Sep 13 17:20:38 2019 +0200 crypto: testmgr - Added testvectors for the hmac(sm3) ahash Added testvectors for the hmac(sm3) ahash authentication algorithm changes since v1 & v2: -nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit aa3a43e6e41901a82e47aee172df1eb406470f94 Author: Pascal van Leeuwen Date: Fri Sep 13 17:20:37 2019 +0200 crypto: inside-secure - Added support for HMAC-SM3 ahash Added support for the hmac(sm3) ahash authentication algorithm changes since v1: - added Acked-by tag below, no changes to the source changes since v2: - nothing Acked-by: Antoine Tenart Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 0f2bc13181ce22d365929176a3d3d47fb857c202 Author: Pascal van Leeuwen Date: Fri Sep 13 17:20:36 2019 +0200 crypto: inside-secure - Added support for basic SM3 ahash Added support for the SM3 ahash algorithm changes since v1: - moved definition of CONTEXT_CONTROL_CRYPTO_ALG_SM3 (0x7) up above 0xf changes since v2: - allow compilation if CONFIG_CRYPTO_SM3 is not set Acked-by: Antoine Tenart Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit fc0f82b179d31d1fe4ab8325059a460e4236ed14 Author: Pascal van Leeuwen Date: Wed Sep 18 23:25:58 2019 +0200 crypto: inside-secure - Add CRYPTO_CHACHA20POLY1305 to CRYPTO_DEV_SAFEXCEL Due to the addition of Chacha20-Poly1305 support to the inside-secure driver, it now depends on CRYPTO_CHACHA20POLY1305. Added reference. changes since v1: - added missing dependency to crypto/Kconfig changes since v2: - nothing changes since v3: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit a60619211dd188a5dfa18761b82d096cda76fc9f Author: Pascal van Leeuwen Date: Wed Sep 18 23:25:57 2019 +0200 crypto: inside-secure - Add support for the Chacha20-Poly1305 AEAD This patch adds support for the Chacha20-Poly1305 cipher suite. It adds both the basic rfc7539(chacha20,poly1305) as well as the rfc7539esp(chacha20,poly1305) variant for IPsec ESP acceleration. changes since v1: - rebased on top of DES library changes done on cryptodev/master - fixed crypto/Kconfig so that generic fallback is compiled as well changes since v2: - nothing changes since v3: - Fixed a problem where the tcrypt performance test would run fully on the fallback cipher instead of the HW due to using an AAD length of 8 for rfc7539esp. While this is not actually legal ESP (which includes SPI and sequence number in the AAD as well), it is both inconvenient and not necessary to run these vectors on the fallback cipher. - Due to above, also realised that for plain (non-ESP) rfc7539, you probably want to be able to run vectors with less than 8 bytes of AAD on the HW, and this is actually possible as long as cryptlen is large enough, so made that possible as well. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 4a593fb35d5ccf3ddd41c68ac1cc88d06ec74341 Author: Pascal van Leeuwen Date: Wed Sep 18 23:25:56 2019 +0200 crypto: inside-secure - Added support for the CHACHA20 skcipher Added support for the CHACHA20 skcipher algorithm. Tested on an eip197c-iesb configuration in the Xilinx VCU118 devboard, passes all testmgr vectors plus the extra fuzzing tests. changes since v1: - rebased on top of DES library changes done on cryptodev/master - fixed crypto/Kconfig so that generic fallback is compiled as well changes since v2: - made switch entry SAFEXCEL_AES explit and added empty default, as requested by Antoine Tenart. Also needed to make SM4 patches apply. changes since v3: - nothing Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit c98429297d8b25a0d9c48d8e1f5237f19412f07b Author: Tomer Maimon Date: Thu Sep 12 12:01:49 2019 +0300 hwrng: npcm - add NPCM RNG driver Add Nuvoton NPCM BMC Random Number Generator(RNG) driver. Signed-off-by: Tomer Maimon Reviewed-by: Daniel Thompson Signed-off-by: Herbert Xu commit 911aa1947cabf961f77c129f8b2de65d95e26ca4 Author: Tomer Maimon Date: Thu Sep 12 12:01:48 2019 +0300 dt-binding: hwrng: add NPCM RNG documentation Added device tree binding documentation for Nuvoton BMC NPCM Random Number Generator (RNG). Signed-off-by: Tomer Maimon Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit 11031c0d7d6e9bca0df233a8acfd6708d2b89470 Author: Ard Biesheuvel Date: Wed Sep 11 00:19:00 2019 +0100 crypto: arm64/gcm-ce - implement 4 way interleave To improve performance on cores with deep pipelines such as ThunderX2, reimplement gcm(aes) using a 4-way interleave rather than the 2-way interleave we use currently. This comes down to a complete rewrite of the GCM part of the combined GCM/GHASH driver, and instead of interleaving two invocations of AES with the GHASH handling at the instruction level, the new version uses a more coarse grained approach where each chunk of 64 bytes is encrypted first and then ghashed (or ghashed and then decrypted in the converse case). The core NEON routine is now able to consume inputs of any size, and tail blocks of less than 64 bytes are handled using overlapping loads and stores, and processed by the same 4-way encryption and hashing routines. This gets rid of most of the branches, and avoids having to return to the C code to handle the tail block using a stack buffer. The table below compares the performance of the old driver and the new one on various micro-architectures and running in various modes. | AES-128 | AES-192 | AES-256 | #bytes | 512 | 1500 | 4k | 512 | 1500 | 4k | 512 | 1500 | 4k | -------+-----+------+-----+-----+------+-----+-----+------+-----+ TX2 | 35% | 23% | 11% | 34% | 20% | 9% | 38% | 25% | 16% | EMAG | 11% | 6% | 3% | 12% | 4% | 2% | 11% | 4% | 2% | A72 | 8% | 5% | -4% | 9% | 4% | -5% | 7% | 4% | -5% | A53 | 11% | 6% | -1% | 10% | 8% | -1% | 10% | 8% | -2% | Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ec05a74f9b0b2f68386ae43767d79bc35cd4b48e Author: Ard Biesheuvel Date: Wed Sep 11 00:18:59 2019 +0100 crypto: testmgr - add another gcm(aes) testcase Add an additional gcm(aes) test case that triggers the code path in the new arm64 driver that deals with tail blocks whose size is not a multiple of the block size, and where the size of the preceding input is a multiple of 64 bytes. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7a6eda5b8d9dda3b7f15c764f1865f4569050fa6 Author: Christophe Leroy Date: Tue Sep 10 06:04:14 2019 +0000 crypto: talitos - fix hash result for VMAP_STACK When VMAP_STACK is selected, stack cannot be DMA-mapped. Therefore, the hash result has to be DMA-mapped in the request context and copied into areq->result at completion. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu commit 5b0fe9552336338acb52756daf65dd7a4eeca73f Author: Herbert Xu Date: Tue Sep 10 11:42:05 2019 +1000 crypto: algif_skcipher - Use chunksize instead of blocksize When algif_skcipher does a partial operation it always process data that is a multiple of blocksize. However, for algorithms such as CTR this is wrong because even though it can process any number of bytes overall, the partial block must come at the very end and not in the middle. This is exactly what chunksize is meant to describe so this patch changes blocksize to chunksize. Fixes: 8ff590903d5f ("crypto: algif_skcipher - User-space...") Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7a627db9cafdb173e255ec8bf67fd5ba91ae0664 Author: Pascal van Leeuwen Date: Mon Sep 9 13:13:08 2019 +0200 crypto: inside-secure - Added support for the AES-CMAC ahash This patch adds support for the AES-CMAC authentication algorithm. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 38f21b4bab11fc877ff18dd02f77f2c34f1105b9 Author: Pascal van Leeuwen Date: Mon Sep 9 13:13:07 2019 +0200 crypto: inside-secure - Added support for the AES XCBC ahash This patch adds support for the AES XCBC authentication algorithm Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit b98687bb3b10a0e261c445aac227476bf11dab08 Author: Pascal van Leeuwen Date: Mon Sep 9 13:13:06 2019 +0200 crypto: inside-secure - Added support for the AES CBCMAC ahash This patch adds support for the AES-CBCMAC authentication algorithm. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit a7cf8658460edafb03438eeeb0a7d3c91572d4db Author: Pascal van Leeuwen Date: Mon Sep 9 13:10:29 2019 +0200 crypto: inside-secure - Added support for CRC32 This patch adds support for the CRC32 "hash" algorithm Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit bdd08fff4915a9705ea3ec20c82ab8f745bdf225 Author: Hans de Goede Date: Fri Oct 4 09:37:15 2019 +0200 HID: logitech: Add depends on LEDS_CLASS to Logitech Kconfig entry Commit 97b741aba918 ("HID: lg-g15: Add keyboard and LCD backlight control") makes the hid-lg15 kernel module, which gets configured through config HID_LOGITECH depends on symbols from the led class. Add a depends on LEDS_CLASS to HID_LOGITECH to avoid undefined reference errors on the led class symbols. Fixes: 97b741aba918 ("HID: lg-g15: Add keyboard and LCD backlight control") Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit 7842793330ce96ac1d20d22901fb4009c21676f2 Author: Chris Wilson Date: Fri Oct 4 14:40:15 2019 +0100 drm/i915: Drop struct_mutex from around GEM initialisation We no longer need to placate lockdep by holding struct_mutex for our initialisation, so don't. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-21-chris@chris-wilson.co.uk commit 2af402982ab38223356250d81741ae041c831a79 Author: Chris Wilson Date: Fri Oct 4 14:40:14 2019 +0100 drm/i915/selftests: Drop vestigal struct_mutex guards We no longer need struct_mutex to serialise request emission, so remove it from the gt selftests. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-20-chris@chris-wilson.co.uk commit 3d88f76dec55321d27bd37204ea9eaa44f7485b8 Author: Chris Wilson Date: Fri Oct 4 14:40:13 2019 +0100 drm/i915: Drop struct_mutex from suspend state save/restore struct_mutex provides no serialisation of the registers and data structures being saved and restored across suspend/resume. It is completely superfluous here. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-19-chris@chris-wilson.co.uk commit 6c3828ab098a8091c0fa8a24d1af8a5b779b6b4d Author: Chris Wilson Date: Fri Oct 4 14:40:12 2019 +0100 drm/i915: Remove struct_mutex guard for debugfs/opregion Having a struct_mutex around the read of a BIOS blob serves no purpose. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-18-chris@chris-wilson.co.uk commit ba198a10bfbeb1137d8c25fa569b562e8b626b05 Author: Chris Wilson Date: Fri Oct 4 14:40:11 2019 +0100 drm/i915: Drop struct_mutex guard from debugfs/framebuffer_info It protects nothing being accessed for the intel_framebuffer, so it's own locking had better be sufficient. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-17-chris@chris-wilson.co.uk commit cb5eb072788faea188bfabcee0bfb90ecc717e82 Author: Chris Wilson Date: Fri Oct 4 14:40:10 2019 +0100 drm/i915/overlay: Drop struct_mutex guard The overlay uses the modeset mutex to control itself and only required the struct_mutex for requests, which is now obsolete. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-16-chris@chris-wilson.co.uk commit a4e7ccdac38ec8335d9e4e2656c1a041c77feae1 Author: Chris Wilson Date: Fri Oct 4 14:40:09 2019 +0100 drm/i915: Move context management under GEM Keep track of the GEM contexts underneath i915->gem.contexts and assign them their own lock for the purposes of list management. v2: Focus on lock tracking; ctx->vm is protected by ctx->mutex v3: Correct split with removal of logical HW ID Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-15-chris@chris-wilson.co.uk commit 2935ed5339c495066d901b97de384d86c55a3f6d Author: Chris Wilson Date: Fri Oct 4 14:40:08 2019 +0100 drm/i915: Remove logical HW ID With the introduction of ctx->engines[] we allow multiple logical contexts to be used on the same engine (e.g. with virtual engines). According to bspec, aach logical context requires a unique tag in order for context-switching to occur correctly between them. [Simple experiments show that it is not so easy to trick the HW into performing a lite-restore with matching logical IDs, though my memory from early Broadwell experiments do suggest that it should be generating lite-restores.] We only need to keep a unique tag for the active lifetime of the context, and for as long as we need to identify that context. The HW uses the tag to determine if it should use a lite-restore (why not the LRCA?) and passes the tag back for various status identifies. The only status we need to track is for OA, so when using perf, we assign the specific context a unique tag. v2: Calculate required number of tags to fill ELSP. Fixes: 976b55f0e1db ("drm/i915: Allow a context to define its set of engines") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111895 Signed-off-by: Chris Wilson Acked-by: Daniele Ceraolo Spurio Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-14-chris@chris-wilson.co.uk commit a2b4dead98ef1241498ff8769c85154995938087 Author: Chris Wilson Date: Fri Oct 4 14:40:07 2019 +0100 drm/i915: Move global activity tracking from GEM to GT As our global unpark/park keep track of the number of active users, we can simply move the accounting from the GEM layer to the base GT layer. It was placed originally inside GEM to benefit from the 100ms extra delay on idleness, but that has been eliminated and now there is no substantive difference between the layers. In moving it, we move another piece of the puzzle out from underneath struct_mutex. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-13-chris@chris-wilson.co.uk commit 661019754202d610203a9cf09d26fdd8677e41c6 Author: Chris Wilson Date: Fri Oct 4 14:40:06 2019 +0100 drm/i915: Move request runtime management onto gt Requests are run from the gt and are tided into the gt runtime power management, so pull the runtime request management under gt/ Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-12-chris@chris-wilson.co.uk commit 789ed955215d6f925008cb2381aa9f64cd635dd2 Author: Chris Wilson Date: Fri Oct 4 14:40:05 2019 +0100 drm/i915/gem: Retire directly for mmap-offset shrinking Now that we can retire without taking struct_mutex, we can do so to handle shrinking the mmap-offset space after an allocation failure. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-11-chris@chris-wilson.co.uk commit f33a8a51602c84cc7d5cadd2655835ba3b7d03f9 Author: Chris Wilson Date: Fri Oct 4 14:40:04 2019 +0100 drm/i915: Merge wait_for_timelines with retire_request wait_for_timelines is essentially the same loop as retiring requests (with an extra timeout), so merge the two into one routine. v2: i915_retire_requests_timeout and keep VT'd w/a as !interruptible Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-10-chris@chris-wilson.co.uk commit 33d856445b3ef6f00466cd9fbb04d69061143077 Author: Chris Wilson Date: Fri Oct 4 14:40:03 2019 +0100 drm/i915: Remove the GEM idle worker Nothing inside the idle worker now requires struct_mutex, so we can remove the indirection of using our own worker. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-9-chris@chris-wilson.co.uk commit 7e8057626640cfedbae000c5032be32269713687 Author: Chris Wilson Date: Fri Oct 4 14:40:02 2019 +0100 drm/i915: Drop struct_mutex from around i915_retire_requests() We don't need to hold struct_mutex now for retiring requests, so drop it from i915_retire_requests() and i915_gem_wait_for_idle(), finally removing I915_WAIT_LOCKED for good. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-8-chris@chris-wilson.co.uk commit b72348406927740d4cfb55f2c1e19c6769ffc666 Author: Chris Wilson Date: Fri Oct 4 14:40:01 2019 +0100 drm/i915: Move idle barrier cleanup into engine-pm Now that we now longer need to guarantee that the active callback is under the struct_mutex, we can lift it out of the i915_gem_park() and into the engine parking itself. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-7-chris@chris-wilson.co.uk commit b1e3177bd1d8f41e2a9cc847e56a96cdc0eefe62 Author: Chris Wilson Date: Fri Oct 4 14:40:00 2019 +0100 drm/i915: Coordinate i915_active with its own mutex Forgo the struct_mutex serialisation for i915_active, and interpose its own mutex handling for active/retire. This is a multi-layered sleight-of-hand. First, we had to ensure that no active/retire callbacks accidentally inverted the mutex ordering rules, nor assumed that they were themselves serialised by struct_mutex. More challenging though, is the rule over updating elements of the active rbtree. Instead of the whole i915_active now being serialised by struct_mutex, allocations/rotations of the tree are serialised by the i915_active.mutex and individual nodes are serialised by the caller using the i915_timeline.mutex (we need to use nested spinlocks to interact with the dma_fence callback lists). The pain point here is that instead of a single mutex around execbuf, we now have to take a mutex for active tracker (one for each vma, context, etc) and a couple of spinlocks for each fence update. The improvement in fine grained locking allowing for multiple concurrent clients (eventually!) should be worth it in typical loads. v2: Add some comments that barely elucidate anything :( Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-6-chris@chris-wilson.co.uk commit 274cbf20fd108fa26d0497282b102e00371210fd Author: Chris Wilson Date: Fri Oct 4 14:39:59 2019 +0100 drm/i915: Push the i915_active.retire into a worker As we need to use a mutex to serialise i915_active activation (because we want to allow the callback to sleep), we need to push the i915_active.retire into a worker callback in case we get need to retire from an atomic context. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-5-chris@chris-wilson.co.uk commit 2850748ef8763ab46958e43a4d1c445f29eeb37d Author: Chris Wilson Date: Fri Oct 4 14:39:58 2019 +0100 drm/i915: Pull i915_vma_pin under the vm->mutex Replace the struct_mutex requirement for pinning the i915_vma with the local vm->mutex instead. Note that the vm->mutex is tainted by the shrinker (we require unbinding from inside fs-reclaim) and so we cannot allocate while holding that mutex. Instead we have to preallocate workers to do allocate and apply the PTE updates after we have we reserved their slot in the drm_mm (using fences to order the PTE writes with the GPU work and with later unbind). In adding the asynchronous vma binding, one subtle requirement is to avoid coupling the binding fence into the backing object->resv. That is the asynchronous binding only applies to the vma timeline itself and not to the pages as that is a more global timeline (the binding of one vma does not need to be ordered with another vma, nor does the implicit GEM fencing depend on a vma, only on writes to the backing store). Keeping the vma binding distinct from the backing store timelines is verified by a number of async gem_exec_fence and gem_exec_schedule tests. The way we do this is quite simple, we keep the fence for the vma binding separate and only wait on it as required, and never add it to the obj->resv itself. Another consequence in reducing the locking around the vma is the destruction of the vma is no longer globally serialised by struct_mutex. A natural solution would be to add a kref to i915_vma, but that requires decoupling the reference cycles, possibly by introducing a new i915_mm_pages object that is own by both obj->mm and vma->pages. However, we have not taken that route due to the overshadowing lmem/ttm discussions, and instead play a series of complicated games with trylocks to (hopefully) ensure that only one destruction path is called! v2: Add some commentary, and some helpers to reduce patch churn. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-4-chris@chris-wilson.co.uk commit 11331125e1480ff786be9d2051301401b652bbe1 Author: Chris Wilson Date: Fri Oct 4 14:39:57 2019 +0100 drm/i915: Mark up address spaces that may need to allocate Since we cannot allocate underneath the vm->mutex (it is used in the direct-reclaim paths), we need to shift the allocations off into a mutexless worker with fence recursion prevention. To know when we need this protection, we mark up the address spaces that do allocate before insertion. In the future, we may wish to extend the async bind scheme to more than just allocations. v2: s/vm->bind_alloc/vm->bind_async_flags/ Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-3-chris@chris-wilson.co.uk commit 5e053450c1c3af316aef9a96dc88f52cd803d1ee Author: Chris Wilson Date: Fri Oct 4 14:39:56 2019 +0100 drm/i915: Only track bound elements of the GTT The premise here is to simply avoiding having to acquire the vm->mutex inside vma create/destroy to update the vm->unbound_lists, to avoid some nasty lock recursions later. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-2-chris@chris-wilson.co.uk commit cc2f2e10c2056e570addc208560941daa9e06a25 Author: Jean-Jacques Hiblot Date: Wed Sep 18 16:57:29 2019 +0200 dt-bindings: backlight: Add led-backlight binding Add DT binding for led-backlight. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit b290a78b5c3d78c337b8d9856cc0671aea0c2ef3 Author: Chris Wilson Date: Thu Oct 3 22:00:58 2019 +0100 drm/i915: Use helpers for drm_mm_node booleans A subset of 71724f708997 ("drm/mm: Use helpers for drm_mm_node booleans") in order to prepare drm-intel-next-queued for subsequent patches before we can backmerge 71724f708997 itself. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004142226.13711-1-chris@chris-wilson.co.uk commit ba2a1c8706151ac3234d2d020873feab498ab1bb Author: Raymond Smith Date: Fri Oct 4 14:12:38 2019 +0000 drm/fourcc: Add Arm 16x16 block modifier Add the DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED modifier to denote the 16x16 block u-interleaved format used in Arm Utgard and Midgard GPUs. Changes from v1:- 1. Reserved the upper four bits (out of the 56 bits assigned to each vendor) to denote the category of Arm specific modifiers. Currently, we have two categories ie AFBC and MISC. Changes from v2:- 1. Preserved Ray's authorship 2. Cleanups/changes suggested by Brian 3. Added r-bs of Brian and Qiang Signed-off-by: Raymond Smith Reviewed-by: Brian Starkey Reviewed-by: Qiang Yu Signed-off-by: Ayan kumar halder Link: https://patchwork.freedesktop.org/patch/msgid/20191004141222.22337-1-ayan.halder@arm.com commit 317a8d9eb612a39daf182986463c067201dc1d29 Author: Colin Ian King Date: Thu Oct 3 22:40:49 2019 +0100 drm/amdgpu: remove redundant variable r and redundant return statement There is a return statement that is not reachable and a variable that is not used. Remove them. Addresses-Coverity: ("Structurally dead code") Fixes: de7b45babd9b ("drm/amdgpu: cleanup creating BOs at fixed location (v2)") Reviewed-by: Christian König Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 17cf678a33c6196a3df4531fe5aec91384c9eeb5 Author: Colin Ian King Date: Thu Oct 3 22:52:27 2019 +0100 drm/amdgpu: fix uninitialized variable pasid_mapping_needed The boolean variable pasid_mapping_needed is not initialized and there are code paths that do not assign it any value before it is is read later. Fix this by initializing pasid_mapping_needed to false. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 6817bf283b2b ("drm/amdgpu: grab the id mgr lock while accessing passid_mapping") Reviewed-by: Christian König Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit dab8f7e94ee491126b1ca89839a19acf3e33e929 Author: zhengbin Date: Fri Oct 4 17:37:40 2019 +0800 drm/amd/display: Make some functions static Fix sparse warnings: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:32:6: warning: symbol 'lp_write_i2c' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:42:6: warning: symbol 'lp_read_i2c' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:52:6: warning: symbol 'lp_write_dpcd' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:59:6: warning: symbol 'lp_read_dpcd' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 960b6f4f2d2e96d5f7ffe2854e0040b46cafbd36 Author: Raul E Rangel Date: Thu Oct 3 14:24:44 2019 -0600 drm/amd/display: fix struct init in update_bounding_box dcn20_resource.c:2636:9: error: missing braces around initializer [-Werror=missing-braces] struct _vcs_dpi_voltage_scaling_st calculated_states[MAX_CLOCK_LIMIT_STATES] = {0}; ^ Fixes: 7ed4e6352c16f ("drm/amd/display: Add DCN2 HW Sequencer and Resource") Signed-off-by: Raul E Rangel Signed-off-by: Alex Deucher commit d0312d0dcaf2f00a8a0ea0bc2a24c6084fd69ed2 Author: Leo Liu Date: Tue Oct 1 18:12:45 2019 -0400 drm/amdgpu: add code comment in vcn_v2_5_hw_init Add a comment to VCN 2.5 encode ring Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: James Zhu Cc: Alex Deucher Cc: Christian König Cc: David (ChunMing) Zhou Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Cc: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit fd287c8cd24882680edf2e4d65730d020b2b0221 Author: Leo Liu Date: Tue Oct 1 18:08:46 2019 -0400 drm/amdgpu/vcn: use amdgpu_ring_test_helper Instead of amdgpu_ring_test_ring, so the helper function determines whether the ring is ready Signed-off-by: Leo Liu Reviewed-by: Christian König Reviewed-by: James Zhu Acked-by: Gustavo A. R. Silva Cc: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0 Author: Denis Efremov Date: Wed Oct 2 20:18:11 2019 +0300 rsi: fix potential null dereference in rsi_probe() The id pointer can be NULL in rsi_probe(). It is checked everywhere except for the else branch in the idProduct condition. The patch adds NULL check before the id dereference in the rsi_dbg() call. Fixes: 54fdb318c111 ("rsi: add new device model for 9116") Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Signed-off-by: Denis Efremov Signed-off-by: Kalle Valo commit 60b5b49f6a6ed3a5dd5e1b4b72b8c792387a0f8c Author: Colin Ian King Date: Wed Oct 2 11:15:17 2019 +0100 libertas: remove redundant assignment to variable ret The variable ret is being assigned a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Dan Carpenter Signed-off-by: Kalle Valo commit 3b1e0a7bdfeedbde49b8d424aeb88ac3c0cf8182 Author: Chung-Hsien Hsu Date: Wed Oct 2 09:31:12 2019 +0000 brcmfmac: add support for SAE authentication offload The firmware may have SAE authentication 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 for SAE authentication in the nl80211 CONNECT command. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit f4268729eb1eefe23f6746849c1b5626d9030532 Author: Ping-Ke Shih Date: Wed Oct 2 14:35:31 2019 +0800 rtw88: fix error handling when setup efuse info Disable efuse if the efuse is enabled when we failed to setup the efuse information, otherwise the hardware will not turn off. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Ping-Ke Shih Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 4f5bb7ff8b8d4bafd91243fc969ed240e67aa1ca Author: Ping-Ke Shih Date: Wed Oct 2 14:35:30 2019 +0800 rtw88: fix NSS of hw_cap 8822C is a 2x2 11ac chip, and then NSS must be less or equal to 2. However, current nss of hw cap is 3, likes hw cap: hci=0x0f, bw=0x07, ptcl=0x03, ant_num=7, nss=3 This commit adds constraint to make sure NSS <= rf_path_num, and result looks like hw cap: hci=0x0f, bw=0x07, ptcl=0x03, ant_num=7, nss=2 Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Ping-Ke Shih Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit cc20a713983684b6760a21591516fb64e29aecfd Author: Ping-Ke Shih Date: Wed Oct 2 14:35:29 2019 +0800 rtw88: use struct rtw_fw_hdr to access firmware header This commit doesn't change logic at all, just use struct rtw_fw_hdr to access fixed part of 64 bytes header. Since remaining part is variable length data of actual firmware, we don't define them within the struct. Signed-off-by: Ping-Ke Shih Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit bc3696e0a436d747b699363293ef76829998ac63 Author: Yan-Hsuan Chuang Date: Wed Oct 2 14:35:28 2019 +0800 rtw88: raise firmware version debug level It's better to print firmware version at load time. But since we need to set debug_mask properly to default print rtw_dbg(), raise the debug level to rtw_info() instead. Also change the multiple line style to one line only, it will be easier for log analyzing. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit bf06c7ec45087066f638bddcccf6f0fd41903535 Author: Yan-Hsuan Chuang Date: Wed Oct 2 14:35:27 2019 +0800 rtw88: configure TX queue EDCA parameters Set CWmax/CWmin, TXOP and AIFS according to ieee80211_tx_queue_params. Do note that hardware has only one group of EDCA[ac] registers, if more than one vif are added, the EDCA[ac] registers will contain value of params of the most recent set by ieee80211_ops::conf_tx(). And AIFS = AIFSN[ac] * slot_time + SIFS, so if use_short_slot is changed, need to also change AIFS. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 0649ff58a0f64df51bd24b38420da0875fbc7c00 Author: Ping-Ke Shih Date: Wed Oct 2 14:35:26 2019 +0800 rtw88: Don't set RX_FLAG_DECRYPTED if packet has no encryption The value of GET_RX_DESC_SWDEC() indicates that if this RX packet requires software decryption or not. And software decryption is required when the packet was encrypted and the hardware failed to decrypt it. So, GET_RX_DESC_SWDEC() is negative does not mean that this packet is decrypted, it might just have no encryption at all. To actually see if the packet is decrypted, driver needs to further check if the hardware has successfully decrypted it, with a specific type of encryption algorithm. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit c3594559f49c601d410dee4b767c3536a5535bfd Author: Yan-Hsuan Chuang Date: Wed Oct 2 14:35:25 2019 +0800 rtw88: fix beaconing mode rsvd_page memory violation issue When downloading the reserved page, the first page always contains a beacon for the firmware to reference. For non-beaconing modes such as station mode, also put a blank skb with length=1. And for the beaconing modes, driver will get a real beacon with a length approximate to the page size. But as the beacon is always put at the first page, it does not need a tx_desc, because the TX path will generate one when TXing the reserved page to the hardware. So we could allocate a buffer with a size smaller than the reserved page, when using memcpy() to copy the content of reserved page to the buffer, the over-sized reserved page will violate the kernel memory. To fix it, add the tx_desc before memcpy() the reserved packets to the buffer, then we can get SKBs with correct length when counting the pages in total. And for page 0, count the extra tx_desc_sz that the TX path will generate. This way, the first beacon that allocated without tx_desc can be counted with the extra tx_desc_sz to get actual pages it requires. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 1131ad7fe57541b78db92d1332c69158e13762dc Author: Yan-Hsuan Chuang Date: Wed Oct 2 14:35:24 2019 +0800 rtw88: flush hardware tx queues Sometimes mac80211 will ask us to flush the hardware queues. To flush them, first we need to get the corresponding priority queues from the RQPN mapping table. Then we can check the available pages are equal to the originally reserved pages, which means the hardware has returned all of the pages it used to transmit. Note that now we only check for 100 ms for the priority queue, but sometimes if we have a lot of traffic (ex. 100Mbps up), some of the packets could be dropped. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 127eef1d46f80056fe9f18406c6eab38778d8a06 Author: Yan-Hsuan Chuang Date: Wed Oct 2 14:35:23 2019 +0800 rtw88: add TX-AMSDU support Based on the mac80211's TXQ implementation, TX-AMSDU can be used to get higher MAC efficiency. To make mac80211 aggregate MSDUs, low level driver just need to leave skbs in the TXQ, and mac80211 will try to aggregate them if possible. As driver will schedule a tasklet when the TX queue is woke, until the tasklet being served, there will have some skbs in the queue if traffic is heavy. Driver can control the max AMSDU size depending on the current bit rate used by hardware/firmware. The higher rates are used, the larger AMSDU size can be. It is tested that can achieve higher T-Put at higher rates. If the environment is relatively clean, and the bit_rate is high enough, we can get about 80Mbps improvement. For lower bit rates, not much gain can we get, so leave the max_amsdu length low to prevent aggregation. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 699c7730cf2303728673351ff8dd0100552cde8e Author: Tzu-En Huang Date: Wed Oct 2 14:35:22 2019 +0800 rtw88: report tx rate to mac80211 stack Whenever the firmware increases/decreases the bit rate used to transmit to a peer, it sends an RA report through C2H to driver. Driver can then record the bit rate in the peer's struct rtw_sta_info, and report to mac80211 when it asks us for the statistics of the sta by ieee80211_ops::sta_statistics Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 46ebb1743f339eae14daaa3afe094957f6b67d1d Author: Yan-Hsuan Chuang Date: Wed Oct 2 14:35:21 2019 +0800 rtw88: take over rate control from mac80211 We can indicate IEEE80211_HW_HAS_RATE_CONTROL to mac80211 because the hardware has its own rate control algorithm. And what driver needs to do is to choose an RA mask according the peer's capabilities. But the hardware is not able to setup BA session by itself. So driver requires to initiate tx BA session for hardware, and tells it if it is possible to transmit AMPDU. The hardware can then aggregate MPDUs. And the size of AMPDU is controlled by the TX descriptor and the register value. Since the TX descriptor will reference the max AMPDU size from ieee80211_sta::ht_cap::ampdu_factor, just set the register value to 0x3f, and let it be controlled by TX descriptor. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 3745d3e550d1e6c4301596ac05a5fe82c11301ce Author: Yan-Hsuan Chuang Date: Wed Oct 2 14:35:20 2019 +0800 rtw88: add driver TX queue support The mac80211 provides software TX queue for driver, as long as driver has hooked ieee80211_ops::wake_tx_queue. Each time a packet is queued onto the TX queue, that queue will be woken up the inform driver to serve the queue. Now driver only supports PCI interface ICs, there's no specific traffic control for each queue, just schedule a tasklet, and dump all of the packets at once to the DMA ring. Instead of TX the packets whenever TX queue is woke, tasklet handler can have more packets dumped to the device, takes advantage of burst write with DMA engine. And if the driver is going to support USB/SDIO ICs, the tasklet can be more flexible for aggregating the packets, enhance the efficiency of bandwidth usage. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 942e2a5d39a9706aa0115078a67659b4d071aece Author: Yan-Hsuan Chuang Date: Wed Oct 2 14:35:19 2019 +0800 rtw88: allows to set RTS in TX descriptor Allows driver to send RTS by filling tx descriptor. The user may want to set the rts threshold. But since we have not been taking over rate control from mac80211 to driver by setting flag IEEE80211_HW_HAS_RATE_CONTROL, there is nothing we can do about it. So here just store the value, and mac80211 will tell us to use rts protection by ieee80211_tx_info::control::use_rts. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 3a2dd6b7cadfc627378d2c3af065f82ebb1d4cbf Author: Chin-Yen Lee Date: Wed Oct 2 14:35:18 2019 +0800 rtw88: check firmware leave lps successfully Driver needs to wait for firmware to restore hardware setting to active mode after leaving lps. After getting H2C from driver for leaving lps, firmware will issue null packet without PS bit to inform AP driver is active, and then restore REG_TCR Register if AP has receiced null packet. But the transmission of null packet may cost much more time in noisy environment. If driver does not wait for firmware, null packet with PS bit could be sent due to incorrect REG_TCR setting. And AP will be confused. In our test, 100ms is enough for firmware to send null packet to AP. If REG_TCR Register is still wrong after 100ms, we will modify it directly, force the PS bit to be cleared Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit f76f6371643b563a7168a6ba5713ce93caa36ecc Author: Janosch Frank Date: Wed Oct 2 03:56:27 2019 -0400 KVM: s390: Cleanup kvm_arch_init error path Both kvm_s390_gib_destroy and debug_unregister test if the needed pointers are not NULL and hence can be called unconditionally. Signed-off-by: Janosch Frank Link: https://lore.kernel.org/kvm/20191002075627.3582-1-frankja@linux.ibm.com Reviewed-by: David Hildenbrand Reviewed-by: Thomas Huth Signed-off-by: Christian Borntraeger commit 7775cbaa11153ec5489cfa31de95aa1b5f29310b Author: Thomas Huth Date: Thu Sep 12 09:02:50 2019 +0200 KVM: s390: Remove unused parameter from __inject_sigp_restart() It's not required, so drop it to make it clear that this interrupt does not have any extra parameters. Signed-off-by: Thomas Huth Link: https://lore.kernel.org/kvm/20190912070250.15131-1-thuth@redhat.com Reviewed-by: Janosch Frank Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger commit 261ea7e29ed1e6a172d4ba829f4d5e3706ab29e4 Author: Chris Wilson Date: Fri Oct 4 11:59:58 2019 +0100 drm/i915: Restrict L3 remapping sysfs interface to dwords The L3 cache remapping is stored as u32 elements, and we should ensure that the user only supplies complete slice information(u32). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004105958.1741-1-chris@chris-wilson.co.uk commit 8b063441b7417a79b0c27efc401479748ccf8ad1 Author: zhong jiang Date: Fri Sep 13 00:52:27 2019 +0800 drivers/misc: ti-st: Remove unneeded variable in st_tty_open st_tty_open do not need local variable to store different value, Hence just remove it. Signed-off-by: zhong jiang Link: https://lore.kernel.org/r/1568307147-43468-1-git-send-email-zhongjiang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7726fb53e75fa48714181efd00167e0734303afb Author: Xiaoming Ni Date: Tue Sep 24 17:25:56 2019 +0800 tty:n_gsm.c: destroy port by tty_port_destroy() According to the comment of tty_port_destroy(): When a port was initialized using tty_port_init, one has to destroy the port by tty_port_destroy(); tty_port_init() is called in gsm_dlci_alloc() so tty_port_destroy() needs to be called in gsm_dlci_free() Signed-off-by: Xiaoming Ni Link: https://lore.kernel.org/r/1569317156-45850-1-git-send-email-nixiaoming@huawei.com Signed-off-by: Greg Kroah-Hartman commit 530c4ba3fa05bf121b87b13befc2f5a7e97cea15 Author: Pavel Machek Date: Tue Sep 24 10:32:44 2019 +0200 tty_ldisc: simplify tty_ldisc_autoload initialization We have got existing macro to check for CONFIG option, use it. Signed-off-by: Pavel Machek Link: https://lore.kernel.org/r/20190924083244.GA4344@amd Signed-off-by: Greg Kroah-Hartman commit c791fc76bc72320135fa79368d70005424016de2 Author: Oskar Senft Date: Thu Sep 5 10:41:30 2019 -0400 arm: dts: aspeed: Add vuart aspeed,sirq-polarity-sense to aspeed-g5.dtsi Enable auto-configuration of VUART SIRQ polarity on AST2500. Signed-off-by: Oskar Senft Link: https://lore.kernel.org/r/20190905144130.220713-3-osk@google.com Signed-off-by: Greg Kroah-Hartman commit 6270d22d39022cc22cafc7ce4dd80114b6916710 Author: Oskar Senft Date: Thu Sep 5 10:41:29 2019 -0400 dt-bindings: serial: 8250: Add aspeed,sirq-polarity-sense. Add documentation for 8250_aspeed_vuart's aspeed,sirq-polarity-sense property that enables to auto-configure the VUART's SIRQ polarity. Signed-off-by: Oskar Senft Acked-by: Rob Herring Link: https://lore.kernel.org/r/20190905144130.220713-2-osk@google.com Signed-off-by: Greg Kroah-Hartman commit 8d310c9107a2a3f19dc7bb54dd50f70c65ef5409 Author: Oskar Senft Date: Thu Sep 5 10:41:28 2019 -0400 drivers/tty/serial/8250: Make Aspeed VUART SIRQ polarity configurable Make the SIRQ polarity for Aspeed AST24xx/25xx VUART configurable via sysfs. This setting need to be changed on specific host platforms depending on the selected host interface (LPC / eSPI). The setting is configurable via sysfs rather than device-tree to stay in line with other related configurable settings. On AST2500 the VUART SIRQ polarity can be auto-configured by reading a bit from a configuration register, e.g. the LPC/eSPI interface configuration bit. Tested: Verified on TYAN S7106 mainboard. Signed-off-by: Oskar Senft Link: https://lore.kernel.org/r/20190905144130.220713-1-osk@google.com Signed-off-by: Greg Kroah-Hartman commit a8afc193558a42d5df724c84436ae3b2446d8a30 Author: Andy Shevchenko Date: Wed Sep 25 19:26:17 2019 +0300 serial: 8250_dw: Use devm_clk_get_optional() to get the input clock Simplify the code which fetches the input clock by using devm_clk_get_optional(). This comes with a small functional change: previously all errors were ignored except deferred probe. Now all errors are treated as errors. If no input clock is present devm_clk_get_optional() will return NULL instead of an error which matches the behavior of the old code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20190925162617.30368-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 254cc7743e847780655025c1d81a9c15854bf236 Author: Felipe Balbi Date: Tue Oct 1 14:58:25 2019 +0300 serial: 8250_lpss: Switch over to MSI interrupts Some devices support MSI interrupts. Let's at least try to use them in platforms that provide MSI capability. While at that, remove the now duplicated code from qrp_serial_setup(). Signed-off-by: Felipe Balbi Link: https://lore.kernel.org/r/20191001115825.795700-1-felipe.balbi@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 38b101c6b036a7350b45f565147f8136cf8e12ca Author: Qian Cai Date: Tue Sep 17 09:19:00 2019 -0400 tty/amba-pl011: fix a -Wunused-function warning pl011_dma_probe() is only used in pl011_dma_startup() which does only exist when CONFIG_DMA_ENGINE=y, so remove the unused dummy version to silence the warning. Signed-off-by: Qian Cai Link: https://lore.kernel.org/r/1568726340-4518-1-git-send-email-cai@lca.pw Signed-off-by: Greg Kroah-Hartman commit 91daae03188e0dd1da3c1b599df4ce7539d5a69f Author: Michal Simek Date: Mon Sep 2 16:27:59 2019 +0200 serial: core: Use cons->index for preferred console registration The reason for this patch is xilinx_uartps driver which create one dynamic instance per IP with unique major and minor combinations. drv->nr is in this case all the time setup to 1. That means that uport->line is all the time setup to 0 and drv->tty_driver->name_base is doing shift in name to for example ttyPS3. register_console() is looping over console_cmdline array and looking for proper name/index combination which is in our case ttyPS/3. That's why every instance of driver needs to be registered with proper combination of name/number (ttyPS/3). Using uport->line is doing registration with ttyPS/0 which is wrong that's why proper console index should be used which is in cons->index field. Also it is visible that recording console should be done based on information about console not about the port but in most cases numbers are the same and xilinx_uartps is only one exception now. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/4a877f1c7189a7c45b59a6ebfc3de607e8758949.1567434470.git.michal.simek@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 0c11b88883db1a83980633fc88091d3cdd79bd48 Author: Heiko Schocher Date: Fri Sep 13 07:01:05 2019 +0200 tty: 8250_of: Use software emulated RS485 direction control Use software emulated RS485 direction control to provide RS485 API Currently it is not possible to use rs485 as pointer to rs485_config struct in struct uart_port is NULL in case we configure the port through device tree. Signed-off-by: Heiko Schocher Link: https://lore.kernel.org/r/20190913050105.1132080-1-hs@denx.de Signed-off-by: Greg Kroah-Hartman commit 39f809192661be91fabc3ee77c2e15f9123c11cf Author: Lanqing Liu Date: Thu Sep 19 11:10:37 2019 +0800 serial: sprd: Add polling IO support In order to access the UART without the interrupts, the kernel uses the basic polling methods for IO with the device. With these methods implemented, it is now possible to enable kgdb during early boot over serial. Signed-off-by: Lanqing Liu Reviewed-by: Baolin Wang Tested-by: Baolin Wang Link: https://lore.kernel.org/r/f112a741c053ac5fb0637e2f058be81e17f78ccc.1568862391.git.liuhhome@gmail.com Signed-off-by: Greg Kroah-Hartman commit 76c38d30fee7907289c1951e6dc6e10ead12f4e1 Author: Philipp Puschmann Date: Mon Sep 23 15:59:16 2019 +0200 serial: imx: adapt rx buffer and dma periods Using only 4 DMA periods for UART RX is very few if we have a high frequency of small transfers - like in our case using Bluetooth with many small packets via UART - causing many dma transfers but in each only filling a fraction of a single buffer. Such a case may lead to the situation that DMA RX transfer is triggered but no free buffer is available. When this happens dma channel ist stopped - with the patch "dmaengine: imx-sdma: fix dma freezes" temporarily only - with the possible consequences that: with disabled hw flow control: If enough data is incoming on UART port the RX FIFO runs over and characters will be lost. What then happens depends on upper layer. with enabled hw flow control: If enough data is incoming on UART port the RX FIFO reaches a level where CTS is deasserted and remote device sending the data stops. If it fails to stop timely the i.MX' RX FIFO may run over and data get lost. Otherwise it's internal TX buffer may getting filled to a point where it runs over and data is again lost. It depends on the remote device how this case is handled and if it is recoverable. Obviously we want to avoid having no free buffers available. So we decrease the size of the buffers and increase their number and the total buffer size. Signed-off-by: Philipp Puschmann Reviewed-by: Lucas Stach Link: https://lore.kernel.org/r/20190923135916.1212-1-philipp.puschmann@emlix.com Signed-off-by: Greg Kroah-Hartman commit f6ec9483091f8e67adab0311a4e2f90aab523310 Author: Kai Vehmanen Date: Thu Oct 3 11:55:31 2019 +0300 drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms The CDCLK>=2*BCLK constraint applies to all generations since gen10. Extend the constraint logic in audio get/put_power(). Signed-off-by: Kai Vehmanen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-2-kai.vehmanen@linux.intel.com commit 3dda22d3dcd1fc39e7867b2c5f5fc8fa79fdefcc Author: Chris Wilson Date: Thu Oct 3 22:01:00 2019 +0100 drm/mm: Use clear_bit_unlock() for releasing the drm_mm_node() A few callers need to serialise the destruction of their drm_mm_node and ensure it is removed from the drm_mm before freeing. However, to be completely sure that any access from another thread is complete before we free the struct, we require the RELEASE semantics of clear_bit_unlock(). This allows the conditional locking such as Thread A Thread B mutex_lock(mm_lock); if (drm_mm_node_allocated(node)) { drm_mm_node_remove(node); mutex_lock(mm_lock); mutex_unlock(mm_lock); if (drm_mm_node_allocated(node)) drm_mm_node_remove(node); mutex_unlock(mm_lock); } kfree(node); to serialise correctly without any lingering accesses from A to the freed node. Allocation / insertion of the node is assumed never to race with removal or eviction scanning. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191003210100.22250-5-chris@chris-wilson.co.uk commit 4ee92c7149da9cb1991684628a9e47166a5e26f6 Author: Chris Wilson Date: Thu Oct 3 22:00:59 2019 +0100 drm/mm: Convert drm_mm_node booleans to bitops A straightforward conversion of assignment and checking of the boolean state flags (allocated, scanned) into non-atomic bitops. The caller remains responsible for all locking around the drm_mm and its nodes. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191003210100.22250-4-chris@chris-wilson.co.uk commit 71724f708997595919cb1e75c5e48916c8846d2e Author: Chris Wilson Date: Thu Oct 3 22:00:58 2019 +0100 drm/mm: Use helpers for drm_mm_node booleans In preparation for rearranging the booleans into a flags field, ensure all the current users are using the inline helpers and not directly accessing the members. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191003210100.22250-3-chris@chris-wilson.co.uk commit 1580d3cdddbba4a5ef78a04a5289e32844e6af24 Author: Kai Vehmanen Date: Thu Oct 3 11:55:30 2019 +0300 drm/i915: Fix audio power up sequence for gen10+ display On platfroms with gen10+ display, driver must set the enable bit of AUDIO_PIN_BUF_CTL register before transactions with the HDA controller can proceed. Add setting this bit to the audio power up sequence. Failing to do this resulted in errors during display audio codec probe, and failures during resume from suspend. Note: We may also need to disable the bit afterwards, but there are still unresolved issues with that. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111214 Signed-off-by: Kai Vehmanen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191003085531.30990-1-kai.vehmanen@linux.intel.com commit 905eccc6a509d2818e3dd1304c55dc5291b7ea88 Author: Marco Felsch Date: Tue Sep 17 16:44:49 2019 +0200 usb: usb251xb: add pm_ops Currently the driver don't support pm_ops. These ops are not necessary if the supply isn't switchable (always on). This assumptions seems to be wrong because no one needs a powered hub during suspend-to-ram/disk. So adding simple_dev_pm_ops to be able to switch off the hub during suspend and to restore the config after a resume operation. Signed-off-by: Marco Felsch Acked-by: Richard Leitner Link: https://lore.kernel.org/r/20190917144449.32739-5-m.felsch@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit a9bab25556f142c696c660f4be54dba9808403d2 Author: Marco Felsch Date: Tue Sep 17 16:44:48 2019 +0200 usb: usb251xb: simplify reset helper Currently the reset handler was always called to deassert the reset line because assert the line was done during probe. Now if we want to support pm by turn of the supply we need to call this routine twice and the i2c_lock_bus is done twice too. To simplify that we can drop the state and just do a reset in one go. So a future pm operation don't need to lock the i2c bus twice. Signed-off-by: Marco Felsch Reviewed-by: Richard Leitner Tested-by: Richard Leitner Link: https://lore.kernel.org/r/20190917144449.32739-4-m.felsch@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 4d7201cda226d7cffb591d94ca66ca0960891126 Author: Marco Felsch Date: Tue Sep 17 16:44:47 2019 +0200 usb: usb251xb: add vdd supply support Currently we don't handle the supply. We need to add the supply support to be able to switch the supply off e.g. during a suspend-to-ram operation. So we can guarantee a correct (re-)initialization. Signed-off-by: Marco Felsch Reviewed-by: Richard Leitner Tested-by: Richard Leitner Link: https://lore.kernel.org/r/20190917144449.32739-3-m.felsch@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ad9480ae360a75d3c384dc69f669800a2d966bd2 Author: Marco Felsch Date: Tue Sep 17 16:44:46 2019 +0200 dt-bindings: usb: usb251xb: add documentation for voltage supply Add the optional voltage supply documentation. If not specified the dummy-regulator is used. Signed-off-by: Marco Felsch Acked-by: Richard Leitner Link: https://lore.kernel.org/r/20190917144449.32739-2-m.felsch@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 4aec2393f51418e63dd1e9090063aeda5a6b03d7 Author: Biju Das Date: Wed Sep 4 09:15:41 2019 +0100 dt-bindings: usb: renesas_usb3: Document usb role switch support Update the DT bindings documentation to support usb role switch for USB Type-C connector using USB role switch class framework. Signed-off-by: Biju Das Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1567584941-13690-4-git-send-email-biju.das@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 1c48c759ef4bb9031b3347277f04484e07e27d97 Author: Biju Das Date: Wed Sep 4 09:15:40 2019 +0100 usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller Driver for TI HD3SS3220 USB Type-C DRP port controller. The driver currently registers the port and supports data role swapping. Signed-off-by: Biju Das Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/1567584941-13690-3-git-send-email-biju.das@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 1918fa0d44985cbc8ab2f315c120525b207b2195 Author: Biju Das Date: Wed Sep 4 09:15:39 2019 +0100 dt-bindings: usb: hd3ss3220 device tree binding document Add device tree binding document for TI HD3SS3220 Type-C DRP port controller driver. Signed-off-by: Biju Das Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1567584941-13690-2-git-send-email-biju.das@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 39abcc84846bbc0538f13c190b6a9c7e36890cd2 Author: Veeraiyan Chidambaram Date: Wed Sep 11 15:15:56 2019 +0200 usb: renesas_usbhs: add suspend event support in gadget mode When R-Car Gen3 USB 2.0 is in Gadget mode, if host is detached an interrupt will be generated and Suspended state bit is set in interrupt status register. Interrupt handler will call driver->suspend(composite_suspend) if suspended state bit is set. composite_suspend will call ffs_func_suspend which will post FUNCTIONFS_SUSPEND and will be consumed by user space application via /dev/ep0. To be able to detect host detach, extend the DVSQ_MASK to cover the Suspended bit of the DVSQ[2:0] bitfield from the Interrupt Status Register 0 (INTSTS0) register and perform appropriate action in the DVST interrupt handler (usbhsg_irq_dev_state). Without this commit, disconnection of the phone from R-Car-H3 ES2.0 Salvator-X CN9 port is not recognized and reverse role switch does not happen. If phone is connected again it does not enumerate. With this commit, disconnection will be recognized and reverse role switch will happen by a user space application. If phone is connected again it will enumerate properly and will become visible in the output of 'lsusb'. Signed-off-by: Veeraiyan Chidambaram Signed-off-by: Eugeniu Rosca Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1568207756-22325-3-git-send-email-external.veeraiyan.c@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit fef22636889e18517c2fc0ff88e2ae401bb9a76d Author: Eugeniu Rosca Date: Wed Sep 11 15:15:55 2019 +0200 usb: renesas_usbhs: enable DVSE interrupt Commit [1] enabled the possibility of checking the DVST (Device State Transition) bit of INTSTS0 (Interrupt Status Register 0) and calling the irq_dev_state() handler if the DVST bit is set. But neither commit [1] nor commit [2] actually enabled the DVSE (Device State Transition Interrupt Enable) bit in the INTENB0 (Interrupt Enable Register 0). As a consequence, irq_dev_state() handler is getting called as a side effect of other (non-DVSE) interrupts being fired, which definitely can't be relied upon, if DVST notifications are of any value. Why this doesn't hurt is because usbhsg_irq_dev_state() currently doesn't do much except of a dev_dbg(). Once more work is added to the handler (e.g. detecting device "Suspended" state and notifying other USB gadget components about it), enabling DVSE becomes a hard requirement. Do it in a standalone commit for better visibility and clear explanation. [1] commit f1407d5c6624 ("usb: renesas_usbhs: Add Renesas USBHS common code") [2] commit 2f98382dcdfe ("usb: renesas_usbhs: Add Renesas USBHS Gadget") Signed-off-by: Eugeniu Rosca Signed-off-by: Veeraiyan Chidambaram Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1568207756-22325-2-git-send-email-external.veeraiyan.c@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit 5022204a464c598e36470717f5dda18576234bce Author: Eugeniu Rosca Date: Wed Sep 11 15:15:54 2019 +0200 usb: renesas_usbhs: simplify usbhs_status_get_device_state() Similar to usbhs_status_get_ctrl_stage(), *_get_device_state() is not supposed to return any error code since its return value is the DVSQ bitfield of the INTSTS0 register. According to SoC HW manual rev1.00, every single value of DVSQ[2:0] is valid and none is an error: ----8<---- Device State 000: Powered state 001: Default state 010: Address state 011: Configuration state 1xx: Suspended state ----8<---- Hence, simplify the function body. The motivation behind dropping the switch/case construct is being able to implement reading the suspended state. The latter (based on the above DVSQ[2:0] description) doesn't have a unique value, but is rather a list of states (which makes switch/case less suitable for reading/validating it): 100: (Suspended) Powered state 101: (Suspended) Default state 110: (Suspended) Address state 111: (Suspended) Configuration state Signed-off-by: Eugeniu Rosca Signed-off-by: Veeraiyan Chidambaram Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1568207756-22325-1-git-send-email-external.veeraiyan.c@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit 87e8dfa6f7ebdb3e2802a606bda44d26054f92a8 Author: Boris Krasnovskiy Date: Wed Sep 11 08:41:54 2019 +0200 USB: host: ohci-at91: resume: balance the clock start call There is a clock enable counter run away problem in resume ohci_at91. Code enables clock that was never disabled in case of non wakeup interface. That would make clock unstoppable in future. Use proper alternative to start clocks only if they were stopped before. Signed-off-by: Boris Krasnovskiy Signed-off-by: Nicolas Ferre Acked-by: Alan Stern Link: https://lore.kernel.org/r/20190911064154.28633-4-nicolas.ferre@microchip.com Signed-off-by: Greg Kroah-Hartman commit a3bf4d6816556baa9a503c9232eb7e3f018ff8dc Author: Nicolas Ferre Date: Wed Sep 11 08:41:53 2019 +0200 USB: host: ohci-at91: suspend: delay needed before to stop clocks In order to completely remove marginal power consumption in PM suspend, we need to let the controller settle down before being stopped. In ohci_hcd_at91_drv_suspend() function, one additional delay is needed before to stop the clocks. Reported-by: Boris Krasnovskiy Signed-off-by: Nicolas Ferre Acked-by: Alan Stern Link: https://lore.kernel.org/r/20190911064154.28633-3-nicolas.ferre@microchip.com Signed-off-by: Greg Kroah-Hartman commit 9c4567fa0a44e3733f49f93a2197d9907b836d4a Author: Boris Krasnovskiy Date: Wed Sep 11 08:41:52 2019 +0200 USB: host: ohci-at91: completely shutdown the controller in at91_stop_hc() When removing the ohci-at91 module, the fact of not running complete shutdown of all the ports was keeping additional analog cells consuming power for no reason. Doing Reset (OHCI_HCR) to HcCommandStatus register is the way to go, but using the OHCI controller shutdown procedure is just perfect for this. Signed-off-by: Boris Krasnovskiy Signed-off-by: Nicolas Ferre Acked-by: Alan Stern Link: https://lore.kernel.org/r/20190911064154.28633-2-nicolas.ferre@microchip.com Signed-off-by: Greg Kroah-Hartman commit 5d88ef9eead8b5756122cc799593780d15dae471 Author: Bartosz Golaszewski Date: Tue Oct 1 15:23:33 2019 +0200 usb: host: xhci-tegra: use regulator_bulk_set_supply_names() Use the new regulator helper instead of a for loop. Signed-off-by: Bartosz Golaszewski Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20191001132333.20146-4-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 9ac0fc3906ec88663282f325f92486cf863f9c2b Author: Peter Geis Date: Wed Oct 2 09:19:33 2019 -0400 usb: chipidea: tegra: clean up tegra_udc flag code All Tegra devices handled by tegra-udc use the same flags. Consolidate all the entries under one roof. Signed-off-by: Peter Geis Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20191002131933.6206-1-pgwipeout@gmail.com Signed-off-by: Greg Kroah-Hartman commit 29e56c0cf5d910a07b9932cf5924ade9d98a8143 Author: Saurav Girepunje Date: Wed Oct 2 20:02:45 2019 +0530 usb: musb: musb_gadget.c: Remove unused variable Remove unused variable status from musb_gadget_disable(). Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20191002143241.GA11615@saurav Signed-off-by: Greg Kroah-Hartman commit 81cdeca45a061f0ec9ecbbf7de864e2a57df5ee4 Author: Jani Nikula Date: Wed Oct 2 17:41:38 2019 +0300 drm/i915/dp: remove static variable for aux last status Add aux_busy_last_status to intel_dp. Don't bother with initializing to all ones; the only difference is potentially missing logging for one error case if the readout is all zeros. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191002144138.7917-1-jani.nikula@intel.com commit c0ee57ce66fafbe866bf00e097b969d0f4524bb8 Author: Colin Ian King Date: Fri Sep 27 09:50:31 2019 +0100 USB: gadget: udc: clean up an indentation issue There is a statement that is indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190927085031.14739-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit faf4b0dcea31f28979b5cde706d3e5d7b4ad840d Author: Colin Ian King Date: Fri Sep 27 10:20:00 2019 +0100 usbip: clean up an indentation issue There is a return statement that is indented incorrectly, fix this. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190927092000.19373-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit f906d0614f5f5742c46db9773c0fa5f4c521549f Author: Colin Ian King Date: Thu Sep 26 13:45:53 2019 +0100 usb: ftdi-elan: move a couple of statements to next line There are a couple of statements that follow the end brace of while loops that should be moved to the next line to clean up the coding style. Cleans up style warnings from smatch. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190926124553.15177-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit c2c1c66b5d4360debc9564d0aa11c873ed2e7aaa Author: Krzysztof Kozlowski Date: Mon Sep 23 17:49:56 2019 +0200 usb: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Acked-by: Johan Hovold Link: https://lore.kernel.org/r/20190923154956.6868-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8f9b6228b2fcc58508774cfdfdcc4e3ac35ff7c8 Author: Colin Ian King Date: Wed Sep 11 11:07:45 2019 +0100 usb: host: u132-hcd: fix spelling mistake "overcurren" -> "overcurrent" There is a spelling mistake in a module parameter description. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190911100745.30711-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit f68341d194c35f4e8577d6f4ac90765f58e3f05f Author: YueHaibing Date: Wed Sep 4 16:44:27 2019 +0800 USB: musb: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904084427.18532-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 89fa75acc40fd053115ce24d68c9a75be96af3e2 Author: YueHaibing Date: Wed Sep 4 16:45:58 2019 +0800 usb: phy: keystone: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904084558.24484-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 33b4332f928256744ec59aa8fb30989f878bd4db Author: YueHaibing Date: Wed Sep 4 16:48:27 2019 +0800 usb: phy: mxs: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904084827.24108-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit d706a95bb48a2c03c42ae15e28c1ca245f3362ab Author: YueHaibing Date: Wed Sep 4 16:50:45 2019 +0800 usb: renesas_usbhs: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904085045.24204-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit e719ffbf872ecf4d9b56314fb25ebe019895abe7 Author: YueHaibing Date: Wed Sep 4 17:02:39 2019 +0800 usb: gadget: at91_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904090239.23920-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 9cbe0c60c7919d98c6ea51fd91a6ba8c7b09eed6 Author: YueHaibing Date: Wed Sep 4 17:05:49 2019 +0800 usb: isp1362-hcd: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904090549.24456-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 55419932d2ace7af2ce76eb6bec11d36e8e27f2f Author: YueHaibing Date: Wed Sep 4 17:10:04 2019 +0800 usb: host: xhci-tegra: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904091004.3808-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3aec68e3e020b6c7b6e5bac41605a1fee59097e6 Author: YueHaibing Date: Wed Sep 4 17:32:27 2019 +0800 usb: gadget: bcm63xx_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904093227.23304-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 893a66d342981f8b67cdbf476f0b81f7015cda49 Author: YueHaibing Date: Wed Sep 4 17:33:35 2019 +0800 usb: bdc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904093335.22860-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit ec035f91297d81506384c18563101a2c21cd8177 Author: YueHaibing Date: Wed Sep 4 17:40:33 2019 +0800 usb: gadget: gr_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904094033.19652-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 80d59826d2d00d4e5751d26c4d743a9021d09b0f Author: YueHaibing Date: Wed Sep 4 17:42:22 2019 +0800 usb: gadget: pxa25x_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904094222.23128-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 9fd7a05e9776400f05fe07f81d3d71dc231d4fc3 Author: YueHaibing Date: Wed Sep 4 17:45:57 2019 +0800 usb: gadget: pxa27x_udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904094557.22884-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3c60e959fa3543491f829ae52a4d70b58dea6f06 Author: YueHaibing Date: Wed Sep 4 17:47:38 2019 +0800 usb: gadget: r8a66597-udc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904094738.7860-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 601acc7899566f597c2f1980c3cc751a35dc4281 Author: YueHaibing Date: Wed Sep 4 17:48:36 2019 +0800 usb: gadget: renesas_usb3: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904094836.18532-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 237b668c1c5da7e22c296ceb9daf772fbb5731f3 Author: YueHaibing Date: Wed Sep 4 17:50:22 2019 +0800 usb: gadget: s3c-hsudc: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190904095022.24528-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2ce113de31320756b25179f3f4512a522bc45263 Author: Johannes Berg Date: Wed Oct 2 11:12:25 2019 +0200 mac80211: simplify TX aggregation start There really is no need to make drivers call the ieee80211_start_tx_ba_cb_irqsafe() function and then schedule the worker if all we want is to set a bit. Add a new return value (that was previously considered invalid) to indicate that the driver is immediately ready for the session, and make drivers use it. The only drivers that remain different are the Intel ones as they need to negotiate more with the firmware. Link: https://lore.kernel.org/r/1570007543-I152912660131cbab2e5d80b4218238c20f8a06e5@changeid Signed-off-by: Johannes Berg commit 4fd0328d2f6314a40063cb2abcaed78976e3c022 Author: Johannes Berg Date: Tue Oct 1 23:26:35 2019 +0200 mac80211: pass internal sta to ieee80211_tx_frags() This simplifies the code somewhat, and if necessary would let us access the sta itself in that code. Link: https://lore.kernel.org/r/1569965193-Id656db92703dded4bb2e3ec5dc329529f58e58f0@changeid Signed-off-by: Johannes Berg commit c0e284ccfedafb646c2af33bdd07985231f71916 Author: Aniket Masule Date: Tue Sep 24 02:47:49 2019 -0300 media: venus: Update clock scaling Current clock scaling calculations are same for vpu4 and previous versions. For vpu4, Clock scaling calculations are updated with cycles/mb and bitrate. This helps in getting precise clock required. Signed-off-by: Aniket Masule Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit e5b7fabb78f2793146104cba525d24d3236d400b Author: Aniket Masule Date: Tue Sep 24 02:47:48 2019 -0300 media: venus: Add codec data table Add vpp cycles for different types of codec. It indicates the cycles required by video hardware to process each macroblock. Add vsp cycles, cycles required by stream processor. Initialize the codec data with core resources. Signed-off-by: Aniket Masule Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 44d0a9c05bc078aef75229d0750e9c55959caae4 Author: Chris Wilson Date: Thu Oct 3 22:00:56 2019 +0100 drm/i915/execlists: Skip redundant resubmission If we unwind the active requests, and on resubmission discover that we intend to preempt the active contexts with themselves, simply skip the ELSP submission. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191003210100.22250-1-chris@chris-wilson.co.uk commit 8dbebb2bd01e6f36e9a215dcde99ace70408f2c8 Author: Stanimir Varbanov Date: Tue Sep 17 09:02:26 2019 -0300 media: venus: Fix occasionally failures to suspend Failure to suspend (venus_suspend_3xx) happens when the system is fresh booted and loading venus driver. This happens once and after reload the venus driver modules the problem disrepair. Fix the failure by skipping the check for WFI and IDLE bits if PC_READY is on in control status register. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 4b76f9ed47074990d85c2ec52288a7d09c3ea357 Author: Sunil Dutt Date: Fri Sep 13 18:11:44 2019 +0530 nl80211: Document the expectation for NL80211_ATTR_IE in NL80211_CMD_CONNECT This commit documents the expectation for NL80211_ATTR_IE when included in NL80211_CMD_CONNECT, as following. Driver shall not modify the IEs specified through NL80211_ATTR_IE if NL80211_ATTR_MAC is included. However, if NL80211_ATTR_MAC_HINT is included, these IEs through NL80211_ATTR_IE are specified by the user space based on the best possible BSS selected. Thus, if the driver ends up selecting a different BSS, it can modify these IEs accordingly (e.g. userspace asks the driver to perform PMKSA caching with BSS1 and the driver ends up selecting BSS2 with different PMKSA cache entry. RSNIE has to get updated with the apt PMKID). Signed-off-by: Sunil Dutt Link: https://lore.kernel.org/r/1568378504-15179-1-git-send-email-usdutt@codeaurora.org Signed-off-by: Johannes Berg commit 020fa0f2f03ad7ef9c51cfda6a156b3cdf86b631 Author: Koen Vandeputte Date: Wed Sep 11 16:14:31 2019 +0200 mac80211: IBSS: avoid unneeded return value processing when ieee80211_ibss_csa_beacon() fails, we return it's value. When it succeeds, we basically copy it's value and also .. return it. Just return it immediately, simplifying the code. Signed-off-by: Koen Vandeputte Link: https://lore.kernel.org/r/20190911141431.12498-1-koen.vandeputte@ncentric.com Signed-off-by: Johannes Berg commit 9c98f021e4e717ffd9948fa65340ea3ef12b7935 Author: Chris Wilson Date: Fri Oct 4 11:11:40 2019 +0100 dma-fence: Serialise signal enabling (dma_fence_enable_sw_signaling) Make dma_fence_enable_sw_signaling() behave like its dma_fence_add_callback() and dma_fence_default_wait() counterparts and perform the test to enable signaling under the fence->lock, along with the action to do so. This ensure that should an implementation be trying to flush the cb_list (by signaling) on retirement before freeing the fence, it can do so in a race-free manner. See also 0fc89b6802ba ("dma-fence: Simply wrap dma_fence_signal_locked with dma_fence_signal"). v2: Refactor all 3 enable_signaling paths to use a common function. v3: Don't argue, just keep the tracepoint in the existing spot. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191004101140.32713-1-chris@chris-wilson.co.uk commit 3032c0b47e5f71a9a3c4c8e7bfa83d9005814510 Author: Imre Deak Date: Wed Oct 2 23:41:08 2019 +0300 drm/i915/tgl: Add the Thunderbolt PLL divider values The Thunderbolt PLL divider values on TGL differ from the ICL ones, update the PLL parameter calculation function accordingly. Bspec: 49204 v2: - Remove unused refclk config. (José) Cc: Jose Souza Cc: Clinton A Taylor Cc: Lucas De Marchi Cc: Mika Westerberg Tested-by: Mika Westerberg Signed-off-by: Imre Deak Reviewed-by: Jose Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191002204108.32242-1-imre.deak@intel.com commit 40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:48 2019 +0000 staging: wfx: implement the rest of mac80211 API Finish to fill struct ieee80211_ops with necessary callbacks. Driver is now ready to be registered to mac80211. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-21-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit fb2490f693ee0151c0d847d1e4c575313a46b13b Author: Jérôme Pouiller Date: Thu Sep 19 14:25:47 2019 +0000 staging: wfx: implement 802.11 key handling wfx_set_key() mostly copy bytes on correct offsets. A big piece of code for a simple work. Unfortunately, I did not found any way to factorize it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-20-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1a61af0f8cbecd1610c6fc380d0fb00f57fd43f2 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:47 2019 +0000 staging: wfx: allow to scan networks Chip can make foreground scan or background, but both can't be mixed in same request. So, we need to split each mac80211 requests into multiple HIF requests. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-19-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1f21b7fefa7290f4d66d4f23117e892b1aaf10d9 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:46 2019 +0000 staging: wfx: allow to receive 802.11 frames Again, this task is more complex than it should since driver try to handle itself power saving of stations. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-18-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9bca45f3d6924f19f29c0d019e961af3f41bdc9e Author: Jérôme Pouiller Date: Thu Sep 19 14:25:45 2019 +0000 staging: wfx: allow to send 802.11 frames Three things make this task more complex than it should: - Chip necessitate to associate a link-id to each station. It is same thing than association ID but, using 8 bits only. - Rate policy is sent separately from Tx frames - Driver try to handle itself power saving of stations and multicast data Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-17-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit f4a71ba8753d94cc5c1e73746352274a598a25ee Author: Jérôme Pouiller Date: Thu Sep 19 14:25:44 2019 +0000 staging: wfx: add debug files and trace debug events Add traces when debug events happen and allow to ask internal information to chip. These features work independently from mac80211. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-16-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c7ff39dd8b5393c55b0a8a5dedb5ba13f4c838a8 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:44 2019 +0000 staging: wfx: setup initial chip configuration A few tasks remain to be done in order to finish chip initial configuration: - configure chip to use multi-tx confirmation (speed up data transfer) - configure chip to use wake-up feature (save power consumption during runtime) - set hardware configuration (clocks, RF, pinout, etc...) using a Platform Data Set (PDS) file On release, driver completely shutdown the chip to save power consumption. Documentation about PDS and PDS data for sample boards are available here[1]. One day, PDS data may find a place in device tree but, currently, PDS is too much linked with firmware to allowing that. This patch also add "send_pds" file in debugfs to be able to dynamically change PDS (only for debug, of course). [1]: https://github.com/SiliconLabs/wfx-firmware/tree/master/PDS Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-15-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 846239f641db5af8dd952575a65808281f2d849e Author: Jérôme Pouiller Date: Thu Sep 19 14:25:43 2019 +0000 staging: wfx: introduce "secure link" Chip support encryption of the link between host and chip. This feature is called "secure link". Driver code on github[1] support it. However, it relies on mbedtls for cryptographic functions. So, I decided to not import this feature in current patch. However, in order to keep code synchronized between github and kernel, I imported all code related to this feature, even if most of it is just no-op. [1]: https://github.com/SiliconLabs/wfx-linux-driver/ Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-14-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 285be87c79e173f08af5e1a6417a106fb14934b7 Author: Jean Delvare Date: Fri Oct 4 10:37:48 2019 +0200 eeprom: at24: Improve confusing log message Currently when binding to an spd EEPROM, the at24 drivers logs the following message: 256 byte spd EEPROM, read-only, 0 bytes/write The last part is confusing, as by definition you don't write to a read-only EEPROM, plus "0 bytes/write" makes no sense whatsoever. I propose to have a different message for read-only EEPROMs, which does not include this last part. Signed-off-by: Jean Delvare Cc: Bartosz Golaszewski Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Reviewed-by: Wolfram Sang Signed-off-by: Bartosz Golaszewski commit f95a29d40782f4f0052a692a822de3ba044b19ff Author: Jérôme Pouiller Date: Thu Sep 19 14:25:43 2019 +0000 staging: wfx: add HIF commands helpers Provide an abstraction for HIF commands. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-13-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 4f8b7fabb15df3658564a98971fc67029be1815d Author: Jérôme Pouiller Date: Thu Sep 19 14:25:42 2019 +0000 staging: wfx: allow to send commands to chip Chip has multiple input buffers and can handle multiple 802.11 frames in parallel. However, other HIF command must be sent sequentially. wsm_send_cmd() handles these requests. This commit also add send_hif_cmd in debugfs. This file allows to send arbitrary commands to chip. It can be used for debug and testing. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-12-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit e16e7f0716a6ba9a690fc5229a6e35e00e03b805 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:41 2019 +0000 staging: wfx: instantiate mac80211 data Allocate a struct ieee80211_hw but do not yet register it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-11-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 185c106f79bf2714e86316057948b8c2853b0666 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:41 2019 +0000 staging: wfx: add support for start-up indication Once firmware is loaded, it send a first indication to host. This indication signalize that host can start to communicate with firmware. In add, it contains information about chip and firmware (MAC addresses, firmware version, etc...). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-10-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1cc298c9152352b36a7b0019b40e1863689727b2 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:40 2019 +0000 staging: wfx: add tracepoints for HIF These tracepoints decode HIF headers and provide more human readable results. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b0998f0c040daf798d2f847d9588d57f2e2ade69 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:40 2019 +0000 staging: wfx: add IRQ handling bh_work() is in charge to schedule all HIF message from/to chip. On normal operation, when an IRQ is received, driver can get size of next message in control register. In order to save control register access, when chip send a message, it also appends a copy of control register after the message (this register is not accounted in message length declared in message header, but must accounted in bus request). This copy of control register is called "piggyback". It also handles a power saving mechanism specific to WFxxx series. This mechanism is based on a GPIO called "wakeup" GPIO. Obviously, this gpio is not part of SPI/SDIO standard buses and must be declared independently (this is the main reason for why SDIO mode try to get parameters from DT). When wakeup is enabled, host can communicate with chip only if it is awake. To wake up chip, there are two cases: - host receive an IRQ from chip (chip initiate communication): host just have to set wakeup GPIO before reading data - host want to send data to chip: host set wakeup GPIO, then wait for an IRQ (in fact, wait for an empty message) and finally send data bh_work() is also in charge to track usage of chip buffers. Normally each request expect a confirmation. However, you can notice that special "multi tx" confirmation can acknowledge multiple requests at time. Finally, note that wfx_bh_request_rx() is not atomic (because of control_reg_read()). So, in SPI mode, hard-irq handler only postpone all processing to wfx_spi_request_rx(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit e4ee3cb3efc67893ad7d8e27176e5cfee6f3c7dc Author: Jérôme Pouiller Date: Thu Sep 19 14:25:39 2019 +0000 staging: wfx: import HIF API headers These files are shared with firmware sources. Only a subset of these definitions are used by driver but, for now, it is easier to import all. API defines 3 kinds of messages: - Requests (req) are sent from host to chip - Confirmations (cnf) are sent by chip and are always in reply to a request - Indications (ind) are spontaneous message from chip to host One request normally generate one confirmation. There are a few exceptions to this rule: - "shutdown" request is not acknowledged - multiple tx request can be acknowledged a unique "multi-tx" confirmation In add, API defines MIB. They are sub-structures for write_mib and read_mib API. Note that all numbers in API have to be little endian when sent/received from/to chip (I didn't declared them with __le32 because driver also use them internally). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 652b4afb240e5dc196995597942309e89e89c767 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:38 2019 +0000 staging: wfx: load firmware A firmware is necessary to run the chip. wfx_init_device() is in charge of loading firmware on chip and doing low level initialization. Firmwares for WF200 are available here: https://github.com/SiliconLabs/wfx-firmware/ Note that firmware are encrypted. Driver checks that key used to encrypt firmware match with key burned into chip. Currently, "C0" key is used for production chips. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit fee695e3e30f72a18d4631b8d7589cf413282c7c Author: Jérôme Pouiller Date: Thu Sep 19 14:25:38 2019 +0000 staging: wfx: add tracepoints for I/O access Some tracepoints are useful for debugging. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a794e8b6fafe0dc82b2a2af32e85a859ad68a3a1 Author: Jérôme Pouiller Date: Thu Sep 19 14:25:37 2019 +0000 staging: wfx: add I/O API hwio.c provides an abstraction to access different types of register of the chip. Note that only data register (aka FRAME_OUT) and control register are used normal communication. Other registers are only used during chip start up. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit bebf00512cc2c2a942a6dc47674bf44b7a3cb681 Author: Tomi Valkeinen Date: Mon Sep 30 13:38:40 2019 +0300 drm/omap: hdmi4: fix use of uninitialized var If use_mclk is false, mclk_mode is written to a register without initialization. This doesn't cause any ill effects as the written value is not used when use_mclk is false. To fix this, write use_mclk only when use_mclk is true. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20190930103840.18970-8-tomi.valkeinen@ti.com Reviewed-by: Laurent Pinchart commit 9c5fa79f802a8e832415dafffc3954872eec6740 Author: Tomi Valkeinen Date: Mon Sep 30 13:38:39 2019 +0300 drm/omap: hdmi5: automatically choose limited/full range output Currently the HDMI driver uses always limited range RGB output. This patch improves the behavior by using limited range only if the output is identified as a HDMI display, and VIC > 1. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20190930103840.18970-7-tomi.valkeinen@ti.com commit 34d71136e0d93667f4697ff9eba87312a3c09dba Author: Jyri Sarha Date: Mon Sep 30 13:38:38 2019 +0300 drm/omap: dss: move platform_register_drivers() to dss.c and remove core.c The core.c just for registering the drivers is kind of useless. Let's get rid of it and register the dss drivers in dss.c. Signed-off-by: Jyri Sarha Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20190930103840.18970-6-tomi.valkeinen@ti.com commit f5b1fae153d9d9b719cc390eb3fb490996a09d2d Author: Tomi Valkeinen Date: Mon Sep 30 13:38:37 2019 +0300 drm/omap: fix missing scaler pixel fmt limitations OMAP2 and OMAP3/AM4 have limitations with the scaler: - OMAP2 can only scale XRGB8888 - OMAP3/AM4 can only scale XRGB8888, RGB565, YUYV and UYVY The driver doesn't check these limitations, which leads to sync-lost floods. This patch adds a check for the pixel formats when scaling. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20190930103840.18970-5-tomi.valkeinen@ti.com commit 157d8f60363a7c5767fdda81fea946b44945454f Author: Alejandro Hernandez Date: Mon Sep 30 13:38:36 2019 +0300 drm/omap: tweak HDMI DDC timings A "HDMI I2C Master Error" is sometimes reported with the current DDC SCL timings. The current settings for a 10us SCL period (100 KHz) causes the error with some displays. This patch increases the SCL signal period from 10us to 10.2us, with the new settings the error is not observed Signed-off-by: Alejandro Hernandez Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20190930103840.18970-4-tomi.valkeinen@ti.com commit 6e366c28e6b146d4906e616a500ad1e6199cd3ee Author: Tomi Valkeinen Date: Mon Sep 30 13:38:35 2019 +0300 drm/omap: avoid copy in mgr_fld_read/write Avoid unnecessary copy in mgr_fld_read/write by taking a pointer to the reg_resc and using that. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20190930103840.18970-3-tomi.valkeinen@ti.com Reviewed-by: Laurent Pinchart commit a9c4fbd544f967afbc19245e1e40800ca83dfc45 Author: Tomi Valkeinen Date: Mon Sep 30 13:38:34 2019 +0300 drm/omap: drop unneeded locking from mgr_fld_write() Commit d49cd15550d9d4495f6187425318c245d58cb63f ("OMAPDSS: DISPC: lock access to DISPC_CONTROL & DISPC_CONFIG") added locking to mgr_fld_write(). This was needed in omapfb times due to lack of good locking, especially in the case of both V4L2 and fbdev layers using the DSS driver. This is not needed for omapdrm, so we can remove the locking. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20190930103840.18970-2-tomi.valkeinen@ti.com commit 0096214a59a72b3c3c943e27bd03307324d3ce0f Author: Jérôme Pouiller Date: Thu Sep 19 14:25:37 2019 +0000 staging: wfx: add support for I/O access Introduce bus level communication layer. At this level, 7 registers can be addressed. Notice that SPI driver is able to manage chip reset. SDIO mode relies on an external driver (`mmc-pwrseq`) to reset chip. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a7a91ca5a23dbcc68f04d18ef7e765b1e4f64c7f Author: Jérôme Pouiller Date: Thu Sep 19 14:25:36 2019 +0000 staging: wfx: add infrastructure for new driver Instantiate build infrastructure WFx driver. This driver provides support for Wifi chipset Silicon Labs WF200 and further: https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf This chip support SPI and SDIO bus. SDIO interface has two particularities: 1. Some parameters may be useful for end user (I will talk about gpio_wakeup later). 2. The SDIO VID and PID of WF200 are 0000:0001 which are too much generic to rely on. So, current code checks VID/PID and looks for a node in DT (since WF200 targets embedded platforms, I don't think it is a problem to rely on DT). DT can also be used to define to parameters for driver. Currently, if no node is found, a warning is emitted, but it could be changed in error. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20190919142527.31797-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d98bb9c2fec01254d2e04e1eed51dde9ae611314 Author: Valdis Kletnieks Date: Wed Oct 2 15:01:35 2019 -0400 staging: exfat: explain the fs_sync() issue in TODO We've seen several incorrect patches for fs_sync() calls in the exfat driver. Add code to the TODO that explains this isn't just a delete code and refactor, but that actual analysis of when the filesystem should be flushed to disk needs to be done. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/9837.1570042895@turing-police Signed-off-by: Greg Kroah-Hartman commit 8789f13ddc77723e9451548b984382605340899c Author: Valdis Kletnieks Date: Wed Oct 2 15:16:24 2019 -0400 staging: exfat: fix fs_sync() calls. The majority of them were totally backwards. Change the logic so that if DELAYED_SYNC *isn't* in the config, we actually flush to disk before flagging the file system as clean. That leaves two calls in the DELAYED_SYNC case. More detailed analysis is needed to make sure that's what's really needed, or if other call sites also need a fs_sync() call. This patch is at least "less wrong" than the code was, but further changes should be another patch. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/11092.1570043784@turing-police Signed-off-by: Greg Kroah-Hartman commit 7e6af677d82719ce5972b94bc7d9a4b5c8eddae0 Author: Michael Straube Date: Thu Oct 3 14:25:14 2019 +0200 staging: rtl8188eu: cleanup comments in update_hw_ht_param Cleanup comments in update_hw_ht_param to follow kernel coding style and avoid line length over 80 characters. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191003122514.1760-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5f6bca795f6d27b04aa846805a1b396addde9100 Author: Michael Straube Date: Thu Oct 3 14:25:13 2019 +0200 staging: rtl8188eu: cleanup whitespace in update_hw_ht_param Replace tabs with spaces in declarations and reomve two blank lines in update_hw_ht_param to cleanup whitespace and improve readability. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191003122514.1760-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7e3303fc8c45a7164d3af67791cea615bb4b9fd0 Author: Michael Straube Date: Thu Oct 3 14:25:12 2019 +0200 staging: rtl8188eu: rename variables to avoid mixed case Rename the local varibles max_AMPDU_len and min_MPDU_spacing to avoid mixed case. max_AMPDU_len -> max_ampdu_len min_MPDU_spacing -> min_mpdu_spacing Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191003122514.1760-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit b74e124e10484dae41581cb4838ab3e2467996a4 Author: Michael Straube Date: Thu Oct 3 14:25:11 2019 +0200 staging: rtl8188eu: convert variables from unsigned char to u8 Convert the local variables max_AMPDU_len and min_MPDU_spacing from unsigned char to u8 and remove unnecessary castings to u8 pointer. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191003122514.1760-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit b664312285eb6bb9378159f2fea02e39886a7012 Author: Rohit Sarkar Date: Wed Oct 2 22:35:19 2019 +0530 staging: rtl8712: fix boundary condition for n Now that snprintf is replaced by scnprintf n >= MAX_WPA_IE_LEN doesn't make sense as the maximum value n can take is MAX_WPA_IE_LEN. Signed-off-by: Rohit Sarkar Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20191002170518.GA1688@SARKAR Signed-off-by: Greg Kroah-Hartman commit f8fcbb6ba89c8144d3cc4ce72999672c23b82ed2 Author: Nachammai Karuppiah Date: Thu Oct 3 11:03:17 2019 -0700 staging: vc04_services: Avoid typedef Avoid typedefs to maintain kernel coding style. Issue found by checkpatch.pl Replace the enum typedef VCHIQ_REASON_T with vchiq_reason. Signed-off-by: Nachammai Karuppiah Link: https://lore.kernel.org/r/1570125797-24410-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman commit 24fc755f56b15bf3215c0d0b8b62d7204f369bab Author: Chengguang Xu Date: Mon Sep 23 21:52:23 2019 +0800 quota: code cleanup for hash bits calculation Code cleanup for hash bits calculation by calling ilog2(). Link: https://lore.kernel.org/r/20190923135223.27674-1-cgxu519@zoho.com.cn Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit 05848db2083d4f232e84e385845dcd98d5c511b2 Author: Chengguang Xu Date: Thu Sep 26 16:34:08 2019 +0800 quota: avoid increasing DQST_LOOKUPS when iterating over dirty/inuse list It is meaningless to increase DQST_LOOKUPS number while iterating over dirty/inuse list, so just avoid it. Link: https://lore.kernel.org/r/20190926083408.4269-1-cgxu519@zoho.com.cn Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit dfc507b9eb26e719a63eb7a846ec36b88b416397 Author: Thomas Zimmermann Date: Fri Sep 27 11:13:01 2019 +0200 drm/mgag200: Allocate cursor BOs at high end of video memory By putting cursor BOs at the high end of the video memory, we can avoid memory fragmentation. Starting at the low end, contiguous video memory is available for framebuffers. The patch also simplifies the buffer swapping and aligns it with the ast driver. If there are more drivers with similar requirements, the code could be moved into a shared place. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927091301.10574-8-tzimmermann@suse.de commit 2c51a6601693ffbcef2eb3e47f6c2b8cb3949b86 Author: Thomas Zimmermann Date: Fri Sep 27 11:13:00 2019 +0200 drm/mgag200: Reserve video memory for cursor plane The double-buffered cursor image is currently stored in video memory by creating two BOs and pinning them to VRAM. The exact location is chosen by VRAM helpers. The pinned cursor BOs can conflict with framebuffer BOs and prevent the primary plane from displaying its framebuffer. As a first step to solving this problem, we reserve dedicated space at the high end of the video memory for the cursor images. As the amount of video memory now differs from the amount of available framebuffer memory, size tests are adapted accordingly. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927091301.10574-7-tzimmermann@suse.de commit 378c18386a256947055a89e177e71af6f8a60934 Author: Thomas Zimmermann Date: Fri Sep 27 11:12:59 2019 +0200 drm/mgag200: Move cursor BO swapping into mgag200_show_cursor() Selecting the correct BO for the new cursor image is not relevant outside of mgag200_show_cursor(). Let the function do the work. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927091301.10574-6-tzimmermann@suse.de commit 047244aa0ad96b83c4d0426dfee3c0af184a34a4 Author: Thomas Zimmermann Date: Fri Sep 27 11:12:58 2019 +0200 drm/mgag200: Move cursor-image update to mgag200_show_cursor() Separating the management of buffer objects from updating the hardware cursor buffer gives the code more structure. While doing this, we can further split the image-update code into code for writing the buffer, setting the base scan-out address, and enabling the cursor. The first two operations are in dedicated functions update() and set_base(). Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927091301.10574-5-tzimmermann@suse.de commit 6ae04536e747ea3d9702c528ae5c4d3be171f207 Author: Thomas Zimmermann Date: Fri Sep 27 11:12:57 2019 +0200 drm/mgag200: Add separate move-cursor function Adding mgag200_move_cursor() makes the cursor code more consistent and will become handy when we move to universal cursor planes. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927091301.10574-4-tzimmermann@suse.de commit 49b8d5aeaf816ed8308027da377a23ef686dd2a5 Author: Thomas Zimmermann Date: Fri Sep 27 11:12:56 2019 +0200 drm/mgag200: Add init and fini functions for cursor handling Moving the cursor initialization and cleanup into separate functions makes the overall code slightly more readable. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927091301.10574-3-tzimmermann@suse.de commit 52e32da9a1fb11461b01a8ddafbed00df3c57d5e Author: Thomas Zimmermann Date: Fri Sep 27 11:12:55 2019 +0200 drm/mgag200: Rename cursor functions to use mgag200_ prefix Although the driver source code is fairly inconsistent wrt naming, the prefix should be mgag200. Rename cursor functions accordingly. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927091301.10574-2-tzimmermann@suse.de commit 0090ef3ecbd4ff176cb793f26d99cd29772cea57 Author: Thomas Zimmermann Date: Fri Sep 27 11:03:09 2019 +0200 drm/ast: Allocate cursor BOs at high end of video memory By putting cursor BOs at the high end of the video memory, we can avoid memory fragmentation. Starting at the low end, contiguous video memory is available for framebuffers. The patch also simplifies the buffer swapping by splitting struct ast_private.cursor_cache BO into two separate boffer objects. Cursor images alternate between these buffers instead of offsets within cursor_cache. v3: * fixes space-before-tab error near AST_HWC_SIGNATURE_CHECKSUM Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927090309.10254-6-tzimmermann@suse.de commit 659d1a49c63d7e12f876404368c6830d0605ffd4 Author: Thomas Zimmermann Date: Fri Sep 27 11:03:08 2019 +0200 drm/ast: Move cursor offset swapping into ast_show_cursor() Selecting the correct offset for the new cursor image is not relevant outside of ast_show_cursor(). Let the function do the work. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927090309.10254-5-tzimmermann@suse.de commit 2f5989fcd1b7a448a3bc30734e3b04e4c4d7bdf0 Author: Thomas Zimmermann Date: Fri Sep 27 11:03:07 2019 +0200 drm/ast: Move cursor update code to ast_show_cursor() A call to ast's show-cursor function now receives the cursor image and updates the buffer. The change splits off image update and base-address update into separate functions. v3: * move ast_{show,hide}_cursor() in a previous patch Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927090309.10254-4-tzimmermann@suse.de commit 714468d9afdf2cda98be03344b780cfc1a74b3d7 Author: Thomas Zimmermann Date: Fri Sep 27 11:03:06 2019 +0200 drm/ast: Move ast_{show,hide}_cursor() within source file This patch only moves around code for easier review of later patches. No functional cahnges are made. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927090309.10254-3-tzimmermann@suse.de commit 96a49f39043d26b3837234f1a6218f06ba73580a Author: Thomas Zimmermann Date: Fri Sep 27 11:03:05 2019 +0200 drm/ast: Don't call ast_show_cursor() from ast_cursor_move() Separating the cursor's move() function from the show() function in preparation of further rework of the cursor update code. 'Showing' the cursor from within the move() function is required to update the cursor position. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190927090309.10254-2-tzimmermann@suse.de commit 27f722ccbe1563629275bb7ee30c0e307f5837a2 Author: Bart Van Assche Date: Mon Sep 30 16:22:24 2019 -0700 scsi: target: Remove tpg_list and se_portal_group.se_tpg_node Maintaining tpg_list without ever iterating over it is not useful. Hence remove tpg_list. This patch does not change the behavior of the SCSI target code. Cc: Mike Christie Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Nicholas Bellinger Link: https://lore.kernel.org/r/20190930232224.58980-1-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 9f7f9b610e1b7d2dc86c543ab0dfcf781bd42326 Author: Jagan Teki Date: Thu Sep 19 10:58:22 2019 +0530 arm64: dts: rockchip: Fix roc-rk3399-pc regulator input rails Few, know rk808 pmic regulators VCC[1-4], VCC[6-7], VCC[9-11], VDD_LOG, VDD_GPU, VDD_CPU_B, VCC3V3_SYS are inputting with vcc_sys which is 5V power rail from dc_12v. So, replace the vin-supply of above mentioned regulators with vcc_sys as per the PMIC-RK808-D page of roc-rk3399-pc schematics. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20190919052822.10403-7-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit f1b3b7077b40b4890c5efed82f5b06854fed4811 Author: Jagan Teki Date: Thu Sep 19 10:58:21 2019 +0530 arm64: dts: rockchip: Rename vcc12v_sys into dc_12v for roc-rk3399-pc It is always better practice to follow regulator naming conventions as per the schematics for future references. This would indeed helpful to review and check the naming convention directly on schematics, both for the code reviewers and the developers. So, rename vcc12v_sys into dc_12v as per rk3399 power tree as per roc-rk3399-pc schematics. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20190919052822.10403-6-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit c595826faa9705e04ef6ec4de2b1c6775815482b Author: Heiko Stuebner Date: Tue Sep 17 10:26:57 2019 +0200 dt-bindings: document PX30 usb2phy General Register Files One of the separate General Register Files contains the registers for controlling the usb2phy, so add the necessary binding compatible for it. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Link: https://lore.kernel.org/r/20190917082659.25549-11-heiko@sntech.de commit 52462ac6277fa30ba3829975d0745fd0b740e433 Author: Heiko Stuebner Date: Tue Sep 17 10:26:56 2019 +0200 arm64: dts: rockchip: add px30-evb i2c1 devices Enable i2c1 and adds the devices connected to it. This includes a magnetometer, goodix-touchscreen and accelerometer. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-10-heiko@sntech.de commit 45cb61b4f3bf991ac2011dbc4a155bd5f3b29ebe Author: Heiko Stuebner Date: Tue Sep 17 10:26:55 2019 +0200 arm64: dts: rockchip: document explicit px30 cru dependencies The px30 contains 2 separate clock controllers the regular cru creating most clocks as well as the pmucru managing the GPLL and some other clocks. The gpll of course also is needed by the cru, so while we normally do rely on clock names to associate clocks getting probed later on (for example xin32k coming from an i2c device in most cases) it is safer to declare the explicit dependency between the two crus. This makes sure that for example the clock-framework probes them in the correct order from the start. The assigned-clocks properties were simply working by chance in the past so split them accordingly to the 2 crus to honor the loading direction. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20190917082659.25549-9-heiko@sntech.de commit 689c7dc73c26834bc70aa06065ff44df991cd975 Author: Heiko Stuebner Date: Tue Sep 17 10:26:54 2019 +0200 arm64: dts: rockchip: remove unused pin settings from px30 These are unused gpio-settings for specific function pins, that are not used by anything and only clutter up the dtsi. They can be re-added when a relevant user is added. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-8-heiko@sntech.de commit 9003aacb9cc3496947534b57f95913b147a9102c Author: Heiko Stuebner Date: Tue Sep 17 10:26:53 2019 +0200 arm64: dts: rockchip: move px30-evb console output to uart 5 The px30-evb exposes uart2 through a uart-to-usb converter on the board but these pins are shared with the sdmmc controller. With both activated this results in a race condition depending in the probe order. Whichever of the two probes first will break the other peripheral. The px30-evb also exposes uart5 through pin its pin headers, so it's way saner to use these pins for serial output and keep the sdmmc working in all cases. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-7-heiko@sntech.de commit 79fd8ba2fd2c64858253796abc2d9cc6c26d1e6d Author: Heiko Stuebner Date: Tue Sep 17 10:26:52 2019 +0200 arm64: dts: rockchip: add emmc-powersequence to px30-evb Hook the reset line into an emmc-pwrseq for it to get initialized nicely. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-6-heiko@sntech.de commit 915b6a8b54a6d436885a458867e59fb20fc6356d Author: Heiko Stuebner Date: Tue Sep 17 10:26:51 2019 +0200 arm64: dts: rockchip: fix the px30-evb power tree Add the board's pmic (rk809) and hook up the real supplies to their consumers. This is especially important as cpufreq would otherwise hang the system when scaling the frequency without adjusting the voltage. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-5-heiko@sntech.de commit cdfebb27892a66580d770f6c57f3deb5024b4d08 Author: Heiko Stuebner Date: Tue Sep 17 10:26:50 2019 +0200 arm64: dts: rockchip: add default px30 emmc pinctrl emmc chips are normally hooked up in standard ways using the full 8bit bus connection, so there should be no need for all future boards to define this on their own. So add default pin setups for 8bit busses and special boards really only needing 4 or 1 bit connections can override. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-4-heiko@sntech.de commit f77ccf399e3b5d9adeed6bff43f684f7200cbb0c Author: Heiko Stuebner Date: Tue Sep 17 10:26:49 2019 +0200 arm64: dts: rockchip: remove px30 emmc_pwren pinctrl That gpio1-b0 can only be flash_cs apart from a regular gpio, so there is no power-related pinmux for the emmc for this pin. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-3-heiko@sntech.de commit 00519137f7d4fc19ff27f3d3f4fc45b5b222ae82 Author: Heiko Stuebner Date: Tue Sep 17 10:26:48 2019 +0200 arm64: dts: rockchip: remove static xin32k from px30 Similar to all other Rockchip SoCs the px30 does not have a static 32kHz clock. Instead it again gets supplied from an external component like the pmic. So drop the static clock, so that we can hook up the right one. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-2-heiko@sntech.de commit 8e57eed2047b9361deb8c5dc4cc3d4e679c5ce50 Author: Heiko Stuebner Date: Tue Sep 17 10:26:47 2019 +0200 arm64: dts: rockchip: fix iface clock-name on px30 iommus The iommu clock names are aclk+iface not aclk+hclk as in the vendor kernel, so fix that in the px30.dtsi Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20190917082659.25549-1-heiko@sntech.de commit 06aeb3fb9f310f7e9dcdfc524bde8901d367019f Author: Miquel Raynal Date: Thu Jun 27 14:52:45 2019 +0200 dt-bindings: clk: armada3700: document the PCIe clock Add a reference to the missing PCIe clock managed by this IP. The clock resides in the south bridge. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/20190627125245.26788-5-miquel.raynal@bootlin.com Signed-off-by: Stephen Boyd commit 8511c9de1a31e2dd183573e9a91317e33948fa47 Author: Miquel Raynal Date: Thu Jun 27 14:52:44 2019 +0200 dt-bindings: clk: armada3700: fix typo in SoC name This documentation is about Armada 3700 SoCs. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/20190627125245.26788-4-miquel.raynal@bootlin.com Signed-off-by: Stephen Boyd commit e7ea59b6dc6ddb86dabf88c11cd6748da2313b37 Author: Miquel Raynal Date: Thu Jun 27 14:52:43 2019 +0200 clk: mvebu: armada-37xx-periph: change suspend/resume time Armada 3700 PCIe IP relies on the PCIe clock managed by this driver. For reasons related to the PCI core's organization when suspending/resuming, PCI host controller drivers must reconfigure their registers at suspend_noirq()/resume_noirq() which happens after suspend()/suspend_late() and before resume_early()/resume(). Device link support in the clock framework enforce that the clock driver's resume() callback will be called before the PCIe driver's. But, any resume_noirq() callback will be called before all the registered resume() callbacks. The solution to support PCIe resume operation is to change the "priority" of this clock driver PM callbacks to "_noirq()". Signed-off-by: Miquel Raynal Link: https://lkml.kernel.org/r/20190627125245.26788-3-miquel.raynal@bootlin.com Signed-off-by: Stephen Boyd commit 4d8fb4948472c976d0c6dcf3380f92332dd660c1 Author: Miquel Raynal Date: Thu Jun 27 14:52:42 2019 +0200 clk: mvebu: armada-37xx-periph: add PCIe gated clock The PCIe clock is a gated clock which has the same source as GbE0 (both IPs share a set of registers). This source clock is called 'gbe_core' in the driver. Signed-off-by: Miquel Raynal Link: https://lkml.kernel.org/r/20190627125245.26788-2-miquel.raynal@bootlin.com Signed-off-by: Stephen Boyd commit 999915711188c32a2ddcda582441e4761139a437 Author: Ben Dooks Date: Wed Sep 25 12:23:47 2019 +0100 clk: hisilicon: fix sparse warnings in clk-hi3660.c Fix sparse warnings of a 0 being used for a pointer by removing it from the initialiser. drivers/clk/hisilicon/clk-hi3660.c:336:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:338:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:340:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:342:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:344:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:346:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:348:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:350:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:352:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:354:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:356:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:358:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:360:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:362:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:364:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:366:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:368:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:370:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:372:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:374:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:376:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:378:71: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:423:68: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:425:68: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:427:68: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:429:68: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:449:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:451:71: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:453:71: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:455:71: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks Link: https://lkml.kernel.org/r/20190925112347.14141-2-ben.dooks@codethink.co.uk Signed-off-by: Stephen Boyd commit 9c2b87a6c2ab4988fdffed258fc8a2acecba99c9 Author: Ben Dooks Date: Wed Sep 25 12:23:46 2019 +0100 clk: hisilicon: fix sparse warnings in clk-hi3670.c Fix the following warnings from sparse by removing the 0 initialiser that is actually a pointer. drivers/clk/hisilicon/clk-hi3670.c:298:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:300:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:302:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:304:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:306:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:308:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:310:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:312:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:314:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:316:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:318:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:320:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:322:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:324:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:326:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:328:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:330:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:332:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:334:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:336:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:338:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:340:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:342:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:344:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:346:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:348:65: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:350:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:352:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:488:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:490:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:492:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:494:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:496:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:498:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:500:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:502:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:504:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:506:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:508:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:510:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:512:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:514:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:516:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:518:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:520:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:522:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:524:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:526:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:528:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:530:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:532:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:534:71: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:536:71: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:538:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:611:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:614:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:616:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:653:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:655:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:657:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:659:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:661:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:663:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:665:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:735:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:737:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:739:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:741:63: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:743:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:745:64: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:802:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:804:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:806:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:808:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:810:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3670.c:812:69: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks Link: https://lkml.kernel.org/r/20190925112347.14141-1-ben.dooks@codethink.co.uk Signed-off-by: Stephen Boyd commit eaa6ef563d1a60fbfe6c128bf8fdb74405035b0c Author: Emmanuel Nicolet Date: Fri Sep 27 13:04:46 2019 +0200 rtc: interface: use timeu64_t for range_max For rtc drivers where rtc->range_max is set U64_MAX, like the PS3 rtc, rtc_valid_range() always returns -ERANGE. This is because the local variable range_max has type time64_t, so the test if (time < range_min || time > range_max) return -ERANGE; becomes (time < range_min || time > -1), which always evaluates to true. timeu64_t should be used, since it's the type of rtc->range_max. Signed-off-by: Emmanuel Nicolet Link: https://lore.kernel.org/r/20190927110446.GA6289@gmail.com Signed-off-by: Alexandre Belloni commit 58384f41076da44f934498fc1a96163fc90bd56a Author: Kamel Bouhara Date: Wed Oct 2 16:59:14 2019 +0200 ARM: dts: at91: sama5d2: add an rtc label for derived boards Add an rtc label so we just need to alias it from derived boards. Signed-off-by: Kamel Bouhara Link: https://lore.kernel.org/r/20191002145914.14874-1-kamel.bouhara@bootlin.com Signed-off-by: Alexandre Belloni commit 288d9cf1764a25eb6bb92e532a75ae90f9cb9616 Author: Claudiu Beznea Date: Thu Sep 26 15:15:32 2019 +0300 rtc: at91rm9200: use of_device_get_match_data() Use of_device_get_match_data() since all platforms should now use DT bindings. AVR32 architecture has been removed in commit 26202873bb51 ("avr32: remove support for AVR32 architecture"). Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1569500132-21164-1-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit acd743bfe8d98027fc78bc1692b903b5c84b9ec1 Author: Eugen Hristev Date: Thu Aug 8 08:35:43 2019 +0000 ARM: dts: at91: sama5d27_som1_ek: add mmc capabilities for SDMMC0 Add mmc capabilities for SDMMC0 for this board. With this enabled, eMMC connected card is detected as: mmc0: new DDR MMC card at address 0001 Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/1565252928-28994-2-git-send-email-eugen.hristev@microchip.com Signed-off-by: Alexandre Belloni commit 9077f052abd5391a866dd99e27212213648becef Author: Eric Dumazet Date: Thu Oct 3 08:59:24 2019 -0700 net: propagate errors correctly in register_netdevice() If netdev_name_node_head_alloc() fails to allocate memory, we absolutely want register_netdevice() to return -ENOMEM instead of zero :/ One of the syzbot report looked like : general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 8760 Comm: syz-executor839 Not tainted 5.3.0+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:ovs_vport_add+0x185/0x500 net/openvswitch/vport.c:205 Code: 89 c6 e8 3e b6 3a fa 49 81 fc 00 f0 ff ff 0f 87 6d 02 00 00 e8 8c b4 3a fa 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 d3 02 00 00 49 8d 7c 24 08 49 8b 34 24 48 b8 00 RSP: 0018:ffff88808fe5f4e0 EFLAGS: 00010247 RAX: dffffc0000000000 RBX: ffffffff89be8820 RCX: ffffffff87385162 RDX: 0000000000000000 RSI: ffffffff87385174 RDI: 0000000000000007 RBP: ffff88808fe5f510 R08: ffff8880933c6600 R09: fffffbfff14ee13c R10: fffffbfff14ee13b R11: ffffffff8a7709df R12: 0000000000000004 R13: ffffffff89be8850 R14: ffff88808fe5f5e0 R15: 0000000000000002 FS: 0000000001d71880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000280 CR3: 0000000096e4c000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: new_vport+0x1b/0x1d0 net/openvswitch/datapath.c:194 ovs_dp_cmd_new+0x5e5/0xe30 net/openvswitch/datapath.c:1644 genl_family_rcv_msg+0x74b/0xf90 net/netlink/genetlink.c:629 genl_rcv_msg+0xca/0x170 net/netlink/genetlink.c:654 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 genl_rcv+0x29/0x40 net/netlink/genetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 ___sys_sendmsg+0x803/0x920 net/socket.c:2311 __sys_sendmsg+0x105/0x1d0 net/socket.c:2356 __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg net/socket.c:2363 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2363 Fixes: ff92741270bf ("net: introduce name_node struct to be used in hashlist") Signed-off-by: Eric Dumazet Cc: Jiri Pirko Reported-by: syzbot Tested-by: Willem de Bruijn Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 6964773e26921711783b176173c363ef557f9a2e Merge: 6aaee55cc8c6 7271df0bf03f Author: David S. Miller Date: Thu Oct 3 12:27:06 2019 -0700 Merge branch 'phy-at803x-add-ar9331-support' Oleksij Rempel says: ==================== phy: at803x: add ar9331 support changes v3: - use PHY_ID_MATCH_EXACT only for ATH9331 PHY changes v2: - use PHY_ID_MATCH_EXACT instead of leaky masking - remove probe and struct at803x_priv ==================== Signed-off-by: David S. Miller commit 7271df0bf03f2c0abc817d6cbd2849372f3c5cbc Author: Oleksij Rempel Date: Thu Oct 3 10:21:13 2019 +0200 net: phy: at803x: remove probe and struct at803x_priv struct at803x_priv is never used in this driver. So remove it and the probe function allocating it. Suggested-by: Heiner Kallweit Signed-off-by: Oleksij Rempel Reviewed-by: Heiner Kallweit Signed-off-by: David S. Miller commit 7908d2ce63ea16bacfc50a4c7737470fef041feb Author: Oleksij Rempel Date: Thu Oct 3 10:21:12 2019 +0200 net: phy: at803x: add ar9331 support Mostly this hardware can work with generic PHY driver, but this change is needed to provided interrupt handling support. Tested with dsa ar9331-switch driver. Signed-off-by: Oleksij Rempel Reviewed-by: Heiner Kallweit Signed-off-by: David S. Miller commit 6aaee55cc8c6c305bb758545e7ceadc1bfcf7684 Author: Petr Machata Date: Thu Oct 3 08:44:49 2019 +0300 mlxsw: PCI: Send EMAD traffic on a separate queue Currently mlxsw distributes sent traffic among all the available send queues. That includes control traffic as well as EMADs, which are used for configuration of the device. However because all the queues have the same traffic class of 3, they all end up being directed to the same traffic class buffer. If the control traffic in the buffer cannot be serviced quickly enough, the EMAD traffic might be shut out, which causes transient failures, typically in FDB maintenance, counter upkeep and other periodic work. To address this issue, dedicate SDQ 0 to EMAD traffic, with TC 0. Distribute the control traffic among the remaining queues, which are left with their current TC 3. Suggested-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 9b17f5884be4484e4d9090a9dccf17e763e0589b Author: Ka-Cheong Poon Date: Wed Oct 2 21:11:08 2019 -0700 net/rds: Use DMA memory pool allocation for rds_header Currently, RDS calls ib_dma_alloc_coherent() to allocate a large piece of contiguous DMA coherent memory to store struct rds_header for sending/receiving packets. The memory allocated is then partitioned into struct rds_header. This is not necessary and can be costly at times when memory is fragmented. Instead, RDS should use the DMA memory pool interface to handle this. The DMA addresses of the pre- allocated headers are stored in an array. At send/receive ring initialization and refill time, this arrary is de-referenced to get the DMA addresses. This array is not accessed at send/receive packet processing. Suggested-by: Håkon Bugge Signed-off-by: Ka-Cheong Poon Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller commit df1025fc279c22f9bdd319a6c38c52cc3f4b7c64 Merge: 151ea094378d 560c07cba131 Author: David S. Miller Date: Thu Oct 3 12:00:56 2019 -0700 Merge branch 'stmmac-eam' Thierry Reding says: ==================== net: stmmac: Enhanced addressing mode for DWMAC 4.10 The DWMAC 4.10 supports the same enhanced addressing mode as later generations. Parse this capability from the hardware feature registers and set the EAME (Enhanced Addressing Mode Enable) bit when necessary. ==================== Signed-off-by: David S. Miller commit 560c07cba1319cf6765884ea9feedecf3020997d Author: Thierry Reding Date: Wed Oct 2 16:52:58 2019 +0200 net: stmmac: Support enhanced addressing mode for DWMAC 4.10 The address width of the controller can be read from hardware feature registers much like on XGMAC. Add support for parsing the ADDR64 field so that the DMA mask can be set accordingly. This avoids getting swiotlb involved for DMA on Tegra186 and later. Also make sure that the upper 32 bits of the DMA address are written to the DMA descriptors when enhanced addressing mode is used. Similarily, for each channel, the upper 32 bits of the DMA descriptor ring's base address also need to be programmed to make sure the correct memory can be fetched when the DMA descriptor ring is located beyond the 32-bit boundary. Signed-off-by: Thierry Reding Signed-off-by: David S. Miller commit 968a2978cb39a754750d35a47049781660682a31 Author: Thierry Reding Date: Wed Oct 2 16:52:57 2019 +0200 net: stmmac: Only enable enhanced addressing mode when needed Enhanced addressing mode is only required when more than 32 bits need to be addressed. Add a DMA configuration parameter to enable this mode only when needed. Signed-off-by: Thierry Reding Signed-off-by: David S. Miller commit 8a745c7ff2ddb8511ef760b4d9cb4cf56a15fc8d Author: Alex Deucher Date: Thu Oct 3 10:34:30 2019 -0500 drm/amdgpu: improve MSI-X handling (v3) Check the number of supported vectors and fall back to MSI if we return or error or 0 MSI-X vectors. v2: only allocate one vector. We can't currently use more than one anyway. v3: install the irq on vector 0. Tested-by: Tom St Denis Reviewed-by: Shaoyun liu Signed-off-by: Alex Deucher commit d4411d793effe4959f54bdf7ffb3462338d2a9f7 Author: Colin Ian King Date: Thu Oct 3 09:22:32 2019 +0100 drm/amd/display: fix spelling mistake AUTHENICATED -> AUTHENTICATED There is a spelling mistake in the macros H1_A45_AUTHENICATED and D1_A4_AUTHENICATED, fix these by adding the missing T. Reviewed-by: Harry Wentland Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 4682bb8e050e2f2f1eb5527b85bbe95366de5427 Author: Hans de Goede Date: Wed Aug 28 14:41:30 2019 +0200 HID: lg-g15: Add support for the G510's M1-M3 and MR LEDs Add support for controlling the LEDs below the M1-M3 and MR keys on the G510. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 1f8cde2a538b9bff65c57432beb5e58c91b373e9 Author: Hans de Goede Date: Wed Aug 28 14:41:29 2019 +0200 HID: lg-g15: Add support for controlling the G510's RGB backlight Note that the keyboard has a backlight on/off toggle button. If the backlight is turned off through that button, then any changes we make will be ignored and we cannot turn it back on again from the host. To workaround this we write the last set RGB values when we receive an event indicating that the backlight has been turned on again. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit ad4203f5a2435efef161516958f743982c9c2ee8 Author: Hans de Goede Date: Wed Aug 28 14:41:28 2019 +0200 HID: lg-g15: Add support for the G510 keyboards' gaming keys Add support for the gaming and LCD menu keys on the G510 keyboard. Note this commit does not add support for the keyboard and LCD backlight and the status LEDs, this is done in a follow up commit. Note the G510 generates 4 different input reports on its second (Consumer Keys) interface: -input report 1 is standard bootclass keyboard input report, mirroring normal keyboard interface -input report 2 is consumer page keys -input report 3 is gkeys, etc. -input report 4 is LED status, single byte, bits: bit 2: kbd and LCD backlight is *off* when set, toggled by the light key bit 3: headphone mute LED bit 4: mic mute LED Input-report 1 we ignore since this is a duplicate report from the first interface, report 2 is handled by the regular hid-input code. In this commit we add handling for input report 3. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit d5b5fc8c89525d5e6f44a85f40db458af938e330 Author: Hans de Goede Date: Wed Aug 28 14:41:27 2019 +0200 HID: lg-g15: Add support for the M1-M3 and MR LEDs Add support for controlling the LEDs below the M1-M3 and MR keys. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 97b741aba918c4143f4208d2421d08ff215c1b49 Author: Hans de Goede Date: Wed Aug 28 14:41:26 2019 +0200 HID: lg-g15: Add keyboard and LCD backlight control Register a led_classdev for the keyboard backlight and another one for the LCD backlight. This commit also includes LED_BRIGHT_HW_CHANGED support, which together with a desktop-environment which supports this, such as GNOME3 leads to the kbd-backlight OSD being show with the new level when changing the backlight setting through the hotkey on the keyboard. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 3a0275384c2716d3bdb9c65ec31cf45f53274ac6 Author: Hans de Goede Date: Wed Aug 28 14:41:25 2019 +0200 HID: Add driver for Logitech gaming keyboards (G15, G15 v2) Add a driver to stop the extra "G" keys from sending F1 - F12 instead making them send KEY_GKEY# and also make the non-functional M1 - M3 and MR keys and the non-functional buttons below the LCD panel properly generated key events. Note the connect_mask and gkeys_settings_output_report variables may seem unnecessary since they are always set to the same value, these are there in preparation of adding support for the G, M and LCD keys on the G510 kbd. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit b5625db9d23e58a573eb10a7f6d0c2ae060bc0e8 Author: Hans de Goede Date: Wed Aug 28 14:41:24 2019 +0200 Input: Add event-codes for macro keys found on various keyboards Various keyboards have macro keys, which are intended to have user programmable actions / key-sequences bound to them. In some cases these macro keys are actually programmable in hardware, but more often they basically are just extra keys and the playback of the key-sequence is done by software running on the host. One example of keyboards with macro-keys are various "internet" / "office" keyboards have a set of so-called "Smart Keys", typically a set of 4 keys labeled "[A]" - "[D]". Another example are gaming keyboards, such as the Logitech G15 Gaming keyboard, which has 18 "G"aming keys labeled "G1" to G18", 3 keys to select macro presets labeled "M1" - "M3" and a key to start recording a macro called "MR" note that even though there us a record key everything is handled in sw on the host. Besides macro keys the G15 (and other gaming keyboards) also has a buildin LCD panel where the contents are controlled by the host. There are 5 keys directly below the LCD intended for controlling a menu shown on the LCD. The Microsoft SideWinder X6 keyboard is another gaming keyboard example, this keyboard has 30 "S"idewinder keys and a key to cycle through macro-presets. After discussion between various involved userspace people we've come to the conclusion that since these are all really just extra keys we should simply treat them as such and give them their own event-codes, see: https://github.com/libratbag/libratbag/issues/172 This commit adds the following new KEY_ defines for this: KEY_MACRO1 - KEY_MACRO30. KEY_MACRO_RECORD_START/-STOP, KEY_MACRO_PRESET_CYCLE, KEY_MACRO_PRESET1 - KEY_MACRO_PRESET3, KEY_KBD_LCD_MENU1 - KEY_KBD_LCD_MENU5. The defines leave room for adding some more LCD-menu, preset or macro keys, the maximum values above are based on the maximum values to support all currently known internet, office and gaming keyboards. BugLink: https://github.com/libratbag/libratbag/issues/172 Signed-off-by: Hans de Goede Acked-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit 245d73698ed7abdc7e520dfa38048bb80ce89571 Author: Kees Cook Date: Wed Oct 2 16:41:58 2019 -0700 audit: Report suspicious O_CREAT usage This renames the very specific audit_log_link_denied() to audit_log_path_denied() and adds the AUDIT_* type as an argument. This allows for the creation of the new AUDIT_ANOM_CREAT that can be used to report the fifo/regular file creation restrictions that were introduced in commit 30aba6656f61 ("namei: allow restricted O_CREAT of FIFOs and regular files"). Signed-off-by: Kees Cook Signed-off-by: Paul Moore commit c2016cc612db7b88483073d6ff51edd200bc6ddc Author: Jerome Brunet Date: Thu Sep 5 15:50:39 2019 +0200 reset: dt-bindings: meson: update arb bindings for sm1 SM1 SoC family adds two new audio FIFOs with the related arb reset lines Reviewed-by: Rob Herring Signed-off-by: Jerome Brunet Signed-off-by: Philipp Zabel commit 8c2def0f06555354ba6909fd591e1550e2f14161 Author: Kunihiko Hayashi Date: Tue Sep 10 10:55:27 2019 +0900 reset: uniphier-glue: Add Pro5 USB3 support Pro5 SoC has same scheme of USB3 reset as Pro4, so the data for Pro5 is equivalent to Pro4. Signed-off-by: Kunihiko Hayashi Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit c302ec966e65fded7cde04da042528c3d494bc82 Author: Sibi Sankar Date: Sun Sep 1 23:14:07 2019 +0530 dt-bindings: reset: pdc: Convert PDC Global bindings to yaml Convert PDC Global bindings to yaml and add SC7180 PDC global to the list of possible bindings. Signed-off-by: Sibi Sankar Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit b76b4e1dbcadf8c52faf18aa49e14cd3d2f5d046 Author: Sibi Sankar Date: Sun Sep 1 23:14:06 2019 +0530 dt-bindings: reset: aoss: Convert AOSS reset bindings to yaml Convert AOSS reset bindings to yaml and add SC7180 AOSS reset to the list of possible bindings. Signed-off-by: Sibi Sankar Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit b89a8da92d1dba77f1e2799a2159b597de7e6173 Author: Andy Shevchenko Date: Mon Aug 19 13:52:52 2019 +0300 reset: Remove copy'n'paste redundancy in the comments It seems the commit bb475230b8e5 ("reset: make optional functions really optional") brought couple of redundant lines in the comments. Drop them here. Cc: Ramiro Oliveira Signed-off-by: Andy Shevchenko Signed-off-by: Philipp Zabel commit 9c41152cfd743277ed14bcfc2d5d4cba39534023 Author: Jerome Brunet Date: Thu Sep 5 15:50:40 2019 +0200 reset: meson-audio-arb: add sm1 support Add the new arb reset lines of the SM1 SoC family Signed-off-by: Jerome Brunet Signed-off-by: Philipp Zabel commit 8ad1193eae4c6eb68d389eb0c29fd1cfdf63b656 Author: Guido Günther Date: Mon Sep 30 22:26:01 2019 +0200 clk: bd718x7: Add MODULE_ALIAS() This fixes device probing when built as a module. Signed-off-by: Guido Günther Link: https://lkml.kernel.org/r/e1d01b68cdf7dbff9bdd03bab953f828431ad292.1569875042.git.agx@sigxcpu.org Signed-off-by: Stephen Boyd commit 3a20cc69cbf5065f1da3093bbea0ea68f3e9de92 Author: Adam Ford Date: Thu Oct 3 09:30:08 2019 -0700 ARM: omap2plus_defconfig: Enable HW Crypto engine modules The general-purpose OMAP3530, OMAP3630, and DM3730 have hardware crypto engines that appear to be functional despite limited documentation. This patch enables them as modules. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 6f54a5afcc0b155c24a30666459b65b13ea0760c Author: Adam Ford Date: Thu Oct 3 09:30:07 2019 -0700 ARM: omap2plus_defconfig: Update for moved item When running make savedefconfig ARCH=arm, CONFIG_DMA_CMA changed location. To help facilitate future changes to omap2plus_defconfig, this patch re-syncs the omap2plus file with the updated location generated by make savedefconfig. No items were removed or added during this patch. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 16c1fcdade069644e967628a8ea9a74fb7a6217b Author: Adam Ford Date: Thu Oct 3 09:30:07 2019 -0700 ARM: omap2plus_defconfig: Update for removed items The omap panel-dpi driver was removed in Commit 8bf4b1621178 ("drm/omap: Remove panel-dpi driver") The tFP410 and DVI connector was remove in Commit be3143d8b27f ("drm/omap: Remove TFP410 and DVI connector drivers") This patch removes these items from the omap2plus_defconfig. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 185271a1fa0720110d26200b44cc36c02210604c Author: Chester Lin Date: Mon Sep 16 13:01:40 2019 +0000 riscv-docs: correct the sequence of the magic number 2 since it's little endian Correct the sequence of the magic number 2 since it's little endian. Signed-off-by: Chester Lin Reviewed-by: Paul Walmsley Signed-off-by: Jonathan Corbet commit 9692f2fdb163a4a5e79ddb9b7e0f15d30384c7c2 Author: Jeremy MAURO Date: Wed Oct 2 15:35:42 2019 +0200 scripts/sphinx-pre-install: Add a new path for the debian package "fonts-noto-cjk" The latest debian version "bullseye/sid" has changed the path of the file "notoserifcjk-regular.ttc", with the previous change and this change we keep the backward compatibility and add the latest debian version Signed-off-by: Jeremy MAURO Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet commit ff8fdb36ac35ee90388fb3f5fdac679b25765841 Author: Jeremy MAURO Date: Wed Oct 2 15:33:39 2019 +0200 scripts/sphinx-pre-install: allow checking for multiple missing files The current implementation take a simple file as first argument, this change allows to take a list as a first argument. Some file could have a different path according distribution version Signed-off-by: Jeremy MAURO Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet commit bdd68860a044683ea3a96a4f3a681da155fe7197 Author: Jonathan Neuschäfer Date: Wed Oct 2 17:09:55 2019 +0200 Documentation: networking: device drivers: Remove stray asterisks These asterisks were once references to a line that said: "* Other names and brands may be claimed as the property of others." But now, they serve no purpose; they can only irritate the reader. Fixes: f12a84a9f650 ("Documentation: fm10k: Add kernel documentation") Fixes: 1e06edcc2f22 ("Documentation: i40e: Prepare documentation for RST conversion") Fixes: 1fae869bcf3d ("Documentation: ice: Prepare documentation for RST conversion") Fixes: df69ba43217d ("ionic: Add basic framework for IONIC Network device driver") Signed-off-by: Jonathan Neuschäfer Acked-by: Shannon Nelson Acked-by: David S. Miller Signed-off-by: Jonathan Corbet commit ba71cc5c40a7869decb15bab84a417483d15c10e Author: Jonathan Neuschäfer Date: Wed Oct 2 17:18:39 2019 +0200 docs: it_IT: maintainer-pgp-guide: Fix reference to "Nitrokey Pro 2" This fixes the following Sphinx warning: Documentation/translations/it_IT/process/maintainer-pgp-guide.rst:458: WARNING: Unknown target name: "nitrokey pro". Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jonathan Corbet commit 151ea094378d057dfca76c0110da76dd29cf1de3 Author: Prashant Malani Date: Wed Oct 2 14:09:33 2019 -0700 r8152: Add identifier names for function pointers Checkpatch throws warnings for function pointer declarations which lack identifier names. An example of such a warning is: WARNING: function definition argument 'struct r8152 *' should also have an identifier name 739: FILE: drivers/net/usb/r8152.c:739: + void (*init)(struct r8152 *); So, fix those warnings by adding the identifier names. While we are at it, also fix a character limit violation which was causing another checkpatch warning. Change-Id: Idec857ce2dc9592caf3173188be1660052c052ce Signed-off-by: Prashant Malani Reviewed-by: Grant Grundler Acked-by: Hayes Wang Signed-off-by: David S. Miller commit 9be579f4c41f69c42278980af73e3b201f4159bb Author: Andy Shevchenko Date: Wed Sep 4 20:48:35 2019 +0300 firmware: meson_sm: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Signed-off-by: Andy Shevchenko Signed-off-by: Kevin Hilman commit 8cde3c2153e8f57be884c0e73f18bc4de150e870 Author: Carlo Caione Date: Wed Jul 31 09:23:39 2019 +0100 firmware: meson_sm: Rework driver as a proper platform driver The secure monitor driver is currently a frankenstein driver which is registered as a platform driver but its functionality goes through a global struct accessed by the consumer drivers using exported helper functions. Try to tidy up the driver moving the firmware struct into the driver data and make the consumer drivers referencing the secure-monitor using a new property in the DT. Currently only the nvmem driver is using this API so we can fix it in the same commit. Reviewed-by: Jerome Brunet Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman commit 47b3c53a16c030691edaf8345cbea4f0018dcbef Author: Carlo Caione Date: Wed Jul 31 09:23:37 2019 +0100 nvmem: meson-efuse: bindings: Add secure-monitor phandle Add a new property to link the nvmem driver to the secure-monitor. The nvmem driver needs to access the secure-monitor to be able to access the fuses. Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman commit beb91681a20abd8db7cfc177cb621864ce4e7967 Author: Carlo Caione Date: Wed Jul 31 09:23:36 2019 +0100 firmware: meson_sm: Mark chip struct as static const No need to be a global struct. Reviewed-by: Jerome Brunet Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman commit 07a634bf6c5d51ce42e2d89e3e8c5c73d3a047f7 Author: Neil Armstrong Date: Mon Sep 16 14:50:22 2019 +0200 arm64: dts: khadas-vim3: add commented support for PCIe The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between an USB3.0 Type A connector and a M.2 Key M slot. The PHY driving these differential lines is shared between the USB3.0 controller and the PCIe Controller, thus only a single controller can use it. The needed DT configuration when the MCU is configured to mux the PCIe/USB3.0 differential lines to the M.2 Key M slot is added commented and may be uncommented to disable USB3.0 from the USB Complex and enable the PCIe controller. The End User is not expected to uncomment the following except for testing purposes, but instead rely on the firmware/bootloader to update these nodes accordingly if PCIe mode is selected by the MCU. Signed-off-by: Neil Armstrong Reviewed-by: Andrew Murray Signed-off-by: Kevin Hilman commit 1f8607d597635c283e397e87575b49184874d507 Author: Neil Armstrong Date: Mon Sep 16 14:50:21 2019 +0200 arm64: dts: meson-g12a: Add PCIe node This adds the Amlogic G12A PCI Express controller node, also using the USB3+PCIe Combo PHY. The PHY mode selection is static, thus the USB3+PCIe Combo PHY phandle would need to be removed from the USB control node if the shared differential lines are used for PCIe instead of USB3. Signed-off-by: Neil Armstrong Reviewed-by: Andrew Murray Signed-off-by: Kevin Hilman commit de82e74a9f2631e6718ab6a90e0dfbbcd7d952b4 Author: Carlo Caione Date: Wed Jul 31 09:23:38 2019 +0100 arm64: dts: meson: Link nvmem and secure-monitor nodes The former is going to use the latter to retrieve the efuses data. Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman commit ec9037c040411413b84d18224e4de5395fbd2e49 Author: Neil Armstrong Date: Thu Aug 29 17:23:30 2019 +0200 arm64: dts: meson-g12b-khadas-vim3: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 2e09574d172e6da4ee251203660c5a56b0b4c068 Author: Neil Armstrong Date: Thu Aug 29 17:23:42 2019 +0200 arm64: dts: meson-sm1-sei610: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit e326c96778d23fbaa8c847f67ae84d113c2c119d Author: Neil Armstrong Date: Thu Aug 29 17:23:41 2019 +0200 arm64: dts: meson-gxm-rbox-pro: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 362e75c50ae3287c9fa733035f1340af5deb0d5f Author: Neil Armstrong Date: Thu Aug 29 17:23:40 2019 +0200 arm64: dts: meson-gxm-khadas-vim2: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 32122c465ccb16d2069a40e48a70c069d04ef942 Author: Neil Armstrong Date: Thu Aug 29 17:23:39 2019 +0200 arm64: dts: meson-gxl-s905x-p212: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 92f540959a4f2d3656b6fb9dd1dfdd716eff108d Author: Neil Armstrong Date: Thu Aug 29 17:23:38 2019 +0200 arm64: dts: meson-gxl-s905x-nexbox-a95x: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit cfd7a215e2d67e4a91638375da9dd96e65c54297 Author: Neil Armstrong Date: Thu Aug 29 17:23:37 2019 +0200 arm64: dts: meson-gxl-s805x-p241: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 6b697024f7bc3122a3185d9e2b388dac4fb5a7c7 Author: Neil Armstrong Date: Thu Aug 29 17:23:36 2019 +0200 arm64: dts: meson-gxbb-wetek: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 48f38e8247a471db154cda662b4509b59888d6ac Author: Neil Armstrong Date: Thu Aug 29 17:23:35 2019 +0200 arm64: dts: meson-gxbb-vega-s95: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 0060bd29fc0c81a8ac1165daa17ae4b668866746 Author: Neil Armstrong Date: Thu Aug 29 17:23:34 2019 +0200 arm64: dts: meson-gxbb-p20x: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 42d7815c2200e4808f8e2e1c4f9c37bf19776fbc Author: Neil Armstrong Date: Thu Aug 29 17:23:33 2019 +0200 arm64: dts: meson-gxbb-nexbox-a95x: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit f7caa8b5cce296ac777a5d8ecb8f3f157f6737c5 Author: Neil Armstrong Date: Thu Aug 29 17:23:32 2019 +0200 arm64: dts: meson-gxbb-nanopi-k2: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 86b8eaa23ddc62eb58e5a0c9d0a2243b12f52261 Author: Neil Armstrong Date: Thu Aug 29 17:23:31 2019 +0200 arm64: dts: meson-gx-p23x-q20x: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 9a9ffc69901949e3fdd1a8749e544094cb18b899 Author: Neil Armstrong Date: Thu Aug 29 17:23:29 2019 +0200 arm64: dts: meson-g12a-x96-max: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 11ad4dfa8fa9de442db0976880f6c482567a8f41 Author: Neil Armstrong Date: Thu Aug 29 17:23:28 2019 +0200 arm64: dts: meson-g12a-sei510: add keep-power-in-suspend property in SDIO node The WiFi firmware requires that the power is kept enabled while in suspend mode. Add the keep-power-in-suspend property in the SDIO node to specify that the power must be kept when entering in a system wide suspend state. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 0f674df0c260d363d2f25efea17f07b73d287565 Author: Jerome Brunet Date: Thu Sep 5 14:59:56 2019 +0200 arm64: dts: meson: g12: move audio bus out of g12-common The base address of the audio bus and pdm device are different between the g12 and sm1 SoC families. Overwriting the reg property only would leave with confusing node names on the sm1. Move the audio related devices to the g12 dtsi. The appropriate nodes will be created for the sm1 later on. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 2871626ba6e61e1ace43db491f766d39e6eacd5a Author: Jerome Brunet Date: Thu Sep 5 14:59:55 2019 +0200 arm64: dts: meson: g12: factor the power domain. The power domain declared in the g12a and g12b dtsi are the same. Move the declaration of these power domains in the g12 common dtsi. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 9ed437d69b49bd9ad39db7b6d69b60dfc47cac69 Author: Jerome Brunet Date: Thu Sep 5 14:59:54 2019 +0200 arm64: dts: meson: g12: add a g12 layer While the sm1 is very close to the g12a/b family, somethings apply differently on the g12a/b and not the sm1. This introduce a new layer of dtsi for part which apply to the g12a and g12b but not the sm1. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 22c4b148a0a1085e57a470e6f7dc515cf08f5a5c Author: Jerome Brunet Date: Thu Sep 5 14:59:53 2019 +0200 arm64: dts: meson: g12: fix audio fifo reg size The register region size initially is too small to access all the fifo registers. Fixes: c59b7fe5aafd ("arm64: dts: meson: g12a: add audio fifos") Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 301b94d434ac3a3cd576a4bc1053cc243d6bd841 Author: Jerome Brunet Date: Thu Sep 5 14:59:52 2019 +0200 arm64: dts: meson: axg: fix audio fifo reg size The register region size initially is too small to access all the fifo registers. Fixes: f2b8f6a93357 ("arm64: dts: meson-axg: add audio fifos") Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit e6b6d9d3e58de2b8c5364479ad15a8c5074ca625 Author: Jerome Brunet Date: Mon Sep 2 18:03:34 2019 +0200 arm64: dts: meson: sm1: set gpio interrupt controller compatible Set the appropriate gpio interrupt controller compatible for the sm1 SoC family. This newer version of the controller can now trig irq on both edge of the input signal Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit c588146378962786ddeec817f7736a53298a7b01 Author: Ivan Khoronzhuk Date: Wed Oct 2 15:04:04 2019 +0300 selftests/bpf: Correct path to include msg + path The "path" buf is supposed to contain path + printf msg up to 24 bytes. It will be cut anyway, but compiler generates truncation warns like: " samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c: In function ‘setup_cgroup_environment’: samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:52:34: warning: ‘/cgroup.controllers’ directive output may be truncated writing 19 bytes into a region of size between 1 and 4097 [-Wformat-truncation=] snprintf(path, sizeof(path), "%s/cgroup.controllers", cgroup_path); ^~~~~~~~~~~~~~~~~~~ samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:52:2: note: ‘snprintf’ output between 20 and 4116 bytes into a destination of size 4097 snprintf(path, sizeof(path), "%s/cgroup.controllers", cgroup_path); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:72:34: warning: ‘/cgroup.subtree_control’ directive output may be truncated writing 23 bytes into a region of size between 1 and 4097 [-Wformat-truncation=] snprintf(path, sizeof(path), "%s/cgroup.subtree_control", ^~~~~~~~~~~~~~~~~~~~~~~ cgroup_path); samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:72:2: note: ‘snprintf’ output between 24 and 4120 bytes into a destination of size 4097 snprintf(path, sizeof(path), "%s/cgroup.subtree_control", cgroup_path); " In order to avoid warns, lets decrease buf size for cgroup workdir on 24 bytes with assumption to include also "/cgroup.subtree_control" to the address. The cut will never happen anyway. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191002120404.26962-3-ivan.khoronzhuk@linaro.org commit fb27dcd2909d32e2219b54636ea212dbde45f985 Author: Ivan Khoronzhuk Date: Wed Oct 2 15:04:03 2019 +0300 selftests/bpf: Add static to enable_all_controllers() Add static to enable_all_controllers() to get rid from annoying warning during samples/bpf build: samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:44:5: warning: no previous prototype for ‘enable_all_controllers’ [-Wmissing-prototypes] int enable_all_controllers(char *cgroup_path) Signed-off-by: Ivan Khoronzhuk Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191002120404.26962-2-ivan.khoronzhuk@linaro.org commit 4092de1ba34eb376791809fb366bc15f8a9e0b7c Merge: a00d17e0a71a 54ecb8f7028c Author: Maxime Ripard Date: Thu Oct 3 16:38:50 2019 +0200 Merge drm/drm-next into drm-misc-next We haven't done any backmerge for a while due to the merge window, and it starts to become an issue for komeda. Let's bring 5.4-rc1 in. Signed-off-by: Maxime Ripard commit e3aaf0e1744e988ebd10144a36eb5619da2f4b7b Author: Arnd Bergmann Date: Wed Oct 2 14:01:24 2019 +0200 drm/amdgpu: display_mode_vba_21: remove uint typedef The type definition for 'uint' clashes with the generic kernel headers: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn21/display_mode_vba_21.c:43:22: error: redefinition of typedef 'uint' is a C11 feature [-Werror,-Wtypedef-redefinition] include/linux/types.h:92:23: note: previous definition is here Just remove this type and use plain 'unsigned int' consistently, as it is already use almost everywhere in this file. Fixes: b04641a3f4c5 ("drm/amd/display: Add Renoir DML") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 324fb7adf61f6dc57cfcefc9783363e35ef9234b Author: Arnd Bergmann Date: Wed Oct 2 14:01:23 2019 +0200 drm/amdgpu: hide another #warning An earlier patch of mine disabled some #warning statements that get in the way of build testing, but then another instance was added around the same time. Remove that as well. Fixes: b5203d16aef4 ("drm/amd/amdgpu: hide #warning for missing DC config") Fixes: e1c14c43395c ("drm/amdgpu: Enable DC on Renoir") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 128a01f4724ae72f8916ad20856dda152e9cd012 Author: Arnd Bergmann Date: Wed Oct 2 14:01:22 2019 +0200 drm/amdgpu: make pmu support optional, again When CONFIG_PERF_EVENTS is disabled, we cannot compile the pmu portion of the amdgpu driver: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:48:38: error: no member named 'hw' in 'struct perf_event' struct hw_perf_event *hwc = &event->hw; ~~~~~ ^ drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:51:13: error: no member named 'attr' in 'struct perf_event' if (event->attr.type != event->pmu->type) ~~~~~ ^ ... The same bug was already fixed by commit d155bef0636e ("amdgpu: make pmu support optional") but broken again by what looks like an incorrectly rebased patch. Fixes: 64f55e629237 ("drm/amdgpu: Add RAS EEPROM table.") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit cabe144bfd0c106c2e55d900320c2464c42ab94c Author: Navid Emamdoost Date: Mon Sep 16 22:20:44 2019 -0500 drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost Signed-off-by: Alex Deucher commit 2e0db9dec25f8d60acb61ddc1a48cbbcabdbdd19 Author: yu kuai Date: Sun Sep 29 20:38:43 2019 +0800 drm/amdgpu: remove set but not used variable 'pipe' Fixes gcc '-Wunused-but-set-variable' warning: rivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c: In function ‘amdgpu_gfx_graphics_queue_acquire’: drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:234:16: warning: variable ‘pipe’ set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Reported-by: Hulk Robot Signed-off-by: yu kuai Signed-off-by: Alex Deucher commit 36e255dd8ffd0aa1a73874740180870519aef37c Author: Austin Kim Date: Wed Oct 2 14:17:59 2019 +0900 drm/amdgpu: Drop unused variable and statement Even though 'smu8_smu' is declared, it is not used after below statement. smu8_smu = hwmgr->smu_backend; So 'unused variable' could be safely removed to stop warning message as below: drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/smu8_smumgr.c:180:22: warning: variable ‘smu8_smu’ set but not used [-Wunused-but-set-variable] struct smu8_smumgr *smu8_smu; ^ Signed-off-by: Austin Kim Signed-off-by: Alex Deucher commit 1104057562ecc1a48ce75b7ae17af948b3f63d7b Author: Navid Emamdoost Date: Tue Oct 1 22:46:07 2019 -0500 drm/amdgpu: fix multiple memory leaks in acp_hw_init In acp_hw_init there are some allocations that needs to be released in case of failure: 1- adev->acp.acp_genpd should be released if any allocation attemp for adev->acp.acp_cell, adev->acp.acp_res or i2s_pdata fails. 2- all of those allocations should be released if mfd_add_hotplug_devices or pm_genpd_add_device fail. 3- Release is needed in case of time out values expire. Reviewed-by: Christian König Signed-off-by: Navid Emamdoost Signed-off-by: Alex Deucher commit 2c9a0c66d520c94d157d0882b2977a219846845c Author: Alex Deucher Date: Tue Oct 1 16:45:27 2019 -0500 drm/amdgpu: don't increment vram lost if we are in hibernation We reset the GPU as part of our hibernation sequence so we need to make sure we don't mark vram as lost in that case. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=111879 Acked-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit bd660f4f111161f60392dd02424c3a3d2240dc2f Author: shaoyunl Date: Tue Oct 1 15:52:31 2019 -0400 drm/amdgpu : enable msix for amdgpu driver We might used out of the msi resources in some cloud project which have a lot gpu devices(including PF and VF), msix can provide enough resources from system level view Signed-off-by: shaoyunl Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 452f9bdd9affa30677e76fbbbb61f7fe666bd8ca Author: Yong Zhao Date: Fri Sep 20 22:06:57 2019 -0400 drm/amdkfd: Improve KFD IOCTL printing The code use hex define, so should the printing. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit e7956997b1e601781d110918c64d43c36cfb6993 Author: Yong Zhao Date: Tue Sep 24 17:23:12 2019 -0400 drm/amdgpu: Export setup_vm_pt_regs() logic for mmhub 2.0 The KFD code will call this function later. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 923c087a1f1e51fd6534ad1e4c1650216423679e Author: Yong Zhao Date: Fri Sep 27 23:30:05 2019 -0400 drm/amdgpu: Add the HDP flush support for Navi The HDP flush support code was missing in the nbio and nv files. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit e392c887df979112af94cfec08dd87f4dd55d085 Author: Yong Zhao Date: Fri Sep 27 22:03:42 2019 -0400 drm/amdkfd: Use array to probe kfd2kgd_calls This is the same idea as the kfd device info probe and move all the probe control together for easy maintenance. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 47c5ab6ca05891a0503c3f0bbc0c485694c75401 Author: Yong Zhao Date: Fri Sep 27 21:22:07 2019 -0400 drm/amdkfd: Delete unnecessary function declarations Ajust the function sequences so that those function delcarations are not needed any more. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1456482bf8dc195417be67ff2dddb6619e4be94a Author: Yong Zhao Date: Sat Sep 21 15:51:19 2019 -0400 drm/amdgpu: Delete useless header file reference Those header file includes are not needed. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 21889cec0af0fbe6f80f96230d07cc8cb6d09e10 Author: Jack Zhang Date: Thu Sep 26 15:24:55 2019 +0800 drm/amd/amdgpu/sriov ip block setting of Arcturus Add ip block setting for Arcturus SRIOV 1.PSP need to be initialized before IH. 2.SMU doesn't need to be initialized at kmd driver. 3.Arcturus doesn't support DCE hardware,it needs to skip register access to DCE. Signed-off-by: Jack Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit cf21e76a6005016474623a375ae2e90364a02168 Author: Marek Olšák Date: Tue Sep 24 17:53:25 2019 -0400 drm/amdgpu: return tcc_disabled_mask to userspace UMDs need this for correct programming of harvested chips. Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b96ec4a4e4b29914b948660aed4498f1a9cf62ea Author: Lyude Paul Date: Thu Sep 26 18:51:05 2019 -0400 drm/amdgpu/dm/mst: Use ->atomic_best_encoder We are supposed to be atomic after all. We'll need this in a moment for the next commit. Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Lyude Paul Signed-off-by: Alex Deucher commit 2f232cf29e033271b626b865071dc842102de23e Author: Lyude Paul Date: Thu Sep 26 18:51:03 2019 -0400 drm/amdgpu/dm/mst: Don't create MST topology managers for eDP ports Reviewed-by: Harry Wentland Signed-off-by: Lyude Paul Signed-off-by: Alex Deucher commit d7a1b559f3c812816151deba595bb72e04795633 Author: Lyude Paul Date: Thu Sep 26 18:51:04 2019 -0400 drm/amdgpu/dm/mst: Remove unnecessary NULL check kfree() checks this automatically. Reviewed-by: Alex Deucher Signed-off-by: Lyude Paul Signed-off-by: Alex Deucher commit f8d2d39eb406946546d71e5869b04d99fa094834 Author: Lyude Paul Date: Tue Sep 3 16:46:01 2019 -0400 drm/amdgpu: Iterate through DRM connectors correctly Currently, every single piece of code in amdgpu that loops through connectors does it incorrectly and doesn't use the proper list iteration helpers, drm_connector_list_iter_begin() and drm_connector_list_iter_end(). Yeesh. So, do that. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Reviewed-by: Alex Deucher Signed-off-by: Lyude Paul Signed-off-by: Alex Deucher commit 684cd480fd4e6d5678e3f480d48a9809d9d119ea Author: Lyude Paul Date: Wed Sep 25 17:52:48 2019 -0400 drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology Since we're going to be reprobing the entire topology state on resume now using sideband transactions, we need to ensure that we actually have short HPD irqs enabled before calling drm_dp_mst_topology_mgr_resume(). So, do that. Changes since v4: * Fix typo in comments Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 88d802500a952de99ec298217282f930353cabcb Author: Prike Liang Date: Fri Sep 27 12:16:42 2019 +0800 drm/amdkfd: fix kgd2kfd_device_init() definition conflict error The patch c670707 drm/amd: Pass drm_device to kfd introduced this issue and fix the following compiler error. CC [M] drivers/gpu/drm/amd/amdgpu//../powerplay/smumgr/fiji_smumgr.o drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:746:6: error: conflicting types for ‘kgd2kfd_device_init’ bool kgd2kfd_device_init(struct kfd_dev *kfd, ^ In file included from drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:23:0: drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.h:253:6: note: previous declaration of ‘kgd2kfd_device_init’ was here bool kgd2kfd_device_init(struct kfd_dev *kfd, ^ scripts/Makefile.build:273: recipe for target 'drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o' failed make[1]: *** [drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o] Error 1 Signed-off-by: Prike Liang Acked-by: Evan Quan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit fe9c32a63c0d3ba48f9aaccbcbb6c7f3fac60141 Author: Kevin Wang Date: Fri Sep 27 14:52:10 2019 +0800 drm/amd/powerplay: initlialize smu->is_apu is false by default the member of is_apu in smu_context need to initlialize by default. set default value is false (dGPU) for patch: drm/amd/powerplay: bypass dpm_context null pointer check guard for some smu series Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 542b50e044bfc51be7fdac3c8d112fcdfcb88842 Author: Aaron Liu Date: Mon Sep 16 10:05:09 2019 +0800 Revert "drm/amdgpu: disable stutter mode for renoir" This reverts commit 5813f97a5969bf1e7e723397a74e00b5de7278d6. Since SBIOS WCD9925N, NMI printing disappeared. Hence enable stutter mode. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit ef5af37a15d1bc6ed63c1e756c4bc0fa919416f5 Author: Prike Liang Date: Wed Sep 25 17:48:56 2019 +0800 drm/amd/powerplay: update the interface for getting dpm full scale clock frequency Update get_dpm_uclk_limited to get more clock type full scale dpm frequency. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 2cf8d416d32b1e9425c923e7c3444cdd7c09f18f Author: Prike Liang Date: Wed Sep 25 14:11:41 2019 +0800 drm/amd/powerplay: implement the interface for setting sclk/uclk profile_peak level Add the interface for setting sclk and uclk peak frequency. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit ea286ed728c84996aebb2ea89a069903a0045bce Author: Prike Liang Date: Mon Sep 23 15:52:12 2019 +0800 drm/amd/powerplay: implement interface set_power_profile_mode() (v2) v1: Add set_power_profile_mode() for none manual dpm level case setting power profile mode. v2: After input power profile update successfully need can update the smu profile mode. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 2e5294fe14dbf304f905f893b5d93113fe434ecd Author: Prike Liang Date: Mon Sep 23 15:29:07 2019 +0800 drm/amd/powerplay: add the interfaces for getting and setting profiling dpm clock level implement get_profiling_clk_mask and force_clk_levels for forcing dpm clk to limit value. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 665499c619f1b040a6a4155f064320427565087c Author: Prike Liang Date: Mon Sep 23 14:42:36 2019 +0800 drm/amd/powerplay: add interface for getting workload type The workload type was got from the input of power profile mode. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 47e56b5318dbb783e7248d5f61fec1d4e6398e48 Author: Prike Liang Date: Mon Sep 23 11:02:40 2019 +0800 drm/amd/powerplay: add interface for forcing and unforcing dpm limit value That's base function for forcing and unforcing dpm limit value. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 4045f36fce82ba7023bb7849190e04df8595e2f0 Author: Prike Liang Date: Tue Sep 24 14:40:09 2019 +0800 drm/amd/powerplay: implement the interface for setting soft freq range The APU soft freq range set by different way from DGPU, thus need implement the function respectively base on each common SMU part. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit af1ec44f9a56354bac98d000cbac2c8fed1f2e87 Author: Prike Liang Date: Wed Sep 18 15:11:34 2019 +0800 drm/amd/powerplay: bypass dpm_context null pointer check guard for some smu series For now APU has no smu_dpm_context structure for containing default/current related dpm tables, thus will needn't initialize smu_dpm_context to aviod APU null pointer issue. Signed-off-by: Prike Liang Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 227f7d58d707fa6d931a1e16d29eb3e1c41ad67d Author: Kenneth Feng Date: Wed Sep 25 13:41:35 2019 +0800 drm/amd/amdgpu: add IH cg support on soc15 project enable/disable IH clock gating on soc15 projects. Signed-off-by: Kenneth Feng Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 95f71bfad2c8015e46bce2c23b6f532afc6ab820 Author: Kevin Wang Date: Thu Sep 26 16:22:13 2019 +0800 drm/amd/powerplay: add sensor lock support for smu when multithreading access sysfs of amdgpu_pm_info at the sametime. the swsmu driver cause smu firmware hang. eg: single thread access: Message A + Param A ==> right Message B + Param B ==> right Message C + Param C ==> right multithreading access: Message A + Param B ==> error Message B + Param A ==> error Message C + Param C ==> right the patch will add sensor lock(mutex) to avoid this error. Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 64e51a1b551ddddb7a154cb56110ba49c65d6f32 Author: Kevin Wang Date: Thu Sep 26 16:16:41 2019 +0800 drm/amd/powerplay: change metrics update period from 1ms to 100ms v2: change period from 10ms to 100ms (typo error) too high frequence to update mertrics table will cause smu firmware error,so change mertrics table update period from 1ms to 100ms (navi10, 12, 14) Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit c18cc2bb9e064d3a613d8276f2cab3984926a779 Author: Jay Cornwall Date: Wed Sep 25 17:05:01 2019 -0500 drm/amdkfd: Fix race in gfx10 context restore handler Missing synchronization with VGPR restore leads to intermittent VGPR trashing in the user shader. Signed-off-by: Jay Cornwall Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit b2100ce1db91d65b3f90414777ec32dbc547bde1 Author: Yong Zhao Date: Wed Sep 25 14:01:24 2019 -0400 drm/amdkfd: Use setup_vm_pt_regs function from base driver in KFD This was done on GFX9 previously, now do it for GFX10. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 286b789e1e119bfe54b15f4d93a60ea200adfc8d Author: Yong Zhao Date: Tue Sep 24 17:08:30 2019 -0400 drm/amdgpu: Export setup_vm_pt_regs() logic for gfxhub 2.0 The KFD code will call this function later. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 56fc40aba4d9bc22ccbb8ce88a1c41f666d04f05 Author: Yong Zhao Date: Wed Sep 25 23:57:30 2019 -0400 drm/amdkfd: Eliminate get_atc_vmid_pasid_mapping_valid get_atc_vmid_pasid_mapping_valid() is very similar to get_atc_vmid_pasid_mapping_pasid(), so they can be merged into a new function get_atc_vmid_pasid_mapping_info() to reduce register access times. More importantly, getting the PASID and the valid bit atomically with a single read fixes some potential race conditions where the mapping changes between the two reads. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3fe023d42ea82be7d32ad26ab9409d970c1d361f Author: Yong Zhao Date: Wed Sep 25 17:06:12 2019 -0400 drm/amdkfd: Query vmid pasid mapping through stored info for non HWS Because we record the mapping under non HWS mode in the software, we can query pasid through vmid using the stored mapping instead of reading from ATC registers. This also prepares for the defeatured ATC block in future ASICs. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit d9d4623c87e9318549e0c85133c38909d9e8c47a Author: Yong Zhao Date: Wed Sep 25 23:49:46 2019 -0400 drm/amdkfd: Record vmid pasid mapping in the driver for non HWS mode This makes possible the vmid pasid mapping query through software. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 6027b1bf6071fc61a5aa11b9922a2e0e91bff1ea Author: Yong Zhao Date: Wed Sep 25 17:00:59 2019 -0400 drm/amdkfd: Use hex print format for pasid Since KFD pasid starts from 0x8000 (32768 in decimal), it is better perceived as a hex number. Meanwhile, change the pasid type from unsigned int to uint16_t to be consistent throughout the code. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit d19eb6aca7025b85a8cca494e79bab342bc491c7 Author: Yong Zhao Date: Wed Sep 25 16:45:18 2019 -0400 drm/amdkfd: Delete unused defines They are not used anywhere. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 22471a58324703c70290772ed62fe3f3b7896715 Author: Yong Zhao Date: Wed Sep 25 14:07:26 2019 -0400 drm/amdkfd: Move the control stack on GFX10 to userspace buffer The GFX10 does not require the control stack to be right after mqd buffer any more, so move it back to usersapce allocated CSWR buffer. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3a0c3423921e6a1f32ef27912c936e38bf28451b Author: Harish Kasiviswanathan Date: Wed Sep 26 16:09:37 2018 -0400 drm/amd: Pass drm_device to kfd kfd needs drm_device to call into drm_cgroup functions Signed-off-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 171bc67eb508f268bd8e48d9a2fd6166e6007d7b Author: Harish Kasiviswanathan Date: Fri Jul 20 15:40:14 2018 -0400 drm/amdkfd: Store kfd_dev in iolink and cache properties This is required to check against cgroup permissions. Signed-off-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0e94b5640bb764cf223f9dec18bed139e8e17f4c Author: shaoyunl Date: Wed Sep 25 17:07:38 2019 -0400 drm/amdkfd: use navi12 specific family id for navi12 code path Keep the same use of CHIP_IDs for navi12 in kfd Signed-off-by: shaoyunl Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3f94281751dcb15dcac23f218f30ddbfd8c34f4b Author: Kent Russell Date: Sun Sep 22 21:20:14 2019 -0400 drm/amdgpu: Add SMUIO values for other I2C controller v2 These are the offsets for CKSVII2C1, and match up with the values already added for CKSVII2C v2: Don't remove some of the CSKVII2C values Signed-off-by: Kent Russell Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit b55a8b8b4131531b2d51e903fc3363dcd51e2f64 Author: Yong Zhao Date: Sat Sep 21 17:46:03 2019 -0400 drm/amdkfd: Use better name for sdma queue non HWS path The old name is prone to confusion. The register offset is for a RLC queue rather than a SDMA engine. The value is not a base address, but a register offset. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9941a6bfbd59a761b18834a6732cf8406570036f Author: Yong Zhao Date: Sat Sep 21 20:02:57 2019 -0400 drm/amdkfd: Delete useless SDMA register setting on non HWS path HW folks have confirm that we should not touch RESUME_CTX of SDMA*_GFX_CONTEXT_CNTL when manipulating RLC queues. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e7883ab63213e3eea001af522ca5f4fc91075572 Author: Navid Emamdoost Date: Tue Sep 24 23:23:56 2019 -0500 drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland Signed-off-by: Navid Emamdoost Signed-off-by: Alex Deucher commit b77fb9d88e62bbe85cd52b4ef18e74ea65551773 Author: shaoyunl Date: Tue Sep 24 18:11:12 2019 -0400 drm/amdkfd: Add NAVI12 support from kfd side Add device info for both navi12 PF and VF Signed-off-by: shaoyunl Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 56f074d815cd65ebc9ffd3810acd60ea7155399d Author: Christian König Date: Thu Sep 19 15:16:49 2019 +0200 drm/amdgpu: restrict hotplug error message We should print the error only when we are hotplugged and crash basically all userspace applications. Signed-off-by: Christian König Reviewed-by: Emily Deng Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 4a246528677380befaea5c7de0ee0911d3ccf1d3 Author: Christian König Date: Tue Sep 24 13:29:27 2019 +0200 drm/amdgpu: once more fix amdgpu_bo_create_kernel_at When CPU access is needed we should tell that to amdgpu_bo_create_reserved() or otherwise the access is denied later on. Signed-off-by: Christian König Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit d02a7061b3d9e2d0c17436f96e6de06165ebcabd Author: Evan Quan Date: Tue Sep 24 12:43:51 2019 +0800 drm/amd/powerplay: update arcturus smu-driver interaction header To pair the latest SMU firmware. Signed-off-by: Evan Quan Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 3d8361b11ca45b329349ec82ad765d059d8b0673 Author: Tao Zhou Date: Mon Sep 23 19:10:19 2019 +0800 drm/amdgpu: add comments in ras interrupt callback add comments to clarify why checking GFX IP BLOCK for each ras interrupt callback Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit ba0834921400613839b28b572fdb713281b473d9 Author: Tao Zhou Date: Wed Sep 18 18:31:07 2019 +0800 drm/amdgpu: implement common gmc_ras_late_init common gmc_ecc_late_init can be shared among all generations of gmc v2: rename gmc_ecc_late_init to gmc_ras_late_init Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit be5b39d87a880b96038d1686ccedff940f6b124f Author: Tao Zhou Date: Wed Sep 18 17:58:14 2019 +0800 drm/amdgpu: move xgmi ras fini to xgmi block it's more suitable to put xgmi ras fini in xgmi block Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 196041205cd48389bf8861ca383c1cc90d09df1f Author: Tao Zhou Date: Wed Sep 18 17:51:20 2019 +0800 drm/amdgpu: move mmhub ras fini to mmhub block it's more suitable to put mmhub ras fini in mmhub block Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 181c93e5ecdb8c8f3bcc74e38adcd668db85c441 Author: Tao Zhou Date: Wed Sep 18 17:46:42 2019 +0800 drm/amdgpu: move umc ras fini to umc block it's more suitable to put umc ras fini in umc block Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit f2575941e61fed74f30072d5f88d57731c55f0b0 Author: Tao Zhou Date: Wed Sep 18 17:40:06 2019 +0800 drm/amdgpu: add ras fini for xgmi add ras fini for xgmi to cleanup xgmi ras framework Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit de9bbd5273c8caa0361876e4171de2ad36a6b9df Author: Tao Zhou Date: Wed Sep 18 17:30:50 2019 +0800 drm/amdgpu: add ras fini for nbio add a common nbio ras fini implementation to cleanup nbio ras framework Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 0771b0bf0790295b141cc30644a1b0b3e22a331e Author: Tao Zhou Date: Wed Sep 18 15:26:23 2019 +0800 drm/amdgpu: simplify the access to eeprom_control struct simplify the code of accessing to eeprom_control struct Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 41190cd73341060f2e7494a77131bb1f56e68fa1 Author: Tao Zhou Date: Thu Sep 19 11:46:11 2019 +0800 drm/amdgpu: remove ih_info parameter of gfx_ras_late_init gfx_ras_late_init can get the info by itself Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 56c54b25c3b60a64d4ffd7b6b2a309b3febcfdd4 Author: Tao Zhou Date: Thu Sep 12 18:54:33 2019 +0800 drm/amdgpu: remove ih_info parameter of umc_ras_late_init umc_ras_late_init can get the info by itself Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit e536c8185038b480b5f7d1b5f2b81cf5df1c87cc Author: Tao Zhou Date: Thu Sep 12 18:19:02 2019 +0800 drm/amdgpu: add common sdma_ras_fini function sdma_ras_fini can be shared among all generations of sdma Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 3b7b7647bef8c3df5abaead35340dcb3dfed8f6e Author: Tao Zhou Date: Thu Sep 12 17:44:49 2019 +0800 drm/amdgpu: add common gfx_ras_fini function gfx_ras_fini can be shared among all generations of gfx Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 2adf13440accfc2666749107c6557a3965e920cc Author: Tao Zhou Date: Thu Sep 12 17:39:47 2019 +0800 drm/amdgpu: add common gmc_ras_fini function gmc_ras_fini can be shared among all generations of gmc Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 65bc47a6599402bac88f6812bf5ec36e307d8001 Author: Tao Zhou Date: Thu Sep 12 17:21:46 2019 +0800 drm/amdgpu: move mmhub_ras_if from gmc to mmhub block mmhub_ras_if is relevant to mmhub Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit d65bf1f8a795e2748ab3ea2231ab896a9cac743c Author: Tao Zhou Date: Thu Sep 12 17:12:21 2019 +0800 drm/amdgpu: replace mmhub_funcs with mmhub.funcs remove mmhub_funcs in adev Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit d3a5a121b84ab9fdbbd9ba131668ab797745f5b7 Author: Tao Zhou Date: Thu Sep 12 17:03:14 2019 +0800 drm/amdgpu: add common mmhub member for adev put mmhub_funcs and ras_if pointer into mmhub struct Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 03740baab3b574ed40f39bb9eda715bb32045337 Author: Tao Zhou Date: Thu Sep 12 16:34:08 2019 +0800 drm/amdgpu: move umc_ras_if from gmc to umc block umc_ras_if is relevant to umc Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit fc04e6b4843c82be61478b9edec6e4e7b87e9de4 Author: Tao Zhou Date: Tue Sep 17 19:01:38 2019 +0800 drm/amdgpu: refine sdma4 ras_data_cb simplify code logic and refine return value v2: remove unused error source code Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 4c65dd1041074f7c7e1202636c3f83cdf285c8f2 Author: Tao Zhou Date: Thu Sep 12 14:28:18 2019 +0800 drm/amdgpu: move sdma ecc functions to generic sdma file sdma ras ecc functions can be reused among all sdma generations Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 725253ab9b4fb3d26829b92a6c45b33f399203d3 Author: Tao Zhou Date: Thu Sep 12 14:06:35 2019 +0800 drm/amdgpu: move gfx ecc functions to generic gfx file gfx ras ecc common functions could be reused among all gfx generations Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 34cc4fd9ff710f31b172dbb8bdcc3a3ab492fff3 Author: Tao Zhou Date: Thu Sep 12 11:11:25 2019 +0800 drm/amdgpu: move umc ras irq functions to umc block move umc ras irq functions from gmc v9 to generic umc block, these functions are relevant to umc and they can be shared among all generations of umc Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit f5f06e21e9707552962dadc55fe4412b913223a9 Author: Tao Zhou Date: Thu Sep 12 13:38:44 2019 +0800 drm/amdgpu: update parameter of ras_ih_cb change struct ras_err_data *err_data to void *err_data, align with umc code and the callback's declaration in each ras block could pay no attention to the structure type Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit e7da754b00ee40af55e522f9dc478d8ed3a3ad3d Author: Monk Liu Date: Tue Sep 24 16:08:00 2019 +0800 drm/amdgpu: fix an UMC hw arbitrator bug(v3) issue: the UMC6 h/w bug is that when MCLK is doing the switch in the middle of a page access being preempted by high priority client (e.g. DISPLAY) then UMC and the mclk switch would stuck there due to deadlock how: fixed by disabling auto PreChg for UMC to avoid high priority client preempting other client's access on the same page, thus the deadlock could be avoided v2: put the patch in callback of UMC6 v3: rename the callback to "init_registers" Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6de088a08ddc4876947e3319c98df116257e6ea5 Author: Marek Olšák Date: Thu Sep 19 22:04:43 2019 -0400 drm/amdgpu: remove gfx9 NGG Never used. Signed-off-by: Marek Olšák Acked-by: Christian König Signed-off-by: Alex Deucher commit 631cdbd27e922a845a728ea2f933c41d220b3cd1 Author: Alex Deucher Date: Mon Sep 23 15:12:46 2019 -0500 drm/amdgpu/atomfirmware: simplify the interface to get vram info fetch both the vram type and width in one function call. This avoids having to parse the same data table twice to get the two pieces of data. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher commit bd5520273cea125698f97bc4dd6152cccdbe6b19 Author: Alex Deucher Date: Fri Sep 20 14:43:44 2019 -0500 drm/amdgpu/atomfirmware: use proper index for querying vram type (v3) The index is stored in scratch register 4 after asic init. Use that index. No functional change since all asics in a family use the same type of vram (G5, G6, HBM) and that is all we use at the monent, but if we ever need to query other info, we will now have the proper index. v2: module array is variable sized, handle that. v3: fix off by one in array handling Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher commit d1249aae81e922845a61052230e57c18c61aa183 Author: Alex Deucher Date: Mon Sep 23 15:56:25 2019 -0500 drm/amdgpu/display: include slab.h in dcn21_resource.c It's apparently needed in some configurations. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 52510a4035e135ea333868831df16e95a88ad1f5 Author: Shirish S Date: Tue Sep 24 14:45:54 2019 +0530 drm/amdgpu/psp: silence response status warning log the response status related error to the driver's debug log since psp response status is not 0 even though there was no problem while the command was submitted. This warning misleads, hence this change. Signed-off-by: Shirish S Acked-by: Huang Rui Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit bbaa343a88799ed8f58f3ea891e20e7767f123a7 Author: Kevin Wang Date: Mon Sep 23 15:36:11 2019 +0800 drm/amd/powerplay: remove duplicate macro of smu_get_uclk_dpm_states remove duplicate macro of smu_get_uclk_dpm_states fix commit: drm/amd/powerplay: add the interface for getting ultimate frequency v3 Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit df99ac0fcc507cb680c5b75b679cda1195a99a42 Author: Jesse Zhang Date: Tue Jul 30 19:15:42 2019 +0800 drm/amd/amdgpu:Fix compute ring unable to detect hang. When compute fence did not signal, compute ring cannot detect hardware hang because its timeout value is set to be infinite by default. In SR-IOV and passthrough mode, if user does not declare custome timeout value for compute ring, then use gfx ring timeout value as default. So that when there is a ture hardware hang, compute ring can detect it. Signed-off-by: Jesse Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 90a08351f72d609dfa22871226d75d3758b2df50 Author: chen gong Date: Thu Sep 19 15:02:40 2019 +0800 drm/amdgpu: Use mode2 mode to perform GPU RESET for Renoir Renoir need to use mode2 mode to implement GPU RESET Signed-off-by: chen gong Reviewed-by: Aaron Liu Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 068ad870bbd8f4f2c5b2fd4977a4f3330c9988f4 Author: chen gong Date: Mon Sep 23 15:02:56 2019 +0800 drm/amd/powerplay: A workaround to GPU RESET on APU Changes to function "smu_suspend" in amdgpu_smu.c is a workaround. We should get real information about if baco is enabled or not, while we always consider APU SMU feature as enabled in current code. I know APU do not support baco mode for GPU reset, so I use "adev->flags" to skip function "smu_feature_is_enabled". Signed-off-by: chen gong Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit 80f9bfe4e87910fe0a25566d6e25d13c7ae97283 Author: chen gong Date: Mon Sep 23 14:56:43 2019 +0800 drm/amd/powerplay: Add mode2 mode for GPU RESET in SMU Renoir need to use mode2 mode to implement GPU RESET Signed-off-by: chen gong Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit 40463bdc22719dc315e5fa09cb3e61ab2778cf8b Author: Yong Zhao Date: Mon Sep 23 15:53:13 2019 -0400 drm/amdkfd: Sync gfx10 kfd2kgd_calls function pointers get_hive_id was not set. Also, adjust the function setting sequence. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c637b36aeac11685a8258f9bcd667dcc06f6951a Author: Yong Zhao Date: Wed Sep 18 18:17:57 2019 -0400 drm/amdkfd: Fix NULL pointer dereference for set_scratch_backing_va() Currently this function pointer is missing for GFX10. Considering it is a void function since GFX9, fix it by checking the function pointer before dereferencing it. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 424b5442a2a67ba369839455c3b1fb1b00c6d861 Author: Yong Zhao Date: Tue Jan 22 20:09:17 2019 -0500 drm/amdkfd: Remove unnecessary pm_init() for non HWS mode The packet manager is not needed for non HWS mode except Hawaii, so only initialize it for Hawaii under non HWS mode. This will simplify debugging under non HWS mode for all new asics, because it eliminates one variable out of the equation in non HWS mode Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 89b0679bd8cffbf11b6c1def984c83e837c4a43f Author: Yong Zhao Date: Sat Sep 21 02:01:50 2019 -0400 drm/amdkfd: Remove excessive print when reserving doorbells The dozens of printing messages are compressed into 2 lines. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 812330eb69a428d158fb666f218d8e6c9f36d392 Author: Yong Zhao Date: Thu Sep 19 12:42:34 2019 -0400 drm/amdkfd: Add an error print if SDMA RLC is not idle The message will be useful when troubleshooting the issues. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0b36603c0dbb9b39d0bfe610afbc17c014aff9f4 Author: Alex Deucher Date: Fri Sep 20 15:13:24 2019 -0500 drm/amdgpu/display: fix 64 bit divide Use proper helper for 32 bit. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 05ba0095fb7bf150601169ba0c4380c56f51458b Author: Le Ma Date: Mon Sep 23 21:09:38 2019 +0800 drm/amdgpu: correct condition check for psp rlc autoload Otherwise non-autoload case will go into the wrong routine and fail. Reviewed-by: Hawking Zhang Signed-off-by: Le Ma Signed-off-by: Alex Deucher commit 1f01cd99051507478f8dac837c939088a894d279 Author: Hawking Zhang Date: Mon Sep 23 20:41:04 2019 +0800 drm/amdgpu: add command id in psp response failure message For better clarification of issue. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 90c88dab8ef514c901b3a0e82f617d2f06c4ae9f Author: Le Ma Date: Mon Sep 23 14:10:55 2019 +0800 drm/amdgpu: enable psp front door loading by default on Arcturus Front door firmware loading is done via the psp rather than the driver. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9a018e5a852fa3a2c56c90e219ac4c8b04204053 Author: Le Ma Date: Mon Sep 23 12:25:03 2019 +0800 drm/amdgpu: disable vcn ip block for front door loading on Arcturus Needs more work to enable via front door loading. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4db37544cee58f7d669796d75bbce6913f1203bc Author: Tianci.Yin Date: Thu Sep 12 17:40:22 2019 +0800 drm/amdgpu/gfx10: add support for wks firmware loading load different cp firmware according to the DID and RID Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 81de29d842ccb776c0f77aa3e2b11b07fff0c0e2 Author: Allen Pais Date: Wed Sep 18 22:00:31 2019 +0530 drm/amdkfd: fix a potential NULL pointer dereference (v2) alloc_workqueue is not checked for errors and as a result, a potential NULL dereference could occur. v2 (Felix Kuehling): * Fix compile error (kfifo_free instead of fifo_free) * Return proper error code Signed-off-by: Allen Pais Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit f77c7109c071edc148dc6c71dcf927059516235f Author: Alex Deucher Date: Thu Sep 19 15:09:56 2019 -0500 drm/amdgpu/ras: fix and update the documentation for RAS Add new sections to amdgpu.rst, fix up formatting issues, add additional documentation to each section. Acked-by: Christian König Signed-off-by: Alex Deucher commit a667b75c1ec294672f7da714626b97769fc75288 Author: Alex Deucher Date: Thu Sep 19 15:03:27 2019 -0500 drm/amdgpu: fix documentation for amdgpu_pm.c Fix DOC link name, clean up formatting in pp_dpm_* section. Acked-by: Christian König Signed-off-by: Alex Deucher commit fc9c7f847014d210f1e4410ebefa8fab8c1314bd Author: Alex Deucher Date: Thu Sep 19 14:40:57 2019 -0500 drm/amdgpu/ih: fix documentation in amdgpu_irq_dispatch Fix parameters. Acked-by: Christian König Signed-off-by: Alex Deucher commit 1d614ded87e951dd699da47764a1265a227ad988 Author: Alex Deucher Date: Thu Sep 19 14:39:08 2019 -0500 drm/amdgpu/vm: fix up documentation in amdgpu_vm.c Missing parameters, wrong comment type, etc. Acked-by: Christian König Signed-off-by: Alex Deucher commit 4d8e54d2b9d3fb2281677e897e81c6a48489bec2 Author: Alex Deucher Date: Thu Sep 19 14:24:11 2019 -0500 drm/amdgpu/mn: fix documentation for amdgpu_mn_read_lock Document the new parameter. Fixes: 93065ac753e4 ("mm, oom: distinguish blockable mode for mmu notifiers") Acked-by: Christian König Signed-off-by: Alex Deucher commit ebc52c1692e65ed9880ebe62a5cd32c7f75dbe57 Author: Alex Deucher Date: Thu Sep 19 14:18:10 2019 -0500 drm/amdgpu: fix documentation for amdgpu_gem_prime_export Drop extra function parameter. Acked-by: Christian König Signed-off-by: Alex Deucher commit b8e8c934f0aa0903bc1193b36253071cbce8b9f6 Author: Harry Wentland Date: Wed Sep 18 11:42:59 2019 -0400 drm/amd/display; Fix kernel doc warnings We had a couple of missing definitions and formatting errors. v2: Fix 'notifying' type Signed-off-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d0580c09c65cff211f589a40e08eabc62da463fb Author: yu kuai Date: Thu Sep 19 22:09:09 2019 +0800 drm/amdgpu: remove excess function parameter description Fixes gcc warning: drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:431: warning: Excess function parameter 'sw' description in 'vcn_v2_5_disable_clock_gating' drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:550: warning: Excess function parameter 'sw' description in 'vcn_v2_5_enable_clock_gating' Fixes: cbead2bdfcf1 ("drm/amdgpu: add VCN2.5 VCPU start and stop") Signed-off-by: yu kuai Signed-off-by: Alex Deucher commit f0ee9b184c48ea03b613135517a19fc07e70c784 Author: Arnd Bergmann Date: Wed Sep 18 21:53:58 2019 +0200 drm/amd/display: hide an unused variable Without CONFIG_DEBUG_FS, we get a warning for an unused variable: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6020:33: error: unused variable 'source' [-Werror,-Wunused-variable] Hide the variable in an #ifdef like its only users. Fixes: 14b2584636c6 ("drm/amd/display: add functionality to grab DPRX CRC entries.") Reviewed-by: Harry Wentland Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit e53aec7e41482bccb724a72616f1962a47efaeec Author: Guchun Chen Date: Thu Sep 19 11:08:58 2019 +0800 drm/amdgpu: enable full ras by default Enable full ras by default, user does not need to enable it by boot parameter. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 57d4f3b7fd65b56f98b62817f27c461142c0bc2a Author: Jiange Zhao Date: Thu Sep 19 13:22:59 2019 -0500 drm/amdgpu/SRIOV: add navi12 pci id for SRIOV (v2) Add Navi12 PCI id support. v2: flag as experimental for now (Alex) Signed-off-by: Jiange Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7677b0dbce390f58f415a759d1773a465d2feccd Author: Tianci.Yin Date: Thu Aug 22 15:09:29 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings for navi14 update registers: mmUTCL1_CTRL Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit aa4604b6e4324495308385a2de699204625e1339 Author: Tianci.Yin Date: Thu Aug 22 15:00:08 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings update registers: mmUTCL1_CTRL Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit ade9a34e7d9688f867c239ae4842200e64b6ba7a Author: Alex Deucher Date: Tue Sep 17 14:49:53 2019 -0500 drm/amdgpu: flag navi12 and 14 as experimental for 5.4 We can remove this later as things get closer to launch. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher commit 01b40c98ede4f536a8e30ba30c9510ad7a0fe7ca Author: Alex Deucher Date: Tue Sep 17 15:17:41 2019 -0500 drm/amdgpu/psp: invalidate the hdp read cache before reading the psp response Otherwise we may get stale data. Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit e8186eeccb84eb41a87c9e6ffad2c9e61f3e3636 Author: Alex Deucher Date: Tue Sep 17 15:12:18 2019 -0500 drm/amdgpu/psp: flush HDP write fifo after submitting cmds to the psp We need to make sure the fifo is flushed before we ask the psp to process the commands. Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 5222d26146029bffa6d94d14315529cddaac96cf Author: Guchun Chen Date: Wed Sep 18 11:33:19 2019 +0800 drm/amdgpu: remove redundant variable definition No need to define the same variables in each loop of the function. Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8a3e801f1924c07781e93f043a74cfa244451787 Author: Guchun Chen Date: Tue Sep 17 17:49:29 2019 +0800 drm/amdgpu: avoid null pointer dereference null ptr should be checked first to avoid null ptr access Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f256ba473ea82f16be657752d7d5cf7e75164085 Author: Xiaojie Yuan Date: Wed Sep 11 19:09:27 2019 +0800 drm/amdgpu/powerplay: add new mapping for APCC_DFLL feature Signed-off-by: Xiaojie Yuan Reviewed-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit fec6a08aaec58b60659c68723d774b6779e44e64 Author: Hawking Zhang Date: Wed Sep 18 06:46:54 2019 +0800 drm/amdgpu: do not init mec2 jt for renoir For ASICs like renoir/arct, driver doesn't need to load mec2 jt. when mec1 jt is loaded, mec2 jt will be loaded automatically since the write is actaully broadcasted to both. We need to more time to test other gfx9 asic. but for now we should be able to draw conclusion that mec2 jt is not needed for renoir and arct. Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 2011eaea214a985938d0708b4c8daabfd5086b7c Author: Hawking Zhang Date: Wed Sep 18 04:05:34 2019 +0800 drm/amdgpu: add psp ip block for arct enable psp block for firmware loading and other security feature setup. Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit c7c5be3c892fd33b9c9ff1d4a5570b85e6deec0b Author: Kai-Heng Feng Date: Mon Sep 2 16:33:42 2019 +0800 drm/amd/display: Restore backlight brightness after system resume Laptops with AMD APU doesn't restore display backlight brightness after system resume. This issue started when DC was introduced. Let's use BL_CORE_SUSPENDRESUME so the backlight core calls update_status callback after system resume to restore the backlight level. Tested on Dell Inspiron 3180 (Stoney Ridge) and Dell Latitude 5495 (Raven Ridge). Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher commit a142ba8800dd12de1a9013477efa8ab692041ed3 Author: Alex Deucher Date: Tue Sep 17 08:11:24 2019 -0500 drm/amdgpu/ras: use GPU PAGE_SIZE/SHIFT for reserving pages We are reserving vram pages so they should be aligned to the GPU page size. Reviewed-by: Tao Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ec51d3facd3eb2128d9ea914e461885630b4ad07 Author: Xiaojie Yuan Date: Wed Sep 11 11:41:05 2019 +0800 drm/amdgpu/discovery: get gpu info from ip discovery table except soc_bounding_box which is not integrated in discovery table yet Signed-off-by: Xiaojie Yuan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit afa44809a44151ee55f36fa502d5a452a51054e3 Author: Tao Zhou Date: Tue Sep 17 11:36:05 2019 +0800 drm/amdgpu: use GPU PAGE SHIFT for umc retired page umc retired page belongs to vram and it should be aligned to gpu page size Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 08dac62f3e20f1069a8a7e0a1938a3a18886af20 Author: Prike Liang Date: Mon Sep 16 15:56:52 2019 +0800 drm/amd/powerplay: implement VCN power gating control interface VCN Gate/Ungate by processing the SMU power up/down message, otherwise S3 will resume failed as JPEG always power off during start VCN stage. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 57516cdd74d478dfb6782e3a84ce47c1c0f72f24 Author: Tianci.Yin Date: Tue Sep 17 10:35:34 2019 +0800 drm/amdgpu: add navi12 pci id Add Navi12 PCI id support. Reviewed-by: Hawking Zhang Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit ae115c81ecd379aed20715c3ff98ee9f651acfce Author: Tao Zhou Date: Thu Sep 12 18:57:23 2019 +0800 drm/amdgpu: replace DRM_ERROR with DRM_WARN in ras_reserve_bad_pages There are two cases of reserve error should be ignored: 1) a ras bad page has been allocated (used by someone); 2) a ras bad page has been reserved (duplicate error injection for one page); DRM_ERROR is unnecessary for the failure of bad page reserve Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 879e723df3cd0bfda4a036477b1359563406dbca Author: Adam Zerella Date: Sat Sep 14 22:56:16 2019 +1000 docs: drm/amdgpu: Resolve build warnings Some of the documentation formatting could be improved which will resolve some Sphinx amdgpu build warnings e.g WARNING: Unexpected indentation. WARNING: Block quote ends without a blank line; unexpected unindent. WARNING: Inline emphasis start-string without end-string. Signed-off-by: Adam Zerella Signed-off-by: Alex Deucher commit 63b2b5e91b56e2d174b223ddb4a2202ff23c4799 Author: Alex Deucher Date: Mon Sep 16 13:21:32 2019 -0500 drm/amdgpu/vm: fix documentation for amdgpu_vm_bo_param Add new parameters. Reviewed-by: Christian König Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 8daf3eccf85ecfd98df34bd54eafd73eb8d0d6d9 Author: Yong Zhao Date: Mon Sep 16 12:24:38 2019 -0400 drm/amdkfd: Delete unused KFD_IS_* macro These were deleted before, but somehow showed up again. Delete them again. Signed-off-by: Yong Zhao Acked-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ea268870d6f548d0661e896e9746673210c1fa79 Author: Bhawanpreet Lakha Date: Wed Aug 7 11:23:30 2019 -0400 drm/amd/display: Add hdcp to Kconfig [Why] HDCP is not fully finished, so we need to be able to build and run the driver without it. [How] Add a Kconfig to toggle it Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 96a3b32e67236f547cc8acd69d5a3cef125b2295 Author: Bhawanpreet Lakha Date: Mon Jun 24 14:54:13 2019 -0400 drm/amd/display: only enable HDCP for DCN+ [Why] We don't support HDCP for pre RAVEN asics [How] Check if we are RAVEN+. Use this to attach the content_protection property, this way usermode can't try to enable HDCP on pre DCN asics. Also we need to update the module on hpd so guard it aswell Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit da3fd7ac0bcf372cc57117bdfcd725cca7ef975a Author: Bhawanpreet Lakha Date: Mon Jun 10 16:06:05 2019 -0400 drm/amd/display: Update CP property based on HW query [Why] We need to use HW state to set content protection to ENABLED. This way we know that the link is encrypted from the HW side [How] Create a workqueue that queries the HW every ~2seconds, and sets it to ENABLED or DESIRED based on the result from the hardware Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 2a0f92700fe348fd5785f87e4730ab1c5398157a Author: Bhawanpreet Lakha Date: Mon Jun 10 16:18:38 2019 -0400 drm/amd/display: handle DP cpirq [Why] This is needed for DP as DP can send us info using irq. [How] Check if irq bit is set on short pulse and call the function that handles cpirq in amdgpu_dm_hdcp Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 0c8620d63d41fb0d4a9d8baa0a06b3fa9b59505d Author: Bhawanpreet Lakha Date: Mon Sep 16 15:52:58 2019 -0500 drm/amd/display: Handle Content protection property changes [Why] We need to manage the content protection property changes for different usecase, once cp is DESIRED we need to maintain the ENABLED/DESIRED status for different cases. [How] 1. Attach the content_protection property 2. HDCP enable (UNDESIRED -> DESIRED) call into the module with the correct parameters to start hdcp. Set cp to ENABLED 3. HDCP disable (ENABLED -> UNDESIRED) Call the module to disable hdcp. 3. Handle Special cases (Hotplug, S3, headless S3, DPMS) If already ENABLED: set to DESIRED on unplug/suspend/dpms, and disable hdcp Then on plugin/resume/dpms: enable HDCP Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 52704fcaf74bc99ec3075c4e350274a86bf48264 Author: Bhawanpreet Lakha Date: Fri May 24 15:44:20 2019 -0400 drm/amd/display: Initialize HDCP work queue [Why] We need this to enable HDCP on linux, as we need events to interact with the hdcp module [How] Add work queue to display manager and handle the creation and destruction of the queue Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 55b50e68b5dd32d82d7a84f00b6bfbfc405a1cef Author: Bhawanpreet Lakha Date: Thu May 16 11:57:52 2019 -0400 drm/amd/display: Create dpcd and i2c packing functions [Why] We need to read and write specific i2c and dpcd messages. [How] Created static functions for packing the dpcd and i2c messages for hdcp. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit a193ed2094ba2f8d3c103216832586482efe5fc5 Author: Bhawanpreet Lakha Date: Tue May 14 13:20:19 2019 -0400 drm/amd/display: Create amdgpu_dm_hdcp [Why] We need to interact with the hdcp module from the DM, the module has to be interacted with in terms of events [How] Create the files needed for linux hdcp. These files manage the events needed for the dm to interact with the hdcp module. We use the kernel work queue to process the events needed for the module Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit d462fcf5012bdffb8f182eae01f73439bf4176f9 Author: Bhawanpreet Lakha Date: Tue Aug 6 17:43:53 2019 -0400 drm/amd/display: Update hdcp display config [Why] We need to update the hdcp display parameter whenever the link is updated, so the next time there is an update to hdcp we have the latest display info [How] Create a callback, and use this anytime there is a change in the link. This will be used later by the dm. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 411491fb88955ada509f194faa7559249aa5aa7b Author: Bhawanpreet Lakha Date: Tue Aug 6 18:04:44 2019 -0400 drm/amd/display: add PSP block to verify hdcp steps [Why] All the HDCP transactions should be verified using PSP. [How] This patch calls psp with the correct inputs to verify the steps of authentication. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 4c283fdac08abf3211533f70623c90a34f41d08d Author: Bhawanpreet Lakha Date: Tue Aug 6 17:52:01 2019 -0400 drm/amd/display: Add HDCP module This module manages HDCP for amdgpu driver. The module behaves as a state machine which handles the different authentication states of HDCP The module is divided into 3 major components +--------+ | Hdcp.c | +--------+ Manages the state machine, sends the events to be executed and communicates with the dm +-----------+ |Execution.c| +-----------+ This executes events based on the current state. Also generates execution results as transition inputs +------------+ |Transition.c| +------------+ Decides the next state based on the input and makes requests to hdcp.c to handle. +-------------+ ------> | Execution.c | ------ | +-------------+ | | V +----+ +--------+ +--------------+ | DM | -----> | Hdcp.c | <------------ | Transition.c | +----+ <----- +--------+ +--------------+ v2: Drop unused function definitions Signed-off-by: Bhawanpreet Lakha Signed-off-by: Wenjing Liu Reviewed-by: Wenjing Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 143f23053333c266ca89642e3ce7df83023b4793 Author: Bhawanpreet Lakha Date: Wed Jun 19 14:40:58 2019 -0400 drm/amdgpu: psp DTM init DTM is the display topology manager. This is needed to communicate with psp about the display configurations. This patch adds -Loading the firmware -The functions and definitions for communication with the firmware v2: Fix formatting Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit ed19a9a2bb1ab2d107987ae6d1e59318b188c4ba Author: Bhawanpreet Lakha Date: Wed Jun 19 14:37:29 2019 -0400 drm/amdgpu: psp HDCP init This patch adds -Loading the firmware -The functions and definitions for communication with the firmware v2: Fix formatting Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit bb2746ac9143fe57adab57c30d19718dbaed7901 Author: Aric Cyr Date: Tue Sep 3 18:18:08 2019 -0400 drm/amd/display: Improve LFC behaviour [Why] There can be some unsynchronized frames when entering/exiting LFC. This may cause tearing or stuttering at such transitions. [How] Add a enter/exit margin to algorithm to smoothly transition into and out of LFC without desynchronizing frames. Signed-off-by: Aric Cyr Reviewed-by: Reza Amini Acked-by: Leo Li Acked-by: Sivapiriyan Kumarasamy Signed-off-by: Alex Deucher commit ec4388a267e09061ca401eb7c2dcf104385c1a65 Author: Dmytro Laktyushkin Date: Tue Sep 3 14:10:28 2019 -0400 drm/amd/display: Add detile buffer size for DCN20 Detile buffer size affects dcc caps and therefore needs to be corrected for each ip. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Leo Li Signed-off-by: Alex Deucher commit 08b662793b90fc3a7e1d84d0fe0a5c04112731fd Author: Martin Leung Date: Tue Sep 3 15:22:30 2019 -0400 drm/amd/display: fix use of uninitialized variable tg_inst may be used uninitialized, so initialize it to 0. Signed-off-by: Martin Leung Reviewed-by: Jaehyun Chung Acked-by: Leo Li Signed-off-by: Alex Deucher commit 0fc3ba1c53bcc739ef2746f2fb3e82bb5f7a69f5 Author: Aric Cyr Date: Tue Sep 3 15:54:43 2019 -0400 drm/amd/display: 3.2.51.1 Signed-off-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 00d22e9e04c9574747368f2ca33ba2d1ed93f856 Author: Zhan Liu Date: Thu Aug 22 14:54:18 2019 -0400 drm/amd/display: Add missing HBM support and raise Vega20's uclk. [Why] When more than 2 displays are connected to the graphics card, only the minimum memory clock is needed. However, when more displays are connected, the minimum memory clock is not sufficient enough to support the overwhelming bandwidth. System will hang under this circumstance. Also, the old code didn't address HBM cards, which has 2 pseudo channels. We need to add the HBM part here. [How] When graphics card connects to 2 or more displays, switch to high memory clock. Also, choose memory multiplier based on whether its regular DRAM or HBM. Signed-off-by: Zhan Liu Reviewed-by: Roman Li Acked-by: Leo Li Signed-off-by: Alex Deucher commit 79816043f0f2d07789e9eed2f578338563b01e01 Author: Aric Cyr Date: Tue Sep 3 10:39:16 2019 -0400 drm/amd/display: 3.2.51 Signed-off-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 7f7652ee8c8c1c21a1493171bb9996759edb8d46 Author: Martin Leung Date: Fri Aug 16 17:26:23 2019 -0400 drm/amd/display: enable single dp seamless boot [why] seamless boot didn't work for non edp's before [how] removed edp-specific code, made dp read uefi-set link settings. Also fixed a hubbub code line to be consistent with usage of function. Signed-off-by: Martin Leung Reviewed-by: Jun Lei Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit c84ad0d6b93e4a7d9f4e65620bf2ad92a79116ea Author: Dmytro Laktyushkin Date: Fri Aug 30 16:32:13 2019 -0400 drm/amd/display: update odm mode validation to be in line with policy Previously 8k30 worked with dsc and odm combine due to a workaround that ran the formula a second time with dsc support enable should dsc validation fail. This worked when clocks were low enough for formula to enable odm to lower voltage, however now broke due to increased clocks. This change updates the ODM combine policy within the formula to properly reflect our current policy within DC, only enabling ODM when we have to, as well as adding a check for viewport width when dsc is enabled. As a side effect the redundant call to dml when odm is required is now unnecessary. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher commit 3a4d180d4a9df63144c6c069860b2be312c3256a Author: Wesley Chalmers Date: Fri Aug 30 14:59:00 2019 -0400 drm/amd/display: Optimize clocks on clock change [WHY] Presently, there is no way for clocks to be lowered, only raised. [HOW] Compare clock status against previous known clock status, and optimize if different. This requires re-ordering the layout of the dc_clocks structure, as the current ordering allows identical clock states to appear different. Signed-off-by: Wesley Chalmers Reviewed-by: Aric Cyr Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit 2fef0faa1cdc5d41ce3ef83f7b8f7e7ecb02d700 Author: Nikola Cornij Date: Wed Aug 28 18:30:43 2019 -0400 drm/amd/display: Set number of pipes to 1 if the second pipe was disabled [why] Some ODM-related register settings are inconsistently updated by VBIOS, causing the state in DC to be invalid, which would then end up crashing in certain use-cases (such as disable/enable device). [how] Check the enabled status of the second pipe when determining the number of OPTC sources. If the second pipe is disabled, set the number of sources to 1 regardless of other settings (that may not be updated correctly). Signed-off-by: Nikola Cornij Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit 2ad0cdf9e2e9e079af34af681863fa638f2ee212 Author: Anthony Koo Date: Thu Aug 29 10:49:12 2019 -0400 drm/amd/display: set minimum abm backlight level [Why] A lot of the time, the backlight characteristic curve maps min backlight to a non-zero value. But there are cases where we want the curve to intersect at 0. In this scenario even if OS never asks to set 0% backlight, the ABM reduction can result in backlight being lowered close to 0. This particularly can cause problems in some LED drivers, and in general just looks like backlight is completely off. [How] Add default cap to disallow backlight from dropping below 1% even after ABM reduction is applied. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 799c5b9cb91ca759df65707d2820b5fe1ee5383c Author: Wesley Chalmers Date: Mon Aug 26 15:02:47 2019 -0400 drm/amd/display: Revert fixup DPP programming sequence [WHY] This change was made because DTO programming was double-buffered, which is itself an issue. After deactivating the DTO double buffer, this change becomes unnecessary. Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit 6bd0a112ec129615d23aa5d8d3dd0be0243989aa Author: Wesley Chalmers Date: Mon Sep 16 15:42:38 2019 -0500 drm/amd/display: Do not double-buffer DTO adjustments [WHY] When changing DPP global ref clock, DTO adjustments must take effect immediately, or else underflow may occur. It appears the original decision to double-buffer DTO adjustments was made to prevent underflows that occur when raising DPP ref clock (which is not double-buffered), but that same decision causes similar issues when lowering DPP global ref clock. The better solution is to order the adjustments according to whether clocks are being raised or lowered. Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit 97ef12263fce2835dfbc01d1d86b8c5fd711712f Merge: 4a50d454502f 2c840676be8f Author: Kalle Valo Date: Thu Oct 3 16:39:51 2019 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 5.5. Major changes: ath10k * add support for hardware rfkill on devices where firmware supports it commit 0881ab6e74b0be7df3da3abdf7caeb2552f907d2 Author: Kuninori Morimoto Date: Wed Oct 2 14:23:14 2019 +0900 ASoC: soc-ops: use snd_soc_card_get_kcontrol() at snd_soc_limit_volume() snd_soc_limit_volume() is finding snd_kcontrol by using original coding, but we already have snd_soc_card_get_kcontrol(). Let's use existing function. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y2y3afgd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d8145989ff8c2a938be372b728f90e23de8557a2 Author: Kuninori Morimoto Date: Wed Oct 2 14:23:07 2019 +0900 ASoC: soc-core: setup card->rtd_num at snd_soc_instantiate_card() card->rtd_num is used to count rtd. Initialize it at snd_soc_instantiate_card() is very natural and less confusion. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zhijafgk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 50014499e6a45edd7ba1facf2133c03bbc7d8266 Author: Kuninori Morimoto Date: Wed Oct 2 14:22:57 2019 +0900 ASoC: soc-core: use devm_xxx for component related resource dai / component related resources are created when component is registered, and it will be freed when component was unregistered. These resources are not re-used after that. This means, we can use devm_xxx for dai / component, without thinking about kfree(). This patch uses devm_xxx for these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8736gbbu1a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0f23f718ecbc135866ac40db3424dd75f01c76ea Author: Kuninori Morimoto Date: Wed Oct 2 14:22:49 2019 +0900 ASoC: soc-core: add soc_setup_card_name() ALSA needs to setup shortname, longname, and driver. These methods are very similar. This patch adds new soc_setup_card_name() and setup these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874l0rbu1i.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7ce6088f60624805a8d3127185e2830e299849f1 Author: Kuninori Morimoto Date: Wed Oct 2 14:22:40 2019 +0900 ASoC: soc-core: remove soc_remove_dai_links() It is easy to read code if it is cleanly using paired function/naming, like start <-> stop, register <-> unregister, etc, etc. But, current ALSA SoC code is very random, unbalance, not paired, etc. It is easy to create bug at the such code, and it will be difficult to debug. soc_cleanup_card_resources() (a) which is paired function of snd_soc_instantiate_card() (A) is calling soc_remove_dai_links() (*) to remove card related resources, but it is breaking add/remove balance (B)(b)(C)(c)(D)(d), in other words these should be called from soc_cleanup_card_resources() (a) from balance point of view. More headacke is that it is using original removing method for dai_link even though we already have snd_soc_remove_dai_link() which is the function for it (d). This patch removes snd_soc_remove_dai_links() and balance up code. static void soc_remove_dai_links(...) { ... (b) soc_remove_link_dais(card); (c) soc_remove_link_components(card); for_each_card_links_safe(card, link, _link) { ... /* it should use snd_soc_remove_dai_link() here */ (d) list_del(&link->list); } } (a) static int soc_cleanup_card_resources(...) { ... /* remove and free each DAI */ (*) soc_remove_dai_links(card); ... } (A) static int snd_soc_instantiate_card(struct snd_soc_card *card) { ... /* add predefined DAI links to the list */ for_each_card_prelinks(card, i, dai_link) (B) snd_soc_add_dai_link(card, dai_link); ... /* probe all components used by DAI links on this card */ (C) ret = soc_probe_link_components(card); ... /* probe all DAI links on this card */ (D) ret = soc_probe_link_dais(card); ... } Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875zl7bu1r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4dc0e7df62839d052476de0f8447f29f857cecda Author: Kuninori Morimoto Date: Wed Oct 2 14:22:32 2019 +0900 ASoC: soc-core: use devm_kzalloc() for rtd Current rtd, rtd->dev, rtd->codec_dais are created by normal kzalloc(), but we want to use devm_kzalloc() as much as possible. Created rtd->dev is registered by device_register() at soc_new_pcm_runtime(), and it will be freed at soc_free_pcm_runtime() by device_unregister(). This means, if we can use devm_kzalloc(rtd->dev, xxx) for rtd / rtd->codec_dais, all these are automatically freed via soc_free_pcm_runtime(). This patch uses devm_kzalloc(rtd->dev, xxx) for rtd / rtd->codec_dais. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877e5nbu1z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5a7423993007d08bfc7b982451eca0526f51744d Author: kbuild test robot Date: Wed Oct 2 01:55:04 2019 +0800 tas2770: fix platform_no_drv_owner.cocci warnings sound/soc/codecs/tas2770.c:796: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: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver") CC: Frank Shi Signed-off-by: kbuild test robot Link: https://lore.kernel.org/r/20191001175504.ufhyxh66psrht42k@332d0cec05f4 Signed-off-by: Mark Brown commit a00d17e0a71ae2e4fdaac46e1c12785d3346c3f2 Author: Icenowy Zheng Date: Tue Oct 1 16:02:51 2019 +0800 Revert "drm/sun4i: dsi: Change the start delay calculation" This reverts commit da676c6aa6413d59ab0a80c97bbc273025e640b2. The original commit adds a start parameter to the calculation of the start delay according to some old BSP versions from Allwinner. However, there're two ways to add this delay -- add it in DSI controller or add it in the TCON. Add it in both controllers won't work. The code before this commit is picked from new versions of BSP kernel, which has a comment for the 1 that says "put start_delay to tcon". By checking the sun4i_tcon0_mode_set_cpu() in sun4i_tcon driver, it has already added this delay, so we shouldn't repeat to add the delay in DSI controller, otherwise the timing won't match. Signed-off-by: Icenowy Zheng Reviewed-by: Jagan Teki Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191001080253.6135-2-icenowy@aosc.io commit 7ac6269968826f9cad61b501bb613cc5cadb7229 Author: Jagan Teki Date: Thu Oct 3 12:15:21 2019 +0530 drm/sun4i: dsi: Fix TCON DRQ set bits The LCD timing definitions between Linux DRM vs Allwinner are different, below diagram shows this clear differences. Active Front Sync Back Region Porch Porch <-----------------------><----------------><--------------><--------------> //////////////////////| ////////////////////// | ////////////////////// |.................. ................ ________________ <----- [hv]display -----> <------------- [hv]sync_start ------------> <--------------------- [hv]sync_end ----------------------> <-------------------------------- [hv]total ------------------------------> <----- lcd_[xy] --------> <- lcd_[hv]spw -> <---------- lcd_[hv]bp ---------> <-------------------------------- lcd_[hv]t ------------------------------> The DSI driver misinterpreted the hbp term from the BSP code to refer only to the backporch, when in fact it was backporch + sync. Thus the driver incorrectly used the horizontal front porch plus sync in its calculation of the DRQ set bit value, when it should not have included the sync timing. Including additional sync timings leads to flip_done timed out as: WARNING: CPU: 0 PID: 31 at drivers/gpu/drm/drm_atomic_helper.c:1429 drm_atomic_helper_wait_for_vblanks.part.1+0x298/0x2a0 [CRTC:46:crtc-0] vblank wait timed out Modules linked in: CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 5.1.0-next-20190514-00026-g01f0c75b902d-dirty #13 Hardware name: Allwinner sun8i Family Workqueue: events deferred_probe_work_func [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x84/0x98) [] (dump_stack) from [] (__warn+0xfc/0x114) [] (__warn) from [] (warn_slowpath_fmt+0x44/0x68) [] (warn_slowpath_fmt) from [] (drm_atomic_helper_wait_for_vblanks.part.1+0x298/0x2a0) [] (drm_atomic_helper_wait_for_vblanks.part.1) from [] (drm_atomic_helper_commit_tail_rpm+0x5c/0x6c) [] (drm_atomic_helper_commit_tail_rpm) from [] (commit_tail+0x40/0x6c) [] (commit_tail) from [] (drm_atomic_helper_commit+0xbc/0x128) [] (drm_atomic_helper_commit) from [] (restore_fbdev_mode_atomic+0x1cc/0x1dc) [] (restore_fbdev_mode_atomic) from [] (drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xa0) [] (drm_fb_helper_restore_fbdev_mode_unlocked) from [] (drm_fb_helper_set_par+0x30/0x54) [] (drm_fb_helper_set_par) from [] (fbcon_init+0x560/0x5ac) [] (fbcon_init) from [] (visual_init+0xbc/0x104) [] (visual_init) from [] (do_bind_con_driver+0x1b0/0x390) [] (do_bind_con_driver) from [] (do_take_over_console+0x13c/0x1c4) [] (do_take_over_console) from [] (do_fbcon_takeover+0x74/0xcc) [] (do_fbcon_takeover) from [] (notifier_call_chain+0x44/0x84) [] (notifier_call_chain) from [] (__blocking_notifier_call_chain+0x48/0x60) [] (__blocking_notifier_call_chain) from [] (blocking_notifier_call_chain+0x18/0x20) [] (blocking_notifier_call_chain) from [] (register_framebuffer+0x1e0/0x2f8) [] (register_framebuffer) from [] (__drm_fb_helper_initial_config_and_unlock+0x2fc/0x50c) [] (__drm_fb_helper_initial_config_and_unlock) from [] (drm_fbdev_client_hotplug+0xe8/0x1b8) [] (drm_fbdev_client_hotplug) from [] (drm_fbdev_generic_setup+0x88/0x118) [] (drm_fbdev_generic_setup) from [] (sun4i_drv_bind+0x128/0x160) [] (sun4i_drv_bind) from [] (try_to_bring_up_master+0x164/0x1a0) [] (try_to_bring_up_master) from [] (__component_add+0x94/0x140) [] (__component_add) from [] (sun6i_dsi_probe+0x144/0x234) [] (sun6i_dsi_probe) from [] (platform_drv_probe+0x48/0x9c) [] (platform_drv_probe) from [] (really_probe+0x1dc/0x2c8) [] (really_probe) from [] (driver_probe_device+0x60/0x160) [] (driver_probe_device) from [] (bus_for_each_drv+0x74/0xb8) [] (bus_for_each_drv) from [] (__device_attach+0xd0/0x13c) [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [] (bus_probe_device) from [] (deferred_probe_work_func+0x64/0x90) [] (deferred_probe_work_func) from [] (process_one_work+0x204/0x420) [] (process_one_work) from [] (worker_thread+0x274/0x5a0) [] (worker_thread) from [] (kthread+0x11c/0x14c) [] (kthread) from [] (ret_from_fork+0x14/0x2c) Exception stack(0xde539fb0 to 0xde539ff8) 9fa0: 00000000 00000000 00000000 00000000 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ---[ end trace b57eb1e5c64c6b8b ]--- random: fast init done [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:46:crtc-0] flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:48:DSI-1] flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:30:plane-0] flip_done timed out With the terms(as described in above diagram) fixed, the panel displays correctly without any timeouts. Tested-by: Merlijn Wajer Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191003064527.15128-2-jagan@amarulasolutions.com commit ae436fe81053cd6cb294214be382b545565440cc Author: Brian Masney Date: Sat Sep 14 07:10:10 2019 -0400 pinctrl: ssbi-gpio: convert to hierarchical IRQ helpers in gpio core Now that the GPIO core has support for hierarchical IRQ chips, convert Qualcomm's ssbi-gpio over to use these new helpers to reduce duplicated code across drivers. Signed-off-by: Brian Masney Link: https://lore.kernel.org/r/20190914111010.24384-1-masneyb@onstation.org Signed-off-by: Linus Walleij commit be4c60b563edee3712d392aaeb0943a768df7023 Author: Will Deacon Date: Wed Oct 2 13:42:06 2019 +0100 pinctrl: devicetree: Avoid taking direct reference to device name string When populating the pinctrl mapping table entries for a device, the 'dev_name' field for each entry is initialised to point directly at the string returned by 'dev_name()' for the device and subsequently used by 'create_pinctrl()' when looking up the mappings for the device being probed. This is unreliable in the presence of calls to 'dev_set_name()', which may reallocate the device name string leaving the pinctrl mappings with a dangling reference. This then leads to a use-after-free every time the name is dereferenced by a device probe: | BUG: KASAN: invalid-access in strcmp+0x20/0x64 | Read of size 1 at addr 13ffffc153494b00 by task modprobe/590 | Pointer tag: [13], memory tag: [fe] | | Call trace: | __kasan_report+0x16c/0x1dc | kasan_report+0x10/0x18 | check_memory_region | __hwasan_load1_noabort+0x4c/0x54 | strcmp+0x20/0x64 | create_pinctrl+0x18c/0x7f4 | pinctrl_get+0x90/0x114 | devm_pinctrl_get+0x44/0x98 | pinctrl_bind_pins+0x5c/0x450 | really_probe+0x1c8/0x9a4 | driver_probe_device+0x120/0x1d8 Follow the example of sysfs, and duplicate the device name string before stashing it away in the pinctrl mapping entries. Cc: Linus Walleij Reported-by: Elena Petrova Tested-by: Elena Petrova Signed-off-by: Will Deacon Link: https://lore.kernel.org/r/20191002124206.22928-1-will@kernel.org Signed-off-by: Linus Walleij commit 1c056ad87117c47a02b73df63555788b751968c4 Author: Jagan Teki Date: Thu Oct 3 12:15:25 2019 +0530 drm/sun4i: sun6i_mipi_dsi: Add VCC-DSI regulator support Allwinner MIPI DSI controllers are supplied with SoC DSI power rails via VCC-DSI pin. Add support for this supply pin by adding voltage regulator handling code to MIPI DSI driver. Tested-by: Merlijn Wajer Reviewed-by: Chen-Yu Tsai Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191003064527.15128-6-jagan@amarulasolutions.com commit 8a317f223bcfc023ca492277bf26d70c52b926a5 Author: Jagan Teki Date: Thu Oct 3 12:15:24 2019 +0530 dt-bindings: sun6i-dsi: Add VCC-DSI supply property Allwinner MIPI DSI controllers are supplied with SoC DSI power rails via VCC-DSI pin. Some board still work without supplying this but give more faith on datasheet and hardware schematics and document this supply property in required property list. Reviewed-by: Rob Herring Tested-by: Merlijn Wajer Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191003064527.15128-5-jagan@amarulasolutions.com commit 6ad94e957c3c9914c3c2e3602ae2a29e91ba1906 Merge: f8b410e3695a 13949fa9daa9 Author: Linus Walleij Date: Thu Oct 3 12:05:31 2019 +0200 Merge branch 'ib-fwnode-gpiod-get-index' into devel commit 13949fa9daa91a60c7cfef40755f7611cc2cf653 Author: Dmitry Torokhov Date: Thu Sep 12 20:22:39 2019 -0700 gpiolib: introduce fwnode_gpiod_get_index() This introduces fwnode_gpiod_get_index() that iterates through common gpio suffixes when trying to locate a GPIO within a given firmware node. We also switch devm_fwnode_gpiod_get_index() to call fwnode_gpiod_get_index() instead of iterating through GPIO suffixes on its own. Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20190913032240.50333-3-dmitry.torokhov@gmail.com Reviewed-by: Mika Westerberg Signed-off-by: Linus Walleij commit 2d2f116d69c127099553afe0d87cf9c0bbe2759e Author: Dmitry Torokhov Date: Thu Sep 12 20:22:38 2019 -0700 gpiolib: introduce devm_fwnode_gpiod_get_index() devm_fwnode_get_index_gpiod_from_child() is too long, besides the fwnode in question does not have to be a child of device node. Let's rename it to devm_fwnode_gpiod_get_index() and keep the old name for compatibility for now. Also let's add a devm_fwnode_gpiod_get() wrapper as majority of the callers need a single GPIO. Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov Reviewed-by: Mika Westerberg Link: https://lore.kernel.org/r/20190913032240.50333-2-dmitry.torokhov@gmail.com Signed-off-by: Linus Walleij commit 8b8c7d97e2c71615b5f1737e36e2df8ea3d2f52f Author: Anson Huang Date: Wed Aug 28 09:35:03 2019 -0400 ARM: dts: imx7ulp: Add wdog1 node Add wdog1 node to support watchdog driver. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 679c92a82364a9b4b757ef21af98d04d79133431 Author: Anson Huang Date: Wed Aug 28 09:35:02 2019 -0400 ARM: imx_v6_v7_defconfig: Enable CONFIG_IMX7ULP_WDT by default Select CONFIG_IMX7ULP_WDT by default to support i.MX7ULP watchdog. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 87d6021b814353d7b353afcc3698ffe49de7d4ec Author: Arnd Bergmann Date: Tue Oct 1 16:23:35 2019 +0200 x86/math-emu: Limit MATH_EMULATION to 486SX compatibles The FPU emulation code is old and fragile in places, try to limit its use to builds for CPUs that actually use it. As far as I can tell, this is only true for i486sx compatibles, including the Cyrix 486SLC, AMD Am486SX and ÉLAN SC410, UMC U5S amd DM&P VortexSX86, all of which were relatively short-lived and got replaced with i486DX compatible processors soon after introduction, though some of the embedded versions remained available much longer. Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Cc: "H. Peter Anvin" Cc: Andrew Morton Cc: Bill Metzenthen Cc: Ingo Molnar Cc: Masahiro Yamada Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191001142344.1274185-2-arnd@arndb.de commit e6b44ce1925a8329a937c57f0d60ba0d9bb5d226 Author: Arnd Bergmann Date: Tue Oct 1 16:23:34 2019 +0200 x86/math-emu: Check __copy_from_user() result The new __must_check annotation on __copy_from_user() successfully identified some code that has lacked the check since at least linux-2.1.73: arch/x86/math-emu/reg_ld_str.c:88:2: error: ignoring return value of \ function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]         __copy_from_user(sti_ptr, s, 10);         ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ arch/x86/math-emu/reg_ld_str.c:1129:2: error: ignoring return value of \ function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]         __copy_from_user(register_base + offset, s, other);         ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/math-emu/reg_ld_str.c:1131:3: error: ignoring return value of \ function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]                 __copy_from_user(register_base, s + other, offset);                 ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition, the get_user()/put_user() helpers do not enforce a return value check, but actually still require one. These have been missing for even longer. Change the internal wrappers around get_user()/put_user() to force a signal and add a corresponding wrapper around __copy_from_user() to check all such cases. [ bp: Break long lines. ] Fixes: 257e458057e5 ("Import 2.1.73") Fixes: 9dd819a15162 ("uaccess: add missing __must_check attributes") Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Cc: "H. Peter Anvin" Cc: Bill Metzenthen Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191001142344.1274185-1-arnd@arndb.de commit 5ede17d61592844c6d09eaba513f9de14920965c Author: Biju Das Date: Mon Sep 23 14:27:48 2019 +0100 dt-bindings: gpio: rcar: Add DT binding for r8a774b1 Document Renesas' RZ/G2N (R8A774B1) GPIO blocks compatibility within the relevant dt-bindings. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit 35c3ba911ae19538b3855165f8e2c71ce853c0ac Author: Jonathan Neuschäfer Date: Wed Oct 2 16:41:41 2019 +0200 Documentation: gpio: driver: Format code blocks properly This fixes a lot of Sphinx warnings, and makes the code blocks look nice in HTML. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Bartosz Golaszewski commit 48c38154d539e3c3fd32b0cdf654b10e5631d18c Author: Jani Nikula Date: Wed Oct 2 17:54:05 2019 +0300 drm/i915: use DRM_DEBUG_KMS() instead of drm_dbg(DRM_UT_KMS, ...) Unify on current common usage to allow repurposing drm_dbg() later. Fix newlines while at it. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191002145405.27848-2-jani.nikula@intel.com commit 0d52cc7e0311c17dfce2249532b6f7073fcac252 Author: Jani Nikula Date: Wed Oct 2 17:54:04 2019 +0300 drm/i915: use DRM_ERROR() instead of drm_err() Unify on current common usage to allow repurposing drm_err() later. Fix newlines while at it. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191002145405.27848-1-jani.nikula@intel.com commit 09107a51b096fbac3ea32d9ea150ddf029cbc358 Author: Alexandre Belloni Date: Wed Sep 18 13:36:57 2019 +0200 pinctrl: at91-pio4: implement .get_multiple and .set_multiple Implement .get_multiple and .set_multiple to allow reading or setting multiple pins simultaneously. Pins in the same bank will all be switched at the same time, improving synchronization and performances. Keep the driver future proof by allowing its use on 64bits platforms if they ever appear with this IP and we end up with a mismatch between ATMEL_PIO_NPINS_PER_BANK and BITS_PER_LONG. Signed-off-by: Alexandre Belloni Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20190918113657.25998-1-alexandre.belloni@bootlin.com Signed-off-by: Linus Walleij commit fcde8c7eea6004e92f8b329a84c2a520a1a71bc0 Author: Chris Wilson Date: Wed Oct 2 19:34:59 2019 +0100 drm/i915/selftests: Exercise potential false lite-restore If execlists's lite-restore is based on the common GEM context tag rather than the per-intel_context LRCA, then a context switch between two intel_contexts on the same engine derived from the same GEM context will perform a lite-restore instead of a full context switch. We can exploit this by poisoning the ringbuffer of the first context and trying to trick a simple RING_TAIL update (i.e. lite-restore) v2: Also check what happens if preempt ce[0] with ce[1] (both instances on the same engine from the same parent context) [Tvrtko] Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191002183459.26614-1-chris@chris-wilson.co.uk commit fab401e1ee96efc58dc3891c6a9e9ee3cc6ba0f8 Author: Sudhakar Dindukurti Date: Tue Oct 1 16:33:14 2019 -0700 net/rds: Log vendor error if send/recv Work requests fail Log vendor error if work requests fail. Vendor error provides more information that is used for debugging the issue. Signed-off-by: Sudhakar Dindukurti Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller commit 80f60a911e5ea4de9e25b539bec4f597af7b2ff4 Author: Matteo Croce Date: Wed Oct 2 23:49:04 2019 +0200 mvpp2: remove misleading comment Recycling in mvpp2 has gone long time ago, but two comment still refers to it. Remove those two misleading comments as they generate confusion. Fixes: 7ef7e1d949cd ("net: mvpp2: drop useless fields in mvpp2_bm_pool and related code") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit bc389189131c0f40bc48369da53263d60f304fd8 Merge: b60fa1c5d01a 0f04f8ea62ce Author: David S. Miller Date: Wed Oct 2 14:47:52 2019 -0700 Merge branch 'CAIF-Kconfig-fixes' Randy Dunlap says: ==================== CAIF Kconfig fixes This series of patches cleans up the CAIF Kconfig menus in net/caif/Kconfig and drivers/net/caif/Kconfig and also puts the CAIF Transport drivers into their own sub-menu. ==================== Signed-off-by: David S. Miller commit 0f04f8ea62ce79f5a8bb1a7c2d92513799532239 Author: rd.dunlab@gmail.com Date: Tue Oct 1 16:04:01 2019 -0700 Minor fixes to the CAIF Transport drivers Kconfig file Minor fixes to the CAIF Transport drivers Kconfig file: - end sentence with period - capitalize CAIF acronym Signed-off-by: Randy Dunlap Cc: Randy Dunlap Signed-off-by: David S. Miller commit 21d549769e793607c081328c9811e03ad851f9dc Author: rd.dunlab@gmail.com Date: Tue Oct 1 16:04:00 2019 -0700 Isolate CAIF transport drivers into their own menu Isolate CAIF transport drivers into their own menu. This cleans up the main Network device support menu, makes it easier to find the CAIF drivers, and makes it easier to enable/disable them as a group. Signed-off-by: Randy Dunlap Cc: Randy Dunlap Signed-off-by: David S. Miller commit 0903102f578568f74cce30763aa112ef82996cde Author: rd.dunlab@gmail.com Date: Tue Oct 1 16:03:59 2019 -0700 Clean up the net/caif/Kconfig menu Clean up the net/caif/Kconfig menu: - remove extraneous space - minor language tweaks - fix punctuation Signed-off-by: Randy Dunlap Cc: Randy Dunlap Signed-off-by: David S. Miller commit b60fa1c5d01a10e358c509b904d4bead6114d593 Author: Eric Dumazet Date: Tue Oct 1 14:02:36 2019 -0700 net_sched: remove need_resched() from qdisc_run() The introduction of this schedule point was done in commit 2ba2506ca7ca ("[NET]: Add preemption point in qdisc_run") at a time the loop was not bounded. Then later in commit d5b8aa1d246f ("net_sched: fix dequeuer fairness") we added a limit on the number of packets. Now is the time to remove the schedule point, since the default limit of 64 packets matches the number of packets a typical NAPI poll can process in a row. This solves a latency problem for most TCP receivers under moderate load : 1) host receives a packet. NET_RX_SOFTIRQ is raised by NIC hard IRQ handler 2) __do_softirq() does its first loop, handling NET_RX_SOFTIRQ and calling the driver napi->loop() function 3) TCP stores the skb in socket receive queue: 4) TCP calls sk->sk_data_ready() and wakeups a user thread waiting for EPOLLIN (as a result, need_resched() might now be true) 5) TCP cooks an ACK and sends it. 6) qdisc_run() processes one packet from qdisc, and sees need_resched(), this raises NET_TX_SOFTIRQ (even if there are no more packets in the qdisc) Then we go back to the __do_softirq() in 2), and we see that new softirqs were raised. Since need_resched() is true, we end up waking ksoftirqd in this path : if (pending) { if (time_before(jiffies, end) && !need_resched() && --max_restart) goto restart; wakeup_softirqd(); } So we have many wakeups of ksoftirqd kernel threads, and more calls to qdisc_run() with associated lock overhead. Note that another way to solve the issue would be to change TCP to first send the ACK packet, then signal the EPOLLIN, but this changes P99 latencies, as sending the ACK packet can add a long delay. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 37048e94a2dc81a5a259963117f62341e25161f7 Author: Vladimir Oltean Date: Tue Oct 1 22:12:50 2019 +0300 net: dsa: Remove unused __DSA_SKB_CB macro The struct __dsa_skb_cb is supposed to span the entire 48-byte skb control block, while the struct dsa_skb_cb only the portion of it which is used by the DSA core (the rest is available as private data to drivers). The DSA_SKB_CB and __DSA_SKB_CB helpers are supposed to help retrieve this pointer based on a skb, but it turns out there is nobody directly interested in the struct __dsa_skb_cb in the kernel. So remove it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 463fa44eec2fef50d111ed0199cf593235065c04 Author: Evan Green Date: Wed Oct 2 14:00:21 2019 -0700 Input: atmel_mxt_ts - disable IRQ across suspend Across suspend and resume, we are seeing error messages like the following: atmel_mxt_ts i2c-PRP0001:00: __mxt_read_reg: i2c transfer failed (-121) atmel_mxt_ts i2c-PRP0001:00: Failed to read T44 and T5 (-121) This occurs because the driver leaves its IRQ enabled. Upon resume, there is an IRQ pending, but the interrupt is serviced before both the driver and the underlying I2C bus have been resumed. This causes EREMOTEIO errors. Disable the IRQ in suspend, and re-enable it on resume. If there are cases where the driver enters suspend with interrupts disabled, that's a bug we should fix separately. Signed-off-by: Evan Green Signed-off-by: Dmitry Torokhov commit f21e8b80b79d77872e88d853032294ba5bde0bc4 Author: José Roberto de Souza Date: Tue Oct 1 12:37:29 2019 -0700 drm/i915/mg: Use tc_port instead of port parameter to MG registers All the MG registers is based on the tc_port not port, so MG_PHY_PORT_LN() was subtracting port and PORT_C what is very fragile. So replacing port to tc_port in all MG register macros and users like we have for DKL. Cc: Lucas De Marchi Cc: Imre Deak Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191001193729.123736-1-jose.souza@intel.com commit bbf918863e183d66adf00ca1b24fb641149a0d3d Author: Lukasz Luba Date: Wed Oct 2 08:04:55 2019 +0200 memory: samsung: exynos5422-dmc: Add support for interrupt from performance counters Introduce a new interrupt driven mechanism for managing speed of the memory controller. The interrupts are generated due to performance counters overflow. The performance counters might track memory reads, writes, transfers, page misses, etc. In the basic algorithm tracking read transfers and calculating memory pressure should be enough to skip polling mode in devfreq. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 8611ed7ad5866dea0c75e08e7a2b34722db35426 Author: Lukasz Luba Date: Wed Oct 2 08:04:53 2019 +0200 ARM: dts: exynos: Add interrupts to DMC controller in Exynos5422 Add interrupts to Dynamic Memory Controller in Exynos5422 and Odroid XU3-family boards. It will be used instead of devfreq polling mode governor. The interrupt is connected to performance counters private for DMC, which might track utilisation of the memory channels. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 63cf62ddb983c97d19815bb3a480e05ccd9c52b6 Author: Lukasz Luba Date: Wed Oct 2 08:04:52 2019 +0200 ARM: dts: exynos: Extend mapped region for DMC on Exynos5422 DMC Adaptive Voltage and Frequency Scaling driver in interrupt mode needs to access registers at address offset near 0x10000. These registers are private DMC performance counters, which might be used as interrupt trigger when overflow. Potential usage is to skip polling in devfreq framework and switch to interrupt managed bandwidth control. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 40192209b96b65ff3588e063c5b984e946baaaae Author: Lukasz Luba Date: Wed Oct 2 08:04:52 2019 +0200 dt-bindings: memory-controllers: exynos5422-dmc: Add interrupt mode Add description for optional interrupt lines. It provides a new operation mode, which uses internal performance counters interrupt when overflow. This is more reliable than using default polling mode implemented in devfreq. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 2c840676be8ffc624bf9bb4490d944fd13c02d71 Author: Denis Efremov Date: Tue Oct 1 15:08:23 2019 +0300 wil6210: check len before memcpy() calls memcpy() in wmi_set_ie() and wmi_update_ft_ies() is called with src == NULL and len == 0. This is an undefined behavior. Fix it by checking "ie_len > 0" before the memcpy() calls. As suggested by GCC documentation: "The pointers passed to memmove (and similar functions in ) must be non-null even when nbytes==0, so GCC can use that information to remove the check after the memmove call." [1] [1] https://gcc.gnu.org/gcc-4.9/porting_to.html Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: stable@vger.kernel.org Signed-off-by: Denis Efremov Signed-off-by: Kalle Valo commit 315cee426f87658a6799815845788fde965ddaad Author: Denis Efremov Date: Mon Sep 30 23:31:47 2019 +0300 ar5523: check NULL before memcpy() in ar5523_cmd() memcpy() call with "idata == NULL && ilen == 0" results in undefined behavior in ar5523_cmd(). For example, NULL is passed in callchain "ar5523_stat_work() -> ar5523_cmd_write() -> ar5523_cmd()". This patch adds ilen check before memcpy() call in ar5523_cmd() to prevent an undefined behavior. Cc: Pontus Fuchs Cc: Kalle Valo Cc: "David S. Miller" Cc: David Laight Cc: stable@vger.kernel.org Signed-off-by: Denis Efremov Signed-off-by: Kalle Valo commit 1382993f882b6b96c99837fd8b705300a208de3a Author: Wen Gong Date: Tue Oct 1 15:04:56 2019 +0300 ath10k: add support for hardware rfkill When hardware rfkill is enabled in the firmware it will report the capability via using WMI_TLV_SYS_CAP_INFO_RFKILL bit in the WMI_SERVICE_READY event to the host. ath10k will check the capability, and if it is enabled then ath10k will set the GPIO information to firmware using WMI_PDEV_SET_PARAM. When the firmware detects hardware rfkill is enabled by the user, it will report it via WMI_RFKILL_STATE_CHANGE_EVENTID. Once ath10k receives the event it will send wmi command WMI_PDEV_SET_PARAM to the firmware to enable/disable the radio and also notifies cfg80211. We can't power off the device when rfkill is enabled, as otherwise the firmware would not be able to detect GPIO changes and report them to the host. So when rfkill is enabled, we need to keep the firmware running. Tested with QCA6174 PCI with firmware WLAN.RM.4.4.1-00109-QCARMSWPZ-1. Signed-off-by: Alan Liu Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 7e088276923b0b2038987bcf766ced8fe9f72d04 Author: Sylwester Nawrocki Date: Fri Sep 20 15:07:02 2019 +0200 ARM: exynos_defconfig: Enable Arndale audio driver Enable audio driver for Exynos5250 based Arndale boards to improve testing coverage. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit f8914a14623a79b73f72b2b1ee4cd9b2cb91b735 Author: Christian Lamparter Date: Fri Sep 6 23:54:23 2019 +0200 ath10k: restore QCA9880-AR1A (v1) detection This patch restores the old behavior that read the chip_id on the QCA988x before resetting the chip. This needs to be done in this order since the unsupported QCA988x AR1A chips fall off the bus when resetted. Otherwise the next MMIO Op after the reset causes a BUS ERROR and panic. Cc: stable@vger.kernel.org Fixes: 1a7fecb766c8 ("ath10k: reset chip before reading chip_id in probe") Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo commit 988c81ad1a4d44edd685e812d001d0bc53987c5f Author: Lukasz Luba Date: Wed Aug 21 12:43:03 2019 +0200 ARM: exynos_defconfig: Enable DMC driver Enable driver for Exynos5422 Dynamic Memory Controller supporting dynamic frequency and voltage scaling in Exynos5422 SoCs. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit cc6df017e55764ffef9819dd9554053182535ffd Author: Ben Greear Date: Tue Oct 17 17:03:12 2017 -0700 ath10k: fix offchannel tx failure when no ath10k_mac_tx_frm_has_freq Offchannel management frames were failing: [18099.253732] ath10k_pci 0000:01:00.0: timed out waiting for offchannel skb cf0e3780 [18102.293686] ath10k_pci 0000:01:00.0: timed out waiting for offchannel skb cf0e3780 [18105.333653] ath10k_pci 0000:01:00.0: timed out waiting for offchannel skb cf0e3780 [18108.373712] ath10k_pci 0000:01:00.0: timed out waiting for offchannel skb cf0e3780 [18111.413687] ath10k_pci 0000:01:00.0: timed out waiting for offchannel skb cf0e36c0 [18114.453726] ath10k_pci 0000:01:00.0: timed out waiting for offchannel skb cf0e3f00 [18117.493773] ath10k_pci 0000:01:00.0: timed out waiting for offchannel skb cf0e36c0 [18120.533631] ath10k_pci 0000:01:00.0: timed out waiting for offchannel skb cf0e3f00 This bug appears to have been added between 4.0 (which works for us), and 4.4, which does not work. I think this is because the tx-offchannel logic gets in a loop when ath10k_mac_tx_frm_has_freq(ar) is false, so pkt is never actually sent to the firmware for transmit. This patch fixes the problem on 4.9 for me, and now HS20 clients can work again with my firmware. Antonio: tested with 10.4-3.5.3-00057 on QCA4019 and QCA9888 Signed-off-by: Ben Greear Tested-by: Antonio Quartulli [kvalo@codeaurora.org: improve commit log, remove unneeded parenthesis] Signed-off-by: Kalle Valo commit b74d402ef599e8e1f3c8a64ed7ba3f87d164d5c9 Merge: 5cf37738e0ef 1bd448703895 Author: David S. Miller Date: Wed Oct 2 12:25:11 2019 -0400 Merge branch 'sja1105-cleanups' Vladimir Oltean says: ==================== SJA1105 DSA coding style cleanup This series provides some mechanical cleanup patches related to function names and prototypes. ==================== Signed-off-by: David S. Miller commit 1bd448703895473e500c0ce4c6258aeac1f67c20 Author: Vladimir Oltean Date: Tue Oct 1 22:18:01 2019 +0300 net: dsa: sja1105: Rename sja1105_spi_send_packed_buf to sja1105_xfer_buf The most commonly called function in the driver is long due for a rename. The "packed" word is redundant (it doesn't make sense to transfer an unpacked structure, since that is in CPU endianness yadda yadda), and the "spi" word is also redundant since argument 2 of the function is SPI_READ or SPI_WRITE. As for the sja1105_spi_send_long_packed_buf function, it is only being used from sja1105_spi.c, so remove its global prototype. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit dff79620c3e8c3a1793e0e4751b8cd7bd15f1565 Author: Vladimir Oltean Date: Tue Oct 1 22:18:00 2019 +0300 net: dsa: sja1105: Replace sja1105_spi_send_int with sja1105_xfer_{u32, u64} Having a function that takes a variable number of unpacked bytes which it generically calls an "int" is confusing and makes auditing patches next to impossible. We only use spi_send_int with the int sizes of 32 and 64 bits. So just make the spi_send_int function less generic and replace it with the appropriate two explicit functions, which can now type-check the int pointer type. Note that there is still a small weirdness in the u32 function, which has to convert it to a u64 temporary. This is because of how the packing API works at the moment, but the weirdness is at least hidden from callers of sja1105_xfer_u32 now. Suggested-by: David S. Miller Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 09c1b412558b8adf01f733dfe665b5f75dfdf347 Author: Vladimir Oltean Date: Tue Oct 1 22:17:59 2019 +0300 net: dsa: sja1105: Don't use "inline" function declarations in C files Let the compiler decide. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5cf37738e0efcb1b62928bcb17f74a6202acc372 Merge: 1f6d768a09c6 51976f47d29a Author: David S. Miller Date: Wed Oct 2 12:15:15 2019 -0400 Merge branch 'SMB-rootfs' Paulo Alcantara says: ==================== Experimental SMB rootfs support This patch series enables Linux to mount root file systems over the network by utilizing SMB protocol. Upstream commit 8eecd1c2e5bc ("cifs: Add support for root file systems") introduced a new CONFIG_CIFS_ROOT option, a virtual device (Root_CIFS) and a kernel cmdline parameter "cifsroot=" which tells the kernel to actually mount the root filesystem over a SMB share. The feature relies on ipconfig to set up the network prior to mounting the rootfs, so when it is set along with "cifsroot=" parameter: (1) cifs_root_setup() parses all necessary data out of "cifsroot=" parameter for the init process know how to mount the SMB rootfs (e.g. SMB server address, mount options). (2) If DHCP failed for some reason in ipconfig, we keep retrying forever as we have nowhere to go for NFS or SMB root filesystems (see PATCH 2/2). Otherwise go to (3). (3) mount_cifs_root() is then called by mount_root() (ROOT_DEV == Root_CIFS), retrieves early parsed data from (1), then attempt to mount SMB rootfs by CIFSROOT_RETRY_MAX times at most (see PATCH 1/2). (4) If all attempts failed, fall back to floppy drive, otherwise continue the boot process with rootfs mounted over a SMB share. My idea was to keep the same behavior of nfsroot - as it seems to work for most users so far. For more information on how this feature works, see Documentation/filesystems/cifs/cifsroot.txt. ==================== Signed-off-by: David S. Miller commit 51976f47d29a973bf4bd941a73ce6c7ad7f6af3a Author: Paulo Alcantara (SUSE) Date: Tue Oct 1 14:10:28 2019 -0300 ipconfig: Handle CONFIG_CIFS_ROOT option The experimental root file system support in cifs.ko relies on ipconfig to set up the network stack and then accessing the SMB share that contains the rootfs files. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: David S. Miller commit 8902dd526020748ccf16f753befc287b534fdefd Author: Paulo Alcantara (SUSE) Date: Tue Oct 1 14:10:27 2019 -0300 init: Support mounting root file systems over SMB Add a new virtual device named /dev/cifs (0xfe) to tell the kernel to mount the root file system over the network by using SMB protocol. cifs_root_data() will be responsible to retrieve the parsed information of the new command-line option (cifsroot=) and then call do_mount_root() with the appropriate mount options for cifs.ko. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: David S. Miller commit aa204855281389fe25c0049190531ba67e043d99 Author: Kees Cook Date: Tue Oct 1 11:25:32 2019 -0700 doc-rst: Programmatically render MAINTAINERS into ReST In order to have the MAINTAINERS file visible in the rendered ReST output, this makes some small changes to the existing MAINTAINERS file to allow for better machine processing, and adds a new Sphinx directive "maintainers-include" to perform the rendering. Features include: - Per-subsystem reference links: subsystem maintainer entries can be trivially linked to both internally and external. For example: https://www.kernel.org/doc/html/latest/process/maintainers.html#secure-computing - Internally referenced .rst files are linked so they can be followed when browsing the resulting rendering. This allows, for example, the future addition of maintainer profiles to be automatically linked. - Field name expansion: instead of the short fields (e.g. "M", "F", "K"), use the indicated inline "full names" for the fields (which are marked with "*"s in MAINTAINERS) so that a rendered subsystem entry is more human readable. Email lists are additionally comma-separated. For example: SECURE COMPUTING Mail: Kees Cook Reviewer: Andy Lutomirski , Will Drewry SCM: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git seccomp Status: Supported Files: kernel/seccomp.c include/uapi/linux/seccomp.h include/linux/seccomp.h tools/testing/selftests/seccomp/* tools/testing/selftests/kselftest_harness.h userspace-api/seccomp_filter Content regex: \bsecure_computing \bTIF_SECCOMP\b Signed-off-by: Kees Cook Signed-off-by: Jonathan Corbet commit 1b1438b5351f54d3fb8b3cc1579dea7668b03ca0 Author: Kees Cook Date: Tue Oct 1 11:25:31 2019 -0700 doc-rst: Reduce CSS padding around Field Right now any ":Field Name: Field Contents" lines end up with significant padding due to CSS from the "table" CSS which rightly needs padding to make tables readable. However, field lists don't need this as they tend to be stacked together. The future heavy use of fields in the parsed MAINTAINERS file needs this cleaned up, and existing users look better too. Note the needless white space (and misalignment of name/contents) between "Date" and "Author": https://www.kernel.org/doc/html/latest/accounting/psi.html This patch fixes this by lowering the padding with a more specific CSS. Signed-off-by: Kees Cook Signed-off-by: Jonathan Corbet commit 4359fce7060de7373954299b1b6cb3eea8a20df1 Author: Sylwester Nawrocki Date: Wed Oct 2 17:28:31 2019 +0200 ARM: dts: exynos: Add audio support (WM1811 CODEC boards) to Arndale board Add sound node and the clock configurations for the I2S controller for audio support on the Exynos5250 SoC Arndale boards with WM1811 based audio daughter board. We need to increase drive strength of the I2S bus, otherwise the audio CODEC doesn't work. Likely the CODEC's master clock is the main issue here. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit 1f6d768a09c61e2454d4d67aee91210301c72211 Merge: df428e4049a6 e982ae6aa4e1 Author: David S. Miller Date: Wed Oct 2 11:55:12 2019 -0400 Merge branch 'ionic-driver-updates' Shannon Nelson says: ==================== ionic: driver updates These patches are a few updates to clean up some code issues and add an ethtool feature. v3: drop the Fixes tags as they really aren't fixing bugs simplify ionic_lif_quiesce() as no return is necessary v2: add cover letter edit a couple of patch descriptions for clarity and add Fixes: tags ==================== Signed-off-by: David S. Miller commit e982ae6aa4e1505d7567a54ef3f259a9647dfd35 Author: Shannon Nelson Date: Mon Sep 30 20:03:26 2019 -0700 ionic: add lif_quiesce to wait for queue activity to stop Even though we've already turned off the queue activity with the ionic_qcq_disable(), we need to wait for any device queues that are processing packets to drain down before we try to flush our packets and tear down the queues. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit e95f922f4c2f27bd7b7479a8fd6bdc689e2062be Author: Shannon Nelson Date: Mon Sep 30 20:03:25 2019 -0700 ionic: implement ethtool set-fec Wire up the --set-fec and --show-fec features in the ethtool callbacks and pull the related code out of set_link_ksettings. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 780eded34cccca642c241dad54d54de70f6c43ac Author: Shannon Nelson Date: Mon Sep 30 20:03:24 2019 -0700 ionic: report users coalesce request The user's request for an interrupt coalescing value gets translated into a hardware value to be used with the NIC, and was getting reported back based on the hw value, which, due to hw tic resolution, could be reported as a different number than what the user originally asked for. This code now tracks both the user request and what was put into the hardware so we can report back to the user what they requested. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit d229be4b27a8b76d897f73dede9c25e6a6d3a6ad Author: Shannon Nelson Date: Mon Sep 30 20:03:23 2019 -0700 ionic: use wait_on_bit_lock() rather than open code Replace the open-coded ionic_wait_for_bit() with the kernel's wait_on_bit_lock(). Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit da0729e8d2ae3f2e725b4fa8c3bf99eeb12debec Author: Shannon Nelson Date: Mon Sep 30 20:03:22 2019 -0700 ionic: simplify returns in devlink info There is no need for a goto in this bit of code. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit df428e4049a6456c08d664e5a7c39da4c744805d Merge: c01ebd6c4698 f1cdaa077cca Author: David S. Miller Date: Wed Oct 2 11:48:44 2019 -0400 Merge branch 'per-netns-notifier' Jiri Pirko says: ==================== net: introduce per-netns netdevice notifiers and use them in mlxsw Some drivers, like mlxsw, are not interested in notifications coming in for netdevices from other network namespaces. So introduce per-netns notifiers and allow to reduce overhead by listening only for notifications from the same netns. This is also a preparation for upcoming patchset "devlink: allow devlink instances to change network namespace". This resolves deadlock during reload mlxsw into initial netns made possible by 328fbe747ad4 ("net: Close race between {un, }register_netdevice_notifier() and setup_net()/cleanup_net()"). ==================== Signed-off-by: David S. Miller commit f1cdaa077ccacb0d78a2da5c9df9b4aa7b7a0927 Author: Jiri Pirko Date: Mon Sep 30 10:15:11 2019 +0200 mlxsw: spectrum: Use per-netns netdevice notifier registration The mlxsw_sp instance is not interested in events happening in other network namespaces. So use "_net" variants for netdevice notifier registration/unregistration and get only events which are happening in the net the instance is in. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit a30c7b429f2dd980202c912fcb76442364937b4d Author: Jiri Pirko Date: Mon Sep 30 10:15:10 2019 +0200 net: introduce per-netns netdevice notifiers Often the code for example in drivers is interested in getting notifier call only from certain network namespace. In addition to the existing global netdevice notifier chain introduce per-netns chains and allow users to register to that. Eventually this would eliminate unnecessary overhead in case there are many netdevices in many network namespaces. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit afa0df5998131153ec3036f41e76ece33bf1334f Author: Jiri Pirko Date: Mon Sep 30 10:15:09 2019 +0200 net: push loops and nb calls into helper functions Push iterations over net namespaces and netdevices from register_netdevice_notifier() and unregister_netdevice_notifier() into helper functions. Along with that introduce continue_reverse macros to make the code a bit nicer allowing to get rid of "last" marks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 64cc3ea949a86b19ca7838311dc22ce294c86948 Author: Krzysztof Kozlowski Date: Mon Sep 23 18:15:20 2019 +0200 ARM: dts: exynos: Use defines for MCT interrupt GIC SPI/PPI specifier Replace hard-coded number with appropriate define for GIC SPI or PPI specifier in interrupt. This makes code easier to read. No expected functionality change. Signed-off-by: Krzysztof Kozlowski commit 04d6fe244181042f0a2cd7f3c54b85051655066d Author: Krzysztof Kozlowski Date: Mon Sep 23 18:15:17 2019 +0200 ARM: dts: exynos: Remove MCT subnode for interrupt map on Exynos54xx Multi Core Timer node has interrupts routed to two different parents - GIC and combiner. This was modeled with a interrupt-map within a subnode but can be expressed in an easier and more common way, directly in the node itself. Tested on Odroid XU (Exynos5410), Odroid HC1 (Exynos5422) and Arndale Octa (Exynos5420). Signed-off-by: Krzysztof Kozlowski commit 6f135430d221b8e1c6453321cad35f8fd00f143d Author: Krzysztof Kozlowski Date: Mon Sep 23 18:15:16 2019 +0200 ARM: dts: exynos: Remove MCT subnode for interrupt map on Exynos5250 Multi Core Timer node has interrupts routed to two different parents - GIC and combiner. This was modeled with a interrupt-map within a subnode but can be expressed in an easier and more common way, directly in the node itself. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski commit 55125ae92befec9a9013f52cf12d60cf36729e9c Author: Krzysztof Kozlowski Date: Mon Sep 23 18:15:14 2019 +0200 ARM: dts: exynos: Remove MCT subnode for interrupt map on Exynos4412 Multi Core Timer node has interrupts routed to two different parents - GIC and combiner. This was modeled with a interrupt-map within a subnode but can be expressed in an easier and more common way, directly in the node itself. Tested on Odroid U3 (Exynos4412). Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski commit d8304aa2ebc775db9caa9064d8ea911b18247206 Author: Krzysztof Kozlowski Date: Mon Sep 23 18:15:12 2019 +0200 ARM: dts: exynos: Remove MCT subnode for interrupt map on Exynos4210 Multi Core Timer node has interrupts routed to two different parents - GIC and combiner. This was modeled with a interrupt-map within a subnode but can be expressed in an easier and more common way, directly in the node itself. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski commit f859a03969a067f60a46699c6427ec087fdd2fce Author: Krzysztof Kozlowski Date: Mon Sep 23 18:15:07 2019 +0200 ARM: dts: exynos: Rename Multi Core Timer node to "timer" The device node name should reflect generic class of a device so rename the Multi Core Timer node from "mct" to "timer". This will be also in sync with upcoming DT schema. No functional change. Signed-off-by: Krzysztof Kozlowski commit 5b0e042989f4308db2cf9a07adeb72187a302c4e Author: Maciej Falkowski Date: Fri Sep 20 14:14:30 2019 +0200 ARM: dts: exynos: Split phandle in dmas property Change representation of phandle array as then dt-schema counts number of its items properly. Signed-off-by: Maciej Falkowski Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 937683dcb192ad1161b05ce9193a13730028613b Author: Maciej Falkowski Date: Thu Sep 19 15:45:47 2019 +0200 ARM: dts: exynos: Remove obsolete IRQ lines on Exynos3250 In commit 7222e8db2d50 ("iommu/exynos: Fix build errors") Exynos3250 IOMMU driver stopped supporting two IRQ lines. The second IRQ line in DTS is ignored and is not needed. Signed-off-by: Maciej Falkowski Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit f33e70cc7323d7d6c96993482a26623174702acf Author: Sylwester Nawrocki Date: Tue Sep 10 14:36:18 2019 +0200 ARM: dts: exynos: Add samsung,asv-bin property to Odroid XU3 Lite The Exynos5422 SoC used on Odroid XU3 Lite boards belongs to a special ASV bin but this information cannot be read from the Chip ID block registers. Add samsung,asv-bin property for XU3 Lite to ensure the ASV bin is properly determined. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit cdcce1ee977bda19bfe333a8f5ee1391ebb985e8 Author: Sylwester Nawrocki Date: Tue Sep 10 14:36:17 2019 +0200 ARM: dts: exynos: Add "syscon" compatible string to chipid node on Exynos5 The Chip ID block in addition to exact chip revision information contains data and control registers for ASV (Adaptive Supply Voltage) and ABB (Adaptive Body Bias). Add "syscon" compatible so the Chip ID block can be shared by respective drivers. Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit 9c8238b85c26f7cb349063ce3be9dd05c15c748c Author: Marek Szyprowski Date: Wed Aug 28 14:10:04 2019 +0200 ARM: dts: exynos: Add support ARM architected timers on Exynos5 All CortexA7/A15 based Exynos5 SoCs have ARM architected timers, so enable support for them directly in the base dtsi. None of the known firmware properly configures CNTFRQ arch timer register, so force clock frequency to 24MHz, which is the only configuration supported by the remaining clock drivers so far. Stock firmware for Peach Pit and Pi Chromebooks also doesn't reset properly other arch timer registers, so add respective properties indicating that. Other Exynos5-based boards behaves correctly in this area, what finally allows to enable support for KVM-based virtualization. Signed-off-by: Marek Szyprowski Tested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski commit 0fbae9d2db851e18ec413da2eba9d875269660e0 Author: Ville Syrjälä Date: Mon Jul 8 19:20:44 2019 +0300 drm/i915: Clean up encoder->crtc_mask setup Use BIT(pipe) for better legibility when populating the crtc_mask for encoders. Also remove the redundant possible_crtcs setup for the TV encoder. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190708162048.4286-11-ville.syrjala@linux.intel.com commit ed500bf61279c26bcaa5a9979543bc45883efddf Author: Ville Syrjälä Date: Mon Jul 8 19:20:42 2019 +0300 drm/i915: Populate possible_crtcs correctly Don't advertize non-exisiting crtcs in the encoder possible_crtcs bitmask. Reviewed-by: Dhinakaran Pandiyan Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190708162048.4286-9-ville.syrjala@linux.intel.com commit 3cbad5d7774953d36c09cca295e6b84e61b03ae7 Author: Chris Wilson Date: Wed Oct 2 13:30:14 2019 +0100 drm/i915/gem: Refactor tests on obj->ops->flags We repeat obj->ops->flags in our object checks, so pull that into its own little helper for clarity. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191002123014.1545-1-chris@chris-wilson.co.uk commit dfe324f34c53af095bfe54b322e1a338421a6b0e Author: Chris Wilson Date: Wed Oct 2 13:24:30 2019 +0100 drm/i915/selftests: Extract random_offset() for use with a prng For selftests, we desire repeatability and so prefer using a prng with known seed over true randomness. Extract random_offset() as a selftest utility that can take the prng state. Suggested-by: Matthew Auld Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191002122430.23205-1-chris@chris-wilson.co.uk commit 006e570128f413759b9df64b51bae79903679c9b Author: Ville Syrjälä Date: Mon Sep 30 21:30:45 2019 +0300 drm/i915: Fix g4x sprite scaling stride check with GTT remapping I forgot to update the g4x sprite scaling stride check when GTT remapping was introduced. The stride of the original framebuffer is irrelevant when remapping is used and instead we want to check the stride of the remapped view. Also drop the duplicate width_bytes check. We already check that a few lines earlier. Fixes: df79cf441910 ("drm/i915: Store the final plane stride in plane_state") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190930183045.662-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 15de0889b0c905a64d6f0fbc765a25d7899a560b Author: Ville Syrjälä Date: Tue Oct 1 18:46:29 2019 +0300 drm/i915: Polish intel_tv_mode_valid() Drop the tv_mode NULL check since intel_tv_mode_find() never actually returns NULL, and flip the condition around so that the MODE_OK case is at the end, which is customary to all the other .mode_valid() implementations. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191001154629.11063-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 74f1d78965ee16a2617d245fd1f7e40964c0d562 Author: Ville Syrjälä Date: Tue Oct 1 18:46:28 2019 +0300 drm/i915: Limit MST modes based on plane size too When adding the max plane size checks to the .mode_valid() hooks I naturally forgot about MST. Take care of that one as well. Cc: Manasi Navare Cc: Sean Paul Cc: José Roberto de Souza Cc: Maarten Lankhorst Fixes: 2d20411e25a3 ("drm/i915: Don't advertise modes that exceed the max plane size") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191001154629.11063-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 32f0a6ddc8c98a1aade2bf3d07c79d5d2c6ceb9a Author: Stanimir Varbanov Date: Tue Aug 13 12:25:08 2019 -0300 media: venus: Use on-chip interconnect API This aims to add a requests for bandwidth scaling depending on the resolution and framerate (macroblocks per second). The exact value of the requested bandwidth is get from a pre-calculated tables for encoder and decoder. Acked-by: Georgi Djakov Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit c690435ed07901737e5c007a65ec59f53b33eb71 Author: Loic Poulain Date: Wed Sep 11 11:45:59 2019 -0300 media: venus: core: Fix msm8996 frequency table In downstream driver, there are two frequency tables defined, one for the encoder and one for the decoder: /* Encoders / <972000 490000000 0x55555555>, / 4k UHD @ 30 / <489600 320000000 0x55555555>, / 1080p @ 60 / <244800 150000000 0x55555555>, / 1080p @ 30 / <108000 75000000 0x55555555>, / 720p @ 30 */ /* Decoders / <1944000 490000000 0xffffffff>, / 4k UHD @ 60 / < 972000 320000000 0xffffffff>, / 4k UHD @ 30 / < 489600 150000000 0xffffffff>, / 1080p @ 60 / < 244800 75000000 0xffffffff>; / 1080p @ 30 */ It shows that encoder always needs a higher clock than decoder. In current venus driver, the unified frequency table is aligned with the downstream decoder table which causes performance issues in encoding scenarios. Fix that by aligning frequency table on worst case (encoding). Signed-off-by: Loic Poulain Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit d8db0b36d888b6a5eb392f112dc156e694de2369 Author: Jani Nikula Date: Tue Sep 24 15:59:02 2019 +0300 drm/msm: use drm_debug_enabled() to check for debug categories Allow better abstraction of the drm_debug global variable in the future. No functional changes. v2: Move unlikely() to drm_debug_enabled() Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Rob Clark Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/c7142cdebb5f6fed527272b333cd6c43c0aa68ec.1569329774.git.jani.nikula@intel.com commit dee97f6ab4a991cd4e195074a97930f126b1eeec Author: Jani Nikula Date: Tue Sep 24 15:59:00 2019 +0300 drm/i2c/sil164: use drm_debug_enabled() to check for debug categories Allow better abstraction of the drm_debug global variable in the future. No functional changes. Cc: Francisco Jerez Reviewed-by: Francisco Jerez Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f6f65ca7e27e949533e8cd1f43c61ecac73c658e.1569329774.git.jani.nikula@intel.com commit 6511a945cf7d49357a60d5b7cd37beddc1301335 Author: Jani Nikula Date: Tue Sep 24 15:58:59 2019 +0300 drm/etnaviv: use drm_debug_enabled() to check for debug categories Allow better abstraction of the drm_debug global variable in the future. No functional changes. Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: etnaviv@lists.freedesktop.org Acked-by: Lucas Stach Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f202f2cdd7c3176649dadeb48a6da4b208e9e829.1569329774.git.jani.nikula@intel.com commit f0a8f533adc202f7dc83961c85187794eaed9cec Author: Jani Nikula Date: Tue Oct 1 17:06:14 2019 +0300 drm/print: add drm_debug_enabled() Add helper to check if a drm debug category is enabled. Convert drm core to use it. No functional changes. v2: Move unlikely() to drm_debug_enabled() (Eric) v3: Keep unlikely() when combined with other conditions (Eric) Cc: Eric Engestrom Acked-by: Alex Deucher Reviewed-by: Eric Engestrom Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191001140614.26909-1-jani.nikula@intel.com commit 959b077f26a16c663816f116af8063a170233a07 Author: Jani Nikula Date: Tue Sep 24 15:58:57 2019 +0300 drm/print: move drm_debug variable to drm_print.[ch] Move drm_debug variable declaration and definition to where they are relevant and needed. No functional changes. Acked-by: Alex Deucher Reviewed-by: Eric Engestrom Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/71a566c68883b6e6c61414cd9f7c36c84015edb1.1569329774.git.jani.nikula@intel.com commit 0e0e78e32e723a1ee48207a2ad091afb30f6f1c5 Author: Andreas Kemnade Date: Thu Sep 12 23:32:57 2019 +0200 backlight: lm3630a: Add an enable gpio for the HWEN pin For now just enable it in the probe function to allow I2C access. Disabling also means resetting the register values to default and according to the datasheet does not give power savings. Tested on Kobo Clara HD. Signed-off-by: Andreas Kemnade Reviewed-by: Dan Murphy Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit ae92365cdd759748b4b0671109f456a1bb7aa57d Author: Andreas Kemnade Date: Thu Sep 12 23:32:56 2019 +0200 dt-bindings: backlight: lm3630a: Add enable-gpios to describe HWEN pin Provide DT documentation for enable-gpios. Signed-off-by: Andreas Kemnade Acked-by: Daniel Thompson Reviewed-by: Rob Herring Reviewed-by: Dan Murphy Signed-off-by: Lee Jones commit 7050a7c3747787c3f9ba94df59eb7e9e018bbdf2 Author: Nishka Dasgupta Date: Tue Aug 13 14:28:55 2019 +0530 backlight: ipaq_micro: Make structure micro_bl_props constant Static structure micro_bl_props, having type backlight_properties, is used only once, when it is passed as the last argument to function devm_backlight_device_register(). devm_backlight_device_register() is defined with its last parameter being declared constant. Hence make micro_bl_props itself constant as well. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 8ad003e7348ecd59f457de9bbf06b30535d734f0 Author: Andreas Kemnade Date: Tue Sep 10 17:23:59 2019 +0200 backlight: lm3630a: Fix module aliases Devicetree aliases are missing, so that module autoloading does not work properly. Signed-off-by: Andreas Kemnade Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 3c0f9d8bcf47ed33f479cf9dc933d405020aefe4 Author: Vladimir Oltean Date: Tue Oct 1 23:52:16 2019 +0300 spi: spi-fsl-dspi: Always use the TCFQ devices in poll mode With this patch, the "interrupts" property from the device tree bindings is ignored, even if present, if the driver runs in TCFQ mode. Switching to using the DSPI in poll mode has several distinct benefits: - With interrupts, the DSPI driver in TCFQ mode raises an IRQ after each transmitted word. There is more time wasted for the "waitq" event than for actual I/O. And the DSPI IRQ count can easily get the largest in /proc/interrupts on Freescale boards with attached SPI devices. - The SPI I/O time is both lower, and more consistently so. Attached to some Freescale devices are either PTP switches, or SPI RTCs. For reading time off of a SPI slave device, it is important that all SPI transfers take a deterministic time to complete. - In poll mode there is much less time spent by the CPU in hardirq context, which helps with the response latency of the system, and at the same time there is more control over when interrupts must be disabled (to get a precise timestamp measurement, which will come in a future patch): win-win. On the LS1021A-TSN board, where the SPI device is a SJA1105 PTP switch (with a bits_per_word=8 driver), I created a "benchmark" where I periodically transferred a 12-byte message once per second, for 120 seconds. I then recorded the time before putting the first byte in the TX FIFO, and the time after reading the last byte from the RX FIFO. That is the transfer delay in nanoseconds. Interrupt mode: delay: min 125120 max 168320 mean 150286 std dev 17675.3 Poll mode: delay: min 69440 max 119040 mean 70312.9 std dev 8065.34 Both the mean latency and the standard deviation are more than 50% lower in poll mode than in interrupt mode, and the 'max' in poll mode is lower than the 'min' in interrupt mode. This is with an 'ondemand' governor on an otherwise idle system - therefore running mostly at 600 MHz out of a max of 1200 MHz. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20191001205216.32115-1-olteanv@gmail.com Signed-off-by: Mark Brown commit 87fd0db6d7df1cf4cc6e9b09e2155d1f324bf836 Author: Douglas Anderson Date: Tue Oct 1 12:45:54 2019 -0700 regulator: Document "regulator-boot-on" binding more thoroughly The description of "regulator-boot-on" was a little unclear, at least to me. Did this property mean that we should turn the regulator on at boot? Or perhaps it was intended only to be used for regulators where we couldn't read the state at bootup to indicate what state we should assume? The answer, it turns out, is both [1]. Let's document this. [1] https://lore.kernel.org/r/20190923181431.GU2036@sirena.org.uk Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191001124531.v2.1.Ice34ad5970a375c3c03cb15c3859b3ee501561bf@changeid Signed-off-by: Mark Brown commit dca6408d6f7e76045b5aaec44825cb87d9d1d6ce Author: Sylwester Nawrocki Date: Wed Oct 2 12:56:52 2019 +0200 ASoC: samsung: Rename Arndale card driver Rename arndale_rt5631.c to just arnddale.c as we support other CODECs than RT5631. While at it replace spaces in Kconfig with tabs. Reviewed-by: Charles Keepax Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20191002105652.24821-3-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit 03081cc370b9d0d91addbb163e2f5347a7f51571 Author: Sylwester Nawrocki Date: Wed Oct 2 12:56:51 2019 +0200 ASoC: samsung: arndale: Add support for WM1811 CODEC The Arndale boards come with different types of the audio daughter board. In order to support the WM1811 one we add new definition of an ASoC card which will be registered when the driver matches on "samsung,arndale-wm1811" compatible. There is no runtime detection of the audio daughter board type at the moment, compatible string of the audio card needs to be adjusted in DT, e.g. by the bootloader, depending on actual audio board (CODEC) used. Reviewed-by: Charles Keepax Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20191002105652.24821-2-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit aaa68472ed1fa763336335f1278d65fcddd0056e Author: Sylwester Nawrocki Date: Wed Oct 2 12:56:50 2019 +0200 ASoC: samsung: arndale: Simplify DAI link initialization There is only one DAI link so we can drop an unnecessary loop statement. Use card->dai_link in place of direct static arndale_rt5631_dai[] array dereference as a prerequisite for adding support for other CODECs. Unnecessary assignment of dai_link->codecs->name to NULL is removed. Reviewed-by: Charles Keepax Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20191002105652.24821-1-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit 25317997cbcd0497a9460f79c322e0fde0b5b1a9 Merge: 3a9e204d4e36 2bdf194e2030 Author: Mark Brown Date: Wed Oct 2 12:50:40 2019 +0100 Merge branch 'asoc-5.4' into asoc-5.5 commit 3055c92c7d4024d1fb540d0946e82c97235c8479 Author: Matthias Maennich Date: Wed Oct 2 12:03:12 2019 +0100 usb-storage: SCSI glue: use dev_err instead of printk Follow common practice and retire printk(KERN_ERR ...) in favor of dev_err(). Cc: Alan Stern Cc: Greg Kroah-Hartman Cc: usb-storage@lists.one-eyed-alien.net Signed-off-by: Matthias Maennich Link: https://lore.kernel.org/r/20191002110312.75749-1-maennich@google.com Signed-off-by: Greg Kroah-Hartman commit 4fb8783165b7c6fb4b52428dbb80da8554e5fd1e Author: Jani Nikula Date: Tue Oct 1 18:25:06 2019 +0300 drm/i915/display: abstract all vgaarb access to intel_vga.[ch] Split out the code related to vga client and vgaarb all over the place into new intel_vga.[ch]. No functional changes. Cc: Ville Syrjälä Cc: Chris Wilson Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191001152506.7854-1-jani.nikula@intel.com commit a4311745bba9763e3c965643d4531bd5765b0513 Author: Chris Wilson Date: Sat Sep 28 09:25:46 2019 +0100 drm/i915/userptr: Never allow userptr into the mappable GGTT Daniel Vetter uncovered a nasty cycle in using the mmu-notifiers to invalidate userptr objects which also happen to be pulled into GGTT mmaps. That is when we unbind the userptr object (on mmu invalidation), we revoke all CPU mmaps, which may then recurse into mmu invalidation. We looked for ways of breaking the cycle, but the revocation on invalidation is required and cannot be avoided. The only solution we could see was to not allow such GGTT bindings of userptr objects in the first place. In practice, no one really wants to use a GGTT mmapping of a CPU pointer... Just before Daniel's explosive lockdep patches land in v5.4-rc1, we got a genuine blip from CI: <4>[ 246.793958] ====================================================== <4>[ 246.793972] WARNING: possible circular locking dependency detected <4>[ 246.793989] 5.3.0-gbd6c56f50d15-drmtip_372+ #1 Tainted: G U <4>[ 246.794003] ------------------------------------------------------ <4>[ 246.794017] kswapd0/145 is trying to acquire lock: <4>[ 246.794030] 000000003f565be6 (&dev->struct_mutex/1){+.+.}, at: userptr_mn_invalidate_range_start+0x18f/0x220 [i915] <4>[ 246.794250] but task is already holding lock: <4>[ 246.794263] 000000001799cef9 (&anon_vma->rwsem){++++}, at: page_lock_anon_vma_read+0xe6/0x2a0 <4>[ 246.794291] which lock already depends on the new lock. <4>[ 246.794307] the existing dependency chain (in reverse order) is: <4>[ 246.794322] -> #3 (&anon_vma->rwsem){++++}: <4>[ 246.794344] down_write+0x33/0x70 <4>[ 246.794357] __vma_adjust+0x3d9/0x7b0 <4>[ 246.794370] __split_vma+0x16a/0x180 <4>[ 246.794385] mprotect_fixup+0x2a5/0x320 <4>[ 246.794399] do_mprotect_pkey+0x208/0x2e0 <4>[ 246.794413] __x64_sys_mprotect+0x16/0x20 <4>[ 246.794429] do_syscall_64+0x55/0x1c0 <4>[ 246.794443] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 246.794456] -> #2 (&mapping->i_mmap_rwsem){++++}: <4>[ 246.794478] down_write+0x33/0x70 <4>[ 246.794493] unmap_mapping_pages+0x48/0x130 <4>[ 246.794519] i915_vma_revoke_mmap+0x81/0x1b0 [i915] <4>[ 246.794519] i915_vma_unbind+0x11d/0x4a0 [i915] <4>[ 246.794519] i915_vma_destroy+0x31/0x300 [i915] <4>[ 246.794519] __i915_gem_free_objects+0xb8/0x4b0 [i915] <4>[ 246.794519] drm_file_free.part.0+0x1e6/0x290 <4>[ 246.794519] drm_release+0xa6/0xe0 <4>[ 246.794519] __fput+0xc2/0x250 <4>[ 246.794519] task_work_run+0x82/0xb0 <4>[ 246.794519] do_exit+0x35b/0xdb0 <4>[ 246.794519] do_group_exit+0x34/0xb0 <4>[ 246.794519] __x64_sys_exit_group+0xf/0x10 <4>[ 246.794519] do_syscall_64+0x55/0x1c0 <4>[ 246.794519] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 246.794519] -> #1 (&vm->mutex){+.+.}: <4>[ 246.794519] i915_gem_shrinker_taints_mutex+0x6d/0xe0 [i915] <4>[ 246.794519] i915_address_space_init+0x9f/0x160 [i915] <4>[ 246.794519] i915_ggtt_init_hw+0x55/0x170 [i915] <4>[ 246.794519] i915_driver_probe+0xc9f/0x1620 [i915] <4>[ 246.794519] i915_pci_probe+0x43/0x1b0 [i915] <4>[ 246.794519] pci_device_probe+0x9e/0x120 <4>[ 246.794519] really_probe+0xea/0x3d0 <4>[ 246.794519] driver_probe_device+0x10b/0x120 <4>[ 246.794519] device_driver_attach+0x4a/0x50 <4>[ 246.794519] __driver_attach+0x97/0x130 <4>[ 246.794519] bus_for_each_dev+0x74/0xc0 <4>[ 246.794519] bus_add_driver+0x13f/0x210 <4>[ 246.794519] driver_register+0x56/0xe0 <4>[ 246.794519] do_one_initcall+0x58/0x300 <4>[ 246.794519] do_init_module+0x56/0x1f6 <4>[ 246.794519] load_module+0x25bd/0x2a40 <4>[ 246.794519] __se_sys_finit_module+0xd3/0xf0 <4>[ 246.794519] do_syscall_64+0x55/0x1c0 <4>[ 246.794519] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 246.794519] -> #0 (&dev->struct_mutex/1){+.+.}: <4>[ 246.794519] __lock_acquire+0x15d8/0x1e90 <4>[ 246.794519] lock_acquire+0xa6/0x1c0 <4>[ 246.794519] __mutex_lock+0x9d/0x9b0 <4>[ 246.794519] userptr_mn_invalidate_range_start+0x18f/0x220 [i915] <4>[ 246.794519] __mmu_notifier_invalidate_range_start+0x85/0x110 <4>[ 246.794519] try_to_unmap_one+0x76b/0x860 <4>[ 246.794519] rmap_walk_anon+0x104/0x280 <4>[ 246.794519] try_to_unmap+0xc0/0xf0 <4>[ 246.794519] shrink_page_list+0x561/0xc10 <4>[ 246.794519] shrink_inactive_list+0x220/0x440 <4>[ 246.794519] shrink_node_memcg+0x36e/0x740 <4>[ 246.794519] shrink_node+0xcb/0x490 <4>[ 246.794519] balance_pgdat+0x241/0x580 <4>[ 246.794519] kswapd+0x16c/0x530 <4>[ 246.794519] kthread+0x119/0x130 <4>[ 246.794519] ret_from_fork+0x24/0x50 <4>[ 246.794519] other info that might help us debug this: <4>[ 246.794519] Chain exists of: &dev->struct_mutex/1 --> &mapping->i_mmap_rwsem --> &anon_vma->rwsem <4>[ 246.794519] Possible unsafe locking scenario: <4>[ 246.794519] CPU0 CPU1 <4>[ 246.794519] ---- ---- <4>[ 246.794519] lock(&anon_vma->rwsem); <4>[ 246.794519] lock(&mapping->i_mmap_rwsem); <4>[ 246.794519] lock(&anon_vma->rwsem); <4>[ 246.794519] lock(&dev->struct_mutex/1); <4>[ 246.794519] *** DEADLOCK *** v2: Say no to mmap_ioctl Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111744 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111870 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Daniel Vetter Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190928082546.3473-1-chris@chris-wilson.co.uk commit 834f65e18c82d10b781bee2ad207b590574eeaf9 Author: Jernej Skrabec Date: Tue Oct 1 22:06:56 2019 +0200 clk: sunxi-ng: h6: Allow GPU to change parent rate GPU PLL was designed with dynamic frequency switching in mind so driver can adjust rate based on the GPU load. Allow GPU clock to change parent rate (GPU PLL is the only possible parent of GPU clock). Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 04b3b72b5b8fdb883bfdc619cb29b03641b1cc6a Author: Robert Marko Date: Thu Aug 15 19:28:23 2019 +0200 ARM: dts: qcom: ipq4019: Add SDHCI controller node IPQ4019 has a built in SD/eMMC controller which is supported by the SDHCI MSM driver, by the "qcom,sdhci-msm-v4" binding. So lets add the appropriate node for it. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson commit 69d2d2531119338b8507d83eb4d7bf4c90f34636 Author: Srinivas Kandagatla Date: Thu Sep 12 10:10:56 2019 +0100 soc: qcom: socinfo: add sdm845 and sda845 soc ids This patch adds missing soc ids for sdm845 and sda845 Signed-off-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson commit 66e6a633910a8e046ffefa7753210c237868419f Author: Georgi Djakov Date: Tue Jul 23 17:23:36 2019 +0300 soc: qcom: smd-rpm: Create RPM interconnect proxy child device Register a platform device to handle the communication of bus bandwidth requests with the remote processor. The interconnect proxy device is part of this remote processor (RPM) hardware. Let's create a icc-smd-rpm proxy child device to represent the bus throughput functionality that is provided by the RPM. Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov Signed-off-by: Bjorn Andersson commit 99356b03b431f9589bbaec2bc5bacceccb3dd99a Author: Vivek Gautam Date: Thu Jul 18 18:32:38 2019 +0530 soc: qcom: Make llcc-qcom a generic driver This makes way for adding future llcc versions. Also pull out the llcc-qcom specific definitions from includes. Includes path now contains the only definitions that are to be exposed to other subsystems. Signed-off-by: Vivek Gautam Signed-off-by: Bjorn Andersson commit a0e72a5ba48ae9c6449a32130d74506a854b79d2 Author: Vivek Gautam Date: Thu Jul 18 18:32:37 2019 +0530 soc: qcom: Rename llcc-slice to llcc-qcom The cleaning up was done without changing the driver file name to ensure a cleaner bisect. Change the file name now to facilitate making the driver generic in subsequent patch. Signed-off-by: Vivek Gautam Signed-off-by: Bjorn Andersson commit a14b820316e84310b1bad3701a8d4c9159377633 Author: Vivek Gautam Date: Thu Jul 18 18:32:36 2019 +0530 soc: qcom: llcc cleanup to get rid of sdm845 specific driver file A single file should suffice the need to program the llcc for various platforms. Get rid of sdm845 specific driver file to make way for a more generic driver. Signed-off-by: Vivek Gautam Signed-off-by: Bjorn Andersson commit 10e99d4754e94008d24e1071093d8b93c30657b1 Author: Stephen Boyd Date: Thu Aug 29 22:59:23 2019 -0700 arm64: dts: qcom: sdm845: Use UFS reset gpio instead of pinctrl We use a pinctrl "workaround" to toggle the UFS reset line. Now that UFS controller can issue the reset, just specify the line as a GPIO and let it be reset that way. Signed-off-by: Stephen Boyd Signed-off-by: Bjorn Andersson commit 668c7603f011b6e1a07616c8cb9bbbe4229cbb07 Author: Georgi Djakov Date: Tue Jul 23 17:23:39 2019 +0300 arm64: dts: qcs404: Add interconnect provider DT nodes Add the DT nodes for the network-on-chip interconnect buses found on qcs404-based platforms. Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov Signed-off-by: Bjorn Andersson commit 0d7051999175f97dfb1aa32e9008f08bf044a0a7 Author: Stephan Gerhold Date: Thu Aug 22 13:23:39 2019 +0200 arm64: dts: msm8916-samsung-a5u: Override iris compatible msm8916.dtsi sets the iris compatible to "qcom,wcn3620". While WCN3620 seems to be used on most MSM8916 devices, MSM8916 can also be paired with another chip (e.g. for WiFi dual-band). A5U uses WCN3660B instead, so the compatible needs to be overridden to apply the correct configuration. However, simply using "qcom,wcn3660" would be incorrect, since WCN3660B requires a slightly different regulator configuration compared to WCN3660. Instead, it requires the same configuration as "qcom,wcn3680". Replace the compatible with "qcom,wcn3680" for A5U to make WCNSS work correctly. Signed-off-by: Stephan Gerhold Signed-off-by: Bjorn Andersson commit efb9e0df7d8df9f6ccc4a02a52e56fb6e379e193 Author: Stephan Gerhold Date: Thu Aug 22 13:23:38 2019 +0200 arm64: dts: msm8916-samsung-a2015: Enable WCNSS for WiFi and BT WCNSS is used on A3U and A5U for WiFi and BT, and seems to work fine without further changes. Enable it in the common include. Signed-off-by: Stephan Gerhold Signed-off-by: Bjorn Andersson commit 8a250aa6eccdd54aebc62165c0c1fe250fee0338 Author: Jorge Ramirez-Ortiz Date: Thu Aug 29 22:03:40 2019 +0200 arm64: dts: qcom: qcs404: add the watchdog node Allows QCS404 based designs to enable watchdog support Reviewed-by: Stephen Boyd Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Bjorn Andersson commit 10c71fd1c688d92ed0ca12dbb7e7069d9a2d451f Author: Jorge Ramirez-Ortiz Date: Thu Aug 29 22:03:39 2019 +0200 arm64: dts: qcom: qcs404: add sleep clk fixed rate oscillator This fixed rate clock is required for the operation of some devices (ie watchdog). Reviewed-by: Stephen Boyd Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Bjorn Andersson commit 4a50d454502f1401171ff061a5424583f91266db Author: Dan Carpenter Date: Tue Oct 1 14:45:01 2019 +0300 cw1200: Fix a signedness bug in cw1200_load_firmware() The "priv->hw_type" is an enum and in this context GCC will treat it as an unsigned int so the error handling will never trigger. Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit bcde60e599fb044744b4e379ab74ea323a75ce5e Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:28 2019 +0800 rtw88: remove misleading module parameter rtw_fw_support_lps The module parameter rtw_fw_support_lps is misleading. It is not used to represent the firmware's property, but to determine if driver wants to ask firmware to enter LPS. However, driver should better enable/disable PS through cfg80211_ops::set_power_mgmt instead. For example, one could use iw command to set PS state. $ sudo iw wlanX set power_save [on/off] So rtw_fw_support_lps should be removed because it is misleading and useless. Instead of checking the parameter, set PS mode according to IEEE80211_CONF_PS. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 04b786e00987c5495dd9a374deb9c9d7f650a9da Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:27 2019 +0800 rtw88: add deep PS PG mode for 8822c Compare with LCLK mode, PG mode saves more power, by turning off more circuits. Therefore, to recover from PG mode, driver needs to backup some information into rsvd page. Such as CAM entries, DPK results. As CAM entries can change, it is required to re-download CAM entries after set_key. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit d3be4d115be05b1b4323286bc69de9e577fc9a0f Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:26 2019 +0800 rtw88: select deep PS mode when module is inserted Add a module parameter to select deep PS mode. And the mode cannot be changed after the module has been inserted and probed. If anyone wants to change the deep mode, should change the mode and probe the device again to setup the changed deep mode. When the device is probed, driver will check the deep PS mode with different IC's PS mode suppotability. If none of the PS mode is matched, the deep PS mode is changed to NONE, means deep PS is disabled. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 3a068a2a65859764198fa606aa9b287fc4fe1f03 Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:25 2019 +0800 rtw88: not to enter LPS by coex strategy Sometimes LPS is not compatible with COEX's strategy, and COEX will not allow driver to enter it. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 27e117e4b01b5e699a40a3891b4f6924f99011d7 Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:24 2019 +0800 rtw88: add deep power save support Deep power save allows firmware/hardware to operate in a lower power state. And the deep power save mode depends on LPS mode. So, before entering deep PS, driver must first enter LPS mode. Under Deep PS, most of hardware functions are shutdown, driver will not be able to read/write registers and transfer data to the device. Hence TX path must be protected by each interface. Take PCI for example, DMA engine should be idle, and no nore activities on the PCI bus. If driver wants to operate on the device, such as register read/write, it must first acquire the mutex lock and wake up from Deep PS, otherwise the behavior is undefined. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 37ba5de2e731afbfe606d7192a8aeba625abdaba Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:23 2019 +0800 rtw88: leave PS state for dynamic mechanism Dynamic mechanism requires BB/RF working to adjust hardware settings. But PS state periodically turns off BB/RF, could lead to wrong setting. So leave PS state before DM to make sure it works. And then check if we can enter PS state again. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit d3e20fd17d0b6891a3b6f598abad38da2ab6a70f Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:22 2019 +0800 rtw88: LPS enter/leave should be protected by lock Protect LPS enter/leave routine with rtwdev->mutex. This helps to synchronize with driver's states correctly. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 5235d63640c60ad5384310bd88ce0a6d8f87179e Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:21 2019 +0800 rtw88: remove unused lps state check helper This is no more used, remove it. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 3d391c06d917a18f846aa2a0ab155cb6c92ca6ea Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:20 2019 +0800 rtw88: not to control LPS by each vif The original design of LPS enter/leave routines allows to control the LPS state by each interface. But the hardware cannot actually handle it that way. This means the hardware can only enter LPS once with an associated port, so there is no need to keep tracking the state of each vif. Hence the logic of enter/leave LPS state can be simple, just to check the state of the device's flag. And for leaving LPS state, it will get the same port id to send to inform the hardware. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 61d7309562b51e9600f69ca70f9edf71f841fee7 Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:19 2019 +0800 rtw88: not to enter or leave PS under IRQ Remove PS related *_irqsafe functions to avoid entering/leaving PS under interrupt context. Instead, make PS decision in watch_dog. This could simplify the logic and make the code look clean. But it could have a little side-effect that if the driver is having heavy traffic before the every-2-second watch_dog detect the traffic and decide to leave PS, the thoughput will be lower. Once traffic is detected by watch_dog and left PS state, the throughput will resume to the peak the hardware ought to have again. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 6f0b0d28fde849a404f4b307887405e326866e11 Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:18 2019 +0800 rtw88: pci: reset H2C queue indexes in a single write If the driver doesn't reset the host's and device's indexes in a single write, the indexes will become different in a short period. And it will confuse the DMA engine, make it start to process non-existed entries. Better to Write-1-to-reset the indexes, for the DMA engine to know that this is a reset of the H2C queue, not a kick off. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 3c519605850890160848a89690056afa204d0ef6 Author: Yan-Hsuan Chuang Date: Wed Oct 2 10:31:17 2019 +0800 rtw88: remove redundant flag check helper function These helper functions seems useless. And in some cases we want to use test_and_[set/clear]_bit, these helpers will make the code more complicated. So remove them. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 66070e86878cc62d8b7e80c1729c4de6bd1b222c Author: zhengbin Date: Mon Sep 30 16:54:52 2019 +0800 rtlwifi: rtl8723be: Remove set but not used variables 'reg_ecc','reg_eac' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c: In function rtl8723be_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c:2255:7: warning: variable reg_ecc set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c: In function rtl8723be_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c:2254:34: warning: variable reg_eac set but not used [-Wunused-but-set-variable] They are not used since commit a619d1abe20c ("rtlwifi: rtl8723be: Add new driver") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 533e3de4120566bb90b6193aae7a6c15e26cc4fd Author: zhengbin Date: Mon Sep 30 16:54:51 2019 +0800 rtlwifi: rtl8192ee: Remove set but not used variables 'reg_ecc','reg_eac' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c: In function rtl92ee_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c:2805:34: warning: variable reg_ecc set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c: In function rtl92ee_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c:2804:34: warning: variable reg_eac set but not used [-Wunused-but-set-variable] They are not used since commit b1a3bfc97cd9 ("rtlwifi: rtl8192ee: Move driver from staging to the regular tree") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 4a26e11500b85198d54147a82fb44dd9b647bd93 Author: zhengbin Date: Mon Sep 30 16:54:50 2019 +0800 rtlwifi: rtl8192ee: Remove set but not used variables 'short_gi','buf_len' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c: In function rtl92ee_tx_fill_desc: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c:656:5: warning: variable short_gi set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c: In function rtl92ee_tx_fill_desc: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c:648:15: warning: variable buf_len set but not used [-Wunused-but-set-variable] They are not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 70906d941ccd54c6bf419ea20b240c06753e0956 Author: zhengbin Date: Mon Sep 30 16:54:48 2019 +0800 rtlwifi: Remove set but not used variables 'dataempty','hoffset' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/efuse.c: In function efuse_pg_packet_write: drivers/net/wireless/realtek/rtlwifi/efuse.c:937:24: warning: variable dataempty set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/efuse.c: In function efuse_get_current_size: drivers/net/wireless/realtek/rtlwifi/efuse.c:1202:5: warning: variable hoffset set but not used [-Wunused-but-set-variable] They are not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 4010758eb082467509c4e95e3c0bec57b1dec3d9 Author: zhengbin Date: Mon Sep 30 16:54:47 2019 +0800 rtlwifi: Remove set but not used variable 'rtstate' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/ps.c: In function rtl_ps_set_rf_state: drivers/net/wireless/realtek/rtlwifi/ps.c:71:19: warning: variable rtstate set but not used [-Wunused-but-set-variable] It is not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c Author: Navid Emamdoost Date: Thu Sep 19 22:00:41 2019 -0500 rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit ab8c31dd8c8accea11bd59075bca711579512adc Author: Fuqian Huang Date: Thu Jul 4 00:29:34 2019 +0800 net/wireless: Use kmemdup rather than duplicating its implementation kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang Signed-off-by: Kalle Valo commit c01ebd6c46980654220f6d2b660308a074ee29df Author: Prashant Malani Date: Mon Sep 30 12:38:18 2019 -0700 r8152: Use guard clause and fix comment typos Use a guard clause in tx_bottom() to reduce the indentation of the do-while loop. Also, fix a couple of spelling and grammatical mistakes in the r8152_csum_workaround() function comment. Change-Id: I460befde150ad92248fd85b0f189ec2df2ab8431 Signed-off-by: Prashant Malani Reviewed-by: Grant Grundler Acked-by: Hayes Wang Signed-off-by: David S. Miller commit a786ab36ae6f486d59e05cd5570319508d23477e Author: Matias Ezequiel Vara Larsen Date: Mon Sep 30 18:25:23 2019 +0000 vsock/virtio: add support for MSG_PEEK This patch adds support for MSG_PEEK. In such a case, packets are not removed from the rx_queue and credit updates are not sent. Signed-off-by: Matias Ezequiel Vara Larsen Reviewed-by: Stefano Garzarella Tested-by: Stefano Garzarella Signed-off-by: David S. Miller commit 257e61505088cf9edcf4fb69522cadc6ec279cae Author: Markus Kueffner Date: Sat Apr 13 15:19:36 2019 +0200 ARM: dts: imx6qdl-udoo: Add Pincfgs for OTG Add Pincfgs to enable the i.MX6's OTG feature for UDOO Signed-off-by: Markus Kueffner Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 1c7e11baddffb186c6dd3200ce6e1955ecb8671b Author: Philippe Schenker Date: Tue Aug 27 13:18:40 2019 +0000 ARM: dts: imx6ull-colibri: Add general wakeup key used on Colibri This adds the possibility to wake the module with an external signal as defined in the Colibri standard Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit 242bab2dd46d5f83f8b356ee507df7e3d0b2e04e Author: Max Krummenacher Date: Tue Aug 27 13:18:38 2019 +0000 ARM: dts: imx6ull: improve can templates Add the pinmuxing and a inactive node for flexcan1 on SODIMM 55/63 and move the inactive flexcan nodes to imx6ull-colibri-eval-v3.dtsi where they belong. Note that this commit does not enable flexcan functionality, but rather eases the effort needed to do so. Signed-off-by: Max Krummenacher Signed-off-by: Philippe Schenker Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit 92cede44bc4e2434b1bc802188d0dd047d5b8689 Author: Philippe Schenker Date: Tue Aug 27 13:18:36 2019 +0000 ARM: dts: imx6ull-colibri: Add watchdog This patch adds the watchdog to the imx6ull-colibri devicetree Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 691b82175457ab20e8f9c3026874fed38bed24a1 Author: Max Krummenacher Date: Tue Aug 27 13:18:34 2019 +0000 ARM: dts: imx6ull-colibri: reduce v_batt current in power off Reduce the current drawn from VCC_BATT when the main power on the 3V3 pins to the module are switched off. This switches off SoC internal pull resistors which are provided on the module for TAMPER7 and TAMPER9 SoC pin and switches on a pull down instead of a pullup for the USBC_DET module pin (TAMPER2). Signed-off-by: Max Krummenacher Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit 47e45faf01cc348ca725c45443451aeef32400a9 Author: Philippe Schenker Date: Tue Aug 27 13:18:32 2019 +0000 ARM: dts: imx6ull-colibri: Add sleep mode to fec Do not change the clock as the power for this phy is switched with that clock. Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit ab2b870a5db31a9b9b5cbf949f1acbea4bdee70f Author: Philippe Schenker Date: Tue Aug 27 13:18:30 2019 +0000 ARM: dts: imx6-colibri: Add missing pinmuxing to Toradex eval board This patch adds some missing pinmuxing that is in the colibri standard to the dts. Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit 24ffaa23cec6e12663633271056c3ba49c291802 Author: Philippe Schenker Date: Tue Aug 27 13:18:28 2019 +0000 ARM: dts: imx6-apalis: Add touchscreens used on Toradex eval boards This commit adds the touchscreen from Toradex so one can enable it. It is disabled by default because the pins are also used for PWM, PWM, aka pwm2, pwm3 which is the standard use for colibri boards. Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit e01f0fe3136bd75b0e9ecb5dd453c0d9826a9005 Author: Philippe Schenker Date: Tue Aug 27 13:18:27 2019 +0000 ARM: dts: imx6qdl-apalis: Add sleep state to can interfaces This patch prepares the devicetree for the new Ixora V1.2 where we are able to turn off the supply of the can transceiver. This implies to use a sleep state on transmission pins in order to prevent backfeeding. Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 3dddbfe64dc325f5c2472c7d4186aeacf29f7fef Author: Philippe Schenker Date: Tue Aug 27 13:18:24 2019 +0000 ARM: dts: imx6qdl-colibri: Add missing pin declaration in iomuxc This adds the muxing for the optional pins usb-oc (overcurrent) and usb-id. Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit e512cef81a93de88967d8862f0d6286047f6a226 Author: Philippe Schenker Date: Tue Aug 27 13:18:22 2019 +0000 ARM: dts: imx7-colibri: Add touch controllers Add touch controller that is connected over an I2C bus. It is disabled by default because the pins are also used for PWM, which is the standard use for colibri boards. Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit bde07b1ede64b7f2ea76c0b2fee02376ca93b9ba Author: Stefan Agner Date: Tue Aug 27 13:18:20 2019 +0000 ARM: dts: imx7-colibri: fix 1.8V/UHS support Add pinmuxing and do not specify voltage restrictions for the usdhc instance available on the modules edge connector. This allows to use SD-cards with higher transfer modes if supported by the carrier board. Signed-off-by: Stefan Agner Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 18559363b1c77c7db597de9515a26c1a95844221 Author: Stefan Agner Date: Tue Aug 27 13:18:18 2019 +0000 ARM: dts: imx7-colibri: add GPIO wakeup key Add wakeup GPIO key which is able to wake the system from sleep modes (e.g. Suspend-to-Memory). Signed-off-by: Stefan Agner Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 3050e4e21f21183c5e1b8a323c4fa3859d3eff80 Author: Fancy Fang Date: Fri Aug 23 00:37:30 2019 +0000 ARM: dts: imx7ulp: remove mipi pll clock node According to the IMX7ULP reference manual, the mipi pll clock comes from the MIPI PHY PLL output. So it should not be defined as a fixed clock. So remove this clock node and all the references to it. Signed-off-by: Fancy Fang Signed-off-by: Shawn Guo commit 502d161f7258c50a73d6c12b779f648851d8cb53 Author: Andrey Smirnov Date: Mon Aug 19 20:13:01 2019 -0700 ARM: dts: vf610-zii-scu4-aib: Drop "rs485-rts-delay" property LPUART driver does not support specifying "rs485-rts-delay" property. Drop it. Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Chris Healy Cc: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit 5460ab061e7a127c84622a5189bce7aebc921dea Author: Sébastien Szymanski Date: Wed Jul 24 14:06:22 2019 +0200 ARM: dts: opos6ul/opos6uldev: rework device tree to support i.MX6ULL Rework the device trees of the OPOS6UL and OPOS6ULDev boards to support the OPOS6UL SoM with an i.MX6ULL SoC. The device trees are now as following: - imx6ul-imx6ull-opos6ul.dtsi common for both i.MX6UL and i.MX6ULL OPOS6UL SoM. - imx6ul-opos6ul.dtsi for i.MX6UL OPOS6UL SoM. It includes imx6ul.dtsi and imx6ul-imx6ull-opos6ul.dtsi. - imx6ull-opos6ul.dtsi for i.MX6ULL OPOS6UL SoM. It includes imx6ull.dtsi and imx6ul-imx6ull-opos6ul.dtsi. - imx6ul-imx6ull-opos6uldev.dtsi OPOS6ULDev base device tree. - imx6ul-opos6uldev.dts OPOS6ULDev board with an i.MX6UL OPOS6UL SoM. It includes imx6ul-opos6ul.dtsi and imx6ul-imx6ull-opos6uldevdtsi. - imx6ull-opos6uldev.dts OPOS6ULDev board with an i.MX6ULL OPOS6UL SoM. It includes imx6ull-opos6ul.dtsi and imx6ul-imx6ull-opos6uldevdtsi. Signed-off-by: Sébastien Szymanski Signed-off-by: Shawn Guo commit 678799194a5311765263b6aa940910ab232767eb Author: Johan Hovold Date: Mon Sep 30 17:12:41 2019 +0200 hso: fix NULL-deref on tty open Fix NULL-pointer dereference on tty open due to a failure to handle a missing interrupt-in endpoint when probing modem ports: BUG: kernel NULL pointer dereference, address: 0000000000000006 ... RIP: 0010:tiocmget_submit_urb+0x1c/0xe0 [hso] ... Call Trace: hso_start_serial_device+0xdc/0x140 [hso] hso_serial_open+0x118/0x1b0 [hso] tty_open+0xf1/0x490 Fixes: 542f54823614 ("tty: Modem functions for the HSO driver") Signed-off-by: Johan Hovold Signed-off-by: David S. Miller commit 3d735471d066d7e3ea95c73000edb71c85b6d51f Author: Sébastien Szymanski Date: Wed Jul 24 14:06:23 2019 +0200 dt-bindings: arm: Document Armadeus SoM and Dev boards devicetree binding Document the following Armadeus SoM and Dev boards devicetree binding already supported: - armadeus,imx27-apf27 and armadeus,imx27-apf27dev - armadeus,imx28-apf28 and armadeus,imx28-apf28dev - armadeus,imx51-apf51 and armadeus,imx51-apf51dev - armadeus,imx6{q,dl}-apf6 and armadeus,imx{q,dl}-apf6dev - armadeus,imx6{ul,ull}-opos6ul and armadeus,imx{ul,ull}-opos6uldev Signed-off-by: Sébastien Szymanski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 7e5705c635ecfccde559ebbbe1eaf05b5cc60529 Author: Nathan Chancellor Date: Fri Sep 27 09:26:42 2019 -0700 tools/power/cpupower: Fix initializer override in hsw_ext_cstates When building cpupower with clang, the following warning appears: utils/idle_monitor/hsw_ext_idle.c:42:16: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] .desc = N_("Processor Package C2"), ^~~~~~~~~~~~~~~~~~~~~~ ./utils/helpers/helpers.h:25:33: note: expanded from macro 'N_' #define N_(String) gettext_noop(String) ^~~~~~ ./utils/helpers/helpers.h:23:30: note: expanded from macro 'gettext_noop' #define gettext_noop(String) String ^~~~~~ utils/idle_monitor/hsw_ext_idle.c:41:16: note: previous initialization is here .desc = N_("Processor Package C9"), ^~~~~~~~~~~~~~~~~~~~~~ ./utils/helpers/helpers.h:25:33: note: expanded from macro 'N_' #define N_(String) gettext_noop(String) ^~~~~~ ./utils/helpers/helpers.h:23:30: note: expanded from macro 'gettext_noop' #define gettext_noop(String) String ^~~~~~ 1 warning generated. This appears to be a copy and paste or merge mistake because the name and id fields both have PC9 in them, not PC2. Remove the second assignment to fix the warning. Fixes: 7ee767b69b68 ("cpupower: Add Haswell family 0x45 specific idle monitor to show PC8,9,10 states") Link: https://github.com/ClangBuiltLinux/linux/issues/718 Signed-off-by: Nathan Chancellor Signed-off-by: Shuah Khan commit 03bd4773d898783fe3bc321287e4838e515fea92 Author: Andrii Nakryiko Date: Mon Sep 30 15:25:03 2019 -0700 libbpf: Bump current version to v0.0.6 New release cycle started, let's bump to v0.0.6 proactively. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20190930222503.519782-1-andriin@fb.com commit 37a2fce0900119bd5e8b2989970578a34584da97 Author: Simon Horman Date: Mon Sep 30 16:03:52 2019 +0200 dt-bindings: sh_eth convert bindings to json-schema Convert Renesas Electronics SH EtherMAC bindings documentation to json-schema. Also name bindings documentation file according to the compat string being documented. Signed-off-by: Simon Horman Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 9fb137aef34e4eedaa23307d309b0ebe8358fea1 Author: Peter Fink Date: Mon Sep 30 14:04:03 2019 +0200 net: usb: ax88179_178a: allow optionally getting mac address from device tree Adopt and integrate the feature to pass the MAC address via device tree from asix_device.c (03fc5d4) also to other ax88179 based asix chips. E.g. the bootloader fills in local-mac-address and the driver will then pick up and use this MAC address. Signed-off-by: Peter Fink Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0d7982ce6e3a683f55def32262c9fee2b87ec8e6 Author: Nicolas Dichtel Date: Mon Sep 30 14:02:16 2019 +0200 ipv6: minor code reorg in inet6_fill_ifla6_attrs() Just put related code together to ease code reading: the memcpy() is related to the nla_reserve(). Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 7a56493f0620cc1b4cffc9bc59289fdefe76b5f3 Merge: be2644aac3e1 76c9ac0ee878 Author: David S. Miller Date: Tue Oct 1 14:47:19 2019 -0700 Merge branch 'netdev-altnames' Jiri Pirko says: ==================== net: introduce alternative names for network interfaces In the past, there was repeatedly discussed the IFNAMSIZ (16) limit for netdevice name length. Now when we have PF and VF representors with port names like "pfXvfY", it became quite common to hit this limit: 0123456789012345 enp131s0f1npf0vf6 enp131s0f1npf0vf22 Udev cannot rename these interfaces out-of-the-box and user needs to create custom rules to handle them. Also, udev has multiple schemes of netdev names. From udev code: * Type of names: * b - BCMA bus core number * c - bus id of a grouped CCW or CCW device, * with all leading zeros stripped [s390] * o[n|d] * - on-board device index number * s[f][n|d] * - hotplug slot index number * x - MAC address * [P]ps[f][n|d] * - PCI geographical location * [P]ps[f][u][..][c][i] * - USB port number chain * v - VIO slot number (IBM PowerVM) * ai - Platform bus ACPI instance id * in - Netdevsim bus address and port name One device can be often renamed by multiple patterns at the same time (e.g. pci address/mac). This patchset introduces alternative names for network interfaces. Main goal is to: 1) Overcome the IFNAMSIZ limitation (altname limitation is 128 bytes) 2) Allow to have multiple names at the same time (multiple udev patterns) 3) Allow to use alternative names as handle for commands The patchset introduces two new commands to add/delete list of properties. Currently only alternative names are implemented but the ifrastructure could be easily extended later on. This is very similar to the list of vlan and tunnels being added/deleted to/from bridge ports. See following examples. $ ip link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: dummy0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff -> Add alternative names for dummy0: $ ip link prop add dummy0 altname someothername $ ip link prop add dummy0 altname someotherveryveryveryverylongname $ ip link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: dummy0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff altname someothername altname someotherveryveryveryverylongname $ ip link show someotherveryveryveryverylongname 2: dummy0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff altname someothername altname someotherveryveryveryverylongname -> Add bridge brx, add it's alternative name and use alternative names to do enslavement. $ ip link add name brx type bridge $ ip link prop add brx altname mypersonalsuperspecialbridge $ ip link set someotherveryveryveryverylongname master mypersonalsuperspecialbridge $ ip link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: dummy0: mtu 1500 qdisc noop master brx state DOWN mode DEFAULT group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff altname someothername altname someotherveryveryveryverylongname 3: brx: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff altname mypersonalsuperspecialbridge -> Add ipv4 address to the bridge using alternative name: $ ip addr add 192.168.0.1/24 dev mypersonalsuperspecialbridge $ ip addr show mypersonalsuperspecialbridge 3: brx: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff altname mypersonalsuperspecialbridge inet 192.168.0.1/24 scope global brx valid_lft forever preferred_lft forever -> Delete one of dummy0 alternative names: $ ip link prop del dummy0 altname someotherveryveryveryverylongname $ ip link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: dummy0: mtu 1500 qdisc noop master brx state DOWN mode DEFAULT group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff altname someothername 3: brx: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff altname mypersonalsuperspecialbridge -> Add multiple alternative names at once $ ip link prop add dummy0 altname a altname b altname c altname d $ ip link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: dummy0: mtu 1500 qdisc noop master brx state DOWN mode DEFAULT group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff altname someothername altname a altname b altname c altname d 3: brx: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff altname mypersonalsuperspecialbridge ==================== Signed-off-by: David S. Miller commit 76c9ac0ee878f6693d398d3a95ccaf85e1f597a6 Author: Jiri Pirko Date: Mon Sep 30 11:48:20 2019 +0200 net: rtnetlink: add possibility to use alternative names as message handle Extend the basic rtnetlink commands to use alternative interface names as a handle instead of ifindex and ifname. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit cc6090e985d7d62bf2f1230c507d5fbe9899c9ec Author: Jiri Pirko Date: Mon Sep 30 11:48:19 2019 +0200 net: rtnetlink: introduce helper to get net_device instance by ifname Introduce helper function rtnl_get_dev() that gets net_device structure instance pointer according to passed ifname or ifname attribute. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 7af12cba4ef0caf20bddf84f90509e71006d5408 Author: Jiri Pirko Date: Mon Sep 30 11:48:18 2019 +0200 net: rtnetlink: unify the code in __rtnl_newlink get dev with the rest __rtnl_newlink() code flow is a bit different around tb[IFLA_IFNAME] processing comparing to the other places. Change that to be unified with the rest. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 88f4fb0c7496a13b887bdc5052e3aabe3e4dcc5f Author: Jiri Pirko Date: Mon Sep 30 11:48:17 2019 +0200 net: rtnetlink: put alternative names to getlink message Extend exiting getlink info message with list of properties. Now the only ones are alternative names. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 36fbf1e52bd3ff8a5cb604955eedfc9350c2e6cc Author: Jiri Pirko Date: Mon Sep 30 11:48:16 2019 +0200 net: rtnetlink: add linkprop commands to add and delete alternative ifnames Add two commands to add and delete list of link properties. Implement the first property type along - alternative ifnames. Each net device can have multiple alternative names. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit ff92741270bf8b6e78aa885f166b68c7a67ab13a Author: Jiri Pirko Date: Mon Sep 30 11:48:15 2019 +0200 net: introduce name_node struct to be used in hashlist Introduce name_node structure to hold name of device and put it into hashlist instead of putting there struct net_device directly. Add a necessary infrastructure to manipulate the hashlist. This prepares the code to use the same hashlist for alternative names introduced later in this set. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 6958c97a488c69c2421760e4b73834fb63d6a935 Author: Jiri Pirko Date: Mon Sep 30 11:48:14 2019 +0200 net: procfs: use index hashlist instead of name hashlist Name hashlist is going to be used for more than just dev->name, so use rather index hashlist for iteration over net_device instances. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 503e59365dd134b2c63864f14e2de0476284b003 Author: Benoit Parrot Date: Mon Sep 30 10:06:44 2019 -0300 media: i2c: ov2659: Switch to SPDX Licensing Switch to SPDX licensing and drop the redundant GPL text. Signed-off-by: Benoit Parrot Acked-by: Lad, Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9d669fbfca20e6035ead814e55d9ef1a6b500540 Author: Benoit Parrot Date: Mon Sep 30 10:06:43 2019 -0300 media: i2c: ov2659: Fix missing 720p register config The initial registers sequence is only loaded at probe time. Afterward only the resolution and format specific register are modified. Care must be taken to make sure registers modified by one resolution setting are reverted back when another resolution is programmed. This was not done properly for the 720p case. Signed-off-by: Benoit Parrot Acked-by: Lad, Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2b4a07a0dd336430097c410af33f342fb7931e42 Author: Benoit Parrot Date: Mon Sep 30 10:06:42 2019 -0300 media: i2c: ov2659: Add powerdown/reset gpio handling On some board it is possible that the sensor 'powerdown' and or 'reset' pin might be controlled by gpio instead of being tied. To implement we add pm_runtime support which will handle the power up/down sequence when it is available otherwise the sensor will be powered on at module insertion/probe and powered off at module removal. Now originally the driver assumed that the sensor would always stay powered and keep its register setting. We cannot assume this anymore, so every time we "power up" we need to re-program the initial registers configuration first. This was previously done only at probe time. [Sakari Ailus: Resolve a conflict in Kconfig] Signed-off-by: Benoit Parrot Acked-by: Lad, Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 341f0960a87cad249c175a93bee4f27f4ab0b1af Author: Benoit Parrot Date: Mon Sep 30 10:06:41 2019 -0300 media: dt-bindings: ov2659: add powerdown/reset-gpios optional property Add powerdown-gpios and reset-gpios to the list of optional properties for the OV2659 camera sensor. Signed-off-by: Benoit Parrot Acked-by: Lad, Prabhakar Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 85c4043f1d403c222d481dfc91846227d66663fb Author: Benoit Parrot Date: Mon Sep 30 10:06:40 2019 -0300 media: i2c: ov2659: fix s_stream return value In ov2659_s_stream() return value for invoked function should be checked and propagated. Signed-off-by: Benoit Parrot Acked-by: Lad, Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 72da0419e62e2f42eb5afef8e7f83a79d4553756 Author: Benoit Parrot Date: Mon Sep 30 10:06:39 2019 -0300 media: i2c: ov2659: Cleanup include file list Several of include files listed are not explicitly needed. If they are need then they are implicitly included. Reduce the list of includes to an easier to manage list. Signed-off-by: Benoit Parrot Acked-by: Lad, Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1bc06fdbdf540b99db45b4e32669822a8a1d6870 Author: Benoit Parrot Date: Mon Sep 30 10:06:38 2019 -0300 media: i2c: ov2659: Fix sensor detection to actually fail when device is not present Make sure that if the expected sensor device id register is not recognized properly the failure is propagated up so devices are not left partially initialized. Signed-off-by: Benoit Parrot Signed-off-by: Jyri Sarha Acked-by: Lad, Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7359fac5a47897e6587ac82896257a60c700ac7d Author: Benoit Parrot Date: Mon Sep 30 10:06:37 2019 -0300 media: i2c: ov2659: Fix for image wrap-around in lower resolution Based on recently found sensor configuration examples, it was discovered that when scaling and binning are used for the lower resolutions (i.e. 640x480, 320x240) the read offset has to be increased otherwise the image appears to be wrapped around. Signed-off-by: Benoit Parrot Signed-off-by: Jyri Sarha Acked-by: Lad, Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 623df5d710fe222c00328dddb757f5045164771c Author: Dongchun Zhu Date: Fri Sep 27 04:18:24 2019 -0300 media: i2c: ov5695: Modify the function of async register subdev related devices This patch adds support for registering a sensor sub-device to the async sub-device framework and parse set up common sensor related devices such as actuator/VCM. [Sakari Ailus: Rewrap commit message] Signed-off-by: Dongchun Zhu Reviewed-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 355047f411c0516533b8c9c96eb6cea252bc78f0 Author: Sakari Ailus Date: Mon Sep 23 06:09:46 2019 -0300 media: v4l: fwnode: Make v4l2_fwnode_endpoint_free() safer Assign vep->link_frequencies to NULL after releasing its memory. Without this change, multiple calls to v4l2_fwnode_endpoint_free() would result in double kfree calls. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8f4ac27af9d61776ee7218175ce300c2cb6a7121 Author: Sakari Ailus Date: Mon Sep 23 05:51:24 2019 -0300 media: v4l: Put camera sensor, lens and flash drivers under MEDIA_CAMERA_SUPPORT Instead of individually depending on MEDIA_CAMERA_SUPPORT (or forgetting it), put all camera sensor, lens and flash drivers under MEDIA_CAMERA_SUPPORT as a whole. The lens VCM devices didn't use to do this, but make them depend on MEDIA_CAMERA_SUPPORT as well since there's no use for these devices without that in practice. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1463b371aff0682c70141f7521db13cc4bbf3016 Author: Janusz Krzysztofik Date: Tue Sep 3 17:11:44 2019 -0300 media: ov6650: Fix stored crop rectangle not in sync with hardware The driver stores crop rectangle settings supposed to be in line with hardware state in a device private structure. Since the driver initial submission, crop rectangle width and height settings are not updated correctly when rectangle offset settings are applied on hardware. If an error occurs while the device is updated, the stored settings my no longer reflect hardware state and consecutive calls to .get_selection() as well as .get/set_fmt() may return incorrect information. That in turn may affect ability of a bridge device to use correct DMA transfer settings if such incorrect informamtion on active frame format returned by .get/set_fmt() is used. Assuming a failed update of the device means its actual settings haven't changed, update crop rectangle width and height settings stored in the device private structure correctly while the rectangle offset is successfully applied on hardware so the stored values always reflect actual hardware state to the extent possible. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3143b459de4cdcce67b36827476c966e93c1cf01 Author: Janusz Krzysztofik Date: Tue Sep 3 17:11:43 2019 -0300 media: ov6650: Fix stored frame format not in sync with hardware The driver stores frame format settings supposed to be in line with hardware state in a device private structure. Since the driver initial submission, those settings are updated before they are actually applied on hardware. If an error occurs on device update, the stored settings my not reflect hardware state anymore and consecutive calls to .get_fmt() may return incorrect information. That in turn may affect ability of a bridge device to use correct DMA transfer settings if such incorrect informmation on active frame format returned by .get_fmt() is used. Assuming a failed device update means its state hasn't changed, update frame format related settings stored in the device private structure only after they are successfully applied so the stored values always reflect hardware state as closely as possible. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5439fa9263cb293e41168bc03711ec18c4f11cba Author: Janusz Krzysztofik Date: Tue Sep 3 17:11:42 2019 -0300 media: ov6650: Fix default format not applied on device probe It is not clear what pixel format is actually configured in hardware on reset. MEDIA_BUS_FMT_YUYV8_2X8, assumed on device probe since the driver was intiially submitted, is for sure not the one. Fix it by explicitly applying a known, driver default frame format just after initial device reset. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 39034bb0c26b76a2c3abc54aa28c185f18b40c2f Author: Janusz Krzysztofik Date: Tue Sep 3 17:11:41 2019 -0300 media: ov6650: Fix .get_fmt() V4L2_SUBDEV_FORMAT_TRY support Commit da298c6d98d5 ("[media] v4l2: replace video op g_mbus_fmt by pad op get_fmt") converted a former ov6650_g_fmt() video operation callback to an ov6650_get_fmt() pad operation callback. However, the converted function disregards a format->which flag that pad operations should obey and always returns active frame format settings. That can be fixed by always responding to V4L2_SUBDEV_FORMAT_TRY with -EINVAL, or providing the response from a pad config argument, likely updated by a former user call to V4L2_SUBDEV_FORMAT_TRY .set_fmt(). Since implementation of the latter is trivial, go for it. Fixes: da298c6d98d5 ("[media] v4l2: replace video op g_mbus_fmt by pad op get_fmt") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1c6a2b63095154bbf9e8f38d79487a728331bf65 Author: Janusz Krzysztofik Date: Tue Sep 3 17:11:40 2019 -0300 media: ov6650: Fix some format attributes not under control User arguments passed to .get/set_fmt() pad operation callbacks may contain unsupported values. The driver takes control over frame size and pixel code as well as colorspace and field attributes but has never cared for remainig format attributes, i.e., ycbcr_enc, quantization and xfer_func, introduced by commit 11ff030c7365 ("[media] v4l2-mediabus: improve colorspace support"). Fix it. Set up a static v4l2_mbus_framefmt structure with attributes initialized to reasonable defaults and use it for updating content of user provided arguments. In case of V4L2_SUBDEV_FORMAT_ACTIVE, postpone frame size update, now performed from inside ov6650_s_fmt() helper, util the user argument is first updated in ov6650_set_fmt() with default frame format content. For V4L2_SUBDEV_FORMAT_TRY, don't copy all attributes to pad config, only those handled by the driver, then fill the response with the default frame format updated with resulting pad config format code and frame size. Fixes: 11ff030c7365 ("[media] v4l2-mediabus: improve colorspace support") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 12500731895ef09afc5b66b86b76c0884fb9c7bf Author: Janusz Krzysztofik Date: Tue Sep 3 17:11:39 2019 -0300 media: ov6650: Fix incorrect use of JPEG colorspace Since its initial submission, the driver selects V4L2_COLORSPACE_JPEG for supported formats other than V4L2_MBUS_FMT_SBGGR8_1X8. According to v4l2-compliance test program, V4L2_COLORSPACE_JPEG applies exclusively to V4L2_PIX_FMT_JPEG. Since the sensor does not support JPEG format, fix it to always select V4L2_COLORSPACE_SRGB. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7b188d6ba27a131e7934a51a14ece331c0491f18 Author: Janusz Krzysztofik Date: Tue Sep 3 17:11:38 2019 -0300 media: ov6650: Fix crop rectangle alignment not passed back Commit 4f996594ceaf ("[media] v4l2: make vidioc_s_crop const") introduced a writable copy of constified user requested crop rectangle in order to be able to perform hardware alignments on it. Later on, commit 10d5509c8d50 ("[media] v4l2: remove g/s_crop from video ops") replaced s_crop() video operation using that const argument with set_selection() pad operation which had a corresponding argument not constified, however the original behavior of the driver was not restored. Since that time, any hardware alignment applied on a user requested crop rectangle is not passed back to the user calling .set_selection() as it should be. Fix the issue by dropping the copy and replacing all references to it with references to the crop rectangle embedded in the user argument. Fixes: 10d5509c8d50 ("[media] v4l2: remove g/s_crop from video ops") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c404af950d14b71bfbf574a752b6c29d726baaba Author: Janusz Krzysztofik Date: Tue Sep 3 17:11:37 2019 -0300 media: ov6650: Fix control handler not freed on init error Since commit afd9690c72c3 ("[media] ov6650: convert to the control framework"), if an error occurs during initialization of a control handler, resources possibly allocated to the handler are not freed before device initialiaton is aborted. Fix it. Fixes: afd9690c72c3 ("[media] ov6650: convert to the control framework") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1b23ee9ccf86217e2e56d6966c7a0679ddc02a04 Author: Janusz Krzysztofik Date: Tue Sep 3 17:11:36 2019 -0300 media: ov6650: Fix MODULE_DESCRIPTION Commit 23a52386fabe ("media: ov6650: convert to standalone v4l2 subdevice") converted the driver from a soc_camera sensor to a standalone V4L subdevice driver. Unfortunately, module description was not updated to reflect the change. Fix it. While being at it, update email address of the module author. Fixes: 23a52386fabe ("media: ov6650: convert to standalone v4l2 subdevice") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 36756fbff1e4a31d71d262ae6a04a20b38efa874 Author: YueHaibing Date: Tue Sep 3 09:09:45 2019 -0300 media: max2175: Fix build error without CONFIG_REGMAP_I2C If CONFIG_REGMAP_I2C is not set, building fails: drivers/media/i2c/max2175.o: In function `max2175_probe': max2175.c:(.text+0x1404): undefined reference to `__devm_regmap_init_i2c' Select REGMAP_I2C to fix this. Reported-by: Hulk Robot Fixes: b47b79d8a231 ("[media] media: i2c: max2175: Add MAX2175 support") Signed-off-by: YueHaibing Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7c617138b8254a6bb60bfb5b8fc53eb8b3d6c3ab Author: Hans Verkuil Date: Thu Sep 5 08:31:11 2019 -0300 media: cx231xx: convert to the vb2 framework This patch converts the cx231xx driver to the vb2 framework. Since you can't do a partial conversion this is a big-bang patch, i.e. large and hard to review. I never found a way around this. Signed-off-by: Hans Verkuil Co-developed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 7e86efa2ff03db92067b2f6f4fa3f1f8b8da7c76 Author: Hans Verkuil Date: Thu Sep 19 08:15:53 2019 -0300 media: cec-gpio: add notifier support Add support for cec-notifier to the cec-gpio driver. This makes it possible to associate the CEC gpio pin with an HDMI connector. This feature was always documented in the cec-gpio bindings: Documentation/devicetree/bindings/media/cec-gpio.txt But support for the hdmi-phandle property was never actually implemented in this driver. This patch adds support for this property. It also fixes a few incorrect error returns in the probe() function, which skipped the call to cec_delete_adapter(). Tested on a Raspberry Pi 3B with a modified vc4 driver. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 98f290731fe3cec04a1ca0635ad2d5d175d77276 Author: Dariusz Marcinkiewicz Date: Fri Aug 23 09:20:59 2019 -0300 media: cec: document CEC_ADAP_G_CONNECTOR_INFO and capability Document the new CEC_ADAP_G_CONNECTOR_INFO ioctl and the new CEC_CAP_CONNECTOR_INFO capability. Co-developed-by: Hans Verkuil Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: added CEC_CAP_CONNECTOR_INFO] [hverkuil-cisco@xs4all.nl: added DQEVENT have_conn_info] Signed-off-by: Mauro Carvalho Chehab commit 9098c1c251ff0e6a4cea3a60486d9f40e7fdcea2 Author: Dariusz Marcinkiewicz Date: Fri Aug 23 09:20:58 2019 -0300 media: cec: expose the new connector info API Until now the connector info API was a kernel-internal API only. This moves it to the public API and adds the new ioctl to retrieve this information. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 806e0cdfee0b99efbb450f9f6e69deb7118602fc Author: Hans Verkuil Date: Mon Sep 16 02:47:41 2019 -0300 media: cec.h: CEC_OP_REC_FLAG_ values were swapped CEC_OP_REC_FLAG_NOT_USED is 0 and CEC_OP_REC_FLAG_USED is 1, not the other way around. Signed-off-by: Hans Verkuil Reported-by: Jiunn Chang Cc: # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab commit b52c2ed31332ad446156626e20c226e6bcea8d2b Author: Hans Verkuil Date: Thu Sep 5 04:33:40 2019 -0300 media: cec/cec-adap.c: use new UI_CMD defines Instead of hardcoding the UI Command key values, use the new defines. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eeabc18b9372beab297b34b9434f088a3f6673c6 Author: Hans Verkuil Date: Thu Sep 5 04:33:39 2019 -0300 media: uapi/linux/cec.h: add defines for the CEC UI Command Operand These defines were never added to this CEC header, likely due to laziness on the part of the original author, i.e. me. But it is useful to have them, so add them. Also update the cec.h.rst.exceptions file to avoid errors when building the documentation. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a5bbeeca8e361d09795d5c736a6e7f0e10cb9ea2 Author: Philipp Zabel Date: Thu Sep 12 13:01:20 2019 -0300 media: imx: enable V4L2_PIX_FMT_XBGR32, _BGRX32, and _RGBX32 Now that proper V4L2 pixel formats exist for all 32-bit RGB permutations, drop support for the poorly defined legacy format V4L2_PIX_FMT_BGR32. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6a181e333954a26f46596b36f82abd14743570fd Author: Nick Desaulniers Date: Wed Sep 25 11:09:06 2019 -0700 x86/realmode: Explicitly set entry point via ENTRY in linker script Linking with ld.lld via $ make LD=ld.lld produces the warning: ld.lld: warning: cannot find entry symbol _start; defaulting to 0x1000 Linking with ld.bfd shows the default entry is 0x1000: $ readelf -h arch/x86/realmode/rm/realmode.elf | grep Entry Entry point address: 0x1000 While ld.lld is being pedantic, just set the entry point explicitly, instead of depending on the implicit default. The symbol pa_text_start refers to the start of the .text section, which may not be at 0x1000 if the preceding sections listed in arch/x86/realmode/rm/realmode.lds.S were large enough. This matches behavior in arch/x86/boot/setup.ld. Reported-by: Sedat Dilek Suggested-by: Borislav Petkov Suggested-by: Peter Smith Signed-off-by: Nick Desaulniers Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: clang-built-linux@googlegroups.com Cc: grimar@accesssoftek.com Cc: Ingo Molnar Cc: maskray@google.com Cc: ruiu@google.com Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190925180908.54260-1-ndesaulniers@google.com Link: https://github.com/ClangBuiltLinux/linux/issues/216 commit 187ef7c5c78153acdce8c8714e5918b1018c710b Author: Philipp Zabel Date: Tue Sep 10 07:22:39 2019 -0300 media: uapi: h264: clarify num_ref_idx_l[01]_(default_)active fields Since the uapi does not contain the num_ref_idx_active_override_flag, drivers for decoders that do not parse slices themselves don't know how to choose between the num_ref_idx_l[01]_default_active and the num_ref_idx_l[01]_active override fields. Instead, userspace must set the override fields to the default values if the slice does not have the num_ref_idx_active_override flag set. The drivers will then always enable the override internally and ignore the default fields completely. Clarify this requirement in the API documentation. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8255b4d21967e978f96a87cf032471f527149794 Author: Philipp Zabel Date: Tue Sep 10 07:20:30 2019 -0300 media: uapi: h264: clarify V4L2_PIX_FMT_H264_SLICE format Document that the slice headers must be included for the benefit of decoders that parse them (partially) in hardware, and that the start code is optional. Add a link to the ITU-T Rec. H.264 specification section that describes the slice format. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9db5f87f6723678a7e7e5e3165439c5c4378edbb Author: Boris Brezillon Date: Mon Sep 9 04:28:15 2019 -0300 media: hantro: h264: Fix the frame_num wraparound case Step '8.2.4.1 Decoding process for picture numbers' was missing in the reflist creation logic, leading to invalid P reflists when a ->frame_num wraparound happens. Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding") Reported-by: Francois Buergisser Signed-off-by: Boris Brezillon Reviewed-by: Philipp Zabel Tested-by: Philipp Zabel Tested-by: Francois Buergisser Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e00cc83ecc3dc4ac9bd9db4f2d6f927d6f43bfd0 Author: Boris Brezillon Date: Mon Sep 9 04:28:14 2019 -0300 media: hantro: h264: Rename POC_CMP() into HANTRO_CMP() And use it for all native type comparisons, even if it's not strictly required. By doing that we make the code more consistent and prevent from potential incorrect results in case of overflow or when the the values being compared are both negative. Signed-off-by: Boris Brezillon Tested-by: Francois Buergisser Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3e5ba2ac850806efe01e7b2b5451d10468a7dcd1 Author: Boris Brezillon Date: Mon Sep 9 04:28:13 2019 -0300 media: hantro: h264: Fix a comment in b1_ref_list_cmp() So it matches the code and the spec. Signed-off-by: Boris Brezillon Tested-by: Francois Buergisser Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 083693214f28b979b50cfcd689010725ca579eb8 Author: Niklas Söderlund Date: Wed Sep 4 18:54:08 2019 -0300 media: rcar-vin: Add support for V4L2_FIELD_ALTERNATE The hardware is capable to passing V4L2_FIELD_ALTERNATE to user-space. Allow users to request this field format but still default to using the hardware interlacer if alternating is not explicitly requested. Before this change a sensor providing data using alternate would be always combined to an interlaced frame. After this change the user can request to receive frames as alternate if the sensor provides it. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 104464f573d5e1c58e2901fce209fc4682b6f8e3 Author: Niklas Söderlund Date: Wed Sep 4 18:54:07 2019 -0300 media: rcar-vin: Do not reset the crop and compose rectangles in s_fmt The crop and compose rectangles are reset when s_fmt is called resulting in potentially valid rectangles being lost when updating the format. Fix this by mapping the rectangles inside the new format. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be2644aac3e1db02d09f45d56206bbdafca582a2 Author: Eric Dumazet Date: Tue Oct 1 10:49:06 2019 -0700 tcp: add ipv6_addr_v4mapped_loopback() helper tcp_twsk_unique() has a hard coded assumption about ipv4 loopback being 127/8 Lets instead use the standard ipv4_is_loopback() method, in a new ipv6_addr_v4mapped_loopback() helper. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 20aca4a33bc4c35e8e157db4b653dd14780a33de Author: Niklas Söderlund Date: Wed Sep 4 18:54:06 2019 -0300 media: rcar-vin: Rename rectangle holding the video source information The variable to hold the video source information dimensions was poorly named 'source'. This is confusing as a lot of other members of structs share the same name with different purposes, rename it src_rect in preparation of refactoring code. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d23e12dc4e26b5a642a47756f260a6623053b784 Author: Niklas Söderlund Date: Wed Sep 4 18:54:05 2019 -0300 media: rcar-vin: Make use of V4L2_FIELD_IS_INTERLACED() macro The V4L2_FIELD_IS_INTERLACED() can be used to make the code more readable, use it. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a0862a40364e2f87109317e31c51c9d7bc89e33f Author: Niklas Söderlund Date: Wed Sep 4 18:54:04 2019 -0300 media: rcar-vin: Fix incorrect return statement in rvin_try_format() While refactoring code the return statement became corrupted, fix it by returning the correct return code. Reported-by: Kieran Bingham Fixes: 897e371389e77514 ("media: rcar-vin: simplify how formats are set and reset" Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f71193af439304f7b6e140c00270075c83d4716a Author: Ezequiel Garcia Date: Tue Sep 3 15:17:09 2019 -0300 media: hantro: Simplify buffer helpers Modify hantro_get_ref() and hantro_h264_get_ref_buf() helpers to return the buffer DMA address, this makes the code simpler and at the same time will allow easier enablement of the post-processing feature. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 05e58c83d6311f95677038cf816062234630727e Author: Ezequiel Garcia Date: Tue Sep 3 15:17:08 2019 -0300 media: hantro: Simplify macroblock macros It seems all codecs are using a 16x16 size macroblock, and so it's possible to have just one set of macroblock macros. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5adff604a51ef13edd00656f26a9ba66865b42af Author: Hans Verkuil Date: Wed Sep 25 11:09:37 2019 -0300 media: vidioc-g-fbuf.rst: remove duplicate 'struct' "struct struct" -> "struct" Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c362f77a243bfd1daec21b6c36491c061ee2f31b Author: Jernej Skrabec Date: Thu Sep 12 15:55:55 2019 -0300 media: vim2m: Fix abort issue Currently, if start streaming -> stop streaming -> start streaming sequence is executed, driver will end job prematurely, if ctx->translen is higher than 1, because "aborting" flag is still set from previous stop streaming command. Fix that by clearing "aborting" flag in start streaming handler. Fixes: 96d8eab5d0a1 ("V4L/DVB: [v5,2/2] v4l: Add a mem-to-mem videobuf framework test device") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4add02d2236fd5f568db141cfd8eb4290972eb3 Author: Vandana BN Date: Mon Sep 9 06:43:31 2019 -0300 media: vivid: Set vid_cap_streaming and vid_out_streaming to true When vbi stream is started, followed by video streaming, the vid_cap_streaming and vid_out_streaming were not being set to true, which would cause the video stream to stop when vbi stream is stopped. This patch allows to set vid_cap_streaming and vid_out_streaming to true. According to Hans Verkuil it appears that these 'if (dev->kthread_vid_cap)' checks are a left-over from the original vivid development and should never have been there. Signed-off-by: Vandana BN Cc: # for v3.18 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1adbb8276f216df6b06e2989ebf9eb3427b01030 Author: Hans Verkuil Date: Mon Sep 9 04:16:27 2019 -0300 media: v4l2-dv-timings.c: fix format string It should be "%u.%02u" instead of "%u.%u". Signed-off-by: Hans Verkuil Reported-by: Bard Winther Signed-off-by: Mauro Carvalho Chehab commit 2455d417c03aa0cbafed04c46cbb354643238318 Author: Kefeng Wang Date: Sun Sep 8 01:12:54 2019 -0300 media: vim2m: Fix BUG_ON in vim2m_device_release() If v4l2_m2m_init() fails, m2m_dev pointer will be set ERR_PTR(-ENOMEM), then kfree m2m_dev will trigger BUG_ON, see below, fix it by setting m2m_dev to NULL. vim2m vim2m.0: Failed to init mem2mem device ------------[ cut here ]------------ kernel BUG at mm/slub.c:3944! invalid opcode: 0000 [#1] SMP PTI CPU: 11 PID: 9061 Comm: insmod Tainted: G E 5.2.0-rc2 #81 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:kfree+0x11a/0x160 Call Trace: vim2m_device_release+0x3f/0x50 [vim2m] device_release+0x27/0x80 kobject_release+0x68/0x190 vim2m_probe+0x20f/0x280 [vim2m] platform_drv_probe+0x37/0x90 really_probe+0xef/0x3d0 driver_probe_device+0x110/0x120 device_driver_attach+0x4f/0x60 __driver_attach+0x9a/0x140 ? device_driver_attach+0x60/0x60 bus_for_each_dev+0x76/0xc0 ? klist_add_tail+0x57/0x70 bus_add_driver+0x141/0x210 driver_register+0x5b/0xe0 vim2m_init+0x29/0x1000 [vim2m] do_one_initcall+0x46/0x1f4 ? __slab_alloc+0x1c/0x30 ? kmem_cache_alloc_trace+0x167/0x1b0 do_init_module+0x5b/0x21f load_module+0x1add/0x1fb0 ? __do_sys_finit_module+0xe9/0x110 __do_sys_finit_module+0xe9/0x110 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: ea6c7e34f3b2 ("media: vim2m: replace devm_kzalloc by kzalloc") Reported-by: Hulk Robot Cc: Laurent Pinchart Signed-off-by: Kefeng Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1c7b5eedb9884dc012a9146d523f7c5194e757d5 Author: Alexandre Courbot Date: Fri Sep 6 08:55:03 2019 -0300 media: mtk-vcodec: vdec: clean up vidioc_vdec_s_fmt a bit Check for a potentially NULL pointer that was overlooked and use shorter accessors to the same data. While we are at it, sprinkle a few comments. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2abb4db289d757cddf2bf8aae34be65bad653bb7 Author: Alexandre Courbot Date: Fri Sep 6 08:55:02 2019 -0300 media: mtk-vcodec: vdec: set VPI IPI handler in one place Each of the supported decoder formats used to set the same RPC interrupt handler by themselves, even though this could be done by the IF init function itself. Move it to the right place and stop making its symbol public. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dda8415e17c99ad3d6ac56d8aa722198f816fc74 Author: Yunfei Dong Date: Fri Sep 6 08:55:01 2019 -0300 media: mtk-vcodec: vdec: fix incorrect pointer dereference mtk_q_data::fmt is actually a pointer and must be dereferenced as such. This went under the radar because mtk_v4l2_debug() evaluates to nothing unless DEBUG is defined. [acourbot: split into its own commit] Signed-off-by: Yunfei Dong Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ba0c8e6eed0712d69a6199d2797a5cc2ee07db57 Author: Colin Ian King Date: Fri Sep 6 05:58:39 2019 -0300 media: em28xx: make various arrays static const, makes object smaller Don't populate the arrays on the stack but instead make them static const. Makes the object code smaller by 767 bytes. Before: text data bss dec hex filename 41567 15088 192 56847 de0f em28xx/em28xx-dvb.o After: text data bss dec hex filename 39872 16016 192 56080 db10 em28xx/em28xx-dvb.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5914ecf4b18fcc242e81ebbae255bb32ba2f3da2 Author: Colin Ian King Date: Fri Sep 6 05:11:33 2019 -0300 media: s3c-camif: make array 'registers' static const, makes object smaller Don't populate the array 'registers' on the stack but instead make it static const. Makes the object code smaller by 45 bytes. Before: text data bss dec hex filename 17364 5000 0 22364 575c platform/s3c-camif/camif-regs.o After: text data bss dec hex filename 17255 5064 0 22319 572f platform/s3c-camif/camif-regs.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3ff8b2c646095c621a456327bd4d7036b7cb55fa Author: Philipp Zabel Date: Thu Sep 5 10:12:54 2019 -0300 media: uapi: h264: clarify dec_ref_pic_marking_bit_size fields Since dec_ref_pic_marking_bit_size is not a syntax element itself, explicitly state that this is the size in bits of the dec_ref_pic_marking() syntax element contained in the slice. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3f5e1e2f6e3dac77d882dfbdc84972e782d9735d Author: Philipp Zabel Date: Thu Sep 5 07:25:54 2019 -0300 media: hantro: streamline open, reuse error path This adds a label to the error path to avoid calling v4l2_m2m_ctx_init() and kfree(ctx) in two places each. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4a0cad6dcaa17b499717d2ed9c2376fe0cd6fac5 Author: Hans Verkuil Date: Sun Sep 1 07:09:21 2019 -0300 media: ext-ctrls-flash.rst: fix typo to synchronises -> to synchronise Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a9cc4cbcdfd378b65fd4e398800cfa14e3855042 Author: Christophe JAILLET Date: Sat Aug 31 03:42:58 2019 -0300 media: seco-cec: Add a missing 'release_region()' in an error handling path At the beginning of the probe function, we have a call to 'request_muxed_region(BRA_SMB_BASE_ADDR, 7, "CEC00001")()' A corresponding 'release_region()' is performed in the remove function but is lacking in the error handling path. Add it. Fixes: b03c2fb97adc ("media: add SECO cec driver") Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 965c71e8adcff315e16b58c00cd312598fc0222c Author: Hans Verkuil Date: Fri Aug 30 06:26:24 2019 -0300 media: cedrus: fix various format-related compliance issues Initialize the context on open() with valid capture and output formats. It is good practice to always have valid formats internally. This solves one vb2 warning in the kernel log where the sizeimage value of the output format was 0 when requesting buffers, which is not allowed. It also simplifies the g_fmt ioctl implementations since they no longer have to check if a valid format was ever set. cedrus_prepare_format() now also validates sizeimage for the output formats, ensuring userspace can't set it to 0 since that would cause the same vb2 warning. Finally remove the sizeimage == 0 check in cedrus_try_fmt_vid_out() since cedrus_prepare_format() will now adjust this value. Signed-off-by: Hans Verkuil Reviewed-by: Jernej Skrabec Signed-off-by: Mauro Carvalho Chehab commit dec555256f2cb61ee94975727ec2d4a8d592ac92 Author: Hans Verkuil Date: Fri Aug 30 06:26:23 2019 -0300 media: cedrus: choose default pixelformat in try_fmt If an unsupported pixelformat is passed to try_fmt, then pick the first valid pixelformat instead. This is more standard V4L2 behavior. Signed-off-by: Hans Verkuil Reviewed-by: Jernej Skrabec Signed-off-by: Mauro Carvalho Chehab commit ae0688f659adb17ae6ae5710c886b20b5406e5c4 Author: Hans Verkuil Date: Fri Aug 30 06:26:22 2019 -0300 media: cedrus: fill in bus_info for media device Fixes this compliance warning: $ v4l2-compliance -m0 v4l2-compliance SHA: b514d615166bdc0901a4c71261b87db31e89f464, 32 bits Compliance test for cedrus device /dev/media0: Media Driver Info: Driver name : cedrus Model : cedrus Serial : Bus info : Media version : 5.3.0 Hardware revision: 0x00000000 (0) Driver version : 5.3.0 Required ioctls: warn: v4l2-test-media.cpp(51): empty bus_info test MEDIA_IOC_DEVICE_INFO: OK Signed-off-by: Hans Verkuil Reviewed-by: Jernej Skrabec Signed-off-by: Mauro Carvalho Chehab commit 724de7b5fe72188838bd1f049a85a1f37d8ede26 Author: Benoit Parrot Date: Fri Sep 20 14:05:53 2019 -0300 media: am437x-vpfe: Switch to SPDX Licensing Switch to SPDX licensing and drop the redundant GPL text. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ea169d2d656100cb76c5bf163eeb5e435efe58b7 Author: Benoit Parrot Date: Fri Sep 20 14:05:52 2019 -0300 media: am437x-vpfe: Remove per bus width static data The bus related static data included in the vpfe_fmt static table can be derived dynamically instead. This simplify the table and it's use. We instead replace the per bus data info with just the usual bit per pixel value for each supported pixel format. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 750ef54b7e2b03ce33dd3d7903aa8254e6f2adab Author: Benoit Parrot Date: Fri Sep 20 14:05:51 2019 -0300 media: am437x-vpfe: TRY_FMT ioctl is not really trying anything The try_fmt was not actually trying out the provided format but merely returning the current format basically like get_fmt. In addition set_fmt should first invoked try_fmt to validate the given format before applying it to the hardware. To fix all of these the whole get/try/set ioctl functions had to be reworked. When calculating the bytesperline/stride and sizeimage format member we don't need to locally store the current value of bytesperpixel as it can easily get derived dynamically. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f60de889d7db5428d4d1894f708d78aa58cc9036 Author: Benoit Parrot Date: Fri Sep 20 14:05:50 2019 -0300 media: am437x-vpfe: fix function trace debug log checkpatch.pl nows reports several: WARNING: Prefer using '"%s...", __func__' to using '', this function's name, in a string. So fix these for the whole driver. At the same time remove the function entry trace log as those can be enabled using ftrace instead. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0512ccba072a6c2517d2926009eb223ad163f413 Author: Benoit Parrot Date: Fri Sep 20 14:05:49 2019 -0300 media: am437x-vpfe: Use a per instance format array instead of a static one Using a statically defined format array would cause issue when multiple vpfe instance would be connected to sub-device of different capabilities. We need to use an instance based array instead to properly maintain a per port/instance format list. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 13aa21cfe92ce9ebb51824029d89f19c33f81419 Author: Benoit Parrot Date: Fri Sep 20 14:05:48 2019 -0300 media: am437x-vpfe: Setting STD to current value is not an error VIDIOC_S_STD should not return an error if the value is identical to the current one. This error was highlighted by the v4l2-compliance test. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 73940235337ee91ba32eaf71d641d74d9b1c9b63 Author: Benoit Parrot Date: Fri Sep 20 14:05:47 2019 -0300 media: am437x-vpfe: Streamlined vb2 buffer cleanup Returning queued vb2 buffers back to user space is a common task best handled by a helper function. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 158a1dddf2dbce5fdb3053213c1e9b36a54b4d4d Author: Benoit Parrot Date: Fri Sep 20 14:05:46 2019 -0300 media: am437x-vpfe: fix start streaming error path When start_streaming fails the h/w module might be left enabled inadvertently. Make sure it is disabled in the error path. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b58e69e9a573e74946498077ae25e5244303e718 Author: Benoit Parrot Date: Fri Sep 20 14:05:45 2019 -0300 media: am437x-vpfe: Wait for end of frame before tear-down We were originally attempting to stop all processing as soon as possible, but the in-progress DMA operation cannot be canceled. This led to the module being in a busy state and prevented proper power management functionality. The existing implementation would attempt to clean things up by waiting up to 50ms. However when receiving video frame at 15fps or lower, it meant an inter frame arrival rate of 66.6 ms or higher. In such cases upon tear down the following message could be seen: omap_hwmod: vpfe0: _wait_target_disable failed This patch fixes this issue by adding a stopping state where we would wait for the next Vsync before disabling the hardware. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6784f9e4ebb6fac0c8741eeab4009a3a68a3831 Author: Benoit Parrot Date: Fri Sep 20 14:05:44 2019 -0300 media: am437x-vpfe: Rework ISR routine for clarity Make the ISR code simpler to follow by removing goto and relocating/eliminating duplicate spinlock accesses. Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9f17f839fe9cfee2615f03f9f4a1b34ae1f1a040 Author: Krzysztof Kozlowski Date: Mon Sep 23 18:14:06 2019 +0200 arm64: dts: exynos: Rename Multi Core Timer node to "timer" on Exynos5433 The device node name should reflect generic class of a device so rename the Multi Core Timer node from "mct" to "timer". This will be also in sync with upcoming DT schema. No functional change. Signed-off-by: Krzysztof Kozlowski commit 59de78f1d6348b4017aa752695742f8ffbd7ab05 Author: Maciej Falkowski Date: Fri Sep 20 14:14:31 2019 +0200 arm64: dts: exynos: Split phandle in dmas property on Exynos5433 Change representation of phandle array as then dt-schema counts number of its items properly. Signed-off-by: Maciej Falkowski Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 0d92c191ad84aae25db5009eaa047c059abdddd8 Author: Maciej Falkowski Date: Thu Sep 19 15:50:53 2019 +0200 arm64: dts: exynos: Swap clock order of sysmmu on Exynos5433 dt-schema supports only order of names "aclk", "pclk". Swap some sysmmu definitions to make them compatible with schema. Signed-off-by: Maciej Falkowski Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit bed903167ae5b5532eda5d7db26de451bd232da5 Author: Marek Szyprowski Date: Thu Sep 12 09:36:02 2019 +0200 arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc node" Commit ef72171b3621 ("arm64: dts: exynos: Remove unneeded address space mapping for soc node") changed the address and size cells in root node from 2 to 1, but /memory nodes for the affected boards were not updated. This went unnoticed on Exynos5433-based TM2(e) boards, because they use u-boot, which updates /memory node to the correct values. On the other hand, the mentioned commit broke boot on Exynos7-based Espresso board, which bootloader doesn't touch /memory node at all. This patch reverts commit ef72171b3621 ("arm64: dts: exynos: Remove unneeded address space mapping for soc node"), so Exynos5433 and Exynos7 SoCs again matches other ARM64 platforms with 64bit mappings in root node. Reported-by: Alim Akhtar Fixes: ef72171b3621 ("arm64: dts: exynos: Remove unneeded address space mapping for soc node") Signed-off-by: Marek Szyprowski Cc: # 5.3.x: 72ddcf6aa224 arm64: dts: exynos: Move GPU under /soc node for Exynos5433 Cc: # 5.3.x: ede87c3a2bdb arm64: dts: exynos: Move GPU under /soc node for Exynos7 Cc: # 4.18.x Tested-by: Alim Akhtar Signed-off-by: Krzysztof Kozlowski commit ede87c3a2bdbb14d616d7307033beba1d3bb97a4 Author: Marek Szyprowski Date: Wed Sep 4 11:24:41 2019 +0200 arm64: dts: exynos: Move GPU under /soc node for Exynos7 Mali GPU hardware module is a standard hardware module integrated to Exynos7 SoCs, so it should reside under the "/soc" node. The only SoC components which are placed in the DT root, are those, which are a part of CPUs: like ARM architected timers and ARM performance measurement units. Signed-off-by: Marek Szyprowski Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar Signed-off-by: Krzysztof Kozlowski commit 72ddcf6aa224424de406a38f1b45743d460cf564 Author: Marek Szyprowski Date: Wed Sep 4 11:24:40 2019 +0200 arm64: dts: exynos: Move GPU under /soc node for Exynos5433 Mali GPU hardware module is a standard hardware module integrated to Exynos5433 SoCs, so it should reside under the "/soc" node. The only SoC components which are placed in the DT root, are those, which are a part of CPUs: like ARM architected timers and ARM performance measurement units. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 296523d933060cad754626c751dc20f64dba7d01 Author: Lukasz Luba Date: Thu Sep 19 11:26:41 2019 +0200 dt-bindings: ddr: Add bindings for Samsung LPDDR3 memories Add compatible for Samsung k3qf2f20db LPDDR3 memory bindings, based on at25.txt compatible section. Introduce minor fixes in the old documentation. Suggested-by: Krzysztof Kozlowski Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 5cb4d9a02a607943182b8382c97db81d9cebc02e Author: Lukasz Luba Date: Wed Aug 21 12:43:02 2019 +0200 ARM: dts: exynos: Add DMC device to Exynos5422 and Odroid XU3-family boards Add description of Dynamic Memory Controller and PPMU counters to Exynos5422 and Odroid XU3/XU4/HC1 boards. They are used by exynos5422-dmc driver. There is a definition of the memory chip, which is then used during calculation of timings for each OPP. The algorithm in the driver needs these two sets to bound the timings. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 53d2ebcc73cde1268285bc2b99b4a5c915afe73a Author: Lukasz Luba Date: Wed Aug 21 12:43:01 2019 +0200 ARM: dts: exynos: Add syscon compatible to clock controller on Exynos542x In order to get the clock by phandle and use it with regmap it needs to be compatible with syscon. The DMC driver uses two registers from clock register set and needs the regmap of them. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit c6d46248cd15f519e83398aef433884238f93c36 Author: Lukasz Luba Date: Wed Aug 21 12:42:59 2019 +0200 dt-bindings: memory-controllers: Add Exynos5422 DMC device description Add device tree bindings for a new Exynos5422 Dynamic Memory Controller device. Signed-off-by: Lukasz Luba Reviewed-by: Rob Herring Signed-off-by: Krzysztof Kozlowski commit 1d816d3454427481b08a6bbc16287b1aba395672 Author: Lukasz Luba Date: Wed Aug 21 12:42:57 2019 +0200 dt-bindings: ddr: Add bindings for LPDDR3 memories Specifies the AC timing parameters of the LPDDR3 memory device. Signed-off-by: Lukasz Luba Reviewed-by: Rob Herring Signed-off-by: Krzysztof Kozlowski commit e9920bc28a4f9d677f1cf49223142a405c4d615f Author: Lukasz Luba Date: Wed Aug 21 12:42:56 2019 +0200 dt-bindings: ddr: Rename lpddr2 directory Change directory name to be ready for new types of memories. Signed-off-by: Lukasz Luba Reviewed-by: Rob Herring Signed-off-by: Krzysztof Kozlowski commit d51e6a69f4e9e81cf75bbfdccce60d47e31ad901 Author: Lukasz Luba Date: Thu Sep 19 11:26:40 2019 +0200 memory: samsung: exynos5422-dmc: Fix kfree() of devm-allocated memory and missing static Fix issues captured by static checkers: use of kfree() on resource-managed memory and missing 'static' in the private function. Fixes Smatch warning: drivers/memory/samsung/exynos5422-dmc.c:272 exynos5_init_freq_table() warn: passing devm_ allocated variable to kfree. 'dmc->opp' Fixes Sparse warning: drivers/memory/samsung/exynos5422-dmc.c:736:1: warning: symbol 'exynos5_dmc_align_init_freq' was not declared. Reported-by: kbuild test robot Reported-by: Dan Carpenter Reported-by: Krzysztof Kozlowski Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 7a5a687ec3e93d3e20d4705507f0648d054b1a9e Author: Colin Ian King Date: Mon Sep 16 10:12:49 2019 +0100 memory: samsung: exynos5422-dmc: Fix spelling mistake "counld" -> "could" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Krzysztof Kozlowski commit 6e7674c3c6df565ab47d02b4f2e608e3477cdf86 Author: Lukasz Luba Date: Wed Aug 21 12:43:00 2019 +0200 memory: Add DMC driver for Exynos5422 Add driver for Exynos5422 Dynamic Memory Controller. The driver provides support for dynamic frequency and voltage scaling for DMC and DRAM. It supports changing timings of DRAM running with different frequency. There is also an algorithm to calculate timings based on memory description provided in DT. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 976897dd96db94c74209d0a0671d7a73aa02fab9 Author: Lukasz Luba Date: Wed Aug 21 12:42:58 2019 +0200 memory: Extend of_memory with LPDDR3 support Add AC timings information needed to support LPDDR3 and memory controllers along with helpers to obtain it. These will be necessary for upcoming Exynos5422 Dynamic Memory Controller driver. Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit a322b3377f4bac32aa25fb1acb9e7afbbbbd0137 Author: Krzysztof Kozlowski Date: Mon Aug 5 18:27:10 2019 +0200 pinctrl: samsung: Fix device node refcount leaks in init code Several functions use for_each_child_of_node() loop with a break to find a matching child node. Although each iteration of for_each_child_of_node puts the previous node, but early exit from loop misses it. This leads to leak of device node. Cc: Fixes: 9a2c1c3b91aa ("pinctrl: samsung: Allow grouping multiple pinmux/pinconf nodes") Signed-off-by: Krzysztof Kozlowski commit 7f028caadf6c37580d0f59c6c094ed09afc04062 Author: Krzysztof Kozlowski Date: Mon Aug 5 18:27:09 2019 +0200 pinctrl: samsung: Fix device node refcount leaks in S3C64xx wakeup controller init In s3c64xx_eint_eint0_init() the for_each_child_of_node() loop is used with a break to find a matching child node. Although each iteration of for_each_child_of_node puts the previous node, but early exit from loop misses it. This leads to leak of device node. Cc: Fixes: 61dd72613177 ("pinctrl: Add pinctrl-s3c64xx driver") Signed-off-by: Krzysztof Kozlowski commit 6fbbcb050802d6ea109f387e961b1dbcc3a80c96 Author: Krzysztof Kozlowski Date: Mon Aug 5 18:27:08 2019 +0200 pinctrl: samsung: Fix device node refcount leaks in S3C24xx wakeup controller init In s3c24xx_eint_init() the for_each_child_of_node() loop is used with a break to find a matching child node. Although each iteration of for_each_child_of_node puts the previous node, but early exit from loop misses it. This leads to leak of device node. Cc: Fixes: af99a7507469 ("pinctrl: Add pinctrl-s3c24xx driver") Signed-off-by: Krzysztof Kozlowski commit 5c7f48dd14e892e3e920dd6bbbd52df79e1b3b41 Author: Krzysztof Kozlowski Date: Mon Aug 5 18:27:07 2019 +0200 pinctrl: samsung: Fix device node refcount leaks in Exynos wakeup controller init In exynos_eint_wkup_init() the for_each_child_of_node() loop is used with a break to find a matching child node. Although each iteration of for_each_child_of_node puts the previous node, but early exit from loop misses it. This leads to leak of device node. Cc: Fixes: 43b169db1841 ("pinctrl: add exynos4210 specific extensions for samsung pinctrl driver") Signed-off-by: Krzysztof Kozlowski commit 3d2557ab75d4c568c79eefa2e550e0d80348a6bd Author: Nishka Dasgupta Date: Sun Aug 4 21:32:00 2019 +0530 pinctrl: samsung: Add of_node_put() before return in error path Each iteration of for_each_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return of exynos_eint_wkup_init() error path. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Cc: Fixes: 14c255d35b25 ("pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts") Signed-off-by: Krzysztof Kozlowski commit 7879fc4bdc7506d37bd67b6fc29442c53c06dfda Author: Borislav Petkov Date: Sun Aug 25 22:50:18 2019 +0200 x86/rdrand: Sanity-check RDRAND output It turned out recently that on certain AMD F15h and F16h machines, due to the BIOS dropping the ball after resume, yet again, RDRAND would not function anymore: c49a0a80137c ("x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h") Add a silly test to the CPU bringup path, to sanity-check the random data RDRAND returns and scream as loudly as possible if that returned random data doesn't change. Suggested-by: Linus Torvalds Signed-off-by: Borislav Petkov Cc: Pu Wen Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/CAHk-=wjWPDauemCmLTKbdMYFB0UveMszZpcrwoUkJRRWKrqaTw@mail.gmail.com commit 8f5c285f3ef5ab3c7cf5288d63bdaa3549be2118 Author: Felipe Balbi Date: Tue Oct 1 11:14:05 2019 +0300 SPI: designware: pci: Switch over to MSI interrupts Some devices support MSI interrupts. Let's at least try to use them in platforms that provide MSI capability. Signed-off-by: Felipe Balbi Link: https://lore.kernel.org/r/20191001081405.764161-1-felipe.balbi@linux.intel.com Signed-off-by: Mark Brown commit 16c3e058036a6f5be542962e487d428518edcb45 Author: Kuldeep Singh Date: Tue Oct 1 14:29:16 2019 +0530 spi: spi-fsl-qspi: Introduce variable to fix different invalid master Id Different platforms have different Master with different SourceID on AHB bus. The 0X0E Master ID is used by cluster 3 in case of LS2088A. So, patch introduce an invalid master id variable to fix invalid mastered on different platforms. Signed-off-by: Suresh Gupta Signed-off-by: Kuldeep Singh Link: https://lore.kernel.org/r/1569920356-8953-1-git-send-email-kuldeep.singh@nxp.com Signed-off-by: Mark Brown commit 057b8945f78f76d0b04eeb5c27cd9225e5e7ad86 Author: Navid Emamdoost Date: Sun Sep 29 22:46:01 2019 -0500 spi: lpspi: fix memory leak in fsl_lpspi_probe In fsl_lpspi_probe an SPI controller is allocated either via spi_alloc_slave or spi_alloc_master. In all but one error cases this controller is put by going to error handling code. This commit fixes the case when pm_runtime_get_sync fails and it should go to the error handling path. Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi") Signed-off-by: Navid Emamdoost Link: https://lore.kernel.org/r/20190930034602.1467-1-navid.emamdoost@gmail.com Signed-off-by: Mark Brown commit d3b0ffa1d75d5305ebe34735598993afbb8a869d Author: Navid Emamdoost Date: Mon Sep 30 15:52:40 2019 -0500 spi: gpio: prevent memory leak in spi_gpio_probe In spi_gpio_probe an SPI master is allocated via spi_alloc_master, but this controller should be released if devm_add_action_or_reset fails, otherwise memory leaks. In order to avoid leak spi_contriller_put must be called in case of failure for devm_add_action_or_reset. Fixes: 8b797490b4db ("spi: gpio: Make sure spi_master_put() is called in every error path") Signed-off-by: Navid Emamdoost Link: https://lore.kernel.org/r/20190930205241.5483-1-navid.emamdoost@gmail.com Signed-off-by: Mark Brown commit 95bddd8bbf912a9a7980fde2a376fabf1ff7cd4b Author: Guido Günther Date: Mon Sep 30 22:26:00 2019 +0200 regulator: bd718x7: Add MODULE_ALIAS() This fixes device probing when built as a module Signed-off-by: Guido Günther Link: https://lore.kernel.org/r/46ce3400e227dd88d51486c02a6152c9ec52acbb.1569875042.git.agx@sigxcpu.org Signed-off-by: Mark Brown commit 3a9e204d4e36904a464a2e53206b053a7ffc7bad Author: Liam Girdwood Date: Fri Sep 27 15:05:37 2019 -0500 ASoC: SOF: Intel: Add context data to any IPC timeout. Helps with FW debug as it provides DSP IPC processing context. Signed-off-by: Liam Girdwood Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190927200538.660-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f567ff6c76f7e9b317248fcab7a0eb3ef432dc9e Author: Marcin Rajwa Date: Fri Sep 27 15:05:34 2019 -0500 ASoC: SOF: Intel: hda: fix reset of host_period_bytes This patch prevents the reset of host period bytes and uses no_stream_position to record requests for stream position. Signed-off-by: Marcin Rajwa Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190927200538.660-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e3ebfd0ab5b4880bfb6a9f32614c2e389cc3da56 Author: Marcin Rajwa Date: Fri Sep 27 15:05:33 2019 -0500 ASoC: SOF: ipc: introduce no_stream_position in sof_ipc_stream_params struct The host period bytes value needs to be passed to firmware. However current implementation uses this field for different purpose - to indicate whether FW should send stream position to the host. Therefore this patch introduces another field "no_stream_position", a boolean value aimed to store information about position tracking. This way host_period_bytes preserves its original value. Signed-off-by: Marcin Rajwa Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190927200538.660-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8692d498d675e2e1433274c5f03b855824f3f35d Author: Ranjani Sridharan Date: Fri Sep 27 15:05:32 2019 -0500 ASoC: SOF: core: check for mandatory fw_ready op during SOF probe fw_ready should be a mandatory op. Make sure fw_ready ops is set during probe. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190927200538.660-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9a06508bf7824ba34f2e1e9e08df505ac14a44c2 Author: Liam Girdwood Date: Fri Sep 27 15:05:29 2019 -0500 ASoC: SOF: ipc: retain DSP context after FW exception. Add config option to prevent DSP entering D3 after any FW exception. This can then be used to dump FW context for debug. Signed-off-by: Liam Girdwood Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190927200538.660-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2ab4c50f6955514150f83b47b7aee3ba5fe3ac1d Author: Pierre-Louis Bossart Date: Fri Sep 27 15:05:28 2019 -0500 ASoC: SOF: trace: move to opt-in with Kconfig and module parameter In a number of debug cases, the DMA-based trace can add problems (e.g. with HDaudio channel allocation). It also generates additional traffic on the bus and if the DMA handling is unreliable will prevent audio use-cases from working normally. Using the trace also requires tools to be installed on the target. The trace can be instead handled as dynamic debug. We can use a Kconfig to force the trace to be enabled in all cases, or use a module parameter to enable it on a need-basis, e.g. by setting "options snd_sof sof_debug=0x1" in a /etc/modprobe.d file. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190927200538.660-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 767b0bc590576cfda6e6bf2cd45fb8e1843b3ecb Author: Charles Keepax Date: Tue Oct 1 14:57:00 2019 +0100 ASoC: madera: Add support for using MCLK3 Some Madera CODECs have a third MCLK pin allow this to be sourced for the FLLs and system clocks. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20191001135700.31017-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 5be5515a8ea198de6eb204a0ff25faf98b8ff719 Author: Julio Faracco Date: Tue Oct 1 11:39:04 2019 -0300 net: core: dev: replace state xoff flag comparison by netif_xmit_stopped method Function netif_schedule_queue() has a hardcoded comparison between queue state and any xoff flag. This comparison does the same thing as method netif_xmit_stopped(). In terms of code clarity, it is better. See other methods like: generic_xdp_tx() and dev_direct_xmit(). Signed-off-by: Julio Faracco Signed-off-by: David S. Miller commit 5f71c84038d39def573744a145c573758f52a949 Author: Prashant Malani Date: Tue Oct 1 01:35:57 2019 -0700 r8152: Factor out OOB link list waits The same for-loop check for the LINK_LIST_READY bit of an OOB_CTRL register is used in several places. Factor these out into a single function to reduce the lines of code. Change-Id: I20e8f327045a72acc0a83e2d145ae2993ab62915 Signed-off-by: Prashant Malani Reviewed-by: Grant Grundler Acked-by: Hayes Wang Signed-off-by: David S. Miller commit e6679fd1e2fc253f62bbea13b76d9b6a8f90c68e Author: Daniel Campello Date: Tue Sep 24 14:37:16 2019 -0600 platform/chrome: wilco_ec: Add debugfs test_event file This change introduces a new debugfs file 'test_event' that when written to causes the EC to generate a test event. This adds a second sub cmd for the test event, and pulls out send_ec_cmd to be a common helper between h1_gpio_get and test_event_set. Signed-off-by: Daniel Campello Reviewed-by: Benson Leung Reviewed-by: Nick Crews Signed-off-by: Enric Balletbo i Serra commit f3fceba5da5e149ecd8e58c1e1c60464629de27b Author: Kamal Heib Date: Mon Sep 23 13:41:58 2019 +0300 RDMA/rxe: Verify modify_device mask Verify that the passed mask to rxe_modify_device() is supported. Link: https://lore.kernel.org/r/20190923104158.5331-4-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 39ce85f3b18597b17a3db74906db2c6360d66c16 Author: Kamal Heib Date: Mon Sep 23 13:41:57 2019 +0300 RDMA/bnxt_re: Remove unsupported modify_device callback There is no need to return always zero for function which is not supported. Link: https://lore.kernel.org/r/20190923104158.5331-3-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit d0f3ef36bf49bbc7de04da0d7f65ef95749b8b30 Author: Kamal Heib Date: Mon Sep 23 13:41:56 2019 +0300 RDMA/core: Fix return code when modify_device isn't supported The proper return code is "-EOPNOTSUPP" when modify_device callback is not supported. Link: https://lore.kernel.org/r/20190923104158.5331-2-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 47c7bcfdb387141126392ff4857a03910d95b4b6 Author: Benoit Parrot Date: Fri Sep 20 14:05:43 2019 -0300 media: am437x-vpfe: Fix missing first line Previous generation of this driver were hard coded to handle encoder/decoder where the first line never contains any data and was therefore always skipped, however when dealing with actual camera sensors the first line is always present. Signed-off-by: Benoit Parrot Signed-off-by: Jyri Sarha Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b0e41bf23b590082c9109b691a1f949a0b8defae Author: Dave Gerlach Date: Fri Sep 20 14:05:42 2019 -0300 media: am437x-vpfe: Fix suspend path to always handle pinctrl config Currently if vpfe is not active then it returns immediately in the suspend and resume handlers. Change this so that it always performs the pinctrl config so that we can still get proper sleep state configuration on the pins even if we do not need to worry about fully saving and restoring context. Signed-off-by: Dave Gerlach Signed-off-by: Jyri Sarha Signed-off-by: Benoit Parrot Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2c4414ce926676b84e06b7a09ad46b542a9390ed Author: Shuah Khan Date: Tue Sep 17 13:35:12 2019 -0300 media: MAINTAINERS: Add reviewer to vimc driver After practically re-writing the driver to collpase it into a monolith, I am adding myself as a reviewer for vimc driver. Signed-off-by: Shuah Khan Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 78364ccffd3396d9c6f7c50416b5c79d57412547 Author: Shuah Khan Date: Tue Sep 17 13:35:11 2019 -0300 media: doc: media: vimc: Update module parameter usage information vimc driver is now a monolithic driver. Update the module parameter usage information to reflect that. [m.chehab+samsung@kernel.org: fix two warnings due to wrontly added spaces] Signed-off-by: Shuah Khan Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3a9e69f1404f174ea8e0432d308aff20d04a9eeb Author: Shuah Khan Date: Tue Sep 17 13:35:10 2019 -0300 media: vimc: move duplicated IS_SRC and IS_SINK to common header Move duplicated IS_SRC and IS_SINK dfines to common header. Rename them to VIMC_IS_SRC and VIM_IS_SINK. Signed-off-by: Shuah Khan Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d7fb5c361c2a2666d20e044206e1756bc8e87df2 Author: Shuah Khan Date: Tue Sep 17 13:35:09 2019 -0300 media: vimc: Fix gpf in rmmod path when stream is active If vimc module is removed while streaming is in progress, sensor subdev unregister runs into general protection fault when it tries to unregister media entities. This is a common subdev problem related to releasing pads from v4l2_device_unregister_subdev() before calling unregister. Unregister references pads during unregistering subdev. The sd release handler is the right place for releasing all sd resources including pads. The release handlers currently release all resources except the pads. Fix v4l2_device_unregister_subdev() not release pads and release pads from the sd_int_op release handlers. kernel: [ 4136.715839] general protection fault: 0000 [#1] SMP PTI kernel: [ 4136.715847] CPU: 2 PID: 1972 Comm: bash Not tainted 5.3.0-rc2+ #4 kernel: [ 4136.715850] Hardware name: Dell Inc. OptiPlex 790/0HY9JP, BIOS A18 09/24/2013 kernel: [ 4136.715858] RIP: 0010:media_gobj_destroy.part.16+0x1f/0x60 kernel: [ 4136.715863] Code: ff 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 89 fe 48 89 e5 53 48 89 fb 48 c7 c7 00 7f cf b0 e8 24 fa ff ff 48 8b 03 <48> 83 80 a0 00 00 00 01 48 8b 43 18 48 8b 53 10 48 89 42 08 48 89 kernel: [ 4136.715866] RSP: 0018:ffff9b2248fe3cb0 EFLAGS: 00010246 kernel: [ 4136.715870] RAX: bcf2bfbfa0d63c2f RBX: ffff88c3eb37e9c0 RCX: 00000000802a0018 kernel: [ 4136.715873] RDX: ffff88c3e4f6a078 RSI: ffff88c3eb37e9c0 RDI: ffffffffb0cf7f00 kernel: [ 4136.715876] RBP: ffff9b2248fe3cb8 R08: 0000000001000002 R09: ffffffffb0492b00 kernel: [ 4136.715879] R10: ffff9b2248fe3c28 R11: 0000000000000001 R12: 0000000000000038 kernel: [ 4136.715881] R13: ffffffffc09a1628 R14: ffff88c3e4f6a028 R15: fffffffffffffff2 kernel: [ 4136.715885] FS: 00007f8389647740(0000) GS:ffff88c465500000(0000) knlGS:0000000000000000 kernel: [ 4136.715888] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: [ 4136.715891] CR2: 000055d008f80fd8 CR3: 00000001996ec005 CR4: 00000000000606e0 kernel: [ 4136.715894] Call Trace: kernel: [ 4136.715903] media_gobj_destroy+0x14/0x20 kernel: [ 4136.715908] __media_device_unregister_entity+0xb3/0xe0 kernel: [ 4136.715915] media_device_unregister_entity+0x30/0x40 kernel: [ 4136.715920] v4l2_device_unregister_subdev+0xa8/0xe0 kernel: [ 4136.715928] vimc_ent_sd_unregister+0x1e/0x30 [vimc] kernel: [ 4136.715933] vimc_sen_rm+0x16/0x20 [vimc] kernel: [ 4136.715938] vimc_remove+0x3e/0xa0 [vimc] kernel: [ 4136.715945] platform_drv_remove+0x25/0x50 kernel: [ 4136.715951] device_release_driver_internal+0xe0/0x1b0 kernel: [ 4136.715956] device_driver_detach+0x14/0x20 kernel: [ 4136.715960] unbind_store+0xd1/0x130 kernel: [ 4136.715965] drv_attr_store+0x27/0x40 kernel: [ 4136.715971] sysfs_kf_write+0x48/0x60 kernel: [ 4136.715976] kernfs_fop_write+0x128/0x1b0 kernel: [ 4136.715982] __vfs_write+0x1b/0x40 kernel: [ 4136.715987] vfs_write+0xc3/0x1d0 kernel: [ 4136.715993] ksys_write+0xaa/0xe0 kernel: [ 4136.715999] __x64_sys_write+0x1a/0x20 kernel: [ 4136.716005] do_syscall_64+0x5a/0x130 kernel: [ 4136.716010] entry_SYSCALL_64_after_hwframe+0x4 Signed-off-by: Shuah Khan Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f13d5f3619599d257b4bcb941245085f5d118af8 Author: Shuah Khan Date: Tue Sep 17 13:35:08 2019 -0300 media: vimc: Collapse component structure into a single monolithic driver vimc uses Component API to split the driver into functional components. The real hardware resembles a monolith structure than component and component structure added a level of complexity making it hard to maintain without adding any real benefit. The sensor is one vimc component that would makes sense to be a separate module to closely align with the real hardware. It would be easier to collapse vimc into single monolithic driver first and then split the sensor off as a separate module. Collapse it into a single monolithic driver removing the Component API. This patch removes the component API and makes minimal changes to the code base preserving the functional division of the code structure. Preserving the functional structure allows us to split the sensor off as a separate module in the future. Major design elements in this change are: - Use existing struct vimc_ent_config and struct vimc_pipeline_config to drive the initialization of the functional components. - Make vimc_device and vimc_ent_config global by moving them to vimc-common.h - Add two new hooks add and rm to initialize and register, unregister and free subdevs. - All component API is now gone and bind and unbind hooks are modified to do "add" and "rm" with minimal changes to just add and rm subdevs. - vimc-core's bind and unbind are now register and unregister. - Add a new field to vimc_device structure for saving the pointers to struct vimc_ent_device(s) subdevs create in their "add" hooks. These get used to create links and removing the subdevs. vimc-core allocates this array which sized to number of entries in the topology defined in the vimc_pipeline_config structure. - vimc-core invokes "add" hooks from its vimc_register_devices(). The "add" hooks remain the same and register subdevs. They don't create platform devices of their own and use vimc's pdev.dev as their reference device. Each "add" hook returns pointer to its struct vimc_ent_device. This is saved in the vimc_device ent_devs array. - vimc-core invokes "rm" hooks from its unregister to unregister subdevs and cleanup. - vimc-core invokes "add" and "rm" hooks with pointer to struct vimc_device and the corresponding vimc_ent_device saved in the ent_devs. The following configure and stream test works on all devices. media-ctl -d platform:vimc -V '"Sensor A":0[fmt:SBGGR8_1X8/640x480]' media-ctl -d platform:vimc -V '"Debayer A":0[fmt:SBGGR8_1X8/640x480]' media-ctl -d platform:vimc -V '"Sensor B":0[fmt:SBGGR8_1X8/640x480]' media-ctl -d platform:vimc -V '"Debayer B":0[fmt:SBGGR8_1X8/640x480]' v4l2-ctl -z platform:vimc -d "RGB/YUV Capture" -v width=1920,height=1440 v4l2-ctl -z platform:vimc -d "Raw Capture 0" -v pixelformat=BA81 v4l2-ctl -z platform:vimc -d "Raw Capture 1" -v pixelformat=BA81 v4l2-ctl --stream-mmap --stream-count=100 -d /dev/video1 v4l2-ctl --stream-mmap --stream-count=100 -d /dev/video2 v4l2-ctl --stream-mmap --stream-count=100 -d /dev/video3 Signed-off-by: Shuah Khan Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 713f871b30a66dc4daff4d17b760c9916aaaf2e1 Author: zhengbin Date: Sun Aug 18 22:51:30 2019 -0300 media: mc-device.c: fix memleak in media_device_register_entity In media_device_register_entity, if media_graph_walk_init fails, need to free the previously memory. Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 36909b552d0ea960732bc1450186f3e738bc41fc Author: Colin Ian King Date: Thu Sep 5 15:05:32 2019 -0300 media: i2c: mt9m001: make array init_regs static, makes object smaller Don't populate the array init_regs on the stack but instead make it static. Makes the object code smaller by 57 bytes. Before: text data bss dec hex filename 15935 3600 128 19663 4ccf drivers/media/i2c/mt9m001.o After: text data bss dec hex filename 15782 3696 128 19606 4c96 drivers/media/i2c/mt9m001.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c9e753767a9c75d2044fb7343950a6a992d34a16 Author: Thierry Reding Date: Tue Oct 1 13:48:29 2019 +0200 soc/tegra: pmc: Fix crashes for hierarchical interrupts Interrupts that don't have an associated wake event or GPIO wake events end up with an associate IRQ chip that is NULL and which causes IRQ code to crash. This is because we don't implicitly set the parent IRQ chip by allocating the interrupt at the parent. However, there really isn't a corresponding interrupt at the parent, so we need to work around this by setting the special no_irq_chip as the IRQ chip for these interrupts. Fixes: 19906e6b1667 ("soc/tegra: pmc: Add wake event support") Signed-off-by: Thierry Reding commit 050dbddf249eee3e936b5734c30b2e1b427efdc3 Author: Bart Van Assche Date: Mon Sep 30 16:16:56 2019 -0700 RDMA/siw: Fix port number endianness in a debug message sin_port and sin6_port are big endian member variables. Convert these port numbers into CPU endianness before printing. Link: https://lore.kernel.org/r/20190930231707.48259-5-bvanassche@acm.org Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Bart Van Assche Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit 23c1c13cdd556027ed6f886f37975bd59180efe7 Author: Bart Van Assche Date: Mon Sep 30 16:16:55 2019 -0700 RDMA/siw: Simplify several debug messages Do not print the remote address if it is not used. Use %pISp instead of %pI4 %d. Link: https://lore.kernel.org/r/20190930231707.48259-4-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit 0a728e0bda7c14921723362af86b0ba30e5d6c79 Author: Nagarjuna Kristam Date: Tue Sep 3 16:26:52 2019 +0530 soc/tegra: fuse: Add FUSE clock check in tegra_fuse_readl() tegra_fuse_readl() can be called from drivers at any time. If this API is called before tegra_fuse_probe(), we end up enabling the clock before it is registered. Add a check for the FUSE clock in tegra_fuse_readl() and propagate any errors. Signed-off-by: Nagarjuna Kristam Acked-by: Thierry Reding Signed-off-by: Thierry Reding commit 5a58252fa37f587edfed2d9d0d3c8b292b48ceb7 Author: Maciej Falkowski Date: Fri Sep 27 16:33:19 2019 +0200 dt-bindings: gpu: Convert Samsung 2D Graphics Accelerator to dt-schema Convert Samsung 2D Graphics Accelerator to newer dt-schema format Signed-off-by: Maciej Falkowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 671bc90e2207c56bd155af06ebfe6bf03b1c6819 Author: Maciej Falkowski Date: Fri Sep 27 16:33:06 2019 +0200 dt-bindings: gpu: Convert Samsung Image Scaler to dt-schema Convert Samsung Image Scaler to newer dt-schema format. Signed-off-by: Maciej Falkowski Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit bce3cff3a3031fd0ee73c8bd4a6c10437aaff0fe Author: Simon Horman Date: Mon Sep 30 13:52:04 2019 +0200 dt-bindings: bus: renesas-bsc: convert bindings to json-schema Convert Renesas Bus State Controller (BSC) bindings documentation to json-schema. Signed-off-by: Simon Horman Signed-off-by: Rob Herring commit 785ae7420af3e76a3ba683a297fe81c63d6efa30 Author: Simon Horman Date: Mon Sep 30 13:52:03 2019 +0200 dt-bindings: bus: simple-pm-bus: convert bindings to json-schema Convert Simple Power-Managed Bus bindings documentation to json-schema. As a side effect of this change only simple-pm-bus is used in example. A follow-up patch will provide an example for the separately documented Renesas Bus State Controller (BSC) that uses "renesas,bsc-sh73a0" and "renesas,bsc" compat strings. Signed-off-by: Simon Horman Signed-off-by: Rob Herring commit 4b73b6f7dca3ef29a68947746a6f3372b1cd96d9 Author: Krzysztof Kozlowski Date: Mon Sep 30 17:44:18 2019 +0200 dt-bindings: timer: Use defines instead of numbers in Exynos MCT examples Make the examples in Exynos Multi Core Timer bindings more readable and bring them closer to real DTS by using defines for interrupt flags. Fix also GIC interrupt type in example for Exynos4412 (from SPI to PPI). Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 65eba0db22743320376498555d0c47d65b400d53 Author: Krzysztof Kozlowski Date: Mon Sep 30 17:44:17 2019 +0200 dt-bindings: timer: Convert Exynos MCT bindings to json-schema Convert Samsung Exynos Soc Multi Core Timer bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit e22b86e97317cff590e3b0775fc2c842c1bff098 Author: Ville Syrjälä Date: Mon Sep 30 16:42:12 2019 +0300 drm/rect: Add drm_rect_init() Add a helper to initialize a rectangle from x/y/w/h information. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190930134214.24702-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 763ba2eca0f1a0b04529b4d118592c4dd387d53a Author: Ville Syrjälä Date: Mon Sep 30 16:42:11 2019 +0300 drm/rect: Add drm_rect_translate_to() Add a helper to translate a rectangle to an absolute position. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190930134214.24702-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e07f7927d52b89947fd32174a013742269cac3d8 Author: Jonathan Corbet Date: Tue Oct 1 08:43:21 2019 -0600 docs: No structured comments in kernel/dma/coherent.c Don't try to extract comments from that file, since there are none to be had and, seemingly, never have been. Signed-off-by: Jonathan Corbet commit f59769c52cd7d158df53487ec2936f5592073340 Author: Mihail Atanassov Date: Tue Oct 1 14:21:40 2019 +0000 drm/komeda: Workaround for broken FLIP_COMPLETE timestamps When initially turning a crtc on, drm_reset_vblank_timestamp will set the vblank timestamp to 0 for any driver that doesn't provide a ->get_vblank_timestamp() hook. Unfortunately, the FLIP_COMPLETE event depends on that timestamp, and the only way to regenerate a valid one is to have vblank interrupts enabled and have a valid in-ISR call to drm_crtc_handle_vblank. Additionally, if the user doesn't request vblanks but _does_ request FLIP_COMPLETE events, we still don't have a good timestamp: it'll be the same stamp as the last vblank one. Work around the issue by always enabling vblanks when the CRTC is on. Reducing the amount of time that PL0 has to be unmasked would be nice to fix at a later time. Changes since v1 [https://patchwork.freedesktop.org/patch/331727/]: - moved drm_crtc_vblank_put call to the ->atomic_disable() hook Cc: Daniel Vetter Cc: Liviu Dudau Signed-off-by: Mihail Atanassov Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Ayan kumar halder Link: https://patchwork.freedesktop.org/patch/msgid/20191001142121.13939-1-mihail.atanassov@arm.com commit befc1bab91171d25de22dbcbf41309582a63ecd7 Author: Vidya Sagar Date: Fri Aug 2 11:47:27 2019 +0530 firmware: tegra: Move BPMP resume to noirq phase Modules like PCIe in Tegra194 need BPMP firmware services in noirq phase and hence move BPMP resume to noirq phase. This patch is verified on Tegra210, Tegra186 and Tegra194. Signed-off-by: Vidya Sagar Reviewed-by: Timo Alho Signed-off-by: Thierry Reding commit 6eeff06db999bf9b17aaa52fddda4fd449726a64 Author: Max Gurtovoy Date: Wed Sep 25 00:05:48 2019 +0300 IB/iser: remove redundant macro definitions Use the general linux definition for 4K and retrieve the rest from it. Link: https://lore.kernel.org/r/1569359148-12312-1-git-send-email-maxg@mellanox.com Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 7718cf03c3ce4b6ebd90107643ccd01c952a1fce Author: Max Gurtovoy Date: Wed Sep 25 00:03:47 2019 +0300 IB/iser: bound protection_sg size by data_sg size In case we don't set the sg_prot_tablesize, the scsi layer assign the default size (65535 entries). We should limit this size since we should take into consideration the underlaying device capability. This cap is considered when calculating the sg_tablesize. Otherwise, for example, we can get that /sys/block/sdb/queue/max_segments is 128 and /sys/block/sdb/queue/max_integrity_segments is 65535. Link: https://lore.kernel.org/r/1569359027-10987-1-git-send-email-maxg@mellanox.com Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 70bcc63f84eaa08c53a14e669550cffc947ca3b7 Author: Max Gurtovoy Date: Tue Sep 24 00:32:49 2019 +0300 IB/iser: add unlikely checks in the fast path ib_post_send, ib_post_recv and ib_dma_map_sg operations should succeed unless something unusual happened to the ib device. Link: https://lore.kernel.org/r/1569274369-29217-1-git-send-email-maxg@mellanox.com Signed-off-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit b05cec61c703afc64abc42cd79dda8e4ddef7659 Author: Rishi Gupta Date: Fri Sep 20 08:05:01 2019 +0530 HID: hidraw: replace printk() with corresponding pr_xx() variant This commit replaces direct invocations of printk with their appropriate pr_info/warn() variant. Signed-off-by: Rishi Gupta Signed-off-by: Jiri Kosina commit b543db46b47dc075535a5adf93460b611d669598 Author: Dmitry Torokhov Date: Fri Sep 13 15:03:17 2019 -0700 HID: google: whiskers: signal tablet mode on connect When we receive "keyboard position" event from Whiskers we can conclude that the base is attached, even if we did not get EC event for that. We may miss EC event because there are some units which have a lot of leakage on the ADC pins that the EC uses to determine whether or not a base is attached. Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit 79085c7dd24b7acd546f5b283d3f2319a9edbbd8 Author: Dmitry Torokhov Date: Fri Sep 13 15:03:16 2019 -0700 HID: google: whiskers: signal tablet mode switch on disconnect Currently, the tablet mode switch that takes two signals as its input: base attached switch from the EC and some GMR signal from whiskers when it's folded over. This tablet mode switch is then sent to Chrome, which changes the UI. However, there are some units which have a lot of leakage on the ADC pins that the EC uses to determine whether or not a base is attached. This can result in the base being physically detached, but the EC thinking that it's still attached. The user would then be stuck in laptop mode and wouldn't be able to rotate their display. To work around this let's send "tablet mode" signal when we remove HID interface, which normally happens when we physically disconnect whiskers. Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit 38e57f0693ad1b9a785b4f542ec019c5fdf91d57 Author: Dmitry Torokhov Date: Fri Sep 13 15:03:15 2019 -0700 HID: google: whiskers: more robust tablet mode detection The USB interface may get detected before the platform/EC one, so let's note the state of the base (if we receive event) and use it to correctly initialize the tablet mode switch state. Also let's start the HID interface immediately when probing, this will ensure that we correctly process "base folded" events that may be sent as we initialize the base. Note that this requires us to add a remove() function where we stop and close the hardware and switch the LED registration away from devm interface as we need to make sure that we destroy the LED instance before we stop the hardware. Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit 811ae8ba6dca6b91a3ceccf9d40b98818cc4f400 Author: Borislav Petkov Date: Sat Aug 24 10:01:53 2019 +0200 x86/microcode/intel: Issue the revision updated message only on the BSP ... in order to not pollute dmesg with a line for each updated microcode engine. Signed-off-by: Borislav Petkov Cc: Ashok Raj Cc: Boris Ostrovsky Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jon Grimm Cc: kanth.ghatraju@oracle.com Cc: konrad.wilk@oracle.com Cc: Mihai Carabas Cc: patrick.colp@oracle.com Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/20190824085341.GC16813@zn.tnic commit 93946a33b5693a6bbcf917a170198ff4afaa7a31 Author: Ashok Raj Date: Thu Aug 22 23:43:47 2019 +0300 x86/microcode: Update late microcode in parallel Microcode update was changed to be serialized due to restrictions after Spectre days. Updating serially on a large multi-socket system can be painful since it is being done on one CPU at a time. Cloud customers have expressed discontent as services disappear for a prolonged time. The restriction is that only one core (or only one thread of a core in the case of an SMT system) goes through the update while other cores (or respectively, SMT threads) are quiesced. Do the microcode update only on the first thread of each core while other siblings simply wait for this to complete. [ bp: Simplify, massage, cleanup comments. ] Signed-off-by: Ashok Raj Signed-off-by: Mihai Carabas Signed-off-by: Borislav Petkov Cc: Boris Ostrovsky Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jon Grimm Cc: kanth.ghatraju@oracle.com Cc: konrad.wilk@oracle.com Cc: patrick.colp@oracle.com Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/1566506627-16536-2-git-send-email-mihai.carabas@oracle.com commit 3e3e24b42043eceb97ed834102c2d094dfd7aaa6 Author: Jonathan Lebon Date: Thu Sep 12 09:30:07 2019 -0400 selinux: allow labeling before policy is loaded Currently, the SELinux LSM prevents one from setting the `security.selinux` xattr on an inode without a policy first being loaded. However, this restriction is problematic: it makes it impossible to have newly created files with the correct label before actually loading the policy. This is relevant in distributions like Fedora, where the policy is loaded by systemd shortly after pivoting out of the initrd. In such instances, all files created prior to pivoting will be unlabeled. One then has to relabel them after pivoting, an operation which inherently races with other processes trying to access those same files. Going further, there are use cases for creating the entire root filesystem on first boot from the initrd (e.g. Container Linux supports this today[1], and we'd like to support it in Fedora CoreOS as well[2]). One can imagine doing this in two ways: at the block device level (e.g. laying down a disk image), or at the filesystem level. In the former, labeling can simply be part of the image. But even in the latter scenario, one still really wants to be able to set the right labels when populating the new filesystem. This patch enables this by changing behaviour in the following two ways: 1. allow `setxattr` if we're not initialized 2. don't try to set the in-core inode SID if we're not initialized; instead leave it as `LABEL_INVALID` so that revalidation may be attempted at a later time Note the first hunk of this patch is mostly the same as a previously discussed one[3], though it was part of a larger series which wasn't accepted. [1] https://coreos.com/os/docs/latest/root-filesystem-placement.html [2] https://github.com/coreos/fedora-coreos-tracker/issues/94 [3] https://www.spinics.net/lists/linux-initramfs/msg04593.html Co-developed-by: Victor Kamensky Signed-off-by: Victor Kamensky Signed-off-by: Jonathan Lebon Signed-off-by: Paul Moore commit 663912a6378a34fd4f43b8d873f0c6c6322d9d0e Author: Mark Zhang Date: Mon Sep 16 10:11:52 2019 +0300 RDMA/counter: Prevent QP counter manual binding in auto mode If auto mode is configured, manual counter allocation and QP bind is not allowed. Fixes: 1bd8e0a9d0fd ("RDMA/counter: Allow manual mode configuration support") Link: https://lore.kernel.org/r/20190916071154.20383-3-leon@kernel.org Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e40642dc01b87a8b202ce39013b0a4881025a816 Author: zhanglin Date: Sat Sep 21 09:57:15 2019 +0800 selinux: remove load size limit Load size was limited to 64MB, this was legacy limitation due to vmalloc() which was removed a while ago. Signed-off-by: zhanglin [PM: removed comments in the description about 'real world use cases'] Signed-off-by: Paul Moore commit e18409c0589f0abf97d706781e4415f9e89dcef7 Author: Christoph Hellwig Date: Tue Sep 17 09:15:23 2019 +0200 Documentation: document earlycon without options for more platforms The earlycon options without arguments is supposed to work on all device tree platforms, not just arm64. Signed-off-by: Christoph Hellwig Signed-off-by: Jonathan Corbet commit 0522e130b00a6c20fcf335f41e8b4d2ff3c0ffea Author: Adam Zerella Date: Sun Sep 15 18:20:10 2019 +1000 docs: perf: Add imx-ddr to documentation index Sphinx is currently outputting a warning where the file 'imx-ddr.rst' is not included in the documentation index. Additionally, the code highlighting and doc formatting can be slightly improved. Signed-off-by: Adam Zerella Signed-off-by: Jonathan Corbet commit 81929718b866bbd8c0be3920bf7a91ec30140283 Merge: 2730ce017fa6 f861537d5f85 Author: Jonathan Corbet Date: Tue Oct 1 07:03:13 2019 -0600 Merge branch 'dump-struct' into docs-next André Almeida writes: The current way that scripts/kernel-doc dump structs do not work for nested structs with attributes (e.g. __packed) and without type alias (e.g } alias1;). This is due to the way nested structs members are parsed. Inside dump_struct(), the regex removes attributes and it surrounds whitespaces. After that, it will do a foreach(id) loop for each alias. However, we will have an empty string, and then the split function will return nothing and the foreach will not have any iteration. The code will then jump the loop and the substitution will fail since $newmember is uninitialized. This bug does not happen when the nested struct has no alias and no attribute, since at process_proto_type() a whitespace is inserted in order to ensure that the split will not fail. However, with any attribute, this whitespace will be removed. This patch solves this by replacing attributes with one whitespace, to ensure that will have at least one whitespace. Besides solving this bug at patch 1, I also add support for the ____cacheline_aligned_in_smp atribute at patch 2. For testing and reproducing, create a file `code.h`: /** * struct foobar - description * @number0: desc0 * @number1: desc1 * @number2: desc2 */ struct foo { int number0; struct { int number1; } __packed; struct { int number2; }; }; I've tested with CRYPTO_MINALIGN_ATTR, __attribute__((__aligned__(8))) and __aligned() as well. Now, run the `./script/kernel-doc code.h`, and this is the output: Use of uninitialized value $newmember in substitution (s///) at ./scripts/kernel-doc line 1152, line 18. .. c:type:: struct foo description **Definition** :: struct foo { int number0; struct { int number1; }; struct { int number2; }; }; **Members** ``number0`` desc0 ``{unnamed_struct}`` anonymous ``number2`` desc2 The output will not display the member number1 and will also display an uninitialized warning. Running after the patch will get rid of the warning and also display the description for number1: [...] **Members** ``number0`` desc0 ``{unnamed_struct}`` anonymous ``number1`` desc1 ``{unnamed_struct}`` anonymous ``number2`` desc2 To test patch [2/2], just replace __packed for ____cacheline_aligned_in_smp and compare how, at the previous stage the script believes ____cacheline... is an alias for the struct and after the patch it is removed just as the others attributes. Finally, I have compared the output of "make htmldocs" with and without this patch. No new warning were found and one warning regarding ____cacheline_aligned_in_smp at include/linux/netdevice.h was removed. commit f861537d5f856f8bffc7ddd1f9c1a59bfed0012a Author: André Almeida Date: Tue Sep 17 16:41:46 2019 -0300 kernel-doc: add support for ____cacheline_aligned_in_smp 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_in_smp` is an attribute that is not included in both steps. Add it, since it is used by kernel structs. Signed-off-by: André Almeida Signed-off-by: Jonathan Corbet commit 2b5f78e5e942d76e5497f53c2298900224b52c51 Author: André Almeida Date: Tue Sep 17 16:41:45 2019 -0300 kernel-doc: fix processing nested structs with attributes The current regular expression for strip attributes of structs (and for nested ones as well) also removes all whitespaces that may surround the attribute. After that, the code will split structs and iterate for each symbol separated by comma at the end of struct definition (e.g. "} alias1, alias2;"). However, if the nested struct does not have any alias and has an attribute, it will result in a empty string at the closing bracket (e.g "};"). This will make the split return nothing and $newmember will keep uninitialized. Fix that, by ensuring that the attribute substitution will leave at least one whitespace. Signed-off-by: André Almeida Signed-off-by: Jonathan Corbet commit 2730ce017fa6df49bad9ad932932b863f63a4b50 Author: Shuah Khan Date: Wed Sep 18 18:37:54 2019 -0600 scripts/sphinx-pre-install: add how to exit virtualenv usage message Add usage message on how to exit the virtualenv after documentation work is done. Signed-off-by: Shuah Khan Signed-off-by: Jonathan Corbet commit 6ee0fac199e108f544b0ac23b2419a03ff6dc18f Author: Jon Haslam Date: Wed Sep 25 12:56:04 2019 -0700 docs: fix memory.low description in cgroup-v2.rst The current cgroup-v2.rst file contains an incorrect description of when memory is reclaimed from a cgroup that is using the 'memory.low' mechanism. This fix simply corrects the text to reflect the actual implementation. Fixes: 7854207fe954 ("mm/docs: describe memory.low refinements") Signed-off-by: Jon Haslam Acked-by: Roman Gushchin Signed-off-by: Jonathan Corbet commit 2c861bf5e6ff2353239ada5535dfbbe1314ac13b Author: Jeremy Cline Date: Wed Sep 25 14:31:14 2019 +0000 docs: kmemleak: DEBUG_KMEMLEAK_EARLY_LOG_SIZE changed names Commit c5665868183f ("mm: kmemleak: use the memory pool for early allocations") renamed CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE to CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE. Update the documentation reference to reflect that. Fixes: c5665868183f ("mm: kmemleak: use the memory pool for early allocations") Signed-off-by: Jeremy Cline Acked-by: Catalin Marinas Signed-off-by: Jonathan Corbet commit 6795b29c1ca04d5779885fbb5c971f14ec722d55 Author: Brendan Jackman Date: Wed Sep 25 17:17:44 2019 +0700 docs: security: fix section hyperlink The reStructuredText syntax is wrong here; not sure how it was intended but we can just use the section header as an implicit hyperlink target, with a single "outward" underscore. Signed-off-by: Brendan Jackman Signed-off-by: Jonathan Corbet commit 9fde576f78740d6dfdc5395aa7f1652369bc6e3f Author: Martin Kepplinger Date: Tue Sep 24 08:28:03 2019 +0200 CREDITS: update email address for Martin Kepplinger Employers change - Linux stays. Also, add my (long time valid) GPG key fingerprint to the contact details. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet commit 631604b492010c92d7ffe887fd05a9fba18f0cc7 Author: Martin Kepplinger Date: Tue Sep 24 08:28:02 2019 +0200 mailmap: add new email address for Martin Kepplinger Include my new email address for tracking my contributions. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet commit 29efbb24d992564db4bbb808597719934ed9ac9f Author: Kees Cook Date: Tue Sep 24 16:29:58 2019 -0700 docs: Use make invocation's -j argument for parallelism While sphinx 1.7 and later supports "-jauto" for parallelism, this effectively ignores the "-j" flag used in the "make" invocation, which may cause confusion for build systems. Instead, extract the available parallelism from "make"'s job server (since it is not exposed in any special variables) and use that for the "sphinx-build" run. Now things work correctly for builds where -j is specified at the top-level: make -j16 htmldocs If -j is not specified, continue to fallback to "-jauto" if available. Signed-off-by: Kees Cook Signed-off-by: Jonathan Corbet commit b204731689059f0e27b676e86b089d59bd1a4805 Author: Christoph Hellwig Date: Tue Sep 10 07:58:33 2019 +0200 of/fdt: don't ignore errors from of_setup_earlycon If of_setup_earlycon we should keep on iterating earlycon options instead of breaking out of the loop. Signed-off-by: Christoph Hellwig Signed-off-by: Rob Herring commit 1f947a863dfcb6787c38a94403db6b455fcb76fc Author: Krzysztof Kozlowski Date: Fri Sep 20 18:26:00 2019 +0200 dt-bindings: arm: samsung: Convert Exynos PMU bindings to json-schema Convert Samsung Exynos Power Management Unit (PMU) bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit cd392f15ccfda0c0eecc609617100a4e98d836cf Author: Krzysztof Kozlowski Date: Fri Sep 20 18:25:59 2019 +0200 dt-bindings: arm: samsung: Convert Exynos System Registers bindings to json-schema Convert Samsung Exynos System Registers (SYSREG) bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit d500314a47faa9152dd2de146847e29744f72420 Author: Yoshihiro Kaneko Date: Fri Sep 20 02:48:31 2019 +0900 dt-bindings: irqchip: renesas-irqc: convert bindings to json-schema Convert Renesas Interrupt Controller bindings documentation to json-schema. Signed-off-by: Yoshihiro Kaneko Reviewed-by: Simon Horman Signed-off-by: Rob Herring commit 3b76f4e1d1537a6164ea8f8456cc46671cdbd28c Author: Maciej Falkowski Date: Thu Sep 19 15:19:44 2019 +0200 dt-bindings: iommu: Convert Samsung Exynos IOMMU H/W, System MMU to dt-schema Convert Samsung Exynos IOMMU H/W, System Memory Management Unit to newer dt-schema format. Signed-off-by: Maciej Falkowski Signed-off-by: Andrzej Hajda Signed-off-by: Marek Szyprowski Signed-off-by: Rob Herring commit 9dacf8b5b16942b1de84ecc2997b836970ceffae Author: Krzysztof Kozlowski Date: Sat Sep 7 11:20:07 2019 +0200 dt-bindings: iio: adc: exynos: Remove old requirement of two register address ranges Commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU register access") changed the Exynos ADC driver so the PMU syscon phandle is required instead of second register address space. The bindings were not updated so fix them now. Signed-off-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Signed-off-by: Rob Herring commit b356ceb3c0c6b68991a4b3ae270dd1b8cd0cfb1b Author: Krzysztof Kozlowski Date: Sat Sep 7 11:20:06 2019 +0200 dt-bindings: iio: adc: exynos: Convert Exynos ADC bindings to json-schema Convert Samsung Exynos Analog to Digital Converter bindings to DT schema format using json-schema. This is a direct conversion of existing bindings so it also copies the existing error in the bindings regarding the requirement of two register address ranges for certain compatibles. The inconsistency in binding was caused by commit fafb37cfae6d ("iio: exyno-adc: use syscon for PMU register access"). Signed-off-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Signed-off-by: Rob Herring commit 81bedcc724504d1f42823e304000f0a46bd3fbdc Author: Krzysztof Kozlowski Date: Sat Sep 7 11:20:05 2019 +0200 dt-bindings: rtc: s3c: Convert S3C/Exynos RTC bindings to json-schema Convert Samsung S3C/Exynos Real Time Clock bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit daa629cdba21faf6bff3f5bc6ab1a1e42cbe86e9 Author: Krzysztof Kozlowski Date: Sat Sep 7 11:20:02 2019 +0200 dt-bindings: arm: samsung: Convert Exynos Chipid bindings to json-schema Convert Samsung Exynos Chipid bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 1bc2711c39949f66a9e0df9bb50c7a20e8a0b009 Author: Krzysztof Kozlowski Date: Sat Sep 7 11:20:01 2019 +0200 dt-bindings: arm: samsung: Document missing Exynos7 boards bindings Add missing documentation of ARMv8 Samsung Exynos7 SoC based boards bindings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit e557d383486e323ee245908d57dfad5252554601 Author: Krzysztof Kozlowski Date: Sat Sep 7 11:20:00 2019 +0200 dt-bindings: arm: samsung: Document missing S5Pv210 boards bindings Add missing documentation of Samsung S5Pv210 SoC based boards bindings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 3412bef684d83b0b7b248c98c964e67acdad2e2a Author: Krzysztof Kozlowski Date: Sat Sep 7 11:19:59 2019 +0200 dt-bindings: arm: samsung: Convert Samsung board/soc bindings to json-schema Convert Samsung S5P and Exynos SoC bindings to DT schema format using json-schema. This is purely conversion of already documented bindings so it does not cover all of DTS in the Linux kernel (few S5P/Exynos and all S3C are missing). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 67e4a47a076a6853009970af8c6df52d9299334c Author: Krzysztof Kozlowski Date: Sat Sep 7 11:19:58 2019 +0200 dt-bindings: power: syscon-poweroff: Convert bindings to json-schema Convert the Syscon poweroff bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit d3895c2a8682762e8c404a2d7830b774ec74d0e2 Author: Krzysztof Kozlowski Date: Sat Sep 7 11:19:57 2019 +0200 dt-bindings: power: syscon-reboot: Convert bindings to json-schema Convert the Syscon reboot bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 6e3ffcd592060403ee2d956c9b1704775898db79 Author: Maciej Falkowski Date: Tue Sep 17 12:37:27 2019 +0200 dt-bindings: gpu: Convert Samsung Image Rotator to dt-schema Convert Samsung Image Rotator to newer dt-schema format. Signed-off-by: Maciej Falkowski Signed-off-by: Marek Szyprowski Signed-off-by: Rob Herring commit 99785b86eead0934dffc1b36f3e5820d0c87e69f Author: Srinivasan S Date: Wed Sep 25 06:05:42 2019 +0530 drm/i915/dp: Fix DP MST error after unplugging TypeC cable This patch avoids DP MST payload error message in dmesg, as it is trying to update the payload to the disconnected DP MST device. After DP MST device is disconnected we should not be updating the payload and hence remove the error. v2: Removed the connector status check and converted from error to debug. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111632 Signed-off-by: Srinivasan S Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1569371742-109402-1-git-send-email-srinivasan.s@intel.com commit cd486e627e67ee9ab66914d36d3127ef057cc010 Author: Masashi Honma Date: Fri Sep 27 11:51:46 2019 +0900 ath9k_htc: Discard undersized packets Sometimes the hardware will push small packets that trigger a WARN_ON in mac80211. Discard them early to avoid this issue. This patch ports 2 patches from ath9k to ath9k_htc. commit 3c0efb745a172bfe96459e20cbd37b0c945d5f8d "ath9k: discard undersized packets". commit df5c4150501ee7e86383be88f6490d970adcf157 "ath9k: correctly handle short radar pulses". [ 112.835889] ------------[ cut here ]------------ [ 112.835971] WARNING: CPU: 5 PID: 0 at net/mac80211/rx.c:804 ieee80211_rx_napi+0xaac/0xb40 [mac80211] [ 112.835973] Modules linked in: ath9k_htc ath9k_common ath9k_hw ath mac80211 cfg80211 libarc4 nouveau snd_hda_codec_hdmi intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_hda_codec video snd_hda_core ttm snd_hwdep drm_kms_helper snd_pcm crct10dif_pclmul snd_seq_midi drm snd_seq_midi_event crc32_pclmul snd_rawmidi ghash_clmulni_intel snd_seq aesni_intel aes_x86_64 crypto_simd cryptd snd_seq_device glue_helper snd_timer sch_fq_codel i2c_algo_bit fb_sys_fops snd input_leds syscopyarea sysfillrect sysimgblt intel_cstate mei_me intel_rapl_perf soundcore mxm_wmi lpc_ich mei kvm_intel kvm mac_hid irqbypass parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid hid raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear e1000e ahci libahci wmi [ 112.836022] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 5.3.0-wt #1 [ 112.836023] Hardware name: MouseComputer Co.,Ltd. X99-S01/X99-S01, BIOS 1.0C-W7 04/01/2015 [ 112.836056] RIP: 0010:ieee80211_rx_napi+0xaac/0xb40 [mac80211] [ 112.836059] Code: 00 00 66 41 89 86 b0 00 00 00 e9 c8 fa ff ff 4c 89 b5 40 ff ff ff 49 89 c6 e9 c9 fa ff ff 48 c7 c7 e0 a2 a5 c0 e8 47 41 b0 e9 <0f> 0b 48 89 df e8 5a 94 2d ea e9 02 f9 ff ff 41 39 c1 44 89 85 60 [ 112.836060] RSP: 0018:ffffaa6180220da8 EFLAGS: 00010286 [ 112.836062] RAX: 0000000000000024 RBX: ffff909a20eeda00 RCX: 0000000000000000 [ 112.836064] RDX: 0000000000000000 RSI: ffff909a2f957448 RDI: ffff909a2f957448 [ 112.836065] RBP: ffffaa6180220e78 R08: 00000000000006e9 R09: 0000000000000004 [ 112.836066] R10: 000000000000000a R11: 0000000000000001 R12: 0000000000000000 [ 112.836068] R13: ffff909a261a47a0 R14: 0000000000000000 R15: 0000000000000004 [ 112.836070] FS: 0000000000000000(0000) GS:ffff909a2f940000(0000) knlGS:0000000000000000 [ 112.836071] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 112.836073] CR2: 00007f4e3ffffa08 CR3: 00000001afc0a006 CR4: 00000000001606e0 [ 112.836074] Call Trace: [ 112.836076] [ 112.836083] ? finish_td+0xb3/0xf0 [ 112.836092] ? ath9k_rx_prepare.isra.11+0x22f/0x2a0 [ath9k_htc] [ 112.836099] ath9k_rx_tasklet+0x10b/0x1d0 [ath9k_htc] [ 112.836105] tasklet_action_common.isra.22+0x63/0x110 [ 112.836108] tasklet_action+0x22/0x30 [ 112.836115] __do_softirq+0xe4/0x2da [ 112.836118] irq_exit+0xae/0xb0 [ 112.836121] do_IRQ+0x86/0xe0 [ 112.836125] common_interrupt+0xf/0xf [ 112.836126] [ 112.836130] RIP: 0010:cpuidle_enter_state+0xa9/0x440 [ 112.836133] Code: 3d bc 20 38 55 e8 f7 1d 84 ff 49 89 c7 0f 1f 44 00 00 31 ff e8 28 29 84 ff 80 7d d3 00 0f 85 e6 01 00 00 fb 66 0f 1f 44 00 00 <45> 85 ed 0f 89 ff 01 00 00 41 c7 44 24 10 00 00 00 00 48 83 c4 18 [ 112.836134] RSP: 0018:ffffaa61800e3e48 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffde [ 112.836136] RAX: ffff909a2f96b340 RBX: ffffffffabb58200 RCX: 000000000000001f [ 112.836137] RDX: 0000001a458adc5d RSI: 0000000026c9b581 RDI: 0000000000000000 [ 112.836139] RBP: ffffaa61800e3e88 R08: 0000000000000002 R09: 000000000002abc0 [ 112.836140] R10: ffffaa61800e3e18 R11: 000000000000002d R12: ffffca617fb40b00 [ 112.836141] R13: 0000000000000002 R14: ffffffffabb582d8 R15: 0000001a458adc5d [ 112.836145] ? cpuidle_enter_state+0x98/0x440 [ 112.836149] ? menu_select+0x370/0x600 [ 112.836151] cpuidle_enter+0x2e/0x40 [ 112.836154] call_cpuidle+0x23/0x40 [ 112.836156] do_idle+0x204/0x280 [ 112.836159] cpu_startup_entry+0x1d/0x20 [ 112.836164] start_secondary+0x167/0x1c0 [ 112.836169] secondary_startup_64+0xa4/0xb0 [ 112.836173] ---[ end trace 9f4cd18479cc5ae5 ]--- Signed-off-by: Masashi Honma Signed-off-by: Kalle Valo commit e01fddc19d215f6ad397894ec2a851d99bf154e2 Author: Masashi Honma Date: Fri Sep 27 11:51:45 2019 +0900 ath9k_htc: Modify byte order for an error message rs_datalen is be16 so we need to convert it before printing. Signed-off-by: Masashi Honma Signed-off-by: Kalle Valo commit 182a1d8bc4ed30f5e0bb7fb52606fa1888430ca4 Author: YueHaibing Date: Sat Sep 28 16:55:40 2019 +0800 regulator: pcap-regulator: remove unused variable 'SW3_table' drivers/regulator/pcap-regulator.c:89:27: warning: SW3_table defined but not used [-Wunused-const-variable=] It is never used, so can be removed. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190928085540.45332-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit bdde4718aba368c33705ccff8f3e29586d41b69b Author: Christophe JAILLET Date: Sun Sep 15 21:34:01 2019 +0200 iommu/arm-smmu: Axe a useless test in 'arm_smmu_master_alloc_smes()' 'iommu_group_get_for_dev()' never returns NULL, so this test can be removed. Reviewed-by: Robin Murphy Signed-off-by: Christophe JAILLET Signed-off-by: Will Deacon commit 9062c1d0bedacf68d9c92cbd62c62a6fe6f6cebc Author: Christophe JAILLET Date: Mon Sep 9 22:19:19 2019 +0200 iommu/io-pgtable: Move some initialization data to .init.rodata The memory used by '__init' functions can be freed once the initialization phase has been performed. Mark some 'static const' array defined and used within some '__init' functions as '__initconst', so that the corresponding data can also be discarded. Without '__initconst', the data are put in the .rodata section. With the qualifier, they are put in the .init.rodata section. With gcc 8.3.0, the following changes have been measured: Without '__initconst': section size .rodata 00000720 .init.rodata 00000018 With '__initconst': section size .rodata 00000660 .init.rodata 00000058 Signed-off-by: Christophe JAILLET Signed-off-by: Will Deacon commit 1b0a2b2d3ccb98cf998816d87f7193139d54579e Author: Colin Ian King Date: Thu Sep 26 12:37:01 2019 +0100 spi: fsl-lpspi: clean up indentation issue The complete call is indented incorrectly, remove the extraneous tabs. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190926113701.26986-1-colin.king@canonical.com Signed-off-by: Mark Brown commit c8b0de762e0b7cf9f51ad13b19bd279809317f37 Author: YueHaibing Date: Mon Sep 9 09:22:57 2019 +0800 perf/smmuv3: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Will Deacon commit f4b323905d8b3e28b2a9cef9325dbec1b0f7f064 Author: Lukasz Majewski Date: Tue Sep 24 13:05:47 2019 +0200 spi: Introduce dspi_slave_abort() function for NXP's dspi SPI driver This change provides the dspi_slave_abort() function, which is a callback for slave_abort() method of SPI controller generic driver. As in the SPI slave mode the transmission is driven by master, any distortion may cause the slave to enter undefined internal state. To avoid this problem the dspi_slave_abort() terminates all pending and ongoing DMA transactions (with sync) and clears internal FIFOs. Signed-off-by: Lukasz Majewski Link: https://lore.kernel.org/r/20190924110547.14770-3-lukma@denx.de Signed-off-by: Mark Brown commit 3f049e7df22e563b04fd576bdc37e6b3e2c7a996 Author: Markus Elfring Date: Sat Sep 21 15:35:08 2019 +0200 spi: xtensa-xtfpga: Use devm_platform_ioremap_resource() in xtfpga_spi_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/178bb78e-714f-645f-d819-5732870c4272@web.de Signed-off-by: Mark Brown commit 6cdcb5d394413d906773f1ae2efaa86485d6d6e1 Author: Markus Elfring Date: Sat Sep 21 15:12:33 2019 +0200 spi: mediatek: Use devm_platform_ioremap_resource() in mtk_spi_slave_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/225b76ca-a367-4bef-d8ce-42c7af9242a5@web.de Signed-off-by: Mark Brown commit 5dd381e71994ab554f711afe89b5a6157bdcd19d Author: Markus Elfring Date: Sat Sep 21 14:45:40 2019 +0200 spi: mediatek: Use devm_platform_ioremap_resource() in mtk_spi_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/478e0df1-e800-8cf1-f9b3-d72f8e26aa0b@web.de Signed-off-by: Mark Brown commit 22262695f46b68659ba98a12e275df388c74968c Author: Markus Elfring Date: Sat Sep 21 14:16:49 2019 +0200 spi: lantiq-ssc: Use devm_platform_ioremap_resource() in lantiq_ssc_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/230495a7-b754-bc6a-05e0-059a6b6c643d@web.de Signed-off-by: Mark Brown commit 539ff2488af87f25f2c090fd74ced55bd966e5a9 Author: Miquel Raynal Date: Thu Sep 19 22:25:02 2019 +0200 spi: mxic: Ensure width is respected in spi-mem operations Make use of a core helper to ensure the desired width is respected when calling spi-mem operators. Suggested-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20190919202504.9619-2-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit e61bb114d41ddf6ae5bf05a0109fc13116550c7d Author: Gregory CLEMENT Date: Thu Sep 19 17:40:34 2019 +0200 spi: atmel: Remove AVR32 leftover AV32 support has been from the kernel a few release ago, but there was still some specific macro for this architecture in this driver. Lets remove it. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20190919154034.7489-1-gregory.clement@bootlin.com Signed-off-by: Mark Brown commit 3ade3a37bdd77319dd7865228402cf1669c9b678 Author: Phil Edworthy Date: Wed Sep 18 09:04:36 2019 +0100 spi: dw: Add compatible string for Renesas RZ/N1 SPI Controller The Renesas RZ/N1 SPI Controller is based on the Synopsys DW SSI, but has additional registers for software CS control and DMA. This patch does not address the changes required for DMA support, it simply adds the compatible string. The CS registers are not needed as Linux can use gpios for the CS signals. Signed-off-by: Gareth Williams Signed-off-by: Phil Edworthy Link: https://lore.kernel.org/r/1568793876-9009-5-git-send-email-gareth.williams.jx@renesas.com Signed-off-by: Mark Brown commit 1e695983251029dc0b0fc516290077539df400ff Author: Phil Edworthy Date: Wed Sep 18 09:04:35 2019 +0100 spi: dw: Add basic runtime PM support Enable runtime PM so that the clock used to access the registers in the peripheral is turned on using a clock domain. Signed-off-by: Phil Edworthy Signed-off-by: Gareth Williams Link: https://lore.kernel.org/r/1568793876-9009-4-git-send-email-gareth.williams.jx@renesas.com Signed-off-by: Mark Brown commit 47cf13bc763c891c6192184c5e5aa8c1b331b2ff Author: Gareth Williams Date: Wed Sep 18 09:04:34 2019 +0100 dt-bindings: snps,dw-apb-ssi: Add optional clock domain information Note in the bindings documentation that pclk should be renamed if a clock domain is used to enable the optional bus clock. Signed-off-by: Gareth Williams Link: https://lore.kernel.org/r/1568793876-9009-3-git-send-email-gareth.williams.jx@renesas.com Signed-off-by: Mark Brown commit da182a61fce01dbd7c4a78c68a34af110f00e36f Author: Phil Edworthy Date: Wed Sep 18 09:04:33 2019 +0100 dt: spi: Add Renesas RZ/N1 binding documentation The Renesas RZ/N1 SPI Controller is based on the Synopsys DW SSI, but has additional registers for software CS control and DMA. This patch does not address the changes required for DMA support, it simply adds the compatible string. The CS functionality is not very useful and also not needed as Linux can use gpios for the CS signals. Add a compatible string to handle any unforeseen issues that may arise, and pave the way for DMA support. Signed-off-by: Gareth Williams Signed-off-by: Phil Edworthy Link: https://lore.kernel.org/r/1568793876-9009-2-git-send-email-gareth.williams.jx@renesas.com Signed-off-by: Mark Brown commit 9c12e34a3be127454b26054043c3b302bca08fdc Author: Pragnesh Patel Date: Wed Sep 18 16:38:39 2019 +0530 spi: dt-bindings: Convert spi-sifive binding to json-schema Convert the spi-sifive binding to DT schema format. Signed-off-by: Pragnesh Patel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1568804927-13565-1-git-send-email-pragnesh.patel@sifive.com Signed-off-by: Mark Brown commit 85d27be81e39323c8e3c1151e4858b26d7e1b20d Author: Simon Horman Date: Mon Sep 16 09:53:52 2019 +0200 dt-bindings: hspi: Convert bindings to json-schema Convert Renesas HSPI bindings documentation to json-schema. Also name bindings documentation file according to the compat string being documented. As a side effect of this change all currently supported/used compat strings are listed while no while card compat string is documented. This, in my opinion, is desirable as only supported hardware should be documented. Signed-off-by: Simon Horman Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20190916075352.32108-1-horms+renesas@verge.net.au Signed-off-by: Mark Brown commit e62cb0e0002ceb1a761b4dd7bb6a2bfc77a1ae77 Author: Axel Lin Date: Thu Sep 26 13:51:28 2019 +0800 regulator: da9063: Simplify da9063_buck_set_mode for BUCK_MODE_MANUAL case The sleep flag bit decides the mode for BUCK_MODE_MANUAL case, simplify the logic as the result is the same. Signed-off-by: Axel Lin Reviewed-by: Adam Thomson Link: https://lore.kernel.org/r/20190926055128.23434-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 41145b980e3f4c7c26763fae0379f1cb8f336868 Author: Axel Lin Date: Wed Sep 25 18:12:56 2019 +0800 regulator: pbias: Use of_device_get_match_data Use of_device_get_match_data to simplify the code a bit. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20190925101256.19030-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 2e36e140b8b8de4023dd0b85e099567ee88cf872 Author: Angelo G. Del Regno Date: Sat Sep 21 11:50:43 2019 +0200 regulator: qcom_spmi: Add support for PM8004 regulators This Power IC is used in combination with various PMIC combos, generally found on boards with MSM8992, MSM8994, MSM8996, MSM8956, MSM8976 and others, usually at address 0x5 on the SPMI bus, and its usual usage is to provide power to the GPU and/or to the CPU clusters (APC0/APC1). Signed-off-by: Angelo G. Del Regno Link: https://lore.kernel.org/r/20190921095043.62593-6-kholk11@gmail.com Signed-off-by: Mark Brown commit 504db0f82660898cbb76478cb2eaee46817c85b8 Author: YueHaibing Date: Fri Sep 6 22:40:14 2019 +0800 perf/arm-cci: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Will Deacon commit 1c8d96b41d8b05ed9dbc2bea03edf878f544f93e Author: YueHaibing Date: Fri Sep 6 22:39:28 2019 +0800 perf/arm-ccn: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Will Deacon commit 7fdd7f7c33d2451cf4865b95b24d57785c0ff515 Author: YueHaibing Date: Fri Sep 6 22:37:35 2019 +0800 perf: xgene: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Will Deacon commit 42c184ade43a79d36f50a0b3394b3326633f53f5 Author: YueHaibing Date: Fri Sep 6 22:36:44 2019 +0800 perf: hisi: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Will Deacon commit 1a476abc723e644248dba975b71122fcf878703b Author: Frank Shi Date: Fri Sep 20 14:58:29 2019 +0800 tas2770: add tas2770 smart PA kernel driver add tas2770 smart PA kernel driver Signed-off-by: Frank Shi Link: https://lore.kernel.org/r/1568962709-19185-2-git-send-email-shifu0704@thundersoft.com Signed-off-by: Mark Brown commit e44adca5fa25943ca44fcec02ef7b118ce9bb8f5 Author: Angelo G. Del Regno Date: Sat Sep 21 11:50:41 2019 +0200 regulator: qcom_smd: Add PM8950 regulators The PM8950 provides 6 SMPS regulators, of which 5 HFSMPS and one FTSMPS2.5 (s5), and 23 LDOs. Add these to the RPM regulator driver. Signed-off-by: Angelo G. Del Regno Link: https://lore.kernel.org/r/20190921095043.62593-4-kholk11@gmail.com Signed-off-by: Mark Brown commit e4ff1710885c07550e80a074f1cfa8d2597355ff Author: Angelo G. Del Regno Date: Sat Sep 21 11:50:40 2019 +0200 regulator: qcom_spmi: Add PM8950 SPMI regulator The PM8950 has 5 HFSMPS, 1 FTSMPS2.5 (s5, controlling APC voltage) and 23 LDO regulators. Add the configuration for this chip. Signed-off-by: Angelo G. Del Regno Link: https://lore.kernel.org/r/20190921095043.62593-3-kholk11@gmail.com Signed-off-by: Mark Brown commit 04a99ce605a780c275e2e9d2547d43fbba3f4d24 Author: Pragnesh Patel Date: Thu Sep 19 12:09:04 2019 +0530 fixed-regulator: dt-bindings: Fixed building error for compatible property Compatible property is not of type 'string', so remove const: from it. Signed-off-by: Pragnesh Patel Acked-by: Rob Herring Link: https://lore.kernel.org/r/1568875145-2864-1-git-send-email-pragnesh.patel@sifive.com Signed-off-by: Mark Brown commit 4378f1fbe924054a09ff0d4e39e1a581b9245252 Author: Peter Ujfalusi Date: Fri Sep 27 10:16:46 2019 +0300 ASoC: soc-pcm: Use different sequence for start/stop trigger On stream stop currently we stop the DMA first followed by the CPU DAI. This can cause underflow (playback) or overflow (capture) on the DAI side as the DMA is no longer feeding data while the DAI is still active. It can be observed easily if the DAI side does not have FIFO (or it is disabled) to survive the time while the DMA is stopped, but still can happen on relatively slow CPUs when relatively high sampling rate is used: the FIFO is drained between the time the DMA is stopped and the DAI is stopped. It can only fixed by using different sequence within trigger for 'stop' and 'start': case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: Trigger order: dai_link, DMA, CPU DAI then the codec case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: Trigger order: codec, CPU DAI, DMA then dai_link Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190927071646.22319-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 703df4413ff6cf1812922522daa7c0610f087910 Author: Shengjiu Wang Date: Fri Sep 27 09:46:12 2019 +0800 ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8 There is error "aplay: pcm_write:2023: write error: Input/output error" on i.MX8QM/i.MX8QXP platform for S24_3LE format. In i.MX8QM/i.MX8QXP, the DMA is EDMA, which don't support 24bit sample, but we didn't add any constraint, that cause issues. So we need to query the caps of dma, then update the hw parameters according to the caps. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/b6a4de2bbf960ef291ee902afe4388bd0fc1d347.1569493933.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 80e84f36412e0c5172447b6947068dca0d04ee82 Author: Denis Efremov Date: Fri Sep 27 01:56:04 2019 +0300 ath9k_hw: fix uninitialized variable data Currently, data variable in ar9003_hw_thermo_cal_apply() could be uninitialized if ar9300_otp_read_word() will fail to read the value. Initialize data variable with 0 to prevent an undefined behavior. This will be enough to handle error case when ar9300_otp_read_word() fails. Fixes: 80fe43f2bbd5 ("ath9k_hw: Read and configure thermocal for AR9462") Cc: Rajkumar Manoharan Cc: John W. Linville Cc: Kalle Valo Cc: "David S. Miller" Cc: stable@vger.kernel.org Signed-off-by: Denis Efremov Signed-off-by: Kalle Valo commit e957204e732bc2916a241dc61dd7dd14e9a98350 Author: Shengjiu Wang Date: Fri Sep 27 09:46:11 2019 +0800 ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams When set the runtime hardware parameters, we may need to query the capability of DMA to complete the parameters. This patch is to Extract this operation from dmaengine_pcm_set_runtime_hwparams function to a separate function snd_dmaengine_pcm_refine_runtime_hwparams, that other components which need this feature can call this function. Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/d728f65194e9978cbec4132b522d4fed420d704a.1569493933.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 109539c986cee525e5ff9ae98793f23c2b29e54d Author: Shengjiu Wang Date: Fri Sep 27 09:46:10 2019 +0800 ASoC: fsl_asrc: update supported sample format The ASRC support 24bit/16bit/8bit input width, which is data width, not slot width. For the S20_3LE format, the data with is 20bit, slot width is 24bit, if we set ASRMCR1n.IWD to be 24bits, the result is the volume is lower than expected, it likes 24bit data right shift 4 bits So replace S20_3LE with S24_3LE in supported list and add S8 format in TX supported list Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/45a7c383f43cc1dd9d0934846447aee653278c03.1569493933.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit d98ddae85a4a57124f87960047b1b6419312147f Author: Anilkumar Kolli Date: Thu Sep 26 19:07:01 2019 +0530 ath10k: fix backtrace on coredump In a multiradio board with one QCA9984 and one AR9987 after enabling the crashdump with module parameter coredump_mask=7, below backtrace is seen. vmalloc: allocation failure: 0 bytes kworker/u4:0: page allocation failure: order:0, mode:0x80d2 CPU: 0 PID: 6 Comm: kworker/u4:0 Not tainted 3.14.77 #130 Workqueue: ath10k_wq ath10k_core_register_work [ath10k_core] (unwind_backtrace) from [] (show_stack+0x10/0x14) (dump_stack+0x80/0xa0) (warn_alloc_failed+0xd0/0xfc) (__vmalloc_node_range+0x1b4/0x1d8) (__vmalloc_node+0x34/0x40) (vzalloc+0x24/0x30) (ath10k_coredump_register+0x6c/0x88 [ath10k_core]) (ath10k_core_register_work+0x350/0xb34 [ath10k_core]) (process_one_work+0x20c/0x32c) (worker_thread+0x228/0x360) This is due to ath10k_hw_mem_layout is not defined for AR9987. For coredump undefined hw ramdump_size is 0. Check for the ramdump_size before allocation memory. Tested on: AR9987, QCA9984 FW version: 10.4-3.9.0.2-00044 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 4bf62571070dd1021556e275d9221f736b2ffcf3 Author: Shengjiu Wang Date: Fri Sep 27 09:46:09 2019 +0800 ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width snd_pcm_format_t is more formal than enum asrc_word_width, which has two property, width and physical width, which is more accurate than enum asrc_word_width. So it is better to use in(out)put_format instead of in(out)put_word_width. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/7937c1404ee327ce141cb03b3575b02ea01a740c.1569493933.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 931a0ba638e09a707e9a905cb6bea1fb1c6d4183 Author: Robin Murphy Date: Tue Sep 17 15:45:34 2019 +0100 iommu/arm-smmu: Report USF more clearly Although CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is a welcome tool for smoking out inadequate firmware, the failure mode is non-obvious and can be confusing for end users. Add some special-case reporting of Unidentified Stream Faults to help clarify this particular symptom. Since we're adding yet another print to the mix, also break out an explicit ratelimit state to make sure everything stays together (and reduce the static storage footprint a little). Reviewed-by: Douglas Anderson Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 696bcfb709862077e8fd0e484cca952db7f2001a Author: Robin Murphy Date: Wed Sep 18 17:17:51 2019 +0100 iommu/arm-smmu: Remove arm_smmu_flush_ops Now it's just an empty wrapper. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit ae2b60f34ab21780bc30d01ae976cc7340446bde Author: Robin Murphy Date: Wed Sep 18 17:17:50 2019 +0100 iommu/arm-smmu: Move .tlb_sync method to implementation With the .tlb_sync interface no longer exposed directly to io-pgtable, strip away the remains of that abstraction layer. Retain the callback in spirit, though, by transforming it into an implementation override for the low-level sync routine itself, for which we will have at least one user. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 3370cb6bf64f6896a30eb7ad97721b9598c8fb10 Author: Robin Murphy Date: Wed Sep 18 17:17:49 2019 +0100 iommu/arm-smmu: Remove "leaf" indirection Now that the "leaf" flag is no longer part of an external interface, there's no need to use it to infer a register offset at runtime when we can just as easily encode the offset directly in its place. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 3f3b8d0c9c1838271543df9e655032117a663f88 Author: Robin Murphy Date: Wed Sep 18 17:17:48 2019 +0100 iommu/arm-smmu: Remove .tlb_inv_range indirection Fill in 'native' iommu_flush_ops callbacks for all the arm_smmu_flush_ops variants, and clear up the remains of the previous .tlb_inv_range abstraction. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 93f9fefcf52835a2d886773bd6d06698279e114d Author: Anilkumar Kolli Date: Thu Sep 26 19:07:00 2019 +0530 ath10k: coredump: fix IRAM addr for QCA9984, QCA4019, QCA9888 and QCA99x0 The IRAM start address in coredump was wrong for QCA9984, QCA4019, QCA9888 and QCA99x0. Tested on: QCA9984, QCA4019 FW version: 10.4-3.9.0.2-00044 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 306547608c84378084d718be4cc1be03200aabfd Author: Erik Stromdahl Date: Mon Jun 17 22:01:40 2019 +0200 ath10k: switch to ieee80211_tx_dequeue_ni Since ath10k_mac_tx_push_txq() can be called from process context, we must explicitly disable softirqs before the call into mac80211. By calling ieee80211_tx_dequeue_ni() instead of ieee80211_tx_dequeue() we make sure softirqs are always disabled even in the case when ath10k_mac_tx_push_txq() is called from process context. Calling ieee80211_tx_dequeue_ni() with softirq's already disabled (e.g., from softirq context) should be safe as the local_bh_disable() and local_bh_enable() functions (called from ieee80211_tx_dequeue_ni) are fully reentrant. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo commit 5422737192d907c6fd181479c25690e7f371e9dd Author: Lars-Peter Clausen Date: Thu Sep 26 14:50:12 2019 +0300 ASoC: adau1761: Add ALC controls The adau1761 has a automatic level control block that can adjust the gain for the differential input PGA. This patch adds ALSA controls for enabling and changing the parameter settings for the ALC. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926115012.24049-2-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 83078521072e95cf555d356f9e0b39021c46ac76 Author: Lars-Peter Clausen Date: Thu Sep 26 14:50:11 2019 +0300 ASoC: adau1761: Add PGA Slew time control The PGA Slew Time control allows to configure the rate with which the PGA gain control ramps up/down to the target setting. The PGA slew control is done via the ALC Control 0 register. There are 2 bits on that reg, that control PGA slew time, while the other bits control parts of the ALC (automatic level control) block. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20190926115012.24049-1-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 49f9c4f2e83cf562f1a6e3f62eafa4ede5343e4a Author: Daniel Baluta Date: Wed Sep 25 21:33:58 2019 +0300 ASoC: core: Clarify usage of ignore_machine For a sound card ignore_machine means that existing FEs links should be ignored and existing BEs links should be overridden with some information from the matching component driver. Current code make some confusions about this so fix it! Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20190925183358.11955-1-daniel.baluta@nxp.com Signed-off-by: Mark Brown commit 423013f824ab0590c229a107f21c54ac6596c4e1 Author: Colin Ian King Date: Wed Sep 25 12:26:21 2019 +0100 ASoC: stm32: sai: clean up indentation issue There is a statement that is indented one level too deeply, remove the extraneous tab. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190925112621.9312-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 944eedd8c021893d08d02a8eec8e5161327316cd Author: Colin Ian King Date: Wed Sep 25 12:10:23 2019 +0100 ASoC: wcd9335: clean up indentation issue There is an if statement that is indented one level too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190925111023.7771-1-colin.king@canonical.com Signed-off-by: Mark Brown commit bd1468f252e85280b71a069a2255842d78133cc4 Author: Colin Ian King Date: Wed Sep 25 11:03:30 2019 +0100 ASoC: rt5663: clean up indentation issues There are two break statements that are indented one level too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190925100330.20695-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 7b3087323faad85ee16f8f852810bb6500fefcb4 Author: Tomislav Požega Date: Mon Sep 23 21:49:24 2019 +0200 ath10k: change sw version print format to hex Software version within WMI event ready message was displayed in a not very useful decimal format. Change this info to be shown in a hexadecimal format instead. Signed-off-by: Tomislav Požega Signed-off-by: Kalle Valo commit 67f798c78242ef3051bf6bf304ddb8a09514e1c5 Author: Colin Ian King Date: Wed Sep 25 10:45:45 2019 +0100 ASoC: amd: acp3x: clean up indentation issue There is a statement that is indented one level too deeply, remove the extraneous tab. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190925094545.19941-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 73690c4843fb501b675d06b46d75a8e78ea482a2 Author: Tomislav Požega Date: Mon Sep 23 21:49:23 2019 +0200 ath10k: print supported MCS rates within service ready event Add vht_supp_mcs argument to service ready structure and print supported MCS rates in WMI service ready debug message. Signed-off-by: Tomislav Požega Signed-off-by: Kalle Valo commit 4b7151dadfd450b837b6b28073ad9f19f4a7547c Author: Frank Shi Date: Fri Sep 20 14:58:28 2019 +0800 dt-bindings: ASoC: Add tas2770 smart PA dt bindings Add tas2770 smart PA dt bindings Signed-off-by: Frank Shi Link: https://lore.kernel.org/r/1568962709-19185-1-git-send-email-shifu0704@thundersoft.com Signed-off-by: Mark Brown commit 275ea1b26f386b5575c83399bb94ff5269ad2d57 Author: Tomislav Požega Date: Mon Sep 23 21:49:22 2019 +0200 ath10k: print service ready returned channel range Displays lowest/highest supported channels for both 2ghz and 5ghz bands as they're fetched within WMI service ready event. These are shown in a frequency format. Signed-off-by: Tomislav Požega Signed-off-by: Kalle Valo commit fa879490e41283c8d59e7a0c751c375875390cf2 Author: Tomislav Požega Date: Mon Sep 23 21:49:21 2019 +0200 ath10k: add 2ghz channel arguments to service ready structure Add lowest/highest 2ghz channel arguments for use within WMI service ready structure. Signed-off-by: Tomislav Požega Signed-off-by: Kalle Valo commit 353e16bf60458fae5927cf04ff668fc152fff465 Author: Kuninori Morimoto Date: Thu Sep 12 13:42:44 2019 +0900 ASoC: soc-core: remove snd_soc_rtdcom_del_all() If we can use devm_kzalloc(rtd->dev, xxx) for rtdcom, we don't need to call snd_soc_rtdcom_del_all() for kfree(). This patch uses devm_kzalloc(rtd->dev, xxx) for rtdcom, and remove snd_soc_rtdcom_del_all(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875zlyf7ln.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d918a37610b1bf71faa86f589bd7604f71c1e05f Author: Kuninori Morimoto Date: Thu Sep 12 13:42:30 2019 +0900 ASoC: soc-core: tidyup soc_new_pcm_runtime() alloc order This patch allocs dev first at soc_new_pcm_runtime(). This is prepare for rtd->dev, rtd->codec_dais alloc cleanup Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877e6ef7m1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b7c5bc45ee94a03a0dc45a862180e17db8ea8e9d Author: Kuninori Morimoto Date: Thu Sep 12 13:41:01 2019 +0900 ASoC: soc-core: merge soc_free_pcm_runtime() and soc_rtd_free() "rtd" is handled by soc_xxx_pcm_runtime(), and "rtd->dev" is handled by soc_rtd_xxx(). There is no reason to separate these, and it makes code complex. We can free these in the same time. Here soc_rtd_free() (A) which frees rtd->dev is called from soc_remove_link_dais() many times (1). Then, it is using dev_registered flags to avoid multi kfree() (2). This is no longer needed if we can merge these functions. static void soc_remove_link_dais(...) { ... (1) for_each_comp_order(order) { (1) for_each_card_rtds(card, rtd) { (A) soc_rtd_free(rtd); ... } } } (A) static void soc_rtd_free(...) { (2) if (rtd->dev_registered) { /* we don't need to call kfree() for rtd->dev */ device_unregister(rtd->dev); (2) rtd->dev_registered = 0; } } This patch merges soc_rtd_free() into soc_free_pcm_runtime(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878squf7oi.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6e864344873f19120f742c19d15a8c53e7247c6a Author: Kuninori Morimoto Date: Thu Sep 12 13:40:08 2019 +0900 ASoC: soc-core: merge soc_new_pcm_runtime() and soc_rtd_init() "rtd" is handled by soc_xxx_pcm_runtime(), and "rtd->dev" is handled by soc_rtd_xxx(). There is no reason to separate these, and it makes code complex. We can create these in the same time. This patch merges soc_rtd_init() into soc_new_pcm_runtime(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a7baf7pz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 929deb849b9e4319015070ead7ca976a4f16e303 Author: Kuninori Morimoto Date: Thu Sep 12 13:39:32 2019 +0900 ASoC: soc-core: create rtd->codec_dais first soc_new_pcm_runtime() allocs rtd and rtd->codec_dais. This patch allocs both first, and setup these after that. This is prepare for soc_new_pcm_runtime() cleanup. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blvqf7qz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 753ace0a34fbd39ac2ec654c6859823db420f69e Author: Kuninori Morimoto Date: Thu Sep 12 13:38:50 2019 +0900 ASoC: soc-core: call list_del(&rtd->list) at soc_free_pcm_runtime() Current ALSA SoC is calling list_del(&rtd->list) at (1) static void soc_remove_pcm_runtimes(...) { ... for_each_card_rtds_safe(card, rtd, _rtd) { (1) list_del(&rtd->list); (2) soc_free_pcm_runtime(rtd); } ... } But, we will call soc_free_pcm_runtime() after that (2). &rtd->list is connected at soc_new_pcm_runtime(), Thus, it should be disconnected at soc_free_pcm_runtime(). This patch calls list_del(&rtd->list) at soc_free_pcm_runtime(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d0g6f7s5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6aff90c5bab77886f99a1b6b1b1933f9b1e9b855 Author: YueHaibing Date: Mon Sep 23 13:56:32 2019 +0000 ath9k: remove unused including Remove including that don't need it. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit a848125e320a154dfc17b9a377361b4b0df87363 Author: Kuninori Morimoto Date: Thu Sep 12 13:38:34 2019 +0900 ASoC: soc-core: merge soc_add_pcm_runtime() into soc_new_pcm_runtime() We have soc_new_pcm_runtime() which allocs rtd and its related memory, and soc_add_pcm_runtime() which connects rtd to card. But we don't need to separate these, we can alloc and connect rtd in the same time. Current implementation is just makes code complex. This patch merges these into one. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ef0mf7sl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1c93a9e00e40e3a084ebbcaa4a8f412b83f1fa0d Author: Kuninori Morimoto Date: Thu Sep 12 13:38:22 2019 +0900 ASoC: soc-core: move soc_free_pcm_runtime() This patch moves soc_free_pcm_runtime() next to soc_new_pcm_runtime(). This is prepare for soc_xxx_pcm_runtime() cleanup. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ftl2f7sx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f4528af69fdc112247a78599c6e8f7f618aff4e6 Author: Sylwester Nawrocki Date: Fri Sep 20 15:02:15 2019 +0200 ASoC: dt-bindings: Document "samsung, arndale-wm1811" compatible Add compatible string for boards with WM1811 CODEC to the list. Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20190920130218.32690-7-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit 001b83d395ab2acfddc46b73376f8dbdece89af7 Author: Sylwester Nawrocki Date: Fri Sep 20 15:02:13 2019 +0200 ASoC: wm8994: Add support for MCLKn clock gating As an intermediate step before covering the clocking subsystem of the CODEC entirely by the clk API add handling of external CODEC's master clocks in DAPM events when the AIFn clocks are sourced directly from MCLKn; when FLLn are used we enable/disable respective MCLKn before/after FLLn is enabled/disabled. Signed-off-by: Sylwester Nawrocki Acked-by: Charles Keepax Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20190920130218.32690-5-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit 419e2f50833661cec15200d5ee7385daee733667 Author: Sylwester Nawrocki Date: Fri Sep 20 15:02:12 2019 +0200 ASoC: wm8994: Add support for setting MCLK clock rate Extend the set_sysclk() handler so we also set frequency of the MCLK1, MCLK2 clocks through clk API when those clocks are specified in DT. Reviewed-by: Charles Keepax Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20190920130218.32690-4-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit 7cf2804775f8a388411624b3e768e55d08711e9d Author: Tzung-Bi Shih Date: Fri Sep 20 19:23:20 2019 +0800 ASoC: dt-bindings: mt8183: add missing update Headset codec is optional. Add missing update to DT binding document. Fixes: a962a809e5e4 ("ASoC: mediatek: mt8183: make headset codec optional") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20190920112320.166052-1-tzungbi@google.com Signed-off-by: Mark Brown commit fd5d3907197c60464672c8a32edeea66e01f6222 Author: Kuninori Morimoto Date: Fri Sep 20 11:01:42 2019 +0900 ASoC: soc-component.h: remove GPL explanation from header soc-component.h already has SPDX License, thus, GPL explanation is not needed. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8736grafp5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6cfb1cd60394c2d88c6868d147cf6882a9ca3b6c Author: Markus Elfring Date: Thu Sep 19 17:27:57 2019 +0200 ASoC: xlnx: Use devm_platform_ioremap_resource() in xlnx_formatter_pcm_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/8f7cf483-6ab3-d00f-5606-863e9f5b31fc@web.de Signed-off-by: Mark Brown commit 8735141031d7ba96f1c2b3a45ec4efbfd47ad24b Author: Maxime Ripard Date: Fri Sep 6 18:12:21 2019 +0300 ASoC: dt-bindings: Convert Allwinner A23 analog codec to a schema The Allwinner A23 SoC and later have an embedded audio codec that uses a separate controller to drive its analog part, which is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20190906151221.3148-2-mripard@kernel.org Signed-off-by: Mark Brown commit adebb11139029ddf1fba6f796c4a476f17eacddc Author: Sam McNally Date: Tue Sep 17 15:49:33 2019 +1000 ASoC: Intel: cht_bsw_rt5645: Add quirk for boards using pmc_plt_clk_0 As of commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL"), the cht_bsw_rt5645 driver needs to enable the clock it's using for the codec's mclk. It does this from commit 7735bce05a9c ("ASoC: Intel: boards: use devm_clk_get() unconditionally"), enabling pmc_plt_clk_3. However, Strago family Chromebooks use pmc_plt_clk_0 for the codec mclk, resulting in white noise with some digital microphones. Add a DMI-based quirk for Strago family Chromebooks to use pmc_plt_clk_0 instead - mirroring the changes made to cht_bsw_max98090_ti in commit a182ecd3809c ("ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0") and making use of the existing dmi_check_system() call and related infrastructure added in commit 22af29114eb4 ("ASoC: Intel: cht-bsw-rt5645: add quirks for SSP0/AIF1/AIF2 routing"). Signed-off-by: Sam McNally Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190917054933.209335-1-sammc@chromium.org Signed-off-by: Mark Brown commit 9e28f6532c611c0c3fa759d2101aba9f0d41e860 Author: Shengjiu Wang Date: Fri Sep 13 17:42:14 2019 +0800 ASoC: fsl_mqs: Add MQS component driver MQS (medium quality sound), is used to generate medium quality audio via a standard digital output pin. It can be used to connect stereo speakers or headphones simply via power amplifier stages without an additional DAC chip. It only accepts 2-channel, LSB-valid 16bit, MSB shift-out first, frame sync asserting with the first bit of the frame, data shifted with the posedge of bit clock, 44.1 kHz or 48 kHz signals from SAI1 in left justified format; and it provides the SNR target as no more than 20dB for the signals below 10 kHz. The signals above 10 kHz will have worse THD+N values. MQS provides only simple audio reproduction. No internal pop, click or distortion artifact reduction methods are provided. The MQS receives the audio data from the SAI1 Tx section. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/74dfc73a92d2df4213225abe7d2a3db82672fe0f.1568367274.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 75234212c446cef3272a025b588b2e418158ed30 Author: Shengjiu Wang Date: Fri Sep 13 17:42:13 2019 +0800 ASoC: fsl_mqs: add DT binding documentation Add the DT binding documentation for NXP MQS driver Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/65e1f035aea2951aacda54aa3a751bc244f72f6a.1568367274.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 4b39582a8fb3c749f0fa96ec920d138f61bf00d6 Author: Mihail Atanassov Date: Fri Sep 20 15:13:08 2019 +0000 drm/komeda: Use IRQ_RETVAL shorthand in d71_irq_handler No change in behaviour; IRQ_RETVAL is about twice as popular as manually writing out the ternary. Signed-off-by: Mihail Atanassov Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Ayan kumar halder Link: https://patchwork.freedesktop.org/patch/msgid/20190920151247.25128-1-mihail.atanassov@arm.com commit f12b524ea3865805f7aa590616127f706149bf02 Author: Vitor Soares Date: Thu Sep 5 13:06:52 2019 +0200 i3c: master: use i3c_dev_get_master() Since we have i3c_dev_get_master() available, use it. Signed-off-by: Vitor Soares Signed-off-by: Boris Brezillon commit dfef959803c728c616ad29b008cd91b3446a993a Author: Ulf Magnusson Date: Fri Sep 27 19:42:32 2019 +0200 drm/tiny: Kconfig: Remove always-y THERMAL dep. from TINYDRM_REPAPER Commit 554b3529fe01 ("thermal/drivers/core: Remove the module Kconfig's option") changed the type of THERMAL from tristate to bool, so THERMAL || !THERMAL is now always y. Remove the redundant dependency. Discovered through Kconfiglib detecting a dependency loop. The C tools simplify the expression to y before running dependency loop detection, and so don't see it. Changing the type of THERMAL back to tristate makes the C tools detect the same loop. Not sure if running dep. loop detection after simplification can be called a bug. Fixing this nit unbreaks Kconfiglib on the kernel at least. Signed-off-by: Ulf Magnusson Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20190927174218.GA32085@huvuddator commit f8db4d051b5eb8d6272b67d76cf79971d117a728 Author: Chris Wilson Date: Tue Oct 1 11:35:18 2019 +0100 drm/i915: Initialise breadcrumb lists on the virtual engine With deferring the breadcrumb signalling to the virtual engine (thanks preempt-to-busy) we need to make sure the lists and irq-worker are ready to send a signal. [41958.710544] BUG: kernel NULL pointer dereference, address: 0000000000000000 [41958.710553] #PF: supervisor write access in kernel mode [41958.710556] #PF: error_code(0x0002) - not-present page [41958.710558] PGD 0 P4D 0 [41958.710562] Oops: 0002 [#1] SMP [41958.710565] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G U 5.3.0+ #207 [41958.710568] Hardware name: Intel Corporation NUC7i5BNK/NUC7i5BNB, BIOS BNKBL357.86A.0052.2017.0918.1346 09/18/2017 [41958.710602] RIP: 0010:i915_request_enable_breadcrumb+0xe1/0x130 [i915] [41958.710605] Code: 8b 44 24 30 48 89 41 08 48 89 08 48 8b 85 98 01 00 00 48 8d 8d 90 01 00 00 48 89 95 98 01 00 00 49 89 4c 24 28 49 89 44 24 30 <48> 89 10 f0 80 4b 30 10 c6 85 88 01 00 00 00 e9 1a ff ff ff 48 83 [41958.710609] RSP: 0018:ffffc90000003de0 EFLAGS: 00010046 [41958.710612] RAX: 0000000000000000 RBX: ffff888735424480 RCX: ffff8887cddb2190 [41958.710614] RDX: ffff8887cddb3570 RSI: ffff888850362190 RDI: ffff8887cddb2188 [41958.710617] RBP: ffff8887cddb2000 R08: ffff8888503624a8 R09: 0000000000000100 [41958.710619] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8887cddb3548 [41958.710622] R13: 0000000000000000 R14: 0000000000000046 R15: ffff888850362070 [41958.710625] FS: 0000000000000000(0000) GS:ffff88885ea00000(0000) knlGS:0000000000000000 [41958.710628] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [41958.710630] CR2: 0000000000000000 CR3: 0000000002c09002 CR4: 00000000001606f0 [41958.710633] Call Trace: [41958.710636] [41958.710668] __i915_request_submit+0x12b/0x160 [i915] [41958.710693] virtual_submit_request+0x67/0x120 [i915] [41958.710720] __unwind_incomplete_requests+0x131/0x170 [i915] [41958.710744] execlists_dequeue+0xb40/0xe00 [i915] [41958.710771] execlists_submission_tasklet+0x10f/0x150 [i915] [41958.710776] tasklet_action_common.isra.17+0x41/0xa0 [41958.710781] __do_softirq+0xc8/0x221 [41958.710785] irq_exit+0xa6/0xb0 [41958.710788] smp_apic_timer_interrupt+0x4d/0x80 [41958.710791] apic_timer_interrupt+0xf/0x20 [41958.710794] Fixes: cb2377a919bb ("drm/i915: Fixup preempt-to-busy vs reset of a virtual request") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191001103518.9113-1-chris@chris-wilson.co.uk commit 70f0c230031dfef3c9b3e37b2a8c18d3f7186fb2 Author: Tony W Wang-oc Date: Wed Sep 18 14:19:33 2019 +0800 x86/mce: Add Zhaoxin LMCE support Newer Zhaoxin CPUs support LMCE compatible with Intel. Add support for that. [ bp: Export functions and massage. ] Signed-off-by: Tony W Wang-oc Signed-off-by: Borislav Petkov Cc: CooperYan@zhaoxin.com Cc: DavidWang@zhaoxin.com Cc: HerryYang@zhaoxin.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: QiyuanWang@zhaoxin.com Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/1568787573-1297-5-git-send-email-TonyWWang-oc@zhaoxin.com commit 5a3d56a034be9e8e87a6cb9ed3f2928184db1417 Author: Tony W Wang-oc Date: Wed Sep 18 14:19:32 2019 +0800 x86/mce: Add Zhaoxin CMCI support All newer Zhaoxin CPUs support CMCI and are compatible with Intel's Machine-Check Architecture. Add that support for Zhaoxin CPUs. [ bp: Massage comments and export intel_init_cmci(). ] Signed-off-by: Tony W Wang-oc Signed-off-by: Borislav Petkov Cc: CooperYan@zhaoxin.com Cc: DavidWang@zhaoxin.com Cc: HerryYang@zhaoxin.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: QiyuanWang@zhaoxin.com Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/1568787573-1297-4-git-send-email-TonyWWang-oc@zhaoxin.com commit 6e898d2bf67a82df0aa0c955adc9278faba9a635 Author: Tony W Wang-oc Date: Wed Sep 18 14:19:30 2019 +0800 x86/mce: Add Zhaoxin MCE support All newer Zhaoxin CPUs are compatible with Intel's Machine-Check Architecture, so add support for them. [ bp: Reflow comment in vendor_disable_error_reporting() and massage commit message. ] Signed-off-by: Tony W Wang-oc Signed-off-by: Borislav Petkov Cc: CooperYan@zhaoxin.com Cc: DavidWang@zhaoxin.com Cc: HerryYang@zhaoxin.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: QiyuanWang@zhaoxin.com Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/1568787573-1297-2-git-send-email-TonyWWang-oc@zhaoxin.com commit 700c1018b86d0d4b3f1f2d459708c0cdf42b521d Author: Alexander Kapshuk Date: Tue Sep 24 07:46:59 2019 +0300 x86/insn: Fix awk regexp warnings gawk 5.0.1 generates the following regexp warnings: GEN /home/sasha/torvalds/tools/objtool/arch/x86/lib/inat-tables.c awk: ../arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape sequence `\:' is not a known regexp operator awk: ../arch/x86/tools/gen-insn-attr-x86.awk:350: (FILENAME=../arch/x86/lib/x86-opcode-map.txt FNR=41) warning: regexp escape sequence `\&' is not a known regexp operator Ealier versions of gawk are not known to generate these warnings. The gawk manual referenced below does not list characters ':' and '&' as needing escaping, so 'unescape' them. See https://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html for more info. Running diff on the output generated by the script before and after applying the patch reported no differences. [ bp: Massage commit message. ] [ Caught the respective tools header discrepancy. ] Reported-by: kbuild test robot Signed-off-by: Alexander Kapshuk Signed-off-by: Borislav Petkov Acked-by: Masami Hiramatsu Cc: "H. Peter Anvin" Cc: "Peter Zijlstra (Intel)" Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190924044659.3785-1-alexander.kapshuk@gmail.com commit bcc6d99ac913e3115cfa564534c432b950408e21 Author: Bartosz Golaszewski Date: Mon Sep 16 11:46:23 2019 +0200 gpiolib: sanitize flags before allocating memory in lineevent_create() Move all the flags sanitization before any memory allocation in lineevent_create() in order to remove a couple unneeded gotos. Signed-off-by: Bartosz Golaszewski commit 47cd84e98f512eac5aad988f08baff432aea35ba Author: Borislav Petkov Date: Sat Sep 28 19:02:29 2019 +0200 x86/mce/amd: Make disable_err_thresholding() static No functional changes. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20190928170539.2729-1-bp@alien8.de commit 2b730952066cd022d1f46e801f06ca6ca9878823 Author: Borislav Petkov Date: Sat Sep 28 16:53:56 2019 +0200 x86/microcode/amd: Fix two -Wunused-but-set-variable warnings The dummy variable is the high part of the microcode revision MSR which is defined as reserved. Mark it unused so that W=1 builds don't trigger the above warning. No functional changes. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20190928162559.26294-1-bp@alien8.de commit c8f3d144004dd3f471ffd414690d15a005e4acd6 Author: Anson Huang Date: Thu Sep 19 17:39:17 2019 +0800 gpio: mxc: Only get the second IRQ when there is more than one IRQ On some of i.MX SoCs like i.MX8QXP, there is ONLY one IRQ for each GPIO bank, so it is better to check the IRQ count before getting second IRQ to avoid below error message during probe: [ 1.070908] gpio-mxc 5d080000.gpio: IRQ index 1 not found [ 1.077420] gpio-mxc 5d090000.gpio: IRQ index 1 not found [ 1.083766] gpio-mxc 5d0a0000.gpio: IRQ index 1 not found [ 1.090122] gpio-mxc 5d0b0000.gpio: IRQ index 1 not found [ 1.096470] gpio-mxc 5d0c0000.gpio: IRQ index 1 not found [ 1.102804] gpio-mxc 5d0d0000.gpio: IRQ index 1 not found [ 1.109144] gpio-mxc 5d0e0000.gpio: IRQ index 1 not found [ 1.115475] gpio-mxc 5d0f0000.gpio: IRQ index 1 not found Signed-off-by: Anson Huang Signed-off-by: Bartosz Golaszewski commit 0a3ce169476feca7869255c681884ed227a319c8 Author: Brian Norris Date: Fri Jun 14 17:13:21 2019 -0700 mwifiex: use 'total_ie_len' in mwifiex_update_bss_desc_with_ie() This is clearer than copy/pasting the magic number '+ 2' around, and it even saves the need for one existing comment. Cc: Takashi Iwai Signed-off-by: Brian Norris Reviewed-by: Takashi Iwai Signed-off-by: Kalle Valo commit 7da413a18583baaf35dd4a8eb414fa410367d7f2 Author: Allen Pais Date: Wed Sep 18 22:05:00 2019 +0530 libertas: fix a potential NULL pointer dereference alloc_workqueue is not checked for errors and as a result, a potential NULL dereference could occur. Signed-off-by: Allen Pais Signed-off-by: Kalle Valo commit a0d46f7a0fa5e2a447a25c87612040babf7a3e18 Author: Denis Efremov Date: Wed Sep 25 23:58:58 2019 +0300 rtlwifi: Remove excessive check in _rtl_ps_inactive_ps() There is no need to check "rtlhal->interface == INTF_PCI" twice in _rtl_ps_inactive_ps(). The nested check is always true. Thus, the expression can be simplified. Signed-off-by: Denis Efremov Acked-by: Larry Finger Signed-off-by: Kalle Valo commit 3f93616951138a598d930dcaec40f2bfd9ce43bb Author: Navid Emamdoost Date: Tue Sep 24 20:20:21 2019 -0500 rtlwifi: prevent memory leak in rtl_usb_probe In rtl_usb_probe if allocation for usb_data fails the allocated hw should be released. In addition the allocated rtlpriv->usb_data should be released on error handling path. Signed-off-by: Navid Emamdoost Signed-off-by: Kalle Valo commit 6e7d59776311e181160d44ed3c73cc7e65def7f2 Author: Austin Kim Date: Tue Sep 17 15:50:44 2019 +0900 rtlwifi: rtl8723ae: Remove unused 'rtstatus' variable 'rtstatus' local variable is not used, so remove it for clean-up. Signed-off-by: Austin Kim Signed-off-by: Kalle Valo commit 9e2276fa6eb39817dcc4cda415f0199fb7016b37 Author: Bruce Ashfield Date: Thu Sep 26 10:32:26 2019 +0100 arch/x86/boot: Use prefix map to avoid embedded paths It was observed that the kernel embeds the absolute build path in the x86 boot image when the __FILE__ macro is expanded. > From https://bugzilla.yoctoproject.org/show_bug.cgi?id=13458: If you turn on the buildpaths QA test, or try a reproducible build, you discover that the kernel image contains build paths. $ strings bzImage-5.0.19-yocto-standard |grep tmp/ out of pgt_buf in /data/poky-tmp/reproducible/tmp/work-shared/qemux86-64/kernel-source/arch/x86/boot/compressed/kaslr_64.c!? But what's this in the top-level Makefile: $ git grep prefix-map Makefile:KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) So the __FILE__ shouldn't be using the full path. However arch/x86/boot/compressed/Makefile has this: KBUILD_CFLAGS := -m$(BITS) -O2 So that clears KBUILD_FLAGS, removing the -fmacro-prefix-map option. Use -fmacro-prefix-map to have relative paths in the boot image too. [ bp: Massage commit message and put the KBUILD_CFLAGS addition in ..boot/Makefile after the KBUILD_AFLAGS assignment because gas doesn't support -fmacro-prefix-map. ] Signed-off-by: Bruce Ashfield Signed-off-by: Ross Burton Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: George Rimar Cc: Ingo Molnar Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190926093226.8568-1-ross.burton@intel.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=204333 commit 15e14f76f85f4f0eab3b8146e1cd3c58ce272823 Author: Lorenzo Bianconi Date: Sat Sep 21 10:44:01 2019 +0200 mt7601u: fix bbp version check in mt7601u_wait_bbp_ready Fix bbp ready check in mt7601u_wait_bbp_ready. The issue is reported by coverity with the following error: Logical vs. bitwise operator The expression's value does not depend on the operands; inadvertent use of the wrong operator is a likely logic error. Addresses-Coverity-ID: 1309441 ("Logical vs. bitwise operator") Fixes: c869f77d6abb ("add mt7601u driver") Acked-by: Jakub Kicinski Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit d563131ef23cbc756026f839a82598c8445bc45f Author: Navid Emamdoost Date: Fri Sep 13 19:08:11 2019 -0500 rsi: release skb if rsi_prepare_beacon fails In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should be released. Signed-off-by: Navid Emamdoost Signed-off-by: Kalle Valo commit 0d32f5d93bbaeb57b607cb5cb1c67626d5754905 Author: Yan-Hsuan Chuang Date: Mon Sep 16 10:41:40 2019 +0800 rtw88: 8822c: fix boolreturn.cocci warnings drivers/net/wireless/realtek/rtw88/rtw8822c.c:2606:9-10: WARNING: return of 0/1 in function 'rtw8822c_dpk_coef_iq_check' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support") Reported-by: kbuild test robot Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit fa38b4fddc7c2ffbaff885eb92f4b20c25b0a81f Author: Denis Efremov Date: Wed Sep 25 23:31:52 2019 +0300 brcmsmac: remove duplicated if condition The nested 'li_mimo == &locale_bn' check is excessive and always true. Thus it can be safely removed. Signed-off-by: Denis Efremov Signed-off-by: Kalle Valo commit e0ae4bac22effbd644add326f658a3aeeb8d45ee Author: Adrian Ratiu Date: Wed Sep 25 16:44:58 2019 +0300 brcmfmac: fix suspend/resume when power is cut off brcmfmac assumed the wifi device always remains powered on and thus hardcoded the MMC_PM_KEEP_POWER flag expecting the wifi device to remain on even during suspend/resume cycles. This is not always the case, some appliances cut power to everything connected via SDIO for efficiency reasons and this leads to wifi not being usable after coming out of suspend because the device was not correctly reinitialized. So we check for the keep_power capability and if it's not present then we remove the device and probe it again during resume to mirror what's happening in hardware and ensure correct reinitialization in the case when MMC_PM_KEEP_POWER is not supported. Suggested-by: Gustavo Padovan Signed-off-by: Adrian Ratiu Signed-off-by: Kalle Valo commit 1524cbf3621576c639405e7aabeac415f9617c8d Author: Adrian Ratiu Date: Wed Sep 25 16:44:57 2019 +0300 brcmfmac: don't WARN when there are no requests When n_reqs == 0 there is nothing to do so it doesn't make sense to search for requests and issue a warning because none is found. Signed-off-by: Martyn Welch Signed-off-by: Adrian Ratiu Signed-off-by: Kalle Valo commit 3f1b32bdbb0a0b4a20e56b220adee76ff29172e3 Author: Christophe JAILLET Date: Sun Sep 15 21:32:10 2019 +0200 brcmsmac: remove a useless test 'pih' is known to be non-NULL at this point, so the test can be removed. Signed-off-by: Christophe JAILLET Acked-by: Arend van Spriel Signed-off-by: Kalle Valo commit abaebe11dd07adf51b53bb7c56ba35eab267654d Author: Borislav Petkov Date: Thu Aug 16 09:14:04 2018 +0200 x86/nmi: Remove stale EDAC include leftover db47d5f85646 ("x86/nmi, EDAC: Get rid of DRAM error reporting thru PCI SERR NMI") forgot to remove it. Drop it. Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190923193807.30896-1-bp@alien8.de commit be898fed355e70b9115b439b4b9587b5fea2aca1 Author: Chung-Hsien Hsu Date: Thu May 9 09:48:26 2019 +0000 brcmfmac: send port authorized event for FT-802.1X With FT-802.1X, driver should send a port authorized event right after sending a roamed event. It is used to indicate that a new AP is already authorized so 802.1X is not required. Acked-by: Arend van Spriel Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 6655c568ced0789479f00b9399603c5d6ee48640 Author: Biju Das Date: Mon Sep 23 08:29:40 2019 +0100 soc: renesas: rcar-sysc: Add r8a774b1 support Add support for RZ/G2N (R8A774B1) SoC power areas to the R-Car SYSC driver. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569223780-54304-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 3b1600c515a50417fd08488b844199bd23919f28 Author: Geert Uytterhoeven Date: Fri Sep 20 16:47:05 2019 +0200 soc: renesas: rcar-sysc: Remove unneeded inclusion of No R-Car or RZ/G SYSC driver uses any of the definitions provided by , hence there is no need to include this header file. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190920144705.27394-1-geert+renesas@glider.be commit 8c32c5ff873580a5bff1b743ac5e080b36fbd784 Author: Geert Uytterhoeven Date: Fri Sep 20 16:35:23 2019 +0200 soc: renesas: r8a774c0-sysc: Fix power request conflicts Describe the location and contents of the SYSCEXTMASK register on RZ/G2E, to prevent conflicts between internal and external power requests. Based on a patch in the BSP by Dien Pham . Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190920143523.23125-1-geert+renesas@glider.be commit 26405045e73b184900ad43206eeda7bee1cedee1 Author: Biju Das Date: Thu Sep 19 09:17:12 2019 +0100 soc: renesas: rcar-rst: Add support for RZ/G2N Add support for RZ/G2N (R8A774B1) to the R-Car RST driver. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1568881036-4404-5-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 574cb721729fccbc252b0caa5ee401393d06c49e Author: Biju Das Date: Thu Sep 5 10:30:42 2019 +0100 soc: renesas: Identify RZ/G2N This patch adds support for identifying the RZ/G2N (r8a774b1) SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1567675844-19247-3-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d634055c4b0f8c24269959f64b7d4a1a8d87d630 Author: Biju Das Date: Thu Sep 5 10:30:43 2019 +0100 soc: renesas: Add Renesas R8A774B1 config option Add configuration option for the RZ/G2N (R8A774B1) SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1567675844-19247-4-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b34095cbc2bb102c9f138afd8c99a8a205b0e142 Author: Geert Uytterhoeven Date: Wed Aug 28 13:36:18 2019 +0200 soc: renesas: r8a77990-sysc: Fix power request conflicts Describe the location and contents of the SYSCEXTMASK register on R-Car E3, to prevent conflicts between internal and external power requests. Based on a patch in the BSP by Dien Pham . Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190828113618.6672-8-geert+renesas@glider.be commit ee038b88c60a32908fd83d420fce445bd0138f6d Author: Geert Uytterhoeven Date: Wed Aug 28 13:36:17 2019 +0200 soc: renesas: r8a77980-sysc: Fix power request conflicts Describe the location and contents of the SYSCEXTMASK register on R-Car V3H, to prevent conflicts between internal and external power requests. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190828113618.6672-7-geert+renesas@glider.be commit a228560c52e89aa5e31c5b8a636bf9ab681bda84 Author: Geert Uytterhoeven Date: Wed Aug 28 13:36:16 2019 +0200 soc: renesas: r8a77970-sysc: Fix power request conflicts Describe the location and contents of the SYSCEXTMASK register on R-Car V3M, to prevent conflicts between internal and external power requests. Based on a patch in the BSP by Dien Pham . Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190828113618.6672-6-geert+renesas@glider.be commit fd733519436fb56fc89265f42276bfac04a14cfc Author: Geert Uytterhoeven Date: Wed Aug 28 13:36:15 2019 +0200 soc: renesas: r8a77965-sysc: Fix power request conflicts Describe the location and contents of the SYSCEXTMASK register on R-Car M3-N, to prevent conflicts between internal and external power requests. Based on a patch in the BSP by Dien Pham . Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190828113618.6672-5-geert+renesas@glider.be commit 5a6cf826b37c5cd31304ba42117f632ee1f0552f Author: Geert Uytterhoeven Date: Wed Aug 28 13:36:14 2019 +0200 soc: renesas: r8a7796-sysc: Fix power request conflicts Describe the location and contents of the SYSCEXTMASK register on R-Car M3-W, to prevent conflicts between internal and external power requests. This register does not exist on R-Car M3-W ES1.x. Based on a patch in the BSP by Dien Pham . Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190828113618.6672-4-geert+renesas@glider.be commit 0e0c4db2fa0982af0956c0eed0a94e0b412ef2f4 Author: Geert Uytterhoeven Date: Wed Aug 28 13:36:13 2019 +0200 soc: renesas: r8a7795-sysc: Fix power request conflicts Describe the location and contents of the SYSCEXTMASK register on R-Car H3, to prevent conflicts between internal and external power requests. This register does not exist on R-Car H3 ES1.x and ES2.x. Based on a patch in the BSP by Dien Pham . Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190828113618.6672-3-geert+renesas@glider.be commit 44b5100f7b744b2cd2a29f8766eea5dbf741e0e5 Author: Geert Uytterhoeven Date: Wed Aug 28 13:36:12 2019 +0200 soc: renesas: rcar-sysc: Prepare for fixing power request conflicts Recent R-Car Gen3 SoCs added an External Request Mask Register to the System Controller (SYSC). This register allows to mask external power requests for CPU or 3DG domains, to prevent conflicts between powering off CPU cores or the 3D Graphics Engine, and changing the state of another power domain through SYSC, which could lead to CPG state machine lock-ups. Add support for making use of this register. Take into account that the register is optional, and that its location and contents are SoC-specific. Note that the issue fixed by this cannot happen in the upstream kernel, as upstream has no support for graphics acceleration yet. SoCs lacking the External Request Mask Register may need a different mitigation in the future. Inspired by a patch in the BSP by Dien Pham . Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190828113618.6672-2-geert+renesas@glider.be commit 0b9f1c2c2fd4481990515a2918297a50a23a3b34 Author: Biju Das Date: Thu Sep 19 09:17:14 2019 +0100 clk: renesas: cpg-mssr: Add r8a774b1 support Add RZ/G2N (R8A774B1) Clock Pulse Generator / Module Standby and Software Reset support. Based on the Table 8.4d of "RZ/G Series, 2nd Generation User's Manual: Hardware (Rev. 0.80, May 2019)". Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1568881036-4404-7-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 10003938a0c64c2f0d8934ef3f4f36ac5b4960dc Author: Biju Das Date: Thu Sep 19 09:17:13 2019 +0100 dt-bindings: clock: renesas: cpg-mssr: Document r8a774b1 binding Add binding documentation for the RZ/G2N (R8A774b1) Clock Pulse Generator driver. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1568881036-4404-6-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8a6d97a46dfd73a87b76a277b2045bd4036c35aa Author: Geert Uytterhoeven Date: Fri Aug 30 15:45:12 2019 +0200 clk: renesas: rcar-gen3: Loop to find best rate in cpg_sd_clock_round_rate() cpg_sd_clock_round_rate() really needs the best rate, not the best divider. Hence change the iteration to find the former, and get rid of the final division. Add an out-of-range rate check while at it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20190830134515.11925-6-geert+renesas@glider.be commit f1195d4ec70b230553bbab80c251c3cd79db715b Author: Geert Uytterhoeven Date: Fri Aug 30 15:45:11 2019 +0200 clk: renesas: rcar-gen3: Absorb cpg_sd_clock_calc_div() cpg_sd_clock_round_rate() is the sole caller of cpg_sd_clock_calc_div(), hence absorb the latter into the former. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20190830134515.11925-5-geert+renesas@glider.be commit e8adb3a0f74cf568030b7bd1f77d877e6f308d17 Author: Geert Uytterhoeven Date: Fri Aug 30 15:45:10 2019 +0200 clk: renesas: rcar-gen3: Avoid double table iteration in SD .set_rate() The .set_rate() callback for the SD clocks is always called with a valid clock rate, returned by .round_rate(). Hence there is no need to iterate through the divider table twice: once to repeat the work done by .round_rate(), and a second time to find the corresponding divider entry. Just iterate once, looking for the divider that matches the passed clock rate. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20190830134515.11925-4-geert+renesas@glider.be commit b5dea62d34042d173ba1d1887c8dd40262423d68 Author: Geert Uytterhoeven Date: Fri Aug 30 15:45:09 2019 +0200 clk: renesas: rcar-gen3: Improve arithmetic divisions - Use div64_ul() instead of div_u64() if the divisor is unsigned long, to avoid truncation to 32-bit on 64-bit platforms, - Use div_u64() for 64-by-32 divisions. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20190830134515.11925-3-geert+renesas@glider.be commit 3e8c1d4cce6b679f4cfd81dfdbbf727f06986aa5 Author: Geert Uytterhoeven Date: Fri Aug 30 15:45:08 2019 +0200 clk: renesas: rcar-gen2: Improve arithmetic divisions - Use div64_ul() instead of div_u64() if the divisor is unsigned long, to avoid truncation to 32-bit on 64-bit platforms, - Prefer ULL constant suffixes over casts to u64, - Prioritize multiplication over division, to increase accuracy. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20190830134515.11925-2-geert+renesas@glider.be commit 58256143cff7c2e0a72fe609e797a36b26a3c381 Author: Geert Uytterhoeven Date: Fri Aug 30 15:36:15 2019 +0200 clk: renesas: Remove R-Car Gen2 legacy DT clock support As of commit 362b334b17943d84 ("ARM: dts: r8a7791: Convert to new CPG/MSSR bindings"), all upstream R-Car Gen2 device tree source files use the unified "Renesas Clock Pulse Generator / Module Standby and Software Reset" DT bindings. Hence remove backward compatibility with old R-Car Gen2 device trees describing a hierarchical representation of the various CPG and MSTP clocks. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190830133615.11274-1-geert+renesas@glider.be commit 271ff378a30086952eb9df1471006dff9a6b5f92 Author: Biju Das Date: Thu Sep 19 09:17:16 2019 +0100 pinctrl: sh-pfc: r8a77965: Add R8A774B1 PFC support Renesas RZ/G2N (r8a774b1) is pin compatible with R-Car M3-N (r8a77965), however it doesn't have several automotive specific peripherals. Add a r8a77965 specific pin groups/functions along with common pin groups/functions for supporting both r8a77965 and r8a774b1 SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1568881036-4404-9-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 887047c317a48e49de7d0e0318ec0464666f6229 Author: Biju Das Date: Thu Sep 19 09:17:15 2019 +0100 dt-bindings: pinctrl: sh-pfc: Document r8a774b1 PFC support Document PFC support for the R8A774B1 SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1568881036-4404-8-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7666dfd533d4c55733037775d47a8e3551b341a2 Author: Geert Uytterhoeven Date: Wed Sep 4 14:16:58 2019 +0200 Revert "pinctrl: sh-pfc: r8a77990: Fix MOD_SEL1 bit31 when using SIM0_D" This reverts commit e167d723e1a472d252e5c4baf823b77ce5543b05. According to the R-Car Gen3 Hardware Manual Errata for Rev 1.00 of Aug 24, 2018, the SEL_SIMCARD_{0,1} definition was to be deleted. However, this errata merely fixed an accidental double definition in the Hardware User's Manual Rev. 1.00. The real definition is still present in later revisions of the manual (Rev. 1.50 and Rev. 2.00). Hence revert the commit to recover the definition. Based on a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190904121658.2617-4-geert+renesas@glider.be commit 3672bc7093434621c83299ef27ea3b3225a67600 Author: Geert Uytterhoeven Date: Wed Sep 4 14:16:57 2019 +0200 Revert "pinctrl: sh-pfc: r8a77990: Fix MOD_SEL1 bit30 when using SSI_SCK2 and SSI_WS2" This reverts commit e87882eb9be10b2b9e28156922c2a47d877f5db4. According to the R-Car Gen3 Hardware Manual Errata for Rev 1.00 of Aug 24, 2018, the SEL_SSI2_{0,1} definition was to be deleted. However, this errata merely fixed an accidental double definition in the Hardware User's Manual Rev. 1.00. The real definition is still present in later revisions of the manual (Rev. 1.50 and Rev. 2.00). Hence revert the commit to recover the definition. Based on a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190904121658.2617-3-geert+renesas@glider.be commit 05f841d2a92380d98cc2a3cc162bf068f154b2f1 Author: Takeshi Kihara Date: Wed Sep 4 14:16:56 2019 +0200 pinctrl: sh-pfc: r8a77990: Rename AVB_AVTP_{MATCH,CAPTURE} pin functions The Hardware Manual Errata for Rev. 1.50 of April 10, 2019 renamed IPSR2 register bit[23:20] value H'3 and register bit[27:24] value H'3 from AVB_AVTP_MATCH_A resp. AVB_AVTP_CAPTURE_A to AVB_AVTP_MATCH resp. AVB_AVTP_CAPTURE. Update the R-Car E3 pin control driver to reflect this. Signed-off-by: Takeshi Kihara [geert: Reword, reference errata] Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190904121658.2617-2-geert+renesas@glider.be commit 4d3cae42544775c71521e8ed5adb64c1839036b9 Author: Biju Das Date: Thu Sep 19 09:17:11 2019 +0100 dt-bindings: reset: rcar-rst: Document r8a774b1 reset module Document bindings for the RZ/G2N (R8A774B1) reset module. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1568881036-4404-4-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 56abd14af3c18e8f22dfc74f34c617101b748a4a Author: Biju Das Date: Thu Sep 19 09:17:09 2019 +0100 dt-bindings: power: rcar-sysc: Document r8a774b1 sysc Document bindings for the RZ/G2N (a.k.a. R8A774B1) system controller. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1568881036-4404-2-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d30286ebbace486af71d3fc35a6ea941c19eb66d Author: Biju Das Date: Tue Sep 17 13:48:12 2019 +0100 dt-bindings: arm: renesas: Add HopeRun RZ/G2N boards This patch adds board HiHope RZ/G2N (the main board, powered by the R8A774B1) and board HiHope RZ/G2 EX (the expansion board that sits on top of the HiHope RZ/G2N). Both boards are made by Jiangsu HopeRun Software Co., Ltd. (a.k.a. HopeRun). Signed-off-by: Biju Das Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1568724492-32087-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 28a5f64ad9c41bfc8a12982fb95637e842b3cd7c Author: Biju Das Date: Thu Sep 5 10:30:41 2019 +0100 dt-bindings: arm: renesas: Document RZ/G2N SoC DT bindings Add device tree bindings documentation for the Renesas RZ/G2N (r8a774b1) SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1567675844-19247-2-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b43502e925487d6f9d9305f172569335aace9cc8 Author: Fabrizio Castro Date: Tue Jun 11 14:06:40 2019 +0100 dt-bindings: timer: renesas: tmu: Document r8a774a1 bindings Document RZ/G2M (R8A774A1) SoC in the Renesas TMU bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Rob Herring Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/1560258401-9517-6-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d8b178741e5ba571fbcc187c9e3cf9c0eaebf328 Author: Biju Das Date: Tue Sep 17 14:05:28 2019 +0100 arm64: defconfig: Enable R8A774B1 SoC Enable the Renesas RZ/G2N (R8A774B1) SoC in the ARM64 defconfig. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1568725530-55241-3-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 84cd9d3442b755b804618b265d39ab99df829ab2 Author: Magnus Damm Date: Wed Sep 18 10:54:52 2019 +0900 ARM: dts: emev2: Add whitespace for GPIO nodes It turns out that the GPIO nodes for EMEV2 are missing whitespace, so focus on what is important in life and adjust the coding style to match the rest of the code base. Signed-off-by: Magnus Damm Link: https://lore.kernel.org/r/156877169225.29395.9771334507494949542.sendpatchset@octo Signed-off-by: Geert Uytterhoeven commit 9d6f4d4ddafbc90b810388e742e7fe553a8d263c Author: Geert Uytterhoeven Date: Wed Sep 4 14:01:14 2019 +0200 ARM: dts: lager: Replace spaces by TABs Make it easier to compare the file with other similar files. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190904120114.1894-3-geert+renesas@glider.be commit 3b47f2292d23e797478534ed25eb5005374a5a55 Author: Geert Uytterhoeven Date: Wed Sep 4 14:01:13 2019 +0200 ARM: dts: gose: Replace spaces by TABs Make it easier to compare the file with other similar files. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190904120114.1894-2-geert+renesas@glider.be commit 83f7f812a8706aa9c23b02d945f670cdef116e2c Author: Biju Das Date: Tue Sep 17 14:05:30 2019 +0100 arm64: dts: renesas: Add HiHope RZ/G2N main board support Basic support for the HiHope RZ/G2N main board: - Memory, - Main crystal, - Serial console Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1568725530-55241-5-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 9b33e3001b67f9dcd52548db2949f5a04d0b4017 Author: Biju Das Date: Fri Sep 27 14:06:24 2019 +0100 arm64: dts: renesas: Initial r8a774b1 SoC device tree Basic support for the RZ/G2N (R8A774B1) SoC. Added placeholders to avoid compilation error with the common platform code. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1569589584-56917-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 652fd0f44e98a7fa87be9e97115749e103ccf703 Author: Biju Das Date: Fri Sep 13 09:50:08 2019 +0100 arm64: dts: renesas: r8a774c0: Add dynamic power coefficient Describe the dynamic power coefficient of A53 CPUs. Based on work by Gaku Inami and others. Signed-off-by: Biju Das Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/1568364608-46548-2-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8438bfda9d76815707a7823ab91a944eea6d6266 Author: Biju Das Date: Fri Sep 13 09:50:07 2019 +0100 arm64: dts: renesas: r8a774c0: Create thermal zone to support IPA Setup a thermal zone driven by SoC temperature sensor. Create passive trip points and bind them to CPUFreq cooling device that supports power extension. Based on the work done by Dien Pham and others for r8a77990 SoC. Signed-off-by: Biju Das Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/1568364608-46548-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 28a1b34c00dad4be91108369ca25ef8dc8bf850d Author: Kieran Bingham Date: Thu Sep 12 11:31:43 2019 +0100 arm64: dts: renesas: r8a77970: Fix PWM3 The pwm3 was incorrectly added with a compatible reference to the renesas,pwm-r8a7790 (H2) due to a single characther ommision. Fix the compatible string. Fixes: de625477c632 ("arm64: dts: renesas: r8a779{7|8}0: add PWM support") Signed-off-by: Kieran Bingham Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20190912103143.985-1-kieran.bingham+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven commit 3cbcfececc364d83ce48ec88519eb526d5a6d3d0 Author: Dien Pham Date: Fri Jan 18 11:47:53 2019 +0100 arm64: dts: r8a7796: Add cpuidle support for CA53 cores Enable cpuidle (core shutdown) support for R-Car M3-W CA53 cores. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Ulrich Hecht Link: https://lore.kernel.org/r/1547808474-19427-5-git-send-email-uli+renesas@fpond.eu Signed-off-by: Geert Uytterhoeven commit 824a88b5671fc88ef5dd0bf6861f7497b3db0d28 Author: Khiem Nguyen Date: Fri Jan 18 11:47:52 2019 +0100 arm64: dts: r8a7796: Add cpuidle support for CA57 cores Enable cpuidle (core shutdown) support for R-Car M3-W CA57 cores. Parameters were found after evaluation by gaku.inami.xw@bp.renesas.com; they help to keep the performance and reduce the power consumption. Signed-off-by: Khiem Nguyen Signed-off-by: Takeshi Kihara [dien.pham.ry: Apply new cpuidle parameters] Signed-off-by: Dien Pham Signed-off-by: Ulrich Hecht Link: https://lore.kernel.org/r/1547808474-19427-4-git-send-email-uli+renesas@fpond.eu Signed-off-by: Geert Uytterhoeven commit fe87bde8deff35ddc288ba4099830c61fdcfabf8 Author: Dien Pham Date: Fri Jan 18 11:47:51 2019 +0100 arm64: dts: r8a7795: Add cpuidle support for CA53 cores Enables cpuidle (core shutdown) support for R-Car H3 CA53 cores. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Ulrich Hecht Link: https://lore.kernel.org/r/1547808474-19427-3-git-send-email-uli+renesas@fpond.eu Signed-off-by: Geert Uytterhoeven commit a3ba116909e38ab525445b5262ee70c588469816 Author: Khiem Nguyen Date: Fri Jan 18 11:47:50 2019 +0100 arm64: dts: r8a7795: Add cpuidle support for CA57 cores Enable cpuidle (core shutdown) support for R-Car H3 CA57 cores. Parameters were found after evaluation by gaku.inami.xw@bp.renesas.com; they help to keep the performance and reduce the power consumption. Signed-off-by: Khiem Nguyen [dien.pham.ry: Apply new cpuidle parameters] Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Ulrich Hecht Link: https://lore.kernel.org/r/1547808474-19427-2-git-send-email-uli+renesas@fpond.eu Signed-off-by: Geert Uytterhoeven commit 3c19b46a1f2416fa42ecbdbbc11b7122bdbd15d0 Author: Jacopo Mondi Date: Sun Aug 25 16:01:34 2019 +0200 arm64: dts: renesas: Add LIF channel indices to vsps properties According to the Renesas R-Car DU bindings documentation, the 'vsps' property should be composed of a phandle to the VSP instance and the index of the LIF channel assigned to the DU channel. Some SoC device tree source files do not specify any LIF channel index, relying on the driver defaulting to 0 if not specified. Align all device tree files by specifying the LIF channel indices as prescribed by the bindings documentation. Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Link: https://lore.kernel.org/r/20190825140135.12150-2-jacopo+renesas@jmondi.org/ Signed-off-by: Geert Uytterhoeven commit ba28236e043dae273ce22782008e667e6e4bbd5e Author: Markus Elfring Date: Tue Aug 27 15:22:12 2019 +0200 clk: renesas: mstp: Delete unnecessary kfree() in cpg_mstp_clocks_init() A NULL pointer would be passed to a call of the function kfree() directly after a call of the function kzalloc() failed at one place. Remove this superfluous function call. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/e66b822b-026b-29cc-e461-6334aafd1d30@web.de Signed-off-by: Geert Uytterhoeven commit 54ce17dd40fd846a7ac1e87e1103032933d2bd21 Author: Biju Das Date: Thu Sep 5 07:52:40 2019 +0100 dt-bindings: clk: Add r8a774b1 CPG Core Clock Definitions Add all RZ/G2N Clock Pulse Generator Core Clock Outputs, as listed in Table 8.2d ("List of Clocks [RZ/G2N]") of the RZ/G2N Hardware User's Manual. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1567666360-28035-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit be67c41781cb4c06a4acb0b92db0cbb728e955e2 Author: Biju Das Date: Thu Sep 5 07:52:06 2019 +0100 dt-bindings: power: Add r8a774b1 SYSC power domain definitions This patch adds power domain indices for the RZ/G2N (a.k.a r8a774b1) SoC. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1567666326-27373-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4361f5b6118ad77872f54f813321aa4905a7e9c1 Author: Xin Long Date: Mon Sep 9 16:30:10 2019 +0800 xfrm: remove the unnecessary .net_exit for xfrmi The xfrm_if(s) on each netns can be deleted when its xfrmi dev is deleted. xfrmi dev's removal can happen when: a. netns is being removed and all xfrmi devs will be deleted. b. rtnl_link_unregister(&xfrmi_link_ops) in xfrmi_fini() when xfrm_interface.ko is being unloaded. So there's no need to use xfrmi_exit_net() to clean any xfrm_if up. v1->v2: - Fix some changelog. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 7cd4cb94cf4f3bfd070d78714d4fe249700250a8 Author: YueHaibing Date: Mon Sep 30 17:43:27 2019 +0800 scsi: bfa: Make restart_bfa static Fix sparse warning: drivers/scsi/bfa/bfad.c:1491:1: warning: symbol 'restart_bfa' was not declared. Should it be static? Link: https://lore.kernel.org/r/20190930094327.46836-1-yuehaibing@huawei.com Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit f99f6f46f6de186b0465709e36a903c01639ab2d Author: Austin Kim Date: Tue Sep 24 18:37:16 2019 +0900 scsi: libcxgbi: remove unused function to stop warning Since 'commit fc8d0590d914 ("libcxgbi: Add ipv6 api to driver")' was introduced, there is no call to csk_print_port() and csk_print_ip() is made. Hence kernel build with clang complains below message: drivers/scsi/cxgbi/libcxgbi.c:2287:19: warning: unused function 'csk_print_port' [-Wunused-function] static inline int csk_print_port(struct cxgbi_sock *csk, char *buf) ^ drivers/scsi/cxgbi/libcxgbi.c:2298:19: warning: unused function 'csk_print_ip' [-Wunused-function] static inline int csk_print_ip(struct cxgbi_sock *csk, char *buf) ^ Remove csk_print_port() and csk_print_ip() to stop warning. Link: https://lore.kernel.org/r/20190924093716.GA78230@LGEARND20B15 Signed-off-by: Austin Kim Signed-off-by: Martin K. Petersen commit d188b0675b21d5a6ca27b3e741381813983f4719 Author: Ryan Attard Date: Thu Sep 26 11:22:17 2019 -0500 scsi: core: Add sysfs attributes for VPD pages 0h and 89h Add sysfs attributes for the ATA information page and Supported VPD Pages page. Link: https://lore.kernel.org/r/20190926162216.56591-1-ryanattard@ryanattard.info Signed-off-by: Ryan Attard Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 9e322310e16c8cc2ae90b885a821dba121025eb7 Author: Colin Ian King Date: Fri Sep 27 10:58:40 2019 +0100 scsi: smartpqi: clean up an indentation issue There are some statements that are indented too deeply, remove the extraneous tabs and rejoin split lines. Link: https://lore.kernel.org/r/20190927095840.26377-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 9adc2a5c3b7df39c8f7ede1edf8232a377694829 Author: Colin Ian King Date: Thu Sep 26 12:57:16 2019 +0100 scsi: csiostor: clean up indentation issue The goto statement is indented incorrectly, remove the extraneous tab. Link: https://lore.kernel.org/r/20190926115716.3698-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 8ee132b3cb699530a74faba44f6227ad4ead0ea1 Author: Milan P. Gandhi Date: Thu Sep 26 10:55:02 2019 +0530 scsi: core: Log SCSI command age with errors Couple of users had requested to print the SCSI command age along with command failure errors. This is a small change, but allows users to get more important information about the command that was failed, it would help the users in debugging the command failures: Link: https://lore.kernel.org/r/20190926052501.GA8352@machine1 Signed-off-by: Milan P. Gandhi Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit c3dde2f3fe6aa48ed4650e103d23aac8f9620ddd Author: Daniel Wagner Date: Tue Sep 24 09:29:06 2019 +0200 scsi: qedf: Add port_id getter Add qedf_get_host_port_id() to the transport template. The fc_transport_template initializes the port_id member to the default value of -1. The new getter ensures that the sysfs entry shows the current value and not the default one, e.g by using 'lsscsi -H -t' Link: https://lore.kernel.org/r/20190924072906.23737-1-dwagner@suse.de Signed-off-by: Daniel Wagner Acked-by: Saurav Kashyap Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit e6d6ba8014e5205d66e3711047463f04132c3b1e Author: Stanley Chu Date: Mon Sep 16 23:56:51 2019 +0800 scsi: ufs-mediatek: enable auto suspend capability Enable auto suspend capability in MediaTek UFS driver. Link: https://lore.kernel.org/r/1568649411-5127-4-git-send-email-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 49615ba144a0929c725d08f0d3ba8494c8b77404 Author: Stanley Chu Date: Mon Sep 16 23:56:50 2019 +0800 scsi: ufs: override auto suspend tunables for ufs Rework from previous work by: Sujit Reddy Thumma Override auto suspend tunables for UFS device LUNs during initialization so as to efficiently manage background operations and the power consumption. Link: https://lore.kernel.org/r/1568649411-5127-3-git-send-email-stanley.chu@mediatek.com Reviewed-by: Avri Altman Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit c74f8056621738f5be9f5d3d7e0caa927b21aef6 Author: Stanley Chu Date: Mon Sep 16 23:56:49 2019 +0800 scsi: core: allow auto suspend override by low-level driver Rework from previous work by: Sujit Reddy Thumma Until now the scsi mid-layer forbids runtime suspend till userspace enables it. This is mainly to quarantine some disks with broken runtime power management or have high latencies executing suspend resume callbacks. If the userspace doesn't enable the runtime suspend the underlying hardware will be always on even when it is not doing any useful work and thus wasting power. Some low-level drivers for the controllers can efficiently use runtime power management to reduce power consumption and improve battery life. Allow runtime suspend parameters override within the LLD itself instead of waiting for userspace to control the power management. Link: https://lore.kernel.org/r/1568649411-5127-2-git-send-email-stanley.chu@mediatek.com Reviewed-by: Avri Altman Reviewed-by: Bart Van Assche Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit b1000fcca1760d3e81f0943f0ca8b9be3ed3b999 Author: Colin Ian King Date: Mon Sep 16 10:17:06 2019 +0100 scsi: hisi_sas: fix spelling mistake "digial" -> "digital" There is a spelling mistake in literal string. Fix it. Link: https://lore.kernel.org/r/20190916091706.32268-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 63e40c553f0844b210f7aeb557500af7bb384b15 Author: Arkadiusz Drabczyk Date: Thu Sep 12 19:25:46 2019 +0200 scsi: csiostor: Fix spelling typos Fix several spelling typos in comments in csio_hw.c. Link: https://lore.kernel.org/r/20190912172546.16489-1-arkadiusz@drabczyk.org Signed-off-by: Arkadiusz Drabczyk Signed-off-by: Martin K. Petersen commit 0e62395da2bd5166d7c9e14cbc7503b256a34cb0 Author: Navid Emamdoost Date: Tue Sep 10 18:44:15 2019 -0500 scsi: bfa: release allocated memory in case of error In bfad_im_get_stats if bfa_port_get_stats fails, allocated memory needs to be released. Link: https://lore.kernel.org/r/20190910234417.22151-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost Signed-off-by: Martin K. Petersen commit 69be9264e35c107a262bcda6909ca1bcb0b1524c Author: Markus Elfring Date: Sat Sep 7 14:25:31 2019 +0200 scsi: ufs-hisi: Use PTR_ERR_OR_ZERO() in ufs_hisi_get_resource() Simplify this function implementation by using a known function. Generated by: scripts/coccinelle/api/ptr_ret.cocci [mkp: applied by hand] Link: https://lore.kernel.org/r/9e667f19-434e-ed30-78cb-9ddc6323c51e@web.de Signed-off-by: Markus Elfring Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit 7e52440c81aa2cf200102072e337ab6b11c331ef Author: Colin Ian King Date: Fri Sep 6 18:01:04 2019 +0100 scsi: ufs: make array setup_attrs static const, makes object smaller Don't populate the array setup_attrs on the stack but instead make it static const. Makes the object code smaller by 180 bytes. Before: text data bss dec hex filename 2140 224 0 2364 93c drivers/scsi/ufs/ufshcd-dwc.o After: text data bss dec hex filename 1863 320 0 2183 887 drivers/scsi/ufs/ufshcd-dwc.o (gcc version 9.2.1, amd64) Link: https://lore.kernel.org/r/20190906170104.10450-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 5ece56a2a6b24f635bd46931467bd70acd8bcce9 Author: Colin Ian King Date: Fri Sep 6 17:45:22 2019 +0100 scsi: ips: make array 'options' static const, makes object smaller Don't populate the array 'options' on the stack but instead make it static const. Makes the object code smaller by 143 bytes. Before: text data bss dec hex filename 94483 11272 1184 106939 1a1bb drivers/scsi/ips.o After: text data bss dec hex filename 94244 11368 1184 106796 1a12c drivers/scsi/ips.o (gcc version 9.2.1, amd64) Link: https://lore.kernel.org/r/20190906164522.5644-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit b23c640c33b8ab10060b8d243d1aa817e5eb00dc Author: Colin Ian King Date: Fri Sep 6 17:39:45 2019 +0100 scsi: fnic: make array dev_cmd_err static const, makes object smaller Don't populate the array dev_cmd_err on the stack but instead make it static const. Makes the object code smaller by 80 bytes. Before: text data bss dec hex filename 21461 1564 0 23025 59f1 drivers/scsi/fnic/vnic_dev.o After: text data bss dec hex filename 21318 1628 0 22946 59a2 drivers/scsi/fnic/vnic_dev.o (gcc version 9.2.1, amd64) Link: https://lore.kernel.org/r/20190906163945.3889-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit c88dcd8aca65bf8de54093e245128157bb953d85 Author: Colin Ian King Date: Thu Sep 5 14:50:17 2019 +0100 scsi: mvsas: remove redundant assignment to variable rc The variable rc is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Link: https://lore.kernel.org/r/20190905135017.23772-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit da6d2965dbdb480f091c42f54a09abe8056282e5 Author: Colin Ian King Date: Thu Sep 5 14:42:29 2019 +0100 scsi: qla2xxx: remove redundant assignment to pointer host The pointer host is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Link: https://lore.kernel.org/r/20190905134229.21194-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 1c6294858950a3cc609570f050734e1492e6a155 Author: YueHaibing Date: Sat Aug 31 13:03:48 2019 +0000 scsi: smartpqi: remove set but not used variable 'ctrl_info' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/smartpqi/smartpqi_init.c: In function 'pqi_driver_version_show': drivers/scsi/smartpqi/smartpqi_init.c:6164:24: warning: variable 'ctrl_info' set but not used [-Wunused-but-set-variable] commit 6d90615f1346 ("scsi: smartpqi: add sysfs entries") added it but it was never used. Also remove variable 'shost'. [mkp: commit desc] Link: https://lore.kernel.org/r/20190831130348.20552-1-yuehaibing@huawei.com Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit a3a65ddd79c3c975eb1295863289aa4bbaded283 Author: Colin Ian King Date: Sat Aug 31 08:39:03 2019 +0100 scsi: smartpqi: clean up indentation of a statement There is a statement that is indented one level too deeply, remove the tab, re-join broken line and remove some empty lines. Link: https://lore.kernel.org/r/20190831073903.7834-1-colin.king@canonical.com Addresses-Coverity: ("Indentation does not match nesting") Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit d8b2625f4699a36b1753d87e96b0c50a4531c065 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:50 2019 -0400 scsi: mpt3sas: Bump mpt3sas driver version to 32.100.00.00 Bump mpt3sas driver version to 32.100.00.00 Link: https://lore.kernel.org/r/1568379890-18347-14-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 9e64fd1e65f72d229f96fcf390576e772770a01c Author: Sreekanth Reddy Date: Fri Sep 13 09:04:49 2019 -0400 scsi: mpt3sas: Fix module parameter max_msix_vectors Load driver with module parameter "max_msix_vectors". Value provided in module parameter is not used by mpt3sas driver. Driver loads with max controller supported MSI-X value. In _base_alloc_irq_vectors use reply_queue_count which is determined using user provided msix value insted of ioc->msix_vector_count which tells max supported msix value of the controller. Link: https://lore.kernel.org/r/1568379890-18347-13-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 77fd4f2c88bf83205a21f9ca49fdcc0c7868dba9 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:48 2019 -0400 scsi: mpt3sas: Reject NVMe Encap cmnds to unsupported HBA If any faulty application issues an NVMe Encapsulated commands to HBA which doesn't support NVMe protocol then driver should return the command as invalid with the following message. "HBA doesn't support NVMe. Rejecting NVMe Encapsulated request." Otherwise below page fault kernel panic will be observed while building the PRPs as there is no PRP pools allocated for the HBA which doesn't support NVMe drives. RIP: 0010:_base_build_nvme_prp+0x3b/0xf0 [mpt3sas] Call Trace: _ctl_do_mpt_command+0x931/0x1120 [mpt3sas] _ctl_ioctl_main.isra.11+0xa28/0x11e0 [mpt3sas] ? prepare_to_wait+0xb0/0xb0 ? tty_ldisc_deref+0x16/0x20 _ctl_ioctl+0x1a/0x20 [mpt3sas] do_vfs_ioctl+0xaa/0x620 ? vfs_read+0x117/0x140 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x60/0x190 entry_SYSCALL_64_after_hwframe+0x44/0xa9 [mkp: tweaked error string] Link: https://lore.kernel.org/r/1568379890-18347-12-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit b06ff10249036eec74fa8565503ac40d0ee92213 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:47 2019 -0400 scsi: mpt3sas: Use Component img header to get Package ver The firmware image layout has been changed for Aero controllers. All compatible HBAs have to get Firmware Package version from Component Image Header layout. The Signature field in FW header is set to 0xEB000042 for products compatible with Component Image Header. For compatible controllers, driver fetches firmware package version from ApplicationSpecific field of Component Image Header. Link: https://lore.kernel.org/r/1568379890-18347-11-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 29f571f8b4cc652cae9244630f714a610549d301 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:46 2019 -0400 scsi: mpt3sas: Fail release cmnd if diag buffer is released Return the diag buffer release command with -EINVAL status if the buffer is already released. Link: https://lore.kernel.org/r/1568379890-18347-10-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit a8a6cbcd038de4ee3722c17edd7a4d84ce423f7d Author: Sreekanth Reddy Date: Fri Sep 13 09:04:45 2019 -0400 scsi: mpt3sas: Add app owned flag support for diag buffer Added a new status flag named MPT3_DIAG_BUFFER_IS_APP_OWNED and it will set whenever application registers the diag buffer & it will be cleared when application unregisters the buffer. When this flag is enabled, and if application issues diag buffer register command without releasing the buffer, then register command will be failed with -EINVAL status by saying that this buffer is already registered by the application. When user issues a trace buffer register command through sysfs parameter, and if trace buffer is in released stated but not yet unregistered by the application which was owning it, then driver will unregister the buffer by itself and freshly register the 1MB sized trace buffer with the HBA firmware. Link: https://lore.kernel.org/r/1568379890-18347-9-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit a066f4c31359d07b1a2c5144b4b9a29901365fd0 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:44 2019 -0400 scsi: mpt3sas: Reuse diag buffer allocated at load time The diag buffer which is allocated during driver load time or through sysfs parameter is marked as driver allocated diag buffer. MPT3_DIAG_BUFFER_IS_DRIVER_ALLOCATED bit will be set for this buffer. This buffer won't be de-allocated even when application issues unregister command, driver just clears the registered status bit. Same buffer will be reused while re-registering the same diag buffer type by any application. While re-registering the same diag buffer type application has to register with the same size that the buffer was allocated during driver load time. This buffer size can be read by the application by issuing diag 'query' command. This always makes sure that the memory is available for applications for collecting the firmware logs. Only thing is that this won't allow the application to re-register the diag buffer with different size, but the buffer size which is allocated during driver load time will be enough for most of the cases for collecting the firmware logs. Link: https://lore.kernel.org/r/1568379890-18347-8-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit dd180e4eedfd85b80020a6fd566601f4765a9d69 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:43 2019 -0400 scsi: mpt3sas: clear release bit when buffer reregistered Clear MPT3_DIAG_BUFFER_IS_RELEASED bit once diag buffer is re-registered after reading the buffer, else driver won't release the buffer and return the 'diag release' command with -EINVAL status saying that buffer is already released. Link: https://lore.kernel.org/r/1568379890-18347-7-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 08e7378ee331a803cfdd91c512a3dea040f1da79 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:42 2019 -0400 scsi: mpt3sas: Maintain owner of buffer through UniqueID Application A has registered a diag buffer and looking for particular event to happen to release & read the trace buffer. Meanwhile application B has unregistered the diag buffer and now Application A can't get the required diag buffer. So proper diag buffer ownership is missing. Each application has to maintain its own Unique ID. Now driver has to save the Application's UniqueID for each diag buffer type when diag buffer is registered. And driver has to allow 'release', 'read' & 'unregister' diag commands only if application's UniqueID matches with saved UniqueID for the corresponding diag buffer type. When diag buffer is registered by the driver, then the UniqueID saved by the driver is "BRCM" (i.e. 0x4252434D) for SAS3 and above generations HBA devices. For SAS2 HBAs, driver keeps the legacy UniqueID 0x07075900 for maintaining compatibility with the legacy SAS2 application and this improvement won't be applicable for SAS2 HBA devices. Any application can own the buffer registered by the driver by sending diag register request to driver with same buffer type and size (Application can get the buffer size by sending 'query' command). Then driver changes the ownership of the buffer by saving application's UniqueID for that corresponding buffer type. Also, application can re-register the diag buffer with same size without un-registering it, but diag buffer should be released before re-registering it. By allowing this, driver no need to deallocate and allocate a new buffer for re-register command, same buffer can be re-used. Link: https://lore.kernel.org/r/1568379890-18347-6-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 764f472ba4a7a0c18107ebfbe1a9f1f5f5a1e411 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:41 2019 -0400 scsi: mpt3sas: Free diag buffer without any status check Memory leak can happen when diag buffer is released but not unregistered (where buffer is deallocated) by the user. During module unload time driver is not deallocating the buffer if the buffer is in released state. Deallocate the diag buffer during module unload time without any diag buffer status checks. Link: https://lore.kernel.org/r/1568379890-18347-5-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 782b281883caf70289ba6a186af29441a117d23e Author: Sreekanth Reddy Date: Fri Sep 13 09:04:40 2019 -0400 scsi: mpt3sas: Fix clear pending bit in ioctl status When user issues diag register command from application with required size, and if driver unable to allocate the memory, then it will fail the register command. While failing the register command, driver is not currently clearing MPT3_CMD_PENDING bit in ctl_cmds.status variable which was set before trying to allocate the memory. As this bit is set, subsequent register command will be failed with BUSY status even when user wants to register the trace buffer will less memory. Clear MPT3_CMD_PENDING bit in ctl_cmds.status before returning the diag register command with no memory status. Link: https://lore.kernel.org/r/1568379890-18347-4-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 4bc50dc1afb7b77dfc80a1f8f0742b14d6f6e376 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:39 2019 -0400 scsi: mpt3sas: Display message before releasing diag buffer Display message before releasing the diag buffer so that user knows which event caused the release of diag buffer. Releasing of diag buffer means HBA firmware stops posting the firmware logs on the registered diag buffer. Link: https://lore.kernel.org/r/1568379890-18347-3-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit d04a6edfed0b2e99d9a8385503737944db3d5649 Author: Sreekanth Reddy Date: Fri Sep 13 09:04:38 2019 -0400 scsi: mpt3sas: Register trace buffer based on NVDATA settings Currently if user wishes to enable the host trace buffer during driver load time, then user has to load the driver with module parameter 'diag_buffer_enable' set to one. Alternatively now the user can enable host trace buffer by enabling the following fields in manufacturing page11 in NVDATA (nvdata xml is used while building HBA firmware image): * HostTraceBufferMaxSizeKB - Maximum trace buffer size in KB that host can allocate, * HostTraceBufferMinSizeKB - Minimum trace buffer size in KB atleast host should allocate, * HostTraceBufferDecrementSizeKB - size by which host can reduce from buffer size and retry the buffer allocation when buffer allocation failed with previous calculated buffer size. The driver will register the trace buffer automatically without any module parameter during boot time when above fields are enabled in manufacturing page11 in HBA firmware. Driver follows the following algorithm for enabling the host trace buffer during driver load time: * If user has loaded the driver with module parameter 'diag_buffer_enable' set to one, then driver allocates 2MB buffer and registers this buffer with HBA firmware for capturing the firmware trace logs. * Else driver reads manufacture page11 data and checks whether HostTraceBufferMaxSizeKB filed is zero or not? - If HostTraceBufferMaxSizeKB is non-zero then driver tries to allocate HostTraceBufferMaxSizeKB size of memory. If the buffer allocation is successful, then it will register this buffer with HBA firmware, else in a loop the driver will try again by reducing the current buffer size with HostTraceBufferDecrementSizeKB size until memory allocation is successful or buffer size falls below HostTraceBufferMinSizeKB. If the memory allocation is successful, then the buffer will be registered with the firmware. Else, if the buffer size falls below the HostTraceBufferMinSizeKB, then driver won't register trace buffer with HBA firmware. - If HostTraceBufferMaxSizeKB is zero, then driver won't register trace buffer with HBA firmware. Link: https://lore.kernel.org/r/1568379890-18347-2-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 5f9d423a725a86505ba42ed026c9a827410a69cd Author: James Smart Date: Sat Sep 21 20:59:06 2019 -0700 scsi: lpfc: Update lpfc version to 12.4.0.1 Update lpfc version to 12.4.0.1 Link: https://lore.kernel.org/r/20190922035906.10977-21-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ff349bca17716f310697b619b8cf9b926e852ba9 Author: James Smart Date: Sat Sep 21 20:59:05 2019 -0700 scsi: lpfc: cleanup: remove unused fcp_txcmlpq_cnt Local variable fcp_txcmplq_cnt is initialized to 0 and then displayed in lpfc driver message 0387. Presumed residual (or unused) code from previous commit. Removed fcp_txcmplq_cnt. Link: https://lore.kernel.org/r/20190922035906.10977-20-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 412e7375e48fc7dc660da99c4b699e4475873f7b Author: James Smart Date: Sat Sep 21 20:59:04 2019 -0700 scsi: lpfc: Complete removal of FCoE T10 PI support on SLI-4 adapters T10 PI support on SLI-4-based FCoE adapters is not supported. A prior commit in the 12.4.0.0 stream added device recognition that would prevent T10 PI enablement. However, it didn't contain a complete device list. Thus some SLI-4 FCoE adapters still had T10 PI enabled. Fix by expanding the device list that identifies FCoE devices. Link: https://lore.kernel.org/r/20190922035906.10977-19-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit d11ed16db698c31663938d004451b11ac6b2b2e1 Author: James Smart Date: Sat Sep 21 20:59:03 2019 -0700 scsi: lpfc: Update async event logging This patch updates ACQE handling for: - an EEPROM failure error reported by the adapter. - ensures that all data for any ACQE, recognized or not, is logged. - Given that all data is now logged unconditionally, the default case (unrecognized) data can be reduced. Link: https://lore.kernel.org/r/20190922035906.10977-18-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 35a635af54ce79881eb35ba20b64dcb1e81b0389 Author: James Smart Date: Sat Sep 21 20:59:02 2019 -0700 scsi: lpfc: Fix list corruption detected in lpfc_put_sgl_per_hdwq In lpfc_release_io_buf, an lpfc_io_buf is returned to the 'available' pool before any associated sgl or cmd and rsp buffers are returned via their respective 'put' routines. If xri rebalancing occurs and an lpfc_io_buf structure is reused quickly, there may be a race condition between release of old and association of new resources. Re-ordered lpfc_release_io_buf to release sgl and cmd/rsp buffer lists before releasing the lpfc_io_buf structure for re-use. Fixes: d79c9e9d4b3d ("scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware.") Link: https://lore.kernel.org/r/20190922035906.10977-17-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a4c21acca2be6729ecbe72eda9b08092725b0a77 Author: James Smart Date: Sat Sep 21 20:59:01 2019 -0700 scsi: lpfc: Fix hdwq sgl locks and irq handling Many of the sgl-per-hdwq paths are locking with spin_lock_irq() and spin_unlock_irq() and may unwittingly raising irq when it shouldn't. Hard deadlocks were seen around lpfc_scsi_prep_cmnd(). Fix by converting the locks to irqsave/irqrestore. Fixes: d79c9e9d4b3d ("scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware.") Link: https://lore.kernel.org/r/20190922035906.10977-16-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit d38b4a527fe898f859f74a3a43d4308f48ac7855 Author: James Smart Date: Sat Sep 21 20:59:00 2019 -0700 scsi: lpfc: Fix spinlock_irq issues in lpfc_els_flush_cmd() While reviewing the CT behavior, issues with spinlock_irq were seen. The driver should be using spinlock_irqsave/irqrestore in the els flush routine. Changed to spinlock_irqsave/irqrestore. Link: https://lore.kernel.org/r/20190922035906.10977-15-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 15498dc1a55b7aaea4b51ff03e3ff0f662e73f44 Author: James Smart Date: Sat Sep 21 20:58:59 2019 -0700 scsi: lpfc: Fix list corruption in lpfc_sli_get_iocbq After study, it was determined there was a double free of a CT iocb during execution of lpfc_offline_prep and lpfc_offline. The prep routine issued an abort for some CT iocbs, but the aborts did not complete fast enough for a subsequent routine that waits for completion. Thus the driver proceeded to lpfc_offline, which releases any pending iocbs. Unfortunately, the completions for the aborts were then received which re-released the ct iocbs. Turns out the issue for why the aborts didn't complete fast enough was not their time on the wire/in the adapter. It was the lpfc_work_done routine, which requires the adapter state to be UP before it calls lpfc_sli_handle_slow_ring_event() to process the completions. The issue is the prep routine takes the link down as part of it's processing. To fix, the following was performed: - Prevent the offline routine from releasing iocbs that have had aborts issued on them. Defer to the abort completions. Also means the driver fully waits for the completions. Given this change, the recognition of "driver-generated" status which then releases the iocb is no longer valid. As such, the change made in the commit 296012285c90 is reverted. As recognition of "driver-generated" status is no longer valid, this patch reverts the changes made in commit 296012285c90 ("scsi: lpfc: Fix leak of ELS completions on adapter reset") - Modify lpfc_work_done to allow slow path completions so that the abort completions aren't ignored. - Updated the fdmi path to recognize a CT request that fails due to the port being unusable. This stops FDMI retries. FDMI will be restarted on next link up. Link: https://lore.kernel.org/r/20190922035906.10977-14-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 24c7c0a6d3de68b6e15532d18749e561d260c160 Author: James Smart Date: Sat Sep 21 20:58:58 2019 -0700 scsi: lpfc: Fix host hang at boot or slow boot Scenarios were seen where a host hung when the system booted or the host was very slow in booting. The link would not come up and no luns were visible to the host. After investigation, this was found to be due to the introduction of a new ACQE that adapter may generate to report a adapter hw warning. The ACQE was delivered to the driver very early in adapter initialization, when the driver did not expect command completion. As part of handling this unexpected interrupt the an EQEs are consumed and discarded and the EQ rearmed. The issue is the CQ that cause the EQE and thus the interrupt was not processed and the CQ was left unarmed. Meaning it would no longer generate a new interrupt condition. Subsequent mailbox commands used to initialize the adapter use the same CQ, and as there was no completion interrupt generated, the driver never saw the mailbox commands complete and it would wait long command timeouts. Fix by having the early flush routine also process the related CQ and rearm the CQ. Link: https://lore.kernel.org/r/20190922035906.10977-13-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 43bfea1bffb6b01089c2fe483ede1b036e166579 Author: James Smart Date: Sat Sep 21 20:58:57 2019 -0700 scsi: lpfc: Fix coverity errors on NULL pointer checks Coverity flagged several scenarios where checking of null pointer values wasn't consistent. Fix the code to that be consistent on checking. Link: https://lore.kernel.org/r/20190922035906.10977-12-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 51f8e43ed355d30b3c93293077ecb0c0afac3799 Author: James Smart Date: Sat Sep 21 20:58:56 2019 -0700 scsi: lpfc: Fix NVMe ABTS in response to receiving an ABTS When the port, running as a nvme target, receives an ABTS, it submits commands to the adapter to Abort i/o outstanding in the adapter. The Abort command formatting routine left a command field set to zero, which instructs the adapter to generate an ABTS on the wire as part of cleaning up the I/O. This is common operation for an initiator, but not for a target. Fix the driver to check whether an ABTS had been received for the I/O, and if so, change the Abort command formatting so that the ABTS generation is disabled (IA=1). No need to ABTS it when the other side already has. Also refactored the code such that there is a single routine being used for nvme or nvmet ABORT requests, and IA is an argument. Link: https://lore.kernel.org/r/20190922035906.10977-11-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 3f97aed6117c7677eb16756c4ec8b86000fd5822 Author: James Smart Date: Sat Sep 21 20:58:55 2019 -0700 scsi: lpfc: Fix discovery failures when target device connectivity bounces An issue was seen discovering all SCSI Luns when a target device undergoes link bounce. The driver currently does not qualify the FC4 support on the target. Therefore it will send a SCSI PRLI and an NVMe PRLI. The expectation is that the target will reject the PRLI if it is not supported. If a PRLI times out, the driver will retry. The driver will not proceed with the device until both SCSI and NVMe PRLIs are resolved. In the failure case, the device is FCP only and does not respond to the NVMe PRLI, thus initiating the wait/retry loop in the driver. During that time, a RSCN is received (device bounced) causing the driver to issue a GID_FT. The GID_FT response comes back before the PRLI mess is resolved and it prematurely cancels the PRLI retry logic and leaves the device in a STE_PRLI_ISSUE state. Discovery with the target never completes or resets. Fix by resetting the node state back to STE_NPR_NODE when GID_FT completes, thereby restarting the discovery process for the node. Link: https://lore.kernel.org/r/20190922035906.10977-10-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9df0a0381a600438d19def2c3868c02871e0cd72 Author: James Smart Date: Sat Sep 21 20:58:54 2019 -0700 scsi: lpfc: Fix GPF on scsi command completion Faults are seen with RIP of lpfc_scsi_cmd_iocb_cmpl(). The failure is when lpfc_update_status is being called as part of the completion. After debugging, it was seen the issue was the shost pointer that the driver derived from the scsi cmd. The crash showed the cmd->device pointer being bogus, which is likely as the scsi devices were offlined prior. The bogus device pointer caused subsequent pointers derived from the location, specifically the vport, to be bogus. Fix by adjusting the calling sequence to pass in the vport rather than having to derive it from the cmd structure. Link: https://lore.kernel.org/r/20190922035906.10977-9-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 07b8582430370097238b589f4e24da7613ca6dd3 Author: James Smart Date: Sat Sep 21 20:58:53 2019 -0700 scsi: lpfc: Fix locking on mailbox command completion Symptoms were seen of the driver not having valid data for mailbox commands. After debugging, the following sequence was found: The driver maintains a port-wide pointer of the mailbox command that is currently in execution. Once finished, the port-wide pointer is cleared (done in lpfc_sli4_mq_release()). The next mailbox command issued will set the next pointer and so on. The mailbox response data is only copied if there is a valid port-wide pointer. In the failing case, it was seen that a new mailbox command was being attempted in parallel with the completion. The parallel path was seeing the mailbox no long in use (flag check under lock) and thus set the port pointer. The completion path had cleared the active flag under lock, but had not touched the port pointer. The port pointer is cleared after the lock is released. In this case, the completion path cleared the just-set value by the parallel path. Fix by making the calls that clear mbox state/port pointer while under lock. Also slightly cleaned up the error path. Link: https://lore.kernel.org/r/20190922035906.10977-8-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 0f154226d699fefe651ccc4db773efc05a820b56 Author: James Smart Date: Sat Sep 21 20:58:52 2019 -0700 scsi: lpfc: Fix device recovery errors after PLOGI failures When target-side fault injections are made, the driver isn't reconnecting to the remote port. The driver is logging "2753" error messages which state: "PLOGI failure DID:1B2400 Status:x3/xf0240008" The failures status is indicating a Illegal field error, which points to the Temporary RPI field being used for the ELS. This error typically means the driver used an RPI that was already registered (shouldn't be registered if using it in this context). Study has found that if the driver were in discovery attempts and encountered an error, it wouldn't flag the temporary rpi in error. Yet the rpi was released for reallocation in these error paths and another ELS could allocate the rpi. In the failure situation a retry was done on an ELS that had encountered an error, and as the rpi wasn't marked in error, the ELS reused the rpi it originally allocated. But that rpi had been allocated by a different ELS issued after the original error and before the retry attempt. The different ELS had succeeded and the RPI was registered. Fix by marking the rpi state for the node to be in error, aka as needing reallocation, upon an error in the els processing. Error state marking is always done prior to release back to the internal rpi free list, which the driver wasn't doing in cases prior. Also enhanced some of the logging to help in the next case of problem troubleshooting. Link: https://lore.kernel.org/r/20190922035906.10977-7-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 97acd0019d5dadd9c0e111c2083c889bfe548f25 Author: James Smart Date: Sat Sep 21 20:58:51 2019 -0700 scsi: lpfc: Fix rpi release when deleting vport A prior use-after-free mailbox fix solved it's problem by null'ing a ndlp pointer. However, further testing has shown that this change causes a later state change to occasionally be skipped, which results in a reference count never being decremented thus the rpi is never released, which causes a vport delete to never succeed. Revise the fix in the prior patch to no longer null the ndlp. Instead the RELEASE_RPI flag is set which will drive the release of the rpi. Given the new code was added at a deep indentation level, refactor the code block using a new routine that avoids the indentation issues. Fixes: 9b1640686470 ("scsi: lpfc: Fix use-after-free mailbox cmd completion") Link: https://lore.kernel.org/r/20190922035906.10977-6-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a5f7337f5a82fc4b13b4481a7e56977656cbe7d1 Author: James Smart Date: Sat Sep 21 20:58:50 2019 -0700 scsi: lpfc: Fix NVME io abort failures causing hangs The nvme-fc transport may call to abort an io on controller reset. If the driver is out of resources to issue an abort command, it just gives up and does nothing. The transport expects the lldd to always be able to terminate an io it has issued. At that point, the controller hangs waiting for aborted ios to be returned. Note: flaged by "6136" and "6176" error messages. Root issue was the adapter mis-allocated the number resources it allocated for command entries for the adapter. Convert the driver to allocate command resources based on the number of xris supported by the FC port - 1 resource for the original command and 1 resource for the abort request. Link: https://lore.kernel.org/r/20190922035906.10977-5-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit b7b95fb8637d7bd271df25e17e002a584b16f411 Author: James Smart Date: Sat Sep 21 20:58:49 2019 -0700 scsi: lpfc: Fix miss of register read failure check Coverity flagged missing status check on register read that flags a poisoned data return value. Add checking of register read status. Link: https://lore.kernel.org/r/20190922035906.10977-4-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 65a3df63e7ff5addafc75ad8bc5ef5856db55429 Author: James Smart Date: Sat Sep 21 20:58:48 2019 -0700 scsi: lpfc: Fix premature re-enabling of interrupts in lpfc_sli_host_down Use of spin_lock_irq may re-enable interrupts prematurely. Convert to spin_lock. Note: code is under the phba->hba_lock which has been locked with irqsave. Link: https://lore.kernel.org/r/20190922035906.10977-3-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 359e10f087dbb7b9c9f3035a8cc4391af45bd651 Author: James Smart Date: Sat Sep 21 20:58:47 2019 -0700 scsi: lpfc: Fix pt2pt discovery on SLI3 HBAs After exchanging PLOGI on an SLI-3 adapter, the PRLI exchange failed. Link trace showed the port was assigned a non-zero n_port_id, but didn't use the address on the PRLI. The assigned address is set on the port by the CONFIG_LINK mailbox command. The driver responded to the PRLI before the mailbox command completed. Thus the PRLI response used the old n_port_id. Defer the PRLI response until CONFIG_LINK completes. Link: https://lore.kernel.org/r/20190922035906.10977-2-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 741a98d022362c90609ac9dcd8ad56314d8e68b3 Author: Brendan Higgins Date: Mon Sep 23 02:02:49 2019 -0700 kunit: fix failure to build without printk Previously KUnit assumed that printk would always be present, which is not a valid assumption to make. Fix that by removing call to vprintk_emit, and calling printk directly. This fixes a build error[1] reported by Randy. For context this change comes after much discussion. My first stab[2] at this was just to make the KUnit logging code compile out; however, it was agreed that if we were going to use vprintk_emit, then vprintk_emit should provide a no-op stub, which lead to my second attempt[3]. In response to me trying to stub out vprintk_emit, Sergey Senozhatsky suggested a way for me to remove our usage of vprintk_emit, which led to my third attempt at solving this[4]. In my third version of this patch[4], I completely removed vprintk_emit, as suggested by Sergey; however, there was a bit of debate over whether Sergey's solution was the best. The debate arose due to Sergey's version resulting in a checkpatch warning, which resulted in a debate over correct printk usage. Joe Perches offered an alternative fix which was somewhat less far reaching than what Sergey had suggested and importantly relied on continuing to use %pV. Much of the debated centered around whether %pV should be widely used, and whether Sergey's version would result in object size bloat. Ultimately, we decided to go with Sergey's version. Reported-by: Randy Dunlap Link[1]: https://lore.kernel.org/linux-kselftest/c7229254-0d90-d90e-f3df-5b6d6fc0b51f@infradead.org/ Link[2]: https://lore.kernel.org/linux-kselftest/20190827174932.44177-1-brendanhiggins@google.com/ Link[3]: https://lore.kernel.org/linux-kselftest/20190827234835.234473-1-brendanhiggins@google.com/ Link[4]: https://lore.kernel.org/linux-kselftest/20190828093143.163302-1-brendanhiggins@google.com/ Cc: Stephen Rothwell Cc: Sergey Senozhatsky Cc: Joe Perches Cc: Tim.Bird@sony.com Signed-off-by: Brendan Higgins Acked-by: Randy Dunlap # build-tested Reviewed-by: Petr Mladek Signed-off-by: Shuah Khan commit 88aecb096c4142d18ec3929fa56dd0ac886e3b4c Author: Brendan Higgins Date: Mon Sep 23 02:02:48 2019 -0700 MAINTAINERS: add proc sysctl KUnit test to PROC SYSCTL section Add entry for the new proc sysctl KUnit test to the PROC SYSCTL section, and add Iurii as a maintainer. Signed-off-by: Brendan Higgins Cc: Iurii Zaikin Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Acked-by: Luis Chamberlain Signed-off-by: Shuah Khan commit 2cb80dbbbaba4f2f86f686c34cb79ea5cbfb0edb Author: Iurii Zaikin Date: Mon Sep 23 02:02:47 2019 -0700 kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec() KUnit tests for initialized data behavior of proc_dointvec that is explicitly checked in the code. Includes basic parsing tests including int min/max overflow. Signed-off-by: Iurii Zaikin Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Acked-by: Luis Chamberlain Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 804ec79a00451363c5e2836917431424bf0216f6 Author: Brendan Higgins Date: Mon Sep 23 02:02:46 2019 -0700 MAINTAINERS: add entry for KUnit the unit testing framework Add myself as maintainer of KUnit, the Linux kernel's unit testing framework. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit c23a283b532c833de486e0fb8d756c7e7581803b Author: Brendan Higgins Date: Mon Sep 23 02:02:45 2019 -0700 Documentation: kunit: add documentation for KUnit Add documentation for KUnit, the Linux kernel unit testing framework. - Add intro and usage guide for KUnit - Add API reference Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins Cc: Jonathan Corbet Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit ff7b437f36b026dcd7351f86a90a0424c891dc06 Author: Brendan Higgins Date: Mon Sep 23 02:02:44 2019 -0700 kunit: defconfig: add defconfigs for building KUnit tests Add defconfig for UML and a fragment that can be used to configure other architectures for building KUnit tests. Add option to kunit_tool to use a defconfig to create the kunitconfig. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 6ebf5866f2e870cf9451a2068c787bc2b30025e9 Author: Felix Guo Date: Mon Sep 23 02:02:43 2019 -0700 kunit: tool: add Python wrappers for running KUnit tests The ultimate goal is to create minimal isolated test binaries; in the meantime we are using UML to provide the infrastructure to run tests, so define an abstract way to configure and run tests that allow us to change the context in which tests are built without affecting the user. This also makes pretty and dynamic error reporting, and a lot of other nice features easier. kunit_config.py: - parse .config and Kconfig files. kunit_kernel.py: provides helper functions to: - configure the kernel using kunitconfig. - build the kernel with the appropriate configuration. - provide function to invoke the kernel and stream the output back. kunit_parser.py: parses raw logs returned out by kunit_kernel and displays them in a user friendly way. test_data/*: samples of test data for testing kunit.py, kunit_config.py, etc. Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 73ba5aaf93b41e641a250530f48274d783dd56fc Author: Avinash Kondareddy Date: Mon Sep 23 02:02:42 2019 -0700 kunit: test: add tests for KUnit managed resources Add unit tests for KUnit managed resources. KUnit managed resources (struct kunit_resource) are resources that are automatically cleaned up at the end of a KUnit test, similar to the concept of devm_* managed resources. Signed-off-by: Avinash Kondareddy Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit e4aea8f8532b55f966d828efcf720f8aeb203e13 Author: Brendan Higgins Date: Mon Sep 23 02:02:41 2019 -0700 kunit: test: add the concept of assertions Add support for assertions which are like expectations except the test terminates if the assertion is not satisfied. The idea with assertions is that you use them to state all the preconditions for your test. Logically speaking, these are the premises of the test case, so if a premise isn't true, there is no point in continuing the test case because there are no conclusions that can be drawn without the premises. Whereas, the expectation is the thing you are trying to prove. It is not used universally in x-unit style test frameworks, but I really like it as a convention. You could still express the idea of a premise using the above idiom, but I think KUNIT_ASSERT_* states the intended idea perfectly. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit e4eb117f61486e8a1e6edec7d95dbdd712a5429b Author: Brendan Higgins Date: Mon Sep 23 02:02:40 2019 -0700 kunit: test: add tests for kunit test abort Add KUnit tests for the KUnit test abort mechanism (see preceding commit). Add tests both for general try catch mechanism as well as non-architecture specific mechanism. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 5f3e06208920ee78b68cf3527f40ffbff83cb3bc Author: Brendan Higgins Date: Mon Sep 23 02:02:39 2019 -0700 kunit: test: add support for test abort Add support for aborting/bailing out of test cases, which is needed for implementing assertions. An assertion is like an expectation, but bails out of the test case early if the assertion is not met. The idea with assertions is that you use them to state all the preconditions for your test. Logically speaking, these are the premises of the test case, so if a premise isn't true, there is no point in continuing the test case because there are no conclusions that can be drawn without the premises. Whereas, the expectation is the thing you are trying to prove. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 33adf80f5b52e3f7c55ad66ffcaaff93c6888aaa Author: Brendan Higgins Date: Mon Sep 23 02:02:38 2019 -0700 objtool: add kunit_try_catch_throw to the noreturn list Fix the following warning seen on GCC 7.3: kunit/test-test.o: warning: objtool: kunit_test_unsuccessful_try() falls through to next function kunit_test_catch() kunit_try_catch_throw is a function added in the following patch in this series; it allows KUnit, a unit testing framework for the kernel, to bail out of a broken test. As a consequence, it is a new __noreturn function that objtool thinks is broken (as seen above). So fix this warning by adding kunit_try_catch_throw to objtool's noreturn list. Reported-by: kbuild test robot Signed-off-by: Brendan Higgins Acked-by: Josh Poimboeuf Link: https://www.spinics.net/lists/linux-kbuild/msg21708.html Cc: Peter Zijlstra Signed-off-by: Shuah Khan commit d8e2a76b4c7918e4639de17db3d35c86ceb48506 Author: Brendan Higgins Date: Mon Sep 23 02:02:37 2019 -0700 kunit: test: add initial tests Add a test for string stream along with a simpler example. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 84bc809eecf37f3bd3ee7d2002b2528787a11cb1 Author: Brendan Higgins Date: Mon Sep 23 02:02:36 2019 -0700 lib: enable building KUnit in lib/ KUnit is a new unit testing framework for the kernel and when used is built into the kernel as a part of it. Add KUnit to the lib Kconfig and Makefile to allow it to be actually built. Signed-off-by: Brendan Higgins Cc: Randy Dunlap Cc: Andrew Morton Cc: Masahiro Yamada Cc: Kees Cook Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 73cda7bb8bfb1d4be0325d76172950ede1a65fd0 Author: Brendan Higgins Date: Mon Sep 23 02:02:35 2019 -0700 kunit: test: add the concept of expectations Add support for expectations, which allow properties to be specified and then verified in tests. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 6b229e593ff9ac2fd8d83c3654e0f39fa1d49a67 Author: Brendan Higgins Date: Mon Sep 23 02:02:34 2019 -0700 kunit: test: add assertion printing library Add `struct kunit_assert` and friends which provide a structured way to capture data from an expectation or an assertion (introduced later in the series) so that it may be printed out in the event of a failure. Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit d1fadef194008b22d7d9608426cad29d4bb69ab9 Author: Brendan Higgins Date: Mon Sep 23 02:02:33 2019 -0700 kunit: test: add string_stream a std::stream like string builder A number of test features need to do pretty complicated string printing where it may not be possible to rely on a single preallocated string with parameters. So provide a library for constructing the string as you go similar to C++'s std::string. string_stream is really just a string builder, nothing more. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 0a756853586ce185ee1bb9ccbe5ec03e103e594f Author: Brendan Higgins Date: Mon Sep 23 02:02:32 2019 -0700 kunit: test: add test resource management API Create a common API for test managed resources like memory and test objects. A lot of times a test will want to set up infrastructure to be used in test cases; this could be anything from just wanting to allocate some memory to setting up a driver stack; this defines facilities for creating "test resources" which are managed by the test infrastructure and are automatically cleaned up at the conclusion of the test. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 914cc63eea6fbe11ed46dba5e4438d81b0cd42d2 Author: Brendan Higgins Date: Mon Sep 23 02:02:31 2019 -0700 kunit: test: add KUnit test runner core Add core facilities for defining unit tests; this provides a common way to define test cases, functions that execute code which is under test and determine whether the code under test behaves as expected; this also provides a way to group together related test cases in test suites (here we call them test_modules). Just define test cases and how to execute them for now; setting expectations on code will be defined later. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Luis Chamberlain Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 6acdf7e19b37cb3a9258603d0eab315079c19c5e Author: Logan Gunthorpe Date: Tue Sep 10 13:58:33 2019 -0600 PCI/switchtec: Read all 64 bits of part_event_bitmap The part_event_bitmap register is 64 bits wide, so read it with ioread64() instead of the 32-bit ioread32(). Fixes: 52eabba5bcdb ("switchtec: Add IOCTLs to the Switchtec driver") Link: https://lore.kernel.org/r/20190910195833.3891-1-logang@deltatee.com Reported-by: Doug Meyer Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v4.12+ Cc: Kelvin Cao commit f8b410e3695a86686f4075b997bc53c8a178e4e2 Author: Linus Walleij Date: Fri Sep 27 13:48:33 2019 +0200 gpio: aspeed-sgpio: Rename and add Kconfig/Makefile This renames the "gpio-aspeed" driver to conform with other GPIO drivers as "gpio-aspeed-sgpio.c". All GPIO drivers should start with the string "gpio-" no special exceptions. Also the Kconfig and Makefile entries should normally go with the driver but I missed this in my review, sorry for mistake. "CONFIG_GPIO_ASPEED_SGPIO" is used to activate this driver. Cc: Hongwei Zhang Fixes: 7db47faae79b ("gpio: aspeed: Add SGPIO driver") Signed-off-by: Linus Walleij Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190927114833.12551-1-linus.walleij@linaro.org commit e81b88932985c9134d410f4eaaaa9b81a3b4bd0c Author: Yauhen Kharuzhy Date: Tue Sep 17 00:15:36 2019 +0300 extcon-intel-cht-wc: Don't reset USB data connection at probe Intel Cherry Trail Whiskey Cove extcon driver connect USB data lines to PMIC at driver probing for further charger detection. This causes reset of USB data sessions and removing all devices from bus. If system was booted from Live CD or USB dongle, this makes system unusable. Check if USB ID pin is floating and re-route data lines in this case only, don't touch otherwise. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Yauhen Kharuzhy [cw00.choi: Clean-up the minor coding style] Signed-off-by: Chanwoo Choi commit 0074a66c11a07845d67f1172cca2dd816c279722 Author: Linus Walleij Date: Fri Sep 13 13:35:30 2019 +0200 pinctrl: sirf/atlas7: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Barry Song Cc: Yuping Luo Cc: Rongjun Ying Cc: Thierry Reding Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190913113530.5536-6-linus.walleij@linaro.org commit aead3991401b368021c59dbb44bbf1d3669b4f79 Author: Linus Walleij Date: Fri Sep 13 13:35:29 2019 +0200 pinctrl: sirf: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Barry Song Cc: Yuping Luo Cc: Rongjun Ying Cc: Thierry Reding Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190913113530.5536-5-linus.walleij@linaro.org commit de0221f620e973c0ef9a5acbc0c0621ab28c31c5 Author: Linus Walleij Date: Fri Sep 13 13:35:28 2019 +0200 pinctrl: nuvoton: npcm7xx: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Tomer Maimon Cc: Kun Yi Cc: Thierry Reding Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190913113530.5536-4-linus.walleij@linaro.org commit face7c04b030e9de3c9ff9bd566603751ef6e26a Author: Linus Walleij Date: Fri Sep 13 13:35:27 2019 +0200 pinctrl: spear/plgpio: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Shiraz Hashim Cc: Thierry Reding Signed-off-by: Linus Walleij Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20190913113530.5536-3-linus.walleij@linaro.org commit 835513b0fb2c482c92a85603b3991059f8f25b18 Author: Linus Walleij Date: Fri Sep 13 13:35:26 2019 +0200 pinctrl: pic32: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Joshua Henderson Cc: Thierry Reding Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190913113530.5536-2-linus.walleij@linaro.org commit ef039827bf5180ae92fe6c99ccd410f06c2016f6 Author: Linus Walleij Date: Fri Sep 13 13:35:25 2019 +0200 pinctrl: coh901: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Thierry Reding Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190913113530.5536-1-linus.walleij@linaro.org commit 3ee5f8ab5e718afdde9984a089137360bdfc66eb Author: Jernej Skrabec Date: Sat Sep 14 15:51:00 2019 +0200 clk: sunxi-ng: h6: Use sigma-delta modulation for audio PLL Audio devices needs exact clock rates in order to correctly reproduce the sound. Until now, only integer factors were used to configure H6 audio PLL which resulted in inexact rates. Fix that by adding support for fractional factors using sigma-delta modulation look-up table. It contains values for two most commonly used audio base frequencies. Signed-off-by: Jernej Skrabec Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit cee0534a08d0ccc07b4e4405d77c5c9da78a4fa9 Author: Douglas Anderson Date: Thu Sep 19 14:26:41 2019 -0700 ARM: dts: rockchip: Add cpu id to rk3288 efuse node This just adds in another field of what's stored in the e-fuse on rk3288. Though I can't personally promise that every rk3288 out there has the CPU ID stored in the eFuse at this location, there is some evidence that it is correct: - This matches what was in the Chrome OS 3.14 branch (see EFUSE_CHIP_UID_OFFSET and EFUSE_CHIP_UID_LEN) for rk3288. - The upstream rk3399 dts file has this same data at the same offset and with the same length, indiciating that this is likely common for several modern Rockchip SoCs. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20190919142611.1.I309434f00a2a9be71e4437991fe08abc12f06e2e@changeid Signed-off-by: Heiko Stuebner commit 9cc05ed4df03a60c8119b49e66f8b47436d89c27 Author: Sven Van Asbroeck Date: Wed Sep 18 14:35:49 2019 -0400 staging: fieldbus: move "offline mode" definition to fieldbus core anybus-s cards use the "offline mode" property to determine if process memory should be clear, set, or frozen when the card is offline. Move this property to the fieldbus core, so that it can become part of the future fieldbus config interface. Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20190918183552.28959-3-TheSven73@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c1a38e1fe05b7740b5e36ec0f7675f241a1e225 Author: Sven Van Asbroeck Date: Wed Sep 18 14:35:48 2019 -0400 staging: fieldbus core: remove unused strings Remove two unused static const strings - a leftover from a previous stage. Interestingly, neither gcc nor sparse warned about their presence. Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20190918183552.28959-2-TheSven73@gmail.com Signed-off-by: Greg Kroah-Hartman commit 854d66df74aed25cabb25e8224179374b5d5ecbe Author: Adham Abozaeid Date: Mon Sep 16 19:37:08 2019 +0000 staging: wilc1000: look for rtc_clk clock in spi mode If rtc_clk is provided from DT, use it and enable it. This is optional. The signal may be hardcoded and no need to be requested, but if DT provides it, use it. Signed-off-by: Adham Abozaeid Link: https://lore.kernel.org/r/20190916193701.20755-1-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman commit 8399918f3056e1033f0f4c08eab437fb38d6f22d Author: Ajay Singh Date: Thu Sep 26 15:14:59 2019 +0000 staging: wilc1000: use RCU list to maintain vif interfaces list Make use of RCU list to maintain virtual interfaces instead of an array. The update operation on 'vif' list is less compare to the read operations. Mostly the 'vif' list elements are accessed for the read operation, so RCU list is more suited for this requirement. The shifting of interface index id's during the delete interface is not required. As the firmware only supports 2 interfaces so make use of available free slot index id during add interface. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20190926151436.27819-3-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit fb2d74342fedca6074dd3c4ae9339f76d35caac3 Author: Ajay Singh Date: Thu Sep 26 15:14:56 2019 +0000 staging: wilc1000: move wlan_deinit_locks() in wilc_netdev_cleanup() Move deinitialization of lock during the module remove and the initialization of lock wilc_cfg80211_init(). This to ensure locks are available during module load and gets free during unload. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20190926151436.27819-2-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 82e465642f93e3134227a4e5bd3418238695ad54 Author: Ajay Singh Date: Thu Sep 26 15:14:54 2019 +0000 staging: wilc1000: remove unnecessary netdev validation check in del_key() Removed unnecessary check to compare vif interface with zeroth index element in vif array. Already the caller takes care of passing the appropriate netdev handler during the del key operation. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20190926151436.27819-1-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 228241944a48113470d3c3b46c88ba7fbe0a274b Author: Connor Kuehl Date: Thu Sep 26 08:03:17 2019 -0700 staging: rtl8188eu: fix possible null dereference Inside a nested 'else' block at the beginning of this function is a call that assigns 'psta' to the return value of 'rtw_get_stainfo()'. If 'rtw_get_stainfo()' returns NULL and the flow of control reaches the 'else if' where 'psta' is dereferenced, then we will dereference a NULL pointer. Fix this by checking if 'psta' is not NULL before reading its 'psta->qos_option' data member. Addresses-Coverity: ("Dereference null return value") Signed-off-by: Connor Kuehl Acked-by: Larry Finger Link: https://lore.kernel.org/r/20190926150317.5894-1-connor.kuehl@canonical.com Signed-off-by: Greg Kroah-Hartman commit c47be36db3283bdcc071b55ccbb366fba1f57b2f Author: Michael Straube Date: Thu Sep 26 19:59:33 2019 +0200 staging: rtl8723bs: remove unused function write_cam_from_cache Function write_cam_from_cache in rtw_wlan_util.c is never used, so remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20190926175933.44967-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 17e325285dfb50a9d729c7426d125cc8d05b2e8b Author: Colin Ian King Date: Fri Sep 27 10:24:00 2019 +0100 staging: vt6656: clean up an indentation issue There is a block of code that is indented incorrectly, add in the missing tabs. Signed-off-by: Colin Ian King Reviewed-by: Quentin Deslandes Link: https://lore.kernel.org/r/20190927092400.20213-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 5dec9a28778e0b857eed9817d957460a23c9053b Author: Colin Ian King Date: Thu Sep 26 13:50:57 2019 +0100 staging: rtl8192e: clean up indentation issue The RT_TRACE is indented incorrectly, add in the missing tabs. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190926125057.16158-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 43821e36e5fcbc5ded28ce80290aff20445bd166 Author: Connor Kuehl Date: Tue Sep 24 07:28:19 2019 -0700 staging: rtl8188eu: remove dead code/vestigial do..while loop The local variable 'bcmd_down' is always set to true almost immediately before the do-while's condition is checked. As a result, !bcmd_down evaluates to false which short circuits the logical AND operator meaning that the second operand is never reached and is therefore dead code. Furthermore, the do..while loop may be removed since it will always only execute once because 'bcmd_down' is always set to true, so the !bcmd_down evaluates to false and the loop exits immediately after the first pass. Fix this by removing the loop and its condition variables 'bcmd_down' and 'retry_cnts' While we're in there, also fix some checkpatch.pl suggestions regarding spaces around arithmetic operators like '+' Addresses-Coverity: ("Logically dead code") Signed-off-by: Connor Kuehl Link: https://lore.kernel.org/r/20190924142819.5243-1-connor.kuehl@canonical.com Signed-off-by: Greg Kroah-Hartman commit 01b16aed578a0302672e7a4c2a778fef2472b29e Author: Jerry Lin Date: Wed Sep 25 15:42:43 2019 +0800 staging: olpc_dcon: fix wrong dependencies in Kconfig file To allow simultaneous support for XO-1 and XO-1.5. This module require GPIO_CS5535 (for 1.0) and ACPI (for 1.5) now. Reported-by: kbuild test robot Signed-off-by: Jerry Lin Link: https://lore.kernel.org/r/20190925074243.GA24947@compute1 Signed-off-by: Greg Kroah-Hartman commit af42abb680e33f3428a38080decd205f6b2e4770 Author: Kefeng Wang Date: Fri Sep 20 14:25:33 2019 +0800 staging: Use pr_warn instead of pr_warning As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent _warn style. Let's do it. Cc: Karsten Keil Signed-off-by: Kefeng Wang Link: https://lore.kernel.org/r/20190920062544.180997-22-wangkefeng.wang@huawei.com Signed-off-by: Greg Kroah-Hartman commit ca312438cf176a16d4b89350cade8789ba8d7133 Author: Navid Emamdoost Date: Thu Sep 19 21:51:33 2019 -0500 staging: rtl8192u: fix multiple memory leaks on error path In rtl8192_tx on error handling path allocated urbs and also skb should be released. Signed-off-by: Navid Emamdoost Link: https://lore.kernel.org/r/20190920025137.29407-1-navid.emamdoost@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0911224b6bf4c86c486746f1f993cddb006901e1 Author: Navid Emamdoost Date: Thu Sep 19 20:42:54 2019 -0500 staging: rtl8192u: release memory on error path In rtl819xU_tx_cmd if usb_submit_urb fails the allocated memories should be released. Signed-off-by: Navid Emamdoost Link: https://lore.kernel.org/r/20190920014303.31410-1-navid.emamdoost@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0605bed9ba62e2e284be791da7ad6ee37d2f29cf Author: Aliasgar Surti Date: Wed Sep 18 18:46:36 2019 +0530 staging: qlge: Removed unnecessary variable coccicheck reported warning for unnecessary variable used. This patch fixes the same by removing the variable and returning value directly. Signed-off-by: Aliasgar Surti Link: https://lore.kernel.org/r/1568812596-25926-1-git-send-email-aliasgar.surti500@gmail.com Signed-off-by: Greg Kroah-Hartman commit d9dc93128d13ba26d2764dc339f3a34c92da229a Author: Rohit Sarkar Date: Wed Sep 11 00:19:31 2019 +0530 staging: rtl8712: Replace snprintf with scnprintf When the number of bytes to be printed exceeds the limit snprintf returns the number of bytes that would have been printed (if there was no truncation). This might cause issues, hence use scnprintf which returns the actual number of bytes printed to buffer always. Signed-off-by: Rohit Sarkar Link: https://lore.kernel.org/r/20190910184931.GA8228@SARKAR Signed-off-by: Greg Kroah-Hartman commit e40219d5e4b2177bfd4d885e7b64e3b236af40ac Author: Jerry Lin Date: Fri Sep 6 09:06:14 2019 +0800 staging: olpc_dcon: allow simultaneous XO-1 and XO-1.5 support This patch remove model related configuration. Since the module can decide which platform data to use itself base on current running olpc board. Also change module dependency from (GPIO_CS5535 || GPIO_CS5535=n) to (GPIO_CS5535 || ACPI) because original one does not make any sense and module only doing real work when GPIO_CS5535 or ACPI is setted. Remove kernel configurations: - FB_OLPC_DCON_1 - FB_OLPC_DCON_1_5 Signed-off-by: Jerry Lin Link: https://lore.kernel.org/r/20190906010613.GA562@compute1 Signed-off-by: Greg Kroah-Hartman commit c2e323290f9f7cd0d8115a7e7ad4d3311e5a2aa9 Author: Sumera Priyadarsini Date: Wed Sep 18 19:27:44 2019 +0530 staging: rtl8192u: Remove unnecessary line-breaks in function signatures This patch fixes the function signatures for rtl8192_handle_assoc_response, rtl8192_record_rxdesc_forlateruse, rtl819xusb_process_received_packet and other relevant code blocks to avoid the checkpatch.pl warning: CHECK: Lines should not end with a '(' Signed-off-by: Sumera Priyadarsini Link: https://lore.kernel.org/r/ed06fc34eecd883f02bb9a037522b65c63a5eec4.1568814125.git.sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3278ef5961e0e28a57b774cf506e141facc9af4d Author: Sumera Priyadarsini Date: Wed Sep 18 19:27:43 2019 +0530 staging: rtl8192u: Fix alignment to match open parenthesis This patch fixes the file r8192U_core.c to avoid the checkpatch.pl warning: CHECK: Alignment should match open parenthesis Signed-off-by: Sumera Priyadarsini Link: https://lore.kernel.org/r/07a4311b70ed22833a01a9067418639905041cb7.1568814125.git.sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 78f7aac11e0d6270b347223f1677cc0183730f86 Author: Sumera Priyadarsini Date: Wed Sep 18 19:27:42 2019 +0530 staging: rtl8192u: Remove unnecessary blank lines This patch fixes the file r8192U_core.c to avoid the chechpatch.pl warnings: CHECK: Please don't use multiple blank lines CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Sumera Priyadarsini Link: https://lore.kernel.org/r/95ce1564a34ff65e51fd63a241713e23e12dac91.1568814125.git.sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 88b3673ec0d6403c25d52e0a46797485e9d01150 Author: Rohit Sarkar Date: Tue Sep 10 23:54:15 2019 +0530 staging: rtl8192u: ieee80211: Replace snprintf with scnprintf When the number of bytes to be printed exceeds the limit snprintf returns the number of bytes that would have been printed (if there was no truncation). This might cause issues, hence use scnprintf which returns the actual number of bytes printed to buffer always. Signed-off-by: Rohit Sarkar Link: https://lore.kernel.org/r/20190910182415.GA5768@SARKAR Signed-off-by: Greg Kroah-Hartman commit 1c0c5e9b23128eb5bf37d7cbf17051571420c0a6 Author: Aurabindo Jayamohanan Date: Thu Sep 19 11:39:50 2019 +0000 staging: board: use appropriate macro to initialize struct Make code more readable by using macros defined for initializing struct resource Signed-off-by: Aurabindo Jayamohanan Link: https://lore.kernel.org/r/20190919113945.13700-1-mail@aurabindo.in Signed-off-by: Greg Kroah-Hartman commit fe11afc326f1c9450d43acc72bb84f6902262b08 Author: Connor Kuehl Date: Fri Sep 20 11:48:07 2019 +0200 staging: rtl8188eu: remove unnecessary self-assignment This is a self-assignment which is redundant. Fix this by removing the self-assignment. Addresses-Coverity: ("Self assignment") Signed-off-by: Connor Kuehl Link: https://lore.kernel.org/r/20190920094807.9217-1-connor.kuehl@canonical.com Signed-off-by: Greg Kroah-Hartman commit 97a0ea779560fba2053b732be1beab1085a7959e Author: Michael Straube Date: Thu Sep 12 13:42:57 2019 +0200 staging: rtl8188eu: cleanup long line in rtw_mlme_ext.c Remove comparsion to NULL and unnecessary parentheses to avoid line length over 80 characters and follow kernel coding style. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20190912114257.17529-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8635b4c480b0d17f65bfd2d3c9522048662f7c32 Author: Ido Tamir Date: Fri Sep 6 14:22:41 2019 +0300 staging: sm750fb: CHECK: Avoid CamelCase This patch fixes the checkpatch.pl warning: CHECK: Avoid CamelCase for the following files: drivers/staging/sm750fb/ddk750_chip.c drivers/staging/sm750fb/ddk750_chip.h drivers/staging/sm750fb/ddk750_mode.c Signed-off-by: Ido Tamir Link: https://lore.kernel.org/r/20190906112241.GA2144@ubuntu-kernel Signed-off-by: Greg Kroah-Hartman commit 87a966d8ca34436ee91ea7a5de229c6e2b08bb90 Author: Michael Straube Date: Sat Sep 14 13:56:34 2019 +0200 staging: rtl8723bs: remove return statements from void functions Remove unnecessary return statements from void functions reported by checkpatch. WARNING: void function return statements are not generally useful Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20190914115634.67874-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9cdb1928683dc4efbd69db1cac9935238ca8864d Author: Saiyam Doshi Date: Thu Sep 12 20:23:46 2019 +0530 staging: rtl8723bs: remove unneeded conversion to bool Relational and logical operators evaluate to bool, explicit conversion is overly verbose and unneeded. This issue found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Saiyam Doshi Link: https://lore.kernel.org/r/20190912145346.GA9013@SD.eic.com Signed-off-by: Greg Kroah-Hartman commit 53e3a7e1d7af57f4597e6d6329f0f3d911f21e60 Author: Colin Ian King Date: Fri Sep 6 18:50:21 2019 +0100 staging: rtl8723bs: core: make array op_class static const, makes object smaller Don't populate the array op_class on the stack but instead make it static const. Makes the object code smaller by 64 bytes. Before: text data bss dec hex filename 93553 7944 5056 106553 1a039 rtl8723bs/core/rtw_mlme_ext.o After: text data bss dec hex filename 93425 8008 5056 106489 19ff9 rtl8723bs/core/rtw_mlme_ext.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190906175021.25103-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 6f406c73037f0ce2b9e30ffcb9d44661da7b7006 Author: Colin Ian King Date: Mon Sep 16 10:22:11 2019 +0100 staging: rtl8723bs: os_dep: fix spelling mistake "offet" -> "offset" There is a spelling mistake in a DBG_871X error message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190916092211.32646-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 55ecd411c31dcbe54b5ac3af4038942cd056a63f Author: Aliasgar Surti Date: Wed Sep 18 14:55:49 2019 +0530 staging: rtl8723bs: Removed unneeded variables coccicheck reported warning for unneeded variable used. This patch removes the unneeded variables. Signed-off-by: Aliasgar Surti Link: https://lore.kernel.org/r/1568798749-9855-1-git-send-email-aliasgar.surti500@gmail.com Signed-off-by: Greg Kroah-Hartman commit fb794a708a71d7c6af55f04cc4ed2d5823fb8b33 Author: Benjamin Herrenschmidt Date: Wed Sep 25 11:16:55 2019 +1000 PCI: Protect pci_reassign_bridge_resources() against concurrent addition/removal pci_reassign_bridge_resources() can be called by pci_resize_resource() at runtime, it walks the PCI tree up and down, and it isn't currently protected against any changes or hotplug operation. Hold the pci_bus_sem to protect it. Link: https://lore.kernel.org/r/7339fd73ccaf58552737ab10008333fd9f7723f2.camel@kernel.crashing.org Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Bjorn Helgaas commit 02c1c37f66b15cf54cabf71b1e51b0658996c10f Author: Nicolas Ferre Date: Mon Aug 19 17:12:19 2019 +0200 ARM: at91: Documentation: update the sama5d3 and armv7m datasheets Update SAMA5D3 and SAM E70/S70/V70/V71 Family SoC Datasheets. URL are updated in Microchip documentation. Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20190819151219.19727-1-nicolas.ferre@microchip.com Signed-off-by: Alexandre Belloni commit f05390d30e20cccd8f8de981dee42bcdd8d2d137 Author: Mauro Carvalho Chehab Date: Fri Sep 13 11:23:08 2019 -0300 EDAC: skx_common: get rid of unused type var drivers/edac/skx_common.c: In function ‘skx_mce_output_error’: drivers/edac/skx_common.c:478:8: warning: variable ‘type’ set but not used [-Wunused-but-set-variable] 478 | char *type, *optype; | ^~~~ Acked-by: Borislav Petkov Acked-by: Tony Luck Signed-off-by: Mauro Carvalho Chehab commit 323014d85d2699b2879ecb15cd06a15408e3e801 Author: Mauro Carvalho Chehab Date: Fri Sep 13 11:17:16 2019 -0300 EDAC: sb_edac: get rid of unused vars There are several vars unused on this driver, probably because it was a modified copy of another driver. Get rid of them. drivers/edac/sb_edac.c: In function ‘knl_get_dimm_capacity’: drivers/edac/sb_edac.c:1343:16: warning: variable ‘sad_size’ set but not used [-Wunused-but-set-variable] 1343 | u64 sad_base, sad_size, sad_limit = 0; | ^~~~~~~~ drivers/edac/sb_edac.c: In function ‘sbridge_mce_output_error’: drivers/edac/sb_edac.c:2955:8: warning: variable ‘type’ set but not used [-Wunused-but-set-variable] 2955 | char *type, *optype, msg[256]; | ^~~~ drivers/edac/sb_edac.c: In function ‘sbridge_unregister_mci’: drivers/edac/sb_edac.c:3203:22: warning: variable ‘pvt’ set but not used [-Wunused-but-set-variable] 3203 | struct sbridge_pvt *pvt; | ^~~ At top level: drivers/edac/sb_edac.c:266:18: warning: ‘correrrthrsld’ defined but not used [-Wunused-const-variable=] 266 | static const u32 correrrthrsld[] = { | ^~~~~~~~~~~~~ drivers/edac/sb_edac.c:257:18: warning: ‘correrrcnt’ defined but not used [-Wunused-const-variable=] 257 | static const u32 correrrcnt[] = { | ^~~~~~~~~~ Acked-by: Borislav Petkov Acked-by: Tony Luck Signed-off-by: Mauro Carvalho Chehab commit bb66f867812d29a57a9a7d04c43d7f6fb48127ae Author: Mauro Carvalho Chehab Date: Fri Sep 13 11:13:41 2019 -0300 EDAC: i5400_edac: get rid of some unused vars There are several temporary unused vars: drivers/edac/i5400_edac.c: In function ‘i5400_get_mc_regs’: drivers/edac/i5400_edac.c:1058:6: warning: variable ‘maxdimmperch’ set but not used [-Wunused-but-set-variable] 1058 | int maxdimmperch; | ^~~~~~~~~~~~ drivers/edac/i5400_edac.c:1057:6: warning: variable ‘maxch’ set but not used [-Wunused-but-set-variable] 1057 | int maxch; | ^~~~~ drivers/edac/i5400_edac.c: In function ‘i5400_init_dimms’: drivers/edac/i5400_edac.c:1174:6: warning: variable ‘max_dimms’ set but not used [-Wunused-but-set-variable] 1174 | int max_dimms; | ^~~~~~~~~ drivers/edac/i5400_edac.c:1173:14: warning: variable ‘channel_count’ set but not used [-Wunused-but-set-variable] 1173 | int ndimms, channel_count; | ^~~~~~~~~~~~~ Get rid of them. Acked-by: Borislav Petkov Acked-by: Tony Luck Signed-off-by: Mauro Carvalho Chehab commit 1acd05e40cb08cd9cb6d11657df696ed582a3691 Author: Mauro Carvalho Chehab Date: Fri Sep 13 11:07:14 2019 -0300 EDAC: i5400_edac: print type at debug message There are 3 types of non-recoverable errors that the MC reports: - Fatal; - Non-fatal uncorrected - Non-fatal correctable While we don't add it to the log itself, it could be useful to have this at least for debug messages. This shuts up this warning: drivers/edac/i5400_edac.c: In function ‘i5400_proccess_non_recoverable_info’: drivers/edac/i5400_edac.c:524:8: warning: variable ‘type’ set but not used [-Wunused-but-set-variable] 524 | char *type = NULL; | ^~~~ Acked-by: Borislav Petkov Acked-by: Tony Luck Signed-off-by: Mauro Carvalho Chehab commit 48356e0d57783eec766bef60c88553ee53740b3c Author: Mauro Carvalho Chehab Date: Fri Sep 13 11:03:23 2019 -0300 EDAC: i7300_edac: fix a kernel-doc syntax The declaration of the kerneldoc entry is wrong, causing this warning: drivers/edac/i7300_edac.c:824: warning: Function parameter or member 'mir_no' not described in 'decode_mir' Acked-by: Borislav Petkov Acked-by: Tony Luck Signed-off-by: Mauro Carvalho Chehab commit 9f95c8d5f84ae3e56f8fcfde2f2a2fd4326d7db6 Author: Mauro Carvalho Chehab Date: Fri Sep 13 11:01:01 2019 -0300 EDAC: i7300_edac: rename a kernel-doc var description One var was renamed, but the associated kernel-doc markup still points to the old name. Acked-by: Borislav Petkov Acked-by: Tony Luck Signed-off-by: Mauro Carvalho Chehab commit c43fa3b11e9ff7e6811ac678f196ea6bd97f3e64 Author: Mauro Carvalho Chehab Date: Fri Sep 13 10:59:39 2019 -0300 EDAC: i5100_edac: get rid of an unused var As reported by GCC with W=1: drivers/edac/i5100_edac.c:714:16: warning: variable ‘et’ set but not used [-Wunused-but-set-variable] 714 | unsigned long et; | ^~ It sounds some left over from some code before the addition of an udelay(). Acked-by: Borislav Petkov Acked-by: Tony Luck Signed-off-by: Mauro Carvalho Chehab commit ed20b7d5c65785909816a462aa7d3174064a58a3 Author: Ville Syrjälä Date: Wed Sep 25 17:14:42 2019 +0300 drm/dp/mst: Replace the fixed point thing with straight calculation Get rid of the drm_fixp_from_fraction() usage and just do the straightforward calculation directly. Cc: Lyude Paul Cc: Harry Wentland Cc: Alex Deucher Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190925141442.23236-3-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul commit 0c3bb15cfc0eb1b509de1b7dd9a0e8c18c0ac5e5 Author: Ville Syrjälä Date: Wed Sep 25 17:14:41 2019 +0300 drm/dp/mst: Handle arbitrary DP_LINK_BW values Make drm_dp_get_vc_payload() tolerate arbitrary DP_LINK_BW_* values, just like drm_dp_bw_code_to_link_rate() does since commit 57a1b0893782 ("drm: Make the bw/link rate calculations more forgiving"). Cc: Lyude Paul Cc: Sean Paul Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190925141442.23236-2-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul commit db0cc143b69e48e051610ae716d305270ea41ff6 Author: Ville Syrjälä Date: Wed Sep 25 17:14:40 2019 +0300 drm/dp/mst: Reduce nested ifs Replace the nested ifs with a single if and a logical AND. Cc: Lyude Paul Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190925141442.23236-1-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi Reviewed-by: Lyude Paul commit 1ab2a99edb374732f429282e3e8f89df1b0ceed2 Author: Ville Syrjälä Date: Wed Jul 10 15:51:43 2019 +0300 drm: Fix return type of crc .poll() Sparse compains: ../drivers/gpu/drm/drm_debugfs_crc.c:350:17: warning: incorrect type in initializer (different base types) ../drivers/gpu/drm/drm_debugfs_crc.c:350:17: expected restricted __poll_t ( *poll )( ... ) ../drivers/gpu/drm/drm_debugfs_crc.c:350:17: got unsigned int ( * )( ... ) Change the .poll() return type to __poll_t to silence it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190710125143.9965-5-ville.syrjala@linux.intel.com Reviewed-by: Sean Paul commit b9436986d279bac57fec5a98b860e4ab93a6f8d9 Author: Ville Syrjälä Date: Wed Jul 10 15:51:42 2019 +0300 drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies() Sparse complains: ../drivers/gpu/drm/drm_syncobj.c:942:13: warning: symbol 'drm_timeout_abs_to_jiffies' was not declared. Should it be static? Include the correct header with the prototype. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190710125143.9965-4-ville.syrjala@linux.intel.com Reviewed-by: Sean Paul commit 2c05593ba0572495dc4ba02bcdf3c1c701ebeb5a Author: Ville Syrjälä Date: Wed Jul 10 15:51:41 2019 +0300 drm: Include prototype for drm_need_swiotlb() Sparse is not happy: ../drivers/gpu/drm/drm_memory.c:159:6: warning: symbol 'drm_need_swiotlb' was not declared. Should it be static? Include the correct header for drm_need_swiotlb() prototype. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190710125143.9965-3-ville.syrjala@linux.intel.com Reviewed-by: Sean Paul commit 40d51c05d04473e83f3ecfc5a046b1ab783670e4 Author: Ville Syrjälä Date: Wed Jul 10 15:51:40 2019 +0300 drm/dsc: Fix bogus cpu_to_be16() usage __be16 = cpu_to_be16(__be16) is nonsense. Do it right. ../drivers/gpu/drm/drm_dsc.c:218:53: warning: incorrect type in assignment (different base types) ../drivers/gpu/drm/drm_dsc.c:218:53: expected restricted __be16 ../drivers/gpu/drm/drm_dsc.c:218:53: got int ../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16 ../drivers/gpu/drm/drm_dsc.c:225:25: warning: incorrect type in argument 1 (different base types) ../drivers/gpu/drm/drm_dsc.c:225:25: expected unsigned short [usertype] val ../drivers/gpu/drm/drm_dsc.c:225:25: got restricted __be16 ../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16 ../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16 Cc: Manasi Navare Cc: David Francis Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190710125143.9965-2-ville.syrjala@linux.intel.com Reviewed-by: Sean Paul commit 7baa77f1a6d126c134936636dae4dcf3ed88f9e1 Author: Ville Syrjälä Date: Wed Jul 10 15:51:39 2019 +0300 drm/fb-helper: Include prototype for drm_fb_helper_modinit() Sparse complains: drivers/gpu/drm/drm_fb_helper.c:2409:12: warning: symbol 'drm_fb_helper_modinit' was not declared. Should it be static? Include the header with the correct prototype. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190710125143.9965-1-ville.syrjala@linux.intel.com Reviewed-by: Sean Paul commit 1d6f1d16d3a36351a6718378790497f1ba3b5378 Author: Chris Wilson Date: Fri Sep 27 17:03:35 2019 +0100 drm/i915/gt: Only unwedge if we can reset first Unwedging the GPU requires a successful GPU reset before we restore the default submission, or else we may see residual context switch events that we were not expecting. v2: Pull in the special-case reset_clobbers_display, and explain why it should be safe in the context of unwedging. v3: Just forget all about resets before unwedging if it will clobber the display; risk it all. Reported-by: Janusz Krzysztofik Signed-off-by: Chris Wilson Cc: Janusz Krzysztofik Cc: Daniele Ceraolo Spurio Cc: Ville Syrjälä Reviewed-by: Daniele Ceraolo Spurio #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20190927160335.10622-1-chris@chris-wilson.co.uk commit 50d16d44cce45f172bc4b27dcd353b1107aa7429 Author: Chris Wilson Date: Mon Sep 30 15:49:19 2019 +0100 drm/i915/selftests: Exercise context switching in parallel We currently test context switching on each engine as a basic stress test (just verifying that nothing explodes if we execute 2 requests from different contexts sequentially). What we have not tested is what happens if we try and do so on all available engines simultaneously, putting our SW and the HW under the maximal stress. v2: Clone the set of engines from the first context into the secondary contexts. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190930144919.27992-1-chris@chris-wilson.co.uk commit d56276a13c2b9ea287b9fc7cc78bed4c43b286f9 Author: Neil Armstrong Date: Wed Aug 28 15:23:11 2019 +0200 drm/meson: vclk: use the correct G12A frac max value When calculating the HDMI PLL settings for a DMT mode PHY frequency, use the correct max fractional PLL value for G12A VPU. With this fix, we can finally setup the 1024x768-60 mode. Fixes: 202b9808f8ed ("drm/meson: Add G12A Video Clock setup") Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20190828132311.23881-1-narmstrong@baylibre.com commit 4abc6e7c917b1929d8fad2c2364b270cae5ed4ca Author: Chris Wilson Date: Fri Sep 27 22:17:49 2019 +0100 drm/i915/selftests: Provide a mock GPU reset routine For those mock tests that may wish to pretend triggering a GPU reset and processing the cleanup. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20190927211749.2181-3-chris@chris-wilson.co.uk commit 4e18ca703f2167d8bcb7f736271744131e3c390b Author: Chris Wilson Date: Fri Sep 27 22:17:48 2019 +0100 drm/i915/selftests: Distinguish mock device from no wakeref On systems that have no runtime-pm, we mark the wakeref as being -1. We therefore cannot use that value for the mock-gt indicator, so opt for -ENODEV instead. The wakeref should never be an error value -- one hopes! Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20190927211749.2181-2-chris@chris-wilson.co.uk commit 260e6b712769d74304093a699796ebf134aef095 Author: Chris Wilson Date: Fri Sep 27 22:17:47 2019 +0100 drm/i915: Pass intel_gt to has-reset? As we execute GPU resets on a gt/ basis, and use the intel_gt as the primary for all other reset functions, also use it for the has-reset? predicates. Gradually simplifying the churn of pointers. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20190927211749.2181-1-chris@chris-wilson.co.uk commit 42b899fb9a3fe40e7b59e8815247a34973729d9a Author: Chris Wilson Date: Fri Sep 27 22:06:46 2019 +0100 drm/i915/selftests: Do not try to sanitize mock HW If we are mocking the device, skip trying to sanitize the pm HW state. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20190927210646.29664-1-chris@chris-wilson.co.uk commit a3f356b273f9b860cd28be1d4ec25cd2782cda0c Author: Matthew Auld Date: Fri Sep 27 18:33:49 2019 +0100 drm/i915: simplify i915_gem_init_early i915_gem_init_early doesn't need to return anything. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190927173409.31175-3-matthew.auld@intel.com commit b178a3f68128383a1ad2988464f0e964712563f6 Author: Matthew Auld Date: Fri Sep 27 18:33:48 2019 +0100 drm/i915: check for kernel_context Explosions during early driver init on the error path. Make sure we fail gracefully. [ 9547.672258] BUG: kernel NULL pointer dereference, address: 000000000000007c [ 9547.672288] #PF: supervisor read access in kernel mode [ 9547.672292] #PF: error_code(0x0000) - not-present page [ 9547.672296] PGD 8000000846b41067 P4D 8000000846b41067 PUD 797034067 PMD 0 [ 9547.672303] Oops: 0000 [#1] SMP PTI [ 9547.672307] CPU: 1 PID: 25634 Comm: i915_selftest Tainted: G U 5.3.0-rc8+ #73 [ 9547.672313] Hardware name: /NUC6i7KYB, BIOS KYSKLi70.86A.0050.2017.0831.1924 08/31/2017 [ 9547.672395] RIP: 0010:intel_context_unpin+0x9/0x100 [i915] [ 9547.672400] Code: 6b 60 00 e9 17 ff ff ff bd fc ff ff ff e9 7c ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 41 54 55 53 <8b> 47 7c 83 f8 01 74 26 8d 48 ff f0 0f b1 4f 7c 48 8d 57 7c 75 05 [ 9547.672413] RSP: 0018:ffffae8ac24ff878 EFLAGS: 00010246 [ 9547.672417] RAX: ffff944a1b7842d0 RBX: ffff944a1b784000 RCX: ffff944a12dd6fa8 [ 9547.672422] RDX: ffff944a1b7842c0 RSI: ffff944a12dd5328 RDI: 0000000000000000 [ 9547.672428] RBP: 0000000000000000 R08: ffff944a11e5d840 R09: 0000000000000000 [ 9547.672433] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 9547.672438] R13: ffffffffc11aaf00 R14: 00000000ffffffe4 R15: ffff944a0e29bf38 [ 9547.672443] FS: 00007fc259b88ac0(0000) GS:ffff944a1f880000(0000) knlGS:0000000000000000 [ 9547.672449] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 9547.672454] CR2: 000000000000007c CR3: 0000000853346003 CR4: 00000000003606e0 [ 9547.672459] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 9547.672464] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 9547.672469] Call Trace: [ 9547.672518] intel_engine_cleanup_common+0xe3/0x270 [i915] [ 9547.672567] execlists_destroy+0xe/0x30 [i915] [ 9547.672669] intel_engines_init+0x94/0xf0 [i915] [ 9547.672749] i915_gem_init+0x191/0x950 [i915] Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190927173409.31175-2-matthew.auld@intel.com commit f663769a5eefbeb304a7b4749fdd28c24944d9a7 Author: Lucas De Marchi Date: Thu Sep 26 14:06:59 2019 -0700 drm/i915/tgl: initialize TC and TBT ports Now that TC support was added, initialize DDIs. Reviewed-by: José Roberto de Souza Acked-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190926210659.56317-4-jose.souza@intel.com commit a839136ca47f79dcdb403cd7a0c5f4798466ac48 Author: José Roberto de Souza Date: Thu Sep 26 14:06:58 2019 -0700 drm/i915/tgl: Fix dkl link training Link training is failling when running link at 2.7GHz and 1.62GHz and following BSpec pll algorithm. Comparing the values calculated and the ones from the reference table it looks like MG_CLKTOP2_CORECLKCTL1_A_DIVRATIO should not always set to 5. For DP ports ICL mg pll algorithm sets it to 10 or 5 based on div2 value, that matches with dkl hardcoded table. So implementing this way as it proved to work in HW and leaving a comment so we know why it do not match BSpec. v4: Using the same is_dp check as ICL, need testing on HDMI over tc port Issue reported on BSpec 49204. Reviewed-by: Imre Deak Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190926210659.56317-3-jose.souza@intel.com commit 978c3e539be210268b6c6cfeef0c97e18c00d7a7 Author: Clinton A Taylor Date: Thu Sep 26 14:06:57 2019 -0700 drm/i915/tgl: Add dkl phy programming sequences Added DKL Phy sequences and helpers functions to program voltage swing, clock gating and dp mode. It is not written in DP enabling sequence but "PHY Clockgating programming" states that clock gating should be enabled after the link training but doing so causes all the following trainings to fail so not enabling it for. v2: Setting the right HIP_INDEX_REG bits (José) v3: Adding the meaning of each column of tgl_dkl_phy_ddi_translations Adding if gen >= 12 on intel_ddi_hdmi_level() and intel_ddi_pre_enable_hdmi() instead of reuse part of gen >= 11 if v4: Moved the DP_MODE lane programing to another patch as ICL also needed it Sharing icl_phy_set_clock_gating() and icl_program_mg_dp_mode() with TGL as bits and programing as now it almost identical to ICL BSpec: 49292 BSpec: 49190 Cc: Imre Deak Cc: Lucas De Marchi Reviewed-by: Imre Deak Signed-off-by: José Roberto de Souza Signed-off-by: Clinton A Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20190926210659.56317-2-jose.souza@intel.com commit 3b51be4e4061bd5e0f1b73f56cfecaa879c76d51 Author: Clinton A Taylor Date: Thu Sep 26 14:06:56 2019 -0700 drm/i915/tc: Update DP_MODE programming BSpec was updated(r146548) with a new MG_DP_MODE Programming table, now taking in consideration the pin assignment and allowing us to optimize power by shutting down available but not needed lanes. It was tested on ICL and TGL, with adaptors that used pin assignment C and B, reversing the connector and going to different modes testing the not needed lane shutdown. v5: Using crtc_state->lane_count instead of dp.lane_count BSpec: 21735 BSpec: 49292 Cc: Imre Deak Cc: Lucas De Marchi Reviewed-by: Imre Deak Signed-off-by: Clinton A Taylor Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190926210659.56317-1-jose.souza@intel.com commit 283a4095af9dd95e5d6d9f3e7f8b66a4b9f84082 Author: Anusha Srivatsa Date: Wed Sep 25 13:12:50 2019 -0700 drm/i915/dmc: Update ICL DMC version to v1.09 We have a new version of DMC for ICL - v1.09. This version adds the Half Refresh Rate capability into DMC. Cc: José Roberto de Souza Signed-off-by: Anusha Srivatsa Reviewed-by: José Roberto de Souza Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20190925201250.18136-1-daniele.ceraolospurio@intel.com commit 901045c3f0f43566f9a8a2f5716c2c0a497979e6 Author: Daniele Ceraolo Spurio Date: Wed Sep 25 15:21:21 2019 -0700 drm/i915/huc: fix version parsing from CSS header The HuC FW has silently switched to encoding the version the same way as the GuC FW does, i.e. major.minor.patch instead of just major.minor. All the current blobs follow the new scheme, but since minor and patch are both zero there is no difference in the end results and we happily load them. New binaries, however, will have non-zero values in there, so we need to make sure to parse them correctly. Signed-off-by: Daniele Ceraolo Spurio Cc: Anusha Srivatsa Cc: Michal Wajdeczko Reviewed-by: Stuart Summers Acked-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20190925222121.4000-1-daniele.ceraolospurio@intel.com commit 9cd6c339e34ab13479fb139b0b9f5ffc9743bfc1 Author: Joonas Lahtinen Date: Fri Sep 27 15:25:54 2019 +0300 drm/i915: Update DRIVER_DATE to 20190927 Signed-off-by: Joonas Lahtinen commit c113236718e89561f309705f1a78126b3df93a21 Author: Andi Shyti Date: Fri Sep 27 12:08:49 2019 +0100 drm/i915: Extract GT render sleep (rc6) management Continuing the theme of breaking intel_pm.c up in a reasonable chunk of powermanagement utilities, pull out the rc6 setup into its GT handler. Based on a patch by Chris Wilson. Signed-off-by: Andi Shyti Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190919143840.20384-1-andi.shyti@intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20190927110849.28734-1-chris@chris-wilson.co.uk commit a3f56e7da5231c902925711940835b6716f63f73 Author: Chris Wilson Date: Wed Sep 25 20:34:46 2019 +0100 drm/i915/selftests: Exercise concurrent submission to all engines The simplest and most maximal submission we can do, a thread to submit requests unto each engine. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190925193446.26007-1-chris@chris-wilson.co.uk commit d6cb013579e743bc7bc5590ca35a1943f2b8f3c8 Author: Lowry Li (Arm Technology China) Date: Fri Sep 6 07:18:06 2019 +0000 drm/komeda: SW workaround for D71 doesn't flush shadow registers This is a SW workaround for shadow un-flushed when together with the DOU Timing-disable. D71 HW doesn't update shadow registers when display output is turned off. So when we disable all pipeline components together with display output disabling by one flush or one operation, the disable operation updated registers will not be flushed or valid in HW, which may lead problem. To workaround this problem, introduce a two phase disable for pipeline disable. Phase1: Disable components with display is on and flush it, this phase for flushing or validating the shadow registers. Phase2: Turn-off display output. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20190906071750.4563-1-lowry.li@arm.com commit 245f44e77101df44e1074c765732b5613579179d Author: Thomas Zimmermann Date: Mon Sep 23 19:27:42 2019 +0200 drm/vram: Support top-down placement flag Pinning lots of small buffer objects, such as cursors or sprites, to video memory can lead to fragmentation, which is a problem for devices with only a small amount of memory. As a result, framebuffer images might not get pinned, even though there's enough space available overall. The flag DRM_GEM_VRAM_PL_FLAG_TOPDOWN marks buffer objects to be pinned at the high end of video memory. This leaves contiguous space available at the memory's low end. Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20190923172753.26593-2-tzimmermann@suse.de Reviewed-by: Gerd Hoffmann commit 74b2089a105f43c33d2f2124bd03d1085fe7c9fc Author: Michał Winiarski Date: Thu Sep 26 12:06:33 2019 +0200 drm/i915: Add definitions for MI_MATH command We can use it in i915 for updating parts of unmasked registers from within a batch. We're also adding Gen8+ versions of CS_GPR registers (aka MI_MATH_REG in the coprocessor). Signed-off-by: Michał Winiarski Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190926100635.9416-4-michal.winiarski@intel.com commit 56316cbc9c986ce907bfcf4f3762f2494e44f439 Author: Anna Karas Date: Thu Sep 26 15:21:58 2019 +0300 drm/i915/perf: Fix use of kernel-doc format in structure members Insert structure members names into their descriptions to follow kernel-doc format. Cc: Chris Wilson Signed-off-by: Anna Karas Reviewed-by: Chris Wilson Acked-by: Lionel Landwerlin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190926122158.13028-1-anna.karas@intel.com commit e3792238c1dde5059e44e0f14899497ac875443d Author: Sebastian Andrzej Siewior Date: Thu Sep 26 12:56:43 2019 +0200 drm/i915: Don't disable interrupts for intel_engine_breadcrumbs_irq() The function intel_engine_breadcrumbs_irq() is always invoked from an interrupt handler and for that reason it invokes (as an optimisation) only spin_lock() for locking assuming that the interrupts are already disabled. The function intel_engine_signal_breadcrumbs() is provided to disable interrupts while the former function is invoked so that assumption is also true for callers from preemptible context. On PREEMPT_RT local_irq_disable() really disables interrupts and this forbids to invoke spin_lock() which becomes a sleeping spinlock. This is also problematic with `threadirqs' in conjunction with irq_work. With force threading the interrupt handler, the handler is invoked with disabled BH but with interrupts enabled. This is okay and the lock itself is never acquired in IRQ context. This changes with irq_work (signal_irq_work()) which _still_ invokes intel_engine_breadcrumbs_irq() from IRQ context. Lockdep should see this and complain. Acquire the locks in intel_engine_breadcrumbs_irq() with _irqsave() suffix and let all callers invoke intel_engine_breadcrumbs_irq() directly instead using intel_engine_signal_breadcrumbs(). Reported-by: Clark Williams Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190926105644.16703-2-bigeasy@linutronix.de commit 132dfc78d3eb51b6fc8e667183b3572d41e3fe9f Author: Sebastian Andrzej Siewior Date: Thu Sep 26 12:56:44 2019 +0200 drm/i915: Drop the IRQ-off asserts The lockdep_assert_irqs_disabled() check is needless. The previous lockdep_assert_held() check ensures that the lock is acquired and while the lock is acquired lockdep also prints a warning if the interrupts are not disabled if they have to be. These IRQ-off asserts trigger on PREEMPT_RT because the locks become sleeping locks and do not really disable interrupts. Remove lockdep_assert_irqs_disabled(). Reported-by: Clark Williams Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190926105644.16703-3-bigeasy@linutronix.de commit 7d5255e0ced46a10131175bf65789a0c1a7806a4 Author: Michał Winiarski Date: Thu Sep 26 14:31:42 2019 +0100 drm/i915: Adjust length of MI_LOAD_REGISTER_REG Default length value of MI_LOAD_REGISTER_REG is 1. Also move it out of cmd-parser-only registers since we're going to use it in i915. Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Jani Nikula Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190926133142.2838-3-chris@chris-wilson.co.uk commit e1237523749e342d9ffb499a636ab6860a554cba Author: Michał Winiarski Date: Thu Sep 26 14:31:41 2019 +0100 drm/i915/execlists: Use per-process HWSP as scratch Some of our commands (MI_FLUSH_DW / PIPE_CONTROL) require a post-sync write operation to be performed. Currently we're using dedicated VMA for PIPE_CONTROL and global HWSP for MI_FLUSH_DW. On execlists platforms, each of our contexts has an area that can be used as scratch space. Let's use that instead. Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190926133142.2838-2-chris@chris-wilson.co.uk commit 5311f5171e98e6958fe5cf1c424a6196115baeb6 Author: Michał Winiarski Date: Thu Sep 26 14:31:40 2019 +0100 drm/i915: Define explicit wedged on init reset state We're currently using scratch presence as a way of identifying that we entered wedged state at driver initialization time. Let's use a separate flag rather than rely on scratch. Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190926133142.2838-1-chris@chris-wilson.co.uk commit 45d3c5cd5233258ffa9326b33ae4af59fb127dfb Author: Matt Roper Date: Wed Sep 25 16:45:42 2019 -0700 drm/i915: Small joiner RAM buffer size is platform-specific According to the bspec, GLK/CNL have a smaller small joiner RAM buffer than ICL+. This feels like something that could easily change again on future platforms, so let's just add a function to return the proper per-platform buffer size. That may also slightly simplify the upcoming bigjoiner enabling. Since we have to change intel_dp_dsc_get_output_bpp()'s signature to pass the dev_priv down for the platform check, let's take the opportunity to also make that function static since it isn't used outside the intel_dp file. v2: Minor rebase on top of Maarten's changes. Bspec: 20388 Bspec: 49259 Cc: Manasi Navare Cc: Maarten Lankhorst Signed-off-by: Matt Roper Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190925234542.24289-1-matthew.d.roper@intel.com commit 6b04e47b73f2a0d2c330cecca99f8e2cb8f85b34 Author: tomaspaukrt@email.cz Date: Wed Sep 25 12:08:44 2019 +0200 spi: orion: fix runtime PM initialization The current initialisation of runtime PM in the orion-spi.c driver is incorrect, because calling pm_runtime_put_autosuspend before calling pm_runtime_get leads to a negative value of the reference count and therefore it sometimes causes suspend during a transmission. Signed-off-by: Tomas Paukrt Link: https://lore.kernel.org/r/E2A.ZWgn.6sH16TohXKE.1TYpoi@seznam.cz Signed-off-by: Mark Brown commit 2ebb6701654e0d625eac6c32832d72f8e875c01a Author: Lowry Li (Arm Technology China) Date: Mon Sep 23 01:59:25 2019 +0000 drm/komeda: Adds power management support Adds system power management support in KMS kernel driver. Depends on: https://patchwork.freedesktop.org/series/62377/ Changes since v1: Since we have unified mclk/pclk/pipeline->aclk to one mclk, which will be turned on/off when crtc atomic enable/disable, removed runtime power management. Removes run time get/put related flow. Adds to disable the aclk when register access finished. Changes since v2: Rebases to the drm-misc-next branch. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20190923015908.26627-1-lowry.li@arm.com commit caf81ec6cd72f7efd47eb8793e1e166678e35394 Author: Matt Roper Date: Wed Sep 25 15:46:17 2019 -0700 drm: Destroy the correct mutex name in drm_dp_mst_topology_mgr_destroy It looks like one of the topology manager mutexes may have been renamed during a rebase, but the destruction function wasn't updated with the new name: error: ‘struct drm_dp_mst_topology_mgr’ has no member named ‘delayed_destroy_lock’ Fixes: 50094b5dcd32 ("drm/dp_mst: Destroy topology_mgr mutexes") Cc: Lyude Paul Cc: Sean Paul Signed-off-by: Matt Roper Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190925224617.24027-1-matthew.d.roper@intel.com commit c1f2b8124bdf2d7812a759f83a36a6d6178b5c94 Author: James Ausmus Date: Tue Sep 24 15:28:29 2019 -0700 drm/i915/tgl: Add memory type decoding for bandwidth checking The memory type values have changed in TGL, so we need to translate them differently than ICL. While we're moving it, fix up the ICL translation for LPDDR4. BSpec: 53998 v2: Fix up ICL LPDDR4 entry (Ville); Drop unused values from TGL (Ville) Cc: Ville Syrjälä Cc: Stanislav Lisovskiy Signed-off-by: James Ausmus Reviewed-by: Ville Syrjälä Reviewed-by: Stuart Summers Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190924222829.13142-1-james.ausmus@intel.com commit 857833698536b9abc1540e9df25d32697b9b25c0 Author: Lyude Paul Date: Tue Sep 3 16:45:56 2019 -0400 drm/dp_mst: Remove lies in {up, down}_rep_recv documentation These are most certainly accessed from far more than the mgr work. In fact, up_req_recv is -only- ever accessed from outside the mgr work. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-19-lyude@redhat.com commit e2839ff692c628a5a1caa6721e45ab5d212f9aca Author: Lyude Paul Date: Tue Sep 3 16:45:55 2019 -0400 drm/dp_mst: Rename drm_dp_add_port and drm_dp_update_port The names for these functions are rather confusing. drm_dp_add_port() sounds like a function that would simply create a port and add it to a topology, and do nothing more. Similarly, drm_dp_update_port() would be assumed to be the function that should be used to update port information after initial creation. While those assumptions are currently correct in how these functions are used, a quick glance at drm_dp_add_port() reveals that drm_dp_add_port() can also update the information on a port, and seems explicitly designed to do so. This can be explained pretty simply by the fact that there's more situations that would involve updating the port information based on a link address response as opposed to a connection status notification than the driver's initial topology probe. Case in point: reprobing link addresses after suspend/resume. Since we're about to start using drm_dp_add_port() differently for suspend/resume reprobing, let's rename both functions to clarify what they actually do. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-18-lyude@redhat.com commit 50094b5dcd3238c0cf91a5768d0316adaeb32e45 Author: Lyude Paul Date: Tue Sep 3 16:45:52 2019 -0400 drm/dp_mst: Destroy topology_mgr mutexes Turns out we've been forgetting for a while now to actually destroy any of the mutexes that we create in drm_dp_mst_topology_mgr. So, let's do that. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-15-lyude@redhat.com commit 6677c3b167b3ba9fa183015f6244e2db28d99f29 Author: José Roberto de Souza Date: Tue Sep 24 14:00:40 2019 -0700 drm/i915/tgl: Return the mg/dkl pll as DDI clock for new TC ports TGL added 2 more TC ports that currently are not being handled by icl_pll_to_ddi_clk_sel(), so adding those. Reviewed-by: Lucas De Marchi Cc: Lucas De Marchi Cc: Imre Deak Reported-by: Imre Deak Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190924210040.142075-6-jose.souza@intel.com commit ee7de6ad382d8d0fcf5bdb7443c7bc1f55e9d0f5 Author: José Roberto de Souza Date: Tue Sep 24 14:00:39 2019 -0700 drm/i915/tgl: Add dkl phy pll calculations Extending ICL mg calculations to also support dkl calculations. v3: Fixing iref_trim calculation for 38400 refclock BSpec: 49204 Reviewed-by: Lucas De Marchi Signed-off-by: Vandita Kulkarni Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190924210040.142075-5-jose.souza@intel.com commit 1a5c6aa43a3ae95bb4756c8a906a32519a6d291d Author: Lucas De Marchi Date: Tue Sep 24 14:00:38 2019 -0700 drm/i915/tgl: re-indent code to prepare for DKL changes The final save operation into pll_state of the calculations done will be different for DKL PHY. Prepare for that by reindenting code so it's easier to check for correctness. This one has no change in behavior. Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190924210040.142075-4-jose.souza@intel.com commit e87b9b05104f5dc2d1529d2b8fb2574e332d43e5 Author: Vandita Kulkarni Date: Tue Sep 24 14:00:36 2019 -0700 drm/i915/tgl: Add support for dkl pll write Add a new function to write to dkl phy pll registers. As per the bspec all the registers are read modify write. Reviewed-by: Lucas De Marchi Signed-off-by: Vandita Kulkarni Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190924210040.142075-2-jose.souza@intel.com commit 1e225a2c7477f114f271403ce48b26dd7bc1da2c Author: Lucas De Marchi Date: Tue Sep 24 14:00:35 2019 -0700 drm/i915/tgl: Add initial dkl pll support The disable function can be the same as for MG phy since the same registers are used. The others are different as registers changed, also adding a empty dkl_pll_write() to be implemented later. v2: Setting the right HIP_INDEX_REG bits (José) v3: Masking non-computed registers of mg_pll_tdc_coldst_bias when getting hardware state Sharing mg_pll_enable() with TGL Reviewed-by: Imre Deak Acked-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190924210040.142075-1-jose.souza@intel.com commit f9d4eae25d93a76f8ed52b1519cc27c5b3cb1dcb Author: Chris Wilson Date: Wed Sep 25 14:08:45 2019 +0100 drm/i915/execlists: Simplify gen12_csb_parse Having decided that we only care about the promotion predicate, we can simplify gen12_csb_parse to simply check whether we need to jump to a new queue. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20190925130845.17952-1-chris@chris-wilson.co.uk commit 9f918a728cf86b2757b6a7025e1f46824bfe3155 Author: Lukasz Majewski Date: Wed Sep 25 11:11:42 2019 +0200 spi: Add call to spi_slave_abort() function when spidev driver is released This change is necessary for spidev devices (e.g. /dev/spidev3.0) working in the slave mode (like NXP's dspi driver for Vybrid SoC). When SPI HW works in this mode - the master is responsible for providing CS and CLK signals. However, when some fault happens - like for example distortion on SPI lines - the SPI Linux driver needs a chance to recover from this abnormal situation and prepare itself for next (correct) transmission. This change doesn't pose any threat on drivers working in master mode as spi_slave_abort() function checks if SPI slave mode is supported. Signed-off-by: Lukasz Majewski Link: https://lore.kernel.org/r/20190924110547.14770-2-lukma@denx.de Signed-off-by: Mark Brown Reported-by: kbuild test robot Link: https://lore.kernel.org/r/20190925091143.15468-2-lukma@denx.de Signed-off-by: Mark Brown commit c750c22b2456bcd8c50067424ccabf2686306cda Author: Maarten Lankhorst Date: Fri Sep 20 13:42:21 2019 +0200 drm/i915: Do not add all planes when checking scalers on glk+ We cannot switch between HQ and normal mode on GLK+, so only add planes on platforms where it makes sense. We could probably restrict it even more to only add when scaler users toggles between 1 and 2, but lets just leave it for now. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190920114235.22411-9-maarten.lankhorst@linux.intel.com Reviewed-by: Matt Roper commit c47b7ddbcb29fca51515294a6fd2ed1d7d861939 Author: Maarten Lankhorst Date: Fri Sep 20 13:42:20 2019 +0200 drm/i915: Rename planar linked plane variables Rename linked_plane to planar_linked_plane and slave to planar_slave, this will make it easier to keep apart bigjoiner linking and planar plane linking. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190920114235.22411-8-maarten.lankhorst@linux.intel.com Reviewed-by: Matt Roper commit c22d62e6e49beadea0024fe4eb9a02ce0f635657 Author: Maarten Lankhorst Date: Fri Sep 20 13:42:18 2019 +0200 drm/i915: Get rid of crtc_state->fb_changed We had this as an optimization to not do a plane update, but we killed it off because there are so many reasons we may have to do a plane update or fastset that it's best to just assume everything changed. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190920114235.22411-6-maarten.lankhorst@linux.intel.com Reviewed-by: Matt Roper commit 8aa940c8551cce80bafcd8e1cd93d7b39a1acd8a Author: Maarten Lankhorst Date: Wed Sep 25 10:21:10 2019 +0200 drm/i915: Add hardware readout for FEC Readout the FEC state in encoder->get_config(), this will allow us to ensure that we can correctly inherit the state from boot, and that we set FEC during modeset. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190925082110.17439-2-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä commit ed06efb801bd291e935238d3fba46fa03d098f0e Author: Maarten Lankhorst Date: Wed Sep 25 10:21:09 2019 +0200 drm/i915/dp: Fix dsc bpp calculations, v5. There was a integer wraparound when mode_clock became too high, and we didn't correct for the FEC overhead factor when dividing, with the calculations breaking at HBR3. As a result our calculated bpp was way too high, and the link width limitation never came into effect. Print out the resulting bpp calcululations as a sanity check, just in case we ever have to debug it later on again. We also used the wrong factor for FEC. While bspec mentions 2.4%, all the calculations use 1/0.972261, and the same ratio should be applied to data M/N as well, so use it there when FEC is enabled. This fixes the FIFO underrun we are seeing with FEC enabled. Changes since v2: - Handle fec_enable in intel_link_compute_m_n, so only data M/N is adjusted. (Ville) - Fix initial hardware readout for FEC. (Ville) Changes since v3: - Remove bogus fec_to_mode_clock. (Ville) Changes since v4: - Use the correct register for icl. (Ville) - Split hw readout to a separate patch. Signed-off-by: Maarten Lankhorst Fixes: d9218c8f6cf4 ("drm/i915/dp: Add helpers for Compressed BPP and Slice Count for DSC") Cc: # v5.0+ Cc: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190925082110.17439-1-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä commit 44e09568cf2d874cb2a8e2ac35acf71a9ae3402b Author: Ingo Molnar Date: Wed Sep 25 08:38:57 2019 +0200 x86/mm: Clean up the pmd_read_atomic() comments Fix spelling, consistent parenthesis and grammar - and also clarify the language where needed. Reviewed-by: Wei Yang Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Signed-off-by: Ingo Molnar commit 1b8588741fdcb5976a343f7e5f47c5c97593d6d5 Author: Swati Sharma Date: Tue Sep 24 19:28:20 2019 +0530 Revert "drm/i915/color: Extract icl_read_luts()" This reverts commit 84af7649188194a74cdd6437235a5e3c86108f0f. This is causing problems with the display, displays are all bright colors. Fixes: 84af76491881 ("drm/i915/color: Extract icl_read_luts()") Signed-off-by: Swati Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190924135820.11850-1-swati2.sharma@intel.com commit 46872098077157758546b54a54868909c296af1c Author: Markus Elfring Date: Sat Sep 21 20:04:08 2019 +0200 drm/bridge/synopsys: dsi: Use devm_platform_ioremap_resource() in __dw_mipi_dsi_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Yannick Fertré Tested-by: Yannick Fertré Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/e0d7b7d7-3e89-8b3f-04ed-0b14806e66f7@web.de commit a2f7a0bfcaaa3928e4876d15edd4dfdc09e139b6 Author: Wei Yang Date: Wed Sep 25 09:44:53 2019 +0800 x86/mm: Fix function name typo in pmd_read_atomic() comment The function involved should be pte_offset_map_lock() and we never have function pmd_offset_map_lock defined. Signed-off-by: Wei Yang Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190925014453.20236-1-richardw.yang@linux.intel.com [ Minor edits. ] Signed-off-by: Ingo Molnar commit b1da91c9ddcef7ee077ea04797db7fa3a952d683 Author: Chris Wilson Date: Tue Sep 24 18:35:01 2019 +0100 drm/i915/tgl: Swap engines for no rps (gpu reclocking) If we disable rps, it appears the Tigerlake is stable enough to run multiple engines simultaneously in CI. As disabling rps should only cause the execution to be slow, whereas many features depend on the different engines, we would prefer to have the engines enabled while the machine hangs are being debugged. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111714 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190924173501.21956-1-chris@chris-wilson.co.uk commit 6ea3cee6d77d2c5513d5a61162b209f671fb3bb8 Author: Ankit Nautiyal Date: Tue Sep 24 13:01:52 2019 +0530 drm/i915: Add Pipe D cursor ctrl register for Gen12 Currently the offset for PIPE D cursor control register is missing in i915_reg.h due to which the cursor plane cannot be enabled for Pipe D. This also causes kernel Warning, when a user requests to enable cursor plane for PIPE D for Gen 12 platforms. This patch adds the CURSOR_CTL_D register in the i915_reg.h. v2: Rebase Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111640 Signed-off-by: Ankit Nautiyal Reviewed-by: Lucas De Marchi [Lucas: remove extra blank line] Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/1569310312-12313-1-git-send-email-ankit.k.nautiyal@intel.com commit 7dc56af5260e958e36a08b2e0822029ddf765770 Author: Chris Wilson Date: Tue Sep 24 15:59:50 2019 +0100 drm/i915/selftests: Verify the LRC register layout between init and HW Before we submit the first context to HW, we need to construct a valid image of the register state. This layout is defined by the HW and should match the layout generated by HW when it saves the context image. Asserting that this should be equivalent should help avoid any undefined behaviour and verify that we haven't missed anything important! Of course, having insisted that the initial register state within the LRC should match that returned by HW, we need to ensure that it does. v2: Drop the RELATIVE_MMIO flag from gen11, we ignore it for constructing the lrc image. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190924145950.3011-1-chris@chris-wilson.co.uk commit 1b74d46782d0615dace4729c22d1862a0355b124 Author: Stanislav Lisovskiy Date: Fri Sep 20 11:37:54 2019 +0300 drm/i915: Add TigerLake bandwidth checking Added bandwidth calculation algorithm and checks, similar way as it was done for ICL, some constants were corrected according to BSpec 53998. v2: Start using same icl_get_bw_info function to avoid code duplication. Moved mpagesize to memory info related structure as it is now dependent on memory type. Fixed qi.t_bl field assignment. v3: Removed mpagesize as unused. Duplicate code and redundant blankline fixed. v4: Changed ordering of IS_GEN checks as agreed. Minor commit message fixes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111600 Reviewed-by: James Ausmus Signed-off-by: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190920083754.5920-1-stanislav.lisovskiy@intel.com commit 5028851cdfdf78dc22eacbc44a0ab0b3f599ee4a Author: Chris Wilson Date: Fri Sep 20 13:18:21 2019 +0100 drm/i915: Mark contents as dirty on a write fault Since dropping the set-to-gtt-domain in commit a679f58d0510 ("drm/i915: Flush pages on acquisition"), we no longer mark the contents as dirty on a write fault. This has the issue of us then not marking the pages as dirty on releasing the buffer, which means the contents are not written out to the swap device (should we ever pick that buffer as a victim). Notably, this is visible in the dumb buffer interface used for cursors. Having updated the cursor contents via mmap, and swapped away, if the shrinker should evict the old cursor, upon next reuse, the cursor would be invisible. E.g. echo 80 > /proc/sys/kernel/sysrq ; echo f > /proc/sysrq-trigger Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111541 Fixes: a679f58d0510 ("drm/i915: Flush pages on acquisition") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Ville Syrjälä Cc: # v5.2+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190920121821.7223-1-chris@chris-wilson.co.uk commit 141f6357f45c795f0cd2651b4749302279a45d9f Author: Gerd Hoffmann Date: Mon Sep 23 08:58:14 2019 +0200 drm: tweak drm_print_bits() There is little reason for the from/to logic, printing a subset of the bits can be done by simply shifting/masking value if needed. Also use for_each_set_bit(). Suggested-by: Jani Nikula Signed-off-by: Gerd Hoffmann Reviewed-by: Jani Nikula Acked-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20190923065814.4797-1-kraxel@redhat.com commit e2144503bf3b22275dd33cef2880e1cb5fb200c5 Author: Chris Wilson Date: Mon Sep 23 16:28:44 2019 +0100 drm/i915: Prevent bonded requests from overtaking each other on preemption Force bonded requests to run on distinct engines so that they cannot be shuffled onto the same engine where timeslicing will reverse the order. A bonded request will often wait on a semaphore signaled by its master, creating an implicit dependency -- if we ignore that implicit dependency and allow the bonded request to run on the same engine and before its master, we will cause a GPU hang. [Whether it will hang the GPU is debatable, we should keep on timeslicing and each timeslice should be "accidentally" counted as forward progress, in which case it should run but at one-half to one-third speed.] We can prevent this inversion by restricting which engines we allow ourselves to jump to upon preemption, i.e. baking in the arrangement established at first execution. (We should also consider capturing the implicit dependency using i915_sched_add_dependency(), but first we need to think about the constraints that requires on the execution/retirement ordering.) Fixes: 8ee36e048c98 ("drm/i915/execlists: Minimalistic timeslicing") References: ee1136908e9b ("drm/i915/execlists: Virtual engine bonding") Testcase: igt/gem_exec_balancer/bonded-slice Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190923152844.8914-3-chris@chris-wilson.co.uk commit cb2377a919bbe8107af269c5a31a8d5cfb27d867 Author: Chris Wilson Date: Mon Sep 23 16:28:43 2019 +0100 drm/i915: Fixup preempt-to-busy vs reset of a virtual request Due to the nature of preempt-to-busy the execlists active tracking and the schedule queue may become temporarily desync'ed (between resubmission to HW and its ack from HW). This means that we may have unwound a request and passed it back to the virtual engine, but it is still inflight on the HW and may even result in a GPU hang. If we detect that GPU hang and try to reset, the hanging request->engine will no longer match the current engine, which means that the request is not on the execlists active list and we should not try to find an older incomplete request. Given that we have deduced this must be a request on a virtual engine, it is the single active request in the context and so must be guilty (as the context is still inflight, it is prevented from being executed on another engine as we process the reset). Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190923152844.8914-2-chris@chris-wilson.co.uk commit b647c7df01b75761b4c0b1cb6f4841088c0b1121 Author: Chris Wilson Date: Mon Sep 23 16:28:42 2019 +0100 drm/i915: Fixup preempt-to-busy vs resubmission of a virtual request As preempt-to-busy leaves the request on the HW as the resubmission is processed, that request may complete in the background and even cause a second virtual request to enter queue. This second virtual request breaks our "single request in the virtual pipeline" assumptions. Furthermore, as the virtual request may be completed and retired, we lose the reference the virtual engine assumes is held. Normally, just removing the request from the scheduler queue removes it from the engine, but the virtual engine keeps track of its singleton request via its ve->request. This pointer needs protecting with a reference. v2: Drop unnecessary motion of rq->engine = owner Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190923152844.8914-1-chris@chris-wilson.co.uk commit 27ffe6e570aa93e8389f7b0299a329e51d02843c Author: José Roberto de Souza Date: Fri Sep 20 13:58:10 2019 -0700 drm/i915/tgl: Check the UC health of tc controllers after power on New step added for TGL, required for us to check the TC microcontroller health after power on TC aux. BSpec: 49294 Reviewed-by: Imre Deak Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190920205810.211048-7-jose.souza@intel.com commit 8aaf5cbda8f1684ffb7027724f67da086f46a0f4 Author: José Roberto de Souza Date: Fri Sep 20 13:58:09 2019 -0700 drm/i915/icl: Unify disable and enable phy clock gating functions Adding a enable parameters allow us to share most of the code between enable and disable functions. v3: Renamed icl_phy_clock_gating() to icl_phy_set_clock_gating() Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190920205810.211048-6-jose.souza@intel.com commit f15a4eb18264a6eba30fb32f21ae76b010a691d5 Author: Vandita Kulkarni Date: Fri Sep 20 13:58:08 2019 -0700 drm/i915/tgl: Add dkl phy registers These are the registers needed to program Dekel phy. Some register definitions will be reused from MG PHY definitions, so adding a comment on those. Bspec: 49295 Reviewed-by: Lucas De Marchi Signed-off-by: Vandita Kulkarni Signed-off-by: Clinton A Taylor Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190920205810.211048-5-jose.souza@intel.com commit 57bd1798b1809a003c5354403a94f2ecb02bf3ae Author: Clinton A Taylor Date: Fri Sep 20 13:58:07 2019 -0700 drm/i915/tgl/pll: Set update_active_dpll Commit 24a7bfe0c2d7 ("drm/i915: Keep the TypeC port mode fixed when the port is active") added this new hook while in parallel TGL upstream was happening and this was missed. Without this driver will crash when TC DDI is added and driver is preparing to do a full modeset. Cc: Lucas De Marchi Cc: Imre Deak Reviewed-by: Lucas De Marchi Signed-off-by: Clinton A Taylor Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190920205810.211048-4-jose.souza@intel.com commit 31d9ae9d734226b2ce3a1bc2ce1ed29a6997d556 Author: José Roberto de Souza Date: Fri Sep 20 13:58:06 2019 -0700 drm/i915/tgl: Finish modular FIA support on registers If platform supports and has modular FIA is enabled, the registers bits also change, example: reading TC3 registers with modular FIA enabled, driver should read from FIA2 but with TC1 bits offsets. It is described in BSpec 50231 for DFLEXDPSP, other registers don't have the BSpec description but testing in real hardware have proven that it had moved for all other registers too. v2: - Caching index in tc_phy_fia_idx, instead of calculate it each time v3: - Setting tc_phy_fia and tc_phy_fia_idx in the same function Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190920205810.211048-3-jose.souza@intel.com commit 6171e58b1ff5c41632d8fb87f0e6bd003ed34c13 Author: Clinton A Taylor Date: Fri Sep 20 13:58:05 2019 -0700 drm/i915/tgl: Add missing ddi clock select during DP init sequence Step 4.b was complete missed because it is only required to TC and TBT. Bspec: 49190 Reviewed-by: Imre Deak Reviewed-by: Lucas De Marchi Signed-off-by: Clinton A Taylor Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190920205810.211048-2-jose.souza@intel.com commit 67c1a02048cff2bcfeec38f256ce332e5becac3b Author: Maxime Ripard Date: Thu Sep 19 19:30:20 2019 +0200 MAINTAINERS: Add Jernej Škrabec as a reviewer for DE2 The newer Allwinner SoCs have a different layers controller than the older ones. Jernej wrote that support and has been reviewing patches for a while now, so let's make him a formal reviewer. Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190919173020.11655-2-mripard@kernel.org commit 361cfabdb0f9370455a02aad576224acc45c88c5 Author: Maxime Ripard Date: Thu Sep 19 19:30:19 2019 +0200 MAINTAINERS: Update Allwinner DRM drivers entry The DRM drivers are more than about the A10 now, so let's make the entry name a bit more generic. Also, Chen-Yu has been a de-facto maintainer for the DRM driver for a while, is a maintainer of the Allwinner platform for an even longer time, and has drm-misc commit access. Let's make it formal and add him as a maintainer. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190919173020.11655-1-mripard@kernel.org commit 0d7cf7bc15e75bf79f2f65d61d19f896609f816a Author: Chris Wilson Date: Mon Sep 23 12:00:56 2019 +0100 drm/i915/execlists: Refactor -EIO markup of hung requests Pull setting -EIO on the hung requests into its own utility function. Having allowed ourselves to short-circuit submission of completed requests, we can now do the mark_eio() prior to submission and avoid some redundant operations. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190923110056.15176-4-chris@chris-wilson.co.uk commit c0bb487dc19fc45dbeede7dcf8f513df51a3cd33 Author: Chris Wilson Date: Mon Sep 23 12:00:55 2019 +0100 drm/i915: Only enqueue already completed requests If we are asked to submit a completed request, just move it onto the active-list without modifying it's payload. If we try to emit the modified payload of a completed request, we risk racing with the ring->head update during retirement which may advance the head past our breadcrumb and so we generate a warning for the emission being behind the RING_HEAD. v2: Commentary for the sneaky, shared responsibility between functions. v3: Spelling mistakes and bonus assertion Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190923110056.15176-3-chris@chris-wilson.co.uk commit 3231f8c01121ee1febfd82398ee22f7ff9dc5d76 Author: Chris Wilson Date: Mon Sep 23 12:00:54 2019 +0100 drm/i915/execlists: Drop redundant list_del_init(&rq->sched.link) Since amalgamating the queued and active lists in commit 422d7df4f090 ("drm/i915: Replace engine->timeline with a plain list"), performing a i915_request_submit() will remove the request from the execlists priority queue. References: 422d7df4f090 ("drm/i915: Replace engine->timeline with a plain list") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190923110056.15176-2-chris@chris-wilson.co.uk commit ae911b23d2f06c5d0a3e32768bedea857cadd269 Author: Chris Wilson Date: Mon Sep 23 12:00:53 2019 +0100 drm/i915/execlists: Relax assertion for a pinned context image on reset A gpu hang can occur at any time, given a sufficiently angry gpu. An example is when it forgets to perform a context-switch at the end of a request, leaving us with a hanging GPU on a completed request. Here, we may retire the request, only leaving its context alive via the active barrier. When we reset the GPU on a completed request, we do not modify its context image (just updating the ring state) and can safely defer the assertion that we have the image pinned and ready to modify. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111639 Fixes: dffa8feb3084 ("drm/i915/perf: Assert locking for i915_init_oa_perf_state()") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190923110056.15176-1-chris@chris-wilson.co.uk commit a14375ac87a44596bc5d9fb5514a9ff197939a84 Author: Sean Paul Date: Fri Sep 20 15:35:52 2019 -0400 Documentation/gpu: Fix no structured comments warning for drm_gem_ttm_helper.h Fixes include/drm/drm_gem_ttm_helper.h:1: warning: no structured comments found Fixes: ff540b76f14a ("drm/ttm: add drm gem ttm helpers, starting with drm_gem_ttm_print_info()") Cc: Gerd Hoffmann Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Acked-by: Thomas Zimmermann Reviewed-by: Gerd Hoffmann Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190920193558.89815-2-sean@poorly.run commit b8d17e7d93d2beb89e4f34c59996376b8b544792 Author: Navid Emamdoost Date: Thu Sep 19 20:36:26 2019 -0500 ath10k: fix memory leak In ath10k_usb_hif_tx_sg the allocated urb should be released if usb_submit_urb fails. Signed-off-by: Navid Emamdoost Signed-off-by: Kalle Valo commit 35cc054d944e8c9a7e9a31f32bbf360feb01a301 Author: Wen Gong Date: Fri Sep 6 18:55:01 2019 +0800 ath10k: remove the warning of sdio not full support Recently, it has the basic feature of sdio tested success, so remove it. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 5d7e4b4935e435d7e7be9f7746d4cff31a5cb94a Author: Chuhong Yuan Date: Wed Jul 24 19:27:20 2019 +0800 ath: Use dev_get_drvdata where possible Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan Signed-off-by: Kalle Valo commit 80ce8ca7a6473730a6847046651aab81cdb96898 Author: Colin Ian King Date: Tue Jul 2 13:39:04 2019 +0100 ath: fix various spelling mistakes There are a bunch of spelling mistakes in two ath drivers, fix these. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 8da96730331dab78e7194c5af48efbcf90264d02 Author: Kangjie Lu Date: Fri Mar 15 00:19:03 2019 -0500 ath10k: fix missing checks for bmi reads and writes ath10k_bmi_write32 and ath10k_bmi_read32 can fail. The fix checks their statuses to avoid potential undefined behaviors. Signed-off-by: Kangjie Lu Signed-off-by: Kalle Valo commit 40f4ef5e92326ab127bdeb6f024855c8c91de608 Author: Surabhi Vishnoi Date: Mon Feb 25 18:18:46 2019 +0530 ath10k: Add support to provide higher range mem chunks in wmi init command With the current implementation of wmi init command, there is no provision for the host driver to provide mem chunks addresses with more than 32-bit, to the firmware. WCN3990 is a 35-bit target and can accept mem chunks addresses which are above 32-bit. If firmware supports address range more than 32 bit, it advertises the support by setting the WMI_SERVICE_EXTEND_ADDRESS service. Based on this service fill the upper bits of paddr while providing the mem chunks in the wmi init command. Tested HW: WCN3990 Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1 Signed-off-by: Surabhi Vishnoi Signed-off-by: Kalle Valo commit 6cd02e77757a8fb0089053045932455355d2c4fd Author: Jani Nikula Date: Fri Sep 20 21:54:21 2019 +0300 drm/i915: pass i915 to intel_modeset_init() and intel_modeset_init_hw() In general, prefer struct drm_i915_private * over struct drm_device * when either will do. Rename the local variables to i915. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920185421.17822-6-jani.nikula@intel.com commit e1a3d9895ddcec20cbb7353e77759589cf010275 Author: Jani Nikula Date: Fri Sep 20 21:54:20 2019 +0300 drm/i915: abstract intel_mode_config_init() from intel_modeset_init() The i915 specific mode config init code is too specific and detailed to have open in a high level function. Abstract away. No functional changes. v2: nest drm_mode_config_init() in the function too (Chris) Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920185421.17822-5-jani.nikula@intel.com commit 064bd628fde6665c38d8aa02ff7a0a9ad36db482 Author: Jani Nikula Date: Fri Sep 20 21:54:19 2019 +0300 drm/i915: abstract intel_panel_sanitize_ssc() from intel_modeset_init() The code is too specific and detailed to have open in a high level function. Abstract away. As a drive-by improvement switch to using enableddisabled() in logging and git rid of a redundant !!. No functional changes. v2: drop the !! while at it too (Chris) Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920185421.17822-4-jani.nikula@intel.com commit 9980c3c11060e177e6ccb0012371ade24a9543a4 Author: Jani Nikula Date: Fri Sep 20 21:54:18 2019 +0300 drm/i915: pass i915 to intel_modeset_driver_remove() In general, prefer struct drm_i915_private * over struct drm_device * when either will do. Rename the local variable to i915. Also propagate to intel_hpd_poll_fini(). No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920185421.17822-3-jani.nikula@intel.com commit 5bcd53aa39f3dd054328e0a29a343e0254709908 Author: Jani Nikula Date: Fri Sep 20 21:54:17 2019 +0300 drm/i915: pass i915 to i915_driver_modeset_probe() In general, prefer struct drm_i915_private * over struct drm_device * when either will do. Rename the local variable to i915. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920185421.17822-2-jani.nikula@intel.com commit 2d6f6f359fd841a6ce3133470859035037ff0f75 Author: Jani Nikula Date: Fri Sep 20 21:54:16 2019 +0300 drm/i915: add i915_driver_modeset_remove() For completeness, add counterpart to i915_driver_modeset_probe() and remove the asymmetry in the probe/remove parts. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920185421.17822-1-jani.nikula@intel.com commit 87c1694533c947bf950251df3da04a32a05ede64 Author: Kai Vehmanen Date: Fri Sep 20 11:39:18 2019 +0300 drm/i915: save AUD_FREQ_CNTRL state at audio domain suspend When audio power domain is suspended, the display driver must save state of AUD_FREQ_CNTRL on Tiger Lake and Ice Lake systems. The initial value of the register is set by BIOS and is read by driver during the audio component init sequence. Cc: Jani Nikula Cc: Imre Deak Signed-off-by: Kai Vehmanen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920083918.27057-1-kai.vehmanen@linux.intel.com commit c0e33fe6fb0fe392ebfab14127d210679c413192 Author: Rakesh Pillai Date: Tue Feb 19 11:39:36 2019 +0530 ath10k: Add peer param map for tlv and non-tlv The peer param id for PEER_PARAM_USE_FIXED_PWR is different for tlv and non-tlv firmware. This causes incorrect peer param to be set by the driver to the firmware(tlv/non-tlv). Create seperate peer param map for tlv and non-tlv firmware and attach the peer param id based on the firmware type during the init. Tested HW: WCN3990 Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo commit 5dd85e72bc922379fec10969c9390a72aaa4746f Author: Animesh Manna Date: Fri Sep 20 17:29:30 2019 +0530 drm/i915/dsb: Documentation for DSB. Added docbook info regarding Display State Buffer(DSB) which is added from gen12 onwards to batch submit display HW programming. v1: Initial version as RFC. Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Shashank Sharma Reviewed-by: Shashank Sharma Signed-off-by: Animesh Manna Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-11-animesh.manna@intel.com commit dfaa6f285bd8eee63866df8b0474858e8a1cc40d Author: Animesh Manna Date: Fri Sep 20 17:29:29 2019 +0530 drm/i915/dsb: Enable DSB for gen12. Enabling DSB by setting 1 to has_dsb flag for gen12. Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Shashank Sharma Reviewed-by: Shashank Sharma Signed-off-by: Animesh Manna Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-10-animesh.manna@intel.com commit 49e3fb7fd880f294643304f3f374d553dd6a4c11 Author: Animesh Manna Date: Fri Sep 20 17:29:28 2019 +0530 drm/i915/dsb: Enable gamma lut programming using DSB. Gamma lut programming can be programmed using DSB where bulk register programming can be done using indexed register write which takes number of data and the mmio offset to be written. Currently enabled for 12-bit gamma LUT which is enabled by default and later 8-bit/10-bit will be enabled in future based on need. v1: Initial version. v2: Directly call dsb-api at callsites. (Jani) v3: - modified the code as per single dsb instance per crtc. (Shashank) - Added dsb get/put call in platform specific load_lut hook. (Jani) - removed dsb pointer from dev_priv. (Jani) v4: simplified code by dropping ref-count implementation. (Shashank) Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Shashank Sharma Signed-off-by: Animesh Manna Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-9-animesh.manna@intel.com commit 1abf329a713d2772257470873d57794d2404018d Author: Animesh Manna Date: Fri Sep 20 17:29:27 2019 +0530 drm/i915/dsb: function to trigger workload execution of DSB. Batch buffer will be created through dsb-reg-write function which can have single/multiple request based on usecase and once the buffer is ready commit function will trigger the execution of the batch buffer. All the registers will be updated simultaneously. v1: Initial version. v2: Optimized code few places. (Chris) v3: USed DRM_ERROR for dsb head/tail programming failure. (Shashank) v4: reset ins_start_offset after commit. (Jani) Cc: Imre Deak Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Shashank Sharma Reviewed-by: Shashank Sharma Signed-off-by: Animesh Manna Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-8-animesh.manna@intel.com commit f7619c47983431fc5ddfa30d8f921a6a40e0223a Author: Animesh Manna Date: Fri Sep 20 17:29:26 2019 +0530 drm/i915/dsb: functions to enable/disable DSB engine. DSB will be used for performance improvement for some special scenario. DSB engine will be enabled based on need and after completion of its work will be disabled. Api added for enable/disable operation by using DSB_CTRL register. v1: Initial version. v2: POSTING_READ added after writing control register. (Shashank) v3: cosmetic changes done. (Shashank) Cc: Michel Thierry Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Shashank Sharma Reviewed-by: Shashank Sharma Signed-off-by: Animesh Manna Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-7-animesh.manna@intel.com commit a6e58d9a2e045e800ac54b838c05656f982c36fe Author: Animesh Manna Date: Fri Sep 20 17:29:25 2019 +0530 drm/i915/dsb: Check DSB engine status. As per bspec check for DSB status before programming any of its register. Inline function added to check the dsb status. Cc: Michel Thierry Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Shashank Sharma Reviewed-by: Shashank Sharma Signed-off-by: Animesh Manna Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-6-animesh.manna@intel.com commit b27a96ad72fd706adc5dbbfd7bba76f698fe3875 Author: Animesh Manna Date: Fri Sep 20 17:29:24 2019 +0530 drm/i915/dsb: Indexed register write function for DSB. DSB can program large set of data through indexed register write (opcode 0x9) in one shot. DSB feature can be used for bulk register programming e.g. gamma lut programming, HDR meta data programming. v1: initial version. v2: simplified code by using ALIGN(). (Chris) v3: ascii table added as code comment. (Shashank) v4: cosmetic changes done. (Shashank) v5: reset ins_start_offset. (Jani) v6: update ins_start_offset in inel_dsb_reg_write. Cc: Shashank Sharma Cc: Imre Deak Cc: Jani Nikula Cc: Rodrigo Vivi Reviewed-by: Shashank Sharma Signed-off-by: Animesh Manna Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-5-animesh.manna@intel.com commit 061489c65ff57ee9f757d7a519fb9a09e5fbadd6 Author: Jani Nikula Date: Mon Sep 23 10:09:23 2019 +0300 drm/i915/dsb: single register write function for DSB. DSB support single register write through opcode 0x1. Generic api created which accumulate all single register write in a batch buffer and once DSB is triggered, it will program all the registers at the same time. v1: Initial version. v2: Unused macro removed and cosmetic changes done. (Shashank) v3: set free_pos to zero in dsb-put() instead dsb-get() and a cosmetic change. (Shashank) v4: macro of indexed-write is moved. (Shashank) Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Shashank Sharma Reviewed-by: Shashank Sharma Signed-off-by: Animesh Manna Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-4-animesh.manna@intel.com commit 67f3b58f3bac975f35c312fd8876edb599cc24be Author: Animesh Manna Date: Fri Sep 20 17:29:22 2019 +0530 drm/i915/dsb: DSB context creation. This patch adds a function, which will internally get the gem buffer for DSB engine. The GEM buffer is from global GTT, and is mapped into CPU domain, contains the data + opcode to be feed to DSB engine. v1: Initial version. v2: - removed some unwanted code. (Chris) - Used i915_gem_object_create_internal instead of _shmem. (Chris) - cmd_buf_tail removed and can be derived through vma object. (Chris) v3: vma realeased if i915_gem_object_pin_map() failed. (Shashank) v4: for simplification and based on current usage added single dsb object in intel_crtc. (Shashank) v5: seting NULL to cmd_buf moved outside of mutex in dsb-put(). (Shashank) v6: - refcount machanism added. - Used atomic_add_return and atomic_dec_and_test instead of atomic_inc and atomic_dec. (Jani) Cc: Imre Deak Cc: Michel Thierry Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Shashank Sharma Signed-off-by: Animesh Manna [Jani: added #include while pushing] Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-3-animesh.manna@intel.com commit 18febcb74ed37abd835da0ab5335df67ed40e4b5 Author: Animesh Manna Date: Fri Sep 20 17:29:21 2019 +0530 drm/i915/dsb: feature flag added for display state buffer. Display State Buffer(DSB) is a new hardware capability, introduced in GEN12 display. DSB allows a driver to batch-program display HW registers. Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Shashank Sharma Reviewed-by: Shashank Sharma Signed-off-by: Animesh Manna Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190920115930.27829-2-animesh.manna@intel.com commit 84af7649188194a74cdd6437235a5e3c86108f0f Author: Swati Sharma Date: Sun Sep 22 01:40:53 2019 +0530 drm/i915/color: Extract icl_read_luts() For icl+, have hw read out to create hw blob of gamma lut values. icl+ platforms supports multi segmented gamma mode by default, add hw lut creation for this mode. This will be used to validate gamma programming using dsb (display state buffer) which is a tgl specific feature. Major change done-removal of readouts of coarse and fine segments because PAL_PREC_DATA register isn't giving propoer values. State checker limited only to "fine segment" v2: -readout code for multisegmented gamma has to come up with some intermediate entries that aren't preserved in hardware (Jani N) -linear interpolation (Ville) -moved common code to check gamma_enable to specific funcs, since icl doesn't support that v3: -use u16 instead of __u16 [Jani N] -used single lut [Jani N] -improved and more readable for loops [Jani N] -read values directly to actual locations and then fill gaps [Jani N] -moved cleaning to patch 1 [Jani N] -renamed icl_read_lut_multi_seg() to icl_read_lut_multi_segment to make it similar to icl_load_luts() -renamed icl_compute_interpolated_gamma_blob() to icl_compute_interpolated_gamma_lut_values() more sensible, I guess v4: -removed interpolated func for creating gamma lut values -removed readouts of fine and coarse segments, failure to read PAL_PREC_DATA correctly Signed-off-by: Swati Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1569096654-24433-3-git-send-email-swati2.sharma@intel.com commit bf93b7246548289a797798051198c9664af2931c Author: Swati Sharma Date: Sun Sep 22 01:40:52 2019 +0530 drm/i915/color: Fix formatting issues Fixed few formatting issues in multi-segmented load_lut(). v3: -style nitting [Jani] -balanced parentheses moved from patch 2 to 1 [Jani] -subject prefix change [Jani] -added commit message [Jani] v4: -rearranged INDEX register write in ilk_read_luts() Signed-off-by: Swati Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1569096654-24433-2-git-send-email-swati2.sharma@intel.com commit 7fbd0782bf94d46993a7e5c08c0feda8dcab1f76 Author: Qiang Yu Date: Sun Sep 22 15:49:00 2019 +0800 dma-buf/resv: fix exclusive fence get This causes kernel crash when testing lima driver. Cc: Christian König Fixes: b8c036dfc66f ("dma-buf: simplify reservation_object_get_fences_rcu a bit") Signed-off-by: Qiang Yu Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190922074900.853-1-yuq825@gmail.com commit fb2ee9bf084bcaeff1e5be100decc0eacb4af2d5 Author: Dan Carpenter Date: Wed Sep 11 13:49:28 2019 +0300 drm: panel-lvds: Potential Oops in probe error handling The "lvds->backlight" pointer could be NULL in situations where of_parse_phandle() returns NULL. This code is cleaner if we use the managed devm_of_find_backlight() so the clean up is automatic. Fixes: 7c9dff5bd643 ("drm: panels: Add LVDS panel driver") Signed-off-by: Dan Carpenter Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190911104928.GA15930@mwanda commit 348eb0b2c4f0f912d626fa789dfeb084b083e1f0 Author: Andrea Merello Date: Thu Sep 12 16:43:08 2019 +0200 iio: ad7949: fix incorrect SPI xfer len This driver supports 14-bits and 16-bits devices. All of them have a 14-bit configuration registers. All SPI trasfers, for reading AD conversion results and for writing the configuration register, fit in two bytes. The driver always uses 4-bytes xfers which seems at least pointless (maybe even harmful). This patch trims the SPI xfer len and the buffer size to two bytes. Signed-off-by: Andrea Merello Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 0fe2f2b789190661df24bb8bf62294145729a1fe Author: Alexandru Ardelean Date: Fri Sep 20 10:57:23 2019 +0300 iio: tcs3414: fix iio_triggered_buffer_{pre,post}enable positions The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. For the predisable hook, the disable code should occur before detaching the poll func, and for the postenable hook, the poll func should be attached before the enable code. The driver was slightly reworked. The preenable hook was moved to the postenable, to add some symmetry to the postenable/predisable part. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 601734f7aabd46d3a988554e59908d9de7f8b013 Author: Daniele Ceraolo Spurio Date: Fri Sep 13 08:51:37 2019 +0100 drm/i915/tgl: s/ss/eu fuse reading support Gen12 has dual-subslices (DSS), which compared to gen11 subslices have some duplicated resources/paths. Although DSS behave similarly to 2 subslices, instead of splitting this and presenting userspace with bits not directly representative of hardware resources, present userspace with a subslice_mask made up of DSS bits instead. v2: GEM_BUG_ON on mask size (Lionel) Bspec: 29547 Bspec: 12247 Cc: Kelvin Gardiner Cc: Tvrtko Ursulin Cc: Lionel Landwerlin CC: Radhakrishna Sripada Cc: Michel Thierry #v1 Cc: Daniele Ceraolo Spurio Cc: José Roberto de Souza Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: James Ausmus Signed-off-by: Oscar Mateo Signed-off-by: Sudeep Dutt Signed-off-by: Stuart Summers Signed-off-by: Mika Kuoppala Acked-by: Lionel Landwerlin Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190913075137.18476-2-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson commit 3f14b73c38431a6a1ed24de568e18ed89b7082e2 Author: Govind Singh Date: Wed Sep 18 16:27:49 2019 +0300 ath10k: Enable MSA region dump support for WCN3990 MSA memory region caries the hw descriptors information. Dump MSA region in core dump as this is very helpful in debugging hw issues. Testing: Tested on WCN3990 HW Tested FW: WLAN.HL.3.1-00959-QCAHLSWMTPLZ-1 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 75f545e8574419a0f034e5a0b8b39fb8b8e88271 Author: Govind Singh Date: Wed Sep 18 16:27:35 2019 +0300 ath10k: Add xo calibration support for wifi rf clock PMIC XO is the clock source for wifi rf clock in integrated wifi chipset ex: WCN3990. Due to board layout errors XO frequency drifts can cause wifi rf clock inaccuracy. XO calibration test tree in Factory Test Mode is used to find the best frequency offset(for example +/-2KHz )by programming XO trim register. This ensure system clock stays within required 20 ppm WLAN rf clock. Retrieve the xo trim offset via system firmware (e.g., device tree), especially in the case where the device doesn't have a useful EEPROM on which to store the calibrated XO offset (e.g., for integrated Wifi). Calibrated XO offset is sent to fw, which compensate the clock drift by programing the XO trim register. Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 892022e108ddc9c315cd158869dbefac8759e5dc Author: Govind Singh Date: Mon Apr 1 14:49:25 2019 +0530 dt: bindings: ath10k: add dt entry for XO calibration support Add dt binding to get xo calibration data support for wifi rf clock. Signed-off-by: Govind Singh Reviewed-by: Rob Herring Signed-off-by: Kalle Valo commit 30ae2fc0a75eb5f1a38bbee7355d8e3bc823a6e1 Author: Tejun Heo Date: Fri Sep 20 14:09:14 2019 -0700 workqueue: Minor follow-ups to the rescuer destruction change * Now that wq->rescuer may be cleared while rescuer is still there, switch show_pwq() debug printout to test worker->rescue_wq to identify rescuers intead of testing wq->rescuer. * Update comment on ->rescuer locking. Signed-off-by: Tejun Heo Suggested-by: Lai Jiangshan commit 8efe1223d73c218ce7e8b2e0e9aadb974b582d7f Author: Tejun Heo Date: Fri Sep 20 13:39:57 2019 -0700 workqueue: Fix missing kfree(rescuer) in destroy_workqueue() Signed-off-by: Tejun Heo Reported-by: Qian Cai Fixes: def98c84b6cd ("workqueue: Fix spurious sanity check failures in destroy_workqueue()") commit 21185a668787e6673497cb032ecc9ad08c3fcbaf Author: Ondrej Jirman Date: Fri Sep 20 19:29:14 2019 +0200 drm: Remove redundant of_device_is_available check This check is already performed by of_graph_get_remote_node. No need to repeat it immediately after the call. Signed-off-by: Ondrej Jirman Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190920172914.4015180-1-megous@megous.com commit d1844606fd63af1994e153a8607d4b13709bc395 Author: Ville Syrjälä Date: Thu Jul 18 17:50:53 2019 +0300 drm/i915: Add PIPECONF YCbCr 4:4:4 programming for ILK-IVB On ILK-IVB the pipe colorspace is configured via PIPECONF (as opposed to PIPEMISC in BDW+). Let's configure+readout that stuff correctly. Enabling YCbCr 4:4:4 output will now be a simple matter of setting crtc_state->output_format appropriately in the encoder .compute_config(). However, when we do that we must be aware of the fact that YCbCr DP output doesn't seem to work on ILK (resulting image is totally garbled), but on SNB+ it works fine. However HDMI YCbCr output does work correctly even on ILK. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-13-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit af28cc4c289600ad05da85e466517757a26ce216 Author: Ville Syrjälä Date: Thu Jul 18 17:50:52 2019 +0300 drm/i915: Set up ILK/SNB csc unit properly for YCbCr output Prepare the pipe csc for YCbCr output on ilk/snb. The main difference to IVB+ is the lack of explicit post offsets, and instead we must configure the CSC info RGB->YUV mode (which takes care of offsetting Cb/Cr properly) and enable the "black screen offset" bit to add the required offset to Y. And while at it throw some comments around the bit defines to document which platforms have which bits. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-12-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit 174d12bcc0874d78ad7fd63ae769cac864ee9f4f Author: Ville Syrjälä Date: Thu Jul 18 17:50:51 2019 +0300 drm/i915: Document ILK+ pipe csc matrix better Add comments to explain the ilk pipe csc operation a bit better. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-11-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit ac0f01cee94702d49aad3ff4d0607024fa34c9dd Author: Ville Syrjälä Date: Thu Jul 18 17:50:50 2019 +0300 drm/i915: Add PIPECONF YCbCr 4:4:4 programming for HSW On HSW the pipe colorspace is configured via PIPECONF (as opposed to PIPEMISC in BDW+). Let's configure+readout that stuff correctly. Enabling YCbCr 4:4:4 output will now be a simple matter of setting crtc_state->output_format appropriately in the encoder .compute_config(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-10-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit b10d1173eecf811d5293c5097f1025fc20915171 Author: Ville Syrjälä Date: Thu Jul 18 17:50:49 2019 +0300 drm/i915: Simplify intel_get_crtc_ycbcr_config() Make intel_get_crtc_ycbcr_config() simpler and rename it to bdw_get_pipemisc_output_format() to better reflect what it does. Also toss in some comments to document that the 4:2:0 PIPECONF bits are glk+ only. They are mbz on earlier platforms so reading them unconditionally is safe however. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-9-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit 60a02311cc588ae92b4732763650f187c506bc3a Author: Ville Syrjälä Date: Thu Jul 18 17:50:48 2019 +0300 drm/i915: Don't look at unrelated PIPECONF bits for interlaced readout Since HSW the PIPECONF progressive vs. interlaced selection is done with just two bits instead of the earlier three. Let's not look at the extra bit on HSW+. Also gen2 doesn't support interlaced displays at all. This is actually fine as is currently because the extra bit is mbz (as are all three bits on gen2). But just to avoid mishaps in the future if the bits get reused let's only look at what's properly defined. v2: constify crtc_state Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-8-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit cae154fcaefeb1ddab491d6fb651452a93bbf81d Author: Ville Syrjälä Date: Thu Jul 18 19:45:23 2019 +0300 drm/i915: Never set limited_color_range=true for YCbCr output crtc_state->limited_color_range only applies to RGB output but we're currently setting it even for YCbCr output. That will lead to conflicting MSA and PIPECONF settings which can mess up the image. Let's make sure limited_color_range stays unset with YCbCr output. Also WARN if we end up with such a bogus combination when programming the MSA MISC bits as it's impossible to even indicate quantization rangle for YCbCr via MSA MISC. YCbCr output is simply assumed to be limited range always. Note that VSC SDP does provide a mechanism for full range YCbCr, so in the future we may want to rethink how we compute/store this state. And for good measure we add the same WARN to the HDMI path. v2: s/==/!=/ in the HDMI WARN Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718164523.11738-1-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit ba2d08c2a9ad96e592ee357ef5d46cbe1dc18bc9 Author: Ville Syrjälä Date: Thu Jul 18 17:50:45 2019 +0300 drm/i915: Extract intel_hdmi_limited_color_range() Pull the code for computing the limited color range setting into a small helper. We'll add a bit more to it later. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-5-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit 791ad5f1e1af2926adef5bb1998eb445681e31f0 Author: Ville Syrjälä Date: Thu Jul 18 17:50:44 2019 +0300 drm/i915: Fix AVI infoframe quantization range for YCbCr output We're configuring the AVI infoframe quantization range bits as if we're always transmitting RGB pixels. Let's fix this so that we correctly indicate limited range YCC quantization range when transmitting YCbCr instead. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-4-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit 646d3dc855212855b708da4d481051a5e8cd1946 Author: Ville Syrjälä Date: Thu Jul 18 17:50:43 2019 +0300 drm/i915: Fix HSW+ DP MSA YCbCr colorspace indication Looks like we're currently setting the MSA to xvYCC BT.709 instead of the YCbCr BT.601 claimed by the comment. But even that comment is wrong since we configure the CSC matrix to BT.709. Let's remove the bogus statement from the comment and fix the MSA to indicate YCbCr BT.709 so that it matches the actual pixel data we're transmitting. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-3-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit 35d97e43bb217446cdf128c6b6dfec423ed81ddf Author: Anusha Srivatsa Date: Thu Sep 19 13:12:03 2019 -0700 drm/i915/uc: Update HuC firmware naming convention and load latest HuC Make both GuC and HuC to use "." as the separator. Hardcode the separator in MAKE_UC_FW_PATH. Remove the usage of "ver" from HuC. The current convention being: _uc_..patch.bin Update the versions of HuC being loaded of the platforms. SKL - v2.0.0 BXT - v2.0.0 KBL - v4.0.0 GLK - v4.0.0 CFL - KBL v4.0.0 ICL - v9.0.0 CML - v4.0.0 v2: Remove the separator parameter altogether from __MAKE_UC_FW_PATH.(Daniele) - Squash all firmware update patches (Daniele) v3: s/huc/HuC - Correct the order of platforms - Change REVID of cml to 5(Michal) - Code space changes in huc_def (Daniele) Suggested-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Signed-off-by: Anusha Srivatsa Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20190919201204.9691-1-daniele.ceraolospurio@intel.com commit 6039f37dd6b76641198e290f26b31c475248f567 Author: Ville Syrjälä Date: Thu Sep 19 16:28:53 2019 +0300 video/hdmi: Fix AVI bar unpack The bar values are little endian, not big endian. The pack function did it right but the unpack got it wrong. Fix it. Cc: stable@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: Martin Bugge Cc: Hans Verkuil Cc: Thierry Reding Cc: Mauro Carvalho Chehab Fixes: 2c676f378edb ("[media] hdmi: added unpack and logging functions for InfoFrames") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190919132853.30954-1-ville.syrjala@linux.intel.com Reviewed-by: Thierry Reding commit 45cf0e91df8c75c3a0c69e54d01cf42e24af365b Author: Gwan-gyeong Mun Date: Thu Sep 19 22:53:07 2019 +0300 drm: Add DisplayPort colorspace property creation function Because between HDMI and DP have different colorspaces, it adds drm_mode_create_dp_colorspace_property() function for creating of DP colorspace property. v3: Addressed review comments from Ville - Add new colorimetry options for DP 1.4a spec. - Separate set of colorimetry enum values for DP. v4: Add additional comments to struct drm_prop_enum_list. Polishing an enum string of struct drm_prop_enum_list v5: Change definitions of DRM_MODE_COLORIMETRYs to follow HDMI prefix and DP abbreviations. Add missed variables on dp_colorspaces. Fix typo. [Uma] v6: Addressed review comments from Ilia and Ville - Split drm_mode_create_colorspace_property() to DP and HDMI connector. v7: Fix typo [Jani Saarinen] Fix white space. v8: Addressed review comments from Ville - Drop colorimetries which have another way to distinguish or which would not be used. v9: Addressed review comments from Ville - Split hunk into renaming and adding of code. Signed-off-by: Gwan-gyeong Mun Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-5-gwan-gyeong.mun@intel.com commit 8806cd3aa025ad9351678e7b8377080dec1315a9 Author: Gwan-gyeong Mun Date: Thu Sep 19 22:53:06 2019 +0300 drm: Rename HDMI colorspace property creation function As between HDMI and DP have different colorspaces, in order to distinguish colorspace of DP and HDMI, it renames drm_mode_create_colorspace_property() function to drm_mode_create_hdmi_colorspace_property() function for HDMI connector. In order to apply changed drm api, i915 driver has channged. It addresses review comments from Ville. - Split hunk into renaming and adding of code. Signed-off-by: Gwan-gyeong Mun Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-4-gwan-gyeong.mun@intel.com commit 6fe7ab3837bdbc4830addac9898a5e4bc0783dcc Author: Miquel Raynal Date: Thu Sep 19 22:25:04 2019 +0200 spi: mxic: Fix DMAS_CTRL register layout Fix the current layout which only matches early non-public revisions of the IP. Since its official distribution, two bytes of the SPI controller DMAS_CTRL register have been inverted. Suggested-by: Mason Yang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20190919202504.9619-4-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 4a82fe0e184263b5ed8f9d8079f7dfd144598127 Author: Miquel Raynal Date: Thu Sep 19 22:25:03 2019 +0200 spi: mxic: Select SPI_NOR type by default The SPI_NAND bit is a (wrongly named) placeholder that is intended to be used in the future. Right now SPI_NOR (which is currently identical to SPI_NAND in this version of the IP) should be used in both cases. Suggested-by: Mason Yang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20190919202504.9619-3-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit e5de91e68c5ccaf4ef3e5aa265b469e186ebfa65 Author: Chris Wilson Date: Fri Sep 20 09:12:54 2019 +0100 Revert "drm/i915/tgl: Implement Wa_1406941453" Our sanitychecks indicate that while this register is context saved/restore, the HW does not preserve this bit within the register -- it likely doesn't exist, or one of those mythical bits that the architects insist does something despite all appearances to the contrary. For reference, SAMPLER_MODE is already in i915_reg.h as GEN10_SAMPLER_MODE and is being setup in icl_ctx_workarounds_init() as opposed to the chosen location here of rcs_engine_wa_init). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111754 Fixes: 7f0cc34b5349 ("drm/i915/tgl: Implement Wa_1406941453") Testcase: igt/i915_selftest/live_workarounds Signed-off-by: Chris Wilson Cc: Lucas De Marchi Cc: Stuart Summers Cc: Radhakrishna Sripada Cc: Jani Nikula Cc: Joonas Lahtinen Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190920081254.18389-1-chris@chris-wilson.co.uk commit 9eee0dd7d3a4e2620257f1532cba8f013aee954f Author: Chris Wilson Date: Thu Sep 19 12:19:12 2019 +0100 drm/i915: Protect timeline->hwsp dereferencing As not only is the signal->timeline volatile, so will be acquiring the timeline's HWSP. We must first carefully acquire the timeline from the signaling request and then lock the timeline. With the removal of the struct_mutex serialisation of request construction, we can have multiple timelines active at once, and so we must avoid using the nested mutex lock as it is quite possible for both timelines to be establishing semaphores on the other and so deadlock. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190919111912.21631-3-chris@chris-wilson.co.uk commit 6a79d848403ded2245fbe4aaf50b33118d12daf0 Author: Chris Wilson Date: Thu Sep 19 12:19:11 2019 +0100 drm/i915: Lock signaler timeline while navigating As we need to take a walk back along the signaler timeline to find the fence before upon which we want to wait, we need to lock that timeline to prevent it being modified as we walk. Similarly, we also need to acquire a reference to the earlier fence while it still exists! Though we lack the correct locking today, we are saved by the overarching struct_mutex -- but that protection is being removed. v2: Tvrtko made me realise I was being lax and using annotations to ignore the AB-BA deadlock from the timeline overlap. As it would be possible to construct a second request that was using a semaphore from the same timeline as ourselves, we could quite easily end up in a situation where we deadlocked in our mutex waits. Avoid that by using a trylock and falling back to a normal dma-fence await if contended. v3: Eek, the signal->timeline is volatile and must be carefully dereferenced to ensure it is valid. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190919111912.21631-2-chris@chris-wilson.co.uk commit d19d71fc2b15bf30ff3e56932eae23ff096c1396 Author: Chris Wilson Date: Thu Sep 19 12:19:10 2019 +0100 drm/i915: Mark i915_request.timeline as a volatile, rcu pointer The request->timeline is only valid until the request is retired (i.e. before it is completed). Upon retiring the request, the context may be unpinned and freed, and along with it the timeline may be freed. We therefore need to be very careful when chasing rq->timeline that the pointer does not disappear beneath us. The vast majority of users are in a protected context, either during request construction or retirement, where the timeline->mutex is held and the timeline cannot disappear. It is those few off the beaten path (where we access a second timeline) that need extra scrutiny -- to be added in the next patch after first adding the warnings about dangerous access. One complication, where we cannot use the timeline->mutex itself, is during request submission onto hardware (under spinlocks). Here, we want to check on the timeline to finalize the breadcrumb, and so we need to impose a second rule to ensure that the request->timeline is indeed valid. As we are submitting the request, it's context and timeline must be pinned, as it will be used by the hardware. Since it is pinned, we know the request->timeline must still be valid, and we cannot submit the idle barrier until after we release the engine->active.lock, ergo while submitting and holding that spinlock, a second thread cannot release the timeline. v2: Don't be lazy inside selftests; hold the timeline->mutex for as long as we need it, and tidy up acquiring the timeline with a bit of refactoring (i915_active_add_request) Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190919111912.21631-1-chris@chris-wilson.co.uk commit c45e788d95b470e9f68fabe1f3cb44beb5dd7840 Author: Chris Wilson Date: Thu Sep 19 16:18:11 2019 +0100 drm/i915/tgl: Suspend pre-parser across GTT invalidations Before we execute a batch, we must first issue any and all TLB invalidations so that batch picks up the new page table entries. Tigerlake's preparser is weakening our post-sync CS_STALL inside the invalidate pipe-control and allowing the loading of the batch buffer before we have setup its page table (and so it loads the wrong page and executes indefinitely). The igt_cs_tlb indicates that this issue can only be observed on rcs, even though the preparser is common to all engines. Alternatively, we could do TLB shootdown via mmio on updating the GTT. By inserting the pre-parser disable inside EMIT_INVALIDATE, we will also accidentally fixup execution that writes into subsequent batches, such as gem_exec_whisper and even relocations performed on the GPU. We should be careful not to allow this disable to become baked into the uABI! The issue is that if userspace relies on our disabling of the HW optimisation, when we are ready to enable that optimisation, userspace will then be broken... Testcase: igt/i915_selftests/live_gtt/igt_cs_tlb Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111753 Signed-off-by: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190919151811.9526-1-chris@chris-wilson.co.uk commit 455d56ce809fcc540dc029a05db074855269dc33 Author: Iago Toral Quiroga Date: Thu Sep 19 09:10:16 2019 +0200 drm/v3d: clean caches at the end of render jobs on request from user space Extends the user space ioctl for CL submissions so it can include a request to flush the cache once the CL execution has completed. Fixes memory write violation messages reported by the kernel in workloads involving shader memory writes (SSBOs, shader images, scratch, etc) which sometimes also lead to GPU resets during Piglit and CTS workloads. v2: if v3d_job_init() fails we need to kfree() the job instead of v3d_job_put() it (Eric Anholt). v3 (Eric Anholt): - Drop _FLAG suffix from the new flag name. - Add a new param so userspace can tell whether cache flushing is implemented in the kernel. Signed-off-by: Iago Toral Quiroga Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190919071016.4578-1-itoral@igalia.com commit 978f6b0693c79a3d2b97f14696ca0ee2c0d1b4da Author: Ville Syrjälä Date: Thu Jul 11 13:32:30 2019 +0300 drm/edid: Add CTA-861-G modes with VIC < 128 Fill out our list of cea modes with the new stuff from CTA-861-G. We only do the modes with VIC < 128 here. Adding the higher numbered VICs will need some slight code refactoring first. Cc: Hans Verkuil Cc: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190711103234.6294-2-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma commit 508882f0afaffc8fe60c8588f90759d218913c47 Author: Ville Syrjälä Date: Thu Jul 18 17:50:42 2019 +0300 drm/dp: Add definitons for MSA MISC bits Add definitions for the MSA (Main Stream Attribute) MISC bits. On some hardware you can program these directly into a register. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190718145053.25808-2-ville.syrjala@linux.intel.com Reviewed-by: Gwan-gyeong Mun commit 26564be56d73539097981c5178b64168dda75b26 Author: Ville Syrjälä Date: Mon Jul 8 15:53:08 2019 +0300 drm/atomic-helper: Make crtc helper funcs optional Allow drivers to call drm_atomic_helper_check_modeset() without having the crtc helper funcs specified. i915 doesn't need those anymore. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190708125325.16576-3-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy Reviewed-by: Juha-Pekka Heikkila commit 4fb419b216245297312aeafcadf8b4e852a6cfe4 Author: Ville Syrjälä Date: Mon Jul 8 15:53:07 2019 +0300 drm: Add drm_modeset_lock_assert_held() Add a small wrapper around lockdep_assert_held() to make it a bit more conventinet to use with modeset locks. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190708125325.16576-2-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 2d20411e25a3bf3d2914a2219f47ed48dc57aed5 Author: Ville Syrjälä Date: Wed Sep 18 18:07:07 2019 +0300 drm/i915: Don't advertise modes that exceed the max plane size Modern platforms allow the transcoders hdisplay/vdisplay to exceed the planes' max resolution. This has the nasty implication that modes on the connectors' mode list may not be usable when the user asks for a fullscreen plane. Seeing as that is the most common use case it seems prudent to filter out modes that don't allow for fullscreen planes to be enabled. Let's do that in the connetor .mode_valid() hook so that normally such modes are kept hidden but the user is still able to forcibly specify such a mode if they know they don't need fullscreen planes. This is in line with ealier policies regarding certain clock limits. The idea is to prevent the casual user from encountering a mode that would fail under typical conditions, but allow the expert user to force things if they so wish. Maybe in the future we should consider automagically using two planes when one can't cover the entire screen? Wouldn't be a great match for the current uapi with explicit planes though, but I guess no worse than using two pipes (which we apparently have to in the future anyway). Either that or we'd have to teach userspace to do it for us. v2: Fix icl+ max plane heigth (Manasi) Cc: Manasi Navare Cc: Leho Kraav Cc: Sean Paul Cc: José Roberto de Souza Reviewed-by: Maarten Lankhorst Reviewed-by: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190918150707.32420-1-ville.syrjala@linux.intel.com commit bed34ef544f9ab37ab349c04cf4142282c4dcf5d Author: Ville Syrjälä Date: Thu Sep 5 16:50:43 2019 +0300 drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled The officially validated plane width limit is 4k on skl+, however we already had people using 5k displays before we started to enforce the limit. Also it seems Windows allows 5k resolutions as well (though not sure if they do it with one plane or two). According to hw folks 5k should work with the possible exception of the following features: - Ytile (already limited to 4k) - FP16 (already limited to 4k) - render compression (already limited to 4k) - KVMR sprite and cursor (don't care) - horizontal panning (need to verify this) - pipe and plane scaling (need to verify this) So apart from last two items on that list we are already fine. We should really verify what happens with those last two items but I don't have a 5k display on hand atm so it'll have to wait. In the meantime let's just bump the limit back up to 5k since several users have already been using it without apparent issues. At least we'll be no worse off than we were prior to lowering the limits. Cc: stable@vger.kernel.org Cc: Sean Paul Cc: José Roberto de Souza Tested-by: Leho Kraav Fixes: 372b9ffb5799 ("drm/i915: Fix skl+ max plane width") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111501 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190905135044.2001-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst Reviewed-by: Sean Paul commit 7f0cc34b5349cfb2867358737b3338cb2fcbc354 Author: Michel Thierry Date: Thu Jul 25 17:02:26 2019 -0700 drm/i915/tgl: Implement Wa_1406941453 Enable Small PL for power benefit. Signed-off-by: Michel Thierry Signed-off-by: Lucas De Marchi Reviewed-by: Stuart Summers Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20190713010940.17711-18-lucas.demarchi@intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20190726000226.26914-4-lucas.demarchi@intel.com commit 1c757497096f55d2e037462bfcdfed50877b4cf5 Author: Radhakrishna Sripada Date: Mon Sep 9 16:14:45 2019 -0700 drm/i915/tgl: Implement Wa_1409142259 Disable CPS aware color pipe by setting chicken bit. BSpec: 52890 HSDES: 1409142259 v2: Move WA to ctx WA's(Daniele) Cc: Daniele Ceraolo Spurio Cc: Stuart Summers Cc: Matt Roper Signed-off-by: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190909231445.23815-1-radhakrishna.sripada@intel.com Reviewed-by: Daniele Ceraolo Spurio commit d09ad3e7af3ab230323c2c00e190f801feb3a343 Author: Matt Roper Date: Wed Sep 18 16:56:26 2019 -0700 drm/i915: Unify ICP and MCC hotplug pin tables The MCC hpd table is just a subset of the ICP table; we can eliminate it and use the ICP table everywhere. The extra pins in the table won't be a problem for MCC since we still supply an appropriate hotplug trigger mask anywhere the pin table is used. Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190918235626.3750-2-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza commit b01a3ef34816461c31711e5559663e453cb83aba Author: Matt Roper Date: Wed Sep 18 16:56:25 2019 -0700 drm/i915: Future-proof DDC pin mapping We generally assume future platforms will inherit the behavior of the most recent platforms, so update our DDC pin mapping defaults to match how ICP/TGP behave (i.e., pins starting from GMBUS_PIN_1_BXT for combo PHY's and pins starting from GMBUS_PIN_9_TC1_ICP for TC PHY's). MCC's non-standard handling of combo PHY C seems like a platform-specific quirk that is unlikely to be duplicated on future platforms, so continue handling it as a special case. Without this change, future platforms would default to gen4-style pin mapping which is almost certainly not what we'll want. Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190918235626.3750-1-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza commit a47e788c2310a59b8e42e0bfc18d810118dff7bf Author: Chris Wilson Date: Thu Sep 19 14:14:14 2019 +0100 drm/i915/selftests: Exercise CS TLB invalidation Check that we are correctly invalidating the TLB at the start of a batch after updating the GTT. v2: Comments and hold the request reference while spinning Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190919131414.7495-1-chris@chris-wilson.co.uk commit 37fa0de3c137d5f54f7e64f53495c9d501d42a4d Author: Chris Wilson Date: Wed Sep 18 15:54:50 2019 +0100 drm/i915: Verify the engine after acquiring the active.lock When using virtual engines, the rq->engine is not stable until we hold the engine->active.lock (as the virtual engine may be exchanged with the sibling). Since commit 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") we may retire a request concurrently with resubmitting it to HW, we need to be extra careful to verify we are holding the correct lock for the request's active list. This is similar to the issue we saw with rescheduling the virtual requests, see sched_lock_engine(). Or else: <4> [876.736126] list_add corruption. prev->next should be next (ffff8883f931a1f8), but was dead000000000100. (prev=ffff888361ffa610). <4> [876.736136] WARNING: CPU: 2 PID: 21 at lib/list_debug.c:28 __list_add_valid+0x4d/0x70 <4> [876.736137] Modules linked in: i915(+) amdgpu gpu_sched ttm vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul snd_intel_nhlt snd_hda_codec snd_hwdep snd_hda_core ghash_clmulni_intel e1000e cdc_ether usbnet mii snd_pcm ptp pps_core mei_me mei prime_numbers btusb btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded: i915] <4> [876.736154] CPU: 2 PID: 21 Comm: ksoftirqd/2 Tainted: G U 5.3.0-CI-CI_DRM_6898+ #1 <4> [876.736156] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3183.A00.1905020411 05/02/2019 <4> [876.736157] RIP: 0010:__list_add_valid+0x4d/0x70 <4> [876.736159] Code: c3 48 89 d1 48 c7 c7 20 33 0e 82 48 89 c2 e8 4a 4a bc ff 0f 0b 31 c0 c3 48 89 c1 4c 89 c6 48 c7 c7 70 33 0e 82 e8 33 4a bc ff <0f> 0b 31 c0 c3 48 89 f2 4c 89 c1 48 89 fe 48 c7 c7 c0 33 0e 82 e8 <4> [876.736160] RSP: 0018:ffffc9000018bd30 EFLAGS: 00010082 <4> [876.736162] RAX: 0000000000000000 RBX: ffff888361ffc840 RCX: 0000000000000104 <4> [876.736163] RDX: 0000000080000104 RSI: 0000000000000000 RDI: 00000000ffffffff <4> [876.736164] RBP: ffffc9000018bd68 R08: 0000000000000000 R09: 0000000000000001 <4> [876.736165] R10: 00000000aed95de3 R11: 000000007fe927eb R12: ffff888361ffca10 <4> [876.736166] R13: ffff888361ffa610 R14: ffff888361ffc880 R15: ffff8883f931a1f8 <4> [876.736168] FS: 0000000000000000(0000) GS:ffff88849fd00000(0000) knlGS:0000000000000000 <4> [876.736169] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [876.736170] CR2: 00007f093a9173c0 CR3: 00000003bba08005 CR4: 0000000000760ee0 <4> [876.736171] PKRU: 55555554 <4> [876.736172] Call Trace: <4> [876.736226] __i915_request_submit+0x152/0x370 [i915] <4> [876.736263] __execlists_submission_tasklet+0x6da/0x1f50 [i915] <4> [876.736293] ? execlists_submission_tasklet+0x29/0x50 [i915] <4> [876.736321] execlists_submission_tasklet+0x34/0x50 [i915] <4> [876.736325] tasklet_action_common.isra.5+0x47/0xb0 <4> [876.736328] __do_softirq+0xd8/0x4ae <4> [876.736332] ? smpboot_thread_fn+0x23/0x280 <4> [876.736334] ? smpboot_thread_fn+0x6b/0x280 <4> [876.736336] run_ksoftirqd+0x2b/0x50 <4> [876.736338] smpboot_thread_fn+0x1d3/0x280 <4> [876.736341] ? sort_range+0x20/0x20 <4> [876.736343] kthread+0x119/0x130 <4> [876.736345] ? kthread_park+0xa0/0xa0 <4> [876.736347] ret_from_fork+0x24/0x50 <4> [876.736353] irq event stamp: 2290145 <4> [876.736356] hardirqs last enabled at (2290144): [] __slab_free+0x3e8/0x500 <4> [876.736358] hardirqs last disabled at (2290145): [] _raw_spin_lock_irqsave+0xd/0x50 <4> [876.736360] softirqs last enabled at (2290114): [] __do_softirq+0x33e/0x4ae <4> [876.736361] softirqs last disabled at (2290119): [] run_ksoftirqd+0x2b/0x50 <4> [876.736363] WARNING: CPU: 2 PID: 21 at lib/list_debug.c:28 __list_add_valid+0x4d/0x70 <4> [876.736364] ---[ end trace 3e58d6c7356c65bf ]--- <4> [876.736406] ------------[ cut here ]------------ <4> [876.736415] list_del corruption. prev->next should be ffff888361ffca10, but was ffff88840ac2c730 <4> [876.736421] WARNING: CPU: 2 PID: 5490 at lib/list_debug.c:53 __list_del_entry_valid+0x79/0x90 <4> [876.736422] Modules linked in: i915(+) amdgpu gpu_sched ttm vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul snd_intel_nhlt snd_hda_codec snd_hwdep snd_hda_core ghash_clmulni_intel e1000e cdc_ether usbnet mii snd_pcm ptp pps_core mei_me mei prime_numbers btusb btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded: i915] <4> [876.736433] CPU: 2 PID: 5490 Comm: i915_selftest Tainted: G U W 5.3.0-CI-CI_DRM_6898+ #1 <4> [876.736435] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3183.A00.1905020411 05/02/2019 <4> [876.736436] RIP: 0010:__list_del_entry_valid+0x79/0x90 <4> [876.736438] Code: 0b 31 c0 c3 48 89 fe 48 c7 c7 30 34 0e 82 e8 ae 49 bc ff 0f 0b 31 c0 c3 48 89 f2 48 89 fe 48 c7 c7 68 34 0e 82 e8 97 49 bc ff <0f> 0b 31 c0 c3 48 c7 c7 a8 34 0e 82 e8 86 49 bc ff 0f 0b 31 c0 c3 <4> [876.736439] RSP: 0018:ffffc900003ef758 EFLAGS: 00010086 <4> [876.736440] RAX: 0000000000000000 RBX: ffff888361ffc840 RCX: 0000000000000002 <4> [876.736442] RDX: 0000000080000002 RSI: 0000000000000000 RDI: 00000000ffffffff <4> [876.736443] RBP: ffffc900003ef780 R08: 0000000000000000 R09: 0000000000000001 <4> [876.736444] R10: 000000001418e4b7 R11: 000000007f0ea93b R12: ffff888361ffcab8 <4> [876.736445] R13: ffff88843b6d0000 R14: 000000000000217c R15: 0000000000000001 <4> [876.736447] FS: 00007f4e6f255240(0000) GS:ffff88849fd00000(0000) knlGS:0000000000000000 <4> [876.736448] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [876.736449] CR2: 00007f093a9173c0 CR3: 00000003bba08005 CR4: 0000000000760ee0 <4> [876.736450] PKRU: 55555554 <4> [876.736451] Call Trace: <4> [876.736488] i915_request_retire+0x224/0x8e0 [i915] <4> [876.736521] i915_request_create+0x4b/0x1b0 [i915] <4> [876.736550] nop_virtual_engine+0x230/0x4d0 [i915] Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111695 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190918145453.8800-1-chris@chris-wilson.co.uk commit 0d333ac7eb17f0f6c86db66afba70135f11da4a9 Author: Daniele Ceraolo Spurio Date: Wed Sep 18 18:53:30 2019 -0700 drm/i915: fix SFC reset flow Our assumption that the we can ask the HW to lock the SFC even if not currently in use does not match the HW commitment. The expectation from the HW is that SW will not try to lock the SFC if the engine is not using it and if we do that the behavior is undefined; on ICL the HW ends up to returning the ack and ignoring our lock request, but this is not guaranteed and we shouldn't expect it going forward. Also, failing to get the ack while the SFC is in use means that we can't cleanly reset it, so fail the engine reset in that scenario. v2: drop rmw change, keep the log as debug and handle failure (Chris), improve comments (Tvrtko). Reported-by: Owen Zhang Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Tvrtko Ursulin Acked-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190919015330.15435-1-daniele.ceraolospurio@intel.com commit def98c84b6cdf2eeea19ec5736e90e316df5206b Author: Tejun Heo Date: Wed Sep 18 18:43:40 2019 -0700 workqueue: Fix spurious sanity check failures in destroy_workqueue() Before actually destrying a workqueue, destroy_workqueue() checks whether it's actually idle. If it isn't, it prints out a bunch of warning messages and leaves the workqueue dangling. It unfortunately has a couple issues. * Mayday list queueing increments pwq's refcnts which gets detected as busy and fails the sanity checks. However, because mayday list queueing is asynchronous, this condition can happen without any actual work items left in the workqueue. * Sanity check failure leaves the sysfs interface behind too which can lead to init failure of newer instances of the workqueue. This patch fixes the above two by * If a workqueue has a rescuer, disable and kill the rescuer before sanity checks. Disabling and killing is guaranteed to flush the existing mayday list. * Remove sysfs interface before sanity checks. Signed-off-by: Tejun Heo Reported-by: Marcin Pawlowski Reported-by: "Williams, Gerald S" Cc: stable@vger.kernel.org commit 0d352a3a8a1f26168d09f7073e61bb4b328e3bb9 Author: Iago Toral Quiroga Date: Mon Sep 16 09:11:25 2019 +0200 drm/v3d: don't leak bin job if v3d_job_init fails. If the initialization of the job fails we need to kfree() it before returning. Signed-off-by: Iago Toral Quiroga Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190916071125.5255-1-itoral@igalia.com Fixes: a783a09ee76d ("drm/v3d: Refactor job management.") Reviewed-by: Eric Anholt commit 56c05de6bd773b96deca379370965c49042b5fbf Author: Chris Wilson Date: Tue Sep 17 20:47:46 2019 +0100 drm/i915: Extend Haswell GT1 PSMI workaround to all A few times in CI, we have detected a GPU hang on our Haswell GT2 systems with the characteristic IPEHR of 0x780c0000. When the PSMI w/a was first introducted, it was applied to all Haswell, but later on we found an erratum that supposedly restricted the issue to GT1 and so constrained it only be applied on GT1. That may have been a mistake... Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111692 Fixes: 167bc759e823 ("drm/i915: Restrict PSMI context load w/a to Haswell GT1") References: 2c550183476d ("drm/i915: Disable PSMI sleep messages on all rings around context switches") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190917194746.26710-1-chris@chris-wilson.co.uk commit 69b22f51e6644b6592087fe157537dd5f68e30bb Author: Daniel Vetter Date: Tue Sep 17 14:09:36 2019 +0200 drm/doc: Improve docs around connector (un)registration Current code is quite a mess unfortunately, so also add a todo.rst entry to maybe fix it up eventually. Cc: Michel Dänzer Reviewed-by: Lyude Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190917120936.7501-2-daniel.vetter@ffwll.ch commit 8698ba53cd7173c32320ebbef4d389d41ebb5780 Author: Matt Roper Date: Mon Sep 16 16:32:51 2019 -0700 drm/i915/cml: Add second PCH ID for CMP The CMP PCH ID we have in the driver is correct for the CML-U machines we have in our CI system, but the CML-S and CML-H CI machines appear to use a different PCH ID, leading our driver to detect no PCH for them. Cc: Rodrigo Vivi Cc: Anusha Srivatsa References: 729ae330a0f2e2 ("drm/i915/cml: Introduce Comet Lake PCH") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111461 Signed-off-by: Matt Roper Acked-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190916233251.387-1-matthew.d.roper@intel.com commit aefdaa15e54c092709cb926a4b2732986386ef34 Author: Lowry Li (Arm Technology China) Date: Tue Sep 17 11:25:44 2019 +0000 drm/komeda: Adds register dump support for gcu, lup and dou Adds to support register dump on lpu and dou of pipeline and gcu on D71 Changes since v1: - For a constant format without additional arguments, use seq_puts() instead of seq_printf(). Signed-off-by: Lowry Li (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20190917112525.25490-1-lowry.li@arm.com commit 32b339d9fcdccb1a16c2c98abf2bf6200992ba96 Author: Mihail Atanassov Date: Tue Sep 17 15:05:08 2019 +0000 drm/komeda: Remove in-code use of ifdef Provide a dummy static inline function in the header instead. Cc: Daniel Vetter Cc: Lowry Li (Arm Technology China) Cc: james qian wang (Arm Technology China) Fixes: 4d74b25ee395 ("drm/komeda: Adds error event print functionality") Signed-off-by: Mihail Atanassov Reviewed-by: Daniel Vetter Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20190917150314.20892-1-mihail.atanassov@arm.com commit 850d71acd52cd331474116fbd60cf8b3f3ded93e Author: Al Viro Date: Tue Sep 17 23:31:27 2019 -0400 autofs: don't bother with atomics for ino->count All writers are serialized on inode->i_rwsem. So are the readers outside of expire.c. And the readers in expire.c are in the code that really doesn't care about narrow races - it's looking for expiry candidates and its callers have to cope with the possibility of a good candidate becoming busy right under them. No point bothering with atomic operations - just use int and mark the non-serialized readers with READ_ONCE(). Signed-off-by: Al Viro commit c3aed16680cd0c0e5abf1bfc0dc1338e6a41b29f Author: Al Viro Date: Tue Sep 17 23:28:08 2019 -0400 autofs_dir_rmdir(): check ino->count for deciding whether it's empty... Signed-off-by: Al Viro commit 41ca19740a0e772eff1f9ba67293649feb836662 Author: Al Viro Date: Tue Sep 17 23:23:08 2019 -0400 autofs: get rid of pointless checks around ->count handling * IS_ROOT can't be true for unlink or rmdir victim * any positive autofs dentry has non-NULL autofs_dentry_ino() * autofs symlink can't have ->count other than 1 * autofs empty directory can't have ->count other than 1 Signed-off-by: Al Viro commit e509d6e9c1ab54af257d4ed95b30d41e3d786857 Author: Al Viro Date: Tue Sep 17 22:16:58 2019 -0400 autofs_clear_leaf_automount_flags(): use ino->count instead of ->d_subdirs We want to find out if the parent will become empty after we remove the victim of rmdir(). Checking if the victim is the only element of parent's ->d_subdirs is completely wrong - e.g. opening the parent will end up with a cursor added to its ->d_parent and fooling the check. We do maintain ino->count - 0 for anything removed, 1 + number of children for anything live. Which gives us precisely what we need for that check... Signed-off-by: Al Viro commit a859f1270a993ba3e8882eb572ff7151556fc04f Author: Lyude Paul Date: Fri Sep 13 18:27:03 2019 -0400 drm/encoder: Don't raise voice in drm_encoder_mask() documentation There's no need to raise our voice when saying encoder, we're all civilized adults here! Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190913222704.8241-4-lyude@redhat.com Reviewed-by: Daniel Vetter commit c873724d88d9357e67de0d99dd8c58b4086bc59d Author: Lyude Paul Date: Fri Sep 13 18:27:02 2019 -0400 drm/encoder: Fix possible_crtcs documentation Similar to possible_clones, we don't actually use possible_crtcs until the driver is registered with userspace. So, fix the documentation to indicate this. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190913222704.8241-3-lyude@redhat.com Reviewed-by: Daniel Vetter commit 8c8ae2fe8d213729e414139a1d45ecb3b52de84a Author: Lyude Paul Date: Fri Sep 13 18:27:01 2019 -0400 drm/encoder: Fix possible_clones documentation We say that all of the bits in possible_clones must be set before calling drm_encoder_init(). This isn't true though, since: * The driver may not even have all of the encoder objects that could be used as clones initialized at that point * possible_crtcs isn't used at all outside of userspace, so it's not actually needed to initialize it until drm_dev_register() So, fix it. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190913222704.8241-2-lyude@redhat.com Reviewed-by: Daniel Vetter commit c210e85b8f3371168ce78c8da00b913839a84ec7 Author: Chris Wilson Date: Tue Sep 17 13:30:55 2019 +0100 drm/i915/tgl: Extend MI_SEMAPHORE_WAIT On Tigerlake, MI_SEMAPHORE_WAIT grew an extra dword, so be sure to update the length field and emit that extra parameter and any padding noop as required. v2: Define the token shift while we are adding the updated MI_SEMAPHORE_WAIT v3: Use int instead of bool in the addition so that readers are not left wondering about the intricacies of the C spec. Now they just have to worry what the integer value of a boolean operation is... Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Cc: Michal Winiarski Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190917123055.28965-1-chris@chris-wilson.co.uk commit 80fa64d62067ea7390cd27d924dcb7c028e455e9 Author: Chris Wilson Date: Tue Sep 17 09:00:29 2019 +0100 drm/i915: Only apply a rmw mmio update if the value changes If we try to clear, or even set, a bit in the register that doesn't change the register state; skip the write. There's a slight danger in that the register acts as a latch-on-write, but I do not think we use a rmw cycle with any such latch registers. Suggested-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190917080029.27632-1-chris@chris-wilson.co.uk commit 09764659003d9e208b8f558d164c8f5005b43ab7 Author: Colin Ian King Date: Fri Sep 13 08:43:39 2019 +0100 ath10k: fix spelling mistake "eanble" -> "enable" There is a spelling mistake in a ath10k_warn warning message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 1340cc631bd00431e2f174525c971f119df9efa1 Author: Miaoqing Pan Date: Thu Aug 29 10:45:12 2019 +0800 ath10k: fix latency issue for QCA988x Bad latency is found on QCA988x, the issue was introduced by commit 4504f0e5b571 ("ath10k: sdio: workaround firmware UART pin configuration bug"). If uart_pin_workaround is false, this change will set uart pin even if uart_print is false. Tested HW: QCA9880 Tested FW: 10.2.4-1.0-00037 Fixes: 4504f0e5b571 ("ath10k: sdio: workaround firmware UART pin configuration bug") Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo commit 334f5b61a6f29834e881923b98d1e27e5ce9620d Author: Wenwen Wang Date: Thu Aug 15 16:04:31 2019 -0500 ath10k: add cleanup in ath10k_sta_state() If 'sta->tdls' is false, no cleanup is executed, leading to memory/resource leaks, e.g., 'arsta->tx_stats'. To fix this issue, perform cleanup before go to the 'exit' label. Signed-off-by: Wenwen Wang Signed-off-by: Kalle Valo commit c41305993ff5a399775da54232b30ff2d6c9576e Author: Govind Singh Date: Wed Jul 31 17:12:20 2019 +0530 ath10k: revalidate the msa region coming from firmware driver sends QMI_WLFW_MSA_INFO_REQ_V01 QMI request to firmware and in response expects range of addresses and size to be mapped. Add condition to check whether addresses in response falls under valid range otherwise return failure. Testing: Tested on WCN3990 HW Tested FW: WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 9c44bf4c12550f1c3c1be0671e559477e70ab350 Author: Tomislav Požega Date: Sun Jul 28 11:11:58 2019 +0200 ath10k: use ath10k_pci_soc_ functions for all warm_reset instances Use ath10k_pci_soc_read32 / ath10k_pci_soc_write32 functions for the rest of warm_reset functions. Until now these have been used only for ath10k_pci_warm_reset_si0, but since they already exist it makes sense to simplify code a bit. Runtime tested with QCA9862. Signed-off-by: Tomislav Požega Signed-off-by: Kalle Valo commit 7921ae0919078292bfa88adb812ad7cfb621f977 Author: Vasyl Gomonovych Date: Thu Jul 18 22:30:32 2019 +0200 ath10k: Use ARRAY_SIZE fix coccinelle warning, use ARRAY_SIZE Signed-off-by: Vasyl Gomonovych Signed-off-by: Kalle Valo commit 0227ff3656f2c68b44002de0a17cec56cbdac631 Author: Sven Eckelmann Date: Wed Jul 3 16:19:49 2019 +0200 ath10k: avoid leaving .bss_info_changed prematurely ath10k_bss_info_changed() handles various events from the upper layers. It parses the changed bitfield and then configures the driver/firmware accordingly. Each detected event is handled in a separate scope which is independent of each other - but in the same function. The commit f279294e9ee2 ("ath10k: add support for configuring management packet rate") changed this behavior by returning from this function prematurely when some precondition was not fulfilled. All new event handlers added after the BSS_CHANGED_BASIC_RATES event handler would then also be skipped. Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo commit f93bcf0ce6a144174292716f9a79330567a778b6 Author: Bjorn Andersson Date: Thu Jul 25 10:47:55 2019 -0700 ath10k: Use standard bulk clock API in snoc No frequency is currently specified for the single clock defined in the snoc driver, so the clock wrappers reimplements the standard bulk API provided by the clock framework. Change to this. The single clock defined is marked as optional so this version of the get API is used, but might need to be reconsidered in the future. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo commit c56c7f24d7f88cac9aa9a30fe96adfec96c024bb Author: Bjorn Andersson Date: Thu Jul 25 10:47:54 2019 -0700 ath10k: Use standard regulator bulk API in snoc The regulator_get_optional() exists for cases where the driver needs do behave differently depending on some regulator supply being present or not, as we don't use this we can use the standard regulator_get() and rely on its handling of unspecified regulators. While the driver currently doesn't specify any loads the regulator framework was updated last year to only account for load of enabled regulators, so should the need appear it's better to apply load numbers during initialization that dynamically. With this the regulator wrappers have been reduced the become identical to the standard bulk API provided by the regulator framework, so use these instead of rolling our own. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo commit b003e7f1974eaaefcca12be56dff592481052864 Author: Bjorn Andersson Date: Thu Jul 25 10:47:53 2019 -0700 ath10k: snoc: skip regulator operations The regulator operations is trying to set a voltage to a fixed value, by giving some wiggle room. But some board designs specifies regulator voltages outside this limited range. One such example is the Lenovo Yoga C630, with vdd-3.3-ch0 in particular specified at 3.1V. But consumers with fixed voltage requirements should just rely on the board configuration to provide the power at the required level, so this code should be removed. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo commit 7165ef890a4c44cf16db66b82fd78448f4bde6ba Author: Bjorn Andersson Date: Wed Jul 24 23:31:08 2019 -0700 ath10k: Fix HOST capability QMI incompatibility The introduction of 768ec4c012ac ("ath10k: update HOST capability QMI message") served the purpose of supporting the new and extended HOST capability QMI message. But while the new message adds a slew of optional members it changes the data type of the "daemon_support" member, which means that older versions of the firmware will fail to decode the incoming request message. There is no way to detect this breakage from Linux and there's no way to recover from sending the wrong message (i.e. we can't just try one format and then fallback to the other), so a quirk is introduced in DeviceTree to indicate to the driver that the firmware requires the 8bit version of this message. Cc: stable@vger.kernel.org Fixes: 768ec4c012ac ("ath10k: update HOST capability qmi message") Signed-off-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Kalle Valo commit b10f32672946ad638a430cc4289029b7acf8e979 Author: Hauke Mehrtens Date: Sun Aug 18 21:09:20 2019 +0200 ath10k: Check if station exists before forwarding tx airtime report It looks like the FW on QCA9984 already reports the tx airtimes before the station is added to the peer entry. The peer entry is created in ath10k_peer_map_event() just with the vdev_id and the ethaddr, but not with a station entry, this is added later in ath10k_peer_create() in callbacks from mac80211. When there is no sta added to the peer entry, this function fails because it calls ieee80211_sta_register_airtime() with NULL. This was reported in OpenWrt some time ago: https://bugs.openwrt.org/index.php?do=details&task_id=2414 This commit should fix this crash: [ 75.991714] Unable to handle kernel paging request at virtual address fffff9e8 [ 75.991756] pgd = c0204000 [ 75.997955] [fffff9e8] *pgd=5fdfd861, *pte=00000000, *ppte=00000000 [ 76.000537] Internal error: Oops: 37 [#1] SMP ARM [ 76.006686] Modules linked in: pppoe ppp_async ath10k_pci ath10k_core ath pptp pppox ppp_mppe ppp_generic mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY usbserial slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_netlink iptable_raw iptable_mangle iptable_filter ipt_ah ipt_ECN ip_tables crc_ccitt compat chaoskey fuse sch_cake sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 [ 76.059974] cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6t_NPT ip6t_MASQUERADE nf_nat_masquerade_ipv6 nf_nat nf_conntrack nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 msdos ip_gre gre ifb sit tunnel4 ip_tunnel tun vfat fat hfsplus cifs nls_utf8 nls_iso8859_15 nls_iso8859_1 nls_cp850 nls_cp437 nls_cp1250 sha1_generic md5 md4 [ 76.130634] usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_of_simple ohci_platform ohci_hcd phy_qcom_dwc3 ahci ehci_platform sd_mod ahci_platform libahci_platform libahci libata scsi_mod ehci_hcd gpio_button_hotplug ext4 mbcache jbd2 exfat crc32c_generic [ 76.154772] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.132 #0 [ 76.177001] Hardware name: Generic DT based system [ 76.182990] task: c0b06d80 task.stack: c0b00000 [ 76.187832] PC is at ieee80211_sta_register_airtime+0x24/0x148 [mac80211] [ 76.192211] LR is at ath10k_htt_t2h_msg_handler+0x678/0x10f4 [ath10k_core] [ 76.199052] pc : [] lr : [] psr: a0000113 [ 76.205820] sp : c0b01d54 ip : 00000002 fp : bf869c0c [ 76.211981] r10: 0000003c r9 : dbdca138 r8 : 00060002 [ 76.217192] r7 : 00000000 r6 : dabe1150 r5 : 00000000 r4 : dbdc95c0 [ 76.222401] r3 : 00000000 r2 : 00060002 r1 : 00000000 r0 : 00000000 [ 76.229003] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 76.235509] Control: 10c5787d Table: 5c94006a DAC: 00000051 [ 76.242716] Process swapper/0 (pid: 0, stack limit = 0xc0b00210) [ 76.248446] Stack: (0xc0b01d54 to 0xc0b02000) [ 76.254532] 1d40: dbdc95c0 00000000 dabe1150 [ 76.258808] 1d60: 00000001 dabe1150 dbdca138 0000003c bf869c0c bf83e8b0 00000002 c0314b10 [ 76.266969] 1d80: dbdc9c70 00000001 00000001 dabe114c 00010000 00000000 dbdcd724 bf88f3d8 [ 76.275126] 1da0: c0310d28 db393c00 dbdc95c0 00000000 c0b01dd0 c07fb4c4 dbdcd724 00000001 [ 76.283286] 1dc0: 00000022 bf88b09c db393c00 00000022 c0b01dd0 c0b01dd0 00000000 dbdcc5c0 [ 76.291445] 1de0: bf88f04c dbdcd654 dbdcd71c dbdc95c0 00000014 dbdcd724 dbdcc5c0 00000005 [ 76.299605] 1e00: 0004b400 bf85c360 00000000 bf87101c c0b01e24 00000006 00000000 dbdc95c0 [ 76.307764] 1e20: 00000001 00000040 0000012c c0b01e80 1cf51000 bf85c448 dbdcd440 dbdc95c0 [ 76.315925] 1e40: dbdca440 ffffa880 00000040 bf88cb68 dbdcd440 00000001 00000040 ffffa880 [ 76.324084] 1e60: c0b02d00 c06d72e0 dd990080 c0a3f080 c0b255dc c0b047e4 c090afac c090e80c [ 76.332244] 1e80: c0b01e80 c0b01e80 c0b01e88 c0b01e88 dd4cc200 00000000 00000003 c0b0208c [ 76.340405] 1ea0: c0b02080 40000003 ffffe000 00000100 c0b02080 c03015c8 00000000 00000001 [ 76.348564] 1ec0: dd408000 c0a38210 c0b2c7c0 0000000a ffffa880 c0b02d00 c07fb764 00200102 [ 76.356723] 1ee0: dd4cc268 c0a3e414 00000000 00000000 00000001 dd408000 de803000 00000000 [ 76.364883] 1f00: 00000000 c03247cc c0a3e414 c0368f1c c0b03f60 c0b153cc de80200c de802000 [ 76.373042] 1f20: c0b01f48 c0301488 c0308630 60000013 ffffffff c0b01f7c 00000000 c0b00000 [ 76.381204] 1f40: 00000000 c030c08c 00000001 00000000 00000000 c0315180 ffffe000 c0b03cc0 [ 76.389363] 1f60: c0b03c70 00000000 00000000 c0a2da28 00000000 00000000 c0b01f90 c0b01f98 [ 76.397522] 1f80: c030862c c0308630 60000013 ffffffff 00000051 00000000 ffffe000 c035dd18 [ 76.405681] 1fa0: 000000bf c0b03c40 00000000 c0b2c000 dddfce80 c035e060 c0b2c040 c0a00cf4 [ 76.413842] 1fc0: ffffffff ffffffff 00000000 c0a0067c c0a2da28 00000000 00000000 c0b2c1d4 [ 76.422001] 1fe0: c0b03c5c c0a2da24 c0b07ee0 4220406a 512f04d0 4220807c 00000000 00000000 [ 76.430335] [] (ieee80211_sta_register_airtime [mac80211]) from [<00000002>] (0x2) [ 76.438314] Code: e1cd81f0 e1a08002 e1cda1f8 e58de020 (e5102618) [ 76.446965] ---[ end trace 227a38ade964d642 ]--- Fixes: bb31b7cb106c ("ath10k: report tx airtime provided by fw") Signed-off-by: Hauke Mehrtens Signed-off-by: Kalle Valo commit 98bf2f5262f15e16c09ac47bbf305577283242fb Author: Julian Parkin Date: Mon Aug 12 18:47:50 2019 -0400 drm/amd/display: Separate hardware initialization from creation [Why] Separating the hardware initialization from the creation of the dc structures gives greater flexibility to the dm to override options for debugging. [How] Move the hardware initialization call to a new function, dc_hardware_init. No functional change is intended. Signed-off-by: Julian Parkin Reviewed-by: Tony Cheng Acked-by: Leo Li Acked-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 0594ffee9011e7e32b7ad92fe6d815e8727281f8 Author: Lewis Huang Date: Tue Aug 27 17:03:41 2019 +0800 drm/amd/display: fix i2c wtire mot incorrect issue [Why] I2C write command always send mot = true will cause sink state incorrect. [How] 1. Remove default i2c write mot = true. 2. Deciding mot flag by is_end_of_payload flag. Signed-off-by: Lewis Huang Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 616f5b65f1c02d3d6ae370644670d14c57de2fd8 Author: Martin Tsai Date: Thu Aug 22 10:02:13 2019 +0800 drm/amd/display: Handle virtual signal type in disable_link() [Why] The new implementation changed the behavior to allow process setMode to DAL when DAL returns empty mode query for unplugged display. This will trigger additional disable_link(). When unplug HDMI from MST dock, driver will update stream->signal to "Virtual". disable_link() will call disable_output() if the signal type is not DP and induce other displays on MST dock show black screen. [How] Don't need to process disable_output() if the signal type is virtual. Signed-off-by: Martin Tsai Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 74df06dd8ef3a70bac08a35cad903d5a4466aed5 Author: Dmytro Laktyushkin Date: Fri Aug 23 14:22:40 2019 -0400 drm/amd/display: fix global sync param extraction indexing dcn20_calculate_dlg_params was incorrectly indexing pipe src and dst structs when extracting global sync params. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Jaehyun Chung Acked-by: Leo Li Signed-off-by: Alex Deucher commit a14e9e0292e29939ef078ab7f5a337edcd796ca1 Author: Dmytro Laktyushkin Date: Mon Aug 26 15:04:18 2019 -0400 drm/amd/display: add vtg update after global sync update Global sync update was missing vtg update resulting in underflow if vstartup decreased a significant amount. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Jaehyun Chung Acked-by: Leo Li Signed-off-by: Alex Deucher commit d4252eee1f7cde7f8b1673626d1b49498c1d4f77 Author: Stylon Wang Date: Tue Aug 20 14:48:37 2019 -0400 drm/amd/display: Add debugfs entry to force YUV420 output [Why] Even if YUV420 is available for video mode, YUV444 is still automatically selected. This poses a problem for compliance tests. [How] Add a per-connector debugfs entry "force_yuv420_output" to force selection of YUV420 mode. Signed-off-by: Stylon Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Leo Li Signed-off-by: Alex Deucher commit 747012382937e4b6eb34ba730e815f9da836e454 Author: Dmytro Laktyushkin Date: Thu Aug 22 14:12:57 2019 -0400 drm/amd/display: add additional flag consideration for surface update Surface dchub/dpp update would not trigger if a stream update was the only cause. This change now allows stream flags to trigger this update. Signed-off-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit a45804db8bc08efba06ab6a0a6d0dc2d4d5d1a24 Author: Wesley Chalmers Date: Wed Aug 21 16:09:27 2019 -0400 drm/amd/display: Replace for loop w/ function call [WHY] A function to adjust DPP clocks with DTO already exists; function code is identical to the code replaced here Signed-off-by: Wesley Chalmers Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 387596ef2859c37d564ce15abddbc9063a132e2c Author: Mikita Lipski Date: Fri Aug 23 13:26:24 2019 -0400 drm/amd/display: Rebuild mapped resources after pipe split [why] The issue is specific for linux, as on timings such as 8K@60 or 4K@144 DSC should be working in combination with ODM Combine in order to ensure that we can run those timings. The validation for those timings was passing, but when pipe split was happening second pipe wasn't being programmed. [how] Rebuild mapped resources if we split stream for ODM. Signed-off-by: Mikita Lipski Acked-by: Leo Li Signed-off-by: Alex Deucher commit 4891607da4706599a9c360142976e7c3e513b72b Author: Aric Cyr Date: Mon Aug 26 15:54:27 2019 -0400 drm/amd/display: 3.2.50 Signed-off-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 610f56371ad2bb70059419949d3b1484ca74a7dd Author: Josip Pavic Date: Fri Aug 23 20:54:12 2019 -0400 drm/amd/display: define parameters for abm 2.3 [Why] Current configuration 0 is just a placeholder, and final parameters needed. Also, configuration 1 is expected to emulate ABM 2.1 but is too aggressive. [How] Redefine configuration 0 with the finalized parameters, and increase the contrast gain of configuration 1 so that it properly emulates ABM 2.1. Signed-off-by: Josip Pavic Reviewed-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit 132dade1181b41478d0efa93f78011ed482f86dc Author: Ilya Bakoulin Date: Fri Aug 23 12:45:34 2019 -0400 drm/amd/display: Fix HUBP secondary viewport programming [Why] Secondary viewport dimension/position registers are not programmed, which can cause issues in some stereo configurations. [How] Add register definitions and register programming. Signed-off-by: Ilya Bakoulin Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit de7b45babd9be25138ff5e4a0c34eefffbb226ff Author: Christian König Date: Fri Sep 13 13:43:15 2019 +0200 drm/amdgpu: cleanup creating BOs at fixed location (v2) The placement is something TTM/BO internal and the RAS code should avoid touching that directly. Add a helper to create a BO at a fixed location and use that instead. v2: squash in fixes (Alex) Signed-off-by: Christian König Reviewed-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 185926ef38c8391c77e137d79cac112f27294c06 Author: Colin Ian King Date: Wed Sep 11 10:12:27 2019 +0100 drm/selftests: fix spelling mistake "misssing" -> "missing" There is a spelling mistake in a literal string, fix it. Signed-off-by: Colin Ian King Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190911091227.5710-1-colin.king@canonical.com commit 64e9c200a0cdcffaab2360942b34c2cae49bbfc3 Author: Colin Ian King Date: Fri Sep 6 16:30:52 2019 +0100 staging: fbtft: make several arrays static const, makes object smaller Don't populate the arrays on the stack but instead make them static const. Makes the object code smaller by 1329 bytes. Before: text data bss dec hex filename 5581 1488 64 7133 1bdd drivers/staging/fbtft/fb_hx8340bn.o 5444 1264 0 6708 1a34 drivers/staging/fbtft/fb_hx8347d.o 3581 1360 0 4941 134d drivers/staging/fbtft/fb_ili9163.o 7154 1552 0 8706 2202 drivers/staging/fbtft/fb_ili9320.o 7478 2544 0 10022 2726 drivers/staging/fbtft/fb_ili9325.o 6327 1424 0 7751 1e47 drivers/staging/fbtft/fb_s6d1121.o 6498 1776 0 8274 2052 drivers/staging/fbtft/fb_ssd1289.o After: text data bss dec hex filename 5376 1584 64 7024 1b70 drivers/staging/fbtft/fb_hx8340bn.o 5276 1328 0 6604 19cc drivers/staging/fbtft/fb_hx8347d.o 3581 1360 0 4941 134d drivers/staging/fbtft/fb_ili9163.o 6905 1616 0 8521 2149 drivers/staging/fbtft/fb_ili9320.o 7229 2608 0 9837 266d drivers/staging/fbtft/fb_ili9325.o 6030 1488 0 7518 1d5e drivers/staging/fbtft/fb_s6d1121.o 6249 1872 0 8121 1fb9 drivers/staging/fbtft/fb_ssd1289.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190906153052.31846-1-colin.king@canonical.com commit dcc7b1f3ae99810ad745e5c41c2f7bf19be608c8 Author: Thomas Zimmermann Date: Wed Sep 11 14:03:52 2019 +0200 drm/mgag200: Use drm_gem_vram_{vmap, vunmap}() to map cursor source BO The VRAM helper's vmap interfaces provide pinning and mapping of BO memory. This patch replaces the respective code in mgag200 cursor handling. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190911120352.20084-4-tzimmermann@suse.de commit 820d6606e9c27d7e52bd065a2798e09cc7a35532 Author: Thomas Zimmermann Date: Wed Sep 11 14:03:51 2019 +0200 drm/ast: Use drm_gem_vram_{vmap,vunmap}() to map cursor source BO The VRAM helper's vmap interfaces provide pinning and mapping of BO memory. This patch replaces the respective code in ast cursor handling. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190911120352.20084-3-tzimmermann@suse.de commit c8908bde0dbd35145f2cb6894e742aec84674af7 Author: Thomas Zimmermann Date: Wed Sep 11 14:03:50 2019 +0200 drm/vram: Provide vmap and vunmap operations for GEM VRAM objects The implementation of vmap and vunmap for GEM VRAM helpers is already in PRIME helpers. The patch moves the operations to separate functions and exports them for general use. v3: * remove v2's obsolete note on ref-counting v2: * fix documentation * add cross references to function documentation * document (the lack of) ref-counting for GEM VRAM BO mappings Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190911120352.20084-2-tzimmermann@suse.de commit 4d74b25ee395cb2faf615519e765f47ce5964a96 Author: Lowry Li (Arm Technology China) Date: Fri Aug 2 09:43:10 2019 +0000 drm/komeda: Adds error event print functionality Adds to print the event message when error happens and the same event will not be printed until next vsync. Changes since v2: 1. Refine komeda_sprintf(); 2. Not using STR_SZ macro for the string size in komeda_print_events(). Changes since v1: 1. Handling the event print by CONFIG_KOMEDA_ERROR_PRINT; 2. Changing the max string size to 256. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: Mihail Atanassov Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/1564738954-6101-1-git-send-email-lowry.li@arm.com commit 62afb4ad425af2bc6ac6ff6d697825ae47c25211 Author: José Roberto de Souza Date: Fri Sep 13 16:28:57 2019 -0700 drm/connector: Allow max possible encoders to attach to a connector Currently we restrict the number of encoders that can be linked to a connector to 3, increase it to match the maximum number of encoders that can be initialized(32). To more effiently do that lets switch from an array of encoder ids to bitmask. v2: Fixing missed return on amdgpu_dm_connector_to_encoder() Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Cc: Alex Deucher Cc: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Ville Syrjälä Signed-off-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190913232857.389834-2-jose.souza@intel.com commit a92462d6bf493c4c96b6d0517b8357fc0a1746d0 Author: José Roberto de Souza Date: Fri Sep 13 16:28:56 2019 -0700 drm/connector: Share with non-atomic drivers the function to get the single encoder This 3 non-atomic drivers all have the same function getting the only encoder available in the connector, also atomic drivers have this fallback. So moving it a common place and sharing between atomic and non-atomic drivers. While at it I also removed the mention of drm_atomic_helper_best_encoder() that was renamed in commit 297e30b5d9b6 ("drm/atomic-helper: Unexport drm_atomic_helper_best_encoder"). v3: moving drm_connector_get_single_encoder to drm_kms_helper module Reviewed-by: Laurent Pinchart Reviewed-by: Ville Syrjälä Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Signed-off-by: José Roberto de Souza Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190913232857.389834-1-jose.souza@intel.com commit bb120e1171a966429287865134265811887daa6c Author: Chris Wilson Date: Sun Sep 15 21:37:00 2019 +0100 drm/i915: Show the logical context ring state on dumping Include the active context register state when dumping the engine. Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Stuart Summers Link: https://patchwork.freedesktop.org/patch/msgid/20190915203701.29163-1-chris@chris-wilson.co.uk commit db338e16638465cb8053bcb8d9c9778788545463 Author: Andrey Grodzovsky Date: Thu Sep 12 17:16:32 2019 -0400 drm/amdgpu:Fix EEPROM checksum calculation. Fix checksum calculation after manually resetting the table. Unify reset and empty EEPROM init flow. Protect the table reset with lock. Signed-off-by: Andrey Grodzovsky Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 012dd14d1de63b7443a8cec4ad9046c85a7184a5 Author: Guchun Chen Date: Mon Sep 16 13:42:46 2019 +0800 drm/amdgpu: fix ras ctrl debugfs node leak Use debugfs_remove_recursive to remove the whole debugfs directory instead of removing the node one by one. Signed-off-by: Guchun Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1313dacfadc502655942def39079c6a36b3dddb7 Author: Christian König Date: Wed Apr 3 13:30:56 2019 +0200 drm/amdgpu: trace if a PD/PT update is done directly This is usfull for debugging. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit bc51c1e56fbc07fa8f4c54e7afd6e0e849eab201 Author: Christian König Date: Wed Apr 3 14:11:53 2019 +0200 drm/amdgpu: drop double HDP flush in the VM code Already done in the CPU based backend code. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit fc39d903eb805588cba3696748728627aedfd1bd Author: Christian König Date: Fri Sep 13 12:12:40 2019 +0200 drm/amdgpu: cleanup coding style in the VM code a bit No functional change. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 03fb560f2ea88b702c6779d3860be61058ca4d6d Author: Christian König Date: Thu Sep 12 12:13:50 2019 +0200 drm/amdgpu: revert "disable bulk moves for now" This reverts commit a213c2c7e235cfc0e0a161a558f7fdf2fb3a624a. The changes to fix this should have landed in 5.1. Signed-off-by: Christian König Reviewed-by: Zhou, David(ChunMing) Signed-off-by: Alex Deucher commit 393993ac0cc92657fb0615597a404bbb67f08a7d Author: Jiange Zhao Date: Mon Sep 16 14:56:06 2019 +0800 drm/amdgpu/SRIOV: Navi12 SRIOV VF gets GTT base With changes in PSP and HV, SRIOV VF will handle vram gtt location just like bare metal. There is no need to differentiate it anymore. Signed-off-by: Jiange Zhao Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 28faa17ee8897f2f7bf4ff20362e1e88c69fbf12 Author: Aaron Liu Date: Mon Sep 16 09:26:28 2019 +0800 drm/amdgpu: remove program of lbpw for renoir These is no LBPW on Renoir. So removing program of lbpw for renoir. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 4b617e2b9e5473747ef925dd2e47239acb9925c2 Author: Jay Cornwall Date: Thu Sep 12 14:03:41 2019 -0500 drm/amdkfd: Swap trap temporary registers in gfx10 trap handler ttmp[4:5] hold information useful to the debugger. Use ttmp[14:15] instead, aligning implementation with gfx9 trap handler. Signed-off-by: Jay Cornwall Reviewed-by: shaoyun liu Signed-off-by: Alex Deucher commit ef404bc6592075925997d3626e968e4bcd59721f Author: Jani Nikula Date: Mon Sep 16 12:29:01 2019 +0300 drm/i915: stop conflating HAS_DISPLAY() and disabled display Stop setting ->pipe_mask to zero when display is disabled, allowing us to have different code paths for not actually having display hardware, and having display hardware disabled. This lets us develop those two avenues independently. There are no functional changes for when there is no display. However, all uses of for_each_pipe() and for_each_pipe_masked() will start running for the disabled display case. Put one of the more significant ones behind checks for INTEL_DISPLAY_ENABLED(), otherwise the cases should not be hit with disabled display, or they seem benign. Fingers crossed. All in all, this might not be the ideal solution. In fact we may have had something along the lines of this in the past, but we ended up conflating the two cases. Possibly even by recommendation by yours truly; I did not dare dig up that part of the history. But the perfect is the enemy of the good, this is a straightforward change, and lets us get actual work done in both fronts without interfering with each other. Cc: Chris Wilson Cc: José Roberto de Souza Cc: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190916092901.31440-1-jani.nikula@intel.com commit 2032324682c1ca563e33c56e51d9ae17a2b38105 Author: zhong jiang Date: Tue Sep 3 14:15:05 2019 +0800 drm/amdgpu: remove the redundant null checks debugfs_remove and kfree has taken the null check in account. hence it is unnecessary to check it. Just remove the condition. No functional change. This issue was detected by using the Coccinelle software. Signed-off-by: zhong jiang Signed-off-by: Alex Deucher commit 72496eb11734ed7a8420af91f737025dab583af1 Author: Jean Delvare Date: Wed Sep 4 11:13:37 2019 +0200 drm/radeon: be quiet when no SAD block is found It is fine for displays without audio functionality to not provide any SAD block in their EDID. Do not log an error in that case, just return quietly. Inspired by a similar fix to the amdgpu driver in the context of bug fdo#107825: https://bugs.freedesktop.org/show_bug.cgi?id=107825 Signed-off-by: Jean Delvare Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Alex Deucher commit ae2a3495973ef061bf7ee3c43b5d4f2599d622b7 Author: Jean Delvare Date: Wed Sep 4 11:12:48 2019 +0200 drm/amd: be quiet when no SAD block is found It is fine for displays without audio functionality to not provide any SAD block in their EDID. Do not log an error in that case, just return quietly. This fixes half of bug fdo#107825: https://bugs.freedesktop.org/show_bug.cgi?id=107825 Reviewed-by: Harry Wentland Signed-off-by: Jean Delvare Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Cc: Harry Wentland Cc: Leo Li Signed-off-by: Alex Deucher commit 13238d4fa6764fa74dcf863d5f2227765b3753eb Author: Trek Date: Sat Aug 31 21:25:36 2019 +0200 drm/amdgpu: Check for valid number of registers to read Do not try to allocate any amount of memory requested by the user. Instead limit it to 128 registers. Actually the longest series of consecutive allowed registers are 48, mmGB_TILE_MODE0-31 and mmGB_MACROTILE_MODE0-15 (0x2644-0x2673). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=111273 Signed-off-by: Trek Signed-off-by: Alex Deucher commit 80f349ce5572a1392dd4d8d25784378ad2c5f25d Author: Hans de Goede Date: Sat Sep 7 22:32:38 2019 +0200 drm/radeon: Bail earlier when radeon.cik_/si_support=0 is passed Bail from the pci_driver probe function instead of from the drm_driver load function. This avoid /dev/dri/card0 temporarily getting registered and then unregistered again, sending unwanted add / remove udev events to userspace. Specifically this avoids triggering the (userspace) bug fixed by this plymouth merge-request: https://gitlab.freedesktop.org/plymouth/plymouth/merge_requests/59 Note that despite that being an userspace bug, not sending unnecessary udev events is a good idea in general. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1490490 Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede Signed-off-by: Alex Deucher commit 60233044d85a60fff9093b85b3183e199e17be49 Author: Colin Ian King Date: Fri Sep 13 09:02:48 2019 +0100 drm/amd/display: rename variable eanble -> enable There is a spelling mistake in the variable name eanble, rename it to enable. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 3e103fc301560e99913f4b9d48691d77160ed595 Author: Kent Russell Date: Tue Sep 10 15:48:55 2019 -0400 Revert "drm/amdgpu/nbio7.4: add hw bug workaround for vega20" This reverts commit e01f2d41895102d824c6b8f5e011dd5e286d5e8b. VG20 did not require this workaround, as the fix is in the VBIOS. Leave VG10/12 workaround as some older shipped cards do not have the VBIOS fix in place, and the kernel workaround is required in those situations Signed-off-by: Kent Russell Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ec671737f8edfb8edf246afd425fdbed35284b23 Author: Christian König Date: Fri Dec 7 15:18:43 2018 +0100 drm/amdgpu: add graceful VM fault handling v3 Next step towards HMM support. For now just silence the retry fault and optionally redirect the request to the dummy page. v2: make sure the VM is not destroyed while we handle the fault. v3: fix VM destroy check, cleanup comments Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b65709a92156b850840edba9f9932e10c235d44e Author: Christian König Date: Wed Jul 17 09:58:47 2019 +0200 drm/amdgpu: reserve the root PD while freeing PASIDs Free the pasid only while the root PD is reserved. This prevents use after free in the page fault handling. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 061468c405fdf3b518d03bebbeafa0a9dc7300c2 Author: Christian König Date: Mon Sep 16 10:35:53 2019 -0500 drm/amdgpu: allocate PDs/PTs with no_gpu_wait in a page fault While handling a page fault we can't wait for other ongoing GPU operations or we can potentially run into deadlocks. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0f6064d6af94f90032a790072c2070d44ad3a26b Author: Christian König Date: Thu Mar 28 10:53:33 2019 +0100 drm/amdgpu: allow direct submission of clears For handling PD/PT clears directly in the fault handler. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit acb476f541f625e4b016b08c16036b21c6316e9b Author: Christian König Date: Wed Mar 27 13:59:23 2019 +0100 drm/amdgpu: allow direct submission of PTE updates For handling PTE updates directly in the fault handler. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 807e2994092c0bd863c0141c99f5e3f807d4c7f8 Author: Christian König Date: Thu Mar 14 09:10:01 2019 +0100 drm/amdgpu: allow direct submission of PDE updates v2 For handling PDE updates directly in the fault handler. v2: fix typo in comment Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 47ca7efa4c13f8698cddc0b9c96938e7febe9258 Author: Christian König Date: Mon Sep 16 10:33:28 2019 -0500 drm/amdgpu: allow direct submission in the VM backends v2 This allows us to update page tables directly while in a page fault. v2: use direct/delayed entities and still wait for moves Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a2cf324785a6dea0a221f5cdfb945b59d2153eeb Author: Christian König Date: Fri Jul 19 14:41:12 2019 +0200 drm/amdgpu: split the VM entity into direct and delayed For page fault handling we need to use a direct update which can't be blocked by ongoing user CS. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3084cf46cf8110826a42de8c8ef30e8fa48974c2 Author: Christian König Date: Mon Sep 16 10:20:47 2019 -0500 drm/ttm: return -EBUSY on pipelining with no_gpu_wait (v2) Setting the no_gpu_wait flag means that the allocate BO must be available immediately and we can't wait for any GPU operation to finish. v2: squash in mem leak fix, rebase Signed-off-by: Christian König Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 37d212622acbccf0bb281f6e223c497f499b1575 Author: Thierry Reding Date: Thu Jan 11 21:17:30 2018 +0100 drm/prime: Remove duplicate forward declaration struct device is forward-declared twice. Remove the second instance. Reviewed-by: Chris Wilson Reviewed-by: Christian König Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180111201730.30708-1-thierry.reding@gmail.com commit 77df779de742d6616d4ddd177cba152a75259104 Author: Sylvain 'ythier' Hitier Date: Sun Sep 15 11:09:25 2019 +0200 x86/cpu: Clean up intel_tlb_table[] - Remove the unneeded backslash at EOL: that's not a macro. And let's please checkpatch by aligning to open parenthesis. - For 0x4f descriptor, remove " */" from the info field. - For 0xc2 descriptor, sync the beginning of info to match the tlb_type. (The value of info fields could be made more regular, but it's unused by the code and will be read only by developers, so don't bother.) Signed-off-by: Sylvain 'ythier' Hitier Cc: Alex Shi Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Hans de Goede Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Ricardo Neri Cc: Rik van Riel Cc: Thomas Gleixner Cc: trivial@kernel.org Link: https://lkml.kernel.org/r/20190915090917.GA5086@lilas Signed-off-by: Ingo Molnar commit 6817bf283b2b851095825ec7f0e9f10398e09125 Author: Christian König Date: Mon Sep 9 13:57:32 2019 +0200 drm/amdgpu: grab the id mgr lock while accessing passid_mapping Need to make sure that we actually dropping the right fence. Could be done with RCU as well, but to complicated for a fix. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 1b657824681596946bf30a10463cdc70e969786f Author: Jiange Zhao Date: Thu Sep 12 13:18:41 2019 +0800 drm/amdgpu/SRIOV: Navi12 SRIOV VF doesn't load TOC In SRIOV case, the autoload sequence is the same as bare metal, except VF won't load TOC. Signed-off-by: Jiange Zhao Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit a4ac7693f8950b6a9be59dcde42fbe103d714dc7 Author: Jiange Zhao Date: Thu Sep 12 13:15:35 2019 +0800 drm/amdgpu/SRIOV: Navi10/12 VF doesn't support SMU In SRIOV case, SMU and powerplay are handled in HV. VF shouldn't have control over SMU and powerplay. Signed-off-by: Jiange Zhao Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit a90a24d581a919834b75758982ef3117020c0969 Author: Prike Liang Date: Wed Sep 11 13:15:17 2019 +0800 drm/amd/amdgpu: power up sdma engine when S3 resume back The sdma_v4 should be ungated when the IP resume back, otherwise it will hang up and resume time out error. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit b05b69036f7499d7f3cb52554f3e3dad9fefe00c Author: Jiange Zhao Date: Wed Sep 11 17:29:07 2019 +0800 drm/amdgpu: For Navi12 SRIOV VF, register mailbox functions Mailbox functions and interrupts are only for Navi12 VF. Register functions and irqs during initialization. Reviewed-by: Emily Deng Signed-off-by: Jiange Zhao Signed-off-by: Alex Deucher commit 51c0f58e9f6af3a387d14608033e6796a7ad90ee Author: Jack Zhang Date: Tue Sep 10 12:29:14 2019 +0800 drm/amdgpu/sriov: add ring_stop before ring_create in psp v11 code psp v11 code missed ring stop in ring create function(VMR) while psp v3.1 code had the code. This will cause VM destroy1 fail and psp ring create fail. For SIOV-VF, ring_stop should not be deleted in ring_create function. Signed-off-by: Jack Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit f7e3a5776fa6d2d4376c59c7e1d5b3454745c865 Author: Evan Quan Date: Wed Sep 11 19:39:34 2019 +0800 drm/amd/powerplay: check SMU engine readiness before proceeding on S3 resume This is especially needed for non-psp loading way. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0e0b89c0d7cd1d7a53d0e7538a9d07c5692cf04d Author: Evan Quan Date: Wed Sep 11 19:35:45 2019 +0800 drm/amd/powerplay: properly set mp1 state for SW SMU suspend/reset routine Set mp1 state properly for SW SMU suspend/reset routine. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d950800e793cf06a8e261737d2d8b0114ab3351b Author: Felix Kuehling Date: Thu Sep 5 19:22:02 2019 -0400 drm/amdgpu: Fix KFD-related kernel oops on Hawaii Hawaii needs to flush caches explicitly, submitting an IB in a user VMID from kernel mode. There is no s_fence in this case. Fixes: eb3961a57424 ("drm/amdgpu: remove fence context from the job") Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 708901a6664fdc8a39d7946a3995d46eca4fb3e9 Author: Andrey Grodzovsky Date: Tue Sep 10 15:34:16 2019 -0400 drm/amdgpu: Fix mutex lock from atomic context. Problem: amdgpu_ras_reserve_bad_pages was moved to amdgpu_ras_reset_gpu because writing to EEPROM during ASIC reset was unstable. But for ERREVENT_ATHUB_INTERRUPT amdgpu_ras_reset_gpu is called directly from ISR context and so locking is not allowed. Also it's irrelevant for this partilcular interrupt as this is generic RAS interrupt and not memory errors specific. Fix: Avoid calling amdgpu_ras_reserve_bad_pages if not in task context. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 3636169cc0e1cee2de56fe4a122c0ab0922927c5 Author: Jiange Zhao Date: Wed Sep 4 14:42:01 2019 +0800 drm/amdgpu: Add SRIOV mailbox backend for Navi1x Mimic the ones for Vega10, add mailbox backend for Navi1x Reviewed-by: Emily Deng Signed-off-by: Jiange Zhao Signed-off-by: Alex Deucher commit 1a3f2e8c3c1226c93f6dbbf083d24e76e218d8e1 Author: Guchun Chen Date: Wed Sep 11 11:12:17 2019 +0800 drm/amdgpu: implement ras query function for pcie bif ras error query funtionality implementation Signed-off-by: Tao Zhou Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d7b1ed4ac3fc08a1b29be3a9f09b12a8a969d9d0 Author: Guchun Chen Date: Wed Sep 11 11:10:02 2019 +0800 drm/amdgpu: add pcie bif ras related registers These registers will be accessed for querying ras errors. Signed-off-by: Tao Zhou Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d7bd680d4047921b18fd90480c577a38178ed09d Author: Guchun Chen Date: Wed Sep 11 11:07:15 2019 +0800 drm/amdgpu: support pcie bif ras query and inject Call pcie bif ras query/inject in amdgpu ras. Signed-off-by: Tao Zhou Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 52652ef286358a8e18d2ffb2f18e665d6f5f4a7a Author: Guchun Chen Date: Wed Sep 4 14:58:54 2019 +0800 drm/amdgpu: add ras error query count interface for nbio Add the interface query_ras_error_count for nbio. Signed-off-by: Tao Zhou Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ff9d09719359a9afe46abf58fa9064893423651c Author: Tianci.Yin Date: Tue Sep 10 16:54:14 2019 +0800 drm/amdgpu: fix CPDMA hang in PRT mode for VEGA10 add and_mask since the programming logic of golden setting changed Reviewed-by: Tao Zhou Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit f31703528863d6748631c953426a75450f250850 Author: Hawking Zhang Date: Sun Sep 8 09:09:15 2019 +0800 drm/amdgpu: enable error injection to XGMI block via debugfs allow inject error to XGMI block via debugfs node ras_ctrl Signed-off-by: Hawking Zhang Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 029fbd437eb6a8cd20d983bdbf0037a9417ef2ee Author: Hawking Zhang Date: Tue Sep 10 11:13:39 2019 +0800 drm/amdgpu: initialize ras structures for xgmi block (v2) init ras common interface and fs node for xgmi block v2: remove unnecessary physical node number check before invoking amdgpu_xgmi_ras_late_init Signed-off-by: Hawking Zhang Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit acb9acbefef234bd0904e298b4c93732e1a8d6f4 Author: Huang Rui Date: Tue Sep 10 19:10:42 2019 +0800 drm/amdkfd: fix the missed asic name while inited renoir_device_info This patch fixes null pointer issue below, I missed to init the asic renior name while I rebase the patches. [ 106.004250] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 106.004254] #PF: supervisor read access in kernel mode [ 106.004256] #PF: error_code(0x0000) - not-present page [ 106.004257] PGD 0 P4D 0 [ 106.004261] Oops: 0000 [#1] SMP NOPTI [ 106.004264] CPU: 3 PID: 1422 Comm: modprobe Not tainted 5.2.0-rc1-custom #1 [ 106.004266] Hardware name: AMD Celadon-RN/Celadon-RN, BIOS WCD9814N_Weekly_19_08_1 08/14/2019 [ 106.004272] RIP: 0010:strncpy+0x12/0x30 [ 106.004274] Code: c1 c0 11 48 c1 c6 15 48 31 d0 48 c1 c2 20 31 c2 89 d0 31 f0 41 5c 5d c3 55 48 85 d2 48 89 f8 48 89 e5 74 1e 48 01 fa 48 89 f9 <44> 0f b6 06 41 80 f8 01 44 88 01 48 83 de ff 48 83 c1 01 48 39 d1 [ 106.004278] RSP: 0018:ffffc092c1fd37a8 EFLAGS: 00010286 [ 106.004281] RAX: ffff9e943466a28c RBX: 00000000000036ed RCX: ffff9e943466a28c [ 106.004283] RDX: ffff9e943466a2ac RSI: 0000000000000000 RDI: ffff9e943466a28c [ 106.004285] RBP: ffffc092c1fd37a8 R08: ffff9e943d100000 R09: 0000000000000228 [ 106.004287] R10: ffff9e94418dc5a8 R11: ffff9e944746c0d0 R12: 0000000000000000 [ 106.004289] R13: ffff9e943fa1ec00 R14: ffff9e943466a200 R15: ffff9e943466a200 [ 106.004291] FS: 00007f7a022c5540(0000) GS:ffff9e9447ac0000(0000) knlGS:0000000000000000 [ 106.004294] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 106.004296] CR2: 0000000000000000 CR3: 00000001ff0b0000 CR4: 0000000000340ee0 [ 106.004298] Call Trace: [ 106.004382] kfd_topology_add_device+0x150/0x610 [amdgpu] [ 106.004445] kgd2kfd_device_init+0x2e0/0x4f0 [amdgpu] [ 106.004509] amdgpu_amdkfd_device_init+0x14c/0x1b0 [amdgpu] Signed-off-by: Huang Rui Reviewed-and-Tested-by: Aaron Liu Signed-off-by: Alex Deucher commit d1082e23eede4f5cd75c90fb93cbb46633f4a737 Author: Bhawanpreet Lakha Date: Fri Sep 6 16:32:44 2019 -0400 drm/amd/display: Implement voltage limitation for dali [Why] we only want the lowest voltage to be available for dali. [How] Use the get_highest_allowed_voltage_level function to return 0 for dali Signed-off-by: Bhawanpreet Lakha Reviewed-by: Huang Rui Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit c4cacce7850042ad6b65d518d47497c0ae70c8b6 Author: Bhawanpreet Lakha Date: Fri Sep 6 16:31:21 2019 -0400 drm/amd/display: add Asic ID for Dali Dali is a new asic revision based on raven2 Add the ID and ASICREV_IS_DALI define Signed-off-by: Bhawanpreet Lakha Reviewed-by: Huang Rui Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 084fe13b2c232c8f3e6e926597dd6daf1fda4d1b Author: Andrey Grodzovsky Date: Mon Sep 9 16:00:56 2019 -0400 drm/amdgpu: Allow to reset to EERPOM table. The table grows quickly during debug/development effort when multiple RAS errors are injected. Allow to avoid this by setting table header back to empty if needed. v2: Switch to debugfs entry instead of load time parameter. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit d01b400b1aaeb37eb28a1df22f548309ab35d482 Author: Andrey Grodzovsky Date: Mon Sep 9 15:59:45 2019 -0400 drm/amdgpu: Add amdgpu_ras_eeprom_reset_table This will allow to reset the table on the fly. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit d99659a062316bc95269a52f2428a7ad96ee4315 Author: Tao Zhou Date: Fri Sep 6 14:32:14 2019 +0800 drm/amdgpu: rename umc ras_init to err_cnt_init this interface is related to specific version of umc, distinguish it from ras_late_init Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 4930aabe7c4e72cc62eca2a800e72eee17f40430 Author: Tao Zhou Date: Thu Sep 5 19:25:18 2019 +0800 drm/amdgpu: move umc ras init to umc block move umc ras init from ras module to umc block, generic ras module should pay less attention to specific ras block. Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 86edcc7dba53995ea9448e535d7eb21dff5245d0 Author: Tao Zhou Date: Thu Sep 5 19:16:19 2019 +0800 drm/amdgpu: move umc late init from gmc to umc block umc late init is umc specific, it's more suitable to be put in umc block Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 1bd252c57b0b3780694b60a42b403d5fd8265780 Author: Guchun Chen Date: Tue Sep 10 16:23:53 2019 +0800 drm/amdgpu: remove duplicated header file include amdgpu_ras.h is already included. Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit a35ad98bf9d37bdcb46d918edebf87334bfad321 Author: Shirish S Date: Thu Sep 12 12:03:55 2019 +0530 drm/amdgpu: remove needless usage of #ifdef define sched_policy in case CONFIG_HSA_AMD is not enabled, with this there is no need to check for CONFIG_HSA_AMD else where in driver code. Suggested-by: Felix Kuehling Signed-off-by: Shirish S Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8c9f69bc5cc40ca949a9f0b12e05d81bb5a9f446 Author: Shirish S Date: Tue Sep 10 12:45:01 2019 +0530 drm/amdgpu: fix build error without CONFIG_HSA_AMD If CONFIG_HSA_AMD is not set, build fails: drivers/gpu/drm/amd/amdgpu/amdgpu_device.o: In function `amdgpu_device_ip_early_init': drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1626: undefined reference to `sched_policy' Use CONFIG_HSA_AMD to guard this. Fixes: 1abb680ad371 ("drm/amdgpu: disable gfxoff while use no H/W scheduling policy") Signed-off-by: Shirish S Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 38750f03030a40976524295b8a8facfda2a5f393 Author: Evan Quan Date: Fri Sep 6 10:08:32 2019 +0800 drm/amd/powerplay: update smu11_driver_if_arcturus.h Also bump the SMU11_DRIVER_IF_VERSION_ARCT. Signed-off-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 04c572a0df02892f29625a1d4e2bc1e65b741cf2 Author: Evan Quan Date: Thu Sep 5 12:22:42 2019 +0800 drm/amd/powerplay: issue DC-BTC for arcturus on SMU init Need to perform DC-BTC for arcturus on bootup. Signed-off-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 4d1337d2e96715b7882fd75658e54ab59b3f58cd Author: Andrey Grodzovsky Date: Fri Sep 6 17:23:44 2019 -0400 drm/amdgpu: Avoid RAS recovery init when no RAS support. Fixes driver load regression on APUs. Signed-off-by: Andrey Grodzovsky Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit cbfae36ceac95d0a68e679e98a36632e04f18f1f Author: Christian König Date: Mon Sep 2 16:39:40 2019 +0200 drm/amdgpu: cleanup PTE flag generation v3 Move the ASIC specific code into a new callback function. v2: mask the flags for SI and CIK instead of a BUG_ON(). v3: remove last missed BUG_ON(). Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 71776b6daef66b6d7afdd404c2175dbcac7e1a05 Author: Christian König Date: Mon Sep 2 14:52:30 2019 +0200 drm/amdgpu: cleanup mtype mapping Unify how we map the UAPI flags to the PTE hardware flags for a mapping. Only the MTYPE is actually ASIC dependent, all other flags should be copied over 1 to 1 and ASIC differences are handled later on. Signed-off-by: Christian König Signed-off-by: Alex Deucher commit 1dd077bbbaacc1302e510871669dc62ee1ef0f70 Author: Tianci.Yin Date: Thu Sep 5 15:28:57 2019 +0800 drm/amdgpu: add navi14 PCI ID for work station SKU Add the navi14 PCI device id. Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 75a8957f808d7423b640b6c00c527cf655ac5bfd Author: Prike Liang Date: Fri Sep 6 15:13:03 2019 +0800 drm/amd/powerplay: Add the interface for geting dpm current power state implement the sysfs power_dpm_state Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit cde85ac247841d3dda4e907e1d31ba4eaf0ff7c4 Author: Philip Yang Date: Fri Sep 6 13:20:40 2019 -0400 drm/amdgpu: check if nbio->ras_if exist To avoid NULL function pointer access. This happens on VG10, reboot command hangs and have to power off/on to reboot the machine. This is serial console log: [ OK ] Reached target Unmount All Filesystems. [ OK ] Reached target Final Step. Starting Reboot... [ 305.696271] systemd-shutdown[1]: Syncing filesystems and block devices. [ 306.947328] systemd-shutdown[1]: Sending SIGTERM to remaining processes... [ 306.963920] systemd-journald[1722]: Received SIGTERM from PID 1 (systemd-shutdow). [ 307.322717] systemd-shutdown[1]: Sending SIGKILL to remaining processes... [ 307.336472] systemd-shutdown[1]: Unmounting file systems. [ 307.454202] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro [ 307.480523] systemd-shutdown[1]: All filesystems unmounted. [ 307.486537] systemd-shutdown[1]: Deactivating swaps. [ 307.491962] systemd-shutdown[1]: All swaps deactivated. [ 307.497624] systemd-shutdown[1]: Detaching loop devices. [ 307.504418] systemd-shutdown[1]: All loop devices detached. [ 307.510418] systemd-shutdown[1]: Detaching DM devices. [ 307.565907] sd 2:0:0:0: [sda] Synchronizing SCSI cache [ 307.731313] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 307.738802] #PF: supervisor read access in kernel mode [ 307.744326] #PF: error_code(0x0000) - not-present page [ 307.749850] PGD 0 P4D 0 [ 307.752568] Oops: 0000 [#1] SMP PTI [ 307.756314] CPU: 3 PID: 1 Comm: systemd-shutdow Not tainted 5.2.0-rc1-kfd-yangp #453 [ 307.764644] Hardware name: ASUS All Series/Z97-PRO(Wi-Fi ac)/USB 3.1, BIOS 9001 03/07/2016 [ 307.773580] RIP: 0010:soc15_common_hw_fini+0x33/0xc0 [amdgpu] [ 307.779760] Code: 89 fb e8 60 f5 ff ff f6 83 50 df 01 00 04 75 3d 48 8b b3 90 7d 00 00 48 c7 c7 17 b8 530 [ 307.799967] RSP: 0018:ffffac9483153d40 EFLAGS: 00010286 [ 307.805585] RAX: 0000000000000000 RBX: ffff9eb299da0000 RCX: 0000000000000006 [ 307.813261] RDX: 0000000000000000 RSI: ffff9eb29e3508a0 RDI: ffff9eb29e350000 [ 307.820935] RBP: ffff9eb299da0000 R08: 0000000000000000 R09: 0000000000000000 [ 307.828609] R10: 0000000000000000 R11: 0000000000000000 R12: ffff9eb299dbd1f8 [ 307.836284] R13: ffffffffc04f8368 R14: ffff9eb29cebd130 R15: 0000000000000000 [ 307.843959] FS: 00007f06721c9940(0000) GS:ffff9eb2a18c0000(0000) knlGS:0000000000000000 [ 307.852663] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 307.858842] CR2: 0000000000000000 CR3: 000000081d798005 CR4: 00000000001606e0 [ 307.866516] Call Trace: [ 307.869169] amdgpu_device_ip_suspend_phase2+0x80/0x110 [amdgpu] [ 307.875654] ? amdgpu_device_ip_suspend_phase1+0x4d/0xd0 [amdgpu] [ 307.882230] amdgpu_device_ip_suspend+0x2e/0x60 [amdgpu] [ 307.887966] amdgpu_pci_shutdown+0x2f/0x40 [amdgpu] [ 307.893211] pci_device_shutdown+0x31/0x60 [ 307.897613] device_shutdown+0x14c/0x1f0 [ 307.901829] kernel_restart+0xe/0x50 [ 307.905669] __do_sys_reboot+0x1df/0x210 [ 307.909884] ? task_work_run+0x73/0xb0 [ 307.913914] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 307.918970] do_syscall_64+0x4a/0x1c0 [ 307.922904] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 307.928336] RIP: 0033:0x7f0671cf8373 [ 307.932176] Code: 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 89 fa be 69 19 128 [ 307.952384] RSP: 002b:00007ffdd1723d68 EFLAGS: 00000202 ORIG_RAX: 00000000000000a9 [ 307.960527] RAX: ffffffffffffffda RBX: 0000000001234567 RCX: 00007f0671cf8373 [ 307.968201] RDX: 0000000001234567 RSI: 0000000028121969 RDI: 00000000fee1dead [ 307.975875] RBP: 00007ffdd1723dd0 R08: 0000000000000000 R09: 0000000000000000 [ 307.983550] R10: 0000000000000002 R11: 0000000000000202 R12: 00007ffdd1723dd8 [ 307.991224] R13: 0000000000000000 R14: 0000001b00000004 R15: 00007ffdd17240c8 [ 307.998901] Modules linked in: xt_MASQUERADE nfnetlink iptable_nat xt_addrtype xt_conntrack nf_nat nf_cos [ 308.026505] CR2: 0000000000000000 [ 308.039998] RIP: 0010:soc15_common_hw_fini+0x33/0xc0 [amdgpu] [ 308.046180] Code: 89 fb e8 60 f5 ff ff f6 83 50 df 01 00 04 75 3d 48 8b b3 90 7d 00 00 48 c7 c7 17 b8 530 [ 308.066392] RSP: 0018:ffffac9483153d40 EFLAGS: 00010286 [ 308.072013] RAX: 0000000000000000 RBX: ffff9eb299da0000 RCX: 0000000000000006 [ 308.079689] RDX: 0000000000000000 RSI: ffff9eb29e3508a0 RDI: ffff9eb29e350000 [ 308.087366] RBP: ffff9eb299da0000 R08: 0000000000000000 R09: 0000000000000000 [ 308.095042] R10: 0000000000000000 R11: 0000000000000000 R12: ffff9eb299dbd1f8 [ 308.102717] R13: ffffffffc04f8368 R14: ffff9eb29cebd130 R15: 0000000000000000 [ 308.110394] FS: 00007f06721c9940(0000) GS:ffff9eb2a18c0000(0000) knlGS:0000000000000000 [ 308.119099] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 308.125280] CR2: 0000000000000000 CR3: 000000081d798005 CR4: 00000000001606e0 [ 308.135304] printk: systemd-shutdow: 3 output lines suppressed due to ratelimiting [ 308.143518] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 [ 308.151798] Kernel Offset: 0x15000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xff) [ 308.171775] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 ]--- Signed-off-by: Philip Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit bfa603aa5e6b40641442b2d67bab39ee2dbfb140 Author: Xiaojie Yuan Date: Thu Sep 5 16:50:22 2019 +0800 drm/amdgpu: fix null pointer deref in firmware header printing v2: declare as (struct common_firmware_header *) type because struct xxx_firmware_header inherits from it When CE's ucode_id(8) is used to get sdma_hdr, we will be accessing an unallocated amdgpu_firmware_info instance. This issue appears on rhel7.7 with gcc 4.8.5. Newer compilers might have optimized out such 'defined but not referenced' variable. [ 1120.798564] BUG: unable to handle kernel NULL pointer dereference at 000000000000000a [ 1120.806703] IP: [] psp_np_fw_load+0x1e3/0x390 [amdgpu] [ 1120.813693] PGD 80000002603ff067 PUD 271b8d067 PMD 0 [ 1120.818931] Oops: 0000 [#1] SMP [ 1120.822245] Modules linked in: amdgpu(OE+) amdkcl(OE) amd_iommu_v2 amdttm(OE) amd_sched(OE) xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun bridge stp llc devlink ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat iptable_mangle iptable_security iptable_raw nf_conntrack libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter sunrpc dm_mirror dm_region_hash dm_log dm_mod intel_pmc_core intel_powerclamp coretemp intel_rapl joydev kvm_intel eeepc_wmi asus_wmi kvm sparse_keymap iTCO_wdt irqbypass rfkill crc32_pclmul snd_hda_codec_realtek mxm_wmi ghash_clmulni_intel intel_wmi_thunderbolt iTCO_vendor_support snd_hda_codec_generic snd_hda_codec_hdmi aesni_intel lrw gf128mul glue_helper ablk_helper sg cryptd pcspkr snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd pinctrl_sunrisepoint pinctrl_intel soundcore acpi_pad mei_me wmi mei i2c_i801 pcc_cpufreq ip_tables ext4 mbcache jbd2 sd_mod crc_t10dif crct10dif_generic i915 i2c_algo_bit iosf_mbi drm_kms_helper e1000e syscopyarea sysfillrect sysimgblt fb_sys_fops ahci libahci drm ptp libata crct10dif_pclmul crct10dif_common crc32c_intel serio_raw pps_core drm_panel_orientation_quirks video i2c_hid [ 1120.954136] CPU: 4 PID: 2426 Comm: modprobe Tainted: G OE ------------ 3.10.0-1062.el7.x86_64 #1 [ 1120.964390] Hardware name: System manufacturer System Product Name/Z170-A, BIOS 1302 11/09/2015 [ 1120.973321] task: ffff991ef1e3c1c0 ti: ffff991ee625c000 task.ti: ffff991ee625c000 [ 1120.981020] RIP: 0010:[] [] psp_np_fw_load+0x1e3/0x390 [amdgpu] [ 1120.990483] RSP: 0018:ffff991ee625f950 EFLAGS: 00010202 [ 1120.995935] RAX: 0000000000000002 RBX: ffff991edf6b2d38 RCX: ffff991edf6a0000 [ 1121.003391] RDX: 0000000000000000 RSI: ffff991f01d13898 RDI: ffffffffc110afb3 [ 1121.010706] RBP: ffff991ee625f9b0 R08: 0000000000000000 R09: 0000000000000000 [ 1121.018029] R10: 00000000000004c4 R11: ffff991ee625f64e R12: ffff991edf6b3220 [ 1121.025353] R13: ffff991edf6a0000 R14: 0000000000000008 R15: ffff991edf6b2d30 [ 1121.032666] FS: 00007f97b0c0b740(0000) GS:ffff991f01d00000(0000) knlGS:0000000000000000 [ 1121.041000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1121.046880] CR2: 000000000000000a CR3: 000000025e604000 CR4: 00000000003607e0 [ 1121.054239] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1121.061631] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1121.068938] Call Trace: [ 1121.071494] [] psp_hw_init+0x218/0x270 [amdgpu] [ 1121.077886] [] amdgpu_device_fw_loading+0xe8/0x160 [amdgpu] [ 1121.085296] [] ? vega10_ih_irq_init+0x4bc/0x730 [amdgpu] [ 1121.092534] [] amdgpu_device_init+0x1495/0x1c90 [amdgpu] [ 1121.099675] [] amdgpu_driver_load_kms+0x8b/0x2f0 [amdgpu] [ 1121.106888] [] drm_dev_register+0x12f/0x1d0 [drm] [ 1121.113419] [] ? pci_enable_device_flags+0xe8/0x140 [ 1121.120183] [] amdgpu_pci_probe+0xca/0x170 [amdgpu] [ 1121.126919] [] local_pci_probe+0x4a/0xb0 [ 1121.132622] [] pci_device_probe+0x109/0x160 [ 1121.138607] [] driver_probe_device+0xc5/0x3e0 [ 1121.144766] [] __driver_attach+0x93/0xa0 [ 1121.150507] [] ? __device_attach+0x50/0x50 [ 1121.156422] [] bus_for_each_dev+0x75/0xc0 [ 1121.162213] [] driver_attach+0x1e/0x20 [ 1121.167771] [] bus_add_driver+0x200/0x2d0 [ 1121.173590] [] driver_register+0x64/0xf0 [ 1121.179345] [] __pci_register_driver+0xa5/0xc0 [ 1121.185593] [] ? 0xffffffffc099efff [ 1121.190914] [] amdgpu_init+0xa4/0xb0 [amdgpu] [ 1121.197101] [] do_one_initcall+0xba/0x240 [ 1121.202901] [] load_module+0x271a/0x2bb0 [ 1121.208598] [] ? ddebug_proc_write+0x100/0x100 [ 1121.214894] [] SyS_init_module+0xef/0x140 [ 1121.220698] [] system_call_fastpath+0x25/0x2a [ 1121.226870] Code: b4 01 60 a2 00 00 31 c0 e8 83 60 33 e4 41 8b 47 08 48 8b 4d d0 48 c7 c7 b3 af 10 c1 48 69 c0 68 07 00 00 48 8b 84 01 60 a2 00 00 <48> 8b 70 08 31 c0 48 89 75 c8 e8 56 60 33 e4 48 8b 4d d0 48 c7 [ 1121.247422] RIP [] psp_np_fw_load+0x1e3/0x390 [amdgpu] [ 1121.254432] RSP [ 1121.258017] CR2: 000000000000000a [ 1121.261427] ---[ end trace e98b35387ede75bd ]--- Signed-off-by: Xiaojie Yuan Fixes: c5fb912653dae3f878 ("drm/amdgpu: add firmware header printing for psp fw loading (v2)") Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 4042a188725c9b3ea725e5bffb55fbc4ba1e4943 Author: Huang Rui Date: Mon Sep 2 22:35:37 2019 +0800 drm/amdkfd: enable renoir while device probes This patch is to add asic flag to enable device probe during kfd init. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit aa978594cf7fa0ad91d0671bb1a33ec38fbd3d25 Author: Huang Rui Date: Mon Sep 2 23:34:32 2019 +0800 drm/amdgpu: disable gfxoff while use no H/W scheduling policy While gfxoff is enabled, the mmVM_XXX registers will be 0xfffffff while the GFX is in "off" state. KFD queue creattion doesn't use ring based method, so it will trigger a VM fault. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit f5d843d4ea3b8738a42a4b22432ce95f1df7ca51 Author: Huang Rui Date: Mon Sep 2 23:25:29 2019 +0800 drm/amdkfd: add renoir kfd topology This patch adds renoir kfd topology which is the same with Raven. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 444d4f5fd3ff49ae9076d497793bf837078efe2a Author: Huang Rui Date: Mon Sep 2 23:24:29 2019 +0800 drm/amdkfd: add package manager for renoir Renoir use GFX v9, so adds v9 package manager. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 59a6fc1aef27c35a68f8b9e1f1e05923de567d82 Author: Huang Rui Date: Mon Sep 2 23:19:38 2019 +0800 drm/amdkfd: init kernel queue for renoir Renoir is GFX v9, so init v9 kernel queue. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4d85488cd9df694cf36d67040e711a09d0e0f6b7 Author: Huang Rui Date: Mon Sep 2 23:15:46 2019 +0800 drm/amdkfd: init kfd apertures v9 for renoir Renoir is GMC v9, so init v9 kfd apertures. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 514e5e7e60f5adf4efb14d36e5bebf71f9b2ed73 Author: Huang Rui Date: Mon Sep 2 23:13:26 2019 +0800 drm/amdkfd: add renoir type for the workaround of iommu v2 (v2) Renoir is the same with Raven, will enable iommu event in future. v2: fix the checking (Thong) Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5a959a8988d83f24ed1b854154f2a5c0bf189560 Author: Huang Rui Date: Mon Sep 2 23:10:52 2019 +0800 drm/amdkfd: enable kfd device queue manager v9 for renoir Renoir is GFX9, so enable v9 devcie queue manager. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2b9c2211197634221b9ba05cddc938c8fdfee2c8 Author: Huang Rui Date: Mon Sep 2 23:06:58 2019 +0800 drm/amdkfd: add renoir kfd device info (v2) This patch inits renoir kfd device info, so we treat renoir as "dgpu" (bypass iommu v2). Will enable needs_iommu_device till renoir iommu is ready. v2: rebase and align the drm-next Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a8d42f174d30ca05a31ebea7b5b1b09abd992431 Author: Huang Rui Date: Mon Sep 2 22:59:01 2019 +0800 drm/amdkfd: add renoir cache info for CRAT (v2) Renoir's cache info should be the same with raven and carrizo's. v2: fix missed "break" Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8099ae40d8664e4cc9d7ddadee28bd5c6226a362 Author: Yong Zhao Date: Tue Aug 13 17:13:27 2019 -0400 drm/amdkfd: Support Navi14 in KFD Initial support of Navi14 in KFD. The device IDs will be added later. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7cae706193649460046c5134cf3b9acf678df8c1 Author: Felix Kuehling Date: Wed Sep 4 19:26:16 2019 -0400 drm/amdgpu: Disable retry faults in VMID0 There is no point retrying page faults in VMID0. Those faults are always fatal. Signed-off-by: Felix Kuehling Reviewed-and-Tested-by: Huang Rui Signed-off-by: Alex Deucher commit 4e66d7d2156243bf6866fc83cda0c4b115627e6d Author: Yong Zhao Date: Fri Aug 30 18:09:10 2019 -0400 drm/amdgpu: Add a kernel parameter for specifying the asic type As more and more new asics start to reuse the old device IDs before launch, there is a need to quickly override the existing asic type corresponding to the reused device ID through a kernel parameter. With this, engineers no longer need to rely on local hack patches, facilitating cooperation across teams. Signed-off-by: Yong Zhao Signed-off-by: Alex Deucher commit bb42eda28407f62288398b4ef846ae64c98cdc73 Author: Alex Deucher Date: Sun Sep 1 12:31:42 2019 -0500 drm/amdgpu/irq: check if nbio funcs exist We need to check if the nbios funcs exist before checking the individual pointers. Signed-off-by: Alex Deucher Reviewed-by: Hawking Zhang commit 18ec1eaf58fbf2d9009a752a102a3d8e0d905a0f Author: Kirill A. Shutemov Date: Fri Sep 13 12:54:52 2019 +0300 x86/mm: Enable 5-level paging support by default Support of boot-time switching between 4- and 5-level paging mode is upstream since 4.17. We run internal testing with 5-level paging support enabled for a while and it doesn't not cause any functional or performance regression on 4-level paging hardware. The only 5-level paging related regressions I saw were in early boot code that runs independently from CONFIG_X86_5LEVEL. The next major release of distributions expected to have CONFIG_X86_5LEVEL=y. Enable the option by default. It may help to catch obscure bugs early. Signed-off-by: Kirill A. Shutemov Acked-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: https://lkml.kernel.org/r/20190913095452.40592-1-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar commit 3b92198d6c279971069b86badaea73f626722cc3 Author: Benjamin Gaignard Date: Wed Sep 11 10:47:59 2019 +0200 drm: fix warnings in DSC Remove always false comparisons due to limited range of nfl_bpg_offset and scale_increment_interval fields. Warnings detected when compiling with W=1. Signed-off-by: Benjamin Gaignard Reviewed-by: Harry Wentland Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20190911084759.6946-1-benjamin.gaignard@st.com commit 5dec1affe0fa4c59fe02e5b5ec99c9cf8d2ca351 Author: Benjamin Gaignard Date: Mon Sep 9 12:12:53 2019 +0200 drm: sti: fix W=1 warnings Fix warnings when W=1. No code changes, only clean up in sti internal structures and functions descriptions. Signed-off-by: Benjamin Gaignard Reviewed-by: Benjamin Gaignard Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20190909101254.24191-1-benjamin.gaignard@st.com commit 1e6962041c7a368de8227c90469fdddff31f19de Author: Yannick Fertré Date: Thu Sep 12 10:56:29 2019 +0200 drm/stm: dsi: higher pll out only in video burst mode In order to better support video non-burst modes, the +20% on pll out is added only in burst mode. Signed-off-by: Philippe Cornu Signed-off-by: Yannick Fertré Reviewed-by: Yannick Fertré Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1568278589-20400-1-git-send-email-yannick.fertre@st.com commit 2e7f76c1e4b6480226cee3f6e358172891012882 Author: Ville Syrjälä Date: Fri Sep 13 22:31:57 2019 +0300 drm/i915: s/pipe_config/crtc_state/ in intel_crtc_atomic_check() Clean up the mess with the drm vs. intel types in intel_crtc_atomic_check() and rename varibles accordingly. Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190913193157.9556-5-ville.syrjala@linux.intel.com commit fe4709a8d033975a328a665a627acd35e628117a Author: Ville Syrjälä Date: Fri Sep 13 22:31:56 2019 +0300 drm/i915: Extract intel_modeset_calc_cdclk() Exfiltrate the cdclk code from intel_modeset_checks() into intel_modeset_calc_cdclk(). Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190913193157.9556-4-ville.syrjala@linux.intel.com commit 76c36a4391641aa37ce7adede32d511a07450d5a Author: Ville Syrjälä Date: Fri Sep 13 22:31:55 2019 +0300 drm/i915: Allow downscale factor of <3.0 on glk+ for all formats Bspec says that glk+ max downscale factor is <3.0 for all pixel formats. Older platforms had a max of <2.0 for NV12. Update the code to deal with this. Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190913193157.9556-3-ville.syrjala@linux.intel.com commit d1d23d7f4be6a619af4ab729a12856e9cbded985 Author: Ville Syrjälä Date: Fri Sep 13 22:31:54 2019 +0300 drm/i915: Replace is_planar_yuv_format() with drm_format_info_is_yuv_semiplanar() There's a helper in drm_fourcc.h these days to check of we're dealing with a two plane YUV format. Make use if it. Also s/plane/color_plane/ in skl_plane_relative_data_rate() to reduce the confusion. Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190913193157.9556-2-ville.syrjala@linux.intel.com commit 2f932367d219ad4ce56278035a1ee1ca03c48308 Author: Brian Masney Date: Wed Aug 14 20:48:47 2019 -0400 drm/bridge: analogix-anx78xx: convert to i2c_new_dummy_device The i2c_new_dummy() function is deprecated since it returns NULL on error. Change this to use the recommended replacement i2c_new_dummy_device() that returns an error code that can be read with PTR_ERR() and friends. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190815004854.19860-5-masneyb@onstation.org commit 2708e876272d89bbbff811d12834adbeef85f022 Author: Brian Masney Date: Wed Aug 14 20:48:46 2019 -0400 drm/bridge: analogix-anx78xx: silence -EPROBE_DEFER warnings Silence two warning messages that occur due to -EPROBE_DEFER errors to help cleanup the system boot log. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190815004854.19860-4-masneyb@onstation.org commit 0273831882c5215f49628dcb3cb567b67cd7af39 Author: Brian Masney Date: Wed Aug 14 20:48:45 2019 -0400 drm/bridge: analogix-anx78xx: add new variants Add support for the 7808 variant. While we're here, the of match table was missing support for the 7812 and 7818 variants, so add them as well. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190815004854.19860-3-masneyb@onstation.org commit 2fb658a603bab4e41834a4f32475bbea9c01cf46 Author: Brian Masney Date: Wed Aug 14 20:48:44 2019 -0400 dt-bindings: drm/bridge: analogix-anx78xx: add new variants Add support for the analogix,anx7808, analogix,anx7812, and analogix,anx7818 variants. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190815004854.19860-2-masneyb@onstation.org commit a2b69ea4d26d1077b00924ff34e46b28d997aae2 Author: Jani Nikula Date: Fri Sep 13 13:04:07 2019 +0300 drm/i915: introduce INTEL_DISPLAY_ENABLED() Prepare for making a distinction between not having display and having disabled display. Add INTEL_DISPLAY_ENABLED() and use it where HAS_DISPLAY() is used after intel_device_info_runtime_init(). This is initially duplication, as disabling display still leads to ->pipe_mask = 0 and HAS_DISPLAY() being false. Note that ever since i915.display_disable was introduced, it has not affected PCH detection even if it uses HAS_DISPLAY(), as display disable happens after that. Since INTEL_DISPLAY_ENABLED() will not make sense unless HAS_DISPLAY() is true, include a warning for catching misuses making decisions on INTEL_DISPLAY_ENABLED() when HAS_DISPLAY() is false. v2: Remove INTEL_DISPLAY_ENABLED() check from intel_detect_pch() (Chris) Cc: Chris Wilson Cc: José Roberto de Souza Cc: Ville Syrjälä Reviewed-by: José Roberto de Souza Acked-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190913100407.30991-1-jani.nikula@intel.com commit 505ea3ada665c466d0064b11b6e611b7f995517d Author: Andrea Merello Date: Mon Sep 9 14:58:17 2019 +0200 iio: max31856: add missing of_node and parent references to iio_dev Adding missing indio_dev->dev.of_node references so that, in case multiple max31856 are present, users can get some clues to being able to distinguish each of them. While at it, add also the missing parent reference. Signed-off-by: Andrea Merello Signed-off-by: Jonathan Cameron commit 22ea565110731e48d9434d029df4f62c94df0a89 Author: Lorenzo Bianconi Date: Wed Sep 11 08:50:04 2019 +0200 iio: imu: st_lsm6dsx: enable clear on read for latched interrupts Enable clear on read feature for latched interrupts. This bit allows immediately clearing the latched interrupts of an event detection upon the read of the corresponding status register. It must be set to 1 together with LIR. This feature is available just on LSM6DS0/LSM6DSR/ASM330LHH Signed-off-by: Lorenzo Bianconi Tested-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit 9db02d32b8eedb4441f79cb2a1696344060c1b78 Author: Lorenzo Bianconi Date: Wed Sep 11 08:50:03 2019 +0200 iio: imu: st_lsm6dsx: enable LIR for sensor events Enable Latched interrupt by default for sensor events Signed-off-by: Lorenzo Bianconi Tested-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit c270bbf7bb9ddc4e2a51b3c56557c377c9ac79bc Author: Andrea Merello Date: Thu Sep 12 16:43:07 2019 +0200 iio: ad7949: kill pointless "readback"-handling code The device could be configured to spit out also the configuration word while reading the AD result value (in the same SPI xfer) - this is called "readback" in the device datasheet. The driver checks if readback is enabled and it eventually adjusts the SPI xfer length and it applies proper shifts to still get the data, discarding the configuration word. The readback option is actually never enabled (the driver disables it), so the said checks do not serve for any purpose. Since enabling the readback option seems not to provide any advantage (the driver entirely sets the configuration word without relying on any default value), just kill the said, unused, code. Signed-off-by: Andrea Merello Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 5a56c518c4d22c2b909eff6b18c7e40e1642c53d Author: Rohit Sarkar Date: Sat Sep 14 02:06:27 2019 +0530 staging: iio: ADIS16240: Remove unused include '#include' isn't being used anywhere. Remove it. Signed-off-by: Rohit Sarkar Signed-off-by: Jonathan Cameron commit f552fde983d378e7339f9ea74a25f918563bf0d3 Author: Krzysztof Wilczynski Date: Fri Sep 13 22:24:13 2019 +0200 iio: light: bh1750: Resolve compiler warning and make code more readable Separate the declaration of struct bh1750_chip_info from definition of bh1750_chip_info_tbl[] in a single statement as it makes the code hard to read, and with the extra newline it makes it look as if the bh1750_chip_info_tbl[] had no explicit type. This change also resolves the following compiler warning about the unusual position of the static keyword that can be seen when building with warnings enabled (W=1): drivers/iio/light/bh1750.c:64:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] Related to commit 3a11fbb037a1 ("iio: light: add support for ROHM BH1710/BH1715/BH1721/BH1750/BH1751 ambient light sensors"). Signed-off-by: Krzysztof Wilczynski Acked-by: Uwe Kleine-König Signed-off-by: Jonathan Cameron commit dabeea6427dfb03ecc8bbefc4f76e976ab7a8148 Author: Qingqing Zhuo Date: Thu Aug 22 15:28:26 2019 -0400 drm/amd/display: replace FIXME with TODO Signed-off-by: Qingqing Zhuo Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit b131932215c993ea5adf8192d1de2e8d6b23048d Author: Jing Zhou Date: Thu Aug 22 14:26:33 2019 +0800 drm/amd/display: verify stream link before link test [Why] DP1.2 LL CTS test failure. [How] The failure is caused by not verify stream link is equal to link, only check stream and link is not null. Signed-off-by: Jing Zhou Reviewed-by: Wenjing Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d6bbece2c419debff6fc6b3c7a59fbede53bdef3 Author: Charlene Liu Date: Tue Aug 20 20:33:46 2019 -0400 drm/amd/display: dce11.x /dce12 update formula input [Description] 1. OUTSTANDING_REQUEST_LIMIT update from 0xFF to 0x1F (HW doc update) 2. using memory type to convert UMC's MCLK to Yclk. Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 0417df1699406a8909088152b9bd46e1c2297bbe Author: Bayan Zabihiyan Date: Mon Aug 19 15:18:43 2019 -0400 drm/amd/display: Isolate DSC module from driver dependencies [Why] Edid Utility wishes to include DSC module from driver instead of doing it's own logic which will need to be updated every time someone modifies the driver logic. [How] Modify some functions such that we dont need to pass the entire DC structure as parameter. -Remove DC inclusion from module. -Filter out problematic types and inclusions Signed-off-by: Bayan Zabihiyan Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 785908cf19c9eb4803f6bf9c0a7447dc3661d5c3 Author: Jaehyun Chung Date: Mon Aug 19 16:45:05 2019 -0400 drm/amd/display: OTC underflow fix [Why] Underflow occurs on some display setups(repro'd on 3x4K HDR) on boot, mode set, and hot-plugs with. Underflow occurs because mem clk is not set high after disabling pstate switching. This behaviour occurs because some calculations assumed displays were synchronized. [How] Add a condition to check if timing sync is disabled so that synchronized vblank can be set to false. Signed-off-by: Jaehyun Chung Reviewed-by: Alvin Lee Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 119630061e72e6512ee8911b473cfacb6b211c53 Author: Jun Lei Date: Thu Aug 15 15:22:34 2019 -0400 drm/amd/display: remove hw access from dc_destroy [why] dc_destroy should only clean up SW, this is because GPUs may be removed before driver unload, leading to HW to be unavailable. [how] remove GPIO close as part of GPIO destroy, this is unnecessary because GPIO is not shared, and GPIOs are generally closed after being opened Add tracking to HW access during destructor to make future issues easier to pinpoint, and block access to prevent hangs. Signed-off-by: Jun Lei Reviewed-by: Yongqiang Sun Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit ff344c8d2a404e441b83182d0bd68d97e37894eb Author: Vitaly Prosyak Date: Fri Aug 9 12:36:08 2019 -0500 drm/amd/display: Reuse dcn2 registers [Why & How] Use dcn2 blender, shaper, 3dlut registers Signed-off-by: Vitaly Prosyak Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Acked-by: Vitaly Prosyak Signed-off-by: Alex Deucher commit 649828f71855538375a32c860f7d8f8da6a88ca2 Author: Dmytro Laktyushkin Date: Wed Jul 3 16:37:54 2019 -0400 drm/amd/display: remove temporary transition code Remove code used to allow compilation error free interface change. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit b6e881c947417e75272d3568cedf31f5ef016dcb Author: Dmytro Laktyushkin Date: Fri Sep 13 18:00:28 2019 -0500 drm/amd/display: update navi to use new surface programming behaviour New behaviour will track global updates and update any hw that isn't related to current stream being updated. This should fix any issues caused by pipe split pipes being taken by other streams. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 25409b37335b8e50f7a3cdb47ff8acd761121c56 Author: Ilya Bakoulin Date: Fri Aug 16 16:33:28 2019 -0400 drm/amd/display: Add missing surface address registers [Why] - Need to add missing surface address register definitions. - RGBE+A does not work in a stereo configuration because surface addresses are no programmed correctly. [How] Added the register definitions and surface address programming. Signed-off-by: Ilya Bakoulin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 6acb589f95db95794a3d1f34c5b30db9a03dd4f3 Author: Anthony Koo Date: Mon Aug 19 09:22:24 2019 -0400 drm/amd/display: 3.2.49 Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit b5cf0647c2a83711907f0c6cdede72a397252639 Author: Nikola Cornij Date: Fri Aug 16 14:26:56 2019 -0400 drm/amd/display: config to override DSC start slice height [why] It's sometimes useful to have this option when debugging [how] Add a config flag. If the flag is not set, use driver default policy. If the flag is set, use the value from the flag as the starting DSC slice height. Signed-off-by: Nikola Cornij Reviewed-by: Martin Leung Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 48f100a0caf31bd25bee8d5e2afe91d03e01122f Author: Nikola Cornij Date: Thu Aug 15 11:13:54 2019 -0400 drm/amd/display: Add back support for DSC 4:2:2 Simple [why] The requirement has been clarified and only DSC 4:2:2 Native has to be disabled. Signed-off-by: Nikola Cornij Reviewed-by: Wenjing Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 48af9b91b129f1d93221cd9f76032610a8cc6514 Author: Alvin Lee Date: Fri Aug 2 13:42:49 2019 -0400 drm/amd/display: Don't allocate payloads if link lost We should not allocate payloads if the link is lost until the link is retrained. Some displays require this. Signed-off-by: Alvin Lee Reviewed-by: Wenjing Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit e6d14df74064fc65c6367d4c717e016c9d99be59 Author: Krunoslav Kovac Date: Fri Aug 9 17:16:18 2019 -0400 drm/amd/display: Subsample mode suboptimal for YCbCr4:2:2 [Why&How] Driver defaults to 1-tap subsample mode for 4:2:2. DCE11.2 added 3-tap. The policy is: DCE8-DCE11 - change to 2-tap, it's better than 1-tap. DCE11.2+ - use 3-tap Note that 4:2:0 was added in DCE11.2 and already uses 3-tap always. Note 2 is that DCE not covered on Linux, only DCN+ Signed-off-by: Krunoslav Kovac Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4fd99f67f3c639b3c70365902fe2224cfb8d681f Author: Lewis Huang Date: Wed Aug 7 18:05:49 2019 +0800 drm/amd/display: refine i2c over aux [Why] When user mode use i2c over aux through ADL or DDI, the function dal_ddc_service_query_ddc_data will be called. There are two issues. 1. When read/write length > 16byte, current always return false because the DEFAULT_AUX_MAX_DATA_SIZE != length. 2. When usermode only need to read data through i2c, driver will write mot = true at the same address and cause i2c sink confused. Therefore the following read command will get garbage. [How] 1. Add function dal_dcc_submit_aux_command to handle length > 16 byte. 2. Check read size and write size when query ddc data. Signed-off-by: Lewis Huang Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 8ac64f0af5ffc8ae8cf0c43415c147781733f30b Author: Ilya Bakoulin Date: Wed Aug 7 13:02:44 2019 -0400 drm/amd/display: Fix DML tests [Why] DML diags tests are failing because the struct contents get clobbered by a memcpy. [How] Remove the memcpy call. Signed-off-by: Ilya Bakoulin Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 95a5bd1b3313e017effdda1c2eeed7f42dea13c3 Author: Yong Zhao Date: Thu Sep 5 10:49:56 2019 -0400 drm/amdkfd: Fix a building error when KFD_SUPPORT_IOMMU_V2 is turned off The issue was accidentally introduced recently. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1a6fc071e1991321d3b6a00e0e7c733a462a4418 Author: Tao Zhou Date: Fri Aug 30 19:50:39 2019 +0800 drm/amdgpu: move the call of ras recovery_init and bad page reserve to proper place ras recovery_init should be called after ttm init, bad page reserve should be put in front of gpu reset since i2c may be unstable during gpu reset. add cleanup for recovery_init and recovery_fini v2: add more comment and print. remove cancel_work_sync in recovery_init. Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 87d2b92f1e9df64a74f7fda0691d4041ba2727f9 Author: Tao Zhou Date: Thu Aug 15 16:15:08 2019 +0800 drm/amdgpu: save umc error records save umc error records to ras bad page array v2: add bad pages before gpu reset v3: add NULL check for adev->umc.funcs Signed-off-by: Tao Zhou Signed-off-by: Andrey Grodzovsky Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 78ad00c9030cf872621ef4c14c20fbe7d34d2c06 Author: Tao Zhou Date: Thu Aug 15 14:55:55 2019 +0800 drm/amdgpu: Hook EEPROM table to RAS support eeprom records load and save for ras, move EEPROM records storing to bad page reserving v2: remove redundant check for con->eh_data Signed-off-by: Tao Zhou Signed-off-by: Andrey Grodzovsky Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 9dc23a6325fc3e99467dff46d53c78264d424bd3 Author: Tao Zhou Date: Tue Aug 13 10:39:05 2019 +0800 drm/amdgpu: change ras bps type to eeprom table record structure change bps type from retired page to eeprom table record, prepare for saving umc error records to eeprom Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 4bc2234077b02777a962334e0923d93d033e2f19 Author: Andrey Grodzovsky Date: Wed Sep 4 22:45:20 2019 -0400 drm/madgpu: Fix EEPROM Checksum calculation. Fix typo which messed up the calculation. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tao Zhou Reviewed-and-tested-by: Guchun Chen Signed-off-by: Alex Deucher commit 4d25fba4e3bbc368c320a9305e7d4c86dc0a300d Author: Andrey Grodzovsky Date: Wed Sep 4 11:16:24 2019 -0400 drm/amdgpu: Remove clock gating restore. Restoring clock gating break SMU opeartion afterwards, avoid this until this further invistigated with SMU. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tao Zhou Reviewed-and-tested-by: Guchun Chen Signed-off-by: Alex Deucher commit e6cbabcd70c7e6fd32766eb82baa50362ca9ae89 Author: Andrey Grodzovsky Date: Tue Sep 3 16:47:40 2019 -0400 drm/amdgpu: Add smu lock around in pp_smu_i2c_bus_access Protect from concurrent SMU accesses. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tao Zhou Reviewed-and-tested-by: Guchun Chen Signed-off-by: Alex Deucher commit a5fc7ec1332cf388021c25e177ce4f68389084a0 Author: Roman Li Date: Wed Sep 4 17:23:11 2019 -0400 drm/amd/display: Add stereo mux and dig programming calls for dcn21 [Why] The earlier patch "Hook up calls to do stereo mux and dig programming..." doesn't include update for dcn21. [How] Align dcn21 gpio settings with updated stereo control interface. Signed-off-by: Roman Li Acked-by: Aaron Liu Signed-off-by: Alex Deucher commit 050091ab6e832f7df0b700f1b9b596613643ada4 Author: Yong Zhao Date: Tue Sep 3 17:55:30 2019 -0400 drm/amdkfd: Query kfd device info by CHIP id instead of pci device id This optimizes out the pci device id usage in KFD and makes the code more maintainable. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit cd05c865108e089c4be99c0f939c72437fba2207 Author: Felix Kuehling Date: Fri Aug 30 00:10:34 2019 -0400 drm/amdgpu: Disable page faults while reading user wptrs These wptrs must be pinned and GPU accessible when this is called from hqd_load functions. So they should never fault. This resolves a circular lock dependency issue involving four locks including the DQM lock and mmap_sem. Signed-off-by: Felix Kuehling Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit 811bc15b49fe2dde87b9109b5eeea8ebe6420c79 Author: Aaron Liu Date: Wed Sep 4 11:47:48 2019 +0800 drm/amdgpu: disable stutter mode for renoir With stutter mode enabled, NMI prints frequently. Disable stutter for the moment because NMI warning storm, and will enable it back till the issue is addressed Signed-off-by: Aaron Liu Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 59d1ace3c78b1eb5662419002ddec6fc28630d42 Author: Aaron Liu Date: Wed Sep 4 13:21:42 2019 +0800 drm/amd/display: update renoir_ip_offset.h This patch updates MP1_BASE in renoir_ip_offset.h Signed-off-by: Aaron Liu Acked-by: Roman Li Signed-off-by: Alex Deucher commit 6ab3b9e3139309243bcc07d396eff24cc0c0e419 Author: Prike Liang Date: Wed Sep 4 16:34:39 2019 +0800 drm/amd/powerplay: implement sysfs for getting dpm clock With the common interface print_clk_levels can get the following dpm clock: -pp_dpm_dcefclk -pp_dpm_fclk -pp_dpm_mclk -pp_dpm_sclk -pp_dpm_socclk Signed-off-by: Prike Liang Reviewed-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 337c200756b40681a46bbdc0e0cde88775474344 Author: John Clements Date: Wed Sep 4 16:23:27 2019 +0800 drm/amdgpu: clean up load TMR sequence Removed redundant goto statement Signed-off-by: John Clements Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 4fb60b02fba49a8f1750eca0884b7c1a555ebeba Author: John Clements Date: Wed Sep 4 16:23:08 2019 +0800 drm/amdgpu: enable TA load support in Arcturus Add support for loading XGMI/RAS FW Signed-off-by: John Clements Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c5b6e585b23382b682653ec84152d1945408f888 Author: Tao Zhou Date: Mon Sep 2 19:27:23 2019 +0800 drm/amdgpu: change r type to int in gmc_v9_0_late_init change r type from bool to int, suitable for both bool and int return value Signed-off-by: Tao Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 871e5e7219e720e7993c12e47197709d92cbf244 Author: Kevin Wang Date: Tue Sep 3 16:02:33 2019 +0800 drm/amd/powerplay: replace smu->table_count with SMU_TABLE_COUNT in smu (v2) fix bellow patch issue: drm/amd/powerplay: introduce smu table id type to handle the smu table for each asic ---- "This patch introduces new smu table type, it's to handle the different smu table defines for each asic with the same smu ip." before: use smu->table_count to represent the actual table count in smc firmware use actual table count to check smu function parameter about smu table after: use logic table count "SMU_TABLE_COUNT" to check function parameter because table id already mapped in smu driver, and smu function will use logic table id not actual table id to check func parameter. v2: squash in warning fix Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Acked-by: Huang Rui Signed-off-by: Alex Deucher commit f1d59e00ff5f1822ff9359beb0c315fdd9660626 Author: Jack Zhang Date: Tue Sep 3 10:15:23 2019 +0800 drm/amd/amdgpu: add sw_fini interface for df_funcs add sw_fini interface of df_funcs. This interface will remove sysfs file of df_cntr_avail function. The old behavior only create sysfs of df_cntr_avail in sw_init, but never remove it for lack of sw_fini interface. With this,driver will report create sysfs fail when it's loaded for the second time. Signed-off-by: Jack Zhang Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher commit 9dc913425807c82a7cb942458540a9423182697d Author: Hawking Zhang Date: Tue Sep 3 03:19:31 2019 +0800 drm/amdgpu: init UMC & RSMU register base address UMC RAS feature requires access to UMC & RSMU registers Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 1c70d3d9c4a6d4e4b4425d78e0a919cfaa3cf8db Author: Hawking Zhang Date: Tue Sep 3 06:48:00 2019 +0800 drm/amdgpu/nbio: switch to amdgpu_nbio_ras_late_init helper function amdgpu_nbio_ras_late_init is used to init nbio specfic ras debugfs/sysfs node and nbio specific interrupt handler. It can be shared among nbio generations Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 47930de4aa7068188e64475cdc0f2c8f4e1ff194 Author: Hawking Zhang Date: Tue Sep 3 06:23:12 2019 +0800 drm/amdgpu/mmhub: switch to amdgpu_mmhub_ras_late_init helper function amdgpu_mmhub_ras_late_init is used to init mmhub specfic ras debugfs/sysfs node and mmhub specific interrupt handler. It can be shared among mmhub generations Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit bfcf62c2a5a930423c043b363de2e5aef7146f39 Author: Hawking Zhang Date: Tue Sep 3 06:02:07 2019 +0800 drm/amdgpu/sdma: switch to amdgpu_sdma_ras_late_init helper function amdgpu_sdma_ras_late_init is used to init sdma specfic ras debugfs/sysfs node and sdma specific interrupt handler. It can be shared among sdma generations Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 6caeee7a708c018e4922510954c1e5fb5364ad0b Author: Hawking Zhang Date: Tue Sep 3 06:06:08 2019 +0800 drm/amdgpu/gfx: switch to amdgpu_gfx_ras_late_init helper function amdgpu_gfx_ras_late_init is used to init gfx specfic ras debugfs/sysfs node and gfx specific interrupt handler. It can be shared among gfx generations Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit a85eff14da2c700ffcd68b3bf1a07f8a5deda624 Author: Hawking Zhang Date: Tue Sep 3 05:24:35 2019 +0800 drm/amdgpu/gmc: switch to amdgpu_gmc_ras_late_init helper function amdgpu_gmc_ras_late_init is used to init gmc specfic ras debugfs/sysfs node and gmc specific interrupt handler. It can be shared among gmc generations. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit d094aea312580f12232b546523dae20f54445469 Author: Hawking Zhang Date: Tue Sep 3 03:16:47 2019 +0800 drm/amdgpu: set ip specific ras interface pointer to NULL after free it to prevent access to dangling pointers Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit d5ea093eebf022ec69970107db45dc06318d7e5a Author: Andrey Grodzovsky Date: Thu Aug 22 15:01:37 2019 -0400 dmr/amdgpu: Add system auto reboot to RAS. In case of RAS error allow user configure auto system reboot through ras_ctrl. This is also part of the temproray work around for the RAS hang problem. v4: Use latest kernel API for disk sync. Signed-off-by: Andrey Grodzovsky Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7c6e68c777f109484559a35b125a773439bbd319 Author: Andrey Grodzovsky Date: Fri Sep 13 17:40:32 2019 -0500 drm/amdgpu: Avoid HW GPU reset for RAS. Problem: Under certain conditions, when some IP bocks take a RAS error, we can get into a situation where a GPU reset is not possible due to issues in RAS in SMU/PSP. Temporary fix until proper solution in PSP/SMU is ready: When uncorrectable error happens the DF will unconditionally broadcast error event packets to all its clients/slave upon receiving fatal error event and freeze all its outbound queues, err_event_athub interrupt will be triggered. In such case and we use this interrupt to issue GPU reset. THe GPU reset code is modified for such case to avoid HW reset, only stops schedulers, deatches all in progress and not yet scheduled job's fences, set error code on them and signals. Also reject any new incoming job submissions from user space. All this is done to notify the applications of the problem. v2: Extract amdgpu_amdkfd_pre/post_reset from amdgpu_device_lock/unlock_adev Move amdgpu_job_stop_all_jobs_on_sched to amdgpu_job.c Remove print param from amdgpu_ras_query_error_count v3: Update based on prevoius bug fixing patch to properly call amdgpu_amdkfd_pre_reset for other XGMI hive memebers. Signed-off-by: Andrey Grodzovsky Acked-by: Felix Kuehling Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 12ffa55da60f8355a5e485bc6d612257a303147e Author: Andrey Grodzovsky Date: Fri Aug 30 10:31:18 2019 -0400 drm/amdgpu: Fix bugs in amdgpu_device_gpu_recover in XGMI case. Issue 1: In XGMI case amdgpu_device_lock_adev for other devices in hive was called to late, after access to their repsective schedulers. So relocate the lock to the begining of accessing the other devs. Issue 2: Using amdgpu_device_ip_need_full_reset to switch the device list from all devices in hive to the single 'master' device who owns this reset call is wrong because when stopping schedulers we iterate all the devices in hive but when restarting we will only reactivate the 'master' device. Also, in case amdgpu_device_pre_asic_reset conlcudes that full reset IS needed we then have to stop schedulers for all devices in hive and not only the 'master' but with amdgpu_device_ip_need_full_reset we already missed the opprotunity do to so. So just remove this logic and always stop and start all schedulers for all devices in hive. Also minor cleanup and print fix. v4: Minor coding style fix. Signed-off-by: Andrey Grodzovsky Acked-by: Felix Kuehling Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 43ce6bab7b9ea8615b18b4a6c88e9b8a122080e3 Author: Christian König Date: Fri Aug 30 14:42:10 2019 +0200 drm/amdgpu: remove amdgpu_cs_try_evict Trying to evict things from the current working set doesn't work that well anymore because of per VM BOs. Rely on reserving VRAM for page tables to avoid contention. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 9d1b3c78052e87fbb1beb7912bf5b2d5b19f2c2c Author: Christian König Date: Fri Aug 30 14:38:37 2019 +0200 drm/amdgpu: reserve at least 4MB of VRAM for page tables v2 This hopefully helps reduce the contention for page tables. v2: adjust maximum reported VRAM size as well Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 629be2039532b61907829f89446445dded1daa0a Author: Christian König Date: Fri Sep 13 17:38:07 2019 -0500 drm/amdgpu: use moving fence instead of exclusive for VM updates Make VM updates depend on the moving fence instead of the exclusive one. Makes it less likely to actually have a dependency. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit faa695c715e5c9203af824315127037499b33921 Author: Evan Quan Date: Mon Sep 2 12:37:23 2019 +0800 drm/amd/powerplay: do proper cleanups on hw_fini These are needed for smu_reset support. Signed-off-by: Evan Quan Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit c66846e069dec317b45a0a4b112d4cd7d885509e Author: Evan Quan Date: Wed Aug 21 17:19:52 2019 +0800 drm/amd/powerplay: update cached feature enablement status V3 Need to update in cache feature enablement status after pp_feature settings. Another fix for the commit below: drm/amd/powerplay: implment sysfs feature status function in smu V2: update smu_feature_update_enable_state() and relates V3: use bitmap_or and bitmap_andnot Signed-off-by: Evan Quan Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit f78c47f669086503844ea0d78b64a18c0e6f3e77 Author: Evan Quan Date: Fri Aug 30 17:30:46 2019 +0800 drm/amd/powerplay: guard manual mode prerequisite for clock level force Force clock level is for dpm manual mode only. Reported-by: Candice Li Signed-off-by: Evan Quan Acked-by: Alex Deucher Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit 39857252e5e50edd90bff444ca0e3375aed68a94 Author: Hawking Zhang Date: Sat Aug 31 14:27:13 2019 +0800 drm/amdgpu: only apply gds clearing workaround when ras is supported gds clearing workaround should only be applied on asics that support gfx ras Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8bf2485aec63b9a9cc81ad795e1bb7fda19bf33c Author: Hawking Zhang Date: Sat Aug 31 14:20:38 2019 +0800 drm/amdgpu: fix memory leak when ras is not supported on specific ip block free ras_if if ras is not supported Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 4ce71be67b08d00729f4d8735e2b76d8b5882d2c Author: Hawking Zhang Date: Sat Aug 31 13:18:40 2019 +0800 drm/amdgpu: check mmhub_funcs pointer before refering to it mmhub callback functions are not initialized for all the ASICs Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 17da41bf00c849d809cb3cc5eebc43a1924736fd Author: Felix Kuehling Date: Thu Aug 29 21:18:43 2019 -0400 drm/amdgpu: Remove unnecessary TLB workaround (v2) This workaround is better handled in user mode in a way that doesn't require allocating extra memory and breaking userptr BOs. The TLB bug is a performance bug, not a functional or security bug. Hence it is safe to remove this kernel part of the workaround to allow a better workaround using only virtual address alignments in user mode. v2: Removed VI_BO_SIZE_ALIGN definition Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e0253d083c5c77fa100cdc89680e5bc667d6ef4d Author: Felix Kuehling Date: Mon Aug 26 18:46:28 2019 -0400 drm/amdgpu: Use optimal mtypes and PTE bits for Arcturus For compute VRAM allocations on Arturus use the new RW mtype for non-coherent local memory, CC mtype for coherent local memory and PTE_SNOOPED bit for invalidating non-dirty cache lines on remote XGMI mappings. Signed-off-by: Felix Kuehling Acked-by: Christian König Tested-by: Amber Lin Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit d0ba51b1cacd27bdc1acfe70cb55699f3329b2b1 Author: Felix Kuehling Date: Mon Aug 26 18:39:11 2019 -0400 drm/amdgpu: Determing PTE flags separately for each mapping (v3) The same BO can be mapped with different PTE flags by different GPUs. Therefore determine the PTE flags separately for each mapping instead of storing them in the KFD buffer object. Add a helper function to determine the PTE flags to be extended with ASIC and memory-type-specific logic in subsequent commits. v2: Split Arcturus-specific MTYPE changes into separate commit v3: Fix return type of get_pte_flags to uint64_t Signed-off-by: Felix Kuehling Acked-by: Christian König Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit 093e48c04dfdf91f323ae80428d4ced0294c596e Author: Oak Zeng Date: Fri Jul 26 16:03:11 2019 -0500 drm/amdgpu: Support new arcturus mtype Arcturus repurposed mtype WC to RW. Modify gmc functions to support the new mtype Signed-off-by: Oak Zeng Signed-off-by: Felix Kuehling Reviewed-by: Christian König Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit 484deaedfa03fa0d10e0b1ad3facc910ccc951a8 Author: Oak Zeng Date: Fri Jul 26 15:57:50 2019 -0500 drm/amdgpu: Extends amdgpu vm definitions (v2) Add RW mtype introduced for arcturus. v2: * Don't add probe-invalidation bit from UAPI * Don't add unused AMDGPU_MTYPE_ definitions Signed-off-by: Oak Zeng Signed-off-by: Felix Kuehling Reviewed-by: Christian König Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit 22e1d14fef714290c5ba3a516965c768378c8b63 Author: Hawking Zhang Date: Thu Aug 29 19:56:44 2019 +0800 drm/amdgpu: switch to amdgpu_ras_late_init for nbio v7_4 (v2) call helper function in late init phase to handle ras init for nbio ip block v2: init local var r to 0 in case the function return failure on asics that don't have ras_late_init implementation Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 9ad1dc295b39ac725b56f7fdfeffd09de5a6dbce Author: Hawking Zhang Date: Thu Aug 29 20:57:32 2019 +0800 drm/amdgpu: add ras_late_init callback function for nbio v7_4 (v3) ras_late_init callback function will be used to do common ras init in late init phase. v2: call ras_late_fini to do cleanup when fails to enable interrupt v3: rename sysfs/debugfs node name to pcie_bif_xxx Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit dda79907a77bc6bb34412762925ff1d6d3e2a67a Author: Hawking Zhang Date: Fri Aug 30 13:34:38 2019 +0800 drm/amdgpu: add mmhub ras_late_init callback function (v2) The function will be called in late init phase to do mmhub ras init v2: check ras_late_init function pointer before invoking the function Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 2452e7783c7a6eb9dc6892b49be25988850962a0 Author: Hawking Zhang Date: Thu Aug 29 19:35:50 2019 +0800 drm/amdgpu: switch to amdgpu_ras_late_init for gmc v9 block (v2) call helper function in late init phase to handle ras init for gmc ip block v2: call ras_late_fini to do clean up when fail to enable interrupt Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 7d0a31e8cc3bd51cd2d33931d72a0513020c5d0a Author: Hawking Zhang Date: Thu Aug 29 19:30:02 2019 +0800 drm/amdgpu: switch to amdgpu_ras_late_init for sdma v4 block (v2) call helper function in late init phase to handle ras init for sdma ip block v2: call ras_late_fini to do clean up when fail to enable interrupt Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 63fa48db49c29e0dcbe182a1982997bf13c02721 Author: Hawking Zhang Date: Thu Aug 29 19:15:16 2019 +0800 drm/amdgpu: switch to amdgpu_ras_late_init for gfx v9 block (v2) call helper function in late init phase to handle ras init for gfx ip block v2: call ras_late_fini to do clean up when fail to enable interrupt Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit b293e891b05701fc89fa2b20bba377513ae92021 Author: Hawking Zhang Date: Fri Aug 30 13:29:18 2019 +0800 drm/amdgpu: add helper function to do common ras_late_init/fini (v3) In late_init for ras, the helper function will be used to 1). disable ras feature if the IP block is masked as disabled 2). send enable feature command if the ip block was masked as enabled 3). create debugfs/sysfs node per IP block 4). register interrupt handler v2: check ih_info.cb to decide add interrupt handler or not v3: add ras_late_fini for cleanup all the ras fs node and remove interrupt handler Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit a344db8e5e3c312928fd02bfb768ae689107f19b Author: Hawking Zhang Date: Wed Jun 5 14:40:57 2019 +0800 drm/amdgpu: poll ras_controller_irq and err_event_athub_irq status For the hardware that can not enable BIF ring for IH cookies for both ras_controller_irq and err_event_athub_irq, the driver has to poll the status register in irq handling and ack the hardware properly when there is interrupt triggered Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4e644fffb5809d260bb7adcc49cb87d79b88ba3d Author: Hawking Zhang Date: Wed Jun 5 14:57:00 2019 +0800 drm/amdgpu: add ras_controller and err_event_athub interrupt support Ras controller interrupt and Ras err event athub interrupt are two dedicated interrupts for RAS support. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit fc098fb4ed0c0ff49d50ffe314649181acd74f81 Author: Hawking Zhang Date: Wed Jun 5 14:20:38 2019 +0800 drm/amdgpu: update nbio v7_4 ip header files Add mmBIF_INTR_CNTL and its shift mask. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b8d312aa075f33282565467662c4628dae0a2aff Author: Hawking Zhang Date: Wed May 29 14:00:19 2019 +0800 drm/amdgpu: add nbif v7_4 irq source header for vega20 nbif v7_4 interrupt source definition Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4241863afce118b32cda623c1b0999af0cb42a11 Author: Hawking Zhang Date: Thu May 30 11:57:20 2019 +0800 drm/amdgpu/nbio: add functions to query ras specific interrupt status ras_controller_interrupt and err_event_interrupt are ras specific interrupts. add functions to check their status and ack them if they are generated. both funcitons should only be invoked in ISR when BIF ring is disabled or even not initialized. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit bebc076285458ca6caa3246aa9c13ac062e14835 Author: Hawking Zhang Date: Fri Aug 23 19:39:18 2019 +0800 drm/amdgpu: switch to new amdgpu_nbio structure no functional change, just switch to new structures Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 078ef4e9325012f4d11d132e2f7e5a4c4946bceb Author: Hawking Zhang Date: Fri Aug 23 19:02:14 2019 +0800 drm/amdgpu: add new amdgpu nbio header file More nbio funcitonalities will be added and nbio could be treated as an ip block like gfx/sdma.etc Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2f7155629c9dd4d4ed0c2ec95a8982c84882b9e2 Author: Mika Kuoppala Date: Fri Sep 13 21:06:38 2019 +0100 drm/i915/tgl: Re-enable rc6 We think that we got rc6 problems sorted out. Flip the switch and let CI expose our tendency to naive optimism. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190913200638.31939-1-chris@chris-wilson.co.uk commit cf82d9ddd3b5203dea5561dfabd1216b8159af37 Author: Michel Thierry Date: Fri Sep 13 17:16:51 2019 +0300 drm/i915/tgl: Introduce gen12 forcewake ranges The media ranges extend beyond what gen11 gives so we can't piggypack on gen11 ranges, even on read side. Introduce a table for gen12 and accessors for it. v2: correctly implement gen12_fwtable_write/read (Daniele) v3: update with ranges from bspec. v4: avoid GEN11_NEEDS_FORCEWAKE (Mika) v5: bspec ref (Daniele) BSpec: 52078 Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Signed-off-by: Michel Thierry Signed-off-by: Mika Kuoppala Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190913141652.27958-2-mika.kuoppala@linux.intel.com commit c9f8d18710bee1c5b87d54007c24d8bf79029fb6 Author: Mika Kuoppala Date: Fri Sep 13 17:16:50 2019 +0300 drm/i915: Update Gen11 forcewake ranges Daniele noticed new render ranges in Gen11 fw table. Bspec: 18331 Cc: Daniele Ceraolo Spurio Signed-off-by: Mika Kuoppala Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190913141652.27958-1-mika.kuoppala@linux.intel.com commit 6da301e5291717861fb25025b782922d3a36c7af Author: Chris Wilson Date: Fri Sep 13 15:55:56 2019 +0100 drm/i915/tgl: Limit ourselves to just rcs0 More pruning away of features until we have a stable system and a basis for debugging what's missing. v2: Fixup vdbox/vebox fusing Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190913145556.23912-1-chris@chris-wilson.co.uk commit eebab60f224fcfd560957715d08c31564d8672ed Author: Chris Wilson Date: Thu Sep 12 17:08:34 2019 +0100 drm/i915: Don't mix srcu tag and negative error codes While srcu may use an integer tag, it does not exclude potential error codes and so may overlap with our own use of -EINTR. Use a separate outparam to store the tag, and report the error code separately. Fixes: 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Ville Syrjälä Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190912160834.30601-1-chris@chris-wilson.co.uk commit e91c8a29b452671d9af7259cd30980e6a2d78005 Author: Manasi Navare Date: Fri Jul 12 13:38:08 2019 -0700 drm/i915/display/icl: Bump up the plane/fb height On ICL+, the max supported plane height is 4320, so bump it up To support 4320, we need to increase the number of bits used to read plane_height to 13 as opposed to older 12 bits. v4: * Adjust the width mask also since extra bits are mbz (Ville) v3: * Use 0xffff for mask as extra bits are mbz (Ville) v2: * ICL plane height supported is 4320 (Ville) * Add a new line between max width and max height (Jose) Cc: Maarten Lankhorst Cc: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190712203808.4126-1-manasi.d.navare@intel.com commit 12a97df00e2aa6fb2200a8935e78f3e00fab4eb2 Author: Manasi Navare Date: Fri Jul 12 13:22:13 2019 -0700 drm/i915/display/icl: Bump up the hdisplay and vdisplay as per transcoder limits On ICL+, the vertical limits for the transcoders are increased to 8192 and horizontal limits are bumped to 16K so bump up limits in intel_mode_valid() v4: * Increase the hdisplay to 16K (Ville) v3: * Supported starting ICL (Ville) * Use the higher limits from TRANS_VTOTAL register (Ville) v2: * Checkpatch warning (Manasi) Cc: Maarten Lankhorst Cc: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190712202214.3906-1-manasi.d.navare@intel.com commit fe9e557dfb485c8f875288537e919d946fbc368a Author: Laurent Pinchart Date: Thu Aug 22 02:55:02 2019 +0300 drm/bridge: Fix references to drm_bridge_funcs in documentation The documentation for most of the bridge atomic operations incorrectly reference the non-atomic version when stating the operations are optional. Fix them, and make sure that all references to bridge operations are correctly marked with @. Signed-off-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190821235502.15475-1-laurent.pinchart+renesas@ideasonboard.com commit 3250cdf938dce5447cf4f895bb3ec3b929a95e09 Author: Yakir Yang Date: Wed Sep 11 16:26:46 2019 +0800 drm: bridge/dw_hdmi: add audio sample channel status setting When transmitting IEC60985 linear PCM audio, we configure the Aduio Sample Channel Status information in the IEC60958 frame. The status bit is already available in iec.status of hdmi_codec_params. This fix the issue that audio does not come out on some monitors (e.g. LG 22CV241) Note that these registers are only for interfaces: I2S audio interface, General Purpose Audio (GPA), or AHB audio DMA (AHBAUDDMA). For S/PDIF interface this information comes from the stream. Currently this function dw_hdmi_set_channel_status is only called from dw-hdmi-i2s-audio in I2S setup. Signed-off-by: Yakir Yang Signed-off-by: Cheng-Yi Chiang Reviewed-by: Jonas Karlman Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20190911082646.134347-1-cychiang@chromium.org commit c8185520aed6faab58b310f573790badfca27981 Author: Chris Wilson Date: Fri Sep 13 07:42:00 2019 +0100 drm/i915/gtt: Make sure the gen6 ppgtt is bound before first use As we remove the struct_mutex protection from around the vma pinning, counters need to be atomic and aware that there may be multiple threads simultaneously active. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190913064200.24297-1-chris@chris-wilson.co.uk commit de2358050ab8225117d3252de52f85e260b5dad5 Author: David Riley Date: Thu Sep 12 09:00:48 2019 -0700 drm/virtio: Fix warning in virtio_gpu_queue_fenced_ctrl_buffer. Fix warning introduced with commit e1218b8c0cc1 ("drm/virtio: Use vmalloc for command buffer allocations.") from drm-misc-next. Signed-off-by: David Riley Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190912160048.212495-1-davidriley@chromium.org Signed-off-by: Gerd Hoffmann commit 88c5a5a021aa2aba5f6ae5f64c0f2b8f785192d4 Author: Gerd Hoffmann Date: Thu Sep 12 13:46:27 2019 +0200 drm/virtio: enable prime mmap support Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190912114627.20176-1-kraxel@redhat.com commit 0b8d6273db0635acd0dae983a39600b1b96fe77d Author: Chris Wilson Date: Thu Sep 12 13:26:39 2019 +0100 drm/i915/selftests: Keep the engine awake while we keep for preemption Keep the engine awake to ensure that we don't inject any pm-idle requests. References: https://bugs.freedesktop.org/show_bug.cgi?id=111108 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190912122639.25224-1-chris@chris-wilson.co.uk commit 0c653722e6e669fae969c178f0d4a55d9c2dc922 Author: Arkadiusz Hiler Date: Thu Sep 12 15:54:18 2019 +0300 drm/i915: Get the correct wakeref for reading HOTPLUG_EN et al. Without it we get: Unclaimed read from register 0x1e1110 WARNING: CPU: 2 PID: 1029 at drivers/gpu/drm/i915/intel_uncore.c:1101 __unclaimed_reg_debug+0x40/0x50 [i915] Call Trace: fwtable_read32+0x233/0x300 [i915] i915_interrupt_info+0xa73/0xd60 [i915] seq_read+0xdb/0x3c0 full_proxy_read+0x51/0x80 vfs_read+0x9e/0x160 ksys_read+0x8f/0xe0 do_syscall_64+0x55/0x1c0 entry_SYSCALL_64_after_hwframe+0x49/0xbe Cc: Chris Wilson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109824 Signed-off-by: Arkadiusz Hiler Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190912125418.23115-2-arkadiusz.hiler@intel.com commit ee73e2795b416b829f0e00e7c43154922dff495b Author: Chris Wilson Date: Thu Sep 12 14:23:13 2019 +0100 drm/i915/tgl: Disable preemption while being debugged We see failures where the context continues executing past a preemption event, eventually leading to situations where a request has executed before we have event submitted it to HW! It seems like tgl is ignoring our RING_TAIL updates, but more likely is that there is a missing update required for our semaphore waits around preemption. v2: And disable internal semaphore usage Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190912132313.12751-1-chris@chris-wilson.co.uk commit abddeb7b12b012f0107928e184d6cba074229349 Author: Thomas Zimmermann Date: Wed Sep 11 13:09:10 2019 +0200 drm/vram: Unconditonally set BO call-back functions The statement's condition is always true. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190911110910.30698-5-tzimmermann@suse.de commit c30b225dba01b4605262084592789e98a338c685 Author: Thomas Zimmermann Date: Wed Sep 11 13:09:09 2019 +0200 drm/vram: Unexport internal functions of VRAM MM The init, cleanup and mmap functions of VRAM MM are only used internally. Remove them from the public interface. v2: * update for debugfs support Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190911110910.30698-4-tzimmermann@suse.de commit b0e40e0805221dc8e11762717149e2c099e0eb99 Author: Thomas Zimmermann Date: Wed Sep 11 13:09:08 2019 +0200 drm/vram: Have VRAM MM call GEM VRAM functions directly VRAM MM and GEM VRAM buffer objects are only used with each other; connected via 3 function pointers. Simplify this code by making the memory manager call the rsp. functions of the BOs directly; and remove the functions from the BO's public interface. v2: * typos in commit message Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190911110910.30698-3-tzimmermann@suse.de commit 6b5ce4a1fb84898d454c0f3c34abc801f86f4145 Author: Thomas Zimmermann Date: Wed Sep 11 13:09:07 2019 +0200 drm/vram: Move VRAM memory manager to GEM VRAM implementation The separation between GEM VRAM objects and the memory manager is artificial, as they are only used with each other. Copying both implementations into the same file is a first step to simplifying the code. This patch only moves code without functional changes. v3: * update to use dev->vma_offset_manager v2: * update for debugfs support * typos in commit message Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190911110910.30698-2-tzimmermann@suse.de commit 16ffe73c186b7897a1a6888ffb4949a8b4026624 Author: Chris Wilson Date: Thu Sep 12 13:48:13 2019 +0100 drm/i915/pmu: Use GT parked for estimating RC6 while asleep As we track when we put the GT device to sleep upon idling, we can use that callback to sample the current rc6 counters and record the timestamp for estimating samples after that point while asleep. v2: Stick to using ktime_t v3: Track user_wakerefs that interfere with the new intel_gt_pm_wait_for_idle v4: No need for parked/unparked estimation if !CONFIG_PM v5: Keep timer park/unpark logic as was v6: Refactor duplicated estimate/update rc6 logic v7: Pull intel_get_pm_get_if_awake() out from the pmu->lock. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105010 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190912124813.19225-1-chris@chris-wilson.co.uk commit 8d8b00318593e2852aef19b92f99851d50a203fc Author: Jani Nikula Date: Wed Sep 11 23:29:08 2019 +0300 drm/i915: convert device info num_pipes to pipe_mask Replace device info number of pipes with a bit mask of available pipes. This will prove handy in the future. There's still a bunch of future work to do to actually allow a non-consecutive mask of pipes, but it's a start. No functional changes. Cc: Chris Wilson Cc: José Roberto de Souza Cc: Ville Syrjälä Reviewed-by: José Roberto de Souza Acked-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190911202908.19631-1-jani.nikula@intel.com commit 54fc577d90d01a28dbfccd277aa3de4d4abaf1ff Author: Tvrtko Ursulin Date: Wed Sep 11 17:07:30 2019 +0100 drm/i915/pmu: Skip busyness sampling when and where not needed Since d0aa694b9239 ("drm/i915/pmu: Always sample an active ringbuffer") the cost of sampling the engine state on execlists platforms became a little bit higher when both engine busyness and one of the wait states are being monitored. (Previously the busyness sampling on legacy platforms was done via seqno comparison so there was no cost of mmio read.) We can avoid that by skipping busyness sampling when engine supports software busy stats and so avoid the cost of potential mmio read and sample accumulation. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190911160730.22687-1-tvrtko.ursulin@linux.intel.com commit a17592effdc16f3a51ef9c1dda30fe5c6d668263 Author: Chris Wilson Date: Thu Sep 12 10:29:33 2019 +0100 drm/i915/execlists: Ensure the context is reloaded after a GPU reset After we manipulate the context to allow replay after a GPU reset, force that context to be reloaded. This should be a layer of paranoia, for if the GPU was reset, the context will no longer be resident! Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190912092933.4729-2-chris@chris-wilson.co.uk commit 582a6f90aa0d9103ab834b3a48a5bb7e4d07cac6 Author: Chris Wilson Date: Thu Sep 12 10:29:32 2019 +0100 drm/i915/execlists: Add a paranoid flush of the CSB pointers upon reset After a GPU reset, we need to drain all the CS events so that we have an accurate picture of the execlists state at the time of the reset. Be paranoid and force a read of the CSB write pointer from memory. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190912092933.4729-1-chris@chris-wilson.co.uk commit e3cb653d5cc42c2073ad174ae1130dc9e39266e9 Author: Chris Wilson Date: Wed Sep 11 18:59:26 2019 +0100 drm/i915: Disable FBC if BIOS reserved memory (stolen) is unavailable The FBC requires a couple of contiguous buffers, which we allocate from stolen memory. If stolen memory is unavailable, we cannot allocate those buffers and so cannot support FBC. Mark it so. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190911175926.31365-1-chris@chris-wilson.co.uk commit 933122cc7cd26e67dfc7975f821033e89f766963 Author: Ville Syrjälä Date: Wed Sep 11 16:31:29 2019 +0300 drm/i915: Remove duplicated bxt/cnl/icl .modeset_calc_cdclk() funcs Reuse the same .modeset_calc_cdclk() function for all bxt+. The only difference in between the cnl/icl and the bxt variants is the call to cnl_compute_min_voltage_level(). We can do that call just fine on older platforms since they leave min_voltage_level[] zeroed. Let's rename the function to bxt_compute_min_voltage_level() just so it stays consistent with the rest of the naming scheme. Signed-off-by: Ville Syrjälä Reviewed-by: Matt Roper Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190911133129.27466-4-ville.syrjala@linux.intel.com commit 502d1c04f53c787dfd6268578393d340cf614cde Author: Ville Syrjälä Date: Wed Sep 11 16:31:28 2019 +0300 drm/i915: Reuse cnl_modeset_calc_cdclk() on icl+ The cnl and icl .modeset_calc_cdclk() functions are identical. Drop one copy. Signed-off-by: Ville Syrjälä Reviewed-by: Matt Roper Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190911133129.27466-3-ville.syrjala@linux.intel.com commit 0a12e437049786b9c33542d16b6a03f46fab46f8 Author: Ville Syrjälä Date: Wed Sep 11 16:31:27 2019 +0300 drm/i915: Fix CD2X pipe select masking during cdclk sanitation We're forgetting to mask off all three pipe select bits from the CDCLK_CTL value on icl+ which may lead to the extra bit being left in. That will cause us to consider the current hardware cdclk state as invalid, and we proceed to sanitize it even though the hardware may have active pipes and whatnot. Fix up the mask so we get rid of all three pipe select bits and thus hopefully no longer sanitize cdclk when it's already correctly programmed. Cc: Matt Roper Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111641 Fixes: 0c1279b58fc7 ("drm/i915: Consolidate {bxt,cnl,icl}_init_cdclk") Signed-off-by: Ville Syrjälä Reviewed-by: Matt Roper Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190911133129.27466-2-ville.syrjala@linux.intel.com commit 74689ddfb7574e2bf08c7206a4ab0dff04978b05 Author: Ville Syrjälä Date: Wed Sep 11 16:31:26 2019 +0300 drm/i915: Fix cdclk bypass freq readout for tgl/bxt/glk On tgl/bxt/glk the cdclk bypass frequency depends on the PLL reference clock. So let's read out the ref clock before we try to compute the bypass clock. Cc: Matt Roper Fixes: 71dc367e2bc3 ("drm/i915: Consolidate bxt/cnl/icl cdclk readout") Signed-off-by: Ville Syrjälä Reviewed-by: Matt Roper Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190911133129.27466-1-ville.syrjala@linux.intel.com commit e1218b8c0cc1f8108be67ba3783d63eb4a50d792 Author: David Riley Date: Wed Sep 11 11:14:03 2019 -0700 drm/virtio: Use vmalloc for command buffer allocations. Userspace requested command buffer allocations could be too large to make as a contiguous allocation. Use vmalloc if necessary to satisfy those allocations. Signed-off-by: David Riley Link: http://patchwork.freedesktop.org/patch/msgid/20190911181403.40909-3-davidriley@chromium.org Signed-off-by: Gerd Hoffmann commit 32d6c2c5b5227cfc6f796bbd760dab81b05f48e5 Author: David Riley Date: Wed Sep 11 11:14:02 2019 -0700 drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version. Factor function in preparation to generating scatterlist prior to locking. Signed-off-by: David Riley Link: http://patchwork.freedesktop.org/patch/msgid/20190911181403.40909-2-davidriley@chromium.org Signed-off-by: Gerd Hoffmann commit 249778704c01384d76984d83e6d6377ac96b2cc4 Author: Jani Nikula Date: Wed Sep 11 12:26:08 2019 +0300 drm/i915: add INTEL_NUM_PIPES() and use it Abstract away direct access to ->num_pipes to allow further refactoring. No functional changes. Cc: Chris Wilson Cc: José Roberto de Souza Cc: Ville Syrjälä Reviewed-by: José Roberto de Souza Acked-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190911092608.13009-1-jani.nikula@intel.com commit 023a125d1dded8e1c21bd9974373b697544ba18d Author: Chris Wilson Date: Wed Sep 11 12:46:55 2019 +0100 drm/i915: Squeeze iommu status into debugfs/i915_capabilities There's no easy way of checking whether iommu is enabled for the GPU (you can grep dmesg if you know the device, or you can grep i915_gpu_info if that's available). We do have a central i915_capabilities with the intent of listing such pertinent information, so add the iommu status. Suggested-by: Martin Peres Signed-off-by: Chris Wilson Cc: Martin Peres Cc: Tomi Sarvela Cc: Mika Kuoppala Acked-by: Martin Peres Link: https://patchwork.freedesktop.org/patch/msgid/20190911114655.9254-1-chris@chris-wilson.co.uk commit 7cb8468bbede8cac0d9ed69b2549788ecaa6b558 Author: Chris Wilson Date: Wed Sep 11 13:57:17 2019 +0100 drm/i915/tgl: Disable read-only ppgtt support The same read-only affliction as befell Icelake is affecting Tigerlake. Disable the read-only support as clearly it was not fixed. Testcase: igt/i915_selftests/live_gem_context References: 3936867dbc1e ("drm/i915: Disable read only ppgtt support for gen11") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190911125717.28997-1-chris@chris-wilson.co.uk commit cfcbfdd8fe140af699b538a42cf0dd4933885fe5 Author: Ville Syrjälä Date: Mon Jul 8 15:53:09 2019 +0300 drm/i915: Remove pointless planes_changed=true assignment i915 doesn't use the crtc_state->plane_changed flag for anything, so setting it is pointless. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190708125325.16576-4-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit c26a058680dcf3140b6c4e918a16074a5e739b95 Author: Ville Syrjälä Date: Tue Sep 10 15:13:47 2019 +0300 drm/i915: Use a high priority wq for nonblocking plane updates system_unbound_wq can't keep up sometimes and we get dropped frames. Switch to a high priority variant. Reported-by: Heinrich Fink Tested-by: Heinrich Fink Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190910121347.22958-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 43ed22753cf18c4bf60de81d567beee908e5e9f3 Author: Chris Wilson Date: Wed Sep 11 08:47:27 2019 +0100 drm/i915/display: Add glk_cdclk_table Commit 736da8112fee ("drm/i915: Use literal representation of cdclk tables") pushed the cdclk logic into tables, adding glk_cdclk_table but not using yet: drivers/gpu/drm/i915/display/intel_cdclk.c:1173:38: error: ‘glk_cdclk_table’ defined but not used [-Werror=unused-const-variable=] Fixes: 736da8112fee ("drm/i915: Use literal representation of cdclk tables") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Matt Roper Cc: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190911074727.32585-1-chris@chris-wilson.co.uk commit 4dd2fbbfb532d0981b0ecd218c0597ac0047ca55 Author: Chris Wilson Date: Wed Sep 11 10:02:43 2019 +0100 drm/i915: Make i915_vma.flags atomic_t for mutex reduction In preparation for reducing struct_mutex stranglehold around the vm, make the vma.flags atomic so that we can acquire a pin on the vma atomically before deciding if we need to take the mutex. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190911090243.16786-1-chris@chris-wilson.co.uk commit 0606259e3b3a1220a0f04a92a1654a3f674f47ee Author: Kenneth Graunke Date: Tue Sep 10 18:48:01 2019 -0700 drm/i915: Whitelist COMMON_SLICE_CHICKEN2 This allows userspace to use "legacy" mode for push constants, where they are committed at 3DPRIMITIVE or flush time, rather than being committed at 3DSTATE_BINDING_TABLE_POINTERS_XS time. Gen6-8 and Gen11 both use the "legacy" behavior - only Gen9 works in the "new" way. Conflating push constants with binding tables is painful for userspace, we would like to be able to avoid doing so. Signed-off-by: Kenneth Graunke Cc: stable@vger.kernel.org Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190911014801.26821-1-kenneth@whitecape.org commit 99013b10100c4b552eec845ee2ca5604c8332e92 Author: Chris Wilson Date: Tue Sep 10 22:22:04 2019 +0100 drm/i915: Make shrink/unshrink be atomic Add an atomic counter and always take the spinlock around the pin/unpin events, so that we can perform the list manipulation concurrently. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190910212204.17190-1-chris@chris-wilson.co.uk commit 85dd14c2918d452fa875a4175bffb76e01c5af6e Author: Tvrtko Ursulin Date: Tue Sep 10 15:38:23 2019 +0100 drm/i915: Make pm_notify take intel_gt These notifications operate on intel_gt so make the code take what it needs. Signed-off-by: Tvrtko Ursulin Cc: Andi Shyti Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190910143823.10686-5-tvrtko.ursulin@linux.intel.com commit ee236af8d51439ce2d4396ecaf84062b34b15f85 Author: Tvrtko Ursulin Date: Tue Sep 10 15:38:22 2019 +0100 drm/i915: Avoid round-trip via i915 in intel_gt_park Both in the container_of and getting to gt->awake there is no need to go via i915 since both the wakeref and awake are members of gt. Signed-off-by: Tvrtko Ursulin Cc: Andi Shyti Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190910143823.10686-4-tvrtko.ursulin@linux.intel.com commit dab3588a151e5edb0cb0d56476265d2e5b3b1c79 Author: Tvrtko Ursulin Date: Tue Sep 10 15:38:21 2019 +0100 drm/i915: Make wait_for_timelines take struct intel_gt Timelines live in struct intel_gt so make wait_for_timelines take exactly what it needs. Signed-off-by: Tvrtko Ursulin Cc: Andi Shyti Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190910143823.10686-3-tvrtko.ursulin@linux.intel.com commit 61fa60ff6e6a0e16e9bcc15f632ce5437afa6494 Author: Tvrtko Ursulin Date: Tue Sep 10 15:38:20 2019 +0100 drm/i915: Move GT init to intel_gt.c Code in i915_gem_init_hw is all about GT init so move it to intel_gt.c renaming to intel_gt_init_hw. Existing intel_gt_init_hw is renamed to intel_gt_init_hw_early since it is currently called from driver probe. Signed-off-by: Tvrtko Ursulin Cc: Andi Shyti Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190910143823.10686-2-tvrtko.ursulin@linux.intel.com commit 07583467c256ed1acacb204a96d69beacb34b7f6 Author: Gerd Hoffmann Date: Thu Sep 5 09:05:09 2019 +0200 drm/ttm: remove embedded vma_offset_manager No users left. Drivers either setup vma_offset_manager themself (vmwgfx) or pass the gem vma_offset_manager to ttm_bo_device_init (all other drivers). Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Christian König Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-9-kraxel@redhat.com commit 293f86b365ad678dd89b61caa11b67270cc542a0 Author: Gerd Hoffmann Date: Thu Sep 5 09:05:08 2019 +0200 drm/vmwgfx: switch to own vma manager Add struct drm_vma_offset_manager to vma_private, initialize it and pass it to ttm_bo_device_init(). With this in place the last user of ttm's embedded vma offset manager is gone and we can remove it (in a separate patch). Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Thomas Hellström Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-8-kraxel@redhat.com commit 133e8809525ba9cc8384f1da454baa25b5506fea Author: Gerd Hoffmann Date: Thu Sep 5 09:05:07 2019 +0200 drm/qxl: switch to gem vma offset manager Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it instead of its own embedded struct. This makes some gem functions (specifically drm_gem_object_lookup) work on ttm objects. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-7-kraxel@redhat.com commit e7bf74d0aabe23099aa56e3687a83fb879c8ca96 Author: Gerd Hoffmann Date: Thu Sep 5 09:05:06 2019 +0200 drm/amdgpu: switch to gem vma offset manager Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it instead of its own embedded struct. This makes some gem functions (specifically drm_gem_object_lookup) work on ttm objects. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Christian König Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-6-kraxel@redhat.com commit 8b53e1cb2728b6326ac42ab23ca54f7bc2ce90bd Author: Gerd Hoffmann Date: Thu Sep 5 09:05:05 2019 +0200 drm/radeon: switch to gem vma offset manager Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it instead of its own embedded struct. This makes some gem functions (specifically drm_gem_object_lookup) work on ttm objects. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Christian König Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-5-kraxel@redhat.com commit f1acf41f9e325047569ad9fa8a71604bd680837f Author: Gerd Hoffmann Date: Thu Sep 5 09:05:04 2019 +0200 drm/vram: switch to gem vma offset manager Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it instead of its own embedded struct. This makes some gem functions (specifically drm_gem_object_lookup) work on ttm objects. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-4-kraxel@redhat.com commit e336befcfdc0438a05861a7f6b4c48c5083d2acc Author: Gerd Hoffmann Date: Thu Sep 5 09:05:03 2019 +0200 drm/nouveau: switch to gem vma offset manager Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it instead of its own embedded struct. This makes some gem functions (specifically drm_gem_object_lookup) work on ttm objects. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-3-kraxel@redhat.com commit 9d6f4484e81c0005f019c8e9b43629ead0d0d355 Author: Gerd Hoffmann Date: Thu Sep 5 09:05:02 2019 +0200 drm/ttm: turn ttm_bo_device.vma_manager into a pointer Rename the embedded struct vma_offset_manager, new name is _vma_manager. ttm_bo_device.vma_manager changed to a pointer. The ttm_bo_device_init() function gets an additional vma_manager argument which allows to initialize ttm with a different vma manager. When passing NULL the embedded _vma_manager is used. All callers are updated to pass NULL, so the behavior doesn't change. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Christian König Link: http://patchwork.freedesktop.org/patch/msgid/20190905070509.22407-2-kraxel@redhat.com commit 0c1279b58fc7de230d47bb0dc21b7a08417dee96 Author: Matt Roper Date: Tue Sep 10 08:42:52 2019 -0700 drm/i915: Consolidate {bxt,cnl,icl}_init_cdclk The BXT and CNL functions were already basically identical, whereas ICL's function tried to do its own sanitization rather than calling bxt_sanitize_cdclk. This should actually fix a bug in our ICL initialization where it would consider the /2 CD2X divider invalid and force an unnecessary sanitization (we now have valid clock frequencies that use this divider). Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190910154252.30503-9-matthew.d.roper@intel.com commit 8f9f717d6c44649353e153cfcd32ad99618956a9 Author: Matt Roper Date: Tue Sep 10 08:42:51 2019 -0700 drm/i915: Enhance cdclk sanitization When reading out the BIOS-programmed cdclk state, let's make sure that the cdclk value is on the valid list for the platform, ensure that the VCO matches the cdclk, and ensure that the CD2X divider was set properly. Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190910154252.30503-8-matthew.d.roper@intel.com commit d2f429ebb97725e9bec597aad2f0d2c7d203842f Author: Matt Roper Date: Tue Sep 10 08:42:50 2019 -0700 drm/i915: Add calc_voltage_level display vfunc With all of the cdclk function consolidation, we can cut down on a lot of platform if/else logic by creating a vfunc that's initialized at startup. Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190910154252.30503-7-matthew.d.roper@intel.com commit 751a93a15cde277ada4e1be14d93eb13a0dc3edd Author: Matt Roper Date: Tue Sep 10 08:42:49 2019 -0700 drm/i915: Consolidate {bxt,cnl,icl}_uninit_cdclk The uninitialize flow is the same on all of these platforms, aside from calculating a different frequency level. v2: Reverse platform conditional order for consistency. (Ville) Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190910154252.30503-6-matthew.d.roper@intel.com commit 5dac256bf76793d4e4c554a3c6784e39ccf06664 Author: Matt Roper Date: Tue Sep 10 08:42:48 2019 -0700 drm/i915: Kill cnl_sanitize_cdclk() The CNL variant of this function is identical to the BXT variant aside from not needing to handle SSA precharge. Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190910154252.30503-5-matthew.d.roper@intel.com commit 1cbcd3b4b168a08620153d2c5d52461a75338349 Author: Matt Roper Date: Tue Sep 10 08:42:47 2019 -0700 drm/i915: Combine bxt_set_cdclk and cnl_set_cdclk We'd previously combined ICL/TGL logic into the cnl_set_cdclk function, but BXT is pretty similar as well. Roll the cnl/icl/tgl logic back into the bxt function; the only things we really need to handle separately are punit notification and calling different functions to enable/disable the cdclk PLL. Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190910154252.30503-4-matthew.d.roper@intel.com commit 736da8112fee663deed6efc53333c37dc0b04696 Author: Matt Roper Date: Tue Sep 10 09:15:06 2019 -0700 drm/i915: Use literal representation of cdclk tables The bspec lays out legal cdclk frequencies, PLL ratios, and CD2X dividers in an easy-to-read table for most recent platforms. We've been translating the data from that table into platform-specific code logic, but it's easy to overlook an area we need to update when adding new cdclk values or enabling new platforms. Let's just add a form of the bspec table to the code and then adjust our functions to pull what they need directly out of the table. v2: Fix comparison when finding best cdclk. v3: Another logic fix for calc_cdclk. v4: - Use named initializers for cdclk tables. (Ville) - Include refclk as a field in the table instead of adding all three ratios for each entry. (Ville) - Terminate tables with an empty entry to avoid needing to store the table size. (Ville) - Don't try so hard to return reasonable values from our lookup functions if we get impossible inputs; just WARN and return 0. (Ville) - Keep a bxt_ prefix on the lookup functions since they're still only used on bxt+ for now. We can rename them later if we extend this table-based approach back to older platforms. (Ville) v5: - Fix cnl table's ratios for 24mhz refclk. (Ville) - Don't miss the named initializers on the cnl table. (Ville) - Represent refclk in table as u16 rather than u32. (Ville) Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190910161506.7158-1-matthew.d.roper@intel.com commit 71dc367e2bc37e1c235029003fbbc56a07fb6d58 Author: Matt Roper Date: Tue Sep 10 09:05:20 2019 -0700 drm/i915: Consolidate bxt/cnl/icl cdclk readout Aside from a few minor register changes and some different clock values, cdclk design hasn't changed much since gen9lp. Let's consolidate the handlers for bxt, cnl, and icl to keep the codeflow consistent. Also, while we're at it, s/bxt_de_pll_update/bxt_de_pll_readout/ since "update" makes me think we should be writing to hardware rather than reading from it. v2: - Fix icl_calc_voltage_level() limits. (Ville) - Use CNL_CDCLK_PLL_RATIO_MASK rather than BXT_DE_PLL_RATIO_MASK on gen10+ to avoid confusion. (Ville) v3: - Also fix ehl_calc_voltage_level() limits. (Ville) Cc: Ville Syrjälä Suggested-by: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190910160520.6587-1-matthew.d.roper@intel.com commit ab37c4d712c8b35c0c1e3237e04fe49f717055a4 Author: Chris Wilson Date: Tue Sep 10 17:16:57 2019 +0100 drm/i915/tgl: Disable rc6 for debugging Empirical evidence from CI tells us that our rc6 setup for Tigerlake is off. Disable rc6 on tgl temporary so that we gain CI coverage as we prepare a fix. It also appears that the BIOS on our tgl leaves rc6 enabled, so we have to explicitly disable it on init. References: https://bugs.freedesktop.org/show_bug.cgi?id=111593 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190910161657.23037-1-chris@chris-wilson.co.uk commit 07e98eb0a17482557198ae12a07a6e3a89de33a3 Author: Chris Wilson Date: Tue Sep 10 13:10:09 2019 +0100 drm/i915/selftests: Tighten the timeout testing for partial mmaps Currently, if there is time remaining before the start of the loop, we do one full iteration over many possible different chunks within the object. A full loop may take 50+s (depending on speed of indirect GTT mmapings) and we try separately with LINEAR, X and Y -- at which point igt times out. If we check more frequently, we will interrupt the loop upon our timeout -- it is hard to argue for as this significantly reduces the test coverage as we dramatically reduce the runtime. In practical terms, the coverage we should prioritise is in using different fence setups, forcing verification of the tile row computations over the current preference of checking extracting chunks. Though the exhaustive search is great given an infinite timeout, to improve our current coverage, we also add a randomised smoketest of partial mmaps. So let's do both, add a randomised smoketest of partial tiling chunks and the exhaustive (though time limited) search for failures. Even in adding another subtest, we should shave 100s off BAT! (With, hopefully, no loss in coverage, at least over multiple runs.) Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190910121009.13431-1-chris@chris-wilson.co.uk commit 7c465310fefc6a600eb69521b8420564f0f37b2d Author: Chris Wilson Date: Mon Sep 9 12:00:06 2019 +0100 drm/i915/selftests: Take runtime wakeref for igt_ggtt_lowlevel Being a "low-level" test, we opt to bypass the normal bind/unbind hooks for the lower level insert_entries/clear_range. For ggtt, the bind/unbind hooks provide the runtime wakeref and so we must also handle this in exercising the low level hooks. <4> [538.151672] RPM raw-wakeref not held <4> [538.151825] WARNING: CPU: 0 PID: 11 at ./drivers/gpu/drm/i915/intel_runtime_pm.h:107 fwtable_read32+0x1be/0x300 [i915] <4> [538.151830] Modules linked in: i915(+) amdgpu gpu_sched ttm vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic mei_hdcp btusb btrtl btbcm x86_pkg_temp_thermal coretemp btintel crct10dif_pclmul bluetooth crc32_pclmul snd_intel_nhlt snd_hda_codec ecdh_generic ghash_clmulni_intel ecc snd_hwdep snd_hda_core lpc_ich r8169 realtek snd_pcm mei_me mei prime_numbers pinctrl_broxton pinctrl_intel [last unloaded: i915] <4> [538.151861] CPU: 0 PID: 11 Comm: migration/0 Tainted: G U 5.3.0-rc7-CI-Trybot_4938+ #1 <4> [538.151864] Hardware name: Intel corporation NUC6CAYS/NUC6CAYB, BIOS AYAPLCEL.86A.0056.2018.0926.1100 09/26/2018 <4> [538.151960] RIP: 0010:fwtable_read32+0x1be/0x300 [i915] <4> [538.151965] Code: e8 e7 f9 5f e0 e9 0b ff ff ff 80 3d d5 8d 26 00 00 0f 85 81 fe ff ff 48 c7 c7 ef 01 bd a0 c6 05 c1 8d 26 00 01 e8 b2 e4 6a e0 <0f> 0b e9 67 fe ff ff 80 3d ad 8d 26 00 00 0f 85 65 fe ff ff 48 c7 <4> [538.151969] RSP: 0018:ffffc9000007be10 EFLAGS: 00010086 <4> [538.151972] RAX: 0000000000000000 RBX: ffff88826be10d50 RCX: 0000000000000002 <4> [538.151975] RDX: 0000000080000002 RSI: 0000000000000000 RDI: 00000000ffffffff <4> [538.151978] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 <4> [538.151981] R10: 0000000000000000 R11: ffffc9000007bcb0 R12: 0000000000101008 <4> [538.151984] R13: 0000000000000000 R14: ffffc9000036f638 R15: 0000000000000002 <4> [538.151987] FS: 0000000000000000(0000) GS:ffff888277a00000(0000) knlGS:0000000000000000 <4> [538.151990] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [538.151993] CR2: 00007fd48e7052f8 CR3: 0000000005210000 CR4: 00000000003406f0 <4> [538.151995] Call Trace: <4> [538.152106] bxt_vtd_ggtt_clear_range__cb+0x38/0x40 [i915] Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190909110011.8958-2-chris@chris-wilson.co.uk commit cec5ca08e36fd18d2939b98055346b3b06f56c6c Author: Chris Wilson Date: Mon Sep 9 12:00:08 2019 +0100 drm/i915: Perform GGTT restore much earlier during resume As soon as we re-enable the various functions within the HW, they may go off and read data via a GGTT offset. Hence, if we have not yet restored the GGTT PTE before then, they may read and even *write* random locations in memory. Detected by DMAR faults during resume. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Martin Peres Cc: Joonas Lahtinen Cc: stable@vger.kernel.org Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190909110011.8958-4-chris@chris-wilson.co.uk commit 0efa99dd58754d23e884b9ba41cd601f01b58c3d Author: Chris Wilson Date: Mon Sep 9 12:30:18 2019 +0100 drm/i915/ringbuffer: Flush writes before RING_TAIL update Be paranoid and make sure we flush any and all writes out of the WCB before performing the UC mmio to update the RING_TAIL. (An UC write should itself be enough to do the flush, hence the paranoia here.) Quite infrequently, we see problems where the GPU seems to overshoot the RING_TAIL and so executes garbage, hence the speculation. References: https://bugs.freedesktop.org/show_bug.cgi?id=111598 References: https://bugs.freedesktop.org/show_bug.cgi?id=111417 References: https://bugs.freedesktop.org/show_bug.cgi?id=111034 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190909113018.13300-1-chris@chris-wilson.co.uk commit 198d2533669bbe162e52eee2c35ddd8594967556 Author: Chris Wilson Date: Sat Sep 7 09:43:34 2019 +0100 drm/i915/execlists: Ignore lost completion events Icelake hit an issue where it missed reporting a completion event and instead jumped straight to a idle->active event (skipping over the active->idle and not even hitting the lite-restore preemption). 661497511us : process_csb: rcs0 cs-irq head=11, tail=0 661497512us : process_csb: rcs0 csb[0]: status=0x10008002:0x00000020 [lite-restore] 661497512us : trace_ports: rcs0: preempted { 28cc8:11052, 0:0 } 661497513us : trace_ports: rcs0: promote { 28cc8:11054, 0:0 } 661497514us : __i915_request_submit: rcs0 fence 28cc8:11056, current 11052 661497514us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes 661497515us : trace_ports: rcs0: submit { 28cc8:11056, 0:0 } 661497530us : process_csb: rcs0 cs-irq head=0, tail=1 661497530us : process_csb: rcs0 csb[1]: status=0x10008002:0x00000020 [lite-restore] 661497531us : trace_ports: rcs0: preempted { 28cc8:11054!, 0:0 } 661497535us : trace_ports: rcs0: promote { 28cc8:11056, 0:0 } 661497540us : __i915_request_submit: rcs0 fence 28cc8:11058, current 11054 661497544us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes 661497545us : trace_ports: rcs0: submit { 28cc8:11058, 0:0 } 661497553us : process_csb: rcs0 cs-irq head=1, tail=2 661497553us : process_csb: rcs0 csb[2]: status=0x10000001:0x00000000 [idle->active] 661497574us : process_csb: process_csb:1538 GEM_BUG_ON(*execlists->active) Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190907084334.28952-1-chris@chris-wilson.co.uk commit 4d154d33941dad07b9bb49c9dee356342a98e00a Author: Swati Sharma Date: Mon Sep 9 17:31:43 2019 +0530 drm/i915/display: Extract chv_read_luts() For cherryview, add hw read out to create hw blob of gamma lut values. Review comments from previous series: https://patchwork.freedesktop.org/patch/328252 v4: -No need to initialize *blob [Jani] -Removed right shifts [Jani] -Dropped dev local var [Jani] v5: -Returned blob instead of assigning it internally within the function [Ville] -Renamed function cherryview_get_color_config() to chv_read_luts() -Renamed cherryview_get_gamma_config() to chv_read_cgm_gamma_lut() [Ville] v9: -80 character limit [Uma] -Made read func para as const [Ville, Uma] -Renamed chv_read_cgm_gamma_lut() to chv_read_cgm_gamma_lut() [Ville, Uma] Signed-off-by: Swati Sharma Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1568030503-26747-4-git-send-email-swati2.sharma@intel.com commit 8efd06989df45fc81eb675e18e05b579bf064e8a Author: Swati Sharma Date: Mon Sep 9 17:31:42 2019 +0530 drm/i915/display: Extract i965_read_luts() For i965, add hw read out to create hw blob of gamma lut values. Review comments from old series: https://patchwork.freedesktop.org/series/58039/ v4: -No need to initialize *blob [Jani] -Removed right shifts [Jani] -Dropped dev local var [Jani] v5: -Returned blob instead of assigning it internally within the function [Ville] -Renamed i965_get_color_config() to i965_read_lut() [Ville] -Renamed i965_get_gamma_config_10p6() to i965_read_gamma_lut_10p6() [Ville] v9: -Typo and 80 character limit [Uma] -Made read func para as const [Ville, Uma] -Renamed i965_read_gamma_lut_10p6() to i965_read_lut_10p6() [Ville, Uma] v10: -Swapped ldw and udw while creating hw blob [Jani] -Added last index rgb lut value from PIPEGCMAX to h/w blob [Jani] Signed-off-by: Swati Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1568030503-26747-3-git-send-email-swati2.sharma@intel.com commit b0a7c754140bee6a1124b5bfad17205149942fd7 Author: Swati Sharma Date: Mon Sep 9 17:31:41 2019 +0530 drm/i915/display: Add gamma precision function for CHV intel_color_get_gamma_bit_precision() is extended for cherryview by adding chv_gamma_precision(), i965 will use existing i9xx_gamma_precision() func only. Signed-off-by: Swati Sharma Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1568030503-26747-2-git-send-email-swati2.sharma@intel.com commit fa9a09f15065650d97e3b1336d11e4ad9672b759 Author: Chris Wilson Date: Tue Sep 10 09:02:08 2019 +0100 drm/i915/execlists: Clear STOP_RING bit on reset During reset, we try to ensure no forward progress of the CS prior to the reset by setting the STOP_RING bit in RING_MI_MODE. Since gen9, this register is context saved and do we end up in the odd situation where we save the STOP_RING bit and so try to stop the engine again immediately upon resume. This is quite unexpected and causes us to complain about an early CS completion event! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111514 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190910080208.4223-1-chris@chris-wilson.co.uk commit 4f7f1973b0c85d5577a7f9226b8e14e51381bf9f Author: Gerd Hoffmann Date: Wed Sep 4 07:47:40 2019 +0200 drm/vram: fix Kconfig select isn't recursive, so we can't turn on DRM_TTM + DRM_TTM_HELPER in config DRM_VRAM_HELPER, we have to select them on the vram users instead. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190904054740.20817-8-kraxel@redhat.com commit 78d54f1f6a3353f54dee6f2be34fcbbcab0ac380 Author: Gerd Hoffmann Date: Wed Sep 4 07:47:39 2019 +0200 drm/qxl: use drm_gem_ttm_print_info Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190904054740.20817-7-kraxel@redhat.com commit b21fc73838faab07c89b48a2f6cdd99a4f8b3ae4 Author: Gerd Hoffmann Date: Wed Sep 4 07:47:38 2019 +0200 drm/qxl: use drm_gem_object_funcs callbacks Switch qxl to use drm_gem_object_funcs callbacks instead of drm_driver callbacks. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190904054740.20817-6-kraxel@redhat.com commit 9286766ba65be6ecc3779151191029fd9bbf5a3f Author: Gerd Hoffmann Date: Wed Sep 4 07:47:37 2019 +0200 drm/vram: add vram-mm debugfs file Wire up drm_mm_print() for vram helpers, using a new debugfs file, so one can see how vram is used: # cat /sys/kernel/debug/dri/0/vram-mm 0x0000000000000000-0x0000000000000300: 768: used 0x0000000000000300-0x0000000000000600: 768: used 0x0000000000000600-0x0000000000000900: 768: used 0x0000000000000900-0x0000000000000c00: 768: used 0x0000000000000c00-0x0000000000004000: 13312: free total: 16384, used 3072 free 13312 Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190904054740.20817-5-kraxel@redhat.com commit 527f6d91f8bbd2c03720c8efdccb8024999c25da Author: Gerd Hoffmann Date: Wed Sep 4 07:47:36 2019 +0200 drm/vram: use drm_gem_ttm_print_info Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190904054740.20817-4-kraxel@redhat.com commit ff540b76f14ac9922eb91894ebc1fab335e8be7e Author: Gerd Hoffmann Date: Wed Sep 4 07:47:35 2019 +0200 drm/ttm: add drm gem ttm helpers, starting with drm_gem_ttm_print_info() Now with ttm_buffer_object being a subclass of drm_gem_object we can easily lookup ttm_buffer_object for a given drm_gem_object, which in turn allows to create common helper functions. This patch starts off with a drm_gem_ttm_print_info() helper function which adds some ttm specific lines to the debug output. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190904054740.20817-3-kraxel@redhat.com commit 2dc5d44ccc5e7f032dbea2735b243f7f50ff863e Author: Gerd Hoffmann Date: Wed Sep 4 07:47:34 2019 +0200 drm: add drm_print_bits New helper to print named bits of some value (think flags fields). Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190904054740.20817-2-kraxel@redhat.com commit fd521d3b0ed2eb8b8c67c701795ecb08b9c3f544 Author: Matthew Auld Date: Mon Sep 9 18:16:46 2019 +0100 drm/i915: include GTT page-size info in error state It might prove useful in the future to know if the vma is utilising huge-GTT-pages. Related to this is the GTT cache, where there is some HW "quirkiness" where it must be disabled if using 2M pages, so include that for good measure. Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190909171646.22090-1-matthew.auld@intel.com commit 33dd8899231372a438bf7d96afa1dbe13a5e17c7 Author: Matthew Auld Date: Mon Sep 9 13:40:52 2019 +0100 drm/i915: cleanup cache-coloring Try to tidy up the cache-coloring such that we rid the code of any mm.color_adjust assumptions, this should hopefully make it more obvious in the code when we need to actually use the cache-level as the color, and as a bonus should make adding a different color-scheme simpler. Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Rodrigo Vivi Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190909124052.22900-3-matthew.auld@intel.com commit e9ceb751ad4ee69591bcd33b2a220738855395ea Author: Matthew Auld Date: Mon Sep 9 13:40:51 2019 +0100 drm/i915: s/i915_gtt_color_adjust/i915_ggtt_color_adjust Make it clear that the color adjust callback applies to the ggtt. Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Rodrigo Vivi Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190909124052.22900-2-matthew.auld@intel.com commit 1e0a96e508827ad88229bff32ea2641c83fc52a8 Author: Matthew Auld Date: Mon Sep 9 13:40:50 2019 +0100 drm/i915: export color_differs Export color_differs so that we can use it elsewhere. Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Rodrigo Vivi Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190909124052.22900-1-matthew.auld@intel.com commit 2236439bc6679caa905d65def47dacd12466c2e9 Author: Thomas Zimmermann Date: Fri Sep 6 14:20:56 2019 +0200 drm/vram: Implement lazy unmapping for GEM VRAM buffers Frequent mapping and unmapping a buffer object adds overhead for modifying the page table and creates debug output. Unmapping a buffer is only required when the memory manager evicts the buffer from its current location. v4: * WARN_ON if buffer is still mapped during BO cleanup Signed-off-by: Thomas Zimmermann Reviewed-by: Gerd Hoffmann Acked-by: Daniel Vetter Reported-and-tested-by: Davidlohr Bueso Link: https://patchwork.freedesktop.org/patch/msgid/20190906122056.32018-5-tzimmermann@suse.de commit f3309105b87956bdadfcc35bf0cefc463f427c9b Author: Thomas Zimmermann Date: Fri Sep 6 14:20:55 2019 +0200 drm/vram: Add infrastructure for move_notify() This patch prepares VRAM helpers for lazy unmapping of buffer objects. Signed-off-by: Thomas Zimmermann Reviewed-by: Gerd Hoffmann Acked-by: Daniel Vetter Reported-and-tested-by: Davidlohr Bueso Link: https://patchwork.freedesktop.org/patch/msgid/20190906122056.32018-4-tzimmermann@suse.de commit bc25bb9192c0438d84bf69ab72de02d3a4c3f827 Author: Thomas Zimmermann Date: Fri Sep 6 14:20:54 2019 +0200 drm/vram: Acquire lock only once per call to vmap()/vunmap() The implementation of vmap() is a combined pin() and kmap(). As both functions share the same lock, we can make vmap() slightly faster by acquiring the lock only once for both operations. Same for the inverse, vunmap(). Signed-off-by: Thomas Zimmermann Reviewed-by: Gerd Hoffmann Acked-by: Daniel Vetter Reported-and-tested-by: Davidlohr Bueso Link: https://patchwork.freedesktop.org/patch/msgid/20190906122056.32018-3-tzimmermann@suse.de commit 37a48adfba6cf6e87df9ba8b75ab85d514ed86d8 Author: Thomas Zimmermann Date: Fri Sep 6 14:20:53 2019 +0200 drm/vram: Add kmap ref-counting to GEM VRAM objects The kmap and kunmap operations of GEM VRAM buffers can now be called in interleaving pairs. The first call to drm_gem_vram_kmap() maps the buffer's memory to kernel address space and the final call to drm_gem_vram_kunmap() unmaps the memory. Intermediate calls to these functions increment or decrement a reference counter. This change allows for keeping buffer memory mapped for longer and minimizes the amount of changes to TLB, page tables, etc. v4: * lock in kmap()/kunmap() with ttm_bo_reserve() Signed-off-by: Thomas Zimmermann Reviewed-by: Gerd Hoffmann Acked-by: Daniel Vetter Reported-and-tested-by: Davidlohr Bueso Cc: Davidlohr Bueso Link: https://patchwork.freedesktop.org/patch/msgid/20190906122056.32018-2-tzimmermann@suse.de commit d810583fc2fcf139cc766eb2303500b2d9cf064d Author: Chris Wilson Date: Sat Sep 7 11:50:46 2019 +0100 drm/i915/execlists: Remove incorrect BUG_ON for schedule-out As we may unwind incomplete requests (for preemption) prior to processing the CSB and the schedule-out events, we may update rq->engine (resetting it to point back to the parent virtual engine) prior to calling execlists_schedule_out(), invalidating the assertion that the request still points to the inflight engine. (The likelihood of this is increased if the CSB interrupt processing is pushed to the ksoftirqd for being too slow and direct submission overtakes it.) Tvrtko summarised it as: "So unwind from direct submission resets rq->engine and races with process_csb from the tasklet which notices request has actually completed." Reported-by: Vinay Belgaumkar Fixes: df403069029d ("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Vinay Belgaumkar Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190907105046.19934-1-chris@chris-wilson.co.uk commit e5ef909cb42ced1a842c4fda1597cd8841f78b84 Author: Dariusz Marcinkiewicz Date: Wed Aug 14 12:45:02 2019 +0200 tda9950: use cec_notifier_cec_adap_(un)register Use the new cec_notifier_cec_adap_(un)register() functions to (un)register the notifier for the CEC adapter. Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil Signed-off-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20190814104520.6001-5-darekm@google.com commit 5d7f965e5675ae0cbec5fe56af79da9039f723ed Author: Matthew Auld Date: Thu Sep 5 10:29:21 2019 +0300 drm/i915/buddy: add missing call to i915_global_register We are meant to register the kmem cache at init, such the supplied exit and shrink hooks can be called. Signed-off-by: Matthew Auld Reviewed-by: Mika Kuoppala Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190905072921.7979-1-matthew.auld@intel.com commit 71137bfd98973efb7b762ba168df077b87b34311 Author: Dariusz Marcinkiewicz Date: Wed Aug 28 14:34:15 2019 +0200 drm: exynos: exynos_hdmi: use cec_notifier_conn_(un)register Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Changes since v7: - err_runtime_disable -> err_rpm_disable Changes since v2: - removed unnecessary call to invalidate phys address before deregistering the notifier, - use cec_notifier_phys_addr_invalidate instead of setting invalid address on a notifier. Signed-off-by: Dariusz Marcinkiewicz Tested-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: use 'if (!hdata->notifier)' instead of '== NULL'] Signed-off-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20190828123415.139441-1-darekm@google.com commit 7ac1573e263f231ab8b88b9d9fcbcd28a3af2869 Author: Hans Verkuil Date: Fri Aug 23 13:24:26 2019 +0200 drm/sun4i/sun4i_hdmi_enc: call cec_s_conn_info() Set the connector info for the CEC adapter. This helps userspace to associate the CEC device with the HDMI connector. Tested on a Cubieboard. Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190823112427.42394-3-hverkuil-cisco@xs4all.nl commit 92a57b3fb500e2b908f9b297efc41f55df110602 Author: Yannick Fertré Date: Fri Sep 6 11:21:48 2019 +0200 drm/stm: ltdc: add pinctrl for DPI encoder mode The implementation of functions encoder_enable and encoder_disable make possible to control the pinctrl according to the encoder type. The pinctrl must be activated only if the encoder type is DPI. This helps to move the DPI-related pinctrl configuration from all the panel or bridge to the LTDC dt node. Reviewed-by: Philippe Cornu Signed-off-by: Yannick Fertré Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1567761708-31777-1-git-send-email-yannick.fertre@st.com commit a793f0eeb7f5ba0c2a19a40c5a238063f8d12f72 Author: Laurent Pinchart Date: Wed Sep 4 16:37:23 2019 +0300 drm/panel: panel-simple: Set OSD070T1718 panel type The OSD070T1718 is a DPI panel, set its type accordingly. Signed-off-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190904133723.30418-1-laurent.pinchart@ideasonboard.com commit 89958b7cd9555a5d82556cc9a1f4c62fffda6f96 Author: Laurent Pinchart Date: Wed Sep 4 16:28:04 2019 +0300 drm/bridge: panel: Infer connector type from panel by default The drm panel bridge creates a connector using a connector type explicitly passed by the display controller or bridge driver that instantiates the panel bridge. Now that drm_panel reports its connector type, we can use it to avoid passing an explicit (and often incorrect) connector type to drm_panel_bridge_add() and devm_drm_panel_bridge_add(). Several drivers report incorrect or unknown connector types to userspace. Reporting a different type may result in a breakage. For that reason, rename (devm_)drm_panel_bridge_add() to (devm_)drm_panel_bridge_add_typed(), and add new (devm_)drm_panel_bridge_add() functions that use the panel connector type. Update all callers of (devm_)drm_panel_bridge_add() to the _typed function, they will be converted one by one after testing. The panel drivers have been updated with the following Coccinelle semantic patch, with manual inspection and fixes to indentation. @@ expression bridge; expression dev; expression panel; identifier type; @@ ( -bridge = drm_panel_bridge_add(panel, type); +bridge = drm_panel_bridge_add_typed(panel, type); | -bridge = devm_drm_panel_bridge_add(dev, panel, type); +bridge = devm_drm_panel_bridge_add_typed(dev, panel, type); ) Signed-off-by: Laurent Pinchart Reviewed-by: Boris Brezillon Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190904132804.29680-3-laurent.pinchart@ideasonboard.com commit 9a2654c0f62a1704f36acb6329f9ccbd539f75ad Author: Laurent Pinchart Date: Wed Sep 4 16:28:03 2019 +0300 drm/panel: Add and fill drm_panel type field Add a type field to the drm_panel structure to report the panel type, using DRM_MODE_CONNECTOR_* macros (the values that make sense are LVDS, eDP, DSI and DPI). This will be used to initialise the corresponding connector type. Update all panel drivers accordingly. The panel-simple driver only specifies the type for the known to be LVDS panels, while all other panels are left as unknown and will be converted on a case-by-case basis as they all need to be carefully reviewed. Signed-off-by: Laurent Pinchart Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190904132804.29680-2-laurent.pinchart@ideasonboard.com commit a515d64885054603fd33a8b31d380b4fbad0f6eb Author: Artur Rojek Date: Sat Jul 27 21:59:40 2019 +0200 IIO: Ingenic JZ47xx: Add support for JZ4770 SoC ADC. Add support for the ADC hardware present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Signed-off-by: Jonathan Cameron commit b23bf21f550a6736316e65bd302fff3c9cf78c7a Author: Artur Rojek Date: Sat Jul 27 21:59:39 2019 +0200 dt-bindings: iio/adc: Add AUX2 channel idx for JZ4770 SoC ADC Introduce support for AUX2 channel found in ADC hardware present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit cec8b1e3cb518e191a8491a426a03d4507fa82ee Author: Artur Rojek Date: Sat Jul 27 21:59:38 2019 +0200 dt-bindings: iio/adc: Add a compatible string for JZ4770 SoC ADC Add a compatible string for the ADC controller present on Ingenic JZ4770 SoC. Signed-off-by: Artur Rojek Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 5e7965681aced6c844372d3babbda4dbc629fadb Author: Colin Ian King Date: Sun Sep 1 16:27:49 2019 +0100 iio: light: cm36651: redundant assignment to variable ret Variable ret is being assigned a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Ununsed value") Signed-off-by: Colin Ian King Signed-off-by: Jonathan Cameron commit 42776c14c69224a75c781852ae4ca9a4811fd075 Author: Mircea Caprioru Date: Mon Sep 2 16:08:30 2019 +0300 staging: iio: adc: ad7192: Add system calibration support This patch will add a system calibration attribute for each channel. Using this option the user will have the ability to calibrate each channel for zero scale and full scale. It uses the iio_chan_spec_ext_info and IIO_ENUM to implement the functionality. Signed-off-by: Mircea Caprioru Signed-off-by: Jonathan Cameron commit c88c8cd8265a9c7c2bf57350ab9c64d89c7b596b Author: Mircea Caprioru Date: Mon Sep 2 16:08:29 2019 +0300 iio: adc: ad_sigma_delta: Export ad_sd_calibrate This patch exports the ad_sd_calibrate function in order to be able to call it from outside ad_sigma_delta. There are cases where the option to calibrate one channel at a time is necessary (ex. system calibration for zero scale and full scale). Signed-off-by: Mircea Caprioru Signed-off-by: Jonathan Cameron commit b73b93a2af3392b9b7b8ba7e818ee767499f9655 Author: Mircea Caprioru Date: Mon Sep 2 16:08:28 2019 +0300 iio: adc: ad7192: Add sysfs ABI documentation Add initial ABI documentation for ad7192 adc sysfs interfaces. Signed-off-by: Mircea Caprioru Signed-off-by: Jonathan Cameron commit 42014f69bb235f1123a6f8befb58b3e350a6f180 Author: Andi Shyti Date: Thu Sep 5 14:14:03 2019 +0300 drm/i915: Hook up GT power management Refactor the GT power management interface to work through the GT now that it is under the control of gt/ Based on a patch by Chris Wilson. Signed-off-by: Andi Shyti Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190905111403.10071-1-andi.shyti@intel.com commit 464828dfb1c9aa0febe17d6344d0d0400c151d7c Author: Arnd Bergmann Date: Fri Sep 6 17:13:00 2019 +0200 fbdev/sa1100fb: Remove even more dead code This function lost its only call site as part of earlier dead code removal, so remove it as well: drivers/video/fbdev/sa1100fb.c:975:21: error: unused function 'sa1100fb_min_dma_period' [-Werror,-Wunused-function] Fixes: 390e5de11284 ("fbdev/sa1100fb: Remove dead code") Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190906151307.1127187-1-arnd@arndb.de commit 42770cbf18aefbe632f34e4097c872f1dca0ec4a Author: Daniel Vetter Date: Fri Sep 6 16:44:59 2019 +0200 drm/blend: Define the direction of Z position values We forgot that. Proof is the one igt testcase we have: https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/tests/kms_atomic.c#L280 While at it also document that we have immutable zpos properties in some cases. Reported-by: Pekka Paalanen Cc: Pekka Paalanen Reviewed-by: Pekka Paalanen Cc: Ilia Mirkin Acked-by: Ilia Mirkin Reviewed-by: Daniel Stone Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190906144459.16025-1-daniel.vetter@ffwll.ch commit 5bf05dc58d65b215437df3013163a7eea78d5d4c Author: Michel Thierry Date: Fri Sep 6 15:23:14 2019 +0300 drm/i915/tgl: Register state context definition for Gen12 Gen12 has subtle changes in the reg state context offsets (some fields are gone, some are in a different location), compared to previous Gens. The simplest approach seems to be keeping Gen12 (and future platform) changes apart from the previous gens, while keeping the registers that are contiguous in functions we can reuse. v2: alias, virtual engine, rpcs, prune unused regs v3: use engine base (Daniele), take ctx_bb for all Bspec: 46255 Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Joonas Lahtinen Cc: José Roberto de Souza Signed-off-by: Michel Thierry Signed-off-by: Lucas De Marchi Signed-off-by: Mika Kuoppala Reviewed-by: Daniele Ceraolo Spurio Tested-by: Daniele Ceraolo Spurio [ickle: Tweaked the GEM_WARN_ON after settling on a compromise with Daniele] Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190906122314.2146-2-mika.kuoppala@linux.intel.com commit cdb736fa8b8b65740030ba8f9dc87f0fc3313858 Author: Mika Kuoppala Date: Fri Sep 6 16:49:57 2019 +0300 drm/i915: Use engine relative LRIs on context setup Daniele pointed out that relative mmio works differently in on context restore. Instead of adding the engine mmio base to offset, it masks out the base and adds bits [12:2] to current engine base. This should allow us to construct context register state to be applicable to all instances, including virtual. And avoid the trouble of updating the registers on virtual instances when submitting work. v2: only enable for gen12 for now (Mika) v3: make enabling readable (Chris) Bspec: 20206 Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Lucas De Marchi Cc: John Harrison Suggested-by: Daniele Ceraolo Spurio Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190906134957.25909-1-mika.kuoppala@linux.intel.com commit 71cd86cfaa12645ca39e5bbeceb2039af74fba2e Author: Matt Roper Date: Thu Sep 5 11:13:37 2019 -0700 drm/i915/tgl: Use refclk/2 as bypass frequency Unlike gen11, which always ran at 50MHz when the cdclk PLL was disabled, TGL runs at refclk/2. The 50MHz croclk/2 is only used by hardware during some power state transitions. Bspec: 49201 Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190905181337.23727-1-matthew.d.roper@intel.com Reviewed-by: Ville Syrjälä commit ca9cab183449787058f700fd0a74a8c91b277268 Author: Ville Syrjälä Date: Sat Apr 13 11:13:27 2019 +0000 drm/i915: add immutable zpos plane properties This adds basic immutable support for the zpos property. The zpos increases from bottom to top: primary, sprites, cursor. Signed-off-by: Ville Syrjälä [contact@emersion.fr: adapted for latest drm-tip] Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/YSH9PasoADJJdNJCSdI4m55ankIBsCaoSgkw-NQ5dlruCAxc8J-SQwVl5n3ddSAMDLTdbdyQvkONmtbjkUU-TQk5VIu1p-aZRO1OjjuSxjY=@emersion.fr Reviewed-by: Maarten Lankhorst commit a8c15954d64ac7177559c9f5eeb6593e5883fd69 Author: Chris Wilson Date: Tue Sep 3 07:21:33 2019 +0100 drm/i915: Protect debugfs per_file_stats with RCU lock If we make sure we grab a strong reference to each object as we dump it, we can reduce the locks outside of our iterators to an rcu_read_lock. This should prevent errors like: [ 2138.371911] BUG: KASAN: use-after-free in per_file_stats+0x43/0x380 [i915] [ 2138.371924] Read of size 8 at addr ffff888223651000 by task cat/8293 [ 2138.371947] CPU: 0 PID: 8293 Comm: cat Not tainted 5.3.0-rc6-CI-Custom_4352+ #1 [ 2138.371953] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.40 07/14/2017 [ 2138.371959] Call Trace: [ 2138.371974] dump_stack+0x7c/0xbb [ 2138.372099] ? per_file_stats+0x43/0x380 [i915] [ 2138.372108] print_address_description+0x73/0x3a0 [ 2138.372231] ? per_file_stats+0x43/0x380 [i915] [ 2138.372352] ? per_file_stats+0x43/0x380 [i915] [ 2138.372362] __kasan_report+0x14e/0x192 [ 2138.372489] ? per_file_stats+0x43/0x380 [i915] [ 2138.372502] kasan_report+0xe/0x20 [ 2138.372625] per_file_stats+0x43/0x380 [i915] [ 2138.372751] ? i915_panel_show+0x110/0x110 [i915] [ 2138.372761] idr_for_each+0xa7/0x160 [ 2138.372773] ? idr_get_next_ul+0x110/0x110 [ 2138.372782] ? do_raw_spin_lock+0x10a/0x1d0 [ 2138.372923] print_context_stats+0x264/0x510 [i915] Signed-off-by: Chris Wilson Tested-by: David Weinehall Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190903062133.27360-1-chris@chris-wilson.co.uk commit c7581a414d28413c1dd6d116d44859b5a52e0950 Author: Daniel Vetter Date: Wed Sep 4 16:39:42 2019 +0200 drm: Use EOPNOTSUPP, not ENOTSUPP - it's what we recommend in our docs: https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#recommended-ioctl-return-values - it's the overwhelmingly used error code for "operation not supported", at least in drm core (slightly less so in drivers): $ git grep EOPNOTSUPP -- drivers/gpu/drm/*c | wc -l 83 $ git grep ENOTSUPP -- drivers/gpu/drm/*c | wc -l 5 - include/linux/errno.h makes it fairly clear that these are for nfsv3 (plus they also have error codes above 512, which is the block with some special behaviour ...) /* Defined for the NFSv3 protocol */ If the above isn't reflecting current practice, then I guess we should at least update the docs. Noralf commented: Ben Hutchings made this comment[1] in a thread about use of ENOTSUPP in drivers: glibc's strerror() returns these strings for ENOTSUPP and EOPNOTSUPP respectively: "Unknown error 524" "Operation not supported" So at least for errors returned to userspace EOPNOTSUPP makes sense. José asked: > Hopefully this will not break any userspace None of the functions in drm_edid.c affected by this reach userspace, it's all driver internal. Same for the mipi function, that error code should be handled by drivers. Drivers are supposed to remap "the hw is on fire" to EIO when reporting up to userspace, but I think if a driver sees this it would be a driver bug. v2: Augment commit message with comments from Noralf and José Reviewed-by: José Roberto de Souza Acked-by: Noralf Trønnes Cc: José Roberto de Souza Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: Alex Deucher Cc: Andres Rodriguez Cc: Noralf Trønnes Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190904143942.31756-1-daniel.vetter@ffwll.ch commit 84f6fec42e9e66578bb63263cb5bb8407b0ca936 Author: Gerd Hoffmann Date: Wed Sep 4 09:48:28 2019 +0200 drm/virtio: fix command submission with objects but without fence. Only call virtio_gpu_array_add_fence if we actually have a fence. Fixes: da758d51968a ("drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing") Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190904074828.32502-1-kraxel@redhat.com commit aaef851083ed577a4a6094dec3caf7f00f1fd0db Author: José Roberto de Souza Date: Wed Sep 4 16:02:41 2019 -0700 drm/i915/mst: Do not hardcoded the crtcs that encoder can connect Tiger Lake has up to 4 pipes so the mask would need to be 0xf instead of 0x7. Do not hardcode the mask so it allows the fake MST encoders to connect to all pipes no matter how many the platform has. Iterating over all pipes to keep consistent with intel_ddi_init(). Initialy this patch was replaced by commit 4eaceea3a00f ("drm/i915: Fix DP-MST crtc_mask") but userspace it not correctly using encoder.possible_crtcs and it was reverted by commit e838bfa8e170 ("Revert "drm/i915: Fix DP-MST crtc_mask"") Userspace should be fixed but it might take a while, so bringing this patch back for now. Cc: Lucas De Marchi Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190904230241.20638-2-jose.souza@intel.com commit d10e0cb7591ef88fa8edfb164327a30d323b9d3d Author: José Roberto de Souza Date: Wed Sep 4 16:02:40 2019 -0700 drm/i915: Apply FBC WA for TGL too WA 1409120013 is also valid for TGL, so lets check for ">= 11". BSpec: 52890 Cc: Matt Roper Cc: Clinton Taylor Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190904230241.20638-1-jose.souza@intel.com commit 5b548ae63d584c76d41926e9efd63b0d2d56127f Author: Lucas De Marchi Date: Wed Sep 4 14:34:19 2019 -0700 drm/i915/tgl: add gen12 to stolen initialization Add case for gen == 12 and add MISSING_CASE() for future gens. We were already handling gen12 as the default, so this doesn't change the current behavior. BSpec: 19481 and 44980 Cc: CQ Tang Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190904213419.27547-7-jose.souza@intel.com Signed-off-by: José Roberto de Souza commit 8ffa4392a32e27b3945b8c0585550d3dd831c68b Author: Lucas De Marchi Date: Wed Sep 4 14:34:18 2019 -0700 drm/i915/tgl: disable SAGV temporarily SAGV is not currently working for Tiger Lake. We better disable it until the implementation is stabilized and we can enable it. HSDES: 1409542895 2208191909 Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190904213419.27547-6-jose.souza@intel.com Signed-off-by: José Roberto de Souza commit 4444df6e205bc1dc16ba112588815defe3c5a724 Author: Lucas De Marchi Date: Wed Sep 4 14:34:17 2019 -0700 drm/i915/tgl: move DP_TP_* to transcoder Gen 12 onwards moves the DP_TP_* registers to be transcoder-based rather than port-based. This adds the new register addresses and changes all the callers to use the register saved in intel_dp->regs.*. This is filled out when preparing to enable the port so we take into account if we should use the transcoder or the port. v2: reimplement by stashing the registers we want to access under intel_dp->reg. Now they are initialized when enabling the port. Ville suggested to store the transcoder to be used exclusively by TGL+. After implementing I thought just storing the register directly made it cleaner. Cc: Matt Roper Cc: Ville Syrjälä Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190904213419.27547-5-jose.souza@intel.com Signed-off-by: José Roberto de Souza commit e468ff06157a3bb1b70ac8ea807429446b8bf4b2 Author: Lucas De Marchi Date: Wed Sep 4 14:34:16 2019 -0700 drm/i915: protect access to DP_TP_* on non-dp DP_TP_{CTL,STATUS} should only be programmed when the encoder is intel_dp. Checking its current usages intel_disable_ddi_buf() is the only offender, with other places being protected by checks like pipe_config->fec_enable that is only set by intel_dp. v3 (José): - Using intel_crtc_has_dp_encoder() instead of intel_encoder_is_dp() (Ville) Cc: Matt Roper Cc: Ville Syrjälä Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190904213419.27547-4-jose.souza@intel.com Signed-off-by: José Roberto de Souza commit 8241cfbe67f4082eee5fc72e5a8025c5b58c2ddf Author: José Roberto de Souza Date: Wed Sep 4 14:34:15 2019 -0700 drm/i915/tgl: Access the right register when handling PSR interruptions For older gens PSR IIR and IMR have fixed addresses. From TGL onwards those registers moved to each transcoder offset. The bits for the registers are defined without an offset per transcoder as right now we have one register per transcoder. So add a fake "trans_shift" when calculating the bits offsets: it will be 0 for gen12+ and psr.transcoder otherwise. v2 (Lucas): change the implementation to use trans_shift instead of getting each bit value with a different macro Cc: Imre Deak Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190904213419.27547-3-jose.souza@intel.com commit 2f3b87124b9f08518b43abf2266035dd22fdbd3c Author: José Roberto de Souza Date: Wed Sep 4 14:34:14 2019 -0700 drm/i915/psr: Only handle interruptions of the transcoder in use It was enabling and checking PSR interruptions in every transcoder while it should keep the interruptions on the non-used transcoders masked. While doing this it gives us trouble on Tiger Lake if we are reading/writing to registers of disabled transcoders since from gen12 onwards the registers are relative to the transcoder. Instead of forcing them ON to access those registers, just avoid the accesses as they are not needed. v2 (Lucas): - Explain why we can't keep accessing all transcoders - Remove TODO about extending the irq handling to multiple instances: when/if implementing multiple instances it's pretty clear by the singleton psr that it needs to be extended - Fix intel_psr_debug_set() calling psr_irq_control() with psr.transcoder not set yet (from Imre). Now we only set the debug register right away if psr is already enabled. Otherwise we just record the value to be set when enabling the source. - Do not depend on the value of TRANSCODER_A. Just be relative to it (from Imre) - handle psr error last so we don't schedule the work before handling the other flags v3: - Adding a warning about setting reserverd bits on EDP_PSR_IMR Cc: Imre Deak Cc: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190904213419.27547-2-jose.souza@intel.com commit ab016914984e2a7405756dfc8a8e4cb54a4c1b48 Author: Daniel Vetter Date: Tue Aug 20 21:54:51 2019 +0200 drm/i915: disable set/get_tiling ioctl on gen12+ The cpu (de)tiler hw is gone, this stopped being useful. Plus it never supported any of the fancy new tiling formats, which means userspace also stopped using the magic side-channel this provides. This would totally break a lot of the igts, but they're already broken for the same reasons as userspace on gen12 would be. v2: Look at ggtt->num_fences instead, that also avoids the need for a comment (Chris). This also means that gen12 support really needs to make sure num_fences is set to 0. There is a patch for that, but it checks for HAS_MAPPABLE_APERTURE, which I'm not sure is the right thing really. Adding relevant people. Cc: Daniele Ceraolo Spurio Cc: Stuart Summers Cc: Matthew Auld Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Chris Wilson Cc: Lucas De Marchi Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Signed-off-by: José Roberto de Souza Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190820195451.15671-1-daniel.vetter@ffwll.ch commit e838bfa8e170415fa3cc8e83ecb171e809c0c422 Author: Ville Syrjälä Date: Tue Sep 3 18:40:18 2019 +0300 Revert "drm/i915: Fix DP-MST crtc_mask" This reverts commit 4eaceea3a00f8e936a7f48dcd0c975a57f88930f. Several userspace clients (modesetting ddx and mutter+wayland at least) handle encoder.possible_crtcs incorrectly. What they essentially do is the following: possible_crtcs = ~0; for_each_possible_encoder(connector) possible_crtcs &= encoder->possible_crtcs; Ie. they calculate the intersection of the possible_crtcs for the connector when they really should be calculating the union instead. In our case each MST encoder now has just one unique bit set, and so the intersection is always zero. The end result is that MST connectors can't be lit up because no crtc can be found to drive them. I've submitted a fix for the modesetting ddx [1], and complained on #wayland about mutter, so hopefully the situation will improve in the future. In the meantime we have regression, and so must go back to the old way of misconfiguring possible_crtcs in the kernel. [1] https://gitlab.freedesktop.org/xorg/xserver/merge_requests/277 Cc: Jonas Ådahl Cc: Stanislav Lisovskiy Cc: Lionel Landwerlin Cc: Dhinakaran Pandiyan Cc: Lucas De Marchi Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111507 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190903154018.26357-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 9d7b01e93526efe79dbf75b69cc5972b5a4f7b37 Author: Chris Wilson Date: Wed Sep 4 11:07:07 2019 +0100 drm/i915: Restore relaxed padding (OCL_OOB_SUPPRES_ENABLE) for skl+ This bit was fliped on for "syncing dependencies between camera and graphics". BSpec has no recollection why, and it is causing unrecoverable GPU hangs with Vulkan compute workloads. From BSpec, setting bit5 to 0 enables relaxed padding requirements for buffers, 1D and 2D non-array, non-MSAA, non-mip-mapped linear surfaces; and *must* be set to 0h on skl+ to ensure "Out of Bounds" case is suppressed. Reported-by: Jason Ekstrand Suggested-by: Jason Ekstrand Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110998 Fixes: 8424171e135c ("drm/i915/gen9: h/w w/a: syncing dependencies between camera and graphics") Signed-off-by: Chris Wilson Tested-by: denys.kostin@globallogic.com Cc: Jason Ekstrand Cc: Mika Kuoppala Cc: # v4.1+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190904100707.7377-1-chris@chris-wilson.co.uk commit 4bb6a9d5d9a8289673c4cb0786d44be8a63c21db Author: Swati Sharma Date: Wed Sep 4 00:52:57 2019 +0530 drm/i915/display: Extract glk_read_luts() For glk, add hw read out to create hw blob of gamma lut values. v4: -No need to initialize *blob [Jani] -Removed right shifts [Jani] -Dropped dev local var [Jani] v5: -Returned blob instead of assigning it internally within the function [Ville] -Renamed glk_get_color_config() to glk_read_luts() [Ville] -Added degamma validation [Ville] v9: -80 character limit [Uma] -Made read func para as const [Ville, Uma] Signed-off-by: Swati Sharma Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1567538578-4489-8-git-send-email-swati2.sharma@intel.com commit 6b97b118d4d542c7bc25b725c6de3947fffb921b Author: Swati Sharma Date: Wed Sep 4 00:52:56 2019 +0530 drm/i915/display: Extract ilk_read_luts() For ilk, add hw read out to create hw blob of gamma lut values. v4: -No need to initialize *blob [Jani] -Removed right shifts [Jani] -Dropped dev local var [Jani] v5: -Returned blob instead of assigning it internally within the function [Ville] -Renamed ilk_get_color_config() to ilk_read_luts() [Ville] v9: -80 character limit [Uma] -Made read func para as const [Ville, Uma] -Renamed ilk_read_gamma_lut() to ilk_read_lut_10() [Uma, Ville] v10: -Made ilk_read_luts() static [Jani] -ilk_load_lut_10 has lut_size, not (lut_size - 1) [Jani] Signed-off-by: Swati Sharma Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1567538578-4489-7-git-send-email-swati2.sharma@intel.com commit 1af22383829864299102ca0c2eab458f755a9971 Author: Swati Sharma Date: Wed Sep 4 00:52:55 2019 +0530 drm/i915/display: Extract i9xx_read_luts() For the legacy(gen < 4) gamma, add hw read out to create hw blob of gamma lut values. Also, add function intel_color_lut_pack to convert hw value with given bit precision to lut property val. v4: -No need to initialize *blob [Jani] -Removed right shifts [Jani] -Dropped dev local var [Jani] v5: -Returned blob instead of assigning it internally within the function [Ville] -Renamed function i9xx_get_color_config() to i9xx_read_luts() -Renamed i9xx_get_config_internal() to i9xx_read_lut_8() [Ville] v9: -Change in commit message [Jani, Uma] -Wrap commit within 75 characters [Uma] -Use macro for 256 [Uma] -Made read func para as const [Ville, Uma] v10: -Made i9xx_read_luts() static [Jani] Signed-off-by: Swati Sharma Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1567538578-4489-6-git-send-email-swati2.sharma@intel.com commit 7e764059cf708f262aa3c406af91f9f8f79e7f52 Author: Swati Sharma Date: Wed Sep 4 00:52:54 2019 +0530 drm/i915/display: Add macro to compare gamma hw/sw lut Add macro to compare hw/sw gamma lut values. First need to check whether hw/sw gamma mode matches or not. If not no need to compare lut values, if matches then only compare lut entries. v5: -Called PIPE_CONF_CHECK_COLOR_LUT inside if (!adjust) [Jani] -Added #undef PIPE_CONF_CHECK_COLOR_LUT [Jani] v8: -Added check for gamma mode before gamma lut entry comparison [Jani] -Split patch 3 into 4 patches Signed-off-by: Swati Sharma Reviewed-by: Uma Shankar Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1567538578-4489-5-git-send-email-swati2.sharma@intel.com commit e9c8f591445d7b99883889caab3c5d1aafcee360 Author: Swati Sharma Date: Wed Sep 4 00:52:53 2019 +0530 drm/i915/display: Add func to compare hw/sw gamma lut Add func intel_color_lut_equal() to compare hw/sw gamma lut values. Since hw/sw gamma lut sizes and lut entries comparison will be different for different gamma modes, add gamma mode dependent checks. v3: -Rebase v4: -Renamed intel_compare_color_lut() to intel_color_lut_equal() [Jani] -Added the default label above the correct label [Jani] -Corrected smatch warn "variable dereferenced before check" [Dan Carpenter] v5: -Added condition (!blob1 && !blob2) return true [Jani] v6: -Made patch11 as patch3 [Jani] v8: -Split patch 3 into 4 patches -Optimized blob check condition [Ville] v9: -Exclude spilt gamma mode (bdw and ivb platforms) as there is exception in way gamma values are written in hardware [Ville] -Added exception made in commit [Uma] -Dropped else, character limit and indentation [Uma] -Added multi segmented gama mode for icl+ platforms [Uma] v10: -Dropped multi segmented mode for icl+ platforms [Jani] -Removed references of sw and hw state in compare code [Jani] -Dropped inline from func [Jani] Signed-off-by: Swati Sharma Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1567538578-4489-4-git-send-email-swati2.sharma@intel.com commit 145450f6a42df99523967a0da42bdb00dacb413b Author: Swati Sharma Date: Wed Sep 4 00:52:51 2019 +0530 drm/i915/display: Add func to get gamma bit precision Each platform supports different gamma modes and each gamma mode has different bit precision. Here bit precision corresponds to number of bits the hw LUT supports. Add func per platform to return bit precision corresponding to gamma mode which will be later used as a parameter in lut comparison function intel_color_lut_equal(). This is done for legacy, ilk, glk and their variant platforms. v6: -Added func intel_color_get_bit_precision() to get bit precision for gamma and degamma lut readout depending upon platform and corresponding to load_luts() [Ankit] -Made patch11 as patch3 [Jani] v7: -Renamed func intel_color_get_bit_precision() to intel_color_get_gamma_bit_precision() -Added separate function/platform for gamma bit precision [Ville] -Corrected checkpatch warnings v8: -Split patch 3 into 4 separate patches v9: -Changed commit message, gave more info [Uma] -Added precision func for icl+ platform v10: -Removed precision func for chv and icl+ platforms [Jani] -Added gamma_enable check once [Jani] Signed-off-by: Swati Sharma Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1567538578-4489-2-git-send-email-swati2.sharma@intel.com commit b1a4383d1e6e6003fceba9aae14bda77bfe03dc3 Author: Swati Sharma Date: Wed Sep 4 00:52:52 2019 +0530 drm/i915/display: Add debug log for color parameters Add debug log for color related parameters like gamma_mode, gamma_enable, csc_enable, etc inside intel_dump_pipe_config(). v6: -Added debug log for color para in intel_dump_pipe_config [Jani] v7: -Split patch 3 into 4 patches v8: -Corrected alignment [Uma] Signed-off-by: Swati Sharma Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1567538578-4489-3-git-send-email-swati2.sharma@intel.com commit f0c6cef7e7174bdb11bbf972cded48bbb33bfba4 Author: Gerd Hoffmann Date: Fri Aug 30 08:01:16 2019 +0200 drm/virtio: add worker for object release Move object release into a separate worker. Releasing objects requires sending commands to the host. Doing that in the dequeue worker will cause deadlocks in case the command queue gets filled up, because the dequeue worker is also the one which will free up slots in the command queue. Reported-by: Chia-I Wu Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Tested-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190830060116.10476-1-kraxel@redhat.com commit 12afce08ed51a67aafcc678f4b6e428d71b1f6fb Author: Gerd Hoffmann Date: Thu Aug 29 12:33:01 2019 +0200 drm/virtio: add fence sanity check Make sure we don't leak half-initialized fences outside the driver. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-19-kraxel@redhat.com commit 6e3372508d5ffee81396edfc23259bd042d35de6 Author: Gerd Hoffmann Date: Thu Aug 29 12:33:00 2019 +0200 drm/virtio: drop virtio_gpu_object_{reserve, unreserve} No users left. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-18-kraxel@redhat.com commit fe16537ddb971748f5856c7c4a22657fbbb6f62f Author: Gerd Hoffmann Date: Thu Aug 29 12:32:59 2019 +0200 drm/virtio: drop virtio_gpu_object_{ref,unref} No users left. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-17-kraxel@redhat.com commit 2e0d9ee457851ca0afbfec59466e9e7cae734389 Author: Gerd Hoffmann Date: Thu Aug 29 12:32:58 2019 +0200 drm/virtio: remove virtio_gpu_alloc_object Thin wrapper around virtio_gpu_object_create(), but calling that directly works equally well. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-16-kraxel@redhat.com commit c66df701e783bc666593e6e665f13670760883ee Author: Gerd Hoffmann Date: Thu Aug 29 12:32:57 2019 +0200 drm/virtio: switch from ttm to gem shmem helpers virtio-gpu basically needs a sg_table for the bo, to tell the host where the backing pages for the object are. So the gem shmem helpers are a perfect fit. Some drm_gem_object_funcs need thin wrappers to update the host state, but otherwise the helpers handle everything just fine. Once the fencing was sorted the switch was surprisingly easy and for the most part just removing the ttm code. v4: fix drm_gem_object_funcs name. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-15-kraxel@redhat.com commit ad75f4f057e61869d4b4d9b091bbbea224332d47 Author: Gerd Hoffmann Date: Thu Aug 29 12:32:56 2019 +0200 drm/virtio: drop virtio_gpu_object_list_validate/virtio_gpu_unref_list No users left. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-14-kraxel@redhat.com commit 93c38d15ee59127f79cf1a740ae77ae6ecbe9d4a Author: Gerd Hoffmann Date: Thu Aug 29 12:32:55 2019 +0200 drm/virtio: rework virtio_gpu_cmd_context_{attach, detach}_resource Switch to the virtio_gpu_array_* helper workflow. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-13-kraxel@redhat.com commit 3d3bdbc0bdbd9497751f9e305fba223d7a77dc9c Author: Gerd Hoffmann Date: Thu Aug 29 12:32:54 2019 +0200 drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing Switch to the virtio_gpu_array_* helper workflow. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-12-kraxel@redhat.com commit 375f156a5e77cdf15c9a17b326fb7caa05306e30 Author: Gerd Hoffmann Date: Thu Aug 29 12:32:53 2019 +0200 drm/virtio: rework virtio_gpu_transfer_from_host_ioctl fencing Switch to the virtio_gpu_array_* helper workflow. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-11-kraxel@redhat.com commit e2324300f427ffca99135b256a97f9fb62fc2483 Author: Gerd Hoffmann Date: Thu Aug 29 12:32:52 2019 +0200 drm/virtio: rework virtio_gpu_object_create fencing Rework fencing workflow. Stop using ttm helpers, use the virtio_gpu_array_* helpers instead. Due to using the gem reservation object it is initialized and ready for use before calling ttm_bo_init. So we can simply use the standard fencing workflow and drop the tricky logic which checks whenever the command is in flight still. v6: rewrite most of the patch. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-10-kraxel@redhat.com commit da758d51968a88fc879bdbd16a0da4784499b5bb Author: Gerd Hoffmann Date: Thu Aug 29 12:32:51 2019 +0200 drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing Rework fencing workflow, starting with virtio_gpu_execbuffer_ioctl. Stop using ttm helpers, use the virtio_gpu_array_* helpers (which work on the reservation objects directly) instead. Also store the object array in struct virtio_gpu_vbuffer, so we explicitly keep a reference of all buffers used instead of depending on ttm_bo_put() checking whenever the object is actually idle before releasing it. New workflow: (1) All gem objects needed by a command are added to a virtio_gpu_object_array. (2) All reservation objects will be locked (virtio_gpu_array_lock_resv). (3) virtio_gpu_fence_emit() completes fence initialization. (4) fence gets added to the objects, reservation objects are unlocked (virtio_gpu_array_add_fence, virtio_gpu_array_unlock_resv). (5) virtio command is submitted to the host. (6) The completion callback (virtio_gpu_dequeue_ctrl_func) will drop object references and free virtio_gpu_object_array. v6: rewrite most of the patch. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-9-kraxel@redhat.com commit 98abe21d07c84e03fddceabb238c9d548e5d4ddf Author: Gerd Hoffmann Date: Thu Aug 29 12:32:50 2019 +0200 drm/virtio: add virtio_gpu_object_array & helpers Some helper functions to manage an array of gem objects. v9: use dma_resv_lock_interruptible. v6: - add ticket to struct virtio_gpu_object_array. - add virtio_gpu_array_{lock,unlock}_resv helpers. - add virtio_gpu_array_add_fence helper. v5: some small optimizations (Chia-I Wu). v4: make them virtio-private instead of generic helpers. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-8-kraxel@redhat.com commit cde14fd4a604e9abf4c9f25f9ab12ecc8fc3935a Author: Gerd Hoffmann Date: Thu Aug 29 12:32:49 2019 +0200 drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve} Call reservation_object_* directly instead of using ttm_bo_{reserve,unreserve}. v4: check for EINTR only. v3: check for EINTR too. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-7-kraxel@redhat.com commit 23a0e88ebafffab96deca371287d5d27053b0368 Author: Gerd Hoffmann Date: Thu Aug 29 12:32:48 2019 +0200 drm/virtio: drop no_wait argument from virtio_gpu_object_reserve All callers pass no_wait = false. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-6-kraxel@redhat.com commit 191ab21995b0412ff84946005663365cafd00dcc Author: Gerd Hoffmann Date: Thu Aug 29 12:32:47 2019 +0200 drm/virtio: remove virtio_gpu_object_wait No users left. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-5-kraxel@redhat.com commit 620f9c5e302cdd015663aeb25f195ee122956bd1 Author: Gerd Hoffmann Date: Thu Aug 29 12:32:46 2019 +0200 drm/virtio: simplify cursor updates No need to do the reservation dance, we can just wait on the fence directly. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-4-kraxel@redhat.com commit 29cf12394c0565d7eb1685bf0c1b4749aa6a8b66 Author: Gerd Hoffmann Date: Thu Aug 29 12:32:45 2019 +0200 drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper. Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl(). This also makes the ioctl run lockless. v9: fix return value. v5: handle lookup failure. v2: use reservation_object_test_signaled_rcu for VIRTGPU_WAIT_NOWAIT. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-3-kraxel@redhat.com commit 889165ad6190556ffe4a8fa6b0e486f1c25589d8 Author: Gerd Hoffmann Date: Thu Aug 29 12:32:44 2019 +0200 drm/virtio: pass gem reservation object to ttm init With this gem and ttm will use the same reservation object, so mixing and matching ttm / gem reservation helpers should work fine. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-2-kraxel@redhat.com commit 37dfdc55ffeb08b20b623eba04a3e3eb3a261962 Author: Lyude Paul Date: Tue Sep 3 16:45:53 2019 -0400 drm/dp_mst: Cleanup drm_dp_send_link_address() a bit Declare local pointer to the drm_dp_link_address_ack_reply struct instead of constantly dereferencing it through the union in txmsg->reply. Then, invert the order of conditionals so we don't have to do the bulk of the work inside them, and can wrap lines even less. Then finally, rearrange variable declarations a bit. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-16-lyude@redhat.com commit 8b1e589d138c8ad82a3424a9f3df8a74a4a2837a Author: Lyude Paul Date: Tue Sep 3 16:45:51 2019 -0400 drm/dp_mst: Refactor drm_dp_mst_handle_down_rep() * Remove the big ugly have_eomt conditional * Store &mgr->down_rep_recv.initial_hdr in a var to make line wrapping easier * Remove duplicate memset() calls * Actually wrap lines Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-14-lyude@redhat.com commit a29d881875fc27c3ffe56af242adf38448b3d857 Author: Lyude Paul Date: Tue Sep 3 16:45:50 2019 -0400 drm/dp_mst: Refactor drm_dp_mst_handle_up_req() There's a couple of changes here, so to summarize: * Remove the big ugly mgr->up_req_recv.have_eomt conditional to save on indenting * Store &mgr->up_req_recv.initial_hdr in a variable so we don't keep going over 80 character long lines * De-duplicate code for calling drm_dp_send_up_ack_reply() and getting the MSTB via it's GUID * Remove all of the duplicate calls to memset() and just use a goto instead * Actually do line wrapping * Remove the unnecessary if (mstb) check before calling drm_dp_mst_topology_put_mstb() - we are guaranteed to always have mstb != NULL at that point in the function Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-13-lyude@redhat.com commit fde61a7a7df46ce8206c8a7b3aa181c330113184 Author: Lyude Paul Date: Tue Sep 3 16:45:49 2019 -0400 drm/dp_mst: Constify guid in drm_dp_get_mst_branch_by_guid() And it's helper, we'll be using this in just a moment. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-12-lyude@redhat.com commit 60f9ae9d0d3dfb4c1ee8af476e04aaa11d5fd34d Author: Lyude Paul Date: Tue Sep 3 16:45:48 2019 -0400 drm/dp_mst: Remove huge conditional in drm_dp_mst_handle_up_req() Which reduces indentation and makes this function more legible. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-11-lyude@redhat.com commit 95b0013d209dc2fb2a4c8a6025b79e4bb6fabec8 Author: Lyude Paul Date: Tue Sep 3 16:45:47 2019 -0400 drm/dp_mst: Refactor drm_dp_send_enum_path_resources Use more pointers so we don't have to write out txmsg->reply.u.path_resources each time. Also, fix line wrapping + rearrange local variables. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-10-lyude@redhat.com commit 2f015ec6eab69301fdcf54d397810d72362d7223 Author: Lyude Paul Date: Tue Sep 3 16:45:45 2019 -0400 drm/dp_mst: Add sideband down request tracing + selftests Unfortunately the DP MST helpers do not have much in the way of debugging utilities. So, let's add some! This adds basic debugging output for down sideband requests that we send from the driver, so that we can actually discern what's happening when sideband requests timeout. Since there wasn't really a good way of testing that any of this worked, I ended up writing simple selftests that lightly test sideband message encoding and decoding as well. Enjoy! Changes since v1: * Clean up DO_TEST() and sideband_msg_req_encode_decode() - danvet * Get rid of pr_fmt(), just define a prefix string instead and use drm_printf() * Check highest bit of VCPI in drm_dp_decode_sideband_req() - danvet * Make the switch case order between drm_dp_decode_sideband_req() and drm_dp_encode_sideband_req() the same - danvet * Only check DRM_UT_DP - danvet * Clean up sideband_msg_req_equal() from selftests a bit, and add comments explaining why we can't just use memcmp - danvet Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-8-lyude@redhat.com commit aa2a2fe1383fff13d2822ff9fce4013eacf2a0cb Author: Lyude Paul Date: Tue Sep 3 17:57:02 2019 -0400 drm/dp_mst: Combine redundant cases in drm_dp_encode_sideband_req() Noticed this while working on adding a drm_dp_decode_sideband_req(). DP_POWER_DOWN_PHY/DP_POWER_UP_PHY both use the same struct as DP_ENUM_PATH_RESOURCES, so we can just combine their cases. Changes since v2: * Fix commit message Signed-off-by: Lyude Paul Reviewed-by: Dave Airlie Cc: Daniel Vetter Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/20190903215702.16984-1-lyude@redhat.com commit 0de54fb2d02b1f1d604db57b12341c53f07cbaf4 Author: Lyude Paul Date: Tue Sep 3 16:45:43 2019 -0400 drm/print: Add drm_err_printer() A simple convienence function that returns a drm_printer which prints using pr_err() Changes since v1: * Make __drm_printfn_err() more consistent with DRM_ERROR() - danvet Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-6-lyude@redhat.com commit 7cbce45d6243225914b5c967b4ee927a2327842a Author: Lyude Paul Date: Tue Sep 3 16:45:42 2019 -0400 drm/dp_mst: Move test_calc_pbn_mode() into an actual selftest Yes, apparently we've been testing this for every single driver load for quite a long time now. At least that means our PBN calculation is solid! Anyway, introduce self tests for MST and move this into there. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-5-lyude@redhat.com commit 3ba64aa36c8c6516ea0c01e3acd13c5fcb5a482c Author: Lyude Paul Date: Tue Sep 3 16:45:40 2019 -0400 drm/dp_mst: Get rid of list clear in destroy_connector_work This seems to be some leftover detritus from before the port/mstb kref cleanup and doesn't do anything anymore, so get rid of it. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-3-lyude@redhat.com commit 5950f0b797fc77705d46dfa5b7d0db325c8f3c44 Author: Lyude Paul Date: Tue Sep 3 16:45:39 2019 -0400 drm/dp_mst: Move link address dumping into a function Makes things easier to read. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-2-lyude@redhat.com commit 8f9fb61caed13e282e1e3387e64905b90cc65abd Author: Chris Wilson Date: Mon Sep 2 05:02:46 2019 +0100 drm/i915: Refresh the errno to vmf_fault translations It's been a long time since we accidentally reported -EIO upon wedging, it can now only be generated by failure to swap in a page. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue Reviewed-by: Abdiel Janulgue Link: https://patchwork.freedesktop.org/patch/msgid/20190902040303.14195-4-chris@chris-wilson.co.uk commit 88ad7f3a56603234eaa0297a722a3b8a338f2441 Author: Daniel Vetter Date: Fri Jul 19 17:23:14 2019 +0200 drm/vkms: Reduce critical section in vblank_simulate We can reduce the critical section in vkms_vblank_simulate under output->lock quite a lot: - hrtimer_forward_now just needs to be ordered correctly wrt drm_crtc_handle_vblank. We already access the hrtimer timestamp without locks. While auditing that I noticed that we don't correctly annotate the read there, so sprinkle a READ_ONCE to make sure the compiler doesn't do anything foolish. - drm_crtc_handle_vblank must stay under the lock to avoid races with drm_crtc_arm_vblank_event. - The access to vkms_ouptut->crc_state also must stay under the lock. - next problem is making sure the output->state structure doesn't get freed too early. First we rely on a given hrtimer being serialized: If we call drm_crtc_handle_vblank, then we are guaranteed that the previous call to vkms_vblank_simulate has completed. The other side of the coin is that the atomic updates waits for the vblank to happen before it releases the old state. Both taken together means that by the time the atomic update releases the old state, the hrtimer won't access it anymore (it might be accessing the new state at the same time, but that's ok). - state is invariant, except the few fields separate protected by state->crc_lock. So no need to hold the lock for that. - finally the queue_work. We need to make sure there's no races with the flush_work, i.e. when we call flush_work we need to guarantee that the hrtimer can't requeue the work again. This is guaranteed by the same vblank/hrtimer ordering guarantees like the reasoning above why state won't be freed too early: flush_work on the old state is called after wait_for_flip_done in the atomic commit code. Therefore we can also move everything after the output->crc_state out of the critical section. Motivated by suggestions from Rodrigo. Signed-off-by: Daniel Vetter Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Daniel Vetter Reviewed-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20190719152314.7706-3-daniel.vetter@ffwll.ch commit 4922fd18cc1ac919759140f16542ca49b957cc37 Author: Daniel Vetter Date: Fri Jul 19 17:23:13 2019 +0200 drm/vkms: Use wait_for_flip_done It's the recommended version, wait_for_vblanks is a bit a hacky interim thing that predates all the flip_done tracking. It's unfortunately still the default ... Signed-off-by: Daniel Vetter Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Daniel Vetter Reviewed-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20190719152314.7706-2-daniel.vetter@ffwll.ch commit bd7e3f3ba1efab5c2c188d097589b9bc93ffaeaa Author: Daniel Vetter Date: Tue Jul 23 15:13:37 2019 +0200 drm/vblank: Document and fix vblank count barrier semantics Noticed while reviewing code. I'm not sure whether this might or might not explain some of the missed vblank hilarity we've been seeing on various drivers (but those got tracked down to driver issues, at least mostly). I think those all go through the vblank completion event, which has unconditional barriers - it always takes the spinlock. Therefore no cc stable. v2: - Barrriers are hard, put them in in the right order (Chris). - Improve the comments a bit. v3: Ville noticed that on 32bit we might be breaking up the load/stores, now that the vblank counter has been switched over to be 64 bit. Fix that up by switching to atomic64_t. This this happens so rarely in practice I figured no need to cc: stable ... Cc: Ville Syrjälä Cc: Keith Packard References: 570e86963a51 ("drm: Widen vblank count to 64-bits [v3]") Cc: Rodrigo Siqueira Cc: Chris Wilson Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190723131337.22031-1-daniel.vetter@ffwll.ch commit 5fcd055193c5d4cac6d205bd65e52c957ea057c2 Author: Mihail Atanassov Date: Wed Aug 28 11:03:49 2019 +0000 drm/komeda: Add ACLK rate to sysfs Expose node with the name 'aclk_hz' Signed-off-by: Mihail Atanassov Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Ayan kumar halder Link: https://patchwork.freedesktop.org/patch/msgid/20190828110342.45936-1-mihail.atanassov@arm.com commit 6914f8eb64f9de5308e2968968145cf6eb304025 Author: Heinrich Fink Date: Mon Sep 2 16:24:12 2019 +0200 drm: Add high-precision time to vblank trace event Store the timestamp of the current vblank in the new field 'time' of the vblank trace event. If the timestamp is calculated by a driver that supports high-precision vblank timing, set the field 'high-prec' to 'true'. User space can now access actual hardware vblank times via the tracing infrastructure. Tracing applications (such as GPUVis, see [0] for related discussion), can use the newly added information to conduct a more accurate analysis of display timing. v2 Fix author name (missing last name) [0] https://github.com/mikesart/gpuvis/issues/30 Reviewed-by: Daniel Vetter Signed-off-by: Heinrich Fink Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190902142412.27846-2-heinrich.fink@daqri.com commit f2690074462bdb99530179f41ae73b45e765b761 Author: Chris Wilson Date: Sun Sep 1 12:04:31 2019 +0100 drm/i915/selftests: Remove unused __engines_name() This function was never used and probably will never be used, so remove it. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20190901110431.12393-1-chris@chris-wilson.co.uk commit 5a90606df7cb73eceb46897a87154e94b31af93a Author: Chris Wilson Date: Mon Sep 2 05:02:47 2019 +0100 drm/i915: Replace obj->pin_global with obj->frontbuffer obj->pin_global was originally used as a means to keep the shrinker off the active scanout, but we use the vma->pin_count itself for that and the obj->frontbuffer to delay shrinking active framebuffers. The other role that obj->pin_global gained was for spotting display objects inside GEM and working harder to keep those coherent; for which we can again simply inspect obj->frontbuffer directly. Coming up next, we will want to manipulate the pin_global counter outside of the principle locks, so would need to make pin_global atomic. However, since obj->frontbuffer is already managed atomically, it makes sense to use that the primary key for display objects instead of having pin_global. Ville pointed out the principle difference is that obj->frontbuffer is set for as long as an intel_framebuffer is attached to an object, but obj->pin_global was only raised for as long as the object was active. In practice, this means that we consider the object as being on the scanout for longer than is strictly required, causing us to be more proactive in flushing -- though it should be true that we would have flushed eventually when the back became the front, except that on the flip path that flush is async but when hit from another ioctl it will be synchronous. v2: i915_gem_object_is_framebuffer() Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190902040303.14195-5-chris@chris-wilson.co.uk commit 4f36ef2ee1876b2e145327f03f675a0577f258cb Author: Chris Wilson Date: Mon Sep 2 05:02:44 2019 +0100 drm/i915: Report aliasing ppgtt size as ggtt size The aliasing-ppgtt is constrained to be the same size as the Global GTT since it aliases the same address space. Simplifying gtt size reporting in this case. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190902040303.14195-2-chris@chris-wilson.co.uk commit 8f5e2b306b4e26db0ec65e0a27b232b179c9122b Author: Chris Wilson Date: Mon Sep 2 05:02:43 2019 +0100 drm/i915: Restrict the aliasing-ppgtt to the size of the ggtt The aliasing-ppgtt is not allowed to be smaller than the ggtt, nor should we advertise it as being any bigger, or else we may get sued for false advertisement. Testcase: igt/gem_exec_big Fixes: 0b718ba1e884 ("drm/i915/gtt: Downgrade Cherryview back to aliasing-ppgtt") Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190902040303.14195-1-chris@chris-wilson.co.uk commit 9e362992ff34cab695e669ef1e3f4f65463087e5 Author: Ville Syrjälä Date: Wed Aug 28 21:34:24 2019 +0300 drm/i915: Clean up HDMI deep color handling a bit Reogranize the HDMI deep color state computation to just loop over possible bpc values. Avoids having to maintain so many variants of the clock etc. The current code also looks confused w.r.t. port_clock vs. bw_constrained. It would happily update port_clock for deep color but then not actually enable deep color due to bw_constrained being set. The new logic handles that case correctly. v2: Pull stuff into separate funcs (Jani) Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190828183424.7856-1-ville.syrjala@linux.intel.com commit 66a990dd0c49b534b2396934c1659b3fef34233d Author: Ville Syrjälä Date: Fri Aug 30 21:27:19 2019 +0300 drm/i915: Prefer encoder->name over port_name() enum port is a mess now because it no longer matches the spec at all. Let's start to dig ourselves out of this hole by reducing our reliance on port_name(). This should at least make a bunch of debug messages a bit more sensible while we think how to fill the the hole properly. Based on the following cocci script with a lot of manual cleanup (all the format strings etc.): @@ expression E; @@ ( - port_name(E->port) + E->base.base.id, E->base.name | - port_name(E.port) + E.base.base.id, E.base.name ) @@ enum port P; expression E; @@ P = E->port <... - port_name(P) + E->base.base.id, E->base.name ...> @@ enum port P; expression E; @@ P = E.port <... - port_name(P) + E.base.base.id, E.base.name ...> @@ expression E; @@ { - enum port P = E; ... when != P } Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190830182719.32608-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 75427b2a2bffc083d51dec389c235722a9c69b05 Author: Ville Syrjälä Date: Wed Aug 28 13:20:59 2019 +0300 drm/i915: Limit MST to <= 8bpc once again My attempt at allowing MST to use the higher color depths has regressed some configurations. Apparently people have setups where all MST streams will fit into the DP link with 8bpc but won't fit with higher color depths. What we really should be doing is reducing the bpc for all the streams on the same link until they start to fit. But that requires a bit more work, so in the meantime let's revert back closer to the old behavior and limit MST to at most 8bpc. Cc: stable@vger.kernel.org Cc: Lyude Paul Tested-by: Geoffrey Bennett Fixes: f1477219869c ("drm/i915: Remove the 8bpc shackles from DP MST") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111505 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190828102059.2512-1-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul commit acff2f86b195653a9487fe3dbdbc821d77eff54a Author: Linus Walleij Date: Fri Aug 23 09:14:28 2019 +0200 drm/sti: Include the right header The sti_hdmi.c file include despite not even using any GPIOs. What it does use is devm_ioremap_nocache() which comes from implicitly by including that header. Fix this up by including the right header instead. Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Linus Walleij Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20190823071428.6155-1-linus.walleij@linaro.org commit 536cce149769aee3f0426a9ef87bbd3a3d9a0951 Author: Dariusz Marcinkiewicz Date: Wed Aug 14 12:45:04 2019 +0200 drm: sti: use cec_notifier_conn_(un)register Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Changes since v2: Don't invalidate physical address before unregistering the notifier. Signed-off-by: Dariusz Marcinkiewicz Acked-by: Hans Verkuil Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20190814104520.6001-7-darekm@google.com commit c41784b042ac9cf97f2e871aceef3e06eff14140 Author: Cheng-Yi Chiang Date: Mon Sep 2 11:54:35 2019 +0800 drm: dw-hdmi-i2s: enable audio clock in audio_startup In the designware databook, the sequence of enabling audio clock and setting format is not clearly specified. Currently, audio clock is enabled in the end of hw_param ops after setting format. On some monitors, there is a possibility that audio does not come out. Fix this by enabling audio clock in audio_startup ops before hw_param ops setting format. Signed-off-by: Cheng-Yi Chiang Reviewed-by: Douglas Anderson Reviewed-by: Jonas Karlman Tested-by: Douglas Anderson Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20190902035435.44463-1-cychiang@chromium.org commit dffa8feb308455f9b3ce0eeb55a4eac3afc0786b Author: Chris Wilson Date: Fri Aug 30 19:19:29 2019 +0100 drm/i915/perf: Assert locking for i915_init_oa_perf_state() We use the context->pin_mutex to serialise updates to the OA config and the registers values written into each new context. Document this relationship and assert we do hold the context->pin_mutex as used by gen8_configure_all_contexts() to serialise updates to the OA config itself. v2: Add a white-lie for when we call intel_gt_resume() from init. v3: Lie while we have the context pinned inside atomic reset. Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20190830181929.18663-1-chris@chris-wilson.co.uk commit 3d1da92baffe69cf847699ceccf4297356da58fa Author: Matt Roper Date: Mon Aug 26 15:55:40 2019 -0700 drm/i915: Add 324mhz and 326.4mhz cdclks for gen11+ The bspec was recently updated with these new cdclk values for ICL, EHL, and TGL. Bspec: 20598 Bspec: 49201 Cc: José Roberto de Souza Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190826225540.11987-3-matthew.d.roper@intel.com commit 385ba629aa1cdca5373c1fdbf6693ade5062ad27 Author: Matt Roper Date: Thu Aug 29 17:48:28 2019 -0700 drm/i915: Allow /2 CD2X divider on gen11+ The bspec has just recently been updated with new cdclk values that require the use of a /2 CD2X divider rather than a /1 divider. Once we add the divider selection logic to ICL+ cdclk programming, we have pretty much the same logic we were already using on CNL, so it's simpler to drop icl_set_cdclk() completely and reuse cnl_set_cdclk() on gen11+ platforms as well. v2: - Using ICL_CDCLK_CD2X_PIPE_NONE + BXT_CDCLK_CD2X_PIPE(pipe) for TGL is correct, but looks really confusing. Add some TGL_ macros that alias these to avoid confusion. (Ville) - Use DIV_ROUND_CLOSEST rather than / when applying the divider. (Ville) Cc: José Roberto de Souza Cc: Lucas De Marchi Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190830004828.19359-1-matthew.d.roper@intel.com commit 7bff9779d76917adfa7c67712aa6ae3b7e5098ba Author: Maarten Lankhorst Date: Fri Aug 30 12:16:44 2019 +0200 drm/i915: Fix regression with crtc disable ordering When we moved the code to disable crtc's to a separate patch, we forgot to ensure that for_each_oldnew_intel_crtc_in_state_reverse() was moved as well. Signed-off-by: Maarten Lankhorst Fixes: 66d9cec8a6c9 ("drm/i915/display: Move the commit_tail() disable sequence to separate function") Cc: Ville Syrjälä Cc: Manasi Navare Cc: José Roberto de Souza Reviewed-by: Manasi Navare Reviewed-by: José Roberto de Souza Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190830101644.8740-1-maarten.lankhorst@linux.intel.com commit aabbe344dc3ca5f7d8263a02608ba6179e8a4499 Author: Chris Wilson Date: Fri Aug 30 19:03:25 2019 +0100 drm/i915: Use RCU for unlocked vm_idr lookup Since i915_address_space is now RCU protected, we can do the vm_idr lookup without taking the vm_idr_mutex, just with the rcu_read_lock() instead. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190830180325.7755-1-chris@chris-wilson.co.uk commit c1d143dd2ac8d481500fec4c0d715ff301d2766f Author: Chris Wilson Date: Fri Aug 30 19:00:00 2019 +0100 drm/i915: Remove ppgtt->dirty_engines This is no longer used anywhere and so can be removed. However, tracking the dirty status on the ppgtt doesn't work very well if the ppgtt is shared, so perhaps for the best that it is no longer required. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190830180000.24608-3-chris@chris-wilson.co.uk commit 0b718ba1e884f64dce27c19311dd2859b87e56b9 Author: Chris Wilson Date: Fri Aug 30 18:59:59 2019 +0100 drm/i915/gtt: Downgrade Cherryview back to aliasing-ppgtt With the upcoming change in timing (dramatically reducing the latency between manipulating the ppGTT and execution), no amount of tweaking could save Cherryview, it would always fail to invalidate its TLB. Signed-off-by: Chris Wilson Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190830180000.24608-2-chris@chris-wilson.co.uk commit 3dc007fe9b2b256d2779bb9e9a0d372eb1d90643 Author: Chris Wilson Date: Fri Aug 30 18:59:58 2019 +0100 drm/i915/gtt: Downgrade gen7 (ivb, byt, hsw) back to aliasing-ppgtt With the upcoming change in timing (dramatically reducing the latency between manipulating the ppGTT and execution), no amount of tweaking could save Baytrail, it would always fail to invalidate its TLB. Ville was right, Baytrail is beyond hope. v2: Rollback on all gen7; same timing instability on TLB invalidation. Signed-off-by: Chris Wilson Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190830180000.24608-1-chris@chris-wilson.co.uk commit 40e98130c32889e4ed128d129b824107b90501fe Author: Lucas De Marchi Date: Thu Aug 29 14:15:26 2019 -0700 drm/i915: unify icp, tgp and mcc irq setup Use a single function to setup the SDE irq and make MCC, ICP and TGP use it, just like was done for the irq handler. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190829211526.30525-4-jose.souza@intel.com Signed-off-by: José Roberto de Souza commit b32821c036310c49cdc45639b1d451b21fc3f17b Author: Lucas De Marchi Date: Thu Aug 29 14:15:25 2019 -0700 drm/i915: parameterize SDE hotplug registers Ice Lake, Tiger Lake and Elkhart Lake all have different port configurations and all of them can be parameterized the same way to form the SDE hotplug bitmask. Avoid making them a special case an just use the parameterized macros. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190829211526.30525-3-jose.souza@intel.com Signed-off-by: José Roberto de Souza commit 58676af69c2eb1e0202215fcfc1d421f186226ed Author: Lucas De Marchi Date: Thu Aug 29 14:15:24 2019 -0700 drm/i915: unify icp, tgp and mcc irq handling The differences are only on the pins, trigger and long_detect function. The MCC handling is already partially merged, so merge TGP as well. Remove the pins argument from icp_irq_handler() so we have all the differences between the 3 set in a common if ladder. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190829211526.30525-2-jose.souza@intel.com Signed-off-by: José Roberto de Souza commit ed3126fa0d393825f2f134668b31363581035825 Author: Lucas De Marchi Date: Thu Aug 29 14:15:23 2019 -0700 drm/i915: parameterize south hpd macros South, follow the north. Instead of defining separate macros for each port, make them take port as parameter as done for TC ports and for north engine. This will allow us to easily extend this as needed. tgp_ddi_port_hotplug_long_detect() is also removed as after the EHL introduction the tgp variant is an exact copy of icp. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190829211526.30525-1-jose.souza@intel.com Signed-off-by: José Roberto de Souza commit 4072761b981c630acbc6195391e5a22bae114e39 Author: Joonas Lahtinen Date: Fri Aug 30 11:58:49 2019 +0300 drm/i915: Indent GuC/WOPCM documentation sections Indent GuC/WOPCM documentation correctly to reside under "Memory Management and Command Submission" section to avoid it escaping to the upper level navigation. Signed-off-by: Joonas Lahtinen Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Acked-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190830085849.12519-2-joonas.lahtinen@linux.intel.com commit b047463c852272ef9956ad3a4c706f78f8b06c17 Author: Joonas Lahtinen Date: Fri Aug 30 11:58:48 2019 +0300 drm/i915: Remove link to missing "Batchbuffer Pools" documentation The referenced documentation section has been removed. Remove the link to avoid warning when building the documentation. Signed-off-by: Joonas Lahtinen Cc: Chris Wilson Cc: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190830085849.12519-1-joonas.lahtinen@linux.intel.com commit 692059318c0fc6c3584b861adc67abbb0c1598f0 Author: Ramalingam C Date: Wed Aug 28 22:12:16 2019 +0530 drm/i915/hdcp: Enable HDCP 1.4 and 2.2 on Gen12+ >From Gen12 onwards, HDCP HW block is implemented within transcoders. Till Gen11 HDCP HW block was part of DDI. Hence required changes in HW programming is handled here. As ME FW needs the transcoder detail on which HDCP is enabled on Gen12+ platform, we are populating the detail in hdcp_port_data. v2: _MMIO_TRANS is used [Lucas and Daniel] platform check is moved into the caller [Lucas] v3: platform check is moved into a macro [Shashank] v4: Few optimizations in the coding [Shashank] v5: Fixed alignment in macro definition in i915_reg.h [Shashank] unused variables "reg" is removed. v6: Configuring the transcoder at compute_config. transcoder is used instead of pipe in macros. Rebased. v7: transcoder is cached at intel_hdcp hdcp_port_data is configured with transcoder index asper ME FW. v8: s/trans/cpu_transcoder s/tc/cpu_transcoder v9: rep_ctl is prepared for TCD too. return moved into deault of rep_ctl prepare function [Shashank] Signed-off-by: Ramalingam C Reviewed-by: Shashank Sharma Acked-by: Jani Nikula Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20190828164216.405-7-ramalingam.c@intel.com commit 39e2df090c3cdce23a064929333b3be119111765 Author: Ramalingam C Date: Wed Aug 28 22:12:15 2019 +0530 drm/i915/hdcp: update current transcoder into intel_hdcp On gen12+ platforms, HDCP HW is associated to the transcoder. Hence on every modeset update associated transcoder into the intel_hdcp of the port. v2: s/trans/cpu_transcoder [Jani] v3: comment is added for fw_ddi init for gen12+ [Shashank] only hdcp capable transcoder is translated into fw_tc [Shashank] v4: fw_tc initialization is kept for modeset. [Tomas] few extra doc is added at port_data init [Tomas] v5: Few comments are improvised [Tomas] Signed-off-by: Ramalingam C Acked-by: Jani Nikula Reviewed-by: Shashank Sharma Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20190828164216.405-6-ramalingam.c@intel.com commit 2d15cf1b9ae4c623b1a05838317f4c18fd534c9a Author: Ramalingam C Date: Wed Aug 28 22:12:14 2019 +0530 misc/mei/hdcp: Fill transcoder index in port info For gen12+ platform we need to pass the transcoder info as part of the port info into ME FW. This change fills the payload for ME FW from hdcp_port_data. v2: Doc is enhanced for physical_port and attached_transcoder [Tomas] Signed-off-by: Ramalingam C Acked-by: Jani Nikula Reviewed-by: Shashank Sharma Acked-by: Tomas Winkler Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20190828164216.405-5-ramalingam.c@intel.com commit 807c71d59a1063badc8bf60ee71470c2ff4be1cc Author: Ramalingam C Date: Wed Aug 28 22:12:13 2019 +0530 drm: Extend I915 mei interface for transcoder info I915 needs to send the index of the transcoder as per ME FW. To support this, define enum mei_fw_tc and add as a member into the struct hdcp_port_data. v2: Typo in commit msg is fixed [Shashank] v3: kdoc is added for mei_fw_tc [Tomas] s/MEI_TC_x/MEI_TRANSCODER_x Signed-off-by: Ramalingam C Acked-by: Jani Nikula Acked-by: Tomas Winkler Reviewed-by: Shashank Sharma Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20190828164216.405-4-ramalingam.c@intel.com commit 5b6030da28cd6d6f5d129d7039ea0db83bcee6cf Author: Ramalingam C Date: Wed Aug 28 22:12:12 2019 +0530 drm: Move port definition back to i915 header We dont need the definition of the enum port outside I915, anymore. Hence move enum port definition into I915 driver itself. v2: intel_display.h is included in intel_hdcp.h v3: enum port is declared in headers. v4: commit msg is rephrased. v5: copyright year is updated [Tomas] Signed-off-by: Ramalingam C Reviewed-by: Jani Nikula Reviewed-by: Shashank Sharma Reviewed-by: Tomas Winkler Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20190828164216.405-3-ramalingam.c@intel.com commit 0dcceb35a13de07d8c28305b69a33b339c7eba0a Author: Ramalingam C Date: Wed Aug 28 22:12:11 2019 +0530 drm/i915: mei_hdcp: I915 sends ddi index as per ME FW I915 converts it's port value into ddi index defiend by ME FW and pass it as a member of hdcp_port_data structure. Hence expose the enum mei_fw_ddi to I915 through i915_mei_interface.h. v2: Copyright years are bumped [Tomas] Signed-off-by: Ramalingam C Acked-by: Jani Nikula Reviewed-by: Shashank Sharma Acked-by: Tomas Winkler Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20190828164216.405-2-ramalingam.c@intel.com commit 11988e393813f520974f69bf0e55c367a1cbac48 Author: Chris Wilson Date: Thu Aug 29 09:11:15 2019 +0100 drm/i915/execlists: Try rearranging breadcrumb flush The addition of the DC_FLUSH failed to ensure sanctity of the post-sync write as CI immediately got a completion CS-event before the breadcrumb was coherent. So let's try the other idea of moving the post-sync write into the CS_STALL. References: https://bugs.freedesktop.org/show_bug.cgi?id=111514 References: e8f6b4952ec5 ("drm/i915/execlists: Flush the post-sync breadcrumb write harder") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190829081150.10271-2-chris@chris-wilson.co.uk commit 66d9cec8a6c9f3eb1d81507d5f045e28272359fb Author: Manasi Navare Date: Wed Aug 28 15:47:01 2019 -0700 drm/i915/display: Move the commit_tail() disable sequence to separate function Create a new function intel_commit_modeset_disables() consistent with the naming in drm atomic helpers and similar to the enable function. This helps better organize the disable sequence in atomic_commit_tail() No functional change v4: * Do not create a function pointer, just a function (Maarten) v3: * Rebase (Manasi) v2: * Create a helper for old_crtc_state disables (Lucas) Suggested-by: Daniel Vetter Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Matt Roper Cc: Jani Nikula Signed-off-by: Manasi Navare Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190828224701.422-1-manasi.d.navare@intel.com commit 0c84127102ee240e3039d6e78a3dba0afff2f810 Author: Manasi Navare Date: Tue Aug 27 15:17:34 2019 -0700 drm/i915/display: Rename update_crtcs() to commit_modeset_enables() This patch has no functional changes. This just renames the update_crtcs() hooks to commit_modeset_enables() to match the drm_atomic helper naming conventions. v2: * Rebase on drm-tip Suggested-by: Daniel Vetter Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Matt Roper Cc: Jani Nikula Reviewed-by: Maarten Lankhorst Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190827221735.29351-2-manasi.d.navare@intel.com commit 31444afb460ee627cb7800acee46548449c52368 Author: Matthew Auld Date: Thu Aug 29 21:19:19 2019 +0100 drm/i915: s/for_each_sgt_dma/for_each_sgt_daddr/ The sg_table for our backing store might contain addresses from stolen-memory or in the future local-memory, at which point this is no longer a dma-iterator. As a consequence we should now break on NULL iter.sgp, instead of dmap == 0 which is considered an invalid dma address. As a bonus, gcc much prefers this construct, Function old new delta gen8_ggtt_insert_entries 211 192 -19 gen6_ggtt_insert_entries 292 262 -30 i915_error_object_create 996 954 -42 Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190829201919.21493-1-matthew.auld@intel.com commit 9be02fde93e5b564663f10a48f19159fba718e3d Author: Fernando Pacheco Date: Thu Aug 29 10:41:53 2019 -0700 drm/i915/uc: Extract common code from GuC stop/disable comm During normal driver unload we attempt to disable GuC communication while it is currently stopped. This results in a nop'd call to intel_guc_ct_disable within guc_disable_communication because stop/disable rely on the same flag to prevent further comms with CT. We can avoid the call to disable and still leave communication in a satisfactory state by extracting a set of shared steps from stop/disable. This set can include guc_disable_interrupts as we do not require the single caller of guc_stop_communication to be atomic: "drm/i915/selftests: Fixup atomic reset checking". This situation (stop -> disable) only occurs during intel_uc_fini_hw, so during fini, call guc_disable_communication only if currently enabled. The symmetric calls to enable/disable remain unmodified for all other scenarios. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110943 Signed-off-by: Fernando Pacheco Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190829174154.14675-1-fernando.pacheco@intel.com commit e7b6affd0baef7b3c5e2acd94236093dcf437105 Author: Chris Wilson Date: Thu Aug 29 18:08:48 2019 +0100 drm/i915/selftests: cond_resched() within the longer buddy tests Let the scheduler have a breather in between passes of the longer buddy tests. Important if we are running under kasan etc and this takes far longer than usual! Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190829170848.969-1-chris@chris-wilson.co.uk commit 268de6530aa18fe5773062367fd119f0045f6e88 Author: Sean Paul Date: Thu Aug 29 12:52:19 2019 -0400 drm: mst: Fix query_payload ack reply struct Spec says[1] Allocated_PBN is 16 bits [1]- DisplayPort 1.2 Spec, Section 2.11.9.8, Table 2-98 Fixes: ad7f8a1f9ced ("drm/helper: add Displayport multi-stream helper (v0.6)") Cc: Lyude Paul Cc: Todd Previte Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Reviewed-by: Lyude Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190829165223.129662-1-sean@poorly.run commit 6a87d4ea94b0a6a998ca009f11c5e7ffbf7ebc90 Author: Laurent Pinchart Date: Sat Aug 24 00:23:53 2019 +0300 drm/ingenic: Hardcode panel type to DPI The ingenic driver supports DPI panels only at the moment, so hardcode their type to DPI instead of Unknown. Signed-off-by: Laurent Pinchart Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20190823212353.29369-1-laurent.pinchart@ideasonboard.com # *** extracted tags *** Reviewed-by: Sam Ravnborg commit 99d7a74110ef4c97f921b90fa8d897c6d71610a9 Author: José Roberto de Souza Date: Fri Aug 23 01:20:39 2019 -0700 drm/i915/tgl: PSR link standby is not supported anymore According to BSpc if link standby is set on TGL+, PSR will not be enabled. Vendors should not use panels that requires link standby and even if they do, panel should assert a PSR error that will cause PSR to be disabled. BSpec: 50434 Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-8-lucas.demarchi@intel.com commit 074c77e3ec636fa5e2664e3c79aba397ec569761 Author: Dhinakaran Pandiyan Date: Tue Aug 27 01:45:16 2019 -0700 drm/i915/tgl: Gen-12 display loses Yf tiling and legacy CCS support Yf tiling was removed in gen-12, so do not expose Yf modifiers to user space. Gen-12 display also is incompatible with pre-gen12 Y-tiled CCS, so do not expose I915_FORMAT_MOD_Y_TILED_CCS. v2: Rebase to carry forward recently added gen11 formats. Cc: Ville Syrjälä Cc: Stanislav Lisovskiy Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190827084516.6748-1-dhinakaran.pandiyan@intel.com commit 3ef2f119bd3edf12469632629d5ae33f255dbaa5 Author: Boris Brezillon Date: Mon Aug 26 17:26:36 2019 +0200 drm/msm: Use drm_attach_bridge() to attach a bridge to an encoder This is part of our attempt to make the bridge chain a double-linked list based on the generic list helpers. In order to do that, we must patch all drivers manipulating the encoder->bridge field directly. Signed-off-by: Boris Brezillon Reviewed-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190826152649.13820-9-boris.brezillon@collabora.com commit ee68c743f8d0747585b4c0c171c039d6635bda7c Author: Boris Brezillon Date: Mon Aug 26 17:26:29 2019 +0200 drm: Stop including drm_bridge.h from drm_crtc.h We are about to add a drm_bridge_state that inherits from drm_private_state which is defined in drm_atomic.h. Problem is, drm_atomic.h includes drm_crtc.h which in turn includes drm_bridge.h, leading to "drm_private_state has incomplete type" error. Let's force all users of the drm_bridge API to explicitly include drm_bridge.h. Signed-off-by: Boris Brezillon Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190826152649.13820-2-boris.brezillon@collabora.com commit 9770f22077981cac2bd2f4dd6caa6269892cd3f7 Author: Madhumitha Tolakanahalli Pradeep Date: Thu Aug 22 17:46:55 2019 -0700 drm/i915/tgl: Enabling DSC on Pipe A for TGL DSC was not supported on Pipe A for previous platforms. Tigerlake onwards, all the pipes support DSC. Hence, the DSC and FEC restriction on Pipe A needs to be removed. v2: Changes in the logic around removing the restriction around Pipe A (Manasi, Lucas) Cc: Manasi Navare Signed-off-by: Madhumitha Tolakanahalli Pradeep Reviewed-by: Manasi Navare Reviewed-by: Lucas De Marchi Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190823004655.28905-1-madhumitha.tolakanahalli.pradeep@intel.com commit 0f7dc62068bb2b929e213e759dba1eb038448a5c Author: Chris Wilson Date: Mon Aug 26 08:21:27 2019 +0100 drm/i915: Protect our local workers against I915_FENCE_TIMEOUT Trust our own workers to not cause unnecessary delays and disable the automatic timeout on their asynchronous fence waits. (Along the same lines that we trust our own requests to complete eventually, if necessary by force.) Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190826072149.9447-6-chris@chris-wilson.co.uk commit 8a84bacba19c154bdcb278657d0b7594ce2d939c Author: Imre Deak Date: Fri Aug 23 13:07:11 2019 +0300 drm/i915: Align power domain names with port names There is a difference in BSpec's and the driver's designation of DDI ports. BSpec uses the following names: - before GEN11: BSpec/driver: port A/B/C/D etc - GEN11: BSpec/driver: port A-F - GEN12: BSpec: port A/B/C for combo PHY ports port TC1-6 for Type C PHY ports driver: port A-I. The driver's port D name matches BSpec's TC1 port name. So far power domains were named according to the BSpec designation, to make it easier to match the code against the specification. That however can be confusing when a power domain needs to be matched to a port on GEN12+. To resolve that use the driver's port A-I designation for power domain names too and rename the corresponding power wells so that they reflect the mapping from the driver's to BSpec's port name. Cc: Lucas De Marchi Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20190823100711.27833-1-imre.deak@intel.com commit 325b916a9e1b11d28c40b02e24734750946a1785 Author: Chris Wilson Date: Mon Aug 26 14:38:37 2019 +0100 drm/i915/selftests: Ignore coherency failures on Broadwater We've been ignoring similar coherency issues in IGT for Broadwater, and specifically Broadwater (original gen4) and not, for example, Crestline (same generation as Broadwater, but the mobile variant). Without any means to reproduce locally (I have a 965GM but alas no 965G), fixing will be slow, so tell CI to ignore any failure until we are ready with a fix. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190826133837.6784-1-chris@chris-wilson.co.uk commit 592a7c5e082e237c7508f37b2c3494a731acad88 Author: Mika Kuoppala Date: Fri Aug 9 17:56:53 2019 +0300 drm/i915: Extend non readable mcr range Our current avoidance of non readable mcr range was not inclusive enough. Extend the start and end. References: HSDES#1405586840 Cc: Tvrtko Ursulin Signed-off-by: Mika Kuoppala Acked-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190809145653.2279-1-mika.kuoppala@linux.intel.com commit e8f6b4952ec54a9d7e43f908d39dc168b0310599 Author: Chris Wilson Date: Tue Aug 27 13:06:15 2019 +0100 drm/i915/execlists: Flush the post-sync breadcrumb write harder Quite rarely we see that the CS completion event fires before the breadcrumb is coherent, which presumably is a result of the CS_STALL not waiting for the post-sync operation. Try throwing in a DC_FLUSH into the following pipecontrol to see if that makes any difference. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190827120615.31390-1-chris@chris-wilson.co.uk commit cf3d4e534711059f77884697dc93b97d60a4ed9f Author: Neil Armstrong Date: Tue Aug 27 11:58:25 2019 +0200 drm/meson: add resume/suspend hooks Add the suspend and resume hooks to: - save and disable the entire DRM driver on suspend - re-init the entire VPU subsystem on resume, to recover CRTC and pixel generator functionnal usage after DDR suspend, then recover DRM driver state Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter Tested-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20190827095825.21015-3-narmstrong@baylibre.com commit 1374b8375c2efb75da8c8ac2638a91c11313262e Author: Neil Armstrong Date: Tue Aug 27 11:58:24 2019 +0200 drm/meson: dw_hdmi: add resume/suspend hooks Add the suspend and resume hooks to: - reset the whole HDMI glue and HDMI controller on suspend - re-init the HDMI glue and HDMI controller on resume The HDMI glue init is refactored to be re-used from the resume hook. It makes usage of dw_hdmi_resume() to recover a functionnal DDC bus. Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter Tested-by: Kevin Hilman [narmstrong: fixed typo in commit log, and rebased on drm-misc-next] Link: https://patchwork.freedesktop.org/patch/msgid/20190827095825.21015-2-narmstrong@baylibre.com commit b0138364da17617db052c4a738b58bf45e42f500 Author: Stephen Rothwell Date: Wed Aug 28 18:55:16 2019 +1000 drm/virtio: module_param_named() requires linux/moduleparam.h Fixes: 3e93bc2a58aa ("drm/virtio: make resource id workaround runtime switchable.") Signed-off-by: Stephen Rothwell Link: http://patchwork.freedesktop.org/patch/msgid/20190828185516.22b03da8@canb.auug.org.au Signed-off-by: Gerd Hoffmann commit c4e6488120e9ef1ceced8fb0caf134c5242ddaf4 Author: Chris Wilson Date: Tue Aug 27 17:17:26 2019 +0100 drm/i915/selftests: Try to recycle context allocations igt_ctx_exec allocates a new context for each iteration, keeping them all allocated until the end. Instead, release the local ctx reference at the end of each iteration, allowing ourselves to reap those if under mempressure. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190827161726.3640-2-chris@chris-wilson.co.uk commit f2085c8e950d536c7982182b0c9c015804011dd2 Author: Chris Wilson Date: Tue Aug 27 17:17:25 2019 +0100 drm/i915/selftests: Remove accidental serialization between gpu_fill Upon object creation for live_gem_contexts, we fill the object with known scratch and flush it out of the CPU cache. Before performing the GPU fill, we don't need to flush it again and so avoid serialising with previous fills. However, we do need some throttling on the internal interfaces if we do not want to run out of memory! Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190827161726.3640-1-chris@chris-wilson.co.uk commit 744583ecc3d7c5e27d48ff74e575b893637f4b57 Author: Gerd Hoffmann Date: Tue Aug 13 10:25:09 2019 +0200 drm/virtio: notify virtqueues without holding spinlock Split virtqueue_kick() call into virtqueue_kick_prepare(), which requires serialization, and virtqueue_notify(), which does not. Move the virtqueue_notify() call out of the critical section protected by the queue lock. This avoids triggering a vmexit while holding the lock and thereby fixes a rather bad spinlock contention. Suggested-by: Chia-I Wu Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190813082509.29324-3-kraxel@redhat.com commit 4100a7b834389e91638a0b789399fd7b31e258c1 Author: Gerd Hoffmann Date: Tue Aug 13 10:25:08 2019 +0200 drm/virtio: cleanup queue functions Make the queue functions return void, none of the call sites checks the return value. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190813082509.29324-2-kraxel@redhat.com commit a02c4c25b9fa69ddf29368f454c45fa1f5a8217d Author: Gerd Hoffmann Date: Thu Aug 22 11:46:57 2019 +0200 drm/virtio: add plane check Use drm_atomic_helper_check_plane_state() to sanity check the plane state. Signed-off-by: Gerd Hoffmann Acked-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190822094657.27483-1-kraxel@redhat.com commit 8a9a982767b7c89b2f23290e4f0f21f194b79dfe Author: Daniele Ceraolo Spurio Date: Tue Aug 27 11:58:05 2019 -0700 drm/i915: use a separate context for gpu relocs The CS pre-parser can pre-fetch commands across memory sync points and starting from gen12 it is able to pre-fetch across BB_START and BB_END boundaries as well, so when we emit gpu relocs the pre-parser might fetch the target location of the reloc before the memory write lands. The parser can't pre-fetch across the ctx switch, so we use a separate context to guarantee that the memory is synchronized before the parser can get to it. Note that there is no risk of the CS doing a lite restore from the reloc context to the user context, even if the two have the same hw_id, because since gen11 the CS also checks the LRCA when deciding if it can lite-restore. v2: limit new context to gen12+, release in eb_destroy, add a comment in emit_fini_breadcrumb (Chris). Suggested-by: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190827185805.21799-1-daniele.ceraolospurio@intel.com commit 45e9c829ebeaa13b3b999f76963b9920d2147128 Author: Michel Thierry Date: Fri Aug 23 01:20:50 2019 -0700 drm/i915/tgl/perf: use the same oa ctx_id format as icl Compared to Icelake, Tigerlake's MAX_CONTEXT_HW_ID is smaller by one, but since we just use the upper 32 bits of the lrc_desc, it's guaranteed OA will use the correct one. Cc: Lionel Landwerlin Signed-off-by: Michel Thierry Signed-off-by: Lucas De Marchi Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-19-lucas.demarchi@intel.com commit a8ff5d405e90e7044ab45f315f2dbcbe6aebf5f8 Author: Michel Thierry Date: Fri Aug 23 01:20:48 2019 -0700 drm/i915/tgl: Do not apply WaIncreaseDefaultTLBEntries from GEN12 onwards Workaround no longer needed (plus L3_LRA_1_GPGPU doesn't exist). Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Signed-off-by: Michel Thierry Signed-off-by: Lucas De Marchi Reviewed-by: Stuart Summers Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-17-lucas.demarchi@intel.com commit 99389390fef50c880d2ca0b6667c12423b3d5260 Author: José Roberto de Souza Date: Fri Aug 23 01:20:47 2019 -0700 drm/i915/tgl: Implement TGL DisplayPort training sequence On TGL some registers moved from DDI to transcoder and the DisplayPort training sequence has a separate BSpec page. I started adding 'ifs' to the original intel_ddi_pre_enable_dp() but it was becoming really hard to follow, so a new and cleaner function for TGL was added with comments of all steps. It's similar to ICL, but different enough to deserve a new function. The rest of DisplayPort enable and the whole disable sequences remained the same. v2: FEC and DSC should be enabled on sink side before start link training(Maarten reported and Manasi confirmed the DSC part) v3: Add call to enable FEC on step 7.l(Manasi) BSpec: 49190 Cc: Maarten Lankhorst Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-16-lucas.demarchi@intel.com commit 9c722e17c1b91d7dc5ec77cb4fcaaa6b30653fe3 Author: José Roberto de Souza Date: Fri Aug 23 01:20:44 2019 -0700 drm/i915: Disable pipes in reverse order Disable CRTC/pipes in reverse order because some features (MST in TGL+) requires master and slave relationship between pipes, so it should always pick the lowest pipe as master as it will be enabled first and disable in the reverse order so the master will be the last one to be disabled. Cc: Rodrigo Vivi Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-13-lucas.demarchi@intel.com commit 0456417ef680aab9a2aa93b950443e25104101b9 Author: José Roberto de Souza Date: Fri Aug 23 01:20:43 2019 -0700 drm: Add for_each_oldnew_intel_crtc_in_state_reverse() Same as for_each_oldnew_intel_crtc_in_state() but iterates in reverse order. v2: Fix additional blank line v3: Rebase Cc: Rodrigo Vivi Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-12-lucas.demarchi@intel.com commit f7b3c22619a44ce7599fc9fa1df5df6281a26217 Author: José Roberto de Souza Date: Fri Aug 23 01:20:41 2019 -0700 drm/i915/tgl: Add maximum resolution supported by PSR2 HW TGL PSR2 HW supports a bigger resolution, so lets add it BSpec: 50422, 49199 Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Lucas De Marchi Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-10-lucas.demarchi@intel.com commit 0f81e645eb1ed224af43bb7b347806cc74d189f6 Author: José Roberto de Souza Date: Sat Aug 17 02:38:33 2019 -0700 drm/i915: Do not read PSR2 register in transcoders without PSR2 This fix unclaimed access warnings: [ 245.525788] ------------[ cut here ]------------ [ 245.525884] Unclaimed read from register 0x62900 [ 245.526154] WARNING: CPU: 0 PID: 1234 at drivers/gpu/drm/i915/intel_uncore.c:1100 __unclaimed_reg_debug+0x40/0x50 [i915] [ 245.526160] Modules linked in: i915 x86_pkg_temp_thermal ax88179_178a coretemp usbnet crct10dif_pclmul mii crc32_pclmul ghash_clmulni_intel e1000e [last unloaded: i915] [ 245.526191] CPU: 0 PID: 1234 Comm: kms_fullmodeset Not tainted 5.1.0-rc6+ #915 [ 245.526197] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWR1.D00.2081.A10.1904182155 04/18/2019 [ 245.526273] RIP: 0010:__unclaimed_reg_debug+0x40/0x50 [i915] [ 245.526281] Code: 74 05 5b 5d 41 5c c3 45 84 e4 48 c7 c0 76 97 21 a0 48 c7 c6 6c 97 21 a0 89 ea 48 0f 44 f0 48 c7 c7 7f 97 21 a0 e8 4f 1e fe e0 <0f> 0b 83 2d 6f d9 1c 00 01 5b 5d 41 5c c3 66 90 41 57 41 56 41 55 [ 245.526288] RSP: 0018:ffffc900006bf7d8 EFLAGS: 00010086 [ 245.526297] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 245.526304] RDX: 0000000000000007 RSI: 0000000000000000 RDI: 00000000ffffffff [ 245.526310] RBP: 0000000000061900 R08: 0000000000000000 R09: 0000000000000001 [ 245.526317] R10: 0000000000000006 R11: 0000000000000000 R12: 0000000000000001 [ 245.526324] R13: 0000000000000000 R14: ffff8882914f0d58 R15: 0000000000000206 [ 245.526332] FS: 00007fed2a3c39c0(0000) GS:ffff8882a8600000(0000) knlGS:0000000000000000 [ 245.526340] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 245.526347] CR2: 00007fed28dff000 CR3: 00000002a086c006 CR4: 0000000000760ef0 [ 245.526354] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 245.526361] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 245.526367] PKRU: 55555554 [ 245.526373] Call Trace: [ 245.526454] gen11_fwtable_read32+0x219/0x250 [i915] [ 245.526576] intel_psr_activate+0x57/0x400 [i915] [ 245.526697] intel_psr_enable_locked+0x367/0x4b0 [i915] [ 245.526828] intel_psr_enable+0xa4/0xd0 [i915] [ 245.526946] intel_enable_ddi+0x127/0x2f0 [i915] [ 245.527075] intel_encoders_enable.isra.79+0x62/0x90 [i915] [ 245.527202] haswell_crtc_enable+0x2a2/0x850 [i915] [ 245.527337] intel_update_crtc+0x51/0x360 [i915] [ 245.527466] skl_update_crtcs+0x26c/0x300 [i915] [ 245.527603] intel_atomic_commit_tail+0x3e5/0x13c0 [i915] [ 245.527757] intel_atomic_commit+0x24d/0x2d0 [i915] [ 245.527782] drm_atomic_helper_set_config+0x7b/0x90 [ 245.527799] drm_mode_setcrtc+0x1b4/0x6f0 [ 245.527856] ? drm_mode_getcrtc+0x180/0x180 [ 245.527867] drm_ioctl_kernel+0xad/0xf0 [ 245.527886] drm_ioctl+0x2f4/0x3b0 [ 245.527902] ? drm_mode_getcrtc+0x180/0x180 [ 245.527935] ? rcu_read_lock_sched_held+0x6f/0x80 [ 245.527956] do_vfs_ioctl+0xa0/0x6d0 [ 245.527970] ? __task_pid_nr_ns+0xb6/0x200 [ 245.527991] ksys_ioctl+0x35/0x70 [ 245.528009] __x64_sys_ioctl+0x11/0x20 [ 245.528020] do_syscall_64+0x55/0x180 [ 245.528034] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 245.528042] RIP: 0033:0x7fed2cc7c3c7 [ 245.528050] Code: 00 00 90 48 8b 05 c9 3a 0d 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 99 3a 0d 00 f7 d8 64 89 01 48 [ 245.528057] RSP: 002b:00007ffe36944378 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 245.528067] RAX: ffffffffffffffda RBX: 00007ffe369443b0 RCX: 00007fed2cc7c3c7 [ 245.528074] RDX: 00007ffe369443b0 RSI: 00000000c06864a2 RDI: 0000000000000003 [ 245.528081] RBP: 00007ffe369443b0 R08: 0000000000000000 R09: 0000564c0173ae98 [ 245.528088] R10: 0000564c0173aeb8 R11: 0000000000000246 R12: 00000000c06864a2 [ 245.528095] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000 [ 245.528128] irq event stamp: 140866 [ 245.528138] hardirqs last enabled at (140865): [] _raw_spin_unlock_irqrestore+0x4c/0x60 [ 245.528148] hardirqs last disabled at (140866): [] _raw_spin_lock_irqsave+0xd/0x50 [ 245.528158] softirqs last enabled at (140860): [] __do_softirq+0x38c/0x499 [ 245.528170] softirqs last disabled at (140853): [] irq_exit+0xa9/0xc0 [ 245.528247] WARNING: CPU: 0 PID: 1234 at drivers/gpu/drm/i915/intel_uncore.c:1100 __unclaimed_reg_debug+0x40/0x50 [i915] [ 245.528254] ---[ end trace 366069676e98a410 ]--- Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Imre Deak Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-7-lucas.demarchi@intel.com commit 6056517ab8c30fb239b08c06ef577677cbcd409c Author: José Roberto de Souza Date: Fri Aug 23 01:20:37 2019 -0700 drm/i915/tgl: Guard and warn if more than one eDP panel is present On TGL+ it's possible to have PSR1 enabled in other ports besides DDIA. PSR2 is still limited to DDIA. However currently we handle only one instance of PSR struct. Lets guard intel_psr_init_dpcd() against multiple eDP panels and warn about it. v2: Reword commit message to be TGL+ only and with the info where PSR1/PSR2 are supported (Lucas) Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-6-lucas.demarchi@intel.com commit cccdce1dd061c0b8ae156f026a3ee2c9d58613d3 Author: Chris Wilson Date: Tue Aug 27 14:59:35 2019 +0100 drm/i915: Make engine's batch pool safe for use with virtual engines A virtual engine itself does not have a batch pool, but we can gleefully use any of its siblings instead. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190827135935.3831-1-chris@chris-wilson.co.uk commit f52c6d0df6909a0412c347c8e442acc22ce94747 Author: Chris Wilson Date: Tue Aug 27 14:26:31 2019 +0100 drm/i915: Only activate i915_active debugobject once The point of debug_object_activate is to mark the first, and only the first, acquisition. The object then remains active until the last release. However, we marked up all successful first acquires even though we allowed concurrent parties to try and acquire the i915_active simultaneously (serialised by the i915_active.mutex). Testcase: igt/gem_mmap_gtt/fault-concurrent Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190827132631.18627-1-chris@chris-wilson.co.uk commit 21b0c32bdaba7c2e365d9faca0536fc40dd056d4 Author: Chris Wilson Date: Tue Aug 27 10:49:33 2019 +0100 drm/i915/selftests: Markup impossible error pointers If we create a new live_context() we should have a mapping for each engine. Document that assumption with an assertion. Reported-by: Dan Carpenter Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190827094933.13778-1-chris@chris-wilson.co.uk commit 66c2dee4ae10a2d841c40b9dd9c7141eb23eee76 Author: Dariusz Marcinkiewicz Date: Fri Aug 23 13:24:25 2019 +0200 drm/vc4/vc4_hdmi: fill in connector info Fill in the connector info, allowing userspace to associate the CEC device with the drm connector. Tested on a Raspberry Pi 3B. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil Acked-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190823112427.42394-2-hverkuil-cisco@xs4all.nl commit 5558f3d535c54e5ca39df7896022b103360a9ab1 Author: Dariusz Marcinkiewicz Date: Wed Aug 14 12:45:00 2019 +0200 drm/i915/intel_hdmi: use cec_notifier_conn_(un)register Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil Reviewed-by: Ville Syrjälä Signed-off-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20190814104520.6001-3-darekm@google.com commit ae85b0df124f6928709f6707db55457f369bcb27 Author: Dariusz Marcinkiewicz Date: Wed Aug 14 12:44:59 2019 +0200 drm_dp_cec: add connector info support. Pass the connector info to the CEC adapter. This makes it possible to associate the CEC adapter with the corresponding drm connector. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil Reviewed-by: Lyude Paul Reviewed-by: Ben Skeggs Signed-off-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20190814104520.6001-2-darekm@google.com commit ebfdf5cd806b3bbf1ff79e69bce6a28df8bbe39d Author: Chris Wilson Date: Mon Aug 26 14:07:50 2019 +0100 drm/i915: Use NOEVICT for first pass on attemping to pin a GGTT mmap The intention is that we first try to pin the current vma into the mappable aperture only if it is already in use or it fits in the free space and will not cause contention. The first attempt was meant to be using PIN_NOEVICT to reuse the current vma if possible, following up with different eviction strategies. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111485 Fixes: 6846895fde05 ("drm/i915: Replace PIN_NONFAULT with calls to PIN_NOEVICT") Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190826130750.17272-1-chris@chris-wilson.co.uk commit 1d5b7773314994d23f2fc4acfa4278929b03ffd5 Author: Chris Wilson Date: Mon Aug 26 08:21:22 2019 +0100 drm/i915/selftests: Add the usual batch vma managements to st_workarounds To properly handle asynchronous migration of batch objects, we need to couple the fences on the incoming batch into the request and should not assume that they always start idle. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190826072149.9447-1-chris@chris-wilson.co.uk commit 3e93bc2a58aa241081e043ef9e6e86c42808499a Author: Gerd Hoffmann Date: Thu Aug 22 12:26:14 2019 +0200 drm/virtio: make resource id workaround runtime switchable. Also update the comment with a reference to the virglrenderer fix. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190822102614.18164-1-kraxel@redhat.com commit 15c665bb4637310bc8ce5f357b6a6e5a8aafc7c1 Author: Christophe JAILLET Date: Thu Aug 22 23:15:18 2019 +0200 drm/mcde: Fix an error handling path in 'mcde_probe()' If we don't find any matching components, we should go through the error handling path, in order to free some resources. Fixes: ca5be902a87d ("drm/mcde: Fix uninitialized variable") Signed-off-by: Christophe JAILLET Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20190822211518.5578-1-christophe.jaillet@wanadoo.fr commit acd674af95d3f627062007429b9c195c6b32361d Author: Lyude Paul Date: Fri Aug 23 16:52:51 2019 -0400 drm/i915: Call dma_set_max_seg_size() in i915_driver_hw_probe() Currently, we don't call dma_set_max_seg_size() for i915 because we intentionally do not limit the segment length that the device supports. However, this results in a warning being emitted if we try to map anything larger than SZ_64K on a kernel with CONFIG_DMA_API_DEBUG_SG enabled: [ 7.751926] DMA-API: i915 0000:00:02.0: mapping sg segment longer than device claims to support [len=98304] [max=65536] [ 7.751934] WARNING: CPU: 5 PID: 474 at kernel/dma/debug.c:1220 debug_dma_map_sg+0x20f/0x340 This was originally brought up on https://bugs.freedesktop.org/show_bug.cgi?id=108517 , and the consensus there was it wasn't really useful to set a limit (and that dma-debug isn't really all that useful for i915 in the first place). Unfortunately though, CONFIG_DMA_API_DEBUG_SG is enabled in the debug configs for various distro kernels. Since a WARN_ON() will disable automatic problem reporting (and cause any CI with said option enabled to start complaining), we really should just fix the problem. Note that as me and Chris Wilson discussed, the other solution for this would be to make DMA-API not make such assumptions when a driver hasn't explicitly set a maximum segment size. But, taking a look at the commit which originally introduced this behavior, commit 78c47830a5cb ("dma-debug: check scatterlist segments"), there is an explicit mention of this assumption and how it applies to devices with no segment size: Conversely, devices which are less limited than the rather conservative defaults, or indeed have no limitations at all (e.g. GPUs with their own internal MMU), should be encouraged to set appropriate dma_parms, as they may get more efficient DMA mapping performance out of it. So unless there's any concerns (I'm open to discussion!), let's just follow suite and call dma_set_max_seg_size() with UINT_MAX as our limit to silence any warnings. Changes since v3: * Drop patch for enabling CONFIG_DMA_API_DEBUG_SG in CI. It looks like just turning it on causes the kernel to spit out bogus WARN_ONs() during some igt tests which would otherwise require teaching igt to disable the various DMA-API debugging options causing this. This is too much work to be worth it, since DMA-API debugging is useless for us. So, we'll just settle with this single patch to squelch WARN_ONs() during driver load for users that have CONFIG_DMA_API_DEBUG_SG turned on for some reason. * Move dma_set_max_seg_size() call into i915_driver_hw_probe() - Chris Wilson Signed-off-by: Lyude Paul Reviewed-by: Chris Wilson Cc: # v4.18+ Link: https://patchwork.freedesktop.org/patch/msgid/20190823205251.14298-1-lyude@redhat.com commit d72cf01f410aa09868d98b672f3f92328c96b32d Author: Dan Carpenter Date: Wed Aug 21 10:24:56 2019 +0300 drm/mipi-dbi: fix a loop in debugfs code This code will likely crash if we try to do a zero byte write. The code looks like this: /* strip trailing whitespace */ for (i = count - 1; i > 0; i--) if (isspace(buf[i])) ... We're writing zero bytes so count = 0. You would think that "count - 1" would be negative one, but because "i" is unsigned it is a large positive numer instead. The "i > 0" condition is true and the "buf[i]" access will be out of bounds. The fix is to make "i" signed and now everything works as expected. The upper bound of "count" is capped in __kernel_write() at MAX_RW_COUNT so we don't have to worry about it being higher than INT_MAX. Fixes: 02dd95fe3169 ("drm/tinydrm: Add MIPI DBI support") Signed-off-by: Dan Carpenter [noralf: Adjust title] Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20190821072456.GJ26957@mwanda commit 52988009843160c5b366b4082ed6df48041c655c Author: Xiaolin Zhang Date: Fri Aug 23 14:57:31 2019 +0800 drm/i915: to make vgpu ppgtt notificaiton as atomic operation vgpu ppgtt notification was split into 2 steps, the first step is to update PVINFO's pdp register and then write PVINFO's g2v_notify register with action code to tirgger ppgtt notification to GVT side. currently these steps were not atomic operations due to no any protection, so it is easy to enter race condition state during the MTBF, stress and IGT test to cause GPU hang. the solution is to add a lock to make vgpu ppgtt notication as atomic operation. Cc: stable@vger.kernel.org Signed-off-by: Xiaolin Zhang Acked-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1566543451-13955-1-git-send-email-xiaolin.zhang@intel.com commit 6dbe0c4b0fc0646442b2b1580d022404e582fd7b Author: Laurent Pinchart Date: Fri Aug 23 22:32:43 2019 +0300 drm/panel: Initialise panel dev and funcs through drm_panel_init() Instead of requiring all drivers to set the dev and funcs fields of drm_panel manually after calling drm_panel_init(), pass the data as arguments to the function. This simplifies the panel drivers, and will help future refactoring when adding new arguments to drm_panel_init(). The panel drivers have been updated with the following Coccinelle semantic patch, with manual inspection to verify that no call to drm_panel_init() with a single argument still exists. @@ expression panel; expression device; identifier ops; @@ drm_panel_init(&panel + , device, &ops ); ... ( -panel.dev = device; -panel.funcs = &ops; | -panel.funcs = &ops; -panel.dev = device; ) Suggested-by: Sam Ravnborg Signed-off-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190823193245.23876-3-laurent.pinchart@ideasonboard.com commit 65abbda8ed7ca48c8807d6b04a77431b438fa659 Author: Laurent Pinchart Date: Fri Aug 23 22:32:42 2019 +0300 drm/panel: Add missing drm_panel_init() in panel drivers Panels must be initialised with drm_panel_init(). Add the missing function call in the panel-raspberrypi-touchscreen.c and panel-sitronix-st7789v.c drivers. Signed-off-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190823193245.23876-2-laurent.pinchart@ideasonboard.com commit 75b974a859e5d9a3ceaa3aa03bbc27d404b32231 Author: Chris Wilson Date: Sat Aug 24 00:51:41 2019 +0100 drm/i915/selftests: Teach igt_gpu_fill_dw() to take intel_context Avoid having to pass around (ctx, engine) everywhere by passing the actual intel_context we intend to use. Today we preach this lesson to igt_gpu_fill_dw and its callers' callers. The immediate benefit for the GEM selftests is that we aim to use the GEM context as the control, the source of the engines on which to test the GEM context. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190823235141.31799-1-chris@chris-wilson.co.uk commit 77715906921251bd9f75bcf4825f176df3f91208 Author: Chris Wilson Date: Fri Aug 23 19:14:55 2019 +0100 drm/i915: Keep drm_i915_file_private around under RCU Ensure that the drm_i915_file_private continues to exist as we attempt to remove a request from its list, which may race with the destruction of the file. <6> [38.380714] [IGT] gem_ctx_create: starting subtest basic-files <0> [42.201329] BUG: spinlock bad magic on CPU#0, kworker/u16:0/7 <4> [42.201356] general protection fault: 0000 [#1] PREEMPT SMP PTI <4> [42.201371] CPU: 0 PID: 7 Comm: kworker/u16:0 Tainted: G U 5.3.0-rc5-CI-Patchwork_14169+ #1 <4> [42.201391] Hardware name: Dell Inc. OptiPlex 745 /0GW726, BIOS 2.3.1 05/21/2007 <4> [42.201594] Workqueue: i915 retire_work_handler [i915] <4> [42.201614] RIP: 0010:spin_dump+0x5a/0x90 <4> [42.201625] Code: 00 48 8d 88 c0 06 00 00 48 c7 c7 00 71 09 82 e8 35 ef 00 00 48 85 db 44 8b 4d 08 41 b8 ff ff ff ff 48 c7 c1 0b cd 0f 82 74 0e <44> 8b 83 e0 04 00 00 48 8d 8b c0 06 00 00 8b 55 04 48 89 ee 48 c7 <4> [42.201660] RSP: 0018:ffffc9000004bd80 EFLAGS: 00010202 <4> [42.201673] RAX: 0000000000000031 RBX: 6b6b6b6b6b6b6b6b RCX: ffffffff820fcd0b <4> [42.201688] RDX: 0000000000000000 RSI: ffff88803de266f8 RDI: 00000000ffffffff <4> [42.201703] RBP: ffff888038381ff8 R08: 00000000ffffffff R09: 000000006b6b6b6b <4> [42.201718] R10: 0000000041cb0b89 R11: 646162206b636f6c R12: ffff88802a618500 <4> [42.201733] R13: ffff88802b32c288 R14: ffff888038381ff8 R15: ffff88802b32c250 <4> [42.201748] FS: 0000000000000000(0000) GS:ffff88803de00000(0000) knlGS:0000000000000000 <4> [42.201765] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [42.201778] CR2: 00007f2cefc6d180 CR3: 00000000381ee000 CR4: 00000000000006f0 <4> [42.201793] Call Trace: <4> [42.201805] do_raw_spin_lock+0x66/0xb0 <4> [42.201898] i915_request_retire+0x548/0x7c0 [i915] <4> [42.201989] retire_requests+0x4d/0x60 [i915] <4> [42.202078] i915_retire_requests+0x144/0x2e0 [i915] <4> [42.202169] retire_work_handler+0x10/0x40 [i915] Recently, in commit 44c22f3f1a0a ("drm/i915: Serialize insertion into the file->mm.request_list"), we fixed a race on insertion. Now, it appears we also have a race with destruction! Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190823181455.31910-1-chris@chris-wilson.co.uk commit 936ad29de8129747bbfeec8a85e38c8a830bd5da Author: Daniele Ceraolo Spurio Date: Mon Aug 19 18:23:27 2019 -0700 drm/i915/uc: define GuC and HuC FWs for EHL First uc firmware release for EHL. Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Cc: Anusha Srivatsa Cc: Michal Wajdeczko Reviewed-by: Stuart Summers Tested-by: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190820012327.36443-1-daniele.ceraolospurio@intel.com commit 636e83f2f208555c3d19d8b454ebdd8d8f4652cc Author: Chris Wilson Date: Fri Aug 23 16:39:44 2019 +0100 drm/i915: Flush the existing fence before GGTT read/write Our fence management is lazy, very lazy. If the user marks an object as untiled, we do not immediately flush the fence but merely mark it as dirty. On the next use we have to remember to check and remove the fence, by which time we hope it is idle and we do not have to wait. v2: Throw away the old fence on the next ggtt_pin. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111468 Fixes: 1f7fd484fff1 ("drm/i915: Replace i915_vma_put_fence()") Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190823153944.20630-1-chris@chris-wilson.co.uk commit 191797a892c91aec6cdffc4e05696b722d779fe3 Author: Chris Wilson Date: Fri Aug 23 15:14:21 2019 +0100 drm/i915/gtt: Preallocate Braswell top-level page directory In order for the Braswell top-level PD to remain the same from the time of request construction to its submission onto HW, as we may be asynchronously rewriting the page tables (thus changing the expected register state after having already stored the old addresses in the request), the top level PD must be preallocated. So wave goodbye to our lazy allocation of those 4x2 pages. v2: A little bit of write-flushing required (presumably it always has been required, but now we are more susceptible and it is showing up!) v3: Put back the forced-PD-reload on every batch, we can't survive without it and explicitly marking the context for PD reload makes Braswell turn nasty. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190823141421.2398-1-chris@chris-wilson.co.uk commit 6dcb85a0ad990455ae7c596e3fc966ad9c1ba9c5 Author: Chris Wilson Date: Fri Aug 23 14:26:46 2019 +0100 drm/i915: Hold irq-off for the entire fake lock period Sadly lockdep records when the irqs are re-enabled and then marks up the fake lock as being irq-unsafe. Our hand is forced and so we must mark up the entire fake lock critical section as irq-off. Hopefully this is the last tweak required! v2: Not quite, we need to mark the timeline spinlock as irqsafe. That was a genuine bug being hidden by the earlier lockdep splat. Fixes: d67739268cf0 ("drm/i915/gt: Mark up the nested engine-pm timeline lock as irqsafe") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190823132700.25286-2-chris@chris-wilson.co.uk commit 0b14d96820d1fd05ea610a0f5f952b34e5a24f2c Author: Ville Syrjälä Date: Wed Aug 21 20:30:33 2019 +0300 drm/i915: Use hweight8() for 8bit masks Use hweight8() instead of hweight32() for 8bit masks. Doesn't actually matter for us since the arch code will go for hweight32() anyway, but maybe we stil want to do this for documentation purposes? Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190821173033.24123-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c08e91323920ec4b3a4d889af3988e300b1902f1 Author: Ville Syrjälä Date: Wed Aug 21 20:30:32 2019 +0300 drm/i915: s/num_active_crtcs/num_active_pipes/ Set a good example and talk about pipes rather than crtcs. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190821173033.24123-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d048a2684a413b33a28be277a7e9cee960ec8bb2 Author: Ville Syrjälä Date: Wed Aug 21 20:30:31 2019 +0300 drm/i915: Use enum pipe consistently Replace all "int pipe"s with "enum pipe pipe"s to make it clear what we're dealing with. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190821173033.24123-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e8edae54c593bc9aea949fbf6b2a59fe53cd5d83 Author: Ville Syrjälä Date: Wed Aug 21 20:30:30 2019 +0300 drm/i915: Unconfuse pipe vs. crtc->index in i915_get_crtc_scanoutpos() The "pipe" argument passed in by the vblank code is in fact the crtc index. Don't assume that is the same as the pipe. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190821173033.24123-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d06a79d33e0f97373a29decb66791758a6d2e968 Author: Ville Syrjälä Date: Wed Aug 21 20:30:29 2019 +0300 drm/i915: Use enum pipe instead of crtc index to track active pipes We may need to eliminate the crtc->index == pipe assumptions from the code to support arbitrary pipes being fused off. Start that by switching some bitmasks over to using pipe instead of the crtc index. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190821173033.24123-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 100f5f7fbc3e23f58511a11a3751dfacf1ccb5a7 Author: Stuart Summers Date: Fri Aug 23 09:03:07 2019 -0700 drm/i915: Expand subslice mask Currently, the subslice_mask runtime parameter is stored as an array of subslices per slice. Expand the subslice mask array to better match what is presented to userspace through the I915_QUERY_TOPOLOGY_INFO ioctl. The index into this array is then calculated: slice * subslice stride + subslice index / 8 v2: Fix 32-bit build v3: Use new helper function in SSEU workaround warning message v4: Use GEM_BUG_ON to force developers to use valid SSEU configurations per platform (Chris) Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-12-stuart.summers@intel.com commit 668df17f594d6f57e822ceee680ace3233e97f02 Author: Stuart Summers Date: Fri Aug 23 09:03:06 2019 -0700 drm/i915: Add new function to copy subslices for a slice Add a new function to copy subslices for a specified slice between intel_sseu structures for the purpose of determining power-gate status. Note that currently ss_stride has a max of 1. Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-11-stuart.summers@intel.com commit eaef5b3c411337db73a205d0e009c72f7a39f3a3 Author: Stuart Summers Date: Fri Aug 23 09:03:05 2019 -0700 drm/i915: Refactor instdone loops on new subslice functions Refactor instdone loops to use the new intel_sseu_has_subslice function. Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-10-stuart.summers@intel.com commit e1210bbfb1f8dc2865e8ebd6884afa895333b6e4 Author: Stuart Summers Date: Fri Aug 23 09:03:04 2019 -0700 drm/i915: Add function to determine if a slice has a subslice Add a new function to determine whether a particular slice has a given subslice. Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-9-stuart.summers@intel.com commit 6db40ec80f544e289fe836319b20fcc19a454e8d Author: Stuart Summers Date: Fri Aug 23 09:03:03 2019 -0700 drm/i915: Use subslice stride to set subslices for a given slice Add a subslice stride calculation when setting subslices. This aligns more closely with the userspace expectation of the subslice mask structure. v2: Use local variable for subslice_mask on HSW and clean up a few other subslice_mask local variable changes v3: Add GEM_BUG_ON for ss_stride to prevent array overflow (Chris) Split main set function and refactors in intel_device_info.c into separate patches (Chris) v4: Reduce ss_stride size check when setting subslices per slice based on actual expected max stride (Chris) Move that GEM_BUG_ON check for the ss_stride out to the patch which adds the ss_stride v5: Use memcpy instead of looping through each stride index Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-8-stuart.summers@intel.com commit 9e8a135ed5a414ba4333cda22b01ae77291f6b9b Author: Stuart Summers Date: Fri Aug 23 09:03:02 2019 -0700 drm/i915: Add function to set subslices Add a new function to set a set of subslices for a given slice. v2: Fix typo in subslice_mask assignment Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-7-stuart.summers@intel.com commit 33ee9e8680963fbfa298fec08eed7b45db0a1ebb Author: Stuart Summers Date: Fri Aug 23 09:03:01 2019 -0700 drm/i915: Use local variables for subslice_mask for device info When setting up subslice_mask, instead of operating on the slice array directly, use a local variable to start bits per slice, then use this to set the per slice array in one step. Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-6-stuart.summers@intel.com commit 49610c377be7f32d948f0970705b4ad015923aa0 Author: Stuart Summers Date: Fri Aug 23 09:03:00 2019 -0700 drm/i915: Add EU stride runtime parameter Add a new SSEU runtime parameter, eu_stride, which is used to mirror the userspace concept of a range of EUs per subslice. This patch simply adds the parameter and updates usage in the QUERY_TOPOLOGY_INFO handler. v2: Add GEM_BUG_ON to make sure eu_stride is valid Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-5-stuart.summers@intel.com commit 7a200aad1127e98cbf4da9685f652899598fe357 Author: Stuart Summers Date: Fri Aug 23 09:02:59 2019 -0700 drm/i915: Add subslice stride runtime parameter Add a new parameter, ss_stride, to the runtime info structure. This is used to mirror the userspace concept of subslice stride, which is a range of subslices per slice. This patch simply adds the definition and updates usage in the QUERY_TOPOLOGY_INFO handler. v2: Add GEM_BUG_ON to make sure ss_stride is valid Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-4-stuart.summers@intel.com commit 8b355db99cfbdaea848e05c288d6d80c391f0b13 Author: Stuart Summers Date: Fri Aug 23 09:02:58 2019 -0700 drm/i915: Add function to set SSEU info per platform Add a new function to allow each platform to set maximum slice, subslice, and EU information to reduce code duplication. Signed-off-by: Stuart Summers Reviewed-by: Mika Kuoppala Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-3-stuart.summers@intel.com commit 4087f873df1fbf9d9590953119ea78dde6a759dd Author: Stuart Summers Date: Fri Aug 23 09:02:57 2019 -0700 drm/i915: Use variable for debugfs device status Use a local variable to find SSEU runtime information in various debugfs functions. v2: Remove extra line breaks per feedback from Chris Signed-off-by: Stuart Summers Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190823160307.180813-2-stuart.summers@intel.com commit 1c5f087a2bb2c4f971e6f80e2bafb064d407ae5f Author: Alyssa Rosenzweig Date: Fri Aug 23 08:51:49 2019 -0700 drm/panfrost: Add errata descriptions from kbase While newer kbase include only the numbers of errata, older kbase releases included one-line descriptions for each errata, which is useful for those working on the driver. Import these descriptions. Most are from kbase verbatim; a few I edited for clarity. v2: Wrote a description for the workaround of an issue whose cause is still unknown (Stephen). Errata which pertain to newer models unsupported by the mainline driver, for which Arm has not yet released errata information, have been removed from the issue list as the kernel need not concern itself with these. v3: Readded errata not yet handled, adding descriptions based on the workarounds in the latest kbase release. Signed-off-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20190823155149.7272-1-alyssa.rosenzweig@collabora.com commit 5d86923060fce88a4dda8d8c9c5d5eb32f37c37b Author: Michel Thierry Date: Fri Aug 23 01:20:34 2019 -0700 drm/i915/tgl: Enable VD HCP/MFX sub-pipe power gating HCP/MFX power gating is disabled by default, turn it on for the vd units available. User space will also issue a MI_FORCE_WAKEUP properly to wake up proper subwell. During driver load, init_clock_gating happens after device_info_init_mmio read the vdbox disable fuse register, so only present vd units will have these enabled. BSpec: 14214 HSDES: 1209977827 Signed-off-by: Michel Thierry Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Reviewed-by: Tony Ye Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-3-lucas.demarchi@intel.com commit b3c0692f36a44bd02ee8ccc5bed972a36fbf2e99 Author: Michel Thierry Date: Fri Aug 23 01:20:33 2019 -0700 drm/i915/tgl: Move GTCR register to cope with GAM MMIO address remap GAM registers located in the 0x4xxx range have been relocated to 0xCxxx; this is to make space for global MOCS registers. v2: Rename register and bitfield to its new name (suggested by Mika) HSD: 399379 Cc: Daniele Ceraolo Spurio Signed-off-by: Michel Thierry Reviewed-by: Lucas De Marchi Reviewed-by: Mika Kuoppala Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-2-lucas.demarchi@intel.com commit ce49324261956f4bdec633280f30bf0697dafaef Author: Rob Herring Date: Thu Aug 22 21:12:14 2019 -0500 drm/panfrost: Use mutex_trylock in panfrost_gem_purge Lockdep reports a circular locking dependency with pages_lock taken in the shrinker callback. The deadlock can't actually happen with current users at least as a BO will never be purgeable when pages_lock is held. To be safe, let's use mutex_trylock() instead and bail if a BO is locked already. Cc: Tomeu Vizoso Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Rob Herring Reviewed-by: Steven Price Acked-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20190823021216.5862-7-robh@kernel.org commit dfbc7a46b940b5d5ef8c3db3b7c3b51e6ec8fec4 Author: Rob Herring Date: Thu Aug 22 21:12:13 2019 -0500 drm/shmem: Use mutex_trylock in drm_gem_shmem_purge Lockdep reports a circular locking dependency with pages_lock taken in the shrinker callback. The deadlock can't actually happen with current users at least as a BO will never be purgeable when pages_lock is held. To be safe, let's use mutex_trylock() instead and bail if a BO is locked already. WARNING: possible circular locking dependency detected 5.3.0-rc1+ #100 Tainted: G L ------------------------------------------------------ kswapd0/171 is trying to acquire lock: 000000009b9823fd (&shmem->pages_lock){+.+.}, at: drm_gem_shmem_purge+0x20/0x40 but task is already holding lock: 00000000f82369b6 (fs_reclaim){+.+.}, at: __fs_reclaim_acquire+0x0/0x40 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (fs_reclaim){+.+.}: fs_reclaim_acquire.part.18+0x34/0x40 fs_reclaim_acquire+0x20/0x28 __kmalloc_node+0x6c/0x4c0 kvmalloc_node+0x38/0xa8 drm_gem_get_pages+0x80/0x1d0 drm_gem_shmem_get_pages+0x58/0xa0 drm_gem_shmem_get_pages_sgt+0x48/0xd0 panfrost_mmu_map+0x38/0xf8 [panfrost] panfrost_gem_open+0xc0/0xe8 [panfrost] drm_gem_handle_create_tail+0xe8/0x198 drm_gem_handle_create+0x3c/0x50 panfrost_gem_create_with_handle+0x70/0xa0 [panfrost] panfrost_ioctl_create_bo+0x48/0x80 [panfrost] drm_ioctl_kernel+0xb8/0x110 drm_ioctl+0x244/0x3f0 do_vfs_ioctl+0xbc/0x910 ksys_ioctl+0x78/0xa8 __arm64_sys_ioctl+0x1c/0x28 el0_svc_common.constprop.0+0x90/0x168 el0_svc_handler+0x28/0x78 el0_svc+0x8/0xc -> #0 (&shmem->pages_lock){+.+.}: __lock_acquire+0xa2c/0x1d70 lock_acquire+0xdc/0x228 __mutex_lock+0x8c/0x800 mutex_lock_nested+0x1c/0x28 drm_gem_shmem_purge+0x20/0x40 panfrost_gem_shrinker_scan+0xc0/0x180 [panfrost] do_shrink_slab+0x208/0x500 shrink_slab+0x10c/0x2c0 shrink_node+0x28c/0x4d8 balance_pgdat+0x2c8/0x570 kswapd+0x22c/0x638 kthread+0x128/0x130 ret_from_fork+0x10/0x18 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&shmem->pages_lock); lock(fs_reclaim); lock(&shmem->pages_lock); *** DEADLOCK *** 3 locks held by kswapd0/171: #0: 00000000f82369b6 (fs_reclaim){+.+.}, at: __fs_reclaim_acquire+0x0/0x40 #1: 00000000ceb37808 (shrinker_rwsem){++++}, at: shrink_slab+0xbc/0x2c0 #2: 00000000f31efa81 (&pfdev->shrinker_lock){+.+.}, at: panfrost_gem_shrinker_scan+0x34/0x180 [panfrost] Fixes: 17acb9f35ed7 ("drm/shmem: Add madvise state and purge helpers") Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Rob Herring Reviewed-by: Steven Price Acked-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20190823021216.5862-6-robh@kernel.org commit 4fa3d66f132b337be43ef2e7fb45064ecb2097f1 Author: Rob Herring Date: Thu Aug 22 21:12:12 2019 -0500 drm/shmem: Do dma_unmap_sg before purging pages Calling dma_unmap_sg() in drm_gem_shmem_free_object() is too late if the backing pages have already been released by the shrinker. The result is the following abort: Unable to handle kernel paging request at virtual address ffff8000098ed000 Mem abort info: ESR = 0x96000147 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000147 CM = 1, WnR = 1 swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000002f51000 [ffff8000098ed000] pgd=00000000401f8003, pud=00000000401f7003, pmd=00000000401b1003, pte=00e80000098ed712 Internal error: Oops: 96000147 [#1] SMP Modules linked in: panfrost gpu_sched CPU: 5 PID: 902 Comm: gnome-shell Not tainted 5.3.0-rc1+ #95 Hardware name: 96boards Rock960 (DT) pstate: 40000005 (nZcv daif -PAN -UAO) pc : __dma_inv_area+0x40/0x58 lr : arch_sync_dma_for_cpu+0x28/0x30 sp : ffff00001321ba30 x29: ffff00001321ba30 x28: ffff00001321bd08 x27: 0000000000000000 x26: 0000000000000009 x25: 0000ffffc1f86170 x24: 0000000000000000 x23: 0000000000000000 x22: 0000000000000000 x21: 0000000000021000 x20: ffff80003bb2d810 x19: 00000000098ed000 x18: 0000000000000000 x17: 0000000000000000 x16: ffff800023fd9480 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 00000000fffb9fff x10: 0000000000000000 x9 : 0000000000000000 x8 : ffff800023fd9c18 x7 : 0000000000000000 x6 : 00000000ffffffff x5 : 0000000000000000 x4 : 0000000000021000 Purging 5693440 bytes x3 : 000000000000003f x2 : 0000000000000040 x1 : ffff80000990e000 x0 : ffff8000098ed000 Call trace: __dma_inv_area+0x40/0x58 dma_direct_sync_single_for_cpu+0x7c/0x80 dma_direct_unmap_page+0x80/0x88 dma_direct_unmap_sg+0x54/0x80 drm_gem_shmem_free_object+0xfc/0x108 panfrost_gem_free_object+0x118/0x128 [panfrost] drm_gem_object_free+0x18/0x90 drm_gem_object_put_unlocked+0x58/0x80 drm_gem_object_handle_put_unlocked+0x64/0xb0 drm_gem_object_release_handle+0x70/0x98 drm_gem_handle_delete+0x64/0xb0 drm_gem_close_ioctl+0x28/0x38 drm_ioctl_kernel+0xb8/0x110 drm_ioctl+0x244/0x3f0 do_vfs_ioctl+0xbc/0x910 ksys_ioctl+0x78/0xa8 __arm64_sys_ioctl+0x1c/0x28 el0_svc_common.constprop.0+0x88/0x150 el0_svc_handler+0x28/0x78 el0_svc+0x8/0xc Code: 8a230000 54000060 d50b7e20 14000002 (d5087620) Fixes: 17acb9f35ed7 ("drm/shmem: Add madvise state and purge helpers") Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Steven Price Signed-off-by: Rob Herring Acked-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20190823021216.5862-5-robh@kernel.org commit 593bc4d008cf75daa924f73bd39b34dd03c4e8de Author: Rob Herring Date: Thu Aug 22 21:12:09 2019 -0500 drm/panfrost: Fix possible suspend in panfrost_remove Calls to panfrost_device_fini() access the h/w, but we already done a pm_runtime_put_sync_autosuspend() beforehand. This only works if the autosuspend delay is long enough. A 0ms delay will hang the system when removing the device. Fix this by moving the pm_runtime_put_sync_suspend() after the panfrost_device_fini() call. Cc: Tomeu Vizoso Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Rob Herring Reviewed-by: Steven Price Acked-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20190823021216.5862-2-robh@kernel.org commit 97588c89993d1fb6bf4026984c0c099a5122b0b2 Author: Rob Herring Date: Thu Aug 22 20:33:57 2019 -0500 MAINTAINERS: Add Steven and Alyssa as panfrost reviewers Add Steven Price and Alyssa Rosenzweig as reviewers as they have been the primary reviewers already. Cc: Steven Price Cc: Alyssa Rosenzweig Cc: Tomeu Vizoso Signed-off-by: Rob Herring Acked-by: Neil Armstrong Acked-by: Steven Price Acked-by: Tomeu Vizoso Reviewed-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20190823013357.932-1-robh@kernel.org commit 52282163dfa651849e905886845bcf6850dd83c2 Author: Steven Price Date: Thu Aug 22 10:32:18 2019 +0100 drm/panfrost: Add missing check for pfdev->regulator When modifying panfrost_devfreq_target() to support a device without a regulator defined I missed the check on the error path. Let's add it. Reported-by: Dan Carpenter Fixes: e21dd290881b ("drm/panfrost: Enable devfreq to work without regulator") Signed-off-by: Steven Price Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20190822093218.26014-1-steven.price@arm.com commit f2521f7731ed72a42c7ea24fd24acc3d1a806e0d Author: Gerd Hoffmann Date: Thu Aug 22 11:06:45 2019 +0200 drm/i915: switch to drm_fb_helper_remove_conflicting_pci_framebuffers No need for a home-grown version, the generic helper should work just fine. It also handles vgacon removal these days, see commit 1c74ca7a1a9a ("drm/fb-helper: call vga_remove_vgacon automatically."), so that can be removed too. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190822090645.25410-4-kraxel@redhat.com commit 35616a4aa919e91c4e530e7e6106e32d0ceb85c2 Author: Gerd Hoffmann Date: Thu Aug 22 11:06:44 2019 +0200 drm: drop resource_id parameter from drm_fb_helper_remove_conflicting_pci_framebuffers Not needed any more for remove_conflicting_pci_framebuffers calls. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190822090645.25410-3-kraxel@redhat.com commit 0a8459693238a339de9705da4e26f6ffbb6a4ebc Author: Gerd Hoffmann Date: Thu Aug 22 11:06:43 2019 +0200 fbdev: drop res_id parameter from remove_conflicting_pci_framebuffers Since commit b0e999c95581 ("fbdev: list all pci memory bars as conflicting apertures") the parameter was used for some sanity checks only, to make sure we detect any issues with the new approach to just list all memory bars as apertures. No issues turned up so far, so continue to cleanup: Drop the res_id parameter, drop the sanity checks. Also downgrade the logging from "info" level to "debug" level and update documentation. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190822090645.25410-2-kraxel@redhat.com commit d4c61c4a16decd8ace8660f22c81609a539fccba Author: Manasi Navare Date: Wed Aug 21 14:59:50 2019 -0700 drm/i915/dp: Fix DSC enable code to use cpu_transcoder instead of encoder->type This patch fixes the intel_configure_pps_for_dsc_encoder() function to use cpu_transcoder instead of encoder->type to select the correct DSC registers that was wrongly used in the original patch for one DSC register isntance. Fixes: 7182414e2530 ("drm/i915/dp: Configure i915 Picture parameter Set registers during DSC enabling") Cc: Ville Syrjala Cc: Maarten Lankhorst Cc: Jani Nikula Cc: Ville Syrjala Cc: # v5.0+ Signed-off-by: Manasi Navare Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190821215950.24223-1-manasi.d.navare@intel.com commit cee508a0bddba1627575de2e41fb8e321fa380a8 Author: Anusha Srivatsa Date: Tue Aug 20 15:30:59 2019 -0700 drm/dp/dsc: Add Support for all BPCs supported by TGL DSC engine on ICL supports only 8 and 10 BPC as the input BPC. But DSC engine in TGL supports 8, 10 and 12 BPC. Add 12 BPC support for DSC while calculating compression configuration. v2: Remove the separate define TGL_DP_DSC_MAX_SUPPORTED_BPC and use the value directly.(More such defines can be removed as part of future patches). (Ville) v3: Use values directly instead of accessing the defines everytime for min and max DSC BPC. Cc: Ville Syrjälä Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190820223059.18052-1-anusha.srivatsa@intel.com commit df7415bfc06f8ee482a510aea39c12121e409dcc Author: José Roberto de Souza Date: Tue Aug 20 15:33:25 2019 -0700 drm/i915: Do not unmask PSR interruption in IRQ postinstall No need to unmask PSR interrutpion if PSR is not enabled, better move the call to intel_psr_enable_source(). v2: Renamed intel_psr_irq_control() to psr_irq_control() (Lucas) Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190820223325.27490-3-jose.souza@intel.com commit 99fc38b12095cd0ca9fc5b8c8e27e827dff6ed34 Author: José Roberto de Souza Date: Tue Aug 20 15:33:24 2019 -0700 drm/i915: Add transcoder restriction to PSR2 According to PSR2_CTL definition in BSpec there is only one instance of PSR2_CTL. Platforms gen < 12 with EDP transcoder only support PSR2 on TRANSCODER_EDP while on TGL PSR2 is only supported by TRANSCODER_A. Since BDW PSR is allowed on any port, but we need to restrict by transcoder. v8: Renamed _psr2_supported_in_trans() to psr2_supported() (Lucas) v9: Renamed psr2_supported() to transcoder_has_psr2() (Ville) BSpec: 7713 BSpec: 20584 Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20190820223325.27490-2-jose.souza@intel.com commit 4ab4fa1032170b6ec50ffff0767096b3200dde8b Author: José Roberto de Souza Date: Tue Aug 20 15:33:23 2019 -0700 drm/i915/psr: Make PSR registers relative to transcoders PSR registers are a mess, some have the full address while others just have the additional offset from psr_mmio_base. For BDW+ psr_mmio_base is nothing more than TRANSCODER_EDP_OFFSET + 0x800 and using it makes more difficult for people with an PSR register address or PSR register name from from BSpec as i915 also don't match the BSpec names. For HSW psr_mmio_base is _DDI_BUF_CTL_A + 0x800 and PSR registers are only available in DDIA. Other reason to make relative to transcoder is that since BDW every transcoder have PSR registers, so in theory it should be possible to have PSR enabled in a non-eDP transcoder. So for BDW+ we can use _TRANS2() to get the register offset of any PSR register in any transcoder while for HSW we have _HSW_PSR_ADJ that will calculate the register offset for the single PSR instance, noting that we are already guarded about trying to enable PSR in other port than DDIA on HSW by the 'if (dig_port->base.port != PORT_A)' in intel_psr_compute_config(), this check should only be valid for HSW and will be changed in future. PSR2 registers and PSR_EVENT was added after Haswell so that is why _PSR_ADJ() is not used in some macros. The only registers that can not be relative to transcoder are PSR_IMR and PSR_IIR that are not relative to anything, so keeping it hardcoded. That changed for TGL but it will be handled in another patch. Also removing BDW_EDP_PSR_BASE from GVT because it is not used as it is the only PSR register that GVT have. v5: - Macros changed to be more explicit about HSW (Dhinakaran) - Squashed with the patch that added the tran parameter to the macros (Dhinakaran) v6: - Checking for interruption errors after module reload in the transcoder that will be used (Dhinakaran) - Using lowercase to the registers offsets v7: - Removing IS_HASWELL() from registers macros(Jani) Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Ville Syrjälä Cc: Zhi Wang Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190820223325.27490-1-jose.souza@intel.com commit cee17a71656e9e1b5ffc01767844026550d5f4a9 Author: Eugeniy Paltsev Date: Tue Jun 11 20:21:59 2019 +0300 drm/arcpgu: rework encoder search Instead of using non-standard "encoder-slave" property to find encoder let's find it by associated endpoint. While I'm on it add corresponding log message if we don't find any encoder and we assume that we use virtual LCD on the simulation platform. Signed-off-by: Eugeniy Paltsev Signed-off-by: Alexey Brodkin commit 136db994852a9b405ac1074de0e7a1c4c840b8ee Author: John Johansen Date: Fri May 31 06:54:54 2019 -0700 apparmor: increase left match history buffer size There have been cases reported where a history buffer size of 8 was not enough to resolve conflict overlaps. Increase the buffer to and get rid of the size element which is currently just storing the constant WB_HISTORY_SIZE. Signed-off-by: John Johansen commit 8ac2ca328ec9356f56d0dad3aa350d9600db951a Author: Sebastian Andrzej Siewior Date: Fri Apr 5 15:34:58 2019 +0200 apparmor: Switch to GFP_KERNEL where possible After removing preempt_disable() from get_buffers() it is possible to replace a few GFP_ATOMIC allocations with GFP_KERNEL. Replace GFP_ATOMIC allocations with GFP_KERNEL where the context looks to bee preepmtible. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: John Johansen commit df323337e507a0009d3db1ea25948d4c7f320d62 Author: Sebastian Andrzej Siewior Date: Fri May 3 16:12:21 2019 +0200 apparmor: Use a memory pool instead per-CPU caches The get_buffers() macro may provide one or two buffers to the caller. Those buffers are pre-allocated on init for each CPU. By default it allocates 2* 2 * MAX_PATH * POSSIBLE_CPU which equals 64KiB on a system with 4 CPUs or 1MiB with 64 CPUs and so on. Replace the per-CPU buffers with a common memory pool which is shared across all CPUs. The pool grows on demand and never shrinks. The pool starts with two (UP) or four (SMP) elements. By using this pool it is possible to request a buffer and keeping preemption enabled which avoids the hack in profile_transition(). It has been pointed out by Tetsuo Handa that GFP_KERNEL allocations for small amount of memory do not fail. In order not to have an endless retry, __GFP_RETRY_MAYFAIL is passed (so the memory allocation is not repeated until success) and retried once hoping that in the meantime a buffer has been returned to the pool. Since now NULL is possible all allocation paths check the buffer pointer and return -ENOMEM on failure. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: John Johansen commit bf1d2ee7bc6215dd92427625a4c707227457a5db Author: Bharath Vedartham Date: Tue Apr 23 22:23:00 2019 +0530 apparmor: Force type-casting of current->real_cred This patch fixes the sparse warning: warning: cast removes address space '' of expression. Signed-off-by: Bharath Vedartham Signed-off-by: John Johansen commit 058c4f342582362c75dd5e162dc4ff73a392ffad Author: Colin Ian King Date: Tue Apr 16 15:42:18 2019 +0100 apparmor: fix spelling mistake "immutible" -> "immutable" There is a spelling mistake in an information message string, fix it. Signed-off-by: Colin Ian King Signed-off-by: John Johansen commit 145a0ef21c8e944957f58e2c8ffcd8a10f46266a Author: John Johansen Date: Sat Mar 9 16:58:10 2019 -0800 apparmor: fix blob compression when ns is forced on a policy load When blob compression is turned on, if the policy namespace is forced onto a policy load, the policy load will fail as the namespace name being referenced is inside the compressed policy blob, resulting in invalid or names that are too long. So duplicate the name before the blob is compressed. Fixes: 876dd866c084 ("apparmor: Initial implementation of raw policy blob compression") Signed-off-by: John Johansen commit fe166a9f2868839a1e2f7bd950164d05e86eb154 Author: John Johansen Date: Mon Feb 11 21:56:46 2019 -0800 apparmor: fix missing ZLIB defines On configs where ZLIB is not already selected we are getting undefined reference to `zlib_deflateInit2' undefined reference to `zlib_deflate' undefined reference to `zlib_deflateEnd' For now just select the necessary ZLIB configs. Fixes: 876dd866c084 ("apparmor: Initial implementation of raw policy blob compression") Signed-off-by: John Johansen commit 6a59d9243d349ae598e8ea74c36aa8e31705071a Author: John Johansen Date: Fri Feb 8 17:14:35 2019 -0800 apparmor: fix blob compression build failure on ppc security/apparmor/policy_unpack.c: In function 'deflate_compress': security/apparmor/policy_unpack.c:1064:4: error: implicit declaration of function 'vfree'; did you mean 'kfree'? [-Werror=implicit-function-declaration] vfree(stgbuf); ^~~~~ kfree Fixes: 876dd866c084 ("apparmor: Initial implementation of raw policy blob compression") Signed-off-by: John Johansen commit 63c16c3a7608558a8e5ced96b8b6b06c490fd513 Author: Chris Coulson Date: Wed Jan 23 19:17:09 2019 +0000 apparmor: Initial implementation of raw policy blob compression This adds an initial implementation of raw policy blob compression, using deflate. Compression level can be controlled via a new sysctl, "apparmor.rawdata_compression_level", which can be set to a value between 0 (no compression) and 9 (highest compression). Signed-off-by: Chris Coulson Signed-off-by: John Johansen